티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[“codespaces”],{4559:(e,t,n)=>{n.d(t,{C:()=>i,i:()=>s});var o=n(71315),r=n(69599),a=n(46493);function i(e,t){(0,r.G7)(“arianotify_comprehensive_migration”)?s(l(e),{…t,element:t?.element??e}):(0,r.G7)(“primer_live_region_element”)&&t?.element===void 0?(0,a.Cj)(e,{politeness:t?.assertive?”assertive”:”polite”}):s(l(e),t)}function s(e,t){let{assertive:n,element:i}=t??{};(0,r.G7)(“arianotify_comprehensive_migration”)&&”ariaNotify”in Element.prototype?(i||document.body).ariaNotify(e):(0,r.G7)(“primer_live_region_element”)&&void 0===i?(0,a.iP)(e,{politeness:n?”assertive”:”polite”}):function(e,t,n){let r=n??o.XC?.querySelector(t?”#js-global-screen-reader-notice-assertive”:”#js-global-screen-reader-notice”);r&&(r.textContent===e?r.textContent=`${e}\u00A0`:r.textContent=e)}(e,n,i)}function l(e){return(e.getAttribute(“aria-label”)||e.innerText||””).trim()}},13523:(e,t,n)=>{n.d(t,{$r:()=>i,M1:()=>s,li:()=>r,pS:()=>c,wE:()=>l});var o=n(71315);let r=”X-Fetch-Nonce”,a=new Set;function i(e){a.add(e)}function s(){return a.values().next().value||””}function l(e){let t={};return void 0!==e&&(t[“X-Fetch-Nonce-To-Validate”]=e),void 0===e?t[r]=s():a.has(e)?t[r]=e:t[r]=Array.from(a).join(“,”),t}function c(){let e=o.XC?.head?.querySelector(‘meta[name=”fetch-nonce”]’)?.content||””;e&&i(e)}},18962:(e,t,n)=>{var o=n(31635),r=n(39595);let a=class InputDemuxElement extends HTMLElement{connectedCallback(){this.control&&(this.storedInput=Array(this.control.children.length).fill(“”)),this.addEventListener(“input”,this.relayInput.bind(this)),this.addEventListener(“keydown”,this.relayKeydown.bind(this));let e=this.closest(“details”);e&&e.addEventListener(“toggle”,()=>{e.open&&this.source.focus()})}relayKeydown(e){if((this.isControlTab(e.target)||e.target===this.source)&&(“ArrowDown”===e.key||”Tab”===e.key))e.preventDefault(),e.stopPropagation(),this.routeCustomEvent(new CustomEvent(“focus-list”));else if(“Escape”===e.key){let e=this.closest(“details”);e&&e.removeAttribute(“open”)}}isControlTab(e){return!!e&&!!this.control&&Array.from(this.control.children).includes(e)}relayInput(e){if(!e.target)return;let t=e.target.value;this.routeCustomEvent(new CustomEvent(“input-entered”,{detail:t}))}routeCustomEvent(e){this.sinks[this.selectedIndex].dispatchEvent(e)}get selectedIndex(){if(!this.control)return 0;let e=this.control.querySelector(‘[aria-selected=”true”]’);return e?Array.from(this.control.children).indexOf(e):0}storeInput(){this.storedInput[this.selectedIndex]=this.source.value}updateInput(e){this.source.value=this.storedInput[this.selectedIndex];let t=e.detail.relatedTarget.getAttribute(“data-filter-placeholder”);this.source.placeholder=t,this.source.setAttribute(“aria-label”,t),this.notifySelected()}notifySelected(){let e=this.sinks[this.selectedIndex],t=new CustomEvent(“tab-selected”);e.dispatchEvent(t)}};(0,o.Cg)([r.aC],a.prototype,”source”,void 0),(0,o.Cg)([r.zV],a.prototype,”sinks”,void 0),(0,o.Cg)([r.aC],a.prototype,”control”,void 0),a=(0,o.Cg)([r.p_],a)},21764:(e,t,n)=>{n.d(t,{f:()=>c});var o=n(21403),r=n(97797),a=n(58371),i=n(46865),s=n(53627),l=n(4559);function c(e,t){let n=t.querySelector(“*”),o=e.ownerDocument.activeElement,r=null;if(o instanceof HTMLElement&&n instanceof Element){let e=function(e){let t=e.tagName.toLowerCase();if(e.hasAttribute(“id”)){let n=e.id,o=n.match(/^(.+)-\d+$/),r=n.match(/^(.+)-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(-.*)?$/);if(o){let e=o[1];return`${t}[id^=”${e}”]`}if(r){let e=r[1],n=r[2]||””;return n?`${t}[id^=”${e}”][id$=”${n}”]`:`${t}[id^=”${e}”]`}return`${t}#${n}`}let n=e.hasAttribute(“class”)?`.${e.className.split(” “).join(“.”)}`:””;return`${t}${n}`}(o),t=Array.from(n.querySelectorAll(e));if(1===t.length)r=t[0]??null;else if(t.length>1){let e=o.getAttribute(“aria-describedby”);if(e){let n=e.split(/\s+/).filter(Boolean);for(let e of t){let t=e.getAttribute(“aria-describedby”);if(!t)continue;let o=t.split(/\s+/).filter(Boolean);if(n.some(e=>o.includes(e))){r=e;break}}r||(r=t[0]??null)}else r=t[0]??null}}if(e.replaceWith(t),r instanceof HTMLElement&&(r.focus(),r.getAttribute(“aria-describedby”)?.includes(“codespaces-repository-select-label”))){let e=document.getElementById(“codespaces-create-notice-text”);e&&(0,l.C)(e)}}function d(){let e=new URLSearchParams(new URL(document.location.href,window.location.origin).search);e.set(“response_error”,”true”),window.location.replace(`${window.location.pathname}?${e.toString()}`)}(0,r.on)(“remote-input-error”,”#js-codespaces-repository-select”,()=>{document.querySelector(“#js-codespaces-unable-load-repositories-warning”).hidden=!1}),(0,a.JW)(“.js-new-codespace-form”,async function(e,t){let n=e.closest(“[data-replace-remote-form-target]”),o=n.querySelector(“.js-new-codespace-submit-button”);o instanceof HTMLInputElement&&(o.disabled=!0),e.classList.remove(“is-error”),e.classList.add(“is-loading”);try{o&&o.setAttribute(“disabled”,”true”);let e=await t.html();if(200!==e.status&&d(),c(n,e.html),”true”===n.getAttribute(“data-allow-update-url”)){var r=new FormData(document.querySelector(“form.js-new-codespace-form”));let e=new URLSearchParams(new URL(document.location.href,window.location.origin).search),t=[“vscs_target”];for(let[n,o]of r.entries()){if(t.includes(n)||!o){e.delete(n);continue}e.set(n,o)}(0,s.MM)(e)}}catch(e){throw d(),e}});let u=null;function p(e){u=e,null!==e&&document.querySelector(“.js-codespace-loading-steps”).setAttribute(“data-current-state”,u)}(0,o.lB)(“.js-codespace-loading-steps”,{constructor:HTMLElement,add:e=>{let t=e.getAttribute(“data-current-state”);t&&p(t)}}),(0,o.lB)(“.js-codespace-advance-state”,{constructor:HTMLElement,add:e=>{let t=e.getAttribute(“data-state”);t&&p(t)}}),(0,o.lB)(“.js-auto-submit-form”,{constructor:HTMLFormElement,initialize:i.k_}),(0,o.lB)(“.js-workbench-form-container”,{constructor:HTMLElement,add:()=>{let e=document.querySelector(“.js-workbench-form-container form”);(0,i.k_)(e)}})},44105:(e,t,n)=>{n(21764);var o=n(31635),r=n(39595),a=n(78134),i=n(70987),s=n(97797),l=n(69759),c=n(51987);function d(e){for(let t of e.querySelectorAll(“.js-toggle-hidden”))t.hidden=!t.hidden}async function u(){let e=document.querySelector(“.js-codespaces-details-container”);e&&(e.open=!1);let t=document.querySelector(“new-codespace”);if(t&&!t.getAttribute(“data-no-submit-on-create”))try{let e=await fetch(“/codespaces/new”);if(e&&e.ok){let n=(0,l.B)(document,await e.text());t.replaceWith(n)}}catch{}}async function p(e,t){let n=document.querySelector(`#${e}`),o=await (0,i.r)({content:n.content.cloneNode(!0),dialogClass:”project-dialog”});return t&&t.setAttribute(“aria-expanded”,”true”),o.addEventListener(“dialog:remove”,function(){t&&d(t)},{once:!0}),o}async function m(e){let t=await fetch(e.action,{method:e.method,body:new FormData(e),headers:{Accept:”application/json”,…(0,c.kt)()}});if(t.ok){let n=await t.json();n.codespace_url?(window.location.href=n.codespace_url,d(e),u(),h()):(e.closest(“get-repo”)||e.closest(“new-codespace”)?(e.setAttribute(“data-src”,n.loading_url),e.dispatchEvent(new CustomEvent(“pollvscode”))):e.closest(“create-button”)&&(e.setAttribute(“data-src”,n.loading_url),e.dispatchEvent(new CustomEvent(“prpollvscode”))),d(e))}else if(422===t.status){let n=await t.json();if(“concurrency_limit_error”===n.error_type)await p(“concurrency-error”,e);else{let t=document.querySelector(“template.js-flash-template”),o=n.error;t.after(new a.i4(t,{className:”flash-error”,message:o})),d(e)}}}async function h(){let e=document.querySelector(“.js-codespaces-completable”),t=e&&e.getAttribute(“data-src”);if(!t)return;let n=await fetch(t,{method:”GET”,headers:{Accept:”text/fragment+html”,…(0,c.kt)()}});if(n.ok){let t=(0,l.B)(document,await n.text());e.replaceWith(t)}else throw Error(`Unexpected response: ${n.statusText}`)}(0,s.on)(“submit”,”.js-toggle-hidden-codespace-form”,function(e){d(e.currentTarget)}),(0,s.on)(“submit”,”.js-create-codespaces-form-command”,function(e){let t=e.currentTarget;t.classList.contains(“js-open-in-vscode-form”)||(u(),d(t))}),(0,s.on)(“submit”,”form.js-open-in-vscode-form”,async function(e){e.preventDefault();let t=e.currentTarget;await m(t)});let f=class ConcurrencyLimitElement extends HTMLElement{async connectedCallback(){p(“concurrency-error”)}};f=(0,o.Cg)([r.p_],f);var g=n(35750),v=n(18150),b=n(85242),y=n(50467),C=n(46865),w=n(51973),_=n(53627),E=new WeakMap;let T=class NewCodespaceElement extends HTMLElement{async connectedCallback(){let e=new URLSearchParams(new URL(document.location.href,window.location.origin).search);e.has(“response_error”)&&(e.delete(“response_error”),(0,_.MM)(e));let{signal:t}=(0,b._)(this,E,new AbortController);this.addEventListener(“itemActivated”,this,{signal:t})}disconnectedCallback(){(0,g._)(this,E).abort()}handleEvent(e){if(“itemActivated”===e.type&&e.target===this.repositorySelectPanel&&this.advancedOptionsForm&&this.repoInput){let t=e.detail.item,n=t.querySelector(“[data-value]”)?.getAttribute(“data-value”);n&&(this.repoInput.value=n),(0,C.k_)(this.advancedOptionsForm)}}toggleLoadingVscode(){let e=this.loadingVscode.hidden,t=this.children;for(let n=0;nsetTimeout(e,t)),this.poll(e,1.5*t)):n}constructor(…e){super(…e),(0,y._)(this,”abortPoll”,null)}};(0,o.Cg)([r.aC],A.prototype,”form”,void 0),(0,o.Cg)([r.aC],A.prototype,”loadingIndicator”,void 0),(0,o.Cg)([r.aC],A.prototype,”viewBranchLink”,void 0),A=(0,o.Cg)([r.p_],A),n(18962),n(90787);let L=class CodespaceZeroConfigElement extends HTMLElement{connectedCallback(){this.toggleLocationConfigs(“production”)}updateVscsTargets(){for(let e of(this.vscsTargetUrl.disabled=”local”!==this.vscsTarget.value,this.toggleLocationConfigs(this.vscsTarget.value),this.vscsTargets))e.value=this.vscsTarget.value}updateVscsTargetUrls(){for(let e of this.vscsTargetUrls)e.value=this.vscsTargetUrl.value}updateLocations(e){let t=e.currentTarget;this.setLocationValues(t.value)}setLocationValues(e){for(let t of this.locations)t.value=e}toggleLocationConfigs(e){for(let t of this.locationConfigs)if(t.getAttribute(“data-vscs-target”)===e){t.hidden=!1;let e=t.querySelector(“option”);e&&(e.selected=!0,this.setLocationValues(e.value))}else t.hidden=!0}};(0,o.Cg)([r.aC],L.prototype,”regionConfig”,void 0),(0,o.Cg)([r.aC],L.prototype,”vscsTarget”,void 0),(0,o.Cg)([r.aC],L.prototype,”vscsTargetUrl”,void 0),(0,o.Cg)([r.zV],L.prototype,”locationConfigs”,void 0),(0,o.Cg)([r.zV],L.prototype,”vscsTargets”,void 0),(0,o.Cg)([r.zV],L.prototype,”vscsTargetUrls”,void 0),(0,o.Cg)([r.zV],L.prototype,”locations”,void 0),L=(0,o.Cg)([r.p_],L)},46865:(e,t,n)=>{n.d(t,{Cy:()=>s,K3:()=>d,Z8:()=>l,k_:()=>a,lK:()=>u,m$:()=>i});var o=n(88578);function r(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:n}))}function a(e,t){t&&(function(e,t){if(!(e instanceof HTMLFormElement))throw TypeError(“The specified element is not of type HTMLFormElement.”);if(!(t instanceof HTMLElement))throw TypeError(“The specified element is not of type HTMLElement.”);if(“submit”!==t.type)throw TypeError(“The specified element is not a submit button.”);if(!e||e!==t.form)throw Error(“The specified element is not owned by the form element.”)}(e,t),(0,o.A)(t)),r(e,”submit”,!0)&&e.submit()}function i(e,t){if(“boolean”==typeof t)if(e instanceof HTMLInputElement)e.checked=t;else throw TypeError(“only checkboxes can be set to boolean value”);else if(“checkbox”===e.type)throw TypeError(“checkbox can’t be set to string value”);else e.value=t;r(e,”change”,!1)}function s(e,t){for(let n in t){let o=t[n],r=e.elements.namedItem(n);r instanceof HTMLInputElement?r.value=o:r instanceof HTMLTextAreaElement&&(r.value=o)}}function l(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||e.isContentEditable}function c(e){return new URLSearchParams(e)}function d(e,t){let n=new URLSearchParams(e.search);for(let[e,o]of c(t))n.append(e,o);return n.toString()}function u(e){return c(new FormData(e)).toString()}},51973:(e,t,n)=>{n.d(t,{D4:()=>i,lF:()=>s,w:()=>a});var o=n(78134),r=n(97797);async function a(e,t){return(await n.e(“packages_encryption_encrypt_ts”).then(n.bind(n,44949))).encrypt(e,t)}function i(e){let t=atob(e).split(“”).map(e=>e.charCodeAt(0));return Uint8Array.from(t)}function s(e){let t=””;for(let n of e)t+=String.fromCharCode(n);return btoa(t)}function l(e){return async function(t){let n=t.currentTarget;if(t.defaultPrevented||!n.checkValidity())return;let r=i(n.getAttribute(“data-public-key”));for(let i of(t.preventDefault(),n.elements))if(i.id.endsWith(“secret”)){if(i.disabled=!0,i.required&&!i.value){let e=`${i.name} is invalid!`,t=document.querySelector(“template.js-flash-template”);t.after(new o.i4(t,{className:”flash-error”,message:e}));return}let t=`${i.name}_encrypted_value`;if(!i.value){n.elements.namedItem(t).disabled=e;continue}n.elements.namedItem(t).value=s(await a(r,i.value))}n.submit()}}(0,r.on)(“submit”,”form.js-encrypt-submit”,async function(e){let t=e.currentTarget;if(e.defaultPrevented||!t.checkValidity())return;let n=t.elements.namedItem(“secret_value”);if(n.disabled=!0,!n.value)return;e.preventDefault();let o=i(t.getAttribute(“data-public-key”));t.elements.namedItem(“encrypted_value”).value=s(await a(o,n.value)),t.submit()}),(0,r.on)(“submit”,”form.js-encrypt-bulk-submit”,l(!0)),(0,r.on)(“submit”,”form.js-encrypt-bulk-submit-enable-empty”,l(!1))},51987:(e,t,n)=>{n.d(t,{jC:()=>l,kt:()=>i,tV:()=>s});var o=n(87057),r=n(69599),a=n(13523);function i(e){let t={“X-Requested-With”:”XMLHttpRequest”,…(0,a.wE)(e)};return(0,r.G7)(“client_version_header”)&&(t={…t,[o.S]:(0,o.O)()}),t}function s(e,t){for(let[n,o]of Object.entries(i(t)))e.set(n,o)}function l(e){return{“X-GitHub-App-Type”:e}}},53627:(e,t,n)=>{n.d(t,{C3:()=>s,JV:()=>r,K3:()=>u,MM:()=>l,OE:()=>p,Zu:()=>d,bj:()=>a,jc:()=>c,kd:()=>i});var o=n(71315);function r(){return o.Kn?.state||{}}function a(e){m(r(),””,e)}function i(e){o.Kn?.pushState({appId:r().appId},””,e),h()}function s(e){m({…r(),…e},””,location.href)}function l(e){a(`?${e.toString()}${o.fV.hash}`)}function c(){a(o.fV.pathname+o.fV.hash)}function d(e){a(e.startsWith(“#”)?e:`#${e}`)}function u(){a(o.fV.pathname+o.fV.search)}function p(){o.Kn?.back()}function m(e,t,n){o.Kn?.replaceState(e,t,n),h()}function h(){o.cg?.dispatchEvent(new CustomEvent(“statechange”,{bubbles:!1,cancelable:!1}))}},58371:(e,t,n)=>{n.d(t,{Ax:()=>r.Ax,JW:()=>a,ZV:()=>r.ZV});var o=n(51987),r=n(13937);function a(e,t){(0,r.JW)(e,async(e,n,r)=>((0,o.tV)(r.headers),t(e,n,r)))}},69759:(e,t,n)=>{n.d(t,{B:()=>o});function o(e,t){let n=e.createElement(“template”);return n.innerHTML=t,e.importNode(n.content,!0)}},70987:(e,t,n)=>{n.d(t,{r:()=>r});var o=n(97797);async function r(e){let t=document.querySelector(“#site-details-dialog”).content.cloneNode(!0),n=t.querySelector(“details”),r=n.querySelector(“details-dialog”),a=n.querySelector(“.js-details-dialog-spinner”);e.detailsClass&&n.classList.add(…e.detailsClass.split(” “)),e.dialogClass&&r.classList.add(…e.dialogClass.split(” “)),e.label?r.setAttribute(“aria-label”,e.label):e.labelledBy&&r.setAttribute(“aria-labelledby”,e.labelledBy),document.body.append(t);try{let t=await e.content;a.remove(),r.prepend(t)}catch{a.remove();let t=document.createElement(“span”);t.textContent=e.errorMessage||”Couldn’t load the content”,t.classList.add(“my-6”),t.classList.add(“mx-4”),r.prepend(t)}return n.addEventListener(“toggle”,()=>{n.hasAttribute(“open”)||((0,o.h)(r,”dialog:remove”),n.remove())}),r}},87057:(e,t,n)=>{n.d(t,{O:()=>i,S:()=>a});var o=n(71315);let r=o.cg?.document?.head?.querySelector(‘meta[name=”release”]’)?.content||””,a=”X-GitHub-Client-Version”;function i(){return r}},88578:(e,t,n)=>{function o(e){let t=e.closest(“form”);if(!(t instanceof HTMLFormElement))return;let n=r(t);if(e.name){let o=e.matches(“input[type=submit]”)?”Submit”:””,r=e.value||o;n||((n=document.createElement(“input”)).type=”hidden”,n.classList.add(“js-submit-button-value”),t.prepend(n)),n.name=e.name,n.value=r}else n&&n.remove()}function r(e){let t=e.querySelector(“input.js-submit-button-value”);return t instanceof HTMLInputElement?t:null}n.d(t,{A:()=>o,C:()=>r})}},e=>{e.O(0,[“vendors-node_modules_github_selector-observer_dist_index_esm_js”,”vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_morphdom_dist_morphdom-e-c1896e”,”vendors-node_modules_virtualized-list_es_index_js-node_modules_github_template-parts_lib_inde-f69fd1″,”vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-0d71a9″,”app_assets_modules_github_ref-selector_ts”],()=>e(e.s=44105)),e.O()}]);
//# sourceMappingURL=codespaces-b2352773ce0d.js.map