티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[36562,91707],{27552:(t,e,n)=>{n.d(e,{A:()=>s});let i=new WeakMap;let RemoteInputElement=class RemoteInputElement extends HTMLElement{constructor(){super();const t=r.bind(null,this,!0),e={currentQuery:null,oninput:function(t){let e;return function(n){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t(n)},300)}}(e=>t(e)),fetch:t,controller:null};i.set(this,e)}static get observedAttributes(){return[“src”]}attributeChangedCallback(t,e){e&&”src”===t&&r(this,!1)}connectedCallback(){let t=this.input;if(!t)return;t.setAttribute(“autocomplete”,”off”),t.setAttribute(“spellcheck”,”false”);let e=i.get(this);e&&(t.addEventListener(“focus”,e.fetch),t.addEventListener(“change”,e.fetch),t.addEventListener(“input”,e.oninput))}disconnectedCallback(){let t=this.input;if(!t)return;let e=i.get(this);e&&(t.removeEventListener(“focus”,e.fetch),t.removeEventListener(“change”,e.fetch),t.removeEventListener(“input”,e.oninput))}get input(){let t=this.querySelector(“input, textarea”);return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute(“src”)||””}set src(t){this.setAttribute(“src”,t)}};async function r(t,e,n){let r,s=t.input;if(!s)return;let o=i.get(t);if(!o)return;let l=s.value;if(e&&o.currentQuery===l)return;o.currentQuery=l;let u=t.src;if(!u)return;let c=document.getElementById(t.getAttribute(“aria-owns”)||””);if(!c)return;let d=new URL(u,window.location.href),h=new URLSearchParams(d.search);h.append(t.getAttribute(“param”)||”q”,l),d.search=h.toString(),o.controller?o.controller.abort():(t.dispatchEvent(new CustomEvent(“loadstart”)),t.setAttribute(“loading”,””)),o.controller=”AbortController”in window?new AbortController:{signal:null,abort(){}};let m=””;try{r=await a(t,d.toString(),{signal:o.controller.signal,credentials:”same-origin”,headers:{accept:”text/fragment+html”}}),m=await r.text(),t.removeAttribute(“loading”),o.controller=null}catch(e){e instanceof Error&&”AbortError”!==e.name&&(t.removeAttribute(“loading”),o.controller=null);return}r&&r.ok?(c.innerHTML=m,t.dispatchEvent(new CustomEvent(“remote-input-success”,{bubbles:!0,detail:{eventType:n?n.type:void 0}}))):t.dispatchEvent(new CustomEvent(“remote-input-error”,{bubbles:!0}))}async function a(t,e,n){try{let i=await fetch(e,n);return t.dispatchEvent(new CustomEvent(“load”)),t.dispatchEvent(new CustomEvent(“loadend”)),i}catch(e){throw e instanceof Error&&(null==e?void 0:e.name)!==”AbortError”&&(t.dispatchEvent(new CustomEvent(“error”)),t.dispatchEvent(new CustomEvent(“loadend”))),e}}let s=RemoteInputElement;window.customElements.get(“remote-input”)||(window.RemoteInputElement=RemoteInputElement,window.customElements.define(“remote-input”,RemoteInputElement))},35908:(t,e,n)=>{n.d(e,{A:()=>Combobox});let Combobox=class Combobox{constructor(t,e,{tabInsertsSuggestions:n,firstOptionSelectionMode:i,scrollIntoViewOptions:a}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.firstOptionSelectionMode=null!=i?i:”none”,this.scrollIntoViewOptions=null!=a?a:{block:”nearest”,inline:”nearest”},this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>(function(t,e){if(!t.shiftKey&&!t.metaKey&&!t.altKey&&(e.ctrlBindings||!t.ctrlKey)&&!e.isComposing)switch(t.key){case”Enter”:r(e.input,e.list)&&t.preventDefault();break;case”Tab”:e.tabInsertsSuggestions&&r(e.input,e.list)&&t.preventDefault();break;case”Escape”:e.clearSelection();break;case”ArrowDown”:e.navigate(1),t.preventDefault();break;case”ArrowUp”:e.navigate(-1),t.preventDefault();break;case”n”:e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case”p”:e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.resetSelection()}})(t,this),this.compositionEventHandler=t=>{var e,n;return e=t,n=this,void(n.isComposing=”compositionstart”===e.type,document.getElementById(n.input.getAttribute(“aria-controls”)||””)&&n.clearSelection())},this.inputHandler=this.clearSelection.bind(this),t.setAttribute(“role”,”combobox”),t.setAttribute(“aria-controls”,e.id),t.setAttribute(“aria-expanded”,”false”),t.setAttribute(“aria-autocomplete”,”list”),t.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”,i),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”,i)}indicateDefaultOption(){var t;”active”===this.firstOptionSelectionMode?null==(t=Array.from(this.list.querySelectorAll(‘[role=”option”]:not([aria-disabled=”true”])’)).filter(a)[0])||t.setAttribute(“data-combobox-option-default”,”true”):”selected”===this.firstOptionSelectionMode&&this.navigate(1)}navigate(t=1){let e=Array.from(this.list.querySelectorAll(‘[aria-selected=”true”]’)).filter(a)[0],n=Array.from(this.list.querySelectorAll(‘[role=”option”]’)).filter(a),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t){this.clearSelection(),this.input.focus();return}let r=1===t?0:n.length-1;if(e&&i>=0){let e=i+t;e>=0&&e0||t.offsetHeight>0)}},62044:(t,e,n)=>{n.d(e,{A:()=>a});let FilterInputElement=class FilterInputElement extends HTMLElement{constructor(){super(),this.currentQuery=null,this.filter=null,this.debounceInputChange=function(t){let e;return function(){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t()},300)}}(()=>i(this,!0)),this.boundFilterResults=()=>{i(this,!1)}}static get observedAttributes(){return[“aria-owns”]}attributeChangedCallback(t,e){e&&”aria-owns”===t&&i(this,!1)}connectedCallback(){let t=this.input;t&&(t.setAttribute(“autocomplete”,”off”),t.setAttribute(“spellcheck”,”false”),t.addEventListener(“focus”,this.boundFilterResults),t.addEventListener(“change”,this.boundFilterResults),t.addEventListener(“input”,this.debounceInputChange))}disconnectedCallback(){let t=this.input;t&&(t.removeEventListener(“focus”,this.boundFilterResults),t.removeEventListener(“change”,this.boundFilterResults),t.removeEventListener(“input”,this.debounceInputChange))}get input(){let t=this.querySelector(“input”);return t instanceof HTMLInputElement?t:null}reset(){let t=this.input;t&&(t.value=””,t.dispatchEvent(new Event(“change”,{bubbles:!0})))}};async function i(t,e=!1){var n,a,s,o,l;let u,c,d,h=t.input;if(!h)return;let m=h.value.trim(),f=t.getAttribute(“aria-owns”);if(!f)return;let p=document.getElementById(f);if(!p)return;let v=p.hasAttribute(“data-filter-list”)?p:p.querySelector(“[data-filter-list]”);if(!v||(t.dispatchEvent(new CustomEvent(“filter-input-start”,{bubbles:!0})),e&&t.currentQuery===m))return;t.currentQuery=m;let b=t.filter||r,g=v.childElementCount,E=0,A=!1;for(let t of Array.from(v.children)){if(!(t instanceof HTMLElement))continue;let e=(((n=t).querySelector(“[data-filter-item-text]”)||n).textContent||””).trim(),i=b(t,e,m);!0===i.hideNew&&(A=i.hideNew),t.hidden=!i.match,i.match&&E++}let w=p.querySelector(“[data-filter-new-item]”),y=!!w&&m.length>0&&!A;w instanceof HTMLElement&&(w.hidden=!y,y&&(a=w,s=m,(u=a.querySelector(“[data-filter-new-item-text]”))&&(u.textContent=s),((c=a.querySelector(“[data-filter-new-item-value]”))instanceof HTMLInputElement||c instanceof HTMLButtonElement)&&(c.value=s))),o=p,l=E>0||y,(d=o.querySelector(“[data-filter-empty-state]”))instanceof HTMLElement&&(d.hidden=l),t.dispatchEvent(new CustomEvent(“filter-input-updated”,{bubbles:!0,detail:{count:E,total:g}}))}function r(t,e,n){return{match:-1!==e.toLowerCase().indexOf(n.toLowerCase()),hideNew:e===n}}let a=FilterInputElement;window.customElements.get(“filter-input”)||(window.FilterInputElement=FilterInputElement,window.customElements.define(“filter-input”,FilterInputElement))},91385:(t,e,n)=>{n.d(e,{Xq:()=>o,ai:()=>r,fN:()=>s,qA:()=>l});var i=-1/0,r=1/0;function a(t,e,n,r){for(var a=t.length,s=e.length,o=t.toLowerCase(),l=e.toLowerCase(),u=function(t){for(var e=t.length,n=Array(e),i=”/”,r=0;r1024)return i;var o=Array(n),l=Array(n);return a(t,e,o,l),l[n-1][s-1]}function o(t,e){var n=t.length,r=e.length,s=Array(n);if(!n||!r)return s;if(n===r){for(var o=0;o1024)return s;var l=Array(n),u=Array(n);a(t,e,l,u);for(var c=!1,o=n-1,d=r-1;o>=0;o–)for(;d>=0;d–)if(l[o][d]!==i&&(c||l[o][d]===u[o][d])){c=o&&d&&u[o][d]===l[o-1][d-1]+1,s[o]=d–;break}return s}function l(t,e){t=t.toLowerCase(),e=e.toLowerCase();for(var n=t.length,i=0,r=0;i{n.r(e),n.d(e,{Attachment:()=>Attachment,default:()=>m});let Attachment=class Attachment{constructor(t,e){this.file=t,this.directory=e,this.state=”pending”,this.id=null,this.href=null,this.name=null,this.percent=0}static traverse(t,e){var n,a;return n=t,e&&(a=n).items&&Array.from(a.items).some(t=>{let e=t.webkitGetAsEntry&&t.webkitGetAsEntry();return e&&e.isDirectory})?r(“”,Array.from(n.items).map(t=>t.webkitGetAsEntry()).filter(t=>null!=t)):Promise.resolve(i(Array.from(n.files||[])).map(t=>new Attachment(t)))}static from(t){let e=[];for(let n of t)if(n instanceof File)e.push(new Attachment(n));else if(n instanceof Attachment)e.push(n);else throw Error(“Unexpected type”);return e}get fullPath(){return this.directory?`${this.directory}/${this.file.name}`:this.file.name}isImage(){return[“image/gif”,”image/png”,”image/jpg”,”image/jpeg”,”image/svg+xml”].indexOf(this.file.type)>-1}isVideo(){return[“video/mp4″,”video/quicktime”].indexOf(this.file.type)>-1}saving(t){if(“pending”!==this.state&&”saving”!==this.state)throw Error(`Unexpected transition from ${this.state} to saving`);this.state=”saving”,this.percent=t}saved(t){var e,n,i;if(“pending”!==this.state&&”saving”!==this.state)throw Error(`Unexpected transition from ${this.state} to saved`);this.state=”saved”,this.id=null!=(e=null==t?void 0:t.id)?e:null,this.href=null!=(n=null==t?void 0:t.href)?n:null,this.name=null!=(i=null==t?void 0:t.name)?i:null}isPending(){return”pending”===this.state}isSaving(){return”saving”===this.state}isSaved(){return”saved”===this.state}};function i(t){return Array.from(t).filter(t=>!t.name.startsWith(“.”))}async function r(t,e){let n=[];for(let a of i(e))if(a.isDirectory)n.push(…await r(a.fullPath,await function(t){return new Promise(function(e,n){let i=[],r=t.createReader(),a=()=>{r.readEntries(t=>{t.length>0?(i.push(…t),a()):e(i)},n)};a()})}(a)));else{let e=await function(t){return new Promise(function(e,n){t.file(e,n)})}(a);n.push(new Attachment(e,t))}return n}let FileAttachmentElement=class FileAttachmentElement extends HTMLElement{connectedCallback(){this.addEventListener(“dragenter”,o),this.addEventListener(“dragover”,o),this.addEventListener(“dragleave”,l),this.addEventListener(“drop”,u),this.addEventListener(“paste”,d),this.addEventListener(“change”,h)}disconnectedCallback(){this.removeEventListener(“dragenter”,o),this.removeEventListener(“dragover”,o),this.removeEventListener(“dragleave”,l),this.removeEventListener(“drop”,u),this.removeEventListener(“paste”,d),this.removeEventListener(“change”,h)}get directory(){return this.hasAttribute(“directory”)}set directory(t){t?this.setAttribute(“directory”,””):this.removeAttribute(“directory”)}async attach(t){let e=t instanceof DataTransfer?await Attachment.traverse(t,this.directory):Attachment.from(t);this.dispatchEvent(new CustomEvent(“file-attachment-accept”,{bubbles:!0,cancelable:!0,detail:{attachments:e}}))&&e.length&&this.dispatchEvent(new CustomEvent(“file-attachment-accepted”,{bubbles:!0,detail:{attachments:e}}))}};function a(t){return Array.from(t.types).indexOf(“Files”)>=0}let s=null;function o(t){let e=t.currentTarget;s&&clearTimeout(s),s=window.setTimeout(()=>e.removeAttribute(“hover”),200);let n=t.dataTransfer;n&&a(n)&&(n.dropEffect=”copy”,e.setAttribute(“hover”,””),t.preventDefault())}function l(t){t.dataTransfer&&(t.dataTransfer.dropEffect=”none”),t.currentTarget.removeAttribute(“hover”),t.stopPropagation(),t.preventDefault()}function u(t){let e=t.currentTarget;if(!(e instanceof FileAttachmentElement))return;e.removeAttribute(“hover”);let n=t.dataTransfer;n&&a(n)&&(e.attach(n),t.stopPropagation(),t.preventDefault())}let c=/^image\/(gif|png|jpeg)$/;function d(t){if(!t.clipboardData||!t.clipboardData.items)return;let e=t.currentTarget;if(!(e instanceof FileAttachmentElement))return;let n=function(t){for(let e of t)if(“file”===e.kind&&c.test(e.type))return e.getAsFile();return null}(t.clipboardData.items);n&&(e.attach([n]),t.preventDefault())}function h(t){let e=t.currentTarget;if(!(e instanceof FileAttachmentElement))return;let n=t.target;if(!(n instanceof HTMLInputElement))return;let i=e.getAttribute(“input”);if(i&&n.id!==i)return;let r=n.files;r&&0!==r.length&&(e.attach(r),n.value=””)}window.customElements.get(“file-attachment”)||(window.FileAttachmentElement=FileAttachmentElement,window.customElements.define(“file-attachment”,FileAttachmentElement));let m=FileAttachmentElement}}]);
//# sourceMappingURL=36562-84e28f33cd0e.js.map