mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-15 00:37:33 +01:00
fix(ui): show a vertical file tree in the reviewer preview
The "What reviewers will see" window now has a sidebar like the explorer's instead of the one-row file strip: folders first, then files, with the explorer's tree rows, icons and teal selection on the README. Folders expand from the loaded file list. The sidebar is 24% of the window (180-240px), tinted full height, and scrolls apart from the document. Phones hide it and show the explorer's "Files" button in the file bar. Loading shows skeleton rows; without a file list the sidebar shows the README only. Removes the strip fitter and the dead rail/strip CSS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7423c78e27
commit
6226acff80
6 files changed
+139
-255
No files matched your search
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"core.min.js": "core.d23af1c652.min.js",
|
||||
"vendor.min.js": "vendor.9d6a871a85.min.js",
|
||||
"vendor.min.js": "vendor.970654db10.min.js",
|
||||
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
|
||||
"all.min.css": "all.d7daa0210e.min.css",
|
||||
"all.min.css": "all.53fcd1a96b.min.css",
|
||||
"markdown.min.js": "markdown.6c8dfb7b1d.min.js",
|
||||
"pdf.min.js": "pdf.4d9cc6ff49.min.js",
|
||||
"notebook.min.js": "notebook.c3144c18ae.min.js",
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
+39
-132
@@ -8356,26 +8356,8 @@ body.dark-mode .preserve-dialog { background: #242320; color: #faf9f6; }
|
||||
.reviewer-preview pre, .reviewer-preview .markdown-body pre, .reviewer-preview .pr-diff pre, .reviewer-preview .pr-diff table { max-width: 100%; }
|
||||
.reviewer-preview pre { overflow-x: hidden !important; white-space: pre-wrap !important; overflow-wrap: anywhere !important; word-break: normal !important; }
|
||||
.reviewer-preview pre code, .reviewer-preview pre code span { white-space: pre-wrap !important; overflow-wrap: anywhere !important; word-break: normal !important; }
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree .anonymize-preview-body {
|
||||
padding-left: 32px !important;
|
||||
padding-right: 32px !important;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
/* Each paragraph, list, heading or code block sits wholly beside the rail or wholly below it (none changes width
|
||||
mid-way); wrapper divs are not boxed, so the blocks after the rail use the full width. */
|
||||
.reviewer-preview .rp-body.has-tree .anonymize-preview-body li > :is(p, ul, ol) { display: block; }
|
||||
}
|
||||
.reviewer-preview pre code .code-line { display: inline-block; width: 100%; box-sizing: border-box; padding-left: var(--hang, 4ch); text-indent: calc(-1 * var(--hang, 4ch)); vertical-align: top; }
|
||||
.reviewer-preview pre code .md-diff-line { padding-left: calc(var(--diff-pad) + var(--hang, 4ch)); text-indent: calc(-1 * var(--hang, 4ch)); vertical-align: top; }
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree > .rp-tree .rp-tree-row.rp-skel-row { width: 120px; }
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree .anonymize-preview-body :is(p, ul, ol, dl, h1, h2, h3, h4, h5, h6, blockquote, hr) { display: revert; }
|
||||
}
|
||||
.reviewer-preview pre, .reviewer-preview pre code { font-family: var(--font-mono) !important; font-size: 12px !important; line-height: 20px !important; }
|
||||
.reviewer-preview pre code { display: block; }
|
||||
.dark-mode .reviewer-preview pre code .md-diff-line.is-add { background: #1E2A20; }
|
||||
@@ -10013,16 +9995,6 @@ pre { --diff-pad: 15px; }
|
||||
}
|
||||
.repo-picker-list::-webkit-scrollbar-track { background: transparent; }
|
||||
.repo-picker-list::-webkit-scrollbar-thumb { background: var(--scroll-thumb, #CFC7B9); border-radius: 3px; }
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree .rp-file-head {
|
||||
margin-left: 0;
|
||||
position: relative;
|
||||
padding-left: 32px !important;
|
||||
padding-right: 32px !important;
|
||||
border-top: 1px solid var(--rp-line);
|
||||
border-bottom: 1px solid var(--rp-line);
|
||||
}
|
||||
}
|
||||
.anonymize-page .source-url-label-row .repo-access-switch::before { content: none !important; display: none !important; }
|
||||
.dark-mode .anonymize-page .source-url-label-row .repo-access-switch { background: var(--canvas-bg-color) !important; }
|
||||
/* Admin: numerals in Inter, readable small labels, honest colours */
|
||||
@@ -13668,26 +13640,6 @@ input[type="date"].form-control { font-family: var(--font-sans) !important; font
|
||||
.reviewer-preview .rp-bar-id { padding-left: 12px; border-left: 1px solid var(--rp-line); font: 500 12px/1 var(--font-mono, ui-monospace, monospace); color: var(--color); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.reviewer-preview .rp-bar-kind { margin-left: auto; font-size: 12px; color: var(--ink-muted); }
|
||||
.reviewer-preview .rp-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr); }
|
||||
.reviewer-preview .rp-body.has-tree { grid-template-columns: 188px minmax(0,1fr); }
|
||||
.reviewer-preview .rp-tree {
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 10px 8px;
|
||||
background: var(--rp-tree);
|
||||
align-self: start;
|
||||
padding-bottom: 56px !important;
|
||||
border-right: 0 !important;
|
||||
-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
|
||||
mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
|
||||
box-shadow: inset -1px 0 0 var(--rp-line);
|
||||
}
|
||||
.reviewer-preview .rp-tree-row { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 8px; border-radius: 4px; font-size: 13px; color: var(--color); white-space: nowrap; min-width: 0; }
|
||||
.reviewer-preview .rp-tree-icon { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--ink-muted); stroke-width: 1.2; }
|
||||
.reviewer-preview .rp-tree-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||||
.reviewer-preview .rp-tree-row.is-active { background: var(--hover-bg-color, #EDEAE4); box-shadow: inset 2px 0 0 var(--accent); font-weight: 500; }
|
||||
.reviewer-preview .rp-doc { min-height: 0; min-width: 0; overflow: auto; scrollbar-width: thin; position: relative; }
|
||||
.reviewer-preview .rp-file-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 10px; padding: 10px 24px; background: var(--rp-window); border-bottom: 1px solid var(--rp-line); font-size: 13px; }
|
||||
.reviewer-preview .rp-file-name { font-weight: 600; color: var(--color); }
|
||||
@@ -13725,14 +13677,11 @@ input[type="date"].form-control { font-family: var(--font-sans) !important; font
|
||||
.reviewer-preview .rp-window { margin: 0; border: 1px solid var(--rp-line); border-radius: 10px; min-height: 64vh; }
|
||||
.reviewer-preview .rp-chrome { height: 30px; }
|
||||
.reviewer-preview .rp-url { font-size: 11px; margin-left: 6px; }
|
||||
.reviewer-preview .rp-body.has-tree { grid-template-columns: minmax(0,1fr); }
|
||||
.reviewer-preview .rp-tree { display: none; }
|
||||
.reviewer-preview .rp-file-head { padding: 9px 16px; }
|
||||
.reviewer-preview .rp-file-head { padding: 9px 16px; }
|
||||
.anonymize-page .reviewer-preview .anonymize-preview-body { padding: 18px 16px 28px !important; }
|
||||
.reviewer-preview .rp-state { padding: 20px 16px; }
|
||||
.reviewer-preview .rp-error, .reviewer-preview .rp-empty { margin: 16px; }
|
||||
}
|
||||
.reviewer-preview .rp-tree-note { margin: 10px 8px 0; font-size: 12px; line-height: 1.5; color: var(--ink-muted); white-space: normal; }
|
||||
.anonymize-page .submit-reason { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); text-align: center; }
|
||||
|
||||
/* ----- File viewer ----- */
|
||||
@@ -14004,34 +13953,6 @@ pre code mark.redact-chip,
|
||||
.file-card-head .file-card-path > .breadcrumb { overflow: hidden; }
|
||||
.file-card-head .file-card-path > .copy-path-btn { display: none !important; }
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree {
|
||||
display: grid !important;
|
||||
grid-template-columns: 188px minmax(0, 1fr);
|
||||
align-items: start;
|
||||
overflow: auto;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.reviewer-preview .rp-body.has-tree>.rp-tree {
|
||||
box-sizing: border-box;
|
||||
padding: 10px 8px 14px !important;
|
||||
-webkit-mask-image: none !important;
|
||||
mask-image: none !important;
|
||||
box-shadow: none !important;
|
||||
border-right: 1px solid var(--rp-line) !important;
|
||||
border-bottom: 1px solid var(--rp-line) !important;
|
||||
border-bottom-right-radius: 10px;
|
||||
float: none;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
align-self: start;
|
||||
width: auto;
|
||||
margin: 0 !important;
|
||||
z-index: 2;
|
||||
}
|
||||
.reviewer-preview .rp-body.has-tree>.rp-doc { min-height: 0; overflow: visible !important; min-width: 0; margin-top: 0 !important; }
|
||||
.reviewer-preview .rp-body.has-tree .rp-state { margin-left: 0 !important; padding-left: 0 !important; }
|
||||
}
|
||||
.anonymize-page .source-url-label-row { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; flex-wrap: nowrap !important; gap: 12px !important; min-height: 32px; margin-bottom: 8px !important; }
|
||||
.anonymize-page .source-url-label-row > .repo-access { display: flex !important; justify-content: flex-end !important; margin: 0 0 0 auto !important; padding: 0 !important; border: 0 !important; background: none !important; flex: none !important; width: auto !important; order: 0 !important; }
|
||||
.anonymize-page .source-url-label-row .repo-access-switch { display: inline-flex !important; align-items: center; gap: 0 !important; padding: 2px !important; border: 1px solid var(--border-color) !important; border-radius: 7px !important; background: var(--paper-bg-alt) !important; width: auto !important; flex: none !important; max-width: none !important; margin: 0 !important; }
|
||||
@@ -14059,10 +13980,6 @@ pre code mark.redact-chip,
|
||||
@media (min-width: 768px) {
|
||||
.admin-page .paper-table.paper-table-repos .anon-sub:has(.meta-sep) > :first-child { flex: 0 1 auto !important; min-width: 6ch !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree .anonymize-preview-body :is(p, ul, ol, dl, h1, h2, h3, h4, h5, h6, pre, blockquote, hr, .highlight) { display: revert; }
|
||||
.reviewer-preview .rp-body.has-tree .anonymize-preview-body :is(pre,.highlight) { display: block; }
|
||||
}
|
||||
.reviewer-preview .diff-file-table .diff-code { padding-left: calc(12px + var(--hang, 4ch)); text-indent: calc(-1 * var(--hang, 4ch)); }
|
||||
.explorer-content notebook .nb-code-scroll { position: relative; }
|
||||
.explorer-content notebook .nb-code-scroll.is-overflowing::before { content: ""; position: absolute; z-index: 1; bottom: 5px; left: calc(8px + var(--thumb-x, 0px)); width: var(--thumb-w, 40px); height: 3px; border-radius: 2px; background: var(--ink-faint, #b9b2a6); opacity: .8; pointer-events: none; }
|
||||
@@ -14113,43 +14030,6 @@ pre code mark.redact-chip,
|
||||
@media (max-width: 767px) {
|
||||
.anonymize-page .source-url-label-row .repo-access-switch.repo-access-switch { padding: 3px !important; border-radius: 8px !important; height: 36px; box-sizing: border-box; }
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree.has-tree { display: block !important; overflow: auto; scrollbar-width: thin; }
|
||||
.reviewer-preview .rp-body.has-tree>.rp-tree.rp-tree {
|
||||
position: static !important;
|
||||
float: none;
|
||||
display: flex !important;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
margin: 0 !important;
|
||||
overflow: visible;
|
||||
background: var(--rp-tree);
|
||||
-webkit-mask-image: none !important;
|
||||
mask-image: none !important;
|
||||
box-shadow: none !important;
|
||||
width: 100% !important;
|
||||
max-width: none;
|
||||
padding: 7px 32px 7px 24px !important;
|
||||
gap: 2px 4px;
|
||||
border: 0 !important;
|
||||
border-bottom: 1px solid var(--rp-line) !important;
|
||||
border-radius: 0 !important;
|
||||
padding-left: 32px !important;
|
||||
}
|
||||
.reviewer-preview .rp-body.has-tree > .rp-tree .rp-tree-row { flex: 0 0 auto; max-width: 220px; }
|
||||
.reviewer-preview .rp-body.has-tree>.rp-tree .rp-tree-note {
|
||||
flex: 0 1 auto;
|
||||
line-height: 1.45;
|
||||
margin: 0 0 0 auto !important;
|
||||
padding-left: 16px;
|
||||
max-width: 480px;
|
||||
font-size: 12px !important;
|
||||
text-align: right;
|
||||
color: var(--ink-muted) !important;
|
||||
}
|
||||
}
|
||||
.reviewer-preview pre code :is(.md-diff-line, .code-line) { line-height: 20px !important; vertical-align: top; margin-top: 0; margin-bottom: 0; border: 0; box-shadow: none; outline: 0; }
|
||||
.status-dot.status-dot:is(.st-expiring, .st-removing, .status-expiring, .status-removing) { background: linear-gradient(90deg, var(--st-off) 50%, transparent 50%) !important; box-shadow: inset 0 0 0 1.5px var(--st-off) !important; }
|
||||
.errors-page .errors-group-count { margin-left: 6px; }
|
||||
@@ -14157,9 +14037,6 @@ pre code mark.redact-chip,
|
||||
@media (min-width: 768px) {
|
||||
.admin-page .paper-table-repos .cell-status .status-sub { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal !important; overflow: hidden; text-overflow: clip; }
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree > .rp-tree + .rp-doc .rp-file-head { border-top: 0 !important; }
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.admin-page.admin-page .paper-table.paper-table-repos .anon-sub.anon-sub > * { flex: 0 0 auto !important; min-width: 0 !important; max-width: 100% !important; overflow: visible; text-overflow: clip; }
|
||||
.paper-table-repos .src-path .src-owner { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
@@ -14172,8 +14049,6 @@ pre code mark.redact-chip,
|
||||
@media (min-width: 768px) {
|
||||
.dashboard-page .paper-table.paper-table-dashboard .paper-table-row.repo-error { padding-left: 12px !important; box-shadow: inset 3px 0 0 var(--status-error) !important; border-left: 0 !important; }
|
||||
}
|
||||
.reviewer-preview .rp-tree-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 3px 0; font-size: 12px; font-weight: 500; line-height: 18px; color: var(--ink-muted); white-space: nowrap; }
|
||||
.reviewer-preview .rp-tree-label .rp-tree-icon { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.2; }
|
||||
.admin-page.admin-page .paper-table .cell-anon .anon-sub.anon-meta { display: flex !important; flex-wrap: nowrap; align-items: center; min-width: 0; max-width: 100%; height: auto !important; overflow: hidden; margin-left: 0 !important; gap: 0 !important; line-height: 18px; }
|
||||
|
||||
/* ----- Admin ----- */
|
||||
@@ -14298,12 +14173,6 @@ body.dark-mode .errors-page .sev-dot.sev-info { background: var(--ink-faint) !im
|
||||
keeps the entries that fit (folders first), always the README, and counts
|
||||
the rest in a "+N more" chip. Entries past the fit stay measurable but are
|
||||
out of the flow. */
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-tree > .rp-tree.rp-tree { flex-wrap: nowrap !important; overflow: hidden !important; position: relative !important; gap: 4px !important; }
|
||||
.reviewer-preview .rp-body.has-tree > .rp-tree .rp-tree-row { flex: 0 0 auto; max-width: 180px; }
|
||||
.reviewer-preview .rp-body.has-tree > .rp-tree .rp-tree-row.is-overflow { position: absolute !important; visibility: hidden; pointer-events: none; left: 0; top: 0; }
|
||||
.reviewer-preview .rp-tree-more { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-left: 2px; border-radius: 11px; border: 1px solid var(--rp-line); font-size: 12px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
||||
}
|
||||
|
||||
/* F6. Workspace submit bar: always fits its column. The button keeps its
|
||||
natural width and never shrinks or clips; the draft note beside it takes
|
||||
@@ -14332,3 +14201,41 @@ body.dark-mode .errors-page .sev-dot.sev-info { background: var(--ink-faint) !im
|
||||
body.dark-mode .auto-update-check .paid-tag { background: rgba(251, 191, 36, .12); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .32); color: #F2C66D; }
|
||||
.auto-update-check .auto-update-paid a { white-space: nowrap; }
|
||||
.hosting-limit.auto-update-note { font-weight: 400; line-height: 1.5; }
|
||||
|
||||
/* F8. Reviewer preview: a vertical file tree, a miniature of the explorer.
|
||||
The sidebar is tinted like the explorer's .leftCol (#F3F1EC / #1F1D1A; the
|
||||
workspace overrides --paper-bg-alt, so the values are spelled out) and runs the full
|
||||
height of the window; the tree and the document scroll on their own. Rows
|
||||
reuse the explorer's .files tree styles; nesting is drawn per row (--depth)
|
||||
with the explorer's 16px step and guide line. Phones hide the sidebar and
|
||||
show the explorer's "Files" button in the file bar instead. */
|
||||
.reviewer-preview .rp-body.has-side { display: grid; grid-template-columns: clamp(180px, 24%, 240px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); overflow: hidden; }
|
||||
.reviewer-preview .rp-body.has-side > .rp-doc { min-height: 0; overflow: auto; }
|
||||
.reviewer-preview .rp-side { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #F3F1EC; border-right: 1px solid var(--border-color); }
|
||||
.dark-mode .reviewer-preview .rp-side { background: #1F1D1A; }
|
||||
.reviewer-preview .rp-side .files.rp-files { height: auto; overflow: visible; margin: 0; padding: 8px 6px; list-style: none; }
|
||||
.reviewer-preview .rp-files > li { padding-left: calc(var(--depth, 0) * 16px); background-image: repeating-linear-gradient(to right, transparent 0 7px, var(--border-color) 7px 8px, transparent 8px 16px); background-size: calc(var(--depth, 0) * 16px) 100%; background-repeat: no-repeat; word-break: normal; }
|
||||
.reviewer-preview .rp-files a { min-height: 26px; cursor: default; user-select: none; }
|
||||
.reviewer-preview .rp-files .file:not(.folder) > a:hover { background: transparent; }
|
||||
.reviewer-preview .rp-files .file.active:not(.folder) > a:hover { background: #E8E5DD; }
|
||||
.dark-mode .reviewer-preview .rp-files .file.active:not(.folder) > a:hover { background: rgba(255,255,255,.1); }
|
||||
.reviewer-preview .rp-files .folder > a { cursor: pointer; }
|
||||
.reviewer-preview .rp-files .folder > a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
.reviewer-preview .rp-files-skel { list-style: none; margin: 0; padding: 8px 6px; }
|
||||
.reviewer-preview .rp-files-skel li { display: flex; align-items: center; height: 26px; padding: 0 8px 0 21px; }
|
||||
.reviewer-preview .rp-files-skel .rp-skel { height: 9px; }
|
||||
@media (prefers-reduced-motion: no-preference) { .reviewer-preview .rp-files-skel .rp-skel { animation: rp-pulse 1.4s ease-in-out infinite; } }
|
||||
.reviewer-preview .rp-side-note { margin: 4px 14px 12px; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
|
||||
.reviewer-preview .rp-files-btn { display: none; }
|
||||
@media (min-width: 768px) {
|
||||
.reviewer-preview .rp-body.has-side .rp-file-head { padding-left: 32px; padding-right: 32px; }
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.reviewer-preview .rp-body.has-side { display: block; overflow: visible; }
|
||||
.reviewer-preview .rp-side { display: none; }
|
||||
.reviewer-preview .rp-body.has-side .rp-file-head { align-items: center; padding: 6px 16px 6px 8px; }
|
||||
.reviewer-preview .rp-files-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border-color); border-radius: 6px; background: #F3F1EC; font-size: 13px; font-weight: 500; color: var(--color); white-space: nowrap; }
|
||||
.dark-mode .reviewer-preview .rp-files-btn { background: #1F1D1A; }
|
||||
.reviewer-preview .rp-files-btn .ui-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
|
||||
.reviewer-preview .rp-files-count { font-weight: 400; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
|
||||
}
|
||||
@@ -542,20 +542,23 @@
|
||||
<div class="rp-window">
|
||||
<div class="rp-chrome" aria-hidden="true"><i></i><i></i><i></i><span class="rp-url">{{ previewUrl() || 'anonymous.4open.science' }}</span></div>
|
||||
<div class="rp-bar" aria-hidden="true"><span class="vb-logo">Anonymous <em>GitHub</em></span><span class="rp-bar-id" v-if="previewId()">{{ previewId() }}</span><span class="rp-bar-kind" v-if="detectedType !== 'repo'">{{ detectedType === 'pr' ? 'Pull request' : 'Gist' }}</span></div>
|
||||
<div class="rp-body" :class="{ 'has-tree': detectedType === 'repo' }">
|
||||
<nav class="rp-tree" v-if="detectedType === 'repo'" aria-label="Files reviewers will see">
|
||||
<template v-if="previewTree().length">
|
||||
<span class="rp-tree-row" v-for="(entry, index) in previewTree()" :key="entry.name" :class="{ 'is-dir': entry.dir, 'is-active': entry.readme, 'is-readme': entry.readme, 'is-overflow': !previewTreeShows(entry, index) }" :title="entry.name"><svg class="rp-tree-icon" viewBox="0 0 16 16" aria-hidden="true"><path v-if="entry.dir" d="M1.5 3.5h4l1.5 1.5h7.5v8h-13z"/><path v-else d="M3.5 1.5h6l3 3v10h-9z"/></svg><span class="rp-tree-name">{{ entry.name }}</span></span>
|
||||
<span class="rp-tree-more" v-if="previewTreeMore() > 0" :title="previewTreeMore() + ' more files and folders at the top level'">+{{ previewTreeMore() }} more</span>
|
||||
</template>
|
||||
<div class="rp-body" :class="{ 'has-side': detectedType === 'repo' }">
|
||||
<!-- Sidebar: a miniature of the explorer's file tree -->
|
||||
<nav class="rp-side" v-if="detectedType === 'repo'" aria-label="Files reviewers will see">
|
||||
<ul class="files rp-files" v-if="previewTree().length">
|
||||
<li v-for="entry in previewTree()" :key="entry.path" class="file" :class="{ folder: entry.dir, open: entry.open, active: entry.readme }" :style="{ '--depth': entry.depth }">
|
||||
<a v-if="entry.dir" role="button" tabindex="0" :aria-expanded="entry.open ? 'true' : 'false'" :title="entry.path" @click="togglePreviewFolder(entry.path)" @keydown.enter.prevent="togglePreviewFolder(entry.path)" @keydown.space.prevent="togglePreviewFolder(entry.path)"><span class="tree-toggle"></span><span class="tree-icon-folder" aria-hidden="true"><svg viewBox="0 0 14 12" focusable="false"><path d="M1.5 10.5v-9h4l1.5 2h5.5v7z"/></svg></span><span class="tree-name">{{ entry.name }}</span></a>
|
||||
<a v-else :title="entry.path" :aria-current="entry.readme ? 'page' : null"><span class="tree-spacer"></span><span class="far fa-file tree-icon-file" aria-hidden="true"></span><span class="tree-name">{{ entry.name }}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="rp-files-skel" v-else-if="preserve.loading || (sourceLoading && !preserve.error)" aria-label="Loading the file list"><li v-for="w in [58, 72, 46, 64, 52, 38, 68, 44]" :key="w"><i class="rp-skel" :style="{ width: w + '%' }"></i></li></ul>
|
||||
<template v-else>
|
||||
<template v-if="preserve.loading"><span class="rp-tree-row rp-skel-row" v-for="w in [62, 48, 70, 40]" :key="w"><i class="rp-skel" :style="{ width: w + '%' }"></i></span></template>
|
||||
<span class="rp-tree-label" v-if="!preserve.loading"><svg class="rp-tree-icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M1.5 3.5h4l1.5 1.5h7.5v8h-13z"/></svg>Files</span>
|
||||
<span class="rp-tree-note" v-if="!preserve.loading">Every other file at this commit appears here, with the same redactions.</span>
|
||||
<ul class="files rp-files" v-if="readme || previewStatus === 'ready'"><li class="file active"><a title="README.md" aria-current="page"><span class="tree-spacer"></span><span class="far fa-file tree-icon-file" aria-hidden="true"></span><span class="tree-name">README.md</span></a></li></ul>
|
||||
<p class="rp-side-note">Every other file at this commit appears here, with the same redactions.</p>
|
||||
</template>
|
||||
</nav>
|
||||
<div class="rp-doc">
|
||||
<div class="rp-file-head" v-if="detectedType === 'repo' && (previewStatus === 'ready' || readme)"><span class="rp-file-name">README.md</span><span class="rp-file-meta">Markdown</span></div>
|
||||
<div class="rp-file-head" v-if="detectedType === 'repo' && (previewStatus === 'ready' || readme)"><span class="rp-files-btn" aria-hidden="true"><svg class="ui-icon"><use href="#ui-icon-folder"></use></svg>Files<span class="rp-files-count" v-if="previewTreeCount()">{{ previewTreeCount() }}</span></span><span class="rp-file-name">README.md</span><span class="rp-file-meta">Markdown</span></div>
|
||||
<!-- Loading: skeleton inside the window -->
|
||||
<div class="rp-state rp-loading" role="status" v-if="previewStatus === 'loading' || (sourceLoading && previewStatus !== 'ready' && previewStatus !== 'error')">
|
||||
<span class="rp-state-text">{{ previewStatus === 'loading' ? 'Updating the anonymized preview…' : (detectedType === 'pr' ? 'Loading the pull request from GitHub…' : detectedType === 'gist' ? 'Loading the gist from GitHub…' : 'Loading the repository from GitHub…') }}</span>
|
||||
|
||||
+39
-65
@@ -1984,76 +1984,50 @@ export const anonymizeController = function (state, http, html, params, location
|
||||
cache.forEach((value) => { n += count(value); });
|
||||
return n;
|
||||
};
|
||||
// Top-level entries for the preview's miniature file tree, from the same
|
||||
// tree the Unredacted-files picker loads (folders first, like the explorer).
|
||||
// The preview's miniature file tree, from the same tree the
|
||||
// Unredacted-files picker loads. Like the explorer: folders first, then
|
||||
// files, each alphabetical; folders start collapsed and open on click.
|
||||
// Only the open folders' rows are built, so large repositories stay cheap.
|
||||
state.previewTreeOpen = {};
|
||||
const byName = (a, b) => a.localeCompare(b, undefined, { sensitivity: "base" });
|
||||
const baseName = (path) => path.slice(path.lastIndexOf("/") + 1);
|
||||
state.previewTree = () => {
|
||||
if (!state.preserve.commit || !preserveIndex) return [];
|
||||
const root = preserveIndex.dirs.get("");
|
||||
if (!root) return [];
|
||||
const readme = root.files.find((f) => /^readme(\.|$)/i.test(f));
|
||||
const dirs = root.dirs.slice(0, 9).map((d) => ({ name: d, dir: true }));
|
||||
const files = [...root.files].sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" })).slice(0, Math.max(3, 14 - dirs.length)).map((f) => ({ name: f, dir: false, readme: f === readme }));
|
||||
if (readme && !files.some((f) => f.readme)) files.push({ name: readme, dir: false, readme: true });
|
||||
return [...dirs, ...files];
|
||||
const readme = (preserveIndex.dirs.get("")?.files || []).find((f) => /^readme(\.|$)/i.test(f));
|
||||
const rows = [];
|
||||
const walk = (dir, depth) => {
|
||||
const node = preserveIndex.dirs.get(dir);
|
||||
if (!node) return;
|
||||
for (const sub of [...node.dirs].sort((a, b) => byName(baseName(a), baseName(b)))) {
|
||||
const open = !!state.previewTreeOpen[sub];
|
||||
rows.push({ path: sub, name: baseName(sub), dir: true, open, depth });
|
||||
if (open) walk(sub, depth + 1);
|
||||
}
|
||||
for (const file of [...node.files].sort((a, b) => byName(baseName(a), baseName(b)))) {
|
||||
rows.push({ path: file, name: baseName(file), dir: false, readme: file === readme, depth });
|
||||
}
|
||||
};
|
||||
walk("", 0);
|
||||
return rows;
|
||||
};
|
||||
// The preview's file strip is one row: the first entries that fit
|
||||
// (folders first), the README always, then "+N more". All entries render
|
||||
// so they can be measured; the ones past the fit are taken out of the flow.
|
||||
state.previewTreeFit = Infinity;
|
||||
state.previewTreeTotal = () => {
|
||||
state.previewTreeCount = () => {
|
||||
const root = state.preserve.commit && preserveIndex ? preserveIndex.dirs.get("") : null;
|
||||
return root ? root.dirs.length + root.files.length : 0;
|
||||
};
|
||||
state.previewTreeShows = (entry, index) => entry.readme
|
||||
|| state.previewTree().slice(0, index).filter((e) => !e.readme).length < state.previewTreeFit;
|
||||
state.previewTreeMore = () => {
|
||||
const tree = state.previewTree();
|
||||
const shown = tree.filter((entry, index) => state.previewTreeShows(entry, index)).length;
|
||||
return Math.max(0, state.previewTreeTotal() - shown);
|
||||
// Like the explorer, the selected README is scrolled into the sidebar's
|
||||
// view when the list loads (only the sidebar scrolls, not the page).
|
||||
function revealPreviewReadme() {
|
||||
nextTick(() => {
|
||||
const nav = document.querySelector(".reviewer-preview .rp-side");
|
||||
const row = nav?.querySelector(".rp-files > li.active");
|
||||
if (!nav || !row || !nav.clientHeight) return;
|
||||
const bottom = row.getBoundingClientRect().bottom - nav.getBoundingClientRect().top + nav.scrollTop;
|
||||
if (bottom > nav.scrollTop + nav.clientHeight) nav.scrollTop = bottom - nav.clientHeight + row.offsetHeight * 2;
|
||||
});
|
||||
}
|
||||
state.togglePreviewFolder = (path) => {
|
||||
state.previewTreeOpen[path] = !state.previewTreeOpen[path];
|
||||
};
|
||||
const treeListen = createListeners();
|
||||
const treeTimers = createTimers();
|
||||
let treeObserver = null;
|
||||
let observedTree = null;
|
||||
let treeFitQueued = false;
|
||||
const fitPreviewTree = () => {
|
||||
treeFitQueued = false;
|
||||
const nav = document.querySelector(".reviewer-preview .rp-tree");
|
||||
if (nav !== observedTree) {
|
||||
treeObserver?.disconnect();
|
||||
observedTree = nav;
|
||||
if (nav && typeof ResizeObserver === "function") {
|
||||
treeObserver ||= new ResizeObserver(() => queuePreviewTreeFit());
|
||||
treeObserver.observe(nav);
|
||||
}
|
||||
}
|
||||
if (!nav || !nav.clientWidth) return;
|
||||
const rows = [...nav.querySelectorAll(".rp-tree-row:not(.rp-skel-row)")];
|
||||
if (!rows.length) return;
|
||||
const cs = getComputedStyle(nav);
|
||||
const gap = parseFloat(cs.columnGap) || 0;
|
||||
const avail = nav.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight);
|
||||
const widths = rows.map((row) => row.getBoundingClientRect().width + gap);
|
||||
const readmeWidth = rows.reduce((sum, row, i) => sum + (row.classList.contains("is-readme") ? widths[i] : 0), 0);
|
||||
const others = widths.filter((_, i) => !rows[i].classList.contains("is-readme"));
|
||||
const everything = others.reduce((a, b) => a + b, 0) + readmeWidth;
|
||||
const total = state.previewTreeTotal();
|
||||
if (everything <= avail && total <= rows.length) { if (state.previewTreeFit !== Infinity) state.previewTreeFit = Infinity; return; }
|
||||
const more = nav.querySelector(".rp-tree-more");
|
||||
const moreWidth = (more ? more.getBoundingClientRect().width : 72) + gap;
|
||||
let used = readmeWidth + moreWidth;
|
||||
let fit = 0;
|
||||
while (fit < others.length && used + others[fit] <= avail) used += others[fit++];
|
||||
if (state.previewTreeFit !== fit) state.previewTreeFit = fit;
|
||||
};
|
||||
const queuePreviewTreeFit = () => {
|
||||
if (treeFitQueued) return;
|
||||
treeFitQueued = true;
|
||||
nextTick(() => treeTimers.timeout(fitPreviewTree, 0));
|
||||
};
|
||||
state.queuePreviewTreeFit = queuePreviewTreeFit;
|
||||
treeListen(window, "resize", queuePreviewTreeFit);
|
||||
state.on("dispose", () => { treeObserver?.disconnect(); treeObserver = null; });
|
||||
state.existingConfigurationUrl = () => {
|
||||
const previous = state.previousConfigurations.find(repo => repo.repoId === state.previousConfigurationId);
|
||||
return previous ? "/anonymize/" + encodeURIComponent(previous.repoId) : null;
|
||||
@@ -2579,8 +2553,8 @@ export const anonymizeController = function (state, http, html, params, location
|
||||
preserveIndex = markRaw(buildPreserveIndex(res.data.files || []));
|
||||
state.preserve.commit = commit;
|
||||
state.preserve.truncated = !!res.data.truncated;
|
||||
state.previewTreeFit = Infinity;
|
||||
state.queuePreviewTreeFit?.();
|
||||
state.previewTreeOpen = {};
|
||||
revealPreviewReadme();
|
||||
} catch (error) {
|
||||
state.preserve.error = "The file list could not be loaded from GitHub. You can still use patterns.";
|
||||
state.preserve.patternsOpen = true;
|
||||
|
||||
Vendored
+45
-45
@@ -1,51 +1,51 @@
|
||||
"use strict";(()=>{var Fa=Object.defineProperty;var Ba=e=>{throw TypeError(e)};var Mp=(e,t,o)=>t in e?Fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Vp=(e,t)=>{for(var o in t)Fa(e,o,{get:t[o],enumerable:!0})};var xe=(e,t,o)=>Mp(e,typeof t!="symbol"?t+"":t,o),or=(e,t,o)=>t.has(e)||Ba("Cannot "+o);var ie=(e,t,o)=>(or(e,t,"read from private field"),o?o.call(e):t.get(e)),qe=(e,t,o)=>t.has(e)?Ba("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),Fe=(e,t,o,i)=>(or(e,t,"write to private field"),i?i.call(e,o):t.set(e,o),o),$e=(e,t,o)=>(or(e,t,"access private method"),o);var za=(e,t,o,i)=>({set _(s){Fe(e,t,s,o)},get _(){return ie(e,t,i)}});var ye=["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 be={markdown:"/script/markdown.6c8dfb7b1d.min.js",org:"/script/org.f61f262915.min.js",notebook:"/script/notebook.c3144c18ae.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function Ha(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 ja(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),a=r?{clientId:r.clientId,intentId:r.intentId}:null,u,p,y,h,b,m=!0,w,A=i.defer(),N=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(V=>V.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 R=()=>m&&e.user?.username===b;function g(){m=!1,r=u=p=void 0,A.resolve(),s.clearTimeout(w)}e.on("dispose",g),e.on("routeLeave",g),e.watch(()=>e.user?.username,V=>{!b&&V?b=V:b&&V!==b&&(g(),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 C=()=>({timeout:A.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":p}}),I=V=>V?.status===404?"Artifact linking is not available on this server.":V?.status===401?"Sign in, then open a new artifact link from your submission.":V?.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 V=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(V)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,u=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(w),h||(h=N());try{let q=(await o.get("/api/review-consent/csrf",{timeout:A.promise})).data;if(!R())return;if(p=q.csrf,e.handoffEnabled=q.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(p||""))throw new Error("invalid_csrf");let j=(await o.post("/api/review-consent/preview",{repositoryId:V,intent:{...r,requestId:h}},C())).data;if(!R())return;if(!j||typeof j.ticket!="string"||!j.ticket||j.ticket.length>8192||typeof j.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
|
||||
`))),e[pn]=Io(s);let r=i||s.props&&s.props.type==="number";In(e,t?"change":"input",a=>{a.target.composing||e[pn](Hr(e.value,o,r))}),(o||r)&&In(e,"change",()=>{e.value=Hr(e.value,o,r)}),t||(In(e,"compositionstart",Uh),In(e,"compositionend",Pd),In(e,"change",Pd))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[Ri];delete e[Ri],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[pn](Hr(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},a){if(e[pn]=Io(a),e.composing)return;let u=(r||e.type==="number")&&!/^0\d/.test(e.value)?So(e.value):e.value,p=t??"";if(u===p)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===p)||(e.value=p)}},Gr={deep:!0,created(e,t,o){e[pn]=Io(o),In(e,"change",()=>{let i=e._modelValue,s=As(e),r=e.checked,a=e[pn];if(Ne(i)){let u=ei(i,s),p=u!==-1;if(r&&!p)a(i.concat(s));else if(!r&&p){let y=[...i];y.splice(u,1),a(y)}}else if(Gt(i)){let u=new Set(i);r?u.add(s):u.delete(s),a(u)}else a(qd(e,r))})},mounted:Od,beforeUpdate(e,t,o){e[pn]=Io(o),Od(e,t,o)}};function Od(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(Ne(t))s=ei(t,i.props.value)>-1;else if(Gt(t))s=t.has(i.props.value);else{if(t===o)return;s=Wt(t,qd(e,!0))}e.checked!==s&&(e.checked=s)}var fn={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,In(e,"change",()=>{let s=Array.prototype.filter.call(e.options,p=>p.selected).map(p=>o?So(As(p)):As(p)),r=e.multiple,a=r?Gt(e._modelValue)?new Set(s):s:s[0],u=e._pendingValue=[r,r?Ne(a)?s.slice():s:a];try{e[pn](a)}finally{et(()=>{e._pendingValue===u&&(e._pendingValue=void 0)})}}),e[pn]=Io(i)},mounted(e,{value:t}){Id(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[pn]=Io(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!Fh(t,o[1],o[0]))&&Id(e,t)}};function Fh(e,t,o){if(!o)return Wt(e,t);if(Ne(e))return Wt(e,t);if(Gt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Id(e,t){let o=e.multiple,i=Ne(t);if(!(o&&!i&&!Gt(t))){for(let s=0,r=e.options.length;s<r;s++){let a=e.options[s],u=As(a);if(o)if(i){let p=typeof u;p==="string"||p==="number"?a.selected=t.some(y=>String(y)===String(u)):a.selected=ei(t,u)>-1}else a.selected=t.has(u);else if(Wt(As(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function As(e){return"_value"in e?e._value:e.value}function qd(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var Bh=["ctrl","shift","alt","meta"],zh={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)=>Bh.some(o=>e[`${o}Key`]&&!t.includes(o))},ue=(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 u=zh[t[a]];if(u&&u(s,t))return}return e(s,...r)}))},Hh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},bt=(e,t)=>{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=tn(s.key);if(t.some(a=>a===r||Hh[a]===r))return e(s)}))},jh=dt({patchProp:qh},wh),_d;function Gh(){return _d||(_d=pd(jh))}var $d=((...e)=>{let t=Gh().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=Kh(i);if(!s)return;let r=t._component;!Ie(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=o(s,!1,Wh(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function Wh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Kh(e){return nt(e)?document.querySelector(e):e}var no=typeof document<"u";function Ud(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Yh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ud(e.default)}var Ge=Object.assign;function Ai(e,t){let o={};for(let i in t){let s=t[i];o[i]=Ht(s)?s.map(e):e(s)}return o}var Mo=()=>{},Ht=Array.isArray;function Yr(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var Fd=/#/g,Xh=/&/g,Qh=/\//g,Jh=/=/g,Zh=/\?/g,Bd=/\+/g,xh=/%5B/g,em=/%5D/g,zd=/%5E/g,tm=/%60/g,Hd=/%7B/g,nm=/%7C/g,jd=/%7D/g,om=/%20/g;function Xr(e){return e==null?"":encodeURI(""+e).replace(nm,"|").replace(xh,"[").replace(em,"]")}function Gd(e){return Xr(e).replace(Hd,"{").replace(jd,"}").replace(zd,"^")}function Wr(e){return Xr(e).replace(Bd,"%2B").replace(om,"+").replace(Fd,"%23").replace(Xh,"%26").replace(tm,"`").replace(Hd,"{").replace(jd,"}").replace(zd,"^")}function sm(e){return Wr(e).replace(Jh,"%3D")}function im(e){return XLine truncated
|
||||
"use strict";(()=>{var Ia=Object.defineProperty;var Ma=e=>{throw TypeError(e)};var Sp=(e,t,o)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Np=(e,t)=>{for(var o in t)Ia(e,o,{get:t[o],enumerable:!0})};var Qe=(e,t,o)=>Sp(e,typeof t!="symbol"?t+"":t,o),Xi=(e,t,o)=>t.has(e)||Ma("Cannot "+o);var re=(e,t,o)=>(Xi(e,t,"read from private field"),o?o.call(e):t.get(e)),qe=(e,t,o)=>t.has(e)?Ma("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),Ue=(e,t,o,i)=>(Xi(e,t,"write to private field"),i?i.call(e,o):t.set(e,o),o),$e=(e,t,o)=>(Xi(e,t,"access private method"),o);var _a=(e,t,o,i)=>({set _(s){Ue(e,t,s,o)},get _(){return re(e,t,i)}});var ve=["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 ye={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 Va(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 qa(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),a=r?{clientId:r.clientId,intentId:r.intentId}:null,u,p,y,h,b,m=!0,w,A=i.defer(),S=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(V=>V.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 R=()=>m&&e.user?.username===b;function g(){m=!1,r=u=p=void 0,A.resolve(),s.clearTimeout(w)}e.on("dispose",g),e.on("routeLeave",g),e.watch(()=>e.user?.username,V=>{!b&&V?b=V:b&&V!==b&&(g(),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 C=()=>({timeout:A.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":p}}),I=V=>V?.status===404?"Artifact linking is not available on this server.":V?.status===401?"Sign in, then open a new artifact link from your submission.":V?.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 V=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(V)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,u=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(w),h||(h=S());try{let q=(await o.get("/api/review-consent/csrf",{timeout:A.promise})).data;if(!R())return;if(p=q.csrf,e.handoffEnabled=q.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(p||""))throw new Error("invalid_csrf");let j=(await o.post("/api/review-consent/preview",{repositoryId:V,intent:{...r,requestId:h}},C())).data;if(!R())return;if(!j||typeof j.ticket!="string"||!j.ticket||j.ticket.length>8192||typeof j.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
|
||||
`))),e[cn]=Ao(s);let r=i||s.props&&s.props.type==="number";Tn(e,t?"change":"input",a=>{a.target.composing||e[cn](Vr(e.value,o,r))}),(o||r)&&Tn(e,"change",()=>{e.value=Vr(e.value,o,r)}),t||(Tn(e,"compositionstart",Th),Tn(e,"compositionend",Cd),Tn(e,"change",Cd))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[yi];delete e[yi],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[cn](Vr(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},a){if(e[cn]=Ao(a),e.composing)return;let u=(r||e.type==="number")&&!/^0\d/.test(e.value)?wo(e.value):e.value,p=t??"";if(u===p)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===p)||(e.value=p)}},$r={deep:!0,created(e,t,o){e[cn]=Ao(o),Tn(e,"change",()=>{let i=e._modelValue,s=ks(e),r=e.checked,a=e[cn];if(Se(i)){let u=Ws(i,s),p=u!==-1;if(r&&!p)a(i.concat(s));else if(!r&&p){let y=[...i];y.splice(u,1),a(y)}}else if(jt(i)){let u=new Set(i);r?u.add(s):u.delete(s),a(u)}else a(Ad(e,r))})},mounted:Ed,beforeUpdate(e,t,o){e[cn]=Ao(o),Ed(e,t,o)}};function Ed(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(Se(t))s=Ws(t,i.props.value)>-1;else if(jt(t))s=t.has(i.props.value);else{if(t===o)return;s=Gt(t,Ad(e,!0))}e.checked!==s&&(e.checked=s)}var pn={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,Tn(e,"change",()=>{let s=Array.prototype.filter.call(e.options,p=>p.selected).map(p=>o?wo(ks(p)):ks(p)),r=e.multiple,a=r?jt(e._modelValue)?new Set(s):s:s[0],u=e._pendingValue=[r,r?Se(a)?s.slice():s:a];try{e[cn](a)}finally{Je(()=>{e._pendingValue===u&&(e._pendingValue=void 0)})}}),e[cn]=Ao(i)},mounted(e,{value:t}){Sd(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[cn]=Ao(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!Ph(t,o[1],o[0]))&&Sd(e,t)}};function Ph(e,t,o){if(!o)return Gt(e,t);if(Se(e))return Gt(e,t);if(jt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Sd(e,t){let o=e.multiple,i=Se(t);if(!(o&&!i&&!jt(t))){for(let s=0,r=e.options.length;s<r;s++){let a=e.options[s],u=ks(a);if(o)if(i){let p=typeof u;p==="string"||p==="number"?a.selected=t.some(y=>String(y)===String(u)):a.selected=Ws(t,u)>-1}else a.selected=t.has(u);else if(Gt(ks(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ks(e){return"_value"in e?e._value:e.value}function Ad(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var Oh=["ctrl","shift","alt","meta"],Ih={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)=>Oh.some(o=>e[`${o}Key`]&&!t.includes(o))},ue=(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 u=Ih[t[a]];if(u&&u(s,t))return}return e(s,...r)}))},Mh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},pt=(e,t)=>{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=en(s.key);if(t.some(a=>a===r||Mh[a]===r))return e(s)}))},_h=dt({patchProp:Rh},uh),Nd;function Vh(){return Nd||(Nd=sd(_h))}var Td=((...e)=>{let t=Vh().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=$h(i);if(!s)return;let r=t._component;!Ie(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=o(s,!1,qh(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function qh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $h(e){return ot(e)?document.querySelector(e):e}var eo=typeof document<"u";function Od(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Lh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Od(e.default)}var We=Object.assign;function wi(e,t){let o={};for(let i in t){let s=t[i];o[i]=Ht(s)?s.map(e):e(s)}return o}var Po=()=>{},Ht=Array.isArray;function Fr(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var Id=/#/g,Uh=/&/g,Fh=/\//g,Bh=/=/g,zh=/\?/g,Md=/\+/g,Hh=/%5B/g,jh=/%5D/g,_d=/%5E/g,Gh=/%60/g,Vd=/%7B/g,Wh=/%7C/g,qd=/%7D/g,Kh=/%20/g;function Br(e){return e==null?"":encodeURI(""+e).replace(Wh,"|").replace(Hh,"[").replace(jh,"]")}function $d(e){return Br(e).replace(Vd,"{").replace(qd,"}").replace(_d,"^")}function Lr(e){return Br(e).replace(Md,"%2B").replace(Kh,"+").replace(Id,"%23").replace(Uh,"%26").replace(Gh,"`").replace(Vd,"{").replace(qd,"}").replace(_d,"^")}function Yh(e){return Lr(e).replace(Bh,"%3D")}function Xh(e){return BLine truncated
|
||||
${JSON.stringify(e)}${t?`
|
||||
while being at
|
||||
`+JSON.stringify(t):""}`},[rt.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${hm(t)}" via a navigation guard.`},[rt.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[rt.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[rt.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function to(e,t){return Ge(new Error,{type:e,[eu]:!0},t)}function hn(e,t){return e instanceof Error&&eu in e&&(t==null||!!(e.type&t))}var fm=["params","query","hash"];function hm(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of fm)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function tu(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(Bd," "),r=s.indexOf("="),a=_o(r<0?s:s.slice(0,r)),u=r<0?null:_o(s.slice(r+1));if(a in t){let p=t[a];Ht(p)||(p=t[a]=[p]),p.push(u)}else t[a]=u}return t}function ea(e){let t="";for(let o in e){let i=e[o];if(o=sm(o),i==null){i!==void 0&&(t+=(t.length?"&":"")+o);continue}(Ht(i)?i.map(s=>s&&Wr(s)):[i&&Wr(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function nu(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=Ht(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var ou=Symbol(""),ta=Symbol(""),Ii=Symbol(""),_i=Symbol(""),Mi=Symbol("");function Vo(){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 Nn(e,t,o,i,s,r=a=>a()){let a=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((u,p)=>{let y=m=>{m===!1?p(to(rt.NAVIGATION_ABORTED,{from:o,to:t})):m instanceof Error?p(m):pm(m)?p(to(rt.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[s]===a&&typeof m=="function"&&a.push(m),u())},h=r(()=>e.call(i&&i.instances[s],t,o,y)),b=Promise.resolve(h);e.length<3&&(b=b.then(y)),b.catch(m=>p(m))})}function Vi(e,t,o,i,s=r=>r()){let r=[];for(let a of e)for(let u in a.components){let p=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Ud(p)){let y=(p.__vccOpts||p)[t];y&&r.push(Nn(y,o,i,a,u,s))}else{let y=p();r.push(()=>y.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let b=Yh(h)?h.default:h;a.mods[u]=h,a.components[u]=b;let m=(b.__vccOpts||b)[t];return m&&Nn(m,o,i,a,u,s)()}))}}return r}function su(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let u=t.matched[a];u&&(e.matched.find(y=>eo(y,u))?i.push(u):o.push(u));let p=e.matched[a];p&&(t.matched.find(y=>eo(y,p))||s.push(p))}return[o,i,s]}var mm=()=>location.protocol+"//"+location.host;function mu(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,u=s.slice(a);return u[0]!=="/"&&(u="/"+u),Qr(u,"")}return Qr(o,e)+i+s}function gm(e,t,o,i){let s=[],r=[],a=null,u=({state:m})=>{let w=mu(e,location),A=o.value,N=t.value,R=0;if(m){if(o.value=w,t.value=m,a&&a===A){a=null;return}R=N?m.position-N.position:0}else i(w);s.forEach(g=>{g(o.value,A,{delta:R,type:Pi.pop,direction:R?R>0?Oi.forward:Oi.back:Oi.unknown})})};function p(){a=o.value}function y(m){s.push(m);let w=()=>{let A=s.indexOf(m);A>-1&&s.splice(A,1)};return r.push(w),w}function h(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Ge({},m.state,{scroll:Ts()}),"")}}function b(){for(let m of r)m();r=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:p,listen:y,destroy:b}}function iu(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?Ts():null}}function vm(e){let{history:t,location:o}=window,i={value:mu(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(p,y,h){let b=e.indexOf("#"),m=b>-1?(o.host&&document.querySelector("base")?e:e.slice(b))+p:mm()+e+p;try{t[h?"replaceState":"pushState"](y,"",m),s.value=y}catch(w){console.error(w),o[h?"replace":"assign"](m)}}function a(p,y){r(p,Ge({},t.state,iu(s.value.back,p,s.value.forward,!0),y,{position:s.value.position}),!0),i.value=p}function u(p,y){let h=Ge({},s.value,t.state,{forward:p,scroll:Ts()});r(h.current,h,!0),r(p,Ge({},iu(i.value,p,null),{position:h.position+1},y),!1),i.value=p}return{location:i,state:s,push:u,replace:a}}function gu(e){e=Xd(e);let t=vm(e),o=gm(e,t.state,t.location,t.replace);function i(r,a=!0){a||o.pauseListeners(),history.go(r)}let s=Ge({locatLine truncated
|
||||
`);for(let b=0;b<h.length;b++){let m=h[b];if(m.startsWith("diff --git")){y(),p();continue}if(m.startsWith("--- ")){r&&r.lines.length&&y(),p().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){p().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 w=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(a=parseInt(w[1],10),u=parseInt(w[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:u,text:m.slice(1)}),u++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:u,text:m.startsWith(" ")?m.slice(1):m}),a++,u++))}}return o(s,r),s.join("")}})({trustAsHtml:e=>e});function Hm(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function jm(e,t="EUR"){let o=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:o%1?2:0,maximumFractionDigits:2}).format(o)}function Gm(e){return String(e??"").toUpperCase()}function Wm(e,t,o=0){return(e||[]).slice(o,o+t)}function Km(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Ym(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 u=r.split(".").reduce((y,h)=>y?.[h],i),p=r.split(".").reduce((y,h)=>y?.[h],s);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function Xm(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 Qm(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function ra(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),o=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(o))return"";let i=o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),s=new Date;s.setHours(0,0,0,0);let r=Math.round((o-s)/864e5),a;if(r===0)a="today";else if(r===1)a="tomorrow";else if(r===-1)a="yesterday";else{let u=Math.abs(r),p=Math.round(u/30.44),y=u<14?[u,"day"]:u<60?[Math.round(u/7),"week"]:p<18?[p,"month"]:[Math.round(u/365.25),"year"],h=y[0]+" "+y[1]+(y[0]===1?"":"s");a=r>0?"in "+h:h+" ago"}return i+" \xB7 "+a}function so(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let o=e/1e3;if(o<60)return+(o<10?o.toFixed(2):o.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),s=Math.round(o);return s<3600?Math.floor(s/60)+"m "+i(s%60)+"s":Math.floor(s/3600)+"h "+i(Math.floor(s%3600/60))+"m"}function aa(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let o={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(o.year="numeric"),t.toLocaleDateString(void 0,o)}var Bi=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function zi(e,{flags:t,keys:o,count:i,onChange:s=()=>{}}){if(e.segView=()=>{let r=t()||{};if(o.every(u=>!!r[u]))return"all";let a=o.filter(u=>!!r[u]);return a.length===1?a[0]:"custom"},e.setSegView=r=>{let a=t();if(a){for(let u of o)a[u]=r==="all"?!0:u===r;s()}},e.segCount=r=>r==="all"?o.reduce((a,u)=>a+i(u),0):i(r),t()&&e.segView()==="custom")for(let r of o)t()[r]=!0}var Cu=function(e,t,o){let i=Nt(),s=jt();Tu(i,s),e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=N=>{if(N.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){N.preventDefault();let R=document.querySelector('.admin-filter-toolbar input[type="search"]');R&&R.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=N=>{N==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[N]="",e.query.page=1},e.chips=[];let a=()=>{let N=[];e.query.owner&&N.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&N.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=N};e.showSta
Line truncated
|
||||
`+N.join(`
|
||||
`)],{type:"text/csv"}),g=document.createElement("a");g.href=URL.createObjectURL(R),g.download=i.username+"-repositories.csv",g.click()},e.showStatusMessage=m=>{let w=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,w)},e.fetchGithubInfo=m=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(A=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(A.data,null,2).replace(/[<>]/g,N=>N==="<"?"<":">")+"</pre>"),w.document.close())},A=>{let N=A&&A.data?JSON.stringify(A.data,null,2):String(A);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+N+"</pre>")})};function p(m){t.get("/api/admin/users/"+m+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function y(m){t.get("/api/admin/users/"+m,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}y(i.username),p(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 h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),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="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),w=>console.error(w))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>p(i.username),w=>console.error(w))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>p(i.username),w=>console.error(w))},e.updateRepository=m=>{let w=ot({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${m.repoId}/refresh`).then(A=>{A.data.status=="ready"?w.title=`${m.repoId} is refreshed.`:w.title=`Refreshing of ${m.repoId}.`},A=>{w.title=`Error during the refresh of ${m.repoId}.`,w.body=A.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let b=null;e.watch("query",()=>{s.timeout.cancel(b),b=s.timeout(()=>{p(i.username)},500)},!0)},Nu=function(e,t,o){let i=Nt(),s=jt();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=A=>{if(A.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){A.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=A=>{A==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[A]="",e.query.page=1},e.chips=[];let a=()=>{let A=[];(e.query.dateFrom||e.query.dateTo)&&A.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=A};e.statusCountFor=A=>{let N=(e.statusCounts||[]).find(R=>R._id===A);return N?N.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=A=>{e.query.sort===A?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=A,e.query.direction="desc"),e.query.page=1},e.sortIcon=A=>e.query.sort===A?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(u)||{};e.query=Object.assign({},p,y,{page:1,search:""});let h=o.search();h.search&&(e.query.search=h.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let A=window.prompt("Preset name:");if(!A)return;let N=Object.assign({},e.query);delete N.page,e.presets=(e.presets||[]).filter(R=>R.name!==A),e.presets.push({name:A,query:N}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=A=>{Object.assign(e.query,A.query,{page:1})},e.deletePreset=A=>{e.presets=(e.presets||[]).filter(N=>N.name!==A.name),localStorage.setItem(b,JS
Line truncated
|
||||
`).map((ae,he)=>he===0?ae:ge+ae).join(`
|
||||
`)}else typeof ne=="number"||typeof ne=="boolean"?Me=String(ne):Me=JSON.stringify(ne);te.push(`${ee}${Me}${ce}`)}),te.push("}"),te.join(`
|
||||
`)}function y(g){let C=[],I="",V=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,j;for(;j=V.exec(g);)I+=g.slice(q,j.index),q=V.lastIndex,C.push({key:j[1],op:j[2]||"=",val:j[3]});return I+=g.slice(q),{filters:C,free:I.trim().toLowerCase()}}function h(g,C){for(let I of C.filters){let V=(j,te,Y)=>{let ne=parseFloat(j),ke=parseFloat(te);return Y==="="?String(j)===String(te):Y==="!="?String(j)!==String(te):Y===">="?ne>=ke:Y==="<="?ne<=ke:Y===">"?ne>ke:Y==="<"?ne<ke:!0},q;if(I.key==="code")q=g.displayMessage;else if(I.key==="module")q=g.module;else if(I.key==="status")q=g._status;else if(I.key==="url")q=g._url;else if(I.key==="repo")q=g._repoId;else if(I.key==="level")q=g.level;else continue;if(q==null||!V(q,I.val,I.op))return!1}return!(C.free&&((g.displayMessage||"")+" "+(g.module||"")+" "+(g._url||"")+" "+JSON.stringify(g.raw||[])).toLowerCase().indexOf(C.free)===-1)}function b(){let g=y(e.query.search||"");e.parsedFilterCount=g.filters.length;let C=e.query.bucket,I=e.entries.filter(Y=>C&&Y._bucket!==C?!1:h(Y,g)),V=e.query.group;if(V){let Y=D=>V==="module"?D.module:D.displayMessage||D.message||"_",ne=new Map;for(let D of I){let ee=Y(D);if(ne.has(ee)){let ce=ne.get(ee);ce.count++,ce._related.push(D),new Date(D.ts)>new Date(ce.ts)&&(ce.ts=D.ts,ce._url=D._url,ce._status=D._status),new Date(D.ts)<new Date(ce._firstSeen)&&(ce._firstSeen=D.ts)}else{let ce=Object.assign({},D);ce._key=`${V}:${ee}`,ce._related=[D],ce._firstSeen=D.ts,ce._lastHourCount=0,ce.count=1,ne.set(ee,ce)}}let ke=Date.now()-3600*1e3;for(let D of ne.values())D._lastHourCount=D._related.filter(ee=>new Date(ee.ts).getTime()>=ke).length;I=Array.from(ne.values())}else I=I.map((Y,ne)=>(Y._key="row:"+ne+":"+Y.ts,Y._related=[Y],Y._firstSeen=Y.ts,Y._lastHourCount=0,Y.count=1,Y));let q=Y=>({error:0,warn:1,info:2})[Y._bucket]??1;e.query.sort==="count"?I.sort((Y,ne)=>q(Y)-q(ne)||ne.count-Y.count||new Date(ne.ts)-new Date(Y.ts)):I.sort((Y,ne)=>q(Y)-q(ne)||new Date(ne.ts)-new Date(Y.ts)),e.visible=I;let j=!!(e.query.bucket||(e.query.search||"").trim()),te=!j&&(e.stats?.severity?.error||0)>0&&!I.some(Y=>Y._bucket==="error")&&e.entries.length<1500;(j&&!I.length||te)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,m(!0))}function m(g){let C=g?e.entries.length:0,I=g?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:C,limit:I}}).then(V=>{let q=(V.data.entries||[]).map(u);e.entries=g?e.entries.concat(q):q,e.available=!!V.data.available,e.cap=V.data.max||e.cap,e.total=V.data.total||e.entries.length,e._autoLoading=!1,b()},V=>{e._autoLoading=!1,console.error(V)})}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function w(){t.get("/api/admin/errors/stats").then(g=>{let C=g.data||{},I=C.prev24h?Math.round((C.last24h-C.prev24h)/C.prev24h*100):0;e.stats={last24h:C.last24h||0,prev24h:C.prev24h||0,delta:I,severity:C.severity||{error:0,warn:0,info:0},unique:C.unique||{error:0,warn:0,info:0},buckets:C.buckets||[],dropped:C.dropped||0},b()},g=>console.error(g))}function A(){m(),w()}e.barPx=(g,C)=>{let I=e.stats.buckets||[],V=0,q=0;for(let ne of I)V=Math.max(V,(ne.error||0)+(ne.warn||0)),q=Math.max(q,ne.info||0);let j=g[C]||0;if(!j)return 0;if(C==="info")return q?Math.max(2,Math.round(j/q*(V?16:60))):0;let te=(g.error||0)+(g.warn||0),Y=Math.round(te/V*44);return Math.max(4,Math.round(j/te*Y))},e.bucketTitle=g=>`${new Date(g.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${g.error||0} err \xB7 ${g.warn||0} warn \xB7 ${g.info||0} info`,e.toggle=g=>{e.expanded[g._key]=!e.expanded[g._key]},e.setBucket=g=>{e.query.bucket=g},e.refreshNow=A,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(A,g=>console.error(g))},e.exportCsv=()=>{let g=["ts","level","module","displayMessage","_status","_url","_repoId"],C=[g.join(",")];for(let j of e.visible)C.push(g.map(te=>{let Y=j[te]==null?"":String(j[te]);return/[",\n]/.test(Y)?`"${Y.replace(/"/g,'""')}"`:Y}).join(","));let I=new Blob([C.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),V=URL.createObjectURL(I),q=document.createElement("a");q.href=V,q.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(q),q.click(),document.body.removeChild(q),URL.revokeObjectURL(V)};function N(g){e.copyHint=`${g} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=g=>{navigator.clipboard.writeText(g._detailJson).then(()=>N("JSON"))},e.copyCurl=g=>{if(!g._url)return;let I=`curl -X ${g._method||"GET"} '${window.location.origin}${g._url}'`;navigator.clipboard.writeText(I).then(()=>N("curl"))},A();let R=i(()=>{e.query.autoRefresh&&A()},15e3);e.on("dispose",()=>i.cancel(R)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},Au=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",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(g){e.ovView=g;try{window.history.replaceState(null,"",g==="summary"?window.location.pathname:"#"+g)}catch{}};var s=!1;e.loadCache=function(){if(!s){s=!0;var g=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:g}}).then(function(C){g===e.cacheMinutes&&(e.cacheReport=C.data,e.cacheError=C.data.available?null:C.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){s=!1,g!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(g){return e.cacheTraffic==="all"||g.traffic===e.cacheTraffic})},e.cacheRate=function(g,C){var I=e.cacheRows(),V=function(te){return I.filter(function(Y){return Y.name===te}).reduce(function(Y,ne){return Y+ne[C]},0)},q=V(g+"_hit"),j=V(g+"_miss");return q+j?(100*q/(q+j)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(g){return g.replaceAll("_"," ")},e.cacheP95=function(g){var C=0,I=e.cacheReport?.latencyBucketsMs||[];if(!g.count)return"No samples";if(!g.ms)return"Not timed";for(var V=0;V<=I.length;V++)if(C+=g["b"+V]||0,C>=Math.ceil(g.count*.95))return V<I.length?"\u2264 "+so(I[V]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let g=e.data&&e.data.system||{},C=[["Memory",g.memPercent],["Disk",g.diskPercent]].filter(([,V])=>V>90);return C.length?C.map(([V,q])=>V+" is at "+q+"%").join(" and ")+". New anonymizations may fail until "+(C.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(g){return g==null?"":so(g)},e.latencyBound=function(g,C){return g.count?g[C]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(g[C]):"No samples"},e.firstByteBound=function(g){return e.latencyBound({count:g.firstByteCount,p95UpperMs:g.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(g){return Math.max(0,Math.round((Date.now()-g.sampledAt)/1e3))},e.peakRss=function(g){return(e.performance.runtimeSeries||[]).filter(function(C){return C.instance===g.instance}).reduce(function(C,I){return Math.max(C,I.rss)},g.memory.rss)},e.performanceWarning=function(g){return e.sampleAge(g)>45||g.droppedBatches||g.droppedMetrics||g.sockets?.closeWait>0||g.eventLoop?.p95Ms>100||g.memoryLimitBytes&&g.memory.rss>g.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var g=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==g&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:g}}).then(function(C){g===e.performanceMinutes&&(e.performance=C.data,e.performanceError=C.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){g===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,g!==e.performanceMinutes&&e.loadPerformance()}))};function a(g){if(g==null)return"\u2014";for(var C=["B","KB","MB","GB","TB"],I=0,V=g;V>=1024&&I<C.length-1;)V/=1024,I++;return V.toFixed(I>0?1:0).replace(/\.0$/,"")+" "+C[I]}e.humanBytes=a;function u(g){if(!g)return"\u2014";var C=Math.floor(g/86400),I=Math.floor(g%86400/3600),V=Math.floor(g%3600/60);return C>0?C+"d "+(I<10?"0":"")+I+"h":I>0?I+"h "+(V<10?"0":"")+V+"m":V+"m"}e.humanDuration=u;function p(g){return g==null?"\u2014":g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":String(g)}e.humanNum=p,e.queueTotal=function(g){return g?(g.waiting||0)+(g.active||0)+(g.delayed||0)+(g.failed||0):0},e.statusCount=function(g){if(!e.data||!e.data.repos)return 0;for(var C=e.data.repos.statusBreakdown||[],I=0;I<C.length;I++)if(C[I]._id===g)return C[I].count;return 0},e.barPct=function(g){var C=e.data&&e.data.repos?e.data.repos.total:0;if(!C)return 0;var I=[g];g==="expired"&&I.push("expiring"),g==="removed"&&I.push("re
Line truncated
|
||||
`+JSON.stringify(t):""}`},[at.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${sm(t)}" via a navigation guard.`},[at.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[at.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[at.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function xn(e,t){return We(new Error,{type:e,[Wd]:!0},t)}function fn(e,t){return e instanceof Error&&Wd in e&&(t==null||!!(e.type&t))}var om=["params","query","hash"];function sm(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of om)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function Kd(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(Md," "),r=s.indexOf("="),a=To(r<0?s:s.slice(0,r)),u=r<0?null:To(s.slice(r+1));if(a in t){let p=t[a];Ht(p)||(p=t[a]=[p]),p.push(u)}else t[a]=u}return t}function Wr(e){let t="";for(let o in e){let i=e[o];if(o=Yh(o),i==null){i!==void 0&&(t+=(t.length?"&":"")+o);continue}(Ht(i)?i.map(s=>s&&Lr(s)):[i&&Lr(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function Yd(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=Ht(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var Xd=Symbol(""),Kr=Symbol(""),Si=Symbol(""),Ni=Symbol(""),Ri=Symbol("");function Oo(){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 Cn(e,t,o,i,s,r=a=>a()){let a=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((u,p)=>{let y=m=>{m===!1?p(xn(at.NAVIGATION_ABORTED,{from:o,to:t})):m instanceof Error?p(m):nm(m)?p(xn(at.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[s]===a&&typeof m=="function"&&a.push(m),u())},h=r(()=>e.call(i&&i.instances[s],t,o,y)),b=Promise.resolve(h);e.length<3&&(b=b.then(y)),b.catch(m=>p(m))})}function Di(e,t,o,i,s=r=>r()){let r=[];for(let a of e)for(let u in a.components){let p=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(Od(p)){let y=(p.__vccOpts||p)[t];y&&r.push(Cn(y,o,i,a,u,s))}else{let y=p();r.push(()=>y.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let b=Lh(h)?h.default:h;a.mods[u]=h,a.components[u]=b;let m=(b.__vccOpts||b)[t];return m&&Cn(m,o,i,a,u,s)()}))}}return r}function Qd(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let u=t.matched[a];u&&(e.matched.find(y=>Zn(y,u))?i.push(u):o.push(u));let p=e.matched[a];p&&(t.matched.find(y=>Zn(y,p))||s.push(p))}return[o,i,s]}var im=()=>location.protocol+"//"+location.host;function au(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,u=s.slice(a);return u[0]!=="/"&&(u="/"+u),zr(u,"")}return zr(o,e)+i+s}function rm(e,t,o,i){let s=[],r=[],a=null,u=({state:m})=>{let w=au(e,location),A=o.value,S=t.value,R=0;if(m){if(o.value=w,t.value=m,a&&a===A){a=null;return}R=S?m.position-S.position:0}else i(w);s.forEach(g=>{g(o.value,A,{delta:R,type:Ci.pop,direction:R?R>0?Ei.forward:Ei.back:Ei.unknown})})};function p(){a=o.value}function y(m){s.push(m);let w=()=>{let A=s.indexOf(m);A>-1&&s.splice(A,1)};return r.push(w),w}function h(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(We({},m.state,{scroll:Cs()}),"")}}function b(){for(let m of r)m();r=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:p,listen:y,destroy:b}}function Jd(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?Cs():null}}function am(e){let{history:t,location:o}=window,i={value:au(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(p,y,h){let b=e.indexOf("#"),m=b>-1?(o.host&&document.querySelector("base")?e:e.slice(b))+p:im()+e+p;try{t[h?"replaceState":"pushState"](y,"",m),s.value=y}catch(w){console.error(w),o[h?"replace":"assign"](m)}}function a(p,y){r(p,We({},t.state,Jd(s.value.back,p,s.value.forward,!0),y,{position:s.value.position}),!0),i.value=p}function u(p,y){let h=We({},s.value,t.state,{forward:p,scroll:Cs()});r(h.current,h,!0),r(p,We({},Jd(i.value,p,null),{position:h.position+1},y),!1),i.value=p}return{location:i,state:s,push:u,replace:a}}function lu(e){e=Bd(e);let t=am(e),o=rm(e,t.state,t.location,t.replace);function i(r,a=!0){a||o.pauseListeners(),history.go(r)}let s=We({locatLine truncated
|
||||
`);for(let b=0;b<h.length;b++){let m=h[b];if(m.startsWith("diff --git")){y(),p();continue}if(m.startsWith("--- ")){r&&r.lines.length&&y(),p().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){p().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 w=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(a=parseInt(w[1],10),u=parseInt(w[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:u,text:m.slice(1)}),u++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:u,text:m.startsWith(" ")?m.slice(1):m}),a++,u++))}}return o(s,r),s.join("")}})({trustAsHtml:e=>e});function Mm(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function _m(e,t="EUR"){let o=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:o%1?2:0,maximumFractionDigits:2}).format(o)}function Vm(e){return String(e??"").toUpperCase()}function qm(e,t,o=0){return(e||[]).slice(o,o+t)}function $m(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Lm(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 u=r.split(".").reduce((y,h)=>y?.[h],i),p=r.split(".").reduce((y,h)=>y?.[h],s);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function Um(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 Fm(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function Zr(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),o=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(o))return"";let i=o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),s=new Date;s.setHours(0,0,0,0);let r=Math.round((o-s)/864e5),a;if(r===0)a="today";else if(r===1)a="tomorrow";else if(r===-1)a="yesterday";else{let u=Math.abs(r),p=Math.round(u/30.44),y=u<14?[u,"day"]:u<60?[Math.round(u/7),"week"]:p<18?[p,"month"]:[Math.round(u/365.25),"year"],h=y[0]+" "+y[1]+(y[0]===1?"":"s");a=r>0?"in "+h:h+" ago"}return i+" \xB7 "+a}function no(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let o=e/1e3;if(o<60)return+(o<10?o.toFixed(2):o.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),s=Math.round(o);return s<3600?Math.floor(s/60)+"m "+i(s%60)+"s":Math.floor(s/3600)+"h "+i(Math.floor(s%3600/60))+"m"}function xr(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let o={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(o.year="numeric"),t.toLocaleDateString(void 0,o)}var Mi=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function _i(e,{flags:t,keys:o,count:i,onChange:s=()=>{}}){if(e.segView=()=>{let r=t()||{};if(o.every(u=>!!r[u]))return"all";let a=o.filter(u=>!!r[u]);return a.length===1?a[0]:"custom"},e.setSegView=r=>{let a=t();if(a){for(let u of o)a[u]=r==="all"?!0:u===r;s()}},e.segCount=r=>r==="all"?o.reduce((a,u)=>a+i(u),0):i(r),t()&&e.segView()==="custom")for(let r of o)t()[r]=!0}var hu=function(e,t,o){let i=Tt(),s=Jt();ku(i,s),e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let R=document.querySelector('.admin-filter-toolbar input[type="search"]');R&&R.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let a=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showSta
Line truncated
|
||||
`+S.join(`
|
||||
`)],{type:"text/csv"}),g=document.createElement("a");g.href=URL.createObjectURL(R),g.download=i.username+"-repositories.csv",g.click()},e.showStatusMessage=m=>{let w=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,w)},e.fetchGithubInfo=m=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(A=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(A.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"</pre>"),w.document.close())},A=>{let S=A&&A.data?JSON.stringify(A.data,null,2):String(A);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})};function p(m){t.get("/api/admin/users/"+m+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function y(m){t.get("/api/admin/users/"+m,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}y(i.username),p(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 h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),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="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),w=>console.error(w))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>p(i.username),w=>console.error(w))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>p(i.username),w=>console.error(w))},e.updateRepository=m=>{let w=st({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${m.repoId}/refresh`).then(A=>{A.data.status=="ready"?w.title=`${m.repoId} is refreshed.`:w.title=`Refreshing of ${m.repoId}.`},A=>{w.title=`Error during the refresh of ${m.repoId}.`,w.body=A.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let b=null;e.watch("query",()=>{s.timeout.cancel(b),b=s.timeout(()=>{p(i.username)},500)},!0)},vu=function(e,t,o){let i=Tt(),s=Jt();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=A=>{if(A.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){A.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=A=>{A==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[A]="",e.query.page=1},e.chips=[];let a=()=>{let A=[];(e.query.dateFrom||e.query.dateTo)&&A.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=A};e.statusCountFor=A=>{let S=(e.statusCounts||[]).find(R=>R._id===A);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=A=>{e.query.sort===A?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=A,e.query.direction="desc"),e.query.page=1},e.sortIcon=A=>e.query.sort===A?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(u)||{};e.query=Object.assign({},p,y,{page:1,search:""});let h=o.search();h.search&&(e.query.search=h.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let A=window.prompt("Preset name:");if(!A)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(R=>R.name!==A),e.presets.push({name:A,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=A=>{Object.assign(e.query,A.query,{page:1})},e.deletePreset=A=>{e.presets=(e.presets||[]).filter(S=>S.name!==A.name),localStorage.setItem(b,JS
Line truncated
|
||||
`).map((de,ie)=>ie===0?de:ke+de).join(`
|
||||
`)}else typeof oe=="number"||typeof oe=="boolean"?Oe=String(oe):Oe=JSON.stringify(oe);te.push(`${ee}${Oe}${ce}`)}),te.push("}"),te.join(`
|
||||
`)}function y(g){let C=[],I="",V=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,j;for(;j=V.exec(g);)I+=g.slice(q,j.index),q=V.lastIndex,C.push({key:j[1],op:j[2]||"=",val:j[3]});return I+=g.slice(q),{filters:C,free:I.trim().toLowerCase()}}function h(g,C){for(let I of C.filters){let V=(j,te,Y)=>{let oe=parseFloat(j),Ce=parseFloat(te);return Y==="="?String(j)===String(te):Y==="!="?String(j)!==String(te):Y===">="?oe>=Ce:Y==="<="?oe<=Ce:Y===">"?oe>Ce:Y==="<"?oe<Ce:!0},q;if(I.key==="code")q=g.displayMessage;else if(I.key==="module")q=g.module;else if(I.key==="status")q=g._status;else if(I.key==="url")q=g._url;else if(I.key==="repo")q=g._repoId;else if(I.key==="level")q=g.level;else continue;if(q==null||!V(q,I.val,I.op))return!1}return!(C.free&&((g.displayMessage||"")+" "+(g.module||"")+" "+(g._url||"")+" "+JSON.stringify(g.raw||[])).toLowerCase().indexOf(C.free)===-1)}function b(){let g=y(e.query.search||"");e.parsedFilterCount=g.filters.length;let C=e.query.bucket,I=e.entries.filter(Y=>C&&Y._bucket!==C?!1:h(Y,g)),V=e.query.group;if(V){let Y=D=>V==="module"?D.module:D.displayMessage||D.message||"_",oe=new Map;for(let D of I){let ee=Y(D);if(oe.has(ee)){let ce=oe.get(ee);ce.count++,ce._related.push(D),new Date(D.ts)>new Date(ce.ts)&&(ce.ts=D.ts,ce._url=D._url,ce._status=D._status),new Date(D.ts)<new Date(ce._firstSeen)&&(ce._firstSeen=D.ts)}else{let ce=Object.assign({},D);ce._key=`${V}:${ee}`,ce._related=[D],ce._firstSeen=D.ts,ce._lastHourCount=0,ce.count=1,oe.set(ee,ce)}}let Ce=Date.now()-3600*1e3;for(let D of oe.values())D._lastHourCount=D._related.filter(ee=>new Date(ee.ts).getTime()>=Ce).length;I=Array.from(oe.values())}else I=I.map((Y,oe)=>(Y._key="row:"+oe+":"+Y.ts,Y._related=[Y],Y._firstSeen=Y.ts,Y._lastHourCount=0,Y.count=1,Y));let q=Y=>({error:0,warn:1,info:2})[Y._bucket]??1;e.query.sort==="count"?I.sort((Y,oe)=>q(Y)-q(oe)||oe.count-Y.count||new Date(oe.ts)-new Date(Y.ts)):I.sort((Y,oe)=>q(Y)-q(oe)||new Date(oe.ts)-new Date(Y.ts)),e.visible=I;let j=!!(e.query.bucket||(e.query.search||"").trim()),te=!j&&(e.stats?.severity?.error||0)>0&&!I.some(Y=>Y._bucket==="error")&&e.entries.length<1500;(j&&!I.length||te)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,m(!0))}function m(g){let C=g?e.entries.length:0,I=g?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:C,limit:I}}).then(V=>{let q=(V.data.entries||[]).map(u);e.entries=g?e.entries.concat(q):q,e.available=!!V.data.available,e.cap=V.data.max||e.cap,e.total=V.data.total||e.entries.length,e._autoLoading=!1,b()},V=>{e._autoLoading=!1,console.error(V)})}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function w(){t.get("/api/admin/errors/stats").then(g=>{let C=g.data||{},I=C.prev24h?Math.round((C.last24h-C.prev24h)/C.prev24h*100):0;e.stats={last24h:C.last24h||0,prev24h:C.prev24h||0,delta:I,severity:C.severity||{error:0,warn:0,info:0},unique:C.unique||{error:0,warn:0,info:0},buckets:C.buckets||[],dropped:C.dropped||0},b()},g=>console.error(g))}function A(){m(),w()}e.barPx=(g,C)=>{let I=e.stats.buckets||[],V=0,q=0;for(let oe of I)V=Math.max(V,(oe.error||0)+(oe.warn||0)),q=Math.max(q,oe.info||0);let j=g[C]||0;if(!j)return 0;if(C==="info")return q?Math.max(2,Math.round(j/q*(V?16:60))):0;let te=(g.error||0)+(g.warn||0),Y=Math.round(te/V*44);return Math.max(4,Math.round(j/te*Y))},e.bucketTitle=g=>`${new Date(g.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${g.error||0} err \xB7 ${g.warn||0} warn \xB7 ${g.info||0} info`,e.toggle=g=>{e.expanded[g._key]=!e.expanded[g._key]},e.setBucket=g=>{e.query.bucket=g},e.refreshNow=A,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(A,g=>console.error(g))},e.exportCsv=()=>{let g=["ts","level","module","displayMessage","_status","_url","_repoId"],C=[g.join(",")];for(let j of e.visible)C.push(g.map(te=>{let Y=j[te]==null?"":String(j[te]);return/[",\n]/.test(Y)?`"${Y.replace(/"/g,'""')}"`:Y}).join(","));let I=new Blob([C.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),V=URL.createObjectURL(I),q=document.createElement("a");q.href=V,q.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(q),q.click(),document.body.removeChild(q),URL.revokeObjectURL(V)};function S(g){e.copyHint=`${g} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=g=>{navigator.clipboard.writeText(g._detailJson).then(()=>S("JSON"))},e.copyCurl=g=>{if(!g._url)return;let I=`curl -X ${g._method||"GET"} '${window.location.origin}${g._url}'`;navigator.clipboard.writeText(I).then(()=>S("curl"))},A();let R=i(()=>{e.query.autoRefresh&&A()},15e3);e.on("dispose",()=>i.cancel(R)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},wu=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",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(g){e.ovView=g;try{window.history.replaceState(null,"",g==="summary"?window.location.pathname:"#"+g)}catch{}};var s=!1;e.loadCache=function(){if(!s){s=!0;var g=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:g}}).then(function(C){g===e.cacheMinutes&&(e.cacheReport=C.data,e.cacheError=C.data.available?null:C.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){s=!1,g!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(g){return e.cacheTraffic==="all"||g.traffic===e.cacheTraffic})},e.cacheRate=function(g,C){var I=e.cacheRows(),V=function(te){return I.filter(function(Y){return Y.name===te}).reduce(function(Y,oe){return Y+oe[C]},0)},q=V(g+"_hit"),j=V(g+"_miss");return q+j?(100*q/(q+j)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(g){return g.replaceAll("_"," ")},e.cacheP95=function(g){var C=0,I=e.cacheReport?.latencyBucketsMs||[];if(!g.count)return"No samples";if(!g.ms)return"Not timed";for(var V=0;V<=I.length;V++)if(C+=g["b"+V]||0,C>=Math.ceil(g.count*.95))return V<I.length?"\u2264 "+no(I[V]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let g=e.data&&e.data.system||{},C=[["Memory",g.memPercent],["Disk",g.diskPercent]].filter(([,V])=>V>90);return C.length?C.map(([V,q])=>V+" is at "+q+"%").join(" and ")+". New anonymizations may fail until "+(C.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(g){return g==null?"":no(g)},e.latencyBound=function(g,C){return g.count?g[C]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(g[C]):"No samples"},e.firstByteBound=function(g){return e.latencyBound({count:g.firstByteCount,p95UpperMs:g.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(g){return Math.max(0,Math.round((Date.now()-g.sampledAt)/1e3))},e.peakRss=function(g){return(e.performance.runtimeSeries||[]).filter(function(C){return C.instance===g.instance}).reduce(function(C,I){return Math.max(C,I.rss)},g.memory.rss)},e.performanceWarning=function(g){return e.sampleAge(g)>45||g.droppedBatches||g.droppedMetrics||g.sockets?.closeWait>0||g.eventLoop?.p95Ms>100||g.memoryLimitBytes&&g.memory.rss>g.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var g=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==g&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:g}}).then(function(C){g===e.performanceMinutes&&(e.performance=C.data,e.performanceError=C.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){g===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,g!==e.performanceMinutes&&e.loadPerformance()}))};function a(g){if(g==null)return"\u2014";for(var C=["B","KB","MB","GB","TB"],I=0,V=g;V>=1024&&I<C.length-1;)V/=1024,I++;return V.toFixed(I>0?1:0).replace(/\.0$/,"")+" "+C[I]}e.humanBytes=a;function u(g){if(!g)return"\u2014";var C=Math.floor(g/86400),I=Math.floor(g%86400/3600),V=Math.floor(g%3600/60);return C>0?C+"d "+(I<10?"0":"")+I+"h":I>0?I+"h "+(V<10?"0":"")+V+"m":V+"m"}e.humanDuration=u;function p(g){return g==null?"\u2014":g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":String(g)}e.humanNum=p,e.queueTotal=function(g){return g?(g.waiting||0)+(g.active||0)+(g.delayed||0)+(g.failed||0):0},e.statusCount=function(g){if(!e.data||!e.data.repos)return 0;for(var C=e.data.repos.statusBreakdown||[],I=0;I<C.length;I++)if(C[I]._id===g)return C[I].count;return 0},e.barPct=function(g){var C=e.data&&e.data.repos?e.data.repos.total:0;if(!C)return 0;var I=[g];g==="expired"&&I.push("expiring"),g==="removed"&&I.push("re
Line truncated
|
||||
`);t.innerHTML=o.map(i=>{let s=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":s==="+"?"add":s==="-"?"remove":"";return`<span class="md-diff-line${r?" is-"+r:""}">${i||" "}</span>`}).join(`
|
||||
`)}),_u=(e,t=0)=>{let o=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+o+4,24)},Ps=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let o=t.querySelectorAll(".md-diff-line");if(o.length){o.forEach(s=>{s.classList.contains("is-hunk")||s.style.setProperty("--hang",_u(s.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
|
||||
`).map(s=>{let r=i.join("");s.replace(/<\/?span\b[^>]*>/g,u=>(u.startsWith("</")?i.pop():i.push(u),u));let a=s.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${_u(a)}ch">${r}${s||" "}${"</span>".repeat(i.length)}</span>`}).join(`
|
||||
`)})},qu={props:["content","terms","options"],setup(e){let t=Ct(null),o=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Vu(t.value),Ps(t.value)};return un(()=>{o(),it(()=>[e.content,e.terms,e.options],o,{deep:!0})}),()=>Pe("markdown",{ref:t})}},fg={props:["file","terms","options"],setup(e){let t=Ct(null),o=()=>et(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Vu(t.value),Ps(t.value)});return un(o),it(()=>[e.file?.content,e.terms,e.options],o,{deep:!0}),()=>{let i=e.file||{},s=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(s)||i.language==="Markdown")return Pe("gist-file",{ref:t},Pe(qu,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},a=(i.language||s||"none").toLowerCase();return Pe("gist-file",{ref:t},Pe("pre",{class:"line-numbers"},Pe("code",{class:"language-"+(r[a]||a),key:i.content},i.content||"")))}}},hg=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let o=document.createElement("div");o.className="nb-code-scroll",t.replaceWith(o),o.appendChild(t);let i=()=>{let s=t.scrollWidth-t.clientWidth>1;if(o.classList.toggle("is-overflowing",s),o.classList.toggle("is-at-end",s&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!s)return;let r=t.clientWidth-16,a=Math.max(24,r*t.clientWidth/t.scrollWidth);o.style.setProperty("--thumb-w",a+"px"),o.style.setProperty("--thumb-x",(r-a)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),mg={props:["file","content"],setup(e){let t=Ct(null),o=0,i,s=async()=>{let r=++o;i?.abort(),i=new AbortController;try{let a=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(u=>{if(!u.ok)throw Error("Notebook request failed");return u.json()});if(await jn("notebook"),r!==o)return;t.value.innerHTML=Hi(DOMPurify.sanitize(nb.parse(a).render())),t.value.querySelectorAll("pre code").forEach(u=>window.Prism?.highlightElement(u)),hg(t.value)}catch(a){r===o&&a.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return un(()=>{s(),it(()=>[e.file,e.content],s)}),xn(()=>{o++,i?.abort()}),()=>Pe("notebook",{ref:t})}},gg={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),o=t.reduce((i,[,s])=>i+s.code,0);return Pe("loc",t.map(([i,s])=>Pe("div",{class:"lang",title:`${i}: ${s.code.toLocaleString()} lines`,style:{width:s.code*100/o+"%",background:langColors[i]}})))}}},$u={Markdown:qu,GistFile:fg,Notebook:mg,Loc:gg,HtmlDoc:Pu,QuotaUsage:cg,Pdfviewer:Gl(async()=>(await jn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Ou))},Lu={async mounted(e,{value:t}){e._editorValue=t;try{if(await Ys(),e._editorDisposed)return;let o=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(o.content??""),-1),Mu(e,o.options),e._editorCleanup=o.options?.onLoad?.(i)}catch(o){e._editorDisposed||(e.textContent=o.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Mu(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Mu(e,t={}){let o=pg.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+o),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Uu={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],o=new Set,i=new IntersectionObserver(s=>{s.forEach(a=>a.isIntersecting?o.add(a.target.id):o.delete(a.target.id));let r=t.find(a=>o.has(a.hash.slice(1)));r&&t.forEach(a=>a.classList.toggle("active",a===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});et(()=>{t.forEach(s=>{let r=document.getElementById(s.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(s=>s.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};var da=(e,t,o)=>{let i=e instanceof RegExp?Fu(e,o):e,s=t instanceof RegExp?Fu(t,o):t,r=i!==null&&s!=null&&vg(i,s,o);return r&&{start:r[0],end:r[1],pre:o.slice(0,r[0]),body:o.slice(r[0]+i.length,r[1]),post:o.slice(r[1]+s.length)}},Fu=(e,t)=>{let o=t.match(e);return o?o[0]:null},vg=(e,t,o)=>{let i,s,r,a,u,p=o.indexOf(e),y=o.indexOf(t,p+1),h=p;if(p>=0&&y>0){if(e===t)return[p,y];for(i=[],r=o.length;h>=0&&!u;){if(h===p)i.push(h),p=o.indexOf(e,h+1);else if(i.length===1){let b=i.pop();b!==void 0&&(u=[b,y])}else s=i.pop(),s!==void 0&&s<r&&(r=s,a=y),y=o.indexOf(t,h+1);h=p<y&&p>=0?p:y}i.length&&a!==void 0&&(u=[r,a])}return u};var Bu="\0SLASH"+Math.random()+"\0",zu="\0OPEN"+Math.random()+"\0",fa="\0CLOSE"+Math.random()+"\0",Hu="\0COMMA"+Math.random()+"\0",ju="\0PE
Line truncated
|
||||
`)},ga=class{constructor(t){xe(this,"gen");xe(this,"threads",[]);xe(this,"match",!1);xe(this,"runs",[]);xe(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},ec=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((o,i)=>o!==t.ids[i])?!1:e.runs.every(o=>t.runs.some(i=>i.neg===o.neg&&ec(i.state,o.state))),Ku=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),ro,Ln,va,ya,Ms=class{constructor(t,o,i){qe(this,Ln);xe(this,"dots");xe(this,"dotStart");qe(this,ro);this.dots=t,this.dotStart=o,Fe(this,ro,i)}state(){return new ga(++ie(this,ro).gen)}done(t){return t.ids=t.threads.map(o=>o.id).sort((o,i)=>o-i),t.match&&t.ids.unshift(ma.id),t}restricted(t,o){return o&&(this.dots||this.dotStart&&t===0)}add(t,o,i,s){switch(o.t){case"split":if(!$e(this,Ln,va).call(this,t,o))return;for(let a of o.out)this.add(t,a,i,s);return;case"neg":if(!$e(this,Ln,va).call(this,t,o))return;let r=this.state();return this.add(r,o.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:o,state:r},i,s);case"star":if(this.restricted(i,s))return;$e(this,Ln,ya).call(this,t,o)&&this.add(t,o.next,i,s);return;case"match":t.match=!0;return;default:$e(this,Ln,ya).call(this,t,o)}}addRun(t,o,i,s){for(let r of t.runs)if(r.neg===o.neg&&ec(r.state,o.state))return;t.runs.push(o),o.state.match||this.add(t,o.neg.next,i,s)}step(t,o,i,s){let r=this.state();for(let a of t.threads)switch(a.t){case"lit":ka(a,o)&&this.add(r,a.next,i+1,s);break;case"any":this.restricted(i,s)||this.add(r,a.next,i+1,s);break;case"class":!this.restricted(i,s)&&a.re.test(o)&&this.add(r,a.next,i+1,s);break;case"star":this.restricted(i,s)||this.add(r,a,i+1,s)}if(!this.restricted(i,s))for(let a of t.runs){if(a.state.dead){this.addRun(r,a,i+1,s);continue}let u=this.step(a.state,o,i,!1);this.addRun(r,{t:"run",neg:a.neg,state:u},i+1,s)}return this.done(r)}};ro=new WeakMap,Ln=new WeakSet,va=function(t,o){let{seen:i}=ie(this,ro);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,!0)},ya=function(t,o){let{has:i}=ie(this,ro);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,t.threads.push(o),!0)};var tc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let o=e.runs.map(i=>`${i.neg.id}(${tc(i.state)})`);return`${t}|${o.sort().join("|")}`},Kg=1<<18,qo,$o,_n,ao,Mn,Vn,qn,xt,wa,Wi,nc,ba=class{constructor(t,o){qe(this,xt);qe(this,qo);qe(this,$o,new Map);qe(this,_n,0);qe(this,ao);qe(this,Mn);qe(this,Vn);qe(this,qn);Fe(this,qo,t),Fe(this,Vn,new Ms(!1,!1,o)),Fe(this,qn,new Ms(!1,!0,o))}start(t){if(t){if(ie(this,Mn))return ie(this,Mn);let i=ie(this,qn).state();return ie(this,qn).add(i,ie(this,qo),0,!0),Fe(this,Mn,$e(this,xt,wa).call(this,ie(this,qn).done(i)))}if(ie(this,ao))return ie(this,ao);let o=ie(this,Vn).state();return ie(this,Vn).add(o,ie(this,qo),0,!0),Fe(this,ao,$e(this,xt,Wi).call(this,ie(this,Vn).done(o)))}next(t,o){let i=o.charCodeAt(0),s=i<128?void 0:t.next.get(o);if(s)return s;let r=t===ie(this,Mn)?$e(this,xt,Wi).call(this,ie(this,qn).step(t.state,o,0,!0)):$e(this,xt,Wi).call(this,ie(this,Vn).step(t.state,o,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Fe(this,_n,ie(this,_n)+128)),t.ascii[i]=r):t.next.set(o,r),za(this,_n)._++,r}};qo=new WeakMap,$o=new WeakMap,_n=new WeakMap,ao=new WeakMap,Mn=new WeakMap,Vn=new WeakMap,qn=new WeakMap,xt=new WeakSet,wa=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},Wi=function(t){let o=tc(t),i=ie(this,$o).get(o);if(i)return i;ie(this,_n)>Kg&&$e(this,xt,nc).call(this);let s=$e(this,xt,wa).call(this,t);return ie(this,$o).set(o,s),Fe(this,_n,ie(this,_n)+(o.length+1)),s},nc=function(){ie(this,$o).clear(),Fe(this,_n,0),Fe(this,ao,void 0),Fe(this,Mn,void 0)};var Yg=e=>{let t=[];for(let o=e;o.t!=="match";o=o.next){if(o.t==="split"||o.t==="neg")return;t.push(o)}return t},Xg=(e,t,o,i)=>{let s=0,r=o,a=-1,u=0;for(;r<i;){let p=e[s];if(p?.t==="star"){a=s++,u=r;continue}let y=t[r];if(p&&(p.t==="any"||p.t==="lit"&&ka(p,y)||p.t==="class"&&p.re.test(y))){s++,r++;continue}if(a===-1)return!1;s=a+1,r=++u}for(;e[s]?.t==="star";)s++;return s===e.length},oc=e=>{let t=0,o=0;for(let i of e){let[s,r]=Qg(i);t+=s,o+=r}return[t,o]},Qg=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(oc),o=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),s=i===0?0:1/0;return e.type==="@"?[o,i]:e.type==="?"?[0,i]:e.type==="*"?[0,s]:[o,s]},Yu=(e,t,o)=>{for(let i=0;i<e.length;i++)if(!ka(e[i],t[o+i]))return!1;return!0},Jg=/[/\ud800-\udfff]/,Zg=/[\ud800-\udfff]/,Gi=e=>Zg.test(e)?[...e]:e,Xu=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},$n,Lo,lo,Ki,uo,qs,Yi,co,$s,Ls,Us,Dn,mn,Uo,Fo,Fs,Xi,Zt,po,_s,Vs=class{constructor(t,o={}){qe(this,po);xe(this,"pattern");xe(this,"options");qe(this,$n);qe(this,Lo);qe(this,lo);qe(this,Ki);qe(this,uo);qe(this,qs,!1);qe(this,Yi);qe(this,co);qe(this,$s,!1);qe(this,Ls,0);qe(this,Us,1/0);qe(this,Dn,[]);qe(this,mn,[]);qe(this,Uo);qe(this,Fo);qe(this,Fs,!1);qe(this,Xi);qe(this,Zt);if(t.includes
Line truncated
|
||||
`).forEach((o,i)=>{let{term:s}=_a(o.trim());if(!s)return;let r=[];for(let a=0;a<s.length;a++){if(s[a]==="\\"){a++;continue}wc.has(s[a])&&!r.includes(s[a])&&r.push(s[a])}r.length&&t.push({line:i,term:s,symbols:r})}),t}function Cc(e,t){let o=String(e||"").split(`
|
||||
`),i=o[t];if(i===void 0)return e;let{term:s}=_a(i.trim());if(!s)return e;let r="";for(let u=0;u<s.length;u++){if(s[u]==="\\"){r+=s.slice(u,u+2),u++;continue}r+=wc.has(s[u])||s[u]==="."?"\\"+s[u]:s[u]}let a=i.indexOf(s);return o[t]=i.slice(0,a)+r+i.slice(a+s.length),o.join(`
|
||||
`)}var mo={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t
Line truncated
|
||||
`)}),Nu=(e,t=0)=>{let o=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+o+4,24)},Es=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let o=t.querySelectorAll(".md-diff-line");if(o.length){o.forEach(s=>{s.classList.contains("is-hunk")||s.style.setProperty("--hang",Nu(s.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
|
||||
`).map(s=>{let r=i.join("");s.replace(/<\/?span\b[^>]*>/g,u=>(u.startsWith("</")?i.pop():i.push(u),u));let a=s.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Nu(a)}ch">${r}${s||" "}${"</span>".repeat(i.length)}</span>`}).join(`
|
||||
`)})},Au={props:["content","terms","options"],setup(e){let t=Et(null),o=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Du(t.value),Es(t.value)};return dn(()=>{o(),rt(()=>[e.content,e.terms,e.options],o,{deep:!0})}),()=>Pe("markdown",{ref:t})}},og={props:["file","terms","options"],setup(e){let t=Et(null),o=()=>Je(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Du(t.value),Es(t.value)});return dn(o),rt(()=>[e.file?.content,e.terms,e.options],o,{deep:!0}),()=>{let i=e.file||{},s=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(s)||i.language==="Markdown")return Pe("gist-file",{ref:t},Pe(Au,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},a=(i.language||s||"none").toLowerCase();return Pe("gist-file",{ref:t},Pe("pre",{class:"line-numbers"},Pe("code",{class:"language-"+(r[a]||a),key:i.content},i.content||"")))}}},sg=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let o=document.createElement("div");o.className="nb-code-scroll",t.replaceWith(o),o.appendChild(t);let i=()=>{let s=t.scrollWidth-t.clientWidth>1;if(o.classList.toggle("is-overflowing",s),o.classList.toggle("is-at-end",s&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!s)return;let r=t.clientWidth-16,a=Math.max(24,r*t.clientWidth/t.scrollWidth);o.style.setProperty("--thumb-w",a+"px"),o.style.setProperty("--thumb-x",(r-a)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),ig={props:["file","content"],setup(e){let t=Et(null),o=0,i,s=async()=>{let r=++o;i?.abort(),i=new AbortController;try{let a=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(u=>{if(!u.ok)throw Error("Notebook request failed");return u.json()});if(await zn("notebook"),r!==o)return;t.value.innerHTML=Vi(DOMPurify.sanitize(nb.parse(a).render())),t.value.querySelectorAll("pre code").forEach(u=>window.Prism?.highlightElement(u)),sg(t.value)}catch(a){r===o&&a.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return dn(()=>{s(),rt(()=>[e.file,e.content],s)}),Jn(()=>{o++,i?.abort()}),()=>Pe("notebook",{ref:t})}},rg={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),o=t.reduce((i,[,s])=>i+s.code,0);return Pe("loc",t.map(([i,s])=>Pe("div",{class:"lang",title:`${i}: ${s.code.toLocaleString()} lines`,style:{width:s.code*100/o+"%",background:langColors[i]}})))}}},Tu={Markdown:Au,GistFile:og,Notebook:ig,Loc:rg,HtmlDoc:Cu,QuotaUsage:tg,Pdfviewer:$l(async()=>(await zn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Eu))},Pu={async mounted(e,{value:t}){e._editorValue=t;try{if(await Fs(),e._editorDisposed)return;let o=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(o.content??""),-1),Ru(e,o.options),e._editorCleanup=o.options?.onLoad?.(i)}catch(o){e._editorDisposed||(e.textContent=o.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Ru(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Ru(e,t={}){let o=ng.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+o),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Ou={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],o=new Set,i=new IntersectionObserver(s=>{s.forEach(a=>a.isIntersecting?o.add(a.target.id):o.delete(a.target.id));let r=t.find(a=>o.has(a.hash.slice(1)));r&&t.forEach(a=>a.classList.toggle("active",a===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});Je(()=>{t.forEach(s=>{let r=document.getElementById(s.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(s=>s.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};var ta=(e,t,o)=>{let i=e instanceof RegExp?Iu(e,o):e,s=t instanceof RegExp?Iu(t,o):t,r=i!==null&&s!=null&&ag(i,s,o);return r&&{start:r[0],end:r[1],pre:o.slice(0,r[0]),body:o.slice(r[0]+i.length,r[1]),post:o.slice(r[1]+s.length)}},Iu=(e,t)=>{let o=t.match(e);return o?o[0]:null},ag=(e,t,o)=>{let i,s,r,a,u,p=o.indexOf(e),y=o.indexOf(t,p+1),h=p;if(p>=0&&y>0){if(e===t)return[p,y];for(i=[],r=o.length;h>=0&&!u;){if(h===p)i.push(h),p=o.indexOf(e,h+1);else if(i.length===1){let b=i.pop();b!==void 0&&(u=[b,y])}else s=i.pop(),s!==void 0&&s<r&&(r=s,a=y),y=o.indexOf(t,h+1);h=p<y&&p>=0?p:y}i.length&&a!==void 0&&(u=[r,a])}return u};var Mu="\0SLASH"+Math.random()+"\0",_u="\0OPEN"+Math.random()+"\0",ia="\0CLOSE"+Math.random()+"\0",Vu="\0COMMA"+Math.random()+"\0",qu="\0PE
Line truncated
|
||||
`)},la=class{constructor(t){Qe(this,"gen");Qe(this,"threads",[]);Qe(this,"match",!1);Qe(this,"runs",[]);Qe(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},Wu=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((o,i)=>o!==t.ids[i])?!1:e.runs.every(o=>t.runs.some(i=>i.neg===o.neg&&Wu(i.state,o.state))),Uu=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),so,Vn,da,ua,Ds=class{constructor(t,o,i){qe(this,Vn);Qe(this,"dots");Qe(this,"dotStart");qe(this,so);this.dots=t,this.dotStart=o,Ue(this,so,i)}state(){return new la(++re(this,so).gen)}done(t){return t.ids=t.threads.map(o=>o.id).sort((o,i)=>o-i),t.match&&t.ids.unshift(aa.id),t}restricted(t,o){return o&&(this.dots||this.dotStart&&t===0)}add(t,o,i,s){switch(o.t){case"split":if(!$e(this,Vn,da).call(this,t,o))return;for(let a of o.out)this.add(t,a,i,s);return;case"neg":if(!$e(this,Vn,da).call(this,t,o))return;let r=this.state();return this.add(r,o.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:o,state:r},i,s);case"star":if(this.restricted(i,s))return;$e(this,Vn,ua).call(this,t,o)&&this.add(t,o.next,i,s);return;case"match":t.match=!0;return;default:$e(this,Vn,ua).call(this,t,o)}}addRun(t,o,i,s){for(let r of t.runs)if(r.neg===o.neg&&Wu(r.state,o.state))return;t.runs.push(o),o.state.match||this.add(t,o.neg.next,i,s)}step(t,o,i,s){let r=this.state();for(let a of t.threads)switch(a.t){case"lit":fa(a,o)&&this.add(r,a.next,i+1,s);break;case"any":this.restricted(i,s)||this.add(r,a.next,i+1,s);break;case"class":!this.restricted(i,s)&&a.re.test(o)&&this.add(r,a.next,i+1,s);break;case"star":this.restricted(i,s)||this.add(r,a,i+1,s)}if(!this.restricted(i,s))for(let a of t.runs){if(a.state.dead){this.addRun(r,a,i+1,s);continue}let u=this.step(a.state,o,i,!1);this.addRun(r,{t:"run",neg:a.neg,state:u},i+1,s)}return this.done(r)}};so=new WeakMap,Vn=new WeakSet,da=function(t,o){let{seen:i}=re(this,so);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,!0)},ua=function(t,o){let{has:i}=re(this,so);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,t.threads.push(o),!0)};var Ku=e=>{let t=e.ids.join();if(!e.runs.length)return t;let o=e.runs.map(i=>`${i.neg.id}(${Ku(i.state)})`);return`${t}|${o.sort().join("|")}`},$g=1<<18,Io,Mo,Pn,io,On,In,Mn,xt,pa,Li,Yu,ca=class{constructor(t,o){qe(this,xt);qe(this,Io);qe(this,Mo,new Map);qe(this,Pn,0);qe(this,io);qe(this,On);qe(this,In);qe(this,Mn);Ue(this,Io,t),Ue(this,In,new Ds(!1,!1,o)),Ue(this,Mn,new Ds(!1,!0,o))}start(t){if(t){if(re(this,On))return re(this,On);let i=re(this,Mn).state();return re(this,Mn).add(i,re(this,Io),0,!0),Ue(this,On,$e(this,xt,pa).call(this,re(this,Mn).done(i)))}if(re(this,io))return re(this,io);let o=re(this,In).state();return re(this,In).add(o,re(this,Io),0,!0),Ue(this,io,$e(this,xt,Li).call(this,re(this,In).done(o)))}next(t,o){let i=o.charCodeAt(0),s=i<128?void 0:t.next.get(o);if(s)return s;let r=t===re(this,On)?$e(this,xt,Li).call(this,re(this,Mn).step(t.state,o,0,!0)):$e(this,xt,Li).call(this,re(this,In).step(t.state,o,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Ue(this,Pn,re(this,Pn)+128)),t.ascii[i]=r):t.next.set(o,r),_a(this,Pn)._++,r}};Io=new WeakMap,Mo=new WeakMap,Pn=new WeakMap,io=new WeakMap,On=new WeakMap,In=new WeakMap,Mn=new WeakMap,xt=new WeakSet,pa=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},Li=function(t){let o=Ku(t),i=re(this,Mo).get(o);if(i)return i;re(this,Pn)>$g&&$e(this,xt,Yu).call(this);let s=$e(this,xt,pa).call(this,t);return re(this,Mo).set(o,s),Ue(this,Pn,re(this,Pn)+(o.length+1)),s},Yu=function(){re(this,Mo).clear(),Ue(this,Pn,0),Ue(this,io,void 0),Ue(this,On,void 0)};var Lg=e=>{let t=[];for(let o=e;o.t!=="match";o=o.next){if(o.t==="split"||o.t==="neg")return;t.push(o)}return t},Ug=(e,t,o,i)=>{let s=0,r=o,a=-1,u=0;for(;r<i;){let p=e[s];if(p?.t==="star"){a=s++,u=r;continue}let y=t[r];if(p&&(p.t==="any"||p.t==="lit"&&fa(p,y)||p.t==="class"&&p.re.test(y))){s++,r++;continue}if(a===-1)return!1;s=a+1,r=++u}for(;e[s]?.t==="star";)s++;return s===e.length},Xu=e=>{let t=0,o=0;for(let i of e){let[s,r]=Fg(i);t+=s,o+=r}return[t,o]},Fg=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(Xu),o=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),s=i===0?0:1/0;return e.type==="@"?[o,i]:e.type==="?"?[0,i]:e.type==="*"?[0,s]:[o,s]},Fu=(e,t,o)=>{for(let i=0;i<e.length;i++)if(!fa(e[i],t[o+i]))return!1;return!0},Bg=/[/\ud800-\udfff]/,zg=/[\ud800-\udfff]/,$i=e=>zg.test(e)?[...e]:e,Bu=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},_n,_o,ro,Ui,ao,Ts,Fi,lo,Ps,Os,Is,Sn,hn,Vo,qo,Ms,Bi,Zt,uo,Rs,As=class{constructor(t,o={}){qe(this,uo);Qe(this,"pattern");Qe(this,"options");qe(this,_n);qe(this,_o);qe(this,ro);qe(this,Ui);qe(this,ao);qe(this,Ts,!1);qe(this,Fi);qe(this,lo);qe(this,Ps,!1);qe(this,Os,0);qe(this,Is,1/0);qe(this,Sn,[]);qe(this,hn,[]);qe(this,Vo);qe(this,qo);qe(this,Ms,!1);qe(this,Bi);qe(this,Zt);if(t.includes
Line truncated
|
||||
`).forEach((o,i)=>{let{term:s}=Na(o.trim());if(!s)return;let r=[];for(let a=0;a<s.length;a++){if(s[a]==="\\"){a++;continue}pc.has(s[a])&&!r.includes(s[a])&&r.push(s[a])}r.length&&t.push({line:i,term:s,symbols:r})}),t}function hc(e,t){let o=String(e||"").split(`
|
||||
`),i=o[t];if(i===void 0)return e;let{term:s}=Na(i.trim());if(!s)return e;let r="";for(let u=0;u<s.length;u++){if(s[u]==="\\"){r+=s.slice(u,u+2),u++;continue}r+=pc.has(s[u])||s[u]==="."?"\\"+s[u]:s[u]}let a=i.indexOf(s);return o[t]=i.slice(0,a)+r+i.slice(a+s.length),o.join(`
|
||||
`)}var fo={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,b.options),u.restore()})}p();let y=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let b=u.checkpoint(),m={terms:e.terms.split(`
|
||||
`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",m).then(()=>{u.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",y&&i.cancel(y),y=i(()=>{e.message=null},2500)},w=>{e.saving=!1;let A=w&&w.data&&w.data.error,N="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+A),o("ERRORS.unknown_error")]).then(([R,g])=>{e.error=A&&R!==g?R:N},()=>{e.error=N})})},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."}))}},Tc=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)})}},Pc=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(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/signin":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,p){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(y===void 0)return;u.preventDefault();let h=e.features.length,b=y==="first"?0:y==="last"?h-1:(p+y+h)%h;e.feature=e.features[b].key,s(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},e.demoText=`# DeepLearnUtils
|
||||
`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",m).then(()=>{u.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",y&&i.cancel(y),y=i(()=>{e.message=null},2500)},w=>{e.saving=!1;let A=w&&w.data&&w.data.error,S="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+A),o("ERRORS.unknown_error")]).then(([R,g])=>{e.error=A&&R!==g?R:S},()=>{e.error=S})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},kc=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)})}},Cc=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(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/signin":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,p){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(y===void 0)return;u.preventDefault();let h=e.features.length,b=y==="first"?0:y==="last"?h-1:(p+y+h)%h;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 u=(e.demoTerms||"").split(/[,\n]/).map(m=>m.trim()).filter(Boolean).sort((m,w)=>w.length-m.length),p=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!u.length)return[{text:e.demoText}];let y=new RegExp("("+u.map(p).join("|")+")","gi"),h={},b=0;return(e.demoText||"").split(y).filter(m=>m!=="").map(m=>{let w=u.find(A=>A.toLowerCase()===m.toLowerCase());return w?(h[w.toLowerCase()]||(h[w.toLowerCase()]=++b),{text:String(h[w.toLowerCase()]),redacted:!0,original:m}):{text:m}})},e.demoCount=()=>e.demoParts().filter(u=>u.redacted).length,e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(u=>!u.total);function r(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests}).catch(()=>{})}r();function a(u){let p={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return p;let y=new Array(u.length-1);for(let N=1;N<u.length;N++)y[N-1]=u[N]-u[N-1];let h=y.length,b=Math.max.apply(null,y),m=Math.min.apply(null,y),w=Math.min(0,m),A=b-w||1;p.viewW=h*2,p.bars=new Array(h);for(let N=0;N<h;N++){let R=(y[N]-w)/A,g=Math.max(1.5,R*34);p.bars[N]={x:(N*2+.25).toFixed(2),y:(36-g).toFixed(2),w:"1.5",h:g.toFixed(2)}}if(p.deltaToday=y[h-1],h>=2){let N=y[h-2];N&&(p.pctChange=(p.deltaToday-N)/N*100)}return p.pctAbs=Math.round(Math.abs(p.pctChange)),p.isUp=p.pctChange>=0,p}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let p=u.data||[];e.history={repositories:a(p.map(y=>y.nbRepositories||0)),users:a(p.map(y=>y.nbUsers||0)),pageViews:a(p.map(y=>y.nbPageViews||0)),pullRequests:a(p.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},Oc=function(e,t,o,i,s,r){let a=Nt();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,et(()=>document.querySelector(".dashboard-quota > summary")?.focus())},jt()(document,"click",D=>{e.quotaExpanded&&!D.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=D=>D.status==="error"||D._broken||p(D.status)==="progress"&&D._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=D=>{e.projectView=D,D==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=D=>{let ee=ia(D?.anonymizeDate||D?.lastView)||"";return/ ago$/.test(ee)?"No activity for "+ee.replace(/ ago$/,""):"No activity since "+ee.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=D=>"project-details-"+encodeURIComponent(D._type+":"+(D._id||D._source||"unknown")),e.showProjectDetails=async D=>{e.selectedProject=D,e.projectName=D.projectName||"",e.nameError="",e.nameMessage="",await et();let ee=document.getElementById(e.projectDetailsId(D));ee?.focus(),ee?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=D=>{e.selectedProject=null,et(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(D._type+":"+D._id)}"]`)?.focus())},e.saveProjectName=async D=>{if(e.nameSaving||!D._id)return;let ee=e.projectName.trim();if(ee.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let ce=await t.post("/api/user/project-name",{type:D._type,id:D._id,name:ee});D.projectName=ce.data.name,D._label=D.projectName||D._fallbackLabel,e.selectedProject===D&&(e.nameMessage=ee?"Project name saved.":"Default project name restored."),C||(e.dashboardCursor=null,await V(),e.selectedProject===D&&(e.selectedProject=e.items.find(Me=>Me._type===D._type&&Me._id===D._id)||null))}catch{e.selectedProject===D&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async D=>{if(!D._viewUrl||e.copyingId)return;let ee=new URL(D._viewUrl,s.location.origin).href;e.copyingId=D._type+":"+D._id;try{await Va(ee),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:ee})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let u=["queue","download","downloaded","preparing","anon
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,z.options),e.options.expirationDate=z.options&&z.options.expirationDate?new Date(z.options.expirationDate):te(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function De(k,_,z){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(_,z)}function Ze(k){try{let _=parseGithubUrl(k);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"||Ze(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=m();try{let _=await t.get("/github/connections");if(e.githubConnections=_.data,!_.data.appEnabled)return;let z=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":_.data.csrf}});if(!b(k))return;e.error=null,z.data.fullName&&(e._originalFullName=z.data.fullName,e.source.fullName=z.data.fullName,e.sourceUrl="https://github.com/"+z.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(k)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,w(k)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await pt()}catch{}}};function Xe(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:Ze(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function ct(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function st(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){R.restore();try{let z=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(z.path!==s.path())throw new Error("Wrong task");g=z.values.conference||null;for(let Z of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(z.values,Z)&&(e[Z]=z.values[Z]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),C=z.id,I=JSON.stringify(R.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await ct(),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 R.restore()?(e.sourceUrl&&await ct(),!0):!1;R.restore();for(let z of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(_.draft,z)&&(e[z]=_.draft[z]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await ct(),sessionStorage.removeItem("github-access-draft"),!0}at(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(st,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async k=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(k.data.status),e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.fullName,e._originalFullName=k.data.source.fullName,e.terms=k.data.options.terms.filter(_=>_).join(`
|
||||
`),e.source=k.data.source,e.role=k.data.role||"owner",e._existingNever=k.data.options.expirationMode==="never",e._savedExpirationDate=k.data.options.expirationDate?new Date(k.data.options.expirationDate):null,e.coauthors=k.data.coauthors||[],e._originalBranch=k.data.source.branch,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,e.repositoryID=k.data.source.repositoryID,e._originalRepositoryID=k.data.source.repositoryID,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),A=N(parseGithubUrl(e.sourceUrl)),!await st()&&(await Promise.all([pt(),W()]),Ae())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async k=>{if(e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.repositoryFullName+"/pull/"+k.data.source.pullRequestId,e.terms=k.data.options.terms.filter(_=>_).join(`
|
||||
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),A=N(parseGithubUrl(e.sourceUrl)),!await st())try{await _e()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(_=>_).join(`
|
||||
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),A=N(parseGithubUrl(e.sourceUrl)),!await st()&&await We()},()=>{s.url("/404")}))}),t.get("/github/connections").then(k=>{e.githubConnections=k.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&k.data.appEnabled&&k.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&ct())}).catch(()=>{}),e.urlSelected=async(k=!1)=>{let _=++p;e.previousConfigurations=[],e.previousConfigurationId="";let z;try{z=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Se.cancel(),Be.cancel(),Ke.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",De("sourceUrl","github",!1);return}let Z=N(z),de=k||A===Z;A=Z,e.sourceUrlError="",De("sourceUrl","github",!0);let we=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Qe=window.document.getElementById("sourceUrl");if(Qe){try{Qe.setSelectionRange(0,0)}catch{}Qe.scrollLeft=0}},50),we&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!de&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],de||(e.source={type:"GitHubStream",branch:"",commit:""}),Se.cancel(),Be.cancel(),Ke.cancel(),fe.clear(),ft.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=de;try{z.gistId&&!z.repo?(e.detectedType="gist",e.source={gistId:z.gistId},await We()):z.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:z.owner+"/"+z.repo,pullRequestId:z.pullRequestId},await _e()):(e.detectedType="repo",ee(),await Promise.all([pt(),W()]),Ae())}catch{}finally{_===p&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let k=e.branches.filter(z=>z.name==e.source.branch)[0];if(!k)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=k.commit),e.readme=k.readme,await W(),Ae()}),e.getBranches=async k=>{let _=parseGithubUrl(e.sourceUrl),z=m();try{let Z=await t.get(`/api/repo/${_.owner}/${_.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Ze(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:Xe()}});if(!b(z))return;e.branches=Z.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let de=e.branches.filter(we=>we.name==e.source.branch);de.length>0&&(!(!e.reconnectingSource&&!k&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=de[0].commit),e.readme=de[0].readme,await W(k))}catch(Z){if(!b(z))return;e.branches=[],e.sourceUnreachable=Z&&(Z.status===404||Z.data&&Z.data.error==="repo_not_found");let de=Z&&Z.data&&Z.data.error||(Z&&Z.status===404?"repo_not_found":"unknown_error");r("ERRORS."+de).then(we=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:we}),e.error=we},console.error),typeof De=="function"&&De("sourceUrl","missing",!1)}finally{w(z)}};async function pt(){let k=parseGithubUrl(e.sourceUrl),_=m();try{gn();let z=await t.get(`/api/repo/${k.owner}/${k.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Ze(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Xe(),force:"1"}});if(!b(_))return;e.details=z.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(z){if(!b(_))return;throw z.data&&(r("ERRORS."+z.data.error).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),vo(z.data.error)),De("sourceUrl","missing",!1),z}finally{w(_)}}async function W(k){if(e.readme&&!k)return e.readme;let _=parseGithubUrl(e.sourceUrl),z=m();try{let Z=await t.get(`/api/repo/${_.owner}/${_.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Ze(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:Xe()}});b(z,!0)&&(e.readme=Z.data)}catch{b(z,!0)&&(e.readme="")}finally{w(z)}}let pe={magicalBraces:!0},M=k=>k.startsWith("/")&&!k.endsWith("/")&&Un(fo(k.slice(1),pe),pe)===k.slice(1),U=()=>Object.keys(e.preserve.picked).filter(k=>e.p
Line truncated
|
||||
`).map(k=>k.trim()).filter(Boolean),E=null,P=0,H=null,B=()=>!1;function K(){let k=P+"\0"+e.preserve.patterns;if(k!==H){H=k;try{B=Ia(Oa([...U(),...S()]))}catch{B=()=>!1}}return B}function oe(k){let _=new Map([["",{dirs:[],files:[]}]]);for(let z of k){let Z=z.split("/"),de="";for(let we=0;we<Z.length-1;we++){let Qe=Z.slice(0,we+1).join("/");_.has(Qe)||(_.set(Qe,{dirs:[],files:[]}),_.get(de).dirs.push(Qe)),de=Qe}_.get(de).files.push(z)}for(let z of _.values())z.dirs.sort();return{files:k,dirs:_,descendants:new Map}}function Q(k){return E.descendants.has(k)||E.descendants.set(k,E.files.filter(_=>_.startsWith(k+"/"))),E.descendants.get(k)}let J=k=>K()(k);function G(k){let _=Q(k),z=0;for(let Z of _)J(Z)&&z++;return z===0?"none":z===_.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let k=(e.options?.preserveFiles||[]).map(_=>String(_).trim()).filter(Boolean).map(_=>M(_)?fo(_.slice(1),pe):_);return k.length?k.slice(0,2).join(", ")+(k.length>2?` and ${k.length-2} more`:""):"None. Every file is redacted."};async function ve(){let k=e.source?.commit;if(!(E&&e.preserve.commit===k)){e.preserve.loading=!0,e.preserve.error="",E=null;try{let _=parseGithubUrl(e.sourceUrl),z=await t.get(`/api/repo/${_.owner}/${_.repo}/tree`,{params:{commit:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&Ze(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Xe()}});if(e.source?.commit!==k)return;E=Do(oe(z.data.files||[])),e.preserve.commit=k,e.preserve.truncated=!!z.data.truncated,e.previewTreeFit=1/0,e.queuePreviewTreeFit?.()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",k=>{e.detectedType==="repo"&&k&&e.sourceUrl&&ve().catch(()=>{})}),e.openPreserveFiles=()=>{let k={},_=[];for(let Z of e.options?.preserveFiles||[]){let de=String(Z).trim();de&&(!_.length&&M(de)?k[fo(de.slice(1),pe)]=!0:_.push(de))}let z={};for(let Z of Object.keys(k)){let de=Z.split("/");for(let we=1;we<de.length;we++)z[de.slice(0,we).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:k,expanded:z,patterns:_.join(`
|
||||
`),patternsOpen:_.length>0}),P++,a(()=>{let Z=document.getElementById("preserve-files-dialog");Z?.showModal&&!Z.open&&Z.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ve()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Oa([...U(),...S()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!E)return[];let k=K(),_=(we,Qe,Rt)=>{let wt=!!e.preserve.picked[we],vn=k(we);return{kind:"file",path:we,label:Rt,depth:Qe,state:vn?"all":"none",locked:!wt&&vn,note:!wt&&vn?"matched by a pattern":wt&&!vn?"excluded by a pattern":""}},z=String(e.preserve.search||"").trim().toLowerCase();if(z)return E.files.filter(we=>we.toLowerCase().includes(z)).slice(0,300).map(we=>_(we,0,we));let Z=[],de=(we,Qe)=>{let Rt=E.dirs.get(we);for(let wt of Rt.dirs){let vn=!!e.preserve.expanded[wt],Ko=S().includes(F(wt));Z.push({kind:"dir",path:wt,label:wt.slice(we?we.length+1:0)+"/",depth:Qe,open:vn,state:G(wt),locked:!1,note:Ko?"whole folder":""}),vn&&de(wt,Qe+1)}for(let wt of Rt.files)Z.push(_(wt,Qe,wt.slice(we?we.length+1:0)))};return de("",0),Z},e.preserveCount=()=>E?E.files.filter(J).length:0,e.togglePreserveDir=k=>{e.preserve.expanded[k]=!e.preserve.expanded[k]},e.togglePreserveFile=k=>{e.preserve.picked[k]=!e.preserve.picked[k],P++},e.togglePreserveFolder=k=>{let _=F(k),z=X(k),Z=S().filter(we=>we!==_&&we!==z),de=G(k)==="all"||S().includes(_);for(let we of Q(k))e.preserve.picked[we]=!1;P++,e.preserve.patterns=(de?Z:[...Z,_]).join(`
|
||||
`),de&&Q(k).some(J)&&(e.preserve.patterns=[...Z,z].join(`
|
||||
`))};let le=[".github","","docs"].flatMap(k=>["README.md","README","README.markdown","README.rst","README.txt","readme.md"].map(_=>(k?k+"/":"")+_));e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let k=(e.options?.preserveFiles||[]).map(_=>String(_).trim()).filter(Boolean);if(!k.length)return!1;try{let _=Ia(k);return le.some(z=>_(z))}catch{return!1}};function re(){let k={terms:e.terms&&!e.readmePreserved()?e.terms.split(`
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let _=parseGithubUrl(e.sourceUrl);k.repoName=`${_.owner}/${_.repo}`}catch{}return k}function me(k,_,z){let Z=null,de=0,we=()=>{if(e.detectedType!==k)return;Z&&a.cancel(Z);let Qe=++de;e.previewStatus="loading",Z=a(()=>{Z=null;let Rt=_();if(!Rt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Rt).then(wt=>{Qe===de&&(z(wt.data,Rt),e.previewStatus="ready")}).catch(()=>{Qe===de&&(e.previewStatus="error")})},200)};return we.cancel=()=>{de++,Z&&a.cancel(Z),Z=null},e.on("dispose",we.cancel),we}e.retryPreview=()=>{e.detectedType==="repo"&&Se(),e.detectedType==="pr"&&Be(),e.detectedType==="gist"&&Ke()};let Se=me("repo",()=>e.readme?{content:e.readme,options:re()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=k.content;let _="";try{let Z=parseGithubUrl(e.sourceUrl),de=e.source.branch||e.details&&e.details.defaultBranch||"main";_=`https://github.com/${Z.owner}/${Z.repo}/raw/${de}/`}catch{}let z=renderMD(e.anonymize_readme,_);e.html_readme=z,a(()=>{Prism.highlightAll(),typeof Ps=="function"&&document.querySelectorAll(".reviewer-preview .anonymize-preview-body").forEach(Ps)},150)});function Ae(){!e.anonymize||!e.anonymize.terms||Se()}async function _e(){let k=parseGithubUrl(e.sourceUrl),_=m();try{gn();let z=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(_))return;e.details=z.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(z){if(!b(_))return;throw z.data&&(r("ERRORS."+z.data.error).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),vo(z.data.error)),De("sourceUrl","missing",!1),z}finally{w(_)}}let fe=ot(new Map);function Re(){let k=new Set,_=e.details&&e.details.pullRequest;if(!_)return k;typeof _.title=="string"&&k.add(_.title),typeof _.body=="string"&&k.add(_.body),typeof _.diff=="string"&&k.add(_.diff);let z=_.comments||[];for(let Z of z)typeof Z.author=="string"&&k.add(Z.author),typeof Z.body=="string"&&k.add(Z.body);return k}let Be=me("pr",()=>{let k=Re(),_=Array.from(k);return _.length===0?null:{contents:_,options:re()}},(k,_)=>{if(!Array.isArray(k?.contents)||k.contents.length!==_.contents.length||k.contents.some(de=>typeof de!="string"))throw Error("Invalid preview response");let z=_.contents,Z=new Map;for(let de=0;de<z.length&&de<k.contents.length;de++)Z.set(z[de],k.contents[de]);fe.clear(),Z.forEach((de,we)=>fe.set(we,de))});e.anonymizePrContent=function(k){return k&&(fe.has(k)?fe.get(k):"")};async function We(){let k=parseGithubUrl(e.sourceUrl),_=m();try{gn(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let z=await t.get(`/api/gist/source/${k.gistId}`);if(!b(_))return;e.details=z.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(z){if(!b(_))return;if(z.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,De("sourceUrl","missing",!1);return}if(z.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,De("sourceUrl","missing",!1);return}throw z.data&&(r("ERRORS."+z.data.error).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),vo(z.data.error)),De("sourceUrl","missing",!1),z}finally{w(_)}}let ft=ot(new Map);function Pt(){let k=new Set,_=e.details&&e.details.gist;if(!_)return k;typeof _.description=="string"&&k.add(_.description),typeof _.ownerLogin=="string"&&k.add(_.ownerLogin);let z=_.files||[];for(let de of z)typeof de.filename=="string"&&k.add(de.filename),typeof de.content=="string"&&k.add(de.content);let Z=_.comments||[];for(let de of Z)typeof de.author=="string"&&k.add(de.author),typeof de.body=="string"&&k.add(de.body);return k}let Ke=me("gist",()=>{let k=Pt(),_=Array.from(k);return _.length===0?null:{contents:_,options:re()}},(k,_)=>{if(!Array.isArray(k?.contents)||k.contents.length!==_.contents.length||k.contents.some(de=>typeof de!="string"))throw Error("Invalid preview response");let z=_.contents,Z=new Map;for(let de=0;de<z.length&&de<k.contents.length;de++)Z.set(z[de],k.contents[de]);ft.clear(),Z.forEach((de,we)=>ft.set(we,de)),lt()});e.anonymizeGistContent=function(k){return k&&(ft.has(k)?ft.get(k):"")},e.previewGistFiles=[];function lt(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(_=>({filename:e.anonymizeGistContent(_.filename),content:e.anonymizeGistContent(_.content),language:_.language}))}e.watch("details.gist.files",lt,!0),e.watch("terms",lt);function en(){let k=e.conference;if(e.conference_data=null,!k)return;let _=k===g||e.isUpdate&&k===e._originalConference;k!==g&&(g=null),t.get("/api/conferences/"+k).then(z=>{e.conference===k&&(e.conference_data=z.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.conf
Line truncated
|
||||
`).filter(we=>we),connection:e.githubConnection,fullName:`${z.owner}/${z.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(Z.options.pageSource=e.details.pageSource),gn();let de=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(de,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},we=>{if(we.data){let Qe=["quota_exceeded","subscription_required_for_never_expiration"].includes(we.data.error);Qe||r("ERRORS."+we.data.error).then(Rt=>{e.error=Rt},console.error),vo(we.data.error),Qe&&(we.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,et(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{_.disabled=!1})},e.anonymizeGist=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(Ws())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let _=k.currentTarget||k.target.closest?.("button")||k.target;_.disabled=!0;let z=parseGithubUrl(e.sourceUrl),Z={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(we=>we),source:{gistId:z.gistId},options:e.options,conference:e.conference};gn();let de=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(de,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},we=>{we.data&&(r("ERRORS."+we.data.error).then(Qe=>{e.error=Qe},console.error),vo(we.data.error))}).finally(()=>{_.disabled=!1})},e.anonymizePullRequest=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(Ws())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let _=k.currentTarget||k.target.closest?.("button")||k.target;_.disabled=!0;let z=parseGithubUrl(e.sourceUrl),Z={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(we=>we),source:{repositoryFullName:`${z.owner}/${z.repo}`,pullRequestId:z.pullRequestId},options:e.options,conference:e.conference};gn();let de=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(de,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},we=>{we.data&&(r("ERRORS."+we.data.error).then(Qe=>{e.error=Qe},console.error),vo(we.data.error))}).finally(()=>{_.disabled=!1})},e.watch("conference",()=>{en()}),e.termHints=[],e.matchTermAsWritten=k=>{e.terms=Cc(e.terms,k)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Se()}),e.watch("terms",()=>{e.termHints=kc(e.terms),e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Be(),e.detectedType==="gist"&&Ke()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Be(),e.detectedType==="gist"&&Ke()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Be(),e.detectedType==="gist"&&Ke()}),e.watch("details",()=>{e.detectedType==="pr"&&Be(),e.detectedType==="gist"&&Ke()},!0)},qa=function(e,t,o,i,s,r){let a=Nt();Sc();let u=jt();e.on("dark-mode",(M,U)=>{e.aceOption&&(U?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let p=0,y=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){y&&(y.resolve(),y=null),h&&(a.timeout.cancel(h),h=null)}let m=!1;e.on("dispose",()=>{m=!0,p++,b(),w&&w.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"click",M=>{e.symbolsOpen&&!M.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!M.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!M.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&M.target.isConnected&&!M.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!M.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!M.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),u(document,"keydown",M=>{M.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(M.ctrlKey||M.metaKey)&&!M.altKey&&M.key&&M.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(M.preventDefault(),e.toggleMdFind(!0))}),u(document,"keydown",function(M){if((M.metaKey||M.ctrlKey)&&M.key==="k"){M.preventDefault();var U=document.querySelector(".tree-search-input");U&&(U.focus(),U.select())}});var w=null;e.onFileSearchChange=function(){w&&(w.resolve(),w=null);let M=e.fileSearchQuery;if(!M||M.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let U=r.defer();w=U,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(M)}`,{timeout:U.promise}).then(function(F){if(!(m||w!==U)){w=null,e.fileSearchLoading=!1;var X={};e.files.forEach(function(me){X[(me.path||"")+"/"+me.name]=!0});for(var S=[],E={},P=0;P<F.data.length;P++){var H=F.data[P];if(H.path)for(var B=H.path.split("/"),K="",oe=0;oe<B.length;oe++){var Q=K;K=K?K+"/"+B[oe]:B[oe];var J=Q+"/"+B[oe];!X[J]&&!E[J]&&(E[J]=!0,S.push({name:B[oe],path:Q}))}}S.sort(function(me,Se){return(me.path||"").split("/").length-(Se.path||"").split("/").length}),S.length>0&&e.files.push.apply(e.files,S);for(var G=[],ve=0;ve<F.data.length;ve++){var le=F.data[ve],re=(le.path||"")+"/"+le.name;!X[re]&&le.size!=null&&(G.push(le),X[re]=!0)}G.length>0&&e.files.push.apply(e.files,G),e.fileSearchResults=F.data}},function(){!m&&w===U&&(w=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let A={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},N=["license","txt"],R=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],g=["wav","mp3","ogg","wma","flac","aac","m4a"],C=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(M,U){if(e.repoId!=i.repoId)return pe();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(F=>F&&F.trim().length>0),st();for(let F=0;F<e.paths.length-1;F++){let X=F>0?e.paths.slice(0,F).join("/"):"";e.files.some(E=>E.path===X)||e.getFiles(X)}}});function I(){if(e.paths[0]!="")return;let M=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let X of e.files)X.name.toLowerCase().indexOf("readme")>-1&&(U[X.name.toLowerCase()]=X.name);let F=null;for(let X of M)if(U[X]){F=X;break}if(!F&&Object.keys(U).length>0&&(F=Object.keys(U)[0]),F){let X=o.url();X[X.length-1]!="/"&&(X+="/"),o.url(X+encodePathForUrl(U[F]))}}e.fileCounts=null;let V=0,q=new Set,j=!1;e.getFiles=function(M,U=!1){let F=e.repoId,X=V;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(M)}&v=${e.options.lastUpdateDate}`).then(function(S){if(m||F!==e.repoId||X!==V)return[];let E=M||"";return e.files=e.files.filter(P=>P.path!==E),e.f
Line truncated
|
||||
`).forEach((U,F)=>{for(let[X,S]of Me){let E=X.exec(U);if(E&&!/^(if|for|while|switch|return|catch)$/.test(E[1])){M.push({name:E[1],kind:S,line:F+1});break}}}),ge={content:e.content,list:M.slice(0,300)},ge.list},e.goToSymbol=function(M){e.symbolsOpen=!1;let U=e.codeEditor;U&&(U.scrollToLine(M-1,!0,!0,()=>{}),U.gotoLine(M,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+M),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let M=window.document.getElementById("goto-input");M&&(M.focus(),M.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let M=e.codeEditor;if(!M)return;let U=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),F=M.session.getLength();if(!U||+U[1]<1||+U[1]>F){e.gotoError="Enter a line from 1 to "+F;return}M.gotoLine(+U[1],U[2]?Math.max(0,+U[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",M.focus()},e.rootEntries=function(){return[...e.files||[]].sort((M,U)=>{let F=M.size==null,X=U.size==null;return F!==X?F?-1:1:M.name.localeCompare(U.name)})},e.formatSize=function(M){if(M==null)return"";if(M<1024)return M+" B";let U=M/1024,F=X=>X.toFixed(1).replace(/\.0$/,"");return U<1024?F(U)+" KB":U<1024*1024?F(U/1024)+" MB":F(U/1024/1024)+" GB"},e.fileSize=function(M){if(!M)return null;let U=M.replace(/^\/+/,""),F=(e.files||[]).find(X=>(X.path?X.path+"/":"")+X.name===U);return F&&F.size!=null?F.size:null},e.revealFolder=function(M){e.sidebarHidden=!1,e.sidebarCollapsed=!1,et(()=>{let U=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(M):M)+'"]');U&&(U.closest("li")?.classList.contains("open")||U.click(),U.scrollIntoView({block:"nearest"}),U.focus())})};let ae={content:null,n:0},he=M=>{if(ae.content===M)return ae.n;let U=M;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let F=[],X=E=>{Array.isArray(E)?F.push(E.join("")):typeof E=="string"&&F.push(E)};(U&&(U.cells||(U.worksheets||[]).flatMap(E=>E.cells||[]))||[]).forEach(E=>{X(E?.source??E?.input),(E?.outputs||[]).forEach(P=>{X(P?.text),P?.data&&(X(P.data["text/plain"]),X(P.data["text/markdown"]),X(P.data["text/html"])),X(P?.traceback)})});let S=F.reduce((E,P)=>E+(P.match(go)||[]).length,0);return ae={content:M,n:S},S};e.redactionCount=function(){return e.type==="IPython"?he(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(go)||[]).length},e.renderRedacted=Hi;let Ce=M=>M.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(M){let U=e.renderRedacted(M);if(!U||typeof window.DOMParser!="function")return U;let F=new window.DOMParser().parseFromString("<div>"+U+"</div>","text/html"),X={};return F.querySelectorAll("h1, h2, h3").forEach(S=>{let E=S.id||Ce(S.textContent);X[E]?E+="-"+ ++X[E]:X[E]=1,S.id=E}),F.body.firstChild.innerHTML};let Oe={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(Oe.content===e.content)return Oe.list;let U=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(F=>({id:F.id,text:F.textContent.trim(),level:F.tagName==="H3"?3:2})).slice(0,40);return Oe={content:e.content,list:U},U},e.activeHeading=null,u(window,"scroll",()=>{let M=e.readmeToc?e.readmeToc():[];if(!M.length)return;let U=150,F="",X="";for(let S of M){let E=window.document.getElementById(S.id);if(!E)continue;let P=E.getBoundingClientRect().top;P<U?F=S.id:!X&&P<window.innerHeight-80&&(X=S.id)}X&&(F=X),e.activeHeading!==F&&(e.activeHeading=F)},{capture:!0,passive:!0}),e.scrollToHeading=function(M){if(!M){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let U=window.document.getElementById(M);U&&U.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=M},e.csvView="table";let at={content:null,rows:[]},De=(M,U)=>{let F=[],X=[],S="",E=!1;for(let P=0;P<M.length;P++){let H=M[P];E?H==='"'?M[P+1]==='"'?(S+='"',P++):E=!1:S+=H:H==='"'&&S===""?E=!0:H===U?(X.push(S),S=""):H===`
|
||||
`||H==="\r"?(H==="\r"&&M[P+1]===`
|
||||
`&&P++,X.push(S),F.push(X),X=[],S=""):S+=H}return(S!==""||X.length)&&(X.push(S),F.push(X)),F.filter(P=>P.length>1||P[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(at.content!==e.content){let M=/\.tsv$/i.test(e.filePath||"")?" ":",";at={content:e.content,rows:De(e.content,M)}}return at.rows},e.csvNumCol=M=>{let U=e.csvRows().slice(1).map(F=>F[M]).filter(F=>F!=null&&String(F).trim()!=="");return U.length>0&&U.every(F=>e.csvNumeric(F))},e.csvNumeric=M=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(M)&&/\d/.test(M),e.redactParts=function(M){let U=[],F=0,X,S=/\bXXXX-(\d+)\b/g;for(M=String(M||"");X=S.exec(M);)X.index>F&&U.push({t:M.slice(F,X.index)}),U.push({n:X[1]}),F=X.index+X[0].length;return F<M.length&&U.push({t:M.slice(F)}),U},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 M=e.content;if(e.type==="html"&&e.url)try{M=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(M),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function Ze(M){return A[M]?A[M]:M}function Xe(M){return M=="pdf"?"pdf":M=="html"||M=="htm"?"html-doc":M=="md"?"md":M=="org"?"org":M=="ipynb"?"IPython":N.indexOf(M)>-1?"text":R.indexOf(M)>-1?"image":C.indexOf(M)>-1?"media":g.indexOf(M)>-1?"audio":"code"}function ct(M,U){let F=p;if(!M){e.type="error",e.content="no_file_selected";return}let X=e.type;(X==="code"||X==="text")&&Ys().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let S=r.defer();y=S,h=a.timeout(()=>{!m&&F===p&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let E=U&&U.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(M)}?v=`+E,{timeout:S.promise,onDownloadProgress:P=>{!m&&F===p&&(e.fileReceivedBytes=P)},transformResponse:P=>P}).then(P=>{if(!(m||F!==p)){if(b(),e.type=X,e.content=P.data,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(P.data,o.url()+"/../"),e.type="html"),e.type=="org"){let B=contentAbs2Relative(P.data);var H=new Org.Parser().parse(B).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(H.toString()),e.type="html"}e.type=="code"&&P.headers("content-type")=="application/octet-stream"&&(e.type="binary",e.content="binary"),a.timeout(()=>{Prism.highlightAll()},50)}},P=>{m||F!==p||(b(),e.type="error",e.content=Ma(P))})}function st(){p++,b(),e.content="",e.file=Y();let M="0";e.file&&e.file.sha&&(M=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${M}`;let U=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);e.fileBaseUrl=`/api/repo/${e.repoId}/file/${U?encodePathForUrl(U):""}`,e.showSource=!1,e.imageSize="",e.allowScripts=!1;let F=e.filePath.toLowerCase(),X=F.lastIndexOf(".");X>-1&&(F=F.substring(X+1));let S={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},E=Ze(F);if(e.languageName=S[E]??(E?E.charAt(0).toUpperCase()+E.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:Ze(F),onLoad:function(P){e.codeEditor=Do(P);{let re=P.session,me=re.getTokens.bind(re),Se=/\bXXXX-\d+\b/g;if(re.getTokens=function(Ae){let _e=me(Ae);if(!_e.some(Re=>Re.value.indexOf("XXXX-")!==-1))return _e;let fe=[];for(let Re of _e){if(Re.value.indexOf("XXXX-")===-1){fe.push(Re);continue}let Be=0;Se.lastIndex=0;let We;for(;We=Se.exec(Re.value);)We.index>Be&&fe.push({type:Re.type,value:Re.value.slice(Be,We.index)}),fe.push({type:"redacted.n"+We[0].slice(5),value:We[0]}),Be=We.index+We[0].length;Be<Re.value.length&&fe.push({type:Re.type,value:Re.value.slice(Be)})}return fe},!window.document.getElementById("redact-index-rules")){let Ae=window.document.createElement("style");Ae.id="redact-index-rules",Ae.textContent=Array.from({length:99},(_e,fe)=>`.ace_redacted.ace_n${fe+1}::after{content:"${fe+1}"}`).join(""),window.document.head.appendChild(Ae)}P.renderer.updateFull(!0)}P.session
Line truncated
|
||||
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let u=(e.demoTerms||"").split(/[,\n]/).map(m=>m.trim()).filter(Boolean).sort((m,w)=>w.length-m.length),p=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!u.length)return[{text:e.demoText}];let y=new RegExp("("+u.map(p).join("|")+")","gi"),h={},b=0;return(e.demoText||"").split(y).filter(m=>m!=="").map(m=>{let w=u.find(A=>A.toLowerCase()===m.toLowerCase());return w?(h[w.toLowerCase()]||(h[w.toLowerCase()]=++b),{text:String(h[w.toLowerCase()]),redacted:!0,original:m}):{text:m}})},e.demoCount=()=>e.demoParts().filter(u=>u.redacted).length,e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(u=>!u.total);function r(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests}).catch(()=>{})}r();function a(u){let p={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return p;let y=new Array(u.length-1);for(let S=1;S<u.length;S++)y[S-1]=u[S]-u[S-1];let h=y.length,b=Math.max.apply(null,y),m=Math.min.apply(null,y),w=Math.min(0,m),A=b-w||1;p.viewW=h*2,p.bars=new Array(h);for(let S=0;S<h;S++){let R=(y[S]-w)/A,g=Math.max(1.5,R*34);p.bars[S]={x:(S*2+.25).toFixed(2),y:(36-g).toFixed(2),w:"1.5",h:g.toFixed(2)}}if(p.deltaToday=y[h-1],h>=2){let S=y[h-2];S&&(p.pctChange=(p.deltaToday-S)/S*100)}return p.pctAbs=Math.round(Math.abs(p.pctChange)),p.isUp=p.pctChange>=0,p}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let p=u.data||[];e.history={repositories:a(p.map(y=>y.nbRepositories||0)),users:a(p.map(y=>y.nbUsers||0)),pageViews:a(p.map(y=>y.nbPageViews||0)),pullRequests:a(p.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},Ec=function(e,t,o,i,s,r){let a=Tt();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())},Jt()(document,"click",D=>{e.quotaExpanded&&!D.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=D=>D.status==="error"||D._broken||p(D.status)==="progress"&&D._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=D=>{e.projectView=D,D==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=D=>{let ee=Jr(D?.anonymizeDate||D?.lastView)||"";return/ ago$/.test(ee)?"No activity for "+ee.replace(/ ago$/,""):"No activity since "+ee.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=D=>"project-details-"+encodeURIComponent(D._type+":"+(D._id||D._source||"unknown")),e.showProjectDetails=async D=>{e.selectedProject=D,e.projectName=D.projectName||"",e.nameError="",e.nameMessage="",await Je();let ee=document.getElementById(e.projectDetailsId(D));ee?.focus(),ee?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=D=>{e.selectedProject=null,Je(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(D._type+":"+D._id)}"]`)?.focus())},e.saveProjectName=async D=>{if(e.nameSaving||!D._id)return;let ee=e.projectName.trim();if(ee.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let ce=await t.post("/api/user/project-name",{type:D._type,id:D._id,name:ee});D.projectName=ce.data.name,D._label=D.projectName||D._fallbackLabel,e.selectedProject===D&&(e.nameMessage=ee?"Project name saved.":"Default project name restored."),C||(e.dashboardCursor=null,await V(),e.selectedProject===D&&(e.selectedProject=e.items.find(Oe=>Oe._type===D._type&&Oe._id===D._id)||null))}catch{e.selectedProject===D&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async D=>{if(!D._viewUrl||e.copyingId)return;let ee=new URL(D._viewUrl,s.location.origin).href;e.copyingId=D._type+":"+D._id;try{await Da(ee),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:ee})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let u=["queue","download","downloaded","preparing","anon
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,z.options),e.options.expirationDate=z.options&&z.options.expirationDate?new Date(z.options.expirationDate):te(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function ie(k,_,z){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(_,z)}function be(k){try{let _=parseGithubUrl(k);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"||be(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=m();try{let _=await t.get("/github/connections");if(e.githubConnections=_.data,!_.data.appEnabled)return;let z=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":_.data.csrf}});if(!b(k))return;e.error=null,z.data.fullName&&(e._originalFullName=z.data.fullName,e.source.fullName=z.data.fullName,e.sourceUrl="https://github.com/"+z.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(k)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,w(k)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await it()}catch{}}};function Ae(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:be(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ze(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function nt(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){R.restore();try{let z=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(z.path!==s.path())throw new Error("Wrong task");g=z.values.conference||null;for(let Z of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(z.values,Z)&&(e[Z]=z.values[Z]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),C=z.id,I=JSON.stringify(R.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ze(),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 R.restore()?(e.sourceUrl&&await Ze(),!0):!1;R.restore();for(let z of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(_.draft,z)&&(e[z]=_.draft[z]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ze(),sessionStorage.removeItem("github-access-draft"),!0}de(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(nt,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async k=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(k.data.status),e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.fullName,e._originalFullName=k.data.source.fullName,e.terms=k.data.options.terms.filter(_=>_).join(`
|
||||
`),e.source=k.data.source,e.role=k.data.role||"owner",e._existingNever=k.data.options.expirationMode==="never",e._savedExpirationDate=k.data.options.expirationDate?new Date(k.data.options.expirationDate):null,e.coauthors=k.data.coauthors||[],e._originalBranch=k.data.source.branch,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,e.repositoryID=k.data.source.repositoryID,e._originalRepositoryID=k.data.source.repositoryID,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),A=S(parseGithubUrl(e.sourceUrl)),!await nt()&&(await Promise.all([it(),Ye()]),ae())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async k=>{if(e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.repositoryFullName+"/pull/"+k.data.source.pullRequestId,e.terms=k.data.options.terms.filter(_=>_).join(`
|
||||
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),A=S(parseGithubUrl(e.sourceUrl)),!await nt())try{await le()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(_=>_).join(`
|
||||
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),A=S(parseGithubUrl(e.sourceUrl)),!await nt()&&await Me()},()=>{s.url("/404")}))}),t.get("/github/connections").then(k=>{e.githubConnections=k.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&k.data.appEnabled&&k.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ze())}).catch(()=>{}),e.urlSelected=async(k=!1)=>{let _=++p;e.previousConfigurations=[],e.previousConfigurationId="";let z;try{z=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,ge.cancel(),Re.cancel(),Fe.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",ie("sourceUrl","github",!1);return}let Z=S(z),pe=k||A===Z;A=Z,e.sourceUrlError="",ie("sourceUrl","github",!0);let we=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Be=window.document.getElementById("sourceUrl");if(Be){try{Be.setSelectionRange(0,0)}catch{}Be.scrollLeft=0}},50),we&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!pe&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],pe||(e.source={type:"GitHubStream",branch:"",commit:""}),ge.cancel(),Re.cancel(),Fe.cancel(),fe.clear(),he.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=pe;try{z.gistId&&!z.repo?(e.detectedType="gist",e.source={gistId:z.gistId},await Me()):z.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:z.owner+"/"+z.repo,pullRequestId:z.pullRequestId},await le()):(e.detectedType="repo",ee(),await Promise.all([it(),Ye()]),ae())}catch{}finally{_===p&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let k=e.branches.filter(z=>z.name==e.source.branch)[0];if(!k)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=k.commit),e.readme=k.readme,await Ye(),ae()}),e.getBranches=async k=>{let _=parseGithubUrl(e.sourceUrl),z=m();try{let Z=await t.get(`/api/repo/${_.owner}/${_.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&be(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:Ae()}});if(!b(z))return;e.branches=Z.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let pe=e.branches.filter(we=>we.name==e.source.branch);pe.length>0&&(!(!e.reconnectingSource&&!k&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=pe[0].commit),e.readme=pe[0].readme,await Ye(k))}catch(Z){if(!b(z))return;e.branches=[],e.sourceUnreachable=Z&&(Z.status===404||Z.data&&Z.data.error==="repo_not_found");let pe=Z&&Z.data&&Z.data.error||(Z&&Z.status===404?"repo_not_found":"unknown_error");r("ERRORS."+pe).then(we=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:we}),e.error=we},console.error),typeof ie=="function"&&ie("sourceUrl","missing",!1)}finally{w(z)}};async function it(){let k=parseGithubUrl(e.sourceUrl),_=m();try{ft();let z=await t.get(`/api/repo/${k.owner}/${k.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&be(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ae(),force:"1"}});if(!b(_))return;e.details=z.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(z){if(!b(_))return;throw z.data&&(r("ERRORS."+z.data.error).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),tt(z.data.error)),ie("sourceUrl","missing",!1),z}finally{w(_)}}async function Ye(k){if(e.readme&&!k)return e.readme;let _=parseGithubUrl(e.sourceUrl),z=m();try{let Z=await t.get(`/api/repo/${_.owner}/${_.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&be(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:Ae()}});b(z,!0)&&(e.readme=Z.data)}catch{b(z,!0)&&(e.readme="")}finally{w(z)}}let lt={magicalBraces:!0},ct=k=>k.startsWith("/")&&!k.endsWith("/")&&qn(co(k.slice(1),lt),lt)===k.slice(1),bt=()=>Object.keys(e.preserve.picked).filter(
Line truncated
|
||||
`).map(k=>k.trim()).filter(Boolean),U=null,F=0,W=null,E=()=>!1;function N(){let k=F+"\0"+e.preserve.patterns;if(k!==W){W=k;try{E=Sa(Ea([...bt(),...M()]))}catch{E=()=>!1}}return E}function O(k){let _=new Map([["",{dirs:[],files:[]}]]);for(let z of k){let Z=z.split("/"),pe="";for(let we=0;we<Z.length-1;we++){let Be=Z.slice(0,we+1).join("/");_.has(Be)||(_.set(Be,{dirs:[],files:[]}),_.get(pe).dirs.push(Be)),pe=Be}_.get(pe).files.push(z)}for(let z of _.values())z.dirs.sort();return{files:k,dirs:_,descendants:new Map}}function H(k){return U.descendants.has(k)||U.descendants.set(k,U.files.filter(_=>_.startsWith(k+"/"))),U.descendants.get(k)}let B=k=>N()(k);function K(k){let _=H(k),z=0;for(let Z of _)B(Z)&&z++;return z===0?"none":z===_.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let k=(e.options?.preserveFiles||[]).map(_=>String(_).trim()).filter(Boolean).map(_=>ct(_)?co(_.slice(1),lt):_);return k.length?k.slice(0,2).join(", ")+(k.length>2?` and ${k.length-2} more`:""):"None. Every file is redacted."};async function ne(){let k=e.source?.commit;if(!(U&&e.preserve.commit===k)){e.preserve.loading=!0,e.preserve.error="",U=null;try{let _=parseGithubUrl(e.sourceUrl),z=await t.get(`/api/repo/${_.owner}/${_.repo}/tree`,{params:{commit:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&be(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ae()}});if(e.source?.commit!==k)return;U=Eo(O(z.data.files||[])),e.preserve.commit=k,e.preserve.truncated=!!z.data.truncated,e.previewTreeOpen={},ke()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",k=>{e.detectedType==="repo"&&k&&e.sourceUrl&&ne().catch(()=>{})}),e.openPreserveFiles=()=>{let k={},_=[];for(let Z of e.options?.preserveFiles||[]){let pe=String(Z).trim();pe&&(!_.length&&ct(pe)?k[co(pe.slice(1),lt)]=!0:_.push(pe))}let z={};for(let Z of Object.keys(k)){let pe=Z.split("/");for(let we=1;we<pe.length;we++)z[pe.slice(0,we).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:k,expanded:z,patterns:_.join(`
|
||||
`),patternsOpen:_.length>0}),F++,a(()=>{let Z=document.getElementById("preserve-files-dialog");Z?.showModal&&!Z.open&&Z.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ne()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ea([...bt(),...M()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!U)return[];let k=N(),_=(we,Be,kt)=>{let ht=!!e.preserve.picked[we],Bn=k(we);return{kind:"file",path:we,label:kt,depth:Be,state:Bn?"all":"none",locked:!ht&&Bn,note:!ht&&Bn?"matched by a pattern":ht&&!Bn?"excluded by a pattern":""}},z=String(e.preserve.search||"").trim().toLowerCase();if(z)return U.files.filter(we=>we.toLowerCase().includes(z)).slice(0,300).map(we=>_(we,0,we));let Z=[],pe=(we,Be)=>{let kt=U.dirs.get(we);for(let ht of kt.dirs){let Bn=!!e.preserve.expanded[ht],Oa=M().includes(X(ht));Z.push({kind:"dir",path:ht,label:ht.slice(we?we.length+1:0)+"/",depth:Be,open:Bn,state:K(ht),locked:!1,note:Oa?"whole folder":""}),Bn&&pe(ht,Be+1)}for(let ht of kt.files)Z.push(_(ht,Be,ht.slice(we?we.length+1:0)))};return pe("",0),Z},e.preserveCount=()=>U?U.files.filter(B).length:0,e.togglePreserveDir=k=>{e.preserve.expanded[k]=!e.preserve.expanded[k]},e.togglePreserveFile=k=>{e.preserve.picked[k]=!e.preserve.picked[k],F++},e.togglePreserveFolder=k=>{let _=X(k),z=me(k),Z=M().filter(we=>we!==_&&we!==z),pe=K(k)==="all"||M().includes(_);for(let we of H(k))e.preserve.picked[we]=!1;F++,e.preserve.patterns=(pe?Z:[...Z,_]).join(`
|
||||
`),pe&&H(k).some(B)&&(e.preserve.patterns=[...Z,z].join(`
|
||||
`))};let Q=[".github","","docs"].flatMap(k=>["README.md","README","README.markdown","README.rst","README.txt","readme.md"].map(_=>(k?k+"/":"")+_));e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let k=(e.options?.preserveFiles||[]).map(_=>String(_).trim()).filter(Boolean);if(!k.length)return!1;try{let _=Sa(k);return Q.some(z=>_(z))}catch{return!1}};function J(){let k={terms:e.terms&&!e.readmePreserved()?e.terms.split(`
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let _=parseGithubUrl(e.sourceUrl);k.repoName=`${_.owner}/${_.repo}`}catch{}return k}function G(k,_,z){let Z=null,pe=0,we=()=>{if(e.detectedType!==k)return;Z&&a.cancel(Z);let Be=++pe;e.previewStatus="loading",Z=a(()=>{Z=null;let kt=_();if(!kt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",kt).then(ht=>{Be===pe&&(z(ht.data,kt),e.previewStatus="ready")}).catch(()=>{Be===pe&&(e.previewStatus="error")})},200)};return we.cancel=()=>{pe++,Z&&a.cancel(Z),Z=null},e.on("dispose",we.cancel),we}e.retryPreview=()=>{e.detectedType==="repo"&&ge(),e.detectedType==="pr"&&Re(),e.detectedType==="gist"&&Fe()};let ge=G("repo",()=>e.readme?{content:e.readme,options:J()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=k.content;let _="";try{let Z=parseGithubUrl(e.sourceUrl),pe=e.source.branch||e.details&&e.details.defaultBranch||"main";_=`https://github.com/${Z.owner}/${Z.repo}/raw/${pe}/`}catch{}let z=renderMD(e.anonymize_readme,_);e.html_readme=z,a(()=>{Prism.highlightAll(),typeof Es=="function"&&document.querySelectorAll(".reviewer-preview .anonymize-preview-body").forEach(Es)},150)});function ae(){!e.anonymize||!e.anonymize.terms||ge()}async function le(){let k=parseGithubUrl(e.sourceUrl),_=m();try{ft();let z=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(_))return;e.details=z.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(z){if(!b(_))return;throw z.data&&(r("ERRORS."+z.data.error).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),tt(z.data.error)),ie("sourceUrl","missing",!1),z}finally{w(_)}}let fe=st(new Map);function De(){let k=new Set,_=e.details&&e.details.pullRequest;if(!_)return k;typeof _.title=="string"&&k.add(_.title),typeof _.body=="string"&&k.add(_.body),typeof _.diff=="string"&&k.add(_.diff);let z=_.comments||[];for(let Z of z)typeof Z.author=="string"&&k.add(Z.author),typeof Z.body=="string"&&k.add(Z.body);return k}let Re=G("pr",()=>{let k=De(),_=Array.from(k);return _.length===0?null:{contents:_,options:J()}},(k,_)=>{if(!Array.isArray(k?.contents)||k.contents.length!==_.contents.length||k.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let z=_.contents,Z=new Map;for(let pe=0;pe<z.length&&pe<k.contents.length;pe++)Z.set(z[pe],k.contents[pe]);fe.clear(),Z.forEach((pe,we)=>fe.set(we,pe))});e.anonymizePrContent=function(k){return k&&(fe.has(k)?fe.get(k):"")};async function Me(){let k=parseGithubUrl(e.sourceUrl),_=m();try{ft(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let z=await t.get(`/api/gist/source/${k.gistId}`);if(!b(_))return;e.details=z.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(z){if(!b(_))return;if(z.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,ie("sourceUrl","missing",!1);return}if(z.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,ie("sourceUrl","missing",!1);return}throw z.data&&(r("ERRORS."+z.data.error).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),tt(z.data.error)),ie("sourceUrl","missing",!1),z}finally{w(_)}}let he=st(new Map);function Ne(){let k=new Set,_=e.details&&e.details.gist;if(!_)return k;typeof _.description=="string"&&k.add(_.description),typeof _.ownerLogin=="string"&&k.add(_.ownerLogin);let z=_.files||[];for(let pe of z)typeof pe.filename=="string"&&k.add(pe.filename),typeof pe.content=="string"&&k.add(pe.content);let Z=_.comments||[];for(let pe of Z)typeof pe.author=="string"&&k.add(pe.author),typeof pe.body=="string"&&k.add(pe.body);return k}let Fe=G("gist",()=>{let k=Ne(),_=Array.from(k);return _.length===0?null:{contents:_,options:J()}},(k,_)=>{if(!Array.isArray(k?.contents)||k.contents.length!==_.contents.length||k.contents.some(pe=>typeof pe!="string"))throw Error("Invalid preview response");let z=_.contents,Z=new Map;for(let pe=0;pe<z.length&&pe<k.contents.length;pe++)Z.set(z[pe],k.contents[pe]);he.clear(),Z.forEach((pe,we)=>he.set(we,pe)),Ge()});e.anonymizeGistContent=function(k){return k&&(he.has(k)?he.get(k):"")},e.previewGistFiles=[];function Ge(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(_=>({filename:e.anonymizeGistContent(_.filename),content:e.anonymizeGistContent(_.content),language:_.language}))}e.watch("details.gist.files",Ge,!0),e.watch("terms",Ge);function Pt(){let k=e.conference;if(e.conference_data=null,!k)return;let _=k===g||e.isUpdate&&k===e._originalConference;k!==g&&(g=null),t.get("/api/conferences/"+k).then(z=>{e.conference===k&&(e.conference_data=z.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_
Line truncated
|
||||
`).filter(we=>we),connection:e.githubConnection,fullName:`${z.owner}/${z.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(Z.options.pageSource=e.details.pageSource),ft();let pe=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(pe,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},we=>{if(we.data){let Be=["quota_exceeded","subscription_required_for_never_expiration"].includes(we.data.error);Be||r("ERRORS."+we.data.error).then(kt=>{e.error=kt},console.error),tt(we.data.error),Be&&(we.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=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(xe())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let _=k.currentTarget||k.target.closest?.("button")||k.target;_.disabled=!0;let z=parseGithubUrl(e.sourceUrl),Z={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(we=>we),source:{gistId:z.gistId},options:e.options,conference:e.conference};ft();let pe=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(pe,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},we=>{we.data&&(r("ERRORS."+we.data.error).then(Be=>{e.error=Be},console.error),tt(we.data.error))}).finally(()=>{_.disabled=!1})},e.anonymizePullRequest=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(xe())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let _=k.currentTarget||k.target.closest?.("button")||k.target;_.disabled=!0;let z=parseGithubUrl(e.sourceUrl),Z={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(we=>we),source:{repositoryFullName:`${z.owner}/${z.repo}`,pullRequestId:z.pullRequestId},options:e.options,conference:e.conference};ft();let pe=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(pe,Z,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},we=>{we.data&&(r("ERRORS."+we.data.error).then(Be=>{e.error=Be},console.error),tt(we.data.error))}).finally(()=>{_.disabled=!1})},e.watch("conference",()=>{Pt()}),e.termHints=[],e.matchTermAsWritten=k=>{e.terms=hc(e.terms,k)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&ge()}),e.watch("terms",()=>{e.termHints=fc(e.terms),e.detectedType==="repo"&&ae(),e.detectedType==="pr"&&Re(),e.detectedType==="gist"&&Fe()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ae(),e.detectedType==="pr"&&Re(),e.detectedType==="gist"&&Fe()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ae(),e.detectedType==="pr"&&Re(),e.detectedType==="gist"&&Fe()}),e.watch("details",()=>{e.detectedType==="pr"&&Re(),e.detectedType==="gist"&&Fe()},!0)},Aa=function(e,t,o,i,s,r){let a=Tt();gc();let u=Jt();e.on("dark-mode",(M,U)=>{e.aceOption&&(U?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let p=0,y=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){y&&(y.resolve(),y=null),h&&(a.timeout.cancel(h),h=null)}let m=!1;e.on("dispose",()=>{m=!0,p++,b(),w&&w.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"click",M=>{e.symbolsOpen&&!M.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!M.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!M.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&M.target.isConnected&&!M.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!M.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!M.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),u(document,"keydown",M=>{M.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(M.ctrlKey||M.metaKey)&&!M.altKey&&M.key&&M.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(M.preventDefault(),e.toggleMdFind(!0))}),u(document,"keydown",function(M){if((M.metaKey||M.ctrlKey)&&M.key==="k"){M.preventDefault();var U=document.querySelector(".tree-search-input");U&&(U.focus(),U.select())}});var w=null;e.onFileSearchChange=function(){w&&(w.resolve(),w=null);let M=e.fileSearchQuery;if(!M||M.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let U=r.defer();w=U,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(M)}`,{timeout:U.promise}).then(function(F){if(!(m||w!==U)){w=null,e.fileSearchLoading=!1;var W={};e.files.forEach(function(fe){W[(fe.path||"")+"/"+fe.name]=!0});for(var E=[],N={},O=0;O<F.data.length;O++){var H=F.data[O];if(H.path)for(var B=H.path.split("/"),K="",ne=0;ne<B.length;ne++){var Q=K;K=K?K+"/"+B[ne]:B[ne];var J=Q+"/"+B[ne];!W[J]&&!N[J]&&(N[J]=!0,E.push({name:B[ne],path:Q}))}}E.sort(function(fe,De){return(fe.path||"").split("/").length-(De.path||"").split("/").length}),E.length>0&&e.files.push.apply(e.files,E);for(var G=[],ge=0;ge<F.data.length;ge++){var ae=F.data[ge],le=(ae.path||"")+"/"+ae.name;!W[le]&&ae.size!=null&&(G.push(ae),W[le]=!0)}G.length>0&&e.files.push.apply(e.files,G),e.fileSearchResults=F.data}},function(){!m&&w===U&&(w=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let A={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},S=["license","txt"],R=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],g=["wav","mp3","ogg","wma","flac","aac","m4a"],C=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(M,U){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(F=>F&&F.trim().length>0),ct();for(let F=0;F<e.paths.length-1;F++){let W=F>0?e.paths.slice(0,F).join("/"):"";e.files.some(N=>N.path===W)||e.getFiles(W)}}});function I(){if(e.paths[0]!="")return;let M=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let W of e.files)W.name.toLowerCase().indexOf("readme")>-1&&(U[W.name.toLowerCase()]=W.name);let F=null;for(let W of M)if(U[W]){F=W;break}if(!F&&Object.keys(U).length>0&&(F=Object.keys(U)[0]),F){let W=o.url();W[W.length-1]!="/"&&(W+="/"),o.url(W+encodePathForUrl(U[F]))}}e.fileCounts=null;let V=0,q=new Set,j=!1;e.getFiles=function(M,U=!1){let F=e.repoId,W=V;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(M)}&v=${e.options.lastUpdateDate}`).then(function(E){if(m||F!==e.repoId||W!==V)return[];let N=M||"";return e.files=e.files.filter(O=>O.path!==N),e.f
Line truncated
|
||||
`).forEach((U,F)=>{for(let[W,E]of Oe){let N=W.exec(U);if(N&&!/^(if|for|while|switch|return|catch)$/.test(N[1])){M.push({name:N[1],kind:E,line:F+1});break}}}),ke={content:e.content,list:M.slice(0,300)},ke.list},e.goToSymbol=function(M){e.symbolsOpen=!1;let U=e.codeEditor;U&&(U.scrollToLine(M-1,!0,!0,()=>{}),U.gotoLine(M,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+M),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let M=window.document.getElementById("goto-input");M&&(M.focus(),M.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let M=e.codeEditor;if(!M)return;let U=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),F=M.session.getLength();if(!U||+U[1]<1||+U[1]>F){e.gotoError="Enter a line from 1 to "+F;return}M.gotoLine(+U[1],U[2]?Math.max(0,+U[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",M.focus()},e.rootEntries=function(){return[...e.files||[]].sort((M,U)=>{let F=M.size==null,W=U.size==null;return F!==W?F?-1:1:M.name.localeCompare(U.name)})},e.formatSize=function(M){if(M==null)return"";if(M<1024)return M+" B";let U=M/1024,F=W=>W.toFixed(1).replace(/\.0$/,"");return U<1024?F(U)+" KB":U<1024*1024?F(U/1024)+" MB":F(U/1024/1024)+" GB"},e.fileSize=function(M){if(!M)return null;let U=M.replace(/^\/+/,""),F=(e.files||[]).find(W=>(W.path?W.path+"/":"")+W.name===U);return F&&F.size!=null?F.size:null},e.revealFolder=function(M){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Je(()=>{let U=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(M):M)+'"]');U&&(U.closest("li")?.classList.contains("open")||U.click(),U.scrollIntoView({block:"nearest"}),U.focus())})};let de={content:null,n:0},ie=M=>{if(de.content===M)return de.n;let U=M;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let F=[],W=N=>{Array.isArray(N)?F.push(N.join("")):typeof N=="string"&&F.push(N)};(U&&(U.cells||(U.worksheets||[]).flatMap(N=>N.cells||[]))||[]).forEach(N=>{W(N?.source??N?.input),(N?.outputs||[]).forEach(O=>{W(O?.text),O?.data&&(W(O.data["text/plain"]),W(O.data["text/markdown"]),W(O.data["text/html"])),W(O?.traceback)})});let E=F.reduce((N,O)=>N+(O.match(ho)||[]).length,0);return de={content:M,n:E},E};e.redactionCount=function(){return e.type==="IPython"?ie(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(ho)||[]).length},e.renderRedacted=Vi;let be=M=>M.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(M){let U=e.renderRedacted(M);if(!U||typeof window.DOMParser!="function")return U;let F=new window.DOMParser().parseFromString("<div>"+U+"</div>","text/html"),W={};return F.querySelectorAll("h1, h2, h3").forEach(E=>{let N=E.id||be(E.textContent);W[N]?N+="-"+ ++W[N]:W[N]=1,E.id=N}),F.body.firstChild.innerHTML};let Ae={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(Ae.content===e.content)return Ae.list;let U=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(F=>({id:F.id,text:F.textContent.trim(),level:F.tagName==="H3"?3:2})).slice(0,40);return Ae={content:e.content,list:U},U},e.activeHeading=null,u(window,"scroll",()=>{let M=e.readmeToc?e.readmeToc():[];if(!M.length)return;let U=150,F="",W="";for(let E of M){let N=window.document.getElementById(E.id);if(!N)continue;let O=N.getBoundingClientRect().top;O<U?F=E.id:!W&&O<window.innerHeight-80&&(W=E.id)}W&&(F=W),e.activeHeading!==F&&(e.activeHeading=F)},{capture:!0,passive:!0}),e.scrollToHeading=function(M){if(!M){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let U=window.document.getElementById(M);U&&U.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=M},e.csvView="table";let Ze={content:null,rows:[]},nt=(M,U)=>{let F=[],W=[],E="",N=!1;for(let O=0;O<M.length;O++){let H=M[O];N?H==='"'?M[O+1]==='"'?(E+='"',O++):N=!1:E+=H:H==='"'&&E===""?N=!0:H===U?(W.push(E),E=""):H===`
|
||||
`||H==="\r"?(H==="\r"&&M[O+1]===`
|
||||
`&&O++,W.push(E),F.push(W),W=[],E=""):E+=H}return(E!==""||W.length)&&(W.push(E),F.push(W)),F.filter(O=>O.length>1||O[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(Ze.content!==e.content){let M=/\.tsv$/i.test(e.filePath||"")?" ":",";Ze={content:e.content,rows:nt(e.content,M)}}return Ze.rows},e.csvNumCol=M=>{let U=e.csvRows().slice(1).map(F=>F[M]).filter(F=>F!=null&&String(F).trim()!=="");return U.length>0&&U.every(F=>e.csvNumeric(F))},e.csvNumeric=M=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(M)&&/\d/.test(M),e.redactParts=function(M){let U=[],F=0,W,E=/\bXXXX-(\d+)\b/g;for(M=String(M||"");W=E.exec(M);)W.index>F&&U.push({t:M.slice(F,W.index)}),U.push({n:W[1]}),F=W.index+W[0].length;return F<M.length&&U.push({t:M.slice(F)}),U},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 M=e.content;if(e.type==="html"&&e.url)try{M=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(M),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function it(M){return A[M]?A[M]:M}function Ye(M){return M=="pdf"?"pdf":M=="html"||M=="htm"?"html-doc":M=="md"?"md":M=="org"?"org":M=="ipynb"?"IPython":S.indexOf(M)>-1?"text":R.indexOf(M)>-1?"image":C.indexOf(M)>-1?"media":g.indexOf(M)>-1?"audio":"code"}function lt(M,U){let F=p;if(!M){e.type="error",e.content="no_file_selected";return}let W=e.type;(W==="code"||W==="text")&&Fs().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let E=r.defer();y=E,h=a.timeout(()=>{!m&&F===p&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let N=U&&U.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(M)}?v=`+N,{timeout:E.promise,onDownloadProgress:O=>{!m&&F===p&&(e.fileReceivedBytes=O)},transformResponse:O=>O}).then(O=>{if(!(m||F!==p)){if(b(),e.type=W,e.content=O.data,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(O.data,o.url()+"/../"),e.type="html"),e.type=="org"){let B=contentAbs2Relative(O.data);var H=new Org.Parser().parse(B).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(H.toString()),e.type="html"}e.type=="code"&&O.headers("content-type")=="application/octet-stream"&&(e.type="binary",e.content="binary"),a.timeout(()=>{Prism.highlightAll()},50)}},O=>{m||F!==p||(b(),e.type="error",e.content=Ra(O))})}function ct(){p++,b(),e.content="",e.file=Y();let M="0";e.file&&e.file.sha&&(M=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${M}`;let U=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);e.fileBaseUrl=`/api/repo/${e.repoId}/file/${U?encodePathForUrl(U):""}`,e.showSource=!1,e.imageSize="",e.allowScripts=!1;let F=e.filePath.toLowerCase(),W=F.lastIndexOf(".");W>-1&&(F=F.substring(W+1));let E={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},N=it(F);if(e.languageName=E[N]??(N?N.charAt(0).toUpperCase()+N.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:it(F),onLoad:function(O){e.codeEditor=Eo(O);{let le=O.session,fe=le.getTokens.bind(le),De=/\bXXXX-\d+\b/g;if(le.getTokens=function(Re){let Me=fe(Re);if(!Me.some(Ne=>Ne.value.indexOf("XXXX-")!==-1))return Me;let he=[];for(let Ne of Me){if(Ne.value.indexOf("XXXX-")===-1){he.push(Ne);continue}let Fe=0;De.lastIndex=0;let Ge;for(;Ge=De.exec(Ne.value);)Ge.index>Fe&&he.push({type:Ne.type,value:Ne.value.slice(Fe,Ge.index)}),he.push({type:"redacted.n"+Ge[0].slice(5),value:Ge[0]}),Fe=Ge.index+Ge[0].length;Fe<Ne.value.length&&he.push({type:Ne.type,value:Ne.value.slice(Fe)})}return he},!window.document.getElementById("redact-index-rules")){let Re=window.document.createElement("style");Re.id="redact-index-rules",Re.textContent=Array.from({length:99},(Me,he)=>`.ace_redacted.ace_n${he+1}::after{content:"${he+1}"}`).join(""),window.document.head.appendChild(Re)}O.renderer.updateFull(!0)}O.session
Line truncated
|
||||
`).length+1)),placeholder:`Jane Smith
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},null,10,hP),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[119]||(t[119]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",mP,[t[114]||(t[114]=n("summary",null,"Regex & replacement syntax",-1)),t[115]||(t[115]=v()),n("small",gP,[t[108]||(t[108]=v("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[109]||(t[109]=v(", or use ",-1)),t[110]||(t[110]=n("code",null,"term=>replacement",-1)),t[111]||(t[111]=v(" to pick your own (e.g. ",-1)),t[112]||(t[112]=n("code",null,"Anonymous=>ABC",-1)),t[113]||(t[113]=v(").",-1))])]),(l(!0),d(L,null,se((e.termHints||[]).slice(0,3),a=>(l(),d("div",{class:"term-hint",key:a.line},[n("span",null,[t[116]||(t[116]=v("In ",-1)),n("code",null,c(a.term),1),t[117]||(t[117]=v(", ",-1)),n("code",null,c(a.symbols.join(" ")),1),v(" "+c(a.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:u=>e.matchTermAsWritten(a.line)},"Match as written",8,vP)]))),128)),(e.termHints||[]).length>3?(l(),d("div",yP,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),O(n("div",bP,"Terms are in an invalid format.",512),[[x,e.anonymize?.terms?.errors?.format]])]),O(n("div",wP,[n("div",kP,[t[120]||(t[120]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",CP,c(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[22]||(t[22]=a=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,EP)],512),[[x,e.detectedType==="repo"]]),e.preserve?.open?(l(),d("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=ue(a=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=ue(a=>e.savePreserveFiles(),["prevent"]))},[t[124]||(t[124]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[125]||(t[125]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),O(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=a=>e.preserve.search=a)},null,512),[[ut,e.preserve.search]]),n("div",SP,[e.preserve.loading?(l(),d("p",NP,"Loading files from GitHub\u2026")):e.preserve.error?(l(),d("p",RP,c(e.preserve.error),1)):(l(),d(L,{key:2},[(l(!0),d(L,null,se(e.preserveRows(),(a,u)=>(l(),d("div",{class:"preserve-item",key:a.kind+":"+a.path,style:Le({paddingLeft:a.depth*18+6+"px"})},[a.kind==="dir"?(l(),d("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":a.open?"true":"false","aria-label":(a.open?"Collapse ":"Expand ")+a.label,onClick:p=>e.togglePreserveDir(a.path)},c(a.open?"\u25BE":"\u25B8"),9,DP)):(l(),d("span",AP)),n("input",{type:"checkbox",id:"pf-"+u,"aria-label":a.kind==="dir"?"Leave folder "+a.path+" unredacted":null,checked:a.state==="all",".indeterminate":a.state==="some",disabled:a.locked,onChange:p=>a.kind==="dir"?e.togglePreserveFolder(a.path):e.togglePreserveFile(a.path)},null,40,TP),n("label",{for:a.kind==="file"?"pf-"+u:null,class:"preserve-name",onClick:p=>a.kind==="dir"&&e.togglePreserveDir(a.path)},c(a.label),9,PP),a.note?(l(),d("span",OP,c(a.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(l(),d("p",IP,c(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(l(),d("p",_P,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[121]||(t[121]=n("summary",null,"Patterns",-1)),O(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
|
||||
paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=a=>e.preserve.patterns=a)},null,512),[[ut,e.preserve.patterns]]),t[122]||(t[122]=n("small",{class:"form-text text-muted"},[v("One per line, as in .gitignore: "),n("code",null,"*.bib"),v(" matches in any folder; "),n("code",null,"/refs.bib"),v(" and "),n("code",null,"paper/refs.bib"),v(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),v(" covers everything inside it; "),n("code",null,"!private.bib"),v(" excludes again.")],-1))],8,MP),n("div",VP,[n("span",qP,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",$P,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=a=>e.closePreserveFiles())},"Cancel"),t[123]||(t[123]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[x,e.detectedType]]),O(n("section",LP,[t[146]||(t[146]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),O(n("div",null,[n("div",UP,[O(n("input",FP,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[127]||(t[127]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",BP,[O(n("input",zP,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[128]||(t[128]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",HP,[O(n("input",jP,null,512),[[s,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[129]||(t[129]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",GP,[O(n("input",WP,null,512),[[s,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[130]||(t[130]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",KP,[O(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,YP),[[s,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[131]||(t[131]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(l(),d("small",XP,c(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",QP,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[x,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(l(),d("p",JP,[...t[132]||(t[132]=[v("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),O(n("div",null,[n("div",ZP,[O(n("input",xP,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[133]||(t[133]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",e3,[O(n("input",t3,null,512),[[s,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",n3,[O(n("input",o3,null,512),[[s,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",s3,[O(n("input",i3,null,512),[[s,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",r3,[O(n("input",a3,null,512),[[s,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",l3,[O(n("input",d3,null,512),[[s,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[x,e.detectedType==="gist"]]),O(n("div",null,[n("div",u3,[O(n("input",c3,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",p3,[O(n("input",f3,null,512),[[s,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",h3,[O(n("in
Line truncated
|
||||
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),v("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),v("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("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"),v(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),v("Self"),n("span",{class:"serif-hy"},"-"),v("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{cla
Line truncated
|
||||
jane.smith@example.org`},null,10,sP),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[119]||(t[119]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",iP,[t[114]||(t[114]=n("summary",null,"Regex & replacement syntax",-1)),t[115]||(t[115]=v()),n("small",rP,[t[108]||(t[108]=v("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[109]||(t[109]=v(", or use ",-1)),t[110]||(t[110]=n("code",null,"term=>replacement",-1)),t[111]||(t[111]=v(" to pick your own (e.g. ",-1)),t[112]||(t[112]=n("code",null,"Anonymous=>ABC",-1)),t[113]||(t[113]=v(").",-1))])]),(l(!0),d(L,null,se((e.termHints||[]).slice(0,3),a=>(l(),d("div",{class:"term-hint",key:a.line},[n("span",null,[t[116]||(t[116]=v("In ",-1)),n("code",null,c(a.term),1),t[117]||(t[117]=v(", ",-1)),n("code",null,c(a.symbols.join(" ")),1),v(" "+c(a.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:u=>e.matchTermAsWritten(a.line)},"Match as written",8,aP)]))),128)),(e.termHints||[]).length>3?(l(),d("div",lP,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),P(n("div",dP,"Terms are in an invalid format.",512),[[x,e.anonymize?.terms?.errors?.format]])]),P(n("div",uP,[n("div",cP,[t[120]||(t[120]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",pP,c(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[22]||(t[22]=a=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,fP)],512),[[x,e.detectedType==="repo"]]),e.preserve?.open?(l(),d("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=ue(a=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=ue(a=>e.savePreserveFiles(),["prevent"]))},[t[124]||(t[124]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[125]||(t[125]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),P(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=a=>e.preserve.search=a)},null,512),[[ut,e.preserve.search]]),n("div",hP,[e.preserve.loading?(l(),d("p",mP,"Loading files from GitHub\u2026")):e.preserve.error?(l(),d("p",gP,c(e.preserve.error),1)):(l(),d(L,{key:2},[(l(!0),d(L,null,se(e.preserveRows(),(a,u)=>(l(),d("div",{class:"preserve-item",key:a.kind+":"+a.path,style:Ve({paddingLeft:a.depth*18+6+"px"})},[a.kind==="dir"?(l(),d("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":a.open?"true":"false","aria-label":(a.open?"Collapse ":"Expand ")+a.label,onClick:p=>e.togglePreserveDir(a.path)},c(a.open?"\u25BE":"\u25B8"),9,vP)):(l(),d("span",yP)),n("input",{type:"checkbox",id:"pf-"+u,"aria-label":a.kind==="dir"?"Leave folder "+a.path+" unredacted":null,checked:a.state==="all",".indeterminate":a.state==="some",disabled:a.locked,onChange:p=>a.kind==="dir"?e.togglePreserveFolder(a.path):e.togglePreserveFile(a.path)},null,40,bP),n("label",{for:a.kind==="file"?"pf-"+u:null,class:"preserve-name",onClick:p=>a.kind==="dir"&&e.togglePreserveDir(a.path)},c(a.label),9,wP),a.note?(l(),d("span",kP,c(a.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(l(),d("p",CP,c(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(l(),d("p",EP,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[121]||(t[121]=n("summary",null,"Patterns",-1)),P(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
|
||||
paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=a=>e.preserve.patterns=a)},null,512),[[ut,e.preserve.patterns]]),t[122]||(t[122]=n("small",{class:"form-text text-muted"},[v("One per line, as in .gitignore: "),n("code",null,"*.bib"),v(" matches in any folder; "),n("code",null,"/refs.bib"),v(" and "),n("code",null,"paper/refs.bib"),v(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),v(" covers everything inside it; "),n("code",null,"!private.bib"),v(" excludes again.")],-1))],8,SP),n("div",NP,[n("span",RP,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",DP,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=a=>e.closePreserveFiles())},"Cancel"),t[123]||(t[123]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[x,e.detectedType]]),P(n("section",AP,[t[146]||(t[146]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),P(n("div",null,[n("div",TP,[P(n("input",PP,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[127]||(t[127]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",OP,[P(n("input",IP,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[128]||(t[128]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",MP,[P(n("input",_P,null,512),[[s,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[129]||(t[129]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",VP,[P(n("input",qP,null,512),[[s,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[130]||(t[130]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",$P,[P(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,LP),[[s,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[131]||(t[131]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(l(),d("small",UP,c(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",FP,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[x,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(l(),d("p",BP,[...t[132]||(t[132]=[v("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),P(n("div",null,[n("div",zP,[P(n("input",HP,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[133]||(t[133]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",jP,[P(n("input",GP,null,512),[[s,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",WP,[P(n("input",KP,null,512),[[s,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",YP,[P(n("input",XP,null,512),[[s,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",QP,[P(n("input",JP,null,512),[[s,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",ZP,[P(n("input",xP,null,512),[[s,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[x,e.detectedType==="gist"]]),P(n("div",null,[n("div",e3,[P(n("input",t3,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",n3,[P(n("input",o3,null,512),[[s,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",s3,[P(n("in
Line truncated
|
||||
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),v("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),v("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("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"),v(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),v("Self"),n("span",{class:"serif-hy"},"-"),v("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{cla
Line truncated
|
||||
anonymized repository often think it is about the paper, so the
|
||||
label names the service and the tooltip says who to contact. `),n("li",{class:T(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug ")],-1)])],2),n("li",{class:T(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),v("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(l(),d("li",VU,[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[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",qU,[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[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",$U,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),v(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",LU,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=ue(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(l(),d("li",UU,[n("a",FU,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,BU)):f("v-if",!0),n("span",zU,c(e.user?.username),1)]),n("div",HU,[n("h6",jU,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ee('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item um-extra" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(l(),d("a",GU,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,WU)):f("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]=ue(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=ue(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),O(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,KU),[[ut,e.emailPromptAddress]]),e.emailPromptError?(l(),d("p
Line truncated
|
||||
python experiments/run.py`),n("p",null,[v("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:T(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",iF,[e.statsEmpty()?f("v-if",!0):(l(),d("div",rF,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),v(),n("span",null,[v("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(l(),d("div",aF,[(l(!0),d(L,null,se(e.cards,(i,s)=>(l(),d("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:T(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",lF,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(l(),d("div",dF," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[v("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",uF,[n("div",cF,[t[13]||(t[13]=n("label",{for:"demo-terms"},[v("Terms to redact "),n("span",null,[v("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),O(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=bt(ue(()=>{},["prevent"]),["enter"]))},null,544),[[ut,e.demoTerms]])]),n("div",pF,[n("div",fF,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[v("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",hF,[n("div",mF,[(l(!0),d(L,null,se(e.demoParts(),(i,s)=>(l(),d(L,{key:s},[i.redacted?(l(),d("mark",gF,c(i.original),1)):(l(),d(L,{key:1},[v(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=v("\u200B",-1))]),O(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[ut,e.demoText]])])]),n("div",vF,[n("div",yF,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",bF,[n("span",wF,c(e.demoCount())+" redacted",1)])]),n("div",kF,[(l(!0),d(L,null,se(e.demoParts(),(i,s)=>(l(),d(L,{key:s},[i.redacted?(l(),d("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,CF)):(l(),d(L,{key:1},[v(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",EF,[n("div",SF,[(l(!0),d(L,null,se(e.features,(i,s)=>(l(),d("div",{class:T(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,s),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",RF,[n("span",DF,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",AF,c(i?.eyebrow),1)]),n("span",TF,[v(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(l(),d("span",PF,"-")):f("v-if",!0),v(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,NF),n("div",OF,[n("span",IF,[v(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(l(),d("span",_F,"-")):f("v-if",!0),v(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,MF)])],2))),128))]),n("div",VF,[(l(!0),d(L,null,se(e.features,(i,s)=>O((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",$F,[n("div",LF,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",UF,c(i?.url),1)]),n("div",{class:T(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(l(),d("div",BF,[...t[19]||(t[19]=[Ee('<div class="fm-label">GitHub re
Line truncated
|
||||
label names the service and the tooltip says who to contact. `),n("li",{class:T(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug ")],-1)])],2),n("li",{class:T(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),v("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(l(),d("li",RU,[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[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",DU,[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[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",AU,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),v(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",TU,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=ue(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(l(),d("li",PU,[n("a",OU,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,IU)):f("v-if",!0),n("span",MU,c(e.user?.username),1)]),n("div",_U,[n("h6",VU,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ee('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item um-extra" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(l(),d("a",qU,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,$U)):f("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]=ue(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=ue(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),P(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=o=>e.emailPromptAddress=o),disabled:e.emailPromptBusy},null,8,LU),[[ut,e.emailPromptAddress]]),e.emailPromptError?(l(),d("p
Line truncated
|
||||
python experiments/run.py`),n("p",null,[v("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:T(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",QU,[e.statsEmpty()?f("v-if",!0):(l(),d("div",JU,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),v(),n("span",null,[v("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(l(),d("div",ZU,[(l(!0),d(L,null,se(e.cards,(i,s)=>(l(),d("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:T(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",xU,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(l(),d("div",eF," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[v("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",tF,[n("div",nF,[t[13]||(t[13]=n("label",{for:"demo-terms"},[v("Terms to redact "),n("span",null,[v("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),P(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=pt(ue(()=>{},["prevent"]),["enter"]))},null,544),[[ut,e.demoTerms]])]),n("div",oF,[n("div",sF,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[v("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",iF,[n("div",rF,[(l(!0),d(L,null,se(e.demoParts(),(i,s)=>(l(),d(L,{key:s},[i.redacted?(l(),d("mark",aF,c(i.original),1)):(l(),d(L,{key:1},[v(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=v("\u200B",-1))]),P(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[ut,e.demoText]])])]),n("div",lF,[n("div",dF,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",uF,[n("span",cF,c(e.demoCount())+" redacted",1)])]),n("div",pF,[(l(!0),d(L,null,se(e.demoParts(),(i,s)=>(l(),d(L,{key:s},[i.redacted?(l(),d("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,fF)):(l(),d(L,{key:1},[v(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",hF,[n("div",mF,[(l(!0),d(L,null,se(e.features,(i,s)=>(l(),d("div",{class:T(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,s),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",vF,[n("span",yF,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",bF,c(i?.eyebrow),1)]),n("span",wF,[v(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(l(),d("span",kF,"-")):f("v-if",!0),v(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,gF),n("div",CF,[n("span",EF,[v(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(l(),d("span",SF,"-")):f("v-if",!0),v(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,NF)])],2))),128))]),n("div",RF,[(l(!0),d(L,null,se(e.features,(i,s)=>P((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",AF,[n("div",TF,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",PF,c(i?.url),1)]),n("div",{class:T(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(l(),d("div",IF,[...t[19]||(t[19]=[Ee('<div class="fm-label">GitHub re
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
|
||||
@@ -54,14 +54,14 @@ python experiments/run.py`),n("p",null,[v("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">"epoch %d: %.3f"</span>, epoch, loss)</pre></div>`,2)])])):(l(),d("div",HF,[...t[21]||(t[21]=[Ee('<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,FF)])],8,qF)),[[x,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ee('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Ve(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var jF={class:"paper-empty"},GF={class:"paper-empty-inner"},WF={key:0,class:"paper-eyebrow"},KF={key:1,class:"paper-eyebrow"},YF={key:2,class:"paper-empty-title"},XF=["textContent"];function dp(e,t){return l(),d("div",jF,[n("div",GF,[e.error?f("v-if",!0):(l(),d("div",WF,"Working")),e.error?(l(),d("div",KF,"Error")):f("v-if",!0),e.error?f("v-if",!0):(l(),d("h1",YF,[...t[0]||(t[0]=[v(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,XF)):f("v-if",!0)])])}var QF={class:"container paper-page paper-settings"},JF={class:"paper-crumbs"},ZF={class:"here"},xF={class:"paper-page-title"},e7={class:"paper-settings-body"},t7={class:"paper-settings-toc"},n7={href:"#conf-billing"},o7={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},s7={id:"conf-basics",class:"paper-settings-section"},i7={class:"form-group"},r7={class:"invalid-feedback"},a7={class:"invalid-feedback"},l7={class:"form-group"},d7={class:"invalid-feedback"},u7={class:"form-group"},c7={class:"invalid-feedback"},p7={class:"invalid-feedback"},f7={id:"conf-window",class:"paper-settings-section"},h7={class:"form-grid-2"},m7={class:"form-group"},g7={class:"invalid-feedback"},v7={class:"invalid-feedback"},y7={class:"form-group"},b7={class:"invalid-feedback"},w7={class:"invalid-feedback"},k7={id:"conf-rendering",class:"paper-settings-section"},C7={class:"form-check"},E7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},S7={class:"form-check"},N7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},R7={class:"form-check"},D7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},A7={class:"form-check"},T7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},P7={id:"conf-features",class:"paper-settings-section"},O7={class:"form-check"},I7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},_7={class:"form-check"},M7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},V7={id:"conf-plan",class:"paper-settings-section"},q7={key:0,class:"paper-section-copy"},$7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
|
||||
`).length))+" lines",1)):f("v-if",!0)]),O(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",P9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,O9)]))],8,T9),[[x,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(l(),d("span",I9,[e.redactionCount()?(l(),d(L,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(c(e.redactionCount()),1),t[47]||(t[47]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,_9),t[48]||(t[48]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),v(c(e.languageName||"Text"),1),n("span",M9,[t[49]||(t[49]=n("span",{class:"sep"},"\xB7",-1)),v(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1)),v(c(e.fmt?.number(e.content.split(`
|
||||
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(l(),d("span",V9,[e.redactionCount()?(l(),d(L,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(c(e.redactionCount()),1),t[51]||(t[51]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,q9),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[54]||(t[54]=v("Markdown",-1)),e.fileSize(e.filePath)!=null?(l(),d(L,{key:1},[t[53]||(t[53]=n("span",{class:"sep"},"\xB7",-1)),v(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),n("div",$9,[e.isCsv()?(l(),d("div",L9,[n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[3]||(t[3]=a=>e.csvView="table")},"Table",10,U9),n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[4]||(t[4]=a=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,F9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(l(),d("div",B9,[n("button",{type:"button",class:T(["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[5]||(t[5]=a=>e.symbolsOpen=!e.symbolsOpen)},[...t[55]||(t[55]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,z9),e.symbolsOpen?(l(),d("div",H9,[n("div",j9,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(l(!0),d(L,null,se(e.symbols(),a=>(l(),d("button",{type:"button",class:"symbols-item",role:"menuitem",key:a.line+a.name,onClick:u=>e.goToSymbol(a.line)},[n("span",{class:T(["symbols-kind","is-"+a.kind])},c(a.kind==="class"?"C":a.kind==="function"?"\u0192":"v"),3),n("span",W9,c(a.name),1),n("span",K9,c(a.line),1)],8,G9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(l(),d("button",{key:2,type:"button",class:T(["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[6]||(t[6]=a=>e.toggleMdFind())},[...t[56]||(t[56]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,Y9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(l(),d("div",X9,[e.type!="html"?(l(),d("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[7]||(t[7]=a=>e.gotoLine())},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,Q9)):f("v-if",!0),e.type!="html"?(l(),d("button",{key:1,type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[8]||(t[8]=a=>e.toggleWrap())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,J9)):f("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[9]||(t[9]=a=>e.findInFile())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,Z9)):f("v-if",!0)])):f("v-if",!0),n("div",x9,[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,eB),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[10]||(t[10]=a=>e.copyContent())},[(l(),d("svg",nB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,oB)]))],8,tB)):f("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[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,sB)]),typeof e.content=="string"?(l(),d("button",{key:4,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=a=>e.copyContent())},[(l(),d("svg",rB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,aB)]))],8,iB)):f("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(l(),d("div",lB,[n("button",{type:"button",class:T(["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[12]||(t[12]=ue(a=>{e.tocOpe
Line truncated
|
||||
`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(l(),d("div",gB)):f("v-if",!0),e.type=="html"?(l(),d("button",{key:3,type:"button",role:"menuitem",onClick:t[16]||(t[16]=a=>e.toggleMdFind())},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(l(),d("div",vB)):f("v-if",!0),e.type!="html"?(l(),d("button",{key:5,type:"button",role:"menuitem",onClick:t[17]||(t[17]=a=>e.findInFile())},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(l(),d("button",{key:6,type:"button",role:"menuitem",onClick:t[18]||(t[18]=a=>e.gotoLine())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),v("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(l(),d("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[19]||(t[19]=a=>e.toggleWrap())},[t[68]||(t[68]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[69]||(t[69]=v("Wrap lines",-1)),e.wrapLines?(l(),d("span",bB,"\u2713")):f("v-if",!0)],8,yB)):f("v-if",!0),e.isCsv()?(l(),d("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[20]||(t[20]=a=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(l(),d("svg",wB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,kB)])),v(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(l(),d("div",CB)):f("v-if",!0),e.type=="html"?(l(),d("a",{key:10,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[70]||(t[70]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,EB)):f("v-if",!0),e.type!="html"?(l(),d("a",{key:11,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[71]||(t[71]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,SB)):f("v-if",!0),n("a",{role:"menuitem",target:"_self",href:e.safeUrl(e.url+"&download=true")},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),v("Download file",-1)])],8,NB),e.options?.hasWebsite?(l(),d("a",{key:12,role:"menuitem",target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),v("Open website",-1)])],8,RB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:13,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v("Edit anonymization",-1)])],8,DB)):f("v-if",!0),e.options?.download?(l(),d("a",{key:14,role:"menuitem",target:"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),v("Download ZIP",-1)])],8,AB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[21]||(t[21]=a=>e.copyPath())},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),v("Copy file path",-1)])]),t[77]||(t[77]=n("div",{class:"tb-menu-sep"},null,-1)),t[78]||(t[78]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),v("FAQ")],-1)),t[79]||(t[79]=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"})]),v("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(l(),d("form",{key:2,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[25]||(t[25]=ue(a=>e.submitGoto(),["prevent"]))},[t[80]||(t[80]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),O(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
|
||||
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[23]||(t[23]=a=>e.gotoValue=a),onKeydown:t[24]||(t[24]=bt(ue(a=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,TB),[[ut,e.gotoValue]]),n("span",{class:T(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(l(),d("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",OB,[n("thead",null,[n("tr",null,[t[81]||(t[81]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(l(!0),d(L,null,se(e.csvRows()[0]||[],(a,u)=>(l(),d("th",{scope:"col",key:u,class:T({"is-num":e.csvNumCol(u)})},[(l(!0),d(L,null,se(e.redactParts(a),(p,y)=>(l(),d(L,{key:y},[p.n?(l(),d("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+p.n},[n("i",null,c(p.n),1)],8,IB)):(l(),d(L,{key:1},[v(c(p.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(l(!0),d(L,null,se(e.csvRows().slice(1),(a,u)=>(l(),d("tr",{key:u},[n("td",_B,c(u+1),1),(l(!0),d(L,null,se(a,(p,y)=>(l(),d("td",{key:y,class:T({"is-num":e.csvNumCol(y)})},[(l(!0),d(L,null,se(e.redactParts(p),(h,b)=>(l(),d(L,{key:b},[h.n?(l(),d("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,c(h.n),1)],8,MB)):(l(),d(L,{key:1},[v(c(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,PB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?O((l(),d("div",VB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(l(),d("div",qB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[26]||(t[26]=a=>{e.mdFindQuery=a.target.value,e.runMdFind()}),onKeydown:[t[27]||(t[27]=bt(ue(a=>a.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[28]||(t[28]=bt(ue(a=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,$B),n("span",LB,[n("button",{type:"button","aria-label":"Previous match",onClick:t[29]||(t[29]=a=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[82]||(t[82]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,UB),n("button",{type:"button","aria-label":"Next match",onClick:t[30]||(t[30]=a=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[83]||(t[83]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,FB)]),n("span",BB,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:T(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[31]||(t[31]=a=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,zB),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[32]||(t[32]=a=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(l(),d("div",HB,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,jB),e.readmeToc().length>=3?(l(),d("aside",GB,[t[84]||(t[84]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",WB,[n("a",{href:"#",class:T(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[33]||(t[33]=ue(a=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(l(!0),d(L,null,se(e.readmeToc(),(a,u)=>(l(),d("a",{key:a.id,href:"#"+a.id,class:T(["lvl-"+a.level,{"is-active":e.activeHeading===a.id}]),onClick:ue(p=>e.scrollToHeading(a.id),["prevent"])},c(a.text),11,KB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(l(),cn(o,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(l(),d("section",{key:3,class:T(["file-card file-card-media","view-"+e.type])},[n("header",YB,[n("div",XB,[n("button",{type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[34]||(t[34]=a=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",QB,[n("li",JB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,ZB)]),(l(!0),d(L,null,se(e.paths,(a,u)=>(l(),d("li",{class:"breadcrumb-item","aria-current":u===e.paths.length-1?"page":null},[(l(!0),d(L,null,se(e.redactParts(a),(p,y)=>(l(),d(L,{key:y},[p.n?(l(),d("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+p.n},[n("i",null,c(p.n),1)],8,ez)):(l(),d(L,{key:1},[v(c(p.t),1)],64))],64))),128))],8,xB))),256))]),n("span",tz,[e.type==
Line truncated
|
||||
<span class="ln">10</span> log(<span class="s">"epoch %d: %.3f"</span>, epoch, loss)</pre></div>`,2)])])):(l(),d("div",_F,[...t[21]||(t[21]=[Ee('<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,OF)])],8,DF)),[[x,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ee('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),_e(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var VF={class:"paper-empty"},qF={class:"paper-empty-inner"},$F={key:0,class:"paper-eyebrow"},LF={key:1,class:"paper-eyebrow"},UF={key:2,class:"paper-empty-title"},FF=["textContent"];function tp(e,t){return l(),d("div",VF,[n("div",qF,[e.error?f("v-if",!0):(l(),d("div",$F,"Working")),e.error?(l(),d("div",LF,"Error")):f("v-if",!0),e.error?f("v-if",!0):(l(),d("h1",UF,[...t[0]||(t[0]=[v(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,FF)):f("v-if",!0)])])}var BF={class:"container paper-page paper-settings"},zF={class:"paper-crumbs"},HF={class:"here"},jF={class:"paper-page-title"},GF={class:"paper-settings-body"},WF={class:"paper-settings-toc"},KF={href:"#conf-billing"},YF={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},XF={id:"conf-basics",class:"paper-settings-section"},QF={class:"form-group"},JF={class:"invalid-feedback"},ZF={class:"invalid-feedback"},xF={class:"form-group"},e7={class:"invalid-feedback"},t7={class:"form-group"},n7={class:"invalid-feedback"},o7={class:"invalid-feedback"},s7={id:"conf-window",class:"paper-settings-section"},i7={class:"form-grid-2"},r7={class:"form-group"},a7={class:"invalid-feedback"},l7={class:"invalid-feedback"},d7={class:"form-group"},u7={class:"invalid-feedback"},c7={class:"invalid-feedback"},p7={id:"conf-rendering",class:"paper-settings-section"},f7={class:"form-check"},h7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},m7={class:"form-check"},g7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},v7={class:"form-check"},y7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},b7={class:"form-check"},w7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},k7={id:"conf-features",class:"paper-settings-section"},C7={class:"form-check"},E7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},S7={class:"form-check"},N7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},R7={id:"conf-plan",class:"paper-settings-section"},D7={key:0,class:"paper-section-copy"},A7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
|
||||
`).length))+" lines",1)):f("v-if",!0)]),P(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=a=>e.copyPath())},[(l(),d("svg",k9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,C9)]))],8,w9),[[x,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(l(),d("span",E9,[e.redactionCount()?(l(),d(L,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(c(e.redactionCount()),1),t[47]||(t[47]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,S9),t[48]||(t[48]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),v(c(e.languageName||"Text"),1),n("span",N9,[t[49]||(t[49]=n("span",{class:"sep"},"\xB7",-1)),v(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1)),v(c(e.fmt?.number(e.content.split(`
|
||||
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(l(),d("span",R9,[e.redactionCount()?(l(),d(L,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(c(e.redactionCount()),1),t[51]||(t[51]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,D9),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[54]||(t[54]=v("Markdown",-1)),e.fileSize(e.filePath)!=null?(l(),d(L,{key:1},[t[53]||(t[53]=n("span",{class:"sep"},"\xB7",-1)),v(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),n("div",A9,[e.isCsv()?(l(),d("div",T9,[n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[3]||(t[3]=a=>e.csvView="table")},"Table",10,P9),n("button",{type:"button",role:"radio",class:T(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[4]||(t[4]=a=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,O9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(l(),d("div",I9,[n("button",{type:"button",class:T(["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[5]||(t[5]=a=>e.symbolsOpen=!e.symbolsOpen)},[...t[55]||(t[55]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,M9),e.symbolsOpen?(l(),d("div",_9,[n("div",V9,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(l(!0),d(L,null,se(e.symbols(),a=>(l(),d("button",{type:"button",class:"symbols-item",role:"menuitem",key:a.line+a.name,onClick:u=>e.goToSymbol(a.line)},[n("span",{class:T(["symbols-kind","is-"+a.kind])},c(a.kind==="class"?"C":a.kind==="function"?"\u0192":"v"),3),n("span",$9,c(a.name),1),n("span",L9,c(a.line),1)],8,q9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(l(),d("button",{key:2,type:"button",class:T(["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[6]||(t[6]=a=>e.toggleMdFind())},[...t[56]||(t[56]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,U9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(l(),d("div",F9,[e.type!="html"?(l(),d("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[7]||(t[7]=a=>e.gotoLine())},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,B9)):f("v-if",!0),e.type!="html"?(l(),d("button",{key:1,type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[8]||(t[8]=a=>e.toggleWrap())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,z9)):f("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[9]||(t[9]=a=>e.findInFile())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,H9)):f("v-if",!0)])):f("v-if",!0),n("div",j9,[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,G9),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[10]||(t[10]=a=>e.copyContent())},[(l(),d("svg",K9,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,Y9)]))],8,W9)):f("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[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,X9)]),typeof e.content=="string"?(l(),d("button",{key:4,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=a=>e.copyContent())},[(l(),d("svg",J9,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,Z9)]))],8,Q9)):f("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(l(),d("div",x9,[n("button",{type:"button",class:T(["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[12]||(t[12]=ue(a=>{e.tocOpe
Line truncated
|
||||
`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(l(),d("div",aB)):f("v-if",!0),e.type=="html"?(l(),d("button",{key:3,type:"button",role:"menuitem",onClick:t[16]||(t[16]=a=>e.toggleMdFind())},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(l(),d("div",lB)):f("v-if",!0),e.type!="html"?(l(),d("button",{key:5,type:"button",role:"menuitem",onClick:t[17]||(t[17]=a=>e.findInFile())},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(l(),d("button",{key:6,type:"button",role:"menuitem",onClick:t[18]||(t[18]=a=>e.gotoLine())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),v("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(l(),d("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[19]||(t[19]=a=>e.toggleWrap())},[t[68]||(t[68]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[69]||(t[69]=v("Wrap lines",-1)),e.wrapLines?(l(),d("span",uB,"\u2713")):f("v-if",!0)],8,dB)):f("v-if",!0),e.isCsv()?(l(),d("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[20]||(t[20]=a=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(l(),d("svg",cB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,pB)])),v(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(l(),d("div",fB)):f("v-if",!0),e.type=="html"?(l(),d("a",{key:10,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[70]||(t[70]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,hB)):f("v-if",!0),e.type!="html"?(l(),d("a",{key:11,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[71]||(t[71]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,mB)):f("v-if",!0),n("a",{role:"menuitem",target:"_self",href:e.safeUrl(e.url+"&download=true")},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),v("Download file",-1)])],8,gB),e.options?.hasWebsite?(l(),d("a",{key:12,role:"menuitem",target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),v("Open website",-1)])],8,vB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:13,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v("Edit anonymization",-1)])],8,yB)):f("v-if",!0),e.options?.download?(l(),d("a",{key:14,role:"menuitem",target:"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),v("Download ZIP",-1)])],8,bB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[21]||(t[21]=a=>e.copyPath())},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),v("Copy file path",-1)])]),t[77]||(t[77]=n("div",{class:"tb-menu-sep"},null,-1)),t[78]||(t[78]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),v("FAQ")],-1)),t[79]||(t[79]=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"})]),v("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(l(),d("form",{key:2,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[25]||(t[25]=ue(a=>e.submitGoto(),["prevent"]))},[t[80]||(t[80]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),P(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
|
||||
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[23]||(t[23]=a=>e.gotoValue=a),onKeydown:t[24]||(t[24]=pt(ue(a=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,wB),[[ut,e.gotoValue]]),n("span",{class:T(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(l(),d("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",CB,[n("thead",null,[n("tr",null,[t[81]||(t[81]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(l(!0),d(L,null,se(e.csvRows()[0]||[],(a,u)=>(l(),d("th",{scope:"col",key:u,class:T({"is-num":e.csvNumCol(u)})},[(l(!0),d(L,null,se(e.redactParts(a),(p,y)=>(l(),d(L,{key:y},[p.n?(l(),d("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+p.n},[n("i",null,c(p.n),1)],8,EB)):(l(),d(L,{key:1},[v(c(p.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(l(!0),d(L,null,se(e.csvRows().slice(1),(a,u)=>(l(),d("tr",{key:u},[n("td",SB,c(u+1),1),(l(!0),d(L,null,se(a,(p,y)=>(l(),d("td",{key:y,class:T({"is-num":e.csvNumCol(y)})},[(l(!0),d(L,null,se(e.redactParts(p),(h,b)=>(l(),d(L,{key:b},[h.n?(l(),d("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,c(h.n),1)],8,NB)):(l(),d(L,{key:1},[v(c(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,kB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?P((l(),d("div",RB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(l(),d("div",DB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[26]||(t[26]=a=>{e.mdFindQuery=a.target.value,e.runMdFind()}),onKeydown:[t[27]||(t[27]=pt(ue(a=>a.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[28]||(t[28]=pt(ue(a=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,AB),n("span",TB,[n("button",{type:"button","aria-label":"Previous match",onClick:t[29]||(t[29]=a=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[82]||(t[82]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,PB),n("button",{type:"button","aria-label":"Next match",onClick:t[30]||(t[30]=a=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[83]||(t[83]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,OB)]),n("span",IB,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:T(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[31]||(t[31]=a=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,MB),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[32]||(t[32]=a=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(l(),d("div",_B,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,VB),e.readmeToc().length>=3?(l(),d("aside",qB,[t[84]||(t[84]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",$B,[n("a",{href:"#",class:T(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[33]||(t[33]=ue(a=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(l(!0),d(L,null,se(e.readmeToc(),(a,u)=>(l(),d("a",{key:a.id,href:"#"+a.id,class:T(["lvl-"+a.level,{"is-active":e.activeHeading===a.id}]),onClick:ue(p=>e.scrollToHeading(a.id),["prevent"])},c(a.text),11,LB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(l(),un(o,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(l(),d("section",{key:3,class:T(["file-card file-card-media","view-"+e.type])},[n("header",UB,[n("div",FB,[n("button",{type:"button",class:T(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[34]||(t[34]=a=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",BB,[n("li",zB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,HB)]),(l(!0),d(L,null,se(e.paths,(a,u)=>(l(),d("li",{class:"breadcrumb-item","aria-current":u===e.paths.length-1?"page":null},[(l(!0),d(L,null,se(e.redactParts(a),(p,y)=>(l(),d(L,{key:y},[p.n?(l(),d("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+p.n},[n("i",null,c(p.n),1)],8,GB)):(l(),d(L,{key:1},[v(c(p.t),1)],64))],64))),128))],8,jB))),256))]),n("span",WB,[e.type==
Line truncated
|
||||
`).length+1)),placeholder:`Jane Smith
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},null,8,uj),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",cj,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=v("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=v(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=v(" for a custom replacement. Regex is supported.",-1))])]),O(n("div",pj,"Terms are in an invalid format.",512),[[x,e.defaultsForm?.terms?.errors?.format]])])]),n("section",fj,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",hj,[n("label",mj,[O(n("input",gj,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=v("Keep links",-1))]),n("label",vj,[O(n("input",yj,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=v("Display images",-1))]),n("label",bj,[O(n("input",wj,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=v("Display PDFs",-1))]),n("label",kj,[O(n("input",Cj,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=v("Display notebooks",-1))]),n("label",Ej,[O(n("input",Sj,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=v("Show line counts",-1))]),n("label",Nj,[O(n("input",Rj,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=v("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",Dj,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",Aj,[O(n("input",Tj,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=v("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",Pj,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[O((l(),d("select",Oj,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",Ij,c(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",_j,[n("div",Mj,[e.draftRestored?(l(),d("span",Vj,"Your unsaved draft was restored.")):e.unsavedChanges?(l(),d("span",qj,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(l(),d("span",$j,c(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(l(),d("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:T(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,Lj),e.error?(l(),d("div",Uj,c(e.error),1)):f("v-if",!0)])],32)),[[s,e.viewState]])],512),[[x,e.settingsTab==="defaults"]]),O(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(l(),d("p",Bj,"Loading billing\u2026")):f("v-if",!0),e.billingError?(l(),d("div",zj,[v(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,Hj)])):f("v-if",!0),e.billingNotice?(l(),d("p",jj,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(l(),d("div",Gj,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,Wj)])):f("v-if",!0),n("section",Kj,[n("div",Yj,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",Xj,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(l(),d("p",Qj,[v(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u
Line truncated
|
||||
jane.smith@example.org`},null,8,tj),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",nj,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=v("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=v(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=v(" for a custom replacement. Regex is supported.",-1))])]),P(n("div",oj,"Terms are in an invalid format.",512),[[x,e.defaultsForm?.terms?.errors?.format]])])]),n("section",sj,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",ij,[n("label",rj,[P(n("input",aj,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=v("Keep links",-1))]),n("label",lj,[P(n("input",dj,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=v("Display images",-1))]),n("label",uj,[P(n("input",cj,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=v("Display PDFs",-1))]),n("label",pj,[P(n("input",fj,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=v("Display notebooks",-1))]),n("label",hj,[P(n("input",mj,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=v("Show line counts",-1))]),n("label",gj,[P(n("input",vj,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=v("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",yj,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",bj,[P(n("input",wj,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=v("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",kj,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[P((l(),d("select",Cj,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",Ej,c(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",Sj,[n("div",Nj,[e.draftRestored?(l(),d("span",Rj,"Your unsaved draft was restored.")):e.unsavedChanges?(l(),d("span",Dj,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(l(),d("span",Aj,c(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(l(),d("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:T(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,Tj),e.error?(l(),d("div",Pj,c(e.error),1)):f("v-if",!0)])],32)),[[s,e.viewState]])],512),[[x,e.settingsTab==="defaults"]]),P(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(l(),d("p",Ij,"Loading billing\u2026")):f("v-if",!0),e.billingError?(l(),d("div",Mj,[v(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,_j)])):f("v-if",!0),e.billingNotice?(l(),d("p",Vj,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(l(),d("div",qj,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,$j)])):f("v-if",!0),n("section",Lj,[n("div",Uj,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",Fj,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(l(),d("p",Bj,[v(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
@vue/shared/dist/shared.esm-bundler.js:
|
||||
|
||||
Reference in new issue
Block a user