티스토리 수익 글 보기
performance.mark(“js-parse-end:49032-5693223fc075b6c7.js”);
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[“49032”],{13937(e,t,n){let o;n.d(t,{Ax:()=>c,JW:()=>u,ZV:()=>l});class r extends Error{constructor(e,t){super(e),this.response=t}}function a(){let e,t;return[new Promise(function(n,o){e=n,t=o}),e,t]}let i=[],s=[];function l(e){i.push(e)}function c(e){s.push(e)}function u(e,t){!o&&(o=new Map,”u”>typeof document&&document.addEventListener(“submit”,d));let n=o.get(e)||[];o.set(e,[…n,t])}function d(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 o.keys())if(n(e)){let n=o.get(e)||[];t.push(…n)}return t}(t);if(0===n.length)return;let r=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,o]of[…new FormData(e).entries()])t.append(n,o.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]=a();e.preventDefault(),f(n,t,r,l).then(async e=>{if(e){for(let e of s)await e(t);h(r).then(c,u).catch(()=>{}).then(()=>{for(let e of i)e(t)})}else t.submit()},e=>{t.submit(),setTimeout(()=>{throw e})})}async function f(e,t,n,o){let r=!1;for(let i of e){let[e,s]=a(),l=()=>(r=!0,s(),o),c={text:l,json:()=>(n.headers.set(“Accept”,”application/json”),l()),html:()=>(n.headers.set(“Accept”,”text/html”),l())};await Promise.race([e,i(t,c,n)])}return r}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 o,a;let e;return delete this.html,this.html=(o=document,a=this.text,(e=o.createElement(“template”)).innerHTML=a,o.importNode(e.content,!0)),this.html}};if(n.text=await t.text(),t.ok)return n;throw new r(“request failed”,n)}},94571(e,t,n){let o;n.d(t,{Se:()=>L,FB:()=>d,p_:()=>M,CF:()=>m,aC:()=>q,zV:()=>O});let r=new WeakSet,a=new WeakMap;function i(e=document){if(a.has(e))return a.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&&s(e)});n.observe(e,{childList:!0,subtree:!0,attributeFilter:[“data-action”]});let o={get closed(){return t},unsubscribe(){t=!0,a.delete(e),n.disconnect()}};return a.set(e,o),o}function s(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 o=t.closest(n.tag);r.has(o)&&”function”==typeof o[n.method]&&o[n.method](e);let a=t.getRootNode();if(a instanceof ShadowRoot&&r.has(a.host)&&a.host.matches(n.tag)){let t=a.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 o of e.shadowRoot.querySelectorAll(`[data-target~=”${n}.${t}”]`))if(!o.closest(n))return o}for(let o of e.querySelectorAll(`[data-target~=”${n}.${t}”]`))if(o.closest(n)===e)return o}let f=e=>String(“symbol”==typeof e?e.description:e).replace(/([A-Z]($|[a-z]))/g,”-$1″).replace(/–/g,”-“).replace(/^-|-$/,””).toLowerCase(),h=(e,t=”property”)=>{let n=f(e);if(!n.includes(“-“))throw new DOMException(`${t}: ${String(e)} is not a valid ${t} name`,”SyntaxError”);return n},g=”attr”;function m(e,t){T(e,g).add(t)}let b=new WeakSet;function p(e,t){if(b.has(e))return;b.add(e);let n=Object.getPrototypeOf(e),o=n?.constructor?.attrPrefix??”data-“;for(let r of(t||(t=T(n,g)),t)){let t=e[r],n=h(`${o}${r}`),a={configurable:!0,get(){return this.getAttribute(n)||””},set(e){this.setAttribute(n,e||””)}};”number”==typeof t?a={configurable:!0,get(){return Number(this.getAttribute(n)||0)},set(e){this.setAttribute(n,e)}}:”boolean”==typeof t&&(a={configurable:!0,get(){return this.hasAttribute(n)},set(e){this.toggleAttribute(n,e)}}),Object.defineProperty(e,r,a),r in e&&!e.hasAttribute(n)&&a.set.call(e,t)}}let y=new Map,w=new Promise(e=>{“loading”!==document.readyState?e():document.addEventListener(“readystatechange”,()=>e(),{once:!0})}),E=new Promise(e=>{let t=new AbortController;t.signal.addEventListener(“abort”,()=>e());let n={once:!0,passive:!0,signal:t.signal},o=()=>t.abort();document.addEventListener(“mousedown”,o,n),document.addEventListener(“touchstart”,o,n),document.addEventListener(“keydown”,o,n),document.addEventListener(“pointerdown”,o,n)}),v={ready:()=>w,firstInteraction:()=>E,visible:e=>new Promise(t=>{let n=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t(),n.disconnect();return}},{rootMargin:”0px 0px 256px 0px”,threshold:.01});for(let t of document.querySelectorAll(e))n.observe(t)})},A=new WeakMap;function S(e){cancelAnimationFrame(A.get(e)||0),A.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 o=n?.getAttribute(“data-load-on”)||”ready”,r=o in v?v[o]:v.ready;for(let e of y.get(t)||[])r(t).then(e);y.delete(t),A.delete(e)}}}))}function L(e,t){for(let[n,o]of(“string”==typeof e&&t&&(e={[e]:t}),Object.entries(e)))y.has(n)||y.set(n,new Set),y.get(n).add(o);k(document)}function k(e){o||(o=new MutationObserver(e=>{if(y.size)for(let t of e)for(let e of t.addedNodes)e instanceof Element&&S(e)})),S(e),o.observe(e,{subtree:!0,childList:!0})}let C=Symbol.for(“catalyst”);class x{constructor(e,t){const n=this,o=e.prototype.connectedCallback;e.prototype.connectedCallback=function(){n.connectedCallback(this,o)};const r=e.prototype.disconnectedCallback;e.prototype.disconnectedCallback=function(){n.disconnectedCallback(this,r)};const a=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(e,t,o){n.attributeChangedCallback(this,e,t,o,a)};let i=e.observedAttributes||[];Object.defineProperty(e,”observedAttributes”,{configurable:!0,get(){return n.observedAttributes(this,i)},set(e){i=e}}),function(e){let t=e.observedAttributes||[],n=e.attrPrefix??”data-“,o=e=>h(`${n}${e}`);Object.defineProperty(e,”observedAttributes”,{configurable:!0,get:()=>[…T(e.prototype,g)].map(o).concat(t),set(e){t=e}})}(e),function(e,t){let n=t||f(e.name).replace(/-element$/,””);try{window.customElements.define(n,e),window[e.name]=customElements.get(n)}catch(e){if(!(e instanceof DOMException&&”NotSupportedError”===e.name))throw e}}(e,t)}observedAttributes(e,t){return t}connectedCallback(e,t){var n,o;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));(p(e),r.add(e),e.shadowRoot&&(s(o=e.shadowRoot),i(o)),s(e),i(e.ownerDocument),t?.call(e),e.shadowRoot)&&(s(n=e.shadowRoot),i(n),k(e.shadowRoot))}disconnectedCallback(e,t){t?.call(e)}attributeChangedCallback(e,t,n,o,r){p(e),”data-catalyst”!==t&&r&&r.call(e,t,n,o)}}function T(e,t){if(!Object.prototype.hasOwnProperty.call(e,C)){let t=e[C],n=e[C]=new Map;if(t)for(let[e,o]of t)n.set(e,new Set(o))}let n=e[C];return n.has(t)||n.set(t,new Set),n.get(t)}function q(e,t){T(e,”target”).add(t),Object.defineProperty(e,t,{configurable:!0,get(){return d(this,t)}})}function O(e,t){T(e,”targets”).add(t),Object.defineProperty(e,t,{configurable:!0,get(){let e=this.tagName.toLowerCase(),n=[];if(this.shadowRoot)for(let o of this.shadowRoot.querySelectorAll(`[data-targets~=”${e}.${t}”]`))o.closest(e)||n.push(o);for(let o of this.querySelectorAll(`[data-targets~=”${e}.${t}”]`))o.closest(e)===this&&n.push(o);return n}})}function M(e){if(“string”==typeof e)return t=>{new x(t,e)};new x(e)}},74057(e,t,n){n.d(t,{A:()=>p});let o=”data-close-dialog”,r=`[${o}]`;function a(e){let t=Array.from(e.querySelectorAll(“[autofocus]”)).filter(s)[0];t||(t=e,e.setAttribute(“tabindex”,”-1″)),t.focus()}function i(e){let t=e.currentTarget;t instanceof Element&&(“Escape”===e.key||”Esc”===e.key?(d(t,!1),e.stopPropagation()):”Tab”===e.key&&function(e){if(!(e.currentTarget instanceof Element))return;let t=e.currentTarget.querySelector(“details-dialog”);if(!t)return;e.preventDefault();let n=Array.from(t.querySelectorAll(“*”)).filter(s);if(0===n.length)return;let o=e.shiftKey?-1:1,r=t.getRootNode(),a=t.contains(r.activeElement)?r.activeElement:null,i=-1===o?-1:0;if(a instanceof HTMLElement){let e=n.indexOf(a);-1!==e&&(i=e+o)}i<0?i=n.length-1:i%=n.length,n[i].focus()}(e))}function s(e){var t;return e.tabIndex>=0&&!e.disabled&&!(t=e).hidden&&(!t.type||”hidden”!==t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function l(e){let t=e.querySelector(“details-dialog”);return!(t instanceof b)||t.dispatchEvent(new CustomEvent(“details-dialog-close”,{bubbles:!0,cancelable:!0}))}function c(e){if(!(e.currentTarget instanceof Element))return;let t=e.currentTarget.closest(“details”);t&&t.hasAttribute(“open”)&&(l(t)||(e.preventDefault(),e.stopPropagation()))}function u(e){let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.querySelector(“details-dialog”);if(n instanceof b)if(t.hasAttribute(“open”)){let e=”getRootNode”in n?n.getRootNode():document;e.activeElement instanceof HTMLElement&&m.set(n,{details:t,activeElement:e.activeElement}),a(n),t.addEventListener(“keydown”,i)}else{var o,r;let e;for(let e of n.querySelectorAll(“form”))e.reset();let a=(o=t,r=n,(e=m.get(r))&&e.activeElement instanceof HTMLElement?e.activeElement:o.querySelector(“summary”));a&&a.focus(),t.removeEventListener(“keydown”,i)}}function d(e,t){t!==e.hasAttribute(“open”)&&(t?e.setAttribute(“open”,””):l(e)&&e.removeAttribute(“open”))}function f(e){let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.querySelector(“details-dialog”);if(!(n instanceof b))return;let o=n.querySelector(“include-fragment:not([src])”);if(!o)return;let r=n.src;null!==r&&(o.addEventListener(“loadend”,()=>{t.hasAttribute(“open”)&&a(n)}),o.setAttribute(“src”,r),g(t))}function h(e,t,n){g(e),t&&e.addEventListener(“toggle”,f,{once:!0}),t&&n&&e.addEventListener(“mouseover”,f,{once:!0})}function g(e){e.removeEventListener(“toggle”,f),e.removeEventListener(“mouseover”,f)}let m=new WeakMap;class b extends HTMLElement{static get CLOSE_ATTR(){return o}static get CLOSE_SELECTOR(){return r}constructor(){super(),m.set(this,{details:null,activeElement:null}),this.addEventListener(“click”,function({target:e}){if(!(e instanceof Element))return;let t=e.closest(“details”);t&&e.closest(r)&&d(t,!1)})}get src(){return this.getAttribute(“src”)}set src(e){this.setAttribute(“src”,e||””)}get preload(){return this.hasAttribute(“preload”)}set preload(e){e?this.setAttribute(“preload”,””):this.removeAttribute(“preload”)}connectedCallback(){this.setAttribute(“role”,”dialog”),this.setAttribute(“aria-modal”,”true”);let e=m.get(this);if(!e)return;let t=this.parentElement;if(!t)return;let n=t.querySelector(“summary”);n&&(n.hasAttribute(“role”)||n.setAttribute(“role”,”button”),n.addEventListener(“click”,c,{capture:!0})),t.addEventListener(“toggle”,u),e.details=t,h(t,this.src,this.preload)}disconnectedCallback(){let e=m.get(this);if(!e)return;let{details:t}=e;if(!t)return;t.removeEventListener(“toggle”,u),g(t);let n=t.querySelector(“summary”);n&&n.removeEventListener(“click”,c,{capture:!0}),e.details=null}toggle(e){let t=m.get(this);if(!t)return;let{details:n}=t;n&&d(n,e)}static get observedAttributes(){return[“src”,”preload”]}attributeChangedCallback(){let e=m.get(this);if(!e)return;let{details:t}=e;t&&h(t,this.src,this.preload)}}let p=b;window.customElements.get(“details-dialog”)||(window.DetailsDialogElement=b,window.customElements.define(“details-dialog”,b))}}]);
//# sourceMappingURL=49032-5693223fc075b6c7-a6b40deb5cd15206.js.map