@yinuo-ngm/server 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/lib/app.js +3 -1
  2. package/lib/plugins/error-handler.plugin.js +14 -0
  3. package/lib/plugins/static.plugin.js +4 -12
  4. package/lib/plugins/ws/topics/index.d.ts +2 -0
  5. package/lib/plugins/ws/topics/index.js +2 -0
  6. package/lib/plugins/ws/topics/svn.ws.d.ts +9 -0
  7. package/lib/plugins/ws/topics/svn.ws.js +46 -0
  8. package/lib/plugins/ws/ws.plugin.js +27 -11
  9. package/lib/routes/index.js +6 -0
  10. package/lib/routes/project.routes.js +15 -1
  11. package/lib/routes/sprite-browse.routes.d.ts +2 -0
  12. package/lib/routes/sprite-browse.routes.js +107 -0
  13. package/lib/routes/sprite.routes.js +40 -61
  14. package/lib/routes/static-files.routes.d.ts +2 -0
  15. package/lib/routes/static-files.routes.js +83 -0
  16. package/lib/routes/svn.routes.d.ts +2 -0
  17. package/lib/routes/svn.routes.js +53 -0
  18. package/package.json +6 -5
  19. package/www/3rdpartylicenses.txt +26 -0
  20. package/www/browser/{chunk-DJJC6FPO.js → chunk-25RT7L2O.js} +1 -1
  21. package/www/browser/{chunk-EP45FT55.js → chunk-2P5WKSWB.js} +2 -2
  22. package/www/browser/{chunk-FNLA2MNI.js → chunk-2XZHN52E.js} +1 -1
  23. package/www/browser/chunk-3MBM5AMR.js +1 -0
  24. package/www/browser/{chunk-AZV6AWGC.js → chunk-3V5PIKHE.js} +1 -1
  25. package/www/browser/{chunk-EC33AXSR.js → chunk-42JVTVYH.js} +1 -1
  26. package/www/browser/chunk-4IQIZX7Y.js +1 -0
  27. package/www/browser/{chunk-3MAJTMXX.js → chunk-4UAHOL42.js} +1 -1
  28. package/www/browser/{chunk-YVSVIACA.js → chunk-56SDBJDG.js} +1 -1
  29. package/www/browser/{chunk-IMQG3SAE.js → chunk-5DD65JMJ.js} +1 -1
  30. package/www/browser/{chunk-PTMJ422K.js → chunk-5EQOKH7G.js} +6 -6
  31. package/www/browser/chunk-6JH45SUC.js +1 -0
  32. package/www/browser/{chunk-G73D24UX.js → chunk-6X6PEDE5.js} +1 -1
  33. package/www/browser/{chunk-CO7S3LZV.js → chunk-AI6SNMEH.js} +1 -1
  34. package/www/browser/chunk-AMXCOT2F.js +1 -0
  35. package/www/browser/{chunk-J2JNFWJN.js → chunk-DP3VTELD.js} +1 -1
  36. package/www/browser/chunk-E6LF4XBJ.js +3 -0
  37. package/www/browser/chunk-EMK65RIU.js +1 -0
  38. package/www/browser/chunk-EYGWZTTT.js +1 -0
  39. package/www/browser/{chunk-CJISJEP3.js → chunk-GKY4LJF4.js} +1 -1
  40. package/www/browser/{chunk-V27A2EK4.js → chunk-HJC5MNP5.js} +1 -1
  41. package/www/browser/chunk-ITXWAN4J.js +1 -0
  42. package/www/browser/{chunk-GCKL62DR.js → chunk-IZNTCWTR.js} +1 -1
  43. package/www/browser/{chunk-CPA2B3DD.js → chunk-KN3WZJH7.js} +1 -1
  44. package/www/browser/chunk-KPO75P5E.js +1 -0
  45. package/www/browser/chunk-LWBZC6ZL.js +2 -0
  46. package/www/browser/{chunk-HCBKQAGF.js → chunk-NYXWJKSW.js} +1 -1
  47. package/www/browser/{chunk-ROB7EMN5.js → chunk-OC62FHHS.js} +1 -1
  48. package/www/browser/{chunk-POZS3PD3.js → chunk-QM5ROT66.js} +1 -1
  49. package/www/browser/{chunk-35COW2FA.js → chunk-W633D3VG.js} +1 -1
  50. package/www/browser/{chunk-53YRDYLS.js → chunk-X3HFJACM.js} +2 -2
  51. package/www/browser/chunk-YFAKNLWB.js +2 -0
  52. package/www/browser/{chunk-3PWCJ3D5.js → chunk-ZSPNEYSK.js} +1 -1
  53. package/www/browser/images/placeholder.png +0 -0
  54. package/www/browser/index.html +1 -1
  55. package/www/browser/main-O5GAJRDW.js +34 -0
  56. package/www/browser/chunk-37KQ3UTB.js +0 -1
  57. package/www/browser/chunk-3LDMO67C.js +0 -1
  58. package/www/browser/chunk-MD6RDGU4.js +0 -1
  59. package/www/browser/chunk-OUE23ZE4.js +0 -2
  60. package/www/browser/chunk-W6TCGG53.js +0 -1
  61. package/www/browser/chunk-XN5C33GH.js +0 -3
  62. package/www/browser/main-V3VSEZ7K.js +0 -29
@@ -0,0 +1 @@
1
+ import{g as k}from"./chunk-2P5WKSWB.js";import{p as u}from"./chunk-X3HFJACM.js";import{Ha as n,m,ma as a,ra as c}from"./chunk-SJG2JCPL.js";var h=class e{api=c(k);refresh(t){return this.api.post(`/api/tasks/refresh/${t}`,{})}getViews(t){return this.api.get(`/api/tasks/list/${t}`)}getStatus(t){return this.api.get(`/api/tasks/status/${t}`)}start(t){return this.api.post("/api/tasks/start",{taskId:t})}stop(t){return this.api.post("/api/tasks/stop",{taskId:t})}active(){return this.api.get("/api/tasks/active")}getRunLog(t,s=200){let i=new u().set("tail",s.toString());return this.api.get(`/api/tasks/log/run/${t}`,i)}getSyslog(t=200){let s=new u().set("tail",t.toString());return this.api.get("/api/tasks/syslog",s)}static \u0275fac=function(s){return new(s||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})};var d=class e{statusByTask=new Map;sigByTask=new Map;runtimeByTask=new Map;runningCountByProject=new Map;totalRunningCount=n(0);totalRunningCountSignal(){return this.totalRunningCount}setRuntime(t){let s=this.norm(t.taskId),i=this.norm(t.projectId);if(!s||!i)return;let T=this.ensureTaskSignal(s)(),r=this.isBusy(T.status),b=this.isBusy(t.status),o=this.toStatus(t);if(this.ensureTaskSubject(s).next(o),this.ensureTaskSignal(s).set(o),this.ensureRuntimeSignal(s).set(t),r!==b){let g=this.ensureProjectCount(i),p=g();g.set(r?Math.max(0,p-1):p+1);let l=this.totalRunningCount();this.totalRunningCount.set(r?Math.max(0,l-1):l+1)}}status$(t){return this.ensureTaskSubject(t).asObservable()}statusSignal(t){return this.ensureTaskSignal(t)}runtimeSignal(t){return this.ensureRuntimeSignal(t)}hasRunning(t){return this.ensureProjectCount(t)()>0}runningCountSignal(t){return this.ensureProjectCount(t)}snapshot(t){return this.ensureTaskSignal(t)()}toStatus(t){switch(t.status){case"idle":return{status:"idle"};case"running":return{status:"running",pid:t.pid,startedAt:t.startedAt};case"stopping":return{status:"stopping"};case"failed":return{status:"failed",exitCode:t.exitCode??null,signal:t.signal??null,stoppedAt:t.stoppedAt};case"success":return{status:"success",exitCode:t.exitCode??null,signal:t.signal??null,stoppedAt:t.stoppedAt};case"stopped":return{status:"stopped",exitCode:t.exitCode??null,signal:t.signal??null,stoppedAt:t.stoppedAt};default:return{status:"idle"}}}isBusy(t){return t==="running"||t==="stopping"}norm(t){return(t??"").trim()}ensureTaskSubject(t){let s=this.norm(t);return this.statusByTask.has(s)||this.statusByTask.set(s,new m({status:"idle"})),this.statusByTask.get(s)}ensureTaskSignal(t){let s=this.norm(t);return this.sigByTask.has(s)||this.sigByTask.set(s,n({status:"idle"})),this.sigByTask.get(s)}ensureProjectCount(t){let s=this.norm(t);return this.runningCountByProject.has(s)||this.runningCountByProject.set(s,n(0)),this.runningCountByProject.get(s)}ensureRuntimeSignal(t){let s=this.norm(t);return this.runtimeByTask.has(s)||this.runtimeByTask.set(s,n(void 0)),this.runtimeByTask.get(s)}static \u0275fac=function(s){return new(s||e)};static \u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})};export{h as a,d as b};
@@ -1 +1 @@
1
- import{d as kt}from"./chunk-ROB7EMN5.js";import{c as Ft,d as Nt,e as At}from"./chunk-EP45FT55.js";import{Fb as Rt,H as D,Ia as yt,M as It,N as St,O as B,P as $,db as Q,g as _t,h as vt,kb as xt,nb as Lt,pb as Mt,sb as Et,tb as Ot,x as Dt,z as C}from"./chunk-PTMJ422K.js";import{d as bt}from"./chunk-53YRDYLS.js";import{B as tt,Ca as w,Dc as H,Eb as y,Fb as at,Fc as A,Gb as rt,Hc as mt,Ic as E,Jc as O,Kb as g,M as T,Oa as V,Tb as lt,Uc as dt,Vb as v,Wc as P,Xa as ot,Xb as F,Xc as zt,Zc as ft,_c as ht,a as W,ac as z,ad as Ct,bc as b,ca as et,cc as _,dc as st,f as q,fd as Tt,g as K,ga as nt,hc as k,ic as x,jc as j,l as X,ld as gt,mb as l,na as it,r as N,ra as s,rd as R,s as d,tc as u,uc as L,vc as M,vd as f,wc as pt,yc as ct,zc as ut}from"./chunk-SJG2JCPL.js";var G=["*"],wt=e=>[e],Vt=e=>({$implicit:e});function jt(e,a){if(e&1&&(k(0),E(1),x()),e&2){let t=u(2);l(),O(t.innerTip)}}function Ht(e,a){if(e&1&&(b(0,"div",2)(1,"div",4),g(2,jt,2,1,"ng-container",5),_()()),e&2){let t=u();z("@helpMotion",void 0)("@.disabled",t.animationType==="NoopAnimations"),l(),mt(P(6,wt,"ant-form-item-explain-"+t.status)),l(),z("nzStringTemplateOutlet",t.innerTip)("nzStringTemplateOutletContext",P(8,Vt,t.validateControl))}}function Pt(e,a){if(e&1&&(k(0),E(1),x()),e&2){let t=u(2);l(),O(t.nzExtra)}}function Bt(e,a){if(e&1&&(b(0,"div",3),g(1,Pt,2,1,"ng-container",6),_()),e&2){let t=u();l(),z("nzStringTemplateOutlet",t.nzExtra)}}var $t=(e,a)=>({required:e,$implicit:a});function Qt(e,a){if(e&1&&(k(0),st(1,"nz-icon",4),x()),e&2){let t=a.$implicit,n=u(3);l(),z("nzType",t)("nzTheme",n.tooltipIcon.theme)}}function Gt(e,a){if(e&1&&(b(0,"span",1),g(1,Qt,2,2,"ng-container",3),_()),e&2){let t=u(2);z("nzTooltipTitle",t.nzTooltipTitle),l(),z("nzStringTemplateOutlet",t.tooltipIcon.type)}}function Ut(e,a){e&1&&(b(0,"span",2),E(1),ft(2,"nzI18n"),_()),e&2&&(l(),O(ht(2,1,"Form.optional")))}function Yt(e,a){if(e&1&&(M(0),v(1,Gt,2,2,"span",1),v(2,Ut,3,3,"span",2)),e&2){let t=u();l(),F(t.nzTooltipTitle?1:-1),l(),F((t.nzRequiredMark==null?null:t.nzRequiredMark())==="optional"&&!t.nzRequired?2:-1)}}function Zt(e,a){e&1&&j(0)}function Jt(e,a){if(e&1&&g(0,Zt,1,0,"ng-container",5),e&2){let t=u(),n=H(2);z("ngTemplateOutlet",t.nzRequiredMark())("ngTemplateOutletContext",zt(2,$t,t.nzRequired,n))}}function Kt(e,a){e&1&&j(0)}function Xt(e,a){if(e&1&&g(0,Kt,1,0,"ng-container",6),e&2){u();let t=H(2);z("ngTemplateOutlet",t)}}var te=(()=>{class e{cdr=s(R);status="";hasFeedback=!1;withHelpClass=!1;setWithHelpViaTips(t){this.withHelpClass=t,this.cdr.markForCheck()}setStatus(t){this.status=t,this.cdr.markForCheck()}setHasFeedback(t){this.hasFeedback=t,this.cdr.markForCheck()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=y({type:e,selectors:[["nz-form-item"]],hostAttrs:[1,"ant-form-item"],hostVars:12,hostBindings:function(n,i){n&2&&A("ant-form-item-has-success",i.status==="success")("ant-form-item-has-warning",i.status==="warning")("ant-form-item-has-error",i.status==="error")("ant-form-item-is-validating",i.status==="validating")("ant-form-item-has-feedback",i.hasFeedback&&i.status)("ant-form-item-with-help",i.withHelpClass)},exportAs:["nzFormItem"],ngContentSelectors:G,decls:1,vars:0,template:function(n,i){n&1&&(L(),M(0))},encapsulation:2,changeDetection:0})}return e})(),ee="form",U={type:"question-circle",theme:"outline"},qt=(()=>{var c;let e,a=[],t=[],n,i=[],h=[],m,I=[],S=[],Y,Z=[],J=[];return c=class{destroyRef=s(w);directionality=s(Dt);_nzModuleName=ee;nzLayout="horizontal";nzNoColon=d(this,a,!1);nzAutoTips=(d(this,t),d(this,i,{}));nzDisableAutoTips=(d(this,h),!1);nzTooltipIcon=d(this,I,U);nzLabelAlign=(d(this,S),"right");nzLabelWrap=d(this,Z,!1);nzRequiredMark=(d(this,J),gt(!0));dir="ltr";inputChanges$=new X;getInputObservable(r){return this.inputChanges$.pipe(T(o=>r in o),tt(o=>o[r]))}constructor(){this.dir=this.directionality.value,this.directionality.change?.pipe(C()).subscribe(r=>{this.dir=r}),this.destroyRef.onDestroy(()=>{this.inputChanges$.complete()})}ngOnChanges(r){this.inputChanges$.next(r)}},(()=>{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[D()],n=[D()],m=[D()],Y=[D()],N(null,null,e,{kind:"field",name:"nzNoColon",static:!1,private:!1,access:{has:o=>"nzNoColon"in o,get:o=>o.nzNoColon,set:(o,p)=>{o.nzNoColon=p}},metadata:r},a,t),N(null,null,n,{kind:"field",name:"nzAutoTips",static:!1,private:!1,access:{has:o=>"nzAutoTips"in o,get:o=>o.nzAutoTips,set:(o,p)=>{o.nzAutoTips=p}},metadata:r},i,h),N(null,null,m,{kind:"field",name:"nzTooltipIcon",static:!1,private:!1,access:{has:o=>"nzTooltipIcon"in o,get:o=>o.nzTooltipIcon,set:(o,p)=>{o.nzTooltipIcon=p}},metadata:r},I,S),N(null,null,Y,{kind:"field",name:"nzLabelWrap",static:!1,private:!1,access:{has:o=>"nzLabelWrap"in o,get:o=>o.nzLabelWrap,set:(o,p)=>{o.nzLabelWrap=p}},metadata:r},Z,J),r&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),q(c,"\u0275fac",function(o){return new(o||c)}),q(c,"\u0275dir",rt({type:c,selectors:[["","nz-form",""]],hostAttrs:[1,"ant-form"],hostVars:8,hostBindings:function(o,p){o&2&&A("ant-form-horizontal",p.nzLayout==="horizontal")("ant-form-vertical",p.nzLayout==="vertical")("ant-form-inline",p.nzLayout==="inline")("ant-form-rtl",p.dir==="rtl")},inputs:{nzLayout:"nzLayout",nzNoColon:[2,"nzNoColon","nzNoColon",f],nzAutoTips:"nzAutoTips",nzDisableAutoTips:[2,"nzDisableAutoTips","nzDisableAutoTips",f],nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:[2,"nzLabelWrap","nzLabelWrap",f],nzRequiredMark:[1,"nzRequiredMark"]},exportAs:["nzForm"],features:[V]})),c})(),ne=(()=>{class e{cdr=s(R);i18n=s(Ft);nzFormStatusService=s(Q);destroyRef=s(w);animationType=s(ot,{optional:!0});_hasFeedback=!1;validateChanges=K.EMPTY;validateString=null;localeId;autoErrorTip;get disableAutoTips(){return this.nzDisableAutoTips!==void 0?vt(this.nzDisableAutoTips):!!this.nzFormDirective?.nzDisableAutoTips}status="";validateControl=null;innerTip=null;defaultValidateControl;nzSuccessTip;nzWarningTip;nzErrorTip;nzValidatingTip;nzExtra;nzAutoTips={};nzDisableAutoTips;set nzHasFeedback(t){this._hasFeedback=t,this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this._hasFeedback}),this.nzFormItemComponent&&this.nzFormItemComponent.setHasFeedback(this._hasFeedback)}get nzHasFeedback(){return this._hasFeedback}set nzValidateStatus(t){t instanceof Lt||t instanceof Mt?(this.validateControl=t,this.validateString=null,this.watchControl()):t instanceof Ot?(this.validateControl=t.control,this.validateString=null,this.watchControl()):(this.validateString=t,this.validateControl=null,this.setStatus())}watchControl(){this.validateChanges.unsubscribe(),this.validateControl&&this.validateControl.statusChanges&&(this.validateChanges=this.validateControl.statusChanges.pipe(et(null),C(this.destroyRef)).subscribe(()=>{this.disableAutoTips||this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck()}))}setStatus(){this.status=this.getControlStatus(this.validateString),this.innerTip=this.getInnerTip(this.status),this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this.nzHasFeedback}),this.nzFormItemComponent&&(this.nzFormItemComponent.setWithHelpViaTips(!!this.innerTip),this.nzFormItemComponent.setStatus(this.status))}getControlStatus(t){let n;return t==="warning"||this.validateControlStatus("INVALID","warning")?n="warning":t==="error"||this.validateControlStatus("INVALID")?n="error":t==="validating"||t==="pending"||this.validateControlStatus("PENDING")?n="validating":t==="success"||this.validateControlStatus("VALID")?n="success":n="",n}validateControlStatus(t,n){if(this.validateControl){let{dirty:i,touched:h,status:m}=this.validateControl;return(!!i||!!h)&&(n?this.validateControl.hasError(n):m===t)}else return!1}getInnerTip(t){switch(t){case"error":return!this.disableAutoTips&&this.autoErrorTip||this.nzErrorTip||null;case"validating":return this.nzValidatingTip||null;case"success":return this.nzSuccessTip||null;case"warning":return this.nzWarningTip||null;default:return null}}updateAutoErrorTip(){if(this.validateControl){let t=this.validateControl.errors||{},n="";for(let i in t)if(t.hasOwnProperty(i)&&(n=t[i]?.[this.localeId]??this.nzAutoTips?.[this.localeId]?.[i]??this.nzAutoTips.default?.[i]??this.nzFormDirective?.nzAutoTips?.[this.localeId]?.[i]??this.nzFormDirective?.nzAutoTips.default?.[i]),n)break;this.autoErrorTip=n}}subscribeAutoTips(t){t?.pipe(C(this.destroyRef)).subscribe(()=>{this.disableAutoTips||(this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck())})}nzFormItemComponent=s(te,{host:!0,optional:!0});nzFormDirective=s(qt,{optional:!0});constructor(){this.subscribeAutoTips(this.i18n.localeChange.pipe(nt(t=>this.localeId=t.locale))),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzAutoTips")),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzDisableAutoTips").pipe(T(()=>this.nzDisableAutoTips===void 0)))}ngOnChanges(t){let{nzDisableAutoTips:n,nzAutoTips:i,nzSuccessTip:h,nzWarningTip:m,nzErrorTip:I,nzValidatingTip:S}=t;n||i?(this.updateAutoErrorTip(),this.setStatus()):(h||m||I||S)&&this.setStatus()}ngOnInit(){this.setStatus()}ngAfterContentInit(){!this.validateControl&&!this.validateString&&(this.defaultValidateControl instanceof Et?this.nzValidateStatus=this.defaultValidateControl.control:this.nzValidateStatus=this.defaultValidateControl)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=y({type:e,selectors:[["nz-form-control"]],contentQueries:function(n,i,h){if(n&1&&pt(h,xt,5),n&2){let m;ct(m=ut())&&(i.defaultValidateControl=m.first)}},hostAttrs:[1,"ant-form-item-control"],inputs:{nzSuccessTip:"nzSuccessTip",nzWarningTip:"nzWarningTip",nzErrorTip:"nzErrorTip",nzValidatingTip:"nzValidatingTip",nzExtra:"nzExtra",nzAutoTips:"nzAutoTips",nzDisableAutoTips:[2,"nzDisableAutoTips","nzDisableAutoTips",f],nzHasFeedback:[2,"nzHasFeedback","nzHasFeedback",f],nzValidateStatus:"nzValidateStatus"},exportAs:["nzFormControl"],features:[dt([Q]),V],ngContentSelectors:G,decls:5,vars:2,consts:[[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],[1,"ant-form-item-extra"],["role","alert"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[4,"nzStringTemplateOutlet"]],template:function(n,i){n&1&&(L(),b(0,"div",0)(1,"div",1),M(2),_()(),v(3,Ht,3,10,"div",2),v(4,Bt,2,1,"div",3)),n&2&&(l(3),F(i.innerTip?3:-1),l(),F(i.nzExtra?4:-1))},dependencies:[$,B],encapsulation:2,data:{animation:[yt]},changeDetection:0})}return e})();function Wt(e){let a=typeof e=="string"?{type:e}:e;return W(W({},U),a)}var ie=(()=>{class e{cdr=s(R);nzFor;nzRequired=!1;set nzNoColon(t){this.noColon=t}get nzNoColon(){return this.noColon!=="default"?this.noColon:!!this.nzFormDirective?.nzNoColon}noColon="default";nzTooltipTitle;set nzTooltipIcon(t){this._tooltipIcon=Wt(t)}get tooltipIcon(){return this._tooltipIcon!=="default"?this._tooltipIcon:Wt(this.nzFormDirective?.nzTooltipIcon||U)}_tooltipIcon="default";set nzLabelAlign(t){this.labelAlign=t}get nzLabelAlign(){return this.labelAlign!=="default"?this.labelAlign:this.nzFormDirective?.nzLabelAlign||"right"}labelAlign="default";set nzLabelWrap(t){this.labelWrap=t}get nzLabelWrap(){return this.labelWrap!=="default"?this.labelWrap:!!this.nzFormDirective?.nzLabelWrap}labelWrap="default";nzFormDirective=s(qt,{skipSelf:!0,optional:!0});nzRequiredMark=this.nzFormDirective?.nzRequiredMark;isNzRequiredMarkTemplate=Tt(()=>_t(this.nzRequiredMark?.()));constructor(){this.nzFormDirective&&(this.nzFormDirective.getInputObservable("nzNoColon").pipe(T(()=>this.noColon==="default"),C()).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzTooltipIcon").pipe(T(()=>this._tooltipIcon==="default"),C()).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelAlign").pipe(T(()=>this.labelAlign==="default"),C()).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelWrap").pipe(T(()=>this.labelWrap==="default"),C()).subscribe(()=>this.cdr.markForCheck()))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=y({type:e,selectors:[["nz-form-label"]],hostAttrs:[1,"ant-form-item-label"],hostVars:4,hostBindings:function(n,i){n&2&&A("ant-form-item-label-left",i.nzLabelAlign==="left")("ant-form-item-label-wrap",i.nzLabelWrap)},inputs:{nzFor:"nzFor",nzRequired:[2,"nzRequired","nzRequired",f],nzNoColon:[2,"nzNoColon","nzNoColon",f],nzTooltipTitle:"nzTooltipTitle",nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:[2,"nzLabelWrap","nzLabelWrap",f]},exportAs:["nzFormLabel"],ngContentSelectors:G,decls:5,vars:10,consts:[["labelTemplate",""],["nz-tooltip","",1,"ant-form-item-tooltip",3,"nzTooltipTitle"],[1,"ant-form-item-optional"],[4,"nzStringTemplateOutlet"],[3,"nzType","nzTheme"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"]],template:function(n,i){n&1&&(L(),b(0,"label"),g(1,Yt,3,2,"ng-template",null,0,Ct),v(3,Jt,1,5,"ng-container")(4,Xt,1,1,"ng-container"),_()),n&2&&(A("ant-form-item-no-colon",i.nzNoColon)("ant-form-item-required",i.nzRequired)("ant-form-item-required-mark-optional",(i.nzRequiredMark==null?null:i.nzRequiredMark())==="optional"||i.isNzRequiredMarkTemplate())("ant-form-item-required-mark-hidden",(i.nzRequiredMark==null?null:i.nzRequiredMark())===!1),lt("for",i.nzFor),l(3),F(i.isNzRequiredMarkTemplate()?3:4))},dependencies:[$,B,Rt,St,It,bt,At,Nt],encapsulation:2,changeDetection:0})}return e})();var Le=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=at({type:e});static \u0275inj=it({imports:[ie,ne,kt]})}return e})();export{te as a,qt as b,ne as c,ie as d,Le as e};
1
+ import{d as kt}from"./chunk-OC62FHHS.js";import{c as Ft,d as Nt,e as At}from"./chunk-2P5WKSWB.js";import{H as D,Hb as Rt,Ja as yt,M as It,N as St,O as B,P as $,eb as Q,g as _t,h as vt,lb as xt,ob as Lt,qb as Mt,tb as Et,ub as Ot,x as Dt,z as C}from"./chunk-5EQOKH7G.js";import{e as bt}from"./chunk-X3HFJACM.js";import{B as tt,Ca as w,Dc as H,Eb as y,Fb as at,Fc as A,Gb as rt,Hc as mt,Ic as E,Jc as O,Kb as g,M as T,Oa as V,Tb as lt,Uc as dt,Vb as v,Wc as P,Xa as ot,Xb as F,Xc as zt,Zc as ft,_c as ht,a as W,ac as z,ad as Ct,bc as b,ca as et,cc as _,dc as st,f as q,fd as Tt,g as K,ga as nt,hc as k,ic as x,jc as j,l as X,ld as gt,mb as l,na as it,r as N,ra as s,rd as R,s as d,tc as u,uc as L,vc as M,vd as f,wc as pt,yc as ct,zc as ut}from"./chunk-SJG2JCPL.js";var G=["*"],wt=e=>[e],Vt=e=>({$implicit:e});function jt(e,a){if(e&1&&(k(0),E(1),x()),e&2){let t=u(2);l(),O(t.innerTip)}}function Ht(e,a){if(e&1&&(b(0,"div",2)(1,"div",4),g(2,jt,2,1,"ng-container",5),_()()),e&2){let t=u();z("@helpMotion",void 0)("@.disabled",t.animationType==="NoopAnimations"),l(),mt(P(6,wt,"ant-form-item-explain-"+t.status)),l(),z("nzStringTemplateOutlet",t.innerTip)("nzStringTemplateOutletContext",P(8,Vt,t.validateControl))}}function Pt(e,a){if(e&1&&(k(0),E(1),x()),e&2){let t=u(2);l(),O(t.nzExtra)}}function Bt(e,a){if(e&1&&(b(0,"div",3),g(1,Pt,2,1,"ng-container",6),_()),e&2){let t=u();l(),z("nzStringTemplateOutlet",t.nzExtra)}}var $t=(e,a)=>({required:e,$implicit:a});function Qt(e,a){if(e&1&&(k(0),st(1,"nz-icon",4),x()),e&2){let t=a.$implicit,n=u(3);l(),z("nzType",t)("nzTheme",n.tooltipIcon.theme)}}function Gt(e,a){if(e&1&&(b(0,"span",1),g(1,Qt,2,2,"ng-container",3),_()),e&2){let t=u(2);z("nzTooltipTitle",t.nzTooltipTitle),l(),z("nzStringTemplateOutlet",t.tooltipIcon.type)}}function Ut(e,a){e&1&&(b(0,"span",2),E(1),ft(2,"nzI18n"),_()),e&2&&(l(),O(ht(2,1,"Form.optional")))}function Yt(e,a){if(e&1&&(M(0),v(1,Gt,2,2,"span",1),v(2,Ut,3,3,"span",2)),e&2){let t=u();l(),F(t.nzTooltipTitle?1:-1),l(),F((t.nzRequiredMark==null?null:t.nzRequiredMark())==="optional"&&!t.nzRequired?2:-1)}}function Zt(e,a){e&1&&j(0)}function Jt(e,a){if(e&1&&g(0,Zt,1,0,"ng-container",5),e&2){let t=u(),n=H(2);z("ngTemplateOutlet",t.nzRequiredMark())("ngTemplateOutletContext",zt(2,$t,t.nzRequired,n))}}function Kt(e,a){e&1&&j(0)}function Xt(e,a){if(e&1&&g(0,Kt,1,0,"ng-container",6),e&2){u();let t=H(2);z("ngTemplateOutlet",t)}}var te=(()=>{class e{cdr=s(R);status="";hasFeedback=!1;withHelpClass=!1;setWithHelpViaTips(t){this.withHelpClass=t,this.cdr.markForCheck()}setStatus(t){this.status=t,this.cdr.markForCheck()}setHasFeedback(t){this.hasFeedback=t,this.cdr.markForCheck()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=y({type:e,selectors:[["nz-form-item"]],hostAttrs:[1,"ant-form-item"],hostVars:12,hostBindings:function(n,i){n&2&&A("ant-form-item-has-success",i.status==="success")("ant-form-item-has-warning",i.status==="warning")("ant-form-item-has-error",i.status==="error")("ant-form-item-is-validating",i.status==="validating")("ant-form-item-has-feedback",i.hasFeedback&&i.status)("ant-form-item-with-help",i.withHelpClass)},exportAs:["nzFormItem"],ngContentSelectors:G,decls:1,vars:0,template:function(n,i){n&1&&(L(),M(0))},encapsulation:2,changeDetection:0})}return e})(),ee="form",U={type:"question-circle",theme:"outline"},qt=(()=>{var c;let e,a=[],t=[],n,i=[],h=[],m,I=[],S=[],Y,Z=[],J=[];return c=class{destroyRef=s(w);directionality=s(Dt);_nzModuleName=ee;nzLayout="horizontal";nzNoColon=d(this,a,!1);nzAutoTips=(d(this,t),d(this,i,{}));nzDisableAutoTips=(d(this,h),!1);nzTooltipIcon=d(this,I,U);nzLabelAlign=(d(this,S),"right");nzLabelWrap=d(this,Z,!1);nzRequiredMark=(d(this,J),gt(!0));dir="ltr";inputChanges$=new X;getInputObservable(r){return this.inputChanges$.pipe(T(o=>r in o),tt(o=>o[r]))}constructor(){this.dir=this.directionality.value,this.directionality.change?.pipe(C()).subscribe(r=>{this.dir=r}),this.destroyRef.onDestroy(()=>{this.inputChanges$.complete()})}ngOnChanges(r){this.inputChanges$.next(r)}},(()=>{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[D()],n=[D()],m=[D()],Y=[D()],N(null,null,e,{kind:"field",name:"nzNoColon",static:!1,private:!1,access:{has:o=>"nzNoColon"in o,get:o=>o.nzNoColon,set:(o,p)=>{o.nzNoColon=p}},metadata:r},a,t),N(null,null,n,{kind:"field",name:"nzAutoTips",static:!1,private:!1,access:{has:o=>"nzAutoTips"in o,get:o=>o.nzAutoTips,set:(o,p)=>{o.nzAutoTips=p}},metadata:r},i,h),N(null,null,m,{kind:"field",name:"nzTooltipIcon",static:!1,private:!1,access:{has:o=>"nzTooltipIcon"in o,get:o=>o.nzTooltipIcon,set:(o,p)=>{o.nzTooltipIcon=p}},metadata:r},I,S),N(null,null,Y,{kind:"field",name:"nzLabelWrap",static:!1,private:!1,access:{has:o=>"nzLabelWrap"in o,get:o=>o.nzLabelWrap,set:(o,p)=>{o.nzLabelWrap=p}},metadata:r},Z,J),r&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),q(c,"\u0275fac",function(o){return new(o||c)}),q(c,"\u0275dir",rt({type:c,selectors:[["","nz-form",""]],hostAttrs:[1,"ant-form"],hostVars:8,hostBindings:function(o,p){o&2&&A("ant-form-horizontal",p.nzLayout==="horizontal")("ant-form-vertical",p.nzLayout==="vertical")("ant-form-inline",p.nzLayout==="inline")("ant-form-rtl",p.dir==="rtl")},inputs:{nzLayout:"nzLayout",nzNoColon:[2,"nzNoColon","nzNoColon",f],nzAutoTips:"nzAutoTips",nzDisableAutoTips:[2,"nzDisableAutoTips","nzDisableAutoTips",f],nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:[2,"nzLabelWrap","nzLabelWrap",f],nzRequiredMark:[1,"nzRequiredMark"]},exportAs:["nzForm"],features:[V]})),c})(),ne=(()=>{class e{cdr=s(R);i18n=s(Ft);nzFormStatusService=s(Q);destroyRef=s(w);animationType=s(ot,{optional:!0});_hasFeedback=!1;validateChanges=K.EMPTY;validateString=null;localeId;autoErrorTip;get disableAutoTips(){return this.nzDisableAutoTips!==void 0?vt(this.nzDisableAutoTips):!!this.nzFormDirective?.nzDisableAutoTips}status="";validateControl=null;innerTip=null;defaultValidateControl;nzSuccessTip;nzWarningTip;nzErrorTip;nzValidatingTip;nzExtra;nzAutoTips={};nzDisableAutoTips;set nzHasFeedback(t){this._hasFeedback=t,this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this._hasFeedback}),this.nzFormItemComponent&&this.nzFormItemComponent.setHasFeedback(this._hasFeedback)}get nzHasFeedback(){return this._hasFeedback}set nzValidateStatus(t){t instanceof Lt||t instanceof Mt?(this.validateControl=t,this.validateString=null,this.watchControl()):t instanceof Ot?(this.validateControl=t.control,this.validateString=null,this.watchControl()):(this.validateString=t,this.validateControl=null,this.setStatus())}watchControl(){this.validateChanges.unsubscribe(),this.validateControl&&this.validateControl.statusChanges&&(this.validateChanges=this.validateControl.statusChanges.pipe(et(null),C(this.destroyRef)).subscribe(()=>{this.disableAutoTips||this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck()}))}setStatus(){this.status=this.getControlStatus(this.validateString),this.innerTip=this.getInnerTip(this.status),this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this.nzHasFeedback}),this.nzFormItemComponent&&(this.nzFormItemComponent.setWithHelpViaTips(!!this.innerTip),this.nzFormItemComponent.setStatus(this.status))}getControlStatus(t){let n;return t==="warning"||this.validateControlStatus("INVALID","warning")?n="warning":t==="error"||this.validateControlStatus("INVALID")?n="error":t==="validating"||t==="pending"||this.validateControlStatus("PENDING")?n="validating":t==="success"||this.validateControlStatus("VALID")?n="success":n="",n}validateControlStatus(t,n){if(this.validateControl){let{dirty:i,touched:h,status:m}=this.validateControl;return(!!i||!!h)&&(n?this.validateControl.hasError(n):m===t)}else return!1}getInnerTip(t){switch(t){case"error":return!this.disableAutoTips&&this.autoErrorTip||this.nzErrorTip||null;case"validating":return this.nzValidatingTip||null;case"success":return this.nzSuccessTip||null;case"warning":return this.nzWarningTip||null;default:return null}}updateAutoErrorTip(){if(this.validateControl){let t=this.validateControl.errors||{},n="";for(let i in t)if(t.hasOwnProperty(i)&&(n=t[i]?.[this.localeId]??this.nzAutoTips?.[this.localeId]?.[i]??this.nzAutoTips.default?.[i]??this.nzFormDirective?.nzAutoTips?.[this.localeId]?.[i]??this.nzFormDirective?.nzAutoTips.default?.[i]),n)break;this.autoErrorTip=n}}subscribeAutoTips(t){t?.pipe(C(this.destroyRef)).subscribe(()=>{this.disableAutoTips||(this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck())})}nzFormItemComponent=s(te,{host:!0,optional:!0});nzFormDirective=s(qt,{optional:!0});constructor(){this.subscribeAutoTips(this.i18n.localeChange.pipe(nt(t=>this.localeId=t.locale))),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzAutoTips")),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzDisableAutoTips").pipe(T(()=>this.nzDisableAutoTips===void 0)))}ngOnChanges(t){let{nzDisableAutoTips:n,nzAutoTips:i,nzSuccessTip:h,nzWarningTip:m,nzErrorTip:I,nzValidatingTip:S}=t;n||i?(this.updateAutoErrorTip(),this.setStatus()):(h||m||I||S)&&this.setStatus()}ngOnInit(){this.setStatus()}ngAfterContentInit(){!this.validateControl&&!this.validateString&&(this.defaultValidateControl instanceof Et?this.nzValidateStatus=this.defaultValidateControl.control:this.nzValidateStatus=this.defaultValidateControl)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=y({type:e,selectors:[["nz-form-control"]],contentQueries:function(n,i,h){if(n&1&&pt(h,xt,5),n&2){let m;ct(m=ut())&&(i.defaultValidateControl=m.first)}},hostAttrs:[1,"ant-form-item-control"],inputs:{nzSuccessTip:"nzSuccessTip",nzWarningTip:"nzWarningTip",nzErrorTip:"nzErrorTip",nzValidatingTip:"nzValidatingTip",nzExtra:"nzExtra",nzAutoTips:"nzAutoTips",nzDisableAutoTips:[2,"nzDisableAutoTips","nzDisableAutoTips",f],nzHasFeedback:[2,"nzHasFeedback","nzHasFeedback",f],nzValidateStatus:"nzValidateStatus"},exportAs:["nzFormControl"],features:[dt([Q]),V],ngContentSelectors:G,decls:5,vars:2,consts:[[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],[1,"ant-form-item-extra"],["role","alert"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[4,"nzStringTemplateOutlet"]],template:function(n,i){n&1&&(L(),b(0,"div",0)(1,"div",1),M(2),_()(),v(3,Ht,3,10,"div",2),v(4,Bt,2,1,"div",3)),n&2&&(l(3),F(i.innerTip?3:-1),l(),F(i.nzExtra?4:-1))},dependencies:[$,B],encapsulation:2,data:{animation:[yt]},changeDetection:0})}return e})();function Wt(e){let a=typeof e=="string"?{type:e}:e;return W(W({},U),a)}var ie=(()=>{class e{cdr=s(R);nzFor;nzRequired=!1;set nzNoColon(t){this.noColon=t}get nzNoColon(){return this.noColon!=="default"?this.noColon:!!this.nzFormDirective?.nzNoColon}noColon="default";nzTooltipTitle;set nzTooltipIcon(t){this._tooltipIcon=Wt(t)}get tooltipIcon(){return this._tooltipIcon!=="default"?this._tooltipIcon:Wt(this.nzFormDirective?.nzTooltipIcon||U)}_tooltipIcon="default";set nzLabelAlign(t){this.labelAlign=t}get nzLabelAlign(){return this.labelAlign!=="default"?this.labelAlign:this.nzFormDirective?.nzLabelAlign||"right"}labelAlign="default";set nzLabelWrap(t){this.labelWrap=t}get nzLabelWrap(){return this.labelWrap!=="default"?this.labelWrap:!!this.nzFormDirective?.nzLabelWrap}labelWrap="default";nzFormDirective=s(qt,{skipSelf:!0,optional:!0});nzRequiredMark=this.nzFormDirective?.nzRequiredMark;isNzRequiredMarkTemplate=Tt(()=>_t(this.nzRequiredMark?.()));constructor(){this.nzFormDirective&&(this.nzFormDirective.getInputObservable("nzNoColon").pipe(T(()=>this.noColon==="default"),C()).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzTooltipIcon").pipe(T(()=>this._tooltipIcon==="default"),C()).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelAlign").pipe(T(()=>this.labelAlign==="default"),C()).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelWrap").pipe(T(()=>this.labelWrap==="default"),C()).subscribe(()=>this.cdr.markForCheck()))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=y({type:e,selectors:[["nz-form-label"]],hostAttrs:[1,"ant-form-item-label"],hostVars:4,hostBindings:function(n,i){n&2&&A("ant-form-item-label-left",i.nzLabelAlign==="left")("ant-form-item-label-wrap",i.nzLabelWrap)},inputs:{nzFor:"nzFor",nzRequired:[2,"nzRequired","nzRequired",f],nzNoColon:[2,"nzNoColon","nzNoColon",f],nzTooltipTitle:"nzTooltipTitle",nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:[2,"nzLabelWrap","nzLabelWrap",f]},exportAs:["nzFormLabel"],ngContentSelectors:G,decls:5,vars:10,consts:[["labelTemplate",""],["nz-tooltip","",1,"ant-form-item-tooltip",3,"nzTooltipTitle"],[1,"ant-form-item-optional"],[4,"nzStringTemplateOutlet"],[3,"nzType","nzTheme"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"]],template:function(n,i){n&1&&(L(),b(0,"label"),g(1,Yt,3,2,"ng-template",null,0,Ct),v(3,Jt,1,5,"ng-container")(4,Xt,1,1,"ng-container"),_()),n&2&&(A("ant-form-item-no-colon",i.nzNoColon)("ant-form-item-required",i.nzRequired)("ant-form-item-required-mark-optional",(i.nzRequiredMark==null?null:i.nzRequiredMark())==="optional"||i.isNzRequiredMarkTemplate())("ant-form-item-required-mark-hidden",(i.nzRequiredMark==null?null:i.nzRequiredMark())===!1),lt("for",i.nzFor),l(3),F(i.isNzRequiredMarkTemplate()?3:4))},dependencies:[$,B,Rt,St,It,bt,At,Nt],encapsulation:2,changeDetection:0})}return e})();var Le=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=at({type:e});static \u0275inj=it({imports:[ie,ne,kt]})}return e})();export{te as a,qt as b,ne as c,ie as d,Le as e};
@@ -1 +1 @@
1
- import{l as G}from"./chunk-EP45FT55.js";import{I as H,M as L,N as q,bb as $,cb as U,l as Q,t as E,x as V,z as W}from"./chunk-PTMJ422K.js";import{d as I}from"./chunk-53YRDYLS.js";import{Ca as y,Dc as M,Eb as l,Ec as B,Fb as P,Fc as C,Kb as m,Oa as _,Vb as z,Xb as u,ac as s,ad as x,bc as S,cc as N,dc as f,kc as F,mb as v,na as A,qc as O,ra as a,rb as Z,rd as j,tc as r,uc as d,vc as p,vd as T,wc as k,xa as R,ya as b,yc as w,zc as D}from"./chunk-SJG2JCPL.js";var h=["*"],X=["nz-sider-trigger",""];function Y(e,o){}function ee(e,o){if(e&1&&m(0,Y,0,0,"ng-template",2),e&2){let n=r(),t=M(5);s("ngTemplateOutlet",n.nzZeroTrigger||t)}}function te(e,o){}function ne(e,o){if(e&1&&m(0,te,0,0,"ng-template",2),e&2){let n=r(),t=M(3);s("ngTemplateOutlet",n.nzTrigger||t)}}function ie(e,o){if(e&1&&f(0,"nz-icon",3),e&2){let n=r(2);s("nzType",n.nzCollapsed?"left":"right")}}function oe(e,o){if(e&1&&f(0,"nz-icon",3),e&2){let n=r(2);s("nzType",n.nzCollapsed?"right":"left")}}function re(e,o){if(e&1&&z(0,ie,1,1,"nz-icon",3)(1,oe,1,1,"nz-icon",3),e&2){let n=r();u(n.nzReverseArrow?0:1)}}function ae(e,o){e&1&&f(0,"nz-icon",4)}function le(e,o){if(e&1){let n=F();S(0,"div",2),O("click",function(){R(n);let i=r();return b(i.setCollapsed(!i.nzCollapsed))}),N()}if(e&2){let n=r();s("matchBreakPoint",n.matchBreakPoint)("nzCollapsedWidth",n.nzCollapsedWidth)("nzCollapsed",n.nzCollapsed)("nzBreakpoint",n.nzBreakpoint)("nzReverseArrow",n.nzReverseArrow)("nzTrigger",n.nzTrigger)("nzZeroTrigger",n.nzZeroTrigger)("siderWidth",n.widthSetting)}}var De=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-content"]],hostAttrs:[1,"ant-layout-content"],exportAs:["nzContent"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),Me=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-footer"]],hostAttrs:[1,"ant-layout-footer"],exportAs:["nzFooter"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),Be=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-header"]],hostAttrs:[1,"ant-layout-header"],exportAs:["nzHeader"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),J=(()=>{class e{nzCollapsed=!1;nzReverseArrow=!1;nzZeroTrigger=null;nzTrigger=void 0;matchBreakPoint=!1;nzCollapsedWidth=null;siderWidth=null;nzBreakpoint=null;isZeroTrigger=!1;isNormalTrigger=!1;updateTriggerType(){this.isZeroTrigger=this.nzCollapsedWidth===0&&(this.nzBreakpoint&&this.matchBreakPoint||!this.nzBreakpoint),this.isNormalTrigger=this.nzCollapsedWidth!==0}ngOnInit(){this.updateTriggerType()}ngOnChanges(){this.updateTriggerType()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["","nz-sider-trigger",""]],hostVars:10,hostBindings:function(t,i){t&2&&(B("width",i.isNormalTrigger?i.siderWidth:null),C("ant-layout-sider-trigger",i.isNormalTrigger)("ant-layout-sider-zero-width-trigger",i.isZeroTrigger)("ant-layout-sider-zero-width-trigger-right",i.isZeroTrigger&&i.nzReverseArrow)("ant-layout-sider-zero-width-trigger-left",i.isZeroTrigger&&!i.nzReverseArrow))},inputs:{nzCollapsed:"nzCollapsed",nzReverseArrow:"nzReverseArrow",nzZeroTrigger:"nzZeroTrigger",nzTrigger:"nzTrigger",matchBreakPoint:"matchBreakPoint",nzCollapsedWidth:"nzCollapsedWidth",siderWidth:"siderWidth",nzBreakpoint:"nzBreakpoint"},exportAs:["nzSiderTrigger"],features:[_],attrs:X,decls:6,vars:2,consts:[["defaultTrigger",""],["defaultZeroTrigger",""],[3,"ngTemplateOutlet"],[3,"nzType"],["nzType","bars"]],template:function(t,i){t&1&&(z(0,ee,1,1,null,2),z(1,ne,1,1,null,2),m(2,re,2,1,"ng-template",null,0,x)(4,ae,1,0,"ng-template",null,1,x)),t&2&&(u(i.isZeroTrigger?0:-1),v(),u(i.isNormalTrigger?1:-1))},dependencies:[I,q,L],encapsulation:2,changeDetection:0})}return e})(),K=(()=>{class e{destroyRef=a(y);platform=a(H);cdr=a(j);breakpointService=a(U);nzMenuDirective=null;nzCollapsedChange=new Z;nzWidth=200;nzTheme="dark";nzCollapsedWidth=80;nzBreakpoint=null;nzZeroTrigger=null;nzTrigger=void 0;nzReverseArrow=!1;nzCollapsible=!1;nzCollapsed=!1;matchBreakPoint=!1;flexSetting=null;widthSetting=null;updateStyleMap(){this.widthSetting=this.nzCollapsed?`${this.nzCollapsedWidth}px`:Q(this.nzWidth),this.flexSetting=`0 0 ${this.widthSetting}`,this.cdr.markForCheck()}updateMenuInlineCollapsed(){this.nzMenuDirective&&this.nzMenuDirective.nzMode==="inline"&&this.nzCollapsedWidth!==0&&this.nzMenuDirective.setInlineCollapsed(this.nzCollapsed)}setCollapsed(n){n!==this.nzCollapsed&&(this.nzCollapsed=n,this.nzCollapsedChange.emit(n),this.updateMenuInlineCollapsed(),this.updateStyleMap(),this.cdr.markForCheck())}ngOnInit(){this.updateStyleMap(),this.platform.isBrowser&&this.breakpointService.subscribe($,!0).pipe(W(this.destroyRef)).subscribe(n=>{let t=this.nzBreakpoint;t&&E().subscribe(()=>{this.matchBreakPoint=!n[t],this.setCollapsed(this.matchBreakPoint),this.cdr.markForCheck()})})}ngOnChanges(n){let{nzCollapsed:t,nzCollapsedWidth:i,nzWidth:c}=n;(t||i||c)&&this.updateStyleMap(),t&&this.updateMenuInlineCollapsed()}ngAfterContentInit(){this.updateMenuInlineCollapsed()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-sider"]],contentQueries:function(t,i,c){if(t&1&&k(c,G,5),t&2){let g;w(g=D())&&(i.nzMenuDirective=g.first)}},hostAttrs:[1,"ant-layout-sider"],hostVars:18,hostBindings:function(t,i){t&2&&(B("flex",i.flexSetting)("max-width",i.widthSetting)("min-width",i.widthSetting)("width",i.widthSetting),C("ant-layout-sider-zero-width",i.nzCollapsed&&i.nzCollapsedWidth===0)("ant-layout-sider-light",i.nzTheme==="light")("ant-layout-sider-dark",i.nzTheme==="dark")("ant-layout-sider-collapsed",i.nzCollapsed)("ant-layout-sider-has-trigger",i.nzCollapsible&&i.nzTrigger!==null))},inputs:{nzWidth:"nzWidth",nzTheme:"nzTheme",nzCollapsedWidth:"nzCollapsedWidth",nzBreakpoint:"nzBreakpoint",nzZeroTrigger:"nzZeroTrigger",nzTrigger:"nzTrigger",nzReverseArrow:[2,"nzReverseArrow","nzReverseArrow",T],nzCollapsible:[2,"nzCollapsible","nzCollapsible",T],nzCollapsed:[2,"nzCollapsed","nzCollapsed",T]},outputs:{nzCollapsedChange:"nzCollapsedChange"},exportAs:["nzSider"],features:[_],ngContentSelectors:h,decls:3,vars:1,consts:[[1,"ant-layout-sider-children"],["nz-sider-trigger","",3,"matchBreakPoint","nzCollapsedWidth","nzCollapsed","nzBreakpoint","nzReverseArrow","nzTrigger","nzZeroTrigger","siderWidth"],["nz-sider-trigger","",3,"click","matchBreakPoint","nzCollapsedWidth","nzCollapsed","nzBreakpoint","nzReverseArrow","nzTrigger","nzZeroTrigger","siderWidth"]],template:function(t,i){t&1&&(d(),S(0,"div",0),p(1),N(),z(2,le,1,8,"div",1)),t&2&&(v(2),u(i.nzCollapsible&&i.nzTrigger!==null?2:-1))},dependencies:[J],encapsulation:2,changeDetection:0})}return e})(),xe=(()=>{class e{destroyRef=a(y);directionality=a(V);listOfNzSiderComponent;dir="ltr";ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(W(this.destroyRef)).subscribe(n=>{this.dir=n})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-layout"]],contentQueries:function(t,i,c){if(t&1&&k(c,K,4),t&2){let g;w(g=D())&&(i.listOfNzSiderComponent=g)}},hostAttrs:[1,"ant-layout"],hostVars:4,hostBindings:function(t,i){t&2&&C("ant-layout-rtl",i.dir==="rtl")("ant-layout-has-sider",i.listOfNzSiderComponent.length>0)},exportAs:["nzLayout"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),We=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=P({type:e});static \u0275inj=A({imports:[K,J]})}return e})();export{De as a,Me as b,Be as c,K as d,xe as e,We as f};
1
+ import{l as G}from"./chunk-2P5WKSWB.js";import{I as H,M as L,N as q,cb as $,db as U,l as Q,t as E,x as V,z as W}from"./chunk-5EQOKH7G.js";import{e as I}from"./chunk-X3HFJACM.js";import{Ca as y,Dc as M,Eb as l,Ec as B,Fb as P,Fc as C,Kb as m,Oa as _,Vb as z,Xb as u,ac as s,ad as x,bc as S,cc as N,dc as f,kc as F,mb as v,na as A,qc as O,ra as a,rb as Z,rd as j,tc as r,uc as d,vc as p,vd as T,wc as k,xa as R,ya as b,yc as w,zc as D}from"./chunk-SJG2JCPL.js";var h=["*"],X=["nz-sider-trigger",""];function Y(e,o){}function ee(e,o){if(e&1&&m(0,Y,0,0,"ng-template",2),e&2){let n=r(),t=M(5);s("ngTemplateOutlet",n.nzZeroTrigger||t)}}function te(e,o){}function ne(e,o){if(e&1&&m(0,te,0,0,"ng-template",2),e&2){let n=r(),t=M(3);s("ngTemplateOutlet",n.nzTrigger||t)}}function ie(e,o){if(e&1&&f(0,"nz-icon",3),e&2){let n=r(2);s("nzType",n.nzCollapsed?"left":"right")}}function oe(e,o){if(e&1&&f(0,"nz-icon",3),e&2){let n=r(2);s("nzType",n.nzCollapsed?"right":"left")}}function re(e,o){if(e&1&&z(0,ie,1,1,"nz-icon",3)(1,oe,1,1,"nz-icon",3),e&2){let n=r();u(n.nzReverseArrow?0:1)}}function ae(e,o){e&1&&f(0,"nz-icon",4)}function le(e,o){if(e&1){let n=F();S(0,"div",2),O("click",function(){R(n);let i=r();return b(i.setCollapsed(!i.nzCollapsed))}),N()}if(e&2){let n=r();s("matchBreakPoint",n.matchBreakPoint)("nzCollapsedWidth",n.nzCollapsedWidth)("nzCollapsed",n.nzCollapsed)("nzBreakpoint",n.nzBreakpoint)("nzReverseArrow",n.nzReverseArrow)("nzTrigger",n.nzTrigger)("nzZeroTrigger",n.nzZeroTrigger)("siderWidth",n.widthSetting)}}var De=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-content"]],hostAttrs:[1,"ant-layout-content"],exportAs:["nzContent"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),Me=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-footer"]],hostAttrs:[1,"ant-layout-footer"],exportAs:["nzFooter"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),Be=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-header"]],hostAttrs:[1,"ant-layout-header"],exportAs:["nzHeader"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),J=(()=>{class e{nzCollapsed=!1;nzReverseArrow=!1;nzZeroTrigger=null;nzTrigger=void 0;matchBreakPoint=!1;nzCollapsedWidth=null;siderWidth=null;nzBreakpoint=null;isZeroTrigger=!1;isNormalTrigger=!1;updateTriggerType(){this.isZeroTrigger=this.nzCollapsedWidth===0&&(this.nzBreakpoint&&this.matchBreakPoint||!this.nzBreakpoint),this.isNormalTrigger=this.nzCollapsedWidth!==0}ngOnInit(){this.updateTriggerType()}ngOnChanges(){this.updateTriggerType()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["","nz-sider-trigger",""]],hostVars:10,hostBindings:function(t,i){t&2&&(B("width",i.isNormalTrigger?i.siderWidth:null),C("ant-layout-sider-trigger",i.isNormalTrigger)("ant-layout-sider-zero-width-trigger",i.isZeroTrigger)("ant-layout-sider-zero-width-trigger-right",i.isZeroTrigger&&i.nzReverseArrow)("ant-layout-sider-zero-width-trigger-left",i.isZeroTrigger&&!i.nzReverseArrow))},inputs:{nzCollapsed:"nzCollapsed",nzReverseArrow:"nzReverseArrow",nzZeroTrigger:"nzZeroTrigger",nzTrigger:"nzTrigger",matchBreakPoint:"matchBreakPoint",nzCollapsedWidth:"nzCollapsedWidth",siderWidth:"siderWidth",nzBreakpoint:"nzBreakpoint"},exportAs:["nzSiderTrigger"],features:[_],attrs:X,decls:6,vars:2,consts:[["defaultTrigger",""],["defaultZeroTrigger",""],[3,"ngTemplateOutlet"],[3,"nzType"],["nzType","bars"]],template:function(t,i){t&1&&(z(0,ee,1,1,null,2),z(1,ne,1,1,null,2),m(2,re,2,1,"ng-template",null,0,x)(4,ae,1,0,"ng-template",null,1,x)),t&2&&(u(i.isZeroTrigger?0:-1),v(),u(i.isNormalTrigger?1:-1))},dependencies:[I,q,L],encapsulation:2,changeDetection:0})}return e})(),K=(()=>{class e{destroyRef=a(y);platform=a(H);cdr=a(j);breakpointService=a(U);nzMenuDirective=null;nzCollapsedChange=new Z;nzWidth=200;nzTheme="dark";nzCollapsedWidth=80;nzBreakpoint=null;nzZeroTrigger=null;nzTrigger=void 0;nzReverseArrow=!1;nzCollapsible=!1;nzCollapsed=!1;matchBreakPoint=!1;flexSetting=null;widthSetting=null;updateStyleMap(){this.widthSetting=this.nzCollapsed?`${this.nzCollapsedWidth}px`:Q(this.nzWidth),this.flexSetting=`0 0 ${this.widthSetting}`,this.cdr.markForCheck()}updateMenuInlineCollapsed(){this.nzMenuDirective&&this.nzMenuDirective.nzMode==="inline"&&this.nzCollapsedWidth!==0&&this.nzMenuDirective.setInlineCollapsed(this.nzCollapsed)}setCollapsed(n){n!==this.nzCollapsed&&(this.nzCollapsed=n,this.nzCollapsedChange.emit(n),this.updateMenuInlineCollapsed(),this.updateStyleMap(),this.cdr.markForCheck())}ngOnInit(){this.updateStyleMap(),this.platform.isBrowser&&this.breakpointService.subscribe($,!0).pipe(W(this.destroyRef)).subscribe(n=>{let t=this.nzBreakpoint;t&&E().subscribe(()=>{this.matchBreakPoint=!n[t],this.setCollapsed(this.matchBreakPoint),this.cdr.markForCheck()})})}ngOnChanges(n){let{nzCollapsed:t,nzCollapsedWidth:i,nzWidth:c}=n;(t||i||c)&&this.updateStyleMap(),t&&this.updateMenuInlineCollapsed()}ngAfterContentInit(){this.updateMenuInlineCollapsed()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-sider"]],contentQueries:function(t,i,c){if(t&1&&k(c,G,5),t&2){let g;w(g=D())&&(i.nzMenuDirective=g.first)}},hostAttrs:[1,"ant-layout-sider"],hostVars:18,hostBindings:function(t,i){t&2&&(B("flex",i.flexSetting)("max-width",i.widthSetting)("min-width",i.widthSetting)("width",i.widthSetting),C("ant-layout-sider-zero-width",i.nzCollapsed&&i.nzCollapsedWidth===0)("ant-layout-sider-light",i.nzTheme==="light")("ant-layout-sider-dark",i.nzTheme==="dark")("ant-layout-sider-collapsed",i.nzCollapsed)("ant-layout-sider-has-trigger",i.nzCollapsible&&i.nzTrigger!==null))},inputs:{nzWidth:"nzWidth",nzTheme:"nzTheme",nzCollapsedWidth:"nzCollapsedWidth",nzBreakpoint:"nzBreakpoint",nzZeroTrigger:"nzZeroTrigger",nzTrigger:"nzTrigger",nzReverseArrow:[2,"nzReverseArrow","nzReverseArrow",T],nzCollapsible:[2,"nzCollapsible","nzCollapsible",T],nzCollapsed:[2,"nzCollapsed","nzCollapsed",T]},outputs:{nzCollapsedChange:"nzCollapsedChange"},exportAs:["nzSider"],features:[_],ngContentSelectors:h,decls:3,vars:1,consts:[[1,"ant-layout-sider-children"],["nz-sider-trigger","",3,"matchBreakPoint","nzCollapsedWidth","nzCollapsed","nzBreakpoint","nzReverseArrow","nzTrigger","nzZeroTrigger","siderWidth"],["nz-sider-trigger","",3,"click","matchBreakPoint","nzCollapsedWidth","nzCollapsed","nzBreakpoint","nzReverseArrow","nzTrigger","nzZeroTrigger","siderWidth"]],template:function(t,i){t&1&&(d(),S(0,"div",0),p(1),N(),z(2,le,1,8,"div",1)),t&2&&(v(2),u(i.nzCollapsible&&i.nzTrigger!==null?2:-1))},dependencies:[J],encapsulation:2,changeDetection:0})}return e})(),xe=(()=>{class e{destroyRef=a(y);directionality=a(V);listOfNzSiderComponent;dir="ltr";ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(W(this.destroyRef)).subscribe(n=>{this.dir=n})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=l({type:e,selectors:[["nz-layout"]],contentQueries:function(t,i,c){if(t&1&&k(c,K,4),t&2){let g;w(g=D())&&(i.listOfNzSiderComponent=g)}},hostAttrs:[1,"ant-layout"],hostVars:4,hostBindings:function(t,i){t&2&&C("ant-layout-rtl",i.dir==="rtl")("ant-layout-has-sider",i.listOfNzSiderComponent.length>0)},exportAs:["nzLayout"],ngContentSelectors:h,decls:1,vars:0,template:function(t,i){t&1&&(d(),p(0))},encapsulation:2,changeDetection:0})}return e})(),We=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=P({type:e});static \u0275inj=A({imports:[K,J]})}return e})();export{De as a,Me as b,Be as c,K as d,xe as e,We as f};
@@ -0,0 +1 @@
1
+ import{e as Mn,f as Tn}from"./chunk-AI6SNMEH.js";import{a as it,b as Ve}from"./chunk-IZNTCWTR.js";import{b as at,c as st,d as ct}from"./chunk-NYXWJKSW.js";import{a as pn,b as dn,c as Ge}from"./chunk-42JVTVYH.js";import{a as ot,b as rt,d as En,e as An}from"./chunk-W633D3VG.js";import"./chunk-SIVPP74B.js";import{a as lt,b as Oe}from"./chunk-QM5ROT66.js";import{a as ye,b as xe}from"./chunk-DP3VTELD.js";import{a as He}from"./chunk-HZ73CM45.js";import{a as bn,c as zn,d as he,e as ve,f as ie}from"./chunk-25RT7L2O.js";import{e as _n,f as Ye,g as Xe}from"./chunk-OC62FHHS.js";import"./chunk-SNCDDYQR.js";import{G as De,I as wn,g as Cn,j as Pe,l as Se,n as gn,o as et,p as fn,q as hn,r as vn,s as yn,v as xn,w as tt,x as nt}from"./chunk-2P5WKSWB.js";import{Ab as Qe,Cb as W,Db as fe,Eb as F,G as on,H as St,Hb as Ie,Jb as Re,M as J,Ma as cn,N as $,O as rn,P as ln,T as an,U as sn,V,W as Q,Y as O,Z as I,kb as H,mb as K,qb as j,sb as mn,vb as un,x as tn,xb as P,z as nn}from"./chunk-5EQOKH7G.js";import"./chunk-HFZLJHYR.js";import{C as Pt,c as en,e as Ze,j as A,p as ue}from"./chunk-X3HFJACM.js";import{$b as D,Ca as Lt,Dc as G,Eb as T,Ec as Zt,Fb as qe,Fc as X,Ha as E,Ic as u,Jc as k,Kb as U,Kc as ce,Lc as Gt,Mc as pe,Nc as de,Oa as ne,Oc as me,Vb as g,Vc as Je,Wc as Me,Xb as f,Xc as Qt,Zb as Ce,_b as S,a as b,ac as _,ad as ee,b as z,bc as l,cc as a,dc as h,e as je,f as qt,fd as v,gd as Rt,hc as ae,ic as se,jc as ge,kc as x,ld as Ue,ma as Ne,mb as s,na as ke,pd as Yt,qc as C,r as It,ra as q,rb as y,rd as Xt,s as Le,tc as c,uc as Ut,vc as $t,vd as $e,xa as d,xc as Ht,ya as m,yc as Wt,z as L,zc as Jt}from"./chunk-SJG2JCPL.js";var Zn=(i,t)=>t.id;function Gn(i,t){i&1&&h(0,"nz-spin")}function Qn(i,t){if(i&1&&(l(0,"nz-tag"),u(1),a()),i&2){let e=c().$implicit;s(),ce("HTTP ",e.response.status)}}function Yn(i,t){i&1&&(l(0,"nz-tag",8),u(1,"ERR"),a())}function Xn(i,t){if(i&1){let e=x();l(0,"button",10),C("click",function(){d(e);let o=c().$implicit,r=c(3);return m(r.copy(o.resolved.curl.bash))}),u(1,"curl"),a()}}function ei(i,t){if(i&1){let e=x();l(0,"div",3)(1,"div",5)(2,"nz-tag"),u(3),a(),l(4,"span",6),u(5),a()(),l(6,"div",7)(7,"span"),u(8),a(),g(9,Qn,2,1,"nz-tag"),g(10,Yn,2,0,"nz-tag",8),a(),l(11,"div",9)(12,"button",10),C("click",function(){let o=d(e).$implicit,r=c(3);return m(r.replay.emit(o))}),u(13,"\u91CD\u653E"),a(),g(14,Xn,2,0,"button",11),a()()}if(i&2){let e=t.$implicit;s(3),k(e.requestSnapshot.method),s(2),k(e.requestSnapshot.url),s(3),ce("",e.metrics.durationMs," ms"),s(),f(e.response?9:-1),s(),f(e.error?10:-1),s(4),f(e.resolved.curl?14:-1)}}function ti(i,t){i&1&&(l(0,"div",4),u(1,"\u6682\u65E0\u5386\u53F2\u8BB0\u5F55"),a())}function ni(i,t){if(i&1&&(l(0,"div",2),S(1,ei,15,6,"div",3,Zn),g(3,ti,2,0,"div",4),a()),i&2){let e=c(2);s(),D(e.histories),s(2),f(e.histories.length?-1:3)}}function ii(i,t){if(i&1&&(ae(0),g(1,Gn,1,0,"nz-spin")(2,ni,4,1,"div",2),se()),i&2){let e=c();s(),f(e.loading?1:2)}}var pt=class i{loading=!1;histories=[];close=new y;replay=new y;copy(t){navigator.clipboard.writeText(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-api-history-drawer"]],inputs:{loading:"loading",histories:"histories"},outputs:{close:"close",replay:"replay"},decls:2,vars:2,consts:[["nzTitle","\u8BF7\u6C42\u5386\u53F2","nzPlacement","right",3,"nzOnClose","nzVisible","nzWidth"],[4,"nzDrawerContent"],[1,"list"],[1,"item"],[1,"empty"],[1,"row"],[1,"url"],[1,"meta"],["nzColor","red"],[1,"actions"],["nz-button","","nzSize","small",3,"click"],["nz-button","","nzSize","small"]],template:function(e,n){e&1&&(l(0,"nz-drawer",0),C("nzOnClose",function(){return n.close.emit()}),U(1,ii,3,1,"ng-container",1),a()),e&2&&_("nzVisible",!0)("nzWidth",520)},dependencies:[A,Ge,dn,pn,I,O,V,Q,Oe,lt,xe,ye],styles:[".list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.item[_ngcontent-%COMP%]{border:1px solid #f0f0f0;border-radius:8px;padding:10px}.row[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;font-weight:500}.url[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta[_ngcontent-%COMP%]{margin-top:6px;display:flex;gap:8px;font-size:12px;opacity:.7}.actions[_ngcontent-%COMP%]{margin-top:8px;display:flex;gap:8px}.empty[_ngcontent-%COMP%]{padding:16px;opacity:.6;text-align:center}"]})};var li=["*"];function ai(i,t){if(i&1){let e=x();l(0,"button",12),C("click",function(o){d(e);let r=c();return r.toggle.emit(r.node.key),m(o.stopPropagation())}),h(1,"nz-icon",13),a()}if(i&2){let e=c();s(),_("nzType",e.hasChildren?e.expanded?"down":"right":"minus")}}function si(i,t){if(i&1&&(l(0,"nz-tag",5),u(1),a()),i&2){let e=c();s(),k(e.node.method||"")}}function ci(i,t){if(i&1&&(l(0,"div",8),u(1),a()),i&2){let e=c();s(),k(e.node.subtitle)}}function pi(i,t){if(i&1){let e=x();l(0,"li",16),C("click",function(){d(e);let o=c(3);return o.createFolder.emit(o.node.id),m(o.visible=!1)}),h(1,"nz-icon",22),l(2,"span"),u(3,"\u65B0\u5EFA\u76EE\u5F55"),a()()}}function di(i,t){if(i&1){let e=x();l(0,"li",16),C("click",function(){d(e);let o=c(3);return o.move.emit(o.node.id),m(o.visible=!1)}),h(1,"nz-icon",22),l(2,"span"),u(3,"\u79FB\u52A8\u5230"),a()()}}function mi(i,t){if(i&1){let e=x();g(0,pi,4,0,"li",15),l(1,"li",16),C("click",function(){d(e);let o=c(2);return o.createRequest.emit(o.node.id),m(o.visible=!1)}),h(2,"nz-icon",17),l(3,"span"),u(4,"\u65B0\u5EFA\u8BF7\u6C42"),a()(),g(5,di,4,0,"li",15),l(6,"li",16),C("click",function(){d(e);let o=c(2);return o.rename.emit(o.node.id),m(o.visible=!1)}),h(7,"nz-icon",18),l(8,"span"),u(9,"\u91CD\u547D\u540D"),a()(),h(10,"li",19),l(11,"li",20),C("nzOnConfirm",function(){d(e);let o=c(2);return m(o.delete.emit(o.node.id))}),h(12,"nz-icon",21),l(13,"span"),u(14,"\u5220\u9664"),a()()}if(i&2){let e=c(2);f(e.node.kind==="collection"?0:-1),s(5),f(e.node.kind==="folder"?5:-1)}}function ui(i,t){if(i&1){let e=x();l(0,"li",16),C("click",function(){d(e);let o=c(2);return o.move.emit(o.node.id),m(o.visible=!1)}),h(1,"nz-icon",22),l(2,"span"),u(3,"\u79FB\u52A8\u5230"),a()(),l(4,"li",16),C("click",function(){d(e);let o=c(2);return o.rename.emit(o.node.id),m(o.visible=!1)}),h(5,"nz-icon",18),l(6,"span"),u(7,"\u91CD\u547D\u540D"),a()(),h(8,"li",19),l(9,"li",20),C("nzOnConfirm",function(){d(e);let o=c(2);return m(o.delete.emit(o.node.id))}),h(10,"nz-icon",21),l(11,"span"),u(12,"\u5220\u9664"),a()()}}function _i(i,t){if(i&1&&(l(0,"ul",14),g(1,mi,15,2)(2,ui,13,0),a()),i&2){let e=c();s(),f(e.node.kind!=="request"?1:2)}}function Ci(i,t){i&1&&(l(0,"div",11),$t(1),a())}var dt=class i{node;expanded=!1;activeKey=null;toggle=new y;selectRequest=new y;selectCollection=new y;createRequest=new y;createFolder=new y;rename=new y;move=new y;copyCurl=new y;delete=new y;visible=!1;get hasChildren(){return(this.node.children?.length??0)>0}get iconType(){return this.node.kind==="request"?"api":this.node.kind==="folder"?"folder":"database"}onClick(){this.node.kind==="request"?this.selectRequest.emit(this.node.id):this.selectCollection.emit(this.node.id)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-collection-tree-item"]],hostVars:2,hostBindings:function(e,n){e&2&&X("ctree-item",!0)},inputs:{node:"node",expanded:"expanded",activeKey:"activeKey"},outputs:{toggle:"toggle",selectRequest:"selectRequest",selectCollection:"selectCollection",createRequest:"createRequest",createFolder:"createFolder",rename:"rename",move:"move",copyCurl:"copyCurl",delete:"delete"},ngContentSelectors:li,decls:14,vars:11,consts:[["menuTpl",""],[1,"row"],["nz-button","","nzType","text","nzSize","small",1,"chev"],[1,"main",3,"click"],[1,"icon",3,"nzType"],[1,"method"],[1,"texts"],[1,"title"],[1,"sub"],["nz-button","","nzType","text","nzSize","small","nz-popover","","nzPopoverTrigger","click","nzPopover","","nzPopoverPlacement","right",1,"more",3,"click","nzPopoverVisibleChange","nzPopoverVisible","nzPopoverContent","nzPopoverOverlayClassName"],["nzType","more","nzTheme","outline"],[1,"children"],["nz-button","","nzType","text","nzSize","small",1,"chev",3,"click"],[3,"nzType"],["nz-menu",""],["nz-menu-item",""],["nz-menu-item","",3,"click"],["nzType","plus"],["nzType","edit"],["nz-menu-divider",""],["nz-menu-item","","nzDanger","","nz-popconfirm","","nzPopconfirmTitle","\u786E\u8BA4\u5220\u9664\u5417\uFF1F",3,"nzOnConfirm"],["nzType","delete"],["nzType","folder"]],template:function(e,n){if(e&1){let o=x();Ut(),l(0,"div",1),g(1,ai,2,1,"button",2),l(2,"div",3),C("click",function(){return d(o),m(n.onClick())}),h(3,"nz-icon",4),g(4,si,2,1,"nz-tag",5),l(5,"div",6)(6,"div",7),u(7),a(),g(8,ci,2,1,"div",8),a()(),l(9,"button",9),C("click",function(p){return d(o),m(p.stopPropagation())}),me("nzPopoverVisibleChange",function(p){return d(o),de(n.visible,p)||(n.visible=p),m(p)}),h(10,"nz-icon",10),a(),U(11,_i,3,1,"ng-template",null,0,ee),a(),g(13,Ci,2,0,"div",11)}if(e&2){let o=G(12);X("active",n.activeKey===n.node.key),s(),f(n.hasChildren?1:-1),s(2),_("nzType",n.iconType),s(),f(n.node.kind==="request"?4:-1),s(3),k(n.node.title),s(),f(n.node.subtitle?8:-1),s(),pe("nzPopoverVisible",n.visible),_("nzPopoverContent",o)("nzPopoverOverlayClassName","project-item-popover"),s(4),f(n.hasChildren&&n.expanded?13:-1)}},dependencies:[A,I,O,V,P,$,J,Xe,Ye,et,Se,Pe,gn,xe,ye,Ve,it],styles:[".item[_nghost-%COMP%]{display:block}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid #f0f0f0;border-radius:10px;cursor:pointer;transition:background .15s,border-color .15s}.row.active[_ngcontent-%COMP%]{background:#f5f5f5;border-color:#d9d9d9}.chev[_ngcontent-%COMP%]{flex:0 0 auto}.chev[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:12px;transition:transform .15s}.main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.icon[_ngcontent-%COMP%]{opacity:.75}.method[_ngcontent-%COMP%]{flex:0 0 auto}.texts[_ngcontent-%COMP%]{flex:1;min-width:0}.title[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sub[_ngcontent-%COMP%]{font-size:12px;opacity:.65;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.more[_ngcontent-%COMP%]{flex:0 0 auto;visibility:hidden}.row[_ngcontent-%COMP%]:hover .more[_ngcontent-%COMP%]{visibility:visible}.children[_ngcontent-%COMP%]{margin-left:18px;padding-top:6px;display:flex;flex-direction:column;gap:6px}"]})};var qn=i=>({$implicit:i}),In=(i,t)=>t.key;function gi(i,t){if(i&1&&ge(0,1),i&2){let e=t.$implicit;c();let n=G(4);_("ngTemplateOutlet",n)("ngTemplateOutletContext",Me(2,qn,e))}}function fi(i,t){i&1&&(l(0,"div",2),u(1,"\u6682\u65E0\u8BF7\u6C42"),a())}function hi(i,t){if(i&1&&ge(0,1),i&2){let e=t.$implicit;c(2);let n=G(4);_("ngTemplateOutlet",n)("ngTemplateOutletContext",Me(2,qn,e))}}function vi(i,t){if(i&1){let e=x();l(0,"app-collection-tree-item",3),C("toggle",function(o){d(e);let r=c();return m(r.toggle(o))})("selectRequest",function(o){d(e);let r=c();return m(r.onSelectRequest(o))})("selectCollection",function(o){d(e);let r=c();return m(r.onSelectCollection(o))})("createRequest",function(o){d(e);let r=c();return m(r.createRequest.emit({collectionId:o}))})("createFolder",function(o){d(e);let r=c();return m(r.createFolder.emit({collectionId:o}))})("rename",function(o){let r=d(e).$implicit,p=c();return m(p.rename.emit({id:o,kind:r.kind}))})("move",function(o){let r=d(e).$implicit,p=c();return m(p.move.emit({id:o,kind:r.kind}))})("copyCurl",function(o){d(e);let r=c();return m(r.copyCurl.emit(o))})("delete",function(o){let r=d(e).$implicit,p=c();return m(p.delete.emit({id:o,kind:r.kind}))}),S(1,hi,1,4,"ng-container",1,In),a()}if(i&2){let e=t.$implicit,n=c();_("node",e)("expanded",n.expanded(e.key))("activeKey",n.activeKey()),s(),D(e.children)}}var mt=class i{nodes=[];activeRequestId=Ue(null);selectRequest=new y;selectCollection=new y;createRequest=new y;createFolder=new y;rename=new y;move=new y;copyCurl=new y;delete=new y;activeKey=v(()=>this.activeRequestId()?`r:${this.activeRequestId()}`:null);_activeCollectionId=E(null);activeCollectionId=v(()=>this._activeCollectionId());expandedMap=E({});expanded(t){return!!this.expandedMap()[t]}toggle(t){let e=b({},this.expandedMap());e[t]=!e[t],this.expandedMap.set(e)}onSelectRequest(t){this.selectRequest.emit(t)}onSelectCollection(t){this._activeCollectionId.set(t),this.selectCollection.emit(t);let e=`c:${t}`,n=b({},this.expandedMap());n[e]=!0,this.expandedMap.set(n)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-collection-tree"]],hostVars:2,hostBindings:function(e,n){e&2&&X("tree-body",!0)},inputs:{nodes:"nodes",activeRequestId:[1,"activeRequestId"]},outputs:{selectRequest:"selectRequest",selectCollection:"selectCollection",createRequest:"createRequest",createFolder:"createFolder",rename:"rename",move:"move",copyCurl:"copyCurl",delete:"delete"},decls:5,vars:1,consts:[["nodeTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"empty"],[3,"toggle","selectRequest","selectCollection","createRequest","createFolder","rename","move","copyCurl","delete","node","expanded","activeKey"]],template:function(e,n){e&1&&(S(0,gi,1,4,"ng-container",1,In),g(2,fi,2,0,"div",2),U(3,vi,3,3,"ng-template",null,0,ee)),e&2&&(D(n.nodes),s(2),f(n.nodes.length?-1:2))},dependencies:[A,Ze,P,F,$,I,dt],styles:[".tree-body[_nghost-%COMP%]{flex:1 1 auto;height:0;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}.tree-body[_nghost-%COMP%] .empty[_ngcontent-%COMP%]{padding:16px;opacity:.6;text-align:center}"]})};function yi(i,t){if(i&1){let e=x();l(0,"ul",11)(1,"li",12),C("click",function(){d(e);let o=c();return o.createRequest.emit({collectionId:null}),m(o.visible=!1)}),h(2,"nz-icon",13),l(3,"span"),u(4,"\u65B0\u5EFA\u8BF7\u6C42"),a()(),l(5,"li",12),C("click",function(){d(e);let o=c();return m(o.createCollection.emit())}),h(6,"nz-icon",14),l(7,"span"),u(8,"\u65B0\u5EFA\u96C6\u5408"),a()()()}}var ut=class i{nodes=Ue([]);q=Yt("");activeId=Ue(null);loading=!1;select=new y;createRequest=new y;createCollection=new y;createFolder=new y;reload=new y;delete=new y;rename=new y;move=new y;visible=!1;static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-request-collections"]],inputs:{nodes:[1,"nodes"],q:[1,"q"],activeId:[1,"activeId"],loading:"loading"},outputs:{q:"qChange",select:"select",createRequest:"createRequest",createCollection:"createCollection",createFolder:"createFolder",reload:"reload",delete:"delete",rename:"rename",move:"move"},decls:13,vars:7,consts:[["menuTpl",""],[1,"wrap"],[1,"header"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22",3,"ngModelChange","ngModel"],["nz-button","","nzType","text",3,"click"],["nzTheme","outline",3,"nzType"],["nz-button","","nz-popover","","nzPopoverTrigger","click","nzPopoverPlacement","bottomCenter","nzType","text",3,"nzPopoverVisibleChange","nzPopoverVisible","nzPopoverContent","nzPopoverOverlayClassName"],["nzType","plus","nzTheme","outline"],[1,"body"],[3,"selectRequest","createRequest","createFolder","rename","move","delete","nodes","activeRequestId"],["nz-menu",""],["nz-menu-item","",1,"item",3,"click"],["nzType","api"],["nzType","folder-add"]],template:function(e,n){if(e&1){let o=x();l(0,"div",1)(1,"div",2)(2,"nz-input-wrapper"),h(3,"nz-icon",3),l(4,"input",4),me("ngModelChange",function(p){return d(o),de(n.q,p)||(n.q=p),m(p)}),a()(),l(5,"button",5),C("click",function(){return d(o),m(n.reload.emit())}),h(6,"nz-icon",6),a(),l(7,"button",7),me("nzPopoverVisibleChange",function(p){return d(o),de(n.visible,p)||(n.visible=p),m(p)}),h(8,"nz-icon",8),a()(),l(9,"div",9)(10,"app-collection-tree",10),C("selectRequest",function(p){return d(o),m(n.select.emit(p))})("createRequest",function(p){return d(o),m(n.createRequest.emit({collectionId:p.collectionId}))})("createFolder",function(p){return d(o),m(n.createFolder.emit({collectionId:p.collectionId??null}))})("rename",function(p){return d(o),m(n.rename.emit(p))})("move",function(p){return d(o),m(n.move.emit(p))})("delete",function(p){return d(o),m(n.delete.emit({id:p.id,kind:p.kind}))}),a()()(),U(11,yi,9,0,"ng-template",null,0,ee)}if(e&2){let o=G(12);s(4),pe("ngModel",n.q),s(2),_("nzType",n.loading?"loading":"reload"),s(),pe("nzPopoverVisible",n.visible),_("nzPopoverContent",o)("nzPopoverOverlayClassName","project-item-popover"),s(3),_("nodes",n.nodes())("activeRequestId",n.activeId())}},dependencies:[A,P,H,K,j,I,O,V,F,W,fe,Qe,$,J,et,Se,Pe,Xe,Ye,mt],styles:["[_nghost-%COMP%]{height:100%;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}"]})};function xi(i,t){i&1&&ge(0)}function wi(i,t){if(i&1&&U(0,xi,1,0,"ng-container",7),i&2){let e=c(3);_("nzStringTemplateOutlet",e.nzIcon)}}function bi(i,t){if(i&1&&h(0,"nz-icon",6),i&2){let e=c(3);_("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme)}}function zi(i,t){if(i&1&&(l(0,"div",2),g(1,wi,1,1,"ng-container")(2,bi,1,2,"nz-icon",6),a()),i&2){let e=c(2);s(),f(e.nzIcon?1:2)}}function Mi(i,t){if(i&1&&(ae(0),u(1),se()),i&2){let e=c(4);s(),k(e.nzMessage)}}function Ti(i,t){if(i&1&&(l(0,"span",8),U(1,Mi,2,1,"ng-container",7),a()),i&2){let e=c(3);s(),_("nzStringTemplateOutlet",e.nzMessage)}}function Ei(i,t){if(i&1&&(ae(0),u(1),se()),i&2){let e=c(4);s(),k(e.nzDescription)}}function Ai(i,t){if(i&1&&(l(0,"span",9),U(1,Ei,2,1,"ng-container",7),a()),i&2){let e=c(3);s(),_("nzStringTemplateOutlet",e.nzDescription)}}function Ni(i,t){if(i&1&&(l(0,"div",3),g(1,Ti,2,1,"span",8),g(2,Ai,2,1,"span",9),a()),i&2){let e=c(2);s(),f(e.nzMessage?1:-1),s(),f(e.nzDescription?2:-1)}}function ki(i,t){if(i&1&&(ae(0),u(1),se()),i&2){let e=c(3);s(),k(e.nzAction)}}function qi(i,t){if(i&1&&(l(0,"div",4),U(1,ki,2,1,"ng-container",7),a()),i&2){let e=c(2);s(),_("nzStringTemplateOutlet",e.nzAction)}}function Ii(i,t){if(i&1&&(ae(0),l(1,"span",12),u(2),a(),se()),i&2){let e=c(4);s(2),k(e.nzCloseText)}}function Ri(i,t){if(i&1&&U(0,Ii,3,1,"ng-container",7),i&2){let e=c(3);_("nzStringTemplateOutlet",e.nzCloseText)}}function Pi(i,t){i&1&&h(0,"nz-icon",11)}function Si(i,t){if(i&1){let e=x();l(0,"button",10),C("click",function(){d(e);let o=c(2);return m(o.closeAlert())}),g(1,Ri,1,1,"ng-container")(2,Pi,1,0,"nz-icon",11),a()}if(i&2){let e=c(2);s(),f(e.nzCloseText?1:2)}}function Di(i,t){if(i&1){let e=x();l(0,"div",1),C("@slideAlertMotion.done",function(){d(e);let o=c();return m(o.onFadeAnimationDone())}),g(1,zi,3,1,"div",2),g(2,Ni,3,2,"div",3),g(3,qi,2,1,"div",4),g(4,Si,3,1,"button",5),a()}if(i&2){let e=c();X("ant-alert-rtl",e.dir==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),_("@.disabled",e.nzNoAnimation)("@slideAlertMotion",void 0),s(),f(e.nzShowIcon?1:-1),s(),f(e.nzMessage||e.nzDescription?2:-1),s(),f(e.nzAction?3:-1),s(),f(e.nzCloseable||e.nzCloseText?4:-1)}}var Rn="alert",Ee=(()=>{var p;let i,t=[],e=[],n,o=[],r=[];return p=class{cdr=q(Xt);directionality=q(tn);destroyRef=q(Lt);_nzModuleName=Rn;nzAction=null;nzCloseText=null;nzIconType=null;nzMessage=null;nzDescription=null;nzType="info";nzCloseable=Le(this,t,!1);nzShowIcon=(Le(this,e),Le(this,o,!1));nzBanner=(Le(this,r),!1);nzNoAnimation=!1;nzIcon=null;nzOnClose=new y;closed=!1;iconTheme="fill";inferredIconType="info-circle";dir="ltr";isTypeSet=!1;isShowIconSet=!1;constructor(){on(Rn,()=>this.cdr.markForCheck())}ngOnInit(){this.directionality.change?.pipe(nn(this.destroyRef)).subscribe(M=>{this.dir=M,this.cdr.detectChanges()}),this.dir=this.directionality.value}closeAlert(){this.closed=!0}onFadeAnimationDone(){this.closed&&this.nzOnClose.emit(!0)}ngOnChanges(M){let{nzShowIcon:N,nzDescription:Y,nzType:At,nzBanner:R}=M;if(N&&(this.isShowIconSet=!0),At)switch(this.isTypeSet=!0,this.nzType){case"error":this.inferredIconType="close-circle";break;case"success":this.inferredIconType="check-circle";break;case"info":this.inferredIconType="info-circle";break;case"warning":this.inferredIconType="exclamation-circle";break}Y&&(this.iconTheme=this.nzDescription?"outline":"fill"),R&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=!0))}},(()=>{let M=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[St()],n=[St()],It(null,null,i,{kind:"field",name:"nzCloseable",static:!1,private:!1,access:{has:N=>"nzCloseable"in N,get:N=>N.nzCloseable,set:(N,Y)=>{N.nzCloseable=Y}},metadata:M},t,e),It(null,null,n,{kind:"field",name:"nzShowIcon",static:!1,private:!1,access:{has:N=>"nzShowIcon"in N,get:N=>N.nzShowIcon,set:(N,Y)=>{N.nzShowIcon=Y}},metadata:M},o,r),M&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:M})})(),qt(p,"\u0275fac",function(N){return new(N||p)}),qt(p,"\u0275cmp",T({type:p,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:[2,"nzCloseable","nzCloseable",$e],nzShowIcon:[2,"nzShowIcon","nzShowIcon",$e],nzBanner:[2,"nzBanner","nzBanner",$e],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",$e],nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],features:[ne],decls:1,vars:1,consts:[[1,"ant-alert",3,"ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert"],[1,"ant-alert-icon"],[1,"ant-alert-content"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon"],[3,"nzType","nzTheme"],[4,"nzStringTemplateOutlet"],[1,"ant-alert-message"],[1,"ant-alert-description"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],["nzType","close"],[1,"ant-alert-close-text"]],template:function(N,Y){N&1&&g(0,Di,5,24,"div",0),N&2&&f(Y.closed?-1:0)},dependencies:[$,J,ln,rn],encapsulation:2,data:{animation:[cn]},changeDetection:0})),p})(),Be=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=qe({type:i});static \u0275inj=ke({imports:[Ee]})}return i})();function Vi(i,t){if(i&1&&h(0,"nz-option",3),i&2){let e=t.$implicit;_("nzValue",e)("nzLabel",e)}}function Oi(i,t){if(i&1){let e=x();l(0,"nz-select",8),C("ngModelChange",function(o){d(e);let r=c();return m(r.setApiKeyIn(o))}),h(1,"nz-option",9)(2,"nz-option",10),a()}if(i&2){let e=c();_("ngModel",e.apiKeyIn())}}function Fi(i,t){i&1&&(l(0,"div",6),u(1,"\u65E0\u9274\u6743"),a())}function Bi(i,t){if(i&1){let e=x();l(0,"div",7)(1,"div",11)(2,"div",12),u(3,"Username"),a(),l(4,"input",13),C("ngModelChange",function(o){d(e);let r=c();return m(r.setBasicUsername(o))}),a()(),l(5,"div",11)(6,"div",12),u(7,"Password"),a(),l(8,"input",14),C("ngModelChange",function(o){d(e);let r=c();return m(r.setBasicPassword(o))}),a()()()}if(i&2){let e=c();s(4),_("ngModel",e.basicUsername()),s(4),_("ngModel",e.basicPassword())}}function Ki(i,t){if(i&1){let e=x();l(0,"div",7)(1,"div",11)(2,"div",12),u(3,"Token"),a(),l(4,"input",15),C("ngModelChange",function(o){d(e);let r=c();return m(r.setBearerToken(o))}),a()()()}if(i&2){let e=c();s(4),_("ngModel",e.bearerToken())}}function ji(i,t){i&1&&h(0,"nz-alert",18)}function Li(i,t){i&1&&h(0,"nz-alert",19)}function Ui(i,t){if(i&1){let e=x();l(0,"div",7)(1,"div",11)(2,"div",12),u(3,"Key"),a(),l(4,"input",16),C("ngModelChange",function(o){d(e);let r=c();return m(r.setApiKeyKey(o))}),a()(),l(5,"div",11)(6,"div",12),u(7,"Value"),a(),l(8,"input",17),C("ngModelChange",function(o){d(e);let r=c();return m(r.setApiKeyValue(o))}),a()(),g(9,ji,1,0,"nz-alert",18),g(10,Li,1,0,"nz-alert",19),a()}if(i&2){let e=c();s(4),_("ngModel",e.apiKeyKey()),s(4),_("ngModel",e.apiKeyValue()),s(),f(e.apiKeyIn()==="query"?9:-1),s(),f(e.apiKeyIn()==="header"?10:-1)}}var _t=class i{auth;authChange=new y;types=["none","basic","bearer","apikey"];type=v(()=>this.auth?.type??"none");basicUsername=v(()=>this.auth?.type==="basic"?this.auth.basic?.username??"":"");basicPassword=v(()=>this.auth?.type==="basic"?this.auth.basic?.password??"":"");bearerToken=v(()=>this.auth?.type==="bearer"?this.auth.bearer?.token??"":"");apiKeyIn=v(()=>this.auth?.type!=="apikey"?"header":this.auth.apikey?.in??"header");apiKeyKey=v(()=>this.auth?.type==="apikey"?this.auth.apikey?.key??"":"");apiKeyValue=v(()=>this.auth?.type==="apikey"?this.auth.apikey?.value??"":"");setType(t){if(t==="none"){this.authChange.emit({type:"none"});return}if(t==="basic"){this.authChange.emit({type:"basic",basic:{username:"",password:""}});return}if(t==="bearer"){this.authChange.emit({type:"bearer",bearer:{token:""}});return}if(t==="apikey"){this.authChange.emit({type:"apikey",apikey:{in:"header",key:"",value:""}});return}}setBasicUsername(t){let e=z(b({},this.auth??{type:"basic"}),{type:"basic",basic:z(b({},this.auth?.basic),{username:t})});this.authChange.emit(e)}setBasicPassword(t){let e=z(b({},this.auth??{type:"basic"}),{type:"basic",basic:z(b({},this.auth?.basic),{password:t})});this.authChange.emit(e)}setBearerToken(t){let e=z(b({},this.auth??{type:"bearer"}),{type:"bearer",bearer:z(b({},this.auth?.bearer),{token:t})});this.authChange.emit(e)}setApiKeyIn(t){let e=z(b({},this.auth??{type:"apikey"}),{type:"apikey",apikey:z(b({},this.auth?.apikey),{in:t,key:this.apiKeyKey(),value:this.apiKeyValue()})});this.authChange.emit(e)}setApiKeyKey(t){let e=z(b({},this.auth??{type:"apikey"}),{type:"apikey",apikey:z(b({},this.auth?.apikey),{in:this.apiKeyIn(),key:t,value:this.apiKeyValue()})});this.authChange.emit(e)}setApiKeyValue(t){let e=z(b({},this.auth??{type:"apikey"}),{type:"apikey",apikey:z(b({},this.auth?.apikey),{in:this.apiKeyIn(),key:this.apiKeyKey(),value:t})});this.authChange.emit(e)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-auth-editor"]],inputs:{auth:"auth"},outputs:{authChange:"authChange"},decls:11,vars:3,consts:[[1,"wrap"],[1,"bar"],[1,"type",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[1,"in",3,"ngModel"],[1,"main"],[1,"empty"],[1,"grid"],[1,"in",3,"ngModelChange","ngModel"],["nzValue","header","nzLabel","in: header"],["nzValue","query","nzLabel","in: query"],[1,"row"],[1,"label"],["nz-input","","placeholder","username",3,"ngModelChange","ngModel"],["nz-input","","placeholder","password","type","password",3,"ngModelChange","ngModel"],["nz-input","","placeholder","Bearer token",3,"ngModelChange","ngModel"],["nz-input","","placeholder","x-api-key / api_key",3,"ngModelChange","ngModel"],["nz-input","","placeholder","value",3,"ngModelChange","ngModel"],["nzType","info","nzShowIcon","","nzMessage","\u63D0\u793A\uFF1Aquery \u578B API Key \u4E0D\u4F1A\u5199\u5165\u8BF7\u6C42\u5934\uFF0C\u4F1A\u5728\u53D1\u9001\u65F6\u62FC\u63A5\u5230 URL \u67E5\u8BE2\u53C2\u6570\u4E2D\u3002"],["nzType","info","nzShowIcon","","nzMessage","\u63D0\u793A\uFF1Aheader \u578B API Key \u4F1A\u5728\u53D1\u9001\u65F6\u5199\u5165\u8BF7\u6C42\u5934\u3002"]],template:function(e,n){if(e&1&&(l(0,"div",0)(1,"div",1)(2,"nz-select",2),C("ngModelChange",function(r){return n.setType(r)}),S(3,Vi,1,2,"nz-option",3,Ce),a(),g(5,Oi,3,1,"nz-select",4),a(),l(6,"div",5),g(7,Fi,2,0,"div",6)(8,Bi,9,2,"div",7)(9,Ki,5,1,"div",7)(10,Ui,11,4,"div",7),a()()),e&2){let o;s(2),_("ngModel",n.type()),s(),D(n.types),s(2),f(n.type()==="apikey"?5:-1),s(2),f((o=n.type())==="none"?7:o==="basic"?8:o==="bearer"?9:o==="apikey"?10:-1)}},dependencies:[A,P,H,K,j,ie,he,ve,F,W,Be,Ee],styles:[".wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:220px}.bar[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #f0f0f0}.type[_ngcontent-%COMP%]{width:160px}.in[_ngcontent-%COMP%]{width:140px}.main[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;padding-top:10px}.empty[_ngcontent-%COMP%]{padding:12px;opacity:.7}.grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.row[_ngcontent-%COMP%]{display:grid;grid-template-columns:100px 1fr;align-items:center;gap:10px}.label[_ngcontent-%COMP%]{font-size:12px;opacity:.8}"]})};var Sn=je(He());var Hi=(i,t)=>t.id;function Wi(i,t){if(i&1){let e=x();l(0,"label",10),C("ngModelChange",function(o){d(e);let r=c();return m(r.toggleEnabled(o))}),a()}if(i&2){let e=c();_("ngModel",e.isAllEnabled())}}function Ji(i,t){if(i&1){let e=x();l(0,"div",9)(1,"div",2)(2,"label",11),C("ngModelChange",function(o){let r=d(e).$index,p=c();return m(p.setEnabled(r,o))}),a()(),l(3,"div",12)(4,"input",13),C("ngModelChange",function(o){let r=d(e).$index,p=c();return m(p.setKey(r,o))}),a()(),l(5,"div",5)(6,"input",14),C("ngModelChange",function(o){let r=d(e).$index,p=c();return m(p.setValue(r,o))}),a()(),l(7,"div",6)(8,"input",14),C("ngModelChange",function(o){let r=d(e).$index,p=c();return m(p.setDescription(r,o))}),a()(),l(9,"div",7)(10,"button",15),C("click",function(){let o=d(e).$index,r=c();return m(r.removeRow(o))}),h(11,"nz-icon",16),a()()()}if(i&2){let e=t.$implicit,n=c();s(2),_("ngModel",e.enabled)("nzDisabled",!n.keepTrailingBlank),s(),_("nz-tooltip",n.keepTrailingBlank?"":"\u81EA\u52A8\u63D0\u53D6Url \u4E2D\u7684 Path \u53C2\u6570\uFF0C\u652F\u6301{param} \u4E0E :param"),s(),_("readonly",!n.keepTrailingBlank)("placeholder",n.keyPlaceholder)("ngModel",e.key),s(2),_("placeholder",n.valuePlaceholder)("ngModel",e.value),s(2),_("placeholder",n.descriptionLabel)("ngModel",e.description)}}var be=class i{ngOnChanges(t){t.rows&&(this.rows=this.withTrailingBlank(this.rows))}rows=[];rowsChange=new y;keyLabel="Key";valueLabel="Value";keyPlaceholder="key";valuePlaceholder="value";descriptionLabel="Description";keepTrailingBlank=!0;enabledCount=v(()=>this.rows.filter(t=>t.enabled).length);isAllEnabled(){return this.rows.length>0&&this.rows.every(t=>t.enabled)}toggleEnabled(t){let e=this.rows.map(n=>z(b({},n),{enabled:t}));this.emit(e)}emit(t){this.rowsChange.emit(t)}withTrailingBlank(t){return this.keepTrailingBlank?this.ensureTrailingBlank(t):t}createBlankRow(){return{id:(0,Sn.uniqueId)(),key:"",value:"",description:"",enabled:!0}}isBlankRow(t){if(!t)return!0;let e=(t.key??"").trim(),n=(t.value??"").trim(),o=(t.description??"").trim();return!e&&!n&&!o}ensureTrailingBlank(t){let e=Array.isArray(t)?t:[];if(e.length===0)return[this.createBlankRow()];let n=e[e.length-1];return this.isBlankRow(n)?e:[...e,this.createBlankRow()]}sameRowsRefOrContent(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;let n=this.isBlankRow(t[t.length-1]),o=this.isBlankRow(e[e.length-1]);return n===o}removeRow(t){let e=this.rows.filter((n,o)=>o!==t);this.emit(this.withTrailingBlank(e))}setEnabled(t,e){let n=this.rows.map((o,r)=>r===t?z(b({},o),{enabled:e}):o);this.emit(n)}setValue(t,e){this.patchRow(t,{value:e})}setKey(t,e){this.patchRow(t,{key:e})}setDescription(t,e){this.patchRow(t,{description:e})}patchRow(t,e){let n=this.rows.map((o,r)=>r===t?b(b({},o),e):o);this.emit(this.withTrailingBlank(n))}addRow(){let t=[...this.rows,this.createBlankRow()];this.emit(this.withTrailingBlank(t))}clearDisabled(){let t=this.rows.filter(e=>e.enabled);this.emit(this.withTrailingBlank(t))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-kv-table"]],inputs:{rows:"rows",keyLabel:"keyLabel",valueLabel:"valueLabel",keyPlaceholder:"keyPlaceholder",valuePlaceholder:"valuePlaceholder",descriptionLabel:"descriptionLabel",keepTrailingBlank:"keepTrailingBlank"},outputs:{rowsChange:"rowsChange"},features:[ne],decls:14,vars:4,consts:[[1,"kv-wrap"],[1,"kv-head"],[1,"c-check"],["nz-checkbox","",3,"ngModel"],[1,"c-key"],[1,"c-val"],[1,"c-des"],[1,"c-op"],[1,"kv-body"],[1,"kv-row"],["nz-checkbox","",3,"ngModelChange","ngModel"],["nz-checkbox","",3,"ngModelChange","ngModel","nzDisabled"],[1,"c-key",3,"nz-tooltip"],["nz-input","",3,"ngModelChange","readonly","placeholder","ngModel"],["nz-input","",3,"ngModelChange","placeholder","ngModel"],["nz-button","","nzType","text","nz-tooltip","","nzTooltipTitle","\u5220\u9664",3,"click"],["nzType","minus-circle","nzTheme","outline"]],template:function(e,n){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2),g(3,Wi,1,1,"label",3),a(),l(4,"div",4),u(5),a(),l(6,"div",5),u(7),a(),l(8,"div",6),u(9),a(),h(10,"div",7),a(),l(11,"div",8),S(12,Ji,12,10,"div",9,Hi),a()()),e&2&&(s(3),f(n.keepTrailingBlank?3:-1),s(2),k(n.keyLabel),s(2),k(n.valueLabel),s(2),k(n.descriptionLabel),s(3),D(n.rows))},dependencies:[A,P,H,K,j,I,O,V,rt,ot,F,W,$,J,Re,Ie],styles:[".kv-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.kv-toolbar[_ngcontent-%COMP%]{padding:8px 0;display:flex;justify-content:space-between;align-items:center;gap:10px}.kv-toolbar[_ngcontent-%COMP%] .left[_ngcontent-%COMP%], .kv-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.7}.kv-head[_ngcontent-%COMP%]{display:grid;grid-template-columns:40px 1fr 1fr 2fr 44px;gap:8px;padding:6px 0;font-size:14px;border-bottom:1px solid #f0f0f0;align-items:center}.kv-head[_ngcontent-%COMP%] .c-key[_ngcontent-%COMP%], .kv-head[_ngcontent-%COMP%] .c-val[_ngcontent-%COMP%], .kv-head[_ngcontent-%COMP%] .c-des[_ngcontent-%COMP%]{opacity:.75}.kv-body[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;padding:8px 0}.kv-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:40px 1fr 1fr 2fr 44px;gap:8px;align-items:center;padding:6px 0;border-bottom:1px dashed #f0f0f0}.c-check[_ngcontent-%COMP%], .c-op[_ngcontent-%COMP%]{display:flex;justify-content:center}.kv-empty[_ngcontent-%COMP%]{padding:16px;opacity:.75;display:flex;align-items:center;justify-content:space-between;border:1px dashed #e8e8e8;border-radius:8px;margin-top:8px}"]})};var Dn=je(He());function Zi(i,t){if(i&1&&h(0,"nz-option",3),i&2){let e=t.$implicit;_("nzValue",e)("nzLabel",e)}}function Gi(i,t){if(i&1){let e=x();l(0,"button",10),C("click",function(){d(e);let o=c();return m(o.formatJson())}),u(1,"\u683C\u5F0F\u5316 JSON"),a()}}function Qi(i,t){i&1&&(l(0,"div",7),u(1,"\u65E0 Body"),a())}function Yi(i,t){if(i&1){let e=x();l(0,"textarea",11),C("ngModelChange",function(o){d(e);let r=c();return m(r.setTextBody(o))}),a()}if(i&2){let e=c();_("ngModel",e.textBody())}}function Xi(i,t){if(i&1&&(l(0,"div",13),u(1),a()),i&2){let e=c(2);s(),k(e.jsonError())}}function eo(i,t){if(i&1){let e=x();l(0,"textarea",12),C("ngModelChange",function(o){d(e);let r=c();return m(r.setJsonText(o))}),a(),g(1,Xi,2,1,"div",13)}if(i&2){let e=c();_("ngModel",e.jsonText()),s(),f(e.jsonError()?1:-1)}}function to(i,t){if(i&1){let e=x();l(0,"app-kv-table",14),C("rowsChange",function(o){d(e);let r=c();return m(r.setUrlRows(o))}),a()}if(i&2){let e=c();_("rows",e.urlRows())}}function no(i,t){i&1&&(l(0,"div",7),u(1,"MVP \u4EC5\u652F\u6301 none/json/text/urlencoded"),a())}var Ct=class i{msg=q(De);body;bodyChange=new y;bodySig=E(void 0);modes=["none","json","text","urlencoded","form","binary"];_jsonText=E("");mode=v(()=>this.bodySig()?.mode??"none");contentType=v(()=>this.bodySig()?.contentType??"");jsonText=v(()=>{if(this.mode()!=="json")return"";let t=this.body?.content;if(typeof t=="string")return t;if(t==null)return this._jsonText()||"";try{return JSON.stringify(t,null,2)}catch{return this._jsonText()||""}});jsonError=E("");textBody=v(()=>this.body?.mode==="text"?String(this.body?.content??""):"");urlRows=v(()=>{if(this.body?.mode!=="urlencoded")return[];let t=this.body?.content;return!t||typeof t!="object"||Array.isArray(t)?[]:Object.entries(t).map(([e,n])=>({key:e,value:String(n??""),enabled:!0,id:(0,Dn.uniqueId)()}))});setMode(t){let e=this.body,n=z(b({},e??{}),{mode:t});if(n.contentType||(t==="json"&&(n.contentType="application/json; charset=utf-8"),t==="text"&&(n.contentType="text/plain; charset=utf-8"),t==="urlencoded"&&(n.contentType="application/x-www-form-urlencoded; charset=utf-8"),t==="none"&&(n.contentType=void 0)),t==="none"){this.bodyChange.emit({mode:"none"});return}t==="json"&&e?.mode!=="json"&&(n.content={}),t==="text"&&e?.mode!=="text"&&(n.content=""),t==="urlencoded"&&e?.mode!=="urlencoded"&&(n.content={}),this.bodyChange.emit(n)}ngOnChanges(t){if(t.body){let e=t.body.currentValue;this.bodySig.set(e),e?.mode==="json"&&(typeof e.content=="string"?this._jsonText.set(e.content):this._jsonText.set(e.content?JSON.stringify(e.content,null,2):""),this.jsonError.set(""))}}setContentType(t){let e=this.mode(),n=z(b({},this.body??{mode:e}),{contentType:t});this.bodyChange.emit(n)}setTextBody(t){let e=z(b({},this.body??{mode:"text"}),{mode:"text",content:t});this.bodyChange.emit(e)}setJsonText(t){this._jsonText.set(t),this.jsonError.set("");try{let e=t.trim()?JSON.parse(t):{},n=z(b({},this.body??{mode:"json"}),{mode:"json",content:e});this.bodyChange.emit(n)}catch{this.jsonError.set("JSON \u4E0D\u5408\u6CD5\uFF08\u7EE7\u7EED\u8F93\u5165\u5373\u53EF\uFF09")}}formatJson(){if(this.mode()!=="json")return;let e=this.body?.content;try{let n=JSON.stringify(e??{},null,2);this._jsonText.set(n),this.jsonError.set("");let o=z(b({},this.body??{mode:"json"}),{mode:"json",content:e??{}});this.bodyChange.emit(o),this.msg.success("\u5DF2\u683C\u5F0F\u5316")}catch{this.msg.error("\u683C\u5F0F\u5316\u5931\u8D25")}}setUrlRows(t){let e={};for(let o of t){if(!o.enabled)continue;let r=(o.key??"").trim();r&&(e[r]=String(o.value??""))}let n=z(b({},this.body??{mode:"urlencoded"}),{mode:"urlencoded",content:e});this.bodyChange.emit(n)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-body-editor"]],inputs:{body:"body"},outputs:{bodyChange:"bodyChange"},features:[ne],decls:13,vars:4,consts:[[1,"wrap"],[1,"bar"],[1,"mode",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["nz-input","","placeholder","content-type\uFF08\u53EF\u9009\uFF09",1,"ctype",3,"ngModelChange","ngModel"],["nz-button","","nzType","default"],[1,"main"],[1,"empty"],["nz-input","","placeholder","\u6587\u672C\u5185\u5BB9",1,"ta",3,"ngModel"],["keyLabel","Key","valueLabel","Value","keyPlaceholder","a","valuePlaceholder","1",3,"rows"],["nz-button","","nzType","default",3,"click"],["nz-input","","placeholder","\u6587\u672C\u5185\u5BB9",1,"ta",3,"ngModelChange","ngModel"],["nz-input","","placeholder","{ }",1,"ta",3,"ngModelChange","ngModel"],[1,"err"],["keyLabel","Key","valueLabel","Value","keyPlaceholder","a","valuePlaceholder","1",3,"rowsChange","rows"]],template:function(e,n){if(e&1&&(l(0,"div",0)(1,"div",1)(2,"nz-select",2),C("ngModelChange",function(r){return n.setMode(r)}),S(3,Zi,1,2,"nz-option",3,Ce),a(),l(5,"input",4),C("ngModelChange",function(r){return n.setContentType(r)}),a(),g(6,Gi,2,0,"button",5),a(),l(7,"div",6),g(8,Qi,2,0,"div",7)(9,Yi,1,1,"textarea",8)(10,eo,2,2)(11,to,1,1,"app-kv-table",9)(12,no,2,0,"div",7),a()()),e&2){let o;s(2),_("ngModel",n.mode()),s(),D(n.modes),s(2),_("ngModel",n.contentType()),s(),f(n.mode()==="json"?6:-1),s(2),f((o=n.mode())==="none"?8:o==="text"?9:o==="json"?10:o==="urlencoded"?11:12)}},dependencies:[A,P,H,K,j,I,O,V,Q,F,W,ie,he,ve,be],styles:[".wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:260px}.bar[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #f0f0f0}.mode[_ngcontent-%COMP%]{width:140px}.ctype[_ngcontent-%COMP%]{flex:1 1 auto}.main[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto;padding-top:10px}.ta[_ngcontent-%COMP%]{width:100%;height:100%;min-height:240px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px}.empty[_ngcontent-%COMP%]{padding:12px;opacity:.7}.err[_ngcontent-%COMP%]{margin-top:8px;color:#a8071a;font-size:12px}"]})};var gt=class i{http=q(Cn);base="/api/client";async listRequests(t,e){let n=new ue().set("scope",t);return e&&(n=n.set("projectId",e)),await L(this.http.get(`${this.base}/requests`,n))}async saveRequest(t,e,n){return await L(this.http.post(`${this.base}/requests`,{scope:t,projectId:e,request:n}))}async updateRequest(t,e,n){return await L(this.http.post(`${this.base}/requests/update`,{scope:t,projectId:e,request:n}))}async deleteRequest(t,e,n){let o=new ue().set("scope",e);return n&&(o=o.set("projectId",n)),await L(this.http.delete(`${this.base}/requests/${t}`,o))}async send(t){return await L(this.http.post(`${this.base}/send`,t))}async listHistory(t,e){let n=new ue().set("scope",t);return e&&(n=n.set("projectId",e)),await L(this.http.get(`${this.base}/history`,n))}async listEnvs(t,e){let n=new ue().set("scope",t);return e&&(n=n.set("projectId",e)),await L(this.http.get(`${this.base}/envs`,n))}async saveEnv(t,e,n){return await L(this.http.post(`${this.base}/envs`,{scope:t,projectId:e,env:n}))}async deleteEnv(t,e,n){let o=new ue().set("scope",e);return n&&(o=o.set("projectId",n)),await L(this.http.delete(`${this.base}/envs/${t}`,o))}async listCollections(t,e){let n=new ue().set("scope",t);return e&&(n=n.set("projectId",e)),await L(this.http.get(`${this.base}/collections`,n))}async createCollection(t){return await L(this.http.post(`${this.base}/collections`,t))}async updateCollection(t,e,n,o){let r=new ue().set("scope",n).set("projectId",o??"");return await L(this.http.post(`${this.base}/collections/${t}`,e,r))}async deleteCollection(t,e,n){let o=new ue().set("scope",e).set("projectId",n??"");return await L(this.http.delete(`${this.base}/collections/${t}`,o))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};var io=/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g;function Vn(i=[]){let t={};for(let e of i)e.enabled&&(t[e.key]=String(e.value??""));return t}function oo(i,t){let e=new Set;return{out:i.replace(io,(o,r)=>r in t?String(t[r]??""):(e.add(r),`{{${r}}}`)),missing:[...e]}}function On(i,t){let e=new Set;for(let n of i){if(!n)continue;let{missing:o}=oo(n,t);o.forEach(r=>e.add(r))}return[...e]}var Fn=je(He());function Ke(i){if(!i)return[];let t=i;try{t=new URL(i).pathname||""}catch{t=i.split("?")[0].split("#")[0]||"";let w=t.indexOf("/");w>=0&&(t=t.slice(w))}let e=ro(t),n=[],o=/(?:^|\/):([A-Za-z_][A-Za-z0-9_]*)/g,r;for(;r=o.exec(e);)n.push(r[1]);let p=/\{([A-Za-z_][A-Za-z0-9_]*)\}/g;for(;r=p.exec(e);)n.push(r[1]);return n}function ro(i){try{return decodeURIComponent(i)}catch{return i}}function Ft(i,t){let e=Ke(i),n=Array.isArray(t)?t:[],o=new Map;for(let p of n){let w=(p.key??"").trim();w&&(o.has(w)||o.set(w,p))}return e.map(p=>{let w=o.get(p);return w?z(b({},w),{key:p,enabled:!0}):{key:p,value:"",description:"",enabled:!0,id:(0,Fn.uniqueId)()}})}var Bn=je(He());function Bt(i){return(i??[]).map(t=>({key:t.key,value:t.value,enabled:t.enabled,id:(0,Bn.uniqueId)(),description:t.description}))}function Kn(i,t){let e=new Map(t?.map(n=>[n.key,n]));return i.filter(n=>n.key?.trim()).map(n=>({key:n.key.trim(),value:String(n.value??""),enabled:n.enabled!==!1,secret:e.get(n.key)?.secret}))}function lo(i,t){if(!t)return!0;let e=(i.name??"").toLowerCase(),n=(i.url??"").toLowerCase();return e.includes(t)||n.includes(t)}function We(i){if(i==null)return null;let t=String(i).trim();if(!t)return null;let e=t.toLowerCase();return e==="null"||e==="undefined"?null:t}function ao(i,t){return(i.parentId??"").localeCompare(t.parentId??"")||(i.order??0)-(t.order??0)||(i.name??"").localeCompare(t.name??"")}function so(i,t){return(We(i.collectionId)??"").localeCompare(We(t.collectionId)??"")||(i.order??0)-(t.order??0)||(i.name??"").localeCompare(t.name??"")||(i.url??"").localeCompare(t.url??"")}function Kt(i,t,e){let n=e?.trim().toLowerCase()||"",o=[...i??[]].sort(ao),r=[...t??[]].sort(so),p=new Map;for(let R of o){let le=We(R.parentId),te=p.get(le)??[];te.push(R),p.set(le,te)}let w=new Map;for(let R of r){if(!lo(R,n))continue;let le=We(R.collectionId),te=w.get(le)??[];te.push(R),w.set(le,te)}let M=(R,le)=>({key:`r:${String(R.id)}`,kind:"request",id:String(R.id),title:R.name??"\u672A\u547D\u540D",name:R.name,subtitle:R.url??"",method:R.method??"",parentKey:le,children:[]}),N=(R,le)=>{let te=We(R.id),Nt=`c:${te}`,Hn=p.get(te)??[],Wn=w.get(te)??[];return{key:Nt,kind:R.kind??"collection",id:te,title:R.name??"\u672A\u547D\u540D",name:R.name,parentKey:le,children:[...Hn.map(kt=>N(kt,Nt)),...Wn.map(kt=>M(kt,Nt))]}},Y=p.get(null)??[],At=w.get(null)??[];return[...Y.map(R=>N(R,null)),...At.map(R=>M(R,null))]}var Ln=je(He());var co=i=>({$implicit:i,level:0}),po=(i,t)=>({$implicit:i,level:t}),jn=(i,t)=>t.key;function mo(i,t){if(i&1&&(l(0,"div",8),u(1),a()),i&2){let e=c(2);s(),k(e.nameErr())}}function uo(i,t){if(i&1){let e=x();l(0,"label",5),u(1,"\u540D\u79F0"),a(),l(2,"nz-input-wrapper")(3,"input",6),C("ngModelChange",function(o){d(e);let r=c();return m(r.name.set(o))}),a(),h(4,"nz-icon",7),a(),g(5,mo,2,1,"div",8)}if(i&2){let e=c();s(3),_("ngModel",e.name()),s(),_("nzType",e.iconForKind()),s(),f(e.nameErr()?5:-1)}}function _o(i,t){if(i&1&&ge(0,12),i&2){let e=t.$implicit;c(2);let n=G(9);_("ngTemplateOutlet",n)("ngTemplateOutletContext",Me(2,co,e))}}function Co(i,t){i&1&&(l(0,"div",13),u(1,"\u6682\u65E0\u76EE\u5F55"),a())}function go(i,t){if(i&1&&(l(0,"div",8),u(1),a()),i&2){let e=c(2);s(),k(e.moveErr())}}function fo(i,t){if(i&1){let e=x();l(0,"div",9)(1,"div",10),C("click",function(){d(e);let o=c();return m(o.select(null))}),h(2,"nz-icon",11),l(3,"span"),u(4,"\u6839\u76EE\u5F55"),a()(),S(5,_o,1,4,"ng-container",12,jn),g(7,Co,2,0,"div",13),a(),g(8,go,2,1,"div",8)}if(i&2){let e=c();s(),X("selected",e.selectedKey()===null),s(4),D(e.filteredNodes()),s(2),f(e.filteredNodes().length?-1:7),s(),f(e.moveErr()?8:-1)}}function ho(i,t){if(i&1&&ge(0,12),i&2){let e=t.$implicit,n=c(2).level;c();let o=G(9);_("ngTemplateOutlet",o)("ngTemplateOutletContext",Qt(2,po,e,n+1))}}function vo(i,t){if(i&1&&S(0,ho,1,5,"ng-container",12,jn),i&2){let e=c().$implicit;D(e.children)}}function yo(i,t){if(i&1){let e=x();l(0,"div",14),C("click",function(){let o=d(e).$implicit,r=c();return m(r.select(o.key))}),l(1,"button",15),C("click",function(o){let r=d(e).$implicit;return c().toggle(r.key),m(o.stopPropagation())}),h(2,"nz-icon",16),a(),h(3,"nz-icon",17),l(4,"span",18),u(5),a()(),g(6,vo,2,0)}if(i&2){let e=t.$implicit,n=t.level,o=c();Zt("padding-left",8+n*16,"px"),X("selected",o.selectedKey()===e.key),s(),_("disabled",!(e.children!=null&&e.children.length)),s(),_("nzType",e.children!=null&&e.children.length?o.expanded(e.key)?"down":"right":"minus"),s(),_("nzType",e.kind==="folder"?"folder":"database"),s(2),k(e.title),s(),f(((e.children==null?null:e.children.length)??0)&&o.expanded(e.key)?6:-1)}}function xo(i){return i?`c:${i}`:null}function wo(i){return i&&i.startsWith("c:")?i.slice(2):null}var Ae=class i{data=q(xn);modalRef=q(tt);q=E("");name=E("");selectedKey=E(null);expandedMap=E({});mode=v(()=>this.data.mode??this.data.handleType);showParentPicker=v(()=>this.mode()==="move"||this.mode()==="pick");showName=v(()=>this.mode()==="create"||this.mode()==="rename");iconForKind=v(()=>{let t=this.data.kind??this.data.createBody?.kind??"collection";return t==="folder"?"folder":t==="request"?"api":"database"});ngOnInit(){let t=this.mode();if(t==="create"){let r=this.data.createBody;this.name.set(r?.name??""),this.selectedKey.set(null);return}if(t==="rename"||t==="update"){let r=this.data;this.name.set(r?.initialName??""),this.selectedKey.set(null);return}let e=this.data.initialParentId;this.selectedKey.set(e?e.startsWith("c:")?e:xo(e):null);let n=this.data.nodes??[],o={};for(let r of n)o[r.key]=!0;this.expandedMap.set(o)}expanded(t){return!!this.expandedMap()[t]}toggle(t){let e=b({},this.expandedMap());e[t]=!e[t],this.expandedMap.set(e)}select(t){this.selectedKey.set(t)}forbiddenKeys=v(()=>{if(this.mode()!=="move"||this.mode()!=="pick")return new Set;let t=this.data.target;if(!t||t.kind==="request")return new Set;let e=`c:${t.id}`,n=new Set([e]),o=this.data.nodes??[],r=w=>{for(let M of w.children??[])M.kind!=="request"&&(n.add(M.key),r(M))},p=w=>{for(let M of w)M.key===e?r(M):M.children?.length&&p(M.children)};return p(o),n});nodesForPicker=v(()=>{let t=(this.data.nodes??[]).filter(o=>o.kind!=="request"),e=this.forbiddenKeys(),n=o=>{let r=[];for(let p of o){if(p.kind==="request"||e.has(p.key))continue;let w=n(p.children??[]);r.push(z(b({},p),{children:w}))}return r};return n(t)});filteredNodes=v(()=>{if(!this.showParentPicker())return[];let t=this.q().trim().toLowerCase();if(!t)return this.nodesForPicker();let e=w=>(w.title??"").toLowerCase().includes(t),n=w=>{let M=[];for(let N of w){let Y=n(N.children??[]);(e(N)||Y.length)&&M.push(z(b({},N),{children:Y}))}return M},o=n(this.nodesForPicker()),r=b({},this.expandedMap()),p=w=>{for(let M of w)M.children?.length&&(r[M.key]=!0),M.children?.length&&p(M.children)};return p(o),this.expandedMap.set(r),o});nameErr=v(()=>{if(!this.showName())return"";let t=(this.name()??"").trim();return t?t.length>50?"\u540D\u79F0\u8FC7\u957F\uFF08<= 50\uFF09":"":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"});moveErr=v(()=>(this.showParentPicker(),""));canSubmit=v(()=>this.showName()&&this.nameErr()?!1:(this.showParentPicker(),!0));ok(){let t=this.mode();if(t==="rename"||t==="update"){let n={name:(this.name()??"").trim()};this.modalRef.close(n);return}if(t==="create"){let n=this.data.createBody,o=z(b({},n),{name:(this.name()??"").trim(),parentId:n.parentId??null});this.modalRef.close(o);return}let e=wo(this.selectedKey());this.modalRef.close({parentId:e})}cancel(){this.modalRef.close(null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-collection-modal"]],decls:10,vars:3,consts:[["nodeTpl",""],[1,"modal-body"],[1,"footer"],["nz-button","",3,"click"],["nz-button","","nzType","primary",3,"click","disabled"],[1,"label"],["nz-input","","placeholder","\u8BF7\u8F93\u5165\u540D\u79F0","autofocus","",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzTheme","outline",3,"nzType"],[1,"hint","err"],[1,"picker"],[1,"row","root",3,"click"],["nzType","home"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"empty"],[1,"row",3,"click"],["nz-button","","nzType","text","nzSize","small",1,"chev",3,"click","disabled"],[3,"nzType"],[1,"icon",3,"nzType"],[1,"title"]],template:function(e,n){if(e&1){let o=x();l(0,"div",1),g(1,uo,6,3),g(2,fo,9,4),a(),l(3,"div",2)(4,"button",3),C("click",function(){return d(o),m(n.cancel())}),u(5,"\u53D6\u6D88"),a(),l(6,"button",4),C("click",function(){return d(o),m(n.ok())}),u(7," \u786E\u5B9A "),a()(),U(8,yo,7,9,"ng-template",null,0,ee)}e&2&&(s(),f(n.showName()?1:-1),s(),f(n.showParentPicker()?2:-1),s(4),_("disabled",!n.canSubmit()))},dependencies:[A,Ze,P,H,K,j,F,W,fe,Qe,I,O,V,Q,$,J],styles:[".modal-body[_ngcontent-%COMP%]{display:grid;gap:12px}.label[_ngcontent-%COMP%]{font-weight:600}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.75}.hint.err[_ngcontent-%COMP%]{color:#cf1322;opacity:1}.picker[_ngcontent-%COMP%]{max-height:52vh;overflow:auto;border:1px solid rgba(0,0,0,.08);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px;border-radius:10px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s;border:1px solid transparent}.row[_ngcontent-%COMP%]:hover{background:#0000000a}.row.selected[_ngcontent-%COMP%]{background:#00000014;border-color:#00000014}.row.root[_ngcontent-%COMP%]{font-weight:600}.chev[_ngcontent-%COMP%]{flex:0 0 auto}.chev[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:12px;transition:transform .15s}.icon[_ngcontent-%COMP%]{opacity:.75}.title[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty[_ngcontent-%COMP%]{padding:16px;opacity:.6;text-align:center}.footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}"]})};var ft=class i{modal=q(nt);async createCollection(t){let e=this.modal.create({nzTitle:t.kind==="folder"?"\u65B0\u5EFA\u76EE\u5F55":"\u65B0\u5EFA\u96C6\u5408",nzContent:Ae,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"create",createBody:t.createBody,nodes:t.nodes}});return await L(e.afterClose)}async renameCollection(t){let e=this.modal.create({nzTitle:"\u91CD\u547D\u540D",nzContent:Ae,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"rename",kind:t.kind,nodes:t.nodes,targetId:t.targetId,initialName:t.initialName}});return await L(e.afterClose)}async moveTarget(t){let e=this.modal.create({nzTitle:"\u79FB\u52A8\u5230",nzContent:Ae,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"move",nodes:t.nodes,target:t.target,initialParentId:t.initialParentId??null}});return await L(e.afterClose)}async pickCollection(t){let e=this.modal.create({nzTitle:"\u9009\u62E9\u96C6\u5408/\u76EE\u5F55",nzContent:Ae,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"pick",nodes:t.nodes}});return await L(e.afterClose)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};function bo(){return Date.now()}function zo(i){let t=Math.random().toString(16).slice(2,10);return`${i}_${t}_${Date.now().toString(16)}`}var ze=class i{api=q(gt);msg=q(De);projectState=q(wn);collectionModal=q(ft);scope=E("project");loading=E(!1);q=E("");sending=E(!1);requests=E([]);activeRequestId=E(null);collections=E([]);activeCollectionId=E(null);nodes=v(()=>Kt(this.collections(),this.requests(),"").filter(t=>t.kind!=="request"));filteredNodes=v(()=>{let t=this.q().toLowerCase();return Kt(this.collections(),this.requests(),t??"")});historyOpen=E(!1);historyLoading=E(!1);histories=E([]);envs=E([]);envLoading=E(!1);activeEnvId=E(null);lastResult=E(null);projectId=v(()=>this.projectState.currentProject()?.id??"");activeRequest=E(null);activeEnv=v(()=>{let t=this.activeEnvId();return t?this.envs().find(e=>e.id===t)??null:null});envVarRecord=v(()=>{let t=this.activeEnv();return t?Vn(t.variables):{}});collectionPath=v(()=>{let t=this.activeCollectionId();if(!t)return null;let e=this.collections().find(r=>r.id===t);if(!e)return null;let n=[],o=`${e.id}`;for(;o;){let r=this.collections().find(p=>p.id===o);r?(n.unshift(r.name||"\u672A\u547D\u540D"),o=r.parentId?`${r.parentId}`:null):o=null}return n.join(" / ")});projectCtx=v(()=>{let t=this.projectState.currentProject();return t?{scope:"project",projectId:t.id}:null});constructor(){Rt(()=>{this.scope()!=="project"||!this.projectId()||this.loadAll()}),Rt(()=>{if(this.scope()!=="project"){this.loadEnvs();return}this.projectId()&&this.loadEnvs()})}async loadAll(){let t=this.projectCtx();if(t){this.loading.set(!0);try{let[e,n]=await Promise.all([this.api.listCollections(t.scope,t.projectId),this.api.listRequests(t.scope,t.projectId)]);this.collections.set(e??[]),this.requests.set(n??[])}finally{this.loading.set(!1)}}}async reloadCollections(){let t=this.projectCtx();if(!t)return;let e=await this.api.listCollections(t.scope,t.projectId);this.collections.set(e??[])}async reloadRequests(){let t=this.projectCtx();if(!t)return;let e=await this.api.listRequests(t.scope,t.projectId);this.requests.set(e??[])}async loadRequests(){let t=this.projectCtx();if(t){this.loading.set(!0);try{let e=await this.api.listRequests(t.scope,t.projectId);this.requests.set(e);let n=this.activeRequestId();if(n&&e.some(o=>o.id===n))return;e.length?this.setActive(e[0]):(this.setActive(null),this.activeRequestId.set(null),this.lastResult.set(null),this.newRequest())}catch(e){this.msg.error(e?.message??"\u52A0\u8F7D\u8BF7\u6C42\u5931\u8D25")}finally{this.loading.set(!1)}}}selectRequest(t){let e=this.requests().find(n=>n.id===t)||null;this.setActive(e),this.activeCollectionId.set(e?.collectionId??null)}selectCollection(t){this.activeCollectionId.set(t)}async newCollection(t){let e=this.projectCtx();if(!e)return;let n={scope:e.scope,projectId:e.projectId,name:t.name??"",kind:t.kind??"collection",parentId:t.parentId??null},o=this.nodes(),r=await this.collectionModal.createCollection({createBody:n,nodes:o,kind:n.kind,initialParentId:n.parentId??null});if(r){let p=await this.api.createCollection(r);this.msg.success("\u521B\u5EFA\u6210\u529F"),this.collections.update(w=>[...w,p]),this.activeCollectionId.set(p.id)}}async deleteCollection(t,e){if(e==="request"){this.removeRequest(t);return}if(await this.api.deleteCollection(t,this.scope(),this.projectId()),this.msg.success("\u5DF2\u5220\u9664"),this.collections.update(n=>n.filter(o=>o.id!==t)),this.activeCollectionId()===t){let n=this.collections()[0];this.activeCollectionId.set(n?.id??null)}}async moveCollection(t,e){let n="";if(e=="request"){let p=this.requests().find(w=>w.id===t);if(!p){this.msg.error("\u8BF7\u6C42\u4E0D\u5B58\u5728");return}n=p.collectionId??""}else{let p=this.collections().find(w=>w.id===t);if(!p){this.msg.error("\u96C6\u5408\u4E0D\u5B58\u5728");return}n=p.parentId??""}let o=this.nodes(),{parentId:r}=await this.collectionModal.moveTarget({nodes:o,target:{kind:e,id:t},initialParentId:n})||{};if(r!==void 0)if(e==="request"){let p=this.requests().find(M=>M.id===t);if(!p){this.msg.error("\u8BF7\u6C42\u4E0D\u5B58\u5728");return}let w={collectionId:r??null,id:p.id};p.collectionId=r??null,await this.api.updateRequest(this.scope(),this.projectId(),w),this.requests.update(M=>M.map(N=>N.id===t?z(b({},N),{collectionId:r??null}):N)),this.setActive(p.id===this.activeRequestId()?z(b({},p),{collectionId:r??null}):p),this.msg.success("\u4FEE\u6539\u6210\u529F")}else{let p={parentId:r??null},w=await this.api.updateCollection(t,p,this.scope(),this.projectId());this.collections.update(M=>M.map(N=>N.id===t?w:N)),this.activeCollectionId.set(w.id),this.msg.success("\u4FEE\u6539\u6210\u529F")}}async renameCollection(t,e){let n="";if(e=="request"){let p=this.requests().find(w=>w.id===t);if(!p){this.msg.error("\u8BF7\u6C42\u4E0D\u5B58\u5728");return}n=p.name??""}else{let p=this.collections().find(w=>w.id===t);if(!p){this.msg.error("\u96C6\u5408\u4E0D\u5B58\u5728");return}n=p.name??""}let o=this.nodes(),r=await this.collectionModal.renameCollection({nodes:o,kind:e,targetId:t,initialName:n});if(r)if(e==="request")await this.api.updateRequest(this.scope(),this.projectId(),{id:t,name:r.name}),this.requests.update(p=>p.map(w=>w.id===t?z(b({},w),{name:r.name??w.name}):w)),this.msg.success("\u4FEE\u6539\u6210\u529F"),this.reloadRequests();else{let p=await this.api.updateCollection(t,r,this.scope(),this.projectId());this.collections.update(w=>w.map(M=>M.id===t?p:M)),this.msg.success("\u4FEE\u6539\u6210\u529F"),this.reloadCollections()}}newRequest(t={}){let e=this.projectId();if(this.scope()==="project"&&!e){this.msg.warning("\u8BF7\u5148\u9009\u62E9\u9879\u76EE");return}let n=bo(),o={id:zo("req"),name:"",method:"GET",url:"",collectionId:t.collectionId??null,query:[],pathParams:[],headers:[],body:{mode:"none"},auth:{type:"none"},options:{followRedirects:!0,timeoutMs:3e4},tags:[],createdAt:n,updatedAt:n};this.setActive(o),this.activeCollectionId.set(t.collectionId??null)}patchActive(t){let e=this.activeRequest();if(!e)return;let n=z(b(b({},e),t),{updatedAt:Date.now()});this.activeRequest.set(n)}async saveActive(){let t=this.activeRequest();if(!t)return;let e=this.scope(),n=e==="project"?this.projectId():void 0;if(e==="project"&&!n)throw new Error("projectId missing");if(!t.name?.trim()){this.msg.warning("\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A");return}if(!t.url?.trim()){this.msg.warning("URL \u4E0D\u80FD\u4E3A\u7A7A");return}if(!t.collectionId){let o=this.nodes(),{parentId:r}=await this.collectionModal.pickCollection({nodes:o})||{};t.collectionId=r??null}this.loading.set(!0);try{await this.api.saveRequest(e,n,t),this.msg.success("\u5DF2\u4FDD\u5B58"),this.activeRequest.set(b({},t)),await this.loadRequests()}catch(o){this.msg.error(o?.message??"\u4FDD\u5B58\u5931\u8D25")}finally{this.loading.set(!1)}}async sendActive(){let t=this.activeRequest();t&&await this.sendResolvedRequest(t)}async removeRequest(t){await this.api.deleteRequest(t,this.scope(),this.projectId()),this.msg.success("\u5DF2\u5220\u9664");let e=this.requests().filter(n=>n.id!==t);if(this.requests.set(e),this.activeRequestId()===t){let n=e[0]?.id??null;this.activeRequestId.set(n)}}setActive(t){!t||!t.id||t.id===this.activeRequestId()||(t.headers.length&&(t.headers=this.ensureKvId(t.headers)),t.query.length&&(t.query=this.ensureKvId(t.query)),t.pathParams.length&&(t.pathParams=this.ensureKvId(t.pathParams)),this.activeRequest.set(t),this.activeRequestId.set(t.id),this.lastResult.set(null))}ensureKvId(t){return t.map(e=>(e.id||(e.id=(0,Ln.uniqueId)()),e))}openHistory(){this.historyOpen.set(!0),this.loadHistory()}closeHistory(){this.historyOpen.set(!1)}async loadHistory(){this.historyLoading.set(!0);try{let t=await this.api.listHistory(this.scope(),this.projectId());this.histories.set(t)}finally{this.historyLoading.set(!1)}}async replayHistory(t){await this.sendResolvedRequest(t.requestSnapshot)}async sendResolvedRequest(t){let e=this.scope(),n=e==="project"?this.projectId():void 0;if(e==="project"&&!n){this.msg.warning("\u8BF7\u5148\u9009\u62E9\u9879\u76EE");return}this.sending.set(!0),this.lastResult.set(null);try{let o=await this.api.send({scope:e,projectId:n||void 0,request:t,envId:this.activeEnvId()??void 0,projectRoot:this.projectState.currentProject()?.root});this.lastResult.set(o),o.error?this.msg.error(`${o.error.code}: ${o.error.message}`):this.msg.success(`HTTP ${o.response?.status??""} (${o.metrics.durationMs}ms)`)}catch(o){this.msg.error(o?.message??"\u53D1\u9001\u5931\u8D25")}finally{this.sending.set(!1)}}async loadEnvs(){let t=this.scope(),e=t==="project"?this.projectId():void 0;if(!(t==="project"&&!e)){this.envLoading.set(!0);try{let n=await this.api.listEnvs(t,e);this.envs.set(n);let o=this.activeEnvId();if(o&&n.some(r=>r.id===o))return;this.activeEnvId.set(n[0]?.id??null)}finally{this.envLoading.set(!1)}}}setActiveEnv(t){this.activeEnvId.set(t)}async saveEnv(t){let e=this.scope(),n=e==="project"?this.projectId():void 0;await this.api.saveEnv(e,n||void 0,t),await this.loadEnvs()}async deleteEnv(t){await this.api.deleteEnv(t,this.scope(),this.projectId()),this.activeEnvId()===t&&this.activeEnvId.set(null),await this.loadEnvs()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ne({token:i,factory:i.\u0275fac,providedIn:"root"})};var Mo=["class","component"],To=(i,t)=>t.id;function Eo(i,t){if(i&1){let e=x();l(0,"div",9),C("click",function(){let o=d(e).$implicit,r=c();return m(r.selectEditEnv(o.id))}),l(1,"div",10),u(2),a(),l(3,"div",11),u(4),a()()}if(i&2){let e,n=t.$implicit,o=c();X("active",n.id===((e=o.draft())==null?null:e.id)),s(2),k(n.name),s(2),ce("",n.variables.length," vars")}}function Ao(i,t){i&1&&(l(0,"div",6),u(1,"\u6682\u65E0\u73AF\u5883"),a())}function No(i,t){i&1&&(l(0,"div",6),u(1,"\u9009\u62E9\u4E00\u4E2A\u73AF\u5883\u8FDB\u884C\u7F16\u8F91"),a())}function ko(i,t){if(i&1){let e=x();l(0,"div",8)(1,"div",12)(2,"div",13),u(3,"\u540D\u79F0"),a(),l(4,"input",14),C("ngModelChange",function(o){d(e);let r=c();return m(r.setName(o))}),a()(),l(5,"div",12)(6,"div",13),u(7,"\u524D\u7F6EURL"),a(),l(8,"input",14),C("ngModelChange",function(o){d(e);let r=c();return m(r.setBaseUrl(o))}),a()(),l(9,"div",15)(10,"app-kv-table",16),C("rowsChange",function(o){d(e);let r=c();return m(r.varsRows.set(o))}),a()(),l(11,"div",17)(12,"button",3),C("click",function(){d(e);let o=c();return m(o.save())}),u(13,"\u4FDD\u5B58"),a(),l(14,"button",18),C("nzOnConfirm",function(){d(e);let o=c();return m(o.remove())}),u(15," \u5220\u9664 "),a(),l(16,"button",19),C("click",function(){d(e);let o=c();return m(o.useThisEnv())}),u(17,"\u8BBE\u4E3A\u5F53\u524D"),a()()()}if(i&2){let e=c();s(4),_("ngModel",e.draft().name),s(4),_("ngModel",e.draft().baseUrl),s(2),_("rows",e.varsRows())}}function Un(){return Date.now()}function qo(i){let t=Math.random().toString(16).slice(2,10);return`${i}_${t}_${Date.now().toString(16)}`}var ht=class i{envChange=new y;store=q(ze);modalRef=q(tt);msg=q(De);draft=E(null);varsRows=E([]);selectEditEnv(t){this.store.activeEnvId.set(t);let e=this.store.envs().find(n=>n.id===t);e&&(this.draft.set(z(b({},e),{variables:e.variables})),this.varsRows.set(Bt(e.variables)))}createEnv(){let t=Un(),e={id:qo("env"),scope:"project",name:"\u672A\u547D\u540D\u73AF\u5883",variables:[],createdAt:t,updatedAt:t};this.draft.set(e),this.varsRows.set(Bt(e.variables))}setName(t){let e=this.draft();e&&this.draft.set(z(b({},e),{name:t}))}setBaseUrl(t){let e=this.draft();e&&this.draft.set(z(b({},e),{baseUrl:t}))}async save(){let t=this.draft();if(!t)return;let e=z(b({},t),{variables:Kn(this.varsRows(),t.variables),updatedAt:Un()});await this.store.saveEnv(e),this.store.activeEnvId.set(e.id),this.msg.success("\u73AF\u5883\u53D8\u91CF\u4FDD\u5B58\u6210\u529F"),this.draft.set(e)}async remove(){let t=this.store.activeEnvId();t&&(await this.store.deleteEnv(t),this.store.activeEnvId.set(null),this.draft.set(null),this.varsRows.set([]),this.msg.success("\u73AF\u5883\u53D8\u91CF\u5220\u9664\u6210\u529F"))}useThisEnv(){let t=this.store.activeEnvId();t&&this.store.setActiveEnv(t)}close(){this.modalRef.close()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-env-modal",8,"component"]],outputs:{envChange:"envChange"},attrs:Mo,decls:12,vars:2,consts:[[1,"drawer"],[1,"left"],[1,"toolbar"],["nz-button","","nzType","primary",3,"click"],[1,"env-list"],[1,"env-item",3,"active"],[1,"empty"],[1,"right"],[1,"form"],[1,"env-item",3,"click"],[1,"name"],[1,"meta"],[1,"row"],[1,"label"],["nz-input","",3,"ngModelChange","ngModel"],[1,"vars"],["keyLabel","Key","valueLabel","Value","keyPlaceholder","TOKEN","valuePlaceholder","xxx",3,"rowsChange","rows"],[1,"actions"],["nz-button","","nzType","default","nzDanger","","nz-popconfirm","","nzPopconfirmTitle","\u786E\u8BA4\u5220\u9664\u8BE5\u73AF\u5883\uFF1F",3,"nzOnConfirm"],["nz-button","","nzType","default",3,"click"]],template:function(e,n){if(e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),C("click",function(){return n.createEnv()}),u(4,"\u65B0\u5EFA"),a()(),l(5,"div",4),S(6,Eo,5,4,"div",5,To),g(8,Ao,2,0,"div",6),a()(),l(9,"div",7),g(10,No,2,0,"div",6)(11,ko,18,3,"div",8),a()()),e&2){let o;s(6),D(n.store.envs()),s(2),f(n.store.envs().length?-1:8),s(2),f((o=n.draft())!=null&&o.id?11:10)}},dependencies:[A,P,H,K,j,be,I,O,V,Q,F,W,Ve,it],styles:[".drawer[_ngcontent-%COMP%]{display:grid;grid-template-columns:180px 1fr;gap:12px;height:100%}.left[_ngcontent-%COMP%]{border-right:1px solid #f0f0f0;padding-right:12px}.toolbar[_ngcontent-%COMP%]{padding-bottom:10px}.env-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.env-item[_ngcontent-%COMP%]{padding:8px;border:1px solid #f0f0f0;border-radius:8px;cursor:pointer}.env-item.active[_ngcontent-%COMP%]{background:#f5f5f5}.name[_ngcontent-%COMP%]{font-weight:600}.meta[_ngcontent-%COMP%]{font-size:12px;opacity:.7}.right[_ngcontent-%COMP%]{min-width:0}.empty[_ngcontent-%COMP%]{padding:12px;opacity:.7}.row[_ngcontent-%COMP%]{display:grid;grid-template-columns:70px 1fr;gap:10px;align-items:center;margin-bottom:10px}.label[_ngcontent-%COMP%]{font-size:14px;opacity:.8}.vars[_ngcontent-%COMP%]{height:420px}.actions[_ngcontent-%COMP%]{display:flex;gap:8px;margin-top:12px}"]})};var Io=(i,t)=>t.id;function Ro(i,t){if(i&1&&h(0,"nz-option",2),i&2){let e=t.$implicit;_("nzValue",e.id)("nzLabel",e.name)}}var vt=class i{store=q(ze);modalService=q(nt);openEnvModal(){let t=this.modalService.create({nzTitle:"\u73AF\u5883\u53D8\u91CF",nzFooter:null,nzMaskClosable:!1,nzContent:ht,nzWidth:"1020px",nzCentered:!0});t.afterOpen.subscribe(()=>{let e=t.getContentComponent();e&&this.store.activeEnvId()?e.selectEditEnv(this.store.activeEnvId()??""):e.createEnv()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-env-picker"]],decls:6,vars:3,consts:[[1,"picker"],[1,"sel",3,"ngModelChange","nzPlaceHolder","ngModel","nzAllowClear"],[3,"nzValue","nzLabel"],["nz-button","","nzType","text","nz-tooltip","","nzTooltipTitle","\u7BA1\u7406\u73AF\u5883\u53D8\u91CF",3,"click"],["nzType","setting","nzTheme","outline"]],template:function(e,n){e&1&&(l(0,"div",0)(1,"nz-select",1),C("ngModelChange",function(r){return n.store.setActiveEnv(r)}),S(2,Ro,1,2,"nz-option",2,Io),a(),l(4,"button",3),C("click",function(){return n.openEnvModal()}),h(5,"nz-icon",4),a()()),e&2&&(s(),_("nzPlaceHolder","Env")("ngModel",n.store.activeEnvId())("nzAllowClear",!0),s(),D(n.store.envs()))},dependencies:[A,P,K,j,ie,he,ve,I,O,V,Ge,F,Re,Ie,$,J,Ve],styles:[".picker[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.sel[_ngcontent-%COMP%]{width:160px}"]})};var yt=class i{options;optionsChange=new y;timeoutMs=v(()=>this.options?.timeoutMs??3e4);followRedirects=v(()=>this.options?.followRedirects??!0);insecureTLS=v(()=>this.options?.insecureTLS??!1);proxy=v(()=>this.options?.proxy??"");emit(t){this.optionsChange.emit(t)}setTimeout(t){let e=Number(t);this.emit(z(b({},this.options??{}),{timeoutMs:isNaN(e)?void 0:e}))}setFollowRedirects(t){this.emit(z(b({},this.options??{}),{followRedirects:t}))}setInsecureTLS(t){this.emit(z(b({},this.options??{}),{insecureTLS:t}))}setProxy(t){this.emit(z(b({},this.options??{}),{proxy:t||void 0}))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-advanced-editor"]],inputs:{options:"options"},outputs:{optionsChange:"optionsChange"},decls:25,vars:4,consts:[[1,"wrap"],[1,"grid"],[1,"row"],[1,"label"],["nz-input","","type","number","min","0","placeholder","30000",3,"ngModelChange","ngModel"],[1,"desc"],[1,"row","checkbox"],["nz-checkbox","",3,"ngModelChange","ngModel"],["nz-input","","placeholder","http://127.0.0.1:7890",3,"ngModelChange","ngModel"],[1,"desc","muted"],["nzType","info","nzShowIcon","","nzMessage","\u8BF4\u660E\uFF1AProxy \u914D\u7F6E\u5DF2\u4FDD\u5B58\uFF0C\u4F46\u5F53\u524D NodeHttpClient \u5C1A\u672A\u5B9E\u73B0\u4EE3\u7406\u652F\u6301\uFF0C\u8BF7\u52FF\u4F9D\u8D56\u8BE5\u9009\u9879\u8FDB\u884C\u8C03\u8BD5\u3002"]],template:function(e,n){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4,"Timeout (ms)"),a(),l(5,"input",4),C("ngModelChange",function(r){return n.setTimeout(r)}),a(),l(6,"div",5),u(7,"\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4\uFF0C\u5355\u4F4D\u6BEB\u79D2\uFF080 \u8868\u793A\u4E0D\u8D85\u65F6\uFF09"),a()(),l(8,"div",6)(9,"label",7),C("ngModelChange",function(r){return n.setFollowRedirects(r)}),u(10," Follow Redirects "),a(),l(11,"div",5),u(12,"\u662F\u5426\u81EA\u52A8\u8DDF\u968F HTTP \u91CD\u5B9A\u5411\uFF08302 / 301\uFF09"),a()(),l(13,"div",6)(14,"label",7),C("ngModelChange",function(r){return n.setInsecureTLS(r)}),u(15," Insecure TLS "),a(),l(16,"div",5),u(17,"\u8DF3\u8FC7 TLS \u8BC1\u4E66\u6821\u9A8C\uFF08\u4EC5\u5728 Node \u73AF\u5883\u4E0B\u5C3D\u529B\u652F\u6301\uFF09"),a()(),l(18,"div",2)(19,"div",3),u(20,"Proxy"),a(),l(21,"input",8),C("ngModelChange",function(r){return n.setProxy(r)}),a(),l(22,"div",9),u(23,"\u4EE3\u7406\u5730\u5740\uFF08\u5F53\u524D\u7248\u672C\u4EC5\u4FDD\u5B58\uFF0C\u4E0D\u53C2\u4E0E\u5B9E\u9645\u8BF7\u6C42\uFF09"),a()(),h(24,"nz-alert",10),a()()),e&2&&(s(5),_("ngModel",n.timeoutMs()),s(4),_("ngModel",n.followRedirects()),s(5),_("ngModel",n.insecureTLS()),s(7),_("ngModel",n.proxy()))},dependencies:[A,P,H,mn,K,un,j,rt,ot,F,W,Be,Ee],styles:[".wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:240px}.grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:10px}.row[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:10px}.row.checkbox[_ngcontent-%COMP%]{grid-template-columns:1fr}.label[_ngcontent-%COMP%]{font-size:12px;opacity:.8}.desc[_ngcontent-%COMP%]{grid-column:2 / span 1;font-size:12px;opacity:.65}.row.checkbox[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{grid-column:1 / span 1;margin-left:24px}.muted[_ngcontent-%COMP%]{color:#999}"]})};var jt=()=>[];function So(i,t){if(i&1){let e=x();l(0,"div",3)(1,"div",4),u(2,"Path \u53C2\u6570"),a(),l(3,"app-kv-table",14),C("rowsChange",function(o){d(e);let r=c();return m(r.patch.emit({pathParams:o}))}),a()()}if(i&2){let e=c();s(3),_("keepTrailingBlank",!1)("rows",(e.req==null?null:e.req.pathParams)||Je(2,jt))}}var xt=class i{req=null;patch=new y;static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-request-tabs"]],inputs:{req:"req"},outputs:{patch:"patch"},decls:20,vars:8,consts:[[1,"tabs"],["nzTitle","Params"],[1,"tab"],[1,"item"],[1,"title"],["keyLabel","\u53C2\u6570\u540D","valueLabel","\u53C2\u6570\u503C","descriptionLabel","\u8BF4\u660E","keyPlaceholder","param","valuePlaceholder","value",3,"rowsChange","rows"],["nzTitle","Headers"],["keyLabel","Header","valueLabel","Value","keyPlaceholder","x-header","valuePlaceholder","value",3,"rowsChange","rows"],["nzTitle","Body"],[3,"bodyChange","body"],["nzTitle","Auth"],[3,"authChange","auth"],["nzTitle","Advanced"],[3,"optionsChange","options"],["keyLabel","\u53C2\u6570\u540D","valueLabel","\u53C2\u6570\u503C","descriptionLabel","\u8BF4\u660E","keyPlaceholder","param","valuePlaceholder","value",3,"rowsChange","keepTrailingBlank","rows"]],template:function(e,n){e&1&&(l(0,"nz-tabs",0)(1,"nz-tab",1)(2,"div",2)(3,"div",3)(4,"div",4),u(5,"Query \u53C2\u6570"),a(),l(6,"app-kv-table",5),C("rowsChange",function(r){return n.patch.emit({query:r})}),a()(),g(7,So,4,3,"div",3),a()(),l(8,"nz-tab",6)(9,"div",2)(10,"app-kv-table",7),C("rowsChange",function(r){return n.patch.emit({headers:r})}),a()()(),l(11,"nz-tab",8)(12,"div",2)(13,"app-body-editor",9),C("bodyChange",function(r){return n.patch.emit({body:r})}),a()()(),l(14,"nz-tab",10)(15,"div",2)(16,"app-auth-editor",11),C("authChange",function(r){return n.patch.emit({auth:r})}),a()()(),l(17,"nz-tab",12)(18,"div",2)(19,"app-advanced-editor",13),C("optionsChange",function(r){return n.patch.emit({options:r})}),a()()()()),e&2&&(s(6),_("rows",(n.req==null?null:n.req.query)||Je(6,jt)),s(),f(!(n.req==null||n.req.pathParams==null)&&n.req.pathParams.length?7:-1),s(3),_("rows",(n.req==null?null:n.req.headers)||Je(7,jt)),s(3),_("body",n.req==null?null:n.req.body),s(3),_("auth",n.req==null?null:n.req.auth),s(3),_("options",n.req==null?null:n.req.options))},dependencies:[ct,st,at,be,Ct,_t,yt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}app-kv-table[_ngcontent-%COMP%]{display:block;height:100%}.tabs[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;height:100%}.tab[_ngcontent-%COMP%]{height:100%;overflow:hidden auto} nz-tabs.tabs .ant-tabs-content{height:100%} nz-tabs.tabs .ant-tabs-content .ant-tabs-tabpane{height:100%}"]})};function Do(i,t){if(i&1&&h(0,"nz-option",2),i&2){let e=t.$implicit;_("nzValue",e)("nzLabel",e)}}function Vo(i,t){if(i&1){let e=x();l(0,"div",7)(1,"nz-tag",8),u(2),a(),l(3,"a",9),C("click",function(){d(e);let o=c();return m(o.openEnv())}),u(4,"\u53BB\u914D\u7F6E"),a()()}if(i&2){let e=c();s(2),ce(" \u672A\u89E3\u6790\u53D8\u91CF\uFF1A",e.missingVars().join(", ")," ")}}var wt=class i{envVars={};openEnv;method="GET";url="";sending=!1;envName=null;baseUrl=null;methodChange=new y;urlChange=new y;urlCommit=new y;send=new y;save=new y;methods=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"];missingVars=v(()=>On([this.draftUrl],this.envVars));draftUrl="";t;ngOnChanges(t){t.url&&(this.draftUrl=this.url??"")}onDraftChange(t){this.draftUrl=t??"",this.t&&window.clearTimeout(this.t),this.t=window.setTimeout(()=>{this.urlChange.emit(this.draftUrl)},250)}commit(){this.t&&(window.clearTimeout(this.t),this.t=void 0),this.urlChange.emit(this.draftUrl),this.urlCommit.emit(this.draftUrl)}placeholder=v(()=>this.baseUrl?'"/"\u5F00\u5934':"http://...");previewUrl=v(()=>{let t=(this.url??"").trim();if(!t||Oo(t))return"";let e=(this.baseUrl??"").trim();if(!e)return"";try{return new URL(t,e).toString()}catch{return""}});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-request-urlbar"]],inputs:{envVars:"envVars",openEnv:"openEnv",method:"method",url:"url",sending:"sending",envName:"envName",baseUrl:"baseUrl"},outputs:{methodChange:"methodChange",urlChange:"urlChange",urlCommit:"urlCommit",send:"send",save:"save"},features:[ne],decls:11,vars:6,consts:[[1,"bar"],[1,"method",3,"ngModelChange","ngModel"],[1,"m",3,"nzValue","nzLabel"],[1,"url",3,"nzAddonBefore"],["nz-input","",3,"ngModelChange","blur","keydown.enter","placeholder","ngModel"],["nz-button","","nzType","primary",3,"click","nzLoading"],["nz-button","","nzType","default",3,"click"],[1,"var-hint"],["nzColor","warning"],[3,"click"]],template:function(e,n){e&1&&(l(0,"div",0)(1,"nz-select",1),C("ngModelChange",function(r){return n.methodChange.emit(r)}),S(2,Do,1,2,"nz-option",2,Ce),a(),l(4,"nz-input-wrapper",3)(5,"input",4),C("ngModelChange",function(r){return n.onDraftChange(r)})("blur",function(){return n.commit()})("keydown.enter",function(){return n.commit()}),a()(),l(6,"button",5),C("click",function(){return n.send.emit()}),u(7,"\u53D1\u9001"),a(),l(8,"button",6),C("click",function(){return n.save.emit()}),u(9,"\u4FDD\u5B58"),a()(),g(10,Vo,5,1,"div",7)),e&2&&(s(),_("ngModel",n.method),s(),D(n.methods),s(2),_("nzAddonBefore",n.baseUrl?n.baseUrl+" ":void 0),s(),_("placeholder",n.placeholder())("ngModel",n.draftUrl),s(),_("nzLoading",n.sending),s(4),f(n.missingVars().length?10:-1))},dependencies:[A,P,H,K,j,I,O,V,Q,F,W,fe,ie,he,ve,xe,ye],styles:[".bar[_ngcontent-%COMP%]{display:flex;gap:10px;padding:10px;border-bottom:1px solid #f0f0f0;align-items:center}.method[_ngcontent-%COMP%]{width:120px}.url[_ngcontent-%COMP%]{flex:1 1 auto}.var-hint[_ngcontent-%COMP%]{padding:4px 10px 8px;font-size:12px;display:flex;gap:8px;align-items:center}"]})};function Oo(i){return/^https?:\/\//i.test(i)}function Fo(i,t){if(i&1){let e=x();l(0,"app-request-urlbar",0),C("methodChange",function(o){d(e);let r=c();return m(r.patch.emit({method:o}))})("urlChange",function(o){d(e);let r=c();return m(r.onUrlChange(o))})("urlCommit",function(o){d(e);let r=c();return m(r.onUrlCommit(o))})("send",function(){d(e);let o=c();return m(o.send.emit())})("save",function(){d(e);let o=c();return m(o.save.emit())}),a(),l(1,"div",1)(2,"nz-input-wrapper",2)(3,"input",3),C("ngModelChange",function(o){d(e);let r=c();return m(r.patch.emit({name:o}))}),a()()(),l(4,"app-request-tabs",4),C("patch",function(o){d(e);let r=c();return m(r.patch.emit(o))}),a()}if(i&2){let e=c();_("method",e.request.method)("baseUrl",e.baseUrl)("envVars",e.envVars)("openEnv",e.openEnv)("url",e.request.url)("sending",e.sending),s(2),_("nzAddonBefore",e.collectionPath||"\u672A\u5206\u7C7B"),s(),_("ngModel",e.request.name),s(),_("req",e.request)}}var bt=class i{request=null;sending=!1;envVars={};openEnv;baseUrl=null;patch=new y;send=new y;save=new y;collectionPath=null;methods=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"];onUrlCommit(t){let e=this.request;if(!e)return;let n=Ft(t,e.pathParams),o=Ke(e.url??""),r=Ke(t??"");(o.length!==r.length||o.some((w,M)=>w!==r[M]))&&this.patch.emit({pathParams:n})}onUrlChange(t){let e=this.request;if(!e){this.patch.emit({url:t});return}let n=Ft(t,e.pathParams),o=Ke(e.url??""),r=Ke(t??"");o.length!==r.length||o.some((w,M)=>w!==r[M])?this.patch.emit({url:t,pathParams:n}):this.patch.emit({url:t})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-request-editor"]],inputs:{request:"request",sending:"sending",envVars:"envVars",openEnv:"openEnv",baseUrl:"baseUrl",collectionPath:"collectionPath"},outputs:{patch:"patch",send:"send",save:"save"},decls:1,vars:1,consts:[[3,"methodChange","urlChange","urlCommit","send","save","method","baseUrl","envVars","openEnv","url","sending"],[1,"name"],[3,"nzAddonBefore"],["nz-input","","placeholder","\u672A\u547D\u540D\u63A5\u53E3\u540D\u79F0",3,"ngModelChange","ngModel"],[1,"tabs",3,"patch","req"]],template:function(e,n){e&1&&g(0,Fo,5,9),e&2&&f(n.request?0:-1)},dependencies:[A,P,H,K,j,I,F,W,fe,ie,Oe,xt,wt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.name[_ngcontent-%COMP%]{padding:10px;border-bottom:1px solid #f0f0f0}.tabs[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;padding:0 10px}app-request-tabs[_ngcontent-%COMP%]{flex:1 1 auto;height:0}"]})};var zt=class i{clipboard=q(En);curl=null;copy(t){this.clipboard.copy(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-curl-actions"]],inputs:{curl:"curl"},decls:17,vars:5,consts:[["menu","nzDropdownMenu"],[1,"wrap"],["nz-button","","nz-dropdown","","nzType","default","nzTrigger","hover","nzPlacement","bottomCenter",3,"disabled","nzDropdownMenu"],["nzType","copy","nzTheme","outline"],["nz-menu",""],["nz-menu-item",""],["nz-button","","nzType","text",3,"click","disabled"]],template:function(e,n){if(e&1){let o=x();l(0,"div",1)(1,"nz-space")(2,"button",2),h(3,"nz-icon",3),u(4," cURL "),a()(),l(5,"nz-dropdown-menu",null,0)(7,"ul",4)(8,"li",5)(9,"button",6),C("click",function(){return d(o),m(n.copy(n.curl.bash))}),u(10," cURL (Bash) "),a()(),l(11,"li",5)(12,"button",6),C("click",function(){return d(o),m(n.copy(n.curl.powershell))}),u(13," cURL (PS) "),a()(),l(14,"li",5)(15,"button",6),C("click",function(){return d(o),m(n.copy(n.curl.cmd))}),u(16," cURL (CMD) "),a()()()()()}if(e&2){let o=G(6);s(2),_("disabled",!n.curl)("nzDropdownMenu",o),s(7),_("disabled",!(n.curl!=null&&n.curl.bash)),s(3),_("disabled",!(n.curl!=null&&n.curl.powershell)),s(3),_("disabled",!(n.curl!=null&&n.curl.cmd))}},dependencies:[A,An,sn,an,I,O,V,Q,$,J,yn,Se,Pe,fn,vn,hn],encapsulation:2})};function Bo(i,t){if(i&1&&(l(0,"nz-tag",11),u(1),a(),l(2,"span",4),u(3),a()),i&2){let e,n,o=c();_("nzColor",o.statusColor()),s(),Gt(" ",(e=o.response())==null?null:e.status," ",((e=o.response())==null?null:e.statusText)||""," "),s(2),ce("",(n=o.response())==null?null:n.bodySize," bytes")}}function Ko(i,t){i&1&&(l(0,"span",4),u(1,"-"),a())}function jo(i,t){i&1&&(l(0,"div",7),h(1,"nz-spin"),a())}function Lo(i,t){if(i&1&&h(0,"nz-alert",8),i&2){let e=c();_("nzMessage",e.error())}}function Uo(i,t){i&1&&(l(0,"div",9),u(1,"\u53D1\u9001\u8BF7\u6C42\u540E\u5728\u6B64\u67E5\u770B\u54CD\u5E94"),a())}function $o(i,t){if(i&1&&(l(0,"pre",15),u(1),a()),i&2){let e=c(2);s(),k(e.prettyJson())}}function Ho(i,t){if(i&1&&(l(0,"pre",15),u(1),a()),i&2){let e,n=c(2);s(),k((e=n.response())==null?null:e.bodyText)}}function Wo(i,t){if(i&1&&(l(0,"div",18)(1,"div",20),u(2),a(),l(3,"div",21),u(4),a()()),i&2){let e,n=t.$implicit,o=c(2);s(2),k(n),s(2),k((e=o.response())==null||e.headers==null?null:e.headers[n])}}function Jo(i,t){if(i&1){let e=x();l(0,"nz-tabs",12),me("nzSelectedIndexChange",function(o){d(e);let r=c();return de(r.tabIndex,o)||(r.tabIndex=o),m(o)}),l(1,"nz-tab",13)(2,"div",14),g(3,$o,2,1,"pre",15)(4,Ho,2,1,"pre",15),a()(),l(5,"nz-tab",16)(6,"div",14)(7,"div",17),S(8,Wo,5,2,"div",18,Ce),a()()(),l(10,"nz-tab",19)(11,"div",14)(12,"pre",15),u(13),a()()()()}if(i&2){let e=c();pe("nzSelectedIndex",e.tabIndex),s(3),f(e.isJson()?3:4),s(5),D(e.headerKeys()),s(5),k(e.rawDump())}}var Mt=class i{sending=!1;result=null;resultSig=E(null);tabIndex=0;ngOnChanges(t){if(t.result){let e=t.result.currentValue;this.resultSig.set(e)}}error=v(()=>{let t=this.resultSig();return t&&t.error?t.error.message:null});curl=v(()=>{let t=this.resultSig();return t&&t.curl?t.curl:null});response=v(()=>{let t=this.resultSig();return t?t.response:null});headerKeys=v(()=>{let t=this.response()?.headers??{};return Object.keys(t).sort((e,n)=>e.localeCompare(n))});statusColor=v(()=>{let t=this.response()?.status??0;return t?t>=200&&t<300?"green":t>=300&&t<400?"blue":t>=400&&t<500?"orange":"red":"default"});isJson=v(()=>{let t=this.response();if(!t)return!1;if((t.headers?.["content-type"]??t.headers?.["Content-Type"]??"").toLowerCase().includes("application/json"))return!0;let n=(t.bodyText??"").trim();return n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]")});prettyJson=v(()=>{let t=(this.response()?.bodyText??"").trim();try{let e=JSON.parse(t);return JSON.stringify(e,null,2)}catch{return this.response()?.bodyText??""}});rawDump=v(()=>this.response()?JSON.stringify(this.response(),null,2):"");static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-response-viewer"]],inputs:{sending:"sending",result:"result"},features:[ne],decls:13,vars:3,consts:[[1,"wrap"],[1,"top"],[1,"left"],[1,"title"],[1,"meta"],[1,"right"],[3,"curl"],[1,"loading"],["nzType","error","nzShowIcon","",3,"nzMessage"],[1,"empty"],[1,"tabs",3,"nzSelectedIndex"],[3,"nzColor"],[1,"tabs",3,"nzSelectedIndexChange","nzSelectedIndex"],["nzTitle","Body"],[1,"pane"],[1,"code"],["nzTitle","Headers"],[1,"hlist"],[1,"hrow"],["nzTitle","Raw"],[1,"hk"],[1,"hv"]],template:function(e,n){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),u(4,"Response"),a(),g(5,Bo,4,4)(6,Ko,2,0,"span",4),a(),l(7,"div",5),h(8,"app-curl-actions",6),a()(),g(9,jo,2,0,"div",7)(10,Lo,1,1,"nz-alert",8)(11,Uo,2,0,"div",9)(12,Jo,14,3,"nz-tabs",10),a()),e&2&&(s(5),f(n.response()?5:6),s(3),_("curl",n.curl()),s(),f(n.sending?9:n.error()?10:n.response()?12:11))},dependencies:[A,ct,st,at,xe,ye,Oe,lt,Be,Ee,zt],styles:["[_nghost-%COMP%]{display:flex;height:100%;min-height:0}.wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0;width:100%}.top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid #f0f0f0}.left[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center}.title[_ngcontent-%COMP%]{font-weight:700}.meta[_ngcontent-%COMP%]{font-size:12px;opacity:.65}.loading[_ngcontent-%COMP%]{padding:16px}.empty[_ngcontent-%COMP%]{padding:16px;opacity:.6}.tabs[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0}.pane[_ngcontent-%COMP%]{height:100%;min-height:0;overflow:auto;padding:10px 12px}.code[_ngcontent-%COMP%]{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.hlist[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.hrow[_ngcontent-%COMP%]{display:grid;grid-template-columns:200px 1fr;gap:10px;padding:8px;border:1px solid #f0f0f0;border-radius:8px}.hk[_ngcontent-%COMP%]{font-weight:600;font-size:12px}.hv[_ngcontent-%COMP%]{font-size:12px;opacity:.85;word-break:break-word}"]})};var Zo=["envPicker"],Go=["class","component"],Qo=i=>({empty:i});function Yo(i,t){if(i&1){let e=x();l(0,"app-request-editor",11),C("patch",function(o){d(e);let r=c();return m(r.store.patchActive(o))})("save",function(){d(e);let o=c();return m(o.store.saveActive())})("send",function(){d(e);let o=c();return m(o.store.sendActive())}),a(),h(1,"app-response-viewer",12)}if(i&2){let e,n=c();_("collectionPath",n.store.collectionPath())("baseUrl",((e=n.store.activeEnv())==null?null:e.baseUrl)??null)("request",n.store.activeRequest())("sending",n.store.sending())("envVars",n.store.envVarRecord())("openEnv",n.openEnv),s(),_("sending",n.store.sending())("result",n.store.lastResult())}}function Xo(i,t){if(i&1&&h(0,"nz-empty",9),i&2){c();let e=G(11),n=G(13);_("nzNotFoundContent",e)("nzNotFoundFooter",n)}}function er(i,t){i&1&&(l(0,"span"),u(1,"\u6682\u65E0\u8BF7\u6C42\uFF0C\u70B9\u51FB\u5DE6\u4FA7\u9762\u677F\u53F3\u4E0A\u89D2\u201C"),h(2,"nz-icon",13),u(3,"\u201D \u521B\u5EFA\u8BF7\u6C42"),a())}function tr(i,t){if(i&1){let e=x();l(0,"button",14),C("click",function(){d(e);let o=c();return m(o.store.newRequest({collectionId:null}))}),u(1,"\u7ACB\u5373\u65B0\u589E"),a()}}function nr(i,t){if(i&1){let e=x();l(0,"app-api-history-drawer",15),C("close",function(){d(e);let o=c();return m(o.store.closeHistory())})("replay",function(o){d(e);let r=c();return m(r.store.replayHistory(o))}),a()}if(i&2){let e=c();_("loading",e.store.historyLoading())("histories",e.store.histories())}}var Tt=class i{store=q(ze);envPicker;openEnv=()=>{this.envPicker.openEnvModal()};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=T({type:i,selectors:[["app-api-client",8,"component"]],viewQuery:function(e,n){if(e&1&&Ht(Zo,5),e&2){let o;Wt(o=Jt())&&(n.envPicker=o.first)}},attrs:Go,decls:15,vars:13,consts:[["contentTpl",""],["footerTpl",""],[3,"title","loading","isFullscreen","isOverflowYAuto"],["ngProjectAs","actions",5,["actions"]],["nz-button","","nzType","text","nz-tooltip","","nzTooltipTitle","\u5386\u53F2\u8BB0\u5F55",3,"click"],["nzType","history","nzTheme","outline"],[1,"page"],[3,"qChange","select","createRequest","createCollection","createFolder","reload","delete","rename","move","nodes","q","activeId","loading"],[1,"content",3,"ngClass"],[3,"nzNotFoundContent","nzNotFoundFooter"],[3,"loading","histories"],[3,"patch","save","send","collectionPath","baseUrl","request","sending","envVars","openEnv"],[3,"sending","result"],["nzType","plus","nzTheme","outline"],["nz-button","","nzType","primary",3,"click"],[3,"close","replay","loading","histories"]],template:function(e,n){if(e&1){let o=x();l(0,"app-page-layout",2),ae(1,3),h(2,"app-env-picker"),l(3,"button",4),C("click",function(){return d(o),m(n.store.openHistory())}),h(4,"nz-icon",5),a(),se(),l(5,"nz-layout",6)(6,"app-request-collections",7),me("qChange",function(p){return d(o),de(n.store.q,p)||(n.store.q=p),m(p)}),C("select",function(p){return d(o),m(n.store.selectRequest(p))})("createRequest",function(p){return d(o),m(n.store.newRequest({collectionId:p.collectionId}))})("createCollection",function(){return d(o),m(n.store.newCollection({kind:"collection"}))})("createFolder",function(p){return d(o),m(n.store.newCollection({kind:"folder",parentId:p.collectionId}))})("reload",function(){return d(o),m(n.store.loadAll())})("delete",function(p){return d(o),m(n.store.deleteCollection(p.id,p.kind))})("rename",function(p){return d(o),m(n.store.renameCollection(p.id,p.kind))})("move",function(p){return d(o),m(n.store.moveCollection(p.id,p.kind))}),a(),l(7,"div",8),g(8,Yo,2,8)(9,Xo,1,2,"nz-empty",9),U(10,er,4,0,"ng-template",null,0,ee)(12,tr,2,0,"ng-template",null,1,ee),a()()(),g(14,nr,1,2,"app-api-history-drawer",10)}e&2&&(_("title","API \u8BF7\u6C42")("loading",n.store.loading())("isFullscreen",!0)("isOverflowYAuto",!1),s(6),_("nodes",n.store.filteredNodes()),pe("q",n.store.q),_("activeId",n.store.activeRequestId())("loading",n.store.loading()),s(),_("ngClass",Me(11,Qo,!n.store.activeRequest())),s(),f(n.store.activeRequest()?8:9),s(6),f(n.store.historyOpen()?14:-1))},dependencies:[A,en,_n,I,O,V,Q,$,J,Tn,Mn,Re,Ie,ut,bt,Mt,pt,vt,zn,bn],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;height:100%;overflow:hidden}.content.empty[_ngcontent-%COMP%]{justify-content:center}app-request-editor[_ngcontent-%COMP%]{flex:0 0 auto;height:50%}app-response-viewer[_ngcontent-%COMP%]{flex:0 0 auto;height:50%;overflow:auto}"]})};var ir=[{path:"",component:Tt}],Et=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=qe({type:i});static \u0275inj=ke({imports:[Pt.forChild(ir),Pt]})};var $n=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=qe({type:i});static \u0275inj=ke({imports:[A,Et]})};export{$n as ApiClientModule};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-HZ73CM45.js";import{a as T}from"./chunk-SNCDDYQR.js";import{F as x,f as w}from"./chunk-EP45FT55.js";import{B as J,C as k,D as H,E as b,M as W,N as X,x as M,z as B}from"./chunk-PTMJ422K.js";import{p as K}from"./chunk-53YRDYLS.js";import{Ca as L,Eb as C,Ec as z,Fb as g,Fc as G,O as D,Oa as r,Ra as m,Vb as p,Xb as U,bc as v,cc as h,e as Q,kc as f,ma as A,mb as F,na as R,qc as l,ra as O,rb as o,rd as V,tc as u,uc as P,v as N,vc as d,vd as i,xa as S,xb as c,ya as E}from"./chunk-SJG2JCPL.js";var q=["*"];function y(_,a){if(_&1){let t=f();v(0,"nz-icon",1),l("click",function(e){S(t);let n=u();return E(n.closeTag(e))}),h()}}var ee=(()=>{class _{cdr=O(V);renderer=O(c);el=O(m).nativeElement;directionality=O(M);destroyRef=O(L);nzMode="default";nzColor;nzChecked=!1;nzBordered=!0;nzOnClose=new o;nzCheckedChange=new o;dir="ltr";isPresetColor=!1;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked))}closeTag(t){this.nzOnClose.emit(t),t.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el)}clearPresetColor(){let t=new RegExp(`(ant-tag-(?:${[...k,...J].join("|")}))`,"g"),s=this.el.classList.toString(),e=[],n=t.exec(s);for(;n!==null;)e.push(n[1]),n=t.exec(s);this.el.classList.remove(...e)}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=H(this.nzColor)||b(this.nzColor):this.isPresetColor=!1,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`)}ngOnInit(){this.directionality.change?.pipe(B(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzColor:s}=t;s&&this.setPresetColor()}static \u0275fac=function(s){return new(s||_)};static \u0275cmp=C({type:_,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(s,e){s&1&&l("click",function(){return e.updateCheckedStatus()}),s&2&&(z("background-color",e.isPresetColor?"":e.nzColor),G("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir==="rtl")("ant-tag-borderless",!e.nzBordered))},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",i],nzBordered:[2,"nzBordered","nzBordered",i]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[r],ngContentSelectors:q,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(s,e){s&1&&(P(),d(0),p(1,y,1,0,"nz-icon",0)),s&2&&(F(),U(e.nzMode==="closeable"?1:-1))},dependencies:[X,W],encapsulation:2,changeDetection:0})}return _})(),De=(()=>{class _{static \u0275fac=function(s){return new(s||_)};static \u0275mod=g({type:_});static \u0275inj=R({imports:[ee]})}return _})();var Y={TASK_NOT_FOUND:{level:"silent"},TASK_ALREADY_RUNNING:{level:"toast",message:"\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C\u4E2D"},PROCESS_SPAWN_FAILED:{level:"toast",message:"\u4EFB\u52A1\u542F\u52A8\u5931\u8D25"},TASK_SPEC_NOT_FOUND:{level:"toast",message:"\u4EFB\u52A1\u89C4\u683C\u672A\u627E\u5230"},TASK_NOT_RUNNABLE:{level:"toast",message:"\u4EFB\u52A1\u4E0D\u53EF\u8FD0\u884C"},RUN_NOT_FOUND:{level:"toast",message:"\u8FD0\u884C\u5B9E\u4F8B\u672A\u627E\u5230"},TASK_ID_REQUIRED:{level:"toast",message:"\u4EFB\u52A1 ID \u4E3A\u5FC5\u586B\u9879"},COMMAND_NOT_FOUND:{level:"toast",message:"\u547D\u4EE4\u672A\u627E\u5230\uFF0C\u8BF7\u786E\u4FDD\u5DF2\u6B63\u786E\u5B89\u88C5\u6240\u9700\u8F6F\u4EF6"},PROJECT_NOT_FOUND:{level:"toast",message:"\u9879\u76EE\u4E0D\u5B58\u5728"},PROJECT_ROOT_INVALID:{level:"toast",message:"\u9879\u76EE\u6839\u76EE\u5F55\u65E0\u6548"},PROJECT_ALREADY_EXISTS:{level:"toast",message:"\u9879\u76EE\u5DF2\u5B58\u5728"},INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u9879\u76EE\u540D\u79F0"},TARGET_EXISTS:{level:"toast",message:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728"},INVALID_REPO_URL:{level:"toast",message:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740"},GIT_CHECKOUT_FAILED:{level:"toast",message:"Git \u68C0\u51FA\u5931\u8D25"},BOOTSTRAP_NOT_IN_PICK_STATE:{level:"toast",message:"\u5F53\u524D\u4E0D\u5904\u4E8E\u9009\u62E9\u6839\u76EE\u5F55\u72B6\u6001"},BOOTSTRAP_CTX_NOT_FOUND:{level:"toast",message:"\u5F15\u5BFC\u4E0A\u4E0B\u6587\u672A\u627E\u5230"},BOOTSTRAP_INVALID_PICKED_ROOT:{level:"toast",message:"\u9009\u62E9\u7684\u6839\u76EE\u5F55\u65E0\u6548"},BOOTSTRAP_NOT_WAITING_PICK:{level:"toast",message:"\u5F15\u5BFC\u672A\u5904\u4E8E\u7B49\u5F85\u9009\u62E9\u72B6\u6001"},PROJECT_ANGULAR_JSON_INVALID:{level:"toast",message:"angular.json \u65E0\u6548"},PROJECT_ANGULAR_JSON_NOT_FOUND:{level:"toast",message:"angular.json \u672A\u627E\u5230"},PROJECT_VITE_CONFIG_INVALID:{level:"toast",message:"vite \u914D\u7F6E\u65E0\u6548"},PROJECT_VUE_CONFIG_NOT_FOUND:{level:"toast",message:"vite \u914D\u7F6E\u672A\u627E\u5230"},CONFIG_BACKUP_NOT_FOUND:{level:"toast",message:"\u914D\u7F6E\u5907\u4EFD\u672A\u627E\u5230"},CONFIG_READ_FAILED:{level:"toast",message:"\u914D\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u635F\u574F"},CONFIG_CONFLICT:{level:"toast",message:"\u914D\u7F6E\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},FS_ALREADY_EXISTS:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u5DF2\u5B58\u5728"},FS_PATH_NOT_FOUND:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u672A\u627E\u5230"},FS_PERMISSION_DENIED:{level:"toast",message:"\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u88AB\u62D2\u7EDD"},FS_EXISTS_FAILED:{level:"toast",message:"\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u5B58\u5728\u65F6\u51FA\u9519"},FS_INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u540D\u79F0"},FS_MKDIR_FAILED:{level:"toast",message:"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"},INTERNAL_ERROR:{level:"toast",message:"\u7CFB\u7EDF\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},CONNECTION_LOST:{level:"banner",message:"\u4E0E\u672C\u5730\u670D\u52A1\u7684\u8FDE\u63A5\u5DF2\u65AD\u5F00",action:{retry:!0}},HTTP_ERROR:{level:"toast",message:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5"},UNAUTHORIZED:{level:"banner",message:"\u672A\u6388\u6743\u8BBF\u95EE\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55",action:{reload:!0}},UNKNOWN_ERROR:{level:"toast",message:"\u53D1\u751F\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},WS_ERROR:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5F02\u5E38",action:{retry:!0}},WS_CLOSED:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED",action:{retry:!0}},BAD_JSON:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684 JSON \u6570\u636E"},BAD_MSG:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684\u6D88\u606F\u683C\u5F0F"},OP_NOT_SUPPORTED:{level:"toast",message:"\u64CD\u4F5C\u4E0D\u88AB\u652F\u6301"},HANDLER_FAILED:{level:"toast",message:"\u6D88\u606F\u5904\u7406\u5931\u8D25"},TOPIC_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u6D88\u606F\u4E3B\u9898"},OP_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u64CD\u4F5C\u7C7B\u578B"},DEP_INSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5B89\u88C5\u5931\u8D25"},DEP_UNINSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5378\u8F7D\u5931\u8D25"},DEP_NOT_FOUND:{level:"toast",message:"\u4F9D\u8D56\u672A\u627E\u5230"},DASHBOARD_CONFLICT:{level:"toast",message:"\u4EEA\u8868\u76D8\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},WIDGET_NOT_FOUND:{level:"toast",message:"\u90E8\u4EF6\u672A\u627E\u5230"},WIDGET_LOCKED:{level:"toast",message:"\u90E8\u4EF6\u88AB\u9501\u5B9A\uFF0C\u65E0\u6CD5\u4FEE\u6539"},RSS_FETCH_FAILED:{level:"toast",message:"RSS \u6E90\u83B7\u53D6\u5931\u8D25"},INVALID_RSS_URL:{level:"toast",message:"\u65E0\u6548\u7684 RSS \u6E90\u5730\u5740"},KILL_PORT_FAILED:{level:"toast",message:"\u7AEF\u53E3\u91CA\u653E\u5931\u8D25"},INVALID_PORT:{level:"toast",message:"\u65E0\u6548\u7684\u7AEF\u53E3\u53F7"},COLLECTION_NOT_EMPTY:{level:"toast",message:"\u96C6\u5408\u4E0D\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u5220\u9664"},INVALID_JSON:{level:"dev-only"},INVALID_MSG:{level:"dev-only"}};var I=class _{ui=O(x);dispatch(a,t,s){let e=Y[a];if(!e){this.ui.error(t??"\u672A\u77E5\u9519\u8BEF");return}let n=typeof e.message=="function"?e.message(s):e.message??t;switch(e.level){case"silent":return;case"toast":this.ui.error(n??"\u64CD\u4F5C\u5931\u8D25");return;case"banner":this.ui.banner?.(n??"\u7CFB\u7EDF\u5F02\u5E38",e.action);return;case"dev-only":T.production||console.warn("[DEV ERROR]",a,s);return}}static \u0275fac=function(t){return new(t||_)};static \u0275prov=A({token:_,factory:_.\u0275fac,providedIn:"root"})};var j=Q(Z()),Ve=(_,a)=>{let t=O(I),s=j.uniqueId("req-");return _=_.clone({setHeaders:{"X-Request-Id":s}}),a(_).pipe(D(e=>{if(T.production||console.error(`[HTTP][${s}] Error:`,e),e instanceof w)return t.dispatch(e.code,e.message,e.details),N(()=>e);if(e instanceof K){let n=e.error?.error?.code??"HTTP_ERROR";return t.dispatch(n,e.message,e.error),N(()=>e)}return t.dispatch("INTERNAL_ERROR"),N(()=>e)}))};export{ee as a,De as b,Ve as c};
1
+ import{a as Z}from"./chunk-HZ73CM45.js";import{a as T}from"./chunk-SNCDDYQR.js";import{H as x,f as w}from"./chunk-2P5WKSWB.js";import{B as J,C as k,D as H,E as b,M as W,N as X,x as M,z as B}from"./chunk-5EQOKH7G.js";import{q as K}from"./chunk-X3HFJACM.js";import{Ca as L,Eb as C,Ec as z,Fb as g,Fc as G,O as D,Oa as r,Ra as m,Vb as p,Xb as U,bc as v,cc as h,e as Q,kc as f,ma as A,mb as F,na as R,qc as l,ra as O,rb as o,rd as V,tc as u,uc as P,v as N,vc as d,vd as i,xa as S,xb as c,ya as E}from"./chunk-SJG2JCPL.js";var q=["*"];function y(_,a){if(_&1){let t=f();v(0,"nz-icon",1),l("click",function(e){S(t);let n=u();return E(n.closeTag(e))}),h()}}var ee=(()=>{class _{cdr=O(V);renderer=O(c);el=O(m).nativeElement;directionality=O(M);destroyRef=O(L);nzMode="default";nzColor;nzChecked=!1;nzBordered=!0;nzOnClose=new o;nzCheckedChange=new o;dir="ltr";isPresetColor=!1;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked))}closeTag(t){this.nzOnClose.emit(t),t.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el)}clearPresetColor(){let t=new RegExp(`(ant-tag-(?:${[...k,...J].join("|")}))`,"g"),s=this.el.classList.toString(),e=[],n=t.exec(s);for(;n!==null;)e.push(n[1]),n=t.exec(s);this.el.classList.remove(...e)}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=H(this.nzColor)||b(this.nzColor):this.isPresetColor=!1,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`)}ngOnInit(){this.directionality.change?.pipe(B(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzColor:s}=t;s&&this.setPresetColor()}static \u0275fac=function(s){return new(s||_)};static \u0275cmp=C({type:_,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(s,e){s&1&&l("click",function(){return e.updateCheckedStatus()}),s&2&&(z("background-color",e.isPresetColor?"":e.nzColor),G("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir==="rtl")("ant-tag-borderless",!e.nzBordered))},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",i],nzBordered:[2,"nzBordered","nzBordered",i]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[r],ngContentSelectors:q,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(s,e){s&1&&(P(),d(0),p(1,y,1,0,"nz-icon",0)),s&2&&(F(),U(e.nzMode==="closeable"?1:-1))},dependencies:[X,W],encapsulation:2,changeDetection:0})}return _})(),De=(()=>{class _{static \u0275fac=function(s){return new(s||_)};static \u0275mod=g({type:_});static \u0275inj=R({imports:[ee]})}return _})();var Y={TASK_NOT_FOUND:{level:"silent"},TASK_ALREADY_RUNNING:{level:"toast",message:"\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C\u4E2D"},PROCESS_SPAWN_FAILED:{level:"toast",message:"\u4EFB\u52A1\u542F\u52A8\u5931\u8D25"},TASK_SPEC_NOT_FOUND:{level:"toast",message:"\u4EFB\u52A1\u89C4\u683C\u672A\u627E\u5230"},TASK_NOT_RUNNABLE:{level:"toast",message:"\u4EFB\u52A1\u4E0D\u53EF\u8FD0\u884C"},RUN_NOT_FOUND:{level:"toast",message:"\u8FD0\u884C\u5B9E\u4F8B\u672A\u627E\u5230"},TASK_ID_REQUIRED:{level:"toast",message:"\u4EFB\u52A1 ID \u4E3A\u5FC5\u586B\u9879"},COMMAND_NOT_FOUND:{level:"toast",message:"\u547D\u4EE4\u672A\u627E\u5230\uFF0C\u8BF7\u786E\u4FDD\u5DF2\u6B63\u786E\u5B89\u88C5\u6240\u9700\u8F6F\u4EF6"},PROJECT_NOT_FOUND:{level:"toast",message:"\u9879\u76EE\u4E0D\u5B58\u5728"},PROJECT_ROOT_INVALID:{level:"toast",message:"\u9879\u76EE\u6839\u76EE\u5F55\u65E0\u6548"},PROJECT_ALREADY_EXISTS:{level:"toast",message:"\u9879\u76EE\u5DF2\u5B58\u5728"},INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u9879\u76EE\u540D\u79F0"},TARGET_EXISTS:{level:"toast",message:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728"},INVALID_REPO_URL:{level:"toast",message:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740"},GIT_CHECKOUT_FAILED:{level:"toast",message:"Git \u68C0\u51FA\u5931\u8D25"},BOOTSTRAP_NOT_IN_PICK_STATE:{level:"toast",message:"\u5F53\u524D\u4E0D\u5904\u4E8E\u9009\u62E9\u6839\u76EE\u5F55\u72B6\u6001"},BOOTSTRAP_CTX_NOT_FOUND:{level:"toast",message:"\u5F15\u5BFC\u4E0A\u4E0B\u6587\u672A\u627E\u5230"},BOOTSTRAP_INVALID_PICKED_ROOT:{level:"toast",message:"\u9009\u62E9\u7684\u6839\u76EE\u5F55\u65E0\u6548"},BOOTSTRAP_NOT_WAITING_PICK:{level:"toast",message:"\u5F15\u5BFC\u672A\u5904\u4E8E\u7B49\u5F85\u9009\u62E9\u72B6\u6001"},PROJECT_ANGULAR_JSON_INVALID:{level:"toast",message:"angular.json \u65E0\u6548"},PROJECT_ANGULAR_JSON_NOT_FOUND:{level:"toast",message:"angular.json \u672A\u627E\u5230"},PROJECT_VITE_CONFIG_INVALID:{level:"toast",message:"vite \u914D\u7F6E\u65E0\u6548"},PROJECT_VUE_CONFIG_NOT_FOUND:{level:"toast",message:"vite \u914D\u7F6E\u672A\u627E\u5230"},CONFIG_BACKUP_NOT_FOUND:{level:"toast",message:"\u914D\u7F6E\u5907\u4EFD\u672A\u627E\u5230"},CONFIG_READ_FAILED:{level:"toast",message:"\u914D\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u635F\u574F"},CONFIG_CONFLICT:{level:"toast",message:"\u914D\u7F6E\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},FS_ALREADY_EXISTS:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u5DF2\u5B58\u5728"},FS_PATH_NOT_FOUND:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u672A\u627E\u5230"},FS_PERMISSION_DENIED:{level:"toast",message:"\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u88AB\u62D2\u7EDD"},FS_EXISTS_FAILED:{level:"toast",message:"\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u5B58\u5728\u65F6\u51FA\u9519"},FS_INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u540D\u79F0"},FS_MKDIR_FAILED:{level:"toast",message:"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"},INTERNAL_ERROR:{level:"toast",message:"\u7CFB\u7EDF\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},CONNECTION_LOST:{level:"banner",message:"\u4E0E\u672C\u5730\u670D\u52A1\u7684\u8FDE\u63A5\u5DF2\u65AD\u5F00",action:{retry:!0}},HTTP_ERROR:{level:"toast",message:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5"},UNAUTHORIZED:{level:"banner",message:"\u672A\u6388\u6743\u8BBF\u95EE\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55",action:{reload:!0}},UNKNOWN_ERROR:{level:"toast",message:"\u53D1\u751F\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},WS_ERROR:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5F02\u5E38",action:{retry:!0}},WS_CLOSED:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED",action:{retry:!0}},BAD_JSON:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684 JSON \u6570\u636E"},BAD_MSG:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684\u6D88\u606F\u683C\u5F0F"},OP_NOT_SUPPORTED:{level:"toast",message:"\u64CD\u4F5C\u4E0D\u88AB\u652F\u6301"},HANDLER_FAILED:{level:"toast",message:"\u6D88\u606F\u5904\u7406\u5931\u8D25"},TOPIC_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u6D88\u606F\u4E3B\u9898"},OP_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u64CD\u4F5C\u7C7B\u578B"},DEP_INSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5B89\u88C5\u5931\u8D25"},DEP_UNINSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5378\u8F7D\u5931\u8D25"},DEP_NOT_FOUND:{level:"toast",message:"\u4F9D\u8D56\u672A\u627E\u5230"},DASHBOARD_CONFLICT:{level:"toast",message:"\u4EEA\u8868\u76D8\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},WIDGET_NOT_FOUND:{level:"toast",message:"\u90E8\u4EF6\u672A\u627E\u5230"},WIDGET_LOCKED:{level:"toast",message:"\u90E8\u4EF6\u88AB\u9501\u5B9A\uFF0C\u65E0\u6CD5\u4FEE\u6539"},RSS_FETCH_FAILED:{level:"toast",message:"RSS \u6E90\u83B7\u53D6\u5931\u8D25"},INVALID_RSS_URL:{level:"toast",message:"\u65E0\u6548\u7684 RSS \u6E90\u5730\u5740"},KILL_PORT_FAILED:{level:"toast",message:"\u7AEF\u53E3\u91CA\u653E\u5931\u8D25"},INVALID_PORT:{level:"toast",message:"\u65E0\u6548\u7684\u7AEF\u53E3\u53F7"},COLLECTION_NOT_EMPTY:{level:"toast",message:"\u96C6\u5408\u4E0D\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u5220\u9664"},INVALID_JSON:{level:"dev-only"},INVALID_MSG:{level:"dev-only"}};var I=class _{ui=O(x);dispatch(a,t,s){let e=Y[a];if(!e){this.ui.error(t??"\u672A\u77E5\u9519\u8BEF");return}let n=typeof e.message=="function"?e.message(s):e.message??t;switch(e.level){case"silent":return;case"toast":this.ui.error(n??"\u64CD\u4F5C\u5931\u8D25");return;case"banner":this.ui.banner?.(n??"\u7CFB\u7EDF\u5F02\u5E38",e.action);return;case"dev-only":T.production||console.warn("[DEV ERROR]",a,s);return}}static \u0275fac=function(t){return new(t||_)};static \u0275prov=A({token:_,factory:_.\u0275fac,providedIn:"root"})};var j=Q(Z()),Ve=(_,a)=>{let t=O(I),s=j.uniqueId("req-");return _=_.clone({setHeaders:{"X-Request-Id":s}}),a(_).pipe(D(e=>{if(T.production||console.error(`[HTTP][${s}] Error:`,e),e instanceof w)return t.dispatch(e.code,e.message,e.details),N(()=>e);if(e instanceof K){let n=e.error?.error?.code??"HTTP_ERROR";return t.dispatch(n,e.message,e.error),N(()=>e)}return t.dispatch("INTERNAL_ERROR"),N(()=>e)}))};export{ee as a,De as b,Ve as c};
@@ -0,0 +1,3 @@
1
+ import{G as Ht,H as T,M as rt,N as at,O as lt,P as ct,f as ft,h as Vt,i as ot,w as Zt,x as st,z as G}from"./chunk-5EQOKH7G.js";import{e as it}from"./chunk-X3HFJACM.js";import{$b as U,Ca as A,Dc as M,Eb as L,Ec as K,Fb as Z,Fc as W,Gc as J,Hc as Rt,Ic as w,Jc as tt,Kb as S,Kc as et,L as Ot,M as $t,Oa as V,Tb as E,Vb as z,Wc as jt,Xb as m,Yb as H,Yc as Qt,_b as q,ac as u,ad as nt,bc as p,c as Nt,ca as Et,cc as d,dc as f,f as zt,g as wt,hc as I,ic as N,l as Gt,mb as r,na as B,r as v,ra as C,rb as Mt,rd as R,s as h,sb as Wt,tc as c,uc as Ft,vb as mt,vc as At,vd as Bt,wc as Lt,wd as ht,xc as ut,yc as Y,za as F,zc as X}from"./chunk-SJG2JCPL.js";var ee=e=>({$implicit:e});function ne(e,s){if(e&1&&f(0,"nz-icon",3),e&2){let t=c(3);u("nzType",t.icon)}}function ie(e,s){if(e&1&&(I(0),w(1),N()),e&2){let t=s.$implicit,i=c(4);r(),et(" ",t(i.nzPercent)," ")}}function oe(e,s){if(e&1&&S(0,ie,2,1,"ng-container",4),e&2){let t=c(3);u("nzStringTemplateOutlet",t.formatter)("nzStringTemplateOutletContext",jt(2,ee,t.nzPercent))}}function se(e,s){if(e&1&&(p(0,"span",2),z(1,ne,1,1,"nz-icon",3)(2,oe,1,4,"ng-container"),d()),e&2){let t=c(2);r(),m((t.status==="exception"||t.status==="success")&&!t.nzFormat?1:2)}}function re(e,s){if(e&1&&z(0,se,3,1,"span",2),e&2){let t=c();m(t.nzShowInfo?0:-1)}}function ae(e,s){if(e&1&&f(0,"div",8),e&2){let t=s.$implicit;J(t)}}function le(e,s){}function ce(e,s){if(e&1&&(p(0,"div",5),q(1,ae,1,2,"div",6,H),S(3,le,0,0,"ng-template",7),d()),e&2){let t=c(2),i=M(1);r(),U(t.steps),r(2),u("ngTemplateOutlet",i)}}function pe(e,s){if(e&1&&f(0,"div",13),e&2){let t=c(3);K("width",t.nzSuccessPercent,"%")("border-radius",t.nzStrokeLinecap==="round"?"100px":"0")("height",t.strokeWidth,"px")}}function de(e,s){}function ze(e,s){if(e&1&&(p(0,"div",9)(1,"div",10),f(2,"div",11),z(3,pe,1,6,"div",12),d()(),S(4,de,0,0,"ng-template",7)),e&2){let t=c(2),i=M(1);r(2),K("width",t.nzPercent,"%")("border-radius",t.nzStrokeLinecap==="round"?"100px":"0")("background",t.isGradient?null:t.nzStrokeColor)("background-image",t.isGradient?t.lineGradient:null)("height",t.strokeWidth,"px"),r(),m(t.nzSuccessPercent||t.nzSuccessPercent===0?3:-1),r(),u("ngTemplateOutlet",i)}}function me(e,s){if(e&1&&(p(0,"div"),z(1,ce,4,1,"div",5)(2,ze,5,12),d()),e&2){let t=c();r(),m(t.isSteps?1:2)}}function ue(e,s){if(e&1&&(F(),f(0,"stop")),e&2){let t=s.$implicit;E("offset",t.offset)("stop-color",t.color)}}function he(e,s){if(e&1&&(F(),p(0,"defs")(1,"linearGradient",17),q(2,ue,1,2,":svg:stop",null,H),d()()),e&2){let t=c(2);r(),u("id","gradient-"+t.gradientId),r(),U(t.circleGradient)}}function fe(e,s){if(e&1&&(F(),f(0,"path",18)),e&2){let t=s.$implicit,i=c(2);J(t.strokePathStyle),E("d",i.pathString)("stroke-linecap",i.nzStrokeLinecap)("stroke",t.stroke)("stroke-width",i.nzPercent?i.strokeWidth:0)}}function ge(e,s){}function _e(e,s){if(e&1&&(p(0,"div",10),F(),p(1,"svg",14),z(2,he,4,1,":svg:defs"),f(3,"path",15),q(4,fe,1,6,":svg:path",16,H),d(),S(6,ge,0,0,"ng-template",7),d()),e&2){let t=c(),i=M(1);K("width",t.nzWidth,"px")("height",t.nzWidth,"px")("font-size",t.nzWidth*.15+6,"px"),W("ant-progress-circle-gradient",t.isGradient),r(2),m(t.isGradient?2:-1),r(),J(t.trailPathStyle),E("stroke-width",t.strokeWidth)("d",t.pathString),r(),U(t.progressCirclePath),r(2),u("ngTemplateOutlet",i)}}function Se(e){return+e.replace("%","")}var Ut=e=>{let s=[];return Object.keys(e).forEach(t=>{let i=e[t],o=Se(t);isNaN(o)||s.push({key:o,value:i})}),s=s.sort((t,i)=>t.key-i.key),s},Ce=e=>Ut(e).map(({key:s,value:t})=>({offset:`${s}%`,color:t})),xe=e=>{let g=e,{from:s="#1890ff",to:t="#1890ff",direction:i="to right"}=g,o=Nt(g,["from","to","direction"]);if(Object.keys(o).length!==0){let k=Ut(o).map(({key:O,value:j})=>`${j} ${O}%`).join(", ");return`linear-gradient(${i}, ${k})`}return`linear-gradient(${i}, ${s}, ${t})`},Pe=0,qt="progress",ye=new Map([["success","check"],["exception","close"]]),ke=new Map([["normal","#108ee9"],["exception","#ff5500"],["success","#87d068"]]),ve=e=>`${e}%`,gt=(()=>{var x;let e,s=[],t=[],i,o=[],g=[],k,O=[],j=[],_t,St=[],Ct=[],xt,Pt=[],yt=[],kt,vt=[],Tt=[],Dt,bt=[],It=[];return x=class{_nzModuleName=qt;cdr=C(R);directionality=C(st);destroyRef=C(A);nzShowInfo=h(this,s,!0);nzWidth=(h(this,t),132);nzStrokeColor=h(this,o,void 0);nzSize=(h(this,g),h(this,O,"default"));nzFormat=h(this,j);nzSuccessPercent;nzPercent=0;nzStrokeWidth=h(this,St,void 0);nzGapDegree=(h(this,Ct),h(this,Pt,void 0));nzStatus=h(this,yt);nzType="line";nzGapPosition=h(this,vt,"top");nzStrokeLinecap=(h(this,Tt),h(this,bt,"round"));nzSteps=(h(this,It),0);steps=[];lineGradient=null;isGradient=!1;isSteps=!1;gradientId=Pe++;progressCirclePath=[];circleGradient;trailPathStyle=null;pathString;icon;dir="ltr";get formatter(){return this.nzFormat||ve}get status(){return this.nzStatus||this.inferredStatus}get strokeWidth(){return this.nzStrokeWidth||(this.nzType==="line"&&this.nzSize!=="small"?8:6)}get isCircleStyle(){return this.nzType==="circle"||this.nzType==="dashboard"}cachedStatus="normal";inferredStatus="normal";constructor(){Ht(qt,()=>{this.updateIcon(),this.setStrokeColor(),this.getCirclePaths()})}ngOnChanges(l){let{nzSteps:n,nzGapPosition:a,nzStrokeLinecap:P,nzStrokeColor:_,nzGapDegree:D,nzType:$,nzStatus:b,nzPercent:y,nzSuccessPercent:Q,nzStrokeWidth:pt}=l;b&&(this.cachedStatus=this.nzStatus||this.cachedStatus),(y||Q)&&(parseInt(this.nzPercent.toString(),10)>=100?(ft(this.nzSuccessPercent)&&this.nzSuccessPercent>=100||this.nzSuccessPercent===void 0)&&(this.inferredStatus="success"):this.inferredStatus=this.cachedStatus),(b||y||Q||_)&&this.updateIcon(),_&&this.setStrokeColor(),(a||P||D||$||y||_||_)&&this.getCirclePaths(),(y||n||pt)&&(this.isSteps=this.nzSteps>0,this.isSteps&&this.getSteps())}ngOnInit(){this.directionality.change?.pipe(G(this.destroyRef)).subscribe(l=>{this.dir=l,this.cdr.detectChanges()}),this.dir=this.directionality.value}updateIcon(){let l=ye.get(this.status);this.icon=l?l+(this.isCircleStyle?"-o":"-circle-fill"):""}getSteps(){let l=Math.floor(this.nzSteps*(this.nzPercent/100)),n=this.nzSize==="small"?2:14,a=[];for(let P=0;P<this.nzSteps;P++){let _;P<=l-1&&(_=this.nzStrokeColor);let D={backgroundColor:`${_}`,width:`${n}px`,height:`${this.strokeWidth}px`};a.push(D)}this.steps=a}getCirclePaths(){if(!this.isCircleStyle)return;let l=ft(this.nzSuccessPercent)?[this.nzSuccessPercent,this.nzPercent]:[this.nzPercent],n=50-this.strokeWidth/2,a=this.nzGapPosition||(this.nzType==="circle"?"top":"bottom"),P=Math.PI*2*n,_=this.nzGapDegree||(this.nzType==="circle"?0:75),D=0,$=-n,b=0,y=n*-2;switch(a){case"left":D=-n,$=0,b=n*2,y=0;break;case"right":D=n,$=0,b=n*-2,y=0;break;case"bottom":$=n,y=n*2;break;default:}this.pathString=`M 50,50 m ${D},${$}
2
+ a ${n},${n} 0 1 1 ${b},${-y}
3
+ a ${n},${n} 0 1 1 ${-b},${y}`,this.trailPathStyle={strokeDasharray:`${P-_}px ${P}px`,strokeDashoffset:`-${_/2}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},this.progressCirclePath=l.map((Q,pt)=>{let dt=l.length===2&&pt===0;return{stroke:this.isGradient&&!dt?`url(#gradient-${this.gradientId})`:null,strokePathStyle:{stroke:this.isGradient?null:dt?ke.get("success"):this.nzStrokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(Q||0)/100*(P-_)}px ${P}px`,strokeDashoffset:`-${_/2}px`}}}).reverse()}setStrokeColor(){let l=this.nzStrokeColor,n=this.isGradient=!!l&&typeof l!="string";n&&!this.isCircleStyle?this.lineGradient=xe(l):n&&this.isCircleStyle?this.circleGradient=Ce(this.nzStrokeColor):(this.lineGradient=null,this.circleGradient=[])}},(()=>{let l=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[T()],i=[T()],k=[T()],_t=[T()],xt=[T()],kt=[T()],Dt=[T()],v(null,null,e,{kind:"field",name:"nzShowInfo",static:!1,private:!1,access:{has:n=>"nzShowInfo"in n,get:n=>n.nzShowInfo,set:(n,a)=>{n.nzShowInfo=a}},metadata:l},s,t),v(null,null,i,{kind:"field",name:"nzStrokeColor",static:!1,private:!1,access:{has:n=>"nzStrokeColor"in n,get:n=>n.nzStrokeColor,set:(n,a)=>{n.nzStrokeColor=a}},metadata:l},o,g),v(null,null,k,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:n=>"nzSize"in n,get:n=>n.nzSize,set:(n,a)=>{n.nzSize=a}},metadata:l},O,j),v(null,null,_t,{kind:"field",name:"nzStrokeWidth",static:!1,private:!1,access:{has:n=>"nzStrokeWidth"in n,get:n=>n.nzStrokeWidth,set:(n,a)=>{n.nzStrokeWidth=a}},metadata:l},St,Ct),v(null,null,xt,{kind:"field",name:"nzGapDegree",static:!1,private:!1,access:{has:n=>"nzGapDegree"in n,get:n=>n.nzGapDegree,set:(n,a)=>{n.nzGapDegree=a}},metadata:l},Pt,yt),v(null,null,kt,{kind:"field",name:"nzGapPosition",static:!1,private:!1,access:{has:n=>"nzGapPosition"in n,get:n=>n.nzGapPosition,set:(n,a)=>{n.nzGapPosition=a}},metadata:l},vt,Tt),v(null,null,Dt,{kind:"field",name:"nzStrokeLinecap",static:!1,private:!1,access:{has:n=>"nzStrokeLinecap"in n,get:n=>n.nzStrokeLinecap,set:(n,a)=>{n.nzStrokeLinecap=a}},metadata:l},bt,It),l&&Object.defineProperty(x,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l})})(),zt(x,"\u0275fac",function(n){return new(n||x)}),zt(x,"\u0275cmp",L({type:x,selectors:[["nz-progress"]],inputs:{nzShowInfo:"nzShowInfo",nzWidth:"nzWidth",nzStrokeColor:"nzStrokeColor",nzSize:"nzSize",nzFormat:"nzFormat",nzSuccessPercent:[2,"nzSuccessPercent","nzSuccessPercent",ot],nzPercent:[2,"nzPercent","nzPercent",ht],nzStrokeWidth:[2,"nzStrokeWidth","nzStrokeWidth",ot],nzGapDegree:[2,"nzGapDegree","nzGapDegree",ot],nzStatus:"nzStatus",nzType:"nzType",nzGapPosition:"nzGapPosition",nzStrokeLinecap:"nzStrokeLinecap",nzSteps:[2,"nzSteps","nzSteps",ht]},exportAs:["nzProgress"],features:[V],decls:5,vars:18,consts:[["progressInfoTemplate",""],[1,"ant-progress-inner",3,"width","height","fontSize","ant-progress-circle-gradient"],[1,"ant-progress-text"],[3,"nzType"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[1,"ant-progress-steps-outer"],[1,"ant-progress-steps-item",3,"style"],[3,"ngTemplateOutlet"],[1,"ant-progress-steps-item"],[1,"ant-progress-outer"],[1,"ant-progress-inner"],[1,"ant-progress-bg"],[1,"ant-progress-success-bg",3,"width","border-radius","height"],[1,"ant-progress-success-bg"],["viewBox","0 0 100 100",1,"ant-progress-circle"],["stroke","#f3f3f3","fill-opacity","0",1,"ant-progress-circle-trail"],["fill-opacity","0",1,"ant-progress-circle-path",3,"style"],["x1","100%","y1","0%","x2","0%","y2","0%",3,"id"],["fill-opacity","0",1,"ant-progress-circle-path"]],template:function(n,a){n&1&&(S(0,re,1,1,"ng-template",null,0,nt),p(2,"div"),z(3,me,3,1,"div"),z(4,_e,7,14,"div",1),d()),n&2&&(r(2),Rt("ant-progress ant-progress-status-"+a.status),W("ant-progress-line",a.nzType==="line")("ant-progress-small",a.nzSize==="small")("ant-progress-default",a.nzSize==="default")("ant-progress-show-info",a.nzShowInfo)("ant-progress-circle",a.isCircleStyle)("ant-progress-steps",a.isSteps)("ant-progress-rtl",a.dir==="rtl"),r(),m(a.nzType==="line"?3:-1),r(),m(a.isCircleStyle?4:-1))},dependencies:[at,rt,ct,lt,it],encapsulation:2,changeDetection:0})),x})(),Yt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=Z({type:e});static \u0275inj=B({imports:[gt]})}return e})();var De=["processDotTemplate"],be=["itemContainer"],Ie=(e,s,t)=>({$implicit:e,status:s,index:t});function Ne(e,s){e&1&&f(0,"div",3)}function we(e,s){if(e&1&&(p(0,"div",11),f(1,"nz-progress",12),d()),e&2){let t=c(2);r(),u("nzPercent",t.nzPercentage)("nzWidth",t.nzSize==="small"?32:40)("nzFormat",t.nullProcessFormat)("nzStrokeWidth",4)}}function Ge(e,s){e&1&&(p(0,"span",5),f(1,"nz-icon",13),d())}function Oe(e,s){e&1&&(p(0,"span",5),f(1,"nz-icon",14),d())}function $e(e,s){if(e&1&&(p(0,"span",5),w(1),d()),e&2){let t=c(2);r(),et(" ",t.index+1," ")}}function Ee(e,s){if(e&1&&(I(0),f(1,"nz-icon",15),N()),e&2){let t=s.$implicit;r(),u("nzType",t)}}function Me(e,s){if(e&1&&(p(0,"span",5),S(1,Ee,2,1,"ng-container",8),d()),e&2){let t=c(2);r(),u("nzStringTemplateOutlet",t.nzIcon)}}function We(e,s){if(e&1&&(z(0,we,2,4,"div",11),z(1,Ge,2,0,"span",5),z(2,Oe,2,0,"span",5),z(3,$e,2,1,"span",5),z(4,Me,2,1,"span",5)),e&2){let t=c();m(t.showProgress?0:-1),r(),m(t.nzStatus==="finish"&&!t.nzIcon?1:-1),r(),m(t.nzStatus==="error"?2:-1),r(),m((t.nzStatus==="process"||t.nzStatus==="wait")&&!t.nzIcon?3:-1),r(),m(t.nzIcon?4:-1)}}function Fe(e,s){e&1&&f(0,"span",17)}function Ae(e,s){}function Le(e,s){if(e&1&&(p(0,"span",5),S(1,Fe,1,0,"ng-template",null,1,nt)(3,Ae,0,0,"ng-template",16),d()),e&2){let t=M(2),i=c();r(3),u("ngTemplateOutlet",i.customProcessTemplate||t)("ngTemplateOutletContext",Qt(2,Ie,t,i.nzStatus,i.index))}}function Re(e,s){if(e&1&&(I(0),w(1),N()),e&2){let t=c();r(),tt(t.nzTitle)}}function je(e,s){if(e&1&&(I(0),w(1),N()),e&2){let t=c(2);r(),tt(t.nzSubtitle)}}function Qe(e,s){if(e&1&&(p(0,"div",9),S(1,je,2,1,"ng-container",8),d()),e&2){let t=c();r(),u("nzStringTemplateOutlet",t.nzSubtitle)}}function Be(e,s){if(e&1&&(I(0),w(1),N()),e&2){let t=c();r(),tt(t.nzDescription)}}var Ve=["*"],Xt=(()=>{class e{cdr=C(R);destroyRef=C(A);processDotTemplate;itemContainer;nzTitle;nzSubtitle;nzDescription;nzDisabled=!1;nzPercentage=null;nzSize="default";get nzStatus(){return this._status}set nzStatus(t){this._status=t,this.isCustomStatus=!0}isCustomStatus=!1;_status="wait";get nzIcon(){return this._icon}set nzIcon(t){t instanceof mt||(this.oldAPIIcon=typeof t=="string"&&t.indexOf("anticon")>-1),this._icon=t}oldAPIIcon=!0;_icon;customProcessTemplate;direction="horizontal";index=0;last=!1;outStatus="process";showProcessDot=!1;clickable=!1;clickOutsideAngular$=new Gt;nullProcessFormat=()=>null;get showProgress(){return this.nzPercentage!==null&&!this.nzIcon&&this.nzStatus==="process"&&this.nzPercentage>=0&&this.nzPercentage<=100}get currentIndex(){return this._currentIndex}set currentIndex(t){this._currentIndex=t,this.isCustomStatus||(this._status=t>this.index?"finish":t===this.index?this.outStatus||"":"wait")}_currentIndex=0;ngOnInit(){Zt(this.itemContainer.nativeElement,"click").pipe($t(()=>this.clickable&&this.currentIndex!==this.index&&!this.nzDisabled),G(this.destroyRef)).subscribe(()=>{this.clickOutsideAngular$.next(this.index)})}enable(){this.nzDisabled=!1,this.cdr.markForCheck()}disable(){this.nzDisabled=!0,this.cdr.markForCheck()}markForCheck(){this.cdr.markForCheck()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=L({type:e,selectors:[["nz-step"]],viewQuery:function(i,o){if(i&1&&(ut(De,5),ut(be,7)),i&2){let g;Y(g=X())&&(o.processDotTemplate=g.first),Y(g=X())&&(o.itemContainer=g.first)}},hostAttrs:[1,"ant-steps-item"],hostVars:16,hostBindings:function(i,o){i&2&&W("ant-steps-item-wait",o.nzStatus==="wait")("ant-steps-item-process",o.nzStatus==="process")("ant-steps-item-finish",o.nzStatus==="finish")("ant-steps-item-error",o.nzStatus==="error")("ant-steps-item-active",o.currentIndex===o.index)("ant-steps-item-disabled",o.nzDisabled)("ant-steps-item-custom",!!o.nzIcon)("ant-steps-next-error",o.outStatus==="error"&&o.currentIndex===o.index+1)},inputs:{nzTitle:"nzTitle",nzSubtitle:"nzSubtitle",nzDescription:"nzDescription",nzDisabled:[2,"nzDisabled","nzDisabled",Bt],nzPercentage:"nzPercentage",nzSize:"nzSize",nzStatus:"nzStatus",nzIcon:"nzIcon"},exportAs:["nzStep"],decls:12,vars:8,consts:[["itemContainer",""],["processDotTemplate",""],[1,"ant-steps-item-container",3,"tabindex"],[1,"ant-steps-item-tail"],[1,"ant-steps-item-icon"],[1,"ant-steps-icon"],[1,"ant-steps-item-content"],[1,"ant-steps-item-title"],[4,"nzStringTemplateOutlet"],[1,"ant-steps-item-subtitle"],[1,"ant-steps-item-description"],[1,"ant-steps-progress-icon"],["nzType","circle",3,"nzPercent","nzWidth","nzFormat","nzStrokeWidth"],["nzType","check"],["nzType","close"],[3,"nzType"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-steps-icon-dot"]],template:function(i,o){i&1&&(p(0,"div",2,0),z(2,Ne,1,0,"div",3),p(3,"div",4),z(4,We,5,5),z(5,Le,4,6,"span",5),d(),p(6,"div",6)(7,"div",7),S(8,Re,2,1,"ng-container",8),z(9,Qe,2,1,"div",9),d(),p(10,"div",10),S(11,Be,2,1,"ng-container",8),d()()()),i&2&&(u("tabindex",o.clickable&&!o.nzDisabled?0:null),E("role",o.clickable&&!o.nzDisabled?"button":null),r(2),m(o.last?-1:2),r(2),m(o.showProcessDot?-1:4),r(),m(o.showProcessDot?5:-1),r(3),u("nzStringTemplateOutlet",o.nzTitle),r(),m(o.nzSubtitle?9:-1),r(2),u("nzStringTemplateOutlet",o.nzDescription))},dependencies:[Yt,gt,at,rt,ct,lt,it],encapsulation:2,changeDetection:0})}return e})(),Tn=(()=>{class e{static ngAcceptInputType_nzProgressDot;cdr=C(R);ngZone=C(Wt);directionality=C(st);destroyRef=C(A);steps;nzCurrent=0;nzDirection="horizontal";nzLabelPlacement="horizontal";nzType="default";nzSize="default";nzStartIndex=0;nzStatus="process";set nzProgressDot(t){t instanceof mt?(this.showProcessDot=!0,this.customProcessDotTemplate=t):this.showProcessDot=Vt(t),this.updateChildrenSteps()}nzIndexChange=new Mt;indexChangeSubscription=wt.EMPTY;showProcessDot=!1;showProgress=!1;customProcessDotTemplate;dir="ltr";ngOnChanges(t){let{nzStartIndex:i,nzDirection:o,nzStatus:g,nzCurrent:k,nzSize:O}=t;(i||o||g||k||O)&&this.updateChildrenSteps()}ngOnInit(){this.directionality.change?.pipe(G(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateChildrenSteps()}ngAfterContentInit(){this.steps&&this.steps.changes.pipe(Et(null),G(this.destroyRef)).subscribe(()=>{this.updateHostProgressClass(),this.updateChildrenSteps()})}updateHostProgressClass(){this.steps&&!this.showProcessDot&&(this.showProgress=!!this.steps.toArray().find(t=>t.nzPercentage!==null))}updateChildrenSteps(){if(this.steps){let t=this.steps.length;this.steps.toArray().forEach((i,o)=>{Promise.resolve().then(()=>{i.nzSize=this.nzSize,i.outStatus=this.nzStatus,i.showProcessDot=this.showProcessDot,this.customProcessDotTemplate&&(i.customProcessTemplate=this.customProcessDotTemplate),i.clickable=this.nzIndexChange.observers.length>0,i.direction=this.nzDirection,i.index=o+this.nzStartIndex,i.currentIndex=this.nzCurrent,i.last=t===o+1,i.markForCheck()})}),this.indexChangeSubscription.unsubscribe(),this.indexChangeSubscription=Ot(...this.steps.map(i=>i.clickOutsideAngular$)).pipe(G(this.destroyRef)).subscribe(i=>{this.nzIndexChange.observers.length&&this.ngZone.run(()=>this.nzIndexChange.emit(i))})}}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=L({type:e,selectors:[["nz-steps"]],contentQueries:function(i,o,g){if(i&1&&Lt(g,Xt,4),i&2){let k;Y(k=X())&&(o.steps=k)}},hostAttrs:[1,"ant-steps"],hostVars:18,hostBindings:function(i,o){i&2&&W("ant-steps-horizontal",o.nzDirection==="horizontal")("ant-steps-vertical",o.nzDirection==="vertical")("ant-steps-label-horizontal",o.nzDirection==="horizontal")("ant-steps-label-vertical",(o.showProcessDot||o.nzLabelPlacement==="vertical")&&o.nzDirection==="horizontal")("ant-steps-dot",o.showProcessDot)("ant-steps-small",o.nzSize==="small")("ant-steps-navigation",o.nzType==="navigation")("ant-steps-rtl",o.dir==="rtl")("ant-steps-with-progress",o.showProgress)},inputs:{nzCurrent:"nzCurrent",nzDirection:"nzDirection",nzLabelPlacement:"nzLabelPlacement",nzType:"nzType",nzSize:"nzSize",nzStartIndex:"nzStartIndex",nzStatus:"nzStatus",nzProgressDot:"nzProgressDot"},outputs:{nzIndexChange:"nzIndexChange"},exportAs:["nzSteps"],features:[V],ngContentSelectors:Ve,decls:1,vars:0,template:function(i,o){i&1&&(Ft(),At(0))},encapsulation:2,changeDetection:0})}return e})(),Dn=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=Z({type:e});static \u0275inj=B({imports:[Xt]})}return e})();export{Xt as a,Tn as b,Dn as c};
@@ -0,0 +1 @@
1
+ import{a as Me}from"./chunk-2XZHN52E.js";import{a as xe,e as ke,f as ve}from"./chunk-AI6SNMEH.js";import{a as he}from"./chunk-ZSPNEYSK.js";import"./chunk-IZNTCWTR.js";import"./chunk-GKY4LJF4.js";import{d as be,e as ye}from"./chunk-W633D3VG.js";import"./chunk-SIVPP74B.js";import"./chunk-QM5ROT66.js";import{b as ze}from"./chunk-DP3VTELD.js";import"./chunk-HZ73CM45.js";import{a as ge,b as E}from"./chunk-YFAKNLWB.js";import{b as S}from"./chunk-ITXWAN4J.js";import{f as F}from"./chunk-25RT7L2O.js";import{a as A,e as de}from"./chunk-OC62FHHS.js";import"./chunk-6JH45SUC.js";import{a as _e,b as Ce}from"./chunk-KPO75P5E.js";import"./chunk-SNCDDYQR.js";import{H as ue,I as fe}from"./chunk-2P5WKSWB.js";import{Ab as pe,Cb as ce,Db as me,Eb as N,Hb as I,Jb as D,M as h,N as f,T as oe,U as x,V as P,W as ae,Y as O,Z as k,kb as se,mb as re,qb as le,xb as v,z as ie}from"./chunk-5EQOKH7G.js";import"./chunk-HFZLJHYR.js";import{j as C}from"./chunk-X3HFJACM.js";import{$b as K,Ca as G,Eb as u,Fc as te,Ic as d,Jc as M,Kc as z,Q as H,U as Q,Vb as T,Xb as w,_b as J,ac as c,bc as o,cc as a,dc as l,g as b,gd as ne,kc as X,l as U,mb as r,qc as m,ra as g,tc as _,xa as W,xc as Y,ya as q,yb as y,yc as Z,zc as ee}from"./chunk-SJG2JCPL.js";var L=class n{constructor(t,e,i){this.stream=t;this.clipboard=e;this.notify=i;this.resizeSub.add(this.resize$.pipe(H(350),Q((s,p)=>s.cols===p.cols&&s.rows===p.rows),ie(this.destroyRef)).subscribe(s=>{this._taskId&&this.stream.resize(this._taskId,s.cols,s.rows)}))}_taskId="";destroyRef=g(G);set taskId(t){let e=(t??"").trim();e&&e!==this._taskId&&(this._taskId&&(this.stream.unsubscribeTask(this._taskId),this.term?.clear()),this._taskId=e,this.bind(e))}get taskId(){return this._taskId}tail=200;follow=!0;status={status:"idle"};term;sub=new b;resizeSub=new b;resize$=new U;bind(t){this.stream.subscribeTask(t,this.tail),this.sub.unsubscribe(),this.sub=new b,this.sub.add(this.stream.output$(t).subscribe(e=>{this.term&&(this.term.follow=this.follow,this.term.write(e.payload.text))})),this.sub.add(this.stream.status$(t).subscribe(e=>this.status=e))}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.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.resize$.next(t)}static \u0275fac=function(e){return new(e||n)(y(ge),y(be),y(ue))};static \u0275cmp=u({type:n,selectors:[["app-task-console"]],viewQuery:function(e,i){if(e&1&&Y(A,5),e&2){let s;Z(s=ee())&&(i.term=s.first)}},inputs:{taskId:"taskId",tail:"tail"},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),l(3,"nz-icon",3),o(4,"div",4),d(5,"\u8F93\u51FA"),a()(),o(6,"div",5)(7,"nz-space",6)(8,"button",7),m("click",function(){return i.clear()}),l(9,"nz-icon",8),a(),o(10,"button",9),m("click",function(){return i.copy()}),l(11,"nz-icon",10),a(),o(12,"button",11),m("click",function(){return i.toBottom()}),l(13,"nz-icon",12),a()()()(),o(14,"div",13)(15,"app-terminal-view",14),m("resized",function(p){return i.onTermResized(p)}),a()()()),e&2&&(r(15),c("follow",i.follow))},dependencies:[v,k,O,P,ae,x,oe,f,h,D,I,A,ye],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;min-height:0}.header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:8px 12px}.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}.viewport[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden;padding:8px;background:#000;border-radius:8px}"]})};var j=class n{name;description;command;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({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),l(1,"nz-icon",1),d(2),a(),o(3,"div",2),d(4),a(),o(5,"div",3),d(6),a()),e&2&&(r(2),z(" ",i.name||"\u672A\u9009\u62E9\u4EFB\u52A1"),r(2),M(i.description||"-"),r(2),M(i.command||"-"))},dependencies:[C,f,h],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 Ne=(n,t)=>t.spec.id;function Ie(n,t){n&1&&(o(0,"div",7),d(1,"Loading..."),a())}function De(n,t){if(n&1&&(o(0,"div",7),d(1),a()),n&2){let e=_(2);r(),z("No tasks for project: ",e.projectId())}}function Ee(n,t){n&1&&l(0,"nz-badge",14)}function Fe(n,t){n&1&&l(0,"nz-badge",15)}function Le(n,t){n&1&&l(0,"nz-badge",16)}function je(n,t){if(n&1){let e=X();o(0,"div",10),m("click",function(){let s=W(e).$implicit,p=_(3);return q(p.state.select(s.spec.id))}),o(1,"div",11)(2,"div",12),l(3,"nz-icon",13),T(4,Ee,1,0,"nz-badge",14)(5,Fe,1,0,"nz-badge",15)(6,Le,1,0,"nz-badge",16),a(),o(7,"div",17)(8,"div",18),d(9),a(),o(10,"div",19),d(11),a()()()()}if(n&2){let e=t.$implicit,i=_(3);te("active",e.spec.id===i.selectedId()),r(),c("nz-tooltip",e.spec.description||""),r(3),w((e==null||e.runtime==null?null:e.runtime.status)==="running"?4:(e==null||e.runtime==null?null:e.runtime.status)==="stopping"?5:6),r(4),c("title",e.spec.name),r(),M(e.spec.name),r(2),z(" ",(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)==="stopped"?"\u5DF2\u505C\u6B62":e.spec.description||"\u7A7A\u95F2\u4E2D"," ")}}function Be(n,t){if(n&1&&(o(0,"div",8),J(1,je,12,7,"div",9,Ne),a()),n&2){let e=_(2);r(),K(e.list())}}function Re(n,t){if(n&1&&T(0,De,2,1,"div",7)(1,Be,3,0,"div",8),n&2){let e=_();w(e.list().length===0?0:1)}}var B=class n{state=g(E);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=u({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","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"),l(3,"nz-icon",2),o(4,"input",3),m("ngModelChange",function(p){return i.keyword.set(p)}),a()(),o(5,"button",4),m("click",function(){return i.state.refresh()}),l(6,"span",5),a()(),o(7,"div",6),T(8,Ie,2,0,"div",7)(9,Re,2,1),a()()),e&2&&(r(4),c("ngModel",i.keyword()),r(4),w(i.loading()?8:9))},dependencies:[C,v,se,re,le,k,O,P,f,h,S,x,F,N,ce,me,pe,D,I,Ce,_e],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 we=class n{projectState=g(fe);taskState=g(E);selectedTask=this.taskState.selectedRow;constructor(){ne(async()=>{let t=this.projectState.currentProjectId();t&&await this.taskState.setProject(t)})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=u({type:n,selectors:[["app-tasks"]],decls:7,vars:9,consts:[[3,"title","isFullscreen"],[1,"page"],[1,"content"],[3,"name","description","command"],[3,"toggle","isStopping","isRunning","isStopped"],[3,"taskId"]],template:function(e,i){if(e&1&&(o(0,"app-page-layout",0)(1,"nz-layout",1),l(2,"app-task-list"),o(3,"nz-content",2),l(4,"app-task-header",3),o(5,"app-task-actions",4),m("toggle",function(){return i.taskState.toggleTask()}),a(),l(6,"app-task-console",5),a()()()),e&2){let s,p,R;c("title","\u4EFB\u52A1")("isFullscreen",!0),r(4),c("name",(s=i.selectedTask())==null||s.spec==null?null:s.spec.name)("description",(p=i.selectedTask())==null||p.spec==null?null:p.spec.description)("command",(R=i.selectedTask())==null||R.spec==null?null:R.spec.command),r(),c("isStopping",i.taskState.isStopping())("isRunning",i.taskState.isRunning())("isStopped",i.taskState.isStopped()),r(),c("taskId",i.taskState.selectedTaskId())}},dependencies:[C,v,x,F,k,N,Me,S,ze,f,ve,ke,xe,L,B,he,j,de],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%]{flex:0 0 auto}app-task-console[_ngcontent-%COMP%]{flex:1 1 auto;display:block;height:0}"]})};export{we as TasksComponent};
@@ -0,0 +1 @@
1
+ import{O as C,P as x}from"./chunk-5EQOKH7G.js";import{Eb as z,Fb as l,Fc as T,Ic as D,Jc as g,Kb as s,Vb as p,Xb as m,ac as c,bc as v,cc as f,hc as u,ic as h,mb as a,na as d,tc as o,vd as r}from"./chunk-SJG2JCPL.js";function S(e,y){if(e&1&&(u(0),D(1),h()),e&2){let i=o(2);a(),g(i.nzText)}}function _(e,y){if(e&1&&(v(0,"span",0),s(1,S,2,1,"ng-container",1),f()),e&2){let i=o();a(),c("nzStringTemplateOutlet",i.nzText)}}var N=(()=>{class e{nzText;nzType="horizontal";nzOrientation="center";nzVariant="solid";nzSize;nzDashed=!1;nzPlain=!1;static \u0275fac=function(t){return new(t||e)};static \u0275cmp=z({type:e,selectors:[["nz-divider"]],hostAttrs:[1,"ant-divider"],hostVars:22,hostBindings:function(t,n){t&2&&T("ant-divider-horizontal",n.nzType==="horizontal")("ant-divider-vertical",n.nzType==="vertical")("ant-divider-with-text",n.nzText)("ant-divider-plain",n.nzPlain)("ant-divider-with-text-left",n.nzText&&n.nzOrientation==="left")("ant-divider-with-text-right",n.nzText&&n.nzOrientation==="right")("ant-divider-with-text-center",n.nzText&&n.nzOrientation==="center")("ant-divider-dashed",n.nzDashed||n.nzVariant==="dashed")("ant-divider-dotted",n.nzVariant==="dotted")("ant-divider-sm",n.nzSize==="small")("ant-divider-md",n.nzSize==="middle")},inputs:{nzText:"nzText",nzType:"nzType",nzOrientation:"nzOrientation",nzVariant:"nzVariant",nzSize:"nzSize",nzDashed:[2,"nzDashed","nzDashed",r],nzPlain:[2,"nzPlain","nzPlain",r]},exportAs:["nzDivider"],decls:1,vars:1,consts:[[1,"ant-divider-inner-text"],[4,"nzStringTemplateOutlet"]],template:function(t,n){t&1&&p(0,_,2,1,"span",0),t&2&&m(n.nzText?0:-1)},dependencies:[x,C],encapsulation:2,changeDetection:0})}return e})(),j=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=l({type:e});static \u0275inj=d({imports:[N]})}return e})();export{N as a,j as b};