forked from github/dmca
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathglobal-copilot-menu-d808a36fa3f7.js.download
More file actions
2 lines (2 loc) · 27.1 KB
/
global-copilot-menu-d808a36fa3f7.js.download
File metadata and controls
2 lines (2 loc) · 27.1 KB
1
2
"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["global-copilot-menu"],{50045:(e,t,n)=>{n.d(t,{I:()=>i});let i=(0,n(96540).createContext)(null)},13080:(e,t,n)=>{n.d(t,{C:()=>l,i:()=>s});var i=n(47584),o=n(75632),r=n(46493);function l(e,t){(0,o.G7)("arianotify_comprehensive_migration")?s(a(e),{...t,element:t?.element??e}):(0,o.G7)("primer_live_region_element")&&t?.element===void 0?(0,r.Cj)(e,{politeness:t?.assertive?"assertive":"polite"}):s(a(e),t)}function s(e,t){let{assertive:n,element:l}=t??{};(0,o.G7)("arianotify_comprehensive_migration")&&"ariaNotify"in Element.prototype?(l||document.body).ariaNotify(e,{interrupt:t?.assertive?"all":"none"}):(0,o.G7)("primer_live_region_element")&&void 0===l?(0,r.iP)(e,{politeness:n?"assertive":"polite"}):function(e,t,n){let o=n??i.XC?.querySelector(t?"#js-global-screen-reader-notice-assertive":"#js-global-screen-reader-notice");o&&(o.textContent===e?o.textContent=`${e}\u00A0`:o.textContent=e)}(e,n,l)}function a(e){return(e.getAttribute("aria-label")||e.innerText||"").trim()}},91618:(e,t,n)=>{n.d(t,{HS:()=>r,Oc:()=>o,Tv:()=>a,Xr:()=>SymbolChangedEvent,f7:()=>l,fD:()=>s,qR:()=>i});let OpenCopilotChatEvent=class OpenCopilotChatEvent extends Event{constructor(e){super("open-copilot-chat",{bubbles:!1,cancelable:!0}),this.payload=e}};let AddCopilotChatReferenceEvent=class AddCopilotChatReferenceEvent extends Event{constructor(e,t=!1,n){super("add-copilot-chat-reference",{bubbles:!1,cancelable:!0}),this.reference=e,this.openPanel=t,this.id=n}};let SymbolChangedEvent=class SymbolChangedEvent extends Event{constructor(e){super("symbol-changed",{bubbles:!1,cancelable:!0}),this.context=e}};function i(e){window.dispatchEvent(new OpenCopilotChatEvent(e))}function o(e,t=!1,n){window.dispatchEvent(new AddCopilotChatReferenceEvent(e,t,n))}function r(e){return window.addEventListener("open-copilot-chat",e),()=>{window.removeEventListener("open-copilot-chat",e)}}function l(e){return window.addEventListener("add-copilot-chat-reference",e),()=>{window.removeEventListener("add-copilot-chat-reference",e)}}function s(e){return window.addEventListener("search-copilot-chat",e),()=>{window.removeEventListener("search-copilot-chat",e)}}function a(e){return window.addEventListener("symbol-changed",e),()=>{window.removeEventListener("symbol-changed",e)}}},77342:(e,t,n)=>{n.d(t,{C6:()=>o,UH:()=>a,Wp:()=>c,hs:()=>l,mF:()=>s,wh:()=>i,xP:()=>r});let i={explain:"explain",conversation:"conversation",suggest:"suggest",discussFileDiff:"discuss-file-diff",explainFileDiff:"explain-file-diff",reviewPr:"review-pull-request",actionsAgent:"actions-agent"},o=["exception","filtered","publicCode","contentTooLarge","rateLimit","agentUnauthorized","agentRequest","networkError","multipleAgentsAttempt"],r=["bing-search","codesearch","semantic-code-search","lexical-code-search","kb-search","getfile","getfilechanges","getdiscussion","get-actions-job-logs","getalert","planskill","get-github-data","support-search","get-figma","codesearchagentskill"],l={Experiments:"experiements",Prompt:"prompt",None:"none"},s={Unlicensed:"unlicensed",LicensedFull:"licensed_full",LicensedLimited:"licensed_limited"},a={IndividualFree:"free",IndividualPro:"pro",IndividualProPlus:"pro_plus",Business:"business",Enterprise:"enterprise"},c="NULL_MESSAGE"},2622:(e,t,n)=>{n.d(t,{W:()=>o});var i=n(75632);let o=new class CopilotFeatureFlags{get customInstructions(){return(0,i.G7)("copilot_chat_custom_instructions")}get immersiveFigmaIntegration(){return(0,i.G7)("copilot_immersive_figma_integration")}get immersiveIssuePreview(){return(0,i.G7)("copilot_immersive_issue_preview")}get draftIssueTemplateRequiredIfBlankIssuesDisabled(){return(0,i.G7)("copilot_immersive_draft_issue_template_required")}get draftIssueUI(){return!(0,i.G7)("copilot_immersive_disable_draft_issue_ui")}get draftIssueMetadataLocation(){return(0,i.G7)("copilot_immersive_draft_issue_metadata_location")}get draftIssueTree(){return(0,i.G7)("copilot_immersive_draft_issue_tree")}get default41BaseModel(){return(0,i.G7)("copilot_default_4_1_base_model")}get default41PolicyEnabled(){return(0,i.G7)("copilot_default_4_1_policy_enabled")}get default41Preview(){return(0,i.G7)("copilot_default_4_1_preview")}get forceLegacyChatDefaultModel(){return(0,i.G7)("copilot_api_force_legacy_base_chat_model")}get domPageContext(){return(0,i.G7)("copilot_use_dom_page_context")}get useCAPIDefaultModel(){return(0,i.G7)("copilot_use_capi_default_model")}get immersiveServiceNavigation(){return this.customCopilots||this.pipesPlugin||this.workbenchPlugin}get copilotChatInterviewSurvey(){return(0,i.G7)("copilot_chat_interview_survey")}get newImmersiveReferencesUI(){return(0,i.G7)("copilot_new_immersive_references_ui")}get repoCustomInstructions(){return(0,i.G7)("copilot_chat_repo_custom_instructions")}get repoCustomInstructionsPreview(){return(0,i.G7)("copilot_chat_repo_custom_instructions_preview")}get attachImagesImmersive(){return(0,i.G7)("copilot_chat_attach_images")}get attachMultipleImages(){return(0,i.G7)("copilot_chat_attach_multiple_images")}get wholeAreaDragDrop(){return(0,i.G7)("copilot_chat_wholearea_dd")}get customCopilots(){return(0,i.G7)("copilot_custom_copilots")}get immersiveStructuredModelPicker(){return(0,i.G7)("copilot_immersive_structured_model_picker")}get customCopilotsRedesign(){return(0,i.G7)("copilot_custom_copilots_redesign")}get customCopilotsStarred(){return(0,i.G7)("copilot_custom_copilots_starred")}get customCopilotVisibility(){return(0,i.G7)("copilot_custom_copilots_visibility")}get customCopilotOrgOwned(){return(0,i.G7)("copilot_custom_copilots_org_owned")}get customCopilot128kWindow(){return(0,i.G7)("custom_copilots_128k_window")}get clientDOMSkills(){return(0,i.G7)("copilot_client_dom_skills")}get dotcomChatClientSideSkills(){return(0,i.G7)("dotcom_chat_client_side_skills")}get taskOrientedAssistive(){return(0,i.G7)("copilot_task_oriented_assistive")}get newInput(){return(0,i.G7)("copilot_chat_new_input")}get pipesPlugin(){return(0,i.G7)("copilot_pipes")}get workbenchPlugin(){return(0,i.G7)("copilot_workbench")}get workbenchVMAgentFlow(){return(0,i.G7)("copilot_workbench_vm_agent")}get workbenchVMAgentAttachments(){return(0,i.G7)("copilot_workbench_vm_agent_attachments")}get copilotChatOpeningThreadSwitch(){return(0,i.G7)("copilot_chat_opening_thread_switch")}get copilotReadSharedConversation(){return(0,i.G7)("copilot_read_shared_conversation")}get copilotDuplicateThread(){return(0,i.G7)("copilot_duplicate_thread")}get copilotShareActiveSubthread(){return(0,i.G7)("copilot_share_active_subthread")}get copilotSharedForbiddenError(){return(0,i.G7)("copilot_share_forbidden_error")}get copilotUIRefs(){return(0,i.G7)("copilot_ui_refs")}get dotcomChatFileUpload(){return(0,i.G7)("copilot_dotcom_chat_file_upload")&&(0,i.G7)("copilot_chat_attachments")}get copilotChatO1Tools(){return(0,i.G7)("copilot_api_tools_for_non_streaming_models")}get topicsAsReferences(){return(0,i.G7)("copilot_topics_as_references")}get bingGroundingServiceEnabled(){return(0,i.G7)("copilot_bing_search_use_azure_ai_agent_service")}get bingGroundingUIEnabled(){return(0,i.G7)("copilot_bing_search_use_grounding_ui")&&this.bingGroundingServiceEnabled}get copilotScrollContainerQuery(){return(0,i.G7)("copilot_scroll_container_query")}get showDeepCodeSearchButton(){return(0,i.G7)("copilot_show_deep_code_search_button")&&(0,i.G7)("copilot_api_search_agent_skill")}get headerButtonToImmersive(){return(0,i.G7)("copilot_header_button_to_immersive")}get deleteAllConversations(){return(0,i.G7)("copilot_delete_all_conversations")}get staffPromptDialog(){return(0,i.G7)("copilot_staff_prompt_dialog")}get chatAutocomplete(){return(0,i.G7)("copilot_chat_autocomplete")}get workbenchTerminal(){return(0,i.G7)("copilot_workbench_terminal")}get workbenchPreviewAnalytics(){return(0,i.G7)("copilot_workbench_preview_analytics")}get workbenchRefreshOnWsod(){return(0,i.G7)("copilot_workbench_refresh_on_wsod")}get workbenchShowConnectionReloadBanner(){return(0,i.G7)("copilot_workbench_connection_reload_banner")}get pasteTextFiles(){return(0,i.G7)("copilot_paste_text_files")}get workbenchIteratePanel(){return(0,i.G7)("copilot_workbench_iterate_panel")}get workbenchPublishDropdownV2(){return(0,i.G7)("copilot_workbench_publish_dropdown_v2")}get visionAllowedInClaude(){return(0,i.G7)("copilot_chat_vision_in_claude")}get premiumRequestQuotasEnabled(){return(0,i.G7)("copilot_premium_request_quotas")}get freeToPaidTelemetry(){return(0,i.G7)("copilot_free_to_paid_telem")}get freeToPaidSettingsUpgrade(){return(0,i.G7)("copilot_ftp_settings_upgrade")}get workbenchUserLimits(){return(0,i.G7)("copilot_workbench_user_limits")}get singleUserIteration(){return(0,i.G7)("copilot_spark_single_user_iteration")}get commitOnDefaultBranch(){return(0,i.G7)("spark_commit_on_default_branch")}get spacesIssuesPrsEnabled(){return(0,i.G7)("custom_copilots_issues_prs")}}},2640:(e,t,n)=>{n.d(t,{D:()=>r,Y:()=>l});var i=n(13080),o=n(47584);function r(e){if(!o.XC)return;let t=o.XC.querySelector("title"),n=o.XC.createElement("title");n.textContent=e,t?t.textContent!==e&&(t.replaceWith(n),(0,i.i)(e)):(o.XC.head.appendChild(n),(0,i.i)(e))}function l(e){return document.body.classList.contains("logged-out")?`${e} \xb7 GitHub`:e}},87913:(e,t,n)=>{n.d(t,{A:()=>r});let i=n.p+"jetbrains-e16495e63a33.png",o=n.p+"neovim-3301f23c4307.png",r={vscode:{url:"https://marketplace.visualstudio.com/items?itemName=GitHub.copilot",icon:n.p+"vscode-380056900de8.png",name:"Visual Studio Code",eventName:"VSCODE"},visualstudio:{url:"https://visualstudio.microsoft.com/github-copilot/",icon:n.p+"vsstudio-806c4b726938.png",name:"Visual Studio",eventName:"VS"},xcode:{url:"https://github.com/github/CopilotForXcode",icon:n.p+"xcode-a6c2735aa7ac.png",name:"Xcode",eventName:"XCODE"},jetbrains:{url:"https://plugins.jetbrains.com/plugin/17718-github-copilot",icon:i,name:"JetBrains",eventName:"JETBRAINS"},neovim:{url:"https://github.com/github/copilot.vim",icon:o,name:"Neovim",eventName:"NEOVIM"}}},22994:(e,t,n)=>{var i=n(11110),o=n(74848),r=n(46988),l=n(89323),s=n(15385),a=n(47139),c=n(38621),d=n(64633),u=n(91618),p=n(77342),h=n(2622),_=n(11499),m=n(97074),g=n(12152);let f="global_copilot_menu",v="global_nav",b=e=>{h.W.freeToPaidTelemetry?(0,d.F)(e,f,v):(0,r.BI)("dotcom_chat.activate",{target:`GLOBAL_COPILOT_MENU_${e}`,mode:"global_nav"})},w=()=>{(0,u.qR)({id:"copilot-assistive",intent:p.wh.conversation,newThread:!0}),b("ASSISTIVE")},y=()=>{window.location.href="/copilot",(0,r.BI)("dotcom_chat.activate",{target:"GLOBAL_COPILOT_MENU_FULLSCREEN",mode:"global_nav"}),b("IMMERSIVE")};function C(e){let{ref:t,open:n,setOpen:i}=(0,m.Mm)(e.reactPartialAnchor);return(0,o.jsx)(l.W,{anchorRef:t,open:n,onOpenChange:i,children:(0,o.jsx)(G,{})})}function x(){return(0,o.jsxs)(l.W,{children:[(0,o.jsx)(l.W.Button,{leadingVisual:c.CopilotIcon,"aria-label":"Open Copilot\u2026",children:""}),(0,o.jsx)(G,{})]})}function k({reactPartialAnchor:e}){return(0,o.jsxs)(g.t,{fallback:null,children:[(0,o.jsx)(_.ak,{commands:{"copilot-chat:open-assistive":w,"copilot-chat:open-immersive":y}}),e?(0,o.jsx)(C,{reactPartialAnchor:e}):(0,o.jsx)(x,{})]})}function G(){return(0,o.jsx)(l.W.Overlay,{align:"end",children:(0,o.jsxs)(s.l,{style:{width:"15rem"},children:[(0,o.jsxs)(s.l.Group,{children:[(0,o.jsx)(s.l.GroupHeading,{children:"New conversation in"}),(0,o.jsx)(_.Vr,{commandId:"copilot-chat:open-assistive",leadingVisual:(0,o.jsx)(c.CommentIcon,{}),children:"Assistive"}),(0,o.jsxs)(s.l.LinkItem,{href:"/copilot",onClick:()=>b("FULLSCREEN"),children:[(0,o.jsx)(s.l.LeadingVisual,{children:(0,o.jsx)(c.ScreenFullIcon,{})}),"Immersive"]}),h.W.taskOrientedAssistive&&(0,o.jsxs)(s.l.Item,{onSelect:()=>{b("TASK_ORIENTED_ASSISTIVE"),(0,u.qR)({id:"copilot-task-oriented-assistive",intent:p.wh.conversation,newThread:!0,references:[]})},children:[(0,o.jsx)(s.l.LeadingVisual,{children:(0,o.jsx)(c.CommandPaletteIcon,{})}),"Task",(0,o.jsx)(s.l.TrailingVisual,{children:(0,o.jsx)(a.A,{variant:"accent",children:"Staff"})})]})]}),(0,o.jsx)(s.l.Divider,{}),(0,o.jsxs)(l.W,{onOpenChange:e=>e&&b("IDE_MENU_OPEN"),children:[(0,o.jsx)(l.W.Anchor,{children:(0,o.jsxs)(s.l.Item,{onSelect:()=>b("OPEN_WITH"),children:[(0,o.jsx)(s.l.LeadingVisual,{children:(0,o.jsx)(c.DownloadIcon,{})}),"Download for"]})}),(0,o.jsx)(l.W.Overlay,{children:(0,o.jsxs)(s.l,{children:[(0,o.jsx)(d.t,{menuLocation:f,mode:v}),(0,o.jsx)(s.l.Divider,{}),(0,o.jsxs)(s.l.LinkItem,{href:"https://docs.github.com/en/copilot/managing-copilot/configure-personal-settings/installing-github-copilot-in-the-cli",onClick:()=>b("CLI"),children:["CLI",(0,o.jsx)(s.l.LeadingVisual,{children:(0,o.jsx)(c.TerminalIcon,{})})]})]})})]}),(0,o.jsxs)(s.l.LinkItem,{href:"/settings/copilot",onClick:()=>b("SETTINGS"),children:["Settings",(0,o.jsx)(s.l.LeadingVisual,{children:(0,o.jsx)(c.GearIcon,{})})]})]})})}try{C.displayName||(C.displayName="ExternallyAnchoredGlobalCopilotMenu")}catch{}try{x.displayName||(x.displayName="GlobalCopilotMenuWithAnchor")}catch{}try{k.displayName||(k.displayName="GlobalCopilotMenu")}catch{}try{G.displayName||(G.displayName="GlobalCopilotMenuOverlay")}catch{}(0,i.k)("global-copilot-menu",{Component:k})},46988:(e,t,n)=>{let i;n.d(t,{BI:()=>_,Ti:()=>m,lA:()=>p,sX:()=>h});var o=n(70837),r=n(18679),l=n(80688),s=n(57516);let{getItem:a}=(0,l.A)("localStorage"),c="dimension_",d=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","scid"];try{let e=(0,o.O)("octolytics");delete e.baseContext,i=new r.s(e)}catch{}function u(e){let t=(0,o.O)("octolytics").baseContext||{};if(t)for(let[e,n]of(delete t.app_id,delete t.event_url,delete t.host,Object.entries(t)))e.startsWith(c)&&(t[e.replace(c,"")]=n,delete t[e]);let n=document.querySelector("meta[name=visitor-payload]");for(let[e,i]of(n&&Object.assign(t,JSON.parse(atob(n.content))),new URLSearchParams(window.location.search)))d.includes(e.toLowerCase())&&(t[e]=i);return t.staff=(0,s.X)().toString(),Object.assign(t,e)}function p(e){i?.sendPageView(u(e))}function h(){return document.head?.querySelector('meta[name="current-catalog-service"]')?.content}function _(e,t={}){let n=h(),o=n?{service:n}:{};for(let[e,n]of Object.entries(t))null!=n&&(o[e]=`${n}`);i&&(u(o),i.sendEvent(e||"unknown",u(o)))}function m(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]))}},73218:(e,t,n)=>{n.d(t,{l:()=>i});let i=()=>void 0},64128:(e,t,n)=>{n.d(t,{Y:()=>i});function i(){let e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}},74753:(e,t,n)=>{n.d(t,{A:()=>s});let{getItem:i,setItem:o,removeItem:r}=(0,n(80688).A)("localStorage"),l="REACT_PROFILING_ENABLED",s={enable:()=>o(l,"true"),disable:()=>r(l),isEnabled:()=>!!i(l)}},45996:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(38568),o=n(96540);function r(){let e=(0,o.useRef)(!1),t=(0,o.useCallback)(()=>e.current,[]);return(0,i.N)(()=>(e.current=!0,()=>{e.current=!1}),[]),t}},38568:(e,t,n)=>{n.d(t,{N:()=>r});var i=n(47584),o=n(96540);let r=void 0!==i.cg?.document?.createElement?o.useLayoutEffect:o.useEffect},82060:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(45996),o=n(96540);let r=function(e){let t=(0,i.A)(),[n,r]=(0,o.useState)(e);return[n,(0,o.useCallback)(e=>{t()&&r(e)},[t])]}},59418:(e,t,n)=>{n.d(t,{y:()=>l});var i=n(74848),o=n(21728),r=n(50045);function l(e){let t,n,l;let s=(0,o.c)(7),{children:a,appName:c,category:d,metadata:u}=e;return s[0]!==c||s[1]!==d||s[2]!==u?(n={appName:c,category:d,metadata:u},s[0]=c,s[1]=d,s[2]=u,s[3]=n):n=s[3],t=n,s[4]!==a||s[5]!==t?(l=(0,i.jsx)(r.I.Provider,{value:t,children:a}),s[4]=a,s[5]=t,s[6]=l):l=s[6],l}try{l.displayName||(l.displayName="AnalyticsProvider")}catch{}},64633:(e,t,n)=>{n.d(t,{F:()=>a,t:()=>c});var i=n(74848),o=n(2622),r=n(46988),l=n(15385),s=n(87913);function a(e,t,n,i,o){let l=`${t.toUpperCase()}_${e.toUpperCase()}`;(0,r.BI)("dotcom_chat.activate",{target:l,text:o,category:t,action:i,mode:n})}function c({menuLocation:e,mode:t,onItemClick:n}){return Object.entries(s.A).map(([r,{name:s,url:c,icon:d}])=>(0,i.jsxs)(l.l.LinkItem,{href:c,onClick:()=>{n?.(),o.W.freeToPaidTelemetry&&a(r,e,t,"menu_item_click",s)},children:[s,(0,i.jsx)(l.l.LeadingVisual,{children:(0,i.jsx)("img",{src:d,alt:"",height:"20",width:"20"})})]},r))}try{c.displayName||(c.displayName="EditorMenuItems")}catch{}},18347:(e,t,n)=>{n.d(t,{BP:()=>u,D3:()=>d,O8:()=>a});var i=n(74848),o=n(21728),r=n(96540),l=n(47584),s=n(38568);let a={ServerRender:"ServerRender",ClientHydrate:"ClientHydrate",ClientRender:"ClientRender"},c=(0,r.createContext)(a.ClientRender);function d(e){let t,n,d,u;let p=(0,o.c)(8),{wasServerRendered:h,children:_}=e;p[0]!==h?(t=()=>l.X3?a.ServerRender:h?a.ClientHydrate:a.ClientRender,p[0]=h,p[1]=t):t=p[1];let[m,g]=(0,r.useState)(t);return p[2]!==m?(n=()=>{m!==a.ClientRender&&g(a.ClientRender)},d=[m],p[2]=m,p[3]=n,p[4]=d):(n=p[3],d=p[4]),(0,s.N)(n,d),p[5]!==_||p[6]!==m?(u=(0,i.jsx)(c.Provider,{value:m,children:_}),p[5]=_,p[6]=m,p[7]=u):u=p[7],u}function u(){return(0,r.useContext)(c)}try{c.displayName||(c.displayName="RenderPhaseContext")}catch{}try{d.displayName||(d.displayName="RenderPhaseProvider")}catch{}},67136:(e,t,n)=>{n.d(t,{Qn:()=>a,T8:()=>d,Y6:()=>p,k6:()=>u});var i=n(74848),o=n(65556),r=n(96540),l=n(73218),s=n(82060);let a=5e3,c=(0,r.createContext)({addToast:l.l,addPersistedToast:l.l,clearPersistedToast:l.l}),d=(0,r.createContext)({toasts:[],persistedToast:null});function u({children:e}){let[t,n]=(0,s.A)([]),[l,u]=(0,r.useState)(null),{safeSetTimeout:p}=(0,o.A)(),h=(0,r.useCallback)(function(e){n([...t,e]),p(()=>n(t.slice(1)),a)},[t,p,n]),_=(0,r.useCallback)(function(e){u(e)},[u]),m=(0,r.useCallback)(function(){u(null)},[u]),g=(0,r.useMemo)(()=>({addToast:h,addPersistedToast:_,clearPersistedToast:m}),[_,h,m]),f=(0,r.useMemo)(()=>({toasts:t,persistedToast:l}),[t,l]);return(0,i.jsx)(c.Provider,{value:g,children:(0,i.jsx)(d.Provider,{value:f,children:e})})}function p(){return(0,r.useContext)(c)}try{c.displayName||(c.displayName="ToastContext")}catch{}try{d.displayName||(d.displayName="InternalToastsContext")}catch{}try{u.displayName||(u.displayName="ToastContextProvider")}catch{}},91958:(e,t,n)=>{n.d(t,{V:()=>p});var i=n(74848),o=n(96540),r=n(67136),l=n(38621),s=n(65556),a=n(16255);let c={info:"",success:"Toast--success",error:"Toast--error"},d={info:(0,i.jsx)(l.InfoIcon,{}),success:(0,i.jsx)(l.CheckIcon,{}),error:(0,i.jsx)(l.StopIcon,{})},u=({message:e,timeToLive:t,icon:n,type:r="info",role:l="log"})=>{let[u,p]=o.useState(!0),{safeSetTimeout:h}=(0,s.A)();return(0,o.useEffect)(()=>{t&&h(()=>p(!1),t-300)},[h,t]),(0,i.jsx)(a.Z,{children:(0,i.jsx)("div",{className:"p-1 position-fixed bottom-0 left-0 mb-3 ml-3",children:(0,i.jsxs)("div",{className:`Toast ${c[r]} ${u?"Toast--animateIn":"Toast--animateOut"}`,id:"ui-app-toast","data-testid":`ui-app-toast-${r}`,role:l,children:[(0,i.jsx)("span",{className:"Toast-icon",children:n||d[r]}),(0,i.jsx)("span",{className:"Toast-content",children:e})]})})})};try{u.displayName||(u.displayName="Toast")}catch{}function p(){let{toasts:e,persistedToast:t}=(0,o.useContext)(r.T8);return(0,i.jsxs)(i.Fragment,{children:[e.map((e,t)=>(0,i.jsx)(u,{message:e.message,icon:e.icon,timeToLive:r.Qn,type:e.type,role:e.role},t)),t&&(0,i.jsx)(u,{message:t.message,icon:t.icon,type:t.type,role:t.role})]})}try{p.displayName||(p.displayName="Toasts")}catch{}},50515:(e,t,n)=>{n.d(t,{JC:()=>v,KK:()=>SequenceTracker,Vy:()=>l,ai:()=>f,oc:()=>a,rd:()=>d});let Leaf=class Leaf{constructor(e){this.children=[],this.parent=e}delete(e){let t=this.children.indexOf(e);return -1!==t&&(this.children=this.children.slice(0,t).concat(this.children.slice(t+1)),0===this.children.length&&this.parent.delete(this),!0)}add(e){return this.children.push(e),this}};let RadixTrie=class RadixTrie{constructor(e){this.parent=null,this.children={},this.parent=e||null}get(e){return this.children[e]}insert(e){let t=this;for(let n=0;n<e.length;n+=1){let i=e[n],o=t.get(i);if(n===e.length-1)return o instanceof RadixTrie&&(t.delete(o),o=null),o||(o=new Leaf(t),t.children[i]=o),o;o instanceof Leaf&&(o=null),o||(o=new RadixTrie(t),t.children[i]=o),t=o}return t}delete(e){for(let t in this.children)if(this.children[t]===e){let e=delete this.children[t];return 0===Object.keys(this.children).length&&this.parent&&this.parent.delete(this),e}return!1}};let i={"\xa1":"1","\u2122":"2","\xa3":"3","\xa2":"4","\u221E":"5","\xa7":"6","\xb6":"7","\u2022":"8","\xaa":"9","\xba":"0","\u2013":"-","\u2260":"=","\u2044":"!","\u20AC":"@","\u2039":"#","\u203A":"$",\uFB01:"%",\uFB02:"^","\u2021":"&","\xb0":"*","\xb7":"(","\u201A":")","\u2014":"_","\xb1":"+",\u0153:"q","\u2211":"w","\xae":"r","\u2020":"t","\xa5":"y","\xf8":"o",\u03C0:"p","\u201C":"[","\u2018":"]","\xab":"\\",\u0152:"Q","\u201E":"W","\xb4":"E","\u2030":"R",\u02C7:"T","\xc1":"Y","\xa8":"U",\u02C6:"I","\xd8":"O","\u220F":"P","\u201D":"{","\u2019":"}","\xbb":"|","\xe5":"a","\xdf":"s","\u2202":"d",\u0192:"f","\xa9":"g","\u02D9":"h","\u2206":"j","\u02DA":"k","\xac":"l","\u2026":";","\xe6":"'","\xc5":"A","\xcd":"S","\xce":"D","\xcf":"F","\u02DD":"G","\xd3":"H","\xd4":"J","\uF8FF":"K","\xd2":"L","\xda":":","\xc6":'"',\u03A9:"z","\u2248":"x","\xe7":"c","\u221A":"v","\u222B":"b","\xb5":"m","\u2264":",","\u2265":".","\xf7":"/","\xb8":"Z","\u02DB":"X","\xc7":"C","\u25CA":"V",\u0131:"B","\u02DC":"N","\xc2":"M","\xaf":"<","\u02D8":">","\xbf":"?"},o={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+","[":"{","]":"}","\\":"|",";":":","'":'"',",":"<",".":">","/":"?",q:"Q",w:"W",e:"E",r:"R",t:"T",y:"Y",u:"U",i:"I",o:"O",p:"P",a:"A",s:"S",d:"D",f:"F",g:"G",h:"H",j:"J",k:"K",l:"L",z:"Z",x:"X",c:"C",v:"V",b:"B",n:"N",m:"M"},r={" ":"Space","+":"Plus"};function l(e,t=navigator.platform){var n,a,d;let{ctrlKey:u,altKey:p,metaKey:h,shiftKey:_,key:m}=e,g=[];for(let[e,t]of[u,p,h,_].entries())t&&g.push(s[e]);if(!s.includes(m)){let e=g.includes("Alt")&&c.test(t)&&null!==(n=i[m])&&void 0!==n?n:m,l=g.includes("Shift")&&c.test(t)&&null!==(a=o[e])&&void 0!==a?a:e,s=null!==(d=r[l])&&void 0!==d?d:l;g.push(s)}return g.join("+")}let s=["Control","Alt","Meta","Shift"];function a(e,t){return function(e){let t=e.split("+").pop(),n=[];for(let t of["Control","Alt","Meta","Shift"])e.includes(t)&&n.push(t);return t&&n.push(t),n.join("+")}(function(e,t){var n;let i="undefined"==typeof window?void 0:window,o=c.test(null!==(n=null!=t?t:null==i?void 0:i.navigator.platform)&&void 0!==n?n:"")?"Meta":"Control";return e.replace("Mod",o)}(e,t))}let c=/Mac|iPod|iPhone|iPad/i;let SequenceTracker=class SequenceTracker{constructor({onReset:e}={}){this._path=[],this.timer=null,this.onReset=e}get path(){return this._path}get sequence(){return this._path.join(" ")}registerKeypress(e){this._path=[...this._path,l(e)],this.startTimer()}reset(){var e;this.killTimer(),this._path=[],null===(e=this.onReset)||void 0===e||e.call(this)}killTimer(){null!=this.timer&&window.clearTimeout(this.timer),this.timer=null}startTimer(){this.killTimer(),this.timer=window.setTimeout(()=>this.reset(),SequenceTracker.CHORD_TIMEOUT)}};function d(e){return e.split(" ").map(e=>a(e)).join(" ")}function u(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),n=(e.getAttribute("type")||"").toLowerCase();return"select"===t||"textarea"===t||"input"===t&&"submit"!==n&&"reset"!==n&&"checkbox"!==n&&"radio"!==n&&"file"!==n||e.isContentEditable}SequenceTracker.CHORD_TIMEOUT=1500;let p=new RadixTrie,h=new WeakMap,_=p,m=new SequenceTracker({onReset(){_=p}});function g(e){if(e.defaultPrevented||!(e.target instanceof Node))return;if(u(e.target)){let t=e.target;if(!t.id||!t.ownerDocument.querySelector(`[data-hotkey-scope="${t.id}"]`))return}let t=_.get(l(e));if(!t){m.reset();return}if(m.registerKeypress(e),_=t,t instanceof Leaf){let n;let i=e.target,o=!1,r=u(i);for(let e=t.children.length-1;e>=0;e-=1){let l=(n=t.children[e]).getAttribute("data-hotkey-scope");if(!r&&!l||r&&i.id===l){o=!0;break}}n&&o&&(function(e,t){let n=new CustomEvent("hotkey-fire",{cancelable:!0,detail:{path:t}});e.dispatchEvent(n)&&(u(e)?e.focus():e.click())}(n,m.path),e.preventDefault()),m.reset()}}function f(e,t){0===Object.keys(p.children).length&&document.addEventListener("keydown",g);let n=(function(e){let t=[],n=[""],i=!1;for(let o=0;o<e.length;o++){if(i&&","===e[o]){t.push(n),n=[""],i=!1;continue}if(" "===e[o]){n.push(""),i=!1;continue}i="+"!==e[o],n[n.length-1]+=e[o]}return t.push(n),t.map(e=>e.map(e=>a(e)).filter(e=>""!==e)).filter(e=>e.length>0)})(t||e.getAttribute("data-hotkey")||"").map(t=>p.insert(t).add(e));h.set(e,n)}function v(e){let t=h.get(e);if(t&&t.length)for(let n of t)n&&n.delete(e);0===Object.keys(p.children).length&&document.removeEventListener("keydown",g)}},18679:(e,t,n)=>{n.d(t,{s:()=>AnalyticsClient});let i=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","scid"];var o=n(36301);let AnalyticsClient=class AnalyticsClient{constructor(e){this.options=e}get collectorUrl(){return this.options.collectorUrl}get clientId(){return this.options.clientId?this.options.clientId:(0,o.y)()}createEvent(e){return{page:location.href,title:document.title,context:{...this.options.baseContext,...function(){let e={};try{for(let[t,n]of new URLSearchParams(window.location.search)){let o=t.toLowerCase();i.includes(o)&&(e[o]=n)}return e}catch(e){return{}}}(),...e}}}sendPageView(e){let t=this.createEvent(e);this.send({page_views:[t]})}sendEvent(e,t){let n={...this.createEvent(t),type:e};this.send({events:[n]})}send({page_views:e,events:t}){let n=JSON.stringify({client_id:this.clientId,page_views:e,events:t,request_context:{referrer:function(){let e;try{e=window.top.document.referrer}catch(t){if(window.parent)try{e=window.parent.document.referrer}catch(e){}}return""===e&&(e=document.referrer),e}(),user_agent:navigator.userAgent,screen_resolution:function(){try{return`${screen.width}x${screen.height}`}catch(e){return"unknown"}}(),browser_resolution:function(){let e=0,t=0;try{return"number"==typeof window.innerWidth?(t=window.innerWidth,e=window.innerHeight):null!=document.documentElement&&null!=document.documentElement.clientWidth?(t=document.documentElement.clientWidth,e=document.documentElement.clientHeight):null!=document.body&&null!=document.body.clientWidth&&(t=document.body.clientWidth,e=document.body.clientHeight),`${t}x${e}`}catch(e){return"unknown"}}(),browser_languages:navigator.languages?navigator.languages.join(","):navigator.language||"",pixel_ratio:window.devicePixelRatio,timestamp:Date.now(),tz_seconds:-60*new Date().getTimezoneOffset()}});try{if(navigator.sendBeacon){navigator.sendBeacon(this.collectorUrl,n);return}}catch{}fetch(this.collectorUrl,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:n,keepalive:!1})}}},70837:(e,t,n)=>{n.d(t,{O:()=>i});function i(e="ha"){let t;let n={};for(let i of Array.from(document.head.querySelectorAll(`meta[name^="${e}-"]`))){let{name:o,content:r}=i,l=o.replace(`${e}-`,"").replace(/-/g,"_");"url"===l?t=r:n[l]=r}if(!t)throw Error(`AnalyticsClient ${e}-url meta tag not found`);return{collectorUrl:t,...Object.keys(n).length>0?{baseContext:n}:{}}}}},e=>{var t=t=>e(e.s=t);e.O(0,["primer-react","react-core","react-lib","octicons-react","vendors-node_modules_primer_behaviors_dist_esm_index_mjs","vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js","vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-1d3d52","vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-b1c483","vendors-node_modules_github_catalyst_lib_index_js-node_modules_primer_live-region-element_dis-b2aea6","ui_packages_failbot_failbot_ts","ui_packages_ui-commands_ui-commands_ts"],()=>t(22994)),e.O()}]);
//# sourceMappingURL=global-copilot-menu-f1c6d38fe387.js.map