1"use strict";(self.webpackChunk_overleaf_web=self.webpackChunk_overleaf_web||[]).push([[2088],{12088:(e,n,l)=>{l.r(n),l.d(n,{default:()=>ye});var t=l(97434),a=l(76295),o=l(44215),s=l(29515),i=l(22160),r=l(88930),c=l(42365),d=l(31085);function u(){const{t:e}=(0,t.Bd)(),{pdfDownloadUrl:n,pdfUrl:l}=(0,a.Rf)(),{projectId:u}=(0,o.Om)(),{sendEvent:m}=(0,c.W)();return l?(0,d.jsxs)("a",{href:n||l,target:"_blank",rel:"noreferrer",onClick:function(){m("download-pdf-button-click",{projectId:u,location:"left-menu",isSmallDevice:s.mP})},children:[(0,d.jsx)(i.A,{type:"picture_as_pdf",size:"2x"}),(0,d.jsx)("br",{}),"PDF"]}):(0,d.jsx)(r.A,{id:"disabled-pdf-download",description:e("please_compile_pdf_before_download"),overlayProps:{placement:"bottom"},children:(0,d.jsxs)("div",{className:"link-disabled",children:[(0,d.jsx)(i.A,{type:"picture_as_pdf",size:"2x"}),(0,d.jsx)("br",{}),"PDF"]})})}function m(){const{t:e}=(0,t.Bd)(),{projectId:n}=(0,o.Om)();return(0,d.jsxs)("a",{href:`/project/${n}/download/zip`,target:"_blank",rel:"noreferrer",onClick:function(){s._("download-zip-button-click",{projectId:n,location:"left-menu",isSmallDevice:s.mP})},children:[(0,d.jsx)(i.A,{type:"folder_zip",size:"2x"}),(0,d.jsx)("br",{}),e("source")]})}function h(){const{t:e}=(0,t.Bd)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{className:"mt-0",children:e("download")}),(0,d.jsxs)("ul",{className:"list-unstyled nav nav-downloads text-center",children:[(0,d.jsx)("li",{children:(0,d.jsx)(m,{})}),(0,d.jsx)("li",{children:(0,d.jsx)(u,{})})]})]})}var p=l(12461),x=l(14041),j=l(82758);function f(e){let{svgIcon:n,icon:l}=e;return n?(0,d.jsx)("div",{className:"material-symbols",children:n}):l?(0,d.jsx)(i.A,{type:l}):null}function v(e){let{children:n,svgIcon:l,onClick:t,icon:a,disabled:o=!1,disabledAccesibilityText:s,type:i="button",href:r,translate:c}=e;return o?(0,d.jsxs)("div",{className:"left-menu-button link-disabled",children:[(0,d.jsx)(f,{svgIcon:l,icon:a}),(0,d.jsx)("span",{translate:c,children:n}),s?(0,d.jsx)("span",{className:"visually-hidden",children:s}):null]}):"button"===i?(0,d.jsxs)("button",{onClick:t,className:"left-menu-button",children:[(0,d.jsx)(f,{svgIcon:l,icon:a}),(0,d.jsx)("span",{translate:c,children:n})]}):(0,d.jsxs)("a",{href:r,target:"_blank",rel:"noreferrer",className:"left-menu-button",children:[(0,d.jsx)(f,{svgIcon:l,icon:a}),(0,d.jsx)("span",{translate:c,children:n})]})}var b=l(43237);function g(){const[e,n]=(0,x.useState)(!1),{t:l}=(0,t.Bd)(),a=(0,b.A)(),o=(0,x.useCallback)((()=>{s._("left-menu-copy"),n(!0)}),[]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(v,{onClick:o,icon:"file_copy",children:l("copy_project")}),(0,d.jsx)(j.A,{show:e,handleHide:()=>n(!1),openProject:a})]})}var _=l(52323),w=l(64301);const y=(0,x.memo)((function(e){let{handleShowModal:n}=e;const{pdfUrl:l}=(0,a.Rf)(),{t:o}=(0,t.Bd)();return l||(0,w.g9)("word-count-client")?(0,d.jsx)(v,{onClick:n,icon:"match_case",children:o("word_count")}):(0,d.jsx)(r.A,{id:"disabled-word-count",description:o("please_compile_pdf_before_word_count"),overlayProps:{placement:"top"},children:(0,d.jsx)("div",{children:(0,d.jsx)(v,{icon:"match_case",disabled:!0,disabledAccesibilityText:o("please_compile_pdf_before_word_count"),children:o("word_count")})})})}));function C(){const[e,n]=(0,x.useState)(!1),l=(0,x.useCallback)((()=>{s._("left-menu-count"),n(!0)}),[]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y,{handleShowModal:l}),(0,d.jsx)(_.A,{show:e,handleHide:()=>n(!1)})]})}const k=[];function A(){const{t:e}=(0,t.Bd)();return(0,p.A)("ol-anonymous")?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{children:e("actions")}),(0,d.jsxs)("ul",{className:"list-unstyled nav",children:[(0,d.jsx)("li",{children:(0,d.jsx)(g,{})}),k.map((e=>{let{import:{default:n},path:l}=e;return(0,d.jsx)("li",{children:(0,d.jsx)(n,{})},l)})),(0,d.jsx)("li",{children:(0,d.jsx)(C,{})})]})]})}var B=l(40862);function F(){const{modal:e,showModal:n}=(0,B.v)(),{t:l}=(0,t.Bd)(),a=(0,x.useCallback)((()=>{s._("left-menu-contact"),n()}),[n]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(v,{onClick:a,icon:"contact_support",children:l("contact_us")}),e]})}function T(){const{t:e}=(0,t.Bd)();return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(v,{type:"link",href:"/learn",icon:"book_4",children:e("documentation")})})}var S=l(12160),N=l(10150);function $(){const[e,n]=(0,x.useState)(!1),{t:l}=(0,t.Bd)(),{features:a}=(0,o.Om)(),i=(0,x.useCallback)((()=>{s._("left-menu-hotkeys"),n(!0)}),[]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(v,{onClick:i,icon:"keyboard",children:l("show_hotkeys")}),(0,d.jsx)(S.A,{show:e,handleHide:()=>n(!1),isMac:N.c,trackChangesVisible:a?.trackChangesVisible})]})}function I(){const{t:e}=(0,t.Bd)(),n=(0,p.A)("ol-showSupport");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{children:e("help")}),(0,d.jsxs)("ul",{className:"list-unstyled nav",children:[(0,d.jsx)("li",{children:(0,d.jsx)($,{})}),n?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("li",{children:(0,d.jsx)(T,{})}),(0,d.jsx)("li",{children:(0,d.jsx)(F,{})})]}):null]})]})}const L=[];function M(){const{t:e}=(0,t.Bd)(),n=(0,p.A)("ol-anonymous"),l=(0,p.A)("ol-gitBridgeEnabled");return n||0===L.length?null:l?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{children:e("sync")}),(0,d.jsx)("ul",{className:"list-unstyled nav",children:L.map((e=>{let{import:{default:n},path:l}=e;return(0,d.jsx)("li",{children:(0,d.jsx)(n,{})},l)}))})]}):null}var D=l(50735),P=(l(82438),l(50020),l(52359)),E=l(81606),V=l(13118),O=l(16372),z=l(28094);function H(e){let{label:n,name:l,options:t,optgroups:a,loading:o,onChange:s,value:i,disabled:r=!1,translateOptions:c}=e;const u=(0,x.useCallback)((e=>{const n=e.target.value;let l=n;"boolean"==typeof i?l="true"===n:"number"==typeof i&&(l=parseInt(n,10)),s(l)}),[s,i]),{settingToFocus:m}=(0,O.GR)(),h=(0,x.useRef)(null);return(0,x.useEffect)((()=>{m===l&&h.current&&(h.current.scrollIntoView({block:"center",behavior:"smooth"}),h.current.focus()),window.dispatchEvent(new CustomEvent("ui.focus-setting",{detail:void 0}))}),[l,m]),(0,d.jsxs)(P.A,{controlId:`settings-menu-${l}`,className:"left-menu-setting",children:[(0,d.jsx)(E.A,{children:n}),o?(0,d.jsx)(z.A,{size:"sm"}):(0,d.jsxs)(V.A,{size:"sm",onChange:u,value:i?.toString(),disabled:r,ref:h,translate:c,children:[t?.map((e=>(0,d.jsx)("option",{value:e.value.toString(),"aria-hidden":e.ariaHidden,disabled:e.disabled,children:e.label},`${l}-${e.value}`))),a?.map((e=>(0,d.jsx)("optgroup",{label:e.label,children:e.options.map((e=>(0,d.jsx)("option",{value:e.value.toString(),children:e.label},e.value.toString())))},e.label)))]})]})}function R(){const{t:e}=(0,t.Bd)(),{autoPairDelimiters:n,setAutoPairDelimiters:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:!0,label:e("on")},{value:!1,label:e("off")}],label:e("auto_close_brackets"),name:"autoPairDelimiters"})}function U(){const{t:e}=(0,t.Bd)(),{autoComplete:n,setAutoComplete:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:!0,label:e("on")},{value:!1,label:e("off")}],label:e("auto_complete"),name:"autoComplete"})}var X=l(9097),W=l(44634);function q(){const{t:e}=(0,t.Bd)(),{write:n}=(0,X.Tg)(),{compiler:l,setCompiler:a}=(0,D.l$)(),o=(0,W.F)("compiler",a);return(0,d.jsx)(H,{onChange:o,value:l,disabled:!n,options:[{value:"pdflatex",label:"pdfLaTeX"},{value:"latex",label:"LaTeX"},{value:"xelatex",label:"XeLaTeX"},{value:"lualatex",label:"LuaLaTeX"}],label:e("compiler"),name:"compiler",translateOptions:"no"})}var G=l(43229),K=l(60225);function Q(){const{t:e}=(0,t.Bd)(),[n,l]=(0,x.useState)(!1);return(0,d.jsxs)(P.A,{className:"left-menu-setting",children:[(0,d.jsx)(E.A,{htmlFor:"dictionary-settings",children:e("dictionary")}),(0,d.jsx)(K.A,{id:"dictionary-settings",variant:"secondary",size:"sm",onClick:()=>l(!0),children:e("edit")}),(0,d.jsx)(G.A,{show:n,handleHide:()=>l(!1)})]})}l(27534),l(12266);var Z=l(98584),J=l(66326);function Y(){const{t:e}=(0,t.Bd)(),{write:n}=(0,X.Tg)(),{docs:l}=(0,J.Qq)(),{rootDocId:a,setRootDocId:o}=(0,D.l$)(),s=(0,W.F)("root-doc-id",o,{omitValueInEvent:!0}),i=(0,x.useMemo)((()=>{const e=(l?.filter((e=>(0,Z.K)(e.doc.name)||a===e.doc.id))??[]).map((e=>({value:e.doc.id,label:e.path})));return a||e.unshift({value:"",label:"None",disabled:!0}),e}),[l,a]);return(0,d.jsx)(H,{onChange:s,value:a??"",disabled:!n,options:i,label:e("main_document"),name:"rootDocId",translateOptions:"no"})}var ee=l(59483),ne=l(44324);function le(){const{t:e}
1=(0,t.Bd)(),n=(0,ee.u)(),{editorTheme:l,setEditorTheme:a,editorLightTheme:o,editorDarkTheme:s,setEditorLightTheme:i,setEditorDarkTheme:r,overallTheme:c}=(0,D.l$)();return"system"!==c||(0,ne.R)()?(0,d.jsx)(H,{onChange:a,value:l,optgroups:n,label:e("editor_theme"),name:"editorTheme",translateOptions:"no"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(H,{onChange:i,value:o,optgroups:n,label:e("editor_theme_light"),name:"editorLightTheme",translateOptions:"no"}),(0,d.jsx)(H,{onChange:r,value:s,optgroups:n,label:e("editor_theme_dark"),name:"editorDarkTheme",translateOptions:"no"})]})}function te(){const{t:e}=(0,t.Bd)(),{fontFamily:n,setFontFamily:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:"monaco",label:"Monaco / Menlo / Consolas"},{value:"lucida",label:"Lucida / Source Code Pro"},{value:"opendyslexicmono",label:"OpenDyslexic Mono"}],label:e("font_family"),name:"fontFamily",translateOptions:"no"})}const ae=[10,11,12,13,14,16,18,20,22,24].map((e=>({value:e,label:`${e}px`})));function oe(){const{t:e}=(0,t.Bd)(),{fontSize:n,setFontSize:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:ae,label:e("font_size"),name:"fontSize"})}function se(){const{t:e}=(0,t.Bd)(),{imageName:n,setImageName:l}=(0,D.l$)(),{write:a}=(0,X.Tg)(),o=(0,W.F)("image-name",l),s=(0,x.useMemo)((()=>(0,p.A)("ol-imageNames")||[]),[]),i=(0,x.useMemo)((()=>s.filter((e=>e.allowed||e.imageName===n)).map((e=>{let{imageName:n,imageDesc:l}=e;return{value:n,label:l}}))),[s,n]);return 0===s.length?null:(0,d.jsx)(H,{onChange:o,value:n,disabled:!a,options:i,label:e("tex_live_version"),name:"imageName",translateOptions:"no"})}function ie(){const{t:e}=(0,t.Bd)(),{mode:n,setMode:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:"default",label:"None"},{value:"vim",label:"Vim"},{value:"emacs",label:"Emacs"}],label:e("keybindings"),name:"mode"})}function re(){const{t:e}=(0,t.Bd)(),{lineHeight:n,setLineHeight:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:"compact",label:e("compact")},{value:"normal",label:e("normal")},{value:"wide",label:e("wide")}],label:e("line_height"),name:"lineHeight"})}var ce=l(36841);function de(){const{t:e}=(0,t.Bd)(),n=(0,p.A)("ol-overallThemes"),{loadingStyleSheet:l}=(0,ce.LV)(),{overallTheme:a,setOverallTheme:o}=(0,D.l$)(),s=(0,x.useMemo)((()=>n?.map((e=>{let{name:n,val:l}=e;return{value:l,label:n}}))??[]),[n]);return!n||(0,ne.R)()?null:(0,d.jsx)(H,{onChange:o,value:a,options:s,loading:l,label:e("overall_theme"),name:"overallTheme"})}function ue(){const{t:e}=(0,t.Bd)(),{pdfViewer:n,setPdfViewer:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:"pdfjs",label:e("overleaf")},{value:"native",label:e("browser")}],label:e("pdf_viewer"),name:"pdfViewer",translateOptions:"no"})}var me=l(49604),he=l(38288);function pe(){const{t:e}=(0,t.Bd)(),{spellCheckLanguage:n,setSpellCheckLanguage:l}=(0,D.l$)(),{permissionsLevel:a}=(0,me.yn)(),o=(0,x.useMemo)((()=>({label:"Language",options:((0,p.A)("ol-languages")??[]).filter((e=>void 0!==e.dic)).map((e=>({value:e.code,label:e.name})))})),[]);return(0,d.jsx)(H,{onChange:l,value:(0,he.H)()?n:"",options:[{value:"",label:e("off")}],optgroups:[o],label:e("spell_check"),name:"spellCheckLanguage",disabled:"readOnly"===a||!(0,he.H)()})}function xe(){const{t:e}=(0,t.Bd)(),{syntaxValidation:n,setSyntaxValidation:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:!0,label:e("on")},{value:!1,label:e("off")}],label:e("syntax_validation"),name:"syntaxValidation"})}function je(){const{t:e}=(0,t.Bd)(),{mathPreview:n,setMathPreview:l}=(0,D.l$)();return(0,d.jsx)(H,{onChange:l,value:n,options:[{value:!0,label:e("on")},{value:!1,label:e("off")}],label:e("equation_preview"),name:"mathPreview"})}var fe=l(29911),ve=l(44411),be=l(47241);function ge(){const{t:e}=(0,t.Bd)(),{setEditorRedesignStatus:n}=(0,ve.Z)(),{setLeftMenuShown:l}=(0,ce.LV)(),a=(0,be.Gq)(),o=(0,be.xR)(),{sendEvent:s}=(0,c.W)(),i=(0,x.useCallback)((e=>{s("switch-to-new-editor",{location:"left-menu"}),n(e).then((()=>l(!1)))}),[n,l,s]);return o?(0,d.jsx)(H,{onChange:i,value:a,options:[{value:!0,label:e("on")},{value:!1,label:e("off")}],label:e("new_editor_look"),name:"new-editor-setting"}):null}const _e=[];function we(){const{t:e}=(0,t.Bd)();return(0,p.A)("ol-anonymous")?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h4",{children:e("settings")}),(0,d.jsxs)(fe.A,{id:"left-menu-setting",className:"settings",children:[(0,d.jsx)(q,{}),(0,d.jsx)(se,{}),(0,d.jsx)(Y,{}),(0,d.jsx)(pe,{}),(0,d.jsx)(Q,{}),_e.map((e=>{let{import:{default:n},path:l}=e;return(0,d.jsx)(n,{},l)})),(0,d.jsx)(U,{}),(0,d.jsx)(R,{}),(0,d.jsx)(xe,{}),(0,d.jsx)(je,{}),(0,d.jsx)(de,{}),(0,d.jsx)(le,{}),(0,d.jsx)(ie,{}),(0,d.jsx)(oe,{}),(0,d.jsx)(te,{}),(0,d.jsx)(re,{}),(0,d.jsx)(ue,{}),(0,d.jsx)(ge,{})]})]})}function ye(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{}),(0,d.jsx)(A,{}),(0,d.jsx)(M,{}),(0,d.jsx)(we,{}),(0,d.jsx)(I,{})]})}},38288:(e,n,l)=>{l.d(n,{H:()=>t});const t=()=>"object"==typeof window.WebAssembly},40862:(e,n,l)=>{l.d(n,{v:()=>i});var t=l(14041),a=l(31085);const[o]=[],s=o?.import.default,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autofillProjectUrl:!0};const[n,l]=(0,t.useState)(!1),o=(0,t.useCallback)((e=>{e?.preventDefault(),l(!1)}),[]),i=(0,t.useCallback)((e=>{e?.preventDefault(),l(!0)}),[]);return{modal:s&&(0,a.jsx)(s,{show:n,handleHide:o,autofillProjectUrl:e.autofillProjectUrl}),hideModal:o,showModal:i}
1}},44634:(e,n,l)=>{l.d(n,{F:()=>o});var t=l(42365),a=l(14041);function o(e,n){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sendEvent:o}=(0,t.W)();return(0,a.useCallback)((t=>{const a={setting:e};l.omitValueInEvent||(a.settingVal=t),o("recompile-setting-changed",a),n(t)}),[o,n,e,l.omitValueInEvent])}},59483:(e,n,l)=>{l.d(n,{u:()=>r});l(82438),l(57327),l(50020);var t=l(12461),a=l(14041),o=l(97434);const s=new Map([["overleaf","overleaf light"]]);function i(e){return(s.get(e)??e).replace(/_/g," ")}function r(){const e=(0,t.A)("ol-editorThemes"),n=(0,t.A)("ol-legacyEditorThemes"),{t:l}=(0,o.Bd)();return(0,a.useMemo)((()=>{const t=[],a=[];e?.forEach((e=>{let{name:n,dark:l}=e;(l?a:t).push({value:n,label:i(n)})}));const o=n?.map((e=>{let{name:n}=e;return{value:n,label:i(n)+" (Legacy)"}}))??[],s=[];return t.length>0&&s.push({label:l("light_themes"),options:t}),a.length>0&&s.push({label:l("dark_themes"),options:a}),o.length>0&&s.push({label:l("legacy_themes"),options:o}),s}),[e,n,l])}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.