performance.mark("js-parse-end:96755-cf3a96c9a9baad0a.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["96755"],{5146(e,t,r){r.d(t,{w:()=>h});var n=r(74848),l=r(16522),a=r(18990),o=r(50463),i=r(72889),s=r(56149),u=r(86276),c=r(96540),g=r(31936);let d=()=>{let e,t,r,o=(0,l.c)(3);return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(a.l.Item,{disabled:!0,children:(0,n.jsx)(u.r,{})}),o[0]=e):e=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)(a.l.Item,{disabled:!0,children:(0,n.jsx)(u.r,{})}),o[1]=t):t=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.jsxs)(n.Fragment,{children:[e,t,(0,n.jsx)(a.l.Item,{disabled:!0,children:(0,n.jsx)(u.r,{})})]}),o[2]=r):r=o[2],r};d.displayName="LoadingIndicator";let p=e=>{let t,r=(0,l.c)(8),{suggestion:o,onSelect:i,isActive:s,id:u,parentRole:c}=e;if(r[0]!==u||r[1]!==s||r[2]!==i||r[3]!==c||r[4]!==o){let e,l=(0,g.It)(o);r[6]!==i?(e=e=>{e.preventDefault(),i()},r[6]=i,r[7]=e):e=r[7];let d={id:u,role:"menu"===c?"menuitem":"option",active:s,className:"AutocompleteSuggestions-module__suggestion__RxGAt","aria-selected":"listbox"===c&&!!s||void 0,onMouseDown:e};t="string"==typeof o?(0,n.jsx)(a.l.Item,{...d,children:l}):o.render({...d,children:l}),r[0]=u,r[1]=s,r[2]=i,r[3]=c,r[4]=o,r[5]=t}else t=r[5];return t};p.displayName="SuggestionListItem";let h=e=>{let t,r,u,h,m,f,v=(0,l.c)(37),{suggestions:b,portalName:x,triggerCharCoords:y,onClose:_,onCommit:w,inputRef:C,visible:T,defaultPlacement:S,activeSuggestion:A,getSuggestionId:j,id:E,menuTitle:I,role:L,tabInsertsSuggestions:k}=e,N=(0,c.useRef)(null),[H,R]=(0,c.useState)(0),[$,O]=(0,c.useState)("auto");v[0]!==S||v[1]!==y.height||v[2]!==y.top?(t=function(){O("auto");let e=N.current?.offsetHeight??0,t=y.top+y.height,r=t+e>window.innerHeight,n=y.top-e,l=n<0,a={below:r&&!l?n:t,above:l&&!r?t:n}[S];if(Number.isNaN(a)&&(a=0),R(Math.max(0,a)),r&&l){let e="above"===S?window.innerHeight+a:window.innerHeight-a;O(`${e}px`)}},v[0]=S,v[1]=y.height,v[2]=y.top,v[3]=t):t=v[3],v[4]!==S||v[5]!==b||v[6]!==y.height||v[7]!==y.top||v[8]!==T?(r=[y.top,y.height,b,T,S],v[4]=S,v[5]=b,v[6]=y.height,v[7]=y.top,v[8]=T,v[9]=r):r=v[9],(0,o.A)(t,r),v[10]!==A||v[11]!==j||v[12]!==w||v[13]!==L||v[14]!==b?(u="loading"===b?(0,n.jsx)(d,{}):b?.map(e=>(0,n.jsx)(p,{suggestion:e,id:j(e),onSelect:()=>w(e),isActive:A===e,parentRole:L},(0,g.QG)(e))),v[10]=A,v[11]=j,v[12]=w,v[13]=L,v[14]=b,v[15]=u):u=v[15],v[16]!==u?(h=(0,n.jsx)(n.Fragment,{children:u}),v[16]=u,v[17]=h):h=v[17];let D=h,G=(0,c.useId)();v[18]!==L||v[19]!==b||v[20]!==k||v[21]!==T?(m=T&&b?"loading"===b?"Loading autocomplete suggestions\u2026":"listbox"===L?`${b.length} autocomplete ${1===b.length?"suggestion":"suggestions"} available; "${(0,g.It)(b[0])}" is highlighted. Press ${k?"Enter or Tab":"Enter"} to select.`:"":"",v[18]=L,v[19]=b,v[20]=k,v[21]=T,v[22]=m):m=v[22];let P=m;return v[23]!==P||v[24]!==$||v[25]!==E||v[26]!==D||v[27]!==G||v[28]!==I||v[29]!==_||v[30]!==x||v[31]!==L||v[32]!==H||v[33]!==y.left||v[34]!==C||v[35]!==T?(f=T?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Ay,{onEscape:_,onClickOutside:_,returnFocusRef:C,preventFocusOnOpen:!0,portalContainerName:x,top:H,left:y.left,ref:N,className:"AutocompleteSuggestions-module__Overlay_0__vvRZH",children:(0,n.jsx)(a.l,{role:L,id:E,"aria-label":I?void 0:"Autocomplete suggestions","aria-labelledby":I?G:void 0,className:"AutocompleteSuggestions-module__ActionList_0__UTa1B",style:{height:$},children:I?(0,n.jsxs)(a.l.Group,{children:[(0,n.jsx)(a.l.GroupHeading,{id:G,children:I}),D]}):D})}),(0,n.jsx)(s.ZL,{children:(0,n.jsx)("span",{"aria-live":"assertive","aria-atomic":!0,style:{clipPath:"circle(0)",position:"absolute"},children:P})})]}):(0,n.jsx)(n.Fragment,{}),v[23]=P,v[24]=$,v[25]=E,v[26]=D,v[27]=G,v[28]=I,v[29]=_,v[30]=x,v[31]=L,v[32]=H,v[33]=y.left,v[34]=C,v[35]=T,v[36]=f):f=v[36],f};h.displayName="AutocompleteSuggestions"},70526(e,t,r){r.d(t,{a:()=>b});var n=r(74848),l=r(70170),a=r(19519),o=r(70056),i=r(76939),s=r(50691),u=r(36523),c=r(21513),g=r(34164),d=r(26692),p=r(96540),h=r(5146),m=r(31936);let f=e=>{try{return e.selectionStart}catch(e){if(e instanceof TypeError)return null;throw e}},v=()=>{},b=({inputRef:e,containerClassName:t="",triggers:r,suggestions:b,onShowSuggestions:x,onHideSuggestions:y,onSelectSuggestion:_,shouldReplaceText:w,style:C,children:T,tabInsertsSuggestions:S=!1,suggestionsPlacement:A="below",portalName:j,fullWidth:E=!1,title:I,asMenu:L,...k})=>{let[,N]=(0,p.useState)(0),H=(0,s.Lf)(k),R=(0,u.L)(e);(0,c.T)(T.props.ref??v,R);let $=(0,m.$T)(T,R),O=(0,i.H)({inputRef:R,fallbackEventHandler:$.props.onChange??v}),D=(0,p.useRef)(null),{isBrowser:G}=(0,a.V)(),P=G&&null!==b&&b.length>0,[Q,F]=(0,p.useState)(),M=Array.isArray(b)?b.find(e=>(0,m.QG)(e)===Q)??b[0]:void 0;Q&&!P&&F(void 0),(0,p.useEffect)(()=>{if(P){let e=(0,l.n)(()=>N(e=>e+1),100);return document.addEventListener("scroll",e,{capture:!0}),()=>{document.removeEventListener("scroll",e,{capture:!0})}}},[P]);let q=R.current&&D.current&&P?new d.Qr(R.current,(f(R.current)??0)-D.current.query.length).getBoundingClientRect():{top:0,left:0,height:0},B=e=>{if(!M||!Array.isArray(b))return;let t=e=>{F(e?(0,m.QG)(e):void 0)};switch(e){case"up":t(b[b.indexOf(M)-1]??b.at(-1));break;case"down":t(b[b.indexOf(M)+1]??b[0]);break;case"start":t(b[0]);break;case"end":t(b.at(-1))}},W=(e=M)=>{let t;if(!e)return;let r=(0,m.wV)(e),n=(0,m.It)(e)??"";if(!R.current||!D.current)return;let{query:l,trigger:a}=D.current,o=f(R.current)??0,i=l.length+a.triggerChar.length,s=o-i,u={suggestion:e,trigger:a,query:l,target:R.current};if(w?.(u)??!0){let e=r||(a.keepTriggerCharOnCommit??!0)?a.triggerChar:"",l=!r&&(a.insertSpaceOnCommit??!0);t=`${e}${n}${l?" ":""}`}else t="";y(),O(t,[s,s+i]),_?.(u)},V=(0,p.useId)(),K=e=>`${V}-${(0,m.QG)(e)}`,U=!L,Z=(0,p.cloneElement)($,{...H,onBlur:(0,m.oT)($.props.onBlur,()=>{y()}),onKeyDownCapture:(0,m.oT)($.props.onKeyDownCapture,e=>{if(P)switch(e.key){case"ArrowRight":case"ArrowLeft":y();break;case"Tab":S||y()}}),onChange:(0,m.oT)($.props.onChange,e=>{let t=f(e.currentTarget);if(null===t)return void y();let n=(0,m.Oe)(r,e.currentTarget.value,t);D.current=n&&{...n,target:e.currentTarget},D.current?x(D.current):y()}),ref:R,role:P&&U?"combobox":$.props.role,"aria-expanded":P&&U?"true":$.props["aria-expanded"],"aria-activedescendant":M?K(M):$.props["aria-activedescendant"],"aria-controls":P&&U?V:$.props["aria-controls"],"aria-owns":P&&L?V:$.props["aria-owns"],"aria-autocomplete":P&&U?"list":$.props["aria-autocomplete"],"aria-haspopup":P&&U?"listbox":$.props["aria-haspopup"]});return(0,n.jsxs)(o.tL,{commands:P?{"github:cancel":()=>y(),"github:select":()=>W(),"github:focus-next":S?()=>W():void 0,"github:down":()=>B("down"),"github:up":()=>B("up"),"github:go-to-start":()=>B("start"),"github:go-to-end":()=>B("end")}:{},className:(0,g.$)("InlineAutocomplete-module__container__NQUmo",E&&"InlineAutocomplete-module__fullWidth__Cph_I",t),style:C,children:[Z,(0,n.jsx)(h.w,{id:V,suggestions:b,inputRef:R,onCommit:W,onClose:y,triggerCharCoords:q,visible:P,defaultPlacement:A,portalName:j,activeSuggestion:M,getSuggestionId:K,menuTitle:I,role:L?"menu":"listbox",tabInsertsSuggestions:S})]})};b.displayName="InlineAutocomplete"},31936(e,t,r){r.d(t,{$T:()=>c,It:()=>s,Oe:()=>o,QG:()=>u,oT:()=>g,wV:()=>i});var n=r(96540);let l=new Set([" ","\n"]),a=new Set([".","\n"]),o=(e,t,r)=>{let n=e.sort((e,t)=>t.triggerChar.length-e.triggerChar.length);for(let e=r-1,o="",i=n;e>=0&&i.length>0;e--){let r=t[e]??"";for(let n of(o=r+o,l.has(r)&&(i=i.filter(e=>e.multiWord)),a.has(r)&&(i=i.filter(e=>!e.multiWord)),i.filter(e=>o.startsWith(e.triggerChar)))){let r=t[e-1]??"",l=o[1]??"";if((!r||/[\s([]/.test(r))&&(!l||!/\s/.test(l)))return{trigger:n,query:o.slice(n.triggerChar.length),caretLocation:e};i=i.filter(e=>e!==n)}}return null},i=e=>"object"==typeof e&&null===e.value,s=e=>"string"==typeof e?e:e.value,u=e=>"string"==typeof e?e:null===e.value?e.key:e.key??e.value;function c(e,t){if(n.Children.only(e),t.current&&!(t.current instanceof HTMLInputElement)&&!(t.current instanceof HTMLTextAreaElement))throw TypeError("AutocompleteTextarea child must be a component that forwards a ref and props to an or