1
2
3
|
performance.mark("js-parse-end:89756-e7c55d48f60b581d.js");
"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["89756"],{45062(e,t,n){n.d(t,{s:()=>r});var i=n(70170);function r(e=0,t={}){return(n,r,s)=>{if(!s||"function"!=typeof s.value)throw Error("debounce can only decorate functions");let o=s.value;s.value=(0,i.s)(o,e,t),Object.defineProperty(n,r,s)}}},21744(e,t,n){function i(){if(!(this instanceof i))return new i;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}n.d(t,{h:()=>j,on:()=>T});var r,s=window.document.documentElement,o=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;i.prototype.matchesSelector=function(e,t){return o.call(e,t)},i.prototype.querySelectorAll=function(e,t){return t.querySelectorAll(e)},i.prototype.indexes=[];var l=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;i.prototype.indexes.push({name:"ID",selector:function(e){var t;if(t=e.match(l))return t[0].slice(1)},element:function(e){if(e.id)return[e.id]}});var a=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;i.prototype.indexes.push({name:"CLASS",selector:function(e){var t;if(t=e.match(a))return t[0].slice(1)},element:function(e){var t=e.className;if(t){if("string"==typeof t)return t.split(/\s/);else if("object"==typeof t&&"baseVal"in t)return t.baseVal.split(/\s/)}}});var c=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;i.prototype.indexes.push({name:"TAG",selector:function(e){var t;if(t=e.match(c))return t[0].toUpperCase()},element:function(e){return[e.nodeName.toUpperCase()]}}),i.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}},r="function"==typeof window.Map?window.Map:function(){function e(){this.map={}}return e.prototype.get=function(e){return this.map[e+" "]},e.prototype.set=function(e,t){this.map[e+" "]=t},e}();var u=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function h(e,t){var n,i,r,s,o,l,a=(e=e.slice(0).concat(e.default)).length,c=t,h=[];do if(u.exec(""),(r=u.exec(c))&&(c=r[3],r[2]||!c)){for(n=0;n<a;n++)if(o=(l=e[n]).selector(r[1])){for(i=h.length,s=!1;i--;)if(h[i].index===l&&h[i].key===o){s=!0;break}s||h.push({index:l,key:o});break}}while(r);return h}function f(e,t){return e.id-t.id}i.prototype.logDefaultIndexUsed=function(){},i.prototype.add=function(e,t){var n,i,s,o,l,a,c,u,f=this.activeIndexes,d=this.selectors,p=this.selectorObjects;if("string"==typeof e){for(i=0,p[(n={id:this.uid++,selector:e,data:t}).id]=n,c=h(this.indexes,e);i<c.length;i++)o=(u=c[i]).key,(l=function(e,t){var n,i,r;for(n=0,i=e.length;n<i;n++)if(r=e[n],t.isPrototypeOf(r))return r}(f,s=u.index))||((l=Object.create(s)).map=new r,f.push(l)),s===this.indexes.default&&this.logDefaultIndexUsed(n),(a=l.map.get(o))||(a=[],l.map.set(o,a)),a.push(n);this.size++,d.push(e)}},i.prototype.remove=function(e,t){if("string"==typeof e){var n,i,r,s,o,l,a,c,u=this.activeIndexes,f=this.selectors=[],d=this.selectorObjects,p={},g=1==arguments.length;for(r=0,n=h(this.indexes,e);r<n.length;r++)for(i=n[r],s=u.length;s--;)if(l=u[s],i.index.isPrototypeOf(l)){if(a=l.map.get(i.key))for(o=a.length;o--;)(c=a[o]).selector===e&&(g||c.data===t)&&(a.splice(o,1),p[c.id]=!0);break}for(r in p)delete d[r],this.size--;for(r in d)f.push(d[r].selector)}},i.prototype.queryAll=function(e){if(!this.selectors.length)return[];var t,n,i,r,s,o,l,a,c={},u=[],h=this.querySelectorAll(this.selectors.join(", "),e);for(t=0,i=h.length;t<i;t++)for(n=0,s=h[t],r=(o=this.matches(s)).length;n<r;n++)c[(a=o[n]).id]?l=c[a.id]:(l={id:a.id,selector:a.selector,data:a.data,elements:[]},c[a.id]=l,u.push(l)),l.elements.push(s);return u.sort(f)},i.prototype.matches=function(e){if(!e)return[];var t,n,i,r,s,o,l,a,c,u,h,d=this.activeIndexes,p={},g=[];for(t=0,r=d.length;t<r;t++)if(a=(l=d[t]).element(e)){for(n=0,s=a.length;n<s;n++)if(c=l.map.get(a[n]))for(i=0,o=c.length;i<o;i++)!p[h=(u=c[i]).id]&&this.matchesSelector(e,u.selector)&&(p[h]=!0,g.push(u))}return g.sort(f)};var d={},p={},g=new WeakMap,m=new WeakMap,v=new WeakMap,y=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function b(e,t,n){var i=e[t];return e[t]=function(){return n.apply(e,arguments),i.apply(e,arguments)},e}function w(){g.set(this,!0)}function k(){g.set(this,!0),m.set(this,!0)}function x(){return v.get(this)||null}function O(e,t){y&&Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:t||y.get})}function M(e){if(function(e){try{return e.eventPhase,!0}catch(e){return!1}}(e)){var t=(1===e.eventPhase?p:d)[e.type];if(t){var n=function(e,t,n){var i=[],r=t;do{if(1!==r.nodeType)break;var s=e.matches(r);if(s.length){var o={node:r,observers:s};n?i.unshift(o):i.push(o)}}while(r=r.parentElement);return i}(t,e.target,1===e.eventPhase);if(n.length){b(e,"stopPropagation",w),b(e,"stopImmediatePropagation",k),O(e,x);for(var i=0,r=n.length;i<r&&!g.get(e);i++){var s=n[i];v.set(e,s.node);for(var o=0,l=s.observers.length;o<l&&!m.get(e);o++)s.observers[o].data.call(s.node,e)}v.delete(e),O(e)}}}}function T(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=!!r.capture,o=s?p:d,l=o[e];l||(l=new i,o[e]=l,document.addEventListener(e,M,s)),l.add(t,n)}function j(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n}))}},50515(e,t,n){n.d(t,{JC:()=>k,KK:()=>f,Vy:()=>a,ai:()=>w,rd:()=>d});class i{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}}class r{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 s=e[n],o=t.get(s);if(n===e.length-1)return o instanceof r&&(t.delete(o),o=null),o||(o=new i(t),t.children[s]=o),o;o instanceof i&&(o=null),o||(o=new r(t),t.children[s]=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 s={"\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"},l={" ":"Space","+":"Plus"};function a(e,t=navigator.platform){var n,i,r;let{ctrlKey:u,altKey:f,metaKey:d,shiftKey:p,key:g}=e,m=[];for(let[e,t]of[u,f,d,p].entries())t&&m.push(c[e]);if(!c.includes(g)){let e=m.includes("Alt")&&h.test(t)&&null!=(n=s[g])?n:g,a=m.includes("Shift")&&h.test(t)&&null!=(i=o[e])?i:e,c=null!=(r=l[a])?r:a;m.push(c)}return m.join("+")}let c=["Control","Alt","Meta","Shift"];function u(e,t){let n,i,r;{var s,o,l,a=(s=e,o=t,i="u"<typeof window?void 0:window,r=h.test(null!=(l=null!=o?o:null==i?void 0:i.navigator.platform)?l:"")?"Meta":"Control",n=s.replace("Mod",r));let c=a.split("+").pop(),u=[];for(let e of["Control","Alt","Meta","Shift"])a.includes(e)&&u.push(e);return c&&u.push(c),u.join("+")}}let h=/Mac|iPod|iPhone|iPad/i;class f{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,a(e)],this.startTimer()}reset(){var e;this.killTimer(),this._path=[],null==(e=this.onReset)||e.call(this)}killTimer(){null!=this.timer&&window.clearTimeout(this.timer),this.timer=null}startTimer(){this.killTimer(),this.timer=window.setTimeout(()=>this.reset(),f.CHORD_TIMEOUT)}}function d(e){return e.split(" ").map(e=>u(e)).join(" ")}function p(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}f.CHORD_TIMEOUT=1500;let g=new r,m=new WeakMap,v=g,y=new f({onReset(){v=g}});function b(e){if(e.defaultPrevented||!(e.target instanceof Node))return;if(p(e.target)){let t=e.target;if(!t.id||!t.ownerDocument.querySelector(`[data-hotkey-scope="${t.id}"]`))return}let t=v.get(a(e));if(!t)return void y.reset();if(y.registerKeypress(e),v=t,t instanceof i){let i,r=e.target,s=!1,o=p(r);for(let e=t.children.length-1;e>=0;e-=1){let n=(i=t.children[e]).getAttribute("data-hotkey-scope");if(!o&&!n||o&&r.id===n){s=!0;break}}if(i&&s){var n;let t;n=i,t=new CustomEvent("hotkey-fire",{cancelable:!0,detail:{path:y.path}}),n.dispatchEvent(t)&&(p(n)?n.focus():n.click()),e.preventDefault()}y.reset()}}function w(e,t){0===Object.keys(g.children).length&&document.addEventListener("keydown",b);let n=(function(e){let t=[],n=[""],i=!1;for(let r=0;r<e.length;r++){if(i&&","===e[r]){t.push(n),n=[""],i=!1;continue}if(" "===e[r]){n.push(""),i=!1;continue}i="+"!==e[r],n[n.length-1]+=e[r]}return t.push(n),t.map(e=>e.map(e=>u(e)).filter(e=>""!==e)).filter(e=>e.length>0)})(t||e.getAttribute("data-hotkey")||"").map(t=>g.insert(t).add(e));m.set(e,n)}function k(e){let t=m.get(e);if(t&&t.length)for(let n of t)n&&n.delete(e);0===Object.keys(g.children).length&&document.removeEventListener("keydown",b)}}}]);
//# sourceMappingURL=89756-e7c55d48f60b581d-de919649f4b2107e.js.map
|