@yinuo-ngm/server 1.0.12 → 1.0.13
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/lib/app.js +3 -1
- package/lib/plugins/error-handler.plugin.js +14 -0
- package/lib/plugins/static.plugin.js +4 -12
- package/lib/plugins/ws/topics/index.d.ts +2 -0
- package/lib/plugins/ws/topics/index.js +2 -0
- package/lib/plugins/ws/topics/svn.ws.d.ts +9 -0
- package/lib/plugins/ws/topics/svn.ws.js +46 -0
- package/lib/plugins/ws/ws.plugin.js +27 -11
- package/lib/routes/index.js +6 -0
- package/lib/routes/project.routes.js +15 -1
- package/lib/routes/sprite-browse.routes.d.ts +2 -0
- package/lib/routes/sprite-browse.routes.js +107 -0
- package/lib/routes/sprite.routes.js +40 -61
- package/lib/routes/static-files.routes.d.ts +2 -0
- package/lib/routes/static-files.routes.js +83 -0
- package/lib/routes/svn.routes.d.ts +2 -0
- package/lib/routes/svn.routes.js +53 -0
- package/package.json +6 -5
- package/www/3rdpartylicenses.txt +26 -0
- package/www/browser/{chunk-DJJC6FPO.js → chunk-25RT7L2O.js} +1 -1
- package/www/browser/{chunk-EP45FT55.js → chunk-2P5WKSWB.js} +2 -2
- package/www/browser/{chunk-FNLA2MNI.js → chunk-2XZHN52E.js} +1 -1
- package/www/browser/chunk-3MBM5AMR.js +1 -0
- package/www/browser/{chunk-AZV6AWGC.js → chunk-3V5PIKHE.js} +1 -1
- package/www/browser/{chunk-EC33AXSR.js → chunk-42JVTVYH.js} +1 -1
- package/www/browser/chunk-4IQIZX7Y.js +1 -0
- package/www/browser/{chunk-3MAJTMXX.js → chunk-4UAHOL42.js} +1 -1
- package/www/browser/{chunk-YVSVIACA.js → chunk-56SDBJDG.js} +1 -1
- package/www/browser/{chunk-IMQG3SAE.js → chunk-5DD65JMJ.js} +1 -1
- package/www/browser/{chunk-PTMJ422K.js → chunk-5EQOKH7G.js} +6 -6
- package/www/browser/chunk-6JH45SUC.js +1 -0
- package/www/browser/{chunk-G73D24UX.js → chunk-6X6PEDE5.js} +1 -1
- package/www/browser/{chunk-CO7S3LZV.js → chunk-AI6SNMEH.js} +1 -1
- package/www/browser/chunk-AMXCOT2F.js +1 -0
- package/www/browser/{chunk-J2JNFWJN.js → chunk-DP3VTELD.js} +1 -1
- package/www/browser/chunk-E6LF4XBJ.js +3 -0
- package/www/browser/chunk-EMK65RIU.js +1 -0
- package/www/browser/chunk-EYGWZTTT.js +1 -0
- package/www/browser/{chunk-CJISJEP3.js → chunk-GKY4LJF4.js} +1 -1
- package/www/browser/{chunk-V27A2EK4.js → chunk-HJC5MNP5.js} +1 -1
- package/www/browser/chunk-ITXWAN4J.js +1 -0
- package/www/browser/{chunk-GCKL62DR.js → chunk-IZNTCWTR.js} +1 -1
- package/www/browser/{chunk-CPA2B3DD.js → chunk-KN3WZJH7.js} +1 -1
- package/www/browser/chunk-KPO75P5E.js +1 -0
- package/www/browser/chunk-LWBZC6ZL.js +2 -0
- package/www/browser/{chunk-HCBKQAGF.js → chunk-NYXWJKSW.js} +1 -1
- package/www/browser/{chunk-ROB7EMN5.js → chunk-OC62FHHS.js} +1 -1
- package/www/browser/{chunk-POZS3PD3.js → chunk-QM5ROT66.js} +1 -1
- package/www/browser/{chunk-35COW2FA.js → chunk-W633D3VG.js} +1 -1
- package/www/browser/{chunk-53YRDYLS.js → chunk-X3HFJACM.js} +2 -2
- package/www/browser/chunk-YFAKNLWB.js +2 -0
- package/www/browser/{chunk-3PWCJ3D5.js → chunk-ZSPNEYSK.js} +1 -1
- package/www/browser/images/placeholder.png +0 -0
- package/www/browser/index.html +1 -1
- package/www/browser/main-O5GAJRDW.js +34 -0
- package/www/browser/chunk-37KQ3UTB.js +0 -1
- package/www/browser/chunk-3LDMO67C.js +0 -1
- package/www/browser/chunk-MD6RDGU4.js +0 -1
- package/www/browser/chunk-OUE23ZE4.js +0 -2
- package/www/browser/chunk-W6TCGG53.js +0 -1
- package/www/browser/chunk-XN5C33GH.js +0 -3
- package/www/browser/main-V3VSEZ7K.js +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as an}from"./chunk-FNLA2MNI.js";import{f as on}from"./chunk-CO7S3LZV.js";import{e as sn}from"./chunk-G73D24UX.js";import"./chunk-CJISJEP3.js";import{d as rn}from"./chunk-35COW2FA.js";import"./chunk-POZS3PD3.js";import{a as yn}from"./chunk-HZ73CM45.js";import{d as Se,e as Ne,f as Ie}from"./chunk-DJJC6FPO.js";import{e as Wt,g as qt,h as Ut}from"./chunk-ROB7EMN5.js";import{A as en,B as De,E as tn,G as nn,c as ze,g as Zt,o as Ht,v as Kt,w as Jt,x as Gt,y as Xt,z as Yt}from"./chunk-EP45FT55.js";import{Ab as ce,Bb as Qt,Cb as Z,F as Vt,Fb as nt,H as ae,Hb as me,I as kt,M as ee,N as $,O as et,P as tt,T as Ft,U as Rt,V as ve,W as Ee,Xa as jt,Y as be,Ya as Bt,Z as Te,Za as $t,jb as Me,lb as re,pb as se,q as Xe,r as Ot,vb as le,w as Ye,wb as At,x as Pt,xb as we,yb as Lt,z as B}from"./chunk-PTMJ422K.js";import"./chunk-HFZLJHYR.js";import{B as Ge,d as It,i as O}from"./chunk-53YRDYLS.js";import{$b as N,Aa as Ct,Ab as xt,Ba as gt,Ca as _e,Dc as Mt,Eb as w,Ec as ye,Fb as Q,Fc as de,Gb as zt,Ha as I,Ic as m,Jc as V,Kb as J,Kc as F,Mc as Ze,Nc as He,Oa as Ue,Oc as Ke,Ra as he,Tb as vt,Vb as y,Vc as Y,W as ut,Wc as wt,Xb as x,Yb as Et,_b as S,a as H,ac as f,ad as Dt,b as K,bc as s,cc as l,da as qe,dc as T,e as hn,f as We,fd as j,g as dt,gd as St,hc as G,ic as X,kc as v,ld as Je,m as mt,ma as ft,mb as p,na as L,qc as C,r as ie,ra as u,rb as b,rd as xe,s as P,sb as _t,tc as r,ub as ht,uc as bt,vc as Tt,vd as oe,wd as Nt,xa as _,xb as yt,xc as W,ya as h,yc as q,z as ge,zc as U}from"./chunk-SJG2JCPL.js";var it=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=zt({type:t,selectors:[["button","nz-trans-button",""]],hostVars:8,hostBindings:function(i,o){i&2&&ye("border","0")("background","transparent")("padding","0")("line-height","inherit")}})}return t})(),ot=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=L({})}return t})();function vn(t,n){if(t&1&&(G(0),T(1,"nz-icon",2),X()),t&2){let e=n.$implicit;p(),f("nzType",e)}}var En=["textarea"];function bn(t,n){if(t&1){let e=v();s(0,"textarea",2,0),C("blur",function(){_(e);let o=r();return h(o.confirm())}),l(),s(2,"button",3),C("click",function(){_(e);let o=r();return h(o.confirm())}),T(3,"nz-icon",4),l()}}function Tn(t,n){if(t&1&&(G(0),T(1,"nz-icon",7),X()),t&2){let e=n.$implicit;p(),f("nzType",e)}}function Mn(t,n){if(t&1){let e=v();s(0,"button",5),C("click",function(){_(e);let o=r();return h(o.onClick())}),J(1,Tn,2,1,"ng-container",6),l()}if(t&2){let e=r();f("nzTooltipTitle",e.tooltip===null?null:e.tooltip||(e.locale==null?null:e.locale.edit)),p(),f("nzStringTemplateOutlet",e.icon)}}var wn=["ellipsisContainer"],Dn=["expandable"],Sn=["contentTemplate"],Nn=["*"],In=t=>({content:t});function On(t,n){t&1&&Tt(0)}function Pn(t,n){if(t&1&&(y(0,On,1,0),m(1)),t&2){let e=n.content;x(e?-1:0),p(),F(" ",e," ")}}function Vn(t,n){}function kn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.nzSuffix," ")}}function Fn(t,n){if(t&1&&(J(0,Vn,0,0,"ng-template",5),y(1,kn,1,1)),t&2){let e=r(2),i=Mt(1);f("ngTemplateOutlet",i)("ngTemplateOutletContext",wt(3,In,e.nzContent)),p(),x(e.nzSuffix?1:-1)}}function Rn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.ellipsisStr," ")}}function jn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.nzSuffix," ")}}function Bn(t,n){if(t&1){let e=v();s(0,"a",7,2),C("click",function(){_(e);let o=r(3);return h(o.onExpand())}),m(2),l()}if(t&2){let e=r(3);p(2),F(" ",e.locale==null?null:e.locale.expand," ")}}function $n(t,n){if(t&1&&(T(0,"span",null,1),y(2,Rn,1,1),y(3,jn,1,1),y(4,Bn,3,1,"a",6)),t&2){let e=r(2);p(2),x(e.isEllipsis?2:-1),p(),x(e.nzSuffix?3:-1),p(),x(e.nzExpandable&&e.isEllipsis?4:-1)}}function An(t,n){if(t&1&&y(0,Fn,2,5)(1,$n,5,3),t&2){let e=r();x(e.expanded||!e.hasOperationsWithEllipsis&&e.nzEllipsisRows===1&&!e.hasEllipsisObservers||e.canCssEllipsis||e.nzSuffix&&e.expanded?0:1)}}function Ln(t,n){if(t&1){let e=v();s(0,"nz-text-edit",8),C("endEditing",function(o){_(e);let a=r();return h(a.onEndEditing(o))})("startEditing",function(){_(e);let o=r();return h(o.onStartEditing())}),l()}if(t&2){let e=r();f("text",e.nzContent)("icon",e.nzEditIcon)("tooltip",e.nzEditTooltip)}}function Qn(t,n){if(t&1){let e=v();s(0,"nz-text-copy",9),C("textCopy",function(o){_(e);let a=r();return h(a.onTextCopy(o))}),l()}if(t&2){let e=r();f("text",e.copyText)("tooltips",e.nzCopyTooltips)("icons",e.nzCopyIcons)}}var at=(()=>{class t{cdr=u(xe);clipboard=u(rn);i18n=u(ze);destroyRef=u(_e);copied=!1;copyId;locale;nativeElement=u(he).nativeElement;copyTooltip=null;copedTooltip=null;copyIcon="copy";copedIcon="check";text;tooltips;icons=["copy","check"];textCopy=new b;constructor(){this.destroyRef.onDestroy(()=>{clearTimeout(this.copyId)})}ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.updateTooltips(),this.cdr.markForCheck()})}ngOnChanges(e){let{tooltips:i,icons:o}=e;i&&this.updateTooltips(),o&&this.updateIcons()}onClick(){if(this.copied)return;this.copied=!0,this.cdr.detectChanges();let e=this.text;this.textCopy.emit(e),this.clipboard.copy(e),this.onCopied()}onCopied(){clearTimeout(this.copyId),this.copyId=setTimeout(()=>{this.copied=!1,this.cdr.detectChanges()},3e3)}updateTooltips(){if(this.tooltips===null)this.copedTooltip=null,this.copyTooltip=null;else if(Array.isArray(this.tooltips)){let[e,i]=this.tooltips;this.copyTooltip=e||this.locale?.copy,this.copedTooltip=i||this.locale?.copied}else this.copyTooltip=this.locale?.copy,this.copedTooltip=this.locale?.copied;this.cdr.markForCheck()}updateIcons(){let[e,i]=this.icons;this.copyIcon=e,this.copedIcon=i,this.cdr.markForCheck()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["nz-text-copy"]],inputs:{text:"text",tooltips:"tooltips",icons:"icons"},outputs:{textCopy:"textCopy"},exportAs:["nzTextCopy"],features:[Ue],decls:2,vars:4,consts:[["type","button","nz-tooltip","","nz-trans-button","",1,"ant-typography-copy",3,"click","nzTooltipTitle"],[4,"nzStringTemplateOutlet"],[3,"nzType"]],template:function(i,o){i&1&&(s(0,"button",0),C("click",function(){return o.onClick()}),J(1,vn,2,1,"ng-container",1),l()),i&2&&(de("ant-typography-copy-success",o.copied),f("nzTooltipTitle",o.copied?o.copedTooltip:o.copyTooltip),p(),f("nzStringTemplateOutlet",o.copied?o.copedIcon:o.copyIcon))},dependencies:[me,nt,ot,it,$,ee,tt,et],encapsulation:2,changeDetection:0})}return t})(),rt=(()=>{class t{ngZone=u(_t);cdr=u(xe);i18n=u(ze);destroyRef=u(_e);editing=!1;locale;text;icon="edit";tooltip;startEditing=new b;endEditing=new b(!0);set textarea(e){this.textarea$.next(e)}autosizeDirective;beforeText;currentText;nativeElement=u(he).nativeElement;textarea$=new mt(null);injector=u(Ct);ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.cdr.markForCheck()}),this.textarea$.pipe(qe(e=>Ye(e?.nativeElement,"keydown")),B(this.destroyRef)).subscribe(e=>{e.keyCode!==27&&e.keyCode!==13||this.ngZone.run(()=>{e.keyCode===27?this.onCancel():this.onEnter(e),this.cdr.markForCheck()})}),this.textarea$.pipe(qe(e=>Ye(e?.nativeElement,"input")),B(this.destroyRef)).subscribe(e=>{this.currentText=e.target.value})}onClick(){this.beforeText=this.text,this.currentText=this.beforeText,this.editing=!0,this.startEditing.emit(),this.focusAndSetValue()}confirm(){this.editing=!1,this.endEditing.emit(this.currentText)}onEnter(e){e.stopPropagation(),e.preventDefault(),this.confirm()}onCancel(){this.currentText=this.beforeText,this.confirm()}focusAndSetValue(){let{injector:e}=this;ht(()=>{this.textarea$.pipe(ut(i=>i!=null),B(this.destroyRef)).subscribe(i=>{i.nativeElement.focus(),i.nativeElement.value=this.currentText||"",this.autosizeDirective.resizeToFitContent(),this.cdr.markForCheck()})},{injector:e})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["nz-text-edit"]],viewQuery:function(i,o){if(i&1&&(W(En,5),W(we,5)),i&2){let a;q(a=U())&&(o.textarea=a.first),q(a=U())&&(o.autosizeDirective=a.first)}},inputs:{text:"text",icon:"icon",tooltip:"tooltip"},outputs:{startEditing:"startEditing",endEditing:"endEditing"},exportAs:["nzTextEdit"],decls:2,vars:1,consts:[["textarea",""],["nz-tooltip","","nz-trans-button","",1,"ant-typography-edit",3,"nzTooltipTitle"],["nz-input","","nzAutosize","",3,"blur"],["nz-trans-button","",1,"ant-typography-edit-content-confirm",3,"click"],["nzType","enter"],["nz-tooltip","","nz-trans-button","",1,"ant-typography-edit",3,"click","nzTooltipTitle"],[4,"nzStringTemplateOutlet"],[3,"nzType"]],template:function(i,o){i&1&&y(0,bn,4,0)(1,Mn,2,2,"button",1),i&2&&x(o.editing?0:1)},dependencies:[Z,ce,we,ot,it,$,ee,me,nt,tt,et],encapsulation:2,changeDetection:0})}return t})(),Wn="typography",qn="ant-typography-expand",Un=(()=>{var k;let t,n=[],e=[],i,o=[],a=[],E,D=[],z=[],R,fe=[],Ce=[],lt,ct=[],pt=[];return k=class{_nzModuleName=Wn;nzConfigService=u(Vt);el=u(he).nativeElement;cdr=u(xe);viewContainerRef=u(xt);renderer=u(yt);platform=u(kt);i18n=u(ze);resizeService=u($t);directionality=u(Pt);document=u(gt);destroyRef=u(_e);nzCopyable=!1;nzEditable=!1;nzDisabled=!1;nzExpandable=!1;nzEllipsis=!1;nzCopyTooltips=P(this,n,void 0);nzCopyIcons=(P(this,e),P(this,o,["copy","check"]));nzEditTooltip=(P(this,a),P(this,D,void 0));nzEditIcon=(P(this,z),P(this,fe,"edit"));nzContent=P(this,Ce);nzEllipsisRows=P(this,ct,1);nzType=P(this,pt);nzCopyText;nzSuffix;nzContentChange=new b;nzCopy=new b;nzExpandChange=new b;nzOnEllipsis=new b;textEditRef;textCopyRef;ellipsisContainer;expandableBtn;contentTemplate;locale;expandableBtnElementCache=null;editing=!1;ellipsisText;cssEllipsis=!1;isEllipsis=!0;expanded=!1;ellipsisStr="...";dir="ltr";get hasEllipsisObservers(){return this.nzOnEllipsis.observers.length>0}get canCssEllipsis(){return this.nzEllipsis&&this.cssEllipsis&&!this.expanded&&!this.hasEllipsisObservers}get hasOperationsWithEllipsis(){return(this.nzCopyable||this.nzEditable||this.nzExpandable)&&this.nzEllipsis}viewInit=!1;requestId=-1;windowResizeSubscription=dt.EMPTY;get copyText(){return typeof this.nzCopyText=="string"?this.nzCopyText:this.nzContent}constructor(){this.destroyRef.onDestroy(()=>{this.expandableBtnElementCache=null,this.windowResizeSubscription.unsubscribe()})}onTextCopy(g){this.nzCopy.emit(g)}onStartEditing(){this.editing=!0}onEndEditing(g){this.editing=!1,this.nzContentChange.emit(g),this.nzContent===g&&this.renderOnNextFrame(),this.cdr.markForCheck()}onExpand(){this.isEllipsis=!1,this.expanded=!0,this.nzExpandChange.emit(),this.nzOnEllipsis.emit(!1)}canUseCSSEllipsis(){return this.nzEditable||this.nzCopyable||this.nzExpandable||this.nzSuffix||this.hasEllipsisObservers?!1:this.nzEllipsisRows===1?Xe("textOverflow"):Xe("webkitLineClamp")}renderOnNextFrame(){Bt(this.requestId),!(!this.viewInit||!this.nzEllipsis||this.nzEllipsisRows<0||this.expanded||!this.platform.isBrowser)&&(this.requestId=jt(()=>this.syncEllipsis()))}getOriginContentViewRef(){let g=this.viewContainerRef.createEmbeddedView(this.contentTemplate,{content:this.nzContent});return g.detectChanges(),{viewRef:g,removeView:()=>this.viewContainerRef.remove(this.viewContainerRef.indexOf(g))}}syncEllipsis(){if(this.cssEllipsis)return;let{viewRef:g,removeView:d}=this.getOriginContentViewRef(),c=[this.textCopyRef,this.textEditRef].filter(ne=>ne&&ne.nativeElement).map(ne=>ne.nativeElement),M=this.getExpandableBtnElement();M&&c.push(M);let{contentNodes:Le,text:Qe,ellipsis:pe}=Ot(this.el,this.nzEllipsisRows,g.rootNodes,c,this.ellipsisStr,this.nzSuffix);d(),this.ellipsisText=Qe,pe!==this.isEllipsis&&(this.isEllipsis=pe,this.nzOnEllipsis.emit(pe));let te=this.ellipsisContainer.nativeElement;for(;te.firstChild;)this.renderer.removeChild(te,te.firstChild);Le.forEach(ne=>{this.renderer.appendChild(te,ne.cloneNode(!0))}),this.cdr.markForCheck()}getExpandableBtnElement(){if(this.nzExpandable){let g=this.locale?this.locale.expand:"",d=this.expandableBtnElementCache;if(!d||d.innerText===g){let c=this.document.createElement("a");c.className=qn,c.innerText=g,this.expandableBtnElementCache=c}return this.expandableBtnElementCache}else return this.expandableBtnElementCache=null,null}renderAndSubscribeWindowResize(){this.platform.isBrowser&&(this.windowResizeSubscription.unsubscribe(),this.cssEllipsis=this.canUseCSSEllipsis(),this.renderOnNextFrame(),this.windowResizeSubscription=this.resizeService.connect().pipe(B(this.destroyRef)).subscribe(()=>this.renderOnNextFrame()))}ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.cdr.markForCheck()}),this.directionality.change?.pipe(B(this.destroyRef)).subscribe(g=>{this.dir=g,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterViewInit(){this.viewInit=!0,this.renderAndSubscribeWindowResize()}ngOnChanges(g){let{nzCopyable:d,nzEditable:c,nzExpandable:M,nzEllipsis:Le,nzContent:Qe,nzEllipsisRows:pe,nzSuffix:te}=g;(d||c||M||Le||Qe||pe||te)&&this.nzEllipsis&&(this.expanded?this.windowResizeSubscription.unsubscribe():this.renderAndSubscribeWindowResize())}},(()=>{let g=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ae()],i=[ae()],E=[ae()],R=[ae()],lt=[ae()],ie(null,null,t,{kind:"field",name:"nzCopyTooltips",static:!1,private:!1,access:{has:d=>"nzCopyTooltips"in d,get:d=>d.nzCopyTooltips,set:(d,c)=>{d.nzCopyTooltips=c}},metadata:g},n,e),ie(null,null,i,{kind:"field",name:"nzCopyIcons",static:!1,private:!1,access:{has:d=>"nzCopyIcons"in d,get:d=>d.nzCopyIcons,set:(d,c)=>{d.nzCopyIcons=c}},metadata:g},o,a),ie(null,null,E,{kind:"field",name:"nzEditTooltip",static:!1,private:!1,access:{has:d=>"nzEditTooltip"in d,get:d=>d.nzEditTooltip,set:(d,c)=>{d.nzEditTooltip=c}},metadata:g},D,z),ie(null,null,R,{kind:"field",name:"nzEditIcon",static:!1,private:!1,access:{has:d=>"nzEditIcon"in d,get:d=>d.nzEditIcon,set:(d,c)=>{d.nzEditIcon=c}},metadata:g},fe,Ce),ie(null,null,lt,{kind:"field",name:"nzEllipsisRows",static:!1,private:!1,access:{has:d=>"nzEllipsisRows"in d,get:d=>d.nzEllipsisRows,set:(d,c)=>{d.nzEllipsisRows=c}},metadata:g},ct,pt),g&&Object.defineProperty(k,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g})})(),We(k,"\u0275fac",function(d){return new(d||k)}),We(k,"\u0275cmp",w({type:k,selectors:[["nz-typography"],["","nz-typography",""],["p","nz-paragraph",""],["span","nz-text",""],["h1","nz-title",""],["h2","nz-title",""],["h3","nz-title",""],["h4","nz-title",""]],viewQuery:function(d,c){if(d&1&&(W(rt,5),W(at,5),W(wn,5),W(Dn,5),W(Sn,5)),d&2){let M;q(M=U())&&(c.textEditRef=M.first),q(M=U())&&(c.textCopyRef=M.first),q(M=U())&&(c.ellipsisContainer=M.first),q(M=U())&&(c.expandableBtn=M.first),q(M=U())&&(c.contentTemplate=M.first)}},hostVars:26,hostBindings:function(d,c){d&2&&(ye("-webkit-line-clamp",c.canCssEllipsis&&c.nzEllipsisRows>1?c.nzEllipsisRows:null),de("ant-typography",!c.editing)("ant-typography-rtl",c.dir==="rtl")("ant-typography-edit-content",c.editing)("ant-typography-secondary",c.nzType==="secondary")("ant-typography-warning",c.nzType==="warning")("ant-typography-danger",c.nzType==="danger")("ant-typography-success",c.nzType==="success")("ant-typography-disabled",c.nzDisabled)("ant-typography-ellipsis",c.nzEllipsis&&!c.expanded)("ant-typography-single-line",c.nzEllipsis&&c.nzEllipsisRows===1)("ant-typography-ellipsis-single-line",c.canCssEllipsis&&c.nzEllipsisRows===1)("ant-typography-ellipsis-multiple-line",c.canCssEllipsis&&c.nzEllipsisRows>1))},inputs:{nzCopyable:[2,"nzCopyable","nzCopyable",oe],nzEditable:[2,"nzEditable","nzEditable",oe],nzDisabled:[2,"nzDisabled","nzDisabled",oe],nzExpandable:[2,"nzExpandable","nzExpandable",oe],nzEllipsis:[2,"nzEllipsis","nzEllipsis",oe],nzCopyTooltips:"nzCopyTooltips",nzCopyIcons:"nzCopyIcons",nzEditTooltip:"nzEditTooltip",nzEditIcon:"nzEditIcon",nzContent:"nzContent",nzEllipsisRows:[2,"nzEllipsisRows","nzEllipsisRows",Nt],nzType:"nzType",nzCopyText:"nzCopyText",nzSuffix:"nzSuffix"},outputs:{nzContentChange:"nzContentChange",nzCopy:"nzCopy",nzExpandChange:"nzExpandChange",nzOnEllipsis:"nzOnEllipsis"},exportAs:["nzTypography"],features:[Ue],ngContentSelectors:Nn,decls:5,vars:3,consts:[["contentTemplate",""],["ellipsisContainer",""],["expandable",""],[3,"text","icon","tooltip"],[3,"text","tooltips","icons"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-typography-expand"],[1,"ant-typography-expand",3,"click"],[3,"endEditing","startEditing","text","icon","tooltip"],[3,"textCopy","text","tooltips","icons"]],template:function(d,c){d&1&&(bt(),J(0,Pn,2,2,"ng-template",null,0,Dt),y(2,An,2,1),y(3,Ln,1,3,"nz-text-edit",3),y(4,Qn,1,3,"nz-text-copy",4)),d&2&&(p(2),x(c.editing?-1:2),p(),x(c.nzEditable?3:-1),p(),x(c.nzCopyable&&!c.editing?4:-1))},dependencies:[It,rt,at],encapsulation:2,changeDetection:0})),k})(),pn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=L({imports:[Un,at,rt]})}return t})();var ue=hn(yn());function Jn(t,n){if(t&1){let e=v();s(0,"div",0)(1,"span",1),m(2,"\u6709\u672A\u4FDD\u5B58\u66F4\u6539"),l(),s(3,"button",2),C("click",function(){_(e);let o=r();return h(o.diff.emit())}),m(4,"Diff"),l(),s(5,"button",2),C("click",function(){_(e);let o=r();return h(o.reset.emit())}),m(6,"\u91CD\u7F6E"),l(),s(7,"button",3),C("click",function(){_(e);let o=r();return h(o.save.emit())}),m(8,"\u4FDD\u5B58"),l()()}}var Oe=class t{dirty=!1;diff=new b;reset=new b;save=new b;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-change-bar-component"]],inputs:{dirty:"dirty"},outputs:{diff:"diff",reset:"reset",save:"save"},decls:1,vars:1,consts:[[1,"change-bar"],[1,"hint"],["nz-button","",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(e,i){e&1&&y(0,Jn,9,0,"div",0),e&2&&x(i.dirty?0:-1)},dependencies:[O,Te,be,ve,Ee],styles:[".change-bar[_ngcontent-%COMP%]{width:100%;padding:10px 20px;display:flex;justify-content:flex-end;align-items:center;gap:10px;box-shadow:0 -2px 8px #0000000f;background:var(--app-component-bg);border:1px solid var(--app-border-color)}.hint[_ngcontent-%COMP%]{margin-right:auto;opacity:.75}"]})};var Gn=(t,n)=>n.id;function Xn(t,n){if(t&1){let e=v();s(0,"div",6),C("click",function(){let o=_(e).$implicit,a=r();return h(a.selectDomain(o))}),s(1,"div",7)(2,"div",8),T(3,"nz-icon",9),l(),s(4,"div",10)(5,"div",11),m(6),l(),s(7,"div",12),m(8),l()()()()}if(t&2){let e=n.$implicit,i=r();de("active",e.id===i.activeDomainId()),p(3),f("nzType",e.icon||"setting"),p(3),V(e.label),p(2),V(e.description)}}var Ve=class t{keyword=I("");nodes=Je([]);activeDomainId=Je("");domainSelect=new b;selectDomain(n){this.domainSelect.emit(n.id)}filtered=j(()=>{let n=this.keyword().trim().toLowerCase();return n?this.nodes().map(e=>K(H({},e),{children:(e.children??[]).filter(i=>(i.label??"").toLowerCase().includes(n)||(i.relPath??"").toLowerCase().includes(n))})).filter(e=>(e.children?.length??0)>0):this.nodes()});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-nav-component"]],inputs:{nodes:[1,"nodes"],activeDomainId:[1,"activeDomainId"]},outputs:{domainSelect:"domainSelect"},decls:8,vars:1,consts:[[1,"list"],[1,"topbar"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","",3,"ngModelChange","ngModel"],[1,"items"],[1,"item",3,"active"],[1,"item",3,"click"],[1,"row"],[1,"icon"],["nzTheme","outline",1,"project-suffix-icon",3,"nzType"],[1,"info"],[1,"name"],[1,"description"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"nz-input-wrapper"),T(3,"nz-icon",2),s(4,"input",3),C("ngModelChange",function(a){return i.keyword.set(a)}),l()()(),s(5,"div",4),S(6,Xn,9,5,"div",5,Gn),l()()),e&2&&(p(4),f("ngModel",i.keyword()),p(2),N(i.filtered()))},dependencies:[O,le,Me,re,se,Z,ce,Qt,Lt,$,ee],styles:[".list[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.list[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:10px 16px}.list[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:100%;border-radius:18px}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;height:0;display:flex;flex-direction:column;gap:8px;padding:8px}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-radius:3px;padding:10px;cursor:pointer}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover, .list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%]{background:var(--app-primary-2)}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;overflow:hidden;justify-content:space-between}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:42px;flex:0 0 auto;position:relative}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;overflow:hidden}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:13px;color:var(--app-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]})};function ke(t,n){return n.split(".").reduce((e,i)=>e?e[i]:void 0,t)}function mn(t,n,e){let i=n.split("."),o=i.pop(),a=t;for(let E of i)a[E]??={},a=a[E];a[o]=e}function un(t){return t.sort((n,e)=>(n.domain?.nav?.order??0)-(e.domain?.nav?.order??0)).map(n=>({id:n.domain.id,type:"domain",label:n.domain.label,icon:n.domain.icon,description:n.domain.description,children:(n.docs??[]).map(e=>({id:e.spec.id,type:"doc",label:e.spec.title,docId:e.spec.id,relPath:e.chosen?.relPath,codec:e.chosen?.codec,exists:e.exists}))}))}var fn=t=>t!=null&&typeof t=="object"&&!Array.isArray(t);function Fe(t,n,e,i=""){if(e===void 0)return[];if(!fn(e))return[{scope:t,target:n,path:i||"/",value:e}];let o=[],a=Object.keys(e);if(a.length===0)return o.push({scope:t,target:n,path:i||"/",value:{}}),o;for(let E of a){let D=i?`${i}.${E}`:E,z=e[E];fn(z)?o.push(...Fe(t,n,z,D)):o.push({scope:t,target:n,path:D,value:z})}return o}var Cn=(t,n)=>n.value,ei=(t,n)=>n.key;function ti(t,n){if(t&1&&(s(0,"div",3),m(1),l()),t&2){let e=r();p(),F(" ",e.item.desc," ")}}function ni(t,n){if(t&1){let e=v();s(0,"input",8),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function ii(t,n){if(t&1){let e=v();s(0,"input",8),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function oi(t,n){if(t&1&&(s(0,"span"),m(1),l()),t&2){let e=r();p(),V(e.value)}}function ai(t,n){if(t&1&&(s(0,"nz-space",6),T(1,"nz-icon",9),s(2,"span"),m(3),l()()),t&2){let e=r();p(3),V(e.value)}}function ri(t,n){if(t&1){let e=v();s(0,"nz-switch",10),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function si(t,n){if(t&1&&T(0,"nz-option",11),t&2){let e=n.$implicit;f("nzValue",e.value)("nzLabel",e.label)}}function li(t,n){if(t&1){let e=v();s(0,"nz-select",10),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),S(1,si,1,2,"nz-option",11,Cn),l()}if(t&2){let e=r();f("ngModel",e.value),p(),N(e.options)}}function ci(t,n){if(t&1&&(s(0,"span"),m(1),l()),t&2){let e=r().$index;p(),V(e+1)}}function pi(t,n){t&1&&T(0,"nz-icon",12)}function di(t,n){if(t&1&&(T(0,"nz-icon",9),s(1,"span"),m(2),l(),y(3,pi,1,0,"nz-icon",12)),t&2){let e=n.$implicit,i=r().$implicit,o=r(3);p(2),F(" ",i==null?null:i[e.key]," "),p(),x(e!==o.arrayFields()[o.arrayFields().length-1]?3:-1)}}function mi(t,n){if(t&1&&(s(0,"nz-space"),y(1,ci,2,1,"span"),S(2,di,4,2,null,null,ei),l()),t&2){let e=r(3);p(),x(e.arrayValue().length>1?1:-1),p(),N(e.arrayFields())}}function ui(t,n){if(t&1&&S(0,mi,4,1,"nz-space",null,Et),t&2){let e=r(2);N(e.arrayValue())}}function fi(t,n){t&1&&(s(0,"span"),m(1,"\u6570\u7EC4\u7C7B\u578B\u914D\u7F6E\u9879\uFF0C\u6682\u4E0D\u652F\u6301\u8868\u5355\u7F16\u8F91"),l())}function Ci(t,n){if(t&1&&y(0,ui,2,0)(1,fi,2,0,"span"),t&2){let e=r();x(e.isArrayObjectEditor()?0:1)}}function gi(t,n){if(t&1&&(s(0,"nz-space")(1,"span",2),m(2),l(),s(3,"span",14),m(4),l()()),t&2){let e=n.$implicit;p(2),F("",e.label,":"),p(2),V(e.value)}}function _i(t,n){if(t&1&&(s(0,"div",13),S(1,gi,5,2,"nz-space",null,Cn),l()),t&2){let e=r(2);p(),N(e.objectKv())}}function hi(t,n){if(t&1&&y(0,_i,3,0,"div",13),t&2){let e=r();x(e.isObjectEditor()?0:-1)}}var Re=class t{item;value;valueChange=new b;options=[];emit(n){this.valueChange.emit(n)}isObjectEditor(){return this.item?.type==="object"}objectKv(){let n=this.value??{};return Object.values(n).map((e,i)=>typeof e=="string"?{label:Object.keys(n)[i],value:e}:{label:Object.keys(n)[i],value:JSON.stringify(e)})}isArrayObjectEditor(){return this.item?.type==="array"&&this.item?.item?.type==="object"&&Array.isArray(this.item?.item?.fields)&&this.item.item.fields.length>0}arrayFields(){return this.item?.item?.fields??[]}arrayValue(){return Array.isArray(this.value)?this.value:[]}addRow(){let n=this.arrayFields(),e={};for(let o of n)o.key&&(e[o.key]=o.default??"");let i=[...this.arrayValue(),e];this.emit(i)}removeRow(n){let i=this.arrayValue().filter((o,a)=>a!==n);this.emit(i)}updateCell(n,e,i){let a=this.arrayValue().map((E,D)=>D!==n?E:K(H({},E??{}),{[e]:i}));this.emit(a)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-item-component"]],inputs:{item:"item",value:"value",options:"options"},outputs:{valueChange:"valueChange"},decls:14,vars:3,consts:[[1,"config-item"],[1,"meta"],[1,"label"],[1,"desc"],[1,"control"],["nz-input","",3,"ngModel"],["nzAlign","center"],[3,"ngModel"],["nz-input","",3,"ngModelChange","ngModel"],["nzType","file","nzTheme","fill"],[3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["nzType","arrow-right","nzTheme","outline"],[1,"kv"],[1,"value"]],template:function(e,i){if(e&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),m(3),l(),y(4,ti,2,1,"div",3),l(),s(5,"div",4),y(6,ni,1,1,"input",5)(7,ii,1,1,"input",5)(8,oi,2,1,"span")(9,ai,4,1,"nz-space",6)(10,ri,1,1,"nz-switch",7)(11,li,3,1,"nz-select",7)(12,Ci,2,1)(13,hi,1,1),l()()),e&2){let o;p(3),V(i.item.label),p(),x(i.item.desc?4:-1),p(2),x((o=i.item.type)==="input"?6:o==="path"?7:o==="string"?8:o==="file"?9:o==="boolean"?10:o==="select"?11:o==="array"?12:o==="object"?13:-1)}},dependencies:[O,le,Me,re,se,$,ee,De,en,Z,ce,Ie,Se,Ne,Rt,Ft,an],styles:[".config-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px}.config-item[_ngcontent-%COMP%]:hover{background:var(--app-primary-2)}.config-item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;opacity:.75}.config-item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:14px;margin-top:4px;opacity:.55}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%]{min-width:200px;max-width:600px;width:60%}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] input[nz-input][_ngcontent-%COMP%], .config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] nz-select[_ngcontent-%COMP%]{width:100%}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] .kv[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;width:100%}"]})};var st=()=>[],yi=(t,n)=>n.id,gn=(t,n)=>n.key;function xi(t,n){if(t&1){let e=v();s(0,"app-config-item-component",3),C("valueChange",function(o){let a=_(e).$implicit,E=r(5);return h(E.onValueChange(o,a))}),l()}if(t&2){let e=n.$implicit,i=r(2).$implicit,o=r(3);f("item",e)("options",e.options||o.options[e.optionsRef==null?null:e.optionsRef.key]||Y(3,st))("value",o.getChild(e,i))}}function zi(t,n){if(t&1&&S(0,xi,1,4,"app-config-item-component",4,gn),t&2){let e=r().$implicit;N(e.children)}}function vi(t,n){if(t&1){let e=v();s(0,"app-config-item-component",3),C("valueChange",function(o){let a=_(e).$implicit,E=r(3);return h(E.onValueChange(o,a))}),l(),y(1,zi,2,0)}if(t&2){let e=n.$implicit,i=r(3);f("item",e)("options",e.options||i.options[e.optionsRef==null?null:e.optionsRef.key]||Y(4,st))("value",i.get(e)),p(),x(e.children!=null&&e.children.length?1:-1)}}function Ei(t,n){if(t&1&&(s(0,"section",1)(1,"h3",2),m(2),l(),S(3,vi,2,5,null,null,gn),l()),t&2){let e=n.$implicit;vt("id",e.id),p(2),V(e.label),p(),N(e.items)}}function bi(t,n){if(t&1&&S(0,Ei,5,2,"section",1,yi),t&2){let e=r().schema.sections||Y(0,st);N(e)}}function Ti(t,n){t&1&&(s(0,"div",0),m(1," \u8BE5\u914D\u7F6E\u6682\u4E0D\u652F\u6301\u8868\u5355\u6A21\u5F0F\uFF08\u53EF\u5207\u6362 Raw / \u6216\u7A0D\u540E\u5B9E\u73B0 provider\uFF09 "),l())}var je=class t{schema;vm;options={};vmChange=new b;get(n){let e=ke(this.vm,n.key);return e??n.default}getChild(n,e){let i=this.get(e);if(i==null||i==="")return n.default;let o=this.resolveDynamicPath(n.key,e.key,i),a=ke(this.vm,o);return a??n.default}onValueChange(n,e){let i=this.resolvePathForWrite(e);this.update(i,n)}resolvePathForWrite(n){let e=n.key||"",i=e.match(/<([^>]+)>/);if(!i)return e;let o=i[1],a=ke(this.vm,o);return this.resolveDynamicPath(e,o,a)}resolveDynamicPath(n,e,i){let o=`<${e}>`;return n.replace(o,String(i??""))}update(n,e){let i=structuredClone(this.vm);mn(i,n,e),this.vmChange.emit(i)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-section-component"]],inputs:{schema:"schema",vm:"vm",options:"options"},outputs:{vmChange:"vmChange"},decls:2,vars:1,consts:[[1,"empty"],[1,"section"],[1,"section-title"],[3,"valueChange","item","options","value"],[3,"item","options","value"]],template:function(e,i){e&1&&y(0,bi,2,1)(1,Ti,2,0,"div",0),e&2&&x(i.schema?0:1)},dependencies:[O,Re],styles:[".section[_ngcontent-%COMP%]{padding:0}.section[_ngcontent-%COMP%]:last-child{border-bottom:none}.section-title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:24px;opacity:.85;font-weight:500;padding:0 16px}.empty[_ngcontent-%COMP%]{padding:12px 14px}"]})};var Be=class t{api=u(Zt);getCatalog(n){return this.api.get(`/api/config/catalog/${n}`)}openInEditor(n,e){return this.api.post(`/api/config/openInEditor/${n}/${encodeURIComponent(e)}`,{})}writeDomainSchema(n,e,i){return this.api.post(`/api/config/writeSchema/${n}/${e}`,{vm:i})}getDomainSchemas(n,e){return this.api.get(`/api/config/getDomainSchema/${n}/${e}`)}diffDomainSchema(n,e,i){return this.api.post(`/api/config/diffSchema/${n}/${e}`,{vm:i})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ft({token:t,factory:t.\u0275fac,providedIn:"root"})};var Mi=["class","component"],wi=()=>({}),Di=()=>[],Si=(t,n)=>n.docId;function Ni(t,n){if(t&1&&T(0,"nz-option",13),t&2){let e=n.$implicit;f("nzLabel",e.title)("nzValue",e.docId)}}function Ii(t,n){if(t&1){let e=v();G(0),s(1,"div",11)(2,"label"),m(3,"\u9009\u62E9\u914D\u7F6E\u6587\u4EF6"),l(),s(4,"nz-select",12),Ke("ngModelChange",function(o){_(e);let a=r();return He(a.selectedDocId,o)||(a.selectedDocId=o),h(o)}),S(5,Ni,1,2,"nz-option",13,Si),l()(),X()}if(t&2){let e=r();p(4),Ze("ngModel",e.selectedDocId),p(),N(e.activeDocsMeta()||Y(1,Di))}}function Oi(t,n){if(t&1){let e=v();G(0),s(1,"button",14),C("click",function(){_(e);let o=r();return h(o.openConfig())}),m(2," \u6253\u5F00\u914D\u7F6E\u6587\u4EF6 "),l(),X()}if(t&2){let e=r();p(),f("disabled",!e.selectedDocId())}}var $e=class t{api=u(Be);projectState=u(nn);msg=u(tn);modal=u(Kt);projectId=j(()=>this.projectState.currentProjectId()||"");loading=I(!1);isModalVisible=I(!1);catalog=I(null);navNodes=j(()=>un(this.catalog()??[]));activeDomainId=I(null);selectedDocId=I(null);docStates=I({});domainSchema=I(null);domainVM=I(null);baselineDomainVM=I(null);activeDomain=j(()=>{let n=this.activeDomainId();return(this.catalog()??[]).find(e=>e.domain.id===n)??null});activeDocs=j(()=>this.activeDomain()?.docs??[]);activeDocsMeta=j(()=>{let n=this.activeDomain();return n?(n.docs??[]).map(e=>({docId:e.spec.id,title:e.spec.title,exists:e.exists,relPath:e.chosen?.relPath,codec:e.chosen?.codec})):[]});domainDirty=j(()=>{let n=this.baselineDomainVM(),e=this.domainVM();return!n||!e?!1:!ue.isEqual(n,e)});constructor(){St(()=>{this.projectId()&&this.getCatalog()})}getCatalog(){let n=this.projectId();n&&(this.loading.set(!0),this.api.getCatalog(n).subscribe({next:e=>{this.catalog.set(e);let i=e[0]?.domain?.id??"";i&&(this.activeDomainId.set(i),this.loadDomainSchema(i))},error:e=>{console.error(e),this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u76EE\u5F55\u5931\u8D25")},complete:()=>this.loading.set(!1)}))}onDomainSelect(n){this.activeDomainId.set(n),n==="angular"?this.loadDomainSchema(n):this.domainVM.set(null)}async loadDomainSchema(n){let e=this.projectId();if(e){this.loading.set(!0);try{let i=await ge(this.api.getDomainSchemas(e,n));this.domainSchema.set(i),this.domainVM.set(i.vm),this.baselineDomainVM.set(ue.cloneDeep(i.vm))}catch(i){console.error(i),this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u6A21\u578B\u5931\u8D25"),this.domainVM.set(null),this.baselineDomainVM.set(null)}finally{this.loading.set(!1)}}}async onDiff(){let n=this.projectId(),e=this.activeDomainId(),i=this.domainVM();if(!(!n||!e||!i)){this.loading.set(!0);try{let o=await ge(this.api.diffDomainSchema(n,e,i)),a=o?.docPatch??{},E=o?.filePatch??[],D=[];for(let[z,R]of Object.entries(a))D.push(...Fe("doc",z,R));for(let z of E)D.push(...Fe("file",z.relPath,z.patch));if(D.length===0){this.msg.info("\u6CA1\u6709\u53EF\u5199\u56DE\u7684\u53D8\u66F4");return}D.sort((z,R)=>{if(z.scope!==R.scope)return z.scope.localeCompare(R.scope);let fe=`${z.target}:${z.path}`,Ce=`${R.target}:${R.path}`;return fe.localeCompare(Ce)}),this.modal.create({nzTitle:"\u53D8\u66F4",nzContent:`
|
|
1
|
+
import{a as an}from"./chunk-2XZHN52E.js";import{f as on}from"./chunk-AI6SNMEH.js";import{e as sn}from"./chunk-6X6PEDE5.js";import"./chunk-GKY4LJF4.js";import{d as rn}from"./chunk-W633D3VG.js";import"./chunk-QM5ROT66.js";import{a as yn}from"./chunk-HZ73CM45.js";import{d as Se,e as Ne,f as Ie}from"./chunk-25RT7L2O.js";import{e as Wt,g as qt,h as Ut}from"./chunk-OC62FHHS.js";import{A as Xt,B as Yt,C as en,D as De,G as tn,I as nn,c as ze,g as Zt,o as Ht,x as Kt,y as Jt,z as Gt}from"./chunk-2P5WKSWB.js";import{Ab as Lt,Cb as ce,Db as Qt,Eb as Z,F as Vt,H as ae,Hb as nt,I as kt,Jb as me,M as ee,N as $,O as et,P as tt,T as Ft,U as Rt,V as ve,W as Ee,Y as be,Ya as jt,Z as Te,Za as Bt,_a as $t,kb as Me,mb as re,q as Xe,qb as se,r as Ot,w as Ye,x as Pt,xb as le,yb as At,z as B,zb as we}from"./chunk-5EQOKH7G.js";import"./chunk-HFZLJHYR.js";import{C as Ge,e as It,j as O}from"./chunk-X3HFJACM.js";import{$b as N,Aa as Ct,Ab as xt,Ba as gt,Ca as _e,Dc as Mt,Eb as w,Ec as ye,Fb as Q,Fc as de,Gb as zt,Ha as I,Ic as m,Jc as V,Kb as J,Kc as F,Mc as Ze,Nc as He,Oa as Ue,Oc as Ke,Ra as he,Tb as vt,Vb as y,Vc as Y,W as ut,Wc as wt,Xb as x,Yb as Et,_b as S,a as H,ac as f,ad as Dt,b as K,bc as s,cc as l,da as qe,dc as T,e as hn,f as We,fd as j,g as dt,gd as St,hc as G,ic as X,kc as v,ld as Je,m as mt,ma as ft,mb as p,na as L,qc as C,r as ie,ra as u,rb as b,rd as xe,s as P,sb as _t,tc as r,ub as ht,uc as bt,vc as Tt,vd as oe,wd as Nt,xa as _,xb as yt,xc as W,ya as h,yc as q,z as ge,zc as U}from"./chunk-SJG2JCPL.js";var it=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=zt({type:t,selectors:[["button","nz-trans-button",""]],hostVars:8,hostBindings:function(i,o){i&2&&ye("border","0")("background","transparent")("padding","0")("line-height","inherit")}})}return t})(),ot=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=L({})}return t})();function vn(t,n){if(t&1&&(G(0),T(1,"nz-icon",2),X()),t&2){let e=n.$implicit;p(),f("nzType",e)}}var En=["textarea"];function bn(t,n){if(t&1){let e=v();s(0,"textarea",2,0),C("blur",function(){_(e);let o=r();return h(o.confirm())}),l(),s(2,"button",3),C("click",function(){_(e);let o=r();return h(o.confirm())}),T(3,"nz-icon",4),l()}}function Tn(t,n){if(t&1&&(G(0),T(1,"nz-icon",7),X()),t&2){let e=n.$implicit;p(),f("nzType",e)}}function Mn(t,n){if(t&1){let e=v();s(0,"button",5),C("click",function(){_(e);let o=r();return h(o.onClick())}),J(1,Tn,2,1,"ng-container",6),l()}if(t&2){let e=r();f("nzTooltipTitle",e.tooltip===null?null:e.tooltip||(e.locale==null?null:e.locale.edit)),p(),f("nzStringTemplateOutlet",e.icon)}}var wn=["ellipsisContainer"],Dn=["expandable"],Sn=["contentTemplate"],Nn=["*"],In=t=>({content:t});function On(t,n){t&1&&Tt(0)}function Pn(t,n){if(t&1&&(y(0,On,1,0),m(1)),t&2){let e=n.content;x(e?-1:0),p(),F(" ",e," ")}}function Vn(t,n){}function kn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.nzSuffix," ")}}function Fn(t,n){if(t&1&&(J(0,Vn,0,0,"ng-template",5),y(1,kn,1,1)),t&2){let e=r(2),i=Mt(1);f("ngTemplateOutlet",i)("ngTemplateOutletContext",wt(3,In,e.nzContent)),p(),x(e.nzSuffix?1:-1)}}function Rn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.ellipsisStr," ")}}function jn(t,n){if(t&1&&m(0),t&2){let e=r(3);F(" ",e.nzSuffix," ")}}function Bn(t,n){if(t&1){let e=v();s(0,"a",7,2),C("click",function(){_(e);let o=r(3);return h(o.onExpand())}),m(2),l()}if(t&2){let e=r(3);p(2),F(" ",e.locale==null?null:e.locale.expand," ")}}function $n(t,n){if(t&1&&(T(0,"span",null,1),y(2,Rn,1,1),y(3,jn,1,1),y(4,Bn,3,1,"a",6)),t&2){let e=r(2);p(2),x(e.isEllipsis?2:-1),p(),x(e.nzSuffix?3:-1),p(),x(e.nzExpandable&&e.isEllipsis?4:-1)}}function An(t,n){if(t&1&&y(0,Fn,2,5)(1,$n,5,3),t&2){let e=r();x(e.expanded||!e.hasOperationsWithEllipsis&&e.nzEllipsisRows===1&&!e.hasEllipsisObservers||e.canCssEllipsis||e.nzSuffix&&e.expanded?0:1)}}function Ln(t,n){if(t&1){let e=v();s(0,"nz-text-edit",8),C("endEditing",function(o){_(e);let a=r();return h(a.onEndEditing(o))})("startEditing",function(){_(e);let o=r();return h(o.onStartEditing())}),l()}if(t&2){let e=r();f("text",e.nzContent)("icon",e.nzEditIcon)("tooltip",e.nzEditTooltip)}}function Qn(t,n){if(t&1){let e=v();s(0,"nz-text-copy",9),C("textCopy",function(o){_(e);let a=r();return h(a.onTextCopy(o))}),l()}if(t&2){let e=r();f("text",e.copyText)("tooltips",e.nzCopyTooltips)("icons",e.nzCopyIcons)}}var at=(()=>{class t{cdr=u(xe);clipboard=u(rn);i18n=u(ze);destroyRef=u(_e);copied=!1;copyId;locale;nativeElement=u(he).nativeElement;copyTooltip=null;copedTooltip=null;copyIcon="copy";copedIcon="check";text;tooltips;icons=["copy","check"];textCopy=new b;constructor(){this.destroyRef.onDestroy(()=>{clearTimeout(this.copyId)})}ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.updateTooltips(),this.cdr.markForCheck()})}ngOnChanges(e){let{tooltips:i,icons:o}=e;i&&this.updateTooltips(),o&&this.updateIcons()}onClick(){if(this.copied)return;this.copied=!0,this.cdr.detectChanges();let e=this.text;this.textCopy.emit(e),this.clipboard.copy(e),this.onCopied()}onCopied(){clearTimeout(this.copyId),this.copyId=setTimeout(()=>{this.copied=!1,this.cdr.detectChanges()},3e3)}updateTooltips(){if(this.tooltips===null)this.copedTooltip=null,this.copyTooltip=null;else if(Array.isArray(this.tooltips)){let[e,i]=this.tooltips;this.copyTooltip=e||this.locale?.copy,this.copedTooltip=i||this.locale?.copied}else this.copyTooltip=this.locale?.copy,this.copedTooltip=this.locale?.copied;this.cdr.markForCheck()}updateIcons(){let[e,i]=this.icons;this.copyIcon=e,this.copedIcon=i,this.cdr.markForCheck()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["nz-text-copy"]],inputs:{text:"text",tooltips:"tooltips",icons:"icons"},outputs:{textCopy:"textCopy"},exportAs:["nzTextCopy"],features:[Ue],decls:2,vars:4,consts:[["type","button","nz-tooltip","","nz-trans-button","",1,"ant-typography-copy",3,"click","nzTooltipTitle"],[4,"nzStringTemplateOutlet"],[3,"nzType"]],template:function(i,o){i&1&&(s(0,"button",0),C("click",function(){return o.onClick()}),J(1,vn,2,1,"ng-container",1),l()),i&2&&(de("ant-typography-copy-success",o.copied),f("nzTooltipTitle",o.copied?o.copedTooltip:o.copyTooltip),p(),f("nzStringTemplateOutlet",o.copied?o.copedIcon:o.copyIcon))},dependencies:[me,nt,ot,it,$,ee,tt,et],encapsulation:2,changeDetection:0})}return t})(),rt=(()=>{class t{ngZone=u(_t);cdr=u(xe);i18n=u(ze);destroyRef=u(_e);editing=!1;locale;text;icon="edit";tooltip;startEditing=new b;endEditing=new b(!0);set textarea(e){this.textarea$.next(e)}autosizeDirective;beforeText;currentText;nativeElement=u(he).nativeElement;textarea$=new mt(null);injector=u(Ct);ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.cdr.markForCheck()}),this.textarea$.pipe(qe(e=>Ye(e?.nativeElement,"keydown")),B(this.destroyRef)).subscribe(e=>{e.keyCode!==27&&e.keyCode!==13||this.ngZone.run(()=>{e.keyCode===27?this.onCancel():this.onEnter(e),this.cdr.markForCheck()})}),this.textarea$.pipe(qe(e=>Ye(e?.nativeElement,"input")),B(this.destroyRef)).subscribe(e=>{this.currentText=e.target.value})}onClick(){this.beforeText=this.text,this.currentText=this.beforeText,this.editing=!0,this.startEditing.emit(),this.focusAndSetValue()}confirm(){this.editing=!1,this.endEditing.emit(this.currentText)}onEnter(e){e.stopPropagation(),e.preventDefault(),this.confirm()}onCancel(){this.currentText=this.beforeText,this.confirm()}focusAndSetValue(){let{injector:e}=this;ht(()=>{this.textarea$.pipe(ut(i=>i!=null),B(this.destroyRef)).subscribe(i=>{i.nativeElement.focus(),i.nativeElement.value=this.currentText||"",this.autosizeDirective.resizeToFitContent(),this.cdr.markForCheck()})},{injector:e})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["nz-text-edit"]],viewQuery:function(i,o){if(i&1&&(W(En,5),W(we,5)),i&2){let a;q(a=U())&&(o.textarea=a.first),q(a=U())&&(o.autosizeDirective=a.first)}},inputs:{text:"text",icon:"icon",tooltip:"tooltip"},outputs:{startEditing:"startEditing",endEditing:"endEditing"},exportAs:["nzTextEdit"],decls:2,vars:1,consts:[["textarea",""],["nz-tooltip","","nz-trans-button","",1,"ant-typography-edit",3,"nzTooltipTitle"],["nz-input","","nzAutosize","",3,"blur"],["nz-trans-button","",1,"ant-typography-edit-content-confirm",3,"click"],["nzType","enter"],["nz-tooltip","","nz-trans-button","",1,"ant-typography-edit",3,"click","nzTooltipTitle"],[4,"nzStringTemplateOutlet"],[3,"nzType"]],template:function(i,o){i&1&&y(0,bn,4,0)(1,Mn,2,2,"button",1),i&2&&x(o.editing?0:1)},dependencies:[Z,ce,we,ot,it,$,ee,me,nt,tt,et],encapsulation:2,changeDetection:0})}return t})(),Wn="typography",qn="ant-typography-expand",Un=(()=>{var k;let t,n=[],e=[],i,o=[],a=[],E,D=[],z=[],R,fe=[],Ce=[],lt,ct=[],pt=[];return k=class{_nzModuleName=Wn;nzConfigService=u(Vt);el=u(he).nativeElement;cdr=u(xe);viewContainerRef=u(xt);renderer=u(yt);platform=u(kt);i18n=u(ze);resizeService=u($t);directionality=u(Pt);document=u(gt);destroyRef=u(_e);nzCopyable=!1;nzEditable=!1;nzDisabled=!1;nzExpandable=!1;nzEllipsis=!1;nzCopyTooltips=P(this,n,void 0);nzCopyIcons=(P(this,e),P(this,o,["copy","check"]));nzEditTooltip=(P(this,a),P(this,D,void 0));nzEditIcon=(P(this,z),P(this,fe,"edit"));nzContent=P(this,Ce);nzEllipsisRows=P(this,ct,1);nzType=P(this,pt);nzCopyText;nzSuffix;nzContentChange=new b;nzCopy=new b;nzExpandChange=new b;nzOnEllipsis=new b;textEditRef;textCopyRef;ellipsisContainer;expandableBtn;contentTemplate;locale;expandableBtnElementCache=null;editing=!1;ellipsisText;cssEllipsis=!1;isEllipsis=!0;expanded=!1;ellipsisStr="...";dir="ltr";get hasEllipsisObservers(){return this.nzOnEllipsis.observers.length>0}get canCssEllipsis(){return this.nzEllipsis&&this.cssEllipsis&&!this.expanded&&!this.hasEllipsisObservers}get hasOperationsWithEllipsis(){return(this.nzCopyable||this.nzEditable||this.nzExpandable)&&this.nzEllipsis}viewInit=!1;requestId=-1;windowResizeSubscription=dt.EMPTY;get copyText(){return typeof this.nzCopyText=="string"?this.nzCopyText:this.nzContent}constructor(){this.destroyRef.onDestroy(()=>{this.expandableBtnElementCache=null,this.windowResizeSubscription.unsubscribe()})}onTextCopy(g){this.nzCopy.emit(g)}onStartEditing(){this.editing=!0}onEndEditing(g){this.editing=!1,this.nzContentChange.emit(g),this.nzContent===g&&this.renderOnNextFrame(),this.cdr.markForCheck()}onExpand(){this.isEllipsis=!1,this.expanded=!0,this.nzExpandChange.emit(),this.nzOnEllipsis.emit(!1)}canUseCSSEllipsis(){return this.nzEditable||this.nzCopyable||this.nzExpandable||this.nzSuffix||this.hasEllipsisObservers?!1:this.nzEllipsisRows===1?Xe("textOverflow"):Xe("webkitLineClamp")}renderOnNextFrame(){Bt(this.requestId),!(!this.viewInit||!this.nzEllipsis||this.nzEllipsisRows<0||this.expanded||!this.platform.isBrowser)&&(this.requestId=jt(()=>this.syncEllipsis()))}getOriginContentViewRef(){let g=this.viewContainerRef.createEmbeddedView(this.contentTemplate,{content:this.nzContent});return g.detectChanges(),{viewRef:g,removeView:()=>this.viewContainerRef.remove(this.viewContainerRef.indexOf(g))}}syncEllipsis(){if(this.cssEllipsis)return;let{viewRef:g,removeView:d}=this.getOriginContentViewRef(),c=[this.textCopyRef,this.textEditRef].filter(ne=>ne&&ne.nativeElement).map(ne=>ne.nativeElement),M=this.getExpandableBtnElement();M&&c.push(M);let{contentNodes:Le,text:Qe,ellipsis:pe}=Ot(this.el,this.nzEllipsisRows,g.rootNodes,c,this.ellipsisStr,this.nzSuffix);d(),this.ellipsisText=Qe,pe!==this.isEllipsis&&(this.isEllipsis=pe,this.nzOnEllipsis.emit(pe));let te=this.ellipsisContainer.nativeElement;for(;te.firstChild;)this.renderer.removeChild(te,te.firstChild);Le.forEach(ne=>{this.renderer.appendChild(te,ne.cloneNode(!0))}),this.cdr.markForCheck()}getExpandableBtnElement(){if(this.nzExpandable){let g=this.locale?this.locale.expand:"",d=this.expandableBtnElementCache;if(!d||d.innerText===g){let c=this.document.createElement("a");c.className=qn,c.innerText=g,this.expandableBtnElementCache=c}return this.expandableBtnElementCache}else return this.expandableBtnElementCache=null,null}renderAndSubscribeWindowResize(){this.platform.isBrowser&&(this.windowResizeSubscription.unsubscribe(),this.cssEllipsis=this.canUseCSSEllipsis(),this.renderOnNextFrame(),this.windowResizeSubscription=this.resizeService.connect().pipe(B(this.destroyRef)).subscribe(()=>this.renderOnNextFrame()))}ngOnInit(){this.i18n.localeChange.pipe(B(this.destroyRef)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Text"),this.cdr.markForCheck()}),this.directionality.change?.pipe(B(this.destroyRef)).subscribe(g=>{this.dir=g,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterViewInit(){this.viewInit=!0,this.renderAndSubscribeWindowResize()}ngOnChanges(g){let{nzCopyable:d,nzEditable:c,nzExpandable:M,nzEllipsis:Le,nzContent:Qe,nzEllipsisRows:pe,nzSuffix:te}=g;(d||c||M||Le||Qe||pe||te)&&this.nzEllipsis&&(this.expanded?this.windowResizeSubscription.unsubscribe():this.renderAndSubscribeWindowResize())}},(()=>{let g=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ae()],i=[ae()],E=[ae()],R=[ae()],lt=[ae()],ie(null,null,t,{kind:"field",name:"nzCopyTooltips",static:!1,private:!1,access:{has:d=>"nzCopyTooltips"in d,get:d=>d.nzCopyTooltips,set:(d,c)=>{d.nzCopyTooltips=c}},metadata:g},n,e),ie(null,null,i,{kind:"field",name:"nzCopyIcons",static:!1,private:!1,access:{has:d=>"nzCopyIcons"in d,get:d=>d.nzCopyIcons,set:(d,c)=>{d.nzCopyIcons=c}},metadata:g},o,a),ie(null,null,E,{kind:"field",name:"nzEditTooltip",static:!1,private:!1,access:{has:d=>"nzEditTooltip"in d,get:d=>d.nzEditTooltip,set:(d,c)=>{d.nzEditTooltip=c}},metadata:g},D,z),ie(null,null,R,{kind:"field",name:"nzEditIcon",static:!1,private:!1,access:{has:d=>"nzEditIcon"in d,get:d=>d.nzEditIcon,set:(d,c)=>{d.nzEditIcon=c}},metadata:g},fe,Ce),ie(null,null,lt,{kind:"field",name:"nzEllipsisRows",static:!1,private:!1,access:{has:d=>"nzEllipsisRows"in d,get:d=>d.nzEllipsisRows,set:(d,c)=>{d.nzEllipsisRows=c}},metadata:g},ct,pt),g&&Object.defineProperty(k,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g})})(),We(k,"\u0275fac",function(d){return new(d||k)}),We(k,"\u0275cmp",w({type:k,selectors:[["nz-typography"],["","nz-typography",""],["p","nz-paragraph",""],["span","nz-text",""],["h1","nz-title",""],["h2","nz-title",""],["h3","nz-title",""],["h4","nz-title",""]],viewQuery:function(d,c){if(d&1&&(W(rt,5),W(at,5),W(wn,5),W(Dn,5),W(Sn,5)),d&2){let M;q(M=U())&&(c.textEditRef=M.first),q(M=U())&&(c.textCopyRef=M.first),q(M=U())&&(c.ellipsisContainer=M.first),q(M=U())&&(c.expandableBtn=M.first),q(M=U())&&(c.contentTemplate=M.first)}},hostVars:26,hostBindings:function(d,c){d&2&&(ye("-webkit-line-clamp",c.canCssEllipsis&&c.nzEllipsisRows>1?c.nzEllipsisRows:null),de("ant-typography",!c.editing)("ant-typography-rtl",c.dir==="rtl")("ant-typography-edit-content",c.editing)("ant-typography-secondary",c.nzType==="secondary")("ant-typography-warning",c.nzType==="warning")("ant-typography-danger",c.nzType==="danger")("ant-typography-success",c.nzType==="success")("ant-typography-disabled",c.nzDisabled)("ant-typography-ellipsis",c.nzEllipsis&&!c.expanded)("ant-typography-single-line",c.nzEllipsis&&c.nzEllipsisRows===1)("ant-typography-ellipsis-single-line",c.canCssEllipsis&&c.nzEllipsisRows===1)("ant-typography-ellipsis-multiple-line",c.canCssEllipsis&&c.nzEllipsisRows>1))},inputs:{nzCopyable:[2,"nzCopyable","nzCopyable",oe],nzEditable:[2,"nzEditable","nzEditable",oe],nzDisabled:[2,"nzDisabled","nzDisabled",oe],nzExpandable:[2,"nzExpandable","nzExpandable",oe],nzEllipsis:[2,"nzEllipsis","nzEllipsis",oe],nzCopyTooltips:"nzCopyTooltips",nzCopyIcons:"nzCopyIcons",nzEditTooltip:"nzEditTooltip",nzEditIcon:"nzEditIcon",nzContent:"nzContent",nzEllipsisRows:[2,"nzEllipsisRows","nzEllipsisRows",Nt],nzType:"nzType",nzCopyText:"nzCopyText",nzSuffix:"nzSuffix"},outputs:{nzContentChange:"nzContentChange",nzCopy:"nzCopy",nzExpandChange:"nzExpandChange",nzOnEllipsis:"nzOnEllipsis"},exportAs:["nzTypography"],features:[Ue],ngContentSelectors:Nn,decls:5,vars:3,consts:[["contentTemplate",""],["ellipsisContainer",""],["expandable",""],[3,"text","icon","tooltip"],[3,"text","tooltips","icons"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-typography-expand"],[1,"ant-typography-expand",3,"click"],[3,"endEditing","startEditing","text","icon","tooltip"],[3,"textCopy","text","tooltips","icons"]],template:function(d,c){d&1&&(bt(),J(0,Pn,2,2,"ng-template",null,0,Dt),y(2,An,2,1),y(3,Ln,1,3,"nz-text-edit",3),y(4,Qn,1,3,"nz-text-copy",4)),d&2&&(p(2),x(c.editing?-1:2),p(),x(c.nzEditable?3:-1),p(),x(c.nzCopyable&&!c.editing?4:-1))},dependencies:[It,rt,at],encapsulation:2,changeDetection:0})),k})(),pn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=L({imports:[Un,at,rt]})}return t})();var ue=hn(yn());function Jn(t,n){if(t&1){let e=v();s(0,"div",0)(1,"span",1),m(2,"\u6709\u672A\u4FDD\u5B58\u66F4\u6539"),l(),s(3,"button",2),C("click",function(){_(e);let o=r();return h(o.diff.emit())}),m(4,"Diff"),l(),s(5,"button",2),C("click",function(){_(e);let o=r();return h(o.reset.emit())}),m(6,"\u91CD\u7F6E"),l(),s(7,"button",3),C("click",function(){_(e);let o=r();return h(o.save.emit())}),m(8,"\u4FDD\u5B58"),l()()}}var Oe=class t{dirty=!1;diff=new b;reset=new b;save=new b;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-change-bar-component"]],inputs:{dirty:"dirty"},outputs:{diff:"diff",reset:"reset",save:"save"},decls:1,vars:1,consts:[[1,"change-bar"],[1,"hint"],["nz-button","",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(e,i){e&1&&y(0,Jn,9,0,"div",0),e&2&&x(i.dirty?0:-1)},dependencies:[O,Te,be,ve,Ee],styles:[".change-bar[_ngcontent-%COMP%]{width:100%;padding:10px 20px;display:flex;justify-content:flex-end;align-items:center;gap:10px;box-shadow:0 -2px 8px #0000000f;background:var(--app-component-bg);border:1px solid var(--app-border-color)}.hint[_ngcontent-%COMP%]{margin-right:auto;opacity:.75}"]})};var Gn=(t,n)=>n.id;function Xn(t,n){if(t&1){let e=v();s(0,"div",6),C("click",function(){let o=_(e).$implicit,a=r();return h(a.selectDomain(o))}),s(1,"div",7)(2,"div",8),T(3,"nz-icon",9),l(),s(4,"div",10)(5,"div",11),m(6),l(),s(7,"div",12),m(8),l()()()()}if(t&2){let e=n.$implicit,i=r();de("active",e.id===i.activeDomainId()),p(3),f("nzType",e.icon||"setting"),p(3),V(e.label),p(2),V(e.description)}}var Ve=class t{keyword=I("");nodes=Je([]);activeDomainId=Je("");domainSelect=new b;selectDomain(n){this.domainSelect.emit(n.id)}filtered=j(()=>{let n=this.keyword().trim().toLowerCase();return n?this.nodes().map(e=>K(H({},e),{children:(e.children??[]).filter(i=>(i.label??"").toLowerCase().includes(n)||(i.relPath??"").toLowerCase().includes(n))})).filter(e=>(e.children?.length??0)>0):this.nodes()});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-nav-component"]],inputs:{nodes:[1,"nodes"],activeDomainId:[1,"activeDomainId"]},outputs:{domainSelect:"domainSelect"},decls:8,vars:1,consts:[[1,"list"],[1,"topbar"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","",3,"ngModelChange","ngModel"],[1,"items"],[1,"item",3,"active"],[1,"item",3,"click"],[1,"row"],[1,"icon"],["nzTheme","outline",1,"project-suffix-icon",3,"nzType"],[1,"info"],[1,"name"],[1,"description"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"nz-input-wrapper"),T(3,"nz-icon",2),s(4,"input",3),C("ngModelChange",function(a){return i.keyword.set(a)}),l()()(),s(5,"div",4),S(6,Xn,9,5,"div",5,Gn),l()()),e&2&&(p(4),f("ngModel",i.keyword()),p(2),N(i.filtered()))},dependencies:[O,le,Me,re,se,Z,ce,Qt,Lt,$,ee],styles:[".list[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.list[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:10px 16px}.list[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:100%;border-radius:18px}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;height:0;display:flex;flex-direction:column;gap:8px;padding:8px}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-radius:3px;padding:10px;cursor:pointer}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover, .list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item.active[_ngcontent-%COMP%]{background:var(--app-primary-2)}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;overflow:hidden;justify-content:space-between}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:42px;flex:0 0 auto;position:relative}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;overflow:hidden}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list[_ngcontent-%COMP%] .items[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:13px;color:var(--app-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]})};function ke(t,n){return n.split(".").reduce((e,i)=>e?e[i]:void 0,t)}function mn(t,n,e){let i=n.split("."),o=i.pop(),a=t;for(let E of i)a[E]??={},a=a[E];a[o]=e}function un(t){return t.sort((n,e)=>(n.domain?.nav?.order??0)-(e.domain?.nav?.order??0)).map(n=>({id:n.domain.id,type:"domain",label:n.domain.label,icon:n.domain.icon,description:n.domain.description,children:(n.docs??[]).map(e=>({id:e.spec.id,type:"doc",label:e.spec.title,docId:e.spec.id,relPath:e.chosen?.relPath,codec:e.chosen?.codec,exists:e.exists}))}))}var fn=t=>t!=null&&typeof t=="object"&&!Array.isArray(t);function Fe(t,n,e,i=""){if(e===void 0)return[];if(!fn(e))return[{scope:t,target:n,path:i||"/",value:e}];let o=[],a=Object.keys(e);if(a.length===0)return o.push({scope:t,target:n,path:i||"/",value:{}}),o;for(let E of a){let D=i?`${i}.${E}`:E,z=e[E];fn(z)?o.push(...Fe(t,n,z,D)):o.push({scope:t,target:n,path:D,value:z})}return o}var Cn=(t,n)=>n.value,ei=(t,n)=>n.key;function ti(t,n){if(t&1&&(s(0,"div",3),m(1),l()),t&2){let e=r();p(),F(" ",e.item.desc," ")}}function ni(t,n){if(t&1){let e=v();s(0,"input",8),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function ii(t,n){if(t&1){let e=v();s(0,"input",8),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function oi(t,n){if(t&1&&(s(0,"span"),m(1),l()),t&2){let e=r();p(),V(e.value)}}function ai(t,n){if(t&1&&(s(0,"nz-space",6),T(1,"nz-icon",9),s(2,"span"),m(3),l()()),t&2){let e=r();p(3),V(e.value)}}function ri(t,n){if(t&1){let e=v();s(0,"nz-switch",10),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),l()}if(t&2){let e=r();f("ngModel",e.value)}}function si(t,n){if(t&1&&T(0,"nz-option",11),t&2){let e=n.$implicit;f("nzValue",e.value)("nzLabel",e.label)}}function li(t,n){if(t&1){let e=v();s(0,"nz-select",10),C("ngModelChange",function(o){_(e);let a=r();return h(a.emit(o))}),S(1,si,1,2,"nz-option",11,Cn),l()}if(t&2){let e=r();f("ngModel",e.value),p(),N(e.options)}}function ci(t,n){if(t&1&&(s(0,"span"),m(1),l()),t&2){let e=r().$index;p(),V(e+1)}}function pi(t,n){t&1&&T(0,"nz-icon",12)}function di(t,n){if(t&1&&(T(0,"nz-icon",9),s(1,"span"),m(2),l(),y(3,pi,1,0,"nz-icon",12)),t&2){let e=n.$implicit,i=r().$implicit,o=r(3);p(2),F(" ",i==null?null:i[e.key]," "),p(),x(e!==o.arrayFields()[o.arrayFields().length-1]?3:-1)}}function mi(t,n){if(t&1&&(s(0,"nz-space"),y(1,ci,2,1,"span"),S(2,di,4,2,null,null,ei),l()),t&2){let e=r(3);p(),x(e.arrayValue().length>1?1:-1),p(),N(e.arrayFields())}}function ui(t,n){if(t&1&&S(0,mi,4,1,"nz-space",null,Et),t&2){let e=r(2);N(e.arrayValue())}}function fi(t,n){t&1&&(s(0,"span"),m(1,"\u6570\u7EC4\u7C7B\u578B\u914D\u7F6E\u9879\uFF0C\u6682\u4E0D\u652F\u6301\u8868\u5355\u7F16\u8F91"),l())}function Ci(t,n){if(t&1&&y(0,ui,2,0)(1,fi,2,0,"span"),t&2){let e=r();x(e.isArrayObjectEditor()?0:1)}}function gi(t,n){if(t&1&&(s(0,"nz-space")(1,"span",2),m(2),l(),s(3,"span",14),m(4),l()()),t&2){let e=n.$implicit;p(2),F("",e.label,":"),p(2),V(e.value)}}function _i(t,n){if(t&1&&(s(0,"div",13),S(1,gi,5,2,"nz-space",null,Cn),l()),t&2){let e=r(2);p(),N(e.objectKv())}}function hi(t,n){if(t&1&&y(0,_i,3,0,"div",13),t&2){let e=r();x(e.isObjectEditor()?0:-1)}}var Re=class t{item;value;valueChange=new b;options=[];emit(n){this.valueChange.emit(n)}isObjectEditor(){return this.item?.type==="object"}objectKv(){let n=this.value??{};return Object.values(n).map((e,i)=>typeof e=="string"?{label:Object.keys(n)[i],value:e}:{label:Object.keys(n)[i],value:JSON.stringify(e)})}isArrayObjectEditor(){return this.item?.type==="array"&&this.item?.item?.type==="object"&&Array.isArray(this.item?.item?.fields)&&this.item.item.fields.length>0}arrayFields(){return this.item?.item?.fields??[]}arrayValue(){return Array.isArray(this.value)?this.value:[]}addRow(){let n=this.arrayFields(),e={};for(let o of n)o.key&&(e[o.key]=o.default??"");let i=[...this.arrayValue(),e];this.emit(i)}removeRow(n){let i=this.arrayValue().filter((o,a)=>a!==n);this.emit(i)}updateCell(n,e,i){let a=this.arrayValue().map((E,D)=>D!==n?E:K(H({},E??{}),{[e]:i}));this.emit(a)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-item-component"]],inputs:{item:"item",value:"value",options:"options"},outputs:{valueChange:"valueChange"},decls:14,vars:3,consts:[[1,"config-item"],[1,"meta"],[1,"label"],[1,"desc"],[1,"control"],["nz-input","",3,"ngModel"],["nzAlign","center"],[3,"ngModel"],["nz-input","",3,"ngModelChange","ngModel"],["nzType","file","nzTheme","fill"],[3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["nzType","arrow-right","nzTheme","outline"],[1,"kv"],[1,"value"]],template:function(e,i){if(e&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),m(3),l(),y(4,ti,2,1,"div",3),l(),s(5,"div",4),y(6,ni,1,1,"input",5)(7,ii,1,1,"input",5)(8,oi,2,1,"span")(9,ai,4,1,"nz-space",6)(10,ri,1,1,"nz-switch",7)(11,li,3,1,"nz-select",7)(12,Ci,2,1)(13,hi,1,1),l()()),e&2){let o;p(3),V(i.item.label),p(),x(i.item.desc?4:-1),p(2),x((o=i.item.type)==="input"?6:o==="path"?7:o==="string"?8:o==="file"?9:o==="boolean"?10:o==="select"?11:o==="array"?12:o==="object"?13:-1)}},dependencies:[O,le,Me,re,se,$,ee,De,en,Z,ce,Ie,Se,Ne,Rt,Ft,an],styles:[".config-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px}.config-item[_ngcontent-%COMP%]:hover{background:var(--app-primary-2)}.config-item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;opacity:.75}.config-item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:14px;margin-top:4px;opacity:.55}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%]{min-width:200px;max-width:600px;width:60%}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] input[nz-input][_ngcontent-%COMP%], .config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] nz-select[_ngcontent-%COMP%]{width:100%}.config-item[_ngcontent-%COMP%] .control[_ngcontent-%COMP%] .kv[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;width:100%}"]})};var st=()=>[],yi=(t,n)=>n.id,gn=(t,n)=>n.key;function xi(t,n){if(t&1){let e=v();s(0,"app-config-item-component",3),C("valueChange",function(o){let a=_(e).$implicit,E=r(5);return h(E.onValueChange(o,a))}),l()}if(t&2){let e=n.$implicit,i=r(2).$implicit,o=r(3);f("item",e)("options",e.options||o.options[e.optionsRef==null?null:e.optionsRef.key]||Y(3,st))("value",o.getChild(e,i))}}function zi(t,n){if(t&1&&S(0,xi,1,4,"app-config-item-component",4,gn),t&2){let e=r().$implicit;N(e.children)}}function vi(t,n){if(t&1){let e=v();s(0,"app-config-item-component",3),C("valueChange",function(o){let a=_(e).$implicit,E=r(3);return h(E.onValueChange(o,a))}),l(),y(1,zi,2,0)}if(t&2){let e=n.$implicit,i=r(3);f("item",e)("options",e.options||i.options[e.optionsRef==null?null:e.optionsRef.key]||Y(4,st))("value",i.get(e)),p(),x(e.children!=null&&e.children.length?1:-1)}}function Ei(t,n){if(t&1&&(s(0,"section",1)(1,"h3",2),m(2),l(),S(3,vi,2,5,null,null,gn),l()),t&2){let e=n.$implicit;vt("id",e.id),p(2),V(e.label),p(),N(e.items)}}function bi(t,n){if(t&1&&S(0,Ei,5,2,"section",1,yi),t&2){let e=r().schema.sections||Y(0,st);N(e)}}function Ti(t,n){t&1&&(s(0,"div",0),m(1," \u8BE5\u914D\u7F6E\u6682\u4E0D\u652F\u6301\u8868\u5355\u6A21\u5F0F\uFF08\u53EF\u5207\u6362 Raw / \u6216\u7A0D\u540E\u5B9E\u73B0 provider\uFF09 "),l())}var je=class t{schema;vm;options={};vmChange=new b;get(n){let e=ke(this.vm,n.key);return e??n.default}getChild(n,e){let i=this.get(e);if(i==null||i==="")return n.default;let o=this.resolveDynamicPath(n.key,e.key,i),a=ke(this.vm,o);return a??n.default}onValueChange(n,e){let i=this.resolvePathForWrite(e);this.update(i,n)}resolvePathForWrite(n){let e=n.key||"",i=e.match(/<([^>]+)>/);if(!i)return e;let o=i[1],a=ke(this.vm,o);return this.resolveDynamicPath(e,o,a)}resolveDynamicPath(n,e,i){let o=`<${e}>`;return n.replace(o,String(i??""))}update(n,e){let i=structuredClone(this.vm);mn(i,n,e),this.vmChange.emit(i)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["app-config-section-component"]],inputs:{schema:"schema",vm:"vm",options:"options"},outputs:{vmChange:"vmChange"},decls:2,vars:1,consts:[[1,"empty"],[1,"section"],[1,"section-title"],[3,"valueChange","item","options","value"],[3,"item","options","value"]],template:function(e,i){e&1&&y(0,bi,2,1)(1,Ti,2,0,"div",0),e&2&&x(i.schema?0:1)},dependencies:[O,Re],styles:[".section[_ngcontent-%COMP%]{padding:0}.section[_ngcontent-%COMP%]:last-child{border-bottom:none}.section-title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:24px;opacity:.85;font-weight:500;padding:0 16px}.empty[_ngcontent-%COMP%]{padding:12px 14px}"]})};var Be=class t{api=u(Zt);getCatalog(n){return this.api.get(`/api/config/catalog/${n}`)}openInEditor(n,e){return this.api.post(`/api/config/openInEditor/${n}/${encodeURIComponent(e)}`,{})}writeDomainSchema(n,e,i){return this.api.post(`/api/config/writeSchema/${n}/${e}`,{vm:i})}getDomainSchemas(n,e){return this.api.get(`/api/config/getDomainSchema/${n}/${e}`)}diffDomainSchema(n,e,i){return this.api.post(`/api/config/diffSchema/${n}/${e}`,{vm:i})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ft({token:t,factory:t.\u0275fac,providedIn:"root"})};var Mi=["class","component"],wi=()=>({}),Di=()=>[],Si=(t,n)=>n.docId;function Ni(t,n){if(t&1&&T(0,"nz-option",13),t&2){let e=n.$implicit;f("nzLabel",e.title)("nzValue",e.docId)}}function Ii(t,n){if(t&1){let e=v();G(0),s(1,"div",11)(2,"label"),m(3,"\u9009\u62E9\u914D\u7F6E\u6587\u4EF6"),l(),s(4,"nz-select",12),Ke("ngModelChange",function(o){_(e);let a=r();return He(a.selectedDocId,o)||(a.selectedDocId=o),h(o)}),S(5,Ni,1,2,"nz-option",13,Si),l()(),X()}if(t&2){let e=r();p(4),Ze("ngModel",e.selectedDocId),p(),N(e.activeDocsMeta()||Y(1,Di))}}function Oi(t,n){if(t&1){let e=v();G(0),s(1,"button",14),C("click",function(){_(e);let o=r();return h(o.openConfig())}),m(2," \u6253\u5F00\u914D\u7F6E\u6587\u4EF6 "),l(),X()}if(t&2){let e=r();p(),f("disabled",!e.selectedDocId())}}var $e=class t{api=u(Be);projectState=u(nn);msg=u(tn);modal=u(Kt);projectId=j(()=>this.projectState.currentProjectId()||"");loading=I(!1);isModalVisible=I(!1);catalog=I(null);navNodes=j(()=>un(this.catalog()??[]));activeDomainId=I(null);selectedDocId=I(null);docStates=I({});domainSchema=I(null);domainVM=I(null);baselineDomainVM=I(null);activeDomain=j(()=>{let n=this.activeDomainId();return(this.catalog()??[]).find(e=>e.domain.id===n)??null});activeDocs=j(()=>this.activeDomain()?.docs??[]);activeDocsMeta=j(()=>{let n=this.activeDomain();return n?(n.docs??[]).map(e=>({docId:e.spec.id,title:e.spec.title,exists:e.exists,relPath:e.chosen?.relPath,codec:e.chosen?.codec})):[]});domainDirty=j(()=>{let n=this.baselineDomainVM(),e=this.domainVM();return!n||!e?!1:!ue.isEqual(n,e)});constructor(){St(()=>{this.projectId()&&this.getCatalog()})}getCatalog(){let n=this.projectId();n&&(this.loading.set(!0),this.api.getCatalog(n).subscribe({next:e=>{this.catalog.set(e);let i=e[0]?.domain?.id??"";i&&(this.activeDomainId.set(i),this.loadDomainSchema(i))},error:e=>{console.error(e),this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u76EE\u5F55\u5931\u8D25")},complete:()=>this.loading.set(!1)}))}onDomainSelect(n){this.activeDomainId.set(n),n==="angular"?this.loadDomainSchema(n):this.domainVM.set(null)}async loadDomainSchema(n){let e=this.projectId();if(e){this.loading.set(!0);try{let i=await ge(this.api.getDomainSchemas(e,n));this.domainSchema.set(i),this.domainVM.set(i.vm),this.baselineDomainVM.set(ue.cloneDeep(i.vm))}catch(i){console.error(i),this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u6A21\u578B\u5931\u8D25"),this.domainVM.set(null),this.baselineDomainVM.set(null)}finally{this.loading.set(!1)}}}async onDiff(){let n=this.projectId(),e=this.activeDomainId(),i=this.domainVM();if(!(!n||!e||!i)){this.loading.set(!0);try{let o=await ge(this.api.diffDomainSchema(n,e,i)),a=o?.docPatch??{},E=o?.filePatch??[],D=[];for(let[z,R]of Object.entries(a))D.push(...Fe("doc",z,R));for(let z of E)D.push(...Fe("file",z.relPath,z.patch));if(D.length===0){this.msg.info("\u6CA1\u6709\u53EF\u5199\u56DE\u7684\u53D8\u66F4");return}D.sort((z,R)=>{if(z.scope!==R.scope)return z.scope.localeCompare(R.scope);let fe=`${z.target}:${z.path}`,Ce=`${R.target}:${R.path}`;return fe.localeCompare(Ce)}),this.modal.create({nzTitle:"\u53D8\u66F4",nzContent:`
|
|
2
2
|
<div style="max-height:60vh; overflow:auto;">
|
|
3
3
|
${D.map(z=>`
|
|
4
4
|
<div style="padding:8px 0; border-bottom:1px solid #f0f0f0;">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ba as We,Ca as G,F as Ne,H as D,Ha as $e,M as ke,N as Me,O as Se,P as Ee,Pa as Be,Wa as Qe,ea as Ie,g as U,ka as Ae,l as b,pa as q,qa as Fe,sa as P,ta as Pe,ua as Ve,x as Te,ya as je,z as F}from"./chunk-PTMJ422K.js";import{d as Re}from"./chunk-53YRDYLS.js";import{Aa as N,Ab as ze,Ba as me,Ca as pe,Eb as Ce,Ec as E,Fb as _e,Fc as K,Gb as ge,Gc as L,Hc as xe,Ib as ye,Ic as I,Jc as A,Kb as C,Na as fe,Oa as he,Tc as be,Vb as m,Xb as p,ac as f,ad as De,bc as h,c as se,cc as u,dc as ve,ea as W,f as j,hc as O,ic as x,jc as we,kc as X,l as T,ma as le,mb as o,na as ce,pa as de,qc as Y,r as w,ra as l,rb as k,rd as H,s as z,tc as r,vb as Q,vd as g,wc as Oe,xa as $,xb as ue,xc as Z,ya as B,yc as M,zc as S}from"./chunk-SJG2JCPL.js";var Ke=["drawerTemplate"];function Le(t,a){if(t&1){let e=X();h(0,"div",9),Y("click",function(){$(e);let _=r(2);return B(_.maskClick())}),u()}if(t&2){let e=r(2);L(e.nzMaskStyle),f("@drawerMaskMotion",void 0)}}function He(t,a){if(t&1&&(O(0),ve(1,"nz-icon",17),x()),t&2){let e=a.$implicit;o(),f("nzType",e)}}function Ue(t,a){if(t&1){let e=X();h(0,"button",15),Y("click",function(){$(e);let _=r(3);return B(_.closeClick())}),C(1,He,2,1,"ng-container",16),u()}if(t&2){let e=r(3);o(),f("nzStringTemplateOutlet",e.nzCloseIcon)}}function qe(t,a){if(t&1&&(O(0),I(1),x()),t&2){let e=r(4);o(),A(e.nzTitle)}}function Ge(t,a){if(t&1&&(h(0,"div",13),C(1,qe,2,1,"ng-container",16),u()),t&2){let e=r(3);o(),f("nzStringTemplateOutlet",e.nzTitle)}}function Je(t,a){if(t&1&&(O(0),I(1),x()),t&2){let e=r(4);o(),A(e.nzExtra)}}function et(t,a){if(t&1&&(h(0,"div",14),C(1,Je,2,1,"ng-container",16),u()),t&2){let e=r(3);o(),f("nzStringTemplateOutlet",e.nzExtra)}}function tt(t,a){if(t&1&&(h(0,"div",10)(1,"div",11),m(2,Ue,2,1,"button",12),m(3,Ge,2,1,"div",13),u(),m(4,et,2,1,"div",14),u()),t&2){let e=r(2);K("ant-drawer-header-close-only",!e.nzTitle),o(2),p(e.nzClosable?2:-1),o(),p(e.nzTitle?3:-1),o(),p(e.nzExtra?4:-1)}}function nt(t,a){}function it(t,a){t&1&&we(0)}function at(t,a){if(t&1&&C(0,it,1,0,"ng-container",18),t&2){let e=r(3);f("ngTemplateOutlet",e.nzContent)("ngTemplateOutletContext",e.templateContext)}}function ot(t,a){if(t&1&&m(0,at,1,2,"ng-container"),t&2){let e=r(2);p(e.isTemplateRef(e.nzContent)?0:-1)}}function rt(t,a){}function st(t,a){if(t&1&&C(0,rt,0,0,"ng-template",19),t&2){let e=r(3);f("ngTemplateOutlet",e.contentFromContentChild)}}function lt(t,a){if(t&1&&m(0,st,1,1,null,19),t&2){let e=r(2);p(e.contentFromContentChild&&(e.isOpen||e.inAnimation)?0:-1)}}function ct(t,a){if(t&1&&(O(0),I(1),x()),t&2){let e=r(3);o(),A(e.nzFooter)}}function dt(t,a){if(t&1&&(h(0,"div",8),C(1,ct,2,1,"ng-container",16),u()),t&2){let e=r(2);o(),f("nzStringTemplateOutlet",e.nzFooter)}}function mt(t,a){if(t&1&&(h(0,"div",1),m(1,Le,1,3,"div",2),h(2,"div")(3,"div",3)(4,"div",4),m(5,tt,5,5,"div",5),h(6,"div",6),C(7,nt,0,0,"ng-template",7),m(8,ot,1,1)(9,lt,1,1),u(),m(10,dt,2,1,"div",8),u()()()()),t&2){let e=r();E("transform",e.offsetTransform)("transition",e.placementChanging?"none":null)("z-index",e.nzZIndex),K("ant-drawer-rtl",e.dir==="rtl")("ant-drawer-open",e.isOpen)("no-mask",!e.nzMask)("ant-drawer-top",e.nzPlacement==="top")("ant-drawer-bottom",e.nzPlacement==="bottom")("ant-drawer-right",e.nzPlacement==="right")("ant-drawer-left",e.nzPlacement==="left"),f("nzNoAnimation",e.nzNoAnimation),o(),p(e.nzMask&&e.isOpen?1:-1),o(),xe(be("ant-drawer-content-wrapper ",e.nzWrapClassName)),E("width",e.width)("height",e.height)("transform",e.transform)("transition",e.placementChanging?"none":null),o(2),E("height",e.isLeftOrRight?"100%":null),o(),p(e.nzTitle||e.nzClosable?5:-1),o(),L(e.nzBodyStyle),o(2),p(e.nzContent?8:9),o(2),p(e.nzFooter?10:-1)}}var pt=(()=>{class t{templateRef=l(Q);static \u0275fac=function(c){return new(c||t)};static \u0275dir=ge({type:t,selectors:[["","nzDrawerContent",""]],exportAs:["nzDrawerContent"]})}return t})(),Xe=378,Ye=736,ft=new de(""),V=class{},ht=300,ut="drawer",Ze=(()=>{var d;let t=V,a,e=[],c=[],_,v=[],R=[],ee,te=[],ne=[],ie,ae=[],oe=[];return d=class extends t{cdr=l(H);nzConfigService=l(Ne);renderer=l(ue);injector=l(N);changeDetectorRef=l(H);focusTrapFactory=l(Ie);viewContainerRef=l(ze);overlayKeyboardDispatcher=l(je);directionality=l(Te);destroyRef=l(pe);_nzModuleName=ut;nzContent;nzCloseIcon="close";nzClosable=!0;nzMaskClosable=z(this,e,!0);nzMask=(z(this,c),z(this,v,!0));nzCloseOnNavigation=(z(this,R),z(this,te,!0));nzNoAnimation=(z(this,ne),!1);nzKeyboard=!0;nzTitle;nzExtra;nzFooter;nzPlacement="right";nzSize="default";nzMaskStyle={};nzBodyStyle={};nzWrapClassName;nzWidth;nzHeight;nzZIndex=1e3;nzOffsetX=0;nzOffsetY=0;componentInstance=null;componentRef=null;set nzVisible(i){this.isOpen=i}get nzVisible(){return this.isOpen}nzOnViewInit=new k;nzOnClose=new k;nzVisibleChange=new k;drawerTemplate;bodyPortalOutlet;contentFromContentChild;previouslyFocusedElement;placementChanging=!1;placementChangeTimeoutId;nzContentParams;nzData;overlayRef;portal;focusTrap;isOpen=!1;inAnimation=!1;templateContext={$implicit:void 0,drawerRef:this};isTemplateRef=U;get offsetTransform(){if(!this.isOpen||this.nzOffsetX+this.nzOffsetY===0)return null;switch(this.nzPlacement){case"left":return`translateX(${this.nzOffsetX}px)`;case"right":return`translateX(-${this.nzOffsetX}px)`;case"top":return`translateY(${this.nzOffsetY}px)`;case"bottom":return`translateY(-${this.nzOffsetY}px)`}}get transform(){if(this.isOpen)return null;switch(this.nzPlacement){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}get width(){if(this.isLeftOrRight){let i=this.nzSize==="large"?Ye:Xe;return this.nzWidth===void 0?b(i):b(this.nzWidth)}return null}get height(){if(!this.isLeftOrRight){let i=this.nzSize==="large"?Ye:Xe;return this.nzHeight===void 0?b(i):b(this.nzHeight)}return null}get isLeftOrRight(){return this.nzPlacement==="left"||this.nzPlacement==="right"}nzAfterOpen=new T;nzAfterClose=new T;get afterOpen(){return this.nzAfterOpen.asObservable()}get afterClose(){return this.nzAfterClose.asObservable()}get isNzContentTemplateRef(){return U(this.nzContent)}nzDirection=z(this,ae,void 0);dir=(z(this,oe),"ltr");document=l(me);constructor(){super(),this.destroyRef.onDestroy(()=>{clearTimeout(this.placementChangeTimeoutId),this.disposeOverlay()})}ngOnInit(){this.directionality.change?.pipe(F(this.destroyRef)).subscribe(i=>{this.dir=i,this.cdr.detectChanges()}),this.dir=this.nzDirection||this.directionality.value,this.attachOverlay(),this.updateOverlayStyle(),this.updateBodyOverflow(),this.templateContext={$implicit:this.nzData||this.nzContentParams,drawerRef:this},this.changeDetectorRef.detectChanges()}ngAfterViewInit(){this.attachBodyContent(),this.nzOnViewInit.observers.length&&setTimeout(()=>{this.nzOnViewInit.emit()})}ngOnChanges(i){let{nzPlacement:n,nzVisible:s}=i;s&&(i.nzVisible.currentValue?this.open():this.close()),n&&!n.isFirstChange()&&this.triggerPlacementChangeCycleOnce()}getAnimationDuration(){return this.nzNoAnimation?0:ht}triggerPlacementChangeCycleOnce(){this.nzNoAnimation||(this.placementChanging=!0,this.changeDetectorRef.markForCheck(),clearTimeout(this.placementChangeTimeoutId),this.placementChangeTimeoutId=setTimeout(()=>{this.placementChanging=!1,this.changeDetectorRef.markForCheck()},this.getAnimationDuration()))}close(i){this.isOpen=!1,this.inAnimation=!0,this.nzVisibleChange.emit(!1),this.updateOverlayStyle(),this.overlayKeyboardDispatcher.remove(this.overlayRef),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.updateBodyOverflow(),this.restoreFocus(),this.inAnimation=!1,this.nzAfterClose.next(i),this.nzAfterClose.complete(),this.componentInstance=null,this.componentRef=null},this.getAnimationDuration())}open(){this.attachOverlay(),this.isOpen=!0,this.inAnimation=!0,this.nzVisibleChange.emit(!0),this.overlayKeyboardDispatcher.add(this.overlayRef),this.updateOverlayStyle(),this.updateBodyOverflow(),this.savePreviouslyFocusedElement(),this.trapFocus(),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.inAnimation=!1,this.changeDetectorRef.detectChanges(),this.nzAfterOpen.next()},this.getAnimationDuration())}getContentComponent(){return this.componentInstance}getContentComponentRef(){return this.componentRef}closeClick(){this.nzOnClose.emit()}maskClick(){this.nzMaskClosable&&this.nzMask&&this.nzOnClose.emit()}attachBodyContent(){if(this.bodyPortalOutlet.dispose(),this.nzContent instanceof fe){let i=N.create({parent:this.injector,providers:[{provide:V,useValue:this},{provide:ft,useValue:this.nzData}]}),n=new q(this.nzContent,null,i);this.componentRef=this.bodyPortalOutlet.attachComponentPortal(n),this.componentInstance=this.componentRef.instance,Object.assign(this.componentRef.instance,this.nzData||this.nzContentParams),this.componentRef.changeDetectorRef.detectChanges()}}attachOverlay(){this.overlayRef||(this.portal=new Fe(this.drawerTemplate,this.viewContainerRef),this.overlayRef=G(this.injector,{disposeOnNavigation:this.nzCloseOnNavigation,positionStrategy:We(this.injector),scrollStrategy:Ve(this.injector)}),Qe(this.overlayRef,this.nzZIndex)),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.overlayRef.keydownEvents().pipe(F(this.destroyRef)).subscribe(i=>{i.keyCode===27&&this.isOpen&&this.nzKeyboard&&this.nzOnClose.emit()}),this.overlayRef.detachments().pipe(F(this.destroyRef)).subscribe(()=>{this.close(),this.disposeOverlay()}))}disposeOverlay(){this.overlayRef?.dispose(),this.overlayRef=null}updateOverlayStyle(){this.overlayRef&&this.overlayRef.overlayElement&&this.renderer.setStyle(this.overlayRef.overlayElement,"pointer-events",this.isOpen?"auto":"none")}updateBodyOverflow(){this.overlayRef&&(this.isOpen?this.overlayRef.getConfig().scrollStrategy.enable():this.overlayRef.getConfig().scrollStrategy.disable())}savePreviouslyFocusedElement(){this.document&&!this.previouslyFocusedElement&&(this.previouslyFocusedElement=this.document.activeElement,this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.blur=="function"&&this.previouslyFocusedElement.blur())}trapFocus(){!this.focusTrap&&this.overlayRef&&this.overlayRef.overlayElement&&(this.focusTrap=this.focusTrapFactory.create(this.overlayRef.overlayElement),this.focusTrap.focusInitialElement())}restoreFocus(){this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.focus=="function"&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=void 0),this.focusTrap&&this.focusTrap.destroy()}},(()=>{let i=typeof Symbol=="function"&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[D()],_=[D()],ee=[D()],ie=[D()],w(null,null,a,{kind:"field",name:"nzMaskClosable",static:!1,private:!1,access:{has:n=>"nzMaskClosable"in n,get:n=>n.nzMaskClosable,set:(n,s)=>{n.nzMaskClosable=s}},metadata:i},e,c),w(null,null,_,{kind:"field",name:"nzMask",static:!1,private:!1,access:{has:n=>"nzMask"in n,get:n=>n.nzMask,set:(n,s)=>{n.nzMask=s}},metadata:i},v,R),w(null,null,ee,{kind:"field",name:"nzCloseOnNavigation",static:!1,private:!1,access:{has:n=>"nzCloseOnNavigation"in n,get:n=>n.nzCloseOnNavigation,set:(n,s)=>{n.nzCloseOnNavigation=s}},metadata:i},te,ne),w(null,null,ie,{kind:"field",name:"nzDirection",static:!1,private:!1,access:{has:n=>"nzDirection"in n,get:n=>n.nzDirection,set:(n,s)=>{n.nzDirection=s}},metadata:i},ae,oe),i&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),j(d,"\u0275fac",function(n){return new(n||d)}),j(d,"\u0275cmp",Ce({type:d,selectors:[["nz-drawer"]],contentQueries:function(n,s,y){if(n&1&&Oe(y,pt,7,Q),n&2){let re;M(re=S())&&(s.contentFromContentChild=re.first)}},viewQuery:function(n,s){if(n&1&&(Z(Ke,7),Z(P,5)),n&2){let y;M(y=S())&&(s.drawerTemplate=y.first),M(y=S())&&(s.bodyPortalOutlet=y.first)}},inputs:{nzContent:"nzContent",nzCloseIcon:"nzCloseIcon",nzClosable:[2,"nzClosable","nzClosable",g],nzMaskClosable:[2,"nzMaskClosable","nzMaskClosable",g],nzMask:[2,"nzMask","nzMask",g],nzCloseOnNavigation:[2,"nzCloseOnNavigation","nzCloseOnNavigation",g],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",g],nzKeyboard:[2,"nzKeyboard","nzKeyboard",g],nzTitle:"nzTitle",nzExtra:"nzExtra",nzFooter:"nzFooter",nzPlacement:"nzPlacement",nzSize:"nzSize",nzMaskStyle:"nzMaskStyle",nzBodyStyle:"nzBodyStyle",nzWrapClassName:"nzWrapClassName",nzWidth:"nzWidth",nzHeight:"nzHeight",nzZIndex:"nzZIndex",nzOffsetX:"nzOffsetX",nzOffsetY:"nzOffsetY",nzVisible:[2,"nzVisible","nzVisible",g]},outputs:{nzOnViewInit:"nzOnViewInit",nzOnClose:"nzOnClose",nzVisibleChange:"nzVisibleChange"},exportAs:["nzDrawer"],features:[ye,he],decls:2,vars:0,consts:[["drawerTemplate",""],[1,"ant-drawer",3,"nzNoAnimation"],[1,"ant-drawer-mask",3,"style"],[1,"ant-drawer-content"],[1,"ant-drawer-wrapper-body"],[1,"ant-drawer-header",3,"ant-drawer-header-close-only"],["cdkScrollable","",1,"ant-drawer-body"],["cdkPortalOutlet",""],[1,"ant-drawer-footer"],[1,"ant-drawer-mask",3,"click"],[1,"ant-drawer-header"],[1,"ant-drawer-header-title"],["aria-label","Close",1,"ant-drawer-close"],[1,"ant-drawer-title"],[1,"ant-drawer-extra"],["aria-label","Close",1,"ant-drawer-close",3,"click"],[4,"nzStringTemplateOutlet"],[3,"nzType"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet"]],template:function(n,s){n&1&&C(0,mt,11,40,"ng-template",null,0,De)},dependencies:[Be,Ee,Se,Me,ke,Pe,P,Re,Ae],encapsulation:2,data:{animation:[$e]},changeDetection:0})),d})(),J=class{overlayRef;options;drawerRef;unsubscribe$=new T;constructor(a,e){this.overlayRef=a,this.options=e;let v=this.options,{nzOnCancel:c}=v,_=se(v,["nzOnCancel"]);this.drawerRef=this.overlayRef.attach(new q(Ze)).instance,this.updateOptions(_),this.drawerRef.savePreviouslyFocusedElement(),this.drawerRef.nzOnViewInit.pipe(W(this.unsubscribe$)).subscribe(()=>{this.drawerRef.open()}),this.drawerRef.nzOnClose.subscribe(()=>{c?c().then(R=>{R!==!1&&this.drawerRef.close()}):this.drawerRef.close()}),this.drawerRef.afterClose.pipe(W(this.unsubscribe$)).subscribe(()=>{this.overlayRef.dispose(),this.drawerRef=null,this.unsubscribe$.next(),this.unsubscribe$.complete()})}getInstance(){return this.drawerRef}updateOptions(a){Object.assign(this.drawerRef,a)}},zt=(()=>{class t{injector=l(N);create(e){return new J(G(this.injector),e).getInstance()}static \u0275fac=function(c){return new(c||t)};static \u0275prov=le({token:t,factory:t.\u0275fac})}return t})(),Lt=(()=>{class t{static \u0275fac=function(c){return new(c||t)};static \u0275mod=_e({type:t});static \u0275inj=ce({providers:[zt],imports:[Ze]})}return t})();export{pt as a,Ze as b,Lt as c};
|
|
1
|
+
import{Ba as We,Ca as G,F as Ne,H as D,Ha as $e,M as ke,N as Me,O as Se,P as Ee,Qa as Be,Xa as Qe,ea as Ie,g as U,ka as Ae,l as b,pa as q,qa as Fe,sa as P,ta as Pe,ua as Ve,x as Te,ya as je,z as F}from"./chunk-5EQOKH7G.js";import{e as Re}from"./chunk-X3HFJACM.js";import{Aa as N,Ab as ze,Ba as me,Ca as pe,Eb as Ce,Ec as E,Fb as _e,Fc as K,Gb as ge,Gc as L,Hc as xe,Ib as ye,Ic as I,Jc as A,Kb as C,Na as fe,Oa as he,Tc as be,Vb as m,Xb as p,ac as f,ad as De,bc as h,c as se,cc as u,dc as ve,ea as W,f as j,hc as O,ic as x,jc as we,kc as X,l as T,ma as le,mb as o,na as ce,pa as de,qc as Y,r as w,ra as l,rb as k,rd as H,s as z,tc as r,vb as Q,vd as g,wc as Oe,xa as $,xb as ue,xc as Z,ya as B,yc as M,zc as S}from"./chunk-SJG2JCPL.js";var Ke=["drawerTemplate"];function Le(t,a){if(t&1){let e=X();h(0,"div",9),Y("click",function(){$(e);let _=r(2);return B(_.maskClick())}),u()}if(t&2){let e=r(2);L(e.nzMaskStyle),f("@drawerMaskMotion",void 0)}}function He(t,a){if(t&1&&(O(0),ve(1,"nz-icon",17),x()),t&2){let e=a.$implicit;o(),f("nzType",e)}}function Ue(t,a){if(t&1){let e=X();h(0,"button",15),Y("click",function(){$(e);let _=r(3);return B(_.closeClick())}),C(1,He,2,1,"ng-container",16),u()}if(t&2){let e=r(3);o(),f("nzStringTemplateOutlet",e.nzCloseIcon)}}function qe(t,a){if(t&1&&(O(0),I(1),x()),t&2){let e=r(4);o(),A(e.nzTitle)}}function Ge(t,a){if(t&1&&(h(0,"div",13),C(1,qe,2,1,"ng-container",16),u()),t&2){let e=r(3);o(),f("nzStringTemplateOutlet",e.nzTitle)}}function Je(t,a){if(t&1&&(O(0),I(1),x()),t&2){let e=r(4);o(),A(e.nzExtra)}}function et(t,a){if(t&1&&(h(0,"div",14),C(1,Je,2,1,"ng-container",16),u()),t&2){let e=r(3);o(),f("nzStringTemplateOutlet",e.nzExtra)}}function tt(t,a){if(t&1&&(h(0,"div",10)(1,"div",11),m(2,Ue,2,1,"button",12),m(3,Ge,2,1,"div",13),u(),m(4,et,2,1,"div",14),u()),t&2){let e=r(2);K("ant-drawer-header-close-only",!e.nzTitle),o(2),p(e.nzClosable?2:-1),o(),p(e.nzTitle?3:-1),o(),p(e.nzExtra?4:-1)}}function nt(t,a){}function it(t,a){t&1&&we(0)}function at(t,a){if(t&1&&C(0,it,1,0,"ng-container",18),t&2){let e=r(3);f("ngTemplateOutlet",e.nzContent)("ngTemplateOutletContext",e.templateContext)}}function ot(t,a){if(t&1&&m(0,at,1,2,"ng-container"),t&2){let e=r(2);p(e.isTemplateRef(e.nzContent)?0:-1)}}function rt(t,a){}function st(t,a){if(t&1&&C(0,rt,0,0,"ng-template",19),t&2){let e=r(3);f("ngTemplateOutlet",e.contentFromContentChild)}}function lt(t,a){if(t&1&&m(0,st,1,1,null,19),t&2){let e=r(2);p(e.contentFromContentChild&&(e.isOpen||e.inAnimation)?0:-1)}}function ct(t,a){if(t&1&&(O(0),I(1),x()),t&2){let e=r(3);o(),A(e.nzFooter)}}function dt(t,a){if(t&1&&(h(0,"div",8),C(1,ct,2,1,"ng-container",16),u()),t&2){let e=r(2);o(),f("nzStringTemplateOutlet",e.nzFooter)}}function mt(t,a){if(t&1&&(h(0,"div",1),m(1,Le,1,3,"div",2),h(2,"div")(3,"div",3)(4,"div",4),m(5,tt,5,5,"div",5),h(6,"div",6),C(7,nt,0,0,"ng-template",7),m(8,ot,1,1)(9,lt,1,1),u(),m(10,dt,2,1,"div",8),u()()()()),t&2){let e=r();E("transform",e.offsetTransform)("transition",e.placementChanging?"none":null)("z-index",e.nzZIndex),K("ant-drawer-rtl",e.dir==="rtl")("ant-drawer-open",e.isOpen)("no-mask",!e.nzMask)("ant-drawer-top",e.nzPlacement==="top")("ant-drawer-bottom",e.nzPlacement==="bottom")("ant-drawer-right",e.nzPlacement==="right")("ant-drawer-left",e.nzPlacement==="left"),f("nzNoAnimation",e.nzNoAnimation),o(),p(e.nzMask&&e.isOpen?1:-1),o(),xe(be("ant-drawer-content-wrapper ",e.nzWrapClassName)),E("width",e.width)("height",e.height)("transform",e.transform)("transition",e.placementChanging?"none":null),o(2),E("height",e.isLeftOrRight?"100%":null),o(),p(e.nzTitle||e.nzClosable?5:-1),o(),L(e.nzBodyStyle),o(2),p(e.nzContent?8:9),o(2),p(e.nzFooter?10:-1)}}var pt=(()=>{class t{templateRef=l(Q);static \u0275fac=function(c){return new(c||t)};static \u0275dir=ge({type:t,selectors:[["","nzDrawerContent",""]],exportAs:["nzDrawerContent"]})}return t})(),Xe=378,Ye=736,ft=new de(""),V=class{},ht=300,ut="drawer",Ze=(()=>{var d;let t=V,a,e=[],c=[],_,v=[],R=[],ee,te=[],ne=[],ie,ae=[],oe=[];return d=class extends t{cdr=l(H);nzConfigService=l(Ne);renderer=l(ue);injector=l(N);changeDetectorRef=l(H);focusTrapFactory=l(Ie);viewContainerRef=l(ze);overlayKeyboardDispatcher=l(je);directionality=l(Te);destroyRef=l(pe);_nzModuleName=ut;nzContent;nzCloseIcon="close";nzClosable=!0;nzMaskClosable=z(this,e,!0);nzMask=(z(this,c),z(this,v,!0));nzCloseOnNavigation=(z(this,R),z(this,te,!0));nzNoAnimation=(z(this,ne),!1);nzKeyboard=!0;nzTitle;nzExtra;nzFooter;nzPlacement="right";nzSize="default";nzMaskStyle={};nzBodyStyle={};nzWrapClassName;nzWidth;nzHeight;nzZIndex=1e3;nzOffsetX=0;nzOffsetY=0;componentInstance=null;componentRef=null;set nzVisible(i){this.isOpen=i}get nzVisible(){return this.isOpen}nzOnViewInit=new k;nzOnClose=new k;nzVisibleChange=new k;drawerTemplate;bodyPortalOutlet;contentFromContentChild;previouslyFocusedElement;placementChanging=!1;placementChangeTimeoutId;nzContentParams;nzData;overlayRef;portal;focusTrap;isOpen=!1;inAnimation=!1;templateContext={$implicit:void 0,drawerRef:this};isTemplateRef=U;get offsetTransform(){if(!this.isOpen||this.nzOffsetX+this.nzOffsetY===0)return null;switch(this.nzPlacement){case"left":return`translateX(${this.nzOffsetX}px)`;case"right":return`translateX(-${this.nzOffsetX}px)`;case"top":return`translateY(${this.nzOffsetY}px)`;case"bottom":return`translateY(-${this.nzOffsetY}px)`}}get transform(){if(this.isOpen)return null;switch(this.nzPlacement){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}get width(){if(this.isLeftOrRight){let i=this.nzSize==="large"?Ye:Xe;return this.nzWidth===void 0?b(i):b(this.nzWidth)}return null}get height(){if(!this.isLeftOrRight){let i=this.nzSize==="large"?Ye:Xe;return this.nzHeight===void 0?b(i):b(this.nzHeight)}return null}get isLeftOrRight(){return this.nzPlacement==="left"||this.nzPlacement==="right"}nzAfterOpen=new T;nzAfterClose=new T;get afterOpen(){return this.nzAfterOpen.asObservable()}get afterClose(){return this.nzAfterClose.asObservable()}get isNzContentTemplateRef(){return U(this.nzContent)}nzDirection=z(this,ae,void 0);dir=(z(this,oe),"ltr");document=l(me);constructor(){super(),this.destroyRef.onDestroy(()=>{clearTimeout(this.placementChangeTimeoutId),this.disposeOverlay()})}ngOnInit(){this.directionality.change?.pipe(F(this.destroyRef)).subscribe(i=>{this.dir=i,this.cdr.detectChanges()}),this.dir=this.nzDirection||this.directionality.value,this.attachOverlay(),this.updateOverlayStyle(),this.updateBodyOverflow(),this.templateContext={$implicit:this.nzData||this.nzContentParams,drawerRef:this},this.changeDetectorRef.detectChanges()}ngAfterViewInit(){this.attachBodyContent(),this.nzOnViewInit.observers.length&&setTimeout(()=>{this.nzOnViewInit.emit()})}ngOnChanges(i){let{nzPlacement:n,nzVisible:s}=i;s&&(i.nzVisible.currentValue?this.open():this.close()),n&&!n.isFirstChange()&&this.triggerPlacementChangeCycleOnce()}getAnimationDuration(){return this.nzNoAnimation?0:ht}triggerPlacementChangeCycleOnce(){this.nzNoAnimation||(this.placementChanging=!0,this.changeDetectorRef.markForCheck(),clearTimeout(this.placementChangeTimeoutId),this.placementChangeTimeoutId=setTimeout(()=>{this.placementChanging=!1,this.changeDetectorRef.markForCheck()},this.getAnimationDuration()))}close(i){this.isOpen=!1,this.inAnimation=!0,this.nzVisibleChange.emit(!1),this.updateOverlayStyle(),this.overlayKeyboardDispatcher.remove(this.overlayRef),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.updateBodyOverflow(),this.restoreFocus(),this.inAnimation=!1,this.nzAfterClose.next(i),this.nzAfterClose.complete(),this.componentInstance=null,this.componentRef=null},this.getAnimationDuration())}open(){this.attachOverlay(),this.isOpen=!0,this.inAnimation=!0,this.nzVisibleChange.emit(!0),this.overlayKeyboardDispatcher.add(this.overlayRef),this.updateOverlayStyle(),this.updateBodyOverflow(),this.savePreviouslyFocusedElement(),this.trapFocus(),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.inAnimation=!1,this.changeDetectorRef.detectChanges(),this.nzAfterOpen.next()},this.getAnimationDuration())}getContentComponent(){return this.componentInstance}getContentComponentRef(){return this.componentRef}closeClick(){this.nzOnClose.emit()}maskClick(){this.nzMaskClosable&&this.nzMask&&this.nzOnClose.emit()}attachBodyContent(){if(this.bodyPortalOutlet.dispose(),this.nzContent instanceof fe){let i=N.create({parent:this.injector,providers:[{provide:V,useValue:this},{provide:ft,useValue:this.nzData}]}),n=new q(this.nzContent,null,i);this.componentRef=this.bodyPortalOutlet.attachComponentPortal(n),this.componentInstance=this.componentRef.instance,Object.assign(this.componentRef.instance,this.nzData||this.nzContentParams),this.componentRef.changeDetectorRef.detectChanges()}}attachOverlay(){this.overlayRef||(this.portal=new Fe(this.drawerTemplate,this.viewContainerRef),this.overlayRef=G(this.injector,{disposeOnNavigation:this.nzCloseOnNavigation,positionStrategy:We(this.injector),scrollStrategy:Ve(this.injector)}),Qe(this.overlayRef,this.nzZIndex)),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.overlayRef.keydownEvents().pipe(F(this.destroyRef)).subscribe(i=>{i.keyCode===27&&this.isOpen&&this.nzKeyboard&&this.nzOnClose.emit()}),this.overlayRef.detachments().pipe(F(this.destroyRef)).subscribe(()=>{this.close(),this.disposeOverlay()}))}disposeOverlay(){this.overlayRef?.dispose(),this.overlayRef=null}updateOverlayStyle(){this.overlayRef&&this.overlayRef.overlayElement&&this.renderer.setStyle(this.overlayRef.overlayElement,"pointer-events",this.isOpen?"auto":"none")}updateBodyOverflow(){this.overlayRef&&(this.isOpen?this.overlayRef.getConfig().scrollStrategy.enable():this.overlayRef.getConfig().scrollStrategy.disable())}savePreviouslyFocusedElement(){this.document&&!this.previouslyFocusedElement&&(this.previouslyFocusedElement=this.document.activeElement,this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.blur=="function"&&this.previouslyFocusedElement.blur())}trapFocus(){!this.focusTrap&&this.overlayRef&&this.overlayRef.overlayElement&&(this.focusTrap=this.focusTrapFactory.create(this.overlayRef.overlayElement),this.focusTrap.focusInitialElement())}restoreFocus(){this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.focus=="function"&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=void 0),this.focusTrap&&this.focusTrap.destroy()}},(()=>{let i=typeof Symbol=="function"&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[D()],_=[D()],ee=[D()],ie=[D()],w(null,null,a,{kind:"field",name:"nzMaskClosable",static:!1,private:!1,access:{has:n=>"nzMaskClosable"in n,get:n=>n.nzMaskClosable,set:(n,s)=>{n.nzMaskClosable=s}},metadata:i},e,c),w(null,null,_,{kind:"field",name:"nzMask",static:!1,private:!1,access:{has:n=>"nzMask"in n,get:n=>n.nzMask,set:(n,s)=>{n.nzMask=s}},metadata:i},v,R),w(null,null,ee,{kind:"field",name:"nzCloseOnNavigation",static:!1,private:!1,access:{has:n=>"nzCloseOnNavigation"in n,get:n=>n.nzCloseOnNavigation,set:(n,s)=>{n.nzCloseOnNavigation=s}},metadata:i},te,ne),w(null,null,ie,{kind:"field",name:"nzDirection",static:!1,private:!1,access:{has:n=>"nzDirection"in n,get:n=>n.nzDirection,set:(n,s)=>{n.nzDirection=s}},metadata:i},ae,oe),i&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),j(d,"\u0275fac",function(n){return new(n||d)}),j(d,"\u0275cmp",Ce({type:d,selectors:[["nz-drawer"]],contentQueries:function(n,s,y){if(n&1&&Oe(y,pt,7,Q),n&2){let re;M(re=S())&&(s.contentFromContentChild=re.first)}},viewQuery:function(n,s){if(n&1&&(Z(Ke,7),Z(P,5)),n&2){let y;M(y=S())&&(s.drawerTemplate=y.first),M(y=S())&&(s.bodyPortalOutlet=y.first)}},inputs:{nzContent:"nzContent",nzCloseIcon:"nzCloseIcon",nzClosable:[2,"nzClosable","nzClosable",g],nzMaskClosable:[2,"nzMaskClosable","nzMaskClosable",g],nzMask:[2,"nzMask","nzMask",g],nzCloseOnNavigation:[2,"nzCloseOnNavigation","nzCloseOnNavigation",g],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",g],nzKeyboard:[2,"nzKeyboard","nzKeyboard",g],nzTitle:"nzTitle",nzExtra:"nzExtra",nzFooter:"nzFooter",nzPlacement:"nzPlacement",nzSize:"nzSize",nzMaskStyle:"nzMaskStyle",nzBodyStyle:"nzBodyStyle",nzWrapClassName:"nzWrapClassName",nzWidth:"nzWidth",nzHeight:"nzHeight",nzZIndex:"nzZIndex",nzOffsetX:"nzOffsetX",nzOffsetY:"nzOffsetY",nzVisible:[2,"nzVisible","nzVisible",g]},outputs:{nzOnViewInit:"nzOnViewInit",nzOnClose:"nzOnClose",nzVisibleChange:"nzVisibleChange"},exportAs:["nzDrawer"],features:[ye,he],decls:2,vars:0,consts:[["drawerTemplate",""],[1,"ant-drawer",3,"nzNoAnimation"],[1,"ant-drawer-mask",3,"style"],[1,"ant-drawer-content"],[1,"ant-drawer-wrapper-body"],[1,"ant-drawer-header",3,"ant-drawer-header-close-only"],["cdkScrollable","",1,"ant-drawer-body"],["cdkPortalOutlet",""],[1,"ant-drawer-footer"],[1,"ant-drawer-mask",3,"click"],[1,"ant-drawer-header"],[1,"ant-drawer-header-title"],["aria-label","Close",1,"ant-drawer-close"],[1,"ant-drawer-title"],[1,"ant-drawer-extra"],["aria-label","Close",1,"ant-drawer-close",3,"click"],[4,"nzStringTemplateOutlet"],[3,"nzType"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet"]],template:function(n,s){n&1&&C(0,mt,11,40,"ng-template",null,0,De)},dependencies:[Be,Ee,Se,Me,ke,Pe,P,Re,Ae],encapsulation:2,data:{animation:[$e]},changeDetection:0})),d})(),J=class{overlayRef;options;drawerRef;unsubscribe$=new T;constructor(a,e){this.overlayRef=a,this.options=e;let v=this.options,{nzOnCancel:c}=v,_=se(v,["nzOnCancel"]);this.drawerRef=this.overlayRef.attach(new q(Ze)).instance,this.updateOptions(_),this.drawerRef.savePreviouslyFocusedElement(),this.drawerRef.nzOnViewInit.pipe(W(this.unsubscribe$)).subscribe(()=>{this.drawerRef.open()}),this.drawerRef.nzOnClose.subscribe(()=>{c?c().then(R=>{R!==!1&&this.drawerRef.close()}):this.drawerRef.close()}),this.drawerRef.afterClose.pipe(W(this.unsubscribe$)).subscribe(()=>{this.overlayRef.dispose(),this.drawerRef=null,this.unsubscribe$.next(),this.unsubscribe$.complete()})}getInstance(){return this.drawerRef}updateOptions(a){Object.assign(this.drawerRef,a)}},zt=(()=>{class t{injector=l(N);create(e){return new J(G(this.injector),e).getInstance()}static \u0275fac=function(c){return new(c||t)};static \u0275prov=le({token:t,factory:t.\u0275fac})}return t})(),Lt=(()=>{class t{static \u0275fac=function(c){return new(c||t)};static \u0275mod=_e({type:t});static \u0275inj=ce({providers:[zt],imports:[Ze]})}return t})();export{pt as a,Ze as b,Lt as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as dn,b as un,c as fn}from"./chunk-E6LF4XBJ.js";import{a as gn,b as Cn,c as _n,d as zn,e as hn}from"./chunk-6X6PEDE5.js";import{a as sn,b as ln,c as cn,d as mn}from"./chunk-NYXWJKSW.js";import{a as Wt,b as Lt,c as Gt}from"./chunk-42JVTVYH.js";import{a as Ve,b as Ae,c as ue}from"./chunk-GKY4LJF4.js";import{b as on,d as pn}from"./chunk-W633D3VG.js";import"./chunk-SIVPP74B.js";import{a as rn,b as an}from"./chunk-QM5ROT66.js";import{a as Re,b as fe}from"./chunk-DP3VTELD.js";import"./chunk-HZ73CM45.js";import{a as Yt,b as Kt}from"./chunk-YFAKNLWB.js";import{a as Z,b as I}from"./chunk-ITXWAN4J.js";import{a as Oe,c as Ie,d as Xt,e as en,f as Be}from"./chunk-25RT7L2O.js";import{a as dt,b as L,c as G,d as $,f as Jt,g as Ht}from"./chunk-OC62FHHS.js";import{b as $t}from"./chunk-6JH45SUC.js";import{a as tn,b as nn}from"./chunk-KPO75P5E.js";import"./chunk-SNCDDYQR.js";import{B as ne,C as De,D as me,E as Ne,F as Fe,H as de,I as oe,h as Zt,i as Ee,v as je,w as be,x as ce}from"./chunk-2P5WKSWB.js";import{Ab as Se,Cb as K,Db as le,Eb as Q,Hb as ee,Jb as te,M as v,N as P,T as At,U as Rt,V as j,W as H,Y as D,Z as S,kb as Y,mb as U,nb as Ut,pb as qt,qb as q,rb as Qt,xb as E}from"./chunk-5EQOKH7G.js";import"./chunk-HFZLJHYR.js";import{C as ze,e as Bt,g as Vt,j as h,z as Te}from"./chunk-X3HFJACM.js";import{$b as pe,A as pt,Dc as V,Eb as M,Ec as Tt,Fb as ke,Fc as St,Ha as B,Ic as l,Jc as b,Kb as O,Kc as se,M as st,Mc as w,Nc as k,Oa as xe,Oc as T,Pc as Et,Q as Ct,Qc as jt,Rc as bt,U as _t,Vb as y,Vc as Dt,W as zt,Wc as mt,Xb as x,Zb as Pt,Zc as Nt,_b as ae,_c as Ft,a as J,ac as g,ad as W,b as at,bc as r,cc as a,da as ht,dc as c,ea as lt,fd as A,g as ft,gd as Ot,hc as vt,ic as yt,jc as ct,kc as z,l as ve,ma as Mt,mb as s,na as ye,pd as It,qc as m,ra as C,rb as F,tc as d,u as gt,xa as u,xc as xt,ya as f,yb as we,yc as wt,z as _e,zc as kt}from"./chunk-SJG2JCPL.js";var kn=()=>({padding:"8px"});function Tn(o,n){if(o&1){let e=z();r(0,"button",13),m("click",function(){u(e);let i=d();return f(i.copy())}),c(1,"nz-icon",14),a()}if(o&2){let e=d();g("nz-tooltip",e.copyied?"\u5DF2\u590D\u5236":"\u590D\u5236")}}function Sn(o,n){if(o&1&&(r(0,"div",9)(1,"nz-tag",15),l(2),a()()),o&2){let e=d();s(2),se("\u63A8\u8350\uFF1A",e.draft.detected==null?null:e.draft.detected.recommendedScript)}}function En(o,n){o&1&&(r(0,"div",10),l(1," \u26A0\uFE0F \u8986\u76D6\u5DF2\u5B58\u5728\u76EE\u5F55 "),a())}function jn(o,n){if(o&1){let e=z();r(0,"button",16),m("click",function(){u(e);let i=d();return f(i.isDrawerOpen=!i.isDrawerOpen)}),c(1,"nz-icon",17),l(2," \u65E5\u5FD7\u8F93\u51FA "),a()}}function bn(o,n){o&1&&(vt(0),c(1,"app-terminal-view"),yt()),o&2&&(s(),Tt("height",100,"%"))}var We=class o{draft;chunk="";clipboard=C(pn);term;isDrawerOpen=!1;isCreating=It(!1);copyied=!1;ngOnChanges(n){n.chunk&&n.chunk.currentValue&&this.term&&this.term.write(this.chunk),n.isCreating&&n.isCreating.currentValue===!0&&(this.isDrawerOpen=!0)}copy(){let n=this.draft.repoUrl||"";this.clipboard.copy(n),this.copyied=!0,setTimeout(()=>{this.copyied=!1},2e3)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-create-summary-aside"]],viewQuery:function(e,t){if(e&1&&xt(dt,5),e&2){let i;wt(i=kt())&&(t.term=i.first)}},inputs:{draft:"draft",chunk:"chunk",isCreating:[1,"isCreating"]},outputs:{isCreating:"isCreatingChange"},features:[xe],decls:44,vars:16,consts:[["logActions",""],["nzTitle","\u6458\u8981","nzSize","small",3,"nzExtra"],[1,"item"],[1,"k"],[1,"v"],[1,"v","mono"],[1,"v",3,"nz-tooltip"],["nz-button","","nzType","text","nzSize","small",3,"nz-tooltip"],[1,"sep"],[1,"tag"],[1,"warn"],["nzTitle","\u65E5\u5FD7","nzPlacement","right",3,"nzOnClose","nzVisible","nzWidth","nzBodyStyle"],[4,"nzDrawerContent"],["nz-button","","nzType","text","nzSize","small",3,"click","nz-tooltip"],["nzType","copy","nzTheme","outline"],["nzColor","blue"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nzType","desktop","nzTheme","outline"]],template:function(e,t){if(e&1){let i=z();r(0,"nz-card",1)(1,"div",2)(2,"span",3),l(3,"\u540D\u79F0"),a(),r(4,"span",4),l(5),a()(),r(6,"div",2)(7,"span",3),l(8,"\u8DEF\u5F84"),a(),r(9,"span",5),l(10),a()(),r(11,"div",2)(12,"span",3),l(13,"\u5305\u7BA1\u7406\u5668"),a(),r(14,"span",4),l(15),a()(),r(16,"div",2)(17,"span",3),l(18,"Git \u8FDC\u7A0B\u4ED3\u5E93"),a(),r(19,"span",6),l(20),a(),y(21,Tn,2,1,"button",7),a(),c(22,"div",8),r(23,"div",2)(24,"span",3),l(25,"\u6846\u67B6"),a(),r(26,"span",4),l(27),a()(),r(28,"div",2)(29,"span",3),l(30,"\u811A\u672C\u547D\u4EE4"),a(),r(31,"span",4),l(32),a()(),r(33,"div",2)(34,"span",3),l(35,"Git"),a(),r(36,"span",4),l(37),a()(),y(38,Sn,3,1,"div",9),y(39,En,2,0,"div",10),a(),O(40,jn,3,0,"ng-template",null,0,W),r(42,"nz-drawer",11),m("nzOnClose",function(){return u(i),f(t.isDrawerOpen=!1)}),O(43,bn,2,2,"ng-container",12),a()}if(e&2){let i=V(41);g("nzExtra",i),s(5),b(t.draft.name||"-"),s(5),b(t.draft.rootPath||"-"),s(5),b(t.draft.packageManager),s(4),g("nz-tooltip",t.draft.repoUrl||""),s(),b(t.draft.repoUrl||"-"),s(),x(t.draft.repoUrl?21:-1),s(6),b((t.draft.detected==null?null:t.draft.detected.framework)||"-"),s(5),b((t.draft.detected==null?null:t.draft.detected.scriptsCount)??"-"),s(5),b(t.draft.detected!=null&&t.draft.detected.hasGit?"Yes":"No"),s(),x(t.draft.detected!=null&&t.draft.detected.recommendedScript?38:-1),s(),x(t.draft.overwriteIfExists?39:-1),s(3),g("nzVisible",t.isDrawerOpen)("nzWidth",720)("nzBodyStyle",Dt(15,kn))}},dependencies:[h,I,Z,fe,Re,te,ee,P,v,S,D,j,dt,Gt,Lt,Wt],styles:[".item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:10px;padding:6px 0;align-items:center}.k[_ngcontent-%COMP%]{opacity:.7;width:90px;font-size:14px}.v[_ngcontent-%COMP%]{text-align:right;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;word-break:break-all}.sep[_ngcontent-%COMP%]{height:1px;background:#0000000f;margin:10px 0}.tag[_ngcontent-%COMP%]{margin-top:8px;text-align:right}.warn[_ngcontent-%COMP%]{margin-top:10px;font-size:12px;color:#d46b08}"],changeDetection:0})};function In(o,n){o&1&&c(0,"nz-empty",6)}function Bn(o,n){if(o&1&&(r(0,"nz-tag",17),l(1),Nt(2,"titlecase"),a()),o&2){let e=d().$implicit,t=bt(4);g("nzColor",t==="angular"?"#dd0031":t==="vue"?"#42b883":"#108ee9"),s(),se(" ",Ft(2,2,e.kind)," ")}}function Vn(o,n){if(o&1&&(r(0,"div",14)(1,"div",15)(2,"div",16),l(3),a(),Et(4),y(5,Bn,3,4,"nz-tag",17),a()()),o&2){let e=n.$implicit;g("nzValue",e.path),s(2),g("nz-tooltip",e.path),s(),b(e.path),s();let t=jt(e.kind);s(),x(t?5:-1)}}function An(o,n){if(o&1){let e=z();r(0,"nz-radio-group",13),T("ngModelChange",function(i){u(e);let p=d();return k(p.selectedPath,i)||(p.selectedPath=i),f(i)}),ae(1,Vn,6,5,"div",14,Pt),a()}if(o&2){let e=d();w("ngModel",e.selectedPath),s(),pe(e.filtered())}}var Ge=class o{constructor(n){this.modalRef=n}data=C(je);keyword=B("");selectedPath=B(null);ngOnInit(){let{candidates:n,defaultPicked:e}=this.data,t=e&&n.includes(e)?e:n[0]??"";this.selectedPath.set(t?.path??null)}filtered=A(()=>{let n=(this.keyword()||"").trim().toLowerCase(),e=this.data.candidates??[];return n?e.filter(t=>t.path.toLowerCase().includes(n)):e});cancel(){this.modalRef.close(null)}ok(){let n=this.selectedPath();n&&this.modalRef.close({pickedRoot:n})}static \u0275fac=function(e){return new(e||o)(we(be))};static \u0275cmp=M({type:o,selectors:[["app-pick-workspace-modal"]],decls:17,vars:3,consts:[[1,"wrap"],[1,"hint"],[1,"toolbar"],["nz-input","","placeholder","\u8FC7\u6EE4\u8DEF\u5F84\uFF08\u5173\u952E\u5B57\uFF09",3,"ngModelChange","ngModel"],["nzType","search","nzTheme","outline","nzSuffix",""],[1,"list"],["nzNotFoundContent","\u6CA1\u6709\u5339\u914D\u7684\u76EE\u5F55"],["nzSize","large",3,"ngModel"],[1,"actions"],["nz-button","",3,"click"],["nzType","close","nzTheme","outline"],["nz-button","","nzType","primary",3,"click","disabled"],["nzType","check","nzTheme","outline"],["nzSize","large",3,"ngModelChange","ngModel"],["nz-radio","",1,"item",3,"nzValue"],[1,"path"],["nzTooltipPlacement","top",1,"value",3,"nz-tooltip"],["nzMode","default",3,"nzColor"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),l(2," \u68C0\u6D4B\u5230\u8BE5\u4ED3\u5E93\u53EF\u80FD\u5305\u542B\u591A\u4E2A\u524D\u7AEF\u5DE5\u4F5C\u533A\uFF08Angular / Vue \u7B49\uFF09\u3002\u8BF7\u9009\u62E9\u4E00\u4E2A\u76EE\u5F55\u7EE7\u7EED\u5BFC\u5165\uFF1A "),a(),r(3,"div",2)(4,"nz-input-wrapper")(5,"input",3),T("ngModelChange",function(p){return k(t.keyword,p)||(t.keyword=p),p}),a(),c(6,"nz-icon",4),a()(),r(7,"div",5),y(8,In,1,0,"nz-empty",6)(9,An,3,1,"nz-radio-group",7),a(),r(10,"div",8)(11,"button",9),m("click",function(){return t.cancel()}),c(12,"nz-icon",10),l(13," \u53D6\u6D88 "),a(),r(14,"button",11),m("click",function(){return t.ok()}),c(15,"nz-icon",12),l(16," \u9009\u4E2D\u5E76\u7EE7\u7EED "),a()()()),e&2&&(s(5),w("ngModel",t.keyword),s(3),x(t.filtered().length===0?8:9),s(6),g("disabled",!t.selectedPath()))},dependencies:[h,E,Y,U,q,ne,Q,K,le,ue,Ae,Ve,S,D,j,H,P,v,Ie,Oe,fe,Re,te,ee,Vt],styles:[".wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.hint[_ngcontent-%COMP%]{opacity:.85}.toolbar[_ngcontent-%COMP%]{margin-top:4px}nz-radio-group[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{height:240px;overflow:auto;padding:8px;border:var(--app-border-color);border-radius:8px}.item[_ngcontent-%COMP%]{display:flex;gap:8px;padding:12px;border-radius:8px;margin:0;width:100%}.item[_ngcontent-%COMP%]:hover{background-color:var(--app-primary-3)}.item[_ngcontent-%COMP%] .ant-radio+span{display:flex;gap:12px;align-items:center;flex:1 1 auto;width:0;padding:0}.path[_ngcontent-%COMP%]{display:flex;gap:12px;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;width:0;overflow:hidden}.path[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;width:0;overflow:hidden}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}"]})};function Wn(o,n){o&1&&(r(0,"span",4),l(1,"\u8BE5\u8DEF\u5F84\u5DF2\u5B58\u5728"),a())}function Ln(o,n){if(o&1){let e=z();r(0,"input",15),T("ngModelChange",function(i){u(e);let p=d();return k(p.draft.initialCommitMessage,i)||(p.draft.initialCommitMessage=i),f(i)}),a()}if(o&2){let e=d();w("ngModel",e.draft.initialCommitMessage)}}var Qe=class o{draft;draftChange=new F;pathCheck$=new ve;pathExists=!1;fsApi=C(Zt);ngOnInit(){this.computeRootPath(),this.pathCheck$.pipe(Ct(200),_t(),ht(n=>n?this.fsApi.pathExists(n):gt(!1))).subscribe(n=>{this.emit(),this.pathExists=n})}recalcRoot(){this.computeRootPath(),this.pathCheck$.next(this.draft.rootPath)}computeRootPath(){let n=(this.draft.parentDir??"").replace(/[\\/]+$/,""),e=(this.draft.name??"").trim();this.draft.rootPath=n&&e?`${n}/${e}`.replaceAll("\\","/"):n}emit(){this.draftChange.emit(J({},this.draft))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-basic"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:40,vars:8,consts:[["nzTitle","\u57FA\u7840\u8BBE\u7F6E"],["nz-form","","nzLayout","vertical"],["nz-input","","name","name","placeholder","\u8F93\u5165\u9879\u76EE\u540D",3,"ngModelChange","ngModel"],[1,"hint"],[2,"margin-left","8px","color","#ff4d4f"],["name","pm",3,"ngModelChange","ngModel"],["nzValue","auto","nzLabel","\u9ED8\u8BA4"],["nzValue","npm","nzLabel","npm"],["nzValue","pnpm","nzLabel","pnpm"],["nzValue","yarn","nzLabel","yarn"],[1,"switch-row"],["name","overwrite",3,"ngModelChange","ngModel"],["name","skip",3,"ngModelChange","ngModel"],["name","initGit",3,"ngModelChange","ngModel"],["nz-input","","name","msg","placeholder","\u8986\u76D6\u63D0\u4EA4\u4FE1\u606F(\u9009\u586B)",3,"ngModel"],["nz-input","","name","msg","placeholder","\u8986\u76D6\u63D0\u4EA4\u4FE1\u606F(\u9009\u586B)",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&(r(0,"nz-card",0)(1,"form",1)(2,"nz-form-item")(3,"nz-form-label"),l(4,"\u9879\u76EE\u6587\u4EF6\u5939"),a(),r(5,"nz-form-control")(6,"input",2),T("ngModelChange",function(p){return k(t.draft.name,p)||(t.draft.name=p),p}),m("ngModelChange",function(){return t.recalcRoot()}),a(),r(7,"div",3),l(8),y(9,Wn,2,0,"span",4),a()()(),r(10,"nz-form-item")(11,"nz-form-label"),l(12,"\u5305\u7BA1\u7406\u5668"),a(),r(13,"nz-form-control")(14,"nz-select",5),T("ngModelChange",function(p){return k(t.draft.packageManager,p)||(t.draft.packageManager=p),p}),c(15,"nz-option",6)(16,"nz-option",7)(17,"nz-option",8)(18,"nz-option",9),a()()(),r(19,"nz-form-item")(20,"nz-form-label"),l(21,"\u66F4\u591A\u9009\u9879"),a(),r(22,"nz-form-control")(23,"div",10)(24,"span"),l(25,"\u82E5\u76EE\u6807\u6587\u4EF6\u5939\u5DF2\u5B58\u5728\u5219\u8986\u76D6"),a(),r(26,"nz-switch",11),T("ngModelChange",function(p){return k(t.draft.overwriteIfExists,p)||(t.draft.overwriteIfExists=p),p}),m("ngModelChange",function(){return t.emit()}),a()(),r(27,"div",10)(28,"span"),l(29,"\u65E0\u65B0\u624B\u6307\u5F15\u7684\u811A\u624B\u67B6\u9879\u76EE"),a(),r(30,"nz-switch",12),T("ngModelChange",function(p){return k(t.draft.skipOnboarding,p)||(t.draft.skipOnboarding=p),p}),a()()()(),r(31,"nz-form-item")(32,"nz-form-label"),l(33,"Git"),a(),r(34,"nz-form-control")(35,"div",10)(36,"span"),l(37,"\u521D\u59CB\u5316 git \u4ED3\u5E93\uFF08\u5EFA\u8BAE\uFF09"),a(),r(38,"nz-switch",13),T("ngModelChange",function(p){return k(t.draft.initGit,p)||(t.draft.initGit=p),p}),a()(),y(39,Ln,1,1,"input",14),a()()()()),e&2&&(s(6),w("ngModel",t.draft.name),s(2),se(" ",t.draft.rootPath," "),s(),x(t.pathExists?9:-1),s(5),w("ngModel",t.draft.packageManager),s(12),w("ngModel",t.draft.overwriteIfExists),s(4),w("ngModel",t.draft.skipOnboarding),s(8),w("ngModel",t.draft.initGit),s(),x(t.draft.initGit?39:-1))},dependencies:[h,E,Qt,Y,U,Ut,q,qt,hn,G,L,Cn,gn,zn,_n,Q,K,S,Be,Xt,en,me,De,I,Z,te,P,ne],styles:[".hint[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.7}.switch-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-bottom:4px}.switch-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.emit[_ngcontent-%COMP%]{margin-top:8px}"]})};var Je=class o{draft;draftChange=new F;emit(){this.draftChange.emit(J({},this.draft))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-config"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:12,vars:2,consts:[["nzTitle","\u521B\u5EFA\u540E\u9ED8\u8BA4\u884C\u4E3A"],[1,"row"],[1,"label"],[3,"ngModelChange","ngModel"],[1,"row","col"],["nz-input","","placeholder","\u4F8B\u5982\uFF1Adev / start",3,"ngModelChange","ngModel"],[1,"hint"]],template:function(e,t){e&1&&(r(0,"nz-card",0)(1,"div",1)(2,"div",2),l(3,"\u7F6E\u9876\u6536\u85CF"),a(),r(4,"nz-switch",3),T("ngModelChange",function(p){return k(t.draft.pinFavorite,p)||(t.draft.pinFavorite=p),p}),m("ngModelChange",function(){return t.emit()}),a()(),c(5,"div",4),r(6,"div",4)(7,"div",2),l(8,"\u9ED8\u8BA4\u4EFB\u52A1\uFF08\u53EF\u9009\uFF09"),a(),r(9,"input",5),T("ngModelChange",function(p){return k(t.draft.defaultTaskName,p)||(t.draft.defaultTaskName=p),p}),m("ngModelChange",function(){return t.emit()}),a(),r(10,"div",6),l(11,"\u5EFA\u8BAE\u586B\u8BC6\u522B\u5230\u7684 dev \u6216 start"),a()()()),e&2&&(s(4),w("ngModel",t.draft.pinFavorite),s(5),w("ngModel",t.draft.defaultTaskName))},dependencies:[h,E,Y,U,q,I,Z,ue,me,De,Q,K],styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 0}.row.col[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:8px}.label[_ngcontent-%COMP%]{font-weight:500}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.7}"]})};var He=class o{draft;draftChange=new F;emit(){this.draftChange.emit(J({},this.draft))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-features"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:1,vars:0,consts:[["nzTitle","\u529F\u80FD\u5F00\u5173\uFF08Project Scope\uFF09"]],template:function(e,t){e&1&&c(0,"nz-card",0)},dependencies:[h,E,I,Z,me],styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 0}.label[_ngcontent-%COMP%]{font-weight:500}"]})};var Ze=class o{nzModalData=C(je);isModalVisible=!1;isSaving=!1;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-git-import-modal-component"]],decls:8,vars:1,consts:[[1,"modal-body"],[1,"label"],["nz-input","","placeholder","\u8BF7\u8F93\u5165Git\u4ED3\u5E93\u5730\u5740","autofocus","",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","github","nzTheme","outline"],[1,"hint"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"label",1),l(2,"URL"),a(),r(3,"nz-input-wrapper")(4,"input",2),T("ngModelChange",function(p){return k(t.nzModalData.cloneUrl,p)||(t.nzModalData.cloneUrl=p),p}),a(),c(5,"nz-icon",3),a(),r(6,"div",4),l(7," Git \u4ED3\u5E93\u5730\u5740, \u5982 'username/repo'. \u53EF\u4EE5\u4F7F\u7528\u524D\u7F00\u5982 'gitlab:' \u6216 'bitbucket:'. "),a()()),e&2&&(s(4),w("ngModel",t.nzModalData.cloneUrl))},dependencies:[h,E,Y,U,q,P,v,ne,Q,K,le,Se,Be,S,j],styles:[".hint[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.7}"]})};function Gn(o,n){if(o&1){let e=z();r(0,"button",10),m("click",function(){u(e);let i=d();return f(i.requestDetect.emit())}),c(1,"nz-icon",11),a()}}var $e=class o{draft;draftChange=new F;requestDetect=new F;modal=C(ce);emit(){this.draftChange.emit(J({},this.draft))}presetChange(n){if(this.draft.preset=n,n==="git"){this.openImportGitModal();return}else this.draft.repoUrl=void 0,this.emit()}openImportGitModal(){let n=this.modal.create({nzTitle:"\u4ECE Git \u4ED3\u5E93\u5BFC\u5165\u9879\u76EE",nzMaskClosable:!1,nzContent:Ze,nzCentered:!0,nzWidth:"580px",nzClosable:!1,nzData:{cloneUrl:"",isSaving:!1},nzFooter:[{label:"\u53D6\u6D88",type:"default",onClick:()=>{n.close(),this.draft.repoUrl=void 0,this.draft.preset="angular",this.emit()}},{label:"\u5BFC\u5165",type:"primary",onClick:e=>{let t=e.nzModalData.cloneUrl,i=e.nzModalData.isSaving;!t||!t.trim()||i||(e.nzModalData.isSaving=!0,this.draft.repoUrl=t.trim(),e.nzModalData.isSaving=!1,this.emit(),n.close())},disabled:e=>{let t=e?.nzModalData.cloneUrl;return!t||!t.trim()},loading:e=>e?.nzModalData.isSaving===!0}]})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-preset"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange",requestDetect:"requestDetect"},decls:19,vars:2,consts:[["reloadExtraTpl",""],["nzTitle","\u9009\u62E9\u4E00\u5957\u9884\u8BBE",3,"nzExtra"],["nzSize","large",3,"ngModelChange","ngModel"],["nz-radio","","nzValue","angular"],["for","angular"],[1,"hint"],["nz-radio","","nzValue","vue3"],["for","vue3"],["nz-radio","","nzValue","git"],["for","git"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nzType","reload","nzTheme","outline"]],template:function(e,t){if(e&1){let i=z();r(0,"nz-card",1),O(1,Gn,2,0,"ng-template",null,0,W),r(3,"nz-radio-group",2),T("ngModelChange",function(_){return u(i),k(t.draft.preset,_)||(t.draft.preset=_),f(_)}),m("ngModelChange",function(_){return u(i),f(t.presetChange(_))}),r(4,"div",3)(5,"label",4),l(6,"Angular"),a(),r(7,"div",5),l(8," \u9002\u7528\u4E8E\u4F7F\u7528 Angular \u6846\u67B6\u5F00\u53D1\u7684\u9879\u76EE\uFF0C\u652F\u6301 Angular CLI \u76F8\u5173\u4EFB\u52A1\u548C\u914D\u7F6E\u3002 "),a()(),r(9,"div",6)(10,"label",7),l(11,"Vue 3"),a(),r(12,"div",5),l(13," \u9002\u7528\u4E8E\u4F7F\u7528 Vue 3 \u6846\u67B6\u5F00\u53D1\u7684\u9879\u76EE\uFF0C\u652F\u6301 Vite \u548C Vue CLI \u76F8\u5173\u4EFB\u52A1\u548C\u914D\u7F6E\u3002 "),a()(),r(14,"div",8)(15,"label",9),l(16,"Git\u5BFC\u5165"),a(),r(17,"div",5),l(18," \u4ECE\u73B0\u6709\u7684 Git \u4ED3\u5E93\u5BFC\u5165\u9879\u76EE\uFF0C\u81EA\u52A8\u8BC6\u522B\u9879\u76EE\u7ED3\u6784\u548C\u914D\u7F6E\u3002 "),a()()()()}if(e&2){let i=V(2);g("nzExtra",i),s(3),w("ngModel",t.draft.preset)}},dependencies:[h,E,U,q,I,Z,on,S,D,j,fe,P,v,ue,Ae,Ve],styles:[".kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}.k[_ngcontent-%COMP%]{opacity:.7;display:inline-block;width:120px}.opt[_ngcontent-%COMP%]{margin-top:10px}nz-radio-group[_ngcontent-%COMP%]{width:100%}[nz-radio][_ngcontent-%COMP%]{display:block;padding:12px;border-radius:8px;width:100%;margin:0}[nz-radio][_ngcontent-%COMP%]:hover{background-color:var(--app-primary-3)}.hint[_ngcontent-%COMP%]{margin-left:24px;font-size:12px;opacity:.75}"]})};function Pn(){return{preset:"angular",name:"",parentDir:"",rootPath:"",packageManager:"auto",overwriteIfExists:!1,skipOnboarding:!0,initGit:!0,initialCommitMessage:"",importScriptsAsTasks:!0,importMakefileTasks:!1,importDockerComposeTasks:!1,generateCommonTasks:!0,pinFavorite:!1,defaultTaskName:"",cliFramework:"angular",cliTool:"@angular/cli",cliArgs:[]}}function Un(o,n){if(o&1){let e=z();r(0,"app-step-basic",16),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))}),a()}if(o&2){let e=d();g("draft",e.draft())}}function qn(o,n){if(o&1){let e=z();r(0,"app-step-preset",17),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))})("requestDetect",function(){u(e);let i=d();return f(i.detectNow())}),a()}if(o&2){let e=d();g("draft",e.draft())}}function Qn(o,n){if(o&1){let e=z();r(0,"app-step-features",16),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))}),a()}if(o&2){let e=d();g("draft",e.draft())}}function Jn(o,n){if(o&1){let e=z();r(0,"app-step-config",16),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))}),a()}if(o&2){let e=d();g("draft",e.draft())}}function Hn(o,n){if(o&1){let e=z();r(0,"button",18),m("click",function(){u(e);let i=d();return f(i.cancel())}),c(1,"nz-icon",19),l(2," \u53D6\u6D88 "),a()}}function Zn(o,n){if(o&1){let e=z();r(0,"button",18),m("click",function(){u(e);let i=d();return f(i.prev())}),c(1,"nz-icon",20),l(2," \u4E0A\u4E00\u6B65 "),a()}}function $n(o,n){if(o&1){let e=z();r(0,"button",21),m("click",function(){u(e);let i=d();return f(i.create())}),c(1,"nz-icon",22),l(2," \u521B\u5EFA\u9879\u76EE "),a()}if(o&2){let e=d();g("disabled",e.creating())}}function Yn(o,n){if(o&1){let e=z();r(0,"button",21),m("click",function(){u(e);let i=d();return f(i.next())}),l(1," \u4E0B\u4E00\u6B65 "),c(2,"nz-icon",23),a()}if(o&2){let e=d();g("disabled",!e.canNext()||!e.canGoNext())}}var Ye=class o{step=B(0);draft=B(Pn());creating=B(!1);output=B("");isDrawerOpen=B(!1);fs=C(Ee);parentDir=this.fs.currentPath();modalRef=C(be);api=C(Fe);modal=C(ce);notify=C(de);taskStream=C(Yt);projectState=C(oe);router=C(Te);sub=new ft;ngOnInit(){let n=this.draft(),e=this.parentDir;this.draft.set(at(J({},n),{rootPath:"",parentDir:e,name:""}))}detectNow(){let n=this.draft();n.rootPath?.trim()&&this.api.detect(n.rootPath).subscribe(e=>{let t=e.scripts??[],i={framework:e.framework??"unknown",hasPackageJson:!!e.hasPackageJson,scriptsCount:t.length,hasGit:!!e.hasGit,lockFile:e.lockFile??"unknown",recommendedScript:t.includes("dev")?"dev":t.includes("start")?"start":"",hasMakefile:!!e.hasMakefile,hasDockerCompose:!!e.hasDockerCompose},p=t.length>0,_=!!e.hasMakefile,Pe=!!e.hasDockerCompose;this.draft.set(at(J({},n),{detected:i,importScriptsAsTasks:p,importMakefileTasks:_&&n.importMakefileTasks,importDockerComposeTasks:Pe&&n.importDockerComposeTasks,defaultTaskName:i.recommendedScript||n.defaultTaskName}))})}async create(){let n=this.draft();if(!n.rootPath?.trim()||!n.name?.trim()){this.notify.error("\u8BF7\u5148\u5B8C\u5584\u9879\u76EE\u4FE1\u606F");return}if(this.creating())return;let e="\u786E\u8BA4\u521B\u5EFA\u9879\u76EE\uFF1F",t=`\u8BF7\u786E\u8BA4\u76EE\u6807\u8DEF\u5F84 ${n.rootPath}\uFF0C\u786E\u5B9A\u8981\u521B\u5EFA\u8BE5\u9879\u76EE\u5417\uFF1F`,i="\u786E\u8BA4\u521B\u5EFA",p=!1;n.overwriteIfExists&&(e="\u786E\u8BA4\u8986\u76D6\u5DF2\u5B58\u5728\u7684\u9879\u76EE\uFF1F",t=`\u8BF7\u786E\u8BA4\u76EE\u6807\u8DEF\u5F84 ${n.rootPath}\uFF0C\u521B\u5EFA\u65F6\u4F1A\u8986\u76D6\u539F\u6709\u6570\u636E\uFF0C\u4E14\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u5417\uFF1F`,i="\u786E\u8BA4\u8986\u76D6",p=!0);let _=this.modal.confirm({nzTitle:e,nzContent:t,nzOkText:i,nzCancelText:"\u53D6\u6D88",nzOkDanger:p,nzCentered:!0,nzOnOk:async()=>{this.doCreate(n),_.close()}})}async doCreate(n){this.creating.set(!0),this.taskStream.ensureConnected();let e=new ve;try{let t=n.preset==="git"?this.api.bootstrapByGit(n):this.api.bootstrapByCli(n),{taskId:i}=await _e(t);this.taskStream.subscribeTask(i,3e3),this.sub.add(this.taskStream.output$(i).subscribe(Ce=>{let xn=Ce.payload.text??"";this.output.set(xn)}));let p=await this.waitForTaskEvent(i,["bootstrapDone","bootstrapFailed","bootstrapNeedPickRoot"],600*1e3,e);if(p.type==="bootstrapDone"){let Ce=p.payload;this.notify.success("\u9879\u76EE\u521B\u5EFA\u5B8C\u6210"),this.projectState.getProjects(Ce.projectId),this.modalRef.close({ok:!0}),this.router.navigate(["/dashboard"]);return}if(p.type==="bootstrapFailed"){let Ce=p.payload;this.notify.error(`\u9879\u76EE\u521B\u5EFA\u5931\u8D25\uFF1A${Ce?.reason??"unknown error"}`);return}let Pe=p.payload?.candidates??[];if(!Pe.length){this.notify.error("\u9879\u76EE\u5BFC\u5165\u5931\u8D25\uFF1A\u672A\u627E\u5230\u53EF\u5BFC\u5165\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55");return}let ut=await this.pickWorkspaceRootByModal(Pe);if(!ut){this.modal.info({nzTitle:"\u63D0\u793A",nzContent:"\u60A8\u672A\u9009\u62E9\u4EFB\u4F55\u76EE\u5F55\uFF0C\u9879\u76EE\u5BFC\u5165\u5DF2\u53D6\u6D88\u3002\u53EF\u901A\u8FC7\u201C\u5BFC\u5165\u201D\u529F\u80FD\u91CD\u65B0\u624B\u52A8\u5BFC\u5165\u3002",nzCancelText:null,nzOkText:"\u6211\u77E5\u9053\u4E86",nzOnOk:()=>{this.modalRef.close()}});return}let rt=await _e(this.api.bootstrapPickRoot({taskId:i,pickedRoot:ut}).pipe(pt(60*1e3),lt(e)));if(!rt.ok){this.notify.error(rt.reason??"\u9879\u76EE\u5BFC\u5165\u5931\u8D25");return}this.notify.success("\u9879\u76EE\u5BFC\u5165\u5B8C\u6210"),this.projectState.getProjects(rt.projectId),this.modalRef.close({ok:!0}),this.router.navigate(["/dashboard"])}catch(t){let i=t?.name==="TimeoutError"?"\u521B\u5EFA\u8D85\u65F6\uFF1A\u811A\u624B\u67B6/\u514B\u9686\u53EF\u80FD\u5361\u4F4F\u4E86\uFF0C\u8BF7\u67E5\u770B\u4EFB\u52A1\u65E5\u5FD7":t?.error?.message||t?.message||"\u521B\u5EFA\u5931\u8D25";console.error("\u521B\u5EFA\u9879\u76EE\u5931\u8D25",t),this.notify.error(i)}finally{e.next(),e.complete(),this.creating.set(!1)}}async waitForTaskEvent(n,e,t,i){let p=new Set(e);return await _e(this.taskStream.events$().pipe(st(_=>_?.payload?.taskId===n),st(_=>p.has(_.type)),zt(),pt(t),lt(i)))}setDraft(n){this.draft.set(n)}canNext(){let n=this.step(),e=this.draft();return n===0?!(!e.name?.trim()||!e.parentDir?.trim()||!e.rootPath?.trim()):n===1?!!e.rootPath?.trim():!0}async next(){let n=this.step();if(n===0&&await this.api.checkPathExists(this.draft().rootPath)&&!this.draft().overwriteIfExists){this.notify.error("\u8BE5\u8DEF\u5F84\u4E0D\u53EF\u7528\u6216\u5DF2\u5B58\u5728\u91CD\u590D\u9879\u76EE");return}let e=Math.min(3,n+1);this.step.set(e)}prev(){this.step.set(Math.max(0,this.step()-1))}canGoNext(){let n=this.step();return n===0?!0:n===1?this.isManual():n===2}isManual(){return this.draft().preset==="manual"}canCreateHere(){let n=this.step();return this.isManual()&&n===3||!this.isManual()&&n===1}cancel(){this.modal.confirm({nzTitle:"\u53D6\u6D88\u521B\u5EFA\u9879\u76EE",nzContent:"\u786E\u5B9A\u8981\u53D6\u6D88\u521B\u5EFA\u5417",nzOkDanger:!0,nzOkText:"\u53D6\u6D88\u521B\u5EFA",nzCancelText:"\u4E0D",nzCentered:!0,nzOnOk:()=>{this.modalRef.close()}})}async pickWorkspaceRootByModal(n){let e=this.modal.create({nzTitle:"\u9009\u62E9\u8981\u5BFC\u5165\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55",nzContent:Ge,nzData:{candidates:n,defaultPicked:n[0]},nzFooter:null,nzCentered:!0,nzMaskClosable:!1,nzClosable:!0,nzWidth:720});return(await _e(e.afterClose))?.pickedRoot??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-create-modal"]],decls:21,vars:9,consts:[["nz-row","","nzJustify","start"],["nz-col","","nzSpan","24"],[3,"nzCurrent"],["nzTitle","\u8BE6\u60C5"],["nzTitle","\u9884\u8BBE"],["nzTitle","\u529F\u80FD"],["nzTitle","\u914D\u7F6E"],[1,"content"],["nzTip","\u6B63\u5728\u521B\u5EFA\u9879\u76EE...",3,"nzSpinning"],[1,"main"],[3,"draft"],[1,"actions"],["nz-button",""],["nz-button","","nzType","primary",3,"disabled"],[1,"aside"],[3,"isCreatingChange","draft","isCreating","chunk"],[3,"draftChange","draft"],[3,"draftChange","requestDetect","draft"],["nz-button","",3,"click"],["nzType","close","nzTheme","outline"],["nzType","arrow-left","nzTheme","outline"],["nz-button","","nzType","primary",3,"click","disabled"],["nzType","check","nzTheme","outline"],["nzType","arrow-right","nzTheme","outline"]],template:function(e,t){if(e&1&&(r(0,"div",0)(1,"div",1)(2,"nz-steps",2),c(3,"nz-step",3)(4,"nz-step",4)(5,"nz-step",5)(6,"nz-step",6),a(),r(7,"div",7)(8,"nz-spin",8)(9,"div",9),y(10,Un,1,1,"app-step-basic",10)(11,qn,1,1,"app-step-preset",10)(12,Qn,1,1,"app-step-features",10)(13,Jn,1,1,"app-step-config",10),r(14,"div",11),y(15,Hn,3,0,"button",12),y(16,Zn,3,0,"button",12),y(17,$n,3,1,"button",13)(18,Yn,3,1,"button",13),a()()(),r(19,"div",14)(20,"app-create-summary-aside",15),T("isCreatingChange",function(p){return k(t.creating,p)||(t.creating=p),p}),a()()()()()),e&2){let i;s(2),g("nzCurrent",t.step()),s(6),g("nzSpinning",t.creating()),s(2),x((i=t.step())===0?10:i===1?11:i===2?12:i===3?13:-1),s(5),x(t.step()===0?15:-1),s(),x(t.step()>0?16:-1),s(),x(t.canCreateHere()?17:18),s(3),g("draft",t.draft()),w("isCreating",t.creating),g("chunk",t.output())}},dependencies:[h,E,ne,I,$,G,L,fn,un,dn,S,D,j,H,Q,P,v,an,rn,Qe,$e,He,Je,We],styles:[".content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 360px;gap:16px;margin-top:16px}.main[_ngcontent-%COMP%]{min-height:420px}.actions[_ngcontent-%COMP%]{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}.aside[_ngcontent-%COMP%]{position:sticky;top:16px;height:fit-content}"]})};var Ke=class o{constructor(n){this.modal=n}goCreate(){let n=this.modal.create({nzTitle:"\u521B\u5EFA\u65B0\u9879\u76EE",nzFooter:null,nzMaskClosable:!1,nzClosable:!1,nzContent:Ye,nzWidth:"1020px",nzCentered:!0}),e=n.getContentComponent();n.afterClose.subscribe(t=>{t?.ok})}static \u0275fac=function(e){return new(e||o)(we(ce))};static \u0275cmp=M({type:o,selectors:[["app-project-create"]],decls:7,vars:0,consts:[["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"explorer-container"],[1,"actions-bar"],["nz-button","","nzType","primary","nzSize","large",3,"click"],["nzType","plus","nzTheme","outline"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),c(2,"app-fs-explorer"),a(),r(3,"div",2)(4,"button",3),m("click",function(){return t.goCreate()}),c(5,"nz-icon",4),l(6," \u5728\u6B64\u521B\u5EFA\u65B0\u9879\u76EE "),a()()())},dependencies:[h,S,D,j,H,$,G,L,Ne,P,v],styles:[".page[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}.page[_ngcontent-%COMP%] .explorer-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.page[_ngcontent-%COMP%] .actions-bar[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px;display:flex;justify-content:center;align-items:center}"]})};var ge=class o{fs=C(Ee);projectApi=C(Fe);projectState=C(oe);active=B(!1);checking=B(!1);result=B(null);canImport=A(()=>this.result()?.ok===!0);warnings=A(()=>this.result()?.warnings??[]);reason=A(()=>this.result()?.reason??"");currentPath=A(()=>this.fs.currentPath()||this.fs.path());_seq=0;notify=C(de);constructor(){Ot(()=>{if(!this.active())return;let n=this.currentPath();n&&this.check(n)})}enter(){this.active.set(!0)}leave(){this.active.set(!1),this.result.set(null)}check(n){let e=++this._seq;this.checking.set(!0),this.result.set(null),this.projectApi.checkImport(n).subscribe({next:t=>{e===this._seq&&this.result.set(t)},error:t=>{e===this._seq&&this.result.set({ok:!1,root:n,reason:t?.message||"check failed"})},complete:()=>{e===this._seq&&this.checking.set(!1)}})}import(n){let e=this.currentPath();if(!e||!this.canImport())return;let t=e.replace(/[\\\/]+$/,"").split(/[\\\/]/).pop()||"New Project";this.projectApi.importByPath({root:e,name:n||t,syncTasks:!0}).subscribe({next:i=>{this.projectState.getProjects(),this.projectState.setCurrentProjectById(i.id),this.check(e),this.notify.success("\u9879\u76EE\u5BFC\u5165\u6210\u529F")}})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Mt({token:o,factory:o.\u0275fac,providedIn:"root"})};var Xe=class o{importState=C(ge);static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-import"]],decls:7,vars:1,consts:[["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"explorer-container"],[1,"actions-bar","center"],["nz-button","","nzSize","large","nzType","primary",3,"click","disabled"],["nzType","import","nzTheme","outline"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),c(2,"app-fs-explorer"),a(),r(3,"div",2)(4,"button",3),m("click",function(){return t.importState.import()}),c(5,"nz-icon",4),l(6," \u5BFC\u5165\u8FD9\u4E2A\u6587\u4EF6\u5939 "),a()()()),e&2&&(s(4),g("disabled",t.importState.checking()||!t.importState.canImport()))},dependencies:[h,E,$,G,L,S,D,j,H,P,v,Ne],styles:[".page[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}.page[_ngcontent-%COMP%] .explorer-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.page[_ngcontent-%COMP%] .actions-bar[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px;display:flex;justify-content:center;align-items:center}"]})};var Kn=(o,n)=>n.spec.id;function Xn(o,n){if(o&1){let e=z();r(0,"div",8)(1,"div",9),m("click",function(){let i=u(e).$implicit,p=d();return f(p.openTask(i))}),r(2,"div",10),c(3,"nz-icon",11),a(),r(4,"div",12)(5,"div",13)(6,"span"),l(7),a()(),r(8,"div",14)(9,"span"),l(10),a()()()(),r(11,"button",15),m("click",function(i){let p=u(e).$implicit,_=d();return i.stopPropagation(),f(_.toggleTask(p))}),c(12,"nz-icon",16),a()()}if(o&2){let e=n.$implicit,t=d();g("nzTooltipTitle",t.getTaskDescription(e)),s(7),b(e.spec.name),s(3),b(t.getTaskDescription(e)),s(2),g("nzType",t.getTaskActionIcon(e))}}var et=class o{projectId;projectState=C(oe);router=C(Te);state=C(Kt);tasks=A(()=>this.projectId?this.state.rowsViewOf(this.projectId)():[]);async ngOnChanges(){this.projectId&&await this.state.ensureProjectLoaded(this.projectId)}toggleTask(n){n.runtime?.status==="running"?this.state.stopSelected():this.state.startSelected(),this.openTask(n)}async openTask(n){this.state.select(n.spec.id),await this.router.navigate(["/tasks"]),this.projectState.setCurrentProjectById(n.spec.projectId)}getTaskName(n){return n.spec.name||n.spec.id}getTaskDescription(n){let e=n.runtime?.status;return n.runtime?this.computedStatusText(e):n.spec.description||""}getTaskActionIcon(n){let e=n.runtime?.status;return e==="running"||e==="stopping"?"pause-circle":"play-circle"}computedStatusText(n){switch(n){case"running":return"\u8FD0\u884C\u4E2D";case"stopping":return"\u505C\u6B62\u4E2D";case"success":return"\u6210\u529F";case"failed":return"\u9519\u8BEF";case"stopped":return"\u5DF2\u505C\u6B62";default:return"\u7A7A\u95F2"}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-item-popover"]],inputs:{projectId:"projectId"},features:[xe],decls:11,vars:0,consts:[[1,"dropdown-content"],[1,"pane-toolbar"],[1,"icon"],["nzType","inbox","nzTheme","outline"],[1,"title"],["nz-button","","type","button","nzType","text"],["nzType","close","nzTheme","outline"],[1,"tasks"],["nz-tooltip","","nzTooltipPlacement","right",1,"task-item",3,"nzTooltipTitle"],[1,"item-content",3,"click"],[1,"item-logo"],["nzType","code","nzTheme","outline"],[1,"list-item-info"],[1,"name"],[1,"description"],["nz-button","","nzType","text","type","button",3,"click"],["nzTheme","outline",3,"nzType"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-icon",3),a(),r(4,"div",4),l(5,"\u4EFB\u52A1"),a(),r(6,"button",5),c(7,"nz-icon",6),a()(),r(8,"div",7),ae(9,Xn,13,4,"div",8,Kn),a()()),e&2&&(s(9),pe(t.tasks()))},dependencies:[h,P,v,S,D,j,te,ee,ze],styles:[".dropdown-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:6px 6px 6px 16px}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:auto 0 0}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:18px;margin-right:6px}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:100% 1 1;width:0;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%]{width:320px;max-height:360px;overflow:hidden auto}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:row;align-items:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%]:hover{background:#f5f5f5}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .item-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;flex:100% 1 1;width:0;gap:16px;cursor:pointer}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .item-logo[_ngcontent-%COMP%]{font-size:42px;margin-right:16px;flex:auto 0 0;display:inline-flex;align-items:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%]{flex:100% 1 1;width:0;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:auto 0 0}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:24px}"]})};function eo(o,n){if(o&1){let e=z();r(0,"button",20),m("click",function(){u(e);let i=d();return f(i.openPageUrl(i.project==null?null:i.project.repoPageUrl))}),c(1,"nz-icon",21),a()}}function to(o,n){if(o&1&&c(0,"app-project-item-popover",22),o&2){let e=d();g("projectId",e.project==null?null:e.project.id)}}var tt=class o{taskRuntime=C($t);notify=C(de);project=null;open=!1;selectProject=new F;toggleFavorite=new F;editProject=new F;openInEditor=new F;deleteProject=new F;tasksRunningCount=A(()=>{let n=this.project?.id?.trim();return n?this.taskRuntime.runningCountSignal(n)():0});hasTasksRunning=A(()=>this.tasksRunningCount()>0);taskBadgeTip=A(()=>{let n=this.tasksRunningCount();return n>0?`${n} \u4E2A\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C`:"\u4EFB\u52A1"});del(){if(this.hasTasksRunning()){this.notify.warn("\u5F53\u524D\u9879\u76EE\u6709\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u505C\u6B62\u8FD9\u4E9B\u4EFB\u52A1\u540E\u518D\u5220\u9664\u9879\u76EE\u3002");return}this.deleteProject.emit()}openPageUrl(n){n&&window.open(n,"_blank")}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-item"]],inputs:{project:"project",open:"open"},outputs:{selectProject:"selectProject",toggleFavorite:"toggleFavorite",editProject:"editProject",openInEditor:"openInEditor",deleteProject:"deleteProject"},decls:28,vars:10,consts:[["contentTemplate",""],["nz-row","",1,"project-item"],["nz-col","","nzSpan","24",1,"content"],[1,"favorite"],["nz-button","","nzType","primary",3,"click"],["nzType","star",3,"nzTheme"],[1,"info",3,"click"],[1,"list-item-info"],[1,"name"],["nz-popover","","nzPopoverTrigger","click","nzPopoverPlacement","right",1,"task-popover-trigger",3,"click","nzPopoverContent","nzPopoverOverlayClassName"],[3,"nzStatus","nz-tooltip"],[1,"root-path"],[1,"actions"],["nzSize","large"],["nzType","code","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u7F16\u8F91",3,"click"],["nzType","edit","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u6253\u5F00\u4ED3\u5E93\u5730\u5740"],["nz-button","","nzType","primary","nz-tooltip","\u5220\u9664",3,"click"],["nzType","delete","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u6253\u5F00\u4ED3\u5E93\u5730\u5740",3,"click"],["nzType","global","nzTheme","outline"],[3,"projectId"]],template:function(e,t){if(e&1){let i=z();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),m("click",function(_){return u(i),_.stopPropagation(),f(t.toggleFavorite.emit())}),c(4,"nz-icon",5),a()(),r(5,"div",6),m("click",function(){return u(i),f(t.selectProject.emit())}),r(6,"div",7)(7,"div",8)(8,"span"),l(9),a(),r(10,"span",9),m("click",function(_){return u(i),f(_.stopPropagation())}),c(11,"nz-badge",10),a()(),r(12,"div",11)(13,"span"),l(14),a()()()(),r(15,"div",12)(16,"nz-space",13)(17,"button",4),m("click",function(){return u(i),f(t.openInEditor.emit())}),c(18,"nz-icon",14),r(19,"span"),l(20,"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00"),a()(),r(21,"button",15),m("click",function(){return u(i),f(t.editProject.emit())}),c(22,"nz-icon",16),a(),y(23,eo,2,0,"button",17),r(24,"button",18),m("click",function(){return u(i),f(t.del())}),c(25,"nz-icon",19),a()()()()(),O(26,to,1,1,"ng-template",null,0,W)}if(e&2){let i=V(27);St("open",t.open),s(4),g("nzTheme",t.project!=null&&t.project.isFavorite?"fill":"outline"),s(5),b(t.project==null?null:t.project.name),s(),g("nzPopoverContent",i)("nzPopoverOverlayClassName","project-item-popover"),s(),g("nzStatus",t.hasTasksRunning()?"processing":"default")("nz-tooltip",t.taskBadgeTip()),s(3),b(t.project==null?null:t.project.root),s(9),x(t.project!=null&&t.project.repoPageUrl?23:-1)}},dependencies:[h,E,$,G,L,S,D,j,H,P,v,Ht,Jt,nn,tn,Rt,At,et,ee],styles:['.project-item[_ngcontent-%COMP%]{border-radius:4px;padding:0;margin:8px 0;transition:all .3s;cursor:pointer}.project-item.open[_ngcontent-%COMP%], .project-item[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #0000001a;background:var(--app-primary-3)}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto;grid-template-areas:"icon info actions";grid-gap:16px;align-items:center}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .favorite[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{grid-area:info;-webkit-user-select:none;user-select:none}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:4px}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:auto 0 0}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .task-popover-trigger[_ngcontent-%COMP%]{display:inline-block;margin-left:8px;cursor:pointer}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .task-popover-trigger[_ngcontent-%COMP%] nz-badge[_ngcontent-%COMP%]{font-size:18px}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .root-path[_ngcontent-%COMP%]{flex:auto 0 0;opacity:.7;font-size:14px}']})};var vn=o=>({$implicit:o}),no=(o,n)=>n.id;function oo(o,n){o&1&&ct(0)}function io(o,n){if(o&1&&(r(0,"div",6)(1,"h2"),l(2,"\u6536\u85CF\u7684\u9879\u76EE"),a()(),O(3,oo,1,0,"ng-container",7)),o&2){let e=d(),t=V(11);s(3),g("ngTemplateOutlet",t)("ngTemplateOutletContext",mt(2,vn,e.projectState.favoriteProjects()))}}function ro(o,n){o&1&&(r(0,"div",6)(1,"h2"),l(2,"\u66F4\u591A\u9879\u76EE"),a()())}function ao(o,n){o&1&&ct(0)}function po(o,n){o&1&&(r(0,"div",8),c(1,"nz-empty",9),a())}function so(o,n){if(o&1){let e=z();r(0,"app-project-item",12),m("selectProject",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.selectProject(i))})("toggleFavorite",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.toggleFavorite(i.id))})("openInEditor",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.openInEditor(i.id))})("editProject",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.openEditModal(i))})("deleteProject",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.deleteProject(i.id))}),a()}if(o&2){let e=n.$implicit,t=d(2);g("project",e)("project",e)("open",t.projectState.isOpen(e))}}function lo(o,n){if(o&1&&(r(0,"div",10),ae(1,so,1,3,"app-project-item",11,no),a()),o&2){let e=n.$implicit;s(),pe(e)}}var nt=class o{projectState=C(oe);static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-list"]],decls:12,vars:8,consts:[["itemsTpl",""],["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"col"],["nz-col","",1,"topbar"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22\u9879\u76EE",3,"ngModelChange","ngModel"],[1,"header"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"no-projects"],["nzNotFoundImage","simple","nzNotFoundContent","\u6682\u65E0\u9879\u76EE\uFF0C\u5FEB\u53BB\u521B\u5EFA\u6216\u5BFC\u5165\u7B2C\u4E00\u4E2A\u9879\u76EE\u5427\uFF01"],[1,"content"],[3,"project","open"],[3,"selectProject","toggleFavorite","openInEditor","editProject","deleteProject","project","open"]],template:function(e,t){if(e&1){let i=z();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"nz-input-wrapper"),c(4,"nz-icon",4),r(5,"input",5),m("ngModelChange",function(_){return u(i),f(t.projectState.keyword.set(_))}),a()()(),y(6,io,4,4),y(7,ro,3,0,"div",6),O(8,ao,1,0,"ng-container",7),y(9,po,2,0,"div",8),a(),O(10,lo,3,0,"ng-template",null,0,W),a()}if(e&2){let i=V(11);s(5),g("ngModel",t.projectState.keyword()),s(),x(t.projectState.favoriteProjects().length>0?6:-1),s(),x(t.projectState.favoriteProjects().length>0?7:-1),s(),g("ngTemplateOutlet",i)("ngTemplateOutletContext",mt(6,vn,t.projectState.moreProjects())),s(),x(t.projectState.projects().length===0?9:-1)}},dependencies:[h,Bt,E,Y,U,q,I,$,G,L,tt,Ie,Oe,Q,K,le,Se,P,v],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow:hidden}.page[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.page[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;margin-bottom:12px}.page[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:25%;min-width:200px}.page[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.header[_ngcontent-%COMP%]{padding:12px 0}.header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-weight:600}"]})};function co(o,n){o&1&&(c(0,"nz-icon",8),l(1," \u9879\u76EE "))}function mo(o,n){o&1&&c(0,"app-project-list")}function uo(o,n){o&1&&(c(0,"nz-icon",9),l(1," \u521B\u5EFA "))}function fo(o,n){o&1&&c(0,"app-project-create")}function go(o,n){o&1&&(c(0,"nz-icon",10),l(1," \u5BFC\u5165 "))}function Co(o,n){o&1&&c(0,"app-project-import")}var ot=class o{importState=C(ge);selectedIndex=0;tabIndexChange(n){n===2?this.importState.active.set(!0):this.importState.active.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-projects"]],decls:17,vars:4,consts:[["projectTitleTemplate",""],["addTitleTemplate",""],["importTitleTemplate",""],[1,"page"],[1,"header"],["nzCentered","",1,"tabs-container",3,"nzSelectedIndexChange","nzSelectedIndex"],[3,"nzTitle"],["nz-tab",""],["nzType","unordered-list","nzTheme","outline"],["nzType","plus-square","nzTheme","outline"],["nzType","import","nzTheme","outline"]],template:function(e,t){if(e&1){let i=z();r(0,"div",3)(1,"div",4)(2,"h2"),l(3,"\u9879\u76EE\u7BA1\u7406"),a()(),r(4,"nz-tabs",5),T("nzSelectedIndexChange",function(_){return u(i),k(t.selectedIndex,_)||(t.selectedIndex=_),f(_)}),m("nzSelectedIndexChange",function(_){return u(i),f(t.tabIndexChange(_))}),r(5,"nz-tab",6),O(6,co,2,0,"ng-template",null,0,W)(8,mo,1,0,"ng-template",7),a(),r(9,"nz-tab",6),O(10,uo,2,0,"ng-template",null,1,W)(12,fo,1,0,"ng-template",7),a(),r(13,"nz-tab",6),O(14,go,2,0,"ng-template",null,2,W)(16,Co,1,0,"ng-template",7),a()()()}if(e&2){let i=V(7),p=V(11),_=V(15);s(4),w("nzSelectedIndex",t.selectedIndex),s(),g("nzTitle",i),s(4),g("nzTitle",p),s(4),g("nzTitle",_)}},dependencies:[h,mn,cn,ln,sn,P,v,nt,Ke,Xe],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:16px 0}.header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}nz-tabs.tabs-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}nz-tabs.tabs-container[_ngcontent-%COMP%] .ant-tabs-content{height:100%}nz-tabs.tabs-container[_ngcontent-%COMP%] .ant-tabs-content .ant-tabs-tabpane{height:100%}.toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.current[_ngcontent-%COMP%]{margin:10px 0;opacity:.75}"]})};var _o=[{path:"",component:ot}],it=class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=ke({type:o});static \u0275inj=ye({imports:[ze.forChild(_o),ze]})};var yn=class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=ke({type:o});static \u0275inj=ye({imports:[h,it]})};export{yn as ProjectsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as n,j as m}from"./chunk-X3HFJACM.js";import{Fb as e,na as t}from"./chunk-SJG2JCPL.js";var d=[{path:"",loadComponent:()=>import("./chunk-56SDBJDG.js").then(o=>o.DashboardComponent)}],i=class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n.forChild(d),n]})};var a=class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[m,i]})};export{a as DashboardModule};
|