performance.mark("js-parse-end:4916-50f2539dc1c5e1ee.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["4916"],{34019(e,t,s){s.d(t,{Cb:()=>b,FQ:()=>f,Hh:()=>w,JB:()=>g,Ku:()=>h,Pg:()=>$,UG:()=>y,Ym:()=>d,fn:()=>O,iI:()=>p,j0:()=>n,mM:()=>m,q5:()=>k,y_:()=>c});var l=s(16522),a=s(66743),i=s(23666),u=s(88015),r=s(11515);let n="The name of this space is too close to another existing space. Please modify the name and try again.",h="https://github.com/mcp/io.github.github/github-mcp-server",v="[a-zA-Z0-9-_]+",o="[0-9]+";function b(e){let{id:t,owner:s}=e;return`${r.VR}/${s}/${t}`}function c(){let e,t=(0,l.c)(2),s=(0,u.zy)().pathname;if(t[0]!==s)e=s===r.VR||s===`${r.VR}/`,t[0]=s,t[1]=e;else e=t[1];return e}function f(e){let t,s=(0,l.c)(3),a=void 0!==e&&e,i=(0,u.zy)().pathname;return s[0]!==a||s[1]!==i?(t=function(e,t=!1){let s=`${r.VR}/${v}/${o}`,l=RegExp(`^${s}${t?"(/edit)?":""}$`);return!!e.match(l)}(i,a),s[0]=a,s[1]=i,s[2]=t):t=s[2],t}function m(){let e=c(),t=f();return e||t}function p(){let e,t=(0,l.c)(5),s=(0,u.zy)().pathname;e:{let l;t[0]!==s?(l=s.match(RegExp(`${r.VR}/(${v})/(${o})`)),t[0]=s,t[1]=l):l=t[1];let a=l;if(a){let[,s,l]=a;if(s&&l){let a=parseInt(l,10);if(!isNaN(a)){let l;t[2]!==a||t[3]!==s?(l={id:a,owner:s},t[2]=a,t[3]=s,t[4]=l):l=t[4],e=l;break e}}}e=null}return e}function d(e,t){return e===t||null!==e&&null!==t&&e.id===t.id&&e.owner===t.owner}function y(e,t){return e.id===t.id&&e.owner===t.owner}function g(e,t){if(t)return e?.find(e=>y(e,t))}function O(e){return e?`${r.VR}/${e.owner}/${e.id}`:r.VR}function w(e){return(e?.sizePercentage??0)>100}function k(e){let t=e.filePath.split("/"),s=t.pop(),l=[e.nwo,...t].join("/"),a=e.nwo.split("/"),u=e.sha;return{filePath:l,fileName:s,fileUrl:e.fileExists&&e.sha?(0,i.IO9)({repo:{ownerLogin:a[0],name:a[1]},commitish:e.sha,action:"blob",path:e.filePath}):void 0,sha:u}}function $(e,t){let s={...e.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{}),source:t};(0,a.BI)("copilot-spaces.resources-added",s)}},13589(e,t,s){s.d(t,{Es:()=>u,Lj:()=>a,yy:()=>i});class l{#e=new Set;subscribe(e){return this.#e.add(e),()=>{this.#e.delete(e)}}notify(e){for(let t of this.#e)t(e)}}class a extends l{#t;constructor(e){super(),this.#t=e}get value(){return this.#t}set value(e){var t,s;t=this.#t,("object"==typeof(s=e)&&s&&"object"==typeof t&&t?function(e,t){for(let s of new Set(Object.keys(e).concat(Object.keys(t))))if(!Object.is(e[s],t[s]))return!0;return!1}(t,s):!Object.is(t,s))&&(this.#t=e,this.notify(e))}setValue(e){this.value=e}}class i extends l{#t;#s=new Map;constructor(...e){super(),this.#t=new Set(...e)}get value(){return this.#t}has(e){if(!this.#s.has(e)){let t=new a(this.#t.has(e));this.#s.set(e,t)}return this.#s.get(e)}add(e){this.#t.has(e)||(this.#t.add(e),this.#s.has(e)&&(this.#s.get(e).value=!0),this.notify(this.#t))}delete(e){this.#t.has(e)&&(this.#t.delete(e),this.#s.has(e)&&(this.#s.get(e).value=!1),this.notify(this.#t))}clear(){if(0!==this.#t.size){for(let e of(this.#t.clear(),this.#s.values()))e.value=!1;this.notify(this.#t)}}}class u extends l{#t;#l=new Map;#a=new Map;constructor(...e){super(),this.#t=new Map(...e)}get value(){return this.#t}has(e){if(!this.#l.has(e)){let t=new a(this.#t.has(e));this.#l.set(e,t)}return this.#l.get(e)}get(e){if(!this.#a.has(e)){let t=new a(this.#t.get(e));this.#a.set(e,t)}return this.#a.get(e)}set(e,t){this.#t.get(e)!==t&&(this.#t.set(e,t),this.#l.has(e)&&(this.#l.get(e).value=!0),this.#a.has(e)&&(this.#a.get(e).value=t),this.notify(this.#t))}delete(e){this.#t.has(e)&&(this.#t.delete(e),this.#l.has(e)&&(this.#l.get(e).value=!1),this.#a.has(e)&&(this.#a.get(e).value=void 0),this.notify(this.#t))}clear(){if(0!==this.#t.size){for(let e of(this.#t.clear(),this.#l.values()))e.value=!1;for(let e of this.#a.values())e.value=void 0;this.notify(this.#t)}}}},13865(e,t,s){s.d(t,{AI:()=>u,HN:()=>o,R:()=>n,Rs:()=>v,Sk:()=>f,XG:()=>r,tQ:()=>b});var l=s(16522),a=s(96540),i=s(13589);function u(e){let t,s=(0,l.c)(2);s[0]!==e?(t=()=>new i.Lj(e),s[0]=e,s[1]=t):t=s[1];let[u]=(0,a.useState)(t);return u}function r(e){let t,s,u=(0,l.c)(4),r=(0,a.useRef)(null);if(null===r.current){let t;u[0]!==e?(t=new i.Lj(e),u[0]=e,u[1]=t):t=u[1],r.current=t}u[2]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{null!==r.current&&(r.current.value=e)},u[2]=t):t=u[2];let n=t;return u[3]===Symbol.for("react.memo_cache_sentinel")?(s=[r,n],u[3]=s):s=u[3],s}function n(...e){let t,s=(0,l.c)(2);s[0]!==e?(t=()=>new i.Es(...e),s[0]=e,s[1]=t):t=s[1];let[u]=(0,a.useState)(t);return u}let h=Symbol("no value");function v(e,t){let s,i,u=(0,l.c)(5),r=(0,a.useRef)(e.value),n=(0,a.useEffectEvent)(t);u[0]!==n||u[1]!==e?(s=()=>(r.current!==h&&r.current!==e.value&&(n(e.value),r.current=h),e.subscribe(e=>n(e))),u[0]=n,u[1]=e,u[2]=s):s=u[2],u[3]!==e?(i=[e],u[3]=e,u[4]=i):i=u[4],(0,a.useEffect)(s,i)}function o(e){let t,s=(0,l.c)(1),[i,u]=(0,a.useState)(e.value);return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>u(e),s[0]=t):t=s[0],v(e,t),i}function b(e){let t,s=(0,l.c)(2),[i,u]=(0,a.useState)(e.value),[,r]=(0,a.useReducer)(c,0);return s[0]!==r?(t=e=>{u(e),r()},s[0]=r,s[1]=t):t=s[1],v(e,t),i}function c(e){return e+1}function f(e,t){let s=u(t(e.value));return v(e,e=>{s.value=t(e)}),s}}}]); //# sourceMappingURL=4916-50f2539dc1c5e1ee-ca4aba9021d3bde3.js.map