"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["app_components_search_qbsearch-input-element_ts","ui_packages_soft-navigate_soft-navigate_ts"],{51104:(e,t,i)=>{i.d(t,{Bx:()=>o,EL:()=>c,WB:()=>l,nc:()=>s});var r=i(80688);let a="blackbird_experiments",n="blackbird_debug_scoring";function o(){let e=(0,r.A)("localStorage").getItem(a);return e?e.split(","):[]}function s(e){(0,r.A)("localStorage").setItem(a,e.join(","))}function l(){return null!==(0,r.A)("localStorage").getItem(n)}function c(e){e?(0,r.A)("localStorage").setItem(n,"1"):(0,r.A)("localStorage").removeItem(n)}},18682:(e,t,i)=>{i.d(t,{Go:()=>c,H5:()=>d,R9:()=>h,Xq:()=>u,YT:()=>n,Z:()=>r,bY:()=>a,cK:()=>l,cZ:()=>function e(t,i){if(a(t)&&t.qualifier===i)return!0;if(c(t)){for(let r of t.children)if(e(r,i))return!0}return!1},r3:()=>s});let r={Is:"Is",Repository:"Repository",Owner:"Owner",Language:"Language",Path:"Path",Regex:"Regex",Text:"Text",Saved:"Saved",OtherQualifier:"OtherQualifier"};function a(e){return!!e.qualifier}function n(e){return!!a(e)&&"Saved"===e.qualifier}let o=RegExp("\\/","g");function s(e,t){if(a(e)&&l(e.content)){if("Repo"===e.qualifier){if(1!=[...e.content.value.toString().matchAll(o)].length)return null}else if("Org"!==e.qualifier)return null;else if(0!=[...e.content.value.toString().matchAll(o)].length)return null;if(e.content.value.toString().startsWith("/"))return null;let i=`/${e.content.value.toString().split("/").map(encodeURIComponent).join("/")}`;return i===t?null:i}return null}function l(e){return void 0!==e.value}function c(e){return!!e.children}function u(e){return c(e)?e.children.map(u).filter(e=>e.length>0).join(" "):a(e)||"Regex"===e.kind?"":l(e)?e.value.toString():""}function d(e){if("Not"===e.kind)return[];if(c(e))return e.children.map(d).flat();if(a(e)){if("Repo"===e.qualifier&&l(e.content))return[{kind:"repo",value:e.content.value.toString()}];if("Org"===e.qualifier&&l(e.content))return[{kind:"org",value:e.content.value.toString()}];if(n(e)&&l(e.content))return[{kind:"saved",value:e.content.value.toString()}]}return[]}function h(e,t){let i=new Set(d(e).map(e=>"org"===e.kind?e.value:"repo"===e.kind&&e.value.includes("/")?e.value.split("/")[0]:null).filter(e=>null!==e).map(e=>e?.toLowerCase()));return 0===i.size?t:t.filter(e=>i.has(e.toLowerCase()))}},5516:(e,t,i)=>{i.r(t),i.d(t,{QbsearchInputElement:()=>QbsearchInputElement}),i(60612);var r=i(39595),a=i(18682),n=i(16443),o=i(46988),s=i(61828),l=i(22756),c=i(51104),u=i(25437),d=i(80528);function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let p=(0,i(80688).A)("localStorage");let HistoryProvider=class HistoryProvider extends EventTarget{handleEvent(e){let t=e.parsedMetadata;if(!t||t.caretPositionKind!==a.Z.Text)return[];let i=e.toString(),r=JSON.parse(p.getItem("github-search-history")??"[]");if(0!==t.query.trim().length)return[];let n={};r=r.filter(e=>!n[e]&&(n[e]=!0,!0));let o=0;for(let e of r){if(o>=5)break;let t=e.trim();t.startsWith(i)&&(o+=1,this.dispatchEvent(new d.CN({value:t,icon:d.m4.Search,scope:"GENERAL",priority:t.length,action:{url:`/search?q=${t}`}})))}}constructor(e){super(),h(this,"priority",5),h(this,"name","History"),h(this,"singularItemName","history"),h(this,"value","history"),h(this,"type","search"),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this)}};var m=i(28055),f=i(26196),v=i(72964);let y=[{name:"C++",color:"#f34b7d"},{name:"Go",color:"#00ADD8"},{name:"Java",color:"#b07219"},{name:"JavaScript",color:"#f1e05a"},{name:"PHP",color:"#4F5D95"},{name:"Python",color:"#3572A5"},{name:"Ruby",color:"#701516"},{name:"TypeScript",color:"#2b7489"},{name:"ABAP",color:"#E8274B"},{name:"AGS Script",color:"#B9D9FF"},{name:"AMPL",color:"#E6EFBB"},{name:"ANTLR",color:"#9DC3FF"},{name:"API Blueprint",color:"#2ACCA8"},{name:"APL",color:"#5A8164"},{name:"ASP",color:"#6a40fd"},{name:"ATS",color:"#1ac620"},{name:"ActionScript",color:"#882B0F"},{name:"Ada",color:"#02f88c"},{name:"Agda",color:"#315665"},{name:"Alloy",color:"#64C800"},{name:"AngelScript",color:"#C7D7DC"},{name:"AppleScript",color:"#101F1F"},{name:"Arc",color:"#aa2afe"},{name:"AspectJ",color:"#a957b0"},{name:"Assembly",color:"#6E4C13"},{name:"Asymptote",color:"#4a0c0c"},{name:"AutoHotkey",color:"#6594b9"},{name:"AutoIt",color:"#1C3552"},{name:"Ballerina",color:"#FF5000"},{name:"Batchfile",color:"#C1F12E"},{name:"BlitzMax",color:"#cd6400"},{name:"Boo",color:"#d4bec1"},{name:"C",color:"#555555"},{name:"C#",color:"#178600"},{name:"CSS",color:"#563d7c"},{name:"Ceylon",color:"#dfa535"},{name:"Chapel",color:"#8dc63f"},{name:"Cirru",color:"#ccccff"},{name:"Clarion",color:"#db901e"},{name:"Clean",color:"#3F85AF"},{name:"Click",color:"#E4E6F3"},{name:"Clojure",color:"#db5855"},{name:"CoffeeScript",color:"#244776"},{name:"ColdFusion",color:"#ed2cd6"},{name:"Common Lisp",color:"#3fb68b"},{name:"Common Workflow Language",color:"#B5314C"},{name:"Component Pascal",color:"#B0CE4E"},{name:"Crystal",color:"#000100"},{name:"Cuda",color:"#3A4E3A"},{name:"D",color:"#ba595e"},{name:"DM",color:"#447265"},{name:"Dart",color:"#00B4AB"},{name:"DataWeave",color:"#003a52"},{name:"Dhall",color:"#dfafff"},{name:"Dockerfile",color:"#384d54"},{name:"Dogescript",color:"#cca760"},{name:"Dylan",color:"#6c616e"},{name:"E",color:"#ccce35"},{name:"ECL",color:"#8a1267"},{name:"EQ",color:"#a78649"},{name:"Eiffel",color:"#946d57"},{name:"Elixir",color:"#6e4a7e"},{name:"Elm",color:"#60B5CC"},{name:"Emacs Lisp",color:"#c065db"},{name:"EmberScript",color:"#FFF4F3"},{name:"Erlang",color:"#B83998"},{name:"F#",color:"#b845fc"},{name:"F*",color:"#572e30"},{name:"FLUX",color:"#88ccff"},{name:"Factor",color:"#636746"},{name:"Fancy",color:"#7b9db4"},{name:"Fantom",color:"#14253c"},{name:"Forth",color:"#341708"},{name:"Fortran",color:"#4d41b1"},{name:"FreeMarker",color:"#0050b2"},{name:"Frege",color:"#00cafe"},{name:"G-code",color:"#D08CF2"},{name:"GDScript",color:"#355570"},{name:"Game Maker Language",color:"#71b417"},{name:"Genie",color:"#fb855d"},{name:"Gherkin",color:"#5B2063"},{name:"Glyph",color:"#c1ac7f"},{name:"Gnuplot",color:"#f0a9f0"},{name:"Groovy",color:"#e69f56"},{name:"HTML",color:"#e34c26"},{name:"Hack",color:"#878787"},{name:"Harbour",color:"#0e60e3"},{name:"Haskell",color:"#5e5086"},{name:"Haxe",color:"#df7900"},{name:"HCL",color:"#844fba"},{name:"HiveQL",color:"#dce200"},{name:"HolyC",color:"#ffefaf"},{name:"Hy",color:"#7790B2"},{name:"IDL",color:"#a3522f"},{name:"Idris",color:"#b30000"},{name:"Io",color:"#a9188d"},{name:"Ioke",color:"#078193"},{name:"Isabelle",color:"#FEFE00"},{name:"J",color:"#9EEDFF"},{name:"JSONiq",color:"#40d47e"},{name:"Jolie",color:"#843179"},{name:"Jsonnet",color:"#0064bd"},{name:"Julia",color:"#a270ba"},{name:"Jupyter Notebook",color:"#DA5B0B"},{name:"KRL",color:"#28430A"},{name:"Kotlin",color:"#F18E33"},{name:"LFE",color:"#4C3023"},{name:"LLVM",color:"#185619"},{name:"LSL",color:"#3d9970"},{name:"Lasso",color:"#999999"},{name:"Lex",color:"#DBCA00"},{name:"LiveScript",color:"#499886"},{name:"LookML",color:"#652B81"},{name:"Lua",color:"#000080"},{name:"MATLAB",color:"#e16737"},{name:"MAXScript",color:"#00a6a6"},{name:"MQL4",color:"#62A8D6"},{name:"MQL5",color:"#4A76B8"},{name:"MTML",color:"#b7e1f4"},{name:"Makefile",color:"#427819"},{name:"Markdown",color:"#083fa1"},{name:"Mask",color:"#f97732"},{name:"Max",color:"#c4a79c"},{name:"Mercury",color:"#ff2b2b"},{name:"Meson",color:"#007800"},{name:"Metal",color:"#8f14e9"},{name:"Mirah",color:"#c7a938"},{name:"Modula-3",color:"#223388"},{name:"NCL",color:"#28431f"},{name:"Nearley",color:"#990000"},{name:"Nemerle",color:"#3d3c6e"},{name:"NetLinx",color:"#0aa0ff"},{name:"NetLinx+ERB",color:"#747faa"},{name:"NetLogo",color:"#ff6375"},{name:"NewLisp",color:"#87AED7"},{name:"Nextflow",color:"#3ac486"},{name:"Nim",color:"#37775b"},{name:"Nit",color:"#009917"},{name:"Nix",color:"#7e7eff"},{name:"Nu",color:"#c9df40"},{name:"OCaml",color:"#3be133"},{name:"ObjectScript",color:"#424893"},{name:"Objective-C",color:"#438eff"},{name:"Objective-C++",color:"#6866fb"},{name:"Objective-J",color:"#ff0c5a"},{name:"Omgrofl",color:"#cabbff"},{name:"Opal",color:"#f7ede0"},{name:"Oxygene",color:"#cdd0e3"},{name:"Oz",color:"#fab738"},{name:"P4",color:"#7055b5"},{name:"PLSQL",color:"#dad8d8"},{name:"Pan",color:"#cc0000"},{name:"Papyrus",color:"#6600cc"},{name:"Parrot",color:"#f3ca0a"},{name:"Pascal",color:"#E3F171"},{name:"Pawn",color:"#dbb284"},{name:"Pep8",color:"#C76F5B"},{name:"Perl",color:"#0298c3"},{name:"Perl 6",color:"#0000fb"},{name:"PigLatin",color:"#fcd7de"},{name:"Pike",color:"#005390"},{name:"PogoScript",color:"#d80074"},{name:"PostScript",color:"#da291c"},{name:"PowerBuilder",color:"#8f0f8d"},{name:"PowerShell",color:"#012456"},{name:"Processing",color:"#0096D8"},{name:"Prolog",color:"#74283c"},{name:"Propeller Spin",color:"#7fa2a7"},{name:"Puppet",color:"#302B6D"},{name:"PureBasic",color:"#5a6986"},{name:"PureScript",color:"#1D222D"},{name:"Protocol Buffers",color:"#CCCCCC"},{name:"QML",color:"#44a51c"},{name:"Quake",color:"#882233"},{name:"R",color:"#198CE7"},{name:"RAML",color:"#77d9fb"},{name:"Racket",color:"#3c5caa"},{name:"Ragel",color:"#9d5200"},{name:"Rascal",color:"#fffaa0"},{name:"Rebol",color:"#358a5b"},{name:"Red",color:"#f50000"},{name:"Ren'Py",color:"#ff7f7f"},{name:"Ring",color:"#2D54CB"},{name:"Roff",color:"#ecdebe"},{name:"Rouge",color:"#cc0088"},{name:"Rust",color:"#dea584"},{name:"SAS",color:"#B34936"},{name:"SQF",color:"#3F3F3F"},{name:"SQL",color:"#e38c00"},{name:"SRecode Template",color:"#348a34"},{name:"SaltStack",color:"#646464"},{name:"Scala",color:"#c22d40"},{name:"Scheme",color:"#1e4aec"},{name:"Self",color:"#0579aa"},{name:"Shell",color:"#89e051"},{name:"Shen",color:"#120F14"},{name:"Slash",color:"#007eff"},{name:"Slice",color:"#003fa2"},{name:"Smalltalk",color:"#596706"},{name:"Solidity",color:"#AA6746"},{name:"SourcePawn",color:"#5c7611"},{name:"Squirrel",color:"#800000"},{name:"Stan",color:"#b2011d"},{name:"Standard ML",color:"#dc566d"},{name:"SuperCollider",color:"#46390b"},{name:"Swift",color:"#ffac45"},{name:"SystemVerilog",color:"#DAE1C2"},{name:"TI Program",color:"#A0AA87"},{name:"Tcl",color:"#e4cc98"},{name:"TeX",color:"#3D6117"},{name:"Terra",color:"#00004c"},{name:"Turing",color:"#cf142b"},{name:"UnrealScript",color:"#a54c4d"},{name:"VCL",color:"#148AA8"},{name:"VHDL",color:"#adb2cb"},{name:"Vala",color:"#fbe5cd"},{name:"Verilog",color:"#b2b7f8"},{name:"Vim script",color:"#199f4b"},{name:"Visual Basic",color:"#945db7"},{name:"Volt",color:"#1F1F1F"},{name:"Vue",color:"#2c3e50"},{name:"WebAssembly",color:"#04133b"},{name:"Wollok",color:"#a23738"},{name:"X10",color:"#4B6BEF"},{name:"XC",color:"#99DA07"},{name:"XQuery",color:"#5232e7"},{name:"XSLT",color:"#EB8CEB"},{name:"YARA",color:"#220000"},{name:"YASnippet",color:"#32AB90"},{name:"Yacc",color:"#4B6C4B"},{name:"ZAP",color:"#0d665e"},{name:"ZIL",color:"#dc75e5"},{name:"ZenScript",color:"#00BCD1"},{name:"Zephir",color:"#118f9e"},{name:"Zig",color:"#ec915c"},{name:"eC",color:"#913960"},{name:"mcfunction",color:"#E22837"},{name:"nesC",color:"#94B0C7"},{name:"ooc",color:"#b0b77e"},{name:"sed",color:"#64b970"},{name:"wdl",color:"#42f1f4"},{name:"wisp",color:"#7582D1"},{name:"xBase",color:"#403a40"}];function g(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var b=new WeakSet;let LanguagesProvider=class LanguagesProvider extends EventTarget{handleEvent(e){let t=e.parsedMetadata;if(!t||t.caretPositionKind!==a.Z.Language)return[];let i="";if(!(t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)))return[];(0,a.cK)(t.caretSelectedNode.content)&&(i=t.caretSelectedNode.content.value);let r=y.slice(0,7);if(1===i.length)r=y.filter(e=>e.name.startsWith(i.toUpperCase())).slice(0,7);else if(i.length>1){let e=i.replace(/\s/g,"");r=(0,m.d)(y,t=>{let i=(0,v.dt)(t.name,e);return i>0?{score:i,text:t.name}:null},v.UD)}for(let e of r){let i=t.caretSelectedNode.location.end,r=t.caretSelectedNode.location.end;(0,a.cK)(t.caretSelectedNode.content)&&(i=t.caretSelectedNode.content.location.start,r=t.caretSelectedNode.content.location.end);let n=e.name.includes(" ")?`"${e.name}"`:e.name,o=`${t.query.slice(0,i)+n} ${t.query.slice(r)}`;this.dispatchEvent(new d.qi({filter:"lang",value:e.name,icon:(function(e,t,i){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return i})(this,b,w).call(this,e.color),priority:0,action:{query:o,replaceQueryWith:o,moveCaretTo:i+n.length+1}}))}}constructor(e){super(),function(e,t){(function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,b),g(this,"priority",10),g(this,"name","Languages"),g(this,"singularItemName","language"),g(this,"value","language"),g(this,"type","filter"),g(this,"manuallyDetermineFilterEligibility",!0),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this)}};function w(e){let t=document.createElement("div");return(0,f.qy)`
`.renderInto(t),{html:t.innerHTML}}var S=i(18150);function E(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function C(e,t){var i=E(e,t,"get");return i.get?i.get.call(e):i.value}function k(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function q(e,t,i){var r=E(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function T(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var P=new WeakMap,N=new WeakMap;let B=class ReposProviderBase extends EventTarget{async getMatchingRepositories({state:e}){let t="",i=[];if(e.ast){let r=(0,a.H5)(e.ast),n=!1;for(let e of r)"repo"===e.kind||"saved"===e.kind?n=!0:"org"===e.kind&&i.push(e.value.toLowerCase());if(n&&e.caretPositionKind!==a.Z.Repository)return[];t=(0,a.Xq)(e.ast)}e.caretSelectedNode&&(0,a.bY)(e.caretSelectedNode)&&(t=(0,a.cK)(e.caretSelectedNode.content)?e.caretSelectedNode.content.value:""),null===C(this,N)&&q(this,N,(await (0,S.KW)(C(this,P))).filter(e=>"Repository"===e.type).map(e=>e.name));let r=C(this,N);if(t.length>0){let e=t.replace(/\s/g,"");r=(0,m.d)(C(this,N),t=>{let i=(0,v.dt)(t,e);return i>0?{score:i,text:t}:null},v.UD)}return i.length>0&&(r=r.filter(e=>{let t=e.split("/")[0].toLowerCase();return i.find(e=>t.startsWith(e))})),r}constructor(e){super(),k(this,P,{writable:!0,value:void 0}),k(this,N,{writable:!0,value:null}),q(this,P,e)}};let ReposFilterProvider=class ReposFilterProvider extends B{async handleEvent(e){let t=e.parsedMetadata,i=this.queryBuilder.hasFocus();if(!t||!i||t.caretPositionKind!==a.Z.Repository&&t.caretPositionKind!==a.Z.Owner)return[];for(let e of(await this.getMatchingRepositories({state:t})).slice(0,5)){let i={url:`/${e}`};if(t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)){let r=t.caretSelectedNode.location.end,n=t.caretSelectedNode.location.end;(0,a.cK)(t.caretSelectedNode.content)&&(r=t.caretSelectedNode.content.location.start,n=t.caretSelectedNode.content.location.end),i={replaceQueryWith:`${t.query.slice(0,r)+e} ${t.query.slice(n)}`,moveCaretTo:r+e.length+1}}this.dispatchEvent(new d.qi({filter:"repo",value:e,icon:d.m4.Repo,priority:0,action:i}))}}constructor(e,t){super(t),T(this,"priority",6),T(this,"name","Repositories"),T(this,"singularItemName","repository"),T(this,"value","repository-filter"),T(this,"type","filter"),T(this,"manuallyDetermineFilterEligibility",!0),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this)}};let ReposSearchProvider=class ReposSearchProvider extends B{async handleEvent(e){let t=e.parsedMetadata,i=this.queryBuilder.hasFocus();if(!t||!i||t.caretPositionKind!==a.Z.Text)return[];for(let e of(await this.getMatchingRepositories({state:t})).slice(0,5))this.dispatchEvent(new d.CN({value:e,icon:d.m4.Repo,priority:0,action:{url:`/${e}`}}))}constructor(e,t){super(t),T(this,"priority",6),T(this,"name","Repositories"),T(this,"singularItemName","repository"),T(this,"value","repository-search"),T(this,"type","search"),T(this,"manuallyDetermineFilterEligibility",!0),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this)}};function A(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function L(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function R(e,t){var i=L(e,t,"get");return i.get?i.get.call(e):i.value}function x(e,t,i){A(e,t),t.set(e,i)}function _(e,t,i){var r=L(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function I(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var M=new WeakMap,D=new WeakMap;let CustomScopeCache=class CustomScopeCache{set(e){_(this,M,e),_(this,D,!0)}get(){if(R(this,D))return R(this,M)}len(){return R(this,M).length}clear(){_(this,D,!1),_(this,M,[])}constructor(){x(this,M,{writable:!0,value:[]}),x(this,D,{writable:!0,value:void 0})}};var O=new WeakMap,F=new WeakSet;let SavedScopeProvider=class SavedScopeProvider extends EventTarget{async fetchSuggestions(){let e=[];if(R(this,O)){let t=await fetch(R(this,O),{method:"GET",mode:"same-origin",headers:{Accept:"application/json"}});if(!t.ok)return[];e=await t.json(),(function(e,t,i){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return i})(this,F,W).call(this,e)}return e}async handleEvent(e){let t=e.parsedMetadata;if(!t||t.caretPositionKind!==a.Z.Text&&t.caretPositionKind!==a.Z.Saved||t.caretPositionKind!==a.Z.Saved&&t.ast&&(0,a.cZ)(t.ast,"Saved")||t.ast&&((0,a.cZ)(t.ast,"Repo")||(0,a.cZ)(t.ast,"Org")))return[];let i="";t.caretSelectedNode&&((0,a.YT)(t.caretSelectedNode)?(0,a.cK)(t.caretSelectedNode.content)&&(i=String(t.caretSelectedNode.content.value)):(0,a.cK)(t.caretSelectedNode)&&(i=String(t.caretSelectedNode.value)));let r=this.customScopesCache.get();if(void 0===r&&(r=await this.fetchSuggestions()),i.trim().length>0){let e=i.replace(/[\s"]/g,"");r=(0,m.d)(r,t=>{let i=(0,v.dt)(t.name,e);return i>0?{score:i,text:t.name}:null},v.UD)}for(let e of r){let i="saved:",r=e.name.includes(" ")?`"${e.name}"`:e.name,n="",o=(n=t.query.endsWith(" ")||""===t.query?`${t.query}${i+r} `:`${t.query} ${i+r} `).length;if(t.caretSelectedNode&&((0,a.cK)(t.caretSelectedNode)||(0,a.bY)(t.caretSelectedNode))){let e=t.caretSelectedNode.location.start,s=t.caretSelectedNode.location.end;(0,a.bY)(t.caretSelectedNode)&&(0,a.cK)(t.caretSelectedNode.content)&&(s=t.caretSelectedNode.content.location.end);let l=t.query.slice(0,e),c=t.query.slice(s).trimEnd();""===c&&(r+=" "),n=l+i+r+c,o=e+i.length+r.length}this.dispatchEvent(new d.CN({value:`saved:${e.name}`,icon:d.m4.Bookmark,priority:0,action:{replaceQueryWith:n,moveCaretTo:o}}))}t.caretPositionKind===a.Z.Saved&&this.dispatchEvent(new d.CN({value:"Manage saved searches",icon:d.m4.PlusCircle,scope:"COMMAND",priority:0,action:{commandName:"blackbird-monolith.manageCustomScopes",data:{}}}))}constructor(e,t){super(),function(e,t){A(e,t),t.add(e)}(this,F),I(this,"priority",4),I(this,"name","Saved queries"),I(this,"singularItemName","saved query"),I(this,"value","saved query"),I(this,"type","search"),x(this,O,{writable:!0,value:void 0}),I(this,"customScopesCache",new CustomScopeCache),this.queryBuilder=e,_(this,O,t),this.queryBuilder.addEventListener("query",this)}};function W(e){this.customScopesCache.set(e)}function $(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function j(e,t){var i=$(e,t,"get");return i.get?i.get.call(e):i.value}function H(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function G(e,t,i){var r=$(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function Q(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var U=new WeakMap,K=new WeakMap;let OwnersProvider=class OwnersProvider extends EventTarget{async handleEvent(e){let t=e.parsedMetadata,i=this.queryBuilder.hasFocus();if(!t||!i)return[];if(t.caretPositionKind===a.Z.Text&&t.ast){if((0,a.H5)(t.ast).length)return[]}else if(t.caretPositionKind!==a.Z.Owner)return[];let r="",n=[];t.ast&&(r=(0,a.Xq)(t.ast)),t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)&&(r=(0,a.cK)(t.caretSelectedNode.content)?t.caretSelectedNode.content.value:""),null===j(this,U)&&G(this,U,[...new Set((await (0,S.KW)(j(this,K))).filter(e=>"Repository"===e.type).map(e=>e.name.split("/")[0]))]);let o=j(this,U);if(r.length>0){let e=r.replace(/\s/g,"");o=(0,m.d)(j(this,U),t=>{let i=(0,v.dt)(t,e);return i>0?{score:i,text:t}:null},v.UD)}for(let e of(n.length>0&&(o=o.filter(e=>{let t=e.split("/")[0].toLowerCase();return n.find(e=>t.startsWith(e))})),o.slice(0,5))){let i={url:`/${e}`};if(t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)){let r=t.caretSelectedNode.location.end,n=t.caretSelectedNode.location.end;(0,a.cK)(t.caretSelectedNode.content)&&(r=t.caretSelectedNode.content.location.start,n=t.caretSelectedNode.content.location.end),i={replaceQueryWith:`${t.query.slice(0,r)+e} ${t.query.slice(n)}`,moveCaretTo:r+e.length+1}}this.dispatchEvent(new d.CN({value:e,icon:d.m4.Repo,priority:0,action:i}))}}constructor(e,t){super(),Q(this,"priority",5),Q(this,"name","Owners"),Q(this,"singularItemName","owner"),Q(this,"value","owner"),Q(this,"type","search"),Q(this,"manuallyDetermineFilterEligibility",!0),H(this,U,{writable:!0,value:null}),H(this,K,{writable:!0,value:void 0}),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),G(this,K,t)}};function z(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function V(e,t){var i=z(e,t,"get");return i.get?i.get.call(e):i.value}function Z(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var J=new WeakMap;let FixedValuesProvider=class FixedValuesProvider extends EventTarget{async handleEvent(e){let t=e.parsedMetadata;if(!t||t.caretPositionKind!==a.Z.OtherQualifier&&t.caretPositionKind!==a.Z.Is||!t.caretSelectedNode||!(0,a.bY)(t.caretSelectedNode))return[];if(!V(this,J)){var r;r=await Promise.all([i.e("vendors-node_modules_github_blackbird-parser_dist_blackbird_js"),i.e("app_components_search_parsing_parsing_ts")]).then(i.bind(i,34863)),function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(this,z(this,J,"set"),r)}let n=[],o="License"===t.caretSelectedNode.qualifier,s="Language"===t.caretSelectedNode.qualifier;n=o?[["BSD Zero Clause License","0bsd"],["MIT License","mit"],["Apache License 2.0","apache-2.0"],["Creative Commons","cc"],["GNU General Public License","gpl"],["GNU Lesser General Public License","lgpl"]]:V(this,J).getPossibleQualifierValues(V(this,J).chooseSearchType(t.ast,!0),t.caretSelectedNode.qualifier).map(e=>[e,e]);let l=t.query;if(t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)&&(l=(0,a.cK)(t.caretSelectedNode.content)?t.caretSelectedNode.content.value:""),l.length>0){let e=l.replace(/\s/g,"");n=(0,m.d)(n,t=>{let i=t[0]===t[1]?t[0]:`${t[0]} ${t[1]}`,r=(0,v.dt)(i,e);return r>0?{score:r,text:i}:void 0},v.UD)}for(let e of n.slice(0,5))if(t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)){let i=t.caretSelectedNode.location.end,r=t.caretSelectedNode.location.end;(0,a.cK)(t.caretSelectedNode.content)&&(i=t.caretSelectedNode.content.location.start,r=t.caretSelectedNode.content.location.end);let n=e[1].includes(" ")?`"${e[1]}"`:e[1],o={replaceQueryWith:`${t.query.slice(0,i)+n} ${t.query.slice(r)}`,moveCaretTo:i+n.length+1};this.dispatchEvent(new d.qi({filter:"owner",value:e[0],icon:s?d.m4.Circle:void 0,priority:0,action:o}))}}constructor(e){super(),Z(this,"priority",3),Z(this,"name","Values"),Z(this,"singularItemName","value"),Z(this,"value","value"),Z(this,"type","filter"),Z(this,"manuallyDetermineFilterEligibility",!0),function(e,t,i){(function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,i)}(this,J,{writable:!0,value:void 0}),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this)}};function Y(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function X(e,t){var i=Y(e,t,"get");return i.get?i.get.call(e):i.value}function ee(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function et(e,t,i){var r=Y(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function ei(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var er=new WeakMap,ea=new WeakMap;let TeamsProvider=class TeamsProvider extends EventTarget{async handleEvent(e){let t=e.parsedMetadata,i=this.queryBuilder.hasFocus();if(!t||!i||t.caretPositionKind!==a.Z.Text)return[];let r=t.query;t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)&&(r=(0,a.cK)(t.caretSelectedNode.content)?t.caretSelectedNode.content.value:""),null===X(this,er)&&et(this,er,(await (0,S.KW)(X(this,ea))).filter(e=>"Team"===e.type).map(e=>({name:e.name,path:e.path})));let n=X(this,er).slice(0,4);if(r.length>0){let e=r.replace(/\s/g,"");n=(0,m.d)(X(this,er),t=>{let i=(0,v.dt)(t.name,e);return i>0?{score:i,text:t.name}:null},v.UD)}for(let e of n.slice(0,5))this.dispatchEvent(new d.CN({value:e.name,icon:d.m4.Team,priority:0,action:{url:e.path}}))}constructor(e,t){super(),ei(this,"priority",7),ei(this,"name","Teams"),ei(this,"singularItemName","team"),ei(this,"value","team"),ei(this,"type","search"),ei(this,"manuallyDetermineFilterEligibility",!0),ee(this,er,{writable:!0,value:null}),ee(this,ea,{writable:!0,value:void 0}),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),et(this,ea,t)}};function en(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function eo(e,t){var i=en(e,t,"get");return i.get?i.get.call(e):i.value}function es(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function el(e,t,i){var r=en(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function ec(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var eu=new WeakMap,ed=new WeakMap;let ProjectsProvider=class ProjectsProvider extends EventTarget{async handleEvent(e){let t=e.parsedMetadata,i=this.queryBuilder.hasFocus();if(!t||!i||t.caretPositionKind!==a.Z.Text)return[];let r=t.query;t.caretSelectedNode&&(0,a.bY)(t.caretSelectedNode)&&(r=(0,a.cK)(t.caretSelectedNode.content)?t.caretSelectedNode.content.value:""),null===eo(this,eu)&&el(this,eu,(await (0,S.KW)(eo(this,ed))).filter(e=>"Project"===e.type).map(e=>({name:e.name,path:e.path})));let n=eo(this,eu).slice(0,4);if(r.length>0){let e=r.replace(/\s/g,"");n=(0,m.d)(eo(this,eu),t=>{let i=(0,v.dt)(t.name,e);return i>0?{score:i,text:t.name}:null},v.UD)}for(let e of n.slice(0,5))this.dispatchEvent(new d.qi({filter:"project",value:e.name,icon:d.m4.Project,priority:0,action:{url:e.path}}))}constructor(e,t){super(),ec(this,"priority",8),ec(this,"name","Projects"),ec(this,"singularItemName","project"),ec(this,"value","project"),ec(this,"type","filter"),ec(this,"manuallyDetermineFilterEligibility",!0),es(this,eu,{writable:!0,value:null}),es(this,ed,{writable:!0,value:void 0}),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),el(this,ed,t)}};var eh=i(23992),ep=i(56176);function em(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function ef(e,t){var i=em(e,t,"get");return i.get?i.get.call(e):i.value}function ev(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function ey(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var eg=new WeakMap,eb=new WeakMap;let BlackbirdProvider=class BlackbirdProvider extends EventTarget{async handleEvent(e){let t=this.fetchData(e);this.dispatchEvent(new d.dS(t));let i=await t,r=0;for(let e of i){if(r>=5)return;if("SUGGESTION_KIND_PATH"===e.kind){if(!e.path)continue;let t=e.path.lastIndexOf("/"),i=e.path.substring(t+1),r=ew(e.path.substring(0,t+1)),a=e.repository_nwo,n=a.length>0&&r.length>0?" \xb7 ":"",o=e.path.split("/").map(encodeURIComponent).join("/");this.dispatchEvent(new d.CN({value:i,icon:d.m4.FileCode,description:`${a}${n}${r}`,priority:0,action:{url:`/${e.repository_nwo}/blob/${e.commit_sha}/${o}#L${e.line_number}`}}))}else{if("SUGGESTION_KIND_SYMBOL"!==e.kind)continue;let t=ew(e.path),i=e.repository_nwo,r=i.length>0&&t.length>0?" \xb7 ":"",a=e.path.split("/").map(encodeURIComponent).join("/"),n=new eh.v0({kind:e.symbol?.kind??""});this.dispatchEvent(new d.CN({value:e.symbol?.fully_qualified_name??"",prefixText:n.fullName,prefixColor:function(e){switch(e.plColor){case"prettylights.syntax.entity":default:return d.yk.Entity;case"prettylights.syntax.constant":return d.yk.Constant;case"prettylights.syntax.keyword":return d.yk.Keyword;case"prettylights.syntax.variable":return d.yk.Variable;case"prettylights.syntax.string":return d.yk.String}}(n),icon:d.m4.FileCode,description:`${i}${r}${t}`,priority:0,action:{url:`/${e.repository_nwo}/blob/${e.commit_sha}/${a}#L${e.line_number}`}}))}r++}}async fetchData(e){let t=e.parsedMetadata;if(!t||!t.query||t.caretPositionKind!==a.Z.Text&&t.caretPositionKind!==a.Z.Path)return[];if(ef(this,eg)[t.query])return ef(this,eg)[t.query];if(!1===(0,ep.M3)())return[];let i=new URLSearchParams({query:t.query,saved_searches:JSON.stringify(t.customScopes)}),r=ef(this,eb).getAttribute("data-blackbird-suggestions-path");if(!r)throw Error("could not get blackbird suggestions path");await this.blackbirdCaches.setupWarmCachesLoop();let n=await (await fetch(`${r}?${i}`,{method:"GET",mode:"same-origin",headers:{Accept:"application/json"}})).json();return n.failed?[]:(ef(this,eg)[t.query]=n.suggestions,n.suggestions)}constructor(e,t){super(),ey(this,"priority",9),ey(this,"name","Code"),ey(this,"singularItemName","code"),ey(this,"value","code"),ey(this,"type","search"),ey(this,"manuallyDetermineFilterEligibility",!0),ey(this,"blackbirdCaches",new l.L),ev(this,eg,{writable:!0,value:{}}),ev(this,eb,{writable:!0,value:void 0}),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),function(e,t,i){var r=em(e,t,"set");!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i)}(this,eb,t)}};function ew(e){return e.length>60?`...${e.substring(e.length-60+3)}`:e}function eS(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function eE(e,t){var i=eS(e,t,"get");return i.get?i.get.call(e):i.value}function eC(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function ek(e,t,i){var r=eS(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function eq(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var eT=new WeakMap,eP=new WeakMap;let InputProvider=class InputProvider extends EventTarget{async handleEvent(e){let t;let r=e.parsedMetadata;if(e.rawQuery&&this.dispatchEvent(new d.CN({value:e.rawQuery,scope:"GITHUB",icon:d.m4.Search,priority:0,action:{query:e.rawQuery},isFallbackSuggestion:!0})),!r||r.caretPositionKind!==a.Z.Text)return[];let n=r.query.trim(),o=eE(this,eT).getAttribute("data-current-repository"),s=eE(this,eT).getAttribute("data-current-org"),l=eE(this,eT).getAttribute("data-current-owner");eE(this,eP)||ek(this,eP,await Promise.all([i.e("vendors-node_modules_github_blackbird-parser_dist_blackbird_js"),i.e("app_components_search_parsing_parsing_ts")]).then(i.bind(i,34863)));let c=eE(this,eP).parseString(n||"");if(c.children){let e=c.children.filter(e=>"Qualifier"===e.kind);o=e.find(e=>"Repo"===e.qualifier)?.content?.value?.toString()||o,t=e.find(e=>"Org"===e.qualifier),s=t?.content?.value?.toString()||s,l=e.find(e=>"Org"===e.qualifier&&"user:"===e.raw)?.content?.value?.toString()||l,o&&!t&&(s=o.split("/")[0])}let u=[],h=!1;if(r.ast){let e=r.ast;if((0,a.Go)(e)){n=e.children.filter(e=>"Text"===e.kind).map(e=>e.value).join(" ");let t=(0,a.H5)(e);if(t.find(e=>"saved"===e.kind))return[];t.length&&(h=!0)}else(0,a.bY)(e)&&(n="");o&&o.length>0&&u.push({query:`repo:${o} ${n}`,scope:"REPO"}),t?u.push({query:`${t.raw}${s} ${n}`,scope:"ORG"}):(s&&s.length>0&&u.push({query:`org:${s} ${n}`,scope:"ORG"}),l&&l.length>0&&u.push({query:`user:${l} ${n}`,scope:"OWNER"}))}n.length>0&&(h?u.push({query:n,scope:"GITHUB"}):u.unshift({query:n,scope:"GITHUB"}));let p=function(e){let t=/^\/[^/]+\/[^/]+\/tree\/[^/]+\/(.*)/.exec(e);if(t){for(let e=1;ee.url.startsWith("/")&&t.startsWith(e.url));if(!i&&!r&&!window.__vitest_browser__)return[];let n=e.parsedMetadata;if(!n?.query)return await eM(this,eH,eU).call(this),[];null===ex(this,eF)&&eI(this,eF,await eM(this,e$,eG).call(this));let o=n?.query;n?.caretSelectedNode&&(0,a.bY)(n?.caretSelectedNode)&&(o=(0,a.cK)(n.caretSelectedNode.content)?n.caretSelectedNode.content.value:"");let s=ex(this,eF);if(o&&o.length>0){let e=o.replace(/\s/g,"");s=(0,m.d)(ex(this,eF),t=>{let i=(0,v.dt)(t.title,e);return i>0?{score:i,text:t.title}:null},v.UD)}for(let e of s.slice(0,5))this.dispatchEvent(new d.CN({value:e.title,icon:e.octicon,priority:11,scope:"EXPLORE",action:{url:`${e.url}?q=${o}&ref_loc=search`}}))}constructor(e){super(),eD(this,e$),eD(this,ej),eD(this,eH),eO(this,"priority",11),eO(this,"name","Explore"),eO(this,"singularItemName","explore page"),eO(this,"value","explore"),eO(this,"type","search"),eO(this,"manuallyDetermineFilterEligibility",!0),e_(this,eF,{writable:!0,value:null}),e_(this,eW,{writable:!0,value:null}),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this)}};function eG(){let e=Promise.resolve(eA);return this.dispatchEvent(new d.dS(e)),e}function eQ(){let e=Promise.resolve(eB);return this.dispatchEvent(new d.dS(e)),e}async function eU(){for(let e of(eI(this,eW,await eM(this,ej,eQ).call(this)),ex(this,eW)))this.dispatchEvent(new d.CN({value:e.title,icon:e.octicon,priority:11,scope:"EXPLORE",action:{url:`${e.url}?ref_loc=search`}}))}var eK=i(62596),ez=i(70170),eV=i(57572),eZ=i(49339);function eJ(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function eY(e,t){var i=eJ(e,t,"get");return i.get?i.get.call(e):i.value}function eX(e,t,i){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,i)}function e0(e,t,i){var r=eJ(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function e1(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let e5="is:issue is:open assignee:@me";var e4=new WeakMap,e3=new WeakMap,e8=new WeakMap,e6=new WeakMap,e7=new WeakMap,e2=new WeakMap,e9=new WeakMap;let CopilotProvider=class CopilotProvider extends EventTarget{fetchIndexStatusPromise(e,t){return fetch(new URL(`/search/check_indexing_status?nwo=${encodeURIComponent(e)}`,window.location.origin).href,{method:"GET",mode:"same-origin",headers:{Accept:"application/json","Scoped-CSRF-Token":t,"X-Requested-With":"XMLHttpRequest"}})}primerSpinner(){return{html:` `}}async handleEvent(e){if(!eY(this,e4))return;let t=e.parsedMetadata;if(!t||t.caretPositionKind!==a.Z.Text)return;let i=t?.query.trim()??"";this.dispatchEvent(new eK.CN({value:"Chat with Copilot",scope:"COPILOT_CHAT",icon:eK.m4.Copilot,priority:0,action:{commandName:"search-copilot-chat",data:{content:i,repoNwo:eY(this,e6)}}})),eY(this,e3)&&(i?this.dispatchEvent(new eK.CN({id:"copilot-nl-search",value:i,scope:"COPILOT_SEARCH",icon:i===e5?eK.m4.Copilot:this.primerSpinner(),priority:0,action:{commandName:"no-op",data:{}}})):this.dispatchEvent(new eK.CN({id:"copilot-nl-search",value:e5,scope:"COPILOT_SEARCH",icon:eK.m4.Copilot,priority:0,action:{commandName:"convert-to-query-syntax",data:{content:e5}}})),this.queryCopilotSearchDebounced(e))}constructor(e,t){super(),e1(this,"priority",10),e1(this,"name","Copilot"),e1(this,"singularItemName","copilot"),e1(this,"value","copilot"),e1(this,"type","search"),eX(this,e4,{writable:!0,value:!1}),eX(this,e3,{writable:!0,value:!1}),eX(this,e8,{writable:!0,value:void 0}),eX(this,e6,{writable:!0,value:void 0}),eX(this,e7,{writable:!0,value:void 0}),eX(this,e2,{writable:!0,value:new AbortController}),eX(this,e9,{writable:!0,value:void 0}),e1(this,"queryCopilotSearch",async e=>{let t=e.parsedMetadata,i=t?.query.trim()??"";if(eY(this,e7)&&i&&i!==e5)try{let e=await eY(this,e9).getAuthToken();eY(this,e2).abort(),e0(this,e2,new AbortController);let t=await (0,eV.lS)("/copilot/completions/nl-search",{method:"POST",body:{query:i},headers:{"Scoped-CSRF-Token":eY(this,e7),"X-Copilot-Api-Token":e.value},signal:eY(this,e2).signal});if(!t.ok)return this.dispatchEvent(new eK.CN({isUpdate:!0,id:"copilot-nl-search",value:"There was an error parsing your query",scope:"COPILOT_SEARCH",icon:eK.m4.CopilotError,priority:0,action:{commandName:"no-op",data:{}}}));let r=await t.json();i.length>0&&eY(this,e3)&&this.dispatchEvent(new eK.CN({isUpdate:!0,id:"copilot-nl-search",value:r.query||i,scope:"COPILOT_SEARCH",icon:eK.m4.Copilot,priority:0,action:{commandName:"convert-to-query-syntax",data:{content:r.query||i}}}))}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;this.dispatchEvent(new eK.CN({isUpdate:!0,id:"copilot-nl-search",value:"There was an error parsing your query",scope:"COPILOT_SEARCH",icon:eK.m4.CopilotError,priority:0,action:{commandName:"no-op",data:{}}}));return}}),e1(this,"queryCopilotSearchDebounced",(0,ez.s)(this.queryCopilotSearch,1e3)),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),e0(this,e8,t),e0(this,e6,eY(this,e8).getAttribute("data-current-repository")),e0(this,e4,"true"===eY(this,e8).getAttribute("data-copilot-chat-enabled")),e0(this,e3,"true"===eY(this,e8).getAttribute("data-nl-search-enabled")),e0(this,e7,eY(this,e8).getAttribute("data-nl-search-csrf")),e0(this,e9,new eZ.J([]))}};function te(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function tt(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function ti(e,t){var i=tt(e,t,"get");return i.get?i.get.call(e):i.value}function tr(e,t,i){te(e,t),t.set(e,i)}function ta(e,t,i){var r=tt(e,t,"set");return!function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=i}}(e,r,i),i}function tn(e,t,i){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return i}function to(e,t){te(e,t),t.add(e)}function ts(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function tl(e,t,i,r){var a,n=arguments.length,o=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(n<3?a(o):n>3?a(t,i,o):a(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o}let tc=String.fromCharCode(160),tu=(0,eN.G7)("marketing_pages_search_explore_provider");var td=new WeakMap,th=new WeakMap,tp=new WeakMap,tm=new WeakMap,tf=new WeakMap,tv=new WeakMap,ty=new WeakMap,tg=new WeakMap,tb=new WeakMap,tw=new WeakMap,tS=new WeakSet,tE=new WeakMap,tC=new WeakMap,tk=new WeakSet;let QbsearchInputElement=class QbsearchInputElement extends HTMLElement{get placeholderText(){return'Type / to search'}get query(){return this.queryBuilder.input?.value||""}set query(e){this.queryBuilder.input&&(this.queryBuilder.input.value=e,this.queryBuilder.parseQuery(),this.setButtonText(e),(async()=>{await this.parseSearchInputRaw(),this.syncRichButtonText()})())}flattenASTForQueryBuilder(e){let t=this.parsing?.getHighlights(e.ast)||[];t.sort((e,t)=>e.location.start-t.location.start);let i=0,r=[];for(let a of t){if(a.location.start>i&&r.push({type:"text",value:e.query.substring(i,a.location.start)}),i>a.location.start)continue;let t=d.VJ.Normal;"pl-en"===a.className?t=d.VJ.Entity:"pl-c1"===a.className?t=d.VJ.Constant:"input-parsed-symbol"===a.className&&(t=d.VJ.FilterValue),r.push({type:"text",value:e.query.substring(a.location.start,a.location.end),style:t}),i=a.location.end}return i{await window.customElements.whenDefined("custom-scopes"),this.customScopesManager.initialize(ti(this,tv).customScopesCache,()=>ti(this,tv).fetchSuggestions(),ti(this,tb),this.getAttribute("data-delete-custom-scopes-csrf")||""),ta(this,tw,!0)})());let{signal:e}=ta(this,th,new AbortController);window.addEventListener("blackbird_monolith_react_connected",()=>{ta(this,td,!0)},{signal:e}),window.addEventListener("blackbird_monolith_react_disconnected",()=>{ta(this,td,!1)},{signal:e}),window.addEventListener("blackbird_provide_feedback",()=>{this.feedbackDialog instanceof HTMLDialogElement?this.feedbackDialog.showModal():this.feedbackDialog.show()},{signal:e}),window.addEventListener("blackbird_monolith_set_global_nav_visibility",e=>{let t=e.detail;this.setGlobalNavVisibility(t),this.setGlobalBarAlwaysExpanded(!t),ta(this,tp,!t),ti(this,tp)?this.classList.add("flex-1"):this.classList.remove("flex-1"),this.setButtonText(this.query)},{signal:e}),window.dispatchEvent(new CustomEvent("blackbird_monolith_retransmit_react")),window.addEventListener("blackbird_monolith_update_input",e=>{this.query=e.detail},{signal:e}),window.addEventListener("blackbird_monolith_append_and_focus_input",async e=>{let{appendQuery:t,retainScrollPosition:i,returnTarget:r}=e.detail;r&&i?this.expandAndRetainScrollPosition(r):(await this.expand(this.isRetainScrollPosition()),r&&ta(this,tg,r)),t&&!this.query.trim().endsWith(t)&&(this.query+=` ${t}`),this.parsing||await this.loadParser(),this.moveCaretToEndOfInput(),await this.parseSearchInputRaw()},{signal:e}),window.addEventListener("blackbird_monolith_save_query_as_custom_scope",e=>{this.saveQueryAsCustomScope(e)},{signal:e}),(async()=>{await window.customElements.whenDefined("query-builder");let e=[new HistoryProvider(this.queryBuilder),new SavedScopeProvider(this.queryBuilder,ti(this,tb)),new BlackbirdProvider(this.queryBuilder,this),new CopilotProvider(this.queryBuilder,this)],t=tu?[new ExploreProvider(this.queryBuilder)]:[],i=[new LanguagesProvider(this.queryBuilder),new ReposFilterProvider(this.queryBuilder,this),new ReposSearchProvider(this.queryBuilder,this),new OwnersProvider(this.queryBuilder,this),new FixedValuesProvider(this.queryBuilder),new TeamsProvider(this.queryBuilder,this),new ProjectsProvider(this.queryBuilder,this),new InputProvider(this.queryBuilder,this)];(0,ep.M3)()?i.push(...e):i.push(...t),this.queryBuilder.initialize(this.parser,i),this.query=this.getAttribute("data-initial-value")||""})(),this.queryBuilder.parentElement?.addEventListener("submit",e=>{this.search(this.queryBuilder.query),this.retract(),this.queryBuilder.inputSubmit(),e.preventDefault()}),this.queryBuilder.addEventListener("blackbird-monolith.manageCustomScopes",e=>{ti(this,tw)&&tn(this,tk,tT).call(this,e)}),this.queryBuilder.addEventListener("query-builder:navigate",e=>{let t=e.detail?.url;if(t){let e=new URL(t,window.location.origin);if(e.origin===window.location.origin&&e.pathname===window.location.pathname){let t=(0,u.$c)(e.hash);t.blobRange?.start?.line&&window.dispatchEvent(new CustomEvent("react_blob_view_scroll_line_into_view",{detail:{line:t.blobRange.start.line}}))}}this.retract()}),this.queryBuilder.addEventListener("blackbird-monolith.search",e=>{this.search(e.detail?.query??"")}),this.queryBuilder.addEventListener("search-copilot-chat",e=>{window.dispatchEvent(new tP(e.detail?.content,e.detail?.repoNwo)),this.retract()}),this.queryBuilder.addEventListener("convert-to-query-syntax",async e=>{(0,o.BI)("copilot_natural_language_github_search"),this.search(e.detail.content),this.retract()}),(0,n.D_)(window.location.pathname)}syncRichButtonText(){if(ti(this,tp)){if(""===this.query)this.inputButton.getAttribute("placeholder")?this.inputButtonText.textContent=this.inputButton.getAttribute("placeholder"):this.inputButtonText.innerHTML=this.placeholderText,this.inputButton.classList.add("placeholder");else{let e=this.parser.flatten(this.parser.parse(this.query,void 0)),t=[];for(let i of e){let e=document.createElement("span");e.textContent=i.value,i.style===d.VJ.FilterValue?e.classList.add("input-parsed-symbol"):i.style===d.VJ.Constant?e.classList.add("pl-c1"):i.style===d.VJ.Entity&&e.classList.add("pl-en"),t.push(e)}this.inputButtonText.replaceChildren(...t)}}}setButtonText(e){ti(this,tp)&&""!==e.trim()?(this.inputButtonText.textContent=e,this.inputButton.classList.remove("placeholder")):(this.inputButton.getAttribute("placeholder")?this.inputButtonText.textContent=this.inputButton.getAttribute("placeholder"):this.inputButtonText.innerHTML.trim()!==this.placeholderText&&(this.inputButtonText.innerHTML=this.placeholderText),this.inputButton.classList.add("placeholder"))}async moveCaretToEndOfInput(){await window.customElements.whenDefined("query-builder"),this.queryBuilder.moveCaretToEndOfInput()}disconnectedCallback(){ti(this,th)?.abort()}getSuggestionInputState(){let e=[];return this.ast&&(e=tn(this,tS,tq).call(this,this.ast)),{query:this.query.replaceAll(tc," "),ast:this.ast,selectedNode:ti(this,tf),mode:ti(this,tm),customScopes:e,type:this.ast?this.chooseSearchType(this.ast):""}}setGlobalNavVisibility(e){let t=document.querySelector("#global-nav"),i=window.matchMedia("(min-width: 768px)");t&&i.matches&&(t.hidden=!e)}setGlobalBarAlwaysExpanded(e){if(!this.headerRedesignEnabled)return;let t=document.querySelector(".js-global-bar");t&&(e?t.classList.add("always-expanded"):t.classList.remove("always-expanded"))}setGlobalBarModalOpen(e){if(!this.headerRedesignEnabled)return;let t=document.querySelector(".js-global-bar");t&&(e?t.classList.add("search-expanded"):t.classList.remove("search-expanded"))}searchInputContainerClicked(e){e.target.classList.contains("search-input-container")&&this.expand(this.isRetainScrollPosition()),(0,o.BI)("blackbird.click",{target:"SEARCH_BOX"})}async updateQueryBuilderVisibility(){await window.customElements.whenDefined("query-builder"),this.queryBuilderContainer.hidden=!this.classList.contains("expanded"),this.darkBackdrop.hidden=this.queryBuilderContainer.hidden}expandAndRetainScrollPosition(e){if(this.isRetainScrollPosition())return this.expand(!0);window.scrollY>200?(this.classList.add("search-input-absolute"),this.style.top=`${window.scrollY+25}px`,this.expand(!0),ta(this,tg,e)):this.expand()}handleExpand(){this.expand(this.isRetainScrollPosition())}async expand(e){this.classList.contains("expanded")||(e||window.scrollTo(0,0),this.blackbirdCaches.setupWarmCachesLoop(),ta(this,tg,this.inputButton),this.searchSuggestionsDialog instanceof HTMLDialogElement?this.searchSuggestionsDialog.showModal():this.searchSuggestionsDialog.show(),this.classList.add("expanded"),this.setGlobalNavVisibility(!1),this.setGlobalBarModalOpen(!0),this.updateQueryBuilderVisibility(),await window.customElements.whenDefined("query-builder"),""===this.query&&this.getAttribute("data-scope")&&(this.query=`${this.getAttribute("data-scope")} `),this.queryBuilder.inputFocus(),this.moveCaretToEndOfInput(),this.queryBuilder.inputChange(),this.parseSearchInputRaw(),document.dispatchEvent(new CustomEvent("qbsearch-input:expand",{detail:{element:this}})))}chooseSearchType(e){let t=new URLSearchParams(window.location.search).get("type");return t?this.parsing.mapURLParamToSearchType(t):this.parsing.chooseSearchType(e,(0,ep.M3)())}async search(e,t=!1){let i=await this.loadParser(),r=i.parseString(e),n=tn(this,tS,tq).call(this,r),o=i.mapSearchTypeToURLParam(this.chooseSearchType(r)),l=(0,a.r3)(r,window.location.pathname);if(l){(0,s.softNavigate)(l);return}if(ti(this,td)&&!t){let t={type:o,p:null,l:null};n.length>0?(t.saved_searches=JSON.stringify(n),t.expanded_query=i.getExpandedQuery(e,n,r)):(t.saved_searches=void 0,t.expanded_query=void 0),window.dispatchEvent(new CustomEvent("blackbird_monolith_search",{detail:{search:e,searchParams:t}}))}else{let a="";""!==o&&(a=`&type=${encodeURIComponent(o)}`);let l=`/search?q=${encodeURIComponent(e)}${a}`;if(n.length>0){l+=`&saved_searches=${encodeURIComponent(JSON.stringify(n))}`;let t=encodeURIComponent(i.getExpandedQuery(e,n,r));l+=`&expanded_query=${t}`}let u=(0,c.Bx)().join(",");""!==u&&(l+=`&experiments=${u}`),t?window.open(l,"_blank"):(0,s.softNavigate)(l)}}setLocalHistory(e){if(""===e.trim())return;let t=JSON.parse(window.localStorage.getItem("github-search-history")??"[]");t.length>=50&&(t=t.slice(0,49)),t.find(t=>t.toLowerCase()===e.toLowerCase())||t.unshift(e),window.localStorage.setItem("github-search-history",JSON.stringify(t))}handleChange(){this.parseSearchInput()}async loadParser(){return this.parsingPromise||(this.parsingPromise=Promise.all([i.e("vendors-node_modules_github_blackbird-parser_dist_blackbird_js"),i.e("app_components_search_parsing_parsing_ts")]).then(i.bind(i,34863)),this.parsing=await this.parsingPromise),this.parsingPromise}parseSearchInput(){let e=Date.now();e-ti(this,tC)>15&&!ti(this,tE)?this.parseSearchInputRaw():ti(this,tE)||(ta(this,tE,!0),setTimeout(()=>{ta(this,tE,!1),this.parseSearchInputRaw()},15-(e-ti(this,tC))))}async parseSearchInputRaw(){if(!this.query){this.lastParsedQuery=this.query,this.ast={kind:"Nothing"},ta(this,tm,a.Z.Text),ta(this,tf,void 0);return}if(this.parsing||await this.loadParser(),ta(this,tC,Date.now()),!this.ast||this.query!==this.lastParsedQuery){this.lastParsedQuery=this.query;let[e]=this.parsing.parseSearchInput(this.lastParsedQuery);this.ast=e}let e=this.parsing.getCaretPositionKindFromIndex(this.ast,0);ta(this,tm,e.kind),ta(this,tf,e.node)}handleSubmit(e=!1){0!==this.query.trim().length&&(this.setLocalHistory(this.query),this.search(this.query,e),this.retract())}editCustomScope(e){this.customScopesManager.editCustomScope(e)}newCustomScope(e){this.customScopesManager.create(""),e.stopPropagation()}saveQueryAsCustomScope(e){this.customScopesManager.create(this.query),ta(this,ty,e.detail)}handleDialogClose(){setTimeout(()=>{ti(this,ty)?(ti(this,ty)?.focus(),ta(this,ty,void 0)):this.inputButton.focus()})}showFeedbackDialog(e){this.feedbackDialog.show(),this.retract(),e.stopPropagation(),e.preventDefault()}async submitFeedback(e){e.preventDefault();let t=e.target.form;await fetch(t.action,{method:"POST",body:new FormData(t)}),this.feedbackDialog.close()}constructor(...e){super(...e),to(this,tS),to(this,tk),ts(this,"headerRedesignEnabled",!1),tr(this,td,{writable:!0,value:void 0}),tr(this,th,{writable:!0,value:void 0}),ts(this,"blackbirdCaches",new l.L),tr(this,tp,{writable:!0,value:!1}),ts(this,"ast",void 0),tr(this,tm,{writable:!0,value:a.Z.Text}),tr(this,tf,{writable:!0,value:void 0}),ts(this,"parsing",void 0),ts(this,"parsingPromise",void 0),tr(this,tv,{writable:!0,value:void 0}),tr(this,ty,{writable:!0,value:void 0}),tr(this,tg,{writable:!0,value:null}),tr(this,tb,{writable:!0,value:void 0}),tr(this,tw,{writable:!0,value:!1}),ts(this,"parser",{parse:(e,t)=>{let i,r;if(!this.parsing)return(e||this.classList.contains("expanded"))&&(async()=>{await this.loadParser(),this.queryBuilder.parseQuery()})(),{query:e};let[a]=this.parsing.parseSearchInput(e),n=tn(this,tS,tq).call(this,a);if(void 0!==t){let e=this.parsing.getCaretPositionKindFromIndex(a,t);i=e.kind,r=e.node}return{ast:a,query:e,caretPositionKind:i,caretSelectedNode:r,customScopes:n}},flatten:this.flattenASTForQueryBuilder.bind(this)}),ts(this,"handleClose",e=>{this.syncRichButtonText(),this.classList.remove("expanded"),ti(this,tp)||this.setGlobalNavVisibility(!0),this.setGlobalBarModalOpen(!1),this.updateQueryBuilderVisibility(),e.preventDefault(),this.classList.contains("search-input-absolute")&&this.classList.remove("search-input-absolute"),setTimeout(()=>{ti(this,tg)?.focus(),document.dispatchEvent(new CustomEvent("qbsearch-input:close",{detail:{element:this}}))},0)}),ts(this,"retract",()=>{this.searchSuggestionsDialog.close(),ti(this,tg)?.focus()}),tr(this,tE,{writable:!0,value:!1}),tr(this,tC,{writable:!0,value:0})}};function tq(e){let t;if(!this.parsing)return[];let i=this.parsing.getCustomScopeNames(e);try{t=JSON.parse(new URLSearchParams(window.location.search).get("saved_searches")||"[]"),Array.isArray(t)||(t=[])}catch{t=[]}let r=[];for(let e of i){let i=t.find(t=>t.name===e)||ti(this,tv).customScopesCache.get()?.find(t=>t.name===e);i&&r.push({name:i.name,query:i.query})}return r}async function tT(e){this.retract(),this.customScopesManager.show(),e.stopPropagation()}tl([r.aC],QbsearchInputElement.prototype,"inputButton",void 0),tl([r.aC],QbsearchInputElement.prototype,"inputButtonText",void 0),tl([r.aC],QbsearchInputElement.prototype,"queryBuilder",void 0),tl([r.aC],QbsearchInputElement.prototype,"queryBuilderContainer",void 0),tl([r.aC],QbsearchInputElement.prototype,"clearInputButton",void 0),tl([r.aC],QbsearchInputElement.prototype,"clearInputButtonSeparator",void 0),tl([r.aC],QbsearchInputElement.prototype,"searchSuggestionsDialog",void 0),tl([r.aC],QbsearchInputElement.prototype,"suggestionHeadingTemplate",void 0),tl([r.aC],QbsearchInputElement.prototype,"suggestionTemplate",void 0),tl([r.aC],QbsearchInputElement.prototype,"darkBackdrop",void 0),tl([r.aC],QbsearchInputElement.prototype,"customScopesManager",void 0),tl([r.aC],QbsearchInputElement.prototype,"feedbackDialog",void 0),tl([r.CF],QbsearchInputElement.prototype,"headerRedesignEnabled",void 0),QbsearchInputElement=tl([r.p_],QbsearchInputElement);let tP=class SearchCopilotEvent extends Event{constructor(e,t){super("search-copilot-chat",{bubbles:!1,cancelable:!0}),this.content=e,this.repoNwo=t}}},22756:(e,t,i)=>{i.d(t,{L:()=>BlackbirdPermissionCaches});var r=i(56176),a=i(57572);function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let BlackbirdPermissionCaches=class BlackbirdPermissionCaches{async setupWarmCachesLoop(){(0,r.M3)()&&(BlackbirdPermissionCaches.warmCachesLoopSetup?await BlackbirdPermissionCaches.warm:(BlackbirdPermissionCaches.warmCachesLoopSetup=!0,await this.warmCaches()))}async warmCaches(){let e=54e4;try{let t=await (0,a.lS)("/search/warm_blackbird_caches",{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}}),i=await t.json();e=new Date(i.userCacheExpiresAt).getTime()-Date.now()-3e4,(isNaN(e)||e<=5)&&(e=3e4)}catch{}BlackbirdPermissionCaches.warmResolve(),setTimeout(()=>{this.warmCaches()},e)}};n(BlackbirdPermissionCaches,"warmCachesLoopSetup",!1),n(BlackbirdPermissionCaches,"warmResolve",void 0),n(BlackbirdPermissionCaches,"warm",new Promise(e=>{BlackbirdPermissionCaches.warmResolve=e}))},49339:(e,t,i)=>{function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{J:()=>CopilotAuthTokenProvider});let AuthToken=class AuthToken{get authorizationHeaderValue(){return`GitHub-Bearer ${this.value}`}needsRefreshing(e){return this.isExpired||this.ssoChanged(e)}get isExpired(){let e=new Date(this.expiration);return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()))e.includes(t))&&e.every(e=>this.ssoOrgIDs.includes(e)))}static fromResult(e,t){return new AuthToken(e.token,e.expiration,t)}serialize(){return{value:this.value,expiration:this.expiration,ssoOrgIDs:this.ssoOrgIDs}}static deserialize(e){return new AuthToken(e.value,e.expiration,e.ssoOrgIDs)}constructor(e,t,i){r(this,"value",void 0),r(this,"expiration",void 0),r(this,"ssoOrgIDs",void 0),this.value=e,this.expiration=t,this.ssoOrgIDs=i}};var a=i(80688),n=i(57572);function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let s="COPILOT_AUTH_TOKEN";let CopilotAuthTokenProvider=class CopilotAuthTokenProvider{async getAuthToken(){let e=this.getLocalStorageAuthToken();return e?this.validateAuthToken(e):this.fetchAuthToken()}setLocalStorageAuthToken(e){this.copilotLocalStorage.setItem(s,JSON.stringify(e.serialize()))}getLocalStorageAuthToken(){let e=this.copilotLocalStorage.getItem(s);return e?AuthToken.deserialize(JSON.parse(e)):null}async validateAuthToken(e){return e.needsRefreshing(this.ssoOrgIDs)?this.fetchAuthToken():e}fetchAuthToken(){return this.currentAuthTokenRequest||(this.currentAuthTokenRequest=this._fetchAuthToken()),this.currentAuthTokenRequest}async _fetchAuthToken(){let e=await (0,n.lS)("/github-copilot/chat/token",{method:"POST"});if(e.ok){let t=await e.json();this.currentAuthTokenRequest=null;let i=AuthToken.fromResult(t,this.ssoOrgIDs);return this.setLocalStorageAuthToken(i),i}throw this.currentAuthTokenRequest=null,Error("Failed to mint new auth token")}constructor(e){o(this,"ssoOrgIDs",void 0),o(this,"currentAuthTokenRequest",void 0),o(this,"copilotLocalStorage",void 0),this.ssoOrgIDs=e,this.currentAuthTokenRequest=null,this.copilotLocalStorage=(0,a.A)("localStorage",{throwQuotaErrorsOnSet:!1,ttl:864e5})}}},32329:(e,t,i)=>{i.d(t,{Ai:()=>n,Gq:()=>r,SO:()=>a});let{getItem:r,setItem:a,removeItem:n}=(0,i(80688).A)("sessionStorage")},67307:(e,t,i)=>{i.d(t,{Kq:()=>SoftNavErrorEvent,RQ:()=>SoftNavEndEvent,gh:()=>SoftNavPayloadEvent,ni:()=>SoftNavSuccessEvent,sW:()=>SoftNavStartEvent,xc:()=>SoftNavReplaceMechanismEvent});var r=i(18056);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let n=class SoftNavEvent extends Event{constructor(e,t){super(t),a(this,"mechanism",void 0),this.mechanism=e}};let SoftNavStartEvent=class SoftNavStartEvent extends n{constructor(e){super(e,r.z.START)}};let SoftNavReplaceMechanismEvent=class SoftNavReplaceMechanismEvent extends n{constructor(e){super(e,r.z.REPLACE_MECHANISM)}};let SoftNavSuccessEvent=class SoftNavSuccessEvent extends n{constructor(e,t){super(e,r.z.SUCCESS),a(this,"visitCount",void 0),this.visitCount=t}};let SoftNavErrorEvent=class SoftNavErrorEvent extends n{constructor(e,t){super(e,r.z.ERROR),a(this,"error",void 0),this.error=t}};let SoftNavEndEvent=class SoftNavEndEvent extends n{constructor(e){super(e,r.z.END)}};let SoftNavPayloadEvent=class SoftNavPayloadEvent extends Event{constructor(e){super("soft-nav:payload"),a(this,"payload",void 0),a(this,"appPayload",void 0),this.payload=e.payload,this.appPayload=e.appPayload}}},73081:(e,t,i)=>{i.d(t,{Bu:()=>f,SC:()=>c,Ti:()=>p,iS:()=>d,k5:()=>l,o4:()=>h,pO:()=>u,rZ:()=>m});var r=i(18056),a=i(67307),n=i(6211),o=i(95505);let s=0;function l(){s=0,document.dispatchEvent(new Event(r.z.INITIAL)),(0,o.xT)()}function c(e){(0,o.LM)()||(document.dispatchEvent(new Event(r.z.PROGRESS_BAR.START)),document.dispatchEvent(new a.sW(e)),(0,o.Vy)(e),(0,o.ZW)(),(0,o.HK)(),(0,n.E5)())}function u(e){(0,o.LM)()&&((0,o.Vy)(e),document.dispatchEvent(new a.xc(e)))}function d(e={}){y(e)&&(s+=1,document.dispatchEvent(new a.ni((0,o.di)(),s)),p(e))}function h(e={}){if(!y(e))return;s=0;let t=(0,o.my)()||o.BW;document.dispatchEvent(new a.Kq((0,o.di)(),t)),v(),(0,n.Cd)(t),(0,o.xT)()}function p(e={}){if(!y(e))return;let t=(0,o.di)();v(),document.dispatchEvent(new a.RQ(t)),(0,o.Ff)(),(0,o.JA)(t)}function m(e={}){y(e)&&((0,n.Im)(),document.dispatchEvent(new Event(r.z.RENDER)))}function f(){document.dispatchEvent(new Event(r.z.FRAME_UPDATE))}function v(){document.dispatchEvent(new Event(r.z.PROGRESS_BAR.END))}function y({skipIfGoingToReactApp:e,allowedMechanisms:t=[]}={}){return(0,o.LM)()&&(0===t.length||t.includes((0,o.di)()))&&(!e||!(0,o.gc)())}},18056:(e,t,i)=>{i.d(t,{z:()=>r});let r=Object.freeze({INITIAL:"soft-nav:initial",START:"soft-nav:start",REPLACE_MECHANISM:"soft-nav:replace-mechanism",SUCCESS:"soft-nav:success",ERROR:"soft-nav:error",FRAME_UPDATE:"soft-nav:frame-update",END:"soft-nav:end",RENDER:"soft-nav:render",PROGRESS_BAR:{START:"soft-nav:progress-bar:start",END:"soft-nav:progress-bar:end"}})},6211:(e,t,i)=>{i.d(t,{Cd:()=>l,E5:()=>s,Im:()=>c,nW:()=>o});var r=i(57516),a=i(95505);let n="stats:soft-nav-duration",o={turbo:"TURBO",react:"REACT","turbo.frame":"FRAME",ui:"UI",hard:"HARD"};function s(){window.performance.clearResourceTimings(),window.performance.mark(n)}function l(e){(0,r.i)({turboFailureReason:e,turboStartUrl:(0,a.dR)(),turboEndUrl:window.location.href})}function c(){let e=function(){if(0===performance.getEntriesByName(n).length)return null;performance.measure(n,n);let e=performance.getEntriesByName(n).pop();return e?e.duration:null}();if(!e)return;let t=o[(0,a.di)()],i=Math.round(e);t===o.react&&document.dispatchEvent(new CustomEvent("staffbar-update",{detail:{duration:i}})),(0,r.i)({requestUrl:window.location.href,softNavigationTiming:{mechanism:t,destination:(0,a.fX)()||"rails",duration:i,initiator:(0,a.Pv)()||"rails"}})}},95505:(e,t,i)=>{i.d(t,{BW:()=>a,Ff:()=>p,HK:()=>b,JA:()=>q,LM:()=>m,Pv:()=>E,Vy:()=>h,ZW:()=>S,dR:()=>w,di:()=>f,fX:()=>C,gc:()=>k,k9:()=>g,my:()=>y,r7:()=>T,wG:()=>v,xT:()=>d});var r=i(32329);let a="reload",n="soft-nav:fail",o="soft-nav:fail-referrer",s="soft-nav:referrer",l="soft-nav:marker",c="soft-nav:react-app-name",u="soft-nav:latest-mechanism";function d(){(0,r.SO)(l,"0"),(0,r.Ai)(s),(0,r.Ai)(n),(0,r.Ai)(o),(0,r.Ai)(c),(0,r.Ai)(u)}function h(e){(0,r.SO)(l,e)}function p(){(0,r.SO)(l,"0")}function m(){let e=(0,r.Gq)(l);return e&&"0"!==e}function f(){return(0,r.Gq)(l)}function v(){return!!y()}function y(){return(0,r.Gq)(n)}function g(e){(0,r.SO)(n,e||a),(0,r.SO)(o,window.location.href)}function b(){(0,r.SO)(s,window.location.href)}function w(){return(0,r.Gq)(s)||document.referrer}function S(){let e=C();e?(0,r.SO)(c,e):(0,r.Ai)(c)}function E(){return(0,r.Gq)(c)}function C(){return document.querySelector('react-partial[partial-name="repos-overview"]')?"repos-overview":document.querySelector("react-app")?.getAttribute("app-name")}function k(){return!!document.querySelector("react-app")?.getAttribute("app-name")}function q(e){(0,r.SO)(u,e)}function T(){return(0,r.Gq)(u)}},61828:(e,t,i)=>{i.d(t,{softNavigate:()=>n});var r=i(73081),a=i(7332);let n=(e,t)=>{(0,r.SC)("turbo"),(0,a.YR)(e,{...t})}},57572:(e,t,i)=>{function r(e,t={}){!function(e){if(new URL(e,window.location.origin).origin!==window.location.origin)throw Error("Can not make cross-origin requests from verifiedFetch")}(e);let i={...t.headers,"GitHub-Verified-Fetch":"true","X-Requested-With":"XMLHttpRequest"};return fetch(e,{...t,headers:i})}function a(e,t){let i={...t?.headers??{},Accept:"application/json","Content-Type":"application/json"},a=t?.body?JSON.stringify(t.body):void 0;return r(e,{...t,body:a,headers:i})}function n(e,t={}){let i={...t.headers,"GitHub-Is-React":"true"};return r(e,{...t,headers:i})}function o(e,t){let i={...t?.headers??{},"GitHub-Is-React":"true"};return a(e,{...t,headers:i})}i.d(t,{DI:()=>r,QJ:()=>n,Sr:()=>o,lS:()=>a})}}]); //# sourceMappingURL=app_components_search_qbsearch-input-element_ts-559e2dee90d1.js.map