@yinuo-ngm/server 1.0.23 → 1.0.24
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/modules/agent-connections/agent-connections.schema.d.ts +4 -0
- package/lib/modules/agent-connections/agent-connections.schema.js +112 -0
- package/lib/modules/agent-connections/agent-connections.service.d.ts +18 -0
- package/lib/modules/agent-connections/agent-connections.service.js +209 -0
- package/lib/modules/agent-connections/agent-connections.types.d.ts +57 -0
- package/lib/modules/agent-connections/agent-connections.types.js +2 -0
- package/lib/modules/agent-connections/atomic-json-file.d.ts +8 -0
- package/lib/modules/agent-connections/atomic-json-file.js +44 -0
- package/lib/modules/agent-connections/token-mask.d.ts +1 -0
- package/lib/modules/agent-connections/token-mask.js +12 -0
- package/lib/routes/agent-connections.routes.d.ts +3 -0
- package/lib/routes/agent-connections.routes.js +28 -0
- package/lib/routes/index.js +2 -0
- package/package.json +4 -3
- package/www/3rdpartylicenses.txt +5 -5
- package/www/browser/chunk-2EB7UV3S.js +15 -0
- package/www/browser/{chunk-3I7BQCXS.js → chunk-2S6Y2RQI.js} +1 -1
- package/www/browser/{chunk-U3EUR236.js → chunk-2SYBXRWK.js} +1 -1
- package/www/browser/{chunk-OUGN4APK.js → chunk-365ZCRSD.js} +1 -1
- package/www/browser/{chunk-6UFDNETG.js → chunk-3MPEGFKP.js} +1 -1
- package/www/browser/{chunk-WCHN62X6.js → chunk-4PSSTE76.js} +1 -1
- package/www/browser/{chunk-DENFXXOY.js → chunk-5HVK6MON.js} +1 -1
- package/www/browser/{chunk-TXAXE73U.js → chunk-5Y7KNVNN.js} +1 -1
- package/www/browser/chunk-6L2CHHFV.js +1 -0
- package/www/browser/{chunk-NNOWADVM.js → chunk-6ZXQKFRQ.js} +1 -1
- package/www/browser/chunk-735SLX4X.js +1 -0
- package/www/browser/chunk-7KLACOZT.js +2 -0
- package/www/browser/chunk-7VJKEZTT.js +20 -0
- package/www/browser/{chunk-CO3CQHKV.js → chunk-7X4X4YHI.js} +1 -1
- package/www/browser/chunk-ACYCDF6M.js +1 -0
- package/www/browser/{chunk-UJKK4A7Y.js → chunk-AQYHNHJ3.js} +1 -1
- package/www/browser/chunk-BHKSOTOM.js +1 -0
- package/www/browser/{chunk-3ODVU46S.js → chunk-BXZVX5KD.js} +1 -1
- package/www/browser/{chunk-TCBOC5FF.js → chunk-C5DOE7UG.js} +1 -1
- package/www/browser/{chunk-7AKVG375.js → chunk-C6GC5OOE.js} +1 -1
- package/www/browser/{chunk-SSCUT2GF.js → chunk-D5W7J3FS.js} +1 -1
- package/www/browser/chunk-DPGKZHEW.js +1 -0
- package/www/browser/chunk-DRV2KPHO.js +1 -0
- package/www/browser/chunk-E2WRB7KQ.js +2 -0
- package/www/browser/{chunk-MPLGMTLT.js → chunk-EAFAHVBG.js} +1 -1
- package/www/browser/{chunk-WWIPELAV.js → chunk-ERH36Q6S.js} +1 -1
- package/www/browser/chunk-GSUKZOEV.js +1 -0
- package/www/browser/chunk-GYXK6ZZT.js +1 -0
- package/www/browser/{chunk-PDI3HSSH.js → chunk-H27FQ6OP.js} +3 -3
- package/www/browser/chunk-I7RTVSMK.js +1 -0
- package/www/browser/{chunk-SD2HFD54.js → chunk-IVX3LVU4.js} +1 -1
- package/www/browser/{chunk-U2YWR3HF.js → chunk-IX6UZA7J.js} +1 -1
- package/www/browser/{chunk-CPJTSA6E.js → chunk-JFR7U5DE.js} +1 -1
- package/www/browser/chunk-JIVQNGBJ.js +1 -0
- package/www/browser/{chunk-PY3AUTHC.js → chunk-KDMWEV46.js} +1 -1
- package/www/browser/{chunk-JM6DCZP6.js → chunk-LRHJZDWY.js} +1 -1
- package/www/browser/chunk-NVN2P466.js +1 -0
- package/www/browser/{chunk-NREWZQVN.js → chunk-O64FT2TA.js} +1 -1
- package/www/browser/{chunk-YVRGRFK2.js → chunk-OZONPLGN.js} +1 -1
- package/www/browser/chunk-PC7TJLCL.js +2 -0
- package/www/browser/{chunk-7GLWEFTM.js → chunk-PNFC3J4Z.js} +1 -1
- package/www/browser/chunk-PRKDURHI.js +1 -0
- package/www/browser/{chunk-RMIYLAEM.js → chunk-PUHSNEN6.js} +1 -1
- package/www/browser/{chunk-442QFABJ.js → chunk-RKKAY5CD.js} +1 -1
- package/www/browser/{chunk-M6NZ6C2R.js → chunk-RLH7DAA2.js} +1 -1
- package/www/browser/chunk-S6BY2OTR.js +1 -0
- package/www/browser/{chunk-KRYMOHYF.js → chunk-SIKDYQOR.js} +1 -1
- package/www/browser/{chunk-RKK4I2RT.js → chunk-SVRGVAFE.js} +1 -1
- package/www/browser/chunk-TPVKLECM.js +1 -0
- package/www/browser/{chunk-UPOORT3S.js → chunk-VBMHQZWH.js} +1 -1
- package/www/browser/chunk-WVRMU265.js +1 -0
- package/www/browser/chunk-X6PRUZ5G.js +1 -0
- package/www/browser/{chunk-PUG3VNTI.js → chunk-XQQ6PT2E.js} +1 -1
- package/www/browser/chunk-XUUNCF53.js +1 -0
- package/www/browser/{chunk-4BRW6LCZ.js → chunk-YGWA6NUS.js} +1 -1
- package/www/browser/{chunk-2VJVGBXG.js → chunk-YNYWN7QI.js} +1 -1
- package/www/browser/chunk-Z4T3LTE2.js +1 -0
- package/www/browser/chunk-Z7GYTPTP.js +1 -0
- package/www/browser/chunk-ZZN3NP7F.js +1 -0
- package/www/browser/index.html +1 -1
- package/www/browser/main-HMOP3OWL.js +38 -0
- package/www/browser/chunk-6J6G7JEP.js +0 -1
- package/www/browser/chunk-7QR6RHLA.js +0 -1
- package/www/browser/chunk-H2USFIYR.js +0 -1
- package/www/browser/chunk-HC5KLPHD.js +0 -1
- package/www/browser/chunk-HJAP6WBI.js +0 -1
- package/www/browser/chunk-K6C5ZIV2.js +0 -20
- package/www/browser/chunk-MBPB43C6.js +0 -1
- package/www/browser/chunk-PB2LGZNW.js +0 -1
- package/www/browser/chunk-R4HSZU2J.js +0 -1
- package/www/browser/chunk-RZA3IFQV.js +0 -2
- package/www/browser/chunk-SEJGGBE2.js +0 -1
- package/www/browser/chunk-TS5ZQYYY.js +0 -1
- package/www/browser/chunk-TVJHI463.js +0 -1
- package/www/browser/chunk-UKCMUTYL.js +0 -1
- package/www/browser/chunk-VW3S7C2Z.js +0 -1
- package/www/browser/chunk-VZYJ3MSW.js +0 -15
- package/www/browser/chunk-WUA5JFDD.js +0 -1
- package/www/browser/chunk-WYNERG74.js +0 -2
- package/www/browser/chunk-XJDJL3TQ.js +0 -1
- package/www/browser/chunk-YV6QPLF5.js +0 -1
- package/www/browser/main-7GYUOEJY.js +0 -38
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as jn}from"./chunk-WWIPELAV.js";import{a as Nn,e as Fn,f as Rn}from"./chunk-XJDJL3TQ.js";import{a as Vn}from"./chunk-3ODVU46S.js";import{b as An}from"./chunk-HC5KLPHD.js";import{a as ue,b as ge}from"./chunk-UJKK4A7Y.js";import{a as $n,b as Ke}from"./chunk-MPLGMTLT.js";import"./chunk-7AKVG375.js";import"./chunk-2VJVGBXG.js";import{a as Bn,b as Ln}from"./chunk-WCHN62X6.js";import{a as U,b as F}from"./chunk-CO3CQHKV.js";import"./chunk-NNOWADVM.js";import"./chunk-RMIYLAEM.js";import{a as de,b as wn,c as Qe}from"./chunk-M6NZ6C2R.js";import{b as Re}from"./chunk-MBPB43C6.js";import{a as Sn,c as Tn,e as En,f as me}from"./chunk-CPJTSA6E.js";import{a as vt,e as yn,f as vn,g as bn,i as te,j as zn,k as He,l as qe,m as We,n as Mn,o as Ue}from"./chunk-TXAXE73U.js";import{a as Ge}from"./chunk-442QFABJ.js";import{a as Dn,b as In}from"./chunk-SD2HFD54.js";import{g as un,l as gn}from"./chunk-U2YWR3HF.js";import"./chunk-PB2LGZNW.js";import{d as On,e as Pn,m as kn}from"./chunk-K6C5ZIV2.js";import{$b as _n,Ab as hn,B as an,C as Ct,Db as Be,Ea as w,F as sn,Fa as S,Fb as Le,Ga as pn,H as rn,Ha as dn,Jb as je,L as N,La as mn,Ma as le,Na as Y,Oa as ce,Qa as J,Ra as X,Tb as ee,Xb as xn,Y as ln,Zb as $e,_b as Cn,a as Xt,ac as pe,dc as q,fc as W,j as en,ja as cn,lb as fn,n as Fe,o as tn,pa as _t,q as nn,qb as yt,s as on}from"./chunk-VZYJ3MSW.js";import"./chunk-HFZLJHYR.js";import"./chunk-WUA5JFDD.js";import{i as Jt,n as k}from"./chunk-KRYMOHYF.js";import{$b as M,Ac as $,Ba as Oe,Bb as Bt,Ca as Nt,Cc as Qt,Da as K,Dc as Kt,Ec as se,Fb as _,Fc as ie,G as lt,Gb as Lt,Gc as D,Ha as A,Hb as jt,Hc as Zt,Ic as H,Jc as r,Kc as m,L as ct,Lb as G,Lc as h,M as Me,Mc as ut,Oa as ae,Oc as De,Pc as Ie,Q as wt,Qc as Ae,Ra as dt,Rc as xe,Sc as Ce,Tc as E,U as St,Ub as $t,V as Tt,Vb as Ht,Vc as gt,Wb as g,Wc as ft,Xc as Ve,Yb as f,Zb as qt,_b as ne,ac as O,ad as y,bc as u,bd as v,cc as o,dc as a,dd as re,ea as pt,ec as c,fc as Wt,g as Z,gc as Ut,ha as Et,i as Pt,ic as we,id as P,jc as Se,jd as ht,kb as Pe,l as kt,lc as T,ma as Dt,na as It,nb as s,oa as At,pd as Yt,qa as Vt,rc as C,sa as x,sb as he,tb as mt,uc as p,ud as xt,vb as Ft,vc as Te,wb as Rt,wc as Ee,xc as Gt,ya as b,yc as Q,yd as Ne,za as z,zb as ke,zc as j}from"./chunk-4BRW6LCZ.js";var Hn=new Vt("",{providedIn:"root",factory:()=>{let n=x(Oe);return new Pt(t=>{let e=Ft(()=>{t.next(),t.complete()},{injector:n});return()=>e.destroy()})}});var ni=[[["nz-auto-option"]]],ii=["nz-auto-option"];function oi(n,t){if(n&1&&(we(0),r(1),Se()),n&2){let e=p();s(),m(e.nzLabel)}}var qn=["*"],ai=["panel"],si=["content"],ri=(n,t)=>t.value;function li(n,t){}function ci(n,t){n&1&&G(0,li,0,0,"ng-template")}function pi(n,t){n&1&&Ee(0)}function di(n,t){if(n&1&&(o(0,"nz-auto-option",7),r(1),a()),n&2){let e=t.$implicit;u("nzValue",e.value)("nzLabel",e.label),s(),h(" ",e.label," ")}}function mi(n,t){if(n&1&&M(0,di,2,3,"nz-auto-option",7,ri),n&2){let e=p(2);O(e.normalizedDataSource)}}function ui(n,t){if(n&1){let e=T();o(0,"div",3,0),C("@slideMotion.done",function(l){b(e);let d=p();return z(d.onAnimationEvent(l))}),o(2,"div",4)(3,"div",5),G(4,ci,1,0,null,6),a()()(),G(5,pi,1,0,"ng-template",null,1,re)(7,mi,2,0,"ng-template",null,2,re)}if(n&2){let e=se(6),i=se(8),l=p();Zt(l.nzOverlayStyle),H(l.nzOverlayClassName),D("ant-select-dropdown-hidden",!l.showPanel)("ant-select-dropdown-rtl",l.dir==="rtl"),u("nzNoAnimation",l.noAnimation==null?null:l.noAnimation.nzNoAnimation)("@slideMotion",void 0)("@.disabled",!!(l.noAnimation!=null&&l.noAnimation.nzNoAnimation)),s(4),u("ngTemplateOutlet",l.nzDataSource?i:e)}}var Wn=(()=>{class n{nzLabel;static \u0275fac=function(i){return new(i||n)};static \u0275cmp=_({type:n,selectors:[["nz-auto-optgroup"]],inputs:{nzLabel:"nzLabel"},exportAs:["nzAutoOptgroup"],ngContentSelectors:ii,decls:3,vars:1,consts:[[1,"ant-select-item","ant-select-item-group"],[4,"nzStringTemplateOutlet"]],template:function(i,l){i&1&&(Te(ni),o(0,"div",0),G(1,oi,2,1,"ng-container",1),a(),Ee(2)),i&2&&(s(),u("nzStringTemplateOutlet",l.nzLabel))},dependencies:[dn,pn],encapsulation:2,changeDetection:0})}return n})(),bt=class{source;isUserInput;constructor(t,e=!1){this.source=t,this.isUserInput=e}},_e=(()=>{class n{ngZone=x(mt);changeDetectorRef=x(xt);element=x(dt);destroyRef=x(K);nzValue;nzLabel;nzDisabled=!1;selectionChange=new he;mouseEntered=new he;active=!1;selected=!1;nzAutocompleteOptgroupComponent=x(Wn,{optional:!0});ngOnInit(){_t(this.element.nativeElement,"mouseenter").pipe(Me(()=>this.mouseEntered.observers.length>0),N(this.destroyRef)).subscribe(()=>{this.ngZone.run(()=>this.mouseEntered.emit(this))}),_t(this.element.nativeElement,"mousedown").pipe(N(this.destroyRef)).subscribe(e=>e.preventDefault())}select(e=!0){this.selected=!0,this.changeDetectorRef.markForCheck(),e&&this.emitSelectionChangeEvent()}deselect(){this.selected=!1,this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent()}getLabel(){return this.nzLabel||this.nzValue.toString()}setActiveStyles(){this.active||(this.active=!0,this.changeDetectorRef.markForCheck())}setInactiveStyles(){this.active&&(this.active=!1,this.changeDetectorRef.markForCheck())}scrollIntoViewIfNeeded(){cn(this.element.nativeElement)}selectViaInteraction(){this.nzDisabled||(this.selected=!this.selected,this.selected?this.setActiveStyles():this.setInactiveStyles(),this.emitSelectionChangeEvent(!0),this.changeDetectorRef.markForCheck())}emitSelectionChangeEvent(e=!1){this.selectionChange.emit(new bt(this,e))}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=_({type:n,selectors:[["nz-auto-option"]],hostAttrs:["role","menuitem",1,"ant-select-item","ant-select-item-option"],hostVars:10,hostBindings:function(i,l){i&1&&C("click",function(){return l.selectViaInteraction()}),i&2&&($t("aria-selected",l.selected.toString())("aria-disabled",l.nzDisabled.toString()),D("ant-select-item-option-grouped",l.nzAutocompleteOptgroupComponent)("ant-select-item-option-selected",l.selected)("ant-select-item-option-active",l.active)("ant-select-item-option-disabled",l.nzDisabled))},inputs:{nzValue:"nzValue",nzLabel:"nzLabel",nzDisabled:[2,"nzDisabled","nzDisabled",Ne]},outputs:{selectionChange:"selectionChange",mouseEntered:"mouseEntered"},exportAs:["nzAutoOption"],ngContentSelectors:qn,decls:2,vars:0,consts:[[1,"ant-select-item-option-content"]],template:function(i,l){i&1&&(Te(),Wt(0,"div",0),Ee(1),Ut())},encapsulation:2,changeDetection:0})}return n})(),gi={provide:hn,useExisting:Dt(()=>zt),multi:!0};function fi(){return Error("Attempting to open an undefined instance of `nz-autocomplete`. Make sure that the id passed to the `nzAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.")}var zt=(()=>{class n{injector=x(Oe);ngZone=x(mt);elementRef=x(dt);viewContainerRef=x(Bt);destroyRef=x(K);nzAutocomplete;onChange=()=>{};onTouched=()=>{};panelOpen=!1;get activeOption(){return this.nzAutocomplete&&this.nzAutocomplete.options.length?this.nzAutocomplete.activeItem:null}overlayRef=null;portal=null;positionStrategy;previousValue=null;selectionChangeSubscription;optionsChangeSubscription;overlayOutsideClickSubscription;document=x(Nt);nzInputGroupWhitSuffixOrPrefixDirective=x(Cn,{optional:!0});constructor(){this.destroyRef.onDestroy(()=>{this.destroyPanel()})}ngAfterViewInit(){this.nzAutocomplete&&this.nzAutocomplete.animationStateChange.pipe(N(this.destroyRef)).subscribe(e=>{e.toState==="void"&&this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)})}writeValue(e){this.ngZone.runOutsideAngular(()=>{Promise.resolve(null).then(()=>this.setTriggerValue(e))})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){let i=this.elementRef.nativeElement;i.disabled=e,this.closePanel()}openPanel(){this.previousValue=this.elementRef.nativeElement.value,this.attachOverlay(),this.updateStatus()}closePanel(){this.panelOpen&&(this.nzAutocomplete.isOpen=this.panelOpen=!1,this.overlayRef&&this.overlayRef.hasAttached()&&(this.overlayRef.detach(),this.selectionChangeSubscription.unsubscribe(),this.overlayOutsideClickSubscription.unsubscribe(),this.optionsChangeSubscription.unsubscribe(),this.portal=null))}handleKeydown(e){let i=e.keyCode,l=i===38||i===40;i===27&&e.preventDefault(),this.panelOpen&&(i===27||i===9)?(this.activeOption&&this.activeOption.getLabel()!==this.previousValue&&this.setTriggerValue(this.previousValue),this.closePanel()):this.panelOpen&&i===13?this.nzAutocomplete.showPanel&&(e.preventDefault(),this.activeOption?this.activeOption.selectViaInteraction():this.closePanel()):this.panelOpen&&l&&this.nzAutocomplete.showPanel&&(e.stopPropagation(),e.preventDefault(),i===38?this.nzAutocomplete.setPreviousItemActive():this.nzAutocomplete.setNextItemActive(),this.activeOption&&this.activeOption.scrollIntoViewIfNeeded(),this.doBackfill())}handleInput(e){let i=e.target,l=this.document,d=i.value;i.type==="number"&&(d=d===""?null:parseFloat(d)),this.previousValue!==d&&(this.previousValue=d,this.onChange(d),this.canOpen()&&l.activeElement===e.target&&this.openPanel())}handleFocus(){this.canOpen()&&this.openPanel()}handleClick(){this.canOpen()&&!this.panelOpen&&this.openPanel()}handleBlur(){this.onTouched()}subscribeOptionsChange(){return this.nzAutocomplete.options.changes.pipe(Et(()=>this.positionStrategy.reapplyLastPosition()),St(0)).subscribe(()=>{this.resetActiveItem(),this.panelOpen&&this.overlayRef.updatePosition()})}subscribeSelectionChange(){return this.nzAutocomplete.selectionChange.subscribe(e=>{this.setValueAndClose(e)})}subscribeOverlayOutsideClick(){return this.overlayRef.outsidePointerEvents().pipe(Me(e=>!this.elementRef.nativeElement.contains(e.target))).subscribe(()=>{this.closePanel()})}attachOverlay(){if(!this.nzAutocomplete)throw fi();!this.portal&&this.nzAutocomplete.template&&(this.portal=new on(this.nzAutocomplete.template,this.viewContainerRef)),this.overlayRef||(this.overlayRef=rn(this.injector,{positionStrategy:this.getOverlayPosition(),disposeOnNavigation:!0,scrollStrategy:an(this.injector),width:this.nzAutocomplete.nzWidth||this.getHostWidth()})),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.selectionChangeSubscription=this.subscribeSelectionChange(),this.optionsChangeSubscription=this.subscribeOptionsChange(),this.overlayOutsideClickSubscription=this.subscribeOverlayOutsideClick(),this.overlayRef.detachments().pipe(N(this.destroyRef)).subscribe(()=>{this.closePanel()})),this.nzAutocomplete.isOpen=this.panelOpen=!0}updateStatus(){this.overlayRef&&this.overlayRef.updateSize({width:this.nzAutocomplete.nzWidth||this.getHostWidth()}),this.nzAutocomplete.setVisibility(),this.resetActiveItem(),this.activeOption&&this.activeOption.scrollIntoViewIfNeeded()}destroyPanel(){this.overlayRef&&this.closePanel()}getConnectedElement(){return this.nzInputGroupWhitSuffixOrPrefixDirective?.elementRef??this.elementRef}getOverlayPosition(){return this.positionStrategy=sn(this.injector,this.getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPositions([new Ct({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new Ct({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})]).withTransformOriginOn(".ant-select-dropdown")}getHostWidth(){return this.getConnectedElement().nativeElement.getBoundingClientRect().width}resetActiveItem(){let e=this.nzAutocomplete.getOptionIndex(this.previousValue);this.nzAutocomplete.clearSelectedOptions(null,!0),e!==-1?(this.nzAutocomplete.setActiveItem(e),this.nzAutocomplete.activeItem.select(!1)):this.nzAutocomplete.setActiveItem(this.nzAutocomplete.nzDefaultActiveFirstOption?0:-1)}setValueAndClose(e){let i=e.nzValue;this.setTriggerValue(e.getLabel()),this.onChange(i),this.elementRef.nativeElement.focus(),this.closePanel()}setTriggerValue(e){let i=this.nzAutocomplete.getOption(e),l=i?i.getLabel():e;this.elementRef.nativeElement.value=l??"",this.nzAutocomplete.nzBackfill||(this.previousValue=l)}doBackfill(){this.nzAutocomplete.nzBackfill&&this.nzAutocomplete.activeItem&&this.setTriggerValue(this.nzAutocomplete.activeItem.getLabel())}canOpen(){let e=this.elementRef.nativeElement;return!e.readOnly&&!e.disabled}static \u0275fac=function(i){return new(i||n)};static \u0275dir=jt({type:n,selectors:[["input","nzAutocomplete",""],["textarea","nzAutocomplete",""]],hostAttrs:["autocomplete","off","aria-autocomplete","list"],hostBindings:function(i,l){i&1&&C("focusin",function(){return l.handleFocus()})("blur",function(){return l.handleBlur()})("input",function(B){return l.handleInput(B)})("keydown",function(B){return l.handleKeydown(B)})("click",function(){return l.handleClick()})},inputs:{nzAutocomplete:"nzAutocomplete"},exportAs:["nzAutocompleteTrigger"],features:[Ve([gi])]})}return n})();function hi(n){return n?.map(t=>typeof t=="number"||typeof t=="string"?{label:t.toString(),value:t.toString()}:t)}var Un=(()=>{class n{changeDetectorRef=x(xt);directionality=x(Xt);destroyRef=x(K);nzWidth;nzOverlayClassName="";nzOverlayStyle={};nzDefaultActiveFirstOption=!0;nzBackfill=!1;compareWith=(e,i)=>e===i;nzDataSource;selectionChange=new he;showPanel=!0;isOpen=!1;activeItem=null;dir="ltr";normalizedDataSource=[];animationStateChange=new he;get options(){return this.nzDataSource?this.fromDataSourceOptions:this.fromContentOptions}fromContentOptions;fromDataSourceOptions;template;panel;content;activeItemIndex=-1;selectionChangeSubscription=Z.EMPTY;optionMouseEnterSubscription=Z.EMPTY;dataSourceChangeSubscription=Z.EMPTY;optionSelectionChanges=lt(()=>this.options?ct(...this.options.map(e=>e.selectionChange)):this.afterNextRender$.pipe(pt(()=>this.optionSelectionChanges)));optionMouseEnter=lt(()=>this.options?ct(...this.options.map(e=>e.mouseEntered)):this.afterNextRender$.pipe(pt(()=>this.optionMouseEnter)));afterNextRender$=x(Hn);noAnimation=x(yt,{host:!0,optional:!0});constructor(){this.destroyRef.onDestroy(()=>{this.dataSourceChangeSubscription.unsubscribe(),this.selectionChangeSubscription.unsubscribe(),this.optionMouseEnterSubscription.unsubscribe(),this.dataSourceChangeSubscription=this.selectionChangeSubscription=this.optionMouseEnterSubscription=null})}ngOnInit(){this.directionality.change?.pipe(N(this.destroyRef)).subscribe(e=>{this.dir=e,this.changeDetectorRef.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(e){let{nzDataSource:i}=e;i&&(this.normalizedDataSource=hi(i.currentValue))}onAnimationEvent(e){this.animationStateChange.emit(e)}ngAfterContentInit(){this.nzDataSource||this.optionsInit()}ngAfterViewInit(){this.nzDataSource&&this.optionsInit()}setVisibility(){this.showPanel=!!this.options.length,this.changeDetectorRef.markForCheck()}setActiveItem(e){let i=this.options.get(e);i&&!i.active?(this.activeItem=i,this.activeItemIndex=e,this.clearSelectedOptions(this.activeItem),this.activeItem.setActiveStyles()):(this.activeItem=null,this.activeItemIndex=-1,this.clearSelectedOptions()),this.changeDetectorRef.markForCheck()}setNextItemActive(){let e=this.activeItemIndex+1<=this.options.length-1?this.activeItemIndex+1:0;this.setActiveItem(e)}setPreviousItemActive(){let e=this.activeItemIndex-1<0?this.options.length-1:this.activeItemIndex-1;this.setActiveItem(e)}getOptionIndex(e){return this.options.reduce((i,l,d)=>i===-1?this.compareWith(e,l.nzValue)?d:-1:i,-1)}getOption(e){return this.options.find(i=>this.compareWith(e,i.nzValue))||null}optionsInit(){this.setVisibility(),this.subscribeOptionChanges();let e=this.nzDataSource?this.fromDataSourceOptions.changes:this.fromContentOptions.changes;this.dataSourceChangeSubscription=e.subscribe(i=>{!i.dirty&&this.isOpen&&setTimeout(()=>this.setVisibility()),this.subscribeOptionChanges()})}clearSelectedOptions(e,i=!1){this.options.forEach(l=>{l!==e&&(i&&l.deselect(),l.setInactiveStyles())})}subscribeOptionChanges(){this.selectionChangeSubscription.unsubscribe(),this.selectionChangeSubscription=this.optionSelectionChanges.pipe(Me(e=>e.isUserInput)).subscribe(e=>{e.source.select(),e.source.setActiveStyles(),this.activeItem=e.source,this.activeItemIndex=this.getOptionIndex(this.activeItem.nzValue),this.clearSelectedOptions(e.source,!0),this.selectionChange.emit(e.source)}),this.optionMouseEnterSubscription.unsubscribe(),this.optionMouseEnterSubscription=this.optionMouseEnter.subscribe(e=>{e.setActiveStyles(),this.activeItem=e,this.activeItemIndex=this.getOptionIndex(this.activeItem.nzValue),this.clearSelectedOptions(e)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=_({type:n,selectors:[["nz-autocomplete"]],contentQueries:function(i,l,d){if(i&1&&Gt(d,_e,5),i&2){let B;j(B=$())&&(l.fromContentOptions=B)}},viewQuery:function(i,l){if(i&1&&(Q(Rt,5),Q(ai,5),Q(si,5),Q(_e,5)),i&2){let d;j(d=$())&&(l.template=d.first),j(d=$())&&(l.panel=d.first),j(d=$())&&(l.content=d.first),j(d=$())&&(l.fromDataSourceOptions=d)}},inputs:{nzWidth:[2,"nzWidth","nzWidth",ln],nzOverlayClassName:"nzOverlayClassName",nzOverlayStyle:"nzOverlayStyle",nzDefaultActiveFirstOption:[2,"nzDefaultActiveFirstOption","nzDefaultActiveFirstOption",Ne],nzBackfill:[2,"nzBackfill","nzBackfill",Ne],compareWith:"compareWith",nzDataSource:"nzDataSource"},outputs:{selectionChange:"selectionChange"},exportAs:["nzAutocomplete"],features:[ae],ngContentSelectors:qn,decls:1,vars:0,consts:[["panel",""],["contentTemplate",""],["optionsTemplate",""],[1,"ant-select-dropdown","ant-select-dropdown-placement-bottomLeft",3,"nzNoAnimation"],[1,"ant-select-dropdown-content-wrapper"],[1,"ant-select-dropdown-content"],[4,"ngTemplateOutlet"],[3,"nzValue","nzLabel"]],template:function(i,l){i&1&&(Te(),G(0,ui,9,12,"ng-template"))},dependencies:[Jt,_e,yt],encapsulation:2,data:{animation:[fn]},changeDetection:0})}return n})(),Gn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Lt({type:n});static \u0275inj=At({imports:[Wn]})}return n})();var yi=["settingsModal"];function vi(n,t){if(n&1&&c(0,"span",10),n&2){p(2);let e=E(0);u("nzTooltipTitle",gt("\u9879\u76EE\u5DF2\u914D\u7F6E Volta (node@",e.voltaConfig,")\uFF0C\u7531 Volta \u81EA\u52A8\u5207\u6362"))}}function bi(n,t){if(n&1&&c(0,"span",10),n&2){p(3);let e=E(0);u("nzTooltipTitle",ft("\u5F53\u524D\u7248\u672C ",e.satisfiedBy," \u6EE1\u8DB3\u9879\u76EE\u8981\u6C42 (",e.requiredVersion,")"))}}function zi(n,t){if(n&1&&c(0,"span",12),n&2){p(3);let e=E(0);u("nzTooltipTitle",ft("\u9879\u76EE\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u8FD0\u884C\u540E\u5C06\u81EA\u52A8\u5207\u6362\u5230 ",e.satisfiedBy))}}function Mi(n,t){if(n&1&&c(0,"span",13),n&2){p(3);let e=E(0);u("nzTooltipTitle",gt("\u9879\u76EE\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u4F46\u672A\u627E\u5230\u5339\u914D\u7684\u5DF2\u5B89\u88C5\u7248\u672C"))}}function Oi(n,t){if(n&1&&g(0,bi,1,3,"span",10)(1,zi,1,3,"span",12)(2,Mi,1,2,"span",13),n&2){p(2);let e=E(0);f(e.isMatch?0:e.satisfiedBy?1:2)}}function Pi(n,t){n&1&&c(0,"span",11)}function ki(n,t){if(n&1&&g(0,vi,1,2,"span",10)(1,Oi,3,1)(2,Pi,1,0,"span",11),n&2){p();let e=E(0);f(e.voltaConfig?0:e.requiredVersion?1:2)}}function wi(n,t){if(n&1){let e=T();o(0,"div",16)(1,"p"),r(2,"NVM (Node Version Manager) \u662F\u4E00\u4E2A\u7528\u4E8E\u7BA1\u7406\u591A\u4E2A Node.js \u7248\u672C\u7684\u5DE5\u5177\u3002"),a(),o(3,"p"),r(4,"\u4F7F\u7528 NVM \u53EF\u4EE5\u8F7B\u677E\u5730\u5728\u4E0D\u540C\u9879\u76EE\u95F4\u5207\u6362 Node \u7248\u672C\uFF0C\u907F\u514D\u7248\u672C\u51B2\u7A81\u3002"),a(),o(5,"div",17)(6,"button",18),C("click",function(){b(e);let l=p(2);return z(l.openNvmLearnMorePage())}),r(7,"\u4E86\u89E3\u66F4\u591A"),a(),o(8,"button",19),C("click",function(){b(e);let l=p(2);return z(l.openNvmInstallPage())}),r(9,"\u4E0B\u8F7D NVM"),a()()()}}function Si(n,t){if(n&1&&(o(0,"button",14),c(1,"span",15),r(2," \u5B89\u88C5 NVM "),a(),G(3,wi,10,0,"ng-template",null,1,re)),n&2){let e=se(4);u("nzPopoverTrigger","hover")("nzPopoverContent",e)}}function Ti(n,t){if(n&1&&(o(0,"div",21),c(1,"span",38),r(2),a()),n&2){let e=p(2);s(2),h(" ",e.nodeVersion.getNoManagerMessage()," ")}}function Ei(n,t){if(n&1&&(o(0,"div",39)(1,"div",44)(2,"span",45),r(3,"Volta \u81EA\u52A8\u7BA1\u7406"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),h("\u9879\u76EE\u5DF2\u914D\u7F6E node@",e.voltaConfig)}}function Di(n,t){if(n&1&&(o(0,"div",39)(1,"div",44)(2,"span",45),r(3,"\u7248\u672C\u6EE1\u8DB3\u8981\u6C42"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),ut("\u5F53\u524D ",e.satisfiedBy," \u6EE1\u8DB3 ",e.requiredVersion)}}function Ii(n,t){if(n&1&&(o(0,"div",40)(1,"div",44)(2,"span",45),r(3,"\u5C06\u81EA\u52A8\u5207\u6362"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),ut("\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u5207\u6362\u5230 ",e.satisfiedBy)}}function Ai(n,t){if(n&1&&(o(0,"div",41)(1,"div",44)(2,"span",45),r(3,"\u7248\u672C\u4E0D\u5339\u914D"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),h("\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u672A\u627E\u5230\u5DF2\u5B89\u88C5\u7248\u672C")}}function Vi(n,t){if(n&1){let e=T();o(0,"div",42)(1,"div",44)(2,"span",45),r(3,"\u672A\u914D\u7F6E\u8981\u6C42"),a(),o(4,"span",46),r(5,"\u5728 package.json \u7684 engines.node \u5B57\u6BB5\u914D\u7F6E"),a()(),o(6,"button",47),C("click",function(){b(e);let l=p(3);return z(l.openWriteConfig())}),c(7,"span",48),r(8," \u5199\u5165\u914D\u7F6E "),a()()}}function Ni(n,t){if(n&1){let e=T();o(0,"div",42)(1,"div",44)(2,"span",45),r(3,"\u5DF2\u914D\u7F6E\u8981\u6C42"),a(),o(4,"span",46),r(5),a()(),o(6,"button",49),C("click",function(){b(e);let l=p(3);return z(l.openWriteConfig())}),c(7,"span",48),r(8," \u4FEE\u6539\u914D\u7F6E "),a()()}if(n&2){p(3);let e=E(0);s(5),h("\u5F53\u524D engines.node: ",e.requiredVersion)}}function Fi(n,t){if(n&1){let e=T();o(0,"div",43)(1,"div",27)(2,"span",28),r(3),a(),o(4,"button",50),C("click",function(){b(e);let l=p(3);return z(l.closeWriteConfig())}),c(5,"span",51),a()(),o(6,"div",52)(7,"div",53)(8,"span",54),r(9,"\u63A8\u8350\u7248\u672C:"),a(),o(10,"nz-select",55),Ae("ngModelChange",function(l){b(e);let d=p(3);return Ie(d.selectedEngineVersion,l)||(d.selectedEngineVersion=l),z(l)}),a()(),o(11,"div",53)(12,"span",54),r(13,"\u6216\u624B\u52A8\u8F93\u5165:"),a(),o(14,"input",56),Ae("ngModelChange",function(l){b(e);let d=p(3);return Ie(d.customEngineVersion,l)||(d.customEngineVersion=l),z(l)}),a()()(),o(15,"div",57)(16,"span",58),r(17,"\u9884\u89C8:"),a(),o(18,"code",59),r(19),a()(),o(20,"div",60)(21,"button",61),C("click",function(){b(e);let l=p(3);return z(l.writeEngineConfig())}),c(22,"span",62),r(23," \u5199\u5165 package.json "),a()()()}if(n&2){let e=p(3),i=E(0);s(3),h("",i.hasEnginesConfig?"\u4FEE\u6539":"\u5199\u5165"," engines.node \u914D\u7F6E"),s(7),De("ngModel",e.selectedEngineVersion),u("nzOptions",e.recommendedEngineVersions),s(4),De("ngModel",e.customEngineVersion),s(5),h(" ",e.getEngineConfigPreview()," "),s(2),u("nzLoading",e.writingConfig)}}function Ri(n,t){if(n&1&&(g(0,Ei,6,1,"div",39)(1,Di,6,2,"div",39)(2,Ii,6,2,"div",40)(3,Ai,6,1,"div",41),g(4,Vi,9,0,"div",42)(5,Ni,9,1,"div",42),g(6,Fi,24,6,"div",43)),n&2){let e=p(2),i=E(0);f(i.voltaConfig?0:i.isMatch?1:i.satisfiedBy?2:i.requiredVersion?3:-1),s(4),f(i.hasEnginesConfig?5:4),s(2),f(e.showWriteConfig?6:-1)}}function Bi(n,t){if(n&1){let e=T();o(0,"nz-auto-option",67),C("click",function(){let l=b(e).$implicit,d=p(3);return z(d.onVersionSelect(l))}),r(1),a()}if(n&2){let e=t.$implicit;u("nzValue",e),s(),m(e)}}function Li(n,t){if(n&1){let e=T();o(0,"div",25)(1,"span",28),r(2,"\u5FEB\u901F\u5B89\u88C5"),a(),o(3,"div",63)(4,"input",64),Ae("ngModelChange",function(l){b(e);let d=p(2);return Ie(d.selectedInstallVersion,l)||(d.selectedInstallVersion=l),z(l)}),C("input",function(l){b(e);let d=p(2);return z(d.onVersionInput(l))}),a(),o(5,"nz-autocomplete",null,2),M(7,Bi,2,2,"nz-auto-option",65,ne),a(),o(9,"button",66),C("click",function(){b(e);let l=p(2);return z(l.installVersion())}),c(10,"span",15),r(11," \u5B89\u88C5 "),a()()()}if(n&2){let e=se(6),i=p(2);s(4),De("ngModel",i.selectedInstallVersion),u("nzAutocomplete",e),s(3),O(i.filteredVersions),s(2),u("nzLoading",i.installing())("disabled",!i.selectedInstallVersion)}}function ji(n,t){if(n&1){let e=T();o(0,"span",75),C("click",function(l){b(e);let d=p().$implicit,B=p(3);return z(B.confirmDelete(d,l))}),c(1,"span",51),a()}}function $i(n,t){n&1&&(o(0,"span",74),r(1,"\u5F53\u524D"),a())}function Hi(n,t){if(n&1){let e=T();o(0,"span",71)(1,"span",72),C("click",function(){let l=b(e).$implicit,d=p(3);return z(l!==d.nodeVersion.currentVersion()&&d.switchVersion(l))}),r(2),a(),g(3,ji,2,0,"span",73)(4,$i,2,0,"span",74),a()}if(n&2){let e=t.$implicit,i=p(3);D("active",e===i.nodeVersion.currentVersion())("clickable",e!==i.nodeVersion.currentVersion()),s(2),m(e),s(),f(e!==i.nodeVersion.currentVersion()?3:4)}}function qi(n,t){if(n&1&&(o(0,"div",36)(1,"span",28),r(2,"\u5DF2\u5B89\u88C5\u7248\u672C"),a(),o(3,"nz-spin",68)(4,"div",69),M(5,Hi,5,6,"span",70,ne),a()()()),n&2){p();let e=E(24),i=p();s(3),u("nzSpinning",i.nodeVersion.switching()),s(2),O(e)}}function Wi(n,t){if(n&1&&(o(0,"div",37),c(1,"span",76),r(2),a()),n&2){let e=p(2);s(2),h(" ",e.nodeVersion.error()," ")}}function Ui(n,t){if(n&1){let e=T();o(0,"div",20),g(1,Ti,3,1,"div",21),g(2,Ri,7,3),o(3,"div",22),c(4,"span",23),o(5,"span"),r(6),a(),o(7,"span",24),r(8),a()(),g(9,Li,12,4,"div",25),o(10,"div",26)(11,"div",27)(12,"span",28),r(13,"\u624B\u52A8\u5B89\u88C5\u547D\u4EE4"),a(),o(14,"span",29),r(15,"\u5982\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u53EF\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4"),a()(),o(16,"div",30)(17,"div",31)(18,"span",32),r(19,"NVM:"),a(),o(20,"code",33),r(21),a(),o(22,"button",34),C("click",function(){b(e);let l=p();return z(l.copyCommand("nvm install "+l.getSuggestedVersion()))}),c(23,"span",35),a()()()(),xe(24),g(25,qi,7,1,"div",36),g(26,Wi,3,1,"div",37),a()}if(n&2){let e=p(),i=E(0);s(),f(!e.nodeVersion.hasVersionManager()&&!e.nodeVersion.loading()?1:-1),s(),f(i?2:-1),s(4),h("\u7248\u672C\u7BA1\u7406\u5668: ",e.nodeVersion.manager()==="nvm"?"NVM":e.nodeVersion.manager()==="volta"?"Volta":"\u672A\u68C0\u6D4B\u5230"),s(2),h("\u5F53\u524D: ",e.nodeVersion.currentVersion()||"\u672A\u77E5"),s(),f(e.nodeVersion.hasVersionManager()?9:-1),s(12),h("nvm install ",e.getSuggestedVersion()),s(3);let l=Ce(e.nodeVersion.availableVersions());s(),f(l.length>0?25:-1),s(),f(e.nodeVersion.error()?26:-1)}}var Ze=class n{nodeVersion=x(wn);message=x(On);modal=x(un);settingsModal=Yt("settingsModal");selectedInstallVersion=null;recommendedVersions=[];filteredVersions=[];installing=A(!1);installMessageId=A(null);showWriteConfig=!1;writingConfig=!1;selectedEngineVersion=null;customEngineVersion="";recommendedEngineVersions=[];ngOnInit(){this.refresh()}ngOnDestroy(){this.installMessageId()&&this.message.remove(this.installMessageId())}onVersionInput(t){let e=t.target.value.toLowerCase();e?this.filteredVersions=this.recommendedVersions.filter(i=>i.toLowerCase().includes(e)):this.filteredVersions=[...this.recommendedVersions],e&&!e.startsWith("v")?this.selectedInstallVersion="v"+e:this.selectedInstallVersion=e}onVersionSelect(t){this.selectedInstallVersion=t}getEngineConfigPreview(){let t=this.customEngineVersion||this.selectedEngineVersion||"";return t?`{ "engines": { "node": "${t}" } }`:'{ "engines": { "node": "\u8BF7\u9009\u62E9\u6216\u8F93\u5165\u7248\u672C" } }'}openWriteConfig(){let t=this.nodeVersion.projectRequirement();t?.requiredVersion&&t.hasEnginesConfig&&(this.selectedEngineVersion=t.requiredVersion),this.showWriteConfig=!0}closeWriteConfig(){this.showWriteConfig=!1,this.selectedEngineVersion=null,this.customEngineVersion=""}async writeEngineConfig(){let t=this.customEngineVersion||this.selectedEngineVersion;if(!t){this.message.warning("\u8BF7\u9009\u62E9\u6216\u8F93\u5165\u7248\u672C\u53F7");return}this.writingConfig=!0;try{await this.nodeVersion.writeEngineConfig(t)?(this.message.success("\u5DF2\u5199\u5165 engines.node \u914D\u7F6E"),this.showWriteConfig=!1,this.nodeVersion.refresh(),this.updateRecommendedEngineVersions()):this.message.error("\u5199\u5165\u914D\u7F6E\u5931\u8D25")}finally{this.writingConfig=!1}}openSettingsModal(){this.updateRecommendedVersions(),this.modal.create({nzTitle:"Node\u7248\u672C\u8BBE\u7F6E",nzContent:this.settingsModal(),nzFooter:null,nzWidth:500})}getSuggestedVersion(){if(this.selectedInstallVersion)return this.selectedInstallVersion.replace(/^v/,"");let t=this.nodeVersion.projectRequirement();return t?.requiredVersion?t.requiredVersion.replace(/^[\^~>=<]+/,"").split(" ")[0]:"18.20.0"}copyCommand(t){navigator.clipboard.writeText(t).then(()=>{this.message.success("\u547D\u4EE4\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}).catch(()=>{this.message.error("\u590D\u5236\u5931\u8D25")})}updateRecommendedVersions(){let t=this.nodeVersion.projectRequirement();this.recommendedVersions=this.nodeVersion.generateRecommendedVersions(t?.requiredVersion||null),this.filteredVersions=[...this.recommendedVersions],this.selectedInstallVersion||(this.selectedInstallVersion=this.recommendedVersions[0]||null)}async installVersion(){if(!this.selectedInstallVersion){this.message.warning("\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u7248\u672C");return}this.installing.set(!0);let t=this.selectedInstallVersion;this.installMessageId.set(this.message.loading(`\u6B63\u5728\u5B89\u88C5 ${t}...`,{nzDuration:0}).messageId);let e=!1;try{e=await this.nodeVersion.installVersion(t)}finally{this.installMessageId()&&this.message.remove(this.installMessageId()),this.installing.set(!1)}e?(this.nodeVersion.alreadyInstalled()?this.message.warning(`${t} \u5DF2\u5B89\u88C5`):this.message.success(`${t} \u5B89\u88C5\u6210\u529F`),this.nodeVersion.refresh(),this.selectedInstallVersion=null,this.updateRecommendedVersions()):this.message.error(`${t} \u5B89\u88C5\u5931\u8D25`)}refresh(){return this.nodeVersion.getCurrentVersion(),this.nodeVersion.loadProjectRequirement().then(()=>{this.updateRecommendedEngineVersions()})}updateRecommendedEngineVersions(){let t=this.nodeVersion.projectRequirement();if(t?.requiredVersion){let e=t.requiredVersion;this.recommendedEngineVersions.some(l=>l.value===e)||(this.recommendedEngineVersions=[{label:e+" (\u63A8\u8350)",value:e},...this.recommendedEngineVersions])}}confirmDelete(t,e){e.stopPropagation(),this.modal.confirm({nzTitle:"\u786E\u8BA4\u5220\u9664",nzContent:`\u786E\u5B9A\u8981\u5220\u9664${t} \u7248\u672C\u5417\uFF1F`,nzOkText:"\u5220\u9664",nzOkType:"primary",nzOkDanger:!0,nzCancelText:"\u53D6\u6D88",nzOnOk:()=>this.deleteVersion(t)})}async deleteVersion(t){await this.nodeVersion.deleteVersion(t)?(this.message.success(`${t} \u7248\u672C\u5DF2\u5220\u9664`),this.nodeVersion.refresh()):this.message.error(`\u5220\u9664${t} \u7248\u672C\u5931\u8D25`)}async switchVersion(t){if(t===this.nodeVersion.currentVersion()){this.message.info("\u5F53\u524D\u5DF2\u662F\u8BE5\u7248\u672C");return}await this.nodeVersion.switchVersion(t)&&(this.message.success(`\u5DF2\u5207\u6362\u5230 ${t}`),this.nodeVersion.loadProjectRequirement())}openNvmLearnMorePage(){window.open("https://www.nvmnode.com/","_blank")}openNvmInstallPage(){window.open("https://www.nvmnode.com/guide/download.html","_blank")}getManagerLabel=P(()=>this.nodeVersion.projectRequirement()?.voltaConfig?"Volta":"NVM");getManagerColor=P(()=>this.nodeVersion.projectRequirement()?.voltaConfig?"orange":"green");static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-node-version"]],viewQuery:function(e,i){e&1&&Qt(i.settingsModal,yi,5),e&2&&Kt()},decls:15,vars:6,consts:[["settingsModal",""],["installNvmTemplate",""],["versionAuto",""],[1,"top-status"],["nzType","proj:node","nzTheme","outline"],[1,"manager-badge"],["nz-button","","nzType","default",3,"click","nzLoading"],["nzType","reload","nzTheme","outline"],["nz-button","","nzType","text","nz-tooltip","","nzTooltipTitle","Node\u7248\u672C\u8BBE\u7F6E",3,"click"],["nzType","setting","nzTheme","outline"],["nz-icon","","nzType","check-circle","nzTheme","fill","nz-tooltip","",2,"color","#52c41a","font-size","14px",3,"nzTooltipTitle"],["nz-icon","","nzType","info-circle","nzTheme","fill","nz-tooltip","","nzTooltipTitle","\u8BE5\u9879\u76EE\u672A\u914D\u7F6E Node \u7248\u672C\u8981\u6C42",2,"color","#1890ff","font-size","14px"],["nz-icon","","nzType","warning","nzTheme","fill","nz-tooltip","",2,"color","#faad14","font-size","14px",3,"nzTooltipTitle"],["nz-icon","","nzType","close-circle","nzTheme","fill","nz-tooltip","",2,"color","#ff4d4f","font-size","14px",3,"nzTooltipTitle"],["nz-button","","nzType","default","nz-popover","","nzPopoverPlacement","bottomRight",3,"nzPopoverTrigger","nzPopoverContent"],["nz-icon","","nzType","download","nzTheme","outline"],[1,"install-popover-content"],[1,"actions"],["nz-button","","nzType","default",3,"click"],["nz-button","","nzType","primary",3,"click"],[1,"modal-content"],[1,"warning-message","full-width"],[1,"manager-info"],["nz-icon","","nzType","database","nzTheme","outline"],[1,"current-version"],[1,"install-section"],[1,"manual-section"],[1,"section-header"],[1,"section-title"],[1,"hint-text"],[1,"command-list"],[1,"command-item"],[1,"command-label"],[1,"command-code"],["nz-button","","nzType","text","nzSize","small","nz-tooltip","","nzTooltipTitle","\u590D\u5236\u547D\u4EE4",3,"click"],["nz-icon","","nzType","copy","nzTheme","outline"],[1,"version-list-section"],[1,"error-message"],["nz-icon","","nzType","warning","nzTheme","outline"],[1,"status-section","success"],[1,"status-section","warning"],[1,"status-section","error"],[1,"status-section","info"],[1,"write-config-section"],[1,"status-info"],[1,"status-title"],[1,"status-desc"],["nz-button","","nzType","primary","nzSize","small","nz-tooltip","","nzTooltipTitle","\u5199\u5165 engines.node \u5230 package.json",3,"click"],["nz-icon","","nzType","edit","nzTheme","outline"],["nz-button","","nzType","default","nzSize","small","nz-tooltip","","nzTooltipTitle","\u4FEE\u6539 engines.node \u914D\u7F6E",3,"click"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nz-icon","","nzType","close","nzTheme","outline"],[1,"config-options"],[1,"option-group"],[1,"option-label"],["nzPlaceHolder","\u9009\u62E9\u63A8\u8350\u7248\u672C",1,"config-select",3,"ngModelChange","ngModel","nzOptions"],["nz-input","","placeholder","\u5982 >=18.0.0",1,"config-input",3,"ngModelChange","ngModel"],[1,"config-preview"],[1,"preview-label"],[1,"preview-code"],[1,"config-actions"],["nz-button","","nzType","primary",3,"click","nzLoading"],["nz-icon","","nzType","save","nzTheme","outline"],[1,"install-row"],["nz-input","","name","selectedInstallVersion","placeholder","\u8F93\u5165\u7248\u672C\u53F7 (\u5982 18.20.0)",1,"version-input",3,"ngModelChange","input","ngModel","nzAutocomplete"],[3,"nzValue"],["nz-button","","nzType","primary","nzSize","small",3,"click","nzLoading","disabled"],[3,"click","nzValue"],[3,"nzSpinning"],[1,"version-list"],[1,"version-tag",3,"active","clickable"],[1,"version-tag"],[1,"version-name",3,"click"],["nz-tooltip","","nzTooltipTitle","\u5220\u9664",1,"delete-btn"],[1,"active-badge"],["nz-tooltip","","nzTooltipTitle","\u5220\u9664",1,"delete-btn",3,"click"],["nz-icon","","nzType","close-circle","nzTheme","outline"]],template:function(e,i){if(e&1){let l=T();xe(0),g(1,ki,3,1),o(2,"span",3),c(3,"nz-icon",4),r(4),a(),o(5,"span",5),r(6),a(),g(7,Si,5,2),o(8,"button",6),C("click",function(){return b(l),z(i.refresh())}),c(9,"nz-icon",7),r(10,` \u5237\u65B0
|
|
1
|
+
import{j as jn}from"./chunk-ERH36Q6S.js";import{a as Nn,e as Fn,f as Rn}from"./chunk-NVN2P466.js";import{a as Vn}from"./chunk-BXZVX5KD.js";import{b as An}from"./chunk-DRV2KPHO.js";import{a as ue,b as ge}from"./chunk-AQYHNHJ3.js";import"./chunk-C6GC5OOE.js";import{a as $n,b as Ke}from"./chunk-EAFAHVBG.js";import"./chunk-YNYWN7QI.js";import{a as Bn,b as Ln}from"./chunk-4PSSTE76.js";import"./chunk-6ZXQKFRQ.js";import"./chunk-PUHSNEN6.js";import{a as U,b as F}from"./chunk-7X4X4YHI.js";import{a as de,b as wn,c as Qe}from"./chunk-RLH7DAA2.js";import{b as Re}from"./chunk-PRKDURHI.js";import{a as Sn,c as Tn,e as En,f as me}from"./chunk-JFR7U5DE.js";import{a as vt,e as yn,f as vn,g as bn,i as te,j as zn,k as He,l as qe,m as We,n as Mn,o as Ue}from"./chunk-5Y7KNVNN.js";import{a as Ge}from"./chunk-RKKAY5CD.js";import{a as Dn,b as In}from"./chunk-IVX3LVU4.js";import{g as un,l as gn}from"./chunk-IX6UZA7J.js";import"./chunk-GYXK6ZZT.js";import{a as kn}from"./chunk-7VJKEZTT.js";import{c as q,e as W}from"./chunk-S6BY2OTR.js";import{d as On,e as Pn}from"./chunk-JIVQNGBJ.js";import{C as an,D as Ct,Fb as hn,G as sn,I as rn,Ia as w,Ib as Be,Ja as S,Ka as pn,Kb as Le,La as dn,M as N,Ob as je,Pa as mn,Qa as le,Ra as Y,Sa as ce,Ua as J,Va as X,Yb as ee,Z as ln,a as Xt,ac as xn,cc as $e,dc as Cn,ec as _n,fc as pe,k as en,la as cn,o as Fe,p as tn,pb as fn,r as nn,ra as _t,t as on,ub as yt}from"./chunk-2EB7UV3S.js";import"./chunk-HFZLJHYR.js";import"./chunk-X6PRUZ5G.js";import{i as Jt,n as k}from"./chunk-SIKDYQOR.js";import{$b as ne,Ab as ke,Ac as j,Ba as Oe,Bc as $,Ca as Nt,Cb as Bt,Da as K,Dc as Qt,Ec as Kt,Fc as se,G as lt,Gb as _,Gc as ie,Ha as A,Hb as Lt,Hc as D,Ib as jt,Ic as Zt,Jc as H,Kc as r,L as ct,Lc as m,M as Me,Mb as G,Mc as h,Nc as ut,Oa as ae,Pc as De,Q as wt,Qc as Ie,Ra as dt,Rc as Ae,Sc as xe,Tc as Ce,U as St,Uc as E,V as Tt,Vb as $t,Wb as Ht,Wc as gt,Xb as g,Xc as ft,Yc as Ve,Zb as f,_b as qt,ac as M,bc as O,bd as y,cc as u,cd as v,dc as o,ea as pt,ec as a,ed as re,fc as c,g as Z,gc as Wt,ha as Et,hc as Ut,i as Pt,jc as we,jd as P,kb as Pe,kc as Se,kd as ht,l as kt,ma as Dt,mc as T,na as It,oa as At,ob as s,qa as Vt,qd as Yt,sa as x,sc as C,tb as he,ub as mt,vc as p,vd as xt,wb as Ft,wc as Te,xb as Rt,xc as Ee,ya as b,yc as Gt,za as z,zc as Q,zd as Ne}from"./chunk-YGWA6NUS.js";var Hn=new Vt("",{providedIn:"root",factory:()=>{let n=x(Oe);return new Pt(t=>{let e=Ft(()=>{t.next(),t.complete()},{injector:n});return()=>e.destroy()})}});var ni=[[["nz-auto-option"]]],ii=["nz-auto-option"];function oi(n,t){if(n&1&&(we(0),r(1),Se()),n&2){let e=p();s(),m(e.nzLabel)}}var qn=["*"],ai=["panel"],si=["content"],ri=(n,t)=>t.value;function li(n,t){}function ci(n,t){n&1&&G(0,li,0,0,"ng-template")}function pi(n,t){n&1&&Ee(0)}function di(n,t){if(n&1&&(o(0,"nz-auto-option",7),r(1),a()),n&2){let e=t.$implicit;u("nzValue",e.value)("nzLabel",e.label),s(),h(" ",e.label," ")}}function mi(n,t){if(n&1&&M(0,di,2,3,"nz-auto-option",7,ri),n&2){let e=p(2);O(e.normalizedDataSource)}}function ui(n,t){if(n&1){let e=T();o(0,"div",3,0),C("@slideMotion.done",function(l){b(e);let d=p();return z(d.onAnimationEvent(l))}),o(2,"div",4)(3,"div",5),G(4,ci,1,0,null,6),a()()(),G(5,pi,1,0,"ng-template",null,1,re)(7,mi,2,0,"ng-template",null,2,re)}if(n&2){let e=se(6),i=se(8),l=p();Zt(l.nzOverlayStyle),H(l.nzOverlayClassName),D("ant-select-dropdown-hidden",!l.showPanel)("ant-select-dropdown-rtl",l.dir==="rtl"),u("nzNoAnimation",l.noAnimation==null?null:l.noAnimation.nzNoAnimation)("@slideMotion",void 0)("@.disabled",!!(l.noAnimation!=null&&l.noAnimation.nzNoAnimation)),s(4),u("ngTemplateOutlet",l.nzDataSource?i:e)}}var Wn=(()=>{class n{nzLabel;static \u0275fac=function(i){return new(i||n)};static \u0275cmp=_({type:n,selectors:[["nz-auto-optgroup"]],inputs:{nzLabel:"nzLabel"},exportAs:["nzAutoOptgroup"],ngContentSelectors:ii,decls:3,vars:1,consts:[[1,"ant-select-item","ant-select-item-group"],[4,"nzStringTemplateOutlet"]],template:function(i,l){i&1&&(Te(ni),o(0,"div",0),G(1,oi,2,1,"ng-container",1),a(),Ee(2)),i&2&&(s(),u("nzStringTemplateOutlet",l.nzLabel))},dependencies:[dn,pn],encapsulation:2,changeDetection:0})}return n})(),bt=class{source;isUserInput;constructor(t,e=!1){this.source=t,this.isUserInput=e}},_e=(()=>{class n{ngZone=x(mt);changeDetectorRef=x(xt);element=x(dt);destroyRef=x(K);nzValue;nzLabel;nzDisabled=!1;selectionChange=new he;mouseEntered=new he;active=!1;selected=!1;nzAutocompleteOptgroupComponent=x(Wn,{optional:!0});ngOnInit(){_t(this.element.nativeElement,"mouseenter").pipe(Me(()=>this.mouseEntered.observers.length>0),N(this.destroyRef)).subscribe(()=>{this.ngZone.run(()=>this.mouseEntered.emit(this))}),_t(this.element.nativeElement,"mousedown").pipe(N(this.destroyRef)).subscribe(e=>e.preventDefault())}select(e=!0){this.selected=!0,this.changeDetectorRef.markForCheck(),e&&this.emitSelectionChangeEvent()}deselect(){this.selected=!1,this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent()}getLabel(){return this.nzLabel||this.nzValue.toString()}setActiveStyles(){this.active||(this.active=!0,this.changeDetectorRef.markForCheck())}setInactiveStyles(){this.active&&(this.active=!1,this.changeDetectorRef.markForCheck())}scrollIntoViewIfNeeded(){cn(this.element.nativeElement)}selectViaInteraction(){this.nzDisabled||(this.selected=!this.selected,this.selected?this.setActiveStyles():this.setInactiveStyles(),this.emitSelectionChangeEvent(!0),this.changeDetectorRef.markForCheck())}emitSelectionChangeEvent(e=!1){this.selectionChange.emit(new bt(this,e))}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=_({type:n,selectors:[["nz-auto-option"]],hostAttrs:["role","menuitem",1,"ant-select-item","ant-select-item-option"],hostVars:10,hostBindings:function(i,l){i&1&&C("click",function(){return l.selectViaInteraction()}),i&2&&($t("aria-selected",l.selected.toString())("aria-disabled",l.nzDisabled.toString()),D("ant-select-item-option-grouped",l.nzAutocompleteOptgroupComponent)("ant-select-item-option-selected",l.selected)("ant-select-item-option-active",l.active)("ant-select-item-option-disabled",l.nzDisabled))},inputs:{nzValue:"nzValue",nzLabel:"nzLabel",nzDisabled:[2,"nzDisabled","nzDisabled",Ne]},outputs:{selectionChange:"selectionChange",mouseEntered:"mouseEntered"},exportAs:["nzAutoOption"],ngContentSelectors:qn,decls:2,vars:0,consts:[[1,"ant-select-item-option-content"]],template:function(i,l){i&1&&(Te(),Wt(0,"div",0),Ee(1),Ut())},encapsulation:2,changeDetection:0})}return n})(),gi={provide:hn,useExisting:Dt(()=>zt),multi:!0};function fi(){return Error("Attempting to open an undefined instance of `nz-autocomplete`. Make sure that the id passed to the `nzAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.")}var zt=(()=>{class n{injector=x(Oe);ngZone=x(mt);elementRef=x(dt);viewContainerRef=x(Bt);destroyRef=x(K);nzAutocomplete;onChange=()=>{};onTouched=()=>{};panelOpen=!1;get activeOption(){return this.nzAutocomplete&&this.nzAutocomplete.options.length?this.nzAutocomplete.activeItem:null}overlayRef=null;portal=null;positionStrategy;previousValue=null;selectionChangeSubscription;optionsChangeSubscription;overlayOutsideClickSubscription;document=x(Nt);nzInputGroupWhitSuffixOrPrefixDirective=x(Cn,{optional:!0});constructor(){this.destroyRef.onDestroy(()=>{this.destroyPanel()})}ngAfterViewInit(){this.nzAutocomplete&&this.nzAutocomplete.animationStateChange.pipe(N(this.destroyRef)).subscribe(e=>{e.toState==="void"&&this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)})}writeValue(e){this.ngZone.runOutsideAngular(()=>{Promise.resolve(null).then(()=>this.setTriggerValue(e))})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){let i=this.elementRef.nativeElement;i.disabled=e,this.closePanel()}openPanel(){this.previousValue=this.elementRef.nativeElement.value,this.attachOverlay(),this.updateStatus()}closePanel(){this.panelOpen&&(this.nzAutocomplete.isOpen=this.panelOpen=!1,this.overlayRef&&this.overlayRef.hasAttached()&&(this.overlayRef.detach(),this.selectionChangeSubscription.unsubscribe(),this.overlayOutsideClickSubscription.unsubscribe(),this.optionsChangeSubscription.unsubscribe(),this.portal=null))}handleKeydown(e){let i=e.keyCode,l=i===38||i===40;i===27&&e.preventDefault(),this.panelOpen&&(i===27||i===9)?(this.activeOption&&this.activeOption.getLabel()!==this.previousValue&&this.setTriggerValue(this.previousValue),this.closePanel()):this.panelOpen&&i===13?this.nzAutocomplete.showPanel&&(e.preventDefault(),this.activeOption?this.activeOption.selectViaInteraction():this.closePanel()):this.panelOpen&&l&&this.nzAutocomplete.showPanel&&(e.stopPropagation(),e.preventDefault(),i===38?this.nzAutocomplete.setPreviousItemActive():this.nzAutocomplete.setNextItemActive(),this.activeOption&&this.activeOption.scrollIntoViewIfNeeded(),this.doBackfill())}handleInput(e){let i=e.target,l=this.document,d=i.value;i.type==="number"&&(d=d===""?null:parseFloat(d)),this.previousValue!==d&&(this.previousValue=d,this.onChange(d),this.canOpen()&&l.activeElement===e.target&&this.openPanel())}handleFocus(){this.canOpen()&&this.openPanel()}handleClick(){this.canOpen()&&!this.panelOpen&&this.openPanel()}handleBlur(){this.onTouched()}subscribeOptionsChange(){return this.nzAutocomplete.options.changes.pipe(Et(()=>this.positionStrategy.reapplyLastPosition()),St(0)).subscribe(()=>{this.resetActiveItem(),this.panelOpen&&this.overlayRef.updatePosition()})}subscribeSelectionChange(){return this.nzAutocomplete.selectionChange.subscribe(e=>{this.setValueAndClose(e)})}subscribeOverlayOutsideClick(){return this.overlayRef.outsidePointerEvents().pipe(Me(e=>!this.elementRef.nativeElement.contains(e.target))).subscribe(()=>{this.closePanel()})}attachOverlay(){if(!this.nzAutocomplete)throw fi();!this.portal&&this.nzAutocomplete.template&&(this.portal=new on(this.nzAutocomplete.template,this.viewContainerRef)),this.overlayRef||(this.overlayRef=rn(this.injector,{positionStrategy:this.getOverlayPosition(),disposeOnNavigation:!0,scrollStrategy:an(this.injector),width:this.nzAutocomplete.nzWidth||this.getHostWidth()})),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.selectionChangeSubscription=this.subscribeSelectionChange(),this.optionsChangeSubscription=this.subscribeOptionsChange(),this.overlayOutsideClickSubscription=this.subscribeOverlayOutsideClick(),this.overlayRef.detachments().pipe(N(this.destroyRef)).subscribe(()=>{this.closePanel()})),this.nzAutocomplete.isOpen=this.panelOpen=!0}updateStatus(){this.overlayRef&&this.overlayRef.updateSize({width:this.nzAutocomplete.nzWidth||this.getHostWidth()}),this.nzAutocomplete.setVisibility(),this.resetActiveItem(),this.activeOption&&this.activeOption.scrollIntoViewIfNeeded()}destroyPanel(){this.overlayRef&&this.closePanel()}getConnectedElement(){return this.nzInputGroupWhitSuffixOrPrefixDirective?.elementRef??this.elementRef}getOverlayPosition(){return this.positionStrategy=sn(this.injector,this.getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPositions([new Ct({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new Ct({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})]).withTransformOriginOn(".ant-select-dropdown")}getHostWidth(){return this.getConnectedElement().nativeElement.getBoundingClientRect().width}resetActiveItem(){let e=this.nzAutocomplete.getOptionIndex(this.previousValue);this.nzAutocomplete.clearSelectedOptions(null,!0),e!==-1?(this.nzAutocomplete.setActiveItem(e),this.nzAutocomplete.activeItem.select(!1)):this.nzAutocomplete.setActiveItem(this.nzAutocomplete.nzDefaultActiveFirstOption?0:-1)}setValueAndClose(e){let i=e.nzValue;this.setTriggerValue(e.getLabel()),this.onChange(i),this.elementRef.nativeElement.focus(),this.closePanel()}setTriggerValue(e){let i=this.nzAutocomplete.getOption(e),l=i?i.getLabel():e;this.elementRef.nativeElement.value=l??"",this.nzAutocomplete.nzBackfill||(this.previousValue=l)}doBackfill(){this.nzAutocomplete.nzBackfill&&this.nzAutocomplete.activeItem&&this.setTriggerValue(this.nzAutocomplete.activeItem.getLabel())}canOpen(){let e=this.elementRef.nativeElement;return!e.readOnly&&!e.disabled}static \u0275fac=function(i){return new(i||n)};static \u0275dir=jt({type:n,selectors:[["input","nzAutocomplete",""],["textarea","nzAutocomplete",""]],hostAttrs:["autocomplete","off","aria-autocomplete","list"],hostBindings:function(i,l){i&1&&C("focusin",function(){return l.handleFocus()})("blur",function(){return l.handleBlur()})("input",function(B){return l.handleInput(B)})("keydown",function(B){return l.handleKeydown(B)})("click",function(){return l.handleClick()})},inputs:{nzAutocomplete:"nzAutocomplete"},exportAs:["nzAutocompleteTrigger"],features:[Ve([gi])]})}return n})();function hi(n){return n?.map(t=>typeof t=="number"||typeof t=="string"?{label:t.toString(),value:t.toString()}:t)}var Un=(()=>{class n{changeDetectorRef=x(xt);directionality=x(Xt);destroyRef=x(K);nzWidth;nzOverlayClassName="";nzOverlayStyle={};nzDefaultActiveFirstOption=!0;nzBackfill=!1;compareWith=(e,i)=>e===i;nzDataSource;selectionChange=new he;showPanel=!0;isOpen=!1;activeItem=null;dir="ltr";normalizedDataSource=[];animationStateChange=new he;get options(){return this.nzDataSource?this.fromDataSourceOptions:this.fromContentOptions}fromContentOptions;fromDataSourceOptions;template;panel;content;activeItemIndex=-1;selectionChangeSubscription=Z.EMPTY;optionMouseEnterSubscription=Z.EMPTY;dataSourceChangeSubscription=Z.EMPTY;optionSelectionChanges=lt(()=>this.options?ct(...this.options.map(e=>e.selectionChange)):this.afterNextRender$.pipe(pt(()=>this.optionSelectionChanges)));optionMouseEnter=lt(()=>this.options?ct(...this.options.map(e=>e.mouseEntered)):this.afterNextRender$.pipe(pt(()=>this.optionMouseEnter)));afterNextRender$=x(Hn);noAnimation=x(yt,{host:!0,optional:!0});constructor(){this.destroyRef.onDestroy(()=>{this.dataSourceChangeSubscription.unsubscribe(),this.selectionChangeSubscription.unsubscribe(),this.optionMouseEnterSubscription.unsubscribe(),this.dataSourceChangeSubscription=this.selectionChangeSubscription=this.optionMouseEnterSubscription=null})}ngOnInit(){this.directionality.change?.pipe(N(this.destroyRef)).subscribe(e=>{this.dir=e,this.changeDetectorRef.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(e){let{nzDataSource:i}=e;i&&(this.normalizedDataSource=hi(i.currentValue))}onAnimationEvent(e){this.animationStateChange.emit(e)}ngAfterContentInit(){this.nzDataSource||this.optionsInit()}ngAfterViewInit(){this.nzDataSource&&this.optionsInit()}setVisibility(){this.showPanel=!!this.options.length,this.changeDetectorRef.markForCheck()}setActiveItem(e){let i=this.options.get(e);i&&!i.active?(this.activeItem=i,this.activeItemIndex=e,this.clearSelectedOptions(this.activeItem),this.activeItem.setActiveStyles()):(this.activeItem=null,this.activeItemIndex=-1,this.clearSelectedOptions()),this.changeDetectorRef.markForCheck()}setNextItemActive(){let e=this.activeItemIndex+1<=this.options.length-1?this.activeItemIndex+1:0;this.setActiveItem(e)}setPreviousItemActive(){let e=this.activeItemIndex-1<0?this.options.length-1:this.activeItemIndex-1;this.setActiveItem(e)}getOptionIndex(e){return this.options.reduce((i,l,d)=>i===-1?this.compareWith(e,l.nzValue)?d:-1:i,-1)}getOption(e){return this.options.find(i=>this.compareWith(e,i.nzValue))||null}optionsInit(){this.setVisibility(),this.subscribeOptionChanges();let e=this.nzDataSource?this.fromDataSourceOptions.changes:this.fromContentOptions.changes;this.dataSourceChangeSubscription=e.subscribe(i=>{!i.dirty&&this.isOpen&&setTimeout(()=>this.setVisibility()),this.subscribeOptionChanges()})}clearSelectedOptions(e,i=!1){this.options.forEach(l=>{l!==e&&(i&&l.deselect(),l.setInactiveStyles())})}subscribeOptionChanges(){this.selectionChangeSubscription.unsubscribe(),this.selectionChangeSubscription=this.optionSelectionChanges.pipe(Me(e=>e.isUserInput)).subscribe(e=>{e.source.select(),e.source.setActiveStyles(),this.activeItem=e.source,this.activeItemIndex=this.getOptionIndex(this.activeItem.nzValue),this.clearSelectedOptions(e.source,!0),this.selectionChange.emit(e.source)}),this.optionMouseEnterSubscription.unsubscribe(),this.optionMouseEnterSubscription=this.optionMouseEnter.subscribe(e=>{e.setActiveStyles(),this.activeItem=e,this.activeItemIndex=this.getOptionIndex(this.activeItem.nzValue),this.clearSelectedOptions(e)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=_({type:n,selectors:[["nz-autocomplete"]],contentQueries:function(i,l,d){if(i&1&&Gt(d,_e,5),i&2){let B;j(B=$())&&(l.fromContentOptions=B)}},viewQuery:function(i,l){if(i&1&&(Q(Rt,5),Q(ai,5),Q(si,5),Q(_e,5)),i&2){let d;j(d=$())&&(l.template=d.first),j(d=$())&&(l.panel=d.first),j(d=$())&&(l.content=d.first),j(d=$())&&(l.fromDataSourceOptions=d)}},inputs:{nzWidth:[2,"nzWidth","nzWidth",ln],nzOverlayClassName:"nzOverlayClassName",nzOverlayStyle:"nzOverlayStyle",nzDefaultActiveFirstOption:[2,"nzDefaultActiveFirstOption","nzDefaultActiveFirstOption",Ne],nzBackfill:[2,"nzBackfill","nzBackfill",Ne],compareWith:"compareWith",nzDataSource:"nzDataSource"},outputs:{selectionChange:"selectionChange"},exportAs:["nzAutocomplete"],features:[ae],ngContentSelectors:qn,decls:1,vars:0,consts:[["panel",""],["contentTemplate",""],["optionsTemplate",""],[1,"ant-select-dropdown","ant-select-dropdown-placement-bottomLeft",3,"nzNoAnimation"],[1,"ant-select-dropdown-content-wrapper"],[1,"ant-select-dropdown-content"],[4,"ngTemplateOutlet"],[3,"nzValue","nzLabel"]],template:function(i,l){i&1&&(Te(),G(0,ui,9,12,"ng-template"))},dependencies:[Jt,_e,yt],encapsulation:2,data:{animation:[fn]},changeDetection:0})}return n})(),Gn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Lt({type:n});static \u0275inj=At({imports:[Wn]})}return n})();var yi=["settingsModal"];function vi(n,t){if(n&1&&c(0,"span",10),n&2){p(2);let e=E(0);u("nzTooltipTitle",gt("\u9879\u76EE\u5DF2\u914D\u7F6E Volta (node@",e.voltaConfig,")\uFF0C\u7531 Volta \u81EA\u52A8\u5207\u6362"))}}function bi(n,t){if(n&1&&c(0,"span",10),n&2){p(3);let e=E(0);u("nzTooltipTitle",ft("\u5F53\u524D\u7248\u672C ",e.satisfiedBy," \u6EE1\u8DB3\u9879\u76EE\u8981\u6C42 (",e.requiredVersion,")"))}}function zi(n,t){if(n&1&&c(0,"span",12),n&2){p(3);let e=E(0);u("nzTooltipTitle",ft("\u9879\u76EE\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u8FD0\u884C\u540E\u5C06\u81EA\u52A8\u5207\u6362\u5230 ",e.satisfiedBy))}}function Mi(n,t){if(n&1&&c(0,"span",13),n&2){p(3);let e=E(0);u("nzTooltipTitle",gt("\u9879\u76EE\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u4F46\u672A\u627E\u5230\u5339\u914D\u7684\u5DF2\u5B89\u88C5\u7248\u672C"))}}function Oi(n,t){if(n&1&&g(0,bi,1,3,"span",10)(1,zi,1,3,"span",12)(2,Mi,1,2,"span",13),n&2){p(2);let e=E(0);f(e.isMatch?0:e.satisfiedBy?1:2)}}function Pi(n,t){n&1&&c(0,"span",11)}function ki(n,t){if(n&1&&g(0,vi,1,2,"span",10)(1,Oi,3,1)(2,Pi,1,0,"span",11),n&2){p();let e=E(0);f(e.voltaConfig?0:e.requiredVersion?1:2)}}function wi(n,t){if(n&1){let e=T();o(0,"div",16)(1,"p"),r(2,"NVM (Node Version Manager) \u662F\u4E00\u4E2A\u7528\u4E8E\u7BA1\u7406\u591A\u4E2A Node.js \u7248\u672C\u7684\u5DE5\u5177\u3002"),a(),o(3,"p"),r(4,"\u4F7F\u7528 NVM \u53EF\u4EE5\u8F7B\u677E\u5730\u5728\u4E0D\u540C\u9879\u76EE\u95F4\u5207\u6362 Node \u7248\u672C\uFF0C\u907F\u514D\u7248\u672C\u51B2\u7A81\u3002"),a(),o(5,"div",17)(6,"button",18),C("click",function(){b(e);let l=p(2);return z(l.openNvmLearnMorePage())}),r(7,"\u4E86\u89E3\u66F4\u591A"),a(),o(8,"button",19),C("click",function(){b(e);let l=p(2);return z(l.openNvmInstallPage())}),r(9,"\u4E0B\u8F7D NVM"),a()()()}}function Si(n,t){if(n&1&&(o(0,"button",14),c(1,"span",15),r(2," \u5B89\u88C5 NVM "),a(),G(3,wi,10,0,"ng-template",null,1,re)),n&2){let e=se(4);u("nzPopoverTrigger","hover")("nzPopoverContent",e)}}function Ti(n,t){if(n&1&&(o(0,"div",21),c(1,"span",38),r(2),a()),n&2){let e=p(2);s(2),h(" ",e.nodeVersion.getNoManagerMessage()," ")}}function Ei(n,t){if(n&1&&(o(0,"div",39)(1,"div",44)(2,"span",45),r(3,"Volta \u81EA\u52A8\u7BA1\u7406"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),h("\u9879\u76EE\u5DF2\u914D\u7F6E node@",e.voltaConfig)}}function Di(n,t){if(n&1&&(o(0,"div",39)(1,"div",44)(2,"span",45),r(3,"\u7248\u672C\u6EE1\u8DB3\u8981\u6C42"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),ut("\u5F53\u524D ",e.satisfiedBy," \u6EE1\u8DB3 ",e.requiredVersion)}}function Ii(n,t){if(n&1&&(o(0,"div",40)(1,"div",44)(2,"span",45),r(3,"\u5C06\u81EA\u52A8\u5207\u6362"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),ut("\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u5207\u6362\u5230 ",e.satisfiedBy)}}function Ai(n,t){if(n&1&&(o(0,"div",41)(1,"div",44)(2,"span",45),r(3,"\u7248\u672C\u4E0D\u5339\u914D"),a(),o(4,"span",46),r(5),a()()()),n&2){p(3);let e=E(0);s(5),h("\u8981\u6C42 ",e.requiredVersion,"\uFF0C\u672A\u627E\u5230\u5DF2\u5B89\u88C5\u7248\u672C")}}function Vi(n,t){if(n&1){let e=T();o(0,"div",42)(1,"div",44)(2,"span",45),r(3,"\u672A\u914D\u7F6E\u8981\u6C42"),a(),o(4,"span",46),r(5,"\u5728 package.json \u7684 engines.node \u5B57\u6BB5\u914D\u7F6E"),a()(),o(6,"button",47),C("click",function(){b(e);let l=p(3);return z(l.openWriteConfig())}),c(7,"span",48),r(8," \u5199\u5165\u914D\u7F6E "),a()()}}function Ni(n,t){if(n&1){let e=T();o(0,"div",42)(1,"div",44)(2,"span",45),r(3,"\u5DF2\u914D\u7F6E\u8981\u6C42"),a(),o(4,"span",46),r(5),a()(),o(6,"button",49),C("click",function(){b(e);let l=p(3);return z(l.openWriteConfig())}),c(7,"span",48),r(8," \u4FEE\u6539\u914D\u7F6E "),a()()}if(n&2){p(3);let e=E(0);s(5),h("\u5F53\u524D engines.node: ",e.requiredVersion)}}function Fi(n,t){if(n&1){let e=T();o(0,"div",43)(1,"div",27)(2,"span",28),r(3),a(),o(4,"button",50),C("click",function(){b(e);let l=p(3);return z(l.closeWriteConfig())}),c(5,"span",51),a()(),o(6,"div",52)(7,"div",53)(8,"span",54),r(9,"\u63A8\u8350\u7248\u672C:"),a(),o(10,"nz-select",55),Ae("ngModelChange",function(l){b(e);let d=p(3);return Ie(d.selectedEngineVersion,l)||(d.selectedEngineVersion=l),z(l)}),a()(),o(11,"div",53)(12,"span",54),r(13,"\u6216\u624B\u52A8\u8F93\u5165:"),a(),o(14,"input",56),Ae("ngModelChange",function(l){b(e);let d=p(3);return Ie(d.customEngineVersion,l)||(d.customEngineVersion=l),z(l)}),a()()(),o(15,"div",57)(16,"span",58),r(17,"\u9884\u89C8:"),a(),o(18,"code",59),r(19),a()(),o(20,"div",60)(21,"button",61),C("click",function(){b(e);let l=p(3);return z(l.writeEngineConfig())}),c(22,"span",62),r(23," \u5199\u5165 package.json "),a()()()}if(n&2){let e=p(3),i=E(0);s(3),h("",i.hasEnginesConfig?"\u4FEE\u6539":"\u5199\u5165"," engines.node \u914D\u7F6E"),s(7),De("ngModel",e.selectedEngineVersion),u("nzOptions",e.recommendedEngineVersions),s(4),De("ngModel",e.customEngineVersion),s(5),h(" ",e.getEngineConfigPreview()," "),s(2),u("nzLoading",e.writingConfig)}}function Ri(n,t){if(n&1&&(g(0,Ei,6,1,"div",39)(1,Di,6,2,"div",39)(2,Ii,6,2,"div",40)(3,Ai,6,1,"div",41),g(4,Vi,9,0,"div",42)(5,Ni,9,1,"div",42),g(6,Fi,24,6,"div",43)),n&2){let e=p(2),i=E(0);f(i.voltaConfig?0:i.isMatch?1:i.satisfiedBy?2:i.requiredVersion?3:-1),s(4),f(i.hasEnginesConfig?5:4),s(2),f(e.showWriteConfig?6:-1)}}function Bi(n,t){if(n&1){let e=T();o(0,"nz-auto-option",67),C("click",function(){let l=b(e).$implicit,d=p(3);return z(d.onVersionSelect(l))}),r(1),a()}if(n&2){let e=t.$implicit;u("nzValue",e),s(),m(e)}}function Li(n,t){if(n&1){let e=T();o(0,"div",25)(1,"span",28),r(2,"\u5FEB\u901F\u5B89\u88C5"),a(),o(3,"div",63)(4,"input",64),Ae("ngModelChange",function(l){b(e);let d=p(2);return Ie(d.selectedInstallVersion,l)||(d.selectedInstallVersion=l),z(l)}),C("input",function(l){b(e);let d=p(2);return z(d.onVersionInput(l))}),a(),o(5,"nz-autocomplete",null,2),M(7,Bi,2,2,"nz-auto-option",65,ne),a(),o(9,"button",66),C("click",function(){b(e);let l=p(2);return z(l.installVersion())}),c(10,"span",15),r(11," \u5B89\u88C5 "),a()()()}if(n&2){let e=se(6),i=p(2);s(4),De("ngModel",i.selectedInstallVersion),u("nzAutocomplete",e),s(3),O(i.filteredVersions),s(2),u("nzLoading",i.installing())("disabled",!i.selectedInstallVersion)}}function ji(n,t){if(n&1){let e=T();o(0,"span",75),C("click",function(l){b(e);let d=p().$implicit,B=p(3);return z(B.confirmDelete(d,l))}),c(1,"span",51),a()}}function $i(n,t){n&1&&(o(0,"span",74),r(1,"\u5F53\u524D"),a())}function Hi(n,t){if(n&1){let e=T();o(0,"span",71)(1,"span",72),C("click",function(){let l=b(e).$implicit,d=p(3);return z(l!==d.nodeVersion.currentVersion()&&d.switchVersion(l))}),r(2),a(),g(3,ji,2,0,"span",73)(4,$i,2,0,"span",74),a()}if(n&2){let e=t.$implicit,i=p(3);D("active",e===i.nodeVersion.currentVersion())("clickable",e!==i.nodeVersion.currentVersion()),s(2),m(e),s(),f(e!==i.nodeVersion.currentVersion()?3:4)}}function qi(n,t){if(n&1&&(o(0,"div",36)(1,"span",28),r(2,"\u5DF2\u5B89\u88C5\u7248\u672C"),a(),o(3,"nz-spin",68)(4,"div",69),M(5,Hi,5,6,"span",70,ne),a()()()),n&2){p();let e=E(24),i=p();s(3),u("nzSpinning",i.nodeVersion.switching()),s(2),O(e)}}function Wi(n,t){if(n&1&&(o(0,"div",37),c(1,"span",76),r(2),a()),n&2){let e=p(2);s(2),h(" ",e.nodeVersion.error()," ")}}function Ui(n,t){if(n&1){let e=T();o(0,"div",20),g(1,Ti,3,1,"div",21),g(2,Ri,7,3),o(3,"div",22),c(4,"span",23),o(5,"span"),r(6),a(),o(7,"span",24),r(8),a()(),g(9,Li,12,4,"div",25),o(10,"div",26)(11,"div",27)(12,"span",28),r(13,"\u624B\u52A8\u5B89\u88C5\u547D\u4EE4"),a(),o(14,"span",29),r(15,"\u5982\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u53EF\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4"),a()(),o(16,"div",30)(17,"div",31)(18,"span",32),r(19,"NVM:"),a(),o(20,"code",33),r(21),a(),o(22,"button",34),C("click",function(){b(e);let l=p();return z(l.copyCommand("nvm install "+l.getSuggestedVersion()))}),c(23,"span",35),a()()()(),xe(24),g(25,qi,7,1,"div",36),g(26,Wi,3,1,"div",37),a()}if(n&2){let e=p(),i=E(0);s(),f(!e.nodeVersion.hasVersionManager()&&!e.nodeVersion.loading()?1:-1),s(),f(i?2:-1),s(4),h("\u7248\u672C\u7BA1\u7406\u5668: ",e.nodeVersion.manager()==="nvm"?"NVM":e.nodeVersion.manager()==="volta"?"Volta":"\u672A\u68C0\u6D4B\u5230"),s(2),h("\u5F53\u524D: ",e.nodeVersion.currentVersion()||"\u672A\u77E5"),s(),f(e.nodeVersion.hasVersionManager()?9:-1),s(12),h("nvm install ",e.getSuggestedVersion()),s(3);let l=Ce(e.nodeVersion.availableVersions());s(),f(l.length>0?25:-1),s(),f(e.nodeVersion.error()?26:-1)}}var Ze=class n{nodeVersion=x(wn);message=x(On);modal=x(un);settingsModal=Yt("settingsModal");selectedInstallVersion=null;recommendedVersions=[];filteredVersions=[];installing=A(!1);installMessageId=A(null);showWriteConfig=!1;writingConfig=!1;selectedEngineVersion=null;customEngineVersion="";recommendedEngineVersions=[];ngOnInit(){this.refresh()}ngOnDestroy(){this.installMessageId()&&this.message.remove(this.installMessageId())}onVersionInput(t){let e=t.target.value.toLowerCase();e?this.filteredVersions=this.recommendedVersions.filter(i=>i.toLowerCase().includes(e)):this.filteredVersions=[...this.recommendedVersions],e&&!e.startsWith("v")?this.selectedInstallVersion="v"+e:this.selectedInstallVersion=e}onVersionSelect(t){this.selectedInstallVersion=t}getEngineConfigPreview(){let t=this.customEngineVersion||this.selectedEngineVersion||"";return t?`{ "engines": { "node": "${t}" } }`:'{ "engines": { "node": "\u8BF7\u9009\u62E9\u6216\u8F93\u5165\u7248\u672C" } }'}openWriteConfig(){let t=this.nodeVersion.projectRequirement();t?.requiredVersion&&t.hasEnginesConfig&&(this.selectedEngineVersion=t.requiredVersion),this.showWriteConfig=!0}closeWriteConfig(){this.showWriteConfig=!1,this.selectedEngineVersion=null,this.customEngineVersion=""}async writeEngineConfig(){let t=this.customEngineVersion||this.selectedEngineVersion;if(!t){this.message.warning("\u8BF7\u9009\u62E9\u6216\u8F93\u5165\u7248\u672C\u53F7");return}this.writingConfig=!0;try{await this.nodeVersion.writeEngineConfig(t)?(this.message.success("\u5DF2\u5199\u5165 engines.node \u914D\u7F6E"),this.showWriteConfig=!1,this.nodeVersion.refresh(),this.updateRecommendedEngineVersions()):this.message.error("\u5199\u5165\u914D\u7F6E\u5931\u8D25")}finally{this.writingConfig=!1}}openSettingsModal(){this.updateRecommendedVersions(),this.modal.create({nzTitle:"Node\u7248\u672C\u8BBE\u7F6E",nzContent:this.settingsModal(),nzFooter:null,nzWidth:500})}getSuggestedVersion(){if(this.selectedInstallVersion)return this.selectedInstallVersion.replace(/^v/,"");let t=this.nodeVersion.projectRequirement();return t?.requiredVersion?t.requiredVersion.replace(/^[\^~>=<]+/,"").split(" ")[0]:"18.20.0"}copyCommand(t){navigator.clipboard.writeText(t).then(()=>{this.message.success("\u547D\u4EE4\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}).catch(()=>{this.message.error("\u590D\u5236\u5931\u8D25")})}updateRecommendedVersions(){let t=this.nodeVersion.projectRequirement();this.recommendedVersions=this.nodeVersion.generateRecommendedVersions(t?.requiredVersion||null),this.filteredVersions=[...this.recommendedVersions],this.selectedInstallVersion||(this.selectedInstallVersion=this.recommendedVersions[0]||null)}async installVersion(){if(!this.selectedInstallVersion){this.message.warning("\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u7248\u672C");return}this.installing.set(!0);let t=this.selectedInstallVersion;this.installMessageId.set(this.message.loading(`\u6B63\u5728\u5B89\u88C5 ${t}...`,{nzDuration:0}).messageId);let e=!1;try{e=await this.nodeVersion.installVersion(t)}finally{this.installMessageId()&&this.message.remove(this.installMessageId()),this.installing.set(!1)}e?(this.nodeVersion.alreadyInstalled()?this.message.warning(`${t} \u5DF2\u5B89\u88C5`):this.message.success(`${t} \u5B89\u88C5\u6210\u529F`),this.nodeVersion.refresh(),this.selectedInstallVersion=null,this.updateRecommendedVersions()):this.message.error(`${t} \u5B89\u88C5\u5931\u8D25`)}refresh(){return this.nodeVersion.getCurrentVersion(),this.nodeVersion.loadProjectRequirement().then(()=>{this.updateRecommendedEngineVersions()})}updateRecommendedEngineVersions(){let t=this.nodeVersion.projectRequirement();if(t?.requiredVersion){let e=t.requiredVersion;this.recommendedEngineVersions.some(l=>l.value===e)||(this.recommendedEngineVersions=[{label:e+" (\u63A8\u8350)",value:e},...this.recommendedEngineVersions])}}confirmDelete(t,e){e.stopPropagation(),this.modal.confirm({nzTitle:"\u786E\u8BA4\u5220\u9664",nzContent:`\u786E\u5B9A\u8981\u5220\u9664${t} \u7248\u672C\u5417\uFF1F`,nzOkText:"\u5220\u9664",nzOkType:"primary",nzOkDanger:!0,nzCancelText:"\u53D6\u6D88",nzOnOk:()=>this.deleteVersion(t)})}async deleteVersion(t){await this.nodeVersion.deleteVersion(t)?(this.message.success(`${t} \u7248\u672C\u5DF2\u5220\u9664`),this.nodeVersion.refresh()):this.message.error(`\u5220\u9664${t} \u7248\u672C\u5931\u8D25`)}async switchVersion(t){if(t===this.nodeVersion.currentVersion()){this.message.info("\u5F53\u524D\u5DF2\u662F\u8BE5\u7248\u672C");return}await this.nodeVersion.switchVersion(t)&&(this.message.success(`\u5DF2\u5207\u6362\u5230 ${t}`),this.nodeVersion.loadProjectRequirement())}openNvmLearnMorePage(){window.open("https://www.nvmnode.com/","_blank")}openNvmInstallPage(){window.open("https://www.nvmnode.com/guide/download.html","_blank")}getManagerLabel=P(()=>this.nodeVersion.projectRequirement()?.voltaConfig?"Volta":"NVM");getManagerColor=P(()=>this.nodeVersion.projectRequirement()?.voltaConfig?"orange":"green");static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-node-version"]],viewQuery:function(e,i){e&1&&Qt(i.settingsModal,yi,5),e&2&&Kt()},decls:15,vars:6,consts:[["settingsModal",""],["installNvmTemplate",""],["versionAuto",""],[1,"top-status"],["nzType","proj:node","nzTheme","outline"],[1,"manager-badge"],["nz-button","","nzType","default",3,"click","nzLoading"],["nzType","reload","nzTheme","outline"],["nz-button","","nzType","text","nz-tooltip","","nzTooltipTitle","Node\u7248\u672C\u8BBE\u7F6E",3,"click"],["nzType","setting","nzTheme","outline"],["nz-icon","","nzType","check-circle","nzTheme","fill","nz-tooltip","",2,"color","#52c41a","font-size","14px",3,"nzTooltipTitle"],["nz-icon","","nzType","info-circle","nzTheme","fill","nz-tooltip","","nzTooltipTitle","\u8BE5\u9879\u76EE\u672A\u914D\u7F6E Node \u7248\u672C\u8981\u6C42",2,"color","#1890ff","font-size","14px"],["nz-icon","","nzType","warning","nzTheme","fill","nz-tooltip","",2,"color","#faad14","font-size","14px",3,"nzTooltipTitle"],["nz-icon","","nzType","close-circle","nzTheme","fill","nz-tooltip","",2,"color","#ff4d4f","font-size","14px",3,"nzTooltipTitle"],["nz-button","","nzType","default","nz-popover","","nzPopoverPlacement","bottomRight",3,"nzPopoverTrigger","nzPopoverContent"],["nz-icon","","nzType","download","nzTheme","outline"],[1,"install-popover-content"],[1,"actions"],["nz-button","","nzType","default",3,"click"],["nz-button","","nzType","primary",3,"click"],[1,"modal-content"],[1,"warning-message","full-width"],[1,"manager-info"],["nz-icon","","nzType","database","nzTheme","outline"],[1,"current-version"],[1,"install-section"],[1,"manual-section"],[1,"section-header"],[1,"section-title"],[1,"hint-text"],[1,"command-list"],[1,"command-item"],[1,"command-label"],[1,"command-code"],["nz-button","","nzType","text","nzSize","small","nz-tooltip","","nzTooltipTitle","\u590D\u5236\u547D\u4EE4",3,"click"],["nz-icon","","nzType","copy","nzTheme","outline"],[1,"version-list-section"],[1,"error-message"],["nz-icon","","nzType","warning","nzTheme","outline"],[1,"status-section","success"],[1,"status-section","warning"],[1,"status-section","error"],[1,"status-section","info"],[1,"write-config-section"],[1,"status-info"],[1,"status-title"],[1,"status-desc"],["nz-button","","nzType","primary","nzSize","small","nz-tooltip","","nzTooltipTitle","\u5199\u5165 engines.node \u5230 package.json",3,"click"],["nz-icon","","nzType","edit","nzTheme","outline"],["nz-button","","nzType","default","nzSize","small","nz-tooltip","","nzTooltipTitle","\u4FEE\u6539 engines.node \u914D\u7F6E",3,"click"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nz-icon","","nzType","close","nzTheme","outline"],[1,"config-options"],[1,"option-group"],[1,"option-label"],["nzPlaceHolder","\u9009\u62E9\u63A8\u8350\u7248\u672C",1,"config-select",3,"ngModelChange","ngModel","nzOptions"],["nz-input","","placeholder","\u5982 >=18.0.0",1,"config-input",3,"ngModelChange","ngModel"],[1,"config-preview"],[1,"preview-label"],[1,"preview-code"],[1,"config-actions"],["nz-button","","nzType","primary",3,"click","nzLoading"],["nz-icon","","nzType","save","nzTheme","outline"],[1,"install-row"],["nz-input","","name","selectedInstallVersion","placeholder","\u8F93\u5165\u7248\u672C\u53F7 (\u5982 18.20.0)",1,"version-input",3,"ngModelChange","input","ngModel","nzAutocomplete"],[3,"nzValue"],["nz-button","","nzType","primary","nzSize","small",3,"click","nzLoading","disabled"],[3,"click","nzValue"],[3,"nzSpinning"],[1,"version-list"],[1,"version-tag",3,"active","clickable"],[1,"version-tag"],[1,"version-name",3,"click"],["nz-tooltip","","nzTooltipTitle","\u5220\u9664",1,"delete-btn"],[1,"active-badge"],["nz-tooltip","","nzTooltipTitle","\u5220\u9664",1,"delete-btn",3,"click"],["nz-icon","","nzType","close-circle","nzTheme","outline"]],template:function(e,i){if(e&1){let l=T();xe(0),g(1,ki,3,1),o(2,"span",3),c(3,"nz-icon",4),r(4),a(),o(5,"span",5),r(6),a(),g(7,Si,5,2),o(8,"button",6),C("click",function(){return b(l),z(i.refresh())}),c(9,"nz-icon",7),r(10,` \u5237\u65B0
|
|
2
2
|
`),a(),o(11,"button",8),C("click",function(){return b(l),z(i.openSettingsModal())}),c(12,"nz-icon",9),a(),G(13,Ui,27,9,"ng-template",null,0,re)}if(e&2){let l=Ce(i.nodeVersion.projectRequirement());s(),f(l?1:-1),s(3),h(" ",i.nodeVersion.currentVersion()||"\u68C0\u6D4B\u4E2D...",`
|
|
3
3
|
`),s(2),m(i.getManagerLabel()),s(),f(i.nodeVersion.manager()==="none"&&!i.nodeVersion.loading()?7:-1),s(),u("nzLoading",i.nodeVersion.loading())}},dependencies:[k,S,w,X,J,Y,ce,Ln,Bn,W,q,gn,pe,$e,Gn,Un,_e,zt,ee,Be,Le,je,me,En,An,bn,vn],styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.top-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;background:#f6ffed;border:1px solid #b7eb8f;border-radius:4px;font-size:13px;font-weight:500;color:#52c41a}.manager-badge[_ngcontent-%COMP%]{padding:2px 8px;font-size:11px;font-weight:500;border-radius:3px;background:#e6f7ff;color:#1890ff}.info-message[_ngcontent-%COMP%], .success-message[_ngcontent-%COMP%], .warning-message[_ngcontent-%COMP%], .error-message[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:8px;font-size:13px;padding:8px 0}.info-message[_ngcontent-%COMP%]{color:#1890ff}.success-message[_ngcontent-%COMP%]{color:#52c41a}.warning-message[_ngcontent-%COMP%]{color:#faad14}.error-message[_ngcontent-%COMP%]{color:#ff4d4f}.muted-text[_ngcontent-%COMP%]{color:#8c8c8c;font-size:13px;margin-right:12px}.version-list-container[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:16px 0 4px;border-top:1px solid #f0f0f0;margin-top:12px}.version-tag[_ngcontent-%COMP%]{padding:6px 8px;font-size:13px;border-radius:6px;background:#fafafa;color:#595959;border:1px solid #d9d9d9;transition:all .2s ease;display:inline-flex;align-items:center;gap:4px}.version-tag[_ngcontent-%COMP%] .version-name[_ngcontent-%COMP%]{padding:0 6px}.version-tag.clickable[_ngcontent-%COMP%]{cursor:pointer}.version-tag.clickable[_ngcontent-%COMP%]:hover{background:#e6f7ff;color:#1890ff;border-color:#91d5ff;transform:translateY(-1px);box-shadow:0 2px 4px #1890ff1a}.version-tag.active[_ngcontent-%COMP%]{background:#1890ff;color:#fff;border-color:#1890ff;font-weight:500;box-shadow:0 2px 6px #1890ff33}.version-tag[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{display:none;padding:2px;border-radius:3px;cursor:pointer;font-size:10px;color:#8c8c8c;transition:all .2s ease}.version-tag[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]:hover{color:#ff4d4f;background:#fff1f0}.version-tag[_ngcontent-%COMP%]:hover .delete-btn[_ngcontent-%COMP%]{display:inline-flex}.clickable[_ngcontent-%COMP%], .cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}.version-list[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}.install-section[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:12px;margin-top:8px;background:#fafafa;border-radius:6px;padding:12px}.install-section[_ngcontent-%COMP%] .muted-text[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0}.version-input[_ngcontent-%COMP%]{flex:1;min-width:180px;max-width:240px}.install-section[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.modal-content[_ngcontent-%COMP%]{padding:8px 0}.section-title[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:#262626}.status-section[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:12px;border-radius:8px;margin-bottom:12px}.status-section.success[_ngcontent-%COMP%]{background:#f6ffed;border:1px solid #b7eb8f}.status-section.success[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-title[_ngcontent-%COMP%]{color:#52c41a}.status-section.warning[_ngcontent-%COMP%]{background:#fffbe6;border:1px solid #ffe58f}.status-section.warning[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-title[_ngcontent-%COMP%]{color:#faad14}.status-section.error[_ngcontent-%COMP%]{background:#fff2f0;border:1px solid #ffccc7}.status-section.error[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-title[_ngcontent-%COMP%]{color:#ff4d4f}.status-section.info[_ngcontent-%COMP%]{background:#e6f7ff;border:1px solid #91d5ff}.status-section.info[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-title[_ngcontent-%COMP%]{color:#1890ff}.status-section[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.status-section[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.status-section[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-desc[_ngcontent-%COMP%]{font-size:12px;color:#8c8c8c}.manager-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f5f5f5;border-radius:6px;font-size:12px;color:#595959;margin-bottom:12px}.manager-info[_ngcontent-%COMP%] .current-version[_ngcontent-%COMP%]{margin-left:auto;color:#1890ff;font-weight:500}.install-section[_ngcontent-%COMP%]{background:#fafafa;border-radius:8px;padding:12px;margin-bottom:16px}.install-section[_ngcontent-%COMP%] .install-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.install-section[_ngcontent-%COMP%] .version-input[_ngcontent-%COMP%]{flex:1;min-width:160px}.manual-section[_ngcontent-%COMP%]{background:#f5f5f5;border-radius:8px;padding:12px;margin-bottom:16px}.manual-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.manual-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] .hint-text[_ngcontent-%COMP%]{font-size:11px;color:#8c8c8c}.manual-section[_ngcontent-%COMP%] .command-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.manual-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;background:#fff;padding:8px 12px;border-radius:6px;border:1px solid #e8e8e8}.manual-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-label[_ngcontent-%COMP%]{font-size:12px;color:#8c8c8c;width:40px}.manual-section[_ngcontent-%COMP%] .command-item[_ngcontent-%COMP%] .command-code[_ngcontent-%COMP%]{flex:1;font-size:12px;color:#1890ff;background:#e6f7ff;padding:4px 8px;border-radius:4px}.version-list-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{margin-bottom:12px}.version-list-section[_ngcontent-%COMP%] .version-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.version-list-section[_ngcontent-%COMP%] .version-tag[_ngcontent-%COMP%]{padding:6px 8px;font-size:13px;border-radius:6px;background:#fafafa;color:#595959;border:1px solid #d9d9d9;transition:all .2s ease;display:inline-flex;align-items:center;gap:6px}.version-list-section[_ngcontent-%COMP%] .version-tag.clickable[_ngcontent-%COMP%]{cursor:pointer}.version-list-section[_ngcontent-%COMP%] .version-tag.clickable[_ngcontent-%COMP%]:hover{background:#e6f7ff;color:#1890ff;border-color:#91d5ff}.version-list-section[_ngcontent-%COMP%] .version-tag.active[_ngcontent-%COMP%]{background:#1890ff;color:#fff;border-color:#1890ff}.version-list-section[_ngcontent-%COMP%] .version-tag[_ngcontent-%COMP%] .version-name[_ngcontent-%COMP%]{padding:0 4px}.version-list-section[_ngcontent-%COMP%] .version-tag[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{display:none;padding:2px;border-radius:3px;cursor:pointer;color:#8c8c8c}.version-list-section[_ngcontent-%COMP%] .version-tag[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]:hover{color:#ff4d4f;background:#fff1f0}.version-list-section[_ngcontent-%COMP%] .version-tag[_ngcontent-%COMP%] .active-badge[_ngcontent-%COMP%]{font-size:10px;padding:2px 6px;background:#ffffff4d;border-radius:3px}.version-list-section[_ngcontent-%COMP%] .version-tag[_ngcontent-%COMP%]:hover .delete-btn[_ngcontent-%COMP%]{display:inline-flex}.error-message[_ngcontent-%COMP%]{margin-top:12px}.full-width[_ngcontent-%COMP%]{width:100%}.write-config-section[_ngcontent-%COMP%]{background:#f0f5ff;border:1px solid #adc6ff;border-radius:8px;padding:16px;margin-top:12px}.write-config-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.write-config-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#1890ff}.write-config-section[_ngcontent-%COMP%] .config-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.write-config-section[_ngcontent-%COMP%] .config-options[_ngcontent-%COMP%] .option-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.write-config-section[_ngcontent-%COMP%] .config-options[_ngcontent-%COMP%] .option-group[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{font-size:13px;color:#595959;min-width:90px}.write-config-section[_ngcontent-%COMP%] .config-options[_ngcontent-%COMP%] .option-group[_ngcontent-%COMP%] .config-select[_ngcontent-%COMP%], .write-config-section[_ngcontent-%COMP%] .config-options[_ngcontent-%COMP%] .option-group[_ngcontent-%COMP%] .config-input[_ngcontent-%COMP%]{flex:1;max-width:200px}.write-config-section[_ngcontent-%COMP%] .config-preview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:12px;padding:8px 12px;background:#fff;border-radius:6px;border:1px solid #e8e8e8}.write-config-section[_ngcontent-%COMP%] .config-preview[_ngcontent-%COMP%] .preview-label[_ngcontent-%COMP%]{font-size:12px;color:#8c8c8c}.write-config-section[_ngcontent-%COMP%] .config-preview[_ngcontent-%COMP%] .preview-code[_ngcontent-%COMP%]{font-size:13px;color:#1890ff;font-family:Monaco,Menlo,monospace}.write-config-section[_ngcontent-%COMP%] .config-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.install-popover-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13px;color:#595959;line-height:1.6;margin:0 0 8px}.install-popover-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-of-type{margin-bottom:12px}.install-popover-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:8px;justify-content:flex-end}"],changeDetection:0})};function Gi(n,t){if(n&1&&(o(0,"div",8),r(1),a()),n&2){let e=p().$implicit;s(),m(e.message)}}function Qi(n,t){if(n&1&&(o(0,"div",9),r(1),a()),n&2){let e=p().$implicit;s(),m(e.error)}}function Ki(n,t){if(n&1&&(o(0,"pre",10),r(1),a()),n&2){let e=p().$implicit,i=p(2);s(),m(i.formatDiagnosticData(e.data))}}function Zi(n,t){if(n&1&&(o(0,"div",6)(1,"div",7)(2,"strong"),r(3),a(),o(4,"span"),r(5),a(),o(6,"nz-tag"),r(7),a()(),g(8,Gi,2,1,"div",8),g(9,Qi,2,1,"div",9),g(10,Ki,2,1,"pre",10),a()),n&2){let e=t.$implicit,i=p(2);H(i.diagnosticStatusClass(e.status)),s(3),m(e.analyzer),s(2),m(e.phase),s(2),m(i.diagnosticStatusLabel(e.status)),s(),f(e.message?8:-1),s(),f(e.error?9:-1),s(),f(e.data!==void 0?10:-1)}}function Yi(n,t){if(n&1&&(o(0,"div",3),M(1,Zi,11,8,"div",5,qt),a()),n&2){let e=p();s(),O(e.items)}}function Ji(n,t){n&1&&(o(0,"div",4),c(1,"nz-icon",11),r(2," \u6682\u65E0 analyzer \u8BCA\u65AD\u4FE1\u606F\u3002 "),a())}var fe=class n{items=[];open=!1;diagnosticStatusLabel(t){return{success:"\u6210\u529F",succeeded:"\u6210\u529F",supported:"\u652F\u6301",skipped:"\u8DF3\u8FC7",failed:"\u5931\u8D25","no-report":"\u65E0\u62A5\u544A"}[t]??t}diagnosticStatusClass(t){return t==="failed"?"failed":t==="skipped"||t==="no-report"?"skipped":"success"}formatDiagnosticData(t){try{return JSON.stringify(t,null,2)}catch{return String(t)}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-diagnostics"]],inputs:{items:"items",open:"open"},decls:10,vars:3,consts:[[1,"section","diagnostic-section"],[1,"diagnostic-details",3,"open"],["nzType","bug"],[1,"diagnostic-list"],[1,"hint"],[1,"diagnostic-item",3,"class"],[1,"diagnostic-item"],[1,"diagnostic-main"],[1,"diagnostic-message"],[1,"diagnostic-error"],[1,"diagnostic-data"],["nzType","info-circle"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"details",1)(2,"summary")(3,"span"),c(4,"nz-icon",2),r(5," \u5206\u6790\u8BCA\u65AD "),a(),o(6,"em"),r(7),a()(),g(8,Yi,3,0,"div",3)(9,Ji,3,0,"div",4),a()()),e&2&&(s(),u("open",i.open),s(6),h("",i.items.length," \u6761"),s(),f(i.items.length>0?8:9))},dependencies:[k,S,w,F,U],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.diagnostic-section[_ngcontent-%COMP%]{padding-bottom:8px}.diagnostic-details[_ngcontent-%COMP%]{border:1px solid #eef1f4}.diagnostic-details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;cursor:pointer;color:#536577;font-weight:600;list-style:none}.diagnostic-details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px}.diagnostic-details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:#8a99a8;font-size:12px;font-style:normal}.diagnostic-list[_ngcontent-%COMP%]{display:grid;gap:8px;padding:0 14px 14px}.diagnostic-item[_ngcontent-%COMP%]{border-left:3px solid #d9d9d9;padding:8px 10px}.diagnostic-item.success[_ngcontent-%COMP%]{border-left-color:#52c41a}.diagnostic-item.skipped[_ngcontent-%COMP%]{border-left-color:#bfbfbf}.diagnostic-item.failed[_ngcontent-%COMP%]{border-left-color:#ff4d4f}.diagnostic-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:12px}.diagnostic-main[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#26394d;font-size:13px}.diagnostic-main[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#8a99a8}.diagnostic-message[_ngcontent-%COMP%], .diagnostic-error[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;line-height:1.5;word-break:break-word}.diagnostic-error[_ngcontent-%COMP%]{color:#b42318}.diagnostic-data[_ngcontent-%COMP%]{margin-top:6px;padding:8px 10px;border-radius:6px;background:#f7f9fb;color:#8a99a8;font-size:11px;line-height:1.4;white-space:pre-wrap;word-break:break-word}"],changeDetection:0})};var Kn=(n,t)=>t.relativePath;function Xi(n,t){if(n&1&&(o(0,"div",25),r(1),a(),o(2,"div",26),r(3),y(4,"formatSize"),a()),n&2){let e=p().$implicit;s(),m(e.name),s(2),m(v(4,2,e.size))}}function eo(n,t){if(n&1&&(o(0,"div",24),y(1,"formatSize"),g(2,Xi,5,4),a()),n&2){let e=t.$implicit;ie("flex",e.colSpan)("background",e.color),u("nz-tooltip",e.relativePath+" ("+v(1,6,e.size)+")"),s(2),f(e.colSpan>3?2:-1)}}function to(n,t){if(n&1&&(o(0,"div",0)(1,"div",1),c(2,"nz-icon",13),o(3,"span"),r(4),a()(),o(5,"div",14),M(6,eo,3,8,"div",15,Kn),a(),o(8,"div",16)(9,"span",17),c(10,"span",18),r(11,"JS"),a(),o(12,"span",17),c(13,"span",19),r(14,"CSS"),a(),o(15,"span",17),c(16,"span",20),r(17,"HTML"),a(),o(18,"span",17),c(19,"span",21),r(20,"\u56FE\u7247"),a(),o(21,"span",17),c(22,"span",22),r(23,"\u5B57\u4F53"),a(),o(24,"span",17),c(25,"span",23),r(26,"\u5176\u4ED6"),a()()()),n&2){let e=p();s(4),h("\u4F53\u79EF\u5206\u5E03 (Top ",e.treemapCells.length,")"),s(2),O(e.treemapCells)}}function no(n,t){if(n&1&&(o(0,"div",4)(1,"div",27)(2,"nz-tag",28),c(3,"nz-icon",29),r(4),a(),o(5,"span",30),r(6),a()(),o(7,"div",31),r(8),y(9,"formatSize"),a(),c(10,"nz-progress",32),a()),n&2){let e=t.$implicit,i=p();s(2),u("nzColor",i.typeColor(e.type)),s(),u("nzType",i.typeIcon(e.type)),s(),h(" ",e.type," "),s(),u("title",e.relativePath),s(),m(e.relativePath),s(),H("size-"+i.sizeLevel(e.rawSize)),s(),m(v(9,11,e.rawSize)),s(2),u("nzPercent",(e.ratio||0)*100)("nzShowInfo",!1)("nzStrokeColor",i.typeColor(e.type))}}function io(n,t){if(n&1&&(o(0,"div",35)(1,"div",36),r(2),a(),o(3,"div",37)(4,"nz-tag",28),c(5,"nz-icon",29),r(6),a()(),o(7,"div",38),r(8),y(9,"formatSize"),a(),o(10,"div",38),r(11),y(12,"formatSize"),a(),o(13,"div",38),r(14),y(15,"formatRatio"),a(),o(16,"div",39),r(17),a()()),n&2){let e=t.$implicit,i=p(2);s(),u("title",e.name),s(),m(e.name),s(2),u("nzColor",i.typeColor(e.type)),s(),u("nzType",i.typeIcon(e.type)),s(),h(" ",e.type," "),s(),H("size-"+i.sizeLevel(e.rawSize)),s(),m(v(9,12,e.rawSize)),s(3),m(e.gzipSize==null?"-":v(12,14,e.gzipSize)),s(3),m(v(15,16,e.ratio)),s(2),u("title",e.relativePath),s(),m(e.relativePath)}}function oo(n,t){if(n&1&&(o(0,"cdk-virtual-scroll-viewport",33),G(1,io,18,18,"div",34),a()),n&2){let e=p();ie("height",e.assetViewportHeight,"px"),u("itemSize",40)("minBufferPx",400)("maxBufferPx",800),s(),u("cdkVirtualForOf",e.assets)("cdkVirtualForTrackBy",e.trackByAsset)}}function ao(n,t){if(n&1&&(o(0,"div",35)(1,"div",36),r(2),a(),o(3,"div",37)(4,"nz-tag",28),c(5,"nz-icon",29),r(6),a()(),o(7,"div",38),r(8),y(9,"formatSize"),a(),o(10,"div",38),r(11),y(12,"formatSize"),a(),o(13,"div",38),r(14),y(15,"formatRatio"),a(),o(16,"div",39),r(17),a()()),n&2){let e=t.$implicit,i=p(2);s(),u("title",e.name),s(),m(e.name),s(2),u("nzColor",i.typeColor(e.type)),s(),u("nzType",i.typeIcon(e.type)),s(),h(" ",e.type," "),s(),H("size-"+i.sizeLevel(e.rawSize)),s(),m(v(9,12,e.rawSize)),s(3),m(e.gzipSize==null?"-":v(12,14,e.gzipSize)),s(3),m(v(15,16,e.ratio)),s(2),u("title",e.relativePath),s(),m(e.relativePath)}}function so(n,t){if(n&1&&(o(0,"div",12),M(1,ao,18,18,"div",35,Ht().trackByAsset,!0),a()),n&2){let e=p();s(),O(e.assets)}}var Ye=class n{viewport;treemapCells=[];topAssets=[];assets=[];useVirtualAssetTable=!1;assetViewportHeight=80;typeColor=We;typeIcon=Mn;sizeLevel=Ue;ngAfterViewInit(){this.scheduleViewportCheck()}ngOnChanges(t){(t.assets||t.useVirtualAssetTable||t.assetViewportHeight)&&this.scheduleViewportCheck()}trackByAsset(t,e){return`${e.relativePath||e.name}:${t}`}scheduleViewportCheck(){queueMicrotask(()=>this.viewport?.checkViewportSize())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-assets"]],viewQuery:function(e,i){if(e&1&&Q(Fe,5),e&2){let l;j(l=$())&&(i.viewport=l.first)}},inputs:{treemapCells:"treemapCells",topAssets:"topAssets",assets:"assets",useVirtualAssetTable:"useVirtualAssetTable",assetViewportHeight:"assetViewportHeight"},features:[ae],decls:32,vars:5,consts:[[1,"section"],[1,"section-title"],["nzType","ordered-list"],[1,"top-list"],[1,"top-row"],[1,"section","table-section"],["nzType","table"],[1,"section-count"],["role","table","aria-label","\u6587\u4EF6\u660E\u7EC6",1,"asset-table"],["role","row",1,"asset-row","asset-head"],["role","columnheader"],[1,"asset-body",3,"itemSize","minBufferPx","maxBufferPx","height"],[1,"asset-body","asset-body-plain"],["nzType","appstore"],[1,"treemap"],[1,"treemap-cell",3,"flex","background","nz-tooltip"],[1,"treemap-legend"],[1,"legend-item"],[1,"dot",2,"background","#1677ff"],[1,"dot",2,"background","#52c41a"],[1,"dot",2,"background","#722ed1"],[1,"dot",2,"background","#fa8c16"],[1,"dot",2,"background","#13c2c2"],[1,"dot",2,"background","#8c8c8c"],[1,"treemap-cell",3,"nz-tooltip"],[1,"treemap-name"],[1,"treemap-size"],[1,"top-name"],[3,"nzColor"],[3,"nzType"],[3,"title"],[1,"top-size"],[3,"nzPercent","nzShowInfo","nzStrokeColor"],[1,"asset-body",3,"itemSize","minBufferPx","maxBufferPx"],["class","asset-row","role","row",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],["role","row",1,"asset-row"],["role","cell",1,"asset-name",3,"title"],["role","cell"],["role","cell",1,"asset-size"],["role","cell",1,"asset-path",3,"title"]],template:function(e,i){e&1&&(g(0,to,27,1,"div",0),o(1,"div",0)(2,"div",1),c(3,"nz-icon",2),o(4,"span"),r(5,"\u6700\u5927\u6587\u4EF6"),a()(),o(6,"div",3),M(7,no,11,13,"div",4,Kn),a()(),o(9,"div",5)(10,"div",1),c(11,"nz-icon",6),o(12,"span"),r(13,"\u6587\u4EF6\u660E\u7EC6"),a(),o(14,"span",7),r(15),a()(),o(16,"div",8)(17,"div",9)(18,"div",10),r(19,"\u6587\u4EF6\u540D"),a(),o(20,"div",10),r(21,"\u7C7B\u578B"),a(),o(22,"div",10),r(23,"Raw Size"),a(),o(24,"div",10),r(25,"Gzip Size"),a(),o(26,"div",10),r(27,"\u5360\u6BD4"),a(),o(28,"div",10),r(29,"\u8DEF\u5F84"),a()(),g(30,oo,2,7,"cdk-virtual-scroll-viewport",11)(31,so,3,0,"div",12),a()()),e&2&&(f(i.treemapCells.length>0?0:-1),s(7),O(i.topAssets),s(8),h("",i.assets.length," \u4E2A\u6587\u4EF6"),s(),D("has-scrollbar",i.useVirtualAssetTable||i.assets.length>9),s(14),f(i.useVirtualAssetTable?30:31))},dependencies:[k,S,w,F,U,Ke,$n,W,q,nn,en,tn,Fe,te,zn],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.treemap[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2px;border-radius:6px;overflow:hidden;min-height:80px}.treemap-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:30px;height:64px;padding:4px 6px;border-radius:3px;overflow:hidden;cursor:default;transition:opacity .2s;position:relative}.treemap-cell[_ngcontent-%COMP%]:hover{opacity:.85}.treemap-name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.treemap-size[_ngcontent-%COMP%]{font-size:9px;color:#ffffffd9;text-align:center}.treemap-legend[_ngcontent-%COMP%]{display:flex;gap:14px;margin-top:8px;font-size:12px;color:#7a8a99}.legend-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.dot[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:2px}.top-list[_ngcontent-%COMP%]{display:grid;gap:8px}.top-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 88px 180px;align-items:center;gap:12px}.top-name[_ngcontent-%COMP%]{min-width:0;display:flex;align-items:center;gap:8px}.top-name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-size[_ngcontent-%COMP%]{color:#26394d;text-align:right;font-variant-numeric:tabular-nums;font-weight:500}.top-size.size-good[_ngcontent-%COMP%]{color:#52c41a}.top-size.size-warning[_ngcontent-%COMP%]{color:#faad14}.top-size.size-danger[_ngcontent-%COMP%]{color:#ff4d4f}.table-section[_ngcontent-%COMP%]{flex:1 1 auto;min-height:200px}.asset-table[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;overflow:hidden;min-width:0}.asset-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(160px,1.2fr) 92px 96px 96px 72px minmax(220px,1.6fr);gap:12px;align-items:center;box-sizing:border-box;height:40px;min-height:40px;padding:0 12px;border-top:1px solid #f3f5f7;color:#34495e;font-size:13px}.asset-head[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;border-top:0;background:#f8fafc;color:#697a8c;font-size:12px;font-weight:600}.asset-table.has-scrollbar[_ngcontent-%COMP%] .asset-head[_ngcontent-%COMP%]{padding-right:29px}.asset-body[_ngcontent-%COMP%]{display:block;width:100%;overflow:auto}.asset-body-plain[_ngcontent-%COMP%]{max-height:360px}.asset-body[_ngcontent-%COMP%] .asset-row[_ngcontent-%COMP%]:hover{background:#fbfdff}.asset-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-width:0}.asset-row[_ngcontent-%COMP%] nz-tag[_ngcontent-%COMP%]{line-height:20px;margin-right:0}.asset-name[_ngcontent-%COMP%], .asset-path[_ngcontent-%COMP%]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.asset-path[_ngcontent-%COMP%]{color:#6f7f8f}.asset-size[_ngcontent-%COMP%]{text-align:left;font-variant-numeric:tabular-nums}.asset-size.size-good[_ngcontent-%COMP%]{color:#52c41a}.asset-size.size-warning[_ngcontent-%COMP%]{color:#faad14}.asset-size.size-danger[_ngcontent-%COMP%]{color:#ff4d4f}@media (max-width: 1100px){.asset-table[_ngcontent-%COMP%]{overflow-x:auto}.asset-row[_ngcontent-%COMP%]{min-width:920px}}@media (max-width: 900px){.top-row[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) 80px}.top-row[_ngcontent-%COMP%] nz-progress[_ngcontent-%COMP%]{grid-column:1 / -1}}"],changeDetection:0})};var ro=(n,t)=>t.label,lo=(n,t)=>t.runId;function co(n,t){if(n&1&&(o(0,"div",6)(1,"span"),r(2),a(),o(3,"strong"),r(4),a()()),n&2){let e=t.$implicit;s(2),m(e.label),s(),H(e.className),s(),m(e.value)}}function po(n,t){if(n&1&&(o(0,"div",11)(1,"div",12),r(2),y(3,"formatTime"),a(),o(4,"div",12),r(5),y(6,"formatSize"),a(),o(7,"div",12),r(8),y(9,"formatSize"),a(),o(10,"div",12),r(11),y(12,"formatSize"),a(),o(13,"div",12),r(14),y(15,"formatSize"),a(),o(16,"div",12),r(17),y(18,"formatSize"),a(),o(19,"div",12),r(20),y(21,"formatMs"),a()()),n&2){let e=t.$implicit,i=p(2);D("current",e.runId===i.currentRunId),s(2),m(v(3,9,e.createdAt)),s(3),m(v(6,11,e.totalRawSize)),s(3),m(v(9,13,e.totalGzipSize)),s(3),m(e.totalBrotliSize?v(12,15,e.totalBrotliSize):"-"),s(3),m(v(15,17,e.jsRawSize)),s(3),m(v(18,19,e.cssRawSize)),s(3),m(v(21,21,e.durationMs))}}function mo(n,t){if(n&1&&(o(0,"div",5),M(1,co,5,4,"div",6,ro),a(),o(3,"div",7)(4,"div",8)(5,"div",9),r(6,"\u6784\u5EFA\u65F6\u95F4"),a(),o(7,"div",9),r(8,"Raw Size"),a(),o(9,"div",9),r(10,"Gzip Size"),a(),o(11,"div",9),r(12,"Brotli Size"),a(),o(13,"div",9),r(14,"JS Size"),a(),o(15,"div",9),r(16,"CSS Size"),a(),o(17,"div",9),r(18,"Duration"),a()(),M(19,po,22,23,"div",10,lo),a()),n&2){let e=p();s(),O(e.historyDeltaItems),s(18),O(e.historyRows)}}function uo(n,t){if(n&1&&(o(0,"div",4),c(1,"nz-icon",13),r(2),a()),n&2){let e=p();s(2),h(" ",e.historyError||"\u6682\u65E0\u5386\u53F2\u6784\u5EFA\u8BB0\u5F55\u3002"," ")}}var Je=class n{currentRunId="";historyRows=[];historyDeltaItems=[];historyError="";static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-history"]],inputs:{currentRunId:"currentRunId",historyRows:"historyRows",historyDeltaItems:"historyDeltaItems",historyError:"historyError"},decls:9,vars:2,consts:[[1,"section"],[1,"section-title"],["nzType","line-chart"],[1,"section-count"],[1,"hint"],[1,"history-delta-grid"],[1,"history-delta-card"],["role","table","aria-label","\u5386\u53F2\u8D8B\u52BF",1,"history-table"],["role","row",1,"history-row","history-head"],["role","columnheader"],["role","row",1,"history-row",3,"current"],["role","row",1,"history-row"],["role","cell"],["nzType","info-circle"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1),c(2,"nz-icon",2),o(3,"span"),r(4,"\u5386\u53F2\u8D8B\u52BF"),a(),o(5,"span",3),r(6),a()(),g(7,mo,21,0)(8,uo,3,1,"div",4),a()),e&2&&(s(6),h("\u6700\u8FD1 ",i.historyRows.length," \u6B21"),s(),f(i.historyRows.length>0?7:8))},dependencies:[k,S,w,te,He,qe],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.history-table[_ngcontent-%COMP%]{border:1px solid #eef1f4;overflow:hidden;border-radius:8px}.history-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(120px,1.2fr) repeat(6,minmax(80px,1fr));gap:8px;padding:8px 10px;border-top:1px solid #f3f5f7;font-size:12px}.history-head[_ngcontent-%COMP%]{border-top:0;background:#f8fafc;color:#697a8c;font-weight:600}.history-row.current[_ngcontent-%COMP%]{background:#f6fbff}.history-delta-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:10px}.history-delta-card[_ngcontent-%COMP%]{padding:8px 10px;background:#fafbfc}.history-delta-card[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#7a8a99;font-size:12px}.history-delta-card[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.history-delta-card[_ngcontent-%COMP%] strong.up[_ngcontent-%COMP%]{color:#ff4d4f}.history-delta-card[_ngcontent-%COMP%] strong.down[_ngcontent-%COMP%]{color:#52c41a}.history-delta-card[_ngcontent-%COMP%] strong.neutral[_ngcontent-%COMP%]{color:#536577}@media (max-width: 900px){.history-delta-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"],changeDetection:0})};var go=(n,t)=>t.category,fo=(n,t)=>t.code+":"+t.message;function ho(n,t){n&1&&c(0,"nz-icon",11)}function xo(n,t){n&1&&c(0,"nz-icon",12)}function Co(n,t){if(n&1&&(o(0,"div",9)(1,"div",10),g(2,ho,1,0,"nz-icon",11)(3,xo,1,0,"nz-icon",12),a(),o(4,"div",13)(5,"span"),r(6),a()()()),n&2){let e=t.$implicit;D("warning",e.level==="warning")("info",e.level==="info"),s(2),f(e.level==="warning"?2:3),s(4),m(e.message)}}function _o(n,t){if(n&1&&(o(0,"div",5)(1,"div",6)(2,"span"),r(3),a(),o(4,"em"),r(5),a()(),o(6,"div",7),M(7,Co,7,6,"div",8,fo),a()()),n&2){let e=t.$implicit;H("category-"+e.category),s(3),m(e.label),s(2),m(e.items.length),s(2),O(e.items)}}function yo(n,t){if(n&1&&(o(0,"div",0)(1,"div",1),c(2,"nz-icon",2),o(3,"span"),r(4,"\u6784\u5EFA\u63D0\u793A"),a()(),o(5,"div",3),M(6,_o,9,4,"div",4,go),a()()),n&2){let e=p();s(6),O(e.insightGroups)}}var Xe=class n{insightGroups=[];static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-insights"]],inputs:{insightGroups:"insightGroups"},decls:1,vars:1,consts:[[1,"section"],[1,"section-title"],["nzType","bulb"],[1,"insight-groups"],[1,"insight-group",3,"class"],[1,"insight-group"],[1,"insight-group-title"],[1,"insight-list"],[1,"insight",3,"warning","info"],[1,"insight"],[1,"insight-icon"],["nzType","exclamation-circle",2,"color","#fa8c16"],["nzType","info-circle",2,"color","#1677ff"],[1,"insight-body"]],template:function(e,i){e&1&&g(0,yo,8,0,"div",0),e&2&&f(i.insightGroups.length>0?0:-1)},dependencies:[k,S,w],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.insight-list[_ngcontent-%COMP%]{display:grid;gap:8px}.insight-groups[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.insight-group[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0}.insight-group-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;color:#26394d;font-size:13px;font-weight:600}.insight-group-title[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{min-width:20px;height:20px;line-height:20px;border-radius:10px;background:#f0f3f6;color:#6f7f8f;font-style:normal;font-size:12px;text-align:center}.insight[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:flex-start;border:1px solid #dce9f7;background:#f7fbff;border-radius:8px;padding:10px 12px;color:#31506f}.insight.warning[_ngcontent-%COMP%]{border-color:#ffe1b5;background:#fff9f0;color:#7a4d11}.insight-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:16px;margin-top:1px}.insight-body[_ngcontent-%COMP%]{flex:1;min-width:0}.insight-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px;line-height:1.5}@media (max-width: 900px){.insight-groups[_ngcontent-%COMP%]{grid-template-columns:1fr}}"],changeDetection:0})};var Zn=(n,t)=>t.name,vo=(n,t)=>t.path||t.name;function bo(n,t){n&1&&(o(0,"nz-tag",14),r(1,"initial"),a())}function zo(n,t){n&1&&(o(0,"nz-tag",15),r(1,"entry"),a())}function Mo(n,t){if(n&1&&(o(0,"div",9)(1,"div",12)(2,"span",13),r(3),a(),g(4,bo,2,0,"nz-tag",14),g(5,zo,2,0,"nz-tag",15),a(),o(6,"strong"),r(7),y(8,"formatSize"),a()()),n&2){let e=t.$implicit;s(2),u("title",e.name),s(),m(e.name),s(),f(e.initial?4:-1),s(),f(e.entry?5:-1),s(2),m(v(8,5,e.rawSize))}}function Oo(n,t){if(n&1&&(o(0,"div",9)(1,"span",13),r(2),a(),o(3,"strong"),r(4),y(5,"formatSize"),a()()),n&2){let e=t.$implicit;s(),u("title",e.name),s(),m(e.name),s(2),m(v(5,3,e.rawSize))}}function Po(n,t){if(n&1&&(o(0,"div",9)(1,"span",13),r(2),a(),o(3,"strong"),r(4),y(5,"formatSize"),a()()),n&2){let e=t.$implicit;s(),u("title",e.packageName||e.name),s(),m(e.packageName||e.name),s(2),m(v(5,3,e.rawSize))}}function ko(n,t){if(n&1&&(o(0,"div",0)(1,"div",1),c(2,"nz-icon",2),o(3,"span"),r(4,"Stats \u5206\u6790"),a()(),o(5,"div",3)(6,"nz-tag"),r(7),a(),o(8,"span",4),r(9),a()(),o(10,"div",5)(11,"div",6)(12,"div",7),c(13,"nz-icon",8),r(14," Chunk Top "),a(),M(15,Mo,9,7,"div",9,Zn),a(),o(17,"div",6)(18,"div",7),c(19,"nz-icon",10),r(20," \u4F9D\u8D56 Top "),a(),M(21,Oo,6,5,"div",9,Zn),a(),o(23,"div",6)(24,"div",7),c(25,"nz-icon",11),r(26," \u6A21\u5757 Top "),a(),M(27,Po,6,5,"div",9,vo),a()()()),n&2){let e=p();s(7),m(e.report.stats.format),s(2),m(e.report.stats.statsPath),s(6),O(e.statsChunks),s(6),O(e.statsDependencies),s(6),O(e.statsModules)}}var et=class n{report;statsChunks=[];statsDependencies=[];statsModules=[];static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-stats"]],inputs:{report:"report",statsChunks:"statsChunks",statsDependencies:"statsDependencies",statsModules:"statsModules"},decls:1,vars:1,consts:[[1,"section","stats-section"],[1,"section-title"],["nzType","deployment-unit"],[1,"stats-meta"],[1,"stats-path"],[1,"stats-grid"],[1,"stats-card"],[1,"stats-card-title"],["nzType","block"],[1,"stats-row"],["nzType","apartment"],["nzType","node-index"],[1,"stats-row-name"],[3,"title"],["nzColor","blue",1,"mini-tag"],["nzColor","purple",1,"mini-tag"]],template:function(e,i){e&1&&g(0,ko,29,2,"div",0),e&2&&f(i.report.stats?0:-1)},dependencies:[k,S,w,F,U,te],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.stats-section[_ngcontent-%COMP%]{display:grid;gap:12px}.stats-meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-width:0;color:#7a8a99;font-size:12px}.stats-path[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stats-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.stats-card[_ngcontent-%COMP%]{min-width:0;border:1px solid #eef1f4;border-radius:8px;padding:12px}.stats-card-title[_ngcontent-%COMP%]{color:#536577;font-weight:600;margin-bottom:10px;display:flex;align-items:center;gap:6px}.stats-card-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.stats-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:8px;align-items:center;padding:5px 0;border-top:1px solid #f3f5f7}.stats-row-name[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;min-width:0}.stats-row-name[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mini-tag[_ngcontent-%COMP%]{font-size:10px;line-height:16px;padding:0 4px;margin-left:4px}.stats-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#34495e}.stats-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{text-align:right;font-weight:500;font-variant-numeric:tabular-nums}@media (max-width: 900px){.stats-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"],changeDetection:0})};function wo(n,t){if(n&1&&(o(0,"div",12)(1,"div",13),c(2,"nz-icon",14),a(),o(3,"div",4)(4,"span"),r(5,"Brotli"),a(),o(6,"strong"),r(7),y(8,"formatSize"),a(),o(9,"div",8),r(10),a()()()),n&2){let e=p();s(7),m(v(8,2,e.report.summary.totalBrotliSize)),s(3),h("\u8282\u7701 ",e.brotliSavingsPercent)}}function So(n,t){if(n&1&&(o(0,"span"),r(1),a()),n&2){let e=p(2);s(),h("JS ",((e.report.summary.jsRawSize||0)/e.report.summary.totalRawSize*100).toFixed(0),"%")}}function To(n,t){if(n&1&&(o(0,"span"),r(1),a()),n&2){let e=p(2);s(),h("CSS ",((e.report.summary.cssRawSize||0)/e.report.summary.totalRawSize*100).toFixed(0),"%")}}function Eo(n,t){if(n&1&&(o(0,"span"),r(1),a()),n&2){let e=p(2);s(),h("\u8D44\u6E90 ",((e.report.summary.assetRawSize||0)/e.report.summary.totalRawSize*100).toFixed(0),"%")}}function Do(n,t){if(n&1&&(o(0,"div",16)(1,"div",17)(2,"div",18),g(3,So,2,1,"span"),a(),o(4,"div",19),g(5,To,2,1,"span"),a(),o(6,"div",20),g(7,Eo,2,1,"span"),a()()()),n&2){let e=p();s(2),ie("flex",e.report.summary.jsRawSize||0),s(),f((e.report.summary.jsRawSize||0)/e.report.summary.totalRawSize*100>3?3:-1),s(),ie("flex",e.report.summary.cssRawSize||0),s(),f((e.report.summary.cssRawSize||0)/e.report.summary.totalRawSize*100>3?5:-1),s(),ie("flex",e.report.summary.assetRawSize||0),s(),f((e.report.summary.assetRawSize||0)/e.report.summary.totalRawSize*100>3?7:-1)}}var tt=class n{report;sizeLevel=Ue;get gzipSavingsPercent(){let t=this.report?.summary;return!t?.totalRawSize||!t?.totalGzipSize?"0%":`${((t.totalRawSize-t.totalGzipSize)/t.totalRawSize*100).toFixed(1)}%`}get brotliSavingsPercent(){let t=this.report?.summary;return!t?.totalRawSize||!t?.totalBrotliSize?"0%":`${((t.totalRawSize-t.totalBrotliSize)/t.totalRawSize*100).toFixed(1)}%`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-summary"]],inputs:{report:"report"},decls:53,vars:24,consts:[[1,"summary-grid"],[1,"metric"],[1,"metric-icon"],["nzType","database"],[1,"metric-body"],[1,"metric","accent-blue"],[1,"metric-icon",2,"color","#1677ff"],["nzType","code"],[1,"metric-tag"],[1,"metric","accent-green"],[1,"metric-icon",2,"color","#52c41a"],["nzType","bg-colors"],[1,"metric","metric-default"],[1,"metric-icon","compress"],["nzType","compress"],["nzType","file"],[1,"size-bar-section"],[1,"size-bar"],[1,"size-bar-seg","js"],[1,"size-bar-seg","css"],[1,"size-bar-seg","asset"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-icon",3),a(),o(4,"div",4)(5,"span"),r(6,"\u603B\u4F53\u79EF"),a(),o(7,"strong"),r(8),y(9,"formatSize"),a()()(),o(10,"div",5)(11,"div",6),c(12,"nz-icon",7),a(),o(13,"div",4)(14,"span"),r(15,"JS"),a(),o(16,"strong"),r(17),y(18,"formatSize"),a(),o(19,"div",8),r(20),a()()(),o(21,"div",9)(22,"div",10),c(23,"nz-icon",11),a(),o(24,"div",4)(25,"span"),r(26,"CSS"),a(),o(27,"strong"),r(28),y(29,"formatSize"),a(),o(30,"div",8),r(31),a()()(),o(32,"div",12)(33,"div",13),c(34,"nz-icon",14),a(),o(35,"div",4)(36,"span"),r(37,"Gzip"),a(),o(38,"strong"),r(39),y(40,"formatSize"),a(),o(41,"div",8),r(42),a()()(),g(43,wo,11,4,"div",12),o(44,"div",12)(45,"div",2),c(46,"nz-icon",15),a(),o(47,"div",4)(48,"span"),r(49,"\u6587\u4EF6\u6570"),a(),o(50,"strong"),r(51),a()()()(),g(52,Do,8,9,"div",16)),e&2&&(s(),D("metric-good",i.sizeLevel(i.report.summary.totalRawSize)==="good")("metric-warn",i.sizeLevel(i.report.summary.totalRawSize)==="warning")("metric-danger",i.sizeLevel(i.report.summary.totalRawSize)==="danger"),s(7),m(v(9,16,i.report.summary.totalRawSize)),s(9),m(v(18,18,i.report.summary.jsRawSize)),s(3),h("",i.report.summary.jsFileCount||0," \u4E2A\u6587\u4EF6"),s(8),m(v(29,20,i.report.summary.cssRawSize)),s(3),h("",i.report.summary.cssFileCount||0," \u4E2A\u6587\u4EF6"),s(8),m(v(40,22,i.report.summary.totalGzipSize)),s(3),h("\u8282\u7701 ",i.gzipSavingsPercent),s(),f((i.report.summary.totalBrotliSize||0)>0?43:-1),s(8),m(i.report.summary.fileCount),s(),f(i.report.summary.totalRawSize?52:-1))},dependencies:[k,S,w,te],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.size-bar-section[_ngcontent-%COMP%]{flex:0 0 auto;padding-top:16px}.size-bar[_ngcontent-%COMP%]{display:flex;height:28px;border-radius:6px;overflow:hidden;background:#f0f2f5}.size-bar-seg[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:0;color:#fff;font-size:11px;font-weight:600;transition:flex .3s;overflow:hidden}.size-bar-seg[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{white-space:nowrap;padding:0 6px}.size-bar-seg.js[_ngcontent-%COMP%]{background:#1677ff}.size-bar-seg.css[_ngcontent-%COMP%]{background:#52c41a}.size-bar-seg.asset[_ngcontent-%COMP%]{background:#fa8c16}"],changeDetection:0})};var nt=class n{report;topAssets=[];assets=[];insightGroups=[];historyRows=[];historyDeltaItems=[];historyError="";treemapCells=[];statsChunks=[];statsDependencies=[];statsModules=[];useVirtualAssetTable=!1;assetViewportHeight=80;diagnosticInsights=[];static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-report"]],inputs:{report:"report",topAssets:"topAssets",assets:"assets",insightGroups:"insightGroups",historyRows:"historyRows",historyDeltaItems:"historyDeltaItems",historyError:"historyError",treemapCells:"treemapCells",statsChunks:"statsChunks",statsDependencies:"statsDependencies",statsModules:"statsModules",useVirtualAssetTable:"useVirtualAssetTable",assetViewportHeight:"assetViewportHeight",diagnosticInsights:"diagnosticInsights"},decls:6,vars:16,consts:[[3,"report"],[3,"insightGroups"],[3,"report","statsChunks","statsDependencies","statsModules"],[3,"treemapCells","topAssets","assets","useVirtualAssetTable","assetViewportHeight"],[3,"currentRunId","historyRows","historyDeltaItems","historyError"],[3,"items"]],template:function(e,i){e&1&&c(0,"app-task-analysis-summary",0)(1,"app-task-analysis-insights",1)(2,"app-task-analysis-stats",2)(3,"app-task-analysis-assets",3)(4,"app-task-analysis-history",4)(5,"app-task-analysis-diagnostics",5),e&2&&(u("report",i.report),s(),u("insightGroups",i.insightGroups),s(),u("report",i.report)("statsChunks",i.statsChunks)("statsDependencies",i.statsDependencies)("statsModules",i.statsModules),s(),u("treemapCells",i.treemapCells)("topAssets",i.topAssets)("assets",i.assets)("useVirtualAssetTable",i.useVirtualAssetTable)("assetViewportHeight",i.assetViewportHeight),s(),u("currentRunId",i.report.runId)("historyRows",i.historyRows)("historyDeltaItems",i.historyDeltaItems)("historyError",i.historyError),s(),u("items",i.diagnosticInsights))},dependencies:[k,tt,Xe,Je,Ye,et,fe],encapsulation:2,changeDetection:0})};function Io(n,t){if(n&1){let e=T();o(0,"div",19)(1,"a",20),c(2,"nz-icon",21),r(3),a(),o(4,"button",22),C("click",function(){let l=b(e).$implicit,d=p(2);return z(d.copyUrl(l))}),c(5,"nz-icon",23),a()()}if(n&2){let e=t.$implicit,i=p(2);s(),u("href",e,Pe),s(2),h(" ",e," "),s(),u("nz-tooltip",i.copiedUrl===e?"\u5DF2\u590D\u5236":"\u590D\u5236"),s(),u("nzType",i.copiedUrl===e?"check":"copy")}}function Ao(n,t){if(n&1&&(o(0,"div",15),M(1,Io,6,4,"div",19,ne),a()),n&2){let e=p();s(),O(e.runtimeUrls)}}function Vo(n,t){n&1&&(o(0,"div",16),c(1,"nz-icon",3),r(2," \u5C1A\u672A\u4ECE\u8F93\u51FA\u65E5\u5FD7\u4E2D\u8BC6\u522B\u5230 dev server \u5730\u5740\u3002 "),a())}var it=class n{clipboard=x(ue);runtimeSnapshot=null;runtimeUrls=[];copiedUrl="";copyUrl(t){this.clipboard.copy(t)&&(this.copiedUrl=t,setTimeout(()=>{this.copiedUrl===t&&(this.copiedUrl="")},2e3))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis-runtime"]],inputs:{runtimeSnapshot:"runtimeSnapshot",runtimeUrls:"runtimeUrls"},decls:64,vars:11,consts:[[1,"summary-grid"],[1,"metric"],[1,"metric-icon"],["nzType","info-circle"],[1,"metric-body"],[3,"nzColor"],["nzType","check-circle"],["nzType","reload"],[1,"metric-icon",2,"color","#faad14"],["nzType","warning"],[1,"metric-icon",2,"color","#ff4d4f"],["nzType","close-circle"],[1,"section"],[1,"section-title"],["nzType","link"],[1,"url-list"],[1,"hint"],["nzType","bulb"],[1,"hint-box"],[1,"url-item"],["target","_blank","rel","noopener noreferrer",3,"href"],["nzType","global"],[1,"copy-btn",3,"click","nz-tooltip"],[3,"nzType"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-icon",3),a(),o(4,"div",4)(5,"span"),r(6,"\u72B6\u6001"),a(),o(7,"strong")(8,"nz-tag",5),r(9),a()()()(),o(10,"div",1)(11,"div",2),c(12,"nz-icon",6),a(),o(13,"div",4)(14,"span"),r(15,"Ready"),a(),o(16,"strong"),r(17),y(18,"formatTime"),a()()(),o(19,"div",1)(20,"div",2),c(21,"nz-icon",7),a(),o(22,"div",4)(23,"span"),r(24,"\u6700\u8FD1\u7F16\u8BD1"),a(),o(25,"strong"),r(26),y(27,"formatMs"),a()()(),o(28,"div",1)(29,"div",8),c(30,"nz-icon",9),a(),o(31,"div",4)(32,"span"),r(33,"Warnings"),a(),o(34,"strong"),r(35),a()()(),o(36,"div",1)(37,"div",10),c(38,"nz-icon",11),a(),o(39,"div",4)(40,"span"),r(41,"Errors"),a(),o(42,"strong"),r(43),a()()()(),o(44,"div",12)(45,"div",13),c(46,"nz-icon",14),o(47,"span"),r(48,"\u8BBF\u95EE\u5730\u5740"),a()(),g(49,Ao,3,0,"div",15)(50,Vo,3,0,"div",16),a(),o(51,"div",12)(52,"div",13),c(53,"nz-icon",17),o(54,"span"),r(55,"\u8BF4\u660E"),a()(),o(56,"div",18)(57,"p"),r(58,"serve \u5206\u6790\u5173\u6CE8 dev-server \u8FD0\u884C\u72B6\u6001\u3001\u8BBF\u95EE\u5730\u5740\u3001\u589E\u91CF\u7F16\u8BD1\u8017\u65F6\u548C warning/error\u3002"),a(),o(59,"p"),r(60,"\u5982\u679C serve \u94FE\u8DEF\u4EA7\u51FA\u4E86 "),o(61,"code"),r(62,"stats.json"),a(),r(63," \u6216 visualizer \u62A5\u544A\uFF0C\u4E5F\u53EF\u4EE5\u63A5\u5165 analyzer \u5C55\u793A\uFF1B\u9ED8\u8BA4 Angular dev-server \u4E0D\u4F1A\u843D\u76D8 bundle \u4F53\u79EF\u62A5\u544A\u3002"),a()()()),e&2&&(s(8),u("nzColor",(i.runtimeSnapshot==null?null:i.runtimeSnapshot.status)==="running"?"processing":(i.runtimeSnapshot==null?null:i.runtimeSnapshot.status)==="success"?"success":(i.runtimeSnapshot==null?null:i.runtimeSnapshot.status)==="failed"?"error":"default"),s(),h(" ",(i.runtimeSnapshot==null?null:i.runtimeSnapshot.status)||"-"," "),s(8),m(v(18,7,i.runtimeSnapshot==null?null:i.runtimeSnapshot.readyAt)),s(9),m(v(27,9,i.runtimeSnapshot==null?null:i.runtimeSnapshot.rebuildDurationMs)),s(9),m((i.runtimeSnapshot==null?null:i.runtimeSnapshot.warningsCount)||0),s(8),m((i.runtimeSnapshot==null?null:i.runtimeSnapshot.errorsCount)||0),s(6),f(i.runtimeUrls.length>0?49:50))},dependencies:[k,S,w,F,U,W,q,ge,He,qe],styles:[".summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:12px;flex:0 0 auto}.metric[_ngcontent-%COMP%]{border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;display:flex;gap:10px;align-items:flex-start;transition:box-shadow .2s}.metric[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.metric-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:18px;color:#7a8a99;margin-top:2px}.metric-icon.compress[_ngcontent-%COMP%]{color:#52c41a}.metric-body[_ngcontent-%COMP%]{flex:1;min-width:0}.metric-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#7a8a99;font-size:12px}.metric-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:#26394d;font-size:18px;font-weight:600}.metric-tag[_ngcontent-%COMP%]{margin-top:4px;font-size:11px;color:#7a8a99}.metric.metric-good[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-warn[_ngcontent-%COMP%]{border-top:3px solid #faad14}.metric.metric-danger[_ngcontent-%COMP%]{border-top:3px solid #ff4d4f}.metric.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.metric.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.metric.metric-default[_ngcontent-%COMP%]{border-top:3px solid #d9d9d9}.section[_ngcontent-%COMP%]{border-top:1px solid #edf1f5;padding-top:16px;flex:0 0 auto}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#536577;font-weight:600;font-size:14px}.section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.section-count[_ngcontent-%COMP%]{margin-left:auto;color:#8a99a8;font-size:12px;font-weight:400}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9e8ff;background:#f6fbff;border-radius:6px;padding:6px 12px;color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;transition:all .2s;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6f4ff;border-color:#91caff}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.hint[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;display:flex;align-items:center;gap:6px}.hint-box[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:12px 16px;color:#536577;font-size:13px;line-height:1.6}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 4px}.hint-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.hint-box[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#e8edf2;padding:2px 6px;border-radius:4px;font-size:12px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media (max-width: 900px){.summary-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}"],changeDetection:0})};var be=class n{_taskId=A("");_taskKind=A(void 0);report=A(null);diagnostics=A([]);history=A([]);historyError=A("");runtimeSnapshot=A(null);loading=A(!1);analyzing=A(!1);error=A("");topAssets=P(()=>(this.report()?.assets??[]).slice(0,8));assets=P(()=>{let t={js:0,css:1,html:2,image:3,font:4,asset:5,map:6};return[...this.report()?.assets??[]].sort((e,i)=>{let l=(t[e.type]??99)-(t[i.type]??99);if(l!==0)return l;let d=(i.rawSize??0)-(e.rawSize??0);return d!==0?d:(e.relativePath??e.name??"").localeCompare(i.relativePath??i.name??"")})});assetViewportHeight=P(()=>{let t=this.assets().length;return t===0?80:Math.min(360,Math.max(80,t*40))});useVirtualAssetTable=P(()=>this.assets().length>200);statsChunks=P(()=>(this.report()?.stats?.chunks??[]).slice(0,8));statsDependencies=P(()=>(this.report()?.stats?.dependencies??[]).slice(0,8));statsModules=P(()=>(this.report()?.stats?.modules??[]).slice(0,10));statsInsights=P(()=>{let t=this.report(),e=t?.stats?.insights??[],i=(t?.warnings??[]).some(d=>d.code==="stats-json-cleaned"),l=(t?.assets??[]).some(d=>d.name==="stats.json");return!i&&l?e:e.filter(d=>d.code!=="deployment-stats-json")});reportWarningsAsInsights=P(()=>(this.report()?.warnings??[]).filter(t=>t.code!=="stats-json-cleaned").map(t=>({level:"warning",code:`warning:${t.code}`,message:t.message,category:t.code==="stats-json-cleanup-failed"?"risk":"diagnostic",data:t.data})));analysisInsights=P(()=>{let t=new Map([["risk",0],["budget",1],["optimization",2],["migration",3],["diagnostic",4]]);return this.uniqueInsights([...this.reportWarningsAsInsights(),...this.statsInsights()]).sort((e,i)=>(t.get(e.category??"diagnostic")??4)-(t.get(i.category??"diagnostic")??4))});buildInsights=P(()=>this.analysisInsights().filter(t=>(t.category??"diagnostic")!=="diagnostic"));insightGroups=P(()=>["risk","budget","optimization","migration"].map(e=>({category:e,label:this.insightLabel(e),items:this.buildInsights().filter(i=>(i.category??"diagnostic")===e)})).filter(e=>e.items.length>0));analyzerDiagnostics=P(()=>this.diagnostics());analyzerDiagnosticCount=P(()=>this.analyzerDiagnostics().length);historyRows=P(()=>this.history().slice(0,10));previousHistory=P(()=>{let t=this.report()?.runId,e=this.historyRows();return t?e.find(i=>i.runId!==t)??null:e[1]??e[0]??null});rawDelta=P(()=>{let t=this.previousHistory(),e=this.report()?.summary;return!t||!e?null:e.totalRawSize-t.totalRawSize});gzipDelta=P(()=>{let t=this.previousHistory(),e=this.report()?.summary;return!t||!e?null:e.totalGzipSize-t.totalGzipSize});durationDelta=P(()=>{let t=this.previousHistory(),e=this.report()?.summary;return!t||!e||typeof e.durationMs!="number"||typeof t.durationMs!="number"?null:e.durationMs-t.durationMs});historyDeltaItems=P(()=>{let t=this.rawDelta(),e=this.gzipDelta(),i=this.durationDelta();return[{label:"Raw",value:this.formatDeltaSize(t),className:this.deltaClass(t)},{label:"Gzip",value:this.formatDeltaSize(e),className:this.deltaClass(e)},{label:"Duration",value:this.formatDeltaMs(i),className:this.deltaClass(i)}]});emptyText=P(()=>this.loading()||this.analyzing()?"\u6B63\u5728\u52A0\u8F7D\u5206\u6790\u62A5\u544A...":this.error()||"\u6682\u65E0\u5206\u6790\u62A5\u544A\uFF0Cbuild \u6210\u529F\u540E\u4F1A\u81EA\u52A8\u751F\u6210\u3002");showRuntimeAnalysis=P(()=>this._taskKind()==="serve");runtimeUrls=P(()=>this.runtimeSnapshot()?.urls??[]);treemapCells=P(()=>{let t=this.report()?.assets??[];if(!t.length)return[];let e=t.slice(0,20),i=e.reduce((I,oe)=>I+(oe.rawSize||0),0);if(i<=0)return[];let l=100,d=[];for(let I of e){let oe=(I.rawSize||0)/i,Xn=Math.max(1,Math.round(oe*l));d.push({name:I.name,relativePath:I.relativePath,size:I.rawSize||0,ratio:oe,type:I.type,colSpan:Xn,rowSpan:1,color:We(I.type)})}let B=d.reduce((I,oe)=>I+oe.colSpan,0);if(B>l&&d.length>0){let I=B-l;d[d.length-1].colSpan=Math.max(1,d[d.length-1].colSpan-I)}return d});get taskId(){return this._taskId()}setTaskId(t){t!==this._taskId()&&(this._taskId.set(t),this.report.set(null),this.diagnostics.set([]),this.history.set([]),this.historyError.set(""),this.error.set(""),this.loading.set(!1),this.analyzing.set(!1))}setTaskKind(t){this._taskKind.set(t)}setRuntime(t){this.runtimeSnapshot.set(t)}onReportLoaded(t,e){this.report.set(t),this.diagnostics.set(e??t?.diagnostics??[]),this.loading.set(!1)}onLoadError(t){this.error.set(t),this.loading.set(!1)}onAnalyzeStarted(){this.analyzing.set(!0),this.diagnostics.set([]),this.error.set("")}onAnalyzeFinished(){this.analyzing.set(!1)}onAnalyzeFailed(t){this.analyzing.set(!1),this.error.set(t)}onHistoryLoaded(t){this.history.set(t??[]),this.historyError.set("")}onHistoryError(t){this.history.set([]),this.historyError.set(t)}onDiagnosticsLoaded(t){this.diagnostics.set(t??[])}formatDeltaSize(t){if(t===null)return"-";let e=t>0?"+":t<0?"-":"",i=Math.abs(t);return i<1024?`${e}${i} B`:i<1024*1024?`${e}${(i/1024).toFixed(1)} KB`:`${e}${(i/1024/1024).toFixed(2)} MB`}formatDeltaMs(t){if(t===null)return"-";let e=t>0?"+":t<0?"-":"",i=Math.abs(t);return i>=1e3?`${e}${(i/1e3).toFixed(2)}s`:`${e}${i}ms`}deltaClass(t){return t===null||t===0?"neutral":t>0?"up":"down"}insightLabel(t){return{risk:"\u98CE\u9669",optimization:"\u4F18\u5316",migration:"\u8FC1\u79FB",budget:"\u9884\u7B97",diagnostic:"\u8BCA\u65AD"}[t??"diagnostic"]??"\u63D0\u793A"}uniqueInsights(t){let e=new Set,i=[];for(let l of t){let d=`${l.category??"diagnostic"}:${l.code}:${l.message}`;e.has(d)||(e.add(d),i.push(l))}return i}static \u0275fac=function(e){return new(e||n)};static \u0275prov=It({token:n,factory:n.\u0275fac})};function No(n,t){if(n&1&&(o(0,"div",4),r(1),a()),n&2){let e,i=p();s(),m((e=i.report())==null||e.summary==null?null:e.summary.outputPath)}}function Fo(n,t){n&1&&(o(0,"nz-tag",6),c(1,"nz-icon",11),r(2," \u5206\u6790\u4E2D... "),a())}function Ro(n,t){if(n&1&&c(0,"app-task-analysis-report",9),n&2){let e=p();u("report",e.report())("topAssets",e.topAssets())("assets",e.assets())("insightGroups",e.insightGroups())("historyRows",e.historyRows())("historyDeltaItems",e.historyDeltaItems())("historyError",e.historyError())("treemapCells",e.treemapCells())("statsChunks",e.statsChunks())("statsDependencies",e.statsDependencies())("statsModules",e.statsModules())("useVirtualAssetTable",e.useVirtualAssetTable())("assetViewportHeight",e.assetViewportHeight())("diagnosticInsights",e.analyzerDiagnostics())}}function Bo(n,t){if(n&1&&c(0,"app-task-analysis-runtime",10),n&2){let e=p();u("runtimeSnapshot",e.runtimeSnapshot())("runtimeUrls",e.runtimeUrls())}}function Lo(n,t){if(n&1&&c(0,"app-task-analysis-diagnostics",12),n&2){let e=p(2);u("items",e.analyzerDiagnostics())("open",!0)}}function jo(n,t){if(n&1&&(g(0,Lo,1,2,"app-task-analysis-diagnostics",12),o(1,"div",13),c(2,"nz-empty",14),a()),n&2){let e=p();f(e.analyzerDiagnostics().length>0?0:-1),s(2),u("nzNotFoundContent",e.emptyText())}}var ot=class n{api=x(Ge);stream=x(de);destroyRef=x(K);facade=x(be);loadSub;loadScheduled=!1;set taskId(t){let e=(t??"").trim();e!==this.facade.taskId&&(this.facade.setTaskId(e),this.scheduleLoad())}get taskId(){return this.facade.taskId}set taskKind(t){this.facade.setTaskKind(t??void 0)}set runtime(t){this.facade.setRuntime(t??null)}report=this.facade.report;diagnostics=this.facade.diagnostics;history=this.facade.history;historyError=this.facade.historyError;runtimeSnapshot=this.facade.runtimeSnapshot;loading=this.facade.loading;analyzing=this.facade.analyzing;error=this.facade.error;topAssets=this.facade.topAssets;assets=this.facade.assets;assetViewportHeight=this.facade.assetViewportHeight;useVirtualAssetTable=this.facade.useVirtualAssetTable;statsChunks=this.facade.statsChunks;statsDependencies=this.facade.statsDependencies;statsModules=this.facade.statsModules;insightGroups=this.facade.insightGroups;analyzerDiagnostics=this.facade.analyzerDiagnostics;analyzerDiagnosticCount=this.facade.analyzerDiagnosticCount;historyRows=this.facade.historyRows;historyDeltaItems=this.facade.historyDeltaItems;emptyText=this.facade.emptyText;showRuntimeAnalysis=this.facade.showRuntimeAnalysis;runtimeUrls=this.facade.runtimeUrls;treemapCells=this.facade.treemapCells;constructor(){this.stream.events$().pipe(N(this.destroyRef)).subscribe(t=>this.onTaskEvent(t))}refresh(){this.load()}ngOnDestroy(){this.loadSub?.unsubscribe()}scheduleLoad(){this.loadScheduled||(this.loadScheduled=!0,setTimeout(()=>{this.loadScheduled=!1,!this.destroyRef.destroyed&&this.load()},0))}onTaskEvent(t){let e=t.payload;if(!(!this.facade.taskId||e.taskId!==this.facade.taskId)){if(t.type==="analyzeStarted"){this.facade.onAnalyzeStarted();return}if(t.type==="analyzeFinished"){this.facade.onAnalyzeFinished(),this.load();return}t.type==="analyzeFailed"&&this.facade.onAnalyzeFailed(e.error||"\u5206\u6790\u5931\u8D25")}}load(){if(this.loadSub?.unsubscribe(),!this.facade.taskId){this.facade.onReportLoaded(null);return}this.facade.loading.set(!0),this.facade.error.set(""),this.loadSub=this.api.getLatestReport(this.facade.taskId).subscribe({next:t=>{this.facade.onReportLoaded(t),t||this.loadDiagnostics(),this.loadHistory()},error:t=>{this.facade.onLoadError(t?.message||"\u52A0\u8F7D\u5206\u6790\u62A5\u544A\u5931\u8D25")}})}loadDiagnostics(){this.facade.taskId&&this.api.getLatestDiagnostics(this.facade.taskId).pipe(N(this.destroyRef)).subscribe({next:t=>this.facade.onDiagnosticsLoaded(t??[]),error:()=>this.facade.onDiagnosticsLoaded([])})}loadHistory(){this.facade.taskId&&this.api.getReportSummariesByTask(this.facade.taskId,10).pipe(N(this.destroyRef)).subscribe({next:t=>this.facade.onHistoryLoaded(t??[]),error:t=>this.facade.onHistoryError(t?.message||"\u5386\u53F2\u8D8B\u52BF\u52A0\u8F7D\u5931\u8D25")})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-analysis"]],inputs:{taskId:"taskId",taskKind:"taskKind",runtime:"runtime"},features:[Ve([be])],decls:15,vars:5,consts:[[1,"analysis-panel"],[1,"panel-header"],[1,"title"],[3,"nzType"],[1,"sub"],[1,"header-actions"],["nzColor","processing"],["type","button",1,"refresh-btn",3,"click"],["nzType","reload"],[3,"report","topAssets","assets","insightGroups","historyRows","historyDeltaItems","historyError","treemapCells","statsChunks","statsDependencies","statsModules","useVirtualAssetTable","assetViewportHeight","diagnosticInsights"],[3,"runtimeSnapshot","runtimeUrls"],["nzType","sync","nzSpin",""],[3,"items","open"],[1,"empty"],[3,"nzNotFoundContent"]],template:function(e,i){if(e&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"div",2),c(4,"nz-icon",3),r(5),a(),g(6,No,2,1,"div",4),a(),o(7,"div",5),g(8,Fo,3,0,"nz-tag",6),o(9,"button",7),C("click",function(){return i.refresh()}),c(10,"nz-icon",8),r(11," \u5237\u65B0 "),a()()(),g(12,Ro,1,14,"app-task-analysis-report",9)(13,Bo,1,2,"app-task-analysis-runtime",10)(14,jo,3,2),a()),e&2){let l;s(4),u("nzType",i.showRuntimeAnalysis()?"line-chart":"bar-chart"),s(),h(" ",i.showRuntimeAnalysis()?"\u8FD0\u884C\u5206\u6790":"\u6784\u5EFA\u5206\u6790"," "),s(),f(!((l=i.report())==null||l.summary==null)&&l.summary.outputPath?6:-1),s(2),f(i.analyzing()?8:-1),s(4),f(i.report()?12:i.showRuntimeAnalysis()?13:14)}},dependencies:[k,Tn,Sn,F,U,S,w,nt,it,fe],styles:[".analysis-panel[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;min-height:0;gap:16px;padding:16px;background:#fff;border-radius:8px;overflow-y:auto;overflow-x:hidden}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:0 0 auto}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;display:flex;align-items:center;gap:8px}.title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{color:#1677ff}.sub[_ngcontent-%COMP%]{margin-top:4px;color:#7a8a99;font-size:12px;word-break:break-all}.header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.refresh-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;border:1px solid #d9d9d9;background:#fff;border-radius:6px;padding:4px 12px;cursor:pointer;color:#595959;transition:all .2s}.refresh-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.empty[_ngcontent-%COMP%]{height:360px;display:grid;place-items:center}"],changeDetection:0})};var ze=class n{constructor(t,e,i){this.stream=t;this.clipboard=e;this.notify=i;this.resizeSub.add(this.resize$.pipe(wt(350),Tt((l,d)=>l.cols===d.cols&&l.rows===d.rows),N(this.destroyRef)).subscribe(l=>{this._taskId&&this.stream.resize(this._taskId,l.cols,l.rows)}))}_taskId="";_active=!0;destroyRef=x(K);set taskId(t){let e=(t??"").trim();if(!e){this._taskId="",this.pendingOutput=[],this.term?.reset();return}e!==this._taskId&&(this._taskId&&(this.stream.unsubscribeTask(this._taskId),this.pendingOutput=[],this.term?.reset()),this._taskId=e,this.bind(e))}get taskId(){return this._taskId}tail=200;set active(t){let e=t!==!1;e!==this._active&&(this._active=e,e&&this.activate())}get active(){return this._active}follow=!0;status={status:"idle"};term;sub=new Z;resizeSub=new Z;pendingOutput=[];resize$=new kt;bind(t){this.sub.unsubscribe(),this.sub=new Z,this.sub.add(this.stream.output$(t).subscribe(e=>{this.writeOutput(e.payload.text)})),this.sub.add(this.stream.status$(t).subscribe(e=>this.status=e)),this.stream.subscribeTask(t,this.tail,{replay:!0})}ngAfterViewInit(){this.flushPendingOutput()}activate(){this._taskId&&setTimeout(()=>{this.term?.fit(),this.flushPendingOutput(),this.follow&&this.term?.scrollToBottom()},80)}ngOnDestroy(){this._taskId&&this.stream.unsubscribeTask(this._taskId),this.sub.unsubscribe(),this.resizeSub.unsubscribe()}toggleFollow(){this.follow=!this.follow,this.follow&&this.term?.scrollToBottom()}clear(){this.pendingOutput=[],this.term?.clear()}toBottom(){this.term?.scrollToBottom()}async copy(){let t=this.term?.copyAll()??"";if(!t)return;this.clipboard.copy(t)?this.notify.success("Console output copied to clipboard."):this.notify.error("Failed to copy console output.")}onTermResized(t){this.active&&(t.cols<20||t.rows<8||this.resize$.next(t))}writeOutput(t){if(!this.term){this.pendingOutput.push(t),this.pendingOutput.length>this.tail*4&&this.pendingOutput.splice(0,this.pendingOutput.length-this.tail*4);return}this.term.follow=this.follow,this.term.write(t)}flushPendingOutput(){if(!this.term||this.pendingOutput.length===0)return;let t=this.pendingOutput;this.pendingOutput=[],this.term.follow=this.follow;for(let e of t)this.term.write(e);this.follow&&this.term.scrollToBottom()}static \u0275fac=function(e){return new(e||n)(ke(de),ke(ue),ke(Pn))};static \u0275cmp=_({type:n,selectors:[["app-task-console"]],viewQuery:function(e,i){if(e&1&&Q(vt,5),e&2){let l;j(l=$())&&(i.term=l.first)}},inputs:{taskId:"taskId",tail:"tail",active:"active"},decls:16,vars:1,consts:[[1,"console-card"],[1,"header"],[1,"title"],["nzType","desktop","nzTheme","outline"],[1,"id"],[1,"actions"],["nzAlign","center"],["nz-button","","nz-tooltip","\u6E05\u7A7A\u65E5\u5FD7",3,"click"],["nzType","clear","nzTheme","outline"],["nz-button","","nz-tooltip","\u590D\u5236\u65E5\u5FD7",3,"click"],["nzType","copy","nzTheme","outline"],["nz-button","","nz-tooltip","\u6EDA\u52A8\u5230\u5E95\u90E8",3,"click"],["nzType","vertical-align-bottom","nzTheme","outline"],[1,"viewport"],[3,"resized","follow"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-icon",3),o(4,"div",4),r(5,"\u8F93\u51FA"),a()(),o(6,"div",5)(7,"nz-space",6)(8,"button",7),C("click",function(){return i.clear()}),c(9,"nz-icon",8),a(),o(10,"button",9),C("click",function(){return i.copy()}),c(11,"nz-icon",10),a(),o(12,"button",11),C("click",function(){return i.toBottom()}),c(13,"nz-icon",12),a()()()(),o(14,"div",13)(15,"app-terminal-view",14),C("resized",function(d){return i.onTermResized(d)}),a()()()),e&2&&(s(15),u("follow",i.follow))},dependencies:[ee,X,J,Y,ce,le,mn,S,w,W,q,vt,ge],styles:[".console-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.08);border-radius:8px;overflow:hidden;background:#000;min-height:0}.header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;color:#fff}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{margin-left:8px;font-size:12px}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{opacity:.9}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .stopped[_ngcontent-%COMP%]{opacity:.8}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .idle[_ngcontent-%COMP%]{opacity:.6}.header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#fff;background:#ffffff14;border:none}.viewport[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden;padding:8px}"]})};function $o(n,t){if(n&1){let e=T();o(0,"div",24)(1,"a",25),r(2),a(),o(3,"button",26),C("click",function(){let l=b(e).$implicit,d=p(3);return z(d.copyUrl(l))}),c(4,"nz-icon",27),a()()}if(n&2){let e=t.$implicit,i=p(3);s(),u("href",e,Pe),s(),m(e),s(),u("nz-tooltip",i.copiedUrl===e?"\u5DF2\u590D\u5236":"\u590D\u5236"),s(),u("nzType",i.copiedUrl===e?"check":"copy")}}function Ho(n,t){if(n&1&&(o(0,"div",22),M(1,$o,5,4,"div",24,ne),a()),n&2){let e=p(2);s(),O(e.serveUrls())}}function qo(n,t){n&1&&(o(0,"span",23),r(1,"\u5C1A\u672A\u4ECE\u8F93\u51FA\u65E5\u5FD7\u4E2D\u8BC6\u522B\u5230 dev server \u5730\u5740"),a())}function Wo(n,t){if(n&1&&(o(0,"div",1),c(1,"nz-icon",2),o(2,"span"),r(3,"Dev Server \u8FD0\u884C\u72B6\u6001"),a()(),o(4,"div",3)(5,"div",4)(6,"div",5),c(7,"nz-icon",6),o(8,"span"),r(9,"\u72B6\u6001"),a()(),o(10,"div",7)(11,"nz-tag",8),r(12),a()()(),o(13,"div",4)(14,"div",5),c(15,"nz-icon",9),o(16,"span"),r(17,"PID"),a()(),o(18,"div",10),r(19),a()(),o(20,"div",4)(21,"div",5),c(22,"nz-icon",11),o(23,"span"),r(24,"\u8FD0\u884C\u65F6\u957F"),a()(),o(25,"div",7),r(26),a()(),o(27,"div",4)(28,"div",5),c(29,"nz-icon",12),o(30,"span"),r(31,"Ready \u65F6\u95F4"),a()(),o(32,"div",7),r(33),a()(),o(34,"div",4)(35,"div",5),c(36,"nz-icon",13),o(37,"span"),r(38,"\u6700\u8FD1\u7F16\u8BD1"),a()(),o(39,"div",7),r(40),a()(),o(41,"div",4)(42,"div",5),c(43,"nz-icon",14),o(44,"span"),r(45,"Warnings"),a()(),o(46,"div",15),r(47),a()(),o(48,"div",4)(49,"div",5),c(50,"nz-icon",16),o(51,"span"),r(52,"Errors"),a()(),o(53,"div",17),r(54),a()(),o(55,"div",4)(56,"div",5),c(57,"nz-icon",18),o(58,"span"),r(59,"Run ID"),a()(),o(60,"div",19),r(61),a()(),o(62,"div",20)(63,"div",5),c(64,"nz-icon",21),o(65,"span"),r(66,"\u8BBF\u95EE\u5730\u5740"),a()(),o(67,"div",7),g(68,Ho,3,0,"div",22)(69,qo,2,0,"span",23),a()()()),n&2){let e=p();s(11),u("nzColor",e.statusColor()),s(),m(e.statusText()),s(7),m((e.runtime==null?null:e.runtime.pid)||"-"),s(7),m(e.liveDuration()),s(7),m(e.formatTime(e.runtime==null?null:e.runtime.readyAt)),s(7),m(e.formatMs(e.runtime==null?null:e.runtime.rebuildDurationMs)),s(7),m((e.runtime==null?null:e.runtime.warningsCount)||0),s(7),m((e.runtime==null?null:e.runtime.errorsCount)||0),s(7),m((e.runtime==null?null:e.runtime.runId)||"-"),s(7),f(e.serveUrls().length>0?68:69)}}function Uo(n,t){if(n&1&&(o(0,"div",1),c(1,"nz-icon",28),o(2,"span"),r(3,"\u6784\u5EFA\u6982\u89C8"),a()(),o(4,"div",29)(5,"div",4)(6,"div",5),c(7,"nz-icon",6),o(8,"span"),r(9,"\u72B6\u6001"),a()(),o(10,"div",7)(11,"nz-tag",8),r(12),a()()(),o(13,"div",4)(14,"div",5),c(15,"nz-icon",11),o(16,"span"),r(17,"\u6784\u5EFA\u65F6\u957F"),a()(),o(18,"div",7),r(19),a()(),o(20,"div",4)(21,"div",5),c(22,"nz-icon",14),o(23,"span"),r(24,"Warnings"),a()(),o(25,"div",15),r(26),a()(),o(27,"div",4)(28,"div",5),c(29,"nz-icon",16),o(30,"span"),r(31,"Errors"),a()(),o(32,"div",17),r(33),a()(),o(34,"div",4)(35,"div",5),c(36,"nz-icon",9),o(37,"span"),r(38,"Run ID"),a()(),o(39,"div",19),r(40),a()()()),n&2){let e=p();s(11),u("nzColor",e.statusColor()),s(),m(e.statusText()),s(7),m(e.buildDuration()),s(7),m((e.runtime==null?null:e.runtime.warningsCount)||0),s(7),m((e.runtime==null?null:e.runtime.errorsCount)||0),s(7),m((e.runtime==null?null:e.runtime.runId)||"-")}}var at=class n{taskRow=null;taskDashboard=null;taskKind;active=!1;clipboard=x(ue);liveTimer=null;_liveNow=A(Date.now());copiedUrl="";ngOnChanges(t){if("active"in t){if(this.active){this.startLiveTicker();return}this.stopLiveTicker()}}ngOnDestroy(){this.stopLiveTicker()}get runtime(){return this.taskRow?.runtime}statusColor(){let t=this.runtime?.status;return t==="running"?"processing":t==="stopping"?"warning":t==="success"?"success":t==="failed"?"error":"default"}statusText(){let t=this.runtime?.status;return{idle:"\u7A7A\u95F2",running:"\u8FD0\u884C\u4E2D",stopping:"\u505C\u6B62\u4E2D",success:"\u6210\u529F",failed:"\u5931\u8D25",stopped:"\u5DF2\u505C\u6B62"}[t||"idle"]||t||"-"}liveDuration(){let t=this.runtime;if(!t?.startedAt)return"-";if(t.stoppedAt)return this.calcDuration(t.startedAt,t.stoppedAt);let e=this._liveNow();return this.calcDuration(t.startedAt,e)}buildDuration(){let t=this.runtime;if(!t?.startedAt)return"-";let e=t.stoppedAt||this._liveNow();return this.calcDuration(t.startedAt,e)}serveUrls(){return this.runtime?.urls||this.taskDashboard?.urls||[]}formatTime(t){return t?new Date(t).toLocaleTimeString():"-"}formatMs(t){return typeof t!="number"?"-":t>=1e3?`${(t/1e3).toFixed(2)}s`:`${t}ms`}copyUrl(t){this.clipboard.copy(t)&&(this.copiedUrl=t,setTimeout(()=>{this.copiedUrl===t&&(this.copiedUrl="")},2e3))}calcDuration(t,e){let i=Math.max(0,Math.floor((e-t)/1e3)),l=Math.floor(i/60),d=Math.floor(l/60),B=l%60,I=i%60;return d>0?`${d}h ${B}m ${I}s`:l>0?`${l}m ${I}s`:`${I}s`}startLiveTicker(){this.liveTimer||(this.liveTimer=setInterval(()=>this._liveNow.set(Date.now()),1e3))}stopLiveTicker(){this.liveTimer&&(clearInterval(this.liveTimer),this.liveTimer=null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-dashboard"]],inputs:{taskRow:"taskRow",taskDashboard:"taskDashboard",taskKind:"taskKind",active:"active"},features:[ae],decls:3,vars:1,consts:[[1,"dashboard-panel"],[1,"dash-section-title"],["nzType","cloud-server"],[1,"dash-grid","serve-grid"],[1,"dash-card"],[1,"dash-card-label"],["nzType","info-circle"],[1,"dash-card-value"],[3,"nzColor"],["nzType","number"],[1,"dash-card-value","mono"],["nzType","clock-circle"],["nzType","check-circle"],["nzType","reload"],["nzType","warning",2,"color","#faad14"],[1,"dash-card-value","warn"],["nzType","close-circle",2,"color","#ff4d4f"],[1,"dash-card-value","error"],["nzType","thunderbolt"],[1,"dash-card-value","mono","text-sm"],[1,"dash-card","dash-card-full"],["nzType","link"],[1,"url-list"],[1,"text-muted"],[1,"url-item"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"copy-btn",3,"click","nz-tooltip"],[3,"nzType"],["nzType","build"],[1,"dash-grid","build-grid"]],template:function(e,i){e&1&&(o(0,"div",0),g(1,Wo,70,10)(2,Uo,41,6),a()),e&2&&(s(),f(i.taskKind==="serve"?1:2))},dependencies:[k,S,w,F,U,W,q,Ke,ge],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow:auto}.dashboard-panel[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:12px}.dash-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:#26394d;padding:4px 0}.dash-section-title.compact[_ngcontent-%COMP%]{margin-top:4px}.dash-section-title[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:16px;color:#1677ff}.dash-grid[_ngcontent-%COMP%]{display:grid;gap:12px}.serve-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}.build-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.dash-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #eef1f4;border-radius:8px;padding:12px;min-width:0;transition:box-shadow .2s}.dash-card[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000000f}.dash-card-full[_ngcontent-%COMP%]{grid-column:1 / -1}.dash-card-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:#7a8a99;font-size:12px;margin-bottom:8px}.dash-card-label[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:13px}.dash-card-value[_ngcontent-%COMP%]{color:#26394d;font-size:18px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dash-card-value.size[_ngcontent-%COMP%]{font-size:20px}.dash-card-value.mono[_ngcontent-%COMP%]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.dash-card-value.text-sm[_ngcontent-%COMP%]{font-size:13px;font-weight:500}.dash-card-value.warn[_ngcontent-%COMP%]{color:#faad14}.dash-card-value.error[_ngcontent-%COMP%]{color:#ff4d4f}.dash-card-sub[_ngcontent-%COMP%]{margin-top:4px;color:#7a8a99;font-size:12px}.accent-blue[_ngcontent-%COMP%]{border-top:3px solid #1677ff}.accent-indigo[_ngcontent-%COMP%]{border-top:3px solid #722ed1}.accent-green[_ngcontent-%COMP%]{border-top:3px solid #52c41a}.accent-orange[_ngcontent-%COMP%]{border-top:3px solid #fa8c16}.url-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.url-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#1677ff;font-size:14px;font-weight:500;text-decoration:none;word-break:break-all}.url-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.copy-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;color:#595959;transition:all .2s;flex-shrink:0}.copy-btn[_ngcontent-%COMP%]:hover{border-color:#1677ff;color:#1677ff}.size-bar-container[_ngcontent-%COMP%]{padding:4px 0}.size-bar[_ngcontent-%COMP%]{display:flex;height:32px;border-radius:6px;overflow:hidden;background:#f0f2f5}.size-bar-segment[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:0;color:#fff;font-size:12px;font-weight:600;transition:flex .3s;overflow:hidden}.size-bar-segment[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{white-space:nowrap;padding:0 6px}.size-bar-segment.js[_ngcontent-%COMP%]{background:#1677ff}.size-bar-segment.css[_ngcontent-%COMP%]{background:#52c41a}.size-bar-segment.asset[_ngcontent-%COMP%]{background:#fa8c16}.size-bar-legend[_ngcontent-%COMP%]{display:flex;gap:16px;margin-top:8px;font-size:12px;color:#7a8a99}.legend-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.dot[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:2px}.dot.js[_ngcontent-%COMP%]{background:#1677ff}.dot.css[_ngcontent-%COMP%]{background:#52c41a}.dot.asset[_ngcontent-%COMP%]{background:#fa8c16}.dash-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:48px 16px;color:#7a8a99}.empty-icon[_ngcontent-%COMP%]{font-size:40px;color:#d9d9d9}.text-muted[_ngcontent-%COMP%]{color:#7a8a99;font-size:13px;font-weight:400}@media (max-width: 1100px){.serve-grid[_ngcontent-%COMP%], .build-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media (max-width: 768px){.serve-grid[_ngcontent-%COMP%], .build-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}"],changeDetection:0})};var st=class n{name;description;command;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-header"]],inputs:{name:"name",description:"description",command:"command"},decls:7,vars:3,consts:[[1,"name"],["nzType","appstore"],[1,"description"],[1,"command"]],template:function(e,i){e&1&&(o(0,"div",0),c(1,"nz-icon",1),r(2),a(),o(3,"div",2),r(4),a(),o(5,"div",3),r(6),a()),e&2&&(s(2),h(" ",i.name||"\u672A\u9009\u62E9\u4EFB\u52A1"),s(2),m(i.description||"-"),s(2),m(i.command||"-"))},dependencies:[k,S,w],styles:["[_nghost-%COMP%]{padding:0 16px;display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .name[_ngcontent-%COMP%]{font-size:22px;position:relative;top:-1px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{flex:1;color:var(--app-text-secondary);font-size:15px;margin:0 16px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .command[_ngcontent-%COMP%]{font-family:Roboto Mono,monospace;font-size:13px;background:var(--app-primary-3);height:32px;line-height:32px;padding:0 12px;border-radius:3px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}"]})};var Go=(n,t)=>t.spec.id;function Qo(n,t){n&1&&(o(0,"div",7),r(1,"Loading..."),a())}function Ko(n,t){if(n&1&&(o(0,"div",7),r(1),a()),n&2){let e=p(2);s(),h("No tasks for project: ",e.projectId())}}function Zo(n,t){n&1&&c(0,"nz-badge",14)}function Yo(n,t){n&1&&c(0,"nz-badge",15)}function Jo(n,t){n&1&&c(0,"nz-badge",16)}function Xo(n,t){n&1&&c(0,"nz-badge",17)}function ea(n,t){n&1&&c(0,"nz-badge",18)}function ta(n,t){if(n&1){let e=T();o(0,"div",10),C("click",function(){let l=b(e).$implicit,d=p(3);return z(d.state.select(l.spec.id))}),o(1,"div",11)(2,"div",12),c(3,"nz-icon",13),g(4,Zo,1,0,"nz-badge",14)(5,Yo,1,0,"nz-badge",15)(6,Jo,1,0,"nz-badge",16)(7,Xo,1,0,"nz-badge",17)(8,ea,1,0,"nz-badge",18),a(),o(9,"div",19)(10,"div",20),r(11),a(),o(12,"div",21),r(13),a()()()()}if(n&2){let e=t.$implicit,i=p(3);D("active",e.spec.id===i.selectedId()),s(),u("nz-tooltip",e.spec.description||""),s(3),f((e==null||e.runtime==null?null:e.runtime.status)==="running"?4:(e==null||e.runtime==null?null:e.runtime.status)==="stopping"?5:(e==null||e.runtime==null?null:e.runtime.status)==="success"?6:(e==null||e.runtime==null?null:e.runtime.status)==="failed"?7:8),s(6),u("title",e.spec.name),s(),m(e.spec.name),s(2),h(" ",(e.runtime==null?null:e.runtime.status)==="running"?"\u8FD0\u884C\u4E2D":(e.runtime==null?null:e.runtime.status)==="stopping"?"\u505C\u6B62\u4E2D":(e.runtime==null?null:e.runtime.status)==="success"?"\u5DF2\u5B8C\u6210":(e.runtime==null?null:e.runtime.status)==="failed"?"\u5931\u8D25":(e.runtime==null?null:e.runtime.status)==="stopped"?"\u5DF2\u505C\u6B62":e.spec.description||"\u7A7A\u95F2\u4E2D"," ")}}function na(n,t){if(n&1&&(o(0,"div",8),M(1,ta,14,7,"div",9,Go),a()),n&2){let e=p(2);s(),O(e.list())}}function ia(n,t){if(n&1&&g(0,Ko,2,1,"div",7)(1,na,3,0,"div",8),n&2){let e=p();f(e.list().length===0?0:1)}}var rt=class n{state=x(Qe);keyword=this.state.keyword;loading=this.state.loading;list=this.state.rowsViewFiltered;selectedId=this.state.selectedTaskId;projectId=this.state.projectId;badge(t){return t??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-task-list"]],decls:10,vars:2,consts:[[1,"wrap"],[1,"header"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22\u4EFB\u52A1",3,"ngModelChange","ngModel"],["nz-button","","nzType","text",3,"click"],["nz-icon","","nzType","reload"],[1,"body"],[1,"hint"],[1,"items"],[1,"item",3,"active"],[1,"item",3,"click"],["nzTooltipPlacement","right",1,"row",3,"nz-tooltip"],[1,"icon"],["nzType","codepen-circle","nzTheme","outline"],["nzStatus","processing"],["nzStatus","warning"],["nzStatus","success"],["nzStatus","error"],["nzStatus","default"],[1,"info"],[1,"name",3,"title"],[1,"description"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"nz-input-wrapper"),c(3,"nz-icon",2),o(4,"input",3),C("ngModelChange",function(d){return i.keyword.set(d)}),a()(),o(5,"button",4),C("click",function(){return i.state.refresh()}),c(6,"span",5),a()(),o(7,"div",6),g(8,Qo,2,0,"div",7)(9,ia,2,1),a()()),e&2&&(s(4),u("ngModel",i.keyword()),s(4),f(i.loading()?8:9))},dependencies:[k,ee,Be,Le,je,X,J,Y,S,w,Re,le,me,pe,$e,_n,xn,W,q,In,Dn],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:320px;flex:0 0 320px}.wrap[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:hidden}.header[_ngcontent-%COMP%]{width:100%;padding:10px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.12);flex:0 0 auto}.header[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:100%;border-radius:18px}.body[_ngcontent-%COMP%]{flex:1 1 auto;height:0;display:flex;flex-direction:column}.error[_ngcontent-%COMP%]{padding:10px 12px;color:#b42318;flex:0 0 auto}.hint[_ngcontent-%COMP%]{padding:12px;opacity:.7;flex:0 0 auto}.items[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;padding:8px;display:flex;flex-direction:column;gap:8px;height:100%;overflow-x:hidden;overflow-y:auto}.item[_ngcontent-%COMP%]{border-radius:3px;padding:10px;cursor:pointer}.item[_ngcontent-%COMP%]:hover, .item.active[_ngcontent-%COMP%]{background:var(--app-primary-3)}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;overflow:hidden;justify-content:space-between}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:42px;flex:0 0 auto;position:relative}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;overflow:hidden}.item[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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}.item[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.2);opacity:.85}.item[_ngcontent-%COMP%] .badge[data-status=running][_ngcontent-%COMP%]{font-weight:700}.item[_ngcontent-%COMP%] .badge[data-status=stopped][_ngcontent-%COMP%]{opacity:.7}.item[_ngcontent-%COMP%] .badge[data-status=failed][_ngcontent-%COMP%]{font-weight:700}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.75;display:flex;align-items:center;gap:6px}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace}.item[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] .sep[_ngcontent-%COMP%]{opacity:.5}"]})};var Yn=(n,t)=>t.id;function oa(n,t){if(n&1){let e=T();o(0,"button",11),C("click",function(){let l=b(e).$implicit,d=p();return z(d.selectTaskPanel(l.id))}),c(1,"nz-icon",12),r(2),a()}if(n&2){let e=t.$implicit,i=p();D("active",i.selectedViewId===e.id),u("nzType",i.selectedViewId===e.id?"primary":"default"),s(),u("nzType",i.viewIcon(e.id)),s(),h(" ",e.title," ")}}function aa(n,t){if(n&1&&c(0,"app-task-console",14),n&2){let e=p(2);u("taskId",e.taskState.selectedTaskId())("active",e.selectedViewId==="output")}}function sa(n,t){if(n&1&&c(0,"app-task-dashboard",15),n&2){let e=p(2),i=E(6);u("taskRow",i)("taskDashboard",e.taskDashboard)("taskKind",i==null||i.spec==null?null:i.spec.kind)("active",e.selectedViewId==="dashboard")}}function ra(n,t){if(n&1&&c(0,"app-task-analysis",16),n&2){let e=p(2),i=E(6);u("taskId",e.taskState.selectedTaskId())("taskKind",i==null||i.spec==null?null:i.spec.kind)("runtime",i==null?null:i.runtime)}}function la(n,t){if(n&1&&(o(0,"div",13),g(1,aa,1,2,"app-task-console",14)(2,sa,1,4,"app-task-dashboard",15)(3,ra,1,3,"app-task-analysis",16),a()),n&2){let e,i=t.$implicit,l=p();D("panel-hidden",l.selectedViewId!==i.id),s(),f((e=i.id)==="output"?1:e==="dashboard"?2:e==="analyzer"?3:-1)}}var Jn=class n{projectContext=x(kn);taskState=x(Qe);api=x(Ge);stream=x(de);destroyRef=x(K);selectedTask=this.taskState.selectedRow;selectedViewId="output";taskDashboard=null;loadedDashboardTaskId="";taskConsole;constructor(){ht(async()=>{let t=this.projectContext.currentProjectId();t&&await this.taskState.setProject(t)}),ht(()=>{let t=this.taskState.selectedTaskId(),e=this.selectedViews();e.some(i=>i.id===this.selectedViewId)||(this.selectedViewId=e[0]?.id??"output"),this.selectedViewId==="dashboard"?this.loadDashboard(t):t||(this.taskDashboard=null)}),this.stream.events$().pipe(N(this.destroyRef)).subscribe(t=>{if(t.type!=="analyzeFinished")return;let e=String(t.payload?.taskId??"").trim();if(!e||e!==this.taskState.selectedTaskId())return;let i=t.payload?.report;i&&this.setTaskDashboard(this.dashboardFromReport(i)),this.loadDashboard(e,{force:!0})})}selectedViews(){let t=this.selectedTask()?.spec?.views;return t?.length?t:[{id:"output",title:"\u8F93\u51FA"}]}viewIcon(t){return t==="dashboard"?"dashboard":t==="analyzer"?"bar-chart":"desktop"}selectTaskPanel(t){this.selectedViews().some(e=>e.id===t)&&this.selectedViewId!==t&&(this.selectedViewId=t,t==="dashboard"&&this.loadDashboard(this.taskState.selectedTaskId(),{force:!0}),t==="output"&&this.taskConsole?.activate())}loadDashboard(t,e){let i=(t??"").trim();if(!i){this.loadedDashboardTaskId="",this.setTaskDashboard(null);return}!e?.force&&this.loadedDashboardTaskId===i||(this.loadedDashboardTaskId=i,this.api.getDashboard(i).pipe(N(this.destroyRef)).subscribe({next:l=>{this.loadedDashboardTaskId===i&&this.setTaskDashboard(l)},error:()=>{this.loadedDashboardTaskId="",this.setTaskDashboard(null)}}))}setTaskDashboard(t){this.taskDashboard=t}dashboardFromReport(t){let e=this.selectedTask()?.runtime;return{taskId:t.taskId,projectId:t.projectId,runId:t.runId,status:e?.status??"success",progress:{startedAt:e?.startedAt,stoppedAt:e?.stoppedAt,durationMs:t.summary.durationMs,readyAt:e?.readyAt,rebuildDurationMs:e?.rebuildDurationMs},sizes:{outputPath:t.summary.outputPath,fileCount:t.summary.fileCount,totalRawSize:t.summary.totalRawSize,totalGzipSize:t.summary.totalGzipSize,totalBrotliSize:t.summary.totalBrotliSize,jsRawSize:t.summary.jsRawSize,cssRawSize:t.summary.cssRawSize,assetRawSize:t.summary.assetRawSize},problems:{warningsCount:e?.warningsCount??0,errorsCount:e?.errorsCount??0,lastError:e?.lastError},urls:e?.urls??[]}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=_({type:n,selectors:[["app-tasks"]],viewQuery:function(e,i){if(e&1&&Q(ze,5),e&2){let l;j(l=$())&&(i.taskConsole=l.first)}},decls:16,vars:9,consts:[[3,"title","isFullscreen"],["ngProjectAs","actions",5,["actions"]],[1,"page"],[1,"content"],[3,"name","description","command"],[3,"toggle","restart","isStopping","isRunning","isStartable"],[1,"task-panel-shell"],[1,"task-panel-switcher"],["type","button","nz-button","",1,"task-panel-button",3,"active","nzType"],[1,"task-panel-body"],[1,"task-panel",3,"panel-hidden"],["type","button","nz-button","",1,"task-panel-button",3,"click","nzType"],[3,"nzType"],[1,"task-panel"],[3,"taskId","active"],[3,"taskRow","taskDashboard","taskKind","active"],[3,"taskId","taskKind","runtime"]],template:function(e,i){if(e&1){let l=T();o(0,"app-page-layout",0),we(1,1),c(2,"app-node-version"),Se(),o(3,"nz-layout",2),c(4,"app-task-list"),o(5,"nz-content",3),xe(6),c(7,"app-task-header",4),o(8,"app-task-actions",5),C("toggle",function(){return b(l),z(i.taskState.toggleTask())})("restart",function(){return b(l),z(i.taskState.restartSelected())}),a(),o(9,"div",6)(10,"div",7),M(11,oa,3,5,"button",8,Yn),a(),o(13,"div",9),M(14,la,4,3,"div",10,Yn),a()()()()()}if(e&2){u("title","\u4EFB\u52A1")("isFullscreen",!0),s(6);let l=Ce(i.selectedTask()),d=i.selectedViews();s(),u("name",l==null||l.spec==null?null:l.spec.name)("description",l==null||l.spec==null?null:l.spec.description)("command",(l==null||l.spec==null?null:l.spec.displayCommand)||(l==null||l.spec==null?null:l.spec.command)),s(),u("isStopping",i.taskState.isStopping())("isRunning",i.taskState.isRunning())("isStartable",i.taskState.isStartable()),s(3),O(d),s(3),O(d)}},dependencies:[k,ee,le,me,X,J,Y,ce,pe,jn,Re,F,S,w,Rn,Fn,Nn,ze,rt,Vn,st,yn,Ze,ot,at],styles:[".page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:row;overflow:hidden;gap:16px;padding:0 16px}.content[_ngcontent-%COMP%]{flex:1 1 auto;width:0;display:flex;flex-direction:column;gap:16px;height:100%;overflow:hidden}app-task-header[_ngcontent-%COMP%], app-task-actions[_ngcontent-%COMP%], app-node-version[_ngcontent-%COMP%]{flex:0 0 auto}.task-panel-shell[_ngcontent-%COMP%]{flex:1 1 auto;height:0;min-height:0;display:flex;flex-direction:column;gap:8px}.task-panel-switcher[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;justify-content:flex-end;align-items:center}.task-panel-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;cursor:pointer}.task-panel-button[_ngcontent-%COMP%] + .task-panel-button[_ngcontent-%COMP%]{border-left:none}.task-panel-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;position:relative}.task-panel[_ngcontent-%COMP%]{position:absolute;inset:0;height:100%;min-height:0;overflow:hidden;visibility:visible;pointer-events:auto;z-index:1}.task-panel.panel-hidden[_ngcontent-%COMP%]{visibility:hidden;pointer-events:none;z-index:0}app-task-console[_ngcontent-%COMP%], app-task-analysis[_ngcontent-%COMP%], app-task-dashboard[_ngcontent-%COMP%]{height:100%;display:block}"]})};export{Jn as TasksComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as r}from"./chunk-X6PRUZ5G.js";import{n as m}from"./chunk-SIKDYQOR.js";import{Hb as e,oa as o}from"./chunk-YGWA6NUS.js";var s=[{path:"",loadComponent:()=>import("./chunk-735SLX4X.js").then(t=>t.SettingComponent),children:[{path:"",redirectTo:"ai-agent",pathMatch:"full"},{path:"ai-agent",loadComponent:()=>import("./chunk-WVRMU265.js").then(t=>t.AiAgentSettingsComponent)}]}],i=class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(s),r]})};var a=class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m,i]})};export{a as SettingModule};
|