"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["react-code-view"],{87453:(e,t,n)=>{n.d(t,{n:()=>r});function r({appendQuery:e,retainScrollPosition:t,returnTarget:n}){window.dispatchEvent(new CustomEvent("blackbird_monolith_append_and_focus_input",{detail:{appendQuery:e,retainScrollPosition:t,returnTarget:n}}))}},23960:(e,t,n)=>{n.d(t,{z:()=>r});function r(e){if("clipboard"in navigator)return navigator.clipboard.writeText(e);let t=document.body;if(!t)return Promise.reject(Error());let n=function(e){let t=document.createElement("pre");return t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="5px",t.textContent=e,t}(e);return t.appendChild(n),!function(e){if("clipboard"in navigator)return navigator.clipboard.writeText(e.textContent||"");let t=getSelection();if(null==t)return Promise.reject(Error());t.removeAllRanges();let n=document.createRange();n.selectNodeContents(e),t.addRange(n),document.execCommand("copy"),t.removeAllRanges(),Promise.resolve()}(n),t.removeChild(n),Promise.resolve()}},61759:(e,t,n)=>{var r,i,a,l,o,s,c=n(5475),d=n(96810),u=n(85893),h=n(47658),m=n(52674),p=n(37589),f=n(81473),x=n(24533),y=n(51952),g=n(46565),b=n(8386),v=n(67294);function j({children:e}){let t=(0,x.T)(),[n]=v.useState(t?.repo),[r]=v.useState(t?.currentUser),i=(0,v.useMemo)(()=>({}),[]);return(0,v.useEffect)(()=>{let e=document.querySelector(".footer");e&&(e.querySelector(".mt-6")?.classList.replace("mt-6","mt-0"),e.querySelector(".border-top")?.classList.remove("border-top"))},[]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("meta",{"data-hydrostats":"publish"}),(0,u.jsx)(b.f6,{children:(0,u.jsx)(y.xp,{initialValue:y._G.xxxlarge,children:(0,u.jsx)(h.n,{appName:"react-code-view",category:"",metadata:i,children:(0,u.jsx)(p.M,{user:r,children:(0,u.jsx)(m.d,{repository:n,children:(0,u.jsx)(g.Kl,{children:(0,u.jsx)(f.o,{children:e})})})})})})})]})}try{j.displayName||(j.displayName="App")}catch{}var w=n(70668),N=n(21573),C=n(56830),k=n(15062),S=n(211),_=n(86525),I=n(29881),R=n(81700),L=n(23180),E=n(79842),T=n(41768),Z=n(91801),B=n(89909),D=n(71207),O=n(40399),F=n(19343),A=n(63451),$=n(81248),P=n(42483),M=n(75308),z=n(55822),H=n(46263),W=n(47357),G=n(85529),U=n(50919),V=n(51526),K=n(98833),q=n(97011),Y=n(86258),X=n(22575),Q=n(78135),J=n(81455),ee=n(79902);function et({symbolKind:e,showFullSymbol:t}){return e?(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",position:"relative",...t?{}:{mr:2}},children:[(0,u.jsx)(P.Z,{sx:{backgroundColor:e.plColor,opacity:.1,position:"absolute",borderRadius:5,alignItems:"stretch",display:"flex",width:"100%",height:"100%"}}),(0,u.jsx)(P.Z,{sx:{color:e.plColor,borderRadius:5,fontWeight:600,...t?{fontSize:"small",px:2,py:"1px",mt:"2px"}:{fontSize:"smaller",px:1,py:"1px"}},children:t?e.fullName:e.shortName})]}):null}try{et.displayName||(et.displayName="SymbolIndicator")}catch{}let en=v.memo(function({treeSymbols:e,onTreeSymbolSelect:t}){let n=!e.some(e=>e.isParent||e.children.length>0);return(0,u.jsx)(P.Z,{id:"filter-results",sx:{mb:-2,overflowY:"auto",maxHeight:"calc(100vh - 237px)",pl:3,pb:2,pt:1},children:(0,u.jsx)(J.L,{"aria-label":"Code Navigation",flat:n,children:e.map((e,n)=>(0,u.jsx)(ei,{id:`${n}${e.symbol.name}`,symbol:e,depth:e.isParent?1:2,onSelect:t},`${n}${e.symbol.name}`))})})});function er({symbol:e}){return(0,u.jsxs)(P.Z,{sx:{display:"flex"},children:[(0,u.jsx)(et,{symbolKind:e.symbol.kind})," ",(0,u.jsx)(ee.Z,{title:e.symbol.name,sx:{maxWidth:180,display:"block"},children:(0,u.jsx)(q.Z,{children:e.symbol.name})})]})}function ei({symbol:e,depth:t,onSelect:n,id:r}){let[i,a]=(0,v.useState)(t<=7);return(0,u.jsxs)(J.L.Item,{onSelect:()=>n(e.symbol),expanded:i,onExpandedChange:()=>a(!i),id:r,children:[(0,u.jsx)(er,{symbol:e}),e.isParent&&e.children.length>0&&(0,u.jsx)(J.L.SubTree,{children:e.children.map((e,r)=>(0,u.jsx)(ei,{symbol:e,depth:e.isParent?t+1:t,onSelect:n,id:`${r}${e.symbol.name}`},`${r}${e.symbol.name}`))})]})}try{en.displayName||(en.displayName="CodeNavSymbolTree")}catch{}try{er.displayName||(er.displayName="CodeNavTreeContent")}catch{}try{ei.displayName||(ei.displayName="CodeNavTreeItem")}catch{}var ea=n(80810),el=n(48542),eo=n(17840),es=n(52516),ec=n(83822),ed=n(73290);let eu=v.memo(function({symbol:e,filterText:t,onSelect:n,focused:r,index:i}){return(0,u.jsx)(es.S.Item,{role:"option",id:`jump-to-item-${i}`,"aria-selected":r,sx:{minWidth:0,...r?{backgroundColor:"var(--bgColor-muted, var(--color-canvas-subtle)) !important"}:{}},onSelect:()=>n(e),children:(0,u.jsx)(ed.Z,{href:e.href(),sx:{":hover":{textDecoration:"none"}},children:(0,u.jsxs)(P.Z,{style:{display:"flex"},children:[(0,u.jsx)(et,{symbolKind:e.kind})," ",(0,u.jsx)(P.Z,{style:{display:"flex",minWidth:0,alignItems:"flex-end"},children:(0,u.jsx)(ec.h,{search:t,text:e.name,overflowWidth:175,hideOverflow:!0},e.fullyQualifiedName)})]})})})});try{eu.displayName||(eu.displayName="JumpToItem")}catch{}function eh(e){return(0,u.jsx)(em,{...e})}function em({codeSymbols:e,filterText:t,onSelect:n,focusedIndex:r}){let i=(0,v.useRef)(e.length),a=(0,v.useRef)(""),{containerRef:l}=(0,eo.v)({bindKeys:el.Qw.ArrowVertical|el.Qw.HomeAndEnd});return(0,v.useEffect)(()=>{e.length===i.current&&(a.current+="\u200B");let t=1===e.length?"symbol":"symbols";(0,ea.x)(`${e.length} ${t} found${a.current}`),i.current=e.length},[e]),(0,u.jsx)(es.S,{ref:l,role:"listbox",id:"filter-results","aria-orientation":"vertical",sx:{maxHeight:"68vh",overflowY:"auto"},children:e.map((e,i)=>{let{name:a,lineNumber:l}=e;return(0,u.jsx)(eu,{symbol:e,filterText:t,onSelect:n,focused:i===r,index:i},`${a}_${l}`)})})}try{eh.displayName||(eh.displayName="JumpToItemList")}catch{}try{em.displayName||(em.displayName="FullJumpToItemList")}catch{}var ep=n(22326);function ef({filterText:e,isFindInFile:t}){let[n,r]=(0,v.useState)(t?"No matches found":"No symbols found"),i=(0,m.H)(),a=(0,v.useRef)(!0);return(0,v.useEffect)(()=>{if(a.current){a.current=!1;return}r(`${n}\u200B`)},[e]),(0,u.jsxs)(P.Z,{sx:{justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column",pb:2},children:[""===e&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(P.Z,{sx:{bg:"canvas.subtle",borderRadius:6,p:"16px"},children:(0,u.jsxs)(P.Z,{sx:{textAlign:"center"},children:[(0,u.jsx)(M.Z,{as:"h3",sx:{fontSize:0,marginBottom:"4px"},children:"Symbol outline not available for this file"}),(0,u.jsx)(P.Z,{sx:{justifyContent:"center",alignItems:"center",display:"flex",fontSize:"12px",color:"fg.muted"},children:"To inspect a symbol, try clicking on the symbol directly in the code view."})]})}),(0,u.jsxs)(P.Z,{sx:{mt:"8px",fontSize:0,textAlign:"center",color:"fg.muted"},children:[" ","Code navigation supports a limited number of languages."," ",(0,u.jsx)(ed.Z,{href:"https://docs.github.com/repositories/working-with-files/using-files/navigating-code-on-github",children:"See which languages are supported."})]})]}),e&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(K.Z,{icon:G.SearchIcon,size:24}),(0,u.jsx)(q.Z,{as:"h3",sx:{textAlign:"center",fontWeight:600,fontSize:3,py:2},role:"alert","aria-relevant":"all",children:n})]}),e&&(0,u.jsxs)(q.Z,{id:"filter-zero-state",sx:{textAlign:"center",px:3,mt:2,fontSize:0,color:"fg.subtle"},children:["No lines in this file contain that string.",(0,u.jsx)("br",{}),"Search in"," ",(0,u.jsxs)(ed.Z,{href:(0,ep.mY)({owner:i.ownerLogin,repo:i.name,searchTerm:e}),inline:!0,children:[i.ownerLogin,"/",i.name]})," ","or"," ",(0,u.jsx)(ed.Z,{href:(0,ep.GX)({searchTerm:e}),inline:!0,children:"all of GitHub"})]})]})}try{ef.displayName||(ef.displayName="SymbolZeroState")}catch{}let ex="symbols-pane-header";function ey({codeSymbols:e,onSymbolSelect:t,treeSymbols:n,autoFocusSearch:r,onClose:i}){let[a,l]=(0,v.useState)(""),[o,s]=(0,v.useState)(e);return(0,v.useEffect)(()=>{if(""===a){s(e);return}let t=function(e,t){let n=e.replace(/\s/g,"");return(0,Y.W)(t,e=>{let t=(0,X.EW)(e.name,n);return t>0?{score:t,text:e.name}:null},X.qu)}(a,e);s(t)},[a,e]),(0,u.jsx)(eg,{treeSymbols:n,codeSymbols:o,filterText:a,setFilterText:l,onSymbolSelect:t,autoFocusSearch:r,onClose:i})}function eg({codeSymbols:e,setFilterText:t,filterText:n,onSymbolSelect:r,treeSymbols:i,autoFocusSearch:a,onClose:l}){let o=e?.length>0,s=i.length>0,[c,d]=(0,v.useState)(-1),{sendRepoKeyDownEvent:h}=(0,L.a)(),m=(0,v.useRef)(null),p=!s||""!==n;(0,v.useEffect)(()=>{a&&m.current?.focus()},[a]),(0,Q.Sl)(()=>{m.current?.focus()});let f=(0,v.useMemo)(()=>(0,H.D)(()=>{h("BLOB_SYMBOLS_MENU.FILTER_SYMBOLS")},400),[h]);return(0,u.jsxs)(P.Z,{sx:{py:2,px:3},"aria-labelledby":ex,children:[(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,u.jsx)(P.Z,{as:"h2",sx:{fontSize:1,order:1,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",fontWeight:600},id:ex,tabIndex:-1,children:"Symbols"}),(0,u.jsx)(U.h,{"aria-label":"Close symbols","data-hotkey":"Escape",icon:G.XIcon,sx:{order:3,color:"fg.default",mr:-2},onClick:l,variant:"invisible"})]}),(o||s)&&(0,u.jsx)(P.Z,{sx:{fontSize:0,color:"fg.muted",pt:2},children:"Find definitions and references for functions and other symbols in this file by clicking a symbol below or in the code."}),(o||""!==n)&&(0,u.jsx)(V.Z,{block:!0,leadingVisual:()=>(0,u.jsx)(K.Z,{"aria-hidden":"true",icon:G.FilterIcon}),ref:m,trailingAction:n?(0,u.jsx)(V.Z.Action,{onClick:()=>{t(""),d(-1)},icon:G.XCircleFillIcon,"aria-label":"Clear input","data-testid":"clear-search",sx:{color:"fg.subtle"}}):(0,u.jsx)(u.Fragment,{}),trailingVisual:n?void 0:()=>(0,u.jsx)(W.I,{children:(0,u.jsx)(P.Z,{sx:{mr:"6px"},children:(0,u.jsx)("kbd",{children:"r"})})}),sx:{mt:2,borderRadius:2},placeholder:"Filter symbols",value:n,name:"Filter symbols","aria-label":"Filter symbols","aria-controls":!o&&p?"filter-zero-state":"filter-results","aria-expanded":"true","aria-autocomplete":"list","aria-activedescendant":-1===c?void 0:`jump-to-item-${c}`,onKeyDown:t=>{if("ArrowDown"===t.key||("N"===t.key||"n"===t.key)&&t.ctrlKey){let t=Math.min(c+1,e.length-1);d(t)}else"ArrowUp"===t.key||("P"===t.key||"p"===t.key)&&t.ctrlKey?d(Math.max(c-1,0)):"Enter"===t.key&&e[c]?r(e[c]):"Escape"===t.key&&l()},role:"combobox",onChange:e=>{let n=e.target;t(n.value),f(),d(-1)}}),!p&&(0,u.jsx)(P.Z,{sx:{ml:-3,mb:-2},children:(0,u.jsx)(en,{treeSymbols:i,onTreeSymbolSelect:r})}),o&&p&&(0,u.jsx)(eh,{codeSymbols:e,filterText:n,onSelect:r,focusedIndex:c}),!o&&p&&(0,u.jsx)(q.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mt:2},children:(0,u.jsx)(ef,{filterText:n})})]})}try{ey.displayName||(ey.displayName="CodeNavSymbolNavigation")}catch{}try{eg.displayName||(eg.displayName="JumpToActionList")}catch{}var eb=n(35061),ev=n(65286),ej=n(65567),ew=n(79697);function eN({buttonFocusId:e,buttonHotkey:t,onButtonClick:n,buttonTestLabel:r,onlyAddHotkeyScopeButton:i}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("button",{hidden:!0,"data-testid":r||"","data-hotkey":t,onClick:n,"data-hotkey-scope":e}),!i&&(0,u.jsx)("button",{hidden:!0,"data-hotkey":t,onClick:n})]})}try{eN.displayName||(eN.displayName="DuplicateOnKeydownButton")}catch{}var eC=n(44168),ek=n(37086),eS=n(40149),e_=n(65302),eI=n(31384),eR=n(85193),eL=n(95475),eE=n(64227),eT=n(96764),eZ=n(28114);let DebouncedWorkerManager=class DebouncedWorkerManager{post(e){if(this.debounceOverrideCondition&&this.debounceOverrideCondition(e))return this.delayId&&clearTimeout(this.delayId),this.postNow(e);this.idle()?(this.delayId&&clearTimeout(this.delayId),this.delayId=setTimeout(()=>{this.postNow(e)},this.delayMs)):this.nextRequest=e}postNow(e){this.currentRequest=e,this.worker.postMessage(e)}idle(){return!this.currentRequest}terminate(){this.worker.terminate()}constructor(e,t=200,n){this.worker=e,this.delayMs=t,this.debounceOverrideCondition=n,this.currentRequest=void 0,this.nextRequest=void 0,this.worker.onmessage=({data:e})=>{this.onResponse(e),this.nextRequest?(this.postNow(this.nextRequest),this.nextRequest=void 0):this.currentRequest=void 0}}};function eB({data:e}){let{query:t,lines:n,currentCodeReferences:r}=e;return{ranges:r?(0,eI.e7)(r,n,(0,eI.Ny)(t)):(0,eI.v)(n,(0,eI.Ny)(t)),query:t}}var eD=n(54026),eO=n(67498),eF=n(87623);function eA(){return async function(e,t,n){let r=new FormData;r.set("tree_view_expanded_preference",null===e?"":e?"true":"false"),r.set("symbols_view_expanded_preference",null===t?"":t?"true":"false"),r.set("code_line_wrap_enabled",null===n?"":n?"true":"false"),(0,eF.Q)("/repos/preferences",{method:"PUT",body:r,headers:{Accept:"application/json"}})}}var e$=n(23239);let eP=(0,v.createContext)({findInFileOpen:!1,setFindInFileOpen:()=>void 0});function eM({children:e,searchTerm:t,setSearchTerm:n,isBlame:r}){let i=(0,e$.nj)(r),a=(0,v.useRef)(""),[l,o]=(0,v.useState)(!1),s=(0,v.useCallback)(e=>{e&&""===t&&""!==a.current?n(a.current):e||""===t||(a.current=t,n("")),o(e)},[t,n]),c=(0,v.useMemo)(()=>({findInFileOpen:!i&&l,setFindInFileOpen:s}),[l,s,i]);return(0,u.jsx)(eP.Provider,{value:c,children:e})}function ez(){return(0,v.useContext)(eP)}try{eP.displayName||(eP.displayName="FindInFileOpenContext")}catch{}try{eM.displayName||(eM.displayName="FindInFileOpenProvider")}catch{}function eH(){let e=(0,eS.G)(),t=(0,ek.Q)();return!e.renderedFileInfo||e.shortPath||t?e.renderImageOrRaw?e.image?"Image":"TooLargeError":e.csv&&!t?"CSV":e.richText&&!t?"Markdown":(e.issueTemplate?.structured&&e.issueTemplate.valid||e.discussionTemplate&&e.discussionTemplate.valid)&&!t&&!e.isPlain?"IssueTemplate":"Code":"FileRenderer"}function eW(e){throw Error(`Unexpected object: ${e}`)}!function(e){e.FileRenderer="FileRenderer",e.Image="Image",e.TooLargeError="TooLargeError",e.CSV="CSV",e.Markdown="Markdown",e.IssueTemplate="IssueTemplate",e.Code="Code"}(r||(r={}));var eG=n(71735),eU=n(44629);function eV(e){let t=(0,v.useRef)(null);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eG.X,{...e,ref:t}),(0,u.jsx)(eU.Z,{containerRef:t})]})}try{eV.displayName||(eV.displayName="MarkdownContent")}catch{}var eK=n(10558),eq=n(56363),eY=n(15631),eX=n(89250);let eQ=(0,v.createContext)([]);try{eQ.displayName||(eQ.displayName="SplitCodeownersErrorsContext")}catch{}var eJ=n(68912),e0=n(19435),e1=n(65809),e2=n(55607),e3=n(98486),e5=n(9292),e4=n(79804),e8=n(77461),e6=n(75299),e9=n(34603),e7=n(91863),te=n(65379);let tt=[.007,.014,.03,.049,.084,.14,.23,.38,.62,Number.MAX_VALUE],tn={"scale.orange.0":"#ffdfb6","scale.orange.1":"#ffc680","scale.orange.2":"#f0883e","scale.orange.3":"#f0883e","scale.orange.4":"#db6d28","scale.orange.5":"#bd561d","scale.orange.6":"#9b4215","scale.orange.7":"#762d0a","scale.orange.8":"#5a1e02","scale.orange.9":"#3d1300"};var tr=n(76741),ti=n(36829);let ta=v.forwardRef(to);function tl({copilotAccessAllowed:e,linesData:t,tabSize:n,onLineNumberClick:r}){let i=(0,v.useRef)(null),a=(0,ek.Q)(),l=tc(a,t);return(0,u.jsx)("div",{className:"d-flex flex-column",style:{tabSize:n},ref:i,"data-hpc":!0,children:l.map((t,n)=>(0,u.jsx)(ts,{...t,index:n,copilotAccessAllowed:e,onLineNumberClick:r},`blame-for-segment-${t.range?.start??t.linesData[0].lineNumber}`))})}function to({copilotAccessAllowed:e,linesData:t,tabSize:n,materializeAllLines:r,onLineNumberClick:i},a){let l=(0,v.useRef)(null),o=(0,ek.Q)(),{screenSize:s}=(0,y.eI)();(0,v.useImperativeHandle)(a,()=>({scrollToTop:()=>{(0,eE.nB)(0)||d.scrollToIndex(0,{align:"start"})},scrollToLine:e=>{(0,eE.nB)(e)||d.scrollToIndex(e,{align:"center"})}}));let c=(0,v.useCallback)(e=>{let n=t[e],r=o?.ranges[n.lineNumber];return r&&r.end===r.start?window.innerWidth>y._G.medium?31:41:20},[t,o]),d=(0,e9.F)({parentRef:l,size:t.length,overscan:r?Number.MAX_SAFE_INTEGER:100,estimateSize:c}),h=d.virtualItems.map(e=>({...t[e.index],virtualOffset:e.start})),m=tc(o,h);return(0,u.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",isolation:"isolate",position:"relative",tabSize:n,height:[`${d.totalSize+41*m.length}px`,`${d.totalSize+41*m.length}px`,`${d.totalSize}px`]},ref:l,"data-hpc":!0,children:m.map((t,n)=>{let r=t.linesData[0].virtualOffset??0;return s1?"":"react-blame-no-line-data"}`,children:n.map(e=>(0,u.jsx)(ti._7,{codeLineData:e,onClick:a},`line-number-${e.lineNumber}-content-${e.rawText?.substring(0,100)}`))}),(0,u.jsx)("div",{className:`react-code-lines ${n.length>1?"":"react-blame-no-line-data"}`,children:n.map(e=>(0,u.jsx)(tr.E,{stylingDirectivesLine:e.stylingDirectivesLine,id:`LC${e.lineNumber}`,codeLineData:e,copilotAccessAllowed:i},`code-line=${e.lineNumber}-content-${e.rawText?.substring(0,100)}`))})]})]})})}function tc(e,t){if(!e)return[{linesData:t}];let n=[],r=null,i=!0;for(let a of t){r||(r={linesData:[]});let t=i?Object.values(e?.ranges??{}).find(e=>e.start<=a.lineNumber&&e.end>=a.lineNumber):e?.ranges[a.lineNumber];t&&(r.range=t,r.commit=e.commits[t.commitOid]),r.linesData.push(a),r.range?.end===a.lineNumber&&(n.push(r),r=null),i=!1}return r&&(n.push(r),r=null),n}let td=v.memo(tu);function tu({range:e,commit:t}){let n=(0,m.H)(),r=new Date(t.committedDate),i=new Date(n.createdAt),a=(0,u.jsx)("div",{className:"timestamp-ago",children:(0,u.jsx)(e7.Z,{date:r,tense:"past",sx:{color:"fg.muted",whiteSpace:"nowrap",fontSize:"smaller"}})});return(0,u.jsxs)("div",{className:"react-blame-for-range d-flex",children:[(0,u.jsx)("div",{"aria-hidden":!0,className:"age-indicator",children:(0,u.jsx)(tm,{commitDate:r,repoCreationDate:i})}),(0,u.jsx)("div",{className:"pt-1 timestamp-wrapper-desktop",children:a}),(0,u.jsx)("div",{className:"author-avatar-wrapper",children:t.authorAvatarUrl&&(0,u.jsx)(e4.O,{src:t.authorAvatarUrl,size:18})}),(0,u.jsx)(P.Z,{sx:{verticalAlign:"top",pt:[2,2,"6px"],pb:[2,2,0],minWidth:[0,0,170],flexGrow:[1,1,1]},children:(0,u.jsx)("div",{className:"d-flex",children:(0,u.jsx)(e6.WZ,{html:t.shortMessageHtmlLink,sx:{whiteSpace:"nowrap",ml:2,overflowX:"hidden",textOverflow:"ellipsis",maxWidth:"100%",fontSize:[1,1,0]},"data-hovercard-url":(0,ep.QY)({owner:n.ownerLogin,repo:n.name,commitish:t.oid})})})}),(0,u.jsxs)(P.Z,{sx:{display:"flex",alignContent:"flex-start",justifySelf:"flex-end",verticalAlign:"top",pl:2,pt:["2px","2px","1px"],pb:[1,1,0],width:[150,150,34],pr:[2,2,0]},children:[(0,u.jsx)("div",{className:"pt-1 pr-3 timestamp-wrapper-mobile",children:a}),(0,u.jsx)(th,{range:e,commit:t})]})]})}function th({range:e,commit:t}){let n=(0,m.H)();if(!e.reblamePath)return null;let r=(0,ep.t4)({owner:n.ownerLogin,repo:n.name,commitish:t.firstParentOid,filePath:e.reblamePath}),i=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric"}),a=t.oid.slice(0,7),l=i.format(new Date(t.committedDate)),o=`Blame prior to change ${a}, made on ${l}`,s=`reblame-${a}`;return(0,u.jsx)(te.Z,{"aria-label":o,id:s,children:(0,u.jsx)(e8.r,{"aria-labelledby":s,to:r,className:"Button Button--iconOnly Button--invisible Button--small",children:(0,u.jsx)(G.VersionsIcon,{})})})}function tm({commitDate:e,repoCreationDate:t}){let n=function(e,t){let{resolvedColorScheme:n}=(0,b.Fg)(),r=n?.startsWith("dark"),i=r?tn["scale.orange.9"]:tn["scale.orange.0"];if(e(0,u.jsx)(ti._7,{codeLineData:e,onClick:t,ownedCodeSections:n,onLineStickOrUnstick:i,onCollapseToggle:s},`line-number-${e.lineNumber}-content:${e.rawText?.substring(0,100)}`))}),(0,u.jsx)("div",{className:"react-code-lines",children:e.map(e=>(0,u.jsx)(tr.E,{codeLineData:e,codeLineClassName:e.codeLineClassName,stylingDirectivesLine:e.stylingDirectivesLine,id:`LC${e.lineNumber}`,onLineStickOrUnstick:i,setIsCollapsed:s,codeLineToSectionMap:r,copilotAccessAllowed:o,measureRef:void 0},`line-data-${e.lineNumber}-content:${e.rawText?.substring(0,100)}`))})]}),1e3===e.length&&(0,u.jsx)(P.Z,{sx:{justifyContent:"center",display:"flex"},children:(0,u.jsx)(ed.Z,{href:d,children:"View remainder of file in raw view"})})]})}try{tx.displayName||(tx.displayName="CodeLinesSSR")}catch{}try{ty.displayName||(ty.displayName="CodeLinesSSRUnmemoized")}catch{}var tg=n(29285),tb=n(82163),tv=n(86148),tj=n(30788);let tw=v.memo(tN);function tN({linesData:e,onLineNumberClick:t,codeSections:n,nonTruncatedLinesData:r,colorizedLines:i,onLineStickOrUnstick:a,tabSize:l,contentWidth:o,copilotAccessAllowed:s,onCollapseToggle:c}){let d=(0,g.OY)().codeWrappingOption.enabled,{rawBlobUrl:h}=(0,eS.G)(),m=[...Array(Math.floor(e.length/tf.Jf)+1).keys()];return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(P.Z,{className:"react-code-file-contents",role:"presentation","aria-hidden":!0,"data-tab-size":l,"data-paste-markdown-skip":!0,sx:{tabSize:l,isolation:"isolate",position:"relative",width:o,overflow:"auto",maxWidth:d?"100%":"unset"},"data-hpc":!0,children:[(0,u.jsx)("div",{className:"react-line-numbers-no-virtualization",style:{pointerEvents:"auto",position:"relative",zIndex:2},children:m.map(r=>{let i=e.slice(r*tf.Jf,Math.min(r*tf.Jf+tf.Jf,e.length));return(0,u.jsx)("div",{className:"react-no-virtualization-wrapper-lines",children:i.map(e=>(0,u.jsx)(tv.L,{codeLineData:e,onClick:t,ownedCodeSections:n,onLineStickOrUnstick:a,onCollapseToggle:c},`line-number-${e.lineNumber}`))},`line-number-wrapper-${r}`)})}),(0,u.jsxs)("div",{className:"react-code-lines react-code-lines-no-virtualization",children:[(0,u.jsx)(tb._,{linesData:e}),(0,u.jsx)(tg.i,{linesData:e,copilotAccessAllowed:s}),(0,u.jsx)(tj.pb,{linesData:r,colorizedLines:i}),1e3===e.length&&(0,u.jsx)(P.Z,{sx:{justifyContent:"center",display:"flex"},children:(0,u.jsx)(ed.Z,{href:h,children:"View remainder of file in raw view"})})]})]})})}try{tw.displayName||(tw.displayName="CodeLinesSSRNoVirtualization")}catch{}try{tN.displayName||(tN.displayName="CodeLinesSSRNoVirtualizationUnmemoized")}catch{}var tC=n(51409),tk=n(87453);function tS({linesData:e,onCodeNavTokenSelected:t,onLineNumberClick:n,isBlame:r,isCursorVisible:i,isVirtualized:a,textAreaRef:l,shouldRenderOverlay:o,tabSize:s,optionalTestLeftOffsetFunction:c,textSelection:d,onCollapseToggle:h,onLineStickOrUnstick:p,optionalTestTopOffsetFunction:f,additionalTextAreaInstructions:x}){let y;let[g,b]=(0,v.useState)(0),[j,w]=(0,v.useState)(0),[N,C]=(0,v.useState)(!1),k=(0,v.useRef)(""),S=(0,v.useRef)(null),R=(0,m.H)(),{refInfo:L,path:E}=(0,_.Br)(),{cursorNavigationHighlightLine:T,expandAndFocusLineContextMenu:Z,cursorNavigationEnter:B,searchShortcut:D,cursorNavigationPageDown:O,cursorNavigationPageUp:F}=(0,I.bx)(),A=(0,eX.TH)();(0,v.useEffect)(()=>{b(0),w(0)},[A.key]),(0,v.useEffect)(()=>{function e(e){k.current=e.key}return window.oncontextmenu=function(e){if("ContextMenu"===k.current&&-1===e.button&&document.activeElement?.className.indexOf(e5.firstOptionId)!==-1)return k.current="",e?.preventDefault(),e?.stopPropagation(),!1},window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e),window.oncontextmenu=null}},[]);let $=r?e$.O$:e$.jn,M=(0,v.useRef)(null),{onEnter:z,updateUrlForLineNumber:H,onPageUp:W,onPageDown:G,currentStartLine:U,currentStartChar:V,currentEndLine:K,currentEndChar:Y,determineAndSetTextAreaCursorPosition:X,getCorrectLineNumberWithCollapsedSections:Q}=(0,e$.RP)(M,t,c??b,f??w,e,a,r,n,l,s,x,d),J=(0,v.useRef)(!1);(0,v.useEffect)(()=>{J.current=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},[]);let ee=(0,eJ.G)("react-line-numbers"),et=i?{height:`${ee}px`,width:"1.5px",backgroundColor:"fg.default",position:"absolute",visibility:J.current?"hidden":"visible",zIndex:2}:{};return y=U.current===K.current&&V.current===Y.current?`#L${U.current+1}C${V.current}`:`#${(0,eL.g1)({start:{line:U.current+1,column:V.current},end:{line:K.current+1,column:Y.current}})}`,(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(P.Z,{"aria-hidden":!0,style:{top:j,left:$+g},sx:et,ref:M,"data-testid":"navigation-cursor",className:"code-navigation-cursor",children:" "}),o&&(0,u.jsx)("div",{style:{top:j+ee,left:$+g,zIndex:2},className:"position-absolute border rounded-2 color-bg-subtle px-3 py-2",children:(0,u.jsxs)(q.Z,{sx:{pointerEvents:"auto"},children:["Code view is read-only."," ",L.canEdit&&(0,u.jsx)(e8.r,{to:(0,ep.ti)({owner:R.ownerLogin,repo:R.name,filePath:E,commitish:L.name,hash:y}),children:"Switch to the editor."})]})}),N&&(0,u.jsx)(e5.default,{ref:S,rowBeginId:`LG${Q(U.current)}`,rowBeginNumber:Q(U.current),rowEndNumber:Q(K.current),rowEndId:`LG${Q(K.current)}`,openOnLoad:!0,cursorRef:M,onCollapseToggle:h,onLineStickOrUnstick:p,lineData:function(){if(U.current!==K.current)return null;let t=e[U.current];if(!t)return null;if(t.isStartLine)return t;if(""===t.codeLineClassName)return null;let n=t.codeLineClassName?.split("child-of-line-");if(!n||t.codeLineClassName?.indexOf("child-of-line-")===-1)return null;let r=parseInt(n[n.length-1]?.trim()??"undefined");return r&&!Number.isNaN(r)?e[r-1]&&e[r-1]?.lineNumber===r?e[r-1]:e[(0,eE.Bx)(r,e)]:null}(),onMenuClose:function(e,t){C(e),setTimeout(()=>{t&&X(),l?.current?.focus()},300)}}),(0,u.jsx)("button",{hidden:!0,"data-testid":"NavigationCursorEnter","data-hotkey":B.hotkey,onClick:z,"data-hotkey-scope":eE.KG}),(0,u.jsx)("button",{hidden:!0,"data-testid":"NavigationCursorSetHighlightedLine","data-hotkey":T.hotkey,onClick:H,"data-hotkey-scope":eE.KG}),(0,u.jsx)("button",{hidden:!0,"data-testid":"NavigationCursorSetHighlightAndExpandMenu","data-hotkey":Z.hotkey,onClick:e=>(e.preventDefault(),e.stopPropagation(),C(!0),setTimeout(()=>{S.current?.setAnchor(M.current)},0),!1),"data-hotkey-scope":eE.KG}),(0,u.jsx)("button",{hidden:!0,"data-testid":"NavigationCursorPageDown","data-hotkey":O.hotkey,onClick:G,"data-hotkey-scope":eE.KG}),(0,u.jsx)("button",{hidden:!0,"data-testid":"NavigationCursorPageUp","data-hotkey":F.hotkey,onClick:W,"data-hotkey-scope":eE.KG}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:D.hotkey,onButtonClick:()=>{(0,tk.n)({retainScrollPosition:!0,returnTarget:l?.current??void 0})},onlyAddHotkeyScopeButton:!0})]})}try{tS.displayName||(tS.displayName="NavigationCursor")}catch{}var t_=n(57512),tI=n(59148),tR=n(73935);function tL({onDismiss:e}){let{expandAndFocusLineContextMenu:t,cursorNavigationEnter:n,cursorNavigationHighlightLine:r}=(0,I.bx)();return(0,tR.createPortal)((0,u.jsx)(tI.V,{width:"large","aria-label":"Code Blob Focused Hotkeys",onClose:e,title:"Code Blob Focused Hotkeys",children:(0,u.jsx)("div",{children:(0,u.jsxs)("div",{children:[(0,u.jsxs)("div",{className:"p-1",children:["Select the line the cursor is on ",(0,u.jsx)("kbd",{children:r.text})]}),(0,u.jsxs)("div",{className:"p-1",children:["Select the symbol under the cursor ",(0,u.jsx)("kbd",{children:n.text})]}),(0,u.jsxs)("div",{className:"p-1",children:["Move focus to the highlighted line menu ",(0,u.jsx)("kbd",{children:t.text})]})]})})}),document.body)}try{tL.displayName||(tL.displayName="TextAreaHelpDialog")}catch{}function tE({textAreaRef:e,setTextOverlayShouldBeVisible:t,setTextSelection:n,setAdditionalTextAreaInstructions:r,cursorClickStartRef:i,parentRef:a,tabSize:l,plainTextLinesAsString:o,numLines:s,setIsTextAreaFocused:c}){let d=(0,e$.nj)(),h=(0,g.OY)().codeWrappingOption,m=(0,I.tW)(),p=(0,I.ln)(),f=(0,eJ.G)("react-line-numbers"),x=f*(s+1),[j,w]=(0,v.useState)(!1),{cursorNavigationOpenHelpDialog:N}=(0,I.bx)(),C=(0,b.Fg)();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("textarea",{id:eE.KG,"data-testid":eE.KG,ref:e,onMouseUp:r=>(function(e,t,n,r,i,a,l,o){if(a&&!e.defaultPrevented&&i){if(2===e.button)e.preventDefault(),e.stopPropagation();else if(0===e.button){n(!1);let a=(0,y.ZV)(window.innerWidth),s=ac+l.current?.clientHeight){i.current={startX:-2,startY:-2};return}let d=(0,eE.BS)(e.pageY,c,o),u=l.current?.getBoundingClientRect().left||0,h=e.clientX-u-e$.jn,m=!1;(d{t&&t.current&&r({start:t.current.selectionStart,end:t.current.selectionEnd,keyboard:!1,displayStart:m})},0)}}})(r,e,t,n,i,d,a,f),onMouseDown:e=>(function(e,t,n,r,i){if(n&&!e.defaultPrevented&&r){if(2===e.button){e.preventDefault(),e.stopPropagation();return}if(0===e.button){if(e.ctrlKey){e.preventDefault(),e.stopPropagation();return}let n=(0,y.ZV)(window.innerWidth),a=nl+t.current?.clientHeight){r.current={startX:-2,startY:-2};return}let o=(0,eE.BS)(e.pageY,l,i),s=t.current?.getBoundingClientRect().left||0,c=e.clientX-s-e$.jn;r.current={startX:c,startY:o}}}})(e,a,d,i,f),"aria-label":"file content","aria-readonly":!0,inputMode:"none",tabIndex:0,"aria-multiline":!0,"aria-haspopup":!1,"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",style:{resize:"none",marginTop:-2,paddingLeft:e$.jn,paddingRight:e$.rU,display:"hidden",width:"100%",backgroundColor:"unset",boxSizing:"border-box",color:"transparent",position:"absolute",border:"none",tabSize:l,outline:"none",overflowX:"auto",height:x,fontSize:"12px",lineHeight:"20px",overflowY:"hidden",overflowWrap:h.enabled?"anywhere":"normal",overscrollBehaviorX:"none",whiteSpace:h.enabled?"pre-wrap":"pre",zIndex:1},value:o,onKeyDown:function(i){m.includes(i.key)||p.includes(i.key)&&(i.getModifierState("Control")||i.getModifierState("Alt")||i.getModifierState("Shift")||i.getModifierState("Meta"))?(" "===i.key&&(i.preventDefault(),i.shiftKey?r(`PageUp${Date.now()}`):r(`PageDown${Date.now()}`)),i.altKey&&i.ctrlKey&&"\u02D9"===i.key&&w(!0),t(!1),setTimeout(()=>{e.current&&n({start:e.current.selectionStart,end:e.current.selectionEnd,keyboard:!0,displayStart:!1})},5)):!i.ctrlKey&&!i.metaKey&&!i.altKey&&!i.shiftKey&&(function(e,t){let n=e.exec(t);return n&&n[0]===t}(/[a-zA-Z0-9-_ ]{1,1}/,i.key)||"Backspace"===i.key||"Enter"===i.key)&&((0,ea.x)("Code view is read only."),t(!0),i.preventDefault())},spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",autoComplete:"off","data-ms-editor":"false",onDrop:e=>{let t=e.dataTransfer.getData("Text");try{let e=new URL(t);window.open(e,"_blank")?.focus()}catch(e){}return!1},onPaste:e=>(e.preventDefault(),!1),onChange:()=>{},className:`react-blob-textarea react-blob-print-hide${C.resolvedColorScheme?.endsWith("contrast")?" select-contrast":""}`,onFocus:()=>{c(!0)}}),j&&(0,u.jsx)(tL,{onDismiss:()=>{w(!1)}}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:N.hotkey,onButtonClick:()=>{w(!0)},onlyAddHotkeyScopeButton:!0})]})}try{tE.displayName||(tE.displayName="TextArea")}catch{}let tT=(0,eq.Z)("localStorage");function tZ({blobLinesHandle:e,onCodeNavTokenSelected:t,codeSections:n,codeLineToSectionMap:r,validCodeNav:i,onLineStickOrUnstick:a,searchResults:l,focusedSearchResult:o}){let{rawLines:s,colorizedLines:c,stylingDirectives:d,tabSize:h}=(0,eS.G)(),m=!!(0,ek.Q)(),[p,f]=(0,v.useState)(!1),x=(0,e$.nj)(),y=(0,eJ.G)("react-line-numbers"),[b,j]=(0,v.useState)(void 0),[w,N]=(0,v.useState)({start:-1,end:-1,keyboard:!0,displayStart:!1}),[C,k]=(0,v.useState)(""),[S,I]=(0,v.useState)(!1),R=(0,v.useRef)(null),[L,E]=(0,v.useState)(!1),T=(0,v.useRef)({startX:0,startY:0}),{hash:Z}=(0,eX.TH)(),{refInfo:B,path:D,copilotAccessAllowed:O}=(0,_.Br)(),F=(0,v.useRef)(null),[A,$]=(0,v.useState)(void 0),[M]=(0,eY.D)(()=>!1,!0,[]),z=(0,v.useRef)(null),W=(0,g.OY)().codeWrappingOption.enabled,G=eA(),U=(0,e0.D)(),V=(0,e_.k)(),K=(0,v.useCallback)(()=>{j(eL.n6(window.location.hash)?.blobRange)},[]),{findInFileOpen:q,setFindInFileOpen:Y}=ez(),X=(0,v.useContext)(eQ),{lines:Q,plainTextLinesAsString:J,nonTruncatedLinesData:ee}=function(e,t,n,r,i){let a=function(e,t,n,r,i){let[a]=(0,eY.D)(()=>e.length,Math.min(e.length,1e3),[e]);return(0,v.useMemo)(()=>{let l=Array(a).fill(null).map((e,t)=>t+1);return l.map(a=>{let l;let o=t?.[a-1],s=!1,c=!1;for(let e of n?.get(a)??[])e.startLine===a&&(s=!0,l=e),e.endLine===a&&(c=!0);let d=e[a-1]?.replace(/[\n\r]/g,"")??"",u=i&&i.get(a)||[],h=(0,eE.TX)(u,a,c,n);return{stylingDirectivesLine:o,lineNumber:a,codeLineClassName:h,isStartLine:s,isEndLine:c,ownedSection:l,rawText:d,bidi:(0,e2.ud)(d),codeownersLineError:r?.find(e=>e.line===a)}})},[a,t,e,i,n,r])}(e,t,n,r,i),l=(0,e2.fq)(),o=(0,v.useRef)("");(0,eE.PO)(e=>o.current=function(e){let t=[...e];return t.sort(),t.join(",")}(e));let s=(0,v.useMemo)(()=>(function(e,t){let n=new Set;for(let r=0;r!n.has(e.lineNumber))})(a,n),[a,n,o.current]),c=s.map(e=>l&&e.rawText?(0,e2.V1)(e.rawText):e.rawText).join("\n");return{lines:s,plainTextLinesAsString:c,nonTruncatedLinesData:a}}(s??[],d??null,n??null,X,r),et=(0,tf.ZE)(ee.length)&&c&&0!==c.length,en=(0,v.useRef)(Q);en.current=Q,(0,v.useEffect)(()=>{(0,eE.Yo)()},[B.currentOid,D]),(0,v.useEffect)(()=>{window.onbeforeprint=()=>f(!0),window.onafterprint=()=>f(!1)},[]),(0,v.useEffect)(()=>{G(null,null,W)},[]),(0,v.useEffect)(()=>{"true"!==tT.getItem("heardHelpAnnouncement")&&((0,eE.dM)("While the code is focused, press Alt+F1 for a menu of operations.",2e3),tT.setItem("heardHelpAnnouncement","true"))},[]),function(e,t){let n=!!(0,ek.Q)(),r=(0,e$.nj)();(0,v.useEffect)(()=>{let i;if(n||!t||r)return;let a=(0,H.D)(t=>{clearTimeout(i),i=setTimeout(()=>{(function(e,t){let n=function(e,t,n){let r,i;if(document.caretPositionFromPoint){let e=document.caretPositionFromPoint(t,n);e&&(r=e.offsetNode,i=e.offset)}else if(document.caretRangeFromPoint){let e=document.caretRangeFromPoint(t,n);e&&(r=e.startContainer,i=e.startOffset)}if(!r||"number"!=typeof i||r.nodeType!==Node.TEXT_NODE||!r.textContent)return null;let a=function(e,t,n){let r;let i=null;for(;r=t.exec(e);){if(t.lastIndex===i){(0,e1.eK)(Error("regexp did not advance in findNearestMatch()"));break}i=t.lastIndex;let e=r.index+r[0].length;if(r.index<=n&&n<=e)return[r[0],r.index,e]}return null}(r.textContent,e,i);if(!a)return null;let l=document.createRange();return l.setStart(r,a[1]),l.setEnd(r,a[2]),l}(/\w+[!?]?/g,e.clientX,e.clientY);if(!n)return;let r=n.commonAncestorContainer.parentElement;if(r)for(let e of r.classList){if(["pl-token","pl-c","pl-s","pl-k"].includes(e))return null;let r=n.toString();if(!r||r.match(/\n|\s|[();&.=",]/))return null;let{lineNumber:i,offset:a,node:l}=function(e){let t=e.startContainer,n=e.startOffset;for(;;){let e=t.previousSibling;for(;e;)n+=(e.textContent||"").length,e=e.previousSibling;let r=t.parentElement;if(!r)return{lineNumber:0,offset:0,node:null};if(r.classList.contains("react-file-line")){let e=parseInt(r.getAttribute("data-line-number")||"1",10);return{lineNumber:e,offset:n,node:t}}t=r}}(n);if(0===i&&0===a||!l)return null;return t({lineNumber:i,offset:a,node:l})}})(t,e)},15)},5);return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a)}},[e,n,t,r])}((0,v.useCallback)(e=>{if(e&&e?.node&&!m){if(!e.node.textContent||e.node.textContent.length<3)return;let n=e.node;!n||!n.hasAttribute||n.hasAttribute("clickadded")||(n.classList.add("pl-token"),n.setAttribute("clickadded","true"),n.addEventListener("click",function(n){let r=n.target.textContent?n.target.textContent:"";t&&e&&(t({selectedText:r,lineNumber:e.lineNumber,offset:e.offset}),q&&Y(!1))}))}},[q,m,Y,t]),i);let er=({line:t,column:n})=>{if(t<10)e.current?.scrollToTop();else if(e.current){let i=(0,eE.Bx)(t,Q);if(-1===i){let e=r?.get(t);for(let t of e??[])t&&t.collapsed&&(t.collapsed=!1,(0,eE.yw)(t?.startLine));U()}setTimeout(()=>{let r=(0,eE.Bx)(t,en.current);e.current?.scrollToLine(r,n)},0),V&&!(0,eE.nB)(t)&&(a(null,!0),(0,eE.DD)(V,t,r,a))}};return(0,v.useEffect)(()=>{let e=(0,eL.n6)(Z);if(!e.blobRange?.start?.line){j(void 0);return}j(e.blobRange)},[D,Z,Q.length]),(0,v.useEffect)(()=>{let e=(0,eL.n6)(Z);e.blobRange?.start?.line&&setTimeout(()=>er({line:e.blobRange.start.line}),0)},[D,m]),(0,v.useEffect)(()=>{let e=F.current;if(!e||!x){$(void 0);return}$(e.scrollWidth>e.clientWidth?e.scrollWidth:void 0);let t=new ResizeObserver(e=>{for(let{target:t}of e)$(t.scrollWidth>t.clientWidth?t.scrollWidth:void 0)});return t.observe(e),()=>{t.disconnect()}},[x,D]),(0,eT.z)(er),(0,u.jsx)(t_.Sh,{searchResults:l,focusedSearchResult:o,children:(0,u.jsxs)(tC.ku,{highlightedLines:b,children:[Q.some(e=>e.bidi)&&(0,u.jsx)(e2.h7,{}),(0,u.jsx)(P.Z,{sx:{display:"flex",flex:1,py:m?0:2,flexDirection:"column",justifyContent:"space-between",minWidth:0,position:"relative"},children:(0,u.jsx)(e5.HighlightedLineMenuContainer,{children:(0,u.jsx)(e3.Id,{children:(0,u.jsxs)(P.Z,{sx:{flex:1,position:"relative",minWidth:0,overflowX:m?"auto":void 0,overflowY:m?"hidden":void 0},ref:R,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||I(!1)},children:[x&&(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(P.Z,{ref:z,sx:{position:"absolute",width:"100%",overflow:"hidden"},children:(0,u.jsx)(P.Z,{sx:{width:A,height:y*Q.length},children:(0,u.jsx)(tS,{linesData:Q,isBlame:!1,onCodeNavTokenSelected:t,onLineNumberClick:K,isCursorVisible:!!S,isVirtualized:!0,textAreaRef:F,onCollapseToggle:U,onLineStickOrUnstick:a,tabSize:h,textSelection:w,shouldRenderOverlay:!!L,additionalTextAreaInstructions:C??""})})})}),x&&(0,u.jsx)(tE,{textAreaRef:F,setTextOverlayShouldBeVisible:E,setTextSelection:N,setAdditionalTextAreaInstructions:k,cursorClickStartRef:T,parentRef:R,tabSize:h,plainTextLinesAsString:J,numLines:Q.length,setIsTextAreaFocused:I}),m?M?(0,u.jsx)(tl,{linesData:Q,tabSize:h,copilotAccessAllowed:O,onLineNumberClick:K}):(0,u.jsx)(ta,{ref:e,linesData:Q,tabSize:h,copilotAccessAllowed:O,onLineNumberClick:K}):M?et?(0,u.jsx)(tw,{linesData:Q,nonTruncatedLinesData:ee,onLineNumberClick:K,colorizedLines:c,codeSections:n,codeLineToSectionMap:r,onLineStickOrUnstick:a,tabSize:h,contentWidth:A,copilotAccessAllowed:O,onCollapseToggle:U}):(0,u.jsx)(tx,{linesData:Q,onLineNumberClick:K,codeSections:n,codeLineToSectionMap:r,onLineStickOrUnstick:a,tabSize:h,contentWidth:A,copilotAccessAllowed:O,onCollapseToggle:U}):et?(0,u.jsx)(tf.Dc,{ref:e,linesData:Q,nonTruncatedLinesData:ee,onLineNumberClick:K,colorizedLines:c,codeSections:n,codeLineToSectionMap:r,onLineStickOrUnstick:a,tabSize:h,textAreaRef:F,cursorContainerRef:z,contentWidth:A??F.current?.clientWidth,onCollapseToggle:U,materializeAllLines:p,copilotAccessAllowed:O}):(0,u.jsx)(tp.sE,{ref:e,linesData:Q,onLineNumberClick:K,codeSections:n,codeLineToSectionMap:r,onLineStickOrUnstick:a,tabSize:h,contentWidth:A,cursorContainerRef:z,onCollapseToggle:U,textAreaRef:F,materializeAllLines:p,copilotAccessAllowed:O})]})})})})]})})}try{tZ.displayName||(tZ.displayName="CodeBlob")}catch{}function tB({displayName:e,displayUrl:t}){return(0,u.jsx)(P.Z,{sx:{display:"flex",justifyContent:"center",width:"100%"},children:(0,u.jsx)(P.Z,{as:"img",alt:e,src:t,"data-hpc":!0,sx:{maxWidth:"100%"}})})}try{tB.displayName||(tB.displayName="ImageBlob")}catch{}var tD=n(45677),tO=n(17791),tF=n(8760),tA=n(9770),t$=n(99782);function tP({issueTemplate:e,type:t}){return(0,u.jsxs)(P.Z,{sx:{borderBottomLeftRadius:"6px",borderBottomRightRadius:"6px",p:5},children:[(0,u.jsxs)(P.Z,{as:"table",sx:{mb:3},children:[(0,u.jsx)("thead",{children:(0,u.jsxs)("tr",{children:["issue"===t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(tM,{header:!0,children:"Name"}),(0,u.jsx)(tM,{header:!0,children:"About"})]}):(0,u.jsx)(tM,{header:!0,children:"Title"}),e.type&&(0,u.jsx)(tM,{header:!0,children:"Type"}),(0,u.jsx)(tM,{header:!0,children:"Labels"}),e.projects&&(0,u.jsx)(tM,{header:!0,children:"Projects"}),"issue"===t&&(0,u.jsx)(tM,{header:!0,children:"Assignees"})]})}),(0,u.jsx)("tbody",{children:(0,u.jsxs)("tr",{children:["issue"===t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(tM,{children:e.name}),(0,u.jsx)(tM,{children:e.about})]}):(0,u.jsx)(tM,{children:e.title}),e.type&&(0,u.jsx)(tM,{children:e.type}),(0,u.jsx)(tM,{children:e.labels}),e.projects&&(0,u.jsx)(tM,{children:e.projects}),"issue"===t&&(0,u.jsx)(tM,{children:e.assignees})]})})]}),e.inputs.map((e,t)=>(0,u.jsx)(tz,{input:e},t))]})}function tM({children:e,header:t}){return(0,u.jsx)(P.Z,{as:t?"th":"td",sx:{p:"6px 13px",border:"1px solid var(--borderColor-default, var(--color-border-default))"},children:e})}function tz({input:e}){switch(e.type){case"markdown":return(0,u.jsx)(tH,{input:e});case"dropdown":return(0,u.jsx)(tW,{input:e});case"input":return(0,u.jsx)(tG,{input:e});case"textarea":return(0,u.jsx)(tU,{input:e});case"checkboxes":return(0,u.jsx)(tV,{input:e});default:return null}}function tH({input:e}){return e.value?(0,u.jsx)(e6.wB,{html:e.value}):null}function tW({input:e}){let t=e.options?.slice();e.required||t?.unshift("None");let n=e.multiple?"Selections: ":"Selection: ";return e.value&&(n+=e.value),(0,u.jsx)(tK,{input:e,sx:{alignItems:"start"},children:(0,u.jsxs)(tD.P,{children:[(0,u.jsx)(tD.P.Button,{children:n}),(0,u.jsx)(tD.P.Overlay,{width:"medium",children:(0,u.jsx)(es.S,{selectionVariant:e.multiple?"multiple":"single",children:t?.map((t,n)=>u.jsx(es.S.Item,{selected:t===e.value,disabled:!0,children:t},n))})})]})})}function tG({input:e}){return(0,u.jsx)(tK,{input:e,children:(0,u.jsx)(V.Z,{placeholder:e.placeholder,value:e.value??""})})}function tU({input:e}){return(0,u.jsx)(tK,{input:e,children:(0,u.jsx)(tO.ZP,{placeholder:e.placeholder,value:e.value??"",sx:e.render?{fontFamily:"mono"}:{}})})}function tV({input:e}){return e.checkboxes?(0,u.jsxs)(tF.Z,{disabled:!0,sx:{color:"var(--fgColor-default, var(--color-fg-default)) !important",my:"15px"},children:[(0,u.jsx)(tF.Z.Label,{sx:{color:"var(--fgColor-default, var(--color-fg-default))",fontSize:["18px","18x","20px"],fontWeight:600},children:e.label}),e.description&&(0,u.jsx)(tF.Z.Caption,{sx:{color:"var(--fgColor-muted, var(--color-fg-subtle))",fontSize:"12px"},children:(0,u.jsx)(e6.wB,{html:e.description})}),e.checkboxes.map((e,t)=>(0,u.jsxs)(tA.Z,{disabled:!0,required:e.required,children:[(0,u.jsx)(t$.Z,{}),(0,u.jsx)(tA.Z.Label,{children:e.label})]},t))]}):null}function tK({children:e,input:t,sx:n}){return(0,u.jsxs)(tA.Z,{disabled:!0,required:t.required,sx:{my:"15px",...n},children:[(0,u.jsx)(tA.Z.Label,{sx:{color:"var(--fgColor-default, var(--color-fg-default))",fontSize:["18px","18x","20px"],"> span > span:last-of-type":{color:"var(--fgColor-danger, var(--color-danger-fg))"}},children:t.label}),t.description&&(0,u.jsx)(tA.Z.Caption,{children:(0,u.jsx)(e6.wB,{html:t.description})}),e]})}!function(e){e.Issue="issue",e.Discussion="discussion"}(a||(a={}));try{tP.displayName||(tP.displayName="YamlTemplateContent")}catch{}try{tM.displayName||(tM.displayName="MarkdownTableCell")}catch{}try{tz.displayName||(tz.displayName="TemplateInput")}catch{}try{tH.displayName||(tH.displayName="MarkdownInput")}catch{}try{tW.displayName||(tW.displayName="DropdownInput")}catch{}try{tG.displayName||(tG.displayName="InputInput")}catch{}try{tU.displayName||(tU.displayName="TextareaInput")}catch{}try{tV.displayName||(tV.displayName="CheckboxesInput")}catch{}try{tK.displayName||(tK.displayName="InputWrapper")}catch{}let tq=(0,v.lazy)(()=>n.e("app_assets_modules_react-code-view_components_blob_BlobContent_CSV_CSVBlob_tsx").then(n.bind(n,39776))),tY=(0,v.lazy)(()=>n.e("app_assets_modules_react-code-view_components_blob_BlobContent_Renderable_FileRendererBlob_tsx").then(n.bind(n,61158)));function tX({setOpenPanel:e,codeNavInfo:t,validCodeNav:n,onCodeNavTokenSelected:i,onLineStickOrUnstick:a,searchResults:l,setSearchTerm:o,blobLinesHandle:s,focusedSearchResult:c}){let d=!!(0,ek.Q)(),{rawLines:h}=(0,eS.G)(),{sendRepoKeyDownEvent:m}=(0,L.a)(),{findInFileShortcut:p}=(0,I.bx)(),f=eH(),{setFindInFileOpen:x}=ez(),y=f===r.Code,g=y&&null!=h&&n?p.hotkey:"",b=(0,e$.nj)();(0,v.useEffect)(()=>{y||e(void 0)},[y,e]);let j=y||f===r.CSV||f===r.Markdown?{}:{overflow:"auto"},w=f===r.Markdown?{justifyContent:"center"}:{};return(0,u.jsxs)(P.Z,{as:"section","aria-labelledby":"file-name-id-wide file-name-id-mobile",sx:{backgroundColor:"var(--bgColor-default, var(--color-canvas-default))",border:"0px",borderWidth:0,borderRadius:"0px 0px 6px 6px",p:0,minWidth:0,mt:d?"92px":"46px",...w,...j},children:[(0,u.jsx)(tQ,{blobLinesHandle:s,onCodeNavTokenSelected:i,codeSections:d?void 0:t?.codeSections,codeLineToSectionMap:t?t.lineToSectionMap:void 0,validCodeNav:n,onLineStickOrUnstick:a,searchResults:l,focusedSearchResult:c}),y&&!b&&(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:g,onButtonClick:function(){x(!0),m("BLOB_FIND_IN_FILE_MENU.OPEN");let e=window.getSelection()?.toString();e&&o(e)},buttonTestLabel:"hotkey-button"})]})}let tQ=v.memo(function({onCodeNavTokenSelected:e,codeSections:t,codeLineToSectionMap:n,validCodeNav:i,onLineStickOrUnstick:l,searchResults:o,blobLinesHandle:s,focusedSearchResult:c}){let d=(0,eS.G)(),h=eH();switch(h){case r.TooLargeError:return(0,u.jsxs)(P.Z,{sx:{textAlign:"center"},"data-hpc":!0,children:[(0,u.jsx)(ed.Z,{href:d.rawBlobUrl,children:"View raw"}),d.large&&(0,u.jsx)("p",{children:"(Sorry about that, but we can\u2019t show files that are this big right now.)"})]});case r.Code:return(0,u.jsx)(tZ,{blobLinesHandle:s,onCodeNavTokenSelected:e,codeSections:t,codeLineToSectionMap:n,validCodeNav:i,onLineStickOrUnstick:l,searchResults:o,focusedSearchResult:c});case r.Markdown:return(0,u.jsx)(eV,{richText:d.richText,sx:{borderBottomLeftRadius:"6px",borderBottomRightRadius:"6px",p:5,minWidth:0}});case r.CSV:return(0,u.jsx)(v.Suspense,{fallback:(0,u.jsx)(eK.m,{}),children:(0,u.jsx)(tq,{csv:d.csv})});case r.FileRenderer:return(0,u.jsx)(v.Suspense,{fallback:(0,u.jsx)(eK.m,{}),children:(0,u.jsx)(tY,{identityUuid:d.renderedFileInfo.identityUUID,size:d.renderedFileInfo.size,type:d.renderedFileInfo.renderFileType,url:d.displayUrl})});case r.Image:return(0,u.jsx)(tB,{displayName:d.displayName,displayUrl:d.displayUrl});case r.IssueTemplate:return(0,u.jsx)(tP,{issueTemplate:d.issueTemplate?d.issueTemplate:d.discussionTemplate,type:d.issueTemplate?a.Issue:a.Discussion,"data-hpc":!0});default:eW(h)}});try{tq.displayName||(tq.displayName="CSVBlob")}catch{}try{tY.displayName||(tY.displayName="FileRendererBlob")}catch{}try{tX.displayName||(tX.displayName="BlobContent")}catch{}try{tQ.displayName||(tQ.displayName="Blob")}catch{}var tJ=n(80589),t0=n(55703),t1=n(46741),t2=n(88049),t3=n(33831),t5=n(89042),t4=n(23960),t8=n(38498),t6=n(8308),t9=n(20299);function t7({disabled:e,...t}){return(0,u.jsx)(U.h,{size:"small",...t,...e?{className:"btn","aria-disabled":!0,onClick:e=>e.preventDefault()}:{}})}try{t7.displayName||(t7.displayName="AccessibleIconButton")}catch{}var ne=n(63309);let nt=(0,v.lazy)(()=>n.e("app_assets_modules_react-code-view_components_blob_BlobContent_CodeNav_ScrollMarks_tsx").then(n.bind(n,9130)));function nn({stickied:e,searchTerm:t,searchResults:n,setSearchTerm:r,focusedSearchResult:i,setFocusedSearchResult:a,onClose:l}){let o=(0,e$.nj)(),s=(0,v.useRef)(null),{findInFileShortcut:c,findSelectionShortcut:d,findNextShortcut:h,findPrevShortcut:m}=(0,I.bx)(),[p,f]=(0,v.useState)(!0),x=()=>{r(""),a(0)},{sendRepoKeyDownEvent:y}=(0,L.a)(),g=e=>{if(void 0===i){a(0);return}1===e?a(i===n.length-1?0:i+1):a(0===i?n.length-1:i-1)};(0,v.useEffect)(()=>{s.current?.focus(),s.current?.select()},[]);let b=()=>{let e=window.getSelection()?.toString();e?.length&&(r(e),a(0),y("BLOB_FIND_IN_FILE_MENU.FIND_IN_FILE_FROM_SELECTION")),s.current?.focus(),s.current?.select()};return((0,v.useEffect)(()=>{n.length>0&&void 0!==i&&(0,eT.v)({line:n[i].lineNumber,column:n[i].ident.start.column})},[n,i]),o)?null:(0,u.jsxs)(P.Z,{className:`find-in-file-popover ${e?"find-in-file-popover-stickied":"find-in-file-popover-not-stickied"}`,children:[(0,u.jsxs)(P.Z,{sx:{fontSize:0,py:2,pl:3,pr:2,borderBottom:"1px solid var(--borderColor-default, var(--color-border-default))",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",alignItems:"baseline"},children:[(0,u.jsx)(q.Z,{as:"h5",sx:{color:"fg.default",pr:2,fontWeight:"bold"},children:"Find"}),(0,u.jsxs)(q.Z,{className:"find-text-help-tooltip",sx:{color:"fg.subtle",visibility:p?"visible":"hidden"},children:["Press ",(0,u.jsx)(ne.Z,{children:c.text})," again to open the browser's find menu"]})]}),(0,u.jsx)(P.Z,{sx:{flex:1}}),(0,u.jsx)(U.h,{variant:"invisible",size:"small",onClick:l,icon:G.XIcon,sx:{color:"fg.subtle"},"aria-label":"Close find in file"})]}),(0,u.jsxs)(P.Z,{sx:{px:2,py:"6px"},children:[(0,u.jsx)(V.Z,{ref:s,sx:{pl:1,border:"none",boxShadow:"none"},validationStatus:n.length>1e3?"error":void 0,type:"text",leadingVisual:()=>(0,u.jsx)(K.Z,{icon:G.SearchIcon,"aria-hidden":"true"}),"aria-labelledby":"find-in-file-label","aria-expanded":"true",autoComplete:"off",name:"Find in file input",placeholder:"Search this file",value:t,block:!0,onChange:e=>{e.target.value?(f(!1),r(e.target.value),void 0===i&&a(0)):(f(!0),x())},trailingAction:(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[(0,u.jsxs)(q.Z,{className:"text-small",sx:{textAlign:"center",color:"fg.subtle",m:2},children:[0===n.length||void 0===i?0:i+1,"/",n.length]}),(0,u.jsx)(U.h,{size:"small",variant:"invisible",onClick:()=>{g(-1)},icon:G.ChevronUpIcon,"aria-label":"Up","data-testid":"up-search",sx:{color:"fg.subtle"}}),(0,u.jsx)(U.h,{size:"small",variant:"invisible",onClick:()=>{g(1)},icon:G.ChevronDownIcon,"aria-label":"Down","data-testid":"down-search",sx:{color:"fg.subtle"}})]}),onKeyDown:e=>{"Enter"===e.code||"NumpadEnter"===e.code?e.shiftKey?g(-1):g(1):(e.metaKey||e.ctrlKey)&&("g"===e.key||"G"===e.key)?(e.preventDefault(),e.shiftKey?g(-1):g(1)):(e.metaKey||e.ctrlKey)&&("f"===e.key||"F"===e.key)?p?(y("BLOB_FIND_IN_FILE_MENU.FALLBACK_TO_BROWSER_SEARCH"),l()):(f(!0),e.preventDefault(),s.current?.focus(),s.current?.select()):"Escape"===e.key&&l()}}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:c.hotkey,onButtonClick:b,buttonTestLabel:"hotkey-button"}),(0,u.jsx)("button",{hidden:!0,"data-hotkey":d.hotkey,onClick:b,"data-testid":"selection-hotkey"}),(0,u.jsx)("button",{hidden:!0,"data-hotkey":h.hotkey,onClick:()=>g(1),"data-testid":"find-next-button"}),(0,u.jsx)("button",{hidden:!0,"data-hotkey":m.hotkey,onClick:()=>g(-1),"data-testid":"find-prev-button"}),(0,u.jsx)(v.Suspense,{fallback:null,children:(0,u.jsx)(nt,{definitionsOrReferences:n})})]})]})}try{nt.displayName||(nt.displayName="ScrollMarks")}catch{}try{nn.displayName||(nn.displayName="FindInFilePopover")}catch{}var nr=n(86028),ni=n(43177),na=n(90836),nl=n(54901);function no({showTitle:e=!0}){let{sendRepoClickEvent:t}=(0,L.a)(),[n,r]=(0,v.useState)(!1),i=(0,m.H)(),{refInfo:a,path:l}=(0,_.Br)(),{contributors:o,loading:s,error:c}=(0,ni.o)(i.ownerLogin,i.name,a.name,l);if(c)return(0,u.jsx)(nd,{});if(s)return(0,u.jsx)(nr.N,{width:100,"data-testid":"contributors-skeleton"});if(!o||!o?.users.length)return null;let{users:d,totalCount:h}=o,p=nc(h," contributor","contributors");return(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,u.jsx)(P.Z,{sx:{display:"flex",flexDirection:"row"},children:(0,u.jsx)(na.Z,{children:d.slice(0,10).map((e,t)=>(0,u.jsx)(e4.O,{className:t>5?"AvatarShowLarge":"AvatarShowMedium",src:e.primaryAvatarUrl,alt:e.login,"data-testid":"contributor-avatar","data-hovercard-url":(0,ep.zP)({owner:e.login})},e.login))})}),(0,u.jsxs)(ed.Z,{as:"button","aria-label":`Show ${p}"`,onClick:()=>{r(!0),t("CONTRIBUTORS.LIST.OPEN")},"data-testid":"contributors-count-button",sx:{ml:2,color:"fg.default"},children:[(0,u.jsx)(K.Z,{icon:G.PeopleIcon}),e&&(0,u.jsx)(q.Z,{className:"react-contributors-title",sx:{mx:1,fontSize:0},children:"Contributors"}),(0,u.jsx)(nl.Z,{sx:{mx:1,px:2,py:1},children:h})]}),n&&(0,u.jsx)(tI.V,{title:p,onClose:()=>r(!1),width:"medium",height:o.totalCount>=12?"small":"auto",renderBody:()=>(0,u.jsx)(es.S,{sx:{overflowY:"auto",py:2},"data-testid":"contributor-dialog-list",children:d.map(e=>(0,u.jsx)(ns,{user:e},e.login))})})]})}function ns({user:e}){let{sendRepoClickEvent:t}=(0,L.a)(),{path:n,refInfo:r}=(0,_.Br)(),i=(0,m.H)();return(0,u.jsxs)(es.S.Item,{sx:{display:"flex",flexDirection:"row",fontSize:1,py:2,color:"fg.default","&:hover":{backgroundColor:"canvas.subtle"}},"data-testid":"contributor-dialog-row",onClick:()=>t("CONTRIBUTORS.LIST.USER"),children:[(0,u.jsxs)(ed.Z,{as:e8.r,sx:{flex:1},muted:!0,to:e.profileLink,onClick:()=>t("CONTRIBUTORS.LIST.USER"),children:[(0,u.jsx)(e4.O,{src:e.primaryAvatarUrl,alt:e.login,sx:{mr:2},"aria-hidden":"true"}),(0,u.jsx)(ee.Z,{inline:!0,title:e.login,children:e.login})]}),(0,u.jsx)(es.S.TrailingVisual,{children:(0,u.jsx)(ed.Z,{as:e8.r,muted:!0,to:(0,ep.SV)({repo:i,branch:r.name,path:n,author:e.login}),onClick:()=>t("CONTRIBUTORS.LIST.COMMITS"),"aria-label":`${nc(e.commitsCount,"commit","commits")} by ${e.login}`,"data-testid":"commit-link",children:nc(e.commitsCount,"commit","commits")})})]})}function nc(e,t,n){return`${e} ${1===e?t:n}`}function nd(){return(0,u.jsxs)(q.Z,{sx:{color:"danger.fg"},children:[(0,u.jsx)(K.Z,{icon:G.AlertFillIcon}),"\xa0Cannot retrieve contributors info at this time."]})}try{no.displayName||(no.displayName="ContributorAvatars")}catch{}try{ns.displayName||(ns.displayName="ContributorRow")}catch{}try{nd.displayName||(nd.displayName="ContributorsError")}catch{}var nu=n(17191),nh=n(88216),nm=n(89673);function np({fileNameId:e="file-name-id",id:t,fontSize:n,showCopyPathButton:r}){let i=(0,m.H)(),{refInfo:a,path:l,action:o}=(0,_.Br)();return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(nm.a,{path:l,repo:i,commitish:a.name,isFolder:"tree"===o,fileNameId:e,id:t,fontSize:n,showCopyPathButton:r&&""!==l&&"/"!==l})})}try{np.displayName||(np.displayName="ReposHeaderBreadcrumb")}catch{}function nf({isStickied:e,showTree:t,treeToggleElement:n}){let r=()=>(0,u.jsx)(np,{id:"sticky-breadcrumb",fileNameId:"sticky-file-name-id",fontSize:1}),i=({sx:e})=>(0,u.jsx)(nh.r,{leadingVisual:G.ArrowUpIcon,variant:"invisible",size:"small",sx:{color:"fg.default",...e},onClick:e=>{e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})},children:"Top"});return(0,u.jsx)(P.Z,{sx:{display:e?"flex":"none",minWidth:0,py:2,...e?{backgroundColor:"canvas.subtle",borderLeft:"1px solid var(--borderColor-default, var(--color-border-default))",borderRight:"1px solid var(--borderColor-default, var(--color-border-default))"}:{}},children:t?(0,u.jsxs)(P.Z,{sx:{mr:2,ml:3,textOverflow:"ellipsis",overflow:"hidden",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,u.jsx)(r,{}),(0,u.jsx)(i,{sx:{ml:2}})]}):(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",overflow:"hidden",mx:2,flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center"},children:[e&&n,(0,u.jsx)(P.Z,{sx:{ml:1,mr:2},children:(0,u.jsx)(nu.S,{buttonClassName:"ref-selector-class"})}),(0,u.jsx)(P.Z,{sx:{textOverflow:"ellipsis",overflow:"hidden",display:"flex"},children:(0,u.jsx)(r,{})})]}),(0,u.jsx)(i,{sx:{ml:2}})]})})}try{nf.displayName||(nf.displayName="FileNameStickyHeader")}catch{}try{(l=StickyReposHeaderBreadcrumb).displayName||(l.displayName="StickyReposHeaderBreadcrumb")}catch{}try{(o=GoToTopButton).displayName||(o.displayName="GoToTopButton")}catch{}let nx=v.memo(ny);function ny(){let e=function(){let{resolvedColorScheme:e}=(0,b.Fg)(),t=e?.startsWith("dark");return t?Array(10).fill(null).map((e,t)=>tn[`scale.orange.${9-t}`]):Array(10).fill(null).map((e,t)=>tn[`scale.orange.${t}`])}();return(0,u.jsxs)(P.Z,{"aria-hidden":!0,sx:{display:"flex",color:"fg.muted",alignItems:"center",gap:"2px",fontSize:0},children:[(0,u.jsx)(q.Z,{sx:{mr:2},children:"Older"}),e.map((e,t)=>(0,u.jsx)(P.Z,{sx:{height:"0.5rem",width:"0.5rem",backgroundColor:e}},`blame-recency-color-${t}`)),(0,u.jsx)(q.Z,{sx:{ml:2},children:"Newer"})]})}try{ny.displayName||(ny.displayName="BlameAgeLegend")}catch{}var ng=n(72278);function nb(){let{headerInfo:{isCSV:e,isRichtext:t,shortPath:n},renderedFileInfo:r,image:i,issueTemplate:a,discussionTemplate:l,viewable:o}=(0,eS.G)(),s=(0,ek.Q)(),[c]=(0,eR.l)(),d="1"===c.get("plain")||!!c.get("short_path")?.length,h=r&&!o||i,m=t||a||l||e||r,p=r?`short_path=${n}`:"plain=1",{getUrl:f}=(0,E.B)(),x=!m||d||s?s?2:1:0,[y,g]=(0,v.useState)(x);(0,A.b)(()=>{g(x)},[x]);let b=(0,eR.s)(),{viewCodeShortcut:j,viewPreviewShortcut:w,viewBlameShortcut:N}=(0,I.bx)(),C=e=>{if(m||(e+=1),g(e),y!==e)switch(e){case 0:b(f({action:"blob",params:"",hash:""}));break;case 1:{let e=location.hash?.substring(1)??void 0;b(f({action:"blob",params:m?p:"",hash:e}));break}case 2:{let e=location.hash?.substring(1)??void 0;b(f({action:"blame",params:"",hash:e}))}}};if(h)return null;let k=[(0,u.jsx)(ng.s.Button,{selected:1===y,"data-hotkey":j.hotkey,children:"Code"},"raw"),(0,u.jsx)(ng.s.Button,{selected:2===y,"data-hotkey":N.hotkey,children:"Blame"},"blame")],S=(0,u.jsx)(ng.s.Button,{selected:0===y,"data-hotkey":w.hotkey,children:"Preview"},"preview'"),_=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:j.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:()=>C(m?1:0)}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:N.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:()=>C(m?2:1)}),m&&(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:w.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:()=>C(0)})]}),R=m?h?[S]:[S,...k]:[...k];return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ng.s,{"aria-label":"File view",size:"small",onChange:C,sx:{fontSize:1},children:R}),_]})}try{nb.displayName||(nb.displayName="BlobTabButtons")}catch{}var nv=n(89463);function nj({className:e}){let{codeownerInfo:t}=(0,nv.nO)(),{helpUrl:n}=(0,_.Ou)(),r=(0,eS.G)(),{path:i,refInfo:a}=(0,_.Br)(),l=(0,m.H)(),o=(0,ek.Q)(),{headerInfo:{blobSize:s,isGitLfs:c,lineInfo:{truncatedLoc:d,truncatedSloc:h},mode:p},viewable:f,rawLines:x}=r,y="symbolic link"===p?function({rawLines:e,blame:t,repo:n,refInfo:r,path:i}){if(!e||!e[0])return null;let a=e[0];(a.startsWith("../")||a.startsWith("./"))&&(a=`${i}/../${a}`);let l={owner:n.ownerLogin,repo:n.name,commitish:r.name,filePath:a};return t?(0,ep.t4)(l):(0,ep.C9)(l)}({rawLines:x,blame:o,repo:l,refInfo:a,path:i}):void 0;return(0,u.jsx)(P.Z,{className:e,sx:{alignItems:"center"},children:(0,u.jsxs)(P.Z,{sx:{fontSize:0,flex:"auto",pr:3,color:"fg.muted",minWidth:0},className:"text-mono",children:["file"!==p&&!y&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ee.Z,{title:p,inline:!0,sx:{ml:1,mr:2,textTransform:"capitalize"},children:(0,u.jsx)(q.Z,{children:p})}),f&&(0,u.jsx)(q.Z,{sx:{color:"fg.muted",mr:1},children:"\xb7"})]}),f?(0,u.jsxs)(u.Fragment,{children:[y&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ed.Z,{as:e8.r,muted:!0,to:y,sx:{ml:1,mr:2},children:"Symbolic Link"}),(0,u.jsx)(q.Z,{sx:{color:"fg.muted",mr:1},children:"\xb7"})]}),(0,u.jsx)(ee.Z,{title:s,inline:!0,sx:{maxWidth:"100%"},"data-testid":"blob-size",children:(0,u.jsx)(q.Z,{children:`${d} lines (${h} loc) \xb7 ${s}`})})]}):(0,u.jsx)(q.Z,{children:s}),t&&(0,u.jsx)(nw,{codeownerInfo:t}),c&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(q.Z,{className:"file-info-divider"}),(0,u.jsx)(ed.Z,{muted:!0,href:`${n}/articles/versioning-large-files/`,"aria-label":"Learn more about Git LFS",sx:{ml:2},children:(0,u.jsx)(K.Z,{icon:G.QuestionIcon})}),(0,u.jsx)(q.Z,{children:" Stored with Git LFS"})]})]})})}function nw({codeownerInfo:{codeownerPath:e,ownedByCurrentUser:t,ownersForFile:n,ruleForPathLine:r}}){let i;if(!(t||n))return null;let a=(i="Owned by ",t&&(i+="you",n&&(i+=" along with ")),i+=n,r&&(i+=` (from CODEOWNERS line ${r})`),i),l=t?{color:"var(--fgColor-accent, var(--color-accent-fg))"}:{};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(q.Z,{sx:{color:"fg.muted"},children:" \xb7 "}),(0,u.jsx)(te.Z,{id:"codeowners-tooltip","aria-label":a,wrap:!0,sx:{mr:2},children:e?(0,u.jsx)(ed.Z,{"aria-labelledby":"codeowners-tooltip",href:e,muted:!t,sx:l,children:(0,u.jsx)(K.Z,{icon:G.ShieldLockIcon})}):(0,u.jsx)(K.Z,{icon:G.ShieldLockIcon,sx:l})})]})}try{nj.displayName||(nj.displayName="CodeSizeDetails")}catch{}try{nw.displayName||(nw.displayName="CodeOwnersBadge")}catch{}var nN=n(20679);function nC({editEnabled:e,githubDevUrl:t,ghDesktopPath:n,onBranch:r}){let{sendRepoClickEvent:i}=(0,L.a)(),a=(0,nN.f)(["windows","mac"]),{openWithGitHubDevShortcut:l}=(0,I.bx)();return(0,u.jsxs)(es.S.Group,{title:"Open with...",children:[t?(0,u.jsxs)(es.S.LinkItem,{onClick:()=>i("BLOB_EDIT_DROPDOWN.DEV_LINK",{edit_enabled:e}),className:"js-blob-dropdown-click js-github-dev-shortcut",href:t,"data-hotkey":l.hotkey,children:["github.dev",(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(W.I,{children:(0,u.jsx)("kbd",{children:"."})})})]}):null,r&&a&&n?(0,u.jsx)(es.S.LinkItem,{onClick:()=>i("BLOB_EDIT_DROPDOWN.DESKTOP"),href:n,children:"GitHub Desktop"}):null]})}function nk(e,t,n){let r=(0,nN.f)(["windows","mac"]);return!!(e||t&&!r&&n)}try{nC.displayName||(nC.displayName="OpenWithActionItems")}catch{}function nS({editAllowed:e,hasOpenWithItem:t}){let n=(0,eS.G)(),{refInfo:{canEdit:r}}=(0,_.Br)(),{githubDevUrl:i}=(0,_.Ou)(),{sendRepoClickEvent:a}=(0,L.a)(),{getUrl:l}=(0,E.B)(),{headerInfo:{ghDesktopPath:o,onBranch:s}}=n;return(0,u.jsxs)(u.Fragment,{children:[e&&(0,u.jsx)(es.S.Group,{title:"Edit file",children:(0,u.jsxs)(es.S.Item,{as:e8.r,onClick:()=>a("BLOB_EDIT_DROPDOWN.IN_PLACE"),to:l({action:"edit"}),"aria-keyshortcuts":"e",children:[(0,u.jsx)(P.Z,{sx:{display:"flex"},children:"Edit in place"}),(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(W.I,{children:(0,u.jsx)("kbd",{children:"e"})})})]})}),e&&t&&(0,u.jsx)(es.S.Divider,{}),t&&(0,u.jsx)(nC,{editEnabled:r,githubDevUrl:i,ghDesktopPath:o,onBranch:s})]})}try{nS.displayName||(nS.displayName="EditMenuActionItems")}catch{}var n_=n(7949),nI=n(79655);function nR({shortcut:e}){return(0,u.jsx)(u.Fragment,{children:e.text?.split(" ").map(e=>u.jsxs(v.Fragment,{children:[u.jsx("kbd",{children:e})," "]},e))})}try{nR.displayName||(nR.displayName="KeyboardVisual")}catch{}var nL=n(74390);function nE(){let e=(0,eS.G)();return e.workflowRedirectUrl}function nT({onBlamePage:e,onDismiss:t,maxLineNumber:n}){let r=(0,eR.s)(),i=(0,e$.nj)(),a=(0,e$.Tw)(),l=(0,e$.i$)(),o=(0,v.useRef)(i?a:1),s=(0,v.useRef)(!0),[c,d]=(0,v.useState)(!0),h=(0,v.useRef)(a!==l&&i?l:null),{refInfo:p,path:f}=(0,_.Br)(),x=(0,m.H)(),y=(0,v.useRef)(null),g=(0,v.useRef)(o.current?`#L${o.current}${h.current?`-L${h.current}`:""}`:""),b=e?(0,ep.t4)({repo:x.name,owner:x.ownerLogin,filePath:f,commitish:p.name}):(0,ep.C9)({repo:x.name,owner:x.ownerLogin,filePath:f,commitish:p.name});(0,v.useEffect)(()=>{y&&y.current&&(y.current.value=i?`${a}${l!==a?`-${l}`:""}`:"1",y.current.focus())},[]);let j=e=>{let n=(0,eL.n6)(e);if(!n.blobRange?.start?.line||!s.current){d(s.current),setTimeout(()=>{y.current?.focus()},25);return}(0,eT.v)({line:n.blobRange.start.line}),t()};return(0,tR.createPortal)((0,u.jsxs)(nL.Z,{isOpen:!0,onDismiss:t,children:[(0,u.jsx)(nL.Z.Header,{children:"Jump to line"}),(0,u.jsxs)(P.Z,{sx:{display:"flex",pl:3,pr:3,pt:3,pb:c?3:0},children:[(0,u.jsx)(P.Z,{sx:{display:"flex",flexGrow:1,mr:2},children:(0,u.jsx)(V.Z,{ref:y,"aria-invalid":!c,"aria-describedby":c?"":"goToLineErrorValidation",sx:{flexGrow:1,pr:2},placeholder:"Jump to line...",onChange:e=>{let t=e.target.value;y&&y.current&&(y.current.value=t),function(e){let t=!0;if(""===e.trim()&&(o.current=1),e.startsWith("-")&&n){let r=parseInt(e,10);if(!Number.isNaN(r)&&r<0){let e=n+r+1;e<=0&&(e=1,t=!1),o.current=e}}else if(e.includes("-")){let[r,i]=e.split("-"),a=parseInt(r,10),l=parseInt(i,10);!Number.isNaN(a)&&a>0&&(o.current=n?Math.min(a,n):a,t=void 0!==n&&a<=n),!Number.isNaN(l)&&l>0&&(h.current=n?Math.min(l,n):l,t=t&&void 0!==n&&l<=n)}else{let r=parseInt(e,10);!Number.isNaN(r)&&r>0?(o.current=n?Math.min(r,n):r,t=void 0!==n&&r<=n):t=""===e}s.current=t,t&&!c&&d(!0),g.current=`#L${o.current}${h.current?`-L${h.current}`:""}`}(t)},onFocus:()=>{y&&y.current&&y.current.select()},onKeyDown:e=>{if("Enter"===e.key){if("Enter"===e.key&&!s.current){d(s.current),setTimeout(()=>{y.current?.focus()},25);return}r(b+g.current),j(g.current)}}})}),(0,u.jsx)(t5.Q,{href:c?b+g.current:void 0,onClick:()=>j(g.current),sx:tJ.A,children:"Go"})]}),!c&&(0,u.jsx)(P.Z,{role:"alert",id:"goToLineErrorValidation",sx:{display:"flex",p:2,justifyContent:"center",color:"red"},children:"Invalid line number"})]}),document.body)}try{nT.displayName||(nT.displayName="GoToLineDialog")}catch{}var nZ=n(34734),nB=n(88947);function nD(){let e=(0,m.H)(),{path:t,refInfo:n}=(0,_.Br)();return n.canEdit?(0,u.jsx)(es.S.LinkItem,{as:e8.r,to:(0,ep.Qi)({repo:e,path:t,commitish:n.name,action:"tree/delete"}),children:(0,u.jsx)(q.Z,{sx:{color:"danger.fg"},children:"Delete directory"})}):null}try{(s=function(){let{refInfo:e}=(0,_.Br)();return e.canEdit?(0,u.jsxs)(tD.P,{children:[(0,u.jsx)(tD.P.Anchor,{children:(0,u.jsx)(U.h,{icon:G.KebabHorizontalIcon,"aria-label":"More folder actions",title:"More folder actions"})}),(0,u.jsx)(tD.P.Overlay,{children:(0,u.jsx)(es.S,{children:(0,u.jsx)(nD,{})})})]}):null}).displayName||(s.displayName="TreeOverflowMenu")}catch{}try{nD.displayName||(nD.displayName="DeleteDirectoryItem")}catch{}function nO({inputRef:e,onFindFilesShortcut:t}){let{sendRepoKeyDownEvent:n}=(0,L.a)(),{findFilesShortcut:r}=(0,I.bx)();return(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:r.hotkey,onButtonClick:()=>{t?.(),e?.current?.focus(),n("GO_TO_FILE")}})}try{nO.displayName||(nO.displayName="FindFilesShortcut")}catch{}let nF=(0,v.lazy)(()=>Promise.all([n.e("vendors-node_modules_github_text-expander-element_dist_index_js"),n.e("app_assets_modules_react-code-view_components_blob-edit_WebCommitDialog_tsx")]).then(n.bind(n,91835)));function nA({webCommitInfo:e,isBlob:t}){let[n,r]=(0,v.useState)("closed"),i=(0,v.useRef)(null),a=(0,m.H)(),{refInfo:l,path:o}=(0,_.Br)(),{helpUrl:s}=(0,_.Ou)(),c=(0,ep.Qi)({repo:a,commitish:l.name,action:t?"blob":"tree",path:o});return e.shouldFork||e.shouldUpdate||e.lockedOnMigration?null:(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",gap:2,flexWrap:"wrap-reverse",justifyContent:"flex-end"},children:[(0,u.jsx)(nh.r,{as:e8.r,to:c,children:"Cancel changes"}),(0,u.jsx)(nh.r,{variant:"primary",ref:i,onClick:()=>{(0,v.startTransition)(()=>{r("pending")})},children:"Commit changes..."}),("pending"===n||"saving"===n)&&(0,u.jsx)(v.Suspense,{fallback:null,children:(0,u.jsx)(nF,{isNewFile:!1,isDelete:!0,helpUrl:s,ownerName:a.ownerLogin,dialogState:n,setDialogState:r,refName:l.name,placeholderMessage:`Delete ${o}${t?"":" directory"}`,webCommitInfo:e,returnFocusRef:i})})]})}try{nF.displayName||(nF.displayName="WebCommitDialog")}catch{}try{nA.displayName||(nA.displayName="DeleteHeaderButtons")}catch{}let n$=(0,eq.Z)("localStorage");function nP({symbolsEnabled:e}){let{codeFoldingOption:t,codeWrappingOption:n,codeCenterOption:r,openSymbolsOption:i}=(0,g.OY)();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(nM,{option:t}),(0,u.jsx)(nM,{option:n}),(0,u.jsx)(nM,{option:r}),e&&(0,u.jsx)(nM,{option:i})]})}function nM({option:e}){let t=eA(),n=(0,v.useCallback)(()=>{(0,v.startTransition)(()=>e.setEnabled(!e.enabled)),n$.setItem(e.name,String(!e.enabled)),e.name===g.SM&&t(null,null,!e.enabled)},[e,t]);return(0,u.jsxs)(es.S.Item,{onSelect:n,children:[(0,u.jsx)(es.S.LeadingVisual,{children:e.enabled&&(0,u.jsx)(G.CheckIcon,{})}),e.label]},e.name)}try{nP.displayName||(nP.displayName="SettingsMenuItems")}catch{}try{nM.displayName||(nM.displayName="OptionsElement")}catch{}function nz({payload:e,showTree:t,treeToggleElement:n,validCodeNav:r,onFindFilesShortcut:i}){let{codeCenterOption:a}=(0,g.OY)();return(0,u.jsx)(P.Z,{className:"container",sx:{width:"100%"},children:(0,u.jsx)("div",{className:"px-3 pt-3 pb-0",id:"StickyHeader",children:(0,u.jsx)(P.Z,{sx:{display:"flex",gap:2,flexDirection:"column",width:"100%"},children:(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"start",justifyContent:"space-between",gap:2},children:[t?(0,u.jsx)(P.Z,{sx:{alignSelf:"center",display:"flex",pr:2,minWidth:0},children:(0,u.jsx)(np,{id:"repos-header-breadcrumb--wide",fileNameId:"file-name-id-wide",showCopyPathButton:!0})}):(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"start",minWidth:0},className:"react-code-view-header-wrap--narrow",children:[(0,u.jsx)(P.Z,{sx:{display:"block","@media screen and (min-width: 1360px)":{display:a.enabled?"none":"block"},mr:2},children:n}),(0,u.jsx)("div",{className:"react-code-view-header-mb--narrow mr-2",children:(0,u.jsx)(nu.S,{buttonClassName:"ref-selector-class",idEnding:"repos-header-ref-selector-wide"})}),(0,u.jsx)(P.Z,{sx:{alignSelf:"center",display:"flex",px:2,minWidth:0},className:"react-code-view-header-mb--narrow",children:(0,u.jsx)(np,{id:"repos-header-breadcrumb",fileNameId:"file-name-id",showCopyPathButton:!0})})]}),(0,u.jsx)("div",{className:"react-code-view-header-element--wide",children:(0,u.jsx)(nH,{payload:e,onFindFilesShortcut:i,narrow:!1,showTree:t,validCodeNav:r})}),(0,u.jsx)("div",{className:"react-code-view-header-element--narrow",children:(0,u.jsx)(nH,{payload:e,onFindFilesShortcut:i,narrow:!0,showTree:t,validCodeNav:r})})]})})})})}function nH({payload:e,onFindFilesShortcut:t,narrow:n,showTree:r,validCodeNav:i}){let a=(0,t6.i)(),{githubDevUrl:l}=(0,_.Ou)(),{openWithGitHubDevShortcut:o,openWithGitHubDevInNewWindowShortcut:s}=(0,I.bx)(),c=(0,v.useRef)(null),d=!r&&(0,u.jsxs)("div",{children:[(0,u.jsx)(nB.default,{searchBoxRef:c,useOverlay:!0,sx:{mr:1,ml:1}}),(0,u.jsx)(nO,{inputRef:c,onFindFilesShortcut:t})]});return(0,u.jsx)(P.Z,{sx:{minHeight:"32px",display:"flex",alignItems:"start"},children:(0,u.jsxs)("div",{className:"d-flex gap-2",children:[(0,Z.Kg)(e)&&(0,u.jsxs)(eS.d,{blob:e.blob,children:[!n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(nU,{}),d]}),(0,u.jsx)(nQ,{onCopy:a,narrow:n,validCodeNav:i})]}),(0,Z.g6)(e)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(t1.N,{as:"h2",text:"Directory actions"}),!n&&(0,u.jsxs)(u.Fragment,{children:[d,(0,u.jsx)(nZ.s,{})]}),(0,u.jsx)(nW,{narrow:n}),(0,u.jsx)(ed.Z,{className:"js-github-dev-shortcut d-none","data-hotkey":o.hotkey,href:l}),(0,u.jsx)(ed.Z,{className:"js-github-dev-new-tab-shortcut d-none","data-hotkey":s.hotkey,href:l,target:"_blank"})]}),(0,Z.XU)(e)&&(0,u.jsx)(nA,{webCommitInfo:e.webCommitInfo,isBlob:e.deleteInfo.isBlob})]})})}function nW({narrow:e}){let{refInfo:t,path:n}=(0,_.Br)(),r=(0,m.H)(),{sendRepoClickEvent:i}=(0,L.a)(),{addToast:a}=(0,t2.V6)(),{createPermalink:l}=(0,E.B)(),{copyFilePathShortcut:o,copyPermalinkShortcut:s}=(0,I.bx)(),{codeCenterOption:c}=(0,g.OY)(),d=(0,v.useRef)(null),[h,p,f]=(0,t8.a)("raw-copy-message-tooltip",d,{direction:"nw"});return(0,u.jsxs)(u.Fragment,{children:[o.hotkey&&(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:o.hotkey,onButtonClick:()=>{(0,t4.z)(n),a({type:"success",message:"Path copied!"})}}),s.hotkey&&(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:s.hotkey,onButtonClick:()=>{(0,t4.z)(l({absolute:!0})),a({type:"success",message:"Permalink copied!"})}}),(0,u.jsx)(t1.N,{as:"h2",text:"More options"}),f,(0,u.jsxs)(tD.P,{onOpenChange:e=>e&&i("MORE_OPTIONS_DROPDOWN"),anchorRef:d,children:[(0,u.jsx)(tD.P.Anchor,{children:(0,u.jsx)(U.h,{icon:G.KebabHorizontalIcon,"aria-label":"More options",size:"medium",sx:{color:"fg.muted"},title:"More options","data-testid":"tree-overflow-menu-anchor",onBlur:p})}),(0,u.jsx)(tD.P.Overlay,{width:"small",children:(0,u.jsxs)(es.S,{children:[e&&t.canEdit&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(es.S.LinkItem,{as:e8.r,onClick:()=>i("NEW_FILE_BUTTON"),to:(0,ep.Qi)({repo:r,path:n,commitish:t.name,action:"new"}),children:[(0,u.jsx)(es.S.LeadingVisual,{children:(0,u.jsx)(G.PlusIcon,{})}),"Create new file"]}),(0,u.jsxs)(es.S.LinkItem,{onClick:()=>i("UPLOAD_FILES_BUTTON"),href:(0,ep.Qi)({repo:r,path:n,commitish:t.name,action:"upload"}),children:[(0,u.jsx)(es.S.LeadingVisual,{children:(0,u.jsx)(G.UploadIcon,{})}),"Upload files"]}),(0,u.jsx)(es.S.Divider,{})]}),(0,u.jsx)(nG,{path:n,updateTooltipMessage:h}),t.canEdit&&(0,u.jsx)(es.S.Divider,{}),(0,u.jsx)(nD,{}),(0,u.jsx)(es.S.Divider,{}),(0,u.jsx)(es.S.Group,{title:"View options",children:(0,u.jsx)(nM,{option:c})})]})})]})]})}function nG({path:e,updateTooltipMessage:t}){let{copyFilePathShortcut:n}=(0,I.bx)(),{copyPermalinkShortcut:r}=(0,I.bx)(),{sendRepoClickEvent:i}=(0,L.a)(),{createPermalink:a}=(0,E.B)();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(es.S.Item,{onSelect:()=>{i("MORE_OPTIONS_DROPDOWN.COPY_PATH"),(0,t4.z)(e),t("Path copied!")},children:["Copy path",n.hotkey&&(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(nR,{shortcut:n})})]}),(0,u.jsxs)(es.S.Item,{onSelect:()=>{i("MORE_OPTIONS_DROPDOWN.COPY_PERMALINK"),(0,t4.z)(a({absolute:!0})),t("Permalink copied!")},children:["Copy permalink",r.hotkey&&(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(nR,{shortcut:r})})]})]})}function nU(){let e=nE();return e?(0,u.jsx)(nh.r,{as:e8.r,to:e,children:"View Runs"}):null}try{nz.displayName||(nz.displayName="CodeViewHeader")}catch{}try{nH.displayName||(nH.displayName="PageActions")}catch{}try{nW.displayName||(nW.displayName="TreeOverflowMenu")}catch{}try{nG.displayName||(nG.displayName="CopyPathsActionItems")}catch{}try{nU.displayName||(nU.displayName="ViewRunsButton")}catch{}function nV({fileReference:e}){return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(es.S.Item,{onClick:()=>(0,t0.o)(e),children:"Ask about this file"})})}try{nV.displayName||(nV.displayName="CopilotMenuItems")}catch{}function nK({viewable:e,onCopy:t,name:n,updateTooltipMessage:r,all:i}){let{sendRepoClickEvent:a}=(0,L.a)(),{rawBlobUrl:l}=(0,eS.G)(),{downloadRawContentShortcut:o}=(0,I.bx)(),s=(0,v.useCallback)(async()=>await nq(l,n),[n,l]);return(0,u.jsxs)(es.S.Group,{title:"Raw file content",children:[i&&(0,u.jsx)(nY,{viewable:e,onCopy:t,updateTooltipMessage:r}),i&&(0,u.jsx)(nX,{onClick:()=>a("BLOB_RAW_DROPDOWN.VIEW"),rawHref:l}),(0,u.jsxs)(es.S.LinkItem,{onClick:s,children:["Download",o.text&&(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(nR,{shortcut:o})})]})]})}async function nq(e,t){let n=await fetch(e,{method:"get"}),r=await n.blob(),i=document.createElement("a");i.setAttribute("download",t);let a=URL.createObjectURL(r);i.href=a,i.setAttribute("target","_blank"),i.click(),URL.revokeObjectURL(a)}function nY({viewable:e,onCopy:t,updateTooltipMessage:n}){let{copyRawContentShortcut:r}=(0,I.bx)();return e?(0,u.jsxs)(es.S.Item,{onClick:async()=>{let e=await t(),{ariaLabel:r}=(0,t9.b7)(e);n(r)},children:["Copy",r.text&&(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(nR,{shortcut:r})})]}):null}function nX({onClick:e,rawHref:t}){let{viewRawContentShortcut:n}=(0,I.bx)();return(0,u.jsxs)(es.S.LinkItem,{onClick:e,href:t,children:["View",n.text&&(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(nR,{shortcut:n})})]})}try{nK.displayName||(nK.displayName="RawMenuActionItems")}catch{}try{nY.displayName||(nY.displayName="CopyActionItem")}catch{}try{nX.displayName||(nX.displayName="RawActionItem")}catch{}function nQ({onCopy:e,validCodeNav:t,narrow:n}){let i=(0,eS.G)(),a=i.symbolsEnabled,{action:l,path:o,refInfo:{canEdit:s,currentOid:c,name:d,refType:h}}=(0,_.Br)(),{githubDevUrl:f}=(0,_.Ou)(),{sendRepoClickEvent:x}=(0,L.a)(),[y,g]=(0,v.useState)(!1),b=nE(),{search:j}=(0,eX.TH)(),w=new URLSearchParams(j),{setFindInFileOpen:N}=ez(),C=(0,e$.nj)(),k=!(i.richText&&"1"!==w.get("plain")||i.renderImageOrRaw||i.renderedFileInfo&&!w.get("short_path")||i.issueTemplate?.structured&&i.issueTemplate.valid),{headerInfo:{deleteTooltip:S,onBranch:R,siteNavLoginPath:T,lineInfo:{truncatedLoc:Z}},viewable:B}=i,D=(0,p.x)(),{getUrl:O}=(0,E.B)(),F=eH(),A=(0,v.useRef)("");(0,v.useEffect)(()=>{A.current=O({action:"blame"})},[O]);let{goToLineShortcut:$,findInFileShortcut:P,alternativeGoToLineShortcut:M}=(0,I.bx)(),z=(0,v.useRef)(null),[H,V,K]=(0,t8.a)("raw-copy-message-tooltip",z,{direction:"nw"}),q=(0,n_.y)("copilot_conversational_ux"),Y=(0,m.H)(),X=O(),[Q]=(0,eY.D)(()=>window.location.origin+X,X),J=(0,v.useMemo)(()=>({type:"file",url:Q,path:o,repoID:Y.id,repoOwner:Y.ownerLogin,repoName:Y.name,ref:n1(d,h??"branch"),commitOID:c}),[Q,o,Y.id,Y.ownerLogin,Y.name,d,h,c]);return(0,u.jsxs)(u.Fragment,{children:[k&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:$.hotkey,onButtonClick:()=>g(!0)}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:M.hotkey,onButtonClick:()=>g(!0)})]}),(0,u.jsx)(nJ,{blameUrl:A.current,viewable:B,hidden:!0}),K,(0,u.jsxs)(tD.P,{onOpenChange:e=>e&&x("MORE_OPTIONS_DROPDOWN",{edit_enabled:s,github_dev_enabled:!!f}),anchorRef:z,children:[(0,u.jsx)(tD.P.Anchor,{children:(0,u.jsx)(U.h,{icon:G.KebabHorizontalIcon,"aria-label":"More file actions",className:"js-blob-dropdown-click",size:"medium",sx:{color:"fg.muted"},title:"More file actions",variant:"default","data-testid":`more-file-actions-button-nav-menu-${n?"narrow":"wide"}`,onBlur:V})}),(0,u.jsx)(tD.P.Overlay,{width:"small",sx:{maxHeight:"55vh",overflowY:"auto"},children:(0,u.jsxs)(es.S,{children:[n&&null!==b&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(es.S.LinkItem,{href:b,children:"View Runs"}),(0,u.jsx)(es.S.Divider,{})]}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(nK,{viewable:B,onCopy:e,name:i.displayName,updateTooltipMessage:H}),(0,u.jsx)(es.S.Divider,{})]}),(0,u.jsxs)(es.S.Group,{children:[k&&(0,u.jsxs)(es.S.Item,{onSelect:()=>{x("MORE_OPTIONS_DROPDOWN.GO_TO_LINE"),g(!0)},"aria-keyshortcuts":$.hotkey,children:["Jump to line",(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(W.I,{children:(0,u.jsx)("kbd",{children:$.text})})})]}),F===r.Code&&null!==i.rawLines&&t&&!C&&(0,u.jsxs)(es.S.Item,{onSelect:()=>{x("BLOB_FIND_IN_FILE_MENU.OPEN"),N(!0)},"aria-keyshortcuts":P.ariaKeyShortcuts,children:["Find in file",(0,u.jsx)(es.S.TrailingVisual,{"aria-hidden":"true",children:(0,u.jsx)(nR,{shortcut:P})})]})]}),(k||F===r.Code&&null!==i.rawLines&&t)&&(0,u.jsx)(es.S.Divider,{}),(0,u.jsx)(nG,{path:o,updateTooltipMessage:H}),(0,u.jsx)(es.S.Divider,{}),q&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(es.S.Group,{title:"Copilot",children:(0,u.jsx)(nV,{fileReference:J})}),(0,u.jsx)(es.S.Divider,{})]}),(0,u.jsx)(es.S.Group,{title:"View options",children:(0,u.jsx)(nP,{symbolsEnabled:a})}),(s&&R||!B&&R)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(es.S.Divider,{}),(0,u.jsx)(n0,{deleteTooltip:S,loggedIn:!!D,siteNavLoginPath:T})]})]})})]}),y&&(0,u.jsx)(nT,{onBlamePage:"blame"===l,onDismiss:()=>{g(!1),setTimeout(()=>{let e=document.getElementById(eE.KG);e?.focus()},0)},maxLineNumber:parseInt(Z,10)??void 0})]})}function nJ({blameUrl:e,viewable:t,hidden:n}){let{hash:r}=(0,eX.TH)(),i=(0,nI.gs)(e+r),{viewBlameShortcut:a}=(0,I.bx)();return t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(nh.r,{"data-hotkey":a.hotkey,sx:{borderTopLeftRadius:0,borderBottomLeftRadius:0,...n?{display:"none"}:void 0},onClick:i,children:"Blame"}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:a.hotkey,onButtonClick:i,onlyAddHotkeyScopeButton:!0})]}):null}function n0({deleteTooltip:e,loggedIn:t,siteNavLoginPath:n}){let{getUrl:r}=(0,E.B)();return(0,u.jsx)(es.S.LinkItem,{as:e8.r,sx:{padding:2,color:"danger.fg",":hover":{color:"danger.fg"}},"aria-label":e,to:t?r({action:"delete"}):n,children:"Delete file"})}let n1=(e,t)=>"branch"===t?`refs/heads/${e}`:"tag"===t?`refs/tags/${e}`:e;try{nQ.displayName||(nQ.displayName="NavigationMenu")}catch{}try{nJ.displayName||(nJ.displayName="BlameButton")}catch{}try{n0.displayName||(n0.displayName="DeleteActionItem")}catch{}function n2({toc:e,openPanel:t,setOpenPanel:n,isDirectoryReadme:r}){let i=v.useRef(null);return e&&e.length>=2?(0,u.jsx)(U.h,{ref:i,sx:{color:"var(--fgColor-muted, var(--color-fg-muted))",mr:r?0:2},icon:G.ListUnorderedIcon,variant:"invisible","aria-label":"Outline","aria-pressed":"toc"===t,onClick:()=>{n&&n("toc"===t?void 0:"toc",i.current)},size:"small"}):null}try{n2.displayName||(n2.displayName="TableOfContents")}catch{}function n3({currentStickyLines:e,colorizedLines:t}){let n=Array.from(e.values());return(0,u.jsxs)(P.Z,{sx:{overflow:"hidden",display:"flex"},children:[(0,u.jsx)(P.Z,{className:"react-line-numbers",sx:{marginLeft:"2px"},children:n.map(e=>(0,u.jsx)(ti._7,{codeLineData:e},`sticky-header-line-number-${e.lineNumber}`))}),(0,u.jsx)("div",{className:"react-code-lines",children:n.map(e=>t&&t[e.lineNumber-1]?(0,u.jsx)(e6.sF,{className:"react-code-text react-code-line-contents-no-virtualization react-file-line html-div",style:{paddingLeft:"18px"},html:t[e.lineNumber-1],onClick:()=>(0,eT.v)({line:e.lineNumber})},`sticky-header-line-${e.lineNumber}`):(0,u.jsx)(tr.E,{codeLineData:e,stylingDirectivesLine:e.stylingDirectivesLine,codeLineToSectionMap:void 0,copilotAccessAllowed:!1,onClick:()=>(0,eT.v)({line:e.lineNumber})},`sticky-header-line-${e.lineNumber}`))})]})}try{n3.displayName||(n3.displayName="StickyLinesHeader")}catch{}function n5({openPanel:e,setOpenPanel:t,showTree:n,validCodeNav:i,treeToggleElement:a,searchTerm:l,setSearchTerm:o,currentStickyLines:s,focusedSearchResult:c,setFocusedSearchResult:d,searchResults:h,searchingText:p,stickyHeaderRef:f,copilotInfo:x,colorizedLines:y}){let g=(0,eS.G)(),b=g.symbolsEnabled,j=(0,eO.X)(f),{copilotAccessAllowed:w,refInfo:N,path:C}=(0,_.Br)(),k=eH(),{sendRepoClickEvent:S}=(0,L.a)(),R=(0,eD.nx)(),{copyFilePathShortcut:T}=(0,I.bx)(),{copyPermalinkShortcut:Z}=(0,I.bx)(),B=(0,m.H)(),{githubDevUrl:D}=(0,_.Ou)(),{headerInfo:{toc:O,onBranch:F,ghDesktopPath:A},viewable:$}=g,M=nk(D,F,A),z=(0,ek.Q)(),H=(0,t6.i)(),{createPermalink:W}=(0,E.B)(),{addToast:V}=(0,t2.V6)(),{findInFileOpen:K,setFindInFileOpen:q}=ez(),Y=(0,v.useRef)(null),[X,Q,J]=(0,t8.a)("raw-actions-message-tooltip",Y,{direction:"nw"}),ee=eA(),{getUrl:et}=(0,E.B)(),en=et(),[er]=(0,eY.D)(()=>window.location.origin+en,en),ei=(0,v.useMemo)(()=>({type:"file",url:er,path:C,repoID:B.id,repoOwner:B.ownerLogin,repoName:B.name,ref:n1(N.name,N.refType??"branch"),commitOID:N.currentOid}),[er,C,B.id,B.ownerLogin,B.name,N.name,N.refType,N.currentOid]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(P.Z,{ref:eD.ik,sx:{display:"flex",flexDirection:"column",width:"100%",position:"absolute"},children:[(0,u.jsx)(P.Z,{className:"react-blob-sticky-header",children:(0,u.jsx)(nf,{isStickied:j,showTree:n,treeToggleElement:a})}),(0,u.jsxs)(P.Z,{sx:{pl:2,py:2,display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",backgroundColor:"canvas.subtle",border:"1px solid var(--borderColor-default, var(--color-border-default))",borderRadius:j?"0px":"6px 6px 0px 0px"},children:[(0,u.jsx)(t1.N,{as:"h2",text:"File metadata and controls"}),(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",gap:2,minWidth:0},children:[(0,u.jsx)(nb,{}),(0,u.jsx)(nj,{className:"react-code-size-details-in-header"}),(0,u.jsx)(ej.y,{copilotInfo:x,className:"react-code-size-details-in-header",view:z?"blame":"preview"})]}),(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",gap:2,mr:2},children:[T.hotkey&&(0,u.jsx)(n9,{hotkey:T.hotkey,onActivate:()=>{(0,t4.z)(C),V({type:"success",message:"Path copied!"})}}),Z.hotkey&&(0,u.jsx)(n9,{hotkey:Z.hotkey,onActivate:()=>{(0,t4.z)(W({absolute:!0})),V({type:"success",message:"Permalink copied!"})}}),(0,u.jsx)(t0.Z,{copilotAccessAllowed:w,messageReference:ei,hideDropdown:!0,id:"blob-view-header-copilot-icon"}),(0,u.jsxs)(P.Z,{className:"react-blob-header-edit-and-raw-actions",sx:{gap:2},children:[(0,u.jsx)(n8,{onCopy:H,fileName:g.displayName}),(0,u.jsx)(n4,{})]}),k===r.Code&&!z&&i&&b&&(0,u.jsx)(n6,{isCodeNavOpen:"codeNav"===e,setCodeNavOpen:e=>{e&&S("BLOB_SYMBOLS_MENU.OPEN"),localStorage.setItem("codeNavOpen",e?"codeNav":""),ee(null,e,null),t(e?"codeNav":void 0)},size:"small",searchingText:p.selectedText}),!z&&(0,u.jsx)(n2,{toc:O,openPanel:e,setOpenPanel:t}),(0,u.jsxs)(P.Z,{className:"react-blob-header-edit-and-raw-actions-combined",children:[J,(0,u.jsxs)(tD.P,{anchorRef:Y,children:[(0,u.jsx)(tD.P.Anchor,{children:(0,u.jsx)(U.h,{icon:G.KebabHorizontalIcon,"aria-label":"Edit and raw actions",className:"js-blob-dropdown-click",size:"small",sx:{color:"fg.muted"},title:"More file actions",variant:"invisible","data-testid":"more-file-actions-button",onBlur:Q})}),(0,u.jsx)(tD.P.Overlay,{className:"react-blob-header-edit-and-raw-actions-combined",width:"small",sx:{maxHeight:"55vh",overflowY:"auto"},children:(0,u.jsxs)(es.S,{children:[(N.canEdit&&$||M)&&(0,u.jsxs)("div",{className:"react-navigation-menu-edit-and-raw-actions",children:[(0,u.jsx)(nS,{editAllowed:N.canEdit&&$,hasOpenWithItem:M}),(0,u.jsx)(es.S.Divider,{})]}),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(nK,{viewable:$,onCopy:H,name:g.displayName,updateTooltipMessage:X,all:!0})})]})})]})]})]})]}),z&&(0,u.jsxs)(P.Z,{sx:{px:"12px",py:2,height:"44px",display:"flex",flexShrink:0,alignItems:"center",border:"1px solid",borderColor:"border.default",borderTop:0,justifyContent:"space-between",backgroundColor:"canvas.default"},children:[(0,u.jsx)(nx,{}),(0,u.jsx)(no,{})]})]}),K&&(0,u.jsx)(nn,{stickied:j,searchTerm:l,focusedSearchResult:c,setFocusedSearchResult:d,setSearchTerm:o,searchResults:h,onClose:()=>{q(!1),"codeNav"===e&&o(p.selectedText)}}),(0,u.jsx)("div",{children:!z&&s.size>0&&(0,u.jsx)(P.Z,{sx:{zIndex:1,background:"var(--bgColor-default, var(--color-canvas-default))",top:R,position:"absolute",width:"100%",border:"1px solid var(--borderColor-default, var(--color-border-default))",borderBottom:"none",borderTop:"none",boxShadow:"0 1px 0 var(--borderColor-default, var(--color-border-default))",tableLayout:"fixed"},children:(0,u.jsx)(n3,{currentStickyLines:s,colorizedLines:y})})})]})}function n4(){let e=(0,eS.G)(),{getUrl:t}=(0,E.B)(),{refInfo:{canEdit:n}}=(0,_.Br)(),{sendRepoClickEvent:r}=(0,L.a)(),{githubDevUrl:i}=(0,_.Ou)(),a=(0,eR.s)(),{editFileShortcut:l,openWithGitHubDevShortcut:o,openWithGitHubDevInNewWindowShortcut:s}=(0,I.bx)(),{headerInfo:{editTooltip:c,ghDesktopPath:d,onBranch:h}}=e,m=nk(i,h,d);return n||m?(0,u.jsxs)(u.Fragment,{children:[i&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ed.Z,{className:"js-github-dev-shortcut d-none","data-hotkey":o.hotkey,href:i}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:o.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:()=>{a(i+window.location.pathname.substring(1))}}),(0,u.jsx)(ed.Z,{className:"js-github-dev-new-tab-shortcut d-none","data-hotkey":s.hotkey,href:i,target:"_blank"}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:s.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:()=>{window.open(i,"_blank")}})]}),(0,u.jsxs)(t3.Z,{children:[(0,u.jsx)(te.Z,{direction:"nw",text:c,children:n?(0,u.jsx)(U.h,{as:e8.r,"aria-label":"Edit file","data-hotkey":l.hotkey,icon:G.PencilIcon,to:t({action:"edit"}),size:"small",sx:{...tJ.A,borderTopRightRadius:0,borderBottomRightRadius:0,borderRightWidth:0},"data-testid":"edit-button"}):(0,u.jsx)(t7,{icon:G.PencilIcon,sx:{borderTopRightRadius:0,borderBottomRightRadius:0,borderRightWidth:0},"aria-label":"Edit file",disabled:!0})}),(0,u.jsxs)(tD.P,{onOpenChange:e=>e&&r("BLOB_EDIT_DROPDOWN"),children:[(0,u.jsx)(tD.P.Anchor,{children:(0,u.jsx)(U.h,{icon:G.TriangleDownIcon,size:"small","aria-label":"More edit options","data-testid":"more-edit-button"})}),(0,u.jsx)(tD.P.Overlay,{align:"end",children:(0,u.jsx)(es.S,{children:(0,u.jsx)(nS,{editAllowed:n,hasOpenWithItem:m})})})]})]}),n&&(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:"e,Shift+E",onlyAddHotkeyScopeButton:!0,onButtonClick:()=>{a(t({action:"edit"}))}})]}):null}function n8({onCopy:e,fileName:t}){let{viewRawContentShortcut:n,copyRawContentShortcut:r,downloadRawContentShortcut:i}=(0,I.bx)(),{renderImageOrRaw:a,renderedFileInfo:l,viewable:o,image:s,rawBlobUrl:c,headerInfo:{isGitLfs:d}}=(0,eS.G)(),h=(0,eR.s)(),{addToast:m}=(0,t2.V6)(),p=(0,v.useRef)(null),[f,x,y]=(0,t8.a)("raw-copy-message-tooltip",p),g=async()=>{await nq(c,t)},b=async()=>{let t=await e(),{ariaLabel:n}=(0,t9.b7)(t);f(n)},j=new URL(c,D.ssrSafeLocation.origin);j.searchParams.set("download","");let w={"aria-label":"Download raw content",icon:G.DownloadIcon,size:"small",onClick:async()=>{d||await nq(c,t)},"data-testid":"download-raw-button","data-hotkey":i.hotkey,sx:{borderTopLeftRadius:0,borderBottomLeftRadius:0}};return!d&&(l&&!o||s)?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(te.Z,{"aria-label":"Download raw file",children:(0,u.jsx)(U.h,{"aria-label":"Download raw content",icon:G.DownloadIcon,size:"small",onClick:g,"data-testid":"download-raw-button","data-hotkey":i.hotkey})}),(0,u.jsx)(eN,{buttonTestLabel:"download-raw-button-shortcut",buttonFocusId:eE.KG,buttonHotkey:i.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:g})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(t3.Z,{children:[(0,u.jsx)(t5.Q,{href:c,download:a?"true":void 0,size:"small",sx:{linkButtonSx:tJ.A,px:2},"data-testid":"raw-button","data-hotkey":n.hotkey,children:"Raw"}),!d&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(U.h,{ref:p,"aria-label":"Copy raw content",icon:G.CopyIcon,size:"small",onFocus:()=>f("Copy raw file"),onMouseEnter:()=>f("Copy raw file"),onMouseLeave:x,onClick:b,"data-testid":"copy-raw-button","data-hotkey":r.hotkey,onBlur:x}),y]}),(0,u.jsx)(te.Z,{"aria-label":"Download raw file",children:d?(0,u.jsx)(U.h,{as:"a","data-turbo":"false",href:j.toString(),...w}):(0,u.jsx)(U.h,{...w})})]}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:n.hotkey,buttonTestLabel:"raw-button-shortcut",onlyAddHotkeyScopeButton:!0,onButtonClick:()=>h(c)}),!d&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eN,{buttonTestLabel:"copy-raw-button-shortcut",buttonFocusId:eE.KG,buttonHotkey:r.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:async()=>{let t=await e(),{ariaLabel:n,content:r}=(0,t9.b7)(t);m({message:n,icon:r})}}),(0,u.jsx)(eN,{buttonTestLabel:"download-raw-button-shortcut",buttonFocusId:eE.KG,buttonHotkey:i.hotkey,onlyAddHotkeyScopeButton:!0,onButtonClick:async()=>{await nq(c,t)}})]})]})}function n6({isCodeNavOpen:e,setCodeNavOpen:t,size:n,searchingText:r}){let{toggleSymbolsShortcut:i}=(0,I.bx)(),a=!(0,g.OY)().openSymbolsOption.enabled&&!e;return(0,u.jsx)(te.Z,{direction:"nw",text:e?"Close symbols panel":"Open symbols panel",children:(0,u.jsx)(U.h,{"aria-label":"Symbols","aria-pressed":e,"aria-expanded":e,"aria-controls":"symbols-pane",icon:G.CodeSquareIcon,className:a&&r?"react-button-with-indicator":"","data-hotkey":i.hotkey,onClick:()=>{(0,e$.NC)(!0),t(!e)},variant:"invisible",sx:{color:"fg.muted",position:"relative"},"data-testid":"symbols-button",id:"symbols-button",size:n})})}function n9({hotkey:e,onActivate:t}){return(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:e,onButtonClick:t})}try{n5.displayName||(n5.displayName="BlobViewHeader")}catch{}try{n4.displayName||(n4.displayName="EditMenu")}catch{}try{n8.displayName||(n8.displayName="RawGroup")}catch{}try{n6.displayName||(n6.displayName="SymbolsButton")}catch{}try{n9.displayName||(n9.displayName="KeyboardShortcut")}catch{}var n7=n(54042),re=n(51927),rt=n(66308),rn=n(74121);let rr={definitions:void 0,localReferences:void 0,crossReferences:void 0,error:!1};var ri=n(81181);function ra({reference:e,isHighlighted:t,href:n,onClick:r,role:i,ariaLevel:a,symbol:l,index:o,focusElement:s}){let[c,d]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(s){let e=document.getElementById(`find-in-file-item-${o}`);e&&e.focus()}},[s,o]);let h=(0,tj.RC)(e.highlightedText,e.stylingDirectives,e.bodyText);return(0,u.jsx)(ed.Z,{as:e8.r,className:"blob-code blob-code-inner",to:n,role:i,sx:{display:"block",p:0,fontWeight:400,fontSize:"12px",":hover:not([disabled])":{bg:"canvas.default"},":hover":{textDecoration:"none"},'[data-component="text"]':{gridArea:"auto"},gridTemplateAreas:"text",whiteSpace:"break-spaces"},onClick:e=>{e.ctrlKey||e.metaKey||r?.()},onSelect:r,id:`find-in-file-item-${o}`,"aria-current":t?"location":void 0,"aria-level":a,onKeyDown:e=>{"ArrowDown"===e.key?(rl("nextElementSibling"),e.preventDefault()):"ArrowUp"===e.key&&(rl("previousElementSibling"),e.preventDefault())},children:(0,u.jsx)(P.Z,{sx:{p:1,py:"5px",...t?{background:"var(--bgColor-attention-muted, var(--color-attention-subtle))",boxShadow:"inset 2px 0 0 var(--bgColor-attention-emphasis, var(--color-attention-fg))"}:{}},children:(0,u.jsxs)("div",{className:"d-flex",children:[(0,u.jsx)(P.Z,{className:"text-small blob-num color-fg-muted",sx:{width:"auto",minWidth:"auto"},children:e.lineNumber}),(0,u.jsxs)(P.Z,{sx:{overflow:"hidden",whiteSpace:"pre",position:"relative"},children:[null!==c&&(0,u.jsxs)("div",{id:`offset-${e.href(!1)}`,style:{marginLeft:-c},children:[l.length>0&&(0,u.jsx)(ri.R,{symbols:[e],lineNumber:e.lineNumber,sx:{overflow:"initial"},isNotUsingWhitespace:!0}),(0,u.jsx)(e6.WZ,{sx:{position:"relative",width:"100%",overflow:"hidden"},html:h,"aria-current":t?"location":void 0})]}),(0,u.jsx)("span",{ref:e=>d(e?.offsetWidth??null),style:{visibility:"hidden",position:"absolute",whiteSpace:"pre"},children:function(e,t){let n=34-e.length,r=t.bodyText.slice(0,t.ident.start.column);if(n<=0)return r;let i=t.bodyText.slice(t.ident.start.column+e.length).trimEnd();n=Math.max(n/2,n-i.length);let a=r.split(" "),l=[];for(let e=a.length-1;e>=0;e--){let t=a[e];if(l.unshift(t),l.join(" ").length<=n)a.pop();else break}let o=a.join(" "),s=(r.slice(o.length).match(/^[ \t]*/)||[])[0]??"";return`${a.join(" ")}${s}`}(l,e)})]})]})})})}function rl(e){let{activeElement:t}=document,n=t?.[e];if(n){if("treeitem"!==n.role&&"nextElementSibling"===e){let e=n.querySelector('[role="treeitem"]');e?.focus()}else n.focus()}}try{ra.displayName||(ra.displayName="CodeNavCell")}catch{}function ro({results:e,repo:t,filePath:n,highlightedIndex:r,isDefinition:i,onClick:a,offset:l,initiallyExpanded:o,enableExpandCollapse:s,symbol:c,setFocusOnFile:d}){let h=!!(0,ek.Q)(),[p,f]=(0,v.useState)(o),x=(0,m.H)(),{path:y}=(0,_.Br)(),g=v.useRef(null),[b,j]=(0,v.useState)(!1),w=(0,e$.nJ)(),N=e.slice(0,10),C=e.length>10?e.slice(10):[],{sendRepoClickEvent:k}=(0,L.a)(),S=x.ownerLogin===t.ownerLogin&&x.name===t.name,I=(0,v.useCallback)(e=>{"Enter"===e.key||" "===e.key?(f(!p),e.preventDefault()):"ArrowLeft"===e.key?f(!1):"ArrowRight"===e.key?(f(!0),p&&g.current?.focus()):"ArrowDown"===e.key?(rl("nextElementSibling"),e.preventDefault()):"ArrowUp"===e.key&&(rl("previousElementSibling"),e.preventDefault())},[p]);(0,v.useEffect)(()=>{r&&r>=10+l&&j(!0)},[r,l]),(0,v.useEffect)(()=>{d&&w&&g.current?.focus()},[d,w]),(0,v.useEffect)(()=>{w||document.getElementById(eE.KG)?.focus()},[w]);let R=`${n}-${i?"definition":"reference"}-group`;return(0,u.jsxs)(P.Z,{children:[(0,u.jsxs)(P.Z,{sx:{fontSize:0,px:3,py:2,display:"flex",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border.muted",cursor:s?"pointer":"auto"},onClick:s?()=>f(!p):void 0,onKeyDown:I,ref:g,children:[(0,u.jsxs)(P.Z,{sx:{display:"flex"},children:[i&&x.id!==t.id&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(e4.O,{square:!0,src:t.ownerAvatar,sx:{mr:2,backgroundColor:"#FFFFFF"},size:16}),(0,u.jsx)(P.Z,{sx:{fontWeight:"600",mr:1},children:t.name})]}),(0,u.jsxs)(P.Z,{as:"button","aria-expanded":p,"aria-controls":R,sx:{fontWeight:"400",color:"fg.muted",display:"flex",flexDirection:"row",backgroundColor:"canvas.default",border:"none",padding:0},children:[s&&(0,u.jsx)(K.Z,{"aria-hidden":"true",icon:p?G.ChevronDownIcon:G.ChevronRightIcon}),(0,u.jsx)(P.Z,{sx:{display:"table",width:"100%",tableLayout:"fixed"},children:(0,u.jsxs)(ee.Z,{"aria-label":`${i?"Definitions":"References"} in ${n!==y?n:"this file"}`,title:n,sx:{direction:"rtl",maxWidth:"100%",pl:2,display:"table-cell",textAlign:"left"},children:["\u200E",S&&n===y?"In this file":n,"\u200E"]})})]})]}),e&&!p&&(0,u.jsx)(nl.Z,{sx:{ml:2},children:e.length})]}),p&&(0,u.jsxs)(P.Z,{"aria-label":`Results in ${n!==y?n:"this file"}`,id:R,sx:{overflowX:"hidden"},role:"group",className:"code-nav-file-information",children:[N.map((e,t)=>(0,u.jsx)(ra,{reference:e,isHighlighted:r===t+l,href:e.href(h),onClick:()=>{a&&a(t+l),k("BLOB_SYMBOLS_MENU.SYMBOL_DEFINITION_CLICK")},symbol:c,index:t+l},`codeNavigation${t+l}`)),b&&C.map((e,t)=>(0,u.jsx)(ra,{reference:e,isHighlighted:r===t+l+10,href:e.href(h),onClick:()=>{a&&a(t+l+10),k("BLOB_SYMBOLS_MENU.SYMBOL_DEFINITION_CLICK")},symbol:c,index:t+l+10,focusElement:0===t},`codeNavigation${t+l+10}`)),C.length>0&&(0,u.jsx)(P.Z,{sx:{px:3,pt:1,pb:2,fontSize:0,color:"fg.muted",borderColor:"border.muted"},children:(0,u.jsx)(nh.r,{leadingVisual:b?G.FoldIcon:G.UnfoldIcon,onClick:()=>j(!b),sx:{color:"fg.default"},variant:"invisible",size:"small","aria-selected":!1,children:b?"Show less":"Show more"})})]})]},n)}try{ro.displayName||(ro.displayName="CodeNavFileInformation")}catch{}function rs({definitions:e,references:t,highlightedIndex:n,initiallyExpanded:r,enableExpandCollapse:i,onClick:a,symbol:l,setFocusOnFile:o}){let s=(0,v.useMemo)(()=>{let n={};if(e)for(let t of e){let e=t.pathKey();n[e]||(n[e]=[]),n[e].push(t)}else if(t)for(let e of t){let t=e.pathKey();n[t]||(n[t]=[]),n[t].push(e)}return n},[e,t]),c=0;return(0,u.jsx)(u.Fragment,{children:Object.keys(s).map((t,d)=>{let h=s[t],m=(0,u.jsx)(ro,{repo:h[0].repo,filePath:h[0].path,results:h,highlightedIndex:n,isDefinition:void 0!==e&&e.length>0,onClick:a,offset:c,initiallyExpanded:r,enableExpandCollapse:i,symbol:l,setFocusOnFile:0===d&&o},t);return c+=h.length,m})})}try{rs.displayName||(rs.displayName="CodeNavInfoPanelData")}catch{}let rc=(0,v.lazy)(()=>n.e("app_assets_modules_react-code-view_components_blob_BlobContent_CodeNav_ScrollMarks_tsx").then(n.bind(n,9130)));function rd({codeNavInfo:e,selectedText:t,lineNumber:n,offset:r,onClose:i,onBackToSymbol:a,onSymbolSelect:l,isLoading:o,setSearchResults:s,setFocusedSearchResult:c}){let{findNextShortcut:d,findPrevShortcut:h}=(0,I.bx)(),p=!!(0,ek.Q)(),{definitions:f,localReferences:x,crossReferences:y,error:g}=function(e,t,n,r){let[i,a]=(0,v.useState)(rr);return(0,v.useEffect)(()=>{(async()=>{if(n<0||r<0)return;let{definitions:i,localReferences:l,crossReferences:o,setLoading:s}=e.getDefinitionsAndReferences(t,n,r);a(rr);try{let e=await i;a({definitions:e,localReferences:void 0,crossReferences:void 0,error:!1}),s(!1);let[t,n]=await Promise.all([l,o]);a({definitions:e,localReferences:t,crossReferences:n,error:!1})}catch(e){a({...rr,error:!0})}finally{s(!1)}})()},[e,t,n,r]),i}(e,t,n,r),{copilotAccessAllowed:b}=(0,_.Br)(),[j,w]=(0,v.useState)(-1),[N,C]=(0,v.useState)(!1),k=(0,m.H)(),S=(0,v.useMemo)(()=>f?.definitions||[],[f?.definitions]),R=(0,v.useMemo)(()=>x?.references||[],[x]),L=(0,v.useMemo)(()=>y?.references||[],[y?.references]),E=S.length,T=R.length+L.length,Z=(0,eR.s)(),B=S.length>0?S[0]:void 0,D=L.map(e=>e.path).filter((e,t,n)=>n.indexOf(e)===t),O=N?T:R.length,F=(0,v.useRef)(null),{language:A,languageID:$}=(0,eS.G)(),M=(0,v.useMemo)(()=>({type:"symbol",kind:"codeNavSymbol",name:t,languageID:$,languageName:A,codeNavDefinitions:S.map(e=>({ident:e.ident,extent:e.extent,kind:e.kind.fullName,fullyQualifiedName:e.fullyQualifiedName,ref:rm(e.refInfo),commitOID:e.refInfo.currentOid,repoID:e.repo.id,repoName:e.repo.name,repoOwner:e.repo.ownerLogin,path:e.path})),codeNavReferences:[...R.map(e=>({ident:e.ident,path:e.path,ref:rm(e.refInfo),commitOID:e.refInfo.currentOid,repoID:e.repo.id,repoName:e.repo.name,repoOwner:e.repo.ownerLogin})),...L.map(e=>({ident:e.ident,path:e.path,ref:rm(e.refInfo),commitOID:e.refInfo.currentOid,repoID:e.repo.id,repoName:e.repo.name,repoOwner:e.repo.ownerLogin}))]}),[L,S,A,$,R,t]);(0,v.useEffect)(()=>{B&&B.repo.name===e.repo.name&&B.path===e.path?s([B,...R]):s(R),c(void 0),window.dispatchEvent(new re.aF(M))},[e.path,e.repo.name,B,R,t,s,c,M]),(0,Q.Sl)(e=>{e||F.current?.focus()}),(0,v.useEffect)(()=>{w(-1)},[t]),(0,v.useEffect)(()=>{C(D.length>0&&D.length<=5)},[D.length]);let z=({index:e,direction:t,navigate:n})=>{if(void 0!==e){let t=e>=E?R[e-E]:S[e];w(e),n&&Z(t.href(p)),(0,eT.v)({line:t.lineNumber,column:t.ident.start.column})}if(void 0!==t){let e=Math.max(E,j+t),r=R[e-E];e0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ru,{headerText:S.length>1?"Definitions":"Definition",searchType:f?.backend==="precise"?"Precise":"Search"}),(0,u.jsx)("div",{children:S&&(0,u.jsx)(rs,{definitions:S,onClick:e=>{z({index:e})},highlightedIndex:j,initiallyExpanded:!0,enableExpandCollapse:S.length>1,symbol:t,setFocusOnFile:!0},"definitions")})]}):null,!o&&(R.length>0||L.length>0)&&(0,u.jsx)(ru,{headerText:`${O} ${O>1?"References":"Reference"}`,searchType:"Search",sx:{justifyContent:"space-between"},children:(0,u.jsxs)(P.Z,{sx:{display:"float",float:"right",mr:"-6px"},children:[(0,u.jsx)(U.h,{"aria-label":"Previous reference","data-hotkey":h.hotkey,onClick:()=>z({direction:-1,navigate:!0}),sx:{mr:2,cursor:"pointer",color:"fg.muted"},disabled:j<=S.length,icon:G.ChevronUpIcon,variant:"invisible",size:"small"}),(0,u.jsx)(U.h,{"aria-label":"Next reference","data-hotkey":d.hotkey,onClick:()=>z({direction:1,navigate:!0}),sx:{cursor:"pointer",color:"fg.muted"},disabled:j>=R.length+S.length-1,icon:G.ChevronDownIcon,variant:"invisible",size:"small"}),(0,u.jsx)("button",{hidden:!0,"data-hotkey":d.hotkey,onClick:()=>z({direction:1,navigate:!0}),"data-testid":"find-next-button"}),(0,u.jsx)("button",{hidden:!0,"data-hotkey":h.hotkey,onClick:()=>z({direction:-1,navigate:!0}),"data-testid":"find-prev-button"})]})}),g&&(0,u.jsx)(P.Z,{sx:{p:3,fontWeight:"400",color:"fg.muted"},children:"No references found"}),!o&&R.length>0&&(0,u.jsx)(rs,{initiallyExpanded:!0,enableExpandCollapse:!0,references:R,highlightedIndex:j-E,onClick:e=>{z({index:E+e})},symbol:t,setFocusOnFile:!(S&&S.length>0)},"referencesInfoBox"),!o&&N&&(0,u.jsx)(rs,{initiallyExpanded:!1,enableExpandCollapse:!0,references:L,symbol:t},"crossReferencesInfoBox"),0===R.length&&0===S.length&&!g&&!o&&(0,u.jsx)(P.Z,{sx:{p:3,fontWeight:"400",color:"fg.muted"},children:"No definitions or references found"}),(0,u.jsxs)(P.Z,{sx:{px:2,py:2,fontSize:0,color:"fg.muted",borderTop:"1px solid",borderColor:"border.muted"},children:[D.length>5&&(0,u.jsx)(nh.r,{leadingVisual:N?G.FoldIcon:G.UnfoldIcon,sx:{color:"fg.default",mb:2},variant:"invisible",size:"small",onClick:()=>C(!N),children:N?"Show less":"Show more"}),(0,u.jsx)(nh.r,{as:ed.Z,leadingVisual:G.SearchIcon,sx:{color:"fg.default"},variant:"invisible",size:"small",href:(0,ep.mY)({owner:k.ownerLogin,repo:k.name,searchTerm:t}),children:"Search for this symbol"})]}),(0,u.jsx)(v.Suspense,{fallback:null,children:(0,u.jsx)(rc,{definitionsOrReferences:[...S,...R]})})]})}function ru({headerText:e,searchType:t,sx:n,children:r}){return(0,u.jsxs)(P.Z,{sx:{fontSize:"14px",px:3,py:2,fontWeight:"600",backgroundColor:"canvas.subtle",borderTop:"1px solid",borderColor:"border.muted",height:"36px",display:"flex",flexDirection:"row",alignItems:"center",...n},children:[(0,u.jsxs)(M.Z,{as:"h3",sx:{fontSize:"12px",fontWeight:"semibold",color:"fg.muted"},children:[e,(0,u.jsx)(q.Z,{sx:{ml:2,fontWeight:"light"},children:t})]}),r]})}function rh({currentSymbol:e,selectedText:t,codeNavInfo:n,onSymbolSelect:r,children:i}){let a=e?.fullyQualifiedName??t,l=a.split(/(\W+)/),o=l.map(e=>{let t=/^\W+$/.test(e),r=t?[]:n.getLocalDefinitions(e,!0),i=1===r.length?r[0]:void 0,a=i?.kind.plColor;return{text:e,symbol:i,symbolColor:a,isSeparator:t}});return(0,u.jsxs)(P.Z,{as:"h3",sx:{display:"flex",flexDirection:"column",flexGrow:1,alignContent:"start",fontWeight:400,fontSize:1,fontFamily:"mono",flexWrap:"wrap",minWidth:0,verticalAlign:"center",gap:2,px:3},"aria-label":`${e?.kind.fullName||""} ${a}`.trimStart(),children:[e&&(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexGrow:1,width:"100%"},children:[(0,u.jsx)(et,{symbolKind:e.kind,showFullSymbol:!0}),i]}),(0,u.jsxs)(ee.Z,{title:a,sx:{maxWidth:290,mt:"3px",direction:"rtl",alignSelf:"start"},inline:!0,children:["\u200E",o.map((e,t)=>{let n=e.symbol?{all:"unset",cursor:"pointer","&:hover":{backgroundColor:"attention.muted"}}:{};return(0,u.jsx)(P.Z,{as:"span",role:"button",tabIndex:e.isSeparator?-1:0,sx:{...n,color:e.symbolColor,direction:"ltr"},onClick:()=>e.symbol?r(e.symbol):void 0,onKeyDown:t=>{e.symbol&&["Enter","Space"].includes(t.code)&&r(e.symbol)},children:e.text},`${e.text}-${t}`)}),"\u200E"]})]})}function rm(e){return e.name===e.currentOid?e.currentOid:"tree"===e.refType?`refs/heads/${e.name}`:(0,rt.Ju)(e.name,e.refType??"branch")}try{rc.displayName||(rc.displayName="ScrollMarks")}catch{}try{rd.displayName||(rd.displayName="CodeNavSymbolDetails")}catch{}try{ru.displayName||(ru.displayName="CodeNavSymbolSectionHeader")}catch{}try{rh.displayName||(rh.displayName="CodeNavSymbolDefinitionHeader")}catch{}function rp({selectedText:e,showCodeNavWithSymbol:t,lineNumber:n,offset:r,onClose:i,onClear:a,codeNavInfo:l,isLoading:o,setSearchResults:s,setFocusedSearchResult:c,autoFocusSearch:d}){function h(e){t(e),f(!1)}let[p,f]=(0,v.useState)(!e);(0,Q.Sl)(e=>{e&&(a(),f(!0),s([]))});let{refInfo:x,path:y}=(0,_.Br)(),g=(0,m.H)(),{language:b,languageID:j,displayUrl:w}=(0,eS.G)(),N=(0,v.useMemo)(()=>({type:"file",languageID:j,languageName:b,path:y,ref:(0,rt.Ju)(x.name,x.refType),commitOID:x.currentOid,repoID:g.id,repoName:g.name,repoOwner:g.ownerLogin,url:w}),[j,b,y,x.name,x.refType,x.currentOid,g.id,g.name,g.ownerLogin,w]);return(0,v.useEffect)(()=>{e?f(!1):p||(window.dispatchEvent(new re.aF(N)),f(!0))},[e,l]),(0,u.jsx)(P.Z,{id:"symbols-pane",children:p?l?(0,u.jsx)(ey,{treeSymbols:l.symbolTree,onSymbolSelect:h,codeSymbols:l.symbols,onClose:i,autoFocusSearch:d}):(0,u.jsx)("div",{children:"Click on a symbol to see code navigation data"}):(0,u.jsx)(rd,{codeNavInfo:l,selectedText:e,lineNumber:n,offset:r,onBackToSymbol:()=>{a(),f(!0),s([]),window.dispatchEvent(new re.aF(N))},onClose:()=>{i(),a(),s([]),window.dispatchEvent(new re.aF(N))},onSymbolSelect:h,isLoading:o,setSearchResults:s,setFocusedSearchResult:c})})}try{rp.displayName||(rp.displayName="CodeNavInfoPanel")}catch{}var rf=n(72508);let rx=v.memo(ry);function ry(e){let{...t}=e,[n,r]=v.useState(!1),{screenSize:i}=(0,y.eI)();return v.useEffect(()=>{r(it.setOpenPanel(void 0),renderHeader:()=>null,renderBody:()=>rg({...t})})]})}function rg({stickySx:e,stickyHeaderRef:t,openPanel:n,isCodeNavLoading:r,codeNavInfo:i,setOpenPanel:a,showCodeNavWithSymbol:l,searchingText:o,setSearchingText:s,setSearchTerm:c,setSearchResults:d,setFocusedSearchResult:h,autoFocusSearch:m,className:p}){let{headerInfo:{toc:f}}=(0,eS.G)(),x=(0,eO.X)(t),y=eA();return(0,u.jsx)(rf.s,{sx:{...e,...x?{borderRadius:"0px 0px 6px 6px",borderTop:0}:{}},className:`panel-content-narrow-styles ${p||""}`,children:"toc"===n?(0,u.jsx)(n7.Z,{toc:f,onClose:()=>{a(void 0)}}):"codeNav"===n&&(0,u.jsx)(rp,{codeNavInfo:i,showCodeNavWithSymbol:l,selectedText:o.selectedText,lineNumber:o.lineNumber-1,offset:o.offset,onClose:()=>{a(void 0),localStorage.setItem("codeNavOpen",""),y(null,!1,null),document.getElementById("symbols-button")?.focus()},isLoading:r,onClear:()=>s({selectedText:"",lineNumber:0,offset:-1}),setSearchTerm:c,setSearchResults:d,setFocusedSearchResult:h,autoFocusSearch:m})})}try{rx.displayName||(rx.displayName="PanelContent")}catch{}try{ry.displayName||(ry.displayName="PanelContentUnmemoized")}catch{}try{rg.displayName||(rg.displayName="InnerPanelContent")}catch{}function rb({blame:e,blob:t,searchTerm:n,setSearchTerm:r,symbolsExpanded:i,setValidCodeNav:a,showTree:l,treeToggleElement:o,validCodeNav:s,copilotInfo:c}){let{path:d}=(0,_.Br)(),h=t.symbolsEnabled,f=(0,v.useRef)(null),x=(0,eO.V)(),[y,b]=(0,v.useState)(!1),{openPanel:j,setOpenPanel:w}=(0,eC.F)(),N=(0,v.useRef)(null),C=(0,g.OY)().openSymbolsOption.enabled&&h;(0,Q.Sl)(e=>{e&&b(!0)});let{sendRepoClickEvent:k}=(0,L.a)(),S=(0,v.useRef)(!0);function I(){window.scrollY<300&&Z(null,!0)}(0,v.useEffect)(()=>{S.current?(S.current=!1,M.selectedText&&!j&&C&&i&&B()):(Z(null,!0),r(""),b(!1),z({selectedText:"",lineNumber:-1,offset:0}))},[d]),(0,v.useEffect)(()=>(window.addEventListener("scroll",I),()=>{window.removeEventListener("scroll",I)}),[]);let R=!!(0,ek.Q)(),E=eA(),{currentStickyLines:T,setStickyLines:Z}=function(){let[e,t]=(0,v.useState)(new Map),n=(0,v.useCallback)((n,r)=>{let i=!1;if(null===n&&0===e.size)return;if(null===n&&r){e.clear(),t(new Map(e));return}if(!n)return;let a=n.lineNumber;if(r&&e.has(a)?(e.delete(a),i=!0):r||e.has(a)||(e.set(a,n),i=!0),e.has(a))for(let[t]of e){let n=e.get(t);(!n.ownedSection||n.ownedSection.endLine{!R&&C&&(w("codeNav"),k("BLOB_SYMBOLS_MENU.OPEN_WITH_SYMBOL"),localStorage.setItem("codeNavOpen","codeNav"),E(null,!0,null))},[R,C,w,k,E]),{isCodeNavLoading:O,codeNavInfo:F,showCodeNavWithSymbol:A,showCodeNavForToken:$,searchingText:M,setSearchingText:z}=function(e,t,n,r,i){let a=(0,eR.s)(),l=(0,m.H)(),o=(0,p.x)(),{refInfo:s,path:c}=(0,_.Br)(),[d,u]=(0,v.useState)(!1),[h]=(0,eR.l)(),f="1"===h.get("plain"),x=(0,v.useMemo)(()=>{n(!0);try{return new eI.bm(l,s,c,!!o,e.rawLines||[],e.symbols?.symbols??[],e.stylingDirectives,e.language,f,u)}catch(e){n(!1)}},[l,s,c,e,n,f,o]),[y,g]=(0,v.useState)(()=>{let t=(0,eL.n6)(r);if(!t.blobRange?.start?.line)return{selectedText:"",lineNumber:-1,offset:0};let n=!i&&t.blobRange.start.line===t.blobRange.end.line&&null!==t.blobRange.start.column&&null!==t.blobRange.end.column&&t.blobRange.end.column-t.blobRange.start.column>2&&e.stylingDirectives&&e.stylingDirectives[t.blobRange.start.line-1]?.length&&x?.blobLines[t.blobRange.start.line-1];if(n){let n=x.blobLines[t.blobRange.start.line-1]?.substring(t.blobRange.start.column-1,t.blobRange.end.column-1),r=e.stylingDirectives[t.blobRange.start.line-1]?.find(e=>(e.s??e.start)===t.blobRange.start.column-1&&(e.e??e.end)===t.blobRange.end.column-1);return n&&r&&(0,eE.yk)(n,r.c??r.cssClass)?{selectedText:n,lineNumber:t.blobRange.start.line,offset:t.blobRange.start.column}:{selectedText:"",lineNumber:-1,offset:0}}if(!r||!x||i)return{selectedText:"",lineNumber:-1,offset:0};{let e=x.getSymbolOnLine(Number(r.substring(2)));return e?{selectedText:e.name,lineNumber:e.lineNumber,offset:e.ident.start.column}:{selectedText:"",lineNumber:-1,offset:0}}}),b=(0,v.useCallback)(e=>{g({selectedText:e.name,lineNumber:e.lineNumber,offset:e.ident.start.column}),t(),a(e.href()),(0,eT.v)({line:e.lineNumber})},[t,a]),j=(0,v.useCallback)(e=>{g(e),t()},[t]);return{isCodeNavLoading:d,codeNavInfo:x,showCodeNavWithSymbol:b,showCodeNavForToken:j,setSearchingText:g,searchingText:y}}(t,B,a,D.ssrSafeLocation.hash,R),{searchStatus:H,searchResults:W,setSearchResults:G,focusedSearchResult:U,setFocusedSearchResult:V}=function(e,t){let{findInFileWorkerPath:n}=(0,_.Ou)(),[r,i]=(0,v.useState)([]),[a,l]=(0,v.useState)(void 0),[o,s]=(0,v.useState)("done"),c=v.useRef(),{refInfo:d,path:u}=(0,_.Br)();!c.current&&t&&(c.current=new DebouncedWorkerManager(new eZ.V(n,eB),200,e=>1!==e.query.length));let h=(0,v.useRef)(t);h.current=t;let m=(0,v.useRef)("");(0,v.useEffect)(()=>function(){c.current?.terminate()},[]);let p=(0,v.useRef)();return c.current&&e!==p.current&&(c.current.onResponse=t=>{t.query===h.current&&(l(0),i(e?.createReferences(t.ranges)||[]),s("done"),m.current=h.current)},p.current=e),(0,v.useEffect)(()=>{if(!e||!c.current||!m.current||""===m.current){i([]),l(0),s("done");return}i([]),l(0),s("pending"),c.current.post({query:m.current,lines:e.blobLines,currentCodeReferences:void 0})},[d.name,u]),(0,v.useEffect)(()=>{if(e&&c.current){if(""===t)i([]),l(0),s("done"),m.current="";else{if(m.current===t||!(t.length>0&&t.length<=1e3))return;s("pending");let n=m.current.length>0&&t.startsWith(m.current);c.current.post({query:t,lines:e.blobLines,currentCodeReferences:n?r:void 0})}}},[t]),{focusedSearchResult:a,setFocusedSearchResult:l,searchResults:r,setSearchResults:i,searchStatus:o}}(F,n),{headerInfo:{toc:K}}=t,q=(0,v.useMemo)(()=>({value:!1}),[F]);q.value=!j||q.value;let Y=void 0!==j&&F&&s&&!(0===F.symbols.length&&"codeNav"===j&&!q.value)&&!(!K&&"toc"===j)&&"edit"!==j&&!(!h&&"codeNav"===j),X=Y?j:void 0;return(0,v.useEffect)(()=>{j&&!Y&&w(void 0)},[j,w,Y]),(0,v.useEffect)(()=>{try{(0,ew.qP)("blob-size",{lines:t.stylingDirectives?.length,truncatedSloc:t.headerInfo?.lineInfo.truncatedSloc,truncatedLoc:t.headerInfo?.lineInfo.truncatedLoc,length:t.rawLines?.reduce((e,t)=>e+t.length,0)??0,humanLength:t.headerInfo?.blobSize})}catch(e){}},[t]),(0,u.jsx)(eS.d,{blob:t,children:(0,u.jsx)(ek.M,{blame:e,children:(0,u.jsxs)(e_.S6,{children:[F&&(0,u.jsx)(rv,{codeNavInfo:F}),(0,u.jsx)(ev.d,{}),(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row"},children:[(0,u.jsxs)(P.Z,{className:"container",sx:{width:"100%",height:"fit-content",minWidth:0,mr:X&&F?3:0},children:[(0,u.jsxs)(P.Z,{sx:{height:"40px",pl:1,pb:3},className:"react-code-size-details-banner",children:[(0,u.jsx)(nj,{className:"react-code-size-details-banner"}),(0,u.jsx)(ej.y,{copilotInfo:c,className:"react-code-size-details-banner",view:e?"blame":"preview"})]}),(0,u.jsx)(P.Z,{className:"react-blob-view-header-sticky",sx:x,id:eD.TZ,ref:f,children:(0,u.jsx)(n5,{currentStickyLines:T,focusedSearchResult:U,openPanel:X,searchingText:M,searchResults:W,searchTerm:n,setFocusedSearchResult:V,setOpenPanel:w,setSearchTerm:r,showTree:l,stickyHeaderRef:f,treeToggleElement:o,validCodeNav:s,copilotInfo:c,colorizedLines:t.colorizedLines})}),(0,u.jsx)(P.Z,{sx:{border:"1px solid",borderTop:"none",borderColor:"border.default",borderRadius:"0px 0px 6px 6px",minWidth:"273px"},children:(0,u.jsx)(tX,{blobLinesHandle:N,setOpenPanel:w,validCodeNav:s,codeNavInfo:F,onCodeNavTokenSelected:$,onLineStickOrUnstick:Z,searchResults:W,setSearchTerm:r,focusedSearchResult:U})})]}),X&&F?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(P.Z,{sx:{pb:"33px"}}),(0,u.jsx)(rx,{stickySx:x,stickyHeaderRef:f,openPanel:X,isCodeNavLoading:O,codeNavInfo:F,setOpenPanel:w,showCodeNavWithSymbol:A,searchingText:M,setSearchingText:z,searchTerm:n,searchResults:W,searchStatus:H,setSearchResults:G,setSearchTerm:r,setFocusedSearchResult:V,autoFocusSearch:y})]}):null]})]})})})}function rv({codeNavInfo:e}){let{sendRepoKeyDownEvent:t}=(0,L.a)(),{findSymbolShortcut:n}=(0,I.bx)(),{setOpenPanel:r}=(0,eC.F)();return 0===e.symbols.length?null:(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:n.hotkey,onButtonClick:()=>{r("codeNav"),(0,Q.eS)(),t("FIND_SYMBOL")}})}try{rb.displayName||(rb.displayName="BlobViewContent")}catch{}try{rv.displayName||(rv.displayName="FindSymbolShortcut")}catch{}var rj=n(18602),rw=n(51461);function rN(){let e=(0,x.T)(),t="blame"in e?e.blame:void 0;return(0,u.jsxs)(ek.M,{blame:t,children:[(0,u.jsx)(rC,{}),(0,u.jsx)(rS,{})]})}function rC(){let e=(0,m.H)(),t=(0,_.Br)().refInfo.name,n=(0,ek.Q)(),[r,i]=v.useState(!0);if(!n)return null;let a=n?.ignoreRevs,l=n?.errorType;return l?(0,u.jsx)(u.Fragment,{children:r&&(0,u.jsxs)(rw.Z,{variant:"warning",sx:{mt:3},children:[(0,u.jsx)(K.Z,{icon:G.InfoIcon}),(0,u.jsx)(rk,{blameErrorType:l,renderIgnoreRefsLink:()=>(0,u.jsx)(e8.r,{to:(0,ep.C9)({repo:e.name,owner:e.ownerLogin,commitish:t,filePath:a.path}),children:a.path})}),(0,u.jsx)(P.Z,{sx:{float:"right",cursor:"pointer"},onClick:()=>i(!1),children:(0,u.jsx)(K.Z,{icon:G.XIcon})})]})}):null}function rk({blameErrorType:e,renderIgnoreRefsLink:t}){switch(e){case"invalid_ignore_revs":return(0,u.jsxs)(q.Z,{children:["Your ",t()," file is invalid."]});case"ignore_revs_too_big":return(0,u.jsxs)(q.Z,{children:["Your ",t()," file is too large."]});case"symlink_disallowed":return(0,u.jsx)(q.Z,{children:"Symlinks are not supported."});case"blame_timeout":return(0,u.jsx)(q.Z,{children:"Your blame took too long to compute."});default:eW(e)}}function rS(){let e=(0,m.H)(),t=(0,_.Br)().refInfo.name,n=ek.Q()?.ignoreRevs,[r,i]=v.useState(!0);if(!n?.present)return null;let a=(0,u.jsx)(e8.r,{to:(0,ep.C9)({repo:e.name,owner:e.ownerLogin,commitish:t,filePath:n.path}),children:n.path});return(0,u.jsx)(u.Fragment,{children:r&&(0,u.jsxs)(rw.Z,{sx:{mt:3},children:[(0,u.jsx)(K.Z,{icon:G.InfoIcon}),n.timedOut?(0,u.jsxs)(q.Z,{children:["Failed to ignore revisions in ",a,"."]}):(0,u.jsxs)(q.Z,{children:["Ignoring revisions in ",a,"."]}),(0,u.jsx)(P.Z,{sx:{float:"right",cursor:"pointer"},onClick:()=>i(!1),children:(0,u.jsx)(K.Z,{icon:G.XIcon})})]})})}try{rN.displayName||(rN.displayName="BlameBanners")}catch{}try{rC.displayName||(rC.displayName="BlameErrorBanner")}catch{}try{rk.displayName||(rk.displayName="BlameErrorText")}catch{}try{rS.displayName||(rS.displayName="IgnoreRevsBanner")}catch{}var r_=n(11646),rI=n(67125);function rR({errors:e}){if(!e||0===e.length)return null;let t=[];return 1===e.length?t.push("Learn more about this error."):e.map((e,n)=>{t.push(`Learn more about error ${n+1}.`)}),(0,u.jsxs)(rw.Z,{variant:"danger",sx:{mt:3},children:[(0,u.jsxs)("p",{children:[(0,u.jsx)(K.Z,{icon:G.AlertIcon}),(0,u.jsxs)("strong",{children:["There ",1===e.length?"is a problem":"are some problems"," with this template"]})]}),e.map((e,n)=>(0,u.jsxs)("p",{children:[(0,u.jsx)(e6.WZ,{html:e.message}),". ",(0,u.jsx)(ed.Z,{href:e.link,target:"_blank",children:t[n]})]},`error-${n}`))]})}try{rR.displayName||(rR.displayName="DiscussionTemplateBanner")}catch{}function rL(e){let t;let{issueTemplate:n,showIssueFormWarning:r,isValidLegacyIssueTemplate:i,helpUrl:a,isLoggedIn:l}=e;if(!l||!n&&!i&&!r)return null;let o=null,s=[];return n?!1===n.valid?(t="danger",n.errors&&(1===n.errors.length?s.push("Learn more about this error."):n.errors.map((e,t)=>{s.push(`Learn more about error ${t+1}.`)})),o=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("p",{children:[(0,u.jsx)(K.Z,{icon:G.AlertIcon}),(0,u.jsxs)("strong",{children:["There ",n.errors?.length===1?"is a problem":"are some problems"," with this template"]})]}),n.errors?.map((e,t)=>u.jsxs("p",{children:[u.jsx(e6.WZ,{html:e.message}),". ",u.jsx(ed.Z,{href:e.link,target:"_blank",children:s[t]})]},`error-${t}`))]})):o=n.structured?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ne.Z,{sx:{mr:2},variant:"success",children:"Beta"}),"This file is used as an Issue Form template."," ",(0,u.jsx)("a",{href:"https://github.com/orgs/community/discussions/categories/projects-and-issues",children:"Give Feedback."})]}):"This file is used as a markdown issue template.":r&&(o="Issue form templates are not supported on private repositories.",t="warning"),(0,u.jsxs)(u.Fragment,{children:[(n||r)&&(0,u.jsx)(rw.Z,{variant:t,sx:{mt:3},children:o}),i&&(0,u.jsx)(rE,{helpUrl:a})]})}function rE({helpUrl:e}){return(0,u.jsxs)(rw.Z,{variant:"warning",sx:{mt:3},children:["You are using an old version of issue templates. Please update to the new issue template workflow."," ",(0,u.jsx)(ed.Z,{href:`${e}/articles/about-issue-and-pull-request-templates`,target:"_blank",children:"Learn more about issue templates."})]})}try{rL.displayName||(rL.displayName="IssueTemplateBanner")}catch{}try{rE.displayName||(rE.displayName="LegacyIssueTemplateBanner")}catch{}function rT(){let e=(0,m.H)(),t=(0,p.x)(),{refInfo:n,path:r}=(0,_.Br)(),{helpUrl:i}=(0,_.Ou)(),{csvError:a,isCodeownersFile:l,publishBannersInfo:{showPublishActionBanner:o,releasePath:s,dismissActionNoticePath:c},discussionTemplate:d,issueTemplate:h,showIssueFormWarning:f,isValidLegacyIssueTemplate:x}=(0,eS.G)(),[y,g]=(0,v.useState)([]),[b,j]=(0,v.useState)(rI.hL.LOADING),w=(0,v.useRef)(0);return(0,v.useEffect)(()=>{w.current++;let t=async()=>{try{let t=w.current,i=await (0,rI.Xj)(e,n,r);if(t(0,rI.ew)(e))),j(rI.hL.VALIDATED)}else j(rI.hL.ERROR)}catch(e){j(rI.hL.ERROR)}};l&&t()},[l,e,n,r]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r_.Z,{showPublishActionBanner:o,releasePath:s,dismissActionNoticePath:c}),(0,u.jsx)(rL,{issueTemplate:h,showIssueFormWarning:f,isValidLegacyIssueTemplate:x,isLoggedIn:!!t,helpUrl:i}),d?.errors&&d.errors.length>0&&(0,u.jsx)(rR,{...d}),(0,u.jsx)(rZ,{}),l&&(0,u.jsx)(eQ.Provider,{value:y,children:(0,u.jsx)(rI.iC,{errors:y,state:b})}),a&&(0,u.jsx)(rB,{csvError:a})]})}function rZ(){let{truncated:e,large:t,image:n,renderedFileInfo:r,rawBlobUrl:i}=(0,eS.G)();return!e||t||n||r?null:(0,u.jsxs)(rw.Z,{sx:{mt:3},children:["This file has been truncated, but you can ",(0,u.jsx)(ed.Z,{href:i,children:"view the full file"}),"."]})}function rB({csvError:e}){return(0,u.jsx)(rw.Z,{sx:{mt:3},variant:"warning",children:(0,u.jsx)(e6.wB,{html:e})})}try{rT.displayName||(rT.displayName="BlobLowerBanners")}catch{}try{rZ.displayName||(rZ.displayName="TruncatedBanner")}catch{}try{rB.displayName||(rB.displayName="CSVErrorBanner")}catch{}var rD=n(52973);function rO(){let e=(0,m.H)(),{refInfo:t,path:n}=(0,_.Br)(),[r]=(0,rD.f)(e.ownerLogin,e.name,t.name,n);return r?.isSpoofed?(0,u.jsxs)(rw.Z,{variant:"warning",sx:{mt:3},children:[(0,u.jsx)(K.Z,{icon:G.AlertIcon}),(0,u.jsx)(q.Z,{children:"This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository."})]}):null}try{rO.displayName||(rO.displayName="SpoofedCommitWarning")}catch{}function rF(){let{license:e}=(0,nv.nO)(),t=(0,m.H)(),{helpUrl:n}=(0,_.Ou)(),r={permissions:{icon:G.CheckIcon,color:"success.fg"},limitations:{icon:G.XIcon,color:"danger.fg"},conditions:{icon:G.InfoIcon,color:"accent.fg"}};return e?(0,u.jsxs)(P.Z,{sx:{borderColor:"border.default",borderStyle:"solid",borderWidth:1,borderRadius:"6px",mt:3},children:[(0,u.jsxs)(P.Z,{sx:{display:"grid",px:3,py:1,gridTemplateColumns:"repeat(auto-fit, minmax(350px, 1fr))",gap:2},className:"blob-license-banner-outer",children:[(0,u.jsxs)(P.Z,{sx:{display:"flex",flex:"1",flexDirection:"column",pr:3},children:[(0,u.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,u.jsx)(K.Z,{icon:G.LawIcon,size:32}),(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"column",ml:2},children:[(0,u.jsxs)(P.Z,{sx:{fontSize:0,color:"fg.muted"},children:[`${t.ownerLogin}/${t.name} is licensed under`," ",e.name.toLowerCase().startsWith("the ")?"":" the"]}),(0,u.jsx)(P.Z,{as:"h3",children:e.name})]})]}),(0,u.jsx)(e6.wB,{html:e.description,sx:{fontSize:0,color:"fg.muted",mt:2,flexWrap:"wrap"}})]}),(0,u.jsx)(P.Z,{sx:{display:"flex",flex:"1"},children:Object.keys(e.rules).map((t,n)=>(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"column",flex:"1",pb:3},children:[(0,u.jsx)(P.Z,{sx:{display:"flex",mb:2},as:"h5",children:t.charAt(0).toUpperCase()+t.substring(1)}),e.rules[t].map(e=>(0,u.jsxs)(P.Z,{sx:{fontSize:0},children:[(0,u.jsx)(K.Z,{icon:r[t].icon,size:13,sx:{color:r[t].color,mr:1}}),e.label]},e.tag))]},n))})]}),(0,u.jsxs)(P.Z,{sx:{borderTop:"1px solid",borderColor:"border.default",fontSize:0,px:3,py:2},children:["This is not legal advice.\xa0",(0,u.jsx)(ed.Z,{href:`${n}/articles/licensing-a-repository/#disclaimer`,children:"Learn more about repository licenses"})]})]}):null}try{rF.displayName||(rF.displayName="BlobLicenseBanner")}catch{}function rA({citationHelpUrl:e}){return(0,u.jsxs)(rw.Z,{variant:"warning",sx:{mt:3},children:["Your ",(0,u.jsx)("strong",{children:"CITATION.cff"})," file cannot be parsed. Make sure the formatting is correct."," ",(0,u.jsx)(ed.Z,{href:e,children:"Learn more about CITATION files."})]})}try{rA.displayName||(rA.displayName="InvalidCitationWarning")}catch{}function r$({globalPreferredFundingPath:e}){return(0,u.jsxs)(rw.Z,{sx:{mt:3},children:["This file is overriding the organization-wide ",(0,u.jsx)("code",{children:"FUNDING.yml"})," file. Removing ",(0,u.jsx)("code",{children:"FUNDING.yml"})," in this repository will use the organization default.",(0,u.jsx)(ed.Z,{href:e??void 0,children:" View organization funding file."})]})}try{r$.displayName||(r$.displayName="OverridingGlobalFundingFileWarning")}catch{}function rP(){let{topBannersInfo:{overridingGlobalFundingFile:e,globalPreferredFundingPath:t,showInvalidCitationWarning:n,citationHelpUrl:r}}=(0,eS.G)(),{showLicenseMeta:i}=(0,nv.nO)();return(0,u.jsxs)(u.Fragment,{children:[i&&(0,u.jsx)(rF,{}),n&&(0,u.jsx)(rA,{citationHelpUrl:r}),(0,u.jsx)(rO,{}),e&&(0,u.jsx)(r$,{globalPreferredFundingPath:t})]})}try{rP.displayName||(rP.displayName="BlobMidBanners")}catch{}var rM=n(62719);function rz(){let{defaultBranch:e}=(0,m.H)(),{refInfo:{name:t}}=(0,_.Br)(),{dependabotInfo:{showConfigurationBanner:n}}=(0,eS.G)();return n?e===t?(0,u.jsx)(rH,{}):(0,u.jsx)(rW,{}):null}function rH(){let{dependabotInfo:{configFilePath:e,networkDependabotPath:t,dismissConfigurationNoticePath:n,configurationNoticeDismissed:r}}=(0,eS.G)(),i=(0,v.useCallback)(()=>(0,eF.Q)(n,{method:"POST"}),[n]);return r?null:(0,u.jsx)(P.Z,{sx:{position:"absolute",zIndex:2,left:"50%",transform:"translate(-50%, 0)"},children:(0,u.jsxs)(rM.Z,{caret:"top",sx:{backgroundColor:"canvas.overlay",width:300,p:3},children:[(0,u.jsx)(q.Z,{as:"h5",sx:{mb:1},children:"Dependabot"}),(0,u.jsx)(q.Z,{as:"p",sx:{mb:3},children:"Dependabot creates pull requests to keep your dependencies secure and up-to-date."}),(0,u.jsxs)(q.Z,{as:"p",sx:{mb:3},children:["You can opt out at any time by removing the ",(0,u.jsx)("code",{children:e})," config file."]}),(0,u.jsxs)(P.Z,{sx:{display:"flex"},children:[(0,u.jsx)(nh.r,{as:"a",href:t,children:"View update status"}),(0,u.jsx)(nh.r,{variant:"invisible",sx:{color:"fg.muted",ml:2},onClick:i,children:"Dismiss"})]})]})})}function rW(){let{defaultBranch:e,name:t,ownerLogin:n}=(0,m.H)(),{path:r}=(0,_.Br)(),i=(0,ep.C9)({owner:n,repo:t,commitish:e,filePath:r});return(0,u.jsxs)(rw.Z,{variant:"warning",children:[(0,u.jsxs)(q.Z,{as:"h5",children:[(0,u.jsx)(K.Z,{icon:G.AlertIcon}),"Cannot configure Dependabot"]}),(0,u.jsxs)(q.Z,{as:"p",children:["To configure Dependabot, you must use"," ",(0,u.jsx)(ed.Z,{href:i,children:"this repository's default branch"})]})]})}try{rz.displayName||(rz.displayName="DependabotConfigurationBanner")}catch{}try{rH.displayName||(rH.displayName="DefaultBranchDependabotConfigurationBanner")}catch{}try{rW.displayName||(rW.displayName="DirectionsForNonDefaultBranch")}catch{}var rG=n(98641);function rU({children:e,mediaUrl:t,mediaPreviewSrc:n,iconSvg:r,taskTitle:i,taskPath:a,org:l}){return(0,u.jsxs)(P.Z,{as:"section",sx:{position:"relative",display:"flex",borderColor:"border.muted",borderStyle:"solid",borderWidth:1,borderRadius:"6px",backgroundColor:"canvas.subtle",p:3,mt:3},children:[(0,u.jsxs)(P.Z,{sx:{display:"flex"},children:[(0,u.jsx)(rV,{iconSvg:r}),(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"column",ml:3},children:[(0,u.jsxs)(rG.Z,{children:[(0,u.jsx)(rG.Z.Item,{href:(0,ep.lr)({owner:l}),children:"Tasks"}),(0,u.jsx)(rG.Z.Item,{href:a,sx:{color:"fg.default"},children:i})]}),e]})]}),(0,u.jsx)(rq,{mediaPreviewSrc:n,mediaUrl:t})]})}function rV({iconSvg:e}){return(0,u.jsxs)(P.Z,{sx:{position:"relative",maxHeight:48},children:[(0,u.jsx)(e6.wB,{html:e,sx:{width:48,height:48,background:"radial-gradient(circle, rgba(141, 123, 255, 1) 0%, rgba(123, 133, 255, 1) 48%, rgba(141, 123, 255, 1) 85%, rgba(141, 123, 255, 1) 98%)",borderRadius:2,p:1,"& path":{fill:"#fff"}}}),(0,u.jsx)(rK,{size:6,color:"#6c84e9",bottom:-7,left:-7}),(0,u.jsx)(rK,{size:4,color:"#9e7bff",top:-4,right:4}),(0,u.jsx)(rK,{size:6,color:"#6c84e9",top:-7,right:-8})]})}function rK({size:e,color:t,left:n,right:r,top:i,bottom:a}){return(0,u.jsx)(P.Z,{sx:{position:"absolute",width:e,height:e,borderRadius:"50%",left:`${n}px`,right:`${r}px`,top:`${i}px`,bottom:`${a}px`,backgroundColor:t}})}function rq({mediaUrl:e,mediaPreviewSrc:t}){return!((D.iG?.innerWidth??0){location.href=i},children:"Upgrade now"})}try{rX.displayName||(rX.displayName="PlanSupportBanner")}catch{}try{rQ.displayName||(rQ.displayName="UpgradeButton")}catch{}function rJ(){let{planSupportInfo:e,topBannersInfo:t}=(0,eS.G)(),{actionsOnboardingTip:n}=t,r=(0,m.H)();return(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,u.jsx)(rX,{...e,feature:"codeowners",featureName:"CODEOWNERS"}),(0,u.jsx)(rz,{}),n&&(0,u.jsx)(rU,{iconSvg:n.iconSvg,mediaPreviewSrc:n.mediaPreviewSrc,mediaUrl:n.mediaUrl,taskTitle:n.taskTitle,taskPath:n.taskPath,org:n.orgName,children:(0,u.jsx)(rY,{owner:r.ownerLogin,repo:r.name})})]})}try{rJ.displayName||(rJ.displayName="BlobTopBanners")}catch{}function r0({payload:e}){return(0,Z.g6)(e)?(0,u.jsx)(r1,{tree:e.tree}):(0,Z.Kg)(e)?(0,u.jsx)(r2,{blob:e.blob}):null}function r1({tree:e}){return(0,u.jsxs)(rj.J,{payload:e,children:[(0,u.jsx)(rO,{}),(0,u.jsx)(r3,{}),(0,u.jsx)(r5,{})]})}function r2({blob:e}){return(0,u.jsxs)(eS.d,{blob:e,children:[(0,u.jsx)(rJ,{}),(0,u.jsx)(rP,{}),(0,u.jsx)(rT,{}),(0,u.jsx)(rN,{}),(0,u.jsx)(r5,{})]})}function r3(){let{items:e,totalCount:t}=(0,rj.j)(),n=t-e.length;return n>0?(0,u.jsxs)(rw.Z,{variant:"warning","data-testid":"repo-truncation-warning",sx:{mt:3},children:["Sorry, we had to truncate this directory to ",e.length.toLocaleString()," files. ",n.toLocaleString()," ",1===n?"entry was":"entries were"," omitted from the list. Latest commit info may be omitted."]}):null}function r5(){let e=(0,k.KG)(),t="";for(let n of e)t+=n.message;return(0,eE.dM)(t),(0,u.jsx)(u.Fragment,{children:e.map((e,t)=>(0,u.jsx)(rw.Z,{variant:e.variant,sx:{mt:3},children:e.message},t))})}try{r0.displayName||(r0.displayName="CodeViewBanners")}catch{}try{r1.displayName||(r1.displayName="TreeBanners")}catch{}try{r2.displayName||(r2.displayName="BlobBanners")}catch{}try{r3.displayName||(r3.displayName="TruncatedTreeBanner")}catch{}try{r5.displayName||(r5.displayName="CodeViewContextBanners")}catch{}var r4=n(6975),r8=n(22174),r6=n(45096),r9=n(14136);function r7({diff:e,index:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(!1),[l,o]=(0,v.useState)(!1),s=[];for(let t=0;t<5;t++)e.deletions>t?s.push("deletion"):s.push("neutral");return e.diffHTML?(0,u.jsx)("div",{id:"readme",className:"readme prose-diff html-blob blob",children:(0,u.jsx)(e6.wB,{html:e.diffHTML,className:"markdown-body container-lg"})}):(0,u.jsxs)(P.Z,{sx:{border:"1px solid",borderColor:"border.default",borderRadius:"6px",mt:3},id:`diff-entry-${t}`,children:[(0,u.jsxs)(P.Z,{sx:{backgroundColor:"canvas.subtle",borderBottom:"1px solid",borderColor:"border.default",display:"flex",py:1,px:2,alignItems:"center",gap:2},children:[(0,u.jsx)(U.h,{"aria-label":"Search",icon:n?G.ChevronRightIcon:G.ChevronDownIcon,size:"small",variant:"invisible",onClick:()=>r(!n)}),(0,u.jsx)(q.Z,{sx:{color:"fg.muted"},children:e.deletions}),(0,u.jsx)(r4.Sv,{squares:s}),(0,u.jsx)(ed.Z,{sx:{color:"fg.default",cursor:"pointer"},underline:!1,href:`#diff-entry-${t}`,children:e.path}),(0,u.jsx)(r9.m,{textToCopy:e.path,ariaLabel:"Copy path to clipboard"})]}),n?null:(0,u.jsx)(P.Z,{sx:{px:i?0:3,py:i?0:4,position:"relative"},tabIndex:-1,children:i?(0,u.jsx)("include-fragment",{"data-testid":"delete-diff-fragment",src:e.loadDiffPath,onLoad:()=>o(!0),children:!l&&(0,u.jsx)(P.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"137px"},children:(0,u.jsx)(rn.Z,{})})}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ie,{}),(0,u.jsxs)(P.Z,{sx:{position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",top:0,left:0,height:"100%",width:"100%"},children:[(0,u.jsx)(ed.Z,{onClick:()=>a(!0),sx:{cursor:"pointer"},children:"Load diff"}),"This file was deleted."]})]})})]})}function ie(){return(0,u.jsx)(P.Z,{as:"svg","aria-hidden":"true",className:"width-full",viewBox:"0 0 340 84",xmlns:"http://www.w3.org/2000/svg",sx:{height:"84",maxWidth:"340px"},children:(0,u.jsx)(P.Z,{as:"path",className:"js-diff-placeholder",clipPath:"url(#diff-placeholder)",d:"M0 0h340v84H0z",fillRule:"evenodd",sx:{fill:"canvas.subtle"}})})}try{r7.displayName||(r7.displayName="DiffEntry")}catch{}try{ie.displayName||(ie.displayName="DiffPlaceholderSvg")}catch{}function it({deleteInfo:e,webCommitInfo:t}){let{path:n}=(0,_.Br)(),{helpUrl:r}=(0,_.Ou)(),i=(0,m.H)();return t.shouldFork||t.shouldUpdate||t.lockedOnMigration?(0,u.jsx)(r6.P,{binary:!1,helpUrl:r,webCommitInfo:t}):(0,u.jsxs)(P.Z,{sx:{maxWidth:"1280px",mx:"auto"},children:[(0,u.jsx)(M.Z,{as:"h1",className:"sr-only",children:`Deleting ${e.isBlob?"":"directory "}${i.name}/${n}. Commit changes to save.`}),(0,u.jsx)(r4.G7,{}),t.forkedRepo&&(0,u.jsx)(r8.r,{forkName:t.forkedRepo.name,forkOwner:t.forkedRepo.owner}),e.truncated&&(0,u.jsx)(rw.Z,{variant:"warning",className:"mb-2",children:"The diff you're trying to view is too large. We only load the first 1000 changed files."}),e.diffs.map((e,t)=>(0,u.jsx)(r7,{diff:e,index:t},t))]})}try{it.displayName||(it.displayName="DeleteViewContent")}catch{}var ir=n(48092);let ii=v.forwardRef(({expanded:e,onToggleExpanded:t,className:n,ariaControls:r},i)=>{let{toggleTreeShortcut:a}=(0,I.bx)(),[l]=(0,eY.D)(()=>!1,!0,[]);return(0,u.jsxs)(u.Fragment,{children:[(!e||l)&&(0,u.jsx)(nh.r,{"aria-label":"Expand file tree",leadingVisual:G.ArrowLeftIcon,"data-hotkey":a.hotkey,"data-testid":"expand-file-tree-button-mobile",ref:i,onClick:t,variant:"invisible",sx:{color:"fg.muted",px:2,display:"none","@media screen and (max-width: 768px)":{display:"block"}},children:"Files"}),(0,u.jsx)(ir.V,{dataHotkey:a.hotkey,className:n,expanded:e,alignment:"left",ariaLabel:e?"Collapse file tree":"Expand file tree",tooltipDirection:"se",testid:"file-tree-button",ariaControls:r,ref:i,onToggleExpanded:t,sx:{height:"32px",position:"relative","@media screen and (max-width: 768px)":{display:!e||l?"none":"flex"}}}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:a.hotkey,onButtonClick:t,onlyAddHotkeyScopeButton:!0})]})});ii.displayName="ExpandFileTreeButton";var ia=n(13275),il=n(8677),io=n(12464);function is({sx:e,onClick:t}){let{searchShortcut:n}=(0,I.bx)();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(U.h,{"aria-label":"Search this repository",icon:G.SearchIcon,"data-hotkey":n.hotkey,sx:{color:"fg.subtle",fontSize:14,fontWeight:"normal",flexShrink:0,...e},size:"medium",onClick:e=>{t?.(),(0,tk.n)({retainScrollPosition:!0,returnTarget:e.target.closest("button")})}}),(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:n.hotkey,onButtonClick:()=>{let e=document.getElementById(eE.KG);t?.(),(0,tk.n)({retainScrollPosition:!0,returnTarget:e??void 0})},onlyAddHotkeyScopeButton:!0})]})}try{is.displayName||(is.displayName="SearchButton")}catch{}let ic=(0,v.createContext)({knownFolders:new Map,dispatchKnownFolders:()=>{}});try{ic.displayName||(ic.displayName="FileTreeContext")}catch{}var id=n(24815),iu=n(29065),ih=n(3117),im=n(70697);function ip(e,t,n){e.data.name=e.data.name.slice(e.data.name.lastIndexOf("/")+1,e.data.name.length);let r=t.name.slice(0,t.name.lastIndexOf("/")),i=r.indexOf("/")>-1,a={path:t.path.slice(0,t.path.lastIndexOf("/")),contentType:t.contentType,name:r,hasSimplifiedPath:i},l={items:[e],data:a};return(n.set(a.path,l),i)?ip(l,{...a},n):l}function ix(e,t,n){if(!e)return{newRootItems:n,rootItemsUpdated:!1};let r=!!e[""]&&iy("",t,n,e[""].items);for(let n of Object.keys(e).sort())if(n){let r=t.get(n);r&&(iy(n,t,r.items,e[n].items),r.data.totalCount=e[n].totalCount)}return{newRootItems:n,rootItemsUpdated:r}}function iy(e,t,n,r){let i=!1;for(let a of r){let r=e?`${e}/${a.name}`:a.name;if(!t.get(r)){let e={items:[],data:{...a}};if(t.set(r,e),a.hasSimplifiedPath){let r=ip(e,a,t),l=n.findIndex(e=>e.data.path===r.data.path);-1!==l?r.items.length>n[l].items.length&&(n[l]=r,i=!0):n.push(r)}else n.push(e)}}return i}function ig({isActive:e,file:t,onItemSelected:n,getItemUrl:r,selectedItemRef:i,navigate:a,onRenderRow:l}){let{sendRepoClickEvent:o}=(0,L.a)(),s=v.useRef(null),c=(0,iu.a)({focusRowRef:s,mouseRowRef:s}),d="submodule"===t.data.contentType,h=v.useCallback(i=>{d?(i.preventDefault(),t.data.submoduleUrl&&(window.location.href=t.data.submoduleUrl)):i.metaKey||i.ctrlKey||1===i.button?(window.open(r(t.data),"_blank"),i.preventDefault()):e?i.preventDefault():(n?.(),o("FILES_TREE.ITEM",{item_path:t.data.path}),a(r(t.data)),i.stopPropagation())},[t.data,r,e,d,a,n,o]);return l?.(),(0,u.jsxs)(J.L.Item,{ref:s,onSelect:h,current:e,id:`${t.data.path}-item`,containIntrinsicSize:e?void 0:"auto 2rem",children:[(0,u.jsx)(J.L.LeadingVisual,{children:d?(0,u.jsx)(G.FileSubmoduleIcon,{}):(0,u.jsx)(G.FileIcon,{})}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{ref:i,style:{color:d?"var(--fgColor-accent, var(--color-accent-fg))":void 0},children:t.data.name}),c&&(0,u.jsx)(id.u,{"data-testid":`${t.data.name}-item-tooltip`,id:`${t.data.name}-item-tooltip`,contentRef:s,"aria-label":t.data.name,open:!0,direction:"ne"})]})]})}let ib=v.memo(ig);function iv({directory:e,isActive:t,isAncestorOfActive:n,leadingPath:r="",onItemSelected:i,dispatchKnownFolders:a,getItemUrl:l,selectedItemRef:o,navigate:s,onRenderRow:c}){let[d,h]=(0,v.useState)(n),{sendRepoClickEvent:m}=(0,L.a)(),p=v.useRef(null),f=v.useRef(null),x=(0,iu.a)({focusRowRef:f,mouseRowRef:p}),y=v.useCallback(n=>{n.metaKey||n.ctrlKey||1===n.button?(window.open(l(e.data),"_blank"),n.preventDefault()):t?n.preventDefault():(i?.(),m("FILES_TREE.ITEM",{item_path:e.data.path}),s(l(e.data)),n.stopPropagation())},[e.data,l,t,s,i,m]),[g,b,j,w,N,C,k]=function(e,t,n){let[r,i]=v.useState(e.items),[a,l]=v.useState(e.data.totalCount||0),[o,s]=v.useState(!1),[c,d]=v.useState(!1),{safeSetTimeout:u}=(0,im.Z)();v.useEffect(()=>{i(e.items)},[e.items]),v.useEffect(()=>{void 0!==e.data.totalCount&&l(e.data.totalCount)},[e.data.totalCount]);let h=v.useCallback(()=>{d(!1)},[]),m=v.useCallback((e,t)=>{let n=e||[...r];i(n.slice(0,100)),u(()=>{i(n),void 0!==t&&l(t)},1)},[r,u]),p=v.useCallback(async()=>{let r=n(e.data),a=new Map;d(!1),s(!0);let o=Date.now(),c=await (0,eF.v)(`${r}?noancestors=1`);try{if(c.ok){let n=await c.json(),r=n.payload.tree.items.map(e=>{let t={items:[],data:{...e},autoExpand:"directory"===e.contentType&&1===n.payload.tree.items.length};if(a.set(e.path,t),e.hasSimplifiedPath){let n=ip(t,e,a);return n}return t});t({type:"add",folders:a,processingTime:Date.now()-o}),e.items=r,e.data.totalCount=n.payload.tree.totalCount,r.length>100?m(r,n.payload.tree.totalCount):(i(r),l(n.payload.tree.totalCount))}else d(!0)}catch{d(!0)}s(!1)},[n,e,t,m]);return[p,m,r,o,c,h,a]}(e,a,l),S=k-j.length,_=r?`${r}/`:"",I=v.useCallback(r=>{let i=r&&!d;!i||w||N||(e.items.length>100?b():0!==e.items.length||t||n||g()),r!==d&&h(r)},[d,w,N,e.items.length,t,n,b,g]);v.useEffect(()=>{n&&!d&&I?.(!0)},[n]),v.useEffect(()=>{0===e.items.length&&d?I?.(!1):!d&&e.autoExpand&&I?.(!0)},[e.items.length]);let R=v.useCallback(e=>{o&&t&&o(e),p.current=e},[o,t]);return 1===e.items.length&&"directory"===e.items[0].data.contentType?(0,u.jsx)(iN,{directoryItems:e.items,leadingPath:_+e.data.name,inheritsActive:t,dispatchKnownFolders:a,onItemSelected:i,selectedItemRef:o}):(c?.(),(0,u.jsxs)(J.L.Item,{ref:f,expanded:d,onExpandedChange:I,current:t,onSelect:y,id:`${e.data.path}-item`,containIntrinsicSize:t?void 0:"auto 2rem",children:[(0,u.jsx)(J.L.LeadingVisual,{children:(0,u.jsx)(J.L.DirectoryIcon,{})}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("span",{ref:R,children:[_,e.data.name]}),x&&(0,u.jsx)(id.u,{"data-testid":`${e.data.name}-directory-item-tooltip`,id:`${e.data.name}-directory-item-tooltip`,contentRef:f,"aria-label":`${_}${e.data.name}`,open:!0,direction:"ne"})]}),(0,u.jsx)(J.L.SubTree,{state:w?"loading":N?"error":"done",children:N?(0,u.jsx)(J.L.ErrorDialog,{onRetry:g,onDismiss:C,children:"There was an error loading the folder contents."}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(iN,{directoryItems:j,dispatchKnownFolders:a,onItemSelected:i,selectedItemRef:o}),S>0&&(0,u.jsx)(ik,{message:`${S} entries not shown`})]})})]}))}let ij=v.memo(iv);function iw({directoryItems:e,leadingPath:t,inheritsActive:n,onItemSelected:r,dispatchKnownFolders:i,selectedItemRef:a,onRenderRow:l}){let{path:o}=(0,_.Br)(),{getItemUrl:s}=(0,E.B)(),c=(0,eR.s)(),d=v.useRef(c);return(0,u.jsx)(u.Fragment,{children:e.map(e=>{let c=o===e.data.path,h=c||o.startsWith(`${e.data.path}/`);return"directory"===e.data.contentType?(0,u.jsx)(ij,{isActive:n||c,isAncestorOfActive:h,onItemSelected:r,leadingPath:t,directory:e,dispatchKnownFolders:i,getItemUrl:s,selectedItemRef:h?a:void 0,navigate:d.current,onRenderRow:l},e.data.name):(0,u.jsx)(ib,{onItemSelected:r,file:e,isActive:c,getItemUrl:s,selectedItemRef:c?a:void 0,navigate:d.current,onRenderRow:l},e.data.name)})})}let iN=v.memo(iw);function iC(e){let{data:t,rootItems:n,setRootItems:r,fetchError:i,processingTime:a,loading:l,onRenderRow:o}=e,{knownFolders:s,dispatchKnownFolders:c}=(0,v.useContext)(ic),d=(0,ih.T)();v.useEffect(()=>{if(l)return;let e=new Map,i=[];d.current||(e=new Map(s),i=n.slice());let{newRootItems:o,rootItemsUpdated:u}=ix(t,e,i);(o.length>n.length||u||d.current)&&r(o),(e.size>s.size||d.current)&&c({type:"set",folders:e,processingTime:a}),d.current=!1},[t,l]);let h=v.useCallback(e=>{1===e.button&&e.preventDefault()},[]);return(0,u.jsx)(P.Z,{onMouseDown:h,sx:{px:3,pb:2},"data-testid":"repos-file-tree-container",children:l?(0,u.jsx)(P.Z,{sx:{display:"flex",justifyContent:"center",p:2},children:(0,u.jsx)(rn.Z,{"aria-label":"Loading file tree"})}):(0,u.jsx)("nav",{"aria-label":"File Tree Navigation",children:(0,u.jsxs)(J.L,{"aria-label":"Files",children:[i&&(0,u.jsx)(ik,{message:"Some files could not be loaded."}),(0,u.jsx)(iN,{directoryItems:n,onItemSelected:e.onItemSelected,dispatchKnownFolders:c,selectedItemRef:e.selectedItemRef,onRenderRow:o})]})})})}function ik({message:e}){return(0,u.jsxs)(J.L.Item,{id:"error-tree-row",children:[(0,u.jsx)(J.L.LeadingVisual,{children:(0,u.jsx)(K.Z,{icon:G.AlertFillIcon,sx:{color:"attention.fg"}})}),(0,u.jsx)(P.Z,{sx:{color:"fg.muted"},children:e||"Couldn't load."})]})}try{ig.displayName||(ig.displayName="WrappedFileTreeRow")}catch{}try{ib.displayName||(ib.displayName="FileTreeRow")}catch{}try{iv.displayName||(iv.displayName="WrappedDirectoryTreeRow")}catch{}try{ij.displayName||(ij.displayName="DirectoryTreeRow")}catch{}try{iw.displayName||(iw.displayName="WrappedDirectoryContents")}catch{}try{iN.displayName||(iN.displayName="DirectoryContents")}catch{}try{iC.displayName||(iC.displayName="ReposFileTreeView")}catch{}try{ik.displayName||(ik.displayName="ErrorTreeRow")}catch{}let iS=y._G.xxxlarge;function i_({collapseTree:e,showTree:t,fileTree:n,treeToggleElement:r,treeToggleRef:i,onItemSelected:a,processingTime:l,searchBoxRef:o,repo:s,path:c,refInfo:d,isFilePath:h,foldersToFetch:m,id:p,onFindFilesShortcut:f}){let{openPanel:x}=(0,eC.F)(),[b,j]=v.useState(m.length>0),[w,N]=v.useState(!1),C=v.useRef([]),k=v.useRef(null),_=v.useRef(!1),I=v.useRef(!1),R=v.useRef(null),{getItemUrl:L}=(0,E.B)(),{query:T}=(0,S.aM)(),{codeCenterOption:Z}=(0,g.OY)(),B=v.useRef(x),[D]=(0,eY.D)(()=>!1,!0,[]),O=[],F=new Map,A=v.useRef(b);if(!A.current&&n){let e=ix(n,F,[]);O=e.newRootItems}A.current=!0;let[z,H]=v.useReducer(iI,F),[W,V]=v.useState(O);v.useEffect(()=>{t&&(!T||window.innerWidth>=y._G.large)||(R.current=null)},[t,T]),v.useEffect(()=>{x&&B.current!==x&&window.innerWidth{let t=L({contentType:"directory",path:e,name:e});try{let r=await (0,eF.v)(`${t}?noancestors=1`);if(r.ok){let t=await r.json(),i={items:t.payload.tree.items,totalCount:t.payload.tree.totalCount};n[e]=i}else N(!0)}catch{N(!0)}C.current.push(e),C.current.length===m.length&&j(!1)},[n,m.length,L]);v.useEffect(()=>{if(m&&!_.current)for(let e of m)q(e);_.current=!0},[q,m,z.size]);let Y=v.useCallback(e=>{t&&(!T||window.innerWidth>=y._G.large)&&k.current&&e&&(0,ia.z)(e,k.current,{endMargin:window.innerHeight/2,startMargin:window.innerHeight/2,behavior:"auto"})},[T,t]),X=v.useCallback(e=>{e&&I.current?I.current=!1:R.current!==e&&Y(e),R.current=e},[Y]),Q=v.useCallback(e=>{k.current=e;let t=window.innerWidth;t>=iS&&Y(R.current)},[Y]),J=v.useCallback(e=>{e&&Y(R.current)},[Y]),{screenSize:ee}=(0,y.eI)(),et=!D&&(x&&ee=y._G.large,en=v.useCallback(()=>{et||a(),I.current=!0},[a,et]),er=t?{}:{display:"none"},ei=h?c.substring(0,c.lastIndexOf("/")):c,ea=(0,v.useMemo)(()=>({knownFolders:z,dispatchKnownFolders:H}),[z]),el=v.useMemo(()=>D?null:(0,io.oD)(),[D]),eo=v.useCallback(()=>{window.innerWidth>y._G.large&&window.innerWidth0;return(0,ew.qP)("file-tree",{"fetch-count":n?t.folders.size-e.size:t.folders.size,"file-count":t.folders.size,"nav-type":n?"soft":"hard","processing-time":t.processingTime}),t.folders}case"add":{let n=new Map([...e,...t.folders]);return(0,ew.qP)("file-tree",{"fetch-count":t.folders.size,"file-count":n.size,"nav-type":"fetch","processing-time":t.processingTime}),n}default:throw Error(`Unknown action type: ${t.type}`)}}function iR({scrollingRef:e}){let[t,n]=v.useState(e.current&&e.current.scrollTop>0);return v.useEffect(()=>{if(e.current){let t=e.current,r=()=>{t&&t.scrollTop>0?n(!0):n(!1)};return t.addEventListener("scroll",r),()=>{t.removeEventListener("scroll",r)}}},[e]),t?(0,u.jsx)(P.Z,{sx:{borderBottom:"1px solid",borderColor:"border.default",boxShadow:"0 3px 8px rgba(0, 0, 0, 0.3)"}}):null}try{i_.displayName||(i_.displayName="ReposFileTreePane")}catch{}try{iR.displayName||(iR.displayName="TreeBorder")}catch{}var iL=n(12484),iE=n(77149),iT=n(96463),iZ=n(54431),iB=n(94614);function iD({openPanel:e,readme:t,setOpenPanel:n,stickyHeaderHeight:r}){let{displayName:i,errorMessage:a,richText:l,headerInfo:o,timedOut:s}=t,{toc:c}=o||{},d=(0,m.H)(),{refInfo:h,path:p}=(0,_.Br)(),f=p&&"/"!==p?`${p}/${i}`:i;return(0,u.jsxs)(P.Z,{sx:{minWidth:0,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:3},children:[(0,u.jsxs)(P.Z,{id:"readme",sx:{borderColor:"border.default",borderWidth:1,borderStyle:"solid",borderRadius:2,width:"toc"===e?"65%":"100%"},children:[(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:2,pr:2,pl:3,py:2,borderBottom:"1px solid",borderColor:"border.default"},children:[(0,u.jsx)(M.Z,{as:"h2",sx:{fontSize:1,flexGrow:1},children:(0,u.jsx)(ed.Z,{sx:{color:"fg.default","&:hover":{color:"accent.fg"}},href:"#readme",children:i})}),h.canEdit&&(0,u.jsx)(iB.w,{editPath:(0,ep.Qi)({repo:d,commitish:h.name,action:"edit",path:f}),editTooltip:"Edit README"}),(0,u.jsx)(n2,{toc:c,openPanel:e,setOpenPanel:n,isDirectoryReadme:!0})]}),(0,u.jsx)(iZ.e,{richText:l,errorMessage:a,path:f,stickyHeaderHeight:r,timedOut:s})]}),"toc"===e&&(0,u.jsx)(rf.s,{sx:{height:"fit-content",width:"35%"},children:(0,u.jsx)(n7.Z,{onClose:()=>{n(void 0)},toc:c})})]})}try{iD.displayName||(iD.displayName="DirectoryReadmePreview")}catch{}function iO({showTree:e,treeToggleElement:t}){let n=(0,v.useRef)(null),r=(0,eO.X)(n),i=(0,eO.V)();return(0,u.jsx)(P.Z,{className:"react-blob-view-header-sticky",sx:{...i,zIndex:r?1:0},ref:n,children:(0,u.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",backgroundColor:"canvas.subtle",borderBottom:r?"1px solid var(--borderColor-default, var(--color-border-default))":"none",overflow:"hidden"},children:(0,u.jsx)(nf,{isStickied:r,showTree:e,treeToggleElement:t})})})}try{iO.displayName||(iO.displayName="FolderViewHeader")}catch{}function iF({tree:e,showTree:t,treeToggleElement:n}){let{openPanel:r,setOpenPanel:i}=(0,eC.F)();return(0,u.jsxs)(rj.J,{payload:e,children:[(0,u.jsx)(ev.d,{}),e.showBranchInfobar&&(0,u.jsx)(iT.S,{fallback:(0,u.jsx)(iL.y,{}),children:(0,u.jsx)(iL.e,{})}),(0,u.jsx)(iO,{showTree:t,treeToggleElement:n}),(0,u.jsxs)(P.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,u.jsx)(iE.t,{}),e.readme&&(0,u.jsx)(iD,{openPanel:r,setOpenPanel:i,readme:e.readme,stickyHeaderHeight:50})]})]})}try{iF.displayName||(iF.displayName="FileTreeViewContent")}catch{}var iA=n(72051);let i$=(0,v.lazy)(()=>Promise.all([n.e("vendors-node_modules_github_selector-observer_dist_index_esm_js"),n.e("vendors-node_modules_primer_react_lib-esm_SelectPanel_SelectPanel_js"),n.e("vendors-node_modules_lit-html_lit-html_js"),n.e("vendors-node_modules_tanstack_query-core_build_modern_queryClient_js-node_modules_tanstack_re-d87a32"),n.e("vendors-node_modules_codemirror_lib_codemirror_js"),n.e("vendors-node_modules_primer_react_lib-esm_UnderlineNav_index_js"),n.e("vendors-node_modules_tanstack_react-query_build_modern_useQuery_js"),n.e("vendors-node_modules_buffer_index_js"),n.e("vendors-node_modules_js-yaml_index_js-node_modules_leven_index_js"),n.e("vendors-node_modules_cronstrue_dist_cronstrue_js"),n.e("vendors-node_modules_github_text-expander-element_dist_index_js"),n.e("vendors-node_modules_codemirror_autocomplete_dist_index_js-node_modules_codemirror_search_dis-aafe81"),n.e("vendors-node_modules_jsonc-parser_lib_esm_main_js"),n.e("vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_codemirror_lin-8f5795"),n.e("app_assets_modules_github_editor_codemirror-linter-util_ts-app_assets_modules_github_editor_y-89a4a6"),n.e("app_assets_modules_github_editor_yaml-editors_workflow_workflow-rules_ts"),n.e("app_assets_modules_react-code-view_components_blob-edit_WebCommitDialog_tsx"),n.e("app_assets_modules_github_editor_yaml-editors_dependabot_dependabot-rules_ts"),n.e("app_assets_modules_react-code-view_components_blob-edit_BlobEditor_tsx")]).then(n.bind(n,26413)));function iP({initialPayload:e}){let t;let n=(0,R.U)(e),r=(0,m.H)(),{path:i}=n,a=(0,z.f)(n.refInfo),l=(0,Z.OH)(n),o=(0,Z.Kg)(n),s=(0,Z.K$)(n),c=(0,Z.XU)(n),[d,h]=(0,v.useState)(null),f=(0,nv.Ez)(r,a,i,n.error?.httpStatus===404),x=(0,iA.AB)(r,a,i,n.error?.httpStatus===404,o||s?n.blob.rawLines?.length??1e5:1e5),b=v.useRef(!1),j=v.useRef(null),E=v.useRef(!1),H=v.useRef(!1),W=v.useRef(null),G=v.useRef(null),U="repos-file-tree",V=v.useRef(),[K,q]=(0,v.useState)(""),{toggleFocusedPaneShortcut:Y}=(0,I.bx)();(0,O.p)(!1),(0,v.useEffect)(()=>()=>(0,O.p)(!0),[]),(0,F.V)(!0);let X=v.useMemo(()=>(0,T.r8)(n),[n.path,n.refInfo.currentOid]),{isTreeExpanded:Q,collapseTree:J,expandTree:ee,treeToggleElement:et,treeToggleRef:en,searchBoxRef:er}=function(e,t,n){let{sendRepoClickEvent:r}=(0,L.a)(),i=eA(),a=(0,p.x)(),l=(0,B.ej)("fileTreeExpanded"),o=!(void 0!==D.n4),s=!a&&l&&"false"!==l.value||a&&n;void 0===s&&(s=!1);let c=(0,v.useRef)(null),d=(0,v.useRef)(null),{screenSize:h}=(0,y.eI)(),[m,f]=(0,v.useState)(s),x=(0,v.useRef)(s),g=(0,v.useRef)(!1),b=(0,v.useRef)(!1),j=(0,v.useCallback)(()=>!(t.current&&window.innerWidth>=iS||!t.current&&window.innerWidth>=y._G.xlarge),[t]);(0,A.b)(()=>{let e=j();e||(g.current=!1);let t=(0,N.$)()&&h{let e=!t.current&&window.innerWidth=y._G.xlarge;e&&x.current&&!(0,N.$)()&&m&&f(!1),n&&x.current&&!m&&f(!0)},[t,h]),(0,A.b)(()=>{let e=t.current&&window.innerWidth=iS;e&&x.current&&!(0,N.$)()&&m&&f(!1),n&&x.current&&!m&&f(!0)},[t]);let w=(0,v.useCallback)(e=>{if(f(!0),j()&&(g.current=!0),e?.setCookie){i(!0,null,null),x.current=!0;let e=new Date(new Date().getTime()+2592e6).toUTCString();(0,B.d8)("fileTreeExpanded","true",e)}e?.focus==="toggleButton"?requestAnimationFrame(()=>c.current?.focus()):e?.focus==="search"&&requestAnimationFrame(()=>d.current?.focus())},[2592e6,j,i]),C=(0,v.useCallback)(e=>{if(f(!1),g.current=!1,b.current=!0,e?.setCookie){i(!1,null,null),x.current=!1;let e=new Date(new Date().getTime()+2592e6).toUTCString();(0,B.d8)("fileTreeExpanded","false",e)}e?.focus==="toggleButton"&&requestAnimationFrame(()=>c.current?.focus())},[2592e6,i]),k=(0,v.useCallback)(e=>e&&window.innerWidth>=iS||!t.current&&window.innerWidth>=y._G.xlarge,[t]),S=(0,v.useMemo)(()=>(0,u.jsx)(M.Z,{as:"h2",sx:{display:"flex",fontSize:1},children:(0,u.jsx)(ii,{expanded:m,ariaControls:e,onToggleExpanded:()=>{r(m?"FILES_TREE.HIDE":"FILES_TREE.SHOW"),m?C({focus:"toggleButton",setCookie:k(t.current)}):w({focus:"toggleButton",setCookie:k(t.current)})},className:void 0!==l||m||o?void 0:"react-tree-toggle-button-with-indicator",ref:c})}),[m,e,l,r,C,k,t,w,o]);return{isTreeExpanded:m,expandTree:w,collapseTree:C,treeToggleElement:S,treeToggleRef:c,searchBoxRef:d}}(U,V,n.treeExpanded),ei=(0,v.useCallback)(()=>{window.innerWidth{if(!window.location.hash&&window.scrollY>0){let e=document.querySelector("#StickyHeader");e&&(e.style.position="relative",e.scrollIntoView(),e.style.position="sticky")}},[n.path]);let{codeCenterOption:eo}=(0,g.OY)(),es=v.useCallback(()=>{window.innerWidth(function(){let e=document.getElementById(ex),t=document.getElementById(eE.KG);if(document.activeElement?.id===eE.KG&&(H.current=!0),d?.contains(document.activeElement)&&!H.current?E.current=!0:j.current?.contains(document.activeElement)&&(E.current=!1),E.current||H.current){if(H.current){let t=W.current||e||d;E.current=!0,H.current=!1,t?.focus()}else{let e=G.current||j.current;W.current=d?.contains(document.activeElement)?document.activeElement:null,E.current=!1,H.current=!1,e?.focus()}}else G.current=j.current?.contains(document.activeElement)?document.activeElement:null,E.current=!1,(t||d)?.focus()})()})]})]})})})})})}function iM(){let e=(0,E.B)(),{permalinkShortcut:t}=(0,I.bx)();return e.isCurrentPagePermalink()?(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:t.hotkey,buttonTestLabel:"header-permalink-button",onlyAddHotkeyScopeButton:!0,onButtonClick:()=>{}}):(0,u.jsx)(eN,{buttonFocusId:eE.KG,buttonHotkey:t.hotkey,buttonTestLabel:"header-permalink-button",onButtonClick:()=>{let t=e.createPermalink();0>window.location.href.indexOf(t)&&window.history.pushState(null,document.title,t)}})}try{i$.displayName||(i$.displayName="BlobEditor")}catch{}try{iP.displayName||(iP.displayName="CodeView")}catch{}try{iM.displayName||(iM.displayName="PermalinkShortcut")}catch{}(0,d.g)("react-code-view",()=>({App:j,routes:[(0,c.g)({path:"/:owner/:repo/tree/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/blob/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/blame/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/edit/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/new/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/new/:branch/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/tree/delete/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/delete/:branch/:path/*",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo",Component:iP,shouldNavigateOnError:!0}),(0,c.g)({path:"/:owner/:repo/tree/:branch/*",Component:iP,shouldNavigateOnError:!0})]}))},81568:(e,t,n)=>{n.d(t,{u:()=>l});var r=n(71207),i=n(67294),a=n(65302);function l(e,t,n,l,o){let s=(0,i.useRef)(null),c=(0,a.$L)(),d=!(void 0!==r.n4),u=(0,a.Ub)(),h=(0,i.useMemo)(()=>{let{isEndLine:r,isStartLine:i,lineNumber:a}=e,s=0,c=1,h=r&&!d?new IntersectionObserver(e=>{for(let{target:t,isIntersecting:n,intersectionRatio:r}of e)if(t){let{currentY:e,currentRatio:i}=function(e,t,n,r,i,a,l,o){let s=n.getBoundingClientRect().y,c=i?a(i):void 0,d=window.innerHeight-n.getBoundingClientRect().bottom>0,u=n.getBoundingClientRect().bottom>0,h=n.getBoundingClientRect().top<150,m=d&&u,p=window.innerHeight-n.getBoundingClientRect().bottom>150&&window.innerHeight>300;for(let n of c||[])n&&m&&(st&&l||o(n,!0):s>e&&l&&(r{for(let{target:n,isIntersecting:r,intersectionRatio:i}of t)if(n){let{currentY:t,currentRatio:a}=function(e,t,n,r,i,a,l){let o=r.getBoundingClientRect().y,s=window.innerHeight-r.getBoundingClientRect().bottom>0,c=r.getBoundingClientRect().bottom>0,d=r.getBoundingClientRect().top<150&&r.getBoundingClientRect().top>-300,u=0===r.getBoundingClientRect().bottom&&0===r.getBoundingClientRect().top&&0===r.getBoundingClientRect().height&&0===r.getBoundingClientRect().width&&0===r.getBoundingClientRect().x&&0===r.getBoundingClientRect().y;return!e.ownedSection||e.ownedSection?.collapsed||(o<=t&&(s&&c||d)&&!u?i>n&&a||d&&l(e,!1):o>t&&a&&(i{s.current=e},[]);return(0,i.useEffect)(()=>{let{isStartLine:t,lineNumber:n,ownedSection:r}=e;return t&&s&&r&&h&&!h.hasBeenObserved&&!h.hasBeenDisconnected&&c(r.endLine,{lineNumber:n}),h&&s.current&&!h.hasBeenObserved&&(h.observe(s.current),h.hasBeenObserved=!0),()=>{h&&(h.disconnect(),h.hasBeenDisconnected=!0)}},[h,e]),m}},8308:(e,t,n)=>{n.d(t,{i:()=>s});var r=n(23180),i=n(67294),a=n(23960),l=n(20299),o=n(40149);function s(){let{sendRepoClickEvent:e}=(0,r.a)(),{rawBlobUrl:t}=(0,o.G)(),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{n.current=navigator.userAgent.toLowerCase().indexOf("firefox")>-1},[]),(0,i.useCallback)(async()=>{e("BLOB_RAW_DROPDOWN.COPY");try{let e=(0,l.Z$)(t);if((0,l.Jj)()&&navigator&&navigator.clipboard&&"write"in navigator.clipboard&&!n.current)await navigator.clipboard.write([new ClipboardItem({"text/plain":e})]);else{let t=await e;if(!t)return l.BN.Error;await (0,a.z)(await t.text())}}catch(e){return l.BN.Error}return l.BN.Success},[n,e,t])}},68912:(e,t,n)=>{n.d(t,{G:()=>s});var r=n(46263),i=n(46565),a=n(63451),l=n(67294),o=n(89250);function s(e,t=20){let[n,s]=(0,l.useState)(t),c=(0,l.useRef)(t),d=(0,i.OY)().codeWrappingOption,u=(0,o.TH)();return(0,a.b)(()=>{let n=document.getElementById("file-name-id-wide");if(!n)return;let i=new ResizeObserver((0,r.D)(()=>{let n=document.getElementsByClassName(e)[0]?.firstChild?.getBoundingClientRect().height??t;n>100&&(n=document.getElementsByClassName(e)[0]?.firstChild?.firstChild?.getBoundingClientRect().height),0===n||n===c.current||d.enabled||(s(n),c.current=n)}));return i.observe(n),()=>i.disconnect()},[u.key,d.enabled,e,t]),n}},23239:(e,t,n)=>{n.d(t,{NC:()=>R,O$:()=>g,RP:()=>E,Sg:()=>x,Tw:()=>k,gk:()=>I,i$:()=>S,jn:()=>y,nJ:()=>_,nj:()=>L,rU:()=>b});var r=n(4181),i=n(34449),a=n(15631),l=n(46565),o=n(20679),s=n(67294),c=n(89250),d=n(95475),u=n(72051),h=n(64227),m=n(37086),p=n(68912),f=n(78135);let x=7.2293,y=92,g=92,b=70,v=new r.fA(1),j=new r.fA(0),w=new r.fA(1),N=new r.fA(0),C=new r.fA(!1);function k(){return(0,i.iu)(v)}function S(){return(0,i.iu)(w)}function _(){return(0,i.iu)(C)}function I(){let e=(0,s.useRef)(null);function t(){e.current={start:{line:v.value,column:j.value+1},end:{line:w.value,column:N.value+1}}}return(0,i.mU)(v,t),(0,i.mU)(j,t),(0,i.mU)(w,t),(0,i.mU)(N,t),e}function R(e){C.value=e}function L(e){let t=(0,l.OY)().codeWrappingOption.enabled,n=!!(0,m.Q)(),[r]=(0,a.D)(()=>!1,!0,[]);return!t&&!n&&!e&&!r}function E(e,t,n,r,i,a,l,m,k,S,_,I){let R=(0,s.useRef)(0),L=(0,s.useRef)(0),E=(0,s.useRef)(0),T=(0,s.useRef)(0),Z=(0,s.useRef)(0),B=(0,s.useRef)(0),D=(0,s.useRef)(null),O=(0,s.useRef)(0),F=(0,s.useRef)(0),A=(0,s.useRef)(15),$=(0,s.useRef)(0),P=l?g:y,M=(0,o.f)(["windows"]),z=M?6.6:x,H=(0,p.G)("react-line-numbers"),{stylingDirectives:W}=(0,u.H2)(),G=(0,s.useMemo)(()=>{let e=[];for(let t=0;t{let t=v.value!==w.value,n={start:{line:v.value,column:t?j.value+1:null},end:{line:w.value,column:t?N.value+1:null}},r={anchorPrefix:"L",blobRange:{start:n.start,end:n.end}},i=(0,d.Dw)(r);window.location.hash=i,m?.(e)},[m]),{hash:q}=(0,c.TH)();function Y(e){let t=0,n=0,r=0,i=0,a=0,l=0,o=G.length-1;for(;l<=o;){let s=Math.floor((l+o)/2);if(r=G[s]+1,i=s>0?G[s-1]+1:0,a=s=i&&e=r&&e=a&&(l=s+1)}return{line:t,offset:n}}function X(e,t,n,r,i){R.current=e,L.current=n,E.current=t,T.current=r,Z.current=i?e:t,B.current=i?n:r,v.value=es(e),j.value=n,w.value=es(t),N.value=r}function Q(){return R.current===Z.current&&L.current===B.current&&(R.current!==E.current||L.current!==T.current)?"start":E.current===Z.current&&T.current===B.current&&(R.current!==E.current||L.current!==T.current)?"end":"same"}function J(){if(k&&k.current){let e=k.current,t=R.current-1,n=E.current-1,r=(-1!==t?G[t]+1:0)+L.current,i=(-1!==n?G[n]+1:0)+T.current;e.selectionStart=r,e.selectionEnd=i,F.current=r,$.current=i}}function ee(){ea();let e=R.current,t=L.current;e+A.current>i.length?e=i.length-1:e+=A.current,t=er(e,t),R.current=e,L.current=t,en(),V(e*H,e),el(b)}function et(){ea();let e=R.current,t=L.current;ei.length||!i[e])return n;let r=i[e].rawText;return r&&(t>r.length?(n=r.length,U((0,h.VC)(n,r,S),n)):n=r.length&&(n=r.length,U((0,h.VC)(n,r,S),n))),n}function ei(){let e=i[Z.current];if(!e)return;let{rawText:n}=e,r=W?W[e.lineNumber-1]:e.stylingDirectivesLine;if(!n||!r)return;let a=null;for(let e of r){if((e.s??e.start)>B.current||(e.e??e.end)=D.current.scrollLeft+D.current.clientWidth?D.current.scrollBy(n*z+P-D.current.scrollLeft-D.current.clientWidth+e,0):n*z+P<=D.current.scrollLeft&&D.current.scrollBy(n*z+P-D.current.scrollLeft-D.current.clientWidth,0))}(e)),J()}function eo(){let e=Q(),t=L.current,n=R.current;"end"===e&&(t=T.current,n=E.current);let r=Math.min(es(n+5),i.length);if(!(0,h.nB)(r)){let e=(0,h.Hm)(r);null===e&&window.scrollTo(0,n*H),e&&e.getBoundingClientRect().y<0||e&&e.getBoundingClientRect().y>window.innerHeight?(e.scrollIntoView({block:"center"}),window.scrollBy(-300,0)):e&&window.scrollBy(0,100);let i=window.innerWidth;iwindow.innerHeight?(e.scrollIntoView({block:"center"}),window.scrollBy(-300,0)):e&&window.scrollBy(0,-200)}}function es(e){return i[e]?i[e].lineNumber:e}return(0,s.useEffect)(()=>{let e=window.innerHeight-200>300?window.innerHeight-200:300,t=Math.round(e/H);A.current=Math.min(Math.max(t,1),100)},[H]),(0,s.useEffect)(()=>{_&&""!==_&&(_.includes("PageUp")?et():_.includes("PageDown")&&ee())},[_]),(0,s.useEffect)(()=>{if(!I||I.start<0&&I.end<0||F.current===I.start&&$.current===I.end)return;let e=Y(I.start),t=Y(I.end);(F.current!==I.start||$.current===I.end)&&(I.keyboard||I.displayStart)?(U((0,h.VC)(e.offset,i[e.line]?.rawText??"",S),e.offset),O.current=e.offset,V(e.line*H,e.line),X(e.line,t.line,e.offset,t.offset,!0)):(U((0,h.VC)(t.offset,i[t.line]?.rawText??"",S),t.offset),O.current=t.offset,V(t.line*H,t.line),X(e.line,t.line,e.offset,t.offset,!1)),$.current=I.end,F.current=I.start,I.end!==I.start||I.keyboard||(C.value=!1,ei()),Z.current<=5&&I.keyboard&&eo()},[i,S,I]),(0,s.useEffect)(()=>{let e=(0,d.n6)(q);if(!e.blobRange?.start?.line||e.blobRange.start.line>i.length)return;let t=e.blobRange.start.line-1;R.current=t,v.value=t,j.value=0,w.value=t,N.value=0,L.current=0,E.current=t,T.current=0,O.current=0,U(L.current,L.current),V(R.current*H,R.current),el(b)},[q,i,n,r]),{onEnter:function(){C.value=!0,(0,f.gZ)(),ei()},updateUrlForLineNumber:K,onPageDown:ee,onPageUp:et,currentStartLine:R,currentStartChar:L,currentEndLine:E,currentEndChar:T,determineAndSetTextAreaCursorPosition:J,getCorrectLineNumberWithCollapsedSections:es}}},78135:(e,t,n)=>{n.d(t,{Sl:()=>a,eS:()=>o,gZ:()=>l});var r=n(67294);let i="react_blob_view_focus_symbol_pane";function a(e){let t=(0,r.useRef)(e);(0,r.useEffect)(()=>{t.current=e},[e]),(0,r.useEffect)(()=>{let t=t=>{e(t.detail?.focusSymbolSearch||!1)};return window.addEventListener(i,t),()=>{window.removeEventListener(i,t)}},[e])}function l(){window.dispatchEvent(new CustomEvent(i))}function o(){window.dispatchEvent(new CustomEvent(i,{detail:{focusSymbolSearch:!0}}))}},49272:(e,t,n)=>{n.d(t,{$w:()=>s,XT:()=>o,_X:()=>l,kl:()=>c,kq:()=>function e(t){let n=t?.textContent??"";if(""!==n)return n;if(t){let r=t.childNodes;for(let t=0;t{if(!e)return;let{lineNumber:n,ownedSection:r}=e;r&&(r.collapsed=!1),l?.(),(0,a.yw)(n),t?.(e,!0)},[e,l,t]),d=(0,i.useCallback)(()=>{if(!e)return;let{lineNumber:t,ownedSection:n}=e;n&&(n.collapsed=!0),l?.(),(0,a.rH)(t)},[e,l]);return{setShouldBeOpen:s,expandOrCollapseSection:function(){if(!e)return;let{ownedSection:t}=e;t&&(t.collapsed?(c(),(0,a.dM)("Code section expanded")):(d(),(0,a.dM)("Code section collapsed"))),s(!1,!0)},openUpRefSelector:function(){let e=document.getElementsByClassName("ref-selector-class");e&&1===e.length?(e[0]?.click(),(0,r.x)("ref selector opened")):e&&2===e.length&&(e[1]?.click(),(0,r.x)("ref selector opened")),s(!1)}}}function c(e,t={x:0,y:0}){let n=document.getElementById(l);if(!e||!n)return{display:"none"};let{top:r,left:i,height:a}=e.getBoundingClientRect(),{top:s,left:c}=n.getBoundingClientRect();return{top:`${r-s-(o-a)/2+t.y}px`,left:`${Math.max(i-c+t.x,0)-13}px`}}},57748:(e,t,n)=>{n.d(t,{D:()=>i});var r=n(67294);function i(){return(0,r.useSyncExternalStore)(o,a,l)}function a(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function l(){return!1}function o(){return()=>{}}},19435:(e,t,n)=>{n.d(t,{D:()=>i});var r=n(67294);function i(){let[e,t]=(0,r.useState)({});return(0,r.useCallback)(()=>t({}),[])}},96764:(e,t,n)=>{n.d(t,{v:()=>l,z:()=>a});var r=n(67294);let i="react_blob_view_scroll_line_into_view";function a(e){let t=(0,r.useRef)(e);(0,r.useEffect)(()=>{t.current=e},[e]),(0,r.useEffect)(()=>{let e=e=>t.current(e.detail);return window.addEventListener(i,e),()=>{window.removeEventListener(i,e)}},[])}function l(e){window.dispatchEvent(new CustomEvent(i,{detail:e}))}},54026:(e,t,n)=>{n.d(t,{TZ:()=>i,ik:()=>c,nx:()=>d});var r=n(67294);let i="repos-sticky-header",a="code_view_update_sticky_header_height_event",l=null,o=null,s=null;function c(e){e&&o!==e&&(o=e,null===l?l=new ResizeObserver(e=>{for(let t of e)t.contentRect.height!==s&&(s=t.contentRect.height,window.dispatchEvent(new CustomEvent(a,{detail:t.contentRect.height})))}):l.disconnect(),l.observe(e))}function d(){let[e,t]=(0,r.useState)(void 0);return((0,r.useEffect)(()=>{function e(e){t(e.detail)}return window.addEventListener(a,e),o&&c(o),()=>{window.removeEventListener(a,e)}},[]),void 0!==e)?e:102}},67498:(e,t,n)=>{n.d(t,{V:()=>a,X:()=>i});var r=n(67294);function i(e){let[t,n]=(0,r.useState)(!1),i=(0,r.useCallback)(e=>{let r=e[e.length-1],i=r.intersectionRatio<1;i!==t&&n(i)},[t,n]);return(0,r.useEffect)(()=>{let t=e.current,n=new IntersectionObserver(i,{threshold:[1],rootMargin:"-1px 0px 0px 0px"});return e.current&&n.observe(e.current),()=>{t&&n.unobserve(t)}},[e,i]),t}function a(){let e=r.useMemo(()=>({top:"0px",zIndex:4,background:"var(--bgColor-default, var(--color-canvas-default))",position:"sticky"}),[!0]);return e}},64227:(e,t,n)=>{n.d(t,{BS:()=>B,Bx:()=>D,DD:()=>N,DF:()=>v,H1:()=>x,Hm:()=>Z,Hq:()=>b,KG:()=>h,Nv:()=>g,PO:()=>y,TX:()=>j,VC:()=>L,Yo:()=>S,bP:()=>E,d5:()=>p,dM:()=>O,jP:()=>R,nB:()=>T,p$:()=>m,rH:()=>k,yk:()=>I,yw:()=>C});var r=n(4181),i=n(34449),a=n(71207),l=n(46565),o=n(67294),s=n(95475),c=n(81181),d=n(23239);let u="collapse-show-rows-styles",h="read-only-cursor-text-area";function m(e,t){return document.querySelector(`#${e}LC${t}`)}function p(e,t){return document.querySelector(`main #${(0,c.o)(e,t)}`)}let f=new r.n7;function x(e){return(0,i.iu)(f.has(e))}function y(e){return(0,i.mU)(f,e)}function g(){return(0,i.Yr)(f)}function b(){let e=v(),t=(0,o.useSyncExternalStore)(()=>()=>{},()=>(function(e){let t=e.toLowerCase().match(/firefox\/(\d+(\.\d+)?)/);return t&&t.length>=2&&t[1]?parseFloat(t[1]):null})(navigator.userAgent),()=>null)??0,n=(0,l.OY)().codeWrappingOption.enabled;return e&&t>=124&&!n}function v(){return(0,o.useSyncExternalStore)(()=>()=>{},()=>navigator.userAgent.toLowerCase().indexOf("firefox")>-1,()=>!1)}function j(e,t,n,r){if(!r)return"";let i="";for(let t=0;te.lineNumber&&r(e,!1)}}function C(e){_(e,!1),f.delete(e)}function k(e){_(e,!0),f.add(e)}function S(){let e=document.getElementById(u);e&&(e.textContent=""),f.clear()}function _(e,t){let n=`.${w(e-1)} { display: none; } `;if(document.getElementById(u)){let e=document.getElementById(u);if(t)e.textContent+=n;else{let t=e?.textContent||"";t=t.replace(n,""),e.textContent=t}}else{let e=document.createElement("style");e.id=u,e.textContent=n,document.head.appendChild(e)}}function I(e,t){if(e.length<3)return!1;let n=t.split(" "),r=n.includes("pl-ent")?/\n|\s|[();&.=,]/:/\n|\s|[();&.=",]/;return!(e.match(r)||n.includes("pl-c")||n.includes("pl-k"))}function R(e,t){let n=null,r=null,i=null,a=t;if(e.parentElement?.classList.contains("react-file-line"))n=e.parentElement.getAttribute("data-line-number"),r=e.parentElement,i=e;else if(e.parentElement?.parentElement?.classList.contains("react-file-line"))n=e.parentElement.parentElement.getAttribute("data-line-number"),r=e.parentElement.parentElement,i=e.parentNode;else{if(!e.parentElement?.firstElementChild?.classList.contains("react-file-line")||!(n=e.parentElement.firstElementChild.getAttribute("data-line-number"))||!parseInt(n,10))return;return{line:parseInt(n,10)-1,column:null}}if(n&&parseInt(n,10)){for(let e of r.childNodes){if(e===i)break;a+=e.textContent?.length||0}return{line:parseInt(n,10),column:0!==a?a+1:null}}}function L(e,t,n){let r=document.createElement("div");r.style.position="absolute",r.style.visibility="hidden",r.style.fontFamily="ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace",r.style.fontSize="12px",r.style.lineHeight="20px",r.style.whiteSpace="pre",r.style.tabSize=n.toString(),r.textContent=t.slice(0,e),document.body.appendChild(r);let i=r.clientWidth;return(document.body.removeChild(r),0===i&&0!==e)?e*d.Sg:i}function E(e,t,n,r,i){if(e?.start.line===n&&e?.start.column!==null){let a=(0,s.M9)({start:e.start,end:{line:e.start.line,column:e.end.line===n?e.end.column:null}},()=>t);if(a&&a.startContainer.parentElement){let r=a?.getBoundingClientRect().x-t.getBoundingClientRect().x;return{offset:r+10,width:e.end.line===n?a.getBoundingClientRect().width:void 0}}if(i){let t=L(e.start.column-1,i,r),a=e.end.line===n?e.end.column:null;return{offset:t+20,width:e.end.line===n?L(a?a-1:i.length-1,i,r)-t:void 0}}}else if(e?.end.line===n&&e?.end.column!==null){let n=(0,s.M9)({start:{line:e.end.line,column:0},end:e.end},()=>t);return n?{width:n.getBoundingClientRect().width+10}:{width:L(e.end.column-1,i,r)+10}}}function T(e){let t=m("",e);return function(e){if(!e)return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}(t)}function Z(e){return m("",e)}function B(e,t,n){return Math.floor((e-t)/n)+1}function D(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=t[i];if(!a)break;if(a.lineNumber===e)return i;a.lineNumber{n&&(n.textContent=r)},t)}},40399:(e,t,n)=>{n.d(t,{l:()=>a,p:()=>i});let r=!0;function i(e){r=e}function a(){return r}},28114:(e,t,n)=>{n.d(t,{V:()=>WebWorker});let WebWorker=class WebWorker{set onmessage(e){this.worker.onmessage=e}postMessage(e){this.worker.postMessage(e)}terminate(){this.worker.terminate()}constructor(e,t){try{this.worker=new Worker(e)}catch(e){console.warn("Web workers are not available. Please enable web workers to benefit from the improved performance."),this.worker=new MainThreadWorker(t)}}};let MainThreadWorker=class MainThreadWorker{async postMessage(e){if(this.terminated)return;let t={data:this.job({data:e})};this.onmessage?.(t)}terminate(){this.terminated=!0}constructor(e){this.job=e,this.terminated=!1}}},89909:(e,t,n)=>{function r(e){return i(e)[0]}function i(e){let t=[];for(let n of function(){try{return document.cookie.split(";")}catch{return[]}}()){let[r,i]=n.trim().split("=");e===r&&void 0!==i&&t.push({key:r,value:i})}return t}function a(e,t,n=null,r=!1,i="lax"){let a=document.domain;if(null==a)throw Error("Unable to get document domain");a.endsWith(".github.com")&&(a="github.com");let l="https:"===location.protocol?"; secure":"",o=n?`; expires=${n}`:"";!1===r&&(a=`.${a}`);try{document.cookie=`${e}=${t}; path=/; domain=${a}${o}${l}; samesite=${i}`}catch{}}function l(e,t=!1){let n=document.domain;if(null==n)throw Error("Unable to get document domain");n.endsWith(".github.com")&&(n="github.com");let r=new Date().getTime(),i=new Date(r-1).toUTCString(),a="https:"===location.protocol?"; secure":"",l=`; expires=${i}`;!1===t&&(n=`.${n}`);try{document.cookie=`${e}=''; path=/; domain=${n}${l}${a}`}catch{}}n.d(t,{$1:()=>i,d8:()=>a,ej:()=>r,kT:()=>l})},4181:(e,t,n)=>{function r(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function i(e,t){var n=r(e,t,"get");return n.get?n.get.call(e):n.value}function a(e,t,n){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}function l(e,t,n){var i=r(e,t,"set");return!function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}(e,i,n),n}n.d(t,{fA:()=>ObservableValue,n7:()=>ObservableSet,vP:()=>ObservableMap});var o=new WeakMap;let s=class ObservableBase{subscribe(e){return i(this,o).add(e),()=>{i(this,o).delete(e)}}notify(e){for(let t of i(this,o))t(e)}constructor(){a(this,o,{writable:!0,value:void 0}),l(this,o,new Set)}};var c=new WeakMap;let ObservableValue=class ObservableValue extends s{get value(){return i(this,c)}set value(e){i(this,c)!==e&&(l(this,c,e),this.notify(e))}constructor(e){super(),a(this,c,{writable:!0,value:void 0}),l(this,c,e)}};var d=new WeakMap,u=new WeakMap;let ObservableSet=class ObservableSet extends s{get value(){return i(this,d)}has(e){if(!i(this,u).has(e)){let t=new ObservableValue(i(this,d).has(e));i(this,u).set(e,t)}return i(this,u).get(e)}add(e){i(this,d).has(e)||(i(this,d).add(e),i(this,u).has(e)&&(i(this,u).get(e).value=!0),this.notify(i(this,d)))}delete(e){i(this,d).has(e)&&(i(this,d).delete(e),i(this,u).has(e)&&(i(this,u).get(e).value=!1),this.notify(i(this,d)))}clear(){if(0!==i(this,d).size){for(let e of(i(this,d).clear(),i(this,u).values()))e.value=!1;this.notify(i(this,d))}}constructor(...e){super(),a(this,d,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),l(this,u,new Map),l(this,d,new Set(...e))}};var h=new WeakMap,m=new WeakMap,p=new WeakMap;let ObservableMap=class ObservableMap extends s{get value(){return i(this,h)}has(e){if(!i(this,m).has(e)){let t=new ObservableValue(i(this,h).has(e));i(this,m).set(e,t)}return i(this,m).get(e)}get(e){if(!i(this,p).has(e)){let t=new ObservableValue(i(this,h).get(e));i(this,p).set(e,t)}return i(this,p).get(e)}set(e,t){i(this,h).get(e)!==t&&(i(this,h).set(e,t),i(this,m).has(e)&&(i(this,m).get(e).value=!0),i(this,p).has(e)&&(i(this,p).get(e).value=t),this.notify(i(this,h)))}delete(e){i(this,h).has(e)&&(i(this,h).delete(e),i(this,m).has(e)&&(i(this,m).get(e).value=!1),i(this,p).has(e)&&(i(this,p).get(e).value=void 0),this.notify(i(this,h)))}clear(){if(0!==i(this,h).size){for(let e of(i(this,h).clear(),i(this,m).values()))e.value=!1;for(let e of i(this,p).values())e.value=void 0;this.notify(i(this,h))}}constructor(...e){super(),a(this,h,{writable:!0,value:void 0}),a(this,m,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),l(this,m,new Map),l(this,p,new Map),l(this,h,new Map(...e))}}},34449:(e,t,n)=>{n.d(t,{D_:()=>d,Kq:()=>l,Yr:()=>c,iu:()=>s,mU:()=>o,yL:()=>a});var r=n(67294),i=n(4181);function a(e){let t=(0,r.useRef)(new i.fA(e));return t.current}function l(...e){let t=(0,r.useRef)(new i.vP(...e));return t.current}function o(e,t){let n=(0,r.useRef)(t);n.current=t,(0,r.useEffect)(()=>e.subscribe(e=>n.current(e)),[e])}function s(e){let[t,n]=(0,r.useState)(e.value);return o(e,e=>n(e)),t}function c(e){let[t,n]=(0,r.useState)(e.value),[i,a]=(0,r.useState)({});return o(e,e=>{n(e),a({})}),t}function d(e,t){let n=a(t(e.value));return o(e,e=>{n.value=t(e)}),n}},66308:(e,t,n)=>{n.d(t,{IQ:()=>r,Ju:()=>i,iF:()=>a});let r=e=>{if(e){if(e.startsWith("refs/tags/"))return"tag";if(e.startsWith("refs/heads/"))return"branch"}},i=(e,t)=>"branch"===t?`refs/heads/${e}`:"tag"===t?`refs/tags/${e}`:e,a=e=>{if(!e)return;let t=r(e);if(!t)return e;let[,,...n]=e.split("/");return n.join("/")}},95346:(e,t,n)=>{n.d(t,{f:()=>r});let r=e=>({"data-testid":e})},43177:(e,t,n)=>{n.d(t,{o:()=>l});var r=n(22326),i=n(87623),a=n(67294);function l(e,t,n,l){let[o,s]=(0,a.useState)({loading:!0}),c=t&&e&&n&&l?(0,r.Qi)({repo:{name:t,ownerLogin:e},commitish:n,action:"file-contributors",path:l}):null;return(0,a.useEffect)(()=>{if(!c)return;let e=!1,t=async()=>{s({loading:!0});let t=await (0,i.v)(c);if(!e)try{t.ok?s({contributors:await t.json()}):s({error:!0})}catch(e){s({error:!0})}};return t(),function(){e=!0}},[c]),o}},90044:(e,t,n)=>{n.d(t,{F:()=>i});var r=n(24533);function i(e,t){let{csrf_tokens:n}=(0,r.T)();return n?.[e]?.[t]}},19343:(e,t,n)=>{n.d(t,{V:()=>i});var r=n(67294);function i(e){(0,r.useEffect)(()=>{if(!e)return;let t=document.querySelector(".footer");if(t)return t.hidden=!0,()=>{t.hidden=!1}},[e])}},34603:(e,t,n)=>{n.d(t,{A:()=>l,F:()=>s});var r=n(67294),i=n(78720);let a=e=>e;function l(e){let t=r.useRef({}),n=r.useRef({}),l=(e,n)=>{t.current[e](n)},o=r.useRef(l);o.current=l;let s=r.useRef(new ResizeObserver(e=>{for(let t of e){let e=t.target,n="data-key",r=e.getAttribute(n);if(null===r)throw Error(`Value not found, for '${n}' attribute`);o.current(r,e)}}));r.useEffect(()=>{let e=s.current;return()=>{e.disconnect()}},[]);let{size:c,keyExtractor:d=a}=e,u=r.useMemo(()=>{let e=e=>t=>{n.current[e]&&s.current.unobserve(n.current[e]),t&&(o.current(e,t),s.current.observe(t)),n.current[e]=t},t={};for(let n=0;n(t.current[e.key]=e.measureRef,{...e,measureRef:u[e.key]}));return{...h,virtualItems:m}}var o=n(63451);function s({additionalScrollOffset:e=0,scrollToFn:t,horizontal:n,parentRef:a,useVirtualImpl:l=i.o,...s}){let c=(0,r.useRef)(window),d=(0,r.useCallback)(()=>{let e=a.current?.getBoundingClientRect(),t=e?.top??0,r=e?.left??0;return n?-1*r:-1*t},[n,a]),u=(0,r.useCallback)(t=>{let r=(a.current?.getBoundingClientRect().top??0)+window.scrollY,i=t+r+e;c.current?.scroll({top:n?0:i,left:n?i:0})},[e,n,a]);return l({...s,horizontal:n,parentRef:a,scrollToFn:t||u,onScrollElement:c,scrollOffsetFn:d,useObserver:()=>(function(e){let[t,n]=(0,r.useState)({height:0,width:0}),i=e.current;return(0,o.b)(()=>{if(!i)return;let e=()=>{let e={height:i.innerHeight,width:i.innerWidth};n(t=>t.height!==e.height||t.width!==e.width?e:t)};return e(),i.addEventListener("resize",e),()=>{i.removeEventListener("resize",e)}},[i]),t})(c)})}},72508:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(85893),i=n(42483);let a=({children:e,sx:t,...n})=>(0,r.jsx)(i.Z,{sx:{backgroundColor:"canvas.default",border:"1px solid",borderColor:"border.default",borderRadius:"6px",contain:"paint",display:"flex",flexDirection:"column",height:"100%",minHeight:0,maxHeight:"100vh",overflowY:"auto",right:0,...t},...n,children:e});try{a.displayName||(a.displayName="Panel")}catch{}},10558:(e,t,n)=>{n.d(t,{m:()=>l});var r=n(85893),i=n(42483),a=n(74121);let l=()=>(0,r.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:3},"data-testid":"suspense-spinner",children:(0,r.jsx)(a.Z,{"aria-label":"Loading"})});try{l.displayName||(l.displayName="LoadingFallback")}catch{}},45096:(e,t,n)=>{n.d(t,{P:()=>h});var r=n(85893),i=n(71207),a=n(90044),l=n(85529),o=n(42483),s=n(98833),c=n(97011),d=n(88216),u=n(73290);function h({binary:e,helpUrl:t,webCommitInfo:n}){let{shouldFork:h,lockedOnMigration:m,shouldUpdate:p}=n,f=i.ssrSafeLocation.pathname;f.endsWith("/")&&(f=f.slice(0,-1));let x=f+i.ssrSafeLocation.search,y=(0,a.F)(x,"post"),g=m?{message:"This repository is currently being migrated.",description:"Sorry, you\u2019re not able to edit this repository while the migration is in progress.",icon:l.LockIcon}:h?{message:"You need to fork this repository to propose changes.",description:"Sorry, you\u2019re not able to edit this repository directly\u2014you need to fork it and propose your changes from there instead.",icon:l.GitBranchIcon}:p?{message:"Sorry, it looks like your fork is outdated!",description:"You\u2019ll have to bring it up to date before you can propose changes.",icon:l.AlertIcon}:e?{message:"Binary file content is not editable.",description:"But you can still rename or move it.",icon:l.PencilIcon}:null;return g?(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",m:4},children:[(0,r.jsx)(s.Z,{icon:g.icon,size:"medium",sx:{color:"fg.muted",mb:2}}),(0,r.jsx)(c.Z,{as:"h3",sx:{mb:1},children:g.message}),(0,r.jsx)(c.Z,{sx:{mb:2},children:g.description}),(h||p)&&(0,r.jsxs)("form",{"data-turbo":"false",method:"post",action:x,"data-testid":"edit-issues-form",children:[(0,r.jsx)("input",{hidden:!0,name:"authenticity_token",value:y,readOnly:!0}),(0,r.jsx)(d.r,{type:"submit",variant:"primary",children:h?"Fork this repository":"Update your fork"})]}),h&&(0,r.jsx)(u.Z,{href:`${t}/articles/fork-a-repo`,children:"Learn more about forks"})]}):null}try{h.displayName||(h.displayName="EditIssues")}catch{}},22174:(e,t,n)=>{n.d(t,{r:()=>a});var r=n(85893),i=n(51461);function a({forkName:e,forkOwner:t}){return(0,r.jsxs)(i.Z,{sx:{mb:3},"aria-live":"polite",children:["You\u2019re making changes in a project you don\u2019t have write access to. Submitting a change will write it to a new branch in your fork ",(0,r.jsx)("b",{children:`${t}/${e}`}),", so you can send a pull request."]})}try{a.displayName||(a.displayName="EditingForkBanner")}catch{}},55607:(e,t,n)=>{n.d(t,{Ew:()=>v,V1:()=>N,d2:()=>C,fN:()=>w,fq:()=>S,h7:()=>y,hI:()=>g,ud:()=>k,v0:()=>_,yB:()=>j});var r=n(85893),i=n(71207),a=n(15631),l=n(85529),o=n(51461),s=n(98833),c=n(42483),d=n(73290),u=n(88216),h=n(65379);let m=/[\u202A-\u202E]|[\u2066-\u2069]/,p=/[\u202A-\u202E]|[\u2066-\u2069]/g,f=/([\u202A-\u202E]|[\u2066-\u2069])/g,x=new Map(Object.entries({"\u202A":"U+202A","\u202B":"U+202B","\u202C":"U+202C","\u202D":"U+202D","\u202E":"U+202E","\u2066":"U+2066","\u2067":"U+2067","\u2068":"U+2068","\u2069":"U+2069"}));function y(){let[e]=(0,a.D)(()=>i.iG,i.iG,[]);if(!e)return null;let t=new URL(e.location.href,e.location.origin),n="1"===t.searchParams.get("h");return n?t.searchParams.delete("h"):t.searchParams.set("h","1"),(0,r.jsxs)(o.Z,{full:!0,variant:"warning",sx:{alignItems:"center",display:"flex"},children:[(0,r.jsx)(s.Z,{icon:l.AlertIcon}),(0,r.jsxs)(c.Z,{as:"span",children:["This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters."," ",(0,r.jsx)(d.Z,{href:"https://github.co/hiddenchars",target:"_blank",rel:"noreferrer",children:"Learn more about bidirectional Unicode characters"})]}),(0,r.jsx)(u.r,{as:"a",onClick:()=>{window.location.href=t.href},size:"small",sx:{float:"right",ml:"24px",backgroundClip:"padding-box"},children:n?"Hide revealed characters":"Show hidden characters"})]})}function g(){return(0,r.jsx)(h.Z,{direction:"e",text:"This line has hidden Unicode characters",children:(0,r.jsx)(s.Z,{icon:l.AlertIcon,sx:{mr:"12px"}})})}function b({char:e}){return(0,r.jsx)(c.Z,{as:"span",className:"bidi-replacement padded",children:e})}function v(e){return``}function j(e){return e.split(f)}function w(e){if(!k(e))return null;let t=j(e),n=t.map(e=>{let t=x.get(e);return t?`${t}`:e});return n.join("")}function N(e){return k(e)?e.replaceAll(p,e=>x.get(e)??""):e}function C(e){if(!k(e))return null;let t=j(e);return t.map((e,t)=>{let n=x.get(e);return n?(0,r.jsx)(b,{char:n},t):e})}function k(e){return m.test(e)}function S(){if(!i.iG)return!1;let e=new URL(i.iG.location.href,i.iG.location.origin);return"1"===e.searchParams.get("h")}function _(e){return x.get(e)}try{y.displayName||(y.displayName="BidiAlert")}catch{}try{g.displayName||(g.displayName="BidiTooltip")}catch{}try{b.displayName||(b.displayName="BidiCharacter")}catch{}},67125:(e,t,n)=>{n.d(t,{Xj:()=>g,a:()=>y,ew:()=>x,hL:()=>r,iC:()=>p});var r,i=n(85893),a=n(22326),l=n(87623),o=n(85529),s=n(51461),c=n(98833),d=n(42483),u=n(50919),h=n(74390),m=n(67294);function p({errors:e,state:t}){let[n,r]=(0,m.useState)(!1),a=(0,m.useRef)(null);return 0===t?(0,i.jsx)(s.Z,{variant:"warning",sx:{mt:3},children:"Failed to validate this CODEOWNERS file"}):1===t?(0,i.jsx)(s.Z,{variant:"default",sx:{mt:3},children:"Validating CODEOWNERS rules..."}):0===e.length?(0,i.jsx)(s.Z,{variant:"success",sx:{mt:3},children:"This CODEOWNERS file is valid."}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.Z,{variant:"warning",sx:{display:"flex",flexDirection:"row",mt:3,alignItems:"center"},children:[(0,i.jsx)(c.Z,{icon:o.BugIcon}),(0,i.jsxs)(d.Z,{onClick:()=>r(!n),sx:{cursor:"pointer",display:"flex",alignItems:"center",p:0},children:["This CODEOWNERS file contains errors",(0,i.jsx)(u.h,{"aria-label":"View CODEOWNERS errors",ref:a,size:"small",sx:{height:"20px",ml:1,svg:{color:"fg.default",mr:0}},icon:o.KebabHorizontalIcon})]})]}),(0,i.jsxs)(h.Z,{isOpen:n,onDismiss:()=>r(!1),sx:{display:"flex",flexDirection:"column",width:"640px"},returnFocusRef:a,children:[(0,i.jsx)(h.Z.Header,{children:"CODEOWNERS errors"}),(0,i.jsx)(d.Z,{sx:{overflowX:"hidden",overflowY:"auto",p:3},children:e.map((e,t)=>(0,i.jsx)(f,{error:e},t))})]})]})}function f({error:e}){return(0,i.jsxs)(d.Z,{sx:{padding:"16px",listStyleType:"none",borderTop:"1px solid var(--borderColor-muted, var(--color-border-muted))"},children:[`${e.kind} on line ${e.line}${e.suggestion?`: ${e.suggestion}`:""}`,(0,i.jsx)(d.Z,{as:"pre",sx:{mt:3},children:(0,i.jsxs)("code",{children:[e.linePrefix,(0,i.jsx)(d.Z,{as:"b",sx:{cursor:"help",fontStyle:"italic",color:"var(--fgColor-danger, var(--color-danger-fg))",position:"relative","&::before":{content:'""',position:"absolute",top:"101%",left:0,width:"100%",height:"0.25em",background:"linear-gradient(135deg, transparent, transparent 45%, var(--fgColor-danger, var(--color-danger-fg)), transparent 55%, transparent 100%),linear-gradient(45deg, transparent, transparent 45%, var(--fgColor-danger, var(--color-danger-fg)), transparent 55%, transparent 100%)",backgroundRepeat:"repeat-x,repeat-x",backgroundSize:"0.5em 0.5em"}},children:e.lineError}),e.lineSuffix]})})]})}function x(e){var t,n,r;let i=e.source.trim(),a=e.column-1,l=(t=a,n=e.end_column,r=i,n||(r.substring(t).indexOf(" ")>0?r.indexOf(" ",t):r.length));if(a>30){let e=a-30;i="\u2026"+i.slice(e),a-=e-1,l-=e-1}return{...e,linePrefix:i.substring(0,a),lineError:i.substring(a,l),lineSuffix:i.substring(l)}}function y(){return(0,i.jsx)(c.Z,{icon:o.DotFillIcon,sx:{color:"var(--fgColor-danger, var(--color-danger-fg))"},"aria-label":"This line contains CODEOWNERS errors"})}function g(e,t,n){return(0,l.v)((0,a.Cv)({owner:e.ownerLogin,repo:e.name,commitish:t.name,filePath:n}),{method:"GET"})}!function(e){e[e.ERROR=0]="ERROR",e[e.LOADING=1]="LOADING",e[e.VALIDATED=2]="VALIDATED"}(r||(r={}));try{p.displayName||(p.displayName="CodeownerFileBanner")}catch{}try{f.displayName||(f.displayName="CodeownersErrorDetails")}catch{}try{y.displayName||(y.displayName="CodeownersErrorLineIndicator")}catch{}},13469:(e,t,n)=>{n.d(t,{P:()=>c,U:()=>d});var r=n(85893),i=n(85529),a=n(42483),l=n(68912),o=n(64227),s=n(76741);function c({linesData:e,onLineStickOrUnstick:t,setIsCollapsed:n,tabSize:i,extraLeftPadding:c,contentWidth:u}){let h=(0,o.Nv)(),m=[...h.keys()],p=(0,l.G)("react-line-numbers");return(0,r.jsx)(r.Fragment,{children:m.map(l=>{let h=(0,o.Bx)(l,e);if(void 0===h||e[h]?.ownedSection===void 0)return null;let m=e[h],f=(0,o.VC)(m?.rawText?.length??0,m?.rawText??"",i);return(0,r.jsxs)(a.Z,{sx:{position:"absolute",top:p*h,pl:"10px",height:p,whiteSpace:"pre"},children:[u&&(0,r.jsx)(s.p,{subtle:!0,lineNumber:l,highlightPosition:{offset:-82,width:u}}),(0,r.jsx)(d,{codeLineData:m,setIsCollapsed:n,onLineStickOrUnstick:t,leftOffset:f+(c??0)})]},`expand-row-ellipsis-${l}`)})})}function d({codeLineData:e,leftOffset:t,setIsCollapsed:n,onLineStickOrUnstick:a}){let{lineNumber:l,ownedSection:s}=e,c=(0,o.H1)(l);return c?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("button",{"aria-label":"Expand row",className:"Button Button--iconOnly Button--invisible Button--small px-2 py-0 ml-1 border-0 expand-row-ellipsis",style:{left:t},onMouseDown:t=>{(0,o.yw)(l),n?.(!1),s&&(s.collapsed=!1,a?.(e,!0)),t.preventDefault()},children:(0,r.jsx)(i.EllipsisIcon,{})})}):null}try{c.displayName||(c.displayName="CodeFoldingEllipsisOverlay")}catch{}try{d.displayName||(d.displayName="ExpandRowEllipsis")}catch{}},76741:(e,t,n)=>{n.d(t,{E:()=>w,p:()=>C});var r=n(85893),i=n(46565),a=n(63451),l=n(42483),o=n(86010),s=n(67294),c=n(40149),d=n(81568),u=n(68912),h=n(57748),m=n(54026),p=n(64227),f=n(98486),x=n(81181),y=n(13469),g=n(51409),b=n(57512),v=n(30788);let j=()=>{},w=s.memo(N);function N({codeLineData:e,codeLineClassName:t,id:n,onClick:l,setIsCollapsed:h,onLineStickOrUnstick:w,virtualOffset:N,codeLineToSectionMap:k,stylingDirectivesLine:S,virtualKey:_,forceVisible:I,measureRef:R,copilotAccessAllowed:L}){let{lineNumber:E,rawText:T}=e,Z=(0,p.H1)(E),{tabSize:B}=(0,c.G)(),D=(0,g.Cy)(E),O=(0,s.useRef)(null),F=D&&O.current?(0,p.bP)(D,O.current,E,B,T??""):void 0,A=k?.get(E)?.length??0,$=(0,m.nx)(),P=(0,d.u)(e,!0,$,w??j,A),M=(0,i.OY)().codeWrappingOption,z=(0,b.si)(E),H=(0,b.KC)(E),W=(0,u.G)("react-line-numbers"),G=D?.start.line===E,U=(0,s.useRef)(null),V=(0,s.useRef)(null);return(0,a.b)(()=>{G&&V.current?.setAnchor(U.current)},[G]),(0,r.jsx)("div",{ref:e=>{R?.(e),P(e)},"data-key":_,className:(0,o.W)(t,"react-code-text react-code-line-contents",N&&"virtual",M.enabled&&R&&"react-code-text-cell"),style:{transform:N?`translateY(${N}px)`:void 0,minHeight:M.enabled?W:"auto"},onClick:l,children:(0,r.jsxs)("div",{ref:U,children:[D&&(0,r.jsx)(C,{lineNumber:E,highlightPosition:F}),Z&&!D&&(0,r.jsx)(C,{subtle:!0,lineNumber:E,highlightPosition:F}),z&&z.length>0&&(0,r.jsx)(x.R,{symbols:z,focusedSymbol:H,sx:{paddingLeft:"10px",width:"auto"},lineNumber:E}),(0,r.jsx)(v.$c,{id:n,lineNumber:E,stylingDirectivesLine:S,current:!!D,rawText:T,forceVisible:I,ref:O}),M.enabled&&(0,r.jsx)(y.U,{codeLineData:e,setIsCollapsed:h,onLineStickOrUnstick:w,leftOffset:0}),G&&L&&(0,r.jsx)(f.lv,{ref:V,rowBeginNumber:D.start.line,rowEndNumber:D.end.line,id:"code-line-copilot-button"})]})})}function C({lineNumber:e,highlightPosition:t,subtle:n}){let i=(0,h.D)(),a=t?.offset!==void 0,o=t?.width!==void 0,s=t?.offset??-72,c=t?.width??0;return(0,r.jsx)(l.Z,{sx:{position:"absolute",backgroundColor:n?"neutral.subtle":"var(--bgColor-attention-muted, var(--color-attention-subtle))",height:"100%",opacity:".6",boxShadow:n?"inset 2px 0 0 var(--fgColor-muted, var(--color-fg-subtle))":"inset 2px 0 0 var(--fgColor-attention, var(--color-attention-fg))",top:i?"-3px":0,left:`${s}px`,width:o?`${a&&o?c:c+82}px`:"calc(100% + 72px)",pointerEvents:"none"}},`highlighted-line-${e}`)}try{w.displayName||(w.displayName="CodeLine")}catch{}try{N.displayName||(N.displayName="CodeLineUnmemoized")}catch{}try{C.displayName||(C.displayName="HighlighterElement")}catch{}},35068:(e,t,n)=>{n.d(t,{sE:()=>b,G3:()=>w,si:()=>j});var r=n(85893),i=n(46565),a=n(42483),l=n(67294),o=n(72051),s=n(23239),c=n(64227),d=n(44629),u=n(13469),h=n(76741),m=n(34603),p=n(78720),f=n(68912);function x(e){window.scroll({top:e,left:0})}function y(e,t){return Array(t-e).fill(null).map((t,n)=>n+e)}var g=n(36829);let b=l.memo(l.forwardRef(v));function v({linesData:e,onLineNumberClick:t,codeSections:n,codeLineToSectionMap:b,onLineStickOrUnstick:v,tabSize:N,contentWidth:C,onCollapseToggle:k,cursorContainerRef:S,textAreaRef:_,materializeAllLines:I,copilotAccessAllowed:R},L){let E=(0,l.useRef)(null),T=(0,l.useRef)(null),Z=(0,l.useRef)(null),B=(0,s.nj)(),D=(0,l.useRef)(!0),O=(0,l.useRef)(!0),F=(0,l.useRef)(!0),{stylingDirectives:A}=(0,o.H2)();(0,l.useEffect)(()=>{if(_&&_.current){_.current.onscroll=()=>{if(T.current&&_?.current){if(!F.current){F.current=!0;return}if(_.current.scrollLeft===T.current.scrollLeft)return;D.current=!(O.current&&F.current),T.current.scrollLeft=_.current.scrollLeft}S&&S.current&&_?.current&&(S.current.scrollLeft=_.current.scrollLeft)};let e=_.current;return()=>{e&&(e.onscroll=null)}}},[_,E,B,S]);let $=(0,i.OY)().codeWrappingOption.enabled,P=function({parentRef:e,lineCount:t,materializeAllLines:n}){let r=(0,f.G)("react-line-numbers"),a=(0,l.useMemo)(()=>()=>r,[r]),o=(0,i.OY)().codeWrappingOption.enabled,s=(0,l.useMemo)(()=>function(e){if(t<150)return y(0,t);let n=(0,p.M)(e);if(0===n.length)return n;let r=n[0],i=n[n.length-1],a=Math.min(75,t-i),l=y(0,Math.min(75,r)),o=y(t+1-a,t);return l.concat(n,o)},[t]);return(0,m.F)({parentRef:e,size:t,overscan:n?Number.MAX_SAFE_INTEGER:100,scrollToFn:x,estimateSize:a,rangeExtractor:s,measureSize:o?void 0:a,useVirtualImpl:m.A})}({parentRef:E,lineCount:e.length,materializeAllLines:!!I});(0,l.useImperativeHandle)(L,()=>({scrollToTop:()=>{(0,c.nB)(0)||P.scrollToIndex(0,{align:"start"})},scrollToLine:(e,t)=>{P.scrollToIndex(e,{align:"start"});let n=E.current;n&&n.scroll({left:w(n,e,t)})}}));let M=B?{overflowX:"overlay",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}:{overflowX:"auto"};return(0,r.jsxs)(a.Z,{ref:E,sx:{pointerEvents:B?"none":"auto"},onScroll:e=>j(e,_),children:[(0,r.jsx)(a.Z,{ref:T,sx:M,tabIndex:0,onScroll:()=>{if(B&&T.current&&Z.current){if(!O.current){O.current=!0;return}Z.current.scrollLeft!==T.current.scrollLeft&&(F.current=!(O.current&&D.current),Z.current.scrollLeft=T.current.scrollLeft)}},children:(0,r.jsxs)(a.Z,{className:"react-code-file-contents",role:"presentation","aria-hidden":!0,"data-tab-size":N,"data-testid":"code-lines-container","data-paste-markdown-skip":!0,sx:{tabSize:N,position:"relative",width:C,maxWidth:$?"100%":"unset"},style:{height:P.totalSize},"data-hpc":!0,children:[(0,r.jsx)("div",{className:"react-line-numbers",style:{pointerEvents:"auto",height:P.totalSize,position:"relative",zIndex:2},children:P.virtualItems.map(i=>{let a=e[i.index];return(0,r.jsx)(g._7,{codeLineData:a,onClick:t,ownedCodeSections:n,onLineStickOrUnstick:v,onCollapseToggle:k,virtualOffset:i.start},`line-number-${a.lineNumber}-content:${a.rawText?.substring(0,100)}`)})}),(0,r.jsx)("div",{className:"react-code-lines",style:{height:P.totalSize},children:P.virtualItems.map(t=>{let n=e[t.index];return(0,r.jsx)(h.E,{codeLineData:n,stylingDirectivesLine:n.stylingDirectivesLine??(A?A[n.lineNumber-1]:void 0),codeLineClassName:n.codeLineClassName,id:`LC${n.lineNumber}`,onLineStickOrUnstick:v,setIsCollapsed:k,codeLineToSectionMap:b,virtualOffset:t.start,virtualKey:t.key,measureRef:t.measureRef,copilotAccessAllowed:R},`line-number-${n.lineNumber}-content:${n.rawText?.substring(0,100)}`)})}),(0,r.jsx)(d.Z,{shouldNotOverrideCopy:B,containerRef:B?_:E}),!$&&(0,r.jsx)(u.P,{linesData:e,onLineStickOrUnstick:v,setIsCollapsed:k,tabSize:N,extraLeftPadding:82})]})}),B&&C&&T.current&&T.current.clientWidth{if(Z.current&&_?.current){if(!D.current){D.current=!0;return}Z.current.scrollLeft!==_.current.scrollLeft&&(O.current=!(F.current&&D.current),_.current.scrollLeft=Z.current.scrollLeft)}},ref:Z,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onMouseUp:e=>e.preventDefault(),children:(0,r.jsx)(a.Z,{sx:{width:C,height:"1px"}})})]})}function j(e,t){let n=e.target;t?.current?.scrollTo(n.scrollLeft,n.scrollTop)}function w(e,t,n){if(!n)return 0;let r=(0,c.d5)(t,n);if(!r)return 0;let i=e.getBoundingClientRect(),a=r.getBoundingClientRect(),l=i.left+i.width-e.scrollLeft-(a.left+a.width)>0;return l?0:r.offsetLeft}try{b.displayName||(b.displayName="CodeLines")}catch{}try{v.displayName||(v.displayName="CodeLinesUnmemoized")}catch{}},25754:(e,t,n)=>{n.d(t,{Dc:()=>C,_g:()=>S,Jf:()=>k,ZE:()=>I});var r=n(85893),i=n(7949),a=n(46565),l=n(42483),o=n(67294),s=n(68912),c=n(23239),d=n(19435),u=n(64227),h=n(44629),m=n(13469),p=n(35068),f=n(29285),x=n(82163),y=n(86148),g=n(32458),b=n(81568),v=n(54026);function j({linesData:e,onLineStickOrUnstick:t,codeLineToSectionMap:n}){let i=(0,v.nx)(),a=(0,s.G)("react-line-numbers");return void 0===n?null:(0,r.jsx)(r.Fragment,{children:e.map(l=>{let o=l.lineNumber,s=n?.get(o)?.length??0;if(void 0===o||void 0===l.ownedSection)return null;let c=(0,u.Bx)(o,e);return(0,r.jsx)(w,{className:"symbol-highlight react-code-text",lineData:e[c],stickyHeaderHeight:i,numParents:s,onLineStickOrUnstick:t??g.Z,sx:{position:"absolute",top:a*(c-1),pl:"10px",height:a,whiteSpace:"pre"}},`observer-overlay-${c}-lineNumber-no-virtualization`)})})}function w({lineData:e,onLineStickOrUnstick:t,numParents:n,stickyHeaderHeight:i,className:a,sx:o}){let s=(0,b.u)(e,!0,i,t,n);return(0,r.jsx)(l.Z,{ref:e=>{s(e)},className:a,sx:{mb:"-20px",color:"transparent",position:"absolute",maxHeight:"6rem",overflow:"hidden",width:"100%",display:"inline-block",userSelect:"none",...o},"data-testid":"sticky-line-observer"})}try{j.displayName||(j.displayName="StickyLineObserverOverlay")}catch{}try{w.displayName||(w.displayName="StickyLineObserverLine")}catch{}var N=n(30788);let C=o.memo(o.forwardRef(_)),k=60,S=3500;function _({linesData:e,onLineNumberClick:t,codeSections:n,nonTruncatedLinesData:i,codeLineToSectionMap:a,onLineStickOrUnstick:g,colorizedLines:b,tabSize:v,contentWidth:w,cursorContainerRef:C,onCollapseToggle:S,textAreaRef:_,copilotAccessAllowed:I},R){let L=(0,o.useRef)(null),E=(0,o.useRef)(null),T=(0,o.useRef)(null),Z=(0,c.nj)(),B=(0,d.D)(),D=(0,o.useRef)(!0),O=(0,o.useRef)(!0),F=(0,o.useRef)(!0),A=(0,s.G)("react-line-numbers"),$=(0,o.useRef)([...Array(Math.floor(e.length/k)+1).keys()]);(0,o.useImperativeHandle)(R,()=>({scrollToTop:()=>{(0,u.nB)(0)||window.scrollTo({left:0,top:0})},scrollToLine:(e,t)=>{let n=L.current;n&&setTimeout(()=>window.scrollTo({left:(0,p.G3)(n,e,t),top:A*e}),0)}})),(0,o.useEffect)(()=>{if(_&&_.current){_.current.onscroll=()=>{if(E.current&&_?.current){if(!F.current){F.current=!0;return}if(_.current.scrollLeft===E.current.scrollLeft)return;D.current=!(O.current&&F.current),E.current.scrollLeft=_.current.scrollLeft}C&&C.current&&_?.current&&(C.current.scrollLeft=_.current.scrollLeft)};let e=_.current;return()=>{e&&(e.onscroll=null)}}},[_,L,Z,C]),(0,o.useEffect)(()=>{$.current=[...Array(Math.floor(e.length/k)+1).keys()],B()},[e]);let P=Z?{overflowX:"overlay",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}:{overflowX:"auto"};return(0,r.jsxs)(l.Z,{ref:L,sx:{pointerEvents:Z?"none":"auto"},onScroll:e=>(0,p.si)(e,_),children:[(0,r.jsx)(l.Z,{ref:E,sx:P,tabIndex:0,onScroll:()=>{if(Z&&E.current&&T.current){if(!O.current){O.current=!0;return}T.current.scrollLeft!==E.current.scrollLeft&&(F.current=!(O.current&&D.current),T.current.scrollLeft=E.current.scrollLeft)}},children:(0,r.jsxs)(l.Z,{className:"react-code-file-contents",role:"presentation","aria-hidden":!0,"data-tab-size":v,"data-paste-markdown-skip":!0,sx:{tabSize:v,position:"relative",width:w,maxWidth:"unset"},"data-hpc":!0,children:[(0,r.jsx)("div",{className:"react-line-numbers-no-virtualization",style:{pointerEvents:"auto",position:"relative",zIndex:2},children:$.current.map(i=>{let l=e.slice(i*k,Math.min(i*k+k,e.length));return(0,r.jsx)("div",{className:"react-no-virtualization-wrapper-lines",children:l.map(e=>(0,r.jsx)(y.L,{codeLineData:e,onClick:t,ownedCodeSections:n,onLineStickOrUnstick:g,onCollapseToggle:S,codeLineToSectionMap:a},`line-number-${e.lineNumber}-content:${e.rawText?.substring(0,100)}`))},`line-number-wrapper-${i}-content:${l[0]?.rawText?.substring(0,100)}`)})}),(0,r.jsxs)("div",{className:"react-code-lines react-code-lines-no-virtualization",children:[(0,r.jsx)(x._,{linesData:e}),(0,r.jsx)(f.i,{linesData:e,copilotAccessAllowed:I}),(0,r.jsx)(N.pb,{colorizedLines:b,linesData:i}),(0,r.jsx)(j,{linesData:e,onLineStickOrUnstick:g,codeLineToSectionMap:a}),(0,r.jsx)(m.P,{linesData:e,onLineStickOrUnstick:g,setIsCollapsed:S,tabSize:v,contentWidth:w})]}),(0,r.jsx)(h.Z,{shouldNotOverrideCopy:Z,containerRef:Z?_:L})]})}),Z&&w&&E.current&&E.current.clientWidth{if(T.current&&_?.current){if(!D.current){D.current=!0;return}T.current.scrollLeft!==_.current.scrollLeft&&(O.current=!(F.current&&D.current),_.current.scrollLeft=T.current.scrollLeft)}},ref:T,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onMouseUp:e=>e.preventDefault(),children:(0,r.jsx)(l.Z,{sx:{width:w,height:"1px"}})})]})}function I(e){let t=(0,a.OY)().codeWrappingOption.enabled,n=(0,i.y)("react_blob_overlay"),r=(0,u.Hq)(),l=(0,u.DF)();return n&&!t&&!(l&&!r)&&e{n.d(t,{Cy:()=>d,ku:()=>s,t8:()=>c});var r=n(85893),i=n(4181),a=n(34449),l=n(67294);let o=l.createContext(new i.fA(void 0));function s({highlightedLines:e,children:t}){let n=(0,a.yL)(e);return(0,l.useEffect)(()=>{n.value=e},[n,e]),(0,r.jsx)(o.Provider,{value:n,children:t})}function c(){return(0,a.iu)(l.useContext(o))}function d(e){let t=l.useContext(o),n=(0,a.D_)(t,t=>t&&e>=t.start.line&&e<=t.end.line?t:void 0);return(0,a.iu)(n)}try{o.displayName||(o.displayName="HighlightedLineContext")}catch{}try{s.displayName||(s.displayName="HighlightedLinesProvider")}catch{}},29285:(e,t,n)=>{n.d(t,{i:()=>m});var r=n(85893),i=n(63451),a=n(42483),l=n(67294),o=n(40149),s=n(68912),c=n(57748),d=n(64227),u=n(98486),h=n(51409);function m({linesData:e,copilotAccessAllowed:t}){let n=(0,h.t8)(),{tabSize:a}=(0,o.G)(),m=(0,s.G)("react-line-numbers"),f=(0,c.D)(),x=(0,l.useRef)(null),y=(0,l.useRef)(null),g=n?(0,d.Bx)(n.start.line,e):0,b=n?.end.line?(0,d.Bx)(n.end.line,e):g,[v,j]=(0,l.useState)(f?g*m-3:g*m);if((0,i.b)(()=>{n&&(y.current?.setAnchor(x.current),j(f?g*m-3:g*m))},[n,f,m,g]),!n)return null;let w=[];for(let t=g;t<=b;t++){let r=(0,d.p$)("",t+1);if(!r)continue;let i=(0,d.bP)(n,r,t+1,a,e[t+1]?.rawText??"")??{};w.push({position:i,lineNumber:t})}return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{ref:x,style:{position:"relative",top:v+10},children:[w.map(({position:e,lineNumber:t})=>(0,r.jsx)(p,{highlightPosition:e,lineNumber:t,startingLineNumber:g},`line-${t}-highlight-${e.offset}`)),t&&(0,r.jsx)(u.lv,{ref:y,rowBeginNumber:n.start.line,rowEndNumber:n.end.line,recalcPosition:v,id:"code-line-copilot-button"})]})})}function p({startingLineNumber:e,lineNumber:t,highlightPosition:n,subtle:i}){let l=(0,s.G)("react-line-numbers"),o=(t-e)*l;return(0,r.jsx)(a.Z,{className:"line-highlight",sx:{position:"absolute",backgroundColor:i?"neutral.subtle":"var(--bgColor-attention-muted, var(--color-attention-subtle))",height:l,opacity:".6",boxShadow:i?"inset 2px 0 0 var(--borderColor-neutral-emphasis, var(--color-fg-subtle))":"inset 2px 0 0 var(--bgColor-attention-emphasis, var(--color-attention-fg))",left:n&&n.offset?`${n.offset-10}px`:"-82px",top:`${o-10}px`,width:n&&n.width?`${n.width+82}px`:"calc(100% + 82px)",pointerEvents:"none"}},`highlighted-line-${t}`)}try{m.displayName||(m.displayName="HighlightedLinesOverlay")}catch{}try{p.displayName||(p.displayName="LineHighlight")}catch{}},82163:(e,t,n)=>{n.d(t,{_:()=>s});var r=n(85893),i=n(68912),a=n(64227),l=n(81181),o=n(57512);function s({linesData:e}){let t=(0,o.Wz)(),n=(0,o.bH)(),s=(0,i.G)("react-line-numbers");return(0,r.jsx)(r.Fragment,{children:[...t.values()].map(t=>{let i=t[0]?.lineNumber;if(void 0===i)return null;let o=(0,a.Bx)(i,e)+1;return(0,r.jsx)(l.R,{className:"symbol-highlight react-code-text",lineNumber:o,symbols:t,focusedSymbol:n,sx:{position:"absolute",top:s*(o-1),pl:"10px",height:s,whiteSpace:"pre"}},`overlay-${o}-lineNumber-no-virtualization`)})})}try{s.displayName||(s.displayName="HighlightedSymbolsOverlay")}catch{}},36829:(e,t,n)=>{n.d(t,{DZ:()=>w,PH:()=>j,_7:()=>b});var r=n(85893),i=n(23180),a=n(46565),l=n(63451),o=n(85529),s=n(42483),c=n(98833),d=n(86010),u=n(67294),h=n(95475),m=n(23239),p=n(64227),f=n(55607),x=n(67125),y=n(51409);let g=(0,u.lazy)(()=>Promise.resolve().then(n.bind(n,9292))),b=u.memo(v);function v({codeLineData:e,onClick:t,ownedCodeSections:n,onCollapseToggle:o,preventClick:s,onLineStickOrUnstick:c,virtualOffset:b}){let{lineNumber:v,ownedSection:N,codeLineClassName:C,isStartLine:k,codeownersLineError:S,bidi:_}=e,{sendRepoClickEvent:I}=(0,i.a)(),R=(0,m.gk)(),L=(0,u.useCallback)(e=>{let n,r;if(e.defaultPrevented)return;let i=parseInt(e.currentTarget.getAttribute("data-line-number"),10),a=(0,h.n6)(`L${i}`),l=R.current;if(l&&!(l.start.line===l.end.line&&l.start.column===l.end.column))n=l.start,r=l.end;else{let e=window.getSelection()?.rangeCount?window.getSelection()?.getRangeAt(0):null;e&&(n=(0,p.jP)(e.startContainer,e.startOffset),r=(0,p.jP)(e.endContainer,e.endOffset))}let o=!1;n&&r&&n.line<=i&&r.line>=i&&(o=!0,a={anchorPrefix:"",blobRange:{start:n,end:r}});let{blobRange:s}=a,c=(0,h.G5)(window.location.hash);c&&e.shiftKey&&!o?(I("BLOB.MULTILINE"),a.blobRange={start:c.start,end:s.end}):I("BLOB.LINE");let d=(0,h.Dw)(a);history.replaceState(history.state,"",d),t?.(e)},[t,R,I]),E=(0,y.Cy)(v),T=E?.start.line===v,Z=E&&E.start.line=v,B=Z||T&&E?.start.column===null,D=(0,u.useRef)(null),O=(0,u.useRef)(null);(0,l.b)(()=>{T&&O.current?.setAnchor(D.current)},[T]);let{codeFoldingOption:F}=(0,a.OY)(),A=F.enabled;return(0,u.useEffect)(()=>{!F.enabled&&((0,p.Yo)(),o?.(!1),N&&(N.collapsed=!1))},[F.enabled,N,o]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{ref:D,"data-line-number":v,className:(0,d.W)(C,"react-line-number react-code-text",b&&"virtual",s&&"prevent-click",B&&"highlighted-line"),style:b?{paddingRight:"16px",transform:`translateY(${b}px)`}:{paddingRight:"16px"},onMouseDown:s?void 0:L,children:[v,S&&(0,r.jsx)(j,{children:(0,r.jsx)(x.a,{})}),_&&(0,r.jsx)(j,{children:(0,r.jsx)(f.hI,{})}),A&&k&&N&&n&&(0,r.jsx)(j,{displayRight:!0,children:(0,r.jsx)(w,{codeLineData:e,onCollapseToggle:o,onLineStickOrUnstick:c})})]}),T&&(0,r.jsx)(g,{codeLineClassName:C,ref:O,rowBeginId:`LG${E.start.line}`,rowBeginNumber:E.start.line,rowEndNumber:E.end.line,rowEndId:`LG${E.end.line}`})]})}function j({children:e,sx:t,displayRight:n}){return(0,r.jsx)(s.Z,{as:"span",sx:{...n?void 0:{left:"-4px"},margin:`1px ${n?"8px":"1px"}`,position:"absolute",zIndex:"1",...t},children:e})}function w({codeLineData:e,onCollapseToggle:t,onLineStickOrUnstick:n}){let i=(0,p.H1)(e.lineNumber),a=(0,u.useCallback)(r=>{let{lineNumber:i,ownedSection:a}=e;a&&(a.collapsed=!1),t?.(!1),(0,p.yw)(i),n?.(e,!0),r.preventDefault()},[e,t,n]),l=(0,u.useCallback)(n=>{let{lineNumber:r,ownedSection:i}=e;i&&(i.collapsed=!0),t?.(!0),(0,p.rH)(r),n.preventDefault()},[e,t]);return i?(0,r.jsx)(s.Z,{"aria-label":"Expand code section",onMouseDown:a,role:"button",sx:{position:"absolute"},children:(0,r.jsx)(c.Z,{icon:o.ChevronRightIcon})}):(0,r.jsx)(s.Z,{"aria-label":"Collapse code section",onMouseDown:l,role:"button",sx:{position:"absolute"},children:(0,r.jsx)(c.Z,{icon:o.ChevronDownIcon})})}try{g.displayName||(g.displayName="HighlightedLineMenu")}catch{}try{b.displayName||(b.displayName="LineNumber")}catch{}try{v.displayName||(v.displayName="LineNumberUnmemoized")}catch{}try{j.displayName||(j.displayName="CodeAlert")}catch{}try{w.displayName||(w.displayName="CodeFoldingChevron")}catch{}},86148:(e,t,n)=>{n.d(t,{L:()=>y});var r=n(85893),i=n(23180),a=n(46565),l=n(63451),o=n(86010),s=n(67294),c=n(95475),d=n(23239),u=n(64227),h=n(55607),m=n(67125),p=n(51409),f=n(36829);let x=(0,s.lazy)(()=>Promise.resolve().then(n.bind(n,9292))),y=s.memo(g);function g({codeLineData:e,onClick:t,ownedCodeSections:n,onCollapseToggle:y,preventClick:g,onLineStickOrUnstick:b,virtualOffset:v}){let{lineNumber:j,ownedSection:w,codeLineClassName:N,isStartLine:C,codeownersLineError:k,bidi:S}=e,{sendRepoClickEvent:_}=(0,i.a)(),I=(0,d.gk)(),R=(0,s.useCallback)(e=>{let n,r;if(e.defaultPrevented)return;let i=parseInt(e.currentTarget.getAttribute("data-line-number"),10),a=(0,c.n6)(`L${i}`),l=I.current;if(l&&!(l.start.line===l.end.line&&l.start.column===l.end.column))n=l.start,r=l.end;else{let e=window.getSelection()?.rangeCount?window.getSelection()?.getRangeAt(0):null;e&&(n=(0,u.jP)(e.startContainer,e.startOffset),r=(0,u.jP)(e.endContainer,e.endOffset))}let o=!1;n&&r&&n.line<=i&&r.line>=i&&(o=!0,a={anchorPrefix:"",blobRange:{start:n,end:r}});let{blobRange:s}=a,d=(0,c.G5)(window.location.hash);d&&e.shiftKey&&!o?(_("BLOB.MULTILINE"),a.blobRange={start:d.start,end:s.end}):_("BLOB.LINE");let h=(0,c.Dw)(a);history.replaceState(history.state,"",h),t?.(e)},[t,I,_]),L=(0,p.Cy)(j),E=L?.start.line===j,T=L&&L.start.line=j,Z=T||E&&L?.start.column===null,B=(0,s.useRef)(null),D=(0,s.useRef)(null);(0,l.b)(()=>{E&&D.current?.setAnchor(B.current)},[E]);let{codeFoldingOption:O}=(0,a.OY)(),F=O.enabled;return(0,s.useEffect)(()=>{!O.enabled&&((0,u.Yo)(),y?.(!1),w&&(w.collapsed=!1))},[O.enabled,w,y]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{ref:e=>{B.current=e},"data-line-number":j,className:(0,o.W)(N,"react-line-number react-code-text",v&&"virtual",g&&"prevent-click",Z&&"highlighted-line"),style:v?{paddingRight:"16px",transform:`translateY(${v}px)`}:{paddingRight:"16px"},onMouseDown:g?void 0:R,children:[j,k&&(0,r.jsx)(f.PH,{children:(0,r.jsx)(m.a,{})}),S&&(0,r.jsx)(f.PH,{children:(0,r.jsx)(h.hI,{})}),F&&C&&w&&n&&(0,r.jsx)(f.PH,{displayRight:!0,children:(0,r.jsx)(f.DZ,{codeLineData:e,onCollapseToggle:y,onLineStickOrUnstick:b})})]}),E&&(0,r.jsx)(x,{codeLineClassName:N,ref:D,rowBeginId:`LG${L.start.line}`,rowBeginNumber:L.start.line,rowEndNumber:L.end.line,rowEndId:`LG${L.end.line}`})]})}try{x.displayName||(x.displayName="HighlightedLineMenu")}catch{}try{y.displayName||(y.displayName="LineNumberNoVirtualziation")}catch{}try{g.displayName||(g.displayName="LineNumberNoVirtualizationUnmemoized")}catch{}},57512:(e,t,n)=>{n.d(t,{KC:()=>u,Sh:()=>s,Wz:()=>c,bH:()=>h,si:()=>d});var r=n(85893),i=n(4181),a=n(34449),l=n(67294);let o=(0,l.createContext)({resultsByLineNumber:new i.vP,focusedResult:new i.fA(void 0)});function s({searchResults:e,focusedSearchResult:t,children:n}){let i=(0,a.Kq)(),s=(0,a.yL)(void 0!==t?e[t]:void 0);(0,l.useEffect)(()=>{let t=new Map;for(let n of e){let e=n.lineNumber;t.has(e)?t.get(e).push(n):t.set(e,[n])}for(let[e,n]of(i.clear(),t))i.set(e,n)},[i,e]),(0,l.useEffect)(()=>{s.value=void 0!==t?e[t]:void 0},[e,s,t]);let c=(0,l.useMemo)(()=>({resultsByLineNumber:i,focusedResult:s}),[i,s]);return(0,r.jsx)(o.Provider,{value:c,children:n})}function c(){let{resultsByLineNumber:e}=(0,l.useContext)(o);return(0,a.Yr)(e)}function d(e){let{resultsByLineNumber:t}=(0,l.useContext)(o);return(0,a.iu)(t.get(e))}function u(e){let{focusedResult:t}=(0,l.useContext)(o),n=(0,a.D_)(t,t=>t?.lineNumber===e?t:void 0);return(0,a.iu)(n)}function h(){let{focusedResult:e}=(0,l.useContext)(o);return(0,a.iu)(e)}try{s.displayName||(s.displayName="SearchResultsProvider")}catch{}},30788:(e,t,n)=>{n.d(t,{$c:()=>h,RC:()=>x,pb:()=>p});var r=n(85893),i=n(75299),a=n(15631),l=n(67294),o=n(40149),s=n(23239),c=n(64227),d=n(55607),u=n(25754);let h=l.memo(l.forwardRef(m));function m({id:e,stylingDirectivesLine:t,rawText:n,lineNumber:a,current:l,forceVisible:o},d){let u=function(){let e=(0,s.nj)(),t=(0,c.DF)(),n=(0,c.Hq)();return e?t&&!n?"separated-characters-chunked":"data-attribute":"plain"}(),h=x(void 0,t,n,o?"plain":u),m=(0,c.Hq)();return(0,r.jsx)(i.sF,{id:e,className:"react-file-line html-div","data-testid":"code-cell","data-line-number":a,html:h,ref:d,style:{position:"relative"},"aria-current":l?"location":void 0,...m?{inert:"inert"}:{}})}let p=l.memo(f);function f({linesData:e,colorizedLines:t}){let n=function(e,t){let[n]=(0,a.D)(()=>!1,!0,[]);return(0,l.useMemo)(()=>t?t.map((r,i)=>{if(i>=e.length)return null;let a="",l="";return i%u.Jf!=0||n||(a='
'),(i+1)%u.Jf!=0&&i!==t.length||n||(l="
"),`${a}
${0!==r.length?r:"\n"}
${l}`}).join("\n"):"
",[e,t,n])}(e,t??null),o=(0,c.Hq)();return(0,r.jsx)(i.sF,{...o?{inert:"inert"}:{},html:n})}function x(e,t,n,r="plain"){let{tabSize:i}=(0,o.G)(),a=(0,d.fq)();return(0,l.useMemo)(()=>e??function(e,t,n,r,i){e||(e="\n");let a=function(e,t,n,r){let i={value:0},a={nodes:[],s:0,e:e.length,c:""},l=t?.filter(e=>(e.e??e.end)>(e.s??e.start));if(!l||0===l.length)return a.nodes.push(y("",e,0,e.length,i,r,n)),a;let o=[a];for(let t=0;t(d.s??d.start)){let t=y("",e,d.s??d.start,s.s??s.start,i,r,n);d.nodes.push(t)}else if(u&&(s.s??s.start)>(u.e??u.end)){let t=y("",e,u.e??u.end,s.s??s.start,i,r,n);d.nodes.push(t)}let h=c&&(c.s??c.start)<(s.e??s.end);if(h){let e={...s,nodes:[]};d.nodes.push(e),o.push(e)}else{let t=y(s.c??s.cssClass,e,s.s??s.start,s.e??s.end,i,r,n);d.nodes.push(t)}if(c&&(c.s??c.start)>=(d.e??d.end)){let t=s.e??s.end;if((d.e??d.end)>t){let a=y("",e,t,d.e??d.end,i,r,n);d.nodes.push(a),t=d.e??d.end}for(;o.length>1&&(c.s??c.start)>=(d.e??d.end);)if(o.pop(),d=o[o.length-1]??a,o.length>1&&(c.s??c.start)>=(d.e??d.end)&&(d.e??d.end)>t){let a=y("",e,t,d.e??d.end,i,r,n);t=d.e??d.end,d.nodes.push(a)}}}for(;o.length>0;){let t=o.pop(),a=t.nodes[t.nodes.length-1];if(a&&(a.e??a.end)<(t.e??t.end)){let l=y("",e,a.e??a.end,t.e??t.end,i,r,n);t.nodes.push(l)}}return a}(e,t,n,r),l=[];return function e(t,n,r,i){for(let a of(t.c&&i.push(``),t.nodes))"nodes"in a?e(a,n,r,i):i.push(function e(t,n,r){switch(n){case"data-attribute":{let i=g(t.text);if(r&&(0,d.ud)(i)){let r=(0,d.yB)(i),a=r.map(r=>{let i=(0,d.v0)(r);return i?(0,d.Ew)(i):e({...t,text:r,c:""},n,!1)});return t.c?`${a.join("")}`:a.join("")}return t.c?``:``}case"separated-characters-chunked":case"separated-characters":{if(t.text&&!t.text.trim())return e({...t},"data-attribute",r);let i=[...t.text];"separated-characters-chunked"!==n||r||(i=t.text.match(/.{1,2}/g)??i);let a=[...i].map(e=>{let t=r?(0,d.v0)(e):void 0;return t?(0,d.Ew)(t):``}).join("");return t.c?`${a}`:a}default:{let e=g(t.text),n=r?(0,d.fN)(e)??e:e;return t.c?`${n}`:n}}}(a,n,r));t.c&&i.push("")}(a,n,i,l),l.join("")}(n,t,r,i,a),[n,e,t,r,i,a])}function y(e,t,n,r,i,a,l){let o=t.substring(n,r),s="plain"!==l?function(e,t,n){let r=[];for(let i of e)if(" "===i){let e=t-n.value%t;r.push(Array(e).fill(" ").join("")),n.value+=e}else r.push(i),n.value+=Array.from(i).length;return r.join("")}(o,a,i):o;return{c:e,s:n,e:r,text:s}}function g(e){return e.replace(/[&<>"']/g,b)}function b(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return e}}try{h.displayName||(h.displayName="SyntaxHighlightedLine")}catch{}try{m.displayName||(m.displayName="SyntaxHighlightedLineWithRef")}catch{}try{p.displayName||(p.displayName="SyntaxHighlightedOverlay")}catch{}try{f.displayName||(f.displayName="SyntaxHighlightedOverlayUnmemoed")}catch{}},35061:(e,t,n)=>{n.d(t,{V:()=>a,d:()=>l});var r=n(85893),i=n(42483);let a="find-result-marks-container";function l(){return(0,r.jsx)(i.Z,{sx:{position:"fixed",top:0,right:0,height:"100%",width:"15px",transition:"transform 0.3s","&:hover":{transform:"scaleX(1.5)"},zIndex:1},id:a})}try{l.displayName||(l.displayName="ScrollMarksContainer")}catch{}},98486:(e,t,n)=>{n.d(t,{Id:()=>x,lv:()=>y});var r=n(85893),i=n(86525),a=n(55703),l=n(52674),o=n(66308),s=n(63451),c=n(42483),d=n(67294),u=n(73935),h=n(40149),m=n(49272);let p="copilot-button-positioner",f="copilot-button-container";function x({children:e}){return(0,r.jsxs)(c.Z,{id:p,sx:{position:"relative"},children:[e,(0,r.jsx)("div",{id:f})]})}let y=d.memo(d.forwardRef(g));function g({rowBeginNumber:e,rowEndNumber:t,id:n,recalcPosition:c},x){let[y,g]=(0,d.useState)(null);(0,d.useImperativeHandle)(x,()=>({setAnchor:g}));let[b,v]=(0,d.useState)({top:0,left:0});(0,s.b)(()=>{let e=()=>requestAnimationFrame(()=>v(function(e,t={x:0,y:0}){let n=document.getElementById(p);if(!e||!n)return{display:"none"};let{top:r,height:i}=e.getBoundingClientRect(),{top:a}=n.getBoundingClientRect(),l=(m.XT-i)/2;return{top:`${r-a-l+t.y+1}px`,right:"37px"}}(y)));return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[y,c]);let{copilotAccessAllowed:j,refInfo:w,path:N}=(0,i.Br)(),C=(0,l.H)(),{language:k,languageID:S}=(0,h.G)(),_=(0,d.useMemo)(()=>({type:"snippet",languageID:S,languageName:k,path:N,range:{start:e,end:t},ref:(0,o.Ju)(w.name,w.refType),commitOID:w.currentOid,repoID:C.id,repoName:C.name,repoOwner:C.ownerLogin,url:window.location.href}),[S,k,N,e,t,w,C]),I=(0,r.jsx)("div",{style:{alignSelf:"center",position:"absolute",lineHeight:"16px",height:"24px",width:"24px",zIndex:2,...b},children:(0,r.jsx)(a.Z,{copilotAccessAllowed:j,messageReference:_,id:n})}),R=document.getElementById(f);return R?(0,u.createPortal)(I,R):null}try{x.displayName||(x.displayName="CopilotButtonContainer")}catch{}try{y.displayName||(y.displayName="CopilotButton")}catch{}try{g.displayName||(g.displayName="CopilotButtonWithRef")}catch{}},9292:(e,t,n)=>{n.r(t),n.d(t,{HighlightedLineMenuContainer:()=>w,default:()=>C,firstOptionId:()=>j});var r=n(85893),i=n(47357),a=n(86525),l=n(29881),o=n(79842),s=n(63451),c=n(85193),d=n(85529),u=n(45677),h=n(50919),m=n(52516),p=n(67294),f=n(73935),x=n(23960),y=n(89463),g=n(49272),b=n(64227);let v="highlighted-line-menu-container",j="highlighted-line-menu-first-option";function w({children:e}){return(0,r.jsxs)("div",{id:g._X,className:"position-relative",children:[e,(0,r.jsx)("div",{id:v})]})}let N=p.memo(p.forwardRef(k)),C=N;function k({codeLineClassName:e,offset:t,lineData:n,onLineStickOrUnstick:w,onMenuClose:N,onCollapseToggle:C,openOnLoad:k=!1,cursorRef:S,rowBeginId:_,rowBeginNumber:I,rowEndId:R,rowEndNumber:L},E){let[T,Z]=(0,p.useState)(null);(0,p.useImperativeHandle)(E,()=>({setAnchor:Z}));let B=p.useRef(null),{githubDevUrl:D}=(0,a.Ou)(),[O,F]=(0,p.useState)(k?"hidden":"visible"),[A,$]=(0,p.useState)({top:0,left:0});(0,s.b)(()=>{let e=()=>{F("hidden"),requestAnimationFrame(()=>{$((0,g.kl)(T,t)),F("visible")})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[T,t]),(0,s.b)(()=>{k&&(S&&Z(S.current),setTimeout(()=>{W(!0)},50))},[]);let{newDiscussionPath:P,newIssuePath:M}=(0,y.nO)(),{refSelectorShortcut:z}=(0,l.bx)(),[H,W]=p.useState(!1),{createPermalink:G,getUrl:U}=(0,o.B)(),{setShouldBeOpen:V,expandOrCollapseSection:K,openUpRefSelector:q}=(0,g.$w)({lineData:n,onLineStickOrUnstick:w,onMenuClose:N,onCollapseToggle:C,setOpen:W}),[Y]=(0,c.l)(),X="1"===Y.get("plain"),Q=G({absolute:!0,params:X?"plain=1":void 0}),J=encodeURIComponent(Q),ee=`L${I}${_!==R?`-L${L}`:""}`,et=(0,r.jsxs)(u.P,{open:H,onOpenChange:V,children:[(0,r.jsx)(u.P.Anchor,{children:(0,r.jsx)(h.h,{className:e,size:"small",icon:d.KebabHorizontalIcon,"aria-label":`Code line ${I} options`,"data-testid":"highlighted-line-menu-button",sx:{alignSelf:"center",zIndex:3,position:"absolute",lineHeight:"16px",height:"24px",width:"24px",visibility:O,...A}})}),(0,r.jsx)(u.P.Overlay,{width:"small",children:(0,r.jsxs)(m.S,{"data-testid":"highlighted-line-menu",children:[I===L&&(0,r.jsx)(m.S.Item,{onClick:()=>{(0,b.dM)(`Copied line ${I}.`);let e=(0,g.kq)(document.getElementById(`LC${I}`));e&&(0,x.z)(e),V(!1)},onSelect:()=>{(0,b.dM)(`Copied line ${I}.`);let e=(0,g.kq)(document.getElementById(`LC${I}`));e&&(0,x.z)(e),V(!1)},ref:B,className:j,children:"Copy line"}),I!==L&&(0,r.jsx)(m.S.Item,{onClick:()=>{(0,b.dM)(`Copied lines ${I}-${L}.`);let e="";for(let t=I;t<=L;t++)e+=`${(0,g.kq)(document.getElementById(`LC${t}`))}${t!==L?"\n":""}`;e&&(0,x.z)(e),V(!1)},onSelect:()=>{(0,b.dM)(`Copied lines ${I}-${L}.`);let e="";for(let t=I;t<=L;t++)e+=`${(0,g.kq)(document.getElementById(`LC${t}`))}${t!==L?"\n":""}`;e&&(0,x.z)(e),V(!1)},className:j,children:"Copy lines"}),Q&&(0,r.jsx)(m.S.Item,{onClick:()=>{(0,b.dM)("Copied permalink."),(0,x.z)(Q),V(!1)},onSelect:()=>{(0,b.dM)("Copied permalink."),(0,x.z)(Q),V(!1)},children:"Copy permalink"}),(0,r.jsx)(m.S.LinkItem,{href:U({action:"blame",hash:ee}),children:"View git blame"}),M&&Q&&(0,r.jsx)(m.S.LinkItem,{href:`${M}?permalink=${J}`,children:"Reference in new issue"}),P&&Q&&(0,r.jsx)(m.S.LinkItem,{href:`${P}?permalink=${J}`,children:"Reference in new discussion"}),D&&(0,r.jsx)(m.S.LinkItem,{href:D+window.location.pathname.substring(1),children:"View file in GitHub.dev"}),I===L&&n&&(0,r.jsxs)(m.S.Item,{onClick:K,onSelect:K,children:[n.ownedSection&&n.ownedSection.collapsed?"Expand":"Collapse"," current section"]}),(0,r.jsxs)(m.S.Item,{onClick:q,onSelect:q,children:["View file in different branch/tag",(0,r.jsx)(m.S.TrailingVisual,{children:(0,r.jsx)(i.I,{children:z.text})})]})]})})]}),en=document.getElementById(v);return en?(0,f.createPortal)(et,en):null}try{w.displayName||(w.displayName="HighlightedLineMenuContainer")}catch{}try{N.displayName||(N.displayName="HighlightedLineMenu")}catch{}try{k.displayName||(k.displayName="HighlightedLineMenuWithRef")}catch{}},81181:(e,t,n)=>{n.d(t,{R:()=>l,o:()=>o});var r=n(85893),i=n(46565),a=n(97011);function l({symbols:e,focusedSymbol:t,lineNumber:n,sx:l,isNotUsingWhitespace:s,className:c}){let d=0,u=e.length>0?e[0].bodyText:"",h=`overlay-${n}-${l?"blob":"panel"}-${u}`,m=(0,i.OY)().codeWrappingOption,p=e.length>0&&!s?e[0].leadingWhitespace??0:0;return(0,r.jsxs)(a.Z,{className:c,sx:{mb:"-20px",color:"transparent",position:"absolute",overflowWrap:m.enabled?"anywhere":"unset",maxWidth:m.enabled?"100%":"unset",maxHeight:"6rem",overflow:"hidden",width:"100%",display:"inline-block",userSelect:"none",...l},children:[e.map(e=>{let n=(0,r.jsxs)("span",{children:[(0,r.jsx)(a.Z,{sx:{userSelect:"none",visibility:"hidden"},children:u.substring(d,e.ident.start.column+p)}),(0,r.jsx)(a.Z,{sx:{bg:e===t?"#ff9632":"attention.muted",zIndex:e===t?10:void 0,color:e===t?"black":void 0,position:e===t?"relative":void 0,userSelect:"none",pointerEvents:"none"},children:(0,r.jsx)(a.Z,{sx:{visibility:e!==t?"hidden":void 0},id:o(e.lineNumber,e.ident.start.column+p),children:u.substring(e.ident.start.column+p,e.ident.end.column+p)})})]},`symbol-${e.ident.start.line}-${e.ident.start.column+p}`);return d=e.ident.end.column+p,n}),(0,r.jsx)(a.Z,{sx:{visibility:"hidden",userSelect:"none"},children:u.substring(d)})]},h)}function o(e,t){return`match-${e}-${t}`}try{l.displayName||(l.displayName="HighlightedOverlay")}catch{}},72051:(e,t,n)=>{n.d(t,{AB:()=>m,H2:()=>h,uy:()=>u});var r=n(85893),i=n(22326),a=n(7949),l=n(87623),o=n(67294),s=n(25754);let c={stylingDirectives:null},d=o.createContext(c);function u({children:e,...t}){return(0,r.jsx)(d.Provider,{value:t,children:e})}function h(){return o.useContext(d)}function m(e,t,n,r,d){let[u,h]=(0,o.useState)(c),m=(0,a.y)("react_blob_overlay"),p=t&&!r?(0,i.xr)({repo:e,commitish:t.name,path:n}):null;return(0,o.useEffect)(()=>{if(!p)return;if(d>s._g||!m){h(c);return}let e=!1,t=async()=>{h(c);let t=await (0,l.v)(p);if(!e)try{if(t.ok){let e=await t.json();e&&Array.isArray(e.stylingDirectives)&&h(e)}else h(c)}catch(e){h(c)}};return t(),function(){e=!0}},[p,d,m]),u}try{d.displayName||(d.displayName="DeferredASTContext")}catch{}try{u.displayName||(u.displayName="DeferredASTProvider")}catch{}},89463:(e,t,n)=>{n.d(t,{Ez:()=>u,Uc:()=>c,nO:()=>d});var r=n(85893),i=n(22326),a=n(87623),l=n(67294);let o={showLicenseMeta:!1,license:null,codeownerInfo:{codeownerPath:null,ownedByCurrentUser:null,ownersForFile:null,ruleForPathLine:null},newDiscussionPath:null,newIssuePath:null},s=l.createContext(o);function c({children:e,...t}){return(0,r.jsx)(s.Provider,{value:t,children:e})}function d(){return l.useContext(s)}function u(e,t,n,r){let[s,c]=(0,l.useState)(o),d=t&&!r?(0,i.zh)({repo:e,commitish:t.name,path:n}):null;return(0,l.useEffect)(()=>{if(!d)return;let e=!1,t=async()=>{c(o);let t=await (0,a.v)(d);if(!e)try{if(t.ok){let e=await t.json();e&&"boolean"==typeof e.showLicenseMeta&&"object"==typeof e.codeownerInfo&&c(e)}else c(o)}catch(e){c(o)}};return t(),function(){e=!0}},[d]),s}try{s.displayName||(s.displayName="DeferredMetadataContext")}catch{}try{c.displayName||(c.displayName="DeferredMetadataProvider")}catch{}},44168:(e,t,n)=>{n.d(t,{F:()=>h,a:()=>u});var r=n(85893),i=n(91801),a=n(37589),l=n(56363),o=n(51952),s=n(67294);let c=(0,l.Z)("localStorage"),d=(0,s.createContext)({openPanel:void 0,setOpenPanel:()=>void 0});function u({children:e,payload:t,openPanelRef:n}){let l="blame"in t,u=(0,i.g6)(t),h=(0,a.x)(),m=(0,s.useRef)(),[p,f]=(0,s.useState)(()=>{let e=c.getItem("codeNavOpen");if(!h&&""!==e&&null!==e||h&&t.symbolsExpanded)return"codeNav"}),x=(l||u)&&"codeNav"===p?void 0:p;s.useEffect(()=>{n.current=x},[x,n]);let y=(0,s.useCallback)((e,t)=>{f(n=>(n&&m.current&&m.current.focus(),m.current=t,l||u&&"codeNav"===e?void 0:e))},[l,u]);!function(e){let{screenSize:t}=(0,o.eI)(),n=(0,s.useRef)(t);(0,s.useEffect)(()=>{let r=n.current>=o._G.large,i=n.current===t;t({openPanel:x,setOpenPanel:y}),[x,y]);return(0,r.jsx)(d.Provider,{value:g,children:e})}function h(){return(0,s.useContext)(d)}try{d.displayName||(d.displayName="OpenPanelContext")}catch{}try{u.displayName||(u.displayName="OpenPanelProvider")}catch{}},37086:(e,t,n)=>{n.d(t,{M:()=>l,Q:()=>o});var r=n(85893),i=n(67294);let a=i.createContext(void 0);function l({blame:e,children:t}){return(0,r.jsxs)(a.Provider,{value:e,children:[" ",t," "]})}function o(){return i.useContext(a)}try{a.displayName||(a.displayName="CurrentBlameContext")}catch{}try{l.displayName||(l.displayName="CurrentBlameProvider")}catch{}},40149:(e,t,n)=>{n.d(t,{G:()=>o,d:()=>l});var r=n(85893),i=n(67294);let a=i.createContext({});function l({blob:e,children:t}){return(0,r.jsxs)(a.Provider,{value:e,children:[" ",t," "]})}function o(){return i.useContext(a)}try{a.displayName||(a.displayName="CurrentBlobContext")}catch{}try{l.displayName||(l.displayName="CurrentBlobProvider")}catch{}},65302:(e,t,n)=>{n.d(t,{$L:()=>u,S6:()=>s,Ub:()=>d,k:()=>c});var r=n(85893),i=n(67294),a=n(37086),l=n(40149);let o=i.createContext(null);function s({children:e}){let t=(0,l.G)(),n=(0,a.Q)(),s=i.useMemo(()=>n?null:new Map,[t,n]);return(0,r.jsxs)(o.Provider,{value:s,children:[" ",e," "]})}function c(){return i.useContext(o)}function d(){let e=i.useContext(o);return(0,i.useCallback)(t=>e?.get(t),[e])}function u(){let e=i.useContext(o);return(0,i.useCallback)((t,n)=>{e&&(e.has(t)?e.get(t)?.push(n):e.set(t,[n]))},[e])}try{o.displayName||(o.displayName="CurrentLineRefMapContext")}catch{}try{s.displayName||(s.displayName="CurrentLineRefMapProvider")}catch{}},3117:(e,t,n)=>{n.d(t,{T:()=>o,c:()=>l});var r=n(85893),i=n(67294);let a=i.createContext({});function l({refreshTree:e,children:t}){return(0,r.jsxs)(a.Provider,{value:e,children:[" ",t," "]})}function o(){return i.useContext(a)}try{a.displayName||(a.displayName="RefreshTreeContext")}catch{}try{l.displayName||(l.displayName="RefreshTreeProvider")}catch{}},20299:(e,t,n)=>{n.d(t,{BN:()=>r,Jj:()=>s,Z$:()=>c,b7:()=>d});var r,i=n(85893),a=n(85529),l=n(98833),o=n(74121);function s(){let e="clipboard"in navigator,t="undefined"!=typeof ClipboardItem;return e&&t}async function c(e){let t=await fetch(e,{method:"get"});if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.status} ${t.statusText}`);let n=(await t.text()).replace(/\r?\n$/,"");return new Blob([n],{type:"text/plain"})}function d(e){let t,n;switch(e){case 2:t="Copied!",n=(0,i.jsx)(l.Z,{icon:a.CheckIcon});break;case 1:t="Copying",n=(0,i.jsx)(o.Z,{size:"small"});break;case 3:t="Something went wrong. Try again.",n=(0,i.jsx)(l.Z,{icon:a.AlertIcon});break;default:t="Copy",n=(0,i.jsx)(l.Z,{icon:a.CopyIcon})}return{ariaLabel:t,content:n}}!function(e){e[e.Idle=0]="Idle",e[e.Fetching=1]="Fetching",e[e.Success=2]="Success",e[e.Error=3]="Error"}(r||(r={}))},44629:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(85893),i=n(29881),a=n(67294),l=n(8308);function o({containerRef:e,shouldNotOverrideCopy:t}){let{selectAllShortcut:n}=(0,i.bx)(),o=(0,a.useRef)(!1),s=(0,l.i)(),c=(0,a.useCallback)(()=>{o.current=!1,document.removeEventListener("selectionchange",c)},[]);(0,a.useEffect)(()=>()=>document.removeEventListener("selectionchange",c),[c]);let d=(0,a.useCallback)(t=>{e&&e.current&&(function(e){let t=document.createRange();t.selectNode(e);let n=window.getSelection();n?.removeAllRanges(),n?.addRange(t)}(e.current),t.preventDefault(),o.current=!0,setTimeout(()=>document.addEventListener("selectionchange",c),0))},[e,c]),u=(0,a.useCallback)(e=>{o.current&&(e.preventDefault(),s())},[s]);return(0,a.useEffect)(()=>{if(!t)return window.addEventListener("copy",u),()=>window.removeEventListener("copy",u)},[u,t]),(0,r.jsx)("button",{hidden:!0,"data-hotkey":n.hotkey,onClick:d})}try{o.displayName||(o.displayName="SelectAllShortcutButton")}catch{}},89673:(e,t,n)=>{n.d(t,{Z:()=>b,a:()=>x});var r=n(85893),i=n(22326),a=n(77461),l=n(46741),o=n(85529),s=n(42483),c=n(73290),d=n(97011),u=n(75308),h=n(50919),m=n(67294),p=n(23960),f=n(38498);function x({id:e="breadcrumb",fileNameId:t,path:n,repo:i,commitish:a,isFolder:o,fontSize:c,showCopyPathButton:d}){let{fileName:u,segments:h}=(0,m.useMemo)(()=>(function(e){let t=e.split("/"),n=t.pop();return{fileName:n,segments:t.map((e,n)=>({directoryName:e,directoryPath:t.slice(0,n+1).join("/")}))}})(n),[n]),p=!n;return(0,r.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"row",fontSize:c??2,minWidth:0,flexShrink:1,flexWrap:"wrap",maxWidth:"100%",alignItems:"center"},children:[(0,r.jsxs)(s.Z,{as:"nav","data-testid":"breadcrumbs","aria-labelledby":`${e}-heading`,id:e,sx:{maxWidth:"100%"},children:[(0,r.jsx)(l.N,{id:`${e}-heading`,as:"h2",text:"Breadcrumbs"}),(0,r.jsxs)(s.Z,{as:"ol",sx:{maxWidth:"100%",listStyle:"none",display:"inline-block"},children:[(0,r.jsx)(s.Z,{as:"li",sx:{display:"inline-block",maxWidth:"100%"},children:(0,r.jsx)(y,{repo:i,commitish:a})}),h.map(({directoryName:e,directoryPath:t})=>(0,r.jsxs)(s.Z,{as:"li",sx:{display:"inline-block",maxWidth:"100%"},children:[(0,r.jsx)(b,{fontSize:c}),e?(0,r.jsx)(g,{path:t,directoryName:e,repo:i,commitish:a}):null]},t))]})]}),u&&(0,r.jsxs)(s.Z,{"data-testid":"breadcrumbs-filename",sx:{display:"inline-block",maxWidth:"100%"},children:[(0,r.jsx)(b,{fontSize:c}),(0,r.jsx)(v,{value:u,id:t,fontSize:c}),!p&&o&&(0,r.jsx)(b,{})]},u),d&&(0,r.jsx)(j,{path:n})]})}function y({repo:e,commitish:t}){return(0,r.jsx)(c.Z,{as:a.r,sx:{fontWeight:"bold"},to:(0,i.Qi)({repo:e,commitish:t,action:"tree"}),"data-testid":"breadcrumbs-repo-link",reloadDocument:!0,children:e.name})}function g({directoryName:e,path:t,repo:n,commitish:l}){return(0,r.jsx)(c.Z,{as:a.r,to:(0,i.Qi)({repo:n,commitish:l,path:t,action:"tree"}),sx:{fontWeight:400},children:e})}function b({fontSize:e}){return(0,r.jsx)(d.Z,{sx:{px:1,fontWeight:400,color:"fg.muted",fontSize:e??2},"aria-hidden":"true",children:"/"})}function v({value:e,id:t,fontSize:n}){return(0,r.jsx)(u.Z,{as:"h1",tabIndex:-1,sx:{fontWeight:600,display:"inline-block",maxWidth:"100%",fontSize:n??2},id:t,children:e})}function j({path:e}){let t=(0,m.useRef)(null),[n,i,a]=(0,f.a)("copy-path-tooltip",t,{direction:"nw"}),l="Copy path",[s,c]=(0,m.useState)(!1),d=(0,m.useCallback)(()=>{s||((0,p.z)(e),c(!0),n("Copied path!"),setTimeout(()=>{c(!1),i()},3e3))},[s,e,n,i]),u=(0,m.useCallback)(()=>{s||n(l)},[s,l,n]),x=(0,m.useCallback)(()=>{s||i()},[s,i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.h,{icon:s?o.CheckIcon:o.CopyIcon,ref:t,variant:"invisible",size:"small","aria-label":l,onClick:d,onFocus:()=>u(),onMouseEnter:()=>u(),onMouseLeave:()=>x(),onBlur:()=>x(),sx:{ml:2},"data-testid":"breadcrumb-copy-path-button"}),a]})}try{x.displayName||(x.displayName="Breadcrumb")}catch{}try{y.displayName||(y.displayName="RepoLink")}catch{}try{g.displayName||(g.displayName="DirectoryLink")}catch{}try{b.displayName||(b.displayName="Separator")}catch{}try{v.displayName||(v.displayName="FileName")}catch{}try{j.displayName||(j.displayName="CopyPathButton")}catch{}},48092:(e,t,n)=>{n.d(t,{V:()=>s});var r=n(85893),i=n(85529),a=n(65379),l=n(50919),o=n(67294);let s=o.forwardRef(({expanded:e,testid:t,ariaLabel:n,ariaControls:o,onToggleExpanded:s,sx:c,alignment:d,dataHotkey:u,className:h,tooltipDirection:m},p)=>(0,r.jsx)(a.Z,{"aria-label":n,id:`expand-button-${t}`,direction:m,children:(0,r.jsx)(l.h,{ref:p,"data-testid":e?`collapse-${t}`:`expand-${t}`,"aria-labelledby":`expand-button-${t}`,"aria-expanded":e,"aria-controls":o,icon:e?"left"===d?i.SidebarExpandIcon:i.SidebarCollapseIcon:"left"===d?i.SidebarCollapseIcon:i.SidebarExpandIcon,sx:{color:"fg.muted",...c},"data-hotkey":u,onClick:e=>{s(e)},variant:"invisible",className:h})}));s.displayName="ExpandButton"},38498:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(85893),i=n(24815),a=n(67294);function l(e,t,n){let[i,l]=(0,a.useState)(""),s=(0,a.useCallback)(()=>{l("")},[]),c=(0,a.useCallback)(e=>{l(e),t.current!==document.activeElement&&setTimeout(s,3e3)},[s,t]);return[c,s,(0,r.jsx)(o,{message:i,id:e,contentRef:t,clearMessage:s,portalTooltipProps:n},e)]}function o({message:e,id:t,contentRef:n,clearMessage:a,portalTooltipProps:l}){return e?(0,r.jsx)(i.u,{id:t,contentRef:n,"aria-label":e,open:!!e,onMouseLeave:a,"aria-live":"assertive",...l}):null}try{o.displayName||(o.displayName="AlertTooltip")}catch{}},88947:(e,t,n)=>{n.r(t),n.d(t,{FileResultRow:()=>$,default:()=>F});var r=n(85893),i=n(211),a=n(86525),l=n(23180),o=n(79842),s=n(52674),c=n(15429),d=n(22326),u=n(77461),h=n(51952),m=n(85193),p=n(48542),f=n(13275),x=n(85529),y=n(17840),g=n(42483),b=n(51461),v=n(52516),j=n(73290),w=n(2708),N=n(74121),C=n(98833),k=n(97011),S=n(47142),_=n(67294),I=n(28114),R=n(15205);let L=(0,R.Z)(S.Gs);function E({data:e}){let{query:t,baseList:n,startTime:r}=e,i=t.replaceAll("\\",""),a=n.filter(e=>""===i||(0,S.CD)(i,e)&&L(i,e)>0).sort((e,t)=>L(i,t)-L(i,e));return{query:t,list:a,baseCount:n.length,startTime:r}}var T=n(21573),Z=n(87623);async function B(e){let t=await (0,Z.v)(e);return t.ok?await t.json():void 0}let D=new Map,O=(0,R.Z)(B,{cache:D});function F({onRenderRow:e,onItemSelected:t,searchBoxRef:n,sx:u={},...x}){let{query:N,setQuery:C}=(0,i.aM)(),k=(0,s.H)(),S=_.useRef(null),R=n??S,[L,Z]=_.useState(N.length>0),[B,D]=_.useState(!!N),{list:F,directories:$,loading:P,error:M}=function(e){let t=(0,s.H)(),{refInfo:n}=(0,a.Br)(),[r,i]=(0,_.useState)({list:[],directories:[],loading:!0}),l=(0,d.a_)({repo:t,commitOid:n.currentOid,includeDirectories:!0});return(0,_.useEffect)(()=>{let t=!1,n=async()=>{i({list:[],directories:[],loading:!0});let e=await O(l);if(t)return;let n=e?.paths||[],r=e?.directories||[],a=n.concat(r).sort();i({list:a,directories:r,error:!e})};return e&&n(),function(){t=!0}},[l,e]),r}(L),{path:H}=(0,a.Br)(),{findFileWorkerPath:W}=(0,a.Ou)(),{getUrl:G}=(0,o.B)(),{queryText:U,queryLine:V}=function(e){e=e.replaceAll(" ","");let t=e.indexOf(":");return t>=0?{queryText:e.substring(0,t),queryLine:parseInt(e.substring(t+1),10)}:{queryText:e,queryLine:void 0}}(N),{matches:K,clearMatches:q}=function(e,t,n,r){let[i,a]=_.useState(),o=_.useRef(""),s=_.useRef(),{sendStats:c}=(0,l.a)(),d=_.useRef(!1),u=_.useCallback(()=>{let e=new I.V(n,E);e.onmessage=({data:e})=>{d.current=!1,a(e.list),o.current=e.query,e.startTime&&c("repository.find-file",{"find-file-base-count":e.baseCount,"find-file-results-count":e.list.length,"find-file-duration-ms":performance.now()-e.startTime})},s.current=e},[c,n]);return _.useEffect(()=>{if(r)return u(),function(){s.current?.terminate()}},[u,r]),_.useEffect(()=>{if(e.length&&t){d.current&&(s.current?.terminate(),u());let n=o.current&&t.startsWith(o.current);d.current=!0,s.current?.postMessage({baseList:n&&i||e,query:t,startTime:performance.now()})}},[e,t,u]),{matches:i,clearMatches:()=>a(void 0)}}(F,U,W,L),{sendRepoClickEvent:Y}=(0,l.a)(),X=(0,m.s)(),[Q,J]=_.useState(0),[ee,et]=_.useState((0,T.$)()),en=_.useRef(null),er=_.useRef(null),ei="file-results-list",{sendRepoKeyDownEvent:ea}=(0,l.a)(),{screenSize:el}=(0,h.eI)(),eo=x.useOverlay||el>=h._G.large,es=_.useCallback(()=>{Y("FILE_TREE.SEARCH_RESULT_CLICK"),t?.(),D(!1)},[Y,t]),{containerRef:ec}=(0,y.v)({bindKeys:p.Qw.ArrowVertical|p.Qw.HomeAndEnd,focusInStrategy:"previous"},[P,M]);_.useEffect(()=>{N||D(!1)},[N]),_.useEffect(()=>{document.activeElement!==R.current&&eo&&D(!1)},[H,R,eo]);let ed=K?.slice(0,40)||[],eu=K&&K.length>ed.length,eh=(0,r.jsx)(g.Z,{sx:{maxHeight:eo?"60vh":"100% !important",overflowY:"auto",scrollbarGutter:"stable",maxWidth:"100vw","@media (max-width: 768px)":{ml:3,mr:2}},children:M?(0,r.jsx)(b.Z,{variant:"danger",sx:{m:3},children:"Failed to search"}):(0,r.jsxs)(v.S,{ref:ec,sx:{overflow:"auto",p:eo?2:3,width:"100%",pr:eo?3:0,pt:eo?3:"2px !important"},role:"listbox",children:[!P&&ed.map((t,n)=>{let i=$.includes(t);return(0,r.jsx)(z,{active:t===H,index:n,focused:ee&&Q===n,match:t,onRender:e,query:U,onClick:es,isDirectory:i,to:G({path:t,action:i?"tree":"blob",hash:V?`L${V}`:""}),useOverlay:eo,listRef:ec},t)}),(0,r.jsxs)(g.Z,{sx:{m:3,textAlign:"center"},children:[(0,r.jsx)(A,{loading:P||!K,visibleResultCount:ed.length,truncated:!!eu}),eu&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(j.Z,{id:"see-all-results-link",className:"focus-visible",ref:en,href:(0,d.mY)({owner:k.ownerLogin,repo:k.name,searchTerm:`path:${U}`}),sx:ee&&Q===ed.length?{outline:"2px solid var(--focus-outlineColor, var(--color-accent-fg))",outlineOffset:"-2px",boxShadow:"none"}:{},children:"See all results"})]})]})]})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.Z,{ref:er,sx:{mx:2,ml:3,...u},children:(0,r.jsx)(T.f,{ariaActiveDescendant:(!eo&&N||eo&&B)&&ee&&Q>-1?eu&&Q===ed.length?"see-all-results-link":`file-result-${Q}`:void 0,ariaExpanded:eo?B:void 0,ariaHasPopup:eo,ariaControls:eo?ei:void 0,ref:R,query:N,onKeyDown:e=>{let{key:t,shiftKey:n,metaKey:r,altKey:i,ctrlKey:a}=e;if(!n&&!r&&!i){if("Escape"===t)N?(ea("FILE_TREE.CANCEL_SEARCH"),C(""),q()):document.activeElement&&document.activeElement.blur();else if(!N)return;else if("Enter"===t)eu&&Q===ed.length?X((0,d.mY)({owner:k.ownerLogin,repo:k.name,searchTerm:`path:${U}`})):ed[Q]&&(X(G({path:ed[Q],action:"blob",hash:V?`L${V}`:""})),D(!1));else if("ArrowDown"===t||a&&"n"===t){if(eu&&Q>=ed.length-1){if(J(ed.length),en.current&&ec.current){let e=(0,c.M)(ec.current);(0,f.z)(en.current,e,{behavior:"instant"})}}else J(Math.min(Q+1,ed.length-1));e.preventDefault();return}else if("ArrowUp"===t||a&&"p"===t){J(Math.max(Q-1,0)),e.preventDefault();return}}},onPreload:()=>Z(!0),onSearch:e=>{C(e),e?D(!0):(q(),D(!1)),J(0)},onBlur:e=>{ec.current?.contains(e.relatedTarget)||(D(!1),et(!1))},onFocus:()=>{N&&D(!0),et(!0)},sx:{minWidth:"160px"}})}),eo&&(0,r.jsx)(w.w,{anchorRef:er,open:eo&&B,renderAnchor:null,onClose:()=>{D(!1)},focusZoneSettings:{disabled:!0},focusTrapSettings:{disabled:!0},width:"xlarge",align:"end",overlayProps:{id:ei,role:"dialog"},children:eh}),!eo&&N&&eh]})}function A({visibleResultCount:e,truncated:t,loading:n}){return(0,r.jsx)("span",{role:"status",className:n||t||0===e?void 0:"sr-only","aria-label":n?"Loading":void 0,children:n?(0,r.jsx)(N.Z,{size:"large"}):0===e?"No matches found":t?`First ${e} files shown.`:`Showing ${e} files.`},"results-count-status")}let $=({active:e,focused:t,index:n,match:i,query:a,to:l,isDirectory:o,onClick:s,onRender:d,useOverlay:h,listRef:m})=>{let p=(0,S.m7)(a,i);d?.();let x=_.useRef(null),y=o?P:M;_.useEffect(()=>{if(t&&x.current&&m?.current){let e=(0,c.M)(m.current);(0,f.z)(x.current,e,{behavior:"instant"})}},[t,m]);let b={};return t&&(b={outline:"none",border:"2 solid",boxShadow:"0 0 0 2px #0969da"}),(0,r.jsx)(v.S.Item,{id:`file-result-${n}`,ref:x,as:u.r,onSelect:s,to:l,active:e,sx:{fontWeight:"normal",":hover":{textDecoration:"none"},mx:"2px",width:"calc(100% - 4px)",...b},role:"option","data-focus-visible-added":t||void 0,tabIndex:h?-1:0,children:(0,r.jsxs)(g.Z,{sx:{display:"flex"},children:[(0,r.jsx)(g.Z,{sx:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},children:(0,r.jsx)(H,{text:i,positionsList:p,sx:{color:"fg.muted"},LeadingIcon:y})}),t&&(0,r.jsx)(g.Z,{sx:{pl:1,whiteSpace:"nowrap",color:"fg.muted"},children:`Go to ${o?"folder":"file"}`})]})},i)},P=()=>(0,r.jsx)(C.Z,{"aria-label":"Directory",icon:x.FileDirectoryFillIcon,sx:{color:"var(--treeViewItem-leadingVisual-iconColor-rest, var(--color-icon-directory))",mr:2},size:"small"}),M=()=>(0,r.jsx)(C.Z,{"aria-label":"File",icon:x.FileIcon,sx:{color:"fg.muted",mr:2},size:"small"}),z=_.memo($);function H({text:e,positionsList:t,sx:n,LeadingIcon:i}){let a=[],l=0;for(let n of t){if(Number(n)!==n||ne.length)continue;let t=e.slice(l,n);t&&a.push(W(t)),l=n+1,a.push((0,r.jsx)(k.Z,{as:"mark",sx:{fontWeight:"bold",background:"none",color:"fg.default"},children:e[n]},n))}return a.push(W(e.slice(l))),(0,r.jsx)(g.Z,{sx:n,children:(0,r.jsxs)(r.Fragment,{children:[i&&(0,r.jsx)(i,{}),a]})})}function W(e){return e.replaceAll("/","/\u200B")}try{F.displayName||(F.displayName="FileResultsList")}catch{}try{A.displayName||(A.displayName="FileResultsStatus")}catch{}try{$.displayName||($.displayName="FileResultRow")}catch{}try{P.displayName||(P.displayName="DirectoryIcon")}catch{}try{M.displayName||(M.displayName="FileResultIcon")}catch{}try{z.displayName||(z.displayName="MemoizedFileResultRow")}catch{}try{H.displayName||(H.displayName="HighlightMatch")}catch{}},21573:(e,t,n)=>{n.d(t,{$:()=>m,f:()=>h});var r=n(85893),i=n(46263),a=n(47357),l=n(23180),o=n(71207),s=n(85529),c=n(51526),d=n(42483),u=n(67294);let h=u.forwardRef(({ariaActiveDescendant:e,ariaControls:t,ariaExpanded:n,ariaHasPopup:o,onBlur:h,onFocus:p,onKeyDown:f,onPreload:x,onSearch:y,query:g,sx:b={}},v)=>{let{sendRepoClickEvent:j}=(0,l.a)(),[w,N]=u.useState(g),C=u.useRef((0,i.D)(e=>y(e),250));u.useEffect(()=>{N(g)},[g]);let k=g?(0,r.jsx)(c.Z.Action,{onClick:()=>{j("FILE_TREE.CANCEL_SEARCH"),y("")},icon:s.XCircleFillIcon,"aria-label":"Clear",sx:{color:"fg.subtle"}}):void 0;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c.Z,{autoFocus:m(),ref:v,value:w,onKeyDown:f,onChange:e=>{N(e.target.value),x(),C.current(e.target.value)},sx:{display:"flex",...b},"aria-label":"Go to file","aria-activedescendant":e,role:o?"combobox":void 0,"aria-controls":t,"aria-expanded":n,"aria-haspopup":o?"dialog":void 0,autoCorrect:"off",spellCheck:"false",placeholder:"Go to file",leadingVisual:s.SearchIcon,trailingAction:k,trailingVisual:k?void 0:()=>(0,r.jsx)(a.I,{children:(0,r.jsx)(d.Z,{sx:{mr:"-6px"},children:(0,r.jsx)("kbd",{children:"t"})})}),onFocus:e=>{x(),e.target.select(),p?.(e)},onBlur:h,onClick:()=>j("FILE_TREE.SEARCH_BOX")})})});function m(){let e=new URLSearchParams(o.ssrSafeLocation.search);return"1"===e.get("search")}h.displayName="FilesSearchBox"},52022:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(85893),i=n(79621),a=n(85529),l=n(50919),o=n(86010),s=n(67294);let c={square:"AskCopilotButton-module__square--o8kDO",muted:"AskCopilotButton-module__muted--QatcG"};function d({children:e,referenceType:t,...n}){let d=(0,s.useRef)(null),u=`Ask Copilot about this ${t}`,[h,m]=(0,i.g)({"aria-label":u,contentRef:d,direction:"sw",anchorSide:"outside-bottom"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.h,{className:(0,o.Z)(c.square,!!e&&c.muted),ref:d,icon:a.CopilotIcon,size:"small","aria-label":u,"data-testid":"copilot-ask-menu",...h,...n}),m]})}try{d.displayName||(d.displayName="AskCopilotButton")}catch{}},55703:(e,t,n)=>{n.d(t,{Z:()=>f,o:()=>x});var r=n(85893),i=n(7949),a=n(85529),l=n(33831),o=n(45677),s=n(52516),c=n(67294),d=n(51927),u=n(85355),h=n(52022);let m={"menu-button":"CopilotCodeLinesMenu-module__menu-button--VNLPN"},p="code-line-dropdown-copilot-button";function f({copilotAccessAllowed:e,messageReference:t,hideDropdown:n,id:f}){let[y,g]=(0,c.useState)(!1),b=(0,i.y)("copilot_smell_icebreaker_ux"),v=(0,c.useCallback)(()=>{(0,d.L4)({intent:u.A9.conversation,references:[t],id:f}),g(!1)},[f,t]);return e?(0,r.jsxs)(l.Z,{className:n?"pr-0":"",children:[(0,r.jsx)(h.Z,{referenceType:t.type,onClick:n?()=>x(t,!0,f):v,id:f}),n?void 0:(0,r.jsxs)(o.P,{open:y,onOpenChange:g,children:[(0,r.jsx)(o.P.Button,{id:p,trailingAction:a.TriangleDownIcon,size:"small","aria-label":"Copilot menu",className:m["menu-button"],children:(0,r.jsx)("div",{style:{width:0}})}),(0,r.jsx)(o.P.Overlay,{align:"end",onKeyDown:e=>{"Escape"===e.key&&(e?.stopPropagation(),g(!1))},children:(0,r.jsxs)(s.S,{children:[(0,r.jsx)(s.S.Item,{onSelect:()=>{(0,d.L4)({content:"Explain",intent:u.A9.explain,references:[t],id:p}),g(!1)},children:"Explain"}),b?(0,r.jsx)(s.S.Item,{onSelect:()=>{(0,d.L4)({content:"Suggest improvements to this code.",intent:u.A9.suggest,references:[t],id:p}),g(!1)},children:"Suggest improvements"}):null,(0,r.jsx)(s.S.Divider,{}),(0,r.jsx)(s.S.Item,{onSelect:()=>{x(t,!0,p),g(!1)},children:"Attach to current thread"})]})})]})]}):null}let x=(e,t,n)=>{t?((0,d.cw)(e,!0,n),(0,d.L4)({intent:u.A9.conversation,id:n})):(0,d.L4)({intent:u.A9.conversation,references:[e],id:n})};try{f.displayName||(f.displayName="CopilotCodeLinesMenu")}catch{}},65567:(e,t,n)=>{n.d(t,{y:()=>w});var r,i=n(85893),a=n(52674),l=n(31386),o=n(95346),s=n(59434),c=n(87623),d=n(85529),u=n(89042),h=n(42483),m=n(2708),p=n(88216),f=n(62719),x=n(75308),y=n(97011),g=n(73290),b=n(67294),v=n(37589);let j={ORG_ADMIN:`For an organization, developers writing less boilerplate code means more productivity, while learning new technologies means delivering better customers solutions. Try it in Codespaces or your file editor.`,ORG_MEMBER:`We noticed that you're personally paying for GitHub Copilot. Instead, ask your organization admin to purchase the business version of GitHub Copilot.`,STANDARD:`Spend less time creating boilerplate and repetitive code patterns, and more time building great software. Try it in Codespaces or your favorite file editor.`},w=({view:e,copilotInfo:t,className:n})=>{let{documentationUrl:r,notices:w,userAccess:N}=t??{},{business:C,orgHasCFBAccess:k,userHasCFIAccess:S,userHasOrgs:_,userIsOrgAdmin:I,userIsOrgMember:R,featureRequestInfo:L}=N??{},{codeViewPopover:E}=w??{},{sendClickAnalyticsEvent:T}=(0,s.w)(),Z=(0,v.x)(),{isOrgOwned:B,ownerLogin:D}=(0,a.H)(),{inProgress:O,requested:F,toggleFeatureRequest:A}=(0,l.mG)(L),[$,P]=(0,b.useState)(!1),[M,z]=(0,b.useState)(!1),H=(0,b.useCallback)(()=>P(!0),[P]),W=(0,b.useCallback)(()=>P(!1),[P]),G=(0,b.useCallback)(()=>N&&B&&R&&!I&&(!k||S)?"Your organization can pay for GitHub Copilot":"Code 55% faster with GitHub Copilot",[k,B,N,S,I,R]),U=()=>L?.showFeatureRequest?F?(0,i.jsx)(l.VH,{inProgress:O,toggleFeatureRequest:A}):(0,i.jsx)(l.Bb,{inProgress:O,toggleFeatureRequest:A,featureName:L?.featureName}):null,V=()=>Z&&D===Z.login?"owner":I?"admin":R?"member":"personal",K=()=>{Z&&T({category:"copilot_popover_code_view",action:`click_to_open_popover_${e}`,label:`ref_cta:open_copilot_popover;owner:${D};relationship:${V()}`})},q=(t,n)=>{T({category:"copilot_popover_code_view",action:t,label:`ref_cta:${n};ref_loc:code_view_${e}`})},Y=()=>{let t=`${B?"org_":""}code_view_${e}${I?"_org_admin":""}`;T({category:"copilot_popover_code_view",action:"click_to_dismiss_copilot_popover_forever",label:`ref_cta:dont_show_again;ref_loc:${t}`})},X=()=>{let e=N?.userHasOrgs??!1;T({category:"copilot_popover_code_view",action:`click_to_go_to_copilot_for_${e?"business":"individuals"}_info`,label:"ref_cta:learn_more;ref_loc:code_view"})};return M||!t?null:(0,i.jsx)(h.Z,{className:n,children:(0,i.jsx)(m.w,{onOpen:H,onClose:W,open:$,overlayProps:{role:"dialog",sx:{overflow:"inherit"}},focusZoneSettings:{disabled:!0},renderAnchor:e=>(0,i.jsx)(p.r,{...e,...(0,o.f)("copilot-popover-button"),leadingVisual:d.CopilotIcon,onClick:()=>{P(!$),K()},size:"small",sx:{color:"fg.default",display:["none","none","none","none","block"]},variant:"invisible",children:G()}),children:(0,i.jsxs)(f.Z,{...(0,o.f)("copilot-popover-content"),caret:"top",sx:{display:"flex",flexDirection:"column",fontSize:1,justifyContent:"space-between",padding:4,width:"350px"},children:[(0,i.jsx)(x.Z,{as:"h2",sx:{fontSize:1,fontWeight:"bold",pb:3},children:"Code 55% faster with GitHub Copilot"}),(0,i.jsxs)(h.Z,{sx:{fontSize:1,fontWeight:"normal",pb:3},children:[(0,i.jsx)(y.Z,{...(0,o.f)("copilot-popover-body-text"),children:(()=>{if(N&&B){if(I)return j.ORG_ADMIN;if(R&&S)return j.ORG_MEMBER}return j.STANDARD})()}),(0,i.jsx)(g.Z,{...(0,o.f)("copilot-popover-content-learn-more"),"aria-label":"Click this link to learn more about copilot. This action opens in a new tab.",target:"_blank",href:r,onClick:()=>X(),sx:{marginLeft:"8px"},children:"Learn more"})]}),(0,i.jsxs)(h.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row"},children:[(()=>{let e=!!C||S;return e||B&&(!B||R)?R&&!k&&I?(0,i.jsx)(u.Q,{type:"button",href:`/github-copilot/business_signup/organization/payment?org=${D}`,onClick:()=>q("click_to_buy_copilot_for_business","get_github_copilot"),children:"Get GitHub Copilot"}):L?(0,i.jsx)(U,{}):null:_?(0,i.jsx)(u.Q,{type:"button",href:"/settings/copilot",onClick:()=>q("click_to_go_to_copilot_settings","get_github_copilot"),children:"Get GitHub Copilot"}):(0,i.jsx)(u.Q,{type:"button",href:"/github-copilot/signup",onClick:()=>q("click_to_go_to_copilot_trial_signup","start_a_free_trial"),children:"Start a free trial"})})(),(0,i.jsx)(p.r,{...(0,o.f)("copilot-popover-dismiss-button"),variant:"invisible",onClick:()=>{E&&((0,c.Q)(E.dismissPath,{method:R?"DELETE":"POST"}),Y(),z(!0))},sx:{cursor:"pointer",fontSize:1,fontWeight:"bold",textDecorationLine:"none",marginLeft:"8px"},children:"Don't show again"})]})]})})})};try{w.displayName||(w.displayName="CopilotPopover")}catch{}try{(r=FeatureRequest).displayName||(r.displayName="FeatureRequest")}catch{}},31386:(e,t,n)=>{n.d(t,{VH:()=>v,g6:()=>g,Bb:()=>b,mG:()=>y});var r=n(85893),i=n(88216),a=n(73290),l=n(98833),o=n(85529),s=n(95346),c=n(59434),d=n(67294),u=n(88049),h=n(87623);let m=async(e,t,n)=>{try{let r=await (0,h.Q)(e,{method:t,body:n});return r.ok}catch(e){return!1}},p=(e,t)=>m(e,"DELETE",x(t)),f=(e,t)=>m(e,"POST",x(t)),x=e=>{let t=new FormData;return t.append("feature",e),t};function y(e){let{alreadyRequested:t=!1,featureName:n="",requestPath:r=""}=e??{},[i,a]=(0,d.useState)(!1),[l,o]=(0,d.useState)(t),{addToast:s}=(0,u.V6)(),c=async()=>{a(!0);let e=l?p:f,t=await e(r,n);t?o(!l):s({type:"error",message:"Something went wrong. Please try again later."}),a(!1)};return{inProgress:i,requested:l,toggleFeatureRequest:c}}function g({featureRequestInfo:e,learnMorePath:t,requestMessage:n,requestedMessage:i}){let{inProgress:a,requested:l,toggleFeatureRequest:o}=y(e);return e.showFeatureRequest?l?(0,r.jsx)(v,{inProgress:a,toggleFeatureRequest:o,requestedMessage:i}):(0,r.jsx)(b,{inProgress:a,toggleFeatureRequest:o,featureName:e.featureName,learnMorePath:t,requestMessage:n}):null}let b=({inProgress:e,toggleFeatureRequest:t,featureName:n,learnMorePath:i,requestMessage:a})=>{let{sendClickAnalyticsEvent:l}=(0,c.w)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{onClick:()=>{t(),l({category:"member_feature_request",action:`action.${n}`,label:`ref_cta:ask_admin_for_access;ref_loc:${n};`})},inProgress:e}),a&&(0,r.jsx)(N,{message:a}),i&&(0,r.jsx)(w,{onClick:()=>{l({category:"suggestion",action:"click_to_read_docs",label:`ref_cta:learn_more;ref_loc:${n};`})},path:i})]})},v=({inProgress:e,toggleFeatureRequest:t,requestedMessage:n})=>(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(C,{message:n}),(0,r.jsx)(k,{onClick:t,inProgress:e})]}),j=({onClick:e,inProgress:t})=>(0,r.jsx)(i.r,{onClick:e,disabled:t,...(0,s.f)("feature-request-request-button"),children:t?"Requesting...":"Ask admin for access"}),w=({onClick:e,path:t})=>(0,r.jsx)(a.Z,{href:t,onClick:e,...(0,s.f)("feature-request-learn-more-link"),children:"Learn more"}),N=({message:e})=>(0,r.jsx)("span",{children:e}),C=({message:e})=>(0,r.jsxs)("span",{className:"d-inline-block color-fg-subtle mr-1",children:[(0,r.jsx)(l.Z,{icon:o.CheckIcon}),e]}),k=({onClick:e,inProgress:t})=>(0,r.jsx)(a.Z,{className:"color-fg-danger text-semibold",as:"button",onClick:e,disabled:t,...(0,s.f)("feature-request-cancel-link"),children:t?"Cancelling...":"Remove request"});try{g.displayName||(g.displayName="FeatureRequest")}catch{}try{b.displayName||(b.displayName="RequestFeature")}catch{}try{v.displayName||(v.displayName="CancelFeatureRequest")}catch{}try{j.displayName||(j.displayName="RequestCTA")}catch{}try{w.displayName||(w.displayName="LearnMore")}catch{}try{N.displayName||(N.displayName="RequestMessage")}catch{}try{C.displayName||(C.displayName="RequestedMessage")}catch{}try{k.displayName||(k.displayName="RemoveRequestCTA")}catch{}},5475:(e,t,n)=>{n.d(t,{g:()=>r});function r({path:e,Component:t,shouldNavigateOnError:n,transitionType:r}){return{path:e,Component:t,coreLoader:async function({location:e}){let t;try{let n=`${e.pathname}${e.search}`;t=await window.fetch(n,{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-GitHub-Target":"dotcom"}})}catch(e){return{type:n?"route-handled-error":"error",error:{type:"fetchError"}}}if(t.redirected)return{type:"redirect",url:t.url};if(!t.ok)return{type:n?"route-handled-error":"error",error:{type:"httpError",httpStatus:t.status}};try{let e=await t.json();return{type:"loaded",data:e,title:e.title}}catch(e){return{type:n?"route-handled-error":"error",error:{type:"badResponseError"}}}},loadFromEmbeddedData:function({embeddedData:e}){return{data:e,title:e.title}},transitionType:r}}},46565:(e,t,n)=>{n.d(t,{Kl:()=>m,OY:()=>f,SM:()=>s});var r=n(85893),i=n(56363),a=n(67294);let l=(0,i.Z)("localStorage"),o="codeView.codeFolding",s="codeView.codeWrapping",c="codeView.centerView",d="codeView.openSymbolsOnClick",u=new Map([[o,"Show code folding buttons"],[s,"Wrap lines"],[c,"Center content"],[d,"Open symbols on click"]]),h=(0,a.createContext)({codeFoldingOption:{},codeWrappingOption:{},codeCenterOption:{},openSymbolsOption:{}}),m=({children:e})=>{let t=p(o,!0),n=p(s,!1),i=p(c,!1),l=p(d,!0),u=(0,a.useMemo)(()=>({codeFoldingOption:t,codeWrappingOption:n,codeCenterOption:i,openSymbolsOption:l}),[t,n,i,l]);return(0,r.jsx)(h.Provider,{value:u,children:e})};function p(e,t){let n=l.getItem(e),[r,i]=(0,a.useState)(()=>n?"true"===n:t),o=u.get(e)||"";return{name:e,enabled:r,setEnabled:i,label:o}}function f(){return(0,a.useContext)(h)}try{h.displayName||(h.displayName="CodeViewOptionsContext")}catch{}try{m.displayName||(m.displayName="CodeViewOptionsProvider")}catch{}}},e=>{var t=t=>e(e.s=t);e.O(0,["react-lib","vendors-node_modules_dompurify_dist_purify_js","vendors-node_modules_primer_octicons-react_dist_index_esm_js-node_modules_primer_react_lib-es-541a38","vendors-node_modules_primer_react_lib-esm_Box_Box_js","vendors-node_modules_primer_react_lib-esm_Button_Button_js","vendors-node_modules_primer_react_lib-esm_ActionList_index_js","vendors-node_modules_primer_behaviors_dist_esm_focus-zone_js","vendors-node_modules_primer_react_lib-esm_Overlay_Overlay_js-node_modules_primer_react_lib-es-fa1130","vendors-node_modules_primer_react_lib-esm_Text_Text_js-node_modules_primer_react_lib-esm_Text-7845da","vendors-node_modules_primer_react_lib-esm_FormControl_FormControl_js","vendors-node_modules_primer_react_lib-esm_ActionMenu_ActionMenu_js","vendors-node_modules_github_catalyst_lib_index_js-node_modules_github_hydro-analytics-client_-4da1df","vendors-node_modules_react-router-dom_dist_index_js","vendors-node_modules_github_relative-time-element_dist_index_js","vendors-node_modules_primer_react_lib-esm_PageLayout_PageLayout_js","vendors-node_modules_primer_react_lib-esm_ConfirmationDialog_ConfirmationDialog_js","vendors-node_modules_primer_react_lib-esm_Dialog_js-node_modules_primer_react_lib-esm_TabNav_-8321f5","vendors-node_modules_primer_react_lib-esm_TreeView_TreeView_js","vendors-node_modules_primer_react_lib-esm_AvatarStack_AvatarStack_js-node_modules_primer_reac-e8df95","vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_primer_react_lib-esm_Bre-b2e46d","ui_packages_failbot_failbot_ts","ui_packages_react-core_create-browser-history_ts-ui_packages_react-core_AppContextProvider_ts-809ab9","ui_packages_react-core_register-app_ts","ui_packages_paths_index_ts","ui_packages_ref-selector_RefSelector_tsx","ui_packages_commit-attribution_index_ts-ui_packages_commit-checks-status_index_ts-ui_packages-f58d60","app_assets_modules_react-shared_hooks_use-canonical-object_ts-ui_packages_code-view-shared_ho-3e492a","app_assets_modules_github_blob-anchor_ts-app_assets_modules_github_filter-sort_ts-app_assets_-e50ab6"],()=>t(61759)),e.O()}]); //# sourceMappingURL=react-code-view-4529bbe39493.js.map