UNPKG

@cloudsnorkel/cdk-github-runners

Version:

CDK construct to create GitHub Actions self-hosted runners. Creates ephemeral runners on demand. Easy to deploy and highly customizable.

25 lines 171 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Setup GitHub Runners</title> <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function r(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=r(n);fetch(n.href,s)}})();const kt=!1;var An=Array.isArray,Tn=Array.prototype.indexOf,Fe=Array.prototype.includes,Rn=Array.from,Nn=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,On=Object.prototype,Pn=Array.prototype,Ct=Object.getPrototypeOf,ir=Object.isExtensible;function In(e){return e()}function St(e){for(var t=0;t<e.length;t++)e[t]()}function wr(){var e,t,r=new Promise((i,n)=>{e=i,t=n});return{promise:r,resolve:e,reject:t}}const D=2,xt=4,Xe=8,Er=1<<24,he=16,oe=32,Ie=64,Dt=128,K=512,P=1024,M=2048,pe=4096,ie=8192,ge=16384,Lt=32768,He=65536,sr=1<<17,kr=1<<18,je=1<<19,Sr=1<<20,Oe=32768,At=1<<21,Mt=1<<22,me=1<<23,Re=Symbol("$state"),Cn=Symbol(""),Me=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Dn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ln(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Mn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Hn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function zn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function jn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function qn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Un=1,Bn=2,C=Symbol(),Wn="http://www.w3.org/1999/xhtml";function Kn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function xr(e){return e===this.v}function Vn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ar(e){return!Vn(e,this.v)}let ut=!1,Yn=!1;function $n(){ut=!0}let I=null;function ze(e){I=e}function Tr(e,t=!1,r){I={p:I,i:!1,c:null,e:null,s:e,x:null,l:ut&&!t?{s:null,u:null,$:[]}:null}}function Rr(e){var t=I,r=t.e;if(r!==null){t.e=null;for(var i of r)Wr(i)}return t.i=!0,I=t.p,{}}function et(){return!ut||I!==null&&I.l===null}let Ae=[];function Nr(){var e=Ae;Ae=[],St(e)}function ce(e){if(Ae.length===0&&!Ye){var t=Ae;queueMicrotask(()=>{t===Ae&&Nr()})}Ae.push(e)}function Jn(){for(;Ae.length>0;)Nr()}function Or(e){var t=E;if(t===null)return y.f|=me,e;if((t.f&Lt)===0){if((t.f&Dt)===0)throw e;t.b.error(e)}else Ge(e,t)}function Ge(e,t){for(;t!==null;){if((t.f&Dt)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const Zn=-7169;function N(e,t){e.f=e.f&Zn|t}function Ft(e){(e.f&K)!==0||e.deps===null?N(e,P):N(e,pe)}function Pr(e){if(e!==null)for(const t of e)(t.f&D)===0||(t.f&Oe)===0||(t.f^=Oe,Pr(t.deps))}function Ir(e,t,r){(e.f&M)!==0?t.add(e):(e.f&pe)!==0&&r.add(e),Pr(e.deps),N(e,P)}const st=new Set;let S=null,Tt=null,Q=null,q=[],ct=null,Rt=!1,Ye=!1;class be{committed=!1;current=new Map;previous=new Map;#t=new Set;#o=new Set;#e=0;#i=0;#s=null;#n=new Set;#r=new Set;skipped_effects=new Set;is_fork=!1;#a=!1;is_deferred(){return this.is_fork||this.#i>0}process(t){q=[],this.apply();var r=[],i=[];for(const n of t)this.#l(n,r,i);if(this.is_deferred()){this.#f(i),this.#f(r);for(const n of this.skipped_effects)Mr(n)}else{for(const n of this.#t)n();this.#t.clear(),this.#e===0&&this.#u(),Tt=this,S=null,or(i),or(r),Tt=null,this.#s?.resolve()}Q=null}#l(t,r,i){t.f^=P;for(var n=t.first,s=null;n!==null;){var o=n.f,a=(o&(oe|Ie))!==0,l=a&&(o&P)!==0,f=l||(o&ie)!==0||this.skipped_effects.has(n);if(!f&&n.fn!==null){a?n.f^=P:s!==null&&(o&(xt|Xe|Er))!==0?s.b.defer_effect(n):(o&xt)!==0?r.push(n):rt(n)&&((o&he)!==0&&this.#r.add(n),Qe(n));var h=n.first;if(h!==null){n=h;continue}}var d=n.parent;for(n=n.next;n===null&&d!==null;)d===s&&(s=null),n=d.next,d=d.parent}}#f(t){for(var r=0;r<t.length;r+=1)Ir(t[r],this.#n,this.#r)}capture(t,r){r!==C&&!this.previous.has(t)&&this.previous.set(t,r),(t.f&me)===0&&(this.current.set(t,t.v),Q?.set(t,t.v))}activate(){S=this,this.apply()}deactivate(){S===this&&(S=null,Q=null)}flush(){if(this.activate(),q.length>0){if(Cr(),S!==null&&S!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#o)t(this);this.#o.clear()}#u(){if(st.size>1){this.previous.clear();var t=Q,r=!0;for(const n of st){if(n===this){r=!1;continue}const s=[];for(const[a,l]of this.current){if(n.current.has(a))if(r&&l!==n.current.get(a))n.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...n.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var i=q;q=[];const a=new Set,l=new Map;for(const f of s)Dr(f,o,a,l);if(q.length>0){S=n,n.apply();for(const f of q)n.#l(f,[],[]);n.deactivate()}q=i}}S=null,Q=t}this.committed=!0,st.delete(this)}increment(t){this.#e+=1,t&&(this.#i+=1)}decrement(t){this.#e-=1,t&&(this.#i-=1),!this.#a&&(this.#a=!0,ce(()=>{this.#a=!1,this.is_deferred()?q.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#n)this.#r.delete(t),N(t,M),de(t);for(const t of this.#r)N(t,pe),de(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#o.add(t)}settled(){return(this.#s??=wr()).promise}static ensure(){if(S===null){const t=S=new be;st.add(S),Ye||ce(()=>{S===t&&t.flush()})}return S}apply(){}}function Qn(e){var t=Ye;Ye=!0;try{for(var r;;){if(Jn(),q.length===0&&(S?.flush(),q.length===0))return ct=null,r;Cr()}}finally{Ye=t}}function Cr(){Rt=!0;var e=null;try{for(var t=0;q.length>0;){var r=be.ensure();if(t++>1e3){var i,n;Xn()}r.process(q),ye.clear()}}finally{Rt=!1,ct=null}}function Xn(){try{Hn()}catch(e){Ge(e,ct)}}let fe=null;function or(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var i=e[r++];if((i.f&(ge|ie))===0&&rt(i)&&(fe=new Set,Qe(i),i.deps===null&&i.first===null&&i.nodes===null&&(i.teardown===null&&i.ac===null?$r(i):i.fn=null),fe?.size>0)){ye.clear();for(const n of fe){if((n.f&(ge|ie))!==0)continue;const s=[n];let o=n.parent;for(;o!==null;)fe.has(o)&&(fe.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(ge|ie))===0&&Qe(l)}}fe.clear()}}fe=null}}function Dr(e,t,r,i){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const n of e.reactions){const s=n.f;(s&D)!==0?Dr(n,t,r,i):(s&(Mt|he))!==0&&(s&M)===0&&Lr(n,t,i)&&(N(n,M),de(n))}}function Lr(e,t,r){const i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const n of e.deps){if(Fe.call(t,n))return!0;if((n.f&D)!==0&&Lr(n,t,r))return r.set(n,!0),!0}return r.set(e,!1),!1}function de(e){for(var t=ct=e;t.parent!==null;){t=t.parent;var r=t.f;if(Rt&&t===E&&(r&he)!==0&&(r&kr)===0)return;if((r&(Ie|oe))!==0){if((r&P)===0)return;t.f^=P}}q.push(t)}function Mr(e){if(!((e.f&oe)!==0&&(e.f&P)!==0)){N(e,P);for(var t=e.first;t!==null;)Mr(t),t=t.next}}function ei(e){let t=0,r=tt(0),i;return()=>{jt()&&(u(r),pt(()=>(t===0&&(i=nt(()=>e(()=>$e(r)))),t+=1,()=>{ce(()=>{t-=1,t===0&&(i?.(),i=void 0,$e(r))})})))}}var ti=He|je|Dt;function ri(e,t,r){new ni(e,t,r)}class ni{parent;is_pending=!1;#t;#o=null;#e;#i;#s;#n=null;#r=null;#a=null;#l=null;#f=null;#u=0;#d=0;#p=!1;#h=!1;#v=new Set;#_=new Set;#c=null;#w=ei(()=>(this.#c=tt(this.#u),()=>{this.#c=null}));constructor(t,r,i){this.#t=t,this.#e=r,this.#i=i,this.parent=E.b,this.is_pending=!!this.#e.pending,this.#s=Kr(()=>{E.b=this;{var n=this.#b();try{this.#n=ue(()=>i(n))}catch(s){this.error(s)}this.#d>0?this.#m():this.is_pending=!1}return()=>{this.#f?.remove()}},ti)}#E(){try{this.#n=ue(()=>this.#i(this.#t))}catch(t){this.error(t)}}#k(){const t=this.#e.pending;t&&(this.#r=ue(()=>t(this.#t)),ce(()=>{var r=this.#b();this.#n=this.#g(()=>(be.ensure(),ue(()=>this.#i(r)))),this.#d>0?this.#m():(Je(this.#r,()=>{this.#r=null}),this.is_pending=!1)}))}#b(){var t=this.#t;return this.is_pending&&(this.#f=Ze(),this.#t.before(this.#f),t=this.#f),t}defer_effect(t){Ir(t,this.#v,this.#_)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#g(t){var r=E,i=y,n=I;se(this.#s),Y(this.#s),ze(this.#s.ctx);try{return t()}catch(s){return Or(s),null}finally{se(r),Y(i),ze(n)}}#m(){const t=this.#e.pending;this.#n!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#f),Qr(this.#n,this.#l)),this.#r===null&&(this.#r=ue(()=>t(this.#t)))}#y(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t);return}if(this.#d+=t,this.#d===0){this.is_pending=!1;for(const r of this.#v)N(r,M),de(r);for(const r of this.#_)N(r,pe),de(r);this.#v.clear(),this.#_.clear(),this.#r&&Je(this.#r,()=>{this.#r=null}),this.#l&&(this.#t.before(this.#l),this.#l=null)}}update_pending_count(t){this.#y(t),this.#u+=t,!(!this.#c||this.#p)&&(this.#p=!0,ce(()=>{this.#p=!1,this.#c&&at(this.#c,this.#u)}))}get_effect_pending(){return this.#w(),u(this.#c)}error(t){var r=this.#e.onerror;let i=this.#e.failed;if(this.#h||!r&&!i)throw t;this.#n&&(U(this.#n),this.#n=null),this.#r&&(U(this.#r),this.#r=null),this.#a&&(U(this.#a),this.#a=null);var n=!1,s=!1;const o=()=>{if(n){Kn();return}n=!0,s&&qn(),be.ensure(),this.#u=0,this.#a!==null&&Je(this.#a,()=>{this.#a=null}),this.is_pending=this.has_pending_snippet(),this.#n=this.#g(()=>(this.#h=!1,ue(()=>this.#i(this.#t)))),this.#d>0?this.#m():this.is_pending=!1};ce(()=>{try{s=!0,r?.(t,o),s=!1}catch(a){Ge(a,this.#s&&this.#s.parent)}i&&(this.#a=this.#g(()=>{be.ensure(),this.#h=!0;try{return ue(()=>{i(this.#t,()=>t,()=>o)})}catch(a){return Ge(a,this.#s.parent),null}finally{this.#h=!1}}))})}}function ii(e,t,r,i){const n=et()?Ht:ai;var s=e.filter(c=>!c.settled);if(r.length===0&&s.length===0){i(t.map(n));return}var o=S,a=E,l=si(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function h(c){l();try{i(c)}catch(_){(a.f&ge)===0&&Ge(_,a)}o?.deactivate(),Nt()}if(r.length===0){f.then(()=>h(t.map(n)));return}function d(){l(),Promise.all(r.map(c=>oi(c))).then(c=>h([...t.map(n),...c])).catch(c=>Ge(c,a))}f?f.then(d):d()}function si(){var e=E,t=y,r=I,i=S;return function(s=!0){se(e),Y(t),ze(r),s&&i?.activate()}}function Nt(){se(null),Y(null),ze(null)}function Ht(e){var t=D|M,r=y!==null&&(y.f&D)!==0?y:null;return E!==null&&(E.f|=je),{ctx:I,deps:null,effects:null,equals:xr,f:t,fn:e,reactions:null,rv:0,v:C,wv:0,parent:r??E,ac:null}}function oi(e,t,r){let i=E;i===null&&Dn();var n=i.b,s=void 0,o=tt(C),a=!y,l=new Map;return gi(()=>{var f=wr();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).then(()=>{h===S&&h.committed&&h.deactivate(),Nt()})}catch(_){f.reject(_),Nt()}var h=S;if(a){var d=n.is_rendered();n.update_pending_count(1),h.increment(d),l.get(h)?.reject(Me),l.delete(h),l.set(h,f)}const c=(_,m=void 0)=>{if(h.activate(),m)m!==Me&&(o.f|=me,at(o,m));else{(o.f&me)!==0&&(o.f^=me),at(o,_);for(const[x,F]of l){if(l.delete(x),x===h)break;F.reject(Me)}}a&&(n.update_pending_count(-1),h.decrement(d))};f.promise.then(c,_=>c(null,_||"unknown"))}),qt(()=>{for(const f of l.values())f.reject(Me)}),new Promise(f=>{function h(d){function c(){d===s?f(o):h(s)}d.then(c,c)}h(s)})}function ai(e){const t=Ht(e);return t.equals=Ar,t}function Fr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)U(t[r])}}function li(e){for(var t=e.parent;t!==null;){if((t.f&D)===0)return(t.f&ge)===0?t:null;t=t.parent}return null}function zt(e){var t,r=E;se(li(e));try{e.f&=~Oe,Fr(e),t=rn(e)}finally{se(r)}return t}function Hr(e){var t=zt(e);if(!e.equals(t)&&(e.wv=en(),(!S?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){N(e,P);return}Pe||(Q!==null?(jt()||S?.is_fork)&&Q.set(e,t):Ft(e))}let Ot=new Set;const ye=new Map;let zr=!1;function tt(e,t){var r={f:0,v:e,reactions:null,equals:xr,rv:0,wv:0};return r}function _e(e,t){const r=tt(e);return wi(r),r}function B(e,t=!1,r=!0){const i=tt(e);return t||(i.equals=Ar),ut&&r&&I!==null&&I.l!==null&&(I.l.s??=[]).push(i),i}function ar(e,t){return k(e,nt(()=>u(e))),t}function k(e,t,r=!1){y!==null&&(!X||(y.f&sr)!==0)&&et()&&(y.f&(D|he|Mt|sr))!==0&&(V===null||!Fe.call(V,e))&&jn();let i=r?We(t):t;return at(e,i)}function at(e,t){if(!e.equals(t)){var r=e.v;Pe?ye.set(e,t):ye.set(e,r),e.v=t;var i=be.ensure();if(i.capture(e,r),(e.f&D)!==0){const n=e;(e.f&M)!==0&&zt(n),Ft(n)}e.wv=en(),Gr(e,M),et()&&E!==null&&(E.f&P)!==0&&(E.f&(oe|Ie))===0&&(W===null?Ei([e]):W.push(e)),!i.is_fork&&Ot.size>0&&!zr&&fi()}return t}function fi(){zr=!1;for(const e of Ot)(e.f&P)!==0&&N(e,pe),rt(e)&&Qe(e);Ot.clear()}function $e(e){k(e,e.v+1)}function Gr(e,t){var r=e.reactions;if(r!==null)for(var i=et(),n=r.length,s=0;s<n;s++){var o=r[s],a=o.f;if(!(!i&&o===E)){var l=(a&M)===0;if(l&&N(o,t),(a&D)!==0){var f=o;Q?.delete(f),(a&Oe)===0&&(a&K&&(o.f|=Oe),Gr(f,pe))}else l&&((a&he)!==0&&fe!==null&&fe.add(o),de(o))}}}function We(e){if(typeof e!="object"||e===null||Re in e)return e;const t=Ct(e);if(t!==On&&t!==Pn)return e;var r=new Map,i=An(e),n=_e(0),s=Ne,o=a=>{if(Ne===s)return a();var l=y,f=Ne;Y(null),hr(s);var h=a();return Y(l),hr(f),h};return i&&r.set("length",_e(e.length)),new Proxy(e,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&zn();var h=r.get(l);return h===void 0?h=o(()=>{var d=_e(f.value);return r.set(l,d),d}):k(h,f.value,!0),!0},deleteProperty(a,l){var f=r.get(l);if(f===void 0){if(l in a){const h=o(()=>_e(C));r.set(l,h),$e(n)}}else k(f,C),$e(n);return!0},get(a,l,f){if(l===Re)return e;var h=r.get(l),d=l in a;if(h===void 0&&(!d||Ve(a,l)?.writable)&&(h=o(()=>{var _=We(d?a[l]:C),m=_e(_);return m}),r.set(l,h)),h!==void 0){var c=u(h);return c===C?void 0:c}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var h=r.get(l);h&&(f.value=u(h))}else if(f===void 0){var d=r.get(l),c=d?.v;if(d!==void 0&&c!==C)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return f},has(a,l){if(l===Re)return!0;var f=r.get(l),h=f!==void 0&&f.v!==C||Reflect.has(a,l);if(f!==void 0||E!==null&&(!h||Ve(a,l)?.writable)){f===void 0&&(f=o(()=>{var c=h?We(a[l]):C,_=_e(c);return _}),r.set(l,f));var d=u(f);if(d===C)return!1}return h},set(a,l,f,h){var d=r.get(l),c=l in a;if(i&&l==="length")for(var _=f;_<d.v;_+=1){var m=r.get(_+"");m!==void 0?k(m,C):_ in a&&(m=o(()=>_e(C)),r.set(_+"",m))}if(d===void 0)(!c||Ve(a,l)?.writable)&&(d=o(()=>_e(void 0)),k(d,We(f)),r.set(l,d));else{c=d.v!==C;var x=o(()=>We(f));k(d,x)}var F=Reflect.getOwnPropertyDescriptor(a,l);if(F?.set&&F.set.call(h,f),!c){if(i&&typeof l=="string"){var we=r.get("length"),Ee=Number(l);Number.isInteger(Ee)&&Ee>=we.v&&k(we,Ee+1)}$e(n)}return!0},ownKeys(a){u(n);var l=Reflect.ownKeys(a).filter(d=>{var c=r.get(d);return c===void 0||c.v!==C});for(var[f,h]of r)h.v!==C&&!(f in a)&&l.push(f);return l},setPrototypeOf(){Gn()}})}function lr(e){try{if(e!==null&&typeof e=="object"&&Re in e)return e[Re]}catch{}return e}function ui(e,t){return Object.is(lr(e),lr(t))}var fr,jr,qr,Ur;function ci(){if(fr===void 0){fr=window,jr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;qr=Ve(t,"firstChild").get,Ur=Ve(t,"nextSibling").get,ir(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ir(r)&&(r.__t=void 0)}}function Ze(e=""){return document.createTextNode(e)}function lt(e){return qr.call(e)}function dt(e){return Ur.call(e)}function g(e,t){return lt(e)}function re(e,t=!1){{var r=lt(e);return r instanceof Comment&&r.data===""?dt(r):r}}function v(e,t=1,r=!1){let i=e;for(;t--;)i=dt(i);return i}function di(){return!1}let ur=!1;function hi(){ur||(ur=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function ht(e){var t=y,r=E;Y(null),se(null);try{return e()}finally{Y(t),se(r)}}function Gt(e,t,r,i=r){e.addEventListener(t,()=>ht(r));const n=e.__on_r;n?e.__on_r=()=>{n(),i(!0)}:e.__on_r=()=>i(!0),hi()}function Br(e){E===null&&(y===null&&Fn(),Mn()),Pe&&Ln()}function pi(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ve(e,t,r){var i=E;i!==null&&(i.f&ie)!==0&&(e|=ie);var n={ctx:I,deps:null,nodes:null,f:e|M|K,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Qe(n),n.f|=Lt}catch(a){throw U(n),a}else t!==null&&de(n);var s=n;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&je)===0&&(s=s.first,(e&he)!==0&&(e&He)!==0&&s!==null&&(s.f|=He)),s!==null&&(s.parent=i,i!==null&&pi(s,i),y!==null&&(y.f&D)!==0&&(e&Ie)===0)){var o=y;(o.effects??=[]).push(s)}return n}function jt(){return y!==null&&!X}function qt(e){const t=ve(Xe,null,!1);return N(t,P),t.teardown=e,t}function cr(e){Br();var t=E.f,r=!y&&(t&oe)!==0&&(t&Lt)===0;if(r){var i=I;(i.e??=[]).push(e)}else return Wr(e)}function Wr(e){return ve(xt|Sr,e,!1)}function vi(e){return Br(),ve(Xe|Sr,e,!0)}function _i(e){be.ensure();const t=ve(Ie|je,e,!0);return(r={})=>new Promise(i=>{r.outro?Je(t,()=>{U(t),i(void 0)}):(U(t),i(void 0))})}function gi(e){return ve(Mt|je,e,!0)}function pt(e,t=0){return ve(Xe|t,e,!0)}function De(e,t=[],r=[],i=[]){ii(i,t,r,n=>{ve(Xe,()=>e(...n.map(u)),!0)})}function Kr(e,t=0){var r=ve(he|t,e,!0);return r}function ue(e){return ve(oe|je,e,!0)}function Vr(e){var t=e.teardown;if(t!==null){const r=Pe,i=y;dr(!0),Y(null);try{t.call(null)}finally{dr(r),Y(i)}}}function Yr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const n=r.ac;n!==null&&ht(()=>{n.abort(Me)});var i=r.next;(r.f&Ie)!==0?r.parent=null:U(r,t),r=i}}function mi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&oe)===0&&U(t),t=r}}function U(e,t=!0){var r=!1;(t||(e.f&kr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(bi(e.nodes.start,e.nodes.end),r=!0),Yr(e,t&&!r),ft(e,0),N(e,ge);var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)s.stop();Vr(e);var n=e.parent;n!==null&&n.first!==null&&$r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function bi(e,t){for(;e!==null;){var r=e===t?null:dt(e);e.remove(),e=r}}function $r(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Je(e,t,r=!0){var i=[];Jr(e,i,!0);var n=()=>{r&&U(e),t&&t()},s=i.length;if(s>0){var o=()=>--s||n();for(var a of i)a.out(o)}else n()}function Jr(e,t,r){if((e.f&ie)===0){e.f^=ie;var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var s=n.next,o=(n.f&He)!==0||(n.f&oe)!==0&&(e.f&he)!==0;Jr(n,t,o?r:!1),n=s}}}function yi(e){Zr(e,!0)}function Zr(e,t){if((e.f&ie)!==0){e.f^=ie,(e.f&P)===0&&(N(e,M),de(e));for(var r=e.first;r!==null;){var i=r.next,n=(r.f&He)!==0||(r.f&oe)!==0;Zr(r,n?t:!1),r=i}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Qr(e,t){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end;r!==null;){var n=r===i?null:dt(r);t.append(r),r=n}}let ot=!1,Pe=!1;function dr(e){Pe=e}let y=null,X=!1;function Y(e){y=e}let E=null;function se(e){E=e}let V=null;function wi(e){y!==null&&(V===null?V=[e]:V.push(e))}let z=null,j=0,W=null;function Ei(e){W=e}let Xr=1,Te=0,Ne=Te;function hr(e){Ne=e}function en(){return++Xr}function rt(e){var t=e.f;if((t&M)!==0)return!0;if(t&D&&(e.f&=~Oe),(t&pe)!==0){for(var r=e.deps,i=r.length,n=0;n<i;n++){var s=r[n];if(rt(s)&&Hr(s),s.wv>e.wv)return!0}(t&K)!==0&&Q===null&&N(e,P)}return!1}function tn(e,t,r=!0){var i=e.reactions;if(i!==null&&!(V!==null&&Fe.call(V,e)))for(var n=0;n<i.length;n++){var s=i[n];(s.f&D)!==0?tn(s,t,!1):t===s&&(r?N(s,M):(s.f&P)!==0&&N(s,pe),de(s))}}function rn(e){var t=z,r=j,i=W,n=y,s=V,o=I,a=X,l=Ne,f=e.f;z=null,j=0,W=null,y=(f&(oe|Ie))===0?e:null,V=null,ze(e.ctx),X=!1,Ne=++Te,e.ac!==null&&(ht(()=>{e.ac.abort(Me)}),e.ac=null);try{e.f|=At;var h=e.fn,d=h(),c=e.deps,_=S?.is_fork;if(z!==null){var m;if(_||ft(e,j),c!==null&&j>0)for(c.length=j+z.length,m=0;m<z.length;m++)c[j+m]=z[m];else e.deps=c=z;if(jt()&&(e.f&K)!==0)for(m=j;m<c.length;m++)(c[m].reactions??=[]).push(e)}else!_&&c!==null&&j<c.length&&(ft(e,j),c.length=j);if(et()&&W!==null&&!X&&c!==null&&(e.f&(D|pe|M))===0)for(m=0;m<W.length;m++)tn(W[m],e);if(n!==null&&n!==e){if(Te++,n.deps!==null)for(let x=0;x<r;x+=1)n.deps[x].rv=Te;if(t!==null)for(const x of t)x.rv=Te;W!==null&&(i===null?i=W:i.push(...W))}return(e.f&me)!==0&&(e.f^=me),d}catch(x){return Or(x)}finally{e.f^=At,z=t,j=r,W=i,y=n,V=s,ze(o),X=a,Ne=l}}function ki(e,t){let r=t.reactions;if(r!==null){var i=Tn.call(r,e);if(i!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[i]=r[n],r.pop())}}if(r===null&&(t.f&D)!==0&&(z===null||!Fe.call(z,t))){var s=t;(s.f&K)!==0&&(s.f^=K,s.f&=~Oe),Ft(s),Fr(s),ft(s,0)}}function ft(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)ki(e,r[i])}function Qe(e){var t=e.f;if((t&ge)===0){N(e,P);var r=E,i=ot;E=e,ot=!0;try{(t&(he|Er))!==0?mi(e):Yr(e),Vr(e);var n=rn(e);e.teardown=typeof n=="function"?n:null,e.wv=Xr;var s;kt&&Yn&&(e.f&M)!==0&&e.deps}finally{ot=i,E=r}}}async function Si(){await Promise.resolve(),Qn()}function u(e){var t=e.f,r=(t&D)!==0;if(y!==null&&!X){var i=E!==null&&(E.f&ge)!==0;if(!i&&(V===null||!Fe.call(V,e))){var n=y.deps;if((y.f&At)!==0)e.rv<Te&&(e.rv=Te,z===null&&n!==null&&n[j]===e?j++:z===null?z=[e]:z.push(e));else{(y.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[y]:Fe.call(s,y)||s.push(y)}}}if(Pe&&ye.has(e))return ye.get(e);if(r){var o=e;if(Pe){var a=o.v;return((o.f&P)===0&&o.reactions!==null||sn(o))&&(a=zt(o)),ye.set(o,a),a}var l=(o.f&K)===0&&!X&&y!==null&&(ot||(y.f&K)!==0),f=o.deps===null;rt(o)&&(l&&(o.f|=K),Hr(o)),l&&!f&&nn(o)}if(Q?.has(e))return Q.get(e);if((e.f&me)!==0)throw e.v;return e.v}function nn(e){if(e.deps!==null){e.f|=K;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&D)!==0&&(t.f&K)===0&&nn(t)}}function sn(e){if(e.v===C)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ye.has(t)||(t.f&D)!==0&&sn(t))return!0;return!1}function nt(e){var t=X;try{return X=!0,e()}finally{X=t}}function xi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Re in e)Pt(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Re in r&&Pt(r)}}}function Pt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Pt(e[i],t)}catch{}const r=Ct(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const i=yr(r);for(let n in i){const s=i[n].get;if(s)try{s.call(e)}catch{}}}}}const Ai=["touchstart","touchmove"];function Ti(e){return Ai.includes(e)}const Ri=new Set,pr=new Set;function Ni(e,t,r,i={}){function n(s){if(i.capture||Ke.call(t,s),!s.cancelBubble)return ht(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ce(()=>{t.addEventListener(e,n,i)}):t.addEventListener(e,n,i),n}function Oi(e,t,r,i,n){var s={capture:i,passive:n},o=Ni(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&qt(()=>{t.removeEventListener(e,o,s)})}let vr=null;function Ke(e){var t=this,r=t.ownerDocument,i=e.type,n=e.composedPath?.()||[],s=n[0]||e.target;vr=e;var o=0,a=vr===e&&e.__root;if(a){var l=n.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var f=n.indexOf(t);if(f===-1)return;l<=f&&(o=l)}if(s=n[o]||e.target,s!==t){Nn(e,"currentTarget",{configurable:!0,get(){return s||r}});var h=y,d=E;Y(null),se(null);try{for(var c,_=[];s!==null;){var m=s.assignedSlot||s.parentNode||s.host||null;try{var x=s["__"+i];x!=null&&(!s.disabled||e.target===s)&&x.call(s,e)}catch(F){c?_.push(F):c=F}if(e.cancelBubble||m===t||m===null)break;s=m}if(c){for(let F of _)queueMicrotask(()=>{throw F});throw c}}finally{e.__root=t,delete e.currentTarget,Y(h),se(d)}}}function Pi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","\x3C!---->"),t.content}function It(e,t){var r=E;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function $(e,t){var r=(t&Un)!==0,i=(t&Bn)!==0,n,s=!e.startsWith("<!>");return()=>{n===void 0&&(n=Pi(s?e:"<!>"+e),r||(n=lt(n)));var o=i||jr?document.importNode(n,!0):n.cloneNode(!0);if(r){var a=lt(o),l=o.lastChild;It(a,l)}else It(o,o);return o}}function _r(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Ze();return e.append(t,r),It(t,r),e}function H(e,t){e!==null&&e.before(t)}function Ue(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Ii(e,t){return Ci(e,t)}const Le=new Map;function Ci(e,{target:t,anchor:r,props:i={},events:n,context:s,intro:o=!0}){ci();var a=new Set,l=d=>{for(var c=0;c<d.length;c++){var _=d[c];if(!a.has(_)){a.add(_);var m=Ti(_);t.addEventListener(_,Ke,{passive:m});var x=Le.get(_);x===void 0?(document.addEventListener(_,Ke,{passive:m}),Le.set(_,1)):Le.set(_,x+1)}}};l(Rn(Ri)),pr.add(l);var f=void 0,h=_i(()=>{var d=r??t.appendChild(Ze());return ri(d,{pending:()=>{}},c=>{if(s){Tr({});var _=I;_.c=s}n&&(i.$$events=n),f=e(c,i)||{},s&&Rr()}),()=>{for(var c of a){t.removeEventListener(c,Ke);var _=Le.get(c);--_===0?(document.removeEventListener(c,Ke),Le.delete(c)):Le.set(c,_)}pr.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return Di.set(f,h),f}let Di=new WeakMap;class Li{anchor;#t=new Map;#o=new Map;#e=new Map;#i=new Set;#s=!0;constructor(t,r=!0){this.anchor=t,this.#s=r}#n=()=>{var t=S;if(this.#t.has(t)){var r=this.#t.get(t),i=this.#o.get(r);if(i)yi(i),this.#i.delete(r);else{var n=this.#e.get(r);n&&(this.#o.set(r,n.effect),this.#e.delete(r),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(const[s,o]of this.#t){if(this.#t.delete(s),s===t)break;const a=this.#e.get(o);a&&(U(a.effect),this.#e.delete(o))}for(const[s,o]of this.#o){if(s===r||this.#i.has(s))continue;const a=()=>{if(Array.from(this.#t.values()).includes(s)){var f=document.createDocumentFragment();Qr(o,f),f.append(Ze()),this.#e.set(s,{effect:o,fragment:f})}else U(o);this.#i.delete(s),this.#o.delete(s)};this.#s||!i?(this.#i.add(s),Je(o,a,!1)):a()}}};#r=t=>{this.#t.delete(t);const r=Array.from(this.#t.values());for(const[i,n]of this.#e)r.includes(i)||(U(n.effect),this.#e.delete(i))};ensure(t,r){var i=S,n=di();if(r&&!this.#o.has(t)&&!this.#e.has(t))if(n){var s=document.createDocumentFragment(),o=Ze();s.append(o),this.#e.set(t,{effect:ue(()=>r(o)),fragment:s})}else this.#o.set(t,ue(()=>r(this.anchor)));if(this.#t.set(i,t),n){for(const[a,l]of this.#o)a===t?i.skipped_effects.delete(l):i.skipped_effects.add(l);for(const[a,l]of this.#e)a===t?i.skipped_effects.delete(l.effect):i.skipped_effects.add(l.effect);i.oncommit(this.#n),i.ondiscard(this.#r)}else this.#n()}}function ne(e,t,r=!1){var i=new Li(e),n=r?He:0;function s(o,a){i.ensure(o,a)}Kr(()=>{var o=!1;t((a,l=!0)=>{o=!0,s(l,a)}),o||s(!1,null)},n)}function Mi(e,t,r){var i=e==null?"":""+e;return i===""?null:i}function Fi(e,t,r,i,n,s){var o=e.__className;if(o!==r||o===void 0){var a=Mi(r);a==null?e.removeAttribute("class"):e.className=a,e.__className=r}return s}const Hi=Symbol("is custom element"),zi=Symbol("is html");function Gi(e,t){var r=on(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function gr(e,t,r,i){var n=on(e);n[t]!==(n[t]=r)&&(t==="loading"&&(e[Cn]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ji(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function on(e){return e.__attributes??={[Hi]:e.nodeName.includes("-"),[zi]:e.namespaceURI===Wn}}var mr=new Map;function ji(e){var t=e.getAttribute("is")||e.nodeName,r=mr.get(t);if(r)return r;mr.set(t,r=[]);for(var i,n=e,s=Element.prototype;s!==n;){i=yr(n);for(var o in i)i[o].set&&r.push(o);n=Ct(n)}return r}function Be(e,t,r=t){var i=new WeakSet;Gt(e,"input",async n=>{var s=n?e.defaultValue:e.value;if(s=wt(e)?Et(s):s,r(s),S!==null&&i.add(S),await Si(),s!==(s=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=s??"",a!==null){var f=e.value.length;o===a&&a===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=o,e.selectionEnd=Math.min(a,f))}}}),nt(t)==null&&e.value&&(r(wt(e)?Et(e.value):e.value),S!==null&&i.add(S)),pt(()=>{var n=t();if(e===document.activeElement){var s=Tt??S;if(i.has(s))return}wt(e)&&n===Et(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}const yt=new Set;function Z(e,t,r,i,n=i){var s=r.getAttribute("type")==="checkbox",o=e;if(t!==null)for(var a of t)o=o[a]??=[];o.push(r),Gt(r,"change",()=>{var l=r.__value;s&&(l=Ui(o,l,r.checked)),n(l)},()=>n(s?[]:null)),pt(()=>{var l=i();s?(l=l||[],r.checked=l.includes(r.__value)):r.checked=ui(r.__value,l)}),qt(()=>{var l=o.indexOf(r);l!==-1&&o.splice(l,1)}),yt.has(o)||(yt.add(o),ce(()=>{o.sort((l,f)=>l.compareDocumentPosition(f)===4?-1:1),yt.delete(o)})),ce(()=>{})}function qi(e,t,r=t){Gt(e,"change",i=>{var n=i?e.defaultChecked:e.checked;r(n)}),nt(t)==null&&r(e.checked),pt(()=>{var i=t();e.checked=!!i})}function Ui(e,t,r){for(var i=new Set,n=0;n<e.length;n+=1)e[n].checked&&i.add(e[n].__value);return r||i.delete(t),Array.from(i)}function wt(e){var t=e.type;return t==="number"||t==="range"}function Et(e){return e===""?null:+e}function Bi(e=!1){const t=I,r=t.l.u;if(!r)return;let i=()=>xi(t.s);if(e){let n=0,s={};const o=Ht(()=>{let a=!1;const l=t.s;for(const f in l)l[f]!==s[f]&&(s[f]=l[f],a=!0);return a&&n++,n});i=()=>u(o)}r.b.length&&vi(()=>{br(t,i),St(r.b)}),cr(()=>{const n=nt(()=>r.m.map(In));return()=>{for(const s of n)typeof s=="function"&&s()}}),r.a.length&&cr(()=>{br(t,i),St(r.a)})}function br(e,t){if(e.l.s)for(const r of e.l.s)u(r);t()}const Wi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Wi);$n();var Ki=$('<h3>GitHub Enterprise Server Domain</h3> <div class="px-3 py-3"><p>Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code> and without any path. It should look something like <code>github.mycompany.com</code>.</p> <input class="form-control"/></div>',1),Vi=$(`<h3>Authentication Type</h3> <div class="px-3 py-3"><p>You can choose between creating a new app that will provide authentication for specific repositories, or a personal access token that will provide access to all repositories available to you. Apps are easier to set up and provide more fine-grained access control. If you have previously created an app, you can choose to use an existing app.</p> <div class="form-check"><input class="form-check-input" type="radio" id="newApp"/> <label class="form-check-label" for="newApp">New GitHub App <b>(recommended)</b></label></div> <div class="form-check"><input class="form-check-input" type="radio" id="existingApp"/> <label class="form-check-label" for="existingApp">Existing GitHub App</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="pat"/> <label class="form-check-label" for="pat">Personal Access Token</label></div></div>`,1),Yi=$(`<p class="pt-2">If multiple organizations under the same GitHub Enterprise Server need to use the runners, you can make the app public.</p> <div class="form-check"><input class="form-check-input" type="checkbox" id="public"/> <label class="form-check-label" for="public">Public app</label></div>`,1),$i=$('<h3>Organization name</h3> <div class="px-3 py-3"><p>What is the slug for your organization? If your repositories have a URL like <code> </code> then your organization slug is <code>MyOrg</code>.</p> <input class="form-control"/></div>',1),Ji=$(`<h3>New App Settings</h3> <div class="px-3 py-3"><p>Choose whether to create a new personal app or organization app. A private personal app can only be used for repositories under your user. A private organization app can only be used for repositories under that organization.</p> <div class="form-check"><input class="form-check-input" type="radio" id="userScope"/> <label class="form-check-label" for="userScope">User app</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="orgScope"/> <label class="form-check-label" for="orgScope">Organization app</label></div> <!></div> <!>`,1),Zi=$(`<h3>Existing App Details</h3> <div class="px-3 py-3"><div class="form-group row px-3 py-2"><label for="appid" class="col-sm-2 col-form-label">App Id</label> <div class="col-sm-10"><input type="number" class="form-control" id="appid"/></div></div> <div class="form-group row px-3 py-2"><label for="pk" class="col-sm-2 col-form-label">Private Key</label> <div class="col-sm-10"><textarea class="form-control" id="pk" rows="10"></textarea></div></div> <div class="form-group row px-3 py-2"><div class="col-sm-2 col-form-label">Registration Level</div> <div class="col-sm-10"><div class="form-check"><input class="form-check-input" type="radio" id="repo"/> <label class="form-check-label" for="repo">Repository</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="org"/> <label class="form-check-label" for="org">Organization</label></div></div></div> <h4>Required Permissions</h4> <p>The existing app must have the following permissions.</p> <pre> </pre> <h4>Webhook</h4> <p>Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.</p></div>`,1),Qi=$(`<h2>Personal Access Token</h2> <div class="px-3 py-3"><p>The <a>personal access token</a> must have the <code>repo</code> scope enabled. Don't forget to also create a webhook as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.</p> <input class="form-control" placeholder="Token e.g. ghp_abcdefghijklmnopqrstuvwxyz1234567890"/></div>`,1),Xi=$(`<h3>Registration Level</h3> <div class="px-3 py-3"><p>Would you like runners to be registered on repository level, or on organization level?</p> <p><em>This determines where runners will be registered dynamically each time they are provisioned. This is independent of where the GitHub app is installed.</em></p> <ul><li>Registering runners on repository level requires the <code>administration</code> <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#authentication-requirements">permission</a>.</li> <li>Registering runners on organization level only requires the <code>organization_self_hosted_runners</code> <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#authentication-requirements">permission</a> which is more fine-grained.</li> <li><strong>Repository level is recommended</strong> because runners are registered to the specific repository where the job started, preventing jobs from being assigned to runners intended for other repositories.</li> <li>Registering runners on organization level means runners are registered to the entire organization, making them available to <strong>ALL repositories in the organization</strong>, regardless of whether the app is installed on those repositories. This can lead to jobs being routed to runners that weren't intended for them.</li> <li>Organization level registration does <strong>not</strong> automatically install the app on all repositories. You still need to install the app on each repository where you want to use runners. GitHub will ask you on which repositories to install this app after it's created.</li> <li>Do not use organization level registration if you don't fully trust all repositories in your organization.</li> <li>Use organization level only if you need to minimize permissions and you fully trust all repositories in your organization.</li> <li><strong>When in doubt, use the default repository level registration.</strong></li></ul> <div class="form-check"><input class="form-check-input" type="radio" id="repo"/> <label class="form-check-label" for="repo">Repository</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="org"/> <label class="form-check-label" for="org">Organization</label></div></div>`,1),es=$("<p>This button will be enabled once all the questions above are answered.</p>"),ts=$('<div role="alert"> </div>'),rs=$(`<p><b class="text-danger">WARNING:</b> using a public app means anyone with access to <code> </code> can use the runners you're setting up now. Anyone can create a workflow that will run on those runners, have access to their instance profile, and be part of their security group. Consider the security implications before continuing.</p>`),ns=$(`<main><div class="container py-3 px-2"><div class="row"><form class="col"><h1>Setup GitHub Runners</h1> <p>Answer all the questions on this page to automatically configure GitHub integration and get the runners working. This page will not be accessible once you complete this operation. If you ever want to access it again, edit <code></code> and run the status function again.</p> <h3>Choose GitHub Instance</h3> <div class="px-3 py-3"><p>Are your repositories hosted on GitHub.com or are you using an on-premise installation of GitHub Enterprise Server?</p> <div class="form-check"><input class="form-check-input" type="radio" id="github.com"/> <label class="form-check-label" for="github.com">GitHub.com</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="ghes"/> <label class="form-check-label" for="ghes">GitHub Enterprise Server</label></div></div> <!> <!> <!> <!> <h2>Finish Setup</h2> <div class="px-3 py-3"><!> <!> <button type="submit" class="btn btn-success"> </button></div></form></div></div> <form method="post" id="appform"><input type="hidden" name="manifest"/></form></main>`);function is(e,t){Tr(t,!1);const r=[],i=[],n=[],s=[],o="INSERT_TOKEN_HERE";let a=B(),l=B("INSERT_DOMAIN_HERE"),f=B(),h=B("user"),d=B("repo"),c=B("ORGANIZATION"),_=B(""),m=B(""),x=B(""),F=B(),we=B();const Ee={actions:"write",administration:"write",deployments:"read"},Ut={actions:"write",organization_self_hosted_runners:"write",deployments:"read"},ke=B({url:"https://github.com/CloudSnorkel/cdk-github-runners",hook_attributes:{url:"INSERT_WEBHOOK_URL_HERE"},redirect_url:"INSERT_BASE_URL_HERE/complete-new-app",public:!1,default_permissions:Ee,default_events:["workflow_job"]});function an(p,b,w,A,T,O,R){return R||p===void 0||b===void 0?!0:b==="newApp"?!1:b==="existingApp"?w===""||A===""||T===void 0:b==="pat"?O==="":(console.error("Something is broken",p,b,w),!0)}function ln(p){return p==="newApp"?"Create GitHub App":"Setup"}function vt(p,b){return new Promise((w,A)=>{fetch(`${p}?token=${o}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(b),redirect:"error"}).then(T=>{T.ok?T.text().then(w).catch(A):T.text().then(O=>{A(new Error(`${O} [${T.status}]`))}).catch(A)}).catch(A)})}function fn(p){p.preventDefault();function b(){const w=u(a)==="ghes"?u(l):"github.com";switch(ar(ke,u(ke).default_permissions=u(d)==="repo"?Ee:Ut),u(f)){case"newApp":return vt("domain",{domain:w,runnerLevel:u(d)}).then(A=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return vt("app",{appid:u(_),pk:u(m),domain:w,runnerLevel:u(d)});case"pat":return vt("pat",{pat:u(x),domain:w})}}b().then(w=>{k(we,w),k(F,!0)}).catch(w=>{k(we,`${w}`),k(F,!1)})}Bi();var Bt=ns(),Wt=g(Bt),un=g(Wt),Kt=g(un),Vt=v(g(Kt),2),cn=v(g(Vt));cn.textContent="INSERT_SECRET_ARN_HERE";var Yt=v(Vt,4),$t=v(g(Yt),2),_t=g($t);_t.value=_t.__value="github.com";var dn=v($t,2),gt=g(dn);gt.value=gt.__value="ghes";var Jt=v(Yt,2);{var hn=p=>{var b=Ki(),w=v(re(b),2),A=v(g(w),2);Be(A,()=>u(l),T=>k(l,T)),H(p,b)};ne(Jt,p=>{u(a)==="ghes"&&p(hn)})}var Zt=v(Jt,2);{var pn=p=>{var b=Vi(),w=v(re(b),2),A=v(g(w),2),T=g(A);T.value=T.__value="newApp";var O=v(A,2),R=g(O);R.value=R.__value="existingApp";var J=v(O,2),ee=g(J);ee.value=ee.__value="pat",Z(i,[],T,()=>u(f),G=>k(f,G)),Z(i,[],R,()=>u(f),G=>k(f,G)),Z(i,[],ee,()=>u(f),G=>k(f,G)),H(p,b)};ne(Zt,p=>{u(a)&&p(pn)})}var Qt=v(Zt,2);{var vn=p=>{var b=Ji(),w=v(re(b),2),A=v(g(w),2),T=g(A);T.value=T.__value="user";var O=v(A,2),R=g(O);R.value=R.__value="org";var J=v(O,2);{var ee=L=>{var te=Yi(),Se=v(re(te),2),ae=g(Se);qi(ae,()=>u(ke).public,xe=>ar(ke,u(ke).public=xe)),H(L,te)};ne(J,L=>{u(a)==="ghes"&&L(ee)})}var G=v(w,2);{var Ce=L=>{var te=$i(),Se=v(re(te),2),ae=g(Se),xe=v(g(ae)),it=g(xe),qe=v(ae,2);De(()=>Ue(it,`https://${u(l)??""}/MyOrg/my-repo`)),Be(qe,()=>u(c),mt=>k(c,mt)),H(L,te)};ne(G,L=>{u(h)==="org"&&L(Ce)})}Z(n,[],T,()=>u(h),L=>k(h,L)),Z(n,[],R,()=>u(h),L=>k(h,L)),H(p,b)},_n=p=>{var b=_r(),w=re(b);{var A=O=>{var R=Zi(),J=v(re(R),2),ee=g(J),G=v(g(ee),2),Ce=g(G),L=v(ee,2),te=v(g(L),2),Se=g(te),ae=v(L,2),xe=v(g(ae),2),it=g(xe),qe=g(it);qe.value=qe.__value="repo";var mt=v(it,2),bt=g(mt);bt.value=bt.__value="org";var Sn=v(ae,6),xn=g(Sn);De(le=>Ue(xn,le),[()=>JSON.stringify(u(d)==="repo"?Ee:Ut,void 0,2)]),Be(Ce,()=>u(_),le=>k(_,le)),Be(Se,()=>u(m),le=>k(m,le)),Z(s,[],qe,()=>u(d),le=>k(d,le)),Z(s,[],bt,()=>u(d),le=>k(d,le)),H(O,R)},T=O=>{var R=_r(),J=re(R);{var ee=G=>{var Ce=Qi(),L=v(re(Ce),2),te=g(L),Se=v(g(te)),ae=v(te,2);De(()=>gr(Se,"href",`https://${u(l)??""}/settings/tokens`)),Be(ae,()=>u(x),xe=>k(x,xe)),H(G,Ce)};ne(J,G=>{u(f)==="pat"&&G(ee)},!0)}H(O,R)};ne(w,O=>{u(f)==="existingApp"?O(A):O(T,!1)},!0)}H(p,b)};ne(Qt,p=>{u(f)==="newApp"?p(vn):p(_n,!1)})}var Xt=v(Qt,2);{var gn=p=>{var b=Xi(),w=v(re(b),2),A=v(g(w),6),T=g(A);T.value=T.__value="repo";var O=v(A,2),R=g(O);R.value=R.__value="org",Z(s,[],T,()=>u(d),J=>k(d,J)),Z(s,[],R,()=>u(d),J=>k(d,J)),H(p,b)};ne(Xt,p=>{u(h)==="org"&&u(f)==="newApp"&&p(gn)})}var mn=v(Xt,4),er=g(mn);{var bn=p=>{var b=es();H(p,b)},yn=p=>{var b=ts(),w=g(b);De(()=>{Fi(b,1,`alert alert-${u(F)?"success":"danger"}`),Ue(w,u(we))}),H(p,b)};ne(er,p=>{u(we)===void 0?p(bn):p(yn,!1)})}var tr=v(er,2);{var wn=p=>{var b=rs(),w=v(g(b),2),A=g(w);De(()=>Ue(A,u(l))),H(p,b)};ne(tr,p=>{u(ke).public&&u(f)==="newApp"&&p(wn)})}var rr=v(tr,2),En=g(rr),nr=v(Wt,2),kn=g(nr);De((p,b,w)=>{rr.disabled=p,Ue(En,b),gr(nr,"action",`https://${u(l)??""}/${u(h)==="org"?`organizations/${u(c)}/`:""}settings/apps/new?state=INSERT_TOKEN_HERE`),Gi(kn,w)},[()=>an(u(a),u(f),u(_),u(m),u(d),u(x),u(F)),()=>ln(u(f)),()=>JSON.stringify(u(ke))]),Z(r,[],_t,()=>u(a),p=>k(a,p)),Z(r,[],gt,()=>u(a),p=>k(a,p)),Oi("submit",Kt,fn),H(e,Bt),Rr()}Ii(is,{target:document.getElementById("app")});</script> <style rel="stylesheet" crossorigin>.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.object-fit-contain{object-fit:contain!important}.object-fit-cover{object-fit:cover!important}.object-fit-fill{object-fit:fill!important}.object-fit-scale{object-fit:scale-down!important}.object-fit-none{object-fit:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-x-visible{overflow-x:visible!important}.overflow-x-scroll{overflow-x:scroll!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-visible{overflow-y:visible!important}.overflow-y-scroll{overflow-y:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-inline-grid{display:inline-grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:var(--bs-box-shadow)!important}.shadow-sm{box-shadow:var(--bs-box-shadow-sm)!important}.shadow-lg{box-shadow:var(--bs-box-shadow-lg)!important}.shadow-none{box-shadow:none!important}.focus-ring-primary{--bs-focus-ring-color: rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-secondary{--bs-focus-ring-color: rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-success{--bs-focus-ring-color: rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity))}.focus-ring-info{--bs-focus-ring-color: rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity))}.focus-ring-warning{--bs-focus-ring-color: rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity))}.focus-ring-danger{--bs-focus-ring-color: rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity))}.focus-ring-light{--bs-focus-ring-color: rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity))}.focus-ring-dark{--bs-focus-ring-color: rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity))}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translate(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity: 1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity: 1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity: 1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity: 1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity: 1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity: 1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity: 1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity: 1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-black{--bs-border-opacity: 1;border-color:rgba(var(--bs-black-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity: 1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-primary-subtle{border-color:var(--bs-primary-border-subtle)!important}.border-secondary-subtle{border-color:var(--bs-secondary-border-subtle)!important}.border-success-subtle{border-color:var(--bs-success-border-subtle)!important}.border-info-subtle{border-color:var(--bs-info-border-subtle)!important}.border-warning-subtle{border-color:var(--bs-warning-border-subtle)!important}.border-danger-subtle{border-color:var(--bs-danger-border-subtle)!important}.border-light-subtle{border-color:var(--bs-light-border-subtle)!important}.border-dark-subtle{border-color:var(--bs-dark-border-subtle)!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.border-opacity-10{--bs-border-opacity: .1}.border-opacity-25{--bs-border-opacity: .25}.border-opacity-50{--bs-border-opacity: .5}.border-opacity-75{--bs-border-opacity: .75}.border-opacity-100{--bs-border-opacity: 1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!impo