@yinuo-ngm/server 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +0 -4
- package/lib/env.js +5 -1
- package/lib/plugins/success-handle.plugin.js +1 -1
- package/lib/plugins/ws/topics/nginx.ws.js +1 -1
- package/lib/plugins/ws/ws.context.js +3 -1
- package/lib/plugins/ws/ws.plugin.js +14 -2
- package/lib/routes/api-client/collection.routes.js +35 -35
- package/lib/routes/api-client/env.routes.js +12 -8
- package/lib/routes/api-client/history.routes.js +10 -5
- package/lib/routes/api-client/request.routes.js +14 -8
- package/lib/routes/api-client/route-mappers.d.ts +7 -0
- package/lib/routes/api-client/route-mappers.js +78 -0
- package/lib/routes/api-client/send.routes.js +12 -8
- package/lib/routes/config.routes.js +73 -49
- package/lib/routes/deps.route.js +47 -5
- package/lib/routes/index.js +5 -3
- package/lib/routes/nginx/nginx-config.routes.js +3 -3
- package/lib/routes/nginx/nginx-lifecycle.routes.js +14 -13
- package/lib/routes/nginx/nginx-module.routes.js +6 -6
- package/lib/routes/nginx/nginx-route.context.d.ts +16 -1
- package/lib/routes/nginx/nginx-route.context.js +136 -1
- package/lib/routes/nginx/nginx-server.routes.js +5 -5
- package/lib/routes/node-runtime.routes.d.ts +2 -0
- package/lib/routes/node-runtime.routes.js +69 -0
- package/lib/routes/project.routes.js +117 -13
- package/lib/routes/sprite/sprite-browse.routes.d.ts +2 -0
- package/lib/routes/sprite/sprite-browse.routes.js +137 -0
- package/lib/routes/sprite/sprite-quick.utils.d.ts +19 -0
- package/lib/routes/sprite/sprite-quick.utils.js +247 -0
- package/lib/routes/sprite/sprite.routes.d.ts +2 -0
- package/lib/routes/sprite/sprite.routes.js +212 -0
- package/lib/routes/sprite-browse.routes.js +17 -11
- package/lib/routes/sprite.routes.d.ts +1 -1
- package/lib/routes/sprite.routes.js +68 -11
- package/lib/routes/svn.routes.js +48 -14
- package/lib/routes/task.routes.js +99 -7
- package/package.json +7 -7
- package/www/3rdpartylicenses.txt +5 -5
- package/www/browser/{chunk-OZCK4XVV.js → chunk-2VJVGBXG.js} +1 -1
- package/www/browser/{chunk-FL6GDGHW.js → chunk-3ODVU46S.js} +1 -1
- package/www/browser/chunk-442QFABJ.js +1 -0
- package/www/browser/{chunk-WD2EKZQC.js → chunk-6J6G7JEP.js} +1 -1
- package/www/browser/{chunk-7U44RF5F.js → chunk-6UFDNETG.js} +1 -1
- package/www/browser/{chunk-75W3GVSO.js → chunk-7AKVG375.js} +1 -1
- package/www/browser/chunk-7GLWEFTM.js +1 -0
- package/www/browser/{chunk-DIJPUYIA.js → chunk-7QR6RHLA.js} +1 -1
- package/www/browser/{chunk-HJTXXSMC.js → chunk-CO3CQHKV.js} +1 -1
- package/www/browser/{chunk-3XNNQFWR.js → chunk-CPJTSA6E.js} +1 -1
- package/www/browser/chunk-DENFXXOY.js +1 -0
- package/www/browser/{chunk-HDNG236Q.js → chunk-HC5KLPHD.js} +1 -1
- package/www/browser/chunk-HJAP6WBI.js +1 -0
- package/www/browser/{chunk-N2PELLMM.js → chunk-JM6DCZP6.js} +7 -7
- package/www/browser/chunk-K6C5ZIV2.js +20 -0
- package/www/browser/chunk-M6NZ6C2R.js +2 -0
- package/www/browser/{chunk-RGOYDY7H.js → chunk-MBPB43C6.js} +1 -1
- package/www/browser/chunk-MPLGMTLT.js +3 -0
- package/www/browser/chunk-NNOWADVM.js +1 -0
- package/www/browser/{chunk-M4QRBV3K.js → chunk-NREWZQVN.js} +1 -1
- package/www/browser/{chunk-6YYNHZ2A.js → chunk-OUGN4APK.js} +1 -1
- package/www/browser/chunk-PB2LGZNW.js +1 -0
- package/www/browser/chunk-PDI3HSSH.js +4 -0
- package/www/browser/chunk-PUG3VNTI.js +3 -0
- package/www/browser/{chunk-QJP5F735.js → chunk-PY3AUTHC.js} +1 -1
- package/www/browser/{chunk-3M56F2S2.js → chunk-R4HSZU2J.js} +1 -1
- package/www/browser/{chunk-DE6E23ET.js → chunk-RKK4I2RT.js} +1 -1
- package/www/browser/chunk-RMIYLAEM.js +1 -0
- package/www/browser/chunk-RZA3IFQV.js +2 -0
- package/www/browser/{chunk-K7PESFPY.js → chunk-SD2HFD54.js} +1 -1
- package/www/browser/{chunk-BTQIUVTQ.js → chunk-SEJGGBE2.js} +1 -1
- package/www/browser/chunk-SSCUT2GF.js +1 -0
- package/www/browser/chunk-TCBOC5FF.js +1 -0
- package/www/browser/{chunk-AZ6SIMYH.js → chunk-TS5ZQYYY.js} +1 -1
- package/www/browser/chunk-TVJHI463.js +1 -0
- package/www/browser/{chunk-YNW4HEJO.js → chunk-TXAXE73U.js} +17 -17
- package/www/browser/{chunk-4X42HB6N.js → chunk-U2YWR3HF.js} +1 -1
- package/www/browser/{chunk-D2ODDESN.js → chunk-U3EUR236.js} +1 -1
- package/www/browser/chunk-UKCMUTYL.js +1 -0
- package/www/browser/{chunk-DLGJD6YU.js → chunk-UPOORT3S.js} +1 -1
- package/www/browser/chunk-VW3S7C2Z.js +1 -0
- package/www/browser/chunk-VZYJ3MSW.js +15 -0
- package/www/browser/{chunk-AELTP6YN.js → chunk-WCHN62X6.js} +1 -1
- package/www/browser/chunk-WWIPELAV.js +1 -0
- package/www/browser/{chunk-B3C35ET3.js → chunk-WYNERG74.js} +1 -1
- package/www/browser/{chunk-ZTDLWBW5.js → chunk-XJDJL3TQ.js} +1 -1
- package/www/browser/{chunk-EEDA5U4V.js → chunk-YV6QPLF5.js} +1 -1
- package/www/browser/{chunk-ONXBYGIG.js → chunk-YVRGRFK2.js} +1 -1
- package/www/browser/index.html +1 -1
- package/www/browser/main-7GYUOEJY.js +38 -0
- package/lib/plugins/api-client.plugin.d.ts +0 -3
- package/lib/plugins/api-client.plugin.js +0 -55
- package/lib/plugins/nginx.binding.store.d.ts +0 -4
- package/lib/plugins/nginx.binding.store.js +0 -39
- package/lib/plugins/nginx.plugin.d.ts +0 -3
- package/lib/plugins/nginx.plugin.js +0 -23
- package/www/browser/chunk-2L7NUOMX.js +0 -2
- package/www/browser/chunk-2NZJ7CN2.js +0 -20
- package/www/browser/chunk-3CM4SKDO.js +0 -15
- package/www/browser/chunk-3OHBKMAA.js +0 -1
- package/www/browser/chunk-4LBSLURA.js +0 -1
- package/www/browser/chunk-5DYX4DUX.js +0 -11
- package/www/browser/chunk-6SYVDN5L.js +0 -1
- package/www/browser/chunk-AMXRL4GR.js +0 -1
- package/www/browser/chunk-AV2ZODEH.js +0 -1
- package/www/browser/chunk-CN5J4WNO.js +0 -1
- package/www/browser/chunk-FK6Z4HLL.js +0 -1
- package/www/browser/chunk-FXCG34QS.js +0 -1
- package/www/browser/chunk-H5HGMOE6.js +0 -1
- package/www/browser/chunk-HB3HECPD.js +0 -1
- package/www/browser/chunk-HUMCWAKJ.js +0 -3
- package/www/browser/chunk-IKB3EQCP.js +0 -2
- package/www/browser/chunk-OSBDR36P.js +0 -1
- package/www/browser/chunk-XLFHB7RS.js +0 -3
- package/www/browser/main-N64WJCHX.js +0 -34
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import{b as Bn}from"./chunk-6UFDNETG.js";import{a as Dn,b as En,c as On,d as jn,e as In,f as W}from"./chunk-XJDJL3TQ.js";import{e as Fe}from"./chunk-SSCUT2GF.js";import{a as Ln,b as Vn}from"./chunk-PY3AUTHC.js";import{a as yn,b as zn,c as Mn}from"./chunk-6J6G7JEP.js";import{a as kn,b as Fn}from"./chunk-CO3CQHKV.js";import{a as ae,b as Ie,c as ke,d as le}from"./chunk-NNOWADVM.js";import{c as ie,d as Sn,e as re,f as Tn,g as Nn,h as U}from"./chunk-RMIYLAEM.js";import{a as bn,b as Oe}from"./chunk-442QFABJ.js";import{a as wn,b as Pn}from"./chunk-SD2HFD54.js";import{h as ze,i as Me,k as be,l as Z}from"./chunk-U2YWR3HF.js";import{a as Ee,b as xn}from"./chunk-PB2LGZNW.js";import{m as oe,n as je}from"./chunk-K6C5ZIV2.js";import{$b as Se,Da as un,Db as xe,Ea as w,Fa as M,Fb as ee,Ga as fn,Ha as gn,Jb as te,L as rt,La as hn,M as mn,Ma as _n,Na as F,Oa as X,Qa as L,R as dn,Ra as V,Sa as Cn,Ta as vn,Tb as ne,Xb as we,Zb as Pe,a as pn,ac as Te,dc as Ne,fc as De}from"./chunk-VZYJ3MSW.js";import"./chunk-HFZLJHYR.js";import{a as an,b as ye,c as ln,d as sn,e as q,f as K,g as cn,h as k}from"./chunk-WUA5JFDD.js";import{i as ve,l as Xt,m as Zt,n as I,o as en,r as tn,s as nn,x as on,y as rn}from"./chunk-KRYMOHYF.js";import{$b as B,Ab as kt,Ac as Ut,Ba as de,Ca as bt,Cc as Wt,Da as xt,Dc as $t,Ec as D,Fb as C,Gb as Ft,Gc as j,Ha as b,Ia as wt,Jc as m,Kc as T,Lb as P,Lc as R,M as Q,Oc as ge,Pc as he,Qb as Lt,Qc as _e,Ra as Pt,Ub as Vt,Vb as Bt,Wb as y,Xa as St,Xc as Gt,Yb as z,Yc as Ce,Zc as nt,_b as At,a as ut,ac as A,ad as ce,b as ft,bc as d,bd as ot,cc as r,cd as it,da as ht,dc as a,dd as J,ec as p,fd as Yt,ic as E,id as N,jc as O,jd as Y,ka as _t,kb as Tt,kc as tt,lc as v,ma as Ct,na as S,nb as s,oa as vt,pd as qt,qa as yt,ra as me,rb as Nt,rc as _,sa as g,sb as Dt,sd as Qt,ta as zt,tb as Et,ua as Mt,uc as c,ud as Jt,vc as ue,wc as fe,xb as Ot,ya as u,yb as jt,yc as Rt,yd as Kt,z as gt,za as f,zb as It,zc as Ht}from"./chunk-4BRW6LCZ.js";function lo(t){let n=t;return 5}var An=["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",lo];var so="@",co=(()=>{class t{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=g(de);loadingSchedulerFn=g(po,{optional:!0});_engine;constructor(e,o,i,l,h){this.doc=e,this.delegate=o,this.zone=i,this.animationType=l,this.moduleImpl=h}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-3I7BQCXS.js").then(i=>i),o;return this.loadingSchedulerFn?o=this.loadingSchedulerFn(e):o=e(),o.catch(i=>{throw new _t(5300,!1)}).then(({\u0275createEngine:i,\u0275AnimationRendererFactory:l})=>{this._engine=i(this.animationType,this.doc);let h=new l(this.delegate,this._engine,this.zone);return this.delegate=h,h})}createRenderer(e,o){let i=this.delegate.createRenderer(e,o);if(i.\u0275type===0)return i;typeof i.throwOnSyntheticProps=="boolean"&&(i.throwOnSyntheticProps=!1);let l=new at(i);return o?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(h=>{let G=h.createRenderer(e,o);l.use(G),this.scheduler??=this.injector.get(wt,null,{optional:!0}),this.scheduler?.notify(10)}).catch(h=>{l.use(i)}),l}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){kt()};static \u0275prov=S({token:t,factory:t.\u0275fac})}return t})(),at=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(l=>l.listen(n,e,o,i)),this.delegate.listen(n,e,o,i)}shouldReplay(n){return this.replay!==null&&n.startsWith(so)}},po=new yt("");function Rn(t="animations"){return Nt("NgAsyncAnimations"),zt([{provide:Ot,useFactory:(n,e,o)=>new co(n,e,o,t),deps:[bt,tn,Et]},{provide:St,useValue:t==="noop"?"NoopAnimations":"BrowserAnimations"}])}var Le=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 l=document.createElement("link");l.rel="stylesheet",l.href=n,l.id=e,l.onload=o,l.onerror=i,document.head.append(l)})}loadTheme(n=!0){let e=this.currentTheme;return n&&document.documentElement.classList.add(e),new Promise((o,i)=>{this.loadCss(`${e}.css`,e).then(l=>{n||document.documentElement.classList.add(e),this.removeUnusedTheme(this.reverseTheme(e)),o(l)},l=>i(l))})}toggleTheme(){return this.currentTheme=this.reverseTheme(this.currentTheme),this.loadTheme(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})};var Hn={provide:Lt,useFactory:t=>()=>t.loadTheme(),deps:[Le],multi:!0};var Un=[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("./chunk-U3EUR236.js").then(t=>t.DashboardModule)},{path:"tasks",loadChildren:()=>import("./chunk-NREWZQVN.js").then(t=>t.TasksModule)},{path:"projects",loadChildren:()=>import("./chunk-TVJHI463.js").then(t=>t.ProjectsModule)},{path:"settings",loadChildren:()=>import("./chunk-H2USFIYR.js").then(t=>t.SettingModule)},{path:"configuration",loadChildren:()=>import("./chunk-PDI3HSSH.js").then(t=>t.ConfigurationModule)},{path:"dependencies",loadChildren:()=>import("./chunk-TCBOC5FF.js").then(t=>t.DependenciesModule)},{path:"rquest",loadChildren:()=>import("./chunk-UKCMUTYL.js").then(t=>t.ApiClientModule)},{path:"sprite",loadChildren:()=>import("./chunk-WYNERG74.js").then(t=>t.SpriteModule)},{path:"rd",loadChildren:()=>import("./chunk-7GLWEFTM.js").then(t=>t.RdModule)},{path:"issues",loadChildren:()=>import("./chunk-VW3S7C2Z.js").then(t=>t.IssuesModule)},{path:"nginx",loadComponent:()=>import("./chunk-JM6DCZP6.js").then(t=>t.NginxComponent)},{path:"about",loadChildren:()=>import("./chunk-SEJGGBE2.js").then(t=>t.AboutRoutingModule)},{path:"**",redirectTo:"dashboard"}];en(An);var Wn={providers:[Hn,Yt(),cn(Un),vn(Cn),Rn(),on(rn([xn])),Mt(Z),Bn()]};var lt=["*"];function mo(t,n){}function uo(t,n){if(t&1&&(r(0,"span",1),P(1,mo,0,0,"ng-template",2),p(2,"nz-icon",3),a()),t&2){let e=c(),o=D(4);d("nzDropdownMenu",e.nzOverlay),s(),d("ngTemplateOutlet",o)}}function fo(t,n){}function go(t,n){if(t&1&&P(0,fo,0,0,"ng-template",2),t&2){c();let e=D(4);d("ngTemplateOutlet",e)}}function ho(t,n){if(t&1&&(E(0),m(1),O()),t&2){let e=c(2);s(),R(" ",e.nzBreadCrumbComponent.nzSeparator," ")}}function _o(t,n){if(t&1&&(r(0,"nz-breadcrumb-separator"),P(1,ho,2,1,"ng-container",4),a()),t&2){let e=c();s(),d("nzStringTemplateOutlet",e.nzBreadCrumbComponent.nzSeparator)}}function Co(t,n){t&1&&(r(0,"span",5),fe(1),a())}var vo=(t,n)=>n.url;function yo(t,n){if(t&1){let e=v();r(0,"nz-breadcrumb-item")(1,"a",0),_("click",function(i){let l=u(e).$implicit,h=c(2);return f(h.navigate(l.url,i))}),m(2),a()()}if(t&2){let e=n.$implicit;s(),Vt("href",e.url,Tt),s(),T(e.label)}}function zo(t,n){if(t&1&&B(0,yo,3,2,"nz-breadcrumb-item",null,vo),t&2){let e=c();A(e.breadcrumbs)}}var Ve=class{},Mo=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275cmp=C({type:t,selectors:[["nz-breadcrumb-separator"]],hostAttrs:[1,"ant-breadcrumb-separator"],exportAs:["nzBreadcrumbSeparator"],ngContentSelectors:lt,decls:1,vars:0,template:function(o,i){o&1&&(ue(),fe(0))},encapsulation:2})}return t})(),Gn=(()=>{class t{nzBreadCrumbComponent=g(Ve);nzOverlay;static \u0275fac=function(o){return new(o||t)};static \u0275cmp=C({type:t,selectors:[["nz-breadcrumb-item"]],inputs:{nzOverlay:"nzOverlay"},exportAs:["nzBreadcrumbItem"],ngContentSelectors:lt,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&&(ue(),y(0,uo,3,2,"span",1)(1,go,1,1,null,2),y(2,_o,2,1,"nz-breadcrumb-separator"),P(3,Co,2,0,"ng-template",null,0,J)),o&2&&(z(i.nzOverlay?0:1),s(2),z(i.nzBreadCrumbComponent.nzSeparator?2:-1))},dependencies:[ve,Mo,le,ae,M,w,gn,fn],encapsulation:2,changeDetection:0})}return t})(),bo=(()=>{class t{injector=g(de);cdr=g(Jt);elementRef=g(Pt);renderer=g(jt);directionality=g(pn);destroyRef=g(xt);nzAutoGenerate=!1;nzSeparator="/";nzRouteLabel="breadcrumb";nzRouteLabelFn=e=>e;nzRouteFn=e=>e;breadcrumbs=[];dir="ltr";ngOnInit(){this.nzAutoGenerate&&this.registerRouterChange(),this.directionality.change?.pipe(rt(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(q).navigateByUrl(e)}registerRouterChange(){try{let e=this.injector.get(q),o=this.injector.get(ln);e.events.pipe(Q(i=>i instanceof ye),rt(this.destroyRef),ht(!0)).subscribe(()=>{this.breadcrumbs=this.getBreadcrumbs(o.root),this.cdr.markForCheck()})}catch{throw new Error(`${dn} You should import RouterModule if you want to use 'NzAutoGenerate'.`)}}getBreadcrumbs(e,o="",i=[]){let l=e.children;if(l.length===0)return i;for(let h of l)if(h.outlet===an){let G=h.snapshot.url.map(se=>se.path).filter(se=>se).join("/"),mt=G?`${o}/${G}`:o,dt=this.nzRouteLabelFn(h.snapshot.data[this.nzRouteLabel]),ao=this.nzRouteFn(mt);if(G&&dt){let se={label:dt,params:h.snapshot.params,url:ao};i.push(se)}return this.getBreadcrumbs(h,mt,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=C({type:t,selectors:[["nz-breadcrumb"]],hostAttrs:[1,"ant-breadcrumb"],inputs:{nzAutoGenerate:[2,"nzAutoGenerate","nzAutoGenerate",Kt],nzSeparator:"nzSeparator",nzRouteLabel:"nzRouteLabel",nzRouteLabelFn:"nzRouteLabelFn",nzRouteFn:"nzRouteFn"},exportAs:["nzBreadcrumb"],features:[Gt([{provide:Ve,useExisting:Ct(()=>t)}])],ngContentSelectors:lt,decls:2,vars:1,consts:[[3,"click"]],template:function(o,i){o&1&&(ue(),fe(0),y(1,zo,2,0)),o&2&&(s(),z(i.nzAutoGenerate&&i.breadcrumbs.length?1:-1))},dependencies:[Gn],encapsulation:2,changeDetection:0})}return t})(),Yn=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=Ft({type:t});static \u0275inj=vt({imports:[bo,Gn]})}return t})();function xo(t){return t.op==="syslog.tail"}function wo(t){return t.op==="syslog.append"}function st(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 Be=class t{constructor(n){this.ws=n;this.msgSub=this.ws.messages().pipe(Q(e=>xo(e)||wo(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=b(!1);filter=b({});logs=b([]);unread=b(0);drawerOpen=b(!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=>st(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)}appendLocal(n,e="info",o="server"){let i={ts:Date.now(),level:e,source:"system",scope:o,text:n},l=this.logs(),h=l.length>=this.capacity?l.slice(1):l.slice();h.push(i),this.logs.set(h),this.drawerOpen()||this.unread.set(this.unread()+1)}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 h=(n.entries??[]).filter(G=>st(G,e));this.logs.set(h.slice(-this.capacity));return}let o=n.entry;if(!st(o,e))return;let i=this.logs(),l=i.length>=this.capacity?i.slice(1):i.slice();l.push(o),this.logs.set(l),this.drawerOpen()||this.unread.set(this.unread()+1)}static \u0275fac=function(e){return new(e||t)(me(Ee))};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})};var So=["logBox"],To=()=>({padding:"0px",overflow:"hidden"});function No(t,n){if(t&1&&(r(0,"nz-tag",15),m(1),ce(2,"uppercase"),a(),r(3,"div",16),m(4),a(),r(5,"div",17),m(6),ce(7,"date"),a()),t&2){let e,o,i,l,h=c();d("nzColor",h.getColor((e=h.lastLine())==null?null:e.level)),s(),R(" ",ot(2,4,(o=h.lastLine())==null?null:o.level)," "),s(3),T((i=h.lastLine())==null?null:i.text),s(2),T(it(7,6,(l=h.lastLine())==null?null:l.ts,"yyyy-MM-dd HH:mm:ss"))}}function Do(t,n){t&1&&(r(0,"nz-tag",18),m(1,"INFO"),a(),r(2,"div",16),m(3,"\u6682\u65E0\u65E5\u5FD7"),a(),r(4,"div",17),m(5,"--"),a())}function Eo(t,n){if(t&1&&m(0),t&2){let e=c().$implicit;R(" ",e.data==null?null:e.data.icon," ")}}function Oo(t,n){if(t&1&&(r(0,"div",21)(1,"nz-tag",15),m(2),ce(3,"uppercase"),a(),r(4,"span",17),m(5),ce(6,"date"),a(),r(7,"span",22),y(8,Eo,1,1),m(9),a()()),t&2){let e=n.$implicit,o=c(2);j("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(),R(" ",ot(3,15,e.level)," "),s(3),T(it(6,17,e.ts,"yyyy-MM-dd HH:mm:ss")),s(3),z(e.data!=null&&e.data.icon?8:-1),s(),R(" ",e.text," ")}}function jo(t,n){if(t&1&&(E(0),r(1,"div",19,1),B(3,Oo,10,20,"div",20,Bt().trackByLine,!0),a(),O()),t&2){let e=c();s(3),A(e.lines())}}function Io(t,n){if(t&1){let e=v();r(0,"nz-space",23)(1,"button",24),_("click",function(){u(e);let i=c();return f(i.clearLog())}),p(2,"nz-icon",25),a(),r(3,"button",26),_("click",function(){u(e);let i=c();return f(i.toBottom())}),p(4,"nz-icon",27),a()()}}var Ae=class t{sysLogStream=g(Be);projectContext=g(oe);logBox=qt("logBox");autoFollow=b(!0);isOpen=b(!1);curProjectPath=N(()=>this.projectContext.currentProject()?.root||"");lines=N(()=>this.sysLogStream.logs());lastLine=N(()=>{let n=this.sysLogStream.logs();return n.length?n[n.length-1]:null});unread=N(()=>this.sysLogStream.unread());constructor(){Y(()=>{this.sysLogStream.setDrawerOpen(this.isOpen()),this.isOpen()&&queueMicrotask(()=>this.toBottom())}),Y(()=>{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=C({type:t,selectors:[["app-system-log"]],viewQuery:function(e,o){e&1&&Wt(o.logBox,So,5),e&2&&$t()},decls:19,vars:10,consts:[["extra",""],["logBox",""],[1,"status-bar"],[1,"project-path"],["nz-button","","nzType","text","routerLink","/projects","nz-tooltip","\u9879\u76EE\u7BA1\u7406","nzTooltipPlacement","top",1,"home"],["nzType","home","nzTheme","outline",1,"icon"],["nz-button","","nzType","text","nzTooltipPlacement","top",1,"path",3,"nz-tooltip"],["nzType","folder","nzTheme","outline",1,"icon"],["nz-tooltip","\u6253\u5F00\u65E5\u5FD7",1,"last-log",3,"click"],["nzType","profile","nzTheme","outline",1,"icon"],[1,"actions"],["nz-button","","nzType","link","routerLink","/about/feedback","nzTooltipPlacement","top","nz-tooltip","\u53CD\u9988\u4E0E\u5E2E\u52A9"],["nzType","bug","nzTheme","outline"],["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=v();r(0,"div",2)(1,"div",3)(2,"a",4),p(3,"nz-icon",5),a(),r(4,"button",6),p(5,"nz-icon",7),r(6,"span"),m(7),a()()(),r(8,"div",8),_("click",function(){return u(i),f(o.openLog())}),p(9,"nz-icon",9),y(10,No,8,9)(11,Do,6,0),a(),r(12,"div",10)(13,"a",11),p(14,"nz-icon",12),a()()(),r(15,"nz-drawer",13),_("nzOnClose",function(){return u(i),f(o.closeLog())}),P(16,jo,5,0,"ng-container",14),a(),P(17,Io,5,0,"ng-template",null,0,J)}if(e&2){let i=D(18);s(4),d("nz-tooltip",o.curProjectPath()),s(3),T(o.curProjectPath()),s(3),z(o.lastLine()?10:11),s(5),d("nzVisible",o.isOpen())("nzMaskClosable",!1)("nzMask",!1)("nzExtra",i)("nzHeight",300)("nzBodyStyle",Ce(9,To))}},dependencies:[I,Fn,kn,Mn,zn,yn,V,L,F,_n,hn,M,w,De,Ne,k,K,Xt,Zt],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;gap:4px}.status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%] .home[_ngcontent-%COMP%], .status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;max-width:360px}.status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%] .home[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%] .path[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%] .home[_ngcontent-%COMP%]{justify-content:center}.status-bar[_ngcontent-%COMP%] .project-path[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{min-width:240px;justify-content:flex-start}.status-bar[_ngcontent-%COMP%] .last-log[_ngcontent-%COMP%]{cursor:pointer;flex:1;display:flex;align-items:center;padding:0 12px;gap:8px;width:0}.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:18px;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 Ue=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({type:t,selectors:[["ngm-footer"]],decls:2,vars:0,template:function(e,o){e&1&&(r(0,"nz-footer"),p(1,"app-system-log"),a())},dependencies:[W,En,Ae],styles:["nz-footer[_ngcontent-%COMP%]{padding:0;align-items:center;display:flex}app-system-log[_ngcontent-%COMP%]{width:100%}"]})};var We=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({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"),a()())},dependencies:[I,W,On,M,w],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 $e=class t{isCollapsed=b(!1);static \u0275fac=function(e){return new(e||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ge=class t{projectContext=g(oe);currentMenu=b(null);router=g(q);isHubProjectValid=this.projectContext.isHubProjectValid;menus=b([{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},{title:"Nginx",path:"/nginx",icon:"deployment-unit",level:1},{title:"\u96EA\u78A7\u56FE",path:"/sprite",icon:"smile",level:1},{title:"\u7814\u53D1\u7BA1\u7406",path:"/rd",icon:"rocket",level:1,hidden:!0},{title:"\u6D4B\u8BD5\u8DDF\u8E2A",path:"/issues",icon:"bug",level:1,hidden:!0}]);currentMenus=N(()=>this.menus());constructor(){this.syncByUrl(this.router.url),this.router.events.pipe(Q(n=>n instanceof ye)).subscribe(n=>this.syncByUrl(n.urlAfterRedirects)),Y(n=>{let e=this.isHubProjectValid();this.menus.update(o=>o.map(i=>i.path&&(i.path.includes("/rd")||i.path.includes("/issues"))?ft(ut({},i),{hidden:!e}):i)),n(()=>{})})}isActive(n){return this.router.isActive(n,{paths:"subset",queryParams:"ignored",fragment:"ignored",matrixParams:"ignored"})}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(l=>!!l.path),i=null;for(let l of o){let h=l.path;(e===h||e.startsWith(h+"/"))&&(!i||h.length>i.path.length)&&(i=l)}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=S({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ye=class t{api=g(bn);runtimeStore=g(Oe);async initActiveSnapshot(){let n=await gt(this.api.active());for(let e of n??[])this.runtimeStore.setRuntime(e)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})};var Qn=t=>({$implicit:t});function ko(t,n){t&1&&tt(0)}function Fo(t,n){if(t&1&&p(0,"nz-icon",6),t&2){let e=c(3).$implicit;d("nzType",e.icon)}}function Lo(t,n){t&1&&p(0,"nz-badge",7)}function Vo(t,n){if(t&1){let e=v();r(0,"li",5),_("click",function(){u(e);let i=c(2).$implicit,l=c(2);return f(l.menuService.clickMenu(i))}),y(1,Fo,1,1,"nz-icon",6),r(2,"span"),m(3),a(),y(4,Lo,1,0,"nz-badge",7),a()}if(t&2){let e=c(2).$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(),z(e.icon?1:-1),s(2),T(e.title),s(),z(e.taskCountBadge===!0&&o.runningTaskCount()>0?4:-1)}}function Bo(t,n){t&1&&tt(0)}function Ao(t,n){if(t&1&&(r(0,"li",4)(1,"ul"),P(2,Bo,1,0,"ng-container",2),a()()),t&2){let e=c(2).$implicit;c(2);let o=D(3);d("nzPaddingLeft",e.level*24)("nzOpen",e.open)("nzTitle",e.title)("nzIcon",e.icon)("nzDisabled",e.disabled),s(2),d("ngTemplateOutlet",o)("ngTemplateOutletContext",nt(7,Qn,e.children))}}function Ro(t,n){if(t&1&&y(0,Vo,5,7,"li",3)(1,Ao,3,9,"li",4),t&2){let e=c().$implicit;z(e.children?1:0)}}function Ho(t,n){if(t&1&&y(0,Ro,2,1),t&2){let e=n.$implicit;z(e!=null&&e.hidden?-1:0)}}function Uo(t,n){if(t&1&&B(0,Ho,1,1,null,null,At),t&2){let e=n.$implicit;A(e())}}var qe=class t{isCollapsed=!1;menuService=g(Ge);taskBootstrap=g(Ye);runtimeStore=g(Oe);menus=this.menuService.currentMenus;runningTaskCount=N(()=>this.runtimeStore.totalRunningCountSignal()());ngOnInit(){this.taskBootstrap.initActiveSnapshot()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({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,ko,1,0,"ng-container",2)(2,Uo,2,0,"ng-template",null,0,J),a()),e&2){let i=D(3);d("nzInlineCollapsed",o.isCollapsed),s(),d("ngTemplateOutlet",i)("ngTemplateOutletContext",nt(3,Qn,o.menus))}},dependencies:[ve,U,re,ie,Sn,M,w,k,De,Ne,Pn,wn],encapsulation:2})};function Go(t,n){if(t&1){let e=v();r(0,"div",3)(1,"label",4),m(2,"\u540D\u79F0"),a(),r(3,"nz-input-wrapper")(4,"input",5),_("ngModelChange",function(i){u(e);let l=c(2);return f(l.projectState.editingProject().name=i)})("keydown.enter",function(){u(e);let i=c(2);return f(i.projectState.confirmEditProject())}),a(),p(5,"nz-icon",6),a(),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"),a(),r(8,"label",4),m(9,"Git\u4ED3\u5E93\u5730\u5740"),a(),r(10,"nz-input-wrapper")(11,"input",8),_("ngModelChange",function(i){u(e);let l=c(2);return f(l.projectState.editingProject().repoPageUrl=i)}),a(),p(12,"nz-icon",9),a(),r(13,"div",10),m(14,"NGM Hub V2"),a(),r(15,"label",4),m(16,"Hub \u5730\u5740"),a(),r(17,"nz-input-wrapper")(18,"input",11),_("ngModelChange",function(i){u(e);let l=c(2);return f(l.projectState.editingProject().hubV2.baseUrl=i)}),a(),p(19,"nz-icon",12),a(),r(20,"label",4),m(21,"Project Key"),a(),r(22,"nz-input-wrapper")(23,"input",13),_("ngModelChange",function(i){u(e);let l=c(2);return f(l.projectState.editingProject().hubV2.projectKey=i)}),a(),p(24,"nz-icon",14),a(),r(25,"label",4),m(26,"API Token"),a(),r(27,"nz-input-wrapper")(28,"input",15),_("ngModelChange",function(i){u(e);let l=c(2);return f(l.projectState.editingProject().hubV2.token=i)}),a(),p(29,"nz-icon",16),a(),r(30,"div",7),m(31,"\u4EE5\u4E0A\u914D\u7F6E\u4F1A\u5199\u5165\u9879\u76EE env\uFF1ANGM_HUB_V2_BASE_URL / NGM_HUB_V2_PROJECT_KEY / NGM_HUB_V2_TOKEN\u3002"),a(),r(32,"label",4),m(33,"\u63CF\u8FF0"),a(),r(34,"nz-input-wrapper")(35,"textarea",17),_("ngModelChange",function(i){u(e);let l=c(2);return f(l.projectState.editingProject().description=i)})("keydown.enter",function(){u(e);let i=c(2);return f(i.projectState.confirmEditProject())}),a()()()}if(t&2){let e=c(2);s(4),d("ngModel",e.editingProject().name),s(7),d("ngModel",e.editingProject().repoPageUrl),s(7),d("ngModel",e.editingProject().hubV2.baseUrl),s(5),d("ngModel",e.editingProject().hubV2.projectKey),s(5),d("ngModel",e.editingProject().hubV2.token),s(7),d("ngModel",e.editingProject().description)}}function Yo(t,n){if(t&1&&(E(0),y(1,Go,36,6,"div",3),O()),t&2){let e=c();s(),z(e.editingProject()?1:-1)}}function qo(t,n){if(t&1){let e=v();E(0),r(1,"button",18),_("click",function(){u(e);let i=c();return f(i.projectState.closeEditModal())}),m(2,"\u53D6\u6D88"),a(),r(3,"button",19),_("click",function(){u(e);let i=c();return f(i.projectState.confirmEditProject())}),m(4," \u786E\u5B9A "),a(),O()}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 Qe=class t{projectState=g(Fe);editingProject=this.projectState.editingProject;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({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","Git\u4ED3\u5E93\u5730\u5740",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","github","nzTheme","outline"],[1,"section-title"],["nz-input","","placeholder","\u4F8B\u5982\uFF1Ahttp://192.168.1.31:7008",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","link","nzTheme","outline"],["nz-input","","placeholder","\u4F8B\u5982\uFF1ANGM",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","key","nzTheme","outline"],["nz-input","","type","password","placeholder","\u7C98\u8D34 hub-v2 \u9879\u76EE token",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","safety-certificate","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),_("nzOnCancel",function(){return o.projectState.closeEditModal()}),P(1,Yo,2,1,"ng-container",1)(2,qo,5,2,"ng-container",2),a()),e&2&&d("nzClosable",!1)("nzMaskClosable",!1)("nzVisible",o.projectState.isEditModalVisible())},dependencies:[I,ne,xe,ee,te,Te,Pe,Se,we,V,L,F,X,Z,be,Me,ze,M,w],styles:[".modal-body[_ngcontent-%COMP%]{display:grid;gap:12px}.section-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;opacity:.9;margin-top:4px}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.75}"]})};function Qo(t,n){if(t&1){let e=v();E(0),r(1,"div",3)(2,"label",4),m(3,"Personal Token"),a(),r(4,"nz-input-wrapper")(5,"input",5),_e("ngModelChange",function(i){u(e);let l=c();return he(l.draft,i)||(l.draft=i),f(i)}),a(),p(6,"nz-icon",6),a(),r(7,"div",7),m(8,"\u4EC5\u4FDD\u5B58\u5728\u5F53\u524D\u6D4F\u89C8\u5668\u672C\u5730\uFF0C\u7528\u4E8E webapp \u8C03\u7528 Hub V2 /api/personal\u3002"),a()(),O()}if(t&2){let e=c();s(5),ge("ngModel",e.draft)}}function Jo(t,n){if(t&1){let e=v();E(0),r(1,"button",8),_("click",function(){u(e);let i=c();return f(i.clear())}),m(2,"\u6E05\u7A7A"),a(),r(3,"button",8),_("click",function(){u(e);let i=c();return f(i.close())}),m(4,"\u53D6\u6D88"),a(),r(5,"button",9),_("click",function(){u(e);let i=c();return f(i.save())}),m(6,"\u4FDD\u5B58"),a(),O()}}var pe=class t{userStore=g(je);visible=!1;visibleChange=new Dt;draft="";open(){this.userStore.ensureUserLoaded(),this.draft=this.userStore.hubUserToken()}close(){this.visibleChange.emit(!1)}save(){this.userStore.setHubUserToken(this.draft),this.userStore.loadCurrentUser(),this.visibleChange.emit(!1)}clear(){this.userStore.setHubUserToken(""),this.draft=""}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({type:t,selectors:[["app-hub-v2-personal-token-modal"]],inputs:{visible:"visible"},outputs:{visibleChange:"visibleChange"},decls:3,vars:4,consts:[["nzTitle","Hub V2 Personal Token\uFF08\u5168\u5C40\uFF09",3,"nzOnCancel","nzVisible","nzClosable","nzMaskClosable","nzWidth"],[4,"nzModalContent"],[4,"nzModalFooter"],[1,"modal-body"],[1,"label"],["nz-input","","type","password","placeholder","\u7C98\u8D34 ngm_uptk_xxx",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","safety-certificate","nzTheme","outline"],[1,"hint"],["nz-button","",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(e,o){e&1&&(r(0,"nz-modal",0),_("nzOnCancel",function(){return o.close()}),P(1,Qo,9,1,"ng-container",1)(2,Jo,7,0,"ng-container",2),a()),e&2&&d("nzVisible",o.visible)("nzClosable",!1)("nzMaskClosable",!1)("nzWidth",560)},dependencies:[I,ne,xe,ee,te,V,L,F,X,M,w,Te,Pe,Se,we,Z,be,Me,ze],styles:[".modal-body[_ngcontent-%COMP%]{display:grid;gap:12px}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.75}"]})};var Ko=()=>({width:"100%"}),Xn=(t,n)=>n.id;function Xo(t,n){t&1&&p(0,"nz-icon",2)}function Zo(t,n){if(t&1){let e=v();r(0,"li",7),p(1,"nz-icon",12),r(2,"span"),m(3,"\u6DFB\u52A0/\u53D6\u6D88\u6536\u85CF"),a(),r(4,"nz-switch",13),_("ngModelChange",function(){let i;u(e);let l=c();return f(l.projectState.toggleFavorite((i=l.currentProject())==null?null:i.id))}),a()(),r(5,"li",14),_("click",function(){let i;u(e);let l=c();return f(l.projectState.openInEditor((i=l.currentProject())==null?null:i.id))}),p(6,"nz-icon",15),r(7,"span"),m(8,"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00"),a()(),r(9,"li",14),_("click",function(){u(e);let i=c();return f(i.projectState.openEditModal(i.currentProject()))}),p(10,"nz-icon",16),r(11,"span"),m(12,"\u7F16\u8F91\u9879\u76EE"),a()(),r(13,"li",14),_("click",function(){u(e);let i=c();return f(i.openPersonalTokenModal())}),p(14,"nz-icon",17),r(15,"span"),m(16,"Hub V2 Personal Token"),a(),r(17,"span",18),m(18),a()()}if(t&2){let e,o,i,l=c();s(),d("nzTheme",(e=l.currentProject())!=null&&e.isFavorite?"fill":"outline"),s(3),d("nzDisabled",!((o=l.currentProject())!=null&&o.id))("ngModel",(i=l.currentProject())==null?null:i.isFavorite),s(13),j("ok",l.userStore.hasHubUserToken()),s(),R(" ",l.userStore.hasHubUserToken()?"\u5DF2\u914D\u7F6E":"\u672A\u914D\u7F6E"," ")}}function ei(t,n){if(t&1){let e=v();r(0,"li",14),_("click",function(){let i=u(e).$implicit,l=c();return f(l.projectState.selectProject(i))}),p(1,"nz-icon",19),r(2,"span"),m(3),a()()}if(t&2){let e=n.$implicit;s(3),T(e.name)}}function ti(t,n){if(t&1){let e=v();r(0,"li",14),_("click",function(){let i=u(e).$implicit,l=c();return f(l.projectState.selectProject(i))}),p(1,"nz-icon",12),r(2,"span"),m(3),a()()}if(t&2){let e=n.$implicit;s(),d("nzTheme",e.isFavorite?"fill":"outline"),s(2),T(e.name)}}var Je=class t{userStore=g(je);projectContext=g(oe);projectState=g(Fe);isCollapsed=Qt(!1);personalTokenModalVisible=!1;personalTokenModal;currentProject=this.projectContext.currentProject;favoriteProjects=this.projectContext.favoriteProjects;recentProjects=this.projectContext.recentProjects;curProjectName=N(()=>{let n=this.projectContext.currentProject()?.name||"\u8BF7\u9009\u62E9\u9879\u76EE";return this.isCollapsed()?n?.charAt(0).toUpperCase():n});ngOnInit(){this.projectContext.loadProjects().subscribe(),this.userStore.ensureHubUserTokenLoaded()}openPersonalTokenModal(){this.personalTokenModalVisible=!0,queueMicrotask(()=>this.personalTokenModal?.open())}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({type:t,selectors:[["ngm-project-nav"]],viewQuery:function(e,o){if(e&1&&Rt(pe,5),e&2){let i;Ht(i=Ut())&&(o.personalTokenModal=i.first)}},inputs:{isCollapsed:[1,"isCollapsed"]},outputs:{isCollapsed:"isCollapsedChange"},decls:24,vars:10,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"],[3,"visibleChange","visible"],["nzType","star",3,"nzTheme"],[2,"margin-left","6px",3,"ngModelChange","nzDisabled","ngModel"],["nz-menu-item","",1,"item",3,"click"],["nzType","code"],["nzType","edit"],["nzType","safety-certificate"],[1,"token-status"],["nzType","star","nzTheme","fill"]],template:function(e,o){if(e&1){let i=v();r(0,"button",1)(1,"span"),m(2),a(),y(3,Xo,1,0,"nz-icon",2),a(),r(4,"nz-dropdown-menu",3,0)(6,"ul",4),y(7,Zo,19,6),p(8,"li",5)(9,"li",6),B(10,ei,4,1,"li",7,Xn),p(12,"li",5)(13,"li",8),B(14,ti,4,2,"li",7,Xn),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"),a()()()()(),p(22,"app-project-edit-modal"),r(23,"app-hub-v2-personal-token-modal",11),_("visibleChange",function(h){return u(i),f(o.personalTokenModalVisible=h)}),a()}if(e&2){let i=D(5);j("collapsed",o.isCollapsed()),d("nzDropdownMenu",i)("nzPlacement","bottomCenter")("nzOverlayStyle",Ce(9,Ko)),s(2),T(o.curProjectName()),s(),z(o.isCollapsed()?-1:3),s(4),z(o.currentProject()?7:-1),s(3),A(o.favoriteProjects()),s(4),A(o.recentProjects()),s(9),d("visible",o.personalTokenModalVisible)}},dependencies:[I,ne,ee,te,le,re,ie,Nn,Tn,ae,ke,Ie,U,M,w,Vn,Ln,V,L,F,X,k,K,Qe,pe],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%] .token-status[_ngcontent-%COMP%]{margin-left:auto;font-size:12px;color:#8c8c8c}.item[_ngcontent-%COMP%] .token-status.ok[_ngcontent-%COMP%]{color:#52c41a}.item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--app-text-color);display:flex;width:100%;align-items:center;gap:8px}"]})};var Ke=class t{router=g(q);state=g($e);isCollapsed=this.state.isCollapsed;constructor(){}isActive(n){return this.router.url.startsWith(n)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=C({type:t,selectors:[["ngm-sidebar"]],hostVars:4,hostBindings:function(e,o){e&2&&j("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=v();r(0,"nz-sider",1),_e("nzCollapsedChange",function(h){return u(i),he(o.isCollapsed,h)||(o.isCollapsed=h),f(h)}),r(1,"div",2),p(2,"ngm-project-nav",3),a(),r(3,"div",4),p(4,"ngm-menu",3),r(5,"button",5),p(6,"nz-icon",6),a()()(),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"),a()()(),r(15,"li",8)(16,"a",11),p(17,"nz-icon",12),r(18,"span"),m(19,"\u5173\u4E8E"),a()()()()()}if(e&2){let i=D(8);ge("nzCollapsed",o.isCollapsed),d("nzTrigger",null),s(2),d("isCollapsed",o.isCollapsed()),s(2),d("isCollapsed",o.isCollapsed()),s(),d("nzDropdownMenu",i)}},dependencies:[W,jn,M,w,U,re,ie,qe,Je,V,L,F,le,ae,ke,Ie,k,K],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 ni(t,n){if(t&1){let e=v();r(0,"div",4),_("transitionend",function(i){u(e);let l=c();return f(l.onWrapTransitionEnd(i))}),r(1,"div",5),_("animationend",function(i){u(e);let l=c();return f(l.onInnerAnimationEnd(i))}),p(2,"ngm-header"),a()()}if(t&2){let e=c();j("leaving",e.leaving()),s(),j("leaving",e.leaving())}}var Xe=class t{ws=g(Ee);constructor(){this.ws.connect(),Y(()=>this.syncVisible())}wsState=mn(this.ws.stateChanges(),{initialValue:"idle"});shouldShow=N(()=>this.wsState()!=="open");visible=b(!1);leaving=b(!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=C({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),y(1,ni,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"),a()()()(),p(8,"ngm-footer"),a()),e&2&&(s(),z(o.visible()?1:-1))},dependencies:[k,sn,W,In,Dn,Yn,M,U,Ke,We,Ue],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 Zn=`
|
|
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
|
+
`,eo=`
|
|
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
|
+
`,to=`
|
|
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
|
+
`,no=`
|
|
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
|
+
`,oo=`
|
|
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
|
+
`,io=`
|
|
30
|
+
<svg t="1772087297160" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12394" data-spm-anchor-id="a313x.search_index.0.i16.3dc23a81kNbNJb" width="48" height="48">
|
|
31
|
+
<path d="M0 512c0 282.848 229.312 512 512 512 282.848 0 512-229.312 512-512 0-282.848-229.312-512-512-512C229.152 0 0 229.152 0 512z" fill="#333333" p-id="12395" data-spm-anchor-id="a313x.search_index.0.i13.3dc23a81kNbNJb" class="selected"></path>
|
|
32
|
+
<path d="M948.48 449.824c-34.912 45.408-101.056 22.272-131.456 40.032-44.288 26.016-42.88 89.152-151.264 173.952-26.336 20.64 27.968 128.768 4.48 152.928-23.872 24.544-119.84 25.792-143.104 12.384-34.08-19.808-7.36-71.2 0.192-146.304-70.016 7.232-92.672 5.984-162.912 3.104 10.816 56.96 26.336 120.512 3.68 141.376-18.592 16.928-108.608 18.784-136.768 0.192-35.328-23.328 25.504-156 4.896-158.272-23.68-2.464-168.416 3.296-142.88-155.808 27.136 40.032 73.28 77.792 126.368 60.864 3.072-58.208 20-113.92 48.384-158.496 37.568-58.624 95.328-97.824 168.416-97.824 72.256 0 132.48 31.776 171.872 81.728 30.816 39.2 48.8 89.984 48.992 145.088 76.352-58.208 20.224-200.8 111.648-254.24 65.12-37.984 141.248-18.368 177.6 41.888 19.392 31.584 25.312 87.072 1.824 117.408z" fill="#ffffff" p-id="12396" data-spm-anchor-id="a313x.search_index.0.i14.3dc23a81kNbNJb" class=""></path>
|
|
33
|
+
</svg>
|
|
34
|
+
`,ro=`
|
|
35
|
+
<svg t="1778296336918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5567" width="200" height="200">
|
|
36
|
+
<path d="M94.208 94.208v835.584h835.584V94.208H94.208z m634.92096 405.85216v0.012288c8.011776 0.024576 17.119232 0.436224 23.967744 1.179648 27.891712 3.016704 49.6128 15.050752 68.091904 37.715968 9.201664 11.290624 12.34944 16.2304 11.679744 18.343936-0.432128 1.363968-6.746112 5.885952-26.820608 19.21024-19.720192 13.092864-26.07104 17.014784-27.5456 17.014784-1.497088 0-4.614144-3.207168-9.105408-9.365504-8.6528-11.855872-17.485824-17.266688-31.13984-19.070976-14.68416-1.9456-27.856896 2.68288-34.308096 12.058624-5.515264 8.011776-6.3488 20.901888-1.96608 30.26944 5.07904 10.848256 14.270464 16.846848 49.494016 32.290816 40.624128 17.813504 61.210624 30.005248 76.204032 45.13792 16.146432 16.293888 24.326144 35.106816 26.83904 61.718528 1.226752 12.972032-0.272384 28.34432-3.98336 40.843264-9.10336 30.640128-33.66912 53.075968-69.67296 63.635456-9.95328 2.9184-19.214336 4.661248-28.37504 5.332992-13.985792 1.030144-34.002944 0.462848-46.051328-1.29024-30.482432-4.442112-64.892928-22.17984-82.051072-42.2912-8.423424-9.873408-19.177472-26.12224-19.177472-28.9792 0-1.380352 0.684032-2.164736 3.391488-3.885056 8.032256-5.103616 54.054912-31.412224 54.94784-31.412224 0.540672 0 2.945024 2.832384 5.341184 6.295552 5.429248 7.839744 18.78016 21.313536 25.567232 25.808896 5.543936 3.672064 12.634112 6.619136 21.051392 8.747008 4.820992 1.202176 7.3728 1.417216 17.891328 1.417216 10.747904-0.004096 12.951552-0.18432 17.760256-1.476608 12.71808-3.422208 22.644736-10.50624 26.851328-19.156992 1.8432-3.7376 1.880064-4.204544 1.880064-13.27104v-9.40032l-2.260992-4.48512c-5.474304-10.866688-17.270784-18.323456-54.56896-34.47808-17.13152-7.421952-38.11328-17.885184-46.30528-23.0912-18.696192-11.880448-31.653888-25.462784-40.157184-42.088448-8.45824-16.533504-9.71776-22.687744-9.73824-47.548416-0.02048-19.462144-0.053248-19.222528 3.975168-31.643648 3.65568-11.272192 11.139072-23.863296 19.400704-32.64512 16.4864-17.524736 40.577024-28.788736 66.367488-31.029248 3.29728-0.313344 7.716864-0.434176 12.52352-0.41984z m-221.92128 3.844096h0.008192c49.670144 0.024576 78.143488 0.196608 78.600192 0.483328 0.86016 0.53248 0.968704 4.855808 0.968704 32.444416v31.827968l-49.563648 0.180224-49.563648 0.180224v140.724224c0 77.400064-0.157696 141.185024-0.372736 141.748224-0.350208 0.948224-4.163584 1.019904-36.41344 1.019904h-36.018176l-0.372736-1.45408c-0.239616-0.79872-0.415744-64.587776-0.41984-141.750272l-0.012288-140.296192-49.5616-0.176128-49.565696-0.180224v-31.451136c0-24.94464 0.172032-31.625216 0.837632-32.288768 0.681984-0.702464 25.976832-0.882688 134.967296-0.991232 21.01248-0.02048 39.92576-0.03072 56.48384-0.02048z" fill="#0288D1" p-id="5568"></path>
|
|
37
|
+
</svg>
|
|
38
|
+
`;var Ze=class t{constructor(n){this.icons=n}inited=!1;init(){this.inited||(this.inited=!0,this.icons.addIconLiteral("proj:angular",Zn),this.icons.addIconLiteral("proj:vue",eo),this.icons.addIconLiteral("proj:react",to),this.icons.addIconLiteral("proj:node",no),this.icons.addIconLiteral("proj:eslint",oo),this.icons.addIconLiteral("proj:svn",io),this.icons.addIconLiteral("proj:ts",ro))}static \u0275fac=function(e){return new(e||t)(me(un))};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})};var et=class t{constructor(n){n.init()}static \u0275fac=function(e){return new(e||t)(It(Ze))};static \u0275cmp=C({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(e,o){e&1&&p(0,"ngm-layout")},dependencies:[Xe],styles:["[_nghost-%COMP%]{display:block;height:100vh}"]})};nn(et,Wn).catch(t=>console.error(t));
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const api_1 = require("@yinuo-ngm/api");
|
|
40
|
-
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
|
|
41
|
-
const path = __importStar(require("path"));
|
|
42
|
-
const env_1 = require("../env");
|
|
43
|
-
exports.default = (0, fastify_plugin_1.default)(async function apiClientPlugin(fastify) {
|
|
44
|
-
const rootDir = path.join(env_1.env.dataDir, "api");
|
|
45
|
-
const repo = new api_1.JsonRequestRepo({ rootDir });
|
|
46
|
-
const envRepo = new api_1.JsonEnvRepo({ rootDir });
|
|
47
|
-
const historyRepo = new api_1.JsonHistoryRepo({ rootDir });
|
|
48
|
-
const collectionRepo = new api_1.JsonCollectionRepo({ rootDir });
|
|
49
|
-
const http = new api_1.NodeHttpClient();
|
|
50
|
-
const resolver = new api_1.VariableResolver();
|
|
51
|
-
const sendService = new api_1.ApiSendService(repo, envRepo, historyRepo, http, resolver);
|
|
52
|
-
const apiClient = new api_1.ApiClient(repo, envRepo, historyRepo, collectionRepo, sendService);
|
|
53
|
-
fastify.decorate("api", apiClient);
|
|
54
|
-
fastify.log.info("[api] api client initialized");
|
|
55
|
-
});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function getNginxBindingStorePath(): string;
|
|
2
|
-
export declare function loadPersistedNginxPath(): Promise<string | null>;
|
|
3
|
-
export declare function savePersistedNginxPath(path: string): Promise<void>;
|
|
4
|
-
export declare function clearPersistedNginxPath(): Promise<void>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNginxBindingStorePath = getNginxBindingStorePath;
|
|
4
|
-
exports.loadPersistedNginxPath = loadPersistedNginxPath;
|
|
5
|
-
exports.savePersistedNginxPath = savePersistedNginxPath;
|
|
6
|
-
exports.clearPersistedNginxPath = clearPersistedNginxPath;
|
|
7
|
-
const promises_1 = require("fs/promises");
|
|
8
|
-
const path_1 = require("path");
|
|
9
|
-
const env_1 = require("../env");
|
|
10
|
-
const bindingStorePath = (0, path_1.join)(env_1.env.dataDir, 'nginx', 'binding.json');
|
|
11
|
-
function getNginxBindingStorePath() {
|
|
12
|
-
return bindingStorePath;
|
|
13
|
-
}
|
|
14
|
-
async function loadPersistedNginxPath() {
|
|
15
|
-
try {
|
|
16
|
-
const raw = await (0, promises_1.readFile)(bindingStorePath, 'utf-8');
|
|
17
|
-
const parsed = JSON.parse(raw);
|
|
18
|
-
const persistedPath = parsed.path?.trim();
|
|
19
|
-
return persistedPath || null;
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
async function savePersistedNginxPath(path) {
|
|
26
|
-
const normalizedPath = path.trim();
|
|
27
|
-
if (!normalizedPath) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
await (0, promises_1.mkdir)((0, path_1.dirname)(bindingStorePath), { recursive: true });
|
|
31
|
-
const payload = {
|
|
32
|
-
path: normalizedPath,
|
|
33
|
-
updatedAt: new Date().toISOString(),
|
|
34
|
-
};
|
|
35
|
-
await (0, promises_1.writeFile)(bindingStorePath, JSON.stringify(payload, null, 2), 'utf-8');
|
|
36
|
-
}
|
|
37
|
-
async function clearPersistedNginxPath() {
|
|
38
|
-
await (0, promises_1.rm)(bindingStorePath, { force: true });
|
|
39
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const nginx_1 = require("@yinuo-ngm/nginx");
|
|
7
|
-
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
|
|
8
|
-
const nginx_binding_store_1 = require("./nginx.binding.store");
|
|
9
|
-
exports.default = (0, fastify_plugin_1.default)(async function nginxPlugin(fastify) {
|
|
10
|
-
const nginxApp = new nginx_1.NginxApp();
|
|
11
|
-
fastify.decorate('nginx', nginxApp);
|
|
12
|
-
const persistedPath = await (0, nginx_binding_store_1.loadPersistedNginxPath)();
|
|
13
|
-
if (persistedPath) {
|
|
14
|
-
try {
|
|
15
|
-
await nginxApp.service.bind(persistedPath);
|
|
16
|
-
fastify.log.info(`[nginx] restored binding from ${persistedPath}`);
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
fastify.log.warn(`[nginx] failed to restore binding from ${(0, nginx_binding_store_1.getNginxBindingStorePath)()}: ${error?.message || error}`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
fastify.log.info('[nginx] nginx module initialized');
|
|
23
|
-
});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as ot,d as rt}from"./chunk-DE6E23ET.js";import{a as at,c as lt}from"./chunk-7U44RF5F.js";import{a as Ke,b as Xe}from"./chunk-RGOYDY7H.js";import{a as nt,b as it}from"./chunk-K7PESFPY.js";import{$ as Ze,Ga as we,Ha as ze,Ia as de,Ja as me,L as J,S as We,a as xe,ta as Ye,va as K,vb as Je,wb as et,yb as tt}from"./chunk-3CM4SKDO.js";import{i as ie,n as ve}from"./chunk-KRYMOHYF.js";import{$b as S,Ac as B,Da as ue,Ec as le,Fb as y,Fc as Z,Gb as ne,Gc as P,Ha as Pe,Hc as je,Jc as x,Kc as G,L as ke,Lb as M,Lc as b,Mb as $e,N as De,Oa as j,Ra as Ae,Ub as re,Wb as f,Xc as Qe,Yb as v,Zc as Ue,_b as V,ac as I,bc as _,cc as s,da as Ee,dc as d,dd as se,ea as Ne,ec as X,f as ee,ha as Re,ic as R,id as Ge,jc as F,jd as qe,kb as Le,kc as ae,l as Se,lc as W,n as Ie,na as Fe,nb as r,oa as te,od as D,r as q,rc as Q,s as T,sa as k,sb as Be,ub as Ve,uc as l,ud as Y,vc as A,wb as He,wc as E,xc as Ce,ya as H,yc as U,yd as ce,za as $,zc as L,zd as fe}from"./chunk-4BRW6LCZ.js";var Un=["open","in_progress","pending_update","resolved","verified","reopened","closed"],Gn={open:"\u5F85\u5904\u7406",in_progress:"\u5904\u7406\u4E2D",resolved:"\u5F85\u9A8C\u8BC1",verified:"\u5DF2\u9A8C\u8BC1",reopened:"\u5DF2\u91CD\u5F00",closed:"\u5DF2\u5173\u95ED"},qn={open:"volcano",in_progress:"cyan",resolved:"blue",verified:"green",reopened:"volcano",closed:"default"},Wn={todo:"gold",in_progress:"geekblue",done:"green"},Zn={todo:"\u5F85\u5F00\u59CB",in_progress:"\u5904\u7406\u4E2D",done:"\u5DF2\u5B8C\u6210"},Yn=[{label:"\u6240\u6709\u72B6\u6001",value:""},{label:"\u5F85\u5904\u7406",value:"open"},{label:"\u5904\u7406\u4E2D",value:"in_progress"},{label:"\u5F85\u63D0\u6D4B",value:"pending_update"},{label:"\u5F85\u9A8C\u8BC1",value:"resolved"},{label:"\u5DF2\u9A8C\u8BC1",value:"verified"},{label:"\u5DF2\u91CD\u5F00",value:"reopened"},{label:"\u5DF2\u5173\u95ED",value:"closed"}],Kn=["todo","doing","blocked","done","canceled"],Xn={todo:"\u5F85\u5F00\u59CB",doing:"\u5F00\u53D1\u4E2D",blocked:"\u963B\u585E\u4E2D",done:"\u5DF2\u5B8C\u6210",accepted:"\u5DF2\u5B8C\u6210",closed:"\u5DF2\u5173\u95ED"},Jn={todo:"volcano",doing:"cyan",blocked:"error",done:"green",accepted:"green",closed:"default"},ei=[{label:"\u6240\u6709\u72B6\u6001",value:""},{label:"\u5F85\u5F00\u59CB",value:"todo"},{label:"\u5F00\u53D1\u4E2D",value:"doing"},{label:"\u963B\u585E\u4E2D",value:"blocked"},{label:"\u5DF2\u5B8C\u6210",value:"done"},{label:"\u5DF2\u5173\u95ED",value:"closed"}];var ni={low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",critical:"\u7D27\u6025"},ii=[{label:"\u5168\u90E8\u4F18\u5148\u7EA7",value:""},{label:"\u4F4E",value:"low"},{label:"\u4E2D",value:"medium"},{label:"\u9AD8",value:"high"},{label:"\u7D27\u6025",value:"critical"}],oi={low:"green",medium:"orange",high:"magenta",critical:"red"};var vt=["*"];function xt(e,n){e&1&&E(0)}function wt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),G(t.nzTitle)}}function zt(e,n){if(e&1&&(s(0,"div",2),M(1,wt,2,1,"ng-container",4),d()),e&2){let t=l(2);r(),_("nzStringTemplateOutlet",t.nzTitle)}}function Mt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),G(t.nzExtra)}}function Ot(e,n){if(e&1&&(s(0,"div",3),M(1,Mt,2,1,"ng-container",4),d()),e&2){let t=l(2);r(),_("nzStringTemplateOutlet",t.nzExtra)}}function kt(e,n){if(e&1&&(s(0,"div",0),f(1,zt,2,1,"div",2),f(2,Ot,2,1,"div",3),d()),e&2){let t=l();r(),v(t.nzTitle?1:-1),r(),v(t.nzExtra?2:-1)}}function Pt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(2).$implicit;r(),b(" ",t.title," ")}}function bt(e,n){}function Tt(e,n){if(e&1&&(s(0,"td",6)(1,"div",7)(2,"span",8),M(3,Pt,2,1,"ng-container",4),d(),s(4,"span",9),M(5,bt,0,0,"ng-template",10),d()()()),e&2){let t=l().$implicit,i=l(3);_("colSpan",t.span),r(2),P("ant-descriptions-item-no-colon",!i.nzColon),r(),_("nzStringTemplateOutlet",t.title),r(2),_("ngTemplateOutlet",t.content)}}function yt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(2).$implicit;r(),b(" ",t.title," ")}}function St(e,n){}function It(e,n){if(e&1&&(s(0,"td",8),M(1,yt,2,1,"ng-container",4),d(),s(2,"td",11),M(3,St,0,0,"ng-template",10),d()),e&2){let t=l().$implicit;r(),_("nzStringTemplateOutlet",t.title),r(),_("colSpan",t.span*2-1),r(),_("ngTemplateOutlet",t.content)}}function Dt(e,n){if(e&1&&f(0,Tt,6,5,"td",6)(1,It,4,3),e&2){let t=l(3);v(t.nzBordered?1:0)}}function Et(e,n){if(e&1&&(s(0,"tr",5),S(1,Dt,2,1,null,null,V),d()),e&2){let t=n.$implicit;r(),I(t)}}function Nt(e,n){if(e&1&&S(0,Et,3,0,"tr",5,V),e&2){let t=l();I(t.itemMatrix)}}function Rt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l().$implicit;r(),b(" ",t.title," ")}}function Ft(e,n){if(e&1&&(s(0,"td",6)(1,"div",7)(2,"span",8),M(3,Rt,2,1,"ng-container",4),d()()()),e&2){let t=n.$implicit,i=l(4);_("colSpan",t.span),r(2),P("ant-descriptions-item-no-colon",!i.nzColon),r(),_("nzStringTemplateOutlet",t.title)}}function At(e,n){}function Lt(e,n){if(e&1&&(s(0,"td",6)(1,"div",7)(2,"span",9),M(3,At,0,0,"ng-template",10),d()()()),e&2){let t=n.$implicit;_("colSpan",t.span),r(3),_("ngTemplateOutlet",t.content)}}function Bt(e,n){if(e&1&&(s(0,"tr",5),S(1,Ft,4,4,"td",6,V),d(),s(3,"tr",5),S(4,Lt,4,2,"td",6,V),d()),e&2){let t=n.$implicit;r(),I(t),r(3),I(t)}}function Vt(e,n){if(e&1&&S(0,Bt,6,0,null,null,V),e&2){let t=l(2);I(t.itemMatrix)}}function Ht(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l().$implicit;r(),b(" ",t.title," ")}}function $t(e,n){if(e&1&&(s(0,"td",12),M(1,Ht,2,1,"ng-container",4),d()),e&2){let t=n.$implicit;_("colSpan",t.span),r(),_("nzStringTemplateOutlet",t.title)}}function jt(e,n){}function Qt(e,n){if(e&1&&(s(0,"td",11),M(1,jt,0,0,"ng-template",10),d()),e&2){let t=n.$implicit;_("colSpan",t.span),r(),_("ngTemplateOutlet",t.content)}}function Ut(e,n){if(e&1&&(s(0,"tr",5),S(1,$t,2,2,"td",12,V),d(),s(3,"tr",5),S(4,Qt,2,2,"td",11,V),d()),e&2){let t=n.$implicit;r(),I(t),r(3),I(t)}}function Gt(e,n){if(e&1&&S(0,Ut,6,0,null,null,V),e&2){let t=l(2);I(t.itemMatrix)}}function qt(e,n){if(e&1&&f(0,Vt,2,0)(1,Gt,2,0),e&2){let t=l();v(t.nzBordered?1:0)}}var Wt=(()=>{class e{content;nzSpan=1;nzTitle="";inputChange$=new Se;ngOnChanges(){this.inputChange$.next()}ngOnDestroy(){this.inputChange$.complete()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-descriptions-item"]],viewQuery:function(i,o){if(i&1&&U(He,7),i&2){let a;L(a=B())&&(o.content=a.first)}},inputs:{nzSpan:[2,"nzSpan","nzSpan",fe],nzTitle:"nzTitle"},exportAs:["nzDescriptionsItem"],features:[j],ngContentSelectors:vt,decls:1,vars:0,template:function(i,o){i&1&&(A(),$e(0,xt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return e})(),Zt="descriptions",Yt={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},Kt=(()=>{var p;let e,n=[],t=[],i,o=[],a=[],g,u=[],z=[],m,N=[],O=[];return p=class{nzConfigService=k(Ye);cdr=k(Y);breakpointService=k(tt);directionality=k(xe);destroyRef=k(ue);_nzModuleName=Zt;items;nzBordered=T(this,n,!1);nzLayout=(T(this,t),"horizontal");nzColumn=T(this,o,Yt);nzSize=(T(this,a),T(this,u,"default"));nzTitle=(T(this,z),"");nzExtra;nzColon=T(this,N,!0);itemMatrix=(T(this,O),[]);realColumn=3;dir="ltr";breakpoint=Je.md;ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(J(this.destroyRef)).subscribe(C=>{this.dir=C})}ngOnChanges(C){C.nzColumn&&this.prepareMatrix()}ngAfterContentInit(){let C=this.items.changes.pipe(Ee(this.items));ke(C,C.pipe(Ne(()=>ke(...this.items.map(c=>c.inputChange$)).pipe(De(16)))),this.breakpointService.subscribe(et).pipe(Re(c=>this.breakpoint=c))).pipe(J(this.destroyRef)).subscribe(()=>{this.prepareMatrix(),this.cdr.markForCheck()})}prepareMatrix(){if(!this.items)return;let C=[],c=0,w=this.realColumn=this.getColumn(),ge=this.items.toArray(),oe=ge.length,Te=[],ye=()=>{Te.push(C),C=[],c=0};for(let _e=0;_e<oe;_e++){let Ct=ge[_e],{nzTitle:Me,content:Oe,nzSpan:he}=Ct;c+=he,c>=w?(c>w&&We(`"nzColumn" is ${w} but we have row length ${c}`),C.push({title:Me,content:Oe,span:w-(c-he)}),ye()):_e===oe-1?(C.push({title:Me,content:Oe,span:w-(c-he)}),ye()):C.push({title:Me,content:Oe,span:he})}this.itemMatrix=Te}getColumn(){return typeof this.nzColumn!="number"?this.nzColumn[this.breakpoint]:this.nzColumn}},(()=>{let C=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],i=[K()],g=[K()],m=[K()],q(null,null,e,{kind:"field",name:"nzBordered",static:!1,private:!1,access:{has:c=>"nzBordered"in c,get:c=>c.nzBordered,set:(c,w)=>{c.nzBordered=w}},metadata:C},n,t),q(null,null,i,{kind:"field",name:"nzColumn",static:!1,private:!1,access:{has:c=>"nzColumn"in c,get:c=>c.nzColumn,set:(c,w)=>{c.nzColumn=w}},metadata:C},o,a),q(null,null,g,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:c=>"nzSize"in c,get:c=>c.nzSize,set:(c,w)=>{c.nzSize=w}},metadata:C},u,z),q(null,null,m,{kind:"field",name:"nzColon",static:!1,private:!1,access:{has:c=>"nzColon"in c,get:c=>c.nzColon,set:(c,w)=>{c.nzColon=w}},metadata:C},N,O),C&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:C})})(),ee(p,"\u0275fac",function(c){return new(c||p)}),ee(p,"\u0275cmp",y({type:p,selectors:[["nz-descriptions"]],contentQueries:function(c,w,ge){if(c&1&&Ce(ge,Wt,4),c&2){let oe;L(oe=B())&&(w.items=oe)}},hostAttrs:[1,"ant-descriptions"],hostVars:8,hostBindings:function(c,w){c&2&&P("ant-descriptions-bordered",w.nzBordered)("ant-descriptions-middle",w.nzSize==="middle")("ant-descriptions-small",w.nzSize==="small")("ant-descriptions-rtl",w.dir==="rtl")},inputs:{nzBordered:[2,"nzBordered","nzBordered",ce],nzLayout:"nzLayout",nzColumn:"nzColumn",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra",nzColon:[2,"nzColon","nzColon",ce]},exportAs:["nzDescriptions"],features:[j],decls:6,vars:3,consts:[[1,"ant-descriptions-header"],[1,"ant-descriptions-view"],[1,"ant-descriptions-title"],[1,"ant-descriptions-extra"],[4,"nzStringTemplateOutlet"],[1,"ant-descriptions-row"],[1,"ant-descriptions-item",3,"colSpan"],[1,"ant-descriptions-item-container"],[1,"ant-descriptions-item-label"],[1,"ant-descriptions-item-content"],[3,"ngTemplateOutlet"],[1,"ant-descriptions-item-content",3,"colSpan"],[1,"ant-descriptions-item-label",3,"colSpan"]],template:function(c,w){c&1&&(f(0,kt,3,2,"div",0),s(1,"div",1)(2,"table")(3,"tbody"),f(4,Nt,2,0),f(5,qt,2,1),d()()()),c&2&&(v(w.nzTitle||w.nzExtra?0:-1),r(4),v(w.nzLayout==="horizontal"?4:-1),r(),v(w.nzLayout==="vertical"?5:-1))},dependencies:[me,de,ie],encapsulation:2,changeDetection:0})),p})(),Oi=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=ne({type:e});static \u0275inj=te({imports:[Kt]})}return e})();var Jt=["template"],ct=["*"];function en(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),G(t.nzLabel)}}function tn(e,n){if(e&1&&(s(0,"div",2),M(1,en,2,1,"ng-container",5),d()),e&2){let t=l(2);r(),_("nzStringTemplateOutlet",t.nzLabel)}}function nn(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(2);r(),G(t.nzDot)}}function on(e,n){if(e&1&&(s(0,"li",1),f(1,tn,2,1,"div",2),X(2,"div",3),s(3,"div",4),M(4,nn,2,1,"ng-container",5),d(),s(5,"div",6),E(6),d()()),e&2){let t=l();P("ant-timeline-item-right",(t.nzPosition||t.position)==="right")("ant-timeline-item-left",(t.nzPosition||t.position)==="left")("ant-timeline-item-last",t.isLast),r(),v(t.nzLabel?1:-1),r(2),Z("border-color",t.borderColor),P("ant-timeline-item-head-red",t.nzColor==="red")("ant-timeline-item-head-blue",t.nzColor==="blue")("ant-timeline-item-head-green",t.nzColor==="green")("ant-timeline-item-head-gray",t.nzColor==="gray")("ant-timeline-item-head-custom",!!t.nzDot),r(),_("nzStringTemplateOutlet",t.nzDot)}}function rn(e,n){if(e&1&&ae(0,2),e&2){l();let t=le(6);_("ngTemplateOutlet",t)}}function an(e,n){}function ln(e,n){if(e&1&&M(0,an,0,0,"ng-template",2),e&2){let t=n.$implicit;_("ngTemplateOutlet",t.template)}}function sn(e,n){if(e&1&&ae(0,2),e&2){l();let t=le(6);_("ngTemplateOutlet",t)}}function cn(e,n){e&1&&X(0,"nz-icon",8)}function dn(e,n){if(e&1&&(R(0),x(1),f(2,cn,1,0,"nz-icon",8),F()),e&2){let t=l(3);r(),b(" ",t.nzPendingDot," "),r(),v(t.nzPendingDot?-1:2)}}function mn(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),b(" ",t.isPendingBoolean?"":t.nzPending," ")}}function pn(e,n){if(e&1&&(s(0,"li",3),X(1,"div",4),s(2,"div",5),M(3,dn,3,2,"ng-container",6),d(),s(4,"div",7),M(5,mn,2,1,"ng-container",6),d()()),e&2){let t=l(2);r(3),_("nzStringTemplateOutlet",t.nzPendingDot),r(2),_("nzStringTemplateOutlet",t.nzPending)}}function gn(e,n){if(e&1&&f(0,pn,6,2,"li",3),e&2){let t=l();v(t.nzPending?0:-1)}}var be=(()=>{class e{check$=new Ie(1);markForCheck(){this.check$.next()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=Fe({token:e,factory:e.\u0275fac})}return e})(),_n=["red","blue","green","grey","gray"];function hn(e){return _n.findIndex(n=>n===e)!==-1}var dt=(()=>{class e{cdr=k(Y);timelineService=k(be);template;nzPosition;nzColor="blue";nzDot;nzLabel;isLast=!1;borderColor=null;position;ngOnChanges(t){this.timelineService.markForCheck();let{nzColor:i}=t;i&&this.updateCustomColor()}detectChanges(){this.cdr.detectChanges()}updateCustomColor(){this.borderColor=hn(this.nzColor)?null:this.nzColor}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-timeline-item"],["","nz-timeline-item",""]],viewQuery:function(i,o){if(i&1&&U(Jt,5),i&2){let a;L(a=B())&&(o.template=a.first)}},inputs:{nzPosition:"nzPosition",nzColor:"nzColor",nzDot:"nzDot",nzLabel:"nzLabel"},exportAs:["nzTimelineItem"],features:[j],ngContentSelectors:ct,decls:2,vars:0,consts:[["template",""],[1,"ant-timeline-item"],[1,"ant-timeline-item-label"],[1,"ant-timeline-item-tail"],[1,"ant-timeline-item-head"],[4,"nzStringTemplateOutlet"],[1,"ant-timeline-item-content"]],template:function(i,o){i&1&&(A(),M(0,on,7,20,"ng-template",null,0,se))},dependencies:[me,de],encapsulation:2,changeDetection:0})}return e})(),un=(()=>{class e{cdr=k(Y);timelineService=k(be);directionality=k(xe);destroyRef=k(ue);listOfItems;nzMode="left";nzPending;nzPendingDot;nzReverse=!1;isPendingBoolean=!1;timelineItems=[];dir="ltr";hasLabelItem=!1;ngOnChanges(t){let{nzMode:i,nzReverse:o,nzPending:a}=t;(st(i)||st(o))&&this.updateChildren(),a&&(this.isPendingBoolean=a.currentValue===!0)}ngOnInit(){this.timelineService.check$.pipe(J(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()}),this.directionality.change?.pipe(J(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterContentInit(){this.updateChildren(),this.listOfItems.changes.pipe(J(this.destroyRef)).subscribe(()=>{this.updateChildren()})}updateChildren(){if(this.listOfItems&&this.listOfItems.length){let t=this.listOfItems.length,i=!1;this.listOfItems.forEach((o,a)=>{o.isLast=this.nzReverse?a===0:a===t-1,o.position=Cn(a,this.nzMode),!i&&o.nzLabel&&(i=!0),o.detectChanges()}),this.timelineItems=this.nzReverse?this.listOfItems.toArray().reverse():this.listOfItems.toArray(),this.hasLabelItem=i}else this.timelineItems=[],this.hasLabelItem=!1;this.cdr.markForCheck()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-timeline"]],contentQueries:function(i,o,a){if(i&1&&Ce(a,dt,4),i&2){let g;L(g=B())&&(o.listOfItems=g)}},inputs:{nzMode:"nzMode",nzPending:"nzPending",nzPendingDot:"nzPendingDot",nzReverse:[2,"nzReverse","nzReverse",ce]},exportAs:["nzTimeline"],features:[Qe([be]),j],ngContentSelectors:ct,decls:8,vars:14,consts:[["pendingTemplate",""],[1,"ant-timeline"],[3,"ngTemplateOutlet"],[1,"ant-timeline-item","ant-timeline-item-pending"],[1,"ant-timeline-item-tail"],[1,"ant-timeline-item-head","ant-timeline-item-head-custom","ant-timeline-item-head-blue"],[4,"nzStringTemplateOutlet"],[1,"ant-timeline-item-content"],["nzType","loading"]],template:function(i,o){i&1&&(A(),s(0,"ul",1),f(1,rn,1,1,"ng-container",2),S(2,ln,1,1,null,2,V),f(4,sn,1,1,"ng-container",2),d(),M(5,gn,1,1,"ng-template",null,0,se),E(7)),i&2&&(P("ant-timeline-label",o.hasLabelItem)("ant-timeline-right",!o.hasLabelItem&&o.nzMode==="right")("ant-timeline-alternate",o.nzMode==="alternate"||o.nzMode==="custom")("ant-timeline-pending",!!o.nzPending)("ant-timeline-reverse",o.nzReverse)("ant-timeline-rtl",o.dir==="rtl"),r(),v(o.nzReverse?1:-1),r(),I(o.timelineItems),r(2),v(o.nzReverse?-1:4))},dependencies:[ie,me,de,ze,we],encapsulation:2,changeDetection:0})}return e})();function st(e){return!!(e&&(e.previousValue!==e.currentValue||e.isFirstChange()))}function Cn(e,n){if(n!=="custom")return n==="left"||n==="right"?n:n==="alternate"&&e%2===0?"left":"right"}var $i=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=ne({type:e});static \u0275inj=te({imports:[dt,un]})}return e})();function Qi(e,n,t,i){let o=(e??"").trim();if(!o)return{summary:"",imageUrl:null,imageAlt:""};let a=null,g="",u=/!\[([^\]]*)\]\(([^)]+)\)/.exec(o);if(u&&(g=u[1]?.trim()??"",a=fn(u[2]??"",n,t,i)),!a){let m=/<img\b[^>]*\bsrc\s*=\s*['"]([^'"]+)['"][^>]*>/i.exec(o);m&&(a=m[1]?.trim()??null,g=/<img\b[^>]*\balt\s*=\s*['"]([^'"]*)['"][^>]*>/i.exec(m[0]??"")?.[1]?.trim()??"")}return{summary:o.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"\u3010\u56FE\u7247\u3011").replace(/<img\b[^>]*>/gi," ").replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s*>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"").replace(/<\/?[^>]+>/g," ").replace(/[*_~]/g,"").replace(/\r?\n+/g," ").replace(/\s+/g," ").trim(),imageUrl:a||null,imageAlt:g}}function fn(e,n,t,i){let o=e.trim();if(!o)return null;let a=o.match(/\/api\/admin\/uploads\/([a-zA-Z0-9_-]+)\/raw/);if(!a)return o;let g=a[1];return`/api/client/hub-token/projects/${n}/${i}/${t}/uploads/${g}/raw`}function Ui(e,n,t,i){let o=/!\[.*?\]\((\/api\/admin\/uploads\/[a-zA-Z0-9_-]+\/raw)\)/g;return e.replace(o,(a,g)=>{let u=g.match(/uploads\/([a-zA-Z0-9_-]+)/);if(!u)return a;let z=u[1],m=`/api/client/hub-token/projects/${n}/${i}/${t}/uploads/${z}/raw`;return a.replace(g,m)})}function Gi(e,n,t,i){let o=[],a=/!\[.*?\]\((\/api\/admin\/uploads\/[a-zA-Z0-9_-]+\/raw)\)/g;return{text:e.replace(a,(u,z)=>{let m=z.match(/uploads\/([a-zA-Z0-9_-]+)/);if(!m)return u;let N=m[1],O=`/api/client/hub-token/projects/${n}/${i}/${t}/uploads/${N}/raw`;return o.push(O),""}).replace(/\n{2,}/g,`
|
|
2
|
-
`).trim(),imgUrls:o}}function qi(e,n,t=/(@[^\s@,,.。;;::!?!?]+)/g){if(!e)return[];let i=new Set(n),o=[],a=0,g=new RegExp(t.source,t.flags);for(let u of e.matchAll(g)){let z=u.index,m=u[0],N=m.slice(1);z>a&&o.push({text:e.slice(a,z)}),o.push({text:m,mention:i.has(N)}),a=z+m.length}return a<e.length&&o.push({text:e.slice(a)}),o}var vn=["textRef"],xn=["*"];function wn(e,n){e&1&&E(0)}function zn(e,n){e&1&&ae(0)}function Mn(e,n){if(e&1&&M(0,zn,1,0,"ng-container",4),e&2){l();let t=le(5);_("ngTemplateOutlet",t)}}function On(e,n){if(e&1&&x(0),e&2){let t=l();b(" ",t.text()," ")}}function kn(e,n){if(e&1){let t=W();s(0,"a",5),Q("click",function(){H(t);let o=l();return $(o.toggle())}),x(1),d()}if(e&2){let t=l();r(),b(" ",t.expanded()?"\u6536\u8D77":"\u5C55\u5F00"," ")}}var mt=class e{text=D("");lines=D(2);maxHeight=D(null);enableToggle=D(!0);textRef;observer;expanded=Pe(!1);showToggle=Pe(!1);hasTextInput=Ge(()=>!!this.text());ngAfterViewInit(){this.checkOverflow(),this.initObserver()}ngOnDestroy(){this.observer?.disconnect()}constructor(){qe(()=>{this.text(),this.lines(),setTimeout(()=>this.checkOverflow())})}initObserver(){let n=this.textRef?.nativeElement;n&&(this.observer=new MutationObserver(()=>{this.checkOverflow()}),this.observer.observe(n,{childList:!0,subtree:!0,characterData:!0}))}checkOverflow(){this.toggle(!1),this.showToggle.set(!1);let n=this.textRef?.nativeElement;n&&requestAnimationFrame(()=>{let t=n.scrollHeight>n.clientHeight,i=this.maxHeight()!=null&&n.scrollHeight>this.maxHeight();this.showToggle.set(t||i)})}toggle(n){n!==void 0?this.expanded.set(n):this.expanded.update(t=>!t)}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=y({type:e,selectors:[["app-ellipsis-text"]],viewQuery:function(t,i){if(t&1&&U(vn,5),t&2){let o;L(o=B())&&(i.textRef=o.first)}},inputs:{text:[1,"text"],lines:[1,"lines"],maxHeight:[1,"maxHeight"],enableToggle:[1,"enableToggle"]},ngContentSelectors:xn,decls:7,vars:8,consts:[["textRef",""],["textTpl",""],[1,"text"],[1,"toggle"],[4,"ngTemplateOutlet"],[1,"toggle",3,"click"]],template:function(t,i){t&1&&(A(),s(0,"span",2,0),f(2,wn,1,0)(3,Mn,1,1,"ng-container"),M(4,On,1,1,"ng-template",null,1,se),d(),f(6,kn,2,1,"a",3)),t&2&&(Z("--line-clamp",i.lines())("--max-height",i.maxHeight(),"px"),P("expanded",i.expanded()),r(2),v(i.hasTextInput()?3:2),r(4),v(i.showToggle()&&i.enableToggle()?6:-1))},dependencies:[ve,ie],styles:[".text[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word;-webkit-line-clamp:var(--line-clamp);max-height:var(--max-height)}.text.expanded[_ngcontent-%COMP%]{-webkit-line-clamp:unset!important;max-height:none!important}.toggle[_ngcontent-%COMP%]{font-size:.8rem;font-weight:700;color:#1677ff;cursor:pointer;-webkit-user-select:none;user-select:none}"]})};var Pn=[[["","actions",""]],"*"],bn=["[actions]","*"],Tn=e=>({maxHeight:e});function yn(e,n){if(e&1&&X(0,"nz-badge",5),e&2){let t=l(2);_("nzCount",t.count())}}function Sn(e,n){if(e&1&&(s(0,"div",1)(1,"h2",4),x(2),f(3,yn,1,1,"nz-badge",5),d(),E(4),d()),e&2){let t=l();r(2),b(" ",t.title()," "),r(),v(t.count()!==null?3:-1)}}function In(e,n){if(e&1&&(s(0,"div",3),x(1),d()),e&2){let t=l();r(),G(t.emptyText())}}function Dn(e,n){e&1&&E(0,1)}var gt=class e{title=D();maxHeight=D();count=D(null);emptyStatus=D(!1);emptyText=D("\u6682\u65E0\u6570\u636E");static \u0275fac=function(t){return new(t||e)};static \u0275cmp=y({type:e,selectors:[["app-detail-item-card"]],inputs:{title:[1,"title"],maxHeight:[1,"maxHeight"],count:[1,"count"],emptyStatus:[1,"emptyStatus"],emptyText:[1,"emptyText"]},ngContentSelectors:bn,decls:5,vars:6,consts:[[1,"detail-item"],[1,"actions"],[1,"content"],[1,"empty"],[1,"wrap-title"],["nzStandalone","","nzShowZero","","nzColor","#eaeaea",3,"nzCount"]],template:function(t,i){t&1&&(A(Pn),s(0,"nz-card",0),f(1,Sn,5,2,"div",1),s(2,"div",2),f(3,In,2,1,"div",3)(4,Dn,1,0),d()()),t&2&&(je(Ue(4,Tn,i.maxHeight())),r(),v(i.title()?1:-1),r(2),v(i.emptyStatus()?3:4))},dependencies:[Xe,Ke,it,nt],styles:[".detail-item[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.detail-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{margin-bottom:12px;padding:0 4px 4px;display:flex;border-bottom:1px solid #f0f0f0}.detail-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .wrap-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:0;width:100%;font-size:18px;font-weight:700}[_nghost-%COMP%] .ant-card-body{min-height:0;height:100%;flex:1;display:flex;flex-direction:column}.content[_ngcontent-%COMP%]{overflow-y:auto;flex:1}.empty[_ngcontent-%COMP%]{font-size:.875rem;text-align:center;color:gray}[_nghost-%COMP%] .ant-card-bordered{border-radius:10px}"]})};var En=["textEl"],_t=["*"];function Nn(e,n){if(e&1&&X(0,"nz-icon",1),e&2){let t=l();_("nzType",t.nzIcon)}}function Rn(e,n){if(e&1){let t=W();s(0,"img",4),Q("error",function(o){H(t);let a=l();return $(a.imgError(o))}),d()}if(e&2){let t=l();_("src",t.nzSrc,Le),re("srcset",t.nzSrcSet)("alt",t.nzAlt)("loading",t.nzLoading()||"eager")("fetchpriority",t.nzFetchPriority()||"auto")}}function Fn(e,n){if(e&1&&(s(0,"span",3,0),x(2),d()),e&2){let t=l();r(2),G(t.nzText)}}var An="avatar",Ln=(()=>{var m;let e,n=[],t=[],i,o=[],a=[],g,u=[],z=[];return m=class{_nzModuleName=An;nzShape=T(this,n,"circle");nzSize=(T(this,t),T(this,o,"default"));nzGap=(T(this,a),T(this,u,4));nzText=T(this,z);nzSrc;nzSrcSet;nzAlt;nzIcon;nzLoading=D();nzFetchPriority=D();nzError=new Be;hasText=!1;hasSrc=!0;hasIcon=!1;customSize=null;textEl;el=k(Ae).nativeElement;cdr=k(Y);constructor(){Ve(()=>this.calcStringSize())}imgError(O){this.nzError.emit(O),O.defaultPrevented||(this.hasSrc=!1,this.hasIcon=!1,this.hasText=!1,this.nzIcon?this.hasIcon=!0:this.nzText&&(this.hasText=!0),this.cdr.detectChanges(),this.setSizeStyle(),this.calcStringSize())}ngOnChanges(){this.hasText=!this.nzSrc&&!!this.nzText,this.hasIcon=!this.nzSrc&&!!this.nzIcon,this.hasSrc=!!this.nzSrc,this.setSizeStyle(),this.calcStringSize()}calcStringSize(){if(!this.hasText||!this.textEl)return;let O=this.textEl.nativeElement,p=O.offsetWidth,h=this.el.getBoundingClientRect?.().width??0,C=this.nzGap*2<h?this.nzGap*2:8,c=h-C<p?(h-C)/p:1;O.style.transform=`scale(${c}) translateX(-50%)`,O.style.lineHeight=this.customSize||""}setSizeStyle(){typeof this.nzSize=="number"?this.customSize=Ze(this.nzSize):this.customSize=null,this.cdr.markForCheck()}},(()=>{let O=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],i=[K()],g=[K()],q(null,null,e,{kind:"field",name:"nzShape",static:!1,private:!1,access:{has:p=>"nzShape"in p,get:p=>p.nzShape,set:(p,h)=>{p.nzShape=h}},metadata:O},n,t),q(null,null,i,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:p=>"nzSize"in p,get:p=>p.nzSize,set:(p,h)=>{p.nzSize=h}},metadata:O},o,a),q(null,null,g,{kind:"field",name:"nzGap",static:!1,private:!1,access:{has:p=>"nzGap"in p,get:p=>p.nzGap,set:(p,h)=>{p.nzGap=h}},metadata:O},u,z),O&&Object.defineProperty(m,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:O})})(),ee(m,"\u0275fac",function(p){return new(p||m)}),ee(m,"\u0275cmp",y({type:m,selectors:[["nz-avatar"]],viewQuery:function(p,h){if(p&1&&U(En,5),p&2){let C;L(C=B())&&(h.textEl=C.first)}},hostAttrs:[1,"ant-avatar"],hostVars:20,hostBindings:function(p,h){p&2&&(Z("width",h.customSize)("height",h.customSize)("line-height",h.customSize)("font-size",h.hasIcon&&h.customSize?h.nzSize/2:null,"px"),P("ant-avatar-lg",h.nzSize==="large")("ant-avatar-sm",h.nzSize==="small")("ant-avatar-square",h.nzShape==="square")("ant-avatar-circle",h.nzShape==="circle")("ant-avatar-icon",h.nzIcon)("ant-avatar-image",h.hasSrc))},inputs:{nzShape:"nzShape",nzSize:"nzSize",nzGap:[2,"nzGap","nzGap",fe],nzText:"nzText",nzSrc:"nzSrc",nzSrcSet:"nzSrcSet",nzAlt:"nzAlt",nzIcon:"nzIcon",nzLoading:[1,"nzLoading"],nzFetchPriority:[1,"nzFetchPriority"]},outputs:{nzError:"nzError"},exportAs:["nzAvatar"],features:[j],ngContentSelectors:_t,decls:4,vars:1,consts:[["textEl",""],[3,"nzType"],[3,"src"],[1,"ant-avatar-string"],[3,"error","src"]],template:function(p,h){p&1&&(A(),f(0,Nn,1,1,"nz-icon",1)(1,Rn,1,5,"img",2)(2,Fn,3,1,"span",3),E(3)),p&2&&v(h.nzIcon&&h.hasIcon?0:h.nzSrc&&h.hasSrc?1:h.nzText&&h.hasText?2:-1)},dependencies:[ze,we],encapsulation:2,changeDetection:0})),m})(),Oo=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-avatar-group"]],hostAttrs:[1,"ant-avatar-group"],exportAs:["nzAvatarGroup"],ngContentSelectors:_t,decls:1,vars:0,template:function(i,o){i&1&&(A(),E(0))},encapsulation:2,changeDetection:0})}return e})(),ko=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=ne({type:e});static \u0275inj=te({imports:[Ln]})}return e})();var Bn=["viewerRef"],ut=(e,n)=>n.id;function Vn(e,n){if(e&1){let t=W();s(0,"li")(1,"button",12),Q("click",function(){let o=H(t).$implicit,a=l(3);return $(a.jumpToHeading(o.id))}),x(2),d()()}if(e&2){let t=n.$implicit,i=l(3);r(),Z("padding-left",(t.level-1)*12,"px"),P("is-active",i.activeTocId===t.id),re("data-toc-id",t.id),r(),b(" ",t.text," ")}}function Hn(e,n){if(e&1&&(s(0,"aside",9)(1,"div",10),x(2,"On this page"),d(),s(3,"ul",11),S(4,Vn,3,6,"li",null,ut),d()()),e&2){let t=l(2);r(4),I(t.tocItems)}}function $n(e,n){if(e&1){let t=W();s(0,"div",7)(1,"button",8),Q("click",function(){H(t);let o=l();return $(o.toggleToc())}),x(2),d(),f(3,Hn,6,0,"aside",9),d()}if(e&2){let t=l();P("is-collapsed",t.tocCollapsed),r(2),b(" ",t.tocCollapsed?"\u76EE\u5F55":"\u6536\u8D77\u76EE\u5F55"," "),r(),v(t.tocCollapsed?-1:3)}}function jn(e,n){if(e&1){let t=W();s(0,"li")(1,"button",12),Q("click",function(){let o=H(t).$implicit,a=l(2);return $(a.jumpToHeading(o.id))}),x(2),d()()}if(e&2){let t=n.$implicit,i=l(2);r(),Z("padding-left",(t.level-1)*12,"px"),P("is-active",i.activeTocId===t.id),re("data-toc-id",t.id),r(),b(" ",t.text," ")}}function Qn(e,n){if(e&1&&(s(0,"aside",4)(1,"div",10),x(2,"On this page"),d(),s(3,"ul",11),S(4,jn,3,6,"li",null,ut),d()()),e&2){let t=l();r(4),I(t.tocItems)}}var ht=class e{imageService=k(ot);cdr=k(Y);viewerRef;content="";showToc=!0;tocVariant="inline";tocCollapsedByDefault=!1;tocItems=[];activeTocId=null;tocCollapsed=!1;headingElements=[];scrollContainer=null;scrollListener=null;ngOnChanges(n){(n.content||n.showToc||n.tocCollapsedByDefault||n.tocVariant)&&queueMicrotask(()=>this.buildToc())}onMarkdownReady(){this.buildToc()}ngOnDestroy(){this.teardownScrollTracking()}jumpToHeading(n){let i=this.viewerRef?.nativeElement?.querySelector(`#${CSS.escape(n)}`);if(!i)return;this.activeTocId=n,this.cdr.markForCheck(),queueMicrotask(()=>this.ensureActiveTocItemVisible());let o=this.scrollContainer instanceof HTMLElement?this.scrollContainer:null,a=16;if(o){let u=o.getBoundingClientRect(),z=i.getBoundingClientRect(),m=o.scrollTop+(z.top-u.top)-a;o.scrollTo({top:Math.max(0,m),behavior:"smooth"});return}let g=i.getBoundingClientRect().top+window.scrollY-88;window.scrollTo({top:Math.max(0,g),behavior:"smooth"})}toggleToc(){this.tocCollapsed=!this.tocCollapsed}onContentClick(n){let i=n.target?.closest("img");if(!i?.src)return;let o=this.viewerRef?.nativeElement,a=o?Array.from(o.querySelectorAll("img")):[i],g=a.map(m=>({src:m.currentSrc||m.src,alt:m.alt||void 0})).filter(m=>!!m.src),u=Math.max(0,a.findIndex(m=>m===i));if(g.length===0)return;let z=this.imageService.preview(g,{nzMaskClosable:!0,nzKeyboard:!0});u>0&&z.switchTo(u)}buildToc(){if(!this.showToc){this.tocItems=[],this.activeTocId=null,this.tocCollapsed=!0,this.teardownScrollTracking(),this.cdr.markForCheck();return}let n=this.viewerRef?.nativeElement;if(!n){this.tocItems=[],this.activeTocId=null,this.tocCollapsed=this.tocCollapsedByDefault,this.teardownScrollTracking(),this.cdr.markForCheck();return}let t=Array.from(n.querySelectorAll("h1, h2, h3")),i=new Map,o=[];for(let a=0;a<t.length;a+=1){let g=t[a],u=(g.textContent||"").trim();if(!u)continue;let z=Number(g.tagName.slice(1))||1,m=this.slugify(u)||`section-${a+1}`,N=i.get(m)??0;i.set(m,N+1),N>0&&(m=`${m}-${N+1}`),g.id=g.id||m,o.push({id:g.id,text:u,level:z})}this.tocItems=o,this.activeTocId=o[0]?.id??null,this.tocCollapsed=this.tocCollapsedByDefault,this.setupScrollTracking(n,t),this.cdr.markForCheck()}setupScrollTracking(n,t){if(this.teardownScrollTracking(),t.length===0)return;this.headingElements=t;let i=this.findScrollContainer(n);this.scrollContainer=i??window,this.scrollListener=()=>this.syncActiveHeading(),this.scrollContainer.addEventListener("scroll",this.scrollListener,{passive:!0}),window.addEventListener("resize",this.scrollListener,{passive:!0}),this.syncActiveHeading()}teardownScrollTracking(){this.scrollListener&&(this.scrollContainer?.removeEventListener("scroll",this.scrollListener),window.removeEventListener("resize",this.scrollListener)),this.headingElements=[],this.scrollContainer=null,this.scrollListener=null}syncActiveHeading(){if(this.headingElements.length===0)return;let n=96,t=this.headingElements[0],i=this.scrollContainer instanceof HTMLElement?this.scrollContainer:null;if(i){let o=i.getBoundingClientRect(),a=i.scrollTop+n;Math.max(i.scrollHeight-i.clientHeight,0)-i.scrollTop<=2&&(t=this.headingElements[this.headingElements.length-1]);for(let z of this.headingElements)if(z.getBoundingClientRect().top-o.top+i.scrollTop<=a)t=z;else break}else for(let o of this.headingElements)if(o.getBoundingClientRect().top<=n)t=o;else break;!t.id||t.id===this.activeTocId||(this.activeTocId=t.id,this.cdr.markForCheck(),queueMicrotask(()=>this.ensureActiveTocItemVisible()))}ensureActiveTocItemVisible(){let n=this.viewerRef?.nativeElement;if(!n||!this.activeTocId)return;let t=n.querySelector(`.markdown-toc__item[data-toc-id="${CSS.escape(this.activeTocId)}"]`);if(!t)return;let i=t.closest(".markdown-toc--floating, .markdown-toc");if(!i)return;t.scrollIntoView({block:"nearest",inline:"nearest"});let o=t.offsetTop,a=o+t.offsetHeight,g=i.scrollTop,u=g+i.clientHeight;o<g?i.scrollTop=Math.max(o-8,0):a>u&&(i.scrollTop=a-i.clientHeight+8)}findScrollContainer(n){let t=n.parentElement;for(;t;){let o=getComputedStyle(t).overflowY;if((o==="auto"||o==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}slugify(n){return n.toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\u4e00-\u9fa5-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=y({type:e,selectors:[["app-markdown-viewer"]],viewQuery:function(t,i){if(t&1&&U(Bn,7),t&2){let o;L(o=B())&&(i.viewerRef=o.first)}},inputs:{content:"content",showToc:"showToc",tocVariant:"tocVariant",tocCollapsedByDefault:"tocCollapsedByDefault"},features:[j],decls:7,vars:6,consts:[["viewerRef",""],[1,"markdown-viewer","markdown-body",3,"click"],[1,"markdown-layout"],[1,"markdown-toc-floating",3,"is-collapsed"],[1,"markdown-toc"],[1,"markdown-content"],[3,"ready","data","clipboard"],[1,"markdown-toc-floating"],["type","button",1,"markdown-toc-floating__toggle",3,"click"],[1,"markdown-toc","markdown-toc--floating"],[1,"markdown-toc__title"],[1,"markdown-toc__list"],["type","button",1,"markdown-toc__item",3,"click"]],template:function(t,i){if(t&1){let o=W();s(0,"div",1,0),Q("click",function(g){return H(o),$(i.onContentClick(g))}),s(2,"div",2),f(3,$n,4,4,"div",3),f(4,Qn,6,0,"aside",4),s(5,"div",5)(6,"markdown",6),Q("ready",function(){return H(o),$(i.onMarkdownReady())}),d()()()()}t&2&&(r(2),P("has-toc",i.showToc&&i.tocItems.length>0&&i.tocVariant==="inline"),r(),v(i.showToc&&i.tocItems.length>0&&i.tocVariant==="floating"?3:-1),r(),v(i.showToc&&i.tocItems.length>0&&i.tocVariant==="inline"?4:-1),r(2),_("data",i.content)("clipboard",!0))},dependencies:[ve,lt,at,rt],styles:['[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%]{font-size:14px;line-height:1.8;color:var(--text-primary, #262626);word-break:break-word}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-layout[_ngcontent-%COMP%]{display:block;position:relative}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-layout.has-toc[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-content[_ngcontent-%COMP%]{min-width:0;order:1;display:flow-root}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating[_ngcontent-%COMP%]{position:sticky;top:8px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:8px;float:right;clear:right;margin:0 0 8px 16px;width:fit-content}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%]{height:30px;min-width:64px;padding:0 10px;border:1px solid var(--border-color-soft, #d9dde6);border-radius:999px;background:var(--surface-elevated, rgba(255, 255, 255, .92));color:var(--text-secondary, #475569);font-size:12px;line-height:28px;cursor:pointer;box-shadow:0 6px 16px #0f172a1a;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%]:hover{color:var(--text-primary, #0f172a)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%]{width:220px;max-height:min(55vh,420px);overflow:auto;margin:0;padding:10px 0 10px 14px;border-radius:14px;border:1px solid var(--border-color-soft, #e5e6eb);background:var(--surface-elevated, rgba(255, 255, 255, .96));box-shadow:0 14px 28px #0f172a29;position:static}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc.markdown-toc--floating[_ngcontent-%COMP%]{position:static;top:auto;order:initial;border-left:0;padding-left:14px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc[_ngcontent-%COMP%]{margin:0;padding:6px 0 6px 18px;border-left:1px solid var(--border-color-soft, #e5e6eb);position:sticky;top:76px;order:2;min-width:0;max-height:min(68vh,calc(100vh - 140px));overflow:auto}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:14px;font-weight:700;color:var(--text-heading, #1f2937)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:grid;gap:2px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]{position:relative;width:100%;min-height:30px;border:0;border-radius:0;background:transparent;color:var(--text-muted, #64748b);text-align:left;font-size:13px;line-height:1.45;padding:4px 8px 4px 10px;cursor:pointer;white-space:normal;word-break:break-word;overflow-wrap:anywhere}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover{background:transparent;color:var(--text-primary, #0f172a)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%]{color:var(--primary-500, #2563eb);font-weight:600}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%]:after{content:"";position:absolute;left:2px;top:7px;bottom:7px;width:2px;border-radius:999px;background:var(--primary-500, #2563eb)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]{padding-left:10px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h2, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h3, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h4, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h5, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h6{margin:1.2em 0 .6em;font-weight:600;line-height:1.4;word-break:break-word;overflow-wrap:anywhere}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h1{font-size:28px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h2{font-size:24px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h3{font-size:20px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h2, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h3, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h4, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h5, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h6{scroll-margin-top:88px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] p{margin:0 0 12px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] ul, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] ol{margin:0 0 12px;padding-left:24px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] li{margin:4px 0}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] blockquote{margin:0 0 12px;padding:8px 12px;color:#595959;border-left:4px solid #d9d9d9;background:#fafafa}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] pre{overflow:auto;padding:12px 14px;border-radius:8px;background:#f6f8fa;border:1px solid var(--border-color-soft, #e5e6eb)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] code{font-family:Consolas,Courier New,monospace}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] :not(pre)>code{padding:2px 6px;border-radius:6px;background:var(--bg-subtle, #f5f7fa);border:1px solid var(--border-color-soft, #e5e6eb);color:var(--text-primary, #262626);font-size:13px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] pre code{background:transparent;border:0;padding:0;color:inherit;font-size:13px;line-height:1.7}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] table{width:100%;margin:0 0 12px;border-collapse:collapse}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] th, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] td{padding:8px 10px;border:1px solid #e5e6eb;text-align:left}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] img{display:block;max-width:100%;width:auto;max-height:min(32vh,100px);margin:12px 0;border-radius:10px;object-fit:contain;border:1px solid var(--border-color-soft, #e5e6eb);background:var(--bg-elevated, #fff);cursor:zoom-in;box-shadow:0 4px 12px #0f172a14}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] a{color:#1677ff;text-decoration:none}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] a:hover{text-decoration:underline}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] pre, html[data-theme="dark"] [_nghost-%COMP%] pre{background:#0f172a;border-color:#94a3b83d}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] :not(pre)>code, html[data-theme="dark"] [_nghost-%COMP%] :not(pre)>code{background:#94a3b824;border-color:#94a3b83d;color:#e2e8f0}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%]{border-color:#94a3b83d;background:transparent}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%]{border-color:#94a3b847;background:#162033!important;box-shadow:0 14px 28px #02061773}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%]{border-color:#94a3b84d!important;background:#162033!important;color:#e2e8f0!important;box-shadow:0 10px 22px #0206176b}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%]{color:#e2e8f0}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]{color:#cbd5e1}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, html.dark [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover{color:#f1f5f9}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%]{color:#60a5fa}@media (max-width: 1024px){[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-layout.has-toc[_ngcontent-%COMP%]{grid-template-columns:1fr}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc[_ngcontent-%COMP%]{position:static;margin-bottom:12px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating[_ngcontent-%COMP%]{position:static;margin-bottom:8px;align-items:flex-start}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%]{width:100%;max-height:none}}'],changeDetection:0})};export{Wt as a,Kt as b,Oi as c,dt as d,un as e,$i as f,Un as g,Gn as h,qn as i,Wn as j,Zn as k,Yn as l,Kn as m,Xn as n,Jn as o,ei as p,gt as q,Ln as r,Oo as s,ko as t,ni as u,ii as v,oi as w,ht as x,Qi as y,Ui as z,Gi as A,qi as B,mt as C};
|