@skill-map/cli 0.50.0 → 0.51.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.
@@ -0,0 +1,2312 @@
1
+ import{A as yo,a as W0,b as K0,c as Y0,d as Z0,e as rb,f as ab,g as ss,h as cs,i as ds,j as sb,k as lb,l as bo,m as cb,n as Bf,o as db,p as ub,q as Qn,r as Jn,t as pb,u as hb,v as fb,y as ps,z as hs}from"./chunk-Q5YJKCTP.js";import{A as Tb,C as Sb,D as kb,E as zf,F as Hf,G as Ib,a as eb,b as is,c as mo,d as tb,e as os,f as nb,g as rs,h as as,i as gr,j as Af,k as ib,l as dn,m as _o,n as us,o as gb,p as fs,q as bb,r as vb,s as yb,t as Cb,u as xb,v as wb,w as ms,z as ti}from"./chunk-RCT3JSFL.js";import{A as fo,B as ns,C as Ie,D as X0,E as Q0,F as _r,G as Ee,H as J0,I as Mn,J as Be,K as Ve,L as ob,M as go,N as Ce,O as Lf,P as ls,Q as Ot,R as zt,S as vo,T as mb,U as ei,V as Vf,Y as _b,Z as Ht,a as lt,c as uo,d as G0,e as Nf,f as j0,g as po,i as ct,j as Pe,k as Bt,l as bt,o as Xn,p as $0,q as ho,r as ln,s as cn,t as Vt,u as vt,v as Xt,w as fe,x as En}from"./chunk-VBTLX7GH.js";import{B as Ff,Ca as U0,D as L0,F as B0,H as V0,J as ts,O as fr,T as z0,V as H0,W as q0,a as yn,b as ur,ba as mr,k as pr,l as Rf,m as N0,n as A0,p as Pi,t as In,u as gt,w as Of,z as hr}from"./chunk-4SG4352Z.js";import{f as Ja,i as es}from"./chunk-AEA5GIA7.js";import{c as sn,e as co,f as Rt,g as Zn,h as wt,i as st,j as Zt}from"./chunk-WMGW2UAL.js";import{$ as St,$a as k,$b as If,Ab as ye,Bb as Ya,Cb as Za,Db as W,Dc as G,Ea as Ei,Eb as et,Ec as Se,Fa as Mi,Fb as A,Ga as Wa,Ha as l,Hb as d,Ib as Dt,J as Sn,Jb as Le,K as y,Kb as kt,L as rt,Lb as kn,Ma as lo,Mb as X,N as he,Na as E0,Nb as Q,O as ao,Ob as kf,P as p,Pa as M0,Pb as vn,Qa as bn,Qb as Kt,Ra as Ka,Rb as Lt,Sb as He,T as I0,Tb as ce,U as gn,Ub as Pt,V as w,Vb as z,W as T,Wa as H,Wb as b,X as $,Xa as at,Xb as C,Y as ja,Ya as Ue,Yb as ke,Z as mt,Za as _t,Zb as cr,_ as Ua,_a as Y,_b as R0,ac as Ef,ba as ie,bc as Mf,ca as on,cc as Yt,d as ro,dc as It,ec as Te,fc as ve,g as P,ga as te,gc as rn,hc as Fe,ia as _e,ib as O,ic as Yn,ja as so,jb as D0,jc as O0,ka as q,kb as P0,kc as Df,la as Xe,lb as M,lc as Xa,mb as D,mc as dr,n as k0,nb as Sf,nc as F0,ob as $e,oc as We,pa as $a,pb as se,qb as le,qc as an,rb as h,rc as E,sb as m,sc as tt,t as Ga,tb as _,tc as B,ub as F,uc as it,vb as J,vc as Qa,wb as ee,wc as Pf,xb as ae,xc as Di,yb as de,zb as ue}from"./chunk-VJ57LHDR.js";import{a as be,b as Wt,c as oo,e as v,g as c3}from"./chunk-WCABR6TI.js";var kC=v((Dge,SC)=>{"use strict";function fz(){this.__data__=[],this.size=0}SC.exports=fz});var Yi=v((Pge,IC)=>{"use strict";function mz(t,o){return t===o||t!==t&&o!==o}IC.exports=mz});var ca=v((Rge,EC)=>{"use strict";var _z=Yi();function gz(t,o){for(var e=t.length;e--;)if(_z(t[e][0],o))return e;return-1}EC.exports=gz});var DC=v((Oge,MC)=>{"use strict";var bz=ca(),vz=Array.prototype,yz=vz.splice;function Cz(t){var o=this.__data__,e=bz(o,t);if(e<0)return!1;var n=o.length-1;return e==n?o.pop():yz.call(o,e,1),--this.size,!0}MC.exports=Cz});var RC=v((Fge,PC)=>{"use strict";var xz=ca();function wz(t){var o=this.__data__,e=xz(o,t);return e<0?void 0:o[e][1]}PC.exports=wz});var FC=v((Nge,OC)=>{"use strict";var Tz=ca();function Sz(t){return Tz(this.__data__,t)>-1}OC.exports=Sz});var AC=v((Age,NC)=>{"use strict";var kz=ca();function Iz(t,o){var e=this.__data__,n=kz(e,t);return n<0?(++this.size,e.push([t,o])):e[n][1]=o,this}NC.exports=Iz});var da=v((Lge,LC)=>{"use strict";var Ez=kC(),Mz=DC(),Dz=RC(),Pz=FC(),Rz=AC();function jo(t){var o=-1,e=t==null?0:t.length;for(this.clear();++o<e;){var n=t[o];this.set(n[0],n[1])}}jo.prototype.clear=Ez;jo.prototype.delete=Mz;jo.prototype.get=Dz;jo.prototype.has=Pz;jo.prototype.set=Rz;LC.exports=jo});var VC=v((Bge,BC)=>{"use strict";var Oz=da();function Fz(){this.__data__=new Oz,this.size=0}BC.exports=Fz});var HC=v((Vge,zC)=>{"use strict";function Nz(t){var o=this.__data__,e=o.delete(t);return this.size=o.size,e}zC.exports=Nz});var GC=v((zge,qC)=>{"use strict";function Az(t){return this.__data__.get(t)}qC.exports=Az});var UC=v((Hge,jC)=>{"use strict";function Lz(t){return this.__data__.has(t)}jC.exports=Lz});var N_=v((qge,$C)=>{"use strict";var Bz=typeof global=="object"&&global&&global.Object===Object&&global;$C.exports=Bz});var hn=v((Gge,WC)=>{"use strict";var Vz=N_(),zz=typeof self=="object"&&self&&self.Object===Object&&self,Hz=Vz||zz||Function("return this")();WC.exports=Hz});var Zi=v((jge,KC)=>{"use strict";var qz=hn(),Gz=qz.Symbol;KC.exports=Gz});var QC=v((Uge,XC)=>{"use strict";var YC=Zi(),ZC=Object.prototype,jz=ZC.hasOwnProperty,Uz=ZC.toString,ua=YC?YC.toStringTag:void 0;function $z(t){var o=jz.call(t,ua),e=t[ua];try{t[ua]=void 0;var n=!0}catch{}var i=Uz.call(t);return n&&(o?t[ua]=e:delete t[ua]),i}XC.exports=$z});var e1=v(($ge,JC)=>{"use strict";var Wz=Object.prototype,Kz=Wz.toString;function Yz(t){return Kz.call(t)}JC.exports=Yz});var _i=v((Wge,i1)=>{"use strict";var t1=Zi(),Zz=QC(),Xz=e1(),Qz="[object Null]",Jz="[object Undefined]",n1=t1?t1.toStringTag:void 0;function eH(t){return t==null?t===void 0?Jz:Qz:n1&&n1 in Object(t)?Zz(t):Xz(t)}i1.exports=eH});var Jt=v((Kge,o1)=>{"use strict";function tH(t){var o=typeof t;return t!=null&&(o=="object"||o=="function")}o1.exports=tH});var Uo=v((Yge,r1)=>{"use strict";var nH=_i(),iH=Jt(),oH="[object AsyncFunction]",rH="[object Function]",aH="[object GeneratorFunction]",sH="[object Proxy]";function lH(t){if(!iH(t))return!1;var o=nH(t);return o==rH||o==aH||o==oH||o==sH}r1.exports=lH});var s1=v((Zge,a1)=>{"use strict";var cH=hn(),dH=cH["__core-js_shared__"];a1.exports=dH});var d1=v((Xge,c1)=>{"use strict";var A_=s1(),l1=(function(){var t=/[^.]+$/.exec(A_&&A_.keys&&A_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function uH(t){return!!l1&&l1 in t}c1.exports=uH});var L_=v((Qge,u1)=>{"use strict";var pH=Function.prototype,hH=pH.toString;function fH(t){if(t!=null){try{return hH.call(t)}catch{}try{return t+""}catch{}}return""}u1.exports=fH});var h1=v((Jge,p1)=>{"use strict";var mH=Uo(),_H=d1(),gH=Jt(),bH=L_(),vH=/[\\^$.*+?()[\]{}|]/g,yH=/^\[object .+?Constructor\]$/,CH=Function.prototype,xH=Object.prototype,wH=CH.toString,TH=xH.hasOwnProperty,SH=RegExp("^"+wH.call(TH).replace(vH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kH(t){if(!gH(t)||_H(t))return!1;var o=mH(t)?SH:yH;return o.test(bH(t))}p1.exports=kH});var m1=v((e0e,f1)=>{"use strict";function IH(t,o){return t?.[o]}f1.exports=IH});var gi=v((t0e,_1)=>{"use strict";var EH=h1(),MH=m1();function DH(t,o){var e=MH(t,o);return EH(e)?e:void 0}_1.exports=DH});var Ph=v((n0e,g1)=>{"use strict";var PH=gi(),RH=hn(),OH=PH(RH,"Map");g1.exports=OH});var pa=v((i0e,b1)=>{"use strict";var FH=gi(),NH=FH(Object,"create");b1.exports=NH});var C1=v((o0e,y1)=>{"use strict";var v1=pa();function AH(){this.__data__=v1?v1(null):{},this.size=0}y1.exports=AH});var w1=v((r0e,x1)=>{"use strict";function LH(t){var o=this.has(t)&&delete this.__data__[t];return this.size-=o?1:0,o}x1.exports=LH});var S1=v((a0e,T1)=>{"use strict";var BH=pa(),VH="__lodash_hash_undefined__",zH=Object.prototype,HH=zH.hasOwnProperty;function qH(t){var o=this.__data__;if(BH){var e=o[t];return e===VH?void 0:e}return HH.call(o,t)?o[t]:void 0}T1.exports=qH});var I1=v((s0e,k1)=>{"use strict";var GH=pa(),jH=Object.prototype,UH=jH.hasOwnProperty;function $H(t){var o=this.__data__;return GH?o[t]!==void 0:UH.call(o,t)}k1.exports=$H});var M1=v((l0e,E1)=>{"use strict";var WH=pa(),KH="__lodash_hash_undefined__";function YH(t,o){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=WH&&o===void 0?KH:o,this}E1.exports=YH});var P1=v((c0e,D1)=>{"use strict";var ZH=C1(),XH=w1(),QH=S1(),JH=I1(),eq=M1();function $o(t){var o=-1,e=t==null?0:t.length;for(this.clear();++o<e;){var n=t[o];this.set(n[0],n[1])}}$o.prototype.clear=ZH;$o.prototype.delete=XH;$o.prototype.get=QH;$o.prototype.has=JH;$o.prototype.set=eq;D1.exports=$o});var F1=v((d0e,O1)=>{"use strict";var R1=P1(),tq=da(),nq=Ph();function iq(){this.size=0,this.__data__={hash:new R1,map:new(nq||tq),string:new R1}}O1.exports=iq});var A1=v((u0e,N1)=>{"use strict";function oq(t){var o=typeof t;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?t!=="__proto__":t===null}N1.exports=oq});var ha=v((p0e,L1)=>{"use strict";var rq=A1();function aq(t,o){var e=t.__data__;return rq(o)?e[typeof o=="string"?"string":"hash"]:e.map}L1.exports=aq});var V1=v((h0e,B1)=>{"use strict";var sq=ha();function lq(t){var o=sq(this,t).delete(t);return this.size-=o?1:0,o}B1.exports=lq});var H1=v((f0e,z1)=>{"use strict";var cq=ha();function dq(t){return cq(this,t).get(t)}z1.exports=dq});var G1=v((m0e,q1)=>{"use strict";var uq=ha();function pq(t){return uq(this,t).has(t)}q1.exports=pq});var U1=v((_0e,j1)=>{"use strict";var hq=ha();function fq(t,o){var e=hq(this,t),n=e.size;return e.set(t,o),this.size+=e.size==n?0:1,this}j1.exports=fq});var Rh=v((g0e,$1)=>{"use strict";var mq=F1(),_q=V1(),gq=H1(),bq=G1(),vq=U1();function Wo(t){var o=-1,e=t==null?0:t.length;for(this.clear();++o<e;){var n=t[o];this.set(n[0],n[1])}}Wo.prototype.clear=mq;Wo.prototype.delete=_q;Wo.prototype.get=gq;Wo.prototype.has=bq;Wo.prototype.set=vq;$1.exports=Wo});var K1=v((b0e,W1)=>{"use strict";var yq=da(),Cq=Ph(),xq=Rh(),wq=200;function Tq(t,o){var e=this.__data__;if(e instanceof yq){var n=e.__data__;if(!Cq||n.length<wq-1)return n.push([t,o]),this.size=++e.size,this;e=this.__data__=new xq(n)}return e.set(t,o),this.size=e.size,this}W1.exports=Tq});var fa=v((v0e,Y1)=>{"use strict";var Sq=da(),kq=VC(),Iq=HC(),Eq=GC(),Mq=UC(),Dq=K1();function Ko(t){var o=this.__data__=new Sq(t);this.size=o.size}Ko.prototype.clear=kq;Ko.prototype.delete=Iq;Ko.prototype.get=Eq;Ko.prototype.has=Mq;Ko.prototype.set=Dq;Y1.exports=Ko});var Oh=v((y0e,Z1)=>{"use strict";function Pq(t,o){for(var e=-1,n=t==null?0:t.length;++e<n&&o(t[e],e,t)!==!1;);return t}Z1.exports=Pq});var B_=v((C0e,X1)=>{"use strict";var Rq=gi(),Oq=(function(){try{var t=Rq(Object,"defineProperty");return t({},"",{}),t}catch{}})();X1.exports=Oq});var ma=v((x0e,J1)=>{"use strict";var Q1=B_();function Fq(t,o,e){o=="__proto__"&&Q1?Q1(t,o,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[o]=e}J1.exports=Fq});var _a=v((w0e,ex)=>{"use strict";var Nq=ma(),Aq=Yi(),Lq=Object.prototype,Bq=Lq.hasOwnProperty;function Vq(t,o,e){var n=t[o];(!(Bq.call(t,o)&&Aq(n,e))||e===void 0&&!(o in t))&&Nq(t,o,e)}ex.exports=Vq});var Yo=v((T0e,tx)=>{"use strict";var zq=_a(),Hq=ma();function qq(t,o,e,n){var i=!e;e||(e={});for(var r=-1,a=o.length;++r<a;){var s=o[r],c=n?n(e[s],t[s],s,e,t):void 0;c===void 0&&(c=t[s]),i?Hq(e,s,c):zq(e,s,c)}return e}tx.exports=qq});var ix=v((S0e,nx)=>{"use strict";function Gq(t,o){for(var e=-1,n=Array(t);++e<t;)n[e]=o(e);return n}nx.exports=Gq});var Tn=v((k0e,ox)=>{"use strict";function jq(t){return t!=null&&typeof t=="object"}ox.exports=jq});var ax=v((I0e,rx)=>{"use strict";var Uq=_i(),$q=Tn(),Wq="[object Arguments]";function Kq(t){return $q(t)&&Uq(t)==Wq}rx.exports=Kq});var Zo=v((E0e,cx)=>{"use strict";var sx=ax(),Yq=Tn(),lx=Object.prototype,Zq=lx.hasOwnProperty,Xq=lx.propertyIsEnumerable,Qq=sx((function(){return arguments})())?sx:function(t){return Yq(t)&&Zq.call(t,"callee")&&!Xq.call(t,"callee")};cx.exports=Qq});var ht=v((M0e,dx)=>{"use strict";var Jq=Array.isArray;dx.exports=Jq});var px=v((D0e,ux)=>{"use strict";function eG(){return!1}ux.exports=eG});var Xi=v((ga,Xo)=>{"use strict";var tG=hn(),nG=px(),mx=typeof ga=="object"&&ga&&!ga.nodeType&&ga,hx=mx&&typeof Xo=="object"&&Xo&&!Xo.nodeType&&Xo,iG=hx&&hx.exports===mx,fx=iG?tG.Buffer:void 0,oG=fx?fx.isBuffer:void 0,rG=oG||nG;Xo.exports=rG});var ba=v((P0e,_x)=>{"use strict";var aG=9007199254740991,sG=/^(?:0|[1-9]\d*)$/;function lG(t,o){var e=typeof t;return o=o??aG,!!o&&(e=="number"||e!="symbol"&&sG.test(t))&&t>-1&&t%1==0&&t<o}_x.exports=lG});var Fh=v((R0e,gx)=>{"use strict";var cG=9007199254740991;function dG(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=cG}gx.exports=dG});var vx=v((O0e,bx)=>{"use strict";var uG=_i(),pG=Fh(),hG=Tn(),fG="[object Arguments]",mG="[object Array]",_G="[object Boolean]",gG="[object Date]",bG="[object Error]",vG="[object Function]",yG="[object Map]",CG="[object Number]",xG="[object Object]",wG="[object RegExp]",TG="[object Set]",SG="[object String]",kG="[object WeakMap]",IG="[object ArrayBuffer]",EG="[object DataView]",MG="[object Float32Array]",DG="[object Float64Array]",PG="[object Int8Array]",RG="[object Int16Array]",OG="[object Int32Array]",FG="[object Uint8Array]",NG="[object Uint8ClampedArray]",AG="[object Uint16Array]",LG="[object Uint32Array]",Qe={};Qe[MG]=Qe[DG]=Qe[PG]=Qe[RG]=Qe[OG]=Qe[FG]=Qe[NG]=Qe[AG]=Qe[LG]=!0;Qe[fG]=Qe[mG]=Qe[IG]=Qe[_G]=Qe[EG]=Qe[gG]=Qe[bG]=Qe[vG]=Qe[yG]=Qe[CG]=Qe[xG]=Qe[wG]=Qe[TG]=Qe[SG]=Qe[kG]=!1;function BG(t){return hG(t)&&pG(t.length)&&!!Qe[uG(t)]}bx.exports=BG});var va=v((F0e,yx)=>{"use strict";function VG(t){return function(o){return t(o)}}yx.exports=VG});var Nh=v((ya,Qo)=>{"use strict";var zG=N_(),Cx=typeof ya=="object"&&ya&&!ya.nodeType&&ya,Ca=Cx&&typeof Qo=="object"&&Qo&&!Qo.nodeType&&Qo,HG=Ca&&Ca.exports===Cx,V_=HG&&zG.process,qG=(function(){try{var t=Ca&&Ca.require&&Ca.require("util").types;return t||V_&&V_.binding&&V_.binding("util")}catch{}})();Qo.exports=qG});var Jo=v((N0e,Tx)=>{"use strict";var GG=vx(),jG=va(),xx=Nh(),wx=xx&&xx.isTypedArray,UG=wx?jG(wx):GG;Tx.exports=UG});var z_=v((A0e,Sx)=>{"use strict";var $G=ix(),WG=Zo(),KG=ht(),YG=Xi(),ZG=ba(),XG=Jo(),QG=Object.prototype,JG=QG.hasOwnProperty;function ej(t,o){var e=KG(t),n=!e&&WG(t),i=!e&&!n&&YG(t),r=!e&&!n&&!i&&XG(t),a=e||n||i||r,s=a?$G(t.length,String):[],c=s.length;for(var u in t)(o||JG.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ZG(u,c)))&&s.push(u);return s}Sx.exports=ej});var xa=v((L0e,kx)=>{"use strict";var tj=Object.prototype;function nj(t){var o=t&&t.constructor,e=typeof o=="function"&&o.prototype||tj;return t===e}kx.exports=nj});var H_=v((B0e,Ix)=>{"use strict";function ij(t,o){return function(e){return t(o(e))}}Ix.exports=ij});var Mx=v((V0e,Ex)=>{"use strict";var oj=H_(),rj=oj(Object.keys,Object);Ex.exports=rj});var Ah=v((z0e,Dx)=>{"use strict";var aj=xa(),sj=Mx(),lj=Object.prototype,cj=lj.hasOwnProperty;function dj(t){if(!aj(t))return sj(t);var o=[];for(var e in Object(t))cj.call(t,e)&&e!="constructor"&&o.push(e);return o}Dx.exports=dj});var Fn=v((H0e,Px)=>{"use strict";var uj=Uo(),pj=Fh();function hj(t){return t!=null&&pj(t.length)&&!uj(t)}Px.exports=hj});var jn=v((q0e,Rx)=>{"use strict";var fj=z_(),mj=Ah(),_j=Fn();function gj(t){return _j(t)?fj(t):mj(t)}Rx.exports=gj});var Fx=v((G0e,Ox)=>{"use strict";var bj=Yo(),vj=jn();function yj(t,o){return t&&bj(o,vj(o),t)}Ox.exports=yj});var Ax=v((j0e,Nx)=>{"use strict";function Cj(t){var o=[];if(t!=null)for(var e in Object(t))o.push(e);return o}Nx.exports=Cj});var Bx=v((U0e,Lx)=>{"use strict";var xj=Jt(),wj=xa(),Tj=Ax(),Sj=Object.prototype,kj=Sj.hasOwnProperty;function Ij(t){if(!xj(t))return Tj(t);var o=wj(t),e=[];for(var n in t)n=="constructor"&&(o||!kj.call(t,n))||e.push(n);return e}Lx.exports=Ij});var bi=v(($0e,Vx)=>{"use strict";var Ej=z_(),Mj=Bx(),Dj=Fn();function Pj(t){return Dj(t)?Ej(t,!0):Mj(t)}Vx.exports=Pj});var Hx=v((W0e,zx)=>{"use strict";var Rj=Yo(),Oj=bi();function Fj(t,o){return t&&Rj(o,Oj(o),t)}zx.exports=Fj});var q_=v((wa,er)=>{"use strict";var Nj=hn(),Ux=typeof wa=="object"&&wa&&!wa.nodeType&&wa,qx=Ux&&typeof er=="object"&&er&&!er.nodeType&&er,Aj=qx&&qx.exports===Ux,Gx=Aj?Nj.Buffer:void 0,jx=Gx?Gx.allocUnsafe:void 0;function Lj(t,o){if(o)return t.slice();var e=t.length,n=jx?jx(e):new t.constructor(e);return t.copy(n),n}er.exports=Lj});var G_=v((K0e,$x)=>{"use strict";function Bj(t,o){var e=-1,n=t.length;for(o||(o=Array(n));++e<n;)o[e]=t[e];return o}$x.exports=Bj});var j_=v((Y0e,Wx)=>{"use strict";function Vj(t,o){for(var e=-1,n=t==null?0:t.length,i=0,r=[];++e<n;){var a=t[e];o(a,e,t)&&(r[i++]=a)}return r}Wx.exports=Vj});var U_=v((Z0e,Kx)=>{"use strict";function zj(){return[]}Kx.exports=zj});var Lh=v((X0e,Zx)=>{"use strict";var Hj=j_(),qj=U_(),Gj=Object.prototype,jj=Gj.propertyIsEnumerable,Yx=Object.getOwnPropertySymbols,Uj=Yx?function(t){return t==null?[]:(t=Object(t),Hj(Yx(t),function(o){return jj.call(t,o)}))}:qj;Zx.exports=Uj});var Qx=v((Q0e,Xx)=>{"use strict";var $j=Yo(),Wj=Lh();function Kj(t,o){return $j(t,Wj(t),o)}Xx.exports=Kj});var Bh=v((J0e,Jx)=>{"use strict";function Yj(t,o){for(var e=-1,n=o.length,i=t.length;++e<n;)t[i+e]=o[e];return t}Jx.exports=Yj});var Ta=v((ebe,ew)=>{"use strict";var Zj=H_(),Xj=Zj(Object.getPrototypeOf,Object);ew.exports=Xj});var $_=v((tbe,tw)=>{"use strict";var Qj=Bh(),Jj=Ta(),eU=Lh(),tU=U_(),nU=Object.getOwnPropertySymbols,iU=nU?function(t){for(var o=[];t;)Qj(o,eU(t)),t=Jj(t);return o}:tU;tw.exports=iU});var iw=v((nbe,nw)=>{"use strict";var oU=Yo(),rU=$_();function aU(t,o){return oU(t,rU(t),o)}nw.exports=aU});var W_=v((ibe,ow)=>{"use strict";var sU=Bh(),lU=ht();function cU(t,o,e){var n=o(t);return lU(t)?n:sU(n,e(t))}ow.exports=cU});var K_=v((obe,rw)=>{"use strict";var dU=W_(),uU=Lh(),pU=jn();function hU(t){return dU(t,pU,uU)}rw.exports=hU});var sw=v((rbe,aw)=>{"use strict";var fU=W_(),mU=$_(),_U=bi();function gU(t){return fU(t,_U,mU)}aw.exports=gU});var cw=v((abe,lw)=>{"use strict";var bU=gi(),vU=hn(),yU=bU(vU,"DataView");lw.exports=yU});var uw=v((sbe,dw)=>{"use strict";var CU=gi(),xU=hn(),wU=CU(xU,"Promise");dw.exports=wU});var Y_=v((lbe,pw)=>{"use strict";var TU=gi(),SU=hn(),kU=TU(SU,"Set");pw.exports=kU});var fw=v((cbe,hw)=>{"use strict";var IU=gi(),EU=hn(),MU=IU(EU,"WeakMap");hw.exports=MU});var Ji=v((dbe,Cw)=>{"use strict";var Z_=cw(),X_=Ph(),Q_=uw(),J_=Y_(),eg=fw(),yw=_i(),tr=L_(),mw="[object Map]",DU="[object Object]",_w="[object Promise]",gw="[object Set]",bw="[object WeakMap]",vw="[object DataView]",PU=tr(Z_),RU=tr(X_),OU=tr(Q_),FU=tr(J_),NU=tr(eg),Qi=yw;(Z_&&Qi(new Z_(new ArrayBuffer(1)))!=vw||X_&&Qi(new X_)!=mw||Q_&&Qi(Q_.resolve())!=_w||J_&&Qi(new J_)!=gw||eg&&Qi(new eg)!=bw)&&(Qi=function(t){var o=yw(t),e=o==DU?t.constructor:void 0,n=e?tr(e):"";if(n)switch(n){case PU:return vw;case RU:return mw;case OU:return _w;case FU:return gw;case NU:return bw}return o});Cw.exports=Qi});var ww=v((ube,xw)=>{"use strict";var AU=Object.prototype,LU=AU.hasOwnProperty;function BU(t){var o=t.length,e=new t.constructor(o);return o&&typeof t[0]=="string"&&LU.call(t,"index")&&(e.index=t.index,e.input=t.input),e}xw.exports=BU});var tg=v((pbe,Tw)=>{"use strict";var VU=hn(),zU=VU.Uint8Array;Tw.exports=zU});var Vh=v((hbe,kw)=>{"use strict";var Sw=tg();function HU(t){var o=new t.constructor(t.byteLength);return new Sw(o).set(new Sw(t)),o}kw.exports=HU});var Ew=v((fbe,Iw)=>{"use strict";var qU=Vh();function GU(t,o){var e=o?qU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}Iw.exports=GU});var Dw=v((mbe,Mw)=>{"use strict";var jU=/\w*$/;function UU(t){var o=new t.constructor(t.source,jU.exec(t));return o.lastIndex=t.lastIndex,o}Mw.exports=UU});var Nw=v((_be,Fw)=>{"use strict";var Pw=Zi(),Rw=Pw?Pw.prototype:void 0,Ow=Rw?Rw.valueOf:void 0;function $U(t){return Ow?Object(Ow.call(t)):{}}Fw.exports=$U});var ng=v((gbe,Aw)=>{"use strict";var WU=Vh();function KU(t,o){var e=o?WU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Aw.exports=KU});var Bw=v((bbe,Lw)=>{"use strict";var YU=Vh(),ZU=Ew(),XU=Dw(),QU=Nw(),JU=ng(),e$="[object Boolean]",t$="[object Date]",n$="[object Map]",i$="[object Number]",o$="[object RegExp]",r$="[object Set]",a$="[object String]",s$="[object Symbol]",l$="[object ArrayBuffer]",c$="[object DataView]",d$="[object Float32Array]",u$="[object Float64Array]",p$="[object Int8Array]",h$="[object Int16Array]",f$="[object Int32Array]",m$="[object Uint8Array]",_$="[object Uint8ClampedArray]",g$="[object Uint16Array]",b$="[object Uint32Array]";function v$(t,o,e){var n=t.constructor;switch(o){case l$:return YU(t);case e$:case t$:return new n(+t);case c$:return ZU(t,e);case d$:case u$:case p$:case h$:case f$:case m$:case _$:case g$:case b$:return JU(t,e);case n$:return new n;case i$:case a$:return new n(t);case o$:return XU(t);case r$:return new n;case s$:return QU(t)}}Lw.exports=v$});var ig=v((vbe,zw)=>{"use strict";var y$=Jt(),Vw=Object.create,C$=(function(){function t(){}return function(o){if(!y$(o))return{};if(Vw)return Vw(o);t.prototype=o;var e=new t;return t.prototype=void 0,e}})();zw.exports=C$});var og=v((ybe,Hw)=>{"use strict";var x$=ig(),w$=Ta(),T$=xa();function S$(t){return typeof t.constructor=="function"&&!T$(t)?x$(w$(t)):{}}Hw.exports=S$});var Gw=v((Cbe,qw)=>{"use strict";var k$=Ji(),I$=Tn(),E$="[object Map]";function M$(t){return I$(t)&&k$(t)==E$}qw.exports=M$});var Ww=v((xbe,$w)=>{"use strict";var D$=Gw(),P$=va(),jw=Nh(),Uw=jw&&jw.isMap,R$=Uw?P$(Uw):D$;$w.exports=R$});var Yw=v((wbe,Kw)=>{"use strict";var O$=Ji(),F$=Tn(),N$="[object Set]";function A$(t){return F$(t)&&O$(t)==N$}Kw.exports=A$});var Jw=v((Tbe,Qw)=>{"use strict";var L$=Yw(),B$=va(),Zw=Nh(),Xw=Zw&&Zw.isSet,V$=Xw?B$(Xw):L$;Qw.exports=V$});var rg=v((Sbe,iT)=>{"use strict";var z$=fa(),H$=Oh(),q$=_a(),G$=Fx(),j$=Hx(),U$=q_(),$$=G_(),W$=Qx(),K$=iw(),Y$=K_(),Z$=sw(),X$=Ji(),Q$=ww(),J$=Bw(),eW=og(),tW=ht(),nW=Xi(),iW=Ww(),oW=Jt(),rW=Jw(),aW=jn(),sW=bi(),lW=1,cW=2,dW=4,eT="[object Arguments]",uW="[object Array]",pW="[object Boolean]",hW="[object Date]",fW="[object Error]",tT="[object Function]",mW="[object GeneratorFunction]",_W="[object Map]",gW="[object Number]",nT="[object Object]",bW="[object RegExp]",vW="[object Set]",yW="[object String]",CW="[object Symbol]",xW="[object WeakMap]",wW="[object ArrayBuffer]",TW="[object DataView]",SW="[object Float32Array]",kW="[object Float64Array]",IW="[object Int8Array]",EW="[object Int16Array]",MW="[object Int32Array]",DW="[object Uint8Array]",PW="[object Uint8ClampedArray]",RW="[object Uint16Array]",OW="[object Uint32Array]",Ze={};Ze[eT]=Ze[uW]=Ze[wW]=Ze[TW]=Ze[pW]=Ze[hW]=Ze[SW]=Ze[kW]=Ze[IW]=Ze[EW]=Ze[MW]=Ze[_W]=Ze[gW]=Ze[nT]=Ze[bW]=Ze[vW]=Ze[yW]=Ze[CW]=Ze[DW]=Ze[PW]=Ze[RW]=Ze[OW]=!0;Ze[fW]=Ze[tT]=Ze[xW]=!1;function zh(t,o,e,n,i,r){var a,s=o&lW,c=o&cW,u=o&dW;if(e&&(a=i?e(t,n,i,r):e(t)),a!==void 0)return a;if(!oW(t))return t;var f=tW(t);if(f){if(a=Q$(t),!s)return $$(t,a)}else{var g=X$(t),x=g==tT||g==mW;if(nW(t))return U$(t,s);if(g==nT||g==eT||x&&!i){if(a=c||x?{}:eW(t),!s)return c?K$(t,j$(a,t)):W$(t,G$(a,t))}else{if(!Ze[g])return i?t:{};a=J$(t,g,s)}}r||(r=new z$);var I=r.get(t);if(I)return I;r.set(t,a),rW(t)?t.forEach(function(j){a.add(zh(j,o,e,j,t,r))}):iW(t)&&t.forEach(function(j,Z){a.set(Z,zh(j,o,e,Z,t,r))});var S=u?c?Z$:Y$:c?sW:aW,N=f?void 0:S(t);return H$(N||t,function(j,Z){N&&(Z=j,j=t[Z]),q$(a,Z,zh(j,o,e,Z,t,r))}),a}iT.exports=zh});var rT=v((kbe,oT)=>{"use strict";var FW=rg(),NW=4;function AW(t){return FW(t,NW)}oT.exports=AW});var Hh=v((Ibe,aT)=>{"use strict";function LW(t){return function(){return t}}aT.exports=LW});var lT=v((Ebe,sT)=>{"use strict";function BW(t){return function(o,e,n){for(var i=-1,r=Object(o),a=n(o),s=a.length;s--;){var c=a[t?s:++i];if(e(r[c],c,r)===!1)break}return o}}sT.exports=BW});var qh=v((Mbe,cT)=>{"use strict";var VW=lT(),zW=VW();cT.exports=zW});var Gh=v((Dbe,dT)=>{"use strict";var HW=qh(),qW=jn();function GW(t,o){return t&&HW(t,o,qW)}dT.exports=GW});var pT=v((Pbe,uT)=>{"use strict";var jW=Fn();function UW(t,o){return function(e,n){if(e==null)return e;if(!jW(e))return t(e,n);for(var i=e.length,r=o?i:-1,a=Object(e);(o?r--:++r<i)&&n(a[r],r,a)!==!1;);return e}}uT.exports=UW});var Sa=v((Rbe,hT)=>{"use strict";var $W=Gh(),WW=pT(),KW=WW($W);hT.exports=KW});var vi=v((Obe,fT)=>{"use strict";function YW(t){return t}fT.exports=YW});var ag=v((Fbe,mT)=>{"use strict";var ZW=vi();function XW(t){return typeof t=="function"?t:ZW}mT.exports=XW});var sg=v((Nbe,_T)=>{"use strict";var QW=Oh(),JW=Sa(),eK=ag(),tK=ht();function nK(t,o){var e=tK(t)?QW:JW;return e(t,eK(o))}_T.exports=nK});var lg=v((Abe,gT)=>{"use strict";gT.exports=sg()});var vT=v((Lbe,bT)=>{"use strict";var iK=Sa();function oK(t,o){var e=[];return iK(t,function(n,i,r){o(n,i,r)&&e.push(n)}),e}bT.exports=oK});var CT=v((Bbe,yT)=>{"use strict";var rK="__lodash_hash_undefined__";function aK(t){return this.__data__.set(t,rK),this}yT.exports=aK});var wT=v((Vbe,xT)=>{"use strict";function sK(t){return this.__data__.has(t)}xT.exports=sK});var cg=v((zbe,TT)=>{"use strict";var lK=Rh(),cK=CT(),dK=wT();function jh(t){var o=-1,e=t==null?0:t.length;for(this.__data__=new lK;++o<e;)this.add(t[o])}jh.prototype.add=jh.prototype.push=cK;jh.prototype.has=dK;TT.exports=jh});var kT=v((Hbe,ST)=>{"use strict";function uK(t,o){for(var e=-1,n=t==null?0:t.length;++e<n;)if(o(t[e],e,t))return!0;return!1}ST.exports=uK});var dg=v((qbe,IT)=>{"use strict";function pK(t,o){return t.has(o)}IT.exports=pK});var ug=v((Gbe,ET)=>{"use strict";var hK=cg(),fK=kT(),mK=dg(),_K=1,gK=2;function bK(t,o,e,n,i,r){var a=e&_K,s=t.length,c=o.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),f=r.get(o);if(u&&f)return u==o&&f==t;var g=-1,x=!0,I=e&gK?new hK:void 0;for(r.set(t,o),r.set(o,t);++g<s;){var S=t[g],N=o[g];if(n)var j=a?n(N,S,g,o,t,r):n(S,N,g,t,o,r);if(j!==void 0){if(j)continue;x=!1;break}if(I){if(!fK(o,function(Z,ne){if(!mK(I,ne)&&(S===Z||i(S,Z,e,n,r)))return I.push(ne)})){x=!1;break}}else if(!(S===N||i(S,N,e,n,r))){x=!1;break}}return r.delete(t),r.delete(o),x}ET.exports=bK});var DT=v((jbe,MT)=>{"use strict";function vK(t){var o=-1,e=Array(t.size);return t.forEach(function(n,i){e[++o]=[i,n]}),e}MT.exports=vK});var Uh=v((Ube,PT)=>{"use strict";function yK(t){var o=-1,e=Array(t.size);return t.forEach(function(n){e[++o]=n}),e}PT.exports=yK});var AT=v(($be,NT)=>{"use strict";var RT=Zi(),OT=tg(),CK=Yi(),xK=ug(),wK=DT(),TK=Uh(),SK=1,kK=2,IK="[object Boolean]",EK="[object Date]",MK="[object Error]",DK="[object Map]",PK="[object Number]",RK="[object RegExp]",OK="[object Set]",FK="[object String]",NK="[object Symbol]",AK="[object ArrayBuffer]",LK="[object DataView]",FT=RT?RT.prototype:void 0,pg=FT?FT.valueOf:void 0;function BK(t,o,e,n,i,r,a){switch(e){case LK:if(t.byteLength!=o.byteLength||t.byteOffset!=o.byteOffset)return!1;t=t.buffer,o=o.buffer;case AK:return!(t.byteLength!=o.byteLength||!r(new OT(t),new OT(o)));case IK:case EK:case PK:return CK(+t,+o);case MK:return t.name==o.name&&t.message==o.message;case RK:case FK:return t==o+"";case DK:var s=wK;case OK:var c=n&SK;if(s||(s=TK),t.size!=o.size&&!c)return!1;var u=a.get(t);if(u)return u==o;n|=kK,a.set(t,o);var f=xK(s(t),s(o),n,i,r,a);return a.delete(t),f;case NK:if(pg)return pg.call(t)==pg.call(o)}return!1}NT.exports=BK});var VT=v((Wbe,BT)=>{"use strict";var LT=K_(),VK=1,zK=Object.prototype,HK=zK.hasOwnProperty;function qK(t,o,e,n,i,r){var a=e&VK,s=LT(t),c=s.length,u=LT(o),f=u.length;if(c!=f&&!a)return!1;for(var g=c;g--;){var x=s[g];if(!(a?x in o:HK.call(o,x)))return!1}var I=r.get(t),S=r.get(o);if(I&&S)return I==o&&S==t;var N=!0;r.set(t,o),r.set(o,t);for(var j=a;++g<c;){x=s[g];var Z=t[x],ne=o[x];if(n)var pe=a?n(ne,Z,x,o,t,r):n(Z,ne,x,t,o,r);if(!(pe===void 0?Z===ne||i(Z,ne,e,n,r):pe)){N=!1;break}j||(j=x=="constructor")}if(N&&!j){var Oe=t.constructor,De=o.constructor;Oe!=De&&"constructor"in t&&"constructor"in o&&!(typeof Oe=="function"&&Oe instanceof Oe&&typeof De=="function"&&De instanceof De)&&(N=!1)}return r.delete(t),r.delete(o),N}BT.exports=qK});var WT=v((Kbe,$T)=>{"use strict";var hg=fa(),GK=ug(),jK=AT(),UK=VT(),zT=Ji(),HT=ht(),qT=Xi(),$K=Jo(),WK=1,GT="[object Arguments]",jT="[object Array]",$h="[object Object]",KK=Object.prototype,UT=KK.hasOwnProperty;function YK(t,o,e,n,i,r){var a=HT(t),s=HT(o),c=a?jT:zT(t),u=s?jT:zT(o);c=c==GT?$h:c,u=u==GT?$h:u;var f=c==$h,g=u==$h,x=c==u;if(x&&qT(t)){if(!qT(o))return!1;a=!0,f=!1}if(x&&!f)return r||(r=new hg),a||$K(t)?GK(t,o,e,n,i,r):jK(t,o,c,e,n,i,r);if(!(e&WK)){var I=f&&UT.call(t,"__wrapped__"),S=g&&UT.call(o,"__wrapped__");if(I||S){var N=I?t.value():t,j=S?o.value():o;return r||(r=new hg),i(N,j,e,n,r)}}return x?(r||(r=new hg),UK(t,o,e,n,i,r)):!1}$T.exports=YK});var fg=v((Ybe,ZT)=>{"use strict";var ZK=WT(),KT=Tn();function YT(t,o,e,n,i){return t===o?!0:t==null||o==null||!KT(t)&&!KT(o)?t!==t&&o!==o:ZK(t,o,e,n,YT,i)}ZT.exports=YT});var QT=v((Zbe,XT)=>{"use strict";var XK=fa(),QK=fg(),JK=1,eY=2;function tY(t,o,e,n){var i=e.length,r=i,a=!n;if(t==null)return!r;for(t=Object(t);i--;){var s=e[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<r;){s=e[i];var c=s[0],u=t[c],f=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var g=new XK;if(n)var x=n(u,f,c,t,o,g);if(!(x===void 0?QK(f,u,JK|eY,n,g):x))return!1}}return!0}XT.exports=tY});var mg=v((Xbe,JT)=>{"use strict";var nY=Jt();function iY(t){return t===t&&!nY(t)}JT.exports=iY});var t2=v((Qbe,e2)=>{"use strict";var oY=mg(),rY=jn();function aY(t){for(var o=rY(t),e=o.length;e--;){var n=o[e],i=t[n];o[e]=[n,i,oY(i)]}return o}e2.exports=aY});var _g=v((Jbe,n2)=>{"use strict";function sY(t,o){return function(e){return e==null?!1:e[t]===o&&(o!==void 0||t in Object(e))}}n2.exports=sY});var o2=v((eve,i2)=>{"use strict";var lY=QT(),cY=t2(),dY=_g();function uY(t){var o=cY(t);return o.length==1&&o[0][2]?dY(o[0][0],o[0][1]):function(e){return e===t||lY(e,t,o)}}i2.exports=uY});var eo=v((tve,r2)=>{"use strict";var pY=_i(),hY=Tn(),fY="[object Symbol]";function mY(t){return typeof t=="symbol"||hY(t)&&pY(t)==fY}r2.exports=mY});var Wh=v((nve,a2)=>{"use strict";var _Y=ht(),gY=eo(),bY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vY=/^\w*$/;function yY(t,o){if(_Y(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||gY(t)?!0:vY.test(t)||!bY.test(t)||o!=null&&t in Object(o)}a2.exports=yY});var c2=v((ive,l2)=>{"use strict";var s2=Rh(),CY="Expected a function";function gg(t,o){if(typeof t!="function"||o!=null&&typeof o!="function")throw new TypeError(CY);var e=function(){var n=arguments,i=o?o.apply(this,n):n[0],r=e.cache;if(r.has(i))return r.get(i);var a=t.apply(this,n);return e.cache=r.set(i,a)||r,a};return e.cache=new(gg.Cache||s2),e}gg.Cache=s2;l2.exports=gg});var u2=v((ove,d2)=>{"use strict";var xY=c2(),wY=500;function TY(t){var o=xY(t,function(n){return e.size===wY&&e.clear(),n}),e=o.cache;return o}d2.exports=TY});var h2=v((rve,p2)=>{"use strict";var SY=u2(),kY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,IY=/\\(\\)?/g,EY=SY(function(t){var o=[];return t.charCodeAt(0)===46&&o.push(""),t.replace(kY,function(e,n,i,r){o.push(i?r.replace(IY,"$1"):n||e)}),o});p2.exports=EY});var ka=v((ave,f2)=>{"use strict";function MY(t,o){for(var e=-1,n=t==null?0:t.length,i=Array(n);++e<n;)i[e]=o(t[e],e,t);return i}f2.exports=MY});var y2=v((sve,v2)=>{"use strict";var m2=Zi(),DY=ka(),PY=ht(),RY=eo(),OY=1/0,_2=m2?m2.prototype:void 0,g2=_2?_2.toString:void 0;function b2(t){if(typeof t=="string")return t;if(PY(t))return DY(t,b2)+"";if(RY(t))return g2?g2.call(t):"";var o=t+"";return o=="0"&&1/t==-OY?"-0":o}v2.exports=b2});var bg=v((lve,C2)=>{"use strict";var FY=y2();function NY(t){return t==null?"":FY(t)}C2.exports=NY});var Ia=v((cve,x2)=>{"use strict";var AY=ht(),LY=Wh(),BY=h2(),VY=bg();function zY(t,o){return AY(t)?t:LY(t,o)?[t]:BY(VY(t))}x2.exports=zY});var nr=v((dve,w2)=>{"use strict";var HY=eo(),qY=1/0;function GY(t){if(typeof t=="string"||HY(t))return t;var o=t+"";return o=="0"&&1/t==-qY?"-0":o}w2.exports=GY});var Ea=v((uve,T2)=>{"use strict";var jY=Ia(),UY=nr();function $Y(t,o){o=jY(o,t);for(var e=0,n=o.length;t!=null&&e<n;)t=t[UY(o[e++])];return e&&e==n?t:void 0}T2.exports=$Y});var k2=v((pve,S2)=>{"use strict";var WY=Ea();function KY(t,o,e){var n=t==null?void 0:WY(t,o);return n===void 0?e:n}S2.exports=KY});var E2=v((hve,I2)=>{"use strict";function YY(t,o){return t!=null&&o in Object(t)}I2.exports=YY});var vg=v((fve,M2)=>{"use strict";var ZY=Ia(),XY=Zo(),QY=ht(),JY=ba(),eZ=Fh(),tZ=nr();function nZ(t,o,e){o=ZY(o,t);for(var n=-1,i=o.length,r=!1;++n<i;){var a=tZ(o[n]);if(!(r=t!=null&&e(t,a)))break;t=t[a]}return r||++n!=i?r:(i=t==null?0:t.length,!!i&&eZ(i)&&JY(a,i)&&(QY(t)||XY(t)))}M2.exports=nZ});var yg=v((mve,D2)=>{"use strict";var iZ=E2(),oZ=vg();function rZ(t,o){return t!=null&&oZ(t,o,iZ)}D2.exports=rZ});var R2=v((_ve,P2)=>{"use strict";var aZ=fg(),sZ=k2(),lZ=yg(),cZ=Wh(),dZ=mg(),uZ=_g(),pZ=nr(),hZ=1,fZ=2;function mZ(t,o){return cZ(t)&&dZ(o)?uZ(pZ(t),o):function(e){var n=sZ(e,t);return n===void 0&&n===o?lZ(e,t):aZ(o,n,hZ|fZ)}}P2.exports=mZ});var Cg=v((gve,O2)=>{"use strict";function _Z(t){return function(o){return o?.[t]}}O2.exports=_Z});var N2=v((bve,F2)=>{"use strict";var gZ=Ea();function bZ(t){return function(o){return gZ(o,t)}}F2.exports=bZ});var L2=v((vve,A2)=>{"use strict";var vZ=Cg(),yZ=N2(),CZ=Wh(),xZ=nr();function wZ(t){return CZ(t)?vZ(xZ(t)):yZ(t)}A2.exports=wZ});var Nn=v((yve,B2)=>{"use strict";var TZ=o2(),SZ=R2(),kZ=vi(),IZ=ht(),EZ=L2();function MZ(t){return typeof t=="function"?t:t==null?kZ:typeof t=="object"?IZ(t)?SZ(t[0],t[1]):TZ(t):EZ(t)}B2.exports=MZ});var xg=v((Cve,V2)=>{"use strict";var DZ=j_(),PZ=vT(),RZ=Nn(),OZ=ht();function FZ(t,o){var e=OZ(t)?DZ:PZ;return e(t,RZ(o,3))}V2.exports=FZ});var H2=v((xve,z2)=>{"use strict";var NZ=Object.prototype,AZ=NZ.hasOwnProperty;function LZ(t,o){return t!=null&&AZ.call(t,o)}z2.exports=LZ});var wg=v((wve,q2)=>{"use strict";var BZ=H2(),VZ=vg();function zZ(t,o){return t!=null&&VZ(t,o,BZ)}q2.exports=zZ});var j2=v((Tve,G2)=>{"use strict";var HZ=Ah(),qZ=Ji(),GZ=Zo(),jZ=ht(),UZ=Fn(),$Z=Xi(),WZ=xa(),KZ=Jo(),YZ="[object Map]",ZZ="[object Set]",XZ=Object.prototype,QZ=XZ.hasOwnProperty;function JZ(t){if(t==null)return!0;if(UZ(t)&&(jZ(t)||typeof t=="string"||typeof t.splice=="function"||$Z(t)||KZ(t)||GZ(t)))return!t.length;var o=qZ(t);if(o==YZ||o==ZZ)return!t.size;if(WZ(t))return!HZ(t).length;for(var e in t)if(QZ.call(t,e))return!1;return!0}G2.exports=JZ});var Tg=v((Sve,U2)=>{"use strict";function eX(t){return t===void 0}U2.exports=eX});var Sg=v((kve,$2)=>{"use strict";var tX=Sa(),nX=Fn();function iX(t,o){var e=-1,n=nX(t)?Array(t.length):[];return tX(t,function(i,r,a){n[++e]=o(i,r,a)}),n}$2.exports=iX});var kg=v((Ive,W2)=>{"use strict";var oX=ka(),rX=Nn(),aX=Sg(),sX=ht();function lX(t,o){var e=sX(t)?oX:aX;return e(t,rX(o,3))}W2.exports=lX});var Y2=v((Eve,K2)=>{"use strict";function cX(t,o,e,n){var i=-1,r=t==null?0:t.length;for(n&&r&&(e=t[++i]);++i<r;)e=o(e,t[i],i,t);return e}K2.exports=cX});var X2=v((Mve,Z2)=>{"use strict";function dX(t,o,e,n,i){return i(t,function(r,a,s){e=n?(n=!1,r):o(e,r,a,s)}),e}Z2.exports=dX});var Ig=v((Dve,Q2)=>{"use strict";var uX=Y2(),pX=Sa(),hX=Nn(),fX=X2(),mX=ht();function _X(t,o,e){var n=mX(t)?uX:fX,i=arguments.length<3;return n(t,hX(o,4),e,i,pX)}Q2.exports=_X});var eS=v((Pve,J2)=>{"use strict";var gX=_i(),bX=ht(),vX=Tn(),yX="[object String]";function CX(t){return typeof t=="string"||!bX(t)&&vX(t)&&gX(t)==yX}J2.exports=CX});var nS=v((Rve,tS)=>{"use strict";var xX=Cg(),wX=xX("length");tS.exports=wX});var oS=v((Ove,iS)=>{"use strict";var TX="\\ud800-\\udfff",SX="\\u0300-\\u036f",kX="\\ufe20-\\ufe2f",IX="\\u20d0-\\u20ff",EX=SX+kX+IX,MX="\\ufe0e\\ufe0f",DX="\\u200d",PX=RegExp("["+DX+TX+EX+MX+"]");function RX(t){return PX.test(t)}iS.exports=RX});var hS=v((Fve,pS)=>{"use strict";var aS="\\ud800-\\udfff",OX="\\u0300-\\u036f",FX="\\ufe20-\\ufe2f",NX="\\u20d0-\\u20ff",AX=OX+FX+NX,LX="\\ufe0e\\ufe0f",BX="["+aS+"]",Eg="["+AX+"]",Mg="\\ud83c[\\udffb-\\udfff]",VX="(?:"+Eg+"|"+Mg+")",sS="[^"+aS+"]",lS="(?:\\ud83c[\\udde6-\\uddff]){2}",cS="[\\ud800-\\udbff][\\udc00-\\udfff]",zX="\\u200d",dS=VX+"?",uS="["+LX+"]?",HX="(?:"+zX+"(?:"+[sS,lS,cS].join("|")+")"+uS+dS+")*",qX=uS+dS+HX,GX="(?:"+[sS+Eg+"?",Eg,lS,cS,BX].join("|")+")",rS=RegExp(Mg+"(?="+Mg+")|"+GX+qX,"g");function jX(t){for(var o=rS.lastIndex=0;rS.test(t);)++o;return o}pS.exports=jX});var mS=v((Nve,fS)=>{"use strict";var UX=nS(),$X=oS(),WX=hS();function KX(t){return $X(t)?WX(t):UX(t)}fS.exports=KX});var gS=v((Ave,_S)=>{"use strict";var YX=Ah(),ZX=Ji(),XX=Fn(),QX=eS(),JX=mS(),eQ="[object Map]",tQ="[object Set]";function nQ(t){if(t==null)return 0;if(XX(t))return QX(t)?JX(t):t.length;var o=ZX(t);return o==eQ||o==tQ?t.size:YX(t).length}_S.exports=nQ});var vS=v((Lve,bS)=>{"use strict";var iQ=Oh(),oQ=ig(),rQ=Gh(),aQ=Nn(),sQ=Ta(),lQ=ht(),cQ=Xi(),dQ=Uo(),uQ=Jt(),pQ=Jo();function hQ(t,o,e){var n=lQ(t),i=n||cQ(t)||pQ(t);if(o=aQ(o,4),e==null){var r=t&&t.constructor;i?e=n?new r:[]:uQ(t)?e=dQ(r)?oQ(sQ(t)):{}:e={}}return(i?iQ:rQ)(t,function(a,s,c){return o(e,a,s,c)}),e}bS.exports=hQ});var wS=v((Bve,xS)=>{"use strict";var yS=Zi(),fQ=Zo(),mQ=ht(),CS=yS?yS.isConcatSpreadable:void 0;function _Q(t){return mQ(t)||fQ(t)||!!(CS&&t&&t[CS])}xS.exports=_Q});var Kh=v((Vve,SS)=>{"use strict";var gQ=Bh(),bQ=wS();function TS(t,o,e,n,i){var r=-1,a=t.length;for(e||(e=bQ),i||(i=[]);++r<a;){var s=t[r];o>0&&e(s)?o>1?TS(s,o-1,e,n,i):gQ(i,s):n||(i[i.length]=s)}return i}SS.exports=TS});var IS=v((zve,kS)=>{"use strict";function vQ(t,o,e){switch(e.length){case 0:return t.call(o);case 1:return t.call(o,e[0]);case 2:return t.call(o,e[0],e[1]);case 3:return t.call(o,e[0],e[1],e[2])}return t.apply(o,e)}kS.exports=vQ});var Dg=v((Hve,MS)=>{"use strict";var yQ=IS(),ES=Math.max;function CQ(t,o,e){return o=ES(o===void 0?t.length-1:o,0),function(){for(var n=arguments,i=-1,r=ES(n.length-o,0),a=Array(r);++i<r;)a[i]=n[o+i];i=-1;for(var s=Array(o+1);++i<o;)s[i]=n[i];return s[o]=e(a),yQ(t,this,s)}}MS.exports=CQ});var RS=v((qve,PS)=>{"use strict";var xQ=Hh(),DS=B_(),wQ=vi(),TQ=DS?function(t,o){return DS(t,"toString",{configurable:!0,enumerable:!1,value:xQ(o),writable:!0})}:wQ;PS.exports=TQ});var FS=v((Gve,OS)=>{"use strict";var SQ=800,kQ=16,IQ=Date.now;function EQ(t){var o=0,e=0;return function(){var n=IQ(),i=kQ-(n-e);if(e=n,i>0){if(++o>=SQ)return arguments[0]}else o=0;return t.apply(void 0,arguments)}}OS.exports=EQ});var Pg=v((jve,NS)=>{"use strict";var MQ=RS(),DQ=FS(),PQ=DQ(MQ);NS.exports=PQ});var Ma=v((Uve,AS)=>{"use strict";var RQ=vi(),OQ=Dg(),FQ=Pg();function NQ(t,o){return FQ(OQ(t,o,RQ),t+"")}AS.exports=NQ});var Rg=v(($ve,LS)=>{"use strict";function AQ(t,o,e,n){for(var i=t.length,r=e+(n?1:-1);n?r--:++r<i;)if(o(t[r],r,t))return r;return-1}LS.exports=AQ});var VS=v((Wve,BS)=>{"use strict";function LQ(t){return t!==t}BS.exports=LQ});var HS=v((Kve,zS)=>{"use strict";function BQ(t,o,e){for(var n=e-1,i=t.length;++n<i;)if(t[n]===o)return n;return-1}zS.exports=BQ});var GS=v((Yve,qS)=>{"use strict";var VQ=Rg(),zQ=VS(),HQ=HS();function qQ(t,o,e){return o===o?HQ(t,o,e):VQ(t,zQ,e)}qS.exports=qQ});var US=v((Zve,jS)=>{"use strict";var GQ=GS();function jQ(t,o){var e=t==null?0:t.length;return!!e&&GQ(t,o,0)>-1}jS.exports=jQ});var WS=v((Xve,$S)=>{"use strict";function UQ(t,o,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(o,t[n]))return!0;return!1}$S.exports=UQ});var YS=v((Qve,KS)=>{"use strict";function $Q(){}KS.exports=$Q});var XS=v((Jve,ZS)=>{"use strict";var Og=Y_(),WQ=YS(),KQ=Uh(),YQ=1/0,ZQ=Og&&1/KQ(new Og([,-0]))[1]==YQ?function(t){return new Og(t)}:WQ;ZS.exports=ZQ});var JS=v((eye,QS)=>{"use strict";var XQ=cg(),QQ=US(),JQ=WS(),eJ=dg(),tJ=XS(),nJ=Uh(),iJ=200;function oJ(t,o,e){var n=-1,i=QQ,r=t.length,a=!0,s=[],c=s;if(e)a=!1,i=JQ;else if(r>=iJ){var u=o?null:tJ(t);if(u)return nJ(u);a=!1,i=eJ,c=new XQ}else c=o?[]:s;e:for(;++n<r;){var f=t[n],g=o?o(f):f;if(f=e||f!==0?f:0,a&&g===g){for(var x=c.length;x--;)if(c[x]===g)continue e;o&&c.push(g),s.push(f)}else i(c,g,e)||(c!==s&&c.push(g),s.push(f))}return s}QS.exports=oJ});var Fg=v((tye,ek)=>{"use strict";var rJ=Fn(),aJ=Tn();function sJ(t){return aJ(t)&&rJ(t)}ek.exports=sJ});var nk=v((nye,tk)=>{"use strict";var lJ=Kh(),cJ=Ma(),dJ=JS(),uJ=Fg(),pJ=cJ(function(t){return dJ(lJ(t,1,uJ,!0))});tk.exports=pJ});var ok=v((iye,ik)=>{"use strict";var hJ=ka();function fJ(t,o){return hJ(o,function(e){return t[e]})}ik.exports=fJ});var Ng=v((oye,rk)=>{"use strict";var mJ=ok(),_J=jn();function gJ(t){return t==null?[]:mJ(t,_J(t))}rk.exports=gJ});var en=v((rye,ak)=>{"use strict";var Yh;if(typeof oo=="function")try{Yh={clone:rT(),constant:Hh(),each:lg(),filter:xg(),has:wg(),isArray:ht(),isEmpty:j2(),isFunction:Uo(),isUndefined:Tg(),keys:jn(),map:kg(),reduce:Ig(),size:gS(),transform:vS(),union:nk(),values:Ng()}}catch{}Yh||(Yh=window._);ak.exports=Yh});var Zh=v((sye,dk)=>{"use strict";var xe=en();dk.exports=Re;var bJ="\0",to="\0",sk="";function Re(t){this._isDirected=xe.has(t,"directed")?t.directed:!0,this._isMultigraph=xe.has(t,"multigraph")?t.multigraph:!1,this._isCompound=xe.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=xe.constant(void 0),this._defaultEdgeLabelFn=xe.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[to]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Re.prototype._nodeCount=0;Re.prototype._edgeCount=0;Re.prototype.isDirected=function(){return this._isDirected};Re.prototype.isMultigraph=function(){return this._isMultigraph};Re.prototype.isCompound=function(){return this._isCompound};Re.prototype.setGraph=function(t){return this._label=t,this};Re.prototype.graph=function(){return this._label};Re.prototype.setDefaultNodeLabel=function(t){return xe.isFunction(t)||(t=xe.constant(t)),this._defaultNodeLabelFn=t,this};Re.prototype.nodeCount=function(){return this._nodeCount};Re.prototype.nodes=function(){return xe.keys(this._nodes)};Re.prototype.sources=function(){var t=this;return xe.filter(this.nodes(),function(o){return xe.isEmpty(t._in[o])})};Re.prototype.sinks=function(){var t=this;return xe.filter(this.nodes(),function(o){return xe.isEmpty(t._out[o])})};Re.prototype.setNodes=function(t,o){var e=arguments,n=this;return xe.each(t,function(i){e.length>1?n.setNode(i,o):n.setNode(i)}),this};Re.prototype.setNode=function(t,o){return xe.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=o),this):(this._nodes[t]=arguments.length>1?o:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=to,this._children[t]={},this._children[to][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};Re.prototype.node=function(t){return this._nodes[t]};Re.prototype.hasNode=function(t){return xe.has(this._nodes,t)};Re.prototype.removeNode=function(t){var o=this;if(xe.has(this._nodes,t)){var e=function(n){o.removeEdge(o._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],xe.each(this.children(t),function(n){o.setParent(n)}),delete this._children[t]),xe.each(xe.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],xe.each(xe.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};Re.prototype.setParent=function(t,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(xe.isUndefined(o))o=to;else{o+="";for(var e=o;!xe.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+o+" as parent of "+t+" would create a cycle");this.setNode(o)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=o,this._children[o][t]=!0,this};Re.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};Re.prototype.parent=function(t){if(this._isCompound){var o=this._parent[t];if(o!==to)return o}};Re.prototype.children=function(t){if(xe.isUndefined(t)&&(t=to),this._isCompound){var o=this._children[t];if(o)return xe.keys(o)}else{if(t===to)return this.nodes();if(this.hasNode(t))return[]}};Re.prototype.predecessors=function(t){var o=this._preds[t];if(o)return xe.keys(o)};Re.prototype.successors=function(t){var o=this._sucs[t];if(o)return xe.keys(o)};Re.prototype.neighbors=function(t){var o=this.predecessors(t);if(o)return xe.union(o,this.successors(t))};Re.prototype.isLeaf=function(t){var o;return this.isDirected()?o=this.successors(t):o=this.neighbors(t),o.length===0};Re.prototype.filterNodes=function(t){var o=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});o.setGraph(this.graph());var e=this;xe.each(this._nodes,function(r,a){t(a)&&o.setNode(a,r)}),xe.each(this._edgeObjs,function(r){o.hasNode(r.v)&&o.hasNode(r.w)&&o.setEdge(r,e.edge(r))});var n={};function i(r){var a=e.parent(r);return a===void 0||o.hasNode(a)?(n[r]=a,a):a in n?n[a]:i(a)}return this._isCompound&&xe.each(o.nodes(),function(r){o.setParent(r,i(r))}),o};Re.prototype.setDefaultEdgeLabel=function(t){return xe.isFunction(t)||(t=xe.constant(t)),this._defaultEdgeLabelFn=t,this};Re.prototype.edgeCount=function(){return this._edgeCount};Re.prototype.edges=function(){return xe.values(this._edgeObjs)};Re.prototype.setPath=function(t,o){var e=this,n=arguments;return xe.reduce(t,function(i,r){return n.length>1?e.setEdge(i,r,o):e.setEdge(i,r),r}),this};Re.prototype.setEdge=function(){var t,o,e,n,i=!1,r=arguments[0];typeof r=="object"&&r!==null&&"v"in r?(t=r.v,o=r.w,e=r.name,arguments.length===2&&(n=arguments[1],i=!0)):(t=r,o=arguments[1],e=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),t=""+t,o=""+o,xe.isUndefined(e)||(e=""+e);var a=Da(this._isDirected,t,o,e);if(xe.has(this._edgeLabels,a))return i&&(this._edgeLabels[a]=n),this;if(!xe.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(o),this._edgeLabels[a]=i?n:this._defaultEdgeLabelFn(t,o,e);var s=vJ(this._isDirected,t,o,e);return t=s.v,o=s.w,Object.freeze(s),this._edgeObjs[a]=s,lk(this._preds[o],t),lk(this._sucs[t],o),this._in[o][a]=s,this._out[t][a]=s,this._edgeCount++,this};Re.prototype.edge=function(t,o,e){var n=arguments.length===1?Ag(this._isDirected,arguments[0]):Da(this._isDirected,t,o,e);return this._edgeLabels[n]};Re.prototype.hasEdge=function(t,o,e){var n=arguments.length===1?Ag(this._isDirected,arguments[0]):Da(this._isDirected,t,o,e);return xe.has(this._edgeLabels,n)};Re.prototype.removeEdge=function(t,o,e){var n=arguments.length===1?Ag(this._isDirected,arguments[0]):Da(this._isDirected,t,o,e),i=this._edgeObjs[n];return i&&(t=i.v,o=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],ck(this._preds[o],t),ck(this._sucs[t],o),delete this._in[o][n],delete this._out[t][n],this._edgeCount--),this};Re.prototype.inEdges=function(t,o){var e=this._in[t];if(e){var n=xe.values(e);return o?xe.filter(n,function(i){return i.v===o}):n}};Re.prototype.outEdges=function(t,o){var e=this._out[t];if(e){var n=xe.values(e);return o?xe.filter(n,function(i){return i.w===o}):n}};Re.prototype.nodeEdges=function(t,o){var e=this.inEdges(t,o);if(e)return e.concat(this.outEdges(t,o))};function lk(t,o){t[o]?t[o]++:t[o]=1}function ck(t,o){--t[o]||delete t[o]}function Da(t,o,e,n){var i=""+o,r=""+e;if(!t&&i>r){var a=i;i=r,r=a}return i+sk+r+sk+(xe.isUndefined(n)?bJ:n)}function vJ(t,o,e,n){var i=""+o,r=""+e;if(!t&&i>r){var a=i;i=r,r=a}var s={v:i,w:r};return n&&(s.name=n),s}function Ag(t,o){return Da(t,o.v,o.w,o.name)}});var pk=v((lye,uk)=>{"use strict";uk.exports="2.1.8"});var fk=v((cye,hk)=>{"use strict";hk.exports={Graph:Zh(),version:pk()}});var _k=v((dye,mk)=>{"use strict";var An=en(),yJ=Zh();mk.exports={write:CJ,read:TJ};function CJ(t){var o={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:xJ(t),edges:wJ(t)};return An.isUndefined(t.graph())||(o.value=An.clone(t.graph())),o}function xJ(t){return An.map(t.nodes(),function(o){var e=t.node(o),n=t.parent(o),i={v:o};return An.isUndefined(e)||(i.value=e),An.isUndefined(n)||(i.parent=n),i})}function wJ(t){return An.map(t.edges(),function(o){var e=t.edge(o),n={v:o.v,w:o.w};return An.isUndefined(o.name)||(n.name=o.name),An.isUndefined(e)||(n.value=e),n})}function TJ(t){var o=new yJ(t.options).setGraph(t.value);return An.each(t.nodes,function(e){o.setNode(e.v,e.value),e.parent&&o.setParent(e.v,e.parent)}),An.each(t.edges,function(e){o.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),o}});var bk=v((uye,gk)=>{"use strict";var Xh=en();gk.exports=SJ;function SJ(t){var o={},e=[],n;function i(r){Xh.has(o,r)||(o[r]=!0,n.push(r),Xh.each(t.successors(r),i),Xh.each(t.predecessors(r),i))}return Xh.each(t.nodes(),function(r){n=[],i(r),n.length&&e.push(n)}),e}});var Lg=v((pye,yk)=>{"use strict";var vk=en();yk.exports=fn;function fn(){this._arr=[],this._keyIndices={}}fn.prototype.size=function(){return this._arr.length};fn.prototype.keys=function(){return this._arr.map(function(t){return t.key})};fn.prototype.has=function(t){return vk.has(this._keyIndices,t)};fn.prototype.priority=function(t){var o=this._keyIndices[t];if(o!==void 0)return this._arr[o].priority};fn.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};fn.prototype.add=function(t,o){var e=this._keyIndices;if(t=String(t),!vk.has(e,t)){var n=this._arr,i=n.length;return e[t]=i,n.push({key:t,priority:o}),this._decrease(i),!0}return!1};fn.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};fn.prototype.decrease=function(t,o){var e=this._keyIndices[t];if(o>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+o);this._arr[e].priority=o,this._decrease(e)};fn.prototype._heapify=function(t){var o=this._arr,e=2*t,n=e+1,i=t;e<o.length&&(i=o[e].priority<o[i].priority?e:i,n<o.length&&(i=o[n].priority<o[i].priority?n:i),i!==t&&(this._swap(t,i),this._heapify(i)))};fn.prototype._decrease=function(t){for(var o=this._arr,e=o[t].priority,n;t!==0&&(n=t>>1,!(o[n].priority<e));)this._swap(t,n),t=n};fn.prototype._swap=function(t,o){var e=this._arr,n=this._keyIndices,i=e[t],r=e[o];e[t]=r,e[o]=i,n[r.key]=t,n[i.key]=o}});var Bg=v((hye,Ck)=>{"use strict";var kJ=en(),IJ=Lg();Ck.exports=MJ;var EJ=kJ.constant(1);function MJ(t,o,e,n){return DJ(t,String(o),e||EJ,n||function(i){return t.outEdges(i)})}function DJ(t,o,e,n){var i={},r=new IJ,a,s,c=function(u){var f=u.v!==a?u.v:u.w,g=i[f],x=e(u),I=s.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+x);I<g.distance&&(g.distance=I,g.predecessor=a,r.decrease(f,I))};for(t.nodes().forEach(function(u){var f=u===o?0:Number.POSITIVE_INFINITY;i[u]={distance:f},r.add(u,f)});r.size()>0&&(a=r.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return i}});var wk=v((fye,xk)=>{"use strict";var PJ=Bg(),RJ=en();xk.exports=OJ;function OJ(t,o,e){return RJ.transform(t.nodes(),function(n,i){n[i]=PJ(t,i,o,e)},{})}});var Vg=v((mye,Sk)=>{"use strict";var Tk=en();Sk.exports=FJ;function FJ(t){var o=0,e=[],n={},i=[];function r(a){var s=n[a]={onStack:!0,lowlink:o,index:o++};if(e.push(a),t.successors(a).forEach(function(f){Tk.has(n,f)?n[f].onStack&&(s.lowlink=Math.min(s.lowlink,n[f].index)):(r(f),s.lowlink=Math.min(s.lowlink,n[f].lowlink))}),s.lowlink===s.index){var c=[],u;do u=e.pop(),n[u].onStack=!1,c.push(u);while(a!==u);i.push(c)}}return t.nodes().forEach(function(a){Tk.has(n,a)||r(a)}),i}});var Ik=v((_ye,kk)=>{"use strict";var NJ=en(),AJ=Vg();kk.exports=LJ;function LJ(t){return NJ.filter(AJ(t),function(o){return o.length>1||o.length===1&&t.hasEdge(o[0],o[0])})}});var Mk=v((gye,Ek)=>{"use strict";var BJ=en();Ek.exports=zJ;var VJ=BJ.constant(1);function zJ(t,o,e){return HJ(t,o||VJ,e||function(n){return t.outEdges(n)})}function HJ(t,o,e){var n={},i=t.nodes();return i.forEach(function(r){n[r]={},n[r][r]={distance:0},i.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=o(a);n[r][s]={distance:c,predecessor:r}})}),i.forEach(function(r){var a=n[r];i.forEach(function(s){var c=n[s];i.forEach(function(u){var f=c[r],g=a[u],x=c[u],I=f.distance+g.distance;I<x.distance&&(x.distance=I,x.predecessor=g.predecessor)})})}),n}});var zg=v((bye,Pk)=>{"use strict";var Pa=en();Pk.exports=Dk;Dk.CycleException=Qh;function Dk(t){var o={},e={},n=[];function i(r){if(Pa.has(e,r))throw new Qh;Pa.has(o,r)||(e[r]=!0,o[r]=!0,Pa.each(t.predecessors(r),i),delete e[r],n.push(r))}if(Pa.each(t.sinks(),i),Pa.size(o)!==t.nodeCount())throw new Qh;return n}function Qh(){}Qh.prototype=new Error});var Fk=v((vye,Ok)=>{"use strict";var Rk=zg();Ok.exports=qJ;function qJ(t){try{Rk(t)}catch(o){if(o instanceof Rk.CycleException)return!1;throw o}return!0}});var Hg=v((yye,Ak)=>{"use strict";var Jh=en();Ak.exports=GJ;function GJ(t,o,e){Jh.isArray(o)||(o=[o]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],r={};return Jh.each(o,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Nk(t,a,e==="post",r,n,i)}),i}function Nk(t,o,e,n,i,r){Jh.has(n,o)||(n[o]=!0,e||r.push(o),Jh.each(i(o),function(a){Nk(t,a,e,n,i,r)}),e&&r.push(o))}});var Bk=v((Cye,Lk)=>{"use strict";var jJ=Hg();Lk.exports=UJ;function UJ(t,o){return jJ(t,o,"post")}});var zk=v((xye,Vk)=>{"use strict";var $J=Hg();Vk.exports=WJ;function WJ(t,o){return $J(t,o,"pre")}});var Gk=v((wye,qk)=>{"use strict";var Hk=en(),KJ=Zh(),YJ=Lg();qk.exports=ZJ;function ZJ(t,o){var e=new KJ,n={},i=new YJ,r;function a(c){var u=c.v===r?c.w:c.v,f=i.priority(u);if(f!==void 0){var g=o(c);g<f&&(n[u]=r,i.decrease(u,g))}}if(t.nodeCount()===0)return e;Hk.each(t.nodes(),function(c){i.add(c,Number.POSITIVE_INFINITY),e.setNode(c)}),i.decrease(t.nodes()[0],0);for(var s=!1;i.size()>0;){if(r=i.removeMin(),Hk.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 Uk=v((Tye,jk)=>{"use strict";jk.exports={components:bk(),dijkstra:Bg(),dijkstraAll:wk(),findCycles:Ik(),floydWarshall:Mk(),isAcyclic:Fk(),postorder:Bk(),preorder:zk(),prim:Gk(),tarjan:Vg(),topsort:zg()}});var Kk=v((Sye,Wk)=>{"use strict";var $k=fk();Wk.exports={Graph:$k.Graph,json:_k(),alg:Uk(),version:$k.version}});var mn=v((kye,Yk)=>{"use strict";var ef;if(typeof oo=="function")try{ef=Kk()}catch{}ef||(ef=window.graphlib);Yk.exports=ef});var Xk=v((Eye,Zk)=>{"use strict";var XJ=rg(),QJ=1,JJ=4;function eee(t){return XJ(t,QJ|JJ)}Zk.exports=eee});var Ra=v((Mye,Qk)=>{"use strict";var tee=Yi(),nee=Fn(),iee=ba(),oee=Jt();function ree(t,o,e){if(!oee(e))return!1;var n=typeof o;return(n=="number"?nee(e)&&iee(o,e.length):n=="string"&&o in e)?tee(e[o],t):!1}Qk.exports=ree});var tI=v((Dye,eI)=>{"use strict";var aee=Ma(),see=Yi(),lee=Ra(),cee=bi(),Jk=Object.prototype,dee=Jk.hasOwnProperty,uee=aee(function(t,o){t=Object(t);var e=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&lee(o[0],o[1],i)&&(n=1);++e<n;)for(var r=o[e],a=cee(r),s=-1,c=a.length;++s<c;){var u=a[s],f=t[u];(f===void 0||see(f,Jk[u])&&!dee.call(t,u))&&(t[u]=r[u])}return t});eI.exports=uee});var iI=v((Pye,nI)=>{"use strict";var pee=Nn(),hee=Fn(),fee=jn();function mee(t){return function(o,e,n){var i=Object(o);if(!hee(o)){var r=pee(e,3);o=fee(o),e=function(s){return r(i[s],s,i)}}var a=t(o,e,n);return a>-1?i[r?o[a]:a]:void 0}}nI.exports=mee});var rI=v((Rye,oI)=>{"use strict";var _ee=/\s/;function gee(t){for(var o=t.length;o--&&_ee.test(t.charAt(o)););return o}oI.exports=gee});var sI=v((Oye,aI)=>{"use strict";var bee=rI(),vee=/^\s+/;function yee(t){return t&&t.slice(0,bee(t)+1).replace(vee,"")}aI.exports=yee});var uI=v((Fye,dI)=>{"use strict";var Cee=sI(),lI=Jt(),xee=eo(),cI=NaN,wee=/^[-+]0x[0-9a-f]+$/i,Tee=/^0b[01]+$/i,See=/^0o[0-7]+$/i,kee=parseInt;function Iee(t){if(typeof t=="number")return t;if(xee(t))return cI;if(lI(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=lI(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=Cee(t);var e=Tee.test(t);return e||See.test(t)?kee(t.slice(2),e?2:8):wee.test(t)?cI:+t}dI.exports=Iee});var qg=v((Nye,hI)=>{"use strict";var Eee=uI(),pI=1/0,Mee=17976931348623157e292;function Dee(t){if(!t)return t===0?t:0;if(t=Eee(t),t===pI||t===-pI){var o=t<0?-1:1;return o*Mee}return t===t?t:0}hI.exports=Dee});var mI=v((Aye,fI)=>{"use strict";var Pee=qg();function Ree(t){var o=Pee(t),e=o%1;return o===o?e?o-e:o:0}fI.exports=Ree});var gI=v((Lye,_I)=>{"use strict";var Oee=Rg(),Fee=Nn(),Nee=mI(),Aee=Math.max;function Lee(t,o,e){var n=t==null?0:t.length;if(!n)return-1;var i=e==null?0:Nee(e);return i<0&&(i=Aee(n+i,0)),Oee(t,Fee(o,3),i)}_I.exports=Lee});var vI=v((Bye,bI)=>{"use strict";var Bee=iI(),Vee=gI(),zee=Bee(Vee);bI.exports=zee});var Gg=v((Vye,yI)=>{"use strict";var Hee=Kh();function qee(t){var o=t==null?0:t.length;return o?Hee(t,1):[]}yI.exports=qee});var xI=v((zye,CI)=>{"use strict";var Gee=qh(),jee=ag(),Uee=bi();function $ee(t,o){return t==null?t:Gee(t,jee(o),Uee)}CI.exports=$ee});var TI=v((Hye,wI)=>{"use strict";function Wee(t){var o=t==null?0:t.length;return o?t[o-1]:void 0}wI.exports=Wee});var kI=v((qye,SI)=>{"use strict";var Kee=ma(),Yee=Gh(),Zee=Nn();function Xee(t,o){var e={};return o=Zee(o,3),Yee(t,function(n,i,r){Kee(e,i,o(n,i,r))}),e}SI.exports=Xee});var tf=v((Gye,II)=>{"use strict";var Qee=eo();function Jee(t,o,e){for(var n=-1,i=t.length;++n<i;){var r=t[n],a=o(r);if(a!=null&&(s===void 0?a===a&&!Qee(a):e(a,s)))var s=a,c=r}return c}II.exports=Jee});var MI=v((jye,EI)=>{"use strict";function ete(t,o){return t>o}EI.exports=ete});var PI=v((Uye,DI)=>{"use strict";var tte=tf(),nte=MI(),ite=vi();function ote(t){return t&&t.length?tte(t,ite,nte):void 0}DI.exports=ote});var jg=v(($ye,RI)=>{"use strict";var rte=ma(),ate=Yi();function ste(t,o,e){(e!==void 0&&!ate(t[o],e)||e===void 0&&!(o in t))&&rte(t,o,e)}RI.exports=ste});var NI=v((Wye,FI)=>{"use strict";var lte=_i(),cte=Ta(),dte=Tn(),ute="[object Object]",pte=Function.prototype,hte=Object.prototype,OI=pte.toString,fte=hte.hasOwnProperty,mte=OI.call(Object);function _te(t){if(!dte(t)||lte(t)!=ute)return!1;var o=cte(t);if(o===null)return!0;var e=fte.call(o,"constructor")&&o.constructor;return typeof e=="function"&&e instanceof e&&OI.call(e)==mte}FI.exports=_te});var Ug=v((Kye,AI)=>{"use strict";function gte(t,o){if(!(o==="constructor"&&typeof t[o]=="function")&&o!="__proto__")return t[o]}AI.exports=gte});var BI=v((Yye,LI)=>{"use strict";var bte=Yo(),vte=bi();function yte(t){return bte(t,vte(t))}LI.exports=yte});var jI=v((Zye,GI)=>{"use strict";var VI=jg(),Cte=q_(),xte=ng(),wte=G_(),Tte=og(),zI=Zo(),HI=ht(),Ste=Fg(),kte=Xi(),Ite=Uo(),Ete=Jt(),Mte=NI(),Dte=Jo(),qI=Ug(),Pte=BI();function Rte(t,o,e,n,i,r,a){var s=qI(t,e),c=qI(o,e),u=a.get(c);if(u){VI(t,e,u);return}var f=r?r(s,c,e+"",t,o,a):void 0,g=f===void 0;if(g){var x=HI(c),I=!x&&kte(c),S=!x&&!I&&Dte(c);f=c,x||I||S?HI(s)?f=s:Ste(s)?f=wte(s):I?(g=!1,f=Cte(c,!0)):S?(g=!1,f=xte(c,!0)):f=[]:Mte(c)||zI(c)?(f=s,zI(s)?f=Pte(s):(!Ete(s)||Ite(s))&&(f=Tte(c))):g=!1}g&&(a.set(c,f),i(f,c,n,r,a),a.delete(c)),VI(t,e,f)}GI.exports=Rte});var WI=v((Xye,$I)=>{"use strict";var Ote=fa(),Fte=jg(),Nte=qh(),Ate=jI(),Lte=Jt(),Bte=bi(),Vte=Ug();function UI(t,o,e,n,i){t!==o&&Nte(o,function(r,a){if(i||(i=new Ote),Lte(r))Ate(t,o,a,e,UI,n,i);else{var s=n?n(Vte(t,a),r,a+"",t,o,i):void 0;s===void 0&&(s=r),Fte(t,a,s)}},Bte)}$I.exports=UI});var YI=v((Qye,KI)=>{"use strict";var zte=Ma(),Hte=Ra();function qte(t){return zte(function(o,e){var n=-1,i=e.length,r=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(r=t.length>3&&typeof r=="function"?(i--,r):void 0,a&&Hte(e[0],e[1],a)&&(r=i<3?void 0:r,i=1),o=Object(o);++n<i;){var s=e[n];s&&t(o,s,n,r)}return o})}KI.exports=qte});var XI=v((Jye,ZI)=>{"use strict";var Gte=WI(),jte=YI(),Ute=jte(function(t,o,e){Gte(t,o,e)});ZI.exports=Ute});var $g=v((eCe,QI)=>{"use strict";function $te(t,o){return t<o}QI.exports=$te});var eE=v((tCe,JI)=>{"use strict";var Wte=tf(),Kte=$g(),Yte=vi();function Zte(t){return t&&t.length?Wte(t,Yte,Kte):void 0}JI.exports=Zte});var nE=v((nCe,tE)=>{"use strict";var Xte=tf(),Qte=Nn(),Jte=$g();function ene(t,o){return t&&t.length?Xte(t,Qte(o,2),Jte):void 0}tE.exports=ene});var oE=v((iCe,iE)=>{"use strict";var tne=hn(),nne=function(){return tne.Date.now()};iE.exports=nne});var sE=v((oCe,aE)=>{"use strict";var ine=_a(),one=Ia(),rne=ba(),rE=Jt(),ane=nr();function sne(t,o,e,n){if(!rE(t))return t;o=one(o,t);for(var i=-1,r=o.length,a=r-1,s=t;s!=null&&++i<r;){var c=ane(o[i]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var f=s[c];u=n?n(f,c,s):void 0,u===void 0&&(u=rE(f)?f:rne(o[i+1])?[]:{})}ine(s,c,u),s=s[c]}return t}aE.exports=sne});var cE=v((rCe,lE)=>{"use strict";var lne=Ea(),cne=sE(),dne=Ia();function une(t,o,e){for(var n=-1,i=o.length,r={};++n<i;){var a=o[n],s=lne(t,a);e(s,a)&&cne(r,dne(a,t),s)}return r}lE.exports=une});var uE=v((aCe,dE)=>{"use strict";var pne=cE(),hne=yg();function fne(t,o){return pne(t,o,function(e,n){return hne(t,n)})}dE.exports=fne});var hE=v((sCe,pE)=>{"use strict";var mne=Gg(),_ne=Dg(),gne=Pg();function bne(t){return gne(_ne(t,void 0,mne),t+"")}pE.exports=bne});var mE=v((lCe,fE)=>{"use strict";var vne=uE(),yne=hE(),Cne=yne(function(t,o){return t==null?{}:vne(t,o)});fE.exports=Cne});var gE=v((cCe,_E)=>{"use strict";var xne=Math.ceil,wne=Math.max;function Tne(t,o,e,n){for(var i=-1,r=wne(xne((o-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++i]=t,t+=e;return a}_E.exports=Tne});var vE=v((dCe,bE)=>{"use strict";var Sne=gE(),kne=Ra(),Wg=qg();function Ine(t){return function(o,e,n){return n&&typeof n!="number"&&kne(o,e,n)&&(e=n=void 0),o=Wg(o),e===void 0?(e=o,o=0):e=Wg(e),n=n===void 0?o<e?1:-1:Wg(n),Sne(o,e,n,t)}}bE.exports=Ine});var CE=v((uCe,yE)=>{"use strict";var Ene=vE(),Mne=Ene();yE.exports=Mne});var wE=v((pCe,xE)=>{"use strict";function Dne(t,o){var e=t.length;for(t.sort(o);e--;)t[e]=t[e].value;return t}xE.exports=Dne});var kE=v((hCe,SE)=>{"use strict";var TE=eo();function Pne(t,o){if(t!==o){var e=t!==void 0,n=t===null,i=t===t,r=TE(t),a=o!==void 0,s=o===null,c=o===o,u=TE(o);if(!s&&!u&&!r&&t>o||r&&a&&c&&!s&&!u||n&&a&&c||!e&&c||!i)return 1;if(!n&&!r&&!u&&t<o||u&&e&&i&&!n&&!r||s&&e&&i||!a&&i||!c)return-1}return 0}SE.exports=Pne});var EE=v((fCe,IE)=>{"use strict";var Rne=kE();function One(t,o,e){for(var n=-1,i=t.criteria,r=o.criteria,a=i.length,s=e.length;++n<a;){var c=Rne(i[n],r[n]);if(c){if(n>=s)return c;var u=e[n];return c*(u=="desc"?-1:1)}}return t.index-o.index}IE.exports=One});var DE=v((mCe,ME)=>{"use strict";var Kg=ka(),Fne=Ea(),Nne=Nn(),Ane=Sg(),Lne=wE(),Bne=va(),Vne=EE(),zne=vi(),Hne=ht();function qne(t,o,e){o.length?o=Kg(o,function(r){return Hne(r)?function(a){return Fne(a,r.length===1?r[0]:r)}:r}):o=[zne];var n=-1;o=Kg(o,Bne(Nne));var i=Ane(t,function(r,a,s){var c=Kg(o,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return Lne(i,function(r,a){return Vne(r,a,e)})}ME.exports=qne});var OE=v((_Ce,RE)=>{"use strict";var Gne=Kh(),jne=DE(),Une=Ma(),PE=Ra(),$ne=Une(function(t,o){if(t==null)return[];var e=o.length;return e>1&&PE(t,o[0],o[1])?o=[]:e>2&&PE(o[0],o[1],o[2])&&(o=[o[0]]),jne(t,Gne(o,1),[])});RE.exports=$ne});var NE=v((gCe,FE)=>{"use strict";var Wne=bg(),Kne=0;function Yne(t){var o=++Kne;return Wne(t)+o}FE.exports=Yne});var LE=v((bCe,AE)=>{"use strict";function Zne(t,o,e){for(var n=-1,i=t.length,r=o.length,a={};++n<i;){var s=n<r?o[n]:void 0;e(a,t[n],s)}return a}AE.exports=Zne});var VE=v((vCe,BE)=>{"use strict";var Xne=_a(),Qne=LE();function Jne(t,o){return Qne(t||[],o||[],Xne)}BE.exports=Jne});var Je=v((yCe,zE)=>{"use strict";var nf;if(typeof oo=="function")try{nf={cloneDeep:Xk(),constant:Hh(),defaults:tI(),each:lg(),filter:xg(),find:vI(),flatten:Gg(),forEach:sg(),forIn:xI(),has:wg(),isUndefined:Tg(),last:TI(),map:kg(),mapValues:kI(),max:PI(),merge:XI(),min:eE(),minBy:nE(),now:oE(),pick:mE(),range:CE(),reduce:Ig(),sortBy:OE(),uniqueId:NE(),values:Ng(),zipObject:VE()}}catch{}nf||(nf=window._);zE.exports=nf});var GE=v((xCe,qE)=>{"use strict";qE.exports=of;function of(){var t={};t._next=t._prev=t,this._sentinel=t}of.prototype.dequeue=function(){var t=this._sentinel,o=t._prev;if(o!==t)return HE(o),o};of.prototype.enqueue=function(t){var o=this._sentinel;t._prev&&t._next&&HE(t),t._next=o._next,o._next._prev=t,o._next=t,t._prev=o};of.prototype.toString=function(){for(var t=[],o=this._sentinel,e=o._prev;e!==o;)t.push(JSON.stringify(e,eie)),e=e._prev;return"["+t.join(", ")+"]"};function HE(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function eie(t,o){if(t!=="_next"&&t!=="_prev")return o}});var UE=v((wCe,jE)=>{"use strict";var Un=Je(),tie=mn().Graph,nie=GE();jE.exports=oie;var iie=Un.constant(1);function oie(t,o){if(t.nodeCount()<=1)return[];var e=aie(t,o||iie),n=rie(e.graph,e.buckets,e.zeroIdx);return Un.flatten(Un.map(n,function(i){return t.outEdges(i.v,i.w)}),!0)}function rie(t,o,e){for(var n=[],i=o[o.length-1],r=o[0],a;t.nodeCount();){for(;a=r.dequeue();)Yg(t,o,e,a);for(;a=i.dequeue();)Yg(t,o,e,a);if(t.nodeCount()){for(var s=o.length-2;s>0;--s)if(a=o[s].dequeue(),a){n=n.concat(Yg(t,o,e,a,!0));break}}}return n}function Yg(t,o,e,n,i){var r=i?[]:void 0;return Un.forEach(t.inEdges(n.v),function(a){var s=t.edge(a),c=t.node(a.v);i&&r.push({v:a.v,w:a.w}),c.out-=s,Zg(o,e,c)}),Un.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,Zg(o,e,u)}),t.removeNode(n.v),r}function aie(t,o){var e=new tie,n=0,i=0;Un.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Un.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=o(s),f=c+u;e.setEdge(s.v,s.w,f),i=Math.max(i,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Un.range(i+n+3).map(function(){return new nie}),a=n+1;return Un.forEach(e.nodes(),function(s){Zg(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function Zg(t,o,e){e.out?e.in?t[e.out-e.in+o].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}});var WE=v((TCe,$E)=>{"use strict";var no=Je(),sie=UE();$E.exports={run:lie,undo:die};function lie(t){var o=t.graph().acyclicer==="greedy"?sie(t,e(t)):cie(t);no.forEach(o,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,no.uniqueId("rev"))});function e(n){return function(i){return n.edge(i).weight}}}function cie(t){var o=[],e={},n={};function i(r){no.has(n,r)||(n[r]=!0,e[r]=!0,no.forEach(t.outEdges(r),function(a){no.has(e,a.w)?o.push(a):i(a.w)}),delete e[r])}return no.forEach(t.nodes(),i),o}function die(t){no.forEach(t.edges(),function(o){var e=t.edge(o);if(e.reversed){t.removeEdge(o);var n=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(o.w,o.v,e,n)}})}});var At=v((SCe,XE)=>{"use strict";var Ae=Je(),KE=mn().Graph;XE.exports={addDummyNode:YE,simplify:uie,asNonCompoundGraph:pie,successorWeights:hie,predecessorWeights:fie,intersectRect:mie,buildLayerMatrix:_ie,normalizeRanks:gie,removeEmptyRanks:bie,addBorderNode:vie,maxRank:ZE,partition:yie,time:Cie,notime:xie};function YE(t,o,e,n){var i;do i=Ae.uniqueId(n);while(t.hasNode(i));return e.dummy=o,t.setNode(i,e),i}function uie(t){var o=new KE().setGraph(t.graph());return Ae.forEach(t.nodes(),function(e){o.setNode(e,t.node(e))}),Ae.forEach(t.edges(),function(e){var n=o.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);o.setEdge(e.v,e.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),o}function pie(t){var o=new KE({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ae.forEach(t.nodes(),function(e){t.children(e).length||o.setNode(e,t.node(e))}),Ae.forEach(t.edges(),function(e){o.setEdge(e,t.edge(e))}),o}function hie(t){var o=Ae.map(t.nodes(),function(e){var n={};return Ae.forEach(t.outEdges(e),function(i){n[i.w]=(n[i.w]||0)+t.edge(i).weight}),n});return Ae.zipObject(t.nodes(),o)}function fie(t){var o=Ae.map(t.nodes(),function(e){var n={};return Ae.forEach(t.inEdges(e),function(i){n[i.v]=(n[i.v]||0)+t.edge(i).weight}),n});return Ae.zipObject(t.nodes(),o)}function mie(t,o){var e=t.x,n=t.y,i=o.x-e,r=o.y-n,a=t.width/2,s=t.height/2;if(!i&&!r)throw new Error("Not possible to find intersection inside of the rectangle");var c,u;return Math.abs(r)*a>Math.abs(i)*s?(r<0&&(s=-s),c=s*i/r,u=s):(i<0&&(a=-a),c=a,u=a*r/i),{x:e+c,y:n+u}}function _ie(t){var o=Ae.map(Ae.range(ZE(t)+1),function(){return[]});return Ae.forEach(t.nodes(),function(e){var n=t.node(e),i=n.rank;Ae.isUndefined(i)||(o[i][n.order]=e)}),o}function gie(t){var o=Ae.min(Ae.map(t.nodes(),function(e){return t.node(e).rank}));Ae.forEach(t.nodes(),function(e){var n=t.node(e);Ae.has(n,"rank")&&(n.rank-=o)})}function bie(t){var o=Ae.min(Ae.map(t.nodes(),function(r){return t.node(r).rank})),e=[];Ae.forEach(t.nodes(),function(r){var a=t.node(r).rank-o;e[a]||(e[a]=[]),e[a].push(r)});var n=0,i=t.graph().nodeRankFactor;Ae.forEach(e,function(r,a){Ae.isUndefined(r)&&a%i!==0?--n:n&&Ae.forEach(r,function(s){t.node(s).rank+=n})})}function vie(t,o,e,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=e,i.order=n),YE(t,"border",i,o)}function ZE(t){return Ae.max(Ae.map(t.nodes(),function(o){var e=t.node(o).rank;if(!Ae.isUndefined(e))return e}))}function yie(t,o){var e={lhs:[],rhs:[]};return Ae.forEach(t,function(n){o(n)?e.lhs.push(n):e.rhs.push(n)}),e}function Cie(t,o){var e=Ae.now();try{return o()}finally{console.log(t+" time: "+(Ae.now()-e)+"ms")}}function xie(t,o){return o()}});var eM=v((kCe,JE)=>{"use strict";var QE=Je(),wie=At();JE.exports={run:Tie,undo:kie};function Tie(t){t.graph().dummyChains=[],QE.forEach(t.edges(),function(o){Sie(t,o)})}function Sie(t,o){var e=o.v,n=t.node(e).rank,i=o.w,r=t.node(i).rank,a=o.name,s=t.edge(o),c=s.labelRank;if(r!==n+1){t.removeEdge(o);var u,f,g;for(g=0,++n;n<r;++g,++n)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:o,rank:n},u=wie.addDummyNode(t,"edge",f,"_d"),n===c&&(f.width=s.width,f.height=s.height,f.dummy="edge-label",f.labelpos=s.labelpos),t.setEdge(e,u,{weight:s.weight},a),g===0&&t.graph().dummyChains.push(u),e=u;t.setEdge(e,i,{weight:s.weight},a)}}function kie(t){QE.forEach(t.graph().dummyChains,function(o){var e=t.node(o),n=e.edgeLabel,i;for(t.setEdge(e.edgeObj,n);e.dummy;)i=t.successors(o)[0],t.removeNode(o),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),o=i,e=t.node(o)})}});var Oa=v((ICe,tM)=>{"use strict";var rf=Je();tM.exports={longestPath:Iie,slack:Eie};function Iie(t){var o={};function e(n){var i=t.node(n);if(rf.has(o,n))return i.rank;o[n]=!0;var r=rf.min(rf.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),i.rank=r}rf.forEach(t.sources(),e)}function Eie(t,o){return t.node(o.w).rank-t.node(o.v).rank-t.edge(o).minlen}});var Xg=v((ECe,nM)=>{"use strict";var af=Je(),Mie=mn().Graph,sf=Oa().slack;nM.exports=Die;function Die(t){var o=new Mie({directed:!1}),e=t.nodes()[0],n=t.nodeCount();o.setNode(e,{});for(var i,r;Pie(o,t)<n;)i=Rie(o,t),r=o.hasNode(i.v)?sf(t,i):-sf(t,i),Oie(o,t,r);return o}function Pie(t,o){function e(n){af.forEach(o.nodeEdges(n),function(i){var r=i.v,a=n===r?i.w:r;!t.hasNode(a)&&!sf(o,i)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return af.forEach(t.nodes(),e),t.nodeCount()}function Rie(t,o){return af.minBy(o.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return sf(o,e)})}function Oie(t,o,e){af.forEach(t.nodes(),function(n){o.node(n).rank+=e})}});var dM=v((MCe,cM)=>{"use strict";var $n=Je(),Fie=Xg(),Nie=Oa().slack,Aie=Oa().longestPath,Lie=mn().alg.preorder,Bie=mn().alg.postorder,Vie=At().simplify;cM.exports=io;io.initLowLimValues=Jg;io.initCutValues=Qg;io.calcCutValue=oM;io.leaveEdge=aM;io.enterEdge=sM;io.exchangeEdges=lM;function io(t){t=Vie(t),Aie(t);var o=Fie(t);Jg(o),Qg(o,t);for(var e,n;e=aM(o);)n=sM(o,t,e),lM(o,t,e,n)}function Qg(t,o){var e=Bie(t,t.nodes());e=e.slice(0,e.length-1),$n.forEach(e,function(n){zie(t,o,n)})}function zie(t,o,e){var n=t.node(e),i=n.parent;t.edge(e,i).cutvalue=oM(t,o,e)}function oM(t,o,e){var n=t.node(e),i=n.parent,r=!0,a=o.edge(e,i),s=0;return a||(r=!1,a=o.edge(i,e)),s=a.weight,$n.forEach(o.nodeEdges(e),function(c){var u=c.v===e,f=u?c.w:c.v;if(f!==i){var g=u===r,x=o.edge(c).weight;if(s+=g?x:-x,qie(t,e,f)){var I=t.edge(e,f).cutvalue;s+=g?-I:I}}}),s}function Jg(t,o){arguments.length<2&&(o=t.nodes()[0]),rM(t,{},1,o)}function rM(t,o,e,n,i){var r=e,a=t.node(n);return o[n]=!0,$n.forEach(t.neighbors(n),function(s){$n.has(o,s)||(e=rM(t,o,e,s,n))}),a.low=r,a.lim=e++,i?a.parent=i:delete a.parent,e}function aM(t){return $n.find(t.edges(),function(o){return t.edge(o).cutvalue<0})}function sM(t,o,e){var n=e.v,i=e.w;o.hasEdge(n,i)||(n=e.w,i=e.v);var r=t.node(n),a=t.node(i),s=r,c=!1;r.lim>a.lim&&(s=a,c=!0);var u=$n.filter(o.edges(),function(f){return c===iM(t,t.node(f.v),s)&&c!==iM(t,t.node(f.w),s)});return $n.minBy(u,function(f){return Nie(o,f)})}function lM(t,o,e,n){var i=e.v,r=e.w;t.removeEdge(i,r),t.setEdge(n.v,n.w,{}),Jg(t),Qg(t,o),Hie(t,o)}function Hie(t,o){var e=$n.find(t.nodes(),function(i){return!o.node(i).parent}),n=Lie(t,e);n=n.slice(1),$n.forEach(n,function(i){var r=t.node(i).parent,a=o.edge(i,r),s=!1;a||(a=o.edge(r,i),s=!0),o.node(i).rank=o.node(r).rank+(s?a.minlen:-a.minlen)})}function qie(t,o,e){return t.hasEdge(o,e)}function iM(t,o,e){return e.low<=o.lim&&o.lim<=e.lim}});var fM=v((DCe,hM)=>{"use strict";var Gie=Oa(),pM=Gie.longestPath,jie=Xg(),Uie=dM();hM.exports=$ie;function $ie(t){switch(t.graph().ranker){case"network-simplex":uM(t);break;case"tight-tree":Kie(t);break;case"longest-path":Wie(t);break;default:uM(t)}}var Wie=pM;function Kie(t){pM(t),jie(t)}function uM(t){Uie(t)}});var _M=v((PCe,mM)=>{"use strict";var e0=Je();mM.exports=Yie;function Yie(t){var o=Xie(t);e0.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),i=n.edgeObj,r=Zie(t,o,i.v,i.w),a=r.path,s=r.lca,c=0,u=a[c],f=!0;e!==i.w;){if(n=t.node(e),f){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(f=!1)}if(!f){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 Zie(t,o,e,n){var i=[],r=[],a=Math.min(o[e].low,o[n].low),s=Math.max(o[e].lim,o[n].lim),c,u;c=e;do c=t.parent(c),i.push(c);while(c&&(o[c].low>a||s>o[c].lim));for(u=c,c=n;(c=t.parent(c))!==u;)r.push(c);return{path:i.concat(r.reverse()),lca:u}}function Xie(t){var o={},e=0;function n(i){var r=e;e0.forEach(t.children(i),n),o[i]={low:r,lim:e++}}return e0.forEach(t.children(),n),o}});var vM=v((RCe,bM)=>{"use strict";var Wn=Je(),t0=At();bM.exports={run:Qie,cleanup:toe};function Qie(t){var o=t0.addDummyNode(t,"root",{},"_root"),e=Jie(t),n=Wn.max(Wn.values(e))-1,i=2*n+1;t.graph().nestingRoot=o,Wn.forEach(t.edges(),function(a){t.edge(a).minlen*=i});var r=eoe(t)+1;Wn.forEach(t.children(),function(a){gM(t,o,i,r,n,e,a)}),t.graph().nodeRankFactor=i}function gM(t,o,e,n,i,r,a){var s=t.children(a);if(!s.length){a!==o&&t.setEdge(o,a,{weight:0,minlen:e});return}var c=t0.addBorderNode(t,"_bt"),u=t0.addBorderNode(t,"_bb"),f=t.node(a);t.setParent(c,a),f.borderTop=c,t.setParent(u,a),f.borderBottom=u,Wn.forEach(s,function(g){gM(t,o,e,n,i,r,g);var x=t.node(g),I=x.borderTop?x.borderTop:g,S=x.borderBottom?x.borderBottom:g,N=x.borderTop?n:2*n,j=I!==S?1:i-r[a]+1;t.setEdge(c,I,{weight:N,minlen:j,nestingEdge:!0}),t.setEdge(S,u,{weight:N,minlen:j,nestingEdge:!0})}),t.parent(a)||t.setEdge(o,c,{weight:0,minlen:i+r[a]})}function Jie(t){var o={};function e(n,i){var r=t.children(n);r&&r.length&&Wn.forEach(r,function(a){e(a,i+1)}),o[n]=i}return Wn.forEach(t.children(),function(n){e(n,1)}),o}function eoe(t){return Wn.reduce(t.edges(),function(o,e){return o+t.edge(e).weight},0)}function toe(t){var o=t.graph();t.removeNode(o.nestingRoot),delete o.nestingRoot,Wn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var xM=v((OCe,CM)=>{"use strict";var n0=Je(),noe=At();CM.exports=ioe;function ioe(t){function o(e){var n=t.children(e),i=t.node(e);if(n.length&&n0.forEach(n,o),n0.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var r=i.minRank,a=i.maxRank+1;r<a;++r)yM(t,"borderLeft","_bl",e,i,r),yM(t,"borderRight","_br",e,i,r)}}n0.forEach(t.children(),o)}function yM(t,o,e,n,i,r){var a={width:0,height:0,rank:r,borderType:o},s=i[o][r-1],c=noe.addDummyNode(t,"border",a,e);i[o][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var kM=v((FCe,SM)=>{"use strict";var Ln=Je();SM.exports={adjust:ooe,undo:roe};function ooe(t){var o=t.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&TM(t)}function roe(t){var o=t.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&aoe(t),(o==="lr"||o==="rl")&&(soe(t),TM(t))}function TM(t){Ln.forEach(t.nodes(),function(o){wM(t.node(o))}),Ln.forEach(t.edges(),function(o){wM(t.edge(o))})}function wM(t){var o=t.width;t.width=t.height,t.height=o}function aoe(t){Ln.forEach(t.nodes(),function(o){i0(t.node(o))}),Ln.forEach(t.edges(),function(o){var e=t.edge(o);Ln.forEach(e.points,i0),Ln.has(e,"y")&&i0(e)})}function i0(t){t.y=-t.y}function soe(t){Ln.forEach(t.nodes(),function(o){o0(t.node(o))}),Ln.forEach(t.edges(),function(o){var e=t.edge(o);Ln.forEach(e.points,o0),Ln.has(e,"x")&&o0(e)})}function o0(t){var o=t.x;t.x=t.y,t.y=o}});var EM=v((NCe,IM)=>{"use strict";var Kn=Je();IM.exports=loe;function loe(t){var o={},e=Kn.filter(t.nodes(),function(s){return!t.children(s).length}),n=Kn.max(Kn.map(e,function(s){return t.node(s).rank})),i=Kn.map(Kn.range(n+1),function(){return[]});function r(s){if(!Kn.has(o,s)){o[s]=!0;var c=t.node(s);i[c.rank].push(s),Kn.forEach(t.successors(s),r)}}var a=Kn.sortBy(e,function(s){return t.node(s).rank});return Kn.forEach(a,r),i}});var DM=v((ACe,MM)=>{"use strict";var yi=Je();MM.exports=coe;function coe(t,o){for(var e=0,n=1;n<o.length;++n)e+=doe(t,o[n-1],o[n]);return e}function doe(t,o,e){for(var n=yi.zipObject(e,yi.map(e,function(u,f){return f})),i=yi.flatten(yi.map(o,function(u){return yi.sortBy(yi.map(t.outEdges(u),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")}),!0),r=1;r<e.length;)r<<=1;var a=2*r-1;r-=1;var s=yi.map(new Array(a),function(){return 0}),c=0;return yi.forEach(i.forEach(function(u){var f=u.pos+r;s[f]+=u.weight;for(var g=0;f>0;)f%2&&(g+=s[f+1]),f=f-1>>1,s[f]+=u.weight;c+=u.weight*g})),c}});var OM=v((LCe,RM)=>{"use strict";var PM=Je();RM.exports=uoe;function uoe(t,o){return PM.map(o,function(e){var n=t.inEdges(e);if(n.length){var i=PM.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:i.sum/i.weight,weight:i.weight}}else return{v:e}})}});var NM=v((BCe,FM)=>{"use strict";var tn=Je();FM.exports=poe;function poe(t,o){var e={};tn.forEach(t,function(i,r){var a=e[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:r};tn.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),tn.forEach(o.edges(),function(i){var r=e[i.v],a=e[i.w];!tn.isUndefined(r)&&!tn.isUndefined(a)&&(a.indegree++,r.out.push(e[i.w]))});var n=tn.filter(e,function(i){return!i.indegree});return hoe(n)}function hoe(t){var o=[];function e(r){return function(a){a.merged||(tn.isUndefined(a.barycenter)||tn.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&foe(r,a)}}function n(r){return function(a){a.in.push(r),--a.indegree===0&&t.push(a)}}for(;t.length;){var i=t.pop();o.push(i),tn.forEach(i.in.reverse(),e(i)),tn.forEach(i.out,n(i))}return tn.map(tn.filter(o,function(r){return!r.merged}),function(r){return tn.pick(r,["vs","i","barycenter","weight"])})}function foe(t,o){var e=0,n=0;t.weight&&(e+=t.barycenter*t.weight,n+=t.weight),o.weight&&(e+=o.barycenter*o.weight,n+=o.weight),t.vs=o.vs.concat(t.vs),t.barycenter=e/n,t.weight=n,t.i=Math.min(o.i,t.i),o.merged=!0}});var BM=v((VCe,LM)=>{"use strict";var Fa=Je(),moe=At();LM.exports=_oe;function _oe(t,o){var e=moe.partition(t,function(f){return Fa.has(f,"barycenter")}),n=e.lhs,i=Fa.sortBy(e.rhs,function(f){return-f.i}),r=[],a=0,s=0,c=0;n.sort(goe(!!o)),c=AM(r,i,c),Fa.forEach(n,function(f){c+=f.vs.length,r.push(f.vs),a+=f.barycenter*f.weight,s+=f.weight,c=AM(r,i,c)});var u={vs:Fa.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function AM(t,o,e){for(var n;o.length&&(n=Fa.last(o)).i<=e;)o.pop(),t.push(n.vs),e++;return e}function goe(t){return function(o,e){return o.barycenter<e.barycenter?-1:o.barycenter>e.barycenter?1:t?e.i-o.i:o.i-e.i}}});var HM=v((zCe,zM)=>{"use strict";var Ci=Je(),boe=OM(),voe=NM(),yoe=BM();zM.exports=VM;function VM(t,o,e,n){var i=t.children(o),r=t.node(o),a=r?r.borderLeft:void 0,s=r?r.borderRight:void 0,c={};a&&(i=Ci.filter(i,function(S){return S!==a&&S!==s}));var u=boe(t,i);Ci.forEach(u,function(S){if(t.children(S.v).length){var N=VM(t,S.v,e,n);c[S.v]=N,Ci.has(N,"barycenter")&&xoe(S,N)}});var f=voe(u,e);Coe(f,c);var g=yoe(f,n);if(a&&(g.vs=Ci.flatten([a,g.vs,s],!0),t.predecessors(a).length)){var x=t.node(t.predecessors(a)[0]),I=t.node(t.predecessors(s)[0]);Ci.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+x.order+I.order)/(g.weight+2),g.weight+=2}return g}function Coe(t,o){Ci.forEach(t,function(e){e.vs=Ci.flatten(e.vs.map(function(n){return o[n]?o[n].vs:n}),!0)})}function xoe(t,o){Ci.isUndefined(t.barycenter)?(t.barycenter=o.barycenter,t.weight=o.weight):(t.barycenter=(t.barycenter*t.weight+o.barycenter*o.weight)/(t.weight+o.weight),t.weight+=o.weight)}});var GM=v((HCe,qM)=>{"use strict";var Na=Je(),woe=mn().Graph;qM.exports=Toe;function Toe(t,o,e){var n=Soe(t),i=new woe({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Na.forEach(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===o||a.minRank<=o&&o<=a.maxRank)&&(i.setNode(r),i.setParent(r,s||n),Na.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,f=i.edge(u,r),g=Na.isUndefined(f)?0:f.weight;i.setEdge(u,r,{weight:t.edge(c).weight+g})}),Na.has(a,"minRank")&&i.setNode(r,{borderLeft:a.borderLeft[o],borderRight:a.borderRight[o]}))}),i}function Soe(t){for(var o;t.hasNode(o=Na.uniqueId("_root")););return o}});var UM=v((qCe,jM)=>{"use strict";var koe=Je();jM.exports=Ioe;function Ioe(t,o,e){var n={},i;koe.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=i,i=a),c&&c!==a){o.setEdge(c,a);return}a=s}})}});var ZM=v((GCe,YM)=>{"use strict";var xi=Je(),Eoe=EM(),Moe=DM(),Doe=HM(),Poe=GM(),Roe=UM(),Ooe=mn().Graph,$M=At();YM.exports=Foe;function Foe(t){var o=$M.maxRank(t),e=WM(t,xi.range(1,o+1),"inEdges"),n=WM(t,xi.range(o-1,-1,-1),"outEdges"),i=Eoe(t);KM(t,i);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){Noe(s%2?e:n,s%4>=2),i=$M.buildLayerMatrix(t);var u=Moe(t,i);u<r&&(c=0,a=xi.cloneDeep(i),r=u)}KM(t,a)}function WM(t,o,e){return xi.map(o,function(n){return Poe(t,n,e)})}function Noe(t,o){var e=new Ooe;xi.forEach(t,function(n){var i=n.graph().root,r=Doe(n,i,e,o);xi.forEach(r.vs,function(a,s){n.node(a).order=s}),Roe(n,e,r.vs)})}function KM(t,o){xi.forEach(o,function(e){xi.forEach(e,function(n,i){t.node(n).order=i})})}});var aD=v((jCe,rD)=>{"use strict";var we=Je(),Aoe=mn().Graph,Loe=At();rD.exports={positionX:zoe,findType1Conflicts:XM,findType2Conflicts:QM,addConflict:r0,hasConflict:JM,verticalAlignment:eD,horizontalCompaction:tD,alignCoordinates:iD,findSmallestWidthAlignment:nD,balance:oD};function XM(t,o){var e={};function n(i,r){var a=0,s=0,c=i.length,u=we.last(r);return we.forEach(r,function(f,g){var x=Boe(t,f),I=x?t.node(x).order:c;(x||f===u)&&(we.forEach(r.slice(s,g+1),function(S){we.forEach(t.predecessors(S),function(N){var j=t.node(N),Z=j.order;(Z<a||I<Z)&&!(j.dummy&&t.node(S).dummy)&&r0(e,N,S)})}),s=g+1,a=I)}),r}return we.reduce(o,n),e}function QM(t,o){var e={};function n(r,a,s,c,u){var f;we.forEach(we.range(a,s),function(g){f=r[g],t.node(f).dummy&&we.forEach(t.predecessors(f),function(x){var I=t.node(x);I.dummy&&(I.order<c||I.order>u)&&r0(e,x,f)})})}function i(r,a){var s=-1,c,u=0;return we.forEach(a,function(f,g){if(t.node(f).dummy==="border"){var x=t.predecessors(f);x.length&&(c=t.node(x[0]).order,n(a,u,g,s,c),u=g,s=c)}n(a,u,a.length,c,r.length)}),a}return we.reduce(o,i),e}function Boe(t,o){if(t.node(o).dummy)return we.find(t.predecessors(o),function(e){return t.node(e).dummy})}function r0(t,o,e){if(o>e){var n=o;o=e,e=n}var i=t[o];i||(t[o]=i={}),i[e]=!0}function JM(t,o,e){if(o>e){var n=o;o=e,e=n}return we.has(t[o],e)}function eD(t,o,e,n){var i={},r={},a={};return we.forEach(o,function(s){we.forEach(s,function(c,u){i[c]=c,r[c]=c,a[c]=u})}),we.forEach(o,function(s){var c=-1;we.forEach(s,function(u){var f=n(u);if(f.length){f=we.sortBy(f,function(N){return a[N]});for(var g=(f.length-1)/2,x=Math.floor(g),I=Math.ceil(g);x<=I;++x){var S=f[x];r[u]===u&&c<a[S]&&!JM(e,u,S)&&(r[S]=u,r[u]=i[u]=i[S],c=a[S])}}})}),{root:i,align:r}}function tD(t,o,e,n,i){var r={},a=Voe(t,o,e,i),s=i?"borderLeft":"borderRight";function c(g,x){for(var I=a.nodes(),S=I.pop(),N={};S;)N[S]?g(S):(N[S]=!0,I.push(S),I=I.concat(x(S))),S=I.pop()}function u(g){r[g]=a.inEdges(g).reduce(function(x,I){return Math.max(x,r[I.v]+a.edge(I))},0)}function f(g){var x=a.outEdges(g).reduce(function(S,N){return Math.min(S,r[N.w]-a.edge(N))},Number.POSITIVE_INFINITY),I=t.node(g);x!==Number.POSITIVE_INFINITY&&I.borderType!==s&&(r[g]=Math.max(r[g],x))}return c(u,a.predecessors.bind(a)),c(f,a.successors.bind(a)),we.forEach(n,function(g){r[g]=r[e[g]]}),r}function Voe(t,o,e,n){var i=new Aoe,r=t.graph(),a=Hoe(r.nodesep,r.edgesep,n);return we.forEach(o,function(s){var c;we.forEach(s,function(u){var f=e[u];if(i.setNode(f),c){var g=e[c],x=i.edge(g,f);i.setEdge(g,f,Math.max(a(t,u,c),x||0))}c=u})}),i}function nD(t,o){return we.minBy(we.values(o),function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return we.forIn(e,function(r,a){var s=qoe(t,a)/2;n=Math.max(r+s,n),i=Math.min(r-s,i)}),n-i})}function iD(t,o){var e=we.values(o),n=we.min(e),i=we.max(e);we.forEach(["u","d"],function(r){we.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==o){var f=we.values(c);u=a==="l"?n-we.min(f):i-we.max(f),u&&(t[s]=we.mapValues(c,function(g){return g+u}))}})})}function oD(t,o){return we.mapValues(t.ul,function(e,n){if(o)return t[o.toLowerCase()][n];var i=we.sortBy(we.map(t,n));return(i[1]+i[2])/2})}function zoe(t){var o=Loe.buildLayerMatrix(t),e=we.merge(XM(t,o),QM(t,o)),n={},i;we.forEach(["u","d"],function(a){i=a==="u"?o:we.values(o).reverse(),we.forEach(["l","r"],function(s){s==="r"&&(i=we.map(i,function(g){return we.values(g).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=eD(t,i,e,c),f=tD(t,i,u.root,u.align,s==="r");s==="r"&&(f=we.mapValues(f,function(g){return-g})),n[a+s]=f})});var r=nD(t,n);return iD(n,r),oD(n,t.graph().align)}function Hoe(t,o,e){return function(n,i,r){var a=n.node(i),s=n.node(r),c=0,u;if(c+=a.width/2,we.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?o:t)/2,c+=(s.dummy?o:t)/2,c+=s.width/2,we.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 qoe(t,o){return t.node(o).width}});var cD=v((UCe,lD)=>{"use strict";var Aa=Je(),sD=At(),Goe=aD().positionX;lD.exports=joe;function joe(t){t=sD.asNonCompoundGraph(t),Uoe(t),Aa.forEach(Goe(t),function(o,e){t.node(e).x=o})}function Uoe(t){var o=sD.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Aa.forEach(o,function(i){var r=Aa.max(Aa.map(i,function(a){return t.node(a).height}));Aa.forEach(i,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var mD=v(($Ce,fD)=>{"use strict";var Me=Je(),dD=WE(),uD=eM(),$oe=fM(),Woe=At().normalizeRanks,Koe=_M(),Yoe=At().removeEmptyRanks,pD=vM(),Zoe=xM(),hD=kM(),Xoe=ZM(),Qoe=cD(),wi=At(),Joe=mn().Graph;fD.exports=ere;function ere(t,o){var e=o&&o.debugTiming?wi.time:wi.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return ure(t)});e(" runLayout",function(){tre(n,e)}),e(" updateInputGraph",function(){nre(t,n)})})}function tre(t,o){o(" makeSpaceForEdgeLabels",function(){pre(t)}),o(" removeSelfEdges",function(){Cre(t)}),o(" acyclic",function(){dD.run(t)}),o(" nestingGraph.run",function(){pD.run(t)}),o(" rank",function(){$oe(wi.asNonCompoundGraph(t))}),o(" injectEdgeLabelProxies",function(){hre(t)}),o(" removeEmptyRanks",function(){Yoe(t)}),o(" nestingGraph.cleanup",function(){pD.cleanup(t)}),o(" normalizeRanks",function(){Woe(t)}),o(" assignRankMinMax",function(){fre(t)}),o(" removeEdgeLabelProxies",function(){mre(t)}),o(" normalize.run",function(){uD.run(t)}),o(" parentDummyChains",function(){Koe(t)}),o(" addBorderSegments",function(){Zoe(t)}),o(" order",function(){Xoe(t)}),o(" insertSelfEdges",function(){xre(t)}),o(" adjustCoordinateSystem",function(){hD.adjust(t)}),o(" position",function(){Qoe(t)}),o(" positionSelfEdges",function(){wre(t)}),o(" removeBorderNodes",function(){yre(t)}),o(" normalize.undo",function(){uD.undo(t)}),o(" fixupEdgeLabelCoords",function(){bre(t)}),o(" undoCoordinateSystem",function(){hD.undo(t)}),o(" translateGraph",function(){_re(t)}),o(" assignNodeIntersects",function(){gre(t)}),o(" reversePoints",function(){vre(t)}),o(" acyclic.undo",function(){dD.undo(t)})}function nre(t,o){Me.forEach(t.nodes(),function(e){var n=t.node(e),i=o.node(e);n&&(n.x=i.x,n.y=i.y,o.children(e).length&&(n.width=i.width,n.height=i.height))}),Me.forEach(t.edges(),function(e){var n=t.edge(e),i=o.edge(e);n.points=i.points,Me.has(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=o.graph().width,t.graph().height=o.graph().height}var ire=["nodesep","edgesep","ranksep","marginx","marginy"],ore={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},rre=["acyclicer","ranker","rankdir","align"],are=["width","height"],sre={width:0,height:0},lre=["minlen","weight","width","height","labeloffset"],cre={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},dre=["labelpos"];function ure(t){var o=new Joe({multigraph:!0,compound:!0}),e=s0(t.graph());return o.setGraph(Me.merge({},ore,a0(e,ire),Me.pick(e,rre))),Me.forEach(t.nodes(),function(n){var i=s0(t.node(n));o.setNode(n,Me.defaults(a0(i,are),sre)),o.setParent(n,t.parent(n))}),Me.forEach(t.edges(),function(n){var i=s0(t.edge(n));o.setEdge(n,Me.merge({},cre,a0(i,lre),Me.pick(i,dre)))}),o}function pre(t){var o=t.graph();o.ranksep/=2,Me.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(o.rankdir==="TB"||o.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function hre(t){Me.forEach(t.edges(),function(o){var e=t.edge(o);if(e.width&&e.height){var n=t.node(o.v),i=t.node(o.w),r={rank:(i.rank-n.rank)/2+n.rank,e:o};wi.addDummyNode(t,"edge-proxy",r,"_ep")}})}function fre(t){var o=0;Me.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,o=Me.max(o,n.maxRank))}),t.graph().maxRank=o}function mre(t){Me.forEach(t.nodes(),function(o){var e=t.node(o);e.dummy==="edge-proxy"&&(t.edge(e.e).labelRank=e.rank,t.removeNode(o))})}function _re(t){var o=Number.POSITIVE_INFINITY,e=0,n=Number.POSITIVE_INFINITY,i=0,r=t.graph(),a=r.marginx||0,s=r.marginy||0;function c(u){var f=u.x,g=u.y,x=u.width,I=u.height;o=Math.min(o,f-x/2),e=Math.max(e,f+x/2),n=Math.min(n,g-I/2),i=Math.max(i,g+I/2)}Me.forEach(t.nodes(),function(u){c(t.node(u))}),Me.forEach(t.edges(),function(u){var f=t.edge(u);Me.has(f,"x")&&c(f)}),o-=a,n-=s,Me.forEach(t.nodes(),function(u){var f=t.node(u);f.x-=o,f.y-=n}),Me.forEach(t.edges(),function(u){var f=t.edge(u);Me.forEach(f.points,function(g){g.x-=o,g.y-=n}),Me.has(f,"x")&&(f.x-=o),Me.has(f,"y")&&(f.y-=n)}),r.width=e-o+a,r.height=i-n+s}function gre(t){Me.forEach(t.edges(),function(o){var e=t.edge(o),n=t.node(o.v),i=t.node(o.w),r,a;e.points?(r=e.points[0],a=e.points[e.points.length-1]):(e.points=[],r=i,a=n),e.points.unshift(wi.intersectRect(n,r)),e.points.push(wi.intersectRect(i,a))})}function bre(t){Me.forEach(t.edges(),function(o){var e=t.edge(o);if(Me.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 vre(t){Me.forEach(t.edges(),function(o){var e=t.edge(o);e.reversed&&e.points.reverse()})}function yre(t){Me.forEach(t.nodes(),function(o){if(t.children(o).length){var e=t.node(o),n=t.node(e.borderTop),i=t.node(e.borderBottom),r=t.node(Me.last(e.borderLeft)),a=t.node(Me.last(e.borderRight));e.width=Math.abs(a.x-r.x),e.height=Math.abs(i.y-n.y),e.x=r.x+e.width/2,e.y=n.y+e.height/2}}),Me.forEach(t.nodes(),function(o){t.node(o).dummy==="border"&&t.removeNode(o)})}function Cre(t){Me.forEach(t.edges(),function(o){if(o.v===o.w){var e=t.node(o.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:o,label:t.edge(o)}),t.removeEdge(o)}})}function xre(t){var o=wi.buildLayerMatrix(t);Me.forEach(o,function(e){var n=0;Me.forEach(e,function(i,r){var a=t.node(i);a.order=r+n,Me.forEach(a.selfEdges,function(s){wi.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 wre(t){Me.forEach(t.nodes(),function(o){var e=t.node(o);if(e.dummy==="selfedge"){var n=t.node(e.e.v),i=n.x+n.width/2,r=n.y,a=e.x-i,s=n.height/2;t.setEdge(e.e,e.label),t.removeNode(o),e.label.points=[{x:i+2*a/3,y:r-s},{x:i+5*a/6,y:r-s},{x:i+a,y:r},{x:i+5*a/6,y:r+s},{x:i+2*a/3,y:r+s}],e.label.x=e.x,e.label.y=e.y}})}function a0(t,o){return Me.mapValues(Me.pick(t,o),Number)}function s0(t){var o={};return Me.forEach(t,function(e,n){o[n.toLowerCase()]=e}),o}});var gD=v((WCe,_D)=>{"use strict";var lf=Je(),Tre=At(),Sre=mn().Graph;_D.exports={debugOrdering:kre};function kre(t){var o=Tre.buildLayerMatrix(t),e=new Sre({compound:!0,multigraph:!0}).setGraph({});return lf.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),lf.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),lf.forEach(o,function(n,i){var r="layer"+i;e.setNode(r,{rank:"same"}),lf.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var vD=v((KCe,bD)=>{"use strict";bD.exports="0.8.5"});var CD=v((YCe,yD)=>{"use strict";yD.exports={graphlib:mn(),layout:mD(),debug:gD(),util:{time:At().time,notime:At().notime},version:vD()}});var Eb={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"}};var _s=new he("MAP_ISOLATE_INTENT",{providedIn:"root",factory:()=>({isolate:()=>{}})});var Mb=`
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 d3=["data-p-icon","angle-double-left"],Db=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Y],attrs:d3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var u3=["data-p-icon","angle-double-right"],Pb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Y],attrs:u3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var p3=["data-p-icon","angle-down"],Rb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","angle-down"]],features:[Y],attrs:p3,decls:1,vars:0,consts:[["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var h3=["data-p-icon","angle-left"],Ob=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Y],attrs:h3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var f3=["data-p-icon","angle-right"],Fb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Y],attrs:f3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var m3=["data-p-icon","angle-up"],Nb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","angle-up"]],features:[Y],attrs:m3,decls:1,vars:0,consts:[["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var _3=["data-p-icon","arrow-down"],qf=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Y],attrs:_3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var g3=["data-p-icon","arrow-up"],Gf=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Y],attrs:g3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var b3=["data-p-icon","calendar"],Ab=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","calendar"]],features:[Y],attrs:b3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var v3=["data-p-icon","chevron-left"],Lb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Y],attrs:v3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var y3=["data-p-icon","chevron-right"],Bb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Y],attrs:y3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var C3=["data-p-icon","chevron-up"],Vb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Y],attrs:C3,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var x3=["data-p-icon","filter"],zb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","filter"]],features:[Y],attrs:x3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var w3=["data-p-icon","filter-slash"],Hb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Y],attrs:w3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var T3=["data-p-icon","minus"],qb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","minus"]],features:[Y],attrs:T3,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var S3=["data-p-icon","plus"],Gb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","plus"]],features:[Y],attrs:S3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var k3=["data-p-icon","sort-alt"],jb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Y],attrs:k3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),ee(),J(5,"defs")(6,"clipPath",4),ae(7,"rect",5),ee()()),n&2&&(O("clip-path",i.pathId),l(6),et("id",i.pathId))},encapsulation:2})}return t})();var I3=["data-p-icon","sort-amount-down"],Ub=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Y],attrs:I3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var E3=["data-p-icon","sort-amount-up-alt"],$b=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Y],attrs:E3,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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var M3=["data-p-icon","times-circle"],Wb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","times-circle"]],features:[Y],attrs:M3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var D3=["data-p-icon","trash"],Kb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+lt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","trash"]],features:[Y],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,i){n&1&&($(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),et("id",i.pathId))},encapsulation:2})}return t})();var Yb=`
609
+ .p-checkbox {
610
+ position: relative;
611
+ display: inline-flex;
612
+ user-select: none;
613
+ vertical-align: bottom;
614
+ width: dt('checkbox.width');
615
+ height: dt('checkbox.height');
616
+ }
617
+
618
+ .p-checkbox-input {
619
+ cursor: pointer;
620
+ appearance: none;
621
+ position: absolute;
622
+ inset-block-start: 0;
623
+ inset-inline-start: 0;
624
+ width: 100%;
625
+ height: 100%;
626
+ padding: 0;
627
+ margin: 0;
628
+ opacity: 0;
629
+ z-index: 1;
630
+ outline: 0 none;
631
+ border: 1px solid transparent;
632
+ border-radius: dt('checkbox.border.radius');
633
+ }
634
+
635
+ .p-checkbox-box {
636
+ display: flex;
637
+ justify-content: center;
638
+ align-items: center;
639
+ border-radius: dt('checkbox.border.radius');
640
+ border: 1px solid dt('checkbox.border.color');
641
+ background: dt('checkbox.background');
642
+ width: dt('checkbox.width');
643
+ height: dt('checkbox.height');
644
+ transition:
645
+ background dt('checkbox.transition.duration'),
646
+ color dt('checkbox.transition.duration'),
647
+ border-color dt('checkbox.transition.duration'),
648
+ box-shadow dt('checkbox.transition.duration'),
649
+ outline-color dt('checkbox.transition.duration');
650
+ outline-color: transparent;
651
+ box-shadow: dt('checkbox.shadow');
652
+ }
653
+
654
+ .p-checkbox-icon {
655
+ transition-duration: dt('checkbox.transition.duration');
656
+ color: dt('checkbox.icon.color');
657
+ font-size: dt('checkbox.icon.size');
658
+ width: dt('checkbox.icon.size');
659
+ height: dt('checkbox.icon.size');
660
+ }
661
+
662
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
663
+ border-color: dt('checkbox.hover.border.color');
664
+ }
665
+
666
+ .p-checkbox-checked .p-checkbox-box {
667
+ border-color: dt('checkbox.checked.border.color');
668
+ background: dt('checkbox.checked.background');
669
+ }
670
+
671
+ .p-checkbox-checked .p-checkbox-icon {
672
+ color: dt('checkbox.icon.checked.color');
673
+ }
674
+
675
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
676
+ background: dt('checkbox.checked.hover.background');
677
+ border-color: dt('checkbox.checked.hover.border.color');
678
+ }
679
+
680
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {
681
+ color: dt('checkbox.icon.checked.hover.color');
682
+ }
683
+
684
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
685
+ border-color: dt('checkbox.focus.border.color');
686
+ box-shadow: dt('checkbox.focus.ring.shadow');
687
+ outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color');
688
+ outline-offset: dt('checkbox.focus.ring.offset');
689
+ }
690
+
691
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
692
+ border-color: dt('checkbox.checked.focus.border.color');
693
+ }
694
+
695
+ .p-checkbox.p-invalid > .p-checkbox-box {
696
+ border-color: dt('checkbox.invalid.border.color');
697
+ }
698
+
699
+ .p-checkbox.p-variant-filled .p-checkbox-box {
700
+ background: dt('checkbox.filled.background');
701
+ }
702
+
703
+ .p-checkbox-checked.p-variant-filled .p-checkbox-box {
704
+ background: dt('checkbox.checked.background');
705
+ }
706
+
707
+ .p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
708
+ background: dt('checkbox.checked.hover.background');
709
+ }
710
+
711
+ .p-checkbox.p-disabled {
712
+ opacity: 1;
713
+ }
714
+
715
+ .p-checkbox.p-disabled .p-checkbox-box {
716
+ background: dt('checkbox.disabled.background');
717
+ border-color: dt('checkbox.checked.disabled.border.color');
718
+ }
719
+
720
+ .p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {
721
+ color: dt('checkbox.icon.disabled.color');
722
+ }
723
+
724
+ .p-checkbox-sm,
725
+ .p-checkbox-sm .p-checkbox-box {
726
+ width: dt('checkbox.sm.width');
727
+ height: dt('checkbox.sm.height');
728
+ }
729
+
730
+ .p-checkbox-sm .p-checkbox-icon {
731
+ font-size: dt('checkbox.icon.sm.size');
732
+ width: dt('checkbox.icon.sm.size');
733
+ height: dt('checkbox.icon.sm.size');
734
+ }
735
+
736
+ .p-checkbox-lg,
737
+ .p-checkbox-lg .p-checkbox-box {
738
+ width: dt('checkbox.lg.width');
739
+ height: dt('checkbox.lg.height');
740
+ }
741
+
742
+ .p-checkbox-lg .p-checkbox-icon {
743
+ font-size: dt('checkbox.icon.lg.size');
744
+ width: dt('checkbox.icon.lg.size');
745
+ height: dt('checkbox.icon.lg.size');
746
+ }
747
+ `;var P3=["icon"],R3=["input"],O3=(t,o,e)=>({checked:t,class:o,dataP:e});function F3(t,o){if(t&1&&F(0,"span",8),t&2){let e=d(3);z(e.cx("icon")),h("ngClass",e.checkboxIcon)("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function N3(t,o){if(t&1&&($(),F(0,"svg",9)),t&2){let e=d(3);z(e.cx("icon")),h("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function A3(t,o){if(t&1&&(de(0),k(1,F3,1,5,"span",6)(2,N3,1,4,"svg",7),ue()),t&2){let e=d(2);l(),h("ngIf",e.checkboxIcon),l(),h("ngIf",!e.checkboxIcon)}}function L3(t,o){if(t&1&&($(),F(0,"svg",10)),t&2){let e=d(2);z(e.cx("icon")),h("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function B3(t,o){if(t&1&&(de(0),k(1,A3,3,2,"ng-container",3)(2,L3,1,4,"svg",5),ue()),t&2){let e=d();l(),h("ngIf",e.checked),l(),h("ngIf",e._indeterminate())}}function V3(t,o){}function z3(t,o){t&1&&k(0,V3,0,0,"ng-template")}var H3=`
748
+ ${Yb}
749
+
750
+ /* For PrimeNG */
751
+ p-checkBox.ng-invalid.ng-dirty .p-checkbox-box,
752
+ p-check-box.ng-invalid.ng-dirty .p-checkbox-box,
753
+ p-checkbox.ng-invalid.ng-dirty .p-checkbox-box {
754
+ border-color: dt('checkbox.invalid.border.color');
755
+ }
756
+ `,q3={root:({instance:t})=>["p-checkbox p-component",{"p-checkbox-checked p-highlight":t.checked,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-checkbox-sm p-inputfield-sm":t.size()==="small","p-checkbox-lg p-inputfield-lg":t.size()==="large"}],box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"},Zb=(()=>{class t extends bt{name="checkbox";style=H3;classes=q3;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var Xb=new he("CHECKBOX_INSTANCE"),G3={provide:Xn,useExisting:Sn(()=>Qb),multi:!0},Qb=(()=>{class t extends cs{componentName="Checkbox";hostName="";value;binary;ariaLabelledBy;ariaLabel;tabindex;inputId;inputStyle;styleClass;inputClass;indeterminate=!1;formControl;checkboxIcon;readonly;autofocus;trueValue=!0;falseValue=!1;variant=B();size=B();onChange=new ie;onFocus=new ie;onBlur=new ie;inputViewChild;get checked(){return this._indeterminate()?!1:this.binary?this.modelValue()===this.trueValue:q0(this.value,this.modelValue())}_indeterminate=te(void 0);checkboxIconTemplate;templates;_checkboxIconTemplate;focused=!1;_componentStyle=p(Zb);bindDirectiveInstance=p(fe,{self:!0});$pcCheckbox=p(Xb,{optional:!0,skipSelf:!0})??void 0;$variant=E(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());onAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"icon":this._checkboxIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break}})}onChanges(e){e.indeterminate&&this._indeterminate.set(e.indeterminate.currentValue)}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}updateModel(e){let n,i=this.injector.get(ho,null,{optional:!0,self:!0}),r=i&&!this.formControl?i.value:this.modelValue();this.binary?(n=this._indeterminate()?this.trueValue:this.checked?this.falseValue:this.trueValue,this.writeModelValue(n),this.onModelChange(n)):(this.checked||this._indeterminate()?n=r.filter(a=>!H0(a,this.value)):n=r?[...r,this.value]:[this.value],this.onModelChange(n),this.writeModelValue(n),this.formControl&&this.formControl.setValue(n)),this._indeterminate()&&this._indeterminate.set(!1),this.onChange.emit({checked:n,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}focus(){this.inputViewChild?.nativeElement.focus()}writeControlValue(e,n){n(e),this.cd.markForCheck()}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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-checkbox"],["p-checkBox"],["p-check-box"]],contentQueries:function(n,i,r){if(n&1&&kt(r,P3,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.checkboxIconTemplate=a.first),X(a=Q())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&kn(R3,5),n&2){let r;X(r=Q())&&(i.inputViewChild=r.first)}},hostVars:6,hostBindings:function(n,i){n&2&&(O("data-p-highlight",i.checked)("data-p-checked",i.checked)("data-p-disabled",i.$disabled())("data-p",i.dataP),z(i.cn(i.cx("root"),i.styleClass)))},inputs:{hostName:"hostName",value:"value",binary:[2,"binary","binary",G],ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",Se],inputId:"inputId",inputStyle:"inputStyle",styleClass:"styleClass",inputClass:"inputClass",indeterminate:[2,"indeterminate","indeterminate",G],formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:[2,"readonly","readonly",G],autofocus:[2,"autofocus","autofocus",G],trueValue:"trueValue",falseValue:"falseValue",variant:[1,"variant"],size:[1,"size"]},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[ve([G3,Zb,{provide:Xb,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],decls:5,vars:26,consts:[["input",""],["type","checkbox",3,"focus","blur","change","checked","pBind"],[3,"pBind"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","minus",3,"class","pBind",4,"ngIf"],[3,"class","ngClass","pBind",4,"ngIf"],["data-p-icon","check",3,"class","pBind",4,"ngIf"],[3,"ngClass","pBind"],["data-p-icon","check",3,"pBind"],["data-p-icon","minus",3,"pBind"]],template:function(n,i){n&1&&(m(0,"input",1,0),A("focus",function(a){return i.onInputFocus(a)})("blur",function(a){return i.onInputBlur(a)})("change",function(a){return i.handleChange(a)}),_(),m(2,"div",2),k(3,B3,3,2,"ng-container",3)(4,z3,1,0,null,4),_()),n&2&&(Pt(i.inputStyle),z(i.cn(i.cx("input"),i.inputClass)),h("checked",i.checked)("pBind",i.ptm("input")),O("id",i.inputId)("value",i.value)("name",i.name())("tabindex",i.tabindex)("required",i.required()?"":void 0)("readonly",i.readonly?"":void 0)("disabled",i.$disabled()?"":void 0)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel),l(2),z(i.cx("box")),h("pBind",i.ptm("box")),O("data-p",i.dataP),l(),h("ngIf",!i.checkboxIconTemplate&&!i._checkboxIconTemplate),l(),h("ngTemplateOutlet",i.checkboxIconTemplate||i._checkboxIconTemplate)("ngTemplateOutletContext",O0(22,O3,i.checked,i.cx("icon"),i.dataP)))},dependencies:[st,sn,Rt,wt,Pe,rb,qb,En,fe],encapsulation:2,changeDetection:0})}return t})(),Jb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[Qb,Pe,Pe]})}return t})();var ev=`
757
+ .p-datepicker {
758
+ display: inline-flex;
759
+ max-width: 100%;
760
+ }
761
+
762
+ .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-input {
763
+ border-start-end-radius: 0;
764
+ border-end-end-radius: 0;
765
+ }
766
+
767
+ .p-datepicker-input {
768
+ flex: 1 1 auto;
769
+ width: 1%;
770
+ }
771
+
772
+ .p-datepicker-dropdown {
773
+ cursor: pointer;
774
+ display: inline-flex;
775
+ user-select: none;
776
+ align-items: center;
777
+ justify-content: center;
778
+ overflow: hidden;
779
+ position: relative;
780
+ width: dt('datepicker.dropdown.width');
781
+ border-start-end-radius: dt('datepicker.dropdown.border.radius');
782
+ border-end-end-radius: dt('datepicker.dropdown.border.radius');
783
+ background: dt('datepicker.dropdown.background');
784
+ border: 1px solid dt('datepicker.dropdown.border.color');
785
+ border-inline-start: 0 none;
786
+ color: dt('datepicker.dropdown.color');
787
+ transition:
788
+ background dt('datepicker.transition.duration'),
789
+ color dt('datepicker.transition.duration'),
790
+ border-color dt('datepicker.transition.duration'),
791
+ outline-color dt('datepicker.transition.duration');
792
+ outline-color: transparent;
793
+ }
794
+
795
+ .p-datepicker-dropdown:not(:disabled):hover {
796
+ background: dt('datepicker.dropdown.hover.background');
797
+ border-color: dt('datepicker.dropdown.hover.border.color');
798
+ color: dt('datepicker.dropdown.hover.color');
799
+ }
800
+
801
+ .p-datepicker-dropdown:not(:disabled):active {
802
+ background: dt('datepicker.dropdown.active.background');
803
+ border-color: dt('datepicker.dropdown.active.border.color');
804
+ color: dt('datepicker.dropdown.active.color');
805
+ }
806
+
807
+ .p-datepicker-dropdown:focus-visible {
808
+ box-shadow: dt('datepicker.dropdown.focus.ring.shadow');
809
+ outline: dt('datepicker.dropdown.focus.ring.width') dt('datepicker.dropdown.focus.ring.style') dt('datepicker.dropdown.focus.ring.color');
810
+ outline-offset: dt('datepicker.dropdown.focus.ring.offset');
811
+ }
812
+
813
+ .p-datepicker:has(.p-datepicker-input-icon-container) {
814
+ position: relative;
815
+ }
816
+
817
+ .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-input {
818
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
819
+ }
820
+
821
+ .p-datepicker-input-icon-container {
822
+ cursor: pointer;
823
+ position: absolute;
824
+ top: 50%;
825
+ inset-inline-end: dt('form.field.padding.x');
826
+ margin-block-start: calc(-1 * (dt('icon.size') / 2));
827
+ color: dt('datepicker.input.icon.color');
828
+ line-height: 1;
829
+ z-index: 1;
830
+ }
831
+
832
+ .p-datepicker:has(.p-datepicker-input:disabled) .p-datepicker-input-icon-container {
833
+ cursor: default;
834
+ }
835
+
836
+ .p-datepicker-fluid {
837
+ display: flex;
838
+ }
839
+
840
+ .p-datepicker .p-datepicker-panel {
841
+ min-width: 100%;
842
+ }
843
+
844
+ .p-datepicker-panel {
845
+ width: auto;
846
+ padding: dt('datepicker.panel.padding');
847
+ background: dt('datepicker.panel.background');
848
+ color: dt('datepicker.panel.color');
849
+ border: 1px solid dt('datepicker.panel.border.color');
850
+ border-radius: dt('datepicker.panel.border.radius');
851
+ box-shadow: dt('datepicker.panel.shadow');
852
+ }
853
+
854
+ .p-datepicker-panel-inline {
855
+ display: inline-block;
856
+ overflow-x: auto;
857
+ box-shadow: none;
858
+ }
859
+
860
+ .p-datepicker-header {
861
+ display: flex;
862
+ align-items: center;
863
+ justify-content: space-between;
864
+ padding: dt('datepicker.header.padding');
865
+ background: dt('datepicker.header.background');
866
+ color: dt('datepicker.header.color');
867
+ border-block-end: 1px solid dt('datepicker.header.border.color');
868
+ }
869
+
870
+ .p-datepicker-next-button:dir(rtl) {
871
+ order: -1;
872
+ }
873
+
874
+ .p-datepicker-prev-button:dir(rtl) {
875
+ order: 1;
876
+ }
877
+
878
+ .p-datepicker-title {
879
+ display: flex;
880
+ align-items: center;
881
+ justify-content: space-between;
882
+ gap: dt('datepicker.title.gap');
883
+ font-weight: dt('datepicker.title.font.weight');
884
+ }
885
+
886
+ .p-datepicker-select-year,
887
+ .p-datepicker-select-month {
888
+ border: none;
889
+ background: transparent;
890
+ margin: 0;
891
+ cursor: pointer;
892
+ font-weight: inherit;
893
+ transition:
894
+ background dt('datepicker.transition.duration'),
895
+ color dt('datepicker.transition.duration'),
896
+ border-color dt('datepicker.transition.duration'),
897
+ outline-color dt('datepicker.transition.duration'),
898
+ box-shadow dt('datepicker.transition.duration');
899
+ }
900
+
901
+ .p-datepicker-select-month {
902
+ padding: dt('datepicker.select.month.padding');
903
+ color: dt('datepicker.select.month.color');
904
+ border-radius: dt('datepicker.select.month.border.radius');
905
+ }
906
+
907
+ .p-datepicker-select-year {
908
+ padding: dt('datepicker.select.year.padding');
909
+ color: dt('datepicker.select.year.color');
910
+ border-radius: dt('datepicker.select.year.border.radius');
911
+ }
912
+
913
+ .p-datepicker-select-month:enabled:hover {
914
+ background: dt('datepicker.select.month.hover.background');
915
+ color: dt('datepicker.select.month.hover.color');
916
+ }
917
+
918
+ .p-datepicker-select-year:enabled:hover {
919
+ background: dt('datepicker.select.year.hover.background');
920
+ color: dt('datepicker.select.year.hover.color');
921
+ }
922
+
923
+ .p-datepicker-select-month:focus-visible,
924
+ .p-datepicker-select-year:focus-visible {
925
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
926
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
927
+ outline-offset: dt('datepicker.date.focus.ring.offset');
928
+ }
929
+
930
+ .p-datepicker-calendar-container {
931
+ display: flex;
932
+ }
933
+
934
+ .p-datepicker-calendar-container .p-datepicker-calendar {
935
+ flex: 1 1 auto;
936
+ border-inline-start: 1px solid dt('datepicker.group.border.color');
937
+ padding-inline-end: dt('datepicker.group.gap');
938
+ padding-inline-start: dt('datepicker.group.gap');
939
+ }
940
+
941
+ .p-datepicker-calendar-container .p-datepicker-calendar:first-child {
942
+ padding-inline-start: 0;
943
+ border-inline-start: 0 none;
944
+ }
945
+
946
+ .p-datepicker-calendar-container .p-datepicker-calendar:last-child {
947
+ padding-inline-end: 0;
948
+ }
949
+
950
+ .p-datepicker-day-view {
951
+ width: 100%;
952
+ border-collapse: collapse;
953
+ font-size: 1rem;
954
+ margin: dt('datepicker.day.view.margin');
955
+ }
956
+
957
+ .p-datepicker-weekday-cell {
958
+ padding: dt('datepicker.week.day.padding');
959
+ }
960
+
961
+ .p-datepicker-weekday {
962
+ font-weight: dt('datepicker.week.day.font.weight');
963
+ color: dt('datepicker.week.day.color');
964
+ }
965
+
966
+ .p-datepicker-day-cell {
967
+ padding: dt('datepicker.date.padding');
968
+ }
969
+
970
+ .p-datepicker-day {
971
+ display: flex;
972
+ justify-content: center;
973
+ align-items: center;
974
+ cursor: pointer;
975
+ margin: 0 auto;
976
+ overflow: hidden;
977
+ position: relative;
978
+ width: dt('datepicker.date.width');
979
+ height: dt('datepicker.date.height');
980
+ border-radius: dt('datepicker.date.border.radius');
981
+ transition:
982
+ background dt('datepicker.transition.duration'),
983
+ color dt('datepicker.transition.duration'),
984
+ border-color dt('datepicker.transition.duration'),
985
+ box-shadow dt('datepicker.transition.duration'),
986
+ outline-color dt('datepicker.transition.duration');
987
+ border: 1px solid transparent;
988
+ outline-color: transparent;
989
+ color: dt('datepicker.date.color');
990
+ }
991
+
992
+ .p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover {
993
+ background: dt('datepicker.date.hover.background');
994
+ color: dt('datepicker.date.hover.color');
995
+ }
996
+
997
+ .p-datepicker-day:focus-visible {
998
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
999
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
1000
+ outline-offset: dt('datepicker.date.focus.ring.offset');
1001
+ }
1002
+
1003
+ .p-datepicker-day-selected {
1004
+ background: dt('datepicker.date.selected.background');
1005
+ color: dt('datepicker.date.selected.color');
1006
+ }
1007
+
1008
+ .p-datepicker-day-selected-range {
1009
+ background: dt('datepicker.date.range.selected.background');
1010
+ color: dt('datepicker.date.range.selected.color');
1011
+ }
1012
+
1013
+ .p-datepicker-today > .p-datepicker-day {
1014
+ background: dt('datepicker.today.background');
1015
+ color: dt('datepicker.today.color');
1016
+ }
1017
+
1018
+ .p-datepicker-today > .p-datepicker-day-selected {
1019
+ background: dt('datepicker.date.selected.background');
1020
+ color: dt('datepicker.date.selected.color');
1021
+ }
1022
+
1023
+ .p-datepicker-today > .p-datepicker-day-selected-range {
1024
+ background: dt('datepicker.date.range.selected.background');
1025
+ color: dt('datepicker.date.range.selected.color');
1026
+ }
1027
+
1028
+ .p-datepicker-weeknumber {
1029
+ text-align: center;
1030
+ }
1031
+
1032
+ .p-datepicker-month-view {
1033
+ margin: dt('datepicker.month.view.margin');
1034
+ }
1035
+
1036
+ .p-datepicker-month {
1037
+ width: 33.3%;
1038
+ display: inline-flex;
1039
+ align-items: center;
1040
+ justify-content: center;
1041
+ cursor: pointer;
1042
+ overflow: hidden;
1043
+ position: relative;
1044
+ padding: dt('datepicker.month.padding');
1045
+ transition:
1046
+ background dt('datepicker.transition.duration'),
1047
+ color dt('datepicker.transition.duration'),
1048
+ border-color dt('datepicker.transition.duration'),
1049
+ box-shadow dt('datepicker.transition.duration'),
1050
+ outline-color dt('datepicker.transition.duration');
1051
+ border-radius: dt('datepicker.month.border.radius');
1052
+ outline-color: transparent;
1053
+ color: dt('datepicker.date.color');
1054
+ }
1055
+
1056
+ .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover {
1057
+ color: dt('datepicker.date.hover.color');
1058
+ background: dt('datepicker.date.hover.background');
1059
+ }
1060
+
1061
+ .p-datepicker-month-selected {
1062
+ color: dt('datepicker.date.selected.color');
1063
+ background: dt('datepicker.date.selected.background');
1064
+ }
1065
+
1066
+ .p-datepicker-month:not(.p-disabled):focus-visible {
1067
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
1068
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
1069
+ outline-offset: dt('datepicker.date.focus.ring.offset');
1070
+ }
1071
+
1072
+ .p-datepicker-year-view {
1073
+ margin: dt('datepicker.year.view.margin');
1074
+ }
1075
+
1076
+ .p-datepicker-year {
1077
+ width: 50%;
1078
+ display: inline-flex;
1079
+ align-items: center;
1080
+ justify-content: center;
1081
+ cursor: pointer;
1082
+ overflow: hidden;
1083
+ position: relative;
1084
+ padding: dt('datepicker.year.padding');
1085
+ transition:
1086
+ background dt('datepicker.transition.duration'),
1087
+ color dt('datepicker.transition.duration'),
1088
+ border-color dt('datepicker.transition.duration'),
1089
+ box-shadow dt('datepicker.transition.duration'),
1090
+ outline-color dt('datepicker.transition.duration');
1091
+ border-radius: dt('datepicker.year.border.radius');
1092
+ outline-color: transparent;
1093
+ color: dt('datepicker.date.color');
1094
+ }
1095
+
1096
+ .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover {
1097
+ color: dt('datepicker.date.hover.color');
1098
+ background: dt('datepicker.date.hover.background');
1099
+ }
1100
+
1101
+ .p-datepicker-year-selected {
1102
+ color: dt('datepicker.date.selected.color');
1103
+ background: dt('datepicker.date.selected.background');
1104
+ }
1105
+
1106
+ .p-datepicker-year:not(.p-disabled):focus-visible {
1107
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
1108
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
1109
+ outline-offset: dt('datepicker.date.focus.ring.offset');
1110
+ }
1111
+
1112
+ .p-datepicker-buttonbar {
1113
+ display: flex;
1114
+ justify-content: space-between;
1115
+ align-items: center;
1116
+ padding: dt('datepicker.buttonbar.padding');
1117
+ border-block-start: 1px solid dt('datepicker.buttonbar.border.color');
1118
+ }
1119
+
1120
+ .p-datepicker-buttonbar .p-button {
1121
+ width: auto;
1122
+ }
1123
+
1124
+ .p-datepicker-time-picker {
1125
+ display: flex;
1126
+ justify-content: center;
1127
+ align-items: center;
1128
+ border-block-start: 1px solid dt('datepicker.time.picker.border.color');
1129
+ padding: 0;
1130
+ gap: dt('datepicker.time.picker.gap');
1131
+ }
1132
+
1133
+ .p-datepicker-calendar-container + .p-datepicker-time-picker {
1134
+ padding: dt('datepicker.time.picker.padding');
1135
+ }
1136
+
1137
+ .p-datepicker-time-picker > div {
1138
+ display: flex;
1139
+ align-items: center;
1140
+ flex-direction: column;
1141
+ gap: dt('datepicker.time.picker.button.gap');
1142
+ }
1143
+
1144
+ .p-datepicker-time-picker span {
1145
+ font-size: 1rem;
1146
+ }
1147
+
1148
+ .p-datepicker-timeonly .p-datepicker-time-picker {
1149
+ border-block-start: 0 none;
1150
+ }
1151
+
1152
+ .p-datepicker-time-picker:dir(rtl) {
1153
+ flex-direction: row-reverse;
1154
+ }
1155
+
1156
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown {
1157
+ width: dt('datepicker.dropdown.sm.width');
1158
+ }
1159
+
1160
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown .p-icon,
1161
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-input-icon {
1162
+ font-size: dt('form.field.sm.font.size');
1163
+ width: dt('form.field.sm.font.size');
1164
+ height: dt('form.field.sm.font.size');
1165
+ }
1166
+
1167
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown {
1168
+ width: dt('datepicker.dropdown.lg.width');
1169
+ }
1170
+
1171
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon,
1172
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon {
1173
+ font-size: dt('form.field.lg.font.size');
1174
+ width: dt('form.field.lg.font.size');
1175
+ height: dt('form.field.lg.font.size');
1176
+ }
1177
+
1178
+ .p-datepicker-clear-icon {
1179
+ position: absolute;
1180
+ top: 50%;
1181
+ margin-top: -0.5rem;
1182
+ cursor: pointer;
1183
+ color: dt('form.field.icon.color');
1184
+ inset-inline-end: dt('form.field.padding.x');
1185
+ }
1186
+
1187
+ .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-clear-icon {
1188
+ inset-inline-end: calc(dt('datepicker.dropdown.width') + dt('form.field.padding.x'));
1189
+ }
1190
+
1191
+ .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-clear-icon {
1192
+ inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1193
+ }
1194
+
1195
+ .p-datepicker:has(.p-datepicker-clear-icon) .p-datepicker-input {
1196
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1197
+ }
1198
+
1199
+ .p-datepicker:has(.p-datepicker-input-icon-container):has(.p-datepicker-clear-icon) .p-datepicker-input {
1200
+ padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
1201
+ }
1202
+
1203
+ .p-inputgroup .p-datepicker-dropdown {
1204
+ border-radius: 0;
1205
+ }
1206
+
1207
+ .p-inputgroup > .p-datepicker:last-child:has(.p-datepicker-dropdown) > .p-datepicker-input {
1208
+ border-start-end-radius: 0;
1209
+ border-end-end-radius: 0;
1210
+ }
1211
+
1212
+ .p-inputgroup > .p-datepicker:last-child .p-datepicker-dropdown {
1213
+ border-start-end-radius: dt('datepicker.dropdown.border.radius');
1214
+ border-end-end-radius: dt('datepicker.dropdown.border.radius');
1215
+ }
1216
+ `;var U3=["date"],$3=["header"],W3=["footer"],K3=["disabledDate"],Y3=["decade"],Z3=["previousicon"],X3=["nexticon"],Q3=["triggericon"],J3=["clearicon"],eR=["decrementicon"],tR=["incrementicon"],nR=["inputicon"],iR=["buttonbar"],oR=["inputfield"],rR=["contentWrapper"],aR=[[["p-header"]],[["p-footer"]]],sR=["p-header","p-footer"],lR=t=>({clickCallBack:t}),tv=t=>({visibility:t}),Uf=t=>({$implicit:t}),cR=t=>({date:t}),dR=(t,o)=>({month:t,index:o}),uR=t=>({year:t}),pR=(t,o)=>({todayCallback:t,clearCallback:o});function hR(t,o){if(t&1){let e=W();$(),m(0,"svg",13),A("click",function(){w(e);let i=d(3);return T(i.clear())}),_()}if(t&2){let e=d(3);z(e.cx("clearIcon")),h("pBind",e.ptm("inputIcon"))}}function fR(t,o){}function mR(t,o){t&1&&k(0,fR,0,0,"ng-template")}function _R(t,o){if(t&1){let e=W();m(0,"span",14),A("click",function(){w(e);let i=d(3);return T(i.clear())}),k(1,mR,1,0,null,6),_()}if(t&2){let e=d(3);z(e.cx("clearIcon")),h("pBind",e.ptm("inputIcon")),l(),h("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function gR(t,o){if(t&1&&(de(0),k(1,hR,1,3,"svg",11)(2,_R,2,4,"span",12),ue()),t&2){let e=d(2);l(),h("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),h("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function bR(t,o){if(t&1&&F(0,"span",17),t&2){let e=d(3);h("ngClass",e.icon)("pBind",e.ptm("dropdownIcon"))}}function vR(t,o){if(t&1&&($(),F(0,"svg",19)),t&2){let e=d(4);h("pBind",e.ptm("dropdownIcon"))}}function yR(t,o){}function CR(t,o){t&1&&k(0,yR,0,0,"ng-template")}function xR(t,o){if(t&1&&(de(0),k(1,vR,1,1,"svg",18)(2,CR,1,0,null,6),ue()),t&2){let e=d(3);l(),h("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),l(),h("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function wR(t,o){if(t&1){let e=W();m(0,"button",15),A("click",function(i){w(e),d();let r=Lt(1),a=d();return T(a.onButtonClick(i,r))}),k(1,bR,1,2,"span",16)(2,xR,3,2,"ng-container",7),_()}if(t&2){let e=d(2);z(e.cx("dropdown")),h("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(),h("ngIf",e.icon),l(),h("ngIf",!e.icon)}}function TR(t,o){if(t&1){let e=W();$(),m(0,"svg",23),A("click",function(i){w(e);let r=d(3);return T(r.onButtonClick(i))}),_()}if(t&2){let e=d(3);z(e.cx("inputIcon")),h("pBind",e.ptm("inputIcon"))}}function SR(t,o){t&1&&ye(0)}function kR(t,o){if(t&1&&(de(0),m(1,"span",20),k(2,TR,1,3,"svg",21)(3,SR,1,0,"ng-container",22),_(),ue()),t&2){let e=d(2);l(),z(e.cx("inputIconContainer")),h("pBind",e.ptm("inputIconContainer")),O("data-p",e.inputIconDataP),l(),h("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),l(),h("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",Fe(7,lR,e.onButtonClick.bind(e)))}}function IR(t,o){if(t&1){let e=W();m(0,"input",9,1),A("focus",function(i){w(e);let r=d();return T(r.onInputFocus(i))})("keydown",function(i){w(e);let r=d();return T(r.onInputKeydown(i))})("click",function(){w(e);let i=d();return T(i.onInputClick())})("blur",function(i){w(e);let r=d();return T(r.onInputBlur(i))})("input",function(i){w(e);let r=d();return T(r.onUserInput(i))}),_(),k(2,gR,3,2,"ng-container",7)(3,wR,3,9,"button",10)(4,kR,4,9,"ng-container",7)}if(t&2){let e=d();z(e.cn(e.cx("pcInputText"),e.inputStyleClass)),h("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),h("ngIf",e.showClear&&!e.$disabled()&&(e.inputfieldViewChild==null||e.inputfieldViewChild.nativeElement==null?null:e.inputfieldViewChild.nativeElement.value)),l(),h("ngIf",e.showIcon&&e.iconDisplay==="button"),l(),h("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function ER(t,o){t&1&&ye(0)}function MR(t,o){t&1&&($(),F(0,"svg",30))}function DR(t,o){}function PR(t,o){t&1&&k(0,DR,0,0,"ng-template")}function RR(t,o){if(t&1&&(m(0,"span"),k(1,PR,1,0,null,6),_()),t&2){let e=d(4);l(),h("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function OR(t,o){if(t&1&&k(0,MR,1,0,"svg",29)(1,RR,2,1,"span",7),t&2){let e=d(3);h("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),l(),h("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function FR(t,o){if(t&1){let e=W();m(0,"button",31),A("click",function(i){w(e);let r=d(3);return T(r.switchToMonthView(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onContainerButtonKeydown(i))}),b(1),_()}if(t&2){let e=d().$implicit,n=d(2);z(n.cx("selectMonth")),h("pBind",n.ptm("selectMonth")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseMonth"))("data-pc-group-section","navigator"),l(),ke(" ",n.getMonthName(e.month)," ")}}function NR(t,o){if(t&1){let e=W();m(0,"button",31),A("click",function(i){w(e);let r=d(3);return T(r.switchToYearView(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onContainerButtonKeydown(i))}),b(1),_()}if(t&2){let e=d().$implicit,n=d(2);z(n.cx("selectYear")),h("pBind",n.ptm("selectYear")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseYear"))("data-pc-group-section","navigator"),l(),ke(" ",n.getYear(e)," ")}}function AR(t,o){if(t&1&&(de(0),b(1),ue()),t&2){let e=d(4);l(),cr("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function LR(t,o){t&1&&ye(0)}function BR(t,o){if(t&1&&(m(0,"span",20),k(1,AR,2,2,"ng-container",7)(2,LR,1,0,"ng-container",22),_()),t&2){let e=d(3);z(e.cx("decade")),h("pBind",e.ptm("decade")),l(),h("ngIf",!e.decadeTemplate&&!e._decadeTemplate),l(),h("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Fe(6,Uf,e.yearPickerValues))}}function VR(t,o){t&1&&($(),F(0,"svg",33))}function zR(t,o){}function HR(t,o){t&1&&k(0,zR,0,0,"ng-template")}function qR(t,o){if(t&1&&(de(0),k(1,HR,1,0,null,6),ue()),t&2){let e=d(4);l(),h("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function GR(t,o){if(t&1&&k(0,VR,1,0,"svg",32)(1,qR,2,1,"ng-container",7),t&2){let e=d(3);h("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),l(),h("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function jR(t,o){if(t&1&&(m(0,"th",20)(1,"span",20),b(2),_()()),t&2){let e=d(4);z(e.cx("weekHeader")),h("pBind",e.ptm("weekHeader")),l(),h("pBind",e.ptm("weekHeaderLabel")),l(),C(e.getTranslation("weekHeader"))}}function UR(t,o){if(t&1&&(m(0,"th",37)(1,"span",20),b(2),_()()),t&2){let e=o.$implicit,n=d(4);z(n.cx("weekDayCell")),h("pBind",n.ptm("weekDayCell")),l(),z(n.cx("weekDay")),h("pBind",n.ptm("weekDay")),l(),C(e)}}function $R(t,o){if(t&1&&(m(0,"td",20)(1,"span",20),b(2),_()()),t&2){let e=d().index,n=d(2).$implicit,i=d(2);z(i.cx("weekNumber")),h("pBind",i.ptm("weekNumber")),l(),z(i.cx("weekLabelContainer")),h("pBind",i.ptm("weekLabelContainer")),l(),ke(" ",n.weekNumbers[e]," ")}}function WR(t,o){if(t&1&&(de(0),b(1),ue()),t&2){let e=d(2).$implicit;l(),C(e.day)}}function KR(t,o){t&1&&ye(0)}function YR(t,o){if(t&1&&(de(0),k(1,KR,1,0,"ng-container",22),ue()),t&2){let e=d(2).$implicit,n=d(5);l(),h("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Fe(2,Uf,e))}}function ZR(t,o){t&1&&ye(0)}function XR(t,o){if(t&1&&(de(0),k(1,ZR,1,0,"ng-container",22),ue()),t&2){let e=d(2).$implicit,n=d(5);l(),h("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Fe(2,Uf,e))}}function QR(t,o){if(t&1&&(m(0,"div",40),b(1),_()),t&2){let e=d(2).$implicit;l(),ke(" ",e.day," ")}}function JR(t,o){if(t&1){let e=W();de(0),m(1,"span",38),A("click",function(i){w(e);let r=d().$implicit,a=d(5);return T(a.onDateSelect(i,r))})("keydown",function(i){w(e);let r=d().$implicit,a=d(3).index,s=d(2);return T(s.onDateCellKeydown(i,r,a))}),k(2,WR,2,1,"ng-container",7)(3,YR,2,4,"ng-container",7)(4,XR,2,4,"ng-container",7),_(),k(5,QR,2,1,"div",39),ue()}if(t&2){let e=d().$implicit,n=d(5);l(),h("ngClass",n.dayClass(e))("pBind",n.ptm("day")),O("data-date",n.formatDateKey(n.formatDateMetaToDate(e))),l(),h("ngIf",!n.dateTemplate&&!n._dateTemplate&&(e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate)),l(),h("ngIf",e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate),l(),h("ngIf",!e.selectable),l(),h("ngIf",n.isSelected(e))}}function eO(t,o){if(t&1&&(m(0,"td",20),k(1,JR,6,7,"ng-container",7),_()),t&2){let e=o.$implicit,n=d(5);z(n.cx("dayCell",Fe(5,cR,e))),h("pBind",n.ptm("dayCell")),O("aria-label",e.day),l(),h("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function tO(t,o){if(t&1&&(m(0,"tr",20),k(1,$R,3,7,"td",8)(2,eO,2,7,"td",24),_()),t&2){let e=o.$implicit,n=d(4);h("pBind",n.ptm("tableBodyRow")),l(),h("ngIf",n.showWeek),l(),h("ngForOf",e)}}function nO(t,o){if(t&1&&(m(0,"table",34)(1,"thead",20)(2,"tr",20),k(3,jR,3,5,"th",8)(4,UR,3,7,"th",35),_()(),m(5,"tbody",20),k(6,tO,3,3,"tr",36),_()()),t&2){let e=d().$implicit,n=d(2);z(n.cx("dayView")),h("pBind",n.ptm("table")),l(),h("pBind",n.ptm("tableHeader")),l(),h("pBind",n.ptm("tableHeaderRow")),l(),h("ngIf",n.showWeek),l(),h("ngForOf",n.weekDays),l(),h("pBind",n.ptm("tableBody")),l(),h("ngForOf",e.dates)}}function iO(t,o){if(t&1){let e=W();m(0,"div",20)(1,"div",20)(2,"p-button",25),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onPrevButtonClick(i))}),k(3,OR,2,2,"ng-template",null,2,We),_(),m(5,"div",20),k(6,FR,2,7,"button",26)(7,NR,2,7,"button",26)(8,BR,3,8,"span",8),_(),m(9,"p-button",27),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onNextButtonClick(i))}),k(10,GR,2,2,"ng-template",null,2,We),_()(),k(12,nO,7,9,"table",28),_()}if(t&2){let e=o.index,n=d(2);z(n.cx("calendar")),h("pBind",n.ptm("calendar")),l(),z(n.cx("header")),h("pBind",n.ptm("header")),l(),h("styleClass",n.cx("pcPrevButton"))("ngStyle",Fe(23,tv,e===0?"visible":"hidden"))("ariaLabel",n.prevIconAriaLabel)("pt",n.ptm("pcPrevButton")),O("data-pc-group-section","navigator"),l(3),z(n.cx("title")),h("pBind",n.ptm("title")),l(),h("ngIf",n.currentView==="date"),l(),h("ngIf",n.currentView!=="year"),l(),h("ngIf",n.currentView==="year"),l(),h("styleClass",n.cx("pcNextButton"))("ngStyle",Fe(25,tv,e===n.months.length-1?"visible":"hidden"))("ariaLabel",n.nextIconAriaLabel)("pt",n.ptm("pcNextButton")),O("data-pc-group-section","navigator"),l(3),h("ngIf",n.currentView==="date")}}function oO(t,o){if(t&1&&(m(0,"div",40),b(1),_()),t&2){let e=d().$implicit;l(),ke(" ",e," ")}}function rO(t,o){if(t&1){let e=W();m(0,"span",42),A("click",function(i){let r=w(e).index,a=d(3);return T(a.onMonthSelect(i,r))})("keydown",function(i){let r=w(e).index,a=d(3);return T(a.onMonthCellKeydown(i,r))}),b(1),k(2,oO,2,1,"div",39),_()}if(t&2){let e=o.$implicit,n=o.index,i=d(3);z(i.cx("month",Yn(5,dR,e,n))),h("pBind",i.ptm("month")),l(),ke(" ",e," "),l(),h("ngIf",i.isMonthSelected(n))}}function aO(t,o){if(t&1&&(m(0,"div",20),k(1,rO,3,8,"span",41),_()),t&2){let e=d(2);z(e.cx("monthView")),h("pBind",e.ptm("monthView")),l(),h("ngForOf",e.monthPickerValues())}}function sO(t,o){if(t&1&&(m(0,"div",40),b(1),_()),t&2){let e=d().$implicit;l(),ke(" ",e," ")}}function lO(t,o){if(t&1){let e=W();m(0,"span",42),A("click",function(i){let r=w(e).$implicit,a=d(3);return T(a.onYearSelect(i,r))})("keydown",function(i){let r=w(e).$implicit,a=d(3);return T(a.onYearCellKeydown(i,r))}),b(1),k(2,sO,2,1,"div",39),_()}if(t&2){let e=o.$implicit,n=d(3);z(n.cx("year",Fe(5,uR,e))),h("pBind",n.ptm("year")),l(),ke(" ",e," "),l(),h("ngIf",n.isYearSelected(e))}}function cO(t,o){if(t&1&&(m(0,"div",20),k(1,lO,3,7,"span",41),_()),t&2){let e=d(2);z(e.cx("yearView")),h("pBind",e.ptm("yearView")),l(),h("ngForOf",e.yearPickerValues())}}function dO(t,o){if(t&1&&(de(0),m(1,"div",20),k(2,iO,13,27,"div",24),_(),k(3,aO,2,4,"div",8)(4,cO,2,4,"div",8),ue()),t&2){let e=d();l(),z(e.cx("calendarContainer")),h("pBind",e.ptm("calendarContainer")),l(),h("ngForOf",e.months),l(),h("ngIf",e.currentView==="month"),l(),h("ngIf",e.currentView==="year")}}function uO(t,o){if(t&1&&($(),F(0,"svg",46)),t&2){let e=d(3);h("pBind",e.ptm("pcIncrementButton").icon)}}function pO(t,o){}function hO(t,o){t&1&&k(0,pO,0,0,"ng-template")}function fO(t,o){if(t&1&&k(0,uO,1,1,"svg",45)(1,hO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function mO(t,o){t&1&&(de(0),b(1,"0"),ue())}function _O(t,o){if(t&1&&($(),F(0,"svg",48)),t&2){let e=d(3);h("pBind",e.ptm("pcDecrementButton").icon)}}function gO(t,o){}function bO(t,o){t&1&&k(0,gO,0,0,"ng-template")}function vO(t,o){if(t&1&&k(0,_O,1,1,"svg",47)(1,bO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function yO(t,o){if(t&1&&($(),F(0,"svg",46)),t&2){let e=d(3);h("pBind",e.ptm("pcIncrementButton").icon)}}function CO(t,o){}function xO(t,o){t&1&&k(0,CO,0,0,"ng-template")}function wO(t,o){if(t&1&&k(0,yO,1,1,"svg",45)(1,xO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function TO(t,o){t&1&&(de(0),b(1,"0"),ue())}function SO(t,o){if(t&1&&($(),F(0,"svg",48)),t&2){let e=d(3);h("pBind",e.ptm("pcDecrementButton").icon)}}function kO(t,o){}function IO(t,o){t&1&&k(0,kO,0,0,"ng-template")}function EO(t,o){if(t&1&&k(0,SO,1,1,"svg",47)(1,IO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function MO(t,o){if(t&1&&(m(0,"div",20)(1,"span",20),b(2),_()()),t&2){let e=d(2);z(e.cx("separator")),h("pBind",e.ptm("separatorContainer")),l(),h("pBind",e.ptm("separator")),l(),C(e.timeSeparator)}}function DO(t,o){if(t&1&&($(),F(0,"svg",46)),t&2){let e=d(4);h("pBind",e.ptm("pcIncrementButton").icon)}}function PO(t,o){}function RO(t,o){t&1&&k(0,PO,0,0,"ng-template")}function OO(t,o){if(t&1&&k(0,DO,1,1,"svg",45)(1,RO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function FO(t,o){t&1&&(de(0),b(1,"0"),ue())}function NO(t,o){if(t&1&&($(),F(0,"svg",48)),t&2){let e=d(4);h("pBind",e.ptm("pcDecrementButton").icon)}}function AO(t,o){}function LO(t,o){t&1&&k(0,AO,0,0,"ng-template")}function BO(t,o){if(t&1&&k(0,NO,1,1,"svg",47)(1,LO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function VO(t,o){if(t&1){let e=W();m(0,"div",20)(1,"p-button",43),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.incrementSecond(i))})("keydown.space",function(i){w(e);let r=d(2);return T(r.incrementSecond(i))})("mousedown",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(i,2,1))})("mouseup",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d(2);return T(i.onTimePickerElementMouseLeave())}),k(2,OO,2,2,"ng-template",null,2,We),_(),m(4,"span",20),k(5,FO,2,0,"ng-container",7),b(6),_(),m(7,"p-button",43),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.decrementSecond(i))})("keydown.space",function(i){w(e);let r=d(2);return T(r.decrementSecond(i))})("mousedown",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(i,2,-1))})("mouseup",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d(2);return T(i.onTimePickerElementMouseLeave())}),k(8,BO,2,2,"ng-template",null,2,We),_()()}if(t&2){let e=d(2);z(e.cx("secondPicker")),h("pBind",e.ptm("secondPicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextSecond"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("second")),l(),h("ngIf",e.currentSecond<10),l(),C(e.currentSecond),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevSecond"))("data-pc-group-section","timepickerbutton")}}function zO(t,o){if(t&1&&(m(0,"div",20)(1,"span",20),b(2),_()()),t&2){let e=d(2);z(e.cx("separator")),h("pBind",e.ptm("separatorContainer")),l(),h("pBind",e.ptm("separator")),l(),C(e.timeSeparator)}}function HO(t,o){if(t&1&&($(),F(0,"svg",46)),t&2){let e=d(4);h("pBind",e.ptm("pcIncrementButton").icon)}}function qO(t,o){}function GO(t,o){t&1&&k(0,qO,0,0,"ng-template")}function jO(t,o){if(t&1&&k(0,HO,1,1,"svg",45)(1,GO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function UO(t,o){if(t&1&&($(),F(0,"svg",48)),t&2){let e=d(4);h("pBind",e.ptm("pcDecrementButton").icon)}}function $O(t,o){}function WO(t,o){t&1&&k(0,$O,0,0,"ng-template")}function KO(t,o){if(t&1&&k(0,UO,1,1,"svg",47)(1,WO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function YO(t,o){if(t&1){let e=W();m(0,"div",20)(1,"p-button",49),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))}),k(2,jO,2,2,"ng-template",null,2,We),_(),m(4,"span",20),b(5),_(),m(6,"p-button",50),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("click",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))}),k(7,KO,2,2,"ng-template",null,2,We),_()()}if(t&2){let e=d(2);z(e.cx("ampmPicker")),h("pBind",e.ptm("ampmPicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("am"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("ampm")),l(),C(e.pm?"PM":"AM"),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("pm"))("data-pc-group-section","timepickerbutton")}}function ZO(t,o){if(t&1){let e=W();m(0,"div",20)(1,"div",20)(2,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.incrementHour(i))})("keydown.space",function(i){w(e);let r=d();return T(r.incrementHour(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,0,1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),k(3,fO,2,2,"ng-template",null,2,We),_(),m(5,"span",20),k(6,mO,2,0,"ng-container",7),b(7),_(),m(8,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.decrementHour(i))})("keydown.space",function(i){w(e);let r=d();return T(r.decrementHour(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,0,-1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),k(9,vO,2,2,"ng-template",null,2,We),_()(),m(11,"div",44)(12,"span",20),b(13),_()(),m(14,"div",20)(15,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.incrementMinute(i))})("keydown.space",function(i){w(e);let r=d();return T(r.incrementMinute(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,1,1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),k(16,wO,2,2,"ng-template",null,2,We),_(),m(18,"span",20),k(19,TO,2,0,"ng-container",7),b(20),_(),m(21,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.decrementMinute(i))})("keydown.space",function(i){w(e);let r=d();return T(r.decrementMinute(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,1,-1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),k(22,EO,2,2,"ng-template",null,2,We),_()(),k(24,MO,3,5,"div",8)(25,VO,10,14,"div",8)(26,zO,3,5,"div",8)(27,YO,9,13,"div",8),_()}if(t&2){let e=d();z(e.cx("timePicker")),h("pBind",e.ptm("timePicker")),l(),z(e.cx("hourPicker")),h("pBind",e.ptm("hourPicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextHour"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("hour")),l(),h("ngIf",e.currentHour<10),l(),C(e.currentHour),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevHour"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("separatorContainer")),l(),h("pBind",e.ptm("separator")),l(),C(e.timeSeparator),l(),z(e.cx("minutePicker")),h("pBind",e.ptm("minutePicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextMinute"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("minute")),l(),h("ngIf",e.currentMinute<10),l(),C(e.currentMinute),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevMinute"))("data-pc-group-section","timepickerbutton"),l(3),h("ngIf",e.showSeconds),l(),h("ngIf",e.showSeconds),l(),h("ngIf",e.hourFormat=="12"),l(),h("ngIf",e.hourFormat=="12")}}function XO(t,o){t&1&&ye(0)}function QO(t,o){if(t&1&&k(0,XO,1,0,"ng-container",22),t&2){let e=d(2);h("ngTemplateOutlet",e.buttonBarTemplate||e._buttonBarTemplate)("ngTemplateOutletContext",Yn(2,pR,e.onTodayButtonClick.bind(e),e.onClearButtonClick.bind(e)))}}function JO(t,o){if(t&1){let e=W();m(0,"p-button",51),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onTodayButtonClick(i))}),_(),m(1,"p-button",51),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onClearButtonClick(i))}),_()}if(t&2){let e=d(2);h("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass)("pt",e.ptm("pcTodayButton")),O("data-pc-group-section","button"),l(),h("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)("pt",e.ptm("pcClearButton")),O("data-pc-group-section","button")}}function eF(t,o){if(t&1&&(m(0,"div",20),M(1,QO,1,5,"ng-container")(2,JO,2,10),_()),t&2){let e=d();z(e.cx("buttonbar")),h("pBind",e.ptm("buttonbar")),l(),D(e.buttonBarTemplate||e._buttonBarTemplate?1:2)}}function tF(t,o){t&1&&ye(0)}var nF=`
1217
+ ${ev}
1218
+
1219
+ /* For PrimeNG */
1220
+ .p-datepicker.ng-invalid.ng-dirty .p-inputtext {
1221
+ border-color: dt('inputtext.invalid.border.color');
1222
+ }
1223
+ `,iF={root:()=>({position:"relative"})},oF={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:o})=>{let e="";if(t.isRangeSelection()&&t.isSelected(o)&&o.selectable){let n=t.value[0],i=t.value[1],r=n&&o.year===n.getFullYear()&&o.month===n.getMonth()&&o.day===n.getDate(),a=i&&o.year===i.getFullYear()&&o.month===i.getMonth()&&o.day===i.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(o)&&o.selectable,"p-disabled":t.$disabled()||!o.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:o})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(o),"p-disabled":t.isMonthDisabled(o)}],yearView:"p-datepicker-year-view",year:({instance:t,year:o})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(o),"p-disabled":t.isYearDisabled(o)}],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"},nv=(()=>{class t extends bt{name="datepicker";style=nF;classes=oF;inlineStyles=iF;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var rF={provide:Xn,useExisting:Sn(()=>ov),multi:!0},iv=new he("DATEPICKER_INSTANCE"),ov=(()=>{class t extends ds{zone;overlayService;componentName="DatePicker";bindDirectiveInstance=p(fe,{self:!0});$pcDatePicker=p(iv,{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=B(void 0);motionOptions=B(void 0);computedMotionOptions=E(()=>be(be({},this.ptm("motion")),this.motionOptions()));onFocus=new ie;onBlur=new ie;onClose=new ie;onSelect=new ie;onClear=new ie;onInput=new ie;onTodayClick=new ie;onClearClick=new ie;onMonthChange=new ie;onYearChange=new ie;onClickOutside=new ie;onShow=new ie;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(nv);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;overlayMinWidth;$appendTo=E(()=>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=lt("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=N0(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 i=e;i<=n;i++)this.yearOptions.push(i)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Bt.DAY_NAMES_MIN);for(let i=0;i<7;i++)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 i=0;i<10;i++)e.push(n+i);return e}createMonths(e,n){this.months=this.months=[];for(let i=0;i<this.numberOfMonths;i++){let r=e+i,a=n;r>11&&(r=r%12,a=n+Math.floor((e+i)/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 i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}createMonth(e,n){let i=[],r=this.getFirstDayOfMonthIndex(e,n),a=this.getDaysCountInMonth(e,n),s=this.getDaysCountInPrevMonth(e,n),c=1,u=new Date,f=[],g=Math.ceil((a+r)/7);for(let x=0;x<g;x++){let I=[];if(x==0){for(let N=s-r+1;N<=s;N++){let j=this.getPreviousMonthAndYear(e,n);I.push({day:N,month:j.month,year:j.year,otherMonth:!0,today:this.isToday(u,N,j.month,j.year),selectable:this.isSelectable(N,j.month,j.year,!0)})}let S=7-I.length;for(let N=0;N<S;N++)I.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);I.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 I.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&f.push(this.getWeekNumber(new Date(I[0].year,I[0].month,I[0].day))),i.push(I)}return{month:e,year:n,dates:i,weekNumbers:f}}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((i,r)=>!this.isDateEquals(i,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 i=this.formatDateTime(this.value[n]);e+=i,n!==this.value.length-1&&(e+=this.multipleSeparator+" ")}else if(this.isRangeSelection()&&this.value&&this.value.length){let n=this.value[0],i=this.value[1];e=this.formatDateTime(n),i&&(e+=" "+this.rangeSeparator+" "+this.formatDateTime(i))}}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,i=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=i?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 i=this.value[0],r=this.value[1];!r&&n.getTime()>=i.getTime()?r=n:(i=n,r=null),this.updateModel([i,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(i=>this.formatDateTime(i))),this.writeModelValue(n),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let i=new Date;i.setDate(1),i.setMonth(e),i.setFullYear(n);let r=i.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 i=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(i.month,i.year)}getPreviousMonthAndYear(e,n){let i,r;return e===0?(i=11,r=n-1):(i=e-1,r=n),{month:i,year:r}}getNextMonthAndYear(e,n){let i,r;return e===11?(i=0,r=n+1):(i=e+1,r=n),{month:i,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 i of this.value)if(n=this.isDateEquals(i,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),i=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>=i&&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 i=n??this.currentYear;for(let r=1;r<this.getDaysCountInMonth(e,i)+1;r++)if(this.isSelectable(r,e,i,!1))return!1;return!0}isYearDisabled(e){return Array(12).fill(0).every((n,i)=>this.isMonthDisabled(i,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&&mr(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,i){let r=!1;if(mr(e)&&mr(n)){let a=this.formatDateMetaToDate(i);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,i,r){return e.getDate()===n&&e.getMonth()===i&&e.getFullYear()===r}isSelectable(e,n,i,r){let a=!0,s=!0,c=!0,u=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>i||this.minDate.getFullYear()===i&&this.currentView!="year"&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(a=!1),this.maxDate&&(this.maxDate.getFullYear()<i||this.maxDate.getFullYear()===i&&(this.maxDate.getMonth()<n||this.maxDate.getMonth()===n&&this.maxDate.getDate()<e))&&(s=!1),this.disabledDates&&(c=!this.isDateDisabled(e,n,i)),this.disabledDays&&(u=!this.isDayDisabled(e,n,i)),a&&s&&c&&u)}isDateDisabled(e,n,i){if(this.disabledDates){for(let r of this.disabledDates)if(r.getFullYear()===i&&r.getMonth()===n&&r.getDate()===e)return!0}return!1}isDayDisabled(e,n,i){if(this.disabledDays){let a=new Date(i,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=gt(this.el?.nativeElement,".p-datepicker-header"),i=e.target;if(this.timeOnly)return;i==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&&(Of(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,i){let r=e.currentTarget,a=r.parentElement,s=this.formatDateMetaToDate(n);switch(e.which){case 40:{r.tabIndex="-1";let S=hr(a),N=a.parentElement.nextElementSibling;if(N){let j=N.children[S].children[0];yn(j,"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=hr(a),N=a.parentElement.previousElementSibling;if(N){let j=N.children[S].children[0];yn(j,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(j.tabIndex="0",j.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];yn(N,"p-disabled")||yn(N.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,i):(N.tabIndex="0",N.focus())}else this.navigateToMonth(!0,i);e.preventDefault();break}case 39:{r.tabIndex="-1";let S=a.nextElementSibling;if(S){let N=S.children[0];yn(N,"p-disabled")?this.navigateToMonth(!1,i):(N.tabIndex="0",N.focus())}else this.navigateToMonth(!1,i);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,i,`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,i,`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),f=gt(r.offsetParent,`span[data-date='${u}']:not(.p-disabled):not(.p-ink)`);f&&(f.tabIndex="0",f.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let g=new Date(s.getFullYear(),s.getMonth()+1,0),x=this.formatDateKey(g),I=gt(r.offsetParent,`span[data-date='${x}']:not(.p-disabled):not(.p-ink)`);g&&(I.tabIndex="0",I.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,n){let i=e.currentTarget;switch(e.which){case 38:case 40:{i.tabIndex="-1";var r=i.parentElement.children,a=hr(i);let s=r[e.which===40?a+3:a-3];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{i.tabIndex="-1";let s=i.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{i.tabIndex="-1";let s=i.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 i=e.currentTarget;switch(e.which){case 38:case 40:{i.tabIndex="-1";var r=i.parentElement.children,a=hr(i);let s=r[e.which===40?a+2:a-2];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{i.tabIndex="-1";let s=i.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{i.tabIndex="-1";let s=i.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,i){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this._focusKey=i,this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[n-1];if(i){let a=gt(r,i);a.tabIndex="0",a.focus()}else{let a=In(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=i,this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[n+1];if(i){let a=gt(r,i);a.tabIndex="0",a.focus()}else{let a=gt(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?gt(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():gt(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=In(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=In(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=In(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=gt(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=gt(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=gt(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 i=In(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=gt(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");i.forEach(a=>a.tabIndex=-1),n=r||i[0],i.length===0&&In(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(this.currentView==="year"){let i=In(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=gt(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");i.forEach(a=>a.tabIndex=-1),n=r||i[0],i.length===0&&In(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(n=gt(e,"span.p-highlight"),!n){let i=gt(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");i?n=i:n=gt(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=Of(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let i=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(i==-1||i===0)if(this.focusTrap)n[n.length-1].focus();else{if(i===-1)return this.hideOverlay();if(i===0)return}else n[i-1].focus();else if(i==-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(i===n.length-1){if(!this.focusTrap&&i!=-1)return this.hideOverlay();n[0].focus()}else n[i+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,i,r){let a=[e,n,i],s=!1,c=this.value,u=this.convertTo24Hour(e,r),f=this.isRangeSelection(),g=this.isMultipleSelection();(f||g)&&(this.value||(this.value=[new Date,new Date]),f&&(c=this.value[1]||this.value[0]),g&&(c=this.value[this.value.length-1]));let I=c?c.toDateString():null,S=this.minDate&&I&&this.minDate.toDateString()===I,N=this.maxDate&&I&&this.maxDate.toDateString()===I;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()>i):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()>i):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()>i):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()>i):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()<i):a[2]=this.maxDate.getSeconds();break}return a}incrementHour(e){let n=this.currentHour??0,i=(this.currentHour??0)+this.stepHour,r=this.pm;this.hourFormat=="24"?i=i>=24?i-24:i:this.hourFormat=="12"&&(n<12&&i>11&&(r=!this.pm),i=i>=13?i-12:i),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(i,this.currentMinute,this.currentSecond,r),e.preventDefault()}toggleAMPMIfNotMinDate(e){let n=this.value,i=n?n.toDateString():null;this.minDate&&i&&this.minDate.toDateString()===i&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,n,i){this.$disabled()||(this.repeat(e,null,n,i),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,i,r){let a=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,i,r),this.cd.markForCheck()},a),i){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,i=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(i=!this.pm),n=n<=0?12+n:n),this.toggleAMPMIfNotMinDate(i),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(n,this.currentMinute,this.currentSecond,i),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 i=this.parseValueFromString(n);this.isValidSelection(i)?(this.updateModel(i),this.updateUI()):this.keepInvalid&&this.updateModel(i)}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(i=>this.isSelectable(i.getDate(),i.getMonth(),i.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 i=e.split(this.multipleSeparator);n=[];for(let r of i)n.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let i=e.split(" "+this.rangeSeparator+" ");n=[];for(let r=0;r<i.length;r++)n[r]=this.parseDateTime(i[r].trim())}return n}parseDateTime(e){let n,i=e.split(" ");if(this.timeOnly)n=new Date,this.populateTime(n,i[0],i[1]);else{let r=this.getDateFormat();if(this.showTime){let a=this.hourFormat=="12"?i.pop():null,s=i.pop();n=this.parseDate(i.join(" "),r),this.populateTime(n,s,a)}else n=this.parseDate(e,r)}return n}populateTime(e,n,i){if(this.hourFormat=="12"&&!i)throw"Invalid Time";this.pm=i==="PM"||i==="pm";let r=this.parseTime(n);e.setHours(r.hour),e.setMinutes(r.minute),e.setSeconds(r.second)}isValidDate(e){return mr(e)&&z0(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`};Rf(this.overlay,n||{}),this.appendOverlay(),this.alignOverlay(),this.setZIndex(),this.updateFocus(),this.bindListeners(),this.onShow.emit(e.element)}onOverlayAfterLeave(e){this.autoZIndex&&Mn.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):Pi(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"?pr(this.overlay,this.inputfieldViewChild?.nativeElement):A0(this.overlay,this.inputfieldViewChild?.nativeElement))}bindListeners(){this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener()}setZIndex(){this.autoZIndex&&(this.touchUI?Mn.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):Mn.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)),ur(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",i=>{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),X0())}disableModality(){this.mask&&(ur(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 i=0;i<e.length;i++){let r=e[i];if(yn(r,"p-datepicker-mask-scrollblocker")){n=!0;break}}n||Q0(),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(Bt.FIRST_DAY_OF_WEEK)}formatDate(e,n){if(!e)return"";let i,r=f=>{let g=i+1<n.length&&n.charAt(i+1)===f;return g&&i++,g},a=(f,g,x)=>{let I=""+g;if(r(f))for(;I.length<x;)I="0"+I;return I},s=(f,g,x,I)=>r(f)?I[g]:x[g],c="",u=!1;if(e)for(i=0;i<n.length;i++)if(u)n.charAt(i)==="'"&&!r("'")?u=!1:c+=n.charAt(i);else switch(n.charAt(i)){case"d":c+=a("d",e.getDate(),2);break;case"D":c+=s("D",e.getDay(),this.getTranslation(Bt.DAY_NAMES_SHORT),this.getTranslation(Bt.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(Bt.MONTH_NAMES_SHORT),this.getTranslation(Bt.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(i)}return c}formatTime(e){if(!e)return"";let n="",i=e.getHours(),r=e.getMinutes(),a=e.getSeconds();return this.hourFormat=="12"&&i>11&&i!=12&&(i-=12),this.hourFormat=="12"?n+=i===0?12:i<10?"0"+i:i:n+=i<10?"0"+i:i,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(":"),i=this.showSeconds?3:2;if(n.length!==i)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 i,r,a,s=0,c=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),u=-1,f=-1,g=-1,x=-1,I=!1,S,N=pe=>{let Oe=i+1<n.length&&n.charAt(i+1)===pe;return Oe&&i++,Oe},j=pe=>{let Oe=N(pe),De=pe==="@"?14:pe==="!"?20:pe==="y"&&Oe?4:pe==="o"?3:2,je=pe==="y"?De:1,jt=new RegExp("^\\d{"+je+","+De+"}"),ft=e.substring(s).match(jt);if(!ft)throw"Missing number at position "+s;return s+=ft[0].length,parseInt(ft[0],10)},Z=(pe,Oe,De)=>{let je=-1,jt=N(pe)?De:Oe,ft=[];for(let xt=0;xt<jt.length;xt++)ft.push([xt,jt[xt]]);ft.sort((xt,nt)=>-(xt[1].length-nt[1].length));for(let xt=0;xt<ft.length;xt++){let nt=ft[xt][1];if(e.substr(s,nt.length).toLowerCase()===nt.toLowerCase()){je=ft[xt][0],s+=nt.length;break}}if(je!==-1)return je+1;throw"Unknown name at position "+s},ne=()=>{if(e.charAt(s)!==n.charAt(i))throw"Unexpected literal at position "+s;s++};for(this.view==="month"&&(g=1),i=0;i<n.length;i++)if(I)n.charAt(i)==="'"&&!N("'")?I=!1:ne();else switch(n.charAt(i)){case"d":g=j("d");break;case"D":Z("D",this.getTranslation(Bt.DAY_NAMES_SHORT),this.getTranslation(Bt.DAY_NAMES));break;case"o":x=j("o");break;case"m":f=j("m");break;case"M":f=Z("M",this.getTranslation(Bt.MONTH_NAMES_SHORT),this.getTranslation(Bt.MONTH_NAMES));break;case"y":u=j("y");break;case"@":S=new Date(j("@")),u=S.getFullYear(),f=S.getMonth()+1,g=S.getDate();break;case"!":S=new Date((j("!")-this.ticksTo1970)/1e4),u=S.getFullYear(),f=S.getMonth()+1,g=S.getDate();break;case"'":N("'")?ne():I=!0;break;default:ne()}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)),x>-1){f=1,g=x;do{if(r=this.getDaysCountInMonth(u,f-1),g<=r)break;f++,g-=r}while(!0)}if(this.view==="year"&&(f=f===-1?1:f,g=g===-1?1:g),S=this.daylightSavingAdjust(new Date(u,f-1,g)),S.getFullYear()!==u||S.getMonth()+1!==f||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,i={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,i),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",fr(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(i=>!!(i.breakpoint&&i.numMonths)).sort((i,r)=>-1*i.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let i=0;i<n.length;i++){let{breakpoint:r,numMonths:a}=n[i],s=`
1224
+ .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${a}) .p-datepicker-next {
1225
+ display: inline-flex !important;
1226
+ }
1227
+ `;for(let c=a;c<this.numberOfMonths;c++)s+=`
1228
+ .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${c+1}) {
1229
+ display: none !important;
1230
+ }
1231
+ `;e+=`
1232
+ @media screen and (max-width: ${r}) {
1233
+ ${s}
1234
+ }
1235
+ `}}this.responsiveStyleElement.innerHTML=e,fr(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 _r(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 yn(e.target,"p-datepicker-prev-button")||yn(e.target,"p-datepicker-prev-icon")||yn(e.target,"p-datepicker-next-button")||yn(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!ts()&&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&&Mn.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||t)(bn(on),bn(po))};static \u0275cmp=H({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,i,r){if(n&1&&kt(r,U3,4)(r,$3,4)(r,W3,4)(r,K3,4)(r,Y3,4)(r,Z3,4)(r,X3,4)(r,Q3,4)(r,J3,4)(r,eR,4)(r,tR,4)(r,nR,4)(r,iR,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.dateTemplate=a.first),X(a=Q())&&(i.headerTemplate=a.first),X(a=Q())&&(i.footerTemplate=a.first),X(a=Q())&&(i.disabledDateTemplate=a.first),X(a=Q())&&(i.decadeTemplate=a.first),X(a=Q())&&(i.previousIconTemplate=a.first),X(a=Q())&&(i.nextIconTemplate=a.first),X(a=Q())&&(i.triggerIconTemplate=a.first),X(a=Q())&&(i.clearIconTemplate=a.first),X(a=Q())&&(i.decrementIconTemplate=a.first),X(a=Q())&&(i.incrementIconTemplate=a.first),X(a=Q())&&(i.inputIconTemplate=a.first),X(a=Q())&&(i.buttonBarTemplate=a.first),X(a=Q())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&kn(oR,5)(rR,5),n&2){let r;X(r=Q())&&(i.inputfieldViewChild=r.first),X(r=Q())&&(i.content=r.first)}},hostVars:4,hostBindings:function(n,i){n&2&&(Pt(i.sx("root")),z(i.cn(i.cx("root"),i.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",G],showOtherMonths:[2,"showOtherMonths","showOtherMonths",G],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",G],showIcon:[2,"showIcon","showIcon",G],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",G],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",G],stepHour:[2,"stepHour","stepHour",Se],stepMinute:[2,"stepMinute","stepMinute",Se],stepSecond:[2,"stepSecond","stepSecond",Se],showSeconds:[2,"showSeconds","showSeconds",G],showOnFocus:[2,"showOnFocus","showOnFocus",G],showWeek:[2,"showWeek","showWeek",G],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",G],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",Se],showButtonBar:[2,"showButtonBar","showButtonBar",G],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",G],autoZIndex:[2,"autoZIndex","autoZIndex",G],baseZIndex:[2,"baseZIndex","baseZIndex",Se],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",G],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",G],touchUI:[2,"touchUI","touchUI",G],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",G],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",Se],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:[ve([rF,nv,{provide:iv,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],ngContentSelectors:sR,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,i){n&1&&(Dt(aR),k(0,IR,5,28,"ng-template",3),m(1,"p-motion",4),A("onBeforeEnter",function(a){return i.onOverlayBeforeEnter(a)})("onAfterLeave",function(a){return i.onOverlayAfterLeave(a)}),m(2,"div",5,0),A("click",function(a){return i.onOverlayClick(a)}),Le(4),k(5,ER,1,0,"ng-container",6)(6,dO,5,6,"ng-container",7)(7,ZO,28,38,"div",8)(8,eF,3,4,"div",8),Le(9,1),k(10,tF,1,0,"ng-container",6),_()()),n&2&&(h("ngIf",!i.inline),l(),h("visible",i.inline||i.overlayVisible)("appear",!i.inline)("options",i.computedMotionOptions()),l(),z(i.cn(i.cx("panel"),i.panelStyleClass)),h("ngStyle",i.panelStyle)("pBind",i.ptm("panel")),O("id",i.panelId)("aria-label",i.getTranslation("chooseDate"))("role",i.inline?null:"dialog")("aria-modal",i.inline?null:"true"),l(3),h("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),l(),h("ngIf",!i.timeOnly),l(),h("ngIf",(i.showTime||i.timeOnly)&&i.currentView==="date"),l(),h("ngIf",i.showButtonBar),l(2),h("ngTemplateOutlet",i.footerTemplate||i._footerTemplate))},dependencies:[st,sn,co,Rt,wt,Zn,Ot,ls,Lb,Bb,Vb,ab,ss,Ab,go,fo,Pe,En,fe,bo,sb],encapsulation:2,changeDetection:0})}return t})(),rv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[ov,Pe,Pe]})}return t})();var aF=["data-p-icon","filter-fill"],av=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Y],attrs:aF,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,i){n&1&&($(),ae(0,"path",0))},encapsulation:2})}return t})();var sv=`
1236
+ .p-inputnumber {
1237
+ display: inline-flex;
1238
+ position: relative;
1239
+ }
1240
+
1241
+ .p-inputnumber-button {
1242
+ display: flex;
1243
+ align-items: center;
1244
+ justify-content: center;
1245
+ flex: 0 0 auto;
1246
+ cursor: pointer;
1247
+ background: dt('inputnumber.button.background');
1248
+ color: dt('inputnumber.button.color');
1249
+ width: dt('inputnumber.button.width');
1250
+ transition:
1251
+ background dt('inputnumber.transition.duration'),
1252
+ color dt('inputnumber.transition.duration'),
1253
+ border-color dt('inputnumber.transition.duration'),
1254
+ outline-color dt('inputnumber.transition.duration');
1255
+ }
1256
+
1257
+ .p-inputnumber-button:disabled {
1258
+ cursor: auto;
1259
+ }
1260
+
1261
+ .p-inputnumber-button:not(:disabled):hover {
1262
+ background: dt('inputnumber.button.hover.background');
1263
+ color: dt('inputnumber.button.hover.color');
1264
+ }
1265
+
1266
+ .p-inputnumber-button:not(:disabled):active {
1267
+ background: dt('inputnumber.button.active.background');
1268
+ color: dt('inputnumber.button.active.color');
1269
+ }
1270
+
1271
+ .p-inputnumber-stacked .p-inputnumber-button {
1272
+ position: relative;
1273
+ flex: 1 1 auto;
1274
+ border: 0 none;
1275
+ }
1276
+
1277
+ .p-inputnumber-stacked .p-inputnumber-button-group {
1278
+ display: flex;
1279
+ flex-direction: column;
1280
+ position: absolute;
1281
+ inset-block-start: 1px;
1282
+ inset-inline-end: 1px;
1283
+ height: calc(100% - 2px);
1284
+ z-index: 1;
1285
+ }
1286
+
1287
+ .p-inputnumber-stacked .p-inputnumber-increment-button {
1288
+ padding: 0;
1289
+ border-start-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
1290
+ }
1291
+
1292
+ .p-inputnumber-stacked .p-inputnumber-decrement-button {
1293
+ padding: 0;
1294
+ border-end-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
1295
+ }
1296
+
1297
+ .p-inputnumber-stacked .p-inputnumber-input {
1298
+ padding-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
1299
+ }
1300
+
1301
+ .p-inputnumber-horizontal .p-inputnumber-button {
1302
+ border: 1px solid dt('inputnumber.button.border.color');
1303
+ }
1304
+
1305
+ .p-inputnumber-horizontal .p-inputnumber-button:hover {
1306
+ border-color: dt('inputnumber.button.hover.border.color');
1307
+ }
1308
+
1309
+ .p-inputnumber-horizontal .p-inputnumber-button:active {
1310
+ border-color: dt('inputnumber.button.active.border.color');
1311
+ }
1312
+
1313
+ .p-inputnumber-horizontal .p-inputnumber-increment-button {
1314
+ order: 3;
1315
+ border-start-end-radius: dt('inputnumber.button.border.radius');
1316
+ border-end-end-radius: dt('inputnumber.button.border.radius');
1317
+ border-inline-start: 0 none;
1318
+ }
1319
+
1320
+ .p-inputnumber-horizontal .p-inputnumber-input {
1321
+ order: 2;
1322
+ border-radius: 0;
1323
+ }
1324
+
1325
+ .p-inputnumber-horizontal .p-inputnumber-decrement-button {
1326
+ order: 1;
1327
+ border-start-start-radius: dt('inputnumber.button.border.radius');
1328
+ border-end-start-radius: dt('inputnumber.button.border.radius');
1329
+ border-inline-end: 0 none;
1330
+ }
1331
+
1332
+ .p-floatlabel:has(.p-inputnumber-horizontal) label {
1333
+ margin-inline-start: dt('inputnumber.button.width');
1334
+ }
1335
+
1336
+ .p-inputnumber-vertical {
1337
+ flex-direction: column;
1338
+ }
1339
+
1340
+ .p-inputnumber-vertical .p-inputnumber-button {
1341
+ border: 1px solid dt('inputnumber.button.border.color');
1342
+ padding: dt('inputnumber.button.vertical.padding');
1343
+ }
1344
+
1345
+ .p-inputnumber-vertical .p-inputnumber-button:hover {
1346
+ border-color: dt('inputnumber.button.hover.border.color');
1347
+ }
1348
+
1349
+ .p-inputnumber-vertical .p-inputnumber-button:active {
1350
+ border-color: dt('inputnumber.button.active.border.color');
1351
+ }
1352
+
1353
+ .p-inputnumber-vertical .p-inputnumber-increment-button {
1354
+ order: 1;
1355
+ border-start-start-radius: dt('inputnumber.button.border.radius');
1356
+ border-start-end-radius: dt('inputnumber.button.border.radius');
1357
+ width: 100%;
1358
+ border-block-end: 0 none;
1359
+ }
1360
+
1361
+ .p-inputnumber-vertical .p-inputnumber-input {
1362
+ order: 2;
1363
+ border-radius: 0;
1364
+ text-align: center;
1365
+ }
1366
+
1367
+ .p-inputnumber-vertical .p-inputnumber-decrement-button {
1368
+ order: 3;
1369
+ border-end-start-radius: dt('inputnumber.button.border.radius');
1370
+ border-end-end-radius: dt('inputnumber.button.border.radius');
1371
+ width: 100%;
1372
+ border-block-start: 0 none;
1373
+ }
1374
+
1375
+ .p-inputnumber-input {
1376
+ flex: 1 1 auto;
1377
+ }
1378
+
1379
+ .p-inputnumber-fluid {
1380
+ width: 100%;
1381
+ }
1382
+
1383
+ .p-inputnumber-fluid .p-inputnumber-input {
1384
+ width: 1%;
1385
+ }
1386
+
1387
+ .p-inputnumber-fluid.p-inputnumber-vertical .p-inputnumber-input {
1388
+ width: 100%;
1389
+ }
1390
+
1391
+ .p-inputnumber:has(.p-inputtext-sm) .p-inputnumber-button .p-icon {
1392
+ font-size: dt('form.field.sm.font.size');
1393
+ width: dt('form.field.sm.font.size');
1394
+ height: dt('form.field.sm.font.size');
1395
+ }
1396
+
1397
+ .p-inputnumber:has(.p-inputtext-lg) .p-inputnumber-button .p-icon {
1398
+ font-size: dt('form.field.lg.font.size');
1399
+ width: dt('form.field.lg.font.size');
1400
+ height: dt('form.field.lg.font.size');
1401
+ }
1402
+
1403
+ .p-inputnumber-clear-icon {
1404
+ position: absolute;
1405
+ top: 50%;
1406
+ margin-top: -0.5rem;
1407
+ cursor: pointer;
1408
+ inset-inline-end: dt('form.field.padding.x');
1409
+ color: dt('form.field.icon.color');
1410
+ }
1411
+
1412
+ .p-inputnumber:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
1413
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1414
+ }
1415
+
1416
+ .p-inputnumber-stacked .p-inputnumber-clear-icon {
1417
+ inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
1418
+ }
1419
+
1420
+ .p-inputnumber-stacked:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
1421
+ padding-inline-end: calc(dt('inputnumber.button.width') + (dt('form.field.padding.x') * 2) + dt('icon.size'));
1422
+ }
1423
+
1424
+ .p-inputnumber-horizontal .p-inputnumber-clear-icon {
1425
+ inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
1426
+ }
1427
+ `;var sF=["clearicon"],lF=["incrementbuttonicon"],cF=["decrementbuttonicon"],dF=["input"];function uF(t,o){if(t&1){let e=W();$(),m(0,"svg",7),A("click",function(){w(e);let i=d(2);return T(i.clear())}),_()}if(t&2){let e=d(2);z(e.cx("clearIcon")),h("pBind",e.ptm("clearIcon"))}}function pF(t,o){}function hF(t,o){t&1&&k(0,pF,0,0,"ng-template")}function fF(t,o){if(t&1){let e=W();m(0,"span",8),A("click",function(){w(e);let i=d(2);return T(i.clear())}),k(1,hF,1,0,null,9),_()}if(t&2){let e=d(2);z(e.cx("clearIcon")),h("pBind",e.ptm("clearIcon")),l(),h("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function mF(t,o){if(t&1&&(de(0),k(1,uF,1,3,"svg",5)(2,fF,2,4,"span",6),ue()),t&2){let e=d();l(),h("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),h("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function _F(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("incrementButtonIcon"))("ngClass",e.incrementButtonIcon)}}function gF(t,o){if(t&1&&($(),F(0,"svg",15)),t&2){let e=d(3);h("pBind",e.ptm("incrementButtonIcon"))}}function bF(t,o){}function vF(t,o){t&1&&k(0,bF,0,0,"ng-template")}function yF(t,o){if(t&1&&(de(0),k(1,gF,1,1,"svg",14)(2,vF,1,0,null,9),ue()),t&2){let e=d(2);l(),h("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function CF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("decrementButtonIcon"))("ngClass",e.decrementButtonIcon)}}function xF(t,o){if(t&1&&($(),F(0,"svg",17)),t&2){let e=d(3);h("pBind",e.ptm("decrementButtonIcon"))}}function wF(t,o){}function TF(t,o){t&1&&k(0,wF,0,0,"ng-template")}function SF(t,o){if(t&1&&(de(0),k(1,xF,1,1,"svg",16)(2,TF,1,0,null,9),ue()),t&2){let e=d(2);l(),h("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function kF(t,o){if(t&1){let e=W();m(0,"span",10)(1,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onUpButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onUpButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onUpButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onUpButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onUpButtonKeyUp())}),k(2,_F,1,2,"span",12)(3,yF,3,2,"ng-container",2),_(),m(4,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onDownButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onDownButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onDownButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onDownButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onDownButtonKeyUp())}),k(5,CF,1,2,"span",12)(6,SF,3,2,"ng-container",2),_()()}if(t&2){let e=d();z(e.cx("buttonGroup")),h("pBind",e.ptm("buttonGroup")),O("data-p",e.dataP),l(),z(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),h("pBind",e.ptm("incrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.incrementButtonIcon),l(),h("ngIf",!e.incrementButtonIcon),l(),z(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),h("pBind",e.ptm("decrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.decrementButtonIcon),l(),h("ngIf",!e.decrementButtonIcon)}}function IF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("incrementButtonIcon"))("ngClass",e.incrementButtonIcon)}}function EF(t,o){if(t&1&&($(),F(0,"svg",15)),t&2){let e=d(3);h("pBind",e.ptm("incrementButtonIcon"))}}function MF(t,o){}function DF(t,o){t&1&&k(0,MF,0,0,"ng-template")}function PF(t,o){if(t&1&&(de(0),k(1,EF,1,1,"svg",14)(2,DF,1,0,null,9),ue()),t&2){let e=d(2);l(),h("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function RF(t,o){if(t&1){let e=W();m(0,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onUpButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onUpButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onUpButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onUpButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onUpButtonKeyUp())}),k(1,IF,1,2,"span",12)(2,PF,3,2,"ng-container",2),_()}if(t&2){let e=d();z(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),h("pBind",e.ptm("incrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.incrementButtonIcon),l(),h("ngIf",!e.incrementButtonIcon)}}function OF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("decrementButtonIcon"))("ngClass",e.decrementButtonIcon)}}function FF(t,o){if(t&1&&($(),F(0,"svg",17)),t&2){let e=d(3);h("pBind",e.ptm("decrementButtonIcon"))}}function NF(t,o){}function AF(t,o){t&1&&k(0,NF,0,0,"ng-template")}function LF(t,o){if(t&1&&(de(0),k(1,FF,1,1,"svg",16)(2,AF,1,0,null,9),ue()),t&2){let e=d(2);l(),h("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function BF(t,o){if(t&1){let e=W();m(0,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onDownButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onDownButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onDownButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onDownButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onDownButtonKeyUp())}),k(1,OF,1,2,"span",12)(2,LF,3,2,"ng-container",2),_()}if(t&2){let e=d();z(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),h("pBind",e.ptm("decrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.decrementButtonIcon),l(),h("ngIf",!e.decrementButtonIcon)}}var VF=`
1428
+ ${sv}
1429
+
1430
+ /* For PrimeNG */
1431
+ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext,
1432
+ p-input-number.ng-invalid.ng-dirty > .p-inputtext,
1433
+ p-inputnumber.ng-invalid.ng-dirty > .p-inputtext {
1434
+ border-color: dt('inputtext.invalid.border.color');
1435
+ }
1436
+
1437
+ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext:enabled:focus,
1438
+ p-input-number.ng-invalid.ng-dirty > .p-inputtext:enabled:focus,
1439
+ p-inputnumber.ng-invalid.ng-dirty > .p-inputtext:enabled:focus {
1440
+ border-color: dt('inputtext.focus.border.color');
1441
+ }
1442
+
1443
+ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext::placeholder,
1444
+ p-input-number.ng-invalid.ng-dirty > .p-inputtext::placeholder,
1445
+ p-inputnumber.ng-invalid.ng-dirty > .p-inputtext::placeholder {
1446
+ color: dt('inputtext.invalid.placeholder.color');
1447
+ }
1448
+ `,zF={root:({instance:t})=>["p-inputnumber p-component p-inputwrapper",{"p-inputwrapper-filled":t.$filled()||t.allowEmpty===!1,"p-inputwrapper-focus":t.focused,"p-inputnumber-stacked":t.showButtons&&t.buttonLayout==="stacked","p-inputnumber-horizontal":t.showButtons&&t.buttonLayout==="horizontal","p-inputnumber-vertical":t.showButtons&&t.buttonLayout==="vertical","p-inputnumber-fluid":t.hasFluid,"p-invalid":t.invalid()}],pcInputText:"p-inputnumber-input",buttonGroup:"p-inputnumber-button-group",incrementButton:({instance:t})=>["p-inputnumber-button p-inputnumber-increment-button",{"p-disabled":t.showButtons&&t.max()!=null&&t.maxlength()}],decrementButton:({instance:t})=>["p-inputnumber-button p-inputnumber-decrement-button",{"p-disabled":t.showButtons&&t.min()!=null&&t.minlength()}],clearIcon:"p-inputnumber-clear-icon"},lv=(()=>{class t extends bt{name="inputnumber";style=VF;classes=zF;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var cv=new he("INPUTNUMBER_INSTANCE"),HF={provide:Xn,useExisting:Sn(()=>gs),multi:!0},gs=(()=>{class t extends ds{injector;componentName="InputNumber";$pcInputNumber=p(cv,{optional:!0,skipSelf:!0})??void 0;_componentStyle=p(lv);bindDirectiveInstance=p(fe,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}showButtons=!1;format=!0;buttonLayout="stacked";inputId;styleClass;placeholder;tabindex;title;ariaLabelledBy;ariaDescribedBy;ariaLabel;ariaRequired;autocomplete;incrementButtonClass;decrementButtonClass;incrementButtonIcon;decrementButtonIcon;readonly;allowEmpty=!0;locale;localeMatcher;mode="decimal";currency;currencyDisplay;useGrouping=!0;minFractionDigits;maxFractionDigits;prefix;suffix;inputStyle;inputStyleClass;showClear=!1;autofocus;onInput=new ie;onFocus=new ie;onBlur=new ie;onKeyDown=new ie;onClear=new ie;clearIconTemplate;incrementButtonIconTemplate;decrementButtonIconTemplate;templates;input;_clearIconTemplate;_incrementButtonIconTemplate;_decrementButtonIconTemplate;value;focused;initialized;groupChar="";prefixChar="";suffixChar="";isSpecialChar;timer;lastValue;_numeral;numberFormat;_decimal;_decimalChar="";_group;_minusSign;_currency;_prefix;_suffix;_index;ngControl=null;constructor(e){super(),this.injector=e}onChanges(e){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(i=>!!e[i])&&this.updateConstructParser()}onInit(){this.ngControl=this.injector.get(ho,null,{optional:!0}),this.constructParser(),this.initialized=!0}onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"clearicon":this._clearIconTemplate=e.template;break;case"incrementbuttonicon":this._incrementButtonIconTemplate=e.template;break;case"decrementbuttonicon":this._decrementButtonIconTemplate=e.template;break}})}getOptions(){let e=(a,s,c)=>{if(!(a==null||isNaN(a)||!isFinite(a)))return Math.max(s,Math.min(c,Math.floor(a)))},n=e(this.minFractionDigits,0,20),i=e(this.maxFractionDigits,0,100),r=n!=null&&i!=null&&n>i?i:n;return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:r,maximumFractionDigits:i}}constructParser(){let e=this.getOptions(),n=Object.fromEntries(Object.entries(e).filter(([a,s])=>s!==void 0));this.numberFormat=new Intl.NumberFormat(this.locale,n);let i=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),r=new Map(i.map((a,s)=>[a,s]));this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._decimalChar=this.getDecimalChar(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=a=>r.get(a)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){let e=this.getDecimalChar();return new RegExp(`[${e}]`,"g")}getDecimalChar(){return new Intl.NumberFormat(this.locale,Wt(be({},this.getOptions()),{useGrouping:!1})).format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}getGroupingExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){let e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(e!=null){if(e==="-")return e;if(this.format){let i=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&e!=this.prefix&&(i=this.prefix+i),this.suffix&&e!=this.suffix&&(i=i+this.suffix),i}return e.toString()}return""}parseValue(e){let n=this._suffix?new RegExp(this._suffix,""):/(?:)/,i=this._prefix?new RegExp(this._prefix,""):/(?:)/,r=this._currency?new RegExp(this._currency,""):/(?:)/,a=e.replace(n,"").replace(i,"").trim().replace(/\s/g,"").replace(r,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(a){if(a==="-")return a;let s=+a;return isNaN(s)?null:s}return null}repeat(e,n,i){if(this.readonly)return;let r=n||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,i)},r),this.spin(e,i)}spin(e,n){let i=(this.step()??1)*n,r=this.parseValue(this.input?.nativeElement.value)||0,a=this.validateValue(r+i),s=this.maxlength();s&&s<this.formatValue(a).length||(this.updateInput(a,null,"spin",null),this.updateModel(e,a),this.handleOnInput(e,r,a))}clear(){this.value=null,this.onModelChange(this.value),this.onClear.emit()}onUpButtonMouseDown(e){if(e.button===2){this.clearTimer();return}this.$disabled()||(this.input?.nativeElement.focus(),this.repeat(e,null,1),e.preventDefault())}onUpButtonMouseUp(){this.$disabled()||this.clearTimer()}onUpButtonMouseLeave(){this.$disabled()||this.clearTimer()}onUpButtonKeyDown(e){(e.keyCode===32||e.keyCode===13)&&this.repeat(e,null,1)}onUpButtonKeyUp(){this.$disabled()||this.clearTimer()}onDownButtonMouseDown(e){if(e.button===2){this.clearTimer();return}this.$disabled()||(this.input?.nativeElement.focus(),this.repeat(e,null,-1),e.preventDefault())}onDownButtonMouseUp(){this.$disabled()||this.clearTimer()}onDownButtonMouseLeave(){this.$disabled()||this.clearTimer()}onDownButtonKeyUp(){this.$disabled()||this.clearTimer()}onDownButtonKeyDown(e){(e.keyCode===32||e.keyCode===13)&&this.repeat(e,null,-1)}onUserInput(e){this.readonly||(this.isSpecialChar&&(e.target.value=this.lastValue),this.isSpecialChar=!1)}onInputKeyDown(e){if(this.readonly)return;if(this.lastValue=e.target.value,e.shiftKey||e.altKey){this.isSpecialChar=!0;return}let n=e.target.selectionStart,i=e.target.selectionEnd,r=e.target.value,a=null;switch(e.altKey&&e.preventDefault(),e.key){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":for(let s=n;s<=r.length;s++){let c=s===0?0:s-1;if(this.isNumeralChar(r.charAt(c))){this.input.nativeElement.setSelectionRange(s,s);break}}break;case"ArrowRight":for(let s=i;s>=0;s--)if(this.isNumeralChar(r.charAt(s))){this.input.nativeElement.setSelectionRange(s,s);break}break;case"Tab":case"Enter":a=this.validateValue(this.parseValue(this.input.nativeElement.value)),this.input.nativeElement.value=this.formatValue(a),this.input.nativeElement.setAttribute("aria-valuenow",a),this.updateModel(e,a);break;case"Backspace":{if(e.preventDefault(),n===i){if(n==1&&this.prefix||n==r.length&&this.suffix)break;let s=r.charAt(n-1),{decimalCharIndex:c,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(s)){let f=this.getDecimalLength(r);if(this._group.test(s))this._group.lastIndex=0,a=r.slice(0,n-2)+r.slice(n-1);else if(this._decimal.test(s))this._decimal.lastIndex=0,f?this.input?.nativeElement.setSelectionRange(n-1,n-1):a=r.slice(0,n-1)+r.slice(n);else if(c>0&&n>c){let g=this.isDecimalMode()&&(this.minFractionDigits||0)<f?"":"0";a=r.slice(0,n-1)+g+r.slice(n)}else u===1?(a=r.slice(0,n-1)+"0"+r.slice(n),a=this.parseValue(a)>0?a:""):a=r.slice(0,n-1)+r.slice(n)}else this.mode==="currency"&&this._currency&&s.search(this._currency)!=-1&&(a=r.slice(1));this.updateValue(e,a,null,"delete-single")}else a=this.deleteRange(r,n,i),this.updateValue(e,a,null,"delete-range");break}case"Delete":if(e.preventDefault(),n===i){if(n==0&&this.prefix||n==r.length-1&&this.suffix)break;let s=r.charAt(n),{decimalCharIndex:c,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(s)){let f=this.getDecimalLength(r);if(this._group.test(s))this._group.lastIndex=0,a=r.slice(0,n)+r.slice(n+2);else if(this._decimal.test(s))this._decimal.lastIndex=0,f?this.input?.nativeElement.setSelectionRange(n+1,n+1):a=r.slice(0,n)+r.slice(n+1);else if(c>0&&n>c){let g=this.isDecimalMode()&&(this.minFractionDigits||0)<f?"":"0";a=r.slice(0,n)+g+r.slice(n+1)}else u===1?(a=r.slice(0,n)+"0"+r.slice(n+1),a=this.parseValue(a)>0?a:""):a=r.slice(0,n)+r.slice(n+1)}this.updateValue(e,a,null,"delete-back-single")}else a=this.deleteRange(r,n,i),this.updateValue(e,a,null,"delete-range");break;case"Home":this.min()&&(this.updateModel(e,this.min()),e.preventDefault());break;case"End":this.max()&&(this.updateModel(e,this.max()),e.preventDefault());break;default:break}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;let n=e.which||e.keyCode,i=String.fromCharCode(n),r=this.isDecimalSign(i),a=this.isMinusSign(i);n!=13&&e.preventDefault(),!r&&e.code==="NumpadDecimal"&&(r=!0,i=this._decimalChar,n=i.charCodeAt(0));let{value:s,selectionStart:c,selectionEnd:u}=this.input.nativeElement,f=this.parseValue(s+i),g=f!=null?f.toString():"",x=s.substring(c,u),I=this.parseValue(x),S=I!=null?I.toString():"";if(c!==u&&S.length>0){this.insert(e,i,{isDecimalSign:r,isMinusSign:a});return}let N=this.maxlength();N&&g.length>N||(48<=n&&n<=57||a||r)&&this.insert(e,i,{isDecimalSign:r,isMinusSign:a})}onPaste(e){if(!this.$disabled()&&!this.readonly){e.preventDefault();let n=(e.clipboardData||this.document.defaultView.clipboardData).getData("Text");if(this.inputId==="integeronly"&&/[^\d-]/.test(n))return;if(n){this.maxlength()&&(n=n.toString().substring(0,this.maxlength()));let i=this.parseValue(n);i!=null&&this.insert(e,i.toString())}}}allowMinusSign(){let e=this.min();return e==null||e<0}isMinusSign(e){return this._minusSign.test(e)||e==="-"?(this._minusSign.lastIndex=0,!0):!1}isDecimalSign(e){return this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1}isDecimalMode(){return this.mode==="decimal"}getDecimalCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;let r=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:n,decimalCharIndexWithoutPrefix:r}}getCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;let i=e.search(this._minusSign);this._minusSign.lastIndex=0;let r=e.search(this._suffix);this._suffix.lastIndex=0;let a=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:n,minusCharIndex:i,suffixCharIndex:r,currencyCharIndex:a}}insert(e,n,i={isDecimalSign:!1,isMinusSign:!1}){let r=n.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&r!==-1)return;let a=this.input?.nativeElement.selectionStart,s=this.input?.nativeElement.selectionEnd,c=this.input?.nativeElement.value.trim(),{decimalCharIndex:u,minusCharIndex:f,suffixCharIndex:g,currencyCharIndex:x}=this.getCharIndexes(c),I;if(i.isMinusSign)a===0&&(I=c,(f===-1||s!==0)&&(I=this.insertText(c,n,0,s)),this.updateValue(e,I,n,"insert"));else if(i.isDecimalSign)u>0&&a===u?this.updateValue(e,c,n,"insert"):u>a&&u<s?(I=this.insertText(c,n,a,s),this.updateValue(e,I,n,"insert")):u===-1&&this.maxFractionDigits&&(I=this.insertText(c,n,a,s),this.updateValue(e,I,n,"insert"));else{let S=this.numberFormat.resolvedOptions().maximumFractionDigits,N=a!==s?"range-insert":"insert";if(u>0&&a>u){if(a+n.length-(u+1)<=S){let j=x>=a?x-1:g>=a?g:c.length;I=c.slice(0,a)+n+c.slice(a+n.length,j)+c.slice(j),this.updateValue(e,I,n,N)}}else I=this.insertText(c,n,a,s),this.updateValue(e,I,n,N)}}insertText(e,n,i,r){if((n==="."?n:n.split(".")).length===2){let s=e.slice(i,r).search(this._decimal);return this._decimal.lastIndex=0,s>0?e.slice(0,i)+this.formatValue(n)+e.slice(r):e||this.formatValue(n)}else return r-i===e.length?this.formatValue(n):i===0?n+e.slice(r):r===e.length?e.slice(0,i)+n:e.slice(0,i)+n+e.slice(r)}deleteRange(e,n,i){let r;return i-n===e.length?r="":n===0?r=e.slice(i):i===e.length?r=e.slice(0,n):r=e.slice(0,n)+e.slice(i),r}initCursor(){let e=this.input?.nativeElement.selectionStart,n=this.input?.nativeElement.selectionEnd,i=this.input?.nativeElement.value,r=i.length,a=null,s=(this.prefixChar||"").length;i=i.replace(this._prefix,""),(e===n||e!==0||n<s)&&(e-=s);let c=i.charAt(e);if(this.isNumeralChar(c))return e+s;let u=e-1;for(;u>=0;)if(c=i.charAt(u),this.isNumeralChar(c)){a=u+s;break}else u--;if(a!==null)this.input?.nativeElement.setSelectionRange(a+1,a+1);else{for(u=e;u<r;)if(c=i.charAt(u),this.isNumeralChar(c)){a=u+s;break}else u++;a!==null&&this.input?.nativeElement.setSelectionRange(a,a)}return a||0}onInputClick(){let e=this.input?.nativeElement.value;!this.readonly&&e!==L0()&&this.initCursor()}isNumeralChar(e){return e.length===1&&(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e))?(this.resetRegex(),!0):!1}resetRegex(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0}updateValue(e,n,i,r){let a=this.input?.nativeElement.value,s=null;n!=null&&(s=this.parseValue(n),s=!s&&!this.allowEmpty?0:s,this.updateInput(s,i,r,n),this.handleOnInput(e,a,s))}handleOnInput(e,n,i){this.isValueChanged(n,i)&&(this.input.nativeElement.value=this.formatValue(i),this.input?.nativeElement.setAttribute("aria-valuenow",i),this.updateModel(e,i),this.onInput.emit({originalEvent:e,value:i,formattedValue:n}))}isValueChanged(e,n){if(n===null&&e!==null)return!0;if(n!=null){let i=typeof e=="string"?this.parseValue(e):e;return n!==i}return!1}validateValue(e){if(e==="-"||e==null)return null;let n=this.min(),i=this.max();return n!=null&&e<n?this.min():i!=null&&e>i?i:e}updateInput(e,n,i,r){n=n||"";let a=this.input?.nativeElement.value,s=this.formatValue(e),c=a.length;if(s!==r&&(s=this.concatValues(s,r)),c===0){this.input.nativeElement.value=s,this.input.nativeElement.setSelectionRange(0,0);let f=this.initCursor()+n.length;this.input.nativeElement.setSelectionRange(f,f)}else{let u=this.input.nativeElement.selectionStart,f=this.input.nativeElement.selectionEnd,g=this.maxlength();if(g&&s.length>g&&(s=s.slice(0,g),u=Math.min(u,g),f=Math.min(f,g)),g&&g<s.length)return;this.input.nativeElement.value=s;let x=s.length;if(i==="range-insert"){let I=this.parseValue((a||"").slice(0,u)),N=(I!==null?I.toString():"").split("").join(`(${this.groupChar})?`),j=new RegExp(N,"g");j.test(s);let Z=n.split("").join(`(${this.groupChar})?`),ne=new RegExp(Z,"g");ne.test(s.slice(j.lastIndex)),f=j.lastIndex+ne.lastIndex,this.input.nativeElement.setSelectionRange(f,f)}else if(x===c)i==="insert"||i==="delete-back-single"?this.input.nativeElement.setSelectionRange(f+1,f+1):i==="delete-single"?this.input.nativeElement.setSelectionRange(f-1,f-1):(i==="delete-range"||i==="spin")&&this.input.nativeElement.setSelectionRange(f,f);else if(i==="delete-back-single"){let I=a.charAt(f-1),S=a.charAt(f),N=c-x,j=this._group.test(S);j&&N===1?f+=1:!j&&this.isNumeralChar(I)&&(f+=-1*N+1),this._group.lastIndex=0,this.input.nativeElement.setSelectionRange(f,f)}else if(a==="-"&&i==="insert"){this.input.nativeElement.setSelectionRange(0,0);let S=this.initCursor()+n.length+1;this.input.nativeElement.setSelectionRange(S,S)}else f=f+(x-c),this.input.nativeElement.setSelectionRange(f,f)}this.input.nativeElement.setAttribute("aria-valuenow",e)}concatValues(e,n){if(e&&n){let i=n.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?i!==-1?e.replace(this.suffixChar,"").split(this._decimal)[0]+n.replace(this.suffixChar,"").slice(i)+this.suffixChar:e:i!==-1?e.split(this._decimal)[0]+n.slice(i):e}return e}getDecimalLength(e){if(e){let n=e.split(this._decimal);if(n.length===2)return n[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1;let n=this.validateValue(this.parseValue(this.input.nativeElement.value)),i=n?.toString();this.input.nativeElement.value=this.formatValue(i),this.input.nativeElement.setAttribute("aria-valuenow",i),this.updateModel(e,n),this.onModelTouched(),this.onBlur.emit(e)}formattedValue(){let e=!this.value&&!this.allowEmpty?0:this.value;return this.formatValue(e)}updateModel(e,n){let i=this.ngControl?.control?.updateOn==="blur";this.value!==n?(this.value=n,i&&this.focused||this.onModelChange(n)):i&&this.onModelChange(n)}writeControlValue(e,n){this.value=e&&Number(e),n(e),this.cd.markForCheck()}clearTimer(){this.timer&&clearInterval(this.timer)}get dataP(){return this.cn({invalid:this.invalid(),disabled:this.$disabled(),focus:this.focused,fluid:this.hasFluid,filled:this.$variant()==="filled",empty:!this.$filled(),[this.size()]:this.size(),[this.buttonLayout]:this.showButtons&&this.buttonLayout})}static \u0275fac=function(n){return new(n||t)(bn(mt))};static \u0275cmp=H({type:t,selectors:[["p-inputNumber"],["p-inputnumber"],["p-input-number"]],contentQueries:function(n,i,r){if(n&1&&kt(r,sF,4)(r,lF,4)(r,cF,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.clearIconTemplate=a.first),X(a=Q())&&(i.incrementButtonIconTemplate=a.first),X(a=Q())&&(i.decrementButtonIconTemplate=a.first),X(a=Q())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&kn(dF,5),n&2){let r;X(r=Q())&&(i.input=r.first)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),z(i.cn(i.cx("root"),i.styleClass)))},inputs:{showButtons:[2,"showButtons","showButtons",G],format:[2,"format","format",G],buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",placeholder:"placeholder",tabindex:[2,"tabindex","tabindex",Se],title:"title",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",ariaLabel:"ariaLabel",ariaRequired:[2,"ariaRequired","ariaRequired",G],autocomplete:"autocomplete",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:[2,"readonly","readonly",G],allowEmpty:[2,"allowEmpty","allowEmpty",G],locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:[2,"useGrouping","useGrouping",G],minFractionDigits:[2,"minFractionDigits","minFractionDigits",e=>Se(e,void 0)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>Se(e,void 0)],prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:[2,"showClear","showClear",G],autofocus:[2,"autofocus","autofocus",G]},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[ve([HF,lv,{provide:cv,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],decls:6,vars:38,consts:[["input",""],["pInputText","","role","spinbutton","inputmode","decimal",3,"input","keydown","keypress","paste","click","focus","blur","value","ngStyle","variant","invalid","pSize","pt","unstyled","pAutoFocus","fluid"],[4,"ngIf"],[3,"pBind","class",4,"ngIf"],["type","button","tabindex","-1",3,"pBind","class","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],["data-p-icon","times",3,"pBind","class","click",4,"ngIf"],[3,"pBind","class","click",4,"ngIf"],["data-p-icon","times",3,"click","pBind"],[3,"click","pBind"],[4,"ngTemplateOutlet"],[3,"pBind"],["type","button","tabindex","-1",3,"mousedown","mouseup","mouseleave","keydown","keyup","pBind"],[3,"pBind","ngClass",4,"ngIf"],[3,"pBind","ngClass"],["data-p-icon","angle-up",3,"pBind",4,"ngIf"],["data-p-icon","angle-up",3,"pBind"],["data-p-icon","angle-down",3,"pBind",4,"ngIf"],["data-p-icon","angle-down",3,"pBind"]],template:function(n,i){n&1&&(m(0,"input",1,0),A("input",function(a){return i.onUserInput(a)})("keydown",function(a){return i.onInputKeyDown(a)})("keypress",function(a){return i.onInputKeyPress(a)})("paste",function(a){return i.onPaste(a)})("click",function(){return i.onInputClick()})("focus",function(a){return i.onInputFocus(a)})("blur",function(a){return i.onInputBlur(a)}),_(),k(2,mF,3,2,"ng-container",2)(3,kF,7,20,"span",3)(4,RF,3,8,"button",4)(5,BF,3,8,"button",4)),n&2&&(z(i.cn(i.cx("pcInputText"),i.inputStyleClass)),h("value",i.formattedValue())("ngStyle",i.inputStyle)("variant",i.$variant())("invalid",i.invalid())("pSize",i.size())("pt",i.ptm("pcInputText"))("unstyled",i.unstyled())("pAutoFocus",i.autofocus)("fluid",i.hasFluid),O("id",i.inputId)("aria-valuemin",i.min())("aria-valuemax",i.max())("aria-valuenow",i.value)("placeholder",i.placeholder)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy)("title",i.title)("size",i.inputSize())("name",i.name())("autocomplete",i.autocomplete)("maxlength",i.maxlength())("minlength",i.minlength())("tabindex",i.tabindex)("aria-required",i.ariaRequired)("min",i.min())("max",i.max())("step",i.step()??1)("required",i.required()?"":void 0)("readonly",i.readonly?"":void 0)("disabled",i.$disabled()?"":void 0)("data-p",i.dataP),l(2),h("ngIf",i.buttonLayout!="vertical"&&i.showClear&&i.value),l(),h("ngIf",i.showButtons&&i.buttonLayout==="stacked"),l(),h("ngIf",i.showButtons&&i.buttonLayout!=="stacked"),l(),h("ngIf",i.showButtons&&i.buttonLayout!=="stacked"))},dependencies:[st,sn,Rt,wt,Zn,fo,go,ss,Nb,Rb,Pe,En,fe],encapsulation:2,changeDetection:0})}return t})(),dv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[gs,Pe,Pe]})}return t})();var uv=`
1449
+ .p-paginator {
1450
+ display: flex;
1451
+ align-items: center;
1452
+ justify-content: center;
1453
+ flex-wrap: wrap;
1454
+ background: dt('paginator.background');
1455
+ color: dt('paginator.color');
1456
+ padding: dt('paginator.padding');
1457
+ border-radius: dt('paginator.border.radius');
1458
+ gap: dt('paginator.gap');
1459
+ }
1460
+
1461
+ .p-paginator-content {
1462
+ display: flex;
1463
+ align-items: center;
1464
+ justify-content: center;
1465
+ flex-wrap: wrap;
1466
+ gap: dt('paginator.gap');
1467
+ }
1468
+
1469
+ .p-paginator-content-start {
1470
+ margin-inline-end: auto;
1471
+ }
1472
+
1473
+ .p-paginator-content-end {
1474
+ margin-inline-start: auto;
1475
+ }
1476
+
1477
+ .p-paginator-page,
1478
+ .p-paginator-next,
1479
+ .p-paginator-last,
1480
+ .p-paginator-first,
1481
+ .p-paginator-prev {
1482
+ cursor: pointer;
1483
+ display: inline-flex;
1484
+ align-items: center;
1485
+ justify-content: center;
1486
+ line-height: 1;
1487
+ user-select: none;
1488
+ overflow: hidden;
1489
+ position: relative;
1490
+ background: dt('paginator.nav.button.background');
1491
+ border: 0 none;
1492
+ color: dt('paginator.nav.button.color');
1493
+ min-width: dt('paginator.nav.button.width');
1494
+ height: dt('paginator.nav.button.height');
1495
+ transition:
1496
+ background dt('paginator.transition.duration'),
1497
+ color dt('paginator.transition.duration'),
1498
+ outline-color dt('paginator.transition.duration'),
1499
+ box-shadow dt('paginator.transition.duration');
1500
+ border-radius: dt('paginator.nav.button.border.radius');
1501
+ padding: 0;
1502
+ margin: 0;
1503
+ }
1504
+
1505
+ .p-paginator-page:focus-visible,
1506
+ .p-paginator-next:focus-visible,
1507
+ .p-paginator-last:focus-visible,
1508
+ .p-paginator-first:focus-visible,
1509
+ .p-paginator-prev:focus-visible {
1510
+ box-shadow: dt('paginator.nav.button.focus.ring.shadow');
1511
+ outline: dt('paginator.nav.button.focus.ring.width') dt('paginator.nav.button.focus.ring.style') dt('paginator.nav.button.focus.ring.color');
1512
+ outline-offset: dt('paginator.nav.button.focus.ring.offset');
1513
+ }
1514
+
1515
+ .p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,
1516
+ .p-paginator-first:not(.p-disabled):hover,
1517
+ .p-paginator-prev:not(.p-disabled):hover,
1518
+ .p-paginator-next:not(.p-disabled):hover,
1519
+ .p-paginator-last:not(.p-disabled):hover {
1520
+ background: dt('paginator.nav.button.hover.background');
1521
+ color: dt('paginator.nav.button.hover.color');
1522
+ }
1523
+
1524
+ .p-paginator-page.p-paginator-page-selected {
1525
+ background: dt('paginator.nav.button.selected.background');
1526
+ color: dt('paginator.nav.button.selected.color');
1527
+ }
1528
+
1529
+ .p-paginator-current {
1530
+ color: dt('paginator.current.page.report.color');
1531
+ }
1532
+
1533
+ .p-paginator-pages {
1534
+ display: flex;
1535
+ align-items: center;
1536
+ gap: dt('paginator.gap');
1537
+ }
1538
+
1539
+ .p-paginator-jtp-input .p-inputtext {
1540
+ max-width: dt('paginator.jump.to.page.input.max.width');
1541
+ }
1542
+
1543
+ .p-paginator-first:dir(rtl),
1544
+ .p-paginator-prev:dir(rtl),
1545
+ .p-paginator-next:dir(rtl),
1546
+ .p-paginator-last:dir(rtl) {
1547
+ transform: rotate(180deg);
1548
+ }
1549
+ `;var qF=["dropdownicon"],GF=["firstpagelinkicon"],jF=["previouspagelinkicon"],UF=["lastpagelinkicon"],$F=["nextpagelinkicon"],bs=t=>({$implicit:t}),WF=t=>({pageLink:t});function KF(t,o){t&1&&ye(0)}function YF(t,o){if(t&1&&(m(0,"div",10),k(1,KF,1,0,"ng-container",11),_()),t&2){let e=d();z(e.cx("contentStart")),h("pBind",e.ptm("contentStart")),l(),h("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Fe(5,bs,e.paginatorState))}}function ZF(t,o){if(t&1&&(m(0,"span",10),b(1),_()),t&2){let e=d();z(e.cx("current")),h("pBind",e.ptm("current")),l(),C(e.currentPageReport)}}function XF(t,o){if(t&1&&($(),F(0,"svg",14)),t&2){let e=d(2);z(e.cx("firstIcon")),h("pBind",e.ptm("firstIcon"))}}function QF(t,o){}function JF(t,o){t&1&&k(0,QF,0,0,"ng-template")}function e4(t,o){if(t&1&&(m(0,"span"),k(1,JF,1,0,null,15),_()),t&2){let e=d(2);z(e.cx("firstIcon")),l(),h("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function t4(t,o){if(t&1){let e=W();m(0,"button",12),A("click",function(i){w(e);let r=d();return T(r.changePageToFirst(i))}),k(1,XF,1,3,"svg",13)(2,e4,2,3,"span",4),_()}if(t&2){let e=d();z(e.cx("first")),h("pBind",e.ptm("first")),O("aria-label",e.getAriaLabel("firstPageLabel")),l(),h("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),l(),h("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function n4(t,o){if(t&1&&($(),F(0,"svg",16)),t&2){let e=d();z(e.cx("prevIcon")),h("pBind",e.ptm("prevIcon"))}}function i4(t,o){}function o4(t,o){t&1&&k(0,i4,0,0,"ng-template")}function r4(t,o){if(t&1&&(m(0,"span"),k(1,o4,1,0,null,15),_()),t&2){let e=d();z(e.cx("prevIcon")),l(),h("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function a4(t,o){if(t&1){let e=W();m(0,"button",12),A("click",function(i){let r=w(e).$implicit,a=d(2);return T(a.onPageLinkClick(i,r-1))}),b(1),_()}if(t&2){let e=o.$implicit,n=d(2);z(n.cx("page",Fe(6,WF,e))),h("pBind",n.ptm("page")),O("aria-label",n.getPageAriaLabel(e))("aria-current",e-1==n.getPage()?"page":void 0),l(),ke(" ",n.getLocalization(e)," ")}}function s4(t,o){if(t&1&&(m(0,"span",10),k(1,a4,2,8,"button",17),_()),t&2){let e=d();z(e.cx("pages")),h("pBind",e.ptm("pages")),l(),h("ngForOf",e.pageLinks)}}function l4(t,o){if(t&1&&b(0),t&2){let e=d(2);C(e.currentPageReport)}}function c4(t,o){t&1&&ye(0)}function d4(t,o){if(t&1&&k(0,c4,1,0,"ng-container",11),t&2){let e=o.$implicit,n=d(3);h("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Fe(2,bs,e))}}function u4(t,o){t&1&&(de(0),k(1,d4,1,4,"ng-template",21),ue())}function p4(t,o){t&1&&ye(0)}function h4(t,o){if(t&1&&k(0,p4,1,0,"ng-container",15),t&2){let e=d(3);h("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function f4(t,o){t&1&&k(0,h4,1,1,"ng-template",22)}function m4(t,o){if(t&1){let e=W();m(0,"p-select",18),A("onChange",function(i){w(e);let r=d();return T(r.onPageDropdownChange(i))}),k(1,l4,1,1,"ng-template",19)(2,u4,2,0,"ng-container",20)(3,f4,1,0,null,20),_()}if(t&2){let e=d();h("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),h("ngIf",e.jumpToPageItemTemplate),l(),h("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function _4(t,o){if(t&1&&($(),F(0,"svg",23)),t&2){let e=d();z(e.cx("nextIcon")),h("pBind",e.ptm("nextIcon"))}}function g4(t,o){}function b4(t,o){t&1&&k(0,g4,0,0,"ng-template")}function v4(t,o){if(t&1&&(m(0,"span"),k(1,b4,1,0,null,15),_()),t&2){let e=d();z(e.cx("nextIcon")),l(),h("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function y4(t,o){if(t&1&&($(),F(0,"svg",25)),t&2){let e=d(2);z(e.cx("lastIcon")),h("pBind",e.ptm("lastIcon"))}}function C4(t,o){}function x4(t,o){t&1&&k(0,C4,0,0,"ng-template")}function w4(t,o){if(t&1&&(m(0,"span"),k(1,x4,1,0,null,15),_()),t&2){let e=d(2);z(e.cx("lastIcon")),l(),h("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function T4(t,o){if(t&1){let e=W();m(0,"button",2),A("click",function(i){w(e);let r=d();return T(r.changePageToLast(i))}),k(1,y4,1,3,"svg",24)(2,w4,2,3,"span",4),_()}if(t&2){let e=d();z(e.cx("last")),h("pBind",e.ptm("last"))("disabled",e.isLastPage()||e.empty()),O("aria-label",e.getAriaLabel("lastPageLabel")),l(),h("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),l(),h("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function S4(t,o){if(t&1){let e=W();m(0,"p-inputnumber",26),A("ngModelChange",function(i){w(e);let r=d();return T(r.changePage(i-1))}),_()}if(t&2){let e=d();z(e.cx("pcJumpToPageInput")),h("pt",e.ptm("pcJumpToPageInput"))("ngModel",e.currentPage())("disabled",e.empty())("unstyled",e.unstyled())}}function k4(t,o){t&1&&ye(0)}function I4(t,o){if(t&1&&k(0,k4,1,0,"ng-container",11),t&2){let e=o.$implicit,n=d(3);h("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Fe(2,bs,e))}}function E4(t,o){t&1&&(de(0),k(1,I4,1,4,"ng-template",21),ue())}function M4(t,o){t&1&&ye(0)}function D4(t,o){if(t&1&&k(0,M4,1,0,"ng-container",15),t&2){let e=d(3);h("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function P4(t,o){t&1&&k(0,D4,1,1,"ng-template",22)}function R4(t,o){if(t&1){let e=W();m(0,"p-select",27),Mf("ngModelChange",function(i){w(e);let r=d();return Ef(r.rows,i)||(r.rows=i),T(i)}),A("onChange",function(i){w(e);let r=d();return T(r.onRppChange(i))}),k(1,E4,2,0,"ng-container",20)(2,P4,1,0,null,20),_()}if(t&2){let e=d();h("options",e.rowsPerPageItems),If("ngModel",e.rows),h("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(),h("ngIf",e.dropdownItemTemplate),l(),h("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function O4(t,o){t&1&&ye(0)}function F4(t,o){if(t&1&&(m(0,"div",10),k(1,O4,1,0,"ng-container",11),_()),t&2){let e=d();z(e.cx("contentEnd")),h("pBind",e.ptm("contentEnd")),l(),h("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Fe(5,bs,e.paginatorState))}}var N4={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:o})=>["p-paginator-page",{"p-paginator-page-selected":o-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},pv=(()=>{class t extends bt{name="paginator";style=uv;classes=N4;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var hv=new he("PAGINATOR_INSTANCE"),$f=(()=>{class t extends Xt{componentName="Paginator";bindDirectiveInstance=p(fe,{self:!0});$pcPaginator=p(hv,{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=B(void 0);onPageChange=new ie;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=p(pv);$appendTo=E(()=>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(),i=new Map(n.map((r,a)=>[a,r]));return e>9?String(e).split("").map(a=>i.get(Number(a))).join(""):i.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),i=Math.max(0,Math.ceil(this.getPage()-n/2)),r=Math.min(e-1,i+n-1);var a=this.pageLinkSize-(r-i+1);return i=Math.max(0,i-a),[i,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),n=e[0],i=e[1];for(let r=n;r<=i;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 i={page:e,first:this.first,rows:this.rows,pageCount:n};this.updatePageLinks(),this.onPageChange.emit(i),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=H({type:t,selectors:[["p-paginator"]],contentQueries:function(n,i,r){if(n&1&&kt(r,qF,4)(r,GF,4)(r,jF,4)(r,UF,4)(r,$F,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.dropdownIconTemplate=a.first),X(a=Q())&&(i.firstPageLinkIconTemplate=a.first),X(a=Q())&&(i.previousPageLinkIconTemplate=a.first),X(a=Q())&&(i.lastPageLinkIconTemplate=a.first),X(a=Q())&&(i.nextPageLinkIconTemplate=a.first),X(a=Q())&&(i.templates=a)}},hostVars:4,hostBindings:function(n,i){n&2&&(z(i.cn(i.cx("paginator"),i.styleClass)),He("display",i.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",Se],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",G],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",G],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",G],totalRecords:[2,"totalRecords","totalRecords",Se],rows:[2,"rows","rows",Se],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",G],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",G],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",G],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[ve([pv,{provide:hv,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],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,i){n&1&&(k(0,YF,2,7,"div",0)(1,ZF,2,4,"span",0)(2,t4,3,6,"button",1),m(3,"button",2),A("click",function(a){return i.changePageToPrev(a)}),k(4,n4,1,3,"svg",3)(5,r4,2,3,"span",4),_(),k(6,s4,2,4,"span",0)(7,m4,4,11,"p-select",5),m(8,"button",2),A("click",function(a){return i.changePageToNext(a)}),k(9,_4,1,3,"svg",6)(10,v4,2,3,"span",4),_(),k(11,T4,3,7,"button",7)(12,S4,1,6,"p-inputnumber",8)(13,R4,3,11,"p-select",9)(14,F4,2,7,"div",0)),n&2&&(h("ngIf",i.templateLeft),l(),h("ngIf",i.showCurrentPageReport),l(),h("ngIf",i.showFirstLastIcon),l(),z(i.cx("prev")),h("pBind",i.ptm("prev"))("disabled",i.isFirstPage()||i.empty()),O("aria-label",i.getAriaLabel("prevPageLabel")),l(),h("ngIf",!i.previousPageLinkIconTemplate&&!i._previousPageLinkIconTemplate),l(),h("ngIf",i.previousPageLinkIconTemplate||i._previousPageLinkIconTemplate),l(),h("ngIf",i.showPageLinks),l(),h("ngIf",i.showJumpToPageDropdown),l(),z(i.cx("next")),h("pBind",i.ptm("next"))("disabled",i.isLastPage()||i.empty()),O("aria-label",i.getAriaLabel("nextPageLabel")),l(),h("ngIf",!i.nextPageLinkIconTemplate&&!i._nextPageLinkIconTemplate),l(),h("ngIf",i.nextPageLinkIconTemplate||i._nextPageLinkIconTemplate),l(),h("ngIf",i.showFirstLastIcon),l(),h("ngIf",i.showJumpToPageInput),l(),h("ngIf",i.rowsPerPageOptions),l(),h("ngIf",i.templateRight))},dependencies:[st,co,Rt,wt,db,gs,Vt,ln,cn,ls,Db,Pb,Ob,Fb,Pe,ct,fe],encapsulation:2,changeDetection:0})}return t})(),fv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[$f,Pe,Pe]})}return t})();var mv=`
1550
+ .p-radiobutton {
1551
+ position: relative;
1552
+ display: inline-flex;
1553
+ user-select: none;
1554
+ vertical-align: bottom;
1555
+ width: dt('radiobutton.width');
1556
+ height: dt('radiobutton.height');
1557
+ }
1558
+
1559
+ .p-radiobutton-input {
1560
+ cursor: pointer;
1561
+ appearance: none;
1562
+ position: absolute;
1563
+ top: 0;
1564
+ inset-inline-start: 0;
1565
+ width: 100%;
1566
+ height: 100%;
1567
+ padding: 0;
1568
+ margin: 0;
1569
+ opacity: 0;
1570
+ z-index: 1;
1571
+ outline: 0 none;
1572
+ border: 1px solid transparent;
1573
+ border-radius: 50%;
1574
+ }
1575
+
1576
+ .p-radiobutton-box {
1577
+ display: flex;
1578
+ justify-content: center;
1579
+ align-items: center;
1580
+ border-radius: 50%;
1581
+ border: 1px solid dt('radiobutton.border.color');
1582
+ background: dt('radiobutton.background');
1583
+ width: dt('radiobutton.width');
1584
+ height: dt('radiobutton.height');
1585
+ transition:
1586
+ background dt('radiobutton.transition.duration'),
1587
+ color dt('radiobutton.transition.duration'),
1588
+ border-color dt('radiobutton.transition.duration'),
1589
+ box-shadow dt('radiobutton.transition.duration'),
1590
+ outline-color dt('radiobutton.transition.duration');
1591
+ outline-color: transparent;
1592
+ box-shadow: dt('radiobutton.shadow');
1593
+ }
1594
+
1595
+ .p-radiobutton-icon {
1596
+ transition-duration: dt('radiobutton.transition.duration');
1597
+ background: transparent;
1598
+ font-size: dt('radiobutton.icon.size');
1599
+ width: dt('radiobutton.icon.size');
1600
+ height: dt('radiobutton.icon.size');
1601
+ border-radius: 50%;
1602
+ backface-visibility: hidden;
1603
+ transform: translateZ(0) scale(0.1);
1604
+ }
1605
+
1606
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1607
+ border-color: dt('radiobutton.hover.border.color');
1608
+ }
1609
+
1610
+ .p-radiobutton-checked .p-radiobutton-box {
1611
+ border-color: dt('radiobutton.checked.border.color');
1612
+ background: dt('radiobutton.checked.background');
1613
+ }
1614
+
1615
+ .p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1616
+ background: dt('radiobutton.icon.checked.color');
1617
+ transform: translateZ(0) scale(1, 1);
1618
+ visibility: visible;
1619
+ }
1620
+
1621
+ .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1622
+ border-color: dt('radiobutton.checked.hover.border.color');
1623
+ background: dt('radiobutton.checked.hover.background');
1624
+ }
1625
+
1626
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1627
+ background: dt('radiobutton.icon.checked.hover.color');
1628
+ }
1629
+
1630
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1631
+ border-color: dt('radiobutton.focus.border.color');
1632
+ box-shadow: dt('radiobutton.focus.ring.shadow');
1633
+ outline: dt('radiobutton.focus.ring.width') dt('radiobutton.focus.ring.style') dt('radiobutton.focus.ring.color');
1634
+ outline-offset: dt('radiobutton.focus.ring.offset');
1635
+ }
1636
+
1637
+ .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1638
+ border-color: dt('radiobutton.checked.focus.border.color');
1639
+ }
1640
+
1641
+ .p-radiobutton.p-invalid > .p-radiobutton-box {
1642
+ border-color: dt('radiobutton.invalid.border.color');
1643
+ }
1644
+
1645
+ .p-radiobutton.p-variant-filled .p-radiobutton-box {
1646
+ background: dt('radiobutton.filled.background');
1647
+ }
1648
+
1649
+ .p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {
1650
+ background: dt('radiobutton.checked.background');
1651
+ }
1652
+
1653
+ .p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {
1654
+ background: dt('radiobutton.checked.hover.background');
1655
+ }
1656
+
1657
+ .p-radiobutton.p-disabled {
1658
+ opacity: 1;
1659
+ }
1660
+
1661
+ .p-radiobutton.p-disabled .p-radiobutton-box {
1662
+ background: dt('radiobutton.disabled.background');
1663
+ border-color: dt('radiobutton.checked.disabled.border.color');
1664
+ }
1665
+
1666
+ .p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {
1667
+ background: dt('radiobutton.icon.disabled.color');
1668
+ }
1669
+
1670
+ .p-radiobutton-sm,
1671
+ .p-radiobutton-sm .p-radiobutton-box {
1672
+ width: dt('radiobutton.sm.width');
1673
+ height: dt('radiobutton.sm.height');
1674
+ }
1675
+
1676
+ .p-radiobutton-sm .p-radiobutton-icon {
1677
+ font-size: dt('radiobutton.icon.sm.size');
1678
+ width: dt('radiobutton.icon.sm.size');
1679
+ height: dt('radiobutton.icon.sm.size');
1680
+ }
1681
+
1682
+ .p-radiobutton-lg,
1683
+ .p-radiobutton-lg .p-radiobutton-box {
1684
+ width: dt('radiobutton.lg.width');
1685
+ height: dt('radiobutton.lg.height');
1686
+ }
1687
+
1688
+ .p-radiobutton-lg .p-radiobutton-icon {
1689
+ font-size: dt('radiobutton.icon.lg.size');
1690
+ width: dt('radiobutton.icon.lg.size');
1691
+ height: dt('radiobutton.icon.lg.size');
1692
+ }
1693
+ `;var L4=["input"],B4=`
1694
+ ${mv}
1695
+
1696
+ /* For PrimeNG */
1697
+ p-radioButton.ng-invalid.ng-dirty .p-radiobutton-box,
1698
+ p-radio-button.ng-invalid.ng-dirty .p-radiobutton-box,
1699
+ p-radiobutton.ng-invalid.ng-dirty .p-radiobutton-box {
1700
+ border-color: dt('radiobutton.invalid.border.color');
1701
+ }
1702
+ `,V4={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"},_v=(()=>{class t extends bt{name="radiobutton";style=B4;classes=V4;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var gv=new he("RADIOBUTTON_INSTANCE"),z4={provide:Xn,useExisting:Sn(()=>bv),multi:!0},H4=(()=>{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})(),bv=(()=>{class t extends cs{componentName="RadioButton";$pcRadioButton=p(gv,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(fe,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=B();size=B();onClick=new ie;onFocus=new ie;onBlur=new ie;inputViewChild;$variant=E(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=p(_v);injector=p(mt);registry=p(H4);onInit(){this.control=this.injector.get(ho),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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,i){if(n&1&&kn(L4,5),n&2){let r;X(r=Q())&&(i.inputViewChild=r.first)}},hostVars:5,hostBindings:function(n,i){n&2&&(O("data-p-disabled",i.$disabled())("data-p-checked",i.checked)("data-p",i.dataP),z(i.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",Se],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",G],binary:[2,"binary","binary",G],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[ve([z4,_v,{provide:gv,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],decls:4,vars:20,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus","pBind"],[3,"pBind"]],template:function(n,i){n&1&&(m(0,"input",1,0),A("focus",function(a){return i.onInputFocus(a)})("blur",function(a){return i.onInputBlur(a)})("change",function(a){return i.onChange(a)}),_(),m(2,"div",2),F(3,"div",2),_()),n&2&&(z(i.cx("input")),h("checked",i.checked)("pAutoFocus",i.autofocus)("pBind",i.ptm("input")),O("id",i.inputId)("name",i.name())("required",i.required()?"":void 0)("disabled",i.$disabled()?"":void 0)("value",i.modelValue())("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel)("aria-checked",i.checked)("tabindex",i.tabindex),l(2),z(i.cx("box")),h("pBind",i.ptm("box")),l(),z(i.cx("icon")),h("pBind",i.ptm("icon")))},dependencies:[st,go,Pe,En,fe],encapsulation:2,changeDetection:0})}return t})(),vv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[bv,Pe,Pe]})}return t})();var q4=["header"],G4=["headergrouped"],j4=["body"],U4=["loadingbody"],$4=["caption"],W4=["footer"],K4=["footergrouped"],Y4=["summary"],Z4=["colgroup"],X4=["expandedrow"],Q4=["groupheader"],J4=["groupfooter"],eN=["frozenexpandedrow"],tN=["frozenheader"],nN=["frozenbody"],iN=["frozenfooter"],oN=["frozencolgroup"],rN=["emptymessage"],aN=["paginatorleft"],sN=["paginatorright"],lN=["paginatordropdownitem"],cN=["loadingicon"],dN=["reorderindicatorupicon"],uN=["reorderindicatordownicon"],pN=["sorticon"],hN=["checkboxicon"],fN=["headercheckboxicon"],mN=["paginatordropdownicon"],_N=["paginatorfirstpagelinkicon"],gN=["paginatorlastpagelinkicon"],bN=["paginatorpreviouspagelinkicon"],vN=["paginatornextpagelinkicon"],yN=["resizeHelper"],CN=["reorderIndicatorUp"],xN=["reorderIndicatorDown"],wN=["wrapper"],TN=["table"],SN=["thead"],kN=["tfoot"],IN=["scroller"],EN=t=>({height:t}),yv=(t,o)=>({$implicit:t,options:o}),MN=t=>({columns:t}),Wf=t=>({$implicit:t});function DN(t,o){if(t&1&&F(0,"i",17),t&2){let e=d(2);z(e.cn(e.cx("loadingIcon"),e.loadingIcon)),h("pBind",e.ptm("loadingIcon"))}}function PN(t,o){if(t&1&&($(),F(0,"svg",19)),t&2){let e=d(3);z(e.cx("loadingIcon")),h("spin",!0)("pBind",e.ptm("loadingIcon"))}}function RN(t,o){}function ON(t,o){t&1&&k(0,RN,0,0,"ng-template")}function FN(t,o){if(t&1&&(m(0,"span",17),k(1,ON,1,0,null,20),_()),t&2){let e=d(3);z(e.cx("loadingIcon")),h("pBind",e.ptm("loadingIcon")),l(),h("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function NN(t,o){if(t&1&&(de(0),k(1,PN,1,4,"svg",18)(2,FN,2,4,"span",10),ue()),t&2){let e=d(2);l(),h("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),l(),h("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function AN(t,o){if(t&1&&(m(0,"div",17),P0("p-overlay-mask-leave-active"),D0("p-overlay-mask-enter-active"),k(1,DN,1,3,"i",10)(2,NN,3,2,"ng-container",14),_()),t&2){let e=d();z(e.cx("mask")),h("pBind",e.ptm("mask")),l(),h("ngIf",e.loadingIcon),l(),h("ngIf",!e.loadingIcon)}}function LN(t,o){t&1&&ye(0)}function BN(t,o){if(t&1&&(m(0,"div",17),k(1,LN,1,0,"ng-container",20),_()),t&2){let e=d();z(e.cx("header")),h("pBind",e.ptm("header")),l(),h("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function VN(t,o){t&1&&ye(0)}function zN(t,o){if(t&1&&k(0,VN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function HN(t,o){t&1&&k(0,zN,1,1,"ng-template",22)}function qN(t,o){t&1&&ye(0)}function GN(t,o){if(t&1&&k(0,qN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function jN(t,o){t&1&&k(0,GN,1,1,"ng-template",23)}function UN(t,o){t&1&&ye(0)}function $N(t,o){if(t&1&&k(0,UN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function WN(t,o){t&1&&k(0,$N,1,1,"ng-template",24)}function KN(t,o){t&1&&ye(0)}function YN(t,o){if(t&1&&k(0,KN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function ZN(t,o){t&1&&k(0,YN,1,1,"ng-template",25)}function XN(t,o){t&1&&ye(0)}function QN(t,o){if(t&1&&k(0,XN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function JN(t,o){t&1&&k(0,QN,1,1,"ng-template",26)}function e5(t,o){if(t&1){let e=W();m(0,"p-paginator",21),A("onPageChange",function(i){w(e);let r=d();return T(r.onPageChange(i))}),k(1,HN,1,0,null,14)(2,jN,1,0,null,14)(3,WN,1,0,null,14)(4,ZN,1,0,null,14)(5,JN,1,0,null,14),_()}if(t&2){let e=d();h("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(),h("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),h("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),h("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),h("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),h("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function t5(t,o){t&1&&ye(0)}function n5(t,o){if(t&1&&k(0,t5,1,0,"ng-container",28),t&2){let e=o.$implicit,n=o.options;d(2);let i=Lt(8);h("ngTemplateOutlet",i)("ngTemplateOutletContext",Yn(2,yv,e,n))}}function i5(t,o){if(t&1){let e=W();m(0,"p-scroller",27,2),A("onLazyLoad",function(i){w(e);let r=d();return T(r.onLazyItemLoad(i))}),k(2,n5,1,5,"ng-template",null,3,We),_()}if(t&2){let e=d();Pt(Fe(16,EN,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),h("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 o5(t,o){t&1&&ye(0)}function r5(t,o){if(t&1&&(de(0),k(1,o5,1,0,"ng-container",28),ue()),t&2){let e=d(),n=Lt(8);l(),h("ngTemplateOutlet",n)("ngTemplateOutletContext",Yn(4,yv,e.processedData,Fe(2,MN,e.columns)))}}function a5(t,o){t&1&&ye(0)}function s5(t,o){t&1&&ye(0)}function l5(t,o){if(t&1&&F(0,"tbody",35),t&2){let e=d().options,n=d();z(n.cx("tbody")),h("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 c5(t,o){if(t&1&&F(0,"tbody",36),t&2){let e=d().options,n=d();Pt("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),z(n.cx("virtualScrollerSpacer")),h("pBind",n.ptm("virtualScrollerSpacer"))}}function d5(t,o){t&1&&ye(0)}function u5(t,o){if(t&1&&(m(0,"tfoot",37,6),k(2,d5,1,0,"ng-container",28),_()),t&2){let e=d().options,n=d();h("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot"))("pBind",n.ptm("tfoot")),l(2),h("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Fe(5,Wf,e.columns))}}function p5(t,o){if(t&1&&(m(0,"table",29,4),k(2,a5,1,0,"ng-container",28),m(3,"thead",30,5),k(5,s5,1,0,"ng-container",28),_(),k(6,l5,1,10,"tbody",31),F(7,"tbody",32),k(8,c5,1,5,"tbody",33)(9,u5,3,7,"tfoot",34),_()),t&2){let e=o.options,n=d();Pt(n.tableStyle),z(n.cn(n.cx("table"),n.tableStyleClass)),h("pBind",n.ptm("table")),O("id",n.id+"-table"),l(2),h("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Fe(28,Wf,e.columns)),l(),z(n.cx("thead")),h("ngStyle",n.sx("thead"))("pBind",n.ptm("thead")),l(2),h("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Fe(30,Wf,e.columns)),l(),h("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),l(),Pt(e.contentStyle),z(n.cx("tbody",e.contentStyleClass)),h("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(),h("ngIf",e.spacerStyle),l(),h("ngIf",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)}}function h5(t,o){t&1&&ye(0)}function f5(t,o){if(t&1&&k(0,h5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function m5(t,o){t&1&&k(0,f5,1,1,"ng-template",22)}function _5(t,o){t&1&&ye(0)}function g5(t,o){if(t&1&&k(0,_5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function b5(t,o){t&1&&k(0,g5,1,1,"ng-template",23)}function v5(t,o){t&1&&ye(0)}function y5(t,o){if(t&1&&k(0,v5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function C5(t,o){t&1&&k(0,y5,1,1,"ng-template",24)}function x5(t,o){t&1&&ye(0)}function w5(t,o){if(t&1&&k(0,x5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function T5(t,o){t&1&&k(0,w5,1,1,"ng-template",25)}function S5(t,o){t&1&&ye(0)}function k5(t,o){if(t&1&&k(0,S5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function I5(t,o){t&1&&k(0,k5,1,1,"ng-template",26)}function E5(t,o){if(t&1){let e=W();m(0,"p-paginator",21),A("onPageChange",function(i){w(e);let r=d();return T(r.onPageChange(i))}),k(1,m5,1,0,null,14)(2,b5,1,0,null,14)(3,C5,1,0,null,14)(4,T5,1,0,null,14)(5,I5,1,0,null,14),_()}if(t&2){let e=d();h("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(),h("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),h("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),h("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),h("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),h("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function M5(t,o){t&1&&ye(0)}function D5(t,o){if(t&1&&(m(0,"div",38),k(1,M5,1,0,"ng-container",20),_()),t&2){let e=d();h("ngClass",e.cx("footer"))("pBind",e.ptm("footer")),l(),h("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function P5(t,o){if(t&1&&F(0,"div",38,7),t&2){let e=d();He("display","none"),h("ngClass",e.cx("columnResizeIndicator"))("pBind",e.ptm("columnResizeIndicator"))}}function R5(t,o){if(t&1&&($(),F(0,"svg",40)),t&2){let e=d(2);h("pBind",e.ptm("rowReorderIndicatorUp").icon)}}function O5(t,o){}function F5(t,o){t&1&&k(0,O5,0,0,"ng-template")}function N5(t,o){if(t&1&&(m(0,"span",38,8),k(2,R5,1,1,"svg",39)(3,F5,1,0,null,20),_()),t&2){let e=d();He("display","none"),h("ngClass",e.cx("rowReorderIndicatorUp"))("pBind",e.ptm("rowReorderIndicatorUp")),l(2),h("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),l(),h("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function A5(t,o){if(t&1&&($(),F(0,"svg",42)),t&2){let e=d(2);h("pBind",e.ptm("rowReorderIndicatorDown").icon)}}function L5(t,o){}function B5(t,o){t&1&&k(0,L5,0,0,"ng-template")}function V5(t,o){if(t&1&&(m(0,"span",38,9),k(2,A5,1,1,"svg",41)(3,B5,1,0,null,20),_()),t&2){let e=d();He("display","none"),h("ngClass",e.cx("rowReorderIndicatorDown"))("pBind",e.ptm("rowReorderIndicatorDown")),l(2),h("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),l(),h("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var z5=["pTableBody",""],Zf=(t,o,e,n,i)=>({$implicit:t,rowIndex:o,columns:e,editing:n,frozen:i}),H5=(t,o,e,n,i,r,a)=>({$implicit:t,rowIndex:o,columns:e,editing:n,frozen:i,rowgroup:r,rowspan:a}),vs=(t,o,e,n,i,r)=>({$implicit:t,rowIndex:o,columns:e,expanded:n,editing:i,frozen:r}),Cv=(t,o,e,n)=>({$implicit:t,rowIndex:o,columns:e,frozen:n}),xv=(t,o)=>({$implicit:t,frozen:o});function q5(t,o){t&1&&ye(0)}function G5(t,o){if(t&1&&(de(0,3),k(1,q5,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",Xa(2,Zf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function j5(t,o){t&1&&ye(0)}function U5(t,o){if(t&1&&(de(0),k(1,j5,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Xa(2,Zf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function $5(t,o){t&1&&ye(0)}function W5(t,o){if(t&1&&(de(0),k(1,$5,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",F0(2,H5,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen,r.shouldRenderRowspan(r.value,n,i),r.calculateRowGroupSize(r.value,n,i)))}}function K5(t,o){t&1&&ye(0)}function Y5(t,o){if(t&1&&(de(0,3),k(1,K5,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",Xa(2,Zf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function Z5(t,o){if(t&1&&k(0,G5,2,8,"ng-container",2)(1,U5,2,8,"ng-container",0)(2,W5,2,10,"ng-container",0)(3,Y5,2,8,"ng-container",2),t&2){let e=o.$implicit,n=o.index,i=d(2);h("ngIf",(i.dataTable.groupHeaderTemplate||i.dataTable._groupHeaderTemplate)&&!i.dataTable.virtualScroll&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupHeader(i.value,e,i.getRowIndex(n))),l(),h("ngIf",i.dataTable.rowGroupMode!=="rowspan"),l(),h("ngIf",i.dataTable.rowGroupMode==="rowspan"),l(),h("ngIf",(i.dataTable.groupFooterTemplate||i.dataTable._groupFooterTemplate)&&!i.dataTable.virtualScroll&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupFooter(i.value,e,i.getRowIndex(n)))}}function X5(t,o){if(t&1&&(de(0),k(1,Z5,4,4,"ng-template",1),ue()),t&2){let e=d();l(),h("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function Q5(t,o){t&1&&ye(0)}function J5(t,o){if(t&1&&(de(0),k(1,Q5,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.template)("ngTemplateOutletContext",dr(2,vs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function e6(t,o){t&1&&ye(0)}function t6(t,o){if(t&1&&(de(0,3),k(1,e6,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",dr(2,vs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function n6(t,o){t&1&&ye(0)}function i6(t,o){t&1&&ye(0)}function o6(t,o){if(t&1&&(de(0,3),k(1,i6,1,0,"ng-container",4),ue()),t&2){let e=d(2),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",dr(2,vs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function r6(t,o){if(t&1&&(de(0),k(1,n6,1,0,"ng-container",4)(2,o6,2,9,"ng-container",2),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.expandedRowTemplate||r.dataTable._expandedRowTemplate)("ngTemplateOutletContext",Df(3,Cv,n,r.getRowIndex(i),r.columns,r.frozen)),l(),h("ngIf",(r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)&&r.dataTable.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,n,r.getRowIndex(i)))}}function a6(t,o){if(t&1&&k(0,J5,2,9,"ng-container",0)(1,t6,2,9,"ng-container",2)(2,r6,3,8,"ng-container",0),t&2){let e=o.$implicit,n=o.index,i=d(2);h("ngIf",!(i.dataTable.groupHeaderTemplate&&i.dataTable._groupHeaderTemplate)),l(),h("ngIf",(i.dataTable.groupHeaderTemplate||i.dataTable._groupHeaderTemplate)&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupHeader(i.value,e,i.getRowIndex(n))),l(),h("ngIf",i.dataTable.isRowExpanded(e))}}function s6(t,o){if(t&1&&(de(0),k(1,a6,3,3,"ng-template",1),ue()),t&2){let e=d();l(),h("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function l6(t,o){t&1&&ye(0)}function c6(t,o){t&1&&ye(0)}function d6(t,o){if(t&1&&(de(0),k(1,c6,1,0,"ng-container",4),ue()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.frozenExpandedRowTemplate||r.dataTable._frozenExpandedRowTemplate)("ngTemplateOutletContext",Df(2,Cv,n,r.getRowIndex(i),r.columns,r.frozen))}}function u6(t,o){if(t&1&&k(0,l6,1,0,"ng-container",4)(1,d6,2,7,"ng-container",0),t&2){let e=o.$implicit,n=o.index,i=d(2);h("ngTemplateOutlet",i.template)("ngTemplateOutletContext",dr(3,vs,e,i.getRowIndex(n),i.columns,i.dataTable.isRowExpanded(e),i.dataTable.editMode==="row"&&i.dataTable.isRowEditing(e),i.frozen)),l(),h("ngIf",i.dataTable.isRowExpanded(e))}}function p6(t,o){if(t&1&&(de(0),k(1,u6,2,10,"ng-template",1),ue()),t&2){let e=d();l(),h("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function h6(t,o){t&1&&ye(0)}function f6(t,o){if(t&1&&(de(0),k(1,h6,1,0,"ng-container",4),ue()),t&2){let e=d();l(),h("ngTemplateOutlet",e.dataTable.loadingBodyTemplate||e.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Yn(2,xv,e.columns,e.frozen))}}function m6(t,o){t&1&&ye(0)}function _6(t,o){if(t&1&&(de(0),k(1,m6,1,0,"ng-container",4),ue()),t&2){let e=d();l(),h("ngTemplateOutlet",e.dataTable.emptyMessageTemplate||e.dataTable._emptyMessageTemplate)("ngTemplateOutletContext",Yn(2,xv,e.columns,e.frozen))}}var g6=`
1703
+ ${Mb}
1704
+
1705
+ /* For PrimeNG */
1706
+ .p-datatable-scrollable-table > .p-datatable-thead {
1707
+ top: 0;
1708
+ z-index: 2;
1709
+ }
1710
+
1711
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody {
1712
+ position: sticky;
1713
+ z-index: 2;
1714
+ }
1715
+
1716
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody + .p-datatable-frozen-tbody {
1717
+ z-index: 1;
1718
+ }
1719
+
1720
+ .p-datatable-mask.p-overlay-mask {
1721
+ position: absolute;
1722
+ display: flex;
1723
+ align-items: center;
1724
+ justify-content: center;
1725
+ z-index: 3;
1726
+ }
1727
+
1728
+ .p-datatable-filter-overlay {
1729
+ position: absolute;
1730
+ background: dt('datatable.filter.overlay.select.background');
1731
+ color: dt('datatable.filter.overlay.select.color');
1732
+ border: 1px solid dt('datatable.filter.overlay.select.border.color');
1733
+ border-radius: dt('datatable.filter.overlay.select.border.radius');
1734
+ box-shadow: dt('datatable.filter.overlay.select.shadow');
1735
+ min-width: 12.5rem;
1736
+ }
1737
+
1738
+ .p-datatable-filter-rule {
1739
+ border-bottom: 1px solid dt('datatable.filter.rule.border.color');
1740
+ }
1741
+
1742
+ .p-datatable-filter-rule:last-child {
1743
+ border-bottom: 0 none;
1744
+ }
1745
+
1746
+ .p-datatable-filter-add-rule-button,
1747
+ .p-datatable-filter-remove-rule-button {
1748
+ width: 100%;
1749
+ }
1750
+
1751
+ .p-datatable-filter-remove-button {
1752
+ width: 100%;
1753
+ }
1754
+
1755
+ .p-datatable-thead > tr > th {
1756
+ padding: dt('datatable.header.cell.padding');
1757
+ background: dt('datatable.header.cell.background');
1758
+ border-color: dt('datatable.header.cell.border.color');
1759
+ border-style: solid;
1760
+ border-width: 0 0 1px 0;
1761
+ color: dt('datatable.header.cell.color');
1762
+ font-weight: dt('datatable.column.title.font.weight');
1763
+ text-align: start;
1764
+ transition:
1765
+ background dt('datatable.transition.duration'),
1766
+ color dt('datatable.transition.duration'),
1767
+ border-color dt('datatable.transition.duration'),
1768
+ outline-color dt('datatable.transition.duration'),
1769
+ box-shadow dt('datatable.transition.duration');
1770
+ }
1771
+
1772
+ .p-datatable-thead > tr > th p-columnfilter {
1773
+ font-weight: normal;
1774
+ }
1775
+
1776
+ .p-datatable-thead > tr > th,
1777
+ .p-datatable-sort-icon,
1778
+ .p-datatable-sort-badge {
1779
+ vertical-align: middle;
1780
+ }
1781
+
1782
+ .p-datatable-thead > tr > th.p-datatable-column-sorted {
1783
+ background: dt('datatable.header.cell.selected.background');
1784
+ color: dt('datatable.header.cell.selected.color');
1785
+ }
1786
+
1787
+ .p-datatable-thead > tr > th.p-datatable-column-sorted .p-datatable-sort-icon {
1788
+ color: dt('datatable.header.cell.selected.color');
1789
+ }
1790
+
1791
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd) {
1792
+ background: dt('datatable.row.striped.background');
1793
+ }
1794
+
1795
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd).p-datatable-row-selected {
1796
+ background: dt('datatable.row.selected.background');
1797
+ color: dt('datatable.row.selected.color');
1798
+ }
1799
+
1800
+ p-sortIcon, p-sort-icon, p-sorticon {
1801
+ display: inline-flex;
1802
+ align-items: center;
1803
+ gap: dt('datatable.header.cell.gap');
1804
+ }
1805
+
1806
+ .p-datatable .p-editable-column.p-cell-editing {
1807
+ padding: 0;
1808
+ }
1809
+
1810
+ .p-datatable .p-editable-column.p-cell-editing p-celleditor {
1811
+ display: block;
1812
+ width: 100%;
1813
+ }
1814
+ `,b6={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})},v6={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"},rowGroupHeader:({instance:t})=>({top:t.getFrozenRowGroupHeaderStickyPosition})},Kf=(()=>{class t extends bt{name="datatable";style=g6;classes=b6;inlineStyles=v6;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var y6=new he("TABLE_INSTANCE"),Yf=(()=>{class t{sortSource=new ro;selectionSource=new ro;contextMenuSource=new ro;valueSource=new ro;columnsSource=new ro;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})(),Xf=(()=>{class t extends Xt{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 ie;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 ie;selectionChange=new ie;onRowSelect=new ie;onRowUnselect=new ie;onPage=new ie;onSort=new ie;onFilter=new ie;onLazyLoad=new ie;onRowExpand=new ie;onRowCollapse=new ie;onContextMenuSelect=new ie;onColResize=new ie;onColReorder=new ie;onRowReorder=new ie;onEditInit=new ie;onEditComplete=new ie;onEditCancel=new ie;onHeaderCheckboxToggle=new ie;sortFunction=new ie;firstChange=new ie;rowsChange=new ie;onStateSave=new ie;onStateRestore=new ie;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=J0();styleElement;responsiveStyleElement;overlayService=p(po);filterService=p(j0);tableService=p(Yf);zone=p(on);_componentStyle=p(Kf);bindDirectiveInstance=p(fe,{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(){Zt(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&&Zt(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 i=this.lazy?0:this.first;return n.slice(i,i+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(Ee.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Ee.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 i=n.metaKey||n.ctrlKey,r=this.getSortMeta(e.field);r?i?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())):((!i||!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=Ee.resolveFieldData(r,e),c=Ee.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 i={field:e,order:n};this.onSort.emit(i),this.tableService.onSort(i)}}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,i,r){let a=Ee.resolveFieldData(e,i[r].field),s=Ee.resolveFieldData(n,i[r].field);return Ee.compare(a,s,this.filterLocale)===0?i.length-1>r?this.multisortField(e,n,i,r+1):0:this.compareValuesOnSort(a,s,i[r].order)}compareValuesOnSort(e,n,i){return Ee.sort(e,n,i,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 i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field==e){n=!0;break}}return n}}handleRowClick(e){let n=e.originalEvent.target,i=n.nodeName,r=n.parentElement&&n.parentElement.nodeName;if(!(i=="INPUT"||i=="BUTTON"||i=="A"||r=="INPUT"||r=="BUTTON"||r=="A"||B0(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)Ie.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,f=this.dataKey?String(Ee.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 x=this.findIndexInSelection(a);this._selection=this.selection.filter((I,S)=>S!=x),this.selectionChange.emit(this.selection),f&&delete this.selectionKeys[f]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),f&&(this.selectionKeys={},this.selectionKeys[f]=1)):this.isMultipleSelectionMode()&&(g?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),f&&(this.selectionKeys[f]=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}),f&&(this.selectionKeys={},this.selectionKeys[f]=1));else if(this.selectionMode==="multiple")if(c){let g=this.findIndexInSelection(a);this._selection=this.selection.filter((x,I)=>I!=g),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&delete this.selectionKeys[f]}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}),f&&(this.selectionKeys[f]=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,i=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(Ee.resolveFieldData(n,this.dataKey)):null;if(!a){if(!this.isRowSelectable(n,i))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,i){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)&&!i){if(!this.isRowSelectable(u,n))continue;s.push(u),this._selection=[...this.selection,u];let f=this.dataKey?String(Ee.resolveFieldData(u,this.dataKey)):null;f&&(this.selectionKeys[f]=1)}}this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e,data:s,type:"row"})}clearSelectionRange(e){let n,i,r=this.rangeRowIndex,a=this.anchorRowIndex;r>a?(n=this.anchorRowIndex,i=this.rangeRowIndex):r<a?(n=this.rangeRowIndex,i=this.anchorRowIndex):(n=this.rangeRowIndex,i=this.rangeRowIndex);for(let s=n;s<=i;s++){let c=this.value[s],u=this.findIndexInSelection(c);this._selection=this.selection.filter((g,x)=>x!=u);let f=this.dataKey?String(Ee.resolveFieldData(c,this.dataKey)):null;f&&delete this.selectionKeys[f],this.onRowUnselect.emit({originalEvent:e,data:c,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[Ee.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 i=0;i<this.selection.length;i++)if(this.equals(e,this.selection[i])){n=i;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(Ee.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 i=this.isSelected(n),r=this.dataKey?String(Ee.resolveFieldData(n,this.dataKey)):null;if(this.preventSelectionSetterPropagation=!0,i){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 i=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,r=this.selectionPageOnly&&this._selection?this._selection.filter(a=>!i.some(s=>this.equals(a,s))):[];n&&(r=this.frozenValue?[...r,...this.frozenValue,...i]:[...r,...i],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:Ee.equals(e,n,this.dataKey)}filter(e,n,i){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:i},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 i=!0,r=!1,a=!1;for(let c in this.filters)if(this.filters.hasOwnProperty(c)&&c!=="global"){a=!0;let u=c,f=this.filters[u];if(Array.isArray(f)){for(let g of f)if(i=this.executeLocalFilter(u,this.value[n],g),g.operator===Nf.OR&&i||g.operator===Nf.AND&&!i)break}else i=this.executeLocalFilter(u,this.value[n],f);if(!i)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](Ee.resolveFieldData(this.value[n],u),this.filters.global.value,this.filterLocale),r)break}let s;this.filters.global?s=a?a&&i&&r:r:s=a&&i,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,i){let r=i.value,a=i.matchMode||G0.STARTS_WITH,s=Ee.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,i="",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(f=>f.exportable!==!1&&f.field);i+=a.map(f=>'"'+this.getExportHeader(f)+'"').join(this.csvSeparator);let s=n.map(f=>a.map(g=>{let x=Ee.resolveFieldData(f,g.field);return x!=null?this.exportFunction?x=this.exportFunction({data:x,field:g.field}):x=String(x).replace(/"/g,'""'):x="",'"'+x+'"'}).join(this.csvSeparator)).join(`
1815
+ `);s.length&&(i+=`
1816
+ `+s);let c=new Blob([new Uint8Array([239,187,191]),i],{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()):(i="data:text/csv;charset=utf-8,"+i,this.document.defaultView?.open(encodeURI(i))),this.renderer.removeChild(this.document.body,u)}onLazyItemLoad(e){this.onLazyLoad.emit(Wt(be(be({},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,i,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=i,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&Ie.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()&&Ie.removeClass(this.editingCell,"p-cell-editing"),fr(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(Ee.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(Ie.find(n,".ng-invalid.ng-dirty").length===0){let i=String(Ee.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}}cancelRowEdit(e){let n=String(Ee.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 i=this.groupRowsBy?String(Ee.resolveFieldData(e,this.groupRowsBy)):String(Ee.resolveFieldData(e,this.dataKey));this.expandedRowKeys[i]!=null?(delete this.expandedRowKeys[i],this.onRowCollapse.emit({originalEvent:n,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[i]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(Ee.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(Ee.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(Ee.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let n=Ie.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=Ie.getOffset(this.el?.nativeElement).left;!this.$unstyled()&&Ie.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,i=e?-n:n,a=this.resizeColumnElement.offsetWidth+i,s=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),c=s?parseFloat(s):15;if(a>=c){if(this.columnResizeMode==="fit"){let f=this.resizeColumnElement.nextElementSibling.offsetWidth-i;a>15&&f>15&&this.resizeTableCells(a,f)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let u=this.tableViewChild?.nativeElement.offsetWidth+i;this.setResizeTableWidth(u+"px"),this.resizeTableCells(a,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:i}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",Ie.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],n=Ie.findSingle(this.el.nativeElement,'[data-pc-section="thead"]');return Ie.find(n,"tr > th").forEach(r=>e.push(Ie.getOuterWidth(r))),e}onColumnDragStart(e,n){this.reorderIconWidth=Ie.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=Ie.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let i=Ie.getOffset(this.el?.nativeElement),r=Ie.getOffset(n);if(this.draggedColumn!=n){let a=Ie.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),s=Ie.indexWithinGroup(n,"preorderablecolumn"),c=r.left-i.left,u=i.top-r.top,f=r.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-i.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-i.top+n.offsetHeight+"px",e.pageX>f?(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 i=Ie.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=Ie.indexWithinGroup(n,"preorderablecolumn"),a=i!=r;if(a&&(r-i==1&&this.dropPosition===-1||i-r==1&&this.dropPosition===1)&&(a=!1),a&&r<i&&this.dropPosition===1&&(r=r+1),a&&r>i&&this.dropPosition===-1&&(r=r-1),a&&(Ee.reorderArray(this.columns,i,r),this.onColReorder.emit({dragIndex:i,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();Ee.reorderArray(s,i+1,r+1),this.updateStyleElement(s,i,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 i=Ie.index(this.resizeColumnElement),r=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(r,i,e,n)}updateStyleElement(e,n,i,r){this.destroyStyleElement(),this.createStyleElement();let a="";e.forEach((s,c)=>{let u=c===n?i:r&&c===n+1?r:s,f=`width: ${u}px !important; max-width: ${u}px !important;`;a+=`
1817
+ #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${c+1}),
1818
+ #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${c+1}),
1819
+ #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${c+1}) {
1820
+ ${f}
1821
+ }
1822
+ `}),this.renderer.setProperty(this.styleElement,"innerHTML",a)}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,i){if(this.rowDragging&&this.draggedRowIndex!==n){let r=Ie.getOffset(i).top,a=e.pageY,s=r+Ie.getOuterHeight(i)/2,c=i.previousElementSibling;a<s?(Ie.removeClass(i,"p-datatable-dragpoint-bottom"),this.droppedRowIndex=n,c&&!this.$unstyled()?Ie.addClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&Ie.addClass(i,"p-datatable-dragpoint-top")):(c&&!this.$unstyled()?Ie.removeClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&Ie.addClass(i,"p-datatable-dragpoint-top"),this.droppedRowIndex=n+1,!this.$unstyled()&&Ie.addClass(i,"p-datatable-dragpoint-bottom"))}}onRowDragLeave(e,n){let i=n.previousElementSibling;i&&!this.$unstyled()&&Ie.removeClass(i,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&Ie.removeClass(n,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&Ie.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 i=this.draggedRowIndex>this.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;Ee.reorderArray(this.value,this.draggedRowIndex,i),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:i})}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(Zt(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),i=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,r=function(a,s){return typeof s=="string"&&i.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=[],i=[],r=this.el?.nativeElement;r&&(i=Ie.find(r,'[data-pc-section="thead"] > tr > th')),i.forEach(a=>n.push(Ie.getOuterWidth(a))),e.columnWidths=n.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=Ie.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"),Ee.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((i,r)=>{let a=`width: ${i}px !important; max-width: ${i}px !important`;n+=`
1823
+ #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${r+1}),
1824
+ #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${r+1}),
1825
+ #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${r+1}) {
1826
+ ${a}
1827
+ }
1828
+ `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(i=>{n.push(i.field||i.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",Ie.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),Ie.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(Zt(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",Ie.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.responsiveStyleElement);let e=`
1829
+ @media screen and (max-width: ${this.breakpoint}) {
1830
+ #${this.id}-table > .p-datatable-thead > tr > th,
1831
+ #${this.id}-table > .p-datatable-tfoot > tr > td {
1832
+ display: none !important;
1833
+ }
1834
+
1835
+ #${this.id}-table > .p-datatable-tbody > tr > td {
1836
+ display: flex;
1837
+ width: 100% !important;
1838
+ align-items: center;
1839
+ justify-content: space-between;
1840
+ }
1841
+
1842
+ #${this.id}-table > .p-datatable-tbody > tr > td:not(:last-child) {
1843
+ border: 0 none;
1844
+ }
1845
+
1846
+ #${this.id}.p-datatable-gridlines > .p-datatable-table-container > .p-datatable-table > .p-datatable-tbody > tr > td:last-child {
1847
+ border-top: 0;
1848
+ border-right: 0;
1849
+ border-left: 0;
1850
+ }
1851
+
1852
+ #${this.id}-table > .p-datatable-tbody > tr > td > .p-datatable-column-title {
1853
+ display: block;
1854
+ }
1855
+ }
1856
+ `;this.renderer.setProperty(this.responsiveStyleElement,"innerHTML",e),Ie.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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-table"]],contentQueries:function(n,i,r){if(n&1&&kt(r,q4,4)(r,G4,4)(r,j4,4)(r,U4,4)(r,$4,4)(r,W4,4)(r,K4,4)(r,Y4,4)(r,Z4,4)(r,X4,4)(r,Q4,4)(r,J4,4)(r,eN,4)(r,tN,4)(r,nN,4)(r,iN,4)(r,oN,4)(r,rN,4)(r,aN,4)(r,sN,4)(r,lN,4)(r,cN,4)(r,dN,4)(r,uN,4)(r,pN,4)(r,hN,4)(r,fN,4)(r,mN,4)(r,_N,4)(r,gN,4)(r,bN,4)(r,vN,4)(r,ct,4),n&2){let a;X(a=Q())&&(i._headerTemplate=a.first),X(a=Q())&&(i._headerGroupedTemplate=a.first),X(a=Q())&&(i._bodyTemplate=a.first),X(a=Q())&&(i._loadingBodyTemplate=a.first),X(a=Q())&&(i._captionTemplate=a.first),X(a=Q())&&(i._footerTemplate=a.first),X(a=Q())&&(i._footerGroupedTemplate=a.first),X(a=Q())&&(i._summaryTemplate=a.first),X(a=Q())&&(i._colGroupTemplate=a.first),X(a=Q())&&(i._expandedRowTemplate=a.first),X(a=Q())&&(i._groupHeaderTemplate=a.first),X(a=Q())&&(i._groupFooterTemplate=a.first),X(a=Q())&&(i._frozenExpandedRowTemplate=a.first),X(a=Q())&&(i._frozenHeaderTemplate=a.first),X(a=Q())&&(i._frozenBodyTemplate=a.first),X(a=Q())&&(i._frozenFooterTemplate=a.first),X(a=Q())&&(i._frozenColGroupTemplate=a.first),X(a=Q())&&(i._emptyMessageTemplate=a.first),X(a=Q())&&(i._paginatorLeftTemplate=a.first),X(a=Q())&&(i._paginatorRightTemplate=a.first),X(a=Q())&&(i._paginatorDropdownItemTemplate=a.first),X(a=Q())&&(i._loadingIconTemplate=a.first),X(a=Q())&&(i._reorderIndicatorUpIconTemplate=a.first),X(a=Q())&&(i._reorderIndicatorDownIconTemplate=a.first),X(a=Q())&&(i._sortIconTemplate=a.first),X(a=Q())&&(i._checkboxIconTemplate=a.first),X(a=Q())&&(i._headerCheckboxIconTemplate=a.first),X(a=Q())&&(i._paginatorDropdownIconTemplate=a.first),X(a=Q())&&(i._paginatorFirstPageLinkIconTemplate=a.first),X(a=Q())&&(i._paginatorLastPageLinkIconTemplate=a.first),X(a=Q())&&(i._paginatorPreviousPageLinkIconTemplate=a.first),X(a=Q())&&(i._paginatorNextPageLinkIconTemplate=a.first),X(a=Q())&&(i._templates=a)}},viewQuery:function(n,i){if(n&1&&kn(yN,5)(CN,5)(xN,5)(wN,5)(TN,5)(SN,5)(kN,5)(IN,5),n&2){let r;X(r=Q())&&(i.resizeHelperViewChild=r.first),X(r=Q())&&(i.reorderIndicatorUpViewChild=r.first),X(r=Q())&&(i.reorderIndicatorDownViewChild=r.first),X(r=Q())&&(i.wrapperViewChild=r.first),X(r=Q())&&(i.tableViewChild=r.first),X(r=Q())&&(i.tableHeaderViewChild=r.first),X(r=Q())&&(i.tableFooterViewChild=r.first),X(r=Q())&&(i.scroller=r.first)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),z(i.cn(i.cx("root"),i.styleClass)))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",G],pageLinks:[2,"pageLinks","pageLinks",Se],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",G],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",G],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",G],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",G],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",G],showPageLinks:[2,"showPageLinks","showPageLinks",G],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",Se],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",G],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",G],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",G],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",G],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",G],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",Se],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",G],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",G],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Se],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",Se],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",G],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",G],loading:[2,"loading","loading",G],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",G],rowHover:[2,"rowHover","rowHover",G],customSort:[2,"customSort","customSort",G],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",G],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",G],stripedRows:[2,"stripedRows","stripedRows",G],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",Se],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:[ve([Yf,Kf,{provide:y6,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],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,i){n&1&&(k(0,AN,3,5,"div",10)(1,BN,2,4,"div",10)(2,e5,6,26,"p-paginator",11),m(3,"div",12,0),k(5,i5,4,18,"p-scroller",13)(6,r5,2,7,"ng-container",14)(7,p5,10,32,"ng-template",null,1,We),_(),k(9,E5,6,26,"p-paginator",11)(10,D5,2,3,"div",15)(11,P5,2,4,"div",16)(12,N5,4,6,"span",16)(13,V5,4,6,"span",16)),n&2&&(h("ngIf",i.loading&&i.showLoader),l(),h("ngIf",i.captionTemplate||i._captionTemplate),l(),h("ngIf",i.paginator&&(i.paginatorPosition==="top"||i.paginatorPosition=="both")),l(),z(i.cx("tableContainer")),h("ngStyle",i.sx("tableContainer"))("pBind",i.ptm("tableContainer")),O("data-p",i.dataP),l(2),h("ngIf",i.virtualScroll),l(),h("ngIf",!i.virtualScroll),l(3),h("ngIf",i.paginator&&(i.paginatorPosition==="bottom"||i.paginatorPosition=="both")),l(),h("ngIf",i.summaryTemplate||i._summaryTemplate),l(),h("ngIf",i.resizableColumns),l(),h("ngIf",i.reorderableColumns),l(),h("ngIf",i.reorderableColumns))},dependencies:()=>[sn,Rt,wt,Zn,$f,ct,cb,qf,Gf,Lf,fe,C6],encapsulation:2})}return t})(),C6=(()=>{class t extends Xt{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,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[i-(this.dataTable?._first||0)-1];if(a){let s=Ee.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowGroupFooter(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[i-(this.dataTable?._first||0)+1];if(a){let s=Ee.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowspan(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy),a=e[i-1];if(a){let s=Ee.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}calculateRowGroupSize(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy),a=r,s=0;for(;r===a;){s++;let c=e[++i];if(c)a=Ee.resolveFieldData(c,this.dataTable?.groupRowsBy||"");else break}return s===1?null:s}onDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=Ie.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=Ie.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,i=this.getScrollerOption("getItemOptions");return i?i(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)(bn(Xf),bn(Yf))};static \u0275cmp=H({type:t,selectors:[["","pTableBody",""]],hostVars:1,hostBindings:function(n,i){n&2&&O("data-p",i.dataP)},inputs:{columns:[0,"pTableBody","columns"],template:[0,"pTableBodyTemplate","template"],value:"value",frozen:[2,"frozen","frozen",G],frozenRows:[2,"frozenRows","frozenRows",G],scrollerOptions:"scrollerOptions"},standalone:!1,features:[Y],attrs:z5,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,i){n&1&&k(0,X5,2,2,"ng-container",0)(1,s6,2,2,"ng-container",0)(2,p6,2,2,"ng-container",0)(3,f6,2,5,"ng-container",0)(4,_6,2,5,"ng-container",0),n&2&&(h("ngIf",!i.dataTable.expandedRowTemplate&&!i.dataTable._expandedRowTemplate),l(),h("ngIf",(i.dataTable.expandedRowTemplate||i.dataTable._expandedRowTemplate)&&!(i.frozen&&(i.dataTable.frozenExpandedRowTemplate||i.dataTable._frozenExpandedRowTemplate))),l(),h("ngIf",(i.dataTable.frozenExpandedRowTemplate||i.dataTable._frozenExpandedRowTemplate)&&i.frozen),l(),h("ngIf",i.dataTable.loading),l(),h("ngIf",i.dataTable.isEmpty()&&!i.dataTable.loading))},dependencies:[co,Rt,wt],encapsulation:2})}return t})();var wv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({providers:[Kf],imports:[st,fv,ns,ub,Vt,zt,pb,rv,dv,ob,Jb,Bf,qf,Gf,Lf,jb,$b,Ub,zb,av,Hb,Gb,Kb,vv,En,bo,Pe,Bf]})}return t})();var Tv=`
1857
+ .p-progressspinner {
1858
+ position: relative;
1859
+ margin: 0 auto;
1860
+ width: 100px;
1861
+ height: 100px;
1862
+ display: inline-block;
1863
+ }
1864
+
1865
+ .p-progressspinner::before {
1866
+ content: '';
1867
+ display: block;
1868
+ padding-top: 100%;
1869
+ }
1870
+
1871
+ .p-progressspinner-spin {
1872
+ height: 100%;
1873
+ transform-origin: center center;
1874
+ width: 100%;
1875
+ position: absolute;
1876
+ top: 0;
1877
+ bottom: 0;
1878
+ left: 0;
1879
+ right: 0;
1880
+ margin: auto;
1881
+ animation: p-progressspinner-rotate 2s linear infinite;
1882
+ }
1883
+
1884
+ .p-progressspinner-circle {
1885
+ stroke-dasharray: 89, 200;
1886
+ stroke-dashoffset: 0;
1887
+ stroke: dt('progressspinner.colorOne');
1888
+ animation:
1889
+ p-progressspinner-dash 1.5s ease-in-out infinite,
1890
+ p-progressspinner-color 6s ease-in-out infinite;
1891
+ stroke-linecap: round;
1892
+ }
1893
+
1894
+ @keyframes p-progressspinner-rotate {
1895
+ 100% {
1896
+ transform: rotate(360deg);
1897
+ }
1898
+ }
1899
+ @keyframes p-progressspinner-dash {
1900
+ 0% {
1901
+ stroke-dasharray: 1, 200;
1902
+ stroke-dashoffset: 0;
1903
+ }
1904
+ 50% {
1905
+ stroke-dasharray: 89, 200;
1906
+ stroke-dashoffset: -35px;
1907
+ }
1908
+ 100% {
1909
+ stroke-dasharray: 89, 200;
1910
+ stroke-dashoffset: -124px;
1911
+ }
1912
+ }
1913
+ @keyframes p-progressspinner-color {
1914
+ 100%,
1915
+ 0% {
1916
+ stroke: dt('progressspinner.color.one');
1917
+ }
1918
+ 40% {
1919
+ stroke: dt('progressspinner.color.two');
1920
+ }
1921
+ 66% {
1922
+ stroke: dt('progressspinner.color.three');
1923
+ }
1924
+ 80%,
1925
+ 90% {
1926
+ stroke: dt('progressspinner.color.four');
1927
+ }
1928
+ }
1929
+ `;var w6={root:()=>["p-progressspinner"],spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},Sv=(()=>{class t extends bt{name="progressspinner";style=Tv;classes=w6;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var kv=new he("PROGRESSSPINNER_INSTANCE"),Qf=(()=>{class t extends Xt{componentName="ProgressSpinner";$pcProgressSpinner=p(kv,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(fe,{self:!0});styleClass;strokeWidth="2";fill="none";animationDuration="2s";ariaLabel;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}_componentStyle=p(Sv);static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-progressSpinner"],["p-progress-spinner"],["p-progressspinner"]],hostVars:5,hostBindings:function(n,i){n&2&&(O("aria-label",i.ariaLabel)("role","progressbar")("aria-busy",!0),z(i.cn(i.cx("root"),i.styleClass)))},inputs:{styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration",ariaLabel:"ariaLabel"},features:[ve([Sv,{provide:kv,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],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,i){n&1&&($(),m(0,"svg",0),F(1,"circle",1),_()),n&2&&(z(i.cx("spin")),He("animation-duration",i.animationDuration),h("pBind",i.ptm("spin")),l(),z(i.cx("circle")),h("pBind",i.ptm("circle")),O("fill",i.fill)("stroke-width",i.strokeWidth))},dependencies:[st,Pe,fe],encapsulation:2,changeDetection:0})}return t})(),Iv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[Qf,Pe,Pe]})}return t})();var Oi={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,o)=>`${o?"Collapse":"Expand"} folder ${t}`,leafAriaLabel:t=>`Inspect ${t}`,mapVisibilityTooltip:"Toggle visibility on the map",mapVisibilityAriaLabel:t=>`Toggle ${t} visibility on the map`,isolateChainTooltip:"Isolate this chain on the map",isolateChainAriaLabel:t=>`Isolate the chain of ${t} on the map`,columns:{tree:"Folder / Node",kind:"Kind",linksIn:"in",linksOut:"out",tokens:"Tokens",issues:"Issues"},linksInHeaderTooltip:"Incoming references: how many other nodes link to this one.",linksOutHeaderTooltip:"Outgoing references: how many nodes this one links to.",sortAriaLabel:t=>`Sort by ${t}`,sortTreeAriaLabel:"Show folder tree",tokensTooltip:t=>`${t.toLocaleString()} tokens`,folderCount:t=>`${t}`,missing:"\xB7"};var Co=(()=>{class t{loader=p(Ht);bySeverity=E(()=>{let e=this.loader.scan(),n=new Set,i=new Set;if(!e)return{errors:n,warns:i};for(let r of e.issues){let a=r.severity==="error"?n:r.severity==="warn"?i:null;if(a)for(let s of r.nodeIds)a.add(s)}return{errors:n,warns:i}});static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Jf="sm.map.visible-paths";function Ev(){let t=null;try{t=localStorage.getItem(Jf)}catch{return new Set}if(!t)return new Set;let o;try{o=JSON.parse(t)}catch{return new Set}if(!Array.isArray(o))return new Set;let e=new Set;for(let n of o)typeof n=="string"&&n.length>0&&e.add(n);return e}function Mv(t){try{if(t.size===0){localStorage.removeItem(Jf);return}localStorage.setItem(Jf,JSON.stringify([...t]))}catch{}}var ni=(()=>{class t{_paths=te(Ev());paths=this._paths.asReadonly();isActive=E(()=>this._paths().size>0);count=E(()=>this._paths().size);inScope(e){let n=this._paths();return n.size===0||n.has(e)}constructor(){_e(()=>Mv(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 i=new Set(this._paths()),r=this.folderState(n)!=="all";for(let a of n)r?i.add(a):i.delete(a);this._paths.set(i)}folderState(e){let n=this._paths(),i=0,r=0;for(let a of e)i++,n.has(a)&&r++;return i===0||r===0?"none":r===i?"all":"some"}setOnly(e){this._paths.set(new Set(e))}clear(){this._paths().size!==0&&this._paths.set(new Set)}prune(e){let n=this._paths();if(n.size===0)return;let i=!1,r=new Set;for(let a of n)e.has(a)?r.add(a):i=!0;i&&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 em="sm.folders.collapsed";function Dv(){let t=null;try{t=localStorage.getItem(em)}catch{return new Set}if(!t)return new Set;let o;try{o=JSON.parse(t)}catch{return new Set}if(!Array.isArray(o))return new Set;let e=new Set;for(let n of o)typeof n=="string"&&n.length>0&&e.add(n);return e}function Pv(t){try{if(t.size===0){localStorage.removeItem(em);return}localStorage.setItem(em,JSON.stringify([...t]))}catch{}}var Rv={stable:"success",experimental:"info",deprecated:"warn"},Ov={invokes:"warn",references:"info",mentions:"secondary",supersedes:"success"};function tm(t){return t>=.75?"high":t>=.45?"medium":"low"}function Fv(t){let o=tm(t);return o==="high"?"success":o==="medium"?"info":"warn"}var Hn={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 Bv(t){let o={path:"",name:"",subfolders:new Map,leaves:[]};for(let e of t){let n=e.path.split("/");if(n.pop()===void 0)continue;let r=o,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 o}function Vv(t){let o=new Map,e=n=>{let i=n.leaves.length;for(let a of n.subfolders.values())i+=e(a).nodes;let r={nodes:i};return o.set(n.path,r),r};return e(t),o}function zv(t,o){if(o===""||o===t.path)return t;let e=t;for(let n of o.split("/"))if(n&&(e=e.subfolders.get(n),!e))return null;return e??null}function Hv(t){let o=[],e=n=>{for(let i of n.leaves)o.push(i.path);for(let i of n.subfolders.values())e(i)};return e(t),o}function ys(t,o,e,n=""){let i=P6(t),r=os(t);return{type:"leaf",path:t.path,name:D6(t),prefix:n,depth:o,linksIn:t.linksInCount!==void 0?String(t.linksInCount):Oi.missing,linksOut:t.linksOutCount!==void 0?String(t.linksOutCount):Oi.missing,tokens:t.tokensTotal!==void 0?gr(t.tokensTotal):Oi.missing,linksInRaw:t.linksInCount,linksOutRaw:t.linksOutCount,tokensRaw:t.tokensTotal,errors:e.errorCounts.get(t.path)??0,warns:e.warnCounts.get(t.path)??0,isStale:r,staleTooltip:r?as(t,Hn.sidecar):"",stability:i,stabilitySeverity:Rv[i]}}function S6(t,o,e,n){let i=[],r=(c,u)=>{let f=[c.name],g=c;for(;g.subfolders.size===1&&g.leaves.length===0;){let[Z]=g.subfolders.values();f.push(Z.name),g=Z}let x=f.join("/");if(g.subfolders.size===0&&g.leaves.length===1){i.push(ys(g.leaves[0],u,n,`${x}/`));return}let I=!o.has(g.path),S=e.get(g.path)??{nodes:0};if(i.push({type:"folder",path:g.path,name:x,depth:u,expanded:I,nodeCount:S.nodes}),!I)return;let N=Array.from(g.subfolders.values()).sort(Av);for(let Z of N)r(Z,u+1);let j=[...g.leaves].sort(Lv);for(let Z of j)i.push(ys(Z,u+1,n))},a=Array.from(t.subfolders.values()).sort(Av);for(let c of a)r(c,0);let s=[...t.leaves].sort(Lv);for(let c of s)i.push(ys(c,0,n));return i}function k6(t,o,e){let n=t.map(i=>ys(i,0,e,M6(i.path)));return o.column==="tree"||n.sort(E6(o.column,o.dir)),n}function qv(t){return t.sort.column==="tree"?S6(t.tree,t.collapsed,t.aggregates,t.maps):k6(t.leaves,t.sort,t.maps)}function I6(t){return t.errors*1e6+t.warns*1e3+(t.isStale?1:0)}function E6(t,o){let e=o==="asc"?1:-1;return(n,i)=>{let r=Nv(n,t),a=Nv(i,t);return r===void 0&&a===void 0?n.path.localeCompare(i.path):r===void 0?1:a===void 0?-1:r!==a?(r-a)*e:n.path.localeCompare(i.path)}}function Nv(t,o){switch(o){case"linksIn":return t.linksInRaw;case"linksOut":return t.linksOutRaw;case"tokens":return t.tokensRaw;case"issues":return I6(t)}}function M6(t){let o=t.lastIndexOf("/");return o===-1?"":t.slice(0,o)}function D6(t){let o=t.frontmatter.name?.trim();return o||us(t.path)||Oi.missing}function P6(t){return mo(t)??"stable"}function Av(t,o){return t.name.localeCompare(o.name)}function Lv(t,o){return t.path.localeCompare(o.path)}function nm(t,o){let e=new Map;if(!t)return e;for(let n of t)if(n.severity===o)for(let i of n.nodeIds)e.set(i,(e.get(i)??0)+1);return e}var im="sm.files.sort",R6=["tree","linksIn","linksOut","tokens","issues"],O6=["asc","desc"],Fi={column:"tree",dir:"asc"};function F6(t){return t==="tree"?"asc":"desc"}function Gv(t,o){return o==="tree"?Fi:t.column===o?{column:o,dir:t.dir==="asc"?"desc":"asc"}:{column:o,dir:F6(o)}}function N6(t){return typeof t=="string"&&R6.includes(t)}function A6(t){return typeof t=="string"&&O6.includes(t)}function L6(t){if(typeof t!="object"||t===null)return!1;let o=t;return N6(o.column)&&A6(o.dir)}function jv(){let t=null;try{t=localStorage.getItem(im)}catch{return Fi}if(!t)return Fi;let o;try{o=JSON.parse(t)}catch{return Fi}return L6(o)?{column:o.column,dir:o.dir}:Fi}function Uv(t){try{if(t.column===Fi.column&&t.dir===Fi.dir){localStorage.removeItem(im);return}localStorage.setItem(im,JSON.stringify({column:t.column,dir:t.dir}))}catch{}}var B6=()=>({width:"1.75rem",height:"1.75rem"});function V6(t,o){if(t&1&&F(0,"p-message",1),t&2){let e=d();h("text",e.error())}}function z6(t,o){if(t&1&&(m(0,"div",2),F(1,"p-progressSpinner",3),m(2,"span",4),b(3),_()()),t&2){let e=d();l(),Pt(rn(3,B6)),l(2),C(e.texts.loading)}}function H6(t,o){if(t&1){let e=W();F(0,"i",7),m(1,"p",8),b(2),_(),m(3,"p-button",9),A("onClick",function(){w(e);let i=d(3);return T(i.resetFilters())}),_()}if(t&2){let e=d(3);l(2),C(e.texts.emptyFiltered),l(),h("label",e.texts.resetFilters)("text",!0)}}function q6(t,o){if(t&1&&(F(0,"i",10),m(1,"p",11),b(2),_(),m(3,"p",12),b(4),_()),t&2){let e=d(3);l(2),C(e.texts.emptyAll),l(2),C(e.texts.emptyAllHint)}}function G6(t,o){if(t&1&&(m(0,"div",5),M(1,H6,4,3)(2,q6,5,2),_()),t&2){let e=d(2);l(),D(e.filtersActive()?1:2)}}function j6(t,o){if(t&1){let e=W();m(0,"span",20)(1,"button",27),A("click",function(){w(e);let i=d(4);return T(i.expandAll())}),F(2,"i",28),_(),m(3,"button",29),A("click",function(){w(e);let i=d(4);return T(i.collapseAll())}),F(4,"i",30),_(),F(5,"span",31),m(6,"button",32),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(0))}),b(7,"0"),_(),m(8,"button",33),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(1))}),b(9,"1"),_(),m(10,"button",34),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(2))}),b(11,"2"),_()()}if(t&2){let e=d(4);l(),h("pTooltip",e.texts.expandAll),O("aria-label",e.texts.expandAll),l(2),h("pTooltip",e.texts.collapseAll),O("aria-label",e.texts.collapseAll),l(3),ce("is-active",e.activeDepthLevel()===0),h("pTooltip",e.texts.depthLevel0),O("aria-label",e.texts.depthLevel0)("aria-pressed",e.activeDepthLevel()===0),l(2),ce("is-active",e.activeDepthLevel()===1),h("pTooltip",e.texts.depthLevel1),O("aria-label",e.texts.depthLevel1)("aria-pressed",e.activeDepthLevel()===1),l(2),ce("is-active",e.activeDepthLevel()===2),h("pTooltip",e.texts.depthLevel2),O("aria-label",e.texts.depthLevel2)("aria-pressed",e.activeDepthLevel()===2)}}function U6(t,o){if(t&1){let e=W();m(0,"tr")(1,"th",16)(2,"div",17)(3,"button",18),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("tree"))}),b(4),F(5,"i",19),_(),M(6,j6,12,19,"span",20),_()(),m(7,"th",21)(8,"button",22),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("linksIn"))}),b(9),F(10,"i",19),_()(),m(11,"th",23)(12,"button",22),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("linksOut"))}),b(13),F(14,"i",19),_()(),m(15,"th",24)(16,"button",25),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("tokens"))}),b(17),F(18,"i",19),_()(),m(19,"th",26)(20,"button",18),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("issues"))}),b(21),F(22,"i",19),_()()()}if(t&2){let e=d(3);l(),O("aria-sort",e.ariaSortFor("tree")),l(2),ce("files__sort-btn--active",e.sortState().column==="tree"),O("aria-label",e.texts.sortTreeAriaLabel),l(),ke(" ",e.texts.columns.tree," "),l(),ce("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(),D(e.isFlat()?-1:6),l(),O("aria-sort",e.ariaSortFor("linksIn")),l(),ce("files__sort-btn--active",e.sortState().column==="linksIn"),h("pTooltip",e.texts.linksInHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksIn)),l(),ke(" ",e.texts.columns.linksIn," "),l(),ce("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(),ce("files__sort-btn--active",e.sortState().column==="linksOut"),h("pTooltip",e.texts.linksOutHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksOut)),l(),ke(" ",e.texts.columns.linksOut," "),l(),ce("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(),ce("files__sort-btn--active",e.sortState().column==="tokens"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.tokens)),l(),ke(" ",e.texts.columns.tokens," "),l(),ce("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(),ce("files__sort-btn--active",e.sortState().column==="issues"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.issues)),l(),ke(" ",e.texts.columns.issues," "),l(),ce("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")}}function $6(t,o){if(t&1){let e=W();m(0,"tr",37),A("click",function(){w(e);let i=d().$implicit,r=d(3);return T(r.toggleFolder(i))})("keydown.enter",function(){w(e);let i=d().$implicit,r=d(3);return T(r.toggleFolder(i))})("keydown.space",function(i){w(e);let r=d().$implicit,a=d(3);return i.preventDefault(),T(a.toggleFolder(r))}),m(1,"td",38)(2,"span",39),F(3,"span",40),m(4,"button",41),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleFolderVisibility(r,i))}),F(5,"i",42),_(),F(6,"i",43)(7,"i",44),m(8,"span",45),b(9),_(),m(10,"span",46),b(11),_()()(),F(12,"td")(13,"td")(14,"td")(15,"td"),_()}if(t&2){let e=d().$implicit,n=d(3);He("--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),h("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(),ce("pi-check",n.folderStateMap().get(e.path)==="all")("pi-minus",n.folderStateMap().get(e.path)==="some"),l(),ce("pi-chevron-right",!e.expanded)("pi-chevron-down",e.expanded),l(),ce("pi-folder",!e.expanded)("pi-folder-open",e.expanded),l(2),C(e.name),l(),O("aria-label",e.nodeCount+" nodes"),l(),C(n.texts.folderCount(e.nodeCount))}}function W6(t,o){if(t&1&&(m(0,"span",62),b(1),_()),t&2){let e=d(3).$implicit;l(),C(e.prefix)}}function K6(t,o){if(t&1&&(m(0,"span",50)(1,"span",61),b(2),_(),M(3,W6,2,1,"span",62),_()),t&2){let e=d(2).$implicit;h("pTooltip",e.path),l(2),C(e.name),l(),D(e.prefix?3:-1)}}function Y6(t,o){if(t&1&&(m(0,"span",63),b(1),_()),t&2){let e=d(3).$implicit;l(),C(e.prefix)}}function Z6(t,o){if(t&1&&(m(0,"span",51),M(1,Y6,2,1,"span",63),b(2),_()),t&2){let e=d(2).$implicit;l(),D(e.prefix?1:-1),l(),C(e.name)}}function X6(t,o){if(t&1&&F(0,"i",57),t&2){let e=d(2).$implicit;h("pTooltip",e.staleTooltip),O("aria-label",e.staleTooltip)}}function Q6(t,o){if(t&1&&(m(0,"span",58),F(1,"i",64),m(2,"span",65),b(3),_()()),t&2){let e=d(2).$implicit;l(3),C(e.errors)}}function J6(t,o){if(t&1&&(m(0,"span",59),F(1,"i",66),m(2,"span",65),b(3),_()()),t&2){let e=d(2).$implicit;l(3),C(e.warns)}}function eA(t,o){if(t&1&&(m(0,"span",60),b(1),_()),t&2){let e=d(5);l(),C(e.texts.missing)}}function tA(t,o){if(t&1){let e=W();m(0,"tr",47),A("click",function(){w(e);let i=d().$implicit,r=d(3);return T(r.onLeafActivate(i))})("keydown.enter",function(){w(e);let i=d().$implicit,r=d(3);return T(r.onLeafActivate(i))})("keydown.space",function(i){w(e);let r=d().$implicit,a=d(3);return i.preventDefault(),T(a.onLeafActivate(r))}),m(1,"td",38)(2,"span",39),F(3,"span",40),m(4,"button",41),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleLeafVisibility(r,i))}),F(5,"i",42),_(),F(6,"span",48)(7,"i",49),M(8,K6,4,3,"span",50)(9,Z6,3,2,"span",51),m(10,"button",52),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onSitemapClick(r,i))}),F(11,"i",53),_()()(),m(12,"td",54),b(13),_(),m(14,"td",54),b(15),_(),m(16,"td",54),b(17),_(),m(18,"td",55)(19,"span",56),M(20,X6,1,2,"i",57),M(21,Q6,4,1,"span",58),M(22,J6,4,1,"span",59),M(23,eA,2,1,"span",60),_()()()}if(t&2){let e=d().$implicit,n=d(3);He("--folder-depth",e.depth),O("aria-label",n.texts.leafAriaLabel(e.name))("data-testid","files-leaf-"+e.path),l(4),h("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(),ce("pi-check",n.leafVisible(e.path)),l(3),D(n.isFlat()?8:9),l(2),h("pTooltip",n.texts.isolateChainTooltip),O("aria-label",n.texts.isolateChainAriaLabel(e.name))("data-testid","files-leaf-graph-"+e.path),l(3),C(e.linksIn),l(2),C(e.linksOut),l(),O("title",(e.tokensRaw??0)>0?n.texts.tokensTooltip(e.tokensRaw):null),l(),C(e.tokens),l(3),D(e.isStale?20:-1),l(),D(e.errors>0?21:-1),l(),D(e.warns>0?22:-1),l(),D(!e.isStale&&e.errors===0&&e.warns===0?23:-1)}}function nA(t,o){if(t&1&&M(0,$6,16,25,"tr",35)(1,tA,24,22,"tr",36),t&2){let e=o.$implicit;D(e.type==="folder"?0:1)}}function iA(t,o){if(t&1&&(m(0,"div",6)(1,"p-table",13),k(2,U6,23,58,"ng-template",14)(3,nA,2,1,"ng-template",15),_()()),t&2){let e=d(2);l(),h("value",e.rows())("paginator",!1)("scrollable",!0)("scrollHeight","flex")}}function oA(t,o){if(t&1&&M(0,G6,3,1,"div",5)(1,iA,4,4,"div",6),t&2){let e=d();D(e.rows().length===0?0:1)}}var $v=(()=>{class t{loader=p(Ht);filters=p(dn);issuePaths=p(Co);nodeOpenIntent=p(_o);mapVisibility=p(ni);mapIsolate=p(_s);texts=Oi;loading=this.loader.loading;error=this.loader.error;filtersActive=this.filters.isActive;collapsed=te(Dv());sort=te(jv());sortState=this.sort.asReadonly();isFlat=E(()=>this.sort().column!=="tree");constructor(){_e(()=>{Pv(this.collapsed())}),_e(()=>{Uv(this.sort())})}filteredNodes=E(()=>{let e=this.issuePaths.bySeverity();return this.filters.apply(this.loader.nodes(),e)});tree=E(()=>Bv(this.filteredNodes()));aggregates=E(()=>Vv(this.tree()));rows=E(()=>{let e=nm(this.loader.scan()?.issues,"error"),n=nm(this.loader.scan()?.issues,"warn");return qv({tree:this.tree(),leaves:this.filteredNodes(),collapsed:this.collapsed(),aggregates:this.aggregates(),maps:{errorCounts:e,warnCounts:n},sort:this.sort()})});folderStateMap=E(()=>{let e=this.mapVisibility.paths(),n=new Map,i=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,f]=i(c);a+=u,s+=f}return n.set(r.path,a===0||s===0?"none":s===a?"all":"some"),[a,s]};return i(this.tree()),n});leafVisible(e){return this.mapVisibility.paths().has(e)}nodeDepth(e){let n=0;for(let i of e)i==="/"&&n++;return n}depthSet(e){let n=new Set;for(let i of this.filteredNodes())this.nodeDepth(i.path)<=e&&n.add(i.path);return n}pathsAre(e){let n=this.mapVisibility.paths();if(n.size!==e.size)return!1;for(let i of e)if(!n.has(i))return!1;return!0}activeDepthLevel=E(()=>{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=i=>{i.path&&e.add(i.path);for(let r of i.subfolders.values())n(r)};n(this.tree()),this.collapsed.set(e)}onSortColumn(e){this.sort.set(Gv(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 i=zv(this.tree(),e.path);i&&this.mapVisibility.toggleFolder(Hv(i))}onSitemapClick(e,n){n.stopPropagation(),this.mapIsolate.isolate(e.path)}resetFilters(){this.filters.reset()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({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"],["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-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__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,i){n&1&&(m(0,"section",0),M(1,V6,1,1,"p-message",1),M(2,z6,4,4,"div",2)(3,oA,2,1),_()),n&2&&(l(),D(i.error()?1:-1),l(),D(i.loading()?2:i.error()?-1:3))},dependencies:[wv,Xf,ct,Iv,Qf,fb,hb,zt,Ot,Ve,Be],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__stale-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);color:var(--sm-severity-warn);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 Ni=class{constructor(o,e,n,i,r){this.center=o,this.radiusX=e,this.radiusY=n,this.startAngle=i,this.endAngle=r}},U=class t{static castToPoint(o){return o||t.initialize()}static initialize(o=0,e=0){return{x:o,y:e}}static copy(o){return t.initialize(o.x,o.y)}static isEqual(o,e){return o.x===e.x&&o.y===e.y}static sum(o,e){return{x:o.x+e.x,y:o.y+e.y}}static sub(o,e){return{x:o.x-e.x,y:o.y-e.y}}static div(o,e){return{x:o.x/e,y:o.y/e}}static mult(o,e){return{x:o.x*e,y:o.y*e}}static interpolatePoints(o,e,n){let i=1-n;return t.initialize(o.x*i+e.x*n,o.y*i+e.y*n)}static roundTo(o,e){let n=Math.trunc(o.x/e),i=Math.trunc(o.y/e);return{x:n*e,y:i*e}}static hypotenuse(o,e){let n=e.x-o.x,i=e.y-o.y;return Math.abs(Math.sqrt(n*n+i*i))}static distance(o,e){let n=o.x-e.x,i=o.y-e.y;return Math.sqrt(n*n+i*i)}static getMinimum(o,e){return t.initialize(Math.min(o.x,e.x),Math.min(o.y,e.y))}static getMaximum(o,e){return t.initialize(Math.max(o.x,e.x),Math.max(o.y,e.y))}static matrixTransform(o,e){let n=t.initialize(o.x,o.y),i=e.getScreenCTM();if(i){let r=e.createSVGPoint();r.x=o.x,r.y=o.y,n=r.matrixTransform(i.inverse())}return n}static elementTransform(o,e){let n=t.initialize(o.x,o.y),i=e.getBoundingClientRect();return n=t.sub(n,t.initialize(i.left,i.top)),n}},me=class t{constructor(o=0,e=0){this.x=o,this.y=e}static fromPoint(o){return new t(o.x,o.y)}add(o){let e=U.sum(this,o);return t.fromPoint(e)}sub(o){let e=U.sub(this,o);return t.fromPoint(e)}subNumber(o){let e=U.sub(this,new t(o,o));return t.fromPoint(e)}div(o){let e=U.div(this,o);return t.fromPoint(e)}mult(o){let e=U.mult(this,o);return t.fromPoint(e)}matrixTransform(o){let e=U.matrixTransform(this,o);return t.fromPoint(e)}elementTransform(o){let e=U.elementTransform(this,o);return t.fromPoint(e)}},yr=class{static initialize(o=U.initialize(),e=U.initialize()){return{point1:o,point2:e}}static copy(o){return{point1:o.point1,point2:o.point2}}static hypotenuse(o){return Math.sqrt(Math.pow(o.point1.x-o.point2.x,2)+Math.pow(o.point1.y-o.point2.y,2))}},Ai=class{constructor(o,e){this.point1=o,this.point2=e}},oe=class t{static initialize(o=0,e=0,n=0,i=0){n<0&&(o=o+n,n=-n),i<0&&(e=e+i,i=-i);let r=U.initialize(o+n/2,e+i/2);return{x:o,y:e,width:n,height:i,gravityCenter:r}}static copy(o){return t.initialize(o.x,o.y,o.width,o.height)}static fromElement(o){let{x:e,y:n,width:i,height:r}=o.getBoundingClientRect();return t.initialize(e,n,i,r)}static isIncludePoint(o,e){return e.x>=t.left(o)&&e.x<=t.right(o)&&e.y>=t.top(o)&&e.y<=t.bottom(o)}static intersectionWithRect(o,e){return!(o.x+o.width<e.x||e.x+e.width<o.x||o.y+o.height<e.y||e.y+e.height<o.y)}static left(o){return o.x}static top(o){return o.y}static right(o){return o.x+o.width}static bottom(o){return o.y+o.height}static addPoint(o,e){let n=t.copy(o);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(o,e){let n=t.copy(o);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(o,e){let n=t.copy(o);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(o,e){let n=t.copy(o);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(o){return!o||o.length===0?null:o.reduce((e,n)=>{let i=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(i,r,a-i,s-r)},o[0])}static elementTransform(o,e){let n=e.getBoundingClientRect(),i=U.sub(o,U.initialize(n.left,n.top));return t.initialize(i.x,i.y,o.width,o.height)}static updateIsNotFinite(o){return!Number.isFinite(o.width)||!Number.isFinite(o.height)||!Number.isFinite(o.x)||!Number.isFinite(o.y)?t.initialize(0,0,0,0):o}};function Wv(t,o){let e=Math.max(t.width,o),n=Math.max(t.height,o),i=(e-t.width)/2,r=(n-t.height)/2;return oe.initialize(t.x-i,t.y-r,e,n)}function rm(t,o){t=oe.updateIsNotFinite(t),o.setAttribute("x",t.x.toString()),o.setAttribute("y",t.y.toString()),o.setAttribute("width",t.width.toString()),o.setAttribute("height",t.height.toString())}function Kv(t,o){t=oe.updateIsNotFinite(t),o.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var dt=class t{constructor(o=0,e=0,n=0,i=0,r=0,a=0,s=0,c=0){this.x=o,this.y=e,this.width=n,this.height=i,this.radius1=r,this.radius2=a,this.radius3=s,this.radius4=c,this.gravityCenter=U.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(o){return new me(o.x+o.width/2,o.y+o.height/2)}static fromRect(o){return new t(o.x,o.y,o.width,o.height)}static fromRoundedRect(o){return new t(o.x,o.y,o.width,o.height,o.radius1,o.radius2,o.radius3,o.radius4)}static fromCenter(o,e,n){return new t(o.gravityCenter.x-e/2,o.gravityCenter.y-n/2,e,n,o.radius1,o.radius2,o.radius3,o.radius4)}static fromPoint(o){return new t(o.x,o.y)}addPoint(o){let e=t.fromRoundedRect(this);return e.x+=o.x,e.y+=o.y,e.gravityCenter=this.calculateGravityCenter(e),e}},Ft=class t{static initialize(o=0,e=0){return{width:o,height:e}}static isEqual(o,e){return o.width===e.width&&o.height===e.height}static offsetFromElement(o){if(o instanceof SVGGraphicsElement){let e=o.getBBox();return t.initialize(e.width,e.height)}else if(o instanceof HTMLElement)return t.initialize(o.offsetWidth,o.offsetHeight)}};function rA(){return{position:U.initialize(),scaledPosition:U.initialize(),scale:1,rotate:0}}function aA(t){let o;if(t){t=t.replace("matrix(",""),t=t.replace(")","");let e=t.split(" ");o={position:{x:Number(e[4]),y:Number(e[5])},scaledPosition:U.initialize(),scale:Number(e[0]),rotate:0}}return o}var ii=class{static toString(o){let e=U.sum(o.position,o.scaledPosition);return`matrix(${o.scale}, 0, 0, ${o.scale}, ${e.x}, ${e.y})`}static fromString(o){return aA(o)}static default(){return rA()}},Gt=class t{static initialize(o=0,e=0){return U.initialize(o,e)}static fromPoints(o,e){return t.initialize(e.x-o.x,e.y-o.y)}static vectorLength(o){return Math.sqrt(t.magnitudeSquared(o))}static magnitudeSquared(o){return o.x*o.x+o.y*o.y}static dotProduct(o,e){return o.x*e.x+o.y*e.y}static crossProduct(o,e){return o.x*e.y-o.y*e.x}static subtract(o,e){return t.initialize(o.x-e.x,o.y-e.y)}static add(o,e){return t.initialize(o.x+e.x,o.y+e.y)}static scale(o,e){return t.initialize(o.x*e,o.y*e)}static angle(o,e){let n=Math.acos(Math.max(-1,Math.min(t.dotProduct(o,e)/(t.vectorLength(o)*t.vectorLength(e)),1)));return t.crossProduct(o,e)<0?-n:n}},om=class{static parseRoundedRect(o){let e=Math.PI*.5,n=o.x,i=o.y,r=o.x+o.width,a=o.y+o.height,s=o.x+o.radius1,c=o.y+o.radius1,u=o.x+o.width-o.radius2,f=o.y+o.radius2,g=o.x+o.width-o.radius3,x=o.y+o.height-o.radius3,I=o.x+o.radius4,S=o.y+o.height-o.radius4;return[new Ni({x:s,y:c},o.radius1,o.radius1,2*e,3*e),new Ai({x:s,y:i},{x:u,y:i}),new Ni({x:u,y:f},o.radius2,o.radius2,3*e,4*e),new Ai({x:r,y:f},{x:r,y:x}),new Ni({x:g,y:x},o.radius3,o.radius3,0,e),new Ai({x:g,y:a},{x:I,y:a}),new Ni({x:I,y:S},o.radius4,o.radius4,e,2*e),new Ai({x:n,y:S},{x:n,y:c})]}},xo=class{static getRoundedRectIntersections(o,e,n){let i=om.parseRoundedRect(n);for(let r of i)if(r instanceof Ni){let a=this.intersectArcWithLine(r,o,e);if(a.length>0)return a}else if(r instanceof Ai){let a=this.intersectLineSegments(o,e,r.point1,r.point2);if(a)return[a]}return[]}static getRoundedRectIntersectionsWithSVGPath(o,e){let n=o.getTotalLength(),i=[];for(let r=0;r<=n;r+=1){let a=o.getPointAtLength(r);i.push({x:a.x,y:a.y})}for(let r=1;r<i.length;r++){let a=this.getRoundedRectIntersections(i[r-1],i[r],e);if(a.length>0)return a}return[]}static intersectArcWithLine(o,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(o.center,o.radiusX,o.radiusY,e,n),o)}static intersectLineSegments(o,e,n,i){let r=e.x-o.x,a=e.y-o.y,s=i.x-n.x,c=i.y-n.y,u=(-a*(o.x-n.x)+r*(o.y-n.y))/(-s*a+r*c),f=(s*(o.y-n.y)-c*(o.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&f>=0&&f<=1?{x:o.x+f*r,y:o.y+f*a}:null}static filterPointsWithinArc(o,e){let{center:n,startAngle:i,endAngle:r}=e;if(o.length===0)return o;r<i&&([i,r]=[r,i]),(i<0||r<0)&&(i+=2*Math.PI,r+=2*Math.PI);let a=[];for(let s of o){let c=this.normalizeAngle(Gt.angle(Gt.initialize(1,0),Gt.initialize(s.x-n.x,s.y-n.y)));c<i&&(c+=2*Math.PI),i<=c&&c<=r&&a.push(s)}return a}static normalizeAngle(o){let e=o%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(o,e,n,i,r){let a=Gt.initialize(i.x,i.y),s=Gt.fromPoints(i,r),c=Gt.initialize(o.x,o.y),u=Gt.subtract(a,c),f=Gt.initialize(s.x/(e*e),s.y/(n*n)),g=Gt.initialize(u.x/(e*e),u.y/(n*n)),x=Gt.dotProduct(s,f),I=Gt.dotProduct(s,g),S=Gt.dotProduct(u,g)-1,N=I*I-x*S;return N<0?[]:this.calculateIntersectionPoints(N,x,I,i,r)}static calculateIntersectionPoints(o,e,n,i,r){let a=[];if(o>0){let s=Math.sqrt(o),c=(-n-s)/e,u=(-n+s)/e;c>=0&&c<=1&&a.push(U.interpolatePoints(i,r,c)),u>=0&&u<=1&&a.push(U.interpolatePoints(i,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(U.interpolatePoints(i,r,s))}return a}};var am=class{handle(o,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(o)),!!n)return e.get(this.execution).handle(o)}execute(o,e){return e.get(this.execution).handle(o)}setValidator(o){this.validator=o}setExecution(o){this.execution=o}},V=class t{constructor(){this._injector=p(mt)}static registerPipeline(o,e,n){if(!o||!o.fToken)throw new Error("Type must have a fToken static property.");let i=this.pipelines.get(o.fToken)||new am;n?i.setValidator(e):i.setExecution(e),this.pipelines.set(o.fToken,i)}send(o){let e=t.pipelines.get(o.constructor.fToken);if(e)return e.handle(o,this._injector);throw new Error("Handler not registered for request type.")}execute(o){return t.pipelines.get(o.constructor.fToken).execute(o,this._injector)}};V.pipelines=new Map;V.\u0275fac=function(o){return new(o||V)};V.\u0275prov=y({token:V,factory:V.\u0275fac});function R(t){return function(o){V.registerPipeline(t,o,!1)}}var sA=(()=>{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})(),lA=(()=>{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})(),cA=new he("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>Zt(p($a))?p(sA):p(lA)}),dA=(()=>{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,i){window.open(e,n,i)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),uA=(()=>{class t{getComputedStyle(e){return new Proxy({getPropertyValue:n=>"0"},{get:(n,i)=>i==="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,i){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pA=new he("F_WINDOW",{providedIn:"root",factory:()=>Zt(p($a))?p(dA):p(uA)}),oi=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(oi||{}),sm;try{sm=typeof Intl<"u"&&Intl.v8BreakIterator}catch{sm=!1}var lm=(()=>{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||sm)&&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?Zt(this._platformId):typeof document=="object"&&!!document}getOS(){let e=navigator.userAgent.toLowerCase(),n=/(macintosh|macintel|macppc|mac68k|macos)/i,i=/(win32|win64|windows|wince)/i,r;return n.test(e)?r=oi.MAC_OS:this.IOS?r=oi.IOS:i.test(e)?r=oi.WINDOWS:this.ANDROID?r=oi.ANDROID:!r&&/linux/.test(e)&&(r=oi.LINUX),r}static \u0275fac=function(n){return new(n||t)(ao($a))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ut=(()=>{class t{injectedDocument;windowService;localStorageService;platformService;constructor(e,n,i,r){this.injectedDocument=e,this.windowService=n,this.localStorageService=i,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,i,r){if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("%")){let a=parseFloat(e)/100;return Math.max(n,i)*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)(ao(Ua),ao(pA),ao(cA),ao(lm))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function cm(t,o){return t.reduce((e,n)=>[...e,...o(n)],[])}function dm(t){let o=t.cloneNode(!0),e=o.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();o.removeAttribute("id");for(let i=0;i<e.length;i++)e[i].removeAttribute("id");return n==="canvas"?Xv(t,o):(n==="input"||n==="select"||n==="textarea")&&Zv(t,o),Yv("canvas",t,o,Xv),Yv("input, textarea, select",t,o,Zv),o}function Yv(t,o,e,n){let i=o.querySelectorAll(t);if(i.length){let r=e.querySelectorAll(t);for(let a=0;a<i.length;a++)n(i[a],r[a])}}var hA=0;function Zv(t,o){o.type!=="file"&&(o.value=t.value),o.type==="radio"&&o.name&&(o.name=`mat-clone-${o.name}-${hA++}`)}function Xv(t,o){let e=o.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function um(t,o,e){for(let n in o)if(o.hasOwnProperty(n)){let i=o[n];i?t.setProperty(n,i,e?.has(n)?"important":""):t.removeProperty(n)}return t}function Qv(t){um(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 Jv(t,o,e){return fA(t,e).dataset[o]}function fA(t,o){return t.closest(o)}function pm(t,o){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===o.ELEMENT_NODE)return e[0];let n=o.createElement("div");return e.forEach(i=>n.appendChild(i)),n}function Cr(t,o){let e=mA(t,o);return!!e&&!e.classList.contains(o+"-disabled")}function mA(t,o){return t.closest(o)}function qn(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function wo(t,o,e){let n=e[t.toUpperCase()]||_A(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${o}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function _A(t,o){return Object.keys(t).find(e=>t[e]===o)}var gA=["markerElement"],bA=["fConnectionGradientRenderer",""],vA=["f-connection-path",""],yA=["fConnectionSelection",""],CA=["f-connection-drag-handle-start",""],xA=["f-connection-drag-handle-end",""],wA=["defs"],TA=["*"],SA=["fGroupsContainer"],kA=["fNodesContainer"],IA=["fConnectionsContainer"],EA=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],MA=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],DA=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],PA=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function RA(t,o){t&1&&($(),F(0,"linearGradient",3)),t&2&&h("fConnectionGradientRendererFor",o)}function OA(t,o){t&1&&($(),F(0,"circle",6))}function FA(t,o){t&1&&Le(0,4)}var NA="[_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}",AA=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],LA=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],gm=new he("F_BACKGROUND_PATTERN"),$d=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(o){this.fPattern=o}},Eo=class{_items=[];_byId=new Map;get(o){return this._byId.get(o)}require(o){let e=this._byId.get(o);if(!e)throw new Error(`${this.kind} not found: ${o}`);return e}has(o){return this._byId.has(o)}getAll(){return this._items}size(){return this._items.length}add(o){let e=o.fId();if(this._byId.has(e))throw new Error(`${this.kind} already exists: ${e}`);this._items.push(o),this._byId.set(e,o)}addMany(o){for(let e of o)this.add(e)}remove(o){let e=o.fId(),n=this._byId.get(e);if(!n)return!1;this._byId.delete(e);let i=this._items.indexOf(n);return i>=0&&this._items.splice(i,1),!0}removeById(o){let e=this._byId.get(o);if(!e)return;this._byId.delete(o);let n=this._items.indexOf(e);return n>=0&&this._items.splice(n,1),e}clear(){this._items.length=0,this._byId.clear()}};function Li(t){return{name:t}}var bm=class{_instances=new Map;get(o){return this._instances.get(o.name)}require(o){let e=this.get(o);if(!e)throw new Error(`Instance not found: ${o.name}`);return e}has(o){return this._instances.has(o.name)}add(o,e){if(this._instances.has(o.name))throw new Error(`${o.name} already exists`);this._instances.set(o.name,e)}remove(o){if(!this._instances.has(o.name))throw new Error(`${o.name} does not exist`);return this._instances.delete(o.name),!0}clear(){this._instances.clear()}},wr=class extends Eo{kind;constructor(o){super(),this.kind=o}},vm=class extends Eo{kind="Connection Marker"},ym=class extends Eo{kind="Connection";_instancesForCreate;_instancesForSnap;getForSnap(){return this._instancesForSnap}getForCreate(){return this._instancesForCreate}addForCreate(o){this._instancesForCreate=o}addForSnap(o){this._instancesForSnap=o}removeInstanceForCreate(){this._instancesForCreate=void 0}removeInstanceForSnap(){this._instancesForSnap=void 0}},Cm=class extends Eo{kind="Node"},So=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(o=!0){this.notifyOnSubscribe=o}};function BA(){return t=>{let o=null,e=null,n=()=>{o!==null&&cancelAnimationFrame(o),e!==null&&cancelAnimationFrame(e),o=e=null};return{callback:()=>{n(),o=requestAnimationFrame(()=>{o=null,e=requestAnimationFrame(()=>{e=null,t()})})},cleanup:n}}}function VA(){return t=>{let o=null;return{callback:()=>{o!==null&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=null,t()})},cleanup:()=>{o!==null&&cancelAnimationFrame(o),o=null}}}}function Wd(t){return o=>{let e=null;return{callback:()=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{e=null,o()},t)},cleanup:()=>{e!==null&&clearTimeout(e),e=null}}}}var un=class{_listeners=new Set;notify(){this._listeners.forEach(o=>o())}listen(o){return this._listeners.add(o),()=>this.stop(o)}stop(o){this._listeners.delete(o)}},xm=class extends un{_htmlElement;_observer=new ResizeObserver(()=>this.notify());_isObserving=!1;constructor(o){super(),this._htmlElement=o}listen(o){return this._isObserving||(this._observer.observe(this._htmlElement),this._isObserving=!0),super.listen(o)}stop(o){super.stop(o),this._listeners.size===0&&this._disconnect()}_disconnect(){this._observer.unobserve(this._htmlElement),this._observer.disconnect(),this._isObserving=!1}},Pn=class t{_channels=[];_operators=[];constructor(...o){this._channels=[...o]}pipe(...o){let e=new t(...this._channels);return e._operators=[...this._operators,...o],e}listen(o,e){let n=e,i=[],r=[],a=[];for(let g of[...this._operators].reverse()){let x=g(n);n=x.callback,x.cleanup&&i.push(x.cleanup),x.onSubscribe&&r.push(x.onSubscribe),x.setTeardown&&a.push(x.setTeardown)}let s=this._channels.map(g=>g.listen(()=>n())),c=null,u=!1,f=()=>{u||(u=!0,c?.(),c=null,s.forEach(g=>g()),i.forEach(g=>g()))};a.slice().reverse().forEach(g=>g(f)),r.slice().reverse().forEach(g=>g(n)),c=o.onDestroy(f)}};function wh(){return t=>{let o=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{o&&e()})},cleanup:()=>{o=!1}}}}function ey(){return t=>{let o=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!o){o=!0;try{t()}finally{e?.()}}}}}}var zA=(()=>{let t=class ws{_store=p(L);handle({notifyOnSubscribe:e}){return e?new Pn(this._store.connectionsChanges$).pipe(wh(),Wd(1)):new Pn(this._store.connectionsChanges$).pipe(Wd(1))}static \u0275fac=function(n){return new(n||ws)};static \u0275prov=y({token:ws,factory:ws.\u0275fac})};return t=P([R(So)],t),t})(),wm=class{static fToken=Symbol("ListenNodesChangesRequest")},HA=(()=>{let t=class Ts{_store=p(L);handle(e){return new Pn(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ts)};static \u0275prov=y({token:Ts,factory:Ts.\u0275fac})};return t=P([R(wm)],t),t})(),Kd=class{static fToken=Symbol("ListenTransformChangesRequest")},qA=(()=>{let t=class Ss{_store=p(L);handle(e){return new Pn(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ss)};static \u0275prov=y({token:Ss,factory:Ss.\u0275fac})};return t=P([R(Kd)],t),t})(),Bi=class{static fToken=Symbol("EmitConnectionsChangesRequest")},GA=(()=>{let t=class ks{_store=p(L);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||ks)};static \u0275prov=y({token:ks,factory:ks.\u0275fac})};return t=P([R(Bi)],t),t})(),li=class{static fToken=Symbol("NotifyTransformChangedRequest")},L=(()=>{class t{transformChanges$=new un;viewportAnimationChanges$=new un;connectionsChanges$=new un;_connectionsRevision=0;connectionsRenderedChanges$=new un;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new un;_nodesRevision=0;progressiveRenderChanges$=new un;_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 ym;connectionMarkers=new vm;outputs=new wr("Output");inputs=new wr("Input");outlets=new wr("Outlet");instances=new bm;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})(),Ye={MAGNETIC_LINES:Li("magnetic-lines"),MAGNETIC_RECTS:Li("magnetic-rects"),ZOOM:Li("zoom-controls"),BACKGROUND:Li("background"),SELECTION_AREA:Li("selection-area"),MINIMAP:Li("minimap"),AUTO_PAN:Li("auto-pan")},jA=(()=>{let t=class Is{_store=p(L);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||Is)};static \u0275prov=y({token:Is,factory:Is.\u0275fac})};return t=P([R(li)],t),t})(),ci=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(o,e){this.key=o,this.instance=e}},UA=(()=>{let t=class Es{_store=p(L);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Es)};static \u0275prov=y({token:Es,factory:Es.\u0275fac})};return t=P([R(ci)],t),t})(),di=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(o){this.key=o}},$A=(()=>{let t=class Ms{_store=p(L);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Ms)};static \u0275prov=y({token:Ms,factory:Ms.\u0275fac})};return t=P([R(di)],t),t})(),WA=[L,HA,zA,qA,GA,jA,UA,$A],KA=0,YA=(()=>{let t=class Ds{_store=p(L);_browser=p(ut);get _backgroundElement(){return this._store.instances.get(Ye.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let i=Io("defs",this._browser);if(e.fPattern?.hostElement.remove(),n.forEach(r=>{i.append(r)}),n.length){this._backgroundElement?.firstChild?.appendChild(i),n[n.length-1].id="f-background-pattern-"+KA++;let r=n[n.length-1].id,a=Io("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||ii.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||Ds)};static \u0275prov=y({token:Ds,factory:Ds.\u0275fac})};return t=P([R($d)],t),t})(),Tr=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(o){this.fTransform=o}},ZA=(()=>{let t=class Ps{_store=p(L);handle(e){this._store.instances.get(Ye.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||Ps)};static \u0275prov=y({token:Ps,factory:Ps.\u0275fac})};return t=P([R(Tr)],t),t})(),XA=[YA,ZA],Yd=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(o){this.instance=o}},QA=(()=>{let t=class Rs{_store=p(L);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Rs)};static \u0275prov=y({token:Rs,factory:Rs.\u0275fac})};return t=P([R(Yd)],t),t})(),Zd=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(o,e){this.id=o,this.animated=e}},JA=(()=>{let t=class Os{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({id:e,animated:n}){let i=this._store.nodes.get(e);i&&(this._toCenter(this._getNodeRect(i),this._getFlowRect(),i._position),this._mediator.execute(new Mo(n,Vi.VIEWPORT_ONLY)))}_toCenter(e,n,i){this._transform.scaledPosition=U.initialize(),this._transform.position=U.initialize((n.width-e.width)/2-i.x*this._transform.scale,(n.height-e.height)/2-i.y*this._transform.scale)}_getNodeRect(e){return oe.fromElement(e.hostElement)}_getFlowRect(){return oe.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||Os)};static \u0275prov=y({token:Os,factory:Os.\u0275fac})};return t=P([R(Zd)],t),t})(),Xd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(o,e){this.toCenter=o,this.animated=e}},e7=(()=>{let t=class Fs{_store=p(L);get _transform(){return this._store.transform}_mediator=p(V);handle({toCenter:e,animated:n}){let i=this._mediator.execute(new Ao)||oe.initialize();i.width===0||i.height===0||(this.fitToParent(i,oe.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Mo(n,Vi.VIEWPORT_ONLY)))}fitToParent(e,n,i,r){this._transform.scaledPosition=U.initialize(),this._transform.position=this._getZeroPositionWithoutScale(i);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=U.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,i=e.length?Math.min(...e.map(r=>r.y)):0;return U.initialize(n,i)}static \u0275fac=function(n){return new(n||Fs)};static \u0275prov=y({token:Fs,factory:Fs.\u0275fac})};return t=P([R(Xd)],t),t})(),Qd=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(o,e){this.transform=o,this.position=e}},t7=(()=>{let t=class Ns{_store=p(L);handle({transform:e,position:n}){n&&(U.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=U.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return U.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||Ns)};static \u0275prov=y({token:Ns,factory:Ns.\u0275fac})};return t=P([R(Qd)],t),t})(),Jd=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(o,e){this.transform=o,this.scale=e}},n7=(()=>{let t=class As{_store=p(L);handle(e){!e.scale&&e.scale!==0||(e.transform.scale=e.scale,this._store.fCanvas?.redraw())}static \u0275fac=function(n){return new(n||As)};static \u0275prov=y({token:As,factory:As.\u0275fac})};return t=P([R(Jd)],t),t})(),Vi=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Vi||{}),Mo=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(o,e=Vi.WITH_CONNECTION_CHANGES){this.animated=o,this.context=e}};function Iy(t,o){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),o(n))};t.addEventListener("transitionend",e)}var i7=(()=>{let t=class Ls{_store=p(L);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(),Iy(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Vi.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Vi.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ls)};static \u0275prov=y({token:Ls,factory:Ls.\u0275fac})};return t=P([R(Mo)],t),t})(),eu=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},o7=(()=>{let t=class Bs{_store=p(L);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Bs)};static \u0275prov=y({token:Bs,factory:Bs.\u0275fac})};return t=P([R(eu)],t),t})(),tu=class{static fToken=Symbol("ResetScaleRequest")},r7=(()=>{let t=class Vs{_store=p(L);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=U.initialize()}static \u0275fac=function(n){return new(n||Vs)};static \u0275prov=y({token:Vs,factory:Vs.\u0275fac})};return t=P([R(tu)],t),t})(),nu=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(o){this.animated=o}},a7=(()=>{let t=class zs{_mediator=p(V);_store=p(L);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Ao)||oe.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,oe.fromElement(this._store.flowHost),this._store.nodes.getAll().map(i=>i._position)),this._mediator.execute(new Mo(e,Vi.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,i){this._transform.scaledPosition=U.initialize(),this._transform.position=this._getZeroPositionWithoutScale(i);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=U.initialize(r,a)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,i=e.length?Math.min(...e.map(r=>r.y)):0;return U.initialize(n,i)}static \u0275fac=function(n){return new(n||zs)};static \u0275prov=y({token:zs,factory:zs.\u0275fac})};return t=P([R(nu)],t),t})(),iu=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(o,e){this.scale=o,this.toPosition=e}},s7=(()=>{let t=class Hs{_store=p(L);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let i=U.sum(this._transform.scaledPosition,this._transform.position),r=n.x-(n.x-i.x)*e/this._transform.scale,a=n.y-(n.y-i.y)*e/this._transform.scale;this._transform.scale=e,this._transform.scaledPosition=U.sub(U.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||Hs)};static \u0275prov=y({token:Hs,factory:Hs.\u0275fac})};return t=P([R(iu)],t),t})(),l7=[QA,JA,e7,t7,n7,i7,o7,r7,a7,s7],Tm=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(o){this.connection=o}},c7=(()=>{let t=class qs{_store=p(L);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||qs)};static \u0275prov=y({token:qs,factory:qs.\u0275fac})};return t=P([R(Tm)],t),t})(),ou=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(o){this.instance=o}},d7=(()=>{let t=class Gs{_store=p(L);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Gs)};static \u0275prov=y({token:Gs,factory:Gs.\u0275fac})};return t=P([R(ou)],t),t})(),ru=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(o){this.connection=o}},u7=(()=>{let t=class js{_store=p(L);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||js)};static \u0275prov=y({token:js,factory:js.\u0275fac})};return t=P([R(ru)],t),t})(),Sm=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(o){this.connection=o}},p7=(()=>{let t=class Us{_store=p(L);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||Us)};static \u0275prov=y({token:Us,factory:Us.\u0275fac})};return t=P([R(Sm)],t),t})(),Do=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(o){this.connection=o}},ty=new he("F_CONNECTION_CONTENT");var au=class t{points;cumulativeLengths;segmentTangents;totalLength;constructor(o){let e=t._removeConsecutiveDuplicates(o);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,i=n-1,r=new Array(n).fill(0),a=new Array(i),s=0;for(let c=0;c<i;c++){let u=this.points[c+1].x-this.points[c].x,f=this.points[c+1].y-this.points[c].y,g=Math.hypot(u,f),x=g?u/g:1,I=g?f/g:0;a[c]={x,y:I},s+=g,r[c+1]=s}this.cumulativeLengths=r,this.segmentTangents=a,this.totalLength=s||1}static from(o){return new t(o.map(e=>({x:e.x,y:e.y})))}static _removeConsecutiveDuplicates(o){let e=[];for(let n of o){let i=e[e.length-1];(!i||i.x!==n.x||i.y!==n.y)&&e.push({x:n.x,y:n.y})}return e}},km=class t{_polyline;constructor(o=[]){this._polyline=new au(o)}updatePoints(o){return this._polyline=new au(o),this._polyline.totalLength}calculateTotalLength(o){return this.updatePoints(o)}get totalLength(){return this._polyline.totalLength}getPointAtProgress(o){let{points:e,cumulativeLengths:n,segmentTangents:i,totalLength:r}=this._polyline,s=t._clamp(o,0,1)*r,c=.5;if(s<=c)return{point:e[0],tangent:i[0]??{x:1,y:0},atEdge:!0};if(r-s<=c){let ne=e.length-1;return{point:e[ne],tangent:i[ne-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),f=Math.max(1,u),g=n[f-1],x=n[f],I=t._safeRatio(s-g,x-g),S=e[f-1],N=e[f],j={x:t._lerp(S.x,N.x,I),y:t._lerp(S.y,N.y,I)},Z=i[f-1]??{x:1,y:0};return{point:j,tangent:Z,atEdge:!1}}getPointAtLength(o){return this.getPointAtProgress(o)}getPointAtDistance(o){let e=this._polyline.totalLength?o/this._polyline.totalLength:0;return this.getPointAtProgress(e)}static _findRightIndex(o,e){let n=0,i=o.length-1;for(;n<i;){let r=n+i>>1;o[r]<e?n=r+1:i=r}return n}static _lerp(o,e,n){return o+(e-o)*n}static _clamp(o,e,n){return o<e?e:o>n?n:o}static _safeRatio(o,e){let n=Math.abs(e)<1e-6?1e-6:e;return o/n}},Ey=(function(t){return t.NONE="none",t.ALONG="along",t})(Ey||{}),Im=class{compute(o,e){let n=this._clamp01(e.position()),{point:i,tangent:r}=o.getPointAtLength(n),a={x:-r.y,y:r.x},s=e.offset()??0,c=i.x+a.x*s,u=i.y+a.y*s,g=this._sizeAlongDirection(e.hostElement,r)*.5,x=n*o.totalLength,I=o.totalLength-x,S=this._applyEdgeGuard(c,u,r,x,I,g),N=this._calculateContentRotation(e.align(),r);return{position:S,rotationDeg:N}}_clamp01(o){return o<=0?0:o>=1?1:o}_applyEdgeGuard(o,e,n,i,r,a){if(i<=a){let s=a-i;return{x:o+n.x*s,y:e+n.y*s}}if(r<=a){let s=a-r;return{x:o-n.x*s,y:e-n.y*s}}return{x:o,y:e}}_sizeAlongDirection(o,e){let n=oe.fromElement(o);return Math.abs(e.x)*n.width+Math.abs(e.y)*n.height}_normalize180(o){let e=(o+180)%360;return e<0&&(e+=360),e-180}_keepUpright(o){let e=this._normalize180(o);return e>90?e-=180:e<-90&&(e+=180),e}_calculateContentRotation(o,e){let n=0;return o===Ey.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},Em=class{_placement;constructor(o=new Im){this._placement=o}layout(o,e){let n=new km(o),i=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 i}_createTransformString(o,e){return`translate3d(${o.x}px, ${o.y}px, 0) translate(-50%, -50%) rotate(${e}deg)`}};var ny=new he("F_CONNECTION_WAYPOINTS");function My(t,o,e){return(t.x-o.x)**2+(t.y-o.y)**2<=e**2}function h7(t,o){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(i=>My(o,i,n))}function f7(t,o){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(i=>My(o,i,n))}function m7(t,o){for(let e of t){let n=f7(e,o);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let i=h7(e,o);if(i&&e.fWaypoints()?.visibility())return{connection:e,candidate:i}}}var Th=new he("F_CONNECTION_COMPONENTS_PARENT");var ze=(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})(ze||{}),su=new he("F_CONNECTION_MARKER"),_7=0,lu=class{fId=te(`f-marker-${_7++}`);hostElement=p(Xe).nativeElement};function Dy(t,o=ze.START){if(typeof t!="string")return o;let e=t.trim().toLowerCase();return e?g7(e)??o:o}function g7(t){switch(t){case"start":case"f-connection-marker-start":return ze.START;case"end":case"f-connection-marker-end":return ze.END;case"selected-start":case"f-connection-selected-marker-start":return ze.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return ze.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return ze.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return ze.END_ALL_STATES;default:return null}}var Py=(()=>{class t extends lu{_markerElement=it.required("markerElement");_type=B(ze.END_ALL_STATES,{alias:"type",transform:e=>Dy(e,ze.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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,i){n&1&&vn(i._markerElement,gA,5),n&2&&Kt()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[ve([{provide:su,useExisting:t}]),Y],decls:3,vars:0,consts:[["markerElement",""],["viewBox","0 0 6 6",1,"f-marker"],["d","M0,0 L6,3 0,6Z"]],template:function(n,i){n&1&&($(),J(0,"svg",1,0),ae(2,"path",2),ee())},encapsulation:2})}return t})();var Ry=(()=>{class t extends lu{_mediator=p(V);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=ze.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new ou(this))}ngOnDestroy(){this._mediator.execute(new Pu(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({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=>Dy(e,ze.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[ve([{provide:su,useExisting:t}]),Y]})}return t})(),ai=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(ai||{}),Ke=(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})(Ke||{});function b7({sourceRect:t,targetRect:o}){return{point1:t.gravityCenter,point2:o.gravityCenter}}var K=(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})(K||{}),To=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(To||{});function v7({sourceRect:t,sourceConnectableSide:o,targetRect:e,targetConnectableSide:n}){return{point1:iy(t,o===K.AUTO?K.BOTTOM:o),point2:iy(e,n===K.AUTO?K.TOP:n)}}function iy(t,o){switch(o){case K.TOP:return{x:t.x+t.width/2,y:t.y};case K.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case K.LEFT:return{x:t.x,y:t.y+t.height/2};case K.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${o}`)}}function Oy(t,o,e,n){if(!n||!n.rotationDeg)return xo.getRoundedRectIntersections(t,o,e)[0];let i=$s(t,-n.rotationDeg,n.pivot),r=$s(o,-n.rotationDeg,n.pivot),a=y7(e,-n.rotationDeg,n.pivot),s=xo.getRoundedRectIntersections(i,r,a)[0];return s?$s(s,n.rotationDeg,n.pivot):void 0}function y7(t,o,e){let n=$s(C7(t),o,e);return new dt(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function C7(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function $s(t,o,e){let n=t.x-e.x,i=t.y-e.y,r=o*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:n*a-i*s+e.x,y:n*s+i*a+e.y}}function x7({sourceRect:t,targetRect:o,sourceRotationContext:e,targetRotationContext:n}){return S7(w7(t,o,e),T7(t,o,n),t,o)}function w7(t,o,e){return Oy(t.gravityCenter,o.gravityCenter,t,e)}function T7(t,o,e){return Oy(o.gravityCenter,t.gravityCenter,o,e)}function S7(t,o,e,n){return{point1:t||e.gravityCenter,point2:o||n.gravityCenter}}var Cs=.5,k7={[ai.FLOATING]:x7,[ai.FIXED_CENTER]:b7,[ai.FIXED]:v7},qo=(()=>{class t{handle(e){let n=this._calculateDirectionalVectors(e.sourceRect.gravityCenter.x,e.sourceRect.gravityCenter.y,e.targetRect.gravityCenter.x,e.targetRect.gravityCenter.y),i=this._determineSourceSide(e,n),r=this._determineTargetSide(e,n);return e.connection._applyResolvedSidesToConnection(i,r),this._getBehaviorHandler(e.connection.fBehavior)({sourceRect:e.sourceRect,targetRect:e.targetRect,sourceConnectableSide:i,targetConnectableSide:r,sourceRotationContext:e.sourceRotationContext,targetRotationContext:e.targetRotationContext})}_calculateDirectionalVectors(e,n,i,r){let a=i-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,i,r){if(e===Ke.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(i);if(a<Cs&&s<Cs)return r;let u=a>=s;switch(e){case Ke.CALCULATE:return u?n>=0?K.RIGHT:K.LEFT:i>=0?K.BOTTOM:K.TOP;case Ke.CALCULATE_HORIZONTAL:return a<Cs?r:n>=0?K.RIGHT:K.LEFT;case Ke.CALCULATE_VERTICAL:return s<Cs?r:i>=0?K.BOTTOM:K.TOP;case Ke.TOP:return K.TOP;case Ke.BOTTOM:return K.BOTTOM;case Ke.LEFT:return K.LEFT;case Ke.RIGHT:return K.RIGHT;default:return r}}_getBehaviorHandler(e){let n=k7[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})(),wn=class{sourceRect;targetRect;connection;sourceConnectableSide;targetConnectableSide;sourceRotationContext;targetRotationContext;constructor(o,e,n,i,r,a,s){this.sourceRect=o,this.targetRect=e,this.connection=n,this.sourceConnectableSide=i,this.targetConnectableSide=r,this.sourceRotationContext=a,this.targetRotationContext=s}};function Sh(t,o,e){return[t,...e??[],o]}function I7(t,o){let e=Math.abs(o.x-t.x)/2,n=o.x<t.x?o.x+e:o.x-e,i=Math.abs(o.y-t.y)/2,r=o.y<t.y?o.y+i:o.y-i;return{x:n,y:r}}function E7(t,o=32){let e=new Array(o+1);e[0]=be({},t[0]);for(let n=1;n<=o;n++)e[n]=Fy(t[0],t[1],t[2],t[3],n/o);return e}function Fy(t,o,e,n,i){let r=1-i,a=i*i,s=r*r,c=s*r,u=a*i;return{x:c*t.x+3*s*i*o.x+3*r*a*e.x+u*n.x,y:c*t.y+3*s*i*o.y+3*r*a*e.y+u*n.y}}function Ny(t){return t.map(o=>Fy(o.p0,o.c1,o.c2,o.p3,.5))}function M7(t){if(t.length<2)throw new Error("Polylines must be at least two points");let o=D7(t);return o<=0?[be({},t[0])]:[P7(t,o/2)]}function D7(t){let o=0;for(let e=0;e<t.length-1;e++)o+=Ay(t[e],t[e+1]);return o}function P7(t,o){let e=0;for(let i=0;i<t.length-1;i++){let r=t[i],a=t[i+1],s=Ay(r,a);if(!(s<=0)){if(e+s>=o){let c=(o-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 Ay(t,o){return Math.hypot(o.x-t.x,o.y-t.y)}function R7(t){let o=[];for(let e of t)for(let n of e){let i=o[o.length-1];(!i||i.x!==n.x||i.y!==n.y)&&o.push(n)}return o}function Ly(t){if(!t.length)return"";let o=`M ${t[0].p0.x} ${t[0].p0.y}`;for(let e=0;e<t.length;e++){let n=t[e],i=e===t.length-1,r=i?n.p3.x+2e-4:n.p3.x,a=i?n.p3.y+2e-4:n.p3.y;o+=` C ${n.c1.x} ${n.c1.y}, ${n.c2.x} ${n.c2.y}, ${r} ${a}`}return o}function By(t,o=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let i=t[n],r=E7([i.p0,i.c1,i.c2,i.p3],o);n>0&&r.shift(),e.push(...r)}return e}function O7(t,o=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)>o||Math.abs(a.y-s.y)>o)&&n.push(a)}if(n.length<=2)return n;let i=[];i.push(n[0]);for(let r=1;r<n.length-1;r++){let a=i[i.length-1],s=n[r],c=n[r+1],u=Math.abs(a.x-s.x)<=o&&Math.abs(s.x-c.x)<=o,f=Math.abs(a.y-s.y)<=o&&Math.abs(s.y-c.y)<=o;!u&&!f&&i.push(s)}return i.push(n[n.length-1]),i}var Mm=class t{static _dir(o){switch(o){case K.LEFT:return{x:-1,y:0};case K.RIGHT:return{x:1,y:0};case K.TOP:return{x:0,y:-1};case K.BOTTOM:return{x:0,y:1};case K.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(o){return o===K.LEFT||o===K.RIGHT}static _handleLength(o,e,n,i){let r=Math.abs(e.x-o.x),a=Math.abs(e.y-o.y),s=Math.hypot(r,a),c=n===K.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,i),f=i+.5*s,g=i*1.05+c*.3;return Math.min(f,Math.max(u,g))}static _softControl(o,e,n,i){let r=this._dir(o),a=n.x-e.x,s=n.y-e.y,c=Math.hypot(a,s)||1,u=a/c,f=s/c;if(o===K.AUTO)return{x:e.x+u*i,y:e.y+f*i};let g=r.x*u+r.y*f,x=.12,I=Math.max(0,-g)*.08,S=Math.min(.2,x+I),N=r.x*(1-S)+u*S,j=r.y*(1-S)+f*S,Z=Math.hypot(N,j)||1;return{x:e.x+N/Z*i,y:e.y+j/Z*i}}handle({source:o,sourceSide:e,target:n,targetSide:i,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=Sh(o,n,a),u=[];for(let g=0;g<c.length-1;g++){let x=c[g],I=c[g+1],S=t._handleLength(x,I,e,s),N=t._handleLength(I,x,i,s),j=t._softControl(e,x,I,S),Z=t._softControl(i,I,x,N);u.push({p0:x,c1:j,c2:Z,p3:I,chainIndex:g})}let f=By(u,12);return{path:Ly(u),secondPoint:u[0]?.c1??o,penultimatePoint:u[u.length-1]?.c2??n,points:f,candidates:Ny(u)}}},Dm=class{handle({source:o,sourceSide:e,target:n,targetSide:i,offset:r,waypoints:a}){let s=Sh(o,n,a),c=[];for(let f=0;f<s.length-1;f++){let g=s[f],x=s[f+1],I=oy(e,g,x,r??0),S=oy(i,x,g,r??0);c.push({p0:g,c1:I,c2:S,p3:x,chainIndex:f})}let u=By(c,12);return{path:Ly(c),secondPoint:c[0]?.c1??o,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:Ny(c)}}};function oy(t,o,e,n){let i={x:o.x,y:o.y};switch(t){case K.LEFT:i.x-=xs(o.x-e.x,n);break;case K.RIGHT:i.x+=xs(e.x-o.x,n);break;case K.TOP:i.y-=xs(o.y-e.y,n);break;case K.BOTTOM:i.y+=xs(e.y-o.y,n);break;case K.AUTO:break}return i}function xs(t,o){return t>=o?t:o*Math.sqrt(o-t)}function F7(t){let{axis:o,source:e,target:n,sourceSide:i,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:f,offset:g,sourceGapOffset:x,targetGapOffset:I}=t,S=N7(a,s),N=A7(o,c,f,S);return i===r?L7(o,e,n,g,c,f,a,s,x,I):N=B7(o,c,u,a,s,S,N),N}function N7(t,o){return{sourceTarget:[{x:t.x,y:o.y}],targetSource:[{x:o.x,y:t.y}]}}function A7(t,o,e,n){return t==="x"?o.x===e?n.targetSource:n.sourceTarget:o.y===e?n.sourceTarget:n.targetSource}function L7(t,o,e,n,i,r,a,s,c,u){let f=Math.abs(o[t]-e[t]);if(f>n)return;let g=Math.min(n-1,n-f);g<=0||(i[t]===r?c[t]=(a[t]>o[t]?-1:1)*g:u[t]=(s[t]>e[t]?-1:1)*g)}function B7(t,o,e,n,i,r,a){let s=t==="x"?"y":"x",c=o[t]===e[s],u=n[s]>i[s],f=n[s]<i[s];return o[t]===1&&(!c&&u||c&&f)||o[t]!==1&&(!c&&f||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var xr=1e-6,ry=2e-4,V7=.75;function z7(t,o){let e=t.length,n=[];n.push(`M ${t[0].x} ${t[0].y}`);for(let r=1;r<e-1;r++)n.push(H7(t[r-1],t[r],t[r+1],o));let i=t[e-1];return n.push(`L ${i.x+ry} ${i.y+ry}`),n.join(" ")}function H7(t,o,e,n){let i=o.x,r=o.y;if(n<=0)return`L ${i} ${r}`;let a=Math.abs(t.x-i)<=xr&&Math.abs(i-e.x)<=xr,s=Math.abs(t.y-r)<=xr&&Math.abs(r-e.y)<=xr;if(a||s)return`L ${i} ${r}`;let c=Math.hypot(i-t.x,r-t.y),u=Math.hypot(e.x-i,e.y-r),f=Math.min(c*.5,u*.5,n);if(f<V7)return`L ${i} ${r}`;if(Math.abs(t.y-r)<=xr){let j=t.x<e.x?-1:1,Z=t.y<e.y?1:-1,ne=i+f*j,pe=r+f*Z;return`L ${ne} ${r} Q ${i} ${r} ${i} ${pe}`}let x=t.x<e.x?1:-1,I=t.y<e.y?-1:1,S=r+f*I,N=i+f*x;return`L ${i} ${S} Q ${i} ${r} ${N} ${r}`}var ay={[K.LEFT]:U.initialize(-1,0),[K.RIGHT]:U.initialize(1,0),[K.TOP]:U.initialize(0,-1),[K.BOTTOM]:U.initialize(0,1),[K.AUTO]:U.initialize(0,0)},Pm=class{handle({source:o,sourceSide:e,target:n,targetSide:i,waypoints:r,offset:a,radius:s}){let c=Sh(o,n,r),u=[],f=[];for(let S=0;S<c.length-1;S++){let N=c[S],j=c[S+1],Z=this._getPathPoints(N,e,j,i,a??0);u.push(Z),f.push(...M7(Z))}let g=O7(R7(u)),x=g.length>1?g[g.length-2]:o,I=g.length>1?g[1]:n;return{path:z7(g,s??0),penultimatePoint:x,secondPoint:I,points:g,candidates:f}}_getPathPoints(o,e,n,i,r){let a=ay[e],s=ay[i],c={x:o.x+a.x*r,y:o.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},f=this._getDirection(c,e,u),g=f.x!==0?"x":"y",x=f[g],I=[],S=U.initialize(),N=U.initialize(),j=I7(o,n);if(a[g]*s[g]===-1){let Z=[{x:j.x,y:c.y},{x:j.x,y:u.y}],ne=[{x:c.x,y:j.y},{x:u.x,y:j.y}];a[g]===x?I=g==="x"?Z:ne:I=g==="x"?ne:Z}else I=F7({axis:g,source:o,target:n,sourceSide:e,targetSide:i,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:x,offset:r,sourceGapOffset:S,targetGapOffset:N});return[o,{x:c.x+S.x,y:c.y+S.y},...I,{x:u.x+N.x,y:u.y+N.y},n]}_getDirection(o,e,n){return e===K.LEFT||e===K.RIGHT?o.x<n.x?U.initialize(1,0):U.initialize(-1,0):o.y<n.y?U.initialize(0,1):U.initialize(0,-1)}},sy=2e-4,Rm=class{handle(o){let e=Sh(o.source,o.target,o.waypoints),n=e.length,i=e[0],r=`M ${i.x} ${i.y}`,a=new Array(n-1);for(let s=0;s<n-1;s++){let c=e[s],u=e[s+1],f=s===n-2,g=f?u.x+sy:u.x,x=f?u.y+sy:u.y;r+=` L ${g} ${x}`,a[s]={x:(c.x+u.x)*.5,y:(c.y+u.y)*.5}}return{path:r,candidates:a,points:e,secondPoint:e[1]??o.target,penultimatePoint:e[n-2]??o.source}}},q7=new he("F_CONNECTION_BUILDERS"),Vy=(()=>{class t{_builtinBuilders={[To.STRAIGHT]:new Rm,[To.BEZIER]:new Dm,[To.ADAPTIVE_CURVE]:new Mm,[To.SEGMENT]:new Pm};_providedBuilders;_builders;constructor(){this._providedBuilders=p(q7,{optional:!0})||{},this._builders=be(be({},this._builtinBuilders),this._providedBuilders)}handle({type:e,payload:n}){let i=this._builders[e];if(!i)throw this._createBuilderNotFoundError(e);return i.handle(n)}_createBuilderNotFoundError(e){let n=Object.keys(this._builtinBuilders).sort(),i=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: ${i.length?i.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(`
1930
+ `))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function G7(t,o,e){return qn("connection_"+t+o+e)}function j7(t,o,e){return qn("connection_for_selection_"+t+o+e)}function zy(t){return qn("connection_gradient_"+t)}function U7(t){return`url(#${zy(t)})`}var $7=(()=>{class t{_connection=p(Th);_hostElement=p(Xe).nativeElement;_injector=p(mt);_hostAttributes=new Map;_startColor;_endColor;gradientId=E(()=>zy(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){_e(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),an(()=>{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,i=e.point2.y-e.point1.y,r=Math.sqrt(n*n+i*i)||.01,a=new me(.5-.5*n/r,.5-.5*i/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new me(.5+.5*n/r,.5+.5*i/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=Ue({type:t,standalone:!1})}return t})(),Om=(()=>{class t extends $7{gradient=B.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["linearGradient","fConnectionGradientRenderer",""]],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.gradientId())},inputs:{gradient:[1,"fConnectionGradientRendererFor","gradient"]},features:[Y],attrs:bA,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,i){n&1&&(Ya(0,0),$(),ae(1,"stop",1)(2,"stop",2),Za())},encapsulation:2,changeDetection:0})}return t})(),ly=new he("F_CONNECTION_GRADIENT");var Fm=new he("F_CONNECTION_PATH"),Nm=class{hostElement=p(Xe).nativeElement},W7=(()=>{class t extends Nm{_connection=p(Th);useGradient=B(!1);linkToGradient=E(()=>this.useGradient()?U7(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return G7(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(#${Z7(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${X7(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${K7(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${Y7(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["path","f-connection-path",""]],hostAttrs:[1,"f-component","f-connection-path"],hostVars:4,hostBindings:function(n,i){n&2&&(O("id",i.attrConnectionId)("data-f-path-id",i.fPathId),He("stroke",i.linkToGradient()))},inputs:{useGradient:[1,"useGradient"]},standalone:!1,features:[ve([{provide:Fm,useExisting:t}]),Y],attrs:vA,decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function K7(t){return qn(`f-connection-marker-start-${t}`)}function Y7(t){return qn(`f-connection-marker-end-${t}`)}function Z7(t){return qn(`f-connection-selected-marker-start-${t}`)}function X7(t){return qn(`f-connection-selected-marker-end-${t}`)}var Am=new he("F_CONNECTION_SELECTION"),Lm=class{hostElement=p(Xe).nativeElement},Q7=(()=>{class t extends Lm{_connection=p(Th);get connectionForSelectionId(){return j7(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}setPath(e){this.hostElement.setAttribute("d",`${e}`)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["path","fConnectionSelection",""]],hostAttrs:[1,"f-component","f-connection-selection"],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.connectionForSelectionId)},standalone:!1,features:[ve([{provide:Am,useExisting:t}]),Y],attrs:yA,decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),Bm=new he("F_CONNECTION_DRAG_HANDLE_END"),Vm=new he("F_CONNECTION_DRAG_HANDLE_START"),cu=class{hostElement=p(Xe).nativeElement;point=U.initialize();class="f-connection-drag-handle";calculateCircleCenter(o,e,n){let i={x:e.x-o.x,y:e.y-o.y},r=Math.sqrt(i.x*i.x+i.y*i.y)||1,a={x:i.x/r,y:i.y/r},s={x:a.x*n,y:a.y*n};return{x:e.x-s.x,y:e.y-s.y}}},J7=(()=>{class t extends cu{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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,i){n&2&&z(i.class)},standalone:!1,features:[ve([{provide:Vm,useExisting:t}]),Y],attrs:CA,decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})(),eL=(()=>{class t extends cu{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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,i){n&2&&z(i.class)},standalone:!1,features:[ve([{provide:Bm,useExisting:t}]),Y],attrs:xA,decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})(),hm="f-selected";function Hy(t){return class extends t{fId=te("");fSelectionDisabled=te(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(hm)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(hm)}isSelected(){return this.hostElement.classList.contains(hm)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...o){super(...o)}}}function tL(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...o){super(...o)}}}var nL=Hy(tL(class{hostElement;constructor(t){this.hostElement=t}})),iL=(()=>{class t extends nL{_fConnectionBuilder=p(Vy);path="";line=yr.initialize();fReassignableStart=te(!1);fDraggingDisabled=te(!1);fSelectionDisabled=te(!1);fDefs=it.required("defs");fPath=it.required(Fm);fDragHandleStart=it(Vm);fDragHandleEnd=it.required(Bm);fSelection=it.required(Am);fContents=Pf(ty,{descendants:!0});fMarkers=Pf(su,{descendants:!0});fGradient=Qa(ly);_fGradientRenderer=it(Om);fWaypoints=Qa(ny);fInputSide=te(Ke.DEFAULT);_contentLayoutEngine=new Em;_sourceSide=K.AUTO;fOutputSide=te(Ke.DEFAULT);_targetSide=K.AUTO;_penultimatePoint=U.initialize();_secondPoint=U.initialize();constructor(){super(p(Xe).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=yr.initialize(e,n);let{path:i,points:r,penultimatePoint:a,secondPoint:s,candidates:c}=this._getPathResult(e,n);this.path=i,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=Ue({type:t,contentQueries:function(n,i,r){n&1&&kf(r,i.fContents,ty,5)(r,i.fMarkers,su,5)(r,i.fGradient,ly,5)(r,i.fWaypoints,ny,5),n&2&&Kt(4)},viewQuery:function(n,i){n&1&&vn(i.fDefs,wA,5)(i.fPath,Fm,5)(i.fDragHandleStart,Vm,5)(i.fDragHandleEnd,Bm,5)(i.fSelection,Am,5)(i._fGradientRenderer,Om,5),n&2&&Kt(6)},standalone:!1,features:[Y]})}return t})(),oL=(()=>{let t=class Ws{_browser=p(ut);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),i=e.fDefs();if(!i)return!1;let r=rL(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===i.nativeElement)return!1;let s=Gy("defs",this._browser);return n.forEach(c=>{qy(c.type).forEach(u=>{let f=aL(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",f.append(g),s.append(f)})}),i.nativeElement.innerHTML=s.innerHTML,this._markerCache.set(e,{signature:r,defsElement:i.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||Ws)};static \u0275prov=y({token:Ws,factory:Ws.\u0275fac})};return t=P([R(Do)],t),t})();function rL(t){return t.map(o=>[...qy(o.type),o.width,o.height,o.refX,o.refY,o.orient,o.markerUnits,o.markerElement.outerHTML].join("|")).join("||")}function aL(t,o,e,n){let i=Gy("marker",n);return i.setAttribute("id",qn(t+"-"+e)),i.setAttribute("markerHeight",`${o.height}`),i.setAttribute("markerWidth",`${o.width}`),i.setAttribute("orient",`${o.orient}`),i.setAttribute("refX",`${o.refX}`),i.setAttribute("refY",`${o.refY}`),i.setAttribute("markerUnits",`${o.markerUnits}`),i}function qy(t){switch(t){case ze.START:return[ze.START];case ze.END:return[ze.END];case ze.SELECTED_START:return[ze.SELECTED_START];case ze.SELECTED_END:return[ze.SELECTED_END];case ze.START_ALL_STATES:return[ze.START,ze.SELECTED_START];case ze.END_ALL_STATES:return[ze.END,ze.SELECTED_END];default:return[]}}function Gy(t,o){return o.document.createElementNS("http://www.w3.org/2000/svg",t)}var kh=(()=>{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})(),sL=String.raw`
1931
+ const EPSILON = 0.5;
1932
+
1933
+ addEventListener('message', (event) => {
1934
+ const data = event?.data;
1935
+ const requestId = data?.requestId;
1936
+ const items = Array.isArray(data?.items) ? data.items : [];
1937
+
1938
+ try {
1939
+ const results = items.map((item) => calculateItem(item));
1940
+ postMessage({ requestId, results });
1941
+ } catch (error) {
1942
+ const message = error instanceof Error ? error.message : 'Connection worker failed.';
1943
+ postMessage({ requestId, error: message });
1944
+ }
1945
+ });
1946
+
1947
+ function calculateItem(item) {
1948
+ const sourceCenterX = item.sourceRect.x + item.sourceRect.width / 2;
1949
+ const sourceCenterY = item.sourceRect.y + item.sourceRect.height / 2;
1950
+ const targetCenterX = item.targetRect.x + item.targetRect.width / 2;
1951
+ const targetCenterY = item.targetRect.y + item.targetRect.height / 2;
1952
+
1953
+ const sourceSide = resolveConnectableSide(
1954
+ item.outputSide,
1955
+ targetCenterX - sourceCenterX,
1956
+ targetCenterY - sourceCenterY,
1957
+ item.sourceConnectableSide,
1958
+ );
1959
+
1960
+ const targetSide = resolveConnectableSide(
1961
+ item.inputSide,
1962
+ sourceCenterX - targetCenterX,
1963
+ sourceCenterY - targetCenterY,
1964
+ item.targetConnectableSide,
1965
+ );
1966
+
1967
+ if (item.behavior === 'fixed_center') {
1968
+ return {
1969
+ originalIndex: item.originalIndex,
1970
+ supported: true,
1971
+ sourceSide,
1972
+ targetSide,
1973
+ line: {
1974
+ point1: { x: sourceCenterX, y: sourceCenterY },
1975
+ point2: { x: targetCenterX, y: targetCenterY },
1976
+ },
1977
+ };
1978
+ }
1979
+
1980
+ if (item.sourceRotation || item.targetRotation) {
1981
+ return { originalIndex: item.originalIndex, supported: false };
1982
+ }
1983
+
1984
+ if (item.behavior !== 'fixed') {
1985
+ if (item.behavior !== 'floating') {
1986
+ return { originalIndex: item.originalIndex, supported: false };
1987
+ }
1988
+
1989
+ if (hasRoundedCorners(item.sourceRect) || hasRoundedCorners(item.targetRect)) {
1990
+ return { originalIndex: item.originalIndex, supported: false };
1991
+ }
1992
+
1993
+ return {
1994
+ originalIndex: item.originalIndex,
1995
+ supported: true,
1996
+ sourceSide,
1997
+ targetSide,
1998
+ line: buildFloatingLine(item.sourceRect, item.targetRect),
1999
+ };
2000
+ }
2001
+
2002
+ const line = buildFixedLine(item.sourceRect, item.targetRect, sourceSide, targetSide);
2003
+ if (!line) {
2004
+ return { originalIndex: item.originalIndex, supported: false };
2005
+ }
2006
+
2007
+ return {
2008
+ originalIndex: item.originalIndex,
2009
+ supported: true,
2010
+ sourceSide,
2011
+ targetSide,
2012
+ line,
2013
+ };
2014
+ }
2015
+
2016
+ function resolveConnectableSide(requestedSide, deltaX, deltaY, fallbackSide) {
2017
+ if (requestedSide === 'default') {
2018
+ return fallbackSide;
2019
+ }
2020
+
2021
+ const absX = Math.abs(deltaX);
2022
+ const absY = Math.abs(deltaY);
2023
+ const nearZero = absX < EPSILON && absY < EPSILON;
2024
+
2025
+ if (nearZero) {
2026
+ return fallbackSide;
2027
+ }
2028
+
2029
+ const horizontalDominant = absX >= absY;
2030
+
2031
+ switch (requestedSide) {
2032
+ case 'calculate':
2033
+ return horizontalDominant ? (deltaX >= 0 ? 'right' : 'left') : deltaY >= 0 ? 'bottom' : 'top';
2034
+
2035
+ case 'calculate_horizontal':
2036
+ if (absX < EPSILON) {
2037
+ return fallbackSide;
2038
+ }
2039
+
2040
+ return deltaX >= 0 ? 'right' : 'left';
2041
+
2042
+ case 'calculate_vertical':
2043
+ if (absY < EPSILON) {
2044
+ return fallbackSide;
2045
+ }
2046
+
2047
+ return deltaY >= 0 ? 'bottom' : 'top';
2048
+
2049
+ case 'top':
2050
+ case 'bottom':
2051
+ case 'left':
2052
+ case 'right':
2053
+ return requestedSide;
2054
+
2055
+ default:
2056
+ return fallbackSide;
2057
+ }
2058
+ }
2059
+
2060
+ function buildFixedLine(sourceRect, targetRect, sourceSide, targetSide) {
2061
+ const sourceAnchor = sourceSide === 'auto' ? 'bottom' : sourceSide;
2062
+ const targetAnchor = targetSide === 'auto' ? 'top' : targetSide;
2063
+
2064
+ const point1 = getSidePoint(sourceRect, sourceAnchor);
2065
+ const point2 = getSidePoint(targetRect, targetAnchor);
2066
+
2067
+ if (!point1 || !point2) {
2068
+ return null;
2069
+ }
2070
+
2071
+ return { point1, point2 };
2072
+ }
2073
+
2074
+ function buildFloatingLine(sourceRect, targetRect) {
2075
+ const sourceCenter = getRectCenter(sourceRect);
2076
+ const targetCenter = getRectCenter(targetRect);
2077
+
2078
+ return {
2079
+ point1: getRectBorderIntersection(sourceRect, sourceCenter, targetCenter),
2080
+ point2: getRectBorderIntersection(targetRect, targetCenter, sourceCenter),
2081
+ };
2082
+ }
2083
+
2084
+ function hasRoundedCorners(rect) {
2085
+ return !!(rect.radius1 || rect.radius2 || rect.radius3 || rect.radius4);
2086
+ }
2087
+
2088
+ function getRectCenter(rect) {
2089
+ return {
2090
+ x: rect.x + rect.width / 2,
2091
+ y: rect.y + rect.height / 2,
2092
+ };
2093
+ }
2094
+
2095
+ function getRectBorderIntersection(rect, from, to) {
2096
+ const halfWidth = rect.width / 2;
2097
+ const halfHeight = rect.height / 2;
2098
+ const center = getRectCenter(rect);
2099
+
2100
+ const dx = to.x - from.x;
2101
+ const dy = to.y - from.y;
2102
+
2103
+ if (Math.abs(dx) < EPSILON && Math.abs(dy) < EPSILON) {
2104
+ return center;
2105
+ }
2106
+
2107
+ const scaleX = Math.abs(dx) < EPSILON ? Number.POSITIVE_INFINITY : halfWidth / Math.abs(dx);
2108
+ const scaleY = Math.abs(dy) < EPSILON ? Number.POSITIVE_INFINITY : halfHeight / Math.abs(dy);
2109
+ const scale = Math.min(scaleX, scaleY);
2110
+
2111
+ return {
2112
+ x: center.x + dx * scale,
2113
+ y: center.y + dy * scale,
2114
+ };
2115
+ }
2116
+
2117
+ function getSidePoint(rect, side) {
2118
+ const centerX = rect.x + rect.width / 2;
2119
+ const centerY = rect.y + rect.height / 2;
2120
+
2121
+ switch (side) {
2122
+ case 'top':
2123
+ return { x: centerX, y: rect.y };
2124
+
2125
+ case 'right':
2126
+ return { x: rect.x + rect.width, y: centerY };
2127
+
2128
+ case 'bottom':
2129
+ return { x: centerX, y: rect.y + rect.height };
2130
+
2131
+ case 'left':
2132
+ return { x: rect.x, y: centerY };
2133
+
2134
+ default:
2135
+ return null;
2136
+ }
2137
+ }
2138
+ `.trim();function jy(t){return!!Uy(t)}function Uy(t){let o=t,e=o?.Blob,n=o?.Worker,i=o?.URL;return!e||!n||typeof i?.createObjectURL!="function"||typeof i.revokeObjectURL!="function"?null:{blobCtor:e,workerCtor:n,urlApi:i}}function lL(t){let o=new t.blobCtor([sL],{type:"text/javascript"});return t.urlApi.createObjectURL(o)}function $y(t,o){if(!t)return;let e=o??(typeof URL>"u"?null:URL);typeof e?.revokeObjectURL=="function"&&e.revokeObjectURL(t)}var Wi=(()=>{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,$y(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})(),du=class{connection;line;static fToken=Symbol("ApplyConnectionRenderRequest");constructor(o,e){this.connection=o,this.line=e}},cL=(()=>{let t=class Ks{_mediator=p(V);_renderCache=new WeakMap;handle({connection:e,line:n}){!this._mediator.execute(new Do(e))&&!this._shouldRender(e,n)||(e.setLine(n),e.initialize())}_shouldRender(e,n){let i=e.fPath().hostElement,r=this._createConnectionRenderSignature(e,n),a=this._renderCache.get(e);return a?.signature===r&&a.pathElement===i?!1:(this._renderCache.set(e,{signature:r,pathElement:i}),!0)}_createConnectionRenderSignature(e,n){let{sourceSide:i,targetSide:r}=e.getResolvedSides();return[e.fBehavior,e.fType,e.fRadius,e.fOffset,e.fReassignableStart(),this._serializeContents([...e.fContents()||[]]),i,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||Ks)};static \u0275prov=y({token:Ks,factory:Ks.\u0275fac})};return t=P([R(du)],t),t})(),uu=class{source;target;static fToken=Symbol("MarkConnectionConnectorsAsConnectedRequest");constructor(o,e){this.source=o,this.target=e}},dL=(()=>{let t=class Ys{_state=p(kh);handle({source:e,target:n}){e.setConnected(n),n.setConnected(e),this._state.trackConnectedConnectors(e,n)}static \u0275fac=function(n){return new(n||Ys)};static \u0275prov=y({token:Ys,factory:Ys.\u0275fac})};return t=P([R(uu)],t),t})(),ui=class{element;cache;static fToken=Symbol("GetNormalizedConnectorRectRequest");constructor(o,e=!0){this.element=o,this.cache=e}},uL={enabled:!1},Rn=new he("F_CACHE_OPTIONS",{providedIn:"root",factory:()=>be({},uL)});var pu=class{id;nodeId;kind;element;static fToken=Symbol("RegisterFCacheConnectorRequest");constructor(o,e,n,i){this.id=o,this.nodeId=e,this.kind=n,this.element=i}},On=(()=>{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})(),zm=class{key;id;kind;nodeId;element;rect;constructor(o,e,n,i,r,a){this.key=o,this.id=e,this.kind=n,this.nodeId=i,this.element=r,this.rect=a}},Sr=class{static build(o,e){return`${o}:${e}`}},Hm=class{id;element;reference;rect;constructor(o,e,n,i){this.id=o,this.element=e,this.reference=n,this.rect=i}},Po=class{nodeId;reason;static fToken=Symbol("InvalidateFCacheNodeRequest");constructor(o,e="manual"){this.nodeId=o,this.reason=e}},pL=(()=>{let t=class Zs{_store=p(On);_options=p(Rn);handle({nodeId:e,reason:n}){if(!this._options.enabled)return;let i=this._store.nodeEntries.get(e);if(!i)return;i.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||Zs)};static \u0275prov=y({token:Zs,factory:Zs.\u0275fac})};return t=P([R(Po)],t),t})(),hu=class{id;element;reference;static fToken=Symbol("RegisterFCacheNodeRequest");constructor(o,e,n){this.id=o,this.element=e,this.reference=n}},hL=(()=>{let t=class Xs{_store=p(On);_options=p(Rn);handle({id:e,element:n,reference:i}){if(!this._options.enabled)return;let r=new Hm(e,n,i);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||Xs)};static \u0275prov=y({token:Xs,factory:Xs.\u0275fac})};return t=P([R(hu)],t),t})(),fu=class{id;static fToken=Symbol("UnregisterFCacheNodeRequest");constructor(o){this.id=o}},fL=(()=>{let t=class Qs{_store=p(On);_mediator=p(V);_options=p(Rn);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 i=Array.from(this._store.connectorKeysByNodeId.get(e)??[]);for(let r of i){let a=this._store.connectorEntries.get(r);a&&this._mediator.execute(new kr(a.id,a.kind))}this._store.connectorKeysByNodeId.delete(e)}static \u0275fac=function(n){return new(n||Qs)};static \u0275prov=y({token:Qs,factory:Qs.\u0275fac})};return t=P([R(fu)],t),t})(),mL=(()=>{let t=class Js{_store=p(On);_mediator=p(V);_options=p(Rn);handle({id:e,nodeId:n,kind:i,element:r}){if(!this._options.enabled)return;let a=Sr.build(e,i),s=this._store.connectorEntries.get(a);s&&(this._detachConnectorFromNode(s.key,s.nodeId),this._store.connectorKeyByElement.delete(s.element));let c=new zm(a,e,i,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 Po(n,"connector-registered"))}_detachConnectorFromNode(e,n){let i=this._store.connectorKeysByNodeId.get(n);i&&(i.delete(e),i.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||Js)};static \u0275prov=y({token:Js,factory:Js.\u0275fac})};return t=P([R(pu)],t),t})(),kr=class{connectorId;kind;static fToken=Symbol("UnregisterFCacheConnectorRequest");constructor(o,e){this.connectorId=o,this.kind=e}},_L=(()=>{let t=class el{_store=p(On);_mediator=p(V);_options=p(Rn);handle({connectorId:e,kind:n}){if(!this._options.enabled)return;let i=Sr.build(e,n),r=this._store.connectorEntries.get(i);r&&(this._store.connectorEntries.delete(i),this._store.connectorKeyByElement.delete(r.element),this._detachConnectorFromNode(i,r.nodeId),this._store.nodeEntries.has(r.nodeId)&&this._mediator.execute(new Po(r.nodeId,"connector-unregistered")))}_detachConnectorFromNode(e,n){let i=this._store.connectorKeysByNodeId.get(n);i&&(i.delete(e),i.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||el)};static \u0275prov=y({token:el,factory:el.\u0275fac})};return t=P([R(kr)],t),t})(),Ro=class{element;static fToken=Symbol("GetCachedFCacheRectRequest");constructor(o){this.element=o}},gL=(()=>{let t=class tl{_store=p(On);_options=p(Rn);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 i=this._store.connectorKeyByElement.get(e);if(i)return this._store.connectorEntries.get(i)?.rect??void 0}static \u0275fac=function(n){return new(n||tl)};static \u0275prov=y({token:tl,factory:tl.\u0275fac})};return t=P([R(Ro)],t),t})(),zi=class{connectorId;kind;rect;static fToken=Symbol("SetFCacheConnectorRectRequest");constructor(o,e,n){this.connectorId=o,this.kind=e,this.rect=n}},bL=(()=>{let t=class nl{_store=p(On);_options=p(Rn);handle({connectorId:e,kind:n,rect:i}){if(!this._options.enabled)return;let r=Sr.build(e,n),a=this._store.connectorEntries.get(r);a&&(a.rect=dt.fromRoundedRect(i))}static \u0275fac=function(n){return new(n||nl)};static \u0275prov=y({token:nl,factory:nl.\u0275fac})};return t=P([R(zi)],t),t})(),Hi=class{nodeId;rect;static fToken=Symbol("SetFCacheNodeRectRequest");constructor(o,e){this.nodeId=o,this.rect=e}},vL=(()=>{let t=class il{_store=p(On);_options=p(Rn);handle({nodeId:e,rect:n}){if(!this._options.enabled)return;let i=this._store.nodeEntries.get(e);if(!i)return;let r=i.rect;i.rect=oe.initialize(n.x,n.y,n.width,n.height),r&&this._updateConnectorRectsByNodeRect(e,r,i.rect)}_updateConnectorRectsByNodeRect(e,n,i){let r=this._store.connectorKeysByNodeId.get(e);if(!r?.size)return;let a=i.x-n.x,s=i.y-n.y,c=n.width!==0,u=n.height!==0,f=c?i.width/n.width:1,g=u?i.height/n.height:1;for(let x of r){let I=this._store.connectorEntries.get(x);if(!I?.rect)continue;let S=I.rect,N=S.gravityCenter,j=c?i.x+(N.x-n.x)*f:N.x+a,Z=u?i.y+(N.y-n.y)*g:N.y+s;I.rect=new dt(j-S.width/2,Z-S.height/2,S.width,S.height,S.radius1,S.radius2,S.radius3,S.radius4)}}static \u0275fac=function(n){return new(n||il)};static \u0275prov=y({token:il,factory:il.\u0275fac})};return t=P([R(Hi)],t),t})(),Ir=class{element;rect;static fToken=Symbol("UpdateFCacheRectByElementRequest");constructor(o,e){this.element=o,this.rect=e}},yL=(()=>{let t=class ol{_store=p(On);_options=p(Rn);handle({element:e,rect:n}){if(!this._options.enabled)return;let i=this._store.nodeIdByElement.get(e);if(i){let s=this._store.nodeEntries.get(i);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||ol)};static \u0275prov=y({token:ol,factory:ol.\u0275fac})};return t=P([R(Ir)],t),t})(),CL=[On,hL,fL,pL,mL,_L,gL,vL,bL,yL];function Go(t,o,e){return o?me.fromPoint(t).elementTransform(o).sub(e.scaledPosition).sub(e.position).div(e.scale):me.fromPoint(t)}function Wy(){return{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}}function Oo(t){return t?`${t}`:void 0}var xL=(()=>{let t=class rl{_store=p(L);_mediator=p(V);_browser=p(ut);get _transform(){return this._store.transform}handle({element:e,cache:n}){let i=this._mediator.execute(new Ro(e));if(i&&n)return i;let r=this._getElementRoundedRect(e),a=this._normalizePosition(r),s=this._unscaleSize(r),c=this._getUnscaledRect(a,s,r),u=this._getOffsetSize(e,s),f=dt.fromCenter(c,u.width,u.height);return this._mediator.execute(new Ir(e,f)),f}_getElementRoundedRect(e){return this._getRoundedRect(oe.fromElement(e),e,this._getComputedStyle(e))}_getRoundedRect(e,n,i){let[r,a,s,c]=this._normalizeCircularBorderRadii(e.width,e.height,[this._getSystemRadius(i.borderTopLeftRadius,n,i.fontSize),this._getSystemRadius(i.borderTopRightRadius,n,i.fontSize),this._getSystemRadius(i.borderBottomRightRadius,n,i.fontSize),this._getSystemRadius(i.borderBottomLeftRadius,n,i.fontSize)]);return new dt(e.x,e.y,e.width,e.height,r,a,s,c)}_getComputedStyle(e){return this._browser.window.getComputedStyle(e)}_toPixels(e,n,i){return this._browser.toPixels(e,n.clientWidth,n.clientHeight,i)||0}_getSystemRadius(e,n,i){return this._toPixels(e,n,i)*this._transform.scale}_normalizeCircularBorderRadii(e,n,i){let[r,a,s,c]=i.map(f=>Math.max(0,f)),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 Go(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Ft.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n,i){return new dt(e.x,e.y,n.width,n.height,this._unscaleRadius(i.radius1),this._unscaleRadius(i.radius2),this._unscaleRadius(i.radius3),this._unscaleRadius(i.radius4))}_unscaleRadius(e){return e/this._transform.scale}_getOffsetSize(e,n){return Ft.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||rl)};static \u0275prov=y({token:rl,factory:rl.\u0275fac})};return t=P([R(ui)],t),t})(),mu=class{connector;cache;static fToken=Symbol("ResolveConnectionEndpointRectRequest");constructor(o,e){this.connector=o,this.cache=e}},wL=(()=>{let t=class al{_mediator=p(V);handle({connector:e,cache:n}){let i=this._buildCacheKey(e),r=n.get(i)??this._calculateRect(e);return n.set(i,r),r}_buildCacheKey(e){return`${e.kind}::${e.fId()}`}_calculateRect(e){return this._mediator.execute(new ui(e.hostElement))}static \u0275fac=function(n){return new(n||al)};static \u0275prov=y({token:al,factory:al.\u0275fac})};return t=P([R(mu)],t),t})(),_u=class{connection;static fToken=Symbol("ResolveConnectionEndpointsRequest");constructor(o){this.connection=o}},TL=(()=>{let t=class sl{_store=p(L);handle({connection:e}){let n=this._store.outputs.get(e.fOutputId()),i=this._store.inputs.get(e.fInputId());return!n||!i?null:{source:n,target:i}}static \u0275fac=function(n){return new(n||sl)};static \u0275prov=y({token:sl,factory:sl.\u0275fac})};return t=P([R(_u)],t),t})(),Er=class{connection;cache;static fToken=Symbol("ResolveConnectionGeometryRequest");constructor(o,e){this.connection=o,this.cache=e}},SL=(()=>{let t=class ll{_mediator=p(V);handle({connection:e,cache:n}){let i=this._resolveConnectionEndpoints(e);return i?Wt(be({},i),{sourceRect:this._resolveEndpointRect(i.source,n),targetRect:this._resolveEndpointRect(i.target,n)}):null}_resolveConnectionEndpoints(e){return this._mediator.execute(new _u(e))}_resolveEndpointRect(e,n){return this._mediator.execute(new mu(e,n))}static \u0275fac=function(n){return new(n||ll)};static \u0275prov=y({token:ll,factory:ll.\u0275fac})};return t=P([R(Er)],t),t})(),ot=class{element;static fToken=Symbol("GetNormalizedElementRectRequest");constructor(o){this.element=o}},kL=(()=>{let t=class cl{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({element:e}){let n=this._mediator.execute(new Ro(e));if(n)return n;let i=oe.fromElement(e),r=this._normalizePosition(i),a=this._unscaleSize(i),s=this._getUnscaledRect(r,a),c=this._getOffsetSize(e,a),u=this._fromCenter(s,c.width,c.height);return this._mediator.execute(new Ir(e,u)),u}_fromCenter(e,n,i){return oe.initialize(e.gravityCenter.x-n/2,e.gravityCenter.y-i/2,n,i)}_normalizePosition(e){return Go(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Ft.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n){return new dt(e.x,e.y,n.width,n.height)}_getOffsetSize(e,n){return Ft.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||cl)};static \u0275prov=y({token:cl,factory:cl.\u0275fac})};return t=P([R(ot)],t),t})(),Gn=class{connector;static fToken=Symbol("ResolveConnectionEndpointRotationContextRequest");constructor(o){this.connector=o}},IL=(()=>{let t=class dl{_store=p(L);_mediator=p(V);handle({connector:e}){if(!e)return;let n=this._store.nodes.get(e.fNodeId);if(!n||!n._rotate)return;let i=this._mediator.execute(new ot(n.hostElement));return{rotationDeg:n._rotate,pivot:i.gravityCenter}}static \u0275fac=function(n){return new(n||dl)};static \u0275prov=y({token:dl,factory:dl.\u0275fac})};return t=P([R(Gn)],t),t})(),gu=class{connection;geometry;static fToken=Symbol("BuildConnectionLineRequest");constructor(o,e){this.connection=o,this.geometry=e}},EL=(()=>{let t=class ul{_mediator=p(V);_connectionBehaviour=p(qo);handle({connection:e,geometry:n}){return this._connectionBehaviour.handle(new wn(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 Gn(e))}static \u0275fac=function(n){return new(n||ul)};static \u0275prov=y({token:ul,factory:ul.\u0275fac})};return t=P([R(gu)],t),t})(),Mr=class{connection;source;target;line;static fToken=Symbol("RenderConnectionWithLineRequest");constructor(o,e,n,i){this.connection=o,this.source=e,this.target=n,this.line=i}},ML=(()=>{let t=class pl{_mediator=p(V);handle({connection:e,source:n,target:i,line:r}){this._mediator.execute(new uu(n,i)),this._mediator.execute(new du(e,r))}static \u0275fac=function(n){return new(n||pl)};static \u0275prov=y({token:pl,factory:pl.\u0275fac})};return t=P([R(Mr)],t),t})(),Dr=class{connection;geometry;static fToken=Symbol("RenderConnectionFromGeometryRequest");constructor(o,e){this.connection=o,this.geometry=e}},DL=(()=>{let t=class hl{_mediator=p(V);handle({connection:e,geometry:n}){let i=this._mediator.execute(new gu(e,n));this._mediator.execute(new Mr(e,n.source,n.target,i))}static \u0275fac=function(n){return new(n||hl)};static \u0275prov=y({token:hl,factory:hl.\u0275fac})};return t=P([R(Dr)],t),t})(),bu=class{connection;cache;static fToken=Symbol("RenderConnectionRequest");constructor(o,e){this.connection=o,this.cache=e}},PL=(()=>{let t=class fl{_mediator=p(V);handle({connection:e,cache:n}){let i=this._mediator.execute(new Er(e,n));i&&this._mediator.execute(new Dr(e,i))}static \u0275fac=function(n){return new(n||fl)};static \u0275prov=y({token:fl,factory:fl.\u0275fac})};return t=P([R(bu)],t),t})(),qi=class{session;static fToken=Symbol("IsConnectionRedrawCurrentRequest");constructor(o){this.session=o}},RL=(()=>{let t=class ml{_store=p(L);_state=p(kh);handle({session:e}){return e.renderTicket===this._state.renderTicket&&e.nodesRevision===this._store.nodesRevision}static \u0275fac=function(n){return new(n||ml)};static \u0275prov=y({token:ml,factory:ml.\u0275fac})};return t=P([R(qi)],t),t})(),Pr=class{session;static fToken=Symbol("CompleteConnectionRedrawRequest");constructor(o){this.session=o}},OL=(()=>{let t=class _l{_mediator=p(V);_store=p(L);handle({session:e}){this._mediator.execute(new qi(e))&&this._store.completeConnectionsRender(e.connectionsRevision,e.nodesRevision)}static \u0275fac=function(n){return new(n||_l)};static \u0275prov=y({token:_l,factory:_l.\u0275fac})};return t=P([R(Pr)],t),t})(),vu=class{batchItem;result;static fToken=Symbol("ApplyConnectionWorkerResultRequest");constructor(o,e){this.batchItem=o,this.result=e}},FL=(()=>{let t=class gl{_mediator=p(V);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 Mr(e.connection,e.geometry.source,e.geometry.target,n.line))}catch{this._fallbackToMainThread(e)}}}_fallbackToMainThread(e){this._mediator.execute(new Dr(e.connection,e.geometry))}_isSupportedWorkerResult(e){return!!(e?.supported&&e.sourceSide&&e.targetSide&&e.line)}static \u0275fac=function(n){return new(n||gl)};static \u0275prov=y({token:gl,factory:gl.\u0275fac})};return t=P([R(vu)],t),t})(),si=class{connections;cache;startIndex;session;batchItems;workerResults;static fToken=Symbol("RunConnectionRedrawSliceRequest");constructor(o,e,n,i,r,a){this.connections=o,this.cache=e,this.startIndex=n,this.session=i,this.batchItems=r,this.workerResults=a}},NL=500,AL=6,LL=(()=>{let t=class bl{_mediator=p(V);_browser=p(ut);handle({connections:e,cache:n,startIndex:i,session:r,batchItems:a,workerResults:s}){if(!this._isCurrent(r))return;let c=this._now(),u=i,f=0;for(;u<e.length&&f<NL&&this._isWithinSliceBudget(c);){let g=e[u];if(a?this._mediator.execute(new vu(a[u]??null,s?.[u])):this._mediator.execute(new bu(g,n)),u++,f++,!this._isCurrent(r))return}if(u>=e.length){this._mediator.execute(new Pr(r));return}this._requestAnimationFrame(()=>this._mediator.execute(new si(e,n,u,r,a,s)))}_isCurrent(e){return this._mediator.execute(new qi(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<AL:!0}static \u0275fac=function(n){return new(n||bl)};static \u0275prov=y({token:bl,factory:bl.\u0275fac})};return t=P([R(si)],t),t})(),yu=class{static fToken=Symbol("StartConnectionRedrawRequest")},BL=(()=>{let t=class vl{_store=p(L);_state=p(kh);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||vl)};static \u0275prov=y({token:vl,factory:vl.\u0275fac})};return t=P([R(yu)],t),t})(),Rr=class{static fToken=Symbol("RedrawConnectionsRequest")},Cu=class{connectionCount;static fToken=Symbol("ShouldUseConnectionWorkerRequest");constructor(o){this.connectionCount=o}},Or=class{static fToken=Symbol("IsConnectionWorkerEnabledRequest")},VL=(()=>{let t=class yl{_browser=p(ut);_state=p(Wi);handle(e){if(this._state.isDisabled||!this._isWorkerAvailable())return!1;let n=this._browser.document.defaultView;return jy(n)}_isWorkerAvailable(){return this._browser.isBrowser()}static \u0275fac=function(n){return new(n||yl)};static \u0275prov=y({token:yl,factory:yl.\u0275fac})};return t=P([R(Or)],t),t})(),zL=(()=>{let t=class Cl{_mediator=p(V);handle({connectionCount:e}){return e>0&&this._mediator.execute(new Or)}static \u0275fac=function(n){return new(n||Cl)};static \u0275prov=y({token:Cl,factory:Cl.\u0275fac})};return t=P([R(Cu)],t),t})(),xu=class{connection;geometry;originalIndex;static fToken=Symbol("BuildConnectionWorkerPayloadItemRequest");constructor(o,e,n){this.connection=o,this.geometry=e,this.originalIndex=n}},HL=(()=>{let t=class xl{_store=p(L);handle({connection:e,geometry:n,originalIndex:i}){let{source:r,target:a,sourceRect:s,targetRect:c}=n;return{originalIndex:i,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||xl)};static \u0275prov=y({token:xl,factory:xl.\u0275fac})};return t=P([R(xu)],t),t})(),wu=class{connections;cache;static fToken=Symbol("BuildConnectionWorkerBatchRequest");constructor(o,e){this.connections=o,this.cache=e}},qL=(()=>{let t=class wl{_mediator=p(V);handle({connections:e,cache:n}){let i=new Array(e.length),r=[];for(let a=0;a<e.length;a++){let s=this._buildBatchItem(e[a],n,a);i[a]=s,s&&r.push(s.payload)}return{items:i,payload:r}}_buildBatchItem(e,n,i){let r=this._mediator.execute(new Er(e,n));return r?{connection:e,geometry:r,payload:this._mediator.execute(new xu(e,r,i))}:null}static \u0275fac=function(n){return new(n||wl)};static \u0275prov=y({token:wl,factory:wl.\u0275fac})};return t=P([R(wu)],t),t})(),Tu=class{error;static fToken=Symbol("DisableConnectionWorkerRequest");constructor(o){this.error=o}},Fr=class{error;static fToken=Symbol("ResetConnectionWorkerRuntimeRequest");constructor(o){this.error=o}},GL=(()=>{let t=class Tl{_state=p(Wi);handle({error:e}){this._state.resetRuntime(e)}static \u0275fac=function(n){return new(n||Tl)};static \u0275prov=y({token:Tl,factory:Tl.\u0275fac})};return t=P([R(Fr)],t),t})(),jL=(()=>{let t=class Sl{_state=p(Wi);_mediator=p(V);handle({error:e}){this._state.isDisabled=!0,this._mediator.execute(new Fr(e))}static \u0275fac=function(n){return new(n||Sl)};static \u0275prov=y({token:Sl,factory:Sl.\u0275fac})};return t=P([R(Tu)],t),t})(),Su=class{message;static fToken=Symbol("HandleConnectionWorkerMessageRequest");constructor(o){this.message=o}},UL=(()=>{let t=class kl{_state=p(Wi);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||kl)};static \u0275prov=y({token:kl,factory:kl.\u0275fac})};return t=P([R(Su)],t),t})(),ku=class{static fToken=Symbol("EnsureConnectionWorkerRequest")},$L=(()=>{let t=class Il{_browser=p(ut);_state=p(Wi);_mediator=p(V);handle(e){if(this._state.worker)return this._state.worker;let n=this._browser.document.defaultView;if(!jy(n))return null;let i=Uy(n);if(!i)return null;let r=lL(i);try{let a=new i.workerCtor(r,{name:"f-flow-connection-worker"});return a.onmessage=s=>{this._mediator.execute(new Su(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 $y(r,i.urlApi),this._disableWorker(a instanceof Error?a:new Error("Connection worker initialization failed.")),null}}_disableWorker(e){this._mediator.execute(new Tu(e))}_resetWorkerAfterRuntimeError(e){this._mediator.execute(new Fr(e))}static \u0275fac=function(n){return new(n||Il)};static \u0275prov=y({token:Il,factory:Il.\u0275fac})};return t=P([R(ku)],t),t})(),Iu=class{payload;static fToken=Symbol("RunConnectionWorkerRequest");constructor(o){this.payload=o}},WL=(()=>{let t=class El{_state=p(Wi);_mediator=p(V);handle({payload:e}){if(!e.length)return Promise.resolve([]);if(!this._mediator.execute(new Or))return Promise.reject(new Error("Connection worker is disabled."));this._interruptPendingRequests();let n=this._mediator.execute(new ku);if(!n)return Promise.reject(new Error("Unable to initialize connection worker."));let i=++this._state.nextRequestId;return new Promise((r,a)=>{this._state.pending.set(i,{resolve:r,reject:a});try{n.postMessage({requestId:i,items:e})}catch(s){this._state.pending.delete(i),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||El)};static \u0275prov=y({token:El,factory:El.\u0275fac})};return t=P([R(Iu)],t),t})(),Eu=class{batch;static fToken=Symbol("RunConnectionWorkerBatchRequest");constructor(o){this.batch=o}},KL=(()=>{let t=class Ml{_mediator=p(V);handle({batch:e}){return e.payload.length?this._mediator.execute(new Iu(e.payload)):Promise.resolve([])}static \u0275fac=function(n){return new(n||Ml)};static \u0275prov=y({token:Ml,factory:Ml.\u0275fac})};return t=P([R(Eu)],t),t})(),Mu=class{connections;cache;session;static fToken=Symbol("StartConnectionWorkerRedrawRequest");constructor(o,e,n){this.connections=o,this.cache=e,this.session=n}},YL=(()=>{let t=class Dl{_mediator=p(V);handle({connections:e,cache:n,session:i}){let r=this._mediator.execute(new wu(e,n));if(!r.payload.length){this._mediator.execute(new si(e,n,0,i,r.items));return}this._mediator.execute(new Eu(r)).then(a=>{this._mediator.execute(new qi(i))&&this._mediator.execute(new si(e,n,0,i,r.items,this._alignWorkerResults(a,e.length)))}).catch(()=>{this._mediator.execute(new qi(i))&&this._mediator.execute(new si(e,n,0,i,r.items))})}_alignWorkerResults(e,n){let i=new Array(n);for(let r of e){let a=r.originalIndex;a<0||a>=n||(i[a]=r)}return i}static \u0275fac=function(n){return new(n||Dl)};static \u0275prov=y({token:Dl,factory:Dl.\u0275fac})};return t=P([R(Mu)],t),t})(),ZL=(()=>{let t=class Pl{_mediator=p(V);_store=p(L);handle(e){let n=this._mediator.execute(new yu);this._createMarkersForCreate(),this._createMarkersForSnap();let i=[...this._store.connections.getAll()],r=new Map;if(!i.length){this._mediator.execute(new Pr(n));return}this._shouldUseConnectionWorker(i.length)?this._redrawUsingWorker(i,r,n):this._redrawWithoutWorker(i,r,n)}_createMarkersForCreate(){let e=this._store.connections.getForCreate();e&&this._mediator.execute(new Do(e))}_createMarkersForSnap(){let e=this._store.connections.getForSnap();e&&this._mediator.execute(new Do(e))}_shouldUseConnectionWorker(e){return this._mediator.execute(new Cu(e))}_redrawUsingWorker(e,n,i){this._mediator.execute(new Mu(e,n,i))}_redrawWithoutWorker(e,n,i){this._mediator.execute(new si(e,n,0,i))}static \u0275fac=function(n){return new(n||Pl)};static \u0275prov=y({token:Pl,factory:Pl.\u0275fac})};return t=P([R(Rr)],t),t})(),qm=class{static fToken=Symbol("RemoveConnectionForCreateFromStoreRequest")},XL=(()=>{let t=class Rl{_store=p(L);handle(e){this._store.connections.removeInstanceForCreate()}static \u0275fac=function(n){return new(n||Rl)};static \u0275prov=y({token:Rl,factory:Rl.\u0275fac})};return t=P([R(qm)],t),t})(),Du=class{connection;static fToken=Symbol("RemoveConnectionFromStoreRequest");constructor(o){this.connection=o}},QL=(()=>{let t=class Ol{_store=p(L);handle({connection:e}){this._store.connections.remove(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ol)};static \u0275prov=y({token:Ol,factory:Ol.\u0275fac})};return t=P([R(Du)],t),t})(),Pu=class{instance;static fToken=Symbol("RemoveConnectionMarkerFromStoreRequest");constructor(o){this.instance=o}},JL=(()=>{let t=class Fl{_store=p(L);handle({instance:e}){this._store.connectionMarkers.remove(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Fl)};static \u0275prov=y({token:Fl,factory:Fl.\u0275fac})};return t=P([R(Pu)],t),t})(),Gm=class{waypointIndex;connectionId;static fToken=Symbol("RemoveConnectionWaypointRequest");constructor(o,e){this.waypointIndex=o,this.connectionId=e}},Ru=class{static fToken=Symbol("EmitEndDragSequenceEventRequest")},e9=(()=>{let t=class Nl{_store=p(L);_dragSession=p(ge);handle(e){this._store.flowHost.classList.remove(yt.DRAG_AND_DROP.DRAGGING),this._dragSession.reset(),this._emitEvent()}_emitEvent(){this._store.fDraggable?.fDragEnded?.emit()}static \u0275fac=function(n){return new(n||Nl)};static \u0275prov=y({token:Nl,factory:Nl.\u0275fac})};return t=P([R(Ru)],t),t})(),Ou=class{static fToken=Symbol("EmitStartDragSequenceEventRequest")},t9=(()=>{let t=class Al{_mediator=p(V);_store=p(L);_dragContext=p(ge);handle(e){this._dragContext.draggableItems.length>0&&(this._store.flowHost.classList.add(yt.DRAG_AND_DROP.DRAGGING),this._mediator.execute(new Nr),this._emitDragStarted())}_emitDragStarted(){let e=this._dragContext.draggableItems[0].getEvent();this._store.fDraggable?.fDragStarted?.emit(new Vu(e.kind,e.data?be({},e.data):void 0,e.fEventType))}static \u0275fac=function(n){return new(n||Al)};static \u0275prov=y({token:Al,factory:Al.\u0275fac})};return t=P([R(Ou)],t),t})(),Nr=class{static fToken=Symbol("EmitSelectionChangeEventRequest")},Gi=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(o,e){this._event=o,this._target=e}setTarget(o){this._target=o}preventDefault(){this.originalEvent.preventDefault()}get isEventInLockedContext(){return this.targetElement.closest("[fLockedContext]")!==null}},Fu=class extends Gi{constructor(o,e){super(o,e)}isMouseLeftButton(){return this.originalEvent.button===0}isMouseRightButton(){return this.originalEvent.buttons===2}getPosition(){return{x:this.originalEvent.clientX,y:this.originalEvent.clientY}}},jm=class extends Gi{constructor(o,e){super(o,e)}isMouseLeftButton(){let o=this.originalEvent;return o.pointerType==="mouse"&&o.button===0||o.pointerType==="touch"}isMouseRightButton(){let o=this.originalEvent;return o.pointerType==="mouse"&&o.button===2||o.pointerType==="touch"}getPosition(){let o=this.originalEvent;return{x:o.clientX,y:o.clientY}}getPointerType(){return this.originalEvent.pointerType}getPointerId(){return this.originalEvent.pointerId}},Um=class extends Gi{constructor(o){super(o)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let o=this.originalEvent.touches;return{x:o[0].clientX,y:o[0].clientY}}},$m=class extends Gi{constructor(o,e){super(o,e)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let o=this.originalEvent.targetTouches[0];return{x:o.clientX,y:o.clientY}}},qe=(()=>{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})(),n9=800,Wm=class{_document=p(Ua);_ngZone=p(on,{optional:!0});_mouseListeners=qe.emptyListener();_touchListeners=qe.emptyListener();_startListeners=qe.emptyListener();isSyntheticEvent(o){return!!this._lastTouchEventTime&&this._lastTouchEventTime+n9>Date.now()}_lastTouchEventTime=0;isDragStarted=!1;_dragStartThreshold=3;_dragStartDelay=0;_dragStartTime=0;_dragStartPosition={x:0,y:0};_moveHandler=this._checkDragSequenceToStart;_pointerDownElement=null;_onMouseDown=o=>{let e=this.isSyntheticEvent(o),n=o9(o),i=new Fu(o);if(e||n||this.disabled||this.isDragStarted)return;this._pointerDownElement=i.targetElement,this.onPointerDown(i)&&(this._dragStartTime=Date.now(),this._dragStartPosition=i.getPosition(),this._ngZone?.runOutsideAngular(()=>{this._listen("selectstart",this._onSelectStart,qe.activeListener()),this._listen("mousemove",this._onMouseMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,qe.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,qe.activeCaptureListener())}),this._mouseListeners=()=>{this._unlisten("selectstart",this._onSelectStart,qe.activeListener()),this._unlisten("mousemove",this._onMouseMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,qe.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,qe.activeCaptureListener())})};_onTouchDown=o=>{let e=r9(o),n=new Um(o);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,qe.activeListener()),this._listen("touchmove",this._onTouchMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,qe.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,qe.activeCaptureListener())}),this._touchListeners=()=>{this._unlisten("selectstart",this._onSelectStart,qe.activeListener()),this._unlisten("touchmove",this._onTouchMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,qe.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,qe.activeCaptureListener())})};_onSelectStart=o=>{this.onSelect(o)};_onMouseMove=o=>{this._moveHandler(new Fu(o))};_onTouchMove=o=>{this._moveHandler(new $m(o))};_checkDragSequenceToStart(o){let e=o.getPosition();if(!this.isDragStarted&&this._pointerDownElement){o.setTarget(this._pointerDownElement);let n=Math.abs(e.x-this._dragStartPosition.x),i=Math.abs(e.y-this._dragStartPosition.y);if(n+i>=this._dragStartThreshold){if(!(Date.now()>=this._dragStartTime+this._dragStartDelay)){this._endDragSequence();return}o.preventDefault(),this.prepareDragSequence(o),this.isDragStarted=!0,this._moveHandler=this.onPointerMove,i9(o.originalEvent)&&(this._lastTouchEventTime=Date.now())}}}_onPointerUpEvent=o=>{this.isDragStarted&&this.onPointerUp(new jm(o)),this._endDragSequence()};_endDragSequence(){this.isDragStarted=!1,this._pointerDownElement=null,this._moveHandler=this._checkDragSequenceToStart,this._mouseListeners(),this._mouseListeners=qe.emptyListener(),this._touchListeners(),this._touchListeners=qe.emptyListener(),this.finalizeDragSequence()}subscribe(){this.unsubscribe(),this._ngZone?.runOutsideAngular(()=>{this._listen("mousedown",this._onMouseDown,qe.activeListener()),this._listen("touchstart",this._onTouchDown,qe.passiveListener())}),this._startListeners=()=>{this._unlisten("mousedown",this._onMouseDown,qe.activeListener()),this._unlisten("touchstart",this._onTouchDown,qe.passiveListener())}}unsubscribe(){this._startListeners(),this._startListeners=qe.emptyListener(),this._touchListeners(),this._touchListeners=qe.emptyListener(),this._mouseListeners(),this._mouseListeners=qe.emptyListener()}_listen(o,e,n){this._document.addEventListener(o,e,n)}_unlisten(o,e,n){this._document.removeEventListener(o,e,n)}_preventDuringDrag=o=>{this.isDragStarted&&o.preventDefault()}};function i9(t){return t.type[0]==="t"}function o9(t){return t.buttons===0||t.offsetX===0&&t.offsetY===0}function r9(t){let o=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var Km=class extends Gi{_position;_isMouseLeftButton;_isMouseRightButton;constructor(o){super(o.originalEvent,o.targetElement),this._position=o.getPosition(),this._isMouseLeftButton=o.isMouseLeftButton(),this._isMouseRightButton=o.isMouseRightButton()}isMouseLeftButton(){return this._isMouseLeftButton}isMouseRightButton(){return this._isMouseRightButton}getPosition(){return be({},this._position)}};function a9(t){return new Km(t)}var ge=(()=>{class t{selectedItems=[];isSelectedChanged=!1;onPointerDownScale=1;onPointerDownPosition=new me(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 me(0,0),this.autoPanFrameId=null,this.lastPointerEvent=null,this.lastPointerPosition=null,this.isAutoPanCanvasMoved=!1}markSelectionAsChanged(){this.isSelectedChanged=!0}rememberPointerEvent(e){this.lastPointerEvent=a9(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})(),Ym=class{nodeIds;groupIds;connectionIds;get fNodeIds(){return this.nodeIds}get fGroupIds(){return this.groupIds}get fConnectionIds(){return this.connectionIds}constructor(o,e,n){this.nodeIds=o,this.groupIds=e,this.connectionIds=n}},s9=(()=>{let t=class Ll{_mediator=p(V);_store=p(L);_dragSession=p(ge);handle(e){this._dragSession.isSelectedChanged&&(this._emitSelectionChange(this._getSelection()),this._dragSession.isSelectedChanged=!1,this._mediator.execute(new li))}_getSelection(){return this._mediator.execute(new oa)}_emitSelectionChange(e){this._store.fDraggable?.fSelectionChange.emit(new Ym(e.fNodeIds,e.fGroupIds,e.fConnectionIds))}static \u0275fac=function(n){return new(n||Ll)};static \u0275prov=y({token:Ll,factory:Ll.\u0275fac})};return t=P([R(Nr)],t),t})(),Zm=class{nodeOrGroup;static fToken=Symbol("GetNormalizedParentNodeRectRequest");constructor(o){this.nodeOrGroup=o}},l9=(()=>{let t=class Bl{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){let n=oe.initialize(-1/0,-1/0,1/0,1/0),i=this._getNode(e.fParentId());return i&&(n=this._getParentRect(i)),n}_getNode(e){return this._store.nodes.get(e)}_getParentRect(e){let n=this._getNodeRect(e),i=this._getNodePadding(e,n);return oe.initialize(n.x+i[0],n.y+i[1],n.width-i[0]-i[2],n.height-i[1]-i[3])}_getNodeRect(e){return this._mediator.execute(new ot(e.hostElement))}_getNodePadding(e,n){return this._mediator.execute(new Ui(e,n))}static \u0275fac=function(n){return new(n||Bl)};static \u0275prov=y({token:Bl,factory:Bl.\u0275fac})};return t=P([R(Zm)],t),t})(),Xm=class{fParentNodes;fDraggedNodes;static fToken=Symbol("IsArrayHasParentNodeRequest");constructor(o,e){this.fParentNodes=o,this.fDraggedNodes=e}},c9=(()=>{let t=class Vl{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(i=>e.includes(i.fId()))}static \u0275fac=function(n){return new(n||Vl)};static \u0275prov=y({token:Vl,factory:Vl.\u0275fac})};return t=P([R(Xm)],t),t})(),Qm=class{fNodeId;fConnectionIds;constructor(o,e){this.fNodeId=o,this.fConnectionIds=e}},Nu=class extends Qm{nodeId;connectionIds;constructor(o,e){super(o,e),this.nodeId=o,this.connectionIds=e}},Au=class{nodeOrGroup;static fToken=Symbol("DetectConnectionsUnderDragNodeRequest");constructor(o){this.nodeOrGroup=o}},d9=(()=>{let t=class zl{_mediator=p(V);_store=p(L);handle({nodeOrGroup:e}){let n=this._collectConnectableConnectorIds(e,"source"),i=this._collectConnectableConnectorIds(e,"target");if(!n.size||!i.size)return;let r=this._collectAttachedConnectionIds(n,i),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 Nu(e.fId(),s)),this._store.fDraggable?.fNodeConnectionsIntersection.emit(new Nu(e.fId(),s)))}_collectConnectableConnectorIds(e,n){let i=n==="source"?this._store.outputs.getAll():this._store.inputs.getAll(),r=new Set;for(let a of i)a.canBeConnected&&e.isContains(a.hostElement)&&r.add(a.fId());return r}_collectAttachedConnectionIds(e,n){let i=new Set;for(let r of this._store.connections.getAll())(e.has(r.fOutputId())||n.has(r.fInputId()))&&i.add(r.fId());return i}_collectConnectionsUnderNode(e){let n=this._mediator.execute(new ui(e.hostElement,!1)),i=[];for(let r of this._store.connections.getAll())this._hasIntersection(r,n)&&i.push(r);return i}_hasIntersection(e,n){return xo.getRoundedRectIntersectionsWithSVGPath(e.fPath().hostElement,n).length>0}static \u0275fac=function(n){return new(n||zl)};static \u0275prov=y({token:zl,factory:zl.\u0275fac})};return t=P([R(Au)],t),t})(),u9=[t9,e9,s9,l9,c9,d9],p9=new Set(["create-connection","reassign-connection","drag-node"]),h9=new Set(["selection-area"]),f9=new Set(["assign-to-container"]);function Ky(t){let o=null;for(let e of t){if(f9.has(e))continue;let n=p9.has(e)?"rebase":h9.has(e)?"direct":null;if(!n)return null;if(!o){o=n;continue}if(o!==n)return null}return o}function Yy(t,o,e,n,i){return U.initialize(cy(t.x,o.left,o.right,e,n,i),cy(t.y,o.top,o.bottom,e,n,i))}function cy(t,o,e,n,i,r){let a=Math.max(0,n),s=Math.max(0,i);if(!a||!s)return 0;if(t<=o+a){let c=uy((o+a-t)/a,0,1);return dy(c,s,r)}if(t>=e-a){let c=uy((t-(e-a))/a,0,1);return-dy(c,s,r)}return 0}function m9(t,o,e){let n=e||1;return me.fromPoint(t).add(me.fromPoint(o).div(n))}function dy(t,o,e){return e?o*t:o}function uy(t,o,e){return Math.max(o,Math.min(e,t))}var Lu=class{static fToken=Symbol("RunAutoPanFrameRequest")},pi=class{static fToken=Symbol("StopAutoPanRequest")},_9=(()=>{let t=class Hl{_store=p(L);_dragContext=p(ge);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||Hl)};static \u0275prov=y({token:Hl,factory:Hl.\u0275fac})};return t=P([R(pi)],t),t})(),Ar=class{static fToken=Symbol("SyncAutoPanRequest")},g9=(()=>{let t=class ql{_mediator=p(V);_store=p(L);_dragContext=p(ge);handle(e){if(!this._canAutoPan()||!this._hasAutoPanDelta()){this._mediator.execute(new pi);return}this._dragContext.autoPanFrameId===null&&(this._dragContext.autoPanFrameId=requestAnimationFrame(()=>{this._dragContext.autoPanFrameId=null,this._mediator.execute(new Lu)}))}_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?U.initialize():Yy(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_getAutoPanMode(){return Ky(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(Ye.AUTO_PAN)}static \u0275fac=function(n){return new(n||ql)};static \u0275prov=y({token:ql,factory:ql.\u0275fac})};return t=P([R(Ar)],t),t})(),b9=(()=>{let t=class Gl{_mediator=p(V);_store=p(L);_dragContext=p(ge);handle(e){let n=this._getAutoPanMode();if(!this._canAutoPan(n)){this._mediator.execute(new pi);return}let i=this._getAutoPanDelta();if(!i.x&&!i.y){this._mediator.execute(new pi);return}this._applyCanvasDelta(i,n),this._replayLastPointerMove(),this._mediator.execute(new Ar)}_applyCanvasDelta(e,n){let i=this._store.transform;n==="rebase"&&(this._dragContext.onPointerDownPosition=m9(this._dragContext.onPointerDownPosition,e,this._dragContext.onPointerDownScale||i.scale||1)),i.position=me.fromPoint(i.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(i=>{i.onPointerMove(be({},n),e)})}_getPointerPositionInCanvas(e){return me.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 Ky(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?U.initialize():Yy(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(Ye.AUTO_PAN)}static \u0275fac=function(n){return new(n||Gl)};static \u0275prov=y({token:Gl,factory:Gl.\u0275fac})};return t=P([R(Lu)],t),t})(),v9=[g9,b9,_9],Bu=class{event;static fToken=Symbol("DragCanvasFinalizeRequest");constructor(o){this.event=o}},Vu=class{kind;data;fEventType;get fData(){return this.data}constructor(o,e,n){this.kind=o,this.data=e,this.fEventType=n??o}},Nt=class{data(){}_features=[];getEvent(){return new Vu(this.kind,this.data(),this.type)}attachFeature(o){this._features.push(o)}featuresPrepare(o){for(let e of this._features)e.onPrepare?.(o)}featuresMove(o,e){for(let n of this._features)n.onMove?.(o,e)}featuresFinalize(o,e){for(let n of this._features)n.onFinalize?.(o,e)}featuresEnd(o){for(let e of this._features)e.onEnd?.(o)}},zu=class{_isConnected=!1;get isConnected(){return this._isConnected}toConnector=[];isSelfConnectable=!0;fConnectableSide=K.AUTO;userFConnectableSide=K.AUTO;isContains(o){return this.hostElement.contains(o)}setConnected(o){this._isConnected=!0,this.toConnector.push(o)}resetConnected(){this._isConnected=!1,this.toConnector=[]}},y9=new he("F_NODE_INPUT"),C9=(()=>{class t extends zu{kind="input";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({type:t,standalone:!1,features:[Y]})}return t})(),Dn=(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})(Dn||{});function x9(t){return Cr(t,".f-rotate-handle")}var Zy=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["","fDragHandle",""]],hostAttrs:[1,"f-drag-handle","f-component"],standalone:!1})}return t})(),Ih=new he("F_NODE"),w9=Hy(class{hostElement;constructor(t){this.hostElement=t}}),Hu=class extends w9{_injector=p(mt);renderer=p(M0);browser=p(ut);stateChanges=new un;_position=U.initialize();_rotate=0;_size;connectors=[];positionChanges(){_e(()=>{let o=this.position();an(()=>{U.isEqual(this._position,o)||(this._position=o,this.redraw(),this.refresh())})},{injector:this._injector})}sizeChanges(){_e(()=>{let o=this.size();an(()=>{this._isSizeEqual(o)||(this._size=o,this.redraw(),this.refresh())})},{injector:this._injector})}rotateChanges(){_e(()=>{let o=this.rotate();an(()=>{this._rotate!==o&&(this._rotate=o,this.redraw(),this.refresh())})},{injector:this._injector})}parentChanges(){_e(()=>{this.fParentId(),this.fIncludePadding(),this.fAutoSizeToFitChildren(),an(()=>this.refresh())},{injector:this._injector})}_isSizeEqual(o){return this._size?.width===o?.width&&this._size?.height===o?.height}isContains(o){return this.hostElement.contains(o)}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(o){this._position=o}updateRotate(o){this._rotate=o}updateSize(o){this._size=o}setClass(o){this.hostElement.classList.add(o)}removeClass(o){this.hostElement.classList.remove(o)}addConnector(o){this.connectors.push(o),this.refresh()}removeConnector(o){let e=this.connectors.indexOf(o);e!==-1&&this.connectors.splice(e,1),this.refresh()}},T9=0,S9=3,Jm=(()=>{class t extends Hu{_debounceTimer=null;_destroyRef=p(St);_mediator=p(V);fId=B(`f-group-${T9++}`,{alias:"fGroupId"});fParentId=B(null,{alias:"fGroupParentId"});position=Di(U.initialize(),{alias:"fGroupPosition"});size=B(void 0,{alias:"fGroupSize"});sizeChange=tt({alias:"fGroupSizeChange"});rotate=Di(0,{alias:"fGroupRotate"});fConnectOnNode=B(!0,{transform:G});fMinimapClass=B([]);fDraggingDisabled=B(!1,{alias:"fGroupDraggingDisabled",transform:G});fSelectionDisabled=B(!1,{alias:"fGroupSelectionDisabled",transform:G});fIncludePadding=B(!0,{transform:G});fAutoExpandOnChildHit=B(!1,{transform:G});fAutoSizeToFitChildren=B(!1,{transform:G});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new Xr(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 li),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),S9))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new No(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Jr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new ea(this))}static \u0275fac=function(n){return new(n||t)(bn(Xe))};static \u0275dir=Ue({type:t,selectors:[["","fGroup",""]],hostAttrs:[1,"f-group","f-component"],hostVars:5,hostBindings:function(n,i){n&2&&(O("data-f-group-id",i.fId()),ce("f-group-dragging-disabled",i.fDraggingDisabled())("f-group-selection-disabled",i.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:[ve([{provide:Ih,useExisting:t}]),Y]})}return t})(),py=0,k9=3,Eh=(()=>{class t extends Hu{_debounceTimer=null;_destroyRef=p(St);_mediator=p(V);fId=B(`f-node-${py++}`,{alias:"fNodeId",transform:e=>Oo(e)||`f-node-${py++}`});fParentId=B(null,{alias:"fNodeParentId"});position=Di(U.initialize(),{alias:"fNodePosition"});size=B(void 0,{alias:"fNodeSize"});sizeChange=tt({alias:"fNodeSizeChange"});rotate=Di(0,{alias:"fNodeRotate"});fConnectOnNode=B(!0,{transform:G});fMinimapClass=B([]);fDraggingDisabled=B(!1,{alias:"fNodeDraggingDisabled",transform:G});fSelectionDisabled=B(!1,{alias:"fNodeSelectionDisabled",transform:G});fIncludePadding=B(!0,{transform:G});fAutoExpandOnChildHit=B(!1,{transform:G});fAutoSizeToFitChildren=B(!1,{transform:G});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new Xr(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 li),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),k9))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new No(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Jr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new ea(this))}static \u0275fac=function(n){return new(n||t)(bn(Xe))};static \u0275dir=Ue({type:t,selectors:[["","fNode",""]],hostAttrs:[1,"f-node","f-component"],hostVars:5,hostBindings:function(n,i){n&2&&(O("data-f-node-id",i.fId()),ce("f-node-dragging-disabled",i.fDraggingDisabled())("f-node-selection-disabled",i.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:[ve([{provide:Ih,useExisting:t}]),Y]})}return t})();function I9(t){return!!t.closest("[fNode]")}var hy=0,Xy=(()=>{class t extends C9{hostElement=p(Xe).nativeElement;_mediator=p(V);_node=p(Ih);fId=B(`f-node-input-${hy++}`,{alias:"fInputId",transform:e=>Oo(e)||`f-node-input-${hy++}`});category=B(void 0,{alias:"fInputCategory",transform:Oo});multiple=B(!0,{alias:"fInputMultiple",transform:G});disabled=B(!1,{alias:"fInputDisabled",transform:G});userFConnectableSide=K.AUTO;get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Kr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_CONNECTED,!0),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_CONNECTED,!1),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new ta(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({type:t,selectors:[["","fNodeInput",""]],hostAttrs:[1,"f-component","f-node-input"],hostVars:5,hostBindings:function(n,i){n&2&&(O("data-f-input-id",i.fId()),ce("f-node-input-multiple",i.multiple)("f-node-input-disabled",i.disabled()))},inputs:{fId:[1,"fInputId","fId"],category:[1,"fInputCategory","category"],multiple:[1,"fInputMultiple","multiple"],disabled:[1,"fInputDisabled","disabled"],userFConnectableSide:[2,"fInputConnectableSide","userFConnectableSide",e=>wo(e,"fInputConnectableSide",K)]},exportAs:["fNodeInput"],standalone:!1,features:[ve([{provide:y9,useExisting:t}]),Y,so]})}return t})(),E9=(()=>{class t extends zu{get hasConnectionLimits(){return!!this.canBeConnectedInputs&&this.canBeConnectedInputs.length>0}canConnectTo(e){return[e.fId(),e.category()].some(i=>i&&this.canBeConnectedInputs?.includes(i))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({type:t,standalone:!1,features:[Y]})}return t})();function Qy(t){return!!t.closest("[fNodeOutlet]")}var M9=new he("F_NODE_OUTPUT"),D9=(()=>{class t extends E9{kind="output";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({type:t,standalone:!1,features:[Y]})}return t})();function Jy(t){return!!t.closest("[fNodeOutput]")}var fy=0,eC=(()=>{class t extends D9{hostElement=p(Xe).nativeElement;_mediator=p(V);_node=p(Ih);fId=B(`f-node-output-${fy++}`,{alias:"fOutputId",transform:e=>Oo(e)||`f-node-output-${fy++}`});multiple=B(!1,{alias:"fOutputMultiple",transform:G});disabled=B(!1,{alias:"fOutputDisabled",transform:G});userFConnectableSide=K.AUTO;isSelfConnectable=!0;canBeConnectedInputs=[];get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Kr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_CONNECTED,!0),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_CONNECTED,!1),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new ta(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({type:t,selectors:[["","fNodeOutput",""]],hostAttrs:[1,"f-component","f-node-output"],hostVars:7,hostBindings:function(n,i){n&2&&(O("data-f-output-id",i.fId()),ce("f-node-output-multiple",i.multiple)("f-node-output-disabled",i.disabled())("f-node-output-self-connectable",i.isSelfConnectable))},inputs:{fId:[1,"fOutputId","fId"],multiple:[1,"fOutputMultiple","multiple"],disabled:[1,"fOutputDisabled","disabled"],userFConnectableSide:[2,"fOutputConnectableSide","userFConnectableSide",e=>wo(e,"fOutputConnectableSide",K)],isSelfConnectable:"isSelfConnectable",canBeConnectedInputs:[0,"fCanBeConnectedInputs","canBeConnectedInputs"]},exportAs:["fNodeOutput"],standalone:!1,features:[ve([{provide:M9,useExisting:t}]),Y,so]})}return t})();var qu=class{event;static fToken=Symbol("CreateConnectionFinalizeRequest");constructor(o){this.event=o}},Lr=class{outlet;static fToken=Symbol("ResolveConnectableOutputForOutletRequest");constructor(o){this.outlet=o}},P9=(()=>{let t=class jl{_store=p(L);handle({outlet:e}){let n=this._findOwnerNode(e);if(!n)throw new Error("The fOutlet must belong to an fNode");let i=this._findFirstConnectableOutputInNode(n);if(!i)throw new Error("Outlet requires at least one connectable output in the same node.");return i}_findOwnerNode(e){let n=e.hostElement;return this._store.nodes.getAll().find(i=>i.isContains(n))}_findFirstConnectableOutputInNode(e){return this._store.outputs.getAll().find(n=>e.isContains(n.hostElement)&&n.canBeConnected)}static \u0275fac=function(n){return new(n||jl)};static \u0275prov=y({token:jl,factory:jl.\u0275fac})};return t=P([R(Lr)],t),t})(),e_=class{sourceId;targetId;dropPosition;fOutputId;fInputId;fDropPosition;constructor(o,e,n){this.sourceId=o,this.targetId=e,this.dropPosition=n,this.fOutputId=o,this.fInputId=e,this.fDropPosition=n}},Gu=(()=>{class t extends Nt{type="create-connection";kind="create-connection";data(){return{fOutputOrOutletId:this._sourceRef.connector.fId()}}_result=p(fi);_mediator=p(V);_connectionBehaviour=p(qo);_store=p(L);get _connection(){return this._store.connections.getForCreate()}get _snapConnection(){return this._store.connections.getForSnap()}_targets=[];_sourceRef;_pointerDown=new dt;initialize(e,n){this._sourceRef=this._mediator.execute(new Qt(e)),this._pointerDown=dt.fromRect(oe.initialize(n.x,n.y))}prepareDragSequence(){this._collectAndMarkTargets(),this._initSnapConnection(),this._initCreateConnection(),this._connection.show(),this.onPointerMove(U.initialize()),this._result.setData({toConnectorRect:this._pointerDown,canBeConnectedInputs:this._targets,fOutputId:this._sourceRef.connector.fId()})}_collectAndMarkTargets(){this._targets=this._mediator.execute(new Zr(this._sourceRef.connector,this._sourceRef.rect.gravityCenter)),this._mediator.execute(new Bo(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),i=this._findClosestTarget(n),r=i?.connector.fConnectableSide||K.TOP;this._drawCreateConnection(n,r);let a=this._snapConnection;if(!a)return;let s=i&&i.distance<a.fSnapThreshold?i:void 0;this._drawSnapConnection(s)}_findClosestTarget(e){return this._mediator.execute(new ji(e,this._targets))}_drawCreateConnection(e,n){let i=this._connectionBehaviour.handle(new wn(this._sourceRef.rect,e,this._connection,this._sourceRef.connector.fConnectableSide,n,this._resolveRotationContext(this._sourceRef.connector)));this._connection.setLine(i),this._connection.redraw()}_drawSnapConnection(e){let n=this._snapConnection;if(!n)return;if(!e){n.hide();return}let i=this._connectionBehaviour.handle(new wn(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(i),n.redraw()}onPointerUp(){this._connection.redraw(),this._connection.hide(),this._snapConnection?.hide(),this._mediator.execute(new Vo(this._targets.map(e=>e.connector)))}_resolveRotationContext(e){return this._mediator.execute(new Gn(e))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),R9=(()=>{let t=class Ul{_result=p(fi);_mediator=p(V);_store=p(L);_dragContext=p(ge);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 Gu)}_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 Qy(e.hostElement)?this._mediator.execute(new Lr(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 e_(this._getTargetOutput(this._getOutput()||this._getOutlet()).fId(),this._getInputUnderPointer(e)?.fId(),e.getPosition()))}_getInputUnderPointer(e){return this._mediator.execute(new Yr(e.getPosition(),this._result.getData().canBeConnectedInputs))}static \u0275fac=function(n){return new(n||Ul)};static \u0275prov=y({token:Ul,factory:Ul.\u0275fac})};return t=P([R(qu)],t),t})(),Br=class{eventPosition;source;static fToken=Symbol("CreateConnectionCreateDragHandlerRequest");constructor(o,e){this.eventPosition=o,this.source=e}},O9=(()=>{let t=class $l{_store=p(L);_dragContext=p(ge);_dragInjector=p(Tt);get _transform(){return this._store.transform}handle({source:e,eventPosition:n}){this._dragContext.onPointerDownScale=this._transform.scale;let i=this._toFlowSpace(n);this._dragContext.onPointerDownPosition=i;let r=this._toCanvasSpace(i),a=this._dragInjector.get(Gu);a.initialize(e,r),this._dragContext.draggableItems=[a]}_toFlowSpace(e){return me.fromPoint(e).elementTransform(this._store.flowHost).div(this._transform.scale)}_toCanvasSpace(e){return me.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||$l)};static \u0275prov=y({token:$l,factory:$l.\u0275fac})};return t=P([R(Br)],t),t})(),ju=class{event;node;static fToken=Symbol("CreateConnectionFromOutletPreparationRequest");constructor(o,e){this.event=o,this.node=e}},F9=(()=>{let t=class Wl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){let i=this._findOutlet(n);if(!i||(i.setOutputs(this._getOutputs(n)),!i.canBeConnected))return;let r=i.isConnectionFromOutlet?i:this._resolveOutput(i);!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 Lr(e))}_startDrag(e,n){this._mediator.execute(new Br(e,n))}static \u0275fac=function(n){return new(n||Wl)};static \u0275prov=y({token:Wl,factory:Wl.\u0275fac})};return t=P([R(ju)],t),t})(),Uu=class{event;node;static fToken=Symbol("CreateConnectionFromOutputPreparationRequest");constructor(o,e){this.event=o,this.node=e}},N9=(()=>{let t=class Kl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){if(!Jy(e.targetElement)||this._hasOutlet(n))return;let i=this._findOutput(e.targetElement);!i||!i.canBeConnected||this._startDrag(e.getPosition(),i)}_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 Br(e,n))}static \u0275fac=function(n){return new(n||Kl)};static \u0275prov=y({token:Kl,factory:Kl.\u0275fac})};return t=P([R(Uu)],t),t})(),$u=class{event;fTrigger;static fToken=Symbol("CreateConnectionPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},A9=(()=>{let t=class Yl{_mediator=p(V);_store=p(L);_dragContext=p(ge);handle({event:e,fTrigger:n}){if(!this._isValidConditions()||!this._isValidTrigger(e,n))return;let i=Qy(e.targetElement),r=!i&&Jy(e.targetElement);if(!i&&!r)return;let a=this._findOwnerNode(e.targetElement);a&&(i?this._mediator.execute(new ju(e,a)):this._mediator.execute(new Uu(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 pn(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Yl)};static \u0275prov=y({token:Yl,factory:Yl.\u0275fac})};return t=P([R($u)],t),t})(),Wu=class{event;static fToken=Symbol("ReassignConnectionFinalizeRequest");constructor(o){this.event=o}},t_=class{connectionId;endpoint;previousSourceId;nextSourceId;previousTargetId;nextTargetId;dropPosition;isSourceReassign;isTargetReassign;oldSourceId;newSourceId;oldTargetId;newTargetId;dropPoint;constructor(o,e,n,i,r,a,s){this.connectionId=o,this.endpoint=e,this.previousSourceId=n,this.nextSourceId=i,this.previousTargetId=r,this.nextTargetId=a,this.dropPosition=s,this.isSourceReassign=e==="source",this.isTargetReassign=e==="target",this.oldSourceId=n,this.newSourceId=i,this.oldTargetId=r,this.newTargetId=a,this.dropPoint=s}},L9=(()=>{let t=class Zl{_dragResult=p(fi);_mediator=p(V);_store=p(L);_dragContext=p(ge);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(),i=this._findConnectableConnector(e,n.candidates);i&&!this._isReassignedToDifferentConnector(n,i)||this._dragDirective.fReassignConnection.emit(this._buildEvent(n,e,i))}_findConnectableConnector(e,n){return this._mediator.execute(new Yr(e.getPosition(),n))}_isReassignedToDifferentConnector(e,n){let i=e.connection;return e.draggedEnd==="target"?i.fInputId()!==n.fId():i.fOutputId()!==n.fId()}_buildEvent(e,n,i){let r=e.connection;return new t_(r.fId(),e.draggedEnd,r.fOutputId(),e.draggedEnd==="source"?i?.fId():void 0,r.fInputId(),e.draggedEnd==="target"?i?.fId():void 0,n.getPosition())}static \u0275fac=function(n){return new(n||Zl)};static \u0275prov=y({token:Zl,factory:Zl.\u0275fac})};return t=P([R(Wu)],t),t})(),Ku=class{event;fTrigger;static fToken=Symbol("ReassignConnectionPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}};function B9(t,o){return tC(t,o)||V9(t,o)}function tC(t,o){return t.fDragHandleEnd()?.point&&nC(o,t.fDragHandleEnd().point)&&!t.fDraggingDisabled()}function V9(t,o){return!!t.fDragHandleStart()?.point&&nC(o,t.fDragHandleStart().point)&&!t.fDraggingDisabled()&&t.fReassignableStart()}function nC(t,o){return(t.x-o.x)**2+(t.y-o.y)**2<=8**2}function iC(t,o){return t&&t.distance<o.fSnapThreshold?t:void 0}function Yu(t){return dt.fromRect(oe.initialize(t.x,t.y))}var n_=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(o,e,n,i,r){this._mediator=o,this._behaviour=e,this._connection=n,this._sourceRef=i,this._targetRef=r,this._anchorRect=Yu(this._connection.line.point1)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Qp(this._target,this._targetRef.rect.gravityCenter)),this._candidates.some(o=>o.connector.fId()===this._source.fId())||this._candidates.push(this._sourceRef),this._mediator.execute(new Bo(this._candidates.map(o=>o.connector)))}setSnapConnection(o){this._snap=o,o&&(o.fInputId.set(this._connection.fInputId()),o.initialize())}onPointerMove(o){let e=this._anchorRect.addPoint(o),n=this._findClosest(e.gravityCenter),i=n?.connector.fConnectableSide??this._source.fConnectableSide;this._draw(e,i);let r=this._snap;r&&this._drawSnap(iC(n,r))}_findClosest(o){return this._mediator.execute(new ji(o,this._candidates))}_draw(o,e){let n=this._behaviour.handle(new wn(o,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(o){let e=this._snap;if(!e)return;if(!o){e.hide();return}let n=this._behaviour.handle(new wn(o.rect,this._targetRef.rect,e,o.connector.fConnectableSide,this._target.fConnectableSide,this._resolveRotationContext(o.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 Vo(this._candidates.map(o=>o.connector)))}_resolveRotationContext(o){return this._mediator.execute(new Gn(o))}},i_=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(o,e,n,i,r){this._mediator=o,this._behaviour=e,this._connection=n,this._sourceRef=i,this._targetRef=r,this._anchorRect=Yu(this._connection.line.point2)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Zr(this._source,this._sourceRef.rect.gravityCenter));let o=this._connection.fInputId();o&&!this._candidates.some(e=>e.connector.fId()===o)&&this._candidates.push(this._targetRef),this._mediator.execute(new Bo(this._candidates.map(e=>e.connector)))}setSnapConnection(o){this._snap=o,o&&(o.fOutputId.set(this._connection.fOutputId()),o.initialize())}onPointerMove(o){let e=this._anchorRect.addPoint(o),n=this._findClosest(e.gravityCenter),i=n?.connector.fConnectableSide??this._target.fConnectableSide;this._draw(e,i);let r=this._snap;r&&this._drawSnap(iC(n,r))}onPointerUp(){this._draw(this._anchorRect,this._targetRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Vo(this._candidates.map(o=>o.connector)))}_findClosest(o){return this._mediator.execute(new ji(o,this._candidates))}_draw(o,e){let n=this._behaviour.handle(new wn(this._sourceRef.rect,o,this._connection,this._source.fConnectableSide,e,this._resolveRotationContext(this._sourceRef.connector),void 0));this._connection.setLine(n),this._connection.redraw()}_drawSnap(o){let e=this._snap;if(!e)return;if(!o){e.hide();return}let n=this._behaviour.handle(new wn(this._sourceRef.rect,o.rect,e,this._source.fConnectableSide,o.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(o.connector)));e.show(),e.setLine(n),e.redraw()}_resolveRotationContext(o){return this._mediator.execute(new Gn(o))}},o_=(()=>{class t extends Nt{type="reassign-connection";kind="reassign-connection";data(){return{fConnectionId:this._connection.fId()}}_result=p(fi);_mediator=p(V);_connectionBehaviour=p(qo);_store=p(L);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 n_(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}_createTargetHandler(){return new i_(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:Yu(this._connection.line.point1),targetAnchorRect:Yu(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(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),z9=(()=>{let t=class Xl{_mediator=p(V);_store=p(L);_dragContext=p(ge);_dragInjector=p(Tt);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=Go(e.event.getPosition(),this._store.flowHost,this._transform),i=this._findConnectionAt(n);i&&(this._capturePointerDown(e),this._startDrag(i,n),queueMicrotask(()=>this._bringToFront(i)))}_findConnectionAt(e){return this._connections.find(n=>B9(n,e))}_capturePointerDown(e){this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=me.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(this._transform.scale)}_startDrag(e,n){let i=this._dragInjector.get(o_);i.initialize(e,tC(e,n)),this._dragContext.draggableItems=[i]}_isValidTrigger(e){return pn(e.event.originalEvent,e.fTrigger)}_bringToFront(e){this._mediator.execute(new $i(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Xl)};static \u0275prov=y({token:Xl,factory:Xl.\u0275fac})};return t=P([R(Ku)],t),t})(),Zu=class{event;static fToken=Symbol("DragConnectionWaypointFinalizeRequest");constructor(o){this.event=o}},Xu=class{connectionId;waypoints;constructor(o,e){this.connectionId=o,this.waypoints=e}},Qu=(()=>{class t extends Nt{type="move-connection-waypoint";kind="drag-connection-waypoint";_store=p(L);_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=be({},this._pick.candidate),this._waypointsComponent.insert(this._pick.candidate)):this._pick?.waypoint&&(this._point=be({},this._pick.waypoint),this._waypointsComponent.select(this._pick.waypoint)),this._redrawConnection()}onPointerMove(e){this._waypointsComponent.move(U.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 Xu(this._connection.fId(),this._connection.fWaypoints()?.waypoints()||[])}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),H9=(()=>{let t=class Ql{_dragContext=p(ge);get _fDragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isDroppedConnectionReassignEvent()&&this._fDragHandler.onPointerUp()}_isDroppedConnectionReassignEvent(){return this._dragContext.draggableItems.some(e=>e instanceof Qu)}static \u0275fac=function(n){return new(n||Ql)};static \u0275prov=y({token:Ql,factory:Ql.\u0275fac})};return t=P([R(Zu)],t),t})(),Ju=class{event;fTrigger;static fToken=Symbol("DragConnectionWaypointPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},q9=(()=>{let t=class Jl{_mediator=p(V);_store=p(L);_dragContext=p(ge);_dragInjector=p(Tt);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=Go(e.event.getPosition(),this._flowHost,this._transform),i=this._pickControlPoint(n);if(!i||!this._isValidTrigger(e))return;let r=this._dragInjector.get(Qu);r.setPick(i),this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=me.fromPoint(e.event.getPosition()).elementTransform(this._flowHost).div(this._transform.scale),this._dragContext.draggableItems=[r],queueMicrotask(()=>this._updateConnectionLayer(i.connection))}_pickControlPoint(e){if(this._dragContext.isEmpty())return m7(this._connections,e)}_isValidTrigger(e){return pn(e.event.originalEvent,e.fTrigger)}_updateConnectionLayer(e){this._mediator.execute(new $i(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Jl)};static \u0275prov=y({token:Jl,factory:Jl.\u0275fac})};return t=P([R(Ju)],t),t})(),G9=[R9,O9,F9,P9,N9,A9,L9,z9,q9,H9],ep=class{event;static fToken=Symbol("DropToGroupFinalizeRequest");constructor(o){this.event=o}},j9=1,Vr=(()=>{class t extends Nt{type="move-node-to-parent";kind="assign-to-container";_store=p(L);_dragSession=p(ge);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(yt.GROUPING.DROP_ACTIVE)}onPointerMove(e){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._updateActiveTarget(e),j9)}onPointerUp(){this._clearActiveTarget();for(let{node:e}of this._candidateGroups)e.hostElement.classList.remove(yt.GROUPING.DROP_ACTIVE);this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}_updateActiveTarget(e){let n=this._getPointerInFlow(e),i=this._findTargetUnderPointer(n);i?this._setActiveTarget(i):this._clearActiveTarget()}_getPointerInFlow(e){let n=me.fromPoint(this._dragSession.onPointerDownPosition).add(e),i=me.fromPoint(this._transform.position).add(this._transform.scaledPosition).div(this._transform.scale);return n.sub(i)}_findTargetUnderPointer(e){return this._candidateGroups.find(n=>oe.isIncludePoint(n.rect,e))}_setActiveTarget(e){this._activeTarget?.node!==e.node&&(this._clearActiveTarget(),this._activeTarget=e,e.node.setClass(yt.GROUPING.OVER_BOUNDARY))}_clearActiveTarget(){this._activeTarget?.node.removeClass(yt.GROUPING.OVER_BOUNDARY),this._activeTarget=null}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),tp=class{nodesAndGroups;static fToken=Symbol("CreateDragNodeHierarchyRequest");constructor(o){this.nodesAndGroups=o}},r_=class{rootHandlers;participants;constructor(o,e){this.rootHandlers=o,this.participants=e}},a_=class{fNodeIds;constructor(o){this.fNodeIds=o}},R_="move-node",O_="drag-node";function U9(t){return t.getEvent().kind===O_||t.getEvent().fEventType===R_}var hi=(()=>{class t extends Nt{type=R_;kind=O_;data(){return new a_(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 i=n.getLastRect();e=e?oe.union([e,i]):i}return e??oe.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(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),np=class{_limits;_quantizeStep;constructor(o,e=.5){this._limits=o,this._quantizeStep=e}applyInto(o,e){let{min:n,max:i}=this._limits,r=this._clamp(o.x,n.x,i.x),a=this._clamp(o.y,n.y,i.y),s=o.x-r,c=o.y-a,u=this._quantizeSigned(s,this._quantizeStep),f=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=f<0,e.edges.bottom=f>0,e.overflow.x=Math.abs(u),e.overflow.y=Math.abs(f)}_quantizeSigned(o,e){if(e<=0||o===0)return 0;let n=o/e;return(o>0?Math.ceil(n):Math.floor(n))*e}_clamp(o,e,n){return Math.min(Math.max(o,e),n)}},s_=class{_pointerDown;_vCellSize;_hCellSize;_snapWhileDragging;constructor(o,e){this._pointerDown=e,this._vCellSize=o.vCellSize(),this._hCellSize=o.hCellSize(),this._snapWhileDragging=o.fCellSizeWhileDragging()}snap(o,e){let n=e||this._snapWhileDragging;return this._strategies[+n](o)}_strategies={0:this._noSnap.bind(this),1:this._snapWithCellSize.bind(this)};_snapWithCellSize(o){return{x:this._snapToGrid(this._pointerDown.x+o.x,this._hCellSize)-this._pointerDown.x,y:this._snapToGrid(this._pointerDown.y+o.y,this._vCellSize)-this._pointerDown.y}}_noSnap(o){return o}_snapToGrid(o,e){return Math.round(o/e)*e}};function my(){return{value:{x:0,y:0},overflow:{x:0,y:0},edges:{left:!1,right:!1,top:!1,bottom:!1}}}var l_=class{_snapper;_hardClamp;_hardResult=my();_softClamps=[];_softResults=[];constructor(o,e,n){let i=o.get(L).fDraggable;this._snapper=new s_(i,e),this._hardClamp=new np(n.hard,.5);for(let r of n.soft)this._softClamps.push(new np(r.limits,.5)),this._softResults.push(my())}apply(o,e=!1){let n=this._snapper.snap(o,e);this._hardClamp.applyInto(n,this._hardResult);let i={x:this._hardResult.value.x,y:this._hardResult.value.y};for(let r=0;r<this._softClamps.length;r++)this._softClamps[r].applyInto(i,this._softResults[r]);return{hardDelta:i,soft:this._softResults}}finalize(o){return this.apply(o,!0)}};function _y(t,o,e){let{x:n,y:i,width:r,height:a}=t;return e.right&&o.x>0&&(r+=o.x),e.left&&o.x>0&&(n-=o.x,r+=o.x),e.bottom&&o.y>0&&(a+=o.y),e.top&&o.y>0&&(i-=o.y,a+=o.y),oe.initialize(n,i,r,a)}var c_=class extends Nt{_injector;nodeOrGroup;children;sourceConnectionHandlers;targetConnectionHandlers;type=R_;kind=O_;_startPosition=U.initialize();_startRect=oe.initialize();_applyConstraints=o=>o;_lastSoftResults=[];_deltaConstraints;_constraints;_lastPosition=U.initialize();_softParentConnectionHandlers=[];_mediator;constructor(o,e,n=[],i=[],r=[]){super(),this._injector=o,this.nodeOrGroup=e,this.children=n,this.sourceConnectionHandlers=i,this.targetConnectionHandlers=r,this._mediator=o.get(V),this._startRect=this._mediator.execute(new ot(e.hostElement)),this._startPosition=be({},e._position)}setConstraints(o){this._constraints=o,this._deltaConstraints=new l_(this._injector,this._startPosition,o),this._applyConstraints=e=>{let n=this._deltaConstraints.apply(e);return this._applySoftExpansions(n.soft),n.hardDelta}}setSoftParentConnectionHandlers(o){this._softParentConnectionHandlers=o}finalizeConstraints(){this._applyConstraints=o=>{let e=this._deltaConstraints.finalize(o);return this._applySoftExpansions(e.soft),e.hardDelta}}getLastRect(){return oe.initialize(this._lastPosition.x,this._lastPosition.y,this._startRect.width,this._startRect.height)}prepareDragSequence(){for(let o of this.children)o.prepareDragSequence();this.nodeOrGroup.hostElement.classList.add(yt.DRAG_AND_DROP.DRAGGING)}onPointerMove(o){let e=this._applyConstraints(o);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 o of this.children)o.onPointerUp();this.nodeOrGroup.position.set(this.nodeOrGroup._position),this.nodeOrGroup.hostElement.classList.remove(yt.DRAG_AND_DROP.DRAGGING),this._emitExpandedEvent()}_startPlus(o){return U.sum(this._startPosition,o)}_redraw(o){this._lastPosition=o,this.nodeOrGroup.updatePosition(o),this._mediator.execute(new Hi(this.nodeOrGroup.fId(),oe.initialize(o.x,o.y,this._startRect.width,this._startRect.height))),this.nodeOrGroup.redraw()}_applySoftExpansions(o){this._lastSoftResults=o;for(let e=0;e<o.length;e++){let n=o[e],i=this._constraints.soft[e],r=_y(i.boundingRect,n.overflow,n.edges);this._commitParentRect(i.nodeOrGroup,r)&&this._updateParentConnectionHandlers(e)}}_commitParentRect(o,e){let n=o._position.x!==e.x||o._position.y!==e.y||o._size?.width!==e.width||o._size?.height!==e.height;return o.updateSize({width:e.width,height:e.height}),o.updatePosition({x:e.x,y:e.y}),this._mediator.execute(new Hi(o.fId(),e)),o.redraw(),n}_updateParentConnectionHandlers(o){let e=this._softParentConnectionHandlers[o];if(!e)return;let n=new Map;for(let i of e.source){let r=this._readConnectorRect(i.connector,n);i.handler.setSourceDelta(this._buildDelta(i.baselineRect,r))}for(let i of e.target){let r=this._readConnectorRect(i.connector,n);i.handler.setTargetDelta(this._buildDelta(i.baselineRect,r))}}_readConnectorRect(o,e){let n=`${o.kind}::${o.fId()}`,i=e.get(n);if(i)return i;let r=this._mediator.execute(new Qt(o)).rect;return e.set(n,r),r}_buildDelta(o,e){return U.initialize(e.x-o.x,e.y-o.y)}_emitExpandedEvent(){for(let o=0;o<this._lastSoftResults.length;o++){let e=this._lastSoftResults[o];if(!e.overflow.x&&!e.overflow.y)continue;let n=this._constraints.soft[o],i=_y(n.boundingRect,e.overflow,e.edges);n.nodeOrGroup.sizeChange.emit(i)}}destroy(){for(let o of this.children)o.destroy?.();this.children=[],this.sourceConnectionHandlers=[],this.targetConnectionHandlers=[],this._lastSoftResults=[],this._applyConstraints=o=>o,this._softParentConnectionHandlers=[]}},$9=(()=>{let t=class ec{_injector=p(mt);handle({nodesAndGroups:e}){let n=this._createHandlerByNodeId(e),i=this._linkParentsAndCollectRoots(e,n);return new r_(i,Array.from(n.values()))}_createHandlerByNodeId(e){let n=new Map;for(let i of e)n.set(i.fId(),new c_(this._injector,i));return n}_linkParentsAndCollectRoots(e,n){let i=[];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):i.push(a)}return i}static \u0275fac=function(n){return new(n||ec)};static \u0275prov=y({token:ec,factory:ec.\u0275fac})};return t=P([R(tp)],t),t})(),ip=class{nodeOrGroup;static fToken=Symbol("BuildDragNodeConstraintsRequest");constructor(o){this.nodeOrGroup=o}},zr=class{nodeOrGroup;childrenPaddings;static fToken=Symbol("ReadNodeBoundsWithPaddingsRequest");constructor(o,e){this.nodeOrGroup=o,this.childrenPaddings=e}},d_=class{nodeOrGroup;boundingRect;innerRect;paddings;constructor(o,e,n,i){this.nodeOrGroup=o,this.boundingRect=e,this.innerRect=n,this.paddings=i}},W9=(()=>{let t=class tc{_mediator=p(V);handle({nodeOrGroup:e,childrenPaddings:n}){let i=this._readBoundingRect(e),r=this._readOwnPaddings(e,i),a=[r[0]+n[0],r[1]+n[1],r[2]+n[2],r[3]+n[3]],s=oe.initialize(i.x+a[0],i.y+a[1],i.width-a[0]-a[2],i.height-a[1]-a[3]);return new d_(e,i,s,a)}_readBoundingRect(e){return this._mediator.execute(new ot(e.hostElement))}_readOwnPaddings(e,n){return this._mediator.execute(new Ui(e,n))}static \u0275fac=function(n){return new(n||tc)};static \u0275prov=y({token:tc,factory:tc.\u0275fac})};return t=P([R(zr)],t),t})(),K9=(()=>{let t=class nc{_mediator=p(V);handle({nodeOrGroup:e}){let n=this._readCurrentRect(e),i=this._readParentsChain(e);return this._buildConstraints(i,n)}_readCurrentRect(e){return this._mediator.execute(new ot(e.hostElement))}_readParentsChain(e){return this._mediator.execute(new Lo(e))??[]}_buildConstraints(e,n){let i=[],r=Wy(),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))i.push(this._makeSoftLimit(s,c.boundingRect,u));else{r=u;break}}return{soft:i,hard:r}}_readParentBounds(e,n){return this._mediator.execute(new zr(e,n))}_calculateDifference(e,n){return{min:this._calculateMinimumDifference(e,n),max:this._calculateMaximumDifference(e,n)}}_calculateMinimumDifference(e,n){return U.initialize(e.x-n.x,e.y-n.y)}_calculateMaximumDifference(e,n){return U.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,i){return{nodeOrGroup:e,boundingRect:n,initialSize:e._size,limits:i}}static \u0275fac=function(n){return new(n||nc)};static \u0275prov=y({token:nc,factory:nc.\u0275fac})};return t=P([R(ip)],t),t})(),op=class{rootHandlers;participants;static fToken=Symbol("CreateDragNodeHandlerRequest");constructor(o,e){this.rootHandlers=o,this.participants=e}},rp=class{dragHandler;constraints;handlerPool;static fToken=Symbol("AttachSoftParentConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.constraints=e,this.handlerPool=n}},Hr=class{_mediator=p(V);_store=p(L);_behaviour=p(qo);_source;_target;_sourceRef;_targetRef;_sourceDelta=U.initialize();_targetDelta=U.initialize();connection;initialize(o){this.connection=o,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(o){this._sourceDelta=o,this._mediator.execute(new zi(this._source.fId(),this._source.kind,this._withDelta(this._sourceRef.rect,o)))}setTargetDelta(o){this._targetDelta=o,this._mediator.execute(new zi(this._target.fId(),this._target.kind,this._withDelta(this._targetRef.rect,o)))}redraw(){let o=this._buildLine();this.connection.setLine(o),this.connection.redraw()}_buildLine(){let o=dt.fromRoundedRect(this._sourceRef.rect).addPoint(this._sourceDelta),e=dt.fromRoundedRect(this._targetRef.rect).addPoint(this._targetDelta);return this._behaviour.handle(new wn(o,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(o){return this._mediator.execute(new Qt(o))}_withDelta(o,e){return dt.fromRoundedRect(o).addPoint(e)}_resolveRotationContext(o){return this._mediator.execute(new Gn(o))}},qr=(()=>{class t extends Hr{setSourceDelta(e){super.setSourceDelta(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Gr=(()=>{class t extends Hr{_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(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),jr=(()=>{class t extends Hr{setTargetDelta(e){super.setTargetDelta(e),this.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Y9=(()=>{let t=class ic{_store=p(L);_mediator=p(V);_dragInjector=p(Tt);handle({dragHandler:e,constraints:n,handlerPool:i}){let r=n.soft.map(a=>this._buildParentConnectionHandlers(a.nodeOrGroup,i));e.setSoftParentConnectionHandlers(r)}_buildParentConnectionHandlers(e,n){let i=this._store.outputs.getAll().filter(f=>f.fNodeId===e.fId()),r=this._store.inputs.getAll().filter(f=>f.fNodeId===e.fId());if(!i.length&&!r.length)return{source:[],target:[]};let a=new Set(i.map(f=>f.fId())),s=new Set(r.map(f=>f.fId())),c=new Map,u={source:[],target:[]};for(let f of this._store.connections.getAll()){let g=a.has(f.fOutputId()),x=s.has(f.fInputId());if(!g&&!x)continue;let I=this._getExistingConnectionHandler(n,f);if(I||(I=this._createConnectionHandler(f,g,x),n.push(I)),g){let S=this._store.outputs.require(f.fOutputId());u.source.push({handler:I,connector:S,baselineRect:this._readConnectorRect(S,c)})}if(x){let S=this._store.inputs.require(f.fInputId());u.target.push({handler:I,connector:S,baselineRect:this._readConnectorRect(S,c)})}}return u}_getExistingConnectionHandler(e,n){return e.find(i=>i.connection.fId()===n.fId())}_createConnectionHandler(e,n,i){let r;return n&&i?r=this._dragInjector.createInstance(Gr):n?r=this._dragInjector.createInstance(qr):r=this._dragInjector.createInstance(jr),r.initialize(e),r}_readConnectorRect(e,n){let i=`${e.kind}::${e.fId()}`,r=n.get(i);if(r)return r;let a=this._mediator.execute(new Qt(e)).rect;return n.set(i,a),a}static \u0275fac=function(n){return new(n||ic)};static \u0275prov=y({token:ic,factory:ic.\u0275fac})};return t=P([R(rp)],t),t})(),Z9=(()=>{let t=class oc{_dragInjector=p(Tt);_mediator=p(V);handle({rootHandlers:e,participants:n}){let i=this._collectConnectionHandlers(n);this._applyConstraintsToRoots(e,i);let r=this._dragInjector.createInstance(hi);return r.initialize(n,e),r}_applyConstraintsToRoots(e,n){for(let i of e){let r=this._calculateConstraints(i.nodeOrGroup);i.setConstraints(r),this._attachSoftParentConnectionHandlers(i,r,n)}}_collectConnectionHandlers(e){let n=new Map;for(let i of e){for(let r of i.sourceConnectionHandlers)n.set(r.connection.fId(),r);for(let r of i.targetConnectionHandlers)n.set(r.connection.fId(),r)}return Array.from(n.values())}_attachSoftParentConnectionHandlers(e,n,i){this._mediator.execute(new rp(e,n,i))}_calculateConstraints(e){return this._mediator.execute(new ip(e))}static \u0275fac=function(n){return new(n||oc)};static \u0275prov=y({token:oc,factory:oc.\u0275fac})};return t=P([R(op)],t),t})(),ap=class{dragHandler;sourceIds;handlerPool;static fToken=Symbol("AttachTargetConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.sourceIds=e,this.handlerPool=n}},X9=(()=>{let t=class rc{_store=p(L);_dragInjector=p(Tt);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(i=>n.has(i.fInputId()))}_getNodeInputIds(e){return this._store.inputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let i=this._getExistingConnectionHandler(n.handlerPool,e);i||(i=this._createConnectionHandler(n.sourceIds,e),n.handlerPool.push(i)),n.dragHandler.targetConnectionHandlers.push(i)}_getExistingConnectionHandler(e,n){return e.find(i=>i.connection.fId()===n.fId())}_createConnectionHandler(e,n){let i;return e.includes(n.fOutputId())?i=this._dragInjector.createInstance(Gr):i=this._dragInjector.createInstance(jr),i.initialize(n),i}static \u0275fac=function(n){return new(n||rc)};static \u0275prov=y({token:rc,factory:rc.\u0275fac})};return t=P([R(ap)],t),t})(),sp=class{dragHandler;targetIds;handlerPool;static fToken=Symbol("AttachSourceConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.targetIds=e,this.handlerPool=n}},Q9=(()=>{let t=class ac{_store=p(L);_dragInjector=p(Tt);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(i=>n.has(i.fOutputId()))}_getNodeOutputIds(e){return this._store.outputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let i=this._getExistingConnectionHandler(n.handlerPool,e);i||(i=this._createConnectionHandler(n.targetIds,e),n.handlerPool.push(i)),n.dragHandler.sourceConnectionHandlers.push(i)}_getExistingConnectionHandler(e,n){return e.find(i=>i.connection.fId()===n.fId())}_createConnectionHandler(e,n){let i;return e.includes(n.fInputId())?i=this._dragInjector.createInstance(Gr):i=this._dragInjector.createInstance(qr),i.initialize(n),i}static \u0275fac=function(n){return new(n||ac)};static \u0275prov=y({token:ac,factory:ac.\u0275fac})};return t=P([R(sp)],t),t})(),lp=class{nodeOrGroup;static fToken=Symbol("AttachDragNodeHandlerFromSelectionRequest");constructor(o){this.nodeOrGroup=o}},J9=(()=>{let t=class sc{_mediator=p(V);_store=p(L);_dragSession=p(ge);handle({nodeOrGroup:e}){let n=this._collectSelected(e),i=this._withDeepChildren(n),r=this._mediator.execute(new tp(i)),a=this._collectSourceConnectorIds(i),s=this._collectTargetConnectorIds(i);return this._attachConnectionHandlers(r.participants,a,s),this._mediator.execute(new op(r.rootHandlers,r.participants))}_collectSelected(e){let n=[];for(let i of this._dragSession.selectedItems){let r=this._findNodeByHost(i.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 i of e){n.push(i);let r=this._mediator.execute(new Ho(i.fId()));n.push(...r)}return n}_collectSourceConnectorIds(e){return cm(e,n=>this._store.outputs.getAll().filter(i=>i.fNodeId===n.fId()).map(i=>i.fId()))}_collectTargetConnectorIds(e){return cm(e,n=>this._store.inputs.getAll().filter(i=>i.fNodeId===n.fId()).map(i=>i.fId()))}_attachConnectionHandlers(e,n,i){let r=[];for(let a of e)this._mediator.execute(new sp(a,i,r)),this._mediator.execute(new ap(a,n,r))}static \u0275fac=function(n){return new(n||sc)};static \u0275prov=y({token:sc,factory:sc.\u0275fac})};return t=P([R(lp)],t),t})(),eB=[$9,K9,Z9,X9,Q9,Y9,W9,J9];function tB(t,o,e=10){let n=o.x,i=o.y,r=n+o.width,a=i+o.height,s=o.gravityCenter.x,c=o.gravityCenter.y,u,f,g=1/0,x,I,S=1/0,N=(Z,ne)=>{let pe=ne<0?-ne:ne;pe<=e&&pe<g&&(g=pe,u=Z,f=ne)},j=(Z,ne)=>{let pe=ne<0?-ne:ne;pe<=e&&pe<S&&(S=pe,x=Z,I=ne)};for(let Z=0;Z<t.length;Z++){let ne=t[Z],pe=ne.x,Oe=ne.y,De=pe+ne.width,je=Oe+ne.height,jt=ne.gravityCenter.x,ft=ne.gravityCenter.y;N(pe,n-pe),N(De,n-De),N(jt,s-jt),N(pe,r-pe),N(De,r-De),j(Oe,i-Oe),j(je,i-je),j(ft,c-ft),j(Oe,a-Oe),j(je,a-je)}return{x:{guide:u,delta:f},y:{guide:x,delta:I}}}var gy=["left","top","width","height"],cp=class{_element;constructor(o,e,n="f-line"){this._element=o.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(o){for(let e of gy){let n=o[e];n!=null&&(this._element.style[e]=`${n}px`)}}clearRect(){for(let o of gy)this._element.style.removeProperty(o)}destroy(){this._element.remove()}},u_=class{_horizontal;_vertical;constructor(o,e){this._horizontal=new cp(o,e),this._vertical=new cp(o,e),this._horizontal.hide(),this._vertical.hide()}drawVerticalLine(o,e,n){this._vertical.show(),this._vertical.render({left:o*n.scale+n.position.x+n.scaledPosition.x,top:0,width:1,height:e.height})}drawHorizontalLine(o,e,n){this._horizontal.show(),this._horizontal.render({left:0,top:o*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()}},dp=class{static fToken=Symbol("MagneticLinesPreparationRequest")},nB=(()=>{let t=class lc{_mediator=p(V);_store=p(L);_browser=p(ut);_injector=p(mt);_dragSession=p(ge);_renderer;handle(e){let n=this._store.instances.get(Ye.MAGNETIC_LINES);if(!n)return;let i=this._dragSession.draggableItems.find(r=>r instanceof hi);i&&i.setMagneticLines(new p_(this._injector,this._renderer??this._createRenderer(n),this._flowHostSize(),this._notDraggedRects(this._draggedNodes(i.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_flowHostSize(){return this._store.flowHost.getBoundingClientRect()}_createRenderer({hostElement:e}){return this._renderer=new u_(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 ot(r.hostElement)))}static \u0275fac=function(n){return new(n||lc)};static \u0275prov=y({token:lc,factory:lc.\u0275fac})};return t=P([R(dp)],t),t})(),p_=class{_renderer;_size;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;constructor(o,e,n,i){this._renderer=e,this._size=n,this._rects=i;let r=o.get(L);this._alignThreshold=r.instances.require(Ye.MAGNETIC_LINES).threshold(),this._canvasTransform=r.transform}scheduleRender(o){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderGuides(this._computeGuides(o)),15)}_renderGuides(o){this._renderVertical(o),this._renderHorizontal(o)}_renderVertical(o){o.x.guide!==void 0?this._renderer.drawVerticalLine(o.x.guide,this._size,this._canvasTransform):this._renderer.hideVertical()}_renderHorizontal(o){o.y.guide!==void 0?this._renderer.drawHorizontalLine(o.y.guide,this._size,this._canvasTransform):this._renderer.hideHorizontal()}_computeGuides(o){return tB(this._rects,o,this._alignThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},by=["top","center","bottom"],vy=["left","center","right"];function iB(t,o,e=10,n=10){let i=o.x,r=o.y,a=i+o.width,s=r+o.height,c=o.gravityCenter.x,u=o.gravityCenter.y,f=oB(t,o,i,r,a,s,c,u,e,n),g=rB(t,o,i,r,a,s,c,u,e,n);return f&&(!g||f.absDelta<=g.absDelta)?{axis:"x",delta:f.delta,gap:f.gap,rects:f.rects,alignMode:f.alignMode,crossDelta:f.crossDelta}:g?{axis:"y",delta:g.delta,gap:g.gap,rects:g.rects,alignMode:g.alignMode,crossDelta:g.crossDelta}:{rects:[]}}function oB(t,o,e,n,i,r,a,s,c,u){let f=1/0,g,x=0,I,S=[],N=0,j=[],Z=[],ne=[];for(let pe=0;pe<by.length;pe++){let Oe=pe===0?n:pe===1?s:r;j.length=0,Z.length=0,ne.length=0;let De=1/0,je=-1/0,jt=0,ft=1/0,xt=1/0;for(let Ge=0;Ge<t.length;Ge++){let Ne=t[Ge],ar=pe===0?Ne.y:pe===1?Ne.gravityCenter.y:Ne.y+Ne.height,Tf=Oe-ar,Vn=ko(Tf);if(Vn>c)continue;j.push(Ge),Z.push(Ne.x),ne.push(Ne.x+Ne.width);let sr=Ne.y,lr=Ne.y+Ne.height;sr<De&&(De=sr),lr>je&&(je=lr),(Vn<ft||Vn===ft&&Ge<xt)&&(ft=Vn,jt=ar,xt=Ge)}let nt=j.length;if(nt<2)continue;oC(j,Z,ne);let pt=0;for(;pt<nt&&Z[pt]<=a;)pt++;let ki=pt>0&&pt<nt,Mt,Ut;ki?(Mt=pt-1,Ut=pt):pt<=0?(Mt=0,Ut=1):(Mt=nt-2,Ut=nt-1);let $t=Z[Ut]-ne[Mt];if($t<0)continue;let Ct;if(ki){Ct=ne[Mt]+$t;let Ge=Ct+o.width,Ne=Z[Ut]-Ge;if(ko(Ne-$t)>u)continue}else pt<=0?Ct=Z[0]-$t-o.width:Ct=ne[nt-1]+$t;let rr=e-Ct,Ii=ko(rr);if(Ii>u||Ii>=f)continue;let _n=aB(j,Z,ne,De,je);if(ki){let Ge=Ct,Ne=Ct+o.width;_n.push({left:ne[Mt],top:De,width:Ge-ne[Mt],height:je-De}),_n.push({left:Ne,top:De,width:Z[Ut]-Ne,height:je-De})}else if(pt<=0){let Ge=Ct+o.width;_n.push({left:Ge,top:De,width:Z[0]-Ge,height:je-De})}else _n.push({left:ne[nt-1],top:De,width:Ct-ne[nt-1],height:je-De});let wf=Oe-jt;f=Ii,g=rr,x=$t,I=by[pe],S=_n,N=wf}if(!(g===void 0||I===void 0))return{delta:g,absDelta:f,gap:x,rects:S,alignMode:I,crossDelta:N}}function rB(t,o,e,n,i,r,a,s,c,u){let f=1/0,g,x=0,I,S=[],N=0,j=[],Z=[],ne=[];for(let pe=0;pe<vy.length;pe++){let Oe=pe===0?e:pe===1?a:i;j.length=0,Z.length=0,ne.length=0;let De=1/0,je=-1/0,jt=0,ft=1/0,xt=1/0;for(let Ge=0;Ge<t.length;Ge++){let Ne=t[Ge],ar=pe===0?Ne.x:pe===1?Ne.gravityCenter.x:Ne.x+Ne.width,Tf=Oe-ar,Vn=ko(Tf);if(Vn>c)continue;j.push(Ge),Z.push(Ne.y),ne.push(Ne.y+Ne.height);let sr=Ne.x,lr=Ne.x+Ne.width;sr<De&&(De=sr),lr>je&&(je=lr),(Vn<ft||Vn===ft&&Ge<xt)&&(ft=Vn,jt=ar,xt=Ge)}let nt=j.length;if(nt<2)continue;oC(j,Z,ne);let pt=0;for(;pt<nt&&Z[pt]<=s;)pt++;let ki=pt>0&&pt<nt,Mt,Ut;ki?(Mt=pt-1,Ut=pt):pt<=0?(Mt=0,Ut=1):(Mt=nt-2,Ut=nt-1);let $t=Z[Ut]-ne[Mt];if($t<0)continue;let Ct;if(ki){Ct=ne[Mt]+$t;let Ge=Ct+o.height,Ne=Z[Ut]-Ge;if(ko(Ne-$t)>u)continue}else pt<=0?Ct=Z[0]-$t-o.height:Ct=ne[nt-1]+$t;let rr=n-Ct,Ii=ko(rr);if(Ii>u||Ii>=f)continue;let _n=sB(j,Z,ne,De,je);if(ki){let Ge=Ct,Ne=Ct+o.height;_n.push({left:De,top:ne[Mt],width:je-De,height:Ge-ne[Mt]}),_n.push({left:De,top:Ne,width:je-De,height:Z[Ut]-Ne})}else if(pt<=0){let Ge=Ct+o.height;_n.push({left:De,top:Ge,width:je-De,height:Z[0]-Ge})}else _n.push({left:De,top:ne[nt-1],width:je-De,height:Ct-ne[nt-1]});let wf=Oe-jt;f=Ii,g=rr,x=$t,I=vy[pe],S=_n,N=wf}if(!(g===void 0||I===void 0))return{delta:g,absDelta:f,gap:x,rects:S,alignMode:I,crossDelta:N}}function aB(t,o,e,n,i){let r=[],a=i-n;for(let s=0;s<t.length-1;s++){let c=o[s+1]-e[s];c<0||r.push({left:e[s],top:n,width:c,height:a})}return r}function sB(t,o,e,n,i){let r=[],a=i-n;for(let s=0;s<t.length-1;s++){let c=o[s+1]-e[s];c<0||r.push({left:n,top:e[s],width:a,height:c})}return r}function oC(t,o,e){for(let n=1;n<o.length;n++){let i=o[n],r=e[n],a=t[n],s=n-1;for(;s>=0;){let c=o[s],u=t[s];if(c<i||c===i&&u<a)break;o[s+1]=c,e[s+1]=e[s],t[s+1]=u,s--}o[s+1]=i,e[s+1]=r,t[s+1]=a}}function ko(t){return t<0?-t:t}var h_=class{_element;_isVisible=!1;_left=Number.NaN;_top=Number.NaN;_width=Number.NaN;_height=Number.NaN;constructor(o,e,n="f-rect"){this._element=o.document.createElement("div"),this._element.classList.add(n);let i=this._element.style;i.position="absolute",i.display="none",i.boxSizing="border-box",i.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(o,e,n,i){let r=this._element.style;o!==this._left&&(this._left=o,r.left=o+"px"),e!==this._top&&(this._top=e,r.top=e+"px"),n!==this._width&&(this._width=n,r.width=n+"px"),i!==this._height&&(this._height=i,r.height=i+"px")}clearRect(){this._left=Number.NaN,this._top=Number.NaN,this._width=Number.NaN,this._height=Number.NaN;let o=this._element.style;o.removeProperty("left"),o.removeProperty("top"),o.removeProperty("width"),o.removeProperty("height")}destroy(){this._element.remove()}},f_=class{_browser;_hostElement;_className;_pool=[];_activeCount=0;constructor(o,e,n="f-rect"){this._browser=o,this._hostElement=e,this._className=n}draw(o,e){let n=e.scale,i=e.position.x+e.scaledPosition.x,r=e.position.y+e.scaledPosition.y;for(let a=0;a<o.length;a++){let s=this._getOrCreate(a),c=o[a];s.show(),s.render(c.left*n+i,c.top*n+r,c.width*n,c.height*n)}for(let a=o.length;a<this._activeCount;a++)this._pool[a].hide();this._activeCount=o.length}hideAll(){for(let o=0;o<this._activeCount;o++)this._pool[o].hide();this._activeCount=0}destroy(){for(let o of this._pool)o.destroy();this._pool.length=0,this._activeCount=0}_getOrCreate(o){if(o<this._pool.length)return this._pool[o];let e=new h_(this._browser,this._hostElement,this._className);return this._pool.push(e),e}},up=class{static fToken=Symbol("MagneticRectsPreparationRequest")},lB=(()=>{let t=class cc{_mediator=p(V);_store=p(L);_browser=p(ut);_injector=p(mt);_dragSession=p(ge);_renderer;handle(e){let n=this._store.instances.get(Ye.MAGNETIC_RECTS);if(!n)return;let i=this._dragSession.draggableItems.find(r=>r instanceof hi);i&&i.setMagneticRects(new m_(this._injector,this._getRenderer(n),this._notDraggedRects(this._draggedNodes(i.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_getRenderer(e){return this._renderer||(this._renderer=new f_(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 ot(r.hostElement)))}static \u0275fac=function(n){return new(n||cc)};static \u0275prov=y({token:cc,factory:cc.\u0275fac})};return t=P([R(up)],t),t})(),m_=class{_renderer;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;_spacingThreshold=10;constructor(o,e,n){this._renderer=e,this._rects=n;let i=o.get(L),r=i.instances.require(Ye.MAGNETIC_RECTS);this._alignThreshold=r.alignThreshold(),this._spacingThreshold=r.spacingThreshold(),this._canvasTransform=i.transform}scheduleRender(o){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderRects(this._computeRects(o)),15)}_renderRects(o){if(o.axis!==void 0&&o.delta!==void 0&&o.rects.length>0){this._renderer.draw(o.rects,this._canvasTransform);return}this._renderer.hideAll()}_computeRects(o){return iB(this._rects,o,this._alignThreshold,this._spacingThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},pp=class{event;static fToken=Symbol("DragNodeFinalizeRequest");constructor(o){this.event=o}},__=class{nodes;fNodes;constructor(o){this.nodes=o,this.fNodes=o}},cB=(()=>{let t=class dc{_mediator=p(V);_store=p(L);_dragSession=p(ge);_dragHandler;handle({event:e}){if(this._dragHandler=this._getDragHandler(),!this._dragHandler)return;let n=this._buildDragDelta(e.getPosition()),i=this._dragHandler.calculateMagneticSnaps(n),r=this._applySnapToDelta(n,i.lines,i.rects);this._finalizeMove(this._dragHandler,r),this._emitNodeIntersectIfNeeded(this._dragHandler)}_getDragHandler(){return this._dragSession.draggableItems.find(U9)}_buildDragDelta(e){return me.fromPoint(e).elementTransform(this._store.flowHost).div(this._dragSession.onPointerDownScale).sub(this._dragSession.onPointerDownPosition)}_applySnapToDelta(e,n,i){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(i)&&(i.axis==="x"?(r=e.x-i.delta,a=e.y-(i.crossDelta??0)):(a=e.y-i.delta,r=e.x-(i.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 i of e.roots)i.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 __(a)}_emitNodeIntersectIfNeeded(e){if(!this._isDraggedJustOneNode(e)||!this._store.fDraggable?.fEmitOnNodeIntersect)return;let n=e.roots[0].nodeOrGroup;queueMicrotask(()=>this._mediator.execute(new Au(n)))}_isDraggedJustOneNode(e){return e.roots.length===1}static \u0275fac=function(n){return new(n||dc)};static \u0275prov=y({token:dc,factory:dc.\u0275fac})};return t=P([R(pp)],t),t})(),hp=class{event;trigger;static fToken=Symbol("DragNodePreparationRequest");constructor(o,e){this.event=o,this.trigger=e}},dB=(()=>{let t=class uc{_mediator=p(V);_store=p(L);_dragSession=p(ge);handle({event:e,trigger:n}){if(!this._canStartDrag(e,n))return;let i=this._findDraggableNode(e.targetElement);i&&(this._storePointerDownContext(e),this._dragSession.draggableItems=[this._buildDragNodeHandler(i)],this._mediator.execute(new dp),this._mediator.execute(new up))}_canStartDrag(e,n){return this._dragSession.isEmpty()&&this._isDragHandle(e.targetElement)&&pn(e.originalEvent,n)}_isDragHandle(e){return Cr(e,".f-drag-handle")}_findDraggableNode(e){let n=this._store.nodes.getAll();for(let i of n)if(!i.fDraggingDisabled()&&i.isContains(e))return i}_storePointerDownContext(e){this._dragSession.onPointerDownScale=this._store.transform.scale,this._dragSession.onPointerDownPosition=me.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(this._store.transform.scale)}_buildDragNodeHandler(e){return(e.fSelectionDisabled()||!e.isSelected())&&queueMicrotask(()=>{this._mediator.execute(new zo(e))}),this._mediator.execute(new lp(e))}static \u0275fac=function(n){return new(n||uc)};static \u0275prov=y({token:uc,factory:uc.\u0275fac})};return t=P([R(hp)],t),t})(),uB=[...eB,nB,lB,cB,dB],g_=class{targetGroupId;nodeIds;dropPosition;fTargetNode;fNodes;fDropPosition;constructor(o,e,n){this.targetGroupId=o,this.nodeIds=e,this.dropPosition=n,this.fTargetNode=o,this.fNodes=e,this.fDropPosition=n}},pB=(()=>{let t=class pc{_dragSession=p(ge);_store=p(L);handle({event:e}){let n=this._findDropHandler();if(!n)return;let i=n.activeTarget?.node;i&&this._emitDropToGroupEvent(i.fId(),e),n.onPointerUp?.()}_findDropHandler(){return this._dragSession.draggableItems.find(e=>e instanceof Vr)}_emitDropToGroupEvent(e,n){this._store.fDraggable?.fDropToGroup.emit(new g_(e,this._getTopLevelDraggedIds(),n.getPosition()))}_getTopLevelDraggedIds(){let n=this._getMoveSummaryHandler().items.map(a=>a.nodeOrGroup),i=new Set(n.map(a=>a.fId())),r=[];for(let a of n){let s=a.fParentId();(!s||!i.has(s))&&r.push(a.fId())}return r}_getMoveSummaryHandler(){let e=this._dragSession.draggableItems.find(n=>n instanceof hi);if(!e)throw new Error("DropToGroup requires DragNodeHandler.");return e}static \u0275fac=function(n){return new(n||pc)};static \u0275prov=y({token:pc,factory:pc.\u0275fac})};return t=P([R(ep)],t),t})(),fp=class{event;static fToken=Symbol("DropToGroupPreparationRequest");constructor(o){this.event=o}},mp=class{candidates;static fToken=Symbol("SortDropCandidatesByLayerRequest");constructor(o){this.candidates=o}},hB=(()=>{let t=class hc{handle({candidates:e}){let n=e.map((i,r)=>({candidate:i,index:r}));return n.sort((i,r)=>{let a=this._compareDomOrder(i.candidate.node.hostElement,r.candidate.node.hostElement);return a!==0?-a:i.index-r.index}),n.map(i=>i.candidate)}_compareDomOrder(e,n){if(e===n)return 0;let i=e.compareDocumentPosition(n);if((i&Node.DOCUMENT_POSITION_FOLLOWING)!==0)return-1;if((i&Node.DOCUMENT_POSITION_PRECEDING)!==0)return 1;if(i&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||hc)};static \u0275prov=y({token:hc,factory:hc.\u0275fac})};return t=P([R(mp)],t),t})(),b_=class{_onPointerDown;_limit;_vCellSize;_hCellSize;_adjustCellSize;constructor(o,e,n){this._onPointerDown=e,this._limit=n;let i=o.get(L);this._vCellSize=i.fDraggable.vCellSize(),this._hCellSize=i.fDraggable.hCellSize(),this._adjustCellSize=i.fDraggable.fCellSizeWhileDragging()}limit(o){let{min:e,max:n}=this._limit,{x:i,y:r}=this._cellSizeStrategies[+this._adjustCellSize](o);return{x:this._clamp(i,e.x,n.x),y:this._clamp(r,e.y,n.y)}}_cellSizeStrategies={0:this._skipCellSize.bind(this),1:this._applyCellSize.bind(this)};_applyCellSize(o){return{x:this._snapToGrid(this._onPointerDown.x+o.x,this._hCellSize)-this._onPointerDown.x,y:this._snapToGrid(this._onPointerDown.y+o.y,this._vCellSize)-this._onPointerDown.y}}_skipCellSize(o){return o}_clamp(o,e,n){return Math.min(Math.max(o,e),n)}_snapToGrid(o,e){return Math.round(o/e)*e}},_p=class{externalItem;static fToken=Symbol("DragExternalItemCreatePlaceholderRequest");constructor(o){this.externalItem=o}},fB=(()=>{let t=class fc{_browser=p(ut);_containerRef=p(Ka);handle({externalItem:e}){let{hostElement:n,placeholder:i}=e,r=i(),a=r?this._fromTemplate(r):this._fromHost(n);return a.classList.add("f-external-item-placeholder"),a.style.pointerEvents="none",a}_fromTemplate(e){return pm(this._createViewRef(e),this._browser.document)}_fromHost(e){return dm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}static \u0275fac=function(n){return new(n||fc)};static \u0275prov=y({token:fc,factory:fc.\u0275fac})};return t=P([R(_p)],t),t})(),gp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePreviewRequest");constructor(o){this.externalItem=o}},mB=(()=>{let t=class mc{_browser=p(ut);_containerRef=p(Ka);handle({externalItem:e}){let{hostElement:n,preview:i}=e,r=i(),a=r?this._fromTemplate(r):this._fromHost(n);return this._setPreviewStyles(a),Qv(a),a.classList.add("f-external-item-preview"),a}_fromTemplate(e){return pm(this._createViewRef(e),this._browser.document)}_fromHost(e){return dm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}_setPreviewStyles(e){um(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||mc)};static \u0275prov=y({token:mc,factory:mc.\u0275fac})};return t=P([R(gp)],t),t})(),bp=class{event;static fToken=Symbol("DragExternalItemFinalizeRequest");constructor(o){this.event=o}},v_=class{externalItemRect;data;targetContainerId;dropPosition;rect;fTargetNode;fDropPosition;constructor(o,e,n,i){this.externalItemRect=o,this.data=e,this.targetContainerId=n,this.dropPosition=i,this.rect=o,this.fTargetNode=n,this.fDropPosition=i}},_B="external-item",gB="drag-external-item";function bB(t){return t.getEvent().kind===gB||t.getEvent().fEventType===_B}var vB=(()=>{let t=class _c{_result=p(fi);_mediator=p(V);_store=p(L);_dragSession=p(ge);_browser=p(ut);get _createNodeEmitter(){return this._store.fDraggable?.fCreateNode}handle(e){let n=this._findExternalItemHandler();if(!n)return;let i=this._getDestinationNodeOrGroupId();this._emitEvent(this._getElementsFromPoint(e.event.getPosition()),i,e.event.getPosition()),n.onPointerUp(),this._dragSession.draggableItems=[]}_findExternalItemHandler(){return this._dragSession.draggableItems.find(e=>bB(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 Vr);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,i){this._isPointerInCanvasRect(e)&&this._createNodeEmitter?.emit(new v_(this._getPreviewRect(),this._result.getData().externalItem.data(),n,n?i:void 0))}_isPointerInCanvasRect(e){return e.length?this._store.flowHost.contains(e[0]):!1}_getPreviewRect(){return this._mediator.execute(new ot(this._result.getData().preview))}static \u0275fac=function(n){return new(n||_c)};static \u0275prov=y({token:_c,factory:_c.\u0275fac})};return t=P([R(bp)],t),t})(),y_=class{data;constructor(o){this.data=o}},vp=class extends Nt{_externalItem;_pointerDownClientPosition;type="external-item";kind="drag-external-item";data(){return new y_(this._externalItem.data())}_result;_mediator;_browser;_store;_previewEl;_placeholderEl;_startRect=oe.initialize();_pointerDownRect=oe.initialize();_absoluteOffsetFromFlow=U.initialize();_grabOffsetFromPointer=U.initialize();_originalParent;_originalNextSibling;_originalDisplay;_applyConstraints=o=>o;constructor(o,e,n){super(),this._externalItem=e,this._pointerDownClientPosition=n,this._store=o.get(L),this._result=o.get(fi),this._mediator=o.get(V),this._browser=o.get(ut),this._originalDisplay=this._host.style.display,this._initConstraints(o)}get _host(){return this._externalItem.hostElement}get _overlayRoot(){return this._browser.document.fullscreenElement??this._browser.document.body}get _transform(){return this._store.transform}_initConstraints(o){this._startRect=this._getStartRect();let e=new b_(o,this._startRect,Wy());this._applyConstraints=n=>e.limit(n)}_getStartRect(){return this._mediator.execute(new ot(this._externalItem.hostElement))}prepareDragSequence(){this._pointerDownRect=this._readAbsoluteRect(this._host),this._absoluteOffsetFromFlow=me.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 o=this._host.parentNode;if(!o){this._originalParent=void 0,this._originalNextSibling=null;return}this._originalParent=o,this._originalNextSibling=this._host.nextSibling}_createPreview(){let o=this._mediator.execute(new gp(this._externalItem));return this._externalItem.previewMatchSize()&&this._matchSize(o,this._pointerDownRect),o.style.transform=yy(this._pointerDownRect),o}_createPlaceholder(){return this._mediator.execute(new _p(this._externalItem))}_placePreviewIntoOverlay(){this._overlayRoot.appendChild(this._previewEl)}_swapOriginalWithPlaceholderAndMoveOriginalIntoOverlay(){let o=this._originalParent,e=this._placeholderEl;if(!o||!e)return;let n=o.replaceChild(e,this._host);this._overlayRoot.appendChild(n),this._host.style.display="none"}onPointerMove(o,e){if(!this._previewEl)return;let n=this._resolveDeltaFromPointer(o,e),i=this._applyConstraints(n),r=me.fromPoint(this._startRect).add(i),a=this._toAbsolutePoint(r).add(this._absoluteOffsetFromFlow);this._previewEl.style.transform=yy(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 o=this._originalParent,e=this._placeholderEl;if(!(!o||!e)){if(e.parentNode===o){o.replaceChild(this._host,e);return}this._originalNextSibling&&this._originalNextSibling.parentNode===o?o.insertBefore(this._host,this._originalNextSibling):o.appendChild(this._host)}}_matchSize(o,e){o.style.width=`${e.width}px`,o.style.height=`${e.height}px`}_readAbsoluteRect(o){let e=o.getBoundingClientRect(),n=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,i=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return oe.initialize(e.left+i,e.top+n,e.width,e.height)}_toAbsolutePoint(o){let e=me.fromPoint(this._transform.position).add(this._transform.scaledPosition);return me.fromPoint(o).mult(this._transform.scale).add(e).add(this._getFlowHostAbsolutePosition())}_resolveDeltaFromPointer(o,e){let n=e?.getPosition();if(!n)return o;let i=this._clientToAbsolute(n).sub(this._grabOffsetFromPointer),r=this._toFlowPoint(i);return me.fromPoint(r).sub(this._startRect)}_toFlowPoint(o){let e=this._getFlowHostAbsolutePosition(),n=me.fromPoint(this._transform.position).add(this._transform.scaledPosition);return me.fromPoint(o).sub(e).sub(n).div(this._transform.scale)}_getFlowHostAbsolutePosition(){let o=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 U.initialize(o.left+n,o.top+e)}_clientToAbsolute(o){let e=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,n=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return me.fromPoint(o).add(U.initialize(n,e))}};function yy({x:t,y:o}){return`translate3d(${Math.round(t)}px, ${Math.round(o)}px, 0)`}var yp=class{event;fTrigger;static fToken=Symbol("DragExternalItemPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}};function yB(t){return!!t.closest?.("[fExternalItem]")}function CB(t){return t.closest("[fExternalItem]")}var xB=(()=>{class t{_byHost=new Map;_items=te([]);items=E(()=>this._items());getByElement(e){let n=CB(e);return n?this._byHost.get(n):void 0}getByHost(e){return this._byHost.get(e)}register(e){let n=e.hostElement,i=this._byHost.get(n);i!==e&&(i&&i!==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 wB=(()=>{let t=class gc{_apiService=p(xB);_dragSession=p(ge);_store=p(L);_injector=p(mt);get _flowHost(){return this._store.flowHost}get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!pn(e.originalEvent,n))return;let i=this._resolveExternalItem(e.targetElement);if(!i||i.disabled())return;let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=me.fromPoint(e.getPosition()).elementTransform(this._flowHost).div(r),this._dragSession.draggableItems=[new vp(this._injector,i,e.getPosition())]}_resolveExternalItem(e){return this._apiService.getByElement(e)}static \u0275fac=function(n){return new(n||gc)};static \u0275prov=y({token:gc,factory:gc.\u0275fac})};return t=P([R(yp)],t),t})(),Cp=class{event;static fToken=Symbol("PreventDefaultIsExternalItemRequest");constructor(o){this.event=o}},TB=(()=>{let t=class bc{handle(e){this._isTargetItemExternal(e.event)&&e.event.preventDefault()}_isTargetItemExternal(e){let n=this._isExternalItem(e.target),i=this._isExternalItem(e.target.parentNode);return n||i}_isExternalItem(e){let n=!1;try{n=yB(e)}catch{}return n}static \u0275fac=function(n){return new(n||bc)};static \u0275prov=y({token:bc,factory:bc.\u0275fac})};return t=P([R(Cp)],t),t})(),SB=[fB,mB,vB,wB,TB],kB=(()=>{let t=class vc{_mediator=p(V);_dragContext=p(ge);_store=p(L);_dragInjector=p(Tt);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 i=this._sortedTargetsForDrop();if(n){let a=n.fParentId(),s=this._mediator.execute(new Xp(a));s.length&&(i=i.filter(c=>s.includes(c.node.fId())))}let r=this._dragInjector.get(Vr);r.initialize(i),this._dragContext.draggableItems.push(r)}_canPrepare(){return this._hasMoveDrag()||this._hasExternalDrag()}_hasMoveDrag(){return this._dragContext.draggableItems.some(e=>e instanceof hi)}_hasExternalDrag(){return this._dragContext.draggableItems.some(e=>e instanceof vp)}_sortedTargetsForDrop(){let e=this._getDraggedNodes(),n=e.some(s=>s instanceof Jm),i=this._withParents(e),a=this._eligibleTargets(i,n).map(s=>{let c=this._mediator.execute(new ot(s.hostElement));return{node:s,rect:c}});return this._mediator.execute(new mp(a))}_getDraggedNodes(){let e=this._dragContext.draggableItems.find(n=>n instanceof hi);return e?e.items.map(n=>n.nodeOrGroup):[]}_withParents(e){return e.reduce((n,i)=>{n.push(i);let r=this._mediator.execute(new Lo(i));return n.push(...r),n},[])}_eligibleTargets(e,n){let i=this._allNodes.filter(r=>!e.includes(r));return n?i.filter(r=>r instanceof Jm):i}static \u0275fac=function(n){return new(n||vc)};static \u0275prov=y({token:vc,factory:vc.\u0275fac})};return t=P([R(fp)],t),t})(),IB=[hB,kB,pB],xp=class{event;static fToken=Symbol("PinchToZoomFinalizeRequest");constructor(o){this.event=o}},EB=.5,wp=(()=>{class t extends Nt{type="pinch-to-zoom";kind="pinch-to-zoom";_store=p(L);get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.require(Ye.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 i=Cy(n.touches),r=MB(n.touches);if(i==null||r==null){this._reset();return}if(Math.abs(i-this._startDistance)<EB)return;n.preventDefault();let a=i/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 me.fromPoint(e).elementTransform(this._flowHost)}_reset(){this._startScale=null,this._startDistance=null}onPointerUp(){this._reset(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function MB(t){if(t.length!==2)return null;let o=t[0],e=t[1];return U.initialize((o.clientX+e.clientX)/2,(o.clientY+e.clientY)/2)}function Cy(t){if(t.length!==2)return null;let o=t[0],e=t[1];return Math.hypot(e.clientX-o.clientX,e.clientY-o.clientY)}var DB=(()=>{let t=class yc{_dragSession=p(ge);handle(e){if(this._hasPinchZoomHandler())for(let n of this._dragSession.draggableItems)n.onPointerUp?.()}_hasPinchZoomHandler(){return this._dragSession.draggableItems.some(e=>e instanceof wp)}static \u0275fac=function(n){return new(n||yc)};static \u0275prov=y({token:yc,factory:yc.\u0275fac})};return t=P([R(xp)],t),t})(),Tp=class{event;static fToken=Symbol("PinchToZoomPreparationRequest");constructor(o){this.event=o}},PB=(()=>{let t=class Cc{_dragInjector=p(Tt);_store=p(L);_dragSession=p(ge);handle({event:e}){this._canStart(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=new me,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(Ye.ZOOM)}_getHandler(e){let n=this._dragInjector.get(wp);return n.initialize(e.touches),n}static \u0275fac=function(n){return new(n||Cc)};static \u0275prov=y({token:Cc,factory:Cc.\u0275fac})};return t=P([R(Tp)],t),t})(),RB=[PB,DB],Sp=class{event;static fToken=Symbol("SelectionAreaFinalizeRequest");constructor(o){this.event=o}},OB=(()=>{let t=class xc{_dragSession=p(ge);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||xc)};static \u0275prov=y({token:xc,factory:xc.\u0275fac})};return t=P([R(Sp)],t),t})(),C_=(()=>{class t extends Nt{type="selection-area";kind="selection-area";_store=p(L);_dragSession=p(ge);_mediator=p(V);_canBeSelected=[];_selectedByMove=[];get _transform(){return this._store.transform}get _canvasPosition(){return me.fromPoint(this._transform.position).add(this._transform.scaledPosition)}get _instance(){return this._store.instances.require(Ye.SELECTION_AREA)}prepareDragSequence(){this._canBeSelected=this._mediator.execute(new dh),this._show(),this._draw(oe.initialize(this._dragSession.onPointerDownPosition.x,this._dragSession.onPointerDownPosition.y))}onPointerMove(e){let n=me.fromPoint(e).add(this._dragSession.onPointerDownPosition),i=this._getMinimumPoint(this._dragSession.onPointerDownPosition,n),r=Math.abs(e.x),a=Math.abs(e.y),s=oe.initialize(i.x,i.y,r,a);this._draw(s),this._selectedByMove=[],this._canBeSelected.forEach(c=>{c.element.unmarkAsSelected();let u=oe.addPoint(oe.mult(c.fRect,this._transform.scale),this._canvasPosition);oe.intersectionWithRect(u,s)&&(c.element.markAsSelected(),this._selectedByMove.push(c.element))}),this._mediator.execute(new li)}_getMinimumPoint(e,n){return U.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(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),kp=class{event;static fToken=Symbol("SelectionAreaPreparationRequest");constructor(o){this.event=o}},FB=(()=>{let t=class wc{_store=p(L);_dragSession=p(ge);_dragInjector=p(Tt);get _instance(){return this._store.instances.get(Ye.SELECTION_AREA)}handle(e){this._isValid(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=me.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost),this._dragSession.draggableItems=[this._dragInjector.createInstance(C_)])}_isValid(e){return!!this._instance&&this._dragSession.isEmpty()&&pn(e.event.originalEvent,this._instance.fTrigger)}static \u0275fac=function(n){return new(n||wc)};static \u0275prov=y({token:wc,factory:wc.\u0275fac})};return t=P([R(kp)],t),t})(),NB=[FB,OB],Ip=class{rect;childrenBounds;static fToken=Symbol("ApplyChildResizeConstraintsRequest");constructor(o,e){this.rect=o,this.childrenBounds=e}},AB=(()=>{let t=class Tc{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 i=e.x-n.x;i>0&&(e.x-=i,e.width+=i)}_restrictTop(e,n){let i=e.y-n.y;i>0&&(e.y-=i,e.height+=i)}_restrictRight(e,n){let i=n.x+n.width;e.x+e.width<=i&&(e.width=i-e.x)}_restrictBottom(e,n){let i=n.y+n.height;e.y+e.height<=i&&(e.height=i-e.y)}static \u0275fac=function(n){return new(n||Tc)};static \u0275prov=y({token:Tc,factory:Tc.\u0275fac})};return t=P([R(Ip)],t),t})(),Ep=class{rect;limits;static fToken=Symbol("ApplyParentResizeConstraintsRequest");constructor(o,e){this.rect=o,this.limits=e}},LB=(()=>{let t=class Sc{_mediator=p(V);handle({rect:e,limits:n}){this._applyResizeConstraints(e,n)}_applyResizeConstraints(e,n){if(!n)return;let i=this._clampedCopyForCalculation(e,n);this._applySoftParentExpansions(i,n.softLimits),n.hardLimit&&this._clampRectToInner(e,n.hardLimit.innerRect)}_clampedCopyForCalculation(e,n){let i=be({},e);return n.hardLimit&&this._clampRectToInner(i,n.hardLimit.innerRect),i}_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 i=n.x+n.width;e.x+e.width>i&&(e.width=i-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 i of n)this._expandParentFromOriginalIfOverflow(e,i)}_expandParentFromOriginalIfOverflow(e,n){let i=n.innerRect,r=n.boundingRect,a=this._computeOverflow(i,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 i=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:i,top:r,right:a,bottom:s}}_buildExpandedParentRect(e,n){let i=be({},e);return n.left&&(i.x=e.x-n.left,i.width=e.width+n.left),n.top&&(i.y=e.y-n.top,i.height=e.height+n.top),n.right&&(i.width=(i.width??e.width)+n.right),n.bottom&&(i.height=(i.height??e.height)+n.bottom),i}_applyParentRect(e,n){e.nodeOrGroup.updatePosition(n),e.nodeOrGroup.updateSize(n),this._mediator.execute(new Hi(e.nodeOrGroup.fId(),n)),e.nodeOrGroup.redraw()}static \u0275fac=function(n){return new(n||Sc)};static \u0275prov=y({token:Sc,factory:Sc.\u0275fac})};return t=P([R(Ep)],t),t})(),Mp=class{originalRect;difference;handleType;minimumSize;static fToken=Symbol("CalculateChangedRectFromDifferenceRequest");constructor(o,e,n,i){this.originalRect=o,this.difference=e,this.handleType=n,this.minimumSize=i}},xy={[Dn.LEFT]:{x:-1,y:0},[Dn.LEFT_TOP]:{x:-1,y:-1},[Dn.TOP]:{x:0,y:-1},[Dn.RIGHT_TOP]:{x:1,y:-1},[Dn.RIGHT]:{x:1,y:0},[Dn.RIGHT_BOTTOM]:{x:1,y:1},[Dn.BOTTOM]:{x:0,y:1},[Dn.LEFT_BOTTOM]:{x:-1,y:1}},BB=(()=>{let t=class kc{handle({originalRect:e,difference:n,handleType:i,minimumSize:r}){let a=this._changeSizeInRect(e,n,xy[i],r);return this._changePosition(e,n,xy[i],a)}_changeSizeInRect(e,n,i,r){let a=e.width+i.x*n.x,s=e.height+i.y*n.y,c=0,u=0;return a<0&&(c=a,a=Math.abs(a)),a<r.width&&(i.x===-1&&(c+=a-r.width),a=r.width),s<0&&(u=s,s=Math.abs(s)),s<r.height&&(i.y===-1&&(u+=s-r.height),s=r.height),oe.initialize(c,u,a,s)}_changePosition(e,n,i,r){let a=e.x+(i.x===-1?n.x:0)+r.x,s=e.y+(i.y===-1?n.y:0)+r.y;return oe.initialize(a,s,r.width,r.height)}static \u0275fac=function(n){return new(n||kc)};static \u0275prov=y({token:kc,factory:kc.\u0275fac})};return t=P([R(Mp)],t),t})(),Dp=class{nodeOrGroup;paddings;static fToken=Symbol("CalculateDirectChildrenUnionRectRequest");constructor(o,e){this.nodeOrGroup=o,this.paddings=e}},VB=(()=>{let t=class Ic{_mediator=p(V);_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle({nodeOrGroup:e,paddings:n}){let i=oe.union(this._calculateDirectChildren(e.fId()).map(r=>this._normalizeRect(r)));return i?this._concatRectWithParentPadding(i,n):null}_calculateDirectChildren(e){return this._allNodesAndGroups.filter(n=>n.fParentId()===e)}_normalizeRect(e){return this._mediator.execute(new ot(e.hostElement))}_concatRectWithParentPadding(e,n){return oe.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||Ic)};static \u0275prov=y({token:Ic,factory:Ic.\u0275fac})};return t=P([R(Dp)],t),t})(),Ur=class{nodeOrGroup;rect;static fToken=Symbol("CalculateResizeLimitsRequest");constructor(o,e){this.nodeOrGroup=o,this.rect=e}},zB=(()=>{let t=class Ec{_mediator=p(V);handle({nodeOrGroup:e,rect:n}){let i=this._getParentsChain(e),r=this._calculateNodePaddings(e,n);return{limits:this._buildSoftHardLimits(i),childrenBounds:this._getNormalizedChildrenBounds(e,r),minimumSize:Ft.initialize(r[0]+r[2],r[1]+r[3])}}_calculateNodePaddings(e,n){return this._mediator.execute(new Ui(e,n))}_getNormalizedChildrenBounds(e,n){return this._mediator.execute(new Dp(e,n))}_getParentsChain(e){return this._mediator.execute(new Lo(e))??[]}_buildSoftHardLimits(e){let n=[],i,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{i=this._makeLimit(a,s);break}}return{softLimits:n,hardLimit:i}}_getParentInfo(e,n){return this._mediator.execute(new zr(e,n))}_isAutoExpand(e){return e.fAutoExpandOnChildHit()}_makeLimit(e,{boundingRect:n,innerRect:i}){return{nodeOrGroup:e,boundingRect:n,innerRect:i}}static \u0275fac=function(n){return new(n||Ec)};static \u0275prov=y({token:Ec,factory:Ec.\u0275fac})};return t=P([R(Ur)],t),t})(),Pp=class{event;static fToken=Symbol("ResizeNodeFinalizeRequest");constructor(o){this.event=o}},rC="node-resize",aC="resize-node";function HB(t){return t.getEvent().kind===aC||t.getEvent().fEventType===rC}var qB=(()=>{let t=class Mc{_dragSession=p(ge);handle(e){this._isNodeResizeHandler()&&this._dragSession.draggableItems.forEach(n=>n.onPointerUp?.())}_isNodeResizeHandler(){return this._dragSession.draggableItems.some(e=>HB(e))}static \u0275fac=function(n){return new(n||Mc)};static \u0275prov=y({token:Mc,factory:Mc.\u0275fac})};return t=P([R(Pp)],t),t})(),x_=class{fNodeId;constructor(o){this.fNodeId=o}},w_=(()=>{class t extends Nt{type=rC;kind=aC;data(){return new x_(this._nodeOrGroup.fId())}_mediator=p(V);_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 i of this._softParentConnections)this._applyConnectionHandlers(i);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 ot(this._nodeOrGroup.hostElement))}_buildConstraints(e){return this._mediator.execute(new Ur(this._nodeOrGroup,e))}_calcNextRect(e){return this._mediator.execute(new Mp(this._baselineRect,e,this._handleType,this._constraints.minimumSize))}_applyConstraints(e){this._mediator.execute(new Ip(e,this._constraints.childrenBounds)),this._mediator.execute(new Ep(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 Hi(this._nodeOrGroup.fId(),e)),this._nodeOrGroup.redraw()}_fallbackRectFromModel(){return oe.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 i of e.source){let r=this._readConnectorRect(i.connector,n);i.handler.setSourceRect(r)}for(let i of e.target){let r=this._readConnectorRect(i.connector,n);i.handler.setTargetRect(r)}}_readConnectorRect(e,n){let i=`${e.kind}::${e.fId()}`,r=n.get(i);if(r)return r;let a=this._mediator.execute(new ui(e.hostElement,!1));return n.set(i,a),a}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),$r=class{_mediator=p(V);_store=p(L);_behaviour=p(qo);_source;_target;_sourceRef;_targetRef;_sourceRect;_targetRect;connection;initialize(o){this.connection=o,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=dt.fromRoundedRect(this._sourceRef.rect),this._targetRect=dt.fromRoundedRect(this._targetRef.rect)}setSourceRect(o){this._sourceRect=dt.fromRoundedRect(o),this._mediator.execute(new zi(this._source.fId(),this._source.kind,this._sourceRect))}setTargetRect(o){this._targetRect=dt.fromRoundedRect(o),this._mediator.execute(new zi(this._target.fId(),this._target.kind,this._targetRect))}redraw(){let o=this._buildLine();this.connection.setLine(o),this.connection.redraw()}_buildLine(){let o=dt.fromRoundedRect(this._sourceRect),e=dt.fromRoundedRect(this._targetRect);return this._behaviour.handle(new wn(o,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(o){return{connector:o,rect:this._mediator.execute(new ui(o.hostElement,!1))}}_resolveRotationContext(o){return this._mediator.execute(new Gn(o))}},GB=(()=>{class t extends $r{_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(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),jB=(()=>{class t extends $r{setSourceRect(e){super.setSourceRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),UB=(()=>{class t extends $r{setTargetRect(e){super.setTargetRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Rp=class{event;fTrigger;static fToken=Symbol("ResizeNodePreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},Op=class{handler;nodeOrGroup;static fToken=Symbol("AttachResizeConnectionDragHandlersToNodeRequest");constructor(o,e){this.handler=o,this.nodeOrGroup=e}},$B=(()=>{let t=class Dc{_store=p(L);_mediator=p(V);_dragInjector=p(Tt);handle({handler:e,nodeOrGroup:n}){let i=this._readSoftParents(n),r=[n,...i],a=this._collectSourceConnectorIds(r),s=this._collectTargetConnectorIds(r),c=new Map;e.setNodeConnectionHandlers(this._buildConnectionHandlersForNode(n,a,s,c)),e.setSoftParentConnectionHandlers(i.map(u=>this._buildConnectionHandlersForNode(u,a,s,c)))}_readSoftParents(e){let n=this._mediator.execute(new ot(e.hostElement));return this._mediator.execute(new Ur(e,n)).limits.softLimits.map(r=>r.nodeOrGroup)}_collectSourceConnectorIds(e){let n=new Set(e.map(i=>i.fId()));return new Set(this._store.outputs.getAll().filter(i=>n.has(i.fNodeId)).map(i=>i.fId()))}_collectTargetConnectorIds(e){let n=new Set(e.map(i=>i.fId()));return new Set(this._store.inputs.getAll().filter(i=>n.has(i.fNodeId)).map(i=>i.fId()))}_buildConnectionHandlersForNode(e,n,i,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())),f={source:[],target:[]};for(let g of this._store.connections.getAll()){let x=c.has(g.fOutputId()),I=u.has(g.fInputId());if(!x&&!I)continue;let S=r.get(g.fId())??this._createConnectionHandler(g,n,i);if(r.set(g.fId(),S),x){let N=this._store.outputs.require(g.fOutputId());f.source.push({handler:S,connector:N})}if(I){let N=this._store.inputs.require(g.fInputId());f.target.push({handler:S,connector:N})}}return f}_createConnectionHandler(e,n,i){let r=n.has(e.fOutputId()),a=i.has(e.fInputId()),s=r&&a?this._dragInjector.createInstance(GB):r?this._dragInjector.createInstance(jB):this._dragInjector.createInstance(UB);return s.initialize(e),s}static \u0275fac=function(n){return new(n||Dc)};static \u0275prov=y({token:Dc,factory:Dc.\u0275fac})};return t=P([R(Op)],t),t})(),WB=(()=>{let t=class Pc{_mediator=p(V);_store=p(L);_dragSession=p(ge);_dragInjector=p(Tt);get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!this._isResizeHandle(e.targetElement)||!pn(e.originalEvent,n))return;let i=this._findResizableNode(e.targetElement);if(!i)return;this._selectBeforeResize(i);let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=me.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(r);let a=this._dragInjector.createInstance(w_);a.initialize(i,this._readResizeHandleType(e.targetElement)),this._mediator.execute(new Op(a,i)),this._dragSession.draggableItems=[a]}_isResizeHandle(e){return Cr(e,".f-resize-handle")}_findResizableNode(e){let n=this._store.nodes.getAll().find(i=>i.isContains(e));if(n)return n.fDraggingDisabled()?void 0:n}_selectBeforeResize(e){queueMicrotask(()=>{this._mediator.execute(new zo(e))})}_readResizeHandleType(e){let n=Jv(e,"fResizeHandleType",".f-resize-handle");return Dn[n]}static \u0275fac=function(n){return new(n||Pc)};static \u0275prov=y({token:Pc,factory:Pc.\u0275fac})};return t=P([R(Rp)],t),t})(),KB=[AB,LB,BB,VB,zB,$B,qB,WB],Fp=class{event;static fToken=Symbol("RotateNodeFinalizeRequest");constructor(o){this.event=o}},sC="node-rotate",lC="rotate-node";function YB(t){return t.getEvent().kind===lC||t.getEvent().fEventType===sC}var ZB=(()=>{let t=class Rc{_dragSession=p(ge);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>YB(e))}static \u0275fac=function(n){return new(n||Rc)};static \u0275prov=y({token:Rc,factory:Rc.\u0275fac})};return t=P([R(Fp)],t),t})(),Np=class{event;fTrigger;static fToken=Symbol("RotateNodePreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},T_=class{fNodeId;constructor(o){this.fNodeId=o}};function XB(t,o,e){let{x:n,y:i}=QB(t,o,e),r=n-t.x,a=i-t.y;return{x:r,y:a}}function QB(t,o,e){let n=t.x-e.x,i=t.y-e.y,r=o*Math.PI/180,a=Math.cos(r),s=Math.sin(r),c=n*a-i*s,u=n*s+i*a,f=c+e.x,g=u+e.y;return{x:f,y:g}}var S_=(()=>{class t extends Nt{type=sC;kind=lC;data(){return new T_(this._nodeOrGroup.fId())}_store=p(L);_mediator=p(V);_dragSession=p(ge);_nodeOrGroup;_sourceConnections;_targetConnections;_startRotation=0;_nodeRect;_nodeCenter;_pointerDownInFlow;_rotationOffsetDeg=0;get _transform(){return this._store.transform}initialize(e,n,i){this._nodeOrGroup=e,this._sourceConnections=n,this._targetConnections=i,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=U.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 ot(this._nodeOrGroup.hostElement))}_calculatePointerDownInFlow(){return U.sub(this._dragSession.onPointerDownPosition,U.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 XB(e,n,this._nodeCenter)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),JB=(()=>{let t=class Oc{_mediator=p(V);_store=p(L);_dragContext=p(ge);_dragInjector=p(Tt);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 i=this._transform.scale;this._dragContext.onPointerDownScale=i,this._dragContext.onPointerDownPosition=me.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(i);let r=this._dragInjector.createInstance(S_);r.initialize(n,this._buildOutputConnectionHandlers(n),this._buildInputConnectionHandlers(n)),this._dragContext.draggableItems=[r]}_isPreparationAllowed({event:e,fTrigger:n}){return this._dragContext.isEmpty()&&x9(e.targetElement)&&pn(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 zo(e))})}_buildInputConnectionHandlers(e){return this._mediator.execute(new Hp(e)).map(n=>{let i=this._store.inputs.require(n.fInputId()),r=this._mediator.execute(new Qt(i)),a=this._dragInjector.get(jr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}_buildOutputConnectionHandlers(e){return this._mediator.execute(new Zp(e)).map(n=>{let i=this._store.outputs.require(n.fOutputId()),r=this._mediator.execute(new Qt(i)),a=this._dragInjector.get(qr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}static \u0275fac=function(n){return new(n||Oc)};static \u0275prov=y({token:Oc,factory:Oc.\u0275fac})};return t=P([R(Np)],t),t})(),e8=[ZB,JB],Wr=class{flowRect;canvasPosition;eventPoint;minimap;static fToken=Symbol("CalculateFlowPointFromMinimapPointRequest");constructor(o,e,n,i){this.flowRect=o,this.canvasPosition=e,this.eventPoint=n,this.minimap=i}},t8=(()=>{let t=class Fc{_store=p(L);get _canvasScale(){return this._store.transform.scale||1}handle(e){return U.sub(e.canvasPosition,U.sub(this._getPositionInViewBox(e.eventPoint,e.minimap),this._getNormalizedFlowCenter(e.flowRect)))}_getNormalizedFlowCenter(e){return me.fromPoint(e.gravityCenter).sub(e)}_getPositionInViewBox(e,n){let i=this.normalizeEventPoint(e,n);return U.sum(i,oe.mult(n.viewBox,this._canvasScale))}normalizeEventPoint(e,n){return this._getEventPointInMinimap(e,n).mult(n.scale).mult(this._canvasScale)}_getEventPointInMinimap(e,n){return me.fromPoint(e).elementTransform(n.element)}static \u0275fac=function(n){return new(n||Fc)};static \u0275prov=y({token:Fc,factory:Fc.\u0275fac})};return t=P([R(Wr)],t),t})(),Ap=class{event;static fToken=Symbol("DragMinimapFinalizeRequest");constructor(o){this.event=o}},n8=(()=>{let t=class Nc{_dragSession=p(ge);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(i8)}static \u0275fac=function(n){return new(n||Nc)};static \u0275prov=y({token:Nc,factory:Nc.\u0275fac})};return t=P([R(Ap)],t),t})(),cC="minimap",dC="minimap";function i8(t){return t.getEvent().kind===dC||t.getEvent().fEventType===cC}var k_=(()=>{class t extends Nt{type=cC;kind=dC;_store=p(L);_mediator=p(V);_lastDelta=null;_flowRect;_startCanvasPosition;_eventPoint;_minimap;initialize(e,n,i,r){this._flowRect=e,this._startCanvasPosition=n,this._eventPoint=i,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(me.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 Wr(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(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Lp=class{event;static fToken=Symbol("DragMinimapPreparationRequest");constructor(o){this.event=o}},o8=(()=>{let t=class Ac{_store=p(L);_mediator=p(V);_dragSession=p(ge);_dragInjector=p(Tt);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(Ye.MINIMAP).state,i=e.getPosition(),r=me.fromPoint(this._store.transform.position),a=oe.fromElement(this._flowHost);this._canvas.setPosition(this._calculateCanvasPosition(a,i,n)),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent(),this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=me.fromPoint(i).elementTransform(this._flowHost);let s=this._dragInjector.createInstance(k_);s.initialize(a,r,i,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(Ye.MINIMAP))}_calculateCanvasPosition(e,n,i){return this._mediator.execute(new Wr(e,me.fromPoint(this._canvas.transform.position),n,i))}static \u0275fac=function(n){return new(n||Ac)};static \u0275prov=y({token:Ac,factory:Ac.\u0275fac})};return t=P([R(Lp)],t),t})(),r8=[t8,n8,o8];function a8(t){return!!t&&typeof t.destroy=="function"}var Tt=(()=>{class t{_injector=p(mt);_dragInjector=null;_created=[];create(){this._dragInjector=mt.create({providers:[{provide:Bp,useClass:Bp},{provide:Qu,useClass:Qu},{provide:Gu,useClass:Gu},{provide:o_,useClass:o_},{provide:Vr,useClass:Vr},{provide:qr,useClass:qr},{provide:jr,useClass:jr},{provide:Gr,useClass:Gr},{provide:hi,useClass:hi},{provide:wp,useClass:wp},{provide:C_,useClass:C_},{provide:w_,useClass:w_},{provide:S_,useClass:S_},{provide:k_,useClass:k_}],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=I0(this._dragInjector,()=>new e);return this._created.push(n),n}destroy(){for(let e of this._created)a8(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})(),fi=(()=>{class t{_data;setData(e){this._data=be(be({},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})(),wy="f-canvas-dragging",Ty="canvas-dragging",Bp=(()=>{class t extends Nt{type="canvas-move";kind="drag-canvas";_store=p(L);_onPointerDownPosition=U.initialize();constructor(){super(),this._store.fCanvas?.hostElement.classList.add(wy,Ty)}prepareDragSequence(){this._onPointerDownPosition=this._store.transform.position}onPointerMove(e){this._store.fCanvas?.setPosition(me.fromPoint(this._onPointerDownPosition).add(e)),this._store.fCanvas?.redraw()}onPointerUp(){this._store.fCanvas?.emitCanvasChangeEvent(),this._store.fCanvas?.hostElement.classList.remove(wy,Ty)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),s8=(()=>{let t=class Lc{_dragContext=p(ge);handle(e){this._isValid()&&this._dragContext.draggableItems.forEach(n=>n.onPointerUp?.())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Bp)}static \u0275fac=function(n){return new(n||Lc)};static \u0275prov=y({token:Lc,factory:Lc.\u0275fac})};return t=P([R(Bu)],t),t})(),Vp=class{event;fTrigger;static fToken=Symbol("DragCanvasPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},l8=(()=>{let t=class Bc{_store=p(L);_dragContext=p(ge);_dragInjector=p(Tt);handle({event:e,fTrigger:n}){!this._isValid(e)||!this._isValidTrigger(e,n)||(this._dragContext.onPointerDownScale=1,this._dragContext.onPointerDownPosition=me.fromPoint(e.getPosition()).elementTransform(this._store.flowHost),this._dragContext.draggableItems=[this._dragInjector.get(Bp)])}_isValid(e){return this._dragContext.isEmpty()&&(this._isBackgroundElement(e.targetElement)||this._isDragOnHost(e.targetElement))}_isBackgroundElement(e){return this._store.instances.get(Ye.BACKGROUND)?.hostElement.contains(e)}_isDragOnHost(e){return this._store.flowHost.contains(e)&&!this._getNode(e)}_getNode(e){let n=this._store.nodes.getAll().find(i=>i.isContains(e));return n&&n.fDraggingDisabled()&&(n=void 0),n}_isValidTrigger(e,n){return pn(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Bc)};static \u0275prov=y({token:Bc,factory:Bc.\u0275fac})};return t=P([R(Vp)],t),t})(),c8=[s8,l8],zp=class{event;trigger;static fToken=Symbol("SelectByPointerRequest");constructor(o,e){this.event=o,this.trigger=e}},d8=(()=>{let t=class Vc{_mediator=p(V);_store=p(L);_dragSession=p(ge);handle({event:e,trigger:n}){if(!this._isSelectionAllowed(e))return;let i=this._resolveSelectable(e.targetElement);this._deferRaiseLayerFor(i),pn(e.originalEvent,n)?this._applyToggleSelect(i):this._applySingleSelect(i)}_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 $i(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||Vc)};static \u0275prov=y({token:Vc,factory:Vc.\u0275fac})};return t=P([R(zp)],t),t})(),u8=[d8];var I_=class extends Wm{hostElement=p(Xe).nativeElement};function p8(t){return Cr(t,".f-drag-blocker")}var uC=(()=>{class t extends I_{_result=p(fi);_mediator=p(V);_platform=p(lm);disabled=!1;fMultiSelectTrigger=e=>this._platform.getOS()===oi.MAC_OS?e.metaKey:e.ctrlKey;fReassignConnectionTrigger=Cn;fCreateConnectionTrigger=Cn;fConnectionWaypointsTrigger=B(Cn);fMoveControlPointTrigger=Cn;fNodeResizeTrigger=Cn;fNodeRotateTrigger=Cn;fNodeMoveTrigger=Cn;fCanvasMoveTrigger=Cn;fExternalItemTrigger=Cn;fSelectionChange=new ie;fNodeIntersectedWithConnections=new ie;fNodeConnectionsIntersection=tt();fEmitOnNodeIntersect=!1;fCreateNode=new ie;fMoveNodes=new ie;fReassignConnection=new ie;fCreateConnection=new ie;fConnectionWaypointsChanged=tt();fDropToGroup=new ie;vCellSize=B(1,{transform:e=>Se(e,1)});hCellSize=B(1,{transform:e=>Se(e,1)});fCellSizeWhileDragging=B(!1,{transform:e=>G(e)});fDragStarted=new ie;fDragEnded=new ie;_dragHandlerInjector=p(Tt);ngOnInit(){this._mediator.execute(new jp(this))}ngAfterViewInit(){super.subscribe()}onPointerDown(e){if(p8(e.targetElement))return!1;this._dragHandlerInjector.create(),this._result.clear(),this._mediator.execute(new $p),this._mediator.execute(new kp(e)),this._mediator.execute(new Lp(e)),this._mediator.execute(new Tp(e)),this._mediator.execute(new zp(e,this.fMultiSelectTrigger)),this._mediator.execute(new Ku(e,this.fReassignConnectionTrigger)),this._mediator.execute(new $u(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 Rp(e,this.fNodeResizeTrigger)),this._mediator.execute(new Np(e,this.fNodeRotateTrigger)),this._mediator.execute(new hp(e,this.fNodeMoveTrigger)),this._mediator.execute(new yp(e,this.fExternalItemTrigger)),this._mediator.execute(new fp(e)),this._mediator.execute(new Vp(e,this.fCanvasMoveTrigger)),this._mediator.execute(new Wp)}onSelect(e){this._mediator.execute(new Cp(e))}onPointerMove(e){this._mediator.execute(new Up(e))}onPointerUp(e){this._mediator.execute(new Ap(e)),this._mediator.execute(new Sp(e)),this._mediator.execute(new Wu(e)),this._mediator.execute(new qu(e)),this._mediator.execute(new Pp(e)),this._mediator.execute(new Fp(e)),this._mediator.execute(new pp(e)),this._mediator.execute(new bp(e)),this._mediator.execute(new ep(e)),this._mediator.execute(new Bu(e)),this._mediator.execute(new xp(e)),this._mediator.execute(new Zu(e)),this._mediator.execute(new Ru)}finalizeDragSequence(){this._mediator.execute(new pi),this._mediator.execute(new Nr),this._result.clear(),this._dragHandlerInjector.destroy()}ngOnDestroy(){this._mediator.execute(new pi),this._mediator.execute(new Kp),super.unsubscribe()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({type:t,selectors:[["f-flow","fDraggable",""]],inputs:{disabled:[2,"fDraggableDisabled","disabled",G],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",G],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:[ve([fi,Tt]),Y]})}return t})(),h8=[...c8,...G9,...u9,...u8,...SB,...v9,...r8,...uB,...IB,...KB,...e8,...NB,...RB],f8=(()=>{let t=class zc{_store=p(L);handle({waypointIndex:e,connectionId:n}){let i=this._store.connections.require(n),r=i.fWaypoints()?.waypoints().slice();if(!r)throw new Error("Connection waypoints not found");r.splice(e,1),i.fWaypoints()?.waypoints.set(r),this._store.fDraggable?.fConnectionWaypointsChanged.emit(this._changeEvent(i))}_changeEvent(e){return new Xu(e.fId(),e.fWaypoints()?.waypoints()||[])}static \u0275fac=function(n){return new(n||zc)};static \u0275prov=y({token:zc,factory:zc.\u0275fac})};return t=P([R(Gm)],t),t})(),E_=class{static fToken=Symbol("RemoveSnapConnectionFromStoreRequest")},m8=(()=>{let t=class Hc{_store=p(L);handle(e){this._store.connections.removeInstanceForSnap()}static \u0275fac=function(n){return new(n||Hc)};static \u0275prov=y({token:Hc,factory:Hc.\u0275fac})};return t=P([R(E_)],t),t})(),_8=[kh,Wi,c7,d7,u7,p7,oL,FL,cL,EL,qL,HL,OL,jL,$L,UL,RL,VL,dL,ZL,PL,DL,ML,wL,IL,TL,SL,GL,LL,WL,KL,zL,BL,YL,XL,QL,JL,m8,f8],Kr=class{instance;static fToken=Symbol("AddConnectorToStoreRequest");constructor(o){this.instance=o}},g8=(()=>{let t=class qc{_store=p(L);_mediator=p(V);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 pu(e.fId(),e.fNodeId,e.kind,e.hostElement))}static \u0275fac=function(n){return new(n||qc)};static \u0275prov=y({token:qc,factory:qc.\u0275fac})};return t=P([R(Kr)],t),t})(),ji=class{position;connectorRefs;static fToken=Symbol("CalculateClosestConnectorRequest");constructor(o,e){this.position=o,this.connectorRefs=e}},b8=(()=>{let t=class Gc{handle({position:e,connectorRefs:n}){let i,r=1/0;for(let a of n){let s=this._distanceToRect(e,a.rect);s<r&&(r=s,i=a)}return i?Wt(be({},i),{distance:r}):void 0}_distanceToRect(e,{x:n,y:i,width:r,height:a}){let s=this._clamp(e.x,n,n+r),c=this._clamp(e.y,i,i+a),u=e.x-s,f=e.y-c;return Math.sqrt(u*u+f*f)}_clamp(e,n,i){return Math.max(n,Math.min(i,e))}static \u0275fac=function(n){return new(n||Gc)};static \u0275prov=y({token:Gc,factory:Gc.\u0275fac})};return t=P([R(ji)],t),t})(),Yr=class{pointerPosition;connectableConnectors;static fToken=Symbol("FindConnectableConnectorUsingPriorityAndPositionRequest");constructor(o,e){this.pointerPosition=o,this.connectableConnectors=e}},v8=(()=>{let t=class jc{_mediator=p(V);_store=p(L);_browser=p(ut);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 i=this._isSnapConnectionEnabledAndHasClosestConnector(e);i&&n.unshift(i.connector);let r=this._getFirstConnectableConnectorOfNodeAtPosition(e);return r&&n.push(r),n}_filterConnectorsThatLocatedAtPosition(e){return e.connectableConnectors.filter(n=>oe.isIncludePoint(n.rect,this._calculatePointerInFlow(e.pointerPosition))).map(n=>n.connector)}_calculatePointerInFlow(e){return Go(e,this._flowHost,this._transform)}_isSnapConnectionEnabledAndHasClosestConnector(e){if(!this._snapConnection)return;let n=this._mediator.execute(new ji(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(i=>i.connector.fNodeId===n.fId())?.connector}static \u0275fac=function(n){return new(n||jc)};static \u0275prov=y({token:jc,factory:jc.\u0275fac})};return t=P([R(Yr)],t),t})(),Zr=class{source;pointer;static fToken=Symbol("CalculateTargetConnectorsToConnectRequest");constructor(o,e){this.source=o,this.pointer=e}},Qt=class{connector;static fToken=Symbol("GetConnectorRectReferenceRequest");constructor(o){this.connector=o}},y8=(()=>{let t=class Uc{_mediator=p(V);handle({connector:e}){return{connector:e,rect:this._getRect(e)}}_getRect(e){return this._mediator.execute(new ui(e.hostElement))}static \u0275fac=function(n){return new(n||Uc)};static \u0275prov=y({token:Uc,factory:Uc.\u0275fac})};return t=P([R(Qt)],t),t})(),Xr=class{nodeOrGroup;static fToken=Symbol("AddNodeToStoreRequest");constructor(o){this.nodeOrGroup=o}},C8=(()=>{let t=class $c{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){this._store.nodes.add(e),this._mediator.execute(new hu(e.fId(),e.hostElement,e)),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||$c)};static \u0275prov=y({token:$c,factory:$c.\u0275fac})};return t=P([R(Xr)],t),t})(),Hp=class{nodeOrGroup;static fToken=Symbol("CalculateInputConnectionsRequest");constructor(o){this.nodeOrGroup=o}},x8=(()=>{let t=class Wc{_store=p(L);handle({nodeOrGroup:e}){let n=this._collectInputIds(e);return this._collectConnections(n)}_collectInputIds(e){let n=new Set,i=this._store.inputs.getAll();for(let r of i)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],i=this._store.connections.getAll();for(let r of i)e.has(r.fInputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||Wc)};static \u0275prov=y({token:Wc,factory:Wc.\u0275fac})};return t=P([R(Hp)],t),t})(),Fo=class{connector;pointerPosition;static fToken=Symbol("CalculateConnectableSideByConnectedPositionsRequest");constructor(o,e){this.connector=o,this.pointerPosition=e}},Sy=2,Et=(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})(Et||{});function w8(t,o,e,n,i){let r=T8(i),a=e-t,s=n-o,c=S8(a,s);return k8(c,r)?c:I8(a,s,r,c)}function T8(t){if(!t||t.length===0)return Et.ALL;let o=Et.NONE;for(let e=0;e<t.length;e++)switch(t[e]){case K.LEFT:o|=Et.LEFT;break;case K.RIGHT:o|=Et.RIGHT;break;case K.TOP:o|=Et.TOP;break;case K.BOTTOM:o|=Et.BOTTOM;break}return o||Et.ALL}function S8(t,o){let e=t<0?-t:t,n=o<0?-o:o;return e-n>Sy?t<0?K.LEFT:K.RIGHT:(n-e>Sy,o<0?K.TOP:K.BOTTOM)}function k8(t,o){switch(t){case K.LEFT:return(o&Et.LEFT)!==0;case K.RIGHT:return(o&Et.RIGHT)!==0;case K.TOP:return(o&Et.TOP)!==0;case K.BOTTOM:return(o&Et.BOTTOM)!==0;default:return!0}}function I8(t,o,e,n){let i=n,r=-1/0;if(e&Et.RIGHT){let a=t;a>r&&(r=a,i=K.RIGHT)}if(e&Et.LEFT){let a=-t;a>r&&(r=a,i=K.LEFT)}if(e&Et.BOTTOM){let a=o;a>r&&(r=a,i=K.BOTTOM)}if(e&Et.TOP){let a=-o;a>r&&(r=a,i=K.TOP)}return i}function qp(t){return t===K.CALCULATE||t===K.CALCULATE_HORIZONTAL||t===K.CALCULATE_VERTICAL}var E8={[K.CALCULATE]:[K.TOP,K.BOTTOM,K.LEFT,K.RIGHT],[K.CALCULATE_HORIZONTAL]:[K.LEFT,K.RIGHT],[K.CALCULATE_VERTICAL]:[K.TOP,K.BOTTOM]},M8=(()=>{let t=class Kc{_mediator=p(V);handle({connector:e,pointerPosition:n}){let i=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 w8(r.x,r.y,s,c,E8[i])}_accumulateConnectedCenters(e,n,i){let r=i?.x||0,a=i?.y||0,s=i?1:0;if(n&&n.length)for(let c=0;c<n.length;c++){let u=n[c].hostElement;if(u===e)continue;let f=this._getConnectorRect(u).gravityCenter;r+=f.x,a+=f.y,s++}return{sumX:r,sumY:a,count:s}}_getConnectorRect(e){return this._mediator.execute(new ot(e))}static \u0275fac=function(n){return new(n||Kc)};static \u0275prov=y({token:Kc,factory:Kc.\u0275fac})};return t=P([R(Fo)],t),t})(),Gp=class{connector;static fToken=Symbol("CalculateConnectableSideByInternalPositionRequest");constructor(o){this.connector=o}},jp=class{fComponent;static fToken=Symbol("AddDndToStoreRequest");constructor(o){this.fComponent=o}},D8=(()=>{let t=class Yc{_store=p(L);handle(e){this._store.fDraggable=e.fComponent}static \u0275fac=function(n){return new(n||Yc)};static \u0275prov=y({token:Yc,factory:Yc.\u0275fac})};return t=P([R(jp)],t),t})(),Up=class{event;static fToken=Symbol("OnPointerMoveRequest");constructor(o){this.event=o}},P8=(()=>{let t=class Zc{_mediator=p(V);_store=p(L);get _hostElement(){return this._store.fDraggable?.hostElement}_dragContext=p(ge);handle({event:e}){this._dragContext.rememberPointerEvent(e),this._setDifferenceToDraggableItems(this._getDifferenceBetweenPointerAndPointerDown(e),e),this._mediator.execute(new Ar)}_setDifferenceToDraggableItems(e,n){this._dragContext.draggableItems.forEach(i=>{i.onPointerMove(be({},e),n)})}_getDifferenceBetweenPointerAndPointerDown(e){return this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition)}_getPointerPositionInCanvas(e){return me.fromPoint(e.getPosition()).elementTransform(this._hostElement)}static \u0275fac=function(n){return new(n||Zc)};static \u0275prov=y({token:Zc,factory:Zc.\u0275fac})};return t=P([R(Up)],t),t})(),$p=class{static fToken=Symbol("InitializeDragSequenceRequest")},R8=(()=>{let t=class Xc{_dragContext=p(ge);handle(e){this._dragContext.reset()}static \u0275fac=function(n){return new(n||Xc)};static \u0275prov=y({token:Xc,factory:Xc.\u0275fac})};return t=P([R($p)],t),t})(),mi=class{static fToken=Symbol("IsDragStartedRequest")},O8=(()=>{let t=class Qc{_store=p(L);handle(e){return!!this._store.fDraggable?.isDragStarted}static \u0275fac=function(n){return new(n||Qc)};static \u0275prov=y({token:Qc,factory:Qc.\u0275fac})};return t=P([R(mi)],t),t})(),Wp=class{static fToken=Symbol("PrepareDragSequenceRequest")},F8=(()=>{let t=class Jc{_mediator=p(V);_dragContext=p(ge);handle(e){this._callPrepareDragSequence(),this._mediator.execute(new Ou)}_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=P([R(Wp)],t),t})(),Kp=class{static fToken=Symbol("RemoveDndFromStoreRequest")},N8=(()=>{let t=class ed{_store=p(L);handle(e){this._store.fDraggable=void 0}static \u0275fac=function(n){return new(n||ed)};static \u0275prov=y({token:ed,factory:ed.\u0275fac})};return t=P([R(Kp)],t),t})(),A8=[D8,P8,R8,F8,O8,N8],L8=new he("CONNECTABLE_SIDE_EPSILON"),B8=(()=>{let t=class td{_mediator=p(V);_lastSide=new WeakMap;_epsilon=Math.max(0,p(L8,{optional:!0})??2);handle({connector:e}){if(this._isDragging()){let i=this._lastSide.get(e);if(i!==void 0)return i;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,i){let r=oe.fromElement(e),a=n.getBoundingClientRect(),s=r.gravityCenter.x,c=r.gravityCenter.y,u=s-a.left,f=a.right-s,g=c-a.top,x=a.bottom-c,I=0,S=u,N=[u,f,g,x];for(let ne=1;ne<4;ne++){let pe=N[ne];pe<S&&(S=pe,I=ne)}let j=I===0?K.LEFT:I===1?K.RIGHT:I===2?K.TOP:K.BOTTOM,Z=this._lastSide.get(i);if(Z!==void 0&&Z!==j){let ne=Z===K.LEFT?0:Z===K.RIGHT?1:Z===K.TOP?2:3;(ne===0?u:ne===1?f:ne===2?g:x)-S<=this._epsilon&&(j=Z)}return j}_isDragging(){return this._mediator.execute(new mi)}static \u0275fac=function(n){return new(n||td)};static \u0275prov=y({token:td,factory:td.\u0275fac})};return t=P([R(Gp)],t),t})(),No=class{nodeOrGroup;static fToken=Symbol("CalculateConnectorsConnectableSidesRequest");constructor(o){this.nodeOrGroup=o}},V8=(()=>{let t=class nd{_mediator=p(V);handle({nodeOrGroup:e}){let n=e.connectors,i=n.length;for(let a=0;a<i;a++){let s=n[a];s.fConnectableSide=this._resolveSideForConnectorFast(s)}let r=new Set;for(let a=0;a<i;a++){let c=n[a].toConnector;if(c&&c.length)for(let u=0,f=c.length;u<f;u++){let g=c[u],x=g.userFConnectableSide;qp(x)&&r.add(g)}}r.size>0&&r.forEach(a=>{a.fConnectableSide=this._calculateByConnectedPositions(a)})}_resolveSideForConnectorFast(e){let n=e.userFConnectableSide;return n===K.AUTO?this._mediator.execute(new Gp(e)):qp(n)?this._calculateByConnectedPositions(e):n}_calculateByConnectedPositions(e){return this._mediator.execute(new Fo(e))}static \u0275fac=function(n){return new(n||nd)};static \u0275prov=y({token:nd,factory:nd.\u0275fac})};return t=P([R(No)],t),t})(),Ao=class{static fToken=Symbol("CalculateNodesBoundingBoxRequest")},z8=(()=>{let t=class id{_store=p(L);handle(e){return oe.union(this._nodesRects())}_nodesRects(){return this._store.nodes.getAll().map(e=>oe.fromElement(e.hostElement))}static \u0275fac=function(n){return new(n||id)};static \u0275prov=y({token:id,factory:id.\u0275fac})};return t=P([R(Ao)],t),t})(),Yp=class{fNodes;static fToken=Symbol("CalculateNodesBoundingBoxNormalizedPositionRequest");constructor(o){this.fNodes=o}},H8=(()=>{let t=class od{_store=p(L);_mediator=p(V);handle(e){return oe.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 Ro(e.hostElement));if(n)return this._getElementRect(e,n);let i=this._mediator.execute(new ot(e.hostElement));return this._getElementRect(e,i)}_getElementRect(e,n){return oe.initialize(e._position.x,e._position.y,n.width,n.height)}static \u0275fac=function(n){return new(n||od)};static \u0275prov=y({token:od,factory:od.\u0275fac})};return t=P([R(Yp)],t),t})(),Zp=class{nodeOrGroup;static fToken=Symbol("CalculateOutputConnectionsRequest");constructor(o){this.nodeOrGroup=o}},q8=(()=>{let t=class rd{_store=p(L);handle({nodeOrGroup:e}){let n=this._collectOutputIds(e);return this._collectConnections(n)}_collectOutputIds(e){let n=new Set,i=this._store.outputs.getAll();for(let r of i)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],i=this._store.connections.getAll();for(let r of i)e.has(r.fOutputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||rd)};static \u0275prov=y({token:rd,factory:rd.\u0275fac})};return t=P([R(Zp)],t),t})(),Qr=class{nodeOrGroup;static fToken=Symbol("FitToChildNodesAndGroupsRequest");constructor(o){this.nodeOrGroup=o}},Ui=class{fNode;rect;static fToken=Symbol("GetNodePaddingRequest");constructor(o,e){this.fNode=o,this.rect=e}},G8=(()=>{let t=class ad{_browser=p(ut);handle(e){return e.fNode.fIncludePadding()?this._getPaddingData(e.fNode,e.rect):[0,0,0,0]}_getPaddingData(e,n){let i=this._browser.window.getComputedStyle(e.hostElement);return[this._browser.toPixels(i.paddingLeft,n.width,n.height,i.fontSize),this._browser.toPixels(i.paddingTop,n.width,n.height,i.fontSize),this._browser.toPixels(i.paddingRight,n.width,n.height,i.fontSize),this._browser.toPixels(i.paddingBottom,n.width,n.height,i.fontSize)]}static \u0275fac=function(n){return new(n||ad)};static \u0275prov=y({token:ad,factory:ad.\u0275fac})};return t=P([R(Ui)],t),t})(),j8=(()=>{let t=class sd{_mediator=p(V);_store=p(L);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 i=this._nodes.find(r=>r.fId()===n);i&&this._mediator.execute(new Qr(i))}_calculateDirectChildren(e){return this._nodes.filter(n=>n.fParentId()===e.fId())}_unionRect(e){return oe.union(e.map(n=>this._boundingRect(n)))||oe.initialize()}_boundingRect(e){return this._mediator.execute(new ot(e.hostElement))}_paddings(e,n){return this._mediator.execute(new Ui(e,n))}_calculateChildrenBounding(e,[n,i,r,a]){let s=this._unionRect(e);return s=oe.initialize(s.x-n,s.y-i,s.width+n+r,s.height+i+a),s}static \u0275fac=function(n){return new(n||sd)};static \u0275prov=y({token:sd,factory:sd.\u0275fac})};return t=P([R(Qr)],t),t})(),Xp=class{id;static fToken=Symbol("GetChildNodeIdsRequest");constructor(o){this.id=o}},U8=(()=>{let t=class ld{_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle(e){if(!e.id)return[];let n=new Set,i=[];return this._collectDescendants(e.id,i,n),i}_collectDescendants(e,n,i){if(i.has(e))throw new Error(`Circular reference detected in the node hierarchy. Node id: ${e}`);i.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,i)}static \u0275fac=function(n){return new(n||ld)};static \u0275prov=y({token:ld,factory:ld.\u0275fac})};return t=P([R(Xp)],t),t})(),Lo=class{nodeOrGroup;static fToken=Symbol("GetParentNodesRequest");constructor(o){this.nodeOrGroup=o}},$8=(()=>{let t=class cd{_store=p(L);handle({nodeOrGroup:e}){return this._getParentNodes(e,new Set,[])}_getParentNodes(e,n,i){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?(i.push(r),this._getParentNodes(r,n,i)):i}static \u0275fac=function(n){return new(n||cd)};static \u0275prov=y({token:cd,factory:cd.\u0275fac})};return t=P([R(Lo)],t),t})(),Jr=class{nodeOrGroup;destroyRef;static fToken=Symbol("UpdateNodeWhenStateOrSizeChangedRequest");constructor(o,e){this.nodeOrGroup=o,this.destroyRef=e}},W8=(()=>{let t=class dd{_mediator=p(V);handle({nodeOrGroup:e,destroyRef:n}){let{hostElement:i,stateChanges:r}=e;new Pn(new xm(i),r).listen(n,()=>{this._mediator.execute(new Bi),this._isDragging()||(this._mediator.execute(new Po(e.fId(),"UpdateNodeWhenStateOrSizeChanged")),this._mediator.execute(new No(e)),this._mediator.execute(new Qr(e)))})}_isDragging(){return this._mediator.execute(new mi)}static \u0275fac=function(n){return new(n||dd)};static \u0275prov=y({token:dd,factory:dd.\u0275fac})};return t=P([R(Jr)],t),t})(),ea=class{instance;static fToken=Symbol("RemoveNodeFromStoreRequest");constructor(o){this.instance=o}},K8=(()=>{let t=class ud{_store=p(L);_mediator=p(V);handle({instance:e}){this._store.nodes.remove(e),this._mediator.execute(new fu(e.fId())),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||ud)};static \u0275prov=y({token:ud,factory:ud.\u0275fac})};return t=P([R(ea)],t),t})(),Y8=[C8,M8,B8,x8,V8,z8,H8,q8,j8,U8,G8,$8,W8,K8],Z8=(()=>{let t=class pd{_mediator=p(V);_store=p(L);get _targets(){return this._store.inputs.getAll()}handle({source:e,pointer:n}){let i=this._getConnectableTargets(e),r=[];for(let a of i)r.push(this._mediator.execute(new Qt(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableTargets(e){if(e.hasConnectionLimits)return this._targets.filter(i=>e.canConnectTo(i));let n=this._targets.filter(i=>i.canBeConnected);return e.isSelfConnectable||(n=n.filter(i=>i.fNodeId!==e.fNodeId)),n}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:i}of e)qp(i.userFConnectableSide)&&(i.fConnectableSide=this._calculateByConnectedPositions(i,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Fo(e,n))}static \u0275fac=function(n){return new(n||pd)};static \u0275prov=y({token:pd,factory:pd.\u0275fac})};return t=P([R(Zr)],t),t})(),Qp=class{target;pointer;static fToken=Symbol("CalculateSourceConnectorsToConnectRequest");constructor(o,e){this.target=o,this.pointer=e}},X8=(()=>{let t=class hd{_mediator=p(V);_store=p(L);get _sources(){return this._store.outputs.getAll()}handle({target:e,pointer:n}){let i=this._getConnectableSources(e),r=[];for(let a of i)r.push(this._mediator.execute(new Qt(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableSources(e){return this._sources.filter(n=>{let i=n.canBeConnected;return i&&n.hasConnectionLimits&&(i=n.canConnectTo(e)),i})}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:i}of e)qp(i.userFConnectableSide)&&(i.fConnectableSide=this._calculateByConnectedPositions(i,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Fo(e,n))}static \u0275fac=function(n){return new(n||hd)};static \u0275prov=y({token:hd,factory:hd.\u0275fac})};return t=P([R(Qp)],t),t})(),Bo=class{connectors;static fToken=Symbol("MarkConnectableConnectorsRequest");constructor(o){this.connectors=o}},yt={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"}},Q8=(()=>{let t=class fd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.add(yt.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._markConnector(n))}_markConnector({hostElement:e}){e.classList.add(yt.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||fd)};static \u0275prov=y({token:fd,factory:fd.\u0275fac})};return t=P([R(Bo)],t),t})(),ta=class{instance;static fToken=Symbol("RemoveConnectorFromStoreRequest");constructor(o){this.instance=o}},J8=(()=>{let t=class md{_store=p(L);_mediator=p(V);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 kr(e.fId(),e.kind))}static \u0275fac=function(n){return new(n||md)};static \u0275prov=y({token:md,factory:md.\u0275fac})};return t=P([R(ta)],t),t})(),Vo=class{connectors;static fToken=Symbol("UnmarkConnectableConnectorsRequest");constructor(o){this.connectors=o}},eV=(()=>{let t=class _d{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.remove(yt.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._unmarkConnector(n))}_unmarkConnector({hostElement:e}){e.classList.remove(yt.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||_d)};static \u0275prov=y({token:_d,factory:_d.\u0275fac})};return t=P([R(Vo)],t),t})(),tV=[g8,J8,b8,v8,X8,Z8,y8,Q8,eV],Jp=class{instance;static fToken=Symbol("AddFlowToStoreRequest");constructor(o){this.instance=o}},Ki=(function(t){return t.TOP_BOTTOM="TOP_BOTTOM",t.BOTTOM_TOP="BOTTOM_TOP",t.LEFT_RIGHT="LEFT_RIGHT",t.RIGHT_LEFT="RIGHT_LEFT",t})(Ki||{}),ri=(function(t){return t.MANUAL="manual",t.AUTO="auto",t})(ri||{});function nV(t){let o=[...t.nodes.map(ky),...t.groups.map(ky)],e=new Set(t.nodes.map(s=>s.id)),n=new Set(t.groups.map(s=>s.id)),i=new Map,r=new Map;for(let s of[...t.nodes,...t.groups]){for(let c of s.fOutputs)i.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=i.get(c.fOutputId),f=r.get(c.fInputId);return!u||!f||s.push({source:u,target:f}),s},[]);return{nodes:o,connections:a,nodeIds:e,groupIds:n}}function ky(t){return{id:t.id,size:t.measuredSize?be({},t.measuredSize):t.size?be({},t.size):void 0}}var iV=1,Mh=(()=>{class t{_destroyRef=p(St);_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 i=e.fId();this.unregisterFlow(i);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(i)),n.connectionsChanges$.listen(()=>this._handleConnectionsChanges(i))),this._flows.set(i,r),this._engine?.getMode()===ri.AUTO&&this._scheduleRelayout(i)}unregisterFlow(e){let n=this._flows.get(e);n&&(n.unsubs.forEach(i=>i()),this._clearScheduledWork(n),this._flows.delete(e))}handleModeChanged(e){if(e===ri.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,i]of this._flows.entries())await this._relayoutRegisteredFlow(n,i)}}_handleNodesChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let i=this._buildNodeSignature(n.store);i!==n.nodeSignature&&(n.nodeSignature=i,this._scheduleRelayout(e))}_handleConnectionsChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let i=this._buildConnectionSignature(n.store);i!==n.connectionSignature&&(n.connectionSignature=i,this._scheduleRelayout(e))}_scheduleRelayout(e){let n=this._flows.get(e);!n||!this._engine||this._engine.getMode()!==ri.AUTO||(n.timeoutId!==null&&clearTimeout(n.timeoutId),this._cancelAnimationFrames(n),n.timeoutId=setTimeout(()=>{n.timeoutId=null,this._runAfterNextPaint(n,()=>{this._relayoutFlowIfReady(e)})},iV))}async _relayoutFlowIfReady(e){let n=this._flows.get(e);if(!(!n||!this._engine||this._engine.getMode()!==ri.AUTO)){if(n.store.hasPendingProgressiveRender){this._scheduleRelayout(e);return}await this._relayoutRegisteredFlow(e,n)}}async _relayoutRegisteredFlow(e,n){if(!this._engine)return;let i=nV(n.flow.getState({measuredSize:!0})),r=++n.runId,a=await this._engine.calculate(i.nodes,i.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,i.nodeIds,i.groupIds)}finally{queueMicrotask(()=>{let u=this._flows.get(e);u&&(u.isApplying=!1)})}}}_emitWriteback(e,n,i,r){let a=this._engine?.getWriteback();a&&a({flowId:e,nodes:n.filter(s=>i.has(s.id)),groups:n.filter(s=>r.has(s.id))})}_applyPositions(e,n){return n.filter(i=>{let r=e.nodes.get(i.id);return!r||U.isEqual(r._position,i.position)?!1:(r.position.set(be({},i.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})(),pC=new he("F_LAYOUT_OPTIONS");function hC(t,o){return t.reduce((e,n)=>{let i=o.get(n.id);return i&&e.push({id:n.id,position:i}),e},[])}var oV=new he("F_LAYOUT"),eh=class{_controller=p(Mh);_config=p(pC,{optional:!0})??{};_interactiveOptions;_mode;_writeback;_defaultOptions;interactiveOptions;constructor(o){this._mode=this._config.mode??ri.MANUAL,this._writeback=this._config.writeback??null,this._defaultOptions=this.mergeOptions(o,this._config.options),this._interactiveOptions=te(this.mergeOptions(this._defaultOptions,{})),this.interactiveOptions=E(()=>this.mergeOptions(this._interactiveOptions(),{})),this._controller.attachEngine(this)}setMode(o){this._mode=o,this._controller.handleModeChanged(o)}getMode(){return this._mode}setWriteback(o){this._writeback=o}getWriteback(){return this._writeback}setInteractiveOptions(o){this._interactiveOptions.set(this.mergeOptions(this._interactiveOptions(),o))}relayout(o){return this._controller.relayout(o)}getProviderConfig(){return be({},this._config)}resolveLayoutOptions(o){let e=be({},o??{});return delete e.flowId,delete e.mode,this.mergeOptions(this._interactiveOptions(),e)}};function fC(t,o){return[Mh,t,{provide:oV,useExisting:t},{provide:pC,useValue:o??{}}]}var rV=(()=>{let t=class gd{_store=p(L);_layoutController=p(Mh,{optional:!0});handle({instance:e}){this._store.fFlow=e,this._layoutController?.registerFlow(e,this._store)}static \u0275fac=function(n){return new(n||gd)};static \u0275prov=y({token:gd,factory:gd.\u0275fac})};return t=P([R(Jp)],t),t})(),th=class{static fToken=Symbol("GetFlowRequest")},aV=(()=>{let t=class bd{_store=p(L);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||bd)};static \u0275prov=y({token:bd,factory:bd.\u0275fac})};return t=P([R(th)],t),t})(),nh=class{static fToken=Symbol("CalculateConnectionsStateRequest")},sV=(()=>{let t=class vd{_store=p(L);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||vd)};static \u0275prov=y({token:vd,factory:vd.\u0275fac})};return t=P([R(nh)],t),t})(),na=class{component;measuredSize;static fToken=Symbol("CalculateNodesStateRequest");constructor(o,e=!1){this.component=o,this.measuredSize=e}},lV=(()=>{let t=class yd{_store=p(L);_mediator=p(V);handle({component:e,measuredSize:n}){return this._store.nodes.getAll().filter(i=>i instanceof e).map(i=>{let r=n?this._mediator.execute(new ot(i.hostElement)):null;return{id:i.fId(),parentId:i.fParentId()??void 0,position:be({},i._position),size:i._size?be({},i._size):void 0,measuredSize:r?{width:r.width,height:r.height}:void 0,rotate:i._rotate,fOutputs:this._getOutputs(i.hostElement),fInputs:this._getInputs(i.hostElement),isSelected:i.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||yd)};static \u0275prov=y({token:yd,factory:yd.\u0275fac})};return t=P([R(na)],t),t})(),ih=class{measuredSize;static fToken=Symbol("CalculateFlowStateRequest");constructor(o=!1){this.measuredSize=o}},cV=(()=>{let t=class Cd{_mediator=p(V);_store=p(L);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _canvasPosition(){return U.sum(this._transform.position,this._transform.scaledPosition)}handle({measuredSize:e}){return{position:this._canvasPosition,scale:this._canvas.transform.scale,nodes:this._mediator.execute(new na(Eh,e)),groups:this._mediator.execute(new na(Jm,e)),connections:this._mediator.execute(new nh)}}static \u0275fac=function(n){return new(n||Cd)};static \u0275prov=y({token:Cd,factory:Cd.\u0275fac})};return t=P([R(ih)],t),t})(),dV=[cV,lV,sV],oh=class{instance;static fToken=Symbol("RemoveFlowFromStoreRequest");constructor(o){this.instance=o}},uV=(()=>{let t=class xd{_store=p(L);_layoutController=p(Mh,{optional:!0});handle({instance:e}){this._layoutController?.unregisterFlow(e.fId()),this._store.fFlow=void 0}static \u0275fac=function(n){return new(n||xd)};static \u0275prov=y({token:xd,factory:xd.\u0275fac})};return t=P([R(oh)],t),t})(),Dh=(()=>{class t{isNodesRendered=!1;isFullRendered=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),rh=class{static fToken=Symbol("NotifyNodesRenderedRequest")},F_=new he("F_FLOW"),M_=class{},pV=(()=>{let t=class wd{_state=p(Dh);_fFlow=p(F_);handle(e){this._state.isNodesRendered||(this._state.isNodesRendered=!0,this._fFlow.fNodesRendered.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||wd)};static \u0275prov=y({token:wd,factory:wd.\u0275fac})};return t=P([R(rh)],t),t})(),ah=class{static fToken=Symbol("NotifyFullRenderedRequest")},hV=(()=>{let t=class Td{_state=p(Dh);_fFlow=p(F_);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||Td)};static \u0275prov=y({token:Td,factory:Td.\u0275fac})};return t=P([R(ah)],t),t})(),ia=class{targetConnectionsRevision;targetNodesRevision;callback;destroyRef;static fToken=Symbol("WaitForConnectionsRenderedRequest");constructor(o,e,n,i){this.targetConnectionsRevision=o,this.targetNodesRevision=e,this.callback=n,this.destroyRef=i}},fV=(()=>{let t=class Sd{_store=p(L);handle({targetConnectionsRevision:e,targetNodesRevision:n,callback:i,destroyRef:r}){if(this._store.connectionsRenderedRevision>=e&&this._store.connectionsRenderedNodesRevision>=n){i();return}let a=this._store.connectionsRenderedChanges$.listen(()=>{this._store.connectionsRenderedRevision<e||this._store.connectionsRenderedNodesRevision<n||(a(),i())});r.onDestroy(a)}static \u0275fac=function(n){return new(n||Sd)};static \u0275prov=y({token:Sd,factory:Sd.\u0275fac})};return t=P([R(ia)],t),t})(),sh=class{static fToken=Symbol("ResetRenderLifecycleRequest")},mV=(()=>{let t=class kd{_state=p(Dh);handle(e){this._state.isNodesRendered=!1,this._state.isFullRendered=!1}static \u0275fac=function(n){return new(n||kd)};static \u0275prov=y({token:kd,factory:kd.\u0275fac})};return t=P([R(sh)],t),t})(),lh=class{destroyRef;static fToken=Symbol("QueueConnectionRedrawRequest");constructor(o){this.destroyRef=o}},mC=(()=>{class t{isWaitingForViewportAnimation=!1;pendingRedraw=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),_V=(()=>{let t=class Id{_state=p(mC);_store=p(L);_mediator=p(V);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 i=this._state.pendingRedraw;n(),this._state.isWaitingForViewportAnimation=!1,this._state.pendingRedraw=!1,i&&this._mediator.execute(new Rr)});e.destroyRef.onDestroy(n)}static \u0275fac=function(n){return new(n||Id)};static \u0275prov=y({token:Id,factory:Id.\u0275fac})};return t=P([R(lh)],t),t})(),gV=[rV,aV,...dV,uV,Dh,pV,hV,fV,mV,mC,_V],ch=class{static fToken=Symbol("ClearSelectionRequest")},bV=(()=>{let t=class Ed{_dragContext=p(ge);handle(e){this._dragContext.selectedItems.forEach(n=>n.unmarkAsSelected()),this._dragContext.selectedItems=[],this._dragContext.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Ed)};static \u0275prov=y({token:Ed,factory:Ed.\u0275fac})};return t=P([R(ch)],t),t})(),dh=class{static fToken=Symbol("CalculateSelectableItemsRequest")},vV=(()=>{let t=class Md{_mediator=p(V);_store=p(L);_dragContext=p(ge);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 ot(e.hostElement))}))}_connectionRects(){return this._connections.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new ot(e.boundingElement))}))}static \u0275fac=function(n){return new(n||Md)};static \u0275prov=y({token:Md,factory:Md.\u0275fac})};return t=P([R(dh)],t),t})(),oa=class{static fToken=Symbol("GetCurrentSelectionRequest")},yV=(()=>{let t=class Dd{_dragContext=p(ge);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||Dd)};static \u0275prov=y({token:Dd,factory:Dd.\u0275fac})};return t=P([R(oa)],t),t})(),uh=class{nodes;connections;isSelectedChanged;static fToken=Symbol("SelectRequest");constructor(o,e,n=!0){this.nodes=o,this.connections=e,this.isSelectedChanged=n}},CV=(()=>{let t=class Pd{_dragContext=p(ge);_store=p(L);handle(e){this._dragContext.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragContext.selectedItems=[],e.nodes.forEach(n=>{let i=this._store.nodes.get(n);i&&(i.markAsSelected(),this._dragContext.selectedItems.push(i))}),e.connections.forEach(n=>{let i=this._store.connections.get(n);i&&(i.markAsSelected(),this._dragContext.selectedItems.push(i))}),this._dragContext.isSelectedChanged=e.isSelectedChanged}static \u0275fac=function(n){return new(n||Pd)};static \u0275prov=y({token:Pd,factory:Pd.\u0275fac})};return t=P([R(uh)],t),t})(),ph=class{static fToken=Symbol("SelectAllRequest")},xV=(()=>{let t=class Rd{_dragSession=p(ge);_store=p(L);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||Rd)};static \u0275prov=y({token:Rd,factory:Rd.\u0275fac})};return t=P([R(ph)],t),t})(),zo=class{nodeOrGroup;static fToken=Symbol("SelectAndUpdateNodeLayerRequest");constructor(o){this.nodeOrGroup=o}},hh=class{fItemsContainer;allElements;elementsThatShouldBeInFront;targetIndex;static fToken=Symbol("MoveFrontElementsBeforeTargetElementRequest");constructor(o,e,n,i){this.fItemsContainer=o,this.allElements=e,this.elementsThatShouldBeInFront=n,this.targetIndex=i}},wV=(()=>{let t=class Od{handle(e){let n=[];for(let i=e.targetIndex+1;i<e.allElements.length;i++){let r=e.allElements[i];e.elementsThatShouldBeInFront.includes(r)||n.push(r)}n.forEach(i=>{e.fItemsContainer.removeChild(i),e.fItemsContainer.insertBefore(i,e.allElements[e.targetIndex])})}static \u0275fac=function(n){return new(n||Od)};static \u0275prov=y({token:Od,factory:Od.\u0275fac})};return t=P([R(hh)],t),t})(),$i=class{item;itemContainer;static fToken=Symbol("UpdateItemAndChildrenLayersRequest");constructor(o,e){this.item=o,this.itemContainer=e}},Ho=class{nodeOrGroupId;static fToken=Symbol("GetDeepChildrenNodesAndGroupsRequest");constructor(o){this.nodeOrGroupId=o}},TV=(()=>{let t=class Fd{_store=p(L);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 i=this._store.nodes.getAll().filter(r=>r.fParentId()===e);return i.reduce((r,a)=>r.concat(this._getChildrenNodes(a.fId(),n)),i)}static \u0275fac=function(n){return new(n||Fd)};static \u0275prov=y({token:Fd,factory:Fd.\u0275fac})};return t=P([R(Ho)],t),t})(),SV=(()=>{let t=class Nd{_store=p(L);_mediator=p(V);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()),i=this._getChildrenGroups(n);this._updateLayers(this._groupsContainer,e.item.hostElement,i);let r=this._getChildrenNodes(n);r.length&&this._updateLayers(this._nodesContainer,r[0],r)}_handleNode(e){let n=this._getChildrenNodesAndGroups(e.item.fId()),i=this._getChildrenNodes(n);this._updateLayers(e.itemContainer,e.item.hostElement,i)}_handleConnection(e){this._updateLayers(e.itemContainer,e.item.hostElement,[])}_updateLayers(e,n,i){let r=Array.from(e.children),a=r.findIndex(s=>s===n);this._isAnythingNeedToBeMoved(r,a,i)&&this._mediator.execute(new hh(e,r,i,a))}_isAnythingNeedToBeMoved(e,n,i){for(let r=n+1;r<e.length;r++)if(!i.includes(e[r]))return!0;return!1}_getChildrenGroups(e){let n=Array.from(this._groupsContainer.children);return e.filter(i=>this._groupsContainer.contains(i)).sort((i,r)=>n.indexOf(i)-n.indexOf(r))}_getChildrenNodes(e){let n=Array.from(this._nodesContainer.children);return e.filter(i=>this._nodesContainer.contains(i)).sort((i,r)=>n.indexOf(i)-n.indexOf(r))}_getChildrenNodesAndGroups(e){return this._mediator.execute(new Ho(e)).map(n=>n.hostElement)}static \u0275fac=function(n){return new(n||Nd)};static \u0275prov=y({token:Nd,factory:Nd.\u0275fac})};return t=P([R($i)],t),t})(),kV=(()=>{let t=class Ad{_dragSession=p(ge);_mediator=p(V);handle({nodeOrGroup:e}){this._selectNodeIfNotSelected(e),this._mediator.execute(new $i(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||Ad)};static \u0275prov=y({token:Ad,factory:Ad.\u0275fac})};return t=P([R(zo)],t),t})(),IV=[bV,vV,yV,CV,xV,kV],fh=class{static fToken=Symbol("ResetZoomRequest")},EV=(()=>{let t=class Ld{_store=p(L);get _canvas(){return this._store.fCanvas}handle(e){this._canvas.resetScale(),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=function(n){return new(n||Ld)};static \u0275prov=y({token:Ld,factory:Ld.\u0275fac})};return t=P([R(fh)],t),t})(),mh=class{position;step;direction;animate;static fToken=Symbol("SetZoomRequest");constructor(o,e,n,i=!1){this.position=o,this.step=e,this.direction=n,this.animate=i}},MV=new Set(["drag-node","drag-external-item","resize-node","rotate-node","create-connection","reassign-connection","drag-connection-waypoint","assign-to-container"]),DV=new Set(["drag-canvas","selection-area"]),PV=(()=>{let t=class Bd{_mediator=p(V);_store=p(L);_dragContext=p(ge,{optional:!0});get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.get(Ye.ZOOM)}get _isDragStarted(){return this._mediator.execute(new mi)}handle(e){if(!this._zoomComponent)return;let n=this._canvas.transform.scale,i=this._clamp(n+e.step*e.direction);if(i===n)return;let r=this._castPositionToFlow(e.position);if(this._isDragStarted){let a=this._getDragZoomMode();if(a==="blocked")return;a==="rebase"&&this._rebaseDragContext(r,i)}this._canvas.setScale(i,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 me.fromPoint(e).elementTransform(this._flowHost)}_getDragZoomMode(){if(this._dragContext?.isEmpty())return"blocked";let e=!1;for(let n of this._dragContext?.draggableItems??[]){let i=n.getEvent().kind;if(MV.has(i)){e=!0;continue}if(!DV.has(i))return"blocked"}return e?"rebase":"direct"}_rebaseDragContext(e,n){if(!this._dragContext)return;let i=this._dragContext.onPointerDownScale;if(!i||i===n){this._dragContext.onPointerDownScale=n;return}let r=1/n-1/i;this._dragContext.onPointerDownPosition=me.fromPoint(this._dragContext.onPointerDownPosition).add(me.fromPoint(e).mult(r)),this._dragContext.onPointerDownScale=n}static \u0275fac=function(n){return new(n||Bd)};static \u0275prov=y({token:Bd,factory:Bd.\u0275fac})};return t=P([R(mh)],t),t})(),RV=[EV,PV],_h=class{static fToken=Symbol("MinimapDrawNodesRequest")},OV=(()=>{let t=class Vd{_browser=p(ut);_store=p(L);handle(e){let n=this._store.fFlow,i=this._store.fCanvas;return!n||!i?[]:this._store.nodes.getAll().map(a=>this._renderNode(a,n,i))}_renderNode(e,n,i){let r=Io("rect",this._browser);rm(this._nodeRect(e,n,i),r);let a=e instanceof Eh;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,i){let r=oe.elementTransform(oe.fromElement(e.hostElement),n.hostElement);return oe.div(r,i.transform.scale)}_minimapClasses(e){let n=e.fMinimapClass();return Array.isArray(n)?n:[n]}static \u0275fac=function(n){return new(n||Vd)};static \u0275prov=y({token:Vd,factory:Vd.\u0275fac})};return t=P([R(_h)],t),t})(),gh=class{svg;minSize;static fToken=Symbol("MinimapCalculateViewportRequest");constructor(o,e){this.svg=o,this.minSize=e}},FV=(()=>{let t=class zd{_mediator=p(V);_store=p(L);handle({svg:e,minSize:n}){let i=this._store.fFlow,r=this._store.fCanvas;if(!i||!r)return{scale:1,viewBox:oe.initialize(0,0,0,0)};let a=this._contentRectInMinimapSpace(i,r,n),s=this._minimapRectInFlowSpace(e,i),c=this._viewportScale(a,s),u=this._viewportViewBox(a,s,c);return{scale:c,viewBox:u}}_contentRectInMinimapSpace(e,n,i){let r=this._nodesBoundingBox(),a=oe.elementTransform(r,e.hostElement),s=oe.div(a,n.transform.scale);return Wv(s,i)}_nodesBoundingBox(){return this._mediator.execute(new Ao)??oe.initialize(0,0,0,0)}_minimapRectInFlowSpace(e,n){return oe.elementTransform(oe.fromElement(e),n.hostElement)}_viewportScale(e,n){let i=n.width||1,r=n.height||1;return Math.max(e.width/i,e.height/r)}_viewportViewBox(e,n,i){let r=this._viewportSize(n,i),a=e.x-(r.width-e.width)/2,s=e.y-(r.height-e.height)/2;return oe.initialize(a,s,r.width,r.height)}_viewportSize(e,n){return Ft.initialize(e.width*n||0,e.height*n||0)}static \u0275fac=function(n){return new(n||zd)};static \u0275prov=y({token:zd,factory:zd.\u0275fac})};return t=P([R(gh)],t),t})(),bh=class{static fToken=Symbol("MinimapCalculateViewRectRequest")},NV=(()=>{let t=class Hd{_store=p(L);handle(e){let n=this._store.fFlow,i=this._store.fCanvas;if(!n||!i)return oe.initialize();let r=oe.div(oe.fromElement(n.hostElement),i.transform.scale);return r.x=0,r.y=0,r}static \u0275fac=function(n){return new(n||Hd)};static \u0275prov=y({token:Hd,factory:Hd.\u0275fac})};return t=P([R(bh)],t),t})(),vh=class{element;scale;viewBox;constructor(o,e=1,n=oe.initialize(0,0,0,0)){this.element=o,this.scale=e,this.viewBox=n}},AV=[OV,FV,NV],yh=class{position;static fToken=Symbol("GetNormalizedPointRequest");constructor(o){this.position=o}},LV=(()=>{let t=class qd{_store=p(L);handle({position:e}){return Go(e,this._store.flowHost,this._store.transform)}static \u0275fac=function(n){return new(n||qd)};static \u0275prov=y({token:qd,factory:qd.\u0275fac})};return t=P([R(yh)],t),t})(),Ch=class{static fToken=Symbol("SortNodeLayersRequest")},BV=(()=>{let t=class Gd{_store=p(L);_mediator=p(V);_browser=p(ut);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((i,r)=>n.indexOf(i)-n.indexOf(r))}_getChildrenNodes(e){return this._mediator.execute(new Ho(e)).filter(n=>this._nodesContainer.contains(n.hostElement)).map(n=>n.hostElement)}_moveChildrenNodes(e){let n=this._browser.document.createDocumentFragment();e.forEach(i=>{n.appendChild(i)}),this._nodesContainer.appendChild(n)}static \u0275fac=function(n){return new(n||Gd)};static \u0275prov=y({token:Gd,factory:Gd.\u0275fac})};return t=P([R(Ch)],t),t})(),ra=class{itemsContainer;static fToken=Symbol("SortItemsByParentRequest");constructor(o){this.itemsContainer=o}},VV=(()=>{let t=class jd{_store=p(L);_browser=p(ut);handle({itemsContainer:e}){let n=Array.from(e.children);if(n.length<2)return;let i=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,i,c,a,s);u.length&&this._moveBeforeNextSibling(e,u,c.hostElement.nextElementSibling)}}_buildPositions(e){let n=new Map;for(let i=0;i<e.length;i++)n.set(e[i],i);return n}_getSortedChildrenBeforeParent(e,n,i,r,a){let s=n.get(i.hostElement);if(s===void 0)return[];let c=this._getDeepChildren(i.fId(),r,a);if(!c.length)return[];let u=[];for(let f of c){let g=f.hostElement;if(!e.contains(g))continue;let x=n.get(g);x===void 0||x>=s||u.push(g)}return u.sort((f,g)=>(n.get(f)??0)-(n.get(g)??0)),u}_buildChildrenByParentId(e){let n=new Map;for(let i of e){let r=i.fParentId();if(!r)continue;let a=n.get(r)??[];a.push(i),n.set(r,a)}return n}_getDeepChildren(e,n,i){let r=i.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 f=u.fId();if(c.has(f))continue;c.add(f),a.push(u);let g=n.get(f);g?.length&&s.push(...g)}return i.set(e,a),a}_moveBeforeNextSibling(e,n,i){let r=this._browser.document.createDocumentFragment();for(let a of n)r.appendChild(a);e.insertBefore(r,i)}static \u0275fac=function(n){return new(n||jd)};static \u0275prov=y({token:jd,factory:jd.\u0275fac})};return t=P([R(ra)],t),t})(),xh=class{static fToken=Symbol("SortItemLayersRequest")},zV=(()=>{let t=class Ud{_store=p(L);_mediator=p(V);get _canvas(){return this._store.fCanvas}handle(e){if(!this._canvas)return;let n=this._store.nodes.getAll();n.length<2||!n.some(i=>!!i.fParentId())||(this._mediator.execute(new ra(this._canvas.fGroupsContainer().nativeElement)),this._mediator.execute(new Ch),this._mediator.execute(new ra(this._canvas.fNodesContainer().nativeElement)))}static \u0275fac=function(n){return new(n||Ud)};static \u0275prov=y({token:Ud,factory:Ud.\u0275fac})};return t=P([R(xh)],t),t})();function Io(t,o){return o.document.createElementNS("http://www.w3.org/2000/svg",t)}function pn(t,o){return o(t)}function Cn(t){return!0}function HV(){return/android|iPad|iPhone|iPod/i.test(navigator.userAgent||navigator.vendor||window.opera)}var qV=[...l7,..._8,...XA,...tV,...A8,...gV,...Y8,...IV,...RV,...AV,...CL,TV,xL,kL,LV,zV,VV,BV,SV,wV],GV=0,_C=(()=>{class t{_destroyRef=p(St);_elementReference=p(Xe);_fBrowser=p(ut);_stateChanges=new un;get hostElement(){return this._elementReference.nativeElement}id=B(`f-pattern-${GV++}`);vColor=B("rgba(0,0,0,0.1)");hColor=B("rgba(0,0,0,0.1)");vSize=B(20,{transform:Se});hSize=B(20,{transform:Se});_transform=ii.default();_position=U.initialize();_size=Ft.initialize(this.hSize(),this.vSize());_pattern;_vLine;_hLine;constructor(){this._createPattern()}_createPattern(){this._pattern=Io("pattern",this._fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._vLine=Io("line",this._fBrowser),this._pattern.appendChild(this._vLine),this._hLine=Io("line",this._fBrowser),this._pattern.appendChild(this._hLine)}ngOnInit(){this._listenStateChanges()}_listenStateChanges(){new Pn(this._stateChanges).pipe(wh()).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=Ft.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,i,r,a,s){e.setAttribute("stroke",`${n}`),e.setAttribute("x1",`${i}`),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=H({type:t,selectors:[["f-rect-pattern"]],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.id)},inputs:{id:[1,"id"],vColor:[1,"vColor"],hColor:[1,"hColor"],vSize:[1,"vSize"],hSize:[1,"hSize"]},features:[ve([{provide:gm,useExisting:t}]),so],decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})();var jV=new he("F_BACKGROUND"),UV=(()=>{class t{hostElement=p(Xe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,standalone:!1})}return t})(),gC=(()=>{class t extends UV{_mediator=p(V);fBackgroundPattern=Qa(gm);ngOnInit(){this._mediator.execute(new ci(Ye.BACKGROUND,this))}ngAfterContentInit(){this._mediator.execute(new $d(this.fBackgroundPattern()))}setTransform(e){this.fBackgroundPattern()?.setTransform(e)}ngOnDestroy(){this._mediator.execute(new di(Ye.BACKGROUND))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-background"]],contentQueries:function(n,i,r){n&1&&kf(r,i.fBackgroundPattern,gm,5),n&2&&Kt()},hostAttrs:[1,"f-component","f-background"],features:[ve([{provide:jV,useExisting:t}]),Y],ngContentSelectors:TA,decls:2,vars:0,template:function(n,i){n&1&&(Dt(),$(),J(0,"svg"),Le(1),ee())},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 D_=class{position;scale;constructor(o,e){this.position=o,this.scale=e}},$V=new he("F_CANVAS"),WV=(()=>{class t{transform=ii.default();_fCanvasChange=new un;destroyRef=p(St);getPosition(){return this.transform.position}setPosition(e){this.transform.position=e}emitCanvasChangeEvent(){this._fCanvasChange.notify()}subscribeOnCanvasChange(){new Pn(this._fCanvasChange).pipe(Wd(this.debounce())).listen(this.destroyRef,()=>{this.fCanvasChange.emit(new D_(U.sum(this.transform.position,this.transform.scaledPosition),this.transform.scale))})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,standalone:!1})}return t})(),aa=(()=>{class t extends WV{_mediator=p(V);_componentsStore=p(L);_elementReference=p(Xe);_injector=p(mt);_flowId;fCanvasChange=tt();position=B(U.initialize(),{transform:U.castToPoint});scale=B(1,{transform:Se});debounceTime=B(0,{transform:Se});debounce=E(()=>this.debounceTime()<0?0:this.debounceTime());get hostElement(){return this._elementReference.nativeElement}fGroupsContainer=it.required("fGroupsContainer");fNodesContainer=it.required("fNodesContainer");fConnectionsContainer=it.required("fConnectionsContainer");get flowId(){return this._flowId||""}ngOnInit(){this._flowId=this._mediator.execute(new th).fId(),this._mediator.execute(new Yd(this)),this._positionChange(),this._scaleChange(),super.subscribeOnCanvasChange()}_positionChange(){_e(()=>{this._mediator.execute(new Qd(this.transform,this.position()))},{injector:this._injector})}_scaleChange(){_e(()=>{this._mediator.execute(new Jd(this.transform,this.scale()))},{injector:this._injector})}redraw(){this._mediator.execute(new Tr(this.transform)),this.hostElement.style.removeProperty("transition"),this.hostElement.style.transform=ii.toString(this.transform),this._mediator.execute(new li)}redrawWithAnimation(){this._mediator.execute(new Tr(this.transform)),this.hostElement.style.transition=`transform ${HV()?80:150}ms ease-in-out`,this.hostElement.style.transform=ii.toString(this.transform),Iy(this.hostElement,()=>this.redraw())}centerGroupOrNode(e,n=!0){this._afterRedraw(()=>{this._mediator.execute(new Zd(e,n))})}fitToScreen(e=U.initialize(),n=!0){this._afterRedraw(()=>{this._mediator.execute(new Xd(e,n))})}resetScaleAndCenter(e=!0){this._afterRedraw(()=>{this._mediator.execute(new nu(e))})}getScale(){return this.transform.scale||1}setScale(e,n=U.initialize()){this._mediator.execute(new iu(e,n))}resetScale(){this._mediator.execute(new tu)}ngOnDestroy(){this._mediator.execute(new eu)}_afterRedraw(e){this._mediator.execute(new ia(this._componentsStore.connectionsRevision,this._componentsStore.nodesRevision,()=>lo(e,{injector:this._injector}),this.destroyRef))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-canvas"]],viewQuery:function(n,i){n&1&&vn(i.fGroupsContainer,SA,5)(i.fNodesContainer,kA,5)(i.fConnectionsContainer,IA,5),n&2&&Kt(3)},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:[1,"position"],scale:[1,"scale"],debounceTime:[1,"debounceTime"]},outputs:{fCanvasChange:"fCanvasChange"},features:[ve([{provide:$V,useExisting:t}]),Y],ngContentSelectors:MA,decls:12,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""],[1,"f-connections-container"]],template:function(n,i){n&1&&(Dt(EA),Ya(0),J(1,"div",null,0),Le(3),ee(),J(4,"div",3,1),Le(6,1),Le(7,2),Le(8,3),ee(),J(9,"div",null,2),Le(11,4),ee(),Za())},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 KV=0,bC=(()=>{class t extends iL{fId=B(`f-connection-${KV++}`,{alias:"fConnectionId"});fOutputId=B("",{transform:e=>Oo(e)||""});fInputId=B("",{transform:e=>Oo(e)||""});fRadius=8;fOffset=12;fBehavior=ai.FIXED;fType=To.STRAIGHT;fSelectionDisabled=B(!1,{transform:G});fReassignableStart=B(!1,{transform:G});fDraggingDisabled=B(!1,{alias:"fReassignDisabled",transform:G});fInputSide=B(Ke.DEFAULT,{transform:e=>wo(e,"fInputSide",Ke)});fOutputSide=B(Ke.DEFAULT,{transform:e=>wo(e,"fOutputSide",Ke)});get boundingElement(){return this.fPath().hostElement}_mediator=p(V);ngOnInit(){this._mediator.execute(new ru(this))}ngOnChanges(){this._mediator.execute(new Bi)}ngOnDestroy(){this._mediator.execute(new Du(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-connection"]],hostAttrs:[1,"f-component","f-connection"],hostVars:5,hostBindings:function(n,i){n&2&&(O("id",i.fId()),ce("f-connection-selection-disabled",i.fSelectionDisabled())("f-connection-reassign-disabled",i.fDraggingDisabled()))},inputs:{fId:[1,"fConnectionId","fId"],fOutputId:[1,"fOutputId"],fInputId:[1,"fInputId"],fRadius:[2,"fRadius","fRadius",Se],fOffset:[2,"fOffset","fOffset",Se],fBehavior:[2,"fBehavior","fBehavior",e=>wo(e,"fBehavior",ai)],fType:"fType",fSelectionDisabled:[1,"fSelectionDisabled"],fReassignableStart:[1,"fReassignableStart"],fDraggingDisabled:[1,"fReassignDisabled","fDraggingDisabled"],fInputSide:[1,"fInputSide"],fOutputSide:[1,"fOutputSide"]},exportAs:["fComponent"],standalone:!1,features:[ve([{provide:Th,useExisting:t}]),Y,so],ngContentSelectors:PA,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,i){if(n&1&&(Dt(DA),$(),m(0,"svg",1),F(1,"defs",null,0),Le(3),m(4,"g",2),M(5,RA,1,1,":svg:linearGradient",3),F(6,"path",4),m(7,"g"),F(8,"path",5),M(9,OA,1,0,":svg:circle",6),F(10,"circle",7),_()()(),Le(11,1),Le(12,2),Le(13,3),M(14,FA,1,0)),n&2){let r;l(5),D((r=i.fGradient())?5:-1,r),l(),O("d",i.path),l(2),h("useGradient",!!i.fGradient()),O("d",i.path),l(),D(i.fReassignableStart()?9:-1),l(5),D(i.fContents().length?14:-1)}},dependencies:[Om,J7,eL,W7,Q7],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 YV=new he("F_MAGNETIC_LINES"),ZV=(()=>{class t{hostElement=p(Xe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,standalone:!1})}return t})();var vC=(()=>{class t extends ZV{threshold=B(10,{transform:Se,alias:"fAlignThreshold"});_mediator=p(V);ngOnInit(){this._mediator.execute(new ci(Ye.MAGNETIC_LINES,this))}ngOnDestroy(){this._mediator.execute(new di(Ye.MAGNETIC_LINES))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-line-alignment"]],hostAttrs:[1,"f-line-alignment","f-component"],inputs:{threshold:[1,"fAlignThreshold","threshold"]},exportAs:["fComponent"],standalone:!1,features:[ve([{provide:YV,useExisting:t}]),Y],decls:0,vars:0,template:function(n,i){},styles:[NA]})}return t})();var fm=(()=>{class t{fMinSize=B(1e3);_mediator=p(V);hostElement=p(Xe).nativeElement;model=new vh(this.hostElement);redraw(){let{scale:e,viewBox:n}=this._mediator.execute(new gh(this.hostElement,this.fMinSize()));this.model=new vh(this.hostElement,e,n),Kv(n,this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["svg","fMinimapFlow",""]],inputs:{fMinSize:[1,"fMinSize"]}})}return t})(),mm=(()=>{class t{_mediator=p(V);_elementRef=p(Xe);hostElement=this._elementRef.nativeElement;redraw(){this.clear();let e=this._elementRef.nativeElement.ownerDocument.createDocumentFragment();this._mediator.execute(new _h).forEach(n=>{e.appendChild(n)}),this.hostElement.appendChild(e)}clear(){this.hostElement.replaceChildren()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["g","fMinimapCanvas",""]]})}return t})(),_m=(()=>{class t{_mediator=p(V);hostElement=p(Xe).nativeElement;redraw(){rm(this._mediator.execute(new bh),this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["rect","fMinimapView",""]],hostAttrs:[1,"f-component","f-minimap-view"]})}return t})(),XV=new he("F_MINIMAP_BASE"),QV=(()=>{class t{hostElement=p(Xe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,standalone:!1})}return t})(),yC=(()=>{class t extends QV{_destroyRef=p(St);_mediator=p(V);_browser=p(ut);_store=p(L);_canvas=it.required(mm);_flow=it.required(fm);_minimapView=it.required(_m);fMinSize=B(1e3);fNodeRenderLimit=B(1500,{transform:Se});get state(){return this._flow().model}ngOnInit(){this._mediator.execute(new ci(Ye.MINIMAP,this))}ngAfterViewInit(){this._listenTransformChanges()}_listenTransformChanges(){this._mediator.execute(new Kd).pipe(wh(),VA()).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 di(Ye.MINIMAP))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-minimap"]],viewQuery:function(n,i){n&1&&vn(i._canvas,mm,5)(i._flow,fm,5)(i._minimapView,_m,5),n&2&&Kt(3)},hostAttrs:[1,"f-component","f-minimap"],inputs:{fMinSize:[1,"fMinSize"],fNodeRenderLimit:[1,"fNodeRenderLimit"]},exportAs:["fComponent"],features:[ve([{provide:XV,useExisting:t}]),Y],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,i){n&1&&($(),m(0,"svg",0),F(1,"g",1)(2,"rect",2),_()),n&2&&h("fMinSize",i.fMinSize())},dependencies:[fm,mm,_m],styles:["[_nghost-%COMP%]{display:block;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0})}return t})();var JV=(()=>{class t{hostElement=p(Xe).nativeElement;initialize(){this.hostElement.style.display="none"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,standalone:!1})}return t})(),CC=(()=>{class t extends JV{_mediator=p(V);fTrigger=e=>e.shiftKey;ngOnInit(){this._mediator.execute(new ci(Ye.SELECTION_AREA,this)),super.initialize()}ngOnDestroy(){this._mediator.execute(new di(Ye.SELECTION_AREA))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-selection-area"]],hostAttrs:[1,"f-selection-area","f-component"],inputs:{fTrigger:"fTrigger"},features:[Y],decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{position:absolute}"]})}return t})();var ez=0,tz=120,sa=(()=>{class t extends M_{_destroyRef=p(St);_mediator=p(V);_browser=p(ut);_componentsStore=p(L);_cache=p(Rn);_injector=p(mt);fId=B(`f-flow-${ez++}`,{alias:"fFlowId"});fCache=B(!1,{transform:G});hostElement=p(Xe).nativeElement;fNodesRendered=tt();fFullRendered=tt();fLoaded=tt();ngOnInit(){this._mediator.execute(new Jp(this)),this._listenCacheChanges()}ngAfterContentInit(){this._browser.isBrowser()&&(this._listenNodesChanges(),this._listenConnectionsChanges())}_listenCacheChanges(){_e(()=>{this._cache.enabled=this.fCache()},{injector:this._injector})}_listenNodesChanges(){new Pn(this._componentsStore.nodesChanges$,this._componentsStore.progressiveRenderChanges$).pipe(wh(),Wd(tz),BA()).listen(this._destroyRef,()=>{this._mediator.execute(new mi)||this._componentsStore.hasPendingProgressiveRender||(this._mediator.execute(new xh),this._mediator.execute(new rh),this._mediator.execute(new ia(this._componentsStore.connectionsRevision+1,this._componentsStore.nodesRevision,()=>this._mediator.execute(new ah),this._destroyRef)),this._mediator.execute(new Bi))})}_listenConnectionsChanges(){this._mediator.execute(new So).listen(this._destroyRef,()=>{if(!this._mediator.execute(new mi)){if(this._componentsStore.isViewportAnimating){this._mediator.execute(new lh(this._destroyRef));return}this._mediator.execute(new Rr)}})}redraw(){this._mediator.execute(new Bi)}reset(){this._mediator.execute(new sh)}getNodesBoundingBox(){return this._mediator.execute(new Yp)}getSelection(){return this._mediator.execute(new oa)}getPositionInFlow(e){return this._mediator.execute(new yh(e))}getState(e){return this._mediator.execute(new ih(e?.measuredSize??!1))}selectAll(){this._mediator.execute(new So).pipe(ey()).listen(this._destroyRef,()=>{this._mediator.execute(new ph)})}select(e,n,i=!0){this._mediator.execute(new So).pipe(ey()).listen(this._destroyRef,()=>{this._mediator.execute(new uh(e,n,i))})}clearSelection(){this._mediator.execute(new ch)}ngOnDestroy(){this._mediator.execute(new oh(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["f-flow"]],hostAttrs:[1,"f-component","f-flow"],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.fId())},inputs:{fId:[1,"fFlowId","fId"],fCache:[1,"fCache"]},outputs:{fNodesRendered:"fNodesRendered",fFullRendered:"fFullRendered",fLoaded:"fLoaded"},features:[ve([V,...WA,Vy,qo,...qV,ge,...h8,{provide:F_,useExisting:t}]),Y],ngContentSelectors:LA,decls:7,vars:0,template:function(n,i){n&1&&(Dt(AA),Ya(0),Le(1),Le(2,1),Le(3,2),Le(4,3),Le(5,4),Le(6,5),Za())},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 xC=(()=>{class t{fVirtualForOf=[];fVirtualForTrackBy;_vc=p(Ka);_tpl=p(E0);_zone=p(on);_componentsStore=p(L,{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 i=()=>{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(i);return}this._rafId=null,this._finishProgressiveRender()};this._rafId=requestAnimationFrame(i)})}_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=Ue({type:t,selectors:[["","fVirtualFor","","fVirtualForOf",""]],inputs:{fVirtualForOf:"fVirtualForOf",fVirtualForTrackBy:"fVirtualForTrackBy"},features:[so]})}return t})();var xn=(function(t){return t[t.ZOOM_IN=1]="ZOOM_IN",t[t.ZOOM_OUT=-1]="ZOOM_OUT",t})(xn||{}),nz=new he("F_ZOOM"),P_=class{},iz=.1,oz=1,rz=.5,az=60,sz=.5;function lz(t){return Math.abs(t.deltaY)>=Math.abs(t.deltaX)?t.deltaY:t.deltaX}function cz(t,o,e){return dz(t)?pz(o,e):uz(o,e)}function dz(t){return(t.ctrlKey||t.metaKey)&&t.deltaMode===WheelEvent.DOM_DELTA_PIXEL}function uz(t,o){let e=Math.abs(t)/100,n=wC(e,iz,oz);return o*n}function pz(t,o){if(Math.abs(t)<rz)return 0;let e=Math.abs(t)/az,n=wC(e,0,sz);return o*n}function wC(t,o,e){return Math.max(o,Math.min(e,t))}var la=(()=>{class t extends P_{_mediator=p(V);_injector=p(mt);_store=p(L);_triggersListener=qe.emptyListener();isEnabled=B(!1,{alias:"fZoom",transform:G});fWheelTrigger=Cn;fDblClickTrigger=Cn;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 ci(Ye.ZOOM,this))}ngAfterViewInit(){this._listenZoomEnabledChanges()}_listenZoomEnabledChanges(){_e(()=>{this.isEnabled(),an(()=>this._listenTriggers())},{injector:this._injector})}_listenTriggers(){this._flowHost&&(this._disposeListeners(),this.isEnabled()&&(this._listen("wheel",this._onWheel,qe.activeListener()),this._listen("dblclick",this._onDoubleClick),this._triggersListener=()=>{this._unlisten("wheel",this._onWheel,qe.activeListener()),this._unlisten("dblclick",this._onDoubleClick)}))}_onWheel=e=>{if(!pn(e,this.fWheelTrigger)||(e.preventDefault(),e.target?.closest("[fLockedContext]")))return;let i=lz(e);if(i===0)return;let r=this._normalizeWheelStep(e,i);r!==0&&this.setZoom(U.initialize(e.clientX,e.clientY),r,this._calculateDirection(i),!1)};_normalizeWheelStep(e,n){return cz(e,n,this.step)}_calculateDirection(e){return e>0?xn.ZOOM_OUT:xn.ZOOM_IN}_onDoubleClick=e=>{if(!pn(e,this.fDblClickTrigger))return;e.preventDefault();let n=e.target;I9(n)||n?.closest("[fLockedContext]")||this.setZoom(U.initialize(e.clientX,e.clientY),this.dblClickStep,xn.ZOOM_IN,!0)};_getToCenterPosition(e,n){return U.initialize(e?.x||n.gravityCenter.x,e?.y||n.gravityCenter.y)}zoomIn(e){this._onZoomToCenter(xn.ZOOM_IN,e)}zoomOut(e){this._onZoomToCenter(xn.ZOOM_OUT,e)}_onZoomToCenter(e,n){this.setZoom(this._getToCenterPosition(n,oe.fromElement(this._flowHost)),this.step,e,!1)}setZoom(e,n,i,r){this._mediator.execute(new mh(e,n,i,r))}getZoomValue(){return this._canvas.transform.scale||1}reset(){this._mediator.execute(new fh)}_disposeListeners(){this._triggersListener(),this._triggersListener=qe.emptyListener()}ngOnDestroy(){this._disposeListeners(),this._mediator.execute(new di(Ye.ZOOM))}_listen(e,n,i){this._flowHost.addEventListener(e,n,i)}_unlisten(e,n,i){this._flowHost.removeEventListener(e,n,i)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=Ue({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",Se],maximum:[2,"fZoomMaximum","maximum",Se],step:[2,"fZoomStep","step",Se],dblClickStep:[2,"fZoomDblClickStep","dblClickStep",Se]},features:[ve([{provide:nz,useExisting:t}]),Y]})}return t})();var TC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[st]})}return t})();var cf=c3(CD(),1);var La=(function(t){return t.NETWORK_SIMPLEX="network-simplex",t.TIGHT_TREE="tight-tree",t.LONGEST_PATH="longest-path",t})(La||{}),Ire={direction:Ki.TOP_BOTTOM,nodeGap:48,layerGap:64,algorithm:La.NETWORK_SIMPLEX,defaultNodeSize:Ft.initialize(120,72)},l0=(()=>{class t extends eh{constructor(){super(Ire)}mergeOptions(e,n={}){return Wt(be(be({},e),n),{defaultNodeSize:n.defaultNodeSize?Ft.initialize(n.defaultNodeSize.width,n.defaultNodeSize.height):Ft.initialize(e.defaultNodeSize.width,e.defaultNodeSize.height)})}async calculate(e,n,i){let r=this.resolveLayoutOptions(i),a=this._buildGraph(e,n,r),s=new Map;return cf.layout(a),a.nodes().forEach(c=>{let u=a.node(c),f=e.find(x=>x.id===c);if(!u||!f)return;let g=f.size??r.defaultNodeSize;s.set(c,U.initialize(u.x-g.width/2,u.y-g.height/2))}),{nodes:hC(e,s)}}_buildGraph(e,n,i){let r=new cf.graphlib.Graph;return r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:this._mapDirection(i.direction),nodesep:i.nodeGap,ranksep:i.layerGap,ranker:this._mapAlgorithm(i.algorithm)}),e.forEach(a=>{let s=a.size??i.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 La.TIGHT_TREE:return"tight-tree";case La.LONGEST_PATH:return"longest-path";case La.NETWORK_SIMPLEX:default:return"network-simplex"}}_mapDirection(e){switch(e){case Ki.BOTTOM_TOP:return"BT";case Ki.LEFT_RIGHT:return"LR";case Ki.RIGHT_LEFT:return"RL";case Ki.TOP_BOTTOM:default:return"TB"}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var Ti={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 (re-run auto layout)",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 (balanced, stretched or organic)",layoutDirectionLabel:"Layout direction",layoutDirectionTooltip:"Layout direction (TB, BT, LR, RL)",layoutDirectionUnavailableTooltip:"Direction does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",layoutSpacingLabel:"Layout spacing",layoutSpacingTooltip:"Layout spacing (compact, normal, spacious)",layoutSpacingUnavailableTooltip:"Spacing does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",connectionTypeLabel:"Edge style",connectionTypeTooltip:"Edge style (orthogonal, straight, bezier or adaptive curve)"},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 ir={graph:{perf:{cache:!0,virtualization:!1},perfHud:!0},inspector:{actionMocks:!1}};var Ere="adaptive-curve",u0=["segment","straight","bezier","adaptive-curve"],xD="sm.graph.connection-type",wD="sm.graph.layout-algorithm",TD="sm.graph.layout-direction",df=(()=>{class t{_connectionType=te(c0(xD,Mre,Ere));_layoutAlgorithm=te(c0(wD,xb,vb));_layoutDirection=te(c0(TD,wb,yb));_layoutSpacing=te(Cb);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),d0(xD,e))}setLayoutAlgorithm(e){this._layoutAlgorithm()!==e&&(this._layoutAlgorithm.set(e),d0(wD,e))}setLayoutDirection(e){this._layoutDirection()!==e&&(this._layoutDirection.set(e),d0(TD,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 c0(t,o,e){let n=null;try{n=localStorage.getItem(t)}catch{return e}return n&&o(n)?n:e}function d0(t,o){try{localStorage.setItem(t,o)}catch{}}function Mre(t){return typeof t=="string"&&u0.includes(t)}function SD(t,o){let e=new Set([o]),n=[o];for(;n.length>0;){let i=n.shift(),r=t.get(i);if(r)for(let a of r)e.has(a)||(e.add(a),n.push(a))}return e}var Dre={TOP_BOTTOM:{output:Ke.BOTTOM,input:Ke.TOP},BOTTOM_TOP:{output:Ke.TOP,input:Ke.BOTTOM},LEFT_RIGHT:{output:Ke.RIGHT,input:Ke.LEFT},RIGHT_LEFT:{output:Ke.LEFT,input:Ke.RIGHT}};function kD(t,o){return fs(t)?Dre[o]:{input:Ke.CALCULATE,output:Ke.CALCULATE}}var ID=`
2139
+ .p-popover {
2140
+ margin-block-start: dt('popover.gutter');
2141
+ background: dt('popover.background');
2142
+ color: dt('popover.color');
2143
+ border: 1px solid dt('popover.border.color');
2144
+ border-radius: dt('popover.border.radius');
2145
+ box-shadow: dt('popover.shadow');
2146
+ will-change: transform;
2147
+ }
2148
+
2149
+ .p-popover-content {
2150
+ padding: dt('popover.content.padding');
2151
+ }
2152
+
2153
+ .p-popover-flipped {
2154
+ margin-block-start: calc(dt('popover.gutter') * -1);
2155
+ margin-block-end: dt('popover.gutter');
2156
+ }
2157
+
2158
+ .p-popover:after,
2159
+ .p-popover:before {
2160
+ bottom: 100%;
2161
+ left: calc(dt('popover.arrow.offset') + dt('popover.arrow.left'));
2162
+ content: ' ';
2163
+ height: 0;
2164
+ width: 0;
2165
+ position: absolute;
2166
+ pointer-events: none;
2167
+ }
2168
+
2169
+ .p-popover:after {
2170
+ border-width: calc(dt('popover.gutter') - 2px);
2171
+ margin-left: calc(-1 * (dt('popover.gutter') - 2px));
2172
+ border-style: solid;
2173
+ border-color: transparent;
2174
+ border-bottom-color: dt('popover.background');
2175
+ }
2176
+
2177
+ .p-popover:before {
2178
+ border-width: dt('popover.gutter');
2179
+ margin-left: calc(-1 * dt('popover.gutter'));
2180
+ border-style: solid;
2181
+ border-color: transparent;
2182
+ border-bottom-color: dt('popover.border.color');
2183
+ }
2184
+
2185
+ .p-popover-flipped:after,
2186
+ .p-popover-flipped:before {
2187
+ bottom: auto;
2188
+ top: 100%;
2189
+ }
2190
+
2191
+ .p-popover.p-popover-flipped:after {
2192
+ border-bottom-color: transparent;
2193
+ border-top-color: dt('popover.background');
2194
+ }
2195
+
2196
+ .p-popover.p-popover-flipped:before {
2197
+ border-bottom-color: transparent;
2198
+ border-top-color: dt('popover.border.color');
2199
+ }
2200
+ `;var Pre=["content"],Rre=["*"],Ore=t=>({closeCallback:t});function Fre(t,o){}function Nre(t,o){t&1&&k(0,Fre,0,0,"ng-template")}function Are(t,o){if(t&1){let e=W();m(0,"div",1),A("click",function(i){w(e);let r=d();return T(r.onOverlayClick(i))})("pMotionOnEnter",function(i){w(e);let r=d();return T(r.onAnimationStart(i))})("pMotionOnAfterLeave",function(){w(e);let i=d();return T(i.onAnimationEnd())}),m(1,"div",2),A("click",function(i){w(e);let r=d();return T(r.onContentClick(i))})("mousedown",function(i){w(e);let r=d();return T(r.onContentClick(i))}),Le(2),k(3,Nre,1,0,null,3),_()()}if(t&2){let e=d();Pt(e.sx("root")),z(e.cn(e.cx("root"),e.styleClass)),h("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(),z(e.cx("content")),h("pBind",e.ptm("content")),l(2),h("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Fe(17,Ore,e.onCloseClick.bind(e)))}}var Lre={root:()=>({position:"absolute"})},Bre={root:"p-popover p-component",content:"p-popover-content"},ED=(()=>{class t extends bt{name="popover";style=ID;classes=Bre;inlineStyles=Lre;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),MD=new he("POPOVER_INSTANCE"),p0=(()=>{class t extends Xt{componentName="Popover";$pcPopover=p(MD,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(fe,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("host"))}ariaLabel;ariaLabelledBy;dismissable=!0;style;styleClass;appendTo=B("body");autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";motionOptions=B(void 0);computedMotionOptions=E(()=>be(be({},this.ptm("motion")),this.motionOptions()));onShow=new ie;onHide=new ie;$appendTo=E(()=>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(ED);zone=p(on);overlayService=p(po);onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="content"&&(this._contentTemplate=e.template)})}bindDocumentClickListener(){if(Zt(this.platformId)&&!this.documentClickListener){let e=V0()?"touchstart":"click",n=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(n,e,i=>{this.dismissable&&(!this.container?.contains(i.target)&&this.target!==i.target&&!this.target.contains(i.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"?Pi(this.document.body,this.container):Pi(this.$appendTo(),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!=="self"&&Pi(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex&&Mn.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay)}align(){if(this.target&&this.container){pr(this.container,this.target,!1);let e=Ff(this.container),n=Ff(this.target),i=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue("border-radius"),r=0;e.left<n.left&&(r=n.left-e.left-parseFloat(i)*2),this.container.style.setProperty(U0("popover.arrow.left").name,`${r}px`),e.top<n.top&&(this.container.setAttribute("data-p-popover-flipped","true"),!this.$unstyled()&&ur(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&&Mn.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1,this.container=null)}focus(){let e=gt(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&&!ts()&&this.hide()}bindDocumentResizeListener(){if(Zt(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(){Zt(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new _r(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&&Mn.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(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-popover"]],contentQueries:function(n,i,r){if(n&1&&kt(r,Pre,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.contentTemplate=a.first),X(a=Q())&&(i.templates=a)}},hostBindings:function(n,i){n&1&&A("keydown.escape",function(a){return i.onEscapeKeydown(a)},Wa)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",G],style:"style",styleClass:"styleClass",appendTo:[1,"appendTo"],autoZIndex:[2,"autoZIndex","autoZIndex",G],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",Se],focusOnShow:[2,"focusOnShow","focusOnShow",G],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",motionOptions:[1,"motionOptions"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[ve([ED,{provide:MD,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],ngContentSelectors:Rre,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,i){n&1&&(Dt(),M(0,Are,4,19,"div",0)),n&2&&D(i.render?0:-1)},dependencies:[st,wt,Zn,Pe,fe,bo,lb],encapsulation:2,changeDetection:0})}return t})(),DD=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[p0,Pe,Pe]})}return t})();function zre(t,o){if(t&1){let e=W();m(0,"li",10)(1,"button",14),A("click",function(){let i=w(e).$implicit,r=d(),a=Lt(6);return r.setLayoutAlgorithm(i),T(a.hide())}),b(2),_()()}if(t&2){let e=o.$implicit,n=d();l(),ce("is-active",n.layoutAlgorithm()===e),O("aria-checked",n.layoutAlgorithm()===e)("data-testid","graph-layout-algorithm-option-"+e),l(),ke(" ",n.layoutAlgorithmLabel(e)," ")}}function Hre(t,o){if(t&1){let e=W();m(0,"button",15),A("click",function(){let i=w(e).$implicit,r=d(),a=Lt(11);return r.setLayoutDirection(i),T(a.hide())}),F(1,"i",16),_()}if(t&2){let e=o.$implicit,n=d();ce("is-active",n.layoutDirection()===e),h("pTooltip",n.layoutDirectionLabel(e)),O("aria-checked",n.layoutDirection()===e)("aria-label",n.layoutDirectionLabel(e))("data-testid","graph-layout-direction-option-"+e),l(),z(n.directionItemIcon(e))}}function qre(t,o){if(t&1){let e=W();m(0,"button",15),A("click",function(){let i=w(e).$implicit,r=d(),a=Lt(16);return r.setConnectionType(i),T(a.hide())}),$(),m(1,"svg",17),F(2,"path",7),_()()}if(t&2){let e=o.$implicit,n=d();ce("is-active",n.connectionType()===e),h("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 PD={TOP_BOTTOM:"pi pi-arrow-down",BOTTOM_TOP:"pi pi-arrow-up",LEFT_RIGHT:"pi pi-arrow-right",RIGHT_LEFT:"pi pi-arrow-left"},Gre={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"},RD=(()=>{class t{graphPreferences=p(df);texts=Ti;layoutAlgorithms=gb;layoutDirections=bb;connectionTypes=u0;layoutAlgorithm=this.graphPreferences.layoutAlgorithm;layoutDirection=this.graphPreferences.layoutDirection;connectionType=this.graphPreferences.connectionType;directionIcon=E(()=>PD[this.layoutDirection()]);directionAvailable=E(()=>fs(this.layoutAlgorithm()));layoutAlgorithmLabel(e){return Ti.layout.algorithm.options[e].label}layoutDirectionLabel(e){return Ti.layout.direction.options[e].label}connectionTypeLabel(e){return Ti.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 PD[e]}connectionTypeItemPath(e){return Gre[e]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({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,i){if(n&1){let r=W();m(0,"p-button",3),A("onClick",function(s){w(r);let c=Lt(6);return T(c.toggle(s))}),_(),m(1,"p-button",4),A("onClick",function(s){w(r);let c=Lt(11);return T(c.toggle(s))}),_(),m(2,"p-button",5),A("onClick",function(s){w(r);let c=Lt(16);return T(c.toggle(s))}),$(),m(3,"svg",6),F(4,"path",7),_()(),ja(),m(5,"p-popover",8,0)(7,"ul",9),se(8,zre,3,5,"li",10,$e),_()(),m(10,"p-popover",8,1)(12,"div",11),se(13,Hre,2,8,"button",12,$e),_()(),m(15,"p-popover",8,2)(17,"div",13),se(18,qre,3,7,"button",12,$e),_()()}n&2&&(h("ariaLabel",i.texts.toolbar.layoutAlgorithmLabel)("pTooltip",i.texts.toolbar.layoutAlgorithmTooltip)("text",!0)("rounded",!0),l(),h("icon",i.directionIcon())("ariaLabel",i.texts.toolbar.layoutDirectionLabel)("pTooltip",i.directionAvailable()?i.texts.toolbar.layoutDirectionTooltip:i.texts.toolbar.layoutDirectionUnavailableTooltip)("text",!0)("rounded",!0)("disabled",!i.directionAvailable()),l(),h("ariaLabel",i.texts.toolbar.connectionTypeLabel)("pTooltip",i.texts.toolbar.connectionTypeTooltip)("text",!0)("rounded",!0),l(2),O("d",i.connectionTypeItemPath(i.connectionType())),l(4),le(i.layoutAlgorithms),l(5),le(i.layoutDirections),l(5),le(i.connectionTypes))},dependencies:[zt,Ot,DD,p0,Ve,Be],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 OD={a11y:{toolbarLabel:"Toggle node kinds"},favorites:{label:"Favorites"}};function jre(t,o){if(t&1&&ae(0,"i",4),t&2){let e=d();z(e.piClass()),He("font-size",e.size(),"px")}}function Ure(t,o){if(t&1&&($(),J(0,"svg",1),ae(1,"path"),ee()),t&2){let e=d();O("width",e.size())("height",e.size()),l(),O("d",e.svgPath())}}function $re(t,o){if(t&1&&(J(0,"span",4),b(1),ee()),t&2){let e=d();He("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),C(e.emoji())}}function Wre(t,o){if(t&1&&(J(0,"span",5),b(1),ee()),t&2){let e=d();He("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),C(e.letter())}}var or=(()=>{class t{kindRegistry=p(ms);kind=B.required();size=B(18);provider=B(null);resolvedUi=E(()=>this.kindRegistry.lookup(this.kind()));variant=E(()=>{let e=this.resolvedUi();return e?.icon?.kind==="pi"?"pi":e?.icon?.kind==="svg"?"svg":e?.emoji?"emoji":"letter"});piClass=E(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="pi"?`pi ${e.id}`:""});svgPath=E(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="svg"?e.path:""});emoji=E(()=>this.resolvedUi()?.emoji??"");letter=E(()=>this.kindRegistry.labelOf(this.kind()).charAt(0).toUpperCase());static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({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,i){if(n&1&&M(0,jre,1,4,"i",0)(1,Ure,2,3,":svg:svg",1)(2,$re,2,5,"span",2)(3,Wre,2,5,"span",3),n&2){let r;D((r=i.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 FD=()=>({class:"kind-palette__content"}),ND=t=>({content:t}),Kre=(t,o)=>o.kind;function Yre(t,o){if(t&1&&(F(0,"sm-kind-icon",5),m(1,"span"),b(2),_()),t&2){let e=d().$implicit;h("kind",e.kind)("size",16),l(2),C(e.count)}}function Zre(t,o){if(t&1){let e=W();m(0,"p-togglebutton",4),A("ngModelChange",function(){let i=w(e).$implicit,r=d();return T(r.toggle(i.kind))}),k(1,Yre,3,3,"ng-template",null,0,We),_()}if(t&2){let e=o.$implicit,n=d();h("ngModel",n.isActive(e.kind))("pTooltip",e.label)("ariaLabel",e.label)("styleClass","kind-palette__btn kind-palette__btn--"+e.kind)("pt",Fe(7,ND,rn(6,FD))),O("data-testid","kind-palette-"+e.kind)}}function Xre(t,o){if(t&1&&(F(0,"i",7),m(1,"span"),b(2),_()),t&2){let e=d(2);ce("pi-star-fill",e.favoritesActive())("pi-star",!e.favoritesActive()),l(2),C(e.favoritesCount())}}function Qre(t,o){if(t&1){let e=W();m(0,"p-togglebutton",6),A("ngModelChange",function(){w(e);let i=d();return T(i.toggleFavoritesOnly())}),k(1,Xre,3,5,"ng-template",null,0,We),_()}if(t&2){let e=d();h("ngModel",e.favoritesActive())("pTooltip",e.texts.favorites.label)("ariaLabel",e.texts.favorites.label)("pt",Fe(5,ND,rn(4,FD)))}}var AD=(()=>{class t{loader=p(Ht);filters=p(dn);kindRegistry=p(ms);mapVisibility=p(ni);texts=OD;entries=E(()=>{let e=new Map,n=new Map;for(let i of this.loader.nodes())e.set(i.kind,(e.get(i.kind)??0)+1),this.mapVisibility.inScope(i.path)&&n.set(i.kind,(n.get(i.kind)??0)+1);return this.kindRegistry.kinds().map(i=>({kind:i.name,label:i.label,count:n.get(i.name)??0})).filter(i=>(e.get(i.kind)??0)>0)});favoritesCount=E(()=>this.loader.nodes().filter(e=>e.isFavorite===!0&&this.mapVisibility.inScope(e.path)).length);showFavorites=E(()=>this.loader.hasAnyFavorites()||this.filters.favoritesOnly());favoritesActive=E(()=>this.filters.favoritesOnly());isActive(e){return this.filters.isKindActive(e)}toggle(e){let n=this.entries().map(i=>i.kind);this.filters.toggleKind(e,n)}toggleFavoritesOnly(){this.filters.setFavoritesOnly(!this.filters.favoritesOnly())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({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,i){n&1&&(m(0,"div",1),se(1,Zre,3,9,"p-togglebutton",2,Kre),M(3,Qre,3,7,"p-togglebutton",3),_()),n&2&&(O("aria-label",i.texts.a11y.toolbarLabel),l(),le(i.entries()),l(2),D(i.showFavorites()?3:-1))},dependencies:[Vt,ln,cn,Jn,Qn,Ve,Be,or],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 Bn={a11y:{toolbarLabel:"Link kind filters"},kinds:{invokes:"Invokes",references:"References",mentions:"Mentions",supersedes:"Supersedes"},tooltips:{invokes:`Invokes:
2201
+ "/skill-command"`,references:`References:
2202
+ "[link](./link.md)"`,mentions:`Mention:
2203
+ "@agent.md"`,supersedes:`Supersedes:
2204
+ .sm annotation`}};var Jre=()=>({class:"link-kind-palette__content"}),eae=t=>({content:t}),tae=(t,o)=>o.kind;function nae(t,o){if(t&1&&b(0),t&2){let e=d(2).$implicit;ke(" ",e.text," ")}}function iae(t,o){if(t&1&&F(0,"i"),t&2){let e=d(2).$implicit;z(e.icon)}}function oae(t,o){if(t&1&&(m(0,"span",4),M(1,nae,1,1)(2,iae,1,2,"i",5),_()),t&2){let e=d().$implicit;l(),D(e.text?1:e.icon?2:-1)}}function rae(t,o){if(t&1){let e=W();m(0,"p-togglebutton",3),A("ngModelChange",function(){let i=w(e).$implicit,r=d(2);return T(r.toggle(i.kind))}),k(1,oae,3,1,"ng-template",null,0,We),_()}if(t&2){let e=o.$implicit,n=d(2);h("ngModel",n.isActive(e.kind))("pTooltip",e.tooltip)("ariaLabel",e.label)("styleClass","link-kind-palette__btn link-kind-palette__btn--"+e.kind)("pt",Fe(7,eae,rn(6,Jre))),O("data-testid","link-kind-palette-"+e.kind)}}function aae(t,o){if(t&1&&(m(0,"div",1),se(1,rae,3,9,"p-togglebutton",2,tae),_()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),le(e.entries())}}var LD=[{kind:"invokes",label:Bn.kinds.invokes,tooltip:Bn.tooltips.invokes,text:"/"},{kind:"references",label:Bn.kinds.references,tooltip:Bn.tooltips.references,icon:"pi pi-link"},{kind:"mentions",label:Bn.kinds.mentions,tooltip:Bn.tooltips.mentions,text:"@"},{kind:"supersedes",label:Bn.kinds.supersedes,tooltip:Bn.tooltips.supersedes,icon:"pi pi-angle-double-right"}];for(let t of LD)if(!ib.includes(t.kind))throw new Error(`link-kind-palette: unknown link kind "${t.kind}"`);var BD=(()=>{class t{loader=p(Ht);filters=p(dn);texts=Bn;counts=E(()=>{let e=this.loader.scan(),n=new Map;if(!e)return n;for(let i of e.links)n.set(i.kind,(n.get(i.kind)??0)+1);return n});entries=E(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),i=new Set(n);return LD.filter(r=>(e.get(r.kind)??0)>0||i.has(r.kind))});constructor(){_e(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),i=n.filter(r=>(e.get(r)??0)>0);i.length!==n.length&&this.filters.setLinkKinds(i)})}isActive(e){return this.filters.isLinkKindActive(e)}toggle(e){this.filters.toggleLinkKind(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({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,i){n&1&&M(0,aae,3,1,"div",1),n&2&&D(i.entries().length>0?0:-1)},dependencies:[Vt,ln,cn,Jn,Qn,Ve,Be],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--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__btn--supersedes .link-kind-palette__glyph{color:var(--sm-edge-supersedes)}[_nghost-%COMP%] .link-kind-palette__btn--supersedes[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-supersedes-active)}[_nghost-%COMP%] .link-kind-palette__tooltip .p-tooltip-text{white-space:pre-line;text-align:center;line-height:1.35}"],changeDetection:0})}return t})();var VD={a11y:{toolbarLabel:"Toggle severity filters"},error:{label:"Errors",tooltip:"Only nodes with errors"},warn:{label:"Warnings",tooltip:"Only nodes with warnings"}};var HD=()=>({class:"severity-palette__content"}),qD=t=>({content:t});function sae(t,o){if(t&1&&(m(0,"span",5),F(1,"i",6),_(),m(2,"span",7),b(3),_()),t&2){let e=d(3);l(3),C(e.errorCount())}}function lae(t,o){if(t&1){let e=W();m(0,"p-togglebutton",4),A("ngModelChange",function(){w(e);let i=d(2);return T(i.toggle("error"))}),k(1,sae,4,1,"ng-template",null,0,We),_()}if(t&2){let e=d(2);h("ngModel",e.isActive("error"))("pTooltip",e.texts.error.tooltip)("ariaLabel",e.texts.error.label)("pt",Fe(5,qD,rn(4,HD)))}}function cae(t,o){if(t&1&&(m(0,"span",5),F(1,"i",9),_(),m(2,"span",7),b(3),_()),t&2){let e=d(3);l(3),C(e.warnCount())}}function dae(t,o){if(t&1){let e=W();m(0,"p-togglebutton",8),A("ngModelChange",function(){w(e);let i=d(2);return T(i.toggle("warn"))}),k(1,cae,4,1,"ng-template",null,0,We),_()}if(t&2){let e=d(2);h("ngModel",e.isActive("warn"))("pTooltip",e.texts.warn.tooltip)("ariaLabel",e.texts.warn.label)("pt",Fe(5,qD,rn(4,HD)))}}function uae(t,o){if(t&1&&(m(0,"div",1),M(1,lae,3,7,"p-togglebutton",2),M(2,dae,3,7,"p-togglebutton",3),_()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),D(e.showError()?1:-1),l(),D(e.showWarn()?2:-1)}}var GD=(()=>{class t{loader=p(Ht);filters=p(dn);issuePaths=p(Co);mapVisibility=p(ni);texts=VD;visibleSet=E(()=>{let e=this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity()),n=new Set;for(let i of e)this.mapVisibility.inScope(i.path)&&n.add(i.path);return n});rawErrorCount=E(()=>this.issuePaths.bySeverity().errors.size);rawWarnCount=E(()=>this.issuePaths.bySeverity().warns.size);errorCount=E(()=>zD(this.issuePaths.bySeverity().errors,this.visibleSet()));warnCount=E(()=>zD(this.issuePaths.bySeverity().warns,this.visibleSet()));showError=E(()=>this.rawErrorCount()>0||this.filters.severityErrorActive());showWarn=E(()=>this.rawWarnCount()>0||this.filters.severityWarnActive());hasAny=E(()=>this.showError()||this.showWarn());constructor(){_e(()=>{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=H({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,i){n&1&&M(0,uae,3,3,"div",1),n&2&&D(i.hasAny()?0:-1)},dependencies:[Vt,ln,cn,Jn,Qn,Ve,Be],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 zD(t,o){let[e,n]=t.size<=o.size?[t,o]:[o,t],i=0;for(let r of e)n.has(r)&&i++;return i}function jD(t,o){let e=te(null),n=0;return _e(()=>{let i=t().trim(),r=++n;e.set(null),i&&o(i).then(a=>{r===n&&e.set(a)}).catch(()=>{r===n&&e.set(null)})}),e.asReadonly()}function Ba(t,o){return gn(Ba),jD(t,e=>o.renderInline(e))}function f0(t,o){return gn(f0),jD(t,e=>o.render(e))}var pae=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,hae=/^[a-z]+$/i;function uf(t){if(typeof t!="string")return null;let o=t.trim();return o.length===0?null:pae.test(o)||hae.test(o)?o:null}var fae=(t,o)=>o.step;function mae(t,o){t&1&&(m(0,"span",8),b(1),_()),t&2&&(l(),C(o))}function _ae(t,o){if(t&1&&(m(0,"span",12)(1,"span",28),b(2,"T"),_(),b(3),_()),t&2){let e=d(),n=Te(0);h("pTooltip",e.texts.stats.tokens(n.tokensTotal)),l(3),C(e.tokensShort())}}function gae(t,o){if(t&1&&(m(0,"span",13)(1,"span",28),b(2,"B"),_(),b(3),_()),t&2){let e=d(),n=Te(0);h("pTooltip",e.texts.stats.bytes(n.bytesTotal)),l(3),C(e.bytesShort())}}function bae(t,o){if(t&1&&(m(0,"span",29),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function vae(t,o){if(t&1&&(m(0,"span",30),b(1),_()),t&2){let e=d(2),n=Te(2);l(),C(e.texts.tagOverflow(n))}}function yae(t,o){if(t&1&&(m(0,"div",17),se(1,bae,2,1,"span",29,$e),M(3,vae,2,1,"span",30),_()),t&2){d();let e=Te(1),n=Te(2);l(),le(e),l(2),D(n>0?3:-1)}}function Cae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function xae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,Cae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.topics.tooltip),l(),C(n.texts.llm.topics.label),l(2),le(e.topics)}}function wae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Tae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,wae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.facts.tooltip),l(),C(n.texts.llm.facts.label),l(2),le(e.keyFacts)}}function Sae(t,o){if(t&1&&(M(0,xae,6,2,"div",31),M(1,Tae,6,2,"div",31)),t&2){let e=o;D(e.topics!=null&&e.topics.length?0:-1),l(),D(e.keyFacts!=null&&e.keyFacts.length?1:-1)}}function kae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"span"),b(4),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.when.tooltip),l(),C(n.texts.llm.when.label),l(2),C(e.whenToUse)}}function Iae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"span"),b(4),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.style.tooltip),l(),C(n.texts.llm.style.label),l(2),C(e.interactionStyle)}}function Eae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Mae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,Eae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.does.tooltip),l(),C(n.texts.llm.does.label),l(2),le(e.capabilities)}}function Dae(t,o){if(t&1&&(M(0,kae,5,3,"div",31),M(1,Iae,5,3,"div",31),M(2,Mae,6,2,"div",31)),t&2){let e=o;D(e.whenToUse?0:-1),l(),D(e.interactionStyle?1:-1),l(),D(e.capabilities!=null&&e.capabilities.length?2:-1)}}function Pae(t,o){if(t&1&&b(0),t&2){let e=o.$implicit,n=o.$index,i=o.$count;R0("",e.step,". ",e.description,"",n===i-1?"":" \xB7 ")}}function Rae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"span"),se(4,Pae,1,3,null,null,fae),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.steps.tooltip),l(),C(n.texts.llm.steps.label),l(2),le(e.recipe)}}function Oae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Fae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,Oae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.pre.tooltip),l(),C(n.texts.llm.pre.label),l(2),le(e.preconditions)}}function Nae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Aae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,Nae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.out.tooltip),l(),C(n.texts.llm.out.label),l(2),le(e.outputs)}}function Lae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Bae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,Lae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.fx.tooltip),l(),C(n.texts.llm.fx.label),l(2),le(e.sideEffects)}}function Vae(t,o){if(t&1&&(M(0,Rae,6,2,"div",31),M(1,Fae,6,2,"div",31),M(2,Aae,6,2,"div",31),M(3,Bae,6,2,"div",31)),t&2){let e=o;D(e.recipe!=null&&e.recipe.length?0:-1),l(),D(e.preconditions!=null&&e.preconditions.length?1:-1),l(),D(e.outputs!=null&&e.outputs.length?2:-1),l(),D(e.sideEffects!=null&&e.sideEffects.length?3:-1)}}function zae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"code",35),b(4),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.eg.tooltip),l(),C(n.texts.llm.eg.label),l(2),C(e.invocationExample)}}function Hae(t,o){if(t&1&&(m(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function qae(t,o){if(t&1&&(m(0,"div",31)(1,"span",32),b(2),_(),m(3,"div",33),se(4,Hae,2,1,"span",34,$e),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.fx.tooltip),l(),C(n.texts.llm.fx.label),l(2),le(e.sideEffects)}}function Gae(t,o){if(t&1&&(M(0,zae,5,3,"div",31),M(1,qae,6,2,"div",31)),t&2){let e=o;D(e.invocationExample?0:-1),l(),D(e.sideEffects!=null&&e.sideEffects.length?1:-1)}}function jae(t,o){if(t&1&&(m(0,"div",22),M(1,Sae,2,2),M(2,Dae,3,3),M(3,Vae,4,4),M(4,Gae,2,2),_()),t&2){let e,n,i,r,a=d();l(),D((e=a.summaryMarkdown())?1:-1,e),l(),D((n=a.summaryAgent())?2:-1,n),l(),D((i=a.summarySkill())?3:-1,i),l(),D((r=a.summaryCommand())?4:-1,r)}}function Uae(t,o){if(t&1&&F(0,"div",23),t&2){let e=d();h("innerHTML",e.descriptionHtml(),Ei)}}function $ae(t,o){if(t&1&&(m(0,"div",36)(1,"div",37)(2,"span",38),b(3),_(),m(4,"span",39),b(5),_()()()),t&2){let e=d(),n=d();l(3),C(n.texts.meta.model),l(2),C(e.model)}}function Wae(t,o){t&1&&M(0,$ae,6,2,"div",36),t&2&&D(o.model?0:-1)}var Kae={selected:!1,highlighted:!1,dimmed:!1},UD=(()=>{class t{node=B.required();stats=B({linksIn:0,linksOut:0});summary=B(null);selection=B(Kae);isFavorite=B(!1);favoriteToggle=tt();texts=Hn;expanded=Di(!1);fmAgent=E(()=>{let e=this.node();return e.kind==="agent"?e.frontmatter:null});summaryAgent=E(()=>{let e=this.summary();return e?.kind==="agent"?e:null});summarySkill=E(()=>{let e=this.summary();return e?.kind==="skill"?e:null});summaryCommand=E(()=>{let e=this.summary();return e?.kind==="command"?e:null});summaryMarkdown=E(()=>{let e=this.summary();return e?.kind==="markdown"?e:null});hasLlmCluster=E(()=>{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=E(()=>{let e=this.node();if(e.kind!=="agent")return null;let n=e.frontmatter;return uf(n.color)});markdown=p(yo);bytesShort=E(()=>{let e=this.stats().bytesTotal;return e===void 0?null:gr(e)});tokensShort=E(()=>{let e=this.stats().tokensTotal;return e===void 0?null:gr(e)});version=E(()=>is(this.node()));stability=E(()=>mo(this.node()));tagChips=E(()=>rs(this.node()));visibleTagChips=E(()=>this.tagChips().slice(0,3));moreTagsCount=E(()=>Math.max(0,this.tagChips().length-3));displayName=E(()=>{let e=this.node().frontmatter;return e.name?e.name:us(this.node().path)});description=E(()=>this.node().frontmatter.description??"");descriptionHtml=Ba(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=H({type:t,selectors:[["sm-node-card"]],hostAttrs:[1,"sm-gnode"],hostVars:15,hostBindings:function(n,i){n&2&&(O("data-kind",i.node().kind),He("--node-color",i.nodeColor()),ce("sm-gnode--with-color",!!i.nodeColor())("sm-gnode--deprecated",i.stability()==="deprecated")("sm-gnode--expanded",i.expanded())("sm-gnode--selected",i.selection().selected)("sm-gnode--highlighted",i.selection().highlighted)("sm-gnode--dimmed",i.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,i){if(n&1&&(Yt(0)(1)(2),m(3,"div",0)(4,"div",1),F(5,"sm-kind-icon",2),_(),m(6,"div",3)(7,"div",4)(8,"span",5),b(9),_(),F(10,"sm-view-contributions-host",6),_()(),m(11,"div",7),M(12,mae,2,1,"span",8),m(13,"button",9),A("click",function(a){return i.toggleExpanded(a)}),F(14,"i",10),_()(),m(15,"div",11),M(16,_ae,4,2,"span",12),M(17,gae,4,2,"span",13),m(18,"button",14),A("click",function(a){return i.toggleFavorite(a)}),F(19,"i",15),_(),F(20,"sm-view-contributions-host",16),_()(),M(21,yae,4,1,"div",17),m(22,"div",18)(23,"div",19),F(24,"i",20),m(25,"span",21),b(26),_()(),M(27,jae,5,4,"div",22),M(28,Uae,1,1,"div",23),M(29,Wae,1,1),_(),m(30,"div",24),F(31,"sm-view-contributions-host",25),m(32,"div",26),F(33,"sm-view-contributions-host",27),_()()),n&2){let r,a,s=i.node();It(i.stats()),l();let c=It(i.visibleTagChips());l(),It(i.moreTagsCount()),l(3),h("kind",s.kind)("provider",s.provider)("size",18),l(3),h("pTooltip",i.displayName()),l(),C(i.displayName()),l(),h("node",i.node()),l(2),D((r=i.version())?12:-1,r),l(),O("aria-label",i.texts.ariaExpand),l(3),D(i.tokensShort()!==null?16:-1),l(),D(i.bytesShort()!==null?17:-1),l(),ce("sm-gnode__favorite--on",i.isFavorite()),h("pTooltip",i.isFavorite()?i.texts.favoriteRemoveTooltip:i.texts.favoriteAddTooltip),O("aria-label",i.isFavorite()?i.texts.ariaFavoriteRemove:i.texts.ariaFavoriteAdd),l(),ce("pi-star-fill",i.isFavorite())("pi-star",!i.isFavorite()),l(),h("node",i.node()),l(),D(c.length?21:-1),l(2),h("pTooltip",s.path),l(3),C(s.path),l(),D(i.hasLlmCluster()?27:-1),l(),D(i.description()?28:-1),l(),D((a=i.fmAgent())?29:-1,a),l(2),h("node",i.node()),l(2),h("node",i.node())}},dependencies:[or,Ve,Be,ti],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 $D={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,o)=>`${t}/${o} nodes`,links:t=>`${t} links`}};var Yae=["sparkline"],Zae=()=>({class:"perf-hud__content"}),Xae=t=>({content:t});function Qae(t,o){if(t&1&&(m(0,"span",9),b(1),_()),t&2){let e=d(2);l(),C(e.texts.units.mb(e.heapMb()))}}function Jae(t,o){if(t&1&&(m(0,"div",3)(1,"span",4),b(2),_()(),m(3,"div",5)(4,"div",6)(5,"div",7),F(6,"canvas",8,1),m(8,"span",9),b(9),_()(),m(10,"div",10)(11,"div",11),M(12,Qae,2,1,"span",9),m(13,"span",9),b(14),_(),m(15,"span",9),b(16),_()()(),m(17,"div",10)(18,"div",11)(19,"span",9),b(20),_(),m(21,"span",9),b(22),_()()()()()),t&2){let e=d();l(2),C(e.texts.units.fps(e.fps())),l(),O("aria-hidden",!e.expanded()),l(6),C(e.texts.units.ms(e.frameTimeMs())),l(3),D(e.hasHeap()?12:-1),l(2),C(e.texts.units.domNodes(e.domNodes())),l(2),C(e.texts.units.longTasks(e.longTasks())),l(4),C(e.texts.units.nodes(e.visible(),e.total())),l(2),C(e.texts.units.links(e.edges()))}}var ese=30,m0=60,pf=14,WD=(()=>{class t{visible=B(0);total=B(0);edges=B(0);texts=$D;destroyRef=p(St);zone=p(on);fps=te(0);frameTimeMs=te(0);fpsSamples=te([]);sparklineCanvas=it("sparkline");heapMb=te(null);longTasks=te(0);domNodes=te(0);expanded=te(tse());hasHeap=E(()=>this.heapMb()!==null);constructor(){let e=0,n=0,i=performance.now(),r=i,a=0,s=u=>{let f=u-i;if(i=u,e+=1,n+=f,u-r>=1e3){let g=(u-r)/1e3,x=Math.round(e/g);this.fps.set(x),this.frameTimeMs.set(Math.round(n/Math.max(e,1))),this.heapMb.set(ise()),this.domNodes.set(document.querySelectorAll("*").length),this.fpsSamples.update(I=>{let S=I.length>=ese?I.slice(1):I.slice();return S.push(x),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(f=>f+u.getEntries().length)}),c.observe({type:"longtask",buffered:!0})}catch{}this.destroyRef.onDestroy(()=>{cancelAnimationFrame(a),c?.disconnect()}),_e(()=>{let u=this.sparklineCanvas(),f=this.fpsSamples();u&&ose(u.nativeElement,f)})}setExpanded(e){this.expanded.set(e),nse(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-perf-hud"]],viewQuery:function(n,i){n&1&&vn(i.sparklineCanvas,Yae,5),n&2&&Kt()},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,i){n&1&&(m(0,"p-togglebutton",2),A("ngModelChange",function(a){return i.setExpanded(a)}),k(1,Jae,23,8,"ng-template",null,0,We),_()),n&2&&h("ngModel",i.expanded())("ariaLabel",i.expanded()?i.texts.a11y.collapse:i.texts.a11y.expand)("styleClass",i.expanded()?"perf-hud perf-hud--expanded":"perf-hud")("pt",Fe(5,Xae,rn(4,Zae)))},dependencies:[Vt,ln,cn,Jn,Qn],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})(),KD="sm.perf-hud.expanded";function tse(){try{return localStorage.getItem(KD)==="1"}catch{return!1}}function nse(t){try{localStorage.setItem(KD,t?"1":"0")}catch{}}function ise(){let t=performance.memory;return t?Math.round(t.usedJSHeapSize/1024/1024):null}function ose(t,o){let e=window.devicePixelRatio||1,n=m0*e,i=pf*e;(t.width!==n||t.height!==i)&&(t.width=n,t.height=i);let r=t.getContext("2d");if(!r||(r.setTransform(e,0,0,e,0,0),r.clearRect(0,0,m0,pf),o.length<2))return;let a=Math.max(60,...o),s=m0/(o.length-1);r.beginPath();for(let c=0;c<o.length;c+=1){let u=c*s,f=pf-o[c]/a*pf;c===0?r.moveTo(u,f):r.lineTo(u,f)}r.strokeStyle=getComputedStyle(t).color,r.lineWidth=1,r.stroke()}var rse="debug-perf",YD=(()=>{class t{visible=te(this.resolveInitial());resolveInitial(){let n=new URLSearchParams(window.location.search).get(rse);return n==="1"||n==="true"?!0:n==="0"||n==="false"?!1:ir.graph.perfHud}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Si={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."},sections:{annotations:"Annotations",connections:"Connections",findings:"Findings",audit:"Metadata",plugins:"Plugin contributions",viewContributions:"View contributions",debug:"Debug",body:"Body"},body:{loading:"Loading body\u2026",empty:"This file has no body content (only frontmatter).",unavailable:"Body content unavailable. The source file may have moved or been deleted since the last scan.",renderError:"Failed to render markdown body."},bump:{label:"Bump version",tooltipEnabled:"Increment the sidecar version and refresh hashes.",tooltipDisabledFresh:"No drift detected (bump is only available when the body or frontmatter has changed since the last bump).",tooltipDisabledNoSidecar:"No sidecar yet. Run `sm sidecar annotate <path>` from your terminal to create one.",errorPrefix:"Bump failed:",errorFresh:"This node is fresh; nothing to bump.",errorNotFound:"Node not found on the server.",errorGeneric:"Could not bump the sidecar.",consentHeader:"Allow skill-map to create files in this project?",consentMessage:`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.
2205
+
2206
+ The choice is per-project and per-machine, it does not travel with the repo, and we won't ask again.`,consentAccept:"Yes, allow",consentReject:"Not now",consentDialogAriaLabel:"Sidecar consent"},findingHintLabel:"Hint:",bumpErrorDismissAriaLabel:"Dismiss",audit:{headerEmpty:"never bumped",fields:{lastBumpedAt:"Last bumped",lastBumpedBy:"by",createdAt:"Created",createdBy:"by"}},supersededByBanner:t=>`Superseded by ${t}`,debugToggleAriaLabel:"Toggle debug panel",debugToggleTooltip:"Show diagnostic fields (hash diffs, resolved provider/kind, sidecar status enum).",actionMocks:{label:"Actions",summary:"Generate summary",audit:"Run audit",validate:"Validate"}};var ZD=(()=>{class t{dataSource=p(ei);async bump(e,n={}){return this.dataSource.bumpSidecar(e,n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var XD=`
2207
+ .p-chip {
2208
+ display: inline-flex;
2209
+ align-items: center;
2210
+ background: dt('chip.background');
2211
+ color: dt('chip.color');
2212
+ border-radius: dt('chip.border.radius');
2213
+ padding-block: dt('chip.padding.y');
2214
+ padding-inline: dt('chip.padding.x');
2215
+ gap: dt('chip.gap');
2216
+ }
2217
+
2218
+ .p-chip-icon {
2219
+ color: dt('chip.icon.color');
2220
+ font-size: dt('chip.icon.size');
2221
+ width: dt('chip.icon.size');
2222
+ height: dt('chip.icon.size');
2223
+ }
2224
+
2225
+ .p-chip-image {
2226
+ border-radius: 50%;
2227
+ width: dt('chip.image.width');
2228
+ height: dt('chip.image.height');
2229
+ margin-inline-start: calc(-1 * dt('chip.padding.y'));
2230
+ }
2231
+
2232
+ .p-chip:has(.p-chip-remove-icon) {
2233
+ padding-inline-end: dt('chip.padding.y');
2234
+ }
2235
+
2236
+ .p-chip:has(.p-chip-image) {
2237
+ padding-block-start: calc(dt('chip.padding.y') / 2);
2238
+ padding-block-end: calc(dt('chip.padding.y') / 2);
2239
+ }
2240
+
2241
+ .p-chip-remove-icon {
2242
+ cursor: pointer;
2243
+ font-size: dt('chip.remove.icon.size');
2244
+ width: dt('chip.remove.icon.size');
2245
+ height: dt('chip.remove.icon.size');
2246
+ color: dt('chip.remove.icon.color');
2247
+ border-radius: 50%;
2248
+ transition:
2249
+ outline-color dt('chip.transition.duration'),
2250
+ box-shadow dt('chip.transition.duration');
2251
+ outline-color: transparent;
2252
+ }
2253
+
2254
+ .p-chip-remove-icon:focus-visible {
2255
+ box-shadow: dt('chip.remove.icon.focus.ring.shadow');
2256
+ outline: dt('chip.remove.icon.focus.ring.width') dt('chip.remove.icon.focus.ring.style') dt('chip.remove.icon.focus.ring.color');
2257
+ outline-offset: dt('chip.remove.icon.focus.ring.offset');
2258
+ }
2259
+ `;var ase=["removeicon"],sse=["*"];function lse(t,o){if(t&1){let e=W();m(0,"img",4),A("error",function(i){w(e);let r=d();return T(r.imageError(i))}),_()}if(t&2){let e=d();z(e.cx("image")),h("pBind",e.ptm("image"))("src",e.image,Mi)("alt",e.alt)}}function cse(t,o){if(t&1&&F(0,"span",6),t&2){let e=d(2);z(e.icon),h("pBind",e.ptm("icon"))("ngClass",e.cx("icon"))}}function dse(t,o){if(t&1&&k(0,cse,1,4,"span",5),t&2){let e=d();h("ngIf",e.icon)}}function use(t,o){if(t&1&&(m(0,"div",7),b(1),_()),t&2){let e=d();z(e.cx("label")),h("pBind",e.ptm("label")),l(),C(e.label)}}function pse(t,o){if(t&1){let e=W();m(0,"span",11),A("click",function(i){w(e);let r=d(3);return T(r.close(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onKeydown(i))}),_()}if(t&2){let e=d(3);z(e.removeIcon),h("pBind",e.ptm("removeIcon"))("ngClass",e.cx("removeIcon")),O("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel)}}function hse(t,o){if(t&1){let e=W();$(),m(0,"svg",12),A("click",function(i){w(e);let r=d(3);return T(r.close(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onKeydown(i))}),_()}if(t&2){let e=d(3);z(e.cx("removeIcon")),h("pBind",e.ptm("removeIcon")),O("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel)}}function fse(t,o){if(t&1&&(de(0),k(1,pse,1,6,"span",9)(2,hse,1,5,"svg",10),ue()),t&2){let e=d(2);l(),h("ngIf",e.removeIcon),l(),h("ngIf",!e.removeIcon)}}function mse(t,o){}function _se(t,o){t&1&&k(0,mse,0,0,"ng-template")}function gse(t,o){if(t&1){let e=W();m(0,"span",13),A("click",function(i){w(e);let r=d(2);return T(r.close(i))})("keydown",function(i){w(e);let r=d(2);return T(r.onKeydown(i))}),k(1,_se,1,0,null,14),_()}if(t&2){let e=d(2);z(e.cx("removeIcon")),h("pBind",e.ptm("removeIcon")),O("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel),l(),h("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function bse(t,o){if(t&1&&(de(0),k(1,fse,3,2,"ng-container",3)(2,gse,2,6,"span",8),ue()),t&2){let e=d();l(),h("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),l(),h("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var vse={root:({instance:t})=>({display:!t.visible&&"none"})},yse={root:({instance:t})=>["p-chip p-component",{"p-disabled":t.disabled}],image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},QD=(()=>{class t extends bt{name="chip";style=XD;classes=yse;inlineStyles=vse;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var JD=new he("CHIP_INSTANCE"),_0=(()=>{class t extends Xt{componentName="Chip";$pcChip=p(JD,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(fe,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}label;icon;image;alt;styleClass;disabled=!1;removable=!1;removeIcon;onRemove=new ie;onImageError=new ie;visible=!0;get removeAriaLabel(){return this.config.getTranslation(Bt.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([n,i])=>this[`_${n}`]!==i&&(this[`_${n}`]=i))}_chipProps;_componentStyle=p(QD);removeIconTemplate;templates;_removeIconTemplate;onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="removeicon"?this._removeIconTemplate=e.template:this._removeIconTemplate=e.template})}onChanges(e){if(e.chipProps&&e.chipProps.currentValue){let{currentValue:n}=e.chipProps;n.label!==void 0&&(this.label=n.label),n.icon!==void 0&&(this.icon=n.icon),n.image!==void 0&&(this.image=n.image),n.alt!==void 0&&(this.alt=n.alt),n.styleClass!==void 0&&(this.styleClass=n.styleClass),n.removable!==void 0&&(this.removable=n.removable),n.removeIcon!==void 0&&(this.removeIcon=n.removeIcon)}}close(e){this.visible=!1,this.onRemove.emit(e)}onKeydown(e){(e.key==="Enter"||e.key==="Backspace")&&this.close(e)}imageError(e){this.onImageError.emit(e)}get dataP(){return this.cn({removable:this.removable})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-chip"]],contentQueries:function(n,i,r){if(n&1&&kt(r,ase,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.removeIconTemplate=a.first),X(a=Q())&&(i.templates=a)}},hostVars:6,hostBindings:function(n,i){n&2&&(O("aria-label",i.label)("data-p",i.dataP),Pt(i.sx("root")),z(i.cn(i.cx("root"),i.styleClass)))},inputs:{label:"label",icon:"icon",image:"image",alt:"alt",styleClass:"styleClass",disabled:[2,"disabled","disabled",G],removable:[2,"removable","removable",G],removeIcon:"removeIcon",chipProps:"chipProps"},outputs:{onRemove:"onRemove",onImageError:"onImageError"},features:[ve([QD,{provide:JD,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],ngContentSelectors:sse,decls:6,vars:4,consts:[["iconTemplate",""],[3,"pBind","class","src","alt","error",4,"ngIf","ngIfElse"],[3,"pBind","class",4,"ngIf"],[4,"ngIf"],[3,"error","pBind","src","alt"],[3,"pBind","class","ngClass",4,"ngIf"],[3,"pBind","ngClass"],[3,"pBind"],["role","button",3,"pBind","class","click","keydown",4,"ngIf"],["role","button",3,"pBind","class","ngClass","click","keydown",4,"ngIf"],["data-p-icon","times-circle","role","button",3,"pBind","class","click","keydown",4,"ngIf"],["role","button",3,"click","keydown","pBind","ngClass"],["data-p-icon","times-circle","role","button",3,"click","keydown","pBind"],["role","button",3,"click","keydown","pBind"],[4,"ngTemplateOutlet"]],template:function(n,i){if(n&1&&(Dt(),Le(0),k(1,lse,1,5,"img",1)(2,dse,1,1,"ng-template",null,0,We)(4,use,2,4,"div",2)(5,bse,3,2,"ng-container",3)),n&2){let r=Lt(3);l(),h("ngIf",i.image)("ngIfElse",r),l(3),h("ngIf",i.label),l(),h("ngIf",i.removable)}},dependencies:[st,sn,Rt,wt,Wb,Pe,fe],encapsulation:2,changeDetection:0})}return t})(),hf=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[_0,Pe,Pe]})}return t})();var eP={cardHeader:"Annotations",emptyOverlay:"No sidecar (.sm) file present for this node.",emptyAnnotations:"Sidecar present but no annotations are declared yet.",sections:{supersession:"Supersession",provenance:"Authors",repository:"Repository",taxonomy:"Taxonomy",docs:"Docs"},fields:{supersedes:"Supersedes",supersededBy:"Superseded by",authors:"Authors",license:"License",source:"Source",sourceVersion:"Source version",tags:"Tags",docsUrl:"Docs URL"},brokenRefTooltip:"This path does not resolve to a node in the current scan scope."};function Va(t){if(typeof t!="string"||t.length===0)return null;try{let o=new URL(t);return o.protocol==="http:"||o.protocol==="https:"?t:null}catch{return null}}var xse=(t,o)=>"u:"+o;function wse(t,o){if(t&1&&(m(0,"p",1),b(1),_()),t&2){let e=d(2);l(),C(e.texts.emptyOverlay)}}function Tse(t,o){if(t&1&&(m(0,"p",2),b(1),_()),t&2){let e=d(2);l(),C(e.texts.emptyAnnotations)}}function Sse(t,o){if(t&1&&M(0,wse,2,1,"p",1)(1,Tse,2,1,"p",2),t&2){let e,n=d();D((e=n.overlay())!=null&&e.present?1:0)}}function kse(t,o){if(t&1){let e=W();m(0,"p-chip",6),A("click",function(){let i=w(e).$implicit,r=d(3);return T(r.tagClick.emit(i))})("keydown.enter",function(){let i=w(e).$implicit,r=d(3);return T(r.tagClick.emit(i))})("keydown.space",function(i){let r=w(e).$implicit;return d(3).tagClick.emit(r),T(i.preventDefault())}),_()}if(t&2){let e=o.$implicit,n=d(3);h("label",e)("styleClass","ann-panel__chip ann-panel__chip--user"+(n.isActiveTag(e)?" ann-panel__chip--active":""))}}function Ise(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",3)(3,"div",4),se(4,kse,1,2,"p-chip",5,xse),_()()),t&2){let e=d(2),n=e.taxonomy();l(),C(e.texts.fields.tags),l(3),le(n.userTags)}}function Ese(t,o){if(t&1){let e=W();m(0,"a",12),A("click",function(){w(e),d(2);let i=Te(0),r=d(2);return T(r.onOpenPath(i.supersededBy))})("keydown.enter",function(){w(e),d(2);let i=Te(0),r=d(2);return T(r.onOpenPath(i.supersededBy))})("keydown.space",function(i){w(e),d(2);let r=Te(0);return d(2).onOpenPath(r.supersededBy),T(i.preventDefault())}),F(1,"i",13),b(2),_()}if(t&2){d(2);let e=Te(0);l(2),ke(" ",e.supersededBy," ")}}function Mse(t,o){if(t&1&&(m(0,"span",11),b(1),_()),t&2){d(2);let e=Te(0),n=d(2);h("pTooltip",n.texts.brokenRefTooltip),l(),C(e.supersededBy)}}function Dse(t,o){if(t&1&&(m(0,"span",8),F(1,"i",9),m(2,"span"),b(3),_()(),M(4,Ese,3,1,"a",10)(5,Mse,2,2,"span",11)),t&2){d();let e=Te(0),n=d(2);l(3),C(n.texts.fields.supersededBy),l(),D(n.isBroken(e.supersededBy)?5:4)}}function Pse(t,o){if(t&1){let e=W();m(0,"a",12),A("click",function(){w(e);let i=d().$implicit,r=d(4);return T(r.onOpenPath(i))})("keydown.enter",function(){w(e);let i=d().$implicit,r=d(4);return T(r.onOpenPath(i))})("keydown.space",function(i){w(e);let r=d().$implicit;return d(4).onOpenPath(r),T(i.preventDefault())}),F(1,"i",13),b(2),_()}if(t&2){let e=d().$implicit;l(2),ke(" ",e," ")}}function Rse(t,o){if(t&1&&(m(0,"span",11),b(1),_()),t&2){let e=d().$implicit,n=d(4);h("pTooltip",n.texts.brokenRefTooltip),l(),C(e)}}function Ose(t,o){if(t&1&&M(0,Pse,3,1,"a",10)(1,Rse,2,2,"span",11),t&2){let e=o.$implicit,n=d(4);D(n.isBroken(e)?1:0)}}function Fse(t,o){if(t&1&&(m(0,"span",8),F(1,"i",14),m(2,"span"),b(3),_()(),se(4,Ose,2,1,null,null,$e)),t&2){d();let e=Te(0),n=d(2);l(3),C(n.texts.fields.supersedes),l(),le(e.supersedes)}}function Nse(t,o){if(t&1&&(Yt(0),m(1,"dt"),b(2),_(),m(3,"dd",7),M(4,Dse,6,2),M(5,Fse,6,1),_()),t&2){let e=d(2),n=It(e.supersession());l(2),C(e.texts.sections.supersession),l(2),D(n.supersededBy!==null?4:-1),l(),D(n.supersedes.length?5:-1)}}function Ase(t,o){if(t&1&&(m(0,"span",8),F(1,"i",16),m(2,"a",17),b(3),_()()),t&2){d();let e=Te(0);l(2),h("href",e.source,Mi),l(),C(e.source)}}function Lse(t,o){if(t&1&&(m(0,"span",8),F(1,"i",18),m(2,"code"),b(3),_()()),t&2){d();let e=Te(0);l(3),C(e.sourceVersion)}}function Bse(t,o){if(t&1&&(Yt(0),m(1,"dt"),b(2),_(),m(3,"dd",15),M(4,Ase,4,2,"span",8),M(5,Lse,4,1,"span",8),_()),t&2){let e=d(2),n=It(e.repository());l(2),C(e.texts.sections.repository),l(2),D(n.source!==null?4:-1),l(),D(n.sourceVersion!==null?5:-1)}}function Vse(t,o){if(t&1&&(m(0,"span",8),F(1,"i",20),m(2,"span"),b(3),_()()),t&2){let e=o.$implicit;l(3),C(e)}}function zse(t,o){if(t&1&&se(0,Vse,4,1,"span",8,$e),t&2){d();let e=Te(0);le(e.authors)}}function Hse(t,o){if(t&1&&(m(0,"span",8),F(1,"i",21),m(2,"span"),b(3),_()()),t&2){d();let e=Te(0);l(3),C(e.license)}}function qse(t,o){if(t&1&&(Yt(0),m(1,"dt"),b(2),_(),m(3,"dd",19),M(4,zse,2,0),M(5,Hse,4,1,"span",8),_()),t&2){let e=d(2),n=It(e.provenance());l(2),C(e.texts.sections.provenance),l(2),D(n.authors.length?4:-1),l(),D(n.license!==null?5:-1)}}function Gse(t,o){if(t&1&&(m(0,"span",8),F(1,"i",23),m(2,"a",17),b(3),_()()),t&2){d();let e=Te(0);l(2),h("href",e.docsUrl,Mi),l(),C(e.docsUrl)}}function jse(t,o){if(t&1&&(Yt(0),m(1,"dt"),b(2),_(),m(3,"dd",22),M(4,Gse,4,2,"span",8),_()),t&2){let e=d(2),n=It(e.docs());l(2),C(e.texts.sections.docs),l(2),D(n.docsUrl!==null?4:-1)}}function Use(t,o){if(t&1&&(m(0,"dl",0),M(1,Ise,6,1),M(2,Nse,6,4),M(3,Bse,6,4),M(4,qse,6,4),M(5,jse,5,3),_()),t&2){let e=d();l(),D(e.hasTaxonomy()?1:-1),l(),D(e.hasSupersession()?2:-1),l(),D(e.hasRepository()?3:-1),l(),D(e.hasProvenance()?4:-1),l(),D(e.hasDocs()?5:-1)}}var tP=(()=>{class t{overlay=B(void 0);knownPaths=B(null);openPath=tt();tagClick=tt();activeTag=B(null);isActiveTag(e){return this.activeTag()===e}texts=eP;annotations=E(()=>{let e=this.overlay();return!e||!e.present?null:e.annotations??null});hasAnnotations=E(()=>{let e=this.annotations();return e!==null&&Object.keys(e).length>0});hasAnyContent=E(()=>this.hasSupersession()||this.hasProvenance()||this.hasRepository()||this.hasTaxonomy()||this.hasDocs());supersession=E(()=>{let e=this.annotations()??{};return{supersedes:b0(e.supersedes),supersededBy:g0(e.supersededBy)}});hasSupersession=E(()=>ff(this.supersession()));provenance=E(()=>{let e=this.annotations()??{};return{authors:b0(e.authors),license:g0(e.license)}});hasProvenance=E(()=>ff(this.provenance()));repository=E(()=>{let e=this.annotations()??{};return{source:Va(e.source),sourceVersion:g0(e.sourceVersion)}});hasRepository=E(()=>ff(this.repository()));taxonomy=E(()=>{let e=this.annotations()??{};return{userTags:b0(e.tags)}});hasTaxonomy=E(()=>this.taxonomy().userTags.length>0);docs=E(()=>{let e=this.annotations()??{};return{docsUrl:Va(e.docsUrl)}});hasDocs=E(()=>ff(this.docs()));isBroken(e){let n=this.knownPaths();return n?!n.has(e):!1}onOpenPath(e){this.isBroken(e)||this.openPath.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-annotations-panel"]],inputs:{overlay:[1,"overlay"],knownPaths:[1,"knownPaths"],activeTag:[1,"activeTag"]},outputs:{openPath:"openPath",tagClick:"tagClick"},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-taxonomy",1,"ann-panel__chips"],["data-testid","annotations-tags",1,"ann-panel__chips-row"],["data-tag-source","user","role","button","tabindex","0",3,"label","styleClass"],["data-tag-source","user","role","button","tabindex","0",3,"click","keydown.enter","keydown.space","label","styleClass"],["data-testid","annotations-section-supersession",1,"ann-panel__inline"],[1,"ann-panel__meta"],["aria-hidden","true",1,"pi","pi-arrow-down"],["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"],["aria-hidden","true",1,"pi","pi-arrow-up"],["data-testid","annotations-section-repository",1,"ann-panel__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-provenance",1,"ann-panel__inline"],["aria-hidden","true",1,"pi","pi-user"],["aria-hidden","true",1,"pi","pi-shield"],["data-testid","annotations-section-docs",1,"ann-panel__inline"],["aria-hidden","true",1,"pi","pi-external-link"]],template:function(n,i){n&1&&M(0,Sse,2,1)(1,Use,6,5,"dl",0),n&2&&D(i.hasAnyContent()?1:0)},dependencies:[hf,_0,Ve,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}.ann-panel__inline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .65rem;row-gap:.35rem}.ann-panel__meta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;font-size:.83rem;color:var(--p-text-color)}.ann-panel__meta[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-size:.85rem}.ann-panel__meta[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--p-primary-color);word-break:break-all}.ann-panel__meta[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);font-size:.78rem}.ann-panel__chips[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.ann-panel__chips-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.3rem}[_nghost-%COMP%] .ann-panel__chip--user{background:var(--p-chip-background);color:var(--p-chip-color);cursor:pointer;transition:filter .1s ease,box-shadow .1s ease}[_nghost-%COMP%] .ann-panel__chip--user:hover{filter:brightness(1.05)}[_nghost-%COMP%] .ann-panel__chip--user:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}[_nghost-%COMP%] .ann-panel__chip--active{background:var(--p-primary-color);color:var(--p-primary-color-text);border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color-200)}"],changeDetection:0})}return t})();function g0(t){return typeof t=="string"&&t.length>0?t:null}function b0(t){return Array.isArray(t)?t.filter(o=>typeof o=="string"&&o.length>0):[]}function ff(t){for(let o of Object.values(t))if(o!=null){if(Array.isArray(o)){if(o.length>0)return!0;continue}if(typeof o=="string"){if(o.length>0)return!0;continue}return!0}return!1}var nP=`
2260
+ .p-tag {
2261
+ display: inline-flex;
2262
+ align-items: center;
2263
+ justify-content: center;
2264
+ background: dt('tag.primary.background');
2265
+ color: dt('tag.primary.color');
2266
+ font-size: dt('tag.font.size');
2267
+ font-weight: dt('tag.font.weight');
2268
+ padding: dt('tag.padding');
2269
+ border-radius: dt('tag.border.radius');
2270
+ gap: dt('tag.gap');
2271
+ }
2272
+
2273
+ .p-tag-icon {
2274
+ font-size: dt('tag.icon.size');
2275
+ width: dt('tag.icon.size');
2276
+ height: dt('tag.icon.size');
2277
+ }
2278
+
2279
+ .p-tag-rounded {
2280
+ border-radius: dt('tag.rounded.border.radius');
2281
+ }
2282
+
2283
+ .p-tag-success {
2284
+ background: dt('tag.success.background');
2285
+ color: dt('tag.success.color');
2286
+ }
2287
+
2288
+ .p-tag-info {
2289
+ background: dt('tag.info.background');
2290
+ color: dt('tag.info.color');
2291
+ }
2292
+
2293
+ .p-tag-warn {
2294
+ background: dt('tag.warn.background');
2295
+ color: dt('tag.warn.color');
2296
+ }
2297
+
2298
+ .p-tag-danger {
2299
+ background: dt('tag.danger.background');
2300
+ color: dt('tag.danger.color');
2301
+ }
2302
+
2303
+ .p-tag-secondary {
2304
+ background: dt('tag.secondary.background');
2305
+ color: dt('tag.secondary.color');
2306
+ }
2307
+
2308
+ .p-tag-contrast {
2309
+ background: dt('tag.contrast.background');
2310
+ color: dt('tag.contrast.color');
2311
+ }
2312
+ `;var $se=["icon"],Wse=["*"];function Kse(t,o){if(t&1&&F(0,"span",4),t&2){let e=d(2);z(e.cx("icon")),h("ngClass",e.icon)("pBind",e.ptm("icon"))}}function Yse(t,o){if(t&1&&(de(0),k(1,Kse,1,4,"span",3),ue()),t&2){let e=d();l(),h("ngIf",e.icon)}}function Zse(t,o){}function Xse(t,o){t&1&&k(0,Zse,0,0,"ng-template")}function Qse(t,o){if(t&1&&(m(0,"span",2),k(1,Xse,1,0,null,5),_()),t&2){let e=d();z(e.cx("icon")),h("pBind",e.ptm("icon")),l(),h("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)}}var Jse={root:({instance:t})=>["p-tag p-component",{"p-tag-info":t.severity==="info","p-tag-success":t.severity==="success","p-tag-warn":t.severity==="warn","p-tag-danger":t.severity==="danger","p-tag-secondary":t.severity==="secondary","p-tag-contrast":t.severity==="contrast","p-tag-rounded":t.rounded}],icon:"p-tag-icon",label:"p-tag-label"},iP=(()=>{class t extends bt{name="tag";style=nP;classes=Jse;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var oP=new he("TAG_INSTANCE"),v0=(()=>{class t extends Xt{componentName="Tag";$pcTag=p(oP,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(fe,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;severity;value;icon;rounded;iconTemplate;templates;_iconTemplate;_componentStyle=p(iP);onAfterContentInit(){this.templates?.forEach(e=>{e.getType()==="icon"&&(this._iconTemplate=e.template)})}get dataP(){return this.cn({rounded:this.rounded,[this.severity]:this.severity})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=H({type:t,selectors:[["p-tag"]],contentQueries:function(n,i,r){if(n&1&&kt(r,$se,4)(r,ct,4),n&2){let a;X(a=Q())&&(i.iconTemplate=a.first),X(a=Q())&&(i.templates=a)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),z(i.cn(i.cx("root"),i.styleClass)))},inputs:{styleClass:"styleClass",severity:"severity",value:"value",icon:"icon",rounded:[2,"rounded","rounded",G]},features:[ve([iP,{provide:oP,useExisting:t},{provide:vt,useExisting:t}]),_t([fe]),Y],ngContentSelectors:Wse,decls:5,vars:6,consts:[[4,"ngIf"],[3,"class","pBind",4,"ngIf"],[3,"pBind"],[3,"class","ngClass","pBind",4,"ngIf"],[3,"ngClass","pBind"],[4,"ngTemplateOutlet"]],template:function(n,i){n&1&&(Dt(),Le(0),k(1,Yse,2,1,"ng-container",0)(2,Qse,2,4,"span",1),m(3,"span",2),b(4),_()),n&2&&(l(),h("ngIf",!i.iconTemplate&&!i._iconTemplate),l(),h("ngIf",i.iconTemplate||i._iconTemplate),l(),z(i.cx("label")),h("pBind",i.ptm("label")),l(),C(i.value))},dependencies:[st,sn,Rt,wt,Pe,fe],encapsulation:2,changeDetection:0})}return t})(),rP=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=at({type:t});static \u0275inj=rt({imports:[v0,Pe,Pe]})}return t})();var aP={cardHeader:"Linked nodes",refreshLabel:"Refresh links",outgoingHeader:"Outgoing",incomingHeader:"Incoming",findingsHeader:"Findings",emptyFindings:"No findings on this node.",loading:"Loading links\u2026",error:"Failed to load links.",emptyOutgoing:"No outgoing links from this node.",emptyIncoming:"No incoming links to this node.",confidence:{high:"high",medium:"medium",low:"low"},sourcesPrefix:"detected by ",sourcesSeparator:", ",issueOnTargetTooltip:"Target has an issue: ",issueOnSourceTooltip:"Source has an issue: ",occurrencesHeader:"Occurs at:",occurrencesItem:"line {{line}} \xB7 `{{trigger}}` ({{extractor}})",occurrencesItemUnknownLine:"`{{trigger}}` ({{extractor}})",externalRefsHeader:"External references",emptyExternalRefs:"No external URLs in this node's body.",externalRefsItemLine:t=>`line ${t}`,externalRefsItemUnknownLine:"unknown line"};var tle=(t,o)=>o.url+"|"+(o.line??-1),nle=(t,o)=>o.analyzerId+"|"+((o.data==null?null:o.data.target)??"")+"|"+o.message,lP=(t,o)=>o.source+"|"+o.target+"|"+o.kind+"|"+((o.trigger==null?null:o.trigger.normalizedTrigger)??""),cP=(t,o)=>o.extractor+"|"+o.originalTrigger+"|"+((o.location==null?null:o.location.line)??-1);function ile(t,o){if(t&1&&(m(0,"p",4),b(1),_()),t&2){let e=d(2);l(),C(e.texts.loading)}}function ole(t,o){if(t&1&&(m(0,"p",5),b(1),_()),t&2){let e=d(2);l(),C(e.texts.error)}}function rle(t,o){if(t&1&&b(0),t&2){let e=d().$implicit,n=d(4);ke(" ",n.texts.externalRefsItemLine(e.line)," ")}}function ale(t,o){if(t&1&&b(0),t&2){let e=d(5);ke(" ",e.texts.externalRefsItemUnknownLine," ")}}function sle(t,o){if(t&1&&(m(0,"li",15)(1,"span",16),M(2,rle,1,1)(3,ale,1,1),_(),m(4,"a",17),b(5),_()()),t&2){let e=o.$implicit;O("data-testid","linked-nodes-external-ref-"+e.url),l(2),D(e.line?2:3),l(2),h("href",e.url,Mi),l(),C(e.url)}}function lle(t,o){if(t&1&&(m(0,"section",6)(1,"h4",8),b(2),_(),m(3,"ul",10),se(4,sle,6,4,"li",15,tle),_()()),t&2){let e=d(3);l(2),C(e.texts.externalRefsHeader),l(2),le(e.externalRefs())}}function cle(t,o){if(t&1&&(m(0,"p",9),b(1),_()),t&2){let e=d(3);l(),C(e.texts.emptyFindings)}}function dle(t,o){if(t&1&&(m(0,"li",18),F(1,"p-tag",19),m(2,"span",20),b(3),_()()),t&2){let e=o.$implicit,n=d(4);O("data-testid","linked-nodes-finding-"+e.analyzerId),l(),h("value",e.analyzerId)("severity",n.issueSeverity(e.severity))("rounded",!0),l(2),C(e.message)}}function ule(t,o){if(t&1&&(m(0,"ul",10),se(1,dle,4,5,"li",18,nle),_()),t&2){let e=d(3);l(),le(e.findings())}}function ple(t,o){if(t&1&&(m(0,"p",12),b(1),_()),t&2){let e=d(3);l(),C(e.texts.emptyOutgoing)}}function hle(t,o){if(t&1&&F(0,"p-tag",24),t&2){let e=o,n=d().$implicit,i=d(4);h("value",e.analyzerId)("severity",i.issueSeverity(e.severity))("rounded",!0)("pTooltip",e.message),O("data-testid","linked-nodes-outgoing-issue-"+n.target)}}function fle(t,o){if(t&1&&(m(0,"span",25),b(1),_()),t&2){let e=d().$implicit,n=d(4);l(),cr(" ",n.texts.sourcesPrefix,"",e.sources.join(n.texts.sourcesSeparator)," ")}}function mle(t,o){if(t&1&&(m(0,"li",28),b(1),_()),t&2){let e=o.$implicit,n=d(6);l(),C(n.occurrenceLabel(e))}}function _le(t,o){if(t&1&&(m(0,"ul",26)(1,"li",27),b(2),_(),se(3,mle,2,1,"li",28,cP),_()),t&2){let e=d().$implicit,n=d(4);O("data-testid","linked-nodes-occurrences-"+e.target),l(2),C(n.texts.occurrencesHeader),l(),le(e.occurrences)}}function gle(t,o){if(t&1){let e=W();m(0,"li",21),F(1,"p-tag",22),m(2,"p-button",23),A("onClick",function(){let i=w(e).$implicit,r=d(4);return T(r.onOpen(i.target))}),_(),F(3,"p-tag",24),M(4,hle,1,5,"p-tag",24),M(5,fle,2,2,"span",25),M(6,_le,5,2,"ul",26),_()}if(t&2){let e,n=o.$implicit,i=d(4);O("data-testid","linked-nodes-outgoing-row-"+n.target),l(),h("value",n.kind)("severity",i.kindSeverity(n.kind)),l(),h("link",!0)("label",n.target),O("data-testid","linked-nodes-outgoing-link-"+n.target),l(),h("value",i.confidenceValue(n.confidence))("severity",i.confidenceSeverity(n.confidence))("rounded",!0)("pTooltip",i.confidenceLabel(n.confidence)),l(),D((e=i.issueForOutgoing(n))?4:-1,e),l(),D(n.sources.length?5:-1),l(),D(n.occurrences&&n.occurrences.length>0?6:-1)}}function ble(t,o){if(t&1&&(m(0,"ul",10),se(1,gle,7,13,"li",21,lP),_()),t&2){let e=d(3);l(),le(e.outgoing())}}function vle(t,o){if(t&1&&(m(0,"p",14),b(1),_()),t&2){let e=d(3);l(),C(e.texts.emptyIncoming)}}function yle(t,o){if(t&1&&F(0,"p-tag",24),t&2){let e=o,n=d().$implicit,i=d(4);h("value",e.analyzerId)("severity",i.issueSeverity(e.severity))("rounded",!0)("pTooltip",e.message),O("data-testid","linked-nodes-incoming-issue-"+n.source)}}function Cle(t,o){if(t&1&&(m(0,"span",25),b(1),_()),t&2){let e=d().$implicit,n=d(4);l(),cr(" ",n.texts.sourcesPrefix,"",e.sources.join(n.texts.sourcesSeparator)," ")}}function xle(t,o){if(t&1&&(m(0,"li",28),b(1),_()),t&2){let e=o.$implicit,n=d(6);l(),C(n.occurrenceLabel(e))}}function wle(t,o){if(t&1&&(m(0,"ul",26)(1,"li",27),b(2),_(),se(3,xle,2,1,"li",28,cP),_()),t&2){let e=d().$implicit,n=d(4);O("data-testid","linked-nodes-occurrences-"+e.target),l(2),C(n.texts.occurrencesHeader),l(),le(e.occurrences)}}function Tle(t,o){if(t&1){let e=W();m(0,"li",21),F(1,"p-tag",22),m(2,"p-button",23),A("onClick",function(){let i=w(e).$implicit,r=d(4);return T(r.onOpen(i.source))}),_(),F(3,"p-tag",24),M(4,yle,1,5,"p-tag",24),M(5,Cle,2,2,"span",25),M(6,wle,5,2,"ul",26),_()}if(t&2){let e,n=o.$implicit,i=d(4);O("data-testid","linked-nodes-incoming-row-"+n.source),l(),h("value",n.kind)("severity",i.kindSeverity(n.kind)),l(),h("link",!0)("label",n.source),O("data-testid","linked-nodes-incoming-link-"+n.source),l(),h("value",i.confidenceValue(n.confidence))("severity",i.confidenceSeverity(n.confidence))("rounded",!0)("pTooltip",i.confidenceLabel(n.confidence)),l(),D((e=i.issueForIncoming(n))?4:-1,e),l(),D(n.sources.length?5:-1),l(),D(n.occurrences&&n.occurrences.length>0?6:-1)}}function Sle(t,o){if(t&1&&(m(0,"ul",10),se(1,Tle,7,13,"li",21,lP),_()),t&2){let e=d(3);l(),le(e.incoming())}}function kle(t,o){if(t&1&&(M(0,lle,6,1,"section",6),m(1,"section",7)(2,"h4",8),b(3),_(),M(4,cle,2,1,"p",9)(5,ule,3,0,"ul",10),_(),m(6,"section",11)(7,"h4",8),b(8),_(),M(9,ple,2,1,"p",12)(10,ble,3,0,"ul",10),_(),m(11,"section",13)(12,"h4",8),b(13),_(),M(14,vle,2,1,"p",14)(15,Sle,3,0,"ul",10),_()),t&2){let e=d(2);D(e.externalRefs().length>0?0:-1),l(3),C(e.texts.findingsHeader),l(),D(e.findings().length===0?4:5),l(4),C(e.texts.outgoingHeader),l(),D(e.outgoing().length===0?9:10),l(4),C(e.texts.incomingHeader),l(),D(e.incoming().length===0?14:15)}}function Ile(t,o){if(t&1){let e=W();m(0,"div",0)(1,"div",1)(2,"h3",2),b(3),_(),m(4,"p-button",3),A("onClick",function(){w(e);let i=d();return T(i.refresh())}),_()(),M(5,ile,2,1,"p",4)(6,ole,2,1,"p",5)(7,kle,16,7),_()}if(t&2){let e,n=d();l(3),C(n.texts.cardHeader),l(),h("rounded",!0)("text",!0)("ariaLabel",n.texts.refreshLabel)("pTooltip",n.texts.refreshLabel)("disabled",n.state()==="loading"),l(),D((e=n.state())==="loading"?5:e==="error"?6:e==="ready"?7:-1)}}var dP=(()=>{class t{dataSource=p(ei);wsEvents=p(_b);destroyRef=p(St);texts=aP;path=B(null);openPath=tt();state=te("idle");outgoingRaw=te([]);incomingRaw=te([]);outgoing=E(()=>this.outgoingRaw().filter(e=>!sP(e)));incoming=E(()=>this.incomingRaw().filter(e=>!sP(e)));issues=te([]);externalRefsRaw=te([]);externalRefs=E(()=>this.externalRefsRaw().filter(e=>Va(e.url)!==null));fetchToken=0;hasResults=E(()=>this.state()==="ready"&&(this.outgoing().length>0||this.incoming().length>0));findings=E(()=>{let e=this.path();return e?this.issues().filter(n=>n.nodeIds.includes(e)):[]});constructor(){this.wsEvents.scanCompleted$.pipe(vo(this.destroyRef)).subscribe(()=>{let e=this.path();e&&this.fetch(e)}),_e(()=>{let e=this.path();if(!e){this.fetchToken++,this.state.set("idle"),this.outgoingRaw.set([]),this.incomingRaw.set([]);return}this.fetch(e)})}refresh(){let e=this.path();e&&this.fetch(e)}onOpen(e){this.openPath.emit(e)}kindSeverity(e){return Ov[e]??"secondary"}confidenceSeverity(e){return Fv(e)}confidenceLabel(e){return this.texts.confidence[tm(e)]}confidenceValue(e){return e.toFixed(2)}issueSeverity(e){return e==="error"?"danger":e==="warn"?"warn":"info"}issueForOutgoing(e){let n=this.path();if(!n)return null;let i=[e.target,e.resolvedTarget].filter(c=>typeof c=="string"),r=this.issues().find(c=>{if(!c.nodeIds.includes(n))return!1;let u=c.data?.target;return typeof u!="string"?!1:i.includes(u)});if(r)return r;let a=e.resolvedTarget??e.target;return this.issues().find(c=>{if(!c.nodeIds.includes(a))return!1;let u=c.data?.target;return typeof u!="string"||u===a})??null}occurrenceLabel(e){let n=e.location?.line;return typeof n!="number"?this.texts.occurrencesItemUnknownLine.replace("{{trigger}}",e.originalTrigger).replace("{{extractor}}",e.extractor):this.texts.occurrencesItem.replace("{{line}}",String(n)).replace("{{trigger}}",e.originalTrigger).replace("{{extractor}}",e.extractor)}issueForIncoming(e){let n=this.path();if(!n)return null;let i=[e.target,e.resolvedTarget,n].filter(a=>typeof a=="string");return this.issues().find(a=>{if(!a.nodeIds.includes(e.source))return!1;let s=a.data?.target;return typeof s!="string"?!1:i.includes(s)})??null}async fetch(e){let n=++this.fetchToken;this.state.set("loading");try{let[i,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(i.status!=="fulfilled"||r.status!=="fulfilled"){this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}let s=i.value.items,c=r.value.items,u=Ele(e,s,c),f;try{let g=await this.dataSource.listIssues({nodes:u});if(n!==this.fetchToken)return;f=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(f),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=H({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"],[1,"linked-nodes-panel__header"],[1,"linked-nodes-panel__title"],["icon","pi pi-refresh","severity","secondary","data-testid","linked-nodes-refresh",3,"onClick","rounded","text","ariaLabel","pTooltip","disabled"],["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-external-refs",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-findings",1,"linked-nodes-panel__section"],[1,"linked-nodes-panel__section-title"],["data-testid","linked-nodes-findings-empty",1,"linked-nodes-panel__status"],[1,"linked-nodes-panel__rows"],["data-testid","linked-nodes-outgoing",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-outgoing-empty",1,"linked-nodes-panel__status"],["data-testid","linked-nodes-incoming",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-incoming-empty",1,"linked-nodes-panel__status"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--external-ref"],[1,"linked-nodes-panel__external-ref-line"],["target","_blank","rel","noopener noreferrer",1,"linked-nodes-panel__external-ref-url",3,"href"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--finding"],[3,"value","severity","rounded"],[1,"linked-nodes-panel__finding-message"],[1,"linked-nodes-panel__row"],[3,"value","severity"],["severity","primary","styleClass","linked-nodes-panel__path",3,"onClick","link","label"],[3,"value","severity","rounded","pTooltip"],[1,"linked-nodes-panel__sources"],[1,"linked-nodes-panel__occurrences"],[1,"linked-nodes-panel__occurrences-header"],[1,"linked-nodes-panel__occurrences-item"]],template:function(n,i){n&1&&M(0,Ile,8,7,"div",0),n&2&&D(i.path()?0:-1)},dependencies:[rP,v0,hf,zt,Ot,Ve,Be],styles:["[_nghost-%COMP%]{display:block}.linked-nodes-panel__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:0;margin-bottom:.6rem}.linked-nodes-panel__title[_ngcontent-%COMP%]{margin:0;font-size:.95rem;font-weight:600}.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%]{margin:0 0 .5rem;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__rows[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.linked-nodes-panel__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.4rem .5rem;border-radius:var(--sm-radius-md);background:var(--p-content-background);border:1px solid var(--p-content-border-color)}.linked-nodes-panel__path[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.85rem;padding:0;text-underline-offset:2px}.linked-nodes-panel__sources[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color);margin-left:auto}.linked-nodes-panel__occurrences[_ngcontent-%COMP%]{flex-basis:100%;list-style:none;margin:.25rem 0 0;padding:.25rem 0 0;border-top:1px dashed var(--p-content-border-color);display:flex;flex-direction:column;gap:.15rem}.linked-nodes-panel__occurrences-header[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__occurrences-item[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--p-text-muted-color)}.linked-nodes-panel__row--finding[_ngcontent-%COMP%]{align-items:flex-start}.linked-nodes-panel__finding-message[_ngcontent-%COMP%]{font-size:.8rem;line-height:1.4;color:var(--p-text-color)}.linked-nodes-panel__row--external-ref[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.85rem}.linked-nodes-panel__external-ref-line[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color);min-width:4.5rem}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]{flex:1;word-break:break-all;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 Ele(t,o,e){let n=new Set([t]);for(let i of o)i.resolvedTarget&&n.add(i.resolvedTarget),i.target&&n.add(i.target);for(let i of e)i.source&&n.add(i.source);return[...n]}function sP(t){return!!(t.source===t.target||t.resolvedTarget&&t.source===t.resolvedTarget)}var uP={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 pP=(t,o)=>o.key,Mle=(t,o)=>o.name,Dle=(t,o)=>o.event;function Ple(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.model),l(3),C(o)}}function Rle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.effort),l(3),C(o)}}function Ole(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function Fle(t,o){if(t&1&&(m(0,"code"),b(1),_(),M(2,Ole,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),D(n!==i-1?2:-1)}}function Nle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,Fle,3,2,null,null,$e),_()),t&2){let e=d(5);l(),C(e.texts.fields.tools),l(2),le(e.tools())}}function Ale(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",8),F(3,"span",9),m(4,"code"),b(5),_()()),t&2){let e=o,n=d(5);l(),C(n.texts.fields.color),l(2),He("background",e),l(2),C(e)}}function Lle(t,o){if(t&1){let e=W();m(0,"a",12),A("click",function(){let i=w(e),r=d(7);return T(r.openSkill(i))})("keydown.enter",function(){let i=w(e),r=d(7);return T(r.openSkill(i))})("keydown.space",function(i){let r=w(e);return d(7).openSkill(r),T(i.preventDefault())}),F(1,"i",13),b(2),_()}if(t&2){let e=d().$implicit;l(2),ke(" ",e," ")}}function Ble(t,o){if(t&1&&(m(0,"span",11),b(1),_()),t&2){let e=d().$implicit,n=d(6);h("pTooltip",n.texts.skillUnresolvedTooltip),l(),C(e)}}function Vle(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function zle(t,o){if(t&1&&(M(0,Lle,3,1,"a",10)(1,Ble,2,2,"span",11),M(2,Vle,2,0,"span",7)),t&2){let e,n=o.$implicit,i=o.$index,r=o.$count,a=d(6);D((e=a.skillPath(n))?0:1,e),l(2),D(i!==r-1?2:-1)}}function Hle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,zle,3,2,null,null,$e),_()),t&2){let e=d(5);l(),C(e.texts.fields.skills),l(2),le(e.skills())}}function qle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.permissionMode),l(3),C(o)}}function Gle(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function jle(t,o){if(t&1&&(m(0,"span",14),F(1,"i",15),m(2,"code"),b(3),_()(),M(4,Gle,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(3),C(e),l(),D(n!==i-1?4:-1)}}function Ule(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,jle,5,2,null,null,$e),_()),t&2){let e=d(5);l(),C(e.texts.fields.disallowedTools),l(2),le(e.disallowedTools())}}function $le(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.maxTurns),l(3),C(e.maxTurns())}}function Wle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.memory),l(3),C(o)}}function Kle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.background),l(3),C(e.background())}}function Yle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),C(e.texts.fields.isolation),l(3),C(o)}}function Zle(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function Xle(t,o){if(t&1&&(m(0,"code",16),b(1),_(),M(2,Zle,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;h("pTooltip",e.command??""),l(),C(e.name),l(),D(n!==i-1?2:-1)}}function Qle(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,Xle,3,3,null,null,Mle),_()),t&2){let e=d(5);l(),C(e.texts.fields.mcpServers),l(2),le(e.mcpServers())}}function Jle(t,o){if(t&1&&(m(0,"span",18),b(1,"\u2192"),_(),m(2,"code"),b(3),_()),t&2){let e=d().$implicit;l(3),C(e.keys[0])}}function ece(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function tce(t,o){if(t&1&&(m(0,"span",17)(1,"code"),b(2),_(),M(3,Jle,4,1),_(),M(4,ece,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(2),C(e.event),l(),D(e.keys.length?3:-1),l(),D(n!==i-1?4:-1)}}function nce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,tce,5,3,null,null,Dle),_()),t&2){let e=d(5);l(),C(e.texts.fields.hooks),l(2),le(e.hooks())}}function ice(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",19),F(3,"i",20),m(4,"code"),b(5),_()()),t&2){let e=o.$implicit,n=d(5);l(),C(e.key),l(2),h("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),C(e.value)}}function oce(t,o){if(t&1&&(m(0,"dl",5),M(1,Ple,5,2),M(2,Rle,5,2),M(3,Nle,5,1),M(4,Ale,6,4),M(5,Hle,5,1),M(6,qle,5,2),M(7,Ule,5,1),M(8,$le,5,2),M(9,Wle,5,2),M(10,Kle,5,2),M(11,Yle,5,2),M(12,Qle,5,1),M(13,nce,5,1),se(14,ice,6,4,null,null,pP),_()),t&2){let e,n,i,r,a,s,c=d(4);l(),D((e=c.model())?1:-1,e),l(),D((n=c.effort())?2:-1,n),l(),D(c.tools().length?3:-1),l(),D((i=c.color())?4:-1,i),l(),D(c.skills().length?5:-1),l(),D((r=c.permissionMode())?6:-1,r),l(),D(c.disallowedTools().length?7:-1),l(),D(c.maxTurns()!==null?8:-1),l(),D((a=c.memory())?9:-1,a),l(),D(c.background()!==null?10:-1),l(),D((s=c.isolation())?11:-1,s),l(),D(c.mcpServers().length?12:-1),l(),D(c.hooks().length?13:-1),l(),le(c.extraFields())}}function rce(t,o){if(t&1&&M(0,oce,16,13,"dl",5),t&2){let e=d(3);D(e.hasBehavior()||e.hasCapabilities()||e.extraFields().length?0:-1)}}function ace(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.model),l(3),C(e.model)}}function sce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.effort),l(3),C(e.effort)}}function lce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd"),b(3),_()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.whenToUse),l(2),C(e.when_to_use)}}function cce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.argumentHint),l(3),C(e.argumentHint)}}function dce(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function uce(t,o){if(t&1&&(m(0,"code"),b(1),_(),M(2,dce,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),D(n!==i-1?2:-1)}}function pce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,uce,3,2,null,null,$e),_()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.arguments),l(2),le(e.arguments)}}function hce(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function fce(t,o){if(t&1&&(m(0,"code"),b(1),_(),M(2,hce,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),D(n!==i-1?2:-1)}}function mce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,fce,3,2,null,null,$e),_()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.allowedTools),l(2),le(e.allowedTools)}}function _ce(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function gce(t,o){if(t&1&&(m(0,"span",14),F(1,"i",15),m(2,"code"),b(3),_()(),M(4,_ce,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(3),C(e),l(),D(n!==i-1?4:-1)}}function bce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,gce,5,2,null,null,$e),_()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.disallowedTools),l(2),le(e.disallowedTools)}}function vce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.context),l(3),C(e.context)}}function yce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.agent),l(3),C(e.agent)}}function Cce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.shell),l(3),C(e.shell)}}function xce(t,o){t&1&&(m(0,"span",7),b(1,"\xB7"),_())}function wce(t,o){if(t&1&&(m(0,"code"),b(1),_(),M(2,xce,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),D(n!==i-1?2:-1)}}function Tce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",6),se(3,wce,3,2,null,null,$e),_()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.paths),l(2),le(e.paths)}}function Sce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4,"disabled"),_()()),t&2){let e=d(5);l(),C(e.texts.skillBaseFields.disableModelInvocation)}}function kce(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Te(0),n=d(4);l(),C(n.texts.skillBaseFields.userInvocable),l(3),C(e.userInvocable)}}function Ice(t,o){if(t&1&&(m(0,"dt"),b(1),_(),m(2,"dd",19),F(3,"i",20),m(4,"code"),b(5),_()()),t&2){let e=o.$implicit,n=d(5);l(),C(e.key),l(2),h("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),C(e.value)}}function Ece(t,o){if(t&1&&(Yt(0),m(1,"dl",21),M(2,ace,5,2),M(3,sce,5,2),M(4,lce,4,2),M(5,cce,5,2),M(6,pce,5,1),M(7,mce,5,1),M(8,bce,5,1),M(9,vce,5,2),M(10,yce,5,2),M(11,Cce,5,2),M(12,Tce,5,1),M(13,Sce,5,1),M(14,kce,5,2),se(15,Ice,6,4,null,null,pP),_()),t&2){let e=d(4),n=It(e.skillBase());l(2),D(n.model!==null?2:-1),l(),D(n.effort!==null?3:-1),l(),D(n.when_to_use!==null?4:-1),l(),D(n.argumentHint!==null?5:-1),l(),D(n.arguments.length?6:-1),l(),D(n.allowedTools.length?7:-1),l(),D(n.disallowedTools.length?8:-1),l(),D(n.context!==null?9:-1),l(),D(n.agent!==null?10:-1),l(),D(n.shell!==null?11:-1),l(),D(n.paths.length?12:-1),l(),D(n.disableModelInvocation?13:-1),l(),D(n.userInvocable!==null?14:-1),l(),le(e.extraFields())}}function Mce(t,o){if(t&1&&M(0,Ece,17,14,"dl",21),t&2){let e=d(3);D(e.hasCapabilities()||e.extraFields().length?0:-1)}}function Dce(t,o){if(t&1&&(m(0,"p",22),b(1),_(),F(2,"blockquote",23)),t&2){let e=d(3);l(),C(e.texts.sections.initialPrompt),l(),h("innerHTML",e.initialPromptHtml(),Ei)}}function Pce(t,o){if(t&1&&(M(0,rce,1,1)(1,Mce,1,1),M(2,Dce,3,2)),t&2){let e=d(2);D(e.isAgent()?0:e.isSkillOrCommand()?1:-1),l(2),D(e.hasInitialPrompt()?2:-1)}}function Rce(t,o){if(t&1){let e=W();m(0,"div",0)(1,"section",1)(2,"button",2),A("click",function(){w(e);let i=d();return T(i.toggle.emit())}),m(3,"span",3),b(4),_(),F(5,"i",4),_(),M(6,Pce,3,2),_()()}if(t&2){let e=d();l(2),O("aria-expanded",e.expanded()),l(2),C(e.texts.sections.definition),l(),ce("pi-chevron-right",!e.expanded())("pi-chevron-down",e.expanded()),l(),D(e.expanded()?6:-1)}}var Oce=new Set(["name","description","metadata","model","effort","permissionMode","maxTurns","memory","background","isolation","color","tools","disallowedTools","skills","mcpServers","hooks","initialPrompt"]),Fce=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"]),hP=(()=>{class t{frontmatter=B.required();kind=B.required();provider=B(void 0);skillPathByName=B(null);onSkillClick=B(null);expanded=B(!0);toggle=tt();texts=uP;markdown=p(yo);hasVendorSurface=E(()=>{let e=this.kind();return e==="agent"||e==="skill"||e==="command"});isAgent=E(()=>this.kind()==="agent");isSkillOrCommand=E(()=>{let e=this.kind();return e==="skill"||e==="command"});tools=E(()=>_f(this.fm().tools));model=E(()=>nn(this.fm().model));skills=E(()=>_f(this.fm().skills));disallowedTools=E(()=>_f(this.fm().disallowedTools));initialPrompt=E(()=>nn(this.fm().initialPrompt));permissionMode=E(()=>nn(this.fm().permissionMode));maxTurns=E(()=>Nce(this.fm().maxTurns));memory=E(()=>nn(this.fm().memory));background=E(()=>typeof this.fm().background=="boolean"?this.fm().background:null);effort=E(()=>nn(this.fm().effort));isolation=E(()=>nn(this.fm().isolation));color=E(()=>uf(this.fm().color));mcpServers=E(()=>{let e=this.fm().mcpServers;return Array.isArray(e)?e.filter(n=>typeof n=="object"&&n!==null).map((n,i)=>{let r=n.args,a=Array.isArray(r)?r.length:0;return{name:typeof n.name=="string"&&n.name.length>0?n.name:`mcpServer[${i}]`,command:typeof n.command=="string"?n.command:null,argsCount:a}}):[]});hooks=E(()=>{let e=this.fm().hooks;if(typeof e!="object"||e===null)return[];let n=[];for(let[i,r]of Object.entries(e)){let a=typeof r=="object"&&r!==null?Object.keys(r):[];n.push({event:i,keys:a})}return n});skillBase=E(()=>{let e=this.fm();return{when_to_use:nn(e.when_to_use),argumentHint:nn(e["argument-hint"]),arguments:mf(e.arguments),disableModelInvocation:e["disable-model-invocation"]===!0,userInvocable:typeof e["user-invocable"]=="boolean"?e["user-invocable"]:null,allowedTools:mf(e["allowed-tools"]),disallowedTools:mf(e["disallowed-tools"]),model:nn(e.model),effort:nn(e.effort),context:nn(e.context),agent:nn(e.agent),paths:mf(e.paths),shell:nn(e.shell)}});hasBehavior=E(()=>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=E(()=>{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=E(()=>this.isAgent()&&this.initialPrompt()!==null);initialPromptHtml=f0(()=>this.initialPrompt()??"",this.markdown);extraFields=E(()=>{let e=this.isAgent()?Oce:this.isSkillOrCommand()?Fce:null;if(!e)return[];let n=this.fm(),i=[];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);i.push({key:r,value:s})}return i});hasAnyContent=E(()=>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=H({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__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"],[1,"vfm__danger"],["aria-hidden","true",1,"pi","pi-ban"],[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,i){n&1&&M(0,Rce,7,7,"div",0),n&2&&D(i.hasAnyContent()?0:-1)},dependencies:[Ve,Be],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 nn(t){return typeof t=="string"&&t.length>0?t:null}function Nce(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function _f(t){return Array.isArray(t)?t.filter(o=>typeof o=="string"&&o.length>0):[]}function mf(t){return typeof t=="string"?t.length>0?[t]:[]:Array.isArray(t)?_f(t):[]}var fP={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 gP=(t,o)=>o.key,Ace=(t,o)=>o.pluginId;function Lce(t,o){if(t&1&&(m(0,"p",0),b(1),_()),t&2){let e=d();l(),C(e.texts.empty)}}function Bce(t,o){if(t&1&&(m(0,"span",5),b(1),_()),t&2){let e=d().$implicit,n=d(3);l(),C(n.texts.rootContribBadge(e.pluginId))}}function Vce(t,o){if(t&1&&(m(0,"div",3)(1,"code",4),b(2),_(),M(3,Bce,2,1,"span",5),m(4,"pre",6),b(5),_()()),t&2){let e=o.$implicit;l(2),C(e.key),l(),D(e.pluginId!==null?3:-1),l(2),C(e.value)}}function zce(t,o){if(t&1&&(m(0,"div",1),se(1,Vce,6,3,"div",3,gP),_()),t&2){let e=d(2);l(),le(e.rootContributions())}}function Hce(t,o){if(t&1&&(m(0,"span",10),b(1),_()),t&2){let e=d(4);l(),C(e.texts.unregisteredBadge)}}function qce(t,o){if(t&1&&(m(0,"dt",12),b(1),_(),m(2,"dd")(3,"pre"),b(4),_()()),t&2){let e=o.$implicit;h("pTooltip",e.description??""),l(),C(e.key),l(3),C(e.value)}}function Gce(t,o){if(t&1&&(m(0,"section",7)(1,"h5",8)(2,"span",9),b(3),_(),M(4,Hce,2,1,"span",10),_(),m(5,"dl",11),se(6,qce,5,3,null,null,gP),_()()),t&2){let e=o.$implicit;O("data-testid","plugin-contributions-ns-"+e.pluginId),l(3),C(e.pluginId),l(),D(e.registered?-1:4),l(2),le(e.rows)}}function jce(t,o){if(t&1&&(m(0,"div",2),se(1,Gce,8,3,"section",7,Ace),_()),t&2){let e=d(2);l(),le(e.namespaces())}}function Uce(t,o){if(t&1&&(M(0,zce,3,0,"div",1),M(1,jce,3,0,"div",2)),t&2){let e=d();D(e.rootContributions().length?0:-1),l(),D(e.namespaces().length?1:-1)}}var mP=new Set(["identity","annotations","settings","audit"]),bP=(()=>{class t{dataSource=p(ei);sidecarRoot=B(void 0);texts=fP;catalog=te(null);constructor(){this.fetchCatalog()}namespaces=E(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog(),i=new Map;if(n)for(let a of n){if(a.location!=="namespaced")continue;let s=i.get(a.pluginId);s?s.push(a):i.set(a.pluginId,[a])}let r=[];for(let[a,s]of Object.entries(e)){if(mP.has(a)||this.isRegisteredRootKey(a))continue;let u=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:{value:s},f=i.has(a),g=i.get(a)??[],x=Object.entries(u).map(([I,S])=>({key:I,value:_P(S),description:f?$ce(g,I):null}));r.push({pluginId:a,registered:f,rows:x})}return r});rootContributions=E(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog();if(!n)return[];let i=new Map;for(let a of n)a.location==="root"&&i.set(a.key,a);let r=[];for(let[a,s]of Object.entries(e)){if(mP.has(a))continue;let c=i.get(a);c&&r.push({key:a,pluginId:c.pluginId,value:_P(s)})}return r});count=E(()=>this.namespaces().length+this.rootContributions().length);isEmpty=E(()=>this.count()===0);isRegisteredRootKey(e){let n=this.catalog();return n?n.some(i=>i.location==="root"&&i.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=H({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,i){n&1&&M(0,Lce,2,1,"p",0)(1,Uce,2,2),n&2&&D(i.isEmpty()?0:1)},dependencies:[Ve,Be],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 _P(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 $ce(t,o){for(let e of t)if(e.key===o){let n=e.schema.description;return typeof n=="string"&&n.length>0?n:null}return null}var vP=(()=>{class t{node=B(null);static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-inspector-slots-panel"]],inputs:{node:[1,"node"]},decls:6,vars:6,consts:[["slot","inspector.body.panel.breakdown",3,"node"],["slot","inspector.body.panel.records",3,"node"],["slot","inspector.body.panel.tree",3,"node"],["slot","inspector.body.panel.key-values",3,"node"],["slot","inspector.body.panel.link-list",3,"node"],["slot","inspector.body.panel.markdown",3,"node"]],template:function(n,i){n&1&&F(0,"sm-view-contributions-host",0)(1,"sm-view-contributions-host",1)(2,"sm-view-contributions-host",2)(3,"sm-view-contributions-host",3)(4,"sm-view-contributions-host",4)(5,"sm-view-contributions-host",5),n&2&&(h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()))},dependencies:[ti],encapsulation:2,changeDetection:0})}return t})();var yP={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",sidecarPresent:"sidecar.present"},diffMarker:"!=",absentMarker:"(absent)",notSetMarker:"(not set)"};function Wce(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function Kce(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function Yce(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.bodyHashDrift()),l(),C(o)}}function Zce(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function Xce(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.bodyHashDrift()),l(),C(o)}}function Qce(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function Jce(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.frontmatterHashDrift()),l(),C(o)}}function ede(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function tde(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.frontmatterHashDrift()),l(),C(o)}}function nde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function ide(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function ode(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.notSetMarker)}}function rde(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function ade(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.notSetMarker)}}function sde(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function lde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}var CP=(()=>{class t{node=B.required();sidecarRoot=B(null);overlay=B(void 0);texts=yP;identityBlock=E(()=>{let e=this.sidecarRoot(),n={path:null,bodyHash:null,frontmatterHash:null,resolvedProvider:null,resolvedKind:null};if(!e)return n;let i=e.identity;if(typeof i!="object"||i===null)return n;let r=i,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=E(()=>this.node().bodyHash??null);frontmatterHashLive=E(()=>this.node().frontmatterHash??null);bodyHashDrift=E(()=>{let e=this.identityBlock().bodyHash,n=this.bodyHashLive();return e!==null&&n!==null&&e!==n});frontmatterHashDrift=E(()=>{let e=this.identityBlock().frontmatterHash,n=this.frontmatterHashLive();return e!==null&&n!==null&&e!==n});sidecarStatusLiteral=E(()=>{let e=this.overlay();if(!e)return null;let n=e.status??null;return n===null?null:String(n)});sidecarPresent=E(()=>this.overlay()?.present===!0);static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-inspector-debug-panel"]],inputs:{node:[1,"node"],sidecarRoot:[1,"sidecarRoot"],overlay:[1,"overlay"]},decls:46,vars:18,consts:[["data-testid","inspector-debug-panel",1,"dbg__kv"],["data-testid","dbg-for-path"],[1,"dbg__absent"],["data-testid","dbg-body-hash-stored"],[3,"dbg__diff"],["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"],["data-testid","dbg-sidecar-present"]],template:function(n,i){if(n&1&&(J(0,"dl",0)(1,"dt"),b(2),ee(),J(3,"dd",1),M(4,Wce,2,1,"code")(5,Kce,2,1,"span",2),ee(),J(6,"dt"),b(7),ee(),J(8,"dd",3),M(9,Yce,2,3,"code",4)(10,Zce,2,1,"span",2),ee(),J(11,"dt"),b(12),ee(),J(13,"dd",5),M(14,Xce,2,3,"code",4)(15,Qce,2,1,"span",2),ee(),J(16,"dt"),b(17),ee(),J(18,"dd",6),M(19,Jce,2,3,"code",4)(20,ede,2,1,"span",2),ee(),J(21,"dt"),b(22),ee(),J(23,"dd",7),M(24,tde,2,3,"code",4)(25,nde,2,1,"span",2),ee(),J(26,"dt"),b(27),ee(),J(28,"dd",8),M(29,ide,2,1,"code")(30,ode,2,1,"span",2),ee(),J(31,"dt"),b(32),ee(),J(33,"dd",9),M(34,rde,2,1,"code")(35,ade,2,1,"span",2),ee(),J(36,"dt"),b(37),ee(),J(38,"dd",10),M(39,sde,2,1,"code")(40,lde,2,1,"span",2),ee(),J(41,"dt"),b(42),ee(),J(43,"dd",11)(44,"code"),b(45),ee()()()),n&2){let r,a,s,c,u,f,g,x;l(2),C(i.texts.fields.forPath),l(2),D((r=i.identityBlock().path)?4:5,r),l(3),C(i.texts.fields.bodyHashStored),l(2),D((a=i.identityBlock().bodyHash)?9:10,a),l(3),C(i.texts.fields.bodyHashLive),l(2),D((s=i.bodyHashLive())?14:15,s),l(3),C(i.texts.fields.frontmatterHashStored),l(2),D((c=i.identityBlock().frontmatterHash)?19:20,c),l(3),C(i.texts.fields.frontmatterHashLive),l(2),D((u=i.frontmatterHashLive())?24:25,u),l(3),C(i.texts.fields.resolvedProvider),l(2),D((f=i.identityBlock().resolvedProvider)?29:30,f),l(3),C(i.texts.fields.resolvedKind),l(2),D((g=i.identityBlock().resolvedKind)?34:35,g),l(3),C(i.texts.fields.sidecarStatus),l(2),D((x=i.sidecarStatusLiteral())?39:40,x),l(3),C(i.texts.fields.sidecarPresent),l(3),C(i.sidecarPresent())}},styles:["[_nghost-%COMP%]{display:block}.dbg__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.8rem}.dbg__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-family:var(--sm-font-mono);font-weight:500}.dbg__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.dbg__kv[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;background:var(--sm-bg-hover);padding:.05rem .3rem;border-radius:var(--sm-radius-sm);word-break:break-all}.dbg__diff[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.dbg__absent[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--sm-text-muted);font-style:italic}"],changeDetection:0})}return t})();function cde(t,o){if(t&1&&(J(0,"span",3),b(1),J(2,"code"),b(3),ee()()),t&2){d(2);let e=Te(0),n=d();l(),ke(" ",n.texts.fields.lastBumpedBy," "),l(2),C(e.lastBumpedBy)}}function dde(t,o){if(t&1&&(J(0,"dt"),b(1),ee(),J(2,"dd")(3,"span",2),b(4),ee(),M(5,cde,4,2,"span",3),ee()),t&2){d();let e=Te(0),n=d();l(),C(n.texts.fields.lastBumpedAt),l(2),et("title",e.lastBumpedAt),l(),C(n.lastBumpedRel()),l(),D(e.lastBumpedBy!==null?5:-1)}}function ude(t,o){if(t&1&&(J(0,"span",3),b(1),J(2,"code"),b(3),ee()()),t&2){d(2);let e=Te(0),n=d();l(),ke(" ",n.texts.fields.createdBy," "),l(2),C(e.createdBy)}}function pde(t,o){if(t&1&&(J(0,"dt"),b(1),ee(),J(2,"dd")(3,"span",2),b(4),ee(),M(5,ude,4,2,"span",3),ee()),t&2){d();let e=Te(0),n=d();l(),C(n.texts.fields.createdAt),l(2),et("title",e.createdAt),l(),C(n.createdRel()),l(),D(e.createdBy!==null?5:-1)}}function hde(t,o){if(t&1&&(Yt(0),J(1,"dl",0),M(2,dde,6,4),M(3,pde,6,4),ee()),t&2){let e=It(d().audit());l(2),D(e.lastBumpedAt!==null?2:-1),l(),D(e.createdAt!==null?3:-1)}}function fde(t,o){if(t&1&&(J(0,"p",1),b(1),ee()),t&2){let e=d();l(),C(e.texts.headerEmpty)}}var xP=(()=>{class t{sidecarRoot=B(null);texts=Si.audit;audit=E(()=>{let e=this.sidecarRoot(),n={lastBumpedAt:null,lastBumpedBy:null,createdAt:null,createdBy:null};if(!e)return n;let i=e.audit;if(typeof i!="object"||i===null)return n;let r=i;return{lastBumpedAt:gf(r.lastBumpedAt),lastBumpedBy:gf(r.lastBumpedBy),createdAt:gf(r.createdAt),createdBy:gf(r.createdBy)}});hasContent=E(()=>{let e=this.audit();return e.lastBumpedAt!==null||e.lastBumpedBy!==null||e.createdAt!==null||e.createdBy!==null});lastBumpedRel=E(()=>{let e=this.audit().lastBumpedAt;return e===null?null:Af(e)});createdRel=E(()=>{let e=this.audit().createdAt;return e===null?null:Af(e)});static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-inspector-audit-panel"]],inputs:{sidecarRoot:[1,"sidecarRoot"]},decls:2,vars:1,consts:[["data-testid","inspector-audit-panel",1,"audit__kv"],["data-testid","inspector-audit-panel-empty",1,"audit__empty"],[3,"title"],[1,"audit__by"]],template:function(n,i){n&1&&M(0,hde,4,3,"dl",0)(1,fde,2,1,"p",1),n&2&&D(i.hasContent()?0:1)},styles:["[_nghost-%COMP%]{display:block}.audit__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.85rem}.audit__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-weight:500}.audit__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.audit__by[_ngcontent-%COMP%]{color:var(--sm-text-muted)}.audit__by[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem}.audit__empty[_ngcontent-%COMP%]{margin:0;font-style:italic;color:var(--sm-text-muted);font-size:.85rem}"],changeDetection:0})}return t})();function gf(t){return typeof t=="string"&&t.length>0?t:null}function mde(t,o){if(t&1&&(m(0,"span",7),F(1,"i",19),b(2),_()),t&2){let e=d();h("pTooltip",e.texts.header.invalidFrontmatterTooltip),l(2),ke(" ",e.texts.header.invalidFrontmatter," ")}}function _de(t,o){t&1&&(m(0,"span",8),b(1),_()),t&2&&(l(),C(o))}function gde(t,o){if(t&1&&(m(0,"span",9)(1,"span",20),b(2,"\u25CF"),_(),b(3),_()),t&2){let e=o,n=d();h("pTooltip",e==="experimental"?n.cardTexts.stability.experimental:e==="deprecated"?n.cardTexts.stability.deprecated:""),O("data-stability",e),l(3),ke(" ",e," ")}}function bde(t,o){if(t&1&&(m(0,"span",14),F(1,"i",21),_()),t&2){let e=d();h("pTooltip",e.headerStaleTooltip())}}function vde(t,o){if(t&1&&(m(0,"div",17)(1,"span",22),b(2),_(),F(3,"p-button",23)(4,"p-button",24)(5,"p-button",25),_()),t&2){let e=d();l(2),C(e.texts.actionMocks.label),l(),h("label",e.texts.actionMocks.summary)("outlined",!0),l(),h("label",e.texts.actionMocks.audit)("outlined",!0),l(),h("label",e.texts.actionMocks.validate)("outlined",!0)}}function yde(t,o){if(t&1&&(m(0,"span",26),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Cde(t,o){if(t&1&&(m(0,"div",18),se(1,yde,2,1,"span",26,$e),_()),t&2){let e=d();l(),le(e.headerTools())}}var xde=new Set(["red","orange","yellow","green","cyan","blue","purple","pink"]),wP=(()=>{class t{node=B.required();showActionMocks=B(!1);frontmatterInvalid=B(!1);favoriteToggle=tt();texts=Si;cardTexts=Hn;headerName=E(()=>{let e=this.node(),n=e.frontmatter.name;return typeof n=="string"&&n.trim().length>0?n:e.path.split("/").pop()??e.path});headerVersion=E(()=>is(this.node()));headerStability=E(()=>mo(this.node()));headerTitleColor=E(()=>{let e=this.node(),i=e.frontmatter.color;return typeof i=="string"&&xde.has(i)?i:`var(--sm-kind-${e.kind})`});headerTools=E(()=>tb(this.node()));headerIsStale=E(()=>os(this.node()));headerStaleTooltip=E(()=>as(this.node(),Hn.sidecar));onFavoriteClick(e){e.stopPropagation(),this.favoriteToggle.emit(this.node().path)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-inspector-header"]],inputs:{node:[1,"node"],showActionMocks:[1,"showActionMocks"],frontmatterInvalid:[1,"frontmatterInvalid"]},outputs:{favoriteToggle:"favoriteToggle"},decls:22,vars:22,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",3,"pTooltip"],["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"],["data-testid","inspector-stale-badge",1,"inspector__stale-icon",3,"pTooltip"],["slot","inspector.header.badge.counter",3,"node"],["slot","inspector.header.badge.tag",3,"node"],["data-testid","inspector-plugin-actions",1,"inspector__plugin-actions"],["data-testid","inspector-header-tools",1,"inspector__tools"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["aria-hidden","true",1,"inspector__stability-dot"],["aria-hidden","true",1,"pi","pi-clock"],[1,"inspector__plugin-actions-label"],["icon","pi pi-sparkles","severity","secondary","size","small","data-testid","inspector-plugin-btn-summary",3,"label","outlined"],["icon","pi pi-search","severity","secondary","size","small","data-testid","inspector-plugin-btn-audit",3,"label","outlined"],["icon","pi pi-check-circle","severity","secondary","size","small","data-testid","inspector-plugin-btn-validate",3,"label","outlined"],[1,"inspector__tool-tag"]],template:function(n,i){if(n&1&&(m(0,"header",0)(1,"span",1),b(2),_(),m(3,"div",2),F(4,"sm-kind-icon",3),_(),m(5,"div",4)(6,"div",5)(7,"h2",6),b(8),_(),M(9,mde,3,2,"span",7),M(10,_de,2,1,"span",8),M(11,gde,4,3,"span",9),_(),m(12,"code",10),b(13),_()(),m(14,"div",11)(15,"button",12),A("click",function(a){return i.onFavoriteClick(a)}),F(16,"i",13),_(),M(17,bde,2,1,"span",14),F(18,"sm-view-contributions-host",15)(19,"sm-view-contributions-host",16),_(),M(20,vde,6,7,"div",17),M(21,Cde,3,0,"div",18),_()),n&2){let r,a,s=i.node();l(2),C(s.kind),l(2),h("kind",s.kind)("provider",s.provider)("size",18),l(4),C(i.headerName()),l(),D(i.frontmatterInvalid()?9:-1),l(),D((r=i.headerVersion())?10:-1,r),l(),D((a=i.headerStability())?11:-1,a),l(2),C(s.path),l(2),ce("inspector__favorite--on",s.isFavorite===!0),h("pTooltip",s.isFavorite===!0?i.cardTexts.favoriteRemoveTooltip:i.cardTexts.favoriteAddTooltip),O("aria-label",s.isFavorite===!0?i.cardTexts.ariaFavoriteRemove:i.cardTexts.ariaFavoriteAdd),l(),ce("pi-star-fill",s.isFavorite===!0)("pi-star",s.isFavorite!==!0),l(),D(i.headerIsStale()?17:-1),l(),h("node",s),l(),h("node",s),l(),D(i.showActionMocks()?20:-1),l(),D(i.headerTools().length>0?21:-1)}},dependencies:[zt,Ot,Ve,Be,or,ti],styles:["[_nghost-%COMP%]{display:block}.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;cursor:help;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__stale-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;color:var(--sm-severity-warn);cursor:help}.inspector__stale-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.78rem;width:1em;height:1em;line-height:1}.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__plugin-actions[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin-top:.55rem;padding-top:.5rem;border-top:1px solid var(--sm-border)}.inspector__plugin-actions-label[_ngcontent-%COMP%]{font-size:.6rem;text-transform:uppercase;letter-spacing:.05em;font-weight:600;color:var(--p-text-muted-color);margin-right:.15rem}.inspector__tools[_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__tool-tag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:.1rem .5rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color);font-family:var(--sm-font-mono);font-size:.7rem;font-weight:500;line-height:1.35;flex:none}"],changeDetection:0})}return t})();var wde=[[["","smSectionTitleExtra",""]],"*"],Tde=["[smSectionTitleExtra]","*"],TP=(()=>{class t{title=B.required();expanded=B.required();toggleTestid=B();toggleAriaLabel=B();toggleTooltip=B();toggle=tt();static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({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:Tde,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,i){n&1&&(Dt(wde),m(0,"button",0),A("click",function(){return i.toggle.emit()}),m(1,"span",1),b(2),Le(3),_(),F(4,"i",2),_(),Le(5,1)),n&2&&(h("pTooltip",i.toggleTooltip()??""),O("aria-expanded",i.expanded())("aria-label",i.toggleAriaLabel()??null)("data-testid",i.toggleTestid()??null),l(2),ke(" ",i.title()," "),l(2),ce("pi-chevron-right",!i.expanded())("pi-chevron-down",i.expanded()))},dependencies:[Ve,Be],encapsulation:2,changeDetection:0})}return t})();function y0(t){gn(y0);let{path:o,dataSource:e,markdown:n}=t,i=te("idle"),r=te(null),a=0,s=async(c,u)=>{try{let f=await e.getNode(c,{includeBody:!0});if(u!==a)return;if(f===null){i.set("unavailable");return}let g=f.item.body;if(g===null){i.set("unavailable");return}if(g===void 0||g.trim().length===0){i.set("empty");return}let x=await n.render(g);if(u!==a)return;r.set(x),i.set("ready")}catch{if(u!==a)return;i.set("error")}};return _e(()=>{let c=o(),u=++a;if(r.set(null),!c){i.set("idle");return}i.set("loading"),s(c,u)}),{bodyState:i.asReadonly(),bodyHtml:r.asReadonly()}}function C0(t){gn(C0);let{node:o,sidecarService:e,confirmation:n}=t,i=Si,r=E(()=>{let S=o();if(!S)return!1;let N=S.sidecar;return!N||N.present===!1||N.status==="fresh"?!1:eb(N)}),a=te(!1),s=te(null),c=E(()=>{let N=o()?.sidecar;return!N||N.present===!1?i.bump.tooltipDisabledNoSidecar:r()?i.bump.tooltipEnabled:i.bump.tooltipDisabledFresh}),u=S=>{if(S instanceof Vf)switch(S.code){case"sidecar-fresh":return`${i.bump.errorPrefix} ${i.bump.errorFresh}`;case"not-found":return`${i.bump.errorPrefix} ${i.bump.errorNotFound}`;default:return`${i.bump.errorPrefix} ${S.message||i.bump.errorGeneric}`}let N=S instanceof Error?S.message:String(S);return`${i.bump.errorPrefix} ${N||i.bump.errorGeneric}`},f=async S=>{if(!a()){a.set(!0),s.set(null);try{await e.bump(S,{confirm:!0})}catch(N){s.set(u(N))}finally{a.set(!1)}}},g=S=>{n.confirm({header:i.bump.consentHeader,message:i.bump.consentMessage,acceptLabel:i.bump.consentAccept,rejectLabel:i.bump.consentReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{f(S)}})},x=async()=>{let S=o();if(S&&r()&&!a()){a.set(!0),s.set(null);try{await e.bump(S.path)}catch(N){if(N instanceof Vf&&N.code==="confirm-required"&&Sde(N.details)){g(S.path);return}s.set(u(N))}finally{a.set(!1)}}},I=()=>{s.set(null)};return{canBump:r,bumpInFlight:a.asReadonly(),bumpError:s.asReadonly(),bumpTooltip:c,onBumpClick:x,dismissBumpError:I}}function Sde(t){return typeof t!="object"||t===null?!1:t.key==="allowEditSmFiles"}function x0(t){gn(x0);let{path:o,pathSet:e,dataSource:n}=t,i=te(new Set),r=te(new Set),a=te(new Set);return _e(()=>{o(),i.set(new Set),r.set(new Set),a.set(new Set)}),{linkStatus:f=>e().has(f)||i().has(f)?"live":r().has(f)?"dead-confirmed":"dead-heuristic",isVerifying:f=>a().has(f),verifyDeadLink:async f=>{if(!(i().has(f)||r().has(f))&&!a().has(f)){a.update(g=>new Set(g).add(f));try{await n.getNode(f)===null?r.update(x=>new Set(x).add(f)):i.update(x=>new Set(x).add(f))}catch{}finally{a.update(g=>{let x=new Set(g);return x.delete(f),x})}}}}}var SP="skill-map.ui.inspector.sections";function w0(){gn(w0);let t=te(kde());return _e(()=>{Ide(t())}),{expanded:o=>t()[o]??!0,toggle:o=>t.update(e=>Wt(be({},e),{[o]:!(e[o]??!0)}))}}function kde(){try{let t=localStorage.getItem(SP);if(!t)return{};let o=JSON.parse(t);if(o===null||typeof o!="object"||Array.isArray(o))return{};let e={};for(let[n,i]of Object.entries(o))typeof i=="boolean"&&(e[n]=i);return e}catch{return{}}}function Ide(t){try{localStorage.setItem(SP,JSON.stringify(t))}catch{}}var Ede=new Set(["inspector.body.panel.breakdown","inspector.body.panel.records","inspector.body.panel.tree","inspector.body.panel.key-values","inspector.body.panel.link-list","inspector.body.panel.markdown"]),Mde=new Set(["identity","annotations","settings","audit"]),Dde=new Set(["agent","skill","command"]);function kP(t){let{node:o}=t,e=E(()=>{let a=o()?.sidecar;if(!a||!a.present)return null;if(a.root)return a.root;let s={};return a.annotations&&(s.annotations=a.annotations),s}),n=E(()=>{let a=o()?.kind;return a!==void 0&&Dde.has(a)}),i=E(()=>{let a=e();if(!a)return!1;for(let s of Object.keys(a))if(!Mde.has(s))return!0;return!1}),r=E(()=>{let a=o()?.contributions??[];for(let s of a)if(Ede.has(s.slot))return!0;return!1});return{sidecarRoot:e,hasVendorFrontmatter:n,hasPluginContributions:i,hasViewContributions:r}}function Rde(t,o){if(t&1&&(m(0,"section",0)(1,"div",2),F(2,"span",3),m(3,"p",4),b(4),_(),m(5,"p",5),b(6),_()()()),t&2){let e=d();l(4),C(e.texts.emptyNoSelection.title),l(2),C(e.texts.emptyNoSelection.desc)}}function Ode(t,o){if(t&1&&(m(0,"section",0)(1,"div",6),F(2,"span",7),m(3,"p",4),b(4),_(),m(5,"p",5)(6,"code"),b(7),_(),m(8,"span"),b(9),_()()()()),t&2){let e=d();l(4),C(e.texts.emptyNotFound.title),l(3),C(e.path()),l(2),C(e.texts.emptyNotFound.descSuffix)}}function Fde(t,o){if(t&1&&F(0,"p",9),t&2){let e=d(2);h("innerHTML",e.descriptionHtml(),Ei)}}function Nde(t,o){if(t&1&&(m(0,"div",10),F(1,"i",27),m(2,"span"),b(3),_()()),t&2){let e=d(2);l(3),C(e.texts.supersededByBanner(o))}}function Ade(t,o){if(t&1){let e=W();m(0,"div",11),F(1,"i",28),m(2,"span"),b(3),_(),m(4,"button",29),A("click",function(){w(e);let i=d(2);return T(i.dismissBumpError())}),F(5,"i",30),_()()}if(t&2){let e=d(2);l(3),C(o),l(),O("aria-label",e.texts.bumpErrorDismissAriaLabel)}}function Lde(t,o){if(t&1&&(m(0,"p",39)(1,"strong"),b(2),_(),b(3),_()),t&2){let e=d(5);l(2),C(e.texts.findingHintLabel),l(),ke(" ",o," ")}}function Bde(t,o){if(t&1&&(m(0,"li",34)(1,"div",35)(2,"span",36),b(3),_(),m(4,"code",37),b(5),_()(),m(6,"p",38),b(7),_(),M(8,Lde,4,2,"p",39),_()),t&2){let e,n=o.$implicit;O("data-severity",n.severity),l(2),O("data-severity",n.severity),l(),C(n.severity),l(2),C(n.analyzerId),l(2),C(n.message),l(),D((e=n.fix==null?null:n.fix.summary)?8:-1,e)}}function Vde(t,o){if(t&1&&(m(0,"ul",33),se(1,Bde,9,6,"li",34,Sf),_()),t&2){let e=d(3);l(),le(e.issues())}}function zde(t,o){if(t&1){let e=W();m(0,"sm-collapsible-section",31),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("findings"))}),m(1,"span",32),b(2),_(),M(3,Vde,3,0,"ul",33),_()}if(t&2){let e=d(2);h("title",e.texts.sections.findings)("expanded",e.expanded("findings")),l(2),ke("(",e.issues().length,")"),l(),D(e.expanded("findings")?3:-1)}}function Hde(t,o){if(t&1){let e=W();m(0,"div",15)(1,"sm-vendor-frontmatter",40),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("definition"))}),_()()}if(t&2){d();let e=Te(0),n=Te(1),i=d();l(),h("frontmatter",n)("kind",e.kind)("provider",e.provider)("skillPathByName",i.skillPathByName())("onSkillClick",i.onSkillChip)("expanded",i.expanded("definition"))}}function qde(t,o){t&1&&(m(0,"code",42),b(1),_()),t&2&&(l(),ke("(",o,")"))}function Gde(t,o){if(t&1){let e=W();m(0,"sm-annotations-panel",44),A("openPath",function(i){w(e);let r=d(3);return T(r.openPath(i))})("tagClick",function(i){w(e);let r=d(3);return T(r.tagSelect.emit(i))}),_()}if(t&2){d(2);let e=Te(0),n=d();h("overlay",e.sidecar)("knownPaths",n.pathSet())("activeTag",n.activeTag())}}function jde(t,o){if(t&1){let e=W();m(0,"sm-collapsible-section",41),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("annotations"))}),M(1,qde,2,1,"code",42),M(2,Gde,1,3,"sm-annotations-panel",43),_()}if(t&2){let e,n=d(2);h("title",n.texts.sections.annotations)("expanded",n.expanded("annotations")),l(),D((e=n.sidecarFileName())?1:-1,e),l(),D(n.expanded("annotations")?2:-1)}}function Ude(t,o){if(t&1){let e=W();m(0,"sm-linked-nodes-panel",45),A("openPath",function(i){w(e);let r=d(2);return T(r.openPath(i))}),_()}if(t&2){d();let e=Te(0);h("path",e.path)}}function $de(t,o){if(t&1&&(m(0,"p",46),b(1),_()),t&2){let e=d(3);l(),C(e.texts.body.loading)}}function Wde(t,o){if(t&1&&(m(0,"p",47),b(1),_()),t&2){let e=d(3);l(),C(e.texts.body.empty)}}function Kde(t,o){if(t&1&&(m(0,"p",48),b(1),_()),t&2){let e=d(3);l(),C(e.texts.body.unavailable)}}function Yde(t,o){if(t&1&&(m(0,"p",49),b(1),_()),t&2){let e=d(3);l(),C(e.texts.body.renderError)}}function Zde(t,o){if(t&1&&F(0,"div",50),t&2){let e=d(3);h("innerHTML",e.bodyHtml(),Ei)}}function Xde(t,o){if(t&1&&M(0,$de,2,1,"p",46)(1,Wde,2,1,"p",47)(2,Kde,2,1,"p",48)(3,Yde,2,1,"p",49)(4,Zde,1,1,"div",50),t&2){let e,n=d(2);D((e=n.bodyState())==="loading"?0:e==="empty"?1:e==="unavailable"?2:e==="error"?3:e==="ready"?4:-1)}}function Qde(t,o){if(t&1&&F(0,"sm-plugin-contributions",25),t&2){let e=d(3);h("sidecarRoot",e.sidecarRoot())}}function Jde(t,o){if(t&1){let e=W();m(0,"sm-collapsible-section",51),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("plugins"))}),M(1,Qde,1,1,"sm-plugin-contributions",25),_()}if(t&2){let e=d(2);h("title",e.texts.sections.plugins)("expanded",e.expanded("plugins")),l(),D(e.expanded("plugins")?1:-1)}}function eue(t,o){if(t&1&&F(0,"sm-inspector-slots-panel",53),t&2){let e=d(3);h("node",e.node())}}function tue(t,o){if(t&1){let e=W();m(0,"sm-collapsible-section",52),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("viewContributions"))}),M(1,eue,1,1,"sm-inspector-slots-panel",53),_()}if(t&2){let e=d(2);h("title",e.texts.sections.viewContributions)("expanded",e.expanded("viewContributions")),l(),D(e.expanded("viewContributions")?1:-1)}}function nue(t,o){if(t&1&&(m(0,"div",23),F(1,"sm-inspector-debug-panel",54),_()),t&2){d();let e=Te(0),n=d();l(),h("node",e)("sidecarRoot",n.sidecarRoot())("overlay",e.sidecar)}}function iue(t,o){if(t&1&&F(0,"sm-inspector-audit-panel",25),t&2){let e=d(2);h("sidecarRoot",e.sidecarRoot())}}function oue(t,o){if(t&1){let e=W();Yt(0)(1),m(2,"section",0)(3,"sm-inspector-header",8),A("favoriteToggle",function(i){w(e);let r=d();return T(r.onHeaderFavoriteToggle(i))}),_(),M(4,Fde,1,1,"p",9),M(5,Nde,4,1,"div",10),M(6,Ade,6,2,"div",11),m(7,"div",12)(8,"p-button",13),A("onClick",function(){w(e);let i=d();return T(i.onBumpClick())}),_()(),M(9,zde,4,4,"sm-collapsible-section",14),M(10,Hde,2,6,"div",15),M(11,jde,3,4,"sm-collapsible-section",16),m(12,"sm-collapsible-section",17),A("toggle",function(){w(e);let i=d();return T(i.toggleSection("connections"))}),M(13,Ude,1,1,"sm-linked-nodes-panel",18),_(),m(14,"sm-collapsible-section",19),A("toggle",function(){w(e);let i=d();return T(i.toggleSection("body"))}),M(15,Xde,5,1),_(),M(16,Jde,2,3,"sm-collapsible-section",20),M(17,tue,2,3,"sm-collapsible-section",21),m(18,"sm-collapsible-section",22),A("toggle",function(){w(e);let i=d();return T(i.toggleSection("debug"))}),M(19,nue,2,3,"div",23),_(),m(20,"sm-collapsible-section",24),A("toggle",function(){w(e);let i=d();return T(i.toggleSection("audit"))}),M(21,iue,1,1,"sm-inspector-audit-panel",25),_(),F(22,"p-confirmdialog",26),_()}if(t&2){let e,n,i=d(),r=It(i.node());l();let a=It(r.frontmatter);l(),He("--accent","var(--sm-kind-"+r.kind+", var(--sm-kind-markdown))"),l(),h("node",r)("showActionMocks",i.showActionMocks)("frontmatterInvalid",i.frontmatterInvalid()),l(),D(a.description?4:-1),l(),D((e=i.headerSupersededBy())?5:-1,e),l(),D((n=i.bumpError())?6:-1,n),l(2),h("label",i.texts.bump.label)("disabled",!i.canBump()||i.bumpInFlight())("loading",i.bumpInFlight())("pTooltip",i.bumpTooltip()),l(),D(i.issues().length>0?9:-1),l(),D(i.hasVendorFrontmatter()?10:-1),l(),D(r.sidecar!=null&&r.sidecar.present?11:-1),l(),h("title",i.texts.sections.connections)("expanded",i.expanded("connections")),l(),D(i.expanded("connections")?13:-1),l(),h("title",i.texts.sections.body)("expanded",i.expanded("body")),l(),D(i.expanded("body")?15:-1),l(),D(i.hasPluginContributions()?16:-1),l(),D(i.hasViewContributions()?17:-1),l(),h("title",i.texts.sections.debug)("expanded",i.expanded("debug"))("toggleAriaLabel",i.texts.debugToggleAriaLabel)("toggleTooltip",i.texts.debugToggleTooltip),l(),D(i.expanded("debug")?19:-1),l(),h("title",i.texts.sections.audit)("expanded",i.expanded("audit")),l(),D(i.expanded("audit")?21:-1),l(),h("ariaLabel",i.texts.bump.consentDialogAriaLabel)}}var IP=(()=>{class t{loader=p(Ht);nodeOpenIntent=p(_o);dataSource=p(ei);markdown=p(yo);sidecarService=p(ZD);confirmation=p(uo);texts=Si;cardTexts=Hn;showActionMocks=ir.inspector.actionMocks;path=B(void 0);activeTag=B(null);tagSelect=tt();node=E(()=>{let e=this.path();return e?this.loader.nodes().find(n=>n.path===e)??null:null});pathSet=E(()=>{let e=new Set;for(let n of this.loader.nodes())e.add(n.path);return e});skillPathByName=E(()=>{let e=new Map;for(let n of this.loader.nodes()){if(n.kind!=="skill")continue;let i=n.frontmatter?.name;typeof i=="string"&&i.length>0&&e.set(i,n.path)}return e});headerSupersededBy=E(()=>nb(this.node()));sidecarFileName=E(()=>{let e=this.node()?.path;return e?(e.split("/").pop()??e).replace(/\.md$/,".sm"):null});bodyHandle=y0({path:this.path,dataSource:this.dataSource,markdown:this.markdown});bodyState=this.bodyHandle.bodyState;bodyHtml=this.bodyHandle.bodyHtml;descriptionHtml=Ba(()=>this.node()?.frontmatter.description??"",this.markdown);deadLink=x0({path:this.path,pathSet:this.pathSet,dataSource:this.dataSource});sectionCollapse=w0();expanded(e){return this.sectionCollapse.expanded(e)}toggleSection(e){this.sectionCollapse.toggle(e)}derivations=kP({node:this.node});sidecarRoot=this.derivations.sidecarRoot;hasVendorFrontmatter=this.derivations.hasVendorFrontmatter;hasPluginContributions=this.derivations.hasPluginContributions;hasViewContributions=this.derivations.hasViewContributions;issues=te([]);issuesLoaderEffect=_e(e=>{let n=this.node();if(this.issues.set([]),!n)return;let i=n.path,r=!1;e(()=>{r=!0}),this.dataSource.listIssues({node:i}).then(a=>{r||this.issues.set(a.items)}).catch(()=>{r||this.issues.set([])})});frontmatterInvalid=E(()=>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)}bumpHandle=C0({node:this.node,sidecarService:this.sidecarService,confirmation:this.confirmation});canBump=this.bumpHandle.canBump;bumpInFlight=this.bumpHandle.bumpInFlight;bumpError=this.bumpHandle.bumpError;bumpTooltip=this.bumpHandle.bumpTooltip;onBumpClick(){return this.bumpHandle.onBumpClick()}dismissBumpError(){this.bumpHandle.dismissBumpError()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-inspector-view"]],inputs:{path:[1,"path"],activeTag:[1,"activeTag"]},outputs:{tagSelect:"tagSelect"},features:[ve([uo])],decls:3,vars:1,consts:[["data-testid","inspector-view",1,"inspector"],["data-testid","inspector-view",1,"inspector",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"],[3,"favoriteToggle","node","showActionMocks","frontmatterInvalid"],["data-testid","inspector-description",1,"inspector__desc",3,"innerHTML"],["data-testid","inspector-superseded-banner",1,"inspector__banner","inspector__banner--warn"],["data-testid","inspector-bump-error",1,"inspector__banner","inspector__banner--error"],[1,"inspector__toolbar"],["icon","pi pi-arrow-up-right","severity","secondary","size","small","data-testid","inspector-bump",3,"onClick","label","disabled","loading","pTooltip"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",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-connections-toggle","data-testid","inspector-card-linked-nodes",3,"toggle","title","expanded"],[3,"path"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"toggle","title","expanded"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"title","expanded"],["toggleTestid","inspector-view-contributions-toggle","data-testid","inspector-card-view-contributions",3,"title","expanded"],["toggleTestid","inspector-debug-toggle","data-testid","inspector-card-debug",3,"toggle","title","expanded","toggleAriaLabel","toggleTooltip"],["data-testid","inspector-debug-section",1,"inspector__debug"],["toggleTestid","inspector-audit-toggle","data-testid","inspector-card-audit",3,"toggle","title","expanded"],[3,"sidecarRoot"],["data-testid","inspector-bump-consent","styleClass","sm-consent-dialog",3,"ariaLabel"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],["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"],[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","knownPaths","activeTag"],[3,"openPath","tagClick","overlay","knownPaths","activeTag"],[3,"openPath","path"],["data-testid","inspector-body-loading",1,"inspector__body-status"],["data-testid","inspector-body-empty",1,"inspector__body-status"],["data-testid","inspector-body-unavailable",1,"inspector__body-status","inspector__body-status--warn"],["data-testid","inspector-body-error",1,"inspector__body-status","inspector__body-status--warn"],["data-testid","inspector-body-rendered",1,"inspector__body-rendered",3,"innerHTML"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"toggle","title","expanded"],["toggleTestid","inspector-view-contributions-toggle","data-testid","inspector-card-view-contributions",3,"toggle","title","expanded"],[3,"node"],[3,"node","sidecarRoot","overlay"]],template:function(n,i){n&1&&M(0,Rde,7,2,"section",0)(1,Ode,10,3,"section",0)(2,oue,23,34,"section",1),n&2&&D(i.path()?i.node()?2:1:0)},dependencies:[zt,Ot,Ve,Be,hs,ps,dP,tP,hP,bP,vP,CP,xP,wP,TP],styles:["[_nghost-%COMP%]{display:block}.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--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+:not(.inspector__debug){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)}.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}.inspector__body-rendered[_ngcontent-%COMP%]{font-size:.9rem;line-height:1.6;max-height:480px;overflow:auto;padding:.25rem 0 0}.inspector__body-rendered[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.inspector__body-rendered[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:0}.inspector__body-rendered[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--p-content-background);border:1px solid var(--p-content-border-color);border-radius:var(--sm-radius-md);padding:.75rem;margin:.75rem 0;white-space:pre-wrap;word-wrap:break-word;font-family:var(--sm-font-mono);font-size:.85rem;line-height:1.5;overflow-x:auto}.inspector__body-rendered[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.1rem .3rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}.inspector__body-rendered[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:transparent;padding:0;border-radius:0}.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__debug[_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)}.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 EP=(()=>{class t{smMiddleMousePan=B.required();origin=null;rafId=null;pendingPosition=null;onMouseDown(e){if(e.button!==1)return;let n=this.smMiddleMousePan();if(!n)return;e.preventDefault();let i=n.getPosition()??{x:0,y:0};this.origin={mouseX:e.clientX,mouseY:e.clientY,canvasX:i.x,canvasY:i.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=Ue({type:t,selectors:[["","smMiddleMousePan",""]],hostBindings:function(n,i){n&1&&A("mousedown",function(a){return i.onMouseDown(a)})},inputs:{smMiddleMousePan:[1,"smMiddleMousePan"]}})}return t})();function MP(t,o){if(t.size===0)return{next:t,dirty:!1};let e=!1,n=new Set;for(let i of t)o.has(i)?n.add(i):e=!0;return{next:e?n:t,dirty:e}}function DP(t){let{nodes:o,current:e,layout:n}=t,i=new Set(o.map(c=>c.path)),r=!1,a=new Map(e);for(let c of a.keys())i.has(c)||(a.delete(c),r=!0);let s=!1;for(let c of i)if(!a.has(c)){s=!0;break}for(let c of i){let u=n.positions.get(c);if(!u)continue;let f=a.get(c);if(!f){a.set(c,{x:u.x,y:u.y}),r=!0;continue}f.manual!==!0&&s&&(f.x===u.x&&f.y===u.y||(a.set(c,{x:u.x,y:u.y}),r=!0))}return{next:a,dirty:r}}function PP(t){let{selectedPath:o,setSelectedNodeId:e,readSelectedNodeId:n,graphNodes:i,onDeepLinkSelect:r,router:a,route:s}=t,c=mb(s.queryParamMap.pipe(k0(u=>u.get("path"))),{initialValue:s.snapshot.queryParamMap.get("path")});_e(()=>{let u=c(),f=i();if(f.length===0||!u)return;let g=an(()=>n());if(g!==null&&f.find(S=>S.id===g)?.view.path===u)return;let x=f.find(I=>I.view.path===u);x&&(e(x.id),r?.(x.id))}),_e(()=>{let u=o(),f=an(()=>c());(u??null)!==(f??null)&&a.navigate([],{relativeTo:s,queryParams:{path:u??null},queryParamsHandling:"merge",replaceUrl:!0})})}function RP(t,o){return rs(t).includes(o)}function OP(t){if(typeof t!="object"||t===null)return!1;let o=t;return typeof o.x=="number"&&typeof o.y=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y)}function FP(t){if(typeof t!="object"||t===null)return!1;let o=t;return typeof o.x=="number"&&typeof o.y=="number"&&typeof o.scale=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y)&&Number.isFinite(o.scale)&&o.scale>0}function NP(t){return t.querySelector(".p-overlay-mask, .p-dialog, .p-overlay")!==null}var AP="sm.graph.viewport",LP="sm.graph.node-positions",BP="sm.graph.node-expanded",VP="sm.graph.panel-width";function zP(){let t=null;try{t=localStorage.getItem(AP)}catch{return null}if(!t)return null;let o;try{o=JSON.parse(t)}catch{return null}return FP(o)?o:null}function HP(t){try{localStorage.setItem(AP,JSON.stringify(t))}catch{}}function qP(){let t=new Map,o=null;try{o=localStorage.getItem(LP)}catch{return t}if(!o)return t;let e;try{e=JSON.parse(o)}catch{return t}if(typeof e!="object"||e===null)return t;for(let[n,i]of Object.entries(e)){if(!OP(i))continue;let r=i,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 za(t){try{let o={};for(let[e,n]of t)o[e]=n.manual?{x:n.x,y:n.y,manual:!0}:{x:n.x,y:n.y};localStorage.setItem(LP,JSON.stringify(o))}catch{}}function GP(){let t=null;try{t=localStorage.getItem(BP)}catch{return new Set}if(!t)return new Set;let o;try{o=JSON.parse(t)}catch{return new Set}if(!Array.isArray(o))return new Set;let e=new Set;for(let n of o)typeof n=="string"&&n.length>0&&e.add(n);return e}function bf(t){try{localStorage.setItem(BP,JSON.stringify([...t]))}catch{}}function jP(){let t=null;try{t=localStorage.getItem(VP)}catch{return null}if(!t)return null;let o=Number(t);return!Number.isFinite(o)||o<=0?null:o}function UP(t){try{localStorage.setItem(VP,String(Math.round(t)))}catch{}}var $P=400,vf=400,WP=80;function KP(t){let o=te(t.initialWidth),e=te(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&Ga(window,"resize").pipe(vo(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=E(()=>{let g=Math.max(vf,e()-WP),x=o();return x>g||x<vf?Math.min($P,g):x}),i=null,r=null,a=null,s=()=>{a=null,r!==null&&(o.set(r),r=null)},c=g=>{if(!i)return;let x=g.clientX-i.mouseX,I=i.widthAtStart-x,S=Math.max(vf,e()-WP);r=Math.min(S,Math.max(vf,I)),a===null&&typeof window<"u"&&(a=window.requestAnimationFrame(s))},u=()=>{i&&(i=null,document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),a!==null&&typeof window<"u"&&(window.cancelAnimationFrame(a),a=null),r!==null&&(o.set(r),r=null),t.onCommit(o()))};return{clampedPanelWidth:n,onPanelResizeStart:g=>{g.button===0&&(g.preventDefault(),g.stopPropagation(),i={mouseX:g.clientX,widthAtStart:n()},document.addEventListener("mousemove",c),document.addEventListener("mouseup",u))}}}function yf(t){let{points:o,wrap:e,panelW:n,zoomMin:i}=t;if(o.length===0)return null;let r=1/0,a=1/0,s=-1/0,c=-1/0;for(let Oe of o)Oe.x<r&&(r=Oe.x),Oe.y<a&&(a=Oe.y),Oe.x+260>s&&(s=Oe.x+260),Oe.y+120>c&&(c=Oe.y+120);let u=Math.max(1,e.width-n),f=Math.max(1,s-r),g=Math.max(1,c-a),x=Math.max(1,u-160),I=Math.max(1,e.height-160),S=Math.min(x/f,I/g),N=Math.min(2,Math.max(i,S)),j=(r+s)/2,Z=(a+c)/2,ne=u/2-j*N,pe=e.height/2-Z*N;return{position:{x:ne,y:pe},scale:N}}function YP(t){let{point:o,wrap:e,panelW:n,scale:i}=t,r=o.x+260/2,a=o.y+120/2,c=Math.max(1,e.width-n)/2-r*i,u=e.height/2-a*i;return{position:{x:c,y:u},scale:i}}function Ha(t,o,e){if(typeof requestAnimationFrame>"u"||e<=0){t.writePosition(o.position),t.writeScale(o.scale);return}let n=t.readPosition(),i=t.readScale(),r=performance.now(),a=s=>{if(t.isStaleToken())return;let c=Math.min(1,(s-r)/e),u=rue(c);t.writePosition({x:n.x+(o.position.x-n.x)*u,y:n.y+(o.position.y-n.y)*u}),t.writeScale(i+(o.scale-i)*u),c<1&&requestAnimationFrame(a)};requestAnimationFrame(a)}function rue(t){return 1-Math.pow(1-t,3)}var ZP=320;function XP(t){let o=te(null),e=null,n=0,i=(c,u)=>{let f=++n;Ha({readPosition:()=>t.viewportPosition(),readScale:()=>t.viewportScale(),writePosition:g=>t.viewportPosition.set(g),writeScale:g=>t.viewportScale.set(g),isStaleToken:()=>f!==n},c,u)},r=c=>{let u=t.canvasWrap();if(!u||c.length===0)return;let f=t.fullLayout(),g=[];for(let I of c){let S=f.positions.get(I);S&&g.push(S)}if(g.length===0)return;let x=yf({points:g,wrap:u,panelW:t.selectedNodeId()!==null?t.clampedPanelWidth():0,zoomMin:t.zoomMin});x&&i(x,ZP)},a=()=>{let c=e;c&&(e=null,i({position:c.position,scale:c.scale},ZP))};return{activeTagSelection:o,onTagSelect:c=>{let u=t.flow();if(!u)return;if(o()===c){u.clearSelection(),o.set(null),a();return}let f=t.nodes().filter(g=>RP(g,c)).map(g=>g.path);if(f.length===0){u.clearSelection(),o.set(null),a();return}e===null&&(e={position:be({},t.viewportPosition()),scale:t.viewportScale()}),u.select(f,[]),o.set(c),r(f)}}}var Cf=.05,T0=2;function QP(t){let o=te(t.savedViewport?{x:t.savedViewport.x,y:t.savedViewport.y}:{x:0,y:0}),e=te(t.savedViewport?.scale??1),n=E(()=>e()<T0-1e-6),i=E(()=>e()>Cf+1e-6);return{viewportPosition:o,viewportScale:e,canZoomIn:n,canZoomOut:i,onCanvasChange:a=>{let s=o();(s.x!==a.position.x||s.y!==a.position.y)&&o.set({x:a.position.x,y:a.position.y}),e()!==a.scale&&e.set(a.scale),t.hasCompletedInitialLayout()&&HP({x:a.position.x,y:a.position.y,scale:a.scale})}}}var aue=.15,sue=.25,lue=.75,cue=.6;function JP(t){let o=E(()=>{let u=new Map;for(let f of t.graph().edges)u.has(f.from)||u.set(f.from,new Set),u.has(f.to)||u.set(f.to,new Set),u.get(f.from).add(f.to),u.get(f.to).add(f.from);return u}),e=u=>t.selectedNodeId()===u,n=u=>{let f=t.selectedNodeId();return f===null||f===u?!1:o().get(f)?.has(u)??!1},i=u=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null||f===u?!1:!(o().get(f)?.has(u)??!1)},r=u=>{let f=t.selectedNodeId();return f!==null&&(u.from===f||u.to===f)},a=u=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null?!1:u.from!==f&&u.to!==f},s=E(()=>{let u=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=u!==null?o().get(u)??null:null,x=new Map;for(let I of t.graph().nodes){let S=I.id,N=u===S,j=!N&&u!==null&&(g?.has(S)??!1),Z=!f&&u!==null&&!N&&!(g?.has(S)??!1);x.set(S,{selected:N,highlighted:j,dimmed:Z})}return x}),c=E(()=>{let u=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=new Map;for(let x of t.graph().edges){let I=u!==null&&(x.from===u||x.to===u),S=!f&&u!==null&&!I,N=typeof x.confidence=="number"?x.confidence:cue,j=S?aue:sue+lue*N;g.set(x.id,{highlighted:I,dimmed:S,opacity:j})}return g});return{isSelected:e,isHighlighted:n,isDimmed:i,isEdgeHighlighted:r,isEdgeDimmed:a,selectionView:s,edgeSelectionView:c}}function e3(t){let o=t.onCommit??za,e=null,n=!1,i=null,r=()=>{queueMicrotask(()=>{if(!n){i=null;return}n=!1,i&&(t.nodePositions.set(i),i=null),o(t.nodePositions())})},a=(u,f)=>{i||(i=new Map(t.nodePositions())),i.set(u,{x:f.x,y:f.y,manual:!0}),n=!0},s=u=>{e={x:u.clientX,y:u.clientY},document.addEventListener("mouseup",r,{once:!0})},c=u=>{let f=e;if(e=null,!f)return!0;let g=u.clientX-f.x,x=u.clientY-f.y;return Math.hypot(g,x)<=4};return t.destroyRef.onDestroy(()=>{document.removeEventListener("mouseup",r)}),{onNodePositionChange:a,onNodePointerDown:s,isClickWithoutDrag:c}}function t3(t){let o=te(GP());return _e(()=>{let r=new Set(t.nodes().map(s=>s.path));if(r.size===0)return;let a=MP(o(),r);a.dirty&&(o.set(a.next),bf(a.next))}),{isExpanded:r=>o().has(r),setExpanded:(r,a)=>{let s=o();if(s.has(r)===a)return;let c=new Set(s);a?c.add(r):c.delete(r),o.set(c),bf(c)},resetAll:()=>{o.set(new Set),bf(new Set)},expandedNodeIds:o}}function n3(t){let o=te(!1),e=!1,n=null;return _e(()=>{let i=t.visibleNodes();e||i.length!==0&&queueMicrotask(()=>{e=!0,o.set(!0),t.savedViewport||t.fit()})}),_e(()=>{let i=t.pathsFingerprint();if(!e){n=i;return}n!==i&&(n=i,(t.animatedFit??t.fit)())}),{hasCompletedInitialLayout:()=>o()}}var due=["canvasWrap"],r3=(t,o)=>o.id;function uue(t,o){if(t&1&&(m(0,"div",2),F(1,"span",8),m(2,"p",9),b(3),_()()),t&2){let e=d();l(3),C(e.texts.loading)}}function pue(t,o){if(t&1&&(m(0,"div",3),F(1,"span",10),m(2,"p",9),b(3),_(),m(4,"p",11),b(5),_()()),t&2){let e=d();l(3),C(e.texts.errorTitle),l(2),C(e.error())}}function hue(t,o){if(t&1){let e=W();m(0,"div",4),F(1,"i",12),m(2,"p",13),b(3),_(),m(4,"p-button",14),A("onClick",function(){w(e);let i=d();return T(i.resetFilters())}),_()()}if(t&2){let e=d();l(3),C(e.texts.emptyTitle),l(),h("label",e.texts.resetFilters)("text",!0)}}function fue(t,o){if(t&1){let e=W();m(0,"div",5),F(1,"i",15),m(2,"p",9),b(3),_(),m(4,"p-button",16),A("onClick",function(){w(e);let i=d();return T(i.mapVisibility.clear())}),_()()}if(t&2){let e=d();l(3),C(e.texts.curationEmptyTitle),l(),h("label",e.texts.showAllOnMap)("text",!0)}}function mue(t,o){if(t&1&&(m(0,"f-connection",36),$(),m(1,"svg",37),F(2,"circle",38),_(),ja(),F(3,"f-connection-marker-arrow",39),_()),t&2){let e=o.$implicit,n=d(2),i=n.edgeSelectionFor(e.id);z("f-conn--"+e.kind),He("opacity",i.opacity),ce("f-conn--highlighted",i.highlighted)("f-conn--dimmed",i.dimmed),h("fOutputId",e.from+"-out")("fInputId",e.to+"-in")("fOutputSide",n.outputSide())("fInputSide",n.inputSide())("fType",n.connectionType())("fBehavior",n.connectionBehavior)("fReassignDisabled",!0),l(),h("type",n.markerStart)("width",9)("height",9)("refX",4.5)("refY",4.5),l(2),h("type",n.markerEnd)}}function _ue(t,o){if(t&1){let e=W();de(0,23),m(1,"div",41),A("fNodePositionChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,i))})("pointerdown",function(i){w(e);let r=d(3);return T(r.onNodePointerDown(i))})("click",function(i){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,i))})("dblclick",function(){let i=w(e).$implicit,r=d(3);return T(r.openNode(i))}),m(2,"sm-node-card",42),A("expandedChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,i))})("favoriteToggle",function(i){w(e);let r=d(3);return T(r.onFavoriteToggle(i))}),_(),m(3,"div",43),F(4,"sm-view-contributions-host",44),_()(),ue()}if(t&2){let e=o.$implicit,n=d(3);l(),h("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(),h("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),h("node",e.view)}}function gue(t,o){if(t&1&&k(0,_ue,5,14,"ng-container",40),t&2){let e=d(2);h("fVirtualForOf",e.graph().nodes)}}function bue(t,o){if(t&1){let e=W();m(0,"div",46),A("fNodePositionChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,i))})("pointerdown",function(i){w(e);let r=d(3);return T(r.onNodePointerDown(i))})("click",function(i){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,i))})("dblclick",function(){let i=w(e).$implicit,r=d(3);return T(r.openNode(i))}),m(1,"sm-node-card",42),A("expandedChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,i))})("favoriteToggle",function(i){w(e);let r=d(3);return T(r.onFavoriteToggle(i))}),_(),m(2,"div",43),F(3,"sm-view-contributions-host",44),_()()}if(t&2){let e=o.$implicit,n=d(3);h("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fOutputId",e.id+"-out"),O("data-testid","graph-node-"+e.id),l(),h("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),h("node",e.view)}}function vue(t,o){if(t&1&&(de(0,23),se(1,bue,4,12,"div",45,r3),ue()),t&2){let e=d(2);l(),le(e.graph().nodes)}}function yue(t,o){if(t&1&&F(0,"sm-perf-hud",29),t&2){let e=d(2);h("visible",e.visibleCount())("total",e.totalCount())("edges",e.edgeCount())}}function Cue(t,o){if(t&1){let e=W();F(0,"span",34),m(1,"p-button",47),A("onClick",function(){w(e);let i=d(2);return T(i.mapVisibility.clear())}),_()}if(t&2){let e=d(2);l(),h("label",e.texts.toolbar.showAllLabel)("ariaLabel",e.texts.toolbar.showAllAria)("pTooltip",e.texts.toolbar.showAllTooltip)("text",!0)}}function xue(t,o){if(t&1){let e=W();m(0,"div",17,0),A("click",function(i){w(e);let r=d();return T(r.onCanvasClick(i))}),m(2,"f-flow",18),A("fLoaded",function(){w(e);let i=d();return T(i.onLoaded())}),F(3,"f-selection-area"),m(4,"f-background"),F(5,"f-rect-pattern"),_(),F(6,"f-line-alignment",19),m(7,"f-canvas",20),A("fCanvasChange",function(i){w(e);let r=d();return T(r.onCanvasChange(i))}),de(8,21),se(9,mue,4,21,"f-connection",22,r3),ue(),M(11,gue,1,1,"ng-container",23)(12,vue,3,0,"ng-container",23),_(),F(13,"f-minimap"),_(),m(14,"div",24),F(15,"sm-kind-palette")(16,"sm-severity-palette")(17,"sm-link-kind-palette"),_(),m(18,"aside",25)(19,"div",26),A("mousedown",function(i){w(e);let r=d();return T(r.onPanelResizeStart(i))}),_(),m(20,"div",27)(21,"sm-inspector-view",28),A("tagSelect",function(i){w(e);let r=d();return T(r.onTagSelect(i))}),_()()(),M(22,yue,1,3,"sm-perf-hud",29),m(23,"div",30)(24,"p-button",31),A("onClick",function(){w(e);let i=d();return T(i.zoomIn())}),_(),m(25,"p-button",32),A("onClick",function(){w(e);let i=d();return T(i.zoomOut())}),_(),m(26,"p-button",33),A("onClick",function(){w(e);let i=d();return T(i.fitToScreen())}),_(),F(27,"span",34)(28,"sm-graph-layout-toolbar")(29,"span",34),m(30,"p-button",35),A("onClick",function(){w(e);let i=d();return T(i.resetLayout())}),_(),M(31,Cue,2,4),_()()}if(t&2){let e=d();h("smMiddleMousePan",e.canvas()),l(2),h("fCache",e.perf.cache),l(4),h("fAlignThreshold",20),l(),h("position",e.viewportPosition())("scale",e.viewportScale())("fZoomStep",.06)("fZoomDblClickStep",.35)("fZoomMinimum",e.zoomMin)("fZoomMaximum",e.zoomMax)("debounceTime",150),l(2),le(e.graph().edges),l(2),D(e.perf.virtualization?11:12),l(7),He("width",e.clampedPanelWidth(),"px"),ce("is-open",e.selectedNodeId()!==null),O("aria-label",e.texts.a11y.panel),l(),O("aria-label",e.texts.panel.resizeLabel),l(2),h("path",e.selectedPath())("activeTag",e.activeTagSelection()),l(),D(e.perfHud()?22:-1),l(),O("aria-label",e.texts.a11y.toolbar),l(),h("ariaLabel",e.texts.toolbar.zoomIn)("pTooltip",e.texts.toolbar.zoomIn)("text",!0)("rounded",!0)("disabled",!e.canZoomIn()),l(),h("ariaLabel",e.texts.toolbar.zoomOut)("pTooltip",e.texts.toolbar.zoomOut)("text",!0)("rounded",!0)("disabled",!e.canZoomOut()),l(),h("ariaLabel",e.texts.toolbar.fitToScreen)("pTooltip",e.texts.toolbar.fitToScreen)("text",!0)("rounded",!0),l(4),h("ariaLabel",e.texts.toolbar.resetLayoutLabel)("pTooltip",e.texts.toolbar.resetLayoutTooltip)("text",!0)("rounded",!0),l(),D(e.mapVisibility.isActive()?31:-1)}}var i3=.2,o3=420,wue={selected:!1,highlighted:!1,dimmed:!1},Tue={highlighted:!1,dimmed:!1,opacity:1},xf=(()=>{class t{loader=p(Ht);filters=p(dn);issuePaths=p(Co);mapVisibility=p(ni);graphPreferences=p(df);router=p(es);route=p(Ja);confirmationService=p(uo);destroyRef=p(St);dagreLayout=p(l0);injector=p(mt);usageTracker=p(Tb);flow=it(sa);canvas=it(aa);zoom=it(la);canvasWrap=it("canvasWrap");connectionType=this.graphPreferences.connectionType;connectionBehavior=ai.FIXED;markerStart=ze.START_ALL_STATES;markerEnd=ze.END_ALL_STATES;perf=ir.graph.perf;perfHud=p(YD).visible;savedViewport=zP();viewportStore=QP({savedViewport:this.savedViewport,hasCompletedInitialLayout:()=>this.layoutFit.hasCompletedInitialLayout()});viewportPosition=this.viewportStore.viewportPosition;viewportScale=this.viewportStore.viewportScale;canZoomIn=this.viewportStore.canZoomIn;canZoomOut=this.viewportStore.canZoomOut;zoomMin=Cf;zoomMax=T0;texts=Ti;nodePositions=te(qP());nodeDrag=e3({destroyRef:this.destroyRef,nodePositions:this.nodePositions});expansion=t3({nodes:this.loader.nodes});panelResize=KP({destroyRef:this.destroyRef,initialWidth:jP()??400,onCommit:e=>UP(e)});clampedPanelWidth=this.panelResize.clampedPanelWidth;loading=this.loader.loading;error=this.loader.error;visibleNodes=E(()=>this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity()));topology=E(()=>kb(this.loader.nodes(),this.loader.scan()));layoutPositions=te(new Map);layoutComputedAtSignal=te(0);fullLayout=E(()=>Wt(be({},this.topology()),{positions:this.layoutPositions(),computedAt:this.layoutComputedAtSignal()}));mapVisiblePaths=E(()=>{let e=this.visibleNodes().map(i=>i.path),n=this.mapVisibility.paths();return n.size===0?new Set(e):new Set(e.filter(i=>n.has(i)))});graph=E(()=>{let e=this.mapVisiblePaths(),n=this.filters.selectedLinkKinds(),i=n.length>0?new Set(n):null;return Ib(this.fullLayout(),e,this.nodePositions(),i)});fullAdjacency=E(()=>{let e=new Map,n=(i,r)=>{let a=e.get(i);a||(a=new Set,e.set(i,a)),a.add(r)};for(let i of this.fullLayout().edges)n(i.from,i.to),n(i.to,i.from);return e});hasData=E(()=>this.graph().nodes.length>0);showEmptyState=E(()=>!this.hasData()&&!this.mapVisibility.isActive()&&!this.filters.kindToggleExplicitEmpty()&&this.filters.searchText().trim().length===0);showCurationEmptyState=E(()=>!this.hasData()&&this.mapVisibility.isActive());visibleCount=E(()=>this.graph().nodes.length);totalCount=E(()=>this.loader.nodes().length);edgeCount=E(()=>this.graph().edges.length);layoutComputedAt=E(()=>this.layoutComputedAtSignal());connectionSides=E(()=>kD(this.graphPreferences.layoutAlgorithm(),this.graphPreferences.layoutDirection()));inputSide=E(()=>this.connectionSides().input);outputSide=E(()=>this.connectionSides().output);selectedNodeId=te(null);selectedPath=E(()=>{let e=this.selectedNodeId();return e?this.graph().nodes.find(i=>i.id===e)?.view.path:void 0});selectionGuard=_e(()=>{let e=this.selectedNodeId();if(e===null)return;this.graph().nodes.some(i=>i.id===e)||this.selectedNodeId.set(null)});pathsFingerprint=E(()=>this.loader.nodes().map(e=>e.path).sort().join("|"));layoutFit=n3({visibleNodes:this.visibleNodes,pathsFingerprint:this.pathsFingerprint,savedViewport:this.savedViewport,fit:()=>this.fitToScreenClamped(),animatedFit:()=>this.animatedFitToScreen()});constructor(){let e=E(()=>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}});PP({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}),_e(()=>{let r=this.loader.nodes();if(r.length===0)return;let a=this.fullLayout();if(a.positions.size===0)return;let s=DP({nodes:r,current:this.nodePositions(),layout:a});s.dirty&&(this.nodePositions.set(s.next),za(s.next))}),_e(()=>{this.layoutComputedAt(),this.autoFitPending&&(this.autoFitPending=!1,this.runAnimatedFit())}),_e(()=>{this.layoutComputedAt();let r=this.layoutFit.hasCompletedInitialLayout(),a=this.pendingCenterNodeId();a===null||!r||this.fullLayout().positions.size!==0&&(this.pendingCenterNodeId.set(null),lo(()=>this.centerOnNode(a),{injector:this.injector}))}),_e(()=>{this.mapVisibility.paths(),an(()=>this.layoutFit.hasCompletedInitialLayout())&&(this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=setTimeout(()=>{lo(()=>this.runAnimatedFit(),{injector:this.injector})},180))}),this.destroyRef.onDestroy(()=>{this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce)}),_e(()=>{let r=this.loader.nodes();r.length!==0&&this.mapVisibility.prune(new Set(r.map(a=>a.path)))});let n="",i="";_e(()=>{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=Sb(r,a.edges),u=`${s.algorithm}|${s.direction}|${s.spacing}`,f=`${c}|${u}`;if(f===n)return;let g=i!==""&&i!==u;n=f,i=u,(s.algorithm==="force"?Promise.resolve(Hf(r,a.edges)):Promise.resolve().then(()=>zf(this.dagreLayout,r,a.edges,s))).then(I=>{this.layoutPositions.set(I),this.layoutComputedAtSignal.set(performance.now()),g&&(this.nodePositions.set(new Map),this.fitToScreenClamped())}).catch(I=>{console.error("[graph-view] layout failed:",I)})})}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),lo(()=>{let i=e.transform.scale;if(i<=this.zoomMax&&i>=this.zoomMin)return;let r=Math.max(this.zoomMin,Math.min(i,this.zoomMax)),a=Math.abs(i-r),s=i>r?xn.ZOOM_OUT:xn.ZOOM_IN;n?.setZoom(this.getViewportCenter(),a,s,!1)},{injector:this.injector}))}autoFitAnimToken=0;autoFitPending=!1;mapFitDebounce=null;pendingCenterNodeId=te(null);animatedFitToScreen(){this.autoFitPending=!0}runAnimatedFit(){let e=this.canvasWrap()?.nativeElement;if(!e)return;let n={width:e.clientWidth,height:e.clientHeight},i=this.fullLayout().positions;if(i.size===0)return;let r=this.nodePositions(),a=[];for(let u of this.mapVisiblePaths()){let f=r.get(u)??i.get(u);f&&a.push({x:f.x,y:f.y})}if(a.length===0)return;let s=yf({points:a,wrap:n,panelW:this.selectedNodeId()!==null?this.clampedPanelWidth():0,zoomMin:this.zoomMin});if(!s)return;let c=++this.autoFitAnimToken;Ha({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:u=>this.viewportPosition.set(u),writeScale:u=>this.viewportScale.set(u),isStaleToken:()=>c!==this.autoFitAnimToken},s,o3)}centerOnNode(e){if(!this.mapVisiblePaths().has(e))return;let n=this.canvasWrap()?.nativeElement;if(!n)return;let i=this.nodePositions().get(e)??this.fullLayout().positions.get(e);if(!i)return;let r=YP({point:i,wrap:{width:n.clientWidth,height:n.clientHeight},panelW:this.selectedNodeId()!==null?this.clampedPanelWidth():0,scale:this.viewportScale()}),a=++this.autoFitAnimToken;Ha({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:s=>this.viewportPosition.set(s),writeScale:s=>this.viewportScale.set(s),isStaleToken:()=>a!==this.autoFitAnimToken},r,o3)}isolateChain(e){let n=SD(this.fullAdjacency(),e);this.mapVisibility.setOnly(n),this.selectedNodeId.set(e)}onNodePositionChange(e,n){this.nodeDrag.onNodePositionChange(e,n)}zoomIn(){this.zoom()?.setZoom(this.getViewportCenter(),i3,xn.ZOOM_IN,!0)}zoomOut(){this.zoom()?.setZoom(this.getViewportCenter(),i3,xn.ZOOM_OUT,!0)}fitToScreen(){this.fitToScreenClamped()}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=Ti.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.fitToScreenClamped();return}this.relayoutVisibleSubset(e).then(()=>this.fitToScreenClamped()).catch(()=>{})}async relayoutVisibleSubset(e){let n=this.loader.nodes().filter(c=>e.has(c.path));if(n.length===0)return;let i=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"?Hf(n,i):zf(this.dagreLayout,n,i,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),za(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=XP({flow:this.flow,nodes:this.loader.nodes,fullLayout:E(()=>this.fullLayout()),canvasWrap:()=>{let e=this.canvasWrap()?.nativeElement;return e?{width:e.clientWidth,height:e.clientHeight}:null},selectedNodeId:this.selectedNodeId,clampedPanelWidth:this.clampedPanelWidth,zoomMin:Cf,viewportPosition:this.viewportPosition,viewportScale:this.viewportScale});activeTagSelection=this.tagSelection.activeTagSelection;selectionState=JP({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"&&NP(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)??wue}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)??Tue}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-graph-view"]],viewQuery:function(n,i){n&1&&vn(i.flow,sa,5)(i.canvas,aa,5)(i.zoom,la,5)(i.canvasWrap,due,5),n&2&&Kt(4)},hostBindings:function(n,i){n&1&&A("keydown.escape",function(){return i.onEscape()},Wa)},features:[ve([uo,fC(l0,{mode:ri.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,i){n&1&&(m(0,"section",1),M(1,uue,4,1,"div",2)(2,pue,6,2,"div",3)(3,hue,5,3,"div",4)(4,fue,5,3,"div",5)(5,xue,32,40,"div",6),F(6,"p-confirmdialog",7),_()),n&2&&(l(),D(i.loading()&&!i.hasData()?1:i.error()&&!i.hasData()?2:i.showEmptyState()?3:i.showCurationEmptyState()?4:5),l(5),h("ariaLabel",i.texts.resetLayoutConfirm.header))},dependencies:[TC,sa,aa,gC,_C,la,CC,Py,Ry,bC,Xy,eC,vC,yC,Eh,Zy,xC,uC,RD,AD,BD,GD,UD,WD,IP,zt,Ot,hs,ps,Ve,Be,ti,EP],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(-50%);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: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--mentions[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-mentions);--ff-connection-width: 1px;--ff-marker-color: var(--sm-edge-mentions)}.f-conn--supersedes[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-supersedes);--ff-connection-width: 1.25px;--ff-marker-color: var(--sm-edge-supersedes)}.graph__canvas-wrap[_ngcontent-%COMP%] .f-conn--supersedes .f-connection-path{stroke-dasharray:none}.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--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)}.f-conn--supersedes.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-supersedes-active);--ff-connection-selected-color: var(--sm-edge-supersedes-active);--ff-marker-color: var(--sm-edge-supersedes-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 qa=440,S0=280,Sue=480;function a3(t){let o=te(t.initialWidth),e=te(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&Ga(window,"resize").pipe(vo(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=()=>Math.max(S0,e()-Sue),i=E(()=>{let x=n(),I=o();return I>x||I<S0?Math.min(qa,x):I}),r=null,a=null,s=null,c=()=>{s=null,a!==null&&(o.set(a),a=null)},u=x=>{if(!r)return;let I=x.clientX-r.mouseX,S=r.widthAtStart+I,N=n();a=Math.min(N,Math.max(S0,S)),s===null&&typeof window<"u"&&(s=window.requestAnimationFrame(c))},f=()=>{r&&(r=null,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f),s!==null&&typeof window<"u"&&(window.cancelAnimationFrame(s),s=null),a!==null&&(o.set(a),a=null),t.onCommit(o()))};return{clampedRailWidth:i,onRailResizeStart:x=>{x.button===0&&(x.preventDefault(),x.stopPropagation(),r={mouseX:x.clientX,widthAtStart:i()},document.addEventListener("mousemove",u),document.addEventListener("mouseup",f))}}}var s3=(()=>{class t{router=p(es);route=p(Ja);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 kue(t,o){if(t&1){let e=W();m(0,"p-iconfield",3),F(1,"p-inputicon",7),m(2,"input",8),A("ngModelChange",function(i){w(e);let r=d();return T(r.onSearchChange(i))}),_()()}if(t&2){let e=d();l(2),h("placeholder",e.texts.rail.searchPlaceholder)("ngModel",e.searchText()),O("aria-label",e.texts.rail.searchAriaLabel)}}function Iue(t,o){if(t&1){let e=W();m(0,"div",9),F(1,"sm-files-view"),_(),m(2,"div",10),A("mousedown",function(i){w(e);let r=d();return T(r.onRailResizeStart(i))}),_()}if(t&2){let e=d();l(2),O("aria-label",e.texts.rail.resize)}}var l3="sm.workspace.rail-width",cIe=(()=>{class t{store=p(dn);destroyRef=p(St);texts=Eb;railCollapsed=te(!1);railAnimating=te(!1);railAnimTimer=null;searchText=this.store.searchText;graphView=it(xf);isolate(e){this.graphView()?.isolateChain(e)}resize=a3({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.railAnimating.set(!0),this.railAnimTimer!==null&&clearTimeout(this.railAnimTimer),this.railAnimTimer=setTimeout(()=>this.railAnimating.set(!1),220)}onSearchChange(e){this.store.setSearchText(e)}readStoredWidth(){if(typeof localStorage>"u")return qa;let e=Number(localStorage.getItem(l3));return Number.isFinite(e)&&e>0?e:qa}writeStoredWidth(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(l3,String(e))}catch{}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=H({type:t,selectors:[["sm-workspace-view"]],viewQuery:function(n,i){n&1&&vn(i.graphView,xf,5),n&2&&Kt()},features:[ve([{provide:_o,useClass:s3},{provide:_s,useExisting:Sn(()=>t)}])],decls:9,vars:15,consts:[["data-testid","workspace-view",1,"workspace"],["data-testid","workspace-rail",1,"workspace__rail"],[1,"workspace__rail-bar"],["iconPosition","left",1,"workspace__search"],["type","button","tooltipPosition","bottom","data-testid","workspace-rail-toggle",1,"workspace__rail-btn",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],[1,"workspace__map"],["styleClass","pi pi-search"],["pInputText","","pSize","small","type","text","data-testid","workspace-search",3,"ngModelChange","placeholder","ngModel"],[1,"workspace__rail-body"],["role","separator","aria-orientation","vertical","data-testid","workspace-rail-resize",1,"workspace__rail-resize",3,"mousedown"]],template:function(n,i){n&1&&(m(0,"div",0)(1,"aside",1)(2,"div",2),M(3,kue,3,3,"p-iconfield",3),m(4,"button",4),A("click",function(){return i.toggleRail()}),F(5,"i",5),_()(),M(6,Iue,3,1),_(),m(7,"div",6),F(8,"sm-graph-view"),_()()),n&2&&(l(),He("width",i.railCollapsed()?null:i.clampedRailWidth(),"px"),ce("is-collapsed",i.railCollapsed())("is-animating",i.railAnimating()),O("aria-label",i.texts.rail.label),l(2),D(i.railCollapsed()?-1:3),l(),h("pTooltip",i.railCollapsed()?i.texts.rail.expand:i.texts.rail.collapse),O("aria-label",i.railCollapsed()?i.texts.rail.expand:i.texts.rail.collapse),l(),ce("pi-times",!i.railCollapsed())("pi-angle-right",i.railCollapsed()),l(),D(i.railCollapsed()?-1:6))},dependencies:[$v,xf,Vt,$0,ln,cn,K0,W0,Z0,Y0,ns,fo,Ve,Be],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__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{cIe as WorkspaceView};