티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[40757,50170,57727],{13937:(e,t,n)=>{let r;n.d(t,{Ax:()=>l,JW:()=>c,ZV:()=>a});let ErrorWithResponse=class ErrorWithResponse extends Error{constructor(e,t){super(e),this.response=t}};function o(){let e,t;return[new Promise(function(n,r){e=n,t=r}),e,t]}let i=[],s=[];function a(e){i.push(e)}function l(e){s.push(e)}function c(e,t){r||(r=new Map,”undefined”!=typeof document&&document.addEventListener(“submit”,u));let n=r.get(e)||[];r.set(e,[…n,t])}function u(e){if(!(e.target instanceof HTMLFormElement)||e.defaultPrevented)return;let t=e.target,n=function(e){let t=[],n=t=>”object”==typeof t?t===e:”string”==typeof t&&e.matches(t);for(let e of r.keys())if(n(e)){let n=r.get(e)||[];t.push(…n)}return t}(t);if(0===n.length)return;let a=function(e,t){let n={method:t?.formMethod||e.method||”GET”,url:e.action,headers:new Headers({“X-Requested-With”:”XMLHttpRequest”}),body:null};if(“GET”===n.method.toUpperCase()){let t=function(e){let t=new URLSearchParams;for(let[n,r]of[…new FormData(e).entries()])t.append(n,r.toString());return t.toString()}(e);t&&(n.url+=(~n.url.indexOf(“?”)?”&”:”?”)+t)}else n.body=new FormData(e);return n}(t,e instanceof SubmitEvent?e.submitter:null),[l,c,u]=o();e.preventDefault(),d(n,t,a,l).then(async e=>{if(e){for(let e of s)await e(t);h(a).then(c,u).catch(()=>{}).then(()=>{for(let e of i)e(t)})}else t.submit()},e=>{t.submit(),setTimeout(()=>{throw e})})}async function d(e,t,n,r){let i=!1;for(let s of e){let[e,a]=o(),l=()=>(i=!0,a(),r),c={text:l,json:()=>(n.headers.set(“Accept”,”application/json”),l()),html:()=>(n.headers.set(“Accept”,”text/html”),l())};await Promise.race([e,s(t,c,n)])}return i}async function h(e){let t=await window.fetch(e.url,{method:e.method,body:null!==e.body?e.body:void 0,headers:e.headers,credentials:”same-origin”}),n={url:t.url,status:t.status,statusText:t.statusText,headers:t.headers,text:””,get json(){let e=JSON.parse(this.text);return delete this.json,this.json=e,this.json},get html(){var r,o;let e;return delete this.html,this.html=(r=document,o=this.text,(e=r.createElement(“template”)).innerHTML=o,r.importNode(e.content,!0)),this.html}};if(n.text=await t.text(),t.ok)return n;throw new ErrorWithResponse(“request failed”,n)}},39595:(e,t,n)=>{let r;n.d(t,{CF:()=>g,p_:()=>j,FB:()=>d,Se:()=>E,aC:()=>T,zV:()=>M});let o=new WeakSet,i=new WeakMap;function s(e=document){if(i.has(e))return i.get(e);let t=!1,n=new MutationObserver(e=>{for(let t of e)if(“attributes”===t.type&&t.target instanceof Element)u(t.target);else if(“childList”===t.type&&t.addedNodes.length)for(let e of t.addedNodes)e instanceof Element&&a(e)});n.observe(e,{childList:!0,subtree:!0,attributeFilter:[“data-action”]});let r={get closed(){return t},unsubscribe(){t=!0,i.delete(e),n.disconnect()}};return i.set(e,r),r}function a(e){for(let t of e.querySelectorAll(“[data-action]”))u(t);e instanceof Element&&e.hasAttribute(“data-action”)&&u(e)}function l(e){let t=e.currentTarget;for(let n of c(t))if(e.type===n.type){let r=t.closest(n.tag);o.has(r)&&”function”==typeof r[n.method]&&r[n.method](e);let i=t.getRootNode();if(i instanceof ShadowRoot&&o.has(i.host)&&i.host.matches(n.tag)){let t=i.host;”function”==typeof t[n.method]&&t[n.method](e)}}}function*c(e){for(let t of(e.getAttribute(“data-action”)||””).trim().split(/\s+/)){let e=t.lastIndexOf(“:”),n=Math.max(0,t.lastIndexOf(“#”))||t.length;yield{type:t.slice(0,e),tag:t.slice(e+1,n),method:t.slice(n+1)||”handleEvent”}}}function u(e){for(let t of c(e))e.addEventListener(t.type,l)}function d(e,t){let n=e.tagName.toLowerCase();if(e.shadowRoot){for(let r of e.shadowRoot.querySelectorAll(`[data-target~=”${n}.${t}”]`))if(!r.closest(n))return r}for(let r of e.querySelectorAll(`[data-target~=”${n}.${t}”]`))if(r.closest(n)===e)return r}let h=e=>String(“symbol”==typeof e?e.description:e).replace(/([A-Z]($|[a-z]))/g,”-$1″).replace(/–/g,”-“).replace(/^-|-$/,””).toLowerCase(),f=(e,t=”property”)=>{let n=h(e);if(!n.includes(“-“))throw new DOMException(`${t}: ${String(e)} is not a valid ${t} name`,”SyntaxError”);return n},p=”attr”;function g(e,t){O(e,p).add(t)}let m=new WeakSet;function b(e,t){if(m.has(e))return;m.add(e);let n=Object.getPrototypeOf(e),r=n?.constructor?.attrPrefix??”data-“;for(let o of(t||(t=O(n,p)),t)){let t=e[o],n=f(`${r}${o}`),i={configurable:!0,get(){return this.getAttribute(n)||””},set(e){this.setAttribute(n,e||””)}};”number”==typeof t?i={configurable:!0,get(){return Number(this.getAttribute(n)||0)},set(e){this.setAttribute(n,e)}}:”boolean”==typeof t&&(i={configurable:!0,get(){return this.hasAttribute(n)},set(e){this.toggleAttribute(n,e)}}),Object.defineProperty(e,o,i),o in e&&!e.hasAttribute(n)&&i.set.call(e,t)}}let y=new Map,w=new Promise(e=>{“loading”!==document.readyState?e():document.addEventListener(“readystatechange”,()=>e(),{once:!0})}),v=new Promise(e=>{let t=new AbortController;t.signal.addEventListener(“abort”,()=>e());let n={once:!0,passive:!0,signal:t.signal},r=()=>t.abort();document.addEventListener(“mousedown”,r,n),document.addEventListener(“touchstart”,r,n),document.addEventListener(“keydown”,r,n),document.addEventListener(“pointerdown”,r,n)}),k={ready:()=>w,firstInteraction:()=>v,visible:e=>new Promise(t=>{let n=new IntersectionObserver(e=>{for(let r of e)if(r.isIntersecting){t(),n.disconnect();return}},{rootMargin:”0px 0px 256px 0px”,threshold:.01});for(let t of document.querySelectorAll(e))n.observe(t)})},x=new WeakMap;function S(e){cancelAnimationFrame(x.get(e)||0),x.set(e,requestAnimationFrame(()=>{for(let t of y.keys()){let n=e instanceof Element&&e.matches(t)?e:e.querySelector(t);if(customElements.get(t)||n){let r=n?.getAttribute(“data-load-on”)||”ready”,o=r in k?k[r]:k.ready;for(let e of y.get(t)||[])o(t).then(e);y.delete(t),x.delete(e)}}}))}function E(e,t){for(let[n,r]of(“string”==typeof e&&t&&(e={[e]:t}),Object.entries(e)))y.has(n)||y.set(n,new Set),y.get(n).add(r);A(document)}function A(e){r||(r=new MutationObserver(e=>{if(y.size)for(let t of e)for(let e of t.addedNodes)e instanceof Element&&S(e)})),S(e),r.observe(e,{subtree:!0,childList:!0})}let C=Symbol.for(“catalyst”);let CatalystDelegate=class CatalystDelegate{constructor(e){const t=this,n=e.prototype.connectedCallback;e.prototype.connectedCallback=function(){t.connectedCallback(this,n)};const r=e.prototype.disconnectedCallback;e.prototype.disconnectedCallback=function(){t.disconnectedCallback(this,r)};const o=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(e,n,r){t.attributeChangedCallback(this,e,n,r,o)};let i=e.observedAttributes||[];Object.defineProperty(e,”observedAttributes”,{configurable:!0,get(){return t.observedAttributes(this,i)},set(e){i=e}}),function(e){let t=e.observedAttributes||[],n=e.attrPrefix??”data-“,r=e=>f(`${n}${e}`);Object.defineProperty(e,”observedAttributes”,{configurable:!0,get:()=>[…O(e.prototype,p)].map(r).concat(t),set(e){t=e}})}(e),function(e){let t=h(e.name).replace(/-element$/,””);try{window.customElements.define(t,e),window[e.name]=customElements.get(t)}catch(e){if(!(e instanceof DOMException&&”NotSupportedError”===e.name))throw e}}(e)}observedAttributes(e,t){return t}connectedCallback(e,t){var n,r;for(let t of(e.toggleAttribute(“data-catalyst”,!0),customElements.upgrade(e),e.querySelectorAll(“template[data-shadowroot]”)))t.parentElement===e&&e.attachShadow({mode:”closed”===t.getAttribute(“data-shadowroot”)?”closed”:”open”}).append(t.content.cloneNode(!0));(b(e),o.add(e),e.shadowRoot&&(a(r=e.shadowRoot),s(r)),a(e),s(e.ownerDocument),t?.call(e),e.shadowRoot)&&(a(n=e.shadowRoot),s(n),A(e.shadowRoot))}disconnectedCallback(e,t){t?.call(e)}attributeChangedCallback(e,t,n,r,o){b(e),”data-catalyst”!==t&&o&&o.call(e,t,n,r)}};function O(e,t){if(!Object.prototype.hasOwnProperty.call(e,C)){let t=e[C],n=e[C]=new Map;if(t)for(let[e,r]of t)n.set(e,new Set(r))}let n=e[C];return n.has(t)||n.set(t,new Set),n.get(t)}function T(e,t){O(e,”target”).add(t),Object.defineProperty(e,t,{configurable:!0,get(){return d(this,t)}})}function M(e,t){O(e,”targets”).add(t),Object.defineProperty(e,t,{configurable:!0,get(){let e=this.tagName.toLowerCase(),n=[];if(this.shadowRoot)for(let r of this.shadowRoot.querySelectorAll(`[data-targets~=”${e}.${t}”]`))r.closest(e)||n.push(r);for(let r of this.querySelectorAll(`[data-targets~=”${e}.${t}”]`))r.closest(e)===this&&n.push(r);return n}})}function j(e){new CatalystDelegate(e)}},45062:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(70170);function o(e=0,t={}){return(n,o,i)=>{if(!i||”function”!=typeof i.value)throw Error(“debounce can only decorate functions”);let s=i.value;i.value=(0,r.s)(s,e,t),Object.defineProperty(n,o,i)}}},50515:(e,t,n)=>{n.d(t,{JC:()=>y,KK:()=>SequenceTracker,Vy:()=>s,ai:()=>b,rd:()=>u});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“,”\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”},i={” “:”Space”,”+”:”Plus”};function s(e,t=navigator.platform){var n,l,u;let{ctrlKey:d,altKey:h,metaKey:f,shiftKey:p,key:g}=e,m=[];for(let[e,t]of[d,h,f,p].entries())t&&m.push(a[e]);if(!a.includes(g)){let e=m.includes(“Alt”)&&c.test(t)&&null!=(n=r[g])?n:g,s=m.includes(“Shift”)&&c.test(t)&&null!=(l=o[e])?l:e,a=null!=(u=i[s])?u:s;m.push(a)}return m.join(“+”)}let a=[“Control”,”Alt”,”Meta”,”Shift”];function l(e,t){let n,r,o;{var i,s,a,l=(i=e,s=t,r=”undefined”==typeof window?void 0:window,o=c.test(null!=(a=null!=s?s:null==r?void 0:r.navigator.platform)?a:””)?”Meta”:”Control”,n=i.replace(“Mod”,o));let u=l.split(“+”).pop(),d=[];for(let e of[“Control”,”Alt”,”Meta”,”Shift”])l.includes(e)&&d.push(e);return u&&d.push(u),d.join(“+”)}}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,s(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(),SequenceTracker.CHORD_TIMEOUT)}};function u(e){return e.split(” “).map(e=>l(e)).join(” “)}function d(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 h=new RadixTrie,f=new WeakMap,p=h,g=new SequenceTracker({onReset(){p=h}});function m(e){if(e.defaultPrevented||!(e.target instanceof Node))return;if(d(e.target)){let t=e.target;if(!t.id||!t.ownerDocument.querySelector(`[data-hotkey-scope=”${t.id}”]`))return}let t=p.get(s(e));if(!t)return void g.reset();if(g.registerKeypress(e),p=t,t instanceof Leaf){let r,o=e.target,i=!1,s=d(o);for(let e=t.children.length-1;e>=0;e-=1){let n=(r=t.children[e]).getAttribute(“data-hotkey-scope”);if(!s&&!n||s&&o.id===n){i=!0;break}}if(r&&i){var n;let t;n=r,t=new CustomEvent(“hotkey-fire”,{cancelable:!0,detail:{path:g.path}}),n.dispatchEvent(t)&&(d(n)?n.focus():n.click()),e.preventDefault()}g.reset()}}function b(e,t){0===Object.keys(h.children).length&&document.addEventListener(“keydown”,m);let n=(function(e){let t=[],n=[“”],r=!1;for(let o=0;oe.map(e=>l(e)).filter(e=>””!==e)).filter(e=>e.length>0)})(t||e.getAttribute(“data-hotkey”)||””).map(t=>h.insert(t).add(e));f.set(e,n)}function y(e){let t=f.get(e);if(t&&t.length)for(let n of t)n&&n.delete(e);0===Object.keys(h.children).length&&document.removeEventListener(“keydown”,m)}},97797:(e,t,n)=>{function r(){if(!(this instanceof r))return new r;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}n.d(t,{h:()=>C,on:()=>A});var o,i=window.document.documentElement,s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;r.prototype.matchesSelector=function(e,t){return s.call(e,t)},r.prototype.querySelectorAll=function(e,t){return t.querySelectorAll(e)},r.prototype.indexes=[];var a=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;r.prototype.indexes.push({name:”ID”,selector:function(e){var t;if(t=e.match(a))return t[0].slice(1)},element:function(e){if(e.id)return[e.id]}});var l=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;r.prototype.indexes.push({name:”CLASS”,selector:function(e){var t;if(t=e.match(l))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;r.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()]}}),r.prototype.indexes.default={name:”UNIVERSAL”,selector:function(){return!0},element:function(){return[!0]}},o=”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 d(e,t){var n,r,o,i,s,a,l=(e=e.slice(0).concat(e.default)).length,c=t,d=[];do if(u.exec(“”),(o=u.exec(c))&&(c=o[3],o[2]||!c)){for(n=0;n3&&void 0!==arguments[3]?arguments[3]:{},i=!!o.capture,s=i?p:f,a=s[e];a||(a=new r,s[e]=a,document.addEventListener(e,E,i)),a.add(t,n)}function C(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n}))}}}]);
//# sourceMappingURL=50170-28cf60736369.js.map