티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[20721],{35908:(e,t,i)=>{i.d(t,{A:()=>Combobox});let Combobox=class Combobox{constructor(e,t,{tabInsertsSuggestions:i,firstOptionSelectionMode:n,scrollIntoViewOptions:s}={}){this.input=e,this.list=t,this.tabInsertsSuggestions=null==i||i,this.firstOptionSelectionMode=null!=n?n:”none”,this.scrollIntoViewOptions=null!=s?s:{block:”nearest”,inline:”nearest”},this.isComposing=!1,t.id||(t.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=e=>(function(e,t){if(!e.shiftKey&&!e.metaKey&&!e.altKey&&(t.ctrlBindings||!e.ctrlKey)&&!t.isComposing)switch(e.key){case”Enter”:r(t.input,t.list)&&e.preventDefault();break;case”Tab”:t.tabInsertsSuggestions&&r(t.input,t.list)&&e.preventDefault();break;case”Escape”:t.clearSelection();break;case”ArrowDown”:t.navigate(1),e.preventDefault();break;case”ArrowUp”:t.navigate(-1),e.preventDefault();break;case”n”:t.ctrlBindings&&e.ctrlKey&&(t.navigate(1),e.preventDefault());break;case”p”:t.ctrlBindings&&e.ctrlKey&&(t.navigate(-1),e.preventDefault());break;default:if(e.ctrlKey)break;t.resetSelection()}})(e,this),this.compositionEventHandler=e=>{var t,i;return t=e,i=this,void(i.isComposing=”compositionstart”===t.type,document.getElementById(i.input.getAttribute(“aria-controls”)||””)&&i.clearSelection())},this.inputHandler=this.clearSelection.bind(this),e.setAttribute(“role”,”combobox”),e.setAttribute(“aria-controls”,t.id),e.setAttribute(“aria-expanded”,”false”),e.setAttribute(“aria-autocomplete”,”list”),e.setAttribute(“aria-haspopup”,”listbox”)}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute(“role”),this.input.removeAttribute(“aria-controls”),this.input.removeAttribute(“aria-expanded”),this.input.removeAttribute(“aria-autocomplete”),this.input.removeAttribute(“aria-haspopup”)}start(){this.input.setAttribute(“aria-expanded”,”true”),this.input.addEventListener(“compositionstart”,this.compositionEventHandler),this.input.addEventListener(“compositionend”,this.compositionEventHandler),this.input.addEventListener(“input”,this.inputHandler),this.input.addEventListener(“keydown”,this.keyboardEventHandler),this.list.addEventListener(“click”,n),this.resetSelection()}stop(){this.clearSelection(),this.input.setAttribute(“aria-expanded”,”false”),this.input.removeEventListener(“compositionstart”,this.compositionEventHandler),this.input.removeEventListener(“compositionend”,this.compositionEventHandler),this.input.removeEventListener(“input”,this.inputHandler),this.input.removeEventListener(“keydown”,this.keyboardEventHandler),this.list.removeEventListener(“click”,n)}indicateDefaultOption(){var e;”active”===this.firstOptionSelectionMode?null==(e=Array.from(this.list.querySelectorAll(‘[role=”option”]:not([aria-disabled=”true”])’)).filter(s)[0])||e.setAttribute(“data-combobox-option-default”,”true”):”selected”===this.firstOptionSelectionMode&&this.navigate(1)}navigate(e=1){let t=Array.from(this.list.querySelectorAll(‘[aria-selected=”true”]’)).filter(s)[0],i=Array.from(this.list.querySelectorAll(‘[role=”option”]’)).filter(s),n=i.indexOf(t);if(n===i.length-1&&1===e||0===n&&-1===e){this.clearSelection(),this.input.focus();return}let r=1===e?0:i.length-1;if(t&&n>=0){let t=n+e;t>=0&&t0||e.offsetHeight>0)}},46493:(e,t,i)=>{i.d(t,{Cj:()=>F,iP:()=>U});let n=”less”,r=”equal”,s=”greater”;var l,a,o,h,u,c,p,d,f,m,v,g,b,w,y,E,k,T=(e,t,i)=>{if(!t.has(e))throw TypeError(“Cannot “+i)},x=(e,t,i)=>(T(e,t,”read from private field”),i?i.call(e):t.get(e)),A=(e,t,i)=>{if(t.has(e))throw TypeError(“Cannot add the same private member more than once”);t instanceof WeakSet?t.add(e):t.set(e,i)},S=(e,t,i,n)=>(T(e,t,”write to private field”),n?n.call(e,i):t.set(e,i),i),C=(e,t,i)=>(T(e,t,”access private method”),i);let MinHeap=class MinHeap{constructor({compareFn:e}){A(this,o),A(this,u),A(this,l,void 0),A(this,a,void 0),S(this,l,e),S(this,a,[])}insert(e){x(this,a).push(e),C(this,u,c).call(this)}pop(){let e=x(this,a)[0];return x(this,a)[x(this,a).length-1]&&(x(this,a)[0]=x(this,a)[x(this,a).length-1],x(this,a).pop()),C(this,o,h).call(this),e}peek(){return x(this,a)[0]}delete(e){let t=x(this,a).indexOf(e);-1!==t&&(L(x(this,a),t,x(this,a).length-1),x(this,a).pop(),C(this,o,h).call(this))}clear(){S(this,a,[])}get size(){return x(this,a).length}};function M(e){return Math.floor((e-1)/2)}function L(e,t,i){let n=e[t];e[t]=e[i],e[i]=n}l=new WeakMap,a=new WeakMap,o=new WeakSet,h=function(){let e=0;for(;2*e+10&&x(this,l).call(this,x(this,a)[t],(e=x(this,a),e[M(t)]))===n;)L(x(this,a),t,M(t)),t=M(t)};var O=Object.defineProperty,P=(e,t,i)=>{if(!t.has(e))throw TypeError(“Cannot “+i)},W=(e,t,i)=>(P(e,t,”read from private field”),i?i.call(e):t.get(e)),H=(e,t,i)=>{if(t.has(e))throw TypeError(“Cannot add the same private member more than once”);t instanceof WeakSet?t.add(e):t.set(e,i)},D=(e,t,i,n)=>(P(e,t,”write to private field”),n?n.call(e,i):t.set(e,i),i);let Deferred=class Deferred{constructor(){((e,t,i)=>{let n;return(n=”symbol”!=typeof t?t+””:t)in e?O(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i})(this,p,”Deferred”),H(this,d,void 0),H(this,f,void 0),H(this,m,void 0),D(this,d,new Promise((e,t)=>{D(this,f,e),D(this,m,t)}))}then(e,t){return Promise.prototype.then.apply(W(this,d),[e,t])}catch(e){return Promise.prototype.catch.apply(W(this,d),[e])}finally(e){return Promise.prototype.finally.apply(W(this,d),[e])}resolve(e){W(this,f).call(this,e)}reject(e){W(this,m).call(this,e)}getPromise(){return W(this,d)}};p=Symbol.toStringTag,d=new WeakMap,f=new WeakMap,m=new WeakMap;var I=(e,t,i)=>{if(!t.has(e))throw TypeError(“Cannot “+i)},N=(e,t,i)=>(I(e,t,”read from private field”),i?i.call(e):t.get(e)),R=(e,t,i)=>{if(t.has(e))throw TypeError(“Cannot add the same private member more than once”);t instanceof WeakSet?t.add(e):t.set(e,i)},j=(e,t,i,n)=>(I(e,t,”write to private field”),n?n.call(e,i):t.set(e,i),i),_=(e,t,i)=>(I(e,t,”access private method”),i);let LiveRegionElement=class LiveRegionElement extends HTMLElement{constructor(){if(super(),R(this,w),R(this,E),R(this,v,void 0),R(this,g,void 0),R(this,b,void 0),!this.shadowRoot){const e=(q||((q=document.createElement(“template”)).innerHTML=V),q);this.attachShadow({mode:”open”}).appendChild(e.content.cloneNode(!0))}j(this,v,!1),j(this,b,null),j(this,g,new MinHeap({compareFn:K}))}get delay(){let e=this.getAttribute(“delay”);return e?parseInt(e,10):150}set delay(e){this.setAttribute(“delay”,`${e}`)}announce(e,t={}){let{delayMs:i,politeness:n=”polite”}=t,r=Date.now(),s=new Deferred,l={deferred:s,politeness:n,contents:e,scheduled:void 0!==i?r+i:r};return N(this,g).insert(l),_(this,w,y).call(this),{…s.getPromise(),cancel:()=>{N(this,g).delete(l),s.resolve()}}}announceFromElement(e,t){var i;let n,r=(n=””,(i=e).hasAttribute(“aria-label”)?n=i.getAttribute(“aria-label”):i.innerText?n=i.innerText:i.textContent&&(n=i.textContent),n?n.trim():””);return””!==r?this.announce(r,t):{…Promise.resolve(),cancel:B}}getMessage(e=”polite”){let t=this.shadowRoot?.getElementById(e);if(!t)throw Error(“Unable to find container for message”);return t.textContent}clear(){null!==N(this,b)&&(clearTimeout(N(this,b)),j(this,b,null)),N(this,g).clear()}};v=new WeakMap,g=new WeakMap,b=new WeakMap,w=new WeakSet,y=function(){if(N(this,v))return;let e=N(this,g).peek();if(!e)return;null!==N(this,b)&&(clearTimeout(N(this,b)),j(this,b,null));let t=Date.now();if(e.scheduled<=t){(e=N(this,g).pop())&&_(this,E,k).call(this,e),_(this,w,y).call(this);return}let i=e.scheduled-t;j(this,b,window.setTimeout(()=>{j(this,b,null),_(this,w,y).call(this)},i))},E=new WeakSet,k=function(e){j(this,v,!0);let{contents:t,deferred:i,politeness:n}=e,r=this.shadowRoot?.getElementById(n);if(!r)throw j(this,v,!1),Error(`Unable to find container for message. Expected a container with id=”${n}”`);r.textContent===t?r.textContent=`${t}\xa0`:r.textContent=t,null!==N(this,b)&&clearTimeout(N(this,b)),i.resolve(),this.delay>0?j(this,b,window.setTimeout(()=>{j(this,b,null),j(this,v,!1),_(this,w,y).call(this)},this.delay)):(j(this,b,null),j(this,v,!1),_(this,w,y).call(this))};let q=null,V=`
`;function K(e,t){return e.politeness===t.politeness?e.scheduled===t.scheduled?r:e.scheduled{n=!0};return{…J(X).then(()=>{if(!n){let n=i.announce(e,t);return r=n.cancel,n}}),cancel:()=>{r()}}}return i.announce(e,t)}function F(e,t={}){let i=z(t.from);if(!i){i=document.createElement(“live-region”),t.appendTo?t.appendTo.appendChild(i):$(t.from).appendChild(i);let n=!1,r=()=>{n=!0};return{…J(X).then(()=>{if(!n){let n=i.announceFromElement(e,t);return r=n.cancel,n}}),cancel:()=>{r()}}}return i.announceFromElement(e,t)}function z(e){let t=null;return null!==(t=e?function(e){let t=e.closest(“dialog”),i=e;for(;(i=i.parentElement)&&(!t||t.contains(i));)for(let e of i.childNodes)if(e instanceof LiveRegionElement)return e;return null}(e):null)||null!==(t=$(e).querySelector(“live-region”))?t:null}function $(e){let t=document.body;if(e){let i=e.closest(“dialog”);i&&(t=i)}return t}customElements.get(“live-region”)||customElements.define(“live-region”,LiveRegionElement);let X=150;function J(e){return new Promise(t=>{setTimeout(t,e)})}},50515:(e,t,i)=>{i.d(t,{JC:()=>b,KK:()=>SequenceTracker,Vy:()=>l,ai:()=>g,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 i=0;i“,”\xbf”:”?”},r={“`”:”~”,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”},s={” “:”Space”,”+”:”Plus”};function l(e,t=navigator.platform){var i,o,u;let{ctrlKey:c,altKey:p,metaKey:d,shiftKey:f,key:m}=e,v=[];for(let[e,t]of[c,p,d,f].entries())t&&v.push(a[e]);if(!a.includes(m)){let e=v.includes(“Alt”)&&h.test(t)&&null!=(i=n[m])?i:m,l=v.includes(“Shift”)&&h.test(t)&&null!=(o=r[e])?o:e,a=null!=(u=s[l])?u:l;v.push(a)}return v.join(“+”)}let a=[“Control”,”Alt”,”Meta”,”Shift”];function o(e,t){let i,n,r;{var s,l,a,o=(s=e,l=t,n=”undefined”==typeof window?void 0:window,r=h.test(null!=(a=null!=l?l:null==n?void 0:n.navigator.platform)?a:””)?”Meta”:”Control”,i=s.replace(“Mod”,r));let u=o.split(“+”).pop(),c=[];for(let e of[“Control”,”Alt”,”Meta”,”Shift”])o.includes(e)&&c.push(e);return u&&c.push(u),c.join(“+”)}}let h=/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)||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=>o(e)).join(” “)}function c(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),i=(e.getAttribute(“type”)||””).toLowerCase();return”select”===t||”textarea”===t||”input”===t&&”submit”!==i&&”reset”!==i&&”checkbox”!==i&&”radio”!==i&&”file”!==i||e.isContentEditable}SequenceTracker.CHORD_TIMEOUT=1500;let p=new RadixTrie,d=new WeakMap,f=p,m=new SequenceTracker({onReset(){f=p}});function v(e){if(e.defaultPrevented||!(e.target instanceof Node))return;if(c(e.target)){let t=e.target;if(!t.id||!t.ownerDocument.querySelector(`[data-hotkey-scope=”${t.id}”]`))return}let t=f.get(l(e));if(!t)return void m.reset();if(m.registerKeypress(e),f=t,t instanceof Leaf){let n,r=e.target,s=!1,l=c(r);for(let e=t.children.length-1;e>=0;e-=1){let i=(n=t.children[e]).getAttribute(“data-hotkey-scope”);if(!l&&!i||l&&r.id===i){s=!0;break}}if(n&&s){var i;let t;i=n,t=new CustomEvent(“hotkey-fire”,{cancelable:!0,detail:{path:m.path}}),i.dispatchEvent(t)&&(c(i)?i.focus():i.click()),e.preventDefault()}m.reset()}}function g(e,t){0===Object.keys(p.children).length&&document.addEventListener(“keydown”,v);let i=(function(e){let t=[],i=[“”],n=!1;for(let r=0;re.map(e=>o(e)).filter(e=>””!==e)).filter(e=>e.length>0)})(t||e.getAttribute(“data-hotkey”)||””).map(t=>p.insert(t).add(e));d.set(e,i)}function b(e){let t=d.get(e);if(t&&t.length)for(let i of t)i&&i.delete(e);0===Object.keys(p.children).length&&document.removeEventListener(“keydown”,v)}},78134:(e,t,i)=>{i.d(t,{i4:()=>TemplateInstance,xr:()=>c});let n=new Map;function r(e){if(n.has(e))return n.get(e);let t=e.length,i=0,r=0,s=0,l=[];for(let n=0;ni&&(l.push(Object.freeze({type:”string”,start:i,end:r,value:e.slice(i,r)})),i=r),l.push(Object.freeze({type:”part”,start:r,end:n+2,value:e.slice(i+2,n).trim()})),n+=1,i=n+1)}return i“string”==typeof e?e:e.value).join(“”);this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,e)}}};let a=new WeakMap;let NodeTemplatePart=class NodeTemplatePart{constructor(e,t){this.expression=t,a.set(this,[e]),e.textContent=””}get value(){return a.get(this).map(e=>e.textContent).join(“”)}set value(e){this.replace(e)}get previousSibling(){return a.get(this)[0].previousSibling}get nextSibling(){return a.get(this)[a.get(this).length-1].nextSibling}replace(…e){var t,i;let n=e.map(e=>”string”==typeof e?new Text(e):e);n.length||n.push(new Text(“”));let r=a.get(this)[0];for(let e of n)null==(t=r.parentNode)||t.insertBefore(e,r);for(let e of a.get(this))null==(i=e.parentNode)||i.removeChild(e);a.set(this,n)}};let InnerTemplatePart=class InnerTemplatePart extends NodeTemplatePart{constructor(e){var t;super(e,null!=(t=e.getAttribute(“expression”))?t:””),this.template=e}get directive(){var e;return null!=(e=this.template.getAttribute(“directive”))?e:””}};function o(e){return{processCallback(t,i,n){var r;if(“object”==typeof n&&n){for(let t of i)if(t.expression in n){let i=null!=(r=n[t.expression])?r:””;e(t,i,n)}}}}}function h(e,t){e.value=t instanceof Node?t:String(t)}let u=o(h),c=o((e,t)=>{“boolean”==typeof t&&e instanceof AttributeTemplatePart&&”boolean”==typeof e.element[e.attributeName]&&(e.booleanValue=t,1)||h(e,t)}),p=new WeakMap,d=new WeakMap;let TemplateInstance=class TemplateInstance extends(globalThis.DocumentFragment||EventTarget){constructor(e,t,i=u){var n,s;super(),Object.getPrototypeOf(this)!==TemplateInstance.prototype&&Object.setPrototypeOf(this,TemplateInstance.prototype),this.appendChild(e.content.cloneNode(!0)),d.set(this,Array.from(function* e(t){let i,n=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);for(;i=n.nextNode();)if(i instanceof HTMLTemplateElement)if(i.hasAttribute(“directive”))yield new InnerTemplatePart(i);else for(let t of e(i.content))yield t;else if(i instanceof Element&&i.hasAttributes())for(let e=0;e{function n(e,t){return r(function(e){if(e.activeElement!==e.body)return e.activeElement;var t=e.querySelectorAll(“:hover”),i=t.length;if(i)return t[i-1]}(e),t)}function r(e,t){var i=e;if(!i)return Promise.resolve(t());var n=i.ownerDocument.documentElement,r=function(e){for(var t=[];e;){var i=e.getBoundingClientRect(),n=i.top,r=i.left;t.push({element:e,top:n,left:r}),e=e.parentElement}return t}(i);return Promise.resolve(t()).then(function(e){var t=function(e){for(var t=0;tn,_H:()=>r})}}]); //# sourceMappingURL=20721-ea1e97b9404f.js.map