@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.
20 lines • 165 kB
HTML
<!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>var Ln=Object.defineProperty;var _r=e=>{throw TypeError(e)};var Mn=(e,t,r)=>t in e?Ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var it=(e,t,r)=>Mn(e,typeof t!="symbol"?t+"":t,r),St=(e,t,r)=>t.has(e)||_r("Cannot "+r);var w=(e,t,r)=>(St(e,t,"read from private field"),r?r.call(e):t.get(e)),W=(e,t,r)=>t.has(e)?_r("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),K=(e,t,r,n)=>(St(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Be=(e,t,r)=>(St(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();const Dr=!1;var Lr=Array.isArray,Hn=Array.prototype.indexOf,Fn=Array.from,Rt=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Mr=Object.getOwnPropertyDescriptors,qn=Object.prototype,Gn=Array.prototype,qt=Object.getPrototypeOf,hr=Object.isExtensible;function Un(e){return e()}function Ot(e){for(var t=0;t<e.length;t++)e[t]()}function zn(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const $=2,Hr=4,_t=8,rt=16,ce=32,qe=64,Fr=128,Z=256,ot=512,I=1024,G=2048,Pe=4096,be=8192,Ge=16384,Gt=32768,Ut=65536,mr=1<<17,jn=1<<18,zt=1<<19,jt=1<<20,Pt=1<<21,Bt=1<<22,xe=1<<23,Ae=Symbol("$state"),Bn=Symbol(""),Wt=new class extends Error{constructor(){super(...arguments);it(this,"name","StaleReactionError");it(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Wn(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Vn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function $n(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Kn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Yn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Jn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Zn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const ei=1,ti=2,O=Symbol(),ri="http://www.w3.org/1999/xhtml";function qr(e){return e===this.v}function ni(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Gr(e){return!ni(e,this.v)}let ht=!1,ii=!1;function ai(){ht=!0}let D=null;function st(e){D=e}function Ur(e,t=!1,r){D={p:D,c:null,e:null,s:e,x:null,l:ht&&!t?{s:null,u:null,$:[]}:null}}function zr(e){var t=D,r=t.e;if(r!==null){t.e=null;for(var n of r)rn(n)}return D=t.p,{}}function Ue(){return!ht||D!==null&&D.l===null}const oi=new WeakMap;function si(e){var t=E;if(t===null)return y.f|=xe,e;if(t.f&Gt)Vt(e,t);else{if(!(t.f&Fr))throw!t.parent&&e instanceof Error&&jr(e),e;t.b.error(e)}}function Vt(e,t){for(;t!==null;){if(t.f&Fr)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&jr(e),e}function jr(e){const t=oi.get(e);t&&(Rt(e,"message",{value:t.message}),Rt(e,"stack",{value:t.stack}))}let lt=[];function li(){var e=lt;lt=[],Ot(e)}function It(e){lt.length===0&&queueMicrotask(li),lt.push(e)}function ui(){for(var e=E.b;e!==null&&!e.has_pending_snippet();)e=e.parent;return e===null&&Wn(),e}function $t(e){var t=$|G,r=y!==null&&y.f&$?y:null;return E===null||r!==null&&r.f&Z?t|=Z:E.f|=zt,{ctx:D,deps:null,effects:null,equals:qr,f:t,fn:e,reactions:null,rv:0,v:O,wv:0,parent:r??E,ac:null}}function fi(e,t){let r=E;r===null&&Vn();var n=r.b,i=void 0,a=Jt(O),o=null,l=!y;return Ei(()=>{try{var s=e()}catch(p){s=Promise.reject(p)}var u=()=>s;i=(o==null?void 0:o.then(u,u))??Promise.resolve(s),o=i;var c=P,v=n.pending;l&&(n.update_pending_count(1),v||c.increment());const d=(p,g=void 0)=>{o=null,v||c.activate(),g?g!==Wt&&(a.f|=xe,Lt(a,g)):(a.f&xe&&(a.f^=xe),Lt(a,p)),l&&(n.update_pending_count(-1),v||c.decrement()),Vr()};if(i.then(d,p=>d(null,p||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(s=>{function u(c){function v(){c===i?s(a):u(i)}c.then(v,v)}u(i)})}function ci(e){const t=$t(e);return t.equals=Gr,t}function Br(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Oe(t[r])}}function vi(e){for(var t=e.parent;t!==null;){if(!(t.f&$))return t;t=t.parent}return null}function Kt(e){var t,r=E;ye(vi(e));try{Br(e),t=vn(e)}finally{ye(r)}return t}function Wr(e){var t=Kt(e);if(e.equals(t)||(e.v=t,e.wv=fn()),!ze)if(he!==null)he.set(e,e.v);else{var r=(me||e.f&Z)&&e.deps!==null?Pe:I;C(e,r)}}function pi(e,t,r){const n=Ue()?$t:ci;if(t.length===0){r(e.map(n));return}var i=P,a=E,o=di(),l=ui();Promise.all(t.map(s=>fi(s))).then(s=>{i==null||i.activate(),o();try{r([...e.map(n),...s])}catch(u){a.f&Ge||Vt(u,a)}i==null||i.deactivate(),Vr()}).catch(s=>{l.error(s)})}function di(){var e=E,t=y,r=D;return function(){ye(e),oe(t),st(r)}}function Vr(){ye(null),oe(null),st(null)}const at=new Set;let P=null,he=null,gr=new Set,ut=[];function $r(){const e=ut.shift();ut.length>0&&queueMicrotask($r),e()}let $e=[],Yt=null,Ct=!1;var Xe,Me,He,de,et,tt,Se,Fe,_e,ue,Te,fe,Kr,Yr,Dt;const dt=class dt{constructor(){W(this,fe);W(this,Xe,new Map);W(this,Me,new Map);W(this,He,new Set);W(this,de,0);W(this,et,null);W(this,tt,!1);W(this,Se,[]);W(this,Fe,[]);W(this,_e,[]);W(this,ue,[]);W(this,Te,[]);it(this,"skipped_effects",new Set)}capture(t,r){w(this,Me).has(t)||w(this,Me).set(t,r),w(this,Xe).set(t,t.v)}activate(){P=this}deactivate(){P=null;for(const t of gr)if(gr.delete(t),t(),P!==null)break}neuter(){K(this,tt,!0)}flush(){$e.length>0?this.flush_effects():Be(this,fe,Dt).call(this),P===this&&(w(this,de)===0&&at.delete(this),this.deactivate())}flush_effects(){var t=Le;Ct=!0;try{var r=0;for(Sr(!0);$e.length>0;){if(r++>1e3){var n,i;_i()}Be(this,fe,Kr).call(this,$e),Ne.clear()}}finally{Ct=!1,Sr(t),Yt=null}}increment(){K(this,de,w(this,de)+1)}decrement(){if(K(this,de,w(this,de)-1),w(this,de)===0){for(const t of w(this,_e))C(t,G),ge(t);for(const t of w(this,ue))C(t,G),ge(t);for(const t of w(this,Te))C(t,G),ge(t);K(this,_e,[]),K(this,ue,[]),this.flush()}else this.deactivate()}add_callback(t){w(this,He).add(t)}settled(){return(w(this,et)??K(this,et,zn())).promise}static ensure(t=!0){if(P===null){const r=P=new dt;at.add(P),t&&dt.enqueue(()=>{P===r&&r.flush()})}return P}static enqueue(t){ut.length===0&&queueMicrotask($r),ut.unshift(t)}};Xe=new WeakMap,Me=new WeakMap,He=new WeakMap,de=new WeakMap,et=new WeakMap,tt=new WeakMap,Se=new WeakMap,Fe=new WeakMap,_e=new WeakMap,ue=new WeakMap,Te=new WeakMap,fe=new WeakSet,Kr=function(t){var a;$e=[];var r=null;if(at.size>1){r=new Map,he=new Map;for(const[o,l]of w(this,Xe))r.set(o,{v:o.v,wv:o.wv}),o.v=l;for(const o of at)if(o!==this)for(const[l,s]of w(o,Me))r.has(l)||(r.set(l,{v:l.v,wv:l.wv}),l.v=s)}for(const o of t)Be(this,fe,Yr).call(this,o);if(w(this,Se).length===0&&w(this,de)===0){var n=w(this,_e),i=w(this,ue);K(this,_e,[]),K(this,ue,[]),K(this,Te,[]),Be(this,fe,Dt).call(this),br(n),br(i),(a=w(this,et))==null||a.resolve()}else{for(const o of w(this,_e))C(o,I);for(const o of w(this,ue))C(o,I);for(const o of w(this,Te))C(o,I)}if(r){for(const[o,{v:l,wv:s}]of r)o.wv<=s&&(o.v=l);he=null}for(const o of w(this,Se))Ze(o);for(const o of w(this,Fe))Ze(o);K(this,Se,[]),K(this,Fe,[])},Yr=function(t){var c;t.f^=I;for(var r=t.first;r!==null;){var n=r.f,i=(n&(ce|qe))!==0,a=i&&(n&I)!==0,o=a||(n&be)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=I;else if(n&Hr)w(this,ue).push(r);else if(mt(r))if(n&Bt){var l=(c=r.b)!=null&&c.pending?w(this,Fe):w(this,Se);l.push(r)}else r.f&rt&&w(this,Te).push(r),Ze(r);var s=r.first;if(s!==null){r=s;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}},Dt=function(){if(!w(this,tt))for(const t of w(this,He))t();w(this,He).clear()};let ft=dt;function _i(){try{Jn()}catch(e){Vt(e,Yt)}}function br(e){var t=e.length;if(t!==0){for(var r=0;r<t;r++){var n=e[r];if(!(n.f&(Ge|be))&&mt(n)){var i=vt;if(Ze(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?on(n):n.fn=null),vt>i&&n.f&jt)break}}for(;r<t;r+=1)ge(e[r])}}function ge(e){for(var t=Yt=e;t.parent!==null;){t=t.parent;var r=t.f;if(Ct&&t===E&&r&rt)return;if(r&(qe|ce)){if(!(r&I))return;t.f^=I}}$e.push(t)}const Ne=new Map;function Jt(e,t){var r={f:0,v:e,reactions:null,equals:qr,rv:0,wv:0};return r}function pe(e,t){const r=Jt(e);return Ni(r),r}function Y(e,t=!1,r=!0){var i;const n=Jt(e);return t||(n.equals=Gr),ht&&r&&D!==null&&D.l!==null&&((i=D.l).s??(i.s=[])).push(n),n}function yr(e,t){return S(e,gt(()=>f(e))),t}function S(e,t,r=!1){y!==null&&(!ae||y.f&mr)&&Ue()&&y.f&($|rt|Bt|mr)&&!(F!=null&&F.includes(e))&&Xn();let n=r?Ke(t):t;return Lt(e,n)}function Lt(e,t){if(!e.equals(t)){var r=e.v;ze?Ne.set(e,t):Ne.set(e,r),e.v=t,ft.ensure().capture(e,r),e.f&$&&(e.f&G&&Kt(e),C(e,e.f&Z?Pe:I)),e.wv=fn(),Jr(e,G),Ue()&&E!==null&&E.f&I&&!(E.f&(ce|qe))&&(J===null?Ri([e]):J.push(e))}return t}function Tt(e){S(e,e.v+1)}function Jr(e,t){var r=e.reactions;if(r!==null)for(var n=Ue(),i=r.length,a=0;a<i;a++){var o=r[a],l=o.f;!n&&o===E||(l&G||C(o,t),l&$?Jr(o,Pe):l&G||ge(o))}}function Ke(e){if(typeof e!="object"||e===null||Ae in e)return e;const t=qt(e);if(t!==qn&&t!==Gn)return e;var r=new Map,n=Lr(e),i=pe(0),a=Re,o=l=>{if(Re===a)return l();var s=y,u=Re;oe(null),xr(a);var c=l();return oe(s),xr(u),c};return n&&r.set("length",pe(e.length)),new Proxy(e,{defineProperty(l,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Zn();var c=r.get(s);return c===void 0?c=o(()=>{var v=pe(u.value);return r.set(s,v),v}):S(c,u.value,!0),!0},deleteProperty(l,s){var u=r.get(s);if(u===void 0){if(s in l){const c=o(()=>pe(O));r.set(s,c),Tt(i)}}else S(u,O),Tt(i);return!0},get(l,s,u){var p;if(s===Ae)return e;var c=r.get(s),v=s in l;if(c===void 0&&(!v||(p=Je(l,s))!=null&&p.writable)&&(c=o(()=>{var g=Ke(v?l[s]:O),A=pe(g);return A}),r.set(s,c)),c!==void 0){var d=f(c);return d===O?void 0:d}return Reflect.get(l,s,u)},getOwnPropertyDescriptor(l,s){var u=Reflect.getOwnPropertyDescriptor(l,s);if(u&&"value"in u){var c=r.get(s);c&&(u.value=f(c))}else if(u===void 0){var v=r.get(s),d=v==null?void 0:v.v;if(v!==void 0&&d!==O)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(l,s){var d;if(s===Ae)return!0;var u=r.get(s),c=u!==void 0&&u.v!==O||Reflect.has(l,s);if(u!==void 0||E!==null&&(!c||(d=Je(l,s))!=null&&d.writable)){u===void 0&&(u=o(()=>{var p=c?Ke(l[s]):O,g=pe(p);return g}),r.set(s,u));var v=f(u);if(v===O)return!1}return c},set(l,s,u,c){var j;var v=r.get(s),d=s in l;if(n&&s==="length")for(var p=u;p<v.v;p+=1){var g=r.get(p+"");g!==void 0?S(g,O):p in l&&(g=o(()=>pe(O)),r.set(p+"",g))}if(v===void 0)(!d||(j=Je(l,s))!=null&&j.writable)&&(v=o(()=>pe(void 0)),S(v,Ke(u)),r.set(s,v));else{d=v.v!==O;var A=o(()=>Ke(u));S(v,A)}var M=Reflect.getOwnPropertyDescriptor(l,s);if(M!=null&&M.set&&M.set.call(c,u),!d){if(n&&typeof s=="string"){var U=r.get("length"),z=Number(s);Number.isInteger(z)&&z>=U.v&&S(U,z+1)}Tt(i)}return!0},ownKeys(l){f(i);var s=Reflect.ownKeys(l).filter(v=>{var d=r.get(v);return d===void 0||d.v!==O});for(var[u,c]of r)c.v!==O&&!(u in l)&&s.push(u);return s},setPrototypeOf(){Qn()}})}function wr(e){try{if(e!==null&&typeof e=="object"&&Ae in e)return e[Ae]}catch{}return e}function hi(e,t){return Object.is(wr(e),wr(t))}var Er,Zr,Qr,Xr;function mi(){if(Er===void 0){Er=window,Zr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Qr=Je(t,"firstChild").get,Xr=Je(t,"nextSibling").get,hr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),hr(r)&&(r.__t=void 0)}}function Zt(e=""){return document.createTextNode(e)}function ct(e){return Qr.call(e)}function Qt(e){return Xr.call(e)}function m(e,t){return ct(e)}function ne(e,t){{var r=ct(e);return r instanceof Comment&&r.data===""?Qt(r):r}}function h(e,t=1,r=!1){let n=e;for(;t--;)n=Qt(n);return n}function gi(){return!1}function en(e){E===null&&y===null&&Yn(),y!==null&&y.f&Z&&E===null&&Kn(),ze&&$n()}function bi(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,n=!0){var i=E;i!==null&&i.f&be&&(e|=be);var a={ctx:D,deps:null,nodes_start:null,nodes_end:null,f:e|G,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Ze(a),a.f|=Gt}catch(s){throw Oe(a),s}else t!==null&&ge(a);var o=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&zt)===0;if(!o&&n&&(i!==null&&bi(a,i),y!==null&&y.f&$)){var l=y;(l.effects??(l.effects=[])).push(a)}return a}function tn(e){const t=ve(_t,null,!1);return C(t,I),t.teardown=e,t}function kr(e){en();var t=E.f,r=!y&&(t&ce)!==0&&(t&Gt)===0;if(r){var n=D;(n.e??(n.e=[])).push(e)}else return rn(e)}function rn(e){return ve(Hr|jt,e,!1)}function yi(e){return en(),ve(_t|jt,e,!0)}function wi(e){ft.ensure();const t=ve(qe,e,!0);return(r={})=>new Promise(n=>{r.outro?sn(t,()=>{Oe(t),n(void 0)}):(Oe(t),n(void 0))})}function Ei(e){return ve(Bt|zt,e,!0)}function Xt(e,t=0){return ve(_t|t,e,!0)}function Ce(e,t=[],r=[]){pi(t,r,n=>{ve(_t,()=>e(...n.map(f)),!0)})}function ki(e,t=0){var r=ve(rt|t,e,!0);return r}function Mt(e,t=!0){return ve(ce,e,!0,t)}function nn(e){var t=e.teardown;if(t!==null){const r=ze,n=y;Tr(!0),oe(null);try{t.call(null)}finally{Tr(r),oe(n)}}}function an(e,t=!1){var i;var r=e.first;for(e.first=e.last=null;r!==null;){(i=r.ac)==null||i.abort(Wt);var n=r.next;r.f&qe?r.parent=null:Oe(r,t),r=n}}function Si(e){for(var t=e.first;t!==null;){var r=t.next;t.f&ce||Oe(t),t=r}}function Oe(e,t=!0){var r=!1;(t||e.f&jn)&&e.nodes_start!==null&&e.nodes_end!==null&&(Ti(e.nodes_start,e.nodes_end),r=!0),an(e,t&&!r),pt(e,0),C(e,Ge);var n=e.transitions;if(n!==null)for(const a of n)a.stop();nn(e);var i=e.parent;i!==null&&i.first!==null&&on(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Ti(e,t){for(;e!==null;){var r=e===t?null:Qt(e);e.remove(),e=r}}function on(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function sn(e,t){var r=[];ln(e,r,!0),xi(r,()=>{Oe(e),t&&t()})}function xi(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function ln(e,t,r){if(!(e.f&be)){if(e.f^=be,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var i=n.next,a=(n.f&Ut)!==0||(n.f&ce)!==0;ln(n,t,a?r:!1),n=i}}}function Ai(e){un(e,!0)}function un(e,t){if(e.f&be){e.f^=be,e.f&I||(C(e,G),ge(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Ut)!==0||(r.f&ce)!==0;un(r,i?t:!1),r=n}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Le=!1;function Sr(e){Le=e}let ze=!1;function Tr(e){ze=e}let y=null,ae=!1;function oe(e){y=e}let E=null;function ye(e){E=e}let F=null;function Ni(e){y!==null&&(F===null?F=[e]:F.push(e))}let H=null,V=0,J=null;function Ri(e){J=e}let vt=1,Qe=0,Re=Qe;function xr(e){Re=e}let me=!1;function fn(){return++vt}function mt(e){var v;var t=e.f;if(t&G)return!0;if(t&Pe){var r=e.deps,n=(t&Z)!==0;if(r!==null){var i,a,o=(t&ot)!==0,l=n&&E!==null&&!me,s=r.length;if((o||l)&&(E===null||!(E.f&Ge))){var u=e,c=u.parent;for(i=0;i<s;i++)a=r[i],(o||!((v=a==null?void 0:a.reactions)!=null&&v.includes(u)))&&(a.reactions??(a.reactions=[])).push(u);o&&(u.f^=ot),l&&c!==null&&!(c.f&Z)&&(u.f^=Z)}for(i=0;i<s;i++)if(a=r[i],mt(a)&&Wr(a),a.wv>e.wv)return!0}(!n||E!==null&&!me)&&C(e,I)}return!1}function cn(e,t,r=!0){var n=e.reactions;if(n!==null&&!(F!=null&&F.includes(e)))for(var i=0;i<n.length;i++){var a=n[i];a.f&$?cn(a,t,!1):t===a&&(r?C(a,G):a.f&I&&C(a,Pe),ge(a))}}function vn(e){var g;var t=H,r=V,n=J,i=y,a=me,o=F,l=D,s=ae,u=Re,c=e.f;H=null,V=0,J=null,me=(c&Z)!==0&&(ae||!Le||y===null),y=c&(ce|qe)?null:e,F=null,st(e.ctx),ae=!1,Re=++Qe,e.ac!==null&&(e.ac.abort(Wt),e.ac=null);try{e.f|=Pt;var v=(0,e.fn)(),d=e.deps;if(H!==null){var p;if(pt(e,V),d!==null&&V>0)for(d.length=V+H.length,p=0;p<H.length;p++)d[V+p]=H[p];else e.deps=d=H;if(!me||c&$&&e.reactions!==null)for(p=V;p<d.length;p++)((g=d[p]).reactions??(g.reactions=[])).push(e)}else d!==null&&V<d.length&&(pt(e,V),d.length=V);if(Ue()&&J!==null&&!ae&&d!==null&&!(e.f&($|Pe|G)))for(p=0;p<J.length;p++)cn(J[p],e);return i!==null&&i!==e&&(Qe++,J!==null&&(n===null?n=J:n.push(...J))),e.f&xe&&(e.f^=xe),v}catch(A){return si(A)}finally{e.f^=Pt,H=t,V=r,J=n,y=i,me=a,F=o,st(l),ae=s,Re=u}}function Oi(e,t){let r=t.reactions;if(r!==null){var n=Hn.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&$&&(H===null||!H.includes(t))&&(C(t,Pe),t.f&(Z|ot)||(t.f^=ot),Br(t),pt(t,0))}function pt(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Oi(e,r[n])}function Ze(e){var t=e.f;if(!(t&Ge)){C(e,I);var r=E,n=Le;E=e,Le=!0;try{t&rt?Si(e):an(e),nn(e);var i=vn(e);e.teardown=typeof i=="function"?i:null,e.wv=vt;var a;Dr&&ii&&e.f&G&&e.deps}finally{Le=n,E=r}}}function f(e){var t=e.f,r=(t&$)!==0;if(y!==null&&!ae){var n=E!==null&&(E.f&Ge)!==0;if(!n&&!(F!=null&&F.includes(e))){var i=y.deps;if(y.f&Pt)e.rv<Qe&&(e.rv=Qe,H===null&&i!==null&&i[V]===e?V++:H===null?H=[e]:(!me||!H.includes(e))&&H.push(e));else{(y.deps??(y.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[y]:a.includes(y)||a.push(y)}}}else if(r&&e.deps===null&&e.effects===null){var o=e,l=o.parent;l!==null&&!(l.f&Z)&&(o.f^=Z)}if(ze){if(Ne.has(e))return Ne.get(e);if(r){o=e;var s=o.v;return(!(o.f&I)&&o.reactions!==null||pn(o))&&(s=Kt(o)),Ne.set(o,s),s}}else if(r){if(o=e,he!=null&&he.has(o))return he.get(o);mt(o)&&Wr(o)}if(e.f&xe)throw e.v;return e.v}function pn(e){if(e.v===O)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ne.has(t)||t.f&$&&pn(t))return!0;return!1}function gt(e){var t=ae;try{return ae=!0,e()}finally{ae=t}}const Pi=-7169;function C(e,t){e.f=e.f&Pi|t}function Ii(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ae in e)Ht(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Ae in r&&Ht(r)}}}function Ht(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 n in e)try{Ht(e[n],t)}catch{}const r=qt(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Mr(r);for(let i in n){const a=n[i].get;if(a)try{a.call(e)}catch{}}}}}const Ci=["touchstart","touchmove"];function Di(e){return Ci.includes(e)}let Ar=!1;function Li(){Ar||(Ar=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function dn(e){var t=y,r=E;oe(null),ye(null);try{return e()}finally{oe(t),ye(r)}}function er(e,t,r,n=r){e.addEventListener(t,()=>dn(r));const i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),Li()}const Mi=new Set,Nr=new Set;function Hi(e,t,r,n={}){function i(a){if(n.capture||Ye.call(t,a),!a.cancelBubble)return dn(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?It(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Fi(e,t,r,n,i){var a={capture:n,passive:i},o=Hi(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&tn(()=>{t.removeEventListener(e,o,a)})}function Ye(e){var z;var t=this,r=t.ownerDocument,n=e.type,i=((z=e.composedPath)==null?void 0:z.call(e))||[],a=i[0]||e.target,o=0,l=e.__root;if(l){var s=i.indexOf(l);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(o=s)}if(a=i[o]||e.target,a!==t){Rt(e,"currentTarget",{configurable:!0,get(){return a||r}});var c=y,v=E;oe(null),ye(null);try{for(var d,p=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var A=a["__"+n];if(A!=null&&(!a.disabled||e.target===a))if(Lr(A)){var[M,...U]=A;M.apply(a,[e,...U])}else A.call(a,e)}catch(j){d?p.push(j):d=j}if(e.cancelBubble||g===t||g===null)break;a=g}if(d){for(let j of p)queueMicrotask(()=>{throw j});throw d}}finally{e.__root=t,delete e.currentTarget,oe(c),ye(v)}}}function qi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","\x3C!---->"),t.content}function Ft(e,t){var r=E;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Q(e,t){var r=(t&ei)!==0,n=(t&ti)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=qi(a?e:"<!>"+e),r||(i=ct(i)));var o=n||Zr?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=ct(o),s=o.lastChild;Ft(l,s)}else Ft(o,o);return o}}function Rr(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Zt();return e.append(t,r),Ft(t,r),e}function q(e,t){e!==null&&e.before(t)}function We(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Gi(e,t){return Ui(e,t)}const De=new Map;function Ui(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:o=!0}){mi();var l=new Set,s=v=>{for(var d=0;d<v.length;d++){var p=v[d];if(!l.has(p)){l.add(p);var g=Di(p);t.addEventListener(p,Ye,{passive:g});var A=De.get(p);A===void 0?(document.addEventListener(p,Ye,{passive:g}),De.set(p,1)):De.set(p,A+1)}}};s(Fn(Mi)),Nr.add(s);var u=void 0,c=wi(()=>{var v=r??t.appendChild(Zt());return Mt(()=>{if(a){Ur({});var d=D;d.c=a}i&&(n.$$events=i),u=e(v,n)||{},a&&zr()}),()=>{var g;for(var d of l){t.removeEventListener(d,Ye);var p=De.get(d);--p===0?(document.removeEventListener(d,Ye),De.delete(d)):De.set(d,p)}Nr.delete(s),v!==r&&((g=v.parentNode)==null||g.removeChild(v))}});return zi.set(u,c),u}let zi=new WeakMap;function ie(e,t,r=!1){var n=e,i=null,a=null,o=O,l=r?Ut:0,s=!1;const u=(p,g=!0)=>{s=!0,d(g,p)};var c=null;function v(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var p=o?i:a,g=o?a:i;p&&Ai(p),g&&sn(g,()=>{o?a=null:i=null})}const d=(p,g)=>{if(o!==(o=p)){var A=gi(),M=n;if(A&&(c=document.createDocumentFragment(),c.append(M=Zt())),o?i??(i=g&&Mt(()=>g(M))):a??(a=g&&Mt(()=>g(M))),A){var U=P,z=o?i:a,j=o?a:i;z&&U.skipped_effects.delete(z),j&&U.skipped_effects.add(j),U.add_callback(v)}else v()}};ki(()=>{s=!1,t(u),s||d(null,null)},l)}function ji(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function Bi(e,t,r,n,i,a){var o=e.__className;if(o!==r||o===void 0){var l=ji(r);l==null?e.removeAttribute("class"):e.className=l,e.__className=r}return a}const Wi=Symbol("is custom element"),Vi=Symbol("is html");function $i(e,t){var r=_n(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function Or(e,t,r,n){var i=_n(e);i[t]!==(i[t]=r)&&(t==="loading"&&(e[Bn]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ki(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function _n(e){return e.__attributes??(e.__attributes={[Wi]:e.nodeName.includes("-"),[Vi]:e.namespaceURI===ri})}var Pr=new Map;function Ki(e){var t=Pr.get(e.nodeName);if(t)return t;Pr.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=Mr(n);for(var a in r)r[a].set&&t.push(a);n=qt(n)}return t}function Ve(e,t,r=t){var n=Ue(),i=new WeakSet;er(e,"input",a=>{var o=a?e.defaultValue:e.value;if(o=At(e)?Nt(o):o,r(o),P!==null&&i.add(P),n&&o!==(o=t())){var l=e.selectionStart,s=e.selectionEnd;e.value=o??"",s!==null&&(e.selectionStart=l,e.selectionEnd=Math.min(s,e.value.length))}}),gt(t)==null&&e.value&&(r(At(e)?Nt(e.value):e.value),P!==null&&i.add(P)),Xt(()=>{var a=t();e===document.activeElement&&i.has(P)||At(e)&&a===Nt(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}const xt=new Set;function ee(e,t,r,n,i=n){var a=r.getAttribute("type")==="checkbox",o=e;if(t!==null)for(var l of t)o=o[l]??(o[l]=[]);o.push(r),er(r,"change",()=>{var s=r.__value;a&&(s=Ji(o,s,r.checked)),i(s)},()=>i(a?[]:null)),Xt(()=>{var s=n();a?(s=s||[],r.checked=s.includes(r.__value)):r.checked=hi(r.__value,s)}),tn(()=>{var s=o.indexOf(r);s!==-1&&o.splice(s,1)}),xt.has(o)||(xt.add(o),It(()=>{o.sort((s,u)=>s.compareDocumentPosition(u)===4?-1:1),xt.delete(o)})),It(()=>{})}function Yi(e,t,r=t){er(e,"change",n=>{var i=n?e.defaultChecked:e.checked;r(i)}),gt(t)==null&&r(e.checked),Xt(()=>{var n=t();e.checked=!!n})}function Ji(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function At(e){var t=e.type;return t==="number"||t==="range"}function Nt(e){return e===""?null:+e}function Zi(e=!1){const t=D,r=t.l.u;if(!r)return;let n=()=>Ii(t.s);if(e){let i=0,a={};const o=$t(()=>{let l=!1;const s=t.s;for(const u in s)s[u]!==a[u]&&(a[u]=s[u],l=!0);return l&&i++,i});n=()=>f(o)}r.b.length&&yi(()=>{Ir(t,n),Ot(r.b)}),kr(()=>{const i=gt(()=>r.m.map(Un));return()=>{for(const a of i)typeof a=="function"&&a()}}),r.a.length&&kr(()=>{Ir(t,n),Ot(r.a)})}function Ir(e,t){if(e.l.s)for(const r of e.l.s)f(r);t()}const Qi="5";var Cr;typeof window<"u"&&((Cr=window.__svelte??(window.__svelte={})).v??(Cr.v=new Set)).add(Qi);ai();var Xi=Q('<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),ea=Q(`<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),ta=Q(`<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),ra=Q('<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),na=Q(`<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),ia=Q(`<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),aa=Q(`<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),oa=Q(`<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> <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>Registering runners on organization level means any repository can use them, even if the app wasn't
installed on those repositories.</li> <li>Do not use organization level registration if you don't fully trust all repositories in your organization.</li> <li>Use organization level to reduce the permission scope this new app is given.</li> <li>When in doubt, use the default repository level registration.</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),sa=Q("<p>This button will be enabled once all the questions above are answered.</p>"),la=Q('<div role="alert"> </div>'),ua=Q(`<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>`),fa=Q(`<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 ca(e,t){Ur(t,!1);const r=[],n=[],i=[],a=[],o="INSERT_TOKEN_HERE";let l=Y(),s=Y("INSERT_DOMAIN_HERE"),u=Y(),c=Y("user"),v=Y("repo"),d=Y("ORGANIZATION"),p=Y(""),g=Y(""),A=Y(""),M=Y(),U=Y();const z={actions:"write",administration:"write",deployments:"read"},j={actions:"write",organization_self_hosted_runners:"write",deployments:"read"},we=Y({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:z,default_events:["workflow_job"]});function hn(_,b,k,T,x,R,N){return N||_===void 0||b===void 0?!0:b==="newApp"?!1:b==="existingApp"?k===""||T===""||x===void 0:b==="pat"?R==="":(console.error("Something is broken",_,b,k),!0)}function mn(_){return _==="newApp"?"Create GitHub App":"Setup"}function bt(_,b){return new Promise((k,T)=>{fetch(`${_}?token=${o}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(b),redirect:"error"}).then(x=>{x.ok?x.text().then(k).catch(T):x.text().then(R=>{T(new Error(`${R} [${x.status}]`))}).catch(T)}).catch(T)})}function gn(_){_.preventDefault();function b(){const k=f(l)==="ghes"?f(s):"github.com";switch(yr(we,f(we).default_permissions=f(v)==="repo"?z:j),f(u)){case"newApp":return bt("domain",{domain:k,runnerLevel:f(v)}).then(T=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return bt("app",{appid:f(p),pk:f(g),domain:k,runnerLevel:f(v)});case"pat":return bt("pat",{pat:f(A),domain:k})}}b().then(k=>{S(U,k),S(M,!0)}).catch(k=>{S(U,`${k}`),S(M,!1)})}Zi();var tr=fa(),rr=m(tr),bn=m(rr),nr=m(bn),ir=h(m(nr),2),yn=h(m(ir));yn.textContent="INSERT_SECRET_ARN_HERE";var ar=h(ir,4),or=h(m(ar),2),yt=m(or);yt.value=yt.__value="github.com";var wn=h(or,2),wt=m(wn);wt.value=wt.__value="ghes";var sr=h(ar,2);{var En=_=>{var b=Xi(),k=h(ne(b),2),T=h(m(k),2);Ve(T,()=>f(s),x=>S(s,x)),q(_,b)};ie(sr,_=>{f(l)==="ghes"&&_(En)})}var lr=h(sr,2);{var kn=_=>{var b=ea(),k=h(ne(b),2),T=h(m(k),2),x=m(T);x.value=x.__value="newApp";var R=h(T,2),N=m(R);N.value=N.__value="existingApp";var X=h(R,2),te=m(X);te.value=te.__value="pat",ee(n,[],x,()=>f(u),B=>S(u,B)),ee(n,[],N,()=>f(u),B=>S(u,B)),ee(n,[],te,()=>f(u),B=>S(u,B)),q(_,b)};ie(lr,_=>{f(l)&&_(kn)})}var ur=h(lr,2);{var Sn=_=>{var b=na(),k=h(ne(b),2),T=h(m(k),2),x=m(T);x.value=x.__value="user";var R=h(T,2),N=m(R);N.value=N.__value="org";var X=h(R,2);{var te=L=>{var re=ta(),Ee=h(ne(re),2),se=m(Ee);Yi(se,()=>f(we).public,ke=>yr(we,f(we).public=ke)),q(L,re)};ie(X,L=>{f(l)==="ghes"&&L(te)})}var B=h(k,2);{var Ie=L=>{var re=ra(),Ee=h(ne(re),2),se=m(Ee),ke=h(m(se)),nt=m(ke),je=h(se,2);Ce(()=>We(nt,`https://${f(s)??""}/MyOrg/my-repo`)),Ve(je,()=>f(d),Et=>S(d,Et)),q(L,re)};ie(B,L=>{f(c)==="org"&&L(Ie)})}ee(i,[],x,()=>f(c),L=>S(c,L)),ee(i,[],N,()=>f(c),L=>S(c,L)),q(_,b)},Tn=_=>{var b=Rr(),k=ne(b);{var T=R=>{var N=ia(),X=h(ne(N),2),te=m(X),B=h(m(te),2),Ie=m(B),L=h(te,2),re=h(m(L),2),Ee=m(re),se=h(L,2),ke=h(m(se),2),nt=m(ke),je=m(nt);je.value=je.__value="repo";var Et=h(nt,2),kt=m(Et);kt.value=kt.__value="org";var Cn=h(se,6),Dn=m(Cn);Ce(le=>We(Dn,le),[()=>JSON.stringify(f(v)==="repo"?z:j,void 0,2)]),Ve(Ie,()=>f(p),le=>S(p,le)),Ve(Ee,()=>f(g),le=>S(g,le)),ee(a,[],je,()=>f(v),le=>S(v,le)),ee(a,[],kt,()=>f(v),le=>S(v,le)),q(R,N)},x=R=>{var N=Rr(),X=ne(N);{var te=B=>{var Ie=aa(),L=h(ne(Ie),2),re=m(L),Ee=h(m(re)),se=h(re,2);Ce(()=>Or(Ee,"href",`https://${f(s)??""}/settings/tokens`)),Ve(se,()=>f(A),ke=>S(A,ke)),q(B,Ie)};ie(X,B=>{f(u)==="pat"&&B(te)},!0)}q(R,N)};ie(k,R=>{f(u)==="existingApp"?R(T):R(x,!1)},!0)}q(_,b)};ie(ur,_=>{f(u)==="newApp"?_(Sn):_(Tn,!1)})}var fr=h(ur,2);{var xn=_=>{var b=oa(),k=h(ne(b),2),T=h(m(k),4),x=m(T);x.value=x.__value="repo";var R=h(T,2),N=m(R);N.value=N.__value="org",ee(a,[],x,()=>f(v),X=>S(v,X)),ee(a,[],N,()=>f(v),X=>S(v,X)),q(_,b)};ie(fr,_=>{f(c)==="org"&&f(u)==="newApp"&&_(xn)})}var An=h(fr,4),cr=m(An);{var Nn=_=>{var b=sa();q(_,b)},Rn=_=>{var b=la(),k=m(b);Ce(()=>{Bi(b,1,`alert alert-${f(M)?"success":"danger"}`),We(k,f(U))}),q(_,b)};ie(cr,_=>{f(U)===void 0?_(Nn):_(Rn,!1)})}var vr=h(cr,2);{var On=_=>{var b=ua(),k=h(m(b),2),T=m(k);Ce(()=>We(T,f(s))),q(_,b)};ie(vr,_=>{f(we).public&&f(u)==="newApp"&&_(On)})}var pr=h(vr,2),Pn=m(pr),dr=h(rr,2),In=m(dr);Ce((_,b,k)=>{pr.disabled=_,We(Pn,b),Or(dr,"action",`https://${f(s)??""}/${f(c)==="org"?`organizations/${f(d)}/`:""}settings/apps/new?state=INSERT_TOKEN_HERE`),$i(In,k)},[()=>hn(f(l),f(u),f(p),f(g),f(v),f(A),f(M)),()=>mn(f(u)),()=>JSON.stringify(f(we))]),ee(r,[],yt,()=>f(l),_=>S(l,_)),ee(r,[],wt,()=>f(l),_=>S(l,_)),Fi("submit",nr,gn),q(e,tr),zr()}Gi(ca,{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%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1