docker-client-mx 1.37.1 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docker-desktop-mx/browser/chunk-0lzDD7VN.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CRsWWmSK.js → chunk-AYiAyx6i.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-B-3JRBZY.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-DO4UNcFG.js → chunk-BWEbjl8i.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-BgPEkm-o.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-D0yJpook.js → chunk-Bg_b-Jjw.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-BhIIfV1H.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-USWqj2oG.js → chunk-Bo6U-hOl.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-ARerY_u8.js → chunk-BoHvB94t.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-C5GyUjf6.js → chunk-BpGvpxhZ.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-BuLmfnYb2.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-DoJ0-JEW.js → chunk-BxCMq76L.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-C5DLS5H5.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-CAMD3gZz.js +3 -0
- package/dist/docker-desktop-mx/browser/chunk-CEIzuD8m.js +5 -0
- package/dist/docker-desktop-mx/browser/chunk-CFdB_rJ_.js +6 -0
- package/dist/docker-desktop-mx/browser/{chunk-d9EuDpHJ.js → chunk-CG34bAfY.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DoVE0m-M.js → chunk-CGtoxp5M.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-CW5lS8he.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-C_5f0tVq.js +4 -0
- package/dist/docker-desktop-mx/browser/chunk-C_ouaGQt.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-CpkVTYEc.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-Bd4WPFll.js → chunk-Cz39jf9o.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BwYNpJJ1.js → chunk-D1Z6IQ-O.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-A5wKOcG7.js → chunk-D2Fy6Fo8.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DDNJaJAt2.js +2 -0
- package/dist/docker-desktop-mx/browser/{chunk-Ce9HPQaw.js → chunk-DfetwWmp.js} +2 -2
- package/dist/docker-desktop-mx/browser/{chunk-CSf-WGgq.js → chunk-Dh_teJNw.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BiwCCNsK.js → chunk-DieHqkfe.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DnACbmqU.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-DtDLpTQP.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CUfTRCjA.js → chunk-Dw1WSpzf.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Dc53d1I5.js → chunk-DzQ3NZEw.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BrDsQn6L.js → chunk-PF0v2lXq.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-S9IeOMe4.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-sLP6RSjc.js → chunk-VLH5Jka4.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-cblD6gvc.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CzxPdR3J.js → chunk-nJjV_Xqa.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-zFBXm_xf2.js +1 -0
- package/dist/docker-desktop-mx/browser/index.html +2 -2
- package/dist/docker-desktop-mx/browser/main-ER3MV5C2.js +1 -0
- package/dist/docker-desktop-mx/browser/styles-PTUPDI7O.css +1 -0
- package/dist-electron/attention.js +22 -2
- package/dist-electron/attention.js.map +1 -1
- package/dist-electron/channels.js +4 -0
- package/dist-electron/channels.js.map +1 -1
- package/dist-electron/compose-drift.js +80 -0
- package/dist-electron/compose-drift.js.map +1 -0
- package/dist-electron/containers.js +3 -0
- package/dist-electron/containers.js.map +1 -1
- package/dist-electron/ipc.js +25 -3
- package/dist-electron/ipc.js.map +1 -1
- package/dist-electron/main.js +49 -0
- package/dist-electron/main.js.map +1 -1
- package/dist-electron/preload.js +9 -1
- package/dist-electron/preload.js.map +1 -1
- package/dist-electron/project-update.js +120 -0
- package/dist-electron/project-update.js.map +1 -0
- package/dist-electron/run-command.js +104 -1
- package/dist-electron/run-command.js.map +1 -1
- package/dist-electron/tray-menu.js +84 -0
- package/dist-electron/tray-menu.js.map +1 -0
- package/package.json +1 -1
- package/dist/docker-desktop-mx/browser/chunk-B2cyL9jQ.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BD9SGPlI.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BTUpw4iP.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BU6WXUxF.js +0 -4
- package/dist/docker-desktop-mx/browser/chunk-B_LO2qP5.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BrBZ51IY.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-C0CE-ryM.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-C218KaAr.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-CKZAnwkz.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-CN_jXmBu.js +0 -4
- package/dist/docker-desktop-mx/browser/chunk-CuB3SKfL.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-DO0iZtCc.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-DmLR4vjP.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-ai7J7l7m.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-d2Mr7W8C.js +0 -2
- package/dist/docker-desktop-mx/browser/chunk-wHjVeoVE.js +0 -1
- package/dist/docker-desktop-mx/browser/main-QH6OTQO6.js +0 -1
- package/dist/docker-desktop-mx/browser/styles-QQZVKMBI.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as LE,G as M,Lt as Ws,Nt as Vr,P as Iw,R as Kr,et as OI,ft as Rc,hn as ge$1,ht as S,ln as f,n as $e,nn as br,nt as PE,t as $I,u as C$1,w as Gi,yt as Se$1,zt as X}from"./chunk-C_5f0tVq.js";function T(){return te}function ge(e){te??=e}var te;var $;var O;var ne;var U=f(()=>{Kr();Kr();te=null;$=class{},O=(()=>{class e{historyGo(t){throw new Error(``)}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>C$1(ne),providedIn:`platform`})}return e})(),ne=(()=>{class e extends O{_location;_history;_doc=C$1(br);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return T().getBaseHref(this._doc)}onPopState(t){let n=T().getGlobalEventTarget(this._doc,`window`);return n.addEventListener(`popstate`,t,!1),()=>n.removeEventListener(`popstate`,t)}onHashChange(t){let n=T().getGlobalEventTarget(this._doc,`window`);return n.addEventListener(`hashchange`,t,!1),()=>n.removeEventListener(`hashchange`,t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>new e,providedIn:`platform`})}return e})()});function se(e,i){return e?i?e.endsWith(`/`)?i.startsWith(`/`)?e+i.slice(1):e+i:i.startsWith(`/`)?e+i:`${e}/${i}`:e:i}function ie(e){let i=e.search(/#|\?|$/);return e[i-1]===`/`?e.slice(0,i-1)+e.slice(i):e}function C(e){return e&&e[0]!==`?`?`?${e}`:e}function me(){return new oe($e(R))}function Ce(e,i){if(!e||!i.startsWith(e))return i;let t=i.substring(e.length);return t===``||[`/`,`;`,`?`,`#`].includes(t[0])?t:i}function re(e){return e.replace(/\/index\.html$/,``)}function ye(e){if(new RegExp(`^(https?:)?//`).test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}var R;var De;var pe;var oe;var ae=f(()=>{Kr();Kr();Ws();U();R=(()=>{class e{historyGo(t){throw new Error(``)}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>C$1(pe),providedIn:`root`})}return e})(),De=new M(``),pe=(()=>{class e extends R{_platformLocation;_baseHref;_removeListenerFns=[];constructor(t,n){super(),this._platformLocation=t,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??C$1(br).location?.origin??``}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return se(this._baseHref,t)}path(t=!1){let n=this._platformLocation.pathname+C(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){let o=this.prepareExternalUrl(r+C(s));this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){let o=this.prepareExternalUrl(r+C(s));this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static ɵfac=function(n){return new(n||e)($e(O),$e(De,8))};static ɵprov=X({token:e,factory:e.ɵfac,providedIn:`root`})}return e})(),oe=(()=>{class e{_subject=new ge$1;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(t){this._locationStrategy=t;let n=this._locationStrategy.getBaseHref();this._basePath=ye(ie(re(n))),this._locationStrategy.onPopState(r=>{let s={url:this.path(!0),pop:!0,state:r.state,type:r.type};r.hasUAVisualTransition&&(s.hasUAVisualTransition=!0),this._subject.next(s)})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=``){return this.path()==this.normalize(t+C(n))}normalize(t){return e.stripTrailingSlash(Ce(this._basePath,re(t)))}prepareExternalUrl(t){return t&&t[0]!==`/`&&(t=`/`+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n=``,r=null){this._locationStrategy.pushState(r,``,t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+C(n)),r)}replaceState(t,n=``,r=null){this._locationStrategy.replaceState(r,``,t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+C(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t=``,n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n??void 0,complete:r??void 0})}static normalizeQueryParams=C;static joinWithSlash=se;static stripTrailingSlash=ie;static ɵfac=function(n){return new(n||e)($e(R))};static ɵprov=X({token:e,factory:()=>me(),providedIn:`root`})}return e})()});function A(e,i){let t=LE(e),n=t[PE.NumberSymbols][i];if(typeof n>`u`){if(i===h.CurrencyDecimal)return t[PE.NumberSymbols][h.Decimal];if(i===h.CurrencyGroup)return t[PE.NumberSymbols][h.Group]}return n}function ce(e,i){return LE(e)[PE.NumberFormats][i]}function Ae(e,i,t,n,r,s,o=!1){let u=``,D=!1;if(!isFinite(e))u=A(t,Number.isNaN(e)?h.NaN:h.Infinity);else{let d=ve(e);o&&(d=_e(d));let l=i.minInt,a=i.minFrac,f=i.maxFrac;if(s){let w=s.match(Fe);if(w===null)throw new S(2306,!1);let H=w[1],B=w[3],W=w[5];H!=null&&(l=z(H)),B!=null&&(a=z(B)),W!=null?f=z(W):B!=null&&a>f&&(f=a);let N=100;if(l>N||a>N||f>N)throw new S(2306,!1)}be(d,a,f);let c=d.digits,g=d.integerLen,G=d.exponent,I=[];for(D=c.every(w=>!w);g<l;g++)c.unshift(0);for(;g<0;g++)c.unshift(0);g>0?I=c.splice(g,c.length):(I=c,c=[0]);let L=[];for(c.length>=i.lgSize&&L.unshift(c.splice(-i.lgSize,c.length).join(``));c.length>i.gSize;)L.unshift(c.splice(-i.gSize,c.length).join(``));c.length&&L.unshift(c.join(``)),u=L.join(A(t,n)),I.length&&(u+=A(t,r)+I.join(``)),G&&(u+=A(t,h.Exponential)+`+`+G)}return e<0&&!D?u=i.negPre+u+i.negSuf:u=i.posPre+u+i.posSuf,u}function de(e,i,t){return Ae(e,Se(ce(i,V.Decimal),A(i,h.MinusSign)),i,h.Group,h.Decimal,t)}function Se(e,i=`-`){let t={minInt:1,minFrac:0,maxFrac:0,posPre:``,posSuf:``,negPre:``,negSuf:``,gSize:0,lgSize:0},n=e.split(Ee),r=n[0],s=n[1],o=r.indexOf(P)!==-1?r.split(P):[r.substring(0,r.lastIndexOf(b)+1),r.substring(r.lastIndexOf(b)+1)],u=o[0],D=o[1]||``;t.posPre=u.substring(0,u.indexOf(j));for(let l=0;l<D.length;l++){let a=D.charAt(l);a===b?t.minFrac=t.maxFrac=l+1:a===j?t.maxFrac=l+1:t.posSuf+=a}let d=u.split(we);if(t.gSize=d[1]?d[1].length:0,t.lgSize=d[2]||d[1]?(d[2]||d[1]).length:0,s){let l=r.length-t.posPre.length-t.posSuf.length,a=s.indexOf(j);t.negPre=s.substring(0,a).replace(/'/g,``),t.negSuf=s.slice(a+l).replace(/'/g,``)}else t.negPre=i+t.posPre,t.negSuf=t.posSuf;return t}function _e(e){if(e.digits[0]===0)return e;let i=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(i===0?e.digits.push(0,0):i===1&&e.digits.push(0),e.integerLen+=2),e}function ve(e){let i=Math.abs(e)+``,t=0,n,r,s,o,u;for((r=i.indexOf(P))>-1&&(i=i.replace(P,``)),(s=i.search(/e/i))>0?(r<0&&(r=s),r+=+i.slice(s+1),i=i.substring(0,s)):r<0&&(r=i.length),s=0;i.charAt(s)===b;s++);if(s===(u=i.length))n=[0],r=1;else{for(u--;i.charAt(u)===b;)u--;for(r-=s,n=[],o=0;s<=u;s++,o++)n[o]=Number(i.charAt(s))}return r>ue&&(n=n.splice(0,ue-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function be(e,i,t){if(i>t)throw new S(2307,!1);let n=e.digits,r=n.length-e.integerLen,s=Math.min(Math.max(i,r),t),o=s+e.integerLen,u=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let a=o;a<n.length;a++)n[a]=0}else{r=Math.max(0,r),e.integerLen=1,n.length=Math.max(1,o=s+1),n[0]=0;for(let a=1;a<o;a++)n[a]=0}if(u>=5)if(o-1<0){for(let a=0;a>o;a--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;r<Math.max(0,s);r++)n.push(0);let D=s!==0,d=i+e.integerLen,l=n.reduceRight(function(a,f,c,g){return f=f+a,g[c]=f<10?f:f-10,D&&(g[c]===0&&c>=d?g.pop():D=!1),f>=10?1:0},0);l&&(n.unshift(l),e.integerLen++)}function z(e){let i=parseInt(e);if(isNaN(i))throw new S(2305,!1);return i}function Le(e,i){return new S(2100,!1)}function Te(e){return!(e==null||e===``||e!==e)}function Oe(e){if(typeof e==`string`&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!=`number`)throw new S(2309,!1);return e}var V;var h;var Fe;var ue;var P;var b;var Ee;var we;var j;var Ie;var Me;var le=f(()=>{Kr();Kr();V=(function(e){return e[e.Decimal=0]=`Decimal`,e[e.Percent=1]=`Percent`,e[e.Currency=2]=`Currency`,e[e.Scientific=3]=`Scientific`,e})(V||{}),h={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};Fe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ue=22,P=`.`,b=`0`,Ee=`;`,we=`,`,j=`#`;Ie=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C$1(Se$1);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static ɵfac=function(n){return new(n||e)(Vr(Gi))};static ɵdir=$I({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Iw]})}return e})();Me=(()=>{class e{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!Te(t))return null;r||=this._locale;try{return de(Oe(t),r,n)}catch(s){throw Le(e,s.message)}}static ɵfac=function(n){return new(n||e)(Vr(Rc,16))};static ɵpipe=OI({name:`number`,type:e,pure:!0})}return e})()});function Re(e,i){i=encodeURIComponent(i);for(let t of e.split(`;`)){let n=t.indexOf(`=`),[r,s]=n==-1?[t,``]:[t.slice(0,n),t.slice(n+1)];if(r.trim()!==i)continue;let o=s;try{o=decodeURIComponent(s)}catch{}return o.length>1&&o[0]===`"`&&o[o.length-1]===`"`&&(o=o.slice(1,-1)),o}return null}var fe=f(()=>{});function $n(e){return e===Be}var Be;var Ne=f(()=>{ae();le();U();Kr();fe();Be=`browser`});export{Me as a,Re as c,oe as d,Ie as i,T as l,$n as n,Ne as o,Be as r,R as s,$ as t,ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mn as lk,R as Kr,Vn as ok,W as Lt,_r as wt,er as sk,ln as f$1,lr as ve,sn as eH,u as C,zt as X}from"./chunk-C_5f0tVq.js";import{n as u,t as f$2}from"./chunk-Bg_b-Jjw.js";var y;var f=f$1(()=>{Kr();lk();f$2();sk();Kr();y=class s{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);networks=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();unusedCount=Lt(()=>this.items().filter(e=>!e.builtIn&&e.connected===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`network`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.networks.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async create(e){let t;try{let r=await window.electron.networks.create(e);t=r.ok?null:r.problem}catch(r){t=eH(r)}return t===null&&(this.toast.success(ok().networks.created(e.name)),await this.refresh()),t}async remove(e){this.running.update(t=>new Set(t).add(e));try{let t=await window.electron.networks.remove(e);t.ok||this.toast.error(t.problem)}finally{this.running.update(t=>{let r=new Set(t);return r.delete(e),r})}await this.refresh()}async removeMany(e){await Promise.all(e.map(t=>this.remove(t)))}async prune(){this.busy.set(!0);try{let e=await window.electron.networks.prune();e.ok?this.toast.success(e.removed===0?ok().common.nothingToPrune:ok().networks.pruned(e.removed)):this.toast.error(e.problem)}finally{this.busy.set(!1)}await this.refresh()}static ɵfac=function(t){return new(t||s)};static ɵprov=X({token:s,factory:s.ɵfac,providedIn:`root`})}});export{y as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as Tc,Dn as kE,En as jc,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Jt as ag,O as HE,On as kc,Pn as mg,Qn as rg,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,_n as gj,_r as wt,cn as ec,er as sk,gt as SE,hr as wc,in as dk,ln as f,lr as ve,o as BE,p as Cj,r as Ac,sr as vS,tt as Od,u as C,un as fS,ur as vg,ut as RE,vt as Sc,wt as Tg,zt as X}from"./chunk-C_5f0tVq.js";import"./chunk-Bg_b-Jjw.js";import"./chunk-0lzDD7VN.js";import{n as o,t as i}from"./chunk-D1Z6IQ-O.js";import{n as p,t as M}from"./chunk-VLH5Jka4.js";import"./chunk-S9IeOMe4.js";import{n as v,t as u}from"./chunk-PF0v2lXq.js";import{r as Q,s as fe,u as ra}from"./chunk-CW5lS8he.js";import{n as P,t as K}from"./chunk-CGtoxp5M.js";import{a as T,c as j,i as H,n as B,o as U,r as G,s as V,t as $}from"./chunk-BoHvB94t.js";var de;var D;var pe=f(()=>{Kr();v();M();Kr();de=5e3,D=class i{store=C(u);project=C(p).choice(`logs.project`);buffer=wt([]);dropped=wt(!1);following=wt(!1);lines=this.buffer.asReadonly();truncated=this.dropped.asReadonly();active=this.following.asReadonly();sources=Lt(()=>this.store.containers().filter(e=>e.state===`running`).filter(e=>this.project()===null||e.composeProject===this.project()).map(e=>({containerId:e.id,containerName:e.name,composeProject:e.composeProject,composeService:e.composeService})),{equal:(e,t)=>e.length===t.length&&e.every((n,d)=>n.containerId===t[d].containerId)});constructor(){let e=C(ve);e.onDestroy(window.electron.logs.onAllLines(t=>this.append(t))),rf(()=>{let t=this.following()?this.sources():[];window.electron.logs.watchAll(t)}),e.onDestroy(()=>{window.electron.logs.watchAll([])})}attach(){this.following.set(!0)}detach(){this.following.set(!1)}clear(){this.buffer.set([]),this.dropped.set(!1)}async follow(e){e!==this.project()&&(await window.electron.logs.watchAll([]),this.clear(),this.project.set(e))}append(e){if(!this.following())return;let t=[...this.buffer(),...e];if(t.length>de){this.dropped.set(!0),this.buffer.set(t.slice(t.length-de));return}this.buffer.set(t)}static ɵfac=function(t){return new(t||i)};static ɵprov=X({token:i,factory:i.ɵfac,providedIn:`root`})}});function we(i,e){return this.trackId(e)}function Se(i,e){if(i&1&&(Li(0,`option`,37),fS(1),Nc()),i&2){let t=e.$implicit,n=HE(2);Wm(`value`,t)(`selected`,n.project()===t),ec(),pg(t)}}function Le(i,e){if(i&1){let t=RE();Li(0,`select`,35),Jm(`change`,function(d){Od(t);return Ld(HE().chooseProject(d.target.value))}),Li(1,`option`,36),fS(2),Nc(),kc(3,Se,2,3,`option`,37,Sc),Nc()}if(i&2){let t=HE();zr(`aria-label`,t.t().projectLabel),ec(),Wm(`selected`,t.project()===null),ec(),pg(t.t().allProjects),ec(),Tc(t.projects())}}function ke(i,e){if(i&1&&(Li(0,`span`,18),fS(1),Nc()),i&2){let t=HE();ec(),mg(`(`,t.sources().length-t.hidden().size,`/`,t.sources().length,`)`)}}function Pe(i,e){if(i&1){let t=RE();Li(0,`label`,38)(1,`input`,41),Jm(`change`,function(){let d=Od(t).$implicit;return Ld(HE(2).toggleSource(d.containerId))}),Nc(),Li(2,`span`,42),fS(3),Nc()()}if(i&2){let t=e.$implicit,n=HE(2);ec(),Wm(`checked`,!n.hidden().has(t.containerId)),ec(2),pg(n.labelOf(t.containerId))}}function Ee(i,e){if(i&1&&(Li(0,`p`,39),fS(1),Nc()),i&2){let t=HE(2);ec(),pg(t.t().nothingRunning)}}function Te(i,e){if(i&1){let t=RE();Li(0,`button`,43),Jm(`click`,function(){Od(t);return Ld(HE(2).showAllSources())}),fS(1),Nc()}if(i&2){let t=HE(2);ec(),Ac(` `,t.t().showAll,` `)}}function Ie(i,e){if(i&1&&(Li(0,`div`,19),kc(1,Pe,4,2,`label`,38,Ce,!1,Ee,2,1,`p`,39),SE(4,Te,2,1,`button`,40),Nc()),i&2){let t=HE();ec(),Tc(t.sources()),ec(3),kE(t.hidden().size>0?4:-1)}}function je(i,e){i&1&&(Li(0,`p`,23),fS(1),Nc()),i&2&&(ec(),pg(e))}function Me(i,e){i&1&&Gm(0,`col`,26)}function De(i,e){if(i&1&&(Li(0,`th`,30),fS(1),Nc()),i&2){let t=HE();ec(),pg(t.t().columns.time)}}function Ne(i,e){if(i&1&&(Li(0,`td`,44),fS(1),Nc()),i&2){let t=HE().$implicit;ec(),pg(t.time)}}function Re(i,e){if(i&1&&(Li(0,`tr`,32),SE(1,Ne,2,1,`td`,44),Li(2,`td`,45),fS(3),Nc(),Li(4,`td`,46),fS(5),Nc()()),i&2){let t=e.$implicit,n=HE();ec(),kE(n.showTimestamps()?1:-1),ec(),Wm(`title`,t.object),ec(),pg(t.object),ec(),nS(n.colorOf(t.level)),ec(),Ac(` `,t.text,` `)}}function Oe(i,e){if(i&1&&fS(0),i&2){let t=HE(2);Ac(` `,t.t().allFiltered(t.hiddenCount()),` `)}}function ze(i,e){if(i&1&&fS(0),i&2)Ac(` `,HE(2).t().empty,` `)}function Ve(i,e){if(i&1&&(Li(0,`tr`)(1,`td`,47),SE(2,Oe,1,1)(3,ze,1,1),Nc()()),i&2){let t=HE();ec(),zr(`colspan`,t.showTimestamps()?3:2),ec(),kE(t.hiddenCount()>0?2:3)}}function Fe(i,e){if(i&1&&(Li(0,`span`),fS(1),Nc()),i&2){let t=HE();ec(),pg(t.t().filteredOut(t.hiddenCount()))}}function Ae(i,e){if(i&1&&(Li(0,`span`,34),fS(1),Nc()),i&2){let t=HE();ec(),pg(t.t().truncated)}}var be;var Ce;var me;f(()=>{Kr();ra();o();v();V();pe();M();sk();K();dk();$();Kr();be=[`viewport`];Ce=(i,e)=>e.containerId;me=class i$1{logs=C(D);containers=C(u);preferences=C(p);viewport=gj(`viewport`);stick=!0;t=Lt(()=>ok().logs);truncated=this.logs.truncated;search=wt(``);caseSensitive=this.preferences.flag(`logs.caseSensitive`);showTimestamps=this.preferences.flag(`logs.allTimestamps`,!0);filterOpen=wt(!1);hidden=this.preferences.names(`logs.hiddenSources`);matcher=Lt(()=>j(this.search(),this.caseSensitive()));sources=Lt(()=>[...this.logs.sources()].sort((e,t)=>this.labelOf(e.containerId).localeCompare(this.labelOf(t.containerId))));levels=wt(new Set);matching=Lt(()=>{let e=this.matcher(),t=this.hidden();return this.logs.lines().filter(n=>!t.has(n.source.containerId)&&e.test(n.text)).map(n=>this.toRow(n))});levelCounts=Lt(()=>U(this.matching().map(e=>e.level)));rows=Lt(()=>{let e=this.levels();return e.size===0?this.matching():this.matching().filter(t=>H(t.level,e))});problem=Lt(()=>this.matcher().problem);hiddenCount=Lt(()=>this.logs.lines().length-this.rows().length);trackId=e=>e.id;project=this.logs.project;projects=Lt(()=>[...new Set(this.containers.containers().filter(e=>e.state===`running`&&e.composeProject!==null).map(e=>e.composeProject))].sort((e,t)=>e.localeCompare(t)));volg=jc(void 0);router=C(fe);route=C(Q);constructor(){rf(()=>{let e=this.volg();e!==void 0&&Tg(()=>{this.logs.follow(e),i(this.router,this.route,`volg`)})}),this.logs.attach(),C(ve).onDestroy(()=>this.logs.detach()),Cj(()=>{let e=this.rows().length,t=this.viewport()?.nativeElement;t===void 0||e===0||!this.stick||(t.scrollTop=t.scrollHeight)}),this.containers.refresh()}onScroll(e){let t=e.target;this.stick=t.scrollTop+t.clientHeight>=t.scrollHeight-24}colorOf(e){return e===null?`text-ink-300`:G[e]}toggleSource(e){let t=new Set(this.hidden());t.delete(e)||t.add(e),this.hidden.set(t)}chooseProject(e){this.logs.follow(e===``?null:e)}showAllSources(){this.hidden.set(new Set)}clear(){this.logs.clear()}labelOf(e){let t=this.logs.sources().find(n=>n.containerId===e);return t===void 0?e.slice(0,12):this.nameOf(t)}nameOf(e){if(e.composeProject===null)return e.containerName;let t=e.composeService??e.containerName;return this.logs.project()===null?`${e.composeProject}/${t}`:t}toRow(e){return{id:e.id,time:e.timestamp===null?``:e.timestamp.slice(11,19),object:this.nameOf(e.source),text:e.text,level:B(e.text)}}static ɵfac=function(t){return new(t||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-logs-page`]],viewQuery:function(t,n){t&1&&rg(n.viewport,be,5),t&2&&BE()},inputs:{volg:[1,`volg`]},decls:54,vars:40,consts:[[`viewport`,``],[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-2`],[`data-testid`,`logs-project`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-2.5`,`py-1`,`text-[13px]`,`text-ink-100`],[1,`relative`],[1,`pointer-events-none`,`absolute`,`top-1/2`,`left-2.5`,`-translate-y-1/2`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-96`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`title`],[`name`,`code`,3,`size`],[3,`chosenChange`,`chosen`,`errors`,`warnings`],[`type`,`button`,`aria-haspopup`,`true`,1,`mx-btn`,`mx-focus`,3,`click`],[`name`,`containers`,3,`size`],[1,`text-[11px]`],[1,`absolute`,`left-0`,`z-50`,`mt-1.5`,`max-h-80`,`w-72`,`overflow-y-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`p-1`,`shadow-2xl`],[3,`onChange`,`label`,`on`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`],[`name`,`eraser`,3,`size`],[1,`mt-3`,`rounded-md`,`border`,`border-warn/40`,`bg-warn/10`,`px-3`,`py-2`,`text-[13px]`,`text-warn`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-4`,3,`scroll`],[1,`w-full`,`table-fixed`,`border-collapse`,`text-[12px]`],[1,`w-20`],[1,`w-56`],[1,`sticky`,`top-0`,`bg-ink-900`],[1,`border-b`,`border-ink-700`,`text-left`,`text-ink-400`],[`scope`,`col`,1,`px-2`,`py-1.5`,`font-medium`],[1,`font-mono`],[1,`align-top`,`hover:bg-ink-850`],[1,`flex`,`shrink-0`,`items-center`,`gap-3`,`px-6`,`pb-4`,`text-[12px]`,`text-ink-500`],[1,`text-warn`],[`data-testid`,`logs-project`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-2.5`,`py-1`,`text-[13px]`,`text-ink-100`,3,`change`],[`value`,``,3,`selected`],[3,`value`,`selected`],[1,`flex`,`cursor-pointer`,`items-center`,`gap-2`,`rounded`,`px-2`,`py-1.5`,`text-[12px]`,`text-ink-300`,`hover:bg-ink-850`],[1,`px-2`,`py-3`,`text-center`,`text-[12px]`,`text-ink-500`],[`type`,`button`,1,`mx-focus`,`mt-1`,`w-full`,`cursor-pointer`,`rounded`,`px-2`,`py-1.5`,`text-left`,`text-[12px]`,`text-accent`,`hover:bg-ink-850`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[1,`min-w-0`,`flex-1`,`truncate`],[`type`,`button`,1,`mx-focus`,`mt-1`,`w-full`,`cursor-pointer`,`rounded`,`px-2`,`py-1.5`,`text-left`,`text-[12px]`,`text-accent`,`hover:bg-ink-850`,3,`click`],[1,`px-2`,`py-0.5`,`tabular-nums`,`text-ink-500`],[1,`truncate`,`px-2`,`py-0.5`,`text-accent`,3,`title`],[`data-testid`,`log-row`,1,`px-2`,`py-0.5`,`break-all`,`whitespace-pre-wrap`],[1,`px-2`,`py-10`,`text-center`,`font-sans`,`text-ink-400`]],template:function(t,n){if(t&1){let d=RE();Li(0,`section`,1)(1,`div`,2)(2,`div`,3)(3,`div`)(4,`h1`,4),fS(5),Nc(),Li(6,`p`,5),fS(7),Nc()()(),Li(8,`div`,6),SE(9,Le,5,3,`select`,7),Li(10,`label`,8)(11,`span`,9),Gm(12,`app-icon`,10),Nc(),Li(13,`span`,11),fS(14),Nc(),Li(15,`input`,12),Jm(`input`,function(f){return n.search.set(f.target.value)}),Nc()(),Li(16,`button`,13),Jm(`click`,function(){return n.caseSensitive.set(!n.caseSensitive())}),Gm(17,`app-icon`,14),fS(18,` Aa `),Nc(),Li(19,`app-level-filter`,15),vg(`chosenChange`,function(f){return Od(d),vS(n.levels,f)||(n.levels=f),Ld(f)}),Nc(),Li(20,`div`,8)(21,`button`,16),Jm(`click`,function(){return n.filterOpen.set(!n.filterOpen())}),Gm(22,`app-icon`,17),fS(23),SE(24,ke,2,2,`span`,18),Nc(),SE(25,Ie,5,2,`div`,19),Nc(),Li(26,`app-filter-switch`,20),vg(`onChange`,function(f){return Od(d),vS(n.showTimestamps,f)||(n.showTimestamps=f),Ld(f)}),Nc(),Li(27,`button`,21),Jm(`click`,function(){return n.clear()}),Gm(28,`app-icon`,22),fS(29),Nc()(),SE(30,je,2,1,`p`,23),Nc(),Li(31,`div`,24,0),Jm(`scroll`,function(f){return n.onScroll(f)}),Li(33,`table`,25)(34,`colgroup`),SE(35,Me,1,0,`col`,26),Gm(36,`col`,27)(37,`col`),Nc(),Li(38,`thead`,28)(39,`tr`,29),SE(40,De,2,1,`th`,30),Li(41,`th`,30),fS(42),Nc(),Li(43,`th`,30),fS(44),Nc()()(),Li(45,`tbody`,31),kc(46,Re,6,6,`tr`,32,we,!0,Ve,4,2,`tr`),Nc()()(),Li(49,`div`,33)(50,`span`),fS(51),Nc(),SE(52,Fe,2,1,`span`),SE(53,Ae,2,1,`span`,34),Nc()()}if(t&2){let d;ec(5),pg(n.t().title),ec(2),pg(n.t().intro),ec(2),kE(n.projects().length>0?9:-1),ec(3),Wm(`size`,14),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchPlaceholder)(`value`,n.search()),ec(),ag(`border-accent`,n.caseSensitive())(`text-accent`,n.caseSensitive()),Wm(`title`,n.t().caseSensitive),zr(`aria-pressed`,n.caseSensitive())(`aria-label`,n.t().caseSensitive),ec(),Wm(`size`,14),ec(2),hg(`chosen`,n.levels),Wm(`errors`,n.levelCounts().error)(`warnings`,n.levelCounts().warn),ec(2),ag(`border-accent`,n.hidden().size>0)(`text-accent`,n.hidden().size>0),zr(`aria-expanded`,n.filterOpen()),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().containers,` `),ec(),kE(n.hidden().size>0?24:-1),ec(),kE(n.filterOpen()?25:-1),ec(),Wm(`label`,n.t().timestamps),hg(`on`,n.showTimestamps),ec(2),Wm(`size`,14),ec(),Ac(` `,n.t().clear,` `),ec(),kE((d=n.problem())?30:-1,d),ec(5),kE(n.showTimestamps()?35:-1),ec(5),kE(n.showTimestamps()?40:-1),ec(2),pg(n.t().columns.object),ec(2),pg(n.t().columns.line),ec(2),Tc(n.rows()),ec(5),pg(n.t().lineCount(n.rows().length)),ec(),kE(n.hiddenCount()>0?52:-1),ec(),kE(n.truncated()?53:-1)}},dependencies:[My,P,T],encapsulation:2})}})();export{me as LogsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ln as f$1}from"./chunk-
|
|
1
|
+
import{ln as f$1}from"./chunk-C_5f0tVq.js";function g(a,t){return a===0?`stopped`:a===t?`running`:`partial`}function f(a){let t=new Map;for(let n of a){if(n.composeProject===null)continue;let o=t.get(n.composeProject);o===void 0?t.set(n.composeProject,[n]):o.push(n)}let c=[];for(let[n,o]of t){let i=new Map;for(let e of o){let r=e.composeService??e.name,s=i.get(r);s===void 0?i.set(r,[e]):s.push(e)}let l=[...i.entries()].map(([e,r])=>({name:e,containers:[...r].sort((s,u)=>s.name.localeCompare(u.name))})).sort((e,r)=>e.name.localeCompare(r.name)),m=o.filter(e=>e.state===`running`).length,p=o.find(e=>e.composeWorkingDir!==null);c.push({name:n,workingDir:p?.composeWorkingDir??null,configFiles:p?.composeConfigFiles??[],services:l,containerIds:o.map(e=>e.id),total:o.length,running:m,state:g(m,o.length)})}return c.sort((n,o)=>n.name.localeCompare(o.name))}var y=f$1(()=>{});export{y as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$n as sg,Cn as hj,Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,H as Li,I as Jm,Jt as ag,O as HE,On as kc,R as Kr,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,_t as SS,a as Ar,ar as tg,cn as ec,ct as Qm,dr as vj,er as sk,gt as SE,hr as wc,ln as f,o as BE,r as Ac,t as $I,tt as Od,u as C,un as fS,ut as RE}from"./chunk-C_5f0tVq.js";import{i as Ie,o as Ne}from"./chunk-0lzDD7VN.js";function U(t,n){return this.trackKey()(n)}function W(t,n){t&1&&Gm(0,`col`,1)}function X(t,n){if(t&1&&Gm(0,`col`),t&2){let e=n.$implicit;sg(`width`,e.width??null)}}function Y(t,n){if(t&1){let e=RE();Li(0,`th`,4)(1,`input`,6),Jm(`change`,function(){Od(e);return Ld(HE().toggleAll())}),Nc()()}if(t&2){let e=HE();ec(),Wm(`checked`,e.allSelected())(`indeterminate`,e.someSelected()),zr(`aria-label`,e.allSelected()?e.t().clearSelection:e.t().selectAll)}}function Z(t,n){if(t&1&&(Li(0,`th`,7),fS(1),Nc()),t&2){let e=n.$implicit;ag(`text-right`,e.align===`right`),ec(),Ac(` `,e.label,` `)}}function ee(t,n){if(t&1&&(Li(0,`tr`,8)(1,`td`,10),Qm(2,11),Nc()()),t&2){let e=HE().$implicit,a=HE();ec(),zr(`colspan`,a.columnCount()),ec(),Wm(`ngTemplateOutlet`,a.groupHeader().template)(`ngTemplateOutletContext`,SS(3,I,e))}}function te(t,n){if(t&1){let e=RE();Li(0,`td`,10)(1,`input`,13),Jm(`change`,function(){Od(e);let d=HE().$implicit,$=HE(2);return Ld($.toggleOne($.trackKey()(d)))}),Nc()()}if(t&2){let e=HE().$implicit,a=HE(2);ec(),Wm(`checked`,a.selected().has(a.trackKey()(e))),zr(`aria-label`,a.t().select(a.trackKey()(e)))}}function ne(t,n){if(t&1&&(Li(0,`td`,10),Qm(1,11),Nc()),t&2){let e=n.$implicit,a=HE().$implicit,d=HE(2);ag(`text-right`,e.align===`right`),ec(),Wm(`ngTemplateOutlet`,d.cellFor(e.key))(`ngTemplateOutletContext`,SS(4,I,a))}}function ae(t,n){if(t&1&&(Li(0,`tr`,9),SE(1,te,2,2,`td`,10),kc(2,ne,2,6,`td`,12,_),Nc()),t&2){let e=HE(2);ec(),kE(e.selectable()?1:-1),ec(),Tc(e.columns())}}function ie(t,n){if(t&1&&(SE(0,ee,3,5,`tr`,8),kc(1,ae,4,1,`tr`,9,U,!0)),t&2){let e=n.$implicit;kE(HE().showHeaders()?0:-1),ec(),Tc(e.rows)}}function le(t,n){if(t&1&&(Li(0,`tr`)(1,`td`,14),fS(2),Nc()()),t&2){let e=HE();ec(),zr(`colspan`,e.columnCount()),ec(),Ac(` `,e.emptyMessage()??e.t().empty,` `)}}var I;var _;var x;var h;var z;var oe=f(()=>{Ne();Kr();sk();Kr();I=t=>({$implicit:t}),_=(t,n)=>n.key;x=class t{appCell=jc.required();template=C(Ar);static ɵfac=function(e){return new(e||t)};static ɵdir=$I({type:t,selectors:[[`ng-template`,`appCell`,``]],inputs:{appCell:[1,`appCell`]}})},h=class t{template=C(Ar);static ɵfac=function(e){return new(e||t)};static ɵdir=$I({type:t,selectors:[[`ng-template`,`appGroupHeader`,``]]})},z=class t{columns=jc.required();rows=jc.required();trackKey=jc.required();selectable=jc(!0);emptyMessage=jc(null);selected=mj(new Set);groups=jc(null);cells=vj(x);groupHeader=hj(h);t=Lt(()=>ok().shell.dataTable);blocks=Lt(()=>this.groups()??[{key:``,rows:this.rows()}]);showHeaders=Lt(()=>this.groups()!==null&&this.groupHeader()!==void 0);isEmpty=Lt(()=>this.blocks().length===0||!this.showHeaders()&&this.rows().length===0);cellsByKey=Lt(()=>new Map(this.cells().map(n=>[n.appCell(),n.template])));columnCount=Lt(()=>this.columns().length+(this.selectable()?1:0));allSelected=Lt(()=>this.rows().length>0&&this.selected().size===this.rows().length);someSelected=Lt(()=>this.selected().size>0&&!this.allSelected());cellFor(n){return this.cellsByKey().get(n)??null}toggleAll(){this.selected.set(this.allSelected()?new Set:new Set(this.rows().map(n=>this.trackKey()(n))))}toggleOne(n){let e=new Set(this.selected());e.delete(n)||e.add(n),this.selected.set(e)}static ɵfac=function(e){return new(e||t)};static ɵcmp=wc({type:t,selectors:[[`app-data-table`]],contentQueries:function(e,a,d){e&1&&tg(d,a.cells,x,4)(d,a.groupHeader,h,5),e&2&&BE(2)},inputs:{columns:[1,`columns`],rows:[1,`rows`],trackKey:[1,`trackKey`],selectable:[1,`selectable`],emptyMessage:[1,`emptyMessage`],selected:[1,`selected`],groups:[1,`groups`]},outputs:{selected:`selectedChange`},decls:14,vars:3,consts:[[1,`w-full`,`table-fixed`,`border-collapse`,`text-[13px]`],[1,`w-10`],[3,`width`],[1,`border-b`,`border-ink-700`,`text-left`,`text-ink-400`],[1,`px-3`,`py-2`],[`scope`,`col`,1,`truncate`,`px-3`,`py-2`,`font-medium`,3,`text-right`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`,`indeterminate`],[`scope`,`col`,1,`truncate`,`px-3`,`py-2`,`font-medium`],[1,`border-b`,`border-ink-800`,`bg-ink-850`],[1,`border-b`,`border-ink-800`,`transition-colors`,`hover:bg-ink-850`],[1,`px-3`,`py-1.5`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`px-3`,`py-1.5`,3,`text-right`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[1,`px-3`,`py-10`,`text-center`,`text-ink-400`]],template:function(e,a){e&1&&(Li(0,`table`,0)(1,`colgroup`),SE(2,W,1,0,`col`,1),kc(3,X,1,2,`col`,2,_),Nc(),Li(5,`thead`)(6,`tr`,3),SE(7,Y,2,3,`th`,4),kc(8,Z,2,3,`th`,5,_),Nc()(),Li(10,`tbody`),kc(11,ie,3,1,null,null,_),SE(13,le,3,2,`tr`),Nc()()),e&2&&(ec(2),kE(a.selectable()?2:-1),ec(),Tc(a.columns()),ec(4),kE(a.selectable()?7:-1),ec(),Tc(a.columns()),ec(3),Tc(a.blocks()),ec(2),kE(a.isEmpty()?13:-1))},dependencies:[Ie],encapsulation:2})}});export{z as i,oe as n,x as r,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Pt as W,R as Kr,S as G,_r as wt,ln as f$1,zt as X}from"./chunk-
|
|
1
|
+
import{Pt as W,R as Kr,S as G,_r as wt,ln as f$1,zt as X}from"./chunk-C_5f0tVq.js";var y;var m;var T;var u;var f=f$1(()=>{Kr();Kr();y={success:5e3,error:0},m=4,T=200,u=class o{items=wt([]);counter=0;toasts=this.items.asReadonly();add(t){this.counter+=1;let e=t.type??`success`,r={id:this.counter,title:t.title??null,description:t.description,type:e,timeout:t.timeout??y[e],closing:!1},l=this.items().filter(n=>!(n.description===r.description&&n.type===r.type));return this.items.set([...l,r].slice(-m)),r.id}success(t,e){return this.add(W({description:t,type:`success`},e===void 0?{}:{title:e}))}error(t,e){return this.add(W({description:t,type:`error`},e===void 0?{}:{title:e}))}close(t){this.items.update(e=>e.map(r=>r.id===t?G(W({},r),{closing:!0}):r)),setTimeout(()=>this.items.update(e=>e.filter(r=>r.id!==t)),T)}static ɵfac=function(e){return new(e||o)};static ɵprov=X({token:o,factory:o.ɵfac,providedIn:`root`})}});export{u as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C_5f0tVq.js";import"./chunk-BxCMq76L.js";import{n as ro,t as Ql}from"./chunk-DfetwWmp.js";Ql();export{ro as TerminalView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,J as My,Kn as pj,Kt as _m,O as HE,R as Kr,Sn as hg,T as Gm,V as Ld,Vn as ok,W as Lt,X as Nc,cn as ec,er as sk,hr as wc,in as dk,ln as f,r as Ac,sr as vS,tt as Od,un as fS,ur as vg,ut as RE}from"./chunk-
|
|
1
|
+
import{En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,J as My,Kn as pj,Kt as _m,O as HE,R as Kr,Sn as hg,T as Gm,V as Ld,Vn as ok,W as Lt,X as Nc,cn as ec,er as sk,hr as wc,in as dk,ln as f,r as Ac,sr as vS,tt as Od,un as fS,ur as vg,ut as RE}from"./chunk-C_5f0tVq.js";import{a as Ni,c as Ri,h as ki,i as Mi,n as Ii,o as Oi,p as ho,s as Pi,t as Ai}from"./chunk-C_ouaGQt.js";function H(o,u){if(o&1){let e=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`div`,5)(4,`span`,6),Gm(5,`app-icon`,7),Nc(),Li(6,`div`,8)(7,`h2`,9),fS(8),Nc(),Li(9,`p`,10),fS(10),Nc()()(),Li(11,`div`,11)(12,`button`,12),Gm(13,`app-icon`,13),fS(14),Nc(),Li(15,`button`,14),Jm(`click`,function(){Od(e);return Ld(HE().accept())}),Gm(16,`app-icon`,15),fS(17),Nc()()()()}if(o&2){let e=HE();ec(5),Wm(`size`,20),ec(3),pg(e.title()),ec(2),pg(e.description()),ec(3),Wm(`size`,14),ec(),Ac(` `,e.cancelLabel(),` `),ec(2),Wm(`name`,e.confirmIcon())(`size`,14),ec(),Ac(` `,e.shownConfirmLabel(),` `)}}var W;var J=f(()=>{Kr();ho();sk();dk();Kr();W=class o{open=mj(!1);title=jc.required();description=jc.required();confirmLabel=jc(null);confirmIcon=jc(`trash`);confirmed=pj();cancelLabel=Lt(()=>ok().common.cancel);shownConfirmLabel=Lt(()=>this.confirmLabel()??ok().shell.confirmDialog.confirm);accept(){this.open.set(!1),this.confirmed.emit()}static ɵfac=function(e){return new(e||o)};static ɵcmp=wc({type:o,selectors:[[`app-confirm-dialog`]],inputs:{open:[1,`open`],title:[1,`title`],description:[1,`description`],confirmLabel:[1,`confirmLabel`],confirmIcon:[1,`confirmIcon`]},outputs:{open:`openChange`,confirmed:`confirmed`},decls:2,vars:1,consts:[[`rdxAlertDialogRoot`,``,3,`openChange`,`open`],[`rdxAlertDialogPortal`,``],[`rdxAlertDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxAlertDialogViewport`,``,`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxAlertDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[1,`flex`,`gap-3`],[1,`mt-0.5`,`text-danger`],[`name`,`warning`,3,`size`],[1,`min-w-0`],[`rdxAlertDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxAlertDialogDescription`,``,1,`mt-1.5`,`text-[13px]`,`text-ink-300`],[1,`mt-5`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxAlertDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`border-danger`,`bg-danger`,`text-white`,`hover:border-danger`,`hover:bg-danger`,`hover:text-white`,3,`click`],[3,`name`,`size`]],template:function(e,d){e&1&&(Li(0,`div`,0),vg(`openChange`,function(c){return vS(d.open,c)||(d.open=c),c}),_m(1,H,18,8,`ng-template`,1),Nc()),e&2&&hg(`open`,d.open)},dependencies:[Ni,Ai,Oi,ki,Ii,Pi,Mi,Ri,My],encapsulation:2})}});export{W as n,J as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Bt as Xm,Ct as Tc,En as jc,Fn as mj,Gn as pg,It as Wr,Jt as ag,L as Km,O as HE,On as kc,R as Kr,Tr as zr,V as Ld,Vn as ok,W as Lt,cn as ec,er as sk,hr as wc,ln as f,qn as qr,r as Ac,tt as Od,un as fS,ut as RE,vt as Sc}from"./chunk-
|
|
1
|
+
import{Bt as Xm,Ct as Tc,En as jc,Fn as mj,Gn as pg,It as Wr,Jt as ag,L as Km,O as HE,On as kc,R as Kr,Tr as zr,V as Ld,Vn as ok,W as Lt,cn as ec,er as sk,hr as wc,ln as f,qn as qr,r as Ac,tt as Od,un as fS,ut as RE,vt as Sc}from"./chunk-C_5f0tVq.js";function B(n){let t=S.exec(n);if(t!==null){let o=m[t[1].toLowerCase()];if(o!==void 0)return o}let e=k.exec(n);if(e!==null)return m[e[1].toLowerCase()]??null;let r=O.exec(n);return r===null?null:m[r[1].toLowerCase()]??null}function H(n,t){return t.size===0||(n===`error`||n===`warn`)&&t.has(n)}function U(n){let t=0,e=0;for(let r of n)t+=r===`error`?1:0,e+=r===`warn`?1:0;return{error:t,warn:e}}function j(n,t){let e=n.trim();if(e===``)return P;let r=/^\/(.+)\/([a-z]*)$/.exec(e);if(r===null){let o=t?e:e.toLowerCase();return{test:a=>(t?a:a.toLowerCase()).includes(o),problem:null}}try{let o=r[2].includes(`i`)||t?r[2]:`${r[2]}i`,a=new RegExp(r[1],o);return{test:M=>a.test(M),problem:null}}catch(o){return{test:()=>!0,problem:ok().logs.invalidExpression(o instanceof Error?o.message:String(o))}}}var m;var O;var S;var k;var G;var P;var V=f(()=>{sk();m={err:`error`,error:`error`,fatal:`error`,panic:`error`,critical:`error`,wrn:`warn`,warn:`warn`,warning:`warn`,inf:`info`,info:`info`,notice:`info`,dbg:`debug`,debug:`debug`,trace:`debug`},O=/\b(ERR|ERROR|FATAL|PANIC|CRITICAL|WRN|WARN|WARNING|INF|INFO|NOTICE|DBG|DEBUG|TRACE)\b/,S=/\b(?:level|lvl|severity)["']?\s*[=:]\s*["']?([A-Za-z]+)/i,k=/\[(err|error|fatal|panic|critical|wrn|warn|warning|inf|info|notice|dbg|debug|trace)\]/i;G={error:`text-danger`,warn:`text-warn`,info:`text-ok`,debug:`text-ink-500`};P={test:()=>!0,problem:null}});function W(n,t){if(n&1){let e=RE();qr(0,`button`,2),Xm(`click`,function(){let o=Od(e).$implicit;return Ld(HE().toggle(o))}),fS(1),qr(2,`span`,3),fS(3),Wr()()}if(n&2){let e=t.$implicit,r=HE();ag(`border-danger`,e===`error`&&r.chosen().has(e))(`text-danger`,e===`error`&&r.chosen().has(e))(`border-warn`,e===`warn`&&r.chosen().has(e))(`text-warn`,e===`warn`&&r.chosen().has(e)),Km(`title`,r.t().unknownHidden),zr(`aria-pressed`,r.chosen().has(e))(`data-testid`,`level-`+e),ec(),Ac(` `,e===`error`?r.t().errors:r.t().warnings,` `),ec(2),pg(e===`error`?r.errors():r.warnings())}}var T;var $=f(()=>{Kr();sk();Kr();T=class n{chosen=mj.required();errors=jc(0);warnings=jc(0);levels=[`error`,`warn`];t=Lt(()=>ok().logs.levels);toggle(t){let e=new Set(this.chosen());e.delete(t)||e.add(t),this.chosen.set(e)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-level-filter`]],inputs:{chosen:[1,`chosen`],errors:[1,`errors`],warnings:[1,`warnings`]},outputs:{chosen:`chosenChange`},decls:3,vars:1,consts:[[`role`,`group`,1,`flex`,`items-center`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-danger`,`text-danger`,`border-warn`,`text-warn`,`title`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`title`],[1,`text-[11px]`,`tabular-nums`,`opacity-70`]],template:function(e,r){e&1&&(qr(0,`div`,0),kc(1,W,4,13,`button`,1,Sc),Wr()),e&2&&(zr(`aria-label`,r.t().label),ec(),Tc(r.levels))},encapsulation:2})}});export{T as a,j as c,H as i,B as n,U as o,G as r,V as s,$ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ct as Tc,Dn as kE,En as jc,Ft as Wm,H as Li,I as Jm,In as nS,J as My,Kn as pj,O as HE,On as kc,Qn as rg,R as Kr,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,_ as Dj,_n as gj,_r as wt,at as Pr,cn as ec,er as sk,gt as SE,hr as wc,in as dk,ln as f,o as BE,pr as wD,r as Ac,tt as Od,u as C,un as fS,ut as RE}from"./chunk-C_5f0tVq.js";function $(i,e){i&1&&Gm(0,`li`,6)}function j(i,e){if(i&1){let t=RE();SE(0,$,1,0,`li`,6),Li(1,`li`,7)(2,`button`,8),Jm(`click`,function(){let o=Od(t).$implicit;return Ld(HE(2).pick(o))})(`keydown`,function(o){Od(t);return Ld(HE(2).onItemKey(o))}),Gm(3,`app-icon`,9),fS(4),Nc()()}if(i&2){let t=e.$implicit,n=HE(2);kE(t.separated?0:-1),ec(),zr(`title`,t.hint??null),ec(),nS(t.danger?n.dangerClass:n.normalClass),Wm(`disabled`,t.disabled===!0),zr(`data-testid`,`menu-`+t.id),ec(),Wm(`name`,t.icon)(`size`,14),ec(),Ac(` `,t.label,` `)}}function P(i,e){if(i&1&&(Li(0,`ul`,5),kc(1,j,5,9,null,null,U),Nc()),i&2){let t=HE();nS(t.upward()?`bottom-full mb-1.5`:`top-full mt-1.5`),zr(`aria-label`,t.shownLabel()),ec(),Tc(t.items())}}var Q;var U;var V;var G=f(()=>{Kr();sk();dk();Kr();Q=[`trigger`],U=(i,e)=>e.id;V=class i{items=jc.required();label=jc(null);compact=jc(!1,{transform:Dj});picked=pj();shownLabel=Lt(()=>this.label()??ok().shell.actionMenu.label);host=C(Pr);trigger=gj(`trigger`);open=wt(!1);upward=wt(!1);compactTriggerClass=`mx-focus cursor-pointer rounded p-1 text-ink-400 transition-colors hover:bg-ink-800 hover:text-ink-100`;normalClass=`text-ink-200 hover:bg-ink-750 hover:text-ink-100 focus-visible:bg-ink-750 focus-visible:text-ink-100`;dangerClass=`text-danger hover:bg-danger/15 focus-visible:bg-danger/15`;toggle(){let e=!this.open();e&&this.placeMenu(),this.open.set(e),e&&setTimeout(()=>this.focusItem(0))}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.open.set(!1)}onTriggerKey(e){e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),this.placeMenu(),this.open.set(!0),setTimeout(()=>this.focusItem(e.key===`ArrowUp`?-1:0)))}onItemKey(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&e.preventDefault(),this.close();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let n=this.enabledItems().indexOf(document.activeElement);this.focusItem(n===-1?0:n+(e.key===`ArrowDown`?1:-1))}pick(e){this.close(),this.picked.emit(e.id)}placeMenu(){let e=this.trigger()?.nativeElement;if(e===void 0)return;let t=e.getBoundingClientRect(),n=this.items().length*32+24,o=window.innerHeight-t.bottom;this.upward.set(o<n&&t.top>o)}close(){this.open.set(!1),this.trigger()?.nativeElement.focus()}enabledItems(){return[...this.host.nativeElement.querySelectorAll(`[role="menuitem"]:not(:disabled)`)]}focusItem(e){let t=this.enabledItems();t.length!==0&&t[(e+t.length)%t.length].focus()}static ɵfac=function(t){return new(t||i)};static ɵcmp=wc({type:i,selectors:[[`app-action-menu`]],viewQuery:function(t,n){t&1&&rg(n.trigger,Q,5),t&2&&BE()},hostBindings:function(t,n){t&1&&Jm(`pointerdown`,function(a){return n.onOutside(a)},wD)},inputs:{items:[1,`items`],label:[1,`label`],compact:[1,`compact`]},outputs:{picked:`picked`},decls:5,vars:7,consts:[[`trigger`,``],[1,`relative`],[`type`,`button`,`aria-haspopup`,`menu`,`data-testid`,`action-menu`,3,`click`,`keydown`,`title`],[`name`,`menu`,3,`size`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`,3,`class`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`],[`role`,`separator`,1,`my-1`,`border-t`,`border-ink-700`],[`role`,`none`],[`type`,`button`,`role`,`menuitem`,1,`mx-focus`,`flex`,`w-full`,`cursor-pointer`,`items-center`,`gap-2`,`px-3`,`py-1.5`,`text-left`,`text-[13px]`,`transition-colors`,`focus-visible:outline-none`,`disabled:cursor-not-allowed`,`disabled:opacity-40`,`disabled:hover:bg-transparent`,3,`click`,`keydown`,`disabled`],[3,`name`,`size`]],template:function(t,n){t&1&&(Li(0,`div`,1)(1,`button`,2,0),Jm(`click`,function(){return n.toggle()})(`keydown`,function(a){return n.onTriggerKey(a)}),Gm(3,`app-icon`,3),Nc(),SE(4,P,3,3,`ul`,4),Nc()),t&2&&(ec(),nS(n.compact()?n.compactTriggerClass:`mx-btn mx-focus`),Wm(`title`,n.shownLabel()),zr(`aria-expanded`,n.open())(`aria-label`,n.shownLabel()),ec(2),Wm(`size`,n.compact()?15:16),ec(),kE(n.open()?4:-1))},dependencies:[My],encapsulation:2})}});export{V as n,G as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as IE,Ct as Tc,Dn as kE,Ft as Wm,Gn as pg,H as Li,I as Jm,J as My,O as HE,On as kc,Qn as rg,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,_n as gj,_r as wt,cn as ec,er as sk,gt as SE,h as DE,hr as wc,in as dk,ln as f,o as BE,pt as Rm,r as Ac,sr as vS,tt as Od,un as fS,ur as vg,ut as RE,vt as Sc}from"./chunk-C_5f0tVq.js";import"./chunk-BxCMq76L.js";import"./chunk-0lzDD7VN.js";import"./chunk-CEIzuD8m.js";import"./chunk-S9IeOMe4.js";import"./chunk-CG34bAfY.js";import{n as ro,t as Ql}from"./chunk-DfetwWmp.js";import{a as fi,i as _e,n as Qt,o as gi,r as Ye,s as we,t as Le}from"./chunk-C5DLS5H5.js";function te(n,a){if(n&1&&(Li(0,`button`,7),Gm(1,`app-icon`,10),fS(2),Nc()),n&2){let e=a.$implicit,t=HE();Wm(`value`,e),ec(),Wm(`name`,t.tabIcons[e])(`size`,14),ec(),Ac(``,t.tabLabel(e),` `)}}function ae(n,a){if(n&1&&Gm(0,`app-terminal-view`,11),n&2)Wm(`active`,HE().tab()===`terminal`)}function ne(n,a){if(n&1&&(Li(0,`p`,12),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function ie(n,a){if(n&1){let e=RE();Li(0,`div`,9)(1,`app-assistant-view`,13),Jm(`commandChosen`,function(g){Od(e);return Ld(HE().insertCommand(g))}),Nc()()}}var ee;var J;f(()=>{Kr();Le();dk();Ye();Ql();sk();Kr();ee=()=>[ro];J=class n{terminal=gj(ro);t=Lt(()=>ok().terminal);tabIcons={terminal:`terminal`,assistant:`sparkle`};assistantConfigured=wt(!1);tabNames=Lt(()=>this.assistantConfigured()?[`terminal`,`assistant`]:[`terminal`]);tab=wt(`terminal`);visited=wt(new Set([`terminal`]));constructor(){rf(()=>{let a=this.tab();this.visited.update(e=>e.has(a)?e:new Set(e).add(a))}),window.electron.assistant.status().then(a=>this.assistantConfigured.set(a.configured)).catch(()=>this.assistantConfigured.set(!1))}tabLabel(a){return this.t().tabs[a]}insertCommand(a){this.tab.set(`terminal`),this.terminal()?.insert(a)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-terminal-page`]],viewQuery:function(e,t){e&1&&rg(t.terminal,ro,5),e&2&&BE()},decls:25,vars:8,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`text-ink-200`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`active`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[3,`commandChosen`]],template:function(e,t){e&1&&(Li(0,`section`,0)(1,`div`,1)(2,`h1`,2),fS(3),Nc(),Li(4,`p`,3),fS(5),Li(6,`code`),fS(7,`docker`),Nc(),fS(8),Li(9,`strong`,4),fS(10,`root`),Nc(),fS(11),Li(12,`code`),fS(13,`alpine`),Nc(),fS(14),Nc()(),Li(15,`div`,5),vg(`valueChange`,function(l){return vS(t.tab,l)||(t.tab=l),l}),Li(16,`div`,6),kc(17,te,3,4,`button`,7,Sc),Nc(),Li(19,`div`,8),Rm(20,ae,1,1)(21,ne,2,1),DE(22,20,ee,21),IE(),Nc(),SE(24,ie,2,0,`div`,9),Nc()()),e&2&&(ec(3),pg(t.t().title),ec(2),Ac(` `,t.t().intro.start,` `),ec(3),pg(t.t().intro.afterDocker),ec(3),pg(t.t().intro.afterRoot),ec(3),Ac(``,t.t().intro.afterAlpine,` `),ec(),hg(`value`,t.tab),ec(),zr(`aria-label`,t.t().tabsLabel),ec(),Tc(t.tabNames()),ec(7),kE(t.assistantConfigured()&&t.visited().has(`assistant`)?24:-1))},dependencies:[we,fi,gi,_e,My,Qt],encapsulation:2})}})();export{J as TerminalPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as Kr,_r as wt,ln as f,zt as X}from"./chunk-
|
|
1
|
+
import{R as Kr,_r as wt,ln as f,zt as X}from"./chunk-C_5f0tVq.js";function m(e){document.documentElement.dataset.theme=e}function h(){try{let e=localStorage.getItem(c);return e===`light`||e===`dark`?e:null}catch{return null}}function s(){try{return matchMedia(`(prefers-color-scheme: dark)`).matches}catch{return!1}}function d(){return h()??(s()?`dark`:`light`)}var c;var a;var u=f(()=>{Kr();Kr();c=`mx.theme`;a=class e{current=wt(d());theme=this.current.asReadonly();toggle(){let t=this.current()===`dark`?`light`:`dark`;this.current.set(t),m(t);try{localStorage.setItem(c,t)}catch{}}static ɵfac=function(i){return new(i||e)};static ɵprov=X({token:e,factory:e.ɵfac,providedIn:`root`})}});export{u as i,d as n,m as r,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,G as M,Gn as pg,H as Li,I as Jm,J as My,Kn as pj,L as Km,Mn as lk,O as HE,On as kc,Pt as W$1,R as Kr,S as G,T as Gm,Tn as jI,Tr as zr,V as Ld,Vn as ok,W as Lt$1,X as Nc,Zn as rf,_ as Dj,_r as wt,at as Pr,b as Ej,cn as ec,er as sk,gt as SE,hr as wc,in as dk,it as PS,j as IS,ln as f,lr as ve$1,p as Cj,r as Ac,sn as eH,t as $I,tt as Od,u as C,un as fS,ut as RE,wn as ik,wt as Tg,xt as TE,z as LD}from"./chunk-C_5f0tVq.js";import{n as he$1,t as W$2}from"./chunk-CEIzuD8m.js";import{C as qn,E as tn,O as zn,d as Wn,f as Xn,h as ar,i as Gn,m as Zn,n as Bn,p as Yn,t as $n,u as Tt,y as ir}from"./chunk-S9IeOMe4.js";import{r as g,t as L}from"./chunk-CG34bAfY.js";function Ft(e){let n=C(ie);return Lt$1(()=>e?.()??n())}var ie;var Pt=f(()=>{Kr();ie=new M(`RDX_DIRECTION`,{providedIn:`root`,factory:()=>Lt$1(()=>`ltr`)})});function Kt(){return C(St,{optional:!0,self:!0})}function Bt(e){return{provide:St,useFactory:e}}function Wt(e,n){let t=e.compareDocumentPosition(n);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}function de(e){return[...e].filter(n=>n.element.isConnected).sort((n,t)=>Wt(n.element,t.element))}function le(e){let n=new Set;for(let t=1;t<e.length;t+=1){let i=ue(e[t-1],e[t]);i&&n.add(i)}return n}function ue(e,n){let t=e.parentElement;for(;t&&!t.contains(n);)t=t.parentElement;return t}function ce(e){let n=new Set;for(let t of e){for(let i=0;i<t.addedNodes.length;i+=1)if(n.has(t.addedNodes[i]))return!0;for(let i=0;i<t.removedNodes.length;i+=1)n.add(t.removedNodes[i])}for(let t of n)if(t.isConnected)return!0;return!1}function he(e,n){return re.some(t=>!n.includes(t)&&e.getModifierState(t))}function At(e){if(!(e instanceof HTMLElement))return!1;if(e.tagName===`TEXTAREA`)return!0;if(e.tagName!==`INPUT`)return!1;try{return e.selectionStart!=null}catch{return!1}}function zt(e,n){let t=n===`rtl`?$n:qn,i=n===`rtl`?qn:$n;return{forwardKeys:e===`horizontal`?[t]:e===`vertical`?[Wn]:[t,Wn],backwardKeys:e===`horizontal`?[i]:e===`vertical`?[zn]:[i,zn]}}function me(e,n,t,i){let{forwardKeys:o,backwardKeys:s}=zt(t,i),a=n.selectionStart,l=n.selectionEnd,r=n.value??``;return!!(a==null||l==null||e.shiftKey||a!==l||!s.includes(e.key)&&a<r.length||!o.includes(e.key)&&a>0)}function Lt(e,n){return n<0||n>=e.length}function Vt(e,n){return ot(e,{startingIndex:-1,disabledIndices:n})}function pe(e,n){return ot(e,{startingIndex:e.length,decrement:!0,disabledIndices:n})}function ot(e,n={}){let{startingIndex:t=-1,decrement:i=!1,disabledIndices:o}=n,s=i?-1:1;for(let a=t+s;a>=0&&a<e.length;a+=s)if(!$t(e,a,o))return a;return-1}function $t(e,n,t){if(t?.includes(n))return!0;let i=e[n];return i?!ge(i)||i.matches(`:disabled`)?!0:t===void 0&&(i.hasAttribute(`disabled`)||i.getAttribute(`aria-disabled`)===`true`):!1}function fe(e){return e===null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function ge(e){if(!e||!e.isConnected)return!1;if(typeof Element<`u`&&!(e instanceof Element))return!0;let n;try{n=getComputedStyle(e)}catch{return!0}return n.visibility!==`hidden`&&n.visibility!==`collapse`}function be(e,n,t,i){if(!e||!n||typeof e.scrollTo!=`function`)return;let o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight,a=e.scrollLeft,l=e.scrollTop;if(o&&i!==`vertical`){let r=Ot(e,n,`left`),d=J(e),p=J(n);t===`ltr`&&(r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:r-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(a=r-p.scrollMarginLeft-d.scrollPaddingLeft)),t===`rtl`&&(r-p.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?a=r-p.scrollMarginLeft-d.scrollPaddingLeft:r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(s&&i!==`horizontal`){let r=Ot(e,n,`top`),d=J(e),p=J(n);r-p.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?l=r-p.scrollMarginTop-d.scrollPaddingTop:r+n.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(l=r+n.offsetHeight+p.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:a,top:l,behavior:`auto`})}function Ot(e,n,t){let i=t===`left`?`offsetLeft`:`offsetTop`,o=0,s=n;for(;s?.offsetParent&&(o+=s[i],s.offsetParent!==e);)s=s.offsetParent;return o}function J(e){let n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}var St;var se;var jt;var ae;var re;var ve;var st;var xe;var W;var O;var ye;var at;var Ie;var z;var Z;var rt=f(()=>{Kr();Kr();tn();Pt();St=new M(`RdxCompositeItemOwner`);se=`data-composite-item-active`,jt=new Set([zn,Wn,$n,qn]),ae=new Set([...jt,Xn,Yn]),re=[`Shift`,`Control`,`Alt`,`Meta`];ve=()=>{let e=C(W);return{listElement:e.elementRef.nativeElement,items:e.items,itemMap:e.itemMap,registerItem:n=>e.registerItem(n),indexOf:n=>e.indexOf(n)}},[st,xe]=Gn(`RdxCompositeListContext`,`utils/composite`),W=(()=>{class e{constructor(){this.elementRef=C(Pr),this.registrations=new Map,this.registrationTick=wt(0),this.reorderTick=wt(0),this.onMapChange=pj(),this.items=Lt$1(()=>(this.reorderTick(),this.registrationTick(),de([...this.registrations.values()]))),this.indexMap=Lt$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,o)}),t}),this.itemMap=Lt$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,G(W$1({},i.metadata()??{}),{index:o}))}),t}),rf(()=>{this.onMapChange.emit(this.itemMap())}),this.observeItemReordering()}observeItemReordering(){typeof MutationObserver==`function`&&rf(t=>{let i=this.items().map(a=>a.element);if(i.length<2)return;let o=le(i);if(o.size===0)return;let s=new MutationObserver(a=>{if(!ce(a))return;let l=null;for(let r of i)if(r.isConnected){if(l&&Wt(l,r)>0){s.disconnect(),this.reorderTick.update(d=>d+1);return}l=r}});o.forEach(a=>s.observe(a,{childList:!0})),t(()=>s.disconnect())})}registerItem(t){return this.registrations.set(t.element,t),this.registrationTick.update(i=>i+1),()=>{this.registrations.get(t.element)===t&&(this.registrations.delete(t.element),this.registrationTick.update(i=>i+1))}}indexOf(t){return this.indexMap().get(t)??-1}elements(){return this.items().map(t=>t.element)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeList`,``]],outputs:{onMapChange:`onMapChange`},exportAs:[`rdxCompositeList`],features:[IS([xe(ve)])]})}}return e})(),O=(()=>{class e{constructor(){this.owner=Kt(),this.injectedListContext=this.owner?null:st(!0),this.elementRef=C(Pr),this.hasRendered=wt(!1),this.listContext=Lt$1(()=>this.owner?this.owner.listContext():this.injectedListContext),this.metadataInput=jc(void 0,{alias:`metadata`}),this._metadata=PS(()=>this.metadataInput()),this.index=Lt$1(()=>this.listContext()?.indexOf(this.elementRef.nativeElement)??-1),this.inListElement=Lt$1(()=>this.isInListElement(this.listContext())),LD(()=>{this.hasRendered.set(!0)}),rf(t=>{let i=this.listContext();if(!i||!this.hasRendered()||!this.isInListElement(i))return;let o=this.elementRef.nativeElement;t(Tg(()=>i.registerItem({element:o,metadata:this._metadata.asReadonly()})))})}setMetadata(t){this._metadata.set(t)}isInListElement(t){return!!t&&t.listElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeListItem`,``]],inputs:{metadataInput:[1,`metadata`,`metadataInput`]},exportAs:[`rdxCompositeListItem`]})}}return e})(),ye=()=>{let e=C(z);return{rootElement:e.elementRef.nativeElement,highlightedIndex:e.highlightedIndex.asReadonly(),highlightItemOnHover:e.highlightItemOnHover,orientation:e.orientation,dir:e.dir,isIndexDisabled:n=>e.isIndexDisabled(n),setHighlightedIndex:(n,t)=>e.setHighlightedIndex(n,t),relayKeyboardEvent:n=>e.relayKeyboardEvent(n)}},[at,Ie]=Gn(`RdxCompositeRootContext`,`utils/composite`),z=(()=>{class e{constructor(){this.elementRef=C(Pr),this.compositeList=C(W,{self:!0}),this.hasSetInitialIndex=!1,this.orientationInput=jc(`both`,{alias:`orientation`}),this._orientation=PS(()=>this.orientationInput()),this.orientation=this._orientation.asReadonly(),this.dirInput=jc(void 0,{alias:`dir`}),this.effectiveDir=Ft(this.dirInput),this._dir=PS(()=>this.effectiveDir()),this.dir=this._dir.asReadonly(),this.loopFocusInput=jc(!0,{alias:`loopFocus`,transform:Dj}),this._loopFocus=PS(()=>this.loopFocusInput()),this.loopFocus=this._loopFocus.asReadonly(),this.enableHomeAndEndKeysInput=jc(!1,{alias:`enableHomeAndEndKeys`,transform:Dj}),this._enableHomeAndEndKeys=PS(()=>this.enableHomeAndEndKeysInput()),this.enableHomeAndEndKeys=this._enableHomeAndEndKeys.asReadonly(),this.disabledIndicesInput=jc(void 0,{alias:`disabledIndices`}),this._disabledIndices=PS(()=>this.disabledIndicesInput()),this.disabledIndices=this._disabledIndices.asReadonly(),this.modifierKeysInput=jc([],{alias:`modifierKeys`}),this._modifierKeys=PS(()=>this.modifierKeysInput()),this.modifierKeys=this._modifierKeys.asReadonly(),this.highlightItemOnHover=jc(!1,{transform:Dj}),this.stopEventPropagation=jc(!0,{transform:Dj}),this.highlightedIndex=mj(0),this.onHighlightedIndexChange=pj(),this.onMapChange=pj(),this.items=this.compositeList.items,this.itemMap=this.compositeList.itemMap,rf(()=>{let t=this.items();if(t.length!==0){if(!this.hasSetInitialIndex){this.hasSetInitialIndex=!0;let i=t.findIndex(o=>o.element.hasAttribute(se));if(i!==-1){this.setHighlightedIndex(i,!0);return}this.moveHighlightOffDisabledItem();return}this.disabledIndices()!=null&&this.moveHighlightOffDisabledItem()}}),rf(()=>{this.onMapChange.emit(this.itemMap())})}moveHighlightOffDisabledItem(){if(!this.isIndexDisabled(this.highlightedIndex()))return;let t=this.elements(),i=Vt(t,this.disabledIndices());Lt(t,i)||this.setHighlightedIndex(i)}indexOf(t){return this.compositeList.indexOf(t)}setOrientation(t){this._orientation.set(t)}setLoopFocus(t){this._loopFocus.set(t)}setDir(t){this._dir.set(t)}setEnableHomeAndEndKeys(t){this._enableHomeAndEndKeys.set(t)}setDisabledIndices(t){this._disabledIndices.set(t)}setModifierKeys(t){this._modifierKeys.set(t)}isIndexDisabled(t){return $t(this.elements(),t,this.disabledIndices())}setHighlightedIndex(t,i=!1){this.highlightedIndex()!==t&&(this.highlightedIndex.set(t),this.onHighlightedIndexChange.emit(t)),i&&be(this.elementRef.nativeElement,this.elements()[t],this.dir(),this.orientation())}relayKeyboardEvent(t){this.handleCompositeKeydown(t,!0)}handleKeydown(t){this.handleCompositeKeydown(t,!1)}handleFocusIn(t){let i=t.target;At(i)&&i.setSelectionRange(0,i.value.length)}handleCompositeKeydown(t,i){if(!(this.enableHomeAndEndKeys()?ae:jt).has(t.key)||he(t,this.modifierKeys()))return;let s=t.target,a=this.elementRef.nativeElement;if(!i&&s instanceof HTMLElement){let d=s.closest(`[rdxCompositeRoot]`);if(d&&d!==a)return}if(At(s)&&!fe(s))try{if(me(t,s,this.orientation(),this.dir()))return}catch{return}let l=this.elements();if(l.length===0)return;let r=this.getNextIndex(t,l);r===this.highlightedIndex()||Lt(l,r)||(this.stopEventPropagation()&&t.stopPropagation(),t.preventDefault(),this.setHighlightedIndex(r,!0),queueMicrotask(()=>{this.elements()[r]?.focus()}))}getNextIndex(t,i){let o=this.highlightedIndex(),s=Vt(i,this.disabledIndices()),a=pe(i,this.disabledIndices());if(this.enableHomeAndEndKeys()){if(t.key===`Home`)return s;if(t.key===`End`)return a}let{forwardKeys:l,backwardKeys:r}=zt(this.orientation(),this.dir()),d=l.includes(t.key),p=r.includes(t.key);if(!d&&!p)return o;let E=p,Xt=E?s:a,Yt=E?a:s;return this.loopFocus()&&o===Xt?Yt:ot(i,{startingIndex:o,decrement:E,disabledIndices:this.disabledIndices()})}elements(){return this.compositeList.elements()}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeRoot`,``]],hostBindings:function(i,o){i&1&&Jm(`keydown`,function(a){return o.handleKeydown(a)})(`focusin`,function(a){return o.handleFocusIn(a)})},inputs:{orientationInput:[1,`orientation`,`orientationInput`],dirInput:[1,`dir`,`dirInput`],loopFocusInput:[1,`loopFocus`,`loopFocusInput`],enableHomeAndEndKeysInput:[1,`enableHomeAndEndKeys`,`enableHomeAndEndKeysInput`],disabledIndicesInput:[1,`disabledIndices`,`disabledIndicesInput`],modifierKeysInput:[1,`modifierKeys`,`modifierKeysInput`],highlightItemOnHover:[1,`highlightItemOnHover`],stopEventPropagation:[1,`stopEventPropagation`],highlightedIndex:[1,`highlightedIndex`]},outputs:{highlightedIndex:`highlightedIndexChange`,onHighlightedIndexChange:`onHighlightedIndexChange`,onMapChange:`onMapChange`},exportAs:[`rdxCompositeRoot`],features:[IS([Ie(ye)]),jI([W])]})}}return e})(),Z=(()=>{class e{constructor(){this.owner=Kt(),this.injectedRootContext=this.owner?null:at(!0),this.listItem=C(O,{self:!0}),this.elementRef=C(Pr),this.rootContext=Lt$1(()=>this.owner?this.owner.rootContext():this.injectedRootContext),this.index=this.listItem.index,this.tabIndex=Lt$1(()=>{let t=this.rootContext();if(!this.isInRootElement(t))return null;let i=this.index();return i!==-1&&t.highlightedIndex()===i&&!t.isIndexDisabled(i)?0:-1})}setMetadata(t){this.listItem.setMetadata(t)}handleFocus(){let t=this.rootContext(),i=this.index();i!==-1&&this.isInRootElement(t)&&t.setHighlightedIndex(i)}handleMouseMove(t){if(ir(t))return;let i=this.rootContext(),o=this.index();!this.isInRootElement(i)||o===-1||!i.highlightItemOnHover()||i.highlightedIndex()===o||i.isIndexDisabled(o)||this.elementRef.nativeElement.focus()}isInRootElement(t){return!!t&&t.rootElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeItem`,``]],hostVars:1,hostBindings:function(i,o){i&1&&Jm(`focus`,function(){return o.handleFocus()})(`mousemove`,function(a){return o.handleMouseMove(a)}),i&2&&zr(`tabindex`,o.tabIndex())},exportAs:[`rdxCompositeItem`],features:[jI([{directive:O,inputs:[`metadata`,`metadata`]}])]})}}return e})()});function qt(e,n){return`${e}-tab-${n}`}function Ut(e,n){return`${e}-panel-${n}`}function De(e){return typeof e.disabled==`boolean`&&typeof e.id==`string`&&Object.prototype.hasOwnProperty.call(e,`value`)}function Te(e,n){for(let t of e.values())if(t.value===n)return t}function Ne(e){for(let n of e.values())if(!n.disabled)return n.value}function ke(e,n,t,i){if(e==null||n==null)return`none`;let o=null,s=null,a=-1,l=-1;for(let[p,E]of i.entries())if(E.value===e&&(o=p,a=E.index),E.value===n&&(s=p,l=E.index),o&&s)break;if(!o||!s||a===l)return Fe(e,n,t);let r=o.getBoundingClientRect(),d=s.getBoundingClientRect();return t===`horizontal`?d.left<r.left?`left`:d.left>r.left||l>a?`right`:`left`:d.top<r.top?`up`:d.top>r.top||l>a?`down`:`up`}function Fe(e,n,t){return e!==n&&typeof e==`number`&&typeof n==`number`||e!==n&&typeof e==`string`&&typeof n==`string`?t===`horizontal`?n>e?`right`:`left`:n>e?`down`:`up`:`none`}function Ae(){return Bt(Pe)}var tt;var Me;var fi;var Re;var _e;var Ee;var we;var Pe;var gi;var Le=f(()=>{Kr();Kr();tn();rt();rt();g();[tt,Me]=Gn(`RdxTabsRootContext`,`components/tabs`);fi=(()=>{class e{constructor(){this.rootContext=tt(),this.elementRef=C(Pr),this.compositeRoot=C(z,{self:!0}),this.compositeRootContext=at(),this.compositeListContext=st(),this.activateOnFocus=jc(!1,{transform:Dj}),this.loopFocus=jc(!0,{transform:Dj}),this.tabMap=Lt$1(()=>{let i=new Map;return this.compositeRoot.itemMap().forEach((o,s)=>{De(o)&&i.set(s,o)}),i}),this.tabMetadata=Lt$1(()=>Array.from(this.tabMap().values())),this.disabledIndices=Lt$1(()=>this.tabMetadata().filter(i=>i.disabled).map(i=>i.index)),this.activeIndex=Lt$1(()=>{let i=this.rootContext.value();return this.tabMetadata().find(s=>s.value===i)?.index??-1});let t=this.rootContext.registerTabList(this.elementRef.nativeElement,this.compositeRootContext,this.compositeListContext);C(ve$1).onDestroy(t),this.compositeRoot.setEnableHomeAndEndKeys(!0),this.compositeRoot.setDisabledIndices([]),rf(()=>{this.compositeRoot.setOrientation(this.rootContext.orientation()),this.compositeRoot.setLoopFocus(this.loopFocus())}),rf(()=>{this.rootContext.setTabMap(this.tabMap())}),rf(()=>{let i=this.activeIndex();if(i===-1)return;let o=this.elementRef.nativeElement,s=o.ownerDocument.activeElement;if(!(s&&o.contains(s))){if(this.disabledIndices().includes(i)){let a=this.tabMetadata().find(l=>!l.disabled)?.index;a!==void 0&&this.compositeRoot.setHighlightedIndex(a);return}this.compositeRoot.setHighlightedIndex(i)}}),rf(()=>this.rootContext.setActivateOnFocus(this.activateOnFocus()))}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsList`,``]],hostAttrs:[`role`,`tablist`],hostVars:3,hostBindings:function(i,o){i&2&&zr(`aria-orientation`,o.rootContext.orientation()===`vertical`?`vertical`:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())},inputs:{activateOnFocus:[1,`activateOnFocus`],loopFocus:[1,`loopFocus`]},exportAs:[`rdxTabsList`],features:[jI([z])]})}}return e})();Re=()=>({present:C(_e).present}),_e=(()=>{class e{constructor(){this.elementRef=C(Pr),this.listItem=C(O,{self:!0}),this.rootContext=tt(),this.value=jc.required(),this.keepMounted=jc(!1,{transform:Dj}),this.transition=ar(()=>{}),this.transitionStatus=this.transition.status,this.panelId=Lt$1(()=>Ut(this.rootContext.baseId,this.value())),this.tabId=Lt$1(()=>{let i=this.value();for(let o of this.rootContext.tabMap().values())if(o.value===i)return o.id;return qt(this.rootContext.baseId,i)}),this.active=Lt$1(()=>this.rootContext.value()===this.value()),this.hasPresence=wt(!1),this.present=Lt$1(()=>this.keepMounted()||this.active()),this.hidden=Lt$1(()=>!this.active()&&this.transitionStatus()!==`ending`&&(!this.hasPresence()||this.keepMounted())),this.index=this.listItem.index,this.previousActive=!1,this.isFirstRun=!0;let t=this.transition.registerElement(this.elementRef.nativeElement);C(ve$1).onDestroy(t),rf(()=>{this.listItem.setMetadata({id:this.panelId(),value:this.value()})}),rf(()=>{let i=this.active();if(this.isFirstRun){this.isFirstRun=!1,this.previousActive=i;return}i!==this.previousActive&&(this.previousActive=i,Tg(()=>this.transition.start(i)))})}markHasPresence(){this.hasPresence.set(!0)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsPanel`,``]],hostAttrs:[`role`,`tabpanel`],hostVars:10,hostBindings:function(i,o){i&2&&(Km(`hidden`,o.hidden()),zr(`id`,o.panelId())(`tabindex`,o.active()?0:-1)(`aria-labelledby`,o.tabId())(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-index`,o.index())(`data-hidden`,o.active()?void 0:``)(`data-starting-style`,o.transitionStatus()===`starting`?``:void 0)(`data-ending-style`,o.transitionStatus()===`ending`?``:void 0))},inputs:{value:[1,`value`],keepMounted:[1,`keepMounted`]},exportAs:[`rdxTabsPanel`],features:[IS([L(Re)]),jI([O])]})}}return e})(),Ee=()=>{let e=C(we);return{baseId:e.baseId,value:e.value,orientation:e.orientation,activationDirection:e.activationDirection.asReadonly(),activateOnFocus:e.activateOnFocus.asReadonly(),tabListElement:e.tabListElement.asReadonly(),tabMap:e.tabMap.asReadonly(),tabCompositeRoot:e.tabCompositeRoot.asReadonly(),tabCompositeList:e.tabCompositeList.asReadonly(),setValue:(n,t,i)=>e.setValue(n,t,i),setActivateOnFocus:n=>e.activateOnFocus.set(n),registerTabList:(n,t,i)=>e.registerTabList(n,t,i),setTabMap:n=>e.tabMap.set(n)}},we=(()=>{class e{constructor(){this.baseId=Tt(`rdx-tabs-`),this.value=mj(),this.defaultValue=jc(void 0),this.orientation=jc(`horizontal`),this.onValueChange=pj(),this.activateOnFocus=wt(!1),this.tabListElement=wt(null),this.tabMap=wt(new Map),this.tabCompositeRoot=wt(null),this.tabCompositeList=wt(null),this.activationDirection=wt(`none`),this.externallyControlled=wt(!1),this.hasObservedValue=!1,this.internalValueCommit=!1,this.hasAppliedDefaultValue=!1,this.shouldNotifyInitialValueChange=!0,this.shouldHonorDisabledDefaultValue=!1,this.didRegisterTabs=!1,rf(()=>{let t=this.value();if(this.internalValueCommit){this.internalValueCommit=!1,this.hasObservedValue=!0,this.previousObservedValue=t;return}if(!this.hasObservedValue){this.hasObservedValue=!0,this.previousObservedValue=t,t!==void 0&&this.externallyControlled.set(!0);return}t!==this.previousObservedValue&&(this.externallyControlled.set(!0),this.previousObservedValue=t)}),rf(()=>{if(this.hasAppliedDefaultValue||Tg(this.value)!==void 0)return;let t=this.defaultValue(),i=t!==void 0;this.hasAppliedDefaultValue=!0,this.initialDefaultValue=t??0,this.shouldNotifyInitialValueChange=!i,this.shouldHonorDisabledDefaultValue=i,Tg(()=>this.commitValue(this.initialDefaultValue))}),rf(()=>{let t=this.tabMap(),i=this.value();if(this.externallyControlled())return;if(t.size===0){this.didRegisterTabs&&i!==null&&!this.lastKnownTabElement?.isConnected&&Tg(()=>this.commitAutomaticValueChange(null,`missing`));return}this.didRegisterTabs=!0,this.lastKnownTabElement=t.keys().next().value;let o=Te(t,i),s=Ne(t),a=o?.disabled,l=o==null&&i!==null;if(!a&&i===this.initialDefaultValue&&(this.shouldHonorDisabledDefaultValue=!1),this.shouldHonorDisabledDefaultValue&&a&&i===this.initialDefaultValue)return;let r=this.shouldNotifyInitialValueChange;if(a||l){let d=s??null;if(i===d){this.shouldNotifyInitialValueChange=!1;return}let p=`missing`;r?p=`initial`:a&&(p=`disabled`),Tg(()=>this.commitAutomaticValueChange(d,p));return}r&&o!=null&&(Tg(()=>this.notifyAutomaticValueChange(i,`initial`)),this.shouldNotifyInitialValueChange=!1)})}setValue(t,i,o=`none`){let s=this.value();if(s===t)return;let a=i?.currentTarget instanceof HTMLElement?i.currentTarget:void 0,{eventDetails:l}=Zn(o,i??new Event(`tabs.value-change`),a),r=l,d=ke(s,t,this.orientation(),this.tabMap());r.activationDirection=d,this.onValueChange.emit({value:t,eventDetails:r}),!r.isCanceled()&&(this.activationDirection.set(d),this.commitValue(t))}registerTabList(t,i,o){return this.tabListElement.set(t),this.tabCompositeRoot.set(i),this.tabCompositeList.set(o),()=>{this.tabCompositeRoot()!==i||this.tabCompositeList()!==o||(this.tabListElement.set(null),this.tabCompositeRoot.set(null),this.tabCompositeList.set(null),this.activateOnFocus.set(!1))}}commitValue(t){this.internalValueCommit=!0,this.value.set(t)}commitAutomaticValueChange(t,i){this.activationDirection.set(`none`),this.commitValue(t),this.notifyAutomaticValueChange(t,i),this.shouldNotifyInitialValueChange=!1}notifyAutomaticValueChange(t,i){if(t===void 0)return;let{eventDetails:o}=Zn(i,new Event(`tabs.value-change`)),s=o;s.activationDirection=`none`,this.onValueChange.emit({value:t,eventDetails:s})}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsRoot`,``]],hostVars:2,hostBindings:function(i,o){i&2&&zr(`data-orientation`,o.orientation())(`data-activation-direction`,o.activationDirection())},inputs:{value:[1,`value`],defaultValue:[1,`defaultValue`],orientation:[1,`orientation`]},outputs:{value:`valueChange`,onValueChange:`onValueChange`},exportAs:[`rdxTabsRoot`],features:[IS([Me(Ee)]),jI([W])]})}}return e})();Pe=()=>{let e=tt();return{rootContext:e.tabCompositeRoot,listContext:e.tabCompositeList}};gi=(()=>{class e{constructor(){this.rootContext=tt(),this.compositeItem=C(Z,{self:!0}),this.elementRef=C(Pr),this.value=jc.required(),this.disabled=jc(!1,{transform:Dj}),this.nativeButton=jc(!0,{transform:Dj}),this.id=jc(void 0),this.tabId=Lt$1(()=>this.id()??qt(this.rootContext.baseId,this.value())),this.panelId=Lt$1(()=>Ut(this.rootContext.baseId,this.value())),this.active=Lt$1(()=>this.rootContext.value()===this.value()),this.isPressing=!1,this.isMainButton=!1,Ej()&&Cj(()=>{let t=this.rootContext.tabCompositeList();t&&!t.listElement.contains(this.elementRef.nativeElement)&&Bn(`tabs/tab-outside-list`,'`rdxTabsTab` is rendered outside its `rdxTabsList`, so it gets no roving tabindex, arrow keys cannot reach it, and its `role="tab"` sits outside the `role="tablist"`. Move the tab inside the list, or project it there with `<ng-content>`.',`components/tabs`)}),rf(()=>{this.compositeItem.setMetadata({disabled:this.disabled(),id:this.tabId(),value:this.value()})})}onClick(t){this.active()||this.disabled()||this.rootContext.setValue(this.value(),t,`none`)}onKeyDown(t){!this.disabled()&&(t.key===` `||t.key===`Enter`)&&this.rootContext.setValue(this.value(),t,`none`)}onPointerDown(t){if(this.active()||this.disabled())return;this.isPressing=!0,this.isMainButton=t.button===0;let i=t.currentTarget instanceof HTMLElement?t.currentTarget.ownerDocument:document;i.addEventListener(`pointerup`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`pointercancel`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`blur`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0})}onFocus(t){this.active()||this.disabled()||this.rootContext.activateOnFocus()&&(!this.isPressing||this.isMainButton)&&this.rootContext.setValue(this.value(),t,`none`)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsTab`,``]],hostAttrs:[`role`,`tab`],hostVars:11,hostBindings:function(i,o){i&1&&Jm(`click`,function(a){return o.onClick(a)})(`keydown`,function(a){return o.onKeyDown(a)})(`pointerdown`,function(a){return o.onPointerDown(a)})(`focus`,function(a){return o.onFocus(a)}),i&2&&zr(`type`,o.nativeButton()?`button`:void 0)(`id`,o.tabId())(`aria-selected`,o.active())(`aria-controls`,o.panelId())(`aria-disabled`,o.disabled()?`true`:void 0)(`disabled`,null)(`data-composite-item-active`,o.active()?``:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-active`,o.active()?``:void 0)(`data-disabled`,o.disabled()?``:void 0)},inputs:{value:[1,`value`],disabled:[1,`disabled`],nativeButton:[1,`nativeButton`],id:[1,`id`]},exportAs:[`rdxTabsTab`],features:[IS([Ae()]),jI([Z])]})}}return e})()});function Ve(e,n){if(e&1&&(Li(0,`p`,8),fS(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introHost)}}function Oe(e,n){if(e&1&&(Li(0,`p`,8),fS(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introContainer)}}function He(e,n){if(e&1&&SE(0,Ve,2,1,`p`,8)(1,Oe,2,1,`p`,8),e&2)kE(HE().containerId()===null?0:1)}function Se(e,n){if(e&1&&(Li(0,`p`,9),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ke(e,n){if(e&1&&Gm(0,`app-answer-text`,10),e&2){let t=HE().$implicit;Wm(`text`,t.text)}}function Be(e,n){if(e&1&&(Li(0,`p`,11),Gm(1,`app-icon`,15),fS(2),Nc()),e&2){let t=HE().$implicit;ec(),Wm(`size`,12),ec(),Ac(` `,t.label,` `)}}function je(e,n){if(e&1&&(Li(0,`pre`,17),fS(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.proposal.command)}}function We(e,n){if(e&1&&(Li(0,`span`,21),fS(1),Nc()),e&2){let t=HE(2).$implicit,i=HE();ec(),pg(t.proposal.kind===`command`?i.t().onPrompt:i.t().done)}}function ze(e,n){if(e&1&&(Li(0,`span`,22),fS(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.problem)}}function $e(e,n){if(e&1){let t=RE();Li(0,`div`,12)(1,`p`,16),fS(2),Nc(),SE(3,je,2,1,`pre`,17),Li(4,`div`,18)(5,`button`,19),Jm(`click`,function(){Od(t);let o=HE(),s=o.$implicit,a=o.$index;return Ld(HE().carryOut(a,s.proposal))}),Gm(6,`app-icon`,20),fS(7),Nc(),SE(8,We,2,1,`span`,21)(9,ze,2,1,`span`,22),Nc()()}if(e&2){let t=HE().$implicit,i=HE();ec(2),pg(t.proposal.reason),ec(),kE(t.proposal.kind===`command`?3:-1),ec(2),Wm(`disabled`,t.state===`busy`||t.state===`done`&&t.proposal.kind!==`command`),ec(),Wm(`name`,i.proposalIcon(t.proposal))(`size`,14),ec(),Ac(` `,i.proposalLabel(t.proposal),` `),ec(),kE(t.state===`done`?8:t.state===`failed`?9:-1)}}function qe(e,n){if(e&1&&(Li(0,`p`,13),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ue(e,n){if(e&1&&(Li(0,`p`,14),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),Ac(` `,t.problem,` `)}}function Qe(e,n){if(e&1&&SE(0,Se,2,1,`p`,9)(1,Ke,1,1,`app-answer-text`,10)(2,Be,3,2,`p`,11)(3,$e,10,7,`div`,12)(4,qe,2,1,`p`,13)(5,Ue,2,1,`p`,14),e&2){let t,i=n.$implicit;kE((t=i.kind)===`question`?0:t===`answer`?1:t===`tool`?2:t===`proposal`?3:t===`usage`?4:t===`error`?5:-1)}}function Xe(e,n){if(e&1&&(Li(0,`p`,2),fS(1),Nc()),e&2){let t=HE();ec(),pg(t.t().thinking)}}function dt(e){return e.toLocaleString(ik())}var Qt;var Ye=f(()=>{Kr();lk();he$1();dk();sk();Kr();Qt=class e{containerId=jc(null);commandChosen=pj();entries=wt([]);busy=wt(!1);draft=wt(``);t=Lt$1(()=>ok().containers.assistant);defaultQuestion=Lt$1(()=>this.containerId()===null?this.t().defaultHostQuestion:this.t().defaultQuestion);conversationId=null;unsubscribe=null;destroyed=!1;constructor(){C(ve$1).onDestroy(()=>{this.destroyed=!0,this.unsubscribe?.(),this.conversationId!==null&&window.electron.assistant.close(this.conversationId)})}async submit(n){n.preventDefault();let t=this.draft().trim()||(this.entries().length===0?this.defaultQuestion():``);if(!(t===``||this.busy())){this.draft.set(``),this.busy.set(!0),this.append({kind:`question`,text:t});try{let i=await this.conversation();await window.electron.assistant.ask(i,t)}catch(i){this.append({kind:`error`,problem:eH(i)})}finally{this.busy.set(!1)}}}proposalLabel(n){let t=this.t();return n.kind===`command`?t.putInTerminal:n.kind===`compose`?t.composeUp(n.project):t[n.action](n.containerName)}proposalIcon(n){return n.kind===`command`?`terminal`:n.kind===`compose`?`play`:{start:`play`,stop:`stop`,restart:`refresh`}[n.action]}async carryOut(n,t){if(t.kind===`command`){this.commandChosen.emit(t.command),this.updateProposal(n,{state:`done`});return}this.updateProposal(n,{state:`busy`});try{let i=t.kind===`compose`?await window.electron.compose.up(t.project):await window.electron.containers.action(t.action,t.containerId);this.updateProposal(n,i.ok?{state:`done`}:{state:`failed`,problem:i.problem})}catch(i){this.updateProposal(n,{state:`failed`,problem:eH(i)})}}async conversation(){if(this.conversationId!==null)return this.conversationId;let n=await window.electron.assistant.start(this.containerId());if(this.destroyed)throw window.electron.assistant.close(n),new Error(this.t().panelClosed);return this.conversationId=n,this.unsubscribe=window.electron.assistant.onEvent(n,t=>this.receive(t)),n}receive(n){switch(n.type){case`text`:this.entries.update(t=>{let i=t.at(-1);return i?.kind===`answer`?[...t.slice(0,-1),{kind:`answer`,text:i.text+n.text}]:n.text.trim()===``?t:[...t,{kind:`answer`,text:n.text}]});break;case`tool`:this.append({kind:`tool`,label:n.label});break;case`proposal`:this.append({kind:`proposal`,proposal:n.proposal,state:`open`});break;case`done`:this.append({kind:`usage`,text:this.t().usage(dt(n.inputTokens),dt(n.cachedTokens),dt(n.outputTokens))});break;case`error`:this.append({kind:`error`,problem:n.problem});break}}append(n){this.entries.update(t=>[...t,n])}updateProposal(n,t){this.entries.update(i=>i.map((o,s)=>s===n&&o.kind===`proposal`?W$1(W$1({},o),t):o))}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-assistant-view`]],hostAttrs:[1,`flex`,`h-full`,`flex-col`],inputs:{containerId:[1,`containerId`]},outputs:{commandChosen:`commandChosen`},decls:13,vars:9,consts:[[`data-testid`,`assistant-log`,1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`py-4`],[1,`max-w-3xl`,`space-y-3`],[1,`text-[12px]`,`text-ink-500`],[1,`flex`,`shrink-0`,`gap-2`,`border-t`,`border-ink-700`,`px-6`,`py-3`,3,`submit`],[`for`,`assistant-question`,1,`sr-only`],[`id`,`assistant-question`,`type`,`text`,`autocomplete`,`off`,1,`mx-focus`,`min-w-0`,`flex-1`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`,`disabled`],[`type`,`submit`,`data-testid`,`assistant-ask`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`sparkle`,3,`size`],[1,`max-w-2xl`,`text-[13px]`,`text-ink-400`],[1,`rounded-md`,`bg-ink-800`,`px-3`,`py-2`,`text-[13px]`,`text-ink-100`],[`data-testid`,`assistant-answer`,1,`text-[13px]`,`leading-relaxed`,`text-ink-200`,3,`text`],[`data-testid`,`assistant-tool`,1,`flex`,`items-center`,`gap-1.5`,`text-[12px]`,`text-ink-500`],[`data-testid`,`assistant-proposal`,1,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[`data-testid`,`assistant-usage`,1,`text-[11px]`,`text-ink-600`],[`data-testid`,`assistant-error`,1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[`name`,`search`,3,`size`],[1,`text-[12px]`,`text-ink-400`],[1,`mt-2`,`overflow-x-auto`,`rounded`,`bg-ink-900`,`px-2`,`py-1`,`font-mono`,`text-[12px]`,`text-ink-100`],[1,`mt-2`,`flex`,`items-center`,`gap-2`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[1,`text-[12px]`,`text-ok`],[1,`text-[12px]`,`text-danger`]],template:function(t,i){t&1&&(Li(0,`div`,0),SE(1,He,2,1),Li(2,`div`,1),kc(3,Qe,6,1,null,null,TE),SE(5,Xe,2,1,`p`,2),Nc()(),Li(6,`form`,3),Jm(`submit`,function(s){return i.submit(s)}),Li(7,`label`,4),fS(8),Nc(),Li(9,`input`,5),Jm(`input`,function(s){return i.draft.set(s.target.value)}),Nc(),Li(10,`button`,6),Gm(11,`app-icon`,7),fS(12),Nc()()),t&2&&(ec(),kE(i.entries().length===0?1:-1),ec(2),Tc(i.entries()),ec(2),kE(i.busy()?5:-1),ec(3),pg(i.t().questionLabel),ec(),Wm(`placeholder`,i.entries().length===0?i.defaultQuestion():i.t().followUp)(`value`,i.draft())(`disabled`,i.busy()),ec(),Wm(`disabled`,i.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().ask,` `))},dependencies:[W$2,My],encapsulation:2})}});export{fi as a,_e as i,Qt as n,gi as o,Ye as r,we as s,Le as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Dn as kE,En as jc,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Kt as _m,O as HE,Pn as mg,R as Kr,T as Gm,Vn as ok,W as Lt,X as Nc,Zn as rf,_r as wt,_t as SS,cn as ec,er as sk,gt as SE,hr as wc,in as dk,ln as f,mt as Rp,r as Ac,u as C,un as fS,wt as Tg}from"./chunk-C_5f0tVq.js";import"./chunk-Bg_b-Jjw.js";import"./chunk-0lzDD7VN.js";import{n as v,t as u}from"./chunk-PF0v2lXq.js";import{n as x,t as u$1}from"./chunk-Dw1WSpzf.js";import{a as Yt,u as ra}from"./chunk-CW5lS8he.js";import{i as z,n as oe$1,r as x$1}from"./chunk-BgPEkm-o.js";function U(n,e){let t=new Map;for(let o of n)if(o.state===`running`)for(let i of o.ports)i.hostPort!==null&&t.set(`${o.id}:${String(i.hostPort)}:${String(i.containerPort)}/${i.protocol}`,{hostPort:i.hostPort,containerId:o.id,containerName:o.name,containerPort:i.containerPort,protocol:i.protocol,hostIp:i.hostIp??null,missing:!1});for(let o of e)if(o.kind===`ports`)for(let i of o.ports)t.set(`${o.id}:missing:${String(i.hostPort)}:${String(i.containerPort)}/${i.protocol}`,{hostPort:i.hostPort,containerId:o.id,containerName:o.name,containerPort:i.containerPort,protocol:i.protocol,hostIp:i.hostIp,missing:!0});return[...t.values()].sort((o,i)=>(o.hostPort??Infinity)-(i.hostPort??Infinity)||o.containerName.localeCompare(i.containerName)||o.containerPort-i.containerPort)}function F(n){return!n.missing&&n.hostPort!==null&&n.protocol===`tcp`?`http://localhost:${String(n.hostPort)}`:null}var G=f(()=>{});function X(n,e){if(n&1&&(Li(0,`a`,17),fS(1),Gm(2,`app-icon`,19),Nc()),n&2){let t=HE().$implicit,o=HE();Wm(`href`,e,Rp)(`title`,o.t().open(t.hostPort??0)),ec(),pg(t.hostPort),ec(),Wm(`size`,11)}}function Y(n,e){if(n&1&&(Li(0,`span`,20),fS(1),Nc()),n&2){let t=HE().$implicit;nS(t.missing?`text-danger`:`text-ink-400`),ec(),pg(t.hostPort??`—`)}}function Z(n,e){if(n&1&&SE(0,X,3,4,`a`,17)(1,Y,2,3,`span`,18),n&2){let t,o=e.$implicit;kE((t=HE().url(o))?0:1,t)}}function ee(n,e){if(n&1&&(Li(0,`span`,22),Gm(1,`app-icon`,23),fS(2),Nc()),n&2){let t=HE(2);Wm(`title`,t.t().missingTitle),ec(),Wm(`size`,12),ec(),Ac(` `,t.t().missing,` `)}}function te(n,e){if(n&1&&(Li(0,`a`,21),fS(1),Nc(),SE(2,ee,3,3,`span`,22)),n&2){let t=e.$implicit;Wm(`routerLink`,SS(3,W,t.containerId)),ec(),pg(t.containerName),ec(),kE(t.missing?2:-1)}}function ne(n,e){if(n&1&&(Li(0,`span`,24),fS(1),Nc()),n&2){let t=e.$implicit;ec(),mg(``,t.containerPort,`/`,t.protocol)}}function oe(n,e){if(n&1&&(Li(0,`span`,24),fS(1),Nc()),n&2){let t=HE().$implicit;ec(),pg(t.hostIp)}}function ie(n,e){if(n&1&&(Li(0,`span`,25),fS(1),Nc()),n&2){let t=HE(2);ec(),pg(t.t().allAddresses)}}function re(n,e){if(n&1&&SE(0,oe,2,1,`span`,24)(1,ie,2,1,`span`,25),n&2){let t=e.$implicit;kE(t.hostIp?0:1)}}var W;var O;f(()=>{Kr();ra();v();G();sk();oe$1();dk();x();Kr();W=n=>[`/containers`,n];O=class n{containers=C(u);t=Lt(()=>ok().networks.ports);problem=this.containers.problem;search=wt(``);zoek=jc(void 0);gaps=wt([]);columns=Lt(()=>{let e=this.t().columns;return[{key:`hostPort`,label:e.hostPort,width:`110px`},{key:`container`,label:e.container},{key:`target`,label:e.target,width:`150px`},{key:`address`,label:e.address,width:`150px`}]});all=Lt(()=>U(this.containers.containers(),this.gaps()));rows=Lt(()=>{let e=this.search().trim().toLowerCase().replace(/^:/,``);return e===``?this.all():this.all().filter(t=>`${String(t.hostPort??``)} ${t.containerName} ${String(t.containerPort)}/${t.protocol}`.toLowerCase().includes(e))});trackKey=e=>`${e.containerId}:${String(e.hostPort)}:${String(e.containerPort)}/${e.protocol}:${String(e.missing)}`;url=F;runningKey=Lt(()=>this.containers.containers().filter(e=>e.state===`running`&&e.missingNetwork===null).map(e=>`${e.id}:${e.name}`).join(`
|
|
2
|
+
`));constructor(){this.containers.refresh(),rf(()=>{let e=this.zoek();e!==void 0&&Tg(()=>this.search.set(e))}),rf(()=>{let e=this.runningKey();Tg(()=>{this.loadGaps(e)})})}async loadGaps(e){let t=e===``?[]:e.split(`
|
|
3
|
+
`).map(i=>{let[g=``,...f]=i.split(`:`);return{id:g,name:f.join(`:`)}}),o=await Promise.all(t.map(i=>window.electron.containers.wiring(i.id).catch(()=>null)));e===this.runningKey()&&this.gaps.set(t.flatMap((i,g)=>{let f=o[g]?.missingPorts??[];return f.length===0?[]:[{kind:`ports`,id:i.id,name:i.name,ports:f}]}))}static ɵfac=function(t){return new(t||n)};static ɵcmp=wc({type:n,selectors:[[`app-ports-page`]],inputs:{zoek:[1,`zoek`]},decls:20,vars:12,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,`data-testid`,`ports-search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`problem`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`columns`,`rows`,`trackKey`,`selectable`,`emptyMessage`],[`appCell`,`hostPort`],[`appCell`,`container`],[`appCell`,`target`],[`appCell`,`address`],[`target`,`_blank`,`rel`,`noreferrer`,1,`mx-focus`,`inline-flex`,`items-center`,`gap-1`,`font-mono`,`text-accent`,`tabular-nums`,`hover:underline`,3,`href`,`title`],[1,`font-mono`,`tabular-nums`,3,`class`],[`name`,`external`,3,`size`],[1,`font-mono`,`tabular-nums`],[1,`mx-focus`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`routerLink`],[`data-testid`,`port-missing`,1,`ml-2`,`inline-flex`,`items-center`,`gap-1`,`text-[12px]`,`text-danger`,3,`title`],[`name`,`warning`,3,`size`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-[12px]`,`text-ink-500`]],template:function(t,o){t&1&&(Li(0,`section`,0)(1,`div`,1)(2,`h1`,2),fS(3),Nc(),Li(4,`p`,3),fS(5),Nc(),Li(6,`div`,4)(7,`label`,5)(8,`span`,6),Gm(9,`app-icon`,7),Nc(),Li(10,`span`,8),fS(11),Nc(),Li(12,`input`,9),Jm(`input`,function(g){return o.search.set(g.target.value)}),Nc()()(),Gm(13,`app-page-messages`,10),Nc(),Li(14,`div`,11)(15,`app-data-table`,12),_m(16,Z,2,1,`ng-template`,13)(17,te,3,5,`ng-template`,14)(18,ne,2,2,`ng-template`,15)(19,re,2,1,`ng-template`,16),Nc()()()),t&2&&(ec(3),pg(o.t().title),ec(2),pg(o.t().intro),ec(4),Wm(`size`,15),ec(2),pg(o.t().searchLabel),ec(),Wm(`placeholder`,o.t().searchLabel)(`value`,o.search()),ec(),Wm(`problem`,o.problem()),ec(2),Wm(`columns`,o.columns())(`rows`,o.rows())(`trackKey`,o.trackKey)(`selectable`,!1)(`emptyMessage`,o.all().length===0?o.t().none:o.t().empty))},dependencies:[z,x$1,My,u$1,Yt],encapsulation:2})}})();export{O as PortsPage};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Ct as Tc,Dn as kE,En as jc,Ft as Wm,Gn as pg,Gt as _S,H as Li,I as Jm,J as My,Kt as _m,O as HE,On as kc,R as Kr,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,_r as wt,_t as SS,cn as ec,ct as Qm,er as sk,gt as SE,hr as wc,in as dk,ln as f,r as Ac,tt as Od,un as fS,ut as RE,wr as zE,xt as TE}from"./chunk-C_5f0tVq.js";import{i as Ie,o as Ne}from"./chunk-0lzDD7VN.js";function $(e){let n=[],t=0;for(let i of e.matchAll(ie))i.index>t&&n.push({kind:`text`,text:e.slice(t,i.index)}),n.push(i[1]===void 0?{kind:`bold`,text:i[2]??i[3]??``}:{kind:`code`,text:i[1]}),t=i.index+i[0].length;return t<e.length&&n.push({kind:`text`,text:e.slice(t)}),n}function Q(e){let n=e.replace(/\r\n?/g,`
|
|
2
|
+
`).split(`
|
|
3
|
+
`),t=[],i=[],o=null,a=()=>{i.length>0&&(t.push({kind:`paragraph`,inlines:$(i.join(`
|
|
4
|
+
`))}),i=[]),o!==null&&(t.push({kind:`list`,ordered:o.ordered,items:o.items.map($)}),o=null)};for(let p=0;p<n.length;p+=1){let d=n[p]??``,v=ee.exec(d);if(v!==null){a();let b=v[1]??"```",N=[];for(p+=1;p<n.length&&!oe(n[p]??``,b);)N.push(n[p]??``),p+=1;t.push({kind:`code`,language:v[2]??``,text:N.join(`
|
|
5
|
+
`)});continue}if(d.trim()===``){a();continue}let E=te.exec(d);if(E!==null){a(),t.push({kind:`heading`,inlines:$(E[1]??``)});continue}let F=ne.exec(d);if(F!==null){let b=/\d/.test(F[1]??``);(i.length>0||o!==null&&o.ordered!==b)&&a(),o??={ordered:b,items:[]},o.items.push(F[2]??``);continue}if(o!==null&&/^\s/.test(d)&&o.items.length>0){o.items[o.items.length-1]+=` ${d.trim()}`;continue}o!==null&&a(),i.push(d)}return a(),t}function oe(e,n){let t=e.trim();return t.length>=n.length&&[...t].every(i=>i===n[0])}var ee;var te;var ne;var ie;var U=f(()=>{ee=/^ {0,3}(`{3,}|~{3,})\s*([\w+#.-]*)\s*$/,te=/^ {0,3}#{1,6}\s+(.*?)\s*#*\s*$/,ne=/^ {0,3}([-*+]|\d{1,3}[.)])\s+(.*)$/,ie=/`([^`\n]+)`|\*\*([^*\n]+?)\*\*|__([^_\n]+?)__/g});function re(e,n){if(e&1&&(Li(0,`strong`,1),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function ae(e,n){if(e&1&&(Li(0,`code`,2),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function le(e,n){if(e&1&&fS(0),e&2){let t=HE().$implicit;Ac(` `,t.text,` `)}}function ce(e,n){if(e&1&&SE(0,re,2,1,`strong`,1)(1,ae,2,1,`code`,2)(2,le,1,1),e&2){let t,i=n.$implicit;kE((t=i.kind)===`bold`?0:t===`code`?1:2)}}function se(e,n){if(e&1&&kc(0,ce,3,1,null,null,TE),e&2){let t=n.$implicit;Tc(t)}}function pe(e,n){e&1&&Qm(0)}function de(e,n){if(e&1&&(Li(0,`p`,3),_m(1,pe,1,0,`ng-container`,5),Nc()),e&2){let t=HE().$implicit;HE();let i=zE(1);ec(),Wm(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,SS(2,I,t.inlines))}}function me(e,n){e&1&&Qm(0)}function _e(e,n){if(e&1&&(Li(0,`p`,1),_m(1,me,1,0,`ng-container`,5),Nc()),e&2){let t=HE().$implicit;HE();let i=zE(1);ec(),Wm(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,SS(2,I,t.inlines))}}function xe(e,n){e&1&&Qm(0)}function ue(e,n){if(e&1&&(Li(0,`li`),_m(1,xe,1,0,`ng-container`,5),Nc()),e&2){let t=n.$implicit,i=HE(4),o=zE(1);ec(),Wm(`ngTemplateOutlet`,o)(`ngTemplateOutletContext`,SS(2,I,i.asInlines(t)))}}function ye(e,n){if(e&1&&(Li(0,`ol`,6),kc(1,ue,2,4,`li`,null,TE),Nc()),e&2){let t=HE(2).$implicit;ec(),Tc(t.items)}}function ge(e,n){e&1&&Qm(0)}function fe(e,n){if(e&1&&(Li(0,`li`),_m(1,ge,1,0,`ng-container`,5),Nc()),e&2){let t=n.$implicit,i=HE(4),o=zE(1);ec(),Wm(`ngTemplateOutlet`,o)(`ngTemplateOutletContext`,SS(2,I,i.asInlines(t)))}}function Ce(e,n){if(e&1&&(Li(0,`ul`,7),kc(1,fe,2,4,`li`,null,TE),Nc()),e&2){let t=HE(2).$implicit;ec(),Tc(t.items)}}function Te(e,n){if(e&1&&SE(0,ye,3,0,`ol`,6)(1,Ce,3,0,`ul`,7),e&2){let t=HE().$implicit;kE(t.ordered?0:1)}}function be(e,n){if(e&1){let t=RE();Li(0,`div`,4)(1,`pre`,8),fS(2),Nc(),Li(3,`button`,9),Jm(`click`,function(){Od(t);let o=HE(),a=o.$implicit,p=o.$index;return Ld(HE().copy(p,a.text))}),Gm(4,`app-icon`,10),Nc()()}if(e&2){let t=HE(),i=t.$implicit,o=t.$index,a=HE();ec(2),pg(i.text),ec(),Wm(`title`,a.copiedIndex()===o?a.common().copied:a.common().copy),zr(`aria-label`,a.copiedIndex()===o?a.common().copied:a.common().copy),ec(),Wm(`name`,a.copiedIndex()===o?`check`:`copy`)(`size`,13)}}function ke(e,n){if(e&1&&SE(0,de,2,4,`p`,3)(1,_e,2,4,`p`,1)(2,Te,2,1)(3,be,5,5,`div`,4),e&2){let t,i=n.$implicit;kE((t=i.kind)===`paragraph`?0:t===`heading`?1:t===`list`?2:t===`code`?3:-1)}}var I;var W;var he=f(()=>{Ne();Kr();U();sk();dk();Kr();I=e=>({$implicit:e});W=class e{text=jc.required();blocks=Lt(()=>Q(this.text()));common=Lt(()=>ok().common);copiedIndex=wt(null);asInlines(n){return n}async copy(n,t){try{await navigator.clipboard.writeText(t),this.copiedIndex.set(n),setTimeout(()=>this.copiedIndex.update(i=>i===n?null:i),1500)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-answer-text`]],hostAttrs:[1,`block`,`space-y-2`],inputs:{text:[1,`text`]},decls:4,vars:0,consts:[[`line`,``],[1,`font-semibold`,`text-ink-100`],[1,`rounded`,`bg-ink-800`,`px-1`,`py-px`,`font-mono`,`text-[0.92em]`,`text-ink-100`],[1,`whitespace-pre-line`],[`data-testid`,`answer-code`,1,`relative`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`list-decimal`,`space-y-0.5`,`pl-5`],[1,`list-disc`,`space-y-0.5`,`pl-5`],[1,`overflow-x-auto`,`rounded-md`,`bg-ink-900`,`py-1.5`,`pr-9`,`pl-2`,`font-mono`,`text-[12px]`,`leading-snug`,`text-ink-100`],[`type`,`button`,`data-testid`,`answer-copy`,1,`mx-focus`,`absolute`,`top-1`,`right-1`,`rounded`,`p-1`,`text-ink-400`,`hover:bg-ink-800`,`hover:text-ink-100`,3,`click`,`title`],[3,`name`,`size`]],template:function(t,i){t&1&&(_m(0,se,2,0,`ng-template`,null,0,_S),kc(2,ke,4,1,null,null,TE)),t&2&&(ec(2),Tc(i.blocks()))},dependencies:[My,Ie],encapsulation:2})}});export{he as n,W as t};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Jt as ag,Kt as _m,Mn as lk,O as HE,On as kc,Pn as mg,Pt as W,R as Kr,S as G,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,Zt as bS,_r as wt$1,_t as SS,cn as ec,en as bg,er as sk,gt as SE,hr as wc,in as dk,ln as f,lr as ve,r as Ac,sn as eH,sr as vS,tt as Od,u as C,un as fS,ur as vg,ut as RE,vt as Sc,wt as Tg,xr as yS}from"./chunk-C_5f0tVq.js";import{n as y,t as f$1}from"./chunk-BWEbjl8i.js";import"./chunk-Bg_b-Jjw.js";import{n as y$1,t as c}from"./chunk-nJjV_Xqa.js";import"./chunk-0lzDD7VN.js";import{n as o,t as i}from"./chunk-D1Z6IQ-O.js";import"./chunk-S9IeOMe4.js";import"./chunk-CG34bAfY.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-C_ouaGQt.js";import{n as v,t as u}from"./chunk-PF0v2lXq.js";import{n as x,t as u$1}from"./chunk-Dw1WSpzf.js";import{a as Yt,r as Q,s as fe,u as ra}from"./chunk-CW5lS8he.js";import{n as u$2,t as c$1}from"./chunk-DieHqkfe.js";import{n as V,t as G$1}from"./chunk-BpGvpxhZ.js";import{n as W$1,t as J}from"./chunk-Bo6U-hOl.js";function $e(n,t){if(n&1){let e=RE();Li(0,`button`,18),Jm(`click`,function(){let o=Od(e).$implicit;return Ld(HE(2).view.set(o))}),fS(1),Nc()}if(n&2){let e=t.$implicit,i=HE(2);ag(`border-accent`,i.view()===e)(`text-accent`,i.view()===e),zr(`data-testid`,`compose-view-`+e)(`aria-pressed`,i.view()===e),ec(),Ac(` `,e===`raw`?i.t().raw:i.t().resolved,` `)}}function We(n,t){n&1&&(Li(0,`pre`,9),fS(1),Nc()),n&2&&(ec(),pg(t))}function Le(n,t){n&1&&(Li(0,`p`,10),fS(1),Nc()),n&2&&(ec(),pg(t))}function Ge(n,t){if(n&1&&(Li(0,`p`,11),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function Ae(n,t){n&1&&(Li(0,`span`,13),fS(1),Nc()),n&2&&(ec(),pg(t))}function He(n,t){if(n&1){let e=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),Li(7,`div`,7),kc(8,$e,2,7,`button`,8,Sc),Nc(),SE(10,We,2,1,`pre`,9)(11,Le,2,1,`p`,10)(12,Ge,2,1,`p`,11),Li(13,`div`,12),SE(14,Ae,2,1,`span`,13),Li(15,`button`,14),Gm(16,`app-icon`,15),fS(17),Nc(),Li(18,`button`,16),Jm(`click`,function(){Od(e);return Ld(HE().copy())}),Gm(19,`app-icon`,17),fS(20),Nc()()()()}if(n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),Ac(` `,o.view()===`raw`?o.t().rawHint:o.t().resolvedHint,` `),ec(2),Tc(o.views),ec(2),kE((e=o.body())?10:(e=o.problem())?11:12,e),ec(4),kE((i=o.copyProblem())?14:-1,i),ec(2),Wm(`size`,14),ec(),Ac(` `,o.common().close,` `),ec(),Wm(`disabled`,o.body()===null),ec(),Wm(`name`,o.copied()?`check`:`copy`)(`size`,14),ec(),Ac(` `,o.copied()?o.common().copied:o.common().copy,` `)}}var te;var Se=f(()=>{Kr();Je$1();lk();dk();sk();Kr();te=class n{open=mj(!1);project=jc.required();t=Lt(()=>ok().compose.file);common=Lt(()=>ok().common);views=[`raw`,`resolved`];view=wt$1(`raw`);files=wt$1(null);config=wt$1(null);copied=wt$1(!1);copyProblem=wt$1(null);constructor(){rf(()=>{if(!this.open())return;let t=this.project();Tg(()=>{this.load(t)})})}body(){if(this.view()===`resolved`){let e=this.config();return e?.ok===!0?e.yaml:null}let t=this.files();return t?.ok!==!0?null:t.files.map(e=>`# ${e.path}
|
|
2
|
+
${e.problem??(e.content.trim()===``?this.t().empty:e.content)}`).join(`
|
|
3
|
+
|
|
4
|
+
`)}problem(){let t=this.view()===`resolved`?this.config():this.files();return t?.ok===!1?t.problem:null}async copy(){let t=this.body();if(t!==null)try{await navigator.clipboard.writeText(t),this.copyProblem.set(null),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch(e){this.copyProblem.set(this.t().copyFailed(eH(e)))}}async load(t){this.files.set(null),this.config.set(null),this.copied.set(!1),this.copyProblem.set(null),this.view.set(`raw`);let[e,i]=await Promise.all([window.electron.compose.files(t).catch(o=>({ok:!1,problem:eH(o)})),window.electron.compose.config(t).catch(o=>({ok:!1,problem:eH(o)}))]);this.files.set(e),this.config.set(i)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-file-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`compose-file-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-4xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`flex`,`shrink-0`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-accent`,`text-accent`],[`data-testid`,`compose-file-text`,1,`mt-3`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre`,`text-ink-200`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`items-center`,`justify-end`,`gap-2`],[1,`mr-auto`,`text-[12px]`,`text-danger`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`compose-file-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`]],template:function(e,i){e&1&&(Li(0,`div`,0),vg(`openChange`,function(p){return vS(i.open,p)||(i.open=p),p}),_m(1,He,21,10,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Qe(n,t){if(n&1&&(Li(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function Je(n,t){if(n&1&&(Li(0,`li`,14),Gm(1,`app-icon`,16),Li(2,`span`,17),fS(3),Nc(),Li(4,`span`,18),fS(5),Nc(),Li(6,`span`,19),fS(7),Nc()()),n&2){let e=t.$implicit,i=HE(3);ec(),nS(i.iconClass(e)),Wm(`name`,i.iconOf(e))(`size`,13),ec(),Wm(`title`,e.reference),ec(),pg(e.reference),ec(2),pg(e.services.join(`, `)),ec(),nS(e.state===`failed`?`text-danger`:`text-ink-400`),Wm(`title`,e.problem??``),ec(),Ac(` `,i.stateOf(e),` `)}}function Xe(n,t){if(n&1&&(Li(0,`li`,15),Gm(1,`app-icon`,20),Li(2,`span`,21),fS(3),Nc(),Li(4,`span`,22),fS(5),Nc()()),n&2){let e=t.$implicit,i=HE(3);ec(),Wm(`size`,13),ec(2),pg(e.service),ec(2),pg(e.reason===`build`?i.t().skippedBuild:i.t().skippedDigest)}}function Ye(n,t){if(n&1&&(Li(0,`ul`,8),kc(1,Je,8,11,`li`,14,Ke),kc(3,Xe,6,3,`li`,15,qe),Nc()),n&2){let e=HE(2);ec(),Tc(e.rows()),ec(2),Tc(e.skipped())}}function Ze(n,t){if(n&1&&(Li(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().noImages)}}function et(n,t){n&1&&(Li(0,`p`,9),fS(1),Nc()),n&2&&(ec(),pg(t))}function tt(n,t){if(n&1&&(Li(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().checking)}}function nt(n,t){if(n&1&&(Li(0,`p`,23),Gm(1,`app-icon`,24),fS(2),Nc()),n&2){let e=HE(3);ec(),Wm(`size`,13),ec(),Ac(` `,e.t().upToDate)}}function it(n,t){if(n&1&&(Li(0,`p`,27),fS(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().renewed(e.renewed.join(`, `)))}}function ot(n,t){if(n&1&&(Li(0,`p`,28),fS(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().unchanged(e.unchanged.join(`, `)))}}function at(n,t){if(n&1&&(Li(0,`p`,29),fS(1),Nc()),n&2){let e=t.$implicit;ec(),pg(e)}}function rt(n,t){if(n&1&&(SE(0,it,2,1,`p`,27),SE(1,ot,2,1,`p`,28),kc(2,at,2,1,`p`,29,Sc)),n&2){let e=t;kE(e.renewed.length>0?0:-1),ec(),kE(e.unchanged.length>0?1:-1),ec(),Tc(e.problems)}}function lt(n,t){if(n&1){let e=RE();Li(0,`div`,26)(1,`button`,30),Jm(`click`,function(){Od(e);return Ld(HE(4).renew())}),Gm(2,`app-icon`,31),fS(3),Nc(),Li(4,`span`,32),fS(5),Nc()()}if(n&2){let e=HE(4);ec(),Wm(`disabled`,e.phase()===`renewing`),ec(),Wm(`size`,14),ec(),Ac(` `,e.phase()===`renewing`?e.t().renewing:e.t().renew,` `),ec(2),pg(e.t().renewHint)}}function pt(n,t){if(n&1&&(Li(0,`p`,25),fS(1),Nc(),SE(2,rt,4,2)(3,lt,6,4,`div`,26)),n&2){let e,i=HE(),o=HE(2);ec(),pg(o.t().stale(i.join(`, `))),ec(),kE((e=o.result())?2:3,e)}}function dt(n,t){n&1&&(Li(0,`div`,10),SE(1,nt,3,2,`p`,23)(2,pt,4,2),Nc()),n&2&&(ec(),kE(t.length===0?1:2))}function st(n,t){if(n&1&&(Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),SE(7,Qe,2,1,`p`,7),SE(8,Ye,5,0,`ul`,8)(9,Ze,2,1,`p`,7),SE(10,et,2,1,`p`,9),SE(11,tt,2,1,`p`,7),SE(12,dt,3,1,`div`,10),Li(13,`div`,11)(14,`button`,12),Gm(15,`app-icon`,13),fS(16),Nc()()()()),n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),pg(o.t().description),ec(),kE(o.phase()===`loading`?7:-1),ec(),kE(o.rows().length>0||o.skipped().length>0?8:o.phase()!==`loading`&&o.phase()!==`failed`?9:-1),ec(2),kE((e=o.problem())?10:-1,e),ec(),kE(o.phase()===`checking`?11:-1),ec(),kE((i=o.stale())?12:-1,i),ec(3),Wm(`size`,14),ec(),Ac(` `,o.finished()?o.common().close:o.common().cancel,` `)}}function ct(n){let t=n.layers.reduce((e,i)=>e+i.total,0);return t===0?null:Math.round(n.layers.reduce((e,i)=>e+i.current,0)/t*100)}var Ke;var qe;var ne;var Ee=f(()=>{Kr();Je$1();lk();sk();dk();Kr();Ke=(n,t)=>t.reference,qe=(n,t)=>t.service;ne=class n{open=mj(!1);project=jc.required();t=Lt(()=>ok().compose.update);common=Lt(()=>ok().common);phase=wt$1(`loading`);rows=wt$1([]);skipped=wt$1([]);stale=wt$1(null);result=wt$1(null);problem=wt$1(null);finished=Lt(()=>[`ready`,`done`,`failed`].includes(this.phase()));round=0;stopPull=null;constructor(){C(ve).onDestroy(()=>this.cancel()),rf(()=>{let t=this.open(),e=this.project();Tg(()=>{t?this.start(e):this.cancel()})})}stateOf(t){let e=this.t();switch(t.state){case`waiting`:return e.waiting;case`pulling`:return t.percent===null?e.pulling:`${e.pulling} ${String(t.percent)}%`;case`done`:return e.pulled;case`failed`:return e.failed(t.problem??``)}}iconOf(t){return t.state===`done`?`check`:t.state===`failed`?`warning`:`download`}iconClass(t){return t.state===`done`?`text-ok`:t.state===`failed`?`text-danger`:t.state===`pulling`?`text-accent`:`text-ink-500`}cancel(){this.round+=1,this.stopPull?.(),this.stopPull=null}async start(t){this.cancel();let e=this.round,i=()=>e===this.round;this.phase.set(`loading`),this.rows.set([]),this.skipped.set([]),this.stale.set(null),this.result.set(null),this.problem.set(null);try{let o=await window.electron.compose.images(t);if(!i())return;this.rows.set(o.images.map(x=>G(W({},x),{state:`waiting`,percent:null,problem:null}))),this.skipped.set(o.skipped),this.phase.set(`pulling`);for(let x of o.images)if(await this.pull(x.reference,i),!i())return;this.phase.set(`checking`);let p=await window.electron.compose.stale(t);i()&&(this.stale.set(p),this.phase.set(`ready`))}catch(o){i()&&(this.problem.set(eH(o)),this.phase.set(`failed`))}}async pull(t,e){let i=p=>{e()&&this.rows.update(x=>x.map(O=>O.reference===t?W(W({},O),p):O))};i({state:`pulling`});let o=await window.electron.images.pull(t);if(!o.ok){i({state:`failed`,problem:o.problem});return}await new Promise(p=>{let x=window.electron.images.onPullProgress(o.streamId,$=>{if(!$.done){i({percent:ct($)});return}i($.problem===null?{state:`done`,percent:null}:{state:`failed`,problem:$.problem}),O()}),O=()=>{x(),window.electron.images.close(o.streamId),this.stopPull=null,p()};this.stopPull=O})}async renew(){let t=this.round;this.phase.set(`renewing`);try{let e=await window.electron.compose.renew(this.project());t===this.round&&(this.result.set(e),this.phase.set(`done`))}catch(e){t===this.round&&(this.result.set({renewed:[],unchanged:[],problems:[eH(e)]}),this.phase.set(`done`))}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-project-update-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`project-update`,1,`w-full`,`max-w-2xl`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`project-update-images`,1,`mt-4`,`space-y-1.5`,`text-[13px]`],[1,`mt-4`,`text-[13px]`,`text-danger`],[`data-testid`,`project-update-stale`,1,`mt-4`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-2.5`,`text-[13px]`],[1,`mt-5`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`],[1,`flex`,`items-center`,`gap-3`,`text-ink-500`],[3,`name`,`size`],[1,`min-w-0`,`truncate`,`font-mono`,`text-ink-100`,3,`title`],[1,`min-w-0`,`truncate`,`text-ink-500`],[1,`ml-auto`,`shrink-0`,`text-[12px]`,3,`title`],[`name`,`code`,3,`size`],[1,`font-mono`],[1,`ml-auto`,`text-[12px]`],[1,`flex`,`items-center`,`gap-2`,`text-ink-300`],[`name`,`check`,1,`text-ok`,3,`size`],[1,`text-ink-200`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`mt-2`,`text-ok`],[1,`mt-1`,`text-ink-400`],[1,`mt-2`,`text-danger`],[`type`,`button`,`data-testid`,`project-update-renew`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li(0,`div`,0),vg(`openChange`,function(p){return vS(i.open,p)||(i.open=p),p}),_m(1,st,17,9,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function _t(n,t){if(n&1&&(Li(0,`div`,6),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.version)}}function xt(n,t){if(n&1&&(Li(0,`div`,13),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.problem)}}function ft(n,t){n&1&&SE(0,_t,2,1,`div`,6)(1,xt,2,1,`div`,13),n&2&&kE(t.cliAvailable?0:1)}function yt(n,t){if(n&1&&(Li(0,`div`,6),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().updating)}}function bt(n,t){if(n&1&&(Li(0,`span`,20),fS(1),Nc()),n&2){let e=t;Wm(`title`,e),ec(),pg(e)}}function vt(n,t){if(n&1&&(Li(0,`div`,23),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().busy)}}function ht(n,t){if(n&1&&(Li(0,`div`,26),Gm(1,`app-icon`,27),fS(2),Nc()),n&2){let e=t,i=HE().$implicit,o=HE();nS(e.problem?`text-danger`:`text-accent`),Wm(`title`,e.problem?``:o.t().driftTitle),zr(`data-testid`,`compose-drift-`+i.name),ec(),Wm(`name`,e.problem?`warning`:`file`)(`size`,12),ec(),Ac(` `,e.text,` `)}}function Ct(n,t){if(n&1&&(Li(0,`span`,31),fS(1),Nc()),n&2){let e=HE().$implicit,i=HE(2).$implicit,o=HE();Wm(`title`,o.t().driftTitle),zr(`data-testid`,`compose-drift-`+i.name+`-`+e.name),ec(),pg(o.t().drift)}}function wt(n,t){if(n&1&&(Li(0,`span`,38),fS(1),Nc()),n&2){let e=t.$implicit;ec(),Ac(` `,e.hostPort?e.hostPort+`:`+e.containerPort:e.containerPort,` `)}}function Dt(n,t){if(n&1&&(Li(0,`span`,36),kc(1,wt,2,1,`span`,38,gt),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.ports.slice(0,2))}}function kt(n,t){if(n&1&&(Li(0,`div`,34),Gm(1,`app-state-dot`,17),Li(2,`a`,35),fS(3),Nc(),Li(4,`span`,36),fS(5),Nc(),Li(6,`span`,37),fS(7),Nc(),SE(8,Dt,3,0,`span`,36),Nc()),n&2){let e=t.$implicit;ec(),Wm(`state`,e.state),ec(),Wm(`routerLink`,SS(6,mt,e.id)),ec(),pg(e.name),ec(2),pg(e.status),ec(2),pg(e.image),ec(),kE(e.ports.length>0?8:-1)}}function Pt(n,t){if(n&1){let e=RE();Li(0,`div`,28)(1,`div`,29)(2,`div`,30),fS(3),Nc(),SE(4,Ct,2,3,`span`,31),Li(5,`button`,32),Jm(`click`,function(){let o=Od(e).$implicit,p=HE(2).$implicit;return Ld(HE().recreate(p,o))}),Gm(6,`app-icon`,33),fS(7),Nc()(),kc(8,kt,9,8,`div`,34,ut),Nc()}if(n&2){let e=t.$implicit,i=HE(2).$implicit,o=bS(0),p=HE();ec(3),pg(e.name),ec(),kE(p.drifted(i.name,e.name)?4:-1),ec(),Wm(`disabled`,o||!p.canCompose(i))(`title`,p.canCompose(i)?p.t().recreateTitle:p.composeBlockedReason(i)),zr(`data-testid`,`compose-recreate-`+e.name)(`aria-label`,p.t().recreateAria(e.name)),ec(),Wm(`size`,14),ec(),Ac(` `,p.t().recreate,` `),ec(),Tc(e.containers)}}function jt(n,t){if(n&1&&(Li(0,`div`,25),kc(1,Pt,10,8,`div`,28,Te),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.services)}}function St(n,t){if(n&1){let e=RE();bg(0),Li(1,`div`,9)(2,`div`,14)(3,`button`,15),Jm(`click`,function(){let o=Od(e).$implicit;return Ld(HE().toggle(o.name))}),Gm(4,`app-icon`,16)(5,`app-state-dot`,17),Li(6,`span`,18),fS(7),Nc()(),Li(8,`span`,19),fS(9),Nc(),SE(10,bt,2,2,`span`,20),Li(11,`div`,21)(12,`app-action-menu`,22),Jm(`picked`,function(o){let p=Od(e).$implicit;return Ld(HE().onProjectMenu(o,p))}),Nc()()(),SE(13,vt,2,1,`div`,23),SE(14,ht,3,7,`div`,24),SE(15,jt,3,0,`div`,25),Nc()}if(n&2){let e,i,o=t.$implicit,p=HE(),x=yS(p.busy(o));ec(3),zr(`aria-expanded`,p.isExpanded(o.name))(`aria-label`,p.isExpanded(o.name)?p.t().collapse(o.name):p.t().expand(o.name)),ec(),Wm(`name`,p.isExpanded(o.name)?`chevronDown`:`chevronRight`)(`size`,14),ec(),Wm(`state`,o.state),ec(2),pg(o.name),ec(2),mg(` `,p.projectLabelOf(o.state),` · `,p.t().runningOf(o.running,o.total),` `),ec(),kE((e=o.workingDir)?10:-1,e),ec(2),Wm(`label`,p.t().menuAria(o.name))(`items`,p.projectMenu(o)),ec(),kE(x?13:-1),ec(),kE((i=p.driftNote(o.name))?14:-1,i),ec(),kE(p.isExpanded(o.name)?15:-1)}}function Et(n,t){if(n&1&&(Li(0,`p`,10),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}var mt;var Te;var ut;var gt;var Ie;f(()=>{Kr();ra();y();y$1();v();sk();J();dk();x();u$2();Se();Ee();G$1();o();Kr();mt=n=>[`/containers`,n],Te=(n,t)=>t.name,ut=(n,t)=>t.id,gt=(n,t)=>t.containerPort;Ie=class n{containers=C(u);compose=C(c);t=Lt(()=>ok().compose);common=Lt(()=>ok().common);loading=this.containers.loading;problem=this.containers.problem;composePending=this.compose.pending;containerPending=this.containers.pending;status=this.compose.status;projects=Lt(()=>f$1(this.containers.containers()));expanded=wt$1(new Set);confirmOpen=wt$1(!1);fileOpen=wt$1(!1);fileProject=wt$1(``);pendingDown=wt$1(null);updateOpen=wt$1(!1);drift=wt$1(new Map);projectKey=Lt(()=>this.projects().filter(t=>t.workingDir!==null).map(t=>t.name).join(`
|
|
5
|
+
`));updateProject=wt$1(``);bestand=jc(void 0);afbreken=jc(void 0);bijwerken=jc(void 0);router=C(fe);route=C(Q);constructor(){this.containers.refresh(),this.compose.loadStatus(),rf(()=>{let t=this.bestand();t!==void 0&&Tg(()=>{this.fileProject.set(t),this.fileOpen.set(!0),i(this.router,this.route,`bestand`)})}),rf(()=>{let t=this.projectKey(),e=this.status()?.cliAvailable;t!==``&&e===!0&&Tg(()=>t.split(`
|
|
6
|
+
`).forEach(i=>{this.checkDrift(i)}))}),rf(()=>{let t=this.bijwerken();t!==void 0&&Tg(()=>{this.openUpdate(t),i(this.router,this.route,`bijwerken`)})}),rf(()=>{let t=this.afbreken();t!==void 0&&Tg(()=>{this.pendingDown.set(t),this.confirmOpen.set(!0),i(this.router,this.route,`afbreken`)})})}isExpanded(t){return this.expanded().has(t)}toggle(t){let e=new Set(this.expanded());e.delete(t)||e.add(t),this.expanded.set(e)}projectLabelOf(t){return this.t().state[t]}busy(t){return this.composePending().has(t.name)||t.containerIds.some(e=>this.containerPending().has(e))}composeBlockedReason(t){let e=this.status();return e!==null&&!e.cliAvailable?this.t().noCli:t.workingDir===null?this.t().noWorkingDir:``}canCompose(t){return this.composeBlockedReason(t)===``}run(t,e){this.containers.runMany(t,e.containerIds)}up(t){this.compose.up(t.name)}projectMenu(t){let e=this.t(),i=this.common(),o=this.busy(t),p=this.canCompose(t),x=p?void 0:this.composeBlockedReason(t);return[{id:`up`,label:e.up,icon:`plus`,disabled:o||!p,hint:x??`docker compose up -d`},{id:`start`,label:i.start,icon:`play`,disabled:o},{id:`stop`,label:i.stop,icon:`stop`,disabled:o},{id:`restart`,label:i.restart,icon:`refresh`,disabled:o},{id:`update`,label:e.update.menu,icon:`download`,disabled:o||!p,hint:x??e.update.hint},{id:`file`,label:e.file.button,icon:`file`,disabled:t.workingDir===null,separated:!0},{id:`down`,label:e.down,icon:`trash`,danger:!0,disabled:o||!p,hint:x??`docker compose down`,separated:!0}]}onProjectMenu(t,e){t===`up`?this.up(e):t===`update`?this.openUpdate(e.name):t===`file`?this.openFile(e):t===`down`?this.askDown(e):this.run(t,e)}recreate(t,e){this.compose.recreate(t.name,e.name).then(()=>this.checkDrift(t.name))}async checkDrift(t){try{let e=await window.electron.compose.drift(t);this.drift.update(i=>new Map(i).set(t,e))}catch{}}drifted(t,e){let i=this.drift().get(t);return i?.ok===!0&&i.changed.includes(e)}driftNote(t){let e=this.drift().get(t);return e===void 0?null:e.ok?e.changed.length===0?null:{text:this.t().driftProject(e.changed.join(`, `)),problem:!1}:{text:this.t().driftProblem(e.problem),problem:!0}}openUpdate(t){this.updateProject.set(t),this.updateOpen.set(!0)}openFile(t){this.fileProject.set(t.name),this.fileOpen.set(!0)}askDown(t){this.pendingDown.set(t.name),this.confirmOpen.set(!0)}confirmDown(){let t=this.pendingDown();t!==null&&(this.compose.down(t),this.pendingDown.set(null))}downDescription(){let t=this.pendingDown();return t===null?``:this.t().downDialog.description(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-page`]],inputs:{bestand:[1,`bestand`],afbreken:[1,`afbreken`],bijwerken:[1,`bijwerken`]},decls:19,vars:14,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`ml-auto`,`text-right`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`min-h-0`,`flex-1`,`space-y-3`,`overflow-y-auto`,`px-6`,`pb-6`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`],[1,`py-10`,`text-center`,`text-[13px]`,`text-ink-400`],[3,`openChange`,`open`,`project`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`],[1,`max-w-xs`,`text-[12px]`,`text-warn`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`,`px-3`,`py-2.5`],[`type`,`button`,1,`mx-focus`,`flex`,`min-w-0`,`cursor-pointer`,`items-center`,`gap-2`,`text-left`,3,`click`],[1,`shrink-0`,`text-ink-500`,3,`name`,`size`],[3,`state`],[1,`truncate`,`text-[14px]`,`font-medium`,`text-ink-100`],[1,`shrink-0`,`text-[12px]`,`text-ink-400`],[1,`min-w-0`,`truncate`,`font-mono`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`ml-auto`,`shrink-0`],[`compact`,``,3,`picked`,`label`,`items`],[1,`px-3`,`pb-2`,`text-[12px]`,`text-ink-500`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`class`,`title`],[1,`border-t`,`border-ink-800`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`title`],[3,`name`,`size`],[1,`border-b`,`border-ink-800`,`px-3`,`py-2`,`last:border-b-0`],[1,`flex`,`items-center`,`gap-3`],[1,`text-[12px]`,`font-medium`,`text-ink-300`],[1,`text-[11px]`,`text-accent`,3,`title`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-1`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`pl-3`,`text-[13px]`],[1,`mx-focus`,`min-w-0`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`routerLink`],[1,`shrink-0`,`text-ink-500`],[1,`min-w-0`,`truncate`,`text-ink-400`],[1,`mr-2`]],template:function(e,i){if(e&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Li(6,`p`,4),fS(7),Nc()(),Li(8,`div`,5),SE(9,ft,2,1),SE(10,yt,2,1,`div`,6),Nc()(),Gm(11,`app-page-messages`,7),Nc(),Li(12,`div`,8),kc(13,St,16,15,`div`,9,Te,!1,Et,2,1,`p`,10),Nc()(),Li(16,`app-compose-file-dialog`,11),vg(`openChange`,function(p){return vS(i.fileOpen,p)||(i.fileOpen=p),p}),Nc(),Li(17,`app-project-update-dialog`,11),vg(`openChange`,function(p){return vS(i.updateOpen,p)||(i.updateOpen=p),p}),Nc(),Li(18,`app-confirm-dialog`,12),vg(`openChange`,function(p){return vS(i.confirmOpen,p)||(i.confirmOpen=p),p}),Jm(`confirmed`,function(){return i.confirmDown()}),Nc()),e&2){let o;ec(5),pg(i.t().title),ec(2),pg(i.t().intro),ec(2),kE((o=i.status())?9:-1,o),ec(),kE(i.loading()?10:-1),ec(),Wm(`problem`,i.problem()),ec(2),Tc(i.projects()),ec(3),hg(`open`,i.fileOpen),Wm(`project`,i.fileProject()),ec(),hg(`open`,i.updateOpen),Wm(`project`,i.updateProject()),ec(),hg(`open`,i.confirmOpen),Wm(`title`,i.t().downDialog.title)(`description`,i.downDescription())(`confirmLabel`,i.t().downDialog.confirm)}},dependencies:[Yt,My,W$1,u$1,c$1,te,ne,V],encapsulation:2})}})();export{Ie as ComposePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as M,R as Kr,Zn as rf,ln as f$1,z as LD}from"./chunk-
|
|
1
|
+
import{G as M,R as Kr,Zn as rf,ln as f$1,z as LD}from"./chunk-C_5f0tVq.js";import{E as tn,g as en}from"./chunk-S9IeOMe4.js";function L(r){return{provide:v,useFactory:r}}var p;var N;var f;var v;var g=f$1(()=>{Kr();tn();p={mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}},N=50,f=class{constructor(e){this.host=e,this.nodes=[],this.prevAnimationNames=new WeakMap,this.pendingExits=new Set,this.removeListeners=null,this.closeTimestamp=0,this.exitVersion=0,this.waapiPending=!1,this.safetyTimer=null,this.prevPresent=e.present(),this.state=this.prevPresent?`mounted`:`unmounted`,this.prevPresent&&this.mount(),rf(()=>{let i=e.present();i!==this.prevPresent&&(this.prevPresent=i,i?this.send(`MOUNT`):e.isBrowser?(this.closeTimestamp=this.now(),LD(()=>this.evaluateExit(),{injector:e.injector})):this.send(`UNMOUNT`))},{injector:e.injector,debugName:`PresenceMachine.present`})}dispose(){this.unmount()}evaluateExit(){if(this.state!==`mounted`||this.host.present())return;this.pendingExits.clear();for(let i of this.nodes){let t=getComputedStyle(i),n=t.animationName||`none`,s=this.prevAnimationNames.get(i)??`none`;n!==`none`&&t.display!==`none`&&s!==n&&this.pendingExits.add(i)}let e=this.collectExitAnimations();if(this.pendingExits.size===0&&e.length===0){this.send(`UNMOUNT`);return}if(this.send(`ANIMATION_OUT`),e.length>0){this.waapiPending=!0;let i=this.exitVersion;Promise.all(e.map(t=>t.finished.catch(()=>{}))).then(()=>this.finishExit(i)),this.armSafetyNet(i,e)}}collectExitAnimations(){if(!this.host.isBrowser)return[];let e=[];for(let i of this.nodes)if(typeof i.getAnimations==`function`)for(let t of i.getAnimations({subtree:!0})){let n=t.startTime===null||Number(t.startTime)>=this.closeTimestamp;(t.playState===`running`||t.pending)&&n&&e.push(t)}return e}armSafetyNet(e,i){let t=new Set(this.nodes);for(let s of i){let o=s.effect?.target;o instanceof HTMLElement&&t.add(o)}let n=0;for(let s of t)n=Math.max(n,en(s));this.clearSafetyNet(),this.safetyTimer=setTimeout(()=>this.finishExit(e),n+N)}finishExit(e){e===this.exitVersion&&(this.waapiPending=!1,this.clearSafetyNet(),this.send(`ANIMATION_END`))}clearSafetyNet(){this.safetyTimer!==null&&(clearTimeout(this.safetyTimer),this.safetyTimer=null)}send(e){let i=p[this.state][e];if(!(i===void 0||i===this.state))if(this.state=i,i===`mounted`)if(this.exitVersion++,this.waapiPending=!1,this.clearSafetyNet(),this.nodes.length>0){this.pendingExits.clear();for(let t of this.nodes)this.prevAnimationNames.set(t,this.getAnimationName(t))}else this.mount();else i===`unmounted`&&(this.exitVersion++,this.unmount())}mount(){if(this.nodes=this.host.mountView(),this.host.isBrowser&&this.nodes.length>0){for(let e of this.nodes)this.prevAnimationNames.set(e,this.getAnimationName(e));this.addAnimationListeners()}}unmount(){this.removeListeners?.(),this.removeListeners=null,this.clearSafetyNet(),this.waapiPending=!1,this.host.destroyView(),this.nodes=[],this.pendingExits.clear()}addAnimationListeners(){let e=t=>{let n=t.target;this.nodes.includes(n)&&this.prevAnimationNames.set(n,this.getAnimationName(n))},i=t=>{let n=t.target;this.nodes.includes(n)&&this.getAnimationName(n).includes(t.animationName)&&(this.pendingExits.delete(n),!this.waapiPending&&this.pendingExits.size===0&&this.finishExit(this.exitVersion))};for(let t of this.nodes)t.addEventListener(`animationstart`,e),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i);this.removeListeners=()=>{for(let t of this.nodes)t.removeEventListener(`animationstart`,e),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}getAnimationName(e){return(this.host.isBrowser?getComputedStyle(e).animationName:``)||`none`}now(){let e=typeof document<`u`?document.timeline?.currentTime:null;return typeof e==`number`?e:Number(e??0)}},v=new M(`RdxPresenceContext`)});export{v as i,f as n,g as r,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,Kn as pj,L as Km,R as Kr,T as Gm,Tn as jI,Tr as zr,W as Lt,X as Nc,Zn as rf,_ as Dj,_r as wt,cn as ec,hr as wc,j as IS,ln as f,t as $I,u as C,un as fS,yr as xm}from"./chunk-C_5f0tVq.js";import{E as tn,S as or,c as Ln,i as Gn,m as Zn,r as Et,s as Kn,u as Tt}from"./chunk-S9IeOMe4.js";var X;var G;var J;var p;var E;var j=f(()=>{Kr();Kr();tn();tn();[X,G]=Gn(`RdxSwitchContext`,`components/switch`),J=()=>{let i=C(p),f=Ln();return{checked:i.checkedState,disabled:Lt(()=>!!f.disabled()),readonly:i.readonly,required:i.required,name:i.name,form:i.form,value:i.submitValue,ariaLabel:i.ariaLabel,ariaLabelledBy:i.ariaLabelledBy,registerNativeInput:n=>i.registerNativeInput(n),markAsTouched:()=>i.markAsTouched()}},p=(()=>{class i extends Kn{constructor(){super(),this.cva=Ln(),this.id=jc(Tt(`rdx-switch-`)),this.defaultChecked=jc(void 0,{transform:e=>e===void 0?void 0:Dj(e)}),this.checked=mj(!1),this.disabled=jc(!1,{transform:Dj}),this.readonly=jc(!1,{transform:Dj}),this.required=jc(!1,{transform:Dj}),this.name=jc(),this.form=jc(),this.submitValue=jc(`on`,{alias:`value`}),this.uncheckedValue=jc(),this.ariaLabelledBy=jc(void 0,{alias:`aria-labelledby`}),this.ariaLabel=jc(void 0,{alias:`aria-label`}),this.onCheckedChange=pj(),this.checkedState=Lt(()=>!!this.cva.value()),this.isDisabled=Lt(()=>!!this.cva.disabled()),this.nativeInput=wt(null),this.nativeInputOwnsValue=Lt(()=>this.nativeInput()!==null&&(this.checkedState()||this.uncheckedValue()===void 0)),this.invalidState=this.formUi.invalidState,this.touchedState=this.formUi.touchedState,this.dirtyState=this.formUi.dirtyState,or({name:this.name,form:this.form,disabled:this.isDisabled,value:this.checkedState,serialize:e=>{let t=e?this.submitValue():this.uncheckedValue();return t===void 0?[]:[t]},hasNativeControl:this.nativeInputOwnsValue,syncNativeControl:()=>{let e=this.nativeInput();e&&(e.checked=this.checkedState())},defaultValue:()=>this.defaultChecked()??this.checkedState(),onReset:e=>{this.checked.set(e),this.resetNgControl(e)||this.cva.writeValue(e),this.formUi.resetInteractionState?.()}});let n=!1;rf(()=>{let e=this.defaultChecked();!n&&e!==void 0&&(n=!0,this.checked.set(e),this.cva.setValue(e))})}formUiTouchTarget(){return Ln()}markAsTouched(){this.formUi.markAsTouched()}toggle(n){if(this.isDisabled()||this.readonly())return;let e=!this.cva.value(),t=n?.currentTarget instanceof HTMLElement?n.currentTarget:void 0,{eventDetails:d}=Zn(`none`,n??new Event(`switch.checked-change`),t);this.onCheckedChange.emit({checked:e,eventDetails:d}),!d.isCanceled()&&(this.checked.set(e),this.cva.setValue(e),this.formUi.markDirty())}registerNativeInput(n){return this.nativeInput.set(n),()=>{this.nativeInput()===n&&this.nativeInput.set(null)}}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵdir=$I({type:i,selectors:[[`button`,`rdxSwitchRoot`,``]],hostAttrs:[`role`,`switch`,`type`,`button`],hostVars:15,hostBindings:function(e,t){e&1&&Jm(`click`,function(O){return t.toggle(O)})(`blur`,function(){return t.markAsTouched()}),e&2&&(Km(`id`,t.id()),zr(`aria-checked`,t.checkedState())(`aria-required`,t.required()?`true`:void 0)(`aria-readonly`,t.readonly()?`true`:void 0)(`aria-invalid`,t.displayValid()===!1?`true`:void 0)(`data-checked`,t.checkedState()?``:void 0)(`data-unchecked`,t.checkedState()?void 0:``)(`data-disabled`,t.isDisabled()?``:void 0)(`data-readonly`,t.readonly()?``:void 0)(`data-required`,t.required()?``:void 0)(`data-invalid`,t.displayValid()===!1?``:void 0)(`data-valid`,t.displayValid()===!0?``:void 0)(`data-touched`,t.touchedState()?``:void 0)(`data-dirty`,t.dirtyState()?``:void 0)(`disabled`,t.isDisabled()?``:void 0))},inputs:{id:[1,`id`],defaultChecked:[1,`defaultChecked`],checked:[1,`checked`],disabled:[1,`disabled`],readonly:[1,`readonly`],required:[1,`required`],name:[1,`name`],form:[1,`form`],submitValue:[1,`value`,`submitValue`],uncheckedValue:[1,`uncheckedValue`],ariaLabelledBy:[1,`aria-labelledby`,`ariaLabelledBy`],ariaLabel:[1,`aria-label`,`ariaLabel`]},outputs:{checked:`checkedChange`,onCheckedChange:`onCheckedChange`},exportAs:[`rdxSwitchRoot`],features:[IS([G(J)]),jI([{directive:Et,inputs:[`value`,`checked`,`disabled`,`disabled`]}]),xm]})}}return i})(),E=(()=>{class i{constructor(){this.rootContext=X()}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵdir=$I({type:i,selectors:[[`span`,`rdxSwitchThumb`,``]],hostVars:5,hostBindings:function(e,t){e&2&&zr(`data-checked`,t.rootContext.checked()?``:void 0)(`data-unchecked`,t.rootContext.checked()?void 0:``)(`data-disabled`,t.rootContext.disabled()?``:void 0)(`data-readonly`,t.rootContext.readonly()?``:void 0)(`data-required`,t.rootContext.required()?``:void 0)},exportAs:[`rdxSwitchThumb`]})}}return i})()});var P;var K=f(()=>{Kr();j();Kr();P=class i{label=jc.required();on=mj.required();disabled=jc(!1);static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-filter-switch`]],hostAttrs:[1,`flex`,`items-center`,`gap-2`,`text-[13px]`,`text-ink-300`],inputs:{label:[1,`label`],on:[1,`on`],disabled:[1,`disabled`]},outputs:{on:`onChange`},decls:4,vars:4,consts:[[`type`,`button`,`rdxSwitchRoot`,``,1,`mx-focus`,`relative`,`h-5`,`w-9`,`shrink-0`,`cursor-pointer`,`rounded-full`,`border`,`border-ink-700`,`bg-ink-800`,`transition-colors`,`data-[checked]:border-accent`,`data-[checked]:bg-accent`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,3,`onCheckedChange`,`checked`,`disabled`],[`rdxSwitchThumb`,``,1,`block`,`size-3.5`,`translate-x-[3px]`,`rounded-full`,`bg-ink-400`,`transition-transform`,`data-[checked]:translate-x-[19px]`,`data-[checked]:bg-white`]],template:function(n,e){n&1&&(Li(0,`button`,0),Jm(`onCheckedChange`,function(d){return e.on.set(d.checked)}),Gm(1,`span`,1),Nc(),Li(2,`span`),fS(3),Nc()),n&2&&(Wm(`checked`,e.on())(`disabled`,e.disabled()),zr(`aria-label`,e.label()),ec(3),pg(e.label()))},dependencies:[p,E],encapsulation:2})}});export{P as n,K as t};
|