@yinuo-ngm/server 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/lib/plugins/api-client.plugin.js +1 -2
- package/lib/plugins/error-handler.plugin.js +2 -0
- package/lib/routes/api-client/collection.routes.js +18 -2
- package/lib/routes/dashboard.routes.js +5 -1
- package/package.json +2 -2
- package/www/browser/{chunk-V6LX42JA.js → chunk-37KQ3UTB.js} +1 -1
- package/www/browser/chunk-3LDMO67C.js +1 -0
- package/www/browser/{chunk-FL6BUQ4M.js → chunk-3MAJTMXX.js} +1 -1
- package/www/browser/{chunk-PYGKDDJK.js → chunk-3PWCJ3D5.js} +1 -1
- package/www/browser/{chunk-UWKUE7CZ.js → chunk-AZV6AWGC.js} +1 -1
- package/www/browser/{chunk-DV7BEQJD.js → chunk-CO7S3LZV.js} +1 -1
- package/www/browser/{chunk-DUC7XBYN.js → chunk-DJJC6FPO.js} +1 -1
- package/www/browser/{chunk-FPDGZ3ZC.js → chunk-EP45FT55.js} +3 -3
- package/www/browser/{chunk-7U5ZOE34.js → chunk-FNLA2MNI.js} +1 -1
- package/www/browser/{chunk-IXHH6ENJ.js → chunk-G73D24UX.js} +1 -1
- package/www/browser/{chunk-5IUYSJVD.js → chunk-GCKL62DR.js} +1 -1
- package/www/browser/{chunk-MN4WB67T.js → chunk-HCBKQAGF.js} +1 -1
- package/www/browser/{chunk-EAYGWAZB.js → chunk-IMQG3SAE.js} +1 -1
- package/www/browser/{chunk-3N7T4ZJF.js → chunk-J2JNFWJN.js} +1 -1
- package/www/browser/{chunk-TLFV3T3W.js → chunk-MD6RDGU4.js} +1 -1
- package/www/browser/{chunk-5MHC25IS.js → chunk-OUE23ZE4.js} +1 -1
- package/www/browser/{chunk-A2SBXP7A.js → chunk-W6TCGG53.js} +1 -1
- package/www/browser/{chunk-KKLLU6U7.js → chunk-XN5C33GH.js} +1 -1
- package/www/browser/chunk-YVSVIACA.js +4 -0
- package/www/browser/index.html +1 -1
- package/www/browser/main-V3VSEZ7K.js +29 -0
- package/www/browser/chunk-2PBA7FNM.js +0 -4
- package/www/browser/chunk-U7FBNFSB.js +0 -1
- package/www/browser/main-IIW5QQA5.js +0 -29
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as vn,f as yn}from"./chunk-DV7BEQJD.js";import{a as tt,b as Re}from"./chunk-5IUYSJVD.js";import{b as rt,c as lt,d as at}from"./chunk-MN4WB67T.js";import{a as ln,b as an,c as Je}from"./chunk-EC33AXSR.js";import{a as nt,b as it,d as xn,e as wn}from"./chunk-35COW2FA.js";import"./chunk-SIVPP74B.js";import{a as ot,b as De}from"./chunk-POZS3PD3.js";import{a as ve,b as ye}from"./chunk-3N7T4ZJF.js";import{a as Ue}from"./chunk-HZ73CM45.js";import{d as fe,e as he,f as te}from"./chunk-DUC7XBYN.js";import{e as pn,f as Ge,g as Qe}from"./chunk-ROB7EMN5.js";import"./chunk-SNCDDYQR.js";import{G as Se,I as hn,g as dn,l as Ie,n as Pe,p as mn,q as Ye,r as un,s as _n,t as Cn,u as gn,v as fn,w as Xe,x as et}from"./chunk-FPDGZ3ZC.js";import{Ab as H,Bb as ge,Cb as O,Fb as ke,G as Xt,H as It,Hb as qe,La as rn,M as J,N as U,O as en,P as tn,T as nn,U as on,V as D,W as X,Y as V,Z as I,jb as $,lb as B,pb as K,rb as sn,ub as cn,vb as P,x as Qt,yb as Ze,z as Yt}from"./chunk-PTMJ422K.js";import"./chunk-HFZLJHYR.js";import{B as qt,d as We,i as N,o as pe}from"./chunk-53YRDYLS.js";import{$b as R,Ca as Bt,Dc as Q,Eb as E,Ec as Ht,Fb as Ne,Fc as Y,Ha as A,Ic as m,Jc as k,Kb as W,Kc as le,Lc as Wt,Mc as ae,Nc as se,Oa as ee,Oc as ce,Vb as g,Vc as He,Wc as Ke,Xb as f,Xc as Jt,Zb as ue,_b as S,a as x,ac as d,ad as Ce,b as M,bc as l,cc as a,dc as h,e as Fe,f as At,fd as v,gd as kt,hc as oe,ic as re,jc as _e,kc as w,ld as je,ma as Ee,mb as s,na as Ae,pd as Zt,qc as C,r as Nt,ra as q,rb as y,rd as Gt,s as Be,tc as c,uc as Kt,vc as jt,vd as Le,xa as u,xc as Lt,ya as _,yc as Ut,z as j,zc as $t}from"./chunk-SJG2JCPL.js";var Ln=(i,t)=>t.id;function Un(i,t){i&1&&h(0,"nz-spin")}function $n(i,t){if(i&1&&(l(0,"nz-tag"),m(1),a()),i&2){let e=c().$implicit;s(),le("HTTP ",e.response.status)}}function Hn(i,t){i&1&&(l(0,"nz-tag",8),m(1,"ERR"),a())}function Wn(i,t){if(i&1){let e=w();l(0,"button",10),C("click",function(){u(e);let o=c().$implicit,r=c(3);return _(r.copy(o.resolved.curl.bash))}),m(1,"curl"),a()}}function Jn(i,t){if(i&1){let e=w();l(0,"div",3)(1,"div",5)(2,"nz-tag"),m(3),a(),l(4,"span",6),m(5),a()(),l(6,"div",7)(7,"span"),m(8),a(),g(9,$n,2,1,"nz-tag"),g(10,Hn,2,0,"nz-tag",8),a(),l(11,"div",9)(12,"button",10),C("click",function(){let o=u(e).$implicit,r=c(3);return _(r.replay.emit(o))}),m(13,"\u91CD\u653E"),a(),g(14,Wn,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),le("",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 Zn(i,t){i&1&&(l(0,"div",4),m(1,"\u6682\u65E0\u5386\u53F2\u8BB0\u5F55"),a())}function Gn(i,t){if(i&1&&(l(0,"div",2),S(1,Jn,15,6,"div",3,Ln),g(3,Zn,2,0,"div",4),a()),i&2){let e=c(2);s(),R(e.histories),s(2),f(e.histories.length?-1:3)}}function Qn(i,t){if(i&1&&(oe(0),g(1,Un,1,0,"nz-spin")(2,Gn,4,1,"div",2),re()),i&2){let e=c();s(),f(e.loading?1:2)}}var st=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=E({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()}),W(1,Qn,3,1,"ng-container",1),a()),e&2&&d("nzVisible",!0)("nzWidth",520)},dependencies:[N,Je,an,ln,I,V,D,X,De,ot,ye,ve],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 ei=["*"];function ti(i,t){if(i&1){let e=w();l(0,"button",12),C("click",function(o){u(e);let r=c();return r.toggle.emit(r.node.key),_(o.stopPropagation())}),h(1,"nz-icon",13),a()}if(i&2){let e=c();s(),d("nzType",e.hasChildren?e.expanded?"down":"right":"minus")}}function ni(i,t){if(i&1&&(l(0,"nz-tag",5),m(1),a()),i&2){let e=c();s(),k(e.node.method||"")}}function ii(i,t){if(i&1&&(l(0,"div",8),m(1),a()),i&2){let e=c();s(),k(e.node.subtitle)}}function oi(i,t){if(i&1){let e=w();l(0,"li",16),C("click",function(){u(e);let o=c(3);return o.createFolder.emit(o.node.id),_(o.visible=!1)}),h(1,"nz-icon",22),l(2,"span"),m(3,"\u65B0\u5EFA\u76EE\u5F55"),a()()}}function ri(i,t){if(i&1){let e=w();l(0,"li",16),C("click",function(){u(e);let o=c(3);return o.move.emit(o.node.id),_(o.visible=!1)}),h(1,"nz-icon",22),l(2,"span"),m(3,"\u79FB\u52A8\u5230"),a()()}}function li(i,t){if(i&1){let e=w();g(0,oi,4,0,"li",15),l(1,"li",16),C("click",function(){u(e);let o=c(2);return o.createRequest.emit(o.node.id),_(o.visible=!1)}),h(2,"nz-icon",17),l(3,"span"),m(4,"\u65B0\u5EFA\u8BF7\u6C42"),a()(),g(5,ri,4,0,"li",15),l(6,"li",16),C("click",function(){u(e);let o=c(2);return o.rename.emit(o.node.id),_(o.visible=!1)}),h(7,"nz-icon",18),l(8,"span"),m(9,"\u91CD\u547D\u540D"),a()(),h(10,"li",19),l(11,"li",20),C("nzOnConfirm",function(){u(e);let o=c(2);return _(o.delete.emit(o.node.id))}),h(12,"nz-icon",21),l(13,"span"),m(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 ai(i,t){if(i&1){let e=w();l(0,"li",16),C("click",function(){u(e);let o=c(2);return o.move.emit(o.node.id),_(o.visible=!1)}),h(1,"nz-icon",22),l(2,"span"),m(3,"\u79FB\u52A8\u5230"),a()(),l(4,"li",16),C("click",function(){u(e);let o=c(2);return o.rename.emit(o.node.id),_(o.visible=!1)}),h(5,"nz-icon",18),l(6,"span"),m(7,"\u91CD\u547D\u540D"),a()(),h(8,"li",19),l(9,"li",20),C("nzOnConfirm",function(){u(e);let o=c(2);return _(o.delete.emit(o.node.id))}),h(10,"nz-icon",21),l(11,"span"),m(12,"\u5220\u9664"),a()()}}function si(i,t){if(i&1&&(l(0,"ul",14),g(1,li,15,2)(2,ai,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),jt(1),a())}var ct=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=E({type:i,selectors:[["app-collection-tree-item"]],hostVars:2,hostBindings:function(e,n){e&2&&Y("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:ei,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=w();Kt(),l(0,"div",1),g(1,ti,2,1,"button",2),l(2,"div",3),C("click",function(){return u(o),_(n.onClick())}),h(3,"nz-icon",4),g(4,ni,2,1,"nz-tag",5),l(5,"div",6)(6,"div",7),m(7),a(),g(8,ii,2,1,"div",8),a()(),l(9,"button",9),C("click",function(p){return u(o),_(p.stopPropagation())}),ce("nzPopoverVisibleChange",function(p){return u(o),se(n.visible,p)||(n.visible=p),_(p)}),h(10,"nz-icon",10),a(),W(11,si,3,1,"ng-template",null,0,Ce),a(),g(13,ci,2,0,"div",11)}if(e&2){let o=Q(12);Y("active",n.activeKey===n.node.key),s(),f(n.hasChildren?1:-1),s(2),d("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(),ae("nzPopoverVisible",n.visible),d("nzPopoverContent",o)("nzPopoverOverlayClassName","project-item-popover"),s(4),f(n.hasChildren&&n.expanded?13:-1)}},dependencies:[N,I,V,D,P,U,J,Qe,Ge,Ye,Pe,Ie,mn,ye,ve,Re,tt],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 zn=i=>({$implicit:i}),Mn=(i,t)=>t.key;function di(i,t){if(i&1&&_e(0,1),i&2){let e=t.$implicit;c();let n=Q(4);d("ngTemplateOutlet",n)("ngTemplateOutletContext",Ke(2,zn,e))}}function mi(i,t){i&1&&(l(0,"div",2),m(1,"\u6682\u65E0\u8BF7\u6C42"),a())}function ui(i,t){if(i&1&&_e(0,1),i&2){let e=t.$implicit;c(2);let n=Q(4);d("ngTemplateOutlet",n)("ngTemplateOutletContext",Ke(2,zn,e))}}function _i(i,t){if(i&1){let e=w();l(0,"app-collection-tree-item",3),C("toggle",function(o){u(e);let r=c();return _(r.toggle(o))})("selectRequest",function(o){u(e);let r=c();return _(r.onSelectRequest(o))})("selectCollection",function(o){u(e);let r=c();return _(r.onSelectCollection(o))})("createRequest",function(o){u(e);let r=c();return _(r.createRequest.emit({collectionId:o}))})("createFolder",function(o){u(e);let r=c();return _(r.createFolder.emit({collectionId:o}))})("rename",function(o){let r=u(e).$implicit,p=c();return _(p.rename.emit({id:o,kind:r.kind}))})("move",function(o){let r=u(e).$implicit,p=c();return _(p.move.emit({id:o,kind:r.kind}))})("copyCurl",function(o){u(e);let r=c();return _(r.copyCurl.emit(o))})("delete",function(o){let r=u(e).$implicit,p=c();return _(p.delete.emit({id:o,kind:r.kind}))}),S(1,ui,1,4,"ng-container",1,Mn),a()}if(i&2){let e=t.$implicit,n=c();d("node",e)("expanded",n.expanded(e.key))("activeKey",n.activeKey()),s(),R(e.children)}}var pt=class i{nodes=[];activeRequestId=je(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=A(null);activeCollectionId=v(()=>this._activeCollectionId());expandedMap=A({});expanded(t){return!!this.expandedMap()[t]}toggle(t){let e=x({},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=x({},this.expandedMap());n[e]=!0,this.expandedMap.set(n)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-collection-tree"]],hostVars:2,hostBindings:function(e,n){e&2&&Y("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,di,1,4,"ng-container",1,Mn),g(2,mi,2,0,"div",2),W(3,_i,3,3,"ng-template",null,0,Ce)),e&2&&(R(n.nodes),s(2),f(n.nodes.length?-1:2))},dependencies:[N,We,P,O,U,I,ct],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 Ci(i,t){if(i&1){let e=w();l(0,"ul",11)(1,"li",12),C("click",function(){u(e);let o=c();return o.createRequest.emit({collectionId:null}),_(o.visible=!1)}),h(2,"nz-icon",13),l(3,"span"),m(4,"\u65B0\u5EFA\u8BF7\u6C42"),a()(),l(5,"li",12),C("click",function(){u(e);let o=c();return _(o.createCollection.emit())}),h(6,"nz-icon",14),l(7,"span"),m(8,"\u65B0\u5EFA\u96C6\u5408"),a()()()}}var dt=class i{nodes=je([]);q=Zt("");activeId=je(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=E({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=w();l(0,"div",1)(1,"div",2)(2,"nz-input-wrapper"),h(3,"nz-icon",3),l(4,"input",4),ce("ngModelChange",function(p){return u(o),se(n.q,p)||(n.q=p),_(p)}),a()(),l(5,"button",5),C("click",function(){return u(o),_(n.reload.emit())}),h(6,"nz-icon",6),a(),l(7,"button",7),ce("nzPopoverVisibleChange",function(p){return u(o),se(n.visible,p)||(n.visible=p),_(p)}),h(8,"nz-icon",8),a()(),l(9,"div",9)(10,"app-collection-tree",10),C("selectRequest",function(p){return u(o),_(n.select.emit(p))})("createRequest",function(p){return u(o),_(n.createRequest.emit({collectionId:p.collectionId}))})("createFolder",function(p){return u(o),_(n.createFolder.emit({collectionId:p.collectionId??null}))})("rename",function(p){return u(o),_(n.rename.emit(p))})("move",function(p){return u(o),_(n.move.emit(p))})("delete",function(p){return u(o),_(n.delete.emit({id:p.id,kind:p.kind}))}),a()()(),W(11,Ci,9,0,"ng-template",null,0,Ce)}if(e&2){let o=Q(12);s(4),ae("ngModel",n.q),s(2),d("nzType",n.loading?"loading":"reload"),s(),ae("nzPopoverVisible",n.visible),d("nzPopoverContent",o)("nzPopoverOverlayClassName","project-item-popover"),s(3),d("nodes",n.nodes())("activeRequestId",n.activeId())}},dependencies:[N,P,$,B,K,I,V,D,O,H,ge,Ze,U,J,Ye,Pe,Ie,Qe,Ge,pt],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 gi(i,t){i&1&&_e(0)}function fi(i,t){if(i&1&&W(0,gi,1,0,"ng-container",7),i&2){let e=c(3);d("nzStringTemplateOutlet",e.nzIcon)}}function hi(i,t){if(i&1&&h(0,"nz-icon",6),i&2){let e=c(3);d("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme)}}function vi(i,t){if(i&1&&(l(0,"div",2),g(1,fi,1,1,"ng-container")(2,hi,1,2,"nz-icon",6),a()),i&2){let e=c(2);s(),f(e.nzIcon?1:2)}}function yi(i,t){if(i&1&&(oe(0),m(1),re()),i&2){let e=c(4);s(),k(e.nzMessage)}}function xi(i,t){if(i&1&&(l(0,"span",8),W(1,yi,2,1,"ng-container",7),a()),i&2){let e=c(3);s(),d("nzStringTemplateOutlet",e.nzMessage)}}function wi(i,t){if(i&1&&(oe(0),m(1),re()),i&2){let e=c(4);s(),k(e.nzDescription)}}function bi(i,t){if(i&1&&(l(0,"span",9),W(1,wi,2,1,"ng-container",7),a()),i&2){let e=c(3);s(),d("nzStringTemplateOutlet",e.nzDescription)}}function zi(i,t){if(i&1&&(l(0,"div",3),g(1,xi,2,1,"span",8),g(2,bi,2,1,"span",9),a()),i&2){let e=c(2);s(),f(e.nzMessage?1:-1),s(),f(e.nzDescription?2:-1)}}function Mi(i,t){if(i&1&&(oe(0),m(1),re()),i&2){let e=c(3);s(),k(e.nzAction)}}function Ti(i,t){if(i&1&&(l(0,"div",4),W(1,Mi,2,1,"ng-container",7),a()),i&2){let e=c(2);s(),d("nzStringTemplateOutlet",e.nzAction)}}function Ei(i,t){if(i&1&&(oe(0),l(1,"span",12),m(2),a(),re()),i&2){let e=c(4);s(2),k(e.nzCloseText)}}function Ai(i,t){if(i&1&&W(0,Ei,3,1,"ng-container",7),i&2){let e=c(3);d("nzStringTemplateOutlet",e.nzCloseText)}}function Ni(i,t){i&1&&h(0,"nz-icon",11)}function ki(i,t){if(i&1){let e=w();l(0,"button",10),C("click",function(){u(e);let o=c(2);return _(o.closeAlert())}),g(1,Ai,1,1,"ng-container")(2,Ni,1,0,"nz-icon",11),a()}if(i&2){let e=c(2);s(),f(e.nzCloseText?1:2)}}function qi(i,t){if(i&1){let e=w();l(0,"div",1),C("@slideAlertMotion.done",function(){u(e);let o=c();return _(o.onFadeAnimationDone())}),g(1,vi,3,1,"div",2),g(2,zi,3,2,"div",3),g(3,Ti,2,1,"div",4),g(4,ki,3,1,"button",5),a()}if(i&2){let e=c();Y("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),d("@.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 Tn="alert",Me=(()=>{var p;let i,t=[],e=[],n,o=[],r=[];return p=class{cdr=q(Gt);directionality=q(Qt);destroyRef=q(Bt);_nzModuleName=Tn;nzAction=null;nzCloseText=null;nzIconType=null;nzMessage=null;nzDescription=null;nzType="info";nzCloseable=Be(this,t,!1);nzShowIcon=(Be(this,e),Be(this,o,!1));nzBanner=(Be(this,r),!1);nzNoAnimation=!1;nzIcon=null;nzOnClose=new y;closed=!1;iconTheme="fill";inferredIconType="info-circle";dir="ltr";isTypeSet=!1;isShowIconSet=!1;constructor(){Xt(Tn,()=>this.cdr.markForCheck())}ngOnInit(){this.directionality.change?.pipe(Yt(this.destroyRef)).subscribe(T=>{this.dir=T,this.cdr.detectChanges()}),this.dir=this.directionality.value}closeAlert(){this.closed=!0}onFadeAnimationDone(){this.closed&&this.nzOnClose.emit(!0)}ngOnChanges(T){let{nzShowIcon:z,nzDescription:L,nzType:G,nzBanner:Tt}=T;if(z&&(this.isShowIconSet=!0),G)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}L&&(this.iconTheme=this.nzDescription?"outline":"fill"),Tt&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=!0))}},(()=>{let T=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[It()],n=[It()],Nt(null,null,i,{kind:"field",name:"nzCloseable",static:!1,private:!1,access:{has:z=>"nzCloseable"in z,get:z=>z.nzCloseable,set:(z,L)=>{z.nzCloseable=L}},metadata:T},t,e),Nt(null,null,n,{kind:"field",name:"nzShowIcon",static:!1,private:!1,access:{has:z=>"nzShowIcon"in z,get:z=>z.nzShowIcon,set:(z,L)=>{z.nzShowIcon=L}},metadata:T},o,r),T&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:T})})(),At(p,"\u0275fac",function(z){return new(z||p)}),At(p,"\u0275cmp",E({type:p,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:[2,"nzCloseable","nzCloseable",Le],nzShowIcon:[2,"nzShowIcon","nzShowIcon",Le],nzBanner:[2,"nzBanner","nzBanner",Le],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",Le],nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],features:[ee],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(z,L){z&1&&g(0,qi,5,24,"div",0),z&2&&f(L.closed?-1:0)},dependencies:[U,J,tn,en],encapsulation:2,data:{animation:[rn]},changeDetection:0})),p})(),Ve=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ne({type:i});static \u0275inj=Ae({imports:[Me]})}return i})();function Ii(i,t){if(i&1&&h(0,"nz-option",3),i&2){let e=t.$implicit;d("nzValue",e)("nzLabel",e)}}function Pi(i,t){if(i&1){let e=w();l(0,"nz-select",8),C("ngModelChange",function(o){u(e);let r=c();return _(r.setApiKeyIn(o))}),h(1,"nz-option",9)(2,"nz-option",10),a()}if(i&2){let e=c();d("ngModel",e.apiKeyIn())}}function Si(i,t){i&1&&(l(0,"div",6),m(1,"\u65E0\u9274\u6743"),a())}function Ri(i,t){if(i&1){let e=w();l(0,"div",7)(1,"div",11)(2,"div",12),m(3,"Username"),a(),l(4,"input",13),C("ngModelChange",function(o){u(e);let r=c();return _(r.setBasicUsername(o))}),a()(),l(5,"div",11)(6,"div",12),m(7,"Password"),a(),l(8,"input",14),C("ngModelChange",function(o){u(e);let r=c();return _(r.setBasicPassword(o))}),a()()()}if(i&2){let e=c();s(4),d("ngModel",e.basicUsername()),s(4),d("ngModel",e.basicPassword())}}function Di(i,t){if(i&1){let e=w();l(0,"div",7)(1,"div",11)(2,"div",12),m(3,"Token"),a(),l(4,"input",15),C("ngModelChange",function(o){u(e);let r=c();return _(r.setBearerToken(o))}),a()()()}if(i&2){let e=c();s(4),d("ngModel",e.bearerToken())}}function Vi(i,t){i&1&&h(0,"nz-alert",18)}function Oi(i,t){i&1&&h(0,"nz-alert",19)}function Fi(i,t){if(i&1){let e=w();l(0,"div",7)(1,"div",11)(2,"div",12),m(3,"Key"),a(),l(4,"input",16),C("ngModelChange",function(o){u(e);let r=c();return _(r.setApiKeyKey(o))}),a()(),l(5,"div",11)(6,"div",12),m(7,"Value"),a(),l(8,"input",17),C("ngModelChange",function(o){u(e);let r=c();return _(r.setApiKeyValue(o))}),a()(),g(9,Vi,1,0,"nz-alert",18),g(10,Oi,1,0,"nz-alert",19),a()}if(i&2){let e=c();s(4),d("ngModel",e.apiKeyKey()),s(4),d("ngModel",e.apiKeyValue()),s(),f(e.apiKeyIn()==="query"?9:-1),s(),f(e.apiKeyIn()==="header"?10:-1)}}var mt=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=M(x({},this.auth??{type:"basic"}),{type:"basic",basic:M(x({},this.auth?.basic),{username:t})});this.authChange.emit(e)}setBasicPassword(t){let e=M(x({},this.auth??{type:"basic"}),{type:"basic",basic:M(x({},this.auth?.basic),{password:t})});this.authChange.emit(e)}setBearerToken(t){let e=M(x({},this.auth??{type:"bearer"}),{type:"bearer",bearer:M(x({},this.auth?.bearer),{token:t})});this.authChange.emit(e)}setApiKeyIn(t){let e=M(x({},this.auth??{type:"apikey"}),{type:"apikey",apikey:M(x({},this.auth?.apikey),{in:t,key:this.apiKeyKey(),value:this.apiKeyValue()})});this.authChange.emit(e)}setApiKeyKey(t){let e=M(x({},this.auth??{type:"apikey"}),{type:"apikey",apikey:M(x({},this.auth?.apikey),{in:this.apiKeyIn(),key:t,value:this.apiKeyValue()})});this.authChange.emit(e)}setApiKeyValue(t){let e=M(x({},this.auth??{type:"apikey"}),{type:"apikey",apikey:M(x({},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=E({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,Ii,1,2,"nz-option",3,ue),a(),g(5,Pi,3,1,"nz-select",4),a(),l(6,"div",5),g(7,Si,2,0,"div",6)(8,Ri,9,2,"div",7)(9,Di,5,1,"div",7)(10,Fi,11,4,"div",7),a()()),e&2){let o;s(2),d("ngModel",n.type()),s(),R(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:[N,P,$,B,K,te,fe,he,O,H,Ve,Me],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 An=Fe(Ue());var Ki=(i,t)=>t.id;function ji(i,t){if(i&1){let e=w();l(0,"label",10),C("ngModelChange",function(o){u(e);let r=c();return _(r.toggleEnabled(o))}),a()}if(i&2){let e=c();d("ngModel",e.isAllEnabled())}}function Li(i,t){if(i&1){let e=w();l(0,"div",9)(1,"div",2)(2,"label",11),C("ngModelChange",function(o){let r=u(e).$index,p=c();return _(p.setEnabled(r,o))}),a()(),l(3,"div",12)(4,"input",13),C("ngModelChange",function(o){let r=u(e).$index,p=c();return _(p.setKey(r,o))}),a()(),l(5,"div",5)(6,"input",14),C("ngModelChange",function(o){let r=u(e).$index,p=c();return _(p.setValue(r,o))}),a()(),l(7,"div",6)(8,"input",14),C("ngModelChange",function(o){let r=u(e).$index,p=c();return _(p.setDescription(r,o))}),a()(),l(9,"div",7)(10,"button",15),C("click",function(){let o=u(e).$index,r=c();return _(r.removeRow(o))}),h(11,"nz-icon",16),a()()()}if(i&2){let e=t.$implicit,n=c();s(2),d("ngModel",e.enabled)("nzDisabled",!n.keepTrailingBlank),s(),d("nz-tooltip",n.keepTrailingBlank?"":"\u81EA\u52A8\u63D0\u53D6Url \u4E2D\u7684 Path \u53C2\u6570\uFF0C\u652F\u6301{param} \u4E0E :param"),s(),d("readonly",!n.keepTrailingBlank)("placeholder",n.keyPlaceholder)("ngModel",e.key),s(2),d("placeholder",n.valuePlaceholder)("ngModel",e.value),s(2),d("placeholder",n.descriptionLabel)("ngModel",e.description)}}var we=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=>M(x({},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,An.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?M(x({},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?x(x({},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=E({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:[ee],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,ji,1,1,"label",3),a(),l(4,"div",4),m(5),a(),l(6,"div",5),m(7),a(),l(8,"div",6),m(9),a(),h(10,"div",7),a(),l(11,"div",8),S(12,Li,12,10,"div",9,Ki),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),R(n.rows))},dependencies:[N,P,$,B,K,I,V,D,it,nt,O,H,U,J,qe,ke],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 Nn=Fe(Ue());function Ui(i,t){if(i&1&&h(0,"nz-option",3),i&2){let e=t.$implicit;d("nzValue",e)("nzLabel",e)}}function $i(i,t){if(i&1){let e=w();l(0,"button",10),C("click",function(){u(e);let o=c();return _(o.formatJson())}),m(1,"\u683C\u5F0F\u5316 JSON"),a()}}function Hi(i,t){i&1&&(l(0,"div",7),m(1,"\u65E0 Body"),a())}function Wi(i,t){if(i&1){let e=w();l(0,"textarea",11),C("ngModelChange",function(o){u(e);let r=c();return _(r.setTextBody(o))}),a()}if(i&2){let e=c();d("ngModel",e.textBody())}}function Ji(i,t){if(i&1&&(l(0,"div",13),m(1),a()),i&2){let e=c(2);s(),k(e.jsonError())}}function Zi(i,t){if(i&1){let e=w();l(0,"textarea",12),C("ngModelChange",function(o){u(e);let r=c();return _(r.setJsonText(o))}),a(),g(1,Ji,2,1,"div",13)}if(i&2){let e=c();d("ngModel",e.jsonText()),s(),f(e.jsonError()?1:-1)}}function Gi(i,t){if(i&1){let e=w();l(0,"app-kv-table",14),C("rowsChange",function(o){u(e);let r=c();return _(r.setUrlRows(o))}),a()}if(i&2){let e=c();d("rows",e.urlRows())}}function Qi(i,t){i&1&&(l(0,"div",7),m(1,"MVP \u4EC5\u652F\u6301 none/json/text/urlencoded"),a())}var ut=class i{msg=q(Se);body;bodyChange=new y;bodySig=A(void 0);modes=["none","json","text","urlencoded","form","binary"];_jsonText=A("");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=A("");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,Nn.uniqueId)()}))});setMode(t){let e=this.body,n=M(x({},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=M(x({},this.body??{mode:e}),{contentType:t});this.bodyChange.emit(n)}setTextBody(t){let e=M(x({},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=M(x({},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=M(x({},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=M(x({},this.body??{mode:"urlencoded"}),{mode:"urlencoded",content:e});this.bodyChange.emit(n)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-body-editor"]],inputs:{body:"body"},outputs:{bodyChange:"bodyChange"},features:[ee],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,Ui,1,2,"nz-option",3,ue),a(),l(5,"input",4),C("ngModelChange",function(r){return n.setContentType(r)}),a(),g(6,$i,2,0,"button",5),a(),l(7,"div",6),g(8,Hi,2,0,"div",7)(9,Wi,1,1,"textarea",8)(10,Zi,2,2)(11,Gi,1,1,"app-kv-table",9)(12,Qi,2,0,"div",7),a()()),e&2){let o;s(2),d("ngModel",n.mode()),s(),R(n.modes),s(2),d("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:[N,P,$,B,K,I,V,D,X,O,H,te,fe,he,we],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 _t=class i{http=q(dn);base="/api/client";async listRequests(t,e){let n=new pe().set("scope",t);return e&&(n=n.set("projectId",e)),await j(this.http.get(`${this.base}/requests`,n))}async saveRequest(t,e,n){return await j(this.http.post(`${this.base}/requests`,{scope:t,projectId:e,request:n}))}async updateRequest(t,e,n){return await j(this.http.post(`${this.base}/requests/update`,{scope:t,projectId:e,request:n}))}async deleteRequest(t,e,n){let o=new pe().set("scope",e);return n&&(o=o.set("projectId",n)),await j(this.http.delete(`${this.base}/requests/${t}`,o))}async send(t){return await j(this.http.post(`${this.base}/send`,t))}async listHistory(t,e){let n=new pe().set("scope",t);return e&&(n=n.set("projectId",e)),await j(this.http.get(`${this.base}/history`,n))}async listEnvs(t,e){let n=new pe().set("scope",t);return e&&(n=n.set("projectId",e)),await j(this.http.get(`${this.base}/envs`,n))}async saveEnv(t,e,n){return await j(this.http.post(`${this.base}/envs`,{scope:t,projectId:e,env:n}))}async deleteEnv(t,e,n){let o=new pe().set("scope",e);return n&&(o=o.set("projectId",n)),await j(this.http.delete(`${this.base}/envs/${t}`,o))}async listCollections(t,e){let n=new pe().set("scope",t);return e&&(n=n.set("projectId",e)),await j(this.http.get(`${this.base}/collections`,n))}async createCollection(t){return await j(this.http.post(`${this.base}/collections`,t))}async updateCollection(t,e,n,o){let r=new pe().set("scope",n).set("projectId",o??"");return await j(this.http.post(`${this.base}/collections/${t}`,e,r))}async deleteCollection(t,e,n){let o=new pe().set("scope",e).set("projectId",n??"");return await j(this.http.delete(`${this.base}/collections/${t}`,o))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ee({token:i,factory:i.\u0275fac,providedIn:"root"})};var Yi=/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g;function kn(i=[]){let t={};for(let e of i)e.enabled&&(t[e.key]=String(e.value??""));return t}function Xi(i,t){let e=new Set;return{out:i.replace(Yi,(o,r)=>r in t?String(t[r]??""):(e.add(r),`{{${r}}}`)),missing:[...e]}}function qn(i,t){let e=new Set;for(let n of i){if(!n)continue;let{missing:o}=Xi(n,t);o.forEach(r=>e.add(r))}return[...e]}var In=Fe(Ue());function Oe(i){if(!i)return[];let t=i;try{t=new URL(i).pathname||""}catch{t=i.split("?")[0].split("#")[0]||"";let b=t.indexOf("/");b>=0&&(t=t.slice(b))}let e=eo(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 eo(i){try{return decodeURIComponent(i)}catch{return i}}function Dt(i,t){let e=Oe(i),n=Array.isArray(t)?t:[],o=new Map;for(let p of n){let b=(p.key??"").trim();b&&(o.has(b)||o.set(b,p))}return e.map(p=>{let b=o.get(p);return b?M(x({},b),{key:p,enabled:!0}):{key:p,value:"",description:"",enabled:!0,id:(0,In.uniqueId)()}})}var Pn=Fe(Ue());function Vt(i){return(i??[]).map(t=>({key:t.key,value:t.value,enabled:t.enabled,id:(0,Pn.uniqueId)(),description:t.description}))}function Sn(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 to(i,t){if(!t)return!0;let e=(i.name??"").toLowerCase(),n=(i.url??"").toLowerCase();return e.includes(t)||n.includes(t)}function Ot(i,t,e){let n=e?.trim().toLowerCase()||"",o=new Map;for(let z of i??[]){let L=z.parentId??null,G=o.get(L)??[];G.push(z),o.set(L,G)}let r=new Map;for(let z of t??[]){if(!to(z,n))continue;let L=z.collectionId??null,G=r.get(L)??[];G.push(z),r.set(L,G)}let p=(z,L)=>{let G=String(z.id),Tt=z.kind??"collection",Fn=z.name??"\u672A\u547D\u540D",Et=`c:${G}`,Bn=o.get(G)??[],Kn=r.get(G)??[];return{key:Et,kind:Tt,id:G,title:Fn,name:z.name,parentKey:L,children:[...Bn.map(me=>p(me,Et)),...Kn.map(me=>({key:`r:${String(me.id)}`,kind:"request",id:me.id,title:me.name??"\u672A\u547D\u540D",name:me.name,subtitle:me.url??"",method:me.method??"",parentKey:Et,children:[]}))]}},b=o.get(null)??[],T=r.get(null)??[];return[...b.map(z=>p(z,null)),...T.map(z=>({key:`r:${String(z.id)}`,kind:"request",id:String(z.id),title:z.name??"\u672A\u547D\u540D",name:z.name,subtitle:z.url??"",method:z.method??"",parentKey:null,children:[]}))]}var Dn=Fe(Ue());var no=i=>({$implicit:i,level:0}),io=(i,t)=>({$implicit:i,level:t}),Rn=(i,t)=>t.key;function oo(i,t){if(i&1&&(l(0,"div",8),m(1),a()),i&2){let e=c(2);s(),k(e.nameErr())}}function ro(i,t){if(i&1){let e=w();l(0,"label",5),m(1,"\u540D\u79F0"),a(),l(2,"nz-input-wrapper")(3,"input",6),C("ngModelChange",function(o){u(e);let r=c();return _(r.name.set(o))}),a(),h(4,"nz-icon",7),a(),g(5,oo,2,1,"div",8)}if(i&2){let e=c();s(3),d("ngModel",e.name()),s(),d("nzType",e.iconForKind()),s(),f(e.nameErr()?5:-1)}}function lo(i,t){if(i&1&&_e(0,12),i&2){let e=t.$implicit;c(2);let n=Q(9);d("ngTemplateOutlet",n)("ngTemplateOutletContext",Ke(2,no,e))}}function ao(i,t){i&1&&(l(0,"div",13),m(1,"\u6682\u65E0\u76EE\u5F55"),a())}function so(i,t){if(i&1&&(l(0,"div",8),m(1),a()),i&2){let e=c(2);s(),k(e.moveErr())}}function co(i,t){if(i&1){let e=w();l(0,"div",9)(1,"div",10),C("click",function(){u(e);let o=c();return _(o.select(null))}),h(2,"nz-icon",11),l(3,"span"),m(4,"\u6839\u76EE\u5F55"),a()(),S(5,lo,1,4,"ng-container",12,Rn),g(7,ao,2,0,"div",13),a(),g(8,so,2,1,"div",8)}if(i&2){let e=c();s(),Y("selected",e.selectedKey()===null),s(4),R(e.filteredNodes()),s(2),f(e.filteredNodes().length?-1:7),s(),f(e.moveErr()?8:-1)}}function po(i,t){if(i&1&&_e(0,12),i&2){let e=t.$implicit,n=c(2).level;c();let o=Q(9);d("ngTemplateOutlet",o)("ngTemplateOutletContext",Jt(2,io,e,n+1))}}function mo(i,t){if(i&1&&S(0,po,1,5,"ng-container",12,Rn),i&2){let e=c().$implicit;R(e.children)}}function uo(i,t){if(i&1){let e=w();l(0,"div",14),C("click",function(){let o=u(e).$implicit,r=c();return _(r.select(o.key))}),l(1,"button",15),C("click",function(o){let r=u(e).$implicit;return c().toggle(r.key),_(o.stopPropagation())}),h(2,"nz-icon",16),a(),h(3,"nz-icon",17),l(4,"span",18),m(5),a()(),g(6,mo,2,0)}if(i&2){let e=t.$implicit,n=t.level,o=c();Ht("padding-left",8+n*16,"px"),Y("selected",o.selectedKey()===e.key),s(),d("disabled",!(e.children!=null&&e.children.length)),s(),d("nzType",e.children!=null&&e.children.length?o.expanded(e.key)?"down":"right":"minus"),s(),d("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 _o(i){return i?`c:${i}`:null}function Co(i){return i&&i.startsWith("c:")?i.slice(2):null}var Te=class i{data=q(fn);modalRef=q(Xe);q=A("");name=A("");selectedKey=A(null);expandedMap=A({});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:_o(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=x({},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=b=>{for(let T of b.children??[])T.kind!=="request"&&(n.add(T.key),r(T))},p=b=>{for(let T of b)T.key===e?r(T):T.children?.length&&p(T.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 b=n(p.children??[]);r.push(M(x({},p),{children:b}))}return r};return n(t)});filteredNodes=v(()=>{if(!this.showParentPicker())return[];let t=this.q().trim().toLowerCase();if(!t)return this.nodesForPicker();let e=b=>(b.title??"").toLowerCase().includes(t),n=b=>{let T=[];for(let z of b){let L=n(z.children??[]);(e(z)||L.length)&&T.push(M(x({},z),{children:L}))}return T},o=n(this.nodesForPicker()),r=x({},this.expandedMap()),p=b=>{for(let T of b)T.children?.length&&(r[T.key]=!0),T.children?.length&&p(T.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=M(x({},n),{name:(this.name()??"").trim(),parentId:n.parentId??null});this.modalRef.close(o);return}let e=Co(this.selectedKey());this.modalRef.close({parentId:e})}cancel(){this.modalRef.close(null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({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=w();l(0,"div",1),g(1,ro,6,3),g(2,co,9,4),a(),l(3,"div",2)(4,"button",3),C("click",function(){return u(o),_(n.cancel())}),m(5,"\u53D6\u6D88"),a(),l(6,"button",4),C("click",function(){return u(o),_(n.ok())}),m(7," \u786E\u5B9A "),a()(),W(8,uo,7,9,"ng-template",null,0,Ce)}e&2&&(s(),f(n.showName()?1:-1),s(),f(n.showParentPicker()?2:-1),s(4),d("disabled",!n.canSubmit()))},dependencies:[N,We,P,$,B,K,O,H,ge,Ze,I,V,D,X,U,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 Ct=class i{modal=q(et);async createCollection(t){let e=this.modal.create({nzTitle:t.kind==="folder"?"\u65B0\u5EFA\u76EE\u5F55":"\u65B0\u5EFA\u96C6\u5408",nzContent:Te,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"create",createBody:t.createBody,nodes:t.nodes}});return await j(e.afterClose)}async renameCollection(t){let e=this.modal.create({nzTitle:"\u91CD\u547D\u540D",nzContent:Te,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"rename",kind:t.kind,nodes:t.nodes,targetId:t.targetId,initialName:t.initialName}});return await j(e.afterClose)}async moveTarget(t){let e=this.modal.create({nzTitle:"\u79FB\u52A8\u5230",nzContent:Te,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"move",nodes:t.nodes,target:t.target,initialParentId:t.initialParentId??null}});return await j(e.afterClose)}async pickCollection(t){let e=this.modal.create({nzTitle:"\u9009\u62E9\u96C6\u5408/\u76EE\u5F55",nzContent:Te,nzFooter:null,nzWidth:520,nzMaskClosable:!1,nzData:{mode:"pick",nodes:t.nodes}});return await j(e.afterClose)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ee({token:i,factory:i.\u0275fac,providedIn:"root"})};function go(){return Date.now()}function fo(i){let t=Math.random().toString(16).slice(2,10);return`${i}_${t}_${Date.now().toString(16)}`}var be=class i{api=q(_t);msg=q(Se);projectState=q(hn);collectionModal=q(Ct);scope=A("project");loading=A(!1);q=A("");sending=A(!1);requests=A([]);activeRequestId=A(null);collections=A([]);activeCollectionId=A(null);nodes=v(()=>Ot(this.collections(),this.requests(),"").filter(t=>t.kind!=="request"));filteredNodes=v(()=>{let t=this.q().toLowerCase();return t?Ot(this.collections(),this.requests(),t):this.nodes()});historyOpen=A(!1);historyLoading=A(!1);histories=A([]);envs=A([]);envLoading=A(!1);activeEnvId=A(null);lastResult=A(null);projectId=v(()=>this.projectState.currentProject()?.id??"");activeRequest=A(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?kn(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(){kt(()=>{this.scope()!=="project"||!this.projectId()||this.loadAll()}),kt(()=>{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(b=>[...b,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(b=>b.id===t);if(!p){this.msg.error("\u8BF7\u6C42\u4E0D\u5B58\u5728");return}n=p.collectionId??""}else{let p=this.collections().find(b=>b.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(T=>T.id===t);if(!p){this.msg.error("\u8BF7\u6C42\u4E0D\u5B58\u5728");return}let b={collectionId:r??null,id:p.id};p.collectionId=r??null,await this.api.updateRequest(this.scope(),this.projectId(),b),this.requests.update(T=>T.map(z=>z.id===t?M(x({},z),{collectionId:r??null}):z)),this.setActive(p.id===this.activeRequestId()?M(x({},p),{collectionId:r??null}):p),this.msg.success("\u4FEE\u6539\u6210\u529F")}else{let p={parentId:r??null},b=await this.api.updateCollection(t,p,this.scope(),this.projectId());this.collections.update(T=>T.map(z=>z.id===t?b:z)),this.activeCollectionId.set(b.id),this.msg.success("\u4FEE\u6539\u6210\u529F")}}async renameCollection(t,e){let n="";if(e=="request"){let p=this.requests().find(b=>b.id===t);if(!p){this.msg.error("\u8BF7\u6C42\u4E0D\u5B58\u5728");return}n=p.name??""}else{let p=this.collections().find(b=>b.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(b=>b.id===t?M(x({},b),{name:r.name??b.name}):b)),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(b=>b.map(T=>T.id===t?p:T)),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=go(),o={id:fo("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=M(x(x({},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(x({},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,Dn.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=Ee({token:i,factory:i.\u0275fac,providedIn:"root"})};var ho=["class","component"],vo=(i,t)=>t.id;function yo(i,t){if(i&1){let e=w();l(0,"div",9),C("click",function(){let o=u(e).$implicit,r=c();return _(r.selectEditEnv(o.id))}),l(1,"div",10),m(2),a(),l(3,"div",11),m(4),a()()}if(i&2){let e,n=t.$implicit,o=c();Y("active",n.id===((e=o.draft())==null?null:e.id)),s(2),k(n.name),s(2),le("",n.variables.length," vars")}}function xo(i,t){i&1&&(l(0,"div",6),m(1,"\u6682\u65E0\u73AF\u5883"),a())}function wo(i,t){i&1&&(l(0,"div",6),m(1,"\u9009\u62E9\u4E00\u4E2A\u73AF\u5883\u8FDB\u884C\u7F16\u8F91"),a())}function bo(i,t){if(i&1){let e=w();l(0,"div",8)(1,"div",12)(2,"div",13),m(3,"\u540D\u79F0"),a(),l(4,"input",14),C("ngModelChange",function(o){u(e);let r=c();return _(r.setName(o))}),a()(),l(5,"div",12)(6,"div",13),m(7,"\u524D\u7F6EURL"),a(),l(8,"input",14),C("ngModelChange",function(o){u(e);let r=c();return _(r.setBaseUrl(o))}),a()(),l(9,"div",15)(10,"app-kv-table",16),C("rowsChange",function(o){u(e);let r=c();return _(r.varsRows.set(o))}),a()(),l(11,"div",17)(12,"button",3),C("click",function(){u(e);let o=c();return _(o.save())}),m(13,"\u4FDD\u5B58"),a(),l(14,"button",18),C("nzOnConfirm",function(){u(e);let o=c();return _(o.remove())}),m(15," \u5220\u9664 "),a(),l(16,"button",19),C("click",function(){u(e);let o=c();return _(o.useThisEnv())}),m(17,"\u8BBE\u4E3A\u5F53\u524D"),a()()()}if(i&2){let e=c();s(4),d("ngModel",e.draft().name),s(4),d("ngModel",e.draft().baseUrl),s(2),d("rows",e.varsRows())}}function Vn(){return Date.now()}function zo(i){let t=Math.random().toString(16).slice(2,10);return`${i}_${t}_${Date.now().toString(16)}`}var gt=class i{envChange=new y;store=q(be);modalRef=q(Xe);msg=q(Se);draft=A(null);varsRows=A([]);selectEditEnv(t){this.store.activeEnvId.set(t);let e=this.store.envs().find(n=>n.id===t);e&&(this.draft.set(M(x({},e),{variables:e.variables})),this.varsRows.set(Vt(e.variables)))}createEnv(){let t=Vn(),e={id:zo("env"),scope:"project",name:"\u672A\u547D\u540D\u73AF\u5883",variables:[],createdAt:t,updatedAt:t};this.draft.set(e),this.varsRows.set(Vt(e.variables))}setName(t){let e=this.draft();e&&this.draft.set(M(x({},e),{name:t}))}setBaseUrl(t){let e=this.draft();e&&this.draft.set(M(x({},e),{baseUrl:t}))}async save(){let t=this.draft();if(!t)return;let e=M(x({},t),{variables:Sn(this.varsRows(),t.variables),updatedAt:Vn()});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=E({type:i,selectors:[["app-env-modal",8,"component"]],outputs:{envChange:"envChange"},attrs:ho,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()}),m(4,"\u65B0\u5EFA"),a()(),l(5,"div",4),S(6,yo,5,4,"div",5,vo),g(8,xo,2,0,"div",6),a()(),l(9,"div",7),g(10,wo,2,0,"div",6)(11,bo,18,3,"div",8),a()()),e&2){let o;s(6),R(n.store.envs()),s(2),f(n.store.envs().length?-1:8),s(2),f((o=n.draft())!=null&&o.id?11:10)}},dependencies:[N,P,$,B,K,we,I,V,D,X,O,H,Re,tt],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 Mo=(i,t)=>t.id;function To(i,t){if(i&1&&h(0,"nz-option",2),i&2){let e=t.$implicit;d("nzValue",e.id)("nzLabel",e.name)}}var ft=class i{store=q(be);modalService=q(et);openEnvModal(){let t=this.modalService.create({nzTitle:"\u73AF\u5883\u53D8\u91CF",nzFooter:null,nzMaskClosable:!1,nzContent:gt,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=E({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,To,1,2,"nz-option",2,Mo),a(),l(4,"button",3),C("click",function(){return n.openEnvModal()}),h(5,"nz-icon",4),a()()),e&2&&(s(),d("nzPlaceHolder","Env")("ngModel",n.store.activeEnvId())("nzAllowClear",!0),s(),R(n.store.envs()))},dependencies:[N,P,B,K,te,fe,he,I,V,D,Je,O,qe,ke,U,J,Re],styles:[".picker[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.sel[_ngcontent-%COMP%]{width:160px}"]})};var ht=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(M(x({},this.options??{}),{timeoutMs:isNaN(e)?void 0:e}))}setFollowRedirects(t){this.emit(M(x({},this.options??{}),{followRedirects:t}))}setInsecureTLS(t){this.emit(M(x({},this.options??{}),{insecureTLS:t}))}setProxy(t){this.emit(M(x({},this.options??{}),{proxy:t||void 0}))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({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),m(4,"Timeout (ms)"),a(),l(5,"input",4),C("ngModelChange",function(r){return n.setTimeout(r)}),a(),l(6,"div",5),m(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)}),m(10," Follow Redirects "),a(),l(11,"div",5),m(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)}),m(15," Insecure TLS "),a(),l(16,"div",5),m(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),m(20,"Proxy"),a(),l(21,"input",8),C("ngModelChange",function(r){return n.setProxy(r)}),a(),l(22,"div",9),m(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),d("ngModel",n.timeoutMs()),s(4),d("ngModel",n.followRedirects()),s(5),d("ngModel",n.insecureTLS()),s(7),d("ngModel",n.proxy()))},dependencies:[N,P,$,sn,B,cn,K,it,nt,O,H,Ve,Me],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 Ft=()=>[];function Ao(i,t){if(i&1){let e=w();l(0,"div",3)(1,"div",4),m(2,"Path \u53C2\u6570"),a(),l(3,"app-kv-table",14),C("rowsChange",function(o){u(e);let r=c();return _(r.patch.emit({pathParams:o}))}),a()()}if(i&2){let e=c();s(3),d("keepTrailingBlank",!1)("rows",(e.req==null?null:e.req.pathParams)||He(2,Ft))}}var vt=class i{req=null;patch=new y;static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({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),m(5,"Query \u53C2\u6570"),a(),l(6,"app-kv-table",5),C("rowsChange",function(r){return n.patch.emit({query:r})}),a()(),g(7,Ao,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),d("rows",(n.req==null?null:n.req.query)||He(6,Ft)),s(),f(!(n.req==null||n.req.pathParams==null)&&n.req.pathParams.length?7:-1),s(3),d("rows",(n.req==null?null:n.req.headers)||He(7,Ft)),s(3),d("body",n.req==null?null:n.req.body),s(3),d("auth",n.req==null?null:n.req.auth),s(3),d("options",n.req==null?null:n.req.options))},dependencies:[at,lt,rt,we,ut,mt,ht],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 No(i,t){if(i&1&&h(0,"nz-option",2),i&2){let e=t.$implicit;d("nzValue",e)("nzLabel",e)}}function ko(i,t){if(i&1){let e=w();l(0,"div",7)(1,"nz-tag",8),m(2),a(),l(3,"a",9),C("click",function(){u(e);let o=c();return _(o.openEnv())}),m(4,"\u53BB\u914D\u7F6E"),a()()}if(i&2){let e=c();s(2),le(" \u672A\u89E3\u6790\u53D8\u91CF\uFF1A",e.missingVars().join(", ")," ")}}var yt=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(()=>qn([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||qo(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=E({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:[ee],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,No,1,2,"nz-option",2,ue),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()}),m(7,"\u53D1\u9001"),a(),l(8,"button",6),C("click",function(){return n.save.emit()}),m(9,"\u4FDD\u5B58"),a()(),g(10,ko,5,1,"div",7)),e&2&&(s(),d("ngModel",n.method),s(),R(n.methods),s(2),d("nzAddonBefore",n.baseUrl?n.baseUrl+" ":void 0),s(),d("placeholder",n.placeholder())("ngModel",n.draftUrl),s(),d("nzLoading",n.sending),s(4),f(n.missingVars().length?10:-1))},dependencies:[N,P,$,B,K,I,V,D,X,O,H,ge,te,fe,he,ye,ve],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 qo(i){return/^https?:\/\//i.test(i)}function Io(i,t){if(i&1){let e=w();l(0,"app-request-urlbar",0),C("methodChange",function(o){u(e);let r=c();return _(r.patch.emit({method:o}))})("urlChange",function(o){u(e);let r=c();return _(r.onUrlChange(o))})("urlCommit",function(o){u(e);let r=c();return _(r.onUrlCommit(o))})("send",function(){u(e);let o=c();return _(o.send.emit())})("save",function(){u(e);let o=c();return _(o.save.emit())}),a(),l(1,"div",1)(2,"nz-input-wrapper",2)(3,"input",3),C("ngModelChange",function(o){u(e);let r=c();return _(r.patch.emit({name:o}))}),a()()(),l(4,"app-request-tabs",4),C("patch",function(o){u(e);let r=c();return _(r.patch.emit(o))}),a()}if(i&2){let e=c();d("method",e.request.method)("baseUrl",e.baseUrl)("envVars",e.envVars)("openEnv",e.openEnv)("url",e.request.url)("sending",e.sending),s(2),d("nzAddonBefore",e.collectionPath||"\u672A\u5206\u7C7B"),s(),d("ngModel",e.request.name),s(),d("req",e.request)}}var xt=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=Dt(t,e.pathParams),o=Oe(e.url??""),r=Oe(t??"");(o.length!==r.length||o.some((b,T)=>b!==r[T]))&&this.patch.emit({pathParams:n})}onUrlChange(t){let e=this.request;if(!e){this.patch.emit({url:t});return}let n=Dt(t,e.pathParams),o=Oe(e.url??""),r=Oe(t??"");o.length!==r.length||o.some((b,T)=>b!==r[T])?this.patch.emit({url:t,pathParams:n}):this.patch.emit({url:t})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({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,Io,5,9),e&2&&f(n.request?0:-1)},dependencies:[N,P,$,B,K,I,O,H,ge,te,De,vt,yt],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 wt=class i{clipboard=q(xn);curl=null;copy(t){this.clipboard.copy(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({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=w();l(0,"div",1)(1,"nz-space")(2,"button",2),h(3,"nz-icon",3),m(4," cURL "),a()(),l(5,"nz-dropdown-menu",null,0)(7,"ul",4)(8,"li",5)(9,"button",6),C("click",function(){return u(o),_(n.copy(n.curl.bash))}),m(10," cURL (Bash) "),a()(),l(11,"li",5)(12,"button",6),C("click",function(){return u(o),_(n.copy(n.curl.powershell))}),m(13," cURL (PS) "),a()(),l(14,"li",5)(15,"button",6),C("click",function(){return u(o),_(n.copy(n.curl.cmd))}),m(16," cURL (CMD) "),a()()()()()}if(e&2){let o=Q(6);s(2),d("disabled",!n.curl)("nzDropdownMenu",o),s(7),d("disabled",!(n.curl!=null&&n.curl.bash)),s(3),d("disabled",!(n.curl!=null&&n.curl.powershell)),s(3),d("disabled",!(n.curl!=null&&n.curl.cmd))}},dependencies:[N,wn,on,nn,I,V,D,X,U,J,gn,Pe,Ie,un,Cn,_n],encapsulation:2})};function Po(i,t){if(i&1&&(l(0,"nz-tag",11),m(1),a(),l(2,"span",4),m(3),a()),i&2){let e,n,o=c();d("nzColor",o.statusColor()),s(),Wt(" ",(e=o.response())==null?null:e.status," ",((e=o.response())==null?null:e.statusText)||""," "),s(2),le("",(n=o.response())==null?null:n.bodySize," bytes")}}function So(i,t){i&1&&(l(0,"span",4),m(1,"-"),a())}function Ro(i,t){i&1&&(l(0,"div",7),h(1,"nz-spin"),a())}function Do(i,t){if(i&1&&h(0,"nz-alert",8),i&2){let e=c();d("nzMessage",e.error())}}function Vo(i,t){i&1&&(l(0,"div",9),m(1,"\u53D1\u9001\u8BF7\u6C42\u540E\u5728\u6B64\u67E5\u770B\u54CD\u5E94"),a())}function Oo(i,t){if(i&1&&(l(0,"pre",15),m(1),a()),i&2){let e=c(2);s(),k(e.prettyJson())}}function Fo(i,t){if(i&1&&(l(0,"pre",15),m(1),a()),i&2){let e,n=c(2);s(),k((e=n.response())==null?null:e.bodyText)}}function Bo(i,t){if(i&1&&(l(0,"div",18)(1,"div",20),m(2),a(),l(3,"div",21),m(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 Ko(i,t){if(i&1){let e=w();l(0,"nz-tabs",12),ce("nzSelectedIndexChange",function(o){u(e);let r=c();return se(r.tabIndex,o)||(r.tabIndex=o),_(o)}),l(1,"nz-tab",13)(2,"div",14),g(3,Oo,2,1,"pre",15)(4,Fo,2,1,"pre",15),a()(),l(5,"nz-tab",16)(6,"div",14)(7,"div",17),S(8,Bo,5,2,"div",18,ue),a()()(),l(10,"nz-tab",19)(11,"div",14)(12,"pre",15),m(13),a()()()()}if(i&2){let e=c();ae("nzSelectedIndex",e.tabIndex),s(3),f(e.isJson()?3:4),s(5),R(e.headerKeys()),s(5),k(e.rawDump())}}var bt=class i{sending=!1;result=null;resultSig=A(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=E({type:i,selectors:[["app-response-viewer"]],inputs:{sending:"sending",result:"result"},features:[ee],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),m(4,"Response"),a(),g(5,Po,4,4)(6,So,2,0,"span",4),a(),l(7,"div",5),h(8,"app-curl-actions",6),a()(),g(9,Ro,2,0,"div",7)(10,Do,1,1,"nz-alert",8)(11,Vo,2,0,"div",9)(12,Ko,14,3,"nz-tabs",10),a()),e&2&&(s(5),f(n.response()?5:6),s(3),d("curl",n.curl()),s(),f(n.sending?9:n.error()?10:n.response()?12:11))},dependencies:[N,at,lt,rt,ye,ve,De,ot,Ve,Me,wt],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 jo=["envPicker"],Lo=["class","component"];function Uo(i,t){if(i&1){let e=w();l(0,"app-request-editor",8),C("patch",function(o){u(e);let r=c();return _(r.store.patchActive(o))})("save",function(){u(e);let o=c();return _(o.store.saveActive())})("send",function(){u(e);let o=c();return _(o.store.sendActive())}),a(),h(1,"app-response-viewer",9)}if(i&2){let e,n=c();d("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(),d("sending",n.store.sending())("result",n.store.lastResult())}}function $o(i,t){if(i&1){let e=w();l(0,"app-api-history-drawer",10),C("close",function(){u(e);let o=c();return _(o.store.closeHistory())})("replay",function(o){u(e);let r=c();return _(r.store.replayHistory(o))}),a()}if(i&2){let e=c();d("loading",e.store.historyLoading())("histories",e.store.histories())}}var zt=class i{store=q(be);envPicker;openEnv=()=>{this.envPicker.openEnvModal()};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-api-client",8,"component"]],viewQuery:function(e,n){if(e&1&&Lt(jo,5),e&2){let o;Ut(o=$t())&&(n.envPicker=o.first)}},attrs:Lo,decls:10,vars:10,consts:[[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,"loading","histories"],[3,"patch","save","send","collectionPath","baseUrl","request","sending","envVars","openEnv"],[3,"sending","result"],[3,"close","replay","loading","histories"]],template:function(e,n){e&1&&(l(0,"app-page-layout",0),oe(1,1),h(2,"app-env-picker"),l(3,"button",2),C("click",function(){return n.store.openHistory()}),h(4,"nz-icon",3),a(),re(),l(5,"nz-layout",4)(6,"app-request-collections",5),ce("qChange",function(r){return se(n.store.q,r)||(n.store.q=r),r}),C("select",function(r){return n.store.selectRequest(r)})("createRequest",function(r){return n.store.newRequest({collectionId:r.collectionId})})("createCollection",function(){return n.store.newCollection({kind:"collection"})})("createFolder",function(r){return n.store.newCollection({kind:"folder",parentId:r.collectionId})})("reload",function(){return n.store.loadAll()})("delete",function(r){return n.store.deleteCollection(r.id,r.kind)})("rename",function(r){return n.store.renameCollection(r.id,r.kind)})("move",function(r){return n.store.moveCollection(r.id,r.kind)}),a(),l(7,"div",6),g(8,Uo,2,8),a()()(),g(9,$o,1,2,"app-api-history-drawer",7)),e&2&&(d("title","API \u8BF7\u6C42")("loading",n.store.loading())("isFullscreen",!0)("isOverflowYAuto",!1),s(6),d("nodes",n.store.filteredNodes()),ae("q",n.store.q),d("activeId",n.store.activeRequestId())("loading",n.store.loading()),s(2),f(n.store.activeRequest()?8:-1),s(),f(n.store.historyOpen()?9:-1))},dependencies:[N,pn,I,V,D,U,J,yn,vn,qe,ke,dt,xt,bt,st,ft],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}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 Ho=[{path:"",component:zt}],Mt=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Ne({type:i});static \u0275inj=Ae({imports:[qt.forChild(Ho),qt]})};var On=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Ne({type:i});static \u0275inj=Ae({imports:[N,Mt]})};export{On as ApiClientModule};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{a as Mn,b as bn,c as xn,d as wn,e as Sn,f as V}from"./chunk-DV7BEQJD.js";import{a as nn,b as on,c as rn}from"./chunk-EC33AXSR.js";import{a as Pn,b as Nn,c as Tn}from"./chunk-3N7T4ZJF.js";import"./chunk-HZ73CM45.js";import{a as vn,b as be,c as yn,d as zn}from"./chunk-A2SBXP7A.js";import{b as Me}from"./chunk-SNCDDYQR.js";import{A as hn,B as ze,C as Cn,D as _n,I as ee,a as Yt,b as qt,l as Z,m as mn,n as Q,o as dn,p as un,q as R,r as J,s as ve,t as ye,u as K,y as fn,z as gn}from"./chunk-FPDGZ3ZC.js";import{A as Zt,Ab as sn,Bb as cn,Cb as pn,Fb as Ce,Hb as _e,L as Qt,M as S,N as b,O as Jt,P as Kt,T as en,U as tn,V as k,W as ue,Y as B,Z as A,a as Gt,jb as an,lb as fe,pb as ge,vb as he,x as Xt,yb as ln,z as Ue}from"./chunk-PTMJ422K.js";import"./chunk-HFZLJHYR.js";import{A as $t,B as F,d as pe,g as Lt,h as Ft,i as L,j as kt,l as Bt,m as At,r as Rt,s as Vt,u as Wt,v as me,w as Ht,x as Ut,y as G,z as de}from"./chunk-53YRDYLS.js";import{$b as E,$c as He,Aa as re,Ba as lt,Bc as xt,Ca as st,Cc as wt,Dc as N,Eb as _,Fa as ct,Fb as vt,Fc as I,Ha as M,Ia as pt,Ic as m,Jc as T,Kb as P,Kc as j,M as q,Mc as St,Nc as Pt,Oc as Nt,Pb as yt,Ra as mt,Tb as zt,Ub as Mt,Uc as Tt,Vb as v,Vc as ce,Wc as Ve,Xa as dt,Xb as y,Zb as bt,Zc as ne,_b as O,_c as We,ac as d,ad as X,bc as r,ca as et,cc as l,cd as Dt,dc as p,fd as D,gd as oe,hc as U,ic as $,ja as tt,jc as Re,kb as ut,kc as z,la as nt,ma as w,mb as s,md as Ot,na as ot,pa as it,pd as Et,qa as ie,qb as ft,qc as C,ra as f,rd as It,sa as rt,sb as gt,ta as at,tc as c,uc as le,vc as se,vd as jt,wb as ht,xa as g,xb as Ct,ya as h,yb as ae,z as Ke,zb as _t}from"./chunk-SJG2JCPL.js";function qn(t){let n=t;return 5}var Dn=["zh",[["\u4E0A\u5348","\u4E0B\u5348"]],void 0,[["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]],void 0,[["\u516C\u5143\u524D","\u516C\u5143"]],0,[6,0],["y/M/d","y\u5E74M\u6708d\u65E5",void 0,"y\u5E74M\u6708d\u65E5EEEE"],["HH:mm","HH:mm:ss","z HH:mm:ss","zzzz HH:mm:ss"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"CNY","\xA5","\u4EBA\u6C11\u5E01",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CNY:["\xA5"],ILR:["ILS"],JPY:["JP\xA5","\xA5"],KRW:["\uFFE6","\u20A9"],PHP:[void 0,"\u20B1"],RUR:[void 0,"\u0440."],TWD:["NT$"],USD:["US$","$"],XXX:[]},"ltr",qn];var Xn="@",Zn=(()=>{class t{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=f(re);loadingSchedulerFn=f(Qn,{optional:!0});_engine;constructor(e,o,i,a,u){this.doc=e,this.delegate=o,this.zone=i,this.animationType=a,this.moduleImpl=u}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-HEKO7RQP.js").then(i=>i),o;return this.loadingSchedulerFn?o=this.loadingSchedulerFn(e):o=e(),o.catch(i=>{throw new tt(5300,!1)}).then(({\u0275createEngine:i,\u0275AnimationRendererFactory:a})=>{this._engine=i(this.animationType,this.doc);let u=new a(this.delegate,this._engine,this.zone);return this.delegate=u,u})}createRenderer(e,o){let i=this.delegate.createRenderer(e,o);if(i.\u0275type===0)return i;typeof i.throwOnSyntheticProps=="boolean"&&(i.throwOnSyntheticProps=!1);let a=new $e(i);return o?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(u=>{let H=u.createRenderer(e,o);a.use(H),this.scheduler??=this.injector.get(pt,null,{optional:!0}),this.scheduler?.notify(10)}).catch(u=>{a.use(i)}),a}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(o){_t()};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),$e=class{delegate;replay=[];\u0275type=1;constructor(n){this.delegate=n}use(n){if(this.delegate=n,this.replay!==null){for(let e of this.replay)e(n);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}get destroyNode(){return this.delegate.destroyNode}appendChild(n,e){this.delegate.appendChild(n,e)}insertBefore(n,e,o,i){this.delegate.insertBefore(n,e,o,i)}removeChild(n,e,o,i){this.delegate.removeChild(n,e,o,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,o,i){this.delegate.setAttribute(n,e,o,i)}removeAttribute(n,e,o){this.delegate.removeAttribute(n,e,o)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,o,i){this.delegate.setStyle(n,e,o,i)}removeStyle(n,e,o){this.delegate.removeStyle(n,e,o)}setProperty(n,e,o){this.shouldReplay(e)&&this.replay.push(i=>i.setProperty(n,e,o)),this.delegate.setProperty(n,e,o)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,o,i){return this.shouldReplay(e)&&this.replay.push(a=>a.listen(n,e,o,i)),this.delegate.listen(n,e,o,i)}shouldReplay(n){return this.replay!==null&&n.startsWith(Xn)}},Qn=new it("");function On(t="animations"){return ft("NgAsyncAnimations"),rt([{provide:ht,useFactory:(n,e,o)=>new Zn(n,e,o,t),deps:[lt,Bt,gt]},{provide:dt,useValue:t==="noop"?"NoopAnimations":"BrowserAnimations"}])}var xe=class t{currentTheme="default";constructor(){}reverseTheme(n){return n==="dark"?"default":"dark"}removeUnusedTheme(n){document.documentElement.classList.remove(n);let e=document.getElementById(n);e&&document.head.removeChild(e)}loadCss(n,e){return new Promise((o,i)=>{let a=document.createElement("link");a.rel="stylesheet",a.href=n,a.id=e,a.onload=o,a.onerror=i,document.head.append(a)})}loadTheme(n=!0){let e=this.currentTheme;return n&&document.documentElement.classList.add(e),new Promise((o,i)=>{this.loadCss(`${e}.css`,e).then(a=>{n||document.documentElement.classList.add(e),this.removeUnusedTheme(this.reverseTheme(e)),o(a)},a=>i(a))})}toggleTheme(){return this.currentTheme=this.reverseTheme(this.currentTheme),this.loadTheme(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})};var En={provide:yt,useFactory:t=>()=>t.loadTheme(),deps:[xe],multi:!0};var In=[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-FL6BUQ4M.js").then(t=>t.DashboardModule)},{path:"tasks",loadChildren:()=>import("./chunk-EAYGWAZB.js").then(t=>t.TasksModule)},{path:"projects",loadChildren:()=>import("./chunk-KKLLU6U7.js").then(t=>t.ProjectsModule)},{path:"settings",loadChildren:()=>import("./chunk-V27A2EK4.js").then(t=>t.SettingModule)},{path:"configuration",loadChildren:()=>import("./chunk-UWKUE7CZ.js").then(t=>t.ConfigurationModule)},{path:"dependencies",loadChildren:()=>import("./chunk-V6LX42JA.js").then(t=>t.DependenciesModule)},{path:"rquest",loadChildren:()=>import("./chunk-U7FBNFSB.js").then(t=>t.ApiClientModule)},{path:"about",loadChildren:()=>import("./chunk-CPA2B3DD.js").then(t=>t.AboutRoutingModule)},{path:"**",redirectTo:"dashboard"}];kt(Dn);var jn={providers:[En,ct(),Dt(),$t(In),qt(Yt),On(),at(ze),Rt(Vt([Tn]))]};var Ge=["*"];function Jn(t,n){}function Kn(t,n){if(t&1&&(r(0,"span",1),P(1,Jn,0,0,"ng-template",2),p(2,"nz-icon",3),l()),t&2){let e=c(),o=N(4);d("nzDropdownMenu",e.nzOverlay),s(),d("ngTemplateOutlet",o)}}function eo(t,n){}function to(t,n){if(t&1&&P(0,eo,0,0,"ng-template",2),t&2){c();let e=N(4);d("ngTemplateOutlet",e)}}function no(t,n){if(t&1&&(U(0),m(1),$()),t&2){let e=c(2);s(),j(" ",e.nzBreadCrumbComponent.nzSeparator," ")}}function oo(t,n){if(t&1&&(r(0,"nz-breadcrumb-separator"),P(1,no,2,1,"ng-container",4),l()),t&2){let e=c();s(),d("nzStringTemplateOutlet",e.nzBreadCrumbComponent.nzSeparator)}}function io(t,n){t&1&&(r(0,"span",5),se(1),l())}var ro=(t,n)=>n.url;function ao(t,n){if(t&1){let e=z();r(0,"nz-breadcrumb-item")(1,"a",0),C("click",function(i){let a=g(e).$implicit,u=c(2);return h(u.navigate(a.url,i))}),m(2),l()()}if(t&2){let e=n.$implicit;s(),zt("href",e.url,ut),s(),T(e.label)}}function lo(t,n){if(t&1&&O(0,ao,3,2,"nz-breadcrumb-item",null,ro),t&2){let e=c();E(e.breadcrumbs)}}var we=class{},so=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275cmp=_({type:t,selectors:[["nz-breadcrumb-separator"]],hostAttrs:[1,"ant-breadcrumb-separator"],exportAs:["nzBreadcrumbSeparator"],ngContentSelectors:Ge,decls:1,vars:0,template:function(o,i){o&1&&(le(),se(0))},encapsulation:2})}return t})(),Fn=(()=>{class t{nzBreadCrumbComponent=f(we);nzOverlay;static \u0275fac=function(o){return new(o||t)};static \u0275cmp=_({type:t,selectors:[["nz-breadcrumb-item"]],inputs:{nzOverlay:"nzOverlay"},exportAs:["nzBreadcrumbItem"],ngContentSelectors:Ge,decls:5,vars:2,consts:[["noMenuTpl",""],["nz-dropdown","",1,"ant-breadcrumb-overlay-link",3,"nzDropdownMenu"],[3,"ngTemplateOutlet"],["nzType","down"],[4,"nzStringTemplateOutlet"],[1,"ant-breadcrumb-link"]],template:function(o,i){o&1&&(le(),v(0,Kn,3,2,"span",1)(1,to,1,1,null,2),v(2,oo,2,1,"nz-breadcrumb-separator"),P(3,io,2,0,"ng-template",null,0,X)),o&2&&(y(i.nzOverlay?0:1),s(2),y(i.nzBreadCrumbComponent.nzSeparator?2:-1))},dependencies:[pe,so,K,J,b,S,Kt,Jt],encapsulation:2,changeDetection:0})}return t})(),co=(()=>{class t{injector=f(re);cdr=f(It);elementRef=f(mt);renderer=f(Ct);directionality=f(Xt);destroyRef=f(st);nzAutoGenerate=!1;nzSeparator="/";nzRouteLabel="breadcrumb";nzRouteLabelFn=e=>e;nzRouteFn=e=>e;breadcrumbs=[];dir="ltr";ngOnInit(){this.nzAutoGenerate&&this.registerRouterChange(),this.directionality.change?.pipe(Ue(this.destroyRef)).subscribe(e=>{this.dir=e,this.prepareComponentForRtl(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.prepareComponentForRtl()}navigate(e,o){o.preventDefault(),this.injector.get(G).navigateByUrl(e)}registerRouterChange(){try{let e=this.injector.get(G),o=this.injector.get(Ht);e.events.pipe(q(i=>i instanceof me),Ue(this.destroyRef),et(!0)).subscribe(()=>{this.breadcrumbs=this.getBreadcrumbs(o.root),this.cdr.markForCheck()})}catch{throw new Error(`${Gt} You should import RouterModule if you want to use 'NzAutoGenerate'.`)}}getBreadcrumbs(e,o="",i=[]){let a=e.children;if(a.length===0)return i;for(let u of a)if(u.outlet===Wt){let H=u.snapshot.url.map(te=>te.path).filter(te=>te).join("/"),Qe=H?`${o}/${H}`:o,Je=this.nzRouteLabelFn(u.snapshot.data[this.nzRouteLabel]),Yn=this.nzRouteFn(Qe);if(H&&Je){let te={label:Je,params:u.snapshot.params,url:Yn};i.push(te)}return this.getBreadcrumbs(u,Qe,i)}return i}prepareComponentForRtl(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl")}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=_({type:t,selectors:[["nz-breadcrumb"]],hostAttrs:[1,"ant-breadcrumb"],inputs:{nzAutoGenerate:[2,"nzAutoGenerate","nzAutoGenerate",jt],nzSeparator:"nzSeparator",nzRouteLabel:"nzRouteLabel",nzRouteLabelFn:"nzRouteLabelFn",nzRouteFn:"nzRouteFn"},exportAs:["nzBreadcrumb"],features:[Tt([{provide:we,useExisting:nt(()=>t)}])],ngContentSelectors:Ge,decls:2,vars:1,consts:[[3,"click"]],template:function(o,i){o&1&&(le(),se(0),v(1,lo,2,0)),o&2&&(s(),y(i.nzAutoGenerate&&i.breadcrumbs.length?1:-1))},dependencies:[Fn],encapsulation:2,changeDetection:0})}return t})(),kn=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=vt({type:t});static \u0275inj=ot({imports:[co,Fn]})}return t})();function po(t){return t.op==="syslog.tail"}function mo(t){return t.op==="syslog.append"}function Ye(t,n){return n?!(n.scope!==void 0&&t?.scope!==n.scope||n.level!==void 0&&t?.level!==n.level||n.source!==void 0&&t?.source!==n.source||n.refId!==void 0&&t?.refId!==n.refId):!0}var Se=class t{constructor(n){this.ws=n;this.msgSub=this.ws.messages().pipe(q(e=>po(e)||mo(e))).subscribe(e=>this.onWsMessage(e)),this.wsStateSub=this.ws.stateChanges().subscribe(e=>{let o=this.lastWsState==="open",i=e==="open";!o&&i&&(this.subSentForCurrentConnection=!1,this.sendSubIfNeeded()),o&&!i&&(this.subSentForCurrentConnection=!1),this.lastWsState=e})}msgSub;wsStateSub;enabled=M(!1);filter=M({});logs=M([]);unread=M(0);drawerOpen=M(!1);capacity=2e3;tail=300;subSentForCurrentConnection=!1;lastWsState="idle";setDrawerOpen(n){this.drawerOpen.set(n),n&&this.unread.set(0)}setFilter(n){this.filter.set(n??{});let e=this.logs();if(!e.length)return;let o=e.filter(i=>Ye(i,this.filter()));this.logs.set(o.slice(-this.capacity))}enable(n=300){let e=Math.max(0,Math.min(5e3,n|0));if(this.tail=e,this.enabled()){this.ws.isOpen()&&(this.subSentForCurrentConnection=!1,this.sendSubIfNeeded());return}this.enabled.set(!0),this.ws.connect(),this.sendSubIfNeeded()}disable(){this.enabled.set(!1),this.subSentForCurrentConnection=!1}markRead(){this.unread.set(0)}clear(){this.logs.set([]),this.unread.set(0)}sendSubIfNeeded(){this.enabled()&&this.ws.isOpen()&&(this.subSentForCurrentConnection||(this.ws.send({op:"sub",topic:"syslog",tail:this.tail}),this.subSentForCurrentConnection=!0))}onWsMessage(n){let e=this.filter();if(n.op==="syslog.tail"){let u=(n.entries??[]).filter(H=>Ye(H,e));this.logs.set(u.slice(-this.capacity));return}let o=n.entry;if(!Ye(o,e))return;let i=this.logs(),a=i.length>=this.capacity?i.slice(1):i.slice();a.push(o),this.logs.set(a),this.drawerOpen()||this.unread.set(this.unread()+1)}static \u0275fac=function(e){return new(e||t)(ie(Me))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})};var fo=["logBox"],go=()=>({padding:"0px",overflow:"hidden"});function ho(t,n){if(t&1&&(r(0,"nz-tag",12),m(1),ne(2,"uppercase"),l(),r(3,"div",13),m(4),l(),r(5,"div",14),m(6),ne(7,"date"),l()),t&2){let e,o,i,a,u=c();d("nzColor",u.getColor((e=u.lastLine())==null?null:e.level)),s(),j(" ",We(2,4,(o=u.lastLine())==null?null:o.level)," "),s(3),T((i=u.lastLine())==null?null:i.text),s(2),T(He(7,6,(a=u.lastLine())==null?null:a.ts,"yyyy-MM-dd HH:mm:ss"))}}function Co(t,n){t&1&&(r(0,"nz-tag",15),m(1,"INFO"),l(),r(2,"div",13),m(3,"\u6682\u65E0\u65E5\u5FD7"),l(),r(4,"div",14),m(5,"--"),l())}function _o(t,n){if(t&1&&m(0),t&2){let e=c().$implicit;j(" ",e.data==null?null:e.data.icon," ")}}function vo(t,n){if(t&1&&(r(0,"div",18)(1,"nz-tag",12),m(2),ne(3,"uppercase"),l(),r(4,"span",14),m(5),ne(6,"date"),l(),r(7,"span",19),v(8,_o,1,1),m(9),l()()),t&2){let e=n.$implicit,o=c(2);I("err",e.level==="error")("warn",e.level==="warn")("info",e.level==="info")("debug",e.level==="debug")("success",e.level==="success"),s(),d("nzColor",o.getColor(e.level)),s(),j(" ",We(3,15,e.level)," "),s(3),T(He(6,17,e.ts,"yyyy-MM-dd HH:mm:ss")),s(3),y(e.data!=null&&e.data.icon?8:-1),s(),j(" ",e.text," ")}}function yo(t,n){if(t&1&&(U(0),r(1,"div",16,1),O(3,vo,10,20,"div",17,Mt().trackByLine,!0),l(),$()),t&2){let e=c();s(3),E(e.lines())}}function zo(t,n){if(t&1){let e=z();r(0,"nz-space",20)(1,"button",21),C("click",function(){g(e);let i=c();return h(i.clearLog())}),p(2,"nz-icon",22),l(),r(3,"button",23),C("click",function(){g(e);let i=c();return h(i.toBottom())}),p(4,"nz-icon",24),l()()}}var Pe=class t{sysLogStream=f(Se);projectState=f(ee);logBox=Ot("logBox");autoFollow=M(!0);isOpen=M(!1);curProjectPath=D(()=>this.projectState.currentProject()?.root||"");lines=D(()=>this.sysLogStream.logs());lastLine=D(()=>{let n=this.sysLogStream.logs();return n.length?n[n.length-1]:null});unread=D(()=>this.sysLogStream.unread());constructor(){oe(()=>{this.sysLogStream.setDrawerOpen(this.isOpen()),this.isOpen()&&queueMicrotask(()=>this.toBottom())}),oe(()=>{this.lines(),this.isOpen()&&this.autoFollow()&&queueMicrotask(()=>this.toBottom())})}ngOnInit(){this.sysLogStream.enable(300)}openLog(){this.isOpen.set(!0)}closeLog(){this.isOpen.set(!1)}clearLog(){this.sysLogStream.clear()}toBottom(){let n=this.logBox()?.nativeElement;n&&(n.scrollTop=n.scrollHeight)}trackByLine=(n,e)=>`${e.ts}-${e.refId??""}-${e.text}`;getColor(n){if(!n)return"#000000";switch(n){case"success":return"#22c55e";case"info":return"#18bdfd";case"debug":return"#94a3b8";case"error":return"#ef4444";case"warn":return"#f59e0b";default:return"#000000"}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["app-system-log"]],viewQuery:function(e,o){e&1&&xt(o.logBox,fo,5),e&2&&wt()},decls:16,vars:9,consts:[["extra",""],["logBox",""],[1,"status-bar"],[1,"project-path"],[1,"home"],["nzType","home","nzTheme","outline",1,"icon"],[1,"pos-path"],["nzType","folder","nzTheme","outline",1,"icon"],["nz-tooltip","\u6253\u5F00\u65E5\u5FD7",1,"last-log",3,"click"],["nzType","profile","nzTheme","outline",1,"icon"],["nzTitle","\u65E5\u5FD7","nzPlacement","bottom",3,"nzOnClose","nzVisible","nzMaskClosable","nzMask","nzExtra","nzHeight","nzBodyStyle"],[4,"nzDrawerContent"],[1,"level-tag",3,"nzColor"],[1,"info"],[1,"time"],["nzColor","default"],[1,"log"],[1,"line",3,"err","warn","info","debug","success"],[1,"line"],[1,"msg"],["nzAlign","center"],["nz-button","","nzType","text","nz-tooltip","\u6E05\u7A7A\u65E5\u5FD7",3,"click"],["nzType","clear","nzTheme","outline"],["nz-button","","nzType","text","nz-tooltip","\u6EDA\u52A8\u5230\u5E95\u90E8",3,"click"],["nzType","vertical-align-bottom","nzTheme","outline"]],template:function(e,o){if(e&1){let i=z();r(0,"div",2)(1,"div",3)(2,"div",4),p(3,"nz-icon",5),l(),r(4,"div",6),p(5,"nz-icon",7),r(6,"span"),m(7),l()()(),r(8,"div",8),C("click",function(){return g(i),h(o.openLog())}),p(9,"nz-icon",9),v(10,ho,8,9)(11,Co,6,0),l()(),r(12,"nz-drawer",10),C("nzOnClose",function(){return g(i),h(o.closeLog())}),P(13,yo,5,0,"ng-container",11),l(),P(14,zo,5,0,"ng-template",null,0,X)}if(e&2){let i=N(15);s(7),j(" ",o.curProjectPath()," "),s(3),y(o.lastLine()?10:11),s(2),d("nzVisible",o.isOpen())("nzMaskClosable",!1)("nzMask",!1)("nzExtra",i)("nzHeight",300)("nzBodyStyle",ce(8,go))}},dependencies:[L,Nn,Pn,rn,on,nn,A,B,k,tn,en,b,S,_e,Ce,Lt,Ft],styles:["[_nghost-%COMP%]{display:block;position:relative;z-index:3;flex:0 0 auto}.status-bar[_ngcontent-%COMP%]{height:32px;display:flex;align-items:center;width:100%;-webkit-user-select:none;user-select:none}.status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;padding:0 8px}.status-bar[_ngcontent-%COMP%] .last-log[_ngcontent-%COMP%]{cursor:pointer;flex:1;display:flex;align-items:center;padding:0 12px;gap:8px}.status-bar[_ngcontent-%COMP%] .last-log[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.status-bar[_ngcontent-%COMP%] .last-log[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{flex:0 0 auto;opacity:.75;font-size:14px}.status-bar[_ngcontent-%COMP%] .last-log[_ngcontent-%COMP%]:hover{background:#f5f7fa}.icon[_ngcontent-%COMP%]{margin-right:8px;font-size:16px;display:inline-flex}.log[_ngcontent-%COMP%]{height:100%;overflow:auto;padding:8px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:14px;line-height:18px}.line[_ngcontent-%COMP%]{display:flex;gap:12px;padding:2px 0;align-items:center}.line[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{flex:0 0 auto;opacity:.65;font-variant-numeric:tabular-nums}.line[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.line.err[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{font-weight:600}.line.warn[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{font-weight:500}.level-tag[_ngcontent-%COMP%]{font-size:12px;padding:0 4px;line-height:1.5;display:inline-flex;align-items:center;justify-content:center;min-width:58px;border-radius:4px}"],changeDetection:0})};var Ne=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["ngm-footer"]],decls:2,vars:0,template:function(e,o){e&1&&(r(0,"nz-footer"),p(1,"app-system-log"),l())},dependencies:[V,bn,Pe],styles:["nz-footer[_ngcontent-%COMP%]{padding:0;align-items:center;display:flex}app-system-log[_ngcontent-%COMP%]{width:100%}"]})};var Te=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["ngm-header"]],decls:4,vars:0,consts:[[1,"app-header"],["nzType","disconnect","nzTheme","outline"]],template:function(e,o){e&1&&(r(0,"nz-header",0),p(1,"nz-icon",1),r(2,"span"),m(3,"\u8FDE\u63A5\u5DF2\u65AD\u5F00"),l()())},dependencies:[L,V,xn,b,S],styles:["nz-header.app-header[_ngcontent-%COMP%]{padding:0;width:100%;position:relative;height:48px;line-height:48px;background:var(--header-error-background);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;gap:8px}"],changeDetection:0})};var De=class t{isCollapsed=M(!1);static \u0275fac=function(e){return new(e||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})};var Oe=class t{currentMenu=M(null);router=f(G);menus=[{title:"\u4EEA\u8868\u76D8",path:"/dashboard",icon:"dashboard",level:1},{title:"\u4F9D\u8D56",path:"/dependencies",icon:"codepen",level:1},{title:"\u4EFB\u52A1",path:"/tasks",icon:"schedule",level:1,taskCountBadge:!0},{title:"\u914D\u7F6E",path:"/configuration",icon:"setting",level:1},{title:"API",path:"/rquest",icon:"api",level:1}];constructor(){this.syncByUrl(this.router.url),this.router.events.pipe(q(n=>n instanceof me)).subscribe(n=>this.syncByUrl(n.urlAfterRedirects))}isActive(n){return this.router.isActive(n,{paths:"subset",queryParams:"ignored",fragment:"ignored",matrixParams:"ignored"})}getMenus(){return this.menus}clickMenu(n){n.path&&this.router.navigateByUrl(n.path),this.currentMenu.set(n)}syncByUrl(n){let e=this.normalizeUrl(n),o=this.findBestMatch(this.menus,e);this.currentMenu.set(o)}normalizeUrl(n){return n.split("?")[0].split("#")[0]}findBestMatch(n,e){let o=this.flatten(n).filter(a=>!!a.path),i=null;for(let a of o){let u=a.path;(e===u||e.startsWith(u+"/"))&&(!i||u.length>i.path.length)&&(i=a)}return i}flatten(n){let e=[];for(let o of n)e.push(o),o.children?.length&&e.push(...this.flatten(o.children));return e}static \u0275fac=function(e){return new(e||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ee=class t{api=f(vn);runtimeStore=f(be);async initActiveSnapshot(){let n=await Ke(this.api.active());for(let e of n??[])this.runtimeStore.setRuntime(e)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})};var An=t=>({$implicit:t});function Mo(t,n){t&1&&Re(0)}function bo(t,n){if(t&1&&p(0,"nz-icon",6),t&2){let e=c(2).$implicit;d("nzType",e.icon)}}function xo(t,n){t&1&&p(0,"nz-badge",7)}function wo(t,n){if(t&1){let e=z();r(0,"li",5),C("click",function(){g(e);let i=c().$implicit,a=c(2);return h(a.menuService.clickMenu(i))}),v(1,bo,1,1,"nz-icon",6),r(2,"span"),m(3),l(),v(4,xo,1,0,"nz-badge",7),l()}if(t&2){let e=c().$implicit,o=c(2);d("nzPaddingLeft",e.level*24)("nzDisabled",e.disabled)("nzSelected",o.menuService.isActive(e.path))("nz-tooltip",e.taskCountBadge===!0&&o.runningTaskCount()>0?o.runningTaskCount()+"\u4E2A\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C":null),s(),y(e.icon?1:-1),s(2),T(e.title),s(),y(e.taskCountBadge===!0&&o.runningTaskCount()>0?4:-1)}}function So(t,n){t&1&&Re(0)}function Po(t,n){if(t&1&&(r(0,"li",4)(1,"ul"),P(2,So,1,0,"ng-container",2),l()()),t&2){let e=c().$implicit;c(2);let o=N(3);d("nzPaddingLeft",e.level*24)("nzOpen",e.open)("nzTitle",e.title)("nzIcon",e.icon)("nzDisabled",e.disabled),s(2),d("ngTemplateOutlet",o)("ngTemplateOutletContext",Ve(7,An,e.children))}}function No(t,n){if(t&1&&v(0,wo,5,7,"li",3)(1,Po,3,9,"li",4),t&2){let e=n.$implicit;y(e.children?1:0)}}function To(t,n){if(t&1&&O(0,No,2,1,null,null,bt),t&2){let e=n.$implicit;E(e)}}var Ie=class t{isCollapsed=!1;menus=[];menuService=f(Oe);taskBootstrap=f(Ee);runtimeStore=f(be);runningTaskCount=D(()=>this.runtimeStore.totalRunningCountSignal()());ngOnInit(){this.menus=this.menuService.getMenus(),this.taskBootstrap.initActiveSnapshot()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["ngm-menu"]],inputs:{isCollapsed:"isCollapsed"},decls:4,vars:5,consts:[["menuTpl",""],["nz-menu","","nzMode","inline",3,"nzInlineCollapsed"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-menu-item","","nzTooltipPlacement","right",3,"nzPaddingLeft","nzDisabled","nzSelected","nz-tooltip"],["nz-submenu","",3,"nzPaddingLeft","nzOpen","nzTitle","nzIcon","nzDisabled"],["nz-menu-item","","nzTooltipPlacement","right",3,"click","nzPaddingLeft","nzDisabled","nzSelected","nz-tooltip"],["nzTheme","outline",2,"font-size","18px",3,"nzType"],["nzStatus","processing",2,"margin-left","12px"]],template:function(e,o){if(e&1&&(r(0,"ul",1),P(1,Mo,1,0,"ng-container",2)(2,To,2,0,"ng-template",null,0,X),l()),e&2){let i=N(3);d("nzInlineCollapsed",o.isCollapsed),s(),d("ngTemplateOutlet",i)("ngTemplateOutletContext",Ve(3,An,o.menus))}},dependencies:[pe,R,Q,Z,mn,b,S,F,_e,Ce,zn,yn],encapsulation:2})};function Eo(t,n){if(t&1){let e=z();r(0,"div",3)(1,"label",4),m(2,"\u540D\u79F0"),l(),r(3,"nz-input-wrapper")(4,"input",5),C("ngModelChange",function(i){g(e);let a=c(2);return h(a.projectState.editingProject().name=i)})("keydown.enter",function(){g(e);let i=c(2);return h(i.projectState.confirmEditProject())}),l(),p(5,"nz-icon",6),l(),r(6,"div",7),m(7,"\u8F93\u5165\u65B0\u540D\u79F0\uFF0C\u5C06\u540C\u6B65\u66F4\u65B0\u9879\u76EE\u663E\u793A\u540D\u79F0\uFF08\u4E0D\u4F1A\u91CD\u547D\u540D\u78C1\u76D8\u76EE\u5F55\uFF09\u3002"),l(),r(8,"label",4),m(9,"\u4ED3\u5E93\u7F51\u9875\u5730\u5740"),l(),r(10,"nz-input-wrapper")(11,"input",8),C("ngModelChange",function(i){g(e);let a=c(2);return h(a.projectState.editingProject().repoPageUrl=i)}),l(),p(12,"nz-icon",9),l(),r(13,"label",4),m(14,"\u63CF\u8FF0"),l(),r(15,"nz-input-wrapper")(16,"textarea",10),C("ngModelChange",function(i){g(e);let a=c(2);return h(a.projectState.editingProject().description=i)})("keydown.enter",function(){g(e);let i=c(2);return h(i.projectState.confirmEditProject())}),l()()()}if(t&2){let e=c(2);s(4),d("ngModel",e.editingProject().name),s(7),d("ngModel",e.editingProject().repoPageUrl),s(5),d("ngModel",e.editingProject().description)}}function Io(t,n){if(t&1&&(U(0),v(1,Eo,17,3,"div",3),$()),t&2){let e=c();s(),y(e.editingProject()?1:-1)}}function jo(t,n){if(t&1){let e=z();U(0),r(1,"button",11),C("click",function(){g(e);let i=c();return h(i.projectState.closeEditModal())}),m(2,"\u53D6\u6D88"),l(),r(3,"button",12),C("click",function(){g(e);let i=c();return h(i.projectState.confirmEditProject())}),m(4," \u786E\u5B9A "),l(),$()}if(t&2){let e,o=c();s(3),d("disabled",!(!((e=o.projectState.editingProject())==null||e.name==null)&&e.name.trim())||o.projectState.isEditSaving())("nzLoading",o.projectState.isEditSaving())}}var je=class t{projectState=f(ee);editingProject=this.projectState.editingProject;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["app-project-edit-modal"]],decls:3,vars:3,consts:[["nzTitle","\u7F16\u8F91\u9879\u76EE",3,"nzOnCancel","nzClosable","nzMaskClosable","nzVisible"],[4,"nzModalContent"],[4,"nzModalFooter"],[1,"modal-body"],[1,"label"],["nz-input","","placeholder","\u8BF7\u8F93\u5165\u65B0\u540D\u79F0","autofocus","",3,"ngModelChange","keydown.enter","ngModel"],["nzInputPrefix","","nzType","folder","nzTheme","fill"],[1,"hint"],["nz-input","","placeholder","\u4ED3\u5E93\u7F51\u9875\u5730\u5740",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","global","nzTheme","outline"],["nz-input","","rows","3","placeholder","\u8BF7\u8F93\u5165\u65B0\u63CF\u8FF0",2,"resize","none",3,"ngModelChange","keydown.enter","ngModel"],["nz-button","",3,"click"],["nz-button","","nzType","primary",3,"click","disabled","nzLoading"]],template:function(e,o){e&1&&(r(0,"nz-modal",0),C("nzOnCancel",function(){return o.projectState.closeEditModal()}),P(1,Io,2,1,"ng-container",1)(2,jo,5,2,"ng-container",2),l()),e&2&&d("nzClosable",!1)("nzMaskClosable",!1)("nzVisible",o.projectState.isEditModalVisible())},dependencies:[L,he,an,fe,ge,pn,sn,cn,ln,A,B,k,ue,ze,hn,gn,fn,b,S],styles:[".modal-body[_ngcontent-%COMP%]{display:grid;gap:12px}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.75}"]})};var Lo=()=>({width:"100%"}),Rn=(t,n)=>n.id;function Fo(t,n){t&1&&p(0,"nz-icon",2)}function ko(t,n){if(t&1){let e=z();r(0,"li",7),p(1,"nz-icon",11),r(2,"span"),m(3,"\u6DFB\u52A0/\u53D6\u6D88\u6536\u85CF"),l(),r(4,"nz-switch",12),C("ngModelChange",function(){let i;g(e);let a=c();return h(a.projectState.toggleFavorite((i=a.projectState.currentProject())==null?null:i.id))}),l()(),r(5,"li",13),C("click",function(){let i;g(e);let a=c();return h(a.projectState.openInEditor((i=a.projectState.currentProject())==null?null:i.id))}),p(6,"nz-icon",14),r(7,"span"),m(8,"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00"),l()(),r(9,"li",13),C("click",function(){g(e);let i=c();return h(i.projectState.openEditModal(i.projectState.currentProject()))}),p(10,"nz-icon",15),r(11,"span"),m(12,"\u7F16\u8F91\u9879\u76EE"),l()()}if(t&2){let e,o,i,a=c();s(),d("nzTheme",(e=a.projectState.currentProject())!=null&&e.isFavorite?"fill":"outline"),s(3),d("nzDisabled",!((o=a.projectState.currentProject())!=null&&o.id))("ngModel",(i=a.projectState.currentProject())==null?null:i.isFavorite)}}function Bo(t,n){if(t&1){let e=z();r(0,"li",13),C("click",function(){let i=g(e).$implicit,a=c();return h(a.projectState.selectProject(i))}),p(1,"nz-icon",16),r(2,"span"),m(3),l()()}if(t&2){let e=n.$implicit;s(3),T(e.name)}}function Ao(t,n){if(t&1){let e=z();r(0,"li",13),C("click",function(){let i=g(e).$implicit,a=c();return h(a.projectState.selectProject(i))}),p(1,"nz-icon",11),r(2,"span"),m(3),l()()}if(t&2){let e=n.$implicit;s(),d("nzTheme",e.isFavorite?"fill":"outline"),s(2),T(e.name)}}var Le=class t{constructor(n){this.projectState=n}isCollapsed=Et(!1);curProjectName=D(()=>{let n=this.projectState.currentProject()?.name||"\u8BF7\u9009\u62E9\u9879\u76EE";return this.isCollapsed()?n?.charAt(0).toUpperCase():n});ngOnInit(){this.projectState.getProjects()}static \u0275fac=function(e){return new(e||t)(ae(ee))};static \u0275cmp=_({type:t,selectors:[["ngm-project-nav"]],inputs:{isCollapsed:[1,"isCollapsed"]},outputs:{isCollapsed:"isCollapsedChange"},decls:23,vars:9,consts:[["menu","nzDropdownMenu"],["nz-button","","nzType","primary","nzSize","large","nz-dropdown","","nzTrigger","click",1,"project-quick-dropdown",3,"nzDropdownMenu","nzPlacement","nzOverlayStyle"],["nzType","down"],[2,"width","100%"],["nz-menu",""],["nz-menu-divider",""],["nz-menu-group","","nzTitle","\u6536\u85CF\u7684\u9879\u76EE"],["nz-menu-item","",1,"item"],["nz-menu-group","","nzTitle","\u6700\u8FD1\u4F7F\u7528"],["routerLink","/projects"],["nzType","project"],["nzType","star",3,"nzTheme"],[2,"margin-left","6px",3,"ngModelChange","nzDisabled","ngModel"],["nz-menu-item","",1,"item",3,"click"],["nzType","code"],["nzType","edit"],["nzType","star","nzTheme","fill"]],template:function(e,o){if(e&1&&(r(0,"button",1)(1,"span"),m(2),l(),v(3,Fo,1,0,"nz-icon",2),l(),r(4,"nz-dropdown-menu",3,0)(6,"ul",4),v(7,ko,13,3),p(8,"li",5)(9,"li",6),O(10,Bo,4,1,"li",7,Rn),p(12,"li",5)(13,"li",8),O(14,Ao,4,2,"li",7,Rn),p(16,"li",5),r(17,"li",7)(18,"a",9),p(19,"nz-icon",10),r(20,"span"),m(21,"\u9879\u76EE\u7BA1\u7406"),l()()()()(),p(22,"app-project-edit-modal")),e&2){let i=N(5);I("collapsed",o.isCollapsed()),d("nzDropdownMenu",i)("nzPlacement","bottomCenter")("nzOverlayStyle",ce(8,Lo)),s(2),T(o.curProjectName()),s(),y(o.isCollapsed()?-1:3),s(4),y(o.projectState.currentProject()?7:-1),s(3),E(o.projectState.favoriteProjects()),s(4),E(o.projectState.recentProjects())}},dependencies:[L,he,fe,ge,K,Q,Z,un,dn,J,ye,ve,R,b,S,_n,Cn,A,B,k,ue,F,de,je],styles:["[_nghost-%COMP%]{display:flex;padding:16px}[_nghost-%COMP%] .project-quick-dropdown[_ngcontent-%COMP%]{flex:1;width:100%;display:flex;align-items:center;gap:8px;justify-content:center;border-radius:20px;font-weight:500}[_nghost-%COMP%] .project-quick-dropdown[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item[_ngcontent-%COMP%] .ant-menu-title-content{display:flex;align-items:center;gap:8px;overflow:hidden}.item[_ngcontent-%COMP%] .ant-menu-title-content span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--app-text-color);display:flex;width:100%;align-items:center;gap:8px}"]})};var Fe=class t{router=f(G);state=f(De);isCollapsed=this.state.isCollapsed;constructor(){}isActive(n){return this.router.url.startsWith(n)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["ngm-sidebar"]],hostVars:4,hostBindings:function(e,o){e&2&&I("collapsed",o.isCollapsed())("ant-layout-sider",!0)},decls:20,vars:5,consts:[["menu","nzDropdownMenu"],["nzCollapsible","","nzWidth","256px","nzBreakpoint","md",1,"menu-sidebar",3,"nzCollapsedChange","nzCollapsed","nzTrigger"],[1,"header"],[3,"isCollapsed"],[1,"content"],["nz-button","","nzType","link","nz-dropdown","","nzPlacement","bottomRight","nzTrigger","click",1,"more-btn",3,"nzDropdownMenu"],["nzType","more"],["nz-menu",""],["nz-menu-item","",1,"item"],["routerLink","/projects"],["nzType","project","nzTheme","outline"],["routerLink","/about"],["nzType","info-circle","nzTheme","outline"]],template:function(e,o){if(e&1){let i=z();r(0,"nz-sider",1),Nt("nzCollapsedChange",function(u){return g(i),Pt(o.isCollapsed,u)||(o.isCollapsed=u),h(u)}),r(1,"div",2),p(2,"ngm-project-nav",3),l(),r(3,"div",4),p(4,"ngm-menu",3),r(5,"button",5),p(6,"nz-icon",6),l()()(),r(7,"nz-dropdown-menu",null,0)(9,"ul",7)(10,"li",8)(11,"a",9),p(12,"nz-icon",10),r(13,"span"),m(14,"\u9879\u76EE\u7BA1\u7406"),l()()(),r(15,"li",8)(16,"a",11),p(17,"nz-icon",12),r(18,"span"),m(19,"\u5173\u4E8E"),l()()()()()}if(e&2){let i=N(8);St("nzCollapsed",o.isCollapsed),d("nzTrigger",null),s(2),d("isCollapsed",o.isCollapsed()),s(2),d("isCollapsed",o.isCollapsed()),s(),d("nzDropdownMenu",i)}},dependencies:[V,wn,b,S,R,Q,Z,Ie,Le,A,B,k,K,J,ye,ve,F,de],styles:["html.default[_ngcontent-%COMP%] [_ngcontent-%COMP%]:root{--app-gray: #e6f7ff;--app-primary: #1890ff;--app-primary-1: #e6f7ff;--app-primary-2: #bae7ff;--app-primary-3: #91d5ff;--app-primary-4: #69c0ff;--app-primary-5: #40a9ff;--app-primary-6: #1890ff;--app-text-color: rgba(0, 0, 0, .85);--app-text-secondary: rgba(0, 0, 0, .45);--text-color-primary: #1890ff;--app-component-bg: #fff;--app-border-color: #d9d9d9;--header-error-background: #ff4d4f}html.default[_ngcontent-%COMP%] [_ngcontent-%COMP%]:root{--text-color-gray: #888}html.default [_nghost-%COMP%] .sidebar-logo[_ngcontent-%COMP%]{background:var(--ant-primary-1)}html.default [_nghost-%COMP%] .sidebar-logo[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--ant-text-color)}html.dark[_ngcontent-%COMP%] [_ngcontent-%COMP%]:root{--text-color-gray: #bbb}html.dark [_nghost-%COMP%] .sidebar-logo[_ngcontent-%COMP%]{background:var(--ant-primary-1)}html.dark [_nghost-%COMP%] .sidebar-logo[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--ant-text-color)}[_nghost-%COMP%]{display:block;box-sizing:border-box;position:relative;z-index:10;box-shadow:2px 0 6px #00152959;width:256px;transition:all .2s;flex:0 0 auto}.collapsed[_nghost-%COMP%]{width:80px}.menu-sidebar[_ngcontent-%COMP%]{height:100%}.menu-sidebar[_ngcontent-%COMP%] .ant-layout-sider-children{display:flex;flex-direction:column;height:100%}.menu-sidebar[_ngcontent-%COMP%] .ant-menu-inline{border-right:none}.menu-sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex:0 0 auto}.menu-sidebar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex:1 1 auto;height:0;display:flex;flex-direction:column}.menu-sidebar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] ngm-menu[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.menu-sidebar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:12px;flex:0 0 auto}.menu-sidebar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:var(--app-primary-2)}.sidebar-logo[_ngcontent-%COMP%]{position:relative;height:64px;padding-left:24px;overflow:hidden;line-height:64px;transition:all .3s}.sidebar-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:inline-block;height:32px;width:32px;vertical-align:middle}.sidebar-logo[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{display:inline-block;margin:0 0 0 20px;font-weight:600;font-size:14px;font-family:Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;vertical-align:middle}.item[_ngcontent-%COMP%] .ant-menu-title-content{display:flex;align-items:center;gap:8px}.item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--app-text-color);display:flex;width:100%;align-items:center;gap:8px}"]})};function Ro(t,n){if(t&1){let e=z();r(0,"div",4),C("transitionend",function(i){g(e);let a=c();return h(a.onWrapTransitionEnd(i))}),r(1,"div",5),C("animationend",function(i){g(e);let a=c();return h(a.onInnerAnimationEnd(i))}),p(2,"ngm-header"),l()()}if(t&2){let e=c();I("leaving",e.leaving()),s(),I("leaving",e.leaving())}}var ke=class t{ws=f(Me);constructor(){this.ws.connect(),oe(()=>this.syncVisible())}wsState=Zt(this.ws.stateChanges(),{initialValue:"idle"});shouldShow=D(()=>this.wsState()!=="open");visible=M(!1);leaving=M(!1);SHOW_DELAY_MS=200;showTimer;removed=!1;syncVisible(){if(this.shouldShow()){if(this.removed=!1,this.visible()){this.leaving.set(!1);return}this.startShowDelay();return}this.clearShowDelay(),this.visible()&&!this.leaving()&&this.leaving.set(!0)}startShowDelay(){this.showTimer||(this.showTimer=setTimeout(()=>{this.showTimer=void 0,this.shouldShow()&&(this.visible.set(!0),this.leaving.set(!1),this.removed=!1)},this.SHOW_DELAY_MS))}clearShowDelay(){this.showTimer&&(clearTimeout(this.showTimer),this.showTimer=void 0)}onInnerAnimationEnd(n){}onWrapTransitionEnd(n){n.propertyName==="height"&&(this.removed||!this.shouldShow()&&this.leaving()&&(this.removed=!0,this.visible.set(!1),this.leaving.set(!1)))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=_({type:t,selectors:[["ngm-layout"]],decls:9,vars:1,consts:[[1,"app-layout"],[1,"ws-banner-wrap",3,"leaving"],[1,"app-content"],[1,"inner-content"],[1,"ws-banner-wrap",3,"transitionend"],[1,"ws-banner-inner",3,"animationend"]],template:function(e,o){e&1&&(r(0,"nz-layout",0),v(1,Ro,3,4,"div",1),r(2,"nz-layout",2),p(3,"ngm-sidebar"),r(4,"nz-layout")(5,"nz-content")(6,"div",3),p(7,"router-outlet"),l()()()(),p(8,"ngm-footer"),l()),e&2&&(s(),y(o.visible()?1:-1))},dependencies:[F,Ut,V,Sn,Mn,kn,b,R,Fe,Te,Ne],styles:["html.default[_ngcontent-%COMP%] [_ngcontent-%COMP%]:root{--app-gray: #e6f7ff;--app-primary: #1890ff;--app-primary-1: #e6f7ff;--app-primary-2: #bae7ff;--app-primary-3: #91d5ff;--app-primary-4: #69c0ff;--app-primary-5: #40a9ff;--app-primary-6: #1890ff;--app-text-color: rgba(0, 0, 0, .85);--app-text-secondary: rgba(0, 0, 0, .45);--text-color-primary: #1890ff;--app-component-bg: #fff;--app-border-color: #d9d9d9;--header-error-background: #ff4d4f}html.default[_ngcontent-%COMP%] [_ngcontent-%COMP%]:root{--text-color-gray: #888}html.default [_nghost-%COMP%] .inner-content[_ngcontent-%COMP%]{background:#fff}html.dark[_ngcontent-%COMP%] [_ngcontent-%COMP%]:root{--text-color-gray: #bbb}html.dark [_nghost-%COMP%] .inner-content[_ngcontent-%COMP%]{background:#141414}[_nghost-%COMP%]{display:flex;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[_nghost-%COMP%] .app-layout[_ngcontent-%COMP%]{height:100vh;width:100%}[_nghost-%COMP%] .app-layout[_ngcontent-%COMP%] ngm-header[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .app-content[_ngcontent-%COMP%]{flex-direction:row}[_nghost-%COMP%] nz-content[_ngcontent-%COMP%] .inner-content[_ngcontent-%COMP%]{border-radius:8px;height:100%}[_nghost-%COMP%] nz-footer[_ngcontent-%COMP%]{text-align:center}.ws-banner-wrap[_ngcontent-%COMP%]{height:48px;overflow:hidden;transition:height .35s ease}.ws-banner-wrap.leaving[_ngcontent-%COMP%]{height:0}.ws-banner-inner[_ngcontent-%COMP%]{height:48px;display:flex;align-items:stretch}.ws-banner-inner.leaving[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeOutUpSoft .35s ease forwards}@keyframes _ngcontent-%COMP%_fadeOutUpSoft{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-30%)}}"]})};var Wn=`
|
|
2
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M435.8 536.2H512V353z" fill="#DD0031"/>
|
|
4
|
-
<path d="M400.9 616.8l-52.4 130.8h-97.2L512 163V64L94.9 212.7l63.6 551.5L512 960V616.8z" fill="#DD0031"/>
|
|
5
|
-
<path d="M512 353v183.2h76.2z" fill="#C3002F"/>
|
|
6
|
-
<path d="M512 64v99l259.8 584.6h-97.2l-52.4-130.8H512V960l353.5-195.8 63.6-551.5z" fill="#C3002F"/>
|
|
7
|
-
</svg>
|
|
8
|
-
`,Hn=`
|
|
9
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
-
<path d="M615.6 123.6h165.5L512 589.7 242.9 123.6H63.5L512 900.4l448.5-776.9z" fill="#41B883"/>
|
|
11
|
-
<path d="M781.1 123.6H615.6L512 303 408.4 123.6H242.9L512 589.7z" fill="#34495E"/>
|
|
12
|
-
</svg>
|
|
13
|
-
`,Un=`
|
|
14
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
15
|
-
<svg t="1767603739899" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9231" width="200" height="200">
|
|
16
|
-
<path d="M512 511.8m-80 0a80 80 0 1 0 160 0 80 80 0 1 0-160 0Z" fill="#61DAFB" p-id="9232"></path>
|
|
17
|
-
<path d="M960.5 511.8c0-62.8-73.8-117.2-188.5-150.1 28.9-115.8 18.7-206.9-35.7-238.3-54.5-31.4-138.5 5.3-224.3 88.2-85.8-82.9-169.8-119.6-224.3-88.2-54.4 31.4-64.6 122.6-35.7 238.3C137.3 394.6 63.5 449 63.5 511.8S137.3 629 252 661.9c-28.9 115.7-18.7 206.9 35.7 238.3 13.4 7.8 28.6 11.6 45.2 11.6 39.7 0 87.8-21.8 140-64.2 13-10.6 26.1-22.6 39.1-35.2 13 12.6 26.1 24.6 39.1 35.2 52.2 42.4 100.2 64.2 140 64.2 16.6 0 31.8-3.8 45.2-11.6 54.4-31.4 64.6-122.5 35.7-238.3 114.7-32.9 188.5-87.3 188.5-150.1zM716.8 157.2c35.3 20.4 42.7 94.3 17.6 194.8-36.7-8.4-76.7-14.7-119.3-18.6-24.7-34.9-50.2-66.4-75.8-94 59.2-57.3 114.2-88.4 152-88.4 9.6-0.1 18.2 2 25.5 6.2zM637 584c-13.8 24-28.4 47-43.3 69-26.1 2-53.3 3.1-81.7 3.1-28.3 0-55.5-1.1-81.6-3.1-15-22-29.5-45.1-43.3-69-14.1-24.5-26.7-48.6-38.1-72.2 11.4-23.6 24-47.7 38.1-72.2 14.1-24.5 28.7-47.4 43.4-69.1 26.1-2 53.3-3.1 81.6-3.1 28.3 0 55.5 1.1 81.6 3.1 14.7 21.6 29.3 44.6 43.4 69 14.1 24.5 26.7 48.6 38.1 72.2-11.5 23.7-24.1 47.8-38.2 72.3z m58.8-26.4c11.2 26.6 20.4 52.1 28 76.5-24.9 5.6-51.7 10.4-80.3 14 9.3-14.5 18.4-29.3 27.3-44.6 8.8-15.4 17.1-30.7 25-45.9zM512 756.5c-17.7-19.2-35.1-40.1-52.2-62.6 17.1 0.8 34.5 1.3 52.2 1.3 17.7 0 35.1-0.5 52.2-1.3-17.1 22.5-34.5 43.4-52.2 62.6zM380.5 648.1c-28.6-3.6-55.3-8.4-80.3-14 7.6-24.4 16.8-49.9 28-76.5 7.9 15.2 16.1 30.5 25 45.9 8.9 15.2 18 30 27.3 44.6zM328.2 466c-11.2-26.6-20.4-52.1-28-76.5 24.9-5.6 51.6-10.4 80.2-14-9.2 14.4-18.4 29.2-27.2 44.6-8.8 15.4-17.1 30.7-25 45.9zM512 267.1c17.3 18.7 34.8 39.8 52.1 62.7-17.1-0.8-34.4-1.3-52.1-1.3-17.7 0-35 0.5-52.1 1.3 17.3-22.9 34.8-44 52.1-62.7z m158.7 153c-8.9-15.3-18-30.1-27.2-44.6 28.6 3.6 55.3 8.4 80.2 14-7.6 24.4-16.8 49.9-28 76.5-7.8-15.2-16.1-30.5-25-45.9zM307.2 157.2c7.2-4.2 15.8-6.2 25.6-6.2 37.8 0 92.7 31.1 151.9 88.4-25.6 27.6-51.1 59.2-75.8 94-42.5 3.9-82.6 10.2-119.3 18.6-25.1-100.6-17.6-174.5 17.6-194.8zM102.5 511.8c0-40.8 60.3-84.2 160-112.6 11.1 36 25.6 73.8 43.5 112.6-17.8 38.8-32.4 76.6-43.5 112.6-99.7-28.4-160-71.9-160-112.6z m345.8 305.5c-59.7 48.5-111.1 66.4-141.1 49.2-35.3-20.4-42.7-94.3-17.6-194.8 36.7 8.4 76.7 14.7 119.3 18.6 24.4 34.5 49.9 66.1 75.8 94.2-12.1 11.7-24.2 22.9-36.4 32.8z m268.5 49.2c-29.9 17.3-81.4-0.6-141.1-49.2-12.1-9.9-24.3-21.1-36.5-32.8 26-28.1 51.4-59.7 75.8-94.2 42.5-3.9 82.6-10.2 119.3-18.7 25.2 100.6 17.7 174.5-17.5 194.9z m44.8-242.1c-11.1-36-25.6-73.8-43.5-112.6 17.8-38.8 32.4-76.6 43.5-112.6 99.7 28.5 160 71.9 160 112.6-0.1 40.7-60.4 84.2-160 112.6z" fill="#61DAFB" p-id="9233"></path></svg>
|
|
18
|
-
</svg>
|
|
19
|
-
`,$n=`
|
|
20
|
-
<svg t="1767598826450" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8231" width="200" height="200">
|
|
21
|
-
<path d="M875.2 262.3L546.7 72.7c-20.7-11.8-48.3-11.8-69 0L148.8 262.3c-21.5 12.2-34.5 34.9-34.5 59.7v379.2c0 24.8 13.4 47.9 34.5 60.1l86.1 49.5c41.8 20.7 56.8 20.7 75.9 20.7 62.1 0 97.4-37.8 97.4-102.7V354.4c0-5.3-4.1-9.3-9.3-9.3h-41.4c-5.3 0-9.3 4.1-9.3 9.3v374.3c0 28.8-30 57.7-78.8 33.3l-90.1-52c-3.2-2-5.3-5.3-5.3-8.9V321.9c0-3.7 2-7.3 5.3-8.9l328.1-190c3.2-1.6 7.3-1.6 10.2 0l328.5 189.6c3.2 1.6 5.3 5.3 5.3 8.9v379.2c0 3.7-2 7.3-4.9 8.9L517.9 899.3c-2.8 1.6-7.3 1.6-10.2 0l-84.4-49.9c-2.4-1.2-5.7-1.6-8.1-0.4-23.1 13.4-27.6 15-49.5 22.7-5.7 1.6-13.4 4.9 2.8 14.2l109.6 65c10.6 6.1 22.3 9.3 34.5 9.3 11.8-0.4 24-3.2 34.1-9.7l328.5-189.6c21.1-12.2 34.5-34.9 34.5-59.7V321.9c0-24.3-13.4-47.5-34.5-59.6z" fill="#689F63" p-id="8232"></path>
|
|
22
|
-
<path d="M614.1 641.1c-86.9 0-106-21.9-112.5-65-0.8-4.9-4.5-8.1-9.3-8.1h-42.6c-5.3 0-9.3 4.1-9.3 9.3 0 55.2 30 121.4 173.8 121.4l-0.4-0.4c103.9 0 163.6-41 163.6-112.5 0-70.6-47.9-89.7-149-103.1-101.9-13.4-112.5-20.3-112.5-44.3 0-19.5 8.9-45.9 84.4-45.9 67.8 0 92.6 14.6 102.7 60.1 1.2 4.1 4.9 7.3 9.3 7.3H755c2.4 0 5.3-0.8 6.9-2.8 1.6-2 2.8-4.5 2.4-7.3-6.9-78.4-58.9-114.9-164-114.9-93.4 0-149.4 39.4-149.4 105.6 0 71.9 55.6 91.8 145.8 100.7 107.6 10.6 116.1 26.4 116.1 47.5 0 36.5-29.3 52.4-98.7 52.4z" fill="#689F63" p-id="8233"></path>
|
|
23
|
-
</svg>
|
|
24
|
-
`,Gn=`
|
|
25
|
-
<svg t="1768726164973" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4725" width="200" height="200">
|
|
26
|
-
<path d="M332.72493 412.535453l171.001167-98.72725a13.830826 13.830826 0 0 1 13.83424 0l171.007994 98.72725a13.841066 13.841066 0 0 1 6.915413 11.9808v197.4545a13.858133 13.858133 0 0 1-6.918826 11.980799l-171.004581 98.72725a13.830826 13.830826 0 0 1-13.83424 0l-171.001167-98.72725a13.841066 13.841066 0 0 1-6.915413-11.980799V424.516253a13.847893 13.847893 0 0 1 6.915413-11.9808" fill="#7986CB" p-id="4726"></path>
|
|
27
|
-
<path d="M955.265709 502.476783L750.950409 147.036155c-7.420586-12.8512-21.128533-22.330026-35.969705-22.330026H306.329624c-14.844586 0-28.555946 9.478826-35.976532 22.330026L66.037792 501.701957c-7.420586 12.854613-7.420586 29.081599 0 41.932798L270.353092 896.170637c7.420586 12.8512 21.131946 19.421866 35.976532 19.421866h408.65108c14.83776 0 28.552532-6.372693 35.969705-19.227306l204.3153-353.109322c7.427413-12.847786 7.427413-27.921066 0-40.768852m-169.181861 170.922661c0 5.2224-3.14368 10.059093-7.676586 12.673706l-260.249592 150.152529a14.80704 14.80704 0 0 1-14.725119 0l-260.450978-150.152529c-4.52608-2.614613-7.693653-7.44448-7.693653-12.673706v-300.30847c0-5.229226 3.119787-10.059093 7.649279-12.677119l260.242765-150.152529a14.779733 14.779733 0 0 1 14.71488 0l260.471458 150.152529c4.529493 2.618027 7.717546 7.447893 7.717546 12.677119z" fill="#3F51B5" p-id="4727"></path>
|
|
28
|
-
</svg>
|
|
29
|
-
`;var Be=class t{constructor(n){this.icons=n}inited=!1;init(){this.inited||(this.inited=!0,this.icons.addIconLiteral("proj:angular",Wn),this.icons.addIconLiteral("proj:vue",Hn),this.icons.addIconLiteral("proj:react",Un),this.icons.addIconLiteral("proj:node",$n),this.icons.addIconLiteral("proj:eslint",Gn))}static \u0275fac=function(e){return new(e||t)(ie(Qt))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ae=class t{constructor(n){n.init()}static \u0275fac=function(e){return new(e||t)(ae(Be))};static \u0275cmp=_({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(e,o){e&1&&p(0,"ngm-layout")},dependencies:[ke],styles:["[_nghost-%COMP%]{display:block;height:100vh}"]})};At(Ae,jn).catch(t=>console.error(t));
|