-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathFully Encrypted Databases Turtoal - Online LaTeX Editor 清华大学Overleaf服务.html
33 lines (31 loc) · 140 KB
/
Fully Encrypted Databases Turtoal - Online LaTeX Editor 清华大学Overleaf服务.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html><html lang="en"><head><title>Fully Encrypted Databases Turtoal - 清华大学Overleaf服务, Online LaTeX Editor</title><meta name="twitter:title" content="Fully Encrypted Databases Turtoal"><meta name="og:title" content="Fully Encrypted Databases Turtoal"><meta name="description" content="An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more."><meta itemprop="description" content="An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more."><meta itemprop="image" content="/touch-icon-192x192.png"><meta name="image" content="/touch-icon-192x192.png"><meta itemprop="name" content="清华大学Overleaf服务, the Online LaTeX Editor"><meta name="robots" content="noindex, nofollow"><meta name="twitter:card" content="summary"><meta name="twitter:description" content="An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more."><meta name="twitter:image" content="/touch-icon-192x192.png"><meta property="og:description" content="An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more."><meta property="og:image" content="/touch-icon-192x192.png"><meta property="og:type" content="website"><link rel="icon" href="/favicon.ico"><link rel="icon" sizes="192x192" href="/touch-icon-192x192.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png"><link rel="mask-icon" href="/mask-favicon.svg" color="#138A07"><link rel="stylesheet" href="/stylesheets/style-c8ad0e3b0a70b51375db.css" id="main-stylesheet"><link rel="stylesheet" href="/stylesheets/libraries-adcf9542c1096d7ce3ad.css"><link rel="stylesheet" href="/stylesheets/ide-2e241dcf1ffcb0d74e97.css"><link rel="alternate" href="https://overleaf.tsinghua.edu.cn/project/6415db930557af009f05eefe" hreflang="en"><script async src="https://www.googletagmanager.com/gtag/js?id=G-P4N729JCZG"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-P4N729JCZG');</script><script type="text/javascript">window.ga = function() { console.log("would send to GA", arguments) };
</script><meta name="ol-csrfToken" content="K7ZLRYxX-hoI7lZpnesPpFe7Q362y43wWgcw"><meta name="ol-baseAssetPath" content="/"><meta name="ol-usersEmail" content="[email protected]"><meta name="ol-sharelatex" data-type="json" content="{"siteUrl":"https://overleaf.tsinghua.edu.cn","wsUrl":"https://overleaf.tsinghua.edu.cn/socket.io"}"><meta name="ol-ab" data-type="json" content="{}"><meta name="ol-user_id" content="616cd9fd91f5f000a6904b33"><meta name="ol-i18n" data-type="json" content="{"currentLangCode":"en"}"><meta name="ol-ExposedSettings" data-type="json" content="{"isOverleaf":false,"appName":"清华大学Overleaf服务","hasSamlFeature":false,"hasLinkUrlFeature":false,"siteUrl":"https://overleaf.tsinghua.edu.cn","emailConfirmationDisabled":true,"maxEntitiesPerProject":2000,"maxUploadSize":52428800,"recaptchaDisabled":{"invite":true,"register":true},"textExtensions":["tex","latex","sty","cls","bst","bib","bibtex","txt","tikz","mtx","rtex","md","asy","latexmkrc","lbx","bbx","cbx","m","lco","dtx","ins","ist","def","clo","ldf","rmd","lua","gv","mf"],"validRootDocExtensions":["tex","Rtex","ltx"],"enableSubscriptions":false}"><meta name="ol-sharelatex.templates" data-type="json" content="{"user_id":"5395eb7aad1f29a88756c7f2"}"><meta name="ol-useV2History" data-type="boolean"><meta name="ol-project_id" content="6415db930557af009f05eefe"><meta name="ol-userSettings" data-type="json" content="{"mode":"none","editorTheme":"textmate","fontSize":12,"autoComplete":true,"autoPairDelimiters":true,"pdfViewer":"pdfjs","syntaxValidation":true,"fontFamily":"lucida","lineHeight":"normal","overallTheme":""}"><meta name="ol-user" data-type="json" content="{"id":"616cd9fd91f5f000a6904b33","email":"[email protected]","first_name":"liguoliang","last_name":"","referal_id":"d6sQVCtfCz9WjQdH","signUpDate":"2021-10-18T02:20:45.899Z","allowedFreeTrial":true,"features":{"collaborators":-1,"versioning":true,"dropbox":true,"github":true,"gitBridge":true,"compileTimeout":180,"compileGroup":"standard","templates":true,"references":true,"trackChanges":true},"refProviders":{},"alphaProgram":false,"betaProgram":false,"isAdmin":false}"><meta name="ol-anonymous" data-type="boolean"><meta name="ol-brandVariation" data-type="json"><meta name="ol-anonymousAccessToken"><meta name="ol-isTokenMember" data-type="boolean" content><meta name="ol-isRestrictedTokenMember" data-type="boolean"><meta name="ol-maxDocLength" data-type="json" content="2097152"><meta name="ol-wikiEnabled" data-type="boolean"><meta name="ol-gitBridgePublicBaseUrl" content="http://localhost:8000"><meta name="ol-aceBasePath" content="/js/ace-1.4.12"><meta name="ol-pdfCMapsPath" content="/js/cmaps/"><meta name="ol-useShareJsHash" data-type="boolean" content><meta name="ol-wsRetryHandshake" data-type="json" content="5"><meta name="ol-showReactFileTree" data-type="boolean" content><meta name="ol-showReactAddFilesModal" data-type="boolean"><meta name="ol-showNewLogsUI" data-type="boolean"><meta name="ol-logsUISubvariant"><meta name="ol-fileActionI18n" data-type="json" content="{"edited":"Edited","renamed":"Renamed","created":"Created","deleted":"Deleted"}"></head><body><div class="editor full-size" ng-controller="IdeController"><shared-context-react></shared-context-react><div class="loading-screen" ng-if="state.loading"><div class="loading-screen-brand-container"><div class="loading-screen-brand" style="height: 20%;" ng-style="{ 'height': state.load_progress + '%' }"></div></div><h3 class="loading-screen-label" ng-if="!state.error">Loading<span class="loading-screen-ellip">.</span><span class="loading-screen-ellip">.</span><span class="loading-screen-ellip">.</span></h3><p class="loading-screen-error ng-cloak" ng-if="state.error"><span ng-bind-html="state.error"></span></p></div><div class="global-alerts" ng-cloak ng-hide="editor.error_state"><div class="alert alert-danger small" ng-if="connection.forced_disconnect"><strong>Disconnected</strong></div><div class="alert alert-warning small" ng-if="connection.reconnection_countdown"><strong>Lost Connection.</strong> Reconnecting in {{ connection.reconnection_countdown }} secs.<a class="alert-link-as-btn pull-right" id="try-reconnect-now-button" href ng-click="tryReconnectNow()">Try Now</a></div><div class="alert alert-warning small" ng-if="connection.reconnecting && connection.stillReconnecting"><strong>Reconnecting…</strong></div><div class="alert alert-warning small" ng-if="sync_tex_error"><strong>Couldn't find the corresponding source file.</strong><a class="alert-link-as-btn pull-right" id="synctex-more-info-button" href="/learn/how-to/SyncTeX_Errors" target="_blank">More Info</a></div><div class="alert alert-warning small" ng-if="connection.inactive_disconnect"><strong>Editor disconnected, click anywhere to reconnect.</strong></div><div class="alert alert-warning small" ng-if="connection.debug">{{ connection.state }}</div><div class="div" ng-controller="SavingNotificationController"><div class="alert alert-warning small" ng-repeat="(doc_id, state) in docSavingStatus" ng-if="state.unsavedSeconds > 8">Saving {{ state.doc.name }}... ({{ state.unsavedSeconds }} seconds of unsaved changes)</div></div><div class="div" ng-controller="SystemMessagesController"><div class="alert alert-warning system-message" ng-repeat="message in messages" ng-controller="SystemMessageController" ng-hide="hidden"><button class="close pull-right" ng-hide="protected" ng-click="hide()"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><div class="system-message-content" ng-bind-html="htmlContent"></div></div></div></div><aside class="full-size" id="left-menu" ng-class="{ 'shown': ui.leftMenuShown }" ng-cloak><h4>Download</h4><ul class="list-unstyled nav nav-downloads text-center"><li><a ng-href="/project/{{project_id}}/download/zip" target="_blank"><i class="fa fa-file-archive-o fa-2x"></i><br>Source</a></li><li><a ng-href="{{pdf.downloadUrl || pdf.url}}" target="_blank" ng-if="pdf.url"><i class="fa fa-file-pdf-o fa-2x"></i><br>PDF</a><div class="link-disabled" ng-if="!pdf.url" tooltip="Please compile your project before downloading the PDF" tooltip-placement="bottom"><i class="fa fa-file-pdf-o fa-2x"></i><br>PDF</div></li></ul><span ng-show="!anonymous"><h4>Actions</h4><ul class="list-unstyled nav"><li ng-controller="LeftMenuCloneProjectModalController"><a href ng-click="openCloneProjectModal()"><i class="fa fa-fw fa-copy"></i> Copy Project</a><clone-project-modal handle-hide="handleHide" project-id="projectId" project-name="projectName" open-project="openProject" show="show"></clone-project-modal></li><li ng-controller="WordCountModalController"><a href ng-if="pdf.url" ng-click="openWordCountModal()"><i class="fa fa-fw fa-eye"></i><span> Word Count</span></a><a class="link-disabled" href ng-if="!pdf.url" tooltip="Please compile your project before performing a word count"><i class="fa fa-fw fa-eye"></i><span class="link-disabled"> Word Count</span></a><word-count-modal clsi-server-id="clsiServerId" handle-hide="handleHide" project-id="projectId" show="show"></word-count-modal></li></ul></span><h4 ng-show="!anonymous">Settings</h4><form class="settings" ng-controller="SettingsController" ng-show="!anonymous"><div class="containter-fluid"><div class="form-controls" ng-show="permissions.write"><label for="compiler">Compiler</label><select name="compiler" ng-model="project.compiler"><option value="pdflatex">pdfLaTeX</option><option value="latex">LaTeX</option><option value="xelatex">XeLaTeX</option><option value="lualatex">LuaLaTeX</option></select></div><div class="form-controls" ng-show="permissions.write"><label for="rootDoc_id">Main document</label><select name="rootDoc_id" ng-model="project.rootDoc_id" ng-options="doc.doc.id as doc.path for doc in getValidMainDocs()"></select></div><div class="form-controls"><label for="spellCheckLanguage">Spell check</label><select name="spellCheckLanguage" ng-model="project.spellCheckLanguage"><option value="">Off</option><optgroup label="Language"><option value="en">English</option><option value="en_US">English (American)</option><option value="en_GB">English (British)</option><option value="en_CA">English (Canadian)</option><option value="af">Afrikaans</option><option value="ar">Arabic</option><option value="gl">Galician</option><option value="eu">Basque</option><option value="br">Breton</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="hr">Croatian</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="eo">Esperanto</option><option value="et">Estonian</option><option value="fo">Faroese</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="id">Indonesian</option><option value="ga">Irish</option><option value="it">Italian</option><option value="kk">Kazakh</option><option value="ku">Kurdish</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="nr">Ndebele</option><option value="ns">Northern Sotho</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt_BR">Portuguese (Brazilian)</option><option value="pt_PT">Portuguese (European)</option><option value="pa">Punjabi</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="st">Southern Sotho</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="tl">Tagalog</option><option value="ts">Tsonga</option><option value="tn">Tswana</option><option value="hsb">Upper Sorbian</option><option value="cy">Welsh</option><option value="xh">Xhosa</option></optgroup></select></div><div class="form-controls"><label for="autoComplete">Auto-complete</label><select name="autoComplete" ng-model="settings.autoComplete" ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"></select></div><div class="form-controls"><label for="autoPairDelimiters">Auto-close Brackets</label><select name="autoPairDelimiters" ng-model="settings.autoPairDelimiters" ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"></select></div><div class="form-controls code-check-setting"><label for="syntaxValidation">Code check</label><select name="syntaxValidation" ng-model="settings.syntaxValidation" ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"></select></div><div class="form-controls"><label for="editorTheme">Editor theme</label><select name="editorTheme" ng-model="settings.editorTheme"><option value="ambiance">ambiance</option><option value="chaos">chaos</option><option value="chrome">chrome</option><option value="clouds">clouds</option><option value="clouds_midnight">clouds midnight</option><option value="cobalt">cobalt</option><option value="crimson_editor">crimson editor</option><option value="dawn">dawn</option><option value="dracula">dracula</option><option value="dreamweaver">dreamweaver</option><option value="eclipse">eclipse</option><option value="github">github</option><option value="gob">gob</option><option value="gruvbox">gruvbox</option><option value="idle_fingers">idle fingers</option><option value="iplastic">iplastic</option><option value="katzenmilch">katzenmilch</option><option value="kr_theme">kr theme</option><option value="kuroir">kuroir</option><option value="merbivore">merbivore</option><option value="merbivore_soft">merbivore soft</option><option value="mono_industrial">mono industrial</option><option value="monokai">monokai</option><option value="nord_dark">nord dark</option><option value="overleaf">overleaf</option><option value="pastel_on_dark">pastel on dark</option><option value="solarized_dark">solarized dark</option><option value="solarized_light">solarized light</option><option value="sqlserver">sqlserver</option><option value="terminal">terminal</option><option value="textmate">textmate</option><option value="tomorrow">tomorrow</option><option value="tomorrow_night">tomorrow night</option><option value="tomorrow_night_blue">tomorrow night blue</option><option value="tomorrow_night_bright">tomorrow night bright</option><option value="tomorrow_night_eighties">tomorrow night eighties</option><option value="twilight">twilight</option><option value="vibrant_ink">vibrant ink</option><option value="xcode">xcode</option></select></div><div class="form-controls" ng-show="!anonymous"><label for="mode">Keybindings</label><select name="mode" ng-model="settings.mode"><option value="default">None</option><option value="vim">Vim</option><option value="emacs">Emacs</option></select></div><div class="form-controls"><label for="fontSize">Font Size</label><select name="fontSize" ng-model="fontSizeAsStr" ng-model-options="{ getterSetter: true }"><option value="10">10px</option><option value="11">11px</option><option value="12">12px</option><option value="13">13px</option><option value="14">14px</option><option value="16">16px</option><option value="18">18px</option><option value="20">20px</option><option value="22">22px</option><option value="24">24px</option></select></div><div class="form-controls"><label for="fontFamily">Font Family</label><select name="fontFamily" ng-model="settings.fontFamily"><option value="monaco">Monaco / Menlo / Consolas</option><option value="lucida">Lucida / Source Code Pro</option></select></div><div class="form-controls"><label for="lineHeight">Line Height</label><select name="lineHeight" ng-model="settings.lineHeight"><option value="compact">Compact</option><option value="normal">Normal</option><option value="wide">Wide</option></select></div><div class="form-controls"><label for="pdfViewer">PDF Viewer</label><select name="pdfViewer" ng-model="settings.pdfViewer"><option value="pdfjs">Built-In</option><option value="native">Native</option></select></div></div></form><h4>Help</h4><ul class="list-unstyled nav"><li ng-controller="HotkeysModalController"><a ng-click="openHotkeysModal()"><i class="fa fa-keyboard-o fa-fw"></i> Show Hotkeys</a><hotkeys-modal handle-hide="handleHide" show="show" track-changes-visible="trackChangesVisible" is-mac="isMac"></hotkeys-modal></li><li><a href="/static/latex/learn/cheatsheet.pdf" target="_blank"><i class="fa fa-bookmark fa-fw"></i> Cheat Sheet</a></li></ul></aside><div id="left-menu-mask" ng-show="ui.leftMenuShown" ng-click="ui.leftMenuShown = false" ng-cloak></div><script type="text/ng-template" id="cloneProjectModalTemplate"><div class="modal-header"><h3>Copy Project</h3></div><div class="modal-body"><div class="alert alert-danger" ng-show="state.error.message">{{ state.error.message}}</div><div class="alert alert-danger" ng-show="state.error && !state.error.message">Sorry, something went wrong</div><form name="cloneProjectForm" novalidate><div class="form-group"><label>New Name</label><input class="form-control" type="text" placeholder="New Project Name" required ng-model="inputs.projectName" on-enter="clone()" focus-on="open"></div></form></div><div class="modal-footer"><button class="btn btn-default" ng-disabled="state.inflight" ng-click="cancel()">Cancel</button><button class="btn btn-primary" ng-disabled="cloneProjectForm.$invalid || state.inflight" ng-click="clone()"><span ng-hide="state.inflight">Copy</span><span ng-show="state.inflight">Copying…</span></button></div></script><script type="text/ng-template" id="wordCountModalTemplate"><div class="modal-header"><h3>Word Count</h3></div><div class="modal-body"><div ng-if="status.loading"><div class="loading" ng-show="!status.error && status.loading"><i class="fa fa-refresh fa-spin fa-fw"></i><span> Loading…</span></div><div class="pdf-disabled" ng-if="!pdf.url" tooltip="Please compile your project before performing a word count" tooltip-placement="bottom"></div></div><div ng-if="!status.loading"><div class="container-fluid"><div class="row" ng-show="data.messages.length > 0"><div class="col-xs-12"><div class="alert alert-danger"><p style="white-space: pre-wrap">{{data.messages}}</p></div></div></div><div class="row"><div class="col-xs-4"><div class="pull-right">Total Words :</div></div><div class="col-xs-6">{{data.textWords}}</div></div><div class="row"><div class="col-xs-4"><div class="pull-right">Headers :</div></div><div class="col-xs-6">{{data.headers}}</div></div><div class="row"><div class="col-xs-4"><div class="pull-right">Math Inline :</div></div><div class="col-xs-6">{{data.mathInline}}</div></div><div class="row"><div class="col-xs-4"><div class="pull-right">Math Display :</div></div><div class="col-xs-6">{{data.mathDisplay}}</div></div></div></div></div><div class="modal-footer"><button class="btn btn-default" ng-disabled="state.inflight" ng-click="cancel()">Done</button></div></script><div class="full-size" id="chat-wrapper" layout="chat" spacing-open="{{ui.chatResizerSizeOpen}}" spacing-closed="{{ui.chatResizerSizeClosed}}" initial-size-east="250" init-closed-east="true" open-east="ui.chatOpen" ng-hide="state.loading" ng-cloak><div class="ui-layout-center"><header class="toolbar toolbar-header toolbar-with-labels" ng-cloak ng-hide="state.loading"><div class="toolbar-left"><a class="btn btn-full-height" href ng-click="ui.leftMenuShown = true;"><i class="fa fa-fw fa-bars editor-menu-icon"></i><p class="toolbar-label">Menu</p></a><a class="btn btn-full-height header-cobranding-logo-container" ng-if="::(cobranding.isProjectCobranded && cobranding.logoImgUrl)" ng-href="{{ ::cobranding.brandVariationHomeUrl }}" target="_blank" rel="noreferrer noopener"><img class="header-cobranding-logo" ng-src="{{ ::cobranding.logoImgUrl }}" alt="{{ ::cobranding.brandVariationName }}"></a><a class="toolbar-header-back-projects" href="/project"><i class="fa fa-fw fa-level-up"></i></a></div><span ng-controller="PdfViewToggleController"><a class="btn btn-full-height btn-full-height-no-border" href ng-show="ui.pdfLayout == 'flat'" tooltip="PDF" tooltip-placement="bottom" tooltip-append-to-body="true" ng-click="togglePdfView()" ng-class="{ 'active': ui.view == 'pdf' }"><i class="fa fa-file-pdf-o"></i></a></span><div class="toolbar-center project-name" ng-controller="ProjectNameController"><span class="name" ng-dblclick="!permissions.admin || startRenaming()" ng-show="!state.renaming" tooltip="{{ project.name }}" tooltip-class="project-name-tooltip" tooltip-placement="bottom" tooltip-append-to-body="true" tooltip-enable="state.overflowed">{{ project.name }}</span><input class="form-control" type="text" ng-model="inputs.name" ng-show="state.renaming" on-enter="finishRenaming()" ng-blur="finishRenaming()" select-name-when="state.renaming"><a class="rename" ng-if="permissions.admin" href="#" tooltip-placement="bottom" tooltip="Rename" tooltip-append-to-body="true" ng-click="startRenaming()" ng-show="!state.renaming"><i class="fa fa-pencil"></i></a></div><div class="toolbar-right"><div class="online-users" ng-if="onlineUsersArray.length < 4" ng-controller="OnlineUsersController"><span class="online-user" ng-repeat="user in onlineUsersArray" ng-style="{ 'background-color': 'hsl({{ getHueForUserId(user.user_id) }}, 70%, 50%)' }" popover="{{ user.name }}" popover-placement="bottom" popover-append-to-body="true" popover-trigger="mouseenter" ng-click="gotoUser(user)">{{ userInitial(user) }}</span></div><div class="online-users dropdown" dropdown ng-if="onlineUsersArray.length >= 4" ng-controller="OnlineUsersController"><span class="online-user online-user-multi" dropdown-toggle tooltip="Connected Users" tooltip-placement="left"><strong>{{ onlineUsersArray.length }}</strong><i class="fa fa-fw fa-users"></i></span><ul class="dropdown-menu pull-right"><li class="dropdown-header">Connected Users</li><li ng-repeat="user in onlineUsersArray"><a href ng-click="gotoUser(user)"><span class="online-user" ng-style="{ 'background-color': 'hsl({{ getHueForUserId(user.user_id) }}, 70%, 50%)' }">{{ user.name.slice(0,1) }}</span>{{ user.name }}</a></li></ul></div><a class="btn btn-full-height" href ng-if="project.features.trackChangesVisible" ng-class="{ active: ui.reviewPanelOpen && ui.view !== 'history' }" ng-disabled="ui.view === 'history'" ng-click="toggleReviewPanel()"><i class="review-icon"></i><p class="toolbar-label">Review</p></a><a class="btn btn-full-height" href ng-click="openShareProjectModal(permissions.admin);" ng-controller="ShareController"><i class="fa fa-fw fa-group"></i><p class="toolbar-label">Share</p></a><a class="btn btn-full-height" href ng-click="toggleHistory();" ng-class="{ active: (ui.view == 'history') }"><i class="fa fa-fw fa-history"></i><p class="toolbar-label">History</p></a><a class="btn btn-full-height" href ng-class="{ active: ui.chatOpen }" ng-click="toggleChat();" ng-controller="ChatButtonController" ng-show="!anonymous"><i class="fa fa-fw fa-comment" ng-class="{ 'bounce': unreadMessages > 0 }"></i><span class="label label-info" ng-show="unreadMessages > 0">{{ unreadMessages }}</span><p class="toolbar-label">Chat</p></a></div></header><script type="text/ng-template" id="shareProjectModalTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>Share Project</h3></div><div class="modal-body modal-body-share"><div class="container-fluid"><div class="row public-access-level" ng-show="isAdmin && project.publicAccesLevel == 'private'"><div class="col-xs-12 text-center">Link sharing is off, only invited users can view this project.
<a href ng-click="makeTokenBased()">Turn on link sharing</a><span> </span><a href="/learn/how-to/What_is_Link_Sharing%3F" target="_blank"><i class="fa fa-question-circle" tooltip="Learn more about Link Sharing"></i></a></div></div><div class="row public-access-level" ng-show="isAdmin && project.publicAccesLevel == 'tokenBased'"><div class="col-xs-12 text-center"><strong>Link sharing is on.
</strong><a href ng-click="makePrivate()">Turn off link sharing</a><span> </span><a href="/learn/how-to/What_is_Link_Sharing%3F" target="_blank"><i class="fa fa-question-circle" tooltip="Learn more about Link Sharing"></i></a></div><div class="col-xs-12 access-token-display-area"><div class="access-token-wrapper"><strong>Anyone with this link can edit this project</strong><pre class="access-token" ng-show="readAndWriteTokenLink">{{ readAndWriteTokenLink }}</pre><pre class="access-token" ng-hide="readAndWriteTokenLink">Loading…</pre></div><div class="access-token-wrapper"><strong>Anyone with this link can view this project</strong><pre class="access-token" ng-show="readOnlyTokenLink">{{ readOnlyTokenLink }}</pre><pre class="access-token" ng-hide="readOnlyTokenLink">Loading…</pre></div></div></div><div class="row public-access-level" ng-show="isAdmin && (project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly')"><div class="col-xs-12 text-center"><strong ng-if="project.publicAccesLevel == 'readAndWrite'">This project is public and can be edited by anyone with the URL.</strong><strong ng-if="project.publicAccesLevel == 'readOnly'">This project is public and can be viewed but not edited by anyone with the URL</strong> <a href ng-click="makePrivate()">Make Private</a></div></div><div class="row project-member"><div class="col-xs-7">{{ project.owner.email }}</div><div class="text-left col-xs-3">Owner</div></div><form class="form-horizontal" ng-if="isAdmin" ng-repeat="member in project.members" ng-controller="ShareProjectModalMemberRowController"><div class="row form-group project-member"><div class="col-xs-7 form-control-static">{{ member.email }}</div><div class="col-xs-3"><select class="privileges form-control input-sm" name="privileges" ng-model="form.privileges"><option value="owner">Owner</option><option value="readAndWrite">Can Edit</option><option value="readOnly">Read Only</option></select></div><div class="col-xs-2 form-control-static text-center" ng-hide="form.isModified()"><a href tooltip="Remove collaborator" tooltip-placement="bottom" ng-click="removeMember(member)" aria-label="Remove collaborator"><i class="fa fa-times"></i></a></div><div class="col-xs-2 text-center" ng-show="form.isModified()"><button class="btn btn-sm btn-success" type="submit" ng-click="form.submit()">Change</button><div class="text-sm">or
<button class="btn btn-inline-link" ng-click="form.reset()">cancel</button></div></div></div></form><div class="row project-member" ng-if="!isAdmin" ng-repeat="member in project.members"><div class="col-xs-7">{{ member.email }}</div><div class="col-xs-3"><span ng-if="member.privileges == 'readAndWrite'">Can Edit</span><span ng-if="member.privileges == 'readOnly'">Read Only</span></div></div><div class="row project-invite" ng-repeat="invite in project.invites"><div class="col-xs-7">{{ invite.email }} <div class="small">Invite not yet accepted. <button class="btn btn-inline-link" ng-show="isAdmin" ng-click="resendInvite(invite, $event)">Resend</button></div></div><div class="col-xs-3 text-left"><!-- todo: get invite privileges--><span ng-show="invite.privileges == 'readAndWrite'">Can Edit</span><span ng-show="invite.privileges == 'readOnly'">Read Only</span></div><div class="col-xs-2 text-center" ng-if="isAdmin"><a href tooltip="Revoke Invite" tooltip-placement="bottom" ng-click="revokeInvite(invite)"><i class="fa fa-times"></i></a></div></div><div class="row invite-controls" ng-show="isAdmin"><form ng-show="canAddCollaborators"><div class="small">Share with your collaborators</div><div class="form-group"><tags-input class="tags-input" template="shareTagTemplate" placeholder="[email protected], [email protected], …" ng-model="inputs.contacts" focus-on="open" display-property="display" add-on-paste="true" add-on-enter="false" replace-spaces-with-dashes="false" type="email"><auto-complete source="filterAutocompleteUsers($query)" template="shareAutocompleteTemplate" display-property="email" min-length="0"></auto-complete></tags-input></div><div class="form-group"><div class="pull-right"><select class="privileges form-control" ng-model="inputs.privileges" name="privileges"><option value="readAndWrite">Can Edit</option><option value="readOnly">Read Only</option></select> <button class="btn btn-info" type="submit" ng-mousedown="addMembers()" ng-keyup="$event.keyCode == 13 ? addMembers() : null">Share</button></div></div></form><div ng-hide="canAddCollaborators"><p class="text-center">You need to upgrade your account to add more collaborators. Also:</p><div class="row"><div class="col-md-8 col-md-offset-2"><ul class="list-unstyled"><li><i class="fa fa-check"> </i>Unlimited projects</li><li><i class="fa fa-check"> </i>Multiple collaborators per project</li><li><i class="fa fa-check"> </i>Full document history</li><li><i class="fa fa-check"> </i>Sync to Dropbox</li><li><i class="fa fa-check"> </i>Sync to GitHub</li><li><i class="fa fa-check"> </i>Compile larger projects</li></ul></div></div><p class="text-center row-spaced-thin" ng-show="user.allowedFreeTrial" ng-controller="FreeTrialModalController"><a class="btn btn-success" href ng-class="buttonClass" ng-click="startFreeTrial('projectMembers')">Start Free Trial!</a></p><p class="text-center row-spaced-thin" ng-show="!user.allowedFreeTrial" ng-controller="UpgradeModalController"><a class="btn btn-success" href ng-class="buttonClass" ng-click="upgradePlan('projectMembers')">Upgrade</a></p><p class="small" ng-show="startedFreeTrial">Please refresh this page after starting your free trial.</p></div></div><div class="row public-access-level public-access-level--notice" ng-show="!isAdmin"><div class="col-xs-12 text-center" ng-show="project.publicAccesLevel == 'private'">To add more collaborators or turn on link sharing, please ask the project owner</div><div class="col-xs-12 text-center" ng-show="project.publicAccesLevel == 'tokenBased'">To change access permissions, please ask the project owner</div></div></div></div><div class="modal-footer modal-footer-share"><div class="modal-footer-left"><i class="fa fa-refresh fa-spin" ng-show="state.inflight"></i><span class="text-danger error" ng-show="state.error"><span ng-switch="state.errorReason"><span ng-switch-when="cannot_invite_non_user">Can't send invite. Recipient must already have a 清华大学Overleaf服务 account</span><span ng-switch-when="cannot_verify_user_not_robot">Sorry, we could not verify that you are not a robot. Please check that Google reCAPTCHA is not being blocked by an ad blocker or firewall.</span><span ng-switch-when="cannot_invite_self">Can't send invite to yourself</span><span ng-switch-when="invalid_email">An email address is invalid</span><span ng-switch-default>Sorry, something went wrong</span></span></span></div><div class="modal-footer-right"><button class="btn btn-default" ng-click="done()">Close</button></div></div></script><script type="text/ng-template" id="shareTagTemplate"><div class="tag-template"><span ng-if="data.type"><i class="fa fa-fw" ng-class="{'fa-user': data.type != 'group', 'fa-group': data.type == 'group'}"></i></span><span>{{$getDisplayText()}}</span><a class="remove-button" href ng-click="$removeTag()"><i class="fa fa-fw fa-close"></i></a></div></script><script type="text/ng-template" id="shareAutocompleteTemplate"><div class="autocomplete-template"><div ng-if="data.type == 'user'"><i class="fa fa-fw fa-user"></i><span ng-bind-html="$highlight(data.display)"></span></div><div ng-if="data.type == 'group'"><i class="fa fa-fw fa-group"></i><span ng-bind-html="$highlight(data.name)"></span><span class="subdued small" ng-show="data.member_count"> ({{ data.member_count }} members)</span></div></div></script><script type="text/ng-template" id="ownershipTransferConfirmTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>Change Project Owner</h3></div><div class="modal-body"><p>Are you sure you want to make <strong>{{ member.email }}</strong> the owner of <strong>{{ project.name }}</strong>?</p><p>This action cannot be undone. The new owner will be notified and will be able to change project access settings (including removing your own access).</p></div><div class="modal-footer"><div class="modal-footer-left"><i class="fa fa-refresh fa-spin" ng-show="state.inflight"></i><span class="text-danger error" ng-show="state.error">Sorry, something went wrong</span></div><div class="modal-footer-right"><button class="btn btn-default" ng-click="cancel()">Cancel</button><button class="btn btn-success" ng-click="confirm()">Change owner</button></div></div></script><div class="history-toolbar" ng-controller="HistoryV2ToolbarController" ng-if="ui.view == 'history' && history.isV2"><span class="history-toolbar-selected-version" ng-show="history.loadingFileTree"><i class="fa fa-spin fa-refresh"></i> Loading…</span><span class="history-toolbar-selected-version" ng-show="!history.loadingFileTree && history.viewMode === HistoryViewModes.POINT_IN_TIME && !history.showOnlyLabels && currentUpdate && !history.error">Browsing project as of <time class="history-toolbar-time">{{ currentUpdate.meta.end_ts | formatDate:'Do MMM YYYY, h:mm a' }}</time></span><span class="history-toolbar-selected-version" ng-show="!history.loadingFileTree && history.viewMode === HistoryViewModes.POINT_IN_TIME && history.showOnlyLabels && currentUpdate && !history.error"> <span ng-if="currentUpdate.labels.length > 0"> Browsing project version labelled <span class="history-toolbar-selected-label" ng-repeat="label in currentUpdate.labels"> {{ label.comment }}<span ng-if="!$last">, </span></span></span><span class="history-toolbar-selected-label" ng-if="currentUpdate.labels.length === 0 && history.labels[0].isPseudoCurrentStateLabel && currentUpdate.toV === history.labels[0].version">Browsing your project's current state</span></span><span class="history-toolbar-selected-version" ng-if="history.viewMode === HistoryViewModes.COMPARE && history.selection.diff && !history.selection.diff.binary && !history.selection.diff.loading && !history.selection.diff.error && !history.loadingFileTree"><strong>{{history.selection.diff.highlights.length}} </strong><ng-pluralize count="history.selection.diff.highlights.length" when="{ 'one': 'change', 'other': 'changes' }"></ng-pluralize> in <strong>{{history.selection.diff.pathname}}</strong></span><div class="history-toolbar-actions" ng-if="history.viewMode === HistoryViewModes.POINT_IN_TIME && !history.error && history.updates.length > 0"><button class="history-toolbar-btn" ng-click="showAddLabelDialog();" ng-if="!history.showOnlyLabels && permissions.write" ng-disabled="isHistoryLoading() || history.selection.range.toV == null || history.selection.range.fromV == null"> <i class="fa fa-tag"></i> Label this version</button><button class="history-toolbar-btn" ng-click="toggleHistoryViewMode();" ng-disabled="isHistoryLoading()"> <i class="fa fa-exchange"></i> Compare to another version</button><a class="history-toolbar-btn-danger pull-right" ng-hide="history.loadingFileTree || history.selection.range.toV == null" ng-href="/project/{{ project_id }}/version/{{ history.selection.range.toV }}/zip" target="_blank"> <i class="fa fa-download"></i> Download project at this version</a></div><div class="history-toolbar-actions" ng-if="history.viewMode === HistoryViewModes.COMPARE && !history.error && history.updates.length > 0"><button class="history-toolbar-btn" ng-click="toggleHistoryViewMode();" ng-disabled="isHistoryLoading()"> <i class="fa"></i>View single version</button><button class="history-toolbar-btn-danger pull-right" ng-if="history.selection.file.deletedAtV" ng-click="restoreDeletedFile()" ng-show="!restoreState.error" ng-disabled="restoreState.inflight"><i class="fa fa-fw fa-step-backward"></i><span ng-show="!restoreState.inflight">Restore this deleted file</span><span ng-show="restoreState.inflight">Restoring…</span></button><span class="text-danger" ng-show="restoreState.error">Error restoring, sorry</span></div><div class="history-toolbar-entries-list" ng-if="!history.error && history.updates.length > 0"><toggle-switch ng-model="toolbarUIConfig.showOnlyLabels" label-true="Labels" label-false="All history" description="Show all of the project history or only labelled versions."></toggle-switch></div></div><script type="text/ng-template" id="historyV2AddLabelModalTemplate"><form name="addLabelModalForm" ng-submit="addLabelModalFormSubmit();" novalidate><div class="modal-header"><h3>Add label</h3></div><div class="modal-body"><div class="alert alert-danger" ng-show="state.error.message">{{ state.error.message}} </div><div class="alert alert-danger" ng-show="state.error && !state.error.message">Sorry, something went wrong</div><div class="form-group"><input class="form-control" type="text" placeholder="New label name" ng-model="inputs.labelName" focus-on="open" required></div><p class="help-block" ng-if="update">A new label will be added as of <strong>{{ update.meta.end_ts | formatDate:'ddd Do MMM YYYY, h:mm a' }}</strong></p></div><div class="modal-footer"><button class="btn btn-default" type="button" ng-disabled="state.inflight" ng-click="$dismiss()">Cancel</button><input class="btn btn-primary" ng-disabled="addLabelModalForm.$invalid || state.inflight" ng-value="state.inflight ? 'Adding label' : 'Add label'" type="submit"></div></form></script><main id="ide-body" ng-cloak role="main" ng-class="{ 'ide-history-open' : (ui.view == 'history' && history.isV2) }" layout="main" ng-hide="state.loading" resize-on="layout:chat:resize,history:toggle" minimum-restore-size-west="130"><div class="ui-layout-west"><aside class="editor-sidebar full-size" ng-show="ui.view != 'history'" vertical-resizable-panes="outline-resizer" vertical-resizable-panes-toggled-externally-on="outline-toggled" vertical-resizable-panes-min-size="32" vertical-resizable-panes-max-size="75%" vertical-resizable-panes-resize-on="left-pane-resize-all"><div class="file-tree" ng-controller="ReactFileTreeController" vertical-resizable-top><file-tree-root project-id="projectId" root-folder="rootFolder" root-doc-id="rootDocId" has-write-permissions="hasWritePermissions" on-select="onSelect" on-init="onInit" is-connected="isConnected" user-has-feature="userHasFeature" ref-providers="refProviders" reindex-references="reindexReferences" set-ref-provider-enabled="setRefProviderEnabled" set-started-free-trial="setStartedFreeTrial"></file-tree-root><div ng-controller="FileTreeController"><script type="text/ng-template" id="newFileModalTemplate"><div class="modal-header"><h3>Add Files</h3></div><div class="modal-body modal-new-file" ng-show="file_count < 2000"><table><tr><td class="modal-new-file--list"><ul class="list-unstyled"><li ng-class="type == 'doc' ? 'active' : null"><a href ng-click="type = 'doc'"><i class="fa fa-fw fa-file"></i>
New File</a></li><li ng-class="type == 'upload' ? 'active' : null"><a href ng-click="type = 'upload'"><i class="fa fa-fw fa-upload"></i>
Upload</a></li><li ng-class="type == 'project' ? 'active' : null"><a href ng-click="type = 'project'"><i class="fa fa-fw fa-folder-open"></i>
From Another Project</a></li></ul></td><td class="modal-new-file--body modal-new-file--body-{{type}}"><div ng-if="type == 'doc'" ng-controller="NewDocModalController"><form novalidate name="newDocForm"><label for="name">File Name</label><input class="form-control" type="text" placeholder="File Name" required ng-model="inputs.name" on-enter="create()" select-name-on="open" valid-file name="name"></form><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-default>{{error}}</span></div></div><div class="alert alert-danger row-spaced-small" ng-show="newDocForm.name.$error.validFile && newDocForm.name.$viewValue.length">File name is empty or contains invalid characters</div></div><div ng-if="type == 'upload'" ng-controller="UploadFileModalController"><div class="alert alert-warning small" ng-if="tooManyFiles">Maximum {{max_files}} files uploaded together</div><div class="alert alert-warning small" ng-if="rateLimitHit">Too many files uploaded, your uploads have been throttled for short period. Please wait 15 minutes and try again.</div><div class="alert alert-warning small" ng-if="notLoggedIn">Session Expired. Redirecting to login page in {{secondsToRedirect}} seconds</div><div class="alert alert-warning small" ng-if="conflicts.length > 0"><p class="text-center">The following files already exist in this project:</p><ul class="text-center list-unstyled row-spaced-small"><li ng-repeat="conflict in conflicts track by $index"><strong>{{ conflict }}</strong></li></ul><p class="text-center row-spaced-small">Do you want to overwrite them?</p><p class="text-center"><a class="btn btn-primary" href ng-click="doUpload()">Overwrite</a> <a class="btn btn-default" href ng-click="cancel()">Cancel</a></p></div><div fine-upload endpoint="/project/{{ project_id }}/upload" template-id="qq-file-uploader-template" multiple="true" auto-upload="false" on-complete-callback="onComplete" on-upload-callback="onUpload" on-validate-batch="onValidateBatch" on-error-callback="onError" on-submit-callback="onSubmit" on-cancel-callback="onCancel" control="control" params="{'folder_id': parent_folder_id}"></div></div><div ng-if="type == 'project'" ng-controller="ProjectLinkedFileModalController"><div><form><div class="form-controls"><label for="project-select">Select a Project</label><span ng-show="state.inFlight.projects"> <i class="fa fa-spinner fa-spin"></i></span><select class="form-control" name="project-select" ng-model="data.selectedProjectId" ng-disabled="!shouldEnableProjectSelect()"><option value="" disabled selected>- Please Select a Project</option><option ng-repeat="project in data.projects" value="{{ project._id }}">{{ project.name }}</option></select><small ng-if="hasNoProjects() && shouldEnableProjectSelect() ">No other projects found, please create another project first</small></div><div class="form-controls row-spaced-small" ng-if="!state.isOutputFilesMode"><label for="project-entity-select">Select a File</label><span ng-show="state.inFlight.entities"> <i class="fa fa-spinner fa-spin"></i></span><select class="form-control" name="project-entity-select" ng-model="data.selectedProjectEntity" ng-disabled="!shouldEnableProjectEntitySelect()"><option value="" disabled selected>- Please Select a File</option><option ng-repeat="projectEntity in data.projectEntities" value="{{ projectEntity.path }}">{{ projectEntity.path.slice(1) }}</option></select></div><div class="form-controls row-spaced-small" ng-if="state.isOutputFilesMode"><label for="project-entity-select">Select an Output File</label><span ng-show="state.inFlight.compile"> <i class="fa fa-spinner fa-spin"></i></span><select class="form-control" name="project-output-file-select" ng-model="data.selectedProjectOutputFile" ng-disabled="!shouldEnableProjectOutputFileSelect()"><option value="" disabled selected>- Please Select an Output File</option><option ng-repeat="outputFile in data.projectOutputFiles" value="{{ outputFile.path }}">{{ outputFile.path }}</option></select></div><div class="toggle-output-files-button">or <a href="#" ng-click="toggleOutputFilesMode()"><span ng-show="state.isOutputFilesMode">select from source files</span><span ng-show="!state.isOutputFilesMode">select from output files</span></a></div><div class="form-controls row-spaced-small"><label for="name">File Name In This Project</label><input class="form-control" type="text" placeholder="example.tex" required ng-model="data.name" name="name"></div></form></div><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-when="too many files">This project has reached the 2000 file limit</span><span ng-switch-default>Error, something went wrong!</span></div></div></div><div ng-if="type == 'url'" ng-controller="UrlLinkedFileModalController"><form novalidate name="newLinkedFileForm"><label for="url">URL to fetch the file from</label><input class="form-control" type="text" placeholder="www.example.com/my_file" required ng-model="inputs.url" focus-on="open" on-enter="create()" name="url"><div class="row-spaced-small"><label for="name">File Name In This Project</label><input class="form-control" type="text" placeholder="my_file" required ng-model="inputs.name" ng-change="nameChangedByUser = true" valid-file on-enter="create()" name="name"><div class="text-danger row-spaced-small" ng-show="newDocForm.name.$error.validFile">File name is empty or contains invalid characters</div></div></form><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-when="too many files">This project has reached the 2000 file limit</span><span ng-switch-default>{{error}}</span></div></div></div></td></tr></table></div><div class="modal-footer"><div class="modal-footer-left approaching-file-limit" ng-if="file_count > 1900 && file_count < 2000"> This project is approaching the file limit ({{file_count}}/2000)</div><div class="alert alert-warning at-file-limit" ng-if="file_count >= 2000"> This project has reached the 2000 file limit</div><button class="btn btn-default" ng-disabled="state.inflight" ng-click="cancel()">Cancel</button><button class="btn btn-primary" ng-disabled="state.inflight || !state.valid" ng-click="create()" ng-hide="type == 'upload'"><span ng-hide="state.inflight">Create</span><span ng-show="state.inflight">Creating…</span></button></div></script><script type="text/template" id="qq-file-uploader-template"><div class="qq-uploader-selector"><div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone=""><span class="qq-upload-drop-area-text-selector">Drop files here to upload</span></div><div>Drag here</div><div class="row-spaced-small small">or</div><div class="row-spaced-small"><div class="qq-upload-button-selector btn btn-primary">Select from your computer</div></div><ul class="qq-upload-list-selector"><li><div class="qq-progress-bar-container-selector"><div class="qq-progress-bar-selector qq-progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div></div><span class="qq-upload-file-selector qq-upload-file"></span><span class="qq-upload-size-selector qq-upload-size"></span><a class="qq-btn qq-upload-cancel-selector qq-upload-cancel" type="button">Cancel</a><button class="qq-btn qq-upload-retry-selector qq-upload-retry" type="button">retry</button><span class="qq-upload-status-text-selector qq-upload-status-text" role="status"></span></li></ul></div></script></div></div><div class="outline-container" vertical-resizable-bottom ng-controller="OutlineController"><outline-pane is-tex-file="isTexFile" outline="outline" project-id="project_id" jump-to-line="jumpToLine" on-toggle="onToggle" event-tracking="eventTracking" highlighted-line="highlightedLine"></outline-pane></div></aside><aside class="editor-sidebar full-size" ng-controller="FileTreeController" ng-class="{ 'multi-selected': multiSelectedCount > 0 }" ng-show="ui.view == 'history' && !history.isV2"><div class="file-tree"><div class="file-tree-inner" ng-if="rootFolder" ng-controller="FileTreeRootFolderController" ng-class="no-toolbar"><ul class="list-unstyled file-tree-list" accept=".entity-name" on-drop-callback="onDrop"><file-entity entity="entity" ng-repeat="entity in rootFolder.children | orderBy:[orderByFoldersFirst, 'name']"></file-entity><li ng-show="deletedDocs.length > 0 && ui.view == 'history'"><h3>Deleted Files</h3></li><li ng-class="{ 'selected': entity.selected }" ng-repeat="entity in deletedDocs | orderBy:'name'" ng-controller="FileTreeEntityController" ng-show="ui.view == 'history'"><div class="entity"><div class="entity-name" ng-click="select($event)"><i class="fa fa-fw toggle"></i><i class="fa fa-fw fa-file"></i><span> {{ entity.name }}</span></div></div></li></ul></div></div></aside><script type="text/ng-template" id="entityListItemTemplate"><li ng-class="{ 'selected': entity.selected, 'multi-selected': entity.multiSelected }" ng-controller="FileTreeEntityController"><div class="entity" ng-if="entity.type != 'folder'"><div class="entity-name" ng-click="select($event)" draggable-helper="draggableHelper" context-menu data-target="context-menu-{{ entity.id }}" context-menu-container="body" context-menu-disabled="true"><i class="fa fa-fw toggle" ng-if="entity.type != 'folder'"></i><i class="fa fa-fw" ng-if="entity.type != 'folder'" ng-class="'fa-' + iconTypeFromName(entity.name)"><i class="fa fa-external-link-square fa-rotate-180 linked-file-highlight" ng-if="entity.linkedFileData.provider"></i></i><span ng-hide="entity.renaming"> {{ entity.renamingToName || entity.name }}</span></div></div><div class="entity" ng-if="entity.type == 'folder'" ng-controller="FileTreeFolderController"><div class="entity-name" ng-click="select($event)" draggable-helper="draggableHelper" accept=".entity-name" on-drop-callback="onDrop"><div context-menu data-target="context-menu-{{ entity.id }}" context-menu-container="body" context-menu-disabled="true"><i class="fa fa-fw toggle" ng-if="entity.type == 'folder'" ng-class="{'fa-angle-right': !expanded, 'fa-angle-down': expanded}" ng-click="toggleExpanded()"></i><i class="fa fa-fw" ng-if="entity.type == 'folder'" ng-class="{ 'fa-folder': !expanded, 'fa-folder-open': expanded }" ng-click="select($event)"></i><span ng-hide="entity.renaming"> {{ entity.renamingToName || entity.name }}</span></div></div><ul class="list-unstyled" ng-if="entity.type == 'folder' && (depth == null || depth < MAX_DEPTH)" ng-show="expanded" accept=".entity-name" on-drop-callback="onDrop"><file-entity entity="child" ng-repeat="child in entity.children | orderBy:[orderByFoldersFirst, 'name']" depth="(depth || 0) + 1"></file-entity></ul><div class="entity-limit-hit" ng-if="depth === MAX_DEPTH" ng-show="expanded"><i class="fa fa-fw"></i><span class="entity-limit-hit-message"> Some files might be hidden
<i class="fa fa-question-circle entity-limit-hit-tooltip-trigger" tooltip="Your project has hit Overleaf's maximum file depth limit. Files within this folder won't be visible." tooltip-append-to-body="true" aria-hidden="true"></i><span class="sr-only"> Your project has hit Overleaf's maximum file depth limit. Files within this folder won't be visible. </span></span></div></div></li></script><script type="text/ng-template" id="newFolderModalTemplate"><div class="modal-header"><h3>New Folder</h3></div><div class="modal-body"><form novalidate name="newFolderForm"><input class="form-control" type="text" placeholder="Folder Name" required ng-model="inputs.name" on-enter="create()" select-name-on="open" valid-file name="name"></form><div class="alert alert-danger row-spaced-small" ng-show="newFolderForm.name.$error.validFile">File name is empty or contains invalid characters</div><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-default>{{error}}</span></div></div></div><div class="modal-footer"><button class="btn btn-default" ng-disabled="state.inflight" ng-click="cancel()">Cancel</button><button class="btn btn-primary" ng-disabled="newFolderForm.$invalid || state.inflight" ng-click="create()"><span ng-hide="state.inflight">Create</span><span ng-show="state.inflight">Creating…</span></button></div></script><script type="text/ng-template" id="duplicateFileModalTemplate"><div class="modal-header"><h3>Duplicate File</h3></div><div class="modal-body"><p>An item named <0>'{{ fileName }}'</0> already exists in this location. If you wish to move this file, rename or remove the conflicting file and try again.</p></div><div class="modal-footer"><button class="btn btn-default" ng-click="cancel()">Dismiss</button></div></script><script type="text/ng-template" id="newFileModalTemplate"><div class="modal-header"><h3>Add Files</h3></div><div class="modal-body modal-new-file" ng-show="file_count < 2000"><table><tr><td class="modal-new-file--list"><ul class="list-unstyled"><li ng-class="type == 'doc' ? 'active' : null"><a href ng-click="type = 'doc'"><i class="fa fa-fw fa-file"></i>
New File</a></li><li ng-class="type == 'upload' ? 'active' : null"><a href ng-click="type = 'upload'"><i class="fa fa-fw fa-upload"></i>
Upload</a></li><li ng-class="type == 'project' ? 'active' : null"><a href ng-click="type = 'project'"><i class="fa fa-fw fa-folder-open"></i>
From Another Project</a></li></ul></td><td class="modal-new-file--body modal-new-file--body-{{type}}"><div ng-if="type == 'doc'" ng-controller="NewDocModalController"><form novalidate name="newDocForm"><label for="name">File Name</label><input class="form-control" type="text" placeholder="File Name" required ng-model="inputs.name" on-enter="create()" select-name-on="open" valid-file name="name"></form><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-default>{{error}}</span></div></div><div class="alert alert-danger row-spaced-small" ng-show="newDocForm.name.$error.validFile && newDocForm.name.$viewValue.length">File name is empty or contains invalid characters</div></div><div ng-if="type == 'upload'" ng-controller="UploadFileModalController"><div class="alert alert-warning small" ng-if="tooManyFiles">Maximum {{max_files}} files uploaded together</div><div class="alert alert-warning small" ng-if="rateLimitHit">Too many files uploaded, your uploads have been throttled for short period. Please wait 15 minutes and try again.</div><div class="alert alert-warning small" ng-if="notLoggedIn">Session Expired. Redirecting to login page in {{secondsToRedirect}} seconds</div><div class="alert alert-warning small" ng-if="conflicts.length > 0"><p class="text-center">The following files already exist in this project:</p><ul class="text-center list-unstyled row-spaced-small"><li ng-repeat="conflict in conflicts track by $index"><strong>{{ conflict }}</strong></li></ul><p class="text-center row-spaced-small">Do you want to overwrite them?</p><p class="text-center"><a class="btn btn-primary" href ng-click="doUpload()">Overwrite</a> <a class="btn btn-default" href ng-click="cancel()">Cancel</a></p></div><div fine-upload endpoint="/project/{{ project_id }}/upload" template-id="qq-file-uploader-template" multiple="true" auto-upload="false" on-complete-callback="onComplete" on-upload-callback="onUpload" on-validate-batch="onValidateBatch" on-error-callback="onError" on-submit-callback="onSubmit" on-cancel-callback="onCancel" control="control" params="{'folder_id': parent_folder_id}"></div></div><div ng-if="type == 'project'" ng-controller="ProjectLinkedFileModalController"><div><form><div class="form-controls"><label for="project-select">Select a Project</label><span ng-show="state.inFlight.projects"> <i class="fa fa-spinner fa-spin"></i></span><select class="form-control" name="project-select" ng-model="data.selectedProjectId" ng-disabled="!shouldEnableProjectSelect()"><option value="" disabled selected>- Please Select a Project</option><option ng-repeat="project in data.projects" value="{{ project._id }}">{{ project.name }}</option></select><small ng-if="hasNoProjects() && shouldEnableProjectSelect() ">No other projects found, please create another project first</small></div><div class="form-controls row-spaced-small" ng-if="!state.isOutputFilesMode"><label for="project-entity-select">Select a File</label><span ng-show="state.inFlight.entities"> <i class="fa fa-spinner fa-spin"></i></span><select class="form-control" name="project-entity-select" ng-model="data.selectedProjectEntity" ng-disabled="!shouldEnableProjectEntitySelect()"><option value="" disabled selected>- Please Select a File</option><option ng-repeat="projectEntity in data.projectEntities" value="{{ projectEntity.path }}">{{ projectEntity.path.slice(1) }}</option></select></div><div class="form-controls row-spaced-small" ng-if="state.isOutputFilesMode"><label for="project-entity-select">Select an Output File</label><span ng-show="state.inFlight.compile"> <i class="fa fa-spinner fa-spin"></i></span><select class="form-control" name="project-output-file-select" ng-model="data.selectedProjectOutputFile" ng-disabled="!shouldEnableProjectOutputFileSelect()"><option value="" disabled selected>- Please Select an Output File</option><option ng-repeat="outputFile in data.projectOutputFiles" value="{{ outputFile.path }}">{{ outputFile.path }}</option></select></div><div class="toggle-output-files-button">or <a href="#" ng-click="toggleOutputFilesMode()"><span ng-show="state.isOutputFilesMode">select from source files</span><span ng-show="!state.isOutputFilesMode">select from output files</span></a></div><div class="form-controls row-spaced-small"><label for="name">File Name In This Project</label><input class="form-control" type="text" placeholder="example.tex" required ng-model="data.name" name="name"></div></form></div><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-when="too many files">This project has reached the 2000 file limit</span><span ng-switch-default>Error, something went wrong!</span></div></div></div><div ng-if="type == 'url'" ng-controller="UrlLinkedFileModalController"><form novalidate name="newLinkedFileForm"><label for="url">URL to fetch the file from</label><input class="form-control" type="text" placeholder="www.example.com/my_file" required ng-model="inputs.url" focus-on="open" on-enter="create()" name="url"><div class="row-spaced-small"><label for="name">File Name In This Project</label><input class="form-control" type="text" placeholder="my_file" required ng-model="inputs.name" ng-change="nameChangedByUser = true" valid-file on-enter="create()" name="name"><div class="text-danger row-spaced-small" ng-show="newDocForm.name.$error.validFile">File name is empty or contains invalid characters</div></div></form><div class="alert alert-danger row-spaced-small" ng-if="error"><div ng-switch="error"><span ng-switch-when="already exists">A file or folder with this name already exists</span><span ng-switch-when="too many files">This project has reached the 2000 file limit</span><span ng-switch-default>{{error}}</span></div></div></div></td></tr></table></div><div class="modal-footer"><div class="modal-footer-left approaching-file-limit" ng-if="file_count > 1900 && file_count < 2000"> This project is approaching the file limit ({{file_count}}/2000)</div><div class="alert alert-warning at-file-limit" ng-if="file_count >= 2000"> This project has reached the 2000 file limit</div><button class="btn btn-default" ng-disabled="state.inflight" ng-click="cancel()">Cancel</button><button class="btn btn-primary" ng-disabled="state.inflight || !state.valid" ng-click="create()" ng-hide="type == 'upload'"><span ng-hide="state.inflight">Create</span><span ng-show="state.inflight">Creating…</span></button></div></script><script type="text/template" id="qq-file-uploader-template"><div class="qq-uploader-selector"><div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone=""><span class="qq-upload-drop-area-text-selector">Drop files here to upload</span></div><div>Drag here</div><div class="row-spaced-small small">or</div><div class="row-spaced-small"><div class="qq-upload-button-selector btn btn-primary">Select from your computer</div></div><ul class="qq-upload-list-selector"><li><div class="qq-progress-bar-container-selector"><div class="qq-progress-bar-selector qq-progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div></div><span class="qq-upload-file-selector qq-upload-file"></span><span class="qq-upload-size-selector qq-upload-size"></span><a class="qq-btn qq-upload-cancel-selector qq-upload-cancel" type="button">Cancel</a><button class="qq-btn qq-upload-retry-selector qq-upload-retry" type="button">retry</button><span class="qq-upload-status-text-selector qq-upload-status-text" role="status"></span></li></ul></div></script><script type="text/ng-template" id="deleteEntityModalTemplate"><div class="modal-header"><h3>Delete {{ entity.name }}</h3></div><div class="modal-body"><p>Are you sure you want to permanently delete the following files?</p><ul><li ng-repeat="entity in entities">{{entity.name}}</li></ul></div><div class="modal-footer"><button class="btn btn-default" ng-disabled="state.inflight" ng-click="cancel()">Cancel</button><button class="btn btn-danger" ng-disabled="state.inflight" ng-click="delete()"><span ng-hide="state.inflight">Delete</span><span ng-show="state.inflight">Deleting…</span></button></div></script><script type="text/ng-template" id="invalidFileNameModalTemplate"><div class="modal-header"><h3>Invalid File Name</h3></div><div class="modal-body"><p>File name is empty or contains invalid characters</p></div><div class="modal-footer"><button class="btn btn-default" ng-click="$close()">OK</button></div></script><aside class="editor-sidebar full-size" ng-controller="HistoryV2FileTreeController" ng-if="ui.view == 'history' && history.isV2"><div class="history-file-tree-inner"><history-file-tree files="history.selection.files" selected-pathname="history.selection.pathname" on-selected-file-change="handleFileSelection(file)" is-loading="history.loadingFileTree"></history-file-tree></div></aside><script type="text/ng-template" id="historyFileTreeTpl"><div class="history-file-tree"><history-file-entity ng-repeat="fileEntity in $ctrl._fileTree | orderBy : [ '-type', 'operation', 'name' ]" file-entity="fileEntity" ng-show="!$ctrl.isLoading"></history-file-entity></div></script><script type="text/ng-template" id="historyFileEntityTpl"><div class="history-file-entity-wrapper"><a class="history-file-entity-link" href ng-click="$ctrl.isSelected ? '' : $ctrl.handleClick()" ng-class="{ 'history-file-entity-link-selected': $ctrl.isSelected }"><span class="history-file-entity-name-container"><i class="history-file-entity-icon history-file-entity-icon-folder-state fa fa-fw" ng-class="{ 'fa-chevron-down': ($ctrl.fileEntity.type === 'folder' && $ctrl.isOpen), 'fa-chevron-right': ($ctrl.fileEntity.type === 'folder' && !$ctrl.isOpen) }"></i><i class="history-file-entity-icon fa" ng-class="::$ctrl.entityTypeIconClass"></i><span class="history-file-entity-name" ng-class="::$ctrl.entityOpTextClass">{{ ::$ctrl.fileEntity.name }}</span><span class="history-file-entity-operation-badge" ng-if="::$ctrl.hasOperation && $ctrl.fileEntity.operation !== 'renamed' && $ctrl.fileEntity.operation !== 'removed'">{{ ::$ctrl.getFileOperationName() }}</span><span class="history-file-entity-operation-badge" ng-if="::$ctrl.hasOperation && $ctrl.fileEntity.operation === 'renamed'" tooltip-append-to-body="true" tooltip-placement="right" tooltip-class="tooltip-history-file-tree" tooltip-html="::$ctrl.getRenameTooltip()">{{ ::$ctrl.getFileOperationName() }}</span></span></a><div ng-show="$ctrl.isOpen"><history-file-entity ng-repeat="childEntity in $ctrl.fileEntity.children" file-entity="childEntity"></history-file-entity></div></div></script></div><div class="ui-layout-center"><div class="full-size" ng-show="ui.view == 'editor'" layout="pdf" layout-disabled="ui.pdfLayout != 'sideBySide'" mask-iframes-on-resize="true" resize-on="layout:main:resize" resize-proportionally="true" initial-size-east="'50%'" minimum-restore-size-east="300" allow-overflow-on="'center'"><div class="ui-layout-center" ng-controller="ReviewPanelController" ng-class="{ 'rp-unsupported': editor.showRichText, 'rp-state-current-file': (reviewPanel.subView === SubViews.CUR_FILE), 'rp-state-current-file-expanded': (reviewPanel.subView === SubViews.CUR_FILE && ui.reviewPanelOpen), 'rp-state-current-file-mini': (reviewPanel.subView === SubViews.CUR_FILE && !ui.reviewPanelOpen), 'rp-state-overview': (reviewPanel.subView === SubViews.OVERVIEW), 'rp-size-mini': ui.miniReviewPanelVisible, 'rp-size-expanded': ui.reviewPanelOpen, 'rp-layout-left': reviewPanel.layoutToLeft, 'rp-loading-threads': reviewPanel.loadingThreads, }"><div class="loading-panel" ng-show="(!editor.sharejs_doc || editor.opening) && !editor.error_state"><span ng-show="editor.open_doc_id"><i class="fa fa-spin fa-refresh"></i> Loading…</span><span ng-show="!editor.open_doc_id"><i class="fa fa-arrow-left"></i> Open a file on the left</span></div><div class="toolbar toolbar-editor"></div><div class="multi-selection-ongoing" ng-show="multiSelectedCount > 0"><div class="multi-selection-message"><h4>{{ multiSelectedCount }} files selected.</h4></div></div><div id="editor" ace-editor="editor" ng-if="!editor.showRichText" ng-show="!!editor.sharejs_doc && !editor.opening && multiSelectedCount === 0 && !editor.error_state" theme="settings.editorTheme" keybindings="settings.mode" font-size="settings.fontSize" auto-complete="settings.autoComplete" auto-pair-delimiters="settings.autoPairDelimiters" spell-check="!anonymous" spell-check-language="project.spellCheckLanguage" highlights="onlineUserCursorHighlights[editor.open_doc_id]" show-print-margin="false" sharejs-doc="editor.sharejs_doc" last-updated="editor.last_updated" cursor-position="editor.cursorPosition" goto-line="editor.gotoLine" resize-on="layout:main:resize,layout:pdf:resize,layout:review:resize,review-panel:toggle,layout:flat-screen:toggle" annotations="pdf.logEntryAnnotations[editor.open_doc_id]" read-only="!permissions.write" file-name="editor.open_doc_name" on-ctrl-enter="recompileViaKey" on-save="recompileViaKey" on-ctrl-j="toggleReviewPanel" on-ctrl-shift-c="addNewCommentFromKbdShortcut" on-ctrl-shift-a="toggleTrackChangesFromKbdShortcut" syntax-validation="settings.syntaxValidation" review-panel="reviewPanel" events-bridge="reviewPanelEventsBridge" track-changes="editor.trackChanges" doc-id="editor.open_doc_id" renderer-data="reviewPanel.rendererData" font-family="settings.fontFamily" line-height="settings.lineHeight"></div><div id="review-panel"><div class="rp-in-editor-widgets"><a class="rp-track-changes-indicator" href ng-if="editor.wantTrackChanges" ng-click="toggleReviewPanel();" ng-class="{ 'rp-track-changes-indicator-on-dark' : darkTheme }">Track changes is <strong>on</strong></a><a class="rp-bulk-actions-btn" href ng-if="reviewPanel.nVisibleSelectedChanges > 1" ng-click="showBulkAcceptDialog();"><i class="fa fa-check"></i> Accept all
({{ reviewPanel.nVisibleSelectedChanges }})</a><a class="rp-bulk-actions-btn" href ng-if="reviewPanel.nVisibleSelectedChanges > 1" ng-click="showBulkRejectDialog();"><i class="fa fa-times"></i> Reject all
({{ reviewPanel.nVisibleSelectedChanges }})</a></div><a class="review-panel-toggler" href ng-click="handleTogglerClick($event);"></a><div class="review-panel-toolbar"><resolved-comments-dropdown class="rp-flex-block" entries="reviewPanel.resolvedComments" threads="reviewPanel.commentThreads" resolved-ids="reviewPanel.resolvedThreadIds" docs="docs" on-open="refreshResolvedCommentsDropdown();" on-unresolve="unresolveComment(threadId);" on-delete="deleteThread(entryId, docId, threadId);" is-loading="reviewPanel.dropdown.loading" permissions="permissions"></resolved-comments-dropdown><span class="review-panel-toolbar-label"><span class="review-panel-toolbar-icon-on" ng-if="editor.wantTrackChanges === true"><i class="fa fa-circle"></i></span><span ng-click="toggleFullTCStateCollapse();"><span ng-if="editor.wantTrackChanges === false">Track changes is <strong>off</strong></span><span ng-if="editor.wantTrackChanges === true">Track changes is <strong>on</strong></span><span class="rp-tc-state-collapse" ng-class="{ 'rp-tc-state-collapse-on': reviewPanel.fullTCStateCollapsed }"><i class="fa fa-angle-down"></i></span></span></span><ul class="rp-tc-state" review-panel-collapse-height="reviewPanel.fullTCStateCollapsed"><li class="rp-tc-state-item rp-tc-state-item-everyone"><span class="rp-tc-state-item-name" tooltip="Toggle track-changes for everyone" tooltip-placement="left" tooltip-append-to-body="true" tooltip-popup-delay="1000">Everyone</span><review-panel-toggle description="Track changes for everyone" ng-model="reviewPanel.trackChangesOnForEveryone" on-toggle="toggleTrackChangesForEveryone(isOn);" is-disabled="!project.features.trackChanges || !permissions.write"></review-panel-toggle></li><li class="rp-tc-state-item" ng-repeat="member in reviewPanel.formattedProjectMembers"><span class="rp-tc-state-item-name" ng-class="{ 'rp-tc-state-item-name-disabled' : reviewPanel.trackChangesOnForEveryone}" style="color: hsl({{ member.hue }}, 70%, 40%);" tooltip="Toggle track-changes for this user" tooltip-placement="left" tooltip-append-to-body="true" tooltip-popup-delay="1000">{{ member.name }}</span><review-panel-toggle description="Track changes for {{ member.name }}" ng-model="reviewPanel.trackChangesState[member.id].value" on-toggle="toggleTrackChangesForUser(isOn, member.id);" is-disabled="reviewPanel.trackChangesOnForEveryone || !project.features.trackChanges || !permissions.write"></review-panel-toggle></li><li class="rp-tc-state-separator"></li><li class="rp-tc-state-item rp-tc-state-item-guests"><span class="rp-tc-state-item-name" ng-class="{ 'rp-tc-state-item-name-disabled' : reviewPanel.trackChangesOnForEveryone}" tooltip="Toggle track-changes for all link-sharing guests" tooltip-placement="left" tooltip-append-to-body="true" tooltip-popup-delay="1000">Guests</span><review-panel-toggle description="Track changes for guests" ng-model="reviewPanel.trackChangesOnForGuests" on-toggle="toggleTrackChangesForGuests(isOn);" is-disabled="reviewPanel.trackChangesOnForEveryone || !project.features.trackChanges || !permissions.write || !reviewPanel.trackChangesForGuestsAvailable"></review-panel-toggle></li></ul></div><div class="rp-entry-list" review-panel-sorted ng-if="reviewPanel.subView === SubViews.CUR_FILE"><div class="rp-entry-list-inner"><div class="rp-entry-wrapper" ng-repeat="(entry_id, entry) in reviewPanel.entries[editor.open_doc_id]" ng-if="entry.visible"><div ng-if="entry.type === 'insert' || entry.type === 'delete'"><change-entry entry="entry" user="users[entry.metadata.user_id]" on-reject="rejectChanges(entry.entry_ids);" on-accept="acceptChanges(entry.entry_ids);" on-indicator-click="toggleReviewPanel();" on-body-click="gotoEntry(editor.open_doc_id, entry)" permissions="permissions"></change-entry></div><div ng-if="entry.type === 'aggregate-change'"><aggregate-change-entry entry="entry" user="users[entry.metadata.user_id]" on-reject="rejectChanges(entry.entry_ids);" on-accept="acceptChanges(entry.entry_ids);" on-indicator-click="toggleReviewPanel();" on-body-click="gotoEntry(editor.open_doc_id, entry)" permissions="permissions"></aggregate-change-entry></div><div ng-if="entry.type === 'comment'"><comment-entry entry="entry" threads="reviewPanel.commentThreads" on-resolve="resolveComment(entry, entry_id)" on-reply="submitReply(entry, entry_id);" on-indicator-click="toggleReviewPanel();" on-save-edit="saveEdit(entry.thread_id, comment)" on-delete="deleteComment(entry.thread_id, comment)" on-body-click="gotoEntry(editor.open_doc_id, entry)" permissions="permissions" ng-if="!reviewPanel.loadingThreads"></comment-entry></div><div ng-if="entry.type === 'add-comment' && permissions.comment"><add-comment-entry on-start-new="startNewComment();" on-submit="submitNewComment(content);" on-cancel="cancelNewComment();"></add-comment-entry></div><div ng-if="entry.type === 'bulk-actions'"><bulk-actions-entry on-bulk-accept="showBulkAcceptDialog();" on-bulk-reject="showBulkRejectDialog();" n-entries="reviewPanel.nVisibleSelectedChanges"></bulk-actions-entry></div></div></div></div><div class="rp-entry-list" ng-if="reviewPanel.subView === SubViews.OVERVIEW"><div class="rp-loading" ng-if="reviewPanel.overview.loading"><i class="fa fa-spinner fa-spin"></i></div><div class="rp-overview-file" ng-repeat="doc in docs" ng-if="!reviewPanel.overview.loading"><div class="rp-overview-file-header" ng-if="(reviewPanel.entries[doc.doc.id] != null) && (reviewPanel.entries[doc.doc.id] | notEmpty)" ng-click="reviewPanel.overview.docsCollapsedState[doc.doc.id] = ! reviewPanel.overview.docsCollapsedState[doc.doc.id]"><span class="rp-overview-file-header-collapse" ng-class="{ 'rp-overview-file-header-collapse-on': reviewPanel.overview.docsCollapsedState[doc.doc.id] }"><i class="fa fa-angle-down"></i></span>{{ doc.path }}<span class="rp-overview-file-num-entries" ng-show="reviewPanel.overview.docsCollapsedState[doc.doc.id]"> ({{ reviewPanel.entries[doc.doc.id] | numKeys }})</span></div><div class="rp-overview-file-entries" review-panel-collapse-height="reviewPanel.overview.docsCollapsedState[doc.doc.id]"><div class="rp-entry-wrapper" ng-repeat="(entry_id, entry) in reviewPanel.entries[doc.doc.id] | orderOverviewEntries" ng-if="!(entry.type === 'comment' && reviewPanel.commentThreads[entry.thread_id].resolved === true)"><div ng-if="entry.type === 'insert' || entry.type === 'delete'"><change-entry entry="entry" user="users[entry.metadata.user_id]" ng-click="gotoEntry(doc.doc.id, entry)" permissions="permissions"></change-entry></div><div ng-if="entry.type === 'aggregate-change'"><aggregate-change-entry entry="entry" user="users[entry.metadata.user_id]" ng-click="gotoEntry(editor.open_doc_id, entry)" permissions="permissions"></aggregate-change-entry></div><div ng-if="entry.type === 'comment'"><comment-entry entry="entry" threads="reviewPanel.commentThreads" on-reply="submitReply(entry, entry_id);" on-save-edit="saveEdit(entry.thread_id, comment)" on-delete="deleteComment(entry.thread_id, comment)" ng-click="gotoEntry(doc.doc.id, entry)" permissions="permissions"></comment-entry></div></div></div></div></div><div class="rp-nav"><a class="rp-nav-item" href ng-click="setSubView(SubViews.CUR_FILE);" ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.CUR_FILE }"><i class="fa fa-file-text-o"></i><span class="rp-nav-label">Current file</span></a><a class="rp-nav-item" href ng-click="setSubView(SubViews.OVERVIEW);" ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.OVERVIEW }"><i class="fa fa-list"></i><span class="rp-nav-label">Overview</span></a></div><div class="rp-unsupported-msg-wrapper"><div class="rp-unsupported-msg"><i class="fa fa-5x fa-exclamation-triangle"></i><p class="rp-unsupported-msg-title">Track Changes support in rich text mode is a work in progress.</p><p>You can see tracked insertions and deletions, but you can't see comments and changes in this side bar yet.</p><p>We're working hard to add them as soon as they're ready.</p></div></div></div><script type="text/ng-template" id="changeEntryTemplate"><div><div class="rp-entry-callout" ng-class="'rp-entry-callout-' + entry.type"></div><div class="rp-entry-indicator" ng-switch="entry.type" ng-class="{ 'rp-entry-indicator-focused': entry.focused }" ng-click="onIndicatorClick();"><i class="fa fa-pencil" ng-switch-when="insert"></i><i class="rp-icon-delete" ng-switch-when="delete"></i></div><div class="rp-entry" ng-class="[ 'rp-entry-' + entry.type, (entry.focused ? 'rp-entry-focused' : '')]"><div class="rp-entry-body"><div class="rp-entry-action-icon" ng-switch="entry.type"><i class="fa fa-pencil" ng-switch-when="insert"></i><i class="rp-icon-delete" ng-switch-when="delete"></i></div><div class="rp-entry-details"><div class="rp-entry-description" ng-switch="entry.type"><span ng-switch-when="insert">Added <ins class="rp-content-highlight">{{ entry.content | limitTo:(isCollapsed ? contentLimit : entry.content.length) }}</ins><a class="rp-collapse-toggle" href ng-if="needsCollapsing" ng-click="toggleCollapse();">{{ isCollapsed ? '… (show all)' : ' (show less)' }}</a></span><span ng-switch-when="delete">Deleted <del class="rp-content-highlight">{{ entry.content | limitTo:(isCollapsed ? contentLimit : entry.content.length) }}</del><a class="rp-collapse-toggle" href ng-if="needsCollapsing" ng-click="toggleCollapse();">{{ isCollapsed ? '… (show all)' : ' (show less)' }}</a></span></div><div class="rp-entry-metadata">{{ entry.metadata.ts | date : 'MMM d, y h:mm a' }} • <span class="rp-entry-user" style="color: hsl({{ user.hue }}, 70%, 40%);">{{ user.name }}</span></div></div></div><div class="rp-entry-actions" ng-if="permissions.write"><a class="rp-entry-button" href ng-click="onReject();"><i class="fa fa-times"></i> Reject</a><a class="rp-entry-button" href ng-click="onAccept();"><i class="fa fa-check"></i> Accept</a></div></div></div></script><script type="text/ng-template" id="aggregateChangeEntryTemplate"><div><div class="rp-entry-callout rp-entry-callout-aggregate"></div><div class="rp-entry-indicator" ng-class="{ 'rp-entry-indicator-focused': entry.focused }" ng-click="onIndicatorClick();"><i class="fa fa-pencil"></i></div><div class="rp-entry rp-entry-aggregate" ng-class="{ 'rp-entry-focused': entry.focused }"><div class="rp-entry-body"><div class="rp-entry-action-icon"><i class="fa fa-pencil"></i></div><div class="rp-entry-details"><div class="rp-entry-description">Changed <del class="rp-content-highlight">{{ entry.metadata.replaced_content | limitTo:(isDeletionCollapsed ? contentLimit : entry.metadata.replaced_contentlength) }}</del><a class="rp-collapse-toggle" href ng-if="deletionNeedsCollapsing" ng-click="toggleDeletionCollapse();">{{ isDeletionCollapsed ? '… (show all)' : ' (show less)' }}</a> to <ins class="rp-content-highlight">{{ entry.content | limitTo:(isInsertionCollapsed ? contentLimit : entry.contentlength) }}</ins><a class="rp-collapse-toggle" href ng-if="insertionNeedsCollapsing" ng-click="toggleInsertionCollapse();">{{ isInsertionCollapsed ? '… (show all)' : ' (show less)' }}</a></div><div class="rp-entry-metadata">{{ entry.metadata.ts | date : 'MMM d, y h:mm a' }} • <span class="rp-entry-user" style="color: hsl({{ user.hue }}, 70%, 40%);">{{ user.name }}</span></div></div></div><div class="rp-entry-actions" ng-if="permissions.write"><a class="rp-entry-button" href ng-click="onReject();"><i class="fa fa-times"></i> Reject</a><a class="rp-entry-button" href ng-click="onAccept();"><i class="fa fa-check"></i> Accept</a></div></div></div></script><script type="text/ng-template" id="commentEntryTemplate"><div class="rp-comment-wrapper" ng-class="{ 'rp-comment-wrapper-resolving': state.animating }"><div class="rp-entry-callout rp-entry-callout-comment"></div><div class="rp-entry-indicator" ng-class="{ 'rp-entry-indicator-focused': entry.focused }" ng-click="onIndicatorClick();"><i class="fa fa-comment"></i></div><div class="rp-entry rp-entry-comment" ng-class="{ 'rp-entry-focused': entry.focused, 'rp-entry-comment-resolving': state.animating }"><div class="rp-loading" ng-if="!threads[entry.thread_id].submitting && (!threads[entry.thread_id] || threads[entry.thread_id].messages.length == 0)">No comments</div><div class="rp-comment-loaded"><div class="rp-comment" ng-repeat="comment in threads[entry.thread_id].messages track by comment.id"><p class="rp-comment-content"><span ng-if="!comment.editing"><span class="rp-entry-user" style="color: hsl({{ comment.user.hue }}, 70%, 40%);">{{ comment.user.name }}: </span><span ng-bind-html="comment.content | linky:'_blank':{rel: 'noreferrer noopener'}"></span></span><textarea class="rp-comment-input" expandable-text-area ng-if="comment.editing" ng-model="comment.content" ng-keypress="saveEditOnEnter($event, comment);" ng-blur="saveEdit(comment)" autofocus stop-propagation="click"></textarea></p><div class="rp-entry-metadata" ng-if="!comment.editing"><span ng-if="!comment.deleting">{{ comment.timestamp | date : 'MMM d, y h:mm a' }}</span><span class="rp-comment-actions" ng-if="comment.user.isSelf && !comment.deleting"> • <a href ng-click="startEditing(comment)">Edit</a><span ng-if="threads[entry.thread_id].messages.length > 1"> • <a href ng-click="confirmDelete(comment)">Delete</a></span></span><span class="rp-confim-delete" ng-if="comment.user.isSelf && comment.deleting">Are you sure?
• <a href ng-click="doDelete(comment)">Delete</a> • <a href ng-click="cancelDelete(comment)">Cancel</a></span></div></div></div><div class="rp-loading" ng-if="threads[entry.thread_id].submitting"><i class="fa fa-spinner fa-spin"></i></div><div class="rp-comment-reply" ng-if="permissions.comment"><textarea class="rp-comment-input" expandable-text-area ng-model="entry.replyContent" ng-keypress="handleCommentReplyKeyPress($event);" stop-propagation="click" placeholder="Hit Enter to reply"></textarea></div><div class="rp-entry-actions"><button class="rp-entry-button" ng-click="animateAndCallOnResolve();" ng-if="permissions.comment && permissions.write"><i class="fa fa-inbox"></i> Resolve</button><button class="rp-entry-button" ng-click="onReply();" ng-if="permissions.comment" ng-disabled="!entry.replyContent.length"><i class="fa fa-reply"></i> Reply</button></div></div></div></script><script type="text/ng-template" id="resolvedCommentEntryTemplate"><div class="rp-resolved-comment"><div><div class="rp-resolved-comment-context">Quoted text in <span class="rp-resolved-comment-context-file">{{ thread.docName }}</span><p class="rp-resolved-comment-context-quote"><span>{{ thread.content | limitTo:(isCollapsed ? contentLimit : thread.content.length)}}</span><a class="rp-collapse-toggle" href ng-if="needsCollapsing" ng-click="toggleCollapse();"> {{ isCollapsed ? '… (show all)' : ' (show less)' }}</a></p></div><div class="rp-comment" ng-repeat="comment in thread.messages track by comment.id"><p class="rp-comment-content"><span class="rp-entry-user" style="color: hsl({{ comment.user.hue }}, 70%, 40%);" ng-if="$first || comment.user.id !== thread.messages[$index - 1].user.id">{{ comment.user.name }}: </span><span ng-bind-html="comment.content | linky:'_blank':{rel: 'noreferrer noopener'}"></span></p><div class="rp-entry-metadata">{{ comment.timestamp | date : 'MMM d, y h:mm a' }}</div></div><div class="rp-comment rp-comment-resolver"><p class="rp-comment-resolver-content"><span class="rp-entry-user" style="color: hsl({{ thread.resolved_by_user.hue }}, 70%, 40%);">{{ thread.resolved_by_user.name }}: </span>Mark as resolved.</p><div class="rp-entry-metadata">{{ thread.resolved_at | date : 'MMM d, y h:mm a' }}</div></div></div><div class="rp-entry-actions" ng-if="permissions.comment && permissions.write"><a class="rp-entry-button" href ng-click="onUnresolve({ 'threadId': thread.threadId });"> Re-open</a><a class="rp-entry-button" href ng-click="onDelete({ 'entryId': thread.entryId, 'docId': thread.docId, 'threadId': thread.threadId });"> Delete</a></div></div></script><script type="text/ng-template" id="addCommentEntryTemplate"><div><div class="rp-entry-callout rp-entry-callout-add-comment"></div><div class="rp-entry rp-entry-add-comment" ng-class="[ (state.isAdding ? 'rp-entry-adding-comment' : ''), (entry.focused ? 'rp-entry-focused' : '')]"><a class="rp-add-comment-btn" href ng-if="!state.isAdding" ng-click="startNewComment();"><i class="fa fa-comment"></i> Add comment</a><div ng-if="state.isAdding"><div class="rp-new-comment"><textarea class="rp-comment-input" expandable-text-area ng-model="state.content" ng-keypress="handleCommentKeyPress($event);" placeholder="Add your comment here" focus-on="comment:new:open"></textarea></div><div class="rp-entry-actions"><button class="rp-entry-button rp-entry-button-cancel" ng-click="cancelNewComment();"><i class="fa fa-times"></i> Cancel</button><button class="rp-entry-button" ng-click="submitNewComment()" ng-disabled="!state.content.length"><i class="fa fa-comment"></i> Comment</button></div></div></div></div></script><script type="text/ng-template" id="bulkActionsEntryTemplate"><div ng-if="nEntries > 1"><div class="rp-entry-callout rp-entry-callout-bulk-actions"></div><div class="rp-entry rp-entry-bulk-actions"><a class="rp-bulk-actions-btn" href ng-click="bulkReject();"><i class="fa fa-times"></i> Reject all
({{ nEntries }})</a><a class="rp-bulk-actions-btn" href ng-click="bulkAccept();"><i class="fa fa-check"></i> Accept all
({{ nEntries }})</a></div></div></script><script type="text/ng-template" id="resolvedCommentsDropdownTemplate"><div class="resolved-comments"><div class="resolved-comments-backdrop" ng-class="{ 'resolved-comments-backdrop-visible' : state.isOpen }" ng-click="state.isOpen = false"></div><a class="resolved-comments-toggle" href ng-click="toggleOpenState();" tooltip="Resolved comments" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fa fa-inbox"></i></a><div class="resolved-comments-dropdown" ng-class="{ 'resolved-comments-dropdown-open' : state.isOpen }"><div class="rp-loading" ng-if="isLoading"><i class="fa fa-spinner fa-spin"></i></div><div class="resolved-comments-scroller" ng-if="!isLoading"><resolved-comment-entry ng-repeat="thread in resolvedComments | orderBy:'resolved_at':true" thread="thread" on-unresolve="handleUnresolve(threadId);" on-delete="handleDelete(entryId, docId, threadId);" permissions="permissions"></resolved-comment-entry><div class="rp-loading" ng-if="!resolvedComments.length">No resolved threads.</div></div></div></div></script><script type="text/ng-template" id="trackChangesUpgradeModalTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>Upgrade to Track Changes</h3></div><div class="modal-body"><div class="teaser-video-container"><video class="teaser-video" autoplay loop><source ng-src="{{ '/img/teasers/track-changes/teaser-track-changes.mp4' }}" type="video/mp4"><img src="/img/teasers/track-changes/teaser-track-changes.gif"></video></div><h4 class="teaser-title">See changes in your documents, live</h4><p class="small" ng-show="startedFreeTrial">Please refresh this page after starting your free trial.</p><div class="row"><div class="col-md-10 col-md-offset-1"><ul class="list-unstyled"><li><i class="fa fa-check"> </i>Track any change, in real-time</li><li><i class="fa fa-check"> </i>Review your peers' work</li><li><i class="fa fa-check"> </i>Accept or reject each change individually</li></ul></div></div><div class="row text-center"><div ng-show="user.allowedFreeTrial" ng-controller="FreeTrialModalController"><a class="btn btn-success" href ng-click="startFreeTrial('real-time-track-changes')" ng-show="project.owner._id == user.id">Try it for free</a></div><div ng-show="!user.allowedFreeTrial" ng-controller="UpgradeModalController"><a class="btn btn-success" href ng-click="upgradePlan('projectMembers')" ng-show="project.owner._id == user.id">Upgrade</a></div><p ng-show="project.owner._id != user.id"><strong>Please ask the project owner to upgrade to use track changes</strong></p></div></div><div class="modal-footer"><button class="btn btn-default" ng-click="cancel()"><span>Close</span></button></div></script><script type="text/ng-template" id="bulkActionsModalTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>{{ isAccept ? 'Accept all' : 'Reject all' }}</h3></div><div class="modal-body"><p ng-if="isAccept">Are you sure you want to accept the selected {{ nChanges }} changes?</p><p ng-if="!isAccept">Are you sure you want to reject the selected {{ nChanges }} changes?</p></div><div class="modal-footer"><button class="btn btn-default" ng-click="cancel()"><span>Cancel</span></button><button class="btn btn-primary" ng-click="confirm()"><span>OK</span></button></div></script></div><div class="ui-layout-east"><div ng-if="ui.pdfLayout == 'sideBySide'"><div class="full-size pdf" ng-controller="PdfController"><div class="toolbar toolbar-pdf" ng-class="{ 'changes-to-autocompile': changesToAutoCompile && !autoCompileLintingError }"><div class="btn-group btn-recompile-group" id="recompile" dropdown tooltip-html="'Recompile the PDF <span class="keyboard-shortcut">({{modifierKey}} + Enter)</span>'" tooltip-class="keyboard-tooltip" tooltip-popup-delay="500" tooltip-append-to-body="true" tooltip-placement="bottom"><a class="btn btn-recompile" href ng-disabled="pdf.compiling" ng-click="recompile()"><i class="fa fa-refresh" ng-class="{'fa-spin': pdf.compiling }"></i><span class="btn-recompile-label" ng-show="!pdf.compiling">Recompile</span><span class="btn-recompile-label" ng-show="pdf.compiling">Compiling…</span></a><a class="btn btn-recompile dropdown-toggle" href ng-disabled="pdf.compiling" dropdown-toggle><span class="caret"></span></a><ul class="dropdown-menu dropdown-menu-left"><li class="dropdown-header">Auto Compile</li><li><a href ng-click="autocompile_enabled = true"><i class="fa fa-fw" ng-class="{'fa-check': autocompile_enabled}"></i> On</a></li><li><a href ng-click="autocompile_enabled = false"><i class="fa fa-fw" ng-class="{'fa-check': !autocompile_enabled}"></i> Off</a></li><li class="dropdown-header">Compile Mode</li><li><a href ng-click="draft = false"><i class="fa fa-fw" ng-class="{'fa-check': !draft}"></i> Normal</a></li><li><a href ng-click="draft = true"><i class="fa fa-fw" ng-class="{'fa-check': draft}"></i> Fast <span class="subdued">[draft]</span></a></li><li class="dropdown-header">Syntax Checks</li><li><a href ng-click="stop_on_validation_error = true"><i class="fa fa-fw" ng-class="{'fa-check': stop_on_validation_error}"></i> Check syntax before compile</a></li><li><a href ng-click="stop_on_validation_error = false"><i class="fa fa-fw" ng-class="{'fa-check': !stop_on_validation_error}"></i> Don't check syntax</a></li><li><a href ng-click="recompile({check:true})"><i class="fa fa-fw"></i> Run syntax check now</a></li></ul></div><a href ng-click="stop()" ng-show="pdf.compiling" tooltip="Stop compilation" tooltip-placement="bottom"><i class="fa fa-fw fa-stop"></i></a><a class="log-btn" href ng-click="toggleLogs()" ng-class="{ 'active': shouldShowLogs == true }" tooltip="Logs and output files" tooltip-placement="bottom"><i class="fa fa-fw fa-file-text-o"></i><span class="label" ng-show="pdf.logEntries.warnings.length + pdf.logEntries.errors.length > 0" ng-class="{ 'label-warning': pdf.logEntries.errors.length == 0, 'label-danger': pdf.logEntries.errors.length > 0 }">{{ pdf.logEntries.errors.length + pdf.logEntries.warnings.length }}</span></a><a ng-if="!pdf.downloadUrl" disabled href="#" tooltip="Please compile your project before downloading the PDF" tooltip-placement="bottom"><i class="fa fa-fw fa-download"></i></a><a ng-href="{{pdf.downloadUrl || pdf.url}}" target="_blank" ng-if="pdf.url" tooltip="Download PDF" tooltip-placement="bottom"><i class="fa fa-fw fa-download"></i></a><div class="toolbar-right"><span class="auto-compile-status small" ng-show="changesToAutoCompile && !compiling && !autoCompileLintingError">Uncompiled Changes</span><span class="auto-compile-status auto-compile-error small" ng-show="autoCompileLintingError" tooltip-placement="bottom" tooltip="Your code has errors that need to be fixed before the auto-compile can run" tooltip-append-to-body="true"><i class="fa fa-fw fa-exclamation-triangle"></i>
Code check failed</span><a href ng-click="switchToFlatLayout('pdf')" ng-show="ui.pdfLayout == 'sideBySide'" tooltip="Full screen" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fa fa-expand"></i></a><a href ng-click="switchToSideBySideLayout('editor')" ng-show="ui.pdfLayout == 'flat'" tooltip="Split screen" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fa fa-compress"></i></a></div></div><!-- end of toolbar--><!-- logs view--><div class="pdf-logs" ng-show="shouldShowLogs"><div class="alert alert-success" ng-show="pdf.logEntries.all.length == 0 && !pdf.failure">No errors, good job!</div><div class="alert alert-danger" ng-show="pdf.failure"><strong>Compile Error. </strong><span>Sorry, your LaTeX code couldn't compile for some reason. Please check the errors below for details, or view the raw log.</span></div><div class="alert alert-danger" ng-show="pdf.failedCheck"><strong>It looks like your project has some fatal syntax errors that you should fix before we compile it.</strong><p></p><p class="text-center" ng-show="!check"><a class="text-info" href ng-disabled="pdf.compiling" ng-click="recompile({try:true})">Try compiling anyway</a> or <a class="text-info" href ng-disabled="pdf.compiling" ng-click="recompile({force:true})">turn off syntax checking</a>.</p></div><div ng-repeat="entry in pdf.logEntries.all"><div class="alert" ng-class="{ 'alert-danger': entry.level == 'error', 'alert-warning': entry.level == 'warning', 'alert-info': entry.level == 'typesetting' }" ng-click="openInEditor(entry)"><span class="line-no"><i class="fa fa-link" aria-hidden="true"></i> <span ng-show="entry.file">{{ entry.file }}</span><span ng-show="entry.line">, line {{ entry.line }}</span></span><p class="entry-message" ng-show="entry.message">{{ entry.type }} {{ entry.message }}</p><div class="card card-hint" ng-if="entry.humanReadableHint" stop-propagation="click"><figure class="card-hint-icon-container"><i class="fa fa-lightbulb-o" aria-hidden="true"></i></figure><p class="card-hint-text" ng-show="entry.humanReadableHint" ng-bind-html="entry.humanReadableHint"></p><div class="card-hint-footer clearfix"><div class="card-hint-ext-link" ng-if="entry.extraInfoURL"><a ng-href="{{ entry.extraInfoURL }}" ng-click="trackLogHintsLearnMore()" target="_blank"><i class="fa fa-external-link"></i> Learn more</a></div></div></div><p class="entry-content" ng-show="entry.content">{{ entry.content.trim() }}</p></div></div><div><div class="files-dropdown-container"><a class="btn btn-default btn-sm" href tooltip="Clear cached files" tooltip-placement="top" tooltip-append-to-body="true" ng-click="openClearCacheModal()"><i class="fa fa-trash-o"></i></a> <div class="files-dropdown" ng-class="shouldDropUp ? 'dropup' : 'dropdown'" dropdown><a class="btn btn-default btn-sm" href dropdown-toggle>Other logs and files<span class="caret"></span></a><ul class="dropdown-menu dropdown-menu-right"><li ng-repeat="file in pdf.outputFiles"><a href="{{file.url}}" target="_blank">{{ file.name }}</a></li></ul></div></div><a class="btn btn-info btn-sm" href ng-click="toggleRawLog()"><span ng-show="!pdf.showRawLog">View Raw Logs</span><span ng-show="pdf.showRawLog">Hide Raw Logs</span></a></div><pre ng-bind="pdf.rawLog" ng-show="pdf.showRawLog"></pre></div><!-- non-log views (pdf and errors)--><div ng-show="!shouldShowLogs" ng-switch on="pdf.view"><div class="pdf-uncompiled" ng-switch-when="uncompiled" ng-show="!pdf.compiling"> <i class="fa fa-level-up fa-flip-horizontal fa-2x"></i> Click here to preview your work as a PDF.</div><div class="pdf-viewer" ng-switch-when="pdf"><div pdfng ng-if="settings.pdfViewer == 'pdfjs'" pdf-src="pdf.url" key="{{ project_id }}" resize-on="layout:main:resize,layout:pdf:resize" highlights="pdf.highlights" position="pdf.position" dbl-click-callback="syncToCode"></div><iframe ng-src="{{ pdf.url | trusted }}" ng-if="settings.pdfViewer == 'native'"></iframe></div><div class="pdf-validation-problems" ng-switch-when="validation-problems"><div class="alert alert-danger" ng-show="pdf.validation.sizeCheck"><strong>Project too large </strong><div>This project has too much editable text, please try and reduce it. The largest files are:</div><div><li ng-repeat="entry in pdf.validation.sizeCheck.resources">{{ '/'+entry['path'] }} - {{entry['kbSize']}}kb</li></div></div><div class="alert alert-danger" ng-show="pdf.validation.conflictedPaths"><div><strong>Conflicting Paths Found</strong></div><div>The following files and folders conflict with the same path</div><div><li ng-repeat="entry in pdf.validation.conflictedPaths">{{ '/'+entry['path'] }}</li></div></div><div class="alert alert-danger" ng-show="pdf.validation.mainFile"><strong>Unknown main document </strong><span>Please choose the main file for this project in the project menu. </span></div></div><div class="pdf-errors" ng-switch-when="errors"><div class="alert alert-danger" ng-show="pdf.error"><strong>Server Error </strong><span>Sorry, something went wrong and your project could not be compiled. Please try again in a few moments.</span></div><div class="alert alert-danger" ng-show="pdf.renderingError"><strong>PDF Rendering Error </strong><span>Something went wrong while rendering this PDF.</span></div><div class="alert alert-danger" ng-show="pdf.clsiMaintenance"><strong>Server Error </strong><span>The compile servers are down for maintenance, and will be back shortly.</span></div><div class="alert alert-danger" ng-show="pdf.clsiUnavailable"><strong>Server Error </strong><span>Sorry, the compile server for your project was temporarily unavailable. Please try again in a few moments.</span></div><div class="alert alert-danger" ng-show="pdf.tooRecentlyCompiled"><strong>Server Error </strong><span>This project was compiled very recently, so this compile has been skipped.</span></div><div class="alert alert-danger" ng-show="pdf.compileTerminated"><strong>Compilation cancelled. </strong><span>The compile was cancelled using the 'Stop Compilation' button. You can download the raw logs to see where the compile stopped.</span></div><div class="alert alert-danger" ng-show="pdf.rateLimited"><strong>Compile rate limit hit </strong><span>This project has been flagged for compiling too often. The limit will be lifted shortly.</span></div><div class="alert alert-danger" ng-show="pdf.compileInProgress"><strong>Compile already running in another window. </strong><span>Please wait for your other compile to finish before trying again.</span></div><div class="alert alert-danger" ng-show="pdf.timedout"><p><strong>Timed out. </strong><span>Sorry, your compile took too long to run and timed out. This may be due to a LaTeX error, or a large number of high-res images or complicated diagrams.</span></p><p><a class="text-info" href="https://www.sharelatex.com/learn/Debugging_Compilation_timeout_errors" target="_blank">Learn how to fix compile timeouts</a></p></div><div class="alert alert-danger" ng-show="pdf.autoCompileDisabled"><p><strong>Autocompile disabled. </strong><span>Due to high server load, background recompilation has been temporarily disabled. Please recompile by clicking the button above.</span></p></div><div class="alert alert-danger" ng-show="pdf.projectTooLarge"><strong>Project too large </strong><span>This project has too much editable text, please try and reduce it. The largest files are:</span></div></div></div></div><script type="text/ng-template" id="clearCacheModalTemplate"><div class="modal-header"><h3>Clear cache?</h3></div><div class="modal-body"><p>This will clear all hidden LaTeX files (.aux, .bbl, etc) from our compile server. You generally don't need to do this unless you're having trouble with references.</p><p>Your project files will not be deleted or changed.</p><div class="alert alert-danger" ng-if="state.error">Sorry, something went wrong.</div></div><div class="modal-footer"><button class="btn btn-default" ng-click="cancel()" ng-disabled="state.inflight">Cancel</button><button class="btn btn-info" ng-click="clear()" ng-disabled="state.inflight"> <span ng-show="!state.inflight">Clear cache</span><span ng-show="state.inflight">Clearing…</span></button></div></script></div></div><div class="ui-layout-resizer-controls synctex-controls" ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'" ng-controller="PdfSynctexController"><a class="btn btn-default btn-xs synctex-control synctex-control-goto-pdf" tooltip="Go to code location in PDF" tooltip-placement="right" tooltip-append-to-body="true" ng-click="syncToPdf()" ng-disabled="syncToPdfInFlight"><i class="synctex-control-icon" ng-show="!syncToPdfInFlight"></i><i class="synctex-spin-icon fa fa-refresh fa-spin" ng-show="syncToPdfInFlight"></i></a><a class="btn btn-default btn-xs synctex-control synctex-control-goto-code" tooltip="Go to PDF location in code" tooltip-placement="right" tooltip-append-to-body="true" ng-click="syncToCode()" ng-disabled="syncToCodeInFlight"><i class="synctex-control-icon" ng-show="!syncToCodeInFlight"></i><i class="synctex-spin-icon fa fa-refresh fa-spin" ng-show="syncToCodeInFlight"></i></a></div></div><div class="full-size" ng-if="ui.pdfLayout == 'flat'" ng-show="ui.view == 'pdf'"><div class="full-size pdf" ng-controller="PdfController"><div class="toolbar toolbar-pdf" ng-class="{ 'changes-to-autocompile': changesToAutoCompile && !autoCompileLintingError }"><div class="btn-group btn-recompile-group" id="recompile" dropdown tooltip-html="'Recompile the PDF <span class="keyboard-shortcut">({{modifierKey}} + Enter)</span>'" tooltip-class="keyboard-tooltip" tooltip-popup-delay="500" tooltip-append-to-body="true" tooltip-placement="bottom"><a class="btn btn-recompile" href ng-disabled="pdf.compiling" ng-click="recompile()"><i class="fa fa-refresh" ng-class="{'fa-spin': pdf.compiling }"></i><span class="btn-recompile-label" ng-show="!pdf.compiling">Recompile</span><span class="btn-recompile-label" ng-show="pdf.compiling">Compiling…</span></a><a class="btn btn-recompile dropdown-toggle" href ng-disabled="pdf.compiling" dropdown-toggle><span class="caret"></span></a><ul class="dropdown-menu dropdown-menu-left"><li class="dropdown-header">Auto Compile</li><li><a href ng-click="autocompile_enabled = true"><i class="fa fa-fw" ng-class="{'fa-check': autocompile_enabled}"></i> On</a></li><li><a href ng-click="autocompile_enabled = false"><i class="fa fa-fw" ng-class="{'fa-check': !autocompile_enabled}"></i> Off</a></li><li class="dropdown-header">Compile Mode</li><li><a href ng-click="draft = false"><i class="fa fa-fw" ng-class="{'fa-check': !draft}"></i> Normal</a></li><li><a href ng-click="draft = true"><i class="fa fa-fw" ng-class="{'fa-check': draft}"></i> Fast <span class="subdued">[draft]</span></a></li><li class="dropdown-header">Syntax Checks</li><li><a href ng-click="stop_on_validation_error = true"><i class="fa fa-fw" ng-class="{'fa-check': stop_on_validation_error}"></i> Check syntax before compile</a></li><li><a href ng-click="stop_on_validation_error = false"><i class="fa fa-fw" ng-class="{'fa-check': !stop_on_validation_error}"></i> Don't check syntax</a></li><li><a href ng-click="recompile({check:true})"><i class="fa fa-fw"></i> Run syntax check now</a></li></ul></div><a href ng-click="stop()" ng-show="pdf.compiling" tooltip="Stop compilation" tooltip-placement="bottom"><i class="fa fa-fw fa-stop"></i></a><a class="log-btn" href ng-click="toggleLogs()" ng-class="{ 'active': shouldShowLogs == true }" tooltip="Logs and output files" tooltip-placement="bottom"><i class="fa fa-fw fa-file-text-o"></i><span class="label" ng-show="pdf.logEntries.warnings.length + pdf.logEntries.errors.length > 0" ng-class="{ 'label-warning': pdf.logEntries.errors.length == 0, 'label-danger': pdf.logEntries.errors.length > 0 }">{{ pdf.logEntries.errors.length + pdf.logEntries.warnings.length }}</span></a><a ng-if="!pdf.downloadUrl" disabled href="#" tooltip="Please compile your project before downloading the PDF" tooltip-placement="bottom"><i class="fa fa-fw fa-download"></i></a><a ng-href="{{pdf.downloadUrl || pdf.url}}" target="_blank" ng-if="pdf.url" tooltip="Download PDF" tooltip-placement="bottom"><i class="fa fa-fw fa-download"></i></a><div class="toolbar-right"><span class="auto-compile-status small" ng-show="changesToAutoCompile && !compiling && !autoCompileLintingError">Uncompiled Changes</span><span class="auto-compile-status auto-compile-error small" ng-show="autoCompileLintingError" tooltip-placement="bottom" tooltip="Your code has errors that need to be fixed before the auto-compile can run" tooltip-append-to-body="true"><i class="fa fa-fw fa-exclamation-triangle"></i>
Code check failed</span><a href ng-click="switchToFlatLayout('pdf')" ng-show="ui.pdfLayout == 'sideBySide'" tooltip="Full screen" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fa fa-expand"></i></a><a href ng-click="switchToSideBySideLayout('editor')" ng-show="ui.pdfLayout == 'flat'" tooltip="Split screen" tooltip-placement="bottom" tooltip-append-to-body="true"><i class="fa fa-compress"></i></a></div></div><!-- end of toolbar--><!-- logs view--><div class="pdf-logs" ng-show="shouldShowLogs"><div class="alert alert-success" ng-show="pdf.logEntries.all.length == 0 && !pdf.failure">No errors, good job!</div><div class="alert alert-danger" ng-show="pdf.failure"><strong>Compile Error. </strong><span>Sorry, your LaTeX code couldn't compile for some reason. Please check the errors below for details, or view the raw log.</span></div><div class="alert alert-danger" ng-show="pdf.failedCheck"><strong>It looks like your project has some fatal syntax errors that you should fix before we compile it.</strong><p></p><p class="text-center" ng-show="!check"><a class="text-info" href ng-disabled="pdf.compiling" ng-click="recompile({try:true})">Try compiling anyway</a> or <a class="text-info" href ng-disabled="pdf.compiling" ng-click="recompile({force:true})">turn off syntax checking</a>.</p></div><div ng-repeat="entry in pdf.logEntries.all"><div class="alert" ng-class="{ 'alert-danger': entry.level == 'error', 'alert-warning': entry.level == 'warning', 'alert-info': entry.level == 'typesetting' }" ng-click="openInEditor(entry)"><span class="line-no"><i class="fa fa-link" aria-hidden="true"></i> <span ng-show="entry.file">{{ entry.file }}</span><span ng-show="entry.line">, line {{ entry.line }}</span></span><p class="entry-message" ng-show="entry.message">{{ entry.type }} {{ entry.message }}</p><div class="card card-hint" ng-if="entry.humanReadableHint" stop-propagation="click"><figure class="card-hint-icon-container"><i class="fa fa-lightbulb-o" aria-hidden="true"></i></figure><p class="card-hint-text" ng-show="entry.humanReadableHint" ng-bind-html="entry.humanReadableHint"></p><div class="card-hint-footer clearfix"><div class="card-hint-ext-link" ng-if="entry.extraInfoURL"><a ng-href="{{ entry.extraInfoURL }}" ng-click="trackLogHintsLearnMore()" target="_blank"><i class="fa fa-external-link"></i> Learn more</a></div></div></div><p class="entry-content" ng-show="entry.content">{{ entry.content.trim() }}</p></div></div><div><div class="files-dropdown-container"><a class="btn btn-default btn-sm" href tooltip="Clear cached files" tooltip-placement="top" tooltip-append-to-body="true" ng-click="openClearCacheModal()"><i class="fa fa-trash-o"></i></a> <div class="files-dropdown" ng-class="shouldDropUp ? 'dropup' : 'dropdown'" dropdown><a class="btn btn-default btn-sm" href dropdown-toggle>Other logs and files<span class="caret"></span></a><ul class="dropdown-menu dropdown-menu-right"><li ng-repeat="file in pdf.outputFiles"><a href="{{file.url}}" target="_blank">{{ file.name }}</a></li></ul></div></div><a class="btn btn-info btn-sm" href ng-click="toggleRawLog()"><span ng-show="!pdf.showRawLog">View Raw Logs</span><span ng-show="pdf.showRawLog">Hide Raw Logs</span></a></div><pre ng-bind="pdf.rawLog" ng-show="pdf.showRawLog"></pre></div><!-- non-log views (pdf and errors)--><div ng-show="!shouldShowLogs" ng-switch on="pdf.view"><div class="pdf-uncompiled" ng-switch-when="uncompiled" ng-show="!pdf.compiling"> <i class="fa fa-level-up fa-flip-horizontal fa-2x"></i> Click here to preview your work as a PDF.</div><div class="pdf-viewer" ng-switch-when="pdf"><div pdfng ng-if="settings.pdfViewer == 'pdfjs'" pdf-src="pdf.url" key="{{ project_id }}" resize-on="layout:main:resize,layout:pdf:resize" highlights="pdf.highlights" position="pdf.position" dbl-click-callback="syncToCode"></div><iframe ng-src="{{ pdf.url | trusted }}" ng-if="settings.pdfViewer == 'native'"></iframe></div><div class="pdf-validation-problems" ng-switch-when="validation-problems"><div class="alert alert-danger" ng-show="pdf.validation.sizeCheck"><strong>Project too large </strong><div>This project has too much editable text, please try and reduce it. The largest files are:</div><div><li ng-repeat="entry in pdf.validation.sizeCheck.resources">{{ '/'+entry['path'] }} - {{entry['kbSize']}}kb</li></div></div><div class="alert alert-danger" ng-show="pdf.validation.conflictedPaths"><div><strong>Conflicting Paths Found</strong></div><div>The following files and folders conflict with the same path</div><div><li ng-repeat="entry in pdf.validation.conflictedPaths">{{ '/'+entry['path'] }}</li></div></div><div class="alert alert-danger" ng-show="pdf.validation.mainFile"><strong>Unknown main document </strong><span>Please choose the main file for this project in the project menu. </span></div></div><div class="pdf-errors" ng-switch-when="errors"><div class="alert alert-danger" ng-show="pdf.error"><strong>Server Error </strong><span>Sorry, something went wrong and your project could not be compiled. Please try again in a few moments.</span></div><div class="alert alert-danger" ng-show="pdf.renderingError"><strong>PDF Rendering Error </strong><span>Something went wrong while rendering this PDF.</span></div><div class="alert alert-danger" ng-show="pdf.clsiMaintenance"><strong>Server Error </strong><span>The compile servers are down for maintenance, and will be back shortly.</span></div><div class="alert alert-danger" ng-show="pdf.clsiUnavailable"><strong>Server Error </strong><span>Sorry, the compile server for your project was temporarily unavailable. Please try again in a few moments.</span></div><div class="alert alert-danger" ng-show="pdf.tooRecentlyCompiled"><strong>Server Error </strong><span>This project was compiled very recently, so this compile has been skipped.</span></div><div class="alert alert-danger" ng-show="pdf.compileTerminated"><strong>Compilation cancelled. </strong><span>The compile was cancelled using the 'Stop Compilation' button. You can download the raw logs to see where the compile stopped.</span></div><div class="alert alert-danger" ng-show="pdf.rateLimited"><strong>Compile rate limit hit </strong><span>This project has been flagged for compiling too often. The limit will be lifted shortly.</span></div><div class="alert alert-danger" ng-show="pdf.compileInProgress"><strong>Compile already running in another window. </strong><span>Please wait for your other compile to finish before trying again.</span></div><div class="alert alert-danger" ng-show="pdf.timedout"><p><strong>Timed out. </strong><span>Sorry, your compile took too long to run and timed out. This may be due to a LaTeX error, or a large number of high-res images or complicated diagrams.</span></p><p><a class="text-info" href="https://www.sharelatex.com/learn/Debugging_Compilation_timeout_errors" target="_blank">Learn how to fix compile timeouts</a></p></div><div class="alert alert-danger" ng-show="pdf.autoCompileDisabled"><p><strong>Autocompile disabled. </strong><span>Due to high server load, background recompilation has been temporarily disabled. Please recompile by clicking the button above.</span></p></div><div class="alert alert-danger" ng-show="pdf.projectTooLarge"><strong>Project too large </strong><span>This project has too much editable text, please try and reduce it. The largest files are:</span></div></div></div></div><script type="text/ng-template" id="clearCacheModalTemplate"><div class="modal-header"><h3>Clear cache?</h3></div><div class="modal-body"><p>This will clear all hidden LaTeX files (.aux, .bbl, etc) from our compile server. You generally don't need to do this unless you're having trouble with references.</p><p>Your project files will not be deleted or changed.</p><div class="alert alert-danger" ng-if="state.error">Sorry, something went wrong.</div></div><div class="modal-footer"><button class="btn btn-default" ng-click="cancel()" ng-disabled="state.inflight">Cancel</button><button class="btn btn-info" ng-click="clear()" ng-disabled="state.inflight"> <span ng-show="!state.inflight">Clear cache</span><span ng-show="state.inflight">Clearing…</span></button></div></script></div><!-- fallback, shown when no file/view is selected--><div class="full-size no-file-selection" ng-if="!ui.view"><div class="no-file-selection-message" ng-if="rootFolder.children && rootFolder.children.length > 0"><h3>Currently, no file is selected. Please select a file from the file tree.</h3></div><div class="no-file-selection-message" ng-if="rootFolder.children && rootFolder.children.length === 0"><h3>Your project is currently empty. Please create a new file.</h3><div ng-controller="FileTreeController"><button class="btn btn-primary" ng-click="openNewDocModal()">New File</button></div></div></div><div class="binary-file full-size" ng-controller="BinaryFileController" ng-show="ui.view == 'file'" ng-if="openFile"><div class="binary-file-header"><!-- Linked Files: URL--><div ng-if="openFile.linkedFileData.provider == 'url'"><p><i class="fa fa-fw fa-external-link-square fa-rotate-180 linked-file-icon"></i>Imported from
<a ng-href="{{openFile.linkedFileData.url}}">{{ displayUrl(openFile.linkedFileData.url) }}</a>
at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}</p></div><!-- Linked Files: Project File--><div ng-if="openFile.linkedFileData.provider == 'project_file'"><p><i class="fa fa-fw fa-external-link-square fa-rotate-180 linked-file-icon"></i>Imported from
<a ng-if="!openFile.linkedFileData.v1_source_doc_id" ng-href="/project/{{openFile.linkedFileData.source_project_id}}" target="_blank">Another project</a><span ng-if="openFile.linkedFileData.v1_source_doc_id">Another project</span>/{{ openFile.linkedFileData.source_entity_path.slice(1) }},
at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}</p></div><!-- Linked Files: Project Output File--><div ng-if="openFile.linkedFileData.provider == 'project_output_file'"><p><i class="fa fa-fw fa-external-link-square fa-rotate-180 linked-file-icon"></i>Imported from the output of
<a ng-if="!openFile.linkedFileData.v1_source_doc_id" ng-href="/project/{{openFile.linkedFileData.source_project_id}}" target="_blank">Another project</a><span ng-if="openFile.linkedFileData.v1_source_doc_id">Another project</span>: {{ openFile.linkedFileData.source_output_file_path }},
at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}</p></div><!-- Bottom Controls--><span ng-if="openFile.linkedFileData.provider"><button class="btn btn-success" href ng-click="refreshFile(openFile)" ng-disabled="refreshing"><i class="fa fa-fw fa-refresh" ng-class="{}"></i><span ng-show="!refreshing">Refresh</span><span ng-show="refreshing">Refreshing…</span></button> </span><a class="btn btn-info" ng-href="/project/{{ project_id }}/file/{{ openFile.id }}"><i class="fa fa-fw fa-download"></i>
Download</a><!-- Refresh Error--><div class="row" ng-if="refreshError"><br><div class="alert alert-danger col-md-6 col-md-offset-3">Error: {{ refreshError}}</div></div></div><img ng-show="!failedLoad" ng-src="/project/{{ project_id }}/file/{{ openFile.id }}" ng-if="isImageFile()" ng-class="{'img-preview': !imgLoaded}" onerror="sl_binaryFilePreviewError()" onabort="sl_binaryFilePreviewError()" onload="sl_binaryFilePreviewLoaded()"><img ng-show="!failedLoad" ng-src="/project/{{ project_id }}/file/{{ openFile.id }}?format=png" ng-if="isPreviewableFile()" ng-class="{'img-preview': !imgLoaded}" onerror="sl_binaryFilePreviewError()" onabort="sl_binaryFilePreviewError()" onload="sl_binaryFilePreviewLoaded()"><div ng-if="isTextFile() && !textPreview.error"><div class="text-loading" ng-show="textPreview.loading && !textPreview.error">Loading…</div><div class="text-preview" ng-show="textPreview.data && !textPreview.loading && !textPreview.error"><div class="scroll-container"><p>{{ textPreview.data }}</p><p ng-show="textPreview.shouldShowDots">…</p></div></div></div><p class="no-preview" ng-if="failedLoad || textPreview.error || isUnpreviewableFile()">Sorry, no preview is available.</p></div><div id="history" ng-show="ui.view == 'history' && history.updates.length > 0"><aside class="change-list" ng-if="!history.isV2" ng-controller="HistoryListController" infinite-scroll="loadMore()" infinite-scroll-disabled="history.loading || history.atEnd" infinite-scroll-initialize="ui.view == 'history'"><div class="infinite-scroll-inner"><ul class="list-unstyled" ng-class="{ 'hover-state': history.hoveringOverListSelectors }"><li class="change" ng-repeat="update in history.updates" ng-class="{ 'first-in-day': update.meta.first_in_day, 'selected': update.inSelection, 'selected-to': update.selectedTo, 'selected-from': update.selectedFrom, 'hover-selected': update.inHoverSelection, 'hover-selected-to': update.hoverSelectedTo, 'hover-selected-from': update.hoverSelectedFrom, }" ng-controller="HistoryListItemController"><div class="day" ng-show="update.meta.first_in_day">{{ update.meta.end_ts | relativeDate }}</div><div class="selectors"><div class="range"></div><form><input class="selector-from" type="radio" name="fromVersion" ng-model="update.selectedFrom" ng-value="true" ng-mouseover="mouseOverSelectedFrom()" ng-mouseout="mouseOutSelectedFrom()" ng-show="update.afterSelection || update.inSelection"></form><form><input class="selector-to" type="radio" name="toVersion" ng-model="update.selectedTo" ng-value="true" ng-mouseover="mouseOverSelectedTo()" ng-mouseout="mouseOutSelectedTo()" ng-show="update.beforeSelection || update.inSelection"></form></div><div class="description" ng-click="select()"><div class="time">{{ update.meta.end_ts | formatDate:'h:mm a' }}</div><div class="action action-edited" ng-if="history.isV2 && update.pathnames.length > 0">Edited</div><div class="docs" ng-repeat="pathname in update.pathnames"><div class="doc">{{ pathname }}</div></div><div class="docs" ng-repeat="project_op in update.project_ops"><div ng-if="project_op.rename"><div class="action">Renamed</div><div class="doc">{{ project_op.rename.pathname }} → {{ project_op.rename.newPathname }}</div></div><div ng-if="project_op.add"><div class="action">Created </div><div class="doc">{{ project_op.add.pathname }}</div></div><div ng-if="project_op.remove"><div class="action">Deleted</div><div class="doc">{{ project_op.remove.pathname }}</div></div></div><div class="users"><div class="user" ng-repeat="update_user in update.meta.users"><div class="color-square" ng-if="update_user != null" ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}"></div><div class="color-square" ng-if="update_user == null" ng-style="{'background-color': 'hsl(100, 70%, 50%)'}"></div><div class="name" ng-if="update_user && update_user.id != user.id" ng-bind="displayName(update_user)"> </div><div class="name" ng-if="update_user && update_user.id == user.id">You</div><div class="name" ng-if="update_user == null">Anonymous</div></div><div class="user" ng-if="update.meta.users.length == 0"><div class="color-square" style="background-color: hsl(100, 100%, 50%)"></div><span>Anonymous</span></div></div></div></li></ul><div class="loading" ng-show="history.loading"><i class="fa fa-spin fa-refresh"></i> Loading…</div></div></aside><aside class="change-list" ng-if="history.isV2" ng-controller="HistoryV2ListController"><history-entries-list ng-if="!history.showOnlyLabels && !history.error" entries="history.updates" range-selection-enabled="history.viewMode === HistoryViewModes.COMPARE" selected-history-version="history.selection.range.toV" selected-history-range="history.selection.range" current-user="user" current-user-is-owner="project.owner._id === user.id" users="projectUsers" load-entries="loadMore()" load-disabled="history.loading || history.atEnd" load-initialize="ui.view == 'history'" is-loading="history.loading" free-history-limit-hit="history.freeHistoryLimitHit" on-version-select="handleVersionSelect(version)" on-range-select="handleRangeSelect(selectedToV, selectedFromV)" on-label-delete="handleLabelDelete(label)"></history-entries-list><history-labels-list ng-if="history.showOnlyLabels && !history.error" labels="history.labels" range-selection-enabled="history.viewMode === HistoryViewModes.COMPARE" selected-history-version="history.selection.range.toV" selected-history-range="history.selection.range" current-user="user" users="projectUsers" is-loading="history.loading" on-version-select="handleVersionSelect(version)" on-range-select="handleRangeSelect(selectedToV, selectedFromV)" on-label-delete="handleLabelDelete(label)"></history-labels-list></aside><script type="text/ng-template" id="historyEntriesListTpl"><div class="history-entries" infinite-scroll="$ctrl.loadEntries()" infinite-scroll-disabled="$ctrl.loadDisabled" infinite-scroll-initialize="$ctrl.loadInitialize"><div class="infinite-scroll-inner"><history-entry ng-repeat="entry in $ctrl.entries" range-selection-enabled="$ctrl.rangeSelectionEnabled" is-dragging="$ctrl.isDragging" selected-history-version="$ctrl.selectedHistoryVersion" selected-history-range="$ctrl.selectedHistoryRange" hovered-history-range="$ctrl.hoveredHistoryRange" entry="entry" current-user="$ctrl.currentUser" users="$ctrl.users" on-select="$ctrl.handleEntrySelect(selectedEntry)" on-label-delete="$ctrl.onLabelDelete({ label: label })"></history-entry><div class="loading" ng-show="$ctrl.isLoading"><i class="fa fa-spin fa-refresh"></i> Loading…</div><div class="history-entries-list-upgrade-prompt" ng-if="$ctrl.freeHistoryLimitHit && $ctrl.currentUserIsOwner" ng-controller="FreeTrialModalController"><p>You're currently seeing the last 24 hours of changes in this project.</p><p><strong>Upgrade to get full Project History, plus:</strong></p><ul class="list-unstyled"><li> <i class="fa fa-check"> </i>Unlimited projects</li><li><i class="fa fa-check"> </i>Multiple collaborators per project</li><li> <i class="fa fa-check"> </i>Full document history</li><li> <i class="fa fa-check"> </i>Sync to Dropbox</li><li> <i class="fa fa-check"> </i>Sync to GitHub</li><li> <i class="fa fa-check"> </i>Compile larger projects</li></ul><p class="text-center"><a class="btn btn-success" href ng-class="buttonClass" ng-click="startFreeTrial('history')">Start Free Trial!</a></p><p class="small" ng-show="startedFreeTrial">Please refresh this page after starting your free trial.</p></div><div class="history-entries-list-upgrade-prompt" ng-if="$ctrl.freeHistoryLimitHit && !$ctrl.currentUserIsOwner"> <p>You're currently seeing the last 24 hours of changes in this project.</p><strong>Please ask the project owner to upgrade to access this project's full history.</strong></div></div></div></script><script type="text/ng-template" id="historyEntryTpl"><time class="history-entry-day" ng-if="::$ctrl.entry.meta.first_in_day">{{ ::$ctrl.entry.meta.end_ts | relativeDate }}</time><div class="history-entry" ng-class="{ 'history-entry-first-in-day': $ctrl.entry.meta.first_in_day, 'history-entry-selected': !$ctrl.isDragging && $ctrl.isEntrySelected(), 'history-entry-selected-to': $ctrl.rangeSelectionEnabled && !$ctrl.isDragging && $ctrl.selectedHistoryRange.toV === $ctrl.entry.toV, 'history-entry-selected-from': $ctrl.rangeSelectionEnabled && !$ctrl.isDragging && $ctrl.selectedHistoryRange.fromV === $ctrl.entry.fromV, 'history-entry-hover-selected': $ctrl.rangeSelectionEnabled && $ctrl.isDragging && $ctrl.isEntryHoverSelected(), 'history-entry-hover-selected-to': $ctrl.rangeSelectionEnabled && $ctrl.isDragging && $ctrl.hoveredHistoryRange.toV === $ctrl.entry.toV, 'history-entry-hover-selected-from': $ctrl.rangeSelectionEnabled && $ctrl.isDragging && $ctrl.hoveredHistoryRange.fromV === $ctrl.entry.fromV, }" history-droppable-area history-droppable-area-on-drop="$ctrl.onDrop(boundary)" history-droppable-area-on-over="$ctrl.onOver(boundary)"><div class="history-entry-details" ng-click="$ctrl.onSelect({ selectedEntry: $ctrl.entry })"><div class="history-entry-toV-handle" ng-show="$ctrl.rangeSelectionEnabled && $ctrl.selectedHistoryRange && ((!$ctrl.isDragging && $ctrl.selectedHistoryRange.toV === $ctrl.entry.toV) || ($ctrl.isDragging && $ctrl.hoveredHistoryRange.toV === $ctrl.entry.toV))" history-draggable-boundary="toV" history-draggable-boundary-on-drag-start="$ctrl.onDraggingStart()" history-draggable-boundary-on-drag-stop="$ctrl.onDraggingStop(isValidDrop, boundary)"></div><history-label ng-repeat="label in $ctrl.entry.labels | orderBy : '-created_at'" ng-init="user = $ctrl.buildUserView(label)" label-text="label.comment" label-owner-name="$ctrl.displayNameById(label.user_id) || 'Anonymous'" label-creation-date-time="label.created_at" is-owned-by-current-user="label.user_id === $ctrl.currentUser.id" on-label-delete="$ctrl.onLabelDelete({ label: label })"></history-label><ol class="history-entry-changes"><li class="history-entry-change" ng-repeat="pathname in ::$ctrl.entry.pathnames"><span class="history-entry-change-action">Edited </span><span class="history-entry-change-doc">{{ ::pathname }}</span></li><li class="history-entry-change" ng-repeat="project_op in ::$ctrl.entry.project_ops"><span class="history-entry-change-action" ng-if="::project_op.rename">Renamed</span><span class="history-entry-change-action" ng-if="::project_op.add">Created</span><span class="history-entry-change-action" ng-if="::project_op.remove">Deleted</span><span class="history-entry-change-doc">{{ ::$ctrl.getProjectOpDoc(project_op) }}</span></li></ol><div class="history-entry-metadata"><time class="history-entry-metadata-time">{{ ::$ctrl.entry.meta.end_ts | formatDate:'h:mm a' }}</time><span>
•
</span><ol class="history-entry-metadata-users"><li class="history-entry-metadata-user" ng-repeat="update_user in ::$ctrl.entry.meta.users"><span class="name" ng-if="::update_user && update_user.id != $ctrl.currentUser.id" ng-style="$ctrl.getUserCSSStyle(update_user);">{{ ::$ctrl.displayName(update_user) }} </span><span class="name" ng-if="::update_user && update_user.id == $ctrl.currentUser.id" ng-style="$ctrl.getUserCSSStyle(update_user);">You</span><span class="name" ng-if="::update_user == null" ng-style="$ctrl.getUserCSSStyle(update_user);">Anonymous</span></li><li class="history-entry-metadata-user" ng-if="::$ctrl.entry.meta.users.length == 0"><span class="name" ng-style="$ctrl.getUserCSSStyle();">Anonymous</span></li></ol></div><div class="history-entry-fromV-handle" ng-show="$ctrl.rangeSelectionEnabled && $ctrl.selectedHistoryRange && ((!$ctrl.isDragging && $ctrl.selectedHistoryRange.fromV === $ctrl.entry.fromV) || ($ctrl.isDragging && $ctrl.hoveredHistoryRange.fromV === $ctrl.entry.fromV))" history-draggable-boundary="fromV" history-draggable-boundary-on-drag-start="$ctrl.onDraggingStart()" history-draggable-boundary-on-drag-stop="$ctrl.onDraggingStop(isValidDrop, boundary)"></div></div></div></script><script type="text/ng-template" id="historyLabelsListTpl"><div class="history-labels-list"><div class="history-version-with-label" ng-repeat="versionWithLabel in $ctrl.versionsWithLabels | orderBy:'-version' track by versionWithLabel.version" ng-class="{ 'history-version-with-label-selected': !$ctrl.isDragging && $ctrl.isVersionSelected(versionWithLabel.version), 'history-version-with-label-selected-to': !$ctrl.isDragging && $ctrl.selectedHistoryRange.toV === versionWithLabel.version, 'history-version-with-label-selected-from': !$ctrl.isDragging && $ctrl.selectedHistoryRange.fromV === versionWithLabel.version, 'history-version-with-label-hover-selected': $ctrl.isDragging && $ctrl.isVersionHoverSelected(versionWithLabel.version), 'history-version-with-label-hover-selected-to': $ctrl.isDragging && $ctrl.hoveredHistoryRange.toV === versionWithLabel.version, 'history-version-with-label-hover-selected-from': $ctrl.isDragging && $ctrl.hoveredHistoryRange.fromV === versionWithLabel.version, }" ng-click="$ctrl.handleVersionSelect(versionWithLabel)" history-droppable-area history-droppable-area-on-drop="$ctrl.onDrop(boundary, versionWithLabel)" history-droppable-area-on-over="$ctrl.onOver(boundary, versionWithLabel)"><div class="history-entry-toV-handle" ng-show="$ctrl.rangeSelectionEnabled && $ctrl.selectedHistoryRange && ((!$ctrl.isDragging && $ctrl.selectedHistoryRange.toV === versionWithLabel.version) || ($ctrl.isDragging && $ctrl.hoveredHistoryRange.toV === versionWithLabel.version))" history-draggable-boundary="toV" history-draggable-boundary-on-drag-start="$ctrl.onDraggingStart()" history-draggable-boundary-on-drag-stop="$ctrl.onDraggingStop(isValidDrop, boundary)"></div><div ng-repeat="label in versionWithLabel.labels track by label.id"><history-label show-tooltip="false" label-text="label.comment" is-owned-by-current-user="label.user_id === $ctrl.currentUser.id" on-label-delete="$ctrl.onLabelDelete({ label: label })" is-pseudo-current-state-label="label.isPseudoCurrentStateLabel"></history-label><div class="history-entry-label-metadata"><div class="history-entry-label-metadata-user" ng-if="!label.isPseudoCurrentStateLabel" ng-init="user = $ctrl.buildUserView(label)">Saved by <span class="name" ng-if="user && user._id !== $ctrl.currentUser.id" ng-style="$ctrl.getUserCSSStyle(user, versionWithLabel);">{{ ::user.displayName }}</span><span class="name" ng-if="user && user._id == $ctrl.currentUser.id" ng-style="$ctrl.getUserCSSStyle(user, versionWithLabel);">You</span><span class="name" ng-if="user == null" ng-style="$ctrl.getUserCSSStyle(user, versionWithLabel);">Anonymous</span></div><time class="history-entry-label-metadata-time">{{ ::label.created_at | formatDate }}</time></div></div><div class="history-entry-fromV-handle" ng-show="$ctrl.rangeSelectionEnabled && $ctrl.selectedHistoryRange && ((!$ctrl.isDragging && $ctrl.selectedHistoryRange.fromV === versionWithLabel.version) || ($ctrl.isDragging && $ctrl.hoveredHistoryRange.fromV === versionWithLabel.version))" history-draggable-boundary="fromV" history-draggable-boundary-on-drag-start="$ctrl.onDraggingStart()" history-draggable-boundary-on-drag-stop="$ctrl.onDraggingStop(isValidDrop, boundary)"></div></div><div class="loading" ng-show="$ctrl.isLoading"><i class="fa fa-spin fa-refresh"></i> Loading…</div></div></script><div class="diff-panel full-size" ng-if="!history.isV2" ng-controller="HistoryDiffController"><div class="diff" ng-if="!!history.diff && !history.diff.loading && !history.diff.deleted && !history.diff.error && !history.diff.binary"><div class="toolbar toolbar-alt"><span class="name"><strong>{{history.diff.highlights.length}} </strong><ng-pluralize count="history.diff.highlights.length" when="{ 'one': 'change', 'other': 'changes' }"></ng-pluralize> in <strong>{{history.diff.pathname}}</strong></span><div class="toolbar-right" ng-if="permissions.write"><a class="btn btn-danger btn-xs" href ng-click="openRestoreDiffModal()">Restore to before these changes</a></div></div><div class="diff-editor hide-ace-cursor" ace-editor="history" theme="settings.editorTheme" font-size="settings.fontSize" text="history.diff.text" highlights="history.diff.highlights" read-only="true" resize-on="layout:main:resize" navigate-highlights="true"></div></div><div class="diff-deleted text-centered" ng-show="history.diff.deleted && !history.diff.restoreDeletedSuccess"><p class="text-serif">{{ history.diff.doc.name }} has been deleted</p><p><a class="btn btn-primary btn-lg" href ng-click="restoreDeletedDoc()" ng-disabled="history.diff.restoreInProgress">Restore</a></p></div><div class="diff-deleted text-centered" ng-show="history.diff.deleted && history.diff.restoreDeletedSuccess"><p class="text-serif"> Your file ({{ history.diff.doc.name }} ) has been recovered.</p><p class="text-serif"> You can go back to the editor and work on it again.</p><p><a class="btn btn-default" href ng-click="backToEditorAfterRestore()">Back to editor</a></p></div><div class="loading-panel" ng-show="history.diff.loading"><i class="fa fa-spin fa-refresh"></i> Loading…</div><div class="error-panel" ng-show="history.diff.error"><div class="alert alert-danger">Sorry, something went wrong</div></div></div><div class="diff-panel full-size" ng-if="history.isV2 && history.viewMode === HistoryViewModes.COMPARE && history.updates.length !== 0"><div class="diff" ng-show="!!history.selection.diff && !isHistoryLoading() && !history.selection.diff.error" ng-class="{ 'diff-binary': history.selection.diff.binary }"><div class="diff-editor-v2 hide-ace-cursor" ng-if="!history.selection.diff.binary" ace-editor="history" theme="settings.editorTheme" font-size="settings.fontSize" text="history.selection.diff.text" highlights="history.selection.diff.highlights" read-only="true" resize-on="layout:main:resize,history:toggle" navigate-highlights="true"></div><div class="alert alert-info" ng-if="history.selection.diff.binary">We're still working on showing image and binary changes, sorry. Stay tuned!</div></div><div class="loading-panel" ng-show="isHistoryLoading()"><i class="fa fa-spin fa-refresh"></i> Loading…</div><div class="error-panel" ng-show="history.selection.diff.error && !isHistoryLoading()"><div class="alert alert-danger">Sorry, something went wrong</div></div></div><div class="point-in-time-panel full-size" ng-if="history.isV2 && history.viewMode === HistoryViewModes.POINT_IN_TIME && history.updates.length !== 0"><div class="point-in-time-editor-container" ng-if="!!history.selection.file && !history.selection.file.loading && !history.selection.file.error"><div class="hide-ace-cursor" ng-if="!history.selection.file.binary" ace-editor="history-pointintime" theme="settings.editorTheme" font-size="settings.fontSize" text="history.selection.file.text" read-only="true" resize-on="layout:main:resize,history:toggle"></div><div class="alert alert-info" ng-if="history.selection.file.binary">We're still working on showing image and binary changes, sorry. Stay tuned!</div></div><div class="loading-panel" ng-show="isHistoryLoading()"><i class="fa fa-spin fa-refresh"></i> Loading…</div><div class="error-panel" ng-show="history.error"><div class="alert alert-danger"> <p>Something went wrong trying to fetch your project's history. If the error persists, please contact us via: <a ng-href="mailto:#{settings.adminEmail}?Subject=Error%20loading%20history%20for%project%20{{ project_id }}" ng-non-bindable>[email protected]</a></p><p class="clearfix"><a class="alert-link-as-btn pull-right" href ng-click="toggleHistory()">Back to the editor</a></p></div></div><div class="error-panel" ng-show="history.selection.file.error"><div class="alert alert-danger">Sorry, something went wrong</div></div></div></div><div class="full-size" ng-if="ui.view == 'history' && history.updates.length === 0 && !isHistoryLoading()"><div class="no-history-available"><h3>This project doesn't have any history yet. Please make some changes to the project and try again.</h3></div></div><script type="text/ng-template" id="historyRestoreDiffModalTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>Restore {{diff.doc.name}}</h3></div><div class="modal-body modal-body-share"><p>Are you sure you want to restore <strong>{{diff.doc.name}}</strong> to before the changes on {{diff.start_ts | formatDate}}?</p></div><div class="modal-footer"><button class="btn btn-default" ng-click="cancel()" ng-disabled="state.inflight">Cancel</button><button class="btn btn-danger" ng-click="restore()" ng-disabled="state.inflight"><span ng-show="!state.inflight">Restore</span><span ng-show="state.inflight">Restoring …</span></button></div></script><script type="text/ng-template" id="historyLabelTpl"><div class="history-label" ng-class="{ 'history-label-own' : $ctrl.isOwnedByCurrentUser, 'history-label-pseudo-current-state': $ctrl.isPseudoCurrentStateLabel, }"><span class="history-label-comment" tooltip-append-to-body="true" tooltip-template="'historyLabelTooltipTpl'" tooltip-placement="left" tooltip-enable="$ctrl.showTooltip"><i class="fa fa-tag"></i> {{ ::$ctrl.isPseudoCurrentStateLabel ? 'Current state' : $ctrl.labelText }}</span><button class="history-label-delete-btn" ng-if="$ctrl.isOwnedByCurrentUser && !$ctrl.isPseudoCurrentStateLabel" stop-propagation="click" ng-click="$ctrl.onLabelDelete()" aria-label="Delete"><span aria-hidden="true">×</span></button></div></script><script type="text/ng-template" id="historyLabelTooltipTpl"><div class="history-label-tooltip"><p class="history-label-tooltip-title"> <i class="fa fa-tag"></i> {{ $ctrl.labelText }}</p><p class="history-label-tooltip-owner">Created by {{ $ctrl.labelOwnerName }}</p><time class="history-label-tooltip-datetime">{{ $ctrl.labelCreationDateTime | formatDate }}</time></div></script><script type="text/ng-template" id="historyV2DeleteLabelModalTemplate"><div class="modal-header"><h3>Delete label</h3></div><div class="modal-body"><div class="alert alert-danger" ng-show="state.error.message">{{ state.error.message}} </div><div class="alert alert-danger" ng-show="state.error && !state.error.message">Sorry, something went wrong</div><p ng-if="labelDetails">Are you sure you want to delete the following label<strong> "{{ labelDetails.comment }}"</strong>?</p></div><div class="modal-footer"><button class="btn btn-default" type="button" ng-disabled="state.inflight" ng-click="$dismiss()">Cancel</button><button class="btn btn-primary" type="button" ng-click="deleteLabel()" ng-disabled="state.inflight">{{ state.inflight ? 'Deleting label' : 'Delete label' }}</button></div></script></div></main></div><div class="ui-layout-east"><aside class="chat" ng-controller="ReactChatController"><chat></chat></aside></div></div></div><script type="text/ng-template" id="genericMessageModalTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="done()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>{{ title }}</h3></div><div class="modal-body" ng-bind-html="message"></div><div class="modal-footer"><button class="btn btn-info" ng-click="done()">OK</button></div></script><script type="text/ng-template" id="outOfSyncModalTemplate"><div class="modal-header"><button class="close" type="button" data-dismiss="modal" ng-click="done()" aria-label="Close"><span aria-hidden="true">×</span></button><h3>{{ title }}</h3></div><div class="modal-body" ng-bind-html="message"></div><div class="modal-body"><button class="btn btn-info" ng-init="showFileContents = false" ng-click="showFileContents = !showFileContents">{{showFileContents ? "Hide" : "Show"}} Local File Contents</button><div class="text-preview" ng-show="showFileContents"><textarea class="scroll-container" readonly="readonly" rows="{{editorContentRows}}">{{editorContent}}</textarea></div></div><div class="modal-footer"><button class="btn btn-info" ng-click="done()">Reload editor</button></div></script><script type="text/ng-template" id="lockEditorModalTemplate"><div class="modal-header"><h3>{{ title }}</h3></div><div class="modal-body" ng-bind-html="message"></div></script><script type="text/javascript" src="https://overleaf.tsinghua.edu.cn/socket.io/socket.io.js"></script><script type="text/javascript" src="/js/libs/mathjax/MathJax.js?config=TeX-AMS_HTML%2CSafe&v=2.7.9"></script><script type="text/javascript" src="/js/libraries-adcf9542c1096d7ce3ad.js"></script><script type="text/javascript" src="/js/ide-2e241dcf1ffcb0d74e97.js"></script></body></html>