@skill-map/cli 0.58.0 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/cli/tutorial/sm-tutorial/SKILL.md +12 -5
  2. package/dist/cli/tutorial/sm-tutorial/references/fixtures.md +15 -4
  3. package/dist/cli/tutorial/sm-tutorial/references/part-cli.md +3 -3
  4. package/dist/cli/tutorial/sm-tutorial/references/part-connect-harness.md +19 -15
  5. package/dist/cli/tutorial/sm-tutorial/references/part-daily-loop.md +4 -2
  6. package/dist/cli/tutorial/sm-tutorial/references/part-fundamentals.md +59 -44
  7. package/dist/cli/tutorial/sm-tutorial/references/part-project-kickoff.md +18 -0
  8. package/dist/cli.js +169 -84
  9. package/dist/index.js +3 -3
  10. package/dist/kernel/index.d.ts +20 -0
  11. package/dist/kernel/index.js +3 -3
  12. package/dist/ui/chunk-4N3NRZEH.js +809 -0
  13. package/dist/ui/chunk-5SSKJ7AM.js +1 -0
  14. package/dist/ui/{chunk-WB7FKIBP.js → chunk-7VUEZZFJ.js} +1 -1
  15. package/dist/ui/{chunk-P2DAPRK7.js → chunk-7X3DZNG4.js} +1 -1
  16. package/dist/ui/chunk-AKKFFP7Y.js +1 -0
  17. package/dist/ui/{chunk-ZJCU4CXS.js → chunk-COXOWJFC.js} +2 -2
  18. package/dist/ui/{chunk-JA4Z74I3.js → chunk-FRUHVCND.js} +1 -1
  19. package/dist/ui/chunk-GDZRZU57.js +1843 -0
  20. package/dist/ui/{chunk-K2MAVAHG.js → chunk-GKQA75EF.js} +1 -1
  21. package/dist/ui/chunk-HQ6M2HXK.js +369 -0
  22. package/dist/ui/chunk-JRVAI7GI.js +2 -0
  23. package/dist/ui/chunk-JTCIY3SL.js +742 -0
  24. package/dist/ui/chunk-MBBJJEUX.js +917 -0
  25. package/dist/ui/{chunk-LCOYSPKE.js → chunk-MGWGV4VD.js} +1 -1
  26. package/dist/ui/chunk-N6MUHKWR.js +105 -0
  27. package/dist/ui/chunk-OGXBHDY4.js +1 -0
  28. package/dist/ui/{chunk-KHARMPTZ.js → chunk-OVVTCPBJ.js} +1 -1
  29. package/dist/ui/{chunk-UBQUCSQ4.js → chunk-Q4PXVDJA.js} +1 -1
  30. package/dist/ui/chunk-ZYPXVXYF.js +4 -0
  31. package/dist/ui/index.html +1 -1
  32. package/dist/ui/main-5MKN73KQ.js +4 -0
  33. package/package.json +2 -2
  34. package/dist/ui/chunk-DPLNM4UD.js +0 -2
  35. package/dist/ui/chunk-G3ZVF4TM.js +0 -1
  36. package/dist/ui/chunk-H6O2DYVT.js +0 -1110
  37. package/dist/ui/chunk-KJZQIUZA.js +0 -917
  38. package/dist/ui/chunk-Q2A6FWC7.js +0 -4
  39. package/dist/ui/chunk-QVNZN5F7.js +0 -1843
  40. package/dist/ui/chunk-SXXFDP6V.js +0 -1
  41. package/dist/ui/chunk-YHJL5LP3.js +0 -913
  42. package/dist/ui/main-KOFMNAVE.js +0 -4
@@ -1,1843 +0,0 @@
1
- import{a as Gn,b as jn,d as ov,e as rv,f as av,g as dv,h as uv,i as uo}from"./chunk-JA4Z74I3.js";import{A as wv,B as Tv,C as Sv,D as $n,I as kv,K as Iv,L as Ev,M as If,N as Ef,O as Mv,a as es,b as ro,c as z0,d as ao,e as H0,f as hr,g as Tf,h as q0,i as G0,j as j0,k as en,l as so,m as pv,n as rs,o as hv,p as fv,q as mv,r as _v,s as gv,t as vv,u as as,w as bv,x as yv,y as Cv,z as xv}from"./chunk-DPLNM4UD.js";import{f as Ka,i as Ya}from"./chunk-UBQUCSQ4.js";import{a as Un,b as sv,c as co,g as os,h as Ot}from"./chunk-WB7FKIBP.js";import"./chunk-P2DAPRK7.js";import{a as O0,b as F0,c as N0,d as A0,f as $0,h as W0,i as K0,j as Y0,k as is,l as X0,m as Z0,n as Q0,o as lo,p as J0,q as ev,s as tv,t as kf,u as nv,v as iv,w as lv,x as cv}from"./chunk-YHJL5LP3.js";import{B as Qa,C as Ja,D as be,E as L0,F as B0,G as pr,H as ye,I as V0,J as bn,K as Ue,L as Be,M as U0,N as ts,O as De,P as Sf,Q as ns,R as hn,S as yn,a as ut,c as xf,d as E0,e as wf,f as M0,g as io,j as Dt,k as ot,l as Zt,m as Qt,p as Za,q as P0,r as R0,s as Pt,t as Rt,u as bt,v as Jt,w as On,x as Ae,y as oo}from"./chunk-H6O2DYVT.js";import{f as Wa,g as x0,h as to,i as xi,j as no,k as un,l as Mt,p as Ht}from"./chunk-LCOYSPKE.js";import{B as Cf,Ca as D0,F as S0,H as k0,J as Xa,O as dr,T as I0,a as pn,b as sr,ba as ur,k as lr,l as bf,m as w0,n as T0,p as wi,t as vn,u as dt,w as yf,z as cr}from"./chunk-4SG4352Z.js";import{$ as vt,$a as D,$b as y0,Ab as Te,Bb as le,Cb as Ga,Db as ja,Ea as yi,Eb as Y,Ec as K,Fa as tr,Fb as Ze,Fc as Ie,Ga as Ha,Gb as L,Ha as l,Ib as d,J as Xi,Jb as cn,K as y,Kb as Ge,L as kt,Lb as Hn,Ma as Ji,Mb as eo,N as ve,Na as m0,Nb as ee,O as Zi,Ob as te,P as p,Pa as _0,Pb as _f,Qa as Rn,Qb as dn,Ra as qa,Rb as Vt,Sb as _t,T as f0,Tb as Oe,U as Pn,Ub as ae,V as w,Vb as zt,W as T,Wa as z,Wb as G,X,Xa as It,Xb as b,Y as Ba,Ya as qe,Yb as x,Z as ft,Za as Kt,Zb as Se,_ as Va,_a as Z,_b as b0,ac as nr,ba as re,bc as ir,ca as Wt,cc as or,d as Yi,dc as Yt,ec as xt,fc as Ee,g as I,ga as W,gc as Me,hc as Et,ia as de,ic as Pe,ja as Qi,jb as O,jc as qn,ka as U,kb as g0,kc as rr,la as Ye,lb as v0,lc as gf,mb as P,mc as Ua,n as h0,nb as R,nc as ar,ob as mf,oc as C0,pa as za,pb as Xe,pc as je,qb as ue,rb as pe,rc as Xt,sb as _,sc as k,t as La,tb as f,tc as et,ub as m,uc as V,vb as F,vc as nt,wb as Q,wc as $a,xb as ie,xc as vf,yb as oe,yc as Ci,zb as we}from"./chunk-Q2A6FWC7.js";import{a as me,b as Bt,c as Ki,e as v,g as WP}from"./chunk-WCABR6TI.js";var fC=v((Mfe,hC)=>{"use strict";function t8(){this.__data__=[],this.size=0}hC.exports=t8});var Vi=v((Dfe,mC)=>{"use strict";function n8(t,i){return t===i||t!==t&&i!==i}mC.exports=n8});var oa=v((Pfe,_C)=>{"use strict";var i8=Vi();function o8(t,i){for(var e=t.length;e--;)if(i8(t[e][0],i))return e;return-1}_C.exports=o8});var vC=v((Rfe,gC)=>{"use strict";var r8=oa(),a8=Array.prototype,s8=a8.splice;function l8(t){var i=this.__data__,e=r8(i,t);if(e<0)return!1;var n=i.length-1;return e==n?i.pop():s8.call(i,e,1),--this.size,!0}gC.exports=l8});var yC=v((Ofe,bC)=>{"use strict";var c8=oa();function d8(t){var i=this.__data__,e=c8(i,t);return e<0?void 0:i[e][1]}bC.exports=d8});var xC=v((Ffe,CC)=>{"use strict";var u8=oa();function p8(t){return u8(this.__data__,t)>-1}CC.exports=p8});var TC=v((Nfe,wC)=>{"use strict";var h8=oa();function f8(t,i){var e=this.__data__,n=h8(e,t);return n<0?(++this.size,e.push([t,i])):e[n][1]=i,this}wC.exports=f8});var ra=v((Afe,SC)=>{"use strict";var m8=fC(),_8=vC(),g8=yC(),v8=xC(),b8=TC();function Ao(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Ao.prototype.clear=m8;Ao.prototype.delete=_8;Ao.prototype.get=g8;Ao.prototype.has=v8;Ao.prototype.set=b8;SC.exports=Ao});var IC=v((Lfe,kC)=>{"use strict";var y8=ra();function C8(){this.__data__=new y8,this.size=0}kC.exports=C8});var MC=v((Bfe,EC)=>{"use strict";function x8(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}EC.exports=x8});var PC=v((Vfe,DC)=>{"use strict";function w8(t){return this.__data__.get(t)}DC.exports=w8});var OC=v((zfe,RC)=>{"use strict";function T8(t){return this.__data__.has(t)}RC.exports=T8});var w_=v((Hfe,FC)=>{"use strict";var S8=typeof global=="object"&&global&&global.Object===Object&&global;FC.exports=S8});var rn=v((qfe,NC)=>{"use strict";var k8=w_(),I8=typeof self=="object"&&self&&self.Object===Object&&self,E8=k8||I8||Function("return this")();NC.exports=E8});var zi=v((Gfe,AC)=>{"use strict";var M8=rn(),D8=M8.Symbol;AC.exports=D8});var zC=v((jfe,VC)=>{"use strict";var LC=zi(),BC=Object.prototype,P8=BC.hasOwnProperty,R8=BC.toString,aa=LC?LC.toStringTag:void 0;function O8(t){var i=P8.call(t,aa),e=t[aa];try{t[aa]=void 0;var n=!0}catch{}var o=R8.call(t);return n&&(i?t[aa]=e:delete t[aa]),o}VC.exports=O8});var qC=v((Ufe,HC)=>{"use strict";var F8=Object.prototype,N8=F8.toString;function A8(t){return N8.call(t)}HC.exports=A8});var ci=v(($fe,UC)=>{"use strict";var GC=zi(),L8=zC(),B8=qC(),V8="[object Null]",z8="[object Undefined]",jC=GC?GC.toStringTag:void 0;function H8(t){return t==null?t===void 0?z8:V8:jC&&jC in Object(t)?L8(t):B8(t)}UC.exports=H8});var Gt=v((Wfe,$C)=>{"use strict";function q8(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}$C.exports=q8});var Lo=v((Kfe,WC)=>{"use strict";var G8=ci(),j8=Gt(),U8="[object AsyncFunction]",$8="[object Function]",W8="[object GeneratorFunction]",K8="[object Proxy]";function Y8(t){if(!j8(t))return!1;var i=G8(t);return i==$8||i==W8||i==U8||i==K8}WC.exports=Y8});var YC=v((Yfe,KC)=>{"use strict";var X8=rn(),Z8=X8["__core-js_shared__"];KC.exports=Z8});var QC=v((Xfe,ZC)=>{"use strict";var T_=YC(),XC=(function(){var t=/[^.]+$/.exec(T_&&T_.keys&&T_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Q8(t){return!!XC&&XC in t}ZC.exports=Q8});var S_=v((Zfe,JC)=>{"use strict";var J8=Function.prototype,ez=J8.toString;function tz(t){if(t!=null){try{return ez.call(t)}catch{}try{return t+""}catch{}}return""}JC.exports=tz});var t1=v((Qfe,e1)=>{"use strict";var nz=Lo(),iz=QC(),oz=Gt(),rz=S_(),az=/[\\^$.*+?()[\]{}|]/g,sz=/^\[object .+?Constructor\]$/,lz=Function.prototype,cz=Object.prototype,dz=lz.toString,uz=cz.hasOwnProperty,pz=RegExp("^"+dz.call(uz).replace(az,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hz(t){if(!oz(t)||iz(t))return!1;var i=nz(t)?pz:sz;return i.test(rz(t))}e1.exports=hz});var i1=v((Jfe,n1)=>{"use strict";function fz(t,i){return t?.[i]}n1.exports=fz});var di=v((eme,o1)=>{"use strict";var mz=t1(),_z=i1();function gz(t,i){var e=_z(t,i);return mz(e)?e:void 0}o1.exports=gz});var xh=v((tme,r1)=>{"use strict";var vz=di(),bz=rn(),yz=vz(bz,"Map");r1.exports=yz});var sa=v((nme,a1)=>{"use strict";var Cz=di(),xz=Cz(Object,"create");a1.exports=xz});var c1=v((ime,l1)=>{"use strict";var s1=sa();function wz(){this.__data__=s1?s1(null):{},this.size=0}l1.exports=wz});var u1=v((ome,d1)=>{"use strict";function Tz(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}d1.exports=Tz});var h1=v((rme,p1)=>{"use strict";var Sz=sa(),kz="__lodash_hash_undefined__",Iz=Object.prototype,Ez=Iz.hasOwnProperty;function Mz(t){var i=this.__data__;if(Sz){var e=i[t];return e===kz?void 0:e}return Ez.call(i,t)?i[t]:void 0}p1.exports=Mz});var m1=v((ame,f1)=>{"use strict";var Dz=sa(),Pz=Object.prototype,Rz=Pz.hasOwnProperty;function Oz(t){var i=this.__data__;return Dz?i[t]!==void 0:Rz.call(i,t)}f1.exports=Oz});var g1=v((sme,_1)=>{"use strict";var Fz=sa(),Nz="__lodash_hash_undefined__";function Az(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Fz&&i===void 0?Nz:i,this}_1.exports=Az});var b1=v((lme,v1)=>{"use strict";var Lz=c1(),Bz=u1(),Vz=h1(),zz=m1(),Hz=g1();function Bo(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Bo.prototype.clear=Lz;Bo.prototype.delete=Bz;Bo.prototype.get=Vz;Bo.prototype.has=zz;Bo.prototype.set=Hz;v1.exports=Bo});var x1=v((cme,C1)=>{"use strict";var y1=b1(),qz=ra(),Gz=xh();function jz(){this.size=0,this.__data__={hash:new y1,map:new(Gz||qz),string:new y1}}C1.exports=jz});var T1=v((dme,w1)=>{"use strict";function Uz(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}w1.exports=Uz});var la=v((ume,S1)=>{"use strict";var $z=T1();function Wz(t,i){var e=t.__data__;return $z(i)?e[typeof i=="string"?"string":"hash"]:e.map}S1.exports=Wz});var I1=v((pme,k1)=>{"use strict";var Kz=la();function Yz(t){var i=Kz(this,t).delete(t);return this.size-=i?1:0,i}k1.exports=Yz});var M1=v((hme,E1)=>{"use strict";var Xz=la();function Zz(t){return Xz(this,t).get(t)}E1.exports=Zz});var P1=v((fme,D1)=>{"use strict";var Qz=la();function Jz(t){return Qz(this,t).has(t)}D1.exports=Jz});var O1=v((mme,R1)=>{"use strict";var eH=la();function tH(t,i){var e=eH(this,t),n=e.size;return e.set(t,i),this.size+=e.size==n?0:1,this}R1.exports=tH});var wh=v((_me,F1)=>{"use strict";var nH=x1(),iH=I1(),oH=M1(),rH=P1(),aH=O1();function Vo(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Vo.prototype.clear=nH;Vo.prototype.delete=iH;Vo.prototype.get=oH;Vo.prototype.has=rH;Vo.prototype.set=aH;F1.exports=Vo});var A1=v((gme,N1)=>{"use strict";var sH=ra(),lH=xh(),cH=wh(),dH=200;function uH(t,i){var e=this.__data__;if(e instanceof sH){var n=e.__data__;if(!lH||n.length<dH-1)return n.push([t,i]),this.size=++e.size,this;e=this.__data__=new cH(n)}return e.set(t,i),this.size=e.size,this}N1.exports=uH});var ca=v((vme,L1)=>{"use strict";var pH=ra(),hH=IC(),fH=MC(),mH=PC(),_H=OC(),gH=A1();function zo(t){var i=this.__data__=new pH(t);this.size=i.size}zo.prototype.clear=hH;zo.prototype.delete=fH;zo.prototype.get=mH;zo.prototype.has=_H;zo.prototype.set=gH;L1.exports=zo});var Th=v((bme,B1)=>{"use strict";function vH(t,i){for(var e=-1,n=t==null?0:t.length;++e<n&&i(t[e],e,t)!==!1;);return t}B1.exports=vH});var k_=v((yme,V1)=>{"use strict";var bH=di(),yH=(function(){try{var t=bH(Object,"defineProperty");return t({},"",{}),t}catch{}})();V1.exports=yH});var da=v((Cme,H1)=>{"use strict";var z1=k_();function CH(t,i,e){i=="__proto__"&&z1?z1(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}H1.exports=CH});var ua=v((xme,q1)=>{"use strict";var xH=da(),wH=Vi(),TH=Object.prototype,SH=TH.hasOwnProperty;function kH(t,i,e){var n=t[i];(!(SH.call(t,i)&&wH(n,e))||e===void 0&&!(i in t))&&xH(t,i,e)}q1.exports=kH});var Ho=v((wme,G1)=>{"use strict";var IH=ua(),EH=da();function MH(t,i,e,n){var o=!e;e||(e={});for(var r=-1,a=i.length;++r<a;){var s=i[r],c=n?n(e[s],t[s],s,e,t):void 0;c===void 0&&(c=t[s]),o?EH(e,s,c):IH(e,s,c)}return e}G1.exports=MH});var U1=v((Tme,j1)=>{"use strict";function DH(t,i){for(var e=-1,n=Array(t);++e<t;)n[e]=i(e);return n}j1.exports=DH});var gn=v((Sme,$1)=>{"use strict";function PH(t){return t!=null&&typeof t=="object"}$1.exports=PH});var K1=v((kme,W1)=>{"use strict";var RH=ci(),OH=gn(),FH="[object Arguments]";function NH(t){return OH(t)&&RH(t)==FH}W1.exports=NH});var qo=v((Ime,Z1)=>{"use strict";var Y1=K1(),AH=gn(),X1=Object.prototype,LH=X1.hasOwnProperty,BH=X1.propertyIsEnumerable,VH=Y1((function(){return arguments})())?Y1:function(t){return AH(t)&&LH.call(t,"callee")&&!BH.call(t,"callee")};Z1.exports=VH});var lt=v((Eme,Q1)=>{"use strict";var zH=Array.isArray;Q1.exports=zH});var ex=v((Mme,J1)=>{"use strict";function HH(){return!1}J1.exports=HH});var Hi=v((pa,Go)=>{"use strict";var qH=rn(),GH=ex(),ix=typeof pa=="object"&&pa&&!pa.nodeType&&pa,tx=ix&&typeof Go=="object"&&Go&&!Go.nodeType&&Go,jH=tx&&tx.exports===ix,nx=jH?qH.Buffer:void 0,UH=nx?nx.isBuffer:void 0,$H=UH||GH;Go.exports=$H});var ha=v((Dme,ox)=>{"use strict";var WH=9007199254740991,KH=/^(?:0|[1-9]\d*)$/;function YH(t,i){var e=typeof t;return i=i??WH,!!i&&(e=="number"||e!="symbol"&&KH.test(t))&&t>-1&&t%1==0&&t<i}ox.exports=YH});var Sh=v((Pme,rx)=>{"use strict";var XH=9007199254740991;function ZH(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=XH}rx.exports=ZH});var sx=v((Rme,ax)=>{"use strict";var QH=ci(),JH=Sh(),eq=gn(),tq="[object Arguments]",nq="[object Array]",iq="[object Boolean]",oq="[object Date]",rq="[object Error]",aq="[object Function]",sq="[object Map]",lq="[object Number]",cq="[object Object]",dq="[object RegExp]",uq="[object Set]",pq="[object String]",hq="[object WeakMap]",fq="[object ArrayBuffer]",mq="[object DataView]",_q="[object Float32Array]",gq="[object Float64Array]",vq="[object Int8Array]",bq="[object Int16Array]",yq="[object Int32Array]",Cq="[object Uint8Array]",xq="[object Uint8ClampedArray]",wq="[object Uint16Array]",Tq="[object Uint32Array]",Qe={};Qe[_q]=Qe[gq]=Qe[vq]=Qe[bq]=Qe[yq]=Qe[Cq]=Qe[xq]=Qe[wq]=Qe[Tq]=!0;Qe[tq]=Qe[nq]=Qe[fq]=Qe[iq]=Qe[mq]=Qe[oq]=Qe[rq]=Qe[aq]=Qe[sq]=Qe[lq]=Qe[cq]=Qe[dq]=Qe[uq]=Qe[pq]=Qe[hq]=!1;function Sq(t){return eq(t)&&JH(t.length)&&!!Qe[QH(t)]}ax.exports=Sq});var fa=v((Ome,lx)=>{"use strict";function kq(t){return function(i){return t(i)}}lx.exports=kq});var kh=v((ma,jo)=>{"use strict";var Iq=w_(),cx=typeof ma=="object"&&ma&&!ma.nodeType&&ma,_a=cx&&typeof jo=="object"&&jo&&!jo.nodeType&&jo,Eq=_a&&_a.exports===cx,I_=Eq&&Iq.process,Mq=(function(){try{var t=_a&&_a.require&&_a.require("util").types;return t||I_&&I_.binding&&I_.binding("util")}catch{}})();jo.exports=Mq});var Uo=v((Fme,px)=>{"use strict";var Dq=sx(),Pq=fa(),dx=kh(),ux=dx&&dx.isTypedArray,Rq=ux?Pq(ux):Dq;px.exports=Rq});var E_=v((Nme,hx)=>{"use strict";var Oq=U1(),Fq=qo(),Nq=lt(),Aq=Hi(),Lq=ha(),Bq=Uo(),Vq=Object.prototype,zq=Vq.hasOwnProperty;function Hq(t,i){var e=Nq(t),n=!e&&Fq(t),o=!e&&!n&&Aq(t),r=!e&&!n&&!o&&Bq(t),a=e||n||o||r,s=a?Oq(t.length,String):[],c=s.length;for(var u in t)(i||zq.call(t,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Lq(u,c)))&&s.push(u);return s}hx.exports=Hq});var ga=v((Ame,fx)=>{"use strict";var qq=Object.prototype;function Gq(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||qq;return t===e}fx.exports=Gq});var M_=v((Lme,mx)=>{"use strict";function jq(t,i){return function(e){return t(i(e))}}mx.exports=jq});var gx=v((Bme,_x)=>{"use strict";var Uq=M_(),$q=Uq(Object.keys,Object);_x.exports=$q});var Ih=v((Vme,vx)=>{"use strict";var Wq=ga(),Kq=gx(),Yq=Object.prototype,Xq=Yq.hasOwnProperty;function Zq(t){if(!Wq(t))return Kq(t);var i=[];for(var e in Object(t))Xq.call(t,e)&&e!="constructor"&&i.push(e);return i}vx.exports=Zq});var Sn=v((zme,bx)=>{"use strict";var Qq=Lo(),Jq=Sh();function eG(t){return t!=null&&Jq(t.length)&&!Qq(t)}bx.exports=eG});var An=v((Hme,yx)=>{"use strict";var tG=E_(),nG=Ih(),iG=Sn();function oG(t){return iG(t)?tG(t):nG(t)}yx.exports=oG});var xx=v((qme,Cx)=>{"use strict";var rG=Ho(),aG=An();function sG(t,i){return t&&rG(i,aG(i),t)}Cx.exports=sG});var Tx=v((Gme,wx)=>{"use strict";function lG(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}wx.exports=lG});var kx=v((jme,Sx)=>{"use strict";var cG=Gt(),dG=ga(),uG=Tx(),pG=Object.prototype,hG=pG.hasOwnProperty;function fG(t){if(!cG(t))return uG(t);var i=dG(t),e=[];for(var n in t)n=="constructor"&&(i||!hG.call(t,n))||e.push(n);return e}Sx.exports=fG});var ui=v((Ume,Ix)=>{"use strict";var mG=E_(),_G=kx(),gG=Sn();function vG(t){return gG(t)?mG(t,!0):_G(t)}Ix.exports=vG});var Mx=v(($me,Ex)=>{"use strict";var bG=Ho(),yG=ui();function CG(t,i){return t&&bG(i,yG(i),t)}Ex.exports=CG});var D_=v((va,$o)=>{"use strict";var xG=rn(),Ox=typeof va=="object"&&va&&!va.nodeType&&va,Dx=Ox&&typeof $o=="object"&&$o&&!$o.nodeType&&$o,wG=Dx&&Dx.exports===Ox,Px=wG?xG.Buffer:void 0,Rx=Px?Px.allocUnsafe:void 0;function TG(t,i){if(i)return t.slice();var e=t.length,n=Rx?Rx(e):new t.constructor(e);return t.copy(n),n}$o.exports=TG});var P_=v((Wme,Fx)=>{"use strict";function SG(t,i){var e=-1,n=t.length;for(i||(i=Array(n));++e<n;)i[e]=t[e];return i}Fx.exports=SG});var R_=v((Kme,Nx)=>{"use strict";function kG(t,i){for(var e=-1,n=t==null?0:t.length,o=0,r=[];++e<n;){var a=t[e];i(a,e,t)&&(r[o++]=a)}return r}Nx.exports=kG});var O_=v((Yme,Ax)=>{"use strict";function IG(){return[]}Ax.exports=IG});var Eh=v((Xme,Bx)=>{"use strict";var EG=R_(),MG=O_(),DG=Object.prototype,PG=DG.propertyIsEnumerable,Lx=Object.getOwnPropertySymbols,RG=Lx?function(t){return t==null?[]:(t=Object(t),EG(Lx(t),function(i){return PG.call(t,i)}))}:MG;Bx.exports=RG});var zx=v((Zme,Vx)=>{"use strict";var OG=Ho(),FG=Eh();function NG(t,i){return OG(t,FG(t),i)}Vx.exports=NG});var Mh=v((Qme,Hx)=>{"use strict";function AG(t,i){for(var e=-1,n=i.length,o=t.length;++e<n;)t[o+e]=i[e];return t}Hx.exports=AG});var ba=v((Jme,qx)=>{"use strict";var LG=M_(),BG=LG(Object.getPrototypeOf,Object);qx.exports=BG});var F_=v((e_e,Gx)=>{"use strict";var VG=Mh(),zG=ba(),HG=Eh(),qG=O_(),GG=Object.getOwnPropertySymbols,jG=GG?function(t){for(var i=[];t;)VG(i,HG(t)),t=zG(t);return i}:qG;Gx.exports=jG});var Ux=v((t_e,jx)=>{"use strict";var UG=Ho(),$G=F_();function WG(t,i){return UG(t,$G(t),i)}jx.exports=WG});var N_=v((n_e,$x)=>{"use strict";var KG=Mh(),YG=lt();function XG(t,i,e){var n=i(t);return YG(t)?n:KG(n,e(t))}$x.exports=XG});var A_=v((i_e,Wx)=>{"use strict";var ZG=N_(),QG=Eh(),JG=An();function ej(t){return ZG(t,JG,QG)}Wx.exports=ej});var Yx=v((o_e,Kx)=>{"use strict";var tj=N_(),nj=F_(),ij=ui();function oj(t){return tj(t,ij,nj)}Kx.exports=oj});var Zx=v((r_e,Xx)=>{"use strict";var rj=di(),aj=rn(),sj=rj(aj,"DataView");Xx.exports=sj});var Jx=v((a_e,Qx)=>{"use strict";var lj=di(),cj=rn(),dj=lj(cj,"Promise");Qx.exports=dj});var L_=v((s_e,ew)=>{"use strict";var uj=di(),pj=rn(),hj=uj(pj,"Set");ew.exports=hj});var nw=v((l_e,tw)=>{"use strict";var fj=di(),mj=rn(),_j=fj(mj,"WeakMap");tw.exports=_j});var Gi=v((c_e,cw)=>{"use strict";var B_=Zx(),V_=xh(),z_=Jx(),H_=L_(),q_=nw(),lw=ci(),Wo=S_(),iw="[object Map]",gj="[object Object]",ow="[object Promise]",rw="[object Set]",aw="[object WeakMap]",sw="[object DataView]",vj=Wo(B_),bj=Wo(V_),yj=Wo(z_),Cj=Wo(H_),xj=Wo(q_),qi=lw;(B_&&qi(new B_(new ArrayBuffer(1)))!=sw||V_&&qi(new V_)!=iw||z_&&qi(z_.resolve())!=ow||H_&&qi(new H_)!=rw||q_&&qi(new q_)!=aw)&&(qi=function(t){var i=lw(t),e=i==gj?t.constructor:void 0,n=e?Wo(e):"";if(n)switch(n){case vj:return sw;case bj:return iw;case yj:return ow;case Cj:return rw;case xj:return aw}return i});cw.exports=qi});var uw=v((d_e,dw)=>{"use strict";var wj=Object.prototype,Tj=wj.hasOwnProperty;function Sj(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Tj.call(t,"index")&&(e.index=t.index,e.input=t.input),e}dw.exports=Sj});var G_=v((u_e,pw)=>{"use strict";var kj=rn(),Ij=kj.Uint8Array;pw.exports=Ij});var Dh=v((p_e,fw)=>{"use strict";var hw=G_();function Ej(t){var i=new t.constructor(t.byteLength);return new hw(i).set(new hw(t)),i}fw.exports=Ej});var _w=v((h_e,mw)=>{"use strict";var Mj=Dh();function Dj(t,i){var e=i?Mj(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}mw.exports=Dj});var vw=v((f_e,gw)=>{"use strict";var Pj=/\w*$/;function Rj(t){var i=new t.constructor(t.source,Pj.exec(t));return i.lastIndex=t.lastIndex,i}gw.exports=Rj});var ww=v((m_e,xw)=>{"use strict";var bw=zi(),yw=bw?bw.prototype:void 0,Cw=yw?yw.valueOf:void 0;function Oj(t){return Cw?Object(Cw.call(t)):{}}xw.exports=Oj});var j_=v((__e,Tw)=>{"use strict";var Fj=Dh();function Nj(t,i){var e=i?Fj(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Tw.exports=Nj});var kw=v((g_e,Sw)=>{"use strict";var Aj=Dh(),Lj=_w(),Bj=vw(),Vj=ww(),zj=j_(),Hj="[object Boolean]",qj="[object Date]",Gj="[object Map]",jj="[object Number]",Uj="[object RegExp]",$j="[object Set]",Wj="[object String]",Kj="[object Symbol]",Yj="[object ArrayBuffer]",Xj="[object DataView]",Zj="[object Float32Array]",Qj="[object Float64Array]",Jj="[object Int8Array]",eU="[object Int16Array]",tU="[object Int32Array]",nU="[object Uint8Array]",iU="[object Uint8ClampedArray]",oU="[object Uint16Array]",rU="[object Uint32Array]";function aU(t,i,e){var n=t.constructor;switch(i){case Yj:return Aj(t);case Hj:case qj:return new n(+t);case Xj:return Lj(t,e);case Zj:case Qj:case Jj:case eU:case tU:case nU:case iU:case oU:case rU:return zj(t,e);case Gj:return new n;case jj:case Wj:return new n(t);case Uj:return Bj(t);case $j:return new n;case Kj:return Vj(t)}}Sw.exports=aU});var U_=v((v_e,Ew)=>{"use strict";var sU=Gt(),Iw=Object.create,lU=(function(){function t(){}return function(i){if(!sU(i))return{};if(Iw)return Iw(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}})();Ew.exports=lU});var $_=v((b_e,Mw)=>{"use strict";var cU=U_(),dU=ba(),uU=ga();function pU(t){return typeof t.constructor=="function"&&!uU(t)?cU(dU(t)):{}}Mw.exports=pU});var Pw=v((y_e,Dw)=>{"use strict";var hU=Gi(),fU=gn(),mU="[object Map]";function _U(t){return fU(t)&&hU(t)==mU}Dw.exports=_U});var Nw=v((C_e,Fw)=>{"use strict";var gU=Pw(),vU=fa(),Rw=kh(),Ow=Rw&&Rw.isMap,bU=Ow?vU(Ow):gU;Fw.exports=bU});var Lw=v((x_e,Aw)=>{"use strict";var yU=Gi(),CU=gn(),xU="[object Set]";function wU(t){return CU(t)&&yU(t)==xU}Aw.exports=wU});var Hw=v((w_e,zw)=>{"use strict";var TU=Lw(),SU=fa(),Bw=kh(),Vw=Bw&&Bw.isSet,kU=Vw?SU(Vw):TU;zw.exports=kU});var W_=v((T_e,Uw)=>{"use strict";var IU=ca(),EU=Th(),MU=ua(),DU=xx(),PU=Mx(),RU=D_(),OU=P_(),FU=zx(),NU=Ux(),AU=A_(),LU=Yx(),BU=Gi(),VU=uw(),zU=kw(),HU=$_(),qU=lt(),GU=Hi(),jU=Nw(),UU=Gt(),$U=Hw(),WU=An(),KU=ui(),YU=1,XU=2,ZU=4,qw="[object Arguments]",QU="[object Array]",JU="[object Boolean]",e$="[object Date]",t$="[object Error]",Gw="[object Function]",n$="[object GeneratorFunction]",i$="[object Map]",o$="[object Number]",jw="[object Object]",r$="[object RegExp]",a$="[object Set]",s$="[object String]",l$="[object Symbol]",c$="[object WeakMap]",d$="[object ArrayBuffer]",u$="[object DataView]",p$="[object Float32Array]",h$="[object Float64Array]",f$="[object Int8Array]",m$="[object Int16Array]",_$="[object Int32Array]",g$="[object Uint8Array]",v$="[object Uint8ClampedArray]",b$="[object Uint16Array]",y$="[object Uint32Array]",Ke={};Ke[qw]=Ke[QU]=Ke[d$]=Ke[u$]=Ke[JU]=Ke[e$]=Ke[p$]=Ke[h$]=Ke[f$]=Ke[m$]=Ke[_$]=Ke[i$]=Ke[o$]=Ke[jw]=Ke[r$]=Ke[a$]=Ke[s$]=Ke[l$]=Ke[g$]=Ke[v$]=Ke[b$]=Ke[y$]=!0;Ke[t$]=Ke[Gw]=Ke[c$]=!1;function Ph(t,i,e,n,o,r){var a,s=i&YU,c=i&XU,u=i&ZU;if(e&&(a=o?e(t,n,o,r):e(t)),a!==void 0)return a;if(!UU(t))return t;var h=qU(t);if(h){if(a=VU(t),!s)return OU(t,a)}else{var g=BU(t),C=g==Gw||g==n$;if(GU(t))return RU(t,s);if(g==jw||g==qw||C&&!o){if(a=c||C?{}:HU(t),!s)return c?NU(t,PU(a,t)):FU(t,DU(a,t))}else{if(!Ke[g])return o?t:{};a=zU(t,g,s)}}r||(r=new IU);var M=r.get(t);if(M)return M;r.set(t,a),$U(t)?t.forEach(function(q){a.add(Ph(q,i,e,q,t,r))}):jU(t)&&t.forEach(function(q,$){a.set($,Ph(q,i,e,$,t,r))});var S=u?c?LU:AU:c?KU:WU,N=h?void 0:S(t);return EU(N||t,function(q,$){N&&($=q,q=t[$]),MU(a,$,Ph(q,i,e,$,t,r))}),a}Uw.exports=Ph});var Ww=v((S_e,$w)=>{"use strict";var C$=W_(),x$=4;function w$(t){return C$(t,x$)}$w.exports=w$});var Rh=v((k_e,Kw)=>{"use strict";function T$(t){return function(){return t}}Kw.exports=T$});var Xw=v((I_e,Yw)=>{"use strict";function S$(t){return function(i,e,n){for(var o=-1,r=Object(i),a=n(i),s=a.length;s--;){var c=a[t?s:++o];if(e(r[c],c,r)===!1)break}return i}}Yw.exports=S$});var Oh=v((E_e,Zw)=>{"use strict";var k$=Xw(),I$=k$();Zw.exports=I$});var Fh=v((M_e,Qw)=>{"use strict";var E$=Oh(),M$=An();function D$(t,i){return t&&E$(t,i,M$)}Qw.exports=D$});var eT=v((D_e,Jw)=>{"use strict";var P$=Sn();function R$(t,i){return function(e,n){if(e==null)return e;if(!P$(e))return t(e,n);for(var o=e.length,r=i?o:-1,a=Object(e);(i?r--:++r<o)&&n(a[r],r,a)!==!1;);return e}}Jw.exports=R$});var ya=v((P_e,tT)=>{"use strict";var O$=Fh(),F$=eT(),N$=F$(O$);tT.exports=N$});var pi=v((R_e,nT)=>{"use strict";function A$(t){return t}nT.exports=A$});var K_=v((O_e,iT)=>{"use strict";var L$=pi();function B$(t){return typeof t=="function"?t:L$}iT.exports=B$});var Y_=v((F_e,oT)=>{"use strict";var V$=Th(),z$=ya(),H$=K_(),q$=lt();function G$(t,i){var e=q$(t)?V$:z$;return e(t,H$(i))}oT.exports=G$});var X_=v((N_e,rT)=>{"use strict";rT.exports=Y_()});var sT=v((A_e,aT)=>{"use strict";var j$=ya();function U$(t,i){var e=[];return j$(t,function(n,o,r){i(n,o,r)&&e.push(n)}),e}aT.exports=U$});var cT=v((L_e,lT)=>{"use strict";var $$="__lodash_hash_undefined__";function W$(t){return this.__data__.set(t,$$),this}lT.exports=W$});var uT=v((B_e,dT)=>{"use strict";function K$(t){return this.__data__.has(t)}dT.exports=K$});var Z_=v((V_e,pT)=>{"use strict";var Y$=wh(),X$=cT(),Z$=uT();function Nh(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new Y$;++i<e;)this.add(t[i])}Nh.prototype.add=Nh.prototype.push=X$;Nh.prototype.has=Z$;pT.exports=Nh});var fT=v((z_e,hT)=>{"use strict";function Q$(t,i){for(var e=-1,n=t==null?0:t.length;++e<n;)if(i(t[e],e,t))return!0;return!1}hT.exports=Q$});var Q_=v((H_e,mT)=>{"use strict";function J$(t,i){return t.has(i)}mT.exports=J$});var J_=v((q_e,_T)=>{"use strict";var eW=Z_(),tW=fT(),nW=Q_(),iW=1,oW=2;function rW(t,i,e,n,o,r){var a=e&iW,s=t.length,c=i.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),h=r.get(i);if(u&&h)return u==i&&h==t;var g=-1,C=!0,M=e&oW?new eW:void 0;for(r.set(t,i),r.set(i,t);++g<s;){var S=t[g],N=i[g];if(n)var q=a?n(N,S,g,i,t,r):n(S,N,g,t,i,r);if(q!==void 0){if(q)continue;C=!1;break}if(M){if(!tW(i,function($,J){if(!nW(M,J)&&(S===$||o(S,$,e,n,r)))return M.push(J)})){C=!1;break}}else if(!(S===N||o(S,N,e,n,r))){C=!1;break}}return r.delete(t),r.delete(i),C}_T.exports=rW});var vT=v((G_e,gT)=>{"use strict";function aW(t){var i=-1,e=Array(t.size);return t.forEach(function(n,o){e[++i]=[o,n]}),e}gT.exports=aW});var Ah=v((j_e,bT)=>{"use strict";function sW(t){var i=-1,e=Array(t.size);return t.forEach(function(n){e[++i]=n}),e}bT.exports=sW});var TT=v((U_e,wT)=>{"use strict";var yT=zi(),CT=G_(),lW=Vi(),cW=J_(),dW=vT(),uW=Ah(),pW=1,hW=2,fW="[object Boolean]",mW="[object Date]",_W="[object Error]",gW="[object Map]",vW="[object Number]",bW="[object RegExp]",yW="[object Set]",CW="[object String]",xW="[object Symbol]",wW="[object ArrayBuffer]",TW="[object DataView]",xT=yT?yT.prototype:void 0,eg=xT?xT.valueOf:void 0;function SW(t,i,e,n,o,r,a){switch(e){case TW:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case wW:return!(t.byteLength!=i.byteLength||!r(new CT(t),new CT(i)));case fW:case mW:case vW:return lW(+t,+i);case _W:return t.name==i.name&&t.message==i.message;case bW:case CW:return t==i+"";case gW:var s=dW;case yW:var c=n&pW;if(s||(s=uW),t.size!=i.size&&!c)return!1;var u=a.get(t);if(u)return u==i;n|=hW,a.set(t,i);var h=cW(s(t),s(i),n,o,r,a);return a.delete(t),h;case xW:if(eg)return eg.call(t)==eg.call(i)}return!1}wT.exports=SW});var IT=v(($_e,kT)=>{"use strict";var ST=A_(),kW=1,IW=Object.prototype,EW=IW.hasOwnProperty;function MW(t,i,e,n,o,r){var a=e&kW,s=ST(t),c=s.length,u=ST(i),h=u.length;if(c!=h&&!a)return!1;for(var g=c;g--;){var C=s[g];if(!(a?C in i:EW.call(i,C)))return!1}var M=r.get(t),S=r.get(i);if(M&&S)return M==i&&S==t;var N=!0;r.set(t,i),r.set(i,t);for(var q=a;++g<c;){C=s[g];var $=t[C],J=i[C];if(n)var ce=a?n(J,$,C,i,t,r):n($,J,C,t,i,r);if(!(ce===void 0?$===J||o($,J,e,n,r):ce)){N=!1;break}q||(q=C=="constructor")}if(N&&!q){var Re=t.constructor,xe=i.constructor;Re!=xe&&"constructor"in t&&"constructor"in i&&!(typeof Re=="function"&&Re instanceof Re&&typeof xe=="function"&&xe instanceof xe)&&(N=!1)}return r.delete(t),r.delete(i),N}kT.exports=MW});var NT=v((W_e,FT)=>{"use strict";var tg=ca(),DW=J_(),PW=TT(),RW=IT(),ET=Gi(),MT=lt(),DT=Hi(),OW=Uo(),FW=1,PT="[object Arguments]",RT="[object Array]",Lh="[object Object]",NW=Object.prototype,OT=NW.hasOwnProperty;function AW(t,i,e,n,o,r){var a=MT(t),s=MT(i),c=a?RT:ET(t),u=s?RT:ET(i);c=c==PT?Lh:c,u=u==PT?Lh:u;var h=c==Lh,g=u==Lh,C=c==u;if(C&&DT(t)){if(!DT(i))return!1;a=!0,h=!1}if(C&&!h)return r||(r=new tg),a||OW(t)?DW(t,i,e,n,o,r):PW(t,i,c,e,n,o,r);if(!(e&FW)){var M=h&&OT.call(t,"__wrapped__"),S=g&&OT.call(i,"__wrapped__");if(M||S){var N=M?t.value():t,q=S?i.value():i;return r||(r=new tg),o(N,q,e,n,r)}}return C?(r||(r=new tg),RW(t,i,e,n,o,r)):!1}FT.exports=AW});var ng=v((K_e,BT)=>{"use strict";var LW=NT(),AT=gn();function LT(t,i,e,n,o){return t===i?!0:t==null||i==null||!AT(t)&&!AT(i)?t!==t&&i!==i:LW(t,i,e,n,LT,o)}BT.exports=LT});var zT=v((Y_e,VT)=>{"use strict";var BW=ca(),VW=ng(),zW=1,HW=2;function qW(t,i,e,n){var o=e.length,r=o,a=!n;if(t==null)return!r;for(t=Object(t);o--;){var s=e[o];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<r;){s=e[o];var c=s[0],u=t[c],h=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var g=new BW;if(n)var C=n(u,h,c,t,i,g);if(!(C===void 0?VW(h,u,zW|HW,n,g):C))return!1}}return!0}VT.exports=qW});var ig=v((X_e,HT)=>{"use strict";var GW=Gt();function jW(t){return t===t&&!GW(t)}HT.exports=jW});var GT=v((Z_e,qT)=>{"use strict";var UW=ig(),$W=An();function WW(t){for(var i=$W(t),e=i.length;e--;){var n=i[e],o=t[n];i[e]=[n,o,UW(o)]}return i}qT.exports=WW});var og=v((Q_e,jT)=>{"use strict";function KW(t,i){return function(e){return e==null?!1:e[t]===i&&(i!==void 0||t in Object(e))}}jT.exports=KW});var $T=v((J_e,UT)=>{"use strict";var YW=zT(),XW=GT(),ZW=og();function QW(t){var i=XW(t);return i.length==1&&i[0][2]?ZW(i[0][0],i[0][1]):function(e){return e===t||YW(e,t,i)}}UT.exports=QW});var ji=v((ege,WT)=>{"use strict";var JW=ci(),eK=gn(),tK="[object Symbol]";function nK(t){return typeof t=="symbol"||eK(t)&&JW(t)==tK}WT.exports=nK});var Bh=v((tge,KT)=>{"use strict";var iK=lt(),oK=ji(),rK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aK=/^\w*$/;function sK(t,i){if(iK(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||oK(t)?!0:aK.test(t)||!rK.test(t)||i!=null&&t in Object(i)}KT.exports=sK});var ZT=v((nge,XT)=>{"use strict";var YT=wh(),lK="Expected a function";function rg(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError(lK);var e=function(){var n=arguments,o=i?i.apply(this,n):n[0],r=e.cache;if(r.has(o))return r.get(o);var a=t.apply(this,n);return e.cache=r.set(o,a)||r,a};return e.cache=new(rg.Cache||YT),e}rg.Cache=YT;XT.exports=rg});var JT=v((ige,QT)=>{"use strict";var cK=ZT(),dK=500;function uK(t){var i=cK(t,function(n){return e.size===dK&&e.clear(),n}),e=i.cache;return i}QT.exports=uK});var tS=v((oge,eS)=>{"use strict";var pK=JT(),hK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fK=/\\(\\)?/g,mK=pK(function(t){var i=[];return t.charCodeAt(0)===46&&i.push(""),t.replace(hK,function(e,n,o,r){i.push(o?r.replace(fK,"$1"):n||e)}),i});eS.exports=mK});var Ca=v((rge,nS)=>{"use strict";function _K(t,i){for(var e=-1,n=t==null?0:t.length,o=Array(n);++e<n;)o[e]=i(t[e],e,t);return o}nS.exports=_K});var lS=v((age,sS)=>{"use strict";var iS=zi(),gK=Ca(),vK=lt(),bK=ji(),yK=1/0,oS=iS?iS.prototype:void 0,rS=oS?oS.toString:void 0;function aS(t){if(typeof t=="string")return t;if(vK(t))return gK(t,aS)+"";if(bK(t))return rS?rS.call(t):"";var i=t+"";return i=="0"&&1/t==-yK?"-0":i}sS.exports=aS});var ag=v((sge,cS)=>{"use strict";var CK=lS();function xK(t){return t==null?"":CK(t)}cS.exports=xK});var xa=v((lge,dS)=>{"use strict";var wK=lt(),TK=Bh(),SK=tS(),kK=ag();function IK(t,i){return wK(t)?t:TK(t,i)?[t]:SK(kK(t))}dS.exports=IK});var Ko=v((cge,uS)=>{"use strict";var EK=ji(),MK=1/0;function DK(t){if(typeof t=="string"||EK(t))return t;var i=t+"";return i=="0"&&1/t==-MK?"-0":i}uS.exports=DK});var wa=v((dge,pS)=>{"use strict";var PK=xa(),RK=Ko();function OK(t,i){i=PK(i,t);for(var e=0,n=i.length;t!=null&&e<n;)t=t[RK(i[e++])];return e&&e==n?t:void 0}pS.exports=OK});var fS=v((uge,hS)=>{"use strict";var FK=wa();function NK(t,i,e){var n=t==null?void 0:FK(t,i);return n===void 0?e:n}hS.exports=NK});var _S=v((pge,mS)=>{"use strict";function AK(t,i){return t!=null&&i in Object(t)}mS.exports=AK});var sg=v((hge,gS)=>{"use strict";var LK=xa(),BK=qo(),VK=lt(),zK=ha(),HK=Sh(),qK=Ko();function GK(t,i,e){i=LK(i,t);for(var n=-1,o=i.length,r=!1;++n<o;){var a=qK(i[n]);if(!(r=t!=null&&e(t,a)))break;t=t[a]}return r||++n!=o?r:(o=t==null?0:t.length,!!o&&HK(o)&&zK(a,o)&&(VK(t)||BK(t)))}gS.exports=GK});var lg=v((fge,vS)=>{"use strict";var jK=_S(),UK=sg();function $K(t,i){return t!=null&&UK(t,i,jK)}vS.exports=$K});var yS=v((mge,bS)=>{"use strict";var WK=ng(),KK=fS(),YK=lg(),XK=Bh(),ZK=ig(),QK=og(),JK=Ko(),eY=1,tY=2;function nY(t,i){return XK(t)&&ZK(i)?QK(JK(t),i):function(e){var n=KK(e,t);return n===void 0&&n===i?YK(e,t):WK(i,n,eY|tY)}}bS.exports=nY});var cg=v((_ge,CS)=>{"use strict";function iY(t){return function(i){return i?.[t]}}CS.exports=iY});var wS=v((gge,xS)=>{"use strict";var oY=wa();function rY(t){return function(i){return oY(i,t)}}xS.exports=rY});var SS=v((vge,TS)=>{"use strict";var aY=cg(),sY=wS(),lY=Bh(),cY=Ko();function dY(t){return lY(t)?aY(cY(t)):sY(t)}TS.exports=dY});var kn=v((bge,kS)=>{"use strict";var uY=$T(),pY=yS(),hY=pi(),fY=lt(),mY=SS();function _Y(t){return typeof t=="function"?t:t==null?hY:typeof t=="object"?fY(t)?pY(t[0],t[1]):uY(t):mY(t)}kS.exports=_Y});var dg=v((yge,IS)=>{"use strict";var gY=R_(),vY=sT(),bY=kn(),yY=lt();function CY(t,i){var e=yY(t)?gY:vY;return e(t,bY(i,3))}IS.exports=CY});var MS=v((Cge,ES)=>{"use strict";var xY=Object.prototype,wY=xY.hasOwnProperty;function TY(t,i){return t!=null&&wY.call(t,i)}ES.exports=TY});var ug=v((xge,DS)=>{"use strict";var SY=MS(),kY=sg();function IY(t,i){return t!=null&&kY(t,i,SY)}DS.exports=IY});var RS=v((wge,PS)=>{"use strict";var EY=Ih(),MY=Gi(),DY=qo(),PY=lt(),RY=Sn(),OY=Hi(),FY=ga(),NY=Uo(),AY="[object Map]",LY="[object Set]",BY=Object.prototype,VY=BY.hasOwnProperty;function zY(t){if(t==null)return!0;if(RY(t)&&(PY(t)||typeof t=="string"||typeof t.splice=="function"||OY(t)||NY(t)||DY(t)))return!t.length;var i=MY(t);if(i==AY||i==LY)return!t.size;if(FY(t))return!EY(t).length;for(var e in t)if(VY.call(t,e))return!1;return!0}PS.exports=zY});var pg=v((Tge,OS)=>{"use strict";function HY(t){return t===void 0}OS.exports=HY});var hg=v((Sge,FS)=>{"use strict";var qY=ya(),GY=Sn();function jY(t,i){var e=-1,n=GY(t)?Array(t.length):[];return qY(t,function(o,r,a){n[++e]=i(o,r,a)}),n}FS.exports=jY});var fg=v((kge,NS)=>{"use strict";var UY=Ca(),$Y=kn(),WY=hg(),KY=lt();function YY(t,i){var e=KY(t)?UY:WY;return e(t,$Y(i,3))}NS.exports=YY});var LS=v((Ige,AS)=>{"use strict";function XY(t,i,e,n){var o=-1,r=t==null?0:t.length;for(n&&r&&(e=t[++o]);++o<r;)e=i(e,t[o],o,t);return e}AS.exports=XY});var VS=v((Ege,BS)=>{"use strict";function ZY(t,i,e,n,o){return o(t,function(r,a,s){e=n?(n=!1,r):i(e,r,a,s)}),e}BS.exports=ZY});var mg=v((Mge,zS)=>{"use strict";var QY=LS(),JY=ya(),eX=kn(),tX=VS(),nX=lt();function iX(t,i,e){var n=nX(t)?QY:tX,o=arguments.length<3;return n(t,eX(i,4),e,o,JY)}zS.exports=iX});var qS=v((Dge,HS)=>{"use strict";var oX=ci(),rX=lt(),aX=gn(),sX="[object String]";function lX(t){return typeof t=="string"||!rX(t)&&aX(t)&&oX(t)==sX}HS.exports=lX});var jS=v((Pge,GS)=>{"use strict";var cX=cg(),dX=cX("length");GS.exports=dX});var $S=v((Rge,US)=>{"use strict";var uX="\\ud800-\\udfff",pX="\\u0300-\\u036f",hX="\\ufe20-\\ufe2f",fX="\\u20d0-\\u20ff",mX=pX+hX+fX,_X="\\ufe0e\\ufe0f",gX="\\u200d",vX=RegExp("["+gX+uX+mX+_X+"]");function bX(t){return vX.test(t)}US.exports=bX});var t2=v((Oge,e2)=>{"use strict";var KS="\\ud800-\\udfff",yX="\\u0300-\\u036f",CX="\\ufe20-\\ufe2f",xX="\\u20d0-\\u20ff",wX=yX+CX+xX,TX="\\ufe0e\\ufe0f",SX="["+KS+"]",_g="["+wX+"]",gg="\\ud83c[\\udffb-\\udfff]",kX="(?:"+_g+"|"+gg+")",YS="[^"+KS+"]",XS="(?:\\ud83c[\\udde6-\\uddff]){2}",ZS="[\\ud800-\\udbff][\\udc00-\\udfff]",IX="\\u200d",QS=kX+"?",JS="["+TX+"]?",EX="(?:"+IX+"(?:"+[YS,XS,ZS].join("|")+")"+JS+QS+")*",MX=JS+QS+EX,DX="(?:"+[YS+_g+"?",_g,XS,ZS,SX].join("|")+")",WS=RegExp(gg+"(?="+gg+")|"+DX+MX,"g");function PX(t){for(var i=WS.lastIndex=0;WS.test(t);)++i;return i}e2.exports=PX});var i2=v((Fge,n2)=>{"use strict";var RX=jS(),OX=$S(),FX=t2();function NX(t){return OX(t)?FX(t):RX(t)}n2.exports=NX});var r2=v((Nge,o2)=>{"use strict";var AX=Ih(),LX=Gi(),BX=Sn(),VX=qS(),zX=i2(),HX="[object Map]",qX="[object Set]";function GX(t){if(t==null)return 0;if(BX(t))return VX(t)?zX(t):t.length;var i=LX(t);return i==HX||i==qX?t.size:AX(t).length}o2.exports=GX});var s2=v((Age,a2)=>{"use strict";var jX=Th(),UX=U_(),$X=Fh(),WX=kn(),KX=ba(),YX=lt(),XX=Hi(),ZX=Lo(),QX=Gt(),JX=Uo();function eZ(t,i,e){var n=YX(t),o=n||XX(t)||JX(t);if(i=WX(i,4),e==null){var r=t&&t.constructor;o?e=n?new r:[]:QX(t)?e=ZX(r)?UX(KX(t)):{}:e={}}return(o?jX:$X)(t,function(a,s,c){return i(e,a,s,c)}),e}a2.exports=eZ});var u2=v((Lge,d2)=>{"use strict";var l2=zi(),tZ=qo(),nZ=lt(),c2=l2?l2.isConcatSpreadable:void 0;function iZ(t){return nZ(t)||tZ(t)||!!(c2&&t&&t[c2])}d2.exports=iZ});var Vh=v((Bge,h2)=>{"use strict";var oZ=Mh(),rZ=u2();function p2(t,i,e,n,o){var r=-1,a=t.length;for(e||(e=rZ),o||(o=[]);++r<a;){var s=t[r];i>0&&e(s)?i>1?p2(s,i-1,e,n,o):oZ(o,s):n||(o[o.length]=s)}return o}h2.exports=p2});var m2=v((Vge,f2)=>{"use strict";function aZ(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}f2.exports=aZ});var vg=v((zge,g2)=>{"use strict";var sZ=m2(),_2=Math.max;function lZ(t,i,e){return i=_2(i===void 0?t.length-1:i,0),function(){for(var n=arguments,o=-1,r=_2(n.length-i,0),a=Array(r);++o<r;)a[o]=n[i+o];o=-1;for(var s=Array(i+1);++o<i;)s[o]=n[o];return s[i]=e(a),sZ(t,this,s)}}g2.exports=lZ});var y2=v((Hge,b2)=>{"use strict";var cZ=Rh(),v2=k_(),dZ=pi(),uZ=v2?function(t,i){return v2(t,"toString",{configurable:!0,enumerable:!1,value:cZ(i),writable:!0})}:dZ;b2.exports=uZ});var x2=v((qge,C2)=>{"use strict";var pZ=800,hZ=16,fZ=Date.now;function mZ(t){var i=0,e=0;return function(){var n=fZ(),o=hZ-(n-e);if(e=n,o>0){if(++i>=pZ)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}C2.exports=mZ});var bg=v((Gge,w2)=>{"use strict";var _Z=y2(),gZ=x2(),vZ=gZ(_Z);w2.exports=vZ});var Ta=v((jge,T2)=>{"use strict";var bZ=pi(),yZ=vg(),CZ=bg();function xZ(t,i){return CZ(yZ(t,i,bZ),t+"")}T2.exports=xZ});var yg=v((Uge,S2)=>{"use strict";function wZ(t,i,e,n){for(var o=t.length,r=e+(n?1:-1);n?r--:++r<o;)if(i(t[r],r,t))return r;return-1}S2.exports=wZ});var I2=v(($ge,k2)=>{"use strict";function TZ(t){return t!==t}k2.exports=TZ});var M2=v((Wge,E2)=>{"use strict";function SZ(t,i,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===i)return n;return-1}E2.exports=SZ});var P2=v((Kge,D2)=>{"use strict";var kZ=yg(),IZ=I2(),EZ=M2();function MZ(t,i,e){return i===i?EZ(t,i,e):kZ(t,IZ,e)}D2.exports=MZ});var O2=v((Yge,R2)=>{"use strict";var DZ=P2();function PZ(t,i){var e=t==null?0:t.length;return!!e&&DZ(t,i,0)>-1}R2.exports=PZ});var N2=v((Xge,F2)=>{"use strict";function RZ(t,i,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(i,t[n]))return!0;return!1}F2.exports=RZ});var L2=v((Zge,A2)=>{"use strict";function OZ(){}A2.exports=OZ});var V2=v((Qge,B2)=>{"use strict";var Cg=L_(),FZ=L2(),NZ=Ah(),AZ=1/0,LZ=Cg&&1/NZ(new Cg([,-0]))[1]==AZ?function(t){return new Cg(t)}:FZ;B2.exports=LZ});var H2=v((Jge,z2)=>{"use strict";var BZ=Z_(),VZ=O2(),zZ=N2(),HZ=Q_(),qZ=V2(),GZ=Ah(),jZ=200;function UZ(t,i,e){var n=-1,o=VZ,r=t.length,a=!0,s=[],c=s;if(e)a=!1,o=zZ;else if(r>=jZ){var u=i?null:qZ(t);if(u)return GZ(u);a=!1,o=HZ,c=new BZ}else c=i?[]:s;e:for(;++n<r;){var h=t[n],g=i?i(h):h;if(h=e||h!==0?h:0,a&&g===g){for(var C=c.length;C--;)if(c[C]===g)continue e;i&&c.push(g),s.push(h)}else o(c,g,e)||(c!==s&&c.push(g),s.push(h))}return s}z2.exports=UZ});var xg=v((e0e,q2)=>{"use strict";var $Z=Sn(),WZ=gn();function KZ(t){return WZ(t)&&$Z(t)}q2.exports=KZ});var j2=v((t0e,G2)=>{"use strict";var YZ=Vh(),XZ=Ta(),ZZ=H2(),QZ=xg(),JZ=XZ(function(t){return ZZ(YZ(t,1,QZ,!0))});G2.exports=JZ});var $2=v((n0e,U2)=>{"use strict";var eQ=Ca();function tQ(t,i){return eQ(i,function(e){return t[e]})}U2.exports=tQ});var wg=v((i0e,W2)=>{"use strict";var nQ=$2(),iQ=An();function oQ(t){return t==null?[]:nQ(t,iQ(t))}W2.exports=oQ});var jt=v((o0e,K2)=>{"use strict";var zh;if(typeof Ki=="function")try{zh={clone:Ww(),constant:Rh(),each:X_(),filter:dg(),has:ug(),isArray:lt(),isEmpty:RS(),isFunction:Lo(),isUndefined:pg(),keys:An(),map:fg(),reduce:mg(),size:r2(),transform:s2(),union:j2(),values:wg()}}catch{}zh||(zh=window._);K2.exports=zh});var Hh=v((a0e,Q2)=>{"use strict";var _e=jt();Q2.exports=ke;var rQ="\0",Ui="\0",Y2="";function ke(t){this._isDirected=_e.has(t,"directed")?t.directed:!0,this._isMultigraph=_e.has(t,"multigraph")?t.multigraph:!1,this._isCompound=_e.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=_e.constant(void 0),this._defaultEdgeLabelFn=_e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ui]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}ke.prototype._nodeCount=0;ke.prototype._edgeCount=0;ke.prototype.isDirected=function(){return this._isDirected};ke.prototype.isMultigraph=function(){return this._isMultigraph};ke.prototype.isCompound=function(){return this._isCompound};ke.prototype.setGraph=function(t){return this._label=t,this};ke.prototype.graph=function(){return this._label};ke.prototype.setDefaultNodeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultNodeLabelFn=t,this};ke.prototype.nodeCount=function(){return this._nodeCount};ke.prototype.nodes=function(){return _e.keys(this._nodes)};ke.prototype.sources=function(){var t=this;return _e.filter(this.nodes(),function(i){return _e.isEmpty(t._in[i])})};ke.prototype.sinks=function(){var t=this;return _e.filter(this.nodes(),function(i){return _e.isEmpty(t._out[i])})};ke.prototype.setNodes=function(t,i){var e=arguments,n=this;return _e.each(t,function(o){e.length>1?n.setNode(o,i):n.setNode(o)}),this};ke.prototype.setNode=function(t,i){return _e.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=i),this):(this._nodes[t]=arguments.length>1?i:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Ui,this._children[t]={},this._children[Ui][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};ke.prototype.node=function(t){return this._nodes[t]};ke.prototype.hasNode=function(t){return _e.has(this._nodes,t)};ke.prototype.removeNode=function(t){var i=this;if(_e.has(this._nodes,t)){var e=function(n){i.removeEdge(i._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],_e.each(this.children(t),function(n){i.setParent(n)}),delete this._children[t]),_e.each(_e.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],_e.each(_e.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};ke.prototype.setParent=function(t,i){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_e.isUndefined(i))i=Ui;else{i+="";for(var e=i;!_e.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+i+" as parent of "+t+" would create a cycle");this.setNode(i)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=i,this._children[i][t]=!0,this};ke.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};ke.prototype.parent=function(t){if(this._isCompound){var i=this._parent[t];if(i!==Ui)return i}};ke.prototype.children=function(t){if(_e.isUndefined(t)&&(t=Ui),this._isCompound){var i=this._children[t];if(i)return _e.keys(i)}else{if(t===Ui)return this.nodes();if(this.hasNode(t))return[]}};ke.prototype.predecessors=function(t){var i=this._preds[t];if(i)return _e.keys(i)};ke.prototype.successors=function(t){var i=this._sucs[t];if(i)return _e.keys(i)};ke.prototype.neighbors=function(t){var i=this.predecessors(t);if(i)return _e.union(i,this.successors(t))};ke.prototype.isLeaf=function(t){var i;return this.isDirected()?i=this.successors(t):i=this.neighbors(t),i.length===0};ke.prototype.filterNodes=function(t){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});i.setGraph(this.graph());var e=this;_e.each(this._nodes,function(r,a){t(a)&&i.setNode(a,r)}),_e.each(this._edgeObjs,function(r){i.hasNode(r.v)&&i.hasNode(r.w)&&i.setEdge(r,e.edge(r))});var n={};function o(r){var a=e.parent(r);return a===void 0||i.hasNode(a)?(n[r]=a,a):a in n?n[a]:o(a)}return this._isCompound&&_e.each(i.nodes(),function(r){i.setParent(r,o(r))}),i};ke.prototype.setDefaultEdgeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultEdgeLabelFn=t,this};ke.prototype.edgeCount=function(){return this._edgeCount};ke.prototype.edges=function(){return _e.values(this._edgeObjs)};ke.prototype.setPath=function(t,i){var e=this,n=arguments;return _e.reduce(t,function(o,r){return n.length>1?e.setEdge(o,r,i):e.setEdge(o,r),r}),this};ke.prototype.setEdge=function(){var t,i,e,n,o=!1,r=arguments[0];typeof r=="object"&&r!==null&&"v"in r?(t=r.v,i=r.w,e=r.name,arguments.length===2&&(n=arguments[1],o=!0)):(t=r,i=arguments[1],e=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),t=""+t,i=""+i,_e.isUndefined(e)||(e=""+e);var a=Sa(this._isDirected,t,i,e);if(_e.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!_e.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(i),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(t,i,e);var s=aQ(this._isDirected,t,i,e);return t=s.v,i=s.w,Object.freeze(s),this._edgeObjs[a]=s,X2(this._preds[i],t),X2(this._sucs[t],i),this._in[i][a]=s,this._out[t][a]=s,this._edgeCount++,this};ke.prototype.edge=function(t,i,e){var n=arguments.length===1?Tg(this._isDirected,arguments[0]):Sa(this._isDirected,t,i,e);return this._edgeLabels[n]};ke.prototype.hasEdge=function(t,i,e){var n=arguments.length===1?Tg(this._isDirected,arguments[0]):Sa(this._isDirected,t,i,e);return _e.has(this._edgeLabels,n)};ke.prototype.removeEdge=function(t,i,e){var n=arguments.length===1?Tg(this._isDirected,arguments[0]):Sa(this._isDirected,t,i,e),o=this._edgeObjs[n];return o&&(t=o.v,i=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Z2(this._preds[i],t),Z2(this._sucs[t],i),delete this._in[i][n],delete this._out[t][n],this._edgeCount--),this};ke.prototype.inEdges=function(t,i){var e=this._in[t];if(e){var n=_e.values(e);return i?_e.filter(n,function(o){return o.v===i}):n}};ke.prototype.outEdges=function(t,i){var e=this._out[t];if(e){var n=_e.values(e);return i?_e.filter(n,function(o){return o.w===i}):n}};ke.prototype.nodeEdges=function(t,i){var e=this.inEdges(t,i);if(e)return e.concat(this.outEdges(t,i))};function X2(t,i){t[i]?t[i]++:t[i]=1}function Z2(t,i){--t[i]||delete t[i]}function Sa(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}return o+Y2+r+Y2+(_e.isUndefined(n)?rQ:n)}function aQ(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}var s={v:o,w:r};return n&&(s.name=n),s}function Tg(t,i){return Sa(t,i.v,i.w,i.name)}});var ek=v((s0e,J2)=>{"use strict";J2.exports="2.1.8"});var nk=v((l0e,tk)=>{"use strict";tk.exports={Graph:Hh(),version:ek()}});var ok=v((c0e,ik)=>{"use strict";var In=jt(),sQ=Hh();ik.exports={write:lQ,read:uQ};function lQ(t){var i={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:cQ(t),edges:dQ(t)};return In.isUndefined(t.graph())||(i.value=In.clone(t.graph())),i}function cQ(t){return In.map(t.nodes(),function(i){var e=t.node(i),n=t.parent(i),o={v:i};return In.isUndefined(e)||(o.value=e),In.isUndefined(n)||(o.parent=n),o})}function dQ(t){return In.map(t.edges(),function(i){var e=t.edge(i),n={v:i.v,w:i.w};return In.isUndefined(i.name)||(n.name=i.name),In.isUndefined(e)||(n.value=e),n})}function uQ(t){var i=new sQ(t.options).setGraph(t.value);return In.each(t.nodes,function(e){i.setNode(e.v,e.value),e.parent&&i.setParent(e.v,e.parent)}),In.each(t.edges,function(e){i.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),i}});var ak=v((d0e,rk)=>{"use strict";var qh=jt();rk.exports=pQ;function pQ(t){var i={},e=[],n;function o(r){qh.has(i,r)||(i[r]=!0,n.push(r),qh.each(t.successors(r),o),qh.each(t.predecessors(r),o))}return qh.each(t.nodes(),function(r){n=[],o(r),n.length&&e.push(n)}),e}});var Sg=v((u0e,lk)=>{"use strict";var sk=jt();lk.exports=an;function an(){this._arr=[],this._keyIndices={}}an.prototype.size=function(){return this._arr.length};an.prototype.keys=function(){return this._arr.map(function(t){return t.key})};an.prototype.has=function(t){return sk.has(this._keyIndices,t)};an.prototype.priority=function(t){var i=this._keyIndices[t];if(i!==void 0)return this._arr[i].priority};an.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};an.prototype.add=function(t,i){var e=this._keyIndices;if(t=String(t),!sk.has(e,t)){var n=this._arr,o=n.length;return e[t]=o,n.push({key:t,priority:i}),this._decrease(o),!0}return!1};an.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key};an.prototype.decrease=function(t,i){var e=this._keyIndices[t];if(i>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+i);this._arr[e].priority=i,this._decrease(e)};an.prototype._heapify=function(t){var i=this._arr,e=2*t,n=e+1,o=t;e<i.length&&(o=i[e].priority<i[o].priority?e:o,n<i.length&&(o=i[n].priority<i[o].priority?n:o),o!==t&&(this._swap(t,o),this._heapify(o)))};an.prototype._decrease=function(t){for(var i=this._arr,e=i[t].priority,n;t!==0&&(n=t>>1,!(i[n].priority<e));)this._swap(t,n),t=n};an.prototype._swap=function(t,i){var e=this._arr,n=this._keyIndices,o=e[t],r=e[i];e[t]=r,e[i]=o,n[r.key]=t,n[o.key]=i}});var kg=v((p0e,ck)=>{"use strict";var hQ=jt(),fQ=Sg();ck.exports=_Q;var mQ=hQ.constant(1);function _Q(t,i,e,n){return gQ(t,String(i),e||mQ,n||function(o){return t.outEdges(o)})}function gQ(t,i,e,n){var o={},r=new fQ,a,s,c=function(u){var h=u.v!==a?u.v:u.w,g=o[h],C=e(u),M=s.distance+C;if(C<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+C);M<g.distance&&(g.distance=M,g.predecessor=a,r.decrease(h,M))};for(t.nodes().forEach(function(u){var h=u===i?0:Number.POSITIVE_INFINITY;o[u]={distance:h},r.add(u,h)});r.size()>0&&(a=r.removeMin(),s=o[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return o}});var uk=v((h0e,dk)=>{"use strict";var vQ=kg(),bQ=jt();dk.exports=yQ;function yQ(t,i,e){return bQ.transform(t.nodes(),function(n,o){n[o]=vQ(t,o,i,e)},{})}});var Ig=v((f0e,hk)=>{"use strict";var pk=jt();hk.exports=CQ;function CQ(t){var i=0,e=[],n={},o=[];function r(a){var s=n[a]={onStack:!0,lowlink:i,index:i++};if(e.push(a),t.successors(a).forEach(function(h){pk.has(n,h)?n[h].onStack&&(s.lowlink=Math.min(s.lowlink,n[h].index)):(r(h),s.lowlink=Math.min(s.lowlink,n[h].lowlink))}),s.lowlink===s.index){var c=[],u;do u=e.pop(),n[u].onStack=!1,c.push(u);while(a!==u);o.push(c)}}return t.nodes().forEach(function(a){pk.has(n,a)||r(a)}),o}});var mk=v((m0e,fk)=>{"use strict";var xQ=jt(),wQ=Ig();fk.exports=TQ;function TQ(t){return xQ.filter(wQ(t),function(i){return i.length>1||i.length===1&&t.hasEdge(i[0],i[0])})}});var gk=v((_0e,_k)=>{"use strict";var SQ=jt();_k.exports=IQ;var kQ=SQ.constant(1);function IQ(t,i,e){return EQ(t,i||kQ,e||function(n){return t.outEdges(n)})}function EQ(t,i,e){var n={},o=t.nodes();return o.forEach(function(r){n[r]={},n[r][r]={distance:0},o.forEach(function(a){r!==a&&(n[r][a]={distance:Number.POSITIVE_INFINITY})}),e(r).forEach(function(a){var s=a.v===r?a.w:a.v,c=i(a);n[r][s]={distance:c,predecessor:r}})}),o.forEach(function(r){var a=n[r];o.forEach(function(s){var c=n[s];o.forEach(function(u){var h=c[r],g=a[u],C=c[u],M=h.distance+g.distance;M<C.distance&&(C.distance=M,C.predecessor=g.predecessor)})})}),n}});var Eg=v((g0e,bk)=>{"use strict";var ka=jt();bk.exports=vk;vk.CycleException=Gh;function vk(t){var i={},e={},n=[];function o(r){if(ka.has(e,r))throw new Gh;ka.has(i,r)||(e[r]=!0,i[r]=!0,ka.each(t.predecessors(r),o),delete e[r],n.push(r))}if(ka.each(t.sinks(),o),ka.size(i)!==t.nodeCount())throw new Gh;return n}function Gh(){}Gh.prototype=new Error});var xk=v((v0e,Ck)=>{"use strict";var yk=Eg();Ck.exports=MQ;function MQ(t){try{yk(t)}catch(i){if(i instanceof yk.CycleException)return!1;throw i}return!0}});var Mg=v((b0e,Tk)=>{"use strict";var jh=jt();Tk.exports=DQ;function DQ(t,i,e){jh.isArray(i)||(i=[i]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],r={};return jh.each(i,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);wk(t,a,e==="post",r,n,o)}),o}function wk(t,i,e,n,o,r){jh.has(n,i)||(n[i]=!0,e||r.push(i),jh.each(o(i),function(a){wk(t,a,e,n,o,r)}),e&&r.push(i))}});var kk=v((y0e,Sk)=>{"use strict";var PQ=Mg();Sk.exports=RQ;function RQ(t,i){return PQ(t,i,"post")}});var Ek=v((C0e,Ik)=>{"use strict";var OQ=Mg();Ik.exports=FQ;function FQ(t,i){return OQ(t,i,"pre")}});var Pk=v((x0e,Dk)=>{"use strict";var Mk=jt(),NQ=Hh(),AQ=Sg();Dk.exports=LQ;function LQ(t,i){var e=new NQ,n={},o=new AQ,r;function a(c){var u=c.v===r?c.w:c.v,h=o.priority(u);if(h!==void 0){var g=i(c);g<h&&(n[u]=r,o.decrease(u,g))}}if(t.nodeCount()===0)return e;Mk.each(t.nodes(),function(c){o.add(c,Number.POSITIVE_INFINITY),e.setNode(c)}),o.decrease(t.nodes()[0],0);for(var s=!1;o.size()>0;){if(r=o.removeMin(),Mk.has(n,r))e.setEdge(r,n[r]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(r).forEach(a)}return e}});var Ok=v((w0e,Rk)=>{"use strict";Rk.exports={components:ak(),dijkstra:kg(),dijkstraAll:uk(),findCycles:mk(),floydWarshall:gk(),isAcyclic:xk(),postorder:kk(),preorder:Ek(),prim:Pk(),tarjan:Ig(),topsort:Eg()}});var Ak=v((T0e,Nk)=>{"use strict";var Fk=nk();Nk.exports={Graph:Fk.Graph,json:ok(),alg:Ok(),version:Fk.version}});var sn=v((S0e,Lk)=>{"use strict";var Uh;if(typeof Ki=="function")try{Uh=Ak()}catch{}Uh||(Uh=window.graphlib);Lk.exports=Uh});var Vk=v((I0e,Bk)=>{"use strict";var BQ=W_(),VQ=1,zQ=4;function HQ(t){return BQ(t,VQ|zQ)}Bk.exports=HQ});var Ia=v((E0e,zk)=>{"use strict";var qQ=Vi(),GQ=Sn(),jQ=ha(),UQ=Gt();function $Q(t,i,e){if(!UQ(e))return!1;var n=typeof i;return(n=="number"?GQ(e)&&jQ(i,e.length):n=="string"&&i in e)?qQ(e[i],t):!1}zk.exports=$Q});var Gk=v((M0e,qk)=>{"use strict";var WQ=Ta(),KQ=Vi(),YQ=Ia(),XQ=ui(),Hk=Object.prototype,ZQ=Hk.hasOwnProperty,QQ=WQ(function(t,i){t=Object(t);var e=-1,n=i.length,o=n>2?i[2]:void 0;for(o&&YQ(i[0],i[1],o)&&(n=1);++e<n;)for(var r=i[e],a=XQ(r),s=-1,c=a.length;++s<c;){var u=a[s],h=t[u];(h===void 0||KQ(h,Hk[u])&&!ZQ.call(t,u))&&(t[u]=r[u])}return t});qk.exports=QQ});var Uk=v((D0e,jk)=>{"use strict";var JQ=kn(),eJ=Sn(),tJ=An();function nJ(t){return function(i,e,n){var o=Object(i);if(!eJ(i)){var r=JQ(e,3);i=tJ(i),e=function(s){return r(o[s],s,o)}}var a=t(i,e,n);return a>-1?o[r?i[a]:a]:void 0}}jk.exports=nJ});var Wk=v((P0e,$k)=>{"use strict";var iJ=/\s/;function oJ(t){for(var i=t.length;i--&&iJ.test(t.charAt(i)););return i}$k.exports=oJ});var Yk=v((R0e,Kk)=>{"use strict";var rJ=Wk(),aJ=/^\s+/;function sJ(t){return t&&t.slice(0,rJ(t)+1).replace(aJ,"")}Kk.exports=sJ});var Jk=v((O0e,Qk)=>{"use strict";var lJ=Yk(),Xk=Gt(),cJ=ji(),Zk=NaN,dJ=/^[-+]0x[0-9a-f]+$/i,uJ=/^0b[01]+$/i,pJ=/^0o[0-7]+$/i,hJ=parseInt;function fJ(t){if(typeof t=="number")return t;if(cJ(t))return Zk;if(Xk(t)){var i=typeof t.valueOf=="function"?t.valueOf():t;t=Xk(i)?i+"":i}if(typeof t!="string")return t===0?t:+t;t=lJ(t);var e=uJ.test(t);return e||pJ.test(t)?hJ(t.slice(2),e?2:8):dJ.test(t)?Zk:+t}Qk.exports=fJ});var Dg=v((F0e,tI)=>{"use strict";var mJ=Jk(),eI=1/0,_J=17976931348623157e292;function gJ(t){if(!t)return t===0?t:0;if(t=mJ(t),t===eI||t===-eI){var i=t<0?-1:1;return i*_J}return t===t?t:0}tI.exports=gJ});var iI=v((N0e,nI)=>{"use strict";var vJ=Dg();function bJ(t){var i=vJ(t),e=i%1;return i===i?e?i-e:i:0}nI.exports=bJ});var rI=v((A0e,oI)=>{"use strict";var yJ=yg(),CJ=kn(),xJ=iI(),wJ=Math.max;function TJ(t,i,e){var n=t==null?0:t.length;if(!n)return-1;var o=e==null?0:xJ(e);return o<0&&(o=wJ(n+o,0)),yJ(t,CJ(i,3),o)}oI.exports=TJ});var sI=v((L0e,aI)=>{"use strict";var SJ=Uk(),kJ=rI(),IJ=SJ(kJ);aI.exports=IJ});var Pg=v((B0e,lI)=>{"use strict";var EJ=Vh();function MJ(t){var i=t==null?0:t.length;return i?EJ(t,1):[]}lI.exports=MJ});var dI=v((V0e,cI)=>{"use strict";var DJ=Oh(),PJ=K_(),RJ=ui();function OJ(t,i){return t==null?t:DJ(t,PJ(i),RJ)}cI.exports=OJ});var pI=v((z0e,uI)=>{"use strict";function FJ(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}uI.exports=FJ});var fI=v((H0e,hI)=>{"use strict";var NJ=da(),AJ=Fh(),LJ=kn();function BJ(t,i){var e={};return i=LJ(i,3),AJ(t,function(n,o,r){NJ(e,o,i(n,o,r))}),e}hI.exports=BJ});var $h=v((q0e,mI)=>{"use strict";var VJ=ji();function zJ(t,i,e){for(var n=-1,o=t.length;++n<o;){var r=t[n],a=i(r);if(a!=null&&(s===void 0?a===a&&!VJ(a):e(a,s)))var s=a,c=r}return c}mI.exports=zJ});var gI=v((G0e,_I)=>{"use strict";function HJ(t,i){return t>i}_I.exports=HJ});var bI=v((j0e,vI)=>{"use strict";var qJ=$h(),GJ=gI(),jJ=pi();function UJ(t){return t&&t.length?qJ(t,jJ,GJ):void 0}vI.exports=UJ});var Rg=v((U0e,yI)=>{"use strict";var $J=da(),WJ=Vi();function KJ(t,i,e){(e!==void 0&&!WJ(t[i],e)||e===void 0&&!(i in t))&&$J(t,i,e)}yI.exports=KJ});var wI=v(($0e,xI)=>{"use strict";var YJ=ci(),XJ=ba(),ZJ=gn(),QJ="[object Object]",JJ=Function.prototype,eee=Object.prototype,CI=JJ.toString,tee=eee.hasOwnProperty,nee=CI.call(Object);function iee(t){if(!ZJ(t)||YJ(t)!=QJ)return!1;var i=XJ(t);if(i===null)return!0;var e=tee.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&CI.call(e)==nee}xI.exports=iee});var Og=v((W0e,TI)=>{"use strict";function oee(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}TI.exports=oee});var kI=v((K0e,SI)=>{"use strict";var ree=Ho(),aee=ui();function see(t){return ree(t,aee(t))}SI.exports=see});var RI=v((Y0e,PI)=>{"use strict";var II=Rg(),lee=D_(),cee=j_(),dee=P_(),uee=$_(),EI=qo(),MI=lt(),pee=xg(),hee=Hi(),fee=Lo(),mee=Gt(),_ee=wI(),gee=Uo(),DI=Og(),vee=kI();function bee(t,i,e,n,o,r,a){var s=DI(t,e),c=DI(i,e),u=a.get(c);if(u){II(t,e,u);return}var h=r?r(s,c,e+"",t,i,a):void 0,g=h===void 0;if(g){var C=MI(c),M=!C&&hee(c),S=!C&&!M&&gee(c);h=c,C||M||S?MI(s)?h=s:pee(s)?h=dee(s):M?(g=!1,h=lee(c,!0)):S?(g=!1,h=cee(c,!0)):h=[]:_ee(c)||EI(c)?(h=s,EI(s)?h=vee(s):(!mee(s)||fee(s))&&(h=uee(c))):g=!1}g&&(a.set(c,h),o(h,c,n,r,a),a.delete(c)),II(t,e,h)}PI.exports=bee});var NI=v((X0e,FI)=>{"use strict";var yee=ca(),Cee=Rg(),xee=Oh(),wee=RI(),Tee=Gt(),See=ui(),kee=Og();function OI(t,i,e,n,o){t!==i&&xee(i,function(r,a){if(o||(o=new yee),Tee(r))wee(t,i,a,e,OI,n,o);else{var s=n?n(kee(t,a),r,a+"",t,i,o):void 0;s===void 0&&(s=r),Cee(t,a,s)}},See)}FI.exports=OI});var LI=v((Z0e,AI)=>{"use strict";var Iee=Ta(),Eee=Ia();function Mee(t){return Iee(function(i,e){var n=-1,o=e.length,r=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(r=t.length>3&&typeof r=="function"?(o--,r):void 0,a&&Eee(e[0],e[1],a)&&(r=o<3?void 0:r,o=1),i=Object(i);++n<o;){var s=e[n];s&&t(i,s,n,r)}return i})}AI.exports=Mee});var VI=v((Q0e,BI)=>{"use strict";var Dee=NI(),Pee=LI(),Ree=Pee(function(t,i,e){Dee(t,i,e)});BI.exports=Ree});var Fg=v((J0e,zI)=>{"use strict";function Oee(t,i){return t<i}zI.exports=Oee});var qI=v((eve,HI)=>{"use strict";var Fee=$h(),Nee=Fg(),Aee=pi();function Lee(t){return t&&t.length?Fee(t,Aee,Nee):void 0}HI.exports=Lee});var jI=v((tve,GI)=>{"use strict";var Bee=$h(),Vee=kn(),zee=Fg();function Hee(t,i){return t&&t.length?Bee(t,Vee(i,2),zee):void 0}GI.exports=Hee});var $I=v((nve,UI)=>{"use strict";var qee=rn(),Gee=function(){return qee.Date.now()};UI.exports=Gee});var YI=v((ive,KI)=>{"use strict";var jee=ua(),Uee=xa(),$ee=ha(),WI=Gt(),Wee=Ko();function Kee(t,i,e,n){if(!WI(t))return t;i=Uee(i,t);for(var o=-1,r=i.length,a=r-1,s=t;s!=null&&++o<r;){var c=Wee(i[o]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=a){var h=s[c];u=n?n(h,c,s):void 0,u===void 0&&(u=WI(h)?h:$ee(i[o+1])?[]:{})}jee(s,c,u),s=s[c]}return t}KI.exports=Kee});var ZI=v((ove,XI)=>{"use strict";var Yee=wa(),Xee=YI(),Zee=xa();function Qee(t,i,e){for(var n=-1,o=i.length,r={};++n<o;){var a=i[n],s=Yee(t,a);e(s,a)&&Xee(r,Zee(a,t),s)}return r}XI.exports=Qee});var JI=v((rve,QI)=>{"use strict";var Jee=ZI(),ete=lg();function tte(t,i){return Jee(t,i,function(e,n){return ete(t,n)})}QI.exports=tte});var tE=v((ave,eE)=>{"use strict";var nte=Pg(),ite=vg(),ote=bg();function rte(t){return ote(ite(t,void 0,nte),t+"")}eE.exports=rte});var iE=v((sve,nE)=>{"use strict";var ate=JI(),ste=tE(),lte=ste(function(t,i){return t==null?{}:ate(t,i)});nE.exports=lte});var rE=v((lve,oE)=>{"use strict";var cte=Math.ceil,dte=Math.max;function ute(t,i,e,n){for(var o=-1,r=dte(cte((i-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++o]=t,t+=e;return a}oE.exports=ute});var sE=v((cve,aE)=>{"use strict";var pte=rE(),hte=Ia(),Ng=Dg();function fte(t){return function(i,e,n){return n&&typeof n!="number"&&hte(i,e,n)&&(e=n=void 0),i=Ng(i),e===void 0?(e=i,i=0):e=Ng(e),n=n===void 0?i<e?1:-1:Ng(n),pte(i,e,n,t)}}aE.exports=fte});var cE=v((dve,lE)=>{"use strict";var mte=sE(),_te=mte();lE.exports=_te});var uE=v((uve,dE)=>{"use strict";function gte(t,i){var e=t.length;for(t.sort(i);e--;)t[e]=t[e].value;return t}dE.exports=gte});var fE=v((pve,hE)=>{"use strict";var pE=ji();function vte(t,i){if(t!==i){var e=t!==void 0,n=t===null,o=t===t,r=pE(t),a=i!==void 0,s=i===null,c=i===i,u=pE(i);if(!s&&!u&&!r&&t>i||r&&a&&c&&!s&&!u||n&&a&&c||!e&&c||!o)return 1;if(!n&&!r&&!u&&t<i||u&&e&&o&&!n&&!r||s&&e&&o||!a&&o||!c)return-1}return 0}hE.exports=vte});var _E=v((hve,mE)=>{"use strict";var bte=fE();function yte(t,i,e){for(var n=-1,o=t.criteria,r=i.criteria,a=o.length,s=e.length;++n<a;){var c=bte(o[n],r[n]);if(c){if(n>=s)return c;var u=e[n];return c*(u=="desc"?-1:1)}}return t.index-i.index}mE.exports=yte});var vE=v((fve,gE)=>{"use strict";var Ag=Ca(),Cte=wa(),xte=kn(),wte=hg(),Tte=uE(),Ste=fa(),kte=_E(),Ite=pi(),Ete=lt();function Mte(t,i,e){i.length?i=Ag(i,function(r){return Ete(r)?function(a){return Cte(a,r.length===1?r[0]:r)}:r}):i=[Ite];var n=-1;i=Ag(i,Ste(xte));var o=wte(t,function(r,a,s){var c=Ag(i,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return Tte(o,function(r,a){return kte(r,a,e)})}gE.exports=Mte});var CE=v((mve,yE)=>{"use strict";var Dte=Vh(),Pte=vE(),Rte=Ta(),bE=Ia(),Ote=Rte(function(t,i){if(t==null)return[];var e=i.length;return e>1&&bE(t,i[0],i[1])?i=[]:e>2&&bE(i[0],i[1],i[2])&&(i=[i[0]]),Pte(t,Dte(i,1),[])});yE.exports=Ote});var wE=v((_ve,xE)=>{"use strict";var Fte=ag(),Nte=0;function Ate(t){var i=++Nte;return Fte(t)+i}xE.exports=Ate});var SE=v((gve,TE)=>{"use strict";function Lte(t,i,e){for(var n=-1,o=t.length,r=i.length,a={};++n<o;){var s=n<r?i[n]:void 0;e(a,t[n],s)}return a}TE.exports=Lte});var IE=v((vve,kE)=>{"use strict";var Bte=ua(),Vte=SE();function zte(t,i){return Vte(t||[],i||[],Bte)}kE.exports=zte});var Je=v((bve,EE)=>{"use strict";var Wh;if(typeof Ki=="function")try{Wh={cloneDeep:Vk(),constant:Rh(),defaults:Gk(),each:X_(),filter:dg(),find:sI(),flatten:Pg(),forEach:Y_(),forIn:dI(),has:ug(),isUndefined:pg(),last:pI(),map:fg(),mapValues:fI(),max:bI(),merge:VI(),min:qI(),minBy:jI(),now:$I(),pick:iE(),range:cE(),reduce:mg(),sortBy:CE(),uniqueId:wE(),values:wg(),zipObject:IE()}}catch{}Wh||(Wh=window._);EE.exports=Wh});var PE=v((Cve,DE)=>{"use strict";DE.exports=Kh;function Kh(){var t={};t._next=t._prev=t,this._sentinel=t}Kh.prototype.dequeue=function(){var t=this._sentinel,i=t._prev;if(i!==t)return ME(i),i};Kh.prototype.enqueue=function(t){var i=this._sentinel;t._prev&&t._next&&ME(t),t._next=i._next,i._next._prev=t,i._next=t,t._prev=i};Kh.prototype.toString=function(){for(var t=[],i=this._sentinel,e=i._prev;e!==i;)t.push(JSON.stringify(e,Hte)),e=e._prev;return"["+t.join(", ")+"]"};function ME(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Hte(t,i){if(t!=="_next"&&t!=="_prev")return i}});var OE=v((xve,RE)=>{"use strict";var Ln=Je(),qte=sn().Graph,Gte=PE();RE.exports=Ute;var jte=Ln.constant(1);function Ute(t,i){if(t.nodeCount()<=1)return[];var e=Wte(t,i||jte),n=$te(e.graph,e.buckets,e.zeroIdx);return Ln.flatten(Ln.map(n,function(o){return t.outEdges(o.v,o.w)}),!0)}function $te(t,i,e){for(var n=[],o=i[i.length-1],r=i[0],a;t.nodeCount();){for(;a=r.dequeue();)Lg(t,i,e,a);for(;a=o.dequeue();)Lg(t,i,e,a);if(t.nodeCount()){for(var s=i.length-2;s>0;--s)if(a=i[s].dequeue(),a){n=n.concat(Lg(t,i,e,a,!0));break}}}return n}function Lg(t,i,e,n,o){var r=o?[]:void 0;return Ln.forEach(t.inEdges(n.v),function(a){var s=t.edge(a),c=t.node(a.v);o&&r.push({v:a.v,w:a.w}),c.out-=s,Bg(i,e,c)}),Ln.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,Bg(i,e,u)}),t.removeNode(n.v),r}function Wte(t,i){var e=new qte,n=0,o=0;Ln.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Ln.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=i(s),h=c+u;e.setEdge(s.v,s.w,h),o=Math.max(o,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Ln.range(o+n+3).map(function(){return new Gte}),a=n+1;return Ln.forEach(e.nodes(),function(s){Bg(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function Bg(t,i,e){e.out?e.in?t[e.out-e.in+i].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}});var NE=v((wve,FE)=>{"use strict";var $i=Je(),Kte=OE();FE.exports={run:Yte,undo:Zte};function Yte(t){var i=t.graph().acyclicer==="greedy"?Kte(t,e(t)):Xte(t);$i.forEach(i,function(n){var o=t.edge(n);t.removeEdge(n),o.forwardName=n.name,o.reversed=!0,t.setEdge(n.w,n.v,o,$i.uniqueId("rev"))});function e(n){return function(o){return n.edge(o).weight}}}function Xte(t){var i=[],e={},n={};function o(r){$i.has(n,r)||(n[r]=!0,e[r]=!0,$i.forEach(t.outEdges(r),function(a){$i.has(e,a.w)?i.push(a):o(a.w)}),delete e[r])}return $i.forEach(t.nodes(),o),i}function Zte(t){$i.forEach(t.edges(),function(i){var e=t.edge(i);if(e.reversed){t.removeEdge(i);var n=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(i.w,i.v,e,n)}})}});var St=v((Tve,VE)=>{"use strict";var Ne=Je(),AE=sn().Graph;VE.exports={addDummyNode:LE,simplify:Qte,asNonCompoundGraph:Jte,successorWeights:ene,predecessorWeights:tne,intersectRect:nne,buildLayerMatrix:ine,normalizeRanks:one,removeEmptyRanks:rne,addBorderNode:ane,maxRank:BE,partition:sne,time:lne,notime:cne};function LE(t,i,e,n){var o;do o=Ne.uniqueId(n);while(t.hasNode(o));return e.dummy=i,t.setNode(o,e),o}function Qte(t){var i=new AE().setGraph(t.graph());return Ne.forEach(t.nodes(),function(e){i.setNode(e,t.node(e))}),Ne.forEach(t.edges(),function(e){var n=i.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);i.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),i}function Jte(t){var i=new AE({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ne.forEach(t.nodes(),function(e){t.children(e).length||i.setNode(e,t.node(e))}),Ne.forEach(t.edges(),function(e){i.setEdge(e,t.edge(e))}),i}function ene(t){var i=Ne.map(t.nodes(),function(e){var n={};return Ne.forEach(t.outEdges(e),function(o){n[o.w]=(n[o.w]||0)+t.edge(o).weight}),n});return Ne.zipObject(t.nodes(),i)}function tne(t){var i=Ne.map(t.nodes(),function(e){var n={};return Ne.forEach(t.inEdges(e),function(o){n[o.v]=(n[o.v]||0)+t.edge(o).weight}),n});return Ne.zipObject(t.nodes(),i)}function nne(t,i){var e=t.x,n=t.y,o=i.x-e,r=i.y-n,a=t.width/2,s=t.height/2;if(!o&&!r)throw new Error("Not possible to find intersection inside of the rectangle");var c,u;return Math.abs(r)*a>Math.abs(o)*s?(r<0&&(s=-s),c=s*o/r,u=s):(o<0&&(a=-a),c=a,u=a*r/o),{x:e+c,y:n+u}}function ine(t){var i=Ne.map(Ne.range(BE(t)+1),function(){return[]});return Ne.forEach(t.nodes(),function(e){var n=t.node(e),o=n.rank;Ne.isUndefined(o)||(i[o][n.order]=e)}),i}function one(t){var i=Ne.min(Ne.map(t.nodes(),function(e){return t.node(e).rank}));Ne.forEach(t.nodes(),function(e){var n=t.node(e);Ne.has(n,"rank")&&(n.rank-=i)})}function rne(t){var i=Ne.min(Ne.map(t.nodes(),function(r){return t.node(r).rank})),e=[];Ne.forEach(t.nodes(),function(r){var a=t.node(r).rank-i;e[a]||(e[a]=[]),e[a].push(r)});var n=0,o=t.graph().nodeRankFactor;Ne.forEach(e,function(r,a){Ne.isUndefined(r)&&a%o!==0?--n:n&&Ne.forEach(r,function(s){t.node(s).rank+=n})})}function ane(t,i,e,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=e,o.order=n),LE(t,"border",o,i)}function BE(t){return Ne.max(Ne.map(t.nodes(),function(i){var e=t.node(i).rank;if(!Ne.isUndefined(e))return e}))}function sne(t,i){var e={lhs:[],rhs:[]};return Ne.forEach(t,function(n){i(n)?e.lhs.push(n):e.rhs.push(n)}),e}function lne(t,i){var e=Ne.now();try{return i()}finally{console.log(t+" time: "+(Ne.now()-e)+"ms")}}function cne(t,i){return i()}});var qE=v((Sve,HE)=>{"use strict";var zE=Je(),dne=St();HE.exports={run:une,undo:hne};function une(t){t.graph().dummyChains=[],zE.forEach(t.edges(),function(i){pne(t,i)})}function pne(t,i){var e=i.v,n=t.node(e).rank,o=i.w,r=t.node(o).rank,a=i.name,s=t.edge(i),c=s.labelRank;if(r!==n+1){t.removeEdge(i);var u,h,g;for(g=0,++n;n<r;++g,++n)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:i,rank:n},u=dne.addDummyNode(t,"edge",h,"_d"),n===c&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),t.setEdge(e,u,{weight:s.weight},a),g===0&&t.graph().dummyChains.push(u),e=u;t.setEdge(e,o,{weight:s.weight},a)}}function hne(t){zE.forEach(t.graph().dummyChains,function(i){var e=t.node(i),n=e.edgeLabel,o;for(t.setEdge(e.edgeObj,n);e.dummy;)o=t.successors(i)[0],t.removeNode(i),n.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(n.x=e.x,n.y=e.y,n.width=e.width,n.height=e.height),i=o,e=t.node(i)})}});var Ea=v((kve,GE)=>{"use strict";var Yh=Je();GE.exports={longestPath:fne,slack:mne};function fne(t){var i={};function e(n){var o=t.node(n);if(Yh.has(i,n))return o.rank;i[n]=!0;var r=Yh.min(Yh.map(t.outEdges(n),function(a){return e(a.w)-t.edge(a).minlen}));return(r===Number.POSITIVE_INFINITY||r===void 0||r===null)&&(r=0),o.rank=r}Yh.forEach(t.sources(),e)}function mne(t,i){return t.node(i.w).rank-t.node(i.v).rank-t.edge(i).minlen}});var Vg=v((Ive,jE)=>{"use strict";var Xh=Je(),_ne=sn().Graph,Zh=Ea().slack;jE.exports=gne;function gne(t){var i=new _ne({directed:!1}),e=t.nodes()[0],n=t.nodeCount();i.setNode(e,{});for(var o,r;vne(i,t)<n;)o=bne(i,t),r=i.hasNode(o.v)?Zh(t,o):-Zh(t,o),yne(i,t,r);return i}function vne(t,i){function e(n){Xh.forEach(i.nodeEdges(n),function(o){var r=o.v,a=n===r?o.w:r;!t.hasNode(a)&&!Zh(i,o)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return Xh.forEach(t.nodes(),e),t.nodeCount()}function bne(t,i){return Xh.minBy(i.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return Zh(i,e)})}function yne(t,i,e){Xh.forEach(t.nodes(),function(n){i.node(n).rank+=e})}});var QE=v((Eve,ZE)=>{"use strict";var Bn=Je(),Cne=Vg(),xne=Ea().slack,wne=Ea().longestPath,Tne=sn().alg.preorder,Sne=sn().alg.postorder,kne=St().simplify;ZE.exports=Wi;Wi.initLowLimValues=Hg;Wi.initCutValues=zg;Wi.calcCutValue=$E;Wi.leaveEdge=KE;Wi.enterEdge=YE;Wi.exchangeEdges=XE;function Wi(t){t=kne(t),wne(t);var i=Cne(t);Hg(i),zg(i,t);for(var e,n;e=KE(i);)n=YE(i,t,e),XE(i,t,e,n)}function zg(t,i){var e=Sne(t,t.nodes());e=e.slice(0,e.length-1),Bn.forEach(e,function(n){Ine(t,i,n)})}function Ine(t,i,e){var n=t.node(e),o=n.parent;t.edge(e,o).cutvalue=$E(t,i,e)}function $E(t,i,e){var n=t.node(e),o=n.parent,r=!0,a=i.edge(e,o),s=0;return a||(r=!1,a=i.edge(o,e)),s=a.weight,Bn.forEach(i.nodeEdges(e),function(c){var u=c.v===e,h=u?c.w:c.v;if(h!==o){var g=u===r,C=i.edge(c).weight;if(s+=g?C:-C,Mne(t,e,h)){var M=t.edge(e,h).cutvalue;s+=g?-M:M}}}),s}function Hg(t,i){arguments.length<2&&(i=t.nodes()[0]),WE(t,{},1,i)}function WE(t,i,e,n,o){var r=e,a=t.node(n);return i[n]=!0,Bn.forEach(t.neighbors(n),function(s){Bn.has(i,s)||(e=WE(t,i,e,s,n))}),a.low=r,a.lim=e++,o?a.parent=o:delete a.parent,e}function KE(t){return Bn.find(t.edges(),function(i){return t.edge(i).cutvalue<0})}function YE(t,i,e){var n=e.v,o=e.w;i.hasEdge(n,o)||(n=e.w,o=e.v);var r=t.node(n),a=t.node(o),s=r,c=!1;r.lim>a.lim&&(s=a,c=!0);var u=Bn.filter(i.edges(),function(h){return c===UE(t,t.node(h.v),s)&&c!==UE(t,t.node(h.w),s)});return Bn.minBy(u,function(h){return xne(i,h)})}function XE(t,i,e,n){var o=e.v,r=e.w;t.removeEdge(o,r),t.setEdge(n.v,n.w,{}),Hg(t),zg(t,i),Ene(t,i)}function Ene(t,i){var e=Bn.find(t.nodes(),function(o){return!i.node(o).parent}),n=Tne(t,e);n=n.slice(1),Bn.forEach(n,function(o){var r=t.node(o).parent,a=i.edge(o,r),s=!1;a||(a=i.edge(r,o),s=!0),i.node(o).rank=i.node(r).rank+(s?a.minlen:-a.minlen)})}function Mne(t,i,e){return t.hasEdge(i,e)}function UE(t,i,e){return e.low<=i.lim&&i.lim<=e.lim}});var nM=v((Mve,tM)=>{"use strict";var Dne=Ea(),eM=Dne.longestPath,Pne=Vg(),Rne=QE();tM.exports=One;function One(t){switch(t.graph().ranker){case"network-simplex":JE(t);break;case"tight-tree":Nne(t);break;case"longest-path":Fne(t);break;default:JE(t)}}var Fne=eM;function Nne(t){eM(t),Pne(t)}function JE(t){Rne(t)}});var oM=v((Dve,iM)=>{"use strict";var qg=Je();iM.exports=Ane;function Ane(t){var i=Bne(t);qg.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),o=n.edgeObj,r=Lne(t,i,o.v,o.w),a=r.path,s=r.lca,c=0,u=a[c],h=!0;e!==o.w;){if(n=t.node(e),h){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(h=!1)}if(!h){for(;c<a.length-1&&t.node(u=a[c+1]).minRank<=n.rank;)c++;u=a[c]}t.setParent(e,u),e=t.successors(e)[0]}})}function Lne(t,i,e,n){var o=[],r=[],a=Math.min(i[e].low,i[n].low),s=Math.max(i[e].lim,i[n].lim),c,u;c=e;do c=t.parent(c),o.push(c);while(c&&(i[c].low>a||s>i[c].lim));for(u=c,c=n;(c=t.parent(c))!==u;)r.push(c);return{path:o.concat(r.reverse()),lca:u}}function Bne(t){var i={},e=0;function n(o){var r=e;qg.forEach(t.children(o),n),i[o]={low:r,lim:e++}}return qg.forEach(t.children(),n),i}});var sM=v((Pve,aM)=>{"use strict";var Vn=Je(),Gg=St();aM.exports={run:Vne,cleanup:qne};function Vne(t){var i=Gg.addDummyNode(t,"root",{},"_root"),e=zne(t),n=Vn.max(Vn.values(e))-1,o=2*n+1;t.graph().nestingRoot=i,Vn.forEach(t.edges(),function(a){t.edge(a).minlen*=o});var r=Hne(t)+1;Vn.forEach(t.children(),function(a){rM(t,i,o,r,n,e,a)}),t.graph().nodeRankFactor=o}function rM(t,i,e,n,o,r,a){var s=t.children(a);if(!s.length){a!==i&&t.setEdge(i,a,{weight:0,minlen:e});return}var c=Gg.addBorderNode(t,"_bt"),u=Gg.addBorderNode(t,"_bb"),h=t.node(a);t.setParent(c,a),h.borderTop=c,t.setParent(u,a),h.borderBottom=u,Vn.forEach(s,function(g){rM(t,i,e,n,o,r,g);var C=t.node(g),M=C.borderTop?C.borderTop:g,S=C.borderBottom?C.borderBottom:g,N=C.borderTop?n:2*n,q=M!==S?1:o-r[a]+1;t.setEdge(c,M,{weight:N,minlen:q,nestingEdge:!0}),t.setEdge(S,u,{weight:N,minlen:q,nestingEdge:!0})}),t.parent(a)||t.setEdge(i,c,{weight:0,minlen:o+r[a]})}function zne(t){var i={};function e(n,o){var r=t.children(n);r&&r.length&&Vn.forEach(r,function(a){e(a,o+1)}),i[n]=o}return Vn.forEach(t.children(),function(n){e(n,1)}),i}function Hne(t){return Vn.reduce(t.edges(),function(i,e){return i+t.edge(e).weight},0)}function qne(t){var i=t.graph();t.removeNode(i.nestingRoot),delete i.nestingRoot,Vn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var dM=v((Rve,cM)=>{"use strict";var jg=Je(),Gne=St();cM.exports=jne;function jne(t){function i(e){var n=t.children(e),o=t.node(e);if(n.length&&jg.forEach(n,i),jg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var r=o.minRank,a=o.maxRank+1;r<a;++r)lM(t,"borderLeft","_bl",e,o,r),lM(t,"borderRight","_br",e,o,r)}}jg.forEach(t.children(),i)}function lM(t,i,e,n,o,r){var a={width:0,height:0,rank:r,borderType:i},s=o[i][r-1],c=Gne.addDummyNode(t,"border",a,e);o[i][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var fM=v((Ove,hM)=>{"use strict";var En=Je();hM.exports={adjust:Une,undo:$ne};function Une(t){var i=t.graph().rankdir.toLowerCase();(i==="lr"||i==="rl")&&pM(t)}function $ne(t){var i=t.graph().rankdir.toLowerCase();(i==="bt"||i==="rl")&&Wne(t),(i==="lr"||i==="rl")&&(Kne(t),pM(t))}function pM(t){En.forEach(t.nodes(),function(i){uM(t.node(i))}),En.forEach(t.edges(),function(i){uM(t.edge(i))})}function uM(t){var i=t.width;t.width=t.height,t.height=i}function Wne(t){En.forEach(t.nodes(),function(i){Ug(t.node(i))}),En.forEach(t.edges(),function(i){var e=t.edge(i);En.forEach(e.points,Ug),En.has(e,"y")&&Ug(e)})}function Ug(t){t.y=-t.y}function Kne(t){En.forEach(t.nodes(),function(i){$g(t.node(i))}),En.forEach(t.edges(),function(i){var e=t.edge(i);En.forEach(e.points,$g),En.has(e,"x")&&$g(e)})}function $g(t){var i=t.x;t.x=t.y,t.y=i}});var _M=v((Fve,mM)=>{"use strict";var zn=Je();mM.exports=Yne;function Yne(t){var i={},e=zn.filter(t.nodes(),function(s){return!t.children(s).length}),n=zn.max(zn.map(e,function(s){return t.node(s).rank})),o=zn.map(zn.range(n+1),function(){return[]});function r(s){if(!zn.has(i,s)){i[s]=!0;var c=t.node(s);o[c.rank].push(s),zn.forEach(t.successors(s),r)}}var a=zn.sortBy(e,function(s){return t.node(s).rank});return zn.forEach(a,r),o}});var vM=v((Nve,gM)=>{"use strict";var hi=Je();gM.exports=Xne;function Xne(t,i){for(var e=0,n=1;n<i.length;++n)e+=Zne(t,i[n-1],i[n]);return e}function Zne(t,i,e){for(var n=hi.zipObject(e,hi.map(e,function(u,h){return h})),o=hi.flatten(hi.map(i,function(u){return hi.sortBy(hi.map(t.outEdges(u),function(h){return{pos:n[h.w],weight:t.edge(h).weight}}),"pos")}),!0),r=1;r<e.length;)r<<=1;var a=2*r-1;r-=1;var s=hi.map(new Array(a),function(){return 0}),c=0;return hi.forEach(o.forEach(function(u){var h=u.pos+r;s[h]+=u.weight;for(var g=0;h>0;)h%2&&(g+=s[h+1]),h=h-1>>1,s[h]+=u.weight;c+=u.weight*g})),c}});var CM=v((Ave,yM)=>{"use strict";var bM=Je();yM.exports=Qne;function Qne(t,i){return bM.map(i,function(e){var n=t.inEdges(e);if(n.length){var o=bM.reduce(n,function(r,a){var s=t.edge(a),c=t.node(a.v);return{sum:r.sum+s.weight*c.order,weight:r.weight+s.weight}},{sum:0,weight:0});return{v:e,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:e}})}});var wM=v((Lve,xM)=>{"use strict";var Ut=Je();xM.exports=Jne;function Jne(t,i){var e={};Ut.forEach(t,function(o,r){var a=e[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:r};Ut.isUndefined(o.barycenter)||(a.barycenter=o.barycenter,a.weight=o.weight)}),Ut.forEach(i.edges(),function(o){var r=e[o.v],a=e[o.w];!Ut.isUndefined(r)&&!Ut.isUndefined(a)&&(a.indegree++,r.out.push(e[o.w]))});var n=Ut.filter(e,function(o){return!o.indegree});return eie(n)}function eie(t){var i=[];function e(r){return function(a){a.merged||(Ut.isUndefined(a.barycenter)||Ut.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&tie(r,a)}}function n(r){return function(a){a.in.push(r),--a.indegree===0&&t.push(a)}}for(;t.length;){var o=t.pop();i.push(o),Ut.forEach(o.in.reverse(),e(o)),Ut.forEach(o.out,n(o))}return Ut.map(Ut.filter(i,function(r){return!r.merged}),function(r){return Ut.pick(r,["vs","i","barycenter","weight"])})}function tie(t,i){var e=0,n=0;t.weight&&(e+=t.barycenter*t.weight,n+=t.weight),i.weight&&(e+=i.barycenter*i.weight,n+=i.weight),t.vs=i.vs.concat(t.vs),t.barycenter=e/n,t.weight=n,t.i=Math.min(i.i,t.i),i.merged=!0}});var kM=v((Bve,SM)=>{"use strict";var Ma=Je(),nie=St();SM.exports=iie;function iie(t,i){var e=nie.partition(t,function(h){return Ma.has(h,"barycenter")}),n=e.lhs,o=Ma.sortBy(e.rhs,function(h){return-h.i}),r=[],a=0,s=0,c=0;n.sort(oie(!!i)),c=TM(r,o,c),Ma.forEach(n,function(h){c+=h.vs.length,r.push(h.vs),a+=h.barycenter*h.weight,s+=h.weight,c=TM(r,o,c)});var u={vs:Ma.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function TM(t,i,e){for(var n;i.length&&(n=Ma.last(i)).i<=e;)i.pop(),t.push(n.vs),e++;return e}function oie(t){return function(i,e){return i.barycenter<e.barycenter?-1:i.barycenter>e.barycenter?1:t?e.i-i.i:i.i-e.i}}});var MM=v((Vve,EM)=>{"use strict";var fi=Je(),rie=CM(),aie=wM(),sie=kM();EM.exports=IM;function IM(t,i,e,n){var o=t.children(i),r=t.node(i),a=r?r.borderLeft:void 0,s=r?r.borderRight:void 0,c={};a&&(o=fi.filter(o,function(S){return S!==a&&S!==s}));var u=rie(t,o);fi.forEach(u,function(S){if(t.children(S.v).length){var N=IM(t,S.v,e,n);c[S.v]=N,fi.has(N,"barycenter")&&cie(S,N)}});var h=aie(u,e);lie(h,c);var g=sie(h,n);if(a&&(g.vs=fi.flatten([a,g.vs,s],!0),t.predecessors(a).length)){var C=t.node(t.predecessors(a)[0]),M=t.node(t.predecessors(s)[0]);fi.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+C.order+M.order)/(g.weight+2),g.weight+=2}return g}function lie(t,i){fi.forEach(t,function(e){e.vs=fi.flatten(e.vs.map(function(n){return i[n]?i[n].vs:n}),!0)})}function cie(t,i){fi.isUndefined(t.barycenter)?(t.barycenter=i.barycenter,t.weight=i.weight):(t.barycenter=(t.barycenter*t.weight+i.barycenter*i.weight)/(t.weight+i.weight),t.weight+=i.weight)}});var PM=v((zve,DM)=>{"use strict";var Da=Je(),die=sn().Graph;DM.exports=uie;function uie(t,i,e){var n=pie(t),o=new die({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Da.forEach(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===i||a.minRank<=i&&i<=a.maxRank)&&(o.setNode(r),o.setParent(r,s||n),Da.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,h=o.edge(u,r),g=Da.isUndefined(h)?0:h.weight;o.setEdge(u,r,{weight:t.edge(c).weight+g})}),Da.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[i],borderRight:a.borderRight[i]}))}),o}function pie(t){for(var i;t.hasNode(i=Da.uniqueId("_root")););return i}});var OM=v((Hve,RM)=>{"use strict";var hie=Je();RM.exports=fie;function fie(t,i,e){var n={},o;hie.forEach(e,function(r){for(var a=t.parent(r),s,c;a;){if(s=t.parent(a),s?(c=n[s],n[s]=a):(c=o,o=a),c&&c!==a){i.setEdge(c,a);return}a=s}})}});var BM=v((qve,LM)=>{"use strict";var mi=Je(),mie=_M(),_ie=vM(),gie=MM(),vie=PM(),bie=OM(),yie=sn().Graph,FM=St();LM.exports=Cie;function Cie(t){var i=FM.maxRank(t),e=NM(t,mi.range(1,i+1),"inEdges"),n=NM(t,mi.range(i-1,-1,-1),"outEdges"),o=mie(t);AM(t,o);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){xie(s%2?e:n,s%4>=2),o=FM.buildLayerMatrix(t);var u=_ie(t,o);u<r&&(c=0,a=mi.cloneDeep(o),r=u)}AM(t,a)}function NM(t,i,e){return mi.map(i,function(n){return vie(t,n,e)})}function xie(t,i){var e=new yie;mi.forEach(t,function(n){var o=n.graph().root,r=gie(n,o,e,i);mi.forEach(r.vs,function(a,s){n.node(a).order=s}),bie(n,e,r.vs)})}function AM(t,i){mi.forEach(i,function(e){mi.forEach(e,function(n,o){t.node(n).order=o})})}});var KM=v((Gve,WM)=>{"use strict";var ge=Je(),wie=sn().Graph,Tie=St();WM.exports={positionX:Iie,findType1Conflicts:VM,findType2Conflicts:zM,addConflict:Wg,hasConflict:HM,verticalAlignment:qM,horizontalCompaction:GM,alignCoordinates:UM,findSmallestWidthAlignment:jM,balance:$M};function VM(t,i){var e={};function n(o,r){var a=0,s=0,c=o.length,u=ge.last(r);return ge.forEach(r,function(h,g){var C=Sie(t,h),M=C?t.node(C).order:c;(C||h===u)&&(ge.forEach(r.slice(s,g+1),function(S){ge.forEach(t.predecessors(S),function(N){var q=t.node(N),$=q.order;($<a||M<$)&&!(q.dummy&&t.node(S).dummy)&&Wg(e,N,S)})}),s=g+1,a=M)}),r}return ge.reduce(i,n),e}function zM(t,i){var e={};function n(r,a,s,c,u){var h;ge.forEach(ge.range(a,s),function(g){h=r[g],t.node(h).dummy&&ge.forEach(t.predecessors(h),function(C){var M=t.node(C);M.dummy&&(M.order<c||M.order>u)&&Wg(e,C,h)})})}function o(r,a){var s=-1,c,u=0;return ge.forEach(a,function(h,g){if(t.node(h).dummy==="border"){var C=t.predecessors(h);C.length&&(c=t.node(C[0]).order,n(a,u,g,s,c),u=g,s=c)}n(a,u,a.length,c,r.length)}),a}return ge.reduce(i,o),e}function Sie(t,i){if(t.node(i).dummy)return ge.find(t.predecessors(i),function(e){return t.node(e).dummy})}function Wg(t,i,e){if(i>e){var n=i;i=e,e=n}var o=t[i];o||(t[i]=o={}),o[e]=!0}function HM(t,i,e){if(i>e){var n=i;i=e,e=n}return ge.has(t[i],e)}function qM(t,i,e,n){var o={},r={},a={};return ge.forEach(i,function(s){ge.forEach(s,function(c,u){o[c]=c,r[c]=c,a[c]=u})}),ge.forEach(i,function(s){var c=-1;ge.forEach(s,function(u){var h=n(u);if(h.length){h=ge.sortBy(h,function(N){return a[N]});for(var g=(h.length-1)/2,C=Math.floor(g),M=Math.ceil(g);C<=M;++C){var S=h[C];r[u]===u&&c<a[S]&&!HM(e,u,S)&&(r[S]=u,r[u]=o[u]=o[S],c=a[S])}}})}),{root:o,align:r}}function GM(t,i,e,n,o){var r={},a=kie(t,i,e,o),s=o?"borderLeft":"borderRight";function c(g,C){for(var M=a.nodes(),S=M.pop(),N={};S;)N[S]?g(S):(N[S]=!0,M.push(S),M=M.concat(C(S))),S=M.pop()}function u(g){r[g]=a.inEdges(g).reduce(function(C,M){return Math.max(C,r[M.v]+a.edge(M))},0)}function h(g){var C=a.outEdges(g).reduce(function(S,N){return Math.min(S,r[N.w]-a.edge(N))},Number.POSITIVE_INFINITY),M=t.node(g);C!==Number.POSITIVE_INFINITY&&M.borderType!==s&&(r[g]=Math.max(r[g],C))}return c(u,a.predecessors.bind(a)),c(h,a.successors.bind(a)),ge.forEach(n,function(g){r[g]=r[e[g]]}),r}function kie(t,i,e,n){var o=new wie,r=t.graph(),a=Eie(r.nodesep,r.edgesep,n);return ge.forEach(i,function(s){var c;ge.forEach(s,function(u){var h=e[u];if(o.setNode(h),c){var g=e[c],C=o.edge(g,h);o.setEdge(g,h,Math.max(a(t,u,c),C||0))}c=u})}),o}function jM(t,i){return ge.minBy(ge.values(i),function(e){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return ge.forIn(e,function(r,a){var s=Mie(t,a)/2;n=Math.max(r+s,n),o=Math.min(r-s,o)}),n-o})}function UM(t,i){var e=ge.values(i),n=ge.min(e),o=ge.max(e);ge.forEach(["u","d"],function(r){ge.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==i){var h=ge.values(c);u=a==="l"?n-ge.min(h):o-ge.max(h),u&&(t[s]=ge.mapValues(c,function(g){return g+u}))}})})}function $M(t,i){return ge.mapValues(t.ul,function(e,n){if(i)return t[i.toLowerCase()][n];var o=ge.sortBy(ge.map(t,n));return(o[1]+o[2])/2})}function Iie(t){var i=Tie.buildLayerMatrix(t),e=ge.merge(VM(t,i),zM(t,i)),n={},o;ge.forEach(["u","d"],function(a){o=a==="u"?i:ge.values(i).reverse(),ge.forEach(["l","r"],function(s){s==="r"&&(o=ge.map(o,function(g){return ge.values(g).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=qM(t,o,e,c),h=GM(t,o,u.root,u.align,s==="r");s==="r"&&(h=ge.mapValues(h,function(g){return-g})),n[a+s]=h})});var r=jM(t,n);return UM(n,r),$M(n,t.graph().align)}function Eie(t,i,e){return function(n,o,r){var a=n.node(o),s=n.node(r),c=0,u;if(c+=a.width/2,ge.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(c+=e?u:-u),u=0,c+=(a.dummy?i:t)/2,c+=(s.dummy?i:t)/2,c+=s.width/2,ge.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(c+=e?u:-u),u=0,c}}function Mie(t,i){return t.node(i).width}});var ZM=v((jve,XM)=>{"use strict";var Pa=Je(),YM=St(),Die=KM().positionX;XM.exports=Pie;function Pie(t){t=YM.asNonCompoundGraph(t),Rie(t),Pa.forEach(Die(t),function(i,e){t.node(e).x=i})}function Rie(t){var i=YM.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Pa.forEach(i,function(o){var r=Pa.max(Pa.map(o,function(a){return t.node(a).height}));Pa.forEach(o,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var iD=v((Uve,nD)=>{"use strict";var Ce=Je(),QM=NE(),JM=qE(),Oie=nM(),Fie=St().normalizeRanks,Nie=oM(),Aie=St().removeEmptyRanks,eD=sM(),Lie=dM(),tD=fM(),Bie=BM(),Vie=ZM(),_i=St(),zie=sn().Graph;nD.exports=Hie;function Hie(t,i){var e=i&&i.debugTiming?_i.time:_i.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return Qie(t)});e(" runLayout",function(){qie(n,e)}),e(" updateInputGraph",function(){Gie(t,n)})})}function qie(t,i){i(" makeSpaceForEdgeLabels",function(){Jie(t)}),i(" removeSelfEdges",function(){loe(t)}),i(" acyclic",function(){QM.run(t)}),i(" nestingGraph.run",function(){eD.run(t)}),i(" rank",function(){Oie(_i.asNonCompoundGraph(t))}),i(" injectEdgeLabelProxies",function(){eoe(t)}),i(" removeEmptyRanks",function(){Aie(t)}),i(" nestingGraph.cleanup",function(){eD.cleanup(t)}),i(" normalizeRanks",function(){Fie(t)}),i(" assignRankMinMax",function(){toe(t)}),i(" removeEdgeLabelProxies",function(){noe(t)}),i(" normalize.run",function(){JM.run(t)}),i(" parentDummyChains",function(){Nie(t)}),i(" addBorderSegments",function(){Lie(t)}),i(" order",function(){Bie(t)}),i(" insertSelfEdges",function(){coe(t)}),i(" adjustCoordinateSystem",function(){tD.adjust(t)}),i(" position",function(){Vie(t)}),i(" positionSelfEdges",function(){doe(t)}),i(" removeBorderNodes",function(){soe(t)}),i(" normalize.undo",function(){JM.undo(t)}),i(" fixupEdgeLabelCoords",function(){roe(t)}),i(" undoCoordinateSystem",function(){tD.undo(t)}),i(" translateGraph",function(){ioe(t)}),i(" assignNodeIntersects",function(){ooe(t)}),i(" reversePoints",function(){aoe(t)}),i(" acyclic.undo",function(){QM.undo(t)})}function Gie(t,i){Ce.forEach(t.nodes(),function(e){var n=t.node(e),o=i.node(e);n&&(n.x=o.x,n.y=o.y,i.children(e).length&&(n.width=o.width,n.height=o.height))}),Ce.forEach(t.edges(),function(e){var n=t.edge(e),o=i.edge(e);n.points=o.points,Ce.has(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=i.graph().width,t.graph().height=i.graph().height}var jie=["nodesep","edgesep","ranksep","marginx","marginy"],Uie={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$ie=["acyclicer","ranker","rankdir","align"],Wie=["width","height"],Kie={width:0,height:0},Yie=["minlen","weight","width","height","labeloffset"],Xie={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Zie=["labelpos"];function Qie(t){var i=new zie({multigraph:!0,compound:!0}),e=Yg(t.graph());return i.setGraph(Ce.merge({},Uie,Kg(e,jie),Ce.pick(e,$ie))),Ce.forEach(t.nodes(),function(n){var o=Yg(t.node(n));i.setNode(n,Ce.defaults(Kg(o,Wie),Kie)),i.setParent(n,t.parent(n))}),Ce.forEach(t.edges(),function(n){var o=Yg(t.edge(n));i.setEdge(n,Ce.merge({},Xie,Kg(o,Yie),Ce.pick(o,Zie)))}),i}function Jie(t){var i=t.graph();i.ranksep/=2,Ce.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function eoe(t){Ce.forEach(t.edges(),function(i){var e=t.edge(i);if(e.width&&e.height){var n=t.node(i.v),o=t.node(i.w),r={rank:(o.rank-n.rank)/2+n.rank,e:i};_i.addDummyNode(t,"edge-proxy",r,"_ep")}})}function toe(t){var i=0;Ce.forEach(t.nodes(),function(e){var n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,i=Ce.max(i,n.maxRank))}),t.graph().maxRank=i}function noe(t){Ce.forEach(t.nodes(),function(i){var e=t.node(i);e.dummy==="edge-proxy"&&(t.edge(e.e).labelRank=e.rank,t.removeNode(i))})}function ioe(t){var i=Number.POSITIVE_INFINITY,e=0,n=Number.POSITIVE_INFINITY,o=0,r=t.graph(),a=r.marginx||0,s=r.marginy||0;function c(u){var h=u.x,g=u.y,C=u.width,M=u.height;i=Math.min(i,h-C/2),e=Math.max(e,h+C/2),n=Math.min(n,g-M/2),o=Math.max(o,g+M/2)}Ce.forEach(t.nodes(),function(u){c(t.node(u))}),Ce.forEach(t.edges(),function(u){var h=t.edge(u);Ce.has(h,"x")&&c(h)}),i-=a,n-=s,Ce.forEach(t.nodes(),function(u){var h=t.node(u);h.x-=i,h.y-=n}),Ce.forEach(t.edges(),function(u){var h=t.edge(u);Ce.forEach(h.points,function(g){g.x-=i,g.y-=n}),Ce.has(h,"x")&&(h.x-=i),Ce.has(h,"y")&&(h.y-=n)}),r.width=e-i+a,r.height=o-n+s}function ooe(t){Ce.forEach(t.edges(),function(i){var e=t.edge(i),n=t.node(i.v),o=t.node(i.w),r,a;e.points?(r=e.points[0],a=e.points[e.points.length-1]):(e.points=[],r=o,a=n),e.points.unshift(_i.intersectRect(n,r)),e.points.push(_i.intersectRect(o,a))})}function roe(t){Ce.forEach(t.edges(),function(i){var e=t.edge(i);if(Ce.has(e,"x"))switch((e.labelpos==="l"||e.labelpos==="r")&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset;break}})}function aoe(t){Ce.forEach(t.edges(),function(i){var e=t.edge(i);e.reversed&&e.points.reverse()})}function soe(t){Ce.forEach(t.nodes(),function(i){if(t.children(i).length){var e=t.node(i),n=t.node(e.borderTop),o=t.node(e.borderBottom),r=t.node(Ce.last(e.borderLeft)),a=t.node(Ce.last(e.borderRight));e.width=Math.abs(a.x-r.x),e.height=Math.abs(o.y-n.y),e.x=r.x+e.width/2,e.y=n.y+e.height/2}}),Ce.forEach(t.nodes(),function(i){t.node(i).dummy==="border"&&t.removeNode(i)})}function loe(t){Ce.forEach(t.edges(),function(i){if(i.v===i.w){var e=t.node(i.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:i,label:t.edge(i)}),t.removeEdge(i)}})}function coe(t){var i=_i.buildLayerMatrix(t);Ce.forEach(i,function(e){var n=0;Ce.forEach(e,function(o,r){var a=t.node(o);a.order=r+n,Ce.forEach(a.selfEdges,function(s){_i.addDummyNode(t,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:r+ ++n,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function doe(t){Ce.forEach(t.nodes(),function(i){var e=t.node(i);if(e.dummy==="selfedge"){var n=t.node(e.e.v),o=n.x+n.width/2,r=n.y,a=e.x-o,s=n.height/2;t.setEdge(e.e,e.label),t.removeNode(i),e.label.points=[{x:o+2*a/3,y:r-s},{x:o+5*a/6,y:r-s},{x:o+a,y:r},{x:o+5*a/6,y:r+s},{x:o+2*a/3,y:r+s}],e.label.x=e.x,e.label.y=e.y}})}function Kg(t,i){return Ce.mapValues(Ce.pick(t,i),Number)}function Yg(t){var i={};return Ce.forEach(t,function(e,n){i[n.toLowerCase()]=e}),i}});var rD=v(($ve,oD)=>{"use strict";var Qh=Je(),uoe=St(),poe=sn().Graph;oD.exports={debugOrdering:hoe};function hoe(t){var i=uoe.buildLayerMatrix(t),e=new poe({compound:!0,multigraph:!0}).setGraph({});return Qh.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),Qh.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),Qh.forEach(i,function(n,o){var r="layer"+o;e.setNode(r,{rank:"same"}),Qh.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var sD=v((Wve,aD)=>{"use strict";aD.exports="0.8.5"});var cD=v((Kve,lD)=>{"use strict";lD.exports={graphlib:sn(),layout:iD(),debug:rD(),util:{time:St().time,notime:St().notime},version:sD()}});var Dv={rail:{label:"Files",collapse:"Collapse files panel",expand:"Expand files panel",resize:"Resize files panel",searchPlaceholder:"Search\u2026",searchAriaLabel:"Search nodes by name or tag",searchMapOn:"Search also filters the map. Click so it filters only the files list.",searchMapOff:"Search filters only the files list. Click so it also filters the map."}};var ss=new ve("MAP_ISOLATE_INTENT",{providedIn:"root",factory:()=>({isolate:()=>{}})});var Pv=`
2
- .p-datatable {
3
- position: relative;
4
- display: block;
5
- }
6
-
7
- .p-datatable-table {
8
- border-spacing: 0;
9
- border-collapse: separate;
10
- width: 100%;
11
- }
12
-
13
- .p-datatable-scrollable > .p-datatable-table-container {
14
- position: relative;
15
- }
16
-
17
- .p-datatable-scrollable-table > .p-datatable-thead {
18
- inset-block-start: 0;
19
- z-index: 1;
20
- }
21
-
22
- .p-datatable-scrollable-table > .p-datatable-frozen-tbody {
23
- position: sticky;
24
- z-index: 1;
25
- }
26
-
27
- .p-datatable-scrollable-table > .p-datatable-tfoot {
28
- inset-block-end: 0;
29
- z-index: 1;
30
- }
31
-
32
- .p-datatable-scrollable .p-datatable-frozen-column {
33
- position: sticky;
34
- }
35
-
36
- .p-datatable-scrollable th.p-datatable-frozen-column {
37
- z-index: 1;
38
- }
39
-
40
- .p-datatable-scrollable td.p-datatable-frozen-column {
41
- background: inherit;
42
- }
43
-
44
- .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead,
45
- .p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {
46
- background: dt('datatable.header.cell.background');
47
- }
48
-
49
- .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot,
50
- .p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
51
- background: dt('datatable.footer.cell.background');
52
- }
53
-
54
- .p-datatable-flex-scrollable {
55
- display: flex;
56
- flex-direction: column;
57
- height: 100%;
58
- }
59
-
60
- .p-datatable-flex-scrollable > .p-datatable-table-container {
61
- display: flex;
62
- flex-direction: column;
63
- flex: 1;
64
- height: 100%;
65
- }
66
-
67
- .p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header {
68
- position: sticky;
69
- z-index: 1;
70
- }
71
-
72
- .p-datatable-resizable-table > .p-datatable-thead > tr > th,
73
- .p-datatable-resizable-table > .p-datatable-tfoot > tr > td,
74
- .p-datatable-resizable-table > .p-datatable-tbody > tr > td {
75
- overflow: hidden;
76
- white-space: nowrap;
77
- }
78
-
79
- .p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) {
80
- background-clip: padding-box;
81
- position: relative;
82
- }
83
-
84
- .p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer {
85
- display: none;
86
- }
87
-
88
- .p-datatable-column-resizer {
89
- display: block;
90
- position: absolute;
91
- inset-block-start: 0;
92
- inset-inline-end: 0;
93
- margin: 0;
94
- width: dt('datatable.column.resizer.width');
95
- height: 100%;
96
- padding: 0;
97
- cursor: col-resize;
98
- border: 1px solid transparent;
99
- }
100
-
101
- .p-datatable-column-header-content {
102
- display: flex;
103
- align-items: center;
104
- gap: dt('datatable.header.cell.gap');
105
- }
106
-
107
- .p-datatable-column-resize-indicator {
108
- width: dt('datatable.resize.indicator.width');
109
- position: absolute;
110
- z-index: 10;
111
- display: none;
112
- background: dt('datatable.resize.indicator.color');
113
- }
114
-
115
- .p-datatable-row-reorder-indicator-up,
116
- .p-datatable-row-reorder-indicator-down {
117
- position: absolute;
118
- display: none;
119
- }
120
-
121
- .p-datatable-reorderable-column,
122
- .p-datatable-reorderable-row-handle {
123
- cursor: move;
124
- }
125
-
126
- .p-datatable-mask {
127
- position: absolute;
128
- display: flex;
129
- align-items: center;
130
- justify-content: center;
131
- z-index: 2;
132
- }
133
-
134
- .p-datatable-inline-filter {
135
- display: flex;
136
- align-items: center;
137
- width: 100%;
138
- gap: dt('datatable.filter.inline.gap');
139
- }
140
-
141
- .p-datatable-inline-filter .p-datatable-filter-element-container {
142
- flex: 1 1 auto;
143
- width: 1%;
144
- }
145
-
146
- .p-datatable-filter-overlay {
147
- background: dt('datatable.filter.overlay.select.background');
148
- color: dt('datatable.filter.overlay.select.color');
149
- border: 1px solid dt('datatable.filter.overlay.select.border.color');
150
- border-radius: dt('datatable.filter.overlay.select.border.radius');
151
- box-shadow: dt('datatable.filter.overlay.select.shadow');
152
- min-width: 12.5rem;
153
- }
154
-
155
- .p-datatable-filter-constraint-list {
156
- margin: 0;
157
- list-style: none;
158
- display: flex;
159
- flex-direction: column;
160
- padding: dt('datatable.filter.constraint.list.padding');
161
- gap: dt('datatable.filter.constraint.list.gap');
162
- }
163
-
164
- .p-datatable-filter-constraint {
165
- padding: dt('datatable.filter.constraint.padding');
166
- color: dt('datatable.filter.constraint.color');
167
- border-radius: dt('datatable.filter.constraint.border.radius');
168
- cursor: pointer;
169
- transition:
170
- background dt('datatable.transition.duration'),
171
- color dt('datatable.transition.duration'),
172
- border-color dt('datatable.transition.duration'),
173
- box-shadow dt('datatable.transition.duration');
174
- }
175
-
176
- .p-datatable-filter-constraint-selected {
177
- background: dt('datatable.filter.constraint.selected.background');
178
- color: dt('datatable.filter.constraint.selected.color');
179
- }
180
-
181
- .p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover {
182
- background: dt('datatable.filter.constraint.focus.background');
183
- color: dt('datatable.filter.constraint.focus.color');
184
- }
185
-
186
- .p-datatable-filter-constraint:focus-visible {
187
- outline: 0 none;
188
- background: dt('datatable.filter.constraint.focus.background');
189
- color: dt('datatable.filter.constraint.focus.color');
190
- }
191
-
192
- .p-datatable-filter-constraint-selected:focus-visible {
193
- outline: 0 none;
194
- background: dt('datatable.filter.constraint.selected.focus.background');
195
- color: dt('datatable.filter.constraint.selected.focus.color');
196
- }
197
-
198
- .p-datatable-filter-constraint-separator {
199
- border-block-start: 1px solid dt('datatable.filter.constraint.separator.border.color');
200
- }
201
-
202
- .p-datatable-popover-filter {
203
- display: inline-flex;
204
- margin-inline-start: auto;
205
- }
206
-
207
- .p-datatable-filter-overlay-popover {
208
- background: dt('datatable.filter.overlay.popover.background');
209
- color: dt('datatable.filter.overlay.popover.color');
210
- border: 1px solid dt('datatable.filter.overlay.popover.border.color');
211
- border-radius: dt('datatable.filter.overlay.popover.border.radius');
212
- box-shadow: dt('datatable.filter.overlay.popover.shadow');
213
- min-width: 12.5rem;
214
- padding: dt('datatable.filter.overlay.popover.padding');
215
- display: flex;
216
- flex-direction: column;
217
- gap: dt('datatable.filter.overlay.popover.gap');
218
- }
219
-
220
- .p-datatable-filter-operator-dropdown {
221
- width: 100%;
222
- }
223
-
224
- .p-datatable-filter-rule-list,
225
- .p-datatable-filter-rule {
226
- display: flex;
227
- flex-direction: column;
228
- gap: dt('datatable.filter.overlay.popover.gap');
229
- }
230
-
231
- .p-datatable-filter-rule {
232
- border-block-end: 1px solid dt('datatable.filter.rule.border.color');
233
- padding-bottom: dt('datatable.filter.overlay.popover.gap');
234
- }
235
-
236
- .p-datatable-filter-rule:last-child {
237
- border-block-end: 0 none;
238
- padding-bottom: 0;
239
- }
240
-
241
- .p-datatable-filter-add-rule-button {
242
- width: 100%;
243
- }
244
-
245
- .p-datatable-filter-remove-rule-button {
246
- width: 100%;
247
- }
248
-
249
- .p-datatable-filter-buttonbar {
250
- padding: 0;
251
- display: flex;
252
- align-items: center;
253
- justify-content: space-between;
254
- }
255
-
256
- .p-datatable-virtualscroller-spacer {
257
- display: flex;
258
- }
259
-
260
- .p-datatable .p-virtualscroller .p-virtualscroller-loading {
261
- transform: none !important;
262
- min-height: 0;
263
- position: sticky;
264
- inset-block-start: 0;
265
- inset-inline-start: 0;
266
- }
267
-
268
- .p-datatable-paginator-top {
269
- border-color: dt('datatable.paginator.top.border.color');
270
- border-style: solid;
271
- border-width: dt('datatable.paginator.top.border.width');
272
- }
273
-
274
- .p-datatable-paginator-bottom {
275
- border-color: dt('datatable.paginator.bottom.border.color');
276
- border-style: solid;
277
- border-width: dt('datatable.paginator.bottom.border.width');
278
- }
279
-
280
- .p-datatable-header {
281
- background: dt('datatable.header.background');
282
- color: dt('datatable.header.color');
283
- border-color: dt('datatable.header.border.color');
284
- border-style: solid;
285
- border-width: dt('datatable.header.border.width');
286
- padding: dt('datatable.header.padding');
287
- }
288
-
289
- .p-datatable-footer {
290
- background: dt('datatable.footer.background');
291
- color: dt('datatable.footer.color');
292
- border-color: dt('datatable.footer.border.color');
293
- border-style: solid;
294
- border-width: dt('datatable.footer.border.width');
295
- padding: dt('datatable.footer.padding');
296
- }
297
-
298
- .p-datatable-header-cell {
299
- padding: dt('datatable.header.cell.padding');
300
- background: dt('datatable.header.cell.background');
301
- border-color: dt('datatable.header.cell.border.color');
302
- border-style: solid;
303
- border-width: 0 0 1px 0;
304
- color: dt('datatable.header.cell.color');
305
- font-weight: normal;
306
- text-align: start;
307
- transition:
308
- background dt('datatable.transition.duration'),
309
- color dt('datatable.transition.duration'),
310
- border-color dt('datatable.transition.duration'),
311
- outline-color dt('datatable.transition.duration'),
312
- box-shadow dt('datatable.transition.duration');
313
- }
314
-
315
- .p-datatable-column-title {
316
- font-weight: dt('datatable.column.title.font.weight');
317
- }
318
-
319
- .p-datatable-tbody > tr {
320
- outline-color: transparent;
321
- background: dt('datatable.row.background');
322
- color: dt('datatable.row.color');
323
- transition:
324
- background dt('datatable.transition.duration'),
325
- color dt('datatable.transition.duration'),
326
- border-color dt('datatable.transition.duration'),
327
- outline-color dt('datatable.transition.duration'),
328
- box-shadow dt('datatable.transition.duration');
329
- }
330
-
331
- .p-datatable-tbody > tr > td {
332
- text-align: start;
333
- border-color: dt('datatable.body.cell.border.color');
334
- border-style: solid;
335
- border-width: 0 0 1px 0;
336
- padding: dt('datatable.body.cell.padding');
337
- }
338
-
339
- .p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {
340
- background: dt('datatable.row.hover.background');
341
- color: dt('datatable.row.hover.color');
342
- }
343
-
344
- .p-datatable-tbody > tr.p-datatable-row-selected {
345
- background: dt('datatable.row.selected.background');
346
- color: dt('datatable.row.selected.color');
347
- }
348
-
349
- .p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td {
350
- border-block-end-color: dt('datatable.body.cell.selected.border.color');
351
- }
352
-
353
- .p-datatable-tbody > tr.p-datatable-row-selected > td {
354
- border-block-end-color: dt('datatable.body.cell.selected.border.color');
355
- }
356
-
357
- .p-datatable-tbody > tr:focus-visible,
358
- .p-datatable-tbody > tr.p-datatable-contextmenu-row-selected {
359
- box-shadow: dt('datatable.row.focus.ring.shadow');
360
- outline: dt('datatable.row.focus.ring.width') dt('datatable.row.focus.ring.style') dt('datatable.row.focus.ring.color');
361
- outline-offset: dt('datatable.row.focus.ring.offset');
362
- }
363
-
364
- .p-datatable-tfoot > tr > td {
365
- text-align: start;
366
- padding: dt('datatable.footer.cell.padding');
367
- border-color: dt('datatable.footer.cell.border.color');
368
- border-style: solid;
369
- border-width: 0 0 1px 0;
370
- color: dt('datatable.footer.cell.color');
371
- background: dt('datatable.footer.cell.background');
372
- }
373
-
374
- .p-datatable-column-footer {
375
- font-weight: dt('datatable.column.footer.font.weight');
376
- }
377
-
378
- .p-datatable-sortable-column {
379
- cursor: pointer;
380
- user-select: none;
381
- outline-color: transparent;
382
- }
383
-
384
- .p-datatable-column-title,
385
- .p-datatable-sort-icon,
386
- .p-datatable-sort-badge {
387
- vertical-align: middle;
388
- }
389
-
390
- .p-datatable-sort-icon {
391
- color: dt('datatable.sort.icon.color');
392
- font-size: dt('datatable.sort.icon.size');
393
- width: dt('datatable.sort.icon.size');
394
- height: dt('datatable.sort.icon.size');
395
- transition: color dt('datatable.transition.duration');
396
- }
397
-
398
- .p-datatable-sortable-column:not(.p-datatable-column-sorted):hover {
399
- background: dt('datatable.header.cell.hover.background');
400
- color: dt('datatable.header.cell.hover.color');
401
- }
402
-
403
- .p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sort-icon {
404
- color: dt('datatable.sort.icon.hover.color');
405
- }
406
-
407
- .p-datatable-column-sorted {
408
- background: dt('datatable.header.cell.selected.background');
409
- color: dt('datatable.header.cell.selected.color');
410
- }
411
-
412
- .p-datatable-column-sorted .p-datatable-sort-icon {
413
- color: dt('datatable.header.cell.selected.color');
414
- }
415
-
416
- .p-datatable-sortable-column:focus-visible {
417
- box-shadow: dt('datatable.header.cell.focus.ring.shadow');
418
- outline: dt('datatable.header.cell.focus.ring.width') dt('datatable.header.cell.focus.ring.style') dt('datatable.header.cell.focus.ring.color');
419
- outline-offset: dt('datatable.header.cell.focus.ring.offset');
420
- }
421
-
422
- .p-datatable-hoverable .p-datatable-selectable-row {
423
- cursor: pointer;
424
- }
425
-
426
- .p-datatable-tbody > tr.p-datatable-dragpoint-top > td {
427
- box-shadow: inset 0 2px 0 0 dt('datatable.drop.point.color');
428
- }
429
-
430
- .p-datatable-tbody > tr.p-datatable-dragpoint-bottom > td {
431
- box-shadow: inset 0 -2px 0 0 dt('datatable.drop.point.color');
432
- }
433
-
434
- .p-datatable-loading-icon {
435
- font-size: dt('datatable.loading.icon.size');
436
- width: dt('datatable.loading.icon.size');
437
- height: dt('datatable.loading.icon.size');
438
- }
439
-
440
- .p-datatable-gridlines .p-datatable-header {
441
- border-width: 1px 1px 0 1px;
442
- }
443
-
444
- .p-datatable-gridlines .p-datatable-footer {
445
- border-width: 0 1px 1px 1px;
446
- }
447
-
448
- .p-datatable-gridlines .p-datatable-paginator-top {
449
- border-width: 1px 1px 0 1px;
450
- }
451
-
452
- .p-datatable-gridlines .p-datatable-paginator-bottom {
453
- border-width: 0 1px 1px 1px;
454
- }
455
-
456
- .p-datatable-gridlines .p-datatable-thead > tr > th {
457
- border-width: 1px 0 1px 1px;
458
- }
459
-
460
- .p-datatable-gridlines .p-datatable-thead > tr > th:last-child {
461
- border-width: 1px;
462
- }
463
-
464
- .p-datatable-gridlines .p-datatable-tbody > tr > td {
465
- border-width: 1px 0 0 1px;
466
- }
467
-
468
- .p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {
469
- border-width: 1px 1px 0 1px;
470
- }
471
-
472
- .p-datatable-gridlines .p-datatable-tbody > tr:last-child > td {
473
- border-width: 1px 0 1px 1px;
474
- }
475
-
476
- .p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child {
477
- border-width: 1px;
478
- }
479
-
480
- .p-datatable-gridlines .p-datatable-tfoot > tr > td {
481
- border-width: 1px 0 1px 1px;
482
- }
483
-
484
- .p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {
485
- border-width: 1px 1px 1px 1px;
486
- }
487
-
488
- .p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td {
489
- border-width: 0 0 1px 1px;
490
- }
491
-
492
- .p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child {
493
- border-width: 0 1px 1px 1px;
494
- }
495
-
496
- .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td {
497
- border-width: 0 0 1px 1px;
498
- }
499
-
500
- .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td:last-child {
501
- border-width: 0 1px 1px 1px;
502
- }
503
-
504
- .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td {
505
- border-width: 0 0 0 1px;
506
- }
507
-
508
- .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {
509
- border-width: 0 1px 0 1px;
510
- }
511
-
512
- .p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd {
513
- background: dt('datatable.row.striped.background');
514
- }
515
-
516
- .p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd.p-datatable-row-selected {
517
- background: dt('datatable.row.selected.background');
518
- color: dt('datatable.row.selected.color');
519
- }
520
-
521
- .p-datatable-striped.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {
522
- background: dt('datatable.row.hover.background');
523
- color: dt('datatable.row.hover.color');
524
- }
525
-
526
- .p-datatable.p-datatable-sm .p-datatable-header {
527
- padding: dt('datatable.header.sm.padding');
528
- }
529
-
530
- .p-datatable.p-datatable-sm .p-datatable-thead > tr > th {
531
- padding: dt('datatable.header.cell.sm.padding');
532
- }
533
-
534
- .p-datatable.p-datatable-sm .p-datatable-tbody > tr > td {
535
- padding: dt('datatable.body.cell.sm.padding');
536
- }
537
-
538
- .p-datatable.p-datatable-sm .p-datatable-tfoot > tr > td {
539
- padding: dt('datatable.footer.cell.sm.padding');
540
- }
541
-
542
- .p-datatable.p-datatable-sm .p-datatable-footer {
543
- padding: dt('datatable.footer.sm.padding');
544
- }
545
-
546
- .p-datatable.p-datatable-lg .p-datatable-header {
547
- padding: dt('datatable.header.lg.padding');
548
- }
549
-
550
- .p-datatable.p-datatable-lg .p-datatable-thead > tr > th {
551
- padding: dt('datatable.header.cell.lg.padding');
552
- }
553
-
554
- .p-datatable.p-datatable-lg .p-datatable-tbody > tr > td {
555
- padding: dt('datatable.body.cell.lg.padding');
556
- }
557
-
558
- .p-datatable.p-datatable-lg .p-datatable-tfoot > tr > td {
559
- padding: dt('datatable.footer.cell.lg.padding');
560
- }
561
-
562
- .p-datatable.p-datatable-lg .p-datatable-footer {
563
- padding: dt('datatable.footer.lg.padding');
564
- }
565
-
566
- .p-datatable-row-toggle-button {
567
- display: inline-flex;
568
- align-items: center;
569
- justify-content: center;
570
- overflow: hidden;
571
- position: relative;
572
- width: dt('datatable.row.toggle.button.size');
573
- height: dt('datatable.row.toggle.button.size');
574
- color: dt('datatable.row.toggle.button.color');
575
- border: 0 none;
576
- background: transparent;
577
- cursor: pointer;
578
- border-radius: dt('datatable.row.toggle.button.border.radius');
579
- transition:
580
- background dt('datatable.transition.duration'),
581
- color dt('datatable.transition.duration'),
582
- border-color dt('datatable.transition.duration'),
583
- outline-color dt('datatable.transition.duration'),
584
- box-shadow dt('datatable.transition.duration');
585
- outline-color: transparent;
586
- user-select: none;
587
- }
588
-
589
- .p-datatable-row-toggle-button:enabled:hover {
590
- color: dt('datatable.row.toggle.button.hover.color');
591
- background: dt('datatable.row.toggle.button.hover.background');
592
- }
593
-
594
- .p-datatable-tbody > tr.p-datatable-row-selected .p-datatable-row-toggle-button:hover {
595
- background: dt('datatable.row.toggle.button.selected.hover.background');
596
- color: dt('datatable.row.toggle.button.selected.hover.color');
597
- }
598
-
599
- .p-datatable-row-toggle-button:focus-visible {
600
- box-shadow: dt('datatable.row.toggle.button.focus.ring.shadow');
601
- outline: dt('datatable.row.toggle.button.focus.ring.width') dt('datatable.row.toggle.button.focus.ring.style') dt('datatable.row.toggle.button.focus.ring.color');
602
- outline-offset: dt('datatable.row.toggle.button.focus.ring.offset');
603
- }
604
-
605
- .p-datatable-row-toggle-icon:dir(rtl) {
606
- transform: rotate(180deg);
607
- }
608
- `;var KP=["data-p-icon","angle-double-left"],Rv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Z],attrs:KP,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var YP=["data-p-icon","angle-double-right"],Ov=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Z],attrs:YP,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var XP=["data-p-icon","angle-left"],Fv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Z],attrs:XP,decls:1,vars:0,consts:[["d","M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var ZP=["data-p-icon","angle-right"],Nv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Z],attrs:ZP,decls:1,vars:0,consts:[["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var QP=["data-p-icon","arrow-down"],Mf=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Z],attrs:QP,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var JP=["data-p-icon","arrow-up"],Df=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Z],attrs:JP,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var e3=["data-p-icon","calendar"],Av=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","calendar"]],features:[Z],attrs:e3,decls:1,vars:0,consts:[["d","M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var t3=["data-p-icon","chevron-left"],Lv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Z],attrs:t3,decls:1,vars:0,consts:[["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var n3=["data-p-icon","chevron-right"],Bv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Z],attrs:n3,decls:1,vars:0,consts:[["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var i3=["data-p-icon","chevron-up"],Vv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Z],attrs:i3,decls:1,vars:0,consts:[["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var o3=["data-p-icon","filter"],zv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter"]],features:[Z],attrs:o3,decls:5,vars:2,consts:[["d","M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var r3=["data-p-icon","filter-slash"],Hv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Z],attrs:r3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var a3=["data-p-icon","plus"],qv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","plus"]],features:[Z],attrs:a3,decls:5,vars:2,consts:[["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var s3=["data-p-icon","sort-alt"],Gv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Z],attrs:s3,decls:8,vars:2,consts:[["d","M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z","fill","currentColor"],["d","M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z","fill","currentColor"],["d","M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z","fill","currentColor"],["d","M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),ie(),Q(5,"defs")(6,"clipPath",4),oe(7,"rect",5),ie()()),n&2&&(O("clip-path",o.pathId),l(6),Ze("id",o.pathId))},encapsulation:2})}return t})();var l3=["data-p-icon","sort-amount-down"],jv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Z],attrs:l3,decls:5,vars:2,consts:[["d","M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var c3=["data-p-icon","sort-amount-up-alt"],Uv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Z],attrs:c3,decls:5,vars:2,consts:[["d","M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var d3=["data-p-icon","trash"],$v=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","trash"]],features:[Z],attrs:d3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(X(),Q(0,"g"),oe(1,"path",0),ie(),Q(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Ze("id",o.pathId))},encapsulation:2})}return t})();var Wv=`
609
- .p-datepicker {
610
- display: inline-flex;
611
- max-width: 100%;
612
- }
613
-
614
- .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-input {
615
- border-start-end-radius: 0;
616
- border-end-end-radius: 0;
617
- }
618
-
619
- .p-datepicker-input {
620
- flex: 1 1 auto;
621
- width: 1%;
622
- }
623
-
624
- .p-datepicker-dropdown {
625
- cursor: pointer;
626
- display: inline-flex;
627
- user-select: none;
628
- align-items: center;
629
- justify-content: center;
630
- overflow: hidden;
631
- position: relative;
632
- width: dt('datepicker.dropdown.width');
633
- border-start-end-radius: dt('datepicker.dropdown.border.radius');
634
- border-end-end-radius: dt('datepicker.dropdown.border.radius');
635
- background: dt('datepicker.dropdown.background');
636
- border: 1px solid dt('datepicker.dropdown.border.color');
637
- border-inline-start: 0 none;
638
- color: dt('datepicker.dropdown.color');
639
- transition:
640
- background dt('datepicker.transition.duration'),
641
- color dt('datepicker.transition.duration'),
642
- border-color dt('datepicker.transition.duration'),
643
- outline-color dt('datepicker.transition.duration');
644
- outline-color: transparent;
645
- }
646
-
647
- .p-datepicker-dropdown:not(:disabled):hover {
648
- background: dt('datepicker.dropdown.hover.background');
649
- border-color: dt('datepicker.dropdown.hover.border.color');
650
- color: dt('datepicker.dropdown.hover.color');
651
- }
652
-
653
- .p-datepicker-dropdown:not(:disabled):active {
654
- background: dt('datepicker.dropdown.active.background');
655
- border-color: dt('datepicker.dropdown.active.border.color');
656
- color: dt('datepicker.dropdown.active.color');
657
- }
658
-
659
- .p-datepicker-dropdown:focus-visible {
660
- box-shadow: dt('datepicker.dropdown.focus.ring.shadow');
661
- outline: dt('datepicker.dropdown.focus.ring.width') dt('datepicker.dropdown.focus.ring.style') dt('datepicker.dropdown.focus.ring.color');
662
- outline-offset: dt('datepicker.dropdown.focus.ring.offset');
663
- }
664
-
665
- .p-datepicker:has(.p-datepicker-input-icon-container) {
666
- position: relative;
667
- }
668
-
669
- .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-input {
670
- padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
671
- }
672
-
673
- .p-datepicker-input-icon-container {
674
- cursor: pointer;
675
- position: absolute;
676
- top: 50%;
677
- inset-inline-end: dt('form.field.padding.x');
678
- margin-block-start: calc(-1 * (dt('icon.size') / 2));
679
- color: dt('datepicker.input.icon.color');
680
- line-height: 1;
681
- z-index: 1;
682
- }
683
-
684
- .p-datepicker:has(.p-datepicker-input:disabled) .p-datepicker-input-icon-container {
685
- cursor: default;
686
- }
687
-
688
- .p-datepicker-fluid {
689
- display: flex;
690
- }
691
-
692
- .p-datepicker .p-datepicker-panel {
693
- min-width: 100%;
694
- }
695
-
696
- .p-datepicker-panel {
697
- width: auto;
698
- padding: dt('datepicker.panel.padding');
699
- background: dt('datepicker.panel.background');
700
- color: dt('datepicker.panel.color');
701
- border: 1px solid dt('datepicker.panel.border.color');
702
- border-radius: dt('datepicker.panel.border.radius');
703
- box-shadow: dt('datepicker.panel.shadow');
704
- }
705
-
706
- .p-datepicker-panel-inline {
707
- display: inline-block;
708
- overflow-x: auto;
709
- box-shadow: none;
710
- }
711
-
712
- .p-datepicker-header {
713
- display: flex;
714
- align-items: center;
715
- justify-content: space-between;
716
- padding: dt('datepicker.header.padding');
717
- background: dt('datepicker.header.background');
718
- color: dt('datepicker.header.color');
719
- border-block-end: 1px solid dt('datepicker.header.border.color');
720
- }
721
-
722
- .p-datepicker-next-button:dir(rtl) {
723
- order: -1;
724
- }
725
-
726
- .p-datepicker-prev-button:dir(rtl) {
727
- order: 1;
728
- }
729
-
730
- .p-datepicker-title {
731
- display: flex;
732
- align-items: center;
733
- justify-content: space-between;
734
- gap: dt('datepicker.title.gap');
735
- font-weight: dt('datepicker.title.font.weight');
736
- }
737
-
738
- .p-datepicker-select-year,
739
- .p-datepicker-select-month {
740
- border: none;
741
- background: transparent;
742
- margin: 0;
743
- cursor: pointer;
744
- font-weight: inherit;
745
- transition:
746
- background dt('datepicker.transition.duration'),
747
- color dt('datepicker.transition.duration'),
748
- border-color dt('datepicker.transition.duration'),
749
- outline-color dt('datepicker.transition.duration'),
750
- box-shadow dt('datepicker.transition.duration');
751
- }
752
-
753
- .p-datepicker-select-month {
754
- padding: dt('datepicker.select.month.padding');
755
- color: dt('datepicker.select.month.color');
756
- border-radius: dt('datepicker.select.month.border.radius');
757
- }
758
-
759
- .p-datepicker-select-year {
760
- padding: dt('datepicker.select.year.padding');
761
- color: dt('datepicker.select.year.color');
762
- border-radius: dt('datepicker.select.year.border.radius');
763
- }
764
-
765
- .p-datepicker-select-month:enabled:hover {
766
- background: dt('datepicker.select.month.hover.background');
767
- color: dt('datepicker.select.month.hover.color');
768
- }
769
-
770
- .p-datepicker-select-year:enabled:hover {
771
- background: dt('datepicker.select.year.hover.background');
772
- color: dt('datepicker.select.year.hover.color');
773
- }
774
-
775
- .p-datepicker-select-month:focus-visible,
776
- .p-datepicker-select-year:focus-visible {
777
- box-shadow: dt('datepicker.date.focus.ring.shadow');
778
- outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
779
- outline-offset: dt('datepicker.date.focus.ring.offset');
780
- }
781
-
782
- .p-datepicker-calendar-container {
783
- display: flex;
784
- }
785
-
786
- .p-datepicker-calendar-container .p-datepicker-calendar {
787
- flex: 1 1 auto;
788
- border-inline-start: 1px solid dt('datepicker.group.border.color');
789
- padding-inline-end: dt('datepicker.group.gap');
790
- padding-inline-start: dt('datepicker.group.gap');
791
- }
792
-
793
- .p-datepicker-calendar-container .p-datepicker-calendar:first-child {
794
- padding-inline-start: 0;
795
- border-inline-start: 0 none;
796
- }
797
-
798
- .p-datepicker-calendar-container .p-datepicker-calendar:last-child {
799
- padding-inline-end: 0;
800
- }
801
-
802
- .p-datepicker-day-view {
803
- width: 100%;
804
- border-collapse: collapse;
805
- font-size: 1rem;
806
- margin: dt('datepicker.day.view.margin');
807
- }
808
-
809
- .p-datepicker-weekday-cell {
810
- padding: dt('datepicker.week.day.padding');
811
- }
812
-
813
- .p-datepicker-weekday {
814
- font-weight: dt('datepicker.week.day.font.weight');
815
- color: dt('datepicker.week.day.color');
816
- }
817
-
818
- .p-datepicker-day-cell {
819
- padding: dt('datepicker.date.padding');
820
- }
821
-
822
- .p-datepicker-day {
823
- display: flex;
824
- justify-content: center;
825
- align-items: center;
826
- cursor: pointer;
827
- margin: 0 auto;
828
- overflow: hidden;
829
- position: relative;
830
- width: dt('datepicker.date.width');
831
- height: dt('datepicker.date.height');
832
- border-radius: dt('datepicker.date.border.radius');
833
- transition:
834
- background dt('datepicker.transition.duration'),
835
- color dt('datepicker.transition.duration'),
836
- border-color dt('datepicker.transition.duration'),
837
- box-shadow dt('datepicker.transition.duration'),
838
- outline-color dt('datepicker.transition.duration');
839
- border: 1px solid transparent;
840
- outline-color: transparent;
841
- color: dt('datepicker.date.color');
842
- }
843
-
844
- .p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover {
845
- background: dt('datepicker.date.hover.background');
846
- color: dt('datepicker.date.hover.color');
847
- }
848
-
849
- .p-datepicker-day:focus-visible {
850
- box-shadow: dt('datepicker.date.focus.ring.shadow');
851
- outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
852
- outline-offset: dt('datepicker.date.focus.ring.offset');
853
- }
854
-
855
- .p-datepicker-day-selected {
856
- background: dt('datepicker.date.selected.background');
857
- color: dt('datepicker.date.selected.color');
858
- }
859
-
860
- .p-datepicker-day-selected-range {
861
- background: dt('datepicker.date.range.selected.background');
862
- color: dt('datepicker.date.range.selected.color');
863
- }
864
-
865
- .p-datepicker-today > .p-datepicker-day {
866
- background: dt('datepicker.today.background');
867
- color: dt('datepicker.today.color');
868
- }
869
-
870
- .p-datepicker-today > .p-datepicker-day-selected {
871
- background: dt('datepicker.date.selected.background');
872
- color: dt('datepicker.date.selected.color');
873
- }
874
-
875
- .p-datepicker-today > .p-datepicker-day-selected-range {
876
- background: dt('datepicker.date.range.selected.background');
877
- color: dt('datepicker.date.range.selected.color');
878
- }
879
-
880
- .p-datepicker-weeknumber {
881
- text-align: center;
882
- }
883
-
884
- .p-datepicker-month-view {
885
- margin: dt('datepicker.month.view.margin');
886
- }
887
-
888
- .p-datepicker-month {
889
- width: 33.3%;
890
- display: inline-flex;
891
- align-items: center;
892
- justify-content: center;
893
- cursor: pointer;
894
- overflow: hidden;
895
- position: relative;
896
- padding: dt('datepicker.month.padding');
897
- transition:
898
- background dt('datepicker.transition.duration'),
899
- color dt('datepicker.transition.duration'),
900
- border-color dt('datepicker.transition.duration'),
901
- box-shadow dt('datepicker.transition.duration'),
902
- outline-color dt('datepicker.transition.duration');
903
- border-radius: dt('datepicker.month.border.radius');
904
- outline-color: transparent;
905
- color: dt('datepicker.date.color');
906
- }
907
-
908
- .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover {
909
- color: dt('datepicker.date.hover.color');
910
- background: dt('datepicker.date.hover.background');
911
- }
912
-
913
- .p-datepicker-month-selected {
914
- color: dt('datepicker.date.selected.color');
915
- background: dt('datepicker.date.selected.background');
916
- }
917
-
918
- .p-datepicker-month:not(.p-disabled):focus-visible {
919
- box-shadow: dt('datepicker.date.focus.ring.shadow');
920
- outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
921
- outline-offset: dt('datepicker.date.focus.ring.offset');
922
- }
923
-
924
- .p-datepicker-year-view {
925
- margin: dt('datepicker.year.view.margin');
926
- }
927
-
928
- .p-datepicker-year {
929
- width: 50%;
930
- display: inline-flex;
931
- align-items: center;
932
- justify-content: center;
933
- cursor: pointer;
934
- overflow: hidden;
935
- position: relative;
936
- padding: dt('datepicker.year.padding');
937
- transition:
938
- background dt('datepicker.transition.duration'),
939
- color dt('datepicker.transition.duration'),
940
- border-color dt('datepicker.transition.duration'),
941
- box-shadow dt('datepicker.transition.duration'),
942
- outline-color dt('datepicker.transition.duration');
943
- border-radius: dt('datepicker.year.border.radius');
944
- outline-color: transparent;
945
- color: dt('datepicker.date.color');
946
- }
947
-
948
- .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover {
949
- color: dt('datepicker.date.hover.color');
950
- background: dt('datepicker.date.hover.background');
951
- }
952
-
953
- .p-datepicker-year-selected {
954
- color: dt('datepicker.date.selected.color');
955
- background: dt('datepicker.date.selected.background');
956
- }
957
-
958
- .p-datepicker-year:not(.p-disabled):focus-visible {
959
- box-shadow: dt('datepicker.date.focus.ring.shadow');
960
- outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
961
- outline-offset: dt('datepicker.date.focus.ring.offset');
962
- }
963
-
964
- .p-datepicker-buttonbar {
965
- display: flex;
966
- justify-content: space-between;
967
- align-items: center;
968
- padding: dt('datepicker.buttonbar.padding');
969
- border-block-start: 1px solid dt('datepicker.buttonbar.border.color');
970
- }
971
-
972
- .p-datepicker-buttonbar .p-button {
973
- width: auto;
974
- }
975
-
976
- .p-datepicker-time-picker {
977
- display: flex;
978
- justify-content: center;
979
- align-items: center;
980
- border-block-start: 1px solid dt('datepicker.time.picker.border.color');
981
- padding: 0;
982
- gap: dt('datepicker.time.picker.gap');
983
- }
984
-
985
- .p-datepicker-calendar-container + .p-datepicker-time-picker {
986
- padding: dt('datepicker.time.picker.padding');
987
- }
988
-
989
- .p-datepicker-time-picker > div {
990
- display: flex;
991
- align-items: center;
992
- flex-direction: column;
993
- gap: dt('datepicker.time.picker.button.gap');
994
- }
995
-
996
- .p-datepicker-time-picker span {
997
- font-size: 1rem;
998
- }
999
-
1000
- .p-datepicker-timeonly .p-datepicker-time-picker {
1001
- border-block-start: 0 none;
1002
- }
1003
-
1004
- .p-datepicker-time-picker:dir(rtl) {
1005
- flex-direction: row-reverse;
1006
- }
1007
-
1008
- .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown {
1009
- width: dt('datepicker.dropdown.sm.width');
1010
- }
1011
-
1012
- .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown .p-icon,
1013
- .p-datepicker:has(.p-inputtext-sm) .p-datepicker-input-icon {
1014
- font-size: dt('form.field.sm.font.size');
1015
- width: dt('form.field.sm.font.size');
1016
- height: dt('form.field.sm.font.size');
1017
- }
1018
-
1019
- .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown {
1020
- width: dt('datepicker.dropdown.lg.width');
1021
- }
1022
-
1023
- .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon,
1024
- .p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon {
1025
- font-size: dt('form.field.lg.font.size');
1026
- width: dt('form.field.lg.font.size');
1027
- height: dt('form.field.lg.font.size');
1028
- }
1029
-
1030
- .p-datepicker-clear-icon {
1031
- position: absolute;
1032
- top: 50%;
1033
- margin-top: -0.5rem;
1034
- cursor: pointer;
1035
- color: dt('form.field.icon.color');
1036
- inset-inline-end: dt('form.field.padding.x');
1037
- }
1038
-
1039
- .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-clear-icon {
1040
- inset-inline-end: calc(dt('datepicker.dropdown.width') + dt('form.field.padding.x'));
1041
- }
1042
-
1043
- .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-clear-icon {
1044
- inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1045
- }
1046
-
1047
- .p-datepicker:has(.p-datepicker-clear-icon) .p-datepicker-input {
1048
- padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1049
- }
1050
-
1051
- .p-datepicker:has(.p-datepicker-input-icon-container):has(.p-datepicker-clear-icon) .p-datepicker-input {
1052
- padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
1053
- }
1054
-
1055
- .p-inputgroup .p-datepicker-dropdown {
1056
- border-radius: 0;
1057
- }
1058
-
1059
- .p-inputgroup > .p-datepicker:last-child:has(.p-datepicker-dropdown) > .p-datepicker-input {
1060
- border-start-end-radius: 0;
1061
- border-end-end-radius: 0;
1062
- }
1063
-
1064
- .p-inputgroup > .p-datepicker:last-child .p-datepicker-dropdown {
1065
- border-start-end-radius: dt('datepicker.dropdown.border.radius');
1066
- border-end-end-radius: dt('datepicker.dropdown.border.radius');
1067
- }
1068
- `;var p3=["date"],h3=["header"],f3=["footer"],m3=["disabledDate"],_3=["decade"],g3=["previousicon"],v3=["nexticon"],b3=["triggericon"],y3=["clearicon"],C3=["decrementicon"],x3=["incrementicon"],w3=["inputicon"],T3=["buttonbar"],S3=["inputfield"],k3=["contentWrapper"],I3=[[["p-header"]],[["p-footer"]]],E3=["p-header","p-footer"],M3=t=>({clickCallBack:t}),Kv=t=>({visibility:t}),Of=t=>({$implicit:t}),D3=t=>({date:t}),P3=(t,i)=>({month:t,index:i}),R3=t=>({year:t}),O3=(t,i)=>({todayCallback:t,clearCallback:i});function F3(t,i){if(t&1){let e=Y();X(),f(0,"svg",13),L("click",function(){w(e);let o=d(3);return T(o.clear())}),m()}if(t&2){let e=d(3);G(e.cx("clearIcon")),_("pBind",e.ptm("inputIcon"))}}function N3(t,i){}function A3(t,i){t&1&&D(0,N3,0,0,"ng-template")}function L3(t,i){if(t&1){let e=Y();f(0,"span",14),L("click",function(){w(e);let o=d(3);return T(o.clear())}),D(1,A3,1,0,null,6),m()}if(t&2){let e=d(3);G(e.cx("clearIcon")),_("pBind",e.ptm("inputIcon")),l(),_("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function B3(t,i){if(t&1&&(we(0),D(1,F3,1,3,"svg",11)(2,L3,2,4,"span",12),Te()),t&2){let e=d(2);l(),_("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),_("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function V3(t,i){if(t&1&&F(0,"span",17),t&2){let e=d(3);_("ngClass",e.icon)("pBind",e.ptm("dropdownIcon"))}}function z3(t,i){if(t&1&&(X(),F(0,"svg",19)),t&2){let e=d(4);_("pBind",e.ptm("dropdownIcon"))}}function H3(t,i){}function q3(t,i){t&1&&D(0,H3,0,0,"ng-template")}function G3(t,i){if(t&1&&(we(0),D(1,z3,1,1,"svg",18)(2,q3,1,0,null,6),Te()),t&2){let e=d(3);l(),_("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),l(),_("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function j3(t,i){if(t&1){let e=Y();f(0,"button",15),L("click",function(o){w(e),d();let r=_t(1),a=d();return T(a.onButtonClick(o,r))}),D(1,V3,1,2,"span",16)(2,G3,3,2,"ng-container",7),m()}if(t&2){let e=d(2);G(e.cx("dropdown")),_("disabled",e.$disabled())("pBind",e.ptm("dropdown")),O("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null),l(),_("ngIf",e.icon),l(),_("ngIf",!e.icon)}}function U3(t,i){if(t&1){let e=Y();X(),f(0,"svg",23),L("click",function(o){w(e);let r=d(3);return T(r.onButtonClick(o))}),m()}if(t&2){let e=d(3);G(e.cx("inputIcon")),_("pBind",e.ptm("inputIcon"))}}function $3(t,i){t&1&&le(0)}function W3(t,i){if(t&1&&(we(0),f(1,"span",20),D(2,U3,1,3,"svg",21)(3,$3,1,0,"ng-container",22),m(),Te()),t&2){let e=d(2);l(),G(e.cx("inputIconContainer")),_("pBind",e.ptm("inputIconContainer")),O("data-p",e.inputIconDataP),l(),_("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),l(),_("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",Pe(7,M3,e.onButtonClick.bind(e)))}}function K3(t,i){if(t&1){let e=Y();f(0,"input",9,1),L("focus",function(o){w(e);let r=d();return T(r.onInputFocus(o))})("keydown",function(o){w(e);let r=d();return T(r.onInputKeydown(o))})("click",function(){w(e);let o=d();return T(o.onInputClick())})("blur",function(o){w(e);let r=d();return T(r.onInputBlur(o))})("input",function(o){w(e);let r=d();return T(r.onUserInput(o))}),m(),D(2,B3,3,2,"ng-container",7)(3,j3,3,9,"button",10)(4,W3,4,9,"ng-container",7)}if(t&2){let e=d();G(e.cn(e.cx("pcInputText"),e.inputStyleClass)),_("pSize",e.size())("value",e.inputFieldValue)("ngStyle",e.inputStyle)("pAutoFocus",e.autofocus)("variant",e.$variant())("fluid",e.hasFluid)("invalid",e.invalid())("pt",e.ptm("pcInputText"))("unstyled",e.unstyled()),O("size",e.inputSize())("id",e.inputId)("name",e.name())("aria-required",e.required())("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("required",e.required()?"":void 0)("readonly",e.readonlyInput?"":void 0)("disabled",e.$disabled()?"":void 0)("placeholder",e.placeholder)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null),l(2),_("ngIf",e.showClear&&!e.$disabled()&&(e.inputfieldViewChild==null||e.inputfieldViewChild.nativeElement==null?null:e.inputfieldViewChild.nativeElement.value)),l(),_("ngIf",e.showIcon&&e.iconDisplay==="button"),l(),_("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function Y3(t,i){t&1&&le(0)}function X3(t,i){t&1&&(X(),F(0,"svg",30))}function Z3(t,i){}function Q3(t,i){t&1&&D(0,Z3,0,0,"ng-template")}function J3(t,i){if(t&1&&(f(0,"span"),D(1,Q3,1,0,null,6),m()),t&2){let e=d(4);l(),_("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function eR(t,i){if(t&1&&D(0,X3,1,0,"svg",29)(1,J3,2,1,"span",7),t&2){let e=d(3);_("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),l(),_("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function tR(t,i){if(t&1){let e=Y();f(0,"button",31),L("click",function(o){w(e);let r=d(3);return T(r.switchToMonthView(o))})("keydown",function(o){w(e);let r=d(3);return T(r.onContainerButtonKeydown(o))}),b(1),m()}if(t&2){let e=d().$implicit,n=d(2);G(n.cx("selectMonth")),_("pBind",n.ptm("selectMonth")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseMonth"))("data-pc-group-section","navigator"),l(),Se(" ",n.getMonthName(e.month)," ")}}function nR(t,i){if(t&1){let e=Y();f(0,"button",31),L("click",function(o){w(e);let r=d(3);return T(r.switchToYearView(o))})("keydown",function(o){w(e);let r=d(3);return T(r.onContainerButtonKeydown(o))}),b(1),m()}if(t&2){let e=d().$implicit,n=d(2);G(n.cx("selectYear")),_("pBind",n.ptm("selectYear")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseYear"))("data-pc-group-section","navigator"),l(),Se(" ",n.getYear(e)," ")}}function iR(t,i){if(t&1&&(we(0),b(1),Te()),t&2){let e=d(4);l(),b0("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function oR(t,i){t&1&&le(0)}function rR(t,i){if(t&1&&(f(0,"span",20),D(1,iR,2,2,"ng-container",7)(2,oR,1,0,"ng-container",22),m()),t&2){let e=d(3);G(e.cx("decade")),_("pBind",e.ptm("decade")),l(),_("ngIf",!e.decadeTemplate&&!e._decadeTemplate),l(),_("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Pe(6,Of,e.yearPickerValues))}}function aR(t,i){t&1&&(X(),F(0,"svg",33))}function sR(t,i){}function lR(t,i){t&1&&D(0,sR,0,0,"ng-template")}function cR(t,i){if(t&1&&(we(0),D(1,lR,1,0,null,6),Te()),t&2){let e=d(4);l(),_("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function dR(t,i){if(t&1&&D(0,aR,1,0,"svg",32)(1,cR,2,1,"ng-container",7),t&2){let e=d(3);_("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),l(),_("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function uR(t,i){if(t&1&&(f(0,"th",20)(1,"span",20),b(2),m()()),t&2){let e=d(4);G(e.cx("weekHeader")),_("pBind",e.ptm("weekHeader")),l(),_("pBind",e.ptm("weekHeaderLabel")),l(),x(e.getTranslation("weekHeader"))}}function pR(t,i){if(t&1&&(f(0,"th",37)(1,"span",20),b(2),m()()),t&2){let e=i.$implicit,n=d(4);G(n.cx("weekDayCell")),_("pBind",n.ptm("weekDayCell")),l(),G(n.cx("weekDay")),_("pBind",n.ptm("weekDay")),l(),x(e)}}function hR(t,i){if(t&1&&(f(0,"td",20)(1,"span",20),b(2),m()()),t&2){let e=d().index,n=d(2).$implicit,o=d(2);G(o.cx("weekNumber")),_("pBind",o.ptm("weekNumber")),l(),G(o.cx("weekLabelContainer")),_("pBind",o.ptm("weekLabelContainer")),l(),Se(" ",n.weekNumbers[e]," ")}}function fR(t,i){if(t&1&&(we(0),b(1),Te()),t&2){let e=d(2).$implicit;l(),x(e.day)}}function mR(t,i){t&1&&le(0)}function _R(t,i){if(t&1&&(we(0),D(1,mR,1,0,"ng-container",22),Te()),t&2){let e=d(2).$implicit,n=d(5);l(),_("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Pe(2,Of,e))}}function gR(t,i){t&1&&le(0)}function vR(t,i){if(t&1&&(we(0),D(1,gR,1,0,"ng-container",22),Te()),t&2){let e=d(2).$implicit,n=d(5);l(),_("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Pe(2,Of,e))}}function bR(t,i){if(t&1&&(f(0,"div",40),b(1),m()),t&2){let e=d(2).$implicit;l(),Se(" ",e.day," ")}}function yR(t,i){if(t&1){let e=Y();we(0),f(1,"span",38),L("click",function(o){w(e);let r=d().$implicit,a=d(5);return T(a.onDateSelect(o,r))})("keydown",function(o){w(e);let r=d().$implicit,a=d(3).index,s=d(2);return T(s.onDateCellKeydown(o,r,a))}),D(2,fR,2,1,"ng-container",7)(3,_R,2,4,"ng-container",7)(4,vR,2,4,"ng-container",7),m(),D(5,bR,2,1,"div",39),Te()}if(t&2){let e=d().$implicit,n=d(5);l(),_("ngClass",n.dayClass(e))("pBind",n.ptm("day")),O("data-date",n.formatDateKey(n.formatDateMetaToDate(e))),l(),_("ngIf",!n.dateTemplate&&!n._dateTemplate&&(e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate)),l(),_("ngIf",e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate),l(),_("ngIf",!e.selectable),l(),_("ngIf",n.isSelected(e))}}function CR(t,i){if(t&1&&(f(0,"td",20),D(1,yR,6,7,"ng-container",7),m()),t&2){let e=i.$implicit,n=d(5);G(n.cx("dayCell",Pe(5,D3,e))),_("pBind",n.ptm("dayCell")),O("aria-label",e.day),l(),_("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function xR(t,i){if(t&1&&(f(0,"tr",20),D(1,hR,3,7,"td",8)(2,CR,2,7,"td",24),m()),t&2){let e=i.$implicit,n=d(4);_("pBind",n.ptm("tableBodyRow")),l(),_("ngIf",n.showWeek),l(),_("ngForOf",e)}}function wR(t,i){if(t&1&&(f(0,"table",34)(1,"thead",20)(2,"tr",20),D(3,uR,3,5,"th",8)(4,pR,3,7,"th",35),m()(),f(5,"tbody",20),D(6,xR,3,3,"tr",36),m()()),t&2){let e=d().$implicit,n=d(2);G(n.cx("dayView")),_("pBind",n.ptm("table")),l(),_("pBind",n.ptm("tableHeader")),l(),_("pBind",n.ptm("tableHeaderRow")),l(),_("ngIf",n.showWeek),l(),_("ngForOf",n.weekDays),l(),_("pBind",n.ptm("tableBody")),l(),_("ngForOf",e.dates)}}function TR(t,i){if(t&1){let e=Y();f(0,"div",20)(1,"div",20)(2,"p-button",25),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onPrevButtonClick(o))}),D(3,eR,2,2,"ng-template",null,2,je),m(),f(5,"div",20),D(6,tR,2,7,"button",26)(7,nR,2,7,"button",26)(8,rR,3,8,"span",8),m(),f(9,"p-button",27),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onNextButtonClick(o))}),D(10,dR,2,2,"ng-template",null,2,je),m()(),D(12,wR,7,9,"table",28),m()}if(t&2){let e=i.index,n=d(2);G(n.cx("calendar")),_("pBind",n.ptm("calendar")),l(),G(n.cx("header")),_("pBind",n.ptm("header")),l(),_("styleClass",n.cx("pcPrevButton"))("ngStyle",Pe(23,Kv,e===0?"visible":"hidden"))("ariaLabel",n.prevIconAriaLabel)("pt",n.ptm("pcPrevButton")),O("data-pc-group-section","navigator"),l(3),G(n.cx("title")),_("pBind",n.ptm("title")),l(),_("ngIf",n.currentView==="date"),l(),_("ngIf",n.currentView!=="year"),l(),_("ngIf",n.currentView==="year"),l(),_("styleClass",n.cx("pcNextButton"))("ngStyle",Pe(25,Kv,e===n.months.length-1?"visible":"hidden"))("ariaLabel",n.nextIconAriaLabel)("pt",n.ptm("pcNextButton")),O("data-pc-group-section","navigator"),l(3),_("ngIf",n.currentView==="date")}}function SR(t,i){if(t&1&&(f(0,"div",40),b(1),m()),t&2){let e=d().$implicit;l(),Se(" ",e," ")}}function kR(t,i){if(t&1){let e=Y();f(0,"span",42),L("click",function(o){let r=w(e).index,a=d(3);return T(a.onMonthSelect(o,r))})("keydown",function(o){let r=w(e).index,a=d(3);return T(a.onMonthCellKeydown(o,r))}),b(1),D(2,SR,2,1,"div",39),m()}if(t&2){let e=i.$implicit,n=i.index,o=d(3);G(o.cx("month",qn(5,P3,e,n))),_("pBind",o.ptm("month")),l(),Se(" ",e," "),l(),_("ngIf",o.isMonthSelected(n))}}function IR(t,i){if(t&1&&(f(0,"div",20),D(1,kR,3,8,"span",41),m()),t&2){let e=d(2);G(e.cx("monthView")),_("pBind",e.ptm("monthView")),l(),_("ngForOf",e.monthPickerValues())}}function ER(t,i){if(t&1&&(f(0,"div",40),b(1),m()),t&2){let e=d().$implicit;l(),Se(" ",e," ")}}function MR(t,i){if(t&1){let e=Y();f(0,"span",42),L("click",function(o){let r=w(e).$implicit,a=d(3);return T(a.onYearSelect(o,r))})("keydown",function(o){let r=w(e).$implicit,a=d(3);return T(a.onYearCellKeydown(o,r))}),b(1),D(2,ER,2,1,"div",39),m()}if(t&2){let e=i.$implicit,n=d(3);G(n.cx("year",Pe(5,R3,e))),_("pBind",n.ptm("year")),l(),Se(" ",e," "),l(),_("ngIf",n.isYearSelected(e))}}function DR(t,i){if(t&1&&(f(0,"div",20),D(1,MR,3,7,"span",41),m()),t&2){let e=d(2);G(e.cx("yearView")),_("pBind",e.ptm("yearView")),l(),_("ngForOf",e.yearPickerValues())}}function PR(t,i){if(t&1&&(we(0),f(1,"div",20),D(2,TR,13,27,"div",24),m(),D(3,IR,2,4,"div",8)(4,DR,2,4,"div",8),Te()),t&2){let e=d();l(),G(e.cx("calendarContainer")),_("pBind",e.ptm("calendarContainer")),l(),_("ngForOf",e.months),l(),_("ngIf",e.currentView==="month"),l(),_("ngIf",e.currentView==="year")}}function RR(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(3);_("pBind",e.ptm("pcIncrementButton").icon)}}function OR(t,i){}function FR(t,i){t&1&&D(0,OR,0,0,"ng-template")}function NR(t,i){if(t&1&&D(0,RR,1,1,"svg",45)(1,FR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function AR(t,i){t&1&&(we(0),b(1,"0"),Te())}function LR(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(3);_("pBind",e.ptm("pcDecrementButton").icon)}}function BR(t,i){}function VR(t,i){t&1&&D(0,BR,0,0,"ng-template")}function zR(t,i){if(t&1&&D(0,LR,1,1,"svg",47)(1,VR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function HR(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(3);_("pBind",e.ptm("pcIncrementButton").icon)}}function qR(t,i){}function GR(t,i){t&1&&D(0,qR,0,0,"ng-template")}function jR(t,i){if(t&1&&D(0,HR,1,1,"svg",45)(1,GR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function UR(t,i){t&1&&(we(0),b(1,"0"),Te())}function $R(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(3);_("pBind",e.ptm("pcDecrementButton").icon)}}function WR(t,i){}function KR(t,i){t&1&&D(0,WR,0,0,"ng-template")}function YR(t,i){if(t&1&&D(0,$R,1,1,"svg",47)(1,KR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function XR(t,i){if(t&1&&(f(0,"div",20)(1,"span",20),b(2),m()()),t&2){let e=d(2);G(e.cx("separator")),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),x(e.timeSeparator)}}function ZR(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(4);_("pBind",e.ptm("pcIncrementButton").icon)}}function QR(t,i){}function JR(t,i){t&1&&D(0,QR,0,0,"ng-template")}function eO(t,i){if(t&1&&D(0,ZR,1,1,"svg",45)(1,JR,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function tO(t,i){t&1&&(we(0),b(1,"0"),Te())}function nO(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(4);_("pBind",e.ptm("pcDecrementButton").icon)}}function iO(t,i){}function oO(t,i){t&1&&D(0,iO,0,0,"ng-template")}function rO(t,i){if(t&1&&D(0,nO,1,1,"svg",47)(1,oO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function aO(t,i){if(t&1){let e=Y();f(0,"div",20)(1,"p-button",43),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.incrementSecond(o))})("keydown.space",function(o){w(e);let r=d(2);return T(r.incrementSecond(o))})("mousedown",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(o,2,1))})("mouseup",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d(2);return T(o.onTimePickerElementMouseLeave())}),D(2,eO,2,2,"ng-template",null,2,je),m(),f(4,"span",20),D(5,tO,2,0,"ng-container",7),b(6),m(),f(7,"p-button",43),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.decrementSecond(o))})("keydown.space",function(o){w(e);let r=d(2);return T(r.decrementSecond(o))})("mousedown",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(o,2,-1))})("mouseup",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d(2);return T(o.onTimePickerElementMouseLeave())}),D(8,rO,2,2,"ng-template",null,2,je),m()()}if(t&2){let e=d(2);G(e.cx("secondPicker")),_("pBind",e.ptm("secondPicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextSecond"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("second")),l(),_("ngIf",e.currentSecond<10),l(),x(e.currentSecond),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevSecond"))("data-pc-group-section","timepickerbutton")}}function sO(t,i){if(t&1&&(f(0,"div",20)(1,"span",20),b(2),m()()),t&2){let e=d(2);G(e.cx("separator")),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),x(e.timeSeparator)}}function lO(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(4);_("pBind",e.ptm("pcIncrementButton").icon)}}function cO(t,i){}function dO(t,i){t&1&&D(0,cO,0,0,"ng-template")}function uO(t,i){if(t&1&&D(0,lO,1,1,"svg",45)(1,dO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function pO(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(4);_("pBind",e.ptm("pcDecrementButton").icon)}}function hO(t,i){}function fO(t,i){t&1&&D(0,hO,0,0,"ng-template")}function mO(t,i){if(t&1&&D(0,pO,1,1,"svg",47)(1,fO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function _O(t,i){if(t&1){let e=Y();f(0,"div",20)(1,"p-button",49),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))}),D(2,uO,2,2,"ng-template",null,2,je),m(),f(4,"span",20),b(5),m(),f(6,"p-button",50),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("click",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))}),D(7,mO,2,2,"ng-template",null,2,je),m()()}if(t&2){let e=d(2);G(e.cx("ampmPicker")),_("pBind",e.ptm("ampmPicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("am"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("ampm")),l(),x(e.pm?"PM":"AM"),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("pm"))("data-pc-group-section","timepickerbutton")}}function gO(t,i){if(t&1){let e=Y();f(0,"div",20)(1,"div",20)(2,"p-button",43),L("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.incrementHour(o))})("keydown.space",function(o){w(e);let r=d();return T(r.incrementHour(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,0,1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),D(3,NR,2,2,"ng-template",null,2,je),m(),f(5,"span",20),D(6,AR,2,0,"ng-container",7),b(7),m(),f(8,"p-button",43),L("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.decrementHour(o))})("keydown.space",function(o){w(e);let r=d();return T(r.decrementHour(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,0,-1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),D(9,zR,2,2,"ng-template",null,2,je),m()(),f(11,"div",44)(12,"span",20),b(13),m()(),f(14,"div",20)(15,"p-button",43),L("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.incrementMinute(o))})("keydown.space",function(o){w(e);let r=d();return T(r.incrementMinute(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,1,1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),D(16,jR,2,2,"ng-template",null,2,je),m(),f(18,"span",20),D(19,UR,2,0,"ng-container",7),b(20),m(),f(21,"p-button",43),L("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.decrementMinute(o))})("keydown.space",function(o){w(e);let r=d();return T(r.decrementMinute(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,1,-1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),D(22,YR,2,2,"ng-template",null,2,je),m()(),D(24,XR,3,5,"div",8)(25,aO,10,14,"div",8)(26,sO,3,5,"div",8)(27,_O,9,13,"div",8),m()}if(t&2){let e=d();G(e.cx("timePicker")),_("pBind",e.ptm("timePicker")),l(),G(e.cx("hourPicker")),_("pBind",e.ptm("hourPicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextHour"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("hour")),l(),_("ngIf",e.currentHour<10),l(),x(e.currentHour),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevHour"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),x(e.timeSeparator),l(),G(e.cx("minutePicker")),_("pBind",e.ptm("minutePicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextMinute"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("minute")),l(),_("ngIf",e.currentMinute<10),l(),x(e.currentMinute),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevMinute"))("data-pc-group-section","timepickerbutton"),l(3),_("ngIf",e.showSeconds),l(),_("ngIf",e.showSeconds),l(),_("ngIf",e.hourFormat=="12"),l(),_("ngIf",e.hourFormat=="12")}}function vO(t,i){t&1&&le(0)}function bO(t,i){if(t&1&&D(0,vO,1,0,"ng-container",22),t&2){let e=d(2);_("ngTemplateOutlet",e.buttonBarTemplate||e._buttonBarTemplate)("ngTemplateOutletContext",qn(2,O3,e.onTodayButtonClick.bind(e),e.onClearButtonClick.bind(e)))}}function yO(t,i){if(t&1){let e=Y();f(0,"p-button",51),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onTodayButtonClick(o))}),m(),f(1,"p-button",51),L("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onClearButtonClick(o))}),m()}if(t&2){let e=d(2);_("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass)("pt",e.ptm("pcTodayButton")),O("data-pc-group-section","button"),l(),_("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)("pt",e.ptm("pcClearButton")),O("data-pc-group-section","button")}}function CO(t,i){if(t&1&&(f(0,"div",20),P(1,bO,1,5,"ng-container")(2,yO,2,10),m()),t&2){let e=d();G(e.cx("buttonbar")),_("pBind",e.ptm("buttonbar")),l(),R(e.buttonBarTemplate||e._buttonBarTemplate?1:2)}}function xO(t,i){t&1&&le(0)}var wO=`
1069
- ${Wv}
1070
-
1071
- /* For PrimeNG */
1072
- .p-datepicker.ng-invalid.ng-dirty .p-inputtext {
1073
- border-color: dt('inputtext.invalid.border.color');
1074
- }
1075
- `,TO={root:()=>({position:"relative"})},SO={root:({instance:t})=>["p-datepicker p-component p-inputwrapper",{"p-invalid":t.invalid(),"p-datepicker-fluid":t.hasFluid,"p-inputwrapper-filled":t.$filled(),"p-variant-filled":t.$variant()==="filled","p-inputwrapper-focus":t.focus||t.overlayVisible,"p-focus":t.focus||t.overlayVisible}],pcInputText:"p-datepicker-input",dropdown:"p-datepicker-dropdown",inputIconContainer:"p-datepicker-input-icon-container",inputIcon:"p-datepicker-input-icon",panel:({instance:t})=>["p-datepicker-panel p-component",{"p-datepicker-panel p-component":!0,"p-datepicker-panel-inline":t.inline,"p-disabled":t.$disabled(),"p-datepicker-timeonly":t.timeOnly}],calendarContainer:"p-datepicker-calendar-container",calendar:"p-datepicker-calendar",header:"p-datepicker-header",pcPrevButton:"p-datepicker-prev-button",title:"p-datepicker-title",selectMonth:"p-datepicker-select-month",selectYear:"p-datepicker-select-year",decade:"p-datepicker-decade",pcNextButton:"p-datepicker-next-button",dayView:"p-datepicker-day-view",weekHeader:"p-datepicker-weekheader p-disabled",weekNumber:"p-datepicker-weeknumber",weekLabelContainer:"p-datepicker-weeklabel-container p-disabled",weekDayCell:"p-datepicker-weekday-cell",weekDay:"p-datepicker-weekday",dayCell:({date:t})=>["p-datepicker-day-cell",{"p-datepicker-other-month":t.otherMonth,"p-datepicker-today":t.today}],day:({instance:t,date:i})=>{let e="";if(t.isRangeSelection()&&t.isSelected(i)&&i.selectable){let n=t.value[0],o=t.value[1],r=n&&i.year===n.getFullYear()&&i.month===n.getMonth()&&i.day===n.getDate(),a=o&&i.year===o.getFullYear()&&i.month===o.getMonth()&&i.day===o.getDate();e=r||a?"p-datepicker-day-selected":"p-datepicker-day-selected-range"}return{"p-datepicker-day":!0,"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(i)&&i.selectable,"p-disabled":t.$disabled()||!i.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:i})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(i),"p-disabled":t.isMonthDisabled(i)}],yearView:"p-datepicker-year-view",year:({instance:t,year:i})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(i),"p-disabled":t.isYearDisabled(i)}],timePicker:"p-datepicker-time-picker",hourPicker:"p-datepicker-hour-picker",pcIncrementButton:"p-datepicker-increment-button",pcDecrementButton:"p-datepicker-decrement-button",separator:"p-datepicker-separator",minutePicker:"p-datepicker-minute-picker",secondPicker:"p-datepicker-second-picker",ampmPicker:"p-datepicker-ampm-picker",buttonbar:"p-datepicker-buttonbar",pcTodayButton:"p-datepicker-today-button",pcClearButton:"p-datepicker-clear-button",clearIcon:"p-datepicker-clear-icon"},Yv=(()=>{class t extends Qt{name="datepicker";style=wO;classes=SO;inlineStyles=TO;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var kO={provide:Za,useExisting:Xi(()=>Zv),multi:!0},Xv=new ve("DATEPICKER_INSTANCE"),Zv=(()=>{class t extends X0{zone;overlayService;componentName="DatePicker";bindDirectiveInstance=p(Ae,{self:!0});$pcDatePicker=p(Xv,{optional:!0,skipSelf:!0})??void 0;iconDisplay="button";styleClass;inputStyle;inputId;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;get dateFormat(){return this._dateFormat}set dateFormat(e){this._dateFormat=e,this.initialized&&this.updateInputfield()}multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;readonlyInput;shortYearCutoff="+10";get hourFormat(){return this._hourFormat}set hourFormat(e){this._hourFormat=e,this.initialized&&this.updateInputfield()}timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;showOnFocus=!0;showWeek=!1;startWeekFromFirstDayOfYear=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass;clearButtonStyleClass;autofocus;autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}appendTo=V(void 0);motionOptions=V(void 0);computedMotionOptions=k(()=>me(me({},this.ptm("motion")),this.motionOptions()));onFocus=new re;onBlur=new re;onClose=new re;onSelect=new re;onClear=new re;onInput=new re;onTodayClick=new re;onClearClick=new re;onMonthChange=new re;onYearChange=new re;onClickOutside=new re;onShow=new re;inputfieldViewChild;set content(e){this.contentViewChild=e,this.contentViewChild&&this.overlay&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):!this.focus&&!this.inline&&this.initFocusableCell())}_componentStyle=p(Yv);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;overlayMinWidth;$appendTo=k(()=>this.appendTo()||this.config.overlayAppendTo());calendarElement;timePickerTimer;documentClickListener;animationEndListener;ticksTo1970;yearOptions;focus;isKeydown;_minDate;_maxDate;_dateFormat;_hourFormat="24";_showTime;_yearRange;preventDocumentListener;dayClass(e){return this._componentStyle.classes.day({instance:this,date:e})}dateTemplate;headerTemplate;footerTemplate;disabledDateTemplate;decadeTemplate;previousIconTemplate;nextIconTemplate;triggerIconTemplate;clearIconTemplate;decrementIconTemplate;incrementIconTemplate;inputIconTemplate;buttonBarTemplate;_dateTemplate;_headerTemplate;_footerTemplate;_disabledDateTemplate;_decadeTemplate;_previousIconTemplate;_nextIconTemplate;_triggerIconTemplate;_clearIconTemplate;_decrementIconTemplate;_incrementIconTemplate;_inputIconTemplate;_buttonBarTemplate;_disabledDates;_disabledDays;selectElement;todayElement;focusElement;scrollHandler;documentResizeListener;navigationState=null;isMonthNavigate;initialized;translationSubscription;_locale;_responsiveOptions;currentView;attributeSelector;panelId;_numberOfMonths=1;_firstDayOfWeek;_view="date";preventFocus;_defaultDate;_focusKey=null;window;get locale(){return this._locale}get iconButtonAriaLabel(){return this.iconAriaLabel?this.iconAriaLabel:this.getTranslation("chooseDate")}get prevIconAriaLabel(){return this.currentView==="year"?this.getTranslation("prevDecade"):this.currentView==="month"?this.getTranslation("prevYear"):this.getTranslation("prevMonth")}get nextIconAriaLabel(){return this.currentView==="year"?this.getTranslation("nextDecade"):this.currentView==="month"?this.getTranslation("nextYear"):this.getTranslation("nextMonth")}constructor(e,n){super(),this.zone=e,this.overlayService=n,this.window=this.document.defaultView}onInit(){this.attributeSelector=ut("pn_id_"),this.panelId=this.attributeSelector+"_panel";let e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.yearOptions=[],this.currentView=this.view,this.view==="date"&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}onAfterViewInit(){this.inline?this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""):!this.$disabled()&&this.overlay&&(this.initFocusableCell(),this.numberOfMonths===1&&this.contentViewChild&&this.contentViewChild.nativeElement&&(this.contentViewChild.nativeElement.style.width=w0(this.el?.nativeElement)+"px"))}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}templates;onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this._dateTemplate=e.template;break;case"decade":this._decadeTemplate=e.template;break;case"disabledDate":this._disabledDateTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"inputicon":this._inputIconTemplate=e.template;break;case"buttonbar":this._buttonBarTemplate=e.template;break;case"previousicon":this._previousIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"decrementicon":this._decrementIconTemplate=e.template;break;case"incrementicon":this._incrementIconTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;default:this._dateTemplate=e.template;break}})}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let o=e;o<=n;o++)this.yearOptions.push(o)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Zt.DAY_NAMES_MIN);for(let o=0;o<7;o++)this.weekDays.push(n[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let o=0;o<10;o++)e.push(n+o);return e}createMonths(e,n){this.months=this.months=[];for(let o=0;o<this.numberOfMonths;o++){let r=e+o,a=n;r>11&&(r=r%12,a=n+Math.floor((e+o)/12)),this.months.push(this.createMonth(r,a))}}getWeekNumber(e){let n=new Date(e.getTime());if(this.startWeekFromFirstDayOfYear){let r=+this.getFirstDateOfWeek();n.setDate(n.getDate()+6+r-n.getDay())}else n.setDate(n.getDate()+4-(n.getDay()||7));let o=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((o-n.getTime())/864e5)/7)+1}createMonth(e,n){let o=[],r=this.getFirstDayOfMonthIndex(e,n),a=this.getDaysCountInMonth(e,n),s=this.getDaysCountInPrevMonth(e,n),c=1,u=new Date,h=[],g=Math.ceil((a+r)/7);for(let C=0;C<g;C++){let M=[];if(C==0){for(let N=s-r+1;N<=s;N++){let q=this.getPreviousMonthAndYear(e,n);M.push({day:N,month:q.month,year:q.year,otherMonth:!0,today:this.isToday(u,N,q.month,q.year),selectable:this.isSelectable(N,q.month,q.year,!0)})}let S=7-M.length;for(let N=0;N<S;N++)M.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)}),c++}else for(let S=0;S<7;S++){if(c>a){let N=this.getNextMonthAndYear(e,n);M.push({day:c-a,month:N.month,year:N.year,otherMonth:!0,today:this.isToday(u,c-a,N.month,N.year),selectable:this.isSelectable(c-a,N.month,N.year,!0)})}else M.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&h.push(this.getWeekNumber(new Date(M[0].year,M[0].month,M[0].day))),o.push(M)}return{month:e,year:n,dates:o,weekNumbers:h}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=this.showSeconds?e.getSeconds():0,this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.currentYear<e[0]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]-n,e[e.length-1]-n)}}decrementDecade(){this.currentYear=this.currentYear-10}incrementDecade(){this.currentYear=this.currentYear+10}incrementYear(){this.currentYear++;let e=this.yearOptions;if(this.currentYear>e[e.length-1]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]+n,e[e.length-1]+n)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){if(this.$disabled()||!n.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((o,r)=>!this.isDateEquals(o,n)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),this.hideOnDateTimeSelect&&(this.isSingleSelection()||this.isRangeSelection()&&this.value[1])&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()}shouldSelectDate(e){return this.isMultipleSelection()&&this.maxDateCount!=null?this.maxDateCount>(this.value?this.value.length:0):!0}onMonthSelect(e,n){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){this.view==="year"?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value){if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n<this.value.length;n++){let o=this.formatDateTime(this.value[n]);e+=o,n!==this.value.length-1&&(e+=this.multipleSeparator+" ")}else if(this.isRangeSelection()&&this.value&&this.value.length){let n=this.value[0],o=this.value[1];e=this.formatDateTime(n),o&&(e+=" "+this.rangeSeparator+" "+this.formatDateTime(o))}}this.writeModelValue(e),this.inputFieldValue=e,this.inputfieldViewChild&&this.inputfieldViewChild.nativeElement&&(this.inputfieldViewChild.nativeElement.value=this.inputFieldValue)}inputFieldValue=null;formatDateTime(e){let n=this.keepInvalid?e:null,o=this.isValidDateForTimeConstraints(e);return this.isValidDate(e)?this.timeOnly?n=this.formatTime(e):(n=this.formatDate(e,this.getDateFormat()),this.showTime&&(n+=" "+this.formatTime(e))):this.dataType==="string"&&(n=e),n=o?n:"",n}formatDateMetaToDate(e){return new Date(e.year,e.month,e.day)}formatDateKey(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`}setCurrentHourPM(e){this.hourFormat=="12"?(this.pm=e>11,e>=12?this.currentHour=e==12?12:e-12:this.currentHour=e==0?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let n=this.formatDateMetaToDate(e);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?n.setHours(this.pm?12:0):n.setHours(this.pm?this.currentHour+12:this.currentHour):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate<n&&(n=this.maxDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.isSingleSelection())this.updateModel(n);else if(this.isMultipleSelection())this.updateModel(this.value?[...this.value,n]:[n]);else if(this.isRangeSelection())if(this.value&&this.value.length){let o=this.value[0],r=this.value[1];!r&&n.getTime()>=o.getTime()?r=n:(o=n,r=null),this.updateModel([o,r])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(e){if(this.value=e,this.dataType=="date")this.writeModelValue(this.value),this.onModelChange(this.value);else if(this.dataType=="string")if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;Array.isArray(this.value)&&(n=this.value.map(o=>this.formatDateTime(o))),this.writeModelValue(n),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let o=new Date;o.setDate(1),o.setMonth(e),o.setFullYear(n);let r=o.getDay()+this.getSundayIndex();return r>=7?r-7:r}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let o=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(o.month,o.year)}getPreviousMonthAndYear(e,n){let o,r;return e===0?(o=11,r=n-1):(o=e-1,r=n),{month:o,year:r}}getNextMonthAndYear(e,n){let o,r;return e===11?(o=0,r=n+1):(o=e+1,r=n),{month:o,year:r}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(this.value){if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let n=!1;for(let o of this.value)if(n=this.isDateEquals(o,e),n)break;return n}else if(this.isRangeSelection())return this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e)}else return!1}isComparable(){return this.value!=null&&typeof this.value!="string"}isMonthSelected(e){if(!this.isComparable())return!1;if(this.isMultipleSelection())return this.value.some(n=>n.getMonth()===e&&n.getFullYear()===this.currentYear);if(this.isRangeSelection())if(this.value[1]){let n=new Date(this.currentYear,e,1),o=new Date(this.value[0].getFullYear(),this.value[0].getMonth(),1),r=new Date(this.value[1].getFullYear(),this.value[1].getMonth(),1);return n>=o&&n<=r}else return this.value[0]?.getFullYear()===this.currentYear&&this.value[0]?.getMonth()===e;else return this.value.getMonth()===e&&this.value.getFullYear()===this.currentYear}isMonthDisabled(e,n){let o=n??this.currentYear;for(let r=1;r<this.getDaysCountInMonth(e,o)+1;r++)if(this.isSelectable(r,e,o,!1))return!1;return!0}isYearDisabled(e){return Array(12).fill(0).every((n,o)=>this.isMonthDisabled(o,e))}isYearSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return this.isMultipleSelection()?!1:n.getFullYear()===e}return!1}isDateEquals(e,n){return e&&ur(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,o){let r=!1;if(ur(e)&&ur(n)){let a=this.formatDateMetaToDate(o);return e.getTime()<=a.getTime()&&n.getTime()>=a.getTime()}return r}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,n,o,r){return e.getDate()===n&&e.getMonth()===o&&e.getFullYear()===r}isSelectable(e,n,o,r){let a=!0,s=!0,c=!0,u=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>o||this.minDate.getFullYear()===o&&this.currentView!="year"&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(a=!1),this.maxDate&&(this.maxDate.getFullYear()<o||this.maxDate.getFullYear()===o&&(this.maxDate.getMonth()<n||this.maxDate.getMonth()===n&&this.maxDate.getDate()<e))&&(s=!1),this.disabledDates&&(c=!this.isDateDisabled(e,n,o)),this.disabledDays&&(u=!this.isDayDisabled(e,n,o)),a&&s&&c&&u)}isDateDisabled(e,n,o){if(this.disabledDates){for(let r of this.disabledDates)if(r.getFullYear()===o&&r.getMonth()===n&&r.getDate()===e)return!0}return!1}isDayDisabled(e,n,o){if(this.disabledDays){let a=new Date(o,n,e).getDay();return this.disabledDays.indexOf(a)!==-1}return!1}onInputFocus(e){this.focus=!0,this.showOnFocus&&this.showOverlay(),this.onFocus.emit(e)}onInputClick(){this.showOnFocus&&!this.overlayVisible&&this.showOverlay()}onInputBlur(e){this.focus=!1,this.onBlur.emit(e),this.keepInvalid||this.updateInputfield(),this.onModelTouched()}onButtonClick(e,n=this.inputfieldViewChild?.nativeElement){this.$disabled()||(this.overlayVisible?this.hideOverlay():(n.focus(),this.showOverlay()))}clear(){this.value=null,this.inputFieldValue=null,this.writeModelValue(this.value),this.onModelChange(this.value),this.updateInputfield(),this.onClear.emit()}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}getMonthName(e){return this.config.getTranslation("monthNames")[e]}getYear(e){return this.currentView==="month"?this.currentYear:e.year}switchViewButtonDisabled(){return this.numberOfMonths>1||this.$disabled()}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:if(this.inline||this.trapFocus(e),this.inline){let n=dt(this.el?.nativeElement,".p-datepicker-header"),o=e.target;if(this.timeOnly)return;o==n?.children[n?.children?.length-1]&&this.initFocusableCell()}break;case 27:this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break;default:break}}onInputKeydown(e){this.isKeydown=!0,e.keyCode===40&&this.contentViewChild?this.trapFocus(e):e.keyCode===27?this.overlayVisible&&(this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault()):e.keyCode===13?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):e.keyCode===9&&this.contentViewChild&&(yf(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,o){let r=e.currentTarget,a=r.parentElement,s=this.formatDateMetaToDate(n);switch(e.which){case 40:{r.tabIndex="-1";let S=cr(a),N=a.parentElement.nextElementSibling;if(N){let q=N.children[S].children[0];pn(q,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(N.children[S].children[0].tabIndex="0",N.children[S].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let S=cr(a),N=a.parentElement.previousElementSibling;if(N){let q=N.children[S].children[0];pn(q,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(q.tabIndex="0",q.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let S=a.previousElementSibling;if(S){let N=S.children[0];pn(N,"p-disabled")||pn(N.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,o):(N.tabIndex="0",N.focus())}else this.navigateToMonth(!0,o);e.preventDefault();break}case 39:{r.tabIndex="-1";let S=a.nextElementSibling;if(S){let N=S.children[0];pn(N,"p-disabled")?this.navigateToMonth(!1,o):(N.tabIndex="0",N.focus())}else this.navigateToMonth(!1,o);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}case 33:{r.tabIndex="-1";let S=new Date(s.getFullYear(),s.getMonth()-1,s.getDate()),N=this.formatDateKey(S);this.navigateToMonth(!0,o,`span[data-date='${N}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{r.tabIndex="-1";let S=new Date(s.getFullYear(),s.getMonth()+1,s.getDate()),N=this.formatDateKey(S);this.navigateToMonth(!1,o,`span[data-date='${N}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:r.tabIndex="-1";let c=new Date(s.getFullYear(),s.getMonth(),1),u=this.formatDateKey(c),h=dt(r.offsetParent,`span[data-date='${u}']:not(.p-disabled):not(.p-ink)`);h&&(h.tabIndex="0",h.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let g=new Date(s.getFullYear(),s.getMonth()+1,0),C=this.formatDateKey(g),M=dt(r.offsetParent,`span[data-date='${C}']:not(.p-disabled):not(.p-ink)`);g&&(M.tabIndex="0",M.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,n){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,a=cr(o);let s=r[e.which===40?a+3:a-3];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let s=o.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let s=o.nextElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onYearCellKeydown(e,n){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,a=cr(o);let s=r[e.which===40?a+2:a-2];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let s=o.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let s=o.nextElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.trapFocus(e);break}default:break}}navigateToMonth(e,n,o){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this._focusKey=o,this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[n-1];if(o){let a=dt(r,o);a.tabIndex="0",a.focus()}else{let a=vn(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=a[a.length-1];s.tabIndex="0",s.focus()}}else if(this.numberOfMonths===1||n===this.numberOfMonths-1)this.navigationState={backward:!1},this._focusKey=o,this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[n+1];if(o){let a=dt(r,o);a.tabIndex="0",a.focus()}else{let a=dt(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");a.tabIndex="0",a.focus()}}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?dt(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():dt(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=vn(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=vn(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=vn(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else this.currentView==="month"?e=dt(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=dt(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=dt(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null,this._focusKey=null}else this.initFocusableCell()}initFocusableCell(){let e=this.contentViewChild?.nativeElement,n;if(this.currentView==="month"){let o=vn(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=dt(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");o.forEach(a=>a.tabIndex=-1),n=r||o[0],o.length===0&&vn(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(this.currentView==="year"){let o=vn(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=dt(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");o.forEach(a=>a.tabIndex=-1),n=r||o[0],o.length===0&&vn(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(n=dt(e,"span.p-highlight"),!n){let o=dt(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");o?n=o:n=dt(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}n&&(n.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.$disabled()||n.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=yf(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let o=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(o==-1||o===0)if(this.focusTrap)n[n.length-1].focus();else{if(o===-1)return this.hideOverlay();if(o===0)return}else n[o-1].focus();else if(o==-1)if(this.timeOnly)n[0].focus();else{let r=0;for(let a=0;a<n.length;a++)n[a].tagName==="SPAN"&&(r=a);n[r].focus()}else if(o===n.length-1){if(!this.focusTrap&&o!=-1)return this.hideOverlay();n[0].focus()}else n[o+1].focus()}e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}convertTo24Hour(e,n){return this.hourFormat=="12"?e===12?n?12:0:n?e+12:e:e}constrainTime(e,n,o,r){let a=[e,n,o],s=!1,c=this.value,u=this.convertTo24Hour(e,r),h=this.isRangeSelection(),g=this.isMultipleSelection();(h||g)&&(this.value||(this.value=[new Date,new Date]),h&&(c=this.value[1]||this.value[0]),g&&(c=this.value[this.value.length-1]));let M=c?c.toDateString():null,S=this.minDate&&M&&this.minDate.toDateString()===M,N=this.maxDate&&M&&this.maxDate.toDateString()===M;switch(S&&(s=this.minDate.getHours()>=12),!0){case(S&&s&&this.minDate.getHours()===12&&this.minDate.getHours()>u):a[0]=11;case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(S&&!s&&this.minDate.getHours()-1===u&&this.minDate.getHours()>u):a[0]=11,this.pm=!0;case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(S&&s&&this.minDate.getHours()>u&&u!==12):this.setCurrentHourPM(this.minDate.getHours()),a[0]=this.currentHour||0;case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(S&&this.minDate.getHours()>u):a[0]=this.minDate.getHours();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(N&&this.maxDate.getHours()<u):a[0]=this.maxDate.getHours();case(N&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()<n):a[1]=this.maxDate.getMinutes();case(N&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()===n&&this.maxDate.getSeconds()<o):a[2]=this.maxDate.getSeconds();break}return a}incrementHour(e){let n=this.currentHour??0,o=(this.currentHour??0)+this.stepHour,r=this.pm;this.hourFormat=="24"?o=o>=24?o-24:o:this.hourFormat=="12"&&(n<12&&o>11&&(r=!this.pm),o=o>=13?o-12:o),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(o,this.currentMinute,this.currentSecond,r),e.preventDefault()}toggleAMPMIfNotMinDate(e){let n=this.value,o=n?n.toDateString():null;this.minDate&&o&&this.minDate.toDateString()===o&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,n,o){this.$disabled()||(this.repeat(e,null,n,o),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,o,r){let a=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,o,r),this.cd.markForCheck()},a),o){case 0:r===1?this.incrementHour(e):this.decrementHour(e);break;case 1:r===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:r===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=(this.currentHour??0)-this.stepHour,o=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(o=!this.pm),n=n<=0?12+n:n),this.toggleAMPMIfNotMinDate(o),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(n,this.currentMinute,this.currentSecond,o),e.preventDefault()}incrementMinute(e){let n=(this.currentMinute??0)+this.stepMinute;n=n>59?n-60:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,n,this.currentSecond,this.pm),e.preventDefault()}decrementMinute(e){let n=(this.currentMinute??0)-this.stepMinute;n=n<0?60+n:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,n,this.currentSecond||0,this.pm),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,this.currentMinute||0,n,this.pm),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,this.currentMinute||0,n,this.pm),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,this.hourFormat=="12"?this.currentHour===12?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(this.value[1]?e=[this.value[0],e]:e=[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){let n=!this.pm;this.pm=n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,this.currentMinute||0,this.currentSecond||0,n),this.updateTime(),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let o=this.parseValueFromString(n);this.isValidSelection(o)?(this.updateModel(o),this.updateUI()):this.keepInvalid&&this.updateModel(o)}catch{let r=this.keepInvalid?n:null;this.updateModel(r)}this.onInput.emit(e)}isValidSelection(e){if(this.isSingleSelection())return this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1);let n=e.every(o=>this.isSelectable(o.getDate(),o.getMonth(),o.getFullYear(),!1));return n&&this.isRangeSelection()&&(n=e.length===1||e.length>1&&e[1]>=e[0]),n}parseValueFromString(e){if(!e||e.trim().length===0)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let o=e.split(this.multipleSeparator);n=[];for(let r of o)n.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let o=e.split(" "+this.rangeSeparator+" ");n=[];for(let r=0;r<o.length;r++)n[r]=this.parseDateTime(o[r].trim())}return n}parseDateTime(e){let n,o=e.split(" ");if(this.timeOnly)n=new Date,this.populateTime(n,o[0],o[1]);else{let r=this.getDateFormat();if(this.showTime){let a=this.hourFormat=="12"?o.pop():null,s=o.pop();n=this.parseDate(o.join(" "),r),this.populateTime(n,s,a)}else n=this.parseDate(e,r)}return n}populateTime(e,n,o){if(this.hourFormat=="12"&&!o)throw"Invalid Time";this.pm=o==="PM"||o==="pm";let r=this.parseTime(n);e.setHours(r.hour),e.setMinutes(r.minute),e.setSeconds(r.second)}isValidDate(e){return ur(e)&&I0(e)}updateUI(){let e=this.value;Array.isArray(e)&&(e=e.length===2?e[1]:e[0]);let n=this.defaultDate&&this.isValidDate(this.defaultDate)&&!this.value?this.defaultDate:e&&this.isValidDate(e)?e:new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.createMonths(this.currentMonth,this.currentYear),(this.showTime||this.timeOnly)&&(this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=this.showSeconds?n.getSeconds():0)}showOverlay(){this.overlayVisible||(this.updateUI(),this.touchUI||(this.preventFocus=!0),this.overlayMinWidth=this.el.nativeElement.offsetWidth,this.overlayVisible=!0)}hideOverlay(){this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,this.clearTimePickerTimer(),this.touchUI&&this.disableModality(),this.cd.markForCheck()}toggle(){this.inline||(this.overlayVisible?this.hideOverlay():(this.showOverlay(),this.inputfieldViewChild?.nativeElement.focus()))}onOverlayBeforeEnter(e){this.overlay=e.element,this.$attrSelector&&this.overlay.setAttribute(this.$attrSelector,"");let n=this.inline?void 0:{position:"absolute",top:"0",minWidth:`${this.overlayMinWidth}px`};bf(this.overlay,n||{}),this.appendOverlay(),this.alignOverlay(),this.setZIndex(),this.updateFocus(),this.bindListeners(),this.onShow.emit(e.element)}onOverlayAfterLeave(e){this.autoZIndex&&bn.clear(e.element),this.restoreOverlayAppend(),this.onOverlayHide(),this.onClose.emit(e.element)}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?this.document.body.appendChild(this.overlay):wi(this.$appendTo(),this.overlay))}restoreOverlayAppend(){this.overlay&&this.$appendTo()!=="self"&&this.el.nativeElement.appendChild(this.overlay)}alignOverlay(){this.touchUI?this.enableModality(this.overlay):this.overlay&&(this.$appendTo()&&this.$appendTo()!=="self"?lr(this.overlay,this.inputfieldViewChild?.nativeElement):T0(this.overlay,this.inputfieldViewChild?.nativeElement))}bindListeners(){this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener()}setZIndex(){this.autoZIndex&&(this.touchUI?bn.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):bn.set("overlay",this.overlay,this.baseZIndex||this.config.zIndex.overlay))}enableModality(e){!this.mask&&this.touchUI&&(this.mask=this.renderer.createElement("div"),this.renderer.setStyle(this.mask,"zIndex",String(parseInt(e.style.zIndex)-1)),sr(this.mask,"p-overlay-mask p-datepicker-mask p-datepicker-mask-scrollblocker p-overlay-mask p-overlay-mask-enter-active"),this.maskClickListener=this.renderer.listen(this.mask,"click",o=>{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),L0())}disableModality(){this.mask&&(sr(this.mask,"p-overlay-mask-leave"),this.animationEndListener||(this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyMask.bind(this))))}destroyMask(){if(!this.mask)return;this.renderer.removeChild(this.document.body,this.mask);let e=this.document.body.children,n;for(let o=0;o<e.length;o++){let r=e[o];if(pn(r,"p-datepicker-mask-scrollblocker")){n=!0;break}}n||B0(),this.unbindAnimationEndListener(),this.unbindMaskClickListener(),this.mask=null}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}unbindAnimationEndListener(){this.animationEndListener&&this.mask&&(this.animationEndListener(),this.animationEndListener=null)}getDateFormat(){return this.dateFormat||this.getTranslation("dateFormat")}getFirstDateOfWeek(){return this._firstDayOfWeek||this.getTranslation(Zt.FIRST_DAY_OF_WEEK)}formatDate(e,n){if(!e)return"";let o,r=h=>{let g=o+1<n.length&&n.charAt(o+1)===h;return g&&o++,g},a=(h,g,C)=>{let M=""+g;if(r(h))for(;M.length<C;)M="0"+M;return M},s=(h,g,C,M)=>r(h)?M[g]:C[g],c="",u=!1;if(e)for(o=0;o<n.length;o++)if(u)n.charAt(o)==="'"&&!r("'")?u=!1:c+=n.charAt(o);else switch(n.charAt(o)){case"d":c+=a("d",e.getDate(),2);break;case"D":c+=s("D",e.getDay(),this.getTranslation(Zt.DAY_NAMES_SHORT),this.getTranslation(Zt.DAY_NAMES));break;case"o":c+=a("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=a("m",e.getMonth()+1,2);break;case"M":c+=s("M",e.getMonth(),this.getTranslation(Zt.MONTH_NAMES_SHORT),this.getTranslation(Zt.MONTH_NAMES));break;case"y":c+=r("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=e.getTime()*1e4+this.ticksTo1970;break;case"'":r("'")?c+="'":u=!0;break;default:c+=n.charAt(o)}return c}formatTime(e){if(!e)return"";let n="",o=e.getHours(),r=e.getMinutes(),a=e.getSeconds();return this.hourFormat=="12"&&o>11&&o!=12&&(o-=12),this.hourFormat=="12"?n+=o===0?12:o<10?"0"+o:o:n+=o<10?"0"+o:o,n+=":",n+=r<10?"0"+r:r,this.showSeconds&&(n+=":",n+=a<10?"0"+a:a),this.hourFormat=="12"&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":"),o=this.showSeconds?3:2;if(n.length!==o)throw"Invalid time";let r=parseInt(n[0]),a=parseInt(n[1]),s=this.showSeconds?parseInt(n[2]):null;if(isNaN(r)||isNaN(a)||r>23||a>59||this.hourFormat=="12"&&r>12||this.showSeconds&&(isNaN(s)||s>59))throw"Invalid time";return this.hourFormat=="12"&&(r!==12&&this.pm?r+=12:!this.pm&&r===12&&(r-=12)),{hour:r,minute:a,second:s}}parseDate(e,n){if(n==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let o,r,a,s=0,c=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),u=-1,h=-1,g=-1,C=-1,M=!1,S,N=ce=>{let Re=o+1<n.length&&n.charAt(o+1)===ce;return Re&&o++,Re},q=ce=>{let Re=N(ce),xe=ce==="@"?14:ce==="!"?20:ce==="y"&&Re?4:ce==="o"?3:2,He=ce==="y"?xe:1,Nt=new RegExp("^\\d{"+He+","+xe+"}"),ct=e.substring(s).match(Nt);if(!ct)throw"Missing number at position "+s;return s+=ct[0].length,parseInt(ct[0],10)},$=(ce,Re,xe)=>{let He=-1,Nt=N(ce)?xe:Re,ct=[];for(let mt=0;mt<Nt.length;mt++)ct.push([mt,Nt[mt]]);ct.sort((mt,tt)=>-(mt[1].length-tt[1].length));for(let mt=0;mt<ct.length;mt++){let tt=ct[mt][1];if(e.substr(s,tt.length).toLowerCase()===tt.toLowerCase()){He=ct[mt][0],s+=tt.length;break}}if(He!==-1)return He+1;throw"Unknown name at position "+s},J=()=>{if(e.charAt(s)!==n.charAt(o))throw"Unexpected literal at position "+s;s++};for(this.view==="month"&&(g=1),o=0;o<n.length;o++)if(M)n.charAt(o)==="'"&&!N("'")?M=!1:J();else switch(n.charAt(o)){case"d":g=q("d");break;case"D":$("D",this.getTranslation(Zt.DAY_NAMES_SHORT),this.getTranslation(Zt.DAY_NAMES));break;case"o":C=q("o");break;case"m":h=q("m");break;case"M":h=$("M",this.getTranslation(Zt.MONTH_NAMES_SHORT),this.getTranslation(Zt.MONTH_NAMES));break;case"y":u=q("y");break;case"@":S=new Date(q("@")),u=S.getFullYear(),h=S.getMonth()+1,g=S.getDate();break;case"!":S=new Date((q("!")-this.ticksTo1970)/1e4),u=S.getFullYear(),h=S.getMonth()+1,g=S.getDate();break;case"'":N("'")?J():M=!0;break;default:J()}if(s<e.length&&(a=e.substr(s),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(u===-1?u=new Date().getFullYear():u<100&&(u+=new Date().getFullYear()-new Date().getFullYear()%100+(u<=c?0:-100)),C>-1){h=1,g=C;do{if(r=this.getDaysCountInMonth(u,h-1),g<=r)break;h++,g-=r}while(!0)}if(this.view==="year"&&(h=h===-1?1:h,g=g===-1?1:g),S=this.daylightSavingAdjust(new Date(u,h-1,g)),S.getFullYear()!==u||S.getMonth()+1!==h||S.getDate()!==g)throw"Invalid date";return S}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}isValidDateForTimeConstraints(e){return this.keepInvalid?!0:(!this.minDate||e>=this.minDate)&&(!this.maxDate||e<=this.maxDate)}onTodayButtonClick(e){let n=new Date,o={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(n.getMonth(),n.getFullYear()),this.onDateSelect(e,o),this.onTodayClick.emit(n)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",dr(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(o=>!!(o.breakpoint&&o.numMonths)).sort((o,r)=>-1*o.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let o=0;o<n.length;o++){let{breakpoint:r,numMonths:a}=n[o],s=`
1076
- .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${a}) .p-datepicker-next {
1077
- display: inline-flex !important;
1078
- }
1079
- `;for(let c=a;c<this.numberOfMonths;c++)s+=`
1080
- .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${c+1}) {
1081
- display: none !important;
1082
- }
1083
- `;e+=`
1084
- @media screen and (max-width: ${r}) {
1085
- ${s}
1086
- }
1087
- `}}this.responsiveStyleElement.innerHTML=e,dr(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyleElement(){this.responsiveStyleElement&&(this.responsiveStyleElement.remove(),this.responsiveStyleElement=null)}bindDocumentClickListener(){this.documentClickListener||this.zone.runOutsideAngular(()=>{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new pr(this.el?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return pn(e.target,"p-datepicker-prev-button")||pn(e.target,"p-datepicker-prev-icon")||pn(e.target,"p-datepicker-next-button")||pn(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!Xa()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}writeControlValue(e){if(this.value=e,this.value&&typeof this.value=="string")try{this.value=this.parseValueFromString(this.value)}catch{this.keepInvalid&&(this.value=e)}this.updateInputfield(),this.updateUI(),this.cd.markForCheck()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&bn.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||t)(Rn(Wt),Rn(io))};static \u0275cmp=z({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,p3,4)(r,h3,4)(r,f3,4)(r,m3,4)(r,_3,4)(r,g3,4)(r,v3,4)(r,b3,4)(r,y3,4)(r,C3,4)(r,x3,4)(r,w3,4)(r,T3,4)(r,Dt,4),n&2){let a;ee(a=te())&&(o.dateTemplate=a.first),ee(a=te())&&(o.headerTemplate=a.first),ee(a=te())&&(o.footerTemplate=a.first),ee(a=te())&&(o.disabledDateTemplate=a.first),ee(a=te())&&(o.decadeTemplate=a.first),ee(a=te())&&(o.previousIconTemplate=a.first),ee(a=te())&&(o.nextIconTemplate=a.first),ee(a=te())&&(o.triggerIconTemplate=a.first),ee(a=te())&&(o.clearIconTemplate=a.first),ee(a=te())&&(o.decrementIconTemplate=a.first),ee(a=te())&&(o.incrementIconTemplate=a.first),ee(a=te())&&(o.inputIconTemplate=a.first),ee(a=te())&&(o.buttonBarTemplate=a.first),ee(a=te())&&(o.templates=a)}},viewQuery:function(n,o){if(n&1&&eo(S3,5)(k3,5),n&2){let r;ee(r=te())&&(o.inputfieldViewChild=r.first),ee(r=te())&&(o.content=r.first)}},hostVars:4,hostBindings:function(n,o){n&2&&(zt(o.sx("root")),G(o.cn(o.cx("root"),o.styleClass)))},inputs:{iconDisplay:"iconDisplay",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:[2,"inline","inline",K],showOtherMonths:[2,"showOtherMonths","showOtherMonths",K],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",K],showIcon:[2,"showIcon","showIcon",K],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",K],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",K],stepHour:[2,"stepHour","stepHour",Ie],stepMinute:[2,"stepMinute","stepMinute",Ie],stepSecond:[2,"stepSecond","stepSecond",Ie],showSeconds:[2,"showSeconds","showSeconds",K],showOnFocus:[2,"showOnFocus","showOnFocus",K],showWeek:[2,"showWeek","showWeek",K],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",K],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",Ie],showButtonBar:[2,"showButtonBar","showButtonBar",K],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",K],autoZIndex:[2,"autoZIndex","autoZIndex",K],baseZIndex:[2,"baseZIndex","baseZIndex",Ie],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",K],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",K],touchUI:[2,"touchUI","touchUI",K],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",K],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",Ie],minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",view:"view",defaultDate:"defaultDate",appendTo:[1,"appendTo"],motionOptions:[1,"motionOptions"]},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[Me([kO,Yv,{provide:Xv,useExisting:t},{provide:Jt,useExisting:t}]),Kt([Ae]),Z],ngContentSelectors:E3,decls:11,vars:17,consts:[["contentWrapper",""],["inputfield",""],["icon",""],[3,"ngIf"],["name","p-anchored-overlay",3,"onBeforeEnter","onAfterLeave","visible","appear","options"],[3,"click","ngStyle","pBind"],[4,"ngTemplateOutlet"],[4,"ngIf"],[3,"class","pBind",4,"ngIf"],["pInputText","","data-p-maskable","","type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off",3,"focus","keydown","click","blur","input","pSize","value","ngStyle","pAutoFocus","variant","fluid","invalid","pt","unstyled"],["type","button","aria-haspopup","dialog","tabindex","0",3,"class","disabled","pBind","click",4,"ngIf"],["data-p-icon","times",3,"class","pBind","click",4,"ngIf"],[3,"class","pBind","click",4,"ngIf"],["data-p-icon","times",3,"click","pBind"],[3,"click","pBind"],["type","button","aria-haspopup","dialog","tabindex","0",3,"click","disabled","pBind"],[3,"ngClass","pBind",4,"ngIf"],[3,"ngClass","pBind"],["data-p-icon","calendar",3,"pBind",4,"ngIf"],["data-p-icon","calendar",3,"pBind"],[3,"pBind"],["data-p-icon","calendar",3,"class","pBind","click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","calendar",3,"click","pBind"],[3,"class","pBind",4,"ngFor","ngForOf"],["rounded","","variant","text","severity","secondary","type","button",3,"keydown","onClick","styleClass","ngStyle","ariaLabel","pt"],["type","button","pRipple","",3,"class","pBind","click","keydown",4,"ngIf"],["rounded","","variant","text","severity","secondary",3,"keydown","onClick","styleClass","ngStyle","ariaLabel","pt"],["role","grid",3,"class","pBind",4,"ngIf"],["data-p-icon","chevron-left",4,"ngIf"],["data-p-icon","chevron-left"],["type","button","pRipple","",3,"click","keydown","pBind"],["data-p-icon","chevron-right",4,"ngIf"],["data-p-icon","chevron-right"],["role","grid",3,"pBind"],["scope","col",3,"class","pBind",4,"ngFor","ngForOf"],[3,"pBind",4,"ngFor","ngForOf"],["scope","col",3,"pBind"],["draggable","false","pRipple","",3,"click","keydown","ngClass","pBind"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],["pRipple","",3,"class","pBind","click","keydown",4,"ngFor","ngForOf"],["pRipple","",3,"click","keydown","pBind"],["rounded","","variant","text","severity","secondary",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave","styleClass","pt"],[1,"p-datepicker-separator",3,"pBind"],["data-p-icon","chevron-up",3,"pBind",4,"ngIf"],["data-p-icon","chevron-up",3,"pBind"],["data-p-icon","chevron-down",3,"pBind",4,"ngIf"],["data-p-icon","chevron-down",3,"pBind"],["text","","rounded","","severity","secondary",3,"keydown","onClick","keydown.enter","styleClass","pt"],["text","","rounded","","severity","secondary",3,"keydown","click","keydown.enter","styleClass","pt"],["size","small","severity","secondary","variant","text","size","small",3,"keydown","onClick","styleClass","label","ngClass","pt"]],template:function(n,o){n&1&&(cn(I3),D(0,K3,5,28,"ng-template",3),f(1,"p-motion",4),L("onBeforeEnter",function(a){return o.onOverlayBeforeEnter(a)})("onAfterLeave",function(a){return o.onOverlayAfterLeave(a)}),f(2,"div",5,0),L("click",function(a){return o.onOverlayClick(a)}),Ge(4),D(5,Y3,1,0,"ng-container",6)(6,PR,5,6,"ng-container",7)(7,gO,28,38,"div",8)(8,CO,3,4,"div",8),Ge(9,1),D(10,xO,1,0,"ng-container",6),m()()),n&2&&(_("ngIf",!o.inline),l(),_("visible",o.inline||o.overlayVisible)("appear",!o.inline)("options",o.computedMotionOptions()),l(),G(o.cn(o.cx("panel"),o.panelStyleClass)),_("ngStyle",o.panelStyle)("pBind",o.ptm("panel")),O("id",o.panelId)("aria-label",o.getTranslation("chooseDate"))("role",o.inline?null:"dialog")("aria-modal",o.inline?null:"true"),l(3),_("ngTemplateOutlet",o.headerTemplate||o._headerTemplate),l(),_("ngIf",!o.timeOnly),l(),_("ngIf",(o.showTime||o.timeOnly)&&o.currentView==="date"),l(),_("ngIf",o.showButtonBar),l(2),_("ngTemplateOutlet",o.footerTemplate||o._footerTemplate))},dependencies:[Mt,Wa,to,xi,un,no,hn,ns,Lv,Bv,Vv,$0,W0,Av,ts,Qa,ot,oo,Ae,lo,Z0],encapsulation:2,changeDetection:0})}return t})(),Qv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({imports:[Zv,ot,ot]})}return t})();var IO=["data-p-icon","filter-fill"],Jv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Z],attrs:IO,decls:1,vars:0,consts:[["d","M13.7274 0.33847C13.6228 0.130941 13.4095 0 13.1764 0H0.82351C0.590451 0 0.377157 0.130941 0.272568 0.33847C0.167157 0.545999 0.187746 0.795529 0.325275 0.98247L4.73527 6.99588V13.3824C4.73527 13.7233 5.01198 14 5.35292 14H8.64704C8.98798 14 9.26469 13.7233 9.26469 13.3824V6.99588L13.6747 0.98247C13.8122 0.795529 13.8328 0.545999 13.7274 0.33847Z","fill","currentColor"]],template:function(n,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var eb=`
1088
- .p-paginator {
1089
- display: flex;
1090
- align-items: center;
1091
- justify-content: center;
1092
- flex-wrap: wrap;
1093
- background: dt('paginator.background');
1094
- color: dt('paginator.color');
1095
- padding: dt('paginator.padding');
1096
- border-radius: dt('paginator.border.radius');
1097
- gap: dt('paginator.gap');
1098
- }
1099
-
1100
- .p-paginator-content {
1101
- display: flex;
1102
- align-items: center;
1103
- justify-content: center;
1104
- flex-wrap: wrap;
1105
- gap: dt('paginator.gap');
1106
- }
1107
-
1108
- .p-paginator-content-start {
1109
- margin-inline-end: auto;
1110
- }
1111
-
1112
- .p-paginator-content-end {
1113
- margin-inline-start: auto;
1114
- }
1115
-
1116
- .p-paginator-page,
1117
- .p-paginator-next,
1118
- .p-paginator-last,
1119
- .p-paginator-first,
1120
- .p-paginator-prev {
1121
- cursor: pointer;
1122
- display: inline-flex;
1123
- align-items: center;
1124
- justify-content: center;
1125
- line-height: 1;
1126
- user-select: none;
1127
- overflow: hidden;
1128
- position: relative;
1129
- background: dt('paginator.nav.button.background');
1130
- border: 0 none;
1131
- color: dt('paginator.nav.button.color');
1132
- min-width: dt('paginator.nav.button.width');
1133
- height: dt('paginator.nav.button.height');
1134
- transition:
1135
- background dt('paginator.transition.duration'),
1136
- color dt('paginator.transition.duration'),
1137
- outline-color dt('paginator.transition.duration'),
1138
- box-shadow dt('paginator.transition.duration');
1139
- border-radius: dt('paginator.nav.button.border.radius');
1140
- padding: 0;
1141
- margin: 0;
1142
- }
1143
-
1144
- .p-paginator-page:focus-visible,
1145
- .p-paginator-next:focus-visible,
1146
- .p-paginator-last:focus-visible,
1147
- .p-paginator-first:focus-visible,
1148
- .p-paginator-prev:focus-visible {
1149
- box-shadow: dt('paginator.nav.button.focus.ring.shadow');
1150
- outline: dt('paginator.nav.button.focus.ring.width') dt('paginator.nav.button.focus.ring.style') dt('paginator.nav.button.focus.ring.color');
1151
- outline-offset: dt('paginator.nav.button.focus.ring.offset');
1152
- }
1153
-
1154
- .p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,
1155
- .p-paginator-first:not(.p-disabled):hover,
1156
- .p-paginator-prev:not(.p-disabled):hover,
1157
- .p-paginator-next:not(.p-disabled):hover,
1158
- .p-paginator-last:not(.p-disabled):hover {
1159
- background: dt('paginator.nav.button.hover.background');
1160
- color: dt('paginator.nav.button.hover.color');
1161
- }
1162
-
1163
- .p-paginator-page.p-paginator-page-selected {
1164
- background: dt('paginator.nav.button.selected.background');
1165
- color: dt('paginator.nav.button.selected.color');
1166
- }
1167
-
1168
- .p-paginator-current {
1169
- color: dt('paginator.current.page.report.color');
1170
- }
1171
-
1172
- .p-paginator-pages {
1173
- display: flex;
1174
- align-items: center;
1175
- gap: dt('paginator.gap');
1176
- }
1177
-
1178
- .p-paginator-jtp-input .p-inputtext {
1179
- max-width: dt('paginator.jump.to.page.input.max.width');
1180
- }
1181
-
1182
- .p-paginator-first:dir(rtl),
1183
- .p-paginator-prev:dir(rtl),
1184
- .p-paginator-next:dir(rtl),
1185
- .p-paginator-last:dir(rtl) {
1186
- transform: rotate(180deg);
1187
- }
1188
- `;var EO=["dropdownicon"],MO=["firstpagelinkicon"],DO=["previouspagelinkicon"],PO=["lastpagelinkicon"],RO=["nextpagelinkicon"],ls=t=>({$implicit:t}),OO=t=>({pageLink:t});function FO(t,i){t&1&&le(0)}function NO(t,i){if(t&1&&(f(0,"div",10),D(1,FO,1,0,"ng-container",11),m()),t&2){let e=d();G(e.cx("contentStart")),_("pBind",e.ptm("contentStart")),l(),_("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Pe(5,ls,e.paginatorState))}}function AO(t,i){if(t&1&&(f(0,"span",10),b(1),m()),t&2){let e=d();G(e.cx("current")),_("pBind",e.ptm("current")),l(),x(e.currentPageReport)}}function LO(t,i){if(t&1&&(X(),F(0,"svg",14)),t&2){let e=d(2);G(e.cx("firstIcon")),_("pBind",e.ptm("firstIcon"))}}function BO(t,i){}function VO(t,i){t&1&&D(0,BO,0,0,"ng-template")}function zO(t,i){if(t&1&&(f(0,"span"),D(1,VO,1,0,null,15),m()),t&2){let e=d(2);G(e.cx("firstIcon")),l(),_("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function HO(t,i){if(t&1){let e=Y();f(0,"button",12),L("click",function(o){w(e);let r=d();return T(r.changePageToFirst(o))}),D(1,LO,1,3,"svg",13)(2,zO,2,3,"span",4),m()}if(t&2){let e=d();G(e.cx("first")),_("pBind",e.ptm("first")),O("aria-label",e.getAriaLabel("firstPageLabel")),l(),_("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),l(),_("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function qO(t,i){if(t&1&&(X(),F(0,"svg",16)),t&2){let e=d();G(e.cx("prevIcon")),_("pBind",e.ptm("prevIcon"))}}function GO(t,i){}function jO(t,i){t&1&&D(0,GO,0,0,"ng-template")}function UO(t,i){if(t&1&&(f(0,"span"),D(1,jO,1,0,null,15),m()),t&2){let e=d();G(e.cx("prevIcon")),l(),_("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function $O(t,i){if(t&1){let e=Y();f(0,"button",12),L("click",function(o){let r=w(e).$implicit,a=d(2);return T(a.onPageLinkClick(o,r-1))}),b(1),m()}if(t&2){let e=i.$implicit,n=d(2);G(n.cx("page",Pe(6,OO,e))),_("pBind",n.ptm("page")),O("aria-label",n.getPageAriaLabel(e))("aria-current",e-1==n.getPage()?"page":void 0),l(),Se(" ",n.getLocalization(e)," ")}}function WO(t,i){if(t&1&&(f(0,"span",10),D(1,$O,2,8,"button",17),m()),t&2){let e=d();G(e.cx("pages")),_("pBind",e.ptm("pages")),l(),_("ngForOf",e.pageLinks)}}function KO(t,i){if(t&1&&b(0),t&2){let e=d(2);x(e.currentPageReport)}}function YO(t,i){t&1&&le(0)}function XO(t,i){if(t&1&&D(0,YO,1,0,"ng-container",11),t&2){let e=i.$implicit,n=d(3);_("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Pe(2,ls,e))}}function ZO(t,i){t&1&&(we(0),D(1,XO,1,4,"ng-template",21),Te())}function QO(t,i){t&1&&le(0)}function JO(t,i){if(t&1&&D(0,QO,1,0,"ng-container",15),t&2){let e=d(3);_("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function eF(t,i){t&1&&D(0,JO,1,1,"ng-template",22)}function tF(t,i){if(t&1){let e=Y();f(0,"p-select",18),L("onChange",function(o){w(e);let r=d();return T(r.onPageDropdownChange(o))}),D(1,KO,1,1,"ng-template",19)(2,ZO,2,0,"ng-container",20)(3,eF,1,0,null,20),m()}if(t&2){let e=d();_("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("styleClass",e.cx("pcJumpToPageDropdown"))("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight)("pt",e.ptm("pcJumpToPageDropdown"))("unstyled",e.unstyled()),O("aria-label",e.getAriaLabel("jumpToPageDropdownLabel")),l(2),_("ngIf",e.jumpToPageItemTemplate),l(),_("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function nF(t,i){if(t&1&&(X(),F(0,"svg",23)),t&2){let e=d();G(e.cx("nextIcon")),_("pBind",e.ptm("nextIcon"))}}function iF(t,i){}function oF(t,i){t&1&&D(0,iF,0,0,"ng-template")}function rF(t,i){if(t&1&&(f(0,"span"),D(1,oF,1,0,null,15),m()),t&2){let e=d();G(e.cx("nextIcon")),l(),_("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function aF(t,i){if(t&1&&(X(),F(0,"svg",25)),t&2){let e=d(2);G(e.cx("lastIcon")),_("pBind",e.ptm("lastIcon"))}}function sF(t,i){}function lF(t,i){t&1&&D(0,sF,0,0,"ng-template")}function cF(t,i){if(t&1&&(f(0,"span"),D(1,lF,1,0,null,15),m()),t&2){let e=d(2);G(e.cx("lastIcon")),l(),_("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function dF(t,i){if(t&1){let e=Y();f(0,"button",2),L("click",function(o){w(e);let r=d();return T(r.changePageToLast(o))}),D(1,aF,1,3,"svg",24)(2,cF,2,3,"span",4),m()}if(t&2){let e=d();G(e.cx("last")),_("pBind",e.ptm("last"))("disabled",e.isLastPage()||e.empty()),O("aria-label",e.getAriaLabel("lastPageLabel")),l(),_("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),l(),_("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function uF(t,i){if(t&1){let e=Y();f(0,"p-inputnumber",26),L("ngModelChange",function(o){w(e);let r=d();return T(r.changePage(o-1))}),m()}if(t&2){let e=d();G(e.cx("pcJumpToPageInput")),_("pt",e.ptm("pcJumpToPageInput"))("ngModel",e.currentPage())("disabled",e.empty())("unstyled",e.unstyled())}}function pF(t,i){t&1&&le(0)}function hF(t,i){if(t&1&&D(0,pF,1,0,"ng-container",11),t&2){let e=i.$implicit,n=d(3);_("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Pe(2,ls,e))}}function fF(t,i){t&1&&(we(0),D(1,hF,1,4,"ng-template",21),Te())}function mF(t,i){t&1&&le(0)}function _F(t,i){if(t&1&&D(0,mF,1,0,"ng-container",15),t&2){let e=d(3);_("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function gF(t,i){t&1&&D(0,_F,1,1,"ng-template",22)}function vF(t,i){if(t&1){let e=Y();f(0,"p-select",27),or("ngModelChange",function(o){w(e);let r=d();return ir(r.rows,o)||(r.rows=o),T(o)}),L("onChange",function(o){w(e);let r=d();return T(r.onRppChange(o))}),D(1,fF,2,0,"ng-container",20)(2,gF,1,0,null,20),m()}if(t&2){let e=d();_("options",e.rowsPerPageItems),nr("ngModel",e.rows),_("styleClass",e.cx("pcRowPerPageDropdown"))("disabled",e.empty())("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight)("ariaLabel",e.getAriaLabel("rowsPerPageLabel"))("pt",e.ptm("pcRowPerPageDropdown"))("unstyled",e.unstyled()),l(),_("ngIf",e.dropdownItemTemplate),l(),_("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function bF(t,i){t&1&&le(0)}function yF(t,i){if(t&1&&(f(0,"div",10),D(1,bF,1,0,"ng-container",11),m()),t&2){let e=d();G(e.cx("contentEnd")),_("pBind",e.ptm("contentEnd")),l(),_("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Pe(5,ls,e.paginatorState))}}var CF={paginator:({instance:t})=>["p-paginator p-component"],content:"p-paginator-content",contentStart:"p-paginator-content-start",contentEnd:"p-paginator-content-end",first:({instance:t})=>["p-paginator-first",{"p-disabled":t.isFirstPage()||t.empty()}],firstIcon:"p-paginator-first-icon",prev:({instance:t})=>["p-paginator-prev",{"p-disabled":t.isFirstPage()||t.empty()}],prevIcon:"p-paginator-prev-icon",next:({instance:t})=>["p-paginator-next",{"p-disabled":t.isLastPage()||t.empty()}],nextIcon:"p-paginator-next-icon",last:({instance:t})=>["p-paginator-last",{"p-disabled":t.isLastPage()||t.empty()}],lastIcon:"p-paginator-last-icon",pages:"p-paginator-pages",page:({instance:t,pageLink:i})=>["p-paginator-page",{"p-paginator-page-selected":i-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},tb=(()=>{class t extends Qt{name="paginator";style=eb;classes=CF;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var nb=new ve("PAGINATOR_INSTANCE"),Ff=(()=>{class t extends On{componentName="Paginator";bindDirectiveInstance=p(Ae,{self:!0});$pcPaginator=p(nb,{optional:!0,skipSelf:!0})??void 0;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}pageLinkSize=5;styleClass;alwaysShow=!0;dropdownAppendTo;templateLeft;templateRight;dropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showFirstLastIcon=!0;totalRecords=0;rows=0;rowsPerPageOptions;showJumpToPageDropdown;showJumpToPageInput;jumpToPageItemTemplate;showPageLinks=!0;locale;dropdownItemTemplate;get first(){return this._first}set first(e){this._first=e}appendTo=V(void 0);onPageChange=new re;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=p(tb);$appendTo=k(()=>this.appendTo()||this.config.overlayAppendTo());get display(){return this.alwaysShow||this.pageLinks&&this.pageLinks.length>1?null:"none"}constructor(){super()}onInit(){this.updatePaginatorState()}onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"firstpagelinkicon":this._firstPageLinkIconTemplate=e.template;break;case"previouspagelinkicon":this._previousPageLinkIconTemplate=e.template;break;case"lastpagelinkicon":this._lastPageLinkIconTemplate=e.template;break;case"nextpagelinkicon":this._nextPageLinkIconTemplate=e.template;break}})}getAriaLabel(e){return this.config.translation.aria?this.config.translation.aria[e]:void 0}getPageAriaLabel(e){return this.config.translation.aria?this.config.translation.aria.pageLabel?.replace(/{page}/g,`${e}`):void 0}getLocalization(e){let n=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(n.map((r,a)=>[a,r]));return e>9?String(e).split("").map(a=>o.get(Number(a))).join(""):o.get(e)}onChanges(e){e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions(),e.pageLinkSize&&this.updatePageLinks()}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];let e=null;for(let n of this.rowsPerPageOptions)typeof n=="object"&&n.showAll?e={label:n.showAll,value:this.totalRecords}:this.rowsPerPageItems.push({label:String(this.getLocalization(n)),value:n});e&&this.rowsPerPageItems.push(e)}}isFirstPage(){return this.getPage()===0}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),n=Math.min(this.pageLinkSize,e),o=Math.max(0,Math.ceil(this.getPage()-n/2)),r=Math.min(e-1,o+n-1);var a=this.pageLinkSize-(r-o+1);return o=Math.max(0,o-a),[o,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),n=e[0],o=e[1];for(let r=n;r<=o;r++)this.pageLinks.push(r+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let r=0;r<this.getPageCount();r++)this.pageItems.push({label:String(r+1),value:r})}}changePage(e){var n=this.getPageCount();if(e>=0&&e<n){this._first=this.rows*e;var o={page:e,first:this.first,rows:this.rows,pageCount:n};this.updatePageLinks(),this.onPageChange.emit(o),this.updatePaginatorState()}}updateFirst(){let e=this.getPage();e>0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,n){this.changePage(n),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return this.getPageCount()===0}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["p-paginator"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,EO,4)(r,MO,4)(r,DO,4)(r,PO,4)(r,RO,4)(r,Dt,4),n&2){let a;ee(a=te())&&(o.dropdownIconTemplate=a.first),ee(a=te())&&(o.firstPageLinkIconTemplate=a.first),ee(a=te())&&(o.previousPageLinkIconTemplate=a.first),ee(a=te())&&(o.lastPageLinkIconTemplate=a.first),ee(a=te())&&(o.nextPageLinkIconTemplate=a.first),ee(a=te())&&(o.templates=a)}},hostVars:4,hostBindings:function(n,o){n&2&&(G(o.cn(o.cx("paginator"),o.styleClass)),Oe("display",o.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",Ie],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",K],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",K],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",K],totalRecords:[2,"totalRecords","totalRecords",Ie],rows:[2,"rows","rows",Ie],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",K],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",K],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",K],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[Me([tb,{provide:nb,useExisting:t},{provide:Jt,useExisting:t}]),Kt([Ae]),Z],decls:15,vars:23,consts:[[3,"pBind","class",4,"ngIf"],["type","button","pRipple","",3,"pBind","class","click",4,"ngIf"],["type","button","pRipple","",3,"click","pBind","disabled"],["data-p-icon","angle-left",3,"pBind","class",4,"ngIf"],[3,"class",4,"ngIf"],[3,"options","ngModel","disabled","styleClass","appendTo","scrollHeight","pt","unstyled","onChange",4,"ngIf"],["data-p-icon","angle-right",3,"pBind","class",4,"ngIf"],["type","button","pRipple","",3,"pBind","disabled","class","click",4,"ngIf"],[3,"pt","ngModel","class","disabled","unstyled","ngModelChange",4,"ngIf"],[3,"options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel","pt","unstyled","ngModelChange","onChange",4,"ngIf"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","pRipple","",3,"click","pBind"],["data-p-icon","angle-double-left",3,"pBind","class",4,"ngIf"],["data-p-icon","angle-double-left",3,"pBind"],[4,"ngTemplateOutlet"],["data-p-icon","angle-left",3,"pBind"],["type","button","pRipple","",3,"pBind","class","click",4,"ngFor","ngForOf"],[3,"onChange","options","ngModel","disabled","styleClass","appendTo","scrollHeight","pt","unstyled"],["pTemplate","selectedItem"],[4,"ngIf"],["pTemplate","item"],["pTemplate","dropdownicon"],["data-p-icon","angle-right",3,"pBind"],["data-p-icon","angle-double-right",3,"pBind","class",4,"ngIf"],["data-p-icon","angle-double-right",3,"pBind"],[3,"ngModelChange","pt","ngModel","disabled","unstyled"],[3,"ngModelChange","onChange","options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel","pt","unstyled"]],template:function(n,o){n&1&&(D(0,NO,2,7,"div",0)(1,AO,2,4,"span",0)(2,HO,3,6,"button",1),f(3,"button",2),L("click",function(a){return o.changePageToPrev(a)}),D(4,qO,1,3,"svg",3)(5,UO,2,3,"span",4),m(),D(6,WO,2,4,"span",0)(7,tF,4,11,"p-select",5),f(8,"button",2),L("click",function(a){return o.changePageToNext(a)}),D(9,nF,1,3,"svg",6)(10,rF,2,3,"span",4),m(),D(11,dF,3,7,"button",7)(12,uF,1,6,"p-inputnumber",8)(13,vF,3,11,"p-select",9)(14,yF,2,7,"div",0)),n&2&&(_("ngIf",o.templateLeft),l(),_("ngIf",o.showCurrentPageReport),l(),_("ngIf",o.showFirstLastIcon),l(),G(o.cx("prev")),_("pBind",o.ptm("prev"))("disabled",o.isFirstPage()||o.empty()),O("aria-label",o.getAriaLabel("prevPageLabel")),l(),_("ngIf",!o.previousPageLinkIconTemplate&&!o._previousPageLinkIconTemplate),l(),_("ngIf",o.previousPageLinkIconTemplate||o._previousPageLinkIconTemplate),l(),_("ngIf",o.showPageLinks),l(),_("ngIf",o.showJumpToPageDropdown),l(),G(o.cx("next")),_("pBind",o.ptm("next"))("disabled",o.isLastPage()||o.empty()),O("aria-label",o.getAriaLabel("nextPageLabel")),l(),_("ngIf",!o.nextPageLinkIconTemplate&&!o._nextPageLinkIconTemplate),l(),_("ngIf",o.nextPageLinkIconTemplate||o._nextPageLinkIconTemplate),l(),_("ngIf",o.showFirstLastIcon),l(),_("ngIf",o.showJumpToPageInput),l(),_("ngIf",o.rowsPerPageOptions),l(),_("ngIf",o.templateRight))},dependencies:[Mt,to,xi,un,nv,J0,bt,Pt,Rt,ns,Rv,Ov,Fv,Nv,ot,Dt,Ae],encapsulation:2,changeDetection:0})}return t})(),ib=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({imports:[Ff,ot,ot]})}return t})();var ob=`
1189
- .p-radiobutton {
1190
- position: relative;
1191
- display: inline-flex;
1192
- user-select: none;
1193
- vertical-align: bottom;
1194
- width: dt('radiobutton.width');
1195
- height: dt('radiobutton.height');
1196
- }
1197
-
1198
- .p-radiobutton-input {
1199
- cursor: pointer;
1200
- appearance: none;
1201
- position: absolute;
1202
- top: 0;
1203
- inset-inline-start: 0;
1204
- width: 100%;
1205
- height: 100%;
1206
- padding: 0;
1207
- margin: 0;
1208
- opacity: 0;
1209
- z-index: 1;
1210
- outline: 0 none;
1211
- border: 1px solid transparent;
1212
- border-radius: 50%;
1213
- }
1214
-
1215
- .p-radiobutton-box {
1216
- display: flex;
1217
- justify-content: center;
1218
- align-items: center;
1219
- border-radius: 50%;
1220
- border: 1px solid dt('radiobutton.border.color');
1221
- background: dt('radiobutton.background');
1222
- width: dt('radiobutton.width');
1223
- height: dt('radiobutton.height');
1224
- transition:
1225
- background dt('radiobutton.transition.duration'),
1226
- color dt('radiobutton.transition.duration'),
1227
- border-color dt('radiobutton.transition.duration'),
1228
- box-shadow dt('radiobutton.transition.duration'),
1229
- outline-color dt('radiobutton.transition.duration');
1230
- outline-color: transparent;
1231
- box-shadow: dt('radiobutton.shadow');
1232
- }
1233
-
1234
- .p-radiobutton-icon {
1235
- transition-duration: dt('radiobutton.transition.duration');
1236
- background: transparent;
1237
- font-size: dt('radiobutton.icon.size');
1238
- width: dt('radiobutton.icon.size');
1239
- height: dt('radiobutton.icon.size');
1240
- border-radius: 50%;
1241
- backface-visibility: hidden;
1242
- transform: translateZ(0) scale(0.1);
1243
- }
1244
-
1245
- .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1246
- border-color: dt('radiobutton.hover.border.color');
1247
- }
1248
-
1249
- .p-radiobutton-checked .p-radiobutton-box {
1250
- border-color: dt('radiobutton.checked.border.color');
1251
- background: dt('radiobutton.checked.background');
1252
- }
1253
-
1254
- .p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1255
- background: dt('radiobutton.icon.checked.color');
1256
- transform: translateZ(0) scale(1, 1);
1257
- visibility: visible;
1258
- }
1259
-
1260
- .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1261
- border-color: dt('radiobutton.checked.hover.border.color');
1262
- background: dt('radiobutton.checked.hover.background');
1263
- }
1264
-
1265
- .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1266
- background: dt('radiobutton.icon.checked.hover.color');
1267
- }
1268
-
1269
- .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1270
- border-color: dt('radiobutton.focus.border.color');
1271
- box-shadow: dt('radiobutton.focus.ring.shadow');
1272
- outline: dt('radiobutton.focus.ring.width') dt('radiobutton.focus.ring.style') dt('radiobutton.focus.ring.color');
1273
- outline-offset: dt('radiobutton.focus.ring.offset');
1274
- }
1275
-
1276
- .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1277
- border-color: dt('radiobutton.checked.focus.border.color');
1278
- }
1279
-
1280
- .p-radiobutton.p-invalid > .p-radiobutton-box {
1281
- border-color: dt('radiobutton.invalid.border.color');
1282
- }
1283
-
1284
- .p-radiobutton.p-variant-filled .p-radiobutton-box {
1285
- background: dt('radiobutton.filled.background');
1286
- }
1287
-
1288
- .p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {
1289
- background: dt('radiobutton.checked.background');
1290
- }
1291
-
1292
- .p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {
1293
- background: dt('radiobutton.checked.hover.background');
1294
- }
1295
-
1296
- .p-radiobutton.p-disabled {
1297
- opacity: 1;
1298
- }
1299
-
1300
- .p-radiobutton.p-disabled .p-radiobutton-box {
1301
- background: dt('radiobutton.disabled.background');
1302
- border-color: dt('radiobutton.checked.disabled.border.color');
1303
- }
1304
-
1305
- .p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {
1306
- background: dt('radiobutton.icon.disabled.color');
1307
- }
1308
-
1309
- .p-radiobutton-sm,
1310
- .p-radiobutton-sm .p-radiobutton-box {
1311
- width: dt('radiobutton.sm.width');
1312
- height: dt('radiobutton.sm.height');
1313
- }
1314
-
1315
- .p-radiobutton-sm .p-radiobutton-icon {
1316
- font-size: dt('radiobutton.icon.sm.size');
1317
- width: dt('radiobutton.icon.sm.size');
1318
- height: dt('radiobutton.icon.sm.size');
1319
- }
1320
-
1321
- .p-radiobutton-lg,
1322
- .p-radiobutton-lg .p-radiobutton-box {
1323
- width: dt('radiobutton.lg.width');
1324
- height: dt('radiobutton.lg.height');
1325
- }
1326
-
1327
- .p-radiobutton-lg .p-radiobutton-icon {
1328
- font-size: dt('radiobutton.icon.lg.size');
1329
- width: dt('radiobutton.icon.lg.size');
1330
- height: dt('radiobutton.icon.lg.size');
1331
- }
1332
- `;var wF=["input"],TF=`
1333
- ${ob}
1334
-
1335
- /* For PrimeNG */
1336
- p-radioButton.ng-invalid.ng-dirty .p-radiobutton-box,
1337
- p-radio-button.ng-invalid.ng-dirty .p-radiobutton-box,
1338
- p-radiobutton.ng-invalid.ng-dirty .p-radiobutton-box {
1339
- border-color: dt('radiobutton.invalid.border.color');
1340
- }
1341
- `,SF={root:({instance:t})=>["p-radiobutton p-component",{"p-radiobutton-checked":t.checked,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-radiobutton-sm p-inputfield-sm":t.size()==="small","p-radiobutton-lg p-inputfield-lg":t.size()==="large"}],box:"p-radiobutton-box",input:"p-radiobutton-input",icon:"p-radiobutton-icon"},rb=(()=>{class t extends Qt{name="radiobutton";style=TF;classes=SF;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var ab=new ve("RADIOBUTTON_INSTANCE"),kF={provide:Za,useExisting:Xi(()=>sb),multi:!0},IF=(()=>{class t{accessors=[];add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return e[0].control?e[0].control.root===n.control.control.root&&e[1].name()===n.name():!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sb=(()=>{class t extends K0{componentName="RadioButton";$pcRadioButton=p(ab,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ae,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=V();size=V();onClick=new re;onFocus=new re;onBlur=new re;inputViewChild;$variant=k(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=p(rb);injector=p(ft);registry=p(IF);onInit(){this.control=this.injector.get(R0),this.registry.add(this.control,this)}onChange(e){this.$disabled()||this.select(e)}select(e){this.$disabled()||(this.checked=!0,this.writeModelValue(this.checked),this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}focus(){this.inputViewChild.nativeElement.focus()}writeControlValue(e,n){this.checked=this.binary?!!e:e==this.value,n(this.checked),this.cd.markForCheck()}onDestroy(){this.registry.remove(this)}get dataP(){return this.cn({invalid:this.invalid(),checked:this.checked,disabled:this.$disabled(),filled:this.$variant()==="filled",[this.size()]:this.size()})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,o){if(n&1&&eo(wF,5),n&2){let r;ee(r=te())&&(o.inputViewChild=r.first)}},hostVars:5,hostBindings:function(n,o){n&2&&(O("data-p-disabled",o.$disabled())("data-p-checked",o.checked)("data-p",o.dataP),G(o.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",Ie],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",K],binary:[2,"binary","binary",K],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Me([kF,rb,{provide:ab,useExisting:t},{provide:Jt,useExisting:t}]),Kt([Ae]),Z],decls:4,vars:20,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus","pBind"],[3,"pBind"]],template:function(n,o){n&1&&(f(0,"input",1,0),L("focus",function(a){return o.onInputFocus(a)})("blur",function(a){return o.onInputBlur(a)})("change",function(a){return o.onChange(a)}),m(),f(2,"div",2),F(3,"div",2),m()),n&2&&(G(o.cx("input")),_("checked",o.checked)("pAutoFocus",o.autofocus)("pBind",o.ptm("input")),O("id",o.inputId)("name",o.name())("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0)("value",o.modelValue())("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("aria-checked",o.checked)("tabindex",o.tabindex),l(2),G(o.cx("box")),_("pBind",o.ptm("box")),l(),G(o.cx("icon")),_("pBind",o.ptm("icon")))},dependencies:[Mt,ts,ot,oo,Ae],encapsulation:2,changeDetection:0})}return t})(),lb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({imports:[sb,ot,ot]})}return t})();var EF=["header"],MF=["headergrouped"],DF=["body"],PF=["loadingbody"],RF=["caption"],OF=["footer"],FF=["footergrouped"],NF=["summary"],AF=["colgroup"],LF=["expandedrow"],BF=["groupheader"],VF=["groupfooter"],zF=["frozenexpandedrow"],HF=["frozenheader"],qF=["frozenbody"],GF=["frozenfooter"],jF=["frozencolgroup"],UF=["emptymessage"],$F=["paginatorleft"],WF=["paginatorright"],KF=["paginatordropdownitem"],YF=["loadingicon"],XF=["reorderindicatorupicon"],ZF=["reorderindicatordownicon"],QF=["sorticon"],JF=["checkboxicon"],e4=["headercheckboxicon"],t4=["paginatordropdownicon"],n4=["paginatorfirstpagelinkicon"],i4=["paginatorlastpagelinkicon"],o4=["paginatorpreviouspagelinkicon"],r4=["paginatornextpagelinkicon"],a4=["resizeHelper"],s4=["reorderIndicatorUp"],l4=["reorderIndicatorDown"],c4=["wrapper"],d4=["table"],u4=["thead"],p4=["tfoot"],h4=["scroller"],f4=t=>({height:t}),cb=(t,i)=>({$implicit:t,options:i}),m4=t=>({columns:t}),Nf=t=>({$implicit:t});function _4(t,i){if(t&1&&F(0,"i",17),t&2){let e=d(2);G(e.cn(e.cx("loadingIcon"),e.loadingIcon)),_("pBind",e.ptm("loadingIcon"))}}function g4(t,i){if(t&1&&(X(),F(0,"svg",19)),t&2){let e=d(3);G(e.cx("loadingIcon")),_("spin",!0)("pBind",e.ptm("loadingIcon"))}}function v4(t,i){}function b4(t,i){t&1&&D(0,v4,0,0,"ng-template")}function y4(t,i){if(t&1&&(f(0,"span",17),D(1,b4,1,0,null,20),m()),t&2){let e=d(3);G(e.cx("loadingIcon")),_("pBind",e.ptm("loadingIcon")),l(),_("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function C4(t,i){if(t&1&&(we(0),D(1,g4,1,4,"svg",18)(2,y4,2,4,"span",10),Te()),t&2){let e=d(2);l(),_("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),l(),_("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function x4(t,i){if(t&1&&(f(0,"div",17),v0("p-overlay-mask-leave-active"),g0("p-overlay-mask-enter-active"),D(1,_4,1,3,"i",10)(2,C4,3,2,"ng-container",14),m()),t&2){let e=d();G(e.cx("mask")),_("pBind",e.ptm("mask")),l(),_("ngIf",e.loadingIcon),l(),_("ngIf",!e.loadingIcon)}}function w4(t,i){t&1&&le(0)}function T4(t,i){if(t&1&&(f(0,"div",17),D(1,w4,1,0,"ng-container",20),m()),t&2){let e=d();G(e.cx("header")),_("pBind",e.ptm("header")),l(),_("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function S4(t,i){t&1&&le(0)}function k4(t,i){if(t&1&&D(0,S4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function I4(t,i){t&1&&D(0,k4,1,1,"ng-template",22)}function E4(t,i){t&1&&le(0)}function M4(t,i){if(t&1&&D(0,E4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function D4(t,i){t&1&&D(0,M4,1,1,"ng-template",23)}function P4(t,i){t&1&&le(0)}function R4(t,i){if(t&1&&D(0,P4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function O4(t,i){t&1&&D(0,R4,1,1,"ng-template",24)}function F4(t,i){t&1&&le(0)}function N4(t,i){if(t&1&&D(0,F4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function A4(t,i){t&1&&D(0,N4,1,1,"ng-template",25)}function L4(t,i){t&1&&le(0)}function B4(t,i){if(t&1&&D(0,L4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function V4(t,i){t&1&&D(0,B4,1,1,"ng-template",26)}function z4(t,i){if(t&1){let e=Y();f(0,"p-paginator",21),L("onPageChange",function(o){w(e);let r=d();return T(r.onPageChange(o))}),D(1,I4,1,0,null,14)(2,D4,1,0,null,14)(3,O4,1,0,null,14)(4,A4,1,0,null,14)(5,V4,1,0,null,14),m()}if(t&2){let e=d();_("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate||e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate||e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate||e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)("styleClass",e.cx("pcPaginator")+" "+e.paginatorStyleClass&&e.paginatorStyleClass)("locale",e.paginatorLocale)("pt",e.ptm("pcPaginator"))("unstyled",e.unstyled()),l(),_("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),_("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),_("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),_("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),_("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function H4(t,i){t&1&&le(0)}function q4(t,i){if(t&1&&D(0,H4,1,0,"ng-container",28),t&2){let e=i.$implicit,n=i.options;d(2);let o=_t(8);_("ngTemplateOutlet",o)("ngTemplateOutletContext",qn(2,cb,e,n))}}function G4(t,i){if(t&1){let e=Y();f(0,"p-scroller",27,2),L("onLazyLoad",function(o){w(e);let r=d();return T(r.onLazyItemLoad(o))}),D(2,q4,1,5,"ng-template",null,3,je),m()}if(t&2){let e=d();zt(Pe(16,f4,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),_("items",e.processedData)("columns",e.columns)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize)("step",e.rows)("delay",e.lazy?e.virtualScrollDelay:0)("inline",!0)("autoSize",!0)("lazy",e.lazy)("loaderDisabled",!0)("showSpacer",!1)("showLoader",e.loadingBodyTemplate||e._loadingBodyTemplate)("options",e.virtualScrollOptions)("pt",e.ptm("virtualScroller"))}}function j4(t,i){t&1&&le(0)}function U4(t,i){if(t&1&&(we(0),D(1,j4,1,0,"ng-container",28),Te()),t&2){let e=d(),n=_t(8);l(),_("ngTemplateOutlet",n)("ngTemplateOutletContext",qn(4,cb,e.processedData,Pe(2,m4,e.columns)))}}function $4(t,i){t&1&&le(0)}function W4(t,i){t&1&&le(0)}function K4(t,i){if(t&1&&F(0,"tbody",35),t&2){let e=d().options,n=d();G(n.cx("tbody")),_("pBind",n.ptm("tbody"))("value",n.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",n.frozenBodyTemplate||n._frozenBodyTemplate)("unstyled",n.unstyled())("frozen",!0),O("data-p-virtualscroll",n.virtualScroll)}}function Y4(t,i){if(t&1&&F(0,"tbody",36),t&2){let e=d().options,n=d();zt("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),G(n.cx("virtualScrollerSpacer")),_("pBind",n.ptm("virtualScrollerSpacer"))}}function X4(t,i){t&1&&le(0)}function Z4(t,i){if(t&1&&(f(0,"tfoot",37,6),D(2,X4,1,0,"ng-container",28),m()),t&2){let e=d().options,n=d();_("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot"))("pBind",n.ptm("tfoot")),l(2),_("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Pe(5,Nf,e.columns))}}function Q4(t,i){if(t&1&&(f(0,"table",29,4),D(2,$4,1,0,"ng-container",28),f(3,"thead",30,5),D(5,W4,1,0,"ng-container",28),m(),D(6,K4,1,10,"tbody",31),F(7,"tbody",32),D(8,Y4,1,5,"tbody",33)(9,Z4,3,7,"tfoot",34),m()),t&2){let e=i.options,n=d();zt(n.tableStyle),G(n.cn(n.cx("table"),n.tableStyleClass)),_("pBind",n.ptm("table")),O("id",n.id+"-table"),l(2),_("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Pe(28,Nf,e.columns)),l(),G(n.cx("thead")),_("ngStyle",n.sx("thead"))("pBind",n.ptm("thead")),l(2),_("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Pe(30,Nf,e.columns)),l(),_("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),l(),zt(e.contentStyle),G(n.cx("tbody",e.contentStyleClass)),_("pBind",n.ptm("tbody"))("value",n.dataToRender(e.rows))("pTableBody",e.columns)("pTableBodyTemplate",n.bodyTemplate||n._bodyTemplate)("scrollerOptions",e)("unstyled",n.unstyled()),O("data-p-virtualscroll",n.virtualScroll),l(),_("ngIf",e.spacerStyle),l(),_("ngIf",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)}}function J4(t,i){t&1&&le(0)}function eN(t,i){if(t&1&&D(0,J4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function tN(t,i){t&1&&D(0,eN,1,1,"ng-template",22)}function nN(t,i){t&1&&le(0)}function iN(t,i){if(t&1&&D(0,nN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function oN(t,i){t&1&&D(0,iN,1,1,"ng-template",23)}function rN(t,i){t&1&&le(0)}function aN(t,i){if(t&1&&D(0,rN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function sN(t,i){t&1&&D(0,aN,1,1,"ng-template",24)}function lN(t,i){t&1&&le(0)}function cN(t,i){if(t&1&&D(0,lN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function dN(t,i){t&1&&D(0,cN,1,1,"ng-template",25)}function uN(t,i){t&1&&le(0)}function pN(t,i){if(t&1&&D(0,uN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function hN(t,i){t&1&&D(0,pN,1,1,"ng-template",26)}function fN(t,i){if(t&1){let e=Y();f(0,"p-paginator",21),L("onPageChange",function(o){w(e);let r=d();return T(r.onPageChange(o))}),D(1,tN,1,0,null,14)(2,oN,1,0,null,14)(3,sN,1,0,null,14)(4,dN,1,0,null,14)(5,hN,1,0,null,14),m()}if(t&2){let e=d();_("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate||e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate||e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate||e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)("styleClass",e.cx("pcPaginator")+" "+e.paginatorStyleClass&&e.paginatorStyleClass)("locale",e.paginatorLocale)("pt",e.ptm("pcPaginator"))("unstyled",e.unstyled()),l(),_("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),_("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),_("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),_("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),_("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function mN(t,i){t&1&&le(0)}function _N(t,i){if(t&1&&(f(0,"div",38),D(1,mN,1,0,"ng-container",20),m()),t&2){let e=d();_("ngClass",e.cx("footer"))("pBind",e.ptm("footer")),l(),_("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function gN(t,i){if(t&1&&F(0,"div",38,7),t&2){let e=d();Oe("display","none"),_("ngClass",e.cx("columnResizeIndicator"))("pBind",e.ptm("columnResizeIndicator"))}}function vN(t,i){if(t&1&&(X(),F(0,"svg",40)),t&2){let e=d(2);_("pBind",e.ptm("rowReorderIndicatorUp").icon)}}function bN(t,i){}function yN(t,i){t&1&&D(0,bN,0,0,"ng-template")}function CN(t,i){if(t&1&&(f(0,"span",38,8),D(2,vN,1,1,"svg",39)(3,yN,1,0,null,20),m()),t&2){let e=d();Oe("display","none"),_("ngClass",e.cx("rowReorderIndicatorUp"))("pBind",e.ptm("rowReorderIndicatorUp")),l(2),_("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),l(),_("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function xN(t,i){if(t&1&&(X(),F(0,"svg",42)),t&2){let e=d(2);_("pBind",e.ptm("rowReorderIndicatorDown").icon)}}function wN(t,i){}function TN(t,i){t&1&&D(0,wN,0,0,"ng-template")}function SN(t,i){if(t&1&&(f(0,"span",38,9),D(2,xN,1,1,"svg",41)(3,TN,1,0,null,20),m()),t&2){let e=d();Oe("display","none"),_("ngClass",e.cx("rowReorderIndicatorDown"))("pBind",e.ptm("rowReorderIndicatorDown")),l(2),_("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),l(),_("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var kN=["pTableBody",""],Bf=(t,i,e,n,o)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:o}),IN=(t,i,e,n,o,r,a)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:o,rowgroup:r,rowspan:a}),cs=(t,i,e,n,o,r)=>({$implicit:t,rowIndex:i,columns:e,expanded:n,editing:o,frozen:r}),db=(t,i,e,n)=>({$implicit:t,rowIndex:i,columns:e,frozen:n}),ub=(t,i)=>({$implicit:t,frozen:i});function EN(t,i){t&1&&le(0)}function MN(t,i){if(t&1&&(we(0,3),D(1,EN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",Ua(2,Bf,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function DN(t,i){t&1&&le(0)}function PN(t,i){if(t&1&&(we(0),D(1,DN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Ua(2,Bf,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function RN(t,i){t&1&&le(0)}function ON(t,i){if(t&1&&(we(0),D(1,RN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",C0(2,IN,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen,r.shouldRenderRowspan(r.value,n,o),r.calculateRowGroupSize(r.value,n,o)))}}function FN(t,i){t&1&&le(0)}function NN(t,i){if(t&1&&(we(0,3),D(1,FN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",Ua(2,Bf,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function AN(t,i){if(t&1&&D(0,MN,2,8,"ng-container",2)(1,PN,2,8,"ng-container",0)(2,ON,2,10,"ng-container",0)(3,NN,2,8,"ng-container",2),t&2){let e=i.$implicit,n=i.index,o=d(2);_("ngIf",(o.dataTable.groupHeaderTemplate||o.dataTable._groupHeaderTemplate)&&!o.dataTable.virtualScroll&&o.dataTable.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(n))),l(),_("ngIf",o.dataTable.rowGroupMode!=="rowspan"),l(),_("ngIf",o.dataTable.rowGroupMode==="rowspan"),l(),_("ngIf",(o.dataTable.groupFooterTemplate||o.dataTable._groupFooterTemplate)&&!o.dataTable.virtualScroll&&o.dataTable.rowGroupMode==="subheader"&&o.shouldRenderRowGroupFooter(o.value,e,o.getRowIndex(n)))}}function LN(t,i){if(t&1&&(we(0),D(1,AN,4,4,"ng-template",1),Te()),t&2){let e=d();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function BN(t,i){t&1&&le(0)}function VN(t,i){if(t&1&&(we(0),D(1,BN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.template)("ngTemplateOutletContext",ar(2,cs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function zN(t,i){t&1&&le(0)}function HN(t,i){if(t&1&&(we(0,3),D(1,zN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",ar(2,cs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function qN(t,i){t&1&&le(0)}function GN(t,i){t&1&&le(0)}function jN(t,i){if(t&1&&(we(0,3),D(1,GN,1,0,"ng-container",4),Te()),t&2){let e=d(2),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",ar(2,cs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function UN(t,i){if(t&1&&(we(0),D(1,qN,1,0,"ng-container",4)(2,jN,2,9,"ng-container",2),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.expandedRowTemplate||r.dataTable._expandedRowTemplate)("ngTemplateOutletContext",gf(3,db,n,r.getRowIndex(o),r.columns,r.frozen)),l(),_("ngIf",(r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)&&r.dataTable.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,n,r.getRowIndex(o)))}}function $N(t,i){if(t&1&&D(0,VN,2,9,"ng-container",0)(1,HN,2,9,"ng-container",2)(2,UN,3,8,"ng-container",0),t&2){let e=i.$implicit,n=i.index,o=d(2);_("ngIf",!(o.dataTable.groupHeaderTemplate&&o.dataTable._groupHeaderTemplate)),l(),_("ngIf",(o.dataTable.groupHeaderTemplate||o.dataTable._groupHeaderTemplate)&&o.dataTable.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(n))),l(),_("ngIf",o.dataTable.isRowExpanded(e))}}function WN(t,i){if(t&1&&(we(0),D(1,$N,3,3,"ng-template",1),Te()),t&2){let e=d();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function KN(t,i){t&1&&le(0)}function YN(t,i){t&1&&le(0)}function XN(t,i){if(t&1&&(we(0),D(1,YN,1,0,"ng-container",4),Te()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.frozenExpandedRowTemplate||r.dataTable._frozenExpandedRowTemplate)("ngTemplateOutletContext",gf(2,db,n,r.getRowIndex(o),r.columns,r.frozen))}}function ZN(t,i){if(t&1&&D(0,KN,1,0,"ng-container",4)(1,XN,2,7,"ng-container",0),t&2){let e=i.$implicit,n=i.index,o=d(2);_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ar(3,cs,e,o.getRowIndex(n),o.columns,o.dataTable.isRowExpanded(e),o.dataTable.editMode==="row"&&o.dataTable.isRowEditing(e),o.frozen)),l(),_("ngIf",o.dataTable.isRowExpanded(e))}}function QN(t,i){if(t&1&&(we(0),D(1,ZN,2,10,"ng-template",1),Te()),t&2){let e=d();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function JN(t,i){t&1&&le(0)}function eA(t,i){if(t&1&&(we(0),D(1,JN,1,0,"ng-container",4),Te()),t&2){let e=d();l(),_("ngTemplateOutlet",e.dataTable.loadingBodyTemplate||e.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",qn(2,ub,e.columns,e.frozen))}}function tA(t,i){t&1&&le(0)}function nA(t,i){if(t&1&&(we(0),D(1,tA,1,0,"ng-container",4),Te()),t&2){let e=d();l(),_("ngTemplateOutlet",e.dataTable.emptyMessageTemplate||e.dataTable._emptyMessageTemplate)("ngTemplateOutletContext",qn(2,ub,e.columns,e.frozen))}}var iA=`
1342
- ${Pv}
1343
-
1344
- /* For PrimeNG */
1345
- .p-datatable-scrollable-table > .p-datatable-thead {
1346
- top: 0;
1347
- z-index: 2;
1348
- }
1349
-
1350
- .p-datatable-scrollable-table > .p-datatable-frozen-tbody {
1351
- position: sticky;
1352
- z-index: 2;
1353
- }
1354
-
1355
- .p-datatable-scrollable-table > .p-datatable-frozen-tbody + .p-datatable-frozen-tbody {
1356
- z-index: 1;
1357
- }
1358
-
1359
- .p-datatable-mask.p-overlay-mask {
1360
- position: absolute;
1361
- display: flex;
1362
- align-items: center;
1363
- justify-content: center;
1364
- z-index: 3;
1365
- }
1366
-
1367
- .p-datatable-filter-overlay {
1368
- position: absolute;
1369
- background: dt('datatable.filter.overlay.select.background');
1370
- color: dt('datatable.filter.overlay.select.color');
1371
- border: 1px solid dt('datatable.filter.overlay.select.border.color');
1372
- border-radius: dt('datatable.filter.overlay.select.border.radius');
1373
- box-shadow: dt('datatable.filter.overlay.select.shadow');
1374
- min-width: 12.5rem;
1375
- }
1376
-
1377
- .p-datatable-filter-rule {
1378
- border-bottom: 1px solid dt('datatable.filter.rule.border.color');
1379
- }
1380
-
1381
- .p-datatable-filter-rule:last-child {
1382
- border-bottom: 0 none;
1383
- }
1384
-
1385
- .p-datatable-filter-add-rule-button,
1386
- .p-datatable-filter-remove-rule-button {
1387
- width: 100%;
1388
- }
1389
-
1390
- .p-datatable-filter-remove-button {
1391
- width: 100%;
1392
- }
1393
-
1394
- .p-datatable-thead > tr > th {
1395
- padding: dt('datatable.header.cell.padding');
1396
- background: dt('datatable.header.cell.background');
1397
- border-color: dt('datatable.header.cell.border.color');
1398
- border-style: solid;
1399
- border-width: 0 0 1px 0;
1400
- color: dt('datatable.header.cell.color');
1401
- font-weight: dt('datatable.column.title.font.weight');
1402
- text-align: start;
1403
- transition:
1404
- background dt('datatable.transition.duration'),
1405
- color dt('datatable.transition.duration'),
1406
- border-color dt('datatable.transition.duration'),
1407
- outline-color dt('datatable.transition.duration'),
1408
- box-shadow dt('datatable.transition.duration');
1409
- }
1410
-
1411
- .p-datatable-thead > tr > th p-columnfilter {
1412
- font-weight: normal;
1413
- }
1414
-
1415
- .p-datatable-thead > tr > th,
1416
- .p-datatable-sort-icon,
1417
- .p-datatable-sort-badge {
1418
- vertical-align: middle;
1419
- }
1420
-
1421
- .p-datatable-thead > tr > th.p-datatable-column-sorted {
1422
- background: dt('datatable.header.cell.selected.background');
1423
- color: dt('datatable.header.cell.selected.color');
1424
- }
1425
-
1426
- .p-datatable-thead > tr > th.p-datatable-column-sorted .p-datatable-sort-icon {
1427
- color: dt('datatable.header.cell.selected.color');
1428
- }
1429
-
1430
- .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd) {
1431
- background: dt('datatable.row.striped.background');
1432
- }
1433
-
1434
- .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd).p-datatable-row-selected {
1435
- background: dt('datatable.row.selected.background');
1436
- color: dt('datatable.row.selected.color');
1437
- }
1438
-
1439
- p-sortIcon, p-sort-icon, p-sorticon {
1440
- display: inline-flex;
1441
- align-items: center;
1442
- gap: dt('datatable.header.cell.gap');
1443
- }
1444
-
1445
- .p-datatable .p-editable-column.p-cell-editing {
1446
- padding: 0;
1447
- }
1448
-
1449
- .p-datatable .p-editable-column.p-cell-editing p-celleditor {
1450
- display: block;
1451
- width: 100%;
1452
- }
1453
- `,oA={root:({instance:t})=>["p-datatable p-component",{"p-datatable-hoverable":t.rowHover||t.selectionMode,"p-datatable-resizable":t.resizableColumns,"p-datatable-resizable-fit":t.resizableColumns&&t.columnResizeMode==="fit","p-datatable-scrollable":t.scrollable,"p-datatable-flex-scrollable":t.scrollable&&t.scrollHeight==="flex","p-datatable-striped":t.stripedRows,"p-datatable-gridlines":t.showGridlines,"p-datatable-sm":t.size==="small","p-datatable-lg":t.size==="large"}],mask:"p-datatable-mask p-overlay-mask",loadingIcon:"p-datatable-loading-icon",header:"p-datatable-header",pcPaginator:({instance:t})=>"p-datatable-paginator-"+t.paginatorPosition,tableContainer:"p-datatable-table-container",table:({instance:t})=>["p-datatable-table",{"p-datatable-scrollable-table":t.scrollable,"p-datatable-resizable-table":t.resizableColumns,"p-datatable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}],thead:"p-datatable-thead",columnResizer:"p-datatable-column-resizer",columnHeaderContent:"p-datatable-column-header-content",columnTitle:"p-datatable-column-title",columnFooter:"p-datatable-column-footer",sortIcon:"p-datatable-sort-icon",pcSortBadge:"p-datatable-sort-badge",filter:({instance:t})=>({"p-datatable-filter":!0,"p-datatable-inline-filter":t.display==="row","p-datatable-popover-filter":t.display==="menu"}),filterElementContainer:"p-datatable-filter-element-container",pcColumnFilterButton:"p-datatable-column-filter-button",pcColumnFilterClearButton:"p-datatable-column-filter-clear-button",filterOverlay:({instance:t})=>({"p-datatable-filter-overlay p-component":!0,"p-datatable-filter-overlay-popover":t.display==="menu"}),filterConstraintList:"p-datatable-filter-constraint-list",filterConstraint:({selected:t})=>({"p-datatable-filter-constraint":!0,"p-datatable-filter-constraint-selected":t}),filterConstraintSeparator:"p-datatable-filter-constraint-separator",filterOperator:"p-datatable-filter-operator",pcFilterOperatorDropdown:"p-datatable-filter-operator-dropdown",filterRuleList:"p-datatable-filter-rule-list",filterRule:"p-datatable-filter-rule",pcFilterConstraintDropdown:"p-datatable-filter-constraint-dropdown",pcFilterRemoveRuleButton:"p-datatable-filter-remove-rule-button",pcFilterAddRuleButton:"p-datatable-filter-add-rule-button",filterButtonbar:"p-datatable-filter-buttonbar",pcFilterClearButton:"p-datatable-filter-clear-button",pcFilterApplyButton:"p-datatable-filter-apply-button",tbody:({instance:t})=>({"p-datatable-tbody":!0,"p-datatable-frozen-tbody":t.frozenValue||t.frozenBodyTemplate,"p-virtualscroller-content":t.virtualScroll}),rowGroupHeader:"p-datatable-row-group-header",rowToggleButton:"p-datatable-row-toggle-button",rowToggleIcon:"p-datatable-row-toggle-icon",rowExpansion:"p-datatable-row-expansion",rowGroupFooter:"p-datatable-row-group-footer",emptyMessage:"p-datatable-empty-message",bodyCell:({instance:t})=>({"p-datatable-frozen-column":t.columnProp("frozen")}),reorderableRowHandle:"p-datatable-reorderable-row-handle",pcRowEditorInit:"p-datatable-row-editor-init",pcRowEditorSave:"p-datatable-row-editor-save",pcRowEditorCancel:"p-datatable-row-editor-cancel",tfoot:"p-datatable-tfoot",footerCell:({instance:t})=>({"p-datatable-frozen-column":t.columnProp("frozen")}),virtualScrollerSpacer:"p-datatable-virtualscroller-spacer",footer:"p-datatable-tfoot",columnResizeIndicator:"p-datatable-column-resize-indicator",rowReorderIndicatorUp:"p-datatable-row-reorder-indicator-up",rowReorderIndicatorDown:"p-datatable-row-reorder-indicator-down",sortableColumn:({instance:t})=>({"p-datatable-sortable-column":t.isEnabled()," p-datatable-column-sorted":t.sorted}),sortableColumnIcon:"p-datatable-sort-icon",sortableColumnBadge:"p-sortable-column-badge",selectableRow:({instance:t})=>({"p-datatable-selectable-row":t.isEnabled(),"p-datatable-row-selected":t.selected}),resizableColumn:"p-datatable-resizable-column",reorderableColumn:"p-datatable-reorderable-column",rowEditorCancel:"p-datatable-row-editor-cancel",frozenColumn:({instance:t})=>({"p-datatable-frozen-column":t.frozen,"p-datatable-frozen-column-left":t.alignFrozenLeft==="left"}),contextMenuRowSelected:({instance:t})=>({"p-datatable-contextmenu-row-selected":t.selected})},rA={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"},rowGroupHeader:({instance:t})=>({top:t.getFrozenRowGroupHeaderStickyPosition})},Af=(()=>{class t extends Qt{name="datatable";style=iA;classes=oA;inlineStyles=rA;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var aA=new ve("TABLE_INSTANCE"),Lf=(()=>{class t{sortSource=new Yi;selectionSource=new Yi;contextMenuSource=new Yi;valueSource=new Yi;columnsSource=new Yi;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();valueSource$=this.valueSource.asObservable();columnsSource$=this.columnsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Vf=(()=>{class t extends On{componentName="DataTable";frozenColumns;frozenValue;styleClass;tableStyle;tableStyleClass;paginator;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;paginatorDropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showJumpToPageInput;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;selectionMode;selectionPageOnly;contextMenuSelection;contextMenuSelectionChange=new re;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;rowSelectable;rowTrackBy=(e,n)=>n;lazy=!1;lazyLoadOnInit=!0;compareSelectionBy="deepEquals";csvSeparator=",";exportFilename="download";filters={};globalFilterFields;filterDelay=300;filterLocale;expandedRowKeys={};editingRowKeys={};rowExpandMode="multiple";scrollable;rowGroupMode;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=250;frozenWidth;contextMenu;resizableColumns;columnResizeMode="fit";reorderableColumns;loading;loadingIcon;showLoader=!0;rowHover;customSort;showInitialSortBadge=!0;exportFunction;exportHeader;stateKey;stateStorage="session";editMode="cell";groupRowsBy;size;showGridlines;stripedRows;groupRowsByOrder=1;responsiveLayout="scroll";breakpoint="960px";paginatorLocale;get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}totalRecords=0;get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}selectAllChange=new re;selectionChange=new re;onRowSelect=new re;onRowUnselect=new re;onPage=new re;onSort=new re;onFilter=new re;onLazyLoad=new re;onRowExpand=new re;onRowCollapse=new re;onContextMenuSelect=new re;onColResize=new re;onColReorder=new re;onRowReorder=new re;onEditInit=new re;onEditComplete=new re;onEditCancel=new re;onHeaderCheckboxToggle=new re;sortFunction=new re;firstChange=new re;rowsChange=new re;onStateSave=new re;onStateRestore=new re;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;wrapperViewChild;tableViewChild;tableHeaderViewChild;tableFooterViewChild;scroller;_templates;_value=[];_columns;_totalRecords=0;_first=0;_rows;filteredValue;_headerTemplate;headerTemplate;_headerGroupedTemplate;headerGroupedTemplate;_bodyTemplate;bodyTemplate;_loadingBodyTemplate;loadingBodyTemplate;_captionTemplate;captionTemplate;_footerTemplate;footerTemplate;_footerGroupedTemplate;footerGroupedTemplate;_summaryTemplate;summaryTemplate;_colGroupTemplate;colGroupTemplate;_expandedRowTemplate;expandedRowTemplate;_groupHeaderTemplate;groupHeaderTemplate;_groupFooterTemplate;groupFooterTemplate;_frozenExpandedRowTemplate;frozenExpandedRowTemplate;_frozenHeaderTemplate;frozenHeaderTemplate;_frozenBodyTemplate;frozenBodyTemplate;_frozenFooterTemplate;frozenFooterTemplate;_frozenColGroupTemplate;frozenColGroupTemplate;_emptyMessageTemplate;emptyMessageTemplate;_paginatorLeftTemplate;paginatorLeftTemplate;_paginatorRightTemplate;paginatorRightTemplate;_paginatorDropdownItemTemplate;paginatorDropdownItemTemplate;_loadingIconTemplate;loadingIconTemplate;_reorderIndicatorUpIconTemplate;reorderIndicatorUpIconTemplate;_reorderIndicatorDownIconTemplate;reorderIndicatorDownIconTemplate;_sortIconTemplate;sortIconTemplate;_checkboxIconTemplate;checkboxIconTemplate;_headerCheckboxIconTemplate;headerCheckboxIconTemplate;_paginatorDropdownIconTemplate;paginatorDropdownIconTemplate;_paginatorFirstPageLinkIconTemplate;paginatorFirstPageLinkIconTemplate;_paginatorLastPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;_paginatorPreviousPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;_paginatorNextPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;selectionKeys={};lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;draggedRowIndex;droppedRowIndex;rowDragging;dropPosition;editingCell;editingCellData;editingCellField;editingCellRowIndex;selfClick;documentEditListener;_multiSortMeta;_sortField;_sortOrder=1;preventSelectionSetterPropagation;_selection;_selectAll=null;anchorRowIndex;rangeRowIndex;filterTimeout;initialized;rowTouched;restoringSort;restoringFilter;stateRestored;columnOrderStateRestored;columnWidthsState;tableWidthState;overlaySubscription;resizeColumnElement;columnResizing=!1;rowGroupHeaderStyleObject={};id=V0();styleElement;responsiveStyleElement;overlayService=p(io);filterService=p(M0);tableService=p(Lf);zone=p(Wt);_componentStyle=p(Af);bindDirectiveInstance=p(Ae,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onInit(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),this.responsiveLayout==="stack"&&this.createResponsiveStyle(),this.initialized=!0}onAfterContentInit(){this._templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"expandedrow":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenexpandedrow":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownicon":this.paginatorDropdownIconTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break}})}onAfterViewInit(){Ht(this.platformId)&&this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths()}onChanges(e){e.totalRecords&&e.totalRecords.firstChange&&(this._totalRecords=e.totalRecords.currentValue),e.value&&(this.isStateful()&&!this.stateRestored&&Ht(this.platformId)&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0,this.sortMode=="single"&&(this.sortField||this.groupRowsBy)?this.sortSingle():this.sortMode=="multiple"&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this.isStateful()||(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue)),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&(this.restoreColumnOrder(),this.tableService.onColumnsChange(this._columns))),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get processedData(){return this.filteredValue||this.value||[]}_initialColWidths;dataToRender(e){let n=e||this.processedData;if(n&&this.paginator){let o=this.lazy?0:this.first;return n.slice(o,o+this.rows)}return n}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(ye.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(ye.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.onPage.emit({first:this.first,rows:this.rows}),this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let n=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),this.sortMode==="multiple"){let o=n.metaKey||n.ctrlKey,r=this.getSortMeta(e.field);r?o?r.order=r.order*-1:(this._multiSortMeta=[{field:e.field,order:r.order*-1}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!o||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,n=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField){this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],this.sortMultiple();return}if(e&&n){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:n}):(this.value.sort((r,a)=>{let s=ye.resolveFieldData(r,e),c=ye.resolveFieldData(a,e),u=null;return s==null&&c!=null?u=-1:s!=null&&c==null?u=1:s==null&&c==null?u=0:typeof s=="string"&&typeof c=="string"?u=s.localeCompare(c):u=s<c?-1:s>c?1:0,n*(u||0)}),this._value=[...this.value]),this.hasFilter()&&this._filter());let o={field:e,order:n};this.onSort.emit(o),this.tableService.onSort(o)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,n)=>this.multisortField(e,n,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,n,o,r){let a=ye.resolveFieldData(e,o[r].field),s=ye.resolveFieldData(n,o[r].field);return ye.compare(a,s,this.filterLocale)===0?o.length-1>r?this.multisortField(e,n,o,r+1):0:this.compareValuesOnSort(a,s,o[r].order)}compareValuesOnSort(e,n,o){return ye.sort(e,n,o,this.filterLocale,this.sortOrder)}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let n=0;n<this.multiSortMeta.length;n++)if(this.multiSortMeta[n].field===e)return this.multiSortMeta[n]}return null}isSorted(e){if(this.sortMode==="single")return this.sortField&&this.sortField===e;if(this.sortMode==="multiple"){let n=!1;if(this.multiSortMeta){for(let o=0;o<this.multiSortMeta.length;o++)if(this.multiSortMeta[o].field==e){n=!0;break}}return n}}handleRowClick(e){let n=e.originalEvent.target,o=n.nodeName,r=n.parentElement&&n.parentElement.nodeName;if(!(o=="INPUT"||o=="BUTTON"||o=="A"||r=="INPUT"||r=="BUTTON"||r=="A"||S0(e.originalEvent.target))){if(this.selectionMode){let a=e.rowData,s=e.rowIndex;if(this.preventSelectionSetterPropagation=!0,this.isMultipleSelectionMode()&&e.originalEvent.shiftKey&&this.anchorRowIndex!=null)be.clearSelection(),this.rangeRowIndex!=null&&this.clearSelectionRange(e.originalEvent),this.rangeRowIndex=s,this.selectRange(e.originalEvent,s);else{let c=this.isSelected(a);if(!c&&!this.isRowSelectable(a,s))return;let u=this.rowTouched?!1:this.metaKeySelection,h=this.dataKey?String(ye.resolveFieldData(a,this.dataKey)):null;if(this.anchorRowIndex=s,this.rangeRowIndex=s,u){let g=e.originalEvent.metaKey||e.originalEvent.ctrlKey;if(c&&g){if(this.isSingleSelectionMode())this._selection=null,this.selectionKeys={},this.selectionChange.emit(null);else{let C=this.findIndexInSelection(a);this._selection=this.selection.filter((M,S)=>S!=C),this.selectionChange.emit(this.selection),h&&delete this.selectionKeys[h]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),h&&(this.selectionKeys={},this.selectionKeys[h]=1)):this.isMultipleSelectionMode()&&(g?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),h&&(this.selectionKeys[h]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s})}else if(this.selectionMode==="single")c?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s})):(this._selection=a,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),h&&(this.selectionKeys={},this.selectionKeys[h]=1));else if(this.selectionMode==="multiple")if(c){let g=this.findIndexInSelection(a);this._selection=this.selection.filter((C,M)=>M!=g),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),h&&delete this.selectionKeys[h]}else this._selection=this.selection?[...this.selection,a]:[a],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),h&&(this.selectionKeys[h]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let n=e.rowData,o=e.rowIndex,r=()=>{this.contextMenu.show(e.originalEvent),this.contextMenu.hideCallback=()=>{this.contextMenuSelection=null,this.contextMenuSelectionChange.emit(null),this.tableService.onContextMenu(null)}};if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.tableService.onContextMenu(n),r(),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:n,index:e.rowIndex});else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let a=this.isSelected(n),s=this.dataKey?String(ye.resolveFieldData(n,this.dataKey)):null;if(!a){if(!this.isRowSelectable(n,o))return;this.isSingleSelectionMode()?(this.selection=n,this.selectionChange.emit(n),s&&(this.selectionKeys={},this.selectionKeys[s]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),s&&(this.selectionKeys[s]=1))}this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.tableService.onContextMenu(n),this.tableService.onSelectionChange(),r(),this.onContextMenuSelect.emit({originalEvent:e,data:n,index:e.rowIndex})}}}selectRange(e,n,o){let r,a;this.anchorRowIndex>n?(r=n,a=this.anchorRowIndex):this.anchorRowIndex<n?(r=this.anchorRowIndex,a=n):(r=n,a=n),this.lazy&&this.paginator&&(r-=this.first,a-=this.first);let s=[];for(let c=r;c<=a;c++){let u=this.filteredValue?this.filteredValue[c]:this.value[c];if(!this.isSelected(u)&&!o){if(!this.isRowSelectable(u,n))continue;s.push(u),this._selection=[...this.selection,u];let h=this.dataKey?String(ye.resolveFieldData(u,this.dataKey)):null;h&&(this.selectionKeys[h]=1)}}this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e,data:s,type:"row"})}clearSelectionRange(e){let n,o,r=this.rangeRowIndex,a=this.anchorRowIndex;r>a?(n=this.anchorRowIndex,o=this.rangeRowIndex):r<a?(n=this.rangeRowIndex,o=this.anchorRowIndex):(n=this.rangeRowIndex,o=this.rangeRowIndex);for(let s=n;s<=o;s++){let c=this.value[s],u=this.findIndexInSelection(c);this._selection=this.selection.filter((g,C)=>C!=u);let h=this.dataKey?String(ye.resolveFieldData(c,this.dataKey)):null;h&&delete this.selectionKeys[h],this.onRowUnselect.emit({originalEvent:e,data:c,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[ye.resolveFieldData(e,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}findIndexInSelection(e){let n=-1;if(this.selection&&this.selection.length){for(let o=0;o<this.selection.length;o++)if(this.equals(e,this.selection[o])){n=o;break}}return n}isRowSelectable(e,n){return!(this.rowSelectable&&!this.rowSelectable({data:e,index:n}))}toggleRowWithRadio(e,n){if(this.preventSelectionSetterPropagation=!0,this.selection!=n){if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=n,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"radiobutton"}),this.dataKey&&(this.selectionKeys={},this.selectionKeys[String(ye.resolveFieldData(n,this.dataKey))]=1)}else this._selection=null,this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"radiobutton"});this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowWithCheckbox(e,n){this.selection=this.selection||[];let o=this.isSelected(n),r=this.dataKey?String(ye.resolveFieldData(n,this.dataKey)):null;if(this.preventSelectionSetterPropagation=!0,o){let a=this.findIndexInSelection(n);this._selection=this.selection.filter((s,c)=>c!=a),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&delete this.selectionKeys[r]}else{if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&(this.selectionKeys[r]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox({originalEvent:e},n){if(this._selectAll!==null)this.selectAllChange.emit({originalEvent:e,checked:n});else{let o=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,r=this.selectionPageOnly&&this._selection?this._selection.filter(a=>!o.some(s=>this.equals(a,s))):[];n&&(r=this.frozenValue?[...r,...this.frozenValue,...o]:[...r,...o],r=this.rowSelectable?r.filter((a,s)=>this.rowSelectable({data:a,index:s})):r),this._selection=r,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:n}),this.isStateful()&&this.saveState()}}equals(e,n){return this.compareSelectionBy==="equals"?e===n:ye.equals(e,n,this.dataKey)}filter(e,n,o){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:o},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,n){this.filter(e,"global",n)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredValue=null,this.paginator&&(this.totalRecords=this._totalRecords===0&&this.value?this.value.length:this._totalRecords);else{let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let n=0;n<this.value.length;n++){let o=!0,r=!1,a=!1;for(let c in this.filters)if(this.filters.hasOwnProperty(c)&&c!=="global"){a=!0;let u=c,h=this.filters[u];if(Array.isArray(h)){for(let g of h)if(o=this.executeLocalFilter(u,this.value[n],g),g.operator===wf.OR&&o||g.operator===wf.AND&&!o)break}else o=this.executeLocalFilter(u,this.value[n],h);if(!o)break}if(this.filters.global&&!r&&e)for(let c=0;c<e.length;c++){let u=e[c].field||e[c];if(r=this.filterService.filters[this.filters.global.matchMode](ye.resolveFieldData(this.value[n],u),this.filters.global.value,this.filterLocale),r)break}let s;this.filters.global?s=a?a&&o&&r:r:s=a&&o,s&&this.filteredValue.push(this.value[n])}this.filteredValue.length===this.value.length&&(this.filteredValue=null),this.paginator&&(this.totalRecords=this.filteredValue?this.filteredValue.length:this._totalRecords===0&&this.value?this.value.length:this._totalRecords??0)}}this.onFilter.emit({filters:this.filters,filteredValue:this.filteredValue||this.value}),this.tableService.onValueChange(this.value),this.isStateful()&&!this.restoringFilter&&this.saveState(),this.restoringFilter&&(this.restoringFilter=!1),this.cd.markForCheck(),this.scrollable&&this.resetScrollTop()}executeLocalFilter(e,n,o){let r=o.value,a=o.matchMode||E0.STARTS_WITH,s=ye.resolveFieldData(n,e),c=this.filterService.filters[a];return c(s,r,this.filterLocale)}hasFilter(){let e=!0;for(let n in this.filters)if(this.filters.hasOwnProperty(n)){e=!1;break}return!e}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta,forceUpdate:()=>this.cd.detectChanges()}}clear(){this._sortField=null,this._sortOrder=this.defaultSortOrder,this._multiSortMeta=null,this.tableService.onSort(null),this.clearFilterValues(),this.filteredValue=null,this.first=0,this.firstChange.emit(this.first),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0}clearFilterValues(){for(let[,e]of Object.entries(this.filters))if(Array.isArray(e))for(let n of e)n.value=null;else e&&(e.value=null)}reset(){this.clear()}getExportHeader(e){return e[this.exportHeader]||e.header||e.field}exportCSV(e){let n,o="",r=this.columns;e&&e.selectionOnly?n=this.selection||[]:e&&e.allValues?n=this.value||[]:(n=this.filteredValue||this.value,this.frozenValue&&(n=n?[...this.frozenValue,...n]:this.frozenValue));let a=r.filter(h=>h.exportable!==!1&&h.field);o+=a.map(h=>'"'+this.getExportHeader(h)+'"').join(this.csvSeparator);let s=n.map(h=>a.map(g=>{let C=ye.resolveFieldData(h,g.field);return C!=null?this.exportFunction?C=this.exportFunction({data:C,field:g.field}):C=String(C).replace(/"/g,'""'):C="",'"'+C+'"'}).join(this.csvSeparator)).join(`
1454
- `);s.length&&(o+=`
1455
- `+s);let c=new Blob([new Uint8Array([239,187,191]),o],{type:"text/csv;charset=utf-8;"}),u=this.renderer.createElement("a");u.style.display="none",this.renderer.appendChild(this.document.body,u),u.download!==void 0?(u.setAttribute("href",URL.createObjectURL(c)),u.setAttribute("download",this.exportFilename+".csv"),u.click()):(o="data:text/csv;charset=utf-8,"+o,this.document.defaultView?.open(encodeURI(o))),this.renderer.removeChild(this.document.body,u)}onLazyItemLoad(e){this.onLazyLoad.emit(Bt(me(me({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,n,o,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=o,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&be.find(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(!this.$unstyled()&&be.removeClass(this.editingCell,"p-cell-editing"),dr(this.editingCell,"data-p-cell-editing","false"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}initRowEdit(e){let n=String(ye.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(be.find(n,".ng-invalid.ng-dirty").length===0){let o=String(ye.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[o]}}cancelRowEdit(e){let n=String(ye.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[n]}toggleRow(e,n){if(!this.dataKey&&!this.groupRowsBy)throw new Error("dataKey or groupRowsBy must be defined to use row expansion");let o=this.groupRowsBy?String(ye.resolveFieldData(e,this.groupRowsBy)):String(ye.resolveFieldData(e,this.dataKey));this.expandedRowKeys[o]!=null?(delete this.expandedRowKeys[o],this.onRowCollapse.emit({originalEvent:n,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[o]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(ye.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(ye.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(ye.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let n=be.getOffset(this.el?.nativeElement).left;this.resizeColumnElement=e.target.closest("th"),this.columnResizing=!0,e.type=="touchstart"?this.lastResizerHelperX=e.changedTouches[0].clientX-n+this.el?.nativeElement.scrollLeft:this.lastResizerHelperX=e.pageX-n+this.el?.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let n=be.getOffset(this.el?.nativeElement).left;!this.$unstyled()&&be.addClass(this.el?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.el?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",e.type=="touchmove"?this.resizeHelperViewChild.nativeElement.style.left=e.changedTouches[0].clientX-n+this.el?.nativeElement.scrollLeft+"px":this.resizeHelperViewChild.nativeElement.style.left=e.pageX-n+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=getComputedStyle(this.el?.nativeElement??document.documentElement).direction==="rtl",n=this.resizeHelperViewChild?.nativeElement.offsetLeft-this.lastResizerHelperX,o=e?-n:n,a=this.resizeColumnElement.offsetWidth+o,s=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),c=s?parseFloat(s):15;if(a>=c){if(this.columnResizeMode==="fit"){let h=this.resizeColumnElement.nextElementSibling.offsetWidth-o;a>15&&h>15&&this.resizeTableCells(a,h)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let u=this.tableViewChild?.nativeElement.offsetWidth+o;this.setResizeTableWidth(u+"px"),this.resizeTableCells(a,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:o}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",be.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],n=be.findSingle(this.el.nativeElement,'[data-pc-section="thead"]');return be.find(n,"tr > th").forEach(r=>e.push(be.getOuterWidth(r))),e}onColumnDragStart(e,n){this.reorderIconWidth=be.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=be.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let o=be.getOffset(this.el?.nativeElement),r=be.getOffset(n);if(this.draggedColumn!=n){let a=be.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),s=be.indexWithinGroup(n,"preorderablecolumn"),c=r.left-o.left,u=o.top-r.top,h=r.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-o.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-o.top+n.offsetHeight+"px",e.pageX>h?(this.reorderIndicatorUpViewChild.nativeElement.style.left=c+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=c+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=c-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=c-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&e.preventDefault()}onColumnDrop(e,n){if(e.preventDefault(),this.draggedColumn){let o=be.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=be.indexWithinGroup(n,"preorderablecolumn"),a=o!=r;if(a&&(r-o==1&&this.dropPosition===-1||o-r==1&&this.dropPosition===1)&&(a=!1),a&&r<o&&this.dropPosition===1&&(r=r+1),a&&r>o&&this.dropPosition===-1&&(r=r-1),a&&(ye.reorderArray(this.columns,o,r),this.onColReorder.emit({dragIndex:o,dropIndex:r,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.resizableColumns&&this.resizeColumnElement){let s=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();ye.reorderArray(s,o+1,r+1),this.updateStyleElement(s,o,0,0)}this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}resizeTableCells(e,n){let o=be.index(this.resizeColumnElement),r=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(r,o,e,n)}updateStyleElement(e,n,o,r){this.destroyStyleElement(),this.createStyleElement();let a="";e.forEach((s,c)=>{let u=c===n?o:r&&c===n+1?r:s,h=`width: ${u}px !important; max-width: ${u}px !important;`;a+=`
1456
- #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${c+1}),
1457
- #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${c+1}),
1458
- #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${c+1}) {
1459
- ${h}
1460
- }
1461
- `}),this.renderer.setProperty(this.styleElement,"innerHTML",a)}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,o){if(this.rowDragging&&this.draggedRowIndex!==n){let r=be.getOffset(o).top,a=e.pageY,s=r+be.getOuterHeight(o)/2,c=o.previousElementSibling;a<s?(be.removeClass(o,"p-datatable-dragpoint-bottom"),this.droppedRowIndex=n,c&&!this.$unstyled()?be.addClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&be.addClass(o,"p-datatable-dragpoint-top")):(c&&!this.$unstyled()?be.removeClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&be.addClass(o,"p-datatable-dragpoint-top"),this.droppedRowIndex=n+1,!this.$unstyled()&&be.addClass(o,"p-datatable-dragpoint-bottom"))}}onRowDragLeave(e,n){let o=n.previousElementSibling;o&&!this.$unstyled()&&be.removeClass(o,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&be.removeClass(n,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&be.removeClass(n,"p-datatable-dragpoint-top")}onRowDragEnd(e){this.rowDragging=!1,this.draggedRowIndex=null,this.droppedRowIndex=null}onRowDrop(e,n){if(this.droppedRowIndex!=null){let o=this.draggedRowIndex>this.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;ye.reorderArray(this.value,this.draggedRowIndex,o),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:o})}this.onRowDragLeave(e,n),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){if(Ht(this.platformId))switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}else throw new Error("Browser storage is not available in the server side.")}isStateful(){return this.stateKey!=null}saveState(){let e=this.getStorage(),n={};this.paginator&&(n.first=this.first,n.rows=this.rows),this.sortField&&(n.sortField=this.sortField,n.sortOrder=this.sortOrder),this.multiSortMeta&&(n.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(n.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(n),this.reorderableColumns&&this.saveColumnOrder(n),this.selection&&(n.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(n.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(n)),this.onStateSave.emit(n)}clearState(){let e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){let n=this.getStorage().getItem(this.stateKey),o=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,r=function(a,s){return typeof s=="string"&&o.test(s)?new Date(s):s};if(n){let a=JSON.parse(n,r);this.paginator&&(this.first!==void 0&&(this.first=a.first,this.firstChange.emit(this.first)),this.rows!==void 0&&(this.rows=a.rows,this.rowsChange.emit(this.rows))),a.sortField&&(this.restoringSort=!0,this._sortField=a.sortField,this._sortOrder=a.sortOrder),a.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=a.multiSortMeta),a.filters&&(this.restoringFilter=!0,this.filters=a.filters),this.resizableColumns&&(this.columnWidthsState=a.columnWidths,this.tableWidthState=a.tableWidth),a.expandedRowKeys&&(this.expandedRowKeys=a.expandedRowKeys),a.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(a.selection)),this.stateRestored=!0,this.onStateRestore.emit(a)}}saveColumnWidths(e){let n=[],o=[],r=this.el?.nativeElement;r&&(o=be.find(r,'[data-pc-section="thead"] > tr > th')),o.forEach(a=>n.push(be.getOuterWidth(a))),e.columnWidths=n.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=be.getOuterWidth(this.tableViewChild.nativeElement))}setResizeTableWidth(e){this.tableViewChild.nativeElement.style.width=e,this.tableViewChild.nativeElement.style.minWidth=e}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if(this.columnResizeMode==="expand"&&this.tableWidthState&&this.setResizeTableWidth(this.tableWidthState+"px"),ye.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((o,r)=>{let a=`width: ${o}px !important; max-width: ${o}px !important`;n+=`
1462
- #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${r+1}),
1463
- #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${r+1}),
1464
- #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${r+1}) {
1465
- ${a}
1466
- }
1467
- `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(o=>{n.push(o.field||o.key)}),e.columnOrder=n}}restoreColumnOrder(){let n=this.getStorage().getItem(this.stateKey);if(n){let r=JSON.parse(n).columnOrder;if(r){let a=[];r.map(s=>{let c=this.findColumnByKey(s);c&&a.push(c)}),this.columnOrderStateRestored=!0,this.columns=a}}}findColumnByKey(e){if(this.columns){for(let n of this.columns)if(n.key===e||n.field===e)return n}else return null}createStyleElement(){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",be.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),be.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(Ht(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",be.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.responsiveStyleElement);let e=`
1468
- @media screen and (max-width: ${this.breakpoint}) {
1469
- #${this.id}-table > .p-datatable-thead > tr > th,
1470
- #${this.id}-table > .p-datatable-tfoot > tr > td {
1471
- display: none !important;
1472
- }
1473
-
1474
- #${this.id}-table > .p-datatable-tbody > tr > td {
1475
- display: flex;
1476
- width: 100% !important;
1477
- align-items: center;
1478
- justify-content: space-between;
1479
- }
1480
-
1481
- #${this.id}-table > .p-datatable-tbody > tr > td:not(:last-child) {
1482
- border: 0 none;
1483
- }
1484
-
1485
- #${this.id}.p-datatable-gridlines > .p-datatable-table-container > .p-datatable-table > .p-datatable-tbody > tr > td:last-child {
1486
- border-top: 0;
1487
- border-right: 0;
1488
- border-left: 0;
1489
- }
1490
-
1491
- #${this.id}-table > .p-datatable-tbody > tr > td > .p-datatable-column-title {
1492
- display: block;
1493
- }
1494
- }
1495
- `;this.renderer.setProperty(this.responsiveStyleElement,"innerHTML",e),be.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyle(){this.responsiveStyleElement&&(this.renderer.removeChild(this.document.head,this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.destroyStyleElement(),this.destroyResponsiveStyle()}get dataP(){return this.cn({scrollable:this.scrollable,"flex-scrollable":this.scrollable&&this.scrollHeight==="flex",[this.size]:this.size,loading:this.loading,empty:this.isEmpty()})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-table"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,EF,4)(r,MF,4)(r,DF,4)(r,PF,4)(r,RF,4)(r,OF,4)(r,FF,4)(r,NF,4)(r,AF,4)(r,LF,4)(r,BF,4)(r,VF,4)(r,zF,4)(r,HF,4)(r,qF,4)(r,GF,4)(r,jF,4)(r,UF,4)(r,$F,4)(r,WF,4)(r,KF,4)(r,YF,4)(r,XF,4)(r,ZF,4)(r,QF,4)(r,JF,4)(r,e4,4)(r,t4,4)(r,n4,4)(r,i4,4)(r,o4,4)(r,r4,4)(r,Dt,4),n&2){let a;ee(a=te())&&(o._headerTemplate=a.first),ee(a=te())&&(o._headerGroupedTemplate=a.first),ee(a=te())&&(o._bodyTemplate=a.first),ee(a=te())&&(o._loadingBodyTemplate=a.first),ee(a=te())&&(o._captionTemplate=a.first),ee(a=te())&&(o._footerTemplate=a.first),ee(a=te())&&(o._footerGroupedTemplate=a.first),ee(a=te())&&(o._summaryTemplate=a.first),ee(a=te())&&(o._colGroupTemplate=a.first),ee(a=te())&&(o._expandedRowTemplate=a.first),ee(a=te())&&(o._groupHeaderTemplate=a.first),ee(a=te())&&(o._groupFooterTemplate=a.first),ee(a=te())&&(o._frozenExpandedRowTemplate=a.first),ee(a=te())&&(o._frozenHeaderTemplate=a.first),ee(a=te())&&(o._frozenBodyTemplate=a.first),ee(a=te())&&(o._frozenFooterTemplate=a.first),ee(a=te())&&(o._frozenColGroupTemplate=a.first),ee(a=te())&&(o._emptyMessageTemplate=a.first),ee(a=te())&&(o._paginatorLeftTemplate=a.first),ee(a=te())&&(o._paginatorRightTemplate=a.first),ee(a=te())&&(o._paginatorDropdownItemTemplate=a.first),ee(a=te())&&(o._loadingIconTemplate=a.first),ee(a=te())&&(o._reorderIndicatorUpIconTemplate=a.first),ee(a=te())&&(o._reorderIndicatorDownIconTemplate=a.first),ee(a=te())&&(o._sortIconTemplate=a.first),ee(a=te())&&(o._checkboxIconTemplate=a.first),ee(a=te())&&(o._headerCheckboxIconTemplate=a.first),ee(a=te())&&(o._paginatorDropdownIconTemplate=a.first),ee(a=te())&&(o._paginatorFirstPageLinkIconTemplate=a.first),ee(a=te())&&(o._paginatorLastPageLinkIconTemplate=a.first),ee(a=te())&&(o._paginatorPreviousPageLinkIconTemplate=a.first),ee(a=te())&&(o._paginatorNextPageLinkIconTemplate=a.first),ee(a=te())&&(o._templates=a)}},viewQuery:function(n,o){if(n&1&&eo(a4,5)(s4,5)(l4,5)(c4,5)(d4,5)(u4,5)(p4,5)(h4,5),n&2){let r;ee(r=te())&&(o.resizeHelperViewChild=r.first),ee(r=te())&&(o.reorderIndicatorUpViewChild=r.first),ee(r=te())&&(o.reorderIndicatorDownViewChild=r.first),ee(r=te())&&(o.wrapperViewChild=r.first),ee(r=te())&&(o.tableViewChild=r.first),ee(r=te())&&(o.tableHeaderViewChild=r.first),ee(r=te())&&(o.tableFooterViewChild=r.first),ee(r=te())&&(o.scroller=r.first)}},hostVars:3,hostBindings:function(n,o){n&2&&(O("data-p",o.dataP),G(o.cn(o.cx("root"),o.styleClass)))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",K],pageLinks:[2,"pageLinks","pageLinks",Ie],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",K],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",K],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",K],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",K],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",K],showPageLinks:[2,"showPageLinks","showPageLinks",K],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",Ie],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",K],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",K],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",K],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",K],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",K],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",Ie],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",K],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",K],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Ie],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",Ie],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",K],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",K],loading:[2,"loading","loading",K],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",K],rowHover:[2,"rowHover","rowHover",K],customSort:[2,"customSort","customSort",K],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",K],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",K],stripedRows:[2,"stripedRows","stripedRows",K],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",Ie],responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",paginatorLocale:"paginatorLocale",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{contextMenuSelectionChange:"contextMenuSelectionChange",selectAllChange:"selectAllChange",selectionChange:"selectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},standalone:!1,features:[Me([Lf,Af,{provide:aA,useExisting:t},{provide:Jt,useExisting:t}]),Kt([Ae]),Z],decls:14,vars:15,consts:[["wrapper",""],["buildInTable",""],["scroller",""],["content",""],["table",""],["thead",""],["tfoot",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],[3,"class","pBind",4,"ngIf"],[3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale","pt","unstyled","onPageChange",4,"ngIf"],[3,"ngStyle","pBind"],[3,"items","columns","style","scrollHeight","itemSize","step","delay","inline","autoSize","lazy","loaderDisabled","showSpacer","showLoader","options","pt","onLazyLoad",4,"ngIf"],[4,"ngIf"],[3,"ngClass","pBind",4,"ngIf"],[3,"ngClass","pBind","display",4,"ngIf"],[3,"pBind"],["data-p-icon","spinner",3,"spin","class","pBind",4,"ngIf"],["data-p-icon","spinner",3,"spin","pBind"],[4,"ngTemplateOutlet"],[3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale","pt","unstyled"],["pTemplate","dropdownicon"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[3,"onLazyLoad","items","columns","scrollHeight","itemSize","step","delay","inline","autoSize","lazy","loaderDisabled","showSpacer","showLoader","options","pt"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","table",3,"pBind"],["role","rowgroup",3,"ngStyle","pBind"],["role","rowgroup",3,"class","pBind","value","frozenRows","pTableBody","pTableBodyTemplate","unstyled","frozen",4,"ngIf"],["role","rowgroup",3,"pBind","value","pTableBody","pTableBodyTemplate","scrollerOptions","unstyled"],["role","rowgroup",3,"style","class","pBind",4,"ngIf"],["role","rowgroup",3,"ngClass","ngStyle","pBind",4,"ngIf"],["role","rowgroup",3,"pBind","value","frozenRows","pTableBody","pTableBodyTemplate","unstyled","frozen"],["role","rowgroup",3,"pBind"],["role","rowgroup",3,"ngClass","ngStyle","pBind"],[3,"ngClass","pBind"],["data-p-icon","arrow-down",3,"pBind",4,"ngIf"],["data-p-icon","arrow-down",3,"pBind"],["data-p-icon","arrow-up",3,"pBind",4,"ngIf"],["data-p-icon","arrow-up",3,"pBind"]],template:function(n,o){n&1&&(D(0,x4,3,5,"div",10)(1,T4,2,4,"div",10)(2,z4,6,26,"p-paginator",11),f(3,"div",12,0),D(5,G4,4,18,"p-scroller",13)(6,U4,2,7,"ng-container",14)(7,Q4,10,32,"ng-template",null,1,je),m(),D(9,fN,6,26,"p-paginator",11)(10,_N,2,3,"div",15)(11,gN,2,4,"div",16)(12,CN,4,6,"span",16)(13,SN,4,6,"span",16)),n&2&&(_("ngIf",o.loading&&o.showLoader),l(),_("ngIf",o.captionTemplate||o._captionTemplate),l(),_("ngIf",o.paginator&&(o.paginatorPosition==="top"||o.paginatorPosition=="both")),l(),G(o.cx("tableContainer")),_("ngStyle",o.sx("tableContainer"))("pBind",o.ptm("tableContainer")),O("data-p",o.dataP),l(2),_("ngIf",o.virtualScroll),l(),_("ngIf",!o.virtualScroll),l(3),_("ngIf",o.paginator&&(o.paginatorPosition==="bottom"||o.paginatorPosition=="both")),l(),_("ngIf",o.summaryTemplate||o._summaryTemplate),l(),_("ngIf",o.resizableColumns),l(),_("ngIf",o.reorderableColumns),l(),_("ngIf",o.reorderableColumns))},dependencies:()=>[Wa,xi,un,no,Ff,Dt,tv,Mf,Df,Sf,Ae,sA],encapsulation:2})}return t})(),sA=(()=>{class t extends On{dataTable;tableService;hostName="Table";columns;template;get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dataTable.scrollable&&this.dataTable.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}frozen;frozenRows;scrollerOptions;subscription;_value;onAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dataTable.scrollable&&this.dataTable.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}constructor(e,n){super(),this.dataTable=e,this.tableService=n,this.subscription=this.dataTable.tableService.valueSource$.subscribe(()=>{this.dataTable.virtualScroll&&this.cd.detectChanges()})}shouldRenderRowGroupHeader(e,n,o){let r=ye.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[o-(this.dataTable?._first||0)-1];if(a){let s=ye.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowGroupFooter(e,n,o){let r=ye.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[o-(this.dataTable?._first||0)+1];if(a){let s=ye.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowspan(e,n,o){let r=ye.resolveFieldData(n,this.dataTable?.groupRowsBy),a=e[o-1];if(a){let s=ye.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}calculateRowGroupSize(e,n,o){let r=ye.resolveFieldData(n,this.dataTable?.groupRowsBy),a=r,s=0;for(;r===a;){s++;let c=e[++o];if(c)a=ye.resolveFieldData(c,this.dataTable?.groupRowsBy||"");else break}return s===1?null:s}onDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=be.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=be.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dataTable.rowGroupHeaderStyleObject.top=e+"px"}}getScrollerOption(e,n){return this.dataTable.virtualScroll?(n=n||this.scrollerOptions,n?n[e]:null):null}getRowIndex(e){let n=this.dataTable.paginator?this.dataTable.first+e:e,o=this.getScrollerOption("getItemOptions");return o?o(n).index:n}get dataP(){return this.cn({hoverable:this.dataTable.rowHover||this.dataTable.selectionMode,frozen:this.frozen})}static \u0275fac=function(n){return new(n||t)(Rn(Vf),Rn(Lf))};static \u0275cmp=z({type:t,selectors:[["","pTableBody",""]],hostVars:1,hostBindings:function(n,o){n&2&&O("data-p",o.dataP)},inputs:{columns:[0,"pTableBody","columns"],template:[0,"pTableBodyTemplate","template"],value:"value",frozen:[2,"frozen","frozen",K],frozenRows:[2,"frozenRows","frozenRows",K],scrollerOptions:"scrollerOptions"},standalone:!1,features:[Z],attrs:kN,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&D(0,LN,2,2,"ng-container",0)(1,WN,2,2,"ng-container",0)(2,QN,2,2,"ng-container",0)(3,eA,2,5,"ng-container",0)(4,nA,2,5,"ng-container",0),n&2&&(_("ngIf",!o.dataTable.expandedRowTemplate&&!o.dataTable._expandedRowTemplate),l(),_("ngIf",(o.dataTable.expandedRowTemplate||o.dataTable._expandedRowTemplate)&&!(o.frozen&&(o.dataTable.frozenExpandedRowTemplate||o.dataTable._frozenExpandedRowTemplate))),l(),_("ngIf",(o.dataTable.frozenExpandedRowTemplate||o.dataTable._frozenExpandedRowTemplate)&&o.frozen),l(),_("ngIf",o.dataTable.loading),l(),_("ngIf",o.dataTable.isEmpty()&&!o.dataTable.loading))},dependencies:[to,xi,un],encapsulation:2})}return t})();var pb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({providers:[Af],imports:[Mt,ib,Ja,iv,bt,yn,ov,Qv,ev,U0,is,kf,Mf,Df,Sf,Gv,Uv,jv,zv,Jv,Hv,qv,$v,lb,oo,lo,ot,kf]})}return t})();var hb=`
1496
- .p-progressspinner {
1497
- position: relative;
1498
- margin: 0 auto;
1499
- width: 100px;
1500
- height: 100px;
1501
- display: inline-block;
1502
- }
1503
-
1504
- .p-progressspinner::before {
1505
- content: '';
1506
- display: block;
1507
- padding-top: 100%;
1508
- }
1509
-
1510
- .p-progressspinner-spin {
1511
- height: 100%;
1512
- transform-origin: center center;
1513
- width: 100%;
1514
- position: absolute;
1515
- top: 0;
1516
- bottom: 0;
1517
- left: 0;
1518
- right: 0;
1519
- margin: auto;
1520
- animation: p-progressspinner-rotate 2s linear infinite;
1521
- }
1522
-
1523
- .p-progressspinner-circle {
1524
- stroke-dasharray: 89, 200;
1525
- stroke-dashoffset: 0;
1526
- stroke: dt('progressspinner.colorOne');
1527
- animation:
1528
- p-progressspinner-dash 1.5s ease-in-out infinite,
1529
- p-progressspinner-color 6s ease-in-out infinite;
1530
- stroke-linecap: round;
1531
- }
1532
-
1533
- @keyframes p-progressspinner-rotate {
1534
- 100% {
1535
- transform: rotate(360deg);
1536
- }
1537
- }
1538
- @keyframes p-progressspinner-dash {
1539
- 0% {
1540
- stroke-dasharray: 1, 200;
1541
- stroke-dashoffset: 0;
1542
- }
1543
- 50% {
1544
- stroke-dasharray: 89, 200;
1545
- stroke-dashoffset: -35px;
1546
- }
1547
- 100% {
1548
- stroke-dasharray: 89, 200;
1549
- stroke-dashoffset: -124px;
1550
- }
1551
- }
1552
- @keyframes p-progressspinner-color {
1553
- 100%,
1554
- 0% {
1555
- stroke: dt('progressspinner.color.one');
1556
- }
1557
- 40% {
1558
- stroke: dt('progressspinner.color.two');
1559
- }
1560
- 66% {
1561
- stroke: dt('progressspinner.color.three');
1562
- }
1563
- 80%,
1564
- 90% {
1565
- stroke: dt('progressspinner.color.four');
1566
- }
1567
- }
1568
- `;var cA={root:()=>["p-progressspinner"],spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},fb=(()=>{class t extends Qt{name="progressspinner";style=hb;classes=cA;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var mb=new ve("PROGRESSSPINNER_INSTANCE"),zf=(()=>{class t extends On{componentName="ProgressSpinner";$pcProgressSpinner=p(mb,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ae,{self:!0});styleClass;strokeWidth="2";fill="none";animationDuration="2s";ariaLabel;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}_componentStyle=p(fb);static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-progressSpinner"],["p-progress-spinner"],["p-progressspinner"]],hostVars:5,hostBindings:function(n,o){n&2&&(O("aria-label",o.ariaLabel)("role","progressbar")("aria-busy",!0),G(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration",ariaLabel:"ariaLabel"},features:[Me([fb,{provide:mb,useExisting:t},{provide:Jt,useExisting:t}]),Kt([Ae]),Z],decls:2,vars:10,consts:[["viewBox","25 25 50 50",3,"pBind"],["cx","50","cy","50","r","20","stroke-miterlimit","10",3,"pBind"]],template:function(n,o){n&1&&(X(),f(0,"svg",0),F(1,"circle",1),m()),n&2&&(G(o.cx("spin")),Oe("animation-duration",o.animationDuration),_("pBind",o.ptm("spin")),l(),G(o.cx("circle")),_("pBind",o.ptm("circle")),O("fill",o.fill)("stroke-width",o.strokeWidth))},dependencies:[Mt,ot,Ae],encapsulation:2,changeDetection:0})}return t})(),_b=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({imports:[zf,ot,ot]})}return t})();var Wn={loading:"Loading collection\u2026",emptyFiltered:"No nodes match the current filters.",emptyAll:"No nodes loaded.",emptyAllHint:"Run a scan from the topbar to populate the collection.",resetFilters:"Reset filters",expandAll:"Expand all",collapseAll:"Collapse all",depthLevel0:"Map: show only the root level",depthLevel1:"Map: show up to one folder deep",depthLevel2:"Map: show up to two folders deep",folderAriaLabel:(t,i)=>`${i?"Collapse":"Expand"} folder ${t}`,leafAriaLabel:t=>`Inspect ${t}`,mapVisibilityTooltip:"Toggle visibility on the map",mapVisibilityAriaLabel:t=>`Toggle ${t} visibility on the map`,isolateTooltip:"Isolate this node and its direct links on the map",isolateAriaLabel:t=>`Isolate ${t} and its direct links on the map`,columns:{tree:"Folder / Node",kind:"Kind",linksIn:"in",linksOut:"out",tokens:"Tokens",issues:"Issues",modified:"Modified"},linksInHeaderTooltip:"Incoming references: how many other nodes link to this one.",linksOutHeaderTooltip:"Outgoing references: how many nodes this one links to.",modifiedHeaderTooltip:"Last modified on disk (file mtime). Hover a cell for the exact time.",sortAriaLabel:t=>`Sort by ${t}`,sortTreeAriaLabel:"Show folder tree",tokensTooltip:t=>`${t.toLocaleString()} tokens`,folderCount:t=>`${t}`,missing:"\xB7"};var ho=(()=>{class t{loader=p(Ot);bySeverity=k(()=>{let e=this.loader.scan(),n=new Set,o=new Set;if(!e)return{errors:n,warns:o};for(let r of e.issues){let a=r.severity==="error"?n:r.severity==="warn"?o:null;if(a)for(let s of r.nodeIds)a.add(s)}return{errors:n,warns:o}});static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Hf="sm.map.visible-paths";function gb(){let t=null;try{t=localStorage.getItem(Hf)}catch{return new Set}if(!t)return new Set;let i;try{i=JSON.parse(t)}catch{return new Set}if(!Array.isArray(i))return new Set;let e=new Set;for(let n of i)typeof n=="string"&&n.length>0&&e.add(n);return e}function vb(t){try{if(t.size===0){localStorage.removeItem(Hf);return}localStorage.setItem(Hf,JSON.stringify([...t]))}catch{}}function uA(t,i){if(t.size!==i.size)return!1;for(let e of t)if(!i.has(e))return!1;return!0}var Kn=(()=>{class t{_paths=W(gb());paths=this._paths.asReadonly();isActive=k(()=>this._paths().size>0);count=k(()=>this._paths().size);inScope(e){let n=this._paths();return n.size===0||n.has(e)}constructor(){de(()=>vb(this._paths()))}toggleLeaf(e){let n=new Set(this._paths());n.has(e)?n.delete(e):n.add(e),this._paths.set(n)}toggleFolder(e){let n=[...e];if(n.length===0)return;let o=new Set(this._paths()),r=this.folderState(n)!=="all";for(let a of n)r?o.add(a):o.delete(a);this._paths.set(o)}folderState(e){let n=this._paths(),o=0,r=0;for(let a of e)o++,n.has(a)&&r++;return o===0||r===0?"none":r===o?"all":"some"}setOnly(e){this._paths.set(new Set(e))}_isolateOrigin=null;_isolateSnapshot=null;_isolateResult=null;resetIsolateMemory(){this._isolateOrigin=null,this._isolateSnapshot=null,this._isolateResult=null}isolate(e,n){let o=new Set(n);if(this._isolateOrigin===e&&this._isolateResult!==null&&uA(this._paths(),this._isolateResult)){let a=this._isolateSnapshot??new Set;return this.resetIsolateMemory(),this.setOnly(a),"restored"}return this._isolateSnapshot=this._paths(),this._isolateOrigin=e,this._isolateResult=o,this.setOnly(o),"isolated"}clear(){this._paths().size!==0&&this._paths.set(new Set)}prune(e){let n=this._paths();if(n.size===0)return;let o=!1,r=new Set;for(let a of n)e.has(a)?r.add(a):o=!0;o&&this._paths.set(r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var qf="sm.folders.collapsed";function bb(){let t=null;try{t=localStorage.getItem(qf)}catch{return new Set}if(!t)return new Set;let i;try{i=JSON.parse(t)}catch{return new Set}if(!Array.isArray(i))return new Set;let e=new Set;for(let n of i)typeof n=="string"&&n.length>0&&e.add(n);return e}function yb(t){try{if(t.size===0){localStorage.removeItem(qf);return}localStorage.setItem(qf,JSON.stringify([...t]))}catch{}}function ds(t){let i=t.split("/").filter(n=>n.length>0);if(i.length===0)return t;let e=i[i.length-1];return e==="SKILL.md"&&i.length>=2?i[i.length-2]:e.replace(/\.md$/,"")}var Cb={stable:"success",experimental:"info",deprecated:"warn"};function xb(t){return t>=.75?"high":t>=.45?"medium":"low"}var Yn={llm:{when:{label:"when",tooltip:"When to use (LLM-inferred)"},style:{label:"style",tooltip:"Interaction style (LLM-inferred)"},does:{label:"does",tooltip:"Capabilities (LLM-inferred)"},steps:{label:"steps",tooltip:"Recipe / ordered steps (LLM-inferred)"},pre:{label:"pre",tooltip:"Preconditions (LLM-inferred)"},out:{label:"out",tooltip:"Outputs / produced artifacts (LLM-inferred)"},fx:{label:"fx",tooltip:"Side effects (LLM-inferred)"},eg:{label:"eg",tooltip:"Invocation example (LLM-inferred)"},topics:{label:"topics",tooltip:"Topics covered (LLM-inferred)"},facts:{label:"facts",tooltip:"Key facts (LLM-inferred discrete claims)"}},meta:{model:"model",allowed:"allowed",tags:"tags"},stats:{errors:t=>`${t} error${t===1?"":"s"}`,warns:t=>`${t} warning${t===1?"":"s"}`,bytes:t=>`${t.toLocaleString("en-US")} bytes`,tokens:t=>`${t.toLocaleString("en-US")} tokens`},stability:{experimental:"experimental",deprecated:"deprecated"},sidecar:{staleBody:"Stale: body content changed since the last bump.",staleFrontmatter:"Stale: frontmatter changed since the last bump.",staleBoth:"Stale: body and frontmatter changed since the last bump."},tagOverflow:t=>`+${t} more`,ariaExpand:"Expand",ariaFavoriteAdd:"Add to favorites",ariaFavoriteRemove:"Remove from favorites",favoriteAddTooltip:"Mark as favorite",favoriteRemoveTooltip:"Unfavorite"};function kb(t){let i={path:"",name:"",subfolders:new Map,leaves:[]};for(let e of t){let n=e.path.split("/");if(n.pop()===void 0)continue;let r=i,a=[];for(let s of n){if(!s)continue;a.push(s);let c=r.subfolders.get(s);c||(c={path:a.join("/"),name:s,subfolders:new Map,leaves:[]},r.subfolders.set(s,c)),r=c}r.leaves.push(e)}return i}function Ib(t){let i=new Map,e=n=>{let o=n.leaves.length;for(let a of n.subfolders.values())o+=e(a).nodes;let r={nodes:o};return i.set(n.path,r),r};return e(t),i}function Eb(t,i){if(i===""||i===t.path)return t;let e=t;for(let n of i.split("/"))if(n&&(e=e.subfolders.get(n),!e))return null;return e??null}function Mb(t){let i=[],e=n=>{for(let o of n.leaves)i.push(o.path);for(let o of n.subfolders.values())e(o)};return e(t),i}function us(t,i,e,n=""){let o=vA(t),r=z0(t),a=t.modifiedAtMs;return{type:"leaf",path:t.path,name:gA(t),prefix:n,depth:i,linksIn:t.linksInCount!==void 0?String(t.linksInCount):Wn.missing,linksOut:t.linksOutCount!==void 0?String(t.linksOutCount):Wn.missing,tokens:t.tokensTotal!==void 0?hr(t.tokensTotal):Wn.missing,modifiedAt:a!==void 0?q0(a):Wn.missing,modifiedAtFull:a!==void 0?G0(a):"",linksInRaw:t.linksInCount,linksOutRaw:t.linksOutCount,tokensRaw:t.tokensTotal,modifiedAtRaw:a,errors:e.errorCounts.get(t.path)??0,warns:e.warnCounts.get(t.path)??0,isStale:r,staleTooltip:r?H0(t,Yn.sidecar):"",stability:o,stabilitySeverity:Cb[o]}}function pA(t,i,e,n){let o=[],r=(c,u)=>{let h=[c.name],g=c;for(;g.subfolders.size===1&&g.leaves.length===0;){let[$]=g.subfolders.values();h.push($.name),g=$}let C=h.join("/");if(g.subfolders.size===0&&g.leaves.length===1){o.push(us(g.leaves[0],u,n,`${C}/`));return}let M=!i.has(g.path),S=e.get(g.path)??{nodes:0};if(o.push({type:"folder",path:g.path,name:C,depth:u,expanded:M,nodeCount:S.nodes}),!M)return;let N=Array.from(g.subfolders.values()).sort(Tb);for(let $ of N)r($,u+1);let q=[...g.leaves].sort(Sb);for(let $ of q)o.push(us($,u+1,n))},a=Array.from(t.subfolders.values()).sort(Tb);for(let c of a)r(c,0);let s=[...t.leaves].sort(Sb);for(let c of s)o.push(us(c,0,n));return o}function hA(t,i,e){let n=t.map(o=>us(o,0,e,_A(o.path)));return i.column==="tree"||n.sort(mA(i.column,i.dir)),n}function Db(t){return t.sort.column==="tree"?pA(t.tree,t.collapsed,t.aggregates,t.maps):hA(t.leaves,t.sort,t.maps)}function fA(t){return t.errors*1e6+t.warns*1e3+(t.isStale?1:0)}function mA(t,i){let e=i==="asc"?1:-1;return(n,o)=>{let r=wb(n,t),a=wb(o,t);return r===void 0&&a===void 0?n.path.localeCompare(o.path):r===void 0?1:a===void 0?-1:r!==a?(r-a)*e:n.path.localeCompare(o.path)}}function wb(t,i){switch(i){case"linksIn":return t.linksInRaw;case"linksOut":return t.linksOutRaw;case"tokens":return t.tokensRaw;case"issues":return fA(t);case"modified":return t.modifiedAtRaw}}function _A(t){let i=t.lastIndexOf("/");return i===-1?"":t.slice(0,i)}function gA(t){let i=t.frontmatter.name?.trim();return i||ds(t.path)||Wn.missing}function vA(t){return ro(t)??"stable"}function Tb(t,i){return t.name.localeCompare(i.name)}function Sb(t,i){return t.path.localeCompare(i.path)}function Gf(t,i){let e=new Map;if(!t)return e;for(let n of t)if(n.severity===i)for(let o of n.nodeIds)e.set(o,(e.get(o)??0)+1);return e}var jf="sm.files.sort",bA=["tree","linksIn","linksOut","tokens","issues","modified"],yA=["asc","desc"],Ti={column:"tree",dir:"asc"};function CA(t){return t==="tree"?"asc":"desc"}function Pb(t,i){return i==="tree"?Ti:t.column===i?{column:i,dir:t.dir==="asc"?"desc":"asc"}:{column:i,dir:CA(i)}}function xA(t){return typeof t=="string"&&bA.includes(t)}function wA(t){return typeof t=="string"&&yA.includes(t)}function TA(t){if(typeof t!="object"||t===null)return!1;let i=t;return xA(i.column)&&wA(i.dir)}function Rb(){let t=null;try{t=localStorage.getItem(jf)}catch{return Ti}if(!t)return Ti;let i;try{i=JSON.parse(t)}catch{return Ti}return TA(i)?{column:i.column,dir:i.dir}:Ti}function Ob(t){try{if(t.column===Ti.column&&t.dir===Ti.dir){localStorage.removeItem(jf);return}localStorage.setItem(jf,JSON.stringify({column:t.column,dir:t.dir}))}catch{}}var SA=()=>({width:"1.75rem",height:"1.75rem"});function kA(t,i){if(t&1&&F(0,"p-message",1),t&2){let e=d();_("text",e.error())}}function IA(t,i){if(t&1&&(f(0,"div",2),F(1,"p-progressSpinner",3),f(2,"span",4),b(3),m()()),t&2){let e=d();l(),zt(Et(3,SA)),l(2),x(e.texts.loading)}}function EA(t,i){if(t&1){let e=Y();F(0,"i",7),f(1,"p",8),b(2),m(),f(3,"p-button",9),L("onClick",function(){w(e);let o=d(3);return T(o.resetFilters())}),m()}if(t&2){let e=d(3);l(2),x(e.texts.emptyFiltered),l(),_("label",e.texts.resetFilters)("text",!0)}}function MA(t,i){if(t&1&&(F(0,"i",10),f(1,"p",11),b(2),m(),f(3,"p",12),b(4),m()),t&2){let e=d(3);l(2),x(e.texts.emptyAll),l(2),x(e.texts.emptyAllHint)}}function DA(t,i){if(t&1&&(f(0,"div",5),P(1,EA,4,3)(2,MA,5,2),m()),t&2){let e=d(2);l(),R(e.filtersActive()?1:2)}}function PA(t,i){if(t&1){let e=Y();f(0,"span",20)(1,"button",28),L("click",function(){w(e);let o=d(4);return T(o.expandAll())}),F(2,"i",29),m(),f(3,"button",30),L("click",function(){w(e);let o=d(4);return T(o.collapseAll())}),F(4,"i",31),m(),F(5,"span",32),f(6,"button",33),L("click",function(){w(e);let o=d(4);return T(o.setDepthLevel(0))}),b(7,"0"),m(),f(8,"button",34),L("click",function(){w(e);let o=d(4);return T(o.setDepthLevel(1))}),b(9,"1"),m(),f(10,"button",35),L("click",function(){w(e);let o=d(4);return T(o.setDepthLevel(2))}),b(11,"2"),m()()}if(t&2){let e=d(4);l(),_("pTooltip",e.texts.expandAll),O("aria-label",e.texts.expandAll),l(2),_("pTooltip",e.texts.collapseAll),O("aria-label",e.texts.collapseAll),l(3),ae("is-active",e.activeDepthLevel()===0),_("pTooltip",e.texts.depthLevel0),O("aria-label",e.texts.depthLevel0)("aria-pressed",e.activeDepthLevel()===0),l(2),ae("is-active",e.activeDepthLevel()===1),_("pTooltip",e.texts.depthLevel1),O("aria-label",e.texts.depthLevel1)("aria-pressed",e.activeDepthLevel()===1),l(2),ae("is-active",e.activeDepthLevel()===2),_("pTooltip",e.texts.depthLevel2),O("aria-label",e.texts.depthLevel2)("aria-pressed",e.activeDepthLevel()===2)}}function RA(t,i){if(t&1){let e=Y();f(0,"tr")(1,"th",16)(2,"div",17)(3,"button",18),L("click",function(){w(e);let o=d(3);return T(o.onSortColumn("tree"))}),b(4),F(5,"i",19),m(),P(6,PA,12,19,"span",20),m()(),f(7,"th",21)(8,"button",22),L("click",function(){w(e);let o=d(3);return T(o.onSortColumn("linksIn"))}),b(9),F(10,"i",19),m()(),f(11,"th",23)(12,"button",22),L("click",function(){w(e);let o=d(3);return T(o.onSortColumn("linksOut"))}),b(13),F(14,"i",19),m()(),f(15,"th",24)(16,"button",25),L("click",function(){w(e);let o=d(3);return T(o.onSortColumn("tokens"))}),b(17),F(18,"i",19),m()(),f(19,"th",26)(20,"button",18),L("click",function(){w(e);let o=d(3);return T(o.onSortColumn("issues"))}),b(21),F(22,"i",19),m()(),f(23,"th",27)(24,"button",22),L("click",function(){w(e);let o=d(3);return T(o.onSortColumn("modified"))}),b(25),F(26,"i",19),m()()()}if(t&2){let e=d(3);l(),O("aria-sort",e.ariaSortFor("tree")),l(2),ae("files__sort-btn--active",e.sortState().column==="tree"),O("aria-label",e.texts.sortTreeAriaLabel),l(),Se(" ",e.texts.columns.tree," "),l(),ae("pi-sort-amount-up",e.sortState().column==="tree"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="tree"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="tree"),l(),R(e.isFlat()?-1:6),l(),O("aria-sort",e.ariaSortFor("linksIn")),l(),ae("files__sort-btn--active",e.sortState().column==="linksIn"),_("pTooltip",e.texts.linksInHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksIn)),l(),Se(" ",e.texts.columns.linksIn," "),l(),ae("pi-sort-amount-up",e.sortState().column==="linksIn"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="linksIn"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="linksIn"),l(),O("aria-sort",e.ariaSortFor("linksOut")),l(),ae("files__sort-btn--active",e.sortState().column==="linksOut"),_("pTooltip",e.texts.linksOutHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksOut)),l(),Se(" ",e.texts.columns.linksOut," "),l(),ae("pi-sort-amount-up",e.sortState().column==="linksOut"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="linksOut"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="linksOut"),l(),O("aria-sort",e.ariaSortFor("tokens")),l(),ae("files__sort-btn--active",e.sortState().column==="tokens"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.tokens)),l(),Se(" ",e.texts.columns.tokens," "),l(),ae("pi-sort-amount-up",e.sortState().column==="tokens"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="tokens"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="tokens"),l(),O("aria-sort",e.ariaSortFor("issues")),l(),ae("files__sort-btn--active",e.sortState().column==="issues"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.issues)),l(),Se(" ",e.texts.columns.issues," "),l(),ae("pi-sort-amount-up",e.sortState().column==="issues"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="issues"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="issues"),l(),O("aria-sort",e.ariaSortFor("modified")),l(),ae("files__sort-btn--active",e.sortState().column==="modified"),_("pTooltip",e.texts.modifiedHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.modified)),l(),Se(" ",e.texts.columns.modified," "),l(),ae("pi-sort-amount-up",e.sortState().column==="modified"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="modified"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="modified")}}function OA(t,i){if(t&1){let e=Y();f(0,"tr",38),L("click",function(){w(e);let o=d().$implicit,r=d(3);return T(r.toggleFolder(o))})("keydown.enter",function(){w(e);let o=d().$implicit,r=d(3);return T(r.toggleFolder(o))})("keydown.space",function(o){w(e);let r=d().$implicit,a=d(3);return o.preventDefault(),T(a.toggleFolder(r))}),f(1,"td",39)(2,"span",40),F(3,"span",41),f(4,"button",42),L("click",function(o){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleFolderVisibility(r,o))}),F(5,"i",43),m(),F(6,"i",44)(7,"i",45),f(8,"span",46),b(9),m(),f(10,"span",47),b(11),m()()(),F(12,"td")(13,"td")(14,"td")(15,"td")(16,"td"),m()}if(t&2){let e=d().$implicit,n=d(3);Oe("--folder-depth",e.depth),O("aria-expanded",e.expanded)("aria-level",e.depth+1)("aria-label",n.texts.folderAriaLabel(e.name,e.expanded))("data-testid","files-folder-"+e.path),l(4),_("pTooltip",n.texts.mapVisibilityTooltip),O("data-state",n.folderStateMap().get(e.path)??"none")("aria-label",n.texts.mapVisibilityAriaLabel(e.name))("data-testid","files-vis-folder-"+e.path),l(),ae("pi-check",n.folderStateMap().get(e.path)==="all")("pi-minus",n.folderStateMap().get(e.path)==="some"),l(),ae("pi-chevron-right",!e.expanded)("pi-chevron-down",e.expanded),l(),ae("pi-folder",!e.expanded)("pi-folder-open",e.expanded),l(2),x(e.name),l(),O("aria-label",e.nodeCount+" nodes"),l(),x(n.texts.folderCount(e.nodeCount))}}function FA(t,i){if(t&1&&(f(0,"span",65),b(1),m()),t&2){let e=d(3).$implicit;l(),x(e.prefix)}}function NA(t,i){if(t&1&&(f(0,"span",51)(1,"span",64),b(2),m(),P(3,FA,2,1,"span",65),m()),t&2){let e=d(2).$implicit;_("pTooltip",e.path),l(2),x(e.name),l(),R(e.prefix?3:-1)}}function AA(t,i){if(t&1&&(f(0,"span",66),b(1),m()),t&2){let e=d(3).$implicit;l(),x(e.prefix)}}function LA(t,i){if(t&1&&(f(0,"span",52),P(1,AA,2,1,"span",66),b(2),m()),t&2){let e=d(2).$implicit;l(),R(e.prefix?1:-1),l(),x(e.name)}}function BA(t,i){if(t&1&&F(0,"i",59),t&2){let e=d(2).$implicit;_("pTooltip",e.staleTooltip),O("aria-label",e.staleTooltip)}}function VA(t,i){if(t&1&&(f(0,"span",60),F(1,"i",67),f(2,"span",68),b(3),m()()),t&2){let e=d(2).$implicit;l(3),x(e.errors)}}function zA(t,i){if(t&1&&(f(0,"span",61),F(1,"i",69),f(2,"span",68),b(3),m()()),t&2){let e=d(2).$implicit;l(3),x(e.warns)}}function HA(t,i){if(t&1&&(f(0,"span",62),b(1),m()),t&2){let e=d(5);l(),x(e.texts.missing)}}function qA(t,i){if(t&1){let e=Y();f(0,"tr",48),L("click",function(){w(e);let o=d().$implicit,r=d(3);return T(r.onLeafActivate(o))})("keydown.enter",function(){w(e);let o=d().$implicit,r=d(3);return T(r.onLeafActivate(o))})("keydown.space",function(o){w(e);let r=d().$implicit,a=d(3);return o.preventDefault(),T(a.onLeafActivate(r))}),f(1,"td",39)(2,"span",40),F(3,"span",41),f(4,"button",42),L("click",function(o){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleLeafVisibility(r,o))}),F(5,"i",43),m(),F(6,"span",49)(7,"i",50),P(8,NA,4,3,"span",51)(9,LA,3,2,"span",52),f(10,"button",53),L("click",function(o){w(e);let r=d().$implicit,a=d(3);return T(a.onSitemapClick(r,o))}),F(11,"i",54),m()()(),f(12,"td",55),b(13),m(),f(14,"td",55),b(15),m(),f(16,"td",56),b(17),m(),f(18,"td",57)(19,"span",58),P(20,BA,1,2,"i",59),P(21,VA,4,1,"span",60),P(22,zA,4,1,"span",61),P(23,HA,2,1,"span",62),m()(),f(24,"td",63),b(25),m()()}if(t&2){let e=d().$implicit,n=d(3);Oe("--folder-depth",e.depth),O("aria-label",n.texts.leafAriaLabel(e.name))("data-testid","files-leaf-"+e.path),l(4),_("pTooltip",n.texts.mapVisibilityTooltip),O("data-state",n.leafVisible(e.path)?"all":"none")("aria-label",n.texts.mapVisibilityAriaLabel(e.name))("data-testid","files-vis-leaf-"+e.path),l(),ae("pi-check",n.leafVisible(e.path)),l(3),R(n.isFlat()?8:9),l(2),_("pTooltip",n.texts.isolateTooltip),O("aria-label",n.texts.isolateAriaLabel(e.name))("data-testid","files-leaf-graph-"+e.path),l(3),x(e.linksIn),l(2),x(e.linksOut),l(),O("title",(e.tokensRaw??0)>0?n.texts.tokensTooltip(e.tokensRaw):null),l(),x(e.tokens),l(3),R(e.isStale?20:-1),l(),R(e.errors>0?21:-1),l(),R(e.warns>0?22:-1),l(),R(!e.isStale&&e.errors===0&&e.warns===0?23:-1),l(),O("title",e.modifiedAtFull||null),l(),x(e.modifiedAt)}}function GA(t,i){if(t&1&&P(0,OA,17,25,"tr",36)(1,qA,26,24,"tr",37),t&2){let e=i.$implicit;R(e.type==="folder"?0:1)}}function jA(t,i){if(t&1&&(f(0,"div",6)(1,"p-table",13),D(2,RA,27,70,"ng-template",14)(3,GA,2,1,"ng-template",15),m()()),t&2){let e=d(2);l(),_("value",e.rows())("paginator",!1)("scrollable",!0)("scrollHeight","flex")}}function UA(t,i){if(t&1&&P(0,DA,3,1,"div",5)(1,jA,4,4,"div",6),t&2){let e=d();R(e.rows().length===0?0:1)}}var Fb=(()=>{class t{loader=p(Ot);filters=p(en);issuePaths=p(ho);nodeOpenIntent=p(so);mapVisibility=p(Kn);mapIsolate=p(ss);texts=Wn;loading=this.loader.loading;error=this.loader.error;filtersActive=this.filters.isActive;collapsed=W(bb());sort=W(Rb());sortState=this.sort.asReadonly();isFlat=k(()=>this.sort().column!=="tree");constructor(){de(()=>{yb(this.collapsed())}),de(()=>{Ob(this.sort())})}filteredNodes=k(()=>{let e=this.issuePaths.bySeverity();return this.filters.apply(this.loader.nodes(),e)});tree=k(()=>kb(this.filteredNodes()));aggregates=k(()=>Ib(this.tree()));rows=k(()=>{let e=Gf(this.loader.scan()?.issues,"error"),n=Gf(this.loader.scan()?.issues,"warn");return Db({tree:this.tree(),leaves:this.filteredNodes(),collapsed:this.collapsed(),aggregates:this.aggregates(),maps:{errorCounts:e,warnCounts:n},sort:this.sort()})});folderStateMap=k(()=>{let e=this.mapVisibility.paths(),n=new Map,o=r=>{let a=0,s=0;for(let c of r.leaves)a++,e.has(c.path)&&s++;for(let c of r.subfolders.values()){let[u,h]=o(c);a+=u,s+=h}return n.set(r.path,a===0||s===0?"none":s===a?"all":"some"),[a,s]};return o(this.tree()),n});leafVisible(e){return this.mapVisibility.paths().has(e)}nodeDepth(e){let n=0;for(let o of e)o==="/"&&n++;return n}depthSet(e){let n=new Set;for(let o of this.filteredNodes())this.nodeDepth(o.path)<=e&&n.add(o.path);return n}pathsAre(e){let n=this.mapVisibility.paths();if(n.size!==e.size)return!1;for(let o of e)if(!n.has(o))return!1;return!0}activeDepthLevel=k(()=>{if(this.mapVisibility.paths().size===0)return null;for(let e of[0,1,2])if(this.pathsAre(this.depthSet(e)))return e;return null});setDepthLevel(e){let n=this.depthSet(e);this.pathsAre(n)?this.mapVisibility.clear():this.mapVisibility.setOnly(n)}ngOnInit(){this.loader.nodes().length===0&&!this.loader.loading()&&this.loader.load()}toggleFolder(e){let n=new Set(this.collapsed());n.has(e.path)?n.delete(e.path):n.add(e.path),this.collapsed.set(n)}expandAll(){this.collapsed.set(new Set)}collapseAll(){let e=new Set,n=o=>{o.path&&e.add(o.path);for(let r of o.subfolders.values())n(r)};n(this.tree()),this.collapsed.set(e)}onSortColumn(e){this.sort.set(Pb(this.sort(),e))}ariaSortFor(e){let n=this.sort();return n.column!==e?"none":n.dir==="asc"?"ascending":"descending"}onLeafActivate(e){this.openInMap(e)}openInMap(e){this.nodeOpenIntent.open(e.path)}onToggleLeafVisibility(e,n){n.stopPropagation(),this.mapVisibility.toggleLeaf(e.path)}onToggleFolderVisibility(e,n){n.stopPropagation();let o=Eb(this.tree(),e.path);o&&this.mapVisibility.toggleFolder(Mb(o))}onSitemapClick(e,n){n.stopPropagation(),this.mapIsolate.isolate(e.path)}resetFilters(){this.filters.reset()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-files-view"]],decls:4,vars:2,consts:[["data-testid","files-view",1,"files","files--rail"],["severity","error",3,"text"],["data-testid","files-loading",1,"files__loading"],["strokeWidth","4"],[1,"files__loading-label"],[1,"empty-state"],[1,"files__split"],["aria-hidden","true",1,"pi","pi-filter-slash","empty-state__icon"],["data-testid","files-empty-filtered",1,"empty-state__title"],["size","small","data-testid","files-reset-filters",3,"onClick","label","text"],["aria-hidden","true",1,"pi","pi-inbox","empty-state__icon"],["data-testid","files-empty-all",1,"empty-state__title"],[1,"empty-state__desc"],["dataKey","path","styleClass","p-datatable-sm files__table","data-testid","files-table",3,"value","paginator","scrollable","scrollHeight"],["pTemplate","header"],["pTemplate","body"],["data-testid","files-col-tree",1,"files__col-tree"],[1,"files__tree-head"],["type","button",1,"files__sort-btn",3,"click"],["aria-hidden","true",1,"pi","files__sort-icon"],[1,"files__tree-actions"],["data-testid","files-col-linksIn",1,"files__col-num",2,"width","70px"],["type","button","tooltipPosition","top",1,"files__sort-btn","files__sort-btn--num",3,"click","pTooltip"],["data-testid","files-col-linksOut",1,"files__col-num",2,"width","70px"],["data-testid","files-col-tokens",1,"files__col-num",2,"width","110px"],["type","button",1,"files__sort-btn","files__sort-btn--num",3,"click"],["data-testid","files-col-issues",2,"width","130px"],["data-testid","files-col-modified",1,"files__col-num",2,"width","120px"],["type","button","tooltipPosition","top","data-testid","files-expand-all",1,"files__tree-action",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-angle-double-down"],["type","button","tooltipPosition","top","data-testid","files-collapse-all",1,"files__tree-action",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-angle-double-up"],["aria-hidden","true",1,"files__tree-sep"],["type","button","tooltipPosition","top","data-testid","files-depth-0",1,"files__tree-num",3,"click","pTooltip"],["type","button","tooltipPosition","top","data-testid","files-depth-1",1,"files__tree-num",3,"click","pTooltip"],["type","button","tooltipPosition","top","data-testid","files-depth-2",1,"files__tree-num",3,"click","pTooltip"],["tabindex","0",1,"files__row","files__row--folder",3,"--folder-depth"],["tabindex","0",1,"files__row","files__row--leaf",3,"--folder-depth"],["tabindex","0",1,"files__row","files__row--folder",3,"click","keydown.enter","keydown.space"],[1,"files__cell-tree"],[1,"files__tree-inner"],["aria-hidden","true",1,"files__indent"],["type","button","tooltipPosition","top",1,"files__vis-check",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["aria-hidden","true",1,"pi","files__chevron"],["aria-hidden","true",1,"pi","files__folder-icon"],[1,"files__name","files__name--folder"],[1,"files__count"],["tabindex","0",1,"files__row","files__row--leaf",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"files__chevron-placeholder"],["aria-hidden","true",1,"pi","pi-file","files__leaf-icon"],["tooltipPosition","top","tooltipStyleClass","files__path-tooltip",1,"files__name-wrap",3,"pTooltip"],[1,"files__name","files__name--leaf"],["type","button","tooltipPosition","top",1,"files__open-graph",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-sitemap"],[1,"files__cell-num"],[1,"files__cell-num","files__cell-tokens"],[1,"files__cell-issues"],[1,"files__issues-row"],["tooltipPosition","top",1,"pi","pi-clock","files__stale-icon",3,"pTooltip"],[1,"files__issue","files__issue--error"],[1,"files__issue","files__issue--warn"],["aria-hidden","true",1,"files__cell-issues-empty"],[1,"files__cell-num","files__cell-modified"],[1,"files__leaf-name"],[1,"files__path-suffix"],[1,"files__name-prefix"],["aria-hidden","true",1,"pi","pi-times-circle"],[1,"files__issue-count"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"]],template:function(n,o){n&1&&(f(0,"section",0),P(1,kA,1,1,"p-message",1),P(2,IA,4,4,"div",2)(3,UA,2,1),m()),n&2&&(l(),R(o.error()?1:-1),l(),R(o.loading()?2:o.error()?-1:3))},dependencies:[pb,Vf,Dt,_b,zf,av,rv,yn,hn,Be,Ue],styles:["[_nghost-%COMP%]{--files-fs-xs: .75rem;--files-fs-mono: .8rem;--files-fs-sm: .875rem;--files-indent: 1rem;display:block;width:100%;box-sizing:border-box}.files[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.files__loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:var(--p-text-muted-color)}.files__loading-label[_ngcontent-%COMP%]{font-size:var(--files-fs-xs)}.files__table[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .files__table .p-datatable-tbody td{font-size:var(--files-fs-sm);vertical-align:middle}[_nghost-%COMP%] .files--rail .files__table{--p-datatable-header-cell-background: var(--sm-bg-content);--p-datatable-row-background: var(--sm-bg-content)}.files__sort-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;width:100%;padding:.15rem .25rem;margin:-.15rem -.25rem;border:0;background:transparent;font:inherit;color:inherit;cursor:pointer;border-radius:var(--sm-radius-sm);transition:background .12s ease-out,color .12s ease-out}.files__sort-btn--num[_ngcontent-%COMP%]{justify-content:flex-end}.files__sort-btn[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover)}.files__sort-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__sort-btn--active[_ngcontent-%COMP%]{color:var(--p-primary-color);font-weight:600}.files__sort-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-xs);color:var(--p-text-muted-color);opacity:.5;flex-shrink:0}.files__sort-btn--active[_ngcontent-%COMP%] .files__sort-icon[_ngcontent-%COMP%]{color:var(--p-primary-color);opacity:1}.files__tree-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.files__tree-head[_ngcontent-%COMP%] .files__sort-btn[_ngcontent-%COMP%]{flex:1 1 auto;width:auto}.files__tree-actions[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;gap:.1rem}.files__tree-action[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.4rem;height:1.4rem;padding:0;border:0;background:transparent;border-radius:var(--sm-radius-sm);color:var(--p-text-muted-color);cursor:pointer;transition:background .12s ease-out,color .12s ease-out}.files__tree-action[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.files__tree-action[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__tree-action[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-xs)}.files__tree-sep[_ngcontent-%COMP%]{flex:0 0 auto;width:1px;height:14px;margin:0 .15rem;background:var(--sm-border)}.files__tree-num[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:1.3rem;height:1.3rem;padding:0;border:1px solid var(--p-content-border-color);border-radius:var(--sm-radius-sm);background:transparent;color:var(--p-text-muted-color);font-size:var(--files-fs-xs);font-weight:600;line-height:1;cursor:pointer;transition:background .12s ease-out,color .12s ease-out,border-color .12s ease-out}.files__tree-num[_ngcontent-%COMP%]:hover{border-color:var(--p-primary-color);color:var(--p-text-color)}.files__tree-num.is-active[_ngcontent-%COMP%]{background:var(--p-primary-color);border-color:var(--p-primary-color);color:var(--p-primary-contrast-color)}.files__tree-num[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__row[_ngcontent-%COMP%]{cursor:pointer}.files__row[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover)}.files__split[_ngcontent-%COMP%]{display:flex;gap:1rem;align-items:flex-start}.files--rail[_ngcontent-%COMP%]{flex:1;min-height:0;gap:.5rem}.files--rail[_ngcontent-%COMP%] .files__split[_ngcontent-%COMP%]{flex:1;min-height:0;align-items:stretch}.files__vis-check[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:16px;height:16px;margin-right:.35rem;padding:0;border:1px solid var(--p-content-border-color);border-radius:4px;background:transparent;color:var(--p-primary-contrast-color);cursor:pointer}.files__vis-check[data-state=all][_ngcontent-%COMP%], .files__vis-check[data-state=some][_ngcontent-%COMP%]{background:var(--p-primary-color);border-color:var(--p-primary-color)}.files__vis-check[_ngcontent-%COMP%]:hover{border-color:var(--p-primary-color)}.files__vis-check[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem}.files__split[_ngcontent-%COMP%] > p-table[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.files__col-tree[_ngcontent-%COMP%], .files__cell-tree[_ngcontent-%COMP%]{min-width:280px;max-width:480px}.files__tree-inner[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;min-width:0;width:100%}.files__indent[_ngcontent-%COMP%]{display:inline-block;flex-shrink:0;width:calc(var(--folder-depth, 0) * var(--files-indent))}.files__chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-xs);color:var(--p-text-muted-color);width:.85rem;text-align:center}.files__chevron-placeholder[_ngcontent-%COMP%]{display:inline-block;flex-shrink:0;width:.85rem}.files__folder-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-sm);color:var(--p-primary-color);width:1rem;text-align:center}.files__leaf-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-sm);color:var(--p-text-muted-color);width:1rem;text-align:center;opacity:.7}.files__name[_ngcontent-%COMP%]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.files__name--folder[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color)}.files__name--leaf[_ngcontent-%COMP%]{font-weight:500;color:var(--p-text-color)}.files__name-prefix[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-weight:400}.files__name-wrap[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:.4rem;min-width:0;flex:0 1 auto;overflow:hidden}.files__leaf-name[_ngcontent-%COMP%]{flex:0 0 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:var(--p-text-color)}.files__path-suffix[_ngcontent-%COMP%]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--p-text-muted-color);font-size:var(--files-fs-xs)}.files__open-graph[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin-left:.25rem;padding:0;border:0;background:transparent;border-radius:var(--sm-radius-sm);color:var(--p-text-muted-color);cursor:pointer;opacity:0;transition:opacity .12s ease-out,background .12s ease-out,color .12s ease-out}.files__open-graph[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);line-height:1}.files__row--leaf[_ngcontent-%COMP%]:hover .files__open-graph[_ngcontent-%COMP%], .files__row--leaf[_ngcontent-%COMP%]:focus-within .files__open-graph[_ngcontent-%COMP%]{opacity:.85}.files__open-graph[_ngcontent-%COMP%]:hover, .files__open-graph[_ngcontent-%COMP%]:focus-visible{opacity:1;background:var(--sm-bg-hover);color:var(--p-primary-color)}.files__count[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-xs);font-family:var(--sm-font-mono);color:var(--p-text-muted-color);padding:.05rem .4rem;border-radius:999px;background:var(--sm-bg-hover);min-width:1.5rem;text-align:center}[_nghost-%COMP%] .files__table .p-datatable-tbody .files__row--folder>td{background:color-mix(in srgb,var(--sm-bg-hover) 30%,transparent)}.files__col-num[_ngcontent-%COMP%]{text-align:right}.files__cell-num[_ngcontent-%COMP%]{text-align:right;font-family:var(--sm-font-mono);font-size:var(--files-fs-mono);color:var(--p-text-muted-color)}.files__cell-modified[_ngcontent-%COMP%]{white-space:nowrap;font-variant-numeric:tabular-nums}.files__stale-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);color:var(--p-text-color);line-height:1;opacity:.65}.files__issues-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.6rem}.files__issue[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;font-weight:600;font-size:var(--files-fs-sm);line-height:1;opacity:.65}.files__issue[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);line-height:1}.files__issue-count[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums}.files__issue--error[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.files__issue--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.files__cell-issues-empty[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-family:var(--sm-font-mono);font-size:var(--files-fs-mono)}"],changeDetection:0})}return t})();var Si=class{constructor(i,e,n,o,r){this.center=i,this.radiusX=e,this.radiusY=n,this.startAngle=o,this.endAngle=r}},H=class t{static castToPoint(i){return i||t.initialize()}static initialize(i=0,e=0){return{x:i,y:e}}static copy(i){return t.initialize(i.x,i.y)}static isEqual(i,e){return i.x===e.x&&i.y===e.y}static sum(i,e){return{x:i.x+e.x,y:i.y+e.y}}static sub(i,e){return{x:i.x-e.x,y:i.y-e.y}}static div(i,e){return{x:i.x/e,y:i.y/e}}static mult(i,e){return{x:i.x*e,y:i.y*e}}static interpolatePoints(i,e,n){let o=1-n;return t.initialize(i.x*o+e.x*n,i.y*o+e.y*n)}static roundTo(i,e){let n=Math.trunc(i.x/e),o=Math.trunc(i.y/e);return{x:n*e,y:o*e}}static hypotenuse(i,e){let n=e.x-i.x,o=e.y-i.y;return Math.abs(Math.sqrt(n*n+o*o))}static distance(i,e){let n=i.x-e.x,o=i.y-e.y;return Math.sqrt(n*n+o*o)}static getMinimum(i,e){return t.initialize(Math.min(i.x,e.x),Math.min(i.y,e.y))}static getMaximum(i,e){return t.initialize(Math.max(i.x,e.x),Math.max(i.y,e.y))}static matrixTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getScreenCTM();if(o){let r=e.createSVGPoint();r.x=i.x,r.y=i.y,n=r.matrixTransform(o.inverse())}return n}static elementTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getBoundingClientRect();return n=t.sub(n,t.initialize(o.left,o.top)),n}},he=class t{constructor(i=0,e=0){this.x=i,this.y=e}static fromPoint(i){return new t(i.x,i.y)}add(i){let e=H.sum(this,i);return t.fromPoint(e)}sub(i){let e=H.sub(this,i);return t.fromPoint(e)}subNumber(i){let e=H.sub(this,new t(i,i));return t.fromPoint(e)}div(i){let e=H.div(this,i);return t.fromPoint(e)}mult(i){let e=H.mult(this,i);return t.fromPoint(e)}matrixTransform(i){let e=H.matrixTransform(this,i);return t.fromPoint(e)}elementTransform(i){let e=H.elementTransform(this,i);return t.fromPoint(e)}},mr=class{static initialize(i=H.initialize(),e=H.initialize()){return{point1:i,point2:e}}static copy(i){return{point1:i.point1,point2:i.point2}}static hypotenuse(i){return Math.sqrt(Math.pow(i.point1.x-i.point2.x,2)+Math.pow(i.point1.y-i.point2.y,2))}},ki=class{constructor(i,e){this.point1=i,this.point2=e}},ne=class t{static initialize(i=0,e=0,n=0,o=0){n<0&&(i=i+n,n=-n),o<0&&(e=e+o,o=-o);let r=H.initialize(i+n/2,e+o/2);return{x:i,y:e,width:n,height:o,gravityCenter:r}}static copy(i){return t.initialize(i.x,i.y,i.width,i.height)}static fromElement(i){let{x:e,y:n,width:o,height:r}=i.getBoundingClientRect();return t.initialize(e,n,o,r)}static isIncludePoint(i,e){return e.x>=t.left(i)&&e.x<=t.right(i)&&e.y>=t.top(i)&&e.y<=t.bottom(i)}static intersectionWithRect(i,e){return!(i.x+i.width<e.x||e.x+e.width<i.x||i.y+i.height<e.y||e.y+e.height<i.y)}static left(i){return i.x}static top(i){return i.y}static right(i){return i.x+i.width}static bottom(i){return i.y+i.height}static addPoint(i,e){let n=t.copy(i);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(i,e){let n=t.copy(i);return n.x*=e,n.y*=e,n.width*=e,n.height*=e,this.initialize(n.x,n.y,n.width,n.height)}static div(i,e){let n=t.copy(i);return n.x/=e,n.y/=e,n.width/=e,n.height/=e,this.initialize(n.x,n.y,n.width,n.height)}static addPointToSize(i,e){let n=t.copy(i);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(i){return!i||i.length===0?null:i.reduce((e,n)=>{let o=Math.min(e.x,n.x),r=Math.min(e.y,n.y),a=Math.max(e.x+e.width,n.x+n.width),s=Math.max(e.y+e.height,n.y+n.height);return t.initialize(o,r,a-o,s-r)},i[0])}static elementTransform(i,e){let n=e.getBoundingClientRect(),o=H.sub(i,H.initialize(n.left,n.top));return t.initialize(o.x,o.y,i.width,i.height)}static updateIsNotFinite(i){return!Number.isFinite(i.width)||!Number.isFinite(i.height)||!Number.isFinite(i.x)||!Number.isFinite(i.y)?t.initialize(0,0,0,0):i}};function Nb(t,i){let e=Math.max(t.width,i),n=Math.max(t.height,i),o=(e-t.width)/2,r=(n-t.height)/2;return ne.initialize(t.x-o,t.y-r,e,n)}function Wf(t,i){t=ne.updateIsNotFinite(t),i.setAttribute("x",t.x.toString()),i.setAttribute("y",t.y.toString()),i.setAttribute("width",t.width.toString()),i.setAttribute("height",t.height.toString())}function Ab(t,i){t=ne.updateIsNotFinite(t),i.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var rt=class t{constructor(i=0,e=0,n=0,o=0,r=0,a=0,s=0,c=0){this.x=i,this.y=e,this.width=n,this.height=o,this.radius1=r,this.radius2=a,this.radius3=s,this.radius4=c,this.gravityCenter=H.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(i){return new he(i.x+i.width/2,i.y+i.height/2)}static fromRect(i){return new t(i.x,i.y,i.width,i.height)}static fromRoundedRect(i){return new t(i.x,i.y,i.width,i.height,i.radius1,i.radius2,i.radius3,i.radius4)}static fromCenter(i,e,n){return new t(i.gravityCenter.x-e/2,i.gravityCenter.y-n/2,e,n,i.radius1,i.radius2,i.radius3,i.radius4)}static fromPoint(i){return new t(i.x,i.y)}addPoint(i){let e=t.fromRoundedRect(this);return e.x+=i.x,e.y+=i.y,e.gravityCenter=this.calculateGravityCenter(e),e}},wt=class t{static initialize(i=0,e=0){return{width:i,height:e}}static isEqual(i,e){return i.width===e.width&&i.height===e.height}static offsetFromElement(i){if(i instanceof SVGGraphicsElement){let e=i.getBBox();return t.initialize(e.width,e.height)}else if(i instanceof HTMLElement)return t.initialize(i.offsetWidth,i.offsetHeight)}};function $A(){return{position:H.initialize(),scaledPosition:H.initialize(),scale:1,rotate:0}}function WA(t){let i;if(t){t=t.replace("matrix(",""),t=t.replace(")","");let e=t.split(" ");i={position:{x:Number(e[4]),y:Number(e[5])},scaledPosition:H.initialize(),scale:Number(e[0]),rotate:0}}return i}var Xn=class{static toString(i){let e=H.sum(i.position,i.scaledPosition);return`matrix(${i.scale}, 0, 0, ${i.scale}, ${e.x}, ${e.y})`}static fromString(i){return WA(i)}static default(){return $A()}},Ft=class t{static initialize(i=0,e=0){return H.initialize(i,e)}static fromPoints(i,e){return t.initialize(e.x-i.x,e.y-i.y)}static vectorLength(i){return Math.sqrt(t.magnitudeSquared(i))}static magnitudeSquared(i){return i.x*i.x+i.y*i.y}static dotProduct(i,e){return i.x*e.x+i.y*e.y}static crossProduct(i,e){return i.x*e.y-i.y*e.x}static subtract(i,e){return t.initialize(i.x-e.x,i.y-e.y)}static add(i,e){return t.initialize(i.x+e.x,i.y+e.y)}static scale(i,e){return t.initialize(i.x*e,i.y*e)}static angle(i,e){let n=Math.acos(Math.max(-1,Math.min(t.dotProduct(i,e)/(t.vectorLength(i)*t.vectorLength(e)),1)));return t.crossProduct(i,e)<0?-n:n}},$f=class{static parseRoundedRect(i){let e=Math.PI*.5,n=i.x,o=i.y,r=i.x+i.width,a=i.y+i.height,s=i.x+i.radius1,c=i.y+i.radius1,u=i.x+i.width-i.radius2,h=i.y+i.radius2,g=i.x+i.width-i.radius3,C=i.y+i.height-i.radius3,M=i.x+i.radius4,S=i.y+i.height-i.radius4;return[new Si({x:s,y:c},i.radius1,i.radius1,2*e,3*e),new ki({x:s,y:o},{x:u,y:o}),new Si({x:u,y:h},i.radius2,i.radius2,3*e,4*e),new ki({x:r,y:h},{x:r,y:C}),new Si({x:g,y:C},i.radius3,i.radius3,0,e),new ki({x:g,y:a},{x:M,y:a}),new Si({x:M,y:S},i.radius4,i.radius4,e,2*e),new ki({x:n,y:S},{x:n,y:c})]}},fo=class{static getRoundedRectIntersections(i,e,n){let o=$f.parseRoundedRect(n);for(let r of o)if(r instanceof Si){let a=this.intersectArcWithLine(r,i,e);if(a.length>0)return a}else if(r instanceof ki){let a=this.intersectLineSegments(i,e,r.point1,r.point2);if(a)return[a]}return[]}static getRoundedRectIntersectionsWithSVGPath(i,e){let n=i.getTotalLength(),o=[];for(let r=0;r<=n;r+=1){let a=i.getPointAtLength(r);o.push({x:a.x,y:a.y})}for(let r=1;r<o.length;r++){let a=this.getRoundedRectIntersections(o[r-1],o[r],e);if(a.length>0)return a}return[]}static intersectArcWithLine(i,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(i.center,i.radiusX,i.radiusY,e,n),i)}static intersectLineSegments(i,e,n,o){let r=e.x-i.x,a=e.y-i.y,s=o.x-n.x,c=o.y-n.y,u=(-a*(i.x-n.x)+r*(i.y-n.y))/(-s*a+r*c),h=(s*(i.y-n.y)-c*(i.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&h>=0&&h<=1?{x:i.x+h*r,y:i.y+h*a}:null}static filterPointsWithinArc(i,e){let{center:n,startAngle:o,endAngle:r}=e;if(i.length===0)return i;r<o&&([o,r]=[r,o]),(o<0||r<0)&&(o+=2*Math.PI,r+=2*Math.PI);let a=[];for(let s of i){let c=this.normalizeAngle(Ft.angle(Ft.initialize(1,0),Ft.initialize(s.x-n.x,s.y-n.y)));c<o&&(c+=2*Math.PI),o<=c&&c<=r&&a.push(s)}return a}static normalizeAngle(i){let e=i%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(i,e,n,o,r){let a=Ft.initialize(o.x,o.y),s=Ft.fromPoints(o,r),c=Ft.initialize(i.x,i.y),u=Ft.subtract(a,c),h=Ft.initialize(s.x/(e*e),s.y/(n*n)),g=Ft.initialize(u.x/(e*e),u.y/(n*n)),C=Ft.dotProduct(s,h),M=Ft.dotProduct(s,g),S=Ft.dotProduct(u,g)-1,N=M*M-C*S;return N<0?[]:this.calculateIntersectionPoints(N,C,M,o,r)}static calculateIntersectionPoints(i,e,n,o,r){let a=[];if(i>0){let s=Math.sqrt(i),c=(-n-s)/e,u=(-n+s)/e;c>=0&&c<=1&&a.push(H.interpolatePoints(o,r,c)),u>=0&&u<=1&&a.push(H.interpolatePoints(o,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(H.interpolatePoints(o,r,s))}return a}};var Kf=class{handle(i,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(i)),!!n)return e.get(this.execution).handle(i)}execute(i,e){return e.get(this.execution).handle(i)}setValidator(i){this.validator=i}setExecution(i){this.execution=i}},B=class t{constructor(){this._injector=p(ft)}static registerPipeline(i,e,n){if(!i||!i.fToken)throw new Error("Type must have a fToken static property.");let o=this.pipelines.get(i.fToken)||new Kf;n?o.setValidator(e):o.setExecution(e),this.pipelines.set(i.fToken,o)}send(i){let e=t.pipelines.get(i.constructor.fToken);if(e)return e.handle(i,this._injector);throw new Error("Handler not registered for request type.")}execute(i){return t.pipelines.get(i.constructor.fToken).execute(i,this._injector)}};B.pipelines=new Map;B.\u0275fac=function(i){return new(i||B)};B.\u0275prov=y({token:B,factory:B.\u0275fac});function E(t){return function(i){B.registerPipeline(t,i,!1)}}var KA=(()=>{class t{setItem(e,n){localStorage.setItem(e,n)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),YA=(()=>{class t{storage={};setItem(e,n){this.storage[e]=n}getItem(e){return this.storage[e]||null}removeItem(e){delete this.storage[e]}clear(){this.storage={}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),XA=new ve("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>Ht(p(za))?p(KA):p(YA)}),ZA=(()=>{class t{getComputedStyle(e){return window.getComputedStyle(e)}get innerWidth(){return window.innerWidth}get innerHeight(){return window.innerHeight}get pageXOffset(){return window.pageXOffset}get pageYOffset(){return window.pageYOffset}isMediaQuery(e){return window.matchMedia(e).matches}requestAnimationFrame(e){return window.requestAnimationFrame(e)}get location(){return window.location}open(e,n,o){window.open(e,n,o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),QA=(()=>{class t{getComputedStyle(e){return new Proxy({getPropertyValue:n=>"0"},{get:(n,o)=>o==="getPropertyValue"?n.getPropertyValue:"0"})}get innerWidth(){return 0}get innerHeight(){return 0}get pageXOffset(){return 0}get pageYOffset(){return 0}isMediaQuery(e){return!1}requestAnimationFrame(e){return setTimeout(e,0)}get location(){return{href:"",pathname:"",search:"",hash:"",origin:""}}open(e,n,o){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),JA=new ve("F_WINDOW",{providedIn:"root",factory:()=>Ht(p(za))?p(ZA):p(QA)}),Zn=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(Zn||{}),Yf;try{Yf=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Yf=!1}var Xf=(()=>{class t{_platformId;isBrowser=!1;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Yf)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(e){this._platformId=e,this.isBrowser=this._platformId?Ht(this._platformId):typeof document=="object"&&!!document}getOS(){let e=navigator.userAgent.toLowerCase(),n=/(macintosh|macintel|macppc|mac68k|macos)/i,o=/(win32|win64|windows|wince)/i,r;return n.test(e)?r=Zn.MAC_OS:this.IOS?r=Zn.IOS:o.test(e)?r=Zn.WINDOWS:this.ANDROID?r=Zn.ANDROID:!r&&/linux/.test(e)&&(r=Zn.LINUX),r}static \u0275fac=function(n){return new(n||t)(Zi(za))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),at=(()=>{class t{injectedDocument;windowService;localStorageService;platformService;constructor(e,n,o,r){this.injectedDocument=e,this.windowService=n,this.localStorageService=o,this.platformService=r}isBrowser(){return this.platformService.isBrowser}get window(){return this.windowService}get localStorage(){return this.localStorageService}get document(){return this.injectedDocument}toPixels(e,n,o,r){if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("%")){let a=parseFloat(e)/100;return Math.max(n,o)*a}else{if(e.endsWith("em"))return parseFloat(e)*parseFloat(r);if(e.endsWith("rem"))return parseFloat(e)*parseFloat(getComputedStyle(this.document.documentElement).fontSize);if(e.endsWith("vh")){let a=this.window.innerHeight/100;return parseFloat(e)*a}else if(e.endsWith("vw")){let a=this.window.innerWidth/100;return parseFloat(e)*a}}return parseFloat(e)||0}static \u0275fac=function(n){return new(n||t)(Zi(Va),Zi(JA),Zi(XA),Zi(Xf))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zf(t,i){return t.reduce((e,n)=>[...e,...i(n)],[])}function Qf(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o<e.length;o++)e[o].removeAttribute("id");return n==="canvas"?Vb(t,i):(n==="input"||n==="select"||n==="textarea")&&Bb(t,i),Lb("canvas",t,i,Vb),Lb("input, textarea, select",t,i,Bb),i}function Lb(t,i,e,n){let o=i.querySelectorAll(t);if(o.length){let r=e.querySelectorAll(t);for(let a=0;a<o.length;a++)n(o[a],r[a])}}var eL=0;function Bb(t,i){i.type!=="file"&&(i.value=t.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${eL++}`)}function Vb(t,i){let e=i.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function Jf(t,i,e){for(let n in i)if(i.hasOwnProperty(n)){let o=i[n];o?t.setProperty(n,o,e?.has(n)?"important":""):t.removeProperty(n)}return t}function zb(t){Jf(t.style,{"touch-action":"none","-webkit-user-drag":"none","-webkit-tap-highlight-color":"transparent","user-select":"none","-ms-user-select":"none","-webkit-user-select":"none","-moz-user-select":"none"})}function Hb(t,i,e){return tL(t,e).dataset[i]}function tL(t,i){return t.closest(i)}function em(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let n=i.createElement("div");return e.forEach(o=>n.appendChild(o)),n}function _r(t,i){let e=nL(t,i);return!!e&&!e.classList.contains(i+"-disabled")}function nL(t,i){return t.closest(i)}function Fn(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function mo(t,i,e){let n=e[t.toUpperCase()]||iL(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${i}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function iL(t,i){return Object.keys(t).find(e=>t[e]===i)}var oL=["markerElement"],rL=["fConnectionGradientRenderer",""],aL=["f-connection-path",""],sL=["fConnectionSelection",""],lL=["f-connection-drag-handle-start",""],cL=["f-connection-drag-handle-end",""],dL=["defs"],uL=["*"],pL=["fGroupsContainer"],hL=["fNodesContainer"],fL=["fConnectionsContainer"],mL=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],_L=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],gL=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],vL=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function bL(t,i){t&1&&(X(),F(0,"linearGradient",3)),t&2&&_("fConnectionGradientRendererFor",i)}function yL(t,i){t&1&&(X(),F(0,"circle",6))}function CL(t,i){t&1&&Ge(0,4)}var xL="[_nghost-%COMP%]{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}",wL=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],TL=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],rm=new ve("F_BACKGROUND_PATTERN"),Ld=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(i){this.fPattern=i}},yo=class{_items=[];_byId=new Map;get(i){return this._byId.get(i)}require(i){let e=this._byId.get(i);if(!e)throw new Error(`${this.kind} not found: ${i}`);return e}has(i){return this._byId.has(i)}getAll(){return this._items}size(){return this._items.length}add(i){let e=i.fId();if(this._byId.has(e))throw new Error(`${this.kind} already exists: ${e}`);this._items.push(i),this._byId.set(e,i)}addMany(i){for(let e of i)this.add(e)}remove(i){let e=i.fId(),n=this._byId.get(e);if(!n)return!1;this._byId.delete(e);let o=this._items.indexOf(n);return o>=0&&this._items.splice(o,1),!0}removeById(i){let e=this._byId.get(i);if(!e)return;this._byId.delete(i);let n=this._items.indexOf(e);return n>=0&&this._items.splice(n,1),e}clear(){this._items.length=0,this._byId.clear()}};function Ii(t){return{name:t}}var am=class{_instances=new Map;get(i){return this._instances.get(i.name)}require(i){let e=this.get(i);if(!e)throw new Error(`Instance not found: ${i.name}`);return e}has(i){return this._instances.has(i.name)}add(i,e){if(this._instances.has(i.name))throw new Error(`${i.name} already exists`);this._instances.set(i.name,e)}remove(i){if(!this._instances.has(i.name))throw new Error(`${i.name} does not exist`);return this._instances.delete(i.name),!0}clear(){this._instances.clear()}},vr=class extends yo{kind;constructor(i){super(),this.kind=i}},sm=class extends yo{kind="Connection Marker"},lm=class extends yo{kind="Connection";_instancesForCreate;_instancesForSnap;getForSnap(){return this._instancesForSnap}getForCreate(){return this._instancesForCreate}addForCreate(i){this._instancesForCreate=i}addForSnap(i){this._instancesForSnap=i}removeInstanceForCreate(){this._instancesForCreate=void 0}removeInstanceForSnap(){this._instancesForSnap=void 0}},cm=class extends yo{kind="Node"},go=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(i=!0){this.notifyOnSubscribe=i}};function SL(){return t=>{let i=null,e=null,n=()=>{i!==null&&cancelAnimationFrame(i),e!==null&&cancelAnimationFrame(e),i=e=null};return{callback:()=>{n(),i=requestAnimationFrame(()=>{i=null,e=requestAnimationFrame(()=>{e=null,t()})})},cleanup:n}}}function kL(){return t=>{let i=null;return{callback:()=>{i!==null&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=null,t()})},cleanup:()=>{i!==null&&cancelAnimationFrame(i),i=null}}}}function Bd(t){return i=>{let e=null;return{callback:()=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{e=null,i()},t)},cleanup:()=>{e!==null&&clearTimeout(e),e=null}}}}var nn=class{_listeners=new Set;notify(){this._listeners.forEach(i=>i())}listen(i){return this._listeners.add(i),()=>this.stop(i)}stop(i){this._listeners.delete(i)}},dm=class extends nn{_htmlElement;_observer=new ResizeObserver(()=>this.notify());_isObserving=!1;constructor(i){super(),this._htmlElement=i}listen(i){return this._isObserving||(this._observer.observe(this._htmlElement),this._isObserving=!0),super.listen(i)}stop(i){super.stop(i),this._listeners.size===0&&this._disconnect()}_disconnect(){this._observer.unobserve(this._htmlElement),this._observer.disconnect(),this._isObserving=!1}},xn=class t{_channels=[];_operators=[];constructor(...i){this._channels=[...i]}pipe(...i){let e=new t(...this._channels);return e._operators=[...this._operators,...i],e}listen(i,e){let n=e,o=[],r=[],a=[];for(let g of[...this._operators].reverse()){let C=g(n);n=C.callback,C.cleanup&&o.push(C.cleanup),C.onSubscribe&&r.push(C.onSubscribe),C.setTeardown&&a.push(C.setTeardown)}let s=this._channels.map(g=>g.listen(()=>n())),c=null,u=!1,h=()=>{u||(u=!0,c?.(),c=null,s.forEach(g=>g()),o.forEach(g=>g()))};a.slice().reverse().forEach(g=>g(h)),r.slice().reverse().forEach(g=>g(n)),c=i.onDestroy(h)}};function fh(){return t=>{let i=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{i&&e()})},cleanup:()=>{i=!1}}}}function qb(){return t=>{let i=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!i){i=!0;try{t()}finally{e?.()}}}}}}var IL=(()=>{let t=class fs{_store=p(A);handle({notifyOnSubscribe:e}){return e?new xn(this._store.connectionsChanges$).pipe(fh(),Bd(1)):new xn(this._store.connectionsChanges$).pipe(Bd(1))}static \u0275fac=function(n){return new(n||fs)};static \u0275prov=y({token:fs,factory:fs.\u0275fac})};return t=I([E(go)],t),t})(),um=class{static fToken=Symbol("ListenNodesChangesRequest")},EL=(()=>{let t=class ms{_store=p(A);handle(e){return new xn(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||ms)};static \u0275prov=y({token:ms,factory:ms.\u0275fac})};return t=I([E(um)],t),t})(),Vd=class{static fToken=Symbol("ListenTransformChangesRequest")},ML=(()=>{let t=class _s{_store=p(A);handle(e){return new xn(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||_s)};static \u0275prov=y({token:_s,factory:_s.\u0275fac})};return t=I([E(Vd)],t),t})(),Ei=class{static fToken=Symbol("EmitConnectionsChangesRequest")},DL=(()=>{let t=class gs{_store=p(A);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||gs)};static \u0275prov=y({token:gs,factory:gs.\u0275fac})};return t=I([E(Ei)],t),t})(),ti=class{static fToken=Symbol("NotifyTransformChangedRequest")},A=(()=>{class t{transformChanges$=new nn;viewportAnimationChanges$=new nn;connectionsChanges$=new nn;_connectionsRevision=0;connectionsRenderedChanges$=new nn;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new nn;_nodesRevision=0;progressiveRenderChanges$=new nn;_pendingProgressiveRenderCount=0;get connectionsRevision(){return this._connectionsRevision}get connectionsRenderedRevision(){return this._connectionsRenderedRevision}get connectionsRenderedNodesRevision(){return this._connectionsRenderedNodesRevision}get nodesRevision(){return this._nodesRevision}get hasPendingProgressiveRender(){return this._pendingProgressiveRenderCount>0}get isViewportAnimating(){return this._viewportAnimationCount>0}get flowHost(){return this.fFlow?.hostElement}fFlow;fCanvas;get transform(){return this.fCanvas?.transform}nodes=new cm;connections=new lm;connectionMarkers=new sm;outputs=new vr("Output");inputs=new vr("Input");outlets=new vr("Outlet");instances=new am;fDraggable;emitNodeChanges(){this._nodesRevision++,this.nodesChanges$.notify()}emitConnectionChanges(){this._connectionsRevision++,this.connectionsChanges$.notify()}completeConnectionsRender(e,n){e<this._connectionsRenderedRevision||e===this._connectionsRenderedRevision&&n<=this._connectionsRenderedNodesRevision||(this._connectionsRenderedRevision=Math.min(e,this._connectionsRevision),this._connectionsRenderedNodesRevision=n,this.connectionsRenderedChanges$.notify())}beginProgressiveRender(){this._pendingProgressiveRenderCount++,this.progressiveRenderChanges$.notify()}endProgressiveRender(){this._pendingProgressiveRenderCount&&(this._pendingProgressiveRenderCount--,this.progressiveRenderChanges$.notify())}transformChanged(){this.transformChanges$.notify()}beginViewportAnimation(){this._viewportAnimationCount++,this.viewportAnimationChanges$.notify()}endViewportAnimation(){this._viewportAnimationCount&&(this._viewportAnimationCount--,this.viewportAnimationChanges$.notify())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),We={MAGNETIC_LINES:Ii("magnetic-lines"),MAGNETIC_RECTS:Ii("magnetic-rects"),ZOOM:Ii("zoom-controls"),BACKGROUND:Ii("background"),SELECTION_AREA:Ii("selection-area"),MINIMAP:Ii("minimap"),AUTO_PAN:Ii("auto-pan")},PL=(()=>{let t=class vs{_store=p(A);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||vs)};static \u0275prov=y({token:vs,factory:vs.\u0275fac})};return t=I([E(ti)],t),t})(),ni=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(i,e){this.key=i,this.instance=e}},RL=(()=>{let t=class bs{_store=p(A);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||bs)};static \u0275prov=y({token:bs,factory:bs.\u0275fac})};return t=I([E(ni)],t),t})(),ii=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(i){this.key=i}},OL=(()=>{let t=class ys{_store=p(A);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||ys)};static \u0275prov=y({token:ys,factory:ys.\u0275fac})};return t=I([E(ii)],t),t})(),FL=[A,EL,IL,ML,DL,PL,RL,OL],NL=0,AL=(()=>{let t=class Cs{_store=p(A);_browser=p(at);get _backgroundElement(){return this._store.instances.get(We.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let o=bo("defs",this._browser);if(e.fPattern?.hostElement.remove(),n.forEach(r=>{o.append(r)}),n.length){this._backgroundElement?.firstChild?.appendChild(o),n[n.length-1].id="f-background-pattern-"+NL++;let r=n[n.length-1].id,a=bo("rect",this._browser);a.setAttribute("fill","url(#"+r+")"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),this._backgroundElement?.firstChild?.appendChild(a);let s=this._store.fCanvas?.transform||Xn.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||Cs)};static \u0275prov=y({token:Cs,factory:Cs.\u0275fac})};return t=I([E(Ld)],t),t})(),br=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(i){this.fTransform=i}},LL=(()=>{let t=class xs{_store=p(A);handle(e){this._store.instances.get(We.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||xs)};static \u0275prov=y({token:xs,factory:xs.\u0275fac})};return t=I([E(br)],t),t})(),BL=[AL,LL],zd=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(i){this.instance=i}},VL=(()=>{let t=class ws{_store=p(A);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||ws)};static \u0275prov=y({token:ws,factory:ws.\u0275fac})};return t=I([E(zd)],t),t})(),Hd=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(i,e){this.id=i,this.animated=e}},zL=(()=>{let t=class Ts{_store=p(A);_mediator=p(B);get _transform(){return this._store.transform}handle({id:e,animated:n}){let o=this._store.nodes.get(e);o&&(this._toCenter(this._getNodeRect(o),this._getFlowRect(),o._position),this._mediator.execute(new Co(n,Mi.VIEWPORT_ONLY)))}_toCenter(e,n,o){this._transform.scaledPosition=H.initialize(),this._transform.position=H.initialize((n.width-e.width)/2-o.x*this._transform.scale,(n.height-e.height)/2-o.y*this._transform.scale)}_getNodeRect(e){return ne.fromElement(e.hostElement)}_getFlowRect(){return ne.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||Ts)};static \u0275prov=y({token:Ts,factory:Ts.\u0275fac})};return t=I([E(Hd)],t),t})(),qd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(i,e){this.toCenter=i,this.animated=e}},HL=(()=>{let t=class Ss{_store=p(A);get _transform(){return this._store.transform}_mediator=p(B);handle({toCenter:e,animated:n}){let o=this._mediator.execute(new Eo)||ne.initialize();o.width===0||o.height===0||(this.fitToParent(o,ne.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Co(n,Mi.VIEWPORT_ONLY)))}fitToParent(e,n,o,r){this._transform.scaledPosition=H.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);let a=e.width/this._transform.scale+r.x,s=e.height/this._transform.scale+r.y;(a>n.width||s>n.height||a<n.width&&s<n.height)&&(this._transform.scale=Math.min(n.width/a,n.height/s));let c=(n.width-a*this._transform.scale)/2-this._transform.position.x*this._transform.scale,u=(n.height-s*this._transform.scale)/2-this._transform.position.y*this._transform.scale;this._transform.position=H.initialize(c+r.x/2*this._transform.scale,u+r.y/2*this._transform.scale)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return H.initialize(n,o)}static \u0275fac=function(n){return new(n||Ss)};static \u0275prov=y({token:Ss,factory:Ss.\u0275fac})};return t=I([E(qd)],t),t})(),Gd=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(i,e){this.transform=i,this.position=e}},qL=(()=>{let t=class ks{_store=p(A);handle({transform:e,position:n}){n&&(H.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=H.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return H.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||ks)};static \u0275prov=y({token:ks,factory:ks.\u0275fac})};return t=I([E(Gd)],t),t})(),jd=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(i,e){this.transform=i,this.scale=e}},GL=(()=>{let t=class Is{_store=p(A);handle(e){!e.scale&&e.scale!==0||(e.transform.scale=e.scale,this._store.fCanvas?.redraw())}static \u0275fac=function(n){return new(n||Is)};static \u0275prov=y({token:Is,factory:Is.\u0275fac})};return t=I([E(jd)],t),t})(),Mi=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Mi||{}),Co=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(i,e=Mi.WITH_CONNECTION_CHANGES){this.animated=i,this.context=e}};function my(t,i){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),i(n))};t.addEventListener("transitionend",e)}var jL=(()=>{let t=class Es{_store=p(A);get _canvas(){return this._store.fCanvas}handle(e){e.animated?this._redrawWithAnimation(e.context):this._redraw(e.context),this._canvas?.emitCanvasChangeEvent()}_redrawWithAnimation(e){this._store.beginViewportAnimation(),this._canvas?.redrawWithAnimation(),my(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Mi.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Mi.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Es)};static \u0275prov=y({token:Es,factory:Es.\u0275fac})};return t=I([E(Co)],t),t})(),Ud=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},UL=(()=>{let t=class Ms{_store=p(A);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Ms)};static \u0275prov=y({token:Ms,factory:Ms.\u0275fac})};return t=I([E(Ud)],t),t})(),$d=class{static fToken=Symbol("ResetScaleRequest")},$L=(()=>{let t=class Ds{_store=p(A);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=H.initialize()}static \u0275fac=function(n){return new(n||Ds)};static \u0275prov=y({token:Ds,factory:Ds.\u0275fac})};return t=I([E($d)],t),t})(),Wd=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(i){this.animated=i}},WL=(()=>{let t=class Ps{_mediator=p(B);_store=p(A);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Eo)||ne.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,ne.fromElement(this._store.flowHost),this._store.nodes.getAll().map(o=>o._position)),this._mediator.execute(new Co(e,Mi.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,o){this._transform.scaledPosition=H.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);let r=(n.width-e.width/this._transform.scale)/2-this._transform.position.x,a=(n.height-e.height/this._transform.scale)/2-this._transform.position.y;this._transform.scale=1,this._transform.position=H.initialize(r,a)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return H.initialize(n,o)}static \u0275fac=function(n){return new(n||Ps)};static \u0275prov=y({token:Ps,factory:Ps.\u0275fac})};return t=I([E(Wd)],t),t})(),Kd=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(i,e){this.scale=i,this.toPosition=e}},KL=(()=>{let t=class Rs{_store=p(A);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let o=H.sum(this._transform.scaledPosition,this._transform.position),r=n.x-(n.x-o.x)*e/this._transform.scale,a=n.y-(n.y-o.y)*e/this._transform.scale;this._transform.scale=e,this._transform.scaledPosition=H.sub(H.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||Rs)};static \u0275prov=y({token:Rs,factory:Rs.\u0275fac})};return t=I([E(Kd)],t),t})(),YL=[VL,zL,HL,qL,GL,jL,UL,$L,WL,KL],pm=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(i){this.connection=i}},XL=(()=>{let t=class Os{_store=p(A);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||Os)};static \u0275prov=y({token:Os,factory:Os.\u0275fac})};return t=I([E(pm)],t),t})(),Yd=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(i){this.instance=i}},ZL=(()=>{let t=class Fs{_store=p(A);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Fs)};static \u0275prov=y({token:Fs,factory:Fs.\u0275fac})};return t=I([E(Yd)],t),t})(),Xd=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(i){this.connection=i}},QL=(()=>{let t=class Ns{_store=p(A);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ns)};static \u0275prov=y({token:Ns,factory:Ns.\u0275fac})};return t=I([E(Xd)],t),t})(),hm=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(i){this.connection=i}},JL=(()=>{let t=class As{_store=p(A);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||As)};static \u0275prov=y({token:As,factory:As.\u0275fac})};return t=I([E(hm)],t),t})(),xo=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(i){this.connection=i}},Gb=new ve("F_CONNECTION_CONTENT");var Zd=class t{points;cumulativeLengths;segmentTangents;totalLength;constructor(i){let e=t._removeConsecutiveDuplicates(i);if(e.length<2){this.points=[{x:0,y:0},{x:1,y:0}],this.cumulativeLengths=[0,1],this.segmentTangents=[{x:1,y:0}],this.totalLength=1;return}this.points=e;let n=this.points.length,o=n-1,r=new Array(n).fill(0),a=new Array(o),s=0;for(let c=0;c<o;c++){let u=this.points[c+1].x-this.points[c].x,h=this.points[c+1].y-this.points[c].y,g=Math.hypot(u,h),C=g?u/g:1,M=g?h/g:0;a[c]={x:C,y:M},s+=g,r[c+1]=s}this.cumulativeLengths=r,this.segmentTangents=a,this.totalLength=s||1}static from(i){return new t(i.map(e=>({x:e.x,y:e.y})))}static _removeConsecutiveDuplicates(i){let e=[];for(let n of i){let o=e[e.length-1];(!o||o.x!==n.x||o.y!==n.y)&&e.push({x:n.x,y:n.y})}return e}},fm=class t{_polyline;constructor(i=[]){this._polyline=new Zd(i)}updatePoints(i){return this._polyline=new Zd(i),this._polyline.totalLength}calculateTotalLength(i){return this.updatePoints(i)}get totalLength(){return this._polyline.totalLength}getPointAtProgress(i){let{points:e,cumulativeLengths:n,segmentTangents:o,totalLength:r}=this._polyline,s=t._clamp(i,0,1)*r,c=.5;if(s<=c)return{point:e[0],tangent:o[0]??{x:1,y:0},atEdge:!0};if(r-s<=c){let J=e.length-1;return{point:e[J],tangent:o[J-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),h=Math.max(1,u),g=n[h-1],C=n[h],M=t._safeRatio(s-g,C-g),S=e[h-1],N=e[h],q={x:t._lerp(S.x,N.x,M),y:t._lerp(S.y,N.y,M)},$=o[h-1]??{x:1,y:0};return{point:q,tangent:$,atEdge:!1}}getPointAtLength(i){return this.getPointAtProgress(i)}getPointAtDistance(i){let e=this._polyline.totalLength?i/this._polyline.totalLength:0;return this.getPointAtProgress(e)}static _findRightIndex(i,e){let n=0,o=i.length-1;for(;n<o;){let r=n+o>>1;i[r]<e?n=r+1:o=r}return n}static _lerp(i,e,n){return i+(e-i)*n}static _clamp(i,e,n){return i<e?e:i>n?n:i}static _safeRatio(i,e){let n=Math.abs(e)<1e-6?1e-6:e;return i/n}},_y=(function(t){return t.NONE="none",t.ALONG="along",t})(_y||{}),mm=class{compute(i,e){let n=this._clamp01(e.position()),{point:o,tangent:r}=i.getPointAtLength(n),a={x:-r.y,y:r.x},s=e.offset()??0,c=o.x+a.x*s,u=o.y+a.y*s,g=this._sizeAlongDirection(e.hostElement,r)*.5,C=n*i.totalLength,M=i.totalLength-C,S=this._applyEdgeGuard(c,u,r,C,M,g),N=this._calculateContentRotation(e.align(),r);return{position:S,rotationDeg:N}}_clamp01(i){return i<=0?0:i>=1?1:i}_applyEdgeGuard(i,e,n,o,r,a){if(o<=a){let s=a-o;return{x:i+n.x*s,y:e+n.y*s}}if(r<=a){let s=a-r;return{x:i-n.x*s,y:e-n.y*s}}return{x:i,y:e}}_sizeAlongDirection(i,e){let n=ne.fromElement(i);return Math.abs(e.x)*n.width+Math.abs(e.y)*n.height}_normalize180(i){let e=(i+180)%360;return e<0&&(e+=360),e-180}_keepUpright(i){let e=this._normalize180(i);return e>90?e-=180:e<-90&&(e+=180),e}_calculateContentRotation(i,e){let n=0;return i===_y.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},_m=class{_placement;constructor(i=new mm){this._placement=i}layout(i,e){let n=new fm(i),o=n.totalLength;for(let r of e){let{position:a,rotationDeg:s}=this._placement.compute(n,r);r.hostElement.style.transform=this._createTransformString(a,s)}return o}_createTransformString(i,e){return`translate3d(${i.x}px, ${i.y}px, 0) translate(-50%, -50%) rotate(${e}deg)`}};var jb=new ve("F_CONNECTION_WAYPOINTS");function gy(t,i,e){return(t.x-i.x)**2+(t.y-i.y)**2<=e**2}function e5(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(o=>gy(i,o,n))}function t5(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(o=>gy(i,o,n))}function n5(t,i){for(let e of t){let n=t5(e,i);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let o=e5(e,i);if(o&&e.fWaypoints()?.visibility())return{connection:e,candidate:o}}}var mh=new ve("F_CONNECTION_COMPONENTS_PARENT");var Le=(function(t){return t.START="f-connection-marker-start",t.END="f-connection-marker-end",t.SELECTED_START="f-connection-selected-marker-start",t.SELECTED_END="f-connection-selected-marker-end",t.START_ALL_STATES="f-connection-marker-start-all-states",t.END_ALL_STATES="f-connection-marker-end-all-states",t})(Le||{}),Qd=new ve("F_CONNECTION_MARKER"),i5=0,Jd=class{fId=W(`f-marker-${i5++}`);hostElement=p(Ye).nativeElement};function vy(t,i=Le.START){if(typeof t!="string")return i;let e=t.trim().toLowerCase();return e?o5(e)??i:i}function o5(t){switch(t){case"start":case"f-connection-marker-start":return Le.START;case"end":case"f-connection-marker-end":return Le.END;case"selected-start":case"f-connection-selected-marker-start":return Le.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return Le.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return Le.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return Le.END_ALL_STATES;default:return null}}var by=(()=>{class t extends Jd{_markerElement=nt.required("markerElement");_type=V(Le.END_ALL_STATES,{alias:"type",transform:e=>vy(e,Le.END_ALL_STATES)});get markerElement(){return this._markerElement().nativeElement}width=6;height=7;refX=5.5;refY=3.5;get type(){return this._type()}orient="auto";markerUnits="strokeWidth";static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,o){n&1&&dn(o._markerElement,oL,5),n&2&&Vt()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[Me([{provide:Qd,useExisting:t}]),Z],decls:3,vars:0,consts:[["markerElement",""],["viewBox","0 0 6 6",1,"f-marker"],["d","M0,0 L6,3 0,6Z"]],template:function(n,o){n&1&&(X(),Q(0,"svg",1,0),oe(2,"path",2),ie())},encapsulation:2})}return t})();var yy=(()=>{class t extends Jd{_mediator=p(B);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=Le.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new Yd(this))}ngOnDestroy(){this._mediator.execute(new xu(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,selectors:[["svg","fMarker",""]],hostAttrs:[1,"f-component","f-marker"],inputs:{width:"width",height:"height",refX:"refX",refY:"refY",type:[2,"type","type",e=>vy(e,Le.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[Me([{provide:Qd,useExisting:t}]),Z]})}return t})(),Jn=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(Jn||{}),$e=(function(t){return t.DEFAULT="default",t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t})($e||{});function r5({sourceRect:t,targetRect:i}){return{point1:t.gravityCenter,point2:i.gravityCenter}}var j=(function(t){return t.LEFT="left",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t.AUTO="auto",t})(j||{}),_o=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(_o||{});function a5({sourceRect:t,sourceConnectableSide:i,targetRect:e,targetConnectableSide:n}){return{point1:Ub(t,i===j.AUTO?j.BOTTOM:i),point2:Ub(e,n===j.AUTO?j.TOP:n)}}function Ub(t,i){switch(i){case j.TOP:return{x:t.x+t.width/2,y:t.y};case j.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case j.LEFT:return{x:t.x,y:t.y+t.height/2};case j.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${i}`)}}function Cy(t,i,e,n){if(!n||!n.rotationDeg)return fo.getRoundedRectIntersections(t,i,e)[0];let o=Ls(t,-n.rotationDeg,n.pivot),r=Ls(i,-n.rotationDeg,n.pivot),a=s5(e,-n.rotationDeg,n.pivot),s=fo.getRoundedRectIntersections(o,r,a)[0];return s?Ls(s,n.rotationDeg,n.pivot):void 0}function s5(t,i,e){let n=Ls(l5(t),i,e);return new rt(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function l5(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Ls(t,i,e){let n=t.x-e.x,o=t.y-e.y,r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:n*a-o*s+e.x,y:n*s+o*a+e.y}}function c5({sourceRect:t,targetRect:i,sourceRotationContext:e,targetRotationContext:n}){return p5(d5(t,i,e),u5(t,i,n),t,i)}function d5(t,i,e){return Cy(t.gravityCenter,i.gravityCenter,t,e)}function u5(t,i,e){return Cy(i.gravityCenter,t.gravityCenter,i,e)}function p5(t,i,e,n){return{point1:t||e.gravityCenter,point2:i||n.gravityCenter}}var ps=.5,h5={[Jn.FLOATING]:c5,[Jn.FIXED_CENTER]:r5,[Jn.FIXED]:a5},Fo=(()=>{class t{handle(e){let n=this._calculateDirectionalVectors(e.sourceRect.gravityCenter.x,e.sourceRect.gravityCenter.y,e.targetRect.gravityCenter.x,e.targetRect.gravityCenter.y),o=this._determineSourceSide(e,n),r=this._determineTargetSide(e,n);return e.connection._applyResolvedSidesToConnection(o,r),this._getBehaviorHandler(e.connection.fBehavior)({sourceRect:e.sourceRect,targetRect:e.targetRect,sourceConnectableSide:o,targetConnectableSide:r,sourceRotationContext:e.sourceRotationContext,targetRotationContext:e.targetRotationContext})}_calculateDirectionalVectors(e,n,o,r){let a=o-e,s=r-n;return{sourceToTargetX:a,sourceToTargetY:s,targetToSourceX:-a,targetToSourceY:-s}}_determineSourceSide(e,n){return this._resolveConnectableSide(e.connection.fOutputSide(),n.sourceToTargetX,n.sourceToTargetY,e.sourceConnectableSide)}_determineTargetSide(e,n){return this._resolveConnectableSide(e.connection.fInputSide(),n.targetToSourceX,n.targetToSourceY,e.targetConnectableSide)}_resolveConnectableSide(e,n,o,r){if(e===$e.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(o);if(a<ps&&s<ps)return r;let u=a>=s;switch(e){case $e.CALCULATE:return u?n>=0?j.RIGHT:j.LEFT:o>=0?j.BOTTOM:j.TOP;case $e.CALCULATE_HORIZONTAL:return a<ps?r:n>=0?j.RIGHT:j.LEFT;case $e.CALCULATE_VERTICAL:return s<ps?r:o>=0?j.BOTTOM:j.TOP;case $e.TOP:return j.TOP;case $e.BOTTOM:return j.BOTTOM;case $e.LEFT:return j.LEFT;case $e.RIGHT:return j.RIGHT;default:return r}}_getBehaviorHandler(e){let n=h5[e];if(!n)throw new Error(`[Behavior] No handler for behavior: ${e}`);return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),_n=class{sourceRect;targetRect;connection;sourceConnectableSide;targetConnectableSide;sourceRotationContext;targetRotationContext;constructor(i,e,n,o,r,a,s){this.sourceRect=i,this.targetRect=e,this.connection=n,this.sourceConnectableSide=o,this.targetConnectableSide=r,this.sourceRotationContext=a,this.targetRotationContext=s}};function _h(t,i,e){return[t,...e??[],i]}function f5(t,i){let e=Math.abs(i.x-t.x)/2,n=i.x<t.x?i.x+e:i.x-e,o=Math.abs(i.y-t.y)/2,r=i.y<t.y?i.y+o:i.y-o;return{x:n,y:r}}function m5(t,i=32){let e=new Array(i+1);e[0]=me({},t[0]);for(let n=1;n<=i;n++)e[n]=xy(t[0],t[1],t[2],t[3],n/i);return e}function xy(t,i,e,n,o){let r=1-o,a=o*o,s=r*r,c=s*r,u=a*o;return{x:c*t.x+3*s*o*i.x+3*r*a*e.x+u*n.x,y:c*t.y+3*s*o*i.y+3*r*a*e.y+u*n.y}}function wy(t){return t.map(i=>xy(i.p0,i.c1,i.c2,i.p3,.5))}function _5(t){if(t.length<2)throw new Error("Polylines must be at least two points");let i=g5(t);return i<=0?[me({},t[0])]:[v5(t,i/2)]}function g5(t){let i=0;for(let e=0;e<t.length-1;e++)i+=Ty(t[e],t[e+1]);return i}function v5(t,i){let e=0;for(let o=0;o<t.length-1;o++){let r=t[o],a=t[o+1],s=Ty(r,a);if(!(s<=0)){if(e+s>=i){let c=(i-e)/s;return{x:r.x+(a.x-r.x)*c,y:r.y+(a.y-r.y)*c}}e+=s}}let n=t[t.length-1];return{x:n.x,y:n.y}}function Ty(t,i){return Math.hypot(i.x-t.x,i.y-t.y)}function b5(t){let i=[];for(let e of t)for(let n of e){let o=i[i.length-1];(!o||o.x!==n.x||o.y!==n.y)&&i.push(n)}return i}function Sy(t){if(!t.length)return"";let i=`M ${t[0].p0.x} ${t[0].p0.y}`;for(let e=0;e<t.length;e++){let n=t[e],o=e===t.length-1,r=o?n.p3.x+2e-4:n.p3.x,a=o?n.p3.y+2e-4:n.p3.y;i+=` C ${n.c1.x} ${n.c1.y}, ${n.c2.x} ${n.c2.y}, ${r} ${a}`}return i}function ky(t,i=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let o=t[n],r=m5([o.p0,o.c1,o.c2,o.p3],i);n>0&&r.shift(),e.push(...r)}return e}function y5(t,i=1e-6){let e=t.length;if(e<=2)return t;let n=[];n.push(t[0]);for(let r=1;r<e;r++){let a=t[r],s=n[n.length-1];(Math.abs(a.x-s.x)>i||Math.abs(a.y-s.y)>i)&&n.push(a)}if(n.length<=2)return n;let o=[];o.push(n[0]);for(let r=1;r<n.length-1;r++){let a=o[o.length-1],s=n[r],c=n[r+1],u=Math.abs(a.x-s.x)<=i&&Math.abs(s.x-c.x)<=i,h=Math.abs(a.y-s.y)<=i&&Math.abs(s.y-c.y)<=i;!u&&!h&&o.push(s)}return o.push(n[n.length-1]),o}var gm=class t{static _dir(i){switch(i){case j.LEFT:return{x:-1,y:0};case j.RIGHT:return{x:1,y:0};case j.TOP:return{x:0,y:-1};case j.BOTTOM:return{x:0,y:1};case j.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(i){return i===j.LEFT||i===j.RIGHT}static _handleLength(i,e,n,o){let r=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y),s=Math.hypot(r,a),c=n===j.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,o),h=o+.5*s,g=o*1.05+c*.3;return Math.min(h,Math.max(u,g))}static _softControl(i,e,n,o){let r=this._dir(i),a=n.x-e.x,s=n.y-e.y,c=Math.hypot(a,s)||1,u=a/c,h=s/c;if(i===j.AUTO)return{x:e.x+u*o,y:e.y+h*o};let g=r.x*u+r.y*h,C=.12,M=Math.max(0,-g)*.08,S=Math.min(.2,C+M),N=r.x*(1-S)+u*S,q=r.y*(1-S)+h*S,$=Math.hypot(N,q)||1;return{x:e.x+N/$*o,y:e.y+q/$*o}}handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=_h(i,n,a),u=[];for(let g=0;g<c.length-1;g++){let C=c[g],M=c[g+1],S=t._handleLength(C,M,e,s),N=t._handleLength(M,C,o,s),q=t._softControl(e,C,M,S),$=t._softControl(o,M,C,N);u.push({p0:C,c1:q,c2:$,p3:M,chainIndex:g})}let h=ky(u,12);return{path:Sy(u),secondPoint:u[0]?.c1??i,penultimatePoint:u[u.length-1]?.c2??n,points:h,candidates:wy(u)}}},vm=class{handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=_h(i,n,a),c=[];for(let h=0;h<s.length-1;h++){let g=s[h],C=s[h+1],M=$b(e,g,C,r??0),S=$b(o,C,g,r??0);c.push({p0:g,c1:M,c2:S,p3:C,chainIndex:h})}let u=ky(c,12);return{path:Sy(c),secondPoint:c[0]?.c1??i,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:wy(c)}}};function $b(t,i,e,n){let o={x:i.x,y:i.y};switch(t){case j.LEFT:o.x-=hs(i.x-e.x,n);break;case j.RIGHT:o.x+=hs(e.x-i.x,n);break;case j.TOP:o.y-=hs(i.y-e.y,n);break;case j.BOTTOM:o.y+=hs(e.y-i.y,n);break;case j.AUTO:break}return o}function hs(t,i){return t>=i?t:i*Math.sqrt(i-t)}function C5(t){let{axis:i,source:e,target:n,sourceSide:o,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:h,offset:g,sourceGapOffset:C,targetGapOffset:M}=t,S=x5(a,s),N=w5(i,c,h,S);return o===r?T5(i,e,n,g,c,h,a,s,C,M):N=S5(i,c,u,a,s,S,N),N}function x5(t,i){return{sourceTarget:[{x:t.x,y:i.y}],targetSource:[{x:i.x,y:t.y}]}}function w5(t,i,e,n){return t==="x"?i.x===e?n.targetSource:n.sourceTarget:i.y===e?n.sourceTarget:n.targetSource}function T5(t,i,e,n,o,r,a,s,c,u){let h=Math.abs(i[t]-e[t]);if(h>n)return;let g=Math.min(n-1,n-h);g<=0||(o[t]===r?c[t]=(a[t]>i[t]?-1:1)*g:u[t]=(s[t]>e[t]?-1:1)*g)}function S5(t,i,e,n,o,r,a){let s=t==="x"?"y":"x",c=i[t]===e[s],u=n[s]>o[s],h=n[s]<o[s];return i[t]===1&&(!c&&u||c&&h)||i[t]!==1&&(!c&&h||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var gr=1e-6,Wb=2e-4,k5=.75;function I5(t,i){let e=t.length,n=[];n.push(`M ${t[0].x} ${t[0].y}`);for(let r=1;r<e-1;r++)n.push(E5(t[r-1],t[r],t[r+1],i));let o=t[e-1];return n.push(`L ${o.x+Wb} ${o.y+Wb}`),n.join(" ")}function E5(t,i,e,n){let o=i.x,r=i.y;if(n<=0)return`L ${o} ${r}`;let a=Math.abs(t.x-o)<=gr&&Math.abs(o-e.x)<=gr,s=Math.abs(t.y-r)<=gr&&Math.abs(r-e.y)<=gr;if(a||s)return`L ${o} ${r}`;let c=Math.hypot(o-t.x,r-t.y),u=Math.hypot(e.x-o,e.y-r),h=Math.min(c*.5,u*.5,n);if(h<k5)return`L ${o} ${r}`;if(Math.abs(t.y-r)<=gr){let q=t.x<e.x?-1:1,$=t.y<e.y?1:-1,J=o+h*q,ce=r+h*$;return`L ${J} ${r} Q ${o} ${r} ${o} ${ce}`}let C=t.x<e.x?1:-1,M=t.y<e.y?-1:1,S=r+h*M,N=o+h*C;return`L ${o} ${S} Q ${o} ${r} ${N} ${r}`}var Kb={[j.LEFT]:H.initialize(-1,0),[j.RIGHT]:H.initialize(1,0),[j.TOP]:H.initialize(0,-1),[j.BOTTOM]:H.initialize(0,1),[j.AUTO]:H.initialize(0,0)},bm=class{handle({source:i,sourceSide:e,target:n,targetSide:o,waypoints:r,offset:a,radius:s}){let c=_h(i,n,r),u=[],h=[];for(let S=0;S<c.length-1;S++){let N=c[S],q=c[S+1],$=this._getPathPoints(N,e,q,o,a??0);u.push($),h.push(..._5($))}let g=y5(b5(u)),C=g.length>1?g[g.length-2]:i,M=g.length>1?g[1]:n;return{path:I5(g,s??0),penultimatePoint:C,secondPoint:M,points:g,candidates:h}}_getPathPoints(i,e,n,o,r){let a=Kb[e],s=Kb[o],c={x:i.x+a.x*r,y:i.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},h=this._getDirection(c,e,u),g=h.x!==0?"x":"y",C=h[g],M=[],S=H.initialize(),N=H.initialize(),q=f5(i,n);if(a[g]*s[g]===-1){let $=[{x:q.x,y:c.y},{x:q.x,y:u.y}],J=[{x:c.x,y:q.y},{x:u.x,y:q.y}];a[g]===C?M=g==="x"?$:J:M=g==="x"?J:$}else M=C5({axis:g,source:i,target:n,sourceSide:e,targetSide:o,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:C,offset:r,sourceGapOffset:S,targetGapOffset:N});return[i,{x:c.x+S.x,y:c.y+S.y},...M,{x:u.x+N.x,y:u.y+N.y},n]}_getDirection(i,e,n){return e===j.LEFT||e===j.RIGHT?i.x<n.x?H.initialize(1,0):H.initialize(-1,0):i.y<n.y?H.initialize(0,1):H.initialize(0,-1)}},Yb=2e-4,ym=class{handle(i){let e=_h(i.source,i.target,i.waypoints),n=e.length,o=e[0],r=`M ${o.x} ${o.y}`,a=new Array(n-1);for(let s=0;s<n-1;s++){let c=e[s],u=e[s+1],h=s===n-2,g=h?u.x+Yb:u.x,C=h?u.y+Yb:u.y;r+=` L ${g} ${C}`,a[s]={x:(c.x+u.x)*.5,y:(c.y+u.y)*.5}}return{path:r,candidates:a,points:e,secondPoint:e[1]??i.target,penultimatePoint:e[n-2]??i.source}}},M5=new ve("F_CONNECTION_BUILDERS"),Iy=(()=>{class t{_builtinBuilders={[_o.STRAIGHT]:new ym,[_o.BEZIER]:new vm,[_o.ADAPTIVE_CURVE]:new gm,[_o.SEGMENT]:new bm};_providedBuilders;_builders;constructor(){this._providedBuilders=p(M5,{optional:!0})||{},this._builders=me(me({},this._builtinBuilders),this._providedBuilders)}handle({type:e,payload:n}){let o=this._builders[e];if(!o)throw this._createBuilderNotFoundError(e);return o.handle(n)}_createBuilderNotFoundError(e){let n=Object.keys(this._builtinBuilders).sort(),o=Object.keys(this._providedBuilders).sort(),r=Object.keys(this._builders).sort(),a=n.filter(c=>c in this._providedBuilders).sort(),s=[`Connection Builder Error: builder type "${e}" not found.`,`Registered types: ${r.length?r.join(", "):"(none)"}`,`Built-in types: ${n.length?n.join(", "):"(none)"}`,`Provided (F_CONNECTION_BUILDERS) types: ${o.length?o.join(", "):"(none)"}`,a.length?`Overridden built-ins: ${a.join(", ")}`:null,"Tip: ensure you pass a valid Connection Type or provide a builder via F_CONNECTION_BUILDERS."].filter(Boolean);return new Error(s.join(`
1569
- `))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function D5(t,i,e){return Fn("connection_"+t+i+e)}function P5(t,i,e){return Fn("connection_for_selection_"+t+i+e)}function Ey(t){return Fn("connection_gradient_"+t)}function R5(t){return`url(#${Ey(t)})`}var O5=(()=>{class t{_connection=p(mh);_hostElement=p(Ye).nativeElement;_injector=p(ft);_hostAttributes=new Map;_startColor;_endColor;gradientId=k(()=>Ey(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){de(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),Xt(()=>{this._updateGradient()})},{injector:this._injector})}get stop1Element(){return this._hostElement.children.item(0)}get stop2Element(){return this._hostElement.children.item(1)}redraw(e){let n=e.point2.x-e.point1.x,o=e.point2.y-e.point1.y,r=Math.sqrt(n*n+o*o)||.01,a=new he(.5-.5*n/r,.5-.5*o/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new he(.5+.5*n/r,.5+.5*o/r);this._setHostAttribute("x2",s.x.toString()),this._setHostAttribute("y2",s.y.toString()),this._updateGradient()}_updateGradient(){let e=this.gradient();this._setFromColor(e.fStartColor()),this._setToColor(e.fEndColor())}_setFromColor(e){let n=e||"transparent";this._startColor!==n&&(this._startColor=n,this.stop1Element.setAttribute("stop-color",n),this.stop1Element.style.setProperty("stop-color",n))}_setToColor(e){let n=e||"transparent";this._endColor!==n&&(this._endColor=n,this.stop2Element.setAttribute("stop-color",n),this.stop2Element.style.setProperty("stop-color",n))}_setHostAttribute(e,n){this._hostAttributes.get(e)!==n&&(this._hostAttributes.set(e,n),this._hostElement.setAttribute(e,n))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,standalone:!1})}return t})(),Cm=(()=>{class t extends O5{gradient=V.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["linearGradient","fConnectionGradientRenderer",""]],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.gradientId())},inputs:{gradient:[1,"fConnectionGradientRendererFor","gradient"]},features:[Z],attrs:rL,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,o){n&1&&(Ga(0,0),X(),oe(1,"stop",1)(2,"stop",2),ja())},encapsulation:2,changeDetection:0})}return t})(),Xb=new ve("F_CONNECTION_GRADIENT");var xm=new ve("F_CONNECTION_PATH"),wm=class{hostElement=p(Ye).nativeElement},F5=(()=>{class t extends wm{_connection=p(mh);useGradient=V(!1);linkToGradient=k(()=>this.useGradient()?R5(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return D5(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}initialize(){this.deselect()}setPath(e){this.hostElement.setAttribute("d",`${e}`)}select(){this.hostElement.setAttribute("marker-start",`url(#${L5(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${B5(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${N5(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${A5(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["path","f-connection-path",""]],hostAttrs:[1,"f-component","f-connection-path"],hostVars:4,hostBindings:function(n,o){n&2&&(O("id",o.attrConnectionId)("data-f-path-id",o.fPathId),Oe("stroke",o.linkToGradient()))},inputs:{useGradient:[1,"useGradient"]},standalone:!1,features:[Me([{provide:xm,useExisting:t}]),Z],attrs:aL,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function N5(t){return Fn(`f-connection-marker-start-${t}`)}function A5(t){return Fn(`f-connection-marker-end-${t}`)}function L5(t){return Fn(`f-connection-selected-marker-start-${t}`)}function B5(t){return Fn(`f-connection-selected-marker-end-${t}`)}var Tm=new ve("F_CONNECTION_SELECTION"),Sm=class{hostElement=p(Ye).nativeElement},V5=(()=>{class t extends Sm{_connection=p(mh);get connectionForSelectionId(){return P5(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}setPath(e){this.hostElement.setAttribute("d",`${e}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["path","fConnectionSelection",""]],hostAttrs:[1,"f-component","f-connection-selection"],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.connectionForSelectionId)},standalone:!1,features:[Me([{provide:Tm,useExisting:t}]),Z],attrs:sL,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),km=new ve("F_CONNECTION_DRAG_HANDLE_END"),Im=new ve("F_CONNECTION_DRAG_HANDLE_START"),eu=class{hostElement=p(Ye).nativeElement;point=H.initialize();class="f-connection-drag-handle";calculateCircleCenter(i,e,n){let o={x:e.x-i.x,y:e.y-i.y},r=Math.sqrt(o.x*o.x+o.y*o.y)||1,a={x:o.x/r,y:o.y/r},s={x:a.x*n,y:a.y*n};return{x:e.x-s.x,y:e.y-s.y}}},z5=(()=>{class t extends eu{redraw(e,n){this.point=this.calculateCircleCenter(e,n,8),this.hostElement.setAttribute("cx",this.point.x.toString()),this.hostElement.setAttribute("cy",this.point.y.toString())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,o){n&2&&G(o.class)},standalone:!1,features:[Me([{provide:Im,useExisting:t}]),Z],attrs:lL,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),H5=(()=>{class t extends eu{redraw(e,n){this.point=this.calculateCircleCenter(e,n,8),this.hostElement.setAttribute("cx",this.point.x.toString()),this.hostElement.setAttribute("cy",this.point.y.toString())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,o){n&2&&G(o.class)},standalone:!1,features:[Me([{provide:km,useExisting:t}]),Z],attrs:cL,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),tm="f-selected";function My(t){return class extends t{fId=W("");fSelectionDisabled=W(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(tm)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(tm)}isSelected(){return this.hostElement.classList.contains(tm)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...i){super(...i)}}}function q5(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...i){super(...i)}}}var G5=My(q5(class{hostElement;constructor(t){this.hostElement=t}})),j5=(()=>{class t extends G5{_fConnectionBuilder=p(Iy);path="";line=mr.initialize();fReassignableStart=W(!1);fDraggingDisabled=W(!1);fSelectionDisabled=W(!1);fDefs=nt.required("defs");fPath=nt.required(xm);fDragHandleStart=nt(Im);fDragHandleEnd=nt.required(km);fSelection=nt.required(Tm);fContents=vf(Gb,{descendants:!0});fMarkers=vf(Qd,{descendants:!0});fGradient=$a(Xb);_fGradientRenderer=nt(Cm);fWaypoints=$a(jb);fInputSide=W($e.DEFAULT);_contentLayoutEngine=new _m;_sourceSide=j.AUTO;fOutputSide=W($e.DEFAULT);_targetSide=j.AUTO;_penultimatePoint=H.initialize();_secondPoint=H.initialize();constructor(){super(p(Ye).nativeElement)}initialize(){this.redraw(),this.isSelected()?this.markChildrenAsSelected():this.unmarkChildrenAsSelected()}isContains(e){return(this.hostElement.firstChild?.lastChild).contains(e)||Array.from(this.fContents()?.values()??[]).some(n=>n.hostElement?.contains(e))||this.fWaypoints()?.hostElement?.contains(e)}setLine({point1:e,point2:n}){this.line=mr.initialize(e,n);let{path:o,points:r,penultimatePoint:a,secondPoint:s,candidates:c}=this._getPathResult(e,n);this.path=o,this._penultimatePoint=a||e,this._secondPoint=s||n,this.fWaypoints()?.candidates.set(c||[]),this._contentLayoutEngine.layout(r||[],this._contents())}_contents(){return Array.from(this.fContents()?.values()??[])}_getPathResult(e,n){return this._fConnectionBuilder.handle({type:this.fType,payload:{source:e,sourceSide:this._sourceSide,target:n,targetSide:this._targetSide,radius:this.fRadius,offset:this.fOffset,waypoints:this.fWaypoints()?.waypoints()||[]}})}markChildrenAsSelected(){this.fPath().select()}unmarkChildrenAsSelected(){this.fPath().deselect()}redraw(){this.fPath().setPath(this.path),this.fSelection().setPath(this.path),this.fDragHandleEnd().redraw(this._penultimatePoint,this.line.point2),this.fDragHandleStart()?.redraw(this._secondPoint,this.line.point1),this._fGradientRenderer()?.redraw(this.line)}getResolvedSides(){return{sourceSide:this._sourceSide,targetSide:this._targetSide}}_applyResolvedSidesToConnection(e,n){this._sourceSide=e,this._targetSide=n}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,contentQueries:function(n,o,r){n&1&&_f(r,o.fContents,Gb,5)(r,o.fMarkers,Qd,5)(r,o.fGradient,Xb,5)(r,o.fWaypoints,jb,5),n&2&&Vt(4)},viewQuery:function(n,o){n&1&&dn(o.fDefs,dL,5)(o.fPath,xm,5)(o.fDragHandleStart,Im,5)(o.fDragHandleEnd,km,5)(o.fSelection,Tm,5)(o._fGradientRenderer,Cm,5),n&2&&Vt(6)},standalone:!1,features:[Z]})}return t})(),U5=(()=>{let t=class Bs{_browser=p(at);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),o=e.fDefs();if(!o)return!1;let r=$5(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===o.nativeElement)return!1;let s=Py("defs",this._browser);return n.forEach(c=>{Dy(c.type).forEach(u=>{let h=W5(u,c,e.fId(),this._browser),g=c.markerElement.cloneNode(!0);g.setAttribute("height",`${c.height}`),g.setAttribute("width",`${c.width}`),g.removeAttribute("markerUnits"),g.style.display="unset",h.append(g),s.append(h)})}),o.nativeElement.innerHTML=s.innerHTML,this._markerCache.set(e,{signature:r,defsElement:o.nativeElement}),this._makeSafariCompatible(e),!0}_findConnectionMarkers(e){return Array.from(e.fMarkers()??[])}_makeSafariCompatible(e){e.fPath().hostElement.replaceWith(e.fPath().hostElement)}static \u0275fac=function(n){return new(n||Bs)};static \u0275prov=y({token:Bs,factory:Bs.\u0275fac})};return t=I([E(xo)],t),t})();function $5(t){return t.map(i=>[...Dy(i.type),i.width,i.height,i.refX,i.refY,i.orient,i.markerUnits,i.markerElement.outerHTML].join("|")).join("||")}function W5(t,i,e,n){let o=Py("marker",n);return o.setAttribute("id",Fn(t+"-"+e)),o.setAttribute("markerHeight",`${i.height}`),o.setAttribute("markerWidth",`${i.width}`),o.setAttribute("orient",`${i.orient}`),o.setAttribute("refX",`${i.refX}`),o.setAttribute("refY",`${i.refY}`),o.setAttribute("markerUnits",`${i.markerUnits}`),o}function Dy(t){switch(t){case Le.START:return[Le.START];case Le.END:return[Le.END];case Le.SELECTED_START:return[Le.SELECTED_START];case Le.SELECTED_END:return[Le.SELECTED_END];case Le.START_ALL_STATES:return[Le.START,Le.SELECTED_START];case Le.END_ALL_STATES:return[Le.END,Le.SELECTED_END];default:return[]}}function Py(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}var gh=(()=>{class t{renderTicket=0;_connectedInPreviousRender=new Set;beginRender(){return++this.renderTicket}resetConnectedConnectors(){for(let e of this._connectedInPreviousRender)e.resetConnected();this._connectedInPreviousRender.clear()}trackConnectedConnectors(e,n){this._connectedInPreviousRender.add(e),this._connectedInPreviousRender.add(n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),K5=String.raw`
1570
- const EPSILON = 0.5;
1571
-
1572
- addEventListener('message', (event) => {
1573
- const data = event?.data;
1574
- const requestId = data?.requestId;
1575
- const items = Array.isArray(data?.items) ? data.items : [];
1576
-
1577
- try {
1578
- const results = items.map((item) => calculateItem(item));
1579
- postMessage({ requestId, results });
1580
- } catch (error) {
1581
- const message = error instanceof Error ? error.message : 'Connection worker failed.';
1582
- postMessage({ requestId, error: message });
1583
- }
1584
- });
1585
-
1586
- function calculateItem(item) {
1587
- const sourceCenterX = item.sourceRect.x + item.sourceRect.width / 2;
1588
- const sourceCenterY = item.sourceRect.y + item.sourceRect.height / 2;
1589
- const targetCenterX = item.targetRect.x + item.targetRect.width / 2;
1590
- const targetCenterY = item.targetRect.y + item.targetRect.height / 2;
1591
-
1592
- const sourceSide = resolveConnectableSide(
1593
- item.outputSide,
1594
- targetCenterX - sourceCenterX,
1595
- targetCenterY - sourceCenterY,
1596
- item.sourceConnectableSide,
1597
- );
1598
-
1599
- const targetSide = resolveConnectableSide(
1600
- item.inputSide,
1601
- sourceCenterX - targetCenterX,
1602
- sourceCenterY - targetCenterY,
1603
- item.targetConnectableSide,
1604
- );
1605
-
1606
- if (item.behavior === 'fixed_center') {
1607
- return {
1608
- originalIndex: item.originalIndex,
1609
- supported: true,
1610
- sourceSide,
1611
- targetSide,
1612
- line: {
1613
- point1: { x: sourceCenterX, y: sourceCenterY },
1614
- point2: { x: targetCenterX, y: targetCenterY },
1615
- },
1616
- };
1617
- }
1618
-
1619
- if (item.sourceRotation || item.targetRotation) {
1620
- return { originalIndex: item.originalIndex, supported: false };
1621
- }
1622
-
1623
- if (item.behavior !== 'fixed') {
1624
- if (item.behavior !== 'floating') {
1625
- return { originalIndex: item.originalIndex, supported: false };
1626
- }
1627
-
1628
- if (hasRoundedCorners(item.sourceRect) || hasRoundedCorners(item.targetRect)) {
1629
- return { originalIndex: item.originalIndex, supported: false };
1630
- }
1631
-
1632
- return {
1633
- originalIndex: item.originalIndex,
1634
- supported: true,
1635
- sourceSide,
1636
- targetSide,
1637
- line: buildFloatingLine(item.sourceRect, item.targetRect),
1638
- };
1639
- }
1640
-
1641
- const line = buildFixedLine(item.sourceRect, item.targetRect, sourceSide, targetSide);
1642
- if (!line) {
1643
- return { originalIndex: item.originalIndex, supported: false };
1644
- }
1645
-
1646
- return {
1647
- originalIndex: item.originalIndex,
1648
- supported: true,
1649
- sourceSide,
1650
- targetSide,
1651
- line,
1652
- };
1653
- }
1654
-
1655
- function resolveConnectableSide(requestedSide, deltaX, deltaY, fallbackSide) {
1656
- if (requestedSide === 'default') {
1657
- return fallbackSide;
1658
- }
1659
-
1660
- const absX = Math.abs(deltaX);
1661
- const absY = Math.abs(deltaY);
1662
- const nearZero = absX < EPSILON && absY < EPSILON;
1663
-
1664
- if (nearZero) {
1665
- return fallbackSide;
1666
- }
1667
-
1668
- const horizontalDominant = absX >= absY;
1669
-
1670
- switch (requestedSide) {
1671
- case 'calculate':
1672
- return horizontalDominant ? (deltaX >= 0 ? 'right' : 'left') : deltaY >= 0 ? 'bottom' : 'top';
1673
-
1674
- case 'calculate_horizontal':
1675
- if (absX < EPSILON) {
1676
- return fallbackSide;
1677
- }
1678
-
1679
- return deltaX >= 0 ? 'right' : 'left';
1680
-
1681
- case 'calculate_vertical':
1682
- if (absY < EPSILON) {
1683
- return fallbackSide;
1684
- }
1685
-
1686
- return deltaY >= 0 ? 'bottom' : 'top';
1687
-
1688
- case 'top':
1689
- case 'bottom':
1690
- case 'left':
1691
- case 'right':
1692
- return requestedSide;
1693
-
1694
- default:
1695
- return fallbackSide;
1696
- }
1697
- }
1698
-
1699
- function buildFixedLine(sourceRect, targetRect, sourceSide, targetSide) {
1700
- const sourceAnchor = sourceSide === 'auto' ? 'bottom' : sourceSide;
1701
- const targetAnchor = targetSide === 'auto' ? 'top' : targetSide;
1702
-
1703
- const point1 = getSidePoint(sourceRect, sourceAnchor);
1704
- const point2 = getSidePoint(targetRect, targetAnchor);
1705
-
1706
- if (!point1 || !point2) {
1707
- return null;
1708
- }
1709
-
1710
- return { point1, point2 };
1711
- }
1712
-
1713
- function buildFloatingLine(sourceRect, targetRect) {
1714
- const sourceCenter = getRectCenter(sourceRect);
1715
- const targetCenter = getRectCenter(targetRect);
1716
-
1717
- return {
1718
- point1: getRectBorderIntersection(sourceRect, sourceCenter, targetCenter),
1719
- point2: getRectBorderIntersection(targetRect, targetCenter, sourceCenter),
1720
- };
1721
- }
1722
-
1723
- function hasRoundedCorners(rect) {
1724
- return !!(rect.radius1 || rect.radius2 || rect.radius3 || rect.radius4);
1725
- }
1726
-
1727
- function getRectCenter(rect) {
1728
- return {
1729
- x: rect.x + rect.width / 2,
1730
- y: rect.y + rect.height / 2,
1731
- };
1732
- }
1733
-
1734
- function getRectBorderIntersection(rect, from, to) {
1735
- const halfWidth = rect.width / 2;
1736
- const halfHeight = rect.height / 2;
1737
- const center = getRectCenter(rect);
1738
-
1739
- const dx = to.x - from.x;
1740
- const dy = to.y - from.y;
1741
-
1742
- if (Math.abs(dx) < EPSILON && Math.abs(dy) < EPSILON) {
1743
- return center;
1744
- }
1745
-
1746
- const scaleX = Math.abs(dx) < EPSILON ? Number.POSITIVE_INFINITY : halfWidth / Math.abs(dx);
1747
- const scaleY = Math.abs(dy) < EPSILON ? Number.POSITIVE_INFINITY : halfHeight / Math.abs(dy);
1748
- const scale = Math.min(scaleX, scaleY);
1749
-
1750
- return {
1751
- x: center.x + dx * scale,
1752
- y: center.y + dy * scale,
1753
- };
1754
- }
1755
-
1756
- function getSidePoint(rect, side) {
1757
- const centerX = rect.x + rect.width / 2;
1758
- const centerY = rect.y + rect.height / 2;
1759
-
1760
- switch (side) {
1761
- case 'top':
1762
- return { x: centerX, y: rect.y };
1763
-
1764
- case 'right':
1765
- return { x: rect.x + rect.width, y: centerY };
1766
-
1767
- case 'bottom':
1768
- return { x: centerX, y: rect.y + rect.height };
1769
-
1770
- case 'left':
1771
- return { x: rect.x, y: centerY };
1772
-
1773
- default:
1774
- return null;
1775
- }
1776
- }
1777
- `.trim();function Ry(t){return!!Oy(t)}function Oy(t){let i=t,e=i?.Blob,n=i?.Worker,o=i?.URL;return!e||!n||typeof o?.createObjectURL!="function"||typeof o.revokeObjectURL!="function"?null:{blobCtor:e,workerCtor:n,urlApi:o}}function Y5(t){let i=new t.blobCtor([K5],{type:"text/javascript"});return t.urlApi.createObjectURL(i)}function Fy(t,i){if(!t)return;let e=i??(typeof URL>"u"?null:URL);typeof e?.revokeObjectURL=="function"&&e.revokeObjectURL(t)}var Li=(()=>{class t{worker=null;workerUrl=null;nextRequestId=0;isDisabled=!1;pending=new Map;resetRuntime(e){this.pending.forEach(n=>n.reject(e)),this.pending.clear(),this.worker?.terminate(),this.worker=null,Fy(this.workerUrl),this.workerUrl=null}dispose(){this.resetRuntime(new Error("Connection worker was destroyed."))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),tu=class{connection;line;static fToken=Symbol("ApplyConnectionRenderRequest");constructor(i,e){this.connection=i,this.line=e}},X5=(()=>{let t=class Vs{_mediator=p(B);_renderCache=new WeakMap;handle({connection:e,line:n}){!this._mediator.execute(new xo(e))&&!this._shouldRender(e,n)||(e.setLine(n),e.initialize())}_shouldRender(e,n){let o=e.fPath().hostElement,r=this._createConnectionRenderSignature(e,n),a=this._renderCache.get(e);return a?.signature===r&&a.pathElement===o?!1:(this._renderCache.set(e,{signature:r,pathElement:o}),!0)}_createConnectionRenderSignature(e,n){let{sourceSide:o,targetSide:r}=e.getResolvedSides();return[e.fBehavior,e.fType,e.fRadius,e.fOffset,e.fReassignableStart(),this._serializeContents([...e.fContents()||[]]),o,r,this._serializePoint(n.point1),this._serializePoint(n.point2),this._serializeWaypoints(e.fWaypoints()?.waypoints()||[])].join("|")}_serializePoint(e){return`${e.x}:${e.y}`}_serializeWaypoints(e){return e.map(this._serializePoint).join(";")}_serializeContents(e){return e.map(n=>[n.position(),n.offset(),n.align()].join(":")).join(";")}static \u0275fac=function(n){return new(n||Vs)};static \u0275prov=y({token:Vs,factory:Vs.\u0275fac})};return t=I([E(tu)],t),t})(),nu=class{source;target;static fToken=Symbol("MarkConnectionConnectorsAsConnectedRequest");constructor(i,e){this.source=i,this.target=e}},Z5=(()=>{let t=class zs{_state=p(gh);handle({source:e,target:n}){e.setConnected(n),n.setConnected(e),this._state.trackConnectedConnectors(e,n)}static \u0275fac=function(n){return new(n||zs)};static \u0275prov=y({token:zs,factory:zs.\u0275fac})};return t=I([E(nu)],t),t})(),oi=class{element;cache;static fToken=Symbol("GetNormalizedConnectorRectRequest");constructor(i,e=!0){this.element=i,this.cache=e}},Q5={enabled:!1},wn=new ve("F_CACHE_OPTIONS",{providedIn:"root",factory:()=>me({},Q5)});var iu=class{id;nodeId;kind;element;static fToken=Symbol("RegisterFCacheConnectorRequest");constructor(i,e,n,o){this.id=i,this.nodeId=e,this.kind=n,this.element=o}},Tn=(()=>{class t{nodeEntries=new Map;nodeIdByElement=new WeakMap;connectorEntries=new Map;connectorKeysByNodeId=new Map;connectorKeyByElement=new WeakMap;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Em=class{key;id;kind;nodeId;element;rect;constructor(i,e,n,o,r,a){this.key=i,this.id=e,this.kind=n,this.nodeId=o,this.element=r,this.rect=a}},yr=class{static build(i,e){return`${i}:${e}`}},Mm=class{id;element;reference;rect;constructor(i,e,n,o){this.id=i,this.element=e,this.reference=n,this.rect=o}},wo=class{nodeId;reason;static fToken=Symbol("InvalidateFCacheNodeRequest");constructor(i,e="manual"){this.nodeId=i,this.reason=e}},J5=(()=>{let t=class Hs{_store=p(Tn);_options=p(wn);handle({nodeId:e,reason:n}){if(!this._options.enabled)return;let o=this._store.nodeEntries.get(e);if(!o)return;o.rect=void 0;let r=this._store.connectorKeysByNodeId.get(e);if(r?.size)for(let a of r){let s=this._store.connectorEntries.get(a);s&&(s.rect=void 0)}}static \u0275fac=function(n){return new(n||Hs)};static \u0275prov=y({token:Hs,factory:Hs.\u0275fac})};return t=I([E(wo)],t),t})(),ou=class{id;element;reference;static fToken=Symbol("RegisterFCacheNodeRequest");constructor(i,e,n){this.id=i,this.element=e,this.reference=n}},e6=(()=>{let t=class qs{_store=p(Tn);_options=p(wn);handle({id:e,element:n,reference:o}){if(!this._options.enabled)return;let r=new Mm(e,n,o);this._store.nodeEntries.set(e,r),this._store.nodeIdByElement.set(n,e),this._store.connectorKeysByNodeId.set(e,this._store.connectorKeysByNodeId.get(e)??new Set)}static \u0275fac=function(n){return new(n||qs)};static \u0275prov=y({token:qs,factory:qs.\u0275fac})};return t=I([E(ou)],t),t})(),ru=class{id;static fToken=Symbol("UnregisterFCacheNodeRequest");constructor(i){this.id=i}},t6=(()=>{let t=class Gs{_store=p(Tn);_mediator=p(B);_options=p(wn);handle({id:e}){if(!this._options.enabled)return;let n=this._store.nodeEntries.get(e);if(!n)return;this._store.nodeEntries.delete(e),this._store.nodeIdByElement.delete(n.element);let o=Array.from(this._store.connectorKeysByNodeId.get(e)??[]);for(let r of o){let a=this._store.connectorEntries.get(r);a&&this._mediator.execute(new Cr(a.id,a.kind))}this._store.connectorKeysByNodeId.delete(e)}static \u0275fac=function(n){return new(n||Gs)};static \u0275prov=y({token:Gs,factory:Gs.\u0275fac})};return t=I([E(ru)],t),t})(),n6=(()=>{let t=class js{_store=p(Tn);_mediator=p(B);_options=p(wn);handle({id:e,nodeId:n,kind:o,element:r}){if(!this._options.enabled)return;let a=yr.build(e,o),s=this._store.connectorEntries.get(a);s&&(this._detachConnectorFromNode(s.key,s.nodeId),this._store.connectorKeyByElement.delete(s.element));let c=new Em(a,e,o,n,r);this._store.connectorEntries.set(a,c),this._store.connectorKeyByElement.set(r,a);let u=this._store.connectorKeysByNodeId.get(n)??new Set;u.add(a),this._store.connectorKeysByNodeId.set(n,u),this._mediator.execute(new wo(n,"connector-registered"))}_detachConnectorFromNode(e,n){let o=this._store.connectorKeysByNodeId.get(n);o&&(o.delete(e),o.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||js)};static \u0275prov=y({token:js,factory:js.\u0275fac})};return t=I([E(iu)],t),t})(),Cr=class{connectorId;kind;static fToken=Symbol("UnregisterFCacheConnectorRequest");constructor(i,e){this.connectorId=i,this.kind=e}},i6=(()=>{let t=class Us{_store=p(Tn);_mediator=p(B);_options=p(wn);handle({connectorId:e,kind:n}){if(!this._options.enabled)return;let o=yr.build(e,n),r=this._store.connectorEntries.get(o);r&&(this._store.connectorEntries.delete(o),this._store.connectorKeyByElement.delete(r.element),this._detachConnectorFromNode(o,r.nodeId),this._store.nodeEntries.has(r.nodeId)&&this._mediator.execute(new wo(r.nodeId,"connector-unregistered")))}_detachConnectorFromNode(e,n){let o=this._store.connectorKeysByNodeId.get(n);o&&(o.delete(e),o.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||Us)};static \u0275prov=y({token:Us,factory:Us.\u0275fac})};return t=I([E(Cr)],t),t})(),To=class{element;static fToken=Symbol("GetCachedFCacheRectRequest");constructor(i){this.element=i}},o6=(()=>{let t=class $s{_store=p(Tn);_options=p(wn);handle({element:e}){if(!this._options.enabled)return;let n=this._store.nodeIdByElement.get(e);if(n){let r=this._store.nodeEntries.get(n)?.rect;if(r)return r}let o=this._store.connectorKeyByElement.get(e);if(o)return this._store.connectorEntries.get(o)?.rect??void 0}static \u0275fac=function(n){return new(n||$s)};static \u0275prov=y({token:$s,factory:$s.\u0275fac})};return t=I([E(To)],t),t})(),Di=class{connectorId;kind;rect;static fToken=Symbol("SetFCacheConnectorRectRequest");constructor(i,e,n){this.connectorId=i,this.kind=e,this.rect=n}},r6=(()=>{let t=class Ws{_store=p(Tn);_options=p(wn);handle({connectorId:e,kind:n,rect:o}){if(!this._options.enabled)return;let r=yr.build(e,n),a=this._store.connectorEntries.get(r);a&&(a.rect=rt.fromRoundedRect(o))}static \u0275fac=function(n){return new(n||Ws)};static \u0275prov=y({token:Ws,factory:Ws.\u0275fac})};return t=I([E(Di)],t),t})(),Pi=class{nodeId;rect;static fToken=Symbol("SetFCacheNodeRectRequest");constructor(i,e){this.nodeId=i,this.rect=e}},a6=(()=>{let t=class Ks{_store=p(Tn);_options=p(wn);handle({nodeId:e,rect:n}){if(!this._options.enabled)return;let o=this._store.nodeEntries.get(e);if(!o)return;let r=o.rect;o.rect=ne.initialize(n.x,n.y,n.width,n.height),r&&this._updateConnectorRectsByNodeRect(e,r,o.rect)}_updateConnectorRectsByNodeRect(e,n,o){let r=this._store.connectorKeysByNodeId.get(e);if(!r?.size)return;let a=o.x-n.x,s=o.y-n.y,c=n.width!==0,u=n.height!==0,h=c?o.width/n.width:1,g=u?o.height/n.height:1;for(let C of r){let M=this._store.connectorEntries.get(C);if(!M?.rect)continue;let S=M.rect,N=S.gravityCenter,q=c?o.x+(N.x-n.x)*h:N.x+a,$=u?o.y+(N.y-n.y)*g:N.y+s;M.rect=new rt(q-S.width/2,$-S.height/2,S.width,S.height,S.radius1,S.radius2,S.radius3,S.radius4)}}static \u0275fac=function(n){return new(n||Ks)};static \u0275prov=y({token:Ks,factory:Ks.\u0275fac})};return t=I([E(Pi)],t),t})(),xr=class{element;rect;static fToken=Symbol("UpdateFCacheRectByElementRequest");constructor(i,e){this.element=i,this.rect=e}},s6=(()=>{let t=class Ys{_store=p(Tn);_options=p(wn);handle({element:e,rect:n}){if(!this._options.enabled)return;let o=this._store.nodeIdByElement.get(e);if(o){let s=this._store.nodeEntries.get(o);s&&(s.rect=n);return}let r=this._store.connectorKeyByElement.get(e);if(!r)return;let a=this._store.connectorEntries.get(r);a&&(a.rect=n)}static \u0275fac=function(n){return new(n||Ys)};static \u0275prov=y({token:Ys,factory:Ys.\u0275fac})};return t=I([E(xr)],t),t})(),l6=[Tn,e6,t6,J5,n6,i6,o6,a6,r6,s6];function No(t,i,e){return i?he.fromPoint(t).elementTransform(i).sub(e.scaledPosition).sub(e.position).div(e.scale):he.fromPoint(t)}function Ny(){return{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}}function So(t){return t?`${t}`:void 0}var c6=(()=>{let t=class Xs{_store=p(A);_mediator=p(B);_browser=p(at);get _transform(){return this._store.transform}handle({element:e,cache:n}){let o=this._mediator.execute(new To(e));if(o&&n)return o;let r=this._getElementRoundedRect(e),a=this._normalizePosition(r),s=this._unscaleSize(r),c=this._getUnscaledRect(a,s,r),u=this._getOffsetSize(e,s),h=rt.fromCenter(c,u.width,u.height);return this._mediator.execute(new xr(e,h)),h}_getElementRoundedRect(e){return this._getRoundedRect(ne.fromElement(e),e,this._getComputedStyle(e))}_getRoundedRect(e,n,o){let[r,a,s,c]=this._normalizeCircularBorderRadii(e.width,e.height,[this._getSystemRadius(o.borderTopLeftRadius,n,o.fontSize),this._getSystemRadius(o.borderTopRightRadius,n,o.fontSize),this._getSystemRadius(o.borderBottomRightRadius,n,o.fontSize),this._getSystemRadius(o.borderBottomLeftRadius,n,o.fontSize)]);return new rt(e.x,e.y,e.width,e.height,r,a,s,c)}_getComputedStyle(e){return this._browser.window.getComputedStyle(e)}_toPixels(e,n,o){return this._browser.toPixels(e,n.clientWidth,n.clientHeight,o)||0}_getSystemRadius(e,n,o){return this._toPixels(e,n,o)*this._transform.scale}_normalizeCircularBorderRadii(e,n,o){let[r,a,s,c]=o.map(h=>Math.max(0,h)),u=Math.min(1,this._getRadiusScaleFactor(e,r+a),this._getRadiusScaleFactor(n,a+s),this._getRadiusScaleFactor(e,s+c),this._getRadiusScaleFactor(n,c+r));return[r*u,a*u,s*u,c*u]}_getRadiusScaleFactor(e,n){return n<=0?1:e<=0?0:e/n}_normalizePosition(e){return No(e,this._store.flowHost,this._transform)}_unscaleSize(e){return wt.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n,o){return new rt(e.x,e.y,n.width,n.height,this._unscaleRadius(o.radius1),this._unscaleRadius(o.radius2),this._unscaleRadius(o.radius3),this._unscaleRadius(o.radius4))}_unscaleRadius(e){return e/this._transform.scale}_getOffsetSize(e,n){return wt.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||Xs)};static \u0275prov=y({token:Xs,factory:Xs.\u0275fac})};return t=I([E(oi)],t),t})(),au=class{connector;cache;static fToken=Symbol("ResolveConnectionEndpointRectRequest");constructor(i,e){this.connector=i,this.cache=e}},d6=(()=>{let t=class Zs{_mediator=p(B);handle({connector:e,cache:n}){let o=this._buildCacheKey(e),r=n.get(o)??this._calculateRect(e);return n.set(o,r),r}_buildCacheKey(e){return`${e.kind}::${e.fId()}`}_calculateRect(e){return this._mediator.execute(new oi(e.hostElement))}static \u0275fac=function(n){return new(n||Zs)};static \u0275prov=y({token:Zs,factory:Zs.\u0275fac})};return t=I([E(au)],t),t})(),su=class{connection;static fToken=Symbol("ResolveConnectionEndpointsRequest");constructor(i){this.connection=i}},u6=(()=>{let t=class Qs{_store=p(A);handle({connection:e}){let n=this._store.outputs.get(e.fOutputId()),o=this._store.inputs.get(e.fInputId());return!n||!o?null:{source:n,target:o}}static \u0275fac=function(n){return new(n||Qs)};static \u0275prov=y({token:Qs,factory:Qs.\u0275fac})};return t=I([E(su)],t),t})(),wr=class{connection;cache;static fToken=Symbol("ResolveConnectionGeometryRequest");constructor(i,e){this.connection=i,this.cache=e}},p6=(()=>{let t=class Js{_mediator=p(B);handle({connection:e,cache:n}){let o=this._resolveConnectionEndpoints(e);return o?Bt(me({},o),{sourceRect:this._resolveEndpointRect(o.source,n),targetRect:this._resolveEndpointRect(o.target,n)}):null}_resolveConnectionEndpoints(e){return this._mediator.execute(new su(e))}_resolveEndpointRect(e,n){return this._mediator.execute(new au(e,n))}static \u0275fac=function(n){return new(n||Js)};static \u0275prov=y({token:Js,factory:Js.\u0275fac})};return t=I([E(wr)],t),t})(),it=class{element;static fToken=Symbol("GetNormalizedElementRectRequest");constructor(i){this.element=i}},h6=(()=>{let t=class el{_store=p(A);_mediator=p(B);get _transform(){return this._store.transform}handle({element:e}){let n=this._mediator.execute(new To(e));if(n)return n;let o=ne.fromElement(e),r=this._normalizePosition(o),a=this._unscaleSize(o),s=this._getUnscaledRect(r,a),c=this._getOffsetSize(e,a),u=this._fromCenter(s,c.width,c.height);return this._mediator.execute(new xr(e,u)),u}_fromCenter(e,n,o){return ne.initialize(e.gravityCenter.x-n/2,e.gravityCenter.y-o/2,n,o)}_normalizePosition(e){return No(e,this._store.flowHost,this._transform)}_unscaleSize(e){return wt.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n){return new rt(e.x,e.y,n.width,n.height)}_getOffsetSize(e,n){return wt.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||el)};static \u0275prov=y({token:el,factory:el.\u0275fac})};return t=I([E(it)],t),t})(),Nn=class{connector;static fToken=Symbol("ResolveConnectionEndpointRotationContextRequest");constructor(i){this.connector=i}},f6=(()=>{let t=class tl{_store=p(A);_mediator=p(B);handle({connector:e}){if(!e)return;let n=this._store.nodes.get(e.fNodeId);if(!n||!n._rotate)return;let o=this._mediator.execute(new it(n.hostElement));return{rotationDeg:n._rotate,pivot:o.gravityCenter}}static \u0275fac=function(n){return new(n||tl)};static \u0275prov=y({token:tl,factory:tl.\u0275fac})};return t=I([E(Nn)],t),t})(),lu=class{connection;geometry;static fToken=Symbol("BuildConnectionLineRequest");constructor(i,e){this.connection=i,this.geometry=e}},m6=(()=>{let t=class nl{_mediator=p(B);_connectionBehaviour=p(Fo);handle({connection:e,geometry:n}){return this._connectionBehaviour.handle(new _n(n.sourceRect,n.targetRect,e,n.source.fConnectableSide,n.target.fConnectableSide,this._resolveRotationContext(n.source),this._resolveRotationContext(n.target)))}_resolveRotationContext(e){return this._mediator.execute(new Nn(e))}static \u0275fac=function(n){return new(n||nl)};static \u0275prov=y({token:nl,factory:nl.\u0275fac})};return t=I([E(lu)],t),t})(),Tr=class{connection;source;target;line;static fToken=Symbol("RenderConnectionWithLineRequest");constructor(i,e,n,o){this.connection=i,this.source=e,this.target=n,this.line=o}},_6=(()=>{let t=class il{_mediator=p(B);handle({connection:e,source:n,target:o,line:r}){this._mediator.execute(new nu(n,o)),this._mediator.execute(new tu(e,r))}static \u0275fac=function(n){return new(n||il)};static \u0275prov=y({token:il,factory:il.\u0275fac})};return t=I([E(Tr)],t),t})(),Sr=class{connection;geometry;static fToken=Symbol("RenderConnectionFromGeometryRequest");constructor(i,e){this.connection=i,this.geometry=e}},g6=(()=>{let t=class ol{_mediator=p(B);handle({connection:e,geometry:n}){let o=this._mediator.execute(new lu(e,n));this._mediator.execute(new Tr(e,n.source,n.target,o))}static \u0275fac=function(n){return new(n||ol)};static \u0275prov=y({token:ol,factory:ol.\u0275fac})};return t=I([E(Sr)],t),t})(),cu=class{connection;cache;static fToken=Symbol("RenderConnectionRequest");constructor(i,e){this.connection=i,this.cache=e}},v6=(()=>{let t=class rl{_mediator=p(B);handle({connection:e,cache:n}){let o=this._mediator.execute(new wr(e,n));o&&this._mediator.execute(new Sr(e,o))}static \u0275fac=function(n){return new(n||rl)};static \u0275prov=y({token:rl,factory:rl.\u0275fac})};return t=I([E(cu)],t),t})(),Ri=class{session;static fToken=Symbol("IsConnectionRedrawCurrentRequest");constructor(i){this.session=i}},b6=(()=>{let t=class al{_store=p(A);_state=p(gh);handle({session:e}){return e.renderTicket===this._state.renderTicket&&e.nodesRevision===this._store.nodesRevision}static \u0275fac=function(n){return new(n||al)};static \u0275prov=y({token:al,factory:al.\u0275fac})};return t=I([E(Ri)],t),t})(),kr=class{session;static fToken=Symbol("CompleteConnectionRedrawRequest");constructor(i){this.session=i}},y6=(()=>{let t=class sl{_mediator=p(B);_store=p(A);handle({session:e}){this._mediator.execute(new Ri(e))&&this._store.completeConnectionsRender(e.connectionsRevision,e.nodesRevision)}static \u0275fac=function(n){return new(n||sl)};static \u0275prov=y({token:sl,factory:sl.\u0275fac})};return t=I([E(kr)],t),t})(),du=class{batchItem;result;static fToken=Symbol("ApplyConnectionWorkerResultRequest");constructor(i,e){this.batchItem=i,this.result=e}},C6=(()=>{let t=class ll{_mediator=p(B);handle({batchItem:e,result:n}){if(e){if(!this._isSupportedWorkerResult(n)){this._fallbackToMainThread(e);return}try{e.connection._applyResolvedSidesToConnection(n.sourceSide,n.targetSide),this._mediator.execute(new Tr(e.connection,e.geometry.source,e.geometry.target,n.line))}catch{this._fallbackToMainThread(e)}}}_fallbackToMainThread(e){this._mediator.execute(new Sr(e.connection,e.geometry))}_isSupportedWorkerResult(e){return!!(e?.supported&&e.sourceSide&&e.targetSide&&e.line)}static \u0275fac=function(n){return new(n||ll)};static \u0275prov=y({token:ll,factory:ll.\u0275fac})};return t=I([E(du)],t),t})(),ei=class{connections;cache;startIndex;session;batchItems;workerResults;static fToken=Symbol("RunConnectionRedrawSliceRequest");constructor(i,e,n,o,r,a){this.connections=i,this.cache=e,this.startIndex=n,this.session=o,this.batchItems=r,this.workerResults=a}},x6=500,w6=6,T6=(()=>{let t=class cl{_mediator=p(B);_browser=p(at);handle({connections:e,cache:n,startIndex:o,session:r,batchItems:a,workerResults:s}){if(!this._isCurrent(r))return;let c=this._now(),u=o,h=0;for(;u<e.length&&h<x6&&this._isWithinSliceBudget(c);){let g=e[u];if(a?this._mediator.execute(new du(a[u]??null,s?.[u])):this._mediator.execute(new cu(g,n)),u++,h++,!this._isCurrent(r))return}if(u>=e.length){this._mediator.execute(new kr(r));return}this._requestAnimationFrame(()=>this._mediator.execute(new ei(e,n,u,r,a,s)))}_isCurrent(e){return this._mediator.execute(new Ri(e))}_requestAnimationFrame(e){let n=this._browser.document.defaultView;if(!n){e();return}n.requestAnimationFrame(e)}_now(){let e=this._browser.document.defaultView?.performance;return e?e.now():Date.now()}_isWithinSliceBudget(e){return this._browser.isBrowser()?this._now()-e<w6:!0}static \u0275fac=function(n){return new(n||cl)};static \u0275prov=y({token:cl,factory:cl.\u0275fac})};return t=I([E(ei)],t),t})(),uu=class{static fToken=Symbol("StartConnectionRedrawRequest")},S6=(()=>{let t=class dl{_store=p(A);_state=p(gh);handle(e){return this._state.resetConnectedConnectors(),{renderTicket:this._state.beginRender(),connectionsRevision:this._store.connectionsRevision,nodesRevision:this._store.nodesRevision}}static \u0275fac=function(n){return new(n||dl)};static \u0275prov=y({token:dl,factory:dl.\u0275fac})};return t=I([E(uu)],t),t})(),Ir=class{static fToken=Symbol("RedrawConnectionsRequest")},pu=class{connectionCount;static fToken=Symbol("ShouldUseConnectionWorkerRequest");constructor(i){this.connectionCount=i}},Er=class{static fToken=Symbol("IsConnectionWorkerEnabledRequest")},k6=(()=>{let t=class ul{_browser=p(at);_state=p(Li);handle(e){if(this._state.isDisabled||!this._isWorkerAvailable())return!1;let n=this._browser.document.defaultView;return Ry(n)}_isWorkerAvailable(){return this._browser.isBrowser()}static \u0275fac=function(n){return new(n||ul)};static \u0275prov=y({token:ul,factory:ul.\u0275fac})};return t=I([E(Er)],t),t})(),I6=(()=>{let t=class pl{_mediator=p(B);handle({connectionCount:e}){return e>0&&this._mediator.execute(new Er)}static \u0275fac=function(n){return new(n||pl)};static \u0275prov=y({token:pl,factory:pl.\u0275fac})};return t=I([E(pu)],t),t})(),hu=class{connection;geometry;originalIndex;static fToken=Symbol("BuildConnectionWorkerPayloadItemRequest");constructor(i,e,n){this.connection=i,this.geometry=e,this.originalIndex=n}},E6=(()=>{let t=class hl{_store=p(A);handle({connection:e,geometry:n,originalIndex:o}){let{source:r,target:a,sourceRect:s,targetRect:c}=n;return{originalIndex:o,behavior:e.fBehavior,outputSide:e.fOutputSide(),inputSide:e.fInputSide(),sourceConnectableSide:r.fConnectableSide,targetConnectableSide:a.fConnectableSide,sourceRotation:this._store.nodes.get(r.fNodeId)?._rotate||0,targetRotation:this._store.nodes.get(a.fNodeId)?._rotate||0,sourceRect:{x:s.x,y:s.y,width:s.width,height:s.height,radius1:s.radius1,radius2:s.radius2,radius3:s.radius3,radius4:s.radius4},targetRect:{x:c.x,y:c.y,width:c.width,height:c.height,radius1:c.radius1,radius2:c.radius2,radius3:c.radius3,radius4:c.radius4}}}static \u0275fac=function(n){return new(n||hl)};static \u0275prov=y({token:hl,factory:hl.\u0275fac})};return t=I([E(hu)],t),t})(),fu=class{connections;cache;static fToken=Symbol("BuildConnectionWorkerBatchRequest");constructor(i,e){this.connections=i,this.cache=e}},M6=(()=>{let t=class fl{_mediator=p(B);handle({connections:e,cache:n}){let o=new Array(e.length),r=[];for(let a=0;a<e.length;a++){let s=this._buildBatchItem(e[a],n,a);o[a]=s,s&&r.push(s.payload)}return{items:o,payload:r}}_buildBatchItem(e,n,o){let r=this._mediator.execute(new wr(e,n));return r?{connection:e,geometry:r,payload:this._mediator.execute(new hu(e,r,o))}:null}static \u0275fac=function(n){return new(n||fl)};static \u0275prov=y({token:fl,factory:fl.\u0275fac})};return t=I([E(fu)],t),t})(),mu=class{error;static fToken=Symbol("DisableConnectionWorkerRequest");constructor(i){this.error=i}},Mr=class{error;static fToken=Symbol("ResetConnectionWorkerRuntimeRequest");constructor(i){this.error=i}},D6=(()=>{let t=class ml{_state=p(Li);handle({error:e}){this._state.resetRuntime(e)}static \u0275fac=function(n){return new(n||ml)};static \u0275prov=y({token:ml,factory:ml.\u0275fac})};return t=I([E(Mr)],t),t})(),P6=(()=>{let t=class _l{_state=p(Li);_mediator=p(B);handle({error:e}){this._state.isDisabled=!0,this._mediator.execute(new Mr(e))}static \u0275fac=function(n){return new(n||_l)};static \u0275prov=y({token:_l,factory:_l.\u0275fac})};return t=I([E(mu)],t),t})(),_u=class{message;static fToken=Symbol("HandleConnectionWorkerMessageRequest");constructor(i){this.message=i}},R6=(()=>{let t=class gl{_state=p(Li);handle({message:e}){if(!e||typeof e.requestId!="number")return;let n=this._state.pending.get(e.requestId);if(n){if(this._state.pending.delete(e.requestId),e.error){n.reject(new Error(e.error));return}n.resolve(e.results??[])}}static \u0275fac=function(n){return new(n||gl)};static \u0275prov=y({token:gl,factory:gl.\u0275fac})};return t=I([E(_u)],t),t})(),gu=class{static fToken=Symbol("EnsureConnectionWorkerRequest")},O6=(()=>{let t=class vl{_browser=p(at);_state=p(Li);_mediator=p(B);handle(e){if(this._state.worker)return this._state.worker;let n=this._browser.document.defaultView;if(!Ry(n))return null;let o=Oy(n);if(!o)return null;let r=Y5(o);try{let a=new o.workerCtor(r,{name:"f-flow-connection-worker"});return a.onmessage=s=>{this._mediator.execute(new _u(s.data))},a.onerror=()=>{this._resetWorkerAfterRuntimeError(new Error("Connection worker runtime error."))},a.onmessageerror=()=>{this._resetWorkerAfterRuntimeError(new Error("Connection worker message deserialization error."))},this._state.workerUrl=r,this._state.worker=a,a}catch(a){return Fy(r,o.urlApi),this._disableWorker(a instanceof Error?a:new Error("Connection worker initialization failed.")),null}}_disableWorker(e){this._mediator.execute(new mu(e))}_resetWorkerAfterRuntimeError(e){this._mediator.execute(new Mr(e))}static \u0275fac=function(n){return new(n||vl)};static \u0275prov=y({token:vl,factory:vl.\u0275fac})};return t=I([E(gu)],t),t})(),vu=class{payload;static fToken=Symbol("RunConnectionWorkerRequest");constructor(i){this.payload=i}},F6=(()=>{let t=class bl{_state=p(Li);_mediator=p(B);handle({payload:e}){if(!e.length)return Promise.resolve([]);if(!this._mediator.execute(new Er))return Promise.reject(new Error("Connection worker is disabled."));this._interruptPendingRequests();let n=this._mediator.execute(new gu);if(!n)return Promise.reject(new Error("Unable to initialize connection worker."));let o=++this._state.nextRequestId;return new Promise((r,a)=>{this._state.pending.set(o,{resolve:r,reject:a});try{n.postMessage({requestId:o,items:e})}catch(s){this._state.pending.delete(o),a(s instanceof Error?s:new Error("Unknown error while posting message to connection worker."))}})}_interruptPendingRequests(){if(!this._state.pending.size)return;let e=new Error("Connection worker request was superseded by a newer redraw.");this._state.pending.forEach(n=>n.reject(e)),this._state.pending.clear()}static \u0275fac=function(n){return new(n||bl)};static \u0275prov=y({token:bl,factory:bl.\u0275fac})};return t=I([E(vu)],t),t})(),bu=class{batch;static fToken=Symbol("RunConnectionWorkerBatchRequest");constructor(i){this.batch=i}},N6=(()=>{let t=class yl{_mediator=p(B);handle({batch:e}){return e.payload.length?this._mediator.execute(new vu(e.payload)):Promise.resolve([])}static \u0275fac=function(n){return new(n||yl)};static \u0275prov=y({token:yl,factory:yl.\u0275fac})};return t=I([E(bu)],t),t})(),yu=class{connections;cache;session;static fToken=Symbol("StartConnectionWorkerRedrawRequest");constructor(i,e,n){this.connections=i,this.cache=e,this.session=n}},A6=(()=>{let t=class Cl{_mediator=p(B);handle({connections:e,cache:n,session:o}){let r=this._mediator.execute(new fu(e,n));if(!r.payload.length){this._mediator.execute(new ei(e,n,0,o,r.items));return}this._mediator.execute(new bu(r)).then(a=>{this._mediator.execute(new Ri(o))&&this._mediator.execute(new ei(e,n,0,o,r.items,this._alignWorkerResults(a,e.length)))}).catch(()=>{this._mediator.execute(new Ri(o))&&this._mediator.execute(new ei(e,n,0,o,r.items))})}_alignWorkerResults(e,n){let o=new Array(n);for(let r of e){let a=r.originalIndex;a<0||a>=n||(o[a]=r)}return o}static \u0275fac=function(n){return new(n||Cl)};static \u0275prov=y({token:Cl,factory:Cl.\u0275fac})};return t=I([E(yu)],t),t})(),L6=(()=>{let t=class xl{_mediator=p(B);_store=p(A);handle(e){let n=this._mediator.execute(new uu);this._createMarkersForCreate(),this._createMarkersForSnap();let o=[...this._store.connections.getAll()],r=new Map;if(!o.length){this._mediator.execute(new kr(n));return}this._shouldUseConnectionWorker(o.length)?this._redrawUsingWorker(o,r,n):this._redrawWithoutWorker(o,r,n)}_createMarkersForCreate(){let e=this._store.connections.getForCreate();e&&this._mediator.execute(new xo(e))}_createMarkersForSnap(){let e=this._store.connections.getForSnap();e&&this._mediator.execute(new xo(e))}_shouldUseConnectionWorker(e){return this._mediator.execute(new pu(e))}_redrawUsingWorker(e,n,o){this._mediator.execute(new yu(e,n,o))}_redrawWithoutWorker(e,n,o){this._mediator.execute(new ei(e,n,0,o))}static \u0275fac=function(n){return new(n||xl)};static \u0275prov=y({token:xl,factory:xl.\u0275fac})};return t=I([E(Ir)],t),t})(),Dm=class{static fToken=Symbol("RemoveConnectionForCreateFromStoreRequest")},B6=(()=>{let t=class wl{_store=p(A);handle(e){this._store.connections.removeInstanceForCreate()}static \u0275fac=function(n){return new(n||wl)};static \u0275prov=y({token:wl,factory:wl.\u0275fac})};return t=I([E(Dm)],t),t})(),Cu=class{connection;static fToken=Symbol("RemoveConnectionFromStoreRequest");constructor(i){this.connection=i}},V6=(()=>{let t=class Tl{_store=p(A);handle({connection:e}){this._store.connections.remove(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Tl)};static \u0275prov=y({token:Tl,factory:Tl.\u0275fac})};return t=I([E(Cu)],t),t})(),xu=class{instance;static fToken=Symbol("RemoveConnectionMarkerFromStoreRequest");constructor(i){this.instance=i}},z6=(()=>{let t=class Sl{_store=p(A);handle({instance:e}){this._store.connectionMarkers.remove(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Sl)};static \u0275prov=y({token:Sl,factory:Sl.\u0275fac})};return t=I([E(xu)],t),t})(),Pm=class{waypointIndex;connectionId;static fToken=Symbol("RemoveConnectionWaypointRequest");constructor(i,e){this.waypointIndex=i,this.connectionId=e}},wu=class{static fToken=Symbol("EmitEndDragSequenceEventRequest")},H6=(()=>{let t=class kl{_store=p(A);_dragSession=p(fe);handle(e){this._store.flowHost.classList.remove(pt.DRAG_AND_DROP.DRAGGING),this._dragSession.reset(),this._emitEvent()}_emitEvent(){this._store.fDraggable?.fDragEnded?.emit()}static \u0275fac=function(n){return new(n||kl)};static \u0275prov=y({token:kl,factory:kl.\u0275fac})};return t=I([E(wu)],t),t})(),Tu=class{static fToken=Symbol("EmitStartDragSequenceEventRequest")},q6=(()=>{let t=class Il{_mediator=p(B);_store=p(A);_dragContext=p(fe);handle(e){this._dragContext.draggableItems.length>0&&(this._store.flowHost.classList.add(pt.DRAG_AND_DROP.DRAGGING),this._mediator.execute(new Dr),this._emitDragStarted())}_emitDragStarted(){let e=this._dragContext.draggableItems[0].getEvent();this._store.fDraggable?.fDragStarted?.emit(new Du(e.kind,e.data?me({},e.data):void 0,e.fEventType))}static \u0275fac=function(n){return new(n||Il)};static \u0275prov=y({token:Il,factory:Il.\u0275fac})};return t=I([E(Tu)],t),t})(),Dr=class{static fToken=Symbol("EmitSelectionChangeEventRequest")},Oi=class{_event;_target;get originalEvent(){return this._event}get targetElement(){return this._target||this.originalEvent.target}get touchEvent(){return this._event}get touches(){return this.touchEvent.touches}constructor(i,e){this._event=i,this._target=e}setTarget(i){this._target=i}preventDefault(){this.originalEvent.preventDefault()}get isEventInLockedContext(){return this.targetElement.closest("[fLockedContext]")!==null}},Su=class extends Oi{constructor(i,e){super(i,e)}isMouseLeftButton(){return this.originalEvent.button===0}isMouseRightButton(){return this.originalEvent.buttons===2}getPosition(){return{x:this.originalEvent.clientX,y:this.originalEvent.clientY}}},Rm=class extends Oi{constructor(i,e){super(i,e)}isMouseLeftButton(){let i=this.originalEvent;return i.pointerType==="mouse"&&i.button===0||i.pointerType==="touch"}isMouseRightButton(){let i=this.originalEvent;return i.pointerType==="mouse"&&i.button===2||i.pointerType==="touch"}getPosition(){let i=this.originalEvent;return{x:i.clientX,y:i.clientY}}getPointerType(){return this.originalEvent.pointerType}getPointerId(){return this.originalEvent.pointerId}},Om=class extends Oi{constructor(i){super(i)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let i=this.originalEvent.touches;return{x:i[0].clientX,y:i[0].clientY}}},Fm=class extends Oi{constructor(i,e){super(i,e)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let i=this.originalEvent.targetTouches[0];return{x:i.clientX,y:i.clientY}}},Ve=(()=>{class t{static _isSupported;static _isPassiveEventListenerSupported(){if(t._isSupported==null&&typeof window<"u")try{window.addEventListener("test",t.emptyListener,{passive:!0}),t._isSupported=!0}catch{t._isSupported=!1}return t._isSupported}static _passiveEventListener(e){return t._isPassiveEventListenerSupported()?e:!!e.capture}static activeListener(){return t._passiveEventListener({passive:!1})}static passiveListener(){return t._passiveEventListener({passive:!0})}static activeCaptureListener(){return t._passiveEventListener({passive:!1,capture:!0})}static emptyListener(){return()=>{}}}return t})(),G6=800,Nm=class{_document=p(Va);_ngZone=p(Wt,{optional:!0});_mouseListeners=Ve.emptyListener();_touchListeners=Ve.emptyListener();_startListeners=Ve.emptyListener();isSyntheticEvent(i){return!!this._lastTouchEventTime&&this._lastTouchEventTime+G6>Date.now()}_lastTouchEventTime=0;isDragStarted=!1;_dragStartThreshold=3;_dragStartDelay=0;_dragStartTime=0;_dragStartPosition={x:0,y:0};_moveHandler=this._checkDragSequenceToStart;_pointerDownElement=null;_onMouseDown=i=>{let e=this.isSyntheticEvent(i),n=U6(i),o=new Su(i);if(e||n||this.disabled||this.isDragStarted)return;this._pointerDownElement=o.targetElement,this.onPointerDown(o)&&(this._dragStartTime=Date.now(),this._dragStartPosition=o.getPosition(),this._ngZone?.runOutsideAngular(()=>{this._listen("selectstart",this._onSelectStart,Ve.activeListener()),this._listen("mousemove",this._onMouseMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,Ve.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,Ve.activeCaptureListener())}),this._mouseListeners=()=>{this._unlisten("selectstart",this._onSelectStart,Ve.activeListener()),this._unlisten("mousemove",this._onMouseMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,Ve.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,Ve.activeCaptureListener())})};_onTouchDown=i=>{let e=$6(i),n=new Om(i);if(e||this.disabled||this.isDragStarted)return;this._pointerDownElement=n.targetElement,this.onPointerDown(n)&&(this._dragStartTime=Date.now(),this._dragStartPosition=n.getPosition(),this._ngZone?.runOutsideAngular(()=>{this._listen("selectstart",this._onSelectStart,Ve.activeListener()),this._listen("touchmove",this._onTouchMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,Ve.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,Ve.activeCaptureListener())}),this._touchListeners=()=>{this._unlisten("selectstart",this._onSelectStart,Ve.activeListener()),this._unlisten("touchmove",this._onTouchMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,Ve.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,Ve.activeCaptureListener())})};_onSelectStart=i=>{this.onSelect(i)};_onMouseMove=i=>{this._moveHandler(new Su(i))};_onTouchMove=i=>{this._moveHandler(new Fm(i))};_checkDragSequenceToStart(i){let e=i.getPosition();if(!this.isDragStarted&&this._pointerDownElement){i.setTarget(this._pointerDownElement);let n=Math.abs(e.x-this._dragStartPosition.x),o=Math.abs(e.y-this._dragStartPosition.y);if(n+o>=this._dragStartThreshold){if(!(Date.now()>=this._dragStartTime+this._dragStartDelay)){this._endDragSequence();return}i.preventDefault(),this.prepareDragSequence(i),this.isDragStarted=!0,this._moveHandler=this.onPointerMove,j6(i.originalEvent)&&(this._lastTouchEventTime=Date.now())}}}_onPointerUpEvent=i=>{this.isDragStarted&&this.onPointerUp(new Rm(i)),this._endDragSequence()};_endDragSequence(){this.isDragStarted=!1,this._pointerDownElement=null,this._moveHandler=this._checkDragSequenceToStart,this._mouseListeners(),this._mouseListeners=Ve.emptyListener(),this._touchListeners(),this._touchListeners=Ve.emptyListener(),this.finalizeDragSequence()}subscribe(){this.unsubscribe(),this._ngZone?.runOutsideAngular(()=>{this._listen("mousedown",this._onMouseDown,Ve.activeListener()),this._listen("touchstart",this._onTouchDown,Ve.passiveListener())}),this._startListeners=()=>{this._unlisten("mousedown",this._onMouseDown,Ve.activeListener()),this._unlisten("touchstart",this._onTouchDown,Ve.passiveListener())}}unsubscribe(){this._startListeners(),this._startListeners=Ve.emptyListener(),this._touchListeners(),this._touchListeners=Ve.emptyListener(),this._mouseListeners(),this._mouseListeners=Ve.emptyListener()}_listen(i,e,n){this._document.addEventListener(i,e,n)}_unlisten(i,e,n){this._document.removeEventListener(i,e,n)}_preventDuringDrag=i=>{this.isDragStarted&&i.preventDefault()}};function j6(t){return t.type[0]==="t"}function U6(t){return t.buttons===0||t.offsetX===0&&t.offsetY===0}function $6(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var Am=class extends Oi{_position;_isMouseLeftButton;_isMouseRightButton;constructor(i){super(i.originalEvent,i.targetElement),this._position=i.getPosition(),this._isMouseLeftButton=i.isMouseLeftButton(),this._isMouseRightButton=i.isMouseRightButton()}isMouseLeftButton(){return this._isMouseLeftButton}isMouseRightButton(){return this._isMouseRightButton}getPosition(){return me({},this._position)}};function W6(t){return new Am(t)}var fe=(()=>{class t{selectedItems=[];isSelectedChanged=!1;onPointerDownScale=1;onPointerDownPosition=new he(0,0);draggableItems=[];autoPanFrameId=null;lastPointerEvent=null;lastPointerPosition=null;isAutoPanCanvasMoved=!1;reset(){for(let e of this.draggableItems)try{e.destroy?.()}catch{console.error(`Error while destroying drag handler of type ${e.type}`)}this.draggableItems=[],this.onPointerDownScale=1,this.onPointerDownPosition=new he(0,0),this.autoPanFrameId=null,this.lastPointerEvent=null,this.lastPointerPosition=null,this.isAutoPanCanvasMoved=!1}markSelectionAsChanged(){this.isSelectedChanged=!0}rememberPointerEvent(e){this.lastPointerEvent=W6(e),this.lastPointerPosition=this.lastPointerEvent.getPosition()}isEmpty(){return!this.draggableItems.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Lm=class{nodeIds;groupIds;connectionIds;get fNodeIds(){return this.nodeIds}get fGroupIds(){return this.groupIds}get fConnectionIds(){return this.connectionIds}constructor(i,e,n){this.nodeIds=i,this.groupIds=e,this.connectionIds=n}},K6=(()=>{let t=class El{_mediator=p(B);_store=p(A);_dragSession=p(fe);handle(e){this._dragSession.isSelectedChanged&&(this._emitSelectionChange(this._getSelection()),this._dragSession.isSelectedChanged=!1,this._mediator.execute(new ti))}_getSelection(){return this._mediator.execute(new Jr)}_emitSelectionChange(e){this._store.fDraggable?.fSelectionChange.emit(new Lm(e.fNodeIds,e.fGroupIds,e.fConnectionIds))}static \u0275fac=function(n){return new(n||El)};static \u0275prov=y({token:El,factory:El.\u0275fac})};return t=I([E(Dr)],t),t})(),Bm=class{nodeOrGroup;static fToken=Symbol("GetNormalizedParentNodeRectRequest");constructor(i){this.nodeOrGroup=i}},Y6=(()=>{let t=class Ml{_store=p(A);_mediator=p(B);handle({nodeOrGroup:e}){let n=ne.initialize(-1/0,-1/0,1/0,1/0),o=this._getNode(e.fParentId());return o&&(n=this._getParentRect(o)),n}_getNode(e){return this._store.nodes.get(e)}_getParentRect(e){let n=this._getNodeRect(e),o=this._getNodePadding(e,n);return ne.initialize(n.x+o[0],n.y+o[1],n.width-o[0]-o[2],n.height-o[1]-o[3])}_getNodeRect(e){return this._mediator.execute(new it(e.hostElement))}_getNodePadding(e,n){return this._mediator.execute(new Ni(e,n))}static \u0275fac=function(n){return new(n||Ml)};static \u0275prov=y({token:Ml,factory:Ml.\u0275fac})};return t=I([E(Bm)],t),t})(),Vm=class{fParentNodes;fDraggedNodes;static fToken=Symbol("IsArrayHasParentNodeRequest");constructor(i,e){this.fParentNodes=i,this.fDraggedNodes=e}},X6=(()=>{let t=class Dl{handle(e){return this._isParentNodeInArray(this._getParentNodeIds(e.fParentNodes),e.fDraggedNodes)}_getParentNodeIds(e){return e.map(n=>n.fId())}_isParentNodeInArray(e,n){return n.some(o=>e.includes(o.fId()))}static \u0275fac=function(n){return new(n||Dl)};static \u0275prov=y({token:Dl,factory:Dl.\u0275fac})};return t=I([E(Vm)],t),t})(),zm=class{fNodeId;fConnectionIds;constructor(i,e){this.fNodeId=i,this.fConnectionIds=e}},ku=class extends zm{nodeId;connectionIds;constructor(i,e){super(i,e),this.nodeId=i,this.connectionIds=e}},Iu=class{nodeOrGroup;static fToken=Symbol("DetectConnectionsUnderDragNodeRequest");constructor(i){this.nodeOrGroup=i}},Z6=(()=>{let t=class Pl{_mediator=p(B);_store=p(A);handle({nodeOrGroup:e}){let n=this._collectConnectableConnectorIds(e,"source"),o=this._collectConnectableConnectorIds(e,"target");if(!n.size||!o.size)return;let r=this._collectAttachedConnectionIds(n,o),a=this._collectConnectionsUnderNode(e),s=[];for(let c of a){let u=c.fId();r.has(u)||s.push(u)}s.length&&(this._store.fDraggable?.fNodeIntersectedWithConnections.emit(new ku(e.fId(),s)),this._store.fDraggable?.fNodeConnectionsIntersection.emit(new ku(e.fId(),s)))}_collectConnectableConnectorIds(e,n){let o=n==="source"?this._store.outputs.getAll():this._store.inputs.getAll(),r=new Set;for(let a of o)a.canBeConnected&&e.isContains(a.hostElement)&&r.add(a.fId());return r}_collectAttachedConnectionIds(e,n){let o=new Set;for(let r of this._store.connections.getAll())(e.has(r.fOutputId())||n.has(r.fInputId()))&&o.add(r.fId());return o}_collectConnectionsUnderNode(e){let n=this._mediator.execute(new oi(e.hostElement,!1)),o=[];for(let r of this._store.connections.getAll())this._hasIntersection(r,n)&&o.push(r);return o}_hasIntersection(e,n){return fo.getRoundedRectIntersectionsWithSVGPath(e.fPath().hostElement,n).length>0}static \u0275fac=function(n){return new(n||Pl)};static \u0275prov=y({token:Pl,factory:Pl.\u0275fac})};return t=I([E(Iu)],t),t})(),Q6=[q6,H6,K6,Y6,X6,Z6],J6=new Set(["create-connection","reassign-connection","drag-node"]),e7=new Set(["selection-area"]),t7=new Set(["assign-to-container"]);function Ay(t){let i=null;for(let e of t){if(t7.has(e))continue;let n=J6.has(e)?"rebase":e7.has(e)?"direct":null;if(!n)return null;if(!i){i=n;continue}if(i!==n)return null}return i}function Ly(t,i,e,n,o){return H.initialize(Zb(t.x,i.left,i.right,e,n,o),Zb(t.y,i.top,i.bottom,e,n,o))}function Zb(t,i,e,n,o,r){let a=Math.max(0,n),s=Math.max(0,o);if(!a||!s)return 0;if(t<=i+a){let c=Jb((i+a-t)/a,0,1);return Qb(c,s,r)}if(t>=e-a){let c=Jb((t-(e-a))/a,0,1);return-Qb(c,s,r)}return 0}function n7(t,i,e){let n=e||1;return he.fromPoint(t).add(he.fromPoint(i).div(n))}function Qb(t,i,e){return e?i*t:i}function Jb(t,i,e){return Math.max(i,Math.min(e,t))}var Eu=class{static fToken=Symbol("RunAutoPanFrameRequest")},ri=class{static fToken=Symbol("StopAutoPanRequest")},i7=(()=>{let t=class Rl{_store=p(A);_dragContext=p(fe);handle(e){this._dragContext.autoPanFrameId!==null&&(cancelAnimationFrame(this._dragContext.autoPanFrameId),this._dragContext.autoPanFrameId=null),this._dragContext.isAutoPanCanvasMoved&&(this._store.fCanvas?.emitCanvasChangeEvent(),this._dragContext.isAutoPanCanvasMoved=!1)}static \u0275fac=function(n){return new(n||Rl)};static \u0275prov=y({token:Rl,factory:Rl.\u0275fac})};return t=I([E(ri)],t),t})(),Pr=class{static fToken=Symbol("SyncAutoPanRequest")},o7=(()=>{let t=class Ol{_mediator=p(B);_store=p(A);_dragContext=p(fe);handle(e){if(!this._canAutoPan()||!this._hasAutoPanDelta()){this._mediator.execute(new ri);return}this._dragContext.autoPanFrameId===null&&(this._dragContext.autoPanFrameId=requestAnimationFrame(()=>{this._dragContext.autoPanFrameId=null,this._mediator.execute(new Eu)}))}_canAutoPan(){return!!this._store.fFlow&&!!this._store.fCanvas&&!!this._store.fDraggable?.isDragStarted&&!!this._autoPan()&&!!this._getAutoPanMode()&&this._edgeThreshold()>0&&this._speed()>0}_hasAutoPanDelta(){let e=this._getAutoPanDelta();return!!e.x||!!e.y}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?H.initialize():Ly(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_getAutoPanMode(){return Ay(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_edgeThreshold(){return Math.max(0,this._autoPan()?.fEdgeThreshold()??0)}_speed(){return Math.max(0,this._autoPan()?.fSpeed()??0)}_acceleration(){return!!this._autoPan()?.fAcceleration()}_autoPan(){return this._store.instances.get(We.AUTO_PAN)}static \u0275fac=function(n){return new(n||Ol)};static \u0275prov=y({token:Ol,factory:Ol.\u0275fac})};return t=I([E(Pr)],t),t})(),r7=(()=>{let t=class Fl{_mediator=p(B);_store=p(A);_dragContext=p(fe);handle(e){let n=this._getAutoPanMode();if(!this._canAutoPan(n)){this._mediator.execute(new ri);return}let o=this._getAutoPanDelta();if(!o.x&&!o.y){this._mediator.execute(new ri);return}this._applyCanvasDelta(o,n),this._replayLastPointerMove(),this._mediator.execute(new Pr)}_applyCanvasDelta(e,n){let o=this._store.transform;n==="rebase"&&(this._dragContext.onPointerDownPosition=n7(this._dragContext.onPointerDownPosition,e,this._dragContext.onPointerDownScale||o.scale||1)),o.position=he.fromPoint(o.position).add(e),this._store.fCanvas?.redraw(),this._dragContext.isAutoPanCanvasMoved=!0}_replayLastPointerMove(){let e=this._dragContext.lastPointerEvent;if(!e)return;let n=this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition);this._dragContext.draggableItems.forEach(o=>{o.onPointerMove(me({},n),e)})}_getPointerPositionInCanvas(e){return he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost)}_canAutoPan(e){return!!this._store.fFlow&&!!this._store.fCanvas&&!!this._store.fDraggable?.isDragStarted&&!!this._autoPan()&&!!e&&this._edgeThreshold()>0&&this._speed()>0}_getAutoPanMode(){return Ay(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?H.initialize():Ly(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_edgeThreshold(){return Math.max(0,this._autoPan()?.fEdgeThreshold()??0)}_speed(){return Math.max(0,this._autoPan()?.fSpeed()??0)}_acceleration(){return!!this._autoPan()?.fAcceleration()}_autoPan(){return this._store.instances.get(We.AUTO_PAN)}static \u0275fac=function(n){return new(n||Fl)};static \u0275prov=y({token:Fl,factory:Fl.\u0275fac})};return t=I([E(Eu)],t),t})(),a7=[o7,r7,i7],Mu=class{event;static fToken=Symbol("DragCanvasFinalizeRequest");constructor(i){this.event=i}},Du=class{kind;data;fEventType;get fData(){return this.data}constructor(i,e,n){this.kind=i,this.data=e,this.fEventType=n??i}},Tt=class{data(){}_features=[];getEvent(){return new Du(this.kind,this.data(),this.type)}attachFeature(i){this._features.push(i)}featuresPrepare(i){for(let e of this._features)e.onPrepare?.(i)}featuresMove(i,e){for(let n of this._features)n.onMove?.(i,e)}featuresFinalize(i,e){for(let n of this._features)n.onFinalize?.(i,e)}featuresEnd(i){for(let e of this._features)e.onEnd?.(i)}},Pu=class{_isConnected=!1;get isConnected(){return this._isConnected}toConnector=[];isSelfConnectable=!0;fConnectableSide=j.AUTO;userFConnectableSide=j.AUTO;isContains(i){return this.hostElement.contains(i)}setConnected(i){this._isConnected=!0,this.toConnector.push(i)}resetConnected(){this._isConnected=!1,this.toConnector=[]}},s7=new ve("F_NODE_INPUT"),l7=(()=>{class t extends Pu{kind="input";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,standalone:!1,features:[Z]})}return t})(),Cn=(function(t){return t.LEFT="left",t.LEFT_TOP="left-top",t.TOP="top",t.RIGHT_TOP="right-top",t.RIGHT="right",t.RIGHT_BOTTOM="right-bottom",t.BOTTOM="bottom",t.LEFT_BOTTOM="left-bottom",t})(Cn||{});function c7(t){return _r(t,".f-rotate-handle")}var By=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,selectors:[["","fDragHandle",""]],hostAttrs:[1,"f-drag-handle","f-component"],standalone:!1})}return t})(),vh=new ve("F_NODE"),d7=My(class{hostElement;constructor(t){this.hostElement=t}}),Ru=class extends d7{_injector=p(ft);renderer=p(_0);browser=p(at);stateChanges=new nn;_position=H.initialize();_rotate=0;_size;connectors=[];positionChanges(){de(()=>{let i=this.position();Xt(()=>{H.isEqual(this._position,i)||(this._position=i,this.redraw(),this.refresh())})},{injector:this._injector})}sizeChanges(){de(()=>{let i=this.size();Xt(()=>{this._isSizeEqual(i)||(this._size=i,this.redraw(),this.refresh())})},{injector:this._injector})}rotateChanges(){de(()=>{let i=this.rotate();Xt(()=>{this._rotate!==i&&(this._rotate=i,this.redraw(),this.refresh())})},{injector:this._injector})}parentChanges(){de(()=>{this.fParentId(),this.fIncludePadding(),this.fAutoSizeToFitChildren(),Xt(()=>this.refresh())},{injector:this._injector})}_isSizeEqual(i){return this._size?.width===i?.width&&this._size?.height===i?.height}isContains(i){return this.hostElement.contains(i)}redraw(){this._size&&(this.setStyle("width",""+this._size.width+"px"),this.setStyle("height",""+this._size.height+"px")),this.setStyle("transform",`translate(${this._position.x}px,${this._position.y}px) rotate(${this._rotate}deg)`)}resetSize(){this.removeStyle("width"),this.removeStyle("height")}updatePosition(i){this._position=i}updateRotate(i){this._rotate=i}updateSize(i){this._size=i}setClass(i){this.hostElement.classList.add(i)}removeClass(i){this.hostElement.classList.remove(i)}addConnector(i){this.connectors.push(i),this.refresh()}removeConnector(i){let e=this.connectors.indexOf(i);e!==-1&&this.connectors.splice(e,1),this.refresh()}},u7=0,p7=3,Hm=(()=>{class t extends Ru{_debounceTimer=null;_destroyRef=p(vt);_mediator=p(B);fId=V(`f-group-${u7++}`,{alias:"fGroupId"});fParentId=V(null,{alias:"fGroupParentId"});position=Ci(H.initialize(),{alias:"fGroupPosition"});size=V(void 0,{alias:"fGroupSize"});sizeChange=et({alias:"fGroupSizeChange"});rotate=Ci(0,{alias:"fGroupRotate"});fConnectOnNode=V(!0,{transform:K});fMinimapClass=V([]);fDraggingDisabled=V(!1,{alias:"fGroupDraggingDisabled",transform:K});fSelectionDisabled=V(!1,{alias:"fGroupSelectionDisabled",transform:K});fIncludePadding=V(!0,{transform:K});fAutoExpandOnChildHit=V(!1,{transform:K});fAutoSizeToFitChildren=V(!1,{transform:K});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new $r(this))}setStyle(e,n){this.renderer.setStyle(this.hostElement,e,n)}removeStyle(e){this.renderer.removeStyle(this.hostElement,e)}redraw(){super.redraw(),this._mediator.execute(new ti),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),p7))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Io(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Kr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new Yr(this))}static \u0275fac=function(n){return new(n||t)(Rn(Ye))};static \u0275dir=qe({type:t,selectors:[["","fGroup",""]],hostAttrs:[1,"f-group","f-component"],hostVars:5,hostBindings:function(n,o){n&2&&(O("data-f-group-id",o.fId()),ae("f-group-dragging-disabled",o.fDraggingDisabled())("f-group-selection-disabled",o.fSelectionDisabled()))},inputs:{fId:[1,"fGroupId","fId"],fParentId:[1,"fGroupParentId","fParentId"],position:[1,"fGroupPosition","position"],size:[1,"fGroupSize","size"],rotate:[1,"fGroupRotate","rotate"],fConnectOnNode:[1,"fConnectOnNode"],fMinimapClass:[1,"fMinimapClass"],fDraggingDisabled:[1,"fGroupDraggingDisabled","fDraggingDisabled"],fSelectionDisabled:[1,"fGroupSelectionDisabled","fSelectionDisabled"],fIncludePadding:[1,"fIncludePadding"],fAutoExpandOnChildHit:[1,"fAutoExpandOnChildHit"],fAutoSizeToFitChildren:[1,"fAutoSizeToFitChildren"]},outputs:{position:"fGroupPositionChange",sizeChange:"fGroupSizeChange",rotate:"fGroupRotateChange"},exportAs:["fComponent"],standalone:!1,features:[Me([{provide:vh,useExisting:t}]),Z]})}return t})(),ey=0,h7=3,bh=(()=>{class t extends Ru{_debounceTimer=null;_destroyRef=p(vt);_mediator=p(B);fId=V(`f-node-${ey++}`,{alias:"fNodeId",transform:e=>So(e)||`f-node-${ey++}`});fParentId=V(null,{alias:"fNodeParentId"});position=Ci(H.initialize(),{alias:"fNodePosition"});size=V(void 0,{alias:"fNodeSize"});sizeChange=et({alias:"fNodeSizeChange"});rotate=Ci(0,{alias:"fNodeRotate"});fConnectOnNode=V(!0,{transform:K});fMinimapClass=V([]);fDraggingDisabled=V(!1,{alias:"fNodeDraggingDisabled",transform:K});fSelectionDisabled=V(!1,{alias:"fNodeSelectionDisabled",transform:K});fIncludePadding=V(!0,{transform:K});fAutoExpandOnChildHit=V(!1,{transform:K});fAutoSizeToFitChildren=V(!1,{transform:K});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new $r(this))}setStyle(e,n){this.renderer.setStyle(this.hostElement,e,n)}removeStyle(e){this.renderer.removeStyle(this.hostElement,e)}redraw(){super.redraw(),this._mediator.execute(new ti),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),h7))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Io(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Kr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new Yr(this))}static \u0275fac=function(n){return new(n||t)(Rn(Ye))};static \u0275dir=qe({type:t,selectors:[["","fNode",""]],hostAttrs:[1,"f-node","f-component"],hostVars:5,hostBindings:function(n,o){n&2&&(O("data-f-node-id",o.fId()),ae("f-node-dragging-disabled",o.fDraggingDisabled())("f-node-selection-disabled",o.fSelectionDisabled()))},inputs:{fId:[1,"fNodeId","fId"],fParentId:[1,"fNodeParentId","fParentId"],position:[1,"fNodePosition","position"],size:[1,"fNodeSize","size"],rotate:[1,"fNodeRotate","rotate"],fConnectOnNode:[1,"fConnectOnNode"],fMinimapClass:[1,"fMinimapClass"],fDraggingDisabled:[1,"fNodeDraggingDisabled","fDraggingDisabled"],fSelectionDisabled:[1,"fNodeSelectionDisabled","fSelectionDisabled"],fIncludePadding:[1,"fIncludePadding"],fAutoExpandOnChildHit:[1,"fAutoExpandOnChildHit"],fAutoSizeToFitChildren:[1,"fAutoSizeToFitChildren"]},outputs:{position:"fNodePositionChange",sizeChange:"fNodeSizeChange",rotate:"fNodeRotateChange"},exportAs:["fComponent"],standalone:!1,features:[Me([{provide:vh,useExisting:t}]),Z]})}return t})();function f7(t){return!!t.closest("[fNode]")}var ty=0,Vy=(()=>{class t extends l7{hostElement=p(Ye).nativeElement;_mediator=p(B);_node=p(vh);fId=V(`f-node-input-${ty++}`,{alias:"fInputId",transform:e=>So(e)||`f-node-input-${ty++}`});category=V(void 0,{alias:"fInputCategory",transform:So});multiple=V(!0,{alias:"fInputMultiple",transform:K});disabled=V(!1,{alias:"fInputDisabled",transform:K});userFConnectableSide=j.AUTO;get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Gr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(pt.CONNECTOR.INPUT_CONNECTED,!0),this.hostElement.classList.toggle(pt.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(pt.CONNECTOR.INPUT_CONNECTED,!1),this.hostElement.classList.toggle(pt.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new Xr(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,selectors:[["","fNodeInput",""]],hostAttrs:[1,"f-component","f-node-input"],hostVars:5,hostBindings:function(n,o){n&2&&(O("data-f-input-id",o.fId()),ae("f-node-input-multiple",o.multiple)("f-node-input-disabled",o.disabled()))},inputs:{fId:[1,"fInputId","fId"],category:[1,"fInputCategory","category"],multiple:[1,"fInputMultiple","multiple"],disabled:[1,"fInputDisabled","disabled"],userFConnectableSide:[2,"fInputConnectableSide","userFConnectableSide",e=>mo(e,"fInputConnectableSide",j)]},exportAs:["fNodeInput"],standalone:!1,features:[Me([{provide:s7,useExisting:t}]),Z,Qi]})}return t})(),m7=(()=>{class t extends Pu{get hasConnectionLimits(){return!!this.canBeConnectedInputs&&this.canBeConnectedInputs.length>0}canConnectTo(e){return[e.fId(),e.category()].some(o=>o&&this.canBeConnectedInputs?.includes(o))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,standalone:!1,features:[Z]})}return t})();function zy(t){return!!t.closest("[fNodeOutlet]")}var _7=new ve("F_NODE_OUTPUT"),g7=(()=>{class t extends m7{kind="output";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,standalone:!1,features:[Z]})}return t})();function Hy(t){return!!t.closest("[fNodeOutput]")}var ny=0,qy=(()=>{class t extends g7{hostElement=p(Ye).nativeElement;_mediator=p(B);_node=p(vh);fId=V(`f-node-output-${ny++}`,{alias:"fOutputId",transform:e=>So(e)||`f-node-output-${ny++}`});multiple=V(!1,{alias:"fOutputMultiple",transform:K});disabled=V(!1,{alias:"fOutputDisabled",transform:K});userFConnectableSide=j.AUTO;isSelfConnectable=!0;canBeConnectedInputs=[];get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Gr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(pt.CONNECTOR.OUTPUT_CONNECTED,!0),this.hostElement.classList.toggle(pt.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(pt.CONNECTOR.OUTPUT_CONNECTED,!1),this.hostElement.classList.toggle(pt.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new Xr(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,selectors:[["","fNodeOutput",""]],hostAttrs:[1,"f-component","f-node-output"],hostVars:7,hostBindings:function(n,o){n&2&&(O("data-f-output-id",o.fId()),ae("f-node-output-multiple",o.multiple)("f-node-output-disabled",o.disabled())("f-node-output-self-connectable",o.isSelfConnectable))},inputs:{fId:[1,"fOutputId","fId"],multiple:[1,"fOutputMultiple","multiple"],disabled:[1,"fOutputDisabled","disabled"],userFConnectableSide:[2,"fOutputConnectableSide","userFConnectableSide",e=>mo(e,"fOutputConnectableSide",j)],isSelfConnectable:"isSelfConnectable",canBeConnectedInputs:[0,"fCanBeConnectedInputs","canBeConnectedInputs"]},exportAs:["fNodeOutput"],standalone:!1,features:[Me([{provide:_7,useExisting:t}]),Z,Qi]})}return t})();var Ou=class{event;static fToken=Symbol("CreateConnectionFinalizeRequest");constructor(i){this.event=i}},Rr=class{outlet;static fToken=Symbol("ResolveConnectableOutputForOutletRequest");constructor(i){this.outlet=i}},v7=(()=>{let t=class Nl{_store=p(A);handle({outlet:e}){let n=this._findOwnerNode(e);if(!n)throw new Error("The fOutlet must belong to an fNode");let o=this._findFirstConnectableOutputInNode(n);if(!o)throw new Error("Outlet requires at least one connectable output in the same node.");return o}_findOwnerNode(e){let n=e.hostElement;return this._store.nodes.getAll().find(o=>o.isContains(n))}_findFirstConnectableOutputInNode(e){return this._store.outputs.getAll().find(n=>e.isContains(n.hostElement)&&n.canBeConnected)}static \u0275fac=function(n){return new(n||Nl)};static \u0275prov=y({token:Nl,factory:Nl.\u0275fac})};return t=I([E(Rr)],t),t})(),qm=class{sourceId;targetId;dropPosition;fOutputId;fInputId;fDropPosition;constructor(i,e,n){this.sourceId=i,this.targetId=e,this.dropPosition=n,this.fOutputId=i,this.fInputId=e,this.fDropPosition=n}},Fu=(()=>{class t extends Tt{type="create-connection";kind="create-connection";data(){return{fOutputOrOutletId:this._sourceRef.connector.fId()}}_result=p(si);_mediator=p(B);_connectionBehaviour=p(Fo);_store=p(A);get _connection(){return this._store.connections.getForCreate()}get _snapConnection(){return this._store.connections.getForSnap()}_targets=[];_sourceRef;_pointerDown=new rt;initialize(e,n){this._sourceRef=this._mediator.execute(new qt(e)),this._pointerDown=rt.fromRect(ne.initialize(n.x,n.y))}prepareDragSequence(){this._collectAndMarkTargets(),this._initSnapConnection(),this._initCreateConnection(),this._connection.show(),this.onPointerMove(H.initialize()),this._result.setData({toConnectorRect:this._pointerDown,canBeConnectedInputs:this._targets,fOutputId:this._sourceRef.connector.fId()})}_collectAndMarkTargets(){this._targets=this._mediator.execute(new Ur(this._sourceRef.connector,this._sourceRef.rect.gravityCenter)),this._mediator.execute(new Do(this._targets.map(e=>e.connector)))}_initSnapConnection(){this._snapConnection&&(this._snapConnection.fOutputId.set(this._sourceRef.connector.fId()),this._snapConnection.initialize())}_initCreateConnection(){this._connection.fOutputId.set(this._sourceRef.connector.fId()),this._connection.initialize()}onPointerMove(e){let n=this._pointerDown.addPoint(e),o=this._findClosestTarget(n),r=o?.connector.fConnectableSide||j.TOP;this._drawCreateConnection(n,r);let a=this._snapConnection;if(!a)return;let s=o&&o.distance<a.fSnapThreshold?o:void 0;this._drawSnapConnection(s)}_findClosestTarget(e){return this._mediator.execute(new Fi(e,this._targets))}_drawCreateConnection(e,n){let o=this._connectionBehaviour.handle(new _n(this._sourceRef.rect,e,this._connection,this._sourceRef.connector.fConnectableSide,n,this._resolveRotationContext(this._sourceRef.connector)));this._connection.setLine(o),this._connection.redraw()}_drawSnapConnection(e){let n=this._snapConnection;if(!n)return;if(!e){n.hide();return}let o=this._connectionBehaviour.handle(new _n(this._sourceRef.rect,e.rect,n,this._sourceRef.connector.fConnectableSide,e.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(e.connector)));n.show(),n.setLine(o),n.redraw()}onPointerUp(){this._connection.redraw(),this._connection.hide(),this._snapConnection?.hide(),this._mediator.execute(new Po(this._targets.map(e=>e.connector)))}_resolveRotationContext(e){return this._mediator.execute(new Nn(e))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),b7=(()=>{let t=class Al{_result=p(si);_mediator=p(B);_store=p(A);_dragContext=p(fe);get _dragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isValid()&&(this._emitEvent(e.event),this._dragHandler.onPointerUp())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Fu)}_getTargetOutput(e){if(!e)throw new Error(`Output with fOutputId ${this._result.getData().fOutputId} not found. Make sure there is no f-connection to a non-existent fOutput.`);return zy(e.hostElement)?this._mediator.execute(new Rr(e)):e}_getOutput(){return this._store.outputs.get(this._result.getData().fOutputId)}_getOutlet(){return this._store.outlets.get(this._result.getData().fOutputId)}_emitEvent(e){this._store.fDraggable?.fCreateConnection.emit(new qm(this._getTargetOutput(this._getOutput()||this._getOutlet()).fId(),this._getInputUnderPointer(e)?.fId(),e.getPosition()))}_getInputUnderPointer(e){return this._mediator.execute(new jr(e.getPosition(),this._result.getData().canBeConnectedInputs))}static \u0275fac=function(n){return new(n||Al)};static \u0275prov=y({token:Al,factory:Al.\u0275fac})};return t=I([E(Ou)],t),t})(),Or=class{eventPosition;source;static fToken=Symbol("CreateConnectionCreateDragHandlerRequest");constructor(i,e){this.eventPosition=i,this.source=e}},y7=(()=>{let t=class Ll{_store=p(A);_dragContext=p(fe);_dragInjector=p(gt);get _transform(){return this._store.transform}handle({source:e,eventPosition:n}){this._dragContext.onPointerDownScale=this._transform.scale;let o=this._toFlowSpace(n);this._dragContext.onPointerDownPosition=o;let r=this._toCanvasSpace(o),a=this._dragInjector.get(Fu);a.initialize(e,r),this._dragContext.draggableItems=[a]}_toFlowSpace(e){return he.fromPoint(e).elementTransform(this._store.flowHost).div(this._transform.scale)}_toCanvasSpace(e){return he.fromPoint(e).mult(this._transform.scale).sub(this._transform.position).sub(this._transform.scaledPosition).div(this._transform.scale)}static \u0275fac=function(n){return new(n||Ll)};static \u0275prov=y({token:Ll,factory:Ll.\u0275fac})};return t=I([E(Or)],t),t})(),Nu=class{event;node;static fToken=Symbol("CreateConnectionFromOutletPreparationRequest");constructor(i,e){this.event=i,this.node=e}},C7=(()=>{let t=class Bl{_mediator=p(B);_store=p(A);handle({event:e,node:n}){let o=this._findOutlet(n);if(!o||(o.setOutputs(this._getOutputs(n)),!o.canBeConnected))return;let r=o.isConnectionFromOutlet?o:this._resolveOutput(o);!r||!r.canBeConnected||this._startDrag(e.getPosition(),r)}_findOutlet(e){return this._store.outlets.getAll().find(n=>e.isContains(n.hostElement))}_getOutputs(e){return this._store.outputs.getAll().filter(n=>e.isContains(n.hostElement))}_resolveOutput(e){return this._mediator.execute(new Rr(e))}_startDrag(e,n){this._mediator.execute(new Or(e,n))}static \u0275fac=function(n){return new(n||Bl)};static \u0275prov=y({token:Bl,factory:Bl.\u0275fac})};return t=I([E(Nu)],t),t})(),Au=class{event;node;static fToken=Symbol("CreateConnectionFromOutputPreparationRequest");constructor(i,e){this.event=i,this.node=e}},x7=(()=>{let t=class Vl{_mediator=p(B);_store=p(A);handle({event:e,node:n}){if(!Hy(e.targetElement)||this._hasOutlet(n))return;let o=this._findOutput(e.targetElement);!o||!o.canBeConnected||this._startDrag(e.getPosition(),o)}_hasOutlet(e){return this._store.outlets.getAll().some(n=>e.isContains(n.hostElement))}_findOutput(e){return this._store.outputs.getAll().find(n=>n.hostElement.contains(e))}_startDrag(e,n){this._mediator.execute(new Or(e,n))}static \u0275fac=function(n){return new(n||Vl)};static \u0275prov=y({token:Vl,factory:Vl.\u0275fac})};return t=I([E(Au)],t),t})(),Lu=class{event;fTrigger;static fToken=Symbol("CreateConnectionPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},w7=(()=>{let t=class zl{_mediator=p(B);_store=p(A);_dragContext=p(fe);handle({event:e,fTrigger:n}){if(!this._isValidConditions()||!this._isValidTrigger(e,n))return;let o=zy(e.targetElement),r=!o&&Hy(e.targetElement);if(!o&&!r)return;let a=this._findOwnerNode(e.targetElement);a&&(o?this._mediator.execute(new Nu(e,a)):this._mediator.execute(new Au(e,a)))}_findOwnerNode(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_isValidConditions(){return this._dragContext.isEmpty()&&!!this._store.connections.getForCreate()}_isValidTrigger(e,n){return on(e.originalEvent,n)}static \u0275fac=function(n){return new(n||zl)};static \u0275prov=y({token:zl,factory:zl.\u0275fac})};return t=I([E(Lu)],t),t})(),Bu=class{event;static fToken=Symbol("ReassignConnectionFinalizeRequest");constructor(i){this.event=i}},Gm=class{connectionId;endpoint;previousSourceId;nextSourceId;previousTargetId;nextTargetId;dropPosition;isSourceReassign;isTargetReassign;oldSourceId;newSourceId;oldTargetId;newTargetId;dropPoint;constructor(i,e,n,o,r,a,s){this.connectionId=i,this.endpoint=e,this.previousSourceId=n,this.nextSourceId=o,this.previousTargetId=r,this.nextTargetId=a,this.dropPosition=s,this.isSourceReassign=e==="source",this.isTargetReassign=e==="target",this.oldSourceId=n,this.newSourceId=o,this.oldTargetId=r,this.newTargetId=a,this.dropPoint=s}},T7=(()=>{let t=class Hl{_dragResult=p(si);_mediator=p(B);_store=p(A);_dragContext=p(fe);get _dragDirective(){return this._store.fDraggable}handle({event:e}){let n=this._findReassignHandler();n&&(this._emitIfChanged(e),n.onPointerUp())}_findReassignHandler(){return this._dragContext.draggableItems.find(n=>n.getEvent().fEventType==="reassign-connection")}_emitIfChanged(e){let n=this._dragResult.getData(),o=this._findConnectableConnector(e,n.candidates);o&&!this._isReassignedToDifferentConnector(n,o)||this._dragDirective.fReassignConnection.emit(this._buildEvent(n,e,o))}_findConnectableConnector(e,n){return this._mediator.execute(new jr(e.getPosition(),n))}_isReassignedToDifferentConnector(e,n){let o=e.connection;return e.draggedEnd==="target"?o.fInputId()!==n.fId():o.fOutputId()!==n.fId()}_buildEvent(e,n,o){let r=e.connection;return new Gm(r.fId(),e.draggedEnd,r.fOutputId(),e.draggedEnd==="source"?o?.fId():void 0,r.fInputId(),e.draggedEnd==="target"?o?.fId():void 0,n.getPosition())}static \u0275fac=function(n){return new(n||Hl)};static \u0275prov=y({token:Hl,factory:Hl.\u0275fac})};return t=I([E(Bu)],t),t})(),Vu=class{event;fTrigger;static fToken=Symbol("ReassignConnectionPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}};function S7(t,i){return Gy(t,i)||k7(t,i)}function Gy(t,i){return t.fDragHandleEnd()?.point&&jy(i,t.fDragHandleEnd().point)&&!t.fDraggingDisabled()}function k7(t,i){return!!t.fDragHandleStart()?.point&&jy(i,t.fDragHandleStart().point)&&!t.fDraggingDisabled()&&t.fReassignableStart()}function jy(t,i){return(t.x-i.x)**2+(t.y-i.y)**2<=8**2}function Uy(t,i){return t&&t.distance<i.fSnapThreshold?t:void 0}function zu(t){return rt.fromRect(ne.initialize(t.x,t.y))}var jm=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(i,e,n,o,r){this._mediator=i,this._behaviour=e,this._connection=n,this._sourceRef=o,this._targetRef=r,this._anchorRect=zu(this._connection.line.point1)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Gp(this._target,this._targetRef.rect.gravityCenter)),this._candidates.some(i=>i.connector.fId()===this._source.fId())||this._candidates.push(this._sourceRef),this._mediator.execute(new Do(this._candidates.map(i=>i.connector)))}setSnapConnection(i){this._snap=i,i&&(i.fInputId.set(this._connection.fInputId()),i.initialize())}onPointerMove(i){let e=this._anchorRect.addPoint(i),n=this._findClosest(e.gravityCenter),o=n?.connector.fConnectableSide??this._source.fConnectableSide;this._draw(e,o);let r=this._snap;r&&this._drawSnap(Uy(n,r))}_findClosest(i){return this._mediator.execute(new Fi(i,this._candidates))}_draw(i,e){let n=this._behaviour.handle(new _n(i,this._targetRef.rect,this._connection,e,this._targetRef.connector.fConnectableSide,void 0,this._resolveRotationContext(this._targetRef.connector)));this._connection.setLine(n),this._connection.redraw()}_drawSnap(i){let e=this._snap;if(!e)return;if(!i){e.hide();return}let n=this._behaviour.handle(new _n(i.rect,this._targetRef.rect,e,i.connector.fConnectableSide,this._target.fConnectableSide,this._resolveRotationContext(i.connector),this._resolveRotationContext(this._targetRef.connector)));e.show(),e.setLine(n),e.redraw()}onPointerUp(){this._draw(this._anchorRect,this._sourceRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Po(this._candidates.map(i=>i.connector)))}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},Um=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(i,e,n,o,r){this._mediator=i,this._behaviour=e,this._connection=n,this._sourceRef=o,this._targetRef=r,this._anchorRect=zu(this._connection.line.point2)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Ur(this._source,this._sourceRef.rect.gravityCenter));let i=this._connection.fInputId();i&&!this._candidates.some(e=>e.connector.fId()===i)&&this._candidates.push(this._targetRef),this._mediator.execute(new Do(this._candidates.map(e=>e.connector)))}setSnapConnection(i){this._snap=i,i&&(i.fOutputId.set(this._connection.fOutputId()),i.initialize())}onPointerMove(i){let e=this._anchorRect.addPoint(i),n=this._findClosest(e.gravityCenter),o=n?.connector.fConnectableSide??this._target.fConnectableSide;this._draw(e,o);let r=this._snap;r&&this._drawSnap(Uy(n,r))}onPointerUp(){this._draw(this._anchorRect,this._targetRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Po(this._candidates.map(i=>i.connector)))}_findClosest(i){return this._mediator.execute(new Fi(i,this._candidates))}_draw(i,e){let n=this._behaviour.handle(new _n(this._sourceRef.rect,i,this._connection,this._source.fConnectableSide,e,this._resolveRotationContext(this._sourceRef.connector),void 0));this._connection.setLine(n),this._connection.redraw()}_drawSnap(i){let e=this._snap;if(!e)return;if(!i){e.hide();return}let n=this._behaviour.handle(new _n(this._sourceRef.rect,i.rect,e,this._source.fConnectableSide,i.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(i.connector)));e.show(),e.setLine(n),e.redraw()}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},$m=(()=>{class t extends Tt{type="reassign-connection";kind="reassign-connection";data(){return{fConnectionId:this._connection.fId()}}_result=p(si);_mediator=p(B);_connectionBehaviour=p(Fo);_store=p(A);get _snapConnection(){return this._store.connections.getForSnap()}_connection;_draggedEnd;_sourceRef;_targetRef;_reassignHandler;initialize(e,n){this._connection=e,this._draggedEnd=n?"target":"source",this._sourceRef=this._mediator.execute(new qt(this._store.outputs.require(this._connection.fOutputId()))),this._targetRef=this._mediator.execute(new qt(this._store.inputs.require(this._connection.fInputId()))),this._reassignHandler=this._draggedEnd==="target"?this._createTargetHandler():this._createSourceHandler()}_createSourceHandler(){return new jm(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}_createTargetHandler(){return new Um(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}prepareDragSequence(){this._reassignHandler.collectAndMarkCandidates(),this._reassignHandler.setSnapConnection(this._snapConnection),this._result.setData({draggedEnd:this._draggedEnd,sourceAnchorRect:zu(this._connection.line.point1),targetAnchorRect:zu(this._connection.line.point2),candidates:this._reassignHandler.candidates(),connection:this._connection})}onPointerMove(e){this._reassignHandler.onPointerMove(e)}onPointerUp(){this._reassignHandler.onPointerUp()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),I7=(()=>{let t=class ql{_mediator=p(B);_store=p(A);_dragContext=p(fe);_dragInjector=p(gt);get _canvas(){return this._store.fCanvas}get _transform(){return this._store.transform}get _connections(){return this._store.connections.getAll()}handle(e){if(!this._dragContext.isEmpty()||!this._isValidTrigger(e))return;let n=No(e.event.getPosition(),this._store.flowHost,this._transform),o=this._findConnectionAt(n);o&&(this._capturePointerDown(e),this._startDrag(o,n),queueMicrotask(()=>this._bringToFront(o)))}_findConnectionAt(e){return this._connections.find(n=>S7(n,e))}_capturePointerDown(e){this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(this._transform.scale)}_startDrag(e,n){let o=this._dragInjector.get($m);o.initialize(e,Gy(e,n)),this._dragContext.draggableItems=[o]}_isValidTrigger(e){return on(e.event.originalEvent,e.fTrigger)}_bringToFront(e){this._mediator.execute(new Ai(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||ql)};static \u0275prov=y({token:ql,factory:ql.\u0275fac})};return t=I([E(Vu)],t),t})(),Hu=class{event;static fToken=Symbol("DragConnectionWaypointFinalizeRequest");constructor(i){this.event=i}},qu=class{connectionId;waypoints;constructor(i,e){this.connectionId=i,this.waypoints=e}},Gu=(()=>{class t extends Tt{type="move-connection-waypoint";kind="drag-connection-waypoint";_store=p(A);_point;_pick;get _waypointsComponent(){return this._pick?.connection.fWaypoints()}get _connection(){return this._pick?.connection}setPick(e){this._pick=e}prepareDragSequence(){this._pick?.candidate?(this._point=me({},this._pick.candidate),this._waypointsComponent.insert(this._pick.candidate)):this._pick?.waypoint&&(this._point=me({},this._pick.waypoint),this._waypointsComponent.select(this._pick.waypoint)),this._redrawConnection()}onPointerMove(e){this._waypointsComponent.move(H.sum(this._point,e)),this._redrawConnection()}onPointerUp(){this._waypointsComponent.update(),this._store.fDraggable?.fConnectionWaypointsChanged.emit(this._eventFromPick())}_redrawConnection(){this._connection.setLine(this._connection.line),this._connection.redraw()}_eventFromPick(){return new qu(this._connection.fId(),this._connection.fWaypoints()?.waypoints()||[])}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),E7=(()=>{let t=class Gl{_dragContext=p(fe);get _fDragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isDroppedConnectionReassignEvent()&&this._fDragHandler.onPointerUp()}_isDroppedConnectionReassignEvent(){return this._dragContext.draggableItems.some(e=>e instanceof Gu)}static \u0275fac=function(n){return new(n||Gl)};static \u0275prov=y({token:Gl,factory:Gl.\u0275fac})};return t=I([E(Hu)],t),t})(),ju=class{event;fTrigger;static fToken=Symbol("DragConnectionWaypointPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},M7=(()=>{let t=class jl{_mediator=p(B);_store=p(A);_dragContext=p(fe);_dragInjector=p(gt);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _flowHost(){return this._store.flowHost}get _connections(){return this._store.connections.getAll()}handle(e){let n=No(e.event.getPosition(),this._flowHost,this._transform),o=this._pickControlPoint(n);if(!o||!this._isValidTrigger(e))return;let r=this._dragInjector.get(Gu);r.setPick(o),this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._flowHost).div(this._transform.scale),this._dragContext.draggableItems=[r],queueMicrotask(()=>this._updateConnectionLayer(o.connection))}_pickControlPoint(e){if(this._dragContext.isEmpty())return n5(this._connections,e)}_isValidTrigger(e){return on(e.event.originalEvent,e.fTrigger)}_updateConnectionLayer(e){this._mediator.execute(new Ai(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||jl)};static \u0275prov=y({token:jl,factory:jl.\u0275fac})};return t=I([E(ju)],t),t})(),D7=[b7,y7,C7,v7,x7,w7,T7,I7,M7,E7],Uu=class{event;static fToken=Symbol("DropToGroupFinalizeRequest");constructor(i){this.event=i}},P7=1,Fr=(()=>{class t extends Tt{type="move-node-to-parent";kind="assign-to-container";_store=p(A);_dragSession=p(fe);get _transform(){return this._store.transform}_candidateGroups=[];_debounceTimer=null;_activeTarget=null;get activeTarget(){return this._activeTarget}initialize(e){this._candidateGroups=e}prepareDragSequence(){for(let{node:e}of this._candidateGroups)e.hostElement.classList.add(pt.GROUPING.DROP_ACTIVE)}onPointerMove(e){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._updateActiveTarget(e),P7)}onPointerUp(){this._clearActiveTarget();for(let{node:e}of this._candidateGroups)e.hostElement.classList.remove(pt.GROUPING.DROP_ACTIVE);this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}_updateActiveTarget(e){let n=this._getPointerInFlow(e),o=this._findTargetUnderPointer(n);o?this._setActiveTarget(o):this._clearActiveTarget()}_getPointerInFlow(e){let n=he.fromPoint(this._dragSession.onPointerDownPosition).add(e),o=he.fromPoint(this._transform.position).add(this._transform.scaledPosition).div(this._transform.scale);return n.sub(o)}_findTargetUnderPointer(e){return this._candidateGroups.find(n=>ne.isIncludePoint(n.rect,e))}_setActiveTarget(e){this._activeTarget?.node!==e.node&&(this._clearActiveTarget(),this._activeTarget=e,e.node.setClass(pt.GROUPING.OVER_BOUNDARY))}_clearActiveTarget(){this._activeTarget?.node.removeClass(pt.GROUPING.OVER_BOUNDARY),this._activeTarget=null}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),$u=class{nodesAndGroups;static fToken=Symbol("CreateDragNodeHierarchyRequest");constructor(i){this.nodesAndGroups=i}},Wm=class{rootHandlers;participants;constructor(i,e){this.rootHandlers=i,this.participants=e}},Km=class{fNodeIds;constructor(i){this.fNodeIds=i}},y_="move-node",C_="drag-node";function R7(t){return t.getEvent().kind===C_||t.getEvent().fEventType===y_}var ai=(()=>{class t extends Tt{type=y_;kind=C_;data(){return new Km(this.items.map(e=>e.nodeOrGroup.fId()))}_magneticLines=null;_magneticRects=null;items;roots;initialize(e,n){this.items=e,this.roots=n}setMagneticLines(e){this._magneticLines=e}setMagneticRects(e){this._magneticRects=e}calculateMagneticLinesGuides(e){return this.calculateMagneticSnaps(e).lines}calculateMagneticSnaps(e){this._previewRoots(e);let n=this._rootsUnionRect();return{lines:this._magneticLines?._computeGuides(n),rects:this._magneticRects?._computeRects(n)}}prepareDragSequence(){for(let e of this.roots)e.prepareDragSequence()}onPointerMove(e){this._previewRoots(e);let n=this._rootsUnionRect();this._magneticLines?.scheduleRender(n),this._magneticRects?.scheduleRender(n)}onPointerUp(){for(let e of this.roots)e.onPointerUp();this._magneticLines?.clearGuides(),this._magneticRects?.clearGuides(),requestAnimationFrame(()=>this._refreshDraggedNodes())}_previewRoots(e){for(let n of this.roots)n.onPointerMove(e)}_rootsUnionRect(){let e=null;for(let n of this.roots){let o=n.getLastRect();e=e?ne.union([e,o]):o}return e??ne.initialize()}_refreshDraggedNodes(){for(let{nodeOrGroup:e}of this.roots)e.refresh()}destroy(){for(let e of this.roots??[])e.destroy?.()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Wu=class{_limits;_quantizeStep;constructor(i,e=.5){this._limits=i,this._quantizeStep=e}applyInto(i,e){let{min:n,max:o}=this._limits,r=this._clamp(i.x,n.x,o.x),a=this._clamp(i.y,n.y,o.y),s=i.x-r,c=i.y-a,u=this._quantizeSigned(s,this._quantizeStep),h=this._quantizeSigned(c,this._quantizeStep);e.value.x=r,e.value.y=a,e.edges.left=u<0,e.edges.right=u>0,e.edges.top=h<0,e.edges.bottom=h>0,e.overflow.x=Math.abs(u),e.overflow.y=Math.abs(h)}_quantizeSigned(i,e){if(e<=0||i===0)return 0;let n=i/e;return(i>0?Math.ceil(n):Math.floor(n))*e}_clamp(i,e,n){return Math.min(Math.max(i,e),n)}},Ym=class{_pointerDown;_vCellSize;_hCellSize;_snapWhileDragging;constructor(i,e){this._pointerDown=e,this._vCellSize=i.vCellSize(),this._hCellSize=i.hCellSize(),this._snapWhileDragging=i.fCellSizeWhileDragging()}snap(i,e){let n=e||this._snapWhileDragging;return this._strategies[+n](i)}_strategies={0:this._noSnap.bind(this),1:this._snapWithCellSize.bind(this)};_snapWithCellSize(i){return{x:this._snapToGrid(this._pointerDown.x+i.x,this._hCellSize)-this._pointerDown.x,y:this._snapToGrid(this._pointerDown.y+i.y,this._vCellSize)-this._pointerDown.y}}_noSnap(i){return i}_snapToGrid(i,e){return Math.round(i/e)*e}};function iy(){return{value:{x:0,y:0},overflow:{x:0,y:0},edges:{left:!1,right:!1,top:!1,bottom:!1}}}var Xm=class{_snapper;_hardClamp;_hardResult=iy();_softClamps=[];_softResults=[];constructor(i,e,n){let o=i.get(A).fDraggable;this._snapper=new Ym(o,e),this._hardClamp=new Wu(n.hard,.5);for(let r of n.soft)this._softClamps.push(new Wu(r.limits,.5)),this._softResults.push(iy())}apply(i,e=!1){let n=this._snapper.snap(i,e);this._hardClamp.applyInto(n,this._hardResult);let o={x:this._hardResult.value.x,y:this._hardResult.value.y};for(let r=0;r<this._softClamps.length;r++)this._softClamps[r].applyInto(o,this._softResults[r]);return{hardDelta:o,soft:this._softResults}}finalize(i){return this.apply(i,!0)}};function oy(t,i,e){let{x:n,y:o,width:r,height:a}=t;return e.right&&i.x>0&&(r+=i.x),e.left&&i.x>0&&(n-=i.x,r+=i.x),e.bottom&&i.y>0&&(a+=i.y),e.top&&i.y>0&&(o-=i.y,a+=i.y),ne.initialize(n,o,r,a)}var Zm=class extends Tt{_injector;nodeOrGroup;children;sourceConnectionHandlers;targetConnectionHandlers;type=y_;kind=C_;_startPosition=H.initialize();_startRect=ne.initialize();_applyConstraints=i=>i;_lastSoftResults=[];_deltaConstraints;_constraints;_lastPosition=H.initialize();_softParentConnectionHandlers=[];_mediator;constructor(i,e,n=[],o=[],r=[]){super(),this._injector=i,this.nodeOrGroup=e,this.children=n,this.sourceConnectionHandlers=o,this.targetConnectionHandlers=r,this._mediator=i.get(B),this._startRect=this._mediator.execute(new it(e.hostElement)),this._startPosition=me({},e._position)}setConstraints(i){this._constraints=i,this._deltaConstraints=new Xm(this._injector,this._startPosition,i),this._applyConstraints=e=>{let n=this._deltaConstraints.apply(e);return this._applySoftExpansions(n.soft),n.hardDelta}}setSoftParentConnectionHandlers(i){this._softParentConnectionHandlers=i}finalizeConstraints(){this._applyConstraints=i=>{let e=this._deltaConstraints.finalize(i);return this._applySoftExpansions(e.soft),e.hardDelta}}getLastRect(){return ne.initialize(this._lastPosition.x,this._lastPosition.y,this._startRect.width,this._startRect.height)}prepareDragSequence(){for(let i of this.children)i.prepareDragSequence();this.nodeOrGroup.hostElement.classList.add(pt.DRAG_AND_DROP.DRAGGING)}onPointerMove(i){let e=this._applyConstraints(i);for(let n of this.children)n.onPointerMove(e);this._redraw(this._startPlus(e));for(let n of this.sourceConnectionHandlers)n.setSourceDelta(e);for(let n of this.targetConnectionHandlers)n.setTargetDelta(e)}onPointerUp(){for(let i of this.children)i.onPointerUp();this.nodeOrGroup.position.set(this.nodeOrGroup._position),this.nodeOrGroup.hostElement.classList.remove(pt.DRAG_AND_DROP.DRAGGING),this._emitExpandedEvent()}_startPlus(i){return H.sum(this._startPosition,i)}_redraw(i){this._lastPosition=i,this.nodeOrGroup.updatePosition(i),this._mediator.execute(new Pi(this.nodeOrGroup.fId(),ne.initialize(i.x,i.y,this._startRect.width,this._startRect.height))),this.nodeOrGroup.redraw()}_applySoftExpansions(i){this._lastSoftResults=i;for(let e=0;e<i.length;e++){let n=i[e],o=this._constraints.soft[e],r=oy(o.boundingRect,n.overflow,n.edges);this._commitParentRect(o.nodeOrGroup,r)&&this._updateParentConnectionHandlers(e)}}_commitParentRect(i,e){let n=i._position.x!==e.x||i._position.y!==e.y||i._size?.width!==e.width||i._size?.height!==e.height;return i.updateSize({width:e.width,height:e.height}),i.updatePosition({x:e.x,y:e.y}),this._mediator.execute(new Pi(i.fId(),e)),i.redraw(),n}_updateParentConnectionHandlers(i){let e=this._softParentConnectionHandlers[i];if(!e)return;let n=new Map;for(let o of e.source){let r=this._readConnectorRect(o.connector,n);o.handler.setSourceDelta(this._buildDelta(o.baselineRect,r))}for(let o of e.target){let r=this._readConnectorRect(o.connector,n);o.handler.setTargetDelta(this._buildDelta(o.baselineRect,r))}}_readConnectorRect(i,e){let n=`${i.kind}::${i.fId()}`,o=e.get(n);if(o)return o;let r=this._mediator.execute(new qt(i)).rect;return e.set(n,r),r}_buildDelta(i,e){return H.initialize(e.x-i.x,e.y-i.y)}_emitExpandedEvent(){for(let i=0;i<this._lastSoftResults.length;i++){let e=this._lastSoftResults[i];if(!e.overflow.x&&!e.overflow.y)continue;let n=this._constraints.soft[i],o=oy(n.boundingRect,e.overflow,e.edges);n.nodeOrGroup.sizeChange.emit(o)}}destroy(){for(let i of this.children)i.destroy?.();this.children=[],this.sourceConnectionHandlers=[],this.targetConnectionHandlers=[],this._lastSoftResults=[],this._applyConstraints=i=>i,this._softParentConnectionHandlers=[]}},O7=(()=>{let t=class Ul{_injector=p(ft);handle({nodesAndGroups:e}){let n=this._createHandlerByNodeId(e),o=this._linkParentsAndCollectRoots(e,n);return new Wm(o,Array.from(n.values()))}_createHandlerByNodeId(e){let n=new Map;for(let o of e)n.set(o.fId(),new Zm(this._injector,o));return n}_linkParentsAndCollectRoots(e,n){let o=[];for(let r of e){let a=n.get(r.fId());if(!a)continue;let s=r.fParentId(),c=s?n.get(s):void 0;c?c.children.push(a):o.push(a)}return o}static \u0275fac=function(n){return new(n||Ul)};static \u0275prov=y({token:Ul,factory:Ul.\u0275fac})};return t=I([E($u)],t),t})(),Ku=class{nodeOrGroup;static fToken=Symbol("BuildDragNodeConstraintsRequest");constructor(i){this.nodeOrGroup=i}},Nr=class{nodeOrGroup;childrenPaddings;static fToken=Symbol("ReadNodeBoundsWithPaddingsRequest");constructor(i,e){this.nodeOrGroup=i,this.childrenPaddings=e}},Qm=class{nodeOrGroup;boundingRect;innerRect;paddings;constructor(i,e,n,o){this.nodeOrGroup=i,this.boundingRect=e,this.innerRect=n,this.paddings=o}},F7=(()=>{let t=class $l{_mediator=p(B);handle({nodeOrGroup:e,childrenPaddings:n}){let o=this._readBoundingRect(e),r=this._readOwnPaddings(e,o),a=[r[0]+n[0],r[1]+n[1],r[2]+n[2],r[3]+n[3]],s=ne.initialize(o.x+a[0],o.y+a[1],o.width-a[0]-a[2],o.height-a[1]-a[3]);return new Qm(e,o,s,a)}_readBoundingRect(e){return this._mediator.execute(new it(e.hostElement))}_readOwnPaddings(e,n){return this._mediator.execute(new Ni(e,n))}static \u0275fac=function(n){return new(n||$l)};static \u0275prov=y({token:$l,factory:$l.\u0275fac})};return t=I([E(Nr)],t),t})(),N7=(()=>{let t=class Wl{_mediator=p(B);handle({nodeOrGroup:e}){let n=this._readCurrentRect(e),o=this._readParentsChain(e);return this._buildConstraints(o,n)}_readCurrentRect(e){return this._mediator.execute(new it(e.hostElement))}_readParentsChain(e){return this._mediator.execute(new Mo(e))??[]}_buildConstraints(e,n){let o=[],r=Ny(),a=[0,0,0,0];for(let s of e){let c=this._readParentBounds(s,a);a=c.paddings;let u=this._calculateDifference(c.innerRect,n);if(this._isAutoExpand(s))o.push(this._makeSoftLimit(s,c.boundingRect,u));else{r=u;break}}return{soft:o,hard:r}}_readParentBounds(e,n){return this._mediator.execute(new Nr(e,n))}_calculateDifference(e,n){return{min:this._calculateMinimumDifference(e,n),max:this._calculateMaximumDifference(e,n)}}_calculateMinimumDifference(e,n){return H.initialize(e.x-n.x,e.y-n.y)}_calculateMaximumDifference(e,n){return H.initialize(e.x+e.width-(n.x+n.width),e.y+e.height-(n.y+n.height))}_isAutoExpand(e){return e.fAutoExpandOnChildHit()}_makeSoftLimit(e,n,o){return{nodeOrGroup:e,boundingRect:n,initialSize:e._size,limits:o}}static \u0275fac=function(n){return new(n||Wl)};static \u0275prov=y({token:Wl,factory:Wl.\u0275fac})};return t=I([E(Ku)],t),t})(),Yu=class{rootHandlers;participants;static fToken=Symbol("CreateDragNodeHandlerRequest");constructor(i,e){this.rootHandlers=i,this.participants=e}},Xu=class{dragHandler;constraints;handlerPool;static fToken=Symbol("AttachSoftParentConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.constraints=e,this.handlerPool=n}},Ar=class{_mediator=p(B);_store=p(A);_behaviour=p(Fo);_source;_target;_sourceRef;_targetRef;_sourceDelta=H.initialize();_targetDelta=H.initialize();connection;initialize(i){this.connection=i,this._source=this._store.outputs.require(this.connection.fOutputId()),this._target=this._store.inputs.require(this.connection.fInputId()),this._sourceRef=this._readRectRef(this._source),this._targetRef=this._readRectRef(this._target)}setSourceDelta(i){this._sourceDelta=i,this._mediator.execute(new Di(this._source.fId(),this._source.kind,this._withDelta(this._sourceRef.rect,i)))}setTargetDelta(i){this._targetDelta=i,this._mediator.execute(new Di(this._target.fId(),this._target.kind,this._withDelta(this._targetRef.rect,i)))}redraw(){let i=this._buildLine();this.connection.setLine(i),this.connection.redraw()}_buildLine(){let i=rt.fromRoundedRect(this._sourceRef.rect).addPoint(this._sourceDelta),e=rt.fromRoundedRect(this._targetRef.rect).addPoint(this._targetDelta);return this._behaviour.handle(new _n(i,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(i){return this._mediator.execute(new qt(i))}_withDelta(i,e){return rt.fromRoundedRect(i).addPoint(e)}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},Lr=(()=>{class t extends Ar{setSourceDelta(e){super.setSourceDelta(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Br=(()=>{class t extends Ar{_sourceUpdated=!1;_targetUpdated=!1;setSourceDelta(e){super.setSourceDelta(e),this._sourceUpdated=!0,this._redrawIfReady()}setTargetDelta(e){super.setTargetDelta(e),this._targetUpdated=!0,this._redrawIfReady()}_redrawIfReady(){!this._sourceUpdated||!this._targetUpdated||(this._sourceUpdated=!1,this._targetUpdated=!1,this.redraw())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Vr=(()=>{class t extends Ar{setTargetDelta(e){super.setTargetDelta(e),this.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),A7=(()=>{let t=class Kl{_store=p(A);_mediator=p(B);_dragInjector=p(gt);handle({dragHandler:e,constraints:n,handlerPool:o}){let r=n.soft.map(a=>this._buildParentConnectionHandlers(a.nodeOrGroup,o));e.setSoftParentConnectionHandlers(r)}_buildParentConnectionHandlers(e,n){let o=this._store.outputs.getAll().filter(h=>h.fNodeId===e.fId()),r=this._store.inputs.getAll().filter(h=>h.fNodeId===e.fId());if(!o.length&&!r.length)return{source:[],target:[]};let a=new Set(o.map(h=>h.fId())),s=new Set(r.map(h=>h.fId())),c=new Map,u={source:[],target:[]};for(let h of this._store.connections.getAll()){let g=a.has(h.fOutputId()),C=s.has(h.fInputId());if(!g&&!C)continue;let M=this._getExistingConnectionHandler(n,h);if(M||(M=this._createConnectionHandler(h,g,C),n.push(M)),g){let S=this._store.outputs.require(h.fOutputId());u.source.push({handler:M,connector:S,baselineRect:this._readConnectorRect(S,c)})}if(C){let S=this._store.inputs.require(h.fInputId());u.target.push({handler:M,connector:S,baselineRect:this._readConnectorRect(S,c)})}}return u}_getExistingConnectionHandler(e,n){return e.find(o=>o.connection.fId()===n.fId())}_createConnectionHandler(e,n,o){let r;return n&&o?r=this._dragInjector.createInstance(Br):n?r=this._dragInjector.createInstance(Lr):r=this._dragInjector.createInstance(Vr),r.initialize(e),r}_readConnectorRect(e,n){let o=`${e.kind}::${e.fId()}`,r=n.get(o);if(r)return r;let a=this._mediator.execute(new qt(e)).rect;return n.set(o,a),a}static \u0275fac=function(n){return new(n||Kl)};static \u0275prov=y({token:Kl,factory:Kl.\u0275fac})};return t=I([E(Xu)],t),t})(),L7=(()=>{let t=class Yl{_dragInjector=p(gt);_mediator=p(B);handle({rootHandlers:e,participants:n}){let o=this._collectConnectionHandlers(n);this._applyConstraintsToRoots(e,o);let r=this._dragInjector.createInstance(ai);return r.initialize(n,e),r}_applyConstraintsToRoots(e,n){for(let o of e){let r=this._calculateConstraints(o.nodeOrGroup);o.setConstraints(r),this._attachSoftParentConnectionHandlers(o,r,n)}}_collectConnectionHandlers(e){let n=new Map;for(let o of e){for(let r of o.sourceConnectionHandlers)n.set(r.connection.fId(),r);for(let r of o.targetConnectionHandlers)n.set(r.connection.fId(),r)}return Array.from(n.values())}_attachSoftParentConnectionHandlers(e,n,o){this._mediator.execute(new Xu(e,n,o))}_calculateConstraints(e){return this._mediator.execute(new Ku(e))}static \u0275fac=function(n){return new(n||Yl)};static \u0275prov=y({token:Yl,factory:Yl.\u0275fac})};return t=I([E(Yu)],t),t})(),Zu=class{dragHandler;sourceIds;handlerPool;static fToken=Symbol("AttachTargetConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.sourceIds=e,this.handlerPool=n}},B7=(()=>{let t=class Xl{_store=p(A);_dragInjector=p(gt);get _connections(){return this._store.connections.getAll()}handle(e){this._getInputConnections(e.dragHandler.nodeOrGroup).forEach(n=>{this._createAndSetConnectionToNodeHandler(n,e)})}_getInputConnections(e){let n=new Set(this._getNodeInputIds(e));return this._connections.filter(o=>n.has(o.fInputId()))}_getNodeInputIds(e){return this._store.inputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let o=this._getExistingConnectionHandler(n.handlerPool,e);o||(o=this._createConnectionHandler(n.sourceIds,e),n.handlerPool.push(o)),n.dragHandler.targetConnectionHandlers.push(o)}_getExistingConnectionHandler(e,n){return e.find(o=>o.connection.fId()===n.fId())}_createConnectionHandler(e,n){let o;return e.includes(n.fOutputId())?o=this._dragInjector.createInstance(Br):o=this._dragInjector.createInstance(Vr),o.initialize(n),o}static \u0275fac=function(n){return new(n||Xl)};static \u0275prov=y({token:Xl,factory:Xl.\u0275fac})};return t=I([E(Zu)],t),t})(),Qu=class{dragHandler;targetIds;handlerPool;static fToken=Symbol("AttachSourceConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.targetIds=e,this.handlerPool=n}},V7=(()=>{let t=class Zl{_store=p(A);_dragInjector=p(gt);get _connections(){return this._store.connections.getAll()}handle(e){this._getOutputConnections(e.dragHandler.nodeOrGroup).forEach(n=>{this._createAndSetConnectionToNodeHandler(n,e)})}_getOutputConnections(e){let n=new Set(this._getNodeOutputIds(e));return this._connections.filter(o=>n.has(o.fOutputId()))}_getNodeOutputIds(e){return this._store.outputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let o=this._getExistingConnectionHandler(n.handlerPool,e);o||(o=this._createConnectionHandler(n.targetIds,e),n.handlerPool.push(o)),n.dragHandler.sourceConnectionHandlers.push(o)}_getExistingConnectionHandler(e,n){return e.find(o=>o.connection.fId()===n.fId())}_createConnectionHandler(e,n){let o;return e.includes(n.fInputId())?o=this._dragInjector.createInstance(Br):o=this._dragInjector.createInstance(Lr),o.initialize(n),o}static \u0275fac=function(n){return new(n||Zl)};static \u0275prov=y({token:Zl,factory:Zl.\u0275fac})};return t=I([E(Qu)],t),t})(),Ju=class{nodeOrGroup;static fToken=Symbol("AttachDragNodeHandlerFromSelectionRequest");constructor(i){this.nodeOrGroup=i}},z7=(()=>{let t=class Ql{_mediator=p(B);_store=p(A);_dragSession=p(fe);handle({nodeOrGroup:e}){let n=this._collectSelected(e),o=this._withDeepChildren(n),r=this._mediator.execute(new $u(o)),a=this._collectSourceConnectorIds(o),s=this._collectTargetConnectorIds(o);return this._attachConnectionHandlers(r.participants,a,s),this._mediator.execute(new Yu(r.rootHandlers,r.participants))}_collectSelected(e){let n=[];for(let o of this._dragSession.selectedItems){let r=this._findNodeByHost(o.hostElement);r&&n.push(r)}return e&&!n.includes(e)&&n.push(e),n}_findNodeByHost(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_withDeepChildren(e){let n=[];for(let o of e){n.push(o);let r=this._mediator.execute(new Oo(o.fId()));n.push(...r)}return n}_collectSourceConnectorIds(e){return Zf(e,n=>this._store.outputs.getAll().filter(o=>o.fNodeId===n.fId()).map(o=>o.fId()))}_collectTargetConnectorIds(e){return Zf(e,n=>this._store.inputs.getAll().filter(o=>o.fNodeId===n.fId()).map(o=>o.fId()))}_attachConnectionHandlers(e,n,o){let r=[];for(let a of e)this._mediator.execute(new Qu(a,o,r)),this._mediator.execute(new Zu(a,n,r))}static \u0275fac=function(n){return new(n||Ql)};static \u0275prov=y({token:Ql,factory:Ql.\u0275fac})};return t=I([E(Ju)],t),t})(),H7=[O7,N7,L7,B7,V7,A7,F7,z7];function q7(t,i,e=10){let n=i.x,o=i.y,r=n+i.width,a=o+i.height,s=i.gravityCenter.x,c=i.gravityCenter.y,u,h,g=1/0,C,M,S=1/0,N=($,J)=>{let ce=J<0?-J:J;ce<=e&&ce<g&&(g=ce,u=$,h=J)},q=($,J)=>{let ce=J<0?-J:J;ce<=e&&ce<S&&(S=ce,C=$,M=J)};for(let $=0;$<t.length;$++){let J=t[$],ce=J.x,Re=J.y,xe=ce+J.width,He=Re+J.height,Nt=J.gravityCenter.x,ct=J.gravityCenter.y;N(ce,n-ce),N(xe,n-xe),N(Nt,s-Nt),N(ce,r-ce),N(xe,r-xe),q(Re,o-Re),q(He,o-He),q(ct,c-ct),q(Re,a-Re),q(He,a-He)}return{x:{guide:u,delta:h},y:{guide:C,delta:M}}}var ry=["left","top","width","height"],ep=class{_element;constructor(i,e,n="f-line"){this._element=i.document.createElement("div"),this._element.classList.add(n),this._element.style.position="absolute",this._element.style.display="none",e.appendChild(this._element)}show(){this._element.style.display="block"}hide(){this._element.style.display="none"}render(i){for(let e of ry){let n=i[e];n!=null&&(this._element.style[e]=`${n}px`)}}clearRect(){for(let i of ry)this._element.style.removeProperty(i)}destroy(){this._element.remove()}},Jm=class{_horizontal;_vertical;constructor(i,e){this._horizontal=new ep(i,e),this._vertical=new ep(i,e),this._horizontal.hide(),this._vertical.hide()}drawVerticalLine(i,e,n){this._vertical.show(),this._vertical.render({left:i*n.scale+n.position.x+n.scaledPosition.x,top:0,width:1,height:e.height})}drawHorizontalLine(i,e,n){this._horizontal.show(),this._horizontal.render({left:0,top:i*n.scale+n.position.y+n.scaledPosition.y,width:e.width,height:1})}hideVertical(){this._vertical.hide()}hideHorizontal(){this._horizontal.hide()}hideAll(){this._vertical.hide(),this._horizontal.hide()}destroy(){this._vertical.destroy(),this._horizontal.destroy()}},tp=class{static fToken=Symbol("MagneticLinesPreparationRequest")},G7=(()=>{let t=class Jl{_mediator=p(B);_store=p(A);_browser=p(at);_injector=p(ft);_dragSession=p(fe);_renderer;handle(e){let n=this._store.instances.get(We.MAGNETIC_LINES);if(!n)return;let o=this._dragSession.draggableItems.find(r=>r instanceof ai);o&&o.setMagneticLines(new e_(this._injector,this._renderer??this._createRenderer(n),this._flowHostSize(),this._notDraggedRects(this._draggedNodes(o.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_flowHostSize(){return this._store.flowHost.getBoundingClientRect()}_createRenderer({hostElement:e}){return this._renderer=new Jm(this._browser,e),this._renderer}_notDraggedRects(e){let n=new Set(e);return this._store.nodes.getAll().filter(r=>!n.has(r)).map(r=>this._mediator.execute(new it(r.hostElement)))}static \u0275fac=function(n){return new(n||Jl)};static \u0275prov=y({token:Jl,factory:Jl.\u0275fac})};return t=I([E(tp)],t),t})(),e_=class{_renderer;_size;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;constructor(i,e,n,o){this._renderer=e,this._size=n,this._rects=o;let r=i.get(A);this._alignThreshold=r.instances.require(We.MAGNETIC_LINES).threshold(),this._canvasTransform=r.transform}scheduleRender(i){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderGuides(this._computeGuides(i)),15)}_renderGuides(i){this._renderVertical(i),this._renderHorizontal(i)}_renderVertical(i){i.x.guide!==void 0?this._renderer.drawVerticalLine(i.x.guide,this._size,this._canvasTransform):this._renderer.hideVertical()}_renderHorizontal(i){i.y.guide!==void 0?this._renderer.drawHorizontalLine(i.y.guide,this._size,this._canvasTransform):this._renderer.hideHorizontal()}_computeGuides(i){return q7(this._rects,i,this._alignThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},ay=["top","center","bottom"],sy=["left","center","right"];function j7(t,i,e=10,n=10){let o=i.x,r=i.y,a=o+i.width,s=r+i.height,c=i.gravityCenter.x,u=i.gravityCenter.y,h=U7(t,i,o,r,a,s,c,u,e,n),g=$7(t,i,o,r,a,s,c,u,e,n);return h&&(!g||h.absDelta<=g.absDelta)?{axis:"x",delta:h.delta,gap:h.gap,rects:h.rects,alignMode:h.alignMode,crossDelta:h.crossDelta}:g?{axis:"y",delta:g.delta,gap:g.gap,rects:g.rects,alignMode:g.alignMode,crossDelta:g.crossDelta}:{rects:[]}}function U7(t,i,e,n,o,r,a,s,c,u){let h=1/0,g,C=0,M,S=[],N=0,q=[],$=[],J=[];for(let ce=0;ce<ay.length;ce++){let Re=ce===0?n:ce===1?s:r;q.length=0,$.length=0,J.length=0;let xe=1/0,He=-1/0,Nt=0,ct=1/0,mt=1/0;for(let ze=0;ze<t.length;ze++){let Fe=t[ze],Qo=ce===0?Fe.y:ce===1?Fe.gravityCenter.y:Fe.y+Fe.height,ff=Re-Qo,Dn=vo(ff);if(Dn>c)continue;q.push(ze),$.push(Fe.x),J.push(Fe.x+Fe.width);let Jo=Fe.y,er=Fe.y+Fe.height;Jo<xe&&(xe=Jo),er>He&&(He=er),(Dn<ct||Dn===ct&&ze<mt)&&(ct=Dn,Nt=Qo,mt=ze)}let tt=q.length;if(tt<2)continue;$y(q,$,J);let st=0;for(;st<tt&&$[st]<=a;)st++;let vi=st>0&&st<tt,Ct,At;vi?(Ct=st-1,At=st):st<=0?(Ct=0,At=1):(Ct=tt-2,At=tt-1);let Lt=$[At]-J[Ct];if(Lt<0)continue;let ht;if(vi){ht=J[Ct]+Lt;let ze=ht+i.width,Fe=$[At]-ze;if(vo(Fe-Lt)>u)continue}else st<=0?ht=$[0]-Lt-i.width:ht=J[tt-1]+Lt;let Zo=e-ht,bi=vo(Zo);if(bi>u||bi>=h)continue;let ln=W7(q,$,J,xe,He);if(vi){let ze=ht,Fe=ht+i.width;ln.push({left:J[Ct],top:xe,width:ze-J[Ct],height:He-xe}),ln.push({left:Fe,top:xe,width:$[At]-Fe,height:He-xe})}else if(st<=0){let ze=ht+i.width;ln.push({left:ze,top:xe,width:$[0]-ze,height:He-xe})}else ln.push({left:J[tt-1],top:xe,width:ht-J[tt-1],height:He-xe});let hf=Re-Nt;h=bi,g=Zo,C=Lt,M=ay[ce],S=ln,N=hf}if(!(g===void 0||M===void 0))return{delta:g,absDelta:h,gap:C,rects:S,alignMode:M,crossDelta:N}}function $7(t,i,e,n,o,r,a,s,c,u){let h=1/0,g,C=0,M,S=[],N=0,q=[],$=[],J=[];for(let ce=0;ce<sy.length;ce++){let Re=ce===0?e:ce===1?a:o;q.length=0,$.length=0,J.length=0;let xe=1/0,He=-1/0,Nt=0,ct=1/0,mt=1/0;for(let ze=0;ze<t.length;ze++){let Fe=t[ze],Qo=ce===0?Fe.x:ce===1?Fe.gravityCenter.x:Fe.x+Fe.width,ff=Re-Qo,Dn=vo(ff);if(Dn>c)continue;q.push(ze),$.push(Fe.y),J.push(Fe.y+Fe.height);let Jo=Fe.x,er=Fe.x+Fe.width;Jo<xe&&(xe=Jo),er>He&&(He=er),(Dn<ct||Dn===ct&&ze<mt)&&(ct=Dn,Nt=Qo,mt=ze)}let tt=q.length;if(tt<2)continue;$y(q,$,J);let st=0;for(;st<tt&&$[st]<=s;)st++;let vi=st>0&&st<tt,Ct,At;vi?(Ct=st-1,At=st):st<=0?(Ct=0,At=1):(Ct=tt-2,At=tt-1);let Lt=$[At]-J[Ct];if(Lt<0)continue;let ht;if(vi){ht=J[Ct]+Lt;let ze=ht+i.height,Fe=$[At]-ze;if(vo(Fe-Lt)>u)continue}else st<=0?ht=$[0]-Lt-i.height:ht=J[tt-1]+Lt;let Zo=n-ht,bi=vo(Zo);if(bi>u||bi>=h)continue;let ln=K7(q,$,J,xe,He);if(vi){let ze=ht,Fe=ht+i.height;ln.push({left:xe,top:J[Ct],width:He-xe,height:ze-J[Ct]}),ln.push({left:xe,top:Fe,width:He-xe,height:$[At]-Fe})}else if(st<=0){let ze=ht+i.height;ln.push({left:xe,top:ze,width:He-xe,height:$[0]-ze})}else ln.push({left:xe,top:J[tt-1],width:He-xe,height:ht-J[tt-1]});let hf=Re-Nt;h=bi,g=Zo,C=Lt,M=sy[ce],S=ln,N=hf}if(!(g===void 0||M===void 0))return{delta:g,absDelta:h,gap:C,rects:S,alignMode:M,crossDelta:N}}function W7(t,i,e,n,o){let r=[],a=o-n;for(let s=0;s<t.length-1;s++){let c=i[s+1]-e[s];c<0||r.push({left:e[s],top:n,width:c,height:a})}return r}function K7(t,i,e,n,o){let r=[],a=o-n;for(let s=0;s<t.length-1;s++){let c=i[s+1]-e[s];c<0||r.push({left:n,top:e[s],width:a,height:c})}return r}function $y(t,i,e){for(let n=1;n<i.length;n++){let o=i[n],r=e[n],a=t[n],s=n-1;for(;s>=0;){let c=i[s],u=t[s];if(c<o||c===o&&u<a)break;i[s+1]=c,e[s+1]=e[s],t[s+1]=u,s--}i[s+1]=o,e[s+1]=r,t[s+1]=a}}function vo(t){return t<0?-t:t}var t_=class{_element;_isVisible=!1;_left=Number.NaN;_top=Number.NaN;_width=Number.NaN;_height=Number.NaN;constructor(i,e,n="f-rect"){this._element=i.document.createElement("div"),this._element.classList.add(n);let o=this._element.style;o.position="absolute",o.display="none",o.boxSizing="border-box",o.pointerEvents="none",e.appendChild(this._element)}show(){this._isVisible||(this._isVisible=!0,this._element.style.display="block")}hide(){this._isVisible&&(this._isVisible=!1,this._element.style.display="none")}render(i,e,n,o){let r=this._element.style;i!==this._left&&(this._left=i,r.left=i+"px"),e!==this._top&&(this._top=e,r.top=e+"px"),n!==this._width&&(this._width=n,r.width=n+"px"),o!==this._height&&(this._height=o,r.height=o+"px")}clearRect(){this._left=Number.NaN,this._top=Number.NaN,this._width=Number.NaN,this._height=Number.NaN;let i=this._element.style;i.removeProperty("left"),i.removeProperty("top"),i.removeProperty("width"),i.removeProperty("height")}destroy(){this._element.remove()}},n_=class{_browser;_hostElement;_className;_pool=[];_activeCount=0;constructor(i,e,n="f-rect"){this._browser=i,this._hostElement=e,this._className=n}draw(i,e){let n=e.scale,o=e.position.x+e.scaledPosition.x,r=e.position.y+e.scaledPosition.y;for(let a=0;a<i.length;a++){let s=this._getOrCreate(a),c=i[a];s.show(),s.render(c.left*n+o,c.top*n+r,c.width*n,c.height*n)}for(let a=i.length;a<this._activeCount;a++)this._pool[a].hide();this._activeCount=i.length}hideAll(){for(let i=0;i<this._activeCount;i++)this._pool[i].hide();this._activeCount=0}destroy(){for(let i of this._pool)i.destroy();this._pool.length=0,this._activeCount=0}_getOrCreate(i){if(i<this._pool.length)return this._pool[i];let e=new t_(this._browser,this._hostElement,this._className);return this._pool.push(e),e}},np=class{static fToken=Symbol("MagneticRectsPreparationRequest")},Y7=(()=>{let t=class ec{_mediator=p(B);_store=p(A);_browser=p(at);_injector=p(ft);_dragSession=p(fe);_renderer;handle(e){let n=this._store.instances.get(We.MAGNETIC_RECTS);if(!n)return;let o=this._dragSession.draggableItems.find(r=>r instanceof ai);o&&o.setMagneticRects(new i_(this._injector,this._getRenderer(n),this._notDraggedRects(this._draggedNodes(o.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_getRenderer(e){return this._renderer||(this._renderer=new n_(this._browser,e.hostElement)),this._renderer?.destroy(),this._renderer}_notDraggedRects(e){let n=new Set(e);return this._store.nodes.getAll().filter(r=>!n.has(r)).map(r=>this._mediator.execute(new it(r.hostElement)))}static \u0275fac=function(n){return new(n||ec)};static \u0275prov=y({token:ec,factory:ec.\u0275fac})};return t=I([E(np)],t),t})(),i_=class{_renderer;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;_spacingThreshold=10;constructor(i,e,n){this._renderer=e,this._rects=n;let o=i.get(A),r=o.instances.require(We.MAGNETIC_RECTS);this._alignThreshold=r.alignThreshold(),this._spacingThreshold=r.spacingThreshold(),this._canvasTransform=o.transform}scheduleRender(i){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderRects(this._computeRects(i)),15)}_renderRects(i){if(i.axis!==void 0&&i.delta!==void 0&&i.rects.length>0){this._renderer.draw(i.rects,this._canvasTransform);return}this._renderer.hideAll()}_computeRects(i){return j7(this._rects,i,this._alignThreshold,this._spacingThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},ip=class{event;static fToken=Symbol("DragNodeFinalizeRequest");constructor(i){this.event=i}},o_=class{nodes;fNodes;constructor(i){this.nodes=i,this.fNodes=i}},X7=(()=>{let t=class tc{_mediator=p(B);_store=p(A);_dragSession=p(fe);_dragHandler;handle({event:e}){if(this._dragHandler=this._getDragHandler(),!this._dragHandler)return;let n=this._buildDragDelta(e.getPosition()),o=this._dragHandler.calculateMagneticSnaps(n),r=this._applySnapToDelta(n,o.lines,o.rects);this._finalizeMove(this._dragHandler,r),this._emitNodeIntersectIfNeeded(this._dragHandler)}_getDragHandler(){return this._dragSession.draggableItems.find(R7)}_buildDragDelta(e){return he.fromPoint(e).elementTransform(this._store.flowHost).div(this._dragSession.onPointerDownScale).sub(this._dragSession.onPointerDownPosition)}_applySnapToDelta(e,n,o){let r=e.x,a=e.y;return n&&(r=this._hasLineSnapValue(n.x)?e.x-(n.x.delta||0):r,a=this._hasLineSnapValue(n.y)?e.y-(n.y.delta||0):a),this._hasRectSnapValue(o)&&(o.axis==="x"?(r=e.x-o.delta,a=e.y-(o.crossDelta??0)):(a=e.y-o.delta,r=e.x-(o.crossDelta??0))),{x:r,y:a}}_hasLineSnapValue(e){return e.guide!==void 0&&e.guide!==null}_hasRectSnapValue(e){return!!e&&e.axis!==void 0&&e.delta!==void 0}_finalizeMove(e,n){for(let o of e.roots)o.finalizeConstraints();e.onPointerMove(n),e.onPointerUp?.(),this._store.fDraggable?.fMoveNodes.emit(this._buildMoveNodesEvent(e))}_buildMoveNodesEvent(e){let n=e.getEvent(),a=((n.data??n.fData)?.fNodeIds??[]).map(s=>({id:s,position:this._store.nodes.get(s)?._position}));return new o_(a)}_emitNodeIntersectIfNeeded(e){if(!this._isDraggedJustOneNode(e)||!this._store.fDraggable?.fEmitOnNodeIntersect)return;let n=e.roots[0].nodeOrGroup;queueMicrotask(()=>this._mediator.execute(new Iu(n)))}_isDraggedJustOneNode(e){return e.roots.length===1}static \u0275fac=function(n){return new(n||tc)};static \u0275prov=y({token:tc,factory:tc.\u0275fac})};return t=I([E(ip)],t),t})(),op=class{event;trigger;static fToken=Symbol("DragNodePreparationRequest");constructor(i,e){this.event=i,this.trigger=e}},Z7=(()=>{let t=class nc{_mediator=p(B);_store=p(A);_dragSession=p(fe);handle({event:e,trigger:n}){if(!this._canStartDrag(e,n))return;let o=this._findDraggableNode(e.targetElement);o&&(this._storePointerDownContext(e),this._dragSession.draggableItems=[this._buildDragNodeHandler(o)],this._mediator.execute(new tp),this._mediator.execute(new np))}_canStartDrag(e,n){return this._dragSession.isEmpty()&&this._isDragHandle(e.targetElement)&&on(e.originalEvent,n)}_isDragHandle(e){return _r(e,".f-drag-handle")}_findDraggableNode(e){let n=this._store.nodes.getAll();for(let o of n)if(!o.fDraggingDisabled()&&o.isContains(e))return o}_storePointerDownContext(e){this._dragSession.onPointerDownScale=this._store.transform.scale,this._dragSession.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(this._store.transform.scale)}_buildDragNodeHandler(e){return(e.fSelectionDisabled()||!e.isSelected())&&queueMicrotask(()=>{this._mediator.execute(new Ro(e))}),this._mediator.execute(new Ju(e))}static \u0275fac=function(n){return new(n||nc)};static \u0275prov=y({token:nc,factory:nc.\u0275fac})};return t=I([E(op)],t),t})(),Q7=[...H7,G7,Y7,X7,Z7],r_=class{targetGroupId;nodeIds;dropPosition;fTargetNode;fNodes;fDropPosition;constructor(i,e,n){this.targetGroupId=i,this.nodeIds=e,this.dropPosition=n,this.fTargetNode=i,this.fNodes=e,this.fDropPosition=n}},J7=(()=>{let t=class ic{_dragSession=p(fe);_store=p(A);handle({event:e}){let n=this._findDropHandler();if(!n)return;let o=n.activeTarget?.node;o&&this._emitDropToGroupEvent(o.fId(),e),n.onPointerUp?.()}_findDropHandler(){return this._dragSession.draggableItems.find(e=>e instanceof Fr)}_emitDropToGroupEvent(e,n){this._store.fDraggable?.fDropToGroup.emit(new r_(e,this._getTopLevelDraggedIds(),n.getPosition()))}_getTopLevelDraggedIds(){let n=this._getMoveSummaryHandler().items.map(a=>a.nodeOrGroup),o=new Set(n.map(a=>a.fId())),r=[];for(let a of n){let s=a.fParentId();(!s||!o.has(s))&&r.push(a.fId())}return r}_getMoveSummaryHandler(){let e=this._dragSession.draggableItems.find(n=>n instanceof ai);if(!e)throw new Error("DropToGroup requires DragNodeHandler.");return e}static \u0275fac=function(n){return new(n||ic)};static \u0275prov=y({token:ic,factory:ic.\u0275fac})};return t=I([E(Uu)],t),t})(),rp=class{event;static fToken=Symbol("DropToGroupPreparationRequest");constructor(i){this.event=i}},ap=class{candidates;static fToken=Symbol("SortDropCandidatesByLayerRequest");constructor(i){this.candidates=i}},e9=(()=>{let t=class oc{handle({candidates:e}){let n=e.map((o,r)=>({candidate:o,index:r}));return n.sort((o,r)=>{let a=this._compareDomOrder(o.candidate.node.hostElement,r.candidate.node.hostElement);return a!==0?-a:o.index-r.index}),n.map(o=>o.candidate)}_compareDomOrder(e,n){if(e===n)return 0;let o=e.compareDocumentPosition(n);if((o&Node.DOCUMENT_POSITION_FOLLOWING)!==0)return-1;if((o&Node.DOCUMENT_POSITION_PRECEDING)!==0)return 1;if(o&Node.DOCUMENT_POSITION_DISCONNECTED){let r=e.getBoundingClientRect?.()??{top:0,left:0},a=n.getBoundingClientRect?.()??{top:0,left:0};return r.top!==a.top?r.top<a.top?-1:1:r.left!==a.left?r.left<a.left?-1:1:0}return 0}static \u0275fac=function(n){return new(n||oc)};static \u0275prov=y({token:oc,factory:oc.\u0275fac})};return t=I([E(ap)],t),t})(),a_=class{_onPointerDown;_limit;_vCellSize;_hCellSize;_adjustCellSize;constructor(i,e,n){this._onPointerDown=e,this._limit=n;let o=i.get(A);this._vCellSize=o.fDraggable.vCellSize(),this._hCellSize=o.fDraggable.hCellSize(),this._adjustCellSize=o.fDraggable.fCellSizeWhileDragging()}limit(i){let{min:e,max:n}=this._limit,{x:o,y:r}=this._cellSizeStrategies[+this._adjustCellSize](i);return{x:this._clamp(o,e.x,n.x),y:this._clamp(r,e.y,n.y)}}_cellSizeStrategies={0:this._skipCellSize.bind(this),1:this._applyCellSize.bind(this)};_applyCellSize(i){return{x:this._snapToGrid(this._onPointerDown.x+i.x,this._hCellSize)-this._onPointerDown.x,y:this._snapToGrid(this._onPointerDown.y+i.y,this._vCellSize)-this._onPointerDown.y}}_skipCellSize(i){return i}_clamp(i,e,n){return Math.min(Math.max(i,e),n)}_snapToGrid(i,e){return Math.round(i/e)*e}},sp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePlaceholderRequest");constructor(i){this.externalItem=i}},t9=(()=>{let t=class rc{_browser=p(at);_containerRef=p(qa);handle({externalItem:e}){let{hostElement:n,placeholder:o}=e,r=o(),a=r?this._fromTemplate(r):this._fromHost(n);return a.classList.add("f-external-item-placeholder"),a.style.pointerEvents="none",a}_fromTemplate(e){return em(this._createViewRef(e),this._browser.document)}_fromHost(e){return Qf(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}static \u0275fac=function(n){return new(n||rc)};static \u0275prov=y({token:rc,factory:rc.\u0275fac})};return t=I([E(sp)],t),t})(),lp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePreviewRequest");constructor(i){this.externalItem=i}},n9=(()=>{let t=class ac{_browser=p(at);_containerRef=p(qa);handle({externalItem:e}){let{hostElement:n,preview:o}=e,r=o(),a=r?this._fromTemplate(r):this._fromHost(n);return this._setPreviewStyles(a),zb(a),a.classList.add("f-external-item-preview"),a}_fromTemplate(e){return em(this._createViewRef(e),this._browser.document)}_fromHost(e){return Qf(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}_setPreviewStyles(e){Jf(e.style,{"pointer-events":"none",margin:"showPopover"in e?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":"1000"},new Set(["position"]))}static \u0275fac=function(n){return new(n||ac)};static \u0275prov=y({token:ac,factory:ac.\u0275fac})};return t=I([E(lp)],t),t})(),cp=class{event;static fToken=Symbol("DragExternalItemFinalizeRequest");constructor(i){this.event=i}},s_=class{externalItemRect;data;targetContainerId;dropPosition;rect;fTargetNode;fDropPosition;constructor(i,e,n,o){this.externalItemRect=i,this.data=e,this.targetContainerId=n,this.dropPosition=o,this.rect=i,this.fTargetNode=n,this.fDropPosition=o}},i9="external-item",o9="drag-external-item";function r9(t){return t.getEvent().kind===o9||t.getEvent().fEventType===i9}var a9=(()=>{let t=class sc{_result=p(si);_mediator=p(B);_store=p(A);_dragSession=p(fe);_browser=p(at);get _createNodeEmitter(){return this._store.fDraggable?.fCreateNode}handle(e){let n=this._findExternalItemHandler();if(!n)return;let o=this._getDestinationNodeOrGroupId();this._emitEvent(this._getElementsFromPoint(e.event.getPosition()),o,e.event.getPosition()),n.onPointerUp(),this._dragSession.draggableItems=[]}_findExternalItemHandler(){return this._dragSession.draggableItems.find(e=>r9(e))}_getDestinationNodeOrGroupId(){let e=this._getDropToGroupHandler(),n=e.activeTarget?.node.fId();return e.onPointerUp?.(),n}_getDropToGroupHandler(){let e=this._dragSession.draggableItems.find(n=>n instanceof Fr);if(!e)throw new Error("NodeDragToParentDragHandler not found");return e}_getElementsFromPoint(e){return this._browser.document.elementsFromPoint(e.x,e.y).filter(n=>!n.closest(".f-external-item")&&!n.closest(".f-external-item-preview"))}_emitEvent(e,n,o){this._isPointerInCanvasRect(e)&&this._createNodeEmitter?.emit(new s_(this._getPreviewRect(),this._result.getData().externalItem.data(),n,n?o:void 0))}_isPointerInCanvasRect(e){return e.length?this._store.flowHost.contains(e[0]):!1}_getPreviewRect(){return this._mediator.execute(new it(this._result.getData().preview))}static \u0275fac=function(n){return new(n||sc)};static \u0275prov=y({token:sc,factory:sc.\u0275fac})};return t=I([E(cp)],t),t})(),l_=class{data;constructor(i){this.data=i}},dp=class extends Tt{_externalItem;_pointerDownClientPosition;type="external-item";kind="drag-external-item";data(){return new l_(this._externalItem.data())}_result;_mediator;_browser;_store;_previewEl;_placeholderEl;_startRect=ne.initialize();_pointerDownRect=ne.initialize();_absoluteOffsetFromFlow=H.initialize();_grabOffsetFromPointer=H.initialize();_originalParent;_originalNextSibling;_originalDisplay;_applyConstraints=i=>i;constructor(i,e,n){super(),this._externalItem=e,this._pointerDownClientPosition=n,this._store=i.get(A),this._result=i.get(si),this._mediator=i.get(B),this._browser=i.get(at),this._originalDisplay=this._host.style.display,this._initConstraints(i)}get _host(){return this._externalItem.hostElement}get _overlayRoot(){return this._browser.document.fullscreenElement??this._browser.document.body}get _transform(){return this._store.transform}_initConstraints(i){this._startRect=this._getStartRect();let e=new a_(i,this._startRect,Ny());this._applyConstraints=n=>e.limit(n)}_getStartRect(){return this._mediator.execute(new it(this._externalItem.hostElement))}prepareDragSequence(){this._pointerDownRect=this._readAbsoluteRect(this._host),this._absoluteOffsetFromFlow=he.fromPoint(this._pointerDownRect).sub(this._toAbsolutePoint(this._startRect)),this._grabOffsetFromPointer=this._clientToAbsolute(this._pointerDownClientPosition).sub(this._pointerDownRect),this._rememberOriginalPlacement(),this._previewEl=this._createPreview(),this._placeholderEl=this._createPlaceholder(),this._placePreviewIntoOverlay(),this._swapOriginalWithPlaceholderAndMoveOriginalIntoOverlay(),this._result.setData({preview:this._previewEl,externalItem:this._externalItem})}_rememberOriginalPlacement(){let i=this._host.parentNode;if(!i){this._originalParent=void 0,this._originalNextSibling=null;return}this._originalParent=i,this._originalNextSibling=this._host.nextSibling}_createPreview(){let i=this._mediator.execute(new lp(this._externalItem));return this._externalItem.previewMatchSize()&&this._matchSize(i,this._pointerDownRect),i.style.transform=ly(this._pointerDownRect),i}_createPlaceholder(){return this._mediator.execute(new sp(this._externalItem))}_placePreviewIntoOverlay(){this._overlayRoot.appendChild(this._previewEl)}_swapOriginalWithPlaceholderAndMoveOriginalIntoOverlay(){let i=this._originalParent,e=this._placeholderEl;if(!i||!e)return;let n=i.replaceChild(e,this._host);this._overlayRoot.appendChild(n),this._host.style.display="none"}onPointerMove(i,e){if(!this._previewEl)return;let n=this._resolveDeltaFromPointer(i,e),o=this._applyConstraints(n),r=he.fromPoint(this._startRect).add(o),a=this._toAbsolutePoint(r).add(this._absoluteOffsetFromFlow);this._previewEl.style.transform=ly(a)}onPointerUp(){this._previewEl&&this._previewEl.parentNode&&this._previewEl.parentNode.removeChild(this._previewEl),this._restoreOriginalInParent(),this._host.style.display=this._originalDisplay||"block",this._previewEl=void 0,this._placeholderEl=void 0,this._originalParent=void 0,this._originalNextSibling=null}_restoreOriginalInParent(){let i=this._originalParent,e=this._placeholderEl;if(!(!i||!e)){if(e.parentNode===i){i.replaceChild(this._host,e);return}this._originalNextSibling&&this._originalNextSibling.parentNode===i?i.insertBefore(this._host,this._originalNextSibling):i.appendChild(this._host)}}_matchSize(i,e){i.style.width=`${e.width}px`,i.style.height=`${e.height}px`}_readAbsoluteRect(i){let e=i.getBoundingClientRect(),n=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,o=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return ne.initialize(e.left+o,e.top+n,e.width,e.height)}_toAbsolutePoint(i){let e=he.fromPoint(this._transform.position).add(this._transform.scaledPosition);return he.fromPoint(i).mult(this._transform.scale).add(e).add(this._getFlowHostAbsolutePosition())}_resolveDeltaFromPointer(i,e){let n=e?.getPosition();if(!n)return i;let o=this._clientToAbsolute(n).sub(this._grabOffsetFromPointer),r=this._toFlowPoint(o);return he.fromPoint(r).sub(this._startRect)}_toFlowPoint(i){let e=this._getFlowHostAbsolutePosition(),n=he.fromPoint(this._transform.position).add(this._transform.scaledPosition);return he.fromPoint(i).sub(e).sub(n).div(this._transform.scale)}_getFlowHostAbsolutePosition(){let i=this._store.flowHost.getBoundingClientRect(),e=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,n=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return H.initialize(i.left+n,i.top+e)}_clientToAbsolute(i){let e=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,n=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return he.fromPoint(i).add(H.initialize(n,e))}};function ly({x:t,y:i}){return`translate3d(${Math.round(t)}px, ${Math.round(i)}px, 0)`}var up=class{event;fTrigger;static fToken=Symbol("DragExternalItemPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}};function s9(t){return!!t.closest?.("[fExternalItem]")}function l9(t){return t.closest("[fExternalItem]")}var c9=(()=>{class t{_byHost=new Map;_items=W([]);items=k(()=>this._items());getByElement(e){let n=l9(e);return n?this._byHost.get(n):void 0}getByHost(e){return this._byHost.get(e)}register(e){let n=e.hostElement,o=this._byHost.get(n);o!==e&&(o&&o!==e&&this._byHost.delete(n),this._byHost.set(n,e),this._sync())}remove(e){let n=e.hostElement;this._byHost.get(n)===e&&(this._byHost.delete(n),this._sync())}_sync(){this._items.set([...this._byHost.values()])}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var d9=(()=>{let t=class lc{_apiService=p(c9);_dragSession=p(fe);_store=p(A);_injector=p(ft);get _flowHost(){return this._store.flowHost}get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!on(e.originalEvent,n))return;let o=this._resolveExternalItem(e.targetElement);if(!o||o.disabled())return;let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._flowHost).div(r),this._dragSession.draggableItems=[new dp(this._injector,o,e.getPosition())]}_resolveExternalItem(e){return this._apiService.getByElement(e)}static \u0275fac=function(n){return new(n||lc)};static \u0275prov=y({token:lc,factory:lc.\u0275fac})};return t=I([E(up)],t),t})(),pp=class{event;static fToken=Symbol("PreventDefaultIsExternalItemRequest");constructor(i){this.event=i}},u9=(()=>{let t=class cc{handle(e){this._isTargetItemExternal(e.event)&&e.event.preventDefault()}_isTargetItemExternal(e){let n=this._isExternalItem(e.target),o=this._isExternalItem(e.target.parentNode);return n||o}_isExternalItem(e){let n=!1;try{n=s9(e)}catch{}return n}static \u0275fac=function(n){return new(n||cc)};static \u0275prov=y({token:cc,factory:cc.\u0275fac})};return t=I([E(pp)],t),t})(),p9=[t9,n9,a9,d9,u9],h9=(()=>{let t=class dc{_mediator=p(B);_dragContext=p(fe);_store=p(A);_dragInjector=p(gt);get _allNodes(){return this._store.nodes.getAll()}handle({event:e}){if(!this._canPrepare())return;let n=this._allNodes.find(a=>a.isContains(e.targetElement));if(!n&&!this._hasExternalDrag())throw new Error("Drag target node not found");let o=this._sortedTargetsForDrop();if(n){let a=n.fParentId(),s=this._mediator.execute(new qp(a));s.length&&(o=o.filter(c=>s.includes(c.node.fId())))}let r=this._dragInjector.get(Fr);r.initialize(o),this._dragContext.draggableItems.push(r)}_canPrepare(){return this._hasMoveDrag()||this._hasExternalDrag()}_hasMoveDrag(){return this._dragContext.draggableItems.some(e=>e instanceof ai)}_hasExternalDrag(){return this._dragContext.draggableItems.some(e=>e instanceof dp)}_sortedTargetsForDrop(){let e=this._getDraggedNodes(),n=e.some(s=>s instanceof Hm),o=this._withParents(e),a=this._eligibleTargets(o,n).map(s=>{let c=this._mediator.execute(new it(s.hostElement));return{node:s,rect:c}});return this._mediator.execute(new ap(a))}_getDraggedNodes(){let e=this._dragContext.draggableItems.find(n=>n instanceof ai);return e?e.items.map(n=>n.nodeOrGroup):[]}_withParents(e){return e.reduce((n,o)=>{n.push(o);let r=this._mediator.execute(new Mo(o));return n.push(...r),n},[])}_eligibleTargets(e,n){let o=this._allNodes.filter(r=>!e.includes(r));return n?o.filter(r=>r instanceof Hm):o}static \u0275fac=function(n){return new(n||dc)};static \u0275prov=y({token:dc,factory:dc.\u0275fac})};return t=I([E(rp)],t),t})(),f9=[e9,h9,J7],hp=class{event;static fToken=Symbol("PinchToZoomFinalizeRequest");constructor(i){this.event=i}},m9=.5,fp=(()=>{class t extends Tt{type="pinch-to-zoom";kind="pinch-to-zoom";_store=p(A);get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.require(We.ZOOM)}_startDistance=null;_startScale=null;_touches;initialize(e){this._touches=e}prepareDragSequence(){let e=cy(this._touches);e!=null&&(this._startDistance=e,this._startScale=this._canvas.transform.scale)}onPointerMove(e,n){if(n.touches.length!==2||this._startDistance==null||this._startScale==null)return;let o=cy(n.touches),r=_9(n.touches);if(o==null||r==null){this._reset();return}if(Math.abs(o-this._startDistance)<m9)return;n.preventDefault();let a=o/this._startDistance,s=this._clamp(this._startScale*a);this._canvas.setScale(s,this._castPositionToFlow(r)),this._canvas.redraw()}_clamp(e){return Math.max(this._zoomComponent.minimum,Math.min(e,this._zoomComponent.maximum))}_castPositionToFlow(e){return he.fromPoint(e).elementTransform(this._flowHost)}_reset(){this._startScale=null,this._startDistance=null}onPointerUp(){this._reset(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function _9(t){if(t.length!==2)return null;let i=t[0],e=t[1];return H.initialize((i.clientX+e.clientX)/2,(i.clientY+e.clientY)/2)}function cy(t){if(t.length!==2)return null;let i=t[0],e=t[1];return Math.hypot(e.clientX-i.clientX,e.clientY-i.clientY)}var g9=(()=>{let t=class uc{_dragSession=p(fe);handle(e){if(this._hasPinchZoomHandler())for(let n of this._dragSession.draggableItems)n.onPointerUp?.()}_hasPinchZoomHandler(){return this._dragSession.draggableItems.some(e=>e instanceof fp)}static \u0275fac=function(n){return new(n||uc)};static \u0275prov=y({token:uc,factory:uc.\u0275fac})};return t=I([E(hp)],t),t})(),mp=class{event;static fToken=Symbol("PinchToZoomPreparationRequest");constructor(i){this.event=i}},v9=(()=>{let t=class pc{_dragInjector=p(gt);_store=p(A);_dragSession=p(fe);handle({event:e}){this._canStart(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=new he,this._dragSession.draggableItems=[this._getHandler(e)])}_canStart(e){return this._dragSession.isEmpty()&&e.touches?.length===2&&!e.isEventInLockedContext&&this._hasZoomComponent()}_hasZoomComponent(){return this._store.instances.has(We.ZOOM)}_getHandler(e){let n=this._dragInjector.get(fp);return n.initialize(e.touches),n}static \u0275fac=function(n){return new(n||pc)};static \u0275prov=y({token:pc,factory:pc.\u0275fac})};return t=I([E(mp)],t),t})(),b9=[v9,g9],_p=class{event;static fToken=Symbol("SelectionAreaFinalizeRequest");constructor(i){this.event=i}},y9=(()=>{let t=class hc{_dragSession=p(fe);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>e.getEvent().kind==="selection-area")}static \u0275fac=function(n){return new(n||hc)};static \u0275prov=y({token:hc,factory:hc.\u0275fac})};return t=I([E(_p)],t),t})(),c_=(()=>{class t extends Tt{type="selection-area";kind="selection-area";_store=p(A);_dragSession=p(fe);_mediator=p(B);_canBeSelected=[];_selectedByMove=[];get _transform(){return this._store.transform}get _canvasPosition(){return he.fromPoint(this._transform.position).add(this._transform.scaledPosition)}get _instance(){return this._store.instances.require(We.SELECTION_AREA)}prepareDragSequence(){this._canBeSelected=this._mediator.execute(new th),this._show(),this._draw(ne.initialize(this._dragSession.onPointerDownPosition.x,this._dragSession.onPointerDownPosition.y))}onPointerMove(e){let n=he.fromPoint(e).add(this._dragSession.onPointerDownPosition),o=this._getMinimumPoint(this._dragSession.onPointerDownPosition,n),r=Math.abs(e.x),a=Math.abs(e.y),s=ne.initialize(o.x,o.y,r,a);this._draw(s),this._selectedByMove=[],this._canBeSelected.forEach(c=>{c.element.unmarkAsSelected();let u=ne.addPoint(ne.mult(c.fRect,this._transform.scale),this._canvasPosition);ne.intersectionWithRect(u,s)&&(c.element.markAsSelected(),this._selectedByMove.push(c.element))}),this._mediator.execute(new ti)}_getMinimumPoint(e,n){return H.initialize(Math.min(e.x,n.x),Math.min(e.y,n.y))}onPointerUp(){this._hide(),this._dragSession.selectedItems.push(...this._selectedByMove),this._selectedByMove.length>0&&(this._dragSession.isSelectedChanged=!0)}_draw(e){let n=this._instance.hostElement.style;n.left=e.x+"px",n.top=e.y+"px",n.width=e.width+"px",n.height=e.height+"px"}_show(){this._instance.hostElement.style.display="block"}_hide(){this._instance.hostElement.style.display="none"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),gp=class{event;static fToken=Symbol("SelectionAreaPreparationRequest");constructor(i){this.event=i}},C9=(()=>{let t=class fc{_store=p(A);_dragSession=p(fe);_dragInjector=p(gt);get _instance(){return this._store.instances.get(We.SELECTION_AREA)}handle(e){this._isValid(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost),this._dragSession.draggableItems=[this._dragInjector.createInstance(c_)])}_isValid(e){return!!this._instance&&this._dragSession.isEmpty()&&on(e.event.originalEvent,this._instance.fTrigger)}static \u0275fac=function(n){return new(n||fc)};static \u0275prov=y({token:fc,factory:fc.\u0275fac})};return t=I([E(gp)],t),t})(),x9=[C9,y9],vp=class{rect;childrenBounds;static fToken=Symbol("ApplyChildResizeConstraintsRequest");constructor(i,e){this.rect=i,this.childrenBounds=e}},w9=(()=>{let t=class mc{handle({rect:e,childrenBounds:n}){n&&this._apply(e,n)}_apply(e,n){this._restrictLeft(e,n),this._restrictTop(e,n),this._restrictRight(e,n),this._restrictBottom(e,n),e.width=Math.max(0,e.width),e.height=Math.max(0,e.height)}_restrictLeft(e,n){let o=e.x-n.x;o>0&&(e.x-=o,e.width+=o)}_restrictTop(e,n){let o=e.y-n.y;o>0&&(e.y-=o,e.height+=o)}_restrictRight(e,n){let o=n.x+n.width;e.x+e.width<=o&&(e.width=o-e.x)}_restrictBottom(e,n){let o=n.y+n.height;e.y+e.height<=o&&(e.height=o-e.y)}static \u0275fac=function(n){return new(n||mc)};static \u0275prov=y({token:mc,factory:mc.\u0275fac})};return t=I([E(vp)],t),t})(),bp=class{rect;limits;static fToken=Symbol("ApplyParentResizeConstraintsRequest");constructor(i,e){this.rect=i,this.limits=e}},T9=(()=>{let t=class _c{_mediator=p(B);handle({rect:e,limits:n}){this._applyResizeConstraints(e,n)}_applyResizeConstraints(e,n){if(!n)return;let o=this._clampedCopyForCalculation(e,n);this._applySoftParentExpansions(o,n.softLimits),n.hardLimit&&this._clampRectToInner(e,n.hardLimit.innerRect)}_clampedCopyForCalculation(e,n){let o=me({},e);return n.hardLimit&&this._clampRectToInner(o,n.hardLimit.innerRect),o}_clampRectToInner(e,n){if(e.x<n.x){let a=n.x-e.x;e.x+=a,e.width-=a}if(e.y<n.y){let a=n.y-e.y;e.y+=a,e.height-=a}let o=n.x+n.width;e.x+e.width>o&&(e.width=o-e.x);let r=n.y+n.height;e.y+e.height>r&&(e.height=r-e.y),e.width=Math.max(0,e.width),e.height=Math.max(0,e.height)}_applySoftParentExpansions(e,n){if(n?.length)for(let o of n)this._expandParentFromOriginalIfOverflow(e,o)}_expandParentFromOriginalIfOverflow(e,n){let o=n.innerRect,r=n.boundingRect,a=this._computeOverflow(o,e);if(!this._hasOverflow(a)){this._applyParentRect(n,r);return}let s=this._buildExpandedParentRect(r,a);this._applyParentRect(n,s)}_hasOverflow(e){return!!(e.left||e.top||e.right||e.bottom)}_computeOverflow(e,n){let o=Math.max(0,e.x-n.x),r=Math.max(0,e.y-n.y),a=Math.max(0,n.x+n.width-(e.x+e.width)),s=Math.max(0,n.y+n.height-(e.y+e.height));return{left:o,top:r,right:a,bottom:s}}_buildExpandedParentRect(e,n){let o=me({},e);return n.left&&(o.x=e.x-n.left,o.width=e.width+n.left),n.top&&(o.y=e.y-n.top,o.height=e.height+n.top),n.right&&(o.width=(o.width??e.width)+n.right),n.bottom&&(o.height=(o.height??e.height)+n.bottom),o}_applyParentRect(e,n){e.nodeOrGroup.updatePosition(n),e.nodeOrGroup.updateSize(n),this._mediator.execute(new Pi(e.nodeOrGroup.fId(),n)),e.nodeOrGroup.redraw()}static \u0275fac=function(n){return new(n||_c)};static \u0275prov=y({token:_c,factory:_c.\u0275fac})};return t=I([E(bp)],t),t})(),yp=class{originalRect;difference;handleType;minimumSize;static fToken=Symbol("CalculateChangedRectFromDifferenceRequest");constructor(i,e,n,o){this.originalRect=i,this.difference=e,this.handleType=n,this.minimumSize=o}},dy={[Cn.LEFT]:{x:-1,y:0},[Cn.LEFT_TOP]:{x:-1,y:-1},[Cn.TOP]:{x:0,y:-1},[Cn.RIGHT_TOP]:{x:1,y:-1},[Cn.RIGHT]:{x:1,y:0},[Cn.RIGHT_BOTTOM]:{x:1,y:1},[Cn.BOTTOM]:{x:0,y:1},[Cn.LEFT_BOTTOM]:{x:-1,y:1}},S9=(()=>{let t=class gc{handle({originalRect:e,difference:n,handleType:o,minimumSize:r}){let a=this._changeSizeInRect(e,n,dy[o],r);return this._changePosition(e,n,dy[o],a)}_changeSizeInRect(e,n,o,r){let a=e.width+o.x*n.x,s=e.height+o.y*n.y,c=0,u=0;return a<0&&(c=a,a=Math.abs(a)),a<r.width&&(o.x===-1&&(c+=a-r.width),a=r.width),s<0&&(u=s,s=Math.abs(s)),s<r.height&&(o.y===-1&&(u+=s-r.height),s=r.height),ne.initialize(c,u,a,s)}_changePosition(e,n,o,r){let a=e.x+(o.x===-1?n.x:0)+r.x,s=e.y+(o.y===-1?n.y:0)+r.y;return ne.initialize(a,s,r.width,r.height)}static \u0275fac=function(n){return new(n||gc)};static \u0275prov=y({token:gc,factory:gc.\u0275fac})};return t=I([E(yp)],t),t})(),Cp=class{nodeOrGroup;paddings;static fToken=Symbol("CalculateDirectChildrenUnionRectRequest");constructor(i,e){this.nodeOrGroup=i,this.paddings=e}},k9=(()=>{let t=class vc{_mediator=p(B);_store=p(A);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle({nodeOrGroup:e,paddings:n}){let o=ne.union(this._calculateDirectChildren(e.fId()).map(r=>this._normalizeRect(r)));return o?this._concatRectWithParentPadding(o,n):null}_calculateDirectChildren(e){return this._allNodesAndGroups.filter(n=>n.fParentId()===e)}_normalizeRect(e){return this._mediator.execute(new it(e.hostElement))}_concatRectWithParentPadding(e,n){return ne.initialize(e.x-n[0],e.y-n[1],e.width+n[0]+n[2],e.height+n[1]+n[3])}static \u0275fac=function(n){return new(n||vc)};static \u0275prov=y({token:vc,factory:vc.\u0275fac})};return t=I([E(Cp)],t),t})(),zr=class{nodeOrGroup;rect;static fToken=Symbol("CalculateResizeLimitsRequest");constructor(i,e){this.nodeOrGroup=i,this.rect=e}},I9=(()=>{let t=class bc{_mediator=p(B);handle({nodeOrGroup:e,rect:n}){let o=this._getParentsChain(e),r=this._calculateNodePaddings(e,n);return{limits:this._buildSoftHardLimits(o),childrenBounds:this._getNormalizedChildrenBounds(e,r),minimumSize:wt.initialize(r[0]+r[2],r[1]+r[3])}}_calculateNodePaddings(e,n){return this._mediator.execute(new Ni(e,n))}_getNormalizedChildrenBounds(e,n){return this._mediator.execute(new Cp(e,n))}_getParentsChain(e){return this._mediator.execute(new Mo(e))??[]}_buildSoftHardLimits(e){let n=[],o,r=[0,0,0,0];for(let a of e){let s=this._getParentInfo(a,r);if(r=s.paddings,this._isAutoExpand(a))n.push(this._makeLimit(a,s));else{o=this._makeLimit(a,s);break}}return{softLimits:n,hardLimit:o}}_getParentInfo(e,n){return this._mediator.execute(new Nr(e,n))}_isAutoExpand(e){return e.fAutoExpandOnChildHit()}_makeLimit(e,{boundingRect:n,innerRect:o}){return{nodeOrGroup:e,boundingRect:n,innerRect:o}}static \u0275fac=function(n){return new(n||bc)};static \u0275prov=y({token:bc,factory:bc.\u0275fac})};return t=I([E(zr)],t),t})(),xp=class{event;static fToken=Symbol("ResizeNodeFinalizeRequest");constructor(i){this.event=i}},Wy="node-resize",Ky="resize-node";function E9(t){return t.getEvent().kind===Ky||t.getEvent().fEventType===Wy}var M9=(()=>{let t=class yc{_dragSession=p(fe);handle(e){this._isNodeResizeHandler()&&this._dragSession.draggableItems.forEach(n=>n.onPointerUp?.())}_isNodeResizeHandler(){return this._dragSession.draggableItems.some(e=>E9(e))}static \u0275fac=function(n){return new(n||yc)};static \u0275prov=y({token:yc,factory:yc.\u0275fac})};return t=I([E(xp)],t),t})(),d_=class{fNodeId;constructor(i){this.fNodeId=i}},u_=(()=>{class t extends Tt{type=Wy;kind=Ky;data(){return new d_(this._nodeOrGroup.fId())}_mediator=p(B);_baselineRect;_constraints;_lastRect=null;_nodeOrGroup;_handleType;_nodeConnections={source:[],target:[]};_softParentConnections=[];initialize(e,n){this._nodeOrGroup=e,this._handleType=n}setNodeConnectionHandlers(e){this._nodeConnections=e}setSoftParentConnectionHandlers(e){this._softParentConnections=e}prepareDragSequence(){this._baselineRect=this._readBaselineRect(),this._constraints=this._buildConstraints(this._baselineRect),this._lastRect=this._baselineRect}onPointerMove(e){let n=this._calcNextRect(e);this._applyConstraints(n),this._commitRect(n),this._applyConnectionHandlers(this._nodeConnections);for(let o of this._softParentConnections)this._applyConnectionHandlers(o);this._lastRect=n}onPointerUp(){let e=this._lastRect??this._fallbackRectFromModel();this._nodeOrGroup.sizeChange.emit(e),requestAnimationFrame(()=>this._nodeOrGroup.refresh())}_readBaselineRect(){return this._mediator.execute(new it(this._nodeOrGroup.hostElement))}_buildConstraints(e){return this._mediator.execute(new zr(this._nodeOrGroup,e))}_calcNextRect(e){return this._mediator.execute(new yp(this._baselineRect,e,this._handleType,this._constraints.minimumSize))}_applyConstraints(e){this._mediator.execute(new vp(e,this._constraints.childrenBounds)),this._mediator.execute(new bp(e,this._constraints.limits))}_commitRect(e){this._nodeOrGroup.updatePosition({x:e.x,y:e.y}),this._nodeOrGroup.updateSize({width:e.width,height:e.height}),this._mediator.execute(new Pi(this._nodeOrGroup.fId(),e)),this._nodeOrGroup.redraw()}_fallbackRectFromModel(){return ne.initialize(this._nodeOrGroup._position.x,this._nodeOrGroup._position.y,this._nodeOrGroup._size?.width,this._nodeOrGroup._size?.height)}_applyConnectionHandlers(e){if(!e.source.length&&!e.target.length)return;let n=new Map;for(let o of e.source){let r=this._readConnectorRect(o.connector,n);o.handler.setSourceRect(r)}for(let o of e.target){let r=this._readConnectorRect(o.connector,n);o.handler.setTargetRect(r)}}_readConnectorRect(e,n){let o=`${e.kind}::${e.fId()}`,r=n.get(o);if(r)return r;let a=this._mediator.execute(new oi(e.hostElement,!1));return n.set(o,a),a}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Hr=class{_mediator=p(B);_store=p(A);_behaviour=p(Fo);_source;_target;_sourceRef;_targetRef;_sourceRect;_targetRect;connection;initialize(i){this.connection=i,this._source=this._store.outputs.require(this.connection.fOutputId()),this._target=this._store.inputs.require(this.connection.fInputId()),this._sourceRef=this._readRectRef(this._source),this._targetRef=this._readRectRef(this._target),this._sourceRect=rt.fromRoundedRect(this._sourceRef.rect),this._targetRect=rt.fromRoundedRect(this._targetRef.rect)}setSourceRect(i){this._sourceRect=rt.fromRoundedRect(i),this._mediator.execute(new Di(this._source.fId(),this._source.kind,this._sourceRect))}setTargetRect(i){this._targetRect=rt.fromRoundedRect(i),this._mediator.execute(new Di(this._target.fId(),this._target.kind,this._targetRect))}redraw(){let i=this._buildLine();this.connection.setLine(i),this.connection.redraw()}_buildLine(){let i=rt.fromRoundedRect(this._sourceRect),e=rt.fromRoundedRect(this._targetRect);return this._behaviour.handle(new _n(i,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(i){return{connector:i,rect:this._mediator.execute(new oi(i.hostElement,!1))}}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},D9=(()=>{class t extends Hr{_sourceUpdated=!1;_targetUpdated=!1;setSourceRect(e){super.setSourceRect(e),this._sourceUpdated=!0,this._redrawIfReady()}setTargetRect(e){super.setTargetRect(e),this._targetUpdated=!0,this._redrawIfReady()}_redrawIfReady(){!this._sourceUpdated||!this._targetUpdated||(this._sourceUpdated=!1,this._targetUpdated=!1,super.redraw())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),P9=(()=>{class t extends Hr{setSourceRect(e){super.setSourceRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),R9=(()=>{class t extends Hr{setTargetRect(e){super.setTargetRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),wp=class{event;fTrigger;static fToken=Symbol("ResizeNodePreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},Tp=class{handler;nodeOrGroup;static fToken=Symbol("AttachResizeConnectionDragHandlersToNodeRequest");constructor(i,e){this.handler=i,this.nodeOrGroup=e}},O9=(()=>{let t=class Cc{_store=p(A);_mediator=p(B);_dragInjector=p(gt);handle({handler:e,nodeOrGroup:n}){let o=this._readSoftParents(n),r=[n,...o],a=this._collectSourceConnectorIds(r),s=this._collectTargetConnectorIds(r),c=new Map;e.setNodeConnectionHandlers(this._buildConnectionHandlersForNode(n,a,s,c)),e.setSoftParentConnectionHandlers(o.map(u=>this._buildConnectionHandlersForNode(u,a,s,c)))}_readSoftParents(e){let n=this._mediator.execute(new it(e.hostElement));return this._mediator.execute(new zr(e,n)).limits.softLimits.map(r=>r.nodeOrGroup)}_collectSourceConnectorIds(e){let n=new Set(e.map(o=>o.fId()));return new Set(this._store.outputs.getAll().filter(o=>n.has(o.fNodeId)).map(o=>o.fId()))}_collectTargetConnectorIds(e){let n=new Set(e.map(o=>o.fId()));return new Set(this._store.inputs.getAll().filter(o=>n.has(o.fNodeId)).map(o=>o.fId()))}_buildConnectionHandlersForNode(e,n,o,r){let a=this._store.outputs.getAll().filter(g=>g.fNodeId===e.fId()),s=this._store.inputs.getAll().filter(g=>g.fNodeId===e.fId());if(!a.length&&!s.length)return{source:[],target:[]};let c=new Set(a.map(g=>g.fId())),u=new Set(s.map(g=>g.fId())),h={source:[],target:[]};for(let g of this._store.connections.getAll()){let C=c.has(g.fOutputId()),M=u.has(g.fInputId());if(!C&&!M)continue;let S=r.get(g.fId())??this._createConnectionHandler(g,n,o);if(r.set(g.fId(),S),C){let N=this._store.outputs.require(g.fOutputId());h.source.push({handler:S,connector:N})}if(M){let N=this._store.inputs.require(g.fInputId());h.target.push({handler:S,connector:N})}}return h}_createConnectionHandler(e,n,o){let r=n.has(e.fOutputId()),a=o.has(e.fInputId()),s=r&&a?this._dragInjector.createInstance(D9):r?this._dragInjector.createInstance(P9):this._dragInjector.createInstance(R9);return s.initialize(e),s}static \u0275fac=function(n){return new(n||Cc)};static \u0275prov=y({token:Cc,factory:Cc.\u0275fac})};return t=I([E(Tp)],t),t})(),F9=(()=>{let t=class xc{_mediator=p(B);_store=p(A);_dragSession=p(fe);_dragInjector=p(gt);get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!this._isResizeHandle(e.targetElement)||!on(e.originalEvent,n))return;let o=this._findResizableNode(e.targetElement);if(!o)return;this._selectBeforeResize(o);let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(r);let a=this._dragInjector.createInstance(u_);a.initialize(o,this._readResizeHandleType(e.targetElement)),this._mediator.execute(new Tp(a,o)),this._dragSession.draggableItems=[a]}_isResizeHandle(e){return _r(e,".f-resize-handle")}_findResizableNode(e){let n=this._store.nodes.getAll().find(o=>o.isContains(e));if(n)return n.fDraggingDisabled()?void 0:n}_selectBeforeResize(e){queueMicrotask(()=>{this._mediator.execute(new Ro(e))})}_readResizeHandleType(e){let n=Hb(e,"fResizeHandleType",".f-resize-handle");return Cn[n]}static \u0275fac=function(n){return new(n||xc)};static \u0275prov=y({token:xc,factory:xc.\u0275fac})};return t=I([E(wp)],t),t})(),N9=[w9,T9,S9,k9,I9,O9,M9,F9],Sp=class{event;static fToken=Symbol("RotateNodeFinalizeRequest");constructor(i){this.event=i}},Yy="node-rotate",Xy="rotate-node";function A9(t){return t.getEvent().kind===Xy||t.getEvent().fEventType===Yy}var L9=(()=>{let t=class wc{_dragSession=p(fe);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>A9(e))}static \u0275fac=function(n){return new(n||wc)};static \u0275prov=y({token:wc,factory:wc.\u0275fac})};return t=I([E(Sp)],t),t})(),kp=class{event;fTrigger;static fToken=Symbol("RotateNodePreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},p_=class{fNodeId;constructor(i){this.fNodeId=i}};function B9(t,i,e){let{x:n,y:o}=V9(t,i,e),r=n-t.x,a=o-t.y;return{x:r,y:a}}function V9(t,i,e){let n=t.x-e.x,o=t.y-e.y,r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r),c=n*a-o*s,u=n*s+o*a,h=c+e.x,g=u+e.y;return{x:h,y:g}}var h_=(()=>{class t extends Tt{type=Yy;kind=Xy;data(){return new p_(this._nodeOrGroup.fId())}_store=p(A);_mediator=p(B);_dragSession=p(fe);_nodeOrGroup;_sourceConnections;_targetConnections;_startRotation=0;_nodeRect;_nodeCenter;_pointerDownInFlow;_rotationOffsetDeg=0;get _transform(){return this._store.transform}initialize(e,n,o){this._nodeOrGroup=e,this._sourceConnections=n,this._targetConnections=o,this._startRotation=this._nodeOrGroup._rotate}prepareDragSequence(){this._nodeRect=this._readNodeRect(),this._nodeCenter=this._nodeRect.gravityCenter,this._pointerDownInFlow=this._calculatePointerDownInFlow();let e=this._angleDeg(this._pointerDownInFlow);this._rotationOffsetDeg=e-this._startRotation}onPointerMove(e){let n=H.sum(this._pointerDownInFlow,e),r=this._angleDeg(n)-this._rotationOffsetDeg;this._applyRotation(r);let a=r-this._startRotation;for(let s of this._sourceConnections)s.connection.setSourceDelta(this._deltaAfterRotation(s.connector,a));for(let s of this._targetConnections)s.connection.setTargetDelta(this._deltaAfterRotation(s.connector,a))}onPointerUp(){this._nodeOrGroup.rotate.set(this._nodeOrGroup._rotate),this._nodeOrGroup.refresh()}_readNodeRect(){return this._mediator.execute(new it(this._nodeOrGroup.hostElement))}_calculatePointerDownInFlow(){return H.sub(this._dragSession.onPointerDownPosition,H.sum(this._transform.position,this._transform.scaledPosition))}_angleDeg(e){return Math.atan2(e.y-this._nodeCenter.y,e.x-this._nodeCenter.x)*(180/Math.PI)}_applyRotation(e){this._nodeOrGroup.updateRotate(e),this._nodeOrGroup.redraw()}_deltaAfterRotation(e,n){return B9(e,n,this._nodeCenter)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),z9=(()=>{let t=class Tc{_mediator=p(B);_store=p(A);_dragContext=p(fe);_dragInjector=p(gt);get _transform(){return this._store.transform}handle(e){if(!this._isPreparationAllowed(e))return;let n=this._findRotatableNode(e.event.targetElement);if(!n)return;this._selectBeforeRotate(n);let o=this._transform.scale;this._dragContext.onPointerDownScale=o,this._dragContext.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(o);let r=this._dragInjector.createInstance(h_);r.initialize(n,this._buildOutputConnectionHandlers(n),this._buildInputConnectionHandlers(n)),this._dragContext.draggableItems=[r]}_isPreparationAllowed({event:e,fTrigger:n}){return this._dragContext.isEmpty()&&c7(e.targetElement)&&on(e.originalEvent,n)}_findRotatableNode(e){for(let n of this._store.nodes.getAll())if(!n.fDraggingDisabled()&&n.isContains(e))return n}_selectBeforeRotate(e){queueMicrotask(()=>{this._mediator.execute(new Ro(e))})}_buildInputConnectionHandlers(e){return this._mediator.execute(new Rp(e)).map(n=>{let o=this._store.inputs.require(n.fInputId()),r=this._mediator.execute(new qt(o)),a=this._dragInjector.get(Vr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}_buildOutputConnectionHandlers(e){return this._mediator.execute(new Hp(e)).map(n=>{let o=this._store.outputs.require(n.fOutputId()),r=this._mediator.execute(new qt(o)),a=this._dragInjector.get(Lr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}static \u0275fac=function(n){return new(n||Tc)};static \u0275prov=y({token:Tc,factory:Tc.\u0275fac})};return t=I([E(kp)],t),t})(),H9=[L9,z9],qr=class{flowRect;canvasPosition;eventPoint;minimap;static fToken=Symbol("CalculateFlowPointFromMinimapPointRequest");constructor(i,e,n,o){this.flowRect=i,this.canvasPosition=e,this.eventPoint=n,this.minimap=o}},q9=(()=>{let t=class Sc{_store=p(A);get _canvasScale(){return this._store.transform.scale||1}handle(e){return H.sub(e.canvasPosition,H.sub(this._getPositionInViewBox(e.eventPoint,e.minimap),this._getNormalizedFlowCenter(e.flowRect)))}_getNormalizedFlowCenter(e){return he.fromPoint(e.gravityCenter).sub(e)}_getPositionInViewBox(e,n){let o=this.normalizeEventPoint(e,n);return H.sum(o,ne.mult(n.viewBox,this._canvasScale))}normalizeEventPoint(e,n){return this._getEventPointInMinimap(e,n).mult(n.scale).mult(this._canvasScale)}_getEventPointInMinimap(e,n){return he.fromPoint(e).elementTransform(n.element)}static \u0275fac=function(n){return new(n||Sc)};static \u0275prov=y({token:Sc,factory:Sc.\u0275fac})};return t=I([E(qr)],t),t})(),Ip=class{event;static fToken=Symbol("DragMinimapFinalizeRequest");constructor(i){this.event=i}},G9=(()=>{let t=class kc{_dragSession=p(fe);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(j9)}static \u0275fac=function(n){return new(n||kc)};static \u0275prov=y({token:kc,factory:kc.\u0275fac})};return t=I([E(Ip)],t),t})(),Zy="minimap",Qy="minimap";function j9(t){return t.getEvent().kind===Qy||t.getEvent().fEventType===Zy}var f_=(()=>{class t extends Tt{type=Zy;kind=Qy;_store=p(A);_mediator=p(B);_lastDelta=null;_flowRect;_startCanvasPosition;_eventPoint;_minimap;initialize(e,n,o,r){this._flowRect=e,this._startCanvasPosition=n,this._eventPoint=o,this._minimap=r}prepareDragSequence(){this._store.fCanvas?.hostElement.classList.add("f-scaled-animate")}onPointerMove(e){this._lastDelta&&this._isSamePoint(e,this._lastDelta)||(this._lastDelta=e,this._store.fCanvas?.setPosition(this._getNewPosition(he.fromPoint(this._eventPoint).add(e))),this._store.fCanvas?.redraw())}_isSamePoint(e,n){return e.x===n.x&&e.y===n.y}_getNewPosition(e){return this._mediator.execute(new qr(this._flowRect,this._startCanvasPosition,e,this._minimap))}onPointerUp(){this._store.fCanvas?.hostElement.classList.remove("f-scaled-animate"),this._store.fCanvas?.emitCanvasChangeEvent()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Ep=class{event;static fToken=Symbol("DragMinimapPreparationRequest");constructor(i){this.event=i}},U9=(()=>{let t=class Ic{_store=p(A);_mediator=p(B);_dragSession=p(fe);_dragInjector=p(gt);get _canvas(){return this._store.fCanvas}get _flowHost(){return this._store.flowHost}handle({event:e}){if(!this._isValid(e))return;let n=this._store.instances.require(We.MINIMAP).state,o=e.getPosition(),r=he.fromPoint(this._store.transform.position),a=ne.fromElement(this._flowHost);this._canvas.setPosition(this._calculateCanvasPosition(a,o,n)),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent(),this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=he.fromPoint(o).elementTransform(this._flowHost);let s=this._dragInjector.createInstance(f_);s.initialize(a,r,o,n),this._dragSession.draggableItems=[s]}_isValid(e){return!(!this._dragSession.isEmpty()||!this._flowHost.contains(e.targetElement)||!e.targetElement.closest(".f-minimap")||!this._store.instances.get(We.MINIMAP))}_calculateCanvasPosition(e,n,o){return this._mediator.execute(new qr(e,he.fromPoint(this._canvas.transform.position),n,o))}static \u0275fac=function(n){return new(n||Ic)};static \u0275prov=y({token:Ic,factory:Ic.\u0275fac})};return t=I([E(Ep)],t),t})(),$9=[q9,G9,U9];function W9(t){return!!t&&typeof t.destroy=="function"}var gt=(()=>{class t{_injector=p(ft);_dragInjector=null;_created=[];create(){this._dragInjector=ft.create({providers:[{provide:Mp,useClass:Mp},{provide:Gu,useClass:Gu},{provide:Fu,useClass:Fu},{provide:$m,useClass:$m},{provide:Fr,useClass:Fr},{provide:Lr,useClass:Lr},{provide:Vr,useClass:Vr},{provide:Br,useClass:Br},{provide:ai,useClass:ai},{provide:fp,useClass:fp},{provide:c_,useClass:c_},{provide:u_,useClass:u_},{provide:h_,useClass:h_},{provide:f_,useClass:f_}],parent:this._injector}),this._created=[]}get(e){if(!this._dragInjector)throw new Error("DragHandlerInjector has not been created. Call create() before using get().");return this._dragInjector.get(e)}createInstance(e){if(!this._dragInjector)throw new Error("DragHandlerInjector is not created");let n=f0(this._dragInjector,()=>new e);return this._created.push(n),n}destroy(){for(let e of this._created)W9(e)&&e.destroy();this._created=[],this._dragInjector?.destroy?.(),this._dragInjector=null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),si=(()=>{class t{_data;setData(e){this._data=me(me({},this._data),e)}getData(){return this._data}clear(){this._data=void 0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),uy="f-canvas-dragging",py="canvas-dragging",Mp=(()=>{class t extends Tt{type="canvas-move";kind="drag-canvas";_store=p(A);_onPointerDownPosition=H.initialize();constructor(){super(),this._store.fCanvas?.hostElement.classList.add(uy,py)}prepareDragSequence(){this._onPointerDownPosition=this._store.transform.position}onPointerMove(e){this._store.fCanvas?.setPosition(he.fromPoint(this._onPointerDownPosition).add(e)),this._store.fCanvas?.redraw()}onPointerUp(){this._store.fCanvas?.emitCanvasChangeEvent(),this._store.fCanvas?.hostElement.classList.remove(uy,py)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),K9=(()=>{let t=class Ec{_dragContext=p(fe);handle(e){this._isValid()&&this._dragContext.draggableItems.forEach(n=>n.onPointerUp?.())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Mp)}static \u0275fac=function(n){return new(n||Ec)};static \u0275prov=y({token:Ec,factory:Ec.\u0275fac})};return t=I([E(Mu)],t),t})(),Dp=class{event;fTrigger;static fToken=Symbol("DragCanvasPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},Y9=(()=>{let t=class Mc{_store=p(A);_dragContext=p(fe);_dragInjector=p(gt);handle({event:e,fTrigger:n}){!this._isValid(e)||!this._isValidTrigger(e,n)||(this._dragContext.onPointerDownScale=1,this._dragContext.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost),this._dragContext.draggableItems=[this._dragInjector.get(Mp)])}_isValid(e){return this._dragContext.isEmpty()&&(this._isBackgroundElement(e.targetElement)||this._isDragOnHost(e.targetElement))}_isBackgroundElement(e){return this._store.instances.get(We.BACKGROUND)?.hostElement.contains(e)}_isDragOnHost(e){return this._store.flowHost.contains(e)&&!this._getNode(e)}_getNode(e){let n=this._store.nodes.getAll().find(o=>o.isContains(e));return n&&n.fDraggingDisabled()&&(n=void 0),n}_isValidTrigger(e,n){return on(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Mc)};static \u0275prov=y({token:Mc,factory:Mc.\u0275fac})};return t=I([E(Dp)],t),t})(),X9=[K9,Y9],Pp=class{event;trigger;static fToken=Symbol("SelectByPointerRequest");constructor(i,e){this.event=i,this.trigger=e}},Z9=(()=>{let t=class Dc{_mediator=p(B);_store=p(A);_dragSession=p(fe);handle({event:e,trigger:n}){if(!this._isSelectionAllowed(e))return;let o=this._resolveSelectable(e.targetElement);this._deferRaiseLayerFor(o),on(e.originalEvent,n)?this._applyToggleSelect(o):this._applySingleSelect(o)}_isSelectionAllowed(e){return this._store.flowHost.contains(e.targetElement)&&this._dragSession.isEmpty()}_resolveSelectable(e){return this._findNodeOrGroupAt(e)??this._findConnectionAt(e)}_findNodeOrGroupAt(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_findConnectionAt(e){return this._store.connections.getAll().find(n=>n.isContains(e))}_deferRaiseLayerFor(e){e&&queueMicrotask(()=>{this._mediator.execute(new Ai(e,e.hostElement.parentElement))})}_applySingleSelect(e){if(!e||e.fSelectionDisabled()){this._clearSelection();return}e.isSelected()||(this._clearSelection(),this._select(e))}_applyToggleSelect(e){!e||e.fSelectionDisabled()||(e.isSelected()?this._deselect(e):this._select(e))}_clearSelection(){if(this._dragSession.selectedItems.length){for(let e of this._dragSession.selectedItems)e.unmarkAsSelected();this._dragSession.markSelectionAsChanged(),this._dragSession.selectedItems=[]}}_select(e){this._dragSession.selectedItems.push(e),e.markAsSelected(),this._dragSession.markSelectionAsChanged()}_deselect(e){let n=this._dragSession.selectedItems.indexOf(e);n>=0&&this._dragSession.selectedItems.splice(n,1),e.unmarkAsSelected(),this._dragSession.markSelectionAsChanged()}static \u0275fac=function(n){return new(n||Dc)};static \u0275prov=y({token:Dc,factory:Dc.\u0275fac})};return t=I([E(Pp)],t),t})(),Q9=[Z9];var m_=class extends Nm{hostElement=p(Ye).nativeElement};function J9(t){return _r(t,".f-drag-blocker")}var Jy=(()=>{class t extends m_{_result=p(si);_mediator=p(B);_platform=p(Xf);disabled=!1;fMultiSelectTrigger=e=>this._platform.getOS()===Zn.MAC_OS?e.metaKey:e.ctrlKey;fReassignConnectionTrigger=fn;fCreateConnectionTrigger=fn;fConnectionWaypointsTrigger=V(fn);fMoveControlPointTrigger=fn;fNodeResizeTrigger=fn;fNodeRotateTrigger=fn;fNodeMoveTrigger=fn;fCanvasMoveTrigger=fn;fExternalItemTrigger=fn;fSelectionChange=new re;fNodeIntersectedWithConnections=new re;fNodeConnectionsIntersection=et();fEmitOnNodeIntersect=!1;fCreateNode=new re;fMoveNodes=new re;fReassignConnection=new re;fCreateConnection=new re;fConnectionWaypointsChanged=et();fDropToGroup=new re;vCellSize=V(1,{transform:e=>Ie(e,1)});hCellSize=V(1,{transform:e=>Ie(e,1)});fCellSizeWhileDragging=V(!1,{transform:e=>K(e)});fDragStarted=new re;fDragEnded=new re;_dragHandlerInjector=p(gt);ngOnInit(){this._mediator.execute(new Np(this))}ngAfterViewInit(){super.subscribe()}onPointerDown(e){if(J9(e.targetElement))return!1;this._dragHandlerInjector.create(),this._result.clear(),this._mediator.execute(new Lp),this._mediator.execute(new gp(e)),this._mediator.execute(new Ep(e)),this._mediator.execute(new mp(e)),this._mediator.execute(new Pp(e,this.fMultiSelectTrigger)),this._mediator.execute(new Vu(e,this.fReassignConnectionTrigger)),this._mediator.execute(new Lu(e,this.fCreateConnectionTrigger)),this._mediator.execute(new ju(e,this.fConnectionWaypointsTrigger()));let n=e.isMouseLeftButton();return n||this.finalizeDragSequence(),n}prepareDragSequence(e){this._mediator.execute(new wp(e,this.fNodeResizeTrigger)),this._mediator.execute(new kp(e,this.fNodeRotateTrigger)),this._mediator.execute(new op(e,this.fNodeMoveTrigger)),this._mediator.execute(new up(e,this.fExternalItemTrigger)),this._mediator.execute(new rp(e)),this._mediator.execute(new Dp(e,this.fCanvasMoveTrigger)),this._mediator.execute(new Bp)}onSelect(e){this._mediator.execute(new pp(e))}onPointerMove(e){this._mediator.execute(new Ap(e))}onPointerUp(e){this._mediator.execute(new Ip(e)),this._mediator.execute(new _p(e)),this._mediator.execute(new Bu(e)),this._mediator.execute(new Ou(e)),this._mediator.execute(new xp(e)),this._mediator.execute(new Sp(e)),this._mediator.execute(new ip(e)),this._mediator.execute(new cp(e)),this._mediator.execute(new Uu(e)),this._mediator.execute(new Mu(e)),this._mediator.execute(new hp(e)),this._mediator.execute(new Hu(e)),this._mediator.execute(new wu)}finalizeDragSequence(){this._mediator.execute(new ri),this._mediator.execute(new Dr),this._result.clear(),this._dragHandlerInjector.destroy()}ngOnDestroy(){this._mediator.execute(new ri),this._mediator.execute(new Vp),super.unsubscribe()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,selectors:[["f-flow","fDraggable",""]],inputs:{disabled:[2,"fDraggableDisabled","disabled",K],fMultiSelectTrigger:"fMultiSelectTrigger",fReassignConnectionTrigger:"fReassignConnectionTrigger",fCreateConnectionTrigger:"fCreateConnectionTrigger",fConnectionWaypointsTrigger:[1,"fConnectionWaypointsTrigger"],fMoveControlPointTrigger:"fMoveControlPointTrigger",fNodeResizeTrigger:"fNodeResizeTrigger",fNodeRotateTrigger:"fNodeRotateTrigger",fNodeMoveTrigger:"fNodeMoveTrigger",fCanvasMoveTrigger:"fCanvasMoveTrigger",fExternalItemTrigger:"fExternalItemTrigger",fEmitOnNodeIntersect:[2,"fEmitOnNodeIntersect","fEmitOnNodeIntersect",K],vCellSize:[1,"vCellSize"],hCellSize:[1,"hCellSize"],fCellSizeWhileDragging:[1,"fCellSizeWhileDragging"]},outputs:{fSelectionChange:"fSelectionChange",fNodeIntersectedWithConnections:"fNodeIntersectedWithConnections",fNodeConnectionsIntersection:"fNodeConnectionsIntersection",fCreateNode:"fCreateNode",fMoveNodes:"fMoveNodes",fReassignConnection:"fReassignConnection",fCreateConnection:"fCreateConnection",fConnectionWaypointsChanged:"fConnectionWaypointsChanged",fDropToGroup:"fDropToGroup",fDragStarted:"fDragStarted",fDragEnded:"fDragEnded"},exportAs:["fDraggable"],standalone:!1,features:[Me([si,gt]),Z]})}return t})(),eB=[...X9,...D7,...Q6,...Q9,...p9,...a7,...$9,...Q7,...f9,...N9,...H9,...x9,...b9],tB=(()=>{let t=class Pc{_store=p(A);handle({waypointIndex:e,connectionId:n}){let o=this._store.connections.require(n),r=o.fWaypoints()?.waypoints().slice();if(!r)throw new Error("Connection waypoints not found");r.splice(e,1),o.fWaypoints()?.waypoints.set(r),this._store.fDraggable?.fConnectionWaypointsChanged.emit(this._changeEvent(o))}_changeEvent(e){return new qu(e.fId(),e.fWaypoints()?.waypoints()||[])}static \u0275fac=function(n){return new(n||Pc)};static \u0275prov=y({token:Pc,factory:Pc.\u0275fac})};return t=I([E(Pm)],t),t})(),__=class{static fToken=Symbol("RemoveSnapConnectionFromStoreRequest")},nB=(()=>{let t=class Rc{_store=p(A);handle(e){this._store.connections.removeInstanceForSnap()}static \u0275fac=function(n){return new(n||Rc)};static \u0275prov=y({token:Rc,factory:Rc.\u0275fac})};return t=I([E(__)],t),t})(),iB=[gh,Li,XL,ZL,QL,JL,U5,C6,X5,m6,M6,E6,y6,P6,O6,R6,b6,k6,Z5,L6,v6,g6,_6,d6,f6,u6,p6,D6,T6,F6,N6,I6,S6,A6,B6,V6,z6,nB,tB],Gr=class{instance;static fToken=Symbol("AddConnectorToStoreRequest");constructor(i){this.instance=i}},oB=(()=>{let t=class Oc{_store=p(A);_mediator=p(B);handle({instance:e}){switch(e.kind){case"input":this._addInput(e);break;case"output":this._addOutput(e);break;case"outlet":this._addOutlet(e);break;default:throw new Error(`Unknown connector kind: ${e.kind}`)}}_addInput(e){this._store.inputs.add(e),this._store.emitNodeChanges(),this._geometryRegister(e)}_addOutput(e){this._store.outputs.add(e),this._store.emitNodeChanges(),this._geometryRegister(e)}_addOutlet(e){this._store.outlets.add(e),this._store.emitNodeChanges(),this._geometryRegister(e)}_geometryRegister(e){this._mediator.execute(new iu(e.fId(),e.fNodeId,e.kind,e.hostElement))}static \u0275fac=function(n){return new(n||Oc)};static \u0275prov=y({token:Oc,factory:Oc.\u0275fac})};return t=I([E(Gr)],t),t})(),Fi=class{position;connectorRefs;static fToken=Symbol("CalculateClosestConnectorRequest");constructor(i,e){this.position=i,this.connectorRefs=e}},rB=(()=>{let t=class Fc{handle({position:e,connectorRefs:n}){let o,r=1/0;for(let a of n){let s=this._distanceToRect(e,a.rect);s<r&&(r=s,o=a)}return o?Bt(me({},o),{distance:r}):void 0}_distanceToRect(e,{x:n,y:o,width:r,height:a}){let s=this._clamp(e.x,n,n+r),c=this._clamp(e.y,o,o+a),u=e.x-s,h=e.y-c;return Math.sqrt(u*u+h*h)}_clamp(e,n,o){return Math.max(n,Math.min(o,e))}static \u0275fac=function(n){return new(n||Fc)};static \u0275prov=y({token:Fc,factory:Fc.\u0275fac})};return t=I([E(Fi)],t),t})(),jr=class{pointerPosition;connectableConnectors;static fToken=Symbol("FindConnectableConnectorUsingPriorityAndPositionRequest");constructor(i,e){this.pointerPosition=i,this.connectableConnectors=e}},aB=(()=>{let t=class Nc{_mediator=p(B);_store=p(A);_browser=p(at);get _transform(){return this._store.transform}get _flowHost(){return this._store.flowHost}get _fNodes(){return this._store.nodes.getAll()}get _snapConnection(){return this._store.connections.getForSnap()}handle(e){let n=this._findConnectorAtPosition(e);return n.length>0?n[0]:void 0}_findConnectorAtPosition(e){let n=[];n.push(...this._filterConnectorsThatLocatedAtPosition(e));let o=this._isSnapConnectionEnabledAndHasClosestConnector(e);o&&n.unshift(o.connector);let r=this._getFirstConnectableConnectorOfNodeAtPosition(e);return r&&n.push(r),n}_filterConnectorsThatLocatedAtPosition(e){return e.connectableConnectors.filter(n=>ne.isIncludePoint(n.rect,this._calculatePointerInFlow(e.pointerPosition))).map(n=>n.connector)}_calculatePointerInFlow(e){return No(e,this._flowHost,this._transform)}_isSnapConnectionEnabledAndHasClosestConnector(e){if(!this._snapConnection)return;let n=this._mediator.execute(new Fi(this._calculatePointerInFlow(e.pointerPosition),e.connectableConnectors));return this._isValidClosestInput(n)?n:void 0}_isValidClosestInput(e){return!!e&&e.distance<this._snapConnection.fSnapThreshold}_getFirstConnectableConnectorOfNodeAtPosition(e){return this._getElementsFromPoint(e.pointerPosition).map(n=>this._findConnectableNode(n)).filter(n=>!!n).map(n=>this._findFirstConnectableConnectorOfNode(e.connectableConnectors,n)).find(n=>!!n)}_getElementsFromPoint(e){return this._browser.document.elementsFromPoint(e.x,e.y)}_findConnectableNode(e){return this._fNodes.find(n=>n.isContains(e)&&n.fConnectOnNode())}_findFirstConnectableConnectorOfNode(e,n){return e.find(o=>o.connector.fNodeId===n.fId())?.connector}static \u0275fac=function(n){return new(n||Nc)};static \u0275prov=y({token:Nc,factory:Nc.\u0275fac})};return t=I([E(jr)],t),t})(),Ur=class{source;pointer;static fToken=Symbol("CalculateTargetConnectorsToConnectRequest");constructor(i,e){this.source=i,this.pointer=e}},qt=class{connector;static fToken=Symbol("GetConnectorRectReferenceRequest");constructor(i){this.connector=i}},sB=(()=>{let t=class Ac{_mediator=p(B);handle({connector:e}){return{connector:e,rect:this._getRect(e)}}_getRect(e){return this._mediator.execute(new oi(e.hostElement))}static \u0275fac=function(n){return new(n||Ac)};static \u0275prov=y({token:Ac,factory:Ac.\u0275fac})};return t=I([E(qt)],t),t})(),$r=class{nodeOrGroup;static fToken=Symbol("AddNodeToStoreRequest");constructor(i){this.nodeOrGroup=i}},lB=(()=>{let t=class Lc{_store=p(A);_mediator=p(B);handle({nodeOrGroup:e}){this._store.nodes.add(e),this._mediator.execute(new ou(e.fId(),e.hostElement,e)),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Lc)};static \u0275prov=y({token:Lc,factory:Lc.\u0275fac})};return t=I([E($r)],t),t})(),Rp=class{nodeOrGroup;static fToken=Symbol("CalculateInputConnectionsRequest");constructor(i){this.nodeOrGroup=i}},cB=(()=>{let t=class Bc{_store=p(A);handle({nodeOrGroup:e}){let n=this._collectInputIds(e);return this._collectConnections(n)}_collectInputIds(e){let n=new Set,o=this._store.inputs.getAll();for(let r of o)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],o=this._store.connections.getAll();for(let r of o)e.has(r.fInputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||Bc)};static \u0275prov=y({token:Bc,factory:Bc.\u0275fac})};return t=I([E(Rp)],t),t})(),ko=class{connector;pointerPosition;static fToken=Symbol("CalculateConnectableSideByConnectedPositionsRequest");constructor(i,e){this.connector=i,this.pointerPosition=e}},hy=2,yt=(function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=4]="TOP",t[t.BOTTOM=8]="BOTTOM",t[t.ALL=15]="ALL",t})(yt||{});function dB(t,i,e,n,o){let r=uB(o),a=e-t,s=n-i,c=pB(a,s);return hB(c,r)?c:fB(a,s,r,c)}function uB(t){if(!t||t.length===0)return yt.ALL;let i=yt.NONE;for(let e=0;e<t.length;e++)switch(t[e]){case j.LEFT:i|=yt.LEFT;break;case j.RIGHT:i|=yt.RIGHT;break;case j.TOP:i|=yt.TOP;break;case j.BOTTOM:i|=yt.BOTTOM;break}return i||yt.ALL}function pB(t,i){let e=t<0?-t:t,n=i<0?-i:i;return e-n>hy?t<0?j.LEFT:j.RIGHT:(n-e>hy,i<0?j.TOP:j.BOTTOM)}function hB(t,i){switch(t){case j.LEFT:return(i&yt.LEFT)!==0;case j.RIGHT:return(i&yt.RIGHT)!==0;case j.TOP:return(i&yt.TOP)!==0;case j.BOTTOM:return(i&yt.BOTTOM)!==0;default:return!0}}function fB(t,i,e,n){let o=n,r=-1/0;if(e&yt.RIGHT){let a=t;a>r&&(r=a,o=j.RIGHT)}if(e&yt.LEFT){let a=-t;a>r&&(r=a,o=j.LEFT)}if(e&yt.BOTTOM){let a=i;a>r&&(r=a,o=j.BOTTOM)}if(e&yt.TOP){let a=-i;a>r&&(r=a,o=j.TOP)}return o}function Op(t){return t===j.CALCULATE||t===j.CALCULATE_HORIZONTAL||t===j.CALCULATE_VERTICAL}var mB={[j.CALCULATE]:[j.TOP,j.BOTTOM,j.LEFT,j.RIGHT],[j.CALCULATE_HORIZONTAL]:[j.LEFT,j.RIGHT],[j.CALCULATE_VERTICAL]:[j.TOP,j.BOTTOM]},_B=(()=>{let t=class Vc{_mediator=p(B);handle({connector:e,pointerPosition:n}){let o=e.userFConnectableSide,r=this._getConnectorRect(e.hostElement).gravityCenter,a=this._accumulateConnectedCenters(e.hostElement,e.toConnector,n),s=a.sumX/a.count,c=a.sumY/a.count;return dB(r.x,r.y,s,c,mB[o])}_accumulateConnectedCenters(e,n,o){let r=o?.x||0,a=o?.y||0,s=o?1:0;if(n&&n.length)for(let c=0;c<n.length;c++){let u=n[c].hostElement;if(u===e)continue;let h=this._getConnectorRect(u).gravityCenter;r+=h.x,a+=h.y,s++}return{sumX:r,sumY:a,count:s}}_getConnectorRect(e){return this._mediator.execute(new it(e))}static \u0275fac=function(n){return new(n||Vc)};static \u0275prov=y({token:Vc,factory:Vc.\u0275fac})};return t=I([E(ko)],t),t})(),Fp=class{connector;static fToken=Symbol("CalculateConnectableSideByInternalPositionRequest");constructor(i){this.connector=i}},Np=class{fComponent;static fToken=Symbol("AddDndToStoreRequest");constructor(i){this.fComponent=i}},gB=(()=>{let t=class zc{_store=p(A);handle(e){this._store.fDraggable=e.fComponent}static \u0275fac=function(n){return new(n||zc)};static \u0275prov=y({token:zc,factory:zc.\u0275fac})};return t=I([E(Np)],t),t})(),Ap=class{event;static fToken=Symbol("OnPointerMoveRequest");constructor(i){this.event=i}},vB=(()=>{let t=class Hc{_mediator=p(B);_store=p(A);get _hostElement(){return this._store.fDraggable?.hostElement}_dragContext=p(fe);handle({event:e}){this._dragContext.rememberPointerEvent(e),this._setDifferenceToDraggableItems(this._getDifferenceBetweenPointerAndPointerDown(e),e),this._mediator.execute(new Pr)}_setDifferenceToDraggableItems(e,n){this._dragContext.draggableItems.forEach(o=>{o.onPointerMove(me({},e),n)})}_getDifferenceBetweenPointerAndPointerDown(e){return this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition)}_getPointerPositionInCanvas(e){return he.fromPoint(e.getPosition()).elementTransform(this._hostElement)}static \u0275fac=function(n){return new(n||Hc)};static \u0275prov=y({token:Hc,factory:Hc.\u0275fac})};return t=I([E(Ap)],t),t})(),Lp=class{static fToken=Symbol("InitializeDragSequenceRequest")},bB=(()=>{let t=class qc{_dragContext=p(fe);handle(e){this._dragContext.reset()}static \u0275fac=function(n){return new(n||qc)};static \u0275prov=y({token:qc,factory:qc.\u0275fac})};return t=I([E(Lp)],t),t})(),li=class{static fToken=Symbol("IsDragStartedRequest")},yB=(()=>{let t=class Gc{_store=p(A);handle(e){return!!this._store.fDraggable?.isDragStarted}static \u0275fac=function(n){return new(n||Gc)};static \u0275prov=y({token:Gc,factory:Gc.\u0275fac})};return t=I([E(li)],t),t})(),Bp=class{static fToken=Symbol("PrepareDragSequenceRequest")},CB=(()=>{let t=class jc{_mediator=p(B);_dragContext=p(fe);handle(e){this._callPrepareDragSequence(),this._mediator.execute(new Tu)}_callPrepareDragSequence(){this._dragContext.draggableItems.forEach(e=>e.prepareDragSequence?.())}static \u0275fac=function(n){return new(n||jc)};static \u0275prov=y({token:jc,factory:jc.\u0275fac})};return t=I([E(Bp)],t),t})(),Vp=class{static fToken=Symbol("RemoveDndFromStoreRequest")},xB=(()=>{let t=class Uc{_store=p(A);handle(e){this._store.fDraggable=void 0}static \u0275fac=function(n){return new(n||Uc)};static \u0275prov=y({token:Uc,factory:Uc.\u0275fac})};return t=I([E(Vp)],t),t})(),wB=[gB,vB,bB,CB,yB,xB],TB=new ve("CONNECTABLE_SIDE_EPSILON"),SB=(()=>{let t=class $c{_mediator=p(B);_lastSide=new WeakMap;_epsilon=Math.max(0,p(TB,{optional:!0})??2);handle({connector:e}){if(this._isDragging()){let o=this._lastSide.get(e);if(o!==void 0)return o;let r=this._getSideByDelta(e.hostElement,e.fNodeHost,e);return this._lastSide.set(e,r),r}let n=this._getSideByDelta(e.hostElement,e.fNodeHost,e);return this._lastSide.set(e,n),n}_getSideByDelta(e,n,o){let r=ne.fromElement(e),a=n.getBoundingClientRect(),s=r.gravityCenter.x,c=r.gravityCenter.y,u=s-a.left,h=a.right-s,g=c-a.top,C=a.bottom-c,M=0,S=u,N=[u,h,g,C];for(let J=1;J<4;J++){let ce=N[J];ce<S&&(S=ce,M=J)}let q=M===0?j.LEFT:M===1?j.RIGHT:M===2?j.TOP:j.BOTTOM,$=this._lastSide.get(o);if($!==void 0&&$!==q){let J=$===j.LEFT?0:$===j.RIGHT?1:$===j.TOP?2:3;(J===0?u:J===1?h:J===2?g:C)-S<=this._epsilon&&(q=$)}return q}_isDragging(){return this._mediator.execute(new li)}static \u0275fac=function(n){return new(n||$c)};static \u0275prov=y({token:$c,factory:$c.\u0275fac})};return t=I([E(Fp)],t),t})(),Io=class{nodeOrGroup;static fToken=Symbol("CalculateConnectorsConnectableSidesRequest");constructor(i){this.nodeOrGroup=i}},kB=(()=>{let t=class Wc{_mediator=p(B);handle({nodeOrGroup:e}){let n=e.connectors,o=n.length;for(let a=0;a<o;a++){let s=n[a];s.fConnectableSide=this._resolveSideForConnectorFast(s)}let r=new Set;for(let a=0;a<o;a++){let c=n[a].toConnector;if(c&&c.length)for(let u=0,h=c.length;u<h;u++){let g=c[u],C=g.userFConnectableSide;Op(C)&&r.add(g)}}r.size>0&&r.forEach(a=>{a.fConnectableSide=this._calculateByConnectedPositions(a)})}_resolveSideForConnectorFast(e){let n=e.userFConnectableSide;return n===j.AUTO?this._mediator.execute(new Fp(e)):Op(n)?this._calculateByConnectedPositions(e):n}_calculateByConnectedPositions(e){return this._mediator.execute(new ko(e))}static \u0275fac=function(n){return new(n||Wc)};static \u0275prov=y({token:Wc,factory:Wc.\u0275fac})};return t=I([E(Io)],t),t})(),Eo=class{static fToken=Symbol("CalculateNodesBoundingBoxRequest")},IB=(()=>{let t=class Kc{_store=p(A);handle(e){return ne.union(this._nodesRects())}_nodesRects(){return this._store.nodes.getAll().map(e=>ne.fromElement(e.hostElement))}static \u0275fac=function(n){return new(n||Kc)};static \u0275prov=y({token:Kc,factory:Kc.\u0275fac})};return t=I([E(Eo)],t),t})(),zp=class{fNodes;static fToken=Symbol("CalculateNodesBoundingBoxNormalizedPositionRequest");constructor(i){this.fNodes=i}},EB=(()=>{let t=class Yc{_store=p(A);_mediator=p(B);handle(e){return ne.union(this._getNodesRects(e.fNodes||this._store.nodes.getAll()))}_getNodesRects(e){return e.map(n=>this._getNodeRect(n))}_getNodeRect(e){let n=this._mediator.execute(new To(e.hostElement));if(n)return this._getElementRect(e,n);let o=this._mediator.execute(new it(e.hostElement));return this._getElementRect(e,o)}_getElementRect(e,n){return ne.initialize(e._position.x,e._position.y,n.width,n.height)}static \u0275fac=function(n){return new(n||Yc)};static \u0275prov=y({token:Yc,factory:Yc.\u0275fac})};return t=I([E(zp)],t),t})(),Hp=class{nodeOrGroup;static fToken=Symbol("CalculateOutputConnectionsRequest");constructor(i){this.nodeOrGroup=i}},MB=(()=>{let t=class Xc{_store=p(A);handle({nodeOrGroup:e}){let n=this._collectOutputIds(e);return this._collectConnections(n)}_collectOutputIds(e){let n=new Set,o=this._store.outputs.getAll();for(let r of o)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],o=this._store.connections.getAll();for(let r of o)e.has(r.fOutputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||Xc)};static \u0275prov=y({token:Xc,factory:Xc.\u0275fac})};return t=I([E(Hp)],t),t})(),Wr=class{nodeOrGroup;static fToken=Symbol("FitToChildNodesAndGroupsRequest");constructor(i){this.nodeOrGroup=i}},Ni=class{fNode;rect;static fToken=Symbol("GetNodePaddingRequest");constructor(i,e){this.fNode=i,this.rect=e}},DB=(()=>{let t=class Zc{_browser=p(at);handle(e){return e.fNode.fIncludePadding()?this._getPaddingData(e.fNode,e.rect):[0,0,0,0]}_getPaddingData(e,n){let o=this._browser.window.getComputedStyle(e.hostElement);return[this._browser.toPixels(o.paddingLeft,n.width,n.height,o.fontSize),this._browser.toPixels(o.paddingTop,n.width,n.height,o.fontSize),this._browser.toPixels(o.paddingRight,n.width,n.height,o.fontSize),this._browser.toPixels(o.paddingBottom,n.width,n.height,o.fontSize)]}static \u0275fac=function(n){return new(n||Zc)};static \u0275prov=y({token:Zc,factory:Zc.\u0275fac})};return t=I([E(Ni)],t),t})(),PB=(()=>{let t=class Qc{_mediator=p(B);_store=p(A);get _nodes(){return this._store.nodes.getAll()}handle({nodeOrGroup:e}){if(e.fAutoSizeToFitChildren()){let r=this._calculateDirectChildren(e);if(r.length){let a=this._boundingRect(e),s=this._calculateChildrenBounding(r,this._paddings(e,a));e.updatePosition(s),e.updateSize(s),e.redraw()}}let n=e.fParentId();if(!n)return;let o=this._nodes.find(r=>r.fId()===n);o&&this._mediator.execute(new Wr(o))}_calculateDirectChildren(e){return this._nodes.filter(n=>n.fParentId()===e.fId())}_unionRect(e){return ne.union(e.map(n=>this._boundingRect(n)))||ne.initialize()}_boundingRect(e){return this._mediator.execute(new it(e.hostElement))}_paddings(e,n){return this._mediator.execute(new Ni(e,n))}_calculateChildrenBounding(e,[n,o,r,a]){let s=this._unionRect(e);return s=ne.initialize(s.x-n,s.y-o,s.width+n+r,s.height+o+a),s}static \u0275fac=function(n){return new(n||Qc)};static \u0275prov=y({token:Qc,factory:Qc.\u0275fac})};return t=I([E(Wr)],t),t})(),qp=class{id;static fToken=Symbol("GetChildNodeIdsRequest");constructor(i){this.id=i}},RB=(()=>{let t=class Jc{_store=p(A);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle(e){if(!e.id)return[];let n=new Set,o=[];return this._collectDescendants(e.id,o,n),o}_collectDescendants(e,n,o){if(o.has(e))throw new Error(`Circular reference detected in the node hierarchy. Node id: ${e}`);o.add(e);let r=this._allNodesAndGroups.filter(a=>a.fParentId()===e).map(a=>a.fId());n.push(...r);for(let a of r)this._collectDescendants(a,n,o)}static \u0275fac=function(n){return new(n||Jc)};static \u0275prov=y({token:Jc,factory:Jc.\u0275fac})};return t=I([E(qp)],t),t})(),Mo=class{nodeOrGroup;static fToken=Symbol("GetParentNodesRequest");constructor(i){this.nodeOrGroup=i}},OB=(()=>{let t=class ed{_store=p(A);handle({nodeOrGroup:e}){return this._getParentNodes(e,new Set,[])}_getParentNodes(e,n,o){if(n.has(e.fId()))throw new Error("Circular reference detected in the node hierarchy. Node id: "+e.fId());n.add(e.fId());let r=this._store.nodes.get(e.fParentId());return r?(o.push(r),this._getParentNodes(r,n,o)):o}static \u0275fac=function(n){return new(n||ed)};static \u0275prov=y({token:ed,factory:ed.\u0275fac})};return t=I([E(Mo)],t),t})(),Kr=class{nodeOrGroup;destroyRef;static fToken=Symbol("UpdateNodeWhenStateOrSizeChangedRequest");constructor(i,e){this.nodeOrGroup=i,this.destroyRef=e}},FB=(()=>{let t=class td{_mediator=p(B);handle({nodeOrGroup:e,destroyRef:n}){let{hostElement:o,stateChanges:r}=e;new xn(new dm(o),r).listen(n,()=>{this._mediator.execute(new Ei),this._isDragging()||(this._mediator.execute(new wo(e.fId(),"UpdateNodeWhenStateOrSizeChanged")),this._mediator.execute(new Io(e)),this._mediator.execute(new Wr(e)))})}_isDragging(){return this._mediator.execute(new li)}static \u0275fac=function(n){return new(n||td)};static \u0275prov=y({token:td,factory:td.\u0275fac})};return t=I([E(Kr)],t),t})(),Yr=class{instance;static fToken=Symbol("RemoveNodeFromStoreRequest");constructor(i){this.instance=i}},NB=(()=>{let t=class nd{_store=p(A);_mediator=p(B);handle({instance:e}){this._store.nodes.remove(e),this._mediator.execute(new ru(e.fId())),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||nd)};static \u0275prov=y({token:nd,factory:nd.\u0275fac})};return t=I([E(Yr)],t),t})(),AB=[lB,_B,SB,cB,kB,IB,EB,MB,PB,RB,DB,OB,FB,NB],LB=(()=>{let t=class id{_mediator=p(B);_store=p(A);get _targets(){return this._store.inputs.getAll()}handle({source:e,pointer:n}){let o=this._getConnectableTargets(e),r=[];for(let a of o)r.push(this._mediator.execute(new qt(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableTargets(e){if(e.hasConnectionLimits)return this._targets.filter(o=>e.canConnectTo(o));let n=this._targets.filter(o=>o.canBeConnected);return e.isSelfConnectable||(n=n.filter(o=>o.fNodeId!==e.fNodeId)),n}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:o}of e)Op(o.userFConnectableSide)&&(o.fConnectableSide=this._calculateByConnectedPositions(o,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new ko(e,n))}static \u0275fac=function(n){return new(n||id)};static \u0275prov=y({token:id,factory:id.\u0275fac})};return t=I([E(Ur)],t),t})(),Gp=class{target;pointer;static fToken=Symbol("CalculateSourceConnectorsToConnectRequest");constructor(i,e){this.target=i,this.pointer=e}},BB=(()=>{let t=class od{_mediator=p(B);_store=p(A);get _sources(){return this._store.outputs.getAll()}handle({target:e,pointer:n}){let o=this._getConnectableSources(e),r=[];for(let a of o)r.push(this._mediator.execute(new qt(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableSources(e){return this._sources.filter(n=>{let o=n.canBeConnected;return o&&n.hasConnectionLimits&&(o=n.canConnectTo(e)),o})}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:o}of e)Op(o.userFConnectableSide)&&(o.fConnectableSide=this._calculateByConnectedPositions(o,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new ko(e,n))}static \u0275fac=function(n){return new(n||od)};static \u0275prov=y({token:od,factory:od.\u0275fac})};return t=I([E(Gp)],t),t})(),Do=class{connectors;static fToken=Symbol("MarkConnectableConnectorsRequest");constructor(i){this.connectors=i}},pt={DRAG_AND_DROP:{DRAGGING:"f-dragging",CONNECTIONS_DRAGGING:"f-connections-dragging"},GROUPING:{OVER_BOUNDARY:"f-grouping-over-boundary",DROP_ACTIVE:"f-grouping-drop-active"},CONNECTOR:{OUTPUT_CONNECTED:"f-node-output-connected",OUTPUT_NOT_CONNECTABLE:"f-node-output-not-connectable",INPUT_CONNECTED:"f-node-input-connected",INPUT_NOT_CONNECTABLE:"f-node-input-not-connectable",CONNECTABLE:"f-connector-connectable"}},VB=(()=>{let t=class rd{_store=p(A);handle({connectors:e}){this._store.flowHost.classList.add(pt.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._markConnector(n))}_markConnector({hostElement:e}){e.classList.add(pt.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||rd)};static \u0275prov=y({token:rd,factory:rd.\u0275fac})};return t=I([E(Do)],t),t})(),Xr=class{instance;static fToken=Symbol("RemoveConnectorFromStoreRequest");constructor(i){this.instance=i}},zB=(()=>{let t=class ad{_store=p(A);_mediator=p(B);handle({instance:e}){switch(e.kind){case"input":this._removeInput(e);break;case"output":this._removeOutput(e);break;case"outlet":this._removeOutlet(e);break;default:throw new Error(`Unknown connector kind: ${e.kind}`)}}_removeInput(e){this._store.inputs.removeById(e.fId()),this._store.emitNodeChanges(),this._geometryUnregister(e)}_removeOutput(e){this._store.outputs.removeById(e.fId()),this._store.emitNodeChanges(),this._geometryUnregister(e)}_removeOutlet(e){this._store.outlets.removeById(e.fId()),this._store.emitNodeChanges(),this._geometryUnregister(e)}_geometryUnregister(e){this._mediator.execute(new Cr(e.fId(),e.kind))}static \u0275fac=function(n){return new(n||ad)};static \u0275prov=y({token:ad,factory:ad.\u0275fac})};return t=I([E(Xr)],t),t})(),Po=class{connectors;static fToken=Symbol("UnmarkConnectableConnectorsRequest");constructor(i){this.connectors=i}},HB=(()=>{let t=class sd{_store=p(A);handle({connectors:e}){this._store.flowHost.classList.remove(pt.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._unmarkConnector(n))}_unmarkConnector({hostElement:e}){e.classList.remove(pt.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||sd)};static \u0275prov=y({token:sd,factory:sd.\u0275fac})};return t=I([E(Po)],t),t})(),qB=[oB,zB,rB,aB,BB,LB,sB,VB,HB],jp=class{instance;static fToken=Symbol("AddFlowToStoreRequest");constructor(i){this.instance=i}},Bi=(function(t){return t.TOP_BOTTOM="TOP_BOTTOM",t.BOTTOM_TOP="BOTTOM_TOP",t.LEFT_RIGHT="LEFT_RIGHT",t.RIGHT_LEFT="RIGHT_LEFT",t})(Bi||{}),Qn=(function(t){return t.MANUAL="manual",t.AUTO="auto",t})(Qn||{});function GB(t){let i=[...t.nodes.map(fy),...t.groups.map(fy)],e=new Set(t.nodes.map(s=>s.id)),n=new Set(t.groups.map(s=>s.id)),o=new Map,r=new Map;for(let s of[...t.nodes,...t.groups]){for(let c of s.fOutputs)o.set(c.id,s.id);for(let c of s.fInputs)r.set(c.id,s.id)}let a=t.connections.reduce((s,c)=>{let u=o.get(c.fOutputId),h=r.get(c.fInputId);return!u||!h||s.push({source:u,target:h}),s},[]);return{nodes:i,connections:a,nodeIds:e,groupIds:n}}function fy(t){return{id:t.id,size:t.measuredSize?me({},t.measuredSize):t.size?me({},t.size):void 0}}var jB=1,yh=(()=>{class t{_destroyRef=p(vt);_flows=new Map;_engine;constructor(){this._destroyRef.onDestroy(()=>{Array.from(this._flows.keys()).forEach(e=>this.unregisterFlow(e)),this._engine=void 0})}attachEngine(e){this._engine=e}registerFlow(e,n){let o=e.fId();this.unregisterFlow(o);let r={flow:e,store:n,nodeSignature:this._buildNodeSignature(n),connectionSignature:this._buildConnectionSignature(n),timeoutId:null,raf1:null,raf2:null,unsubs:[],runId:0,isApplying:!1};r.unsubs.push(n.nodesChanges$.listen(()=>this._handleNodesChanges(o)),n.connectionsChanges$.listen(()=>this._handleConnectionsChanges(o))),this._flows.set(o,r),this._engine?.getMode()===Qn.AUTO&&this._scheduleRelayout(o)}unregisterFlow(e){let n=this._flows.get(e);n&&(n.unsubs.forEach(o=>o()),this._clearScheduledWork(n),this._flows.delete(e))}handleModeChanged(e){if(e===Qn.AUTO)for(let n of this._flows.keys())this._scheduleRelayout(n)}async relayout(e){if(this._engine){if(e){let n=this._flows.get(e);n&&await this._relayoutRegisteredFlow(e,n);return}for(let[n,o]of this._flows.entries())await this._relayoutRegisteredFlow(n,o)}}_handleNodesChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let o=this._buildNodeSignature(n.store);o!==n.nodeSignature&&(n.nodeSignature=o,this._scheduleRelayout(e))}_handleConnectionsChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let o=this._buildConnectionSignature(n.store);o!==n.connectionSignature&&(n.connectionSignature=o,this._scheduleRelayout(e))}_scheduleRelayout(e){let n=this._flows.get(e);!n||!this._engine||this._engine.getMode()!==Qn.AUTO||(n.timeoutId!==null&&clearTimeout(n.timeoutId),this._cancelAnimationFrames(n),n.timeoutId=setTimeout(()=>{n.timeoutId=null,this._runAfterNextPaint(n,()=>{this._relayoutFlowIfReady(e)})},jB))}async _relayoutFlowIfReady(e){let n=this._flows.get(e);if(!(!n||!this._engine||this._engine.getMode()!==Qn.AUTO)){if(n.store.hasPendingProgressiveRender){this._scheduleRelayout(e);return}await this._relayoutRegisteredFlow(e,n)}}async _relayoutRegisteredFlow(e,n){if(!this._engine)return;let o=GB(n.flow.getState({measuredSize:!0})),r=++n.runId,a=await this._engine.calculate(o.nodes,o.connections,{flowId:e,mode:this._engine.getMode()}),s=this._flows.get(e);if(!(!s||s.runId!==r||!this._applyPositions(s.store,a.nodes).length)){s.isApplying=!0;try{s.flow.redraw(),this._emitWriteback(e,a.nodes,o.nodeIds,o.groupIds)}finally{queueMicrotask(()=>{let u=this._flows.get(e);u&&(u.isApplying=!1)})}}}_emitWriteback(e,n,o,r){let a=this._engine?.getWriteback();a&&a({flowId:e,nodes:n.filter(s=>o.has(s.id)),groups:n.filter(s=>r.has(s.id))})}_applyPositions(e,n){return n.filter(o=>{let r=e.nodes.get(o.id);return!r||H.isEqual(r._position,o.position)?!1:(r.position.set(me({},o.position)),!0)})}_buildNodeSignature(e){return e.nodes.getAll().map(n=>n.fId()).sort().join("|")}_buildConnectionSignature(e){return e.connections.getAll().map(n=>`${n.fId()}:${n.fOutputId()}:${n.fInputId()}`).sort().join("|")}_runAfterNextPaint(e,n){if(this._cancelAnimationFrames(e),typeof requestAnimationFrame!="function"){n();return}e.raf1=requestAnimationFrame(()=>{e.raf1=null,e.raf2=requestAnimationFrame(()=>{e.raf2=null,n()})})}_clearScheduledWork(e){e.timeoutId!==null&&(clearTimeout(e.timeoutId),e.timeoutId=null),this._cancelAnimationFrames(e)}_cancelAnimationFrames(e){e.raf1!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(e.raf1),e.raf1=null),e.raf2!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(e.raf2),e.raf2=null)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),eC=new ve("F_LAYOUT_OPTIONS");function tC(t,i){return t.reduce((e,n)=>{let o=i.get(n.id);return o&&e.push({id:n.id,position:o}),e},[])}var UB=new ve("F_LAYOUT"),Up=class{_controller=p(yh);_config=p(eC,{optional:!0})??{};_interactiveOptions;_mode;_writeback;_defaultOptions;interactiveOptions;constructor(i){this._mode=this._config.mode??Qn.MANUAL,this._writeback=this._config.writeback??null,this._defaultOptions=this.mergeOptions(i,this._config.options),this._interactiveOptions=W(this.mergeOptions(this._defaultOptions,{})),this.interactiveOptions=k(()=>this.mergeOptions(this._interactiveOptions(),{})),this._controller.attachEngine(this)}setMode(i){this._mode=i,this._controller.handleModeChanged(i)}getMode(){return this._mode}setWriteback(i){this._writeback=i}getWriteback(){return this._writeback}setInteractiveOptions(i){this._interactiveOptions.set(this.mergeOptions(this._interactiveOptions(),i))}relayout(i){return this._controller.relayout(i)}getProviderConfig(){return me({},this._config)}resolveLayoutOptions(i){let e=me({},i??{});return delete e.flowId,delete e.mode,this.mergeOptions(this._interactiveOptions(),e)}};function nC(t,i){return[yh,t,{provide:UB,useExisting:t},{provide:eC,useValue:i??{}}]}var $B=(()=>{let t=class ld{_store=p(A);_layoutController=p(yh,{optional:!0});handle({instance:e}){this._store.fFlow=e,this._layoutController?.registerFlow(e,this._store)}static \u0275fac=function(n){return new(n||ld)};static \u0275prov=y({token:ld,factory:ld.\u0275fac})};return t=I([E(jp)],t),t})(),$p=class{static fToken=Symbol("GetFlowRequest")},WB=(()=>{let t=class cd{_store=p(A);handle(e){let n=this._store.fFlow;if(!n)throw new Error("Flow not found in store");return n}static \u0275fac=function(n){return new(n||cd)};static \u0275prov=y({token:cd,factory:cd.\u0275fac})};return t=I([E($p)],t),t})(),Wp=class{static fToken=Symbol("CalculateConnectionsStateRequest")},KB=(()=>{let t=class dd{_store=p(A);handle(e){return this._store.connections.getAll().map(this._mapToConnectionState)}_mapToConnectionState(e){return{id:e.fId(),fOutputId:e.fOutputId(),fInputId:e.fInputId(),fType:e.fType,fBehavior:e.fBehavior,isSelected:e.isSelected(),waypoints:e.fWaypoints()?.waypoints()||[],fInputSide:e.fInputSide(),fOutputSide:e.fOutputSide()}}static \u0275fac=function(n){return new(n||dd)};static \u0275prov=y({token:dd,factory:dd.\u0275fac})};return t=I([E(Wp)],t),t})(),Zr=class{component;measuredSize;static fToken=Symbol("CalculateNodesStateRequest");constructor(i,e=!1){this.component=i,this.measuredSize=e}},YB=(()=>{let t=class ud{_store=p(A);_mediator=p(B);handle({component:e,measuredSize:n}){return this._store.nodes.getAll().filter(o=>o instanceof e).map(o=>{let r=n?this._mediator.execute(new it(o.hostElement)):null;return{id:o.fId(),parentId:o.fParentId()??void 0,position:me({},o._position),size:o._size?me({},o._size):void 0,measuredSize:r?{width:r.width,height:r.height}:void 0,rotate:o._rotate,fOutputs:this._getOutputs(o.hostElement),fInputs:this._getInputs(o.hostElement),isSelected:o.isSelected()}})}_getOutputs(e){return this._store.outputs.getAll().filter(n=>e.contains(n.hostElement)).map(n=>({id:n.fId(),fConnectableSide:n.fConnectableSide}))}_getInputs(e){return this._store.inputs.getAll().filter(n=>e.contains(n.hostElement)).map(n=>({id:n.fId(),fConnectableSide:n.fConnectableSide}))}static \u0275fac=function(n){return new(n||ud)};static \u0275prov=y({token:ud,factory:ud.\u0275fac})};return t=I([E(Zr)],t),t})(),Kp=class{measuredSize;static fToken=Symbol("CalculateFlowStateRequest");constructor(i=!1){this.measuredSize=i}},XB=(()=>{let t=class pd{_mediator=p(B);_store=p(A);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _canvasPosition(){return H.sum(this._transform.position,this._transform.scaledPosition)}handle({measuredSize:e}){return{position:this._canvasPosition,scale:this._canvas.transform.scale,nodes:this._mediator.execute(new Zr(bh,e)),groups:this._mediator.execute(new Zr(Hm,e)),connections:this._mediator.execute(new Wp)}}static \u0275fac=function(n){return new(n||pd)};static \u0275prov=y({token:pd,factory:pd.\u0275fac})};return t=I([E(Kp)],t),t})(),ZB=[XB,YB,KB],Yp=class{instance;static fToken=Symbol("RemoveFlowFromStoreRequest");constructor(i){this.instance=i}},QB=(()=>{let t=class hd{_store=p(A);_layoutController=p(yh,{optional:!0});handle({instance:e}){this._layoutController?.unregisterFlow(e.fId()),this._store.fFlow=void 0}static \u0275fac=function(n){return new(n||hd)};static \u0275prov=y({token:hd,factory:hd.\u0275fac})};return t=I([E(Yp)],t),t})(),Ch=(()=>{class t{isNodesRendered=!1;isFullRendered=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Xp=class{static fToken=Symbol("NotifyNodesRenderedRequest")},x_=new ve("F_FLOW"),g_=class{},JB=(()=>{let t=class fd{_state=p(Ch);_fFlow=p(x_);handle(e){this._state.isNodesRendered||(this._state.isNodesRendered=!0,this._fFlow.fNodesRendered.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||fd)};static \u0275prov=y({token:fd,factory:fd.\u0275fac})};return t=I([E(Xp)],t),t})(),Zp=class{static fToken=Symbol("NotifyFullRenderedRequest")},eV=(()=>{let t=class md{_state=p(Ch);_fFlow=p(x_);handle(e){this._state.isFullRendered||(this._state.isFullRendered=!0,this._fFlow.fFullRendered.emit(this._fFlow.fId()),this._fFlow.fLoaded.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||md)};static \u0275prov=y({token:md,factory:md.\u0275fac})};return t=I([E(Zp)],t),t})(),Qr=class{targetConnectionsRevision;targetNodesRevision;callback;destroyRef;static fToken=Symbol("WaitForConnectionsRenderedRequest");constructor(i,e,n,o){this.targetConnectionsRevision=i,this.targetNodesRevision=e,this.callback=n,this.destroyRef=o}},tV=(()=>{let t=class _d{_store=p(A);handle({targetConnectionsRevision:e,targetNodesRevision:n,callback:o,destroyRef:r}){if(this._store.connectionsRenderedRevision>=e&&this._store.connectionsRenderedNodesRevision>=n){o();return}let a=this._store.connectionsRenderedChanges$.listen(()=>{this._store.connectionsRenderedRevision<e||this._store.connectionsRenderedNodesRevision<n||(a(),o())});r.onDestroy(a)}static \u0275fac=function(n){return new(n||_d)};static \u0275prov=y({token:_d,factory:_d.\u0275fac})};return t=I([E(Qr)],t),t})(),Qp=class{static fToken=Symbol("ResetRenderLifecycleRequest")},nV=(()=>{let t=class gd{_state=p(Ch);handle(e){this._state.isNodesRendered=!1,this._state.isFullRendered=!1}static \u0275fac=function(n){return new(n||gd)};static \u0275prov=y({token:gd,factory:gd.\u0275fac})};return t=I([E(Qp)],t),t})(),Jp=class{destroyRef;static fToken=Symbol("QueueConnectionRedrawRequest");constructor(i){this.destroyRef=i}},iC=(()=>{class t{isWaitingForViewportAnimation=!1;pendingRedraw=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),iV=(()=>{let t=class vd{_state=p(iC);_store=p(A);_mediator=p(B);handle(e){if(this._state.pendingRedraw=!0,this._state.isWaitingForViewportAnimation)return;this._state.isWaitingForViewportAnimation=!0;let n=this._store.viewportAnimationChanges$.listen(()=>{if(this._store.isViewportAnimating)return;let o=this._state.pendingRedraw;n(),this._state.isWaitingForViewportAnimation=!1,this._state.pendingRedraw=!1,o&&this._mediator.execute(new Ir)});e.destroyRef.onDestroy(n)}static \u0275fac=function(n){return new(n||vd)};static \u0275prov=y({token:vd,factory:vd.\u0275fac})};return t=I([E(Jp)],t),t})(),oV=[$B,WB,...ZB,QB,Ch,JB,eV,tV,nV,iC,iV],eh=class{static fToken=Symbol("ClearSelectionRequest")},rV=(()=>{let t=class bd{_dragContext=p(fe);handle(e){this._dragContext.selectedItems.forEach(n=>n.unmarkAsSelected()),this._dragContext.selectedItems=[],this._dragContext.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||bd)};static \u0275prov=y({token:bd,factory:bd.\u0275fac})};return t=I([E(eh)],t),t})(),th=class{static fToken=Symbol("CalculateSelectableItemsRequest")},aV=(()=>{let t=class yd{_mediator=p(B);_store=p(A);_dragContext=p(fe);get _nodes(){return this._store.nodes.getAll()}get _connections(){return this._store.connections.getAll()}handle(){return[...this._nodeRects(),...this._connectionRects()].filter(e=>!this._dragContext.selectedItems.includes(e.element))}_nodeRects(){return this._nodes.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new it(e.hostElement))}))}_connectionRects(){return this._connections.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new it(e.boundingElement))}))}static \u0275fac=function(n){return new(n||yd)};static \u0275prov=y({token:yd,factory:yd.\u0275fac})};return t=I([E(th)],t),t})(),Jr=class{static fToken=Symbol("GetCurrentSelectionRequest")},sV=(()=>{let t=class Cd{_dragContext=p(fe);handle(){return{fNodeIds:this._getSelectedNodes(),fGroupIds:this._getSelectedGroups(),fConnectionIds:this._getSelectedConnections()}}_getSelectedNodes(){return this._dragContext.selectedItems.filter(e=>e.hostElement.classList.contains("f-node")).map(e=>e.hostElement.dataset.fNodeId)}_getSelectedGroups(){return this._dragContext.selectedItems.filter(e=>e.hostElement.classList.contains("f-group")).map(e=>e.hostElement.dataset.fGroupId)}_getSelectedConnections(){return this._dragContext.selectedItems.filter(e=>!e.hostElement.classList.contains("f-node")&&!e.hostElement.classList.contains("f-group")).map(e=>e.hostElement.id)}static \u0275fac=function(n){return new(n||Cd)};static \u0275prov=y({token:Cd,factory:Cd.\u0275fac})};return t=I([E(Jr)],t),t})(),nh=class{nodes;connections;isSelectedChanged;static fToken=Symbol("SelectRequest");constructor(i,e,n=!0){this.nodes=i,this.connections=e,this.isSelectedChanged=n}},lV=(()=>{let t=class xd{_dragContext=p(fe);_store=p(A);handle(e){this._dragContext.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragContext.selectedItems=[],e.nodes.forEach(n=>{let o=this._store.nodes.get(n);o&&(o.markAsSelected(),this._dragContext.selectedItems.push(o))}),e.connections.forEach(n=>{let o=this._store.connections.get(n);o&&(o.markAsSelected(),this._dragContext.selectedItems.push(o))}),this._dragContext.isSelectedChanged=e.isSelectedChanged}static \u0275fac=function(n){return new(n||xd)};static \u0275prov=y({token:xd,factory:xd.\u0275fac})};return t=I([E(nh)],t),t})(),ih=class{static fToken=Symbol("SelectAllRequest")},cV=(()=>{let t=class wd{_dragSession=p(fe);_store=p(A);handle(e){this._dragSession.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragSession.selectedItems=[],this._store.nodes.getAll().forEach(n=>{n.markAsSelected(),this._dragSession.selectedItems.push(n)}),this._store.connections.getAll().forEach(n=>{n.markAsSelected(),this._dragSession.selectedItems.push(n)}),this._dragSession.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||wd)};static \u0275prov=y({token:wd,factory:wd.\u0275fac})};return t=I([E(ih)],t),t})(),Ro=class{nodeOrGroup;static fToken=Symbol("SelectAndUpdateNodeLayerRequest");constructor(i){this.nodeOrGroup=i}},oh=class{fItemsContainer;allElements;elementsThatShouldBeInFront;targetIndex;static fToken=Symbol("MoveFrontElementsBeforeTargetElementRequest");constructor(i,e,n,o){this.fItemsContainer=i,this.allElements=e,this.elementsThatShouldBeInFront=n,this.targetIndex=o}},dV=(()=>{let t=class Td{handle(e){let n=[];for(let o=e.targetIndex+1;o<e.allElements.length;o++){let r=e.allElements[o];e.elementsThatShouldBeInFront.includes(r)||n.push(r)}n.forEach(o=>{e.fItemsContainer.removeChild(o),e.fItemsContainer.insertBefore(o,e.allElements[e.targetIndex])})}static \u0275fac=function(n){return new(n||Td)};static \u0275prov=y({token:Td,factory:Td.\u0275fac})};return t=I([E(oh)],t),t})(),Ai=class{item;itemContainer;static fToken=Symbol("UpdateItemAndChildrenLayersRequest");constructor(i,e){this.item=i,this.itemContainer=e}},Oo=class{nodeOrGroupId;static fToken=Symbol("GetDeepChildrenNodesAndGroupsRequest");constructor(i){this.nodeOrGroupId=i}},uV=(()=>{let t=class Sd{_store=p(A);handle({nodeOrGroupId:e}){return this._getChildrenNodes(e)}_getChildrenNodes(e,n=new Set){if(n.has(e))throw new Error("Circular reference detected in the node hierarchy. Node id: "+e);n.add(e);let o=this._store.nodes.getAll().filter(r=>r.fParentId()===e);return o.reduce((r,a)=>r.concat(this._getChildrenNodes(a.fId(),n)),o)}static \u0275fac=function(n){return new(n||Sd)};static \u0275prov=y({token:Sd,factory:Sd.\u0275fac})};return t=I([E(Oo)],t),t})(),pV=(()=>{let t=class kd{_store=p(A);_mediator=p(B);get _canvas(){return this._store.fCanvas}get _groupsContainer(){return this._canvas.fGroupsContainer().nativeElement}get _nodesContainer(){return this._canvas.fNodesContainer().nativeElement}get _connectionsContainer(){return this._canvas.fConnectionsContainer().nativeElement}handle(e){switch(e.itemContainer){case this._groupsContainer:this._handleGroup(e);break;case this._nodesContainer:this._handleNode(e);break;case this._connectionsContainer:this._handleConnection(e);break;default:throw new Error("Unknown container")}}_handleGroup(e){let n=this._getChildrenNodesAndGroups(e.item.fId()),o=this._getChildrenGroups(n);this._updateLayers(this._groupsContainer,e.item.hostElement,o);let r=this._getChildrenNodes(n);r.length&&this._updateLayers(this._nodesContainer,r[0],r)}_handleNode(e){let n=this._getChildrenNodesAndGroups(e.item.fId()),o=this._getChildrenNodes(n);this._updateLayers(e.itemContainer,e.item.hostElement,o)}_handleConnection(e){this._updateLayers(e.itemContainer,e.item.hostElement,[])}_updateLayers(e,n,o){let r=Array.from(e.children),a=r.findIndex(s=>s===n);this._isAnythingNeedToBeMoved(r,a,o)&&this._mediator.execute(new oh(e,r,o,a))}_isAnythingNeedToBeMoved(e,n,o){for(let r=n+1;r<e.length;r++)if(!o.includes(e[r]))return!0;return!1}_getChildrenGroups(e){let n=Array.from(this._groupsContainer.children);return e.filter(o=>this._groupsContainer.contains(o)).sort((o,r)=>n.indexOf(o)-n.indexOf(r))}_getChildrenNodes(e){let n=Array.from(this._nodesContainer.children);return e.filter(o=>this._nodesContainer.contains(o)).sort((o,r)=>n.indexOf(o)-n.indexOf(r))}_getChildrenNodesAndGroups(e){return this._mediator.execute(new Oo(e)).map(n=>n.hostElement)}static \u0275fac=function(n){return new(n||kd)};static \u0275prov=y({token:kd,factory:kd.\u0275fac})};return t=I([E(Ai)],t),t})(),hV=(()=>{let t=class Id{_dragSession=p(fe);_mediator=p(B);handle({nodeOrGroup:e}){this._selectNodeIfNotSelected(e),this._mediator.execute(new Ai(e,e.hostElement.parentElement))}_selectNodeIfNotSelected(e){e.fSelectionDisabled()||this._dragSession.selectedItems.includes(e)||(this._dragSession.selectedItems.push(e),e.markAsSelected(),this._dragSession.isSelectedChanged=!0)}static \u0275fac=function(n){return new(n||Id)};static \u0275prov=y({token:Id,factory:Id.\u0275fac})};return t=I([E(Ro)],t),t})(),fV=[rV,aV,sV,lV,cV,hV],rh=class{static fToken=Symbol("ResetZoomRequest")},mV=(()=>{let t=class Ed{_store=p(A);get _canvas(){return this._store.fCanvas}handle(e){this._canvas.resetScale(),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=function(n){return new(n||Ed)};static \u0275prov=y({token:Ed,factory:Ed.\u0275fac})};return t=I([E(rh)],t),t})(),ah=class{position;step;direction;animate;static fToken=Symbol("SetZoomRequest");constructor(i,e,n,o=!1){this.position=i,this.step=e,this.direction=n,this.animate=o}},_V=new Set(["drag-node","drag-external-item","resize-node","rotate-node","create-connection","reassign-connection","drag-connection-waypoint","assign-to-container"]),gV=new Set(["drag-canvas","selection-area"]),vV=(()=>{let t=class Md{_mediator=p(B);_store=p(A);_dragContext=p(fe,{optional:!0});get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.get(We.ZOOM)}get _isDragStarted(){return this._mediator.execute(new li)}handle(e){if(!this._zoomComponent)return;let n=this._canvas.transform.scale,o=this._clamp(n+e.step*e.direction);if(o===n)return;let r=this._castPositionToFlow(e.position);if(this._isDragStarted){let a=this._getDragZoomMode();if(a==="blocked")return;a==="rebase"&&this._rebaseDragContext(r,o)}this._canvas.setScale(o,r),e.animate?this._canvas.redrawWithAnimation():this._canvas.redraw(),this._canvas.emitCanvasChangeEvent()}_clamp(e){return Math.max(this._zoomComponent?.minimum||1,Math.min(e,this._zoomComponent?.maximum||1))}_castPositionToFlow(e){return he.fromPoint(e).elementTransform(this._flowHost)}_getDragZoomMode(){if(this._dragContext?.isEmpty())return"blocked";let e=!1;for(let n of this._dragContext?.draggableItems??[]){let o=n.getEvent().kind;if(_V.has(o)){e=!0;continue}if(!gV.has(o))return"blocked"}return e?"rebase":"direct"}_rebaseDragContext(e,n){if(!this._dragContext)return;let o=this._dragContext.onPointerDownScale;if(!o||o===n){this._dragContext.onPointerDownScale=n;return}let r=1/n-1/o;this._dragContext.onPointerDownPosition=he.fromPoint(this._dragContext.onPointerDownPosition).add(he.fromPoint(e).mult(r)),this._dragContext.onPointerDownScale=n}static \u0275fac=function(n){return new(n||Md)};static \u0275prov=y({token:Md,factory:Md.\u0275fac})};return t=I([E(ah)],t),t})(),bV=[mV,vV],sh=class{static fToken=Symbol("MinimapDrawNodesRequest")},yV=(()=>{let t=class Dd{_browser=p(at);_store=p(A);handle(e){let n=this._store.fFlow,o=this._store.fCanvas;return!n||!o?[]:this._store.nodes.getAll().map(a=>this._renderNode(a,n,o))}_renderNode(e,n,o){let r=bo("rect",this._browser);Wf(this._nodeRect(e,n,o),r);let a=e instanceof bh;return r.classList.add("f-component",a?"f-minimap-node":"f-minimap-group"),r.classList.add(...this._minimapClasses(e)),e.isSelected()&&r.classList.add("f-selected"),r}_nodeRect(e,n,o){let r=ne.elementTransform(ne.fromElement(e.hostElement),n.hostElement);return ne.div(r,o.transform.scale)}_minimapClasses(e){let n=e.fMinimapClass();return Array.isArray(n)?n:[n]}static \u0275fac=function(n){return new(n||Dd)};static \u0275prov=y({token:Dd,factory:Dd.\u0275fac})};return t=I([E(sh)],t),t})(),lh=class{svg;minSize;static fToken=Symbol("MinimapCalculateViewportRequest");constructor(i,e){this.svg=i,this.minSize=e}},CV=(()=>{let t=class Pd{_mediator=p(B);_store=p(A);handle({svg:e,minSize:n}){let o=this._store.fFlow,r=this._store.fCanvas;if(!o||!r)return{scale:1,viewBox:ne.initialize(0,0,0,0)};let a=this._contentRectInMinimapSpace(o,r,n),s=this._minimapRectInFlowSpace(e,o),c=this._viewportScale(a,s),u=this._viewportViewBox(a,s,c);return{scale:c,viewBox:u}}_contentRectInMinimapSpace(e,n,o){let r=this._nodesBoundingBox(),a=ne.elementTransform(r,e.hostElement),s=ne.div(a,n.transform.scale);return Nb(s,o)}_nodesBoundingBox(){return this._mediator.execute(new Eo)??ne.initialize(0,0,0,0)}_minimapRectInFlowSpace(e,n){return ne.elementTransform(ne.fromElement(e),n.hostElement)}_viewportScale(e,n){let o=n.width||1,r=n.height||1;return Math.max(e.width/o,e.height/r)}_viewportViewBox(e,n,o){let r=this._viewportSize(n,o),a=e.x-(r.width-e.width)/2,s=e.y-(r.height-e.height)/2;return ne.initialize(a,s,r.width,r.height)}_viewportSize(e,n){return wt.initialize(e.width*n||0,e.height*n||0)}static \u0275fac=function(n){return new(n||Pd)};static \u0275prov=y({token:Pd,factory:Pd.\u0275fac})};return t=I([E(lh)],t),t})(),ch=class{static fToken=Symbol("MinimapCalculateViewRectRequest")},xV=(()=>{let t=class Rd{_store=p(A);handle(e){let n=this._store.fFlow,o=this._store.fCanvas;if(!n||!o)return ne.initialize();let r=ne.div(ne.fromElement(n.hostElement),o.transform.scale);return r.x=0,r.y=0,r}static \u0275fac=function(n){return new(n||Rd)};static \u0275prov=y({token:Rd,factory:Rd.\u0275fac})};return t=I([E(ch)],t),t})(),dh=class{element;scale;viewBox;constructor(i,e=1,n=ne.initialize(0,0,0,0)){this.element=i,this.scale=e,this.viewBox=n}},wV=[yV,CV,xV],uh=class{position;static fToken=Symbol("GetNormalizedPointRequest");constructor(i){this.position=i}},TV=(()=>{let t=class Od{_store=p(A);handle({position:e}){return No(e,this._store.flowHost,this._store.transform)}static \u0275fac=function(n){return new(n||Od)};static \u0275prov=y({token:Od,factory:Od.\u0275fac})};return t=I([E(uh)],t),t})(),ph=class{static fToken=Symbol("SortNodeLayersRequest")},SV=(()=>{let t=class Fd{_store=p(A);_mediator=p(B);_browser=p(at);get _canvas(){return this._store.fCanvas}get _groupsContainer(){return this._canvas.fGroupsContainer().nativeElement}get _nodesContainer(){return this._canvas.fNodesContainer().nativeElement}get _fNodeElements(){return Array.from(this._nodesContainer.children)}handle(e){this._getGroups().forEach(n=>{this._moveChildrenNodes(this._getSortedChildrenNodes(n))})}_getGroups(){return this._store.nodes.getAll().filter(e=>this._groupsContainer.contains(e.hostElement))}_getSortedChildrenNodes(e){let n=this._fNodeElements;return this._getChildrenNodes(e.fId()).sort((o,r)=>n.indexOf(o)-n.indexOf(r))}_getChildrenNodes(e){return this._mediator.execute(new Oo(e)).filter(n=>this._nodesContainer.contains(n.hostElement)).map(n=>n.hostElement)}_moveChildrenNodes(e){let n=this._browser.document.createDocumentFragment();e.forEach(o=>{n.appendChild(o)}),this._nodesContainer.appendChild(n)}static \u0275fac=function(n){return new(n||Fd)};static \u0275prov=y({token:Fd,factory:Fd.\u0275fac})};return t=I([E(ph)],t),t})(),ea=class{itemsContainer;static fToken=Symbol("SortItemsByParentRequest");constructor(i){this.itemsContainer=i}},kV=(()=>{let t=class Nd{_store=p(A);_browser=p(at);handle({itemsContainer:e}){let n=Array.from(e.children);if(n.length<2)return;let o=this._buildPositions(n),r=this._store.nodes.getAll().filter(c=>e.contains(c.hostElement));if(r.length<2||!r.some(c=>!!c.fParentId()))return;let a=this._buildChildrenByParentId(r),s=new Map;for(let c of r){let u=this._getSortedChildrenBeforeParent(e,o,c,a,s);u.length&&this._moveBeforeNextSibling(e,u,c.hostElement.nextElementSibling)}}_buildPositions(e){let n=new Map;for(let o=0;o<e.length;o++)n.set(e[o],o);return n}_getSortedChildrenBeforeParent(e,n,o,r,a){let s=n.get(o.hostElement);if(s===void 0)return[];let c=this._getDeepChildren(o.fId(),r,a);if(!c.length)return[];let u=[];for(let h of c){let g=h.hostElement;if(!e.contains(g))continue;let C=n.get(g);C===void 0||C>=s||u.push(g)}return u.sort((h,g)=>(n.get(h)??0)-(n.get(g)??0)),u}_buildChildrenByParentId(e){let n=new Map;for(let o of e){let r=o.fParentId();if(!r)continue;let a=n.get(r)??[];a.push(o),n.set(r,a)}return n}_getDeepChildren(e,n,o){let r=o.get(e);if(r)return r;let a=[],s=[...n.get(e)??[]],c=new Set([e]);for(;s.length;){let u=s.pop();if(!u)continue;let h=u.fId();if(c.has(h))continue;c.add(h),a.push(u);let g=n.get(h);g?.length&&s.push(...g)}return o.set(e,a),a}_moveBeforeNextSibling(e,n,o){let r=this._browser.document.createDocumentFragment();for(let a of n)r.appendChild(a);e.insertBefore(r,o)}static \u0275fac=function(n){return new(n||Nd)};static \u0275prov=y({token:Nd,factory:Nd.\u0275fac})};return t=I([E(ea)],t),t})(),hh=class{static fToken=Symbol("SortItemLayersRequest")},IV=(()=>{let t=class Ad{_store=p(A);_mediator=p(B);get _canvas(){return this._store.fCanvas}handle(e){if(!this._canvas)return;let n=this._store.nodes.getAll();n.length<2||!n.some(o=>!!o.fParentId())||(this._mediator.execute(new ea(this._canvas.fGroupsContainer().nativeElement)),this._mediator.execute(new ph),this._mediator.execute(new ea(this._canvas.fNodesContainer().nativeElement)))}static \u0275fac=function(n){return new(n||Ad)};static \u0275prov=y({token:Ad,factory:Ad.\u0275fac})};return t=I([E(hh)],t),t})();function bo(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}function on(t,i){return i(t)}function fn(t){return!0}function EV(){return/android|iPad|iPhone|iPod/i.test(navigator.userAgent||navigator.vendor||window.opera)}var MV=[...YL,...iB,...BL,...qB,...wB,...oV,...AB,...fV,...bV,...wV,...l6,uV,c6,h6,TV,IV,kV,SV,pV,dV],DV=0,oC=(()=>{class t{_destroyRef=p(vt);_elementReference=p(Ye);_fBrowser=p(at);_stateChanges=new nn;get hostElement(){return this._elementReference.nativeElement}id=V(`f-pattern-${DV++}`);vColor=V("rgba(0,0,0,0.1)");hColor=V("rgba(0,0,0,0.1)");vSize=V(20,{transform:Ie});hSize=V(20,{transform:Ie});_transform=Xn.default();_position=H.initialize();_size=wt.initialize(this.hSize(),this.vSize());_pattern;_vLine;_hLine;constructor(){this._createPattern()}_createPattern(){this._pattern=bo("pattern",this._fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._vLine=bo("line",this._fBrowser),this._pattern.appendChild(this._vLine),this._hLine=bo("line",this._fBrowser),this._pattern.appendChild(this._hLine)}ngOnInit(){this._listenStateChanges()}_listenStateChanges(){new xn(this._stateChanges).pipe(fh()).listen(this._destroyRef,()=>this._redraw())}ngOnChanges(e){(e.vSize||e.hSize||e.vColor||e.hColor)&&this._refresh()}_redraw(){this._calculatePattern(),this._redrawPattern(),this._redrawLine(this._vLine,this.vColor(),this._size.width,0,this._size.width,this._size.height),this._redrawLine(this._hLine,this.hColor(),0,this._size.height,this._size.width,this._size.height)}_calculatePattern(){this._position.x=this._transform.position.x+this._transform.scaledPosition.x,this._position.y=this._transform.position.y+this._transform.scaledPosition.y,this._size=wt.initialize(this.hSize()*this._transform.scale,this.vSize()*this._transform.scale)}_redrawPattern(){this._pattern.setAttribute("x",`${this._position.x}`),this._pattern.setAttribute("y",`${this._position.y}`),this._pattern.setAttribute("width",`${this._size.width}`),this._pattern.setAttribute("height",`${this._size.height}`)}_redrawLine(e,n,o,r,a,s){e.setAttribute("stroke",`${n}`),e.setAttribute("x1",`${o}`),e.setAttribute("x2",`${a}`),e.setAttribute("y1",`${r}`),e.setAttribute("y2",`${s}`)}setTransform(e){this._transform=e,this._refresh()}_refresh(){this._stateChanges.notify()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["f-rect-pattern"]],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.id)},inputs:{id:[1,"id"],vColor:[1,"vColor"],hColor:[1,"hColor"],vSize:[1,"vSize"],hSize:[1,"hSize"]},features:[Me([{provide:rm,useExisting:t}]),Qi],decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})();var PV=new ve("F_BACKGROUND"),RV=(()=>{class t{hostElement=p(Ye).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,standalone:!1})}return t})(),rC=(()=>{class t extends RV{_mediator=p(B);fBackgroundPattern=$a(rm);ngOnInit(){this._mediator.execute(new ni(We.BACKGROUND,this))}ngAfterContentInit(){this._mediator.execute(new Ld(this.fBackgroundPattern()))}setTransform(e){this.fBackgroundPattern()?.setTransform(e)}ngOnDestroy(){this._mediator.execute(new ii(We.BACKGROUND))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-background"]],contentQueries:function(n,o,r){n&1&&_f(r,o.fBackgroundPattern,rm,5),n&2&&Vt()},hostAttrs:[1,"f-component","f-background"],features:[Me([{provide:PV,useExisting:t}]),Z],ngContentSelectors:uL,decls:2,vars:0,template:function(n,o){n&1&&(cn(),X(),Q(0,"svg"),Ge(1),ie())},styles:["[_nghost-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0})}return t})();var v_=class{position;scale;constructor(i,e){this.position=i,this.scale=e}},OV=new ve("F_CANVAS"),FV=(()=>{class t{transform=Xn.default();_fCanvasChange=new nn;destroyRef=p(vt);getPosition(){return this.transform.position}setPosition(e){this.transform.position=e}emitCanvasChangeEvent(){this._fCanvasChange.notify()}subscribeOnCanvasChange(){new xn(this._fCanvasChange).pipe(Bd(this.debounce())).listen(this.destroyRef,()=>{this.fCanvasChange.emit(new v_(H.sum(this.transform.position,this.transform.scaledPosition),this.transform.scale))})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,standalone:!1})}return t})(),ta=(()=>{class t extends FV{_mediator=p(B);_componentsStore=p(A);_elementReference=p(Ye);_injector=p(ft);_flowId;fCanvasChange=et();position=V(H.initialize(),{transform:H.castToPoint});scale=V(1,{transform:Ie});debounceTime=V(0,{transform:Ie});debounce=k(()=>this.debounceTime()<0?0:this.debounceTime());get hostElement(){return this._elementReference.nativeElement}fGroupsContainer=nt.required("fGroupsContainer");fNodesContainer=nt.required("fNodesContainer");fConnectionsContainer=nt.required("fConnectionsContainer");get flowId(){return this._flowId||""}ngOnInit(){this._flowId=this._mediator.execute(new $p).fId(),this._mediator.execute(new zd(this)),this._positionChange(),this._scaleChange(),super.subscribeOnCanvasChange()}_positionChange(){de(()=>{this._mediator.execute(new Gd(this.transform,this.position()))},{injector:this._injector})}_scaleChange(){de(()=>{this._mediator.execute(new jd(this.transform,this.scale()))},{injector:this._injector})}redraw(){this._mediator.execute(new br(this.transform)),this.hostElement.style.removeProperty("transition"),this.hostElement.style.transform=Xn.toString(this.transform),this._mediator.execute(new ti)}redrawWithAnimation(){this._mediator.execute(new br(this.transform)),this.hostElement.style.transition=`transform ${EV()?80:150}ms ease-in-out`,this.hostElement.style.transform=Xn.toString(this.transform),my(this.hostElement,()=>this.redraw())}centerGroupOrNode(e,n=!0){this._afterRedraw(()=>{this._mediator.execute(new Hd(e,n))})}fitToScreen(e=H.initialize(),n=!0){this._afterRedraw(()=>{this._mediator.execute(new qd(e,n))})}resetScaleAndCenter(e=!0){this._afterRedraw(()=>{this._mediator.execute(new Wd(e))})}getScale(){return this.transform.scale||1}setScale(e,n=H.initialize()){this._mediator.execute(new Kd(e,n))}resetScale(){this._mediator.execute(new $d)}ngOnDestroy(){this._mediator.execute(new Ud)}_afterRedraw(e){this._mediator.execute(new Qr(this._componentsStore.connectionsRevision,this._componentsStore.nodesRevision,()=>Ji(e,{injector:this._injector}),this.destroyRef))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-canvas"]],viewQuery:function(n,o){n&1&&dn(o.fGroupsContainer,pL,5)(o.fNodesContainer,hL,5)(o.fConnectionsContainer,fL,5),n&2&&Vt(3)},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:[1,"position"],scale:[1,"scale"],debounceTime:[1,"debounceTime"]},outputs:{fCanvasChange:"fCanvasChange"},features:[Me([{provide:OV,useExisting:t}]),Z],ngContentSelectors:_L,decls:12,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""],[1,"f-connections-container"]],template:function(n,o){n&1&&(cn(mL),Ga(0),Q(1,"div",null,0),Ge(3),ie(),Q(4,"div",3,1),Ge(6,1),Ge(7,2),Ge(8,3),ie(),Q(9,"div",null,2),Ge(11,4),ie(),ja())},styles:["[_nghost-%COMP%]{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}.f-canvas-dragging[_nghost-%COMP%], .canvas-dragging[_nghost-%COMP%]{transform:translateZ(0)}.f-connections-container[_ngcontent-%COMP%]{position:absolute;z-index:2}"],changeDetection:0})}return t})();var NV=0,aC=(()=>{class t extends j5{fId=V(`f-connection-${NV++}`,{alias:"fConnectionId"});fOutputId=V("",{transform:e=>So(e)||""});fInputId=V("",{transform:e=>So(e)||""});fRadius=8;fOffset=12;fBehavior=Jn.FIXED;fType=_o.STRAIGHT;fSelectionDisabled=V(!1,{transform:K});fReassignableStart=V(!1,{transform:K});fDraggingDisabled=V(!1,{alias:"fReassignDisabled",transform:K});fInputSide=V($e.DEFAULT,{transform:e=>mo(e,"fInputSide",$e)});fOutputSide=V($e.DEFAULT,{transform:e=>mo(e,"fOutputSide",$e)});get boundingElement(){return this.fPath().hostElement}_mediator=p(B);ngOnInit(){this._mediator.execute(new Xd(this))}ngOnChanges(){this._mediator.execute(new Ei)}ngOnDestroy(){this._mediator.execute(new Cu(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection"]],hostAttrs:[1,"f-component","f-connection"],hostVars:5,hostBindings:function(n,o){n&2&&(O("id",o.fId()),ae("f-connection-selection-disabled",o.fSelectionDisabled())("f-connection-reassign-disabled",o.fDraggingDisabled()))},inputs:{fId:[1,"fConnectionId","fId"],fOutputId:[1,"fOutputId"],fInputId:[1,"fInputId"],fRadius:[2,"fRadius","fRadius",Ie],fOffset:[2,"fOffset","fOffset",Ie],fBehavior:[2,"fBehavior","fBehavior",e=>mo(e,"fBehavior",Jn)],fType:"fType",fSelectionDisabled:[1,"fSelectionDisabled"],fReassignableStart:[1,"fReassignableStart"],fDraggingDisabled:[1,"fReassignDisabled","fDraggingDisabled"],fInputSide:[1,"fInputSide"],fOutputSide:[1,"fOutputSide"]},exportAs:["fComponent"],standalone:!1,features:[Me([{provide:mh,useExisting:t}]),Z,Qi],ngContentSelectors:vL,decls:15,vars:6,consts:[["defs",""],["xmlns","http://www.w3.org/2000/svg"],[1,"f-connection-group"],["fConnectionGradientRenderer","",3,"fConnectionGradientRendererFor"],["fConnectionSelection",""],["f-connection-path","",3,"useGradient"],["f-connection-drag-handle-start","","r","8"],["f-connection-drag-handle-end","","r","8"]],template:function(n,o){if(n&1&&(cn(gL),X(),f(0,"svg",1),F(1,"defs",null,0),Ge(3),f(4,"g",2),P(5,bL,1,1,":svg:linearGradient",3),F(6,"path",4),f(7,"g"),F(8,"path",5),P(9,yL,1,0,":svg:circle",6),F(10,"circle",7),m()()(),Ge(11,1),Ge(12,2),Ge(13,3),P(14,CL,1,0)),n&2){let r;l(5),R((r=o.fGradient())?5:-1,r),l(),O("d",o.path),l(2),_("useGradient",!!o.fGradient()),O("d",o.path),l(),R(o.fReassignableStart()?9:-1),l(5),R(o.fContents().length?14:-1)}},dependencies:[Cm,z5,H5,F5,V5],styles:["[_nghost-%COMP%]{pointer-events:none}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;vertical-align:middle;overflow:visible!important;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%] .f-connection-group[_ngcontent-%COMP%]{pointer-events:all}[_nghost-%COMP%] .f-connection-content[_ngcontent-%COMP%]{pointer-events:all}"],changeDetection:0})}return t})();var AV=new ve("F_MAGNETIC_LINES"),LV=(()=>{class t{hostElement=p(Ye).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,standalone:!1})}return t})();var sC=(()=>{class t extends LV{threshold=V(10,{transform:Ie,alias:"fAlignThreshold"});_mediator=p(B);ngOnInit(){this._mediator.execute(new ni(We.MAGNETIC_LINES,this))}ngOnDestroy(){this._mediator.execute(new ii(We.MAGNETIC_LINES))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-line-alignment"]],hostAttrs:[1,"f-line-alignment","f-component"],inputs:{threshold:[1,"fAlignThreshold","threshold"]},exportAs:["fComponent"],standalone:!1,features:[Me([{provide:AV,useExisting:t}]),Z],decls:0,vars:0,template:function(n,o){},styles:[xL]})}return t})();var nm=(()=>{class t{fMinSize=V(1e3);_mediator=p(B);hostElement=p(Ye).nativeElement;model=new dh(this.hostElement);redraw(){let{scale:e,viewBox:n}=this._mediator.execute(new lh(this.hostElement,this.fMinSize()));this.model=new dh(this.hostElement,e,n),Ab(n,this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,selectors:[["svg","fMinimapFlow",""]],inputs:{fMinSize:[1,"fMinSize"]}})}return t})(),im=(()=>{class t{_mediator=p(B);_elementRef=p(Ye);hostElement=this._elementRef.nativeElement;redraw(){this.clear();let e=this._elementRef.nativeElement.ownerDocument.createDocumentFragment();this._mediator.execute(new sh).forEach(n=>{e.appendChild(n)}),this.hostElement.appendChild(e)}clear(){this.hostElement.replaceChildren()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,selectors:[["g","fMinimapCanvas",""]]})}return t})(),om=(()=>{class t{_mediator=p(B);hostElement=p(Ye).nativeElement;redraw(){Wf(this._mediator.execute(new ch),this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,selectors:[["rect","fMinimapView",""]],hostAttrs:[1,"f-component","f-minimap-view"]})}return t})(),BV=new ve("F_MINIMAP_BASE"),VV=(()=>{class t{hostElement=p(Ye).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,standalone:!1})}return t})(),lC=(()=>{class t extends VV{_destroyRef=p(vt);_mediator=p(B);_browser=p(at);_store=p(A);_canvas=nt.required(im);_flow=nt.required(nm);_minimapView=nt.required(om);fMinSize=V(1e3);fNodeRenderLimit=V(1500,{transform:Ie});get state(){return this._flow().model}ngOnInit(){this._mediator.execute(new ni(We.MINIMAP,this))}ngAfterViewInit(){this._listenTransformChanges()}_listenTransformChanges(){this._mediator.execute(new Vd).pipe(fh(),kL()).listen(this._destroyRef,()=>{this._redraw()})}_redraw(){if(this._browser.isBrowser()){if(this._isOverNodeRenderLimit()){this._canvas().clear();return}this._flow().redraw(),this._minimapView().redraw(),this._canvas().redraw()}}_isOverNodeRenderLimit(){let e=this.fNodeRenderLimit();return e>0&&this._store.nodes.size()>e}ngOnDestroy(){this._mediator.execute(new ii(We.MINIMAP))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-minimap"]],viewQuery:function(n,o){n&1&&dn(o._canvas,im,5)(o._flow,nm,5)(o._minimapView,om,5),n&2&&Vt(3)},hostAttrs:[1,"f-component","f-minimap"],inputs:{fMinSize:[1,"fMinSize"],fNodeRenderLimit:[1,"fNodeRenderLimit"]},exportAs:["fComponent"],features:[Me([{provide:BV,useExisting:t}]),Z],decls:3,vars:1,consts:[["fMinimapFlow","","width","100%","height","100%","fLockedContext","",3,"fMinSize"],["fMinimapCanvas",""],["fMinimapView","","x","0","y","0","width","100%","height","100%","stroke","none"]],template:function(n,o){n&1&&(X(),f(0,"svg",0),F(1,"g",1)(2,"rect",2),m()),n&2&&_("fMinSize",o.fMinSize())},dependencies:[nm,im,om],styles:["[_nghost-%COMP%]{display:block;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0})}return t})();var zV=(()=>{class t{hostElement=p(Ye).nativeElement;initialize(){this.hostElement.style.display="none"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,standalone:!1})}return t})(),cC=(()=>{class t extends zV{_mediator=p(B);fTrigger=e=>e.shiftKey;ngOnInit(){this._mediator.execute(new ni(We.SELECTION_AREA,this)),super.initialize()}ngOnDestroy(){this._mediator.execute(new ii(We.SELECTION_AREA))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-selection-area"]],hostAttrs:[1,"f-selection-area","f-component"],inputs:{fTrigger:"fTrigger"},features:[Z],decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{position:absolute}"]})}return t})();var HV=0,qV=120,na=(()=>{class t extends g_{_destroyRef=p(vt);_mediator=p(B);_browser=p(at);_componentsStore=p(A);_cache=p(wn);_injector=p(ft);fId=V(`f-flow-${HV++}`,{alias:"fFlowId"});fCache=V(!1,{transform:K});hostElement=p(Ye).nativeElement;fNodesRendered=et();fFullRendered=et();fLoaded=et();ngOnInit(){this._mediator.execute(new jp(this)),this._listenCacheChanges()}ngAfterContentInit(){this._browser.isBrowser()&&(this._listenNodesChanges(),this._listenConnectionsChanges())}_listenCacheChanges(){de(()=>{this._cache.enabled=this.fCache()},{injector:this._injector})}_listenNodesChanges(){new xn(this._componentsStore.nodesChanges$,this._componentsStore.progressiveRenderChanges$).pipe(fh(),Bd(qV),SL()).listen(this._destroyRef,()=>{this._mediator.execute(new li)||this._componentsStore.hasPendingProgressiveRender||(this._mediator.execute(new hh),this._mediator.execute(new Xp),this._mediator.execute(new Qr(this._componentsStore.connectionsRevision+1,this._componentsStore.nodesRevision,()=>this._mediator.execute(new Zp),this._destroyRef)),this._mediator.execute(new Ei))})}_listenConnectionsChanges(){this._mediator.execute(new go).listen(this._destroyRef,()=>{if(!this._mediator.execute(new li)){if(this._componentsStore.isViewportAnimating){this._mediator.execute(new Jp(this._destroyRef));return}this._mediator.execute(new Ir)}})}redraw(){this._mediator.execute(new Ei)}reset(){this._mediator.execute(new Qp)}getNodesBoundingBox(){return this._mediator.execute(new zp)}getSelection(){return this._mediator.execute(new Jr)}getPositionInFlow(e){return this._mediator.execute(new uh(e))}getState(e){return this._mediator.execute(new Kp(e?.measuredSize??!1))}selectAll(){this._mediator.execute(new go).pipe(qb()).listen(this._destroyRef,()=>{this._mediator.execute(new ih)})}select(e,n,o=!0){this._mediator.execute(new go).pipe(qb()).listen(this._destroyRef,()=>{this._mediator.execute(new nh(e,n,o))})}clearSelection(){this._mediator.execute(new eh)}ngOnDestroy(){this._mediator.execute(new Yp(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-flow"]],hostAttrs:[1,"f-component","f-flow"],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.fId())},inputs:{fId:[1,"fFlowId","fId"],fCache:[1,"fCache"]},outputs:{fNodesRendered:"fNodesRendered",fFullRendered:"fFullRendered",fLoaded:"fLoaded"},features:[Me([B,...FL,Iy,Fo,...MV,fe,...eB,{provide:x_,useExisting:t}]),Z],ngContentSelectors:TL,decls:7,vars:0,template:function(n,o){n&1&&(cn(wL),Ga(0),Ge(1),Ge(2,1),Ge(3,2),Ge(4,3),Ge(5,4),Ge(6,5),ja())},styles:["[_nghost-%COMP%]{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none} .f-connection-content{position:absolute;left:0;top:0;inline-size:max-content;pointer-events:all;transform-origin:50% 50%} .f-node, .f-group{position:absolute!important;transform-origin:center;-webkit-user-select:none;user-select:none;pointer-events:all;left:0!important;top:0!important;box-sizing:border-box} .f-group{z-index:1} .f-connection-content{z-index:3} .f-node{z-index:4}.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})}return t})();var dC=(()=>{class t{fVirtualForOf=[];fVirtualForTrackBy;_vc=p(qa);_tpl=p(m0);_zone=p(Wt);_componentsStore=p(A,{optional:!0});_views=[];_rafId=null;_isProgressiveRenderActive=!1;ngOnChanges(e){e.fVirtualForOf&&(this._reset(),this._renderProgressively())}ngOnDestroy(){this._reset()}_reset(){this._rafId!==null&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._finishProgressiveRender(),this._vc.clear(),this._views.length=0}_renderProgressively(){let n=0;this._startProgressiveRender(),this._zone.runOutsideAngular(()=>{let o=()=>{let r=performance.now();for(;n<this.fVirtualForOf.length&&performance.now()-r<10;){let a=this.fVirtualForOf[n],s=this._vc.createEmbeddedView(this._tpl,{$implicit:a,index:n});this._views.push(s),n++}if(n<this.fVirtualForOf.length){this._rafId=requestAnimationFrame(o);return}this._rafId=null,this._finishProgressiveRender()};this._rafId=requestAnimationFrame(o)})}_startProgressiveRender(){this._isProgressiveRenderActive||(this._isProgressiveRenderActive=!0,this._componentsStore?.beginProgressiveRender())}_finishProgressiveRender(){this._isProgressiveRenderActive&&(this._isProgressiveRenderActive=!1,this._componentsStore?.endProgressiveRender())}static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,selectors:[["","fVirtualFor","","fVirtualForOf",""]],inputs:{fVirtualForOf:"fVirtualForOf",fVirtualForTrackBy:"fVirtualForTrackBy"},features:[Qi]})}return t})();var mn=(function(t){return t[t.ZOOM_IN=1]="ZOOM_IN",t[t.ZOOM_OUT=-1]="ZOOM_OUT",t})(mn||{}),GV=new ve("F_ZOOM"),b_=class{},jV=.1,UV=1,$V=.5,WV=60,KV=.5;function YV(t){return Math.abs(t.deltaY)>=Math.abs(t.deltaX)?t.deltaY:t.deltaX}function XV(t,i,e){return ZV(t)?JV(i,e):QV(i,e)}function ZV(t){return(t.ctrlKey||t.metaKey)&&t.deltaMode===WheelEvent.DOM_DELTA_PIXEL}function QV(t,i){let e=Math.abs(t)/100,n=uC(e,jV,UV);return i*n}function JV(t,i){if(Math.abs(t)<$V)return 0;let e=Math.abs(t)/WV,n=uC(e,0,KV);return i*n}function uC(t,i,e){return Math.max(i,Math.min(e,t))}var ia=(()=>{class t extends b_{_mediator=p(B);_injector=p(ft);_store=p(A);_triggersListener=Ve.emptyListener();isEnabled=V(!1,{alias:"fZoom",transform:K});fWheelTrigger=fn;fDblClickTrigger=fn;minimum=.1;maximum=4;step=.1;dblClickStep=.5;get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}ngOnInit(){this._mediator.execute(new ni(We.ZOOM,this))}ngAfterViewInit(){this._listenZoomEnabledChanges()}_listenZoomEnabledChanges(){de(()=>{this.isEnabled(),Xt(()=>this._listenTriggers())},{injector:this._injector})}_listenTriggers(){this._flowHost&&(this._disposeListeners(),this.isEnabled()&&(this._listen("wheel",this._onWheel,Ve.activeListener()),this._listen("dblclick",this._onDoubleClick),this._triggersListener=()=>{this._unlisten("wheel",this._onWheel,Ve.activeListener()),this._unlisten("dblclick",this._onDoubleClick)}))}_onWheel=e=>{if(!on(e,this.fWheelTrigger)||(e.preventDefault(),e.target?.closest("[fLockedContext]")))return;let o=YV(e);if(o===0)return;let r=this._normalizeWheelStep(e,o);r!==0&&this.setZoom(H.initialize(e.clientX,e.clientY),r,this._calculateDirection(o),!1)};_normalizeWheelStep(e,n){return XV(e,n,this.step)}_calculateDirection(e){return e>0?mn.ZOOM_OUT:mn.ZOOM_IN}_onDoubleClick=e=>{if(!on(e,this.fDblClickTrigger))return;e.preventDefault();let n=e.target;f7(n)||n?.closest("[fLockedContext]")||this.setZoom(H.initialize(e.clientX,e.clientY),this.dblClickStep,mn.ZOOM_IN,!0)};_getToCenterPosition(e,n){return H.initialize(e?.x||n.gravityCenter.x,e?.y||n.gravityCenter.y)}zoomIn(e){this._onZoomToCenter(mn.ZOOM_IN,e)}zoomOut(e){this._onZoomToCenter(mn.ZOOM_OUT,e)}_onZoomToCenter(e,n){this.setZoom(this._getToCenterPosition(n,ne.fromElement(this._flowHost)),this.step,e,!1)}setZoom(e,n,o,r){this._mediator.execute(new ah(e,n,o,r))}getZoomValue(){return this._canvas.transform.scale||1}reset(){this._mediator.execute(new rh)}_disposeListeners(){this._triggersListener(),this._triggersListener=Ve.emptyListener()}ngOnDestroy(){this._disposeListeners(),this._mediator.execute(new ii(We.ZOOM))}_listen(e,n,o){this._flowHost.addEventListener(e,n,o)}_unlisten(e,n,o){this._flowHost.removeEventListener(e,n,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=qe({type:t,selectors:[["f-canvas","fZoom",""]],hostAttrs:[1,"f-zoom","f-component"],inputs:{isEnabled:[1,"fZoom","isEnabled"],fWheelTrigger:"fWheelTrigger",fDblClickTrigger:"fDblClickTrigger",minimum:[2,"fZoomMinimum","minimum",Ie],maximum:[2,"fZoomMaximum","maximum",Ie],step:[2,"fZoomStep","step",Ie],dblClickStep:[2,"fZoomDblClickStep","dblClickStep",Ie]},features:[Me([{provide:GV,useExisting:t}]),Z]})}return t})();var pC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({imports:[Mt]})}return t})();var Jh=WP(cD(),1);var Ra=(function(t){return t.NETWORK_SIMPLEX="network-simplex",t.TIGHT_TREE="tight-tree",t.LONGEST_PATH="longest-path",t})(Ra||{}),foe={direction:Bi.TOP_BOTTOM,nodeGap:48,layerGap:64,algorithm:Ra.NETWORK_SIMPLEX,defaultNodeSize:wt.initialize(120,72)},Xg=(()=>{class t extends Up{constructor(){super(foe)}mergeOptions(e,n={}){return Bt(me(me({},e),n),{defaultNodeSize:n.defaultNodeSize?wt.initialize(n.defaultNodeSize.width,n.defaultNodeSize.height):wt.initialize(e.defaultNodeSize.width,e.defaultNodeSize.height)})}async calculate(e,n,o){let r=this.resolveLayoutOptions(o),a=this._buildGraph(e,n,r),s=new Map;return Jh.layout(a),a.nodes().forEach(c=>{let u=a.node(c),h=e.find(C=>C.id===c);if(!u||!h)return;let g=h.size??r.defaultNodeSize;s.set(c,H.initialize(u.x-g.width/2,u.y-g.height/2))}),{nodes:tC(e,s)}}_buildGraph(e,n,o){let r=new Jh.graphlib.Graph;return r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:this._mapDirection(o.direction),nodesep:o.nodeGap,ranksep:o.layerGap,ranker:this._mapAlgorithm(o.algorithm)}),e.forEach(a=>{let s=a.size??o.defaultNodeSize;r.setNode(a.id,{width:s.width,height:s.height})}),n.forEach(a=>{!r.hasNode(a.source)||!r.hasNode(a.target)||r.setEdge(a.source,a.target,{})}),r}_mapAlgorithm(e){switch(e){case Ra.TIGHT_TREE:return"tight-tree";case Ra.LONGEST_PATH:return"longest-path";case Ra.NETWORK_SIMPLEX:default:return"network-simplex"}}_mapDirection(e){switch(e){case Bi.BOTTOM_TOP:return"BT";case Bi.LEFT_RIGHT:return"LR";case Bi.RIGHT_LEFT:return"RL";case Bi.TOP_BOTTOM:default:return"TB"}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var gi={loading:"Loading collection",errorTitle:"Failed to load",emptyTitle:"No nodes match the current filters.",resetFilters:"Reset filters",curationEmptyTitle:"Nothing from your map selection is visible right now.",showAllOnMap:"Show all on map",a11y:{toolbar:"Map controls",panel:"Selected node details"},toolbar:{zoomIn:"Zoom in",zoomOut:"Zoom out",fitToScreen:"Fit to screen",resetLayoutLabel:"Re-arrange layout",resetLayoutTooltip:"Re-arrange the visible nodes",showAllLabel:"Show all",showAllTooltip:"Clear the map selection and show every node again",showAllAria:"Show all nodes on the map",layoutAlgorithmLabel:"Layout algorithm",layoutAlgorithmTooltip:"Layout algorithm",layoutDirectionLabel:"Layout direction",layoutDirectionTooltip:"Layout direction",layoutDirectionUnavailableTooltip:"Direction does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",layoutSpacingLabel:"Layout spacing",layoutSpacingTooltip:"Layout spacing",layoutSpacingUnavailableTooltip:"Spacing does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",connectionTypeLabel:"Connector style",connectionTypeTooltip:"Connector style"},layout:{algorithm:{options:{"network-simplex":{label:"Balanced"},"longest-path":{label:"Stretched"},force:{label:"Organic"}}},direction:{options:{TOP_BOTTOM:{label:"Top to bottom"},BOTTOM_TOP:{label:"Bottom to top"},LEFT_RIGHT:{label:"Left to right"},RIGHT_LEFT:{label:"Right to left"}}},spacing:{options:{compact:{label:"Compact"},normal:{label:"Normal"},spacious:{label:"Spacious"}}},connection:{options:{segment:{label:"Orthogonal"},straight:{label:"Straight"},bezier:{label:"Bezier"},"adaptive-curve":{label:"Adaptive curve"}}}},panel:{resizeLabel:"Resize panel"},resetLayoutConfirm:{header:"Re-arrange layout?",message:"This replaces every saved node position with a fresh automatic layout.",messageVisible:"This re-arranges the visible nodes and replaces their saved positions.",accept:"Re-arrange",reject:"Cancel"}};var ef={graph:{perf:{cache:!0,virtualization:!1},perfHud:!0}};var moe="adaptive-curve",Jg=["segment","straight","bezier","adaptive-curve"],dD="sm.graph.connection-type",uD="sm.graph.layout-algorithm",pD="sm.graph.layout-direction",tf=(()=>{class t{_connectionType=W(Zg(dD,_oe,moe));_layoutAlgorithm=W(Zg(uD,gv,fv));_layoutDirection=W(Zg(pD,vv,mv));_layoutSpacing=W(_v);connectionType=this._connectionType.asReadonly();layoutAlgorithm=this._layoutAlgorithm.asReadonly();layoutDirection=this._layoutDirection.asReadonly();layoutSpacing=this._layoutSpacing.asReadonly();setConnectionType(e){this._connectionType()!==e&&(this._connectionType.set(e),Qg(dD,e))}setLayoutAlgorithm(e){this._layoutAlgorithm()!==e&&(this._layoutAlgorithm.set(e),Qg(uD,e))}setLayoutDirection(e){this._layoutDirection()!==e&&(this._layoutDirection.set(e),Qg(pD,e))}static toFoblexEnum(e){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zg(t,i,e){let n=null;try{n=localStorage.getItem(t)}catch{return e}return n&&i(n)?n:e}function Qg(t,i){try{localStorage.setItem(t,i)}catch{}}function _oe(t){return typeof t=="string"&&Jg.includes(t)}function hD(t,i){let e=new Set([i]);for(let n of t.get(i)??[])e.add(n);return e}var goe={TOP_BOTTOM:{output:$e.BOTTOM,input:$e.TOP},BOTTOM_TOP:{output:$e.TOP,input:$e.BOTTOM},LEFT_RIGHT:{output:$e.RIGHT,input:$e.LEFT},RIGHT_LEFT:{output:$e.LEFT,input:$e.RIGHT}};function fD(t,i){return rs(t)?goe[i]:{input:$e.CALCULATE,output:$e.CALCULATE}}var mD=`
1778
- .p-popover {
1779
- margin-block-start: dt('popover.gutter');
1780
- background: dt('popover.background');
1781
- color: dt('popover.color');
1782
- border: 1px solid dt('popover.border.color');
1783
- border-radius: dt('popover.border.radius');
1784
- box-shadow: dt('popover.shadow');
1785
- will-change: transform;
1786
- }
1787
-
1788
- .p-popover-content {
1789
- padding: dt('popover.content.padding');
1790
- }
1791
-
1792
- .p-popover-flipped {
1793
- margin-block-start: calc(dt('popover.gutter') * -1);
1794
- margin-block-end: dt('popover.gutter');
1795
- }
1796
-
1797
- .p-popover:after,
1798
- .p-popover:before {
1799
- bottom: 100%;
1800
- left: calc(dt('popover.arrow.offset') + dt('popover.arrow.left'));
1801
- content: ' ';
1802
- height: 0;
1803
- width: 0;
1804
- position: absolute;
1805
- pointer-events: none;
1806
- }
1807
-
1808
- .p-popover:after {
1809
- border-width: calc(dt('popover.gutter') - 2px);
1810
- margin-left: calc(-1 * (dt('popover.gutter') - 2px));
1811
- border-style: solid;
1812
- border-color: transparent;
1813
- border-bottom-color: dt('popover.background');
1814
- }
1815
-
1816
- .p-popover:before {
1817
- border-width: dt('popover.gutter');
1818
- margin-left: calc(-1 * dt('popover.gutter'));
1819
- border-style: solid;
1820
- border-color: transparent;
1821
- border-bottom-color: dt('popover.border.color');
1822
- }
1823
-
1824
- .p-popover-flipped:after,
1825
- .p-popover-flipped:before {
1826
- bottom: auto;
1827
- top: 100%;
1828
- }
1829
-
1830
- .p-popover.p-popover-flipped:after {
1831
- border-bottom-color: transparent;
1832
- border-top-color: dt('popover.background');
1833
- }
1834
-
1835
- .p-popover.p-popover-flipped:before {
1836
- border-bottom-color: transparent;
1837
- border-top-color: dt('popover.border.color');
1838
- }
1839
- `;var voe=["content"],boe=["*"],yoe=t=>({closeCallback:t});function Coe(t,i){}function xoe(t,i){t&1&&D(0,Coe,0,0,"ng-template")}function woe(t,i){if(t&1){let e=Y();f(0,"div",1),L("click",function(o){w(e);let r=d();return T(r.onOverlayClick(o))})("pMotionOnEnter",function(o){w(e);let r=d();return T(r.onAnimationStart(o))})("pMotionOnAfterLeave",function(){w(e);let o=d();return T(o.onAnimationEnd())}),f(1,"div",2),L("click",function(o){w(e);let r=d();return T(r.onContentClick(o))})("mousedown",function(o){w(e);let r=d();return T(r.onContentClick(o))}),Ge(2),D(3,xoe,1,0,null,3),m()()}if(t&2){let e=d();zt(e.sx("root")),G(e.cn(e.cx("root"),e.styleClass)),_("pBind",e.ptm("root"))("ngStyle",e.style)("pMotion",e.overlayVisible)("pMotionAppear",!0)("pMotionOptions",e.computedMotionOptions()),O("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),l(),G(e.cx("content")),_("pBind",e.ptm("content")),l(2),_("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Pe(17,yoe,e.onCloseClick.bind(e)))}}var Toe={root:()=>({position:"absolute"})},Soe={root:"p-popover p-component",content:"p-popover-content"},_D=(()=>{class t extends Qt{name="popover";style=mD;classes=Soe;inlineStyles=Toe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),gD=new ve("POPOVER_INSTANCE"),e0=(()=>{class t extends On{componentName="Popover";$pcPopover=p(gD,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ae,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("host"))}ariaLabel;ariaLabelledBy;dismissable=!0;style;styleClass;appendTo=V("body");autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";motionOptions=V(void 0);computedMotionOptions=k(()=>me(me({},this.ptm("motion")),this.motionOptions()));onShow=new re;onHide=new re;$appendTo=k(()=>this.appendTo()||this.config.overlayAppendTo());container;overlayVisible=!1;render=!1;selfClick=!1;documentClickListener;target;willHide;scrollHandler;documentResizeListener;contentTemplate;templates;_contentTemplate;destroyCallback;overlayEventListener;overlaySubscription;_componentStyle=p(_D);zone=p(Wt);overlayService=p(io);onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="content"&&(this._contentTemplate=e.template)})}bindDocumentClickListener(){if(Ht(this.platformId)&&!this.documentClickListener){let e=k0()?"touchstart":"click",n=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(n,e,o=>{this.dismissable&&(!this.container?.contains(o.target)&&this.target!==o.target&&!this.target.contains(o.target)&&!this.selfClick&&this.hide(),this.selfClick=!1,this.cd.markForCheck())})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,n){this.overlayVisible?(this.hasTargetChanged(e,n)&&(this.destroyCallback=()=>{this.show(null,n||e.currentTarget||e.target)}),this.hide()):this.show(e,n)}show(e,n){n&&e&&e.stopPropagation(),this.container&&!this.overlayVisible&&(this.container=null),this.target=n||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck()}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(e){let n=e.target;this.selfClick=e.offsetX<n.clientWidth&&e.offsetY<n.clientHeight}hasTargetChanged(e,n){return this.target!=null&&this.target!==(n||e.currentTarget||e.target)}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?wi(this.document.body,this.container):wi(this.$appendTo(),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!=="self"&&wi(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex&&bn.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay)}align(){if(this.target&&this.container){lr(this.container,this.target,!1);let e=Cf(this.container),n=Cf(this.target),o=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue("border-radius"),r=0;e.left<n.left&&(r=n.left-e.left-parseFloat(o)*2),this.container.style.setProperty(D0("popover.arrow.left").name,`${r}px`),e.top<n.top&&(this.container.setAttribute("data-p-popover-flipped","true"),!this.$unstyled()&&sr(this.container,"p-popover-flipped"))}}onAnimationStart(e){this.container=e.element,this.container?.setAttribute(this.$attrSelector,""),this.appendOverlay(),this.align(),this.setZIndex(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.focusOnShow&&this.focus(),this.overlayEventListener=n=>{this.container&&this.container.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)}onAnimationEnd(){this.overlayVisible||(this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.autoZIndex&&bn.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1,this.container=null)}focus(){let e=dt(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onEscapeKeydown(e){this.hide()}onWindowResize(){this.overlayVisible&&!Xa()&&this.hide()}bindDocumentResizeListener(){if(Ht(this.platformId)&&!this.documentResizeListener){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,"resize",this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){Ht(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new pr(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&bn.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-popover"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,voe,4)(r,Dt,4),n&2){let a;ee(a=te())&&(o.contentTemplate=a.first),ee(a=te())&&(o.templates=a)}},hostBindings:function(n,o){n&1&&L("keydown.escape",function(a){return o.onEscapeKeydown(a)},Ha)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",K],style:"style",styleClass:"styleClass",appendTo:[1,"appendTo"],autoZIndex:[2,"autoZIndex","autoZIndex",K],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",Ie],focusOnShow:[2,"focusOnShow","focusOnShow",K],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",motionOptions:[1,"motionOptions"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[Me([_D,{provide:gD,useExisting:t},{provide:Jt,useExisting:t}]),Kt([Ae]),Z],ngContentSelectors:boe,decls:1,vars:1,consts:[["role","dialog","pMotionName","p-anchored-overlay",3,"pBind","class","style","ngStyle","pMotion","pMotionAppear","pMotionOptions"],["role","dialog","pMotionName","p-anchored-overlay",3,"click","pMotionOnEnter","pMotionOnAfterLeave","pBind","ngStyle","pMotion","pMotionAppear","pMotionOptions"],[3,"click","mousedown","pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&(cn(),P(0,woe,4,19,"div",0)),n&2&&R(o.render?0:-1)},dependencies:[Mt,un,no,ot,Ae,lo,Q0],encapsulation:2,changeDetection:0})}return t})(),vD=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=kt({imports:[e0,ot,ot]})}return t})();function Ioe(t,i){if(t&1){let e=Y();f(0,"li",10)(1,"button",14),L("click",function(){let o=w(e).$implicit,r=d(),a=_t(6);return r.setLayoutAlgorithm(o),T(a.hide())}),b(2),m()()}if(t&2){let e=i.$implicit,n=d();l(),ae("is-active",n.layoutAlgorithm()===e),O("aria-checked",n.layoutAlgorithm()===e)("data-testid","graph-layout-algorithm-option-"+e),l(),Se(" ",n.layoutAlgorithmLabel(e)," ")}}function Eoe(t,i){if(t&1){let e=Y();f(0,"button",15),L("click",function(){let o=w(e).$implicit,r=d(),a=_t(11);return r.setLayoutDirection(o),T(a.hide())}),F(1,"i",16),m()}if(t&2){let e=i.$implicit,n=d();ae("is-active",n.layoutDirection()===e),_("pTooltip",n.layoutDirectionLabel(e)),O("aria-checked",n.layoutDirection()===e)("aria-label",n.layoutDirectionLabel(e))("data-testid","graph-layout-direction-option-"+e),l(),G(n.directionItemIcon(e))}}function Moe(t,i){if(t&1){let e=Y();f(0,"button",15),L("click",function(){let o=w(e).$implicit,r=d(),a=_t(16);return r.setConnectionType(o),T(a.hide())}),X(),f(1,"svg",17),F(2,"path",7),m()()}if(t&2){let e=i.$implicit,n=d();ae("is-active",n.connectionType()===e),_("pTooltip",n.connectionTypeLabel(e)),O("aria-checked",n.connectionType()===e)("aria-label",n.connectionTypeLabel(e))("data-testid","graph-connection-type-option-"+e),l(2),O("d",n.connectionTypeItemPath(e))}}var bD={TOP_BOTTOM:"pi pi-arrow-down",BOTTOM_TOP:"pi pi-arrow-up",LEFT_RIGHT:"pi pi-arrow-right",RIGHT_LEFT:"pi pi-arrow-left"},Doe={segment:"M 2 14 L 8 14 L 8 2 L 14 2",straight:"M 2 14 L 14 2",bezier:"M 2 14 C 6 14, 10 2, 14 2","adaptive-curve":"M 2 14 C 8 14, 8 2, 14 2"},yD=(()=>{class t{graphPreferences=p(tf);texts=gi;layoutAlgorithms=pv;layoutDirections=hv;connectionTypes=Jg;layoutAlgorithm=this.graphPreferences.layoutAlgorithm;layoutDirection=this.graphPreferences.layoutDirection;connectionType=this.graphPreferences.connectionType;directionIcon=k(()=>bD[this.layoutDirection()]);directionAvailable=k(()=>rs(this.layoutAlgorithm()));layoutAlgorithmLabel(e){return gi.layout.algorithm.options[e].label}layoutDirectionLabel(e){return gi.layout.direction.options[e].label}connectionTypeLabel(e){return gi.layout.connection.options[e].label}setLayoutAlgorithm(e){this.graphPreferences.setLayoutAlgorithm(e)}setLayoutDirection(e){this.graphPreferences.setLayoutDirection(e)}setConnectionType(e){this.graphPreferences.setConnectionType(e)}directionItemIcon(e){return bD[e]}connectionTypeItemPath(e){return Doe[e]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-layout-toolbar"]],decls:20,vars:15,consts:[["algorithmPopover",""],["directionPopover",""],["connectionTypePopover",""],["icon","pi pi-sitemap","severity","secondary","size","small","data-testid","graph-layout-algorithm-toggle",3,"onClick","ariaLabel","pTooltip","text","rounded"],["severity","secondary","size","small","data-testid","graph-layout-direction-toggle",3,"onClick","icon","ariaLabel","pTooltip","text","rounded","disabled"],["severity","secondary","size","small","data-testid","graph-connection-type-toggle",3,"onClick","ariaLabel","pTooltip","text","rounded"],["viewBox","0 0 16 16","aria-hidden","true",1,"graph__connection-svg","graph__connection-svg--toggle"],["fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["appendTo","body","styleClass","graph__layout-popover"],["role","menu","data-testid","graph-layout-algorithm-menu",1,"graph__layout-menu"],["role","none"],["role","menu","data-testid","graph-layout-direction-menu",1,"graph__layout-icon-row"],["type","button","role","menuitemradio",1,"graph__layout-icon-item",3,"is-active","pTooltip"],["role","menu","data-testid","graph-connection-type-menu",1,"graph__layout-icon-row"],["type","button","role","menuitemradio",1,"graph__layout-menu-item",3,"click"],["type","button","role","menuitemradio",1,"graph__layout-icon-item",3,"click","pTooltip"],["aria-hidden","true"],["viewBox","0 0 16 16","aria-hidden","true",1,"graph__connection-svg"]],template:function(n,o){if(n&1){let r=Y();f(0,"p-button",3),L("onClick",function(s){w(r);let c=_t(6);return T(c.toggle(s))}),m(),f(1,"p-button",4),L("onClick",function(s){w(r);let c=_t(11);return T(c.toggle(s))}),m(),f(2,"p-button",5),L("onClick",function(s){w(r);let c=_t(16);return T(c.toggle(s))}),X(),f(3,"svg",6),F(4,"path",7),m()(),Ba(),f(5,"p-popover",8,0)(7,"ul",9),ue(8,Ioe,3,5,"li",10,Xe),m()(),f(10,"p-popover",8,1)(12,"div",11),ue(13,Eoe,2,8,"button",12,Xe),m()(),f(15,"p-popover",8,2)(17,"div",13),ue(18,Moe,3,7,"button",12,Xe),m()()}n&2&&(_("ariaLabel",o.texts.toolbar.layoutAlgorithmLabel)("pTooltip",o.texts.toolbar.layoutAlgorithmTooltip)("text",!0)("rounded",!0),l(),_("icon",o.directionIcon())("ariaLabel",o.texts.toolbar.layoutDirectionLabel)("pTooltip",o.directionAvailable()?o.texts.toolbar.layoutDirectionTooltip:o.texts.toolbar.layoutDirectionUnavailableTooltip)("text",!0)("rounded",!0)("disabled",!o.directionAvailable()),l(),_("ariaLabel",o.texts.toolbar.connectionTypeLabel)("pTooltip",o.texts.toolbar.connectionTypeTooltip)("text",!0)("rounded",!0),l(2),O("d",o.connectionTypeItemPath(o.connectionType())),l(4),pe(o.layoutAlgorithms),l(5),pe(o.layoutDirections),l(5),pe(o.connectionTypes))},dependencies:[yn,hn,vD,e0,Be,Ue],styles:['[_nghost-%COMP%] .graph__layout-popover .p-popover-content{padding:4px}.graph__layout-menu[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;min-width:160px}.graph__layout-menu-item[_ngcontent-%COMP%]{appearance:none;border:0;background:transparent;color:var(--sm-text);font:inherit;text-align:left;padding:6px 10px;border-radius:var(--sm-radius-sm);cursor:pointer;display:flex;align-items:center;gap:8px;transition:background .12s ease,color .12s ease}.graph__layout-menu-item[_ngcontent-%COMP%]:hover, .graph__layout-menu-item[_ngcontent-%COMP%]:focus-visible{background:color-mix(in srgb,var(--p-primary-color) 12%,transparent);outline:none}.graph__layout-menu-item.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--p-primary-color) 18%,transparent);color:var(--p-primary-color);font-weight:600}.graph__layout-menu-item[_ngcontent-%COMP%]:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:transparent;flex-shrink:0}.graph__layout-menu-item.is-active[_ngcontent-%COMP%]:before{background:var(--p-primary-color)}.graph__layout-icon-row[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:2px;padding:2px}.graph__layout-icon-item[_ngcontent-%COMP%]{appearance:none;border:0;background:transparent;color:var(--sm-text);cursor:pointer;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--sm-radius-sm);transition:background .12s ease,color .12s ease}.graph__layout-icon-item[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{font-size:1rem}.graph__connection-svg[_ngcontent-%COMP%]{width:20px;height:20px;overflow:visible}.graph__connection-svg--toggle[_ngcontent-%COMP%]{width:16px;height:16px}.graph__layout-icon-item[_ngcontent-%COMP%]:hover, .graph__layout-icon-item[_ngcontent-%COMP%]:focus-visible{background:color-mix(in srgb,var(--p-primary-color) 12%,transparent);outline:none}.graph__layout-icon-item.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--p-primary-color) 18%,transparent);color:var(--p-primary-color)}'],changeDetection:0})}return t})();var CD={a11y:{toolbarLabel:"Toggle node kinds"},favorites:{label:"Favorites"}};function Poe(t,i){if(t&1&&oe(0,"i",4),t&2){let e=d();G(e.piClass()),Oe("font-size",e.size(),"px")}}function Roe(t,i){if(t&1&&(X(),Q(0,"svg",1),oe(1,"path"),ie()),t&2){let e=d();O("width",e.size())("height",e.size()),l(),O("d",e.svgPath())}}function Ooe(t,i){if(t&1&&(Q(0,"span",4),b(1),ie()),t&2){let e=d();Oe("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),x(e.emoji())}}function Foe(t,i){if(t&1&&(Q(0,"span",5),b(1),ie()),t&2){let e=d();Oe("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),x(e.letter())}}var Yo=(()=>{class t{kindRegistry=p(as);kind=V.required();size=V(18);provider=V(null);resolvedUi=k(()=>this.kindRegistry.lookup(this.kind()));variant=k(()=>{let e=this.resolvedUi();return e?.icon?.kind==="pi"?"pi":e?.icon?.kind==="svg"?"svg":e?.emoji?"emoji":"letter"});piClass=k(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="pi"?`pi ${e.id}`:""});svgPath=k(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="svg"?e.path:""});emoji=k(()=>this.resolvedUi()?.emoji??"");letter=k(()=>this.kindRegistry.labelOf(this.kind()).charAt(0).toUpperCase());static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-kind-icon"]],inputs:{kind:[1,"kind"],size:[1,"size"],provider:[1,"provider"]},decls:4,vars:1,consts:[["aria-hidden","true",3,"class","font-size"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["aria-hidden","true",3,"font-size","line-height"],["aria-hidden","true",1,"kind-icon__letter",3,"font-size","line-height"],["aria-hidden","true"],["aria-hidden","true",1,"kind-icon__letter"]],template:function(n,o){if(n&1&&P(0,Poe,1,4,"i",0)(1,Roe,2,3,":svg:svg",1)(2,Ooe,2,5,"span",2)(3,Foe,2,5,"span",3),n&2){let r;R((r=o.variant())==="pi"?0:r==="svg"?1:r==="emoji"?2:r==="letter"?3:-1)}},styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center;line-height:1}"],changeDetection:0})}return t})();var xD=()=>({class:"kind-palette__content"}),wD=t=>({content:t}),Noe=(t,i)=>i.kind;function Aoe(t,i){if(t&1&&(F(0,"sm-kind-icon",5),f(1,"span"),b(2),m()),t&2){let e=d().$implicit;_("kind",e.kind)("size",16),l(2),x(e.count)}}function Loe(t,i){if(t&1){let e=Y();f(0,"p-togglebutton",4),L("ngModelChange",function(){let o=w(e).$implicit,r=d();return T(r.toggle(o.kind))}),D(1,Aoe,3,3,"ng-template",null,0,je),m()}if(t&2){let e=i.$implicit,n=d();_("ngModel",n.isActive(e.kind))("pTooltip",e.label)("ariaLabel",e.label)("styleClass","kind-palette__btn kind-palette__btn--"+e.kind)("pt",Pe(7,wD,Et(6,xD))),O("data-testid","kind-palette-"+e.kind)}}function Boe(t,i){if(t&1&&(F(0,"i",7),f(1,"span"),b(2),m()),t&2){let e=d(2);ae("pi-star-fill",e.favoritesActive())("pi-star",!e.favoritesActive()),l(2),x(e.favoritesCount())}}function Voe(t,i){if(t&1){let e=Y();f(0,"p-togglebutton",6),L("ngModelChange",function(){w(e);let o=d();return T(o.toggleFavoritesOnly())}),D(1,Boe,3,5,"ng-template",null,0,je),m()}if(t&2){let e=d();_("ngModel",e.favoritesActive())("pTooltip",e.texts.favorites.label)("ariaLabel",e.texts.favorites.label)("pt",Pe(5,wD,Et(4,xD)))}}var TD=(()=>{class t{loader=p(Ot);filters=p(en);kindRegistry=p(as);mapVisibility=p(Kn);texts=CD;entries=k(()=>{let e=new Map,n=new Map;for(let o of this.loader.nodes())e.set(o.kind,(e.get(o.kind)??0)+1),this.mapVisibility.inScope(o.path)&&n.set(o.kind,(n.get(o.kind)??0)+1);return this.kindRegistry.kinds().map(o=>({kind:o.name,label:o.label,count:n.get(o.name)??0})).filter(o=>(e.get(o.kind)??0)>0)});favoritesCount=k(()=>this.loader.nodes().filter(e=>e.isFavorite===!0&&this.mapVisibility.inScope(e.path)).length);showFavorites=k(()=>this.loader.hasAnyFavorites()||this.filters.favoritesOnly());favoritesActive=k(()=>this.filters.favoritesOnly());isActive(e){return this.filters.isKindActive(e)}toggle(e){let n=this.entries().map(o=>o.kind);this.filters.toggleKind(e,n)}toggleFavoritesOnly(){this.filters.setFavoritesOnly(!this.filters.favoritesOnly())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-kind-palette"]],decls:4,vars:2,consts:[["content",""],["role","toolbar","data-testid","kind-palette",1,"kind-palette"],[3,"ngModel","pTooltip","ariaLabel","styleClass","pt"],["styleClass","kind-palette__btn kind-palette__btn--favorites","data-testid","kind-palette-favorites",3,"ngModel","pTooltip","ariaLabel","pt"],[3,"ngModelChange","ngModel","pTooltip","ariaLabel","styleClass","pt"],[3,"kind","size"],["styleClass","kind-palette__btn kind-palette__btn--favorites","data-testid","kind-palette-favorites",3,"ngModelChange","ngModel","pTooltip","ariaLabel","pt"],["aria-hidden","true",1,"pi"]],template:function(n,o){n&1&&(f(0,"div",1),ue(1,Loe,3,9,"p-togglebutton",2,Noe),P(3,Voe,3,7,"p-togglebutton",3),m()),n&2&&(O("aria-label",o.texts.a11y.toolbarLabel),l(),pe(o.entries()),l(2),R(o.showFavorites()?3:-1))},dependencies:[bt,Pt,Rt,jn,Gn,Be,Ue,Yo],styles:["[_nghost-%COMP%]{display:block;pointer-events:auto}.kind-palette[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}[_nghost-%COMP%] .kind-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .kind-palette__content>span{flex:1;text-align:right}[_nghost-%COMP%] .kind-palette__btn sm-kind-icon{display:inline-flex;align-items:center;color:var(--p-text-muted-color)}[_nghost-%COMP%] .kind-palette__btn[aria-pressed=true] sm-kind-icon{color:var(--p-text-color)}[_nghost-%COMP%] .kind-palette__btn--skill[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-skill)}[_nghost-%COMP%] .kind-palette__btn--agent[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-agent)}[_nghost-%COMP%] .kind-palette__btn--command[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-command)}[_nghost-%COMP%] .kind-palette__btn--markdown[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-markdown)}[_nghost-%COMP%] .kind-palette__btn--favorites .pi{font-size:.95rem;line-height:1;color:var(--p-text-muted-color)}[_nghost-%COMP%] .kind-palette__btn--favorites:hover .pi{color:var(--p-text-color)}[_nghost-%COMP%] .kind-palette__btn--favorites[aria-pressed=true] .pi{color:var(--p-primary-color)}"],changeDetection:0})}return t})();var Mn={a11y:{toolbarLabel:"Link kind filters"},kinds:{invokes:"Invokes",references:"References",points:"Points",mentions:"Mentions"},tooltips:{invokes:`Invokes:
1840
- "/skill-command"`,references:`References:
1841
- "[link](./link.md)"
1842
- "@./link.md"`,points:'Points:\n"`references/link.md`" (path in backticks or code blocks)',mentions:`Mention:
1843
- "@agent"`}};var zoe=()=>({class:"link-kind-palette__content"}),Hoe=t=>({content:t}),qoe=(t,i)=>i.kind;function Goe(t,i){if(t&1&&b(0),t&2){let e=d(2).$implicit;Se(" ",e.text," ")}}function joe(t,i){if(t&1&&F(0,"i"),t&2){let e=d(2).$implicit;G(e.icon)}}function Uoe(t,i){if(t&1&&(f(0,"span",4),P(1,Goe,1,1)(2,joe,1,2,"i",5),m()),t&2){let e=d().$implicit;l(),R(e.text?1:e.icon?2:-1)}}function $oe(t,i){if(t&1){let e=Y();f(0,"p-togglebutton",3),L("ngModelChange",function(){let o=w(e).$implicit,r=d(2);return T(r.toggle(o.kind))}),D(1,Uoe,3,1,"ng-template",null,0,je),m()}if(t&2){let e=i.$implicit,n=d(2);_("ngModel",n.isActive(e.kind))("pTooltip",e.tooltip)("ariaLabel",e.label)("styleClass","link-kind-palette__btn link-kind-palette__btn--"+e.kind)("pt",Pe(7,Hoe,Et(6,zoe))),O("data-testid","link-kind-palette-"+e.kind)}}function Woe(t,i){if(t&1&&(f(0,"div",1),ue(1,$oe,3,9,"p-togglebutton",2,qoe),m()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),pe(e.entries())}}var SD=[{kind:"invokes",label:Mn.kinds.invokes,tooltip:Mn.tooltips.invokes,text:"/"},{kind:"references",label:Mn.kinds.references,tooltip:Mn.tooltips.references,icon:"pi pi-link"},{kind:"points",label:Mn.kinds.points,tooltip:Mn.tooltips.points,text:"`"},{kind:"mentions",label:Mn.kinds.mentions,tooltip:Mn.tooltips.mentions,text:"@"}];for(let t of SD)if(!j0.includes(t.kind))throw new Error(`link-kind-palette: unknown link kind "${t.kind}"`);var kD=(()=>{class t{loader=p(Ot);filters=p(en);texts=Mn;counts=k(()=>{let e=this.loader.scan(),n=new Map;if(!e)return n;for(let o of e.links)n.set(o.kind,(n.get(o.kind)??0)+1);return n});entries=k(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),o=new Set(n);return SD.filter(r=>(e.get(r.kind)??0)>0||o.has(r.kind))});constructor(){de(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),o=n.filter(r=>(e.get(r)??0)>0);o.length!==n.length&&this.filters.setLinkKinds(o)})}isActive(e){return this.filters.isLinkKindActive(e)}toggle(e){this.filters.toggleLinkKind(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-link-kind-palette"]],decls:1,vars:1,consts:[["content",""],["role","toolbar","data-testid","link-kind-palette",1,"link-kind-palette"],["tooltipStyleClass","link-kind-palette__tooltip",3,"ngModel","pTooltip","ariaLabel","styleClass","pt"],["tooltipStyleClass","link-kind-palette__tooltip",3,"ngModelChange","ngModel","pTooltip","ariaLabel","styleClass","pt"],["aria-hidden","true",1,"link-kind-palette__glyph"],[3,"class"]],template:function(n,o){n&1&&P(0,Woe,3,1,"div",1),n&2&&R(o.entries().length>0?0:-1)},dependencies:[bt,Pt,Rt,jn,Gn,Be,Ue],styles:["[_nghost-%COMP%]{display:block;width:100%;pointer-events:auto}.link-kind-palette[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.link-kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);width:100%;height:30px}[_nghost-%COMP%] .link-kind-palette__content{width:100%;height:100%;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__glyph{font-size:.95rem;line-height:1;font-weight:600;display:inline-flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__btn--invokes .link-kind-palette__glyph{color:var(--sm-edge-invokes)}[_nghost-%COMP%] .link-kind-palette__btn--invokes[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-invokes-active)}[_nghost-%COMP%] .link-kind-palette__btn--references .link-kind-palette__glyph{color:var(--sm-edge-references)}[_nghost-%COMP%] .link-kind-palette__btn--references[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-references-active)}[_nghost-%COMP%] .link-kind-palette__btn--points .link-kind-palette__glyph{color:var(--sm-edge-points)}[_nghost-%COMP%] .link-kind-palette__btn--points[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-points-active)}[_nghost-%COMP%] .link-kind-palette__btn--mentions .link-kind-palette__glyph{color:var(--sm-edge-mentions)}[_nghost-%COMP%] .link-kind-palette__btn--mentions[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-mentions-active)}[_nghost-%COMP%] .link-kind-palette__tooltip{max-width:26rem}[_nghost-%COMP%] .link-kind-palette__tooltip .p-tooltip-text{white-space:pre-line;text-align:left;line-height:1.35}"],changeDetection:0})}return t})();var ID={a11y:{toolbarLabel:"Toggle severity filters"},error:{label:"Errors",tooltip:"Only nodes with errors"},warn:{label:"Warnings",tooltip:"Only nodes with warnings"}};var MD=()=>({class:"severity-palette__content"}),DD=t=>({content:t});function Koe(t,i){if(t&1&&(f(0,"span",5),F(1,"i",6),m(),f(2,"span",7),b(3),m()),t&2){let e=d(3);l(3),x(e.errorCount())}}function Yoe(t,i){if(t&1){let e=Y();f(0,"p-togglebutton",4),L("ngModelChange",function(){w(e);let o=d(2);return T(o.toggle("error"))}),D(1,Koe,4,1,"ng-template",null,0,je),m()}if(t&2){let e=d(2);_("ngModel",e.isActive("error"))("pTooltip",e.texts.error.tooltip)("ariaLabel",e.texts.error.label)("pt",Pe(5,DD,Et(4,MD)))}}function Xoe(t,i){if(t&1&&(f(0,"span",5),F(1,"i",9),m(),f(2,"span",7),b(3),m()),t&2){let e=d(3);l(3),x(e.warnCount())}}function Zoe(t,i){if(t&1){let e=Y();f(0,"p-togglebutton",8),L("ngModelChange",function(){w(e);let o=d(2);return T(o.toggle("warn"))}),D(1,Xoe,4,1,"ng-template",null,0,je),m()}if(t&2){let e=d(2);_("ngModel",e.isActive("warn"))("pTooltip",e.texts.warn.tooltip)("ariaLabel",e.texts.warn.label)("pt",Pe(5,DD,Et(4,MD)))}}function Qoe(t,i){if(t&1&&(f(0,"div",1),P(1,Yoe,3,7,"p-togglebutton",2),P(2,Zoe,3,7,"p-togglebutton",3),m()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),R(e.showError()?1:-1),l(),R(e.showWarn()?2:-1)}}var PD=(()=>{class t{loader=p(Ot);filters=p(en);issuePaths=p(ho);mapVisibility=p(Kn);texts=ID;visibleSet=k(()=>{let e=this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity()),n=new Set;for(let o of e)this.mapVisibility.inScope(o.path)&&n.add(o.path);return n});rawErrorCount=k(()=>this.issuePaths.bySeverity().errors.size);rawWarnCount=k(()=>this.issuePaths.bySeverity().warns.size);errorCount=k(()=>ED(this.issuePaths.bySeverity().errors,this.visibleSet()));warnCount=k(()=>ED(this.issuePaths.bySeverity().warns,this.visibleSet()));showError=k(()=>this.rawErrorCount()>0||this.filters.severityErrorActive());showWarn=k(()=>this.rawWarnCount()>0||this.filters.severityWarnActive());hasAny=k(()=>this.showError()||this.showWarn());constructor(){de(()=>{this.rawErrorCount()===0&&this.filters.severityErrorActive()&&this.filters.toggleSeverity("error"),this.rawWarnCount()===0&&this.filters.severityWarnActive()&&this.filters.toggleSeverity("warn")})}isActive(e){return this.filters.isSeverityActive(e)}toggle(e){this.filters.toggleSeverity(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-severity-palette"]],decls:1,vars:1,consts:[["content",""],["role","toolbar","data-testid","severity-palette",1,"severity-palette"],["styleClass","severity-palette__btn severity-palette__btn--error","data-testid","severity-palette-error",3,"ngModel","pTooltip","ariaLabel","pt"],["styleClass","severity-palette__btn severity-palette__btn--warn","data-testid","severity-palette-warn",3,"ngModel","pTooltip","ariaLabel","pt"],["styleClass","severity-palette__btn severity-palette__btn--error","data-testid","severity-palette-error",3,"ngModelChange","ngModel","pTooltip","ariaLabel","pt"],["aria-hidden","true",1,"severity-palette__glyph"],[1,"pi","pi-times-circle"],[1,"severity-palette__count"],["styleClass","severity-palette__btn severity-palette__btn--warn","data-testid","severity-palette-warn",3,"ngModelChange","ngModel","pTooltip","ariaLabel","pt"],[1,"pi","pi-exclamation-triangle"]],template:function(n,o){n&1&&P(0,Qoe,3,3,"div",1),n&2&&R(o.hasAny()?0:-1)},dependencies:[bt,Pt,Rt,jn,Gn,Be,Ue],styles:["[_nghost-%COMP%]{display:block;width:100%;pointer-events:auto}.severity-palette[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.severity-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}.severity-palette__btn--error[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-error-bg) 55%, var(--sm-bg-content))}.severity-palette__btn--warn[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-warn-bg) 55%, var(--sm-bg-content))}[_nghost-%COMP%] .severity-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .severity-palette__count{flex:1;text-align:right}[_nghost-%COMP%] .severity-palette__glyph{display:inline-flex;align-items:center;justify-content:center;font-size:.95rem;line-height:1}[_nghost-%COMP%] .severity-palette__btn--error .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-error)}[_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-warn)}"],changeDetection:0})}return t})();function ED(t,i){let[e,n]=t.size<=i.size?[t,i]:[i,t],o=0;for(let r of e)n.has(r)&&o++;return o}function RD(t,i){let e=W(null),n=0;return de(()=>{let o=t().trim(),r=++n;e.set(null),o&&i(o).then(a=>{r===n&&e.set(a)}).catch(()=>{r===n&&e.set(null)})}),e.asReadonly()}function Oa(t,i){return Pn(Oa),RD(t,e=>i.renderInline(e))}function n0(t,i){return Pn(n0),RD(t,e=>i.render(e))}var Joe=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ere=/^[a-z]+$/i;function nf(t){if(typeof t!="string")return null;let i=t.trim();return i.length===0?null:Joe.test(i)||ere.test(i)?i:null}var tre=(t,i)=>i.step;function nre(t,i){t&1&&(f(0,"span",8),b(1),m()),t&2&&(l(),x(i))}function ire(t,i){if(t&1&&(f(0,"span",12)(1,"span",28),b(2,"T"),m(),b(3),m()),t&2){let e=d(),n=Ee(0);_("pTooltip",e.texts.stats.tokens(n.tokensTotal)),l(3),x(e.tokensShort())}}function ore(t,i){if(t&1&&(f(0,"span",13)(1,"span",28),b(2,"B"),m(),b(3),m()),t&2){let e=d(),n=Ee(0);_("pTooltip",e.texts.stats.bytes(n.bytesTotal)),l(3),x(e.bytesShort())}}function rre(t,i){if(t&1&&(f(0,"span",29),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function are(t,i){if(t&1&&(f(0,"span",30),b(1),m()),t&2){let e=d(2),n=Ee(2);l(),x(e.texts.tagOverflow(n))}}function sre(t,i){if(t&1&&(f(0,"div",17),ue(1,rre,2,1,"span",29,Xe),P(3,are,2,1,"span",30),m()),t&2){d();let e=Ee(1),n=Ee(2);l(),pe(e),l(2),R(n>0?3:-1)}}function lre(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function cre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,lre,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.topics.tooltip),l(),x(n.texts.llm.topics.label),l(2),pe(e.topics)}}function dre(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function ure(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,dre,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.facts.tooltip),l(),x(n.texts.llm.facts.label),l(2),pe(e.keyFacts)}}function pre(t,i){if(t&1&&(P(0,cre,6,2,"div",31),P(1,ure,6,2,"div",31)),t&2){let e=i;R(e.topics!=null&&e.topics.length?0:-1),l(),R(e.keyFacts!=null&&e.keyFacts.length?1:-1)}}function hre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"span"),b(4),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.when.tooltip),l(),x(n.texts.llm.when.label),l(2),x(e.whenToUse)}}function fre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"span"),b(4),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.style.tooltip),l(),x(n.texts.llm.style.label),l(2),x(e.interactionStyle)}}function mre(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function _re(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,mre,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.does.tooltip),l(),x(n.texts.llm.does.label),l(2),pe(e.capabilities)}}function gre(t,i){if(t&1&&(P(0,hre,5,3,"div",31),P(1,fre,5,3,"div",31),P(2,_re,6,2,"div",31)),t&2){let e=i;R(e.whenToUse?0:-1),l(),R(e.interactionStyle?1:-1),l(),R(e.capabilities!=null&&e.capabilities.length?2:-1)}}function vre(t,i){if(t&1&&b(0),t&2){let e=i.$implicit,n=i.$index,o=i.$count;y0("",e.step,". ",e.description,"",n===o-1?"":" \xB7 ")}}function bre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"span"),ue(4,vre,1,3,null,null,tre),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.steps.tooltip),l(),x(n.texts.llm.steps.label),l(2),pe(e.recipe)}}function yre(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function Cre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,yre,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.pre.tooltip),l(),x(n.texts.llm.pre.label),l(2),pe(e.preconditions)}}function xre(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function wre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,xre,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.out.tooltip),l(),x(n.texts.llm.out.label),l(2),pe(e.outputs)}}function Tre(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function Sre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,Tre,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.fx.tooltip),l(),x(n.texts.llm.fx.label),l(2),pe(e.sideEffects)}}function kre(t,i){if(t&1&&(P(0,bre,6,2,"div",31),P(1,Cre,6,2,"div",31),P(2,wre,6,2,"div",31),P(3,Sre,6,2,"div",31)),t&2){let e=i;R(e.recipe!=null&&e.recipe.length?0:-1),l(),R(e.preconditions!=null&&e.preconditions.length?1:-1),l(),R(e.outputs!=null&&e.outputs.length?2:-1),l(),R(e.sideEffects!=null&&e.sideEffects.length?3:-1)}}function Ire(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"code",35),b(4),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.eg.tooltip),l(),x(n.texts.llm.eg.label),l(2),x(e.invocationExample)}}function Ere(t,i){if(t&1&&(f(0,"span",34),b(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function Mre(t,i){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),m(),f(3,"div",33),ue(4,Ere,2,1,"span",34,Xe),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.fx.tooltip),l(),x(n.texts.llm.fx.label),l(2),pe(e.sideEffects)}}function Dre(t,i){if(t&1&&(P(0,Ire,5,3,"div",31),P(1,Mre,6,2,"div",31)),t&2){let e=i;R(e.invocationExample?0:-1),l(),R(e.sideEffects!=null&&e.sideEffects.length?1:-1)}}function Pre(t,i){if(t&1&&(f(0,"div",22),P(1,pre,2,2),P(2,gre,3,3),P(3,kre,4,4),P(4,Dre,2,2),m()),t&2){let e,n,o,r,a=d();l(),R((e=a.summaryMarkdown())?1:-1,e),l(),R((n=a.summaryAgent())?2:-1,n),l(),R((o=a.summarySkill())?3:-1,o),l(),R((r=a.summaryCommand())?4:-1,r)}}function Rre(t,i){if(t&1&&F(0,"div",23),t&2){let e=d();_("innerHTML",e.descriptionHtml(),yi)}}function Ore(t,i){if(t&1&&(f(0,"div",36)(1,"div",37)(2,"span",38),b(3),m(),f(4,"span",39),b(5),m()()()),t&2){let e=d(),n=d();l(3),x(n.texts.meta.model),l(2),x(e.model)}}function Fre(t,i){t&1&&P(0,Ore,6,2,"div",36),t&2&&R(i.model?0:-1)}var Nre={selected:!1,highlighted:!1,dimmed:!1},OD=(()=>{class t{node=V.required();stats=V({linksIn:0,linksOut:0});summary=V(null);selection=V(Nre);isFavorite=V(!1);favoriteToggle=et();texts=Yn;expanded=Ci(!1);fmAgent=k(()=>{let e=this.node();return e.kind==="agent"?e.frontmatter:null});summaryAgent=k(()=>{let e=this.summary();return e?.kind==="agent"?e:null});summarySkill=k(()=>{let e=this.summary();return e?.kind==="skill"?e:null});summaryCommand=k(()=>{let e=this.summary();return e?.kind==="command"?e:null});summaryMarkdown=k(()=>{let e=this.summary();return e?.kind==="markdown"?e:null});hasLlmCluster=k(()=>{let e=this.summary();return e!==null&&this.hasLlmContent(e)});hasLlmContent(e){switch(e.kind){case"markdown":return(e.topics?.length??0)>0||(e.keyFacts?.length??0)>0;case"agent":return!!e.whenToUse||!!e.interactionStyle||(e.capabilities?.length??0)>0;case"skill":return(e.recipe?.length??0)>0||(e.preconditions?.length??0)>0||(e.outputs?.length??0)>0||(e.sideEffects?.length??0)>0;case"command":return!!e.invocationExample||(e.sideEffects?.length??0)>0;default:return!1}}nodeColor=k(()=>{let e=this.node();if(e.kind!=="agent")return null;let n=e.frontmatter;return nf(n.color)});markdown=p(uo);bytesShort=k(()=>{let e=this.stats().bytesTotal;return e===void 0?null:hr(e)});tokensShort=k(()=>{let e=this.stats().tokensTotal;return e===void 0?null:hr(e)});version=k(()=>es(this.node()));stability=k(()=>ro(this.node()));tagChips=k(()=>ao(this.node()));visibleTagChips=k(()=>this.tagChips().slice(0,3));moreTagsCount=k(()=>Math.max(0,this.tagChips().length-3));displayName=k(()=>{let e=this.node().frontmatter;return e.name?e.name:ds(this.node().path)});description=k(()=>this.node().frontmatter.description??"");descriptionHtml=Oa(this.description,this.markdown);toggleExpanded(e){e.stopPropagation(),this.expanded.update(n=>!n)}toggleFavorite(e){e.stopPropagation();let n=!this.isFavorite();this.favoriteToggle.emit({path:this.node().path,value:n})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-node-card"]],hostAttrs:[1,"sm-gnode"],hostVars:15,hostBindings:function(n,o){n&2&&(O("data-kind",o.node().kind),Oe("--node-color",o.nodeColor()),ae("sm-gnode--with-color",!!o.nodeColor())("sm-gnode--deprecated",o.stability()==="deprecated")("sm-gnode--expanded",o.expanded())("sm-gnode--selected",o.selection().selected)("sm-gnode--highlighted",o.selection().highlighted)("sm-gnode--dimmed",o.selection().dimmed))},inputs:{node:[1,"node"],stats:[1,"stats"],summary:[1,"summary"],selection:[1,"selection"],isFavorite:[1,"isFavorite"],expanded:[1,"expanded"]},outputs:{favoriteToggle:"favoriteToggle",expanded:"expandedChange"},decls:34,vars:30,consts:[[1,"sm-gnode__main"],["aria-hidden","true",1,"sm-gnode__icon-box"],[3,"kind","provider","size"],[1,"sm-gnode__content"],[1,"sm-gnode__name-row"],[1,"sm-gnode__name",3,"pTooltip"],["slot","card.title.right",3,"node"],[1,"sm-gnode__actions"],["data-testid","node-card-version",1,"sm-gnode__name-version"],["type","button",1,"sm-gnode__chevron",3,"click"],["aria-hidden","true",1,"pi","pi-chevron-down"],[1,"sm-gnode__sub"],[1,"sm-gnode__sub-stat","sm-gnode__sub-stat--tokens",3,"pTooltip"],[1,"sm-gnode__sub-stat","sm-gnode__sub-stat--bytes",3,"pTooltip"],["type","button","data-testid","node-card-favorite",1,"sm-gnode__favorite",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["slot","card.subtitle.left",3,"node"],["data-testid","node-card-tags",1,"sm-gnode__tagrow"],[1,"sm-gnode__panel"],["data-testid","node-card-path",1,"sm-gnode__path",3,"pTooltip"],["aria-hidden","true",1,"fa-regular","fa-folder-open","sm-gnode__path-icon"],[1,"sm-gnode__path-value"],[1,"sm-gnode__llm"],[1,"sm-gnode__desc",3,"innerHTML"],[1,"sm-gnode__footer"],["slot","card.footer.left",3,"node"],[1,"sm-gnode__footer-right-cluster"],["slot","card.footer.right",3,"node"],[1,"sm-gnode__sub-key"],[1,"sm-gnode__tag-chip"],["data-testid","node-card-tags-more",1,"sm-gnode__tag-more"],[1,"sm-gnode__llm-line"],[1,"sm-gnode__llm-label",3,"pTooltip"],[1,"sm-gnode__chips"],[1,"sm-gnode__chip","sm-gnode__chip--llm"],[1,"sm-gnode__llm-code"],[1,"sm-gnode__meta"],[1,"sm-gnode__meta-row"],[1,"sm-gnode__meta-label"],[1,"sm-gnode__meta-value","sm-gnode__meta-value--mono"]],template:function(n,o){if(n&1&&(Yt(0)(1)(2),f(3,"div",0)(4,"div",1),F(5,"sm-kind-icon",2),m(),f(6,"div",3)(7,"div",4)(8,"span",5),b(9),m(),F(10,"sm-view-contributions-host",6),m()(),f(11,"div",7),P(12,nre,2,1,"span",8),f(13,"button",9),L("click",function(a){return o.toggleExpanded(a)}),F(14,"i",10),m()(),f(15,"div",11),P(16,ire,4,2,"span",12),P(17,ore,4,2,"span",13),f(18,"button",14),L("click",function(a){return o.toggleFavorite(a)}),F(19,"i",15),m(),F(20,"sm-view-contributions-host",16),m()(),P(21,sre,4,1,"div",17),f(22,"div",18)(23,"div",19),F(24,"i",20),f(25,"span",21),b(26),m()(),P(27,Pre,5,4,"div",22),P(28,Rre,1,1,"div",23),P(29,Fre,1,1),m(),f(30,"div",24),F(31,"sm-view-contributions-host",25),f(32,"div",26),F(33,"sm-view-contributions-host",27),m()()),n&2){let r,a,s=o.node();xt(o.stats()),l();let c=xt(o.visibleTagChips());l(),xt(o.moreTagsCount()),l(3),_("kind",s.kind)("provider",s.provider)("size",18),l(3),_("pTooltip",s.path),l(),x(o.displayName()),l(),_("node",o.node()),l(2),R((r=o.version())?12:-1,r),l(),O("aria-label",o.texts.ariaExpand),l(3),R(o.tokensShort()!==null?16:-1),l(),R(o.bytesShort()!==null?17:-1),l(),ae("sm-gnode__favorite--on",o.isFavorite()),_("pTooltip",o.isFavorite()?o.texts.favoriteRemoveTooltip:o.texts.favoriteAddTooltip),O("aria-label",o.isFavorite()?o.texts.ariaFavoriteRemove:o.texts.ariaFavoriteAdd),l(),ae("pi-star-fill",o.isFavorite())("pi-star",!o.isFavorite()),l(),_("node",o.node()),l(),R(c.length?21:-1),l(2),_("pTooltip",s.path),l(3),x(s.path),l(),R(o.hasLlmCluster()?27:-1),l(),R(o.description()?28:-1),l(),R((a=o.fmAgent())?29:-1,a),l(2),_("node",o.node()),l(2),_("node",o.node())}},dependencies:[Yo,Be,Ue,$n],styles:['[_nghost-%COMP%]{--accent: var(--sm-kind-markdown);position:relative;display:inline-block;width:260px;background:var(--sm-bg-content);border:1px solid var(--sm-border);border-radius:var(--sm-radius-lg);box-shadow:var(--sm-shadow-card);overflow:hidden;transition:box-shadow .12s ease,border-color .12s ease,transform .12s ease;-webkit-user-select:none;user-select:none;text-align:start}[_nghost-%COMP%]:hover{box-shadow:var(--sm-shadow-card-hover)}[_nghost-%COMP%]:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--accent)}[data-kind="skill"][_nghost-%COMP%]{--accent: var(--sm-kind-skill)}[data-kind="agent"][_nghost-%COMP%]{--accent: var(--sm-kind-agent)}[data-kind="command"][_nghost-%COMP%]{--accent: var(--sm-kind-command)}[data-kind="markdown"][_nghost-%COMP%]{--accent: var(--sm-kind-markdown)}.sm-gnode--deprecated[_nghost-%COMP%]{opacity:.55}.sm-gnode--selected[_nghost-%COMP%]{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color),0 4px 16px color-mix(in srgb,var(--p-primary-color) 25%,transparent)}.sm-gnode--highlighted[_nghost-%COMP%]{border-color:var(--p-primary-color);box-shadow:var(--sm-shadow-card-hover)}.sm-gnode--dimmed[_nghost-%COMP%]{opacity:.25}.sm-gnode__main[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.6rem;row-gap:.3rem;align-items:start;padding:.6rem .65rem}.sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg);width:38px;height:38px;border-radius:var(--sm-radius-lg);display:flex;align-items:center;justify-content:center;background:var(--kind-bg);color:var(--kind-fg);flex:none;font-size:1.05rem;grid-row:1 / span 2;align-self:center}[data-kind="skill"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-skill-bg);--kind-fg: var(--sm-kind-skill-fg)}[data-kind="agent"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-agent-bg);--kind-fg: var(--sm-kind-agent-fg)}[data-kind="command"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-command-bg);--kind-fg: var(--sm-kind-command-fg)}[data-kind="markdown"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg)}.sm-gnode__content[_ngcontent-%COMP%]{min-width:0;width:100%;justify-self:stretch;display:flex;flex-direction:column;gap:.15rem}.sm-gnode__name-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.35rem;min-width:0}.sm-gnode__name-row[_ngcontent-%COMP%] > sm-view-contributions-host[_ngcontent-%COMP%]{margin-left:auto;align-self:center}.sm-gnode__name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--p-text-color);flex:0 1 auto;min-width:0}.sm-gnode__name-version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.65rem;color:var(--sm-text-muted);background:color-mix(in srgb,var(--accent) 10%,transparent);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);line-height:1.2;flex:none;align-self:center}.sm-gnode--with-color[_nghost-%COMP%] .sm-gnode__name[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--node-color) 7%,transparent);padding:.05rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.2rem}.sm-gnode__confidence[_ngcontent-%COMP%]{display:flex;align-items:flex-start;font-size:.65rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;flex:none;cursor:help;padding-top:.35rem}.sm-gnode__llm-marker--high[_ngcontent-%COMP%]{color:var(--sm-severity-success)}.sm-gnode__llm-marker--med[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.sm-gnode__llm-marker--low[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.sm-gnode__chevron[_ngcontent-%COMP%]{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--sm-text-muted);border-radius:var(--sm-radius-md);transition:transform .16s ease,background .12s ease,color .12s ease}.sm-gnode__chevron[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem;line-height:1}.sm-gnode__chevron[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.sm-gnode--expanded[_nghost-%COMP%] .sm-gnode__chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.sm-gnode__favorite[_ngcontent-%COMP%]{position:absolute;top:-3px;right:0;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--sm-text-muted);border-radius:var(--sm-radius-md);flex:none;transition:background .12s ease,color .12s ease}.sm-gnode__favorite[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.8rem;line-height:1}.sm-gnode__favorite[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.sm-gnode__favorite--on[_ngcontent-%COMP%], .sm-gnode__favorite--on[_ngcontent-%COMP%]:hover{color:var(--p-primary-color)}.sm-gnode__sub[_ngcontent-%COMP%]{position:relative;grid-column:2 / -1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-family:var(--sm-font-mono);font-size:.6rem;color:var(--sm-text-muted);line-height:1.2;margin-top:.1rem;min-width:0;width:100%;padding-right:28px}.sm-gnode__sub-stat[_ngcontent-%COMP%]{padding:.08rem .35rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);font-family:var(--sm-font-mono);font-size:.6rem;color:var(--sm-text-muted);font-weight:400;flex:none}.sm-gnode__sub-stat[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.15rem}.sm-gnode__sub-stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.65rem}.sm-gnode__sub-key[_ngcontent-%COMP%]{font-weight:700}.sm-gnode__sub-stat--tokens[_ngcontent-%COMP%]{background:var(--sm-stat-tokens-bg)}.sm-gnode__sub-stat--bytes[_ngcontent-%COMP%]{background:var(--sm-stat-bytes-bg)}.sm-gnode__panel[_ngcontent-%COMP%]{display:none;border-top:1px solid var(--sm-border)}.sm-gnode--expanded[_nghost-%COMP%] .sm-gnode__panel[_ngcontent-%COMP%]{display:block}.sm-gnode__llm[_ngcontent-%COMP%]{padding:.5rem .7rem;display:flex;flex-direction:column;gap:.25rem;font-size:.75rem;line-height:1.4}.sm-gnode__llm-line[_ngcontent-%COMP%]{display:flex;gap:.4rem;align-items:baseline;color:var(--p-text-color);font-style:italic;min-width:0}.sm-gnode__llm-label[_ngcontent-%COMP%]{flex:none;font-style:normal;color:var(--sm-text-muted);font-size:.6rem;letter-spacing:.04em;text-transform:uppercase;font-weight:600;min-width:2.2rem;padding-top:.2rem;cursor:help}.sm-gnode__chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;flex:1;min-width:0}.sm-gnode__chip[_ngcontent-%COMP%]{font-size:.65rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);border:1px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);line-height:1.3}.sm-gnode__chip--mono[_ngcontent-%COMP%]{font-family:var(--sm-font-mono)}.sm-gnode__chip--allowed[_ngcontent-%COMP%]{border-style:dashed;background:transparent;color:var(--sm-text-muted)}.sm-gnode__chip--llm[_ngcontent-%COMP%]{font-style:italic}.sm-gnode__chip-required[_ngcontent-%COMP%]{color:var(--sm-severity-error);margin-left:2px}.sm-gnode__llm-code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);font-size:.7rem;font-style:normal;color:var(--p-text-color)}.sm-gnode__path[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;padding:.4rem .7rem;font-family:var(--sm-font-mono);font-size:.68rem;color:var(--sm-text-muted);background:var(--sm-bg-hover);border-top:1px solid var(--sm-border);min-width:0}.sm-gnode__path-icon[_ngcontent-%COMP%]{flex:none;font-size:.7rem;color:var(--sm-text-muted)}.sm-gnode__path-value[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;unicode-bidi:plaintext;text-align:left}.sm-gnode__desc[_ngcontent-%COMP%]{padding:.55rem .7rem;font-size:.78rem;line-height:1.45;color:var(--p-text-color);max-height:140px;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid var(--sm-border);scrollbar-width:thin;scrollbar-color:var(--sm-border) transparent}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--sm-border);border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .sm-gnode__desc code{background:var(--sm-bg-hover);padding:.02rem .25rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .sm-gnode__desc a{color:var(--p-primary-color);text-decoration:underline}.sm-gnode__meta[_ngcontent-%COMP%]{padding:.5rem .7rem;border-top:1px solid var(--sm-border);display:flex;flex-direction:column;gap:.35rem}.sm-gnode__meta-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;font-size:.7rem;min-width:0}.sm-gnode__meta-label[_ngcontent-%COMP%]{color:var(--sm-text-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:.6rem;flex:none;min-width:60px;padding-top:.15rem}.sm-gnode__meta-value[_ngcontent-%COMP%]{color:var(--p-text-color);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-gnode__meta-value--mono[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.08rem .4rem;border-radius:var(--sm-radius-sm);font-size:.68rem}.sm-gnode__footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.7rem;min-height:1.4rem;padding:.4rem .7rem;border-top:1px solid var(--sm-border);background:var(--sm-bg-hover);font-size:.7rem;color:var(--sm-text-muted)}.sm-gnode__footer-right-cluster[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.7rem;margin-left:auto}.sm-gnode__stat[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;line-height:1}.sm-gnode__stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.6rem;line-height:1;display:block}.sm-gnode__stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{transform:translateY(1px)}.sm-gnode__stat-num[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color);line-height:1;display:block}.sm-gnode__stat--error[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error);padding:.1rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__stat--error[_ngcontent-%COMP%] .sm-gnode__stat-num[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.sm-gnode__stat--warn[_ngcontent-%COMP%]{background:var(--sm-severity-warn-bg);color:var(--sm-severity-warn);padding:.1rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__stat--warn[_ngcontent-%COMP%] .sm-gnode__stat-num[_ngcontent-%COMP%], .sm-gnode__stat--stale[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.sm-gnode__tagrow[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;padding:0 .65rem .35rem}.sm-gnode__tag-chip[_ngcontent-%COMP%]{font-size:.6rem;font-family:var(--sm-font-mono);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--sm-text-muted);border:1px solid var(--sm-border);line-height:1.4}.sm-gnode__tag-more[_ngcontent-%COMP%]{font-size:.6rem;color:var(--sm-text-muted);font-style:italic}'],changeDetection:0})}return t})();var FD={a11y:{expand:"Expand performance HUD",collapse:"Collapse performance HUD"},units:{fps:t=>`${t} fps`,ms:t=>`${t}ms`,mb:t=>`${t} MB`,longTasks:t=>`${t} long`,domNodes:t=>`${t} dom`,nodes:(t,i)=>`${t}/${i} nodes`,links:t=>`${t} links`}};var Are=["sparkline"],Lre=()=>({class:"perf-hud__content"}),Bre=t=>({content:t});function Vre(t,i){if(t&1&&(f(0,"span",9),b(1),m()),t&2){let e=d(2);l(),x(e.texts.units.mb(e.heapMb()))}}function zre(t,i){if(t&1&&(f(0,"div",3)(1,"span",4),b(2),m()(),f(3,"div",5)(4,"div",6)(5,"div",7),F(6,"canvas",8,1),f(8,"span",9),b(9),m()(),f(10,"div",10)(11,"div",11),P(12,Vre,2,1,"span",9),f(13,"span",9),b(14),m(),f(15,"span",9),b(16),m()()(),f(17,"div",10)(18,"div",11)(19,"span",9),b(20),m(),f(21,"span",9),b(22),m()()()()()),t&2){let e=d();l(2),x(e.texts.units.fps(e.fps())),l(),O("aria-hidden",!e.expanded()),l(6),x(e.texts.units.ms(e.frameTimeMs())),l(3),R(e.hasHeap()?12:-1),l(2),x(e.texts.units.domNodes(e.domNodes())),l(2),x(e.texts.units.longTasks(e.longTasks())),l(4),x(e.texts.units.nodes(e.visible(),e.total())),l(2),x(e.texts.units.links(e.edges()))}}var Hre=30,i0=60,of=14,ND=(()=>{class t{visible=V(0);total=V(0);edges=V(0);texts=FD;destroyRef=p(vt);zone=p(Wt);fps=W(0);frameTimeMs=W(0);fpsSamples=W([]);sparklineCanvas=nt("sparkline");heapMb=W(null);longTasks=W(0);domNodes=W(0);expanded=W(qre());hasHeap=k(()=>this.heapMb()!==null);constructor(){let e=0,n=0,o=performance.now(),r=o,a=0,s=u=>{let h=u-o;if(o=u,e+=1,n+=h,u-r>=1e3){let g=(u-r)/1e3,C=Math.round(e/g);this.fps.set(C),this.frameTimeMs.set(Math.round(n/Math.max(e,1))),this.heapMb.set(jre()),this.domNodes.set(document.querySelectorAll("*").length),this.fpsSamples.update(M=>{let S=M.length>=Hre?M.slice(1):M.slice();return S.push(C),S}),e=0,n=0,r=u}a=requestAnimationFrame(s)};this.zone.runOutsideAngular(()=>{a=requestAnimationFrame(s)});let c=null;if(typeof PerformanceObserver<"u")try{c=new PerformanceObserver(u=>{this.longTasks.update(h=>h+u.getEntries().length)}),c.observe({type:"longtask",buffered:!0})}catch{}this.destroyRef.onDestroy(()=>{cancelAnimationFrame(a),c?.disconnect()}),de(()=>{let u=this.sparklineCanvas(),h=this.fpsSamples();u&&Ure(u.nativeElement,h)})}setExpanded(e){this.expanded.set(e),Gre(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-perf-hud"]],viewQuery:function(n,o){n&1&&dn(o.sparklineCanvas,Are,5),n&2&&Vt()},inputs:{visible:[1,"visible"],total:[1,"total"],edges:[1,"edges"]},decls:3,vars:7,consts:[["content",""],["sparkline",""],["data-testid","perf-hud",3,"ngModelChange","ngModel","ariaLabel","styleClass","pt"],[1,"perf-hud__header"],[1,"perf-hud__cell","perf-hud__cell--fps"],[1,"perf-hud__expandable"],[1,"perf-hud__expandable-inner"],[1,"perf-hud__row","perf-hud__row--sparkline"],["aria-hidden","true",1,"perf-hud__sparkline"],[1,"perf-hud__cell"],[1,"perf-hud__section"],[1,"perf-hud__row"]],template:function(n,o){n&1&&(f(0,"p-togglebutton",2),L("ngModelChange",function(a){return o.setExpanded(a)}),D(1,zre,23,8,"ng-template",null,0,je),m()),n&2&&_("ngModel",o.expanded())("ariaLabel",o.expanded()?o.texts.a11y.collapse:o.texts.a11y.expand)("styleClass",o.expanded()?"perf-hud perf-hud--expanded":"perf-hud")("pt",Pe(5,Bre,Et(4,Lre)))},dependencies:[bt,Pt,Rt,jn,Gn],styles:["[_nghost-%COMP%]{position:absolute;bottom:16px;left:16px;z-index:2;pointer-events:none}.perf-hud[_ngcontent-%COMP%]{pointer-events:auto;--p-togglebutton-padding: 0;--p-togglebutton-content-padding: .25rem .7rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: var(--sm-bg-content);--p-togglebutton-checked-background: var(--sm-bg-content);--p-togglebutton-hover-background: var(--sm-bg-content);--p-togglebutton-border-color: var(--sm-border);--p-togglebutton-checked-border-color: var(--sm-border);--p-togglebutton-content-checked-background: transparent;--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-muted-color);box-shadow:var(--sm-shadow-floating);font-family:var(--sm-font-mono);font-size:.7rem;font-weight:500;line-height:14px;opacity:.75;transition:opacity .15s ease,color .15s ease}.perf-hud[_ngcontent-%COMP%]:hover{opacity:1}.perf-hud--expanded[_ngcontent-%COMP%]{--p-togglebutton-border-radius: var(--sm-radius-md);--p-togglebutton-content-border-radius: var(--sm-radius-md);--p-togglebutton-content-padding: .45rem .7rem;line-height:1.35;opacity:.95}[_nghost-%COMP%] .perf-hud__content{display:flex;flex-direction:column;align-items:stretch;gap:0}.perf-hud__cell[_ngcontent-%COMP%]{white-space:nowrap;font-variant-numeric:tabular-nums}.perf-hud--expanded[_ngcontent-%COMP%] .perf-hud__cell--fps[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color)}.perf-hud__sparkline[_ngcontent-%COMP%]{width:60px;height:14px;opacity:.6}.perf-hud__header[_ngcontent-%COMP%]{display:flex;align-items:center}.perf-hud__expandable[_ngcontent-%COMP%]{display:grid;grid-template-rows:0fr;grid-template-columns:0fr;overflow:hidden;transition:grid-template-rows .22s ease,grid-template-columns .22s ease}.perf-hud--expanded[_ngcontent-%COMP%] .perf-hud__expandable[_ngcontent-%COMP%]{grid-template-rows:1fr;grid-template-columns:1fr}.perf-hud__expandable-inner[_ngcontent-%COMP%]{min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column;gap:.3rem;padding-top:0;transition:padding-top .22s ease}.perf-hud--expanded[_ngcontent-%COMP%] .perf-hud__expandable-inner[_ngcontent-%COMP%]{padding-top:.3rem}.perf-hud__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;padding-top:.3rem;border-top:1px solid var(--sm-border)}.perf-hud__section[_ngcontent-%COMP%]:first-child{padding-top:0;border-top:0}.perf-hud__row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.6rem;white-space:nowrap}.perf-hud__row--sparkline[_ngcontent-%COMP%]{justify-content:space-between;gap:.6rem}"],changeDetection:0})}return t})(),AD="sm.perf-hud.expanded";function qre(){try{return localStorage.getItem(AD)==="1"}catch{return!1}}function Gre(t){try{localStorage.setItem(AD,t?"1":"0")}catch{}}function jre(){let t=performance.memory;return t?Math.round(t.usedJSHeapSize/1024/1024):null}function Ure(t,i){let e=window.devicePixelRatio||1,n=i0*e,o=of*e;(t.width!==n||t.height!==o)&&(t.width=n,t.height=o);let r=t.getContext("2d");if(!r||(r.setTransform(e,0,0,e,0,0),r.clearRect(0,0,i0,of),i.length<2))return;let a=Math.max(60,...i),s=i0/(i.length-1);r.beginPath();for(let c=0;c<i.length;c+=1){let u=c*s,h=of-i[c]/a*of;c===0?r.moveTo(u,h):r.lineTo(u,h)}r.strokeStyle=getComputedStyle(t).color,r.lineWidth=1,r.stroke()}var $re="debug-fps",LD=(()=>{class t{visible=W(this.resolveInitial());resolveInitial(){let n=new URLSearchParams(window.location.search).get($re);return n!==null&&n!=="0"&&n!=="false"?!0:n==="0"||n==="false"?!1:ef.graph.perfHud}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Xo={emptyNoSelection:{title:"No node selected",desc:"Select a node to inspect it."},emptyNotFound:{title:"Node not found",descSuffix:" This node is no longer in the scan."},header:{invalidFrontmatter:"invalid frontmatter",invalidFrontmatterTooltip:"The YAML frontmatter could not be parsed, so name, description and other metadata are unavailable. Check the Findings section for the parser error.",tagFilterAriaLabel:t=>`Select every node tagged ${t} on the map`},sections:{annotations:"Annotations",connections:"Connections",findings:"Findings",metadata:"Metadata",plugins:"Plugin contributions",body:"Body"},body:{loading:"Loading body\u2026"},findingHintLabel:"Hint:",actionErrorDismissAriaLabel:"Dismiss",audit:{headerEmpty:"never bumped",fields:{lastBumpedAt:"Last bumped",lastBumpedBy:"by",createdAt:"Created",createdBy:"by"}}};var BD={cardHeader:"Annotations",emptyOverlay:"No sidecar (.sm) file present for this node.",emptyAnnotations:"Sidecar present but no annotations are declared yet.",sections:{provenance:"Authors",repository:"Repository",docs:"Docs"},fields:{authors:"Authors",license:"License",source:"Source",sourceVersion:"Source version",docsUrl:"Docs URL"}};function Fa(t){if(typeof t!="string"||t.length===0)return null;try{let i=new URL(t);return i.protocol==="http:"||i.protocol==="https:"?t:null}catch{return null}}function Wre(t,i){if(t&1&&(Q(0,"p",1),b(1),ie()),t&2){let e=d(2);l(),x(e.texts.emptyOverlay)}}function Kre(t,i){if(t&1&&(Q(0,"p",2),b(1),ie()),t&2){let e=d(2);l(),x(e.texts.emptyAnnotations)}}function Yre(t,i){if(t&1&&P(0,Wre,2,1,"p",1)(1,Kre,2,1,"p",2),t&2){let e,n=d();R((e=n.overlay())!=null&&e.present?1:0)}}function Xre(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",5),Q(2,"span"),b(3),ie()()),t&2){let e=i.$implicit;l(3),x(e)}}function Zre(t,i){if(t&1&&ue(0,Xre,4,1,"span",4,Xe),t&2){d();let e=Ee(0);pe(e.authors)}}function Qre(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",6),Q(2,"span"),b(3),ie()()),t&2){d();let e=Ee(0);l(3),x(e.license)}}function Jre(t,i){if(t&1&&(Yt(0),Q(1,"dt"),b(2),ie(),Q(3,"dd",3),P(4,Zre,2,0),P(5,Qre,4,1,"span",4),ie()),t&2){let e=d(2),n=xt(e.provenance());l(2),x(e.texts.sections.provenance),l(2),R(n.authors.length?4:-1),l(),R(n.license!==null?5:-1)}}function eae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",8),Q(2,"a",9),b(3),ie()()),t&2){d();let e=Ee(0);l(2),Ze("href",e.source,tr),l(),x(e.source)}}function tae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",10),Q(2,"code"),b(3),ie()()),t&2){d();let e=Ee(0);l(3),x(e.sourceVersion)}}function nae(t,i){if(t&1&&(Yt(0),Q(1,"dt"),b(2),ie(),Q(3,"dd",7),P(4,eae,4,2,"span",4),P(5,tae,4,1,"span",4),ie()),t&2){let e=d(2),n=xt(e.repository());l(2),x(e.texts.sections.repository),l(2),R(n.source!==null?4:-1),l(),R(n.sourceVersion!==null?5:-1)}}function iae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",12),Q(2,"a",9),b(3),ie()()),t&2){d();let e=Ee(0);l(2),Ze("href",e.docsUrl,tr),l(),x(e.docsUrl)}}function oae(t,i){if(t&1&&(Yt(0),Q(1,"dt"),b(2),ie(),Q(3,"dd",11),P(4,iae,4,2,"span",4),ie()),t&2){let e=d(2),n=xt(e.docs());l(2),x(e.texts.sections.docs),l(2),R(n.docsUrl!==null?4:-1)}}function rae(t,i){if(t&1&&(Q(0,"dl",0),P(1,Jre,6,4),P(2,nae,6,4),P(3,oae,5,3),ie()),t&2){let e=d();l(),R(e.hasProvenance()?1:-1),l(),R(e.hasRepository()?2:-1),l(),R(e.hasDocs()?3:-1)}}var zD=(()=>{class t{overlay=V(void 0);texts=BD;annotations=k(()=>{let e=this.overlay();return!e||!e.present?null:e.annotations??null});hasAnnotations=k(()=>{let e=this.annotations();return e!==null&&Object.keys(e).length>0});hasAnyContent=k(()=>this.hasProvenance()||this.hasRepository()||this.hasDocs());provenance=k(()=>{let e=this.annotations()??{};return{authors:aae(e.authors),license:VD(e.license)}});hasProvenance=k(()=>o0(this.provenance()));repository=k(()=>{let e=this.annotations()??{};return{source:Fa(e.source),sourceVersion:VD(e.sourceVersion)}});hasRepository=k(()=>o0(this.repository()));docs=k(()=>{let e=this.annotations()??{};return{docsUrl:Fa(e.docsUrl)}});hasDocs=k(()=>o0(this.docs()));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-annotations-panel"]],inputs:{overlay:[1,"overlay"]},decls:2,vars:1,consts:[[1,"ann-panel__rows","sm-block__kv"],["data-testid","annotations-panel-empty-overlay",1,"ann-panel__empty"],["data-testid","annotations-panel-empty-annotations",1,"ann-panel__empty"],["data-testid","annotations-section-provenance",1,"sm-block__inline"],[1,"sm-block__meta"],["aria-hidden","true",1,"pi","pi-user"],["aria-hidden","true",1,"pi","pi-shield"],["data-testid","annotations-section-repository",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-link"],["target","_blank","rel","noopener noreferrer",3,"href"],["aria-hidden","true",1,"pi","pi-tag"],["data-testid","annotations-section-docs",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-external-link"]],template:function(n,o){n&1&&P(0,Yre,2,1)(1,rae,4,3,"dl",0),n&2&&R(o.hasAnyContent()?1:0)},dependencies:[Be],styles:["[_nghost-%COMP%]{display:block}.ann-panel__empty[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-style:italic;font-size:.85rem;margin:0}.ann-panel__rows[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0})}return t})();function VD(t){return typeof t=="string"&&t.length>0?t:null}function aae(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"&&i.length>0):[]}function o0(t){for(let i of Object.values(t))if(i!=null){if(Array.isArray(i)){if(i.length>0)return!0;continue}if(typeof i=="string"){if(i.length>0)return!0;continue}return!0}return!1}var HD={outgoingHeader:"Outgoing",incomingHeader:"Incoming",loading:"Loading links\u2026",error:"Failed to load links.",confidence:{high:"high",medium:"medium",low:"low"},confidenceTooltip:t=>`confidence: ${t}`,issueOnTargetTooltip:"Target has an issue: ",issueOnSourceTooltip:"Source has an issue: ",externalRefsHeader:"External"};var GD=(t,i)=>i.source+"|"+i.target+"|"+i.kind+"|"+((i.trigger==null?null:i.trigger.normalizedTrigger)??""),sae=(t,i)=>i.url+"|"+(i.line??-1);function lae(t,i){if(t&1&&(f(0,"p",1),b(1),m()),t&2){let e=d(2);l(),x(e.texts.loading)}}function cae(t,i){if(t&1&&(f(0,"p",2),b(1),m()),t&2){let e=d(2);l(),x(e.texts.error)}}function dae(t,i){if(t&1){let e=Y();f(0,"li",11)(1,"button",12),L("click",function(){let o=w(e).$implicit,r=d(4);return T(r.onOpen(o.source))}),b(2),m(),f(3,"span",13),b(4),m(),f(5,"span",14),b(6),m()()}if(t&2){let e=i.$implicit,n=d(4);O("data-testid","linked-nodes-incoming-row-"+e.source),l(),O("data-testid","linked-nodes-incoming-link-"+e.source),l(),x(e.source),l(),Oe("color",n.confidenceColor(e.confidence))("border-color",n.confidenceColor(e.confidence)),_("pTooltip",n.confidenceTooltip(e.confidence)),l(),x(n.confidenceValue(e.confidence)),l(),O("data-kind",e.kind),l(),x(e.kind)}}function uae(t,i){if(t&1&&(f(0,"section",3)(1,"h4",6),F(2,"sm-icon",7),f(3,"span",8),b(4),m(),f(5,"span",9),b(6),m()(),f(7,"ul",10),ue(8,dae,7,11,"li",11,GD),m()()),t&2){let e=d(3);l(4),x(e.incoming().length),l(2),x(e.texts.incomingHeader),l(2),pe(e.incoming())}}function pae(t,i){if(t&1&&(f(0,"span",17),b(1),m()),t&2){let e=d().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),x(e.target)}}function hae(t,i){if(t&1){let e=Y();f(0,"button",12),L("click",function(){w(e);let o=d().$implicit,r=d(4);return T(r.onOpen(o.resolvedTarget??o.target))}),b(1),m()}if(t&2){let e=d().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),x(e.target)}}function fae(t,i){if(t&1&&(f(0,"span",19),b(1),m()),t&2){let e=i,n=d().$implicit;_("pTooltip",e.message),O("data-severity",e.severity)("data-testid","linked-nodes-outgoing-issue-"+n.target),l(),x(e.analyzerId)}}function mae(t,i){if(t&1&&(f(0,"li",11),P(1,pae,2,2,"span",17)(2,hae,2,2,"button",18),f(3,"span",13),b(4),m(),f(5,"span",14),b(6),m(),P(7,fae,2,4,"span",19),m()),t&2){let e,n=i.$implicit,o=d(4);O("data-testid","linked-nodes-outgoing-row-"+n.target),l(),R(o.outgoingBroken(n)?1:2),l(2),Oe("color",o.confidenceColor(n.confidence))("border-color",o.confidenceColor(n.confidence)),_("pTooltip",o.confidenceTooltip(n.confidence)),l(),x(o.confidenceValue(n.confidence)),l(),O("data-kind",n.kind),l(),x(n.kind),l(),R((e=o.issueForOutgoing(n))?7:-1,e)}}function _ae(t,i){if(t&1&&(f(0,"section",4)(1,"h4",6),F(2,"sm-icon",15),f(3,"span",16),b(4),m(),f(5,"span",9),b(6),m()(),f(7,"ul",10),ue(8,mae,8,11,"li",11,GD),m()()),t&2){let e=d(3);l(4),x(e.outgoing().length),l(2),x(e.texts.outgoingHeader),l(2),pe(e.outgoing())}}function gae(t,i){if(t&1&&(f(0,"li",23)(1,"a",24),b(2),m()()),t&2){let e=i.$implicit;O("data-testid","linked-nodes-external-ref-"+e.url),l(),_("href",e.url,tr)("pTooltip",e.url),l(),x(e.url)}}function vae(t,i){if(t&1&&(f(0,"section",5)(1,"h4",6),F(2,"sm-icon",20),f(3,"span",21),b(4),m(),f(5,"span",9),b(6),m()(),f(7,"ul",22),ue(8,gae,3,4,"li",23,sae),m()()),t&2){let e=d(3);l(4),x(e.externalRefs().length),l(2),x(e.texts.externalRefsHeader),l(2),pe(e.externalRefs())}}function bae(t,i){if(t&1&&(P(0,uae,10,2,"section",3),P(1,_ae,10,2,"section",4),P(2,vae,10,2,"section",5)),t&2){let e=d(2);R(e.incoming().length>0?0:-1),l(),R(e.outgoing().length>0?1:-1),l(),R(e.externalRefs().length>0?2:-1)}}function yae(t,i){if(t&1&&(f(0,"div",0),P(1,lae,2,1,"p",1)(2,cae,2,1,"p",2)(3,bae,3,3),m()),t&2){let e,n=d();l(),R((e=n.state())==="loading"?1:e==="error"?2:e==="ready"?3:-1)}}var jD=(()=>{class t{dataSource=p(co);wsEvents=p(os);destroyRef=p(vt);texts=HD;path=V(null);openPath=et();state=W("idle");outgoingRaw=W([]);incomingRaw=W([]);outgoing=k(()=>this.outgoingRaw().filter(e=>!qD(e)));incoming=k(()=>this.incomingRaw().filter(e=>!qD(e)));issues=W([]);externalRefsRaw=W([]);externalRefs=k(()=>this.externalRefsRaw().filter(e=>Fa(e.url)!==null));fetchToken=0;hasResults=k(()=>this.state()==="ready"&&(this.outgoing().length>0||this.incoming().length>0));constructor(){this.wsEvents.scanCompleted$.pipe(Un(this.destroyRef)).subscribe(()=>{let e=this.path();e&&this.fetch(e)}),de(()=>{let e=this.path();if(!e){this.fetchToken++,this.state.set("idle"),this.outgoingRaw.set([]),this.incomingRaw.set([]);return}this.fetch(e)})}onOpen(e){this.openPath.emit(e)}confidenceTooltip(e){return this.texts.confidenceTooltip(this.texts.confidence[xb(e)])}confidenceValue(e){return e.toFixed(2)}confidenceColor(e){let n=Math.max(0,Math.min(1,e));return`hsl(${Math.round(n*120)}, 60%, 50%)`}outgoingBroken(e){return this.issueForOutgoing(e)?.severity==="error"}issueForOutgoing(e){let n=this.path();if(!n)return null;let o=[e.target,e.resolvedTarget].filter(r=>typeof r=="string");return this.issues().find(r=>{if(!r.nodeIds.includes(n))return!1;let a=r.data?.target;return typeof a!="string"?!1:o.includes(a)})??null}async fetch(e){let n=++this.fetchToken;this.state.set("loading");try{let[o,r,a]=await Promise.allSettled([this.dataSource.listLinks({from:e}),this.dataSource.listLinks({to:e}),this.dataSource.getNode(e)]);if(n!==this.fetchToken)return;if(o.status!=="fulfilled"||r.status!=="fulfilled"){this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}let s=o.value.items,c=r.value.items,u=Cae(e,s,c),h;try{let g=await this.dataSource.listIssues({nodes:u});if(n!==this.fetchToken)return;h=g.items}catch{if(n!==this.fetchToken)return;this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}this.outgoingRaw.set(s),this.incomingRaw.set(c),this.issues.set(h),this.externalRefsRaw.set(a.status==="fulfilled"?a.value?.item?.externalRefs??[]:[]),this.state.set("ready")}catch{if(n!==this.fetchToken)return;this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error")}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-linked-nodes-panel"]],inputs:{path:[1,"path"]},outputs:{openPath:"openPath"},decls:1,vars:1,consts:[["data-testid","linked-nodes-panel",1,"linked-nodes-panel"],["data-testid","linked-nodes-loading",1,"linked-nodes-panel__status"],["data-testid","linked-nodes-error",1,"linked-nodes-panel__status","linked-nodes-panel__status--warn"],["data-testid","linked-nodes-incoming",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-outgoing",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-external-refs",1,"linked-nodes-panel__section"],[1,"linked-nodes-panel__section-title"],["icon","pi-download",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-incoming-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__section-label"],[1,"linked-nodes-panel__table"],[1,"linked-nodes-panel__row"],["type","button",1,"linked-nodes-panel__path",3,"click"],[1,"linked-nodes-panel__chip",3,"pTooltip"],[1,"linked-nodes-panel__chip","linked-nodes-panel__chip--kind"],["icon","pi-upload",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-outgoing-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__path","linked-nodes-panel__path--broken"],["type","button",1,"linked-nodes-panel__path"],[1,"linked-nodes-panel__chip","linked-nodes-panel__chip--issue",3,"pTooltip"],["icon","pi-link",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-external-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__table","linked-nodes-panel__table--external"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--external-ref"],["tooltipPosition","top","target","_blank","rel","noopener noreferrer",1,"linked-nodes-panel__external-ref-url",3,"href","pTooltip"]],template:function(n,o){n&1&&P(0,yae,4,1,"div",0),n&2&&R(o.path()?0:-1)},dependencies:[Be,Ue,yv],styles:["[_nghost-%COMP%]{display:block}.linked-nodes-panel__status[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--p-text-muted-color);font-style:italic}.linked-nodes-panel__status--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn);font-style:normal}.linked-nodes-panel__section[_ngcontent-%COMP%] + .linked-nodes-panel__section[_ngcontent-%COMP%]{margin-top:1rem}.linked-nodes-panel__section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;margin:0 0 .4rem;font-size:.8rem}.linked-nodes-panel__section-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.85rem;color:var(--p-text-color)}.linked-nodes-panel__section-count[_ngcontent-%COMP%]{font-weight:700;font-size:.9rem;line-height:1;color:var(--p-text-color)}.linked-nodes-panel__section-label[_ngcontent-%COMP%]{font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__table[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.linked-nodes-panel__row[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;gap:.4rem;padding:.4rem .25rem;min-width:0}.linked-nodes-panel__row[_ngcontent-%COMP%] + .linked-nodes-panel__row[_ngcontent-%COMP%]{border-top:1px solid var(--p-content-border-color)}.linked-nodes-panel__path[_ngcontent-%COMP%]{margin:0;padding:0;border:none;background:none;font:inherit;font-size:.8rem;font-weight:400;text-align:left;line-height:1.35;min-width:0;overflow-wrap:anywhere;color:var(--p-primary-color);cursor:pointer}button.linked-nodes-panel__path[_ngcontent-%COMP%]:hover, button.linked-nodes-panel__path[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.linked-nodes-panel__path--broken[_ngcontent-%COMP%]{color:var(--p-text-color);cursor:default}.linked-nodes-panel__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:.02rem .4rem;border:1px solid var(--p-content-border-color);border-radius:999px;font-size:.72rem;line-height:1.5;color:var(--p-text-muted-color);white-space:nowrap}.linked-nodes-panel__chip--kind[_ngcontent-%COMP%]{border-color:var(--sm-edge-neutral);color:var(--sm-edge-neutral)}.linked-nodes-panel__chip--kind[data-kind=invokes][_ngcontent-%COMP%]{border-color:var(--sm-edge-invokes);color:var(--sm-edge-invokes)}.linked-nodes-panel__chip--kind[data-kind=references][_ngcontent-%COMP%]{border-color:var(--sm-edge-references);color:var(--sm-edge-references)}.linked-nodes-panel__chip--kind[data-kind=points][_ngcontent-%COMP%]{border-color:var(--sm-edge-points);color:var(--sm-edge-points)}.linked-nodes-panel__chip--kind[data-kind=mentions][_ngcontent-%COMP%]{border-color:var(--sm-edge-mentions);color:var(--sm-edge-mentions)}.linked-nodes-panel__chip--issue[data-severity=error][_ngcontent-%COMP%]{border-color:var(--sm-severity-error);color:var(--sm-severity-error)}.linked-nodes-panel__chip--issue[data-severity=warn][_ngcontent-%COMP%]{border-color:var(--sm-severity-warn);color:var(--sm-severity-warn)}.linked-nodes-panel__chip--issue[data-severity=info][_ngcontent-%COMP%]{border-color:var(--sm-severity-info);color:var(--sm-severity-info)}.linked-nodes-panel__row--external-ref[_ngcontent-%COMP%]{font-size:.85rem}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--p-primary-color);text-decoration:none}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})}return t})();function Cae(t,i,e){let n=new Set([t]);for(let o of i)o.resolvedTarget&&n.add(o.resolvedTarget),o.target&&n.add(o.target);for(let o of e)o.source&&n.add(o.source);return[...n]}function qD(t){return!!(t.source===t.target||t.resolvedTarget&&t.source===t.resolvedTarget)}var UD={sections:{definition:"Definition",initialPrompt:"Initial prompt"},fields:{tools:"Tools",model:"Model",skills:"Skills",disallowedTools:"Disallowed",permissionMode:"Permission",maxTurns:"Max turns",memory:"Memory",background:"Background",effort:"Effort",isolation:"Isolation",color:"Color",mcpServers:"MCP servers",hooks:"Hooks"},skillBaseFields:{whenToUse:"When to use",argumentHint:"Argument hint",arguments:"Arguments",allowedTools:"Allowed tools",disallowedTools:"Disallowed tools",model:"Model",effort:"Effort",context:"Context",agent:"Agent",shell:"Shell",paths:"Paths",disableModelInvocation:"Model invocation",userInvocable:"User invocable"},unknownFieldTooltip:"Unknown field, not part of the documented frontmatter for this provider.",skillUnresolvedTooltip:"Skill not found in this scan."};var $D=(t,i)=>i.key,xae=(t,i)=>i.name,wae=(t,i)=>i.event;function Tae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.model),l(3),x(i)}}function Sae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.effort),l(3),x(i)}}function kae(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function Iae(t,i){if(t&1&&(f(0,"code"),b(1),m(),P(2,kae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),R(n!==o-1?2:-1)}}function Eae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,Iae,3,2,null,null,Xe),m()),t&2){let e=d(5);l(),x(e.texts.fields.tools),l(2),pe(e.tools())}}function Mae(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function Dae(t,i){if(t&1&&(f(0,"span",8),F(1,"i",9),f(2,"code"),b(3),m()(),P(4,Mae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(3),x(e),l(),R(n!==o-1?4:-1)}}function Pae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,Dae,5,2,null,null,Xe),m()),t&2){let e=d(5);l(),x(e.texts.fields.disallowedTools),l(2),pe(e.disallowedTools())}}function Rae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.permissionMode),l(3),x(i)}}function Oae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",10),F(3,"span",11),f(4,"code"),b(5),m()()),t&2){let e=i,n=d(5);l(),x(n.texts.fields.color),l(2),Oe("background",e),l(2),x(e)}}function Fae(t,i){if(t&1){let e=Y();f(0,"a",14),L("click",function(){let o=w(e),r=d(7);return T(r.openSkill(o))})("keydown.enter",function(){let o=w(e),r=d(7);return T(r.openSkill(o))})("keydown.space",function(o){let r=w(e);return d(7).openSkill(r),T(o.preventDefault())}),F(1,"i",15),b(2),m()}if(t&2){let e=d().$implicit;l(2),Se(" ",e," ")}}function Nae(t,i){if(t&1&&(f(0,"span",13),b(1),m()),t&2){let e=d().$implicit,n=d(6);_("pTooltip",n.texts.skillUnresolvedTooltip),l(),x(e)}}function Aae(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function Lae(t,i){if(t&1&&(P(0,Fae,3,1,"a",12)(1,Nae,2,2,"span",13),P(2,Aae,2,0,"span",7)),t&2){let e,n=i.$implicit,o=i.$index,r=i.$count,a=d(6);R((e=a.skillPath(n))?0:1,e),l(2),R(o!==r-1?2:-1)}}function Bae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,Lae,3,2,null,null,Xe),m()),t&2){let e=d(5);l(),x(e.texts.fields.skills),l(2),pe(e.skills())}}function Vae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.maxTurns),l(3),x(e.maxTurns())}}function zae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.memory),l(3),x(i)}}function Hae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.background),l(3),x(e.background())}}function qae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){let e=d(5);l(),x(e.texts.fields.isolation),l(3),x(i)}}function Gae(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function jae(t,i){if(t&1&&(f(0,"code",16),b(1),m(),P(2,Gae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;_("pTooltip",e.command??""),l(),x(e.name),l(),R(n!==o-1?2:-1)}}function Uae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,jae,3,3,null,null,xae),m()),t&2){let e=d(5);l(),x(e.texts.fields.mcpServers),l(2),pe(e.mcpServers())}}function $ae(t,i){if(t&1&&(f(0,"span",18),b(1,"\u2192"),m(),f(2,"code"),b(3),m()),t&2){let e=d().$implicit;l(3),x(e.keys[0])}}function Wae(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function Kae(t,i){if(t&1&&(f(0,"span",17)(1,"code"),b(2),m(),P(3,$ae,4,1),m(),P(4,Wae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(2),x(e.event),l(),R(e.keys.length?3:-1),l(),R(n!==o-1?4:-1)}}function Yae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,Kae,5,3,null,null,wae),m()),t&2){let e=d(5);l(),x(e.texts.fields.hooks),l(2),pe(e.hooks())}}function Xae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",19),F(3,"i",20),f(4,"code"),b(5),m()()),t&2){let e=i.$implicit,n=d(5);l(),x(e.key),l(2),_("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),x(e.value)}}function Zae(t,i){if(t&1&&(f(0,"dl",5),P(1,Tae,5,2),P(2,Sae,5,2),P(3,Eae,5,1),P(4,Pae,5,1),P(5,Rae,5,2),P(6,Oae,6,4),P(7,Bae,5,1),P(8,Vae,5,2),P(9,zae,5,2),P(10,Hae,5,2),P(11,qae,5,2),P(12,Uae,5,1),P(13,Yae,5,1),ue(14,Xae,6,4,null,null,$D),m()),t&2){let e,n,o,r,a,s,c=d(4);l(),R((e=c.model())?1:-1,e),l(),R((n=c.effort())?2:-1,n),l(),R(c.tools().length?3:-1),l(),R(c.disallowedTools().length?4:-1),l(),R((o=c.permissionMode())?5:-1,o),l(),R((r=c.color())?6:-1,r),l(),R(c.skills().length?7:-1),l(),R(c.maxTurns()!==null?8:-1),l(),R((a=c.memory())?9:-1,a),l(),R(c.background()!==null?10:-1),l(),R((s=c.isolation())?11:-1,s),l(),R(c.mcpServers().length?12:-1),l(),R(c.hooks().length?13:-1),l(),pe(c.extraFields())}}function Qae(t,i){if(t&1&&P(0,Zae,16,13,"dl",5),t&2){let e=d(3);R(e.hasBehavior()||e.hasCapabilities()||e.extraFields().length?0:-1)}}function Jae(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.model),l(3),x(e.model)}}function ese(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.effort),l(3),x(e.effort)}}function tse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd"),b(3),m()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.whenToUse),l(2),x(e.when_to_use)}}function nse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.argumentHint),l(3),x(e.argumentHint)}}function ise(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function ose(t,i){if(t&1&&(f(0,"code"),b(1),m(),P(2,ise,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),R(n!==o-1?2:-1)}}function rse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,ose,3,2,null,null,Xe),m()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.arguments),l(2),pe(e.arguments)}}function ase(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function sse(t,i){if(t&1&&(f(0,"code"),b(1),m(),P(2,ase,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),R(n!==o-1?2:-1)}}function lse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,sse,3,2,null,null,Xe),m()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.allowedTools),l(2),pe(e.allowedTools)}}function cse(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function dse(t,i){if(t&1&&(f(0,"span",8),F(1,"i",9),f(2,"code"),b(3),m()(),P(4,cse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(3),x(e),l(),R(n!==o-1?4:-1)}}function use(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,dse,5,2,null,null,Xe),m()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.disallowedTools),l(2),pe(e.disallowedTools)}}function pse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.context),l(3),x(e.context)}}function hse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.agent),l(3),x(e.agent)}}function fse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.shell),l(3),x(e.shell)}}function mse(t,i){t&1&&(f(0,"span",7),b(1,"\xB7"),m())}function _se(t,i){if(t&1&&(f(0,"code"),b(1),m(),P(2,mse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),R(n!==o-1?2:-1)}}function gse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",6),ue(3,_se,3,2,null,null,Xe),m()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.paths),l(2),pe(e.paths)}}function vse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4,"disabled"),m()()),t&2){let e=d(5);l(),x(e.texts.skillBaseFields.disableModelInvocation)}}function bse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd")(3,"code"),b(4),m()()),t&2){d();let e=Ee(0),n=d(4);l(),x(n.texts.skillBaseFields.userInvocable),l(3),x(e.userInvocable)}}function yse(t,i){if(t&1&&(f(0,"dt"),b(1),m(),f(2,"dd",19),F(3,"i",20),f(4,"code"),b(5),m()()),t&2){let e=i.$implicit,n=d(5);l(),x(e.key),l(2),_("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),x(e.value)}}function Cse(t,i){if(t&1&&(Yt(0),f(1,"dl",21),P(2,Jae,5,2),P(3,ese,5,2),P(4,tse,4,2),P(5,nse,5,2),P(6,rse,5,1),P(7,lse,5,1),P(8,use,5,1),P(9,pse,5,2),P(10,hse,5,2),P(11,fse,5,2),P(12,gse,5,1),P(13,vse,5,1),P(14,bse,5,2),ue(15,yse,6,4,null,null,$D),m()),t&2){let e=d(4),n=xt(e.skillBase());l(2),R(n.model!==null?2:-1),l(),R(n.effort!==null?3:-1),l(),R(n.when_to_use!==null?4:-1),l(),R(n.argumentHint!==null?5:-1),l(),R(n.arguments.length?6:-1),l(),R(n.allowedTools.length?7:-1),l(),R(n.disallowedTools.length?8:-1),l(),R(n.context!==null?9:-1),l(),R(n.agent!==null?10:-1),l(),R(n.shell!==null?11:-1),l(),R(n.paths.length?12:-1),l(),R(n.disableModelInvocation?13:-1),l(),R(n.userInvocable!==null?14:-1),l(),pe(e.extraFields())}}function xse(t,i){if(t&1&&P(0,Cse,17,14,"dl",21),t&2){let e=d(3);R(e.hasCapabilities()||e.extraFields().length?0:-1)}}function wse(t,i){if(t&1&&(f(0,"p",22),b(1),m(),F(2,"blockquote",23)),t&2){let e=d(3);l(),x(e.texts.sections.initialPrompt),l(),_("innerHTML",e.initialPromptHtml(),yi)}}function Tse(t,i){if(t&1&&(P(0,Qae,1,1)(1,xse,1,1),P(2,wse,3,2)),t&2){let e=d(2);R(e.isAgent()?0:e.isSkillOrCommand()?1:-1),l(2),R(e.hasInitialPrompt()?2:-1)}}function Sse(t,i){if(t&1){let e=Y();f(0,"div",0)(1,"section",1)(2,"button",2),L("click",function(){w(e);let o=d();return T(o.toggle.emit())}),f(3,"span",3),b(4),m(),F(5,"i",4),m(),P(6,Tse,3,2),m()()}if(t&2){let e=d();l(2),O("aria-expanded",e.expanded()),l(2),x(e.texts.sections.definition),l(),ae("pi-chevron-right",!e.expanded())("pi-chevron-down",e.expanded()),l(),R(e.expanded()?6:-1)}}var kse=new Set(["name","description","metadata","model","effort","permissionMode","maxTurns","memory","background","isolation","color","tools","disallowedTools","skills","mcpServers","hooks","initialPrompt"]),Ise=new Set(["name","description","metadata","when_to_use","argument-hint","arguments","disable-model-invocation","user-invocable","allowed-tools","disallowed-tools","model","effort","context","agent","hooks","paths","shell"]),WD=(()=>{class t{frontmatter=V.required();kind=V.required();provider=V(void 0);skillPathByName=V(null);onSkillClick=V(null);expanded=V(!0);toggle=et();texts=UD;markdown=p(uo);hasVendorSurface=k(()=>{let e=this.kind();return e==="agent"||e==="skill"||e==="command"});isAgent=k(()=>this.kind()==="agent");isSkillOrCommand=k(()=>{let e=this.kind();return e==="skill"||e==="command"});tools=k(()=>af(this.fm().tools));model=k(()=>$t(this.fm().model));skills=k(()=>af(this.fm().skills));disallowedTools=k(()=>af(this.fm().disallowedTools));initialPrompt=k(()=>$t(this.fm().initialPrompt));permissionMode=k(()=>$t(this.fm().permissionMode));maxTurns=k(()=>Ese(this.fm().maxTurns));memory=k(()=>$t(this.fm().memory));background=k(()=>typeof this.fm().background=="boolean"?this.fm().background:null);effort=k(()=>$t(this.fm().effort));isolation=k(()=>$t(this.fm().isolation));color=k(()=>nf(this.fm().color));mcpServers=k(()=>{let e=this.fm().mcpServers;return Array.isArray(e)?e.filter(n=>typeof n=="object"&&n!==null).map((n,o)=>{let r=n.args,a=Array.isArray(r)?r.length:0;return{name:typeof n.name=="string"&&n.name.length>0?n.name:`mcpServer[${o}]`,command:typeof n.command=="string"?n.command:null,argsCount:a}}):[]});hooks=k(()=>{let e=this.fm().hooks;if(typeof e!="object"||e===null)return[];let n=[];for(let[o,r]of Object.entries(e)){let a=typeof r=="object"&&r!==null?Object.keys(r):[];n.push({event:o,keys:a})}return n});skillBase=k(()=>{let e=this.fm();return{when_to_use:$t(e.when_to_use),argumentHint:$t(e["argument-hint"]),arguments:rf(e.arguments),disableModelInvocation:e["disable-model-invocation"]===!0,userInvocable:typeof e["user-invocable"]=="boolean"?e["user-invocable"]:null,allowedTools:rf(e["allowed-tools"]),disallowedTools:rf(e["disallowed-tools"]),model:$t(e.model),effort:$t(e.effort),context:$t(e.context),agent:$t(e.agent),paths:rf(e.paths),shell:$t(e.shell)}});hasBehavior=k(()=>this.isAgent()?this.model()!==null||this.permissionMode()!==null||this.maxTurns()!==null||this.memory()!==null||this.background()!==null||this.effort()!==null||this.isolation()!==null||this.color()!==null:!1);hasCapabilities=k(()=>{if(this.isAgent())return this.tools().length>0||this.disallowedTools().length>0||this.skills().length>0||this.mcpServers().length>0||this.hooks().length>0;if(this.isSkillOrCommand()){let e=this.skillBase();return e.when_to_use!==null||e.argumentHint!==null||e.arguments.length>0||e.allowedTools.length>0||e.disallowedTools.length>0||e.model!==null||e.effort!==null||e.context!==null||e.agent!==null||e.shell!==null||e.paths.length>0||e.disableModelInvocation||e.userInvocable!==null}return!1});hasInitialPrompt=k(()=>this.isAgent()&&this.initialPrompt()!==null);initialPromptHtml=n0(()=>this.initialPrompt()??"",this.markdown);extraFields=k(()=>{let e=this.isAgent()?kse:this.isSkillOrCommand()?Ise:null;if(!e)return[];let n=this.fm(),o=[];for(let r of Object.keys(n)){if(e.has(r))continue;let a=n[r];if(a==null)continue;let s=typeof a=="string"?a:typeof a=="number"||typeof a=="boolean"?String(a):JSON.stringify(a);o.push({key:r,value:s})}return o});hasAnyContent=k(()=>this.hasVendorSurface()&&(this.hasBehavior()||this.hasCapabilities()||this.hasInitialPrompt()||this.extraFields().length>0));skillPath(e){return this.skillPathByName()?.get(e)??null}openSkill(e){let n=this.onSkillClick();n&&n(e)}fm(){return this.frontmatter()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-vendor-frontmatter"]],inputs:{frontmatter:[1,"frontmatter"],kind:[1,"kind"],provider:[1,"provider"],skillPathByName:[1,"skillPathByName"],onSkillClick:[1,"onSkillClick"],expanded:[1,"expanded"]},outputs:{toggle:"toggle"},decls:1,vars:1,consts:[["data-testid","vendor-frontmatter",1,"vfm"],["data-testid","vendor-frontmatter-definition",1,"sm-block","sm-block--collapsible"],["type","button","data-testid","vendor-frontmatter-toggle",1,"sm-block__row","sm-block__row--toggle",3,"click"],[1,"sm-block__title"],["aria-hidden","true",1,"pi","sm-block__chevron"],[1,"sm-block__kv"],[1,"vfm__inline"],["aria-hidden","true",1,"vfm__sep"],[1,"vfm__danger"],["aria-hidden","true",1,"pi","pi-ban"],[1,"vfm__color"],["aria-hidden","true",1,"vfm__swatch"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known"],[1,"sm-node-link",3,"pTooltip"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],[3,"pTooltip"],[1,"vfm__hook"],["aria-hidden","true",1,"vfm__sep-arrow"],[1,"vfm__unknown-dd"],["role","img",1,"pi","pi-exclamation-circle","vfm__unknown",3,"pTooltip"],["data-testid","vendor-frontmatter-skill-base",1,"sm-block__kv"],[1,"sm-block__sub"],["data-testid","vendor-frontmatter-initial-prompt-quote",1,"vfm__quote",3,"innerHTML"]],template:function(n,o){n&1&&P(0,Sse,7,7,"div",0),n&2&&R(o.hasAnyContent()?0:-1)},dependencies:[Be,Ue],styles:["[_nghost-%COMP%]{display:block}.vfm[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.85rem}.vfm__inline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;font-size:.83rem}.vfm__inline[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;color:var(--p-text-color);font-family:var(--sm-font-mono)}.vfm__sep[_ngcontent-%COMP%]{color:var(--sm-border);font-size:.75rem}.vfm__sep-arrow[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-size:.78rem;margin:0 .1rem}.vfm__danger[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;color:var(--sm-severity-error)}.vfm__danger[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.vfm__danger[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem}.vfm__hook[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}.vfm__hook[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}.vfm__unknown-dd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem}.vfm__unknown[_ngcontent-%COMP%]{font-size:.72rem;color:var(--p-text-muted-color);cursor:help;line-height:1}.vfm__color[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem}.vfm__swatch[_ngcontent-%COMP%]{width:.7rem;height:.7rem;border-radius:50%;flex:none;border:1px solid var(--sm-border)}.vfm__quote[_ngcontent-%COMP%]{margin:0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .vfm__quote>:first-child{margin-top:0}[_nghost-%COMP%] .vfm__quote>:last-child{margin-bottom:0}[_nghost-%COMP%] .vfm__quote code{background:var(--sm-bg-content);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.82rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .vfm__quote a{color:var(--p-primary-color);text-decoration:underline}"],changeDetection:0})}return t})();function $t(t){return typeof t=="string"&&t.length>0?t:null}function Ese(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function af(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"&&i.length>0):[]}function rf(t){return typeof t=="string"?t.length>0?[t]:[]:Array.isArray(t)?af(t):[]}var KD={header:"Plugin contributions",count:t=>`${t} namespace${t===1?"":"s"}`,unregisteredBadge:"unregistered",rootContribBadge:t=>`from plugin: ${t}`,empty:"No plugin contributions on this sidecar."};var ZD=(t,i)=>i.key,Mse=(t,i)=>i.pluginId;function Dse(t,i){if(t&1&&(f(0,"p",0),b(1),m()),t&2){let e=d();l(),x(e.texts.empty)}}function Pse(t,i){if(t&1&&(f(0,"span",5),b(1),m()),t&2){let e=d().$implicit,n=d(3);l(),x(n.texts.rootContribBadge(e.pluginId))}}function Rse(t,i){if(t&1&&(f(0,"div",3)(1,"code",4),b(2),m(),P(3,Pse,2,1,"span",5),f(4,"pre",6),b(5),m()()),t&2){let e=i.$implicit;l(2),x(e.key),l(),R(e.pluginId!==null?3:-1),l(2),x(e.value)}}function Ose(t,i){if(t&1&&(f(0,"div",1),ue(1,Rse,6,3,"div",3,ZD),m()),t&2){let e=d(2);l(),pe(e.rootContributions())}}function Fse(t,i){if(t&1&&(f(0,"span",10),b(1),m()),t&2){let e=d(4);l(),x(e.texts.unregisteredBadge)}}function Nse(t,i){if(t&1&&(f(0,"dt",12),b(1),m(),f(2,"dd")(3,"pre"),b(4),m()()),t&2){let e=i.$implicit;_("pTooltip",e.description??""),l(),x(e.key),l(3),x(e.value)}}function Ase(t,i){if(t&1&&(f(0,"section",7)(1,"h5",8)(2,"span",9),b(3),m(),P(4,Fse,2,1,"span",10),m(),f(5,"dl",11),ue(6,Nse,5,3,null,null,ZD),m()()),t&2){let e=i.$implicit;O("data-testid","plugin-contributions-ns-"+e.pluginId),l(3),x(e.pluginId),l(),R(e.registered?-1:4),l(2),pe(e.rows)}}function Lse(t,i){if(t&1&&(f(0,"div",2),ue(1,Ase,8,3,"section",7,Mse),m()),t&2){let e=d(2);l(),pe(e.namespaces())}}function Bse(t,i){if(t&1&&(P(0,Ose,3,0,"div",1),P(1,Lse,3,0,"div",2)),t&2){let e=d();R(e.rootContributions().length?0:-1),l(),R(e.namespaces().length?1:-1)}}var YD=new Set(["identity","annotations","settings","audit"]),QD=(()=>{class t{dataSource=p(co);sidecarRoot=V(void 0);texts=KD;catalog=W(null);constructor(){this.fetchCatalog()}namespaces=k(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog(),o=new Map;if(n)for(let a of n){if(a.location!=="namespaced")continue;let s=o.get(a.pluginId);s?s.push(a):o.set(a.pluginId,[a])}let r=[];for(let[a,s]of Object.entries(e)){if(YD.has(a)||this.isRegisteredRootKey(a))continue;let u=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:{value:s},h=o.has(a),g=o.get(a)??[],C=Object.entries(u).map(([M,S])=>({key:M,value:XD(S),description:h?Vse(g,M):null}));r.push({pluginId:a,registered:h,rows:C})}return r});rootContributions=k(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog();if(!n)return[];let o=new Map;for(let a of n)a.location==="root"&&o.set(a.key,a);let r=[];for(let[a,s]of Object.entries(e)){if(YD.has(a))continue;let c=o.get(a);c&&r.push({key:a,pluginId:c.pluginId,value:XD(s)})}return r});count=k(()=>this.namespaces().length+this.rootContributions().length);isEmpty=k(()=>this.count()===0);isRegisteredRootKey(e){let n=this.catalog();return n?n.some(o=>o.location==="root"&&o.key===e):!1}async fetchCatalog(){try{let e=await this.dataSource.getRegisteredAnnotations();this.catalog.set(e)}catch{this.catalog.set([])}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-plugin-contributions"]],inputs:{sidecarRoot:[1,"sidecarRoot"]},decls:2,vars:1,consts:[["data-testid","plugin-contributions-empty",1,"pcp__empty"],["data-testid","plugin-contributions-roots",1,"pcp__roots"],[1,"pcp__namespaces"],[1,"pcp__root-row"],[1,"pcp__root-key"],[1,"pcp__root-badge"],[1,"pcp__root-value"],[1,"pcp__ns"],[1,"pcp__ns-header"],[1,"pcp__ns-name"],["data-testid","plugin-contributions-unregistered-badge",1,"pcp__ns-badge"],[1,"pcp__kv"],[3,"pTooltip"]],template:function(n,o){n&1&&P(0,Dse,2,1,"p",0)(1,Bse,2,2),n&2&&R(o.isEmpty()?0:1)},dependencies:[Be,Ue],styles:["[_nghost-%COMP%]{display:block}.pcp__empty[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.pcp__roots[_ngcontent-%COMP%], .pcp__namespaces[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.pcp__root-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;font-size:.85rem}.pcp__root-key[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);font-weight:600}.pcp__root-badge[_ngcontent-%COMP%]{font-size:.7rem;color:var(--sm-text-muted);font-style:italic;background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm)}.pcp__root-value[_ngcontent-%COMP%]{flex:1 1 100%;margin:.2rem 0 0;padding:.45rem .6rem;background:var(--sm-bg-hover);border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.8rem;white-space:pre-wrap;word-break:break-word}.pcp__ns[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.pcp__ns[_ngcontent-%COMP%] + .pcp__ns[_ngcontent-%COMP%]{border-top:1px solid var(--sm-border);padding-top:.5rem}.pcp__ns-header[_ngcontent-%COMP%]{margin:0;display:inline-flex;align-items:center;gap:.5rem;font-size:.85rem;font-weight:600}.pcp__ns-name[_ngcontent-%COMP%]{font-family:var(--sm-font-mono)}.pcp__ns-badge[_ngcontent-%COMP%]{font-size:.65rem;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--sm-text-muted);background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm)}.pcp__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.85rem}.pcp__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-weight:500;font-family:var(--sm-font-mono);cursor:help}.pcp__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;word-break:break-word}.pcp__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:var(--sm-font-mono);font-size:.8rem;white-space:pre-wrap;word-break:break-word}"],changeDetection:0})}return t})();function XD(t){if(t===null)return"null";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);try{return JSON.stringify(t,null,2)}catch{return String(t)}}function Vse(t,i){for(let e of t)if(e.key===i){let n=e.schema.description;return typeof n=="string"&&n.length>0?n:null}return null}var zse=[[["","smSectionTitleExtra",""]],"*"],Hse=["[smSectionTitleExtra]","*"],sf=(()=>{class t{title=V.required();expanded=V.required();toggleTestid=V();toggleAriaLabel=V();toggleTooltip=V();toggle=et();static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-collapsible-section"]],hostAttrs:[1,"sm-block","sm-block--collapsible"],inputs:{title:[1,"title"],expanded:[1,"expanded"],toggleTestid:[1,"toggleTestid"],toggleAriaLabel:[1,"toggleAriaLabel"],toggleTooltip:[1,"toggleTooltip"]},outputs:{toggle:"toggle"},ngContentSelectors:Hse,decls:6,vars:9,consts:[["type","button",1,"sm-block__row","sm-block__row--toggle",3,"click","pTooltip"],[1,"sm-block__title"],["aria-hidden","true",1,"pi","sm-block__chevron"]],template:function(n,o){n&1&&(cn(zse),f(0,"button",0),L("click",function(){return o.toggle.emit()}),f(1,"span",1),b(2),Ge(3),m(),F(4,"i",2),m(),Ge(5,1)),n&2&&(_("pTooltip",o.toggleTooltip()??""),O("aria-expanded",o.expanded())("aria-label",o.toggleAriaLabel()??null)("data-testid",o.toggleTestid()??null),l(2),Se(" ",o.title()," "),l(2),ae("pi-chevron-right",!o.expanded())("pi-chevron-down",o.expanded()))},dependencies:[Be,Ue],encapsulation:2,changeDetection:0})}return t})();var qse=t=>({inputs:t}),Gse=(t,i)=>i.pluginId,jse=(t,i)=>i.qualifiedId;function Use(t,i){t&1&&le(0)}function $se(t,i){if(t&1&&(f(0,"div",3),D(1,Use,1,0,"ng-container",4),m()),t&2){let e=i.$implicit,n=d(3);O("data-testid","contribution-"+e.qualifiedId.replaceAll("/","-")),l(),_("ngComponentOutlet",n.rendererFor(e.slot))("ngComponentOutletInputs",Pe(3,qse,e.rendererInputs))}}function Wse(t,i){if(t&1&&(f(0,"div",2),ue(1,$se,2,5,"div",3,jse),m()),t&2){let e=d().$implicit;l(),pe(e.bricks)}}function Kse(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",1),L("toggle",function(){let o=w(e).$implicit,r=d();return T(r.toggle(o.pluginId))}),P(1,Wse,3,0,"div",2),m()}if(t&2){let e=i.$implicit,n=d();_("title",e.pluginId)("expanded",n.expanded(e.pluginId))("toggleTestid","inspector-plugin-section-toggle-"+e.pluginId),O("data-testid","inspector-plugin-section-"+e.pluginId),l(),R(n.expanded(e.pluginId)?1:-1)}}var JD="skill-map.ui.inspector.plugin-sections",r0=100,eP=(()=>{class t{node=V(null);registry=p(bv);collapseState=W(Yse());groups=k(()=>{let e=this.node();if(!e)return[];let n=(e.contributions??[]).filter(a=>wv(a.slot)&&Tv.has(a.slot));if(n.length===0)return[];let o=new Map;for(let a of n){let s=o.get(a.pluginId);s?s.push(a):o.set(a.pluginId,[a])}let r=[];for(let[a,s]of o){let c=r0,u=s.map(h=>{let g=`${h.pluginId}/${h.extensionId}/${h.contributionId}`,C=this.registry.get(g);return typeof C?.pluginOrder=="number"&&(c=C.pluginOrder),{c:h,qualifiedId:g,extensionOrder:C?.extensionOrder??r0,priority:C?.priority??r0,inputs:Sv(h,h.slot,e.path,C)}}).sort((h,g)=>h.extensionOrder!==g.extensionOrder?h.extensionOrder-g.extensionOrder:h.priority!==g.priority?h.priority-g.priority:h.qualifiedId<g.qualifiedId?-1:h.qualifiedId>g.qualifiedId?1:0);r.push({pluginId:a,pluginOrder:c,bricks:u.map(h=>({qualifiedId:h.qualifiedId,slot:h.c.slot,rendererInputs:h.inputs}))})}return r.sort((a,s)=>a.pluginOrder!==s.pluginOrder?a.pluginOrder-s.pluginOrder:a.pluginId<s.pluginId?-1:a.pluginId>s.pluginId?1:0),r});expanded(e){return this.collapseState()[e]??!1}toggle(e){this.collapseState.update(n=>Bt(me({},n),{[e]:!(n[e]??!1)})),Xse(this.collapseState())}rendererFor(e){return xv[e]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-plugin-sections"]],inputs:{node:[1,"node"]},decls:2,vars:0,consts:[[3,"title","expanded","toggleTestid"],[3,"toggle","title","expanded","toggleTestid"],[1,"ips__bricks"],[1,"ips__brick"],[4,"ngComponentOutlet","ngComponentOutletInputs"]],template:function(n,o){n&1&&ue(0,Kse,2,5,"sm-collapsible-section",0,Gse),n&2&&pe(o.groups())},dependencies:[x0,sf],styles:["[_nghost-%COMP%]{display:contents}.ips__bricks[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.ips__brick[_ngcontent-%COMP%]{display:block}"],changeDetection:0})}return t})();function Yse(){try{let t=localStorage.getItem(JD);if(!t)return{};let i=JSON.parse(t);return typeof i=="object"&&i!==null?i:{}}catch{return{}}}function Xse(t){try{localStorage.setItem(JD,JSON.stringify(t))}catch{}}var tP={header:"Debug",toggleAriaLabel:"Toggle debug panel",fields:{forPath:"for.path",bodyHashStored:"for.bodyHash (stored)",bodyHashLive:"node.bodyHash (live)",frontmatterHashStored:"for.frontmatterHash (stored)",frontmatterHashLive:"node.frontmatterHash (live)",resolvedProvider:"for.resolvedAs.provider",resolvedKind:"for.resolvedAs.kind",sidecarStatus:"sidecar.status"},diffMarker:"!=",absentMarker:"(absent)",notSetMarker:"(not set)",copiedLabel:"Copied",copyA11y:t=>`Copy ${t} to clipboard`};var Zse=(t,i,e)=>({key:"body-stored",label:t,value:i,drift:e}),Qse=(t,i,e)=>({key:"body-live",label:t,value:i,drift:e}),Jse=(t,i,e)=>({key:"fm-stored",label:t,value:i,drift:e}),ele=(t,i,e)=>({key:"fm-live",label:t,value:i,drift:e});function tle(t,i){t&1&&(f(0,"code"),b(1),m()),t&2&&(l(),x(i))}function nle(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function ile(t,i){t&1&&le(0)}function ole(t,i){if(t&1&&D(0,ile,1,0,"ng-container",11),t&2){let e=d(),n=_t(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",rr(2,Zse,e.texts.fields.bodyHashStored,i,e.bodyHashDrift()))}}function rle(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function ale(t,i){t&1&&le(0)}function sle(t,i){if(t&1&&D(0,ale,1,0,"ng-container",11),t&2){let e=d(),n=_t(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",rr(2,Qse,e.texts.fields.bodyHashLive,i,e.bodyHashDrift()))}}function lle(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function cle(t,i){t&1&&le(0)}function dle(t,i){if(t&1&&D(0,cle,1,0,"ng-container",11),t&2){let e=d(),n=_t(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",rr(2,Jse,e.texts.fields.frontmatterHashStored,i,e.frontmatterHashDrift()))}}function ule(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function ple(t,i){t&1&&le(0)}function hle(t,i){if(t&1&&D(0,ple,1,0,"ng-container",11),t&2){let e=d(),n=_t(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",rr(2,ele,e.texts.fields.frontmatterHashLive,i,e.frontmatterHashDrift()))}}function fle(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function mle(t,i){t&1&&(f(0,"code"),b(1),m()),t&2&&(l(),x(i))}function _le(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.notSetMarker)}}function gle(t,i){t&1&&(f(0,"code"),b(1),m()),t&2&&(l(),x(i))}function vle(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.notSetMarker)}}function ble(t,i){t&1&&(f(0,"code"),b(1),m()),t&2&&(l(),x(i))}function yle(t,i){if(t&1&&(f(0,"span",3),b(1),m()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function Cle(t,i){if(t&1&&(f(0,"span",13),b(1),m()),t&2){let e=d(2);l(),x(e.texts.copiedLabel)}}function xle(t,i){if(t&1){let e=Y();f(0,"button",12),L("click",function(){let o=w(e),r=o.key,a=o.value,s=d();return T(s.copyHash(r,a))}),f(1,"code"),b(2),m(),P(3,Cle,2,1,"span",13),m()}if(t&2){let e=i.key,n=i.label,o=i.value,r=i.drift,a=d();O("title",o)("aria-label",a.texts.copyA11y(n)),l(),ae("dbg__diff",r),l(),x(a.truncateHash(o)),l(),R(a.copiedKey()===e?3:-1)}}var nP=(()=>{class t{node=V.required();sidecarRoot=V(null);overlay=V(void 0);texts=tP;copiedKey=W(null);identityBlock=k(()=>{let e=this.sidecarRoot(),n={path:null,bodyHash:null,frontmatterHash:null,resolvedProvider:null,resolvedKind:null};if(!e)return n;let o=e.identity;if(typeof o!="object"||o===null)return n;let r=o,a=typeof r.resolvedAs=="object"&&r.resolvedAs!==null?r.resolvedAs:null;return{path:typeof r.path=="string"?r.path:null,bodyHash:typeof r.bodyHash=="string"?r.bodyHash:null,frontmatterHash:typeof r.frontmatterHash=="string"?r.frontmatterHash:null,resolvedProvider:a&&typeof a.provider=="string"?a.provider:null,resolvedKind:a&&typeof a.kind=="string"?a.kind:null}});bodyHashLive=k(()=>this.node().bodyHash??null);frontmatterHashLive=k(()=>this.node().frontmatterHash??null);bodyHashDrift=k(()=>{let e=this.identityBlock().bodyHash,n=this.bodyHashLive();return e!==null&&n!==null&&e!==n});frontmatterHashDrift=k(()=>{let e=this.identityBlock().frontmatterHash,n=this.frontmatterHashLive();return e!==null&&n!==null&&e!==n});sidecarStatusLiteral=k(()=>{let e=this.overlay();if(!e)return null;let n=e.status??null;return n===null?null:String(n)});async copyHash(e,n){try{await navigator.clipboard.writeText(n),this.copiedKey.set(e),setTimeout(()=>{this.copiedKey()===e&&this.copiedKey.set(null)},2e3)}catch{}}truncateHash(e){return e.length>20?`${e.slice(0,20)}...`:e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-debug-panel"]],inputs:{node:[1,"node"],sidecarRoot:[1,"sidecarRoot"],overlay:[1,"overlay"]},decls:43,vars:16,consts:[["hashCell",""],["data-testid","inspector-debug-panel",1,"sm-block__kv","dbg__kv"],["data-testid","dbg-for-path"],[1,"dbg__absent"],["data-testid","dbg-body-hash-stored"],["data-testid","dbg-body-hash-live"],["data-testid","dbg-fm-hash-stored"],["data-testid","dbg-fm-hash-live"],["data-testid","dbg-resolved-provider"],["data-testid","dbg-resolved-kind"],["data-testid","dbg-sidecar-status"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",1,"dbg__copy",3,"click"],["role","status",1,"dbg__copied"]],template:function(n,o){if(n&1&&(f(0,"dl",1)(1,"dt"),b(2),m(),f(3,"dd",2),P(4,tle,2,1,"code")(5,nle,2,1,"span",3),m(),f(6,"dt"),b(7),m(),f(8,"dd",4),P(9,ole,1,6,"ng-container")(10,rle,2,1,"span",3),m(),f(11,"dt"),b(12),m(),f(13,"dd",5),P(14,sle,1,6,"ng-container")(15,lle,2,1,"span",3),m(),f(16,"dt"),b(17),m(),f(18,"dd",6),P(19,dle,1,6,"ng-container")(20,ule,2,1,"span",3),m(),f(21,"dt"),b(22),m(),f(23,"dd",7),P(24,hle,1,6,"ng-container")(25,fle,2,1,"span",3),m(),f(26,"dt"),b(27),m(),f(28,"dd",8),P(29,mle,2,1,"code")(30,_le,2,1,"span",3),m(),f(31,"dt"),b(32),m(),f(33,"dd",9),P(34,gle,2,1,"code")(35,vle,2,1,"span",3),m(),f(36,"dt"),b(37),m(),f(38,"dd",10),P(39,ble,2,1,"code")(40,yle,2,1,"span",3),m()(),D(41,xle,4,6,"ng-template",null,0,je)),n&2){let r,a,s,c,u,h,g,C;l(2),x(o.texts.fields.forPath),l(2),R((r=o.identityBlock().path)?4:5,r),l(3),x(o.texts.fields.bodyHashStored),l(2),R((a=o.identityBlock().bodyHash)?9:10,a),l(3),x(o.texts.fields.bodyHashLive),l(2),R((s=o.bodyHashLive())?14:15,s),l(3),x(o.texts.fields.frontmatterHashStored),l(2),R((c=o.identityBlock().frontmatterHash)?19:20,c),l(3),x(o.texts.fields.frontmatterHashLive),l(2),R((u=o.frontmatterHashLive())?24:25,u),l(3),x(o.texts.fields.resolvedProvider),l(2),R((h=o.identityBlock().resolvedProvider)?29:30,h),l(3),x(o.texts.fields.resolvedKind),l(2),R((g=o.identityBlock().resolvedKind)?34:35,g),l(3),x(o.texts.fields.sidecarStatus),l(2),R((C=o.sidecarStatusLiteral())?39:40,C)}},dependencies:[un],styles:["[_nghost-%COMP%]{display:block}.dbg__kv[_ngcontent-%COMP%] .dbg__diff[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.dbg__kv[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{word-break:break-all}.dbg__absent[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--sm-text-muted);font-style:italic}.dbg__copy[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:.4rem;padding:0;border:none;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}.dbg__copy[_ngcontent-%COMP%]:hover code[_ngcontent-%COMP%]{text-decoration:underline dotted;text-underline-offset:2px}.dbg__copy[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px;border-radius:var(--sm-radius-sm)}.dbg__copied[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.72rem;font-style:italic;color:var(--sm-severity-success)}"],changeDetection:0})}return t})();function wle(t,i){if(t&1&&(Q(0,"span",3),oe(1,"i",6),Q(2,"span"),b(3),Q(4,"code"),b(5),ie()()()),t&2){d(2);let e=Ee(0),n=d();l(3),Se("",n.texts.fields.lastBumpedBy," "),l(2),x(e.lastBumpedBy)}}function Tle(t,i){if(t&1&&(Q(0,"dt"),b(1),ie(),Q(2,"dd",2)(3,"span",3),oe(4,"i",4),Q(5,"span",5),b(6),ie()(),P(7,wle,6,2,"span",3),ie()),t&2){d();let e=Ee(0),n=d();l(),x(n.texts.fields.lastBumpedAt),l(4),Ze("title",e.lastBumpedAt),l(),x(n.lastBumpedRel()),l(),R(e.lastBumpedBy!==null?7:-1)}}function Sle(t,i){if(t&1&&(Q(0,"span",3),oe(1,"i",6),Q(2,"span"),b(3),Q(4,"code"),b(5),ie()()()),t&2){d(2);let e=Ee(0),n=d();l(3),Se("",n.texts.fields.createdBy," "),l(2),x(e.createdBy)}}function kle(t,i){if(t&1&&(Q(0,"dt"),b(1),ie(),Q(2,"dd",7)(3,"span",3),oe(4,"i",8),Q(5,"span",5),b(6),ie()(),P(7,Sle,6,2,"span",3),ie()),t&2){d();let e=Ee(0),n=d();l(),x(n.texts.fields.createdAt),l(4),Ze("title",e.createdAt),l(),x(n.createdRel()),l(),R(e.createdBy!==null?7:-1)}}function Ile(t,i){if(t&1&&(Yt(0),Q(1,"dl",0),P(2,Tle,8,4),P(3,kle,8,4),ie()),t&2){let e=xt(d().audit());l(2),R(e.lastBumpedAt!==null?2:-1),l(),R(e.createdAt!==null?3:-1)}}function Ele(t,i){if(t&1&&(Q(0,"p",1),b(1),ie()),t&2){let e=d();l(),x(e.texts.headerEmpty)}}var iP=(()=>{class t{sidecarRoot=V(null);texts=Xo.audit;audit=k(()=>{let e=this.sidecarRoot(),n={lastBumpedAt:null,lastBumpedBy:null,createdAt:null,createdBy:null};if(!e)return n;let o=e.audit;if(typeof o!="object"||o===null)return n;let r=o;return{lastBumpedAt:lf(r.lastBumpedAt),lastBumpedBy:lf(r.lastBumpedBy),createdAt:lf(r.createdAt),createdBy:lf(r.createdBy)}});hasContent=k(()=>{let e=this.audit();return e.lastBumpedAt!==null||e.lastBumpedBy!==null||e.createdAt!==null||e.createdBy!==null});lastBumpedRel=k(()=>{let e=this.audit().lastBumpedAt;return e===null?null:Tf(e)});createdRel=k(()=>{let e=this.audit().createdAt;return e===null?null:Tf(e)});static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-audit-panel"]],inputs:{sidecarRoot:[1,"sidecarRoot"]},decls:2,vars:1,consts:[["data-testid","inspector-audit-panel",1,"sm-block__kv"],["data-testid","inspector-audit-panel-empty",1,"audit__empty"],["data-testid","inspector-audit-last-bumped",1,"sm-block__inline"],[1,"sm-block__meta"],["aria-hidden","true",1,"pi","pi-history"],[3,"title"],["aria-hidden","true",1,"pi","pi-user"],["data-testid","inspector-audit-created",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-calendar-plus"]],template:function(n,o){n&1&&P(0,Ile,4,3,"dl",0)(1,Ele,2,1,"p",1),n&2&&R(o.hasContent()?0:1)},styles:["[_nghost-%COMP%]{display:block}.audit__empty[_ngcontent-%COMP%]{margin:0;font-style:italic;color:var(--sm-text-muted);font-size:.85rem}"],changeDetection:0})}return t})();function lf(t){return typeof t=="string"&&t.length>0?t:null}function Mle(t,i){if(t&1&&(f(0,"span",7),F(1,"i",16),b(2),m()),t&2){let e=d();_("pTooltip",e.texts.header.invalidFrontmatterTooltip),l(2),Se(" ",e.texts.header.invalidFrontmatter," ")}}function Dle(t,i){t&1&&(f(0,"span",8),b(1),m()),t&2&&(l(),x(i))}function Ple(t,i){if(t&1&&(f(0,"span",9)(1,"span",17),b(2,"\u25CF"),m(),b(3),m()),t&2){let e=i;O("data-stability",e),l(3),Se(" ",e," ")}}function Rle(t,i){if(t&1){let e=Y();f(0,"button",19),L("click",function(){let o=w(e).$implicit,r=d(2);return T(r.tagClick.emit(o))}),F(1,"i",20),b(2),m()}if(t&2){let e=i.$implicit,n=d(2);ae("inspector__tag--active",n.isActiveTag(e)),O("aria-pressed",n.isActiveTag(e))("aria-label",n.texts.header.tagFilterAriaLabel(e)),l(2),Se(" ",e," ")}}function Ole(t,i){if(t&1&&(f(0,"div",15),ue(1,Rle,3,5,"button",18,Xe),m()),t&2){let e=d();l(),pe(e.headerTags())}}var Fle=new Set(["red","orange","yellow","green","cyan","blue","purple","pink"]),oP=(()=>{class t{node=V.required();frontmatterInvalid=V(!1);activeTag=V(null);favoriteToggle=et();tagClick=et();texts=Xo;cardTexts=Yn;headerName=k(()=>{let e=this.node(),n=e.frontmatter.name;return typeof n=="string"&&n.trim().length>0?n:e.path.split("/").pop()??e.path});headerVersion=k(()=>es(this.node()));headerStability=k(()=>ro(this.node()));headerTitleColor=k(()=>{let e=this.node(),o=e.frontmatter.color;return typeof o=="string"&&Fle.has(o)?o:`var(--sm-kind-${e.kind})`});headerTags=k(()=>ao(this.node()));isActiveTag(e){return this.activeTag()===e}onFavoriteClick(e){e.stopPropagation(),this.favoriteToggle.emit(this.node().path)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-header"]],inputs:{node:[1,"node"],frontmatterInvalid:[1,"frontmatterInvalid"],activeTag:[1,"activeTag"]},outputs:{favoriteToggle:"favoriteToggle",tagClick:"tagClick"},decls:19,vars:19,consts:[["data-testid","inspector-title",1,"inspector__header"],["data-testid","inspector-kind-chip",1,"inspector__kind-eyebrow"],["aria-hidden","true",1,"inspector__icon-box"],[3,"kind","provider","size"],[1,"inspector__content"],[1,"inspector__name-row"],["data-testid","inspector-title-text",1,"inspector__name"],["data-testid","inspector-fm-invalid",1,"inspector__fm-invalid",3,"pTooltip"],["data-testid","inspector-version",1,"inspector__name-version"],["data-testid","inspector-stability-tag",1,"inspector__stability"],["data-testid","inspector-path",1,"inspector__path-code"],[1,"inspector__actions-cluster"],["type","button","data-testid","inspector-favorite",1,"inspector__favorite",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["slot","inspector.header.badge",3,"node"],["data-testid","inspector-header-tags",1,"inspector__tags"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["aria-hidden","true",1,"inspector__stability-dot"],["type","button","data-testid","inspector-header-tag",1,"inspector__tag",3,"inspector__tag--active"],["type","button","data-testid","inspector-header-tag",1,"inspector__tag",3,"click"],["aria-hidden","true",1,"pi","pi-tag"]],template:function(n,o){if(n&1&&(f(0,"header",0)(1,"span",1),b(2),m(),f(3,"div",2),F(4,"sm-kind-icon",3),m(),f(5,"div",4)(6,"div",5)(7,"h2",6),b(8),m(),P(9,Mle,3,2,"span",7),P(10,Dle,2,1,"span",8),P(11,Ple,4,2,"span",9),m(),f(12,"code",10),b(13),m()(),f(14,"div",11)(15,"button",12),L("click",function(a){return o.onFavoriteClick(a)}),F(16,"i",13),m(),F(17,"sm-view-contributions-host",14),m(),P(18,Ole,3,0,"div",15),m()),n&2){let r,a,s=o.node();l(2),x(s.kind),l(2),_("kind",s.kind)("provider",s.provider)("size",18),l(4),x(o.headerName()),l(),R(o.frontmatterInvalid()?9:-1),l(),R((r=o.headerVersion())?10:-1,r),l(),R((a=o.headerStability())?11:-1,a),l(2),x(s.path),l(2),ae("inspector__favorite--on",s.isFavorite===!0),_("pTooltip",s.isFavorite===!0?o.cardTexts.favoriteRemoveTooltip:o.cardTexts.favoriteAddTooltip),O("aria-label",s.isFavorite===!0?o.cardTexts.ariaFavoriteRemove:o.cardTexts.ariaFavoriteAdd),l(),ae("pi-star-fill",s.isFavorite===!0)("pi-star",s.isFavorite!==!0),l(),_("node",s),l(),R(o.headerTags().length>0?18:-1)}},dependencies:[Be,Ue,Yo,$n],styles:["[_nghost-%COMP%]{display:block;flex:0 0 auto;padding:1rem 1.1rem 0}.inspector__header[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.75rem;row-gap:.3rem;align-items:start;padding:0 .85rem .85rem;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--p-text-color);border-left:3px solid var(--accent);border-bottom:1px solid var(--sm-border)}.inspector__kind-eyebrow[_ngcontent-%COMP%]{grid-column:1 / -1;grid-row:1;font-size:.78rem;font-weight:600;color:var(--accent);text-transform:lowercase;line-height:1.2}.inspector__icon-box[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:var(--sm-radius-md);display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--sm-accent-fg);flex:none;font-size:1.05rem;grid-column:1;grid-row:2;align-self:start}.inspector__content[_ngcontent-%COMP%]{min-width:0;width:100%;display:flex;flex-direction:column;gap:.18rem}.inspector__name-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem;min-width:0}.inspector__name[_ngcontent-%COMP%]{margin:0;font-size:1.05rem;font-weight:600;line-height:1.25;letter-spacing:-.01em;word-break:break-word;color:var(--p-text-color)}.inspector__fm-invalid[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.7rem;font-weight:500;text-transform:lowercase;white-space:nowrap;cursor:help;color:var(--sm-severity-warn);background:color-mix(in srgb,var(--sm-severity-warn) 12%,transparent);border:1px solid color-mix(in srgb,var(--sm-severity-warn) 35%,transparent)}.inspector__fm-invalid[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.68rem}.inspector__stability[_ngcontent-%COMP%]{font-size:.78rem;font-weight:500;text-transform:lowercase;white-space:nowrap}.inspector__stability-dot[_ngcontent-%COMP%]{margin-right:.25rem;font-size:.55rem;vertical-align:middle}.inspector__stability[data-stability=stable][_ngcontent-%COMP%]{color:var(--sm-severity-success)}.inspector__stability[data-stability=experimental][_ngcontent-%COMP%]{color:var(--sm-severity-info)}.inspector__stability[data-stability=deprecated][_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.inspector__path-code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;color:var(--p-text-muted-color);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);word-break:break-all;align-self:flex-start;max-width:100%;margin-top:.15rem}.inspector__actions-cluster[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.3rem;align-self:start}.inspector__favorite[_ngcontent-%COMP%]{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;padding:0;cursor:pointer;color:var(--p-text-muted-color);border-radius:var(--sm-radius-md);flex:none;transition:background .12s ease,color .12s ease}.inspector__favorite[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.85rem;line-height:1}.inspector__favorite[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.inspector__favorite[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.inspector__favorite--on[_ngcontent-%COMP%]{color:var(--p-primary-color)}.inspector__name-version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;color:var(--p-text-color);background:var(--sm-bg-hover);padding:.08rem .4rem;border-radius:var(--sm-radius-sm);line-height:1.2;flex:none}.inspector__tags[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;margin-top:.55rem;padding-top:.5rem;border-top:1px solid var(--sm-border)}.inspector__tag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .5rem;border:1px solid transparent;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.72rem;font-weight:500;line-height:1.35;cursor:pointer;transition:background .12s ease-out,color .12s ease-out,border-color .12s ease-out}.inspector__tag[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.62rem;opacity:.7}.inspector__tag[_ngcontent-%COMP%]:not(.inspector__tag--active):hover{border-color:var(--sm-border);color:var(--p-primary-color)}.inspector__tag[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.inspector__tag--active[_ngcontent-%COMP%]{background:var(--p-primary-color);color:var(--p-primary-contrast-color);border-color:var(--p-primary-color)}.inspector__tag--active[_ngcontent-%COMP%]:hover{filter:brightness(1.08)}.inspector__tag--active[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})}return t})();var rP={header:"Allow skill-map to create files in this project?",body:"Skill-map will create companion files (*.sm) next to your markdown files to track version, history and tags. Your markdown stays clean, metadata never gets mixed into the content you wrote.",alwaysLabel:"Always allow editing .sm files in this project",alwaysHint:"When off, we ask again on the next write. When on, the choice is remembered for this project on this machine.",accept:"Allow",reject:"Not now",ariaLabel:"Sidecar write consent"};var Nle=()=>({width:"32rem"}),aP=(()=>{class t{texts=rP;open=V(!1);decision=et();always=W(!1);alwaysChecked=k(()=>this.always());resetOnOpen=de(()=>{this.open()&&this.always.set(!1)});accept(){this.decision.emit({accepted:!0,always:this.always()})}decline(){this.decision.emit({accepted:!1,always:!1})}onVisibleChange(e){e||this.decline()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-sidecar-consent-dialog"]],inputs:{open:[1,"open"]},outputs:{decision:"decision"},decls:13,vars:19,consts:[["appendTo","body","data-testid","sidecar-consent-dialog",3,"visibleChange","visible","modal","closable","draggable","resizable","dismissableMask","header"],["data-testid","sidecar-consent-body",1,"consent__body"],["data-testid","sidecar-consent-always-row",1,"consent__always"],["inputId","sidecar-consent-always","data-testid","sidecar-consent-always",3,"ngModelChange","ngModel","binary"],[1,"consent__always-text"],[1,"consent__always-label"],[1,"consent__always-hint"],[1,"consent__actions"],["severity","secondary","data-testid","sidecar-consent-reject",3,"onClick","label","text"],["severity","primary","data-testid","sidecar-consent-accept",3,"onClick","label"]],template:function(n,o){n&1&&(f(0,"p-dialog",0),L("visibleChange",function(a){return o.onVisibleChange(a)}),f(1,"p",1),b(2),m(),f(3,"label",2)(4,"p-checkbox",3),or("ngModelChange",function(a){return ir(o.always,a)||(o.always=a),a}),m(),f(5,"span",4)(6,"span",5),b(7),m(),f(8,"span",6),b(9),m()()(),f(10,"div",7)(11,"p-button",8),L("onClick",function(){return o.decline()}),m(),f(12,"p-button",9),L("onClick",function(){return o.accept()}),m()()()),n&2&&(zt(Et(18,Nle)),_("visible",o.open())("modal",!0)("closable",!0)("draggable",!1)("resizable",!1)("dismissableMask",!0)("header",o.texts.header),O("aria-label",o.texts.ariaLabel),l(2),x(o.texts.body),l(2),nr("ngModel",o.always),_("binary",!0),l(3),x(o.texts.alwaysLabel),l(2),x(o.texts.alwaysHint),l(2),_("label",o.texts.reject)("text",!0),l(),_("label",o.texts.accept))},dependencies:[bt,Pt,Rt,yn,hn,is,Y0,cv,lv],styles:[".consent__body[_ngcontent-%COMP%]{margin:0 0 1rem;line-height:1.5;color:var(--p-text-color)}.consent__always[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.6rem;cursor:pointer;margin-bottom:1.25rem}.consent__always-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.2rem}.consent__always-label[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color)}.consent__always-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--p-text-muted-color);line-height:1.4}.consent__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem}"],changeDetection:0})}return t})();function a0(t){Pn(a0);let{path:i,dataSource:e,markdown:n}=t,o=W("idle"),r=W(null),a=0,s=async(c,u)=>{try{let h=await e.getNode(c,{includeBody:!0});if(u!==a)return;if(h===null){o.set("unavailable");return}let g=h.item.body;if(g===null){o.set("unavailable");return}if(g===void 0||g.trim().length===0){o.set("empty");return}let C=await n.render(g);if(u!==a)return;r.set(C),o.set("ready")}catch{if(u!==a)return;o.set("error")}};return de(()=>{let c=i(),u=++a;if(r.set(null),!c){o.set("idle");return}o.set("loading"),s(c,u)}),t.scanCompleted$?.pipe(Un()).subscribe(()=>{let c=i();c&&s(c,++a)}),{bodyState:o.asReadonly(),bodyHtml:r.asReadonly()}}function s0(t){Pn(s0);let{path:i,pathSet:e,dataSource:n}=t,o=W(new Set),r=W(new Set),a=W(new Set);return de(()=>{i(),o.set(new Set),r.set(new Set),a.set(new Set)}),{linkStatus:h=>e().has(h)||o().has(h)?"live":r().has(h)?"dead-confirmed":"dead-heuristic",isVerifying:h=>a().has(h),verifyDeadLink:async h=>{if(!(o().has(h)||r().has(h))&&!a().has(h)){a.update(g=>new Set(g).add(h));try{await n.getNode(h)===null?r.update(C=>new Set(C).add(h)):o.update(C=>new Set(C).add(h))}catch{}finally{a.update(g=>{let C=new Set(g);return C.delete(h),C})}}}}}var lP="skill-map.ui.inspector.sections",Ale={body:!0,findings:!0};function sP(t){return Ale[t]??!1}function l0(){Pn(l0);let t=W(Lle());return de(()=>{Ble(t())}),{expanded:i=>t()[i]??sP(i),toggle:i=>t.update(e=>Bt(me({},e),{[i]:!(e[i]??sP(i))}))}}function Lle(){try{let t=localStorage.getItem(lP);if(!t)return{};let i=JSON.parse(t);if(i===null||typeof i!="object"||Array.isArray(i))return{};let e={};for(let[n,o]of Object.entries(i))typeof o=="boolean"&&(e[n]=o);return e}catch{return{}}}function Ble(t){try{localStorage.setItem(lP,JSON.stringify(t))}catch{}}var Vle=new Set(["identity","annotations","settings","audit"]),zle=new Set(["agent","skill","command"]);function cP(t){let{node:i}=t,e=k(()=>{let s=i()?.sidecar;if(!s||!s.present)return null;if(s.root)return s.root;let c={};return s.annotations&&(c.annotations=s.annotations),c}),n=k(()=>{let s=i()?.kind;return s!==void 0&&zle.has(s)}),o=k(()=>{let s=i();return s?(s.linksOutCount??0)+(s.linksInCount??0)+(s.externalRefsCount??0)>0:!1}),r=k(()=>{let s=e();if(!s)return!1;for(let c of Object.keys(s))if(!Vle.has(c))return!0;return!1}),a=k(()=>e()!==null);return{sidecarRoot:e,hasVendorFrontmatter:n,hasConnections:o,hasPluginContributions:r,hasMetadata:a}}function Hle(t,i){if(t&1&&(f(0,"section",0)(1,"div",2),F(2,"span",3),f(3,"p",4),b(4),m(),f(5,"p",5),b(6),m()()()),t&2){let e=d();l(4),x(e.texts.emptyNoSelection.title),l(2),x(e.texts.emptyNoSelection.desc)}}function qle(t,i){if(t&1&&(f(0,"section",0)(1,"div",6),F(2,"span",7),f(3,"p",4),b(4),m(),f(5,"p",5)(6,"code"),b(7),m(),f(8,"span"),b(9),m()()()()),t&2){let e=d();l(4),x(e.texts.emptyNotFound.title),l(3),x(e.path()),l(2),x(e.texts.emptyNotFound.descSuffix)}}function Gle(t,i){if(t&1&&F(0,"p",11),t&2){let e=d(2);_("innerHTML",e.descriptionHtml(),yi)}}function jle(t,i){if(t&1){let e=Y();f(0,"div",12),F(1,"i",24),f(2,"span"),b(3),m(),f(4,"button",25),L("click",function(){w(e);let o=d(2);return T(o.dismissActionError())}),F(5,"i",26),m()()}if(t&2){let e=d(2);l(3),x(i),l(),O("aria-label",e.texts.actionErrorDismissAriaLabel)}}function Ule(t,i){if(t&1&&(f(0,"p",35)(1,"strong"),b(2),m(),b(3),m()),t&2){let e=d(5);l(2),x(e.texts.findingHintLabel),l(),Se(" ",i," ")}}function $le(t,i){if(t&1&&(f(0,"li",30)(1,"div",31)(2,"span",32),b(3),m(),f(4,"code",33),b(5),m()(),f(6,"p",34),b(7),m(),P(8,Ule,4,2,"p",35),m()),t&2){let e,n=i.$implicit;O("data-severity",n.severity),l(2),O("data-severity",n.severity),l(),x(n.severity),l(2),x(n.analyzerId),l(2),x(n.message),l(),R((e=n.fix==null?null:n.fix.summary)?8:-1,e)}}function Wle(t,i){if(t&1&&(f(0,"ul",29),ue(1,$le,9,6,"li",30,mf),m()),t&2){let e=d(3);l(),pe(e.sortedIssues())}}function Kle(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",27),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("findings"))}),f(1,"span",28),b(2),m(),P(3,Wle,3,0,"ul",29),m()}if(t&2){let e=d(2);_("title",e.texts.sections.findings)("expanded",e.expanded("findings")),l(2),Se("(",e.issues().length,")"),l(),R(e.expanded("findings")?3:-1)}}function Yle(t,i){if(t&1){let e=Y();f(0,"sm-linked-nodes-panel",38),L("openPath",function(o){w(e);let r=d(3);return T(r.openPath(o))}),m()}if(t&2){d(2);let e=Ee(0);_("path",e.path)}}function Xle(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",36),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("connections"))}),P(1,Yle,1,1,"sm-linked-nodes-panel",37),m()}if(t&2){let e=d(2);_("title",e.texts.sections.connections)("expanded",e.expanded("connections")),l(),R(e.expanded("connections")?1:-1)}}function Zle(t,i){if(t&1){let e=Y();f(0,"div",17)(1,"sm-vendor-frontmatter",39),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("definition"))}),m()()}if(t&2){d();let e=Ee(0),n=Ee(1),o=d();l(),_("frontmatter",n)("kind",e.kind)("provider",e.provider)("skillPathByName",o.skillPathByName())("onSkillClick",o.onSkillChip)("expanded",o.expanded("definition"))}}function Qle(t,i){t&1&&(f(0,"code",41),b(1),m()),t&2&&(l(),Se("(",i,")"))}function Jle(t,i){if(t&1&&F(0,"sm-annotations-panel",42),t&2){d(2);let e=Ee(0);_("overlay",e.sidecar)}}function ece(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",40),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("annotations"))}),P(1,Qle,2,1,"code",41),P(2,Jle,1,1,"sm-annotations-panel",42),m()}if(t&2){let e,n=d(2);_("title",n.texts.sections.annotations)("expanded",n.expanded("annotations")),l(),R((e=n.sidecarFileName())?1:-1,e),l(),R(n.expanded("annotations")?2:-1)}}function tce(t,i){if(t&1&&(f(0,"p",44),b(1),m()),t&2){let e=d(4);l(),x(e.texts.body.loading)}}function nce(t,i){if(t&1&&F(0,"div",45),t&2){let e=d(4);_("innerHTML",e.bodyHtml(),yi)}}function ice(t,i){if(t&1&&P(0,tce,2,1,"p",44)(1,nce,1,1,"div",45),t&2){let e,n=d(3);R((e=n.bodyState())==="loading"?0:e==="ready"?1:-1)}}function oce(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",43),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("body"))}),P(1,ice,2,1),m()}if(t&2){let e=d(2);_("title",e.texts.sections.body)("expanded",e.expanded("body")),l(),R(e.expanded("body")?1:-1)}}function rce(t,i){if(t&1&&F(0,"sm-plugin-contributions",47),t&2){let e=d(3);_("sidecarRoot",e.sidecarRoot())}}function ace(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",46),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("plugins"))}),P(1,rce,1,1,"sm-plugin-contributions",47),m()}if(t&2){let e=d(2);_("title",e.texts.sections.plugins)("expanded",e.expanded("plugins")),l(),R(e.expanded("plugins")?1:-1)}}function sce(t,i){if(t&1&&(f(0,"div",49),F(1,"sm-inspector-audit-panel",47)(2,"sm-inspector-debug-panel",50),m()),t&2){d(2);let e=Ee(0),n=d();l(),_("sidecarRoot",n.sidecarRoot()),l(),_("node",e)("sidecarRoot",n.sidecarRoot())("overlay",e.sidecar)}}function lce(t,i){if(t&1){let e=Y();f(0,"sm-collapsible-section",48),L("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("metadata"))}),P(1,sce,3,4,"div",49),m()}if(t&2){let e=d(2);_("title",e.texts.sections.metadata)("expanded",e.expanded("metadata")),l(),R(e.expanded("metadata")?1:-1)}}function cce(t,i){if(t&1){let e=Y();Yt(0)(1),f(2,"section",8)(3,"sm-inspector-header",9),L("favoriteToggle",function(o){w(e);let r=d();return T(r.onHeaderFavoriteToggle(o))})("tagClick",function(o){w(e);let r=d();return T(r.tagSelect.emit(o))}),m(),f(4,"div",10),P(5,Gle,1,1,"p",11),P(6,jle,6,2,"div",12),f(7,"div",13),F(8,"sm-view-contributions-host",14),m(),P(9,Kle,4,4,"sm-collapsible-section",15),P(10,Xle,2,3,"sm-collapsible-section",16),P(11,Zle,2,6,"div",17),P(12,ece,3,4,"sm-collapsible-section",18),P(13,oce,2,3,"sm-collapsible-section",19),P(14,ace,2,3,"sm-collapsible-section",20),F(15,"sm-inspector-plugin-sections",21),P(16,lce,2,3,"sm-collapsible-section",22),m(),f(17,"sm-sidecar-consent-dialog",23),L("decision",function(o){w(e);let r=d();return T(r.onConsentDecision(o))}),m()()}if(t&2){let e,n=d(),o=xt(n.node());l();let r=xt(o.frontmatter);l(),Oe("--accent","var(--sm-kind-"+o.kind+", var(--sm-kind-markdown))"),l(),_("node",o)("frontmatterInvalid",n.frontmatterInvalid())("activeTag",n.activeTag()),l(2),R(r.description?5:-1),l(),R((e=n.actionError())?6:-1,e),l(2),_("node",o),l(),R(n.issues().length>0?9:-1),l(),R(n.hasConnections()?10:-1),l(),R(n.hasVendorFrontmatter()?11:-1),l(),R(o.sidecar!=null&&o.sidecar.present?12:-1),l(),R(n.showBody()?13:-1),l(),R(n.hasPluginContributions()?14:-1),l(),_("node",n.node()),l(),R(n.hasMetadata()?16:-1),l(),_("open",n.consentOpen())}}var dP=(()=>{class t{loader=p(Ot);nodeOpenIntent=p(so);dataSource=p(co);markdown=p(uo);wsEvents=p(os);actionDispatch=p(Cv);texts=Xo;cardTexts=Yn;path=V(void 0);activeTag=V(null);tagSelect=et();node=k(()=>{let e=this.path();return e?this.loader.nodes().find(n=>n.path===e)??null:null});pathSet=k(()=>{let e=new Set;for(let n of this.loader.nodes())e.add(n.path);return e});skillPathByName=k(()=>{let e=new Map;for(let n of this.loader.nodes()){if(n.kind!=="skill")continue;let o=n.frontmatter?.name;typeof o=="string"&&o.length>0&&e.set(o,n.path)}return e});sidecarFileName=k(()=>{let e=this.node()?.path;return e?(e.split("/").pop()??e).replace(/\.md$/,".sm"):null});bodyHandle=a0({path:this.path,dataSource:this.dataSource,markdown:this.markdown,scanCompleted$:this.wsEvents.scanCompleted$});bodyState=this.bodyHandle.bodyState;bodyHtml=this.bodyHandle.bodyHtml;showBody=k(()=>{let e=this.bodyState();return e==="loading"||e==="ready"});descriptionHtml=Oa(()=>this.node()?.frontmatter.description??"",this.markdown);deadLink=s0({path:this.path,pathSet:this.pathSet,dataSource:this.dataSource});sectionCollapse=l0();expanded(e){return this.sectionCollapse.expanded(e)}toggleSection(e){this.sectionCollapse.toggle(e)}derivations=cP({node:this.node});sidecarRoot=this.derivations.sidecarRoot;hasVendorFrontmatter=this.derivations.hasVendorFrontmatter;hasConnections=this.derivations.hasConnections;hasPluginContributions=this.derivations.hasPluginContributions;hasMetadata=this.derivations.hasMetadata;issues=W([]);issuesPath=void 0;issuesLoaderEffect=de(e=>{let n=this.node(),o=n?.path;if(o!==this.issuesPath&&(this.issues.set([]),this.issuesPath=o),!n||!o)return;let r=!1;e(()=>{r=!0}),this.dataSource.listIssues({node:o}).then(a=>{!r&&this.issuesPath===o&&this.issues.set(a.items)}).catch(()=>{!r&&this.issuesPath===o&&this.issues.set([])})});sortedIssues=k(()=>{let e={error:0,warn:1,info:2};return[...this.issues()].sort((n,o)=>e[n.severity]-e[o.severity])});frontmatterInvalid=k(()=>this.issues().some(e=>e.analyzerId==="frontmatter-parse-error"));ngOnInit(){this.loader.nodes().length===0&&!this.loader.loading()&&this.loader.load()}openPath(e){this.nodeOpenIntent.open(e)}onSkillChip=e=>{this.openPath(e)};pathExists(e){return this.pathSet().has(e)}linkStatus(e){return this.deadLink.linkStatus(e)}isVerifying(e){return this.deadLink.isVerifying(e)}verifyDeadLink(e){return this.deadLink.verifyDeadLink(e)}onHeaderFavoriteToggle(e){let n=this.node();!n||n.path!==e||this.loader.toggleFavorite(e,!n.isFavorite)}consentOpen=this.actionDispatch.consentOpen;actionError=this.actionDispatch.error;onConsentDecision(e){this.actionDispatch.resolveConsent(e)}dismissActionError(){this.actionDispatch.dismissError()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-view"]],inputs:{path:[1,"path"],activeTag:[1,"activeTag"]},outputs:{tagSelect:"tagSelect"},decls:3,vars:1,consts:[["data-testid","inspector-view",1,"inspector"],["data-testid","inspector-view",1,"inspector","inspector--node",3,"--accent"],["data-testid","inspector-empty-no-selection",1,"empty-state"],[1,"empty-state__icon","pi","pi-eye"],[1,"empty-state__title"],[1,"empty-state__desc"],["data-testid","inspector-empty-not-found",1,"empty-state"],[1,"empty-state__icon","empty-state__icon--warn","pi","pi-question-circle"],["data-testid","inspector-view",1,"inspector","inspector--node"],[3,"favoriteToggle","tagClick","node","frontmatterInvalid","activeTag"],["data-testid","inspector-scroll",1,"inspector__scroll"],["data-testid","inspector-description",1,"inspector__desc",3,"innerHTML"],["data-testid","inspector-action-error",1,"inspector__banner","inspector__banner--error"],[1,"inspector__toolbar"],["slot","inspector.action.button",3,"node"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",3,"title","expanded"],["toggleTestid","inspector-connections-toggle","data-testid","inspector-card-linked-nodes",3,"title","expanded"],["data-testid","inspector-card-vendor-frontmatter",1,"inspector__vendor"],["toggleTestid","inspector-annotations-toggle","data-testid","inspector-card-annotations",3,"title","expanded"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"title","expanded"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"title","expanded"],[3,"node"],["toggleTestid","inspector-metadata-toggle","data-testid","inspector-card-metadata",3,"title","expanded"],[3,"decision","open"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["type","button",1,"inspector__banner-dismiss",3,"click"],["aria-hidden","true",1,"pi","pi-times"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",3,"toggle","title","expanded"],["smSectionTitleExtra","",1,"sm-block__count"],[1,"inspector__findings-list"],["data-testid","inspector-finding",1,"inspector__finding"],[1,"inspector__finding-head"],[1,"inspector__finding-severity"],[1,"inspector__finding-analyzer"],[1,"inspector__finding-message"],["data-testid","inspector-finding-hint",1,"inspector__finding-hint"],["toggleTestid","inspector-connections-toggle","data-testid","inspector-card-linked-nodes",3,"toggle","title","expanded"],[3,"path"],[3,"openPath","path"],[3,"toggle","frontmatter","kind","provider","skillPathByName","onSkillClick","expanded"],["toggleTestid","inspector-annotations-toggle","data-testid","inspector-card-annotations",3,"toggle","title","expanded"],["smSectionTitleExtra","","data-testid","inspector-sidecar-file",1,"inspector__sidecar-file"],[3,"overlay"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"toggle","title","expanded"],["data-testid","inspector-body-loading",1,"inspector__body-status"],["data-testid","inspector-body-rendered",1,"inspector__body-rendered",3,"innerHTML"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"toggle","title","expanded"],[3,"sidecarRoot"],["toggleTestid","inspector-metadata-toggle","data-testid","inspector-card-metadata",3,"toggle","title","expanded"],["data-testid","inspector-metadata-section",1,"inspector__metadata"],[3,"node","sidecarRoot","overlay"]],template:function(n,o){n&1&&P(0,Hle,7,2,"section",0)(1,qle,10,3,"section",0)(2,cce,18,19,"section",1),n&2&&R(o.path()?o.node()?2:1:0)},dependencies:[jD,zD,WD,QD,eP,nP,iP,oP,sf,$n,aP],styles:["[_nghost-%COMP%]{display:block;height:100%}.inspector[_ngcontent-%COMP%]{--accent: var(--sm-kind-markdown);display:flex;flex-direction:column;gap:.75rem;padding:1rem 1.1rem 1.25rem;background:var(--sm-bg-content);color:var(--p-text-color)}.inspector--node[_ngcontent-%COMP%]{height:100%;min-height:0;overflow:hidden;padding:0;gap:0}.inspector__scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding:.75rem 1.1rem 1.25rem}.inspector--empty[_ngcontent-%COMP%]{padding:2rem;color:var(--p-text-muted-color)}.inspector__desc[_ngcontent-%COMP%]{margin:0;color:var(--p-text-color);font-size:.88rem;line-height:1.5;max-width:none}.inspector__sidecar-file[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;font-weight:400;color:var(--p-text-muted-color)}[_nghost-%COMP%] .inspector__desc code{background:var(--sm-bg-hover);padding:.05rem .3rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .inspector__desc a{color:var(--p-primary-color);text-decoration:underline}.inspector__toolbar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;flex-wrap:wrap}[_nghost-%COMP%] .sm-block{display:flex;flex-direction:column;gap:.45rem;padding-left:.7rem;border-left:2px solid color-mix(in srgb,var(--accent) 70%,transparent);transition:border-color .14s ease}[_nghost-%COMP%] .sm-block--collapsible:hover{border-left-color:var(--accent)}[_nghost-%COMP%] .sm-block__title{margin:0;font-size:.82rem;font-weight:600;letter-spacing:0;color:var(--p-text-color);display:flex;align-items:baseline;gap:.4rem}[_nghost-%COMP%] .sm-block__count{font-size:.75rem;font-weight:500;color:var(--p-text-muted-color)}[_nghost-%COMP%] .sm-block__sub{margin:0;font-size:.72rem;font-weight:500;color:var(--p-text-muted-color);text-transform:uppercase;letter-spacing:.05em}[_nghost-%COMP%] .sm-block__row{display:flex;align-items:center;gap:.5rem;width:100%;padding:0;margin:0;background:transparent;border:none;text-align:left;font:inherit;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__row--toggle{cursor:pointer}[_nghost-%COMP%] .sm-block--collapsible>.sm-block__row--toggle+*{margin-top:.5rem;padding-top:.7rem;border-top:1px solid var(--sm-border)}[_nghost-%COMP%] .sm-block__row--toggle:hover .sm-block__title{color:var(--accent)}[_nghost-%COMP%] .sm-block__summary{font-size:.78rem;color:var(--p-text-muted-color);font-weight:400;flex:1 1 auto;margin-left:.3rem}[_nghost-%COMP%] .sm-block__chevron{color:var(--p-text-muted-color);font-size:.75rem;margin-left:auto}[_nghost-%COMP%] .sm-block__kv{display:grid;grid-template-columns:max-content 1fr;column-gap:1rem;row-gap:.35rem;margin:0;font-size:.85rem;align-items:baseline}[_nghost-%COMP%] .sm-block__kv dt{color:var(--p-text-muted-color);font-weight:500;font-size:.8rem}[_nghost-%COMP%] .sm-block__kv dd{margin:0;word-break:break-word;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__kv code{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .sm-block__inline{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .65rem;row-gap:.35rem}[_nghost-%COMP%] .sm-block__meta{display:inline-flex;align-items:center;gap:.3rem;font-size:.83rem;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__meta .pi{color:var(--p-text-muted-color);font-size:.85rem}[_nghost-%COMP%] .sm-block__meta a{color:var(--p-primary-color);word-break:break-all}[_nghost-%COMP%] .sm-block__meta code{background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);font-size:.78rem}.inspector__vendor[_ngcontent-%COMP%]{display:contents}.inspector__body-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.inspector__body-status[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--p-text-muted-color);font-style:italic}.inspector__body-status--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn);font-style:normal}[_nghost-%COMP%] .inspector__body-rendered{font-size:.9rem;line-height:1.6;max-height:480px;overflow:auto;padding:.25rem 0 0;--code-border: color-mix(in srgb, var(--sm-border) 70%, var(--p-text-muted-color))}[_nghost-%COMP%] .inspector__body-rendered :first-child{margin-top:0}[_nghost-%COMP%] .inspector__body-rendered :last-child{margin-bottom:0}[_nghost-%COMP%] .inspector__body-rendered h1, [_nghost-%COMP%] .inspector__body-rendered h2, [_nghost-%COMP%] .inspector__body-rendered h3, [_nghost-%COMP%] .inspector__body-rendered h4, [_nghost-%COMP%] .inspector__body-rendered h5, [_nghost-%COMP%] .inspector__body-rendered h6{margin:1.2rem 0 .6rem;font-weight:600;line-height:1.3}[_nghost-%COMP%] .inspector__body-rendered h1{font-size:1.35rem}[_nghost-%COMP%] .inspector__body-rendered h2{font-size:1.18rem}[_nghost-%COMP%] .inspector__body-rendered h3{font-size:1.05rem}[_nghost-%COMP%] .inspector__body-rendered h4{font-size:.95rem}[_nghost-%COMP%] .inspector__body-rendered h5, [_nghost-%COMP%] .inspector__body-rendered h6{font-size:.9rem;color:var(--p-text-muted-color)}[_nghost-%COMP%] .inspector__body-rendered h1, [_nghost-%COMP%] .inspector__body-rendered h2{padding-bottom:.3rem;border-bottom:1px solid var(--sm-border)}[_nghost-%COMP%] .inspector__body-rendered p{margin:.6rem 0}[_nghost-%COMP%] .inspector__body-rendered a{color:var(--p-primary-color);text-decoration:underline;text-underline-offset:2px}[_nghost-%COMP%] .inspector__body-rendered ul, [_nghost-%COMP%] .inspector__body-rendered ol{margin:.6rem 0;padding-left:1.4rem}[_nghost-%COMP%] .inspector__body-rendered li{margin:.2rem 0}[_nghost-%COMP%] .inspector__body-rendered li>ul, [_nghost-%COMP%] .inspector__body-rendered li>ol{margin:.2rem 0}[_nghost-%COMP%] .inspector__body-rendered blockquote{margin:.75rem 0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .inspector__body-rendered blockquote :first-child{margin-top:0}[_nghost-%COMP%] .inspector__body-rendered blockquote :last-child{margin-bottom:0}[_nghost-%COMP%] .inspector__body-rendered hr{margin:1.2rem 0;border:0;border-top:1px solid var(--sm-border)}[_nghost-%COMP%] .inspector__body-rendered img{max-width:100%;height:auto;border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .inspector__body-rendered table{border-collapse:collapse;width:100%;margin:.75rem 0;font-size:.85rem}[_nghost-%COMP%] .inspector__body-rendered th, [_nghost-%COMP%] .inspector__body-rendered td{border:1px solid var(--sm-border);padding:.35rem .55rem;text-align:left}[_nghost-%COMP%] .inspector__body-rendered th{background:var(--sm-bg-hover);font-weight:600}[_nghost-%COMP%] .inspector__body-rendered tbody tr:nth-child(2n){background:var(--sm-bg-hover)}[_nghost-%COMP%] .inspector__body-rendered pre{background:var(--sm-bg-hover);border:1px solid var(--code-border);border-radius:var(--sm-radius-md);padding:.75rem .85rem;margin:.75rem 0;white-space:pre;font-family:var(--sm-font-mono);font-size:.82rem;line-height:1.5;overflow-x:auto}[_nghost-%COMP%] .inspector__body-rendered code{background:var(--sm-bg-hover);border:1px solid var(--code-border);padding:.05rem .34rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .inspector__body-rendered pre code{background:transparent;border:0;padding:0;border-radius:0;font-size:inherit}.inspector__banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.55rem;padding:.55rem .75rem;border-radius:var(--sm-radius-md);font-size:.85rem;border:1px solid transparent}.inspector__banner--warn[_ngcontent-%COMP%]{background:var(--sm-severity-warn-bg);color:var(--sm-severity-warn);border-color:color-mix(in srgb,var(--sm-severity-warn) 30%,transparent)}.inspector__banner--error[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error);border-color:color-mix(in srgb,var(--sm-severity-error) 30%,transparent)}.inspector__banner-dismiss[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;justify-content:center}.inspector__metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column}.inspector__metadata[_ngcontent-%COMP%] > sm-inspector-debug-panel[_ngcontent-%COMP%]{margin-top:.5rem;padding-top:.7rem;border-top:1px solid var(--sm-border)}.inspector__findings-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.45rem}.inspector__finding[_ngcontent-%COMP%]{padding:.55rem .7rem;border-left:3px solid var(--p-content-border-color);background:var(--p-content-background);border-radius:var(--sm-radius-sm)}.inspector__finding[data-severity=error][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-error);background:var(--sm-severity-error-bg)}.inspector__finding[data-severity=warn][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-warn);background:var(--sm-severity-warn-bg)}.inspector__finding[data-severity=info][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-info);background:var(--sm-severity-info-bg)}.inspector__finding-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.2rem}.inspector__finding-severity[_ngcontent-%COMP%]{text-transform:uppercase;font-size:.65rem;font-weight:700;letter-spacing:.05em;padding:.05rem .4rem;border-radius:var(--sm-radius-sm);color:var(--p-content-background);background:var(--p-text-color)}.inspector__finding-severity[data-severity=error][_ngcontent-%COMP%]{background:var(--sm-severity-error)}.inspector__finding-severity[data-severity=warn][_ngcontent-%COMP%]{background:var(--sm-severity-warn)}.inspector__finding-severity[data-severity=info][_ngcontent-%COMP%]{background:var(--sm-severity-info)}.inspector__finding-analyzer[_ngcontent-%COMP%]{font-size:.78rem;color:var(--p-text-muted-color)}.inspector__finding-message[_ngcontent-%COMP%]{margin:0;font-size:.88rem;color:var(--p-text-color);white-space:pre-line;overflow-wrap:anywhere}.inspector__finding-hint[_ngcontent-%COMP%]{margin:.35rem 0 0;font-size:.82rem;color:var(--p-text-color);background:var(--p-content-background);padding:.35rem .5rem;border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .ann-panel__chip--user{padding:.1rem .55rem}"],changeDetection:0})}return t})();var uP=(()=>{class t{smMiddleMousePan=V.required();origin=null;rafId=null;pendingPosition=null;onMouseDown(e){if(e.button!==1)return;let n=this.smMiddleMousePan();if(!n)return;e.preventDefault();let o=n.getPosition()??{x:0,y:0};this.origin={mouseX:e.clientX,mouseY:e.clientY,canvasX:o.x,canvasY:o.y},document.addEventListener("mousemove",this.onMove),document.addEventListener("mouseup",this.onEnd)}ngOnDestroy(){this.onEnd()}onMove=e=>{this.origin&&(this.pendingPosition={x:this.origin.canvasX+(e.clientX-this.origin.mouseX),y:this.origin.canvasY+(e.clientY-this.origin.mouseY)},this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;let n=this.smMiddleMousePan();!n||!this.pendingPosition||(n.setPosition(this.pendingPosition),n.redraw())})))};onEnd=()=>{this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingPosition=null,this.origin=null,document.removeEventListener("mousemove",this.onMove),document.removeEventListener("mouseup",this.onEnd),this.smMiddleMousePan()?.emitCanvasChangeEvent()};static \u0275fac=function(n){return new(n||t)};static \u0275dir=qe({type:t,selectors:[["","smMiddleMousePan",""]],hostBindings:function(n,o){n&1&&L("mousedown",function(a){return o.onMouseDown(a)})},inputs:{smMiddleMousePan:[1,"smMiddleMousePan"]}})}return t})();function pP(t,i){if(t.size===0)return{next:t,dirty:!1};let e=!1,n=new Set;for(let o of t)i.has(o)?n.add(o):e=!0;return{next:e?n:t,dirty:e}}function hP(t){let{nodes:i,current:e,layout:n}=t,o=new Set(i.map(c=>c.path)),r=!1,a=new Map(e);for(let c of a.keys())o.has(c)||(a.delete(c),r=!0);let s=!1;for(let c of o)if(!a.has(c)){s=!0;break}for(let c of o){let u=n.positions.get(c);if(!u)continue;let h=a.get(c);if(!h){a.set(c,{x:u.x,y:u.y}),r=!0;continue}h.manual!==!0&&s&&(h.x===u.x&&h.y===u.y||(a.set(c,{x:u.x,y:u.y}),r=!0))}return{next:a,dirty:r}}function fP(t){let{selectedPath:i,setSelectedNodeId:e,readSelectedNodeId:n,graphNodes:o,onDeepLinkSelect:r,router:a,route:s}=t,c=sv(s.queryParamMap.pipe(h0(u=>u.get("path"))),{initialValue:s.snapshot.queryParamMap.get("path")});de(()=>{let u=c(),h=o();if(h.length===0||!u)return;let g=Xt(()=>n());if(g!==null&&h.find(S=>S.id===g)?.view.path===u)return;let C=h.find(M=>M.view.path===u);C&&(e(C.id),r?.(C.id))}),de(()=>{let u=i(),h=Xt(()=>c());(u??null)!==(h??null)&&a.navigate([],{relativeTo:s,queryParams:{path:u??null},queryParamsHandling:"merge",replaceUrl:!0})})}function mP(t,i){return ao(t).includes(i)}function _P(t){if(typeof t!="object"||t===null)return!1;let i=t;return typeof i.x=="number"&&typeof i.y=="number"&&Number.isFinite(i.x)&&Number.isFinite(i.y)}function gP(t){if(typeof t!="object"||t===null)return!1;let i=t;return typeof i.x=="number"&&typeof i.y=="number"&&typeof i.scale=="number"&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.scale)&&i.scale>0}function vP(t){return t.querySelector(".p-overlay-mask, .p-dialog, .p-overlay")!==null}var bP="sm.graph.viewport",yP="sm.graph.node-positions",CP="sm.graph.node-expanded",xP="sm.graph.panel-width";function wP(){let t=null;try{t=localStorage.getItem(bP)}catch{return null}if(!t)return null;let i;try{i=JSON.parse(t)}catch{return null}return gP(i)?i:null}function TP(t){try{localStorage.setItem(bP,JSON.stringify(t))}catch{}}function SP(){let t=new Map,i=null;try{i=localStorage.getItem(yP)}catch{return t}if(!i)return t;let e;try{e=JSON.parse(i)}catch{return t}if(typeof e!="object"||e===null)return t;for(let[n,o]of Object.entries(e)){if(!_P(o))continue;let r=o,s=r.manual===!0?{x:r.x,y:r.y,manual:!0}:{x:r.x,y:r.y};t.set(n,s)}return t}function Na(t){try{let i={};for(let[e,n]of t)i[e]=n.manual?{x:n.x,y:n.y,manual:!0}:{x:n.x,y:n.y};localStorage.setItem(yP,JSON.stringify(i))}catch{}}function kP(){let t=null;try{t=localStorage.getItem(CP)}catch{return new Set}if(!t)return new Set;let i;try{i=JSON.parse(t)}catch{return new Set}if(!Array.isArray(i))return new Set;let e=new Set;for(let n of i)typeof n=="string"&&n.length>0&&e.add(n);return e}function cf(t){try{localStorage.setItem(CP,JSON.stringify([...t]))}catch{}}function IP(){let t=null;try{t=localStorage.getItem(xP)}catch{return null}if(!t)return null;let i=Number(t);return!Number.isFinite(i)||i<=0?null:i}function EP(t){try{localStorage.setItem(xP,String(Math.round(t)))}catch{}}var uf=500,df=400,MP=80;function DP(t){let i=W(t.initialWidth),e=W(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&La(window,"resize").pipe(Un(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=k(()=>{let g=Math.max(df,e()-MP),C=i();return C>g||C<df?Math.min(uf,g):C}),o=null,r=null,a=null,s=()=>{a=null,r!==null&&(i.set(r),r=null)},c=g=>{if(!o)return;let C=g.clientX-o.mouseX,M=o.widthAtStart-C,S=Math.max(df,e()-MP);r=Math.min(S,Math.max(df,M)),a===null&&typeof window<"u"&&(a=window.requestAnimationFrame(s))},u=()=>{o&&(o=null,document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),a!==null&&typeof window<"u"&&(window.cancelAnimationFrame(a),a=null),r!==null&&(i.set(r),r=null),t.onCommit(i()))};return{clampedPanelWidth:n,onPanelResizeStart:g=>{g.button===0&&(g.preventDefault(),g.stopPropagation(),o={mouseX:g.clientX,widthAtStart:n()},document.addEventListener("mousemove",c),document.addEventListener("mouseup",u))}}}function PP(t){let i=W(null),e=null,n=()=>{if(e===null)return;let r=e;e=null,t.mapVisibility.setOnly(r)};return{activeTagSelection:i,onTagSelect:r=>{if(i()===r){i.set(null),n();return}let a=t.nodes().filter(s=>mP(s,r)).map(s=>s.path);if(a.length===0){i.set(null),n();return}e===null&&(e=new Set(t.mapVisibility.paths())),t.mapVisibility.setOnly(a),i.set(r)}}}var c0=.05,d0=2;function RP(t){let i=W(t.savedViewport?{x:t.savedViewport.x,y:t.savedViewport.y}:{x:0,y:0}),e=W(t.savedViewport?.scale??1),n=k(()=>e()<d0-1e-6),o=k(()=>e()>c0+1e-6);return{viewportPosition:i,viewportScale:e,canZoomIn:n,canZoomOut:o,onCanvasChange:a=>{let s=i();(s.x!==a.position.x||s.y!==a.position.y)&&i.set({x:a.position.x,y:a.position.y}),e()!==a.scale&&e.set(a.scale),t.hasCompletedInitialLayout()&&TP({x:a.position.x,y:a.position.y,scale:a.scale})}}}var dce=.15,uce=.25,pce=.75,hce=.6;function OP(t){let i=k(()=>{let u=new Map;for(let h of t.graph().edges)u.has(h.from)||u.set(h.from,new Set),u.has(h.to)||u.set(h.to,new Set),u.get(h.from).add(h.to),u.get(h.to).add(h.from);return u}),e=u=>t.selectedNodeId()===u,n=u=>{let h=t.selectedNodeId();return h===null||h===u?!1:i().get(h)?.has(u)??!1},o=u=>{if(t.activeTagSelection()!==null)return!1;let h=t.selectedNodeId();return h===null||h===u?!1:!(i().get(h)?.has(u)??!1)},r=u=>{let h=t.selectedNodeId();return h!==null&&(u.from===h||u.to===h)},a=u=>{if(t.activeTagSelection()!==null)return!1;let h=t.selectedNodeId();return h===null?!1:u.from!==h&&u.to!==h},s=k(()=>{let u=t.selectedNodeId(),h=t.activeTagSelection()!==null,g=u!==null?i().get(u)??null:null,C=new Map;for(let M of t.graph().nodes){let S=M.id,N=u===S,q=!N&&u!==null&&(g?.has(S)??!1),$=!h&&u!==null&&!N&&!(g?.has(S)??!1);C.set(S,{selected:N,highlighted:q,dimmed:$})}return C}),c=k(()=>{let u=t.selectedNodeId(),h=t.activeTagSelection()!==null,g=new Map;for(let C of t.graph().edges){let M=u!==null&&(C.from===u||C.to===u),S=!h&&u!==null&&!M,N=typeof C.confidence=="number"?C.confidence:hce,q=S?dce:uce+pce*N;g.set(C.id,{highlighted:M,dimmed:S,opacity:q})}return g});return{isSelected:e,isHighlighted:n,isDimmed:o,isEdgeHighlighted:r,isEdgeDimmed:a,selectionView:s,edgeSelectionView:c}}function FP(t){let i=t.onCommit??Na,e=null,n=!1,o=null,r=()=>{queueMicrotask(()=>{if(!n){o=null;return}n=!1,o&&(t.nodePositions.set(o),o=null),i(t.nodePositions())})},a=(u,h)=>{o||(o=new Map(t.nodePositions())),o.set(u,{x:h.x,y:h.y,manual:!0}),n=!0},s=u=>{e={x:u.clientX,y:u.clientY},document.addEventListener("mouseup",r,{once:!0})},c=u=>{let h=e;if(e=null,!h)return!0;let g=u.clientX-h.x,C=u.clientY-h.y;return Math.hypot(g,C)<=4};return t.destroyRef.onDestroy(()=>{document.removeEventListener("mouseup",r)}),{onNodePositionChange:a,onNodePointerDown:s,isClickWithoutDrag:c}}function NP(t){let i=W(kP());return de(()=>{let r=new Set(t.nodes().map(s=>s.path));if(r.size===0)return;let a=pP(i(),r);a.dirty&&(i.set(a.next),cf(a.next))}),{isExpanded:r=>i().has(r),setExpanded:(r,a)=>{let s=i();if(s.has(r)===a)return;let c=new Set(s);a?c.add(r):c.delete(r),i.set(c),cf(c)},resetAll:()=>{i.set(new Set),cf(new Set)},expandedNodeIds:i}}function AP(t){let i=W(!1),e=!1,n=null;return de(()=>{let o=t.visibleNodes();e||o.length!==0&&queueMicrotask(()=>{e=!0,i.set(!0),t.savedViewport||t.fit()})}),de(()=>{let o=t.pathsFingerprint();if(!e){n=o;return}n!==o&&(n=o,(t.animatedFit??t.fit)())}),{hasCompletedInitialLayout:()=>i()}}function LP(t){let{points:i,wrap:e,panelW:n,zoomMin:o}=t;if(i.length===0)return null;let r=1/0,a=1/0,s=-1/0,c=-1/0;for(let Re of i)Re.x<r&&(r=Re.x),Re.y<a&&(a=Re.y),Re.x+260>s&&(s=Re.x+260),Re.y+120>c&&(c=Re.y+120);let u=Math.max(1,e.width-n),h=Math.max(1,s-r),g=Math.max(1,c-a),C=Math.max(1,u-160),M=Math.max(1,e.height-160),S=Math.min(C/h,M/g),N=Math.min(1,Math.max(o,S)),q=(r+s)/2,$=(a+c)/2,J=u/2-q*N,ce=e.height/2-$*N;return{position:{x:J,y:ce},scale:N}}function BP(t){let{point:i,wrap:e,panelW:n,scale:o}=t,r=i.x+260/2,a=i.y+120/2,c=Math.max(1,e.width-n)/2-r*o,u=e.height/2-a*o;return{position:{x:c,y:u},scale:o}}function u0(t,i,e){if(typeof requestAnimationFrame>"u"||e<=0){t.writePosition(i.position),t.writeScale(i.scale);return}let n=t.readPosition(),o=t.readScale(),r=performance.now(),a=s=>{if(t.isStaleToken())return;let c=Math.min(1,(s-r)/e),u=fce(c);t.writePosition({x:n.x+(i.position.x-n.x)*u,y:n.y+(i.position.y-n.y)*u}),t.writeScale(o+(i.scale-o)*u),c<1&&requestAnimationFrame(a)};requestAnimationFrame(a)}function fce(t){return 1-Math.pow(1-t,3)}var mce=["canvasWrap"],qP=(t,i)=>i.id;function _ce(t,i){if(t&1&&(f(0,"div",2),F(1,"span",8),f(2,"p",9),b(3),m()()),t&2){let e=d();l(3),x(e.texts.loading)}}function gce(t,i){if(t&1&&(f(0,"div",3),F(1,"span",10),f(2,"p",9),b(3),m(),f(4,"p",11),b(5),m()()),t&2){let e=d();l(3),x(e.texts.errorTitle),l(2),x(e.error())}}function vce(t,i){if(t&1){let e=Y();f(0,"div",4),F(1,"i",12),f(2,"p",13),b(3),m(),f(4,"p-button",14),L("onClick",function(){w(e);let o=d();return T(o.resetFilters())}),m()()}if(t&2){let e=d();l(3),x(e.texts.emptyTitle),l(),_("label",e.texts.resetFilters)("text",!0)}}function bce(t,i){if(t&1){let e=Y();f(0,"div",5),F(1,"i",15),f(2,"p",9),b(3),m(),f(4,"p-button",16),L("onClick",function(){w(e);let o=d();return T(o.mapVisibility.clear())}),m()()}if(t&2){let e=d();l(3),x(e.texts.curationEmptyTitle),l(),_("label",e.texts.showAllOnMap)("text",!0)}}function yce(t,i){if(t&1&&(f(0,"f-connection",36),X(),f(1,"svg",37),F(2,"circle",38),m(),Ba(),F(3,"f-connection-marker-arrow",39),m()),t&2){let e=i.$implicit,n=d(2),o=n.edgeSelectionFor(e.id);G("f-conn--"+e.kind),Oe("opacity",o.opacity),ae("f-conn--highlighted",o.highlighted)("f-conn--dimmed",o.dimmed),_("fOutputId",e.from+"-out")("fInputId",e.to+"-in")("fOutputSide",n.outputSide())("fInputSide",n.inputSide())("fType",n.connectionType())("fBehavior",n.connectionBehavior)("fReassignDisabled",!0),l(),_("type",n.markerStart)("width",9)("height",9)("refX",4.5)("refY",4.5),l(2),_("type",n.markerEnd)}}function Cce(t,i){if(t&1){let e=Y();we(0,23),f(1,"div",41),L("fNodePositionChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,o))})("pointerdown",function(o){w(e);let r=d(3);return T(r.onNodePointerDown(o))})("click",function(o){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,o))})("dblclick",function(){let o=w(e).$implicit,r=d(3);return T(r.openNode(o))}),f(2,"sm-node-card",42),L("expandedChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,o))})("favoriteToggle",function(o){w(e);let r=d(3);return T(r.onFavoriteToggle(o))}),m(),f(3,"div",43),F(4,"sm-view-contributions-host",44),m()(),Te()}if(t&2){let e=i.$implicit,n=d(3);l(),_("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fInputConnectableSide",n.inputSide())("fOutputId",e.id+"-out")("fOutputConnectableSide",n.outputSide()),O("data-testid","graph-node-"+e.id),l(),_("node",e.view)("stats",e.stats)("summary",e.summary)("selection",n.selectionFor(e.id))("expanded",n.isExpanded(e.id))("isFavorite",e.view.isFavorite===!0),l(2),_("node",e.view)}}function xce(t,i){if(t&1&&D(0,Cce,5,14,"ng-container",40),t&2){let e=d(2);_("fVirtualForOf",e.graph().nodes)}}function wce(t,i){if(t&1){let e=Y();f(0,"div",46),L("fNodePositionChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,o))})("pointerdown",function(o){w(e);let r=d(3);return T(r.onNodePointerDown(o))})("click",function(o){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,o))})("dblclick",function(){let o=w(e).$implicit,r=d(3);return T(r.openNode(o))}),f(1,"sm-node-card",42),L("expandedChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,o))})("favoriteToggle",function(o){w(e);let r=d(3);return T(r.onFavoriteToggle(o))}),m(),f(2,"div",43),F(3,"sm-view-contributions-host",44),m()()}if(t&2){let e=i.$implicit,n=d(3);_("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fOutputId",e.id+"-out"),O("data-testid","graph-node-"+e.id),l(),_("node",e.view)("stats",e.stats)("summary",e.summary)("selection",n.selectionFor(e.id))("expanded",n.isExpanded(e.id))("isFavorite",e.view.isFavorite===!0),l(2),_("node",e.view)}}function Tce(t,i){if(t&1&&(we(0,23),ue(1,wce,4,12,"div",45,qP),Te()),t&2){let e=d(2);l(),pe(e.graph().nodes)}}function Sce(t,i){if(t&1&&F(0,"sm-perf-hud",29),t&2){let e=d(2);_("visible",e.visibleCount())("total",e.totalCount())("edges",e.edgeCount())}}function kce(t,i){if(t&1){let e=Y();F(0,"span",34),f(1,"p-button",47),L("onClick",function(){w(e);let o=d(2);return T(o.mapVisibility.clear())}),m()}if(t&2){let e=d(2);l(),_("label",e.texts.toolbar.showAllLabel)("ariaLabel",e.texts.toolbar.showAllAria)("pTooltip",e.texts.toolbar.showAllTooltip)("text",!0)}}function Ice(t,i){if(t&1){let e=Y();f(0,"div",17,0),L("click",function(o){w(e);let r=d();return T(r.onCanvasClick(o))}),f(2,"f-flow",18),L("fLoaded",function(){w(e);let o=d();return T(o.onLoaded())}),F(3,"f-selection-area"),f(4,"f-background"),F(5,"f-rect-pattern"),m(),F(6,"f-line-alignment",19),f(7,"f-canvas",20),L("fCanvasChange",function(o){w(e);let r=d();return T(r.onCanvasChange(o))}),we(8,21),ue(9,yce,4,21,"f-connection",22,qP),Te(),P(11,xce,1,1,"ng-container",23)(12,Tce,3,0,"ng-container",23),m(),F(13,"f-minimap"),m(),f(14,"div",24),F(15,"sm-kind-palette")(16,"sm-severity-palette")(17,"sm-link-kind-palette"),m(),f(18,"aside",25)(19,"div",26),L("mousedown",function(o){w(e);let r=d();return T(r.onPanelResizeStart(o))}),m(),f(20,"div",27)(21,"sm-inspector-view",28),L("tagSelect",function(o){w(e);let r=d();return T(r.onTagSelect(o))}),m()()(),P(22,Sce,1,3,"sm-perf-hud",29),f(23,"div",30)(24,"p-button",31),L("onClick",function(){w(e);let o=d();return T(o.zoomIn())}),m(),f(25,"p-button",32),L("onClick",function(){w(e);let o=d();return T(o.zoomOut())}),m(),f(26,"p-button",33),L("onClick",function(){w(e);let o=d();return T(o.fitToScreen())}),m(),F(27,"span",34)(28,"sm-graph-layout-toolbar")(29,"span",34),f(30,"p-button",35),L("onClick",function(){w(e);let o=d();return T(o.resetLayout())}),m(),P(31,kce,2,4),m()()}if(t&2){let e=d();_("smMiddleMousePan",e.canvas()),l(2),_("fCache",e.perf.cache),l(4),_("fAlignThreshold",20),l(),_("position",e.viewportPosition())("scale",e.viewportScale())("fZoomStep",.06)("fZoomDblClickStep",.35)("fZoomMinimum",e.zoomMin)("fZoomMaximum",e.zoomMax)("debounceTime",150),l(2),pe(e.graph().edges),l(2),R(e.perf.virtualization?11:12),l(7),Oe("width",e.clampedPanelWidth(),"px"),ae("is-open",e.selectedNodeId()!==null),O("aria-label",e.texts.a11y.panel),l(),O("aria-label",e.texts.panel.resizeLabel),l(2),_("path",e.selectedPath())("activeTag",e.activeTagSelection()),l(),R(e.perfHud()?22:-1),l(),Oe("--sm-graph-inspector-w",e.reservedPanelWidth()+"px"),O("aria-label",e.texts.a11y.toolbar),l(),_("ariaLabel",e.texts.toolbar.zoomIn)("pTooltip",e.texts.toolbar.zoomIn)("text",!0)("rounded",!0)("disabled",!e.canZoomIn()),l(),_("ariaLabel",e.texts.toolbar.zoomOut)("pTooltip",e.texts.toolbar.zoomOut)("text",!0)("rounded",!0)("disabled",!e.canZoomOut()),l(),_("ariaLabel",e.texts.toolbar.fitToScreen)("pTooltip",e.texts.toolbar.fitToScreen)("text",!0)("rounded",!0),l(4),_("ariaLabel",e.texts.toolbar.resetLayoutLabel)("pTooltip",e.texts.toolbar.resetLayoutTooltip)("text",!0)("rounded",!0),l(),R(e.mapVisibility.isActive()?31:-1)}}var zP=.2,HP=420,Ece={selected:!1,highlighted:!1,dimmed:!1},Mce={highlighted:!1,dimmed:!1,opacity:1},pf=(()=>{class t{loader=p(Ot);filters=p(en);issuePaths=p(ho);mapVisibility=p(Kn);graphPreferences=p(tf);router=p(Ya);route=p(Ka);confirmationService=p(xf);destroyRef=p(vt);dagreLayout=p(Xg);injector=p(ft);usageTracker=p(kv);flow=nt(na);canvas=nt(ta);zoom=nt(ia);canvasWrap=nt("canvasWrap");connectionType=this.graphPreferences.connectionType;connectionBehavior=Jn.FIXED;markerStart=Le.START_ALL_STATES;markerEnd=Le.END_ALL_STATES;perf=ef.graph.perf;perfHud=p(LD).visible;savedViewport=wP();viewportStore=RP({savedViewport:this.savedViewport,hasCompletedInitialLayout:()=>this.layoutFit.hasCompletedInitialLayout()});viewportPosition=this.viewportStore.viewportPosition;viewportScale=this.viewportStore.viewportScale;canZoomIn=this.viewportStore.canZoomIn;canZoomOut=this.viewportStore.canZoomOut;zoomMin=c0;zoomMax=d0;texts=gi;nodePositions=W(SP());nodeDrag=FP({destroyRef:this.destroyRef,nodePositions:this.nodePositions});expansion=NP({nodes:this.loader.nodes});panelResize=DP({destroyRef:this.destroyRef,initialWidth:IP()??uf,onCommit:e=>EP(e)});clampedPanelWidth=this.panelResize.clampedPanelWidth;loading=this.loader.loading;error=this.loader.error;visibleNodes=k(()=>this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity(),{includeSearch:this.filters.searchAffectsMap()}));topology=k(()=>Ev(this.loader.nodes(),this.loader.scan()));layoutPositions=W(new Map);layoutComputedAtSignal=W(0);fullLayout=k(()=>Bt(me({},this.topology()),{positions:this.layoutPositions(),computedAt:this.layoutComputedAtSignal()}));mapVisiblePaths=k(()=>{let e=this.visibleNodes().map(o=>o.path),n=this.mapVisibility.paths();return n.size===0?new Set(e):new Set(e.filter(o=>n.has(o)))});graph=k(()=>{let e=this.mapVisiblePaths(),n=this.filters.selectedLinkKinds(),o=n.length>0?new Set(n):null;return Mv(this.fullLayout(),e,this.nodePositions(),o)});fullAdjacency=k(()=>{let e=new Map,n=(o,r)=>{let a=e.get(o);a||(a=new Set,e.set(o,a)),a.add(r)};for(let o of this.fullLayout().edges)n(o.from,o.to),n(o.to,o.from);return e});hasData=k(()=>this.graph().nodes.length>0);showEmptyState=k(()=>!this.hasData()&&!this.mapVisibility.isActive()&&!this.filters.kindToggleExplicitEmpty()&&this.filters.searchText().trim().length===0);showCurationEmptyState=k(()=>!this.hasData()&&this.mapVisibility.isActive());visibleCount=k(()=>this.graph().nodes.length);totalCount=k(()=>this.loader.nodes().length);edgeCount=k(()=>this.graph().edges.length);layoutComputedAt=k(()=>this.layoutComputedAtSignal());connectionSides=k(()=>fD(this.graphPreferences.layoutAlgorithm(),this.graphPreferences.layoutDirection()));inputSide=k(()=>this.connectionSides().input);outputSide=k(()=>this.connectionSides().output);selectedNodeId=W(null);selectedPath=k(()=>{let e=this.selectedNodeId();return e?this.graph().nodes.find(o=>o.id===e)?.view.path:void 0});reservedPanelWidth=k(()=>this.selectedNodeId()!==null?this.clampedPanelWidth():0);selectionGuard=de(()=>{let e=this.selectedNodeId();if(e===null)return;this.graph().nodes.some(o=>o.id===e)||this.selectedNodeId.set(null)});pathsFingerprint=k(()=>this.loader.nodes().map(e=>e.path).sort().join("|"));layoutFit=AP({visibleNodes:this.visibleNodes,pathsFingerprint:this.pathsFingerprint,savedViewport:this.savedViewport,fit:()=>this.fitToScreenClamped(),animatedFit:()=>this.animatedFitToScreen()});constructor(){let e=k(()=>this.loader.nodes().map(r=>({id:r.path,view:{path:r.path}})),{equal:(r,a)=>{if(r.length!==a.length)return!1;for(let s=0;s<r.length;s++)if(r[s]?.id!==a[s]?.id)return!1;return!0}});fP({selectedPath:this.selectedPath,setSelectedNodeId:r=>this.selectedNodeId.set(r),readSelectedNodeId:()=>this.selectedNodeId(),graphNodes:e,onDeepLinkSelect:r=>{this.pendingCenterNodeId.set(r)},router:this.router,route:this.route}),de(()=>{let r=this.loader.nodes();if(r.length===0)return;let a=this.fullLayout();if(a.positions.size===0)return;let s=hP({nodes:r,current:this.nodePositions(),layout:a});s.dirty&&(this.nodePositions.set(s.next),Na(s.next))}),de(()=>{this.layoutComputedAt(),this.autoFitPending&&(this.autoFitPending=!1,this.runAnimatedFit())}),de(()=>{this.layoutComputedAt();let r=this.layoutFit.hasCompletedInitialLayout(),a=this.pendingCenterNodeId();a===null||!r||this.fullLayout().positions.size!==0&&(this.pendingCenterNodeId.set(null),Ji(()=>this.centerOnNode(a),{injector:this.injector}))}),de(()=>{this.mapVisibility.paths(),Xt(()=>this.layoutFit.hasCompletedInitialLayout())&&(this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=setTimeout(()=>{Ji(()=>this.runAnimatedFit(),{injector:this.injector})},180))}),this.destroyRef.onDestroy(()=>{this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce)}),de(()=>{let r=this.loader.nodes();r.length!==0&&this.mapVisibility.prune(new Set(r.map(a=>a.path)))});let n="",o="";de(()=>{let r=this.loader.nodes(),a=this.topology(),s={algorithm:this.graphPreferences.layoutAlgorithm(),direction:this.graphPreferences.layoutDirection(),spacing:this.graphPreferences.layoutSpacing()};if(r.length===0)return;let c=Iv(r,a.edges),u=`${s.algorithm}|${s.direction}|${s.spacing}`,h=`${c}|${u}`;if(h===n)return;let g=o!==""&&o!==u;n=h,o=u,(s.algorithm==="force"?Promise.resolve(Ef(r,a.edges)):Promise.resolve().then(()=>If(this.dagreLayout,r,a.edges,s))).then(M=>{this.layoutPositions.set(M),this.layoutComputedAtSignal.set(performance.now()),g&&(this.nodePositions.set(new Map),this.fitToScreenClamped())}).catch(M=>{console.error("[graph-view] layout failed:",M)})})}ngOnInit(){this.loader.nodes().length===0&&!this.loader.loading()&&this.loader.load()}onLoaded(){}onCanvasChange=this.viewportStore.onCanvasChange;fitToScreenClamped(){let e=this.canvas(),n=this.zoom();e&&(e.fitToScreen({x:40,y:40},!1),Ji(()=>{let o=e.transform.scale;if(o<=1&&o>=this.zoomMin)return;let r=Math.max(this.zoomMin,Math.min(o,1)),a=Math.abs(o-r),s=o>r?mn.ZOOM_OUT:mn.ZOOM_IN;n?.setZoom(this.getViewportCenter(),a,s,!1)},{injector:this.injector}))}autoFitAnimToken=0;autoFitPending=!1;mapFitDebounce=null;pendingCenterNodeId=W(null);animatedFitToScreen(){this.autoFitPending=!0}runAnimatedFit(){let e=this.computeVisibleFitTransform();if(!e)return;let n=++this.autoFitAnimToken;u0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:o=>this.viewportPosition.set(o),writeScale:o=>this.viewportScale.set(o),isStaleToken:()=>n!==this.autoFitAnimToken},e,HP)}computeVisibleFitTransform(){let e=this.canvasWrap()?.nativeElement;if(!e)return null;let n=this.fullLayout().positions;if(n.size===0)return null;let o=this.nodePositions(),r=[];for(let a of this.mapVisiblePaths()){let s=o.get(a)??n.get(a);s&&r.push({x:s.x,y:s.y})}return r.length===0?null:LP({points:r,wrap:{width:e.clientWidth,height:e.clientHeight},panelW:this.reservedPanelWidth(),zoomMin:this.zoomMin})}snapToVisibleFit(){let e=this.computeVisibleFitTransform();e&&(++this.autoFitAnimToken,this.viewportPosition.set(e.position),this.viewportScale.set(e.scale))}centerOnNode(e){if(!this.mapVisiblePaths().has(e))return;let n=this.canvasWrap()?.nativeElement;if(!n)return;let o=this.nodePositions().get(e)??this.fullLayout().positions.get(e);if(!o)return;let r=BP({point:o,wrap:{width:n.clientWidth,height:n.clientHeight},panelW:this.reservedPanelWidth(),scale:this.viewportScale()}),a=++this.autoFitAnimToken;u0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:s=>this.viewportPosition.set(s),writeScale:s=>this.viewportScale.set(s),isStaleToken:()=>a!==this.autoFitAnimToken},r,HP)}isolateNeighborhood(e){this.mapVisibility.isolate(e,hD(this.fullAdjacency(),e))==="isolated"&&this.selectedNodeId.set(e)}onNodePositionChange(e,n){this.nodeDrag.onNodePositionChange(e,n)}zoomIn(){this.zoom()?.setZoom(this.getViewportCenter(),zP,mn.ZOOM_IN,!0)}zoomOut(){this.zoom()?.setZoom(this.getViewportCenter(),zP,mn.ZOOM_OUT,!0)}fitToScreen(){this.snapToVisibleFit()}resetLayout(){let e=this.mapVisiblePaths(),n=e.size>=this.loader.nodes().length;if(![...this.nodePositions().values()].some(a=>a.manual===!0)){this.applyResetLayout(e,n);return}let r=gi.resetLayoutConfirm;this.confirmationService.confirm({header:r.header,message:n?r.message:r.messageVisible,icon:"pi pi-info-circle",acceptButtonProps:{label:r.accept},rejectButtonProps:{label:r.reject,severity:"secondary",outlined:!0},accept:()=>this.applyResetLayout(e,n)})}applyResetLayout(e,n){if(this.expansion.resetAll(),n){this.nodePositions.set(new Map),this.snapToVisibleFit();return}this.relayoutVisibleSubset(e).then(()=>this.snapToVisibleFit()).catch(()=>{})}async relayoutVisibleSubset(e){let n=this.loader.nodes().filter(c=>e.has(c.path));if(n.length===0)return;let o=this.topology().edges.filter(c=>e.has(c.from)&&e.has(c.to)),r={algorithm:this.graphPreferences.layoutAlgorithm(),direction:this.graphPreferences.layoutDirection(),spacing:this.graphPreferences.layoutSpacing()},a=await Promise.resolve(r.algorithm==="force"?Ef(n,o):If(this.dagreLayout,n,o,r)),s=new Map(this.nodePositions());for(let[c,u]of a)s.set(c,{x:u.x,y:u.y,manual:!0});this.nodePositions.set(s),Na(s)}getViewportCenter(){let e=this.canvasWrap()?.nativeElement;if(!e)return{x:0,y:0};let n=e.getBoundingClientRect();return{x:n.width/2,y:n.height/2}}onNodePointerDown(e){this.nodeDrag.onNodePointerDown(e)}selectNode(e,n){this.nodeDrag.isClickWithoutDrag(n)&&(this.selectedNodeId.set(e.id),this.usageTracker.trackFeature("inspector"))}tagSelection=PP({nodes:this.loader.nodes,mapVisibility:this.mapVisibility});activeTagSelection=this.tagSelection.activeTagSelection;selectionState=OP({graph:this.graph,selectedNodeId:this.selectedNodeId,activeTagSelection:this.activeTagSelection});onTagSelect(e){this.tagSelection.onTagSelect(e)}closePanel(){this.selectedNodeId.set(null)}onEscape(){this.selectedNodeId()!==null&&(typeof document<"u"&&vP(document)||this.closePanel())}resetFilters(){this.filters.reset()}onPanelResizeStart(e){this.panelResize.onPanelResizeStart(e)}openNode(e){this.selectedNodeId.set(e.id)}onCanvasClick(e){let n=e.target;n?.closest(".sm-gnode")||n?.closest(".graph__toolbar")||n?.closest(".perf-hud")||n?.closest(".kind-palette")||n?.closest(".graph__panel")||this.selectedNodeId.set(null)}isSelected(e){return this.selectionState.isSelected(e)}isHighlighted(e){return this.selectionState.isHighlighted(e)}isDimmed(e){return this.selectionState.isDimmed(e)}selectionFor(e){return this.selectionState.selectionView().get(e)??Ece}isExpanded(e){return this.expansion.isExpanded(e)}setExpanded(e,n){this.expansion.setExpanded(e,n)}onFavoriteToggle(e){this.loader.toggleFavorite(e.path,e.value)}edgeSelectionFor(e){return this.selectionState.edgeSelectionView().get(e)??Mce}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-view"]],viewQuery:function(n,o){n&1&&dn(o.flow,na,5)(o.canvas,ta,5)(o.zoom,ia,5)(o.canvasWrap,mce,5),n&2&&Vt(4)},hostBindings:function(n,o){n&1&&L("keydown.escape",function(){return o.onEscape()},Ha)},features:[Me([xf,nC(Xg,{mode:Qn.MANUAL})])],decls:7,vars:2,consts:[["canvasWrap",""],["data-testid","graph-view",1,"graph"],["data-testid","graph-loading",1,"empty-state"],["data-testid","graph-error",1,"empty-state"],["data-testid","graph-empty",1,"empty-state"],["data-testid","graph-curation-empty",1,"empty-state"],["data-testid","graph-canvas-wrap",1,"graph__canvas-wrap",3,"smMiddleMousePan"],["styleClass","graph__confirm","maskStyleClass","graph__confirm-mask","data-testid","graph-reset-layout-confirm",3,"ariaLabel"],[1,"empty-state__icon","fa-solid","fa-spinner","fa-spin"],[1,"empty-state__title"],[1,"empty-state__icon","empty-state__icon--error","fa-solid","fa-circle-exclamation"],[1,"empty-state__desc"],["aria-hidden","true",1,"pi","pi-filter-slash","empty-state__icon"],["data-testid","graph-empty-filtered",1,"empty-state__title"],["size","small","data-testid","graph-reset-filters",3,"onClick","label","text"],["aria-hidden","true",1,"pi","pi-eye-slash","empty-state__icon"],["size","small","data-testid","graph-show-all-on-map",3,"onClick","label","text"],["data-testid","graph-canvas-wrap",1,"graph__canvas-wrap",3,"click","smMiddleMousePan"],["fDraggable","",3,"fLoaded","fCache"],[3,"fAlignThreshold"],["fZoom","",3,"fCanvasChange","position","scale","fZoomStep","fZoomDblClickStep","fZoomMinimum","fZoomMaximum","debounceTime"],["ngProjectAs","[fConnections]",5,["","fConnections",""]],[3,"fOutputId","fInputId","fOutputSide","fInputSide","fType","fBehavior","fReassignDisabled","class","f-conn--highlighted","f-conn--dimmed","opacity"],["ngProjectAs","[fNodes]",5,["","fNodes",""]],[1,"graph__filter-stack"],["role","complementary","data-testid","graph-panel",1,"graph__panel"],["role","separator","aria-orientation","vertical","data-testid","graph-panel-resize",1,"graph__panel-resize",3,"mousedown"],[1,"graph__panel-scroll"],[3,"tagSelect","path","activeTag"],[3,"visible","total","edges"],["role","toolbar","data-testid","graph-toolbar",1,"graph__toolbar"],["icon","pi pi-search-plus","severity","secondary","size","small","data-testid","graph-zoom-in",3,"onClick","ariaLabel","pTooltip","text","rounded","disabled"],["icon","pi pi-search-minus","severity","secondary","size","small","data-testid","graph-zoom-out",3,"onClick","ariaLabel","pTooltip","text","rounded","disabled"],["icon","pi pi-stop","severity","secondary","size","small","data-testid","graph-fit-to-screen",3,"onClick","ariaLabel","pTooltip","text","rounded"],["aria-hidden","true",1,"graph__toolbar-sep"],["icon","pi pi-history","severity","secondary","size","small","data-testid","graph-reset-layout",3,"onClick","ariaLabel","pTooltip","text","rounded"],[3,"fOutputId","fInputId","fOutputSide","fInputSide","fType","fBehavior","fReassignDisabled"],["fMarker","","viewBox","0 0 9 9","markerUnits","userSpaceOnUse",1,"sm-edge-dot",3,"type","width","height","refX","refY"],["cx","4.5","cy","4.5","r","3.5"],[3,"type"],["ngProjectAs","[fNodes]",5,["","fNodes",""],4,"fVirtualFor","fVirtualForOf"],["fNode","","fDragHandle","","fNodeInput","","fNodeOutput","",1,"sm-gnode-host",3,"fNodePositionChange","pointerdown","click","dblclick","fNodeId","fNodePosition","fInputId","fInputConnectableSide","fOutputId","fOutputConnectableSide"],[3,"expandedChange","favoriteToggle","node","stats","summary","selection","expanded","isFavorite"],[1,"sm-gnode__marker-anchor"],["slot","graph.node.alert",3,"node"],["fNode","","fDragHandle","","fNodeInput","","fNodeOutput","","fInputConnectableSide","top","fOutputConnectableSide","bottom",1,"sm-gnode-host",3,"fNodeId","fNodePosition","fInputId","fOutputId"],["fNode","","fDragHandle","","fNodeInput","","fNodeOutput","","fInputConnectableSide","top","fOutputConnectableSide","bottom",1,"sm-gnode-host",3,"fNodePositionChange","pointerdown","click","dblclick","fNodeId","fNodePosition","fInputId","fOutputId"],["icon","pi pi-eye","severity","secondary","size","small","data-testid","graph-show-all-toolbar",3,"onClick","label","ariaLabel","pTooltip","text"]],template:function(n,o){n&1&&(f(0,"section",1),P(1,_ce,4,1,"div",2)(2,gce,6,2,"div",3)(3,vce,5,3,"div",4)(4,bce,5,3,"div",5)(5,Ice,32,42,"div",6),F(6,"p-confirmdialog",7),m()),n&2&&(l(),R(o.loading()&&!o.hasData()?1:o.error()&&!o.hasData()?2:o.showEmptyState()?3:o.showCurationEmptyState()?4:5),l(5),_("ariaLabel",o.texts.resetLayoutConfirm.header))},dependencies:[pC,na,ta,rC,oC,ia,cC,by,yy,aC,Vy,qy,sC,lC,bh,By,dC,Jy,yD,TD,kD,PD,OD,ND,dP,yn,hn,uv,dv,Be,Ue,$n,uP],styles:['[_nghost-%COMP%]{display:block;height:100%}.graph[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.graph__canvas-wrap[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0;background:var(--sm-bg-content);overflow:hidden;--ff-connection-drag-handle-stroke: transparent;--ff-connection-drag-handle-fill: transparent;--ff-canvas-background-color: transparent}.graph__filter-stack[_ngcontent-%COMP%]{position:absolute;top:16px;left:16px;z-index:2;display:flex;flex-direction:column;gap:8px;pointer-events:none}.graph__filter-stack[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:auto}.graph__canvas-wrap[_ngcontent-%COMP%] f-flow[_ngcontent-%COMP%]{width:100%;height:100%}.graph__canvas-wrap[_ngcontent-%COMP%] .f-connection-drag-handle{fill:transparent;stroke:transparent}.graph__panel[_ngcontent-%COMP%]{position:absolute;top:0;right:0;bottom:0;background:var(--sm-bg-content);border-left:1px solid var(--sm-border);box-shadow:var(--sm-shadow-panel);transform:translate(100%);transition:transform .22s ease;z-index:20;pointer-events:none;display:flex;overflow:hidden}.graph__panel.is-open[_ngcontent-%COMP%]{transform:translate(0);pointer-events:auto}.graph__panel-scroll[_ngcontent-%COMP%]{flex:1;min-height:0;min-width:0;overflow-y:auto}.graph__panel-resize[_ngcontent-%COMP%]{position:absolute;top:0;left:-3px;bottom:0;width:6px;cursor:ew-resize;z-index:2}.graph__panel-resize[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:4px;background:transparent;transition:background .12s ease}.graph__panel-resize[_ngcontent-%COMP%]:hover:after, .graph__panel-resize[_ngcontent-%COMP%]:active:after{background:var(--p-primary-color)}.graph__toolbar[_ngcontent-%COMP%]{position:absolute;bottom:16px;left:50%;transform:translate(calc(-50% - var(--sm-graph-inspector-w, 0px) / 2));display:flex;align-items:center;gap:2px;padding:4px;background:var(--sm-bg-content);border:1px solid var(--sm-border);border-radius:var(--sm-radius-pill);box-shadow:var(--sm-shadow-floating);z-index:2;pointer-events:auto;transition:transform .22s ease,box-shadow .22s ease}.graph__toolbar-sep[_ngcontent-%COMP%]{width:1px;height:18px;margin:0 2px;background:var(--sm-border);flex-shrink:0}.sm-gnode-host[_ngcontent-%COMP%]{position:relative;display:inline-block;cursor:pointer;--ff-node-width: auto;--ff-node-min-height: 0;--ff-node-padding: 0;--ff-node-background-color: transparent;--ff-node-border-color: transparent;--ff-node-border-color-selected: transparent;--ff-node-border-radius: 0;--ff-node-shadow: none;--ff-node-shadow-selected: none}.sm-gnode-host.f-selected[_ngcontent-%COMP%]{filter:drop-shadow(0 0 6px var(--p-primary-color-300))}.sm-gnode-host.f-selected[_ngcontent-%COMP%] > .sm-gnode[_ngcontent-%COMP%]{box-shadow:0 0 0 3px var(--p-primary-color),var(--sm-shadow-card)}.f-conn--invokes[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-invokes);--ff-connection-width: 1.5px;--ff-marker-color: var(--sm-edge-invokes)}.f-conn--references[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-references);--ff-connection-width: 1.25px;--ff-marker-color: var(--sm-edge-references)}.f-conn--points[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-points);--ff-connection-width: 1.25px;--ff-marker-color: var(--sm-edge-points)}.f-conn--mentions[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-mentions);--ff-connection-width: 1px;--ff-marker-color: var(--sm-edge-mentions)}.f-conn--highlighted[_ngcontent-%COMP%]{--ff-connection-width: 2px}.f-conn--dimmed[_ngcontent-%COMP%]{opacity:.15}.f-connection.f-selected[_ngcontent-%COMP%]{--ff-connection-width: 2.5px}.f-conn--invokes.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-invokes-active);--ff-connection-selected-color: var(--sm-edge-invokes-active);--ff-marker-color: var(--sm-edge-invokes-active)}.f-conn--references.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-references-active);--ff-connection-selected-color: var(--sm-edge-references-active);--ff-marker-color: var(--sm-edge-references-active)}.f-conn--points.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-points-active);--ff-connection-selected-color: var(--sm-edge-points-active);--ff-marker-color: var(--sm-edge-points-active)}.f-conn--mentions.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-mentions-active);--ff-connection-selected-color: var(--sm-edge-mentions-active);--ff-marker-color: var(--sm-edge-mentions-active)}.sm-gnode__marker-anchor[_ngcontent-%COMP%]{position:absolute;top:-10px;right:-10px;z-index:4;display:inline-flex;align-items:center;gap:.25rem;pointer-events:none;transition:opacity .15s ease}sm-node-card.sm-gnode--dimmed[_ngcontent-%COMP%] + .sm-gnode__marker-anchor[_ngcontent-%COMP%]{opacity:.25}sm-node-card.sm-gnode--deprecated[_ngcontent-%COMP%] + .sm-gnode__marker-anchor[_ngcontent-%COMP%]{opacity:.55}'],changeDetection:0})}return t})();var Aa=440,p0=280,Dce=480;function GP(t){let i=W(t.initialWidth),e=W(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&La(window,"resize").pipe(Un(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=()=>Math.max(p0,e()-Dce),o=k(()=>{let C=n(),M=i();return M>C||M<p0?Math.min(Aa,C):M}),r=null,a=null,s=null,c=()=>{s=null,a!==null&&(i.set(a),a=null)},u=C=>{if(!r)return;let M=C.clientX-r.mouseX,S=r.widthAtStart+M,N=n();a=Math.min(N,Math.max(p0,S)),s===null&&typeof window<"u"&&(s=window.requestAnimationFrame(c))},h=()=>{r&&(r=null,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",h),s!==null&&typeof window<"u"&&(window.cancelAnimationFrame(s),s=null),a!==null&&(i.set(a),a=null),t.onCommit(i()))};return{clampedRailWidth:o,onRailResizeStart:C=>{C.button===0&&(C.preventDefault(),C.stopPropagation(),r={mouseX:C.clientX,widthAtStart:o()},document.addEventListener("mousemove",u),document.addEventListener("mouseup",h))}}}var jP=(()=>{class t{router=p(Ya);route=p(Ka);open(e){this.router.navigate([],{relativeTo:this.route,queryParams:{path:e},queryParamsHandling:"merge"})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function Pce(t,i){if(t&1){let e=Y();f(0,"p-iconfield",6),F(1,"p-inputicon",7),f(2,"input",8),L("ngModelChange",function(o){w(e);let r=d();return T(r.onSearchChange(o))}),m()(),f(3,"button",9),L("click",function(){w(e);let o=d();return T(o.onToggleSearchMap())}),F(4,"i",10),m()}if(t&2){let e=d();l(2),_("placeholder",e.texts.rail.searchPlaceholder)("ngModel",e.searchText()),O("aria-label",e.texts.rail.searchAriaLabel),l(),ae("is-active",e.searchAffectsMap()),_("pTooltip",e.searchAffectsMap()?e.texts.rail.searchMapOn:e.texts.rail.searchMapOff),O("aria-label",e.searchAffectsMap()?e.texts.rail.searchMapOn:e.texts.rail.searchMapOff)("aria-pressed",e.searchAffectsMap())}}function Rce(t,i){if(t&1){let e=Y();f(0,"div",11),F(1,"sm-files-view"),m(),f(2,"div",12),L("mousedown",function(o){w(e);let r=d();return T(r.onRailResizeStart(o))}),m()}if(t&2){let e=d();l(2),O("aria-label",e.texts.rail.resize)}}var UP="sm.workspace.rail-width",$P="sm.workspace.rail-collapsed",ETe=(()=>{class t{store=p(en);destroyRef=p(vt);texts=Dv;railCollapsed=W(this.readStoredCollapsed());railAnimating=W(!1);railAnimTimer=null;searchText=this.store.searchText;searchAffectsMap=this.store.searchAffectsMap;graphView=nt(pf);isolate(e){this.graphView()?.isolateNeighborhood(e)}resize=GP({destroyRef:this.destroyRef,initialWidth:this.readStoredWidth(),onCommit:e=>this.writeStoredWidth(e)});clampedRailWidth=this.resize.clampedRailWidth;onRailResizeStart=this.resize.onRailResizeStart;toggleRail(){this.railCollapsed.update(e=>!e),this.writeStoredCollapsed(this.railCollapsed()),this.railAnimating.set(!0),this.railAnimTimer!==null&&clearTimeout(this.railAnimTimer),this.railAnimTimer=setTimeout(()=>this.railAnimating.set(!1),220)}onSearchChange(e){this.store.setSearchText(e)}onToggleSearchMap(){this.store.toggleSearchAffectsMap()}readStoredWidth(){if(typeof localStorage>"u")return Aa;let e=Number(localStorage.getItem(UP));return Number.isFinite(e)&&e>0?e:Aa}writeStoredWidth(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(UP,String(e))}catch{}}readStoredCollapsed(){if(typeof localStorage>"u")return!0;let e=localStorage.getItem($P);return e===null?!0:e==="1"}writeStoredCollapsed(e){if(!(typeof localStorage>"u"))try{localStorage.setItem($P,e?"1":"0")}catch{}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-workspace-view"]],viewQuery:function(n,o){n&1&&dn(o.graphView,pf,5),n&2&&Vt()},features:[Me([{provide:so,useClass:jP},{provide:ss,useExisting:Xi(()=>t)}])],decls:9,vars:15,consts:[["data-testid","workspace-view",1,"workspace"],["data-testid","workspace-rail",1,"workspace__rail"],[1,"workspace__rail-bar"],["type","button","tooltipPosition","bottom","data-testid","workspace-rail-toggle",1,"workspace__rail-btn",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],[1,"workspace__map"],["iconPosition","left",1,"workspace__search"],["styleClass","pi pi-search"],["pInputText","","pSize","small","type","text","data-testid","workspace-search",3,"ngModelChange","placeholder","ngModel"],["type","button","tooltipPosition","bottom","data-testid","workspace-search-map-toggle",1,"workspace__rail-btn","workspace__search-map-toggle",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-map"],[1,"workspace__rail-body"],["role","separator","aria-orientation","vertical","data-testid","workspace-rail-resize",1,"workspace__rail-resize",3,"mousedown"]],template:function(n,o){n&1&&(f(0,"div",0)(1,"aside",1)(2,"div",2),P(3,Pce,5,8),f(4,"button",3),L("click",function(){return o.toggleRail()}),F(5,"i",4),m()(),P(6,Rce,3,1),m(),f(7,"div",5),F(8,"sm-graph-view"),m()()),n&2&&(l(),Oe("width",o.railCollapsed()?null:o.clampedRailWidth(),"px"),ae("is-collapsed",o.railCollapsed())("is-animating",o.railAnimating()),O("aria-label",o.texts.rail.label),l(2),R(o.railCollapsed()?-1:3),l(),_("pTooltip",o.railCollapsed()?o.texts.rail.expand:o.texts.rail.collapse),O("aria-label",o.railCollapsed()?o.texts.rail.expand:o.texts.rail.collapse),l(),ae("pi-angle-left",!o.railCollapsed())("pi-angle-right",o.railCollapsed()),l(),R(o.railCollapsed()?-1:6))},dependencies:[Fb,pf,bt,P0,Pt,Rt,F0,O0,A0,N0,Ja,Qa,Be,Ue],styles:['.workspace[_ngcontent-%COMP%]{display:flex;height:100%;min-height:0}.workspace__rail[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;flex:0 0 auto;width:440px;min-width:0;min-height:0;background:var(--sm-bg-content);border-right:1px solid var(--sm-border)}.workspace__rail.is-collapsed[_ngcontent-%COMP%]{width:44px}.workspace__rail.is-animating[_ngcontent-%COMP%]{transition:width .18s ease}.workspace__rail-bar[_ngcontent-%COMP%]{display:flex;flex:0 0 auto;align-items:center;gap:.4rem;padding:.35rem .4rem;border-bottom:1px solid var(--sm-border)}.workspace__rail.is-collapsed[_ngcontent-%COMP%] .workspace__rail-bar[_ngcontent-%COMP%]{justify-content:center}.workspace__search[_ngcontent-%COMP%]{flex:1;min-width:0;display:block}.workspace__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.workspace__rail-btn[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:30px;height:30px;border:none;border-radius:var(--sm-radius-lg);background:transparent;color:var(--p-text-muted-color);cursor:pointer}.workspace__rail-btn[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background);color:var(--p-text-color)}.workspace__search-map-toggle.is-active[_ngcontent-%COMP%]{color:var(--p-primary-color);background:var(--p-highlight-background)}.workspace__rail-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.workspace__rail-body[_ngcontent-%COMP%] sm-files-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:.5rem}.workspace__rail-resize[_ngcontent-%COMP%]{position:absolute;top:0;right:-3px;bottom:0;width:6px;cursor:ew-resize;z-index:5}.workspace__rail-resize[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;right:3px;width:4px;background:transparent;transition:background .12s ease}.workspace__rail-resize[_ngcontent-%COMP%]:hover:after, .workspace__rail-resize[_ngcontent-%COMP%]:active:after{background:var(--p-primary-color)}.workspace__map[_ngcontent-%COMP%]{position:relative;flex:1;min-width:0;min-height:0}.workspace__map[_ngcontent-%COMP%] sm-graph-view[_ngcontent-%COMP%]{display:block;height:100%}'],changeDetection:0})}return t})();export{ETe as WorkspaceView};