PageSourceSearch

https://sustainablefuturesonae.com/chunk-42C54VSB.js

js sustainablefuturesonae.com collected 2026-10-06 07:19:37 UTC 3,390,083 bytes, 237 lines download raw bytes

1import{$ as mc,B as Mt,C as ba,D as hl,E as J5,F as ej,G as vf,I as fl,J as $S,K as So,P as Ej,Q as en,R as un,S as Ij,T as Lr,U as kb,V as Mu,W as Dn,X as gr,Y as Yc,_ as An,ba as yC,c as Xp,d as pf,da as Mj,e as ub,ea as Ro,f as FB,fa as Jr,g as vi,ga as CC,h as ll,i as NB,ia as ir,j as Zy,ja as wC,l as fr,n as M4,na as Bj,o as ps,oa as uc,pa as vl,qa as Wo,u as A4,ua as am,va as Pb,wa as jj,xa as Yj,y as O4}from"./chunk-NPMJOBT2.js";import{A as $2,a as Db,b as Sr,c as Mb,d as $j,e as Uj,f as SC,h as Xn,j as yr,n as On,p as Hj,v as qj,y as Wj}from"./chunk-FGBNGE4W.js";import{$ as wf,$a as Sb,$b as ut,$c as Fb,A as Ao,Aa as Ua,B as tj,Ba as aj,Bb as _j,Bc as dT,C as uC,Ca as sj,Cb as om,Cc as Nj,D as O2,Da as N2,Db as Wa,E as qc,Ea as V2,Eb as Ya,Ec as Ai,F as hC,Fa as po,Fb as vj,Fc as Wt,Gb as z2,Gc as Qd,H as Ur,Ha as lj,Hb as yj,Hc as Ou,I as P2,Ia as Ha,Ib as Cj,J as ms,Ja as Fl,Jb as Eb,Jc as Vj,K as US,Kb as wj,Kc as Lj,L as Cb,La as qd,Lb as xt,Lc as Se,M as yf,Ma as cj,Mb as xj,Mc as Qc,Na as Vr,Nb as Sj,O as mr,Oa as Tf,Ob as vC,Oc as Gj,P as R2,Pa as dj,Pb as Tj,Pc as At,Qa as Bo,Qb as Ib,Qc as ni,R as HS,Rc as to,S as qS,Sb as yt,Sc as Kd,T as ij,Ta as ZS,Tc as Yt,U as Cf,Ua as xb,Ub as kj,Uc as Rb,V as WS,Va as 
1L2,Vb as Dj,Vc as sm,W as YS,Wa as qa,Wb as Pe,Wc as ze,X as Wc,Xa as JS,Xc as xC,Y as wb,Yb as va,Za as B2,Zc as zj,_ as QS,_a as eT,_b as ye,_c as Kn,a as MB,aa as Iu,ab as pj,ac as zn,ad as Pu,ba as lc,bb as dc,bc as Aj,c as Qy,ca as KS,cc as ke,d as AB,da as XS,db as tT,dc as sT,e as OB,ea as _a,eb as mj,ec as Yd,f as js,fa as F2,fb as iT,fc as xe,ga as $a,gb as nT,gc as We,h as Dr,ha as us,hb as rT,i as Ud,ia as nj,ib as uj,ic as Qa,j as Qn,ja as rj,jb as Po,jc as Nl,k as Vi,ka as oj,kb as bC,kc as Ab,l as Ky,la as gl,lb as pc,lc as eo,m as PB,ma as cc,mb as hj,mc as ur,n as Tt,nb as fj,nc as Au,o as Ji,oa as fC,ob as Ot,oc as Br,p as al,pa as gC,pb as oT,pc as $e,q as $i,qa as vr,qb as Tb,qc as Ka,r as Xy,ra as Rl,rb as aT,rc as Ob,s as sl,sa as Oo,sb as To,sc as Qe,t as df,ta as ku,tb as Wd,tc as Oj,u as RB,ua as Du,ub as j2,uc as Pj,v as mb,va as xf,vb as G2,vc as Rj,w as u2,wa as Sf,wb as Nn,wc as Fj,x as aS,xa as bl,xb as gj,xc as lT,ya as Pa,yb as bj,yc as St,z as mt,za as _l,zb as _C,zc as cT}from"./chunk-JTDGY3J7.js";import{a as Wr,g as D5,j as GS,k as zS,n as Z5,o as mC,q as vn}from"./chunk-F365IYTJ.js";import{$ as nl,$a as M,$b as sf,$c as fa,$d as Qi,$e as f2,$g as v2,$h as Zp,$j as b5,$k as NS,$n as Y5,A as iB,Aa as $r,Ac as p,Af as cl,Ai as B4,Aj as K4,Ak as S5,An as G5,B as nB,Bc as O,Be as Yy,Bf as hb,Bg as Bi,Bi as wS,Bj as X4,Bn as z5,C as W,Ca as he,Cc as pt,Ce as oS,Cg as ga,Ci as xS,Cj as x2,Cl as sn,D as fu,Da as we,Dc as ct,Dd as db,De as IB,Df as QB,Dg as dt,Di as Ge,Dj as Z4,Dk as MS,Dl as _b,E as Ft,Ea as Nt,Eb as ob,Ec as Ti,Ee as Jt,Ef as KB,Eg as De,Ei as jt,Ej as J4,Fb as Ut,Fc as B,Fe as m2,Ff as co,Fg as bS,Fi as be,Fj as e5,Fl as Hd,Fn as mn,Ga as tt,Gb as yo,Gc as lo,Ge as kB,Gg as fn,Gh as vS,Gi as tm,Gj as t5,Gk as AS,Gl as dC,Gn as $5,H as Jx,Ha as a2,Hc as lb,Hd as Me,He as DB,Hj as i5,Hk as OS,I as Rn,Ic as T,Id as Cu,If as XB,Ig as Co,Ii as j4,Ij as n5,Ik as PS,In as U5,J as Jn,Jb as uB,Jc as cb,Jd as SB,Jf as pS,Jg as mf,Jj as r5,Jk as RS,Jm as F5,K as ls,Ka as X,Kc as b,Ke as yi,Kf as g2,Kg as u4,Ki as G4,Kj as o5,Kk as FS,Kl as I2,Kn as H5,L as eS,La as Rt,Lb as hB,Lc as Ct,Le as sS,Lf as mS,Ln as q5,M as Xt,Mc as Fe,Me as VB,Mf as ZB,Mg as pl,Mi as z4,Mj as IS,Ml as k2,Mn as vb,N as n2,Na as Gd,Nb as l,Nc as te,Ne as LB,Ni as $4,Nl as A5,O as Pi,Oa as zd,Ob as h,Oe as Jy,Oj as a5,Ol as D2,Om as N5,P as rB,Pb as ab,Pc as Hy,Pe as lS,Pf as JB,Ph as fb,Pi as gb,Pj as s5,Pl as BS,Q as oB,Qa as L,Qb as an,Qc as Zt,Qd as Re,Qe as BB,Qf as za,Qh as T4,Qj as l5,Qm as V5,R as vt,Ra as Vt,Rb as l2,Rc as ae,Rd as Nr,Re as jB,Ri as SS,Rj as c5,Rm as L5,Sa as _e,Sb as sb,Sc as Q,Sd as wu,Se as GB,Si as U4,Sj as d5,Sm as rm,Sn as W5,T as of,Ta as _r,Tb as fB,Tc as K,Td as TB,Te as eC,Tg as _S,Tj as p5,Tm as _f,U as Bd,Ua as s2,Ub as Ni,Uc as yu,Ud as ol,Ue as cS,Uh as ml,Uj as m5,V as aB,Vb as ci,Vc as qy,Vd as rS,Ve as zB,Vf as iC,Vh as oC,Vj as u5,Vk as T5,W as Wi,Wa as tS,Wb as gB,Wc as d2,We as ve,Wf as dl,Wg as h4,Wh as E4,Xc as me,Xe as Aa,Xg as f4,Xn as qi,Y as $n,Ya as $y,Yb as $d,Yc as g,Ye as h2,Yg as g4,Yj as h5,Z as sB,Za as lt,Zb as Uy,Zc as z,Ze as $B,Zh as I4,Zi as TS,Zj as f5,Zk as E5,_ as zy,_a as D,_c as j,_e as tC,_h as k4,_j as g5,_n as Tu,a as ln,aa as lB,ab as ar,ac as bB,ad as fi,af as UB,ah as y2,ak as _5,ao as jS,b as KL,bb as cs,bc as Pl,bd as gi,bg as e4,bh as b4,bk as v5,bo as yb,ca as xr,cb as wn,cc as Ce,cd as bi,cf as HB,cg as uS,ci as D4,cj as Un,ck as y5,d as Ma,da as cB,db as ja,dc as _B,dd as ne,df as qB,dg as t4,dh as _4,di as Jp,dk as S2,dl as I5,e as hu,ea as af,eb as Mn,ec as si,ed as ot,ef as N,eg as i4,eh as v4,ek as C5,el as k5,fa as gu,fb as En,fd as Wy,ff as dS,fg as hS,fh as Di,fi as P4,fk as w5,fl as bf,fo as Eu,g as Te,ga as jd,gd as iS,ge as ac,gf as WB,gg as n4,gi as R4,gj as Zi,gk as x5,h as XL,ha as r2,hb as J,hd as hn,he as Ke,hf as YB,hg as b2,hh as Fn,hi as yS,hj as aC,hk as sC,hm as O5,i as Gn,ib as Bt,ic as x,id as Xe,ie as ce,if as Oa,ig as r4,ih as sc,ii as F4,ij as im,ik as T2,im as P5,io as Q5,j as or,jb as rb,jc as vB,jd as Yi,je as lf,jh as y4,jk as ff,jo as K5,ka as dB,kb as _u,kd as rl,ke as cf,kg as o4,ki as N4,l as e2,lb as Oi,lc as Lo,le as p2,lg as fS,lh as uf,li as C2,m as t2,ma as bu,mb as ge,mc as Je,md as wB,me as xu,mg as a4,mh as hf,mj as H4,mn as ws,n as ZL,na as pB,nb as Bs,nc as m,nd as v,ne as fo,ng as s4,nh as go,nk as E2,o as JL,oa as Si,oc as hi,od as C,oe as Ve,oh as C4,ok as Gs,p as Ls,pa as Cs,pc as Y,pd as ft,pg as l4,ph as Zr,pk as ia,pm as pC,q as pe,qa as ib,qc as _n,qd as nS,qk as Ar,qm as M2,qo as A2,r as le,rb as vu,rc as bt,rd as ds,re as pb,rg as nC,rh as w4,rj as q4,rk as bb,sa as on,sb as Er,sc as yB,sd as kt,sf as G,sk as nm,sl as ul,so as Hc,t as eB,ta as ii,tc as CB,td as xB,te as EB,tf as ea,tg as rC,ti as CS,tj as ES,tk as lC,tl as VS,to as X5,u as i2,ua as Be,ub as mB,uc as _t,ue as zi,uf as ta,ug as c4,uk as Uc,ul as qo,um as R5,v as Yn,va as o2,vc as c2,vg as d4,vh as x4,vi as em,vk as kS,vl as LS,w as Z,wa as et,wc as Jo,we as Ga,wg as p4,wi as Mr,wj as w2,wk as DS,wl as Ei,x as zr,xa as nb,xc as Ir,xg as _2,xh as S4,xj as W4,xk as gf,xl as M5,y as tB,yc as kr,yf as Su,yg as gS,yi as V4,yj as Y4,yl as cC,yn as B5,zc as d,zg as m4,zi as 
1L4,zj as Q4,zn as j5}from"./chunk-IGVMRBDU.js";import{a as re,b as Lt,d as Zx,e as rf,f as Ae,g as Ld,h as se,i as Gy,m as y}from"./chunk-WGKQWGZL.js";var MG=rf((wqe,RC)=>{y();(function(n,t,r){"use strict";if(!n||!t){console.warn("Flowjs needs window and document objects to work");return}var e=n.navigator.msPointerEnabled;function i(S){if(this.support=typeof File<"u"&&typeof Blob<"u"&&typeof FileList<"u"&&(!!Blob.prototype.slice||!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!1),!!this.support){this.supportDirectory=/Chrome/.test(n.navigator.userAgent)||/Firefox/.test(n.navigator.userAgent)||/Edge/.test(n.navigator.userAgent),this.files=[],this.defaults={chunkSize:1024*1024,forceChunkSize:!1,simultaneousUploads:3,singleFile:!1,fileParameterName:"file",progressCallbacksInterval:500,speedSmoothingFactor:.1,query:{},headers:{},withCredentials:!1,preprocess:null,changeRawDataBeforeSend:null,method:"multipart",testMethod:"GET",uploadMethod:"POST",prioritizeFirstAndLastChunk:!1,allowDuplicateUploads:!1,target:"/",testChunks:!0,generateUniqueIdentifier:null,maxChunkRetries:0,chunkRetryInterval:null,permanentErrors:[404,413,415,500,501],successStatuses:[200,201,202],onDropStopPropagation:!1,initFileFn:null,readFileFn:a},this.opts={},this.events={};var F=this;this.onDrop=function(H){F.opts.onDropStopPropagation&&H.stopPropagation(),H.preventDefault();var q=H.dataTransfer;q.items&&q.items[0]&&q.items[0].webkitGetAsEntry?F.webkitReadDataTransfer(H):F.addFiles(q.files,H)},this.preventEvent=function(H){H.preventDefault()},this.opts=i.extend({},this.defaults,S||{})}}i.prototype={on:function(S,F){S=S.toLowerCase(),this.events.hasOwnProperty(S)||(this.events[S]=[]),this.events[S].push(F)},off:function(S,F){S!==r?(S=S.toLowerCase(),F!==r?this.events.hasOwnProperty(S)&&c(this.events[S],F):delete this.events[S]):this.events={}},fire:function(S,F){F=Array.prototype.slice.call(arguments),S=S.toLowerCase();var H=!1;return this.events.hasOwnProperty(S)&&I(this.events[S],function(q){H=q.apply(this,F.slice(1))===!1||H},this),S!="catchall"&&(F.unshift("catchAll"),H=this.fire.apply(this,F)===!1||H),!H},webkitReadDataTransfer:function(S){var F=this,H=S.dataTransfer.items.length,q=[];I(S.dataTransfer.items,function(qe){var ue=qe.webkitGetAsEntry();if(!ue){Le();return}ue.isFile?Ie(qe.getAsFile(),ue.fullPath):ee(ue.createReader())});function ee(qe){qe.readEntries(function(ue){ue.length?(H+=ue.length,I(ue,function(Ne){if(Ne.isFile){var st=Ne.fullPath;Ne.file(function(Ui){Ie(Ui,st)},He)}else Ne.isDirectory&&ee(Ne.createReader())}),ee(qe)):Le()},He)}function Ie(qe,ue){qe.relativePath=ue.substring(1),q.push(qe),Le()}function He(qe){throw Le(),qe}function Le(){--H==0&&F.addFiles(q,S)}},generateUniqueIdentifier:function(S){var F=this.opts.generateUniqueIdentifier;if(typeof F=="function")return F(S);var H=S.relativePath||S.webkitRelativePath||S.fileName||S.name;return S.size+"-"+H.replace(/[^0-9a-zA-Z_-]/img,"")},uploadNextChunk:function(S){var F=!1;if(this.opts.prioritizeFirstAndLastChunk&&(I(this.files,function(q){if(!q.paused&&q.chunks.length&&q.chunks[0].status()==="pending")return q.chunks[0].send(),F=!0,!1;if(!q.paused&&q.chunks.length>1&&q.chunks[q.chunks.length-1].status()==="pending")return q.chunks[q.chunks.length-1].send(),F=!0,!1}),F))return F;if(I(this.files,function(q){if(q.paused||I(q.chunks,function(ee){if(ee.status()==="pending")return ee.send(),F=!0,!1}),F)return!1}),F)return!0;var H=!1;return I(this.files,function(q){if(!q.isComplete())return H=!0,!1}),!H&&!S&&f(function(){this.fire("complete")},this),!1},assignBrowse:function(S,F,H,q){S instanceof Element&&(S=[S]),I(S,function(ee){var Ie;ee.tagName==="INPUT"&&ee.type==="file"?Ie=ee:(Ie=t.createElement("input"),Ie.setAttribute("type","file"),_(Ie.style,{visibility:"hidden",position:"absolute",width:"1px",height:"1px"}),ee.appendChild(Ie),ee.addEventListener("click",function(){Ie.click()},!1)),!this.opts.singleFile&&!H&&Ie.setAttribute("multiple","multiple"),F&&Ie.setAttribute("webkitdirectory","webkitdirectory"),I(q,function(Le,qe){Ie.setAttribute(qe,Le)});var He=this;Ie.addEventListener("change",function(Le){Le.target.value&&(He.addFiles(Le.target.files,Le),Le.target.value="")},!1)},this)},assignDrop:function(S){typeof S.length>"u"&&(S=[S]),I(S,function(F){F.addEventListener("dragover",this.preventEvent,!1),F.addEventListener("dragenter",this.preventEvent,!1),F.addEventListener("drop",this.onDrop,!1)},this)},unAssignDrop:function(S){typeof S.length>"u"&&(S=[S]),I(S,function(F){F.removeEventListener("dragover",this.preventEvent),F.removeEventListener("dragenter",this.preventEvent),F.removeEventListener("drop",this.onDrop)},this)},isUploading:function(){var S=!1;return I(this.files,function(F){if(F.isUploading())return S=!0,!1}),S},_shouldUploadNext:function(){var S=0,F=!0,H=this.opts.simultaneousUploads;return I(this.files,function(q){I(q.chunks,function(ee){if(ee.status()==="uploading"&&(S++,S>=H))return F=!1,!1})}),F&&S},upload:function(){var S=this._shouldUploadNext();if(S!==!1){this.fire("uploadStart");for(var F=!1,H=1;H<=this.opts.simultaneousUploads-S;H++)F=this.uploadNextChunk(!0)||F;F||f(function(){this.fire("complete")},this)}},resume:function(){I(this.files,function(S){S.isComplete()||S.resume()})},pause:function(){I(this.files,function(S){S.pause()})},cancel:function(){for(var S=this.files.length-1;S>=0;S--)this.files[S].cancel()},progress:function(){var S=0,F=0;return I(this.files,function(H){S+=H.progress()*H.size,F+=H.size}),F>0?S/F:0},addFile:function(S,F){this.addFiles([S],F)},addFiles:function(S,F){var H=[];I(S,function(q){if((!e||e&&q.size>0)&&!(q.size%4096===0&&(q.name==="."||q.fileName==="."))){var ee=this.generateUniqueIdentifier(q);if(this.opts.allowDuplicateUploads||!this.getFromUniqueIdentifier(ee)){var Ie=new o(this,q,ee);this.fire("fileAdded",Ie,F)&&H.push(Ie)}}},this),this.fire("filesAdded",H,F)&&(I(H,function(q){this.opts.singleFile&&this.files.length>0&&this.removeFile(this.files[0]),this.files.push(q)},this),this.fire("filesSubmitted",H,F))},removeFile:function(S){for(var F=this.files.length-1;F>=0;F--)this.files[F]===S&&(this.files.splice(F,1),S.abort(),this.fire("fileRemoved",S))},getFromUniqueIdentifier:function(S){var F=!1;return I(this.files,function(H){H.uniqueIdentifier===S&&(F=H)}),F},getSize:function(){var S=0;return I(this.files,function(F){S+=F.size}),S},sizeUploaded:function(){var S=0;return I(this.files,function(F){S+=F.sizeUploaded()}),S},timeRemaining:function(){var S=0,F=0;return I(this.files,function(H){!H.paused&&!H.error&&(S+=H.size-H.sizeUploaded(),F+=
1H.averageSpeed)}),S&&!F?Number.POSITIVE_INFINITY:!S&&!F?0:Math.floor(S/F)}};function o(S,F,H){this.flowObj=S,this.bytes=null,this.file=F,this.name=F.fileName||F.name,this.size=F.size,this.relativePath=F.relativePath||F.webkitRelativePath||this.name,this.uniqueIdentifier=H===r?S.generateUniqueIdentifier(F):H,this.chunkSize=0,this.chunks=[],this.paused=!1,this.error=!1,this.averageSpeed=0,this.currentSpeed=0,this._lastProgressCallback=Date.now(),this._prevUploadedSize=0,this._prevProgress=0,this.bootstrap()}o.prototype={measureSpeed:function(){var S=Date.now()-this._lastProgressCallback;if(S){var F=this.flowObj.opts.speedSmoothingFactor,H=this.sizeUploaded();this.currentSpeed=Math.max((H-this._prevUploadedSize)/S*1e3,0),this.averageSpeed=F*this.currentSpeed+(1-F)*this.averageSpeed,this._prevUploadedSize=H}},chunkEvent:function(S,F,H){switch(F){case"progress":if(Date.now()-this._lastProgressCallback<this.flowObj.opts.progressCallbacksInterval)break;this.measureSpeed(),this.flowObj.fire("fileProgress",this,S),this.flowObj.fire("progress"),this._lastProgressCallback=Date.now();break;case"error":this.error=!0,this.abort(!0),this.flowObj.fire("fileError",this,H,S),this.flowObj.fire("error",H,this,S);break;case"success":if(this.error)return;this.measureSpeed(),this.flowObj.fire("fileProgress",this,S),this.flowObj.fire("progress"),this._lastProgressCallback=Date.now(),this.isComplete()&&(this.currentSpeed=0,this.averageSpeed=0,this.flowObj.fire("fileSuccess",this,H,S));break;case"retry":this.flowObj.fire("fileRetry",this,S);break}},pause:function(){this.paused=!0,this.abort()},resume:function(){this.paused=!1,this.flowObj.upload()},abort:function(S){this.currentSpeed=0,this.averageSpeed=0;var F=this.chunks;S&&(this.chunks=[]),I(F,function(H){H.status()==="uploading"&&(H.abort(),this.flowObj.uploadNextChunk())},this)},cancel:function(){this.flowObj.removeFile(this)},retry:function(){this.bootstrap(),this.flowObj.upload()},bootstrap:function(){typeof this.flowObj.opts.initFileFn=="function"&&this.flowObj.opts.initFileFn(this),this.abort(!0),this.error=!1,this._prevProgress=0;var S=this.flowObj.opts.forceChunkSize?Math.ceil:Math.floor;this.chunkSize=u(this.flowObj.opts.chunkSize,this);for(var F=Math.max(S(this.size/this.chunkSize),1),H=0;H<F;H++)this.chunks.push(new s(this.flowObj,this,H))},progress:function(){if(this.error)return 1;if(this.chunks.length===1)return this._prevProgress=Math.max(this._prevProgress,this.chunks[0].progress()),this._prevProgress;var S=0;I(this.chunks,function(H){S+=H.progress()*(H.endByte-H.startByte)});var F=S/this.size;return this._prevProgress=Math.max(this._prevProgress,F>.9999?1:F),this._prevProgress},isUploading:function(){var S=!1;return I(this.chunks,function(F){if(F.status()==="uploading")return S=!0,!1}),S},isComplete:function(){var S=!1;return I(this.chunks,function(F){var H=F.status();if(H==="pending"||H==="uploading"||H==="reading"||F.preprocessState===1||F.readState===1)return S=!0,!1}),!S},sizeUploaded:function(){var S=0;return I(this.chunks,function(F){S+=F.sizeUploaded()}),S},timeRemaining:function(){if(this.paused||this.error)return 0;var S=this.size-this.sizeUploaded();return S&&!this.averageSpeed?Number.POSITIVE_INFINITY:!S&&!this.averageSpeed?0:Math.floor(S/this.averageSpeed)},getType:function(){return this.file.type&&this.file.type.split("/")[1]},getExtension:function(){return this.name.substr((~-this.name.lastIndexOf(".")>>>0)+2).toLowerCase()}};function a(S,F,H,q,ee){var Ie="slice";S.file.slice?Ie="slice":S.file.mozSlice?Ie="mozSlice":S.file.webkitSlice&&(Ie="webkitSlice"),ee.readFinished(S.file[Ie](F,H,q))}function s(S,F,H){this.flowObj=S,this.fileObj=F,this.offset=H,this.tested=!1,this.retries=0,this.pendingRetry=!1,this.preprocessState=0,this.readState=0,this.loaded=0,this.total=0,this.chunkSize=this.fileObj.chunkSize,this.startByte=this.offset*this.chunkSize,this.filename=null,this.computeEndByte=function(){var ee=Math.min(this.fileObj.size,(this.offset+1)*this.chunkSize);return this.fileObj.size-ee<this.chunkSize&&!this.flowObj.opts.forceChunkSize&&(ee=this.fileObj.size),ee},this.endByte=this.computeEndByte(),this.xhr=null;var q=this;this.event=function(ee,Ie){Ie=Array.prototype.slice.call(arguments),Ie.unshift(q),q.fileObj.chunkEvent.apply(q.fileObj,Ie)},this.progressHandler=function(ee){ee.lengthComputable&&(q.loaded=ee.loaded,q.total=ee.total),q.event("progress",ee)},this.testHandler=function(ee){var Ie=q.status(!0);
1Ie==="error"?(q.event(Ie,q.message()),q.flowObj.uploadNextChunk()):Ie==="success"?(q.tested=!0,q.event(Ie,q.message()),q.flowObj.uploadNextChunk()):q.fileObj.paused||(q.tested=!0,q.send())},this.doneHandler=function(ee){var Ie=q.status();if(Ie==="success"||Ie==="error")delete this.data,q.event(Ie,q.message()),q.flowObj.uploadNextChunk();else if(!q.fileObj.paused){q.event("retry",q.message()),q.pendingRetry=!0,q.abort(),q.retries++;var He=q.flowObj.opts.chunkRetryInterval;He!==null?setTimeout(function(){q.send()},He):q.send()}}}s.prototype={getParams:function(){return{flowChunkNumber:this.offset+1,flowChunkSize:this.chunkSize,flowCurrentChunkSize:this.endByte-this.startByte,flowTotalSize:this.fileObj.size,flowIdentifier:this.fileObj.uniqueIdentifier,flowFilename:this.fileObj.name,flowRelativePath:this.fileObj.relativePath,flowTotalChunks:this.fileObj.chunks.length}},getTarget:function(S,F){return F.length==0?S:(S.indexOf("?")<0?S+="?":S+="&",S+F.join("&"))},test:function(){this.xhr=new XMLHttpRequest,this.xhr.addEventListener("load",this.testHandler,!1),this.xhr.addEventListener("error",this.testHandler,!1);var S=u(this.flowObj.opts.testMethod,this.fileObj,this),F=this.prepareXhrRequest(S,!0);this.xhr.send(F)},preprocessFinished:function(){this.endByte=this.computeEndByte(),this.preprocessState=2,this.send()},readFinished:function(S){this.readState=2,this.bytes=S,this.send()},send:function(){var S=this.flowObj.opts.preprocess,F=this.flowObj.opts.readFileFn;if(typeof S=="function")switch(this.preprocessState){case 0:this.preprocessState=1,S(this);return;case 1:return}switch(this.readState){case 0:this.readState=1,F(this.fileObj,this.startByte,this.endByte,this.fileObj.file.type,this);return;case 1:return}if(this.flowObj.opts.testChunks&&!this.tested){this.test();return}this.loaded=0,this.total=0,this.pendingRetry=!1,this.xhr=new XMLHttpRequest,this.xhr.upload.addEventListener("progress",this.progressHandler,!1),this.xhr.addEventListener("load",this.doneHandler,!1),this.xhr.addEventListener("error",this.doneHandler,!1);var H=u(this.flowObj.opts.uploadMethod,this.fileObj,this),q=this.prepareXhrRequest(H,!1,this.flowObj.opts.method,this.bytes),ee=this.flowObj.opts.changeRawDataBeforeSend;typeof ee=="function"&&(q=ee(this,q)),this.xhr.send(q)},abort:function(){var S=this.xhr;this.xhr=null,S&&S.abort()},status:function(S){return this.readState===1?"reading":this.pendingRetry||this.preprocessState===1?"uploading":this.xhr?this.xhr.readyState<4?"uploading":this.flowObj.opts.successStatuses.indexOf(this.xhr.status)>-1?"success":this.flowObj.opts.permanentErrors.indexOf(this.xhr.status)>-1||!S&&this.retries>=this.flowObj.opts.maxChunkRetries?"error":(this.abort(),"pending"):"pending"},message:function(){return this.xhr?this.xhr.responseText:""},progress:function(){if(this.pendingRetry)return 0;var S=this.status();return S==="success"||S==="error"?1:S==="pending"?0:this.total>0?this.loaded/this.total:0},sizeUploaded:function(){var S=this.endByte-this.startByte;return this.status()!=="success"&&(S=this.progress()*S),S},prepareXhrRequest:function(S,F,H,q){var ee=u(this.flowObj.opts.query,this.fileObj,this,F);ee=_(ee||{},this.getParams());var Ie=u(this.flowObj.opts.target,this.fileObj,this,F),He=null;if(S==="GET"||H==="octet"){var Le=[];I(ee,function(qe,ue){Le.push([encodeURIComponent(ue),encodeURIComponent(qe)].join("="))}),Ie=this.getTarget(Ie,Le),He=q||null}else He=new FormData,I(ee,function(qe,ue){He.append(ue,qe)}),typeof q<"u"&&He.append(this.flowObj.opts.fileParameterName,q,this.filename||this.fileObj.file.name);return this.xhr.open(S,Ie,!0),this.xhr.withCredentials=this.flowObj.opts.withCredentials,I(u(this.flowObj.opts.headers,this.fileObj,this,F),function(qe,ue){this.xhr.setRequestHeader(ue,qe)},this),He}};function c(S,F){var H=S.indexOf(F);H>-1&&S.splice(H,1)}function u(S,F){return typeof S=="function"&&(F=Array.prototype.slice.call(arguments),S=S.apply(null,F.slice(1))),S}i.evalOpts=u;function f(S,F){setTimeout(S.bind(F),0)}function _(S,F){return I(arguments,function(H){H!==S&&I(H,function(q,ee){S[ee]=q})}),S}i.extend=_;function I(S,F,H){if(S){var q;if(typeof S.length<"u"){for(q=0;q<S.length;q++)if(F.call(H,S[q],q)===!1)return}else for(q in S)if(S.hasOwnProperty(q)&&F.call(H,S[q],q)===!1)return}}i.each=I,i.FlowFile=o,i.FlowChunk=s,i.version="<%= version %>",typeof RC=="object"&&RC&&typeof RC.exports=="object"?RC.exports=i:(n.Flow=i,typeof define=="function"&&define.amd&&define("flow",[],function(){return i}))})(typeof window<"u"&&window,typeof document<"u"&&document)});var NE=rf((ent,FE)=>{y();(function(n,t,r){if(!n)return;for(var e={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},i={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},s,c=1;c<20;++c)e[111+c]="f"+c;for(c=0;c<=9;++c)e[c+96]=c.toString();function u(ue,Ne,st){if(ue.addEventListener){ue.addEventListener(Ne,st,!1);return}ue.attachEvent("on"+Ne,st)}function f(ue){if(ue.type=="keypress"){var Ne=String.fromCharCode(ue.which);return ue.shiftKey||(Ne=Ne.toLowerCase()),Ne}return e[ue.which]?e[ue.which]:i[ue.which]?i[ue.which]:String.fromCharCode(ue.which).toLowerCase()}function _(ue,Ne){return ue.sort().join(",")===Ne.sort().join(",")}function I(ue){var Ne=[];return ue.shiftKey&&Ne.push("shift"),ue.altKey&&Ne.push("alt"),ue.ctrlKey&&Ne.push("ctrl"),ue.metaKey&&Ne.push("meta"),Ne}function S(ue){if(ue.preventDefault){ue.preventDefault();return}ue.returnValue=!1}function F(ue){if(ue.stopPropagation){ue.stopPropagation();return}ue.cancelBubble=!0}function H(ue){return ue=="shift"||ue=="ctrl"||ue=="alt"||ue=="meta"}function q(){if(!s){s={};for(var ue in e)ue>95&&ue<112||e.hasOwnProperty(ue)&&(s[e[ue]]=ue)}return s}function ee(ue,Ne,st){return st||(st=q()[ue]?"keydown":"keypress"),st=="keypress"&&Ne.length&&(st="keydown"),st}function Ie(ue){return ue==="+"?["+"]:(ue=ue.replace(/\+{2}/g,"+plus"),ue.split("+"))}function He(ue,Ne){var st,Ui,Oe,wt=[];for(st=Ie(ue),Oe=0;Oe<st.length;++Oe)Ui=st[Oe],a[Ui]&&(Ui=a[Ui]),Ne&&Ne!="keypress"&&o[Ui]&&(Ui=o[Ui],wt.push("shift")),H(Ui)&&wt.push(Ui);return Ne=ee(Ui,wt,Ne),{key:Ui,modifiers:wt,action:Ne}}function Le(ue,Ne){return ue===null||ue===t?!1:ue===Ne?!0:Le(ue.parentNode,Ne)}function qe(ue){var Ne=this;if(ue=ue||t,!(Ne instanceof qe))return new qe(ue);Ne.target=ue,Ne._callbacks={},Ne._directMap={};var st={},Ui,Oe=!1,wt=!1,ei=!1;function wi(li){li=li||{};var rn=!1,ji;for(ji in st){if(li[ji]){rn=!0;continue}st[ji]=0}rn||(ei=!1)}function pn(li,rn,ji,Gt,di,er){var Ln,gn,Cr=[],cr=ji.type;if(!Ne._callbacks[li])return[];
1for(cr=="keyup"&&H(li)&&(rn=[li]),Ln=0;Ln<Ne._callbacks[li].length;++Ln)if(gn=Ne._callbacks[li][Ln],!(!Gt&&gn.seq&&st[gn.seq]!=gn.level)&&cr==gn.action&&(cr=="keypress"&&!ji.metaKey&&!ji.ctrlKey||_(rn,gn.modifiers))){var Vs=!Gt&&gn.combo==di,bn=Gt&&gn.seq==Gt&&gn.level==er;(Vs||bn)&&Ne._callbacks[li].splice(Ln,1),Cr.push(gn)}return Cr}function Ki(li,rn,ji,Gt){Ne.stopCallback(rn,rn.target||rn.srcElement,ji,Gt)||li(rn,ji)===!1&&(S(rn),F(rn))}Ne._handleKey=function(li,rn,ji){var Gt=pn(li,rn,ji),di,er={},Ln=0,gn=!1;for(di=0;di<Gt.length;++di)Gt[di].seq&&(Ln=Math.max(Ln,Gt[di].level));for(di=0;di<Gt.length;++di){if(Gt[di].seq){if(Gt[di].level!=Ln)continue;gn=!0,er[Gt[di].seq]=1,Ki(Gt[di].callback,ji,Gt[di].combo,Gt[di].seq);continue}gn||Ki(Gt[di].callback,ji,Gt[di].combo)}var Cr=ji.type=="keypress"&&wt;ji.type==ei&&!H(li)&&!Cr&&wi(er),wt=gn&&ji.type=="keydown"};function It(li){typeof li.which!="number"&&(li.which=li.keyCode);var rn=f(li);if(rn){if(li.type=="keyup"&&Oe===rn){Oe=!1;return}Ne.handleKey(rn,I(li),li)}}function ai(){clearTimeout(Ui),Ui=setTimeout(wi,1e3)}function ti(li,rn,ji,Gt){st[li]=0;function di(cr){return function(){ei=cr,++st[li],ai()}}function er(cr){Ki(ji,cr,li),Gt!=="keyup"&&(Oe=f(cr)),setTimeout(wi,10)}for(var Ln=0;Ln<rn.length;++Ln){var gn=Ln+1===rn.length,Cr=gn?er:di(Gt||He(rn[Ln+1]).action);ri(rn[Ln],Cr,Gt,li,Ln)}}function ri(li,rn,ji,Gt,di){Ne._directMap[li+":"+ji]=rn,li=li.replace(/\s+/g," ");var er=li.split(" "),Ln;if(er.length>1){ti(li,er,rn,ji);return}Ln=He(li,ji),Ne._callbacks[Ln.key]=Ne._callbacks[Ln.key]||[],pn(Ln.key,Ln.modifiers,{type:Ln.action},Gt,li,di),Ne._callbacks[Ln.key][Gt?"unshift":"push"]({callback:rn,modifiers:Ln.modifiers,action:Ln.action,seq:Gt,level:di,combo:li})}Ne._bindMultiple=function(li,rn,ji){for(var Gt=0;Gt<li.length;++Gt)ri(li[Gt],rn,ji)},u(ue,"keypress",It),u(ue,"keydown",It),u(ue,"keyup",It)}qe.prototype.bind=function(ue,Ne,st){var Ui=this;return ue=ue instanceof Array?ue:[ue],Ui._bindMultiple.call(Ui,ue,Ne,st),Ui},qe.prototype.unbind=function(ue,Ne){var st=this;return st.bind.call(st,ue,function(){},Ne)},qe.prototype.trigger=function(ue,Ne){var st=this;return st._directMap[ue+":"+Ne]&&st._directMap[ue+":"+Ne]({},ue),st},qe.prototype.reset=function(){var ue=this;return ue._callbacks={},ue._directMap={},ue},qe.prototype.stopCallback=function(ue,Ne){var st=this;if((" "+Ne.className+" ").indexOf(" mousetrap ")>-1||Le(Ne,st.target))return!1;if("composedPath"in ue&&typeof ue.composedPath=="function"){var Ui=ue.composedPath()[0];Ui!==ue.target&&(Ne=Ui)}return Ne.tagName=="INPUT"||Ne.tagName=="SELECT"||Ne.tagName=="TEXTAREA"||Ne.isContentEditable},qe.prototype.handleKey=function(){var ue=this;return ue._handleKey.apply(ue,arguments)},qe.addKeycodes=function(ue){for(var Ne in ue)ue.hasOwnProperty(Ne)&&(e[Ne]=ue[Ne]);s=null},qe.init=function(){var ue=qe(t);for(var Ne in ue)Ne.charAt(0)!=="_"&&(qe[Ne]=function(st){return function(){return ue[st].apply(ue,arguments)}}(Ne))},qe.init(),n.Mousetrap=qe,typeof FE<"u"&&FE.exports&&(FE.exports=qe),typeof define=="function"&&define.amd&&define(function(){return qe})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var BQ=rf((tfi,LQ)=>{y();LQ.exports=function n(t){Object.freeze(t);var r=typeof t=="function",e=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(t).forEach(function(i){e.call(t,i)&&(!r||i!=="caller"&&i!=="callee"&&i!=="arguments")&&t[i]!==null&&(typeof t[i]=="object"||typeof t[i]=="function")&&!Object.isFrozen(t[i])&&n(t[i])}),t}});var nK=rf((LL,BL)=>{y();(function(n,t){typeof LL=="object"&&typeof BL<"u"?BL.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.MessageFormat=t())})(LL,function(){"use strict";var n=function(){return n=Object.assign||function(E){for(var k,A=1,P=arguments.length;A<P;A++){k=arguments[A];for(var U in k)Object.prototype.hasOwnProperty.call(k,U)&&(E[U]=k[U])}return E},n.apply(this,arguments)};function t(w){var E=typeof Symbol=="function"&&Symbol.iterator,k=E&&w[E],A=0;if(k)return k.call(w);if(w&&typeof w.length=="number")return{next:function(){return w&&A>=w.length&&(w=void 0),{value:w&&w[A++],done:!w}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(w,E){var k=typeof Symbol=="function"&&w[Symbol.iterator];if(!k)return w;var A=k.call(w),P,U=[],oe;try{for(;(E===void 0||E-- >0)&&!(P=A.next()).done;)U.push(P.value)}catch(Ee){oe={error:Ee}}finally{try{P&&!P.done&&(k=A.return)&&k.call(A)}finally{if(oe)throw oe.error}}return U}function e(w,E,k){if(k||arguments.length===2)for(var A=0,P=E.length,U;A<P;A++)(U||!(A in E))&&(U||(U=Array.prototype.slice.call(E,0,A)),U[A]=E[A]);return w.concat(U||Array.prototype.slice.call(E))}typeof SuppressedError=="function"&&SuppressedError;
1class i extends Error{constructor(E,k,A){super(E),this.token=k,this.type=A||"error"}}let o=w=>w<4?"short":w===4?"long":"narrow",a=w=>w%2===0?"2-digit":"numeric";function s(w,E){switch(w.char){case"y":return{year:a(w.width)};case"r":return{calendar:"gregory",year:"numeric"};case"u":case"U":case"Y":default:return E(`${w.desc} is not supported; falling back to year:numeric`,i.WARNING),{year:"numeric"}}}function c(w,E){switch(w.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:E(`${w.desc} is not supported with width ${w.width}`);return}}function u(w,E){let{char:k,desc:A,width:P}=w;if(k==="d")return a(P);E(`${A} is not supported`)}function f(w,E){let{char:k,desc:A,width:P}=w;if((k==="c"||k==="e")&&P<3){let U=`Numeric value is not supported for ${A}; falling back to weekday:short`;E(U,i.WARNING)}return o(P)}function _(w){let E=a(w.width),k;switch(w.char){case"h":k="h12";break;case"H":k="h23";break;case"k":k="h24";break;case"K":k="h11";break}return k?{hour:E,hourCycle:k}:{hour:E}}function I(w,E){let{char:k,desc:A,width:P}=w;switch(k){case"v":case"z":return P===4?"long":"short";case"V":if(P===4)return"long";E(`${A} is not supported with width ${P}`);return;case"X":E(`${A} is not supported`);return}return"short"}function S(w,E){switch(w.field){case"era":return{era:o(w.width)};case"year":return s(w,E);case"month":return{month:c(w,E)};case"day":return{day:u(w,E)};case"weekday":return{weekday:f(w,E)};case"period":return;case"hour":return _(w);case"min":return{minute:a(w.width)};case"sec":return{second:a(w.width)};case"tz":return{timeZoneName:I(w,E)};case"quarter":case"week":case"sec-frac":case"ms":E(`${w.desc} is not supported`)}}function F(w,E){let k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U=>{throw U},A={timeZone:E},P=[];for(let U of w){let{error:oe,field:Ee,str:Ye}=U;if(oe){let nn=new i(oe.message,U);nn.stack=oe.stack,k(nn)}if(Ye){let nn=`Ignoring string part: ${Ye}`;k(new i(nn,U,i.WARNING))}Ee&&(P.indexOf(Ee)===-1?P.push(Ee):k(new i(`Duplicate ${Ee} token`,U)));let Kt=S(U,(nn,Bn)=>k(new i(nn,U,Bn)));Kt&&Object.assign(A,Kt)}return A}let H={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},q=w=>w>="A"&&w<="Z"||w>="a"&&w<="z";function ee(w,E){let k=w[E],A=1;for(;w[++E]===k;)++A;let P=H[k];if(!P){let U=`The letter ${k} is not a valid field identifier`;return{char:k,error:new Error(U),width:A}}return{char:k,field:P.field,desc:P.desc,width:A}}function Ie(w,E){let k=w[++E],A=2;if(k==="'")return{char:"'",str:k,width:A};for(;;){let P=w[++E];if(++A,P===void 0){let U=`Unterminated quoted literal in pattern: ${k||w}`;return{char:"'",error:new Error(U),str:k,width:A}}else if(P==="'"){if(w[++E]!=="'")return{char:"'",str:k,width:A};++A}k+=P}}function He(w,E){let k=w[E];if(!k)return null;if(q(k))return ee(w,E);if(k==="'")return Ie(w,E);let A=k,P=1;for(;;){let U=w[++E];if(!U||q(U)||U==="'")return{char:k,str:A,width:P};A+=U,P+=1}}function Le(w){let E=[],k=0;for(;;){let A=He(w,k);if(!A)return E;E.push(A),k+=A.width}}function qe(w,E,k,A){typeof E=="string"&&(E=Le(E)),typeof k=="function"&&(A=k,k=void 0);let P=F(E,k,A),U=new Intl.DateTimeFormat(w,P);return oe=>
1U.format(oe)}function ue(w,E,k,A){typeof E=="string"&&(E=Le(E)),typeof k=="function"&&(A=k,k=void 0);let P=F(E,k,A);return["(function() {",`var opt = ${JSON.stringify(P)};`,`var dtf = new Intl.DateTimeFormat(${JSON.stringify(w)}, opt);`,"return function(value) { return dtf.format(value); }"].join(`
2  `)+`
3})()`}class Ne extends Error{constructor(E,k){super(k),this.code=E}}class st extends Ne{constructor(E,k){super("BAD_OPTION",`Unknown ${E} option: ${k}`),this.stem=E,this.option=k}}class Ui extends Ne{constructor(E){super("BAD_STEM",`Unknown stem: ${E}`),this.stem=E}}class Oe extends Ne{constructor(E,k){super("MASKED_VALUE",`Value for ${E} is set multiple times`),this.type=E,this.prev=k}}class wt extends Ne{constructor(E){super("MISSING_OPTION",`Required option missing for ${E}`),this.stem=E}}class ei extends Ne{constructor(E,k){super("BAD_PATTERN",k),this.char=E}}class wi extends Ne{constructor(E,k,A){let P=A>1?`${A} options`:"one option";super("TOO_MANY_OPTIONS",`Token ${E} only supports ${P} (got ${k.length})`),this.stem=E,this.options=k}}class pn extends Ne{constructor(E,k){super("UNSUPPORTED",`The stem ${E} is not supported`),this.stem=E,k&&(this.message+=` with value ${k}`,this.source=k)}}function Ki(w,E){let{numberingSystem:k}=E;return Array.isArray(w)||(w=[w]),k?w.map(A=>{let P=A.indexOf("-u-")===-1?"u-nu":"nu";return`${A}-${P}-${k}`}).concat(w):w}function It(w,E){let k=+w+E/2;return k-k%+E}function ai(w){let{scale:E,unit:k}=w,A=typeof E=="number"&&E>=0?E:1;return k&&k.style==="percent"&&(A*=.01),A}function ti(w){let E=ai(w),{precision:k}=w;return k&&k.style==="precision-increment"?A=>It(A,k.increment)*E:A=>A*E}function ri(w){let E=ai(w),{precision:k}=w;if(k&&k.style==="precision-increment"){let A=`+n + ${k.increment/2}`,P=`x - (x % +${k.increment})`;return E!==1&&(P=`(${P}) * ${E}`),`function(n) { var x = ${A}; return ${P}; }`}return E!==1?`function(n) { return n * ${E}; }`:null}function li(w,E){let{decimal:k,group:A,integerWidth:P,notation:U,precision:oe,roundingMode:Ee,sign:Ye,unit:Kt,unitPer:nn,unitWidth:Bn}=w,Zn=(so,Do)=>{E&&E(new pn(so,Do))},Ii={};if(Kt)switch(Kt.style){case"base-unit":Ii.style="decimal";break;case"currency":Ii.style="currency",Ii.currency=Kt.currency;break;case"measure-unit":Ii.style="unit",Ii.unit=Kt.unit.replace(/.*-/,""),nn&&(Ii.unit+="-per-"+nn.replace(/.*-/,""));break;case"percent":Ii.style="percent";break;case"permille":Zn("permille");break}switch(Bn){case"unit-width-full-name":Ii.currencyDisplay="name",Ii.unitDisplay="long";break;case"unit-width-hidden":Zn(Bn);break;case"unit-width-iso-code":Ii.currencyDisplay="code";break;case"unit-width-narrow":Ii.currencyDisplay="narrowSymbol",Ii.unitDisplay="narrow";break;case"unit-width-short":Ii.currencyDisplay="symbol",Ii.unitDisplay="short";break}switch(A){case"group-off":Ii.useGrouping=!1;break;case"group-auto":Ii.useGrouping=!0;break;case"group-min2":case"group-on-aligned":case"group-thousands":Zn(A),Ii.useGrouping=!0;break}if(oe)switch(oe.style){case"precision-fraction":{let{minFraction:so,maxFraction:Do,minSignificant:Zo,maxSignificant:ys,source:oc}=oe;typeof so=="number"&&(Ii.minimumFractionDigits=so,typeof Zo=="number"&&Zn("precision-fraction",oc)),typeof Do=="number"&&(Ii.maximumFractionDigits=Do),typeof Zo=="number"&&(Ii.minimumSignificantDigits=Zo),typeof ys=="number"&&(Ii.maximumSignificantDigits=ys);break}case"precision-integer":Ii.maximumFractionDigits=0;break;case"precision-unlimited":Ii.maximumFractionDigits=20;break;case"precision-increment":break;case"precision-currency-standard":Ii.trailingZeroDisplay=oe.trailingZero;break;case"precision-currency-cash":Zn(oe.style);break}if(U)switch(U.style){case"compact-short":Ii.notation="compact",Ii.compactDisplay="short";break;case"compact-long":Ii.notation="compact",Ii.compactDisplay="long";break;case"notation-simple":Ii.notation="standard";break;case"scientific":case"engineering":{let{expDigits:so,expSign:Do,source:Zo,style:ys}=U;Ii.notation=ys,(so&&so>1||Do&&Do!=="sign-auto")&&Zn(ys,Zo);break}}if(P){let{min:so,max:Do,source:Zo}=P;if(so>0&&(Ii.minimumIntegerDigits=so),Number(Do)>0){let ys=Ii.notation==="engineering"||Ii.notation==="scientific";Do===3&&ys?Ii.notation="engineering":Zn("integer-width",Zo)}}switch(Ye){case"sign-auto":Ii.signDisplay="auto";break;case"sign-always":Ii.signDisplay="always";break;case"sign-except-zero":Ii.signDisplay="exceptZero";break;case"sign-never":Ii.signDisplay="never";break;case"sign-accounting":Ii.currencySign="accounting";break;case"sign-accounting-always":Ii.currencySign="accounting",Ii.signDisplay="always";break;case"sign-accounting-except-zero":Ii.currencySign="accounting",Ii.signDisplay="exceptZero";break}return k==="decimal-always"&&Zn(k),Ee&&Zn(Ee),Ii}function rn(w,E,k){let A=w[E];switch(A){case"%":return{char:"%",style:"percent",width:1};case"\u2030":return{char:"%",style:"permille",width:1};case"\xA4":{let P=1;for(;w[++E]==="\xA4";)++P;switch(P){case 1:return{char:A,currency:"default",width:P};case 2:return{char:A,currency:"iso-code",width:P};case 3:return{char:A,currency:"full-name",width:P};case 5:return{char:A,currency:"narrow",width:P};default:{let U=`Invalid number (${P}) of \xA4 chars in pattern`;return k(new ei("\xA4",U)),null}}}case"*":{let P=w[E+1];if(P)return{char:A,pad:P,width:2};break}case"+":case"-":return{char:A,width:1};case"'":{let P=w[++E],U=2;if(P==="'")return{char:A,str:P,width:U};for(;;){let oe=w[++E];if(++U,oe===void 0){let Ee=`Unterminated quoted literal in pattern: ${P}`;return k(new ei("'",Ee)),{char:A,str:P,width:U}}else if(oe==="'"){if(w[++E]!=="'")return{char:A,str:P,width:U};++U}P+=oe}}}return null}let ji=w=>w>="0"&&w<="9";function Gt(w,E){let k=w[E];if(ji(k)){let A=k;for(;;){let P=w[++E];if(ji(P))A+=P;else return{char:"0",digits:A,width:A.length}}}switch(k){case"#":{let A=1;for(;w[++E]==="#";)++A;return{char:k,width:A}}case"@":{let A=1;for(;w[++E]==="@";)++A;let P=A;for(E-=1;w[++E]==="#";)++P;return{char:k,min:A,width:P}}case"E":{let A=w[E+1]==="+";A&&++E;let P=0;for(;w[++E]==="0";)++P;let U=(A?2:1)+P;if(P)return{char:k,expDigits:P,plus:A,width:U};break}case".":case",":return{char:k,width:1}}return null}function di(w,E,k){let A;(function(Kt){Kt[Kt.Prefix=0]="Prefix",Kt[Kt.Number=1]="Number",Kt[Kt.Suffix=2]="Suffix"})(A||(A={}));let P=[],U=[],oe=[],Ee=A.Prefix,Ye="";for(;E<w.length;){let Kt=w[E];if(Kt===";"){E+=1;break}switch(Ee){case A.Prefix:{let nn=rn(w,E,k);if(nn)Ye&&(P.push({char:"'",str:Ye,width:Ye.length}),Ye=""),P.push(nn),E+=nn.width;else{let Bn=Gt(w,E);Bn?(Ye&&(P.push({char:"'",str:Ye,width:Ye.length}),Ye=""),Ee=A.Number,U.push(Bn),E+=Bn.width):(Ye+=Kt,E+=1)}break}case A.Number:{let nn=Gt(w,E);nn?(U.push(nn),E+=nn.width):Ee=A.Suffix;break}case A.Suffix:{let nn=rn(w,E,k);nn?(Ye&&(oe.push({char:"'",str:Ye,width:Ye.length}),Ye=""),oe.push(nn),E+=nn.width):(Ye+=Kt,E+=1);break}}}return Ye&&oe.push({char:"'",str:Ye,width:Ye.length}),{pattern:{prefix:P,number:U,suffix:oe},pos:E}}function er(w,E){let{pattern:k,pos:A}=di(w,0,E);if(A<w.length){let{pattern:P}=di(w,A,E);return{tokens:k,negative:P}}return{tokens:k}}function Ln(w,E){let k={},A=!1,P=!1,U=0,oe="",Ee=-1,Ye="",Kt=0;for(let Bn=0;Bn<w.length;++Bn){let Zn=w[Bn];switch(Zn.char){case"#":{if(Ee===-1){if(oe){let Ii="Pattern has # after integer digits";E(new ei("#",Ii))}U+=Zn.width}else Kt+=Zn.width;break}case"0":{if(Ee===-1)oe+=Zn.digits;else{if(Kt){let Ii="Pattern has digits after # in fraction";E(new ei("0",Ii))}Ye+=Zn.digits}break}case"@":{k.precision&&E(new Oe("precision",k.precision)),k.precision={style:"precision-fraction",minSignificant:Zn.min,maxSignificant:Zn.width};break}case",":A=!0;break;case".":if(Ee===1){let Ii="Pattern has more than one decimal separator";E(new ei(".",Ii))}Ee=Bn;break;case"E":{if(P&&E(new Oe("exponent",k.notation)),A){let Ii="Exponential patterns may not contain grouping separators";E(new ei("E",Ii))}k.notation={style:"scientific"},Zn.expDigits>1&&(k.notation.expDigits=Zn.expDigits),Zn.plus&&(k.notation.expSign="sign-always"),P=!0}}}A?k.group="group-auto":U+oe.length>3&&(k.group="group-off");let nn=+`${oe||"0"}.${Ye}`;if(nn&&(k.precision={style:"precision-increment",increment:nn}),!P)oe.length>1&&(k.integerWidth={min:oe.length}),!k.precision&&(Ye.length||Kt)&&(k.precision={style:"precision-fraction",minFraction:Ye.length,maxFraction:Ye.length+Kt});else if((!k.precision||nn)&&(k.integerWidth=U?{min:1,max:U+oe.length}:{min:Math.max(1,oe.length)}),k.precision)nn||(k.integerWidth={min:1,max:1});else{let Bn=oe.length+Ye.length;Ee===-1?Bn>0&&(k.precision={style:"precision-fraction",maxSignificant:Bn}):(k.precision={style:"precision-fraction",maxSignificant:Math.max(1,Bn)+Kt},Bn>1&&(k.precision.minSignificant=Bn))}return k}function gn(w,E,k,A,P){let U=!1,oe="";for(let Ee of w)switch(Ee.char){case"%":E.unit={style:Ee.style},P?U=!0:oe="";break;case"\xA4":if(!k){let Ye="The \xA4 pattern requires a currency";A(new ei("\xA4",Ye));break}switch(E.unit={style:"currency",currency:k},Ee.currency){case"iso-code":E.unitWidth="unit-width-iso-code";break;case"full-name":E.unitWidth="unit-width-full-name";break;case"narrow":E.unitWidth="unit-width-narrow";break}P?U=!0:oe="";break;case"*":break;case"+":U||(oe+="+");break;case"'":U||(oe+=Ee.str);break}return oe}function Cr(w,E){let k=!1,A="";for(let P of w)switch(P.char){case"%":case"\xA4":E?k=!0:A="";break;case"-":k||(A+="-");break;case"'":k||(A+=P.str);break}return A}function cr(w,E){let k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ye=>{throw Ye},{tokens:A,negative:P}=er(w,k),U=Ln(A.number,k),oe=gn(A.prefix,U,E,k,!0),Ee=gn(A.suffix,U,E,k,!1);if(P){let Ye=Cr(P.prefix,!0),Kt=Cr(P.suffix,!1);U.affix={pos:[oe,Ee],neg:[Ye,Kt]},U.sign="sign-never"}else(oe||Ee)&&(U.affix={pos:[oe,Ee]});return U}function Vs(w){return["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"].indexOf(w)!==-1}function bn(w){let E=["acceleration","angle","area","concentr","consumption","digital","duration","electric","energy","force","frequency","graphics","length","light","mass","power","pressure","speed","temperature","torque","volume"],[k]=w.split("-",1);return E.indexOf(k)!==-1}let Rd={"compact-short":0,"compact-long":0,"notation-simple":0,scientific:2,engineering:2,percent:0,permille:0,"base-unit":0,currency:1,"measure-unit":1,"per-measure-unit":1,"unit-width-narrow":0,"unit-width-short":0,"unit-width-full-name":0,"unit-width-iso-code":0,"unit-width-hidden":0,"precision-integer":0,"precision-unlimited":0,"precision-currency-standard":1,"precision-currency-cash":0,"precision-increment":1,"rounding-mode-ceiling":0,"rounding-mode-floor":0,"rounding-mode-down":0,"rounding-mode-up":0,"rounding-mode-half-even":0,"rounding-mode-half-down":0,"rounding-mode-half-up":0,"rounding-mode-unnecessary":0,"integer-width":1,scale:1,"group-off":0,"group-min2":0,"group-auto":0,"group-on-aligned":0,"group-thousands":0,latin:0,"numbering-system":1,"sign-auto":0,"sign-always":0,"sign-never":0,"sign-accounting":0,"sign-accounting-always":0,"sign-except-zero":0,"sign-accounting-except-zero":0,"decimal-auto":0,"decimal-always":0},Fd={currency:1,"integer-width":1,"measure-unit":1,"numbering-system":1,"per-measure-unit":1,"precision-increment":1,scale:1};function Ry(w){return w in Rd}function Fy(w){return w in Fd}function Z0(w,E,k){if(Ry(w)){let A=Rd[w];if(E.length>A){if(A===0)for(let P of E)k(new st(w,P));else k(new wi(w,E,A));return!1}
3else if(Fy(w)&&E.length<Fd[w])return k(new wt(w)),!1}return!0}function pu(w,E){let k=E==="fraction"?/^\.(0*)(\+|#*)$/:/^(@+)(\+|#*)$/,A=w&&w.match(k);if(A){let P=A[1].length;switch(A[2].charAt(0)){case"":return{min:P,max:P};case"+":return{min:P,max:null};case"#":return{min:P,max:P+A[2].length}}}return null}function Gx(w,E,k){let A=pu(w,"fraction");if(A){E.length>1&&k(new wi(w,E,1));let U={style:"precision-fraction",source:w,minFraction:A.min};A.max!=null&&(U.maxFraction=A.max);let oe=E[0],Ee=pu(oe,"significant");return Ee?(U.source=`${w}/${oe}`,U.minSignificant=Ee.min,Ee.max!=null&&(U.maxSignificant=Ee.max)):oe&&k(new st(w,oe)),U}let P=pu(w,"significant");if(P){for(let oe of E)k(new st(w,oe));let U={style:"precision-fraction",source:w,minSignificant:P.min};return P.max!=null&&(U.maxSignificant=P.max),U}return null}class Ny{constructor(E){this.skeleton={},this.onError=E}badOption(E,k){this.onError(new st(E,k))}assertEmpty(E){let k=this.skeleton[E];k&&this.onError(new Oe(E,k))}parseToken(E,k){if(!Z0(E,k,this.onError))return;let A=k[0],P=this.skeleton;switch(E){case"compact-short":case"compact-long":case"notation-simple":this.assertEmpty("notation"),P.notation={style:E};break;case"scientific":case"engineering":{let U=null,oe;for(let Ye of k)switch(Ye){case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":oe=Ye;break;default:/^\+e+$/.test(Ye)?U=Ye.length-1:this.badOption(E,Ye)}this.assertEmpty("notation");let Ee=k.join("/");P.notation=U&&oe?{style:E,source:Ee,expDigits:U,expSign:oe}:U?{style:E,source:Ee,expDigits:U}:oe?{style:E,source:Ee,expSign:oe}:{style:E,source:Ee};break}case"percent":case"permille":case"base-unit":this.assertEmpty("unit"),P.unit={style:E};break;case"currency":/^[A-Z]{3}$/.test(A)?(this.assertEmpty("unit"),P.unit={style:E,currency:A}):this.badOption(E,A);break;case"measure-unit":{bn(A)?(this.assertEmpty("unit"),P.unit={style:E,unit:A}):this.badOption(E,A);break}case"per-measure-unit":{bn(A)?(this.assertEmpty("unitPer"),P.unitPer=A):this.badOption(E,A);break}case"unit-width-narrow":case"unit-width-short":case"unit-width-full-name":case"unit-width-iso-code":case"unit-width-hidden":this.assertEmpty("unitWidth"),P.unitWidth=E;break;case"precision-integer":case"precision-unlimited":case"precision-currency-cash":this.assertEmpty("precision"),P.precision={style:E};break;case"precision-currency-standard":this.assertEmpty("precision"),A==="w"?P.precision={style:E,trailingZero:"stripIfInteger"}:P.precision={style:E};break;case"precision-increment":{let U=Number(A);U>0?(this.assertEmpty("precision"),P.precision={style:E,increment:U}):this.badOption(E,A);break}case"rounding-mode-ceiling":case"rounding-mode-floor":case"rounding-mode-down":case"rounding-mode-up":case"rounding-mode-half-even":case"rounding-mode-half-odd":case"rounding-mode-half-ceiling":case"rounding-mode-half-floor":case"rounding-mode-half-down":case"rounding-mode-half-up":case"rounding-mode-unnecessary":this.assertEmpty("roundingMode"),P.roundingMode=E;break;case"integer-width":{if(/^\+0*$/.test(A))this.assertEmpty("integerWidth"),P.integerWidth={source:A,min:A.length-1};else{let U=A.match(/^#*(0*)$/);U?(this.assertEmpty("integerWidth"),P.integerWidth={source:A,min:U[1].length,max:U[0].length}):this.badOption(E,A)}break}case"scale":{let U=Number(A);U>0?(this.assertEmpty("scale"),P.scale=U):this.badOption(E,A);break}case"group-off":case"group-min2":case"group-auto":case"group-on-aligned":case"group-thousands":this.assertEmpty("group"),P.group=E;break;case"latin":this.assertEmpty("numberingSystem"),P.numberingSystem="latn";break;case"numbering-system":{Vs(A)?(this.assertEmpty("numberingSystem"),P.numberingSystem=A):this.badOption(E,A);break}case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":this.assertEmpty("sign"),P.sign=E;break;case"decimal-auto":case"decimal-always":this.assertEmpty("decimal"),P.decimal=E;break;default:{let U=Gx(E,k,this.onError);U?(this.assertEmpty("precision"),P.precision=U):this.onError(new 
3Ui(E))}}}}function Vy(w){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P=>{throw P},k=[];for(let P of w.split(" "))if(P){let U=P.split("/"),oe=U.shift()||"";k.push({stem:oe,options:U})}let A=new Ny(E);for(let{stem:P,options:U}of k)A.parseToken(P,U);return A.skeleton}function zx(w,E,k,A){typeof E=="string"&&(E=E.indexOf("::")===0?Vy(E.slice(2),A):cr(E,k,A));let P=Ki(w,E),U=li(E,A),oe=ti(E),Ee=new Intl.NumberFormat(P,U);if(E.affix){let[Ye,Kt]=E.affix.pos,[nn,Bn]=E.affix.neg||["",""];return Zn=>{let Ii=Ee.format(oe(Zn));return Zn<0?`${nn}${Ii}${Bn}`:`${Ye}${Ii}${Kt}`}}return Ye=>Ee.format(oe(Ye))}function qM(w,E,k,A){typeof E=="string"&&(E=E.indexOf("::")===0?Vy(E.slice(2),A):cr(E,k,A));let P=Ki(w,E),U=li(E,A),oe=ri(E),Ee=["(function() {",`var opt = ${JSON.stringify(U)};`,`var nf = new Intl.NumberFormat(${JSON.stringify(P)}, opt);`],Ye="nf.format(value)";if(oe&&(Ee.push(`var mod = ${oe};`),Ye="nf.format(mod(value))"),E.affix){let[Kt,nn]=E.affix.pos.map(Bn=>JSON.stringify(Bn));if(E.affix.neg){let[Bn,Zn]=E.affix.neg.map(Ii=>JSON.stringify(Ii));Ye=`value < 0 ? ${Bn} + ${Ye} + ${Zn} : ${Kt} + ${Ye} + ${nn}`}else Ye=`${Kt} + ${Ye} + ${nn}`}return Ee.push(`return function(value) { return ${Ye}; }`),Ee.join(`
4  `)+`
5})()`}var nc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function WM(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}var Zh={},$x={},Ux={exports:{}};(function(w){(function(E,k){w.exports?w.exports=k():E.moo=k()})(nc,function(){var E=Object.prototype.hasOwnProperty,k=Object.prototype.toString,A=typeof new RegExp().sticky=="boolean";function P(nt){return nt&&k.call(nt)==="[object RegExp]"}function U(nt){return nt&&typeof nt=="object"&&!P(nt)&&!Array.isArray(nt)}function oe(nt){return nt.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ee(nt){var pi=new RegExp("|"+nt);return pi.exec("").length-1}function Ye(nt){return"("+nt+")"}function Kt(nt){if(!nt.length)return"(?!)";var pi=nt.map(function(Hi){return"(?:"+Hi+")"}).join("|");return"(?:"+pi+")"}function nn(nt){if(typeof nt=="string")return"(?:"+oe(nt)+")";if(P(nt)){if(nt.ignoreCase)throw new Error("RegExp /i flag not allowed");if(nt.global)throw new Error("RegExp /g flag is implied");if(nt.sticky)throw new Error("RegExp /y flag is implied");if(nt.multiline)throw new Error("RegExp /m flag is implied");return nt.source}else throw new Error("Not a pattern: "+nt)}function Bn(nt,pi){return nt.length>pi?nt:Array(pi-nt.length+1).join(" ")+nt}function Zn(nt,pi){for(var Hi=nt.length,Cn=0;;){var pr=nt.lastIndexOf(`
6`,Hi-1);if(pr===-1||(Cn++,Hi=pr,Cn===pi)||Hi===0)break}var jn=Cn<pi?0:Hi+1;return nt.substring(jn).split(`
7`)}function Ii(nt){for(var pi=Object.getOwnPropertyNames(nt),Hi=[],Cn=0;Cn<pi.length;Cn++){var pr=pi[Cn],jn=nt[pr],wr=[].concat(jn);if(pr==="include"){for(var Mo=0;Mo<wr.length;Mo++)Hi.push({include:wr[Mo]});continue}var qr=[];wr.forEach(function(tr){U(tr)?(qr.length&&Hi.push(Do(pr,qr)),Hi.push(Do(pr,tr)),qr=[]):qr.push(tr)}),qr.length&&Hi.push(Do(pr,qr))}return Hi}function so(nt){for(var pi=[],Hi=0;Hi<nt.length;Hi++){var Cn=nt[Hi];if(Cn.include){for(var pr=[].concat(Cn.include),jn=0;jn<pr.length;jn++)pi.push({include:pr[jn]});continue}if(!Cn.type)throw new Error("Rule has no type: "+JSON.stringify(Cn));pi.push(Do(Cn.type,Cn))}return pi}function Do(nt,pi){if(U(pi)||(pi={match:pi}),pi.include)throw new Error("Matching rules cannot also include states");var Hi={defaultType:nt,lineBreaks:!!pi.error||!!pi.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var Cn in pi)E.call(pi,Cn)&&(Hi[Cn]=pi[Cn]);if(typeof Hi.type=="string"&&nt!==Hi.type)throw new Error("Type transform cannot be a string (type '"+Hi.type+"' for token '"+nt+"')");var pr=Hi.match;return Hi.match=Array.isArray(pr)?pr:pr?[pr]:[],Hi.match.sort(function(jn,wr){return P(jn)&&P(wr)?0:P(wr)?-1:P(jn)?1:wr.length-jn.length}),Hi}function Zo(nt){return Array.isArray(nt)?so(nt):Ii(nt)}var ys=Do("error",{lineBreaks:!0,shouldThrow:!0});function oc(nt,pi){for(var Hi=null,Cn=Object.create(null),pr=!0,jn=null,wr=[],Mo=[],qr=0;qr<nt.length;qr++)nt[qr].fallback&&(pr=!1);for(var qr=0;qr<nt.length;qr++){var tr=nt[qr];if(tr.include)throw new Error("Inheritance is not allowed in stateless lexers");if(tr.error||tr.fallback){if(Hi)throw!tr.fallback==!Hi.fallback?new Error("Multiple "+(tr.fallback?"fallback":"error")+" rules not allowed (for token '"+tr.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+tr.defaultType+"')");Hi=tr}var ss=tr.match.slice();if(pr)for(;ss.length&&typeof ss[0]=="string"&&ss[0].length===1;){var ef=ss.shift();Cn[ef.charCodeAt(0)]=tr}
vendor: 4,115 bytes, lines 7-9
7if(tr.pop||tr.push||tr.next){if(!pi)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+tr.defaultType+"')");if(tr.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+tr.defaultType+"')")}if(ss.length!==0){pr=!1,wr.push(tr);for(var tf=0;tf<ss.length;tf++){var nf=ss[tf];if(P(nf)){if(jn===null)jn=nf.unicode;else if(jn!==nf.unicode&&tr.fallback===!1)throw new Error("If one rule is /u then all must be")}}var eb=Kt(ss.map(nn)),$c=new RegExp(eb);if($c.test(""))throw new Error("RegExp matches empty string: "+$c);var By=Ee(eb);if(By>0)throw new Error("RegExp has capture groups: "+$c+`
8Use (?: \u2026 ) instead`);if(!tr.lineBreaks&&$c.test(`
9`))throw new Error("Rule should declare lineBreaks: "+$c);Mo.push(Ye(eb))}}var tb=Hi&&Hi.fallback,jy=A&&!tb?"ym":"gm",Xx=A||tb?"":"|";jn===!0&&(jy+="u");var XK=new RegExp(Kt(Mo)+Xx,jy);return{regexp:XK,groups:wr,fast:Cn,error:Hi||ys}}function uu(nt){var pi=oc(Zo(nt));return new Ho({start:pi},"start")}function Wp(nt,pi,Hi){var Cn=nt&&(nt.push||nt.next);if(Cn&&!Hi[Cn])throw new Error("Missing state '"+Cn+"' (in token '"+nt.defaultType+"' of state '"+pi+"')");if(nt&&nt.pop&&+nt.pop!=1)throw new Error("pop must be 1 (in token '"+nt.defaultType+"' of state '"+pi+"')")}function Yp(nt,pi){var Hi=nt.$all?Zo(nt.$all):[];delete nt.$all;var Cn=Object.getOwnPropertyNames(nt);pi||(pi=Cn[0]);for(var pr=Object.create(null),jn=0;jn<Cn.length;jn++){var wr=Cn[jn];pr[wr]=Zo(nt[wr]).concat(Hi)}for(var jn=0;jn<Cn.length;jn++)for(var wr=Cn[jn],Mo=pr[wr],qr=Object.create(null),tr=0;tr<Mo.length;tr++){var ss=Mo[tr];if(ss.include){var ef=[tr,1];if(ss.include!==wr&&!qr[ss.include]){qr[ss.include]=!0;var tf=pr[ss.include];if(!tf)throw new Error("Cannot include nonexistent state '"+ss.include+"' (in state '"+wr+"')");for(var nf=0;nf<tf.length;nf++){var eb=tf[nf];Mo.indexOf(eb)===-1&&ef.push(eb)}}Mo.splice.apply(Mo,ef),tr--}}for(var $c=Object.create(null),jn=0;jn<Cn.length;jn++){var wr=Cn[jn];$c[wr]=oc(pr[wr],!0)}for(var jn=0;jn<Cn.length;jn++){for(var By=Cn[jn],tb=$c[By],jy=tb.groups,tr=0;tr<jy.length;tr++)Wp(jy[tr],By,$c);for(var Xx=Object.getOwnPropertyNames(tb.fast),tr=0;tr<Xx.length;tr++)Wp(tb.fast[Xx[tr]],By,$c)}return new Ho($c,pi)}function Qp(nt){for(var pi=typeof Map<"u",Hi=pi?new Map:Object.create(null),Cn=Object.getOwnPropertyNames(nt),pr=0;pr<Cn.length;pr++){var jn=Cn[pr],wr=nt[jn],Mo=Array.isArray(wr)?wr:[wr];Mo.forEach(function(qr){if(typeof qr!="string")throw new Error("keyword must be string (in keyword '"+jn+"')");pi?Hi.set(qr,jn):Hi[qr]=jn})}return function(qr){return pi?Hi.get(qr):Hi[qr]}}var Ho=function(nt,pi){this.startState=pi,this.states=nt,this.buffer="",this.stack=[],this.reset()};Ho.prototype.reset=function(nt,pi){return this.buffer=nt||"",this.index=0,this.line=pi?pi.line:1,this.col=pi?pi.col:1,this.queuedToken=pi?pi.queuedToken:null,this.queuedText=pi?pi.queuedText:"",this.queuedThrow=pi?pi.queuedThrow:null,this.setState(pi?pi.state:this.startState),this.stack=pi&&pi.stack?pi.stack.slice():[],this},Ho.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},Ho.prototype.setState=function(nt){if(!(!nt||this.state===nt)){this.state=nt;var pi=this.states[nt];this.groups=pi.groups,this.error=pi.error,this.re=pi.regexp,this.fast=pi.fast}},Ho.prototype.popState=function(){this.setState(this.stack.pop())},Ho.prototype.pushState=function(nt){this.stack.push(this.state),this.setState(nt)};var Qx=A?function(nt,pi){return nt.exec(pi)}:function(nt,pi){var Hi=nt.exec(pi);return Hi[0].length===0?null:Hi};Ho.prototype._getGroup=function(nt){for(var pi=this.groups.length,Hi=0;Hi<pi;Hi++)if(nt[Hi+1]!==void 0)return this.groups[Hi];throw new Error("Cannot find token type for matched text")};function Kx(){return this.value}if(Ho.prototype.next=function(){var nt=this.index;if(this.queuedGroup){var pi=this._token(this.queuedGroup,this.queuedText,nt);return this.queuedGroup=null,this.queuedText="",pi}var Hi=this.buffer;
9if(nt!==Hi.length){var wr=this.fast[Hi.charCodeAt(nt)];if(wr)return this._token(wr,Hi.charAt(nt),nt);var Cn=this.re;Cn.lastIndex=nt;var pr=Qx(Cn,Hi),jn=this.error;if(pr==null)return this._token(jn,Hi.slice(nt,Hi.length),nt);var wr=this._getGroup(pr),Mo=pr[0];return jn.fallback&&pr.index!==nt?(this.queuedGroup=wr,this.queuedText=Mo,this._token(jn,Hi.slice(nt,pr.index),nt)):this._token(wr,Mo,nt)}},Ho.prototype._token=function(nt,pi,Hi){var Cn=0;if(nt.lineBreaks){var pr=/\n/g,jn=1;if(pi===`
10`)Cn=1;else for(;pr.exec(pi);)Cn++,jn=pr.lastIndex}var wr={type:typeof nt.type=="function"&&nt.type(pi)||nt.defaultType,value:typeof nt.value=="function"?nt.value(pi):pi,text:pi,toString:Kx,offset:Hi,lineBreaks:Cn,line:this.line,col:this.col},Mo=pi.length;if(this.index+=Mo,this.line+=Cn,Cn!==0?this.col=Mo-jn+1:this.col+=Mo,nt.shouldThrow){var qr=new Error(this.formatError(wr,"invalid syntax"));throw qr}return nt.pop?this.popState():nt.push?this.pushState(nt.push):nt.next&&this.setState(nt.next),wr},typeof Symbol<"u"&&Symbol.iterator){var Kp=function(nt){this.lexer=nt};Kp.prototype.next=function(){var nt=this.lexer.next();return{value:nt,done:!nt}},Kp.prototype[Symbol.iterator]=function(){return this},Ho.prototype[Symbol.iterator]=function(){return new Kp(this)}}return Ho.prototype.formatError=function(nt,pi){if(nt==null)var Hi=this.buffer.slice(this.index),nt={text:Hi,offset:this.index,lineBreaks:Hi.indexOf(`
11`)===-1?0:1,line:this.line,col:this.col};var Cn=2,pr=Math.max(nt.line-Cn,1),jn=nt.line+Cn,wr=String(jn).length,Mo=Zn(this.buffer,this.line-nt.line+Cn+1).slice(0,5),qr=[];qr.push(pi+" at line "+nt.line+" col "+nt.col+":"),qr.push("");for(var tr=0;tr<Mo.length;tr++){var ss=Mo[tr],ef=pr+tr;qr.push(Bn(String(ef),wr)+"  "+ss),ef===nt.line&&qr.push(Bn("",wr+nt.col+1)+"^")}return qr.join(`
12`)},Ho.prototype.clone=function(){return new Ho(this.states,this.state)},Ho.prototype.has=function(nt){return!0},{compile:uu,states:Yp,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:Qp}})})(Ux);var vK=Ux.exports;(function(w){var E=nc&&nc.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(w,"__esModule",{value:!0}),w.lexer=w.states=void 0;let k=E(vK);w.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:A=>A.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:A=>A.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:A=>A.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:A=>A.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:A=>A.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:A=>A.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:A=>A.substring(0,A.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},w.lexer=k.default.states(w.states)})($x),Object.defineProperty(Zh,"__esModule",{value:!0});var UL=Zh.parse=Zh.ParseError=void 0;let HL=$x,Hx=w=>({offset:w.offset,line:w.line,col:w.col,text:w.text,lineBreaks:w.lineBreaks}),YM=w=>w==="plural"||w==="select"||w==="selectordinal";function yK(w,E){let k="",A="";for(let U of E){let oe=U.ctx.text;switch(A+=oe,U.type){case"content":k+=U.value;break;case"argument":case"function":case"octothorpe":k+=oe;break;default:throw new Ba(w,`Unsupported part in strict mode function arg style: ${oe}`)}}return[{type:"content",value:k.trim(),ctx:Object.assign({},E[0].ctx,{text:A})}]}let CK=["number","date","time","spellout","ordinal","duration"],qL=["zero","one","two","few","many","other"];class Ba extends Error{constructor(E,k){super(HL.lexer.formatError(E,k))}}Zh.ParseError=Ba;class wK{constructor(E,k){var A,P,U,oe;this.lexer=HL.lexer.reset(E),this.cardinalKeys=(A=k?.cardinal)!==null&&A!==void 0?A:qL,this.ordinalKeys=(P=k?.ordinal)!==null&&P!==void 0?P:qL,this.strict=(U=k?.strict)!==null&&U!==void 0?U:!1,this.strictPluralKeys=(oe=k?.strictPluralKeys)!==null&&oe!==void 0?oe:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(E,k,A){if(A[0]==="="){if(k==="select")throw new Ba(E,`The case ${A}
12 is not valid with select`)}else if(k!=="select"){let P=k==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&P.length>0&&!P.includes(A)){let U=`The ${k} case ${A} is not valid in this locale`;throw new Ba(E,U)}}}parseSelect(E,k,A,P){let{value:U}=E,oe={type:P,arg:U,cases:[],ctx:A};P==="plural"||P==="selectordinal"?k=!0:this.strict&&(k=!1);for(let Ee of this.lexer)switch(Ee.type){case"offset":if(P==="select")throw new Ba(Ee,"Unexpected plural offset for select");if(oe.cases.length>0)throw new Ba(Ee,"Plural offset must be set before cases");oe.pluralOffset=Number(Ee.value),A.text+=Ee.text,A.lineBreaks+=Ee.lineBreaks;break;case"case":{this.checkSelectKey(Ee,P,Ee.value),oe.cases.push({key:Ee.value,tokens:this.parseBody(k),ctx:Hx(Ee)});break}case"end":return oe;default:throw new Ba(Ee,`Unexpected lexer token: ${Ee.type}`)}throw new Ba(null,"Unexpected message end")}parseArgToken(E,k){let A=Hx(E),P=this.lexer.next();if(!P)throw new Ba(null,"Unexpected message end");if(A.text+=P.text,A.lineBreaks+=P.lineBreaks,this.strict&&(P.type==="func-simple"||P.type==="func-args")&&!CK.includes(P.value)){let U=`Invalid strict mode function arg type: ${P.value}`;throw new Ba(E,U)}switch(P.type){case"end":return{type:"argument",arg:E.value,ctx:A};case"func-simple":{let U=this.lexer.next();if(!U)throw new Ba(null,"Unexpected message end");if(U.type!=="end")throw new Ba(U,`Unexpected lexer token: ${U.type}`);if(A.text+=U.text,YM(P.value.toLowerCase()))throw new Ba(P,`Invalid type identifier: ${P.value}`);return{type:"function",arg:E.value,key:P.value,ctx:A}}case"func-args":{if(YM(P.value.toLowerCase())){let oe=`Invalid type identifier: ${P.value}`;throw new Ba(P,oe)}let U=this.parseBody(this.strict?!1:k);return this.strict&&U.length>0&&(U=yK(E,U)),{type:"function",arg:E.value,key:P.value,param:U,ctx:A}}case"select":if(YM(P.value))return this.parseSelect(E,k,A,P.value);throw new Ba(P,`Unexpected select type ${P.value}`);default:throw new Ba(P,`Unexpected lexer token: ${P.type}`)}}parseBody(E,k){let A=[],P=null;for(let U of this.lexer)if(U.type==="argument")P&&(P=null),A.push(this.parseArgToken(U,E));else if(U.type==="octothorpe"&&E)P&&(P=null),A.push({type:"octothorpe",ctx:Hx(U)});else{if(U.type==="end"&&!k)return A;{let oe=U.value;if(!E&&U.type==="quoted"&&oe[0]==="#"){if(oe.includes("{")){let Ee=`Unsupported escape pattern: ${oe}`;throw new Ba(U,Ee)}oe=U.text}P?(P.value+=oe,P.ctx.text+=U.text,P.ctx.lineBreaks+=U.lineBreaks):(P={type:"content",value:oe,ctx:Hx(U)},A.push(P))}}if(k)return A;throw new Ba(null,"Unexpected message end")}}function xK(w){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new wK(w,E).parse()}UL=Zh.parse=xK;function Ly(w){return Ly[w]||(Ly[w]=new Intl.NumberFormat(w))}function SK(w,E,k){return Ly(w).format(E-k)}function TK(w,E,k,A){var P=E-k;if(isNaN(P))throw new Error("`"+A+"` or its offset is not a number");return Ly(w).format(P)}function EK(w,E,k,A,P){if({}.hasOwnProperty.call(A,w))return A[w];E&&(w-=E);var U=k(w,P);return U in A?A[U]:A.other}function IK(w,E){return{}.hasOwnProperty.call(E,w)?E[w]:E.other}function kK(w,E){for(var k=0;k<w.length;++k)if(!E||E[w[k]]===void 0)throw new Error("Message requires argument '".concat(w[k],"'"))}var DK=Object.freeze({__proto__:null,_nf:Ly,number:SK,plural:EK,reqArgs:kK,select:IK,strictNumber:TK});function MK(w,E,k){var A={day:"numeric",month:"short",year:"numeric"};switch(k){case"full":A.weekday="long";case"long":A.month="long";break;case"short":A.month="numeric"}return new Date(w).toLocaleDateString(E,A)}function AK(w){if(typeof w!="number"&&(w=Number(w)),!isFinite(w))return String(w);var E="";w<0?(E="-",w=Math.abs(w)):w=Number(w);var k=w%60,A=[Math.round(k)===k?k:k.toFixed(3)];w<60?A.unshift(0):(w=Math.round((w-Number(A[0]))/60),A.unshift(w%60),w>=60&&(w=Math.round((w-Number(A[0]))/60),A.unshift(w)));var P=A.shift();return E+P+":"+A.map(function(U){return Number(U)<10?"0"+String(U):String(U)}).join(":")}var QM={};function qx(w,E){var k=String(w)+JSON.stringify(E);return QM[k]||(QM[k]=new Intl.NumberFormat(w,E)),QM[k]}function OK(w,E,k,A){var P=k&&k.split(":")||[],U=P[0],oe=P[1],Ee={integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:oe&&oe.trim()||A,minimumFractionDigits:2,maximumFractionDigits:2}};return qx(E,Ee[U]||{}).format(w)}var PK=function(w,E,k){return qx(E,{style:"currency",currency:k,minimumFractionDigits:2,maximumFractionDigits:2}).format(w)},RK=function(w,E){return qx(E,{maximumFractionDigits:0}).format(w)},FK=function(w,E){return qx(E,{style:"percent"}).format(w)};function NK(w,E,k){var A={second:"numeric",minute:"numeric",hour:"numeric"};switch(k){case"full":case"long":A.timeZoneName="short";break;
12case"short":delete A.second}return new Date(w).toLocaleTimeString(E,A)}var KM=Object.freeze({__proto__:null,date:MK,duration:AK,numberCurrency:PK,numberFmt:OK,numberInteger:RK,numberPercent:FK,time:NK}),VK={ES3:{break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},ESnext:{await:!0,debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0}},XM=WM(VK);function LK(w){let E=0;for(let k=0;k<w.length;++k){let A=w.charCodeAt(k);E=(E<<5)-E+A,E|=0}return E}function mu(w,E){E&&(w+=" "+LK(w).toString(36));let k=w.trim().replace(/\W+/g,"_");return XM.ES3[k]||XM.ESnext[k]||/^\d/.test(k)?"_"+k:k}function ZM(w,E){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(E)&&!XM.ES3[E])return w?w+"."+E:E;{let k=JSON.stringify(E);return w?w+"["+k+"]":k}}var BK=["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"],jK=new RegExp("^"+BK.join("|^"));function GK(w,E){var k=jK.test(E),A=JSON.stringify(k?"\u200F":"\u200E");return"".concat(A," + ").concat(w," + ").concat(A)}var zK="@messageformat/runtime",$K="@messageformat/runtime/lib/cardinals",WL="@messageformat/runtime/lib/plurals",UK="@messageformat/runtime/lib/formatters",HK=function(){function w(E){this.arguments=[],this.runtime={},this.options=E}return w.prototype.compile=function(E,k,A){var P,U,oe=this,Ee=this.options,Ye=Ee.localeCodeFromKey,Kt=Ee.requireAllArguments,nn=Ee.strict,Bn=Ee.strictPluralKeys;if(typeof E=="object"){var Zn={};try{for(var Ii=t(Object.keys(E)),so=Ii.next();!so.done;so=Ii.next()){var Do=so.value,Zo=Ye?Ye(Do):Do,ys=A&&Zo&&A[Zo]||k;Zn[Do]=this.compile(E[Do],ys,A)}}catch(Ho){P={error:Ho}}finally{try{so&&!so.done&&(U=Ii.return)&&U.call(Ii)}finally{if(P)throw P.error}}return Zn}this.plural=k;var oc={cardinal:k.cardinals,ordinal:k.ordinals,strict:nn,strictPluralKeys:Bn};this.arguments=[];var uu=UL(E,oc).map(function(Ho){return oe.token(Ho,null)}),Wp=this.arguments.length>0,Yp=this.concatenate(uu,!0);if(Kt&&Wp){this.setRuntimeFn("reqArgs");var Qp=JSON.stringify(this.arguments);return"(d) => { reqArgs(".concat(Qp,", d); return ").concat(Yp,"; }")}return"(".concat(Wp?"d":"",") => ").concat(Yp)},w.prototype.cases=function(E,k){var A=this,P=!0,U=E.cases.map(function(nn){var Bn=nn.key,Zn=nn.tokens;Bn==="other"&&(P=!1);var Ii=Zn.map(function(so){return A.token(so,k)});return"".concat(ZM(null,Bn.replace(/^=/,"")),": ").concat(A.concatenate(Ii,!1))});if(P){var oe=E.type,Ee=this.plural,Ye=Ee.cardinals,Kt=Ee.ordinals;if(oe==="select"||oe==="plural"&&Ye.includes("other")||oe==="selectordinal"&&Kt.includes("other"))throw new Error("No 'other' form found in ".concat(JSON.stringify(E)))}return"{ ".concat(U.join(", ")," }")},w.prototype.concatenate=function(E,k){var A=this.options.returnType==="values";return A&&(k||E.length>1)?"["+E.join(", ")+"]":E.join(" + ")||'""'},w.prototype.token=function(E,k){if(E.type==="content")return JSON.stringify(E.value);var A=this.plural,P=A.id,U=A.lc,oe,Ee;switch("arg"in E?(this.arguments.push(E.arg),oe=[ZM("d",E.arg)]):oe=[],E.type){case"argument":return this.options.biDiSupport?GK(String(oe[0]),U):String(oe[0]);case"select":Ee="select",k&&this.options.strict&&(k=null),oe.push(this.cases(E,k)),this.setRuntimeFn("select");break;case"selectordinal":Ee="plural",oe.push(E.pluralOffset||0,P,this.cases(E,E),1),this.setLocale(P,!0),this.setRuntimeFn("plural");break;case"plural":Ee="plural",oe.push(E.pluralOffset||0,P,this.cases(E,E)),this.setLocale(P,!1),this.setRuntimeFn("plural");break;case"function":{var Ye=this.options.customFormatters[E.key],Kt=Ye&&"module"in Ye&&typeof Ye.module=="function";if(!Ye){if(E.key==="date"){Ee=this.setDateFormatter(E,oe,k);break}else if(E.key==="number"){Ee=this.setNumberFormatter(E,oe,k);break}}if(oe.push(JSON.stringify(this.plural.locale)),E.param){k&&this.options.strict&&(k=null);var nn=this.getFormatterArg(E,k);nn&&oe.push(nn)}
12Ee=Kt?mu("".concat(E.key,"__").concat(this.plural.locale)):E.key,this.setFormatter(Ee,E.key);break}case"octothorpe":if(!k)return'"#"';oe=[JSON.stringify(this.plural.locale),ZM("d",k.arg),k.pluralOffset||0],this.options.strict?(Ee="strictNumber",oe.push(JSON.stringify(k.arg)),this.setRuntimeFn("strictNumber")):(Ee="number",this.setRuntimeFn("number"));break}if(!Ee)throw new Error("Parser error for token "+JSON.stringify(E));return"".concat(Ee,"(").concat(oe.join(", "),")")},w.prototype.runtimeIncludes=function(E,k){if(mu(E)!==E)throw new SyntaxError("Reserved word used as ".concat(k," identifier: ").concat(E));var A=this.runtime[E];if(!A||A.type===k)return A;throw new TypeError("Cannot override ".concat(A.type," runtime function as ").concat(k,": ").concat(E))},w.prototype.setLocale=function(E,k){var A=this.runtimeIncludes(E,"locale"),P=this.plural,U=P.getCardinal,oe=P.getPlural,Ee=P.isDefault,Ye,Kt,nn;if(!k&&Ee&&U){if(A)return;Ye=function(Bn){return U(Bn)},Kt=$K,nn=function(){return String(U)}}else{if(A&&(!Ee||A.module===WL))return;Ye=function(Bn,Zn){return oe(Bn,Zn)},Kt=Ee?WL:oe.module||null,nn=function(){return String(oe)}}this.runtime[E]=Object.assign(Ye,{id:E,module:Kt,toString:nn,type:"locale"})},w.prototype.setRuntimeFn=function(E){this.runtimeIncludes(E,"runtime")||(this.runtime[E]=Object.assign(DK[E],{id:E,module:zK,type:"runtime"}))},w.prototype.getFormatterArg=function(E,k){var A,P,U,oe,Ee=this,Ye=E.key,Kt=E.param,nn=this.options.customFormatters[Ye]||YL(Ye)&&KM[Ye];if(!nn||!Kt)return null;var Bn="arg"in nn&&nn.arg||"string";if(Bn==="options"){var Zn="";try{for(var Ii=t(Kt),so=Ii.next();!so.done;so=Ii.next()){var Do=so.value;if(Do.type==="content")Zn+=Do.value;else throw new SyntaxError("Expected literal options for ".concat(Ye," formatter"))}}catch(Kp){A={error:Kp}}finally{try{so&&!so.done&&(P=Ii.return)&&P.call(Ii)}finally{if(A)throw A.error}}var Zo={};try{for(var ys=t(Zn.split(",")),oc=ys.next();!oc.done;oc=ys.next()){var uu=oc.value,Wp=uu.indexOf(":");if(Wp===-1)Zo[uu.trim()]=null;else{var Yp=uu.substring(0,Wp).trim(),Qp=uu.substring(Wp+1).trim();if(Qp==="true")Zo[Yp]=!0;else if(Qp==="false")Zo[Yp]=!1;else if(Qp==="null")Zo[Yp]=null;else{var Ho=Number(Qp);Zo[Yp]=Number.isFinite(Ho)?Ho:Qp}}}}catch(Kp){U={error:Kp}}finally{try{oc&&!oc.done&&(oe=ys.return)&&oe.call(ys)}finally{if(U)throw U.error}}return JSON.stringify(Zo)}else{var Qx=Kt.map(function(Kp){return Ee.token(Kp,k)});if(Bn==="raw")return"[".concat(Qx.join(", "),"]");var Kx=Qx.join(" + ");return Kx?"(".concat(Kx,").trim()"):'""'}},w.prototype.setFormatter=function(E,k){if(!this.runtimeIncludes(E,"formatter")){var A=this.options.customFormatters[k||E];if(A){var P=typeof A=="function"?{formatter:A}:A;this.runtime[E]=Object.assign(P.formatter.bind({}),n(n({},P.formatter.prototype),{toString:function(){return String(P.formatter)}}),{type:"formatter"},"module"in A&&A.module&&A.id?{id:mu(A.id),module:typeof A.module=="function"?A.module(this.plural.locale):A.module}:{id:null,module:null})}else if(YL(E))this.runtime[E]=Object.assign(KM[E],{type:"formatter"},{id:E,module:UK});else throw new Error("Formatting function not found: ".concat(E))}},w.prototype.setDateFormatter=function(E,k,A){var P=this,U=E.param,oe=this.plural.locale,Ee=U&&U.length===1&&U[0];if(Ee&&Ee.type==="content"&&/^\s*::/.test(Ee.value)){var Ye=Ee.value.trim().substr(2),Kt=mu("date_".concat(oe,"_").concat(Ye),!0);if(!this.runtimeIncludes(Kt,"formatter")){var nn=qe(oe,Ye,this.options.timeZone);this.runtime[Kt]=Object.assign(nn,{id:Kt,module:null,toString:function(){return ue(oe,Ye,P.options.timeZone)},type:"formatter"})}return Kt}if(k.push(JSON.stringify(oe)),U&&U.length>0){A&&this.options.strict&&(A=null);var Bn=U.map(function(Zn){return P.token(Zn,A)});k.push("("+(Bn.join(" + ")||'""')+").trim()")}return this.setFormatter("date"),"date"},w.prototype.setNumberFormatter=function(E,k,A){var P=this,U=E.param,oe=this.plural.locale;if(!U||U.length===0)return k.unshift(JSON.stringify(oe)),k.push("0"),this.setRuntimeFn("number"),"number";if(k.push(JSON.stringify(oe)),U.length===1&&U[0].type==="content"){var Ee=U[0].value.trim();switch(Ee){case"currency":return k.push(JSON.stringify(this.options.currency)),this.setFormatter("numberCurrency"),"numberCurrency";case"integer":return this.setFormatter("numberInteger"),"numberInteger";case"percent":return this.setFormatter("numberPercent"),"numberPercent"}var Ye=Ee.match(/^currency:([A-Z]+)$/);if(Ye)return k.push(JSON.stringify(Ye[1])),this.setFormatter("numberCurrency"),"numberCurrency";var Kt=mu("number_".concat(oe,"_").concat(Ee),!0);if(!this.runtimeIncludes(Kt,"formatter")){var nn=this.options.currency,Bn=zx(oe,Ee,nn);this.runtime[Kt]=Object.assign(Bn,{id:null,module:null,toString:function(){return qM(oe,Ee,nn)},type:"formatter"})}return Kt}A&&this.options.strict&&(A=null);var Zn=U.map(function(Ii){return P.token(Ii,A)});return k.push("("+(Zn.join(" + ")||'""')+").trim()"),k.push(JSON.stringify(this.options.currency)),this.setFormatter("numberFmt"),"numberFmt"},w}();function YL(w){return w in KM}let oi=w=>w==1?"one":"other",zp=w=>w==0||w==1?"one":"other",Nd=w=>w>=0&&w<=1?"one":"other",as=w=>
12{let E=String(w).split("."),k=!E[1];return w==1&&k?"one":"other"},Fr=w=>"other",$p=w=>w==1?"one":w==2?"two":"other";var qK=Object.freeze({__proto__:null,af:oi,ak:zp,am:Nd,an:oi,ar:w=>{let E=String(w).split("."),k=Number(E[0])==w,A=k&&E[0].slice(-2);return w==0?"zero":w==1?"one":w==2?"two":A>=3&&A<=10?"few":A>=11&&A<=99?"many":"other"},ars:w=>{let E=String(w).split("."),k=Number(E[0])==w,A=k&&E[0].slice(-2);return w==0?"zero":w==1?"one":w==2?"two":A>=3&&A<=10?"few":A>=11&&A<=99?"many":"other"},as:Nd,asa:oi,ast:as,az:oi,bal:oi,be:w=>{let E=String(w).split("."),k=Number(E[0])==w,A=k&&E[0].slice(-1),P=k&&E[0].slice(-2);return A==1&&P!=11?"one":A>=2&&A<=4&&(P<12||P>14)?"few":k&&A==0||A>=5&&A<=9||P>=11&&P<=14?"many":"other"},bem:oi,bez:oi,bg:oi,bho:zp,bm:Fr,bn:Nd,bo:Fr,br:w=>{let E=String(w).split("."),k=Number(E[0])==w,A=k&&E[0].slice(-1),P=k&&E[0].slice(-2),U=k&&E[0].slice(-6);return A==1&&P!=11&&P!=71&&P!=91?"one":A==2&&P!=12&&P!=72&&P!=92?"two":(A==3||A==4||A==9)&&(P<10||P>19)&&(P<70||P>79)&&(P<90||P>99)?"few":w!=0&&k&&U==0?"many":"other"},brx:oi,bs:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=k.slice(-2),Ee=A.slice(-1),Ye=A.slice(-2);return P&&U==1&&oe!=11||Ee==1&&Ye!=11?"one":P&&U>=2&&U<=4&&(oe<12||oe>14)||Ee>=2&&Ee<=4&&(Ye<12||Ye>14)?"few":"other"},ca:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return w==1&&A?"one":k!=0&&P==0&&A?"many":"other"},ce:oi,ceb:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=A.slice(-1);return P&&(k==1||k==2||k==3)||P&&U!=4&&U!=6&&U!=9||!P&&oe!=4&&oe!=6&&oe!=9?"one":"other"},cgg:oi,chr:oi,ckb:oi,cs:w=>{let E=String(w).split("."),k=E[0],A=!E[1];return w==1&&A?"one":k>=2&&k<=4&&A?"few":A?"other":"many"},cy:w=>w==0?"zero":w==1?"one":w==2?"two":w==3?"few":w==6?"many":"other",da:w=>{let E=String(w).split("."),k=E[0],A=Number(E[0])==w;return w==1||!A&&(k==0||k==1)?"one":"other"},de:as,doi:Nd,dsb:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-2),oe=A.slice(-2);return P&&U==1||oe==1?"one":P&&U==2||oe==2?"two":P&&(U==3||U==4)||oe==3||oe==4?"few":"other"},dv:oi,dz:Fr,ee:oi,el:oi,en:as,eo:oi,es:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return w==1?"one":k!=0&&P==0&&A?"many":"other"},et:as,eu:oi,fa:Nd,ff:w=>w>=0&&w<2?"one":"other",fi:as,fil:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=A.slice(-1);return P&&(k==1||k==2||k==3)||P&&U!=4&&U!=6&&U!=9||!P&&oe!=4&&oe!=6&&oe!=9?"one":"other"},fo:oi,fr:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return w>=0&&w<2?"one":k!=0&&P==0&&A?"many":"other"},fur:oi,fy:as,ga:w=>{let E=String(w).split("."),k=Number(E[0])==w;return w==1?"one":w==2?"two":k&&w>=3&&w<=6?"few":k&&w>=7&&w<=10?"many":"other"},gd:w=>{let E=String(w).split("."),k=Number(E[0])==w;return w==1||w==11?"one":w==2||w==12?"two":k&&w>=3&&w<=10||k&&w>=13&&w<=19?"few":"other"},gl:as,gsw:oi,gu:Nd,guw:zp,gv:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-1),U=k.slice(-2);return A&&P==1?"one":A&&P==2?"two":A&&(U==0||U==20||U==40||U==60||U==80)?"few":A?"other":"many"},ha:oi,haw:oi,he:w=>{let E=String(w).split("."),k=E[0],A=!E[1];return k==1&&A||k==0&&!A?"one":k==2&&A?"two":"other"},hi:Nd,hnj:Fr,hr:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=k.slice(-2),Ee=A.slice(-1),Ye=A.slice(-2);return P&&U==1&&oe!=11||Ee==1&&Ye!=11?"one":P&&U>=2&&U<=4&&(oe<12||oe>14)||Ee>=2&&Ee<=4&&(Ye<12||Ye>14)?"few":"other"},hsb:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-2),oe=A.slice(-2);return P&&U==1||oe==1?"one":P&&U==2||oe==2?"two":P&&(U==3||U==4)||oe==3||oe==4?"few":"other"},hu:oi,hy:w=>w>=0&&w<2?"one":"other",ia:as,id:Fr,ig:Fr,ii:Fr,io:as,is:w=>{let E=String(w).split("."),k=E[0],A=(E[1]||"").replace(/0+$/,""),P=Number(E[0])==w,U=k.slice(-1),oe=k.slice(-2);return P&&U==1&&oe!=11||A%10==1&&A%100!=11?"one":"other"},it:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return w==1&&A?"one":k!=0&&P==0&&A?"many":"other"},iu:$p,ja:Fr,jbo:Fr,jgo:oi,jmc:oi,jv:Fr,jw:Fr,ka:oi,kab:w=>w>=0&&w<2?"one":"other",kaj:oi,kcg:oi,kde:Fr,kea:Fr,kk:oi,kkj:oi,kl:oi,km:Fr,kn:Nd,ko:Fr,ks:oi,ksb:oi,ksh:w=>w==0?"zero":w==1?"one":"other",ku:oi,kw:w=>{let E=String(w).split("."),k=Number(E[0])==w,A=k&&E[0].slice(-2),P=k&&E[0].slice(-3),U=k&&E[0].slice(-5),oe=k&&E[0].slice(-6);return w==0?"zero":w==1?"one":A==2||A==22||A==42||A==62||A==82||k&&P==0&&(U>=1e3&&U<=2e4||U==4e4||U==6e4||U==8e4)||w!=0&&oe==1e5?"two":A==3||A==23||A==43||A==63||A==83?"few":w!=1&&(A==1||A==21||A==41||A==61||A==81)?"many":"other"},ky:oi,lag:w=>{let E=String(w).split("."),k=E[0];return w==0?"zero":(k==0||k==1)&&w!=0?"one":"other"},lb:oi,lg:oi,lij:as,lkt:Fr,ln:zp,lo:Fr,lt:w=>{let E=String(w).split("."),k=E[1]||"",A=Number(E[0])==w,P=A&&E[0].slice(-1),U=A&&E[0].slice(-2);return P==1&&(U<11||U>19)?"one":P>=2&&P<=9&&(U<11||U>19)?"few":k!=0?"many":"other"},lv:w=>{let E=String(w).split("."),k=E[1]||"",A=k.length,P=Number(E[0])==w,U=P&&E[0].slice(-1),oe=P&&E[0].slice(-2),Ee=k.slice(-2),Ye=k.slice(-1);return P&&U==0||oe>=11&&oe<=19||A==2&&Ee>=11&&Ee<=19?"zero":U==1&&oe!=11||A==2&&Ye==1&&Ee!=11||A!=2&&Ye==1?"one":"other"},mas:oi,mg:zp,mgo:oi,mk:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=k.slice(-2),Ee=A.slice(-1),Ye=A.slice(-2);return P&&U==1&&oe!=11||Ee==1&&Ye!=11?"one":"other"},ml:oi,mn:oi,mo:w=>{let E=String(w).split("."),k=!E[1],A=Number(E[0])==w,P=A&&E[0].slice(-2);return w==1&&k?"one":!k||w==0||w!=1&&P>=1&&P<=19?"few":"other"},mr:oi,ms:Fr,mt:w=>{let E=String(w).split("."),k=Number(E[0])==w,A=k&&E[0].slice(-2);return w==1?"one":w==2?"two":w==0||A>=3&&A<=10?"few":A>=11&&A<=19?"many":"other"},my:Fr,nah:oi,naq:$p,nb:oi,nd:oi,ne:oi,nl:as,nn:oi,nnh:oi,no:oi,nqo:Fr,nr:oi,nso:zp,ny:oi,nyn:oi,om:oi,or:oi,os:oi,osa:Fr,pa:zp,pap:oi,pcm:Nd,pl:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-1),U=k.slice(-2);return w==1&&A?"one":A&&P>=2&&P<=4&&(U<12||U>14)?"few":A&&k!=1&&(P==0||P==1)||A&&P>=5&&P<=9||A&&U>=12&&U<=14?"many":"other"},prg:w=>{let E=String(w).split("."),k=E[1]||"",A=k.length,P=Number(E[0])==w,U=P&&E[0].slice(-1),oe=P&&E[0].slice(-2),Ee=k.slice(-2),Ye=k.slice(-1);return P&&U==0||oe>=11&&oe<=19||A==2&&Ee>=11&&Ee<=19?"zero":U==1&&oe!=11||A==2&&Ye==1&&Ee!=11||A!=2&&Ye==1?"one":"other"},ps:oi,pt:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return k==0||k==1?"one":k!=0&&P==0&&A?"many":"other"},pt_PT:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return w==1&&A?"one":k!=0&&P==0&&A?"many":"other"},rm:oi,ro:w=>{let E=String(w).split("."),k=!E[1],A=Number(E[0])==w,P=A&&E[0].slice(-2);return w==1&&k?"one":!k||w==0||w!=1&&P>=1&&P<=19?"few":"other"},rof:oi,ru:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-1),U=k.slice(-2);return A&&P==1&&U!=11?"one":A&&P>=2&&P<=4&&(U<12||U>14)?"few":A&&P==0||A&&P>=5&&P<=9||A&&U>=11&&U<=14?"many":"other"},rwk:oi,sah:Fr,saq:oi,sat:$p,sc:as,scn:as,sd:oi,sdh:oi,se:$p,seh:oi,ses:Fr,sg:Fr,sh:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=k.slice(-2),Ee=A.slice(-1),Ye=A.slice(-2);return P&&U==1&&oe!=11||Ee==1&&Ye!=11?"one":P&&U>=2&&U<=4&&(oe<12||oe>14)||Ee>=2&&Ee<=4&&(Ye<12||Ye>14)?"few":"other"},shi:w=>{let E=String(w).split("."),k=Number(E[0])==w;return w>=0&&w<=1?"one":k&&w>=2&&w<=10?"few":"other"},si:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"";return w==0||w==1||k==0&&A==1?"one":"other"},sk:w=>{let E=String(w).split("."),k=E[0],A=!E[1];return w==1&&A?"one":k>=2&&k<=4&&A?"few":A?"other":"many"},sl:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-2);return A&&P==1?"one":A&&P==2?"two":A&&(P==3||P==4)||!A?"few":"other"},sma:$p,smi:$p,smj:$p,smn:$p,sms:$p,sn:oi,so:oi,sq:oi,sr:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=k.slice(-2),Ee=A.slice(-1),Ye=A.slice(-2);return P&&U==1&&oe!=11||Ee==1&&Ye!=11?"one":P&&U>=2&&U<=4&&(oe<12||oe>14)||Ee>=2&&Ee<=4&&(Ye<12||Ye>14)?"few":"other"},ss:oi,ssy:oi,st:oi,su:Fr,sv:as,sw:as,syr:oi,ta:oi,te:oi,teo:oi,th:Fr,ti:zp,tig:oi,tk:oi,tl:w=>{let E=String(w).split("."),k=E[0],A=E[1]||"",P=!E[1],U=k.slice(-1),oe=A.slice(-1);return P&&(k==1||k==2||k==3)||P&&U!=4&&U!=6&&U!=9||!P&&oe!=4&&oe!=6&&oe!=9?"one":"other"},tn:oi,to:Fr,tpi:Fr,tr:oi,ts:oi,tzm:w=>{let E=String(w).split("."),k=Number(E[0])==w;return w==0||w==1||k&&w>=11&&w<=99?"one":"other"},ug:oi,uk:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-1),U=k.slice(-2);return A&&P==1&&U!=11?"one":A&&P>=2&&P<=4&&(U<12||U>14)?"few":A&&P==0||A&&P>=5&&P<=9||A&&U>=11&&U<=14?"many":"other"},und:Fr,ur:as,uz:oi,ve:oi,vec:w=>{let E=String(w).split("."),k=E[0],A=!E[1],P=k.slice(-6);return w==1&&A?"one":k!=0&&P==0&&A?"many":"other"},vi:Fr,vo:oi,vun:oi,wa:zp,wae:oi,wo:Fr,xh:oi,xog:oi,yi:as,yo:Fr,yue:Fr,zh:Fr,zu:Nd});let Up="zero",ui="one",ko="two",dr="few",hr="many",gt="other",Et={cardinal:[ui,gt],ordinal:[gt]},Jh={cardinal:[ui,gt],ordinal:[ui,gt]},Qr={cardinal:[gt],ordinal:[gt]},Vd={cardinal:[ui,ko,gt],ordinal:[gt]};var QL=Object.freeze({__proto__:null,af:Et,ak:Et,am:Et,an:Et,ar:{cardinal:[Up,ui,ko,dr,hr,gt],ordinal:[gt]},ars:{cardinal:[Up,ui,ko,dr,hr,gt],ordinal:[gt]},as:{cardinal:[ui,gt],ordinal:[ui,ko,dr,hr,gt]},asa:Et,ast:Et,az:{cardinal:[ui,gt],ordinal:[ui,dr,hr,gt]},bal:Jh,be:{cardinal:[ui,dr,hr,gt],ordinal:[dr,gt]},bem:Et,bez:Et,bg:Et,bho:Et,bm:Qr,bn:{cardinal:[ui,gt],ordinal:[ui,ko,dr,hr,gt]},bo:Qr,br:{cardinal:[ui,ko,dr,hr,gt],ordinal:[gt]},brx:Et,bs:{cardinal:[ui,dr,gt],ordinal:[gt]},ca:{cardinal:[ui,hr,gt],ordinal:[ui,ko,dr,gt]},ce:Et,ceb:Et,cgg:Et,chr:Et,ckb:Et,cs:{cardinal:[ui,dr,hr,gt],ordinal:[gt]},cy:{cardinal:[Up,ui,ko,dr,hr,gt],ordinal:[Up,ui,ko,dr,hr,gt]},da:Et,de:Et,doi:Et,dsb:{cardinal:[ui,ko,dr,gt],ordinal:[gt]},dv:Et,dz:Qr,ee:Et,el:Et,en:{cardinal:[ui,gt],ordinal:[ui,ko,dr,gt]},eo:Et,es:{cardinal:[ui,hr,gt],ordinal:[gt]},et:Et,eu:Et,fa:Et,ff:Et,fi:Et,fil:Jh,fo:Et,fr:{cardinal:[ui,hr,gt],ordinal:[ui,gt]},fur:Et,fy:Et,ga:{cardinal:[ui,ko,dr,hr,gt],ordinal:[ui,gt]},gd:{cardinal:[ui,ko,dr,gt],ordinal:[ui,ko,dr,gt]},gl:Et,gsw:Et,gu:{cardinal:[ui,gt],ordinal:[ui,ko,dr,hr,gt]},guw:Et,gv:{cardinal:[ui,ko,dr,hr,gt],ordinal:[gt]},ha:Et,haw:Et,he:Vd,hi:{cardinal:[ui,gt],ordinal:[ui,ko,dr,hr,gt]},hnj:Qr,hr:{cardinal:[ui,dr,gt],ordinal:[gt]},hsb:{cardinal:[ui,ko,dr,gt],ordinal:[gt]},hu:Jh,hy:Jh,ia:Et,id:Qr,ig:Qr,ii:Qr,io:Et,is:Et,it:{cardinal:[ui,hr,gt],ordinal:[hr,gt]}
12,iu:Vd,ja:Qr,jbo:Qr,jgo:Et,jmc:Et,jv:Qr,jw:Qr,ka:{cardinal:[ui,gt],ordinal:[ui,hr,gt]},kab:Et,kaj:Et,kcg:Et,kde:Qr,kea:Qr,kk:{cardinal:[ui,gt],ordinal:[hr,gt]},kkj:Et,kl:Et,km:Qr,kn:Et,ko:Qr,ks:Et,ksb:Et,ksh:{cardinal:[Up,ui,gt],ordinal:[gt]},ku:Et,kw:{cardinal:[Up,ui,ko,dr,hr,gt],ordinal:[ui,hr,gt]},ky:Et,lag:{cardinal:[Up,ui,gt],ordinal:[gt]},lb:Et,lg:Et,lij:{cardinal:[ui,gt],ordinal:[hr,gt]},lkt:Qr,ln:Et,lo:{cardinal:[gt],ordinal:[ui,gt]},lt:{cardinal:[ui,dr,hr,gt],ordinal:[gt]},lv:{cardinal:[Up,ui,gt],ordinal:[gt]},mas:Et,mg:Et,mgo:Et,mk:{cardinal:[ui,gt],ordinal:[ui,ko,hr,gt]},ml:Et,mn:Et,mo:{cardinal:[ui,dr,gt],ordinal:[ui,gt]},mr:{cardinal:[ui,gt],ordinal:[ui,ko,dr,gt]},ms:{cardinal:[gt],ordinal:[ui,gt]},mt:{cardinal:[ui,ko,dr,hr,gt],ordinal:[gt]},my:Qr,nah:Et,naq:Vd,nb:Et,nd:Et,ne:Jh,nl:Et,nn:Et,nnh:Et,no:Et,nqo:Qr,nr:Et,nso:Et,ny:Et,nyn:Et,om:Et,or:{cardinal:[ui,gt],ordinal:[ui,ko,dr,hr,gt]},os:Et,osa:Qr,pa:Et,pap:Et,pcm:Et,pl:{cardinal:[ui,dr,hr,gt],ordinal:[gt]},prg:{cardinal:[Up,ui,gt],ordinal:[gt]},ps:Et,pt:{cardinal:[ui,hr,gt],ordinal:[gt]},pt_PT:{cardinal:[ui,hr,gt],ordinal:[gt]},rm:Et,ro:{cardinal:[ui,dr,gt],ordinal:[ui,gt]},rof:Et,ru:{cardinal:[ui,dr,hr,gt],ordinal:[gt]},rwk:Et,sah:Qr,saq:Et,sat:Vd,sc:{cardinal:[ui,gt],ordinal:[hr,gt]},scn:{cardinal:[ui,gt],ordinal:[hr,gt]},sd:Et,sdh:Et,se:Vd,seh:Et,ses:Qr,sg:Qr,sh:{cardinal:[ui,dr,gt],ordinal:[gt]},shi:{cardinal:[ui,dr,gt],ordinal:[gt]},si:Et,sk:{cardinal:[ui,dr,hr,gt],ordinal:[gt]},sl:{cardinal:[ui,ko,dr,gt],ordinal:[gt]},sma:Vd,smi:Vd,smj:Vd,smn:Vd,sms:Vd,sn:Et,so:Et,sq:{cardinal:[ui,gt],ordinal:[ui,hr,gt]},sr:{cardinal:[ui,dr,gt],ordinal:[gt]},ss:Et,ssy:Et,st:Et,su:Qr,sv:Jh,sw:Et,syr:Et,ta:Et,te:Et,teo:Et,th:Qr,ti:Et,tig:Et,tk:{cardinal:[ui,gt],ordinal:[dr,gt]},tl:Jh,tn:Et,to:Qr,tpi:Qr,tr:Et,ts:Et,tzm:Et,ug:Et,uk:{cardinal:[ui,dr,hr,gt],ordinal:[dr,gt]},und:Qr,ur:Et,uz:Et,ve:Et,vec:{cardinal:[ui,hr,gt],ordinal:[hr,gt]},vi:{cardinal:[gt],ordinal:[ui,gt]},vo:Et,vun:Et,wa:Et,wae:Et,wo:Qr,xh:Et,xog:Et,yi:Et,yo:Qr,yue:Qr,zh:Qr,zu:Et});let _i=(w,E)=>E?"other":w==1?"one":"other",Hp=(w,E)=>E?"other":w==0||w==1?"one":"other",J0=(w,E)=>E?"other":w>=0&&w<=1?"one":"other",rc=(w,E)=>{let k=String(w).split("."),A=!k[1];return E?"other":w==1&&A?"one":"other"},Kr=(w,E)=>"other",qp=(w,E)=>E?"other":w==1?"one":w==2?"two":"other";var Wx=Object.freeze({__proto__:null,af:_i,ak:Hp,am:J0,an:_i,ar:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-2);return E?"other":w==0?"zero":w==1?"one":w==2?"two":P>=3&&P<=10?"few":P>=11&&P<=99?"many":"other"},ars:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-2);return E?"other":w==0?"zero":w==1?"one":w==2?"two":P>=3&&P<=10?"few":P>=11&&P<=99?"many":"other"},as:(w,E)=>E?w==1||w==5||w==7||w==8||w==9||w==10?"one":w==2||w==3?"two":w==4?"few":w==6?"many":"other":w>=0&&w<=1?"one":"other",asa:_i,ast:rc,az:(w,E)=>{let k=String(w).split("."),A=k[0],P=A.slice(-1),U=A.slice(-2),oe=A.slice(-3);return E?P==1||P==2||P==5||P==7||P==8||U==20||U==50||U==70||U==80?"one":P==3||P==4||oe==100||oe==200||oe==300||oe==400||oe==500||oe==600||oe==700||oe==800||oe==900?"few":A==0||P==6||U==40||U==60||U==90?"many":"other":w==1?"one":"other"},bal:(w,E)=>w==1?"one":"other",be:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-1),U=A&&k[0].slice(-2);return E?(P==2||P==3)&&U!=12&&U!=13?"few":"other":P==1&&U!=11?"one":P>=2&&P<=4&&(U<12||U>14)?"few":A&&P==0||P>=5&&P<=9||U>=11&&U<=14?"many":"other"},bem:_i,bez:_i,bg:_i,bho:Hp,bm:Kr,bn:(w,E)=>E?w==1||w==5||w==7||w==8||w==9||w==10?"one":w==2||w==3?"two":w==4?"few":w==6?"many":"other":w>=0&&w<=1?"one":"other",bo:Kr,br:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-1),U=A&&k[0].slice(-2),oe=A&&k[0].slice(-6);return E?"other":P==1&&U!=11&&U!=71&&U!=91?"one":P==2&&U!=12&&U!=72&&U!=92?"two":(P==3||P==4||P==9)&&(U<10||U>19)&&(U<70||U>79)&&(U<90||U>99)?"few":w!=0&&A&&oe==0?"many":"other"},brx:_i,bs:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=A.slice(-2),Ye=P.slice(-1),Kt=P.slice(-2);return E?"other":U&&oe==1&&Ee!=11||Ye==1&&Kt!=11?"one":U&&oe>=2&&oe<=4&&(Ee<12||Ee>14)||Ye>=2&&Ye<=4&&(Kt<12||Kt>14)?"few":"other"},ca:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?w==1||w==3?"one":w==2?"two":w==4?"few":"other":w==1&&P?"one":A!=0&&U==0&&P?"many":"other"},ce:_i,ceb:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=P.slice(-1);return E?"other":U&&(A==1||A==2||A==3)||U&&oe!=4&&oe!=6&&oe!=9||!U&&Ee!=4&&Ee!=6&&Ee!=9?"one":"other"},cgg:_i,chr:_i,ckb:_i,cs:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1];return E?"other":w==1&&P?"one":A>=2&&A<=4&&P?"few":P?"other":"many"},cy:(w,E)=>E?w==0||w==7||w==8||w==9?"zero":w==1?"one":w==2?"two":w==3||w==4?"few":w==5||w==6?"many":"other":w==0?"zero":w==1?"one":w==2?"two":w==3?"few":w==6?"many":"other",da:(w,E)=>{let k=String(w).split("."),A=k[0],P=Number(k[0])==w;return E?"other":w==1||!P&&(A==0||A==1)?"one":"other"},de:rc,doi:J0,dsb:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-2),Ee=P.slice(-2);return E?"other":U&&oe==1||Ee==1?"one":U&&oe==2||Ee==2?"two":U&&(oe==3||oe==4)||Ee==3||Ee==4?"few":"other"},dv:_i,dz:Kr,ee:_i,el:_i,en:(w,E)=>{let k=String(w).split("."),A=!k[1],P=Number(k[0])==w,U=P&&k[0].slice(-1),oe=P&&k[0].slice(-2);return E?U==1&&oe!=11?"one":U==2&&oe!=12?"two":U==3&&oe!=13?"few":"other":w==1&&A?"one":"other"},eo:_i,es:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?"other":w==1?"one":A!=0&&U==0&&P?"many":"other"},et:rc,eu:_i,fa:J0,ff:(w,E)=>E?"other":w>=0&&w<2?"one":"other",fi:rc,fil:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=P.slice(-1);return E?w==1?"one":"other":U&&(A==1||A==2||A==3)||U&&oe!=4&&oe!=6&&oe!=9||!U&&Ee!=4&&Ee!=6&&Ee!=9?"one":"other"},fo:_i,fr:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?w==1?"one":"other":w>=0&&w<2?"one":A!=0&&U==0&&P?"many":"other"},fur:_i,fy:rc,ga:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w;return E?w==1?"one":"other":w==1?"one":w==2?"two":A&&w>=3&&w<=6?"few":A&&w>=7&&w<=10?"many":"other"},gd:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w;return E?w==1||w==11?"one":w==2||w==12?"two":w==3||w==13?"few":"other":w==1||w==11?"one":w==2||w==12?"two":A&&w>=3&&w<=10||A&&w>=13&&w<=19?"few":"other"},gl:rc,gsw:_i,gu:(w,E)=>E?w==1?"one":w==2||w==3?"two":w==4?"few":w==6?"many":"other":w>=0&&w<=1?"one":"other",guw:Hp,gv:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-1),oe=A.slice(-2);return E?"other":P&&U==1?"one":P&&U==2?"two":P&&(oe==0||oe==20||oe==40||oe==60||oe==80)?"few":P?"other":"many"},ha:_i,haw:_i,he:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1];
12return E?"other":A==1&&P||A==0&&!P?"one":A==2&&P?"two":"other"},hi:(w,E)=>E?w==1?"one":w==2||w==3?"two":w==4?"few":w==6?"many":"other":w>=0&&w<=1?"one":"other",hnj:Kr,hr:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=A.slice(-2),Ye=P.slice(-1),Kt=P.slice(-2);return E?"other":U&&oe==1&&Ee!=11||Ye==1&&Kt!=11?"one":U&&oe>=2&&oe<=4&&(Ee<12||Ee>14)||Ye>=2&&Ye<=4&&(Kt<12||Kt>14)?"few":"other"},hsb:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-2),Ee=P.slice(-2);return E?"other":U&&oe==1||Ee==1?"one":U&&oe==2||Ee==2?"two":U&&(oe==3||oe==4)||Ee==3||Ee==4?"few":"other"},hu:(w,E)=>E?w==1||w==5?"one":"other":w==1?"one":"other",hy:(w,E)=>E?w==1?"one":"other":w>=0&&w<2?"one":"other",ia:rc,id:Kr,ig:Kr,ii:Kr,io:rc,is:(w,E)=>{let k=String(w).split("."),A=k[0],P=(k[1]||"").replace(/0+$/,""),U=Number(k[0])==w,oe=A.slice(-1),Ee=A.slice(-2);return E?"other":U&&oe==1&&Ee!=11||P%10==1&&P%100!=11?"one":"other"},it:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?w==11||w==8||w==80||w==800?"many":"other":w==1&&P?"one":A!=0&&U==0&&P?"many":"other"},iu:qp,ja:Kr,jbo:Kr,jgo:_i,jmc:_i,jv:Kr,jw:Kr,ka:(w,E)=>{let k=String(w).split("."),A=k[0],P=A.slice(-2);return E?A==1?"one":A==0||P>=2&&P<=20||P==40||P==60||P==80?"many":"other":w==1?"one":"other"},kab:(w,E)=>E?"other":w>=0&&w<2?"one":"other",kaj:_i,kcg:_i,kde:Kr,kea:Kr,kk:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-1);return E?P==6||P==9||A&&P==0&&w!=0?"many":"other":w==1?"one":"other"},kkj:_i,kl:_i,km:Kr,kn:J0,ko:Kr,ks:_i,ksb:_i,ksh:(w,E)=>E?"other":w==0?"zero":w==1?"one":"other",ku:_i,kw:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-2),U=A&&k[0].slice(-3),oe=A&&k[0].slice(-5),Ee=A&&k[0].slice(-6);return E?A&&w>=1&&w<=4||P>=1&&P<=4||P>=21&&P<=24||P>=41&&P<=44||P>=61&&P<=64||P>=81&&P<=84?"one":w==5||P==5?"many":"other":w==0?"zero":w==1?"one":P==2||P==22||P==42||P==62||P==82||A&&U==0&&(oe>=1e3&&oe<=2e4||oe==4e4||oe==6e4||oe==8e4)||w!=0&&Ee==1e5?"two":P==3||P==23||P==43||P==63||P==83?"few":w!=1&&(P==1||P==21||P==41||P==61||P==81)?"many":"other"},ky:_i,lag:(w,E)=>{let k=String(w).split("."),A=k[0];return E?"other":w==0?"zero":(A==0||A==1)&&w!=0?"one":"other"},lb:_i,lg:_i,lij:(w,E)=>{let k=String(w).split("."),A=!k[1],P=Number(k[0])==w;return E?w==11||w==8||P&&w>=80&&w<=89||P&&w>=800&&w<=899?"many":"other":w==1&&A?"one":"other"},lkt:Kr,ln:Hp,lo:(w,E)=>E&&w==1?"one":"other",lt:(w,E)=>{let k=String(w).split("."),A=k[1]||"",P=Number(k[0])==w,U=P&&k[0].slice(-1),oe=P&&k[0].slice(-2);return E?"other":U==1&&(oe<11||oe>19)?"one":U>=2&&U<=9&&(oe<11||oe>19)?"few":A!=0?"many":"other"},lv:(w,E)=>{let k=String(w).split("."),A=k[1]||"",P=A.length,U=Number(k[0])==w,oe=U&&k[0].slice(-1),Ee=U&&k[0].slice(-2),Ye=A.slice(-2),Kt=A.slice(-1);return E?"other":U&&oe==0||Ee>=11&&Ee<=19||P==2&&Ye>=11&&Ye<=19?"zero":oe==1&&Ee!=11||P==2&&Kt==1&&Ye!=11||P!=2&&Kt==1?"one":"other"},mas:_i,mg:Hp,mgo:_i,mk:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=A.slice(-2),Ye=P.slice(-1),Kt=P.slice(-2);return E?oe==1&&Ee!=11?"one":oe==2&&Ee!=12?"two":(oe==7||oe==8)&&Ee!=17&&Ee!=18?"many":"other":U&&oe==1&&Ee!=11||Ye==1&&Kt!=11?"one":"other"},ml:_i,mn:_i,mo:(w,E)=>{let k=String(w).split("."),A=!k[1],P=Number(k[0])==w,U=P&&k[0].slice(-2);return E?w==1?"one":"other":w==1&&A?"one":!A||w==0||w!=1&&U>=1&&U<=19?"few":"other"},mr:(w,E)=>E?w==1?"one":w==2||w==3?"two":w==4?"few":"other":w==1?"one":"other",ms:(w,E)=>E&&w==1?"one":"other",mt:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-2);return E?"other":w==1?"one":w==2?"two":w==0||P>=3&&P<=10?"few":P>=11&&P<=19?"many":"other"},my:Kr,nah:_i,naq:qp,nb:_i,nd:_i,ne:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w;return E?A&&w>=1&&w<=4?"one":"other":w==1?"one":"other"},nl:rc,nn:_i,nnh:_i,no:_i,nqo:Kr,nr:_i,nso:Hp,ny:_i,nyn:_i,om:_i,or:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w;return E?w==1||w==5||A&&w>=7&&w<=9?"one":w==2||w==3?"two":w==4?"few":w==6?"many":"other":w==1?"one":"other"},os:_i,osa:Kr,pa:Hp,pap:_i,pcm:J0,pl:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-1),oe=A.slice(-2);return E?"other":w==1&&P?"one":P&&U>=2&&U<=4&&(oe<12||oe>14)?"few":P&&A!=1&&(U==0||U==1)||P&&U>=5&&U<=9||P&&oe>=12&&oe<=14?"many":"other"},prg:(w,E)=>{let k=String(w).split("."),A=k[1]||"",P=A.length,U=Number(k[0])==w,oe=U&&k[0].slice(-1),Ee=U&&k[0].slice(-2),Ye=A.slice(-2),Kt=A.slice(-1);return E?"other":U&&oe==0||Ee>=11&&Ee<=19||P==2&&Ye>=11&&Ye<=19?"zero":oe==1&&Ee!=11||P==2&&Kt==1&&Ye!=11||P!=2&&Kt==1?"one":"other"},ps:_i,pt:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?"other":A==0||A==1?"one":A!=0&&U==0&&P?"many":"other"},pt_PT:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?"other":w==1&&P?"one":A!=0&&U==0&&P?"many":"other"},rm:_i,ro:(w,E)=>{let k=String(w).split("."),A=!k[1],P=Number(k[0])==w,U=P&&k[0].slice(-2);return E?w==1?"one":"other":w==1&&A?"one":!A||w==0||w!=1&&U>=1&&U<=19?"few":"other"},rof:_i,ru:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-1),oe=A.slice(-2);return E?"other":P&&U==1&&oe!=11?"one":P&&U>=2&&U<=4&&(oe<12||oe>14)?"few":P&&U==0||P&&U>=5&&U<=9||P&&oe>=11&&oe<=14?"many":"other"},rwk:_i,sah:Kr,saq:_i,sat:qp,sc:(w,E)=>{let k=String(w).split("."),A=!k[1];return E?w==11||w==8||w==80||w==800?"many":"other":w==1&&A?"one":"other"},scn:(w,E)=>{let k=String(w).split("."),A=!k[1];return E?w==11||w==8||w==80||w==800?"many":"other":w==1&&A?"one":"other"},sd:_i,sdh:_i,se:qp,seh:_i,ses:Kr,sg:Kr,sh:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=A.slice(-2),Ye=P.slice(-1),Kt=P.slice(-2);return E?"other":U&&oe==1&&Ee!=11||Ye==1&&Kt!=11?"one":U&&oe>=2&&oe<=4&&(Ee<12||Ee>14)||Ye>=2&&Ye<=4&&(Kt<12||Kt>14)?"few":"other"},shi:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w;return E?"other":w>=0&&w<=1?"one":A&&w>=2&&w<=10?"few":"other"},si:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"";return E?"other":w==0||w==1||A==0&&P==1?"one":"other"},sk:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1];return E?"other":w==1&&P?"one":A>=2&&A<=4&&P?"few":P?"other":"many"},sl:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-2);return E?"other":P&&U==1?"one":P&&U==2?"two":P&&(U==3||U==4)||!P?"few":"other"},sma:qp,smi:qp,smj:qp,smn:qp,sms:qp,sn:_i,so:_i,sq:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-1),U=A&&k[0].slice(-2);return E?w==1?"one":P==4&&U!=14?"many":"other":w==1?"one":"other"},sr:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=A.slice(-2),Ye=P.slice(-1),Kt=P.slice(-2);return E?"other":U&&oe==1&&Ee!=11||Ye==1&&Kt!=11?"one":U&&oe>=2&&oe<=4&&(Ee<12||Ee>14)||Ye>=2&&Ye<=4&&(Kt<12||Kt>14)?"few":"other"},ss:_i,ssy:_i,st:_i,su:Kr,sv:(w,E)=>{let k=String(w).split("."),A=!k[1],P=Number(k[0])==w,U=P&&k[0].slice(-1),oe=P&&k[0].slice(-2);return E?(U==1||U==2)&&oe!=11&&oe!=12?"one":"other":w==1&&A?"one":"other"},sw:rc,syr:_i,ta:_i,te:_i,teo:_i,th:Kr,ti:Hp,tig:_i,tk:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w,P=A&&k[0].slice(-1);return E?P==6||P==9||w==10?"few":"other":w==1?"one":"other"},tl:(w,E)=>{let k=String(w).split("."),A=k[0],P=k[1]||"",U=!k[1],oe=A.slice(-1),Ee=P.slice(-1);return E?w==1?"one":"other":U&&(A==1||A==2||A==3)||U&&oe!=4&&oe!=6&&oe!=9||!U&&Ee!=4&&Ee!=6&&Ee!=9?"one":"other"},tn:_i,to:Kr,tpi:Kr,tr:_i,ts:_i,tzm:(w,E)=>{let k=String(w).split("."),A=Number(k[0])==w;return E?"other":w==0||w==1||A&&w>=11&&w<=99?"one":"other"},ug:_i,uk:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=Number(k[0])==w,oe=U&&k[0].slice(-1),Ee=U&&k[0].slice(-2),Ye=A.slice(-1),Kt=A.slice(-2);return E?oe==3&&Ee!=13?"few":"other":P&&Ye==1&&Kt!=11?"one":P&&Ye>=2&&Ye<=4&&(Kt<12||Kt>14)?"few":P&&Ye==0||P&&Ye>=5&&Ye<=9||P&&Kt>=11&&Kt<=14?"many":"other"},und:Kr,ur:rc,uz:_i,ve:_i,vec:(w,E)=>{let k=String(w).split("."),A=k[0],P=!k[1],U=A.slice(-6);return E?w==11||w==8||w==80||w==800?"many":"other":w==1&&P?"one":A!=0&&U==0&&P?"many":"other"},vi:(w,E)=>E&&w==1?"one":"other",vo:_i,vun:_i,wa:Hp,wae:_i,wo:Kr,xh:_i,xog:_i,yi:rc,yo:Kr,yue:Kr,zh:Kr,zu:J0});
12function JM(w){if(typeof w!="string"||w.length<2)throw new RangeError("Invalid language tag: ".concat(w));if(w.startsWith("pt-PT"))return"pt-PT";var E=w.match(/.+?(?=[-_])/);return E?E[0]:w}function Yx(w){if(typeof w=="function"){var E=JM(w.name);return{isDefault:!1,id:mu(E),lc:E,locale:w.name,getPlural:w,cardinals:w.cardinals||[],ordinals:w.ordinals||[]}}var k=JM(w),A=mu(k);return QK(A)?{isDefault:!0,id:A,lc:k,locale:w,getCardinal:qK[A],getPlural:Wx[A],cardinals:QL[A].cardinal,ordinals:QL[A].ordinal}:null}function WK(w){var E=Object.keys(Wx).filter(function(k){return k!==w});return E.unshift(w),E.map(Yx)}function YK(w){var E=JM(w);return mu(E)in Wx}function QK(w){return w in Wx}var KK=function(){function w(E,k){if(this.plurals=[],this.options=Object.assign({biDiSupport:!1,currency:"USD",customFormatters:{},localeCodeFromKey:null,requireAllArguments:!1,returnType:"string",strict:k&&k.strictNumberSign||!1,strictPluralKeys:!0},k),E==="*")this.plurals=WK(w.defaultLocale);else if(Array.isArray(E))this.plurals=E.map(Yx).filter(Boolean);else if(E){var A=Yx(E);A&&(this.plurals=[A])}if(this.plurals.length===0){var A=Yx(w.defaultLocale);this.plurals=[A]}}return w.escape=function(E,k){var A=k?/[#{}]/g:/[{}]/g;return String(E).replace(A,"'$&'")},w.supportedLocalesOf=function(E){var k=Array.isArray(E)?E:[E];return k.filter(YK)},w.prototype.resolvedOptions=function(){return n(n({},this.options),{locale:this.plurals[0].locale,plurals:this.plurals})},w.prototype.compile=function(E){var k,A,P=new HK(this.options),U="return "+P.compile(E,this.plurals[0]),oe=[],Ee=[];try{for(var Ye=t(Object.entries(P.runtime)),Kt=Ye.next();!Kt.done;Kt=Ye.next()){var nn=r(Kt.value,2),Bn=nn[0],Zn=nn[1];oe.push(Bn),Ee.push(Zn)}}catch(so){k={error:so}}finally{try{Kt&&!Kt.done&&(A=Ye.return)&&A.call(Ye)}finally{if(k)throw k.error}}var Ii=new(Function.bind.apply(Function,e(e([void 0],r(oe),!1),[U],!1)));return Ii.apply(void 0,e([],r(Ee),!1))},w.defaultLocale="en",w}();return KK})});var sK=rf((aK,$M)=>{y();(function(n,t){typeof define=="function"&&define.amd?define([],t):typeof $M=="object"&&$M.exports?$M.exports=t():n.moo=t()})(aK,function(){"use strict";var n=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=typeof new RegExp().sticky=="boolean";function e(Oe){return Oe&&t.call(Oe)==="[object RegExp]"}function i(Oe){return Oe&&typeof Oe=="object"&&!e(Oe)&&!Array.isArray(Oe)}function o(Oe){return Oe.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(Oe){var wt=new RegExp("|"+Oe);return wt.exec("").length-1}function s(Oe){return"("+Oe+")"}function c(Oe){if(!Oe.length)return"(?!)";var wt=Oe.map(function(ei){return"(?:"+ei+")"}).join("|");return"(?:"+wt+")"}function u(Oe){if(typeof Oe=="string")return"(?:"+o(Oe)+")";if(e(Oe)){if(Oe.ignoreCase)throw new Error("RegExp /i flag not allowed");if(Oe.global)throw new Error("RegExp /g flag is implied");if(Oe.sticky)throw new Error("RegExp /y flag is implied");if(Oe.multiline)throw new Error("RegExp /m flag is implied");return Oe.source}else throw new Error("Not a pattern: "+Oe)}function f(Oe,wt){return Oe.length>wt?Oe:Array(wt-Oe.length+1).join(" ")+Oe}function _(Oe,wt){for(var ei=Oe.length,wi=0;;){var pn=Oe.lastIndexOf(`
13`,ei-1);if(pn===-1||(wi++,ei=pn,wi===wt)||ei===0)break}var Ki=wi<wt?0:ei+1;return Oe.substring(Ki).split(`
14`)}function I(Oe){for(var wt=Object.getOwnPropertyNames(Oe),ei=[],wi=0;wi<wt.length;wi++){var pn=wt[wi],Ki=Oe[pn],It=[].concat(Ki);if(pn==="include"){for(var ai=0;ai<It.length;ai++)ei.push({include:It[ai]});continue}var ti=[];It.forEach(function(ri){i(ri)?(ti.length&&ei.push(F(pn,ti)),ei.push(F(pn,ri)),ti=[]):ti.push(ri)}),ti.length&&ei.push(F(pn,ti))}return ei}function S(Oe){for(var wt=[],ei=0;ei<Oe.length;ei++){var wi=Oe[ei];if(wi.include){for(var pn=[].concat(wi.include),Ki=0;Ki<pn.length;Ki++)wt.push({include:pn[Ki]});continue}if(!wi.type)throw new Error("Rule has no type: "+JSON.stringify(wi));wt.push(F(wi.type,wi))}return wt}function F(Oe,wt){if(i(wt)||(wt={match:wt}),wt.include)throw new Error("Matching rules cannot also include states");var ei={defaultType:Oe,lineBreaks:!!wt.error||!!wt.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var wi in wt)n.call(wt,wi)&&(ei[wi]=wt[wi]);if(typeof ei.type=="string"&&Oe!==ei.type)throw new Error("Type transform cannot be a string (type '"+ei.type+"' for token '"+Oe+"')");var pn=ei.match;return ei.match=Array.isArray(pn)?pn:pn?[pn]:[],ei.match.sort(function(Ki,It){return e(Ki)&&e(It)?0:e(It)?-1:e(Ki)?1:It.length-Ki.length}),ei}function H(Oe){return Array.isArray(Oe)?S(Oe):I(Oe)}var q=F("error",{lineBreaks:!0,shouldThrow:!0});function ee(Oe,wt){for(var ei=null,wi=Object.create(null),pn=!0,Ki=null,It=[],ai=[],ti=0;ti<Oe.length;ti++)Oe[ti].fallback&&(pn=!1);for(var ti=0;ti<Oe.length;ti++){var ri=Oe[ti];if(ri.include)throw new Error("Inheritance is not allowed in stateless lexers");if(ri.error||ri.fallback){if(ei)throw!ri.fallback==!ei.fallback?new Error("Multiple "+(ri.fallback?"fallback":"error")+" rules not allowed (for token '"+ri.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+ri.defaultType+"')");ei=ri}var li=ri.match.slice();if(pn)for(;li.length&&typeof li[0]=="string"&&li[0].length===1;){var rn=li.shift();
vendor: 8,597 bytes, lines 14-19
14wi[rn.charCodeAt(0)]=ri}if(ri.pop||ri.push||ri.next){if(!wt)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+ri.defaultType+"')");if(ri.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+ri.defaultType+"')")}if(li.length!==0){pn=!1,It.push(ri);for(var ji=0;ji<li.length;ji++){var Gt=li[ji];if(e(Gt)){if(Ki===null)Ki=Gt.unicode;else if(Ki!==Gt.unicode&&ri.fallback===!1)throw new Error("If one rule is /u then all must be")}}var di=c(li.map(u)),er=new RegExp(di);if(er.test(""))throw new Error("RegExp matches empty string: "+er);var Ln=a(di);if(Ln>0)throw new Error("RegExp has capture groups: "+er+`
15Use (?: \u2026 ) instead`);if(!ri.lineBreaks&&er.test(`
16`))throw new Error("Rule should declare lineBreaks: "+er);ai.push(s(di))}}var gn=ei&&ei.fallback,Cr=r&&!gn?"ym":"gm",cr=r||gn?"":"|";Ki===!0&&(Cr+="u");var Vs=new RegExp(c(ai)+cr,Cr);return{regexp:Vs,groups:It,fast:wi,error:ei||q}}function Ie(Oe){var wt=ee(H(Oe));return new ue({start:wt},"start")}function He(Oe,wt,ei){var wi=Oe&&(Oe.push||Oe.next);if(wi&&!ei[wi])throw new Error("Missing state '"+wi+"' (in token '"+Oe.defaultType+"' of state '"+wt+"')");if(Oe&&Oe.pop&&+Oe.pop!=1)throw new Error("pop must be 1 (in token '"+Oe.defaultType+"' of state '"+wt+"')")}function Le(Oe,wt){var ei=Oe.$all?H(Oe.$all):[];delete Oe.$all;var wi=Object.getOwnPropertyNames(Oe);wt||(wt=wi[0]);for(var pn=Object.create(null),Ki=0;Ki<wi.length;Ki++){var It=wi[Ki];pn[It]=H(Oe[It]).concat(ei)}for(var Ki=0;Ki<wi.length;Ki++)for(var It=wi[Ki],ai=pn[It],ti=Object.create(null),ri=0;ri<ai.length;ri++){var li=ai[ri];if(li.include){var rn=[ri,1];if(li.include!==It&&!ti[li.include]){ti[li.include]=!0;var ji=pn[li.include];if(!ji)throw new Error("Cannot include nonexistent state '"+li.include+"' (in state '"+It+"')");for(var Gt=0;Gt<ji.length;Gt++){var di=ji[Gt];ai.indexOf(di)===-1&&rn.push(di)}}ai.splice.apply(ai,rn),ri--}}for(var er=Object.create(null),Ki=0;Ki<wi.length;Ki++){var It=wi[Ki];er[It]=ee(pn[It],!0)}for(var Ki=0;Ki<wi.length;Ki++){for(var Ln=wi[Ki],gn=er[Ln],Cr=gn.groups,ri=0;ri<Cr.length;ri++)He(Cr[ri],Ln,er);for(var cr=Object.getOwnPropertyNames(gn.fast),ri=0;ri<cr.length;ri++)He(gn.fast[cr[ri]],Ln,er)}return new ue(er,wt)}function qe(Oe){for(var wt=typeof Map<"u",ei=wt?new Map:Object.create(null),wi=Object.getOwnPropertyNames(Oe),pn=0;pn<wi.length;pn++){var Ki=wi[pn],It=Oe[Ki],ai=Array.isArray(It)?It:[It];ai.forEach(function(ti){if(typeof ti!="string")throw new Error("keyword must be string (in keyword '"+Ki+"')");wt?ei.set(ti,Ki):ei[ti]=Ki})}return function(ti){return wt?ei.get(ti):ei[ti]}}var ue=function(Oe,wt){this.startState=wt,this.states=Oe,this.buffer="",this.stack=[],this.reset()};ue.prototype.reset=function(Oe,wt){return this.buffer=Oe||"",this.index=0,this.line=wt?wt.line:1,this.col=wt?wt.col:1,this.queuedToken=wt?wt.queuedToken:null,this.queuedText=wt?wt.queuedText:"",this.queuedThrow=wt?wt.queuedThrow:null,this.setState(wt?wt.state:this.startState),this.stack=wt&&wt.stack?wt.stack.slice():[],this},ue.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},ue.prototype.setState=function(Oe){if(!(!Oe||this.state===Oe)){this.state=Oe;var wt=this.states[Oe];this.groups=wt.groups,this.error=wt.error,this.re=wt.regexp,this.fast=wt.fast}},ue.prototype.popState=function(){this.setState(this.stack.pop())},ue.prototype.pushState=function(Oe){this.stack.push(this.state),this.setState(Oe)};var Ne=r?function(Oe,wt){return Oe.exec(wt)}:function(Oe,wt){var ei=Oe.exec(wt);return ei[0].length===0?null:ei};ue.prototype._getGroup=function(Oe){for(var wt=this.groups.length,ei=0;ei<wt;ei++)if(Oe[ei+1]!==void 0)return this.groups[ei];throw new Error("Cannot find token type for matched text")};function st(){return this.value}if(ue.prototype.next=function(){var Oe=this.index;if(this.queuedGroup){var wt=this._token(this.queuedGroup,this.queuedText,Oe);return this.queuedGroup=null,this.queuedText="",wt}var ei=this.buffer;if(Oe!==ei.length){var It=this.fast[ei.charCodeAt(Oe)];if(It)return this._token(It,ei.charAt(Oe),Oe);var wi=this.re;wi.lastIndex=Oe;var pn=Ne(wi,ei),Ki=this.error;if(pn==null)return this._token(Ki,ei.slice(Oe,ei.length),Oe);var It=this._getGroup(pn),ai=pn[0];return Ki.fallback&&pn.index!==Oe?(this.queuedGroup=It,this.queuedText=ai,this._token(Ki,ei.slice(Oe,pn.index),Oe)):this._token(It,ai,Oe)}},ue.prototype._token=function(Oe,wt,ei){var wi=0;if(Oe.lineBreaks){var pn=/\n/g,Ki=1;if(wt===`
17`)wi=1;else for(;pn.exec(wt);)wi++,Ki=pn.lastIndex}var It={type:typeof Oe.type=="function"&&Oe.type(wt)||Oe.defaultType,value:typeof Oe.value=="function"?Oe.value(wt):wt,text:wt,toString:st,offset:ei,lineBreaks:wi,line:this.line,col:this.col},ai=wt.length;if(this.index+=ai,this.line+=wi,wi!==0?this.col=ai-Ki+1:this.col+=ai,Oe.shouldThrow){var ti=new Error(this.formatError(It,"invalid syntax"));throw ti}return Oe.pop?this.popState():Oe.push?this.pushState(Oe.push):Oe.next&&this.setState(Oe.next),It},typeof Symbol<"u"&&Symbol.iterator){var Ui=function(Oe){this.lexer=Oe};Ui.prototype.next=function(){var Oe=this.lexer.next();return{value:Oe,done:!Oe}},Ui.prototype[Symbol.iterator]=function(){return this},ue.prototype[Symbol.iterator]=function(){return new Ui(this)}}return ue.prototype.formatError=function(Oe,wt){if(Oe==null)var ei=this.buffer.slice(this.index),Oe={text:ei,offset:this.index,lineBreaks:ei.indexOf(`
18`)===-1?0:1,line:this.line,col:this.col};var wi=2,pn=Math.max(Oe.line-wi,1),Ki=Oe.line+wi,It=String(Ki).length,ai=_(this.buffer,this.line-Oe.line+wi+1).slice(0,5),ti=[];ti.push(wt+" at line "+Oe.line+" col "+Oe.col+":"),ti.push("");for(var ri=0;ri<ai.length;ri++){var li=ai[ri],rn=pn+ri;ti.push(f(String(rn),It)+"  "+li),rn===Oe.line&&ti.push(f("",It+Oe.col+1)+"^")}return ti.join(`
19`)},ue.prototype.clone=function(){return new ue(this.states,this.state)},ue.prototype.has=function(Oe){return!0},{compile:Ie,states:Le,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:qe}})});var lK=rf(du=>{"use strict";y();var a3e=du&&du.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(du,"__esModule",{value:!0});du.lexer=du.states=void 0;var s3e=a3e(sK());du.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:n=>n.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:n=>n.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:n=>n.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:n=>n.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:n=>n.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:n=>n.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:n=>n.substring(0,n.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}};du.lexer=s3e.default.states(du.states)});var pK=rf(Oy=>{"use strict";y();Object.defineProperty(Oy,"__esModule",{value:!0});Oy.parse=Oy.ParseError=void 0;var dK=lK(),UM=n=>({offset:n.offset,line:n.line,col:n.col,text:n.text,lineBreaks:n.lineBreaks}),GL=n=>n==="plural"||n==="select"||n==="selectordinal";function l3e(n,t){let r="",e="";for(let o of t){let a=o.ctx.text;switch(e+=a,o.type){case"content":r+=o.value;break;case"argument":case"function":case"octothorpe":r+=a;break;default:throw new Da(n,`Unsupported part in strict mode function arg style: ${a}`)}}return[{type:"content",value:r.trim(),ctx:Object.assign({},t[0].ctx,{text:e})}]}var c3e=["number","date","time","spellout","ordinal","duration"],cK=["zero","one","two","few","many","other"],Da=class extends Error{constructor(t,r){super(dK.lexer.formatError(t,r))}};Oy.ParseError=Da;var zL=class{constructor(t,r){var e,i,o,a;this.lexer=dK.lexer.reset(t),this.cardinalKeys=(e=r?.cardinal)!==null&&e!==void 0?e:cK,this.ordinalKeys=(i=r?.ordinal)!==null&&i!==void 0?i:cK,this.strict=(o=r?.strict)!==null&&o!==void 0?o:!1,this.strictPluralKeys=(a=r?.strictPluralKeys)!==null&&a!==void 0?a:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(t,r,e){if(e[0]==="="){if(r==="select")throw new Da(t,`The case ${e}
19 is not valid with select`)}else if(r!=="select"){let i=r==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&i.length>0&&!i.includes(e)){let o=`The ${r} case ${e} is not valid in this locale`;throw new Da(t,o)}}}parseSelect({value:t},r,e,i){let o={type:i,arg:t,cases:[],ctx:e};i==="plural"||i==="selectordinal"?r=!0:this.strict&&(r=!1);for(let a of this.lexer)switch(a.type){case"offset":if(i==="select")throw new Da(a,"Unexpected plural offset for select");if(o.cases.length>0)throw new Da(a,"Plural offset must be set before cases");o.pluralOffset=Number(a.value),e.text+=a.text,e.lineBreaks+=a.lineBreaks;break;case"case":{this.checkSelectKey(a,i,a.value),o.cases.push({key:a.value,tokens:this.parseBody(r),ctx:UM(a)});break}case"end":return o;default:throw new Da(a,`Unexpected lexer token: ${a.type}`)}throw new Da(null,"Unexpected message end")}parseArgToken(t,r){let e=UM(t),i=this.lexer.next();if(!i)throw new Da(null,"Unexpected message end");if(e.text+=i.text,e.lineBreaks+=i.lineBreaks,this.strict&&(i.type==="func-simple"||i.type==="func-args")&&!c3e.includes(i.value)){let o=`Invalid strict mode function arg type: ${i.value}`;throw new Da(t,o)}switch(i.type){case"end":return{type:"argument",arg:t.value,ctx:e};case"func-simple":{let o=this.lexer.next();if(!o)throw new Da(null,"Unexpected message end");if(o.type!=="end")throw new Da(o,`Unexpected lexer token: ${o.type}`);if(e.text+=o.text,GL(i.value.toLowerCase()))throw new Da(i,`Invalid type identifier: ${i.value}`);return{type:"function",arg:t.value,key:i.value,ctx:e}}case"func-args":{if(GL(i.value.toLowerCase())){let a=`Invalid type identifier: ${i.value}`;throw new Da(i,a)}let o=this.parseBody(this.strict?!1:r);return this.strict&&o.length>0&&(o=l3e(t,o)),{type:"function",arg:t.value,key:i.value,param:o,ctx:e}}case"select":if(GL(i.value))return this.parseSelect(t,r,e,i.value);throw new Da(i,`Unexpected select type ${i.value}`);default:throw new Da(i,`Unexpected lexer token: ${i.type}`)}}parseBody(t,r){let e=[],i=null;
19for(let o of this.lexer)if(o.type==="argument")i&&(i=null),e.push(this.parseArgToken(o,t));else if(o.type==="octothorpe"&&t)i&&(i=null),e.push({type:"octothorpe",ctx:UM(o)});else{if(o.type==="end"&&!r)return e;{let a=o.value;if(!t&&o.type==="quoted"&&a[0]==="#"){if(a.includes("{")){let s=`Unsupported escape pattern: ${a}`;throw new Da(o,s)}a=o.text}i?(i.value+=a,i.ctx.text+=o.text,i.ctx.lineBreaks+=o.lineBreaks):(i={type:"content",value:a,ctx:UM(o)},e.push(i))}}if(r)return e;throw new Da(null,"Unexpected message end")}};function d3e(n,t={}){return new zL(n,t).parse()}Oy.parse=d3e});y();var U2={};Ae(U2,{MillisecondsToTimeStringPipe:()=>lm});y();var lm=(()=>{let t=class t{constructor(e){this.translate=e}transform(e,i=!1,o=!1){let{years:a,days:s,hours:c,minutes:u,seconds:f}=this.extractTimeUnits(e);return this.formatTimeString(a,s,c,u,f,i,o)}extractTimeUnits(e){let i=Math.floor(e/E2),o=Math.floor(e%E2/ff),a=Math.floor(e%ff/T2),s=Math.floor(e%T2/sC),c=Math.floor(e%sC/x5);return{years:i,days:o,hours:a,minutes:s,seconds:c}}formatTimeString(e,i,o,a,s,c,u){let f=[{value:e,key:"years",shortKey:"short.years"},{value:i,key:"days",shortKey:"short.days"},{value:o,key:"hours",shortKey:"short.hours"},{value:a,key:"minutes",shortKey:"short.minutes"},{value:s,key:"seconds",shortKey:"short.seconds"}],_="";for(let{value:I,key:S,shortKey:F}of f)if(I>0&&(_+=this.translate.instant(c?`timewindow.${F}`:`timewindow.${S}`,{[S]:I}),u))return _.trim();return _.length>0?_:this.translate.instant("timewindow.short.seconds",{seconds:0})}};t.\u0275fac=function(i){return new(i||t)(h(Ge,16))},t.\u0275pipe=_r({name:"milliSecondsToTimeString",type:t,pure:!0});let n=t;return n})();var Qj=(()=>{let t=class t{constructor(e,i){this.translate=e,this.millisecondsToTimeString=i}transform(e,i=!0,o=!0){let a=this.millisecondsToTimeString.transform(e-new Date().getTime(),i,o)??0;return this.translate.instant("common.time-left",{time:a})}};t.\u0275fac=function(i){return new(i||t)(h(Ge,16),h(lm,16))},t.\u0275pipe=_r({name:"durationLeft",type:t,pure:!1,standalone:!0});let n=t;return n})();y();var ZK={};Ae(ZK,{FooterComponent:()=>pT});y();var pT=(()=>{let t=class t{constructor(){this.year=new Date().getFullYear()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tb-footer"]],decls:3,vars:1,consts:[[1,"footer-text"]],template:function(i,o){i&1&&(d(0,"section",0)(1,"small"),g(2),p()()),i&2&&(l(2),j("Copyright \xA9 ",o.year," The ThingsBoard Authors"))},styles:['@charset "UTF-8";.footer-text[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:20px;margin:0;left:0;line-height:20px;text-align:center}.footer-text[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{font-size:14px;color:#98a6ad}']});let n=t;return n})();var JK={};Ae(JK,{LogoComponent:()=>mT});y();var mT=(()=>{let t=class t{constructor(){this.logo="assets/logo_title_white.svg"}gotoThingsboard(){window.open("https://thingsboard.io","_blank")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tb-logo"]],decls:1,vars:1,consts:[["aria-label","logo",1,"tb-logo-title","flex-1",3,"click","src"]],template:function(i,o){i&1&&(d(0,"img",0),T("click",function(){return o.gotoThingsboard()}),p()),i&2&&m("src",o.logo,yo)},styles:['@charset "UTF-8";.login-logo[_nghost-%COMP%]   img.tb-logo-title[_ngcontent-%COMP%], .login-logo   [_nghost-%COMP%]   img.tb-logo-title[_ngcontent-%COMP%]{width:280px;height:60px;text-decoration:none;cursor:pointer;border:none;transform:none}.login-logo[_nghost-%COMP%]   img.tb-logo-title[_ngcontent-%COMP%]:focus, .login-logo   [_nghost-%COMP%]   img.tb-logo-title[_ngcontent-%COMP%]:focus{outline:0}']});let n=t;return n})();var kf={};Ae(kf,{TbSnackBarComponent:()=>TC,ToastDirective:()=>xs,toastAnimations:()=>tG});y();var Jj={};Ae(Jj,{MAT_SNACK_BAR_DATA:()=>Nb,MAT_SNACK_BAR_DEFAULT_OPTIONS:()=>Zj,MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY:()=>Xj,MatSnackBar:()=>_T,MatSnackBarAction:()=>fT,MatSnackBarActions:()=>hT,MatSnackBarConfig:()=>Ef,MatSnackBarContainer:()=>bT,MatSnackBarLabel:()=>uT,MatSnackBarModule:()=>dm,MatSnackBarRef:()=>Ru,SimpleSnackBar:()=>gT,matSnackBarAnimations:()=>Kj});y();function eX(n,t){if(n&1){let r=B();d(0,"div",1)(1,"button",2),T("click",function(){D(r);let i=b();return M(i.action())}),g(2),p()()}
19if(n&2){let r=b();l(2),j(" ",r.data.action," ")}}var tX=["label"];function iX(n,t){}var nX=Math.pow(2,31)-1,Ru=class{constructor(t,r){this._overlayRef=r,this._afterDismissed=new Te,this._afterOpened=new Te,this._onAction=new Te,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,nX))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},Nb=new tt("MatSnackBarData"),Ef=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},uT=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0});let n=t;return n})(),hT=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0});let n=t;return n})(),fT=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0});let n=t;return n})(),gT=(()=>{let t=class t{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}};t.\u0275fac=function(i){return new(i||t)(h(Ru),h(Nb))},t.\u0275cmp=L({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[ot],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(i,o){i&1&&(d(0,"div",0),g(1),p(),x(2,eX,3,1,"div",1)),i&2&&(l(),j(" ",o.data.message,`
20`),l(),_t(o.hasAction?2:-1))},dependencies:[yt,uT,hT,fT],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0});let n=t;return n})(),Kj={snackBarState:Qn("state",[Ji("void, hidden",Tt({transform:"scale(0.8)",opacity:0}
20)),Ji("visible",Tt({transform:"scale(1)",opacity:1})),$i("* => visible",Vi("150ms cubic-bezier(0, 0, 0.2, 1)")),$i("* => void, * => hidden",Vi("75ms cubic-bezier(0.4, 0.0, 1, 1)",Tt({opacity:0})))])},rX=0,bT=(()=>{let t=class t extends nj{constructor(e,i,o,a,s){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=o,this._platform=a,this.snackBarConfig=s,this._document=Rt(Qi),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Te,this._onExit=new Te,this._onEnter=new Te,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${rX++}`,this.attachDomPortal=c=>{this._assertNotAttached();let u=this._portalOutlet.attachDomPortal(c);return this._afterPortalAttached(),u},s.politeness==="assertive"&&!s.announcementMessage?this._live="assertive":s.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){let{fromState:i,toState:o}=e;if((o==="void"&&i!=="void"||o==="hidden")&&this._completeExit(),o==="visible"){let a=this._onEnter;this._ngZone.run(()=>{a.next(),a.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(s=>e.classList.add(s)):e.classList.add(i)),this._exposeToModals();let o=this._label.nativeElement,a="mdc-snackbar__label";o.classList.toggle(a,!o.querySelector(`.${a}`))}_exposeToModals(){let e=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let o=0;o<i.length;o++){let a=i[o],s=a.getAttribute("aria-owns");this._trackedModals.add(a),s?s.indexOf(e)===-1&&a.setAttribute("aria-owns",s+" "+e):a.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let i=e.getAttribute("aria-owns");if(i){let o=i.replace(this._liveElementId,"").trim();o.length>0?e.setAttribute("aria-owns",o):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(o=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}};t.\u0275fac=function(i){return new(i||t)(h(Bt),h(ge),h(Me),h(Ur),h(Ef))},t.\u0275cmp=L({type:t,selectors:[["mat-snack-bar-container"]],viewQuery:function(i,o){if(i&1&&(ae(gl,7),ae(tX,7)),i&2){let a;Q(a=K())&&(o._portalOutlet=a.first),Q(a=K())&&(o._label=a.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(i,o){i&1&&cb("@state.done",function(s){return o.onAnimationEnd(s)}),i&2&&lb("@state",o._animationState)},standalone:!0,features:[Ce,ot],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(i,o){i&1&&(d(0,"div",1)(1,"div",2,0)(3,"div",3),x(4,iX,0,0,"ng-template",4),p(),O(5,"div"),p()()),i&2&&(l(5),Je("aria-live",o._live)("role",o._role)("id",o._liveElementId))},dependencies:[gl],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-app-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-app-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-app-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-app-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-app-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[Kj.snackBarState]}});let n=t;return n})();function Xj(){return new Ef}var Zj=new tt("mat-snack-bar-default-options",{providedIn:"root",factory:Xj}),_T=(()=>{let t=class t{get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(e,i,o,a,s,c){this._overlay=e,this._live=i,this._injector=o,this._breakpointObserver=a,this._parentSnackBar=s,this._defaultConfig=c,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=gT,this.snackBarContainerComponent=bT,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",o){let a=re(re({},this._defaultConfig),o);return a.data={message:e,action:i},a.announcementMessage===e&&(a.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,a)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){let o=i&&i.viewContainerRef&&i.viewContainerRef.injector,a=Mn.create({parent:o||this._injector,providers:[{provide:Ef,useValue:i}]}),s=new $a(this.snackBarContainerComponent,i.viewContainerRef,a),c=e.attach(s);return c.instance.snackBarConfig=i,c.instance}_attach(e,i){let o=re(re(re({},new Ef),this._defaultConfig),i),a=this._createOverlay(o),s=this._attachSnackBarContainer(a,o),c=new Ru(s,a);if(e instanceof an){let u=new us(e,null,{$implicit:o.data,snackBarRef:c});c.instance=s.attachTemplatePortal(u)}else{let u=this._createInjector(o,c),f=new $a(e,void 0,u),_=s.attachComponentPortal(f);c.instance=_.instance}return this._breakpointObserver.observe(JS.HandsetPortrait).pipe(Be(a.detachments())).subscribe(u=>{a.overlayElement.classList.toggle(this.handsetCssClass,u.matches)}),o.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(o.announcementMessage,o.politeness)}),this._animateSnackBar(c,o),this._openedSnackBarRef=c,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){let i=new Ha;i.direction=e.direction;let o=this._overlay.position().global(),a=e.direction==="rtl",s=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!a||e.horizontalPosition==="end"&&a,c=!s&&e.horizontalPosition!=="center";return s?o.left("0"):c?o.right("0"):o.centerHorizontally(),e.verticalPosition==="top"?o.top("0"):o.bottom("0"),i.positionStrategy=o,this._overlay.create(i)}_createInjector(e,i){let o=e&&e.viewContainerRef&&e.viewContainerRef.injector;return Mn.create({parent:o||this._injector,providers:[{provide:Ru,useValue:i},{provide:Nb,useValue:e.data}]})}};t.\u0275fac=function(i){return new(i||t)(X(Vr),X(uj),X(Mn),X(qa),X(t,12),X(Zj))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var dm=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Bo,cc,va,Ot,gT,bT,uT,hT,fT],exports:[Ot,bT,uT,hT,fT]}),t.\u0275inj=Nt({providers:[_T],imports:[Bo,cc,va,Ot,gT,Ot]});let n=t;return n})();y();var vT=(()=>
20{let t=class t{constructor(){this.notificationSubject=new Te,this.hideNotificationSubject=new Te}dispatchNotification(e){this.notificationSubject.next(e)}hideNotification(e){this.hideNotificationSubject.next(e)}getNotification(){return this.notificationSubject.asObservable()}getHideNotification(){return this.hideNotificationSubject.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var oX=["actionButton"],aX=(n,t)=>({value:n,params:t});function sX(n,t){if(n&1){let r=B();pt(0),O(1,"div",4),v(2,"safe"),d(3,"button",5,1),T("click",function(i){D(r);let o=b();return M(o.action(i))}),g(5),v(6,"translate"),p(),ct()}if(n&2){let r=b();l(),m("innerHTML",ft(2,2,r.notification.message,"html"),Ut),l(4),z(C(6,5,"action.close"))}}function lX(n,t){if(n&1){let r=B();d(0,"div",6),O(1,"div",4),v(2,"safe"),d(3,"button",7,1),T("click",function(i){D(r);let o=b();return M(o.action(i))}),d(5,"mat-icon"),g(6,"close"),p()()()}if(n&2){let r=b();Y("error-toast",r.notification.type==="error")("warn-toast",r.notification.type==="warn")("success-toast",r.notification.type==="success")("info-toast",r.notification.type==="info"),l(),m("innerHTML",ft(2,9,r.notification.message,"html"),Ut)}}var xs=(()=>{let t=class t{constructor(e,i,o,a,s,c,u){this.elementRef=e,this.viewContainerRef=i,this.notificationService=o,this.snackBar=a,this.ngZone=s,this.breakpointObserver=c,this.cd=u,this.toastTarget="root",this.notificationSubscription=null,this.hideNotificationSubscription=null,this.snackBarRef=null,this.currentMessage=null,this.dismissTimeout=null}ngAfterViewInit(){this.notificationSubscription=this.notificationService.getNotification().subscribe(e=>{if(this.shouldDisplayMessage(e)){this.currentMessage=e;let i=this.breakpointObserver.isMatched(cl["gt-sm"]);i&&this.toastTarget!=="root"?this.showToastPanel(e):this.showSnackBar(e,i)}}),this.hideNotificationSubscription=this.notificationService.getHideNotification().subscribe(e=>{if(e){let i=e.target||"root";this.toastTarget===i&&(this.currentMessage=null,this.ngZone.run(()=>{this.snackBarRef&&this.snackBarRef.dismiss(),this.toastComponentRef&&this.toastComponentRef.instance.actionButton._elementRef.nativeElement.click()}))}})}showToastPanel(e){this.ngZone.run(()=>{this.snackBarRef&&this.snackBarRef.dismiss(),this.toastComponentRef&&(this.viewContainerRef.detach(0),this.toastComponentRef.destroy());let i=["tb-toast-panel","toast-panel"];e.panelClass&&(typeof e.panelClass=="string"?i.push(e.panelClass):e.panelClass.length&&(i=i.concat(e.panelClass)));let o=e.horizontalPosition||"left",a=e.verticalPosition||"top";o==="start"||o==="left"?i.push("left"):o==="end"||o==="right"?i.push("right"):i.push("h-center"),a==="top"?i.push("top"):i.push("bottom");let c=[{provide:Nb,useValue:{notification:e,panelClass:i,destroyToastComponent:()=>{this.viewContainerRef.detach(0),this.toastComponentRef.destroy()}}}],u=Mn.create({parent:this.viewContainerRef.injector,providers:c});this.toastComponentRef=this.viewContainerRef.createComponent(TC,{index:0,injector:u}),this.cd.detectChanges(),e.duration&&e.duration>0&&(this.dismissTimeout!==null&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.dismissTimeout=setTimeout(()=>{this.toastComponentRef&&this.toastComponentRef.instance.actionButton._elementRef.nativeElement.click(),this.dismissTimeout=null},e.duration+500)),this.toastComponentRef.onDestroy(()=>{this.dismissTimeout!==null&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.toastComponentRef=null,this.currentMessage=null})})}showSnackBar(e,i){this.ngZone.run(()=>{this.snackBarRef&&this.snackBarRef.dismiss();let o={notification:e,parent:this.elementRef,panelClass:[],destroyToastComponent:()=>{}},a={horizontalPosition:e.horizontalPosition||"left",verticalPosition:i?e.verticalPosition||"top":"bottom",viewContainerRef:this.viewContainerRef,duration:e.duration,panelClass:e.panelClass,data:o};this.snackBarRef=this.snackBar.openFromComponent(TC,a),e.duration&&e.duration>0&&e.forceDismiss&&(this.dismissTimeout!==null&&(clearTimeout(this.dismissT
20imeout),this.dismissTimeout=null),this.dismissTimeout=setTimeout(()=>{this.snackBarRef&&this.snackBarRef.instance.actionButton._elementRef.nativeElement.click(),this.dismissTimeout=null},e.duration)),this.snackBarRef.afterDismissed().subscribe(()=>{this.dismissTimeout!==null&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.snackBarRef=null,this.currentMessage=null})})}shouldDisplayMessage(e){if(e&&e.message){let i=e.target||"root";if(this.toastTarget===i&&(!this.currentMessage||this.currentMessage.message!==e.message||this.currentMessage.type!==e.type))return!0}return!1}ngOnDestroy(){this.toastComponentRef&&(this.viewContainerRef.detach(0),this.toastComponentRef.destroy()),this.notificationSubscription&&this.notificationSubscription.unsubscribe(),this.hideNotificationSubscription&&this.hideNotificationSubscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(ci),h(vT),h(_T),h(Bt),h(qa),h(Me))},t.\u0275dir=_e({type:t,selectors:[["","tb-toast",""]],inputs:{toastTarget:"toastTarget"}});let n=t;return n})(),tG={showHideToast:Qn("showHideAnimation",[Ji("in",Tt({transform:"scale(1)",opacity:1})),$i("void => opened",[Tt({transform:"scale(0)",opacity:0}),Vi("{{ open }}ms")]),$i("opened => closing",Vi("{{ close }}ms",Tt({transform:"scale(0)",opacity:0})))])},TC=(()=>{let t=class t{get panelClass(){return this.data.panelClass}constructor(e,i,o){this.data=e,this.elementRef=i,this.snackBarRef=o,this.parentScrollSubscription=null,this.animationParams={open:100,close:100},this.animationState=this.snackBarRef?"default":"opened",this.notification=e.notification}ngAfterViewInit(){this.snackBarRef&&(this.parentEl=this.data.parent.nativeElement,this.snackBarContainerEl=$(this.elementRef.nativeElement).closest(".mat-mdc-snack-bar-container")[0],this.snackBarContainerEl.style.position="absolute",this.updateContainerRect(),this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig),this.parentScrollSubscription=gS(this.parentEl).subscribe(()=>{this.updateContainerRect()}))}updatePosition(e){let i=e.direction==="rtl",o=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!i||e.horizontalPosition==="end"&&i,a=!o&&e.horizontalPosition!=="center";o?this.snackBarContainerEl.style.justifyContent="flex-start":a?this.snackBarContainerEl.style.justifyContent="flex-end":this.snackBarContainerEl.style.justifyContent="center",e.verticalPosition==="top"?this.snackBarContainerEl.style.alignItems="flex-start":this.snackBarContainerEl.style.alignItems="flex-end"}updateContainerRect(){let e=this.parentEl.getBoundingClientRect();this.snackBarContainerEl.style.top=e.top+"px",this.snackBarContainerEl.style.left=e.left+"px",this.snackBarContainerEl.style.width=e.width+"px",this.snackBarContainerEl.style.height=e.height+"px"}ngOnDestroy(){this.parentScrollSubscription&&this.parentScrollSubscription.unsubscribe()}action(e){e.stopPropagation(),this.snackBarRef?this.snackBarRef.dismissWithAction():this.animationState="closing"}onHideFinished(e){let{toState:i}=e,o=i==="closing",a=this.animationState==="closing";o&&a&&this.data.destroyToastComponent()}};t.\u0275fac=function(i){return new(i||t)(h(Nb),h(ge),h(Ru,8))},t.\u0275cmp=L({type:t,selectors:[["tb-snack-bar-component"]],viewQuery:function(i,o){if(i&1&&ae(oX,5),i&2){let a;Q(a=K())&&(o.actionButton=a.first)}},hostVars:2,hostBindings:function(i,o){i&2&&bt(o.panelClass)},decls:4,vars:18,consts:[["modern",""],["actionButton",""],[1,"flex","flex-row","items-center","justify-start"],[4,"ngIf","ngIfElse"],[1,"toast-text",3,"innerHTML"],["type","button","mat-button","",3,"click"],[1,"tb-modern-toast-panel"],["mat-icon-button","",1,"tb-mat-20",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"div",2),T("@showHideAnimation.done",function(c){return D(a),M(o.onHideFinished(c))}),x(1,sX,7,7,"ng-container",3)(2,lX,7,12,"ng-template",null,0,kt),p()}if(i&2){let a=me(3);Y("tb-toast",!o.notification.modern)("tb-modern-toast",o.notification.modern)("error-toast",o.notification.type==="error")("warn-toast",o.notification.type==="warn")("success-toast",o.notification.type==="success")("info-toast",o.notification.type==="info"),m("@showHideAnimation",Yi(15,aX,o.animationState,o.animationParams)),l(),m("ngIf",!o.notification.modern)("ngIfElse",a)}},dependencies:[ce,yt,Pe,Se,be,mc],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:inline-block;pointer-events:all}.toast-panel[_nghost-%COMP%]{position:absolute;inset:0;z-index:1000;display:flex}.toast-panel.left[_nghost-%COMP%]{justify-content:flex-start}.toast-panel.right[_nghost-%COMP%]{justify-content:flex-end}.toast-panel.top[_nghost-%COMP%]{align-items:flex-start}.toast-panel.bottom[_nghost-%COMP%]{align-items:flex-end}.toast-panel.h-center[_nghost-%COMP%]{justify-content:center}.toast-panel.v-center[_nghost-%COMP%]{align-items:center}[_nghost-%COMP%]   .tb-toast[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;color:#fff;font-size:18px;border-radius:4px;padding:0 18px;margin:8px}[_nghost-%COMP%]   .tb-toast[_ngcontent-%COMP%]   .toast-text[_ngcontent-%COMP%]{padding:8px;width:100%}[_nghost-%COMP%]   .tb-toast[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:6px 0 6px 12px;color:inherit}[_nghost-%COMP%]   .tb-toast.info-toast[_ngcontent-%COMP%]{background:#323232}[_nghost-%COMP%]   .tb-toast.warn-toast[_ngcontent-%COMP%]{background:#dc6d1b}[_nghost-%COMP%]   .tb-toast.error-toast[_ngcontent-%COMP%]{background:maroon}[_nghost-%COMP%]   .tb-toast.success-toast[_ngcontent-%COMP%]{background:green}[_nghost-%COMP%]   .tb-modern-toast[_ngcontent-%COMP%]{display:flex;flex-direction:column;z-index:1}[_nghost-%COMP%]   .tb-modern-toast-panel[_ngcontent-%COMP%]{display:flex;padding:4px 4px 4px 12px;justify-content:center;align-items:center;gap:4px;border-radius:4px;box-shadow:-2px 2px 4px #0003}[_nghost-%COMP%]   .tb-modern-toast-panel.info-toast[_ngcontent-%COMP%]{background:#e6e6e6;color:#323232}[_nghost-%COMP%]   .tb-modern-toast-panel.warn-toast[_ngcontent-%COMP%]{background:#fff3eb;color:#dc6d1b}[_nghost-%COMP%]   .tb-modern-toast-panel.error-toast[_ngcontent-%COMP%]{background-color:#fff2f3;color:#d12730}[_nghost-%COMP%]   .tb-modern-toast-panel.success-toast[_ngcontent-%COMP%]{background:#ebfcec;color:green}[_nghost-%COMP%]   .tb-modern-toast[_ngcontent-%COMP%]   .toast-text[_ngcontent-%COMP%]{font-size:12px;font-style:normal;font-weight:400;line-height:16px}'],data:{animation:[tG.showHideToast]}});let n=t;return n})();var PX={};Ae(PX,{BreadcrumbComponent:()=>xT});y();y();y();var pm=function(n){return n.SYSTEM="SYSTEM",n.TENANT="TENANT",n.CUSTOMER="CUSTOMER",n}(pm||{}),F8e=new Map([[pm.SYSTEM,"custom-menu.scope-system"],[pm.TENANT,"custom-menu.scope-tenant"],[pm.CUSTOMER,"custom-menu.scope-customer"]]),nG=n=>{switch(n){case pm.SYSTEM:return Mt.SYS_ADMIN;case pm.TENANT:return Mt.TENANT_ADMIN;case pm.CUSTOMER:return Mt.CUSTOMER_USER}},EC=function(n){return n.NO_ASSIGN="NO_ASSIGN",n.ALL="ALL",n.CUSTOMERS="CUSTOMERS",n.USERS="USERS",n}(EC||{}),iG=new Map([[EC.NO_ASSIGN,"custom-menu.assignee-no-assign"],[EC.CUSTOMERS,"custom-menu.assignee-customers"],[EC.USERS,"custom-menu.assignee-users"]]),N8e=(n,t)=>{if(n===EC.ALL)switch(t){case pm.TENANT:return"custom-menu.assignee-tenant-all";case pm.CUSTOMER:return"custom-menu.assignee-customer-all"}return iG.has(n)?iG.get(n):n},IC=function(n){return n.DEFAULT="DEFAULT",n.HOME="HOME",n.CUSTOM="CUSTOM",n}(IC||{}),mm=function(n){return n.DEFAULT="DEFAULT",n.DASHBOARD="DASHBOARD",n}(mm||{}),V8e=Object.keys(mm),L8e=new Map([[mm.DEFAULT,"custom-menu.home-menu-item-type-default"],[mm.DASHBOARD,"custom-menu.home-menu-item-type-dashboard"]]),Fu=function(n){return n.LINK="LINK",n.SECTION="SECTION",n}(Fu||{}),B8e=Object.keys(Fu),j8e=new Map([[Fu.LINK,"custom-menu.item-type-link"],[Fu.SECTION,"custom-menu.item-type-section"]]),Df=function(n){return n.URL="URL",n.DASHBOARD="DASHBOARD",n}(Df||{}),G8e=Object.keys(Df),z8e=new Map([[Df.URL,"custom-menu.link-type-url"],[Df.DASHBOARD,"custom-menu.link-type-dashboard"]]),$8e=n=>{let t={success:!0};return n?.status===400&&n?.error?.success===!1&&n?.error?.assigneeType&&n?.error?.assigneeList?(t.success=!1,t.assigneeType=n?.error?.assigneeType,t.assigneeList=n?.error?.assigneeList):n&&(t.success=!1,t.error=n),t},U8e=n=>n?.status===400&&typeof n?.error?.message=="string"&&n?.error?.message.startsWith("There is already default menu for scope"),yT=n=>{let t=n.id;return fn(t)&&!!R[t]},kC=n=>n.id===R.home,rG=n=>{let t=n;return fn(t.name)&&fn(t.menuItemType)&&!!Fu[t.menuItemType]},oG=n=>{let t={id:R[n.id],visible:!0};return kC(t)?t.homeType=mm.DEFAULT:n.pages?.length&&(t.pages=n.pages.map(r=>oG(r))),t},aG=(n,t)=>{if(!n?.length&&!t?.length)return!0;
20if(n.length!==t.length)return!1;for(let r=0;r<n.length;r++){let e=n[r],i=t[r];if(!cX(e,i))return!1}return!0},cX=(n,t)=>yT(n)&&n.visible?n.id!==t.id||n.name||n.icon||kC(n)&&n.homeType!==mm.DEFAULT?!1:aG(n.pages,t.pages):!1,dX=(n,t)=>{let r=nG(t),e=DC.get(r);return aG(n?.items,e)},sG=n=>{for(let t of n)t.type&&delete t.type,t.pages&&(t.pages=sG(t.pages));return n},lG=(n,t)=>{let r=[],e=new Map(t.map(i=>[i.id,i]));for(let i of n)i.type!==IC.CUSTOM?e.has(i.id)&&(i.pages&&(i.pages=lG(i.pages,e.get(i.id).pages)),r.push(i),e.delete(i.id)):r.push(i);for(let i of e.values())i.visible=!1,r.push(i);return r},pX=n=>{let t=nG(n);return{items:(DC.get(t)||[]).map(e=>oG(e))}},H8e=(n,t)=>{let r=pX(t);return n?.items?.length?(n.items=sG(lG(n.items,r.items)),n):r},cG=n=>{for(let t of n){let r;yT(t)?kC(t)?r=IC.HOME:r=IC.DEFAULT:r=IC.CUSTOM,t.type=r,t.pages&&(t.pages=cG(t.pages))}return n},q8e=(n,t)=>dX(n,t)?{items:[]}:(n=Di(n),n.items=cG(n.items),n);var mX=n=>n.isCustom?n.path+"/"+n.stateId:n.path,pG=(n,t,r)=>n.type==="toggle"&&(!n.isCustom&&t.startsWith(n.path)||r.includes(mX(n))),R=function(n){return n.home="home",n.tenants="tenants",n.tenant_profiles="tenant_profiles",n.resources="resources",n.widget_library="widget_library",n.widget_types="widget_types",n.widgets_bundles="widgets_bundles",n.images="images",n.scada_symbols="scada_symbols",n.resources_library="resources_library",n.javascript_library="javascript_library",n.notifications_center="notifications_center",n.notification_inbox="notification_inbox",n.notification_sent="notification_sent",n.notification_recipients="notification_recipients",n.notification_templates="notification_templates",n.notification_rules="notification_rules",n.mobile_center="mobile_center",n.mobile_apps="mobile_apps",n.mobile_bundles="mobile_bundles",n.mobile_qr_code_widget="mobile_qr_code_widget",n.settings="settings",n.general="general",n.mail_server="mail_server",n.home_settings="home_settings",n.notification_settings="notification_settings",n.repository_settings="repository_settings",n.auto_commit_settings="auto_commit_settings",n.queues="queues",n.security_settings="security_settings",n.security_settings_general="security_settings_general",n.two_fa="two_fa",n.oauth2="oauth2",n.domains="domains",n.clients="clients",n.audit_log="audit_log",n.alarms="alarms",n.dashboards="dashboards",n.entities="entities",n.devices="devices",n.assets="assets",n.entity_views="entity_views",n.gateways="gateways",n.profiles="profiles",n.device_profiles="device_profiles",n.asset_profiles="asset_profiles",n.customers="customers",n.rule_chains="rule_chains",n.edge_management="edge_management",n.edges="edges",n.edge_instances="edge_instances",n.rulechain_templates="rulechain_templates",n.features="features",n.otaUpdates="otaUpdates",n.version_control="version_control",n.api_usage="api_usage",n.white_labeling="white_labeling",n.white_labeling_general="white_labeling_general",n.login_white_labeling="login_white_labeling",n.mail_templates="mail_templates",n.custom_translation="custom_translation",n.custom_menu="custom_menu",n.dashboard_all="dashboard_all",n.dashboard_groups="dashboard_groups",n.dashboard_shared="dashboard_shared",n.solution_templates="solution_templates",n.device_all="device_all",n.device_groups="device_groups",n.device_shared="device_shared",n.asset_all="asset_all",n.asset_groups="asset_groups",n.asset_shared="asset_shared",n.entity_view_all="entity_view_all",n.entity_view_groups="entity_view_groups",n.entity_view_shared="entity_view_shared",n.customer_all="customer_all",n.customer_groups="customer_groups",n.customer_shared="customer_shared",n.customers_hierarchy="customers_hierarchy",n.users="users",n.user_all="user_all",n.user_groups="user_groups",n.integrations_center="integrations_center",n.integrations="integrations",n.converters="converters",n.edge_all="edge_all",n.edge_groups="edge_groups",n.edge_shared="edge_shared",n.integration_templates="integration_templates",n.converter_templates="converter_templates",n.scheduler
20="scheduler",n.roles="roles",n.self_registration="self_registration",n.task_manager="task_manager",n.trendz_settings="trendz_settings",n.secrets="secrets",n.ai_models="ai_models",n.reporting="reporting",n.report_templates="report_templates",n.report_scheduling="report_scheduling",n.reports="reports",n}(R||{}),CT=new Map([[R.home,{id:R.home,name:"home.home",type:"link",path:"/home",icon:"home"}],[R.tenants,{id:R.tenants,name:"tenant.tenants",type:"link",path:"/tenants",icon:"supervisor_account"}],[R.tenant_profiles,{id:R.tenant_profiles,name:"tenant-profile.tenant-profiles",type:"link",path:"/tenantProfiles",icon:"mdi:alpha-t-box"}],[R.resources,{id:R.resources,name:"admin.resources",type:"toggle",path:"/resources",icon:"folder"}],[R.widget_library,{id:R.widget_library,name:"widget.widget-library",type:"link",path:"/resources/widgets-library",icon:"now_widgets"}],[R.widget_types,{id:R.widget_types,name:"widget.widgets",type:"link",path:"/resources/widgets-library/widget-types",icon:"now_widgets"}],[R.widgets_bundles,{id:R.widgets_bundles,name:"widgets-bundle.widgets-bundles",type:"link",path:"/resources/widgets-library/widgets-bundles",icon:"now_widgets"}],[R.images,{id:R.images,name:"image.gallery",type:"link",path:"/resources/images",icon:"filter"}],[R.scada_symbols,{id:R.scada_symbols,name:"scada.symbols",type:"link",path:"/resources/scada-symbols",icon:"view_in_ar"}],[R.resources_library,{id:R.resources_library,name:"resource.resources-library",type:"link",path:"/resources/resources-library",icon:"mdi:rhombus-split"}],[R.javascript_library,{id:R.javascript_library,name:"javascript.javascript-library",type:"link",path:"/resources/javascript-library",icon:"mdi:language-javascript"}],[R.notifications_center,{id:R.notifications_center,name:"notification.notification-center",type:"link",path:"/notification",icon:"mdi:message-badge"}],[R.notification_inbox,{id:R.notification_inbox,name:"notification.inbox",fullName:"notification.notification-inbox",type:"link",path:"/notification/inbox",icon:"inbox"}],[R.notification_sent,{id:R.notification_sent,name:"notification.sent",fullName:"notification.notification-sent",type:"link",path:"/notification/sent",icon:"outbox"}],[R.notification_recipients,{id:R.notification_recipients,name:"notification.recipients",fullName:"notification.notification-recipients",type:"link",path:"/notification/recipients",icon:"contacts"}],[R.notification_templates,{id:R.notification_templates,name:"notification.templates",fullName:"notification.notification-templates",type:"link",path:"/notification/templates",icon:"mdi:message-draw"}],[R.notification_rules,{id:R.notification_rules,name:"notification.rules",fullName:"notification.notification-rules",type:"link",path:"/notification/rules",icon:"mdi:message-cog"}],[R.ai_models,{id:R.ai_models,name:"ai-models.ai-models",type:"link",path:"/settings/ai-models",icon:"auto_awesome"}],[R.mobile_center,{id:R.mobile_center,name:"mobile.mobile-center",type:"link",path:"/mobile-center",icon:"smartphone"}],[R.mobile_apps,{id:R.mobile_apps,name:"mobile.applications",type:"link",path:"/mobile-center/applications",icon:"list"}],[R.mobile_bundles,{id:R.mobile_bundles,name:"mobile.bundles",type:"link",path:"/mobile-center/bundles",icon:"mdi:package"}],[R.mobile_qr_code_widget,{id:R.mobile_qr_code_widget,name:"mobile.qr-code-widget",fullName:"mobile.qr-code-widget",type:"link",path:"/mobile-center/qr-code-widget",icon:"qr_code"}],[R.settings,{id:R.settings,name:"admin.settings",type:"link",path:"/settings",icon:"settings"}],[R.general,{id:R.general,name:"admin.general",fullName:"admin.general-settings",type:"link",path:"/settings/general",icon:"settings_applications"}],[R.mail_server,{id:R.mail_server,name:"admin.outgoing-mail",type:"link",path:"/settings/outgoing-mail",icon:"mail"}],[R.home_settings,{id:R.home_settings,name:"admin.home",fullName:"admin.home-settings",type:"link",path:"/settings/home",icon:"settings_applications"}],[R.notification_settings,{id:R.notification_settings,name:"admin.notifications",fullName:"admin.notifications-settings",type:"link",path:"/settings/notifications",icon:"mdi:message-badge"}],[R.repository_settings,{id:R.repository_settings,name:"admin.repository",fullName:"admin.repository-settings",type:"link",path:"/settings/repository",icon:"manage_history"}],[R.auto_commit_settings,{id:R.auto_commit_settings,name:"admin.auto-commit",fullName:"admin.auto-commit-settings",type:"link",path:"/settings/auto-commit",icon:"settings_backup_restore"}],[R.queues,{id:R.queues,name:"admin.queues",type:"link",path:"/settings/queues",icon:"swap_calls"}],[R.security_settings,{id:R.security_settings,name:"security.security",type:"toggle",path:"/security-settings",icon:"security"}],[R.security_settings_general,{id:R.security_settings_general,name:"admin.general",fullName:"security.general-sett
20ings",type:"link",path:"/security-settings/general",icon:"settings_applications"}],[R.two_fa,{id:R.two_fa,name:"admin.2fa.2fa",type:"link",path:"/security-settings/2fa",icon:"mdi:two-factor-authentication"}],[R.oauth2,{id:R.oauth2,name:"admin.oauth2.oauth2",type:"link",path:"/security-settings/oauth2",icon:"mdi:shield-account"}],[R.domains,{id:R.domains,name:"admin.oauth2.domains",type:"link",path:"/security-settings/oauth2/domains",icon:"domain"}],[R.clients,{id:R.clients,name:"admin.oauth2.clients",type:"link",path:"/security-settings/oauth2/clients",icon:"public"}],[R.audit_log,{id:R.audit_log,name:"audit-log.audit-logs",type:"link",path:"/security-settings/auditLogs",icon:"track_changes"}],[R.alarms,{id:R.alarms,name:"alarm.alarms",type:"link",path:"/alarms",icon:"mdi:alert-outline"}],[R.dashboards,{id:R.dashboards,name:"dashboard.dashboards",type:"link",path:"/dashboards",icon:"dashboards"}],[R.entities,{id:R.entities,name:"entity.entities",type:"toggle",path:"/entities",icon:"category"}],[R.devices,{id:R.devices,name:"device.devices",type:"link",path:"/entities/devices",icon:"devices_other"}],[R.assets,{id:R.assets,name:"asset.assets",type:"link",path:"/entities/assets",icon:"domain"}],[R.entity_views,{id:R.entity_views,name:"entity-view.entity-views",type:"link",path:"/entities/entityViews",icon:"view_quilt"}],[R.gateways,{id:R.gateways,name:"gateway.gateways",type:"link",path:"/entities/gateways",icon:"lan"}],[R.profiles,{id:R.profiles,name:"profiles.profiles",type:"toggle",path:"/profiles",icon:"badge"}],[R.device_profiles,{id:R.device_profiles,name:"device-profile.device-profiles",type:"link",path:"/profiles/deviceProfiles",icon:"mdi:alpha-d-box"}],[R.asset_profiles,{id:R.asset_profiles,name:"asset-profile.asset-profiles",type:"link",path:"/profiles/assetProfiles",icon:"mdi:alpha-a-box"}],[R.customers,{id:R.customers,name:"customer.customers",type:"link",path:"/customers",icon:"supervisor_account"}],[R.rule_chains,{id:R.rule_chains,name:"rulechain.rulechains",type:"link",path:"/ruleChains",icon:"settings_ethernet"}],[R.edge_management,{id:R.edge_management,name:"edge.management",type:"toggle",path:"/edgeManagement",icon:"settings_input_antenna"}],[R.edges,{id:R.edges,name:"edge.instances",fullName:"edge.edge-instances",type:"link",path:"/edgeManagement/instances",icon:"router"}],[R.edge_instances,{id:R.edge_instances,name:"edge.edge-instances",fullName:"edge.edge-instances",type:"link",path:"/edgeManagement/instances",icon:"router"}],[R.rulechain_templates,{id:R.rulechain_templates,name:"edge.rulechain-templates",fullName:"edge.edge-rulechain-templates",type:"link",path:"/edgeManagement/ruleChains",icon:"settings_ethernet"}],[R.features,{id:R.features,name:"feature.advanced-features",type:"toggle",path:"/features",icon:"construction"}],[R.otaUpdates,{id:R.otaUpdates,name:"ota-update.ota-updates",type:"link",path:"/features/otaUpdates",icon:"memory"}],[R.version_control,{id:R.version_control,name:"version-control.version-control",type:"link",path:"/features/vc",icon:"history"}],[R.api_usage,{id:R.api_usage,name:"api-usage.api-usage",type:"link",path:"/usage",icon:"insert_chart"}],[R.white_labeling,{id:R.white_labeling,name:"white-labeling.white-labeling",type:"link",path:"/white-labeling",icon:"format_paint"}],[R.white_labeling_general,{id:R.white_labeling_general,name:"white-labeling.general",fullName:"white-labeling.white-labeling-general",type:"link",path:"/white-labeling/whiteLabel",icon:"format_paint"}],[R.login_white_labeling,{id:R.login_white_labeling,name:"white-labeling.login",fullName:"white-labeling.login-white-labeling",type:"link",path:"/white-labeling/loginWhiteLabel",icon:"format_paint"}],[R.mail_templates,{id:R.mail_templates,name:"admin.mail-templates",type:"link",path:"/white-labeling/mail-template",icon:"format_shapes"}],[R.custom_translation,{id:R.custom_translation,name:"custom-translation.custom-translation",type:"link",path:"/white-labeling/customTranslation",icon:"language"}],[R.custom_menu,{id:R.custom_menu,name:"custom-menu.custom-menu",type:"link",path:"/white-labeling/customMenu",icon:"list"}],[R.dashboard_all,{id:R.dashboard_all,name:"dashboard.all",fullName:"dashboard.all-dashboards",type:"link",path:"/dashboards/all",icon:"dashboards"}],[R.dashboard_groups,{id:R.dashboard_groups,name:"dashboard.groups",fullName:"entity-group.dashboard-groups",type:"link",path:"/dashboards/groups",icon:"dashboard"}],[R.dashboard_shared,{id:R.dashboard_shared,name:"dashboard.shared",fullName:"entity-group.shared-dashboard-groups",type:"link",path:"/dashboards/shared",icon:"dashboard",rootOnly:!0}],[R.solution_templates,{id:R.solution_templates,name:"solution-template.solution-templates",type:"link",path:"/solutionTemplates",icon:"apps"}],[R.device_all,{id:R.device_all,name:"device.all",fullName:"device.all-devices",type:"link",path:"/entities/devices/all",icon:"devices_other"}],[R.device_groups,{id:R.device_groups,name:"device.groups",fullName:"entity-group.device-groups",type:"link",path:"/entities/devices/groups",icon:"devices_other"}],[R.device_shared,{id:R.device_shared,name:"device.shared",fullName:"entity-group.shared-device-groups",type:"link",path:"/entities/devices/shared",icon:"devices_other",rootOnly:!0}],[R.asset_all,{id:R.asset_all,name:"asset.all",fullName:"asset.all-assets",type:"link",path:"/entities/assets/all",icon:"domain"}
20],[R.asset_groups,{id:R.asset_groups,name:"asset.groups",fullName:"entity-group.asset-groups",type:"link",path:"/entities/assets/groups",icon:"domain"}],[R.asset_shared,{id:R.asset_shared,name:"asset.shared",fullName:"entity-group.shared-asset-groups",type:"link",path:"/entities/assets/shared",icon:"domain",rootOnly:!0}],[R.entity_view_all,{id:R.entity_view_all,name:"entity-view.all",fullName:"entity-view.all-entity-views",type:"link",path:"/entities/entityViews/all",icon:"view_quilt"}],[R.entity_view_groups,{id:R.entity_view_groups,name:"entity-view.groups",fullName:"entity-group.entity-view-groups",type:"link",path:"/entities/entityViews/groups",icon:"view_quilt"}],[R.entity_view_shared,{id:R.entity_view_shared,name:"entity-view.shared",fullName:"entity-group.shared-entity-view-groups",type:"link",path:"/entities/entityViews/shared",icon:"view_quilt",rootOnly:!0}],[R.customer_all,{id:R.customer_all,name:"customer.all",fullName:"customer.all-customers",type:"link",path:"/customers/all",icon:"supervisor_account"}],[R.customer_groups,{id:R.customer_groups,name:"customer.groups",fullName:"entity-group.customer-groups",type:"link",path:"/customers/groups",icon:"supervisor_account"}],[R.customer_shared,{id:R.customer_shared,name:"customer.shared",fullName:"entity-group.shared-customer-groups",type:"link",path:"/customers/shared",icon:"supervisor_account",rootOnly:!0}],[R.customers_hierarchy,{id:R.customers_hierarchy,name:"customer.hierarchy",fullName:"customers-hierarchy.customers-hierarchy",type:"link",path:"/customers/hierarchy",icon:"sort",rootOnly:!0}],[R.users,{id:R.users,name:"user.users",type:"link",path:"/users",icon:"account_circle"}],[R.user_all,{id:R.user_all,name:"user.all",fullName:"user.all-users",type:"link",path:"/users/all",icon:"account_circle"}],[R.user_groups,{id:R.user_groups,name:"user.groups",fullName:"entity-group.user-groups",type:"link",path:"/users/groups",icon:"account_circle"}],[R.integrations_center,{id:R.integrations_center,name:"integration.integrations-center",type:"toggle",path:"/integrationsCenter",icon:"integration_instructions"}],[R.integrations,{id:R.integrations,name:"integration.integrations",type:"link",path:"/integrationsCenter/integrations",icon:"input"}],[R.converters,{id:R.converters,name:"converter.converters",type:"link",path:"/integrationsCenter/converters",icon:"transform"}],[R.edge_all,{id:R.edge_all,name:"edge.all",fullName:"edge.all-edges",type:"link",path:"/edgeManagement/instances/all",icon:"router"}],[R.edge_groups,{id:R.edge_groups,name:"edge.groups",fullName:"entity-group.edge-groups",type:"link",path:"/edgeManagement/instances/groups",icon:"router"}],[R.edge_shared,{id:R.edge_shared,name:"edge.shared",fullName:"entity-group.shared-edge-groups",type:"link",path:"/edgeManagement/instances/shared",icon:"router",rootOnly:!0}],[R.integration_templates,{id:R.integration_templates,name:"edge.integration-templates",fullName:"edge.edge-integration-templates",type:"link",path:"/edgeManagement/integrations",icon:"input"}],[R.converter_templates,{id:R.converter_templates,name:"edge.converter-templates",fullName:"edge.edge-converter-templates",type:"link",path:"/edgeManagement/converters",icon:"transform"}],[R.scheduler,{id:R.scheduler,name:"scheduler.scheduler",type:"link",path:"/features/scheduler",icon:"schedule"}],[R.roles,{id:R.roles,name:"role.roles",type:"link",path:"/security-settings/roles",icon:"security"}],[R.secrets,{id:R.secrets,name:"secret-storage.secrets-storage",type:"link",path:"/security-settings/secrets",icon:"mdi:key-variant"}],[R.self_registration,{id:R.self_registration,name:"self-registration.self-registration",type:"link",path:"/security-settings/selfRegistration",icon:"group_add"}],[R.task_manager,{id:R.task_manager,name:"task.task-manager",type:"link",path:"/features/taskManager",icon:"mdi:invoice-text-clock-outline"}],[R.reporting,{id:R.reporting,name:"report.reporting",type:"link",path:"/reporting",icon:"mdi:chart-box-multiple",isNew:!0}],[R.report_templates,{id:R.report_templates,name:"report.templates",type:"link",path:"/reporting/templates",icon:"mdi:file-document-edit-outline"}],[R.report_scheduling,{id:R.report_scheduling,name:"report.scheduling",type:"link",path:"/reporting/scheduling",icon:"mdi:file-clock-outline"}],[R.reports,{id:R.reports,name:"report.reports",type:"link",path:"/reporting/reports",icon:"mdi:chart-box-multiple"}],[R.trendz_settings,{id:R.trendz_settings,name:"admin.trendz",fullName:"admin.trendz-settings",type:"link",path:"/settings/trendz",icon:"trendz-settings"}]]),uX=new Map([[R.alarms,(n,t)=>t.hasReadGenericPermission(Ei.ALARM)],[R.dashboard_all,(n,t)=>t.hasReadGenericPermission(Ei.DASHBOARD)],[R.dashboard_groups,(n,t)=>t.hasGenericReadGroupsPermission(G.DASHBOARD)],[R.dashboard_shared,(n,t)=>t.hasSharedReadGroupsPermission(G.DASHBOARD)],[R.solution_templates,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasGenericPermission(Ei.ALL,qo.ALL)],[R.device_all,(n,t)=>
20t.hasReadGenericPermission(Ei.DEVICE)],[R.device_groups,(n,t)=>t.hasGenericReadGroupsPermission(G.DEVICE)],[R.device_shared,(n,t)=>t.hasSharedReadGroupsPermission(G.DEVICE)],[R.asset_all,(n,t)=>t.hasReadGenericPermission(Ei.ASSET)],[R.asset_groups,(n,t)=>t.hasGenericReadGroupsPermission(G.ASSET)],[R.asset_shared,(n,t)=>t.hasSharedReadGroupsPermission(G.ASSET)],[R.entity_view_all,(n,t)=>t.hasReadGenericPermission(Ei.ENTITY_VIEW)],[R.entity_view_groups,(n,t)=>t.hasGenericReadGroupsPermission(G.ENTITY_VIEW)],[R.entity_view_shared,(n,t)=>t.hasSharedReadGroupsPermission(G.ENTITY_VIEW)],[R.gateways,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.TB_RESOURCE)&&(t.hasReadGenericPermission(Ei.DASHBOARD)||t.hasReadGenericPermission(Ei.WIDGET_TYPE))],[R.device_profiles,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.DEVICE_PROFILE)],[R.asset_profiles,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.ASSET_PROFILE)],[R.customer_all,(n,t)=>t.hasReadGenericPermission(Ei.CUSTOMER)],[R.customer_groups,(n,t)=>t.hasGenericReadGroupsPermission(G.CUSTOMER)],[R.customer_shared,(n,t)=>t.hasSharedReadGroupsPermission(G.CUSTOMER)],[R.customers_hierarchy,(n,t)=>t.hasReadGroupsPermission(G.CUSTOMER)],[R.user_all,(n,t)=>t.hasReadGenericPermission(Ei.USER)],[R.user_groups,(n,t)=>t.hasGenericReadGroupsPermission(G.USER)],[R.integrations,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.INTEGRATION)],[R.converters,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.CONVERTER)],[R.rule_chains,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.RULE_CHAIN)],[R.edge_all,(n,t)=>n.edgesSupportEnabled&&t.hasReadGenericPermission(Ei.EDGE)],[R.edge_groups,
20(n,t)=>n.edgesSupportEnabled&&t.hasGenericReadGroupsPermission(G.EDGE)],[R.edge_shared,(n,t)=>n.edgesSupportEnabled&&t.hasSharedReadGroupsPermission(G.EDGE)],[R.rulechain_templates,(n,t)=>n.edgesSupportEnabled&&n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.RULE_CHAIN)],[R.integration_templates,(n,t)=>n.edgesSupportEnabled&&n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.INTEGRATION)],[R.converter_templates,(n,t)=>n.edgesSupportEnabled&&n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.CONVERTER)],[R.otaUpdates,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.OTA_PACKAGE)],[R.version_control,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.VERSION_CONTROL)],[R.scheduler,(n,t)=>t.hasReadGenericPermission(Ei.SCHEDULER_EVENT)],[R.widget_types,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.WIDGET_TYPE)],[R.widgets_bundles,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.WIDGETS_BUNDLE)],[R.resources_library,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.TB_RESOURCE)],[R.javascript_library,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.TB_RESOURCE)],[R.notification_sent,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.NOTIFICATION)],[R.notification_recipients,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.NOTIFICATION)],[R.notification_templates,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.NOTIFICATION)],[R.notification_rules,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.NOTIFICATION)],[R.api_usage,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.API_USAGE_STATE)&&t.hasGenericPermission(Ei.API_USAGE_STATE,qo.READ_TELEMETRY)],[R.white_labeling,(n,t)=>n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.white_labeling_general,(n,t)=>n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.login_white_labeling,(n,t)=>n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.mail_templates,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.custom_translation,(n,t)=>n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.custom_menu,(n,t)=>n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.home_settings,(n,t)=>n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.mail_server,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.notification_settings,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.repository_settings,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.VERSION_CONTROL)],[R.auto_commit_settings,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.VERSION_CONTROL)],[R.mobile_bundles,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.MOBILE_APP_BUNDLE)],[R.mobile_apps,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.MOBILE_APP)],[R.mobile_qr_code_widget,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.MOBILE_APP_SETTINGS)],[R.two_fa,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.secrets,(n,t)=>t.hasReadGenericPermission(Ei.SECRET)],[R.roles,(n,t)=>t.hasReadGenericPermission(Ei.ROLE)],[R.clients,(n,t)=>t.hasReadGenericPermission(Ei.OAUTH2_CLIENT)],[R.domains,(n,t)=>t.hasReadGenericPermission(Ei.DOMAIN)],[R.self_registration,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&n.whiteLabelingAllowed&&t.hasReadGenericPermission(Ei.WHITE_LABELING)],[R.audit_log,(n,t)=>t.hasReadGenericPermission(Ei.AUDIT_LOG)],[R.task_manager,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.JOB)],[R.report_templates,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.REPORT_TEMPLATE)],[R.report_scheduling,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.REPORT_TEMPLATE)&&t.hasReadGenericPermission(Ei.SCHEDULER_EVENT)],[R.reports,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.REPORT)],[R.trendz_settings,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.ADMIN_SETTINGS)],[R.ai_models,(n,t)=>n.authUser.authority===Mt.TENANT_ADMIN&&t.hasReadGenericPermission(Ei.AI_MODEL)]]),DC=new Map([[Mt.SYS_ADMIN,[{id:R.home},{id:R.tenants},{id:R.tenant_profiles},{id:R.resources,pages:[{id:R.widget_library,pages:[{id:R.widget_types},{id:R.widgets_bundles}]},{id:R.images},{id:R.scada_symbols},{id:R.javascript_library},{id:R.resources_library}]},{id:R.notifications_center,pages:[{id:R.notification_inbox},{id:R.notification_sent},{id:R.notification_recipients},{id:R.notification_templates},{id:R.notification_rules}]},{id:R.mobile_center,pages:[{id:R.mobile_bundles},{id:R.mobile_apps},{id:R.mobile_qr_code_widget}]},{id:R.white_labeling,pages:[{id:R.white_labeling_general},{id:R.login_white_labeling},{id:R.mail_templates},{id:R.custom_translation},{id:R.custom_menu}]},{id:R.settings,pages:[{id:R.general},{id:R.mail_server},{id:R.notification_settings},{id:R.queues}]},{id:R.security_settings,pages:[{id:R.security_settings_general},{id:R.two_fa},{id:R.secrets},{id:R.oauth2,pages:[{id:R.domains},{id:R.clients}]}]}]],[Mt.TENANT_ADMIN,[{id:R.home},{id:R.alarms},{id:R.dashboards,pages:[{id:R.dashboard_all},{id:R.dashboard_groups},{id:R.dashboard_shared}]},{id:R.reporting,pages:[{id:R.report_templates},{id:R.report_scheduling},{id:R.reports}]},{id:R.solution_templates},{id:R.entities,pages:[{id:R.devices,pages:[{id:R.device_all},{id:R.device_groups},{id:R.device_shared}]},{id:R.assets,pages:[{id:R.asset_all},{id:R.asset_groups},{id:R.asset_shared}]},{id:R.entity_views,pages:[{id:R.entity_view_all},{id:R.entity_view_groups},{id:R.entity_view_shared}]},{id:R.gateways}]},{id:R.profiles,pages:[{id:R.device_profiles},{id:R.asset_profiles}]},{id:R.customers,pages:[{id:R.customer_all},{id:R.customer_groups},{id:R.customer_shared},{id:R.customers_hierarchy}]},{id:R.users,pages:[{id:R.user_all},{id:R.user_groups}]},{id:R.integrations_center,pages:[{id:R.integrations},{id:R.converters}]},{id:R.rule_chains},{id:R.edge_management,pages:[{id:R.edges,pages:[{id:R.edge_all},{id:R.edge_groups},{id:R.edge_shared}]},{id:R.rulechain_templates},{id:R.integration_templates},{id:R.converter_templates}]},{id:R.features,pages:[{id:R.otaUpdates},{id:R.version_control},{id:R.scheduler},{id:R.task_manager}]},{id:R.resources,pages:[{id:R.widget_library,pages:[{id:R.widget_types},{id:R.widgets_bundles}]},{id:R.images},{id:R.scada_symbols},{id:R.javascript_library},{id:R.resources_library}]},{id:R.notifications_center,pages:[{id:R.notification_inbox},{id:R.notification_sent},{id:R.notification_recipients},{id:R.notification_templates},{id:R.notification_rules}]},{id:R.mobile_center,pages:[{id:R.mobile_bundles},{id:R.mobile_apps},{id:R.mobile_qr_code_widget}]},{id:R.api_usage},{id:R.white_labeling,pages:[{id:R.white_labeling_general},{id:R.login_white_labeling},{id:R.mail_templates},{id:R.custom_translation},{id:R.custom_menu}]},{id:R.settings,pages:[{id:R.home_settings},{id:R.mail_server},{id:R.notification_settings},{id:R.repository_settings},{id:R.auto_commit_settings},{id:R.trendz_settings},{id:R.ai_models}]},{id:R.security_settings,pages:[{id:R.two_fa},{id:R.roles},{id:R.secrets},{id:R.self_registration},{id:R.audit_log},{id:R.oauth2,pages:[{id:R.domains},{id:R.clients}]}]}]],[Mt.CUSTOMER_USER,[{id:R.home},{id:R.alarms},{id:R.dashboards,pages:[{id:R.dashboard_all},{id:R.dashboard_groups},{id:R.dashboard_shared}]},{id:R.entities,pages:[{id:R.devices,pages:[{id:R.device_all},{id:R.device_groups},{id:R.device_shared}]},{id:R.assets,pages:[{id:R.asset_all},{id:R.asset_groups},{id:R.asset_shared}]},{id:R.entity_views,pages:[{id:R.entity_view_all},{id:R.entity_view_groups},{id:R.entity_view_shared}]}]},{id:R.customers,pages:[{id:R.customer_all},{id:R.customer_groups},{id:R.customer_shared},{id:R.customers_hierarchy}]},{id:R.users,pages:[{id:R.user_all},{id:R.user_groups}]},{id:R.edge_instances,pages:[{id:R.edge_all},{id:R.edge_groups},{id:R.edge_shared}]},{id:R.resources,pages:[{id:R.images},{id:R.scada_symbols}]},{id:R.notifications_center,pages:[{id:R.notification_inbox}]},{id:R.scheduler},{id:R.white_labeling,pages:[{id:R.white_labeling_general},{id:R.login_white_labeling},{id:R.custom_translation},{id:R.custom_menu}]},{id:R.settings,pages:[{id:R.home_settings}]},{id:R.security_settings,pages:[{id:R.roles},{id:R.audit_log},{id:R.oauth2,pages:[{id:R.domains},{id:R.clients}]}]}]]]),hX=new Map([[Mt.SYS_ADMIN,[{name:"tenant.management",places:[R.tenants,R.tenant_profiles]},{name:"widget.management",places:[R.widget_library]},{name:"admin.system-settings",places:[R.general,R.mail_server,R.notification_settings,R.security_settings,R.oauth2,R.domains,R.mobile_apps,R.clients,R.two_fa,R.resources_library,R.queues]},{name:"white-labeling.white-labeling",places:[R.white_labeling_general,R.login_white_labeling,R.mail_templates]},{name:"custom-translation.custom-translation",places:[R.custom_translation]},{name:"custom-menu.custom-menu",places:[R.custom_menu]}]],[Mt.TENANT_ADMIN,[{name:"solution-template.management",places:[R.solution_templates]},{name:"rulechain.management",places:[R.rule_chains]},{name:"converter.management",places:[R.converters]},{name:"integration.management",places:[R.integrations]},{name:"role.management",places:[R.roles]},{name:"user.management",places:[R.users]},{name:"customer.management",places:[R.customers,R.customers_hierarchy]},{name:"asset.management",places:[R.assets,R.asset_profiles]},{name:"device.management",places:[R.devices,R.device_profiles,R.otaUpdates]},{name:"entity-view.management",places:[R.entity_views]},{name:"edge.management",places:[R.edges,R.rulechain_templates,R.converter_templates,R.integration_templates]},{name:"dashboard.management",places:[R.widget_library,R.dashboards]},{name:"scheduler.management",places:[R.scheduler]},{name:"white-labeling.white-labeling",places:[R.white_labeling_general,R.login_white_labeling,R.mail_templates]},{name:"custom-translation.custom-translation",places:[R.custom_translation]},{name:"custom-menu.custom-menu",places:[R.custom_menu]},{name:"version-control.management",places:[R.version_control]},{name:"audit-log.audit",places:[R.audit_log,R.api_usage]},{name:"admin.system-settings",places:[R.home_settings,R.mail_server,R.notification_settings,R.self_registration,R.two_fa,R.resources_library,R.repository_settings,R.auto_commit_settings,R.trendz_settings]}]],[Mt.CUSTOMER_USER,[{name:"role.management",places:[R.roles]},{name:"user.management",places:[R.users]},{name:"customer.management",places:[R.customers,R.customers_hierarchy]},{name:"asset.management",places:[R.assets]},{name:"device.management",places:[R.devices]},{name:"entity-view.management",places:[R.entity_views]},{name:"edge.management",places:[R.edge_instances]},{name:"dashboard.management",places:[R.dashboards]},{name:"scheduler.management",places:[R.scheduler]},{name:"white-labeling.white-labeling",places:[R.white_labeling_general,R.login_white_labeling]},{name:"custom-translation.custom-translation",places:[R.custom_translation]},{name:"custom-menu.custom-menu",places:[R.custom_menu]},{name:"audit-log.audit",places:[R.audit_log]},{name:"admin.system-settings",places:[R.home_settings]}]]]),mG=n=>{let t=[];
20for(let r of n)t.push(r.id),r.pages?.length&&t.push(...mG(r.pages));return t},uG=(n,t,r)=>{if(r?.items?.length){let e={},i=mG(DC.get(n.authUser.authority));return r.items.map(o=>fG(n,t,i,e,o)).filter(o=>!!o)}else return(DC.get(n.authUser.authority)||[]).map(i=>gG(n,t,i)).filter(i=>!!i)},hG=(n,t)=>(hX.get(n.authUser.authority)||[]).map(e=>gX(t,e)).filter(e=>!!e),fG=(n,t,r,e,i)=>{if(yT(i)){if(!W2(n,t,r,i)||De(i.visible)&&!i.visible)return;let o=CT.get(i.id),a=Di(o);if(fn(i.icon)&&(a.icon=i.icon),fn(i.name)&&(a.name=i.name,a.customTranslate=!0),kC(i))switch(i.homeType){case mm.DEFAULT:break;case mm.DASHBOARD:a.homeDashboardId=i.dashboardId,a.homeHideDashboardToolbar=i.hideDashboardToolbar;break}return i.pages?.length&&(a.pages=i.pages.map(s=>fG(n,t,r,e,s)).filter(s=>!!s)),a.type==="toggle"&&!a.pages?.length?void 0:a}else if(rG(i))return fX(e,i)},gG=(n,t,r)=>{if(W2(n,t,[],r)){let e=CT.get(R[r.id]);if(e){let i=Di(e);return r.pages?.length&&(i.pages=r.pages.map(o=>gG(n,t,o)).filter(o=>!!o)),i}else return}else return},W2=(n,t,r,e)=>{if(r?.length&&!r.includes(e.id))return!1;if(n.authUser.authority===Mt.SYS_ADMIN)return!0;let i=uX.get(R[e.id]);return!(i&&!i(n,t)||e.pages?.length&&e.pages.every(o=>!W2(n,t,r,o)))},fX=(n,t)=>{if(De(t.visible)&&!t.visible||t.menuItemType===Fu.SECTION&&!t.pages?.length)return;let r=dG(t.name,n),e={id:r,isCustom:!0,customTranslate:!0,stateId:r,name:t.name,icon:t.icon};if(t.menuItemType===Fu.SECTION){e.type="toggle";let i=[],o={};for(let a of t.pages){if(De(a.visible)&&!a.visible)continue;let s=dG(a.name,n),c={id:s,isCustom:!0,customTranslate:!0,stateId:s,name:a.name,type:"link",icon:a.icon,path:"/iframeView/child"};c.queryParams=re(re({},q2(t,r)),q2(a,s,!0)),i.push(c),o[s]=!0}if(!i.length)return;e.pages=i,e.childStateIds=o}else e.path="/iframeView",e.type="link",e.queryParams=q2(t,r);return e},q2=(n,t,r=!1)=>{let e={};return r?e.childStateId=t:e.stateId=t,n.linkType===Df.URL?r?(e.childIframeUrl=n.url,e.childSetAccessToken=n.setAccessToken):(e.iframeUrl=n.url,e.setAccessToken=n.setAccessToken):n.linkType===Df.DASHBOARD&&(r?(e.childDashboardId=n.dashboardId,e.childHideDashboardToolbar=n.hideDashboardToolbar):(e.dashboardId=n.dashboardId,e.hideDashboardToolbar=n.hideDashboardToolbar)),e},dG=(n,t)=>{let r=(" "+n).slice(1),e=r,i=1;for(;t[e];)e=r+i,i++;return t[e]=!0,e},gX=(n,t)=>{let r=t.places.map(e=>n.find(i=>i.id===e)).filter(e=>!!e);if(r.length)return{name:t.name,places:r}};y();var Vb=(()=>{let t=class t{constructor(e,i,o,a){this.store=e,this.router=i,this.customMenuService=o,this.userPermissionsService=a,this.menuSections$=new or(1),this.homeSections$=new or(1),this.availableMenuSections$=new or(1),this.availableMenuLinks$=this.menuSections$.pipe(W(s=>this.allMenuLinks(s))),this.currentCustomSection=null,this.currentCustomChildSection=null,this.store.pipe(Aa(yS)).subscribe(s=>{s&&this.buildMenu()}),this.customMenuService.customMenuConfigChanged$.subscribe(()=>{this.buildMenu()}),this.router.events.pipe(Pi(s=>s instanceof Xp)).subscribe(()=>{this.updateOpenedMenuSections()}),this.router.events.pipe(Pi(s=>s instanceof pf)).subscribe(()=>{this.updateCurrentCustomSection()})}buildMenu(){this.store.pipe(Aa(R4),$n(1)).subscribe(e=>{if(e.authUser){let i=this.customMenuService.getCustomMenu();this.currentMenuSections=uG(e,this.userPermissionsService,i),this.updateCurrentCustomSection(),this.updateOpenedMenuSections(),this.menuSections$.next(this.currentMenuSections);let o=this.allMenuSections(this.currentMenuSections);this.availableMenuSections$.next(o);let a=hG(e,o);this.homeSections$.next(a)}})}updateOpenedMenuSections(){let e=this.router.url,i=V4(this.store);this.currentMenuSections?.length&&this.currentMenuSections.filter(o=>pG(o,e,i)).forEach(o=>o.opened=!0)}allMenuLinks(e){let i=[];for(let o of e)o.type==="link"&&i.push(o),o.pages&&o.pages.length&&i.push(...this.allMenuLinks(o.pages));return i}allMenuSections(e){let i=[];for(let o of e)i.push(o),o.pages&&o.pages.length&&i.push(...this.allMenuSections(o.pages));return i}menuSections(){return this.menuSections$}homeSections(){return this.homeSections$}getCurrentCustomSection(){return this.currentCustomSection}getCurrentCustomChildSection(){return this.currentCustomChildSection}updateCurrentCustomSection(){let e=this.extractQueryParams();this.currentCustomSection=this.detectCurrentCustomSection(e),this.currentCustomChildSection=this.detectCurrentCustomChildSection(e)}detectCurrentCustomSection(e){if(e&&e.stateId){let i=e.stateId,o=this.currentMenuSections.find(a=>a.isCustom&&a.stateId===i);if(o)return o}return null}detectCurrentCustomChildSection(e){if(e&&e.childStateId){let i=e.childStateId;for(let o of this.currentMenuSections)if(o.isCustom&&o.pages&&o.pages.length){let a=o.pages.find(s=>s.stateId===i);if(a)return a}}return null}extractQueryParams(){let o=this.router.routerState.snapshot.root;for(;o.children.length;)o=o.children[0];return o.queryParams}getRedirectPath(e,i){return e="/"+e.replace(/\./g,"/"),i.startsWith("/")||(i=`${e}/${i}`),this.menuSections$.pipe(W(o=>{let a=this.findSectionByPath(o,e);if(a&&a.pages){let s=a.pages;if(s&&s.length){let c=s.filter(u=>u.path===i);if(!c||!c.length)return s[0].path}return i}return i}))}findSectionByPath(e,i){for(let o of e){if(i===o.path)return o;if(o.pages?.length){let a=this.findSectionByPath(o.pages,i);if(a)return a}}return null}availableMenuLinks(){return this.availableMenuLinks$}availableMenuSections(){return this.availableMenuSections$}menuLinkById(e){return this.availableMenuLinks$.pipe(W(i=>i.find(o=>o.id===e)))}menuLinksByIds(e){return this.availableMenuLinks$.pipe(W(i=>i.filter(o=>e.includes(o.id)).sort((o,a)=>{let s=e.indexOf(o.id),c=e.indexOf(a.id);return s-c})))}};t.\u0275fac=function(i){return new(i||t)(X(ve),X(vi),X($S),X(So)
20)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var Zd=(()=>{let t=class t{constructor(){this.broadcastSubject=new Te}broadcast(e,...i){let o={name:e,args:i};this.broadcastSubject.next(o)}on(e,i){return this.broadcastSubject.asObservable().pipe(Pi(o=>o.name===e)).subscribe(o=>{let a={name:o.name};i(a,o.args)})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var wT=(()=>{let t=class t{constructor(){this.activeComponentChangedSubject=new Te}getCurrentActiveComponent(){return this.activeComponent}setCurrentActiveComponent(e){this.activeComponent=e,this.activeComponentChangedSubject.next(e)}onActiveComponentChanged(){return this.activeComponentChangedSubject.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Fo={};Ae(Fo,{TbIconComponent:()=>In});y();var vX=["iconNameContent"],yX=["*"],CX=oT(class{constructor(n){this._elementRef=n}}),_G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],wX=_G.map(n=>`[${n}]`).join(", "),xX=/^url\(['"]?#(.*?)['"]?\)$/,In=(()=>{let t=class t extends CX{get viewValue(){return(this._iconNameContent?.nativeElement.textContent||"").trim()}constructor(e,i,o,a,s,c){super(e),this.contentObserver=i,this.renderer=o,this._iconRegistry=a,this._location=s,this._errorHandler=c,this._contentChanges=ln.EMPTY,this._previousFontSetClass=[],this._useSvgIcon=!1,this._textElement=null,this._currentIconFetch=ln.EMPTY}ngAfterContentInit(){this.icon=this.viewValue,this._updateIcon(),this._contentChanges=this.contentObserver.observe(this._iconNameContent.nativeElement).subscribe(()=>{let e=this.viewValue;this.icon!==e&&(this.icon=e,this._updateIcon())})}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._contentChanges.unsubscribe(),this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_updateIcon(){let e=Pb(this.icon);this._useSvgIcon!==e&&(this._useSvgIcon=e,this._useSvgIcon?this._updateFontIcon(void 0):this._updateSvgIcon(void 0)),this._useSvgIcon?this._updateSvgIcon(this.icon):this._updateFontIcon(this.icon)}_updateFontIcon(e){if(e){this._clearFontIcon();let i=am(e)[1];this._textElement=this.renderer.createText(i);let o=this._elementRef.nativeElement;this.renderer.insertBefore(o,this._textElement,this._iconNameContent.nativeElement);let a=this._iconRegistry.getDefaultFontSetClass().filter(s=>s.length>0);a.forEach(s=>o.classList.add(s)),this._previousFontSetClass=a}else this._clearFontIcon()}_clearFontIcon(){let e=this._elementRef.nativeElement;this._textElement!==null&&(this.renderer.removeChild(e,this._textElement),this._textElement=null),this._previousFontSetClass.forEach(i=>e.classList.remove(i)),this._previousFontSetClass=[]}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[i,o]=am(e);i&&(this._svgNamespace=i),o&&(this._svgName=o),this._iconRegistry.getDefaultFontSetClass(),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,i).pipe($n(1)).subscribe({next:a=>this._setSvgElement(a),error:a=>{let s=`Error retrieving icon ${i}:${o}! ${a.message}`;this._errorHandler.handleError(new Error(s))}})}else this._clearSvgElement()}_setSvgElement(e){this._clearSvgElement();let i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this.renderer.insertBefore(this._elementRef.nativeElement,e,this._iconNameContent.nativeElement)}_clearSvgElement(){let e=this._elementRef.nativeElement,i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){let o=e.childNodes[i];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(wX),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;
20i.forEach(a=>{_G.forEach(s=>{let c=a,u=c.getAttribute(s),f=u?u.match(xX):null;if(f){let _=o.get(c);_||(_=[],o.set(c,_)),_.push({name:s,value:f[1]})}})})}_prependPathToReferences(e){let i=this._elementsWithExternalReferences;i&&i.forEach((o,a)=>{o.forEach(s=>{a.setAttribute(s.name,`url('${e}#${s.value}')`)})})}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(ZS),h(Ni),h(Vj),h(Lj),h(rb))},t.\u0275cmp=L({type:t,selectors:[["tb-icon"]],viewQuery:function(i,o){if(i&1&&ae(vX,7),i&2){let a;Q(a=K())&&(o._iconNameContent=a.first)}},hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:5,hostBindings:function(i,o){i&2&&(Je("data-mat-icon-type",o._useSvgIcon?"svg":"font")("data-mat-icon-name",o._svgName)("data-mat-icon-namespace",o._svgNamespace),Y("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color"},exportAs:["tbIcon"],features:[Ce],ngContentSelectors:yX,decls:3,vars:0,consts:[["iconNameContent",""],[2,"display","none"]],template:function(i,o){i&1&&(Ct(),d(0,"span",1,0),Fe(2),p())},encapsulation:2,changeDetection:0});let n=t;return n})();y();var yl=(()=>{let t=class t{constructor(e){this.utils=e}transform(e,i){return i||(i=e),this.utils.customTranslation(e,i)}};t.\u0275fac=function(i){return new(i||t)(h(vn,16))},t.\u0275pipe=_r({name:"customTranslate",type:t,pure:!0});let n=t;return n})();var vG=n=>({breadcrumb:n});function SX(n,t){if(n&1&&(d(0,"h1",4),g(1),v(2,"customTranslate"),v(3,"translate"),p()),n&2){let r=t.$implicit;l(),j(" ",r.labelFunction?r.labelFunction():r.customTranslate?C(2,1,r.label):C(3,3,r.label)," ")}}function TX(n,t){n&1&&Ti(0)}function EX(n,t){if(n&1&&(d(0,"a",9),x(1,TX,1,0,"ng-container",10),p()),n&2){let r=b
20().$implicit;b();let e=me(6);m("routerLink",r.link)("queryParams",r.queryParams),l(),m("ngTemplateOutlet",e)("ngTemplateOutletContext",Xe(4,vG,r))}}function IX(n,t){n&1&&Ti(0)}function kX(n,t){if(n&1&&(d(0,"span"),x(1,IX,1,0,"ng-container",10),p()),n&2){let r=b().$implicit;b();let e=me(6);l(),m("ngTemplateOutlet",e)("ngTemplateOutletContext",Xe(2,vG,r))}}function DX(n,t){if(n&1&&(d(0,"span",5),x(1,EX,2,6,"a",6)(2,kX,2,4,"span",7),d(3,"span",8),g(4," > "),p()()),n&2){let r=t.last;m("ngSwitch",r),l(),m("ngSwitchCase",!1),l(),m("ngSwitchCase",!0),l(),Y("!hidden",r)}}function MX(n,t){if(n&1&&O(0,"img",13),n&2){let r=b().breadcrumb;m("src",r.iconUrl,yo)}}function AX(n,t){if(n&1&&(d(0,"tb-icon"),g(1),p()),n&2){let r=b().breadcrumb;l(),j(" ",r.icon," ")}}function OX(n,t){if(n&1&&(x(0,MX,1,1,"img",11)(1,AX,2,1,"tb-icon",12),g(2),v(3,"customTranslate"),v(4,"translate")),n&2){let r=t.breadcrumb;m("ngIf",r.iconUrl),l(),m("ngIf",!r.iconUrl),l(),j(" ",r.labelFunction?r.labelFunction():r.customTranslate?C(3,3,r.label):C(4,5,r.label),`
21`)}}var xT=(()=>{let t=class t{setActiveComponent(e){this.updateBreadcrumbsSubscription&&(this.updateBreadcrumbsSubscription.unsubscribe(),this.updateBreadcrumbsSubscription=null),this.activeComponentValue=e,this.activeComponentValue&&this.activeComponentValue.updateBreadcrumbs&&(this.updateBreadcrumbsSubscription=this.activeComponentValue.updateBreadcrumbs.subscribe(()=>{this.menuService.availableMenuSections().pipe(jd()).subscribe(i=>{this.breadcrumbs$.next(this.buildBreadCrumbs(this.activatedRoute.snapshot,i))})}))}constructor(e,i,o,a,s,c,u,f){this.router=e,this.activatedRoute=i,this.broadcast=o,this.activeComponentService=a,this.cd=s,this.translate=c,this.menuService=u,this.utils=f,this.updateBreadcrumbsSubscription=null,this.breadcrumbs$=new Gn([]),this.routerEventsSubscription=Xt(this.router.events.pipe(Pi(_=>_ instanceof Xp),xr()),this.menuService.availableMenuSections()).pipe(ii(()=>this.menuService.availableMenuSections().pipe(jd())),W(_=>this.buildBreadCrumbs(this.activatedRoute.snapshot,_))).subscribe(_=>this.breadcrumbs$.next(_)),this.activeComponentSubscription=this.activeComponentService.onActiveComponentChanged().subscribe(_=>this.setActiveComponent(_)),this.lastBreadcrumb$=this.breadcrumbs$.pipe(W(_=>_[_.length-1]))}ngOnInit(){this.broadcast.on("updateBreadcrumb",()=>{this.cd.markForCheck()}),this.setActiveComponent(this.activeComponentService.getCurrentActiveComponent())}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.activeComponentSubscription&&this.activeComponentSubscription.unsubscribe()}lastChild(e){let i=e;for(;i.firstChild!==null;)i=i.firstChild;return i}buildBreadCrumbs(e,i,o=[],a){a||(a=this.lastChild(e));let s=o;if(e.routeConfig&&e.routeConfig.data){let c=e.routeConfig.data.breadcrumb;if(c&&!c.skip){let u,f,_,I,S,F,H=null;if((c.custom||c.customChild)&&(H=c.customChild?this.menuService.getCurrentCustomChildSection():this.menuService.getCurrentCustomSection()),H)u=H.name,f=!0,I=H.icon,S=H.path,F=H.queryParams;else{let ee=null;c.menuId&&(ee=i.find(Ie=>Ie.id===c.menuId),ee||(ee=CT.get(c.menuId))),u=ee?.name||c.label||"home.home",f=ee?.customTranslate||!1,c.labelFunction&&(_=()=>this.activeComponentValue?c.labelFunction(e,this.translate,this.activeComponentValue,a.data,this.utils):u),I=ee?.icon||c.icon||"home",S=[e.pathFromRoot.map(Ie=>Ie.url.map(He=>He.toString()).join("/")).join("/")]}let q={id:Zr(),label:u,customTranslate:f,labelFunction:_,icon:I,link:S,queryParams:F};s=[...o,q]}}return e.firstChild?this.buildBreadCrumbs(e.firstChild,i,s,a):s}trackByBreadcrumbs(e,i){return i.id}};t.\u0275fac=function(i){return new(i||t)(h(vi),h(ub),h(Zd),h(wT),h(Me),h(Ge),h(Vb),h(vn))},t.\u0275cmp=L({type:t,selectors:[["tb-breadcrumb"]],decls:7,vars:7,consts:[["breadcrumbWithIcon",""],[1,"tb-breadcrumb","flex","flex-1","flex-row"],["class","flex-1 gt-sm:!hidden",4,"ngIf"],["class","flex flex-row lt-md:!hidden",3,"ngSwitch",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex-1","gt-sm:!hidden"],[1,"flex","flex-row","lt-md:!hidden",3,"ngSwitch"],[3,"routerLink","queryParams",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"divi
21der"],[3,"routerLink","queryParams"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"src",4,"ngIf"],[4,"ngIf"],[3,"src"]],template:function(i,o){i&1&&(d(0,"div",1),x(1,SX,4,5,"h1",2),v(2,"async"),x(3,DX,5,5,"span",3),v(4,"async"),p(),x(5,OX,5,7,"ng-template",null,0,kt)),i&2&&(l(),m("ngIf",C(2,3,o.lastBreadcrumb$)),l(2),m("ngForOf",C(4,5,o.breadcrumbs$))("ngForTrackBy",o.trackByBreadcrumbs))},dependencies:[Ke,ce,fo,lf,cf,ll,In,Ve,be,yl],styles:['@charset "UTF-8";[_nghost-%COMP%]{min-width:0}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]{font-size:18px;font-weight:400;overflow:hidden}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.divider){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.divider)   .mat-icon[_ngcontent-%COMP%]{vertical-align:bottom}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:24px;font-weight:400}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{border:none;opacity:.75;transition:opacity .35s;color:inherit;text-decoration:none;outline:none}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, [_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{text-decoration:none!important;border:none;opacity:1}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   .divider[_ngcontent-%COMP%]{padding:0 20px}[_nghost-%COMP%]   .tb-breadcrumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;width:24px;min-width:24px;height:24px;min-height:24px;color:#fff;fill:#fff}'],changeDetection:0});let n=t;return n})();y();var Nu=(()=>{let t=class t{set flowDirectoryOnly(e){this._directoryOnly=e,this.setup()}set flowAttributes(e){this._attributes=e,this.setup()}set flow(e){this._flow=e,this.setup()}setup(){this._flow&&this._flow.assignBrowse(this.el.nativeElement,this._directoryOnly,this._flow.opts.singleFile,this._attributes)}constructor(e){this.el=e,this._directoryOnly=!1}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","flowButton",""]],inputs:{flowDirectoryOnly:"flowDirectoryOnly",flowAttributes:"flowAttributes",flow:"flow"}});let n=t;return n})(),Vu=(()=>{let t=class t{set flow(e){this.flowJs=e,e&&this.enable()}enable(){this.flowJs?.assignDrop(this.el.nativeElement)}disable(){this.flowJs?.unAssignDrop(this.el.nativeElement)}constructor(e,i){this.el=e,this.renderer=i}ngOnInit(){this.renderer.listen("body","drop",e=>e.preventDefault()),this.renderer.listen("body","dragover",e=>e.preventDefault())}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ni))},t.\u0275dir=_e({type:t,selectors:[["","flowDrop",""]],inputs:{flow:"flow"},exportAs:["flowDrop"]});let n=t;return n})(),yG=(()=>{let t=class t{set flowSrc(e){this.fileReader=new FileReader,this.fileReader.readAsDataURL(e.flowFile.file),this.fileReader.onload=i=>{let o=i.target.result;this.el.nativeElement.setAttribute("src",o)}}constructor(e){this.el=e}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","flowSrc",""]],inputs:{flowSrc:"flowSrc"}});let n=t;return n})(),Q2=new tt("Flow");function RX(n){return{id:n.uniqueIdentifier,name:n.name,progress:n.progress(),averageSpeed:n.averageSpeed,currentSpeed:n.currentSpeed,size:n.size,paused:n.paused,error:n.error,complete:n.isComplete(),success:n.isComplete()&&!n.error,timeRemaining:n.timeRemaining(),flowFile:n}}var Lu=(()=>{let t=class t{set flowConfig(e){Ga(this.platform)&&(this.flowJs=new this.flowConstructor(e),this.flow$.next(this.flowJs))}constructor(e,i){this.flowConstructor=e,this.platform=i,this.flow$=new or(1),this.pauseOrResumeEvent$=new Te,this.events$=this.flow$.pipe(ii(o=>Xt(this.flowEvents(o),this.ngxFlowEvents()))),this.transfers$=this.events$.pipe(W(o=>this.flowJs.files),W((o=[])=>({transfers:o.map(a=>RX(a)),flow:this.flowJs,totalProgress:this.flowJs.progress()})),Cs(1)),this.somethingToUpload$=this.transfers$.pipe(W(o=>o.transfers.some(a=>!a.success),on(!1)))}flowEvents(e){let i=[this.listenForEvent(e,"fileSuccess"),this.listenForEvent(e,"fileProgress"),this.listenForEvent(e,"fileAdded"),this.listenForEvent(e,"filesAdded"),this.listenForEvent(e,"filesSubmitted"),this.listenForEvent(e,"fileRemoved"),this.listenForEvent(e,"fileRetry"),this.listenForEvent(e,"fileError"),this.listenForEvent(e,"uploadStart"),this.listenForEvent(e,"complete"),this.listenForEvent(e,"progress")];return Xt(...i)}ngxFlowEvents(){let e=this.pauseOrResumeEvent$.pipe(W(a=>({type:"pauseOrResume"}))),i=this.flow$.pipe(W(a=>({type:"newFlowJsInstance"})));return Xt(...[e,i])}upload(){this.flowJs.upload()}
21cancel(){this.flowJs.cancel()}cancelFile(e){e.flowFile.cancel()}pauseFile(e){e.flowFile.pause(),this.pauseOrResumeEvent$.next()}resumeFile(e){e.flowFile.resume(),this.pauseOrResumeEvent$.next()}listenForEvent(e,i){return Jn(e,i).pipe(W(o=>({type:i,event:o})))}};t.\u0275fac=function(i){return new(i||t)(h(Q2),h(vu))},t.\u0275dir=_e({type:t,selectors:[["","flowConfig",""]],inputs:{flowConfig:"flowConfig"},exportAs:["flow"]});let n=t;return n})();var K2=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,declarations:[Nu,yG,Vu,Lu],exports:[Nu,yG,Vu,Lu]}),t.\u0275inj=Nt({});let n=t;return n})();y();var FX=["nodeContent"];function NX(n,t){}var SG=(n,t)=>({top:n,left:t});function VX(n,t){if(n&1){let r=B();ar(),d(0,"g")(1,"path",12),T("mousedown",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseDown(i,o))})("click",function(i){let o=D(r).$implicit,a=b();return M(a.edgeClick(i,o))})("dblclick",function(i){let o=D(r).$implicit,a=b();return M(a.edgeDoubleClick(i,o))})("mouseover",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseOver(i,o))})("mouseenter",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseEnter(i,o))})("mouseleave",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseLeave(i,o))}),p()()}if(n&2){let r=t.$implicit,e=t.index,i=b();l(),Je("id","fc-edge-path-"+e)("class",i.modelService.edges.isSelected(r)&&i.flowchartConstants.selectedClass+" "+i.flowchartConstants.edgeClass||r===i.mouseoverService.mouseoverscope.edge&&i.flowchartConstants.hoverClass+" "+i.flowchartConstants.edgeClass||r.active&&i.flowchartConstants.activeClass+" "+i.flowchartConstants.edgeClass||i.flowchartConstants.edgeClass)("d",i.getEdgeDAttribute(r))("marker-end","url(#"+(i.modelService.edges.isSelected(r)?i.arrowDefIdSelected:i.arrowDefId)+")")}}function LX(n,t){if(n&1&&(ar(),d(0,"g"),O(1,"path")(2,"circle",13),p()),n&2){let r=b
21();l(),Je("class",r.flowchartConstants.edgeClass+" "+r.flowchartConstants.draggingClass)("d",r.edgeDrawingService.getEdgeDAttribute(r.edgeDraggingService.edgeDragging.dragPoint1,r.edgeDraggingService.edgeDragging.dragPoint2,r.edgeStyle)),l(),Je("cx",r.edgeDraggingService.edgeDragging.dragPoint2.x)("cy",r.edgeDraggingService.edgeDragging.dragPoint2.y)}}function BX(n,t){if(n&1&&(ar(),d(0,"g",14),O(1,"path",15)(2,"circle",13),p()),n&2){let r=b();CB("shadow-svg-class ",r.flowchartConstants.edgeClass," ",r.flowchartConstants.draggingClass,"")}}function jX(n,t){if(n&1&&(pt(0),O(1,"fc-node",16),ct()),n&2){let r=t.$implicit,e=b();l(),m("selected",e.modelService.nodes.isSelected(r))("edit",e.modelService.nodes.isEdit(r))("underMouse",r===e.mouseoverService.mouseoverscope.node)("node",r)("mouseOverConnector",e.mouseoverService.mouseoverscope.connector)("modelservice",e.modelService)("dragging",e.nodeDraggingService.isDraggingNode(r))("callbacks",e.callbacks)("userNodeCallbacks",e.userNodeCallbacks)}}function GX(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b
21(2);Je("id","fc-edge-label-dragging"),l(),z(r.edgeDraggingService.edgeDragging.dragLabel)}}function zX(n,t){if(n&1&&(d(0,"div",17)(1,"div",18),x(2,GX,2,2,"span",7),p()()),n&2){let r=b();m("ngStyle",Yi(3,SG,r.edgeDrawingService.getEdgeCenter(r.edgeDraggingService.edgeDragging.dragPoint1,r.edgeDraggingService.edgeDragging.dragPoint2).y+"px",r.edgeDrawingService.getEdgeCenter(r.edgeDraggingService.edgeDragging.dragPoint1,r.edgeDraggingService.edgeDragging.dragPoint2).x+"px")),Je("class","fc-noselect "+r.flowchartConstants.edgeLabelClass),l(2),m("ngIf",r.edgeDraggingService.edgeDragging.dragLabel)}}function $X(n,t){if(n&1){let r=B();d(0,"div",22),T("click",function(i){D(r);let o=b().$implicit,a=b();return M(a.edgeEdit(i,o))}),O(1,"i",23),p()}}function UX(n,t){if(n&1){let r=B();d(0,"div",24),T("click",function(i){D(r);let o=b().$implicit,a=b();return M(a.edgeRemove(i,o))}),g(1," \xD7 "),p()}}function HX(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b(),e=r.$implicit,i=r.index;Je("id","fc-edge-label-"+i),l(),z(e.label)}}function qX(n,t){if(n&1){let r=B();d(0,"div",19),T("mousedown",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseDown(i,o))})("click",function(i){let o=D(r).$implicit,a=b();return M(a.edgeClick(i,o))})("dblclick",function(i){let o=D(r).$implicit,a=b();return M(a.edgeDoubleClick(i,o))})("mouseover",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseOver(i,o))})("mouseenter",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseEnter(i,o))})("mouseleave",function(i){let o=D(r).$implicit,a=b();return M(a.edgeMouseLeave(i,o))}),d(1,"div",18),x(2,$X,2,0,"div",20)(3,UX,2,0,"div",21)(4,HX,2,2,"span",7),p()()}if(n&2){let r=t.$implicit,e=b();m("ngStyle",Yi(5,SG,e.edgeDrawingService.getEdgeCenter(e.modelService.edges.sourceCoord(r),e.modelService.edges.destCoord(r)).y+"px",e.edgeDrawingService.getEdgeCenter(e.modelService.edges.sourceCoord(r),e.modelService.edges.destCoord(r)).x+"px")),Je("class","fc-noselect "+(e.modelService.edges.isEdit(r)&&e.flowchartConstants.editClass+" "+e.flowchartConstants.edgeLabelClass||e.modelService.edges.isSelected(r)&&e.flowchartConstants.selectedClass+" "+e.flowchartConstants.edgeLabelClass||r===e.mouseoverService.mouseoverscope.edge&&e.flowchartConstants.hoverClass+" "+e.flowchartConstants.edgeLabelClass||r.active&&e.flowchartConstants.activeClass+" "+e.flowchartConstants.edgeLabelClass||e.flowchartConstants.edgeLabelClass)),l(2),m("ngIf",e.modelService.isEditable()),l(),m("ngIf",e.modelService.isEditable()),l(),m("ngIf",r.label)}}function WX(n,t){if(n&1&&(d(0,"div",5),O(1,"div",6),p()),n&2){let r=t.$implicit,e=b();m("connector",r)("callbacks",e.callbacks),l(),m("connector",r)("nodeRectInfo",e.nodeRectInfo)("mouseOverConnector",e.mouseOverConnector)("callbacks",e.callbacks)("modelservice",e.modelservice)}}function YX(n,t){if(n&1&&(d(0,"div",5),O(1,"div",6),p()),n&2){let r=t.$implicit,e=b();m("connector",r)("callbacks",e.callbacks),l(),m("connector",r)("nodeRectInfo",e.nodeRectInfo)("mouseOverConnector",e.mouseOverConnector)("callbacks",e.callbacks)("modelservice",e.modelservice)}}function QX(n,t){if(n&1){let r=B();d(0,"div",7),T("click",function(i){D(r);let o=b();return M(o.userNodeCallbacks.nodeEdit(i,o.node))}),O(1,"i",8),p()}}function KX(n,t){if(n&1){let r=B();d(0,"div",9),T("click",function(){D(r);let i=b();return M(i.modelservice.nodes.delete(i.node))}),g(1," \xD7 "),p()}}var TG=new tt("fc-node.component.config"),zs="fc",CG="leftConnector",wG="rightConnector",Hr={htmlPrefix:zs,leftConnectorType:CG,rightConnectorType:wG,curvedStyle:"curved",lineStyle:"line",dragAnimationRepaint:"repaint",dragAnimationShadow:"shadow",canvasClass:zs+"-canvas",selectedClass:zs+"-selected",editClass:zs+"-edit",activeClass:zs+"-active",hoverClass:zs+"-hover",draggingClass:zs+"-dragging",edgeClass:zs+"-edge",edgeLabelClass:zs+"-edge-label",connectorClass:zs+"-connector",magnetClass:zs+"-magnet",nodeClass:zs+"-node",nodeOverlayClass:zs+"-node-overlay",leftConnectorClass:zs+"-"+CG+"s",rightConnectorClass:zs+"-"+wG+"s",canvasResizeThreshold:200,canvasResizeStep:200},ST=class{constructor(){Error.apply(this,arguments)}};Object.defineProperty(ST,"prototype",new Error);var Yo=class extends ST{constructor(t){super(),this.message=t}},XX=n=>{let t={};
21n.nodes.forEach(o=>{t[o.id]={incoming:0,outgoing:[]}}),n.edges.forEach(o=>{let a=n.nodes.filter(c=>c.connectors.some(u=>u.id===o.source))[0],s=n.nodes.filter(c=>c.connectors.some(u=>u.id===o.destination))[0];t[a.id].outgoing.push(s.id),t[s.id].incoming++});let r=[],e=[];for(let o of Object.keys(t))t[o].incoming===0&&e.push(o);for(;e.length!==0;){let o=e.pop();for(let a=0;a<t[o].outgoing.length;a++){let s=t[o].outgoing[a];t[s].incoming--,t[s].incoming===0&&e.push(s),t[o].outgoing.splice(a,1),a--}r.push(o)}let i=!1;for(let o of Object.keys(t))t[o].incoming!==0&&(i=!0);return i?null:r},OC=class{constructor(t){this.modelService=t}select(t){this.modelService.selectObject(t)}deselect(t){this.modelService.deselectObject(t)}toggleSelected(t){this.modelService.toggleSelectedObject(t)}isSelected(t){return this.modelService.isSelectedObject(t)}isEdit(t){return this.modelService.isEditObject(t)}},eA=class extends OC{constructor(t){super(t)}getConnector(t){let r=this.modelService.model;for(let e of r.nodes)for(let i of e.connectors)if(i.id===t)return i}getConnectorRectInfo(t){return this.modelService.connectorsRectInfos[t]}setConnectorRectInfo(t,r){this.modelService.connectorsRectInfos[t]=r,this.modelService.detectChanges()}_getCoords(t,r){let e=this.getConnectorRectInfo(t),i=this.modelService.canvasHtmlElement;if(e==null||i===null)return{x:0,y:0};let o=e.type===Hr.leftConnectorType?e.nodeRectInfo.left():e.nodeRectInfo.right(),a=e.nodeRectInfo.top()+e.nodeRectInfo.height()/2;return r||(o-=e.width/2,a-=e.height/2),{x:Math.round(o),y:Math.round(a)}}getCoords(t){return this._getCoords(t,!1)}getCenteredCoord(t){return this._getCoords(t,!0)}},tA=class extends OC{constructor(t){super(t)}getConnectorsByType(t,r){return t.connectors.filter(e=>e.type===r)}_addConnector(t,r){t.connectors.push(r);try{this.modelService.modelValidation.validateNode(t)}catch(e){throw t.connectors.splice(t.connectors.indexOf(r),1),e}}delete(t){this.isSelected(t)&&this.deselect(t);let r=this.modelService.model,e=r.nodes.indexOf(t);if(e===-1)throw t===void 0?new Error("Passed undefined"):new Error("Tried to delete not existing node");let i=this.getConnectorIds(t);for(let o=0;o<r.edges.length;o++){let a=r.edges[o];(i.indexOf(a.source)!==-1||i.indexOf(a.destination)!==-1)&&(this.modelService.edges.delete(a),o--)}
21r.nodes.splice(e,1),this.modelService.notifyModelChanged(),this.modelService.nodeRemovedCallback(t)}getSelectedNodes(){return this.modelService.model.nodes.filter(r=>this.modelService.nodes.isSelected(r))}handleClicked(t,r){r?this.modelService.nodes.toggleSelected(t):(this.modelService.deselectAll(),this.modelService.nodes.select(t))}_addNode(t){let r=this.modelService.model;try{r.nodes.push(t),this.modelService.modelValidation.validateNodes(r.nodes)}catch(e){throw r.nodes.splice(r.nodes.indexOf(t),1),e}}getConnectorIds(t){return t.connectors.map(r=>r.id)}getNodeByConnectorId(t){let r=this.modelService.model;for(let e of r.nodes)if(this.getConnectorIds(e).indexOf(t)>-1)return e;return null}getHtmlElement(t){return this.modelService.nodesHtmlElements[t]}setHtmlElement(t,r){this.modelService.nodesHtmlElements[t]=r,this.modelService.detectChanges()}},iA=class extends OC{constructor(t){super(t)}sourceCoord(t){return this.modelService.connectors.getCenteredCoord(t.source)}destCoord(t){return this.modelService.connectors.getCenteredCoord(t.destination)}delete(t){let r=this.modelService.model,e=r.edges.indexOf(t);if(e===-1)throw new Error("Tried to delete not existing edge");this.isSelected(t)&&this.deselect(t),r.edges.splice(e,1),this.modelService.n
21otifyModelChanged(),this.modelService.edgeRemovedCallback(t)}getSelectedEdges(){return this.modelService.model.edges.filter(r=>this.modelService.edges.isSelected(r))}handleEdgeMouseClick(t,r){r?this.modelService.edges.toggleSelected(t):(this.modelService.deselectAll(),this.modelService.edges.select(t))}putEdge(t){this.modelService.model.edges.push(t),this.modelService.notifyModelChanged()}_addEdge(t,r,e,i){this.modelService.modelValidation.validateConnector(r),this.modelService.modelValidation.validateConnector(e);let o={};o.source=r.id,o.destination=e.id,o.label=i;let a=this.modelService.model;this.modelService.modelValidation.validateEdges(a.edges.concat([o]),a.nodes),this.modelService.createEdge(t,o).subscribe(s=>{a.edges.push(s),this.modelService.notifyModelChanged(),this.modelService.edgeAddedCallback(s)})}},nA=class{constructor(t,r,e,i,o,a,s,c,u,f,_,I){this.connectorsRectInfos={},this.nodesHtmlElements={},this.canvasHtmlElement=null,this.dragImage=null,this.svgHtmlElement=null,this.debouncer=new Te,this.modelValidation=t,this.model=r,this.modelChanged=e,this.detectChangesSubject=i,this.canvasHtmlElement=_,this.svgHtmlElement=I,this.modelValidation.validateModel(this.model),this.selectedObjects=o,this.dropNode=a||(()=>{}),this.createEdge=s||((S,F)=>Z(Lt(re({},F),{label:"label"}))),this.edgeAddedCallback=c||(()=>{}),this.nodeRemovedCallback=u||(()=>{}),this.edgeRemovedCallback=f||(()=>{}),this.connectors=new eA(this),this.nodes=new tA(this),this.edges=new iA(this),this.debouncer.pipe(Wi(100)).subscribe(()=>this.modelChanged.emit())}notifyModelChanged(){this.debouncer.next(null)}detectChanges(){setTimeout(()=>{this.detectChangesSubject.next(null)},0)}selectObject(t){this.isEditable()&&this.selectedObjects.indexOf(t)===-1&&this.selectedObjects.push(t)}deselectObject(t){if(this.isEditable()){let r=this.selectedObjects.indexOf(t);if(r===-1)throw new Error("Tried to deselect an unselected object");this.selectedObjects.splice(r,1)}}toggleSelectedObject(t){this.isSelectedObject(t)?this.deselectObject(t):this.selectObject(t)}isSelectedObject(t){return this.selectedObjects.indexOf(t)!==-1}selectAll(){this.model.nodes.forEach(t=>{t.readonly||this.nodes.select(t)}
21),this.model.edges.forEach(t=>{this.edges.select(t)}),this.detectChanges()}deselectAll(){this.selectedObjects.splice(0,this.selectedObjects.length),this.detectChanges()}isEditObject(t){return this.selectedObjects.length===1&&this.selectedObjects.indexOf(t)!==-1}inRectBox(t,r,e){return t>=e.left&&t<=e.right&&r>=e.top&&r<=e.bottom}getItemInfoAtPoint(t,r){return{node:this.getNodeAtPoint(t,r),edge:this.getEdgeAtPoint(t,r)}}getNodeAtPoint(t,r){for(let e of this.model.nodes){let o=this.nodes.getHtmlElement(e.id).getBoundingClientRect();if(t>=o.left&&t<=o.right&&r>=o.top&&r<=o.bottom)return e}return null}getEdgeAtPoint(t,r){let i=document.elementFromPoint(t,r).id,o=-1;return i&&(i.startsWith("fc-edge-path-")?o=Number(i.substring(13)):i.startsWith("fc-edge-label-")&&(o=Number(i.substring(14)))),o>-1?this.model.edges[o]:null}selectAllInRect(t){this.model.nodes.forEach(e=>{let o=this.nodes.getHtmlElement(e.id).getBoundingClientRect();if(!e.readonly){let a=o.left+o.width/2,s=o.top+o.height/2;this.inRectBox(a,s,t)?this.nodes.select(e):this.nodes.isSelected(e)&&this.nodes.deselect(e)}});let r=this.canvasHtmlElement.getBoundingClientRect();
21this.model.edges.forEach(e=>{let i=this.edges.sourceCoord(e),o=this.edges.destCoord(e),a=(i.x+o.x)/2+r.left,s=(i.y+o.y)/2+r.top;this.inRectBox(a,s,t)?this.edges.select(e):this.edges.isSelected(e)&&this.edges.deselect(e)})}deleteSelected(){this.edges.getSelectedEdges().forEach(e=>{this.edges.delete(e)}),this.nodes.getSelectedNodes().forEach(e=>{this.nodes.delete(e)})}isEditable(){return this.dropTargetId===void 0}isDropSource(){return this.dropTargetId!==void 0}getDragImage(){return this.dragImage||(this.dragImage=new Image,this.dragImage.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",this.dragImage.style.visibility="hidden"),this.dragImage}},EG=(()=>{let t=class t{constructor(){}validateModel(e){return this.validateNodes(e.nodes),this._validateEdges(e.edges,e.nodes),e}validateNodes(e){let i=[];e.forEach(a=>{if(this.validateNode(a),i.indexOf(a.id)!==-1)throw new Yo("Id not unique.");i.push(a.id)});let o=[];return e.forEach(a=>{a.connectors.forEach(s=>{if(o.indexOf(s.id)!==-1)throw new Yo("Id not unique.");o.push(s.id)})}),e}validateNode(e){if(e.id===void 0)throw new Yo("Id not valid.");if(typeof e.name!="string")throw new Yo("Name not valid.");if(typeof e.x!="number"||e.x<0||Math.round(e.x)!==e.x)throw new Yo("Coordinates not valid.");if(typeof e.y!="number"||e.y<0||Math.round(e.y)!==e.y)throw new Yo("Coordinates not valid.");if(!Array.isArray(e.connectors))throw new Yo("Connectors not valid.");return e.connectors.forEach(i=>{this.validateConnector(i)}),e}_validateEdges(e,i){if(e.forEach(o=>{this._validateEdge(o,i)}),e.forEach((o,a)=>{e.forEach((s,c)=>{if(a!==c&&(o.source===s.source&&o.destination===s.destination||o.source===s.destination&&o.destination===s.source))throw new Yo("Duplicated edge.")})}),XX({nodes:i,edges:e})===null)throw new Yo("Graph has a circle.");return e}validateEdges(e,i){return this.validateNodes(i),this._validateEdges(e,i)}_validateEdge(e,i){if(e.source===void 0)throw new Yo("Source not valid.");if(e.destination===void 0)throw new Yo("Destination not valid.");if(e.source===e.destination)throw new Yo("Edge with same source and destination connectors.");let o=i.filter(s=>s.connectors.some(c=>c.id===e.source))[0];if(o===void 0)throw new Yo("Source not valid.");let a=i.filter(s=>s.connectors.some(c=>c.id===e.destination))[0];if(a===void 0)throw new Yo("Destination not valid.");if(o===a)throw new Yo("Edge with same source and destination nodes.");return e}validateEdge(e,i){return this.validateNodes(i),this._validateEdge(e,i)}validateConnector(e){if(e.id===void 0)throw new Yo("Id not valid.");if(e.type===void 0||e.type===null||typeof e.type!="string")throw new Yo("Type not valid.");return e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),Xa={dropElement:null},rA=class{constructor(t,r,e,i){this.nodeDraggingScope={shadowDragStarted:!1,dropElement:null,draggedNodes:[],shadowElements:[]},this.dragOffsets=[],this.draggedElements=[],this.destinationHtmlElements=[],this.oldDisplayStyles=[],this.modelService=t,this.automaticResize=e,this.dragAnimation=i,this.applyFunction=r}getCoordinate(t,r){return t=Math.max(t,0),t=Math.min(t,r),t}getXCoordinate(t){return this.getCoordinate(t,this.modelService.canvasHtmlElement.offsetWidth)}getYCoordinate(t){return this.getCoordinate(t,this.modelService.canvasHtmlElement.offsetHeight)}resizeCanvas(t,r){if(this.automaticResize&&!this.modelService.isDropSource()){let e=this.modelService.canvasHtmlElement;e.offsetWidth<t.x+r.offsetWidth+Hr.canvasResizeThreshold&&(e.style.width=e.offsetWidth+Hr.canvasResizeStep+"px"),e.offsetHeight<t.y+r.offsetHeight+Hr.canvasResizeThreshold&&(e.style.height=e.offsetHeight+Hr.canvasResizeStep+"px")}}isDraggingNode(t){return this.nodeDraggingScope.draggedNodes.includes(t)}dragstart(t,r){if(r.readonly)return;this.dragOffsets.length=0,this.draggedElements.length=0,this.nodeDraggingScope.draggedNodes.length=0,this.nodeDraggingScope.shadowElements.length=0,this.destinationHtmlElements.length=0,this.oldDisplayStyles.length=0;let e=[],i=[];
21if(this.modelService.nodes.isSelected(r)){let c=this.modelService.nodes.getSelectedNodes();for(let u of c){let f=$(this.modelService.nodes.getHtmlElement(u.id));e.push(f),i.push(u)}}else e.push($(t.target)),i.push(r);let o=[],a=[];for(let c of e)o.push(parseInt(c.css("left"),10)-t.clientX),a.push(parseInt(c.css("top"),10)-t.clientY);let s=t.originalEvent||t;if(this.modelService.isDropSource()){Xa.dropElement&&(Xa.dropElement.parentNode.removeChild(Xa.dropElement),Xa.dropElement=null),Xa.dropElement=e[0][0].cloneNode(!0);let c=$(this.modelService.canvasHtmlElement).offset();Xa.dropElement.offsetInfo={offsetX:Math.round(o[0]+c.left),offsetY:Math.round(a[0]+c.top)},Xa.dropElement.style.position="absolute",Xa.dropElement.style.pointerEvents="none",Xa.dropElement.style.zIndex="9999",document.body.appendChild(Xa.dropElement);let u={node:r,dropTargetId:this.modelService.dropTargetId,offsetX:Math.round(o[0]+c.left),offsetY:Math.round(a[0]+c.top)};if(s.dataTransfer.setData("text",JSON.stringify(u)),s.dataTransfer.setDragImage)s.dataTransfer.setDragImage(this.modelService.getDragImage(),0,0);else{let f=t.target,_=f.cloneNode(!0);f.parentNode.insertBefore(_,f),f.style.visibility="collapse",setTimeout(()=>{f.parentNode.removeChild(_),f.style.visibility="visible"},0)}return}this.nodeDraggingScope.draggedNodes=i;for(let c=0;c<e.length;c++)this.draggedElements.push(e[c][0]),this.dragOffsets.push({x:o[c],y:a[c]});if(this.dragAnimation===Hr.dragAnimationShadow)for(let c=0;c<this.draggedElements.length;c++){let u=this.dragOffsets[c],f=this.nodeDraggingScope.draggedNodes[c],_=$(`<div style="position: absolute; opacity: 0.7; top: ${this.getYCoordinate(u.y+t.clientY)}px; left: ${this.getXCoordinate(u.x+t.clientX)}px; "><div class="innerNode"><p style="padding: 0 15px;">${f.name}</p> </div></div>`),I=$(this.draggedElements[c]).children()[0];_.children()[0].style.backgroundColor=I.style.backgroundColor,this.nodeDraggingScope.shadowElements.push(_),this.modelService.canvasHtmlElement.appendChild(this.nodeDraggingScope.shadowElements[c][0])}if(s.dataTransfer.setData("text","Just to support firefox"),s.dataTransfer.setDragImage)s.dataTransfer.setDragImage(this.modelService.getDragImage(),0,0);else if(this.draggedElements.forEach(c=>{let u=c.cloneNode(!0);c.parentNode.insertBefore(u,c),c.style.visibility="collapse",setTimeout(()=>{c.parentNode.removeChild(u),c.style.visibility="visible"},0)}),this.dragAnimation===Hr.dragAnimationShadow){for(let c=0;c<this.draggedElements.length;c++)this.destinationHtmlElements.push(this.draggedElements[c]),this.oldDisplayStyles.push(this.destinationHtmlElements[c].style.display),this.destinationHtmlElements[c].style.display="none";this.nodeDraggingScope.shadowDragStarted=!0}}drop(t){if(this.modelService.isDropSource())return t.preventDefault(),!1;let r=null,i=(t.originalEvent||t).dataTransfer.getData("text");if(i){let o=null;try{o=JSON.parse(i)}catch{}if(o&&o.dropTargetId&&this.modelService.canvasHtmlElement.id&&this.modelService.canvasHtmlElement.id===o.dropTargetId){r=o.node;let a=$(this.modelService.canvasHtmlElement).offset(),s=t.clientX-a.left,c=t.clientY-a.top;r.x=Math.round(this.getXCoordinate(o.offsetX+s)),r.y=Math.round(this.getYCoordinate(o.offsetY+c))}}if(r)return this.modelService.dropNode(t,r),t.preventDefault(),!1;if(this.nodeDraggingScope.draggedNodes.length)return this.applyFunction(()=>{for(let o=0;o<this.nodeDraggingScope.draggedNodes.length;o++){let a=this.nodeDraggingScope.draggedNodes[o],s=this.dragOffsets[o];a.x=Math.round(this.getXCoordinate(s.x+t.clientX)),a.y=Math.round(this.getYCoordinate(s.y+t.clientY))}
21return t.preventDefault(),this.modelService.notifyModelChanged(),!1})}dragover(t){if(Xa.dropElement){let r=Xa.dropElement.offsetInfo;Xa.dropElement.style.left=r.offsetX+t.clientX+"px",Xa.dropElement.style.top=r.offsetY+t.clientY+"px",this.nodeDraggingScope.shadowDragStarted&&this.applyFunction(()=>{this.destinationHtmlElements[0].style.display=this.oldDisplayStyles[0],this.nodeDraggingScope.shadowDragStarted=!1}),t.preventDefault();return}if(this.modelService.isDropSource()){t.preventDefault();return}if(!this.nodeDraggingScope.draggedNodes.length){t.preventDefault();return}if(this.dragAnimation===Hr.dragAnimationRepaint){if(this.nodeDraggingScope.draggedNodes.length)return this.applyFunction(()=>{for(let r=0;r<this.nodeDraggingScope.draggedNodes.length;r++){let e=this.nodeDraggingScope.draggedNodes[r],i=this.dragOffsets[r];e.x=this.getXCoordinate(i.x+t.clientX),e.y=this.getYCoordinate(i.y+t.clientY),this.resizeCanvas(e,this.draggedElements[r])}return t.preventDefault(),this.modelService.notifyModelChanged(),!1})}else if(this.dragAnimation===Hr.dragAnimationShadow&&this.nodeDraggingScope.draggedNodes.length){this.nodeDraggingScope.shadowDragStarted&&this.applyFunction(()=>{for(let r=0;r<this.nodeDraggingScope.draggedNodes.length;r++)this.destinationHtmlElements[r].style.display=this.oldDisplayStyles[r];this.nodeDraggingScope.shadowDragStarted=!1});for(let r=0;r<this.nodeDraggingScope.draggedNodes.length;r++){let e=this.nodeDraggingScope.draggedNodes[r],i=this.dragOffsets[r];this.nodeDraggingScope.shadowElements[r].css("left",this.getXCoordinate(i.x+t.clientX)+"px"),this.nodeDraggingScope.shadowElements[r].css("top",this.getYCoordinate(i.y+t.clientY)+"px"),this.resizeCanvas(e,this.draggedElements[r])}t.preventDefault()}}dragend(t){this.applyFunction(()=>{if(Xa.dropElement&&(Xa.dropElement.parentNode.removeChild(Xa.dropElement),Xa.dropElement=null),!this.modelService.isDropSource()){if(this.nodeDraggingScope.shadowElements.length){for(let r=0;r<this.nodeDraggingScope.draggedNodes.length;r++){let e=this.nodeDraggingScope.draggedNodes[r],i=this.nodeDraggingScope.shadowElements[r];e.x=parseInt(i.css("left").replace("px",""),10),e.y=parseInt(i.css("top").replace("px",""),10),this.modelService.canvasHtmlElement.removeChild(i[0])}this.nodeDraggingScope.shadowElements.length=0,this.modelService.n
21otifyModelChanged()}this.nodeDraggingScope.draggedNodes.length&&(this.nodeDraggingScope.draggedNodes.length=0,this.draggedElements.length=0,this.dragOffsets.length=0)}})}},IG=(()=>{let t=class t{constructor(){}getEdgeDAttribute(e,i,o){let a=`M ${e.x}, ${e.y} `;if(o===Hr.curvedStyle){let s=this.computeEdgeSourceTangent(e,i),c=this.computeEdgeDestinationTangent(e,i);a+=`C ${s.x}, ${s.y} ${c.x-50}, ${c.y} ${i.x}, ${i.y}`}else a+=`L ${i.x}, ${i.y}`;return a}getEdgeCenter(e,i){return{x:(e.x+i.x)/2,y:(e.y+i.y)/2}}computeEdgeTangentOffset(e,i){return(i.y-e.y)/2}computeEdgeSourceTangent(e,i){return{x:e.x,y:e.y+this.computeEdgeTangentOffset(e,i)}}computeEdgeDestinationTangent(e,i){return{x:i.x,y:i.y-this.computeEdgeTangentOffset(e,i)}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),oA=class{constructor(t,r,e,i,o,a,s,c){this.edgeDragging={isDragging:!1,dragPoint1:null,dragPoint2:null,shadowDragStarted:!1},this.draggedEdgeSource=null,this.dragOffset={},this.destinationHtmlElement=null,this.oldDisplayStyle="",this.modelValidation=t,this.edgeDrawingService=r,this.modelService=e,this.model=i,this.isValidEdgeCallback=o||(()=>!0),this.applyFunction=a,this.dragAnimation=s,this.edgeStyle=c}dragstart(t,r){let e,i,o;if(r.type===Hr.leftConnectorType){for(let c of this.model.edges)if(c.destination===r.id){e=this.modelService.connectors.getConnector(c.source),i=c.label,o=c,this.applyFunction(()=>{this.modelService.edges.delete(c)});break}}this.edgeDragging.isDragging=!0,e!==void 0?(this.draggedEdgeSource=e,this.edgeDragging.dragPoint1=this.modelService.connectors.getCenteredCoord(e.id),this.edgeDragging.dragLabel=i,this.edgeDragging.prevEdge=o):(this.draggedEdgeSource=r,this.edgeDragging.dragPoint1=this.modelService.connectors.getCenteredCoord(r.id));let a=this.modelService.canvasHtmlElement;if(!a)throw new Error("No canvas while edgedraggingService found.");this.dragOffset.x=-a.getBoundingClientRect().left,this.dragOffset.y=-a.getBoundingClientRect().top,this.edgeDragging.dragPoint2={x:t.clientX+this.dragOffset.x,y:t.clientY+this.dragOffset.y};let s=t.originalEvent||t;s.dataTransfer.setData("Text","Just to support firefox"),s.dataTransfer.setDragImage?s.dataTransfer.setDragImage(this.modelService.getDragImage(),0,0):(this.destinationHtmlElement=t.target,this.oldDisplayStyle=this.destinationHtmlElement.style.display,this.destinationHtmlElement.style.display="none",this.dragAnimation===Hr.dragAnimationShadow&&(this.edgeDragging.shadowDragStarted=!0)),this.dragAnimation===Hr.dragAnimationShadow&&(this.edgeDragging.gElement===void 0&&(this.edgeDragging.gElement=$(document.querySelectorAll(".shadow-svg-class")),this.edgeDragging.pathElement=$(document.querySelectorAll(".shadow-svg-class")).find("path"),this.edgeDragging.circleElement=$(document.querySelectorAll(".shadow-svg-class")).find("circle")),this.edgeDragging.gElement.css("display","block"),this.edgeDragging.pathElement.attr("d",this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1,this.edgeDragging.dragPoint2,this.edgeStyle)),this.edgeDragging.circleElement.attr("cx",this.edgeDragging.dragPoint2.x),this.edgeDragging.circleElement.attr("cy",this.edgeDragging.dragPoint2.y)),t.stopPropagation()}dragover(t){if(this.edgeDragging.isDragging){if(!this.edgeDragging.magnetActive&&this.dragAnimation===Hr.dragAnimationShadow)this.destinationHtmlElement!==null&&(this.destinationHtmlElement.style.display=this.oldDisplayStyle),this.edgeDragging.shadowDragStarted&&this.applyFunction(()=>{this.edgeDragging.shadowDragStarted=!1}),this.edgeDragging.dragPoint2={x:t.clientX+this.dragOffset.x,y:t.clientY+this.dragOffset.y},this.edgeDragging.pathElement.attr("d",this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1,this.edgeDragging.dragPoint2,this.edgeStyle)),this.edgeDragging.circleElement.attr("cx",this.edgeDragging.dragPoint2.x),this.edgeDragging.circleElement.attr("cy",this.edgeDragging.dragPoint2.y);else if(this.dragAnimation===Hr.dragAnimationRepaint)return this.applyFunction(()=>{this.destinationHtmlElement!==null&&(this.destinationHtmlElement.style.display=this.oldDisplayStyle),this.edgeDragging.dragPoint2={x:t.clientX+this.dragOffset.x,y:t.clientY+this.dragOffset.y}})}}dragoverConnector(t,r){if(this.edgeDragging.isDragging){this.dragover(t);try{this.modelValidation.validateEdges(this.model.edges.concat([{source:this.draggedEdgeSource.id,destination:r.id}]),this.model.nodes)}catch(e){if(e instanceof Yo)return!0;throw e}
21if(this.isValidEdgeCallback(this.draggedEdgeSource,r))return t.preventDefault(),t.stopPropagation(),!1}}dragleaveMagnet(t){this.edgeDragging.magnetActive=!1}dragoverMagnet(t,r){if(this.edgeDragging.isDragging){this.dragover(t);try{this.modelValidation.validateEdges(this.model.edges.concat([{source:this.draggedEdgeSource.id,destination:r.id}]),this.model.nodes)}catch(e){if(e instanceof Yo)return!0;throw e}if(this.isValidEdgeCallback(this.draggedEdgeSource,r)){if(this.dragAnimation===Hr.dragAnimationShadow)return this.edgeDragging.magnetActive=!0,this.edgeDragging.dragPoint2=this.modelService.connectors.getCenteredCoord(r.id),this.edgeDragging.pathElement.attr("d",this.edgeDrawingService.getEdgeDAttribute(this.edgeDragging.dragPoint1,this.edgeDragging.dragPoint2,this.edgeStyle)),this.edgeDragging.circleElement.attr("cx",this.edgeDragging.dragPoint2.x),this.edgeDragging.circleElement.attr("cy",this.edgeDragging.dragPoint2.y),t.preventDefault(),t.stopPropagation(),!1;if(this.dragAnimation===Hr.dragAnimationRepaint)return this.applyFunction(()=>(this.edgeDragging.dragPoint2=this.modelService.connectors.getCenteredCoord(r.id),t.preventDefault(),t.stopPropagation(),!1))}}}dragend(t){if(this.edgeDragging.isDragging&&(this.edgeDragging.isDragging=!1,this.edgeDragging.dragPoint1=null,this.edgeDragging.dragPoint2=null,this.edgeDragging.dragLabel=null,t.stopPropagation(),this.dragAnimation===Hr.dragAnimationShadow&&this.edgeDragging.gElement.css("display","none"),this.edgeDragging.prevEdge)){let r=this.edgeDragging.prevEdge;this.edgeDragging.prevEdge=null,this.applyFunction(()=>{this.modelService.edges.putEdge(r)})}}drop(t,r){if(this.edgeDragging.isDragging){try{this.modelValidation.validateEdges(this.model.edges.concat([{source:this.draggedEdgeSource.id,destination:r.id}]),this.model.nodes)}catch(e){if(e instanceof Yo)return!0;throw e}if(this.isValidEdgeCallback(this.draggedEdgeSource,r))return this.edgeDragging.prevEdge=null,this.modelService.edges._addEdge(t,this.draggedEdgeSource,r,this.edgeDragging.dragLabel),t.stopPropagation(),t.preventDefault(),!1}}},aA=class{constructor(t){this.mouseoverscope={connector:null,edge:null,node:null},this.applyFunction=t}nodeMouseOver(t,r){return this.applyFunction(()=>{this.mouseoverscope.node=r})}nodeMouseOut(t,r){return this.applyFunction(()=>{this.mouseoverscope.node=null})}connectorMouseEnter(t,r){return this.applyFunction(()=>{this.mouseoverscope.connector=r})}connectorMouseLeave(t,r){return this.applyFunction(()=>{this.mouseoverscope.connector=null})}edgeMouseEnter(t,r){this.mouseoverscope.edge=r}edgeMouseLeave(t,r){this.mouseoverscope.edge=null}},ZX=/(auto|scroll)/,Z2=(n,t)=>getComputedStyle(n,null).getPropertyValue(t),JX=n=>ZX.test(Z2(n,"overflow")+Z2(n,"overflow-y")+Z2(n,"overflow-x")),kG=n=>!n||n===document.body?document.body:JX(n)?n:kG(n.parentNode),sA=class{constructor(t,r,e){this.selectRect={x1:0,x2:0,y1:0,y2:0},this.modelService=t,this.selectElement=r,this.$canvasElement=$(this.modelService.canvasHtmlElement),this.$scrollParent=$(kG(this.modelService.canvasHtmlElement)),this.applyFunction=e}mousedown(t){if(this.modelService.isEditable()&&!t.ctrlKey&&!t.metaKey&&t.button===0&&this.selectElement.hidden){this.selectElement.hidden=!1;let r=this.$canvasElement.offset();this.selectRect.x1=Math.round(t.pageX-r.left),this.selectRect.y1=Math.round(t.pageY-r.top),this.selectRect.x2=this.selectRect.x1,this.selectRect.y2=this.selectRect.y1,this.updateSelectRect()}}mousemove(t){if(this.modelService.isEditable()&&!t.ctrlKey&&!t.metaKey&&t.button===0&&!this.selectElement.hidden){let r=this.$canvasElement.offset();this.selectRect.x2=Math.round(t.pageX-r.left),this.selectRect.y2=Math.round(t.pageY-r.top),this.updateScroll(r),this.updateSelectRect()}}updateScroll(t){let r=this.$scrollParent[0].getBoundingClientRect(),e=r.bottom-t.top,i=r.right-t.left,o=r.top-t.top,a=r.left-t.left;if(this.selectRect.y2-o<25){let s=25-(this.selectRect.y2-o),c=this.$scrollParent.scrollTop();this.$scrollParent.scrollTop(c-s)}else if(e-this.selectRect.y2<40){let s=40-(e-this.selectRect.y2),c=this.$scrollParent.scrollTop();this.$scrollParent.scrollTop(c+s)}if(this.selectRect.x2-a<25){let s=25-(this.selectRect.x2-a),c=this.$scrollParent.scrollLeft();this.$scrollParent.scrollLeft(c-s)}else if(i-this.selectRect.x2<40){let s=40-(i-this.selectRect.x2),c=this.$scrollParent.scrollLeft();this.$scrollParent.scrollLeft(c+s)}}mouseup(t){if(this.modelService.isEditable()&&!t.ctrlKey&&!t.metaKey&&t.button===0&&!this.selectElement.hidden){let r=this.selectElement.getBoundingClientRect();this.selectElement.hidden=!0,this.selectObjects(r)}}updateSelectRect(){let t=Math.min(this.selectRect.x1,this.selectRect.x2),r=Math.max(this.selectRect.x1,this.selectRect.x2),e=Math.min(this.selectRect.y1,this.selectRect.y2),i=Math.max(this.selectRect.y1,this.selectRect.y2);this.selectElement.style.left=t+"px",this.selectElement.style.top=e+"px",this.selectElement.style.width=r-t+"px",this.selectElement.style.height=i-e+"px"}selectObjects(t){this.applyFunction(()=>{this.modelService.selectAllInRect(t)})}},DG=(()=>{let t=class t{get nodeId(){return this.node.id}get top(){return this.node.y+"px"}get left(){return this.node.x+"px"}constructor(e,i,o){this.nodeComponentConfig=e,this.elementRef=i,this.componentFactoryResolver=o}ngOnInit(){this.userNodeCallbacks||(this.userNodeCallbacks={}),this.userNodeCallbacks.nodeEdit=this.userNodeCallbacks.nodeEdit||(()=>{}),this.userNodeCallbacks.doubleClick=this.userNodeCallbacks.doubleClick||(()=>{}
21),this.userNodeCallbacks.mouseDown=this.userNodeCallbacks.mouseDown||(()=>{}),this.userNodeCallbacks.mouseEnter=this.userNodeCallbacks.mouseEnter||(()=>{}),this.userNodeCallbacks.mouseLeave=this.userNodeCallbacks.mouseLeave||(()=>{});let e=$(this.elementRef.nativeElement);e.addClass(Hr.nodeClass),this.node.readonly||e.attr("draggable","true"),this.updateNodeClass(),this.modelservice.nodes.setHtmlElement(this.node.id,e[0]),this.nodeContentContainer.clear();let i=this.componentFactoryResolver.resolveComponentFactory(this.nodeComponentConfig.nodeComponentType),o=this.nodeContentContainer.createComponent(i);this.nodeComponent=o.instance,this.nodeComponent.callbacks=this.callbacks,this.nodeComponent.userNodeCallbacks=this.userNodeCallbacks,this.nodeComponent.node=this.node,this.nodeComponent.modelservice=this.modelservice,this.updateNodeComponent(),this.nodeComponent.width=this.elementRef.nativeElement.offsetWidth,this.nodeComponent.height=this.elementRef.nativeElement.offsetHeight}ngAfterViewInit(){this.nodeComponent.width=this.elementRef.nativeElement.offsetWidth,this.nodeComponent.height=this.elementRef.nativeElement.offsetHeight}ngOnChanges(e){let i=!1;for(let o of Object.keys(e)){let a=e[o];!a.firstChange&&a.currentValue!==a.previousValue&&["selected","edit","underMouse","mouseOverConnector","dragging"].includes(o)&&(i=!0)}i&&(this.updateNodeClass(),this.updateNodeComponent())}updateNodeClass(){let e=$(this.elementRef.nativeElement);this.toggleClass(e,Hr.selectedClass,this.selected),this.toggleClass(e,Hr.editClass,this.edit),this.toggleClass(e,Hr.hoverClass,this.underMouse),this.toggleClass(e,Hr.draggingClass,this.dragging)}updateNodeComponent(){this.nodeComponent.selected=this.selected,this.nodeComponent.edit=this.edit,this.nodeComponent.underMouse=this.underMouse,this.nodeComponent.mouseOverConnector=this.mouseOverConnector,this.nodeComponent.dragging=this.dragging}toggleClass(e,i,o){o?e.addClass(i):e.removeClass(i)}mousedown(e){e.stopPropagation()}dragstart(e){this.node.readonly||this.callbacks.nodeDragstart(e,this.node)}dragend(e){this.node.readonly||this.callbacks.nodeDragend(e)}click(e){this.node.readonly||this.callbacks.nodeClicked(e,this.node)}mouseover(e){this.node.readonly||this.callbacks.nodeMouseOver(e,this.node)}mouseout(e){this.node.readonly||this.callbacks.nodeMouseOut(e,this.node)}};t.\u0275fac=function(i){return new(i||t)(h(TG),h(ge),h(sb))},t.\u0275cmp=L({type:t,selectors:[["fc-node"]],viewQuery:function(i,o){if(i&1&&ae(FX,7,ci),i&2){let a;Q(a=K())&&(o.nodeContentContainer=a.first)}},hostVars:5,hostBindings:function(i,o){i&1&&T("mousedown",function(s){return o.mou
21sedown(s)})("dragstart",function(s){return o.dragstart(s)})("dragend",function(s){return o.dragend(s)})("click",function(s){return o.click(s)})("mouseover",function(s){return o.mouseover(s)})("mouseout",function(s){return o.mouseout(s)}),i&2&&(Je("id",o.nodeId),hi("top",o.top)("left",o.left))},inputs:{callbacks:"callbacks",userNodeCallbacks:"userNodeCallbacks",node:"node",selected:"selected",edit:"edit",underMouse:"underMouse",mouseOverConnector:"mouseOverConnector",modelservice:"modelservice",dragging:"dragging"},features:[lt],decls:2,vars:0,consts:[["nodeContent",""]],template:function(i,o){i&1&&x(0,NX,0,0,"ng-template",null,0,kt)},styles:["[_nghost-%COMP%]{position:absolute;z-index:1}.fc-dragging[_nghost-%COMP%]{z-index:10}[_nghost-%COMP%]     .fc-leftConnectors, [_nghost-%COMP%]     .fc-rightConnectors{position:absolute;top:0;height:100%;display:flex;flex-direction:column;z-index:-10}[_nghost-%COMP%]     .fc-leftConnectors .fc-magnet, [_nghost-%COMP%]     .fc-rightConnectors .fc-magnet{align-items:center}[_nghost-%COMP%]     .fc-leftConnectors{left:-20px}[_nghost-%COMP%]     .fc-rightConnectors{right:-20px}[_nghost-%COMP%]     .fc-magnet{display:flex;flex-grow:1;height:60px;justify-content:center}[_nghost-%COMP%]     .fc-connector{width:18px;height:18px;border:10px solid transparent;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box;border-radius:50%;background-color:#f7a789;color:#fff;pointer-events:all}[_nghost-%COMP%]     .fc-connector.fc-hover{background-color:#000}"]});let n=t;return n})(),eZ=(()=>{let t=class t{constructor(){this.flowchartConstants=Hr,this.nodeRectInfo={top:()=>this.node.y,left:()=>this.node.x,bottom:()=>this.node.y+this.height,right:()=>this.node.x+this.width,width:()=>this.width,height:()=>this.height}}ngOnInit(){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,inputs:{callbacks:"callbacks",userNodeCallbacks:"userNodeCallbacks",node:"node",selected:"selected",edit:"edit",underMouse:"underMouse",mouseOverConnector:"mouseOverConnector",modelservice:"modelservice",dragging:"dragging"}});let n=t;return n})(),xG=(()=>{let t=class t{get canvasClass(){return Hr.canvasClass}get fitModelSizeByDefault(){return this.fitModelSizeByDefaultValue}set fitModelSizeByDefault(e){this.fitModelSizeByDefaultValue=mt(e)}constructor(e,i,o,a,s,c){this.elementRef=e,this.differs=i,this.modelValidation=o,this.edgeDrawingService=a,this.cd=s,this.zone=c,this.modelChanged=new J,this.fitModelSizeByDefaultValue=!0,this.flowchartConstants=Hr,this.nodesDiffer=this.differs.find([]).create((u,f)=>f),this.edgesDiffer=this.differs.find([]).create((u,f)=>f),this.detectChangesSubject=new Te,this.arrowDefId="arrow-"+Math.random(),this.arrowDefIdSelected=this.arrowDefId+"-selected",this.detectChangesSubject.pipe(Wi(50)).subscribe(()=>this.cd.detectChanges())}ngOnInit(){if(!this.dropTargetId&&this.edgeStyle!==Hr.curvedStyle&&this.edgeStyle!==Hr.lineStyle)throw new Error("edgeStyle not supported.");this.nodeHeight=this.nodeHeight||200,this.nodeWidth=this.nodeWidth||200,this.dragAnimation=this.dragAnimation||Hr.dragAnimationRepaint,this.userCallbacks=this.userCallbacks||{},this.automaticResize=this.automaticResize||!1;for(let o of Object.keys(this.userCallbacks))if(typeof this.userCallbacks[o]!="function"&&o!=="nodeCallbacks")throw new Error("All callbacks should be functions.");this.userNodeCallbacks=this.userCallbacks.nodeCallbacks;let e=$(this.elementRef.nativeElement);this.modelService=new nA(this.modelValidation,this.model,this.modelChanged,this.detectChangesSubject,this.selectedObjects,this.userCallbacks.dropNode,this.userCallbacks.createEdge,this.userCallbacks.edgeAdded,this.userCallbacks.nodeRemoved,this.userCallbacks.edgeRemoved,e[0],e[0].querySelector("svg")),this.dropTargetId&&(this.modelService.dropTargetId=this.dropTargetId);let i=this.zone.run.bind(this.zone);this.nodeDraggingService=new rA(this.modelService,i,this.automaticResize,this.dragAnimation),this.edgeDraggingService=new oA(this.modelValidation,this.edgeDrawingService,this.modelService,this.model,this.userCallbacks.isValidEdge||null,i,this.dragAnimation,this.edgeStyle),this.mouseoverService=new aA(i),this.rectangleSelectService=new sA(this.modelService,e[0].querySelector("#select-rectangle"),i),this.callbacks={nodeDragstart:this.nodeDraggingService.dragstart.bind(this.nodeDraggingService),nodeDragend:this.nodeDraggingService.dragend.bind(this.nodeDraggingService),edgeDragstart:this.edgeDraggingService.dragstart.bind(this.edgeDraggingService),edgeDragend:this.edgeDraggingService.dragend.bind(this.edgeDraggingService),edgeDrop:this.edgeDraggingService.drop.bind(this.edgeDraggingService),edgeDragoverConnector:this.edgeDraggingService.dragoverConnector.bind(this.edgeDraggingService),edgeDragoverMagnet:this.edgeDraggingService.dragoverMagnet.bind(this.edgeDraggingService),edgeDragleaveMagnet:this.edgeDraggingService.dragleaveMagnet.bind(this.edgeDraggingService),nodeMouseOver:this.mouseoverService.n
21odeMouseOver.bind(this.mouseoverService),nodeMouseOut:this.mouseoverService.nodeMouseOut.bind(this.mouseoverService),connectorMouseEnter:this.mouseoverService.connectorMouseEnter.bind(this.mouseoverService),connectorMouseLeave:this.mouseoverService.connectorMouseLeave.bind(this.mouseoverService),nodeClicked:(o,a)=>{this.modelService.nodes.handleClicked(a,o.ctrlKey),o.stopPropagation(),o.preventDefault()}},this.adjustCanvasSize(this.fitModelSizeByDefault)}ngDoCheck(){if(this.model){let e=this.nodesDiffer.diff(this.model.nodes),i=this.edgesDiffer.diff(this.model.edges),o=!1,a=!1;e!==null&&(e.forEachAddedItem(()=>{o=!0}),e.forEachRemovedItem(()=>{o=!0})),i!==null&&(i.forEachAddedItem(()=>{a=!0}),i.forEachRemovedItem(()=>{a=!0})),o&&this.adjustCanvasSize(this.fitModelSizeByDefault),(o||a)&&this.detectChangesSubject.next(null)}}getEdgeDAttribute(e){return this.edgeDrawingService.getEdgeDAttribute(this.modelService.edges.sourceCoord(e),this.modelService.edges.destCoord(e),this.edgeStyle)}adjustCanvasSize(e){let i=0,o=0,a=$(this.elementRef.nativeElement);this.model.nodes.forEach(u=>{i=Math.max(u.x+this.nodeWidth,i),o=Math.max(u.y+this.nodeHeight,o)});let s,c;e?(s=i,c=o):(s=Math.max(i,a.prop("offsetWidth")),c=Math.max(o,a.prop("offsetHeight"))),a.css("width",s+"px"),a.css("height",c+"px")}canvasClick(e){}edgeMouseDown(e,i){e.stopPropagation()}edgeClick(e,i){this.modelService.edges.handleEdgeMouseClick(i,e.ctrlKey),e.stopPropagation(),e.preventDefault()}edgeRemove(e,i){this.modelService.edges.delete(i),e.stopPropagation(),e.preventDefault()}edgeEdit(e,i){this.userCallbacks.edgeEdit&&this.userCallbacks.edgeEdit(e,i)}edgeDoubleClick(e,i){this.userCallbacks.edgeDoubleClick&&this.userCallbacks.edgeDoubleClick(e,i)}edgeMouseOver(e,i){this.userCallbacks.edgeMouseOver&&this.userCallbacks.edgeMouseOver(e,i)}edgeMouseEnter(e,i){this.mouseoverService.edgeMouseEnter(e,i)}edgeMouseLeave(e,i){this.mouseoverService.edgeMouseLeave(e,i)}dragover(e){this.nodeDraggingService.dragover(e),this.edgeDraggingService.dragover(e)}drop(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),this.nodeDraggingService.drop(e)}mousedown(e){this.rectangleSelectService.mousedown(e)}mousemove(e){this.rectangleSelectService.mousemove(e)}mouseup(e){this.rectangleSelectService.mouseup(e)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Cu),h(EG),h(IG),h(Me),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["fc-canvas"]],hostVars:1,hostBindings:function(i,o){i&1&&T("dragover",function(s){return o.dragover(s)})("drop",function(s){return o.drop(s)}
21)("mousedown",function(s){return o.mousedown(s)})("mousemove",function(s){return o.mousemove(s)})("mouseup",function(s){return o.mouseup(s)}),i&2&&Je("class",o.canvasClass)},inputs:{model:"model",selectedObjects:"selectedObjects",edgeStyle:"edgeStyle",userCallbacks:"userCallbacks",automaticResize:"automaticResize",dragAnimation:"dragAnimation",nodeWidth:"nodeWidth",nodeHeight:"nodeHeight",dropTargetId:"dropTargetId",fitModelSizeByDefault:"fitModelSizeByDefault"},outputs:{modelChanged:"modelChanged"},decls:14,vars:8,consts:[[1,"fc-canvas-container",3,"click"],[1,"fc-canvas-svg"],["markerWidth","5","markerHeight","5","viewBox","-6 -6 12 12","refX","10","refY","0","markerUnits","strokeWidth","orient","auto",1,"fc-arrow-marker"],["points","-2,0 -5,5 5,0 -5,-5","stroke","gray","fill","gray","stroke-width","1px"],["markerWidth","5","markerHeight","5","viewBox","-6 -6 12 12","refX","10","refY","0","markerUnits","strokeWidth","orient","auto",1,"fc-arrow-marker-selected"],["points","-2,0 -5,5 5,0 -5,-5","stroke","red","fill","red","stroke-width","1px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["style","display:none",3,"class",4,"ngIf"],[3,"ngStyle",4,"ngIf"],[3,"ngStyle","mousedown","click","dblclick","mouseover","mouseenter","mouseleave",4,"ngFor","ngForOf"],["id","select-rectangle","hidden","",1,"fc-select-rectangle"],[3,"mousedown","click","dblclick","mouseover","mouseenter","mouseleave"],["r","4",1,"edge-endpoint"],[2,"display","none"],["d",""],[3,"selected","edit","underMouse","node","mouseOverConnector","modelservice","dragging","callbacks","userNodeCallbacks"],[3,"ngStyle"],[1,"fc-edge-label-text"],[3,"mousedown","click","dblclick","mouseover","mouseenter","mouseleave","ngStyle"],["class","fc-noselect fc-nodeedit",3,"click",4,"ngIf"],["class","fc-noselect fc-nodedelete",3,"click",4,"ngIf"],[1,"fc-noselect","fc-nodeedit",3,"click"],["aria-hidden","true",1,"fa","fa-pencil"],[1,"fc-noselect","fc-nodedelete",3,"click"]],template:function(i,o){i&1&&(d(0,"div",0),T("click",function(s){return o.canvasClick(s)}),ar(),d(1,"svg",1)(2,"defs")(3,"marker",2),O(4,"polygon",3),p(),d(5,"marker",4),O(6,"polygon",5),p()(),x(7,VX,2,4,"g",6)(8,LX,3,4,"g",7)(9,BX,3,4,"g",8),p(),x(10,jX,2,9,"ng-container",6)(11,zX,3,6,"div",9)(12,qX,5,8,"div",10),cs(),O(13,"div",11),p()),i&2&&(l(3),Je("id",o.arrowDefId),l(2),Je("id",o.arrowDefIdSelected),l(2),m("ngForOf",o.model.edges),l(),m("ngIf",o.dragAnimation===o.flowchartConstants.dragAnimationRepaint&&o.edgeDraggingService.edgeDragging.isDragging),l(),m("ngIf",o.dragAnimation===o.flowchartConstants.dragAnimationShadow),l(),m("ngForOf",o.model.nodes),l(),m("ngIf",o.dragAnimation===o.flowchartConstants.dragAnimationRepaint&&o.edgeDraggingService.edgeDragging.isDragging),l(),m("ngForOf",o.model.edges))},dependencies:[Ke,ce,xu,DG],styles:["[_nghost-%COMP%]{display:block;position:relative;width:100%;height:100%;background-size:25px 25px;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.1) 1px,transparent 1px);background-color:transparent;min-width:100%;min-height:100%;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%]   .fc-canvas-container[_ngcontent-%COMP%]{display:block;position:relative;width:100%;height:100%}[_nghost-%COMP%]   .fc-canvas-container[_ngcontent-%COMP%]   svg.fc-canvas-svg[_ngcontent-%COMP%]{display:block;position:relative;width:100%;height:100%}[_nghost-%COMP%]   .fc-edge[_ngcontent-%COMP%]{stroke:gray;stroke-width:4;transition:stroke-width .2s;fill:transparent}[_nghost-%COMP%]   .fc-edge.fc-hover[_ngcontent-%COMP%]{stroke:gray;stroke-width:6;fill:transparent}[_nghost-%COMP%]   .fc-edge.fc-selected[_ngcontent-%COMP%]{stroke:red;stroke-width:4;fill:transparent}[_nghost-%COMP%]   .fc-edge.fc-active[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_dash 3s linear infinite;stroke-dasharray:20}[_nghost-%COMP%]   .fc-edge.fc-dragging[_ngcontent-%COMP%]{pointer-events:none}[_nghost-%COMP%]   .fc-arrow-marker[_ngcontent-%COMP%]   polygon[_ngcontent-%COMP%]{stroke:gray;fill:gray}[_nghost-%COMP%]   .fc-arrow-marker-selected[_ngcontent-%COMP%]   polygon[_ngcontent-%COMP%]{stroke:red;fill:red}[_nghost-%COMP%]   .edge-endpoint[_ngcontent-%COMP%]{fill:gray}[_nghost-%COMP%]   .fc-noselect[_ngcontent-%COMP%]{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%]   .fc-edge-label[_ngcontent-%COMP%]{position:absolute;opacity:.8;transition:transform .2s;transform-origin:bottom left;margin:0 auto}[_nghost-%COMP%]   .fc-edge-label[_ngcontent-%COMP%]   .fc-edge-label-text[_ngcontent-%COMP%]{position:absolute;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);white-space:nowrap;text-align:center;font-size:16px}[_nghost-%COMP%]   .fc-edge-label[_ngcontent-%COMP%]   .fc-edge-label-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{cursor:default;border:solid #ff3d00;border-radius:10px;color:#ff3d00;background-color:#fff;padding:3px 5px}[_nghost-%COMP%]   .fc-edge-label[_ngcontent-%COMP%]   .fc-nodeedit[_ngcontent-%COMP%]{top:-30px;right:14px}[_nghost-%COMP%]   .fc-edge-label[_ngcontent-%COMP%]   .fc-nodedelete[_ng
21content-%COMP%]{top:-30px;right:-13px}[_nghost-%COMP%]   .fc-edge-label.fc-hover[_ngcontent-%COMP%]{transform:scale(1.25)}[_nghost-%COMP%]   .fc-edge-label.fc-selected[_ngcontent-%COMP%]   .fc-edge-label-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], [_nghost-%COMP%]   .fc-edge-label.fc-edit[_ngcontent-%COMP%]   .fc-edge-label-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{border:solid red;color:#fff;font-weight:600;background-color:red}[_nghost-%COMP%]   .fc-select-rectangle[_ngcontent-%COMP%]{border:2px dashed #5262ff;position:absolute;background:#147dff1a;z-index:2}@keyframes _ngcontent-%COMP%_dash{0%{stroke-dashoffset:500}}[_nghost-%COMP%]     .fc-nodeedit{display:none;font-size:15px}[_nghost-%COMP%]     .fc-nodedelete{display:none;font-size:18px}[_nghost-%COMP%]     .fc-edit .fc-nodeedit, [_nghost-%COMP%]     .fc-edit .fc-nodedelete{display:block;position:absolute;border:solid 2px #eee;border-radius:50%;font-weight:600;line-height:20px;height:20px;padding-top:2px;width:22px;background:#494949;color:#fff;text-align:center;vertical-align:bottom;cursor:pointer}[_nghost-%COMP%]     .fc-edit .fc-nodeedit{top:-24px;right:16px}[_nghost-%COMP%]     .fc-edit .fc-nodedelete{top:-24px;right:-13px}"],changeDetection:0});let n=t;return n})(),lA=(()=>{let t=class t{constructor(e){this.elementRef=e}ngOnInit(){$(this.elementRef.nativeElement).addClass(Hr.magnetClass)}dragover(e){return this.callbacks.edgeDragoverMagnet(e,this.connector)}dragleave(e){this.callbacks.edgeDragleaveMagnet(e)}drop(e){return this.callbacks.edgeDrop(e,this.connector)}dragend(e){this.callbacks.edgeDragend(e)}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","fc-magnet",""]],hostBindings:function(i,o){i&1&&T("dragover",function(s){return o.dragover(s)})("dragleave",function(s){return o.dragleave(s)})("drop",function(s){return o.drop(s)})("dragend",function(s){return o.dragend(s)})},inputs:{callbacks:"callbacks",connector:"connector"}});let n=t;return n})(),cA=(()=>{let t=class t{constructor(e){this.elementRef=e}ngOnInit(){let e=$(this.elementRef.nativeElement);e.addClass(Hr.connectorClass),this.modelservice.isEditable()&&(e.attr("draggable","true"),this.updateConnectorClass());let i={type:this.connector.type,width:this.elementRef.nativeElement.offsetWidth,height:this.elementRef.nativeElement.offsetHeight,nodeRectInfo:this.nodeRectInfo};this.modelservice.connectors.setConnectorRectInfo(this.connector.id,i)}ngOnChanges(e){let i=!1;for(let o of Object.keys(e)){let a=e[o];!a.firstChange&&a.currentValue!==a.previousValue&&o==="mouseOverConnector"&&(i=!0)}i&&this.modelservice.isEditable()&&this.updateConnectorClass()}updateConnectorClass(){let e=$(this.elementRef.nativeElement);this.connector===this.mouseOverConnector?e.addClass(Hr.hoverClass):e.removeClass(Hr.hoverClass)}dragover(e){}drop(e){if(this.modelservice.isEditable())return this.callbacks.edgeDrop(e,this.connector)}dragend(e){this.modelservice.isEditable()&&this.callbacks.edgeDragend(e)}dragstart(e){this.modelservice.isEditable()&&this.callbacks.edgeDragstart(e,this.connector)}mouseenter(e){this.modelservice.isEditable()&&this.callbacks.connectorMouseEnter(e,this.connector)}mouseleave(e){this.modelservice.isEditable()&&this.callbacks.connectorMouseLeave(e,this.connector)}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","fc-connector",""]],hostBindings:function(i,o){i&1&&T("dragover",function(s){return o.dragover(s)})("drop",function(s){return o.drop(s)})("dragend",function(s){return o.dragend(s)})("dragstart",function(s){return o.dragstart(s)}
21)("mouseenter",function(s){return o.mouseenter(s)})("mouseleave",function(s){return o.mouseleave(s)})},inputs:{callbacks:"callbacks",modelservice:"modelservice",connector:"connector",nodeRectInfo:"nodeRectInfo",mouseOverConnector:"mouseOverConnector"},features:[lt]});let n=t;return n})(),J2=(()=>{let t=class t extends eZ{constructor(){super()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["fc-default-node"]],features:[Ce],decls:11,vars:14,consts:[[3,"dblclick"],[1,"innerNode"],["fc-magnet","",3,"connector","callbacks",4,"ngFor","ngForOf"],["class","fc-nodeedit",3,"click",4,"ngIf"],["class","fc-nodedelete",3,"click",4,"ngIf"],["fc-magnet","",3,"connector","callbacks"],["fc-connector","",3,"connector","nodeRectInfo","mouseOverConnector","callbacks","modelservice"],[1,"fc-nodeedit",3,"click"],["aria-hidden","true",1,"fa","fa-pencil"],[1,"fc-nodedelete",3,"click"]],template:function(i,o){i&1&&(d(0,"div",0),T("dblclick",function(s){return o.userNodeCallbacks.doubleClick(s,o.node)}),O(1,"div"),d(2,"div",1)(3,"p"),g(4),p(),d(5,"div"),x(6,WX,2,7,"div",2),p(),d(7,"div"),x(8,YX,2,7,"div",2),p()(),x(9,QX,2,0,"div",3)(10,KX,2,0,"div",4),p()),i&2&&(l(),bt(o.flowchartConstants.nodeOverlayClass),l(3),z(o.node.name),l(),bt(o.flowchartConstants.leftConnectorClass),l(),m("ngForOf",o.modelservice.nodes.getConnectorsByType(o.node,o.flowchartConstants.leftConnectorType)),l(),bt(o.flowchartConstants.rightConnectorClass),l(),m("ngForOf",o.modelservice.nodes.getConnectorsByType(o.node,o.flowchartConstants.rightConnectorType)),l(),m("ngIf",o.modelservice.isEditable()&&!o.node.readonly),l(),m("ngIf",o.modelservice.isEditable()&&!o.node.readonly))},dependencies:[Ke,ce,lA,cA],styles:["[_nghost-%COMP%]   .fc-node-overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;inset:0;background-color:#000;opacity:0}[_nghost-%COMP%]   .fc-hover[_nghost-%COMP%]   .fc-node-overlay[_ngcontent-%COMP%], .fc-hover   [_nghost-%COMP%]   .fc-node-overlay[_ngcontent-%COMP%]{opacity:.25;transition:opacity .2s}[_nghost-%COMP%]   .fc-selected[_nghost-%COMP%]   .fc-node-overlay[_ngcontent-%COMP%], .fc-selected   [_nghost-%COMP%]   .fc-node-overlay[_ngcontent-%COMP%]{opacity:.25}[_nghost-%COMP%]   .innerNode[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-width:100px;border-radius:5px;background-color:#f15b26;color:#fff;font-size:16px;pointer-events:none}[_nghost-%COMP%]   .innerNode[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{padding:0 15px;text-align:center}"]});let n=t;return n})(),PC=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,declarations:[xG,lA,cA,DG,J2],imports:[zi],exports:[xG,lA,cA,J2]}),t.\u0275inj=Nt({providers:[EG,IG,{provide:TG,useValue:{nodeComponentType:J2}}],imports:[zi]});let n=t;return n})();var SY=Ld(MG());var jr={};Ae(jr,{MAT_AUTOCOMPLETE_DEFAULT_OPTIONS:()=>FC,MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY:()=>AG,MAT_AUTOCOMPLETE_SCROLL_STRATEGY:()=>dA,MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY:()=>PG,MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER:()=>RG,MAT_AUTOCOMPLETE_VALUE_ACCESSOR:()=>OG,MatAutocomplete:()=>Ri,MatAutocompleteModule:()=>Bb,MatAutocompleteOrigin:()=>na,MatAutocompleteSelectedEvent:()=>TT,MatAutocompleteTrigger:()=>mi,MatOptgroup:()=>Eb,MatOption:()=>xt,getMatAutocompleteMissingPanelError:()=>aZ});y();var tZ=["panel"],iZ=["*"];function nZ(n,t){if(n&1){let r=B();d(0,"div",1,0),T("@panelAnimation.done",function(i){D(r);let o=b();return M(o._animationDone.next(i))}),Fe(2),p()}if(n&2){let r=t.id,e=b();bt(e._classList),Y("mat-mdc-autocomplete-visible",e.showPanel)("mat-mdc-autocomplete-hidden",!e.showPanel)("mat-primary",e._color==="primary")("mat-accent",e._color==="accent")("mat-warn",e._color==="warn"),m("id",e.id)("@panelAnimation",e.isOpen?"visible":"hidden"),Je("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby(r))}}var rZ=Qn("panelAnimation",[Ji("void, hidden",Tt({opacity:0,transform:"scaleY(0.8)"})),$i(":enter, hidden => visible",[Ky([Vi("0.03s linear",Tt({opacity:1})),Vi("0.12s cubic-bezier(0, 0, 0.2, 1)",Tt({transform:"scaleY(1)"}))])]),$i(":leave, visible => hidden",[Vi("0.075s linear",Tt({opacity:0}
21))])]),oZ=0,TT=class{constructor(t,r){this.source=t,this.option=r}},FC=new tt("mat-autocomplete-default-options",{providedIn:"root",factory:AG});function AG(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var Ri=(()=>{let t=class t{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}constructor(e,i,o,a){this._changeDetectorRef=e,this._elementRef=i,this._defaults=o,this._activeOptionChanges=ln.EMPTY,this._animationDone=new J,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new J,this.opened=new J,this.closed=new J,this.optionActivated=new J,this.id=`mat-autocomplete-${oZ++}`,this.inertGroups=a?.SAFARI||!1,this.autoActiveFirstOption=!!o.autoActiveFirstOption,this.autoSelectActiveOption=!!o.autoSelectActiveOption,this.requireSelection=!!o.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new pj(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new TT(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_skipPredicate(){return!1}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(ge),h(FC),h(Ur))},t.\u0275cmp=L({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,xt,5),Zt(a,Cj,5)),i&2){let s;Q(s=K())&&(o.options=s),Q(s=K())&&(o.optionGroups=s)}},viewQuery:function(i,o){if(i&1&&(ae(an,7),ae(tZ,5)),i&2){let a;Q(a=K())&&(o.template=a.first),Q(a=K())&&(o.panel=a.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",Re],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",Re],requireSelection:[2,"requireSelection","requireSelection",Re],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",Re],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Re]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[ne([{provide:yj,useExisting:t}]),si,ot],ngContentSelectors:iZ,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(i,o){i&1&&(Ct(),x(0,nZ,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-app-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[rZ]},changeDetection:0});let n=t;return n})(),na=(()=>{let t=class t{constructor(e){this.elementRef=e}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],standalone:!0});let n=t;return n})(),OG={provide:ye,useExisting:he(()=>mi),multi:!0};function aZ(){return Error("Attempting to open an undefined instance of `mat-autocomplete`. Make sure that the id passed to the `matAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.")}
21var dA=new tt("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let n=Rt(Vr);return()=>n.scrollStrategies.reposition()}});function PG(n){return()=>n.scrollStrategies.reposition()}var RG={provide:dA,deps:[Vr],useFactory:PG},mi=(()=>{let t=class t{constructor(e,i,o,a,s,c,u,f,_,I,S){this._element=e,this._overlay=i,this._viewContainerRef=o,this._zone=a,this._changeDetectorRef=s,this._dir=u,this._formField=f,this._document=_,this._viewportRuler=I,this._defaults=S,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=ln.EMPTY,this._breakpointObserver=Rt(qa),this._handsetLandscapeSubscription=ln.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Te,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new Te,this._injector=Rt(Mn),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=Jx(()=>{let F=this.autocomplete?this.autocomplete.options:null;return F?F.changes.pipe(on(F),ii(()=>Xt(...F.map(H=>H.onSelectionChange)))):this._initialized.pipe(ii(()=>this.optionSelections))}),this._handlePanelKeydown=F=>{(F.keyCode===27&&!po(F)||F.keyCode===38&&po(F,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),F.stopPropagation(),F.preventDefault())},this._trackedModal=null,this._scrollStrategy=c}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&eT(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Xt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Pi(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Pi(()=>this._overlayAttached)):Z()).pipe(W(e=>e instanceof wj?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Xt(Jn(this._document,"click"),Jn(this._document,"auxclick"),Jn(this._document,"touchend")).pipe(Pi(e=>{let i=yf(e),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,a=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&i!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(i))&&(!a||!a.contains(i))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(i)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e.keyCode,o=po(e);if(i===27&&!o&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&i===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let a=this.autocomplete._keyManager.activeItem,s=i===38||i===40;i===9||s&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(s||this.autocomplete._keyManager.activeItem!==a)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pe
vendor: 4,663 bytes, line 21
21ndingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,o=i.value;if(i.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(s=>s.selected);if(a){let s=this._getDisplayValue(a.value);o!==s&&a.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===e.target){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new Ma(o=>{Lo(()=>{o.next()},{injector:this._injector})}),i=this.autocomplete.options.changes.pipe(et(()=>this._positionStrategy.reapplyLastPosition()),nl(0));return Xt(e,i).pipe(ii(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),$n(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let i=this.autocomplete;return i&&i.displayWith?i.displayWith(e):e}_assignOptionValue(e){let i=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=this.autocomplete,o=e?e.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),i._emitSelectEvent(o),this._element.nativeElement.focus()):i.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),i._animationDone?i._animationDone.pipe($n(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,i){this.autocomplete?.options?.forEach(o=>{o!==e&&o.selected&&o.deselect(i)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let i=this.autocomplete.id;B2(this._trackedModal,"aria-owns",i)}}_attachOverlay(e){this.autocomplete;let i=this._overlayRef;i?(this._positionStrategy.setOrigin(this._getConnectedElement()),i.updateSize({width:this._getPanelWidth()})):(this._portal=new us(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),i=this._overlay.create(this._getOverlayConfig()),this._overlayRef=i,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&i&&i.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(JS.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),i&&!i.hasAttached()&&(i.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;
21this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Ha({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],s;this.position==="above"?s=a:this.position==="below"?s=i:s=[...i,...a],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let i=-1;for(let o=0;o<e.options.length;o++)if(!e.options.get(o).disabled){i=o;break}e._keyManager.setActiveItem(i)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(e){let i=this.autocomplete,o=xj(e,i.options,i.optionGroups);if(e===0&&o===1)i._setScrollTop(0);else if(i.panel){let a=i.options.toArray()[e];if(a){let s=a._getHostElement(),c=Sj(s.offsetTop,s.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(c)}}}_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=this.autocomplete.id;this._trackedModal&&eT(this._trackedModal,"aria-owns",i),B2(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;eT(this._trackedModal,"aria-owns",e),this._trackedModal=null}}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Vr),h(ci),h(Bt),h(Me),h(dA),h(mr,8),h(sm,9),h(Qi,8),h(lc),h(FC,8))},t.\u0275dir=_e({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(i,o){i&1&&T("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(s){return o._handleInput(s)})("keydown",function(s){return o._handleKeydown(s)})("click",function(){return o._handleClick()}),i&2&&Je("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",Re]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[ne([OG]),si,lt]});let n=t;return n})(),Bb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Bo,vC,Ot,zi,Ri,mi,na],exports:[_a,Ri,vC,Ot,mi,na]}),t.\u0275inj=Nt({providers:[RG],imports:[Bo,vC,Ot,zi,_a,vC,Ot]});let n=t;return n})();var lZ={};Ae(lZ,{MatBadge:()=>mA,MatBadgeModule:()=>jb});y();
21var sZ=0,FG="mat-badge-content",pA=new Set,NG=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["ng-component"]],standalone:!0,features:[ot],decls:0,vars:0,template:function(i,o){},styles:[".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-app-error));color:var(--mat-badge-text-color, var(--mat-app-on-error));font-family:var(--mat-badge-text-font, var(--mat-app-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-app-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-app-corner-full))}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color, var(--mat-app-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size);height:var(--mat-badge-legacy-small-size-container-size);min-width:var(--mat-badge-small-size-container-size);min-height:var(--mat-badge-small-size-container-size);line-height:var(--mat-badge-small-size-line-height);padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size);height:var(--mat-badge-legacy-container-size);min-width:var(--mat-badge-container-size);min-height:var(--mat-badge-container-size);line-height:var(--mat-badge-line-height);padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size, var(--mat-app-label-small-size));margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size);height:var(--mat-badge-legacy-large-size-container-size);min-width:var(--mat-badge-large-size-container-size);min-height:var(--mat-badge-large-size-container-size);line-height:var(--mat-badge-large-size-line-height);padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size, var(--mat-app-label-small-size));margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}"],encapsulation:2,changeDetection:0});let n=t;return n})(),mA=(()=>{let t=class t{get color(){return this._color}set color(e){this._setColor(e),this._color=e}get content(){return this._content}set content(e){this._updateRenderedContent(e)}get description(){return this._description}set description(e){this._updateDescription(e)}constructor(e,i,o,a,s){this._ngZone=e,this._elementRef=i,this._ariaDescriber=o,this._renderer=a,this._animationMode=s,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=sZ++,this._isInitialized=!1,this._interactivityChecker=Rt(tT),this._document=Rt(Qi);let c=Rt(db);if(!pA.has(c)){pA.add(c);let u=rS(NG,{environmentInjector:Rt(tS)});c.onDestroy(()=>{pA.delete(c),u.destroy()})}}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let e=this._renderer.createElement("span"),i="mat-badge-active";return e.setAttribute("id",`mat-badge-content-${this._id}`),e.setAttribute("aria-hidden","true"),e.classList.add(FG),this._animationMode==="NoopAnimations"&&e.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(e),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{e.classList.add(i)})}):e.classList.add(i),e}_updateRenderedContent(e){let i=`${e??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!e||this._isHostInteractive())&&this._removeInlineDescription(),this._description=e,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,e):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(e){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),e&&i.add(`mat-badge-${e}`)}_clearExistingBadges(){let e=this._elementRef.nativeElement.querySelectorAll(`:scope > .${FG}`);for(let i of Array.from(e))i!==this._badgeElement&&i.remove()}};t.\u0275fac=function(i){return new(i||t)(h(Bt),h(ge),h(Sb),h(Ni),h(Er,8))},t.\u0275dir=_e({type:t,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,o){i&2&&Y("mat-badge-overlap",o.overlap)("mat-badge-above",o.isAbove())("mat-badge-below",!o.isAbove())("mat-badge-before",!o.isAfter())("mat-badge-after",o.isAfter())("mat-badge-small",o.size==="small")("mat-badge-medium",o.size==="medium")("mat-badge-large",o.size==="large")("mat-badge-hidden",o.hidden||!o.content)("mat-badge-disabled",o.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",Re],disabled:[2,"matBadgeDisabled","disabled",Re],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",Re]},standalone:!0,features:[si]});let n=t;return n})(),jb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[pc,Ot,mA,NG],exports:[mA,Ot]}),t.\u0275inj=Nt({imports:[pc,Ot,Ot]});let n=t;return n})();var ET={};Ae(ET,{MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS:()=>uA,MAT_BUTTON_TOGGLE_GROUP:()=>hA,MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY:()=>VG,MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR:()=>LG,MatButtonToggle:()=>Kc,MatButtonToggleChange:()=>NC,MatButtonToggleGroup:()=>hc,MatButtonToggleModule:()=>Gb});y();var cZ=["button"],dZ=["*"];function pZ(n,t){if(n&1&&O(0,"mat-pseudo-checkbox",3),n&2){let r=b
21();m("disabled",r.disabled)}}function mZ(n,t){if(n&1&&O(0,"mat-pseudo-checkbox",3),n&2){let r=b();m("disabled",r.disabled)}}var uA=new tt("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:VG});function VG(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var hA=new tt("MatButtonToggleGroup"),LG={provide:ye,useExisting:he(()=>hc),multi:!0},BG=0,NC=class{constructor(t,r){this.source=t,this.value=r}},hc=(()=>{let t=class t{get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}constructor(e,i,o){this._changeDetector=e,this._dir=o,this._multiple=!1,this._disabled=!1,this._disabledInteractive=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name=`mat-button-toggle-group-${BG++}`,this.valueChange=new J,this.change=new J,this.appearance=i&&i.appearance?i.appearance:"standard",this.hideSingleSelectionIndicator=i?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=i?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Wc(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled)return;let o=e.target.id,a=this._buttonToggles.toArray().findIndex(c=>c.buttonId===o),s=null;switch(e.keyCode){case 32:case 13:s=this._buttonToggles.get(a)||null;break;case 38:s=this._getNextButton(a,-1);break;case 37:s=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:s=this._getNextButton(a,1);break;case 39:s=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}s&&(e.preventDefault(),s._onButtonClick(),s.focus())}_emitChangeEvent(e){let i=new NC(e,this.value);this._rawValue=i.value,this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,o=!1,a=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(e,o)):this._updateModelValue(e,o)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>e.value!=null&&i===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let i=this._buttonToggles.get(e);if(!i.disabled){i.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(e,i){let o=this._buttonToggles;for(let a=1;a<=o.length;a++){let s=(e+i*a+o.length)%o.length,c=o.get(s);if(c&&!c.disabled)return c}return null}_setSelectionByValue(e){this._rawValue=e,this._buttonToggles&&(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(i=>
21this._selectValue(i))):(this._clearSelection(),this._selectValue(e)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e){let i=this._buttonToggles.find(o=>o.value!=null&&o.value===e);i&&(i.checked=!0,this._selectionModel.select(i),this.multiple||(i.tabIndex=0))}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(uA,8),h(mr,8))},t.\u0275dir=_e({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,Kc,5),i&2){let s;Q(s=K())&&(o._buttonToggles=s)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._keydown(s)}),i&2&&(Je("role",o.multiple?"group":"radiogroup")("aria-disabled",o.disabled),Y("mat-button-toggle-vertical",o.vertical)("mat-button-toggle-group-appearance-standard",o.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",Re],value:"value",multiple:[2,"multiple","multiple",Re],disabled:[2,"disabled","disabled",Re],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Re],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Re],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",Re]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],standalone:!0,features:[ne([LG,{provide:hA,useExisting:t}]),si]});let n=t;return n})(),Kc=(()=>{let t=class t{get buttonId(){return`${this.id}-button`}get tabIndex(){return this._tabIndex}set tabIndex(e){this._tabIndex=e,this._markForCheck()}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}constructor(e,i,o,a,s,c){this._changeDetectorRef=i,this._elementRef=o,this._focusMonitor=a,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new J;let u=Number(s);this.tabIndex=u||u===0?u:null,this.buttonToggleGroup=e,this.appearance=c&&c.appearance?c.appearance:"standard",this.disabledInteractive=c?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||`mat-button-toggle-${BG++}`,e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let i=this.buttonToggleGroup._buttonToggles.find(o=>o.tabIndex===0);i&&(i.tabIndex=-1),this.tabIndex=0}this.change.emit(new NC(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}};t.\u0275fac=function(i){return new(i||t)(h(hA,8),h(Me),h(ge),h(Po),ja("tabindex"),h(uA,8))},t.\u0275cmp=L({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(i,o){if(i&1&&ae(cZ,5),i&2){let a;Q(a=K())&&(o._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(i,o){i&1&&T("focus",function(){return o.focus()}
21),i&2&&(Je("aria-label",null)("aria-labelledby",null)("id",o.id)("name",null),Y("mat-button-toggle-standalone",!o.buttonToggleGroup)("mat-button-toggle-checked",o.checked)("mat-button-toggle-disabled",o.disabled)("mat-button-toggle-disabled-interactive",o.disabledInteractive)("mat-button-toggle-appearance-standard",o.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",Re],appearance:"appearance",checked:[2,"checked","checked",Re],disabled:[2,"disabled","disabled",Re],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Re]},outputs:{change:"change"},exportAs:["matButtonToggle"],standalone:!0,features:[si,ot],ngContentSelectors:dZ,decls:8,vars:14,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-label-content"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"button",1,0),T("click",function(){return D(a),M(o._onButtonClick())}),d(2,"span",2),x(3,pZ,1,1,"mat-pseudo-checkbox",3)(4,mZ,1,1,"mat-pseudo-checkbox",3),Fe(5),p()(),O(6,"span",4)(7,"span",5)}if(i&2){let a=me(1);m("id",o.buttonId)("disabled",o.disabled&&!o.disabledInteractive||null),Je("role",o.isSingleSelector()?"radio":"button")("tabindex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex)("aria-pressed",o.isSingleSelector()?null:o.checked)("aria-checked",o.isSingleSelector()?o.checked:null)("name",o._getButtonName())("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledby)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),l(3),_t(o.buttonToggleGroup&&o.checked&&!o.buttonToggleGroup.multiple&&!o.buttonToggleGroup.hideSingleSelectionIndicator?3:-1),l(),_t(o.buttonToggleGroup&&o.checked&&o.buttonToggleGroup.multiple&&!o.buttonToggleGroup.hideMultipleSelectionIndicator?4:-1),l(3),m("matRippleTrigger",a)("matRippleDisabled",o.disableRipple||o.disabled)}},dependencies:[Wa,vj],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-app-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle .mat-pseudo-checkbox{margin-right:12px}[dir=rtl] .mat-button-toggle .mat-pseudo-checkbox{margin-right:0;margin-left:12px}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-app-on-surface));background-color:var(--mat-standard-button-toggle-background-color);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-app-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-app-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-app-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-app-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-app-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-app-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-app-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-state-background-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-app-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}
21.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full))}.mat-button-toggle-group-appearance-standard .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full))}.mat-button-toggle-group-appearance-standard .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full))}"],encapsulation:2,changeDetection:0});let n=t;return n})(),Gb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,Ya,hc,Kc],exports:[Ot,hc,Kc]}),t.\u0275inj=Nt({imports:[Ot,Ya,Kc,Ot]});let n=t;return n})();var _Z={};Ae(_Z,{MAT_CARD_CONFIG:()=>jG,MatCard:()=>fA,MatCardActions:()=>yA,MatCardAvatar:()=>kA,MatCardContent:()=>_A,MatCardFooter:()=>wA,MatCardHeader:()=>CA,MatCardImage:()=>xA,MatCardLgImage:()=>EA,MatCardMdImage:()=>TA,MatCardModule:()=>zb,MatCardSmImage:()=>SA,MatCardSubtitle:()=>vA,MatCardTitle:()=>gA,MatCardTitleGroup:()=>bA,MatCardXlImage:()=>IA});y();var uZ=["*"],hZ=[[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],[["","mat-card-image",""],["","matCardImage",""],["","mat-card-sm-image",""],["","matCardImageSmall",""],["","mat-card-md-image",""],["","matCardImageMedium",""],["","mat-card-lg-image",""],["","matCardImageLarge",""],["","mat-card-xl-image",""],["","matCardImageXLarge",""]],"*"],fZ=[`mat-card-title, mat-card-subtitle,
22      [mat-card-title], [mat-card-subtitle],
23      [matCardTitle], [matCardSubtitle]`,`[mat-card-image], [matCardImage],
24                    [mat-card-sm-image], [matCardImageSmall],
25                    [mat-card-md-image], [matCardImageMedium],
26                    [mat-card-lg-image], [matCardImageLarge],
27                    [mat-card-xl-image], [matCardImageXLarge]`,"*"],gZ=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],bZ=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle,
28      [mat-card-title], [mat-card-subtitle],
29      [matCardTitle], [matCardSubtitle]`,"*"],jG=new tt("MAT_CARD_CONFIG"),fA=(()=>{let t=class t{constructor(e){this.appearance=e?.appearance||"raised"}};t.\u0275fac=function(i){return new(i||t)(h(jG,8))},t.\u0275cmp=L({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(i,o){i&2&&Y("mat-mdc-card-outlined",o.appearance==="outlined")("mdc-card--outlined",o.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[ot],ngContentSelectors:uZ,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),Fe(0))},styles:['.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-app-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-app-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-app-corner-medium));border-width:var(--mdc-outlined-card-outline-width);border-color:var(--mdc-outlined-card-outline-color, var(--mat-app-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-app-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-app-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-app-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-app-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-app-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-app-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-app-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-app-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-app-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-app-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-app-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-app-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}
29.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0});let n=t;return n})(),gA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"],standalone:!0});let n=t;return n})(),bA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["mat-card-title-group"]],hostAttrs:[1,"mat-mdc-card-title-group"],standalone:!0,features:[ot],ngContentSelectors:fZ,decls:4,vars:0,template:function(i,o){i&1&&(Ct(hZ),d(0,"div"),Fe(1),p(),Fe(2,1),Fe(3,2))},encapsulation:2,changeDetection:0});let n=t;return n})(),_A=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"],standalone:!0});let n=t;return n})(),vA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"],standalone:!0});let n=t;return n})(),yA=(()=>{let t=class t{constructor(){this.align="start"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(i,o){i&2&&Y("mat-mdc-card-actions-align-end",o.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"],standalone:!0});let n=t;return n})(),CA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],standalone:!0,features:[ot],ngContentSelectors:bZ,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(i,o){i&1&&(Ct(gZ),Fe(0),d(1,"div",0),Fe(2,1),p(),Fe(3,2))},encapsulation:2,changeDetection:0});let n=t;return n})(),wA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-card-footer"]],hostAttrs:[1,"mat-mdc-card-footer"],standalone:!0});let n=t;return n})(),xA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-card-image",""],["","matCardImage",""]],hostAttrs:[1,"mat-mdc-card-image","mdc-card__media"],standalone:!0});let n=t;return n})(),SA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-card-sm-image",""],["","matCardImageSmall",""]],hostAttrs:[1,"mat-mdc-card-sm-image","mdc-card__media"],standalone:!0});let n=t;return n})(),TA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-card-md-image",""],["","matCardImageMedium",""]],hostAttrs:[1,"mat-mdc-card-md-image","mdc-card__media"],standalone:!0});let n=t;return n})(),EA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-card-lg-image",""],["","matCardImageLarge",""]],hostAttrs:[1,"mat-mdc-card-lg-image","mdc-card__media"],standalone:!0});let n=t;return n})(),IA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-card-xl-image",""],["","matCardImageXLarge",""]],hostAttrs:[1,"mat-mdc-card-xl-image","mdc-card__media"],standalone:!0});let n=t;return n})(),kA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-card-avatar",""],["","matCardAvatar",""]],hostAttrs:[1,"mat-mdc-card-avatar"],standalone:!0});let n=t;return n})();var zb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,zi,fA,yA,kA,_A,wA,CA,xA,EA,TA,SA,vA,gA,bA,IA],exports:[fA,yA,kA,_A,wA,CA,xA,EA,TA,SA,vA,gA,bA,IA,Ot]}),t.\u0275inj=Nt({imports:[Ot,zi,Ot]});let n=t;return n})();var um={};Ae(um,{MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR:()=>$G,MAT_CHECKBOX_DEFAULT_OPTIONS:()=>zG,MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY:()=>DA,MAT_CHECKBOX_REQUIRED_VALIDATOR:()=>UG,MatCheckbox:()=>ra,MatCheckboxChange:()=>
29IT,MatCheckboxModule:()=>$b,MatCheckboxRequiredValidator:()=>kT,TransitionCheckState:()=>hs,_MatCheckboxRequiredValidatorModule:()=>xZ});y();var vZ=["input"],yZ=["label"],CZ=["*"],zG=new tt("mat-checkbox-default-options",{providedIn:"root",factory:DA});function DA(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var hs=function(n){return n[n.Init=0]="Init",n[n.Checked=1]="Checked",n[n.Unchecked=2]="Unchecked",n[n.Indeterminate=3]="Indeterminate",n}(hs||{}),$G={provide:ye,useExisting:he(()=>ra),multi:!0},IT=class{},wZ=0,GG=DA(),ra=(()=>{let t=class t{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let i=new IT;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,o,a,s,c){this._elementRef=e,this._changeDetectorRef=i,this._ngZone=o,this._animationMode=s,this._options=c,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new J,this.indeterminateChange=new J,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=hs.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||GG,this.color=this._options.color||GG.color,this.tabIndex=parseInt(a)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++wZ}`,this.disabledInteractive=c?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let i=e!=this._indeterminate;this._indeterminate=e,i&&(this._indeterminate?this._transitionCheckState(hs.Indeterminate):this._transitionCheckState(this.checked?hs.Checked:hs.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let i=this._currentCheckState,o=this._getAnimationTargetElement();if(!(i===e||!o)&&(this._currentAnimationClass&&o.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){o.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{o.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?hs.Checked:hs.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if(this._animationMode==="NoopAnimations")return"";switch(e){case hs.Init:if(i===hs.Checked)return this._animationClasses.uncheckedToChecked;if(i==hs.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case hs.Unchecked:return i===hs.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case hs.Checked:return i===hs.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case hs.Indeterminate:return i===hs.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(Bt),ja("tabindex"),h(Er,8),h(zG,8))},t.\u0275cmp=L({type:t,selectors:[["mat-checkbox"]],viewQuery:function(i,o){if(i&1&&(ae(vZ,5),ae(yZ,5),ae(Wa,5)),i&2){let a;Q(a=K())&&(o._inputElement=a.first),Q(a=K())&&(o._labelElement=a.first),Q(a=K())&&(o.ripple=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(i,o){i&2&&(lo("id",o.id
29),Je("tabindex",null)("aria-label",null)("aria-labelledby",null),bt(o.color?"mat-"+o.color:"mat-accent"),Y("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mdc-checkbox--disabled",o.disabled)("mat-mdc-checkbox-disabled",o.disabled)("mat-mdc-checkbox-checked",o.checked)("mat-mdc-checkbox-disabled-interactive",o.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],id:"id",required:[2,"required","required",Re],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",Re],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:Nr(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Re],checked:[2,"checked","checked",Re],disabled:[2,"disabled","disabled",Re],indeterminate:[2,"indeterminate","indeterminate",Re]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[ne([$G,{provide:zn,useExisting:t,multi:!0}]),si,lt,ot],ngContentSelectors:CZ,decls:15,vars:20,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"div",3),T("click",function(c){return D(a),M(o._preventBubblingFromLabel(c))}),d(1,"div",4,0)(3,"div",5),T("click",function(){return D(a),M(o._onTouchTargetClick())}),p(),d(4,"input",6,1),T("blur",function(){return D(a),M(o._onBlur())})("click",function(){return D(a),M(o._onInputClick())})("change",function(c){return D(a),M(o._onInteractionEvent(c))}),p(),O(6,"div",7),d(7,"div",8),ar(),d(8,"svg",9),O(9,"path",10),p(),cs(),O(10,"div",11),p(),O(11,"div",12),p(),d(12,"label",13,2),Fe(14),p()()}if(i&2){let a=me(2);m("labelPosition",o.labelPosition),l(4),Y("mdc-checkbox--selected",o.checked),m("checked",o.checked)("indeterminate",o.indeterminate)("disabled",o.disabled&&!o.disabledInteractive)("id",o.inputId)("required",o.required)("tabIndex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex),Je("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-checked",o.indeterminate?"mixed":null)("aria-disabled",o.disabled&&o.disabledInteractive?!0:null)("name",o.name)("value",o.value),l(7),m("matRippleTrigger",a)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),l(),m("for",o.inputId)}},dependencies:[Wa,Ib],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.cdk-high-contrast-active .mdc-checkbox--disabled{opacity:.5}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-app-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-app-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-app-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mdc-checkbox__checkmark{color:CanvasText}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.cdk-high-contrast-active .mdc-checkbox--disabled .mdc-checkbox__checkmark,.cdk-high-contrast-active .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;
29transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mdc-checkbox__mixedmark{margin:0 1px}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}
29}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=t;return n})(),UG={provide:zn,useExisting:he(()=>kT),multi:!0},kT=(()=>{let t=class t extends cT{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],standalone:!0,features:[ne([UG]),Ce]});let n=t;return n})(),xZ=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[kT],exports:[kT]}),t.\u0275inj=Nt({});let n=t;return n})(),$b=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[ra,Ot],exports:[ra,Ot]}),t.\u0275inj=Nt({imports:[ra,Ot,Ot]});let n=t;return n})();var xl={};Ae(xl,{MAT_CHIP:()=>LC,MAT_CHIPS_DEFAULT_OPTIONS:()=>VC,MAT_CHIP_AVATAR:()=>DT,MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR:()=>QG,MAT_CHIP_REMOVE:()=>AT,MAT_CHIP_TRAILING_ICON:()=>MT,MatChip:()=>wl,MatChipAvatar:()=>hm,MatChipEditInput:()=>Ub,MatChipGrid:()=>aa,MatChipGridChange:()=>PT,MatChipInput:()=>sa,MatChipListbox:()=>qb,MatChipListboxChange:()=>OT,MatChipOption:()=>Hb,MatChipRemove:()=>oa,MatChipRow:()=>Qo,MatChipSelectionChange:()=>AA,MatChipSet:()=>Xc,MatChipTrailingIcon:()=>MA,MatChipsModule:()=>Wb});y();var HG=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],qG=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function SZ(n,t){n&1&&(d(0,"span",3),Fe(1,1),p())}function TZ(n,t){n&1&&(d(0,"span",6),Fe(1,2),p())}function EZ(n,t){n&1&&(d(0,"span",3),Fe(1,1),d(2,"span",8),ar(),d(3,"svg",9),O(4,"path",10),p()()())}function IZ(n,t){n&1&&(d(0,"span",6),Fe(1,2),p())}var WG='.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{dis
29play:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{flex-basis:100%;overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}.mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit;overflow-x:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-outline-width);border-radius:var(--mdc-chip-container-shape-radius);box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1;border-style:solid}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-outline-color, var(--mat-app-outline))}.mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus::before{border-color:var(--mdc-chip-focus-outline-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-disabled-outline-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-flat-selected-outline-width)}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, var(--mat-app-on-surface))}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip__text-label{-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font, var(--mat-app-label-large-font));line-height:var(--mdc-chip-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mdc-chip-label-text-size, var(--mat-app-label-large-size));font-weight:var(--mdc-chip-label-text-weight, var(--mat-app-label-large-weight));letter-spacing:var(--mdc-chip-label-text-tracking, var(--mat-app-label-large-tracking))}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-selected-label-text-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color)}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{width:var(--mdc-chip-with-avatar-avatar-size);height:var(--mdc-chip-with-avatar-avatar-size);font-size:var(--mdc-chip-with-avatar-avatar-size)}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%;height:20px;width:20px}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-app-on-surface))}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.cdk-high-contrast-active .mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove{opacity:calc(var(--mat-chip-trailing-action-opacity)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity))}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove:focus{opacity:calc(var(--mat-chip-trailing-action-focus-opacity)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity))}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius);height:var(--mdc-chip-container-height)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-app-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-flat-disabled-selected-container-color)}.cdk-high-contrast-active .mat-mdc-standard-chip{outline:solid 1px}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius);width:var(--mdc-chip-with-icon-icon-size);height:var(--mdc-chip-with-icon-icon-size);font-size:var(--mdc-chip-with-icon-icon-size)}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}
29.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-app-on-surface))}.mat-mdc-chip-highlighted{--mdc-chip-with-icon-icon-color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-app-on-secondary-container));--mdc-chip-elevated-container-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-app-secondary-container));--mdc-chip-label-text-color:var(--mdc-chip-selected-label-text-color, var(--mat-app-on-secondary-container));--mdc-chip-outline-width:var(--mdc-chip-flat-selected-outline-width)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-chip-selected .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-app-on-secondary-container))}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-hover-state-layer-color, var(--mat-app-on-surface-variant));opacity:var(--mdc-chip-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-chip-focus-overlay .mat-mdc-chip-selected:hover,.mat-mdc-chip-highlighted:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-hover-state-layer-color, var(--mat-app-on-secondary-container));opacity:var(--mdc-chip-selected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-app-on-surface-variant));opacity:var(--mdc-chip-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-chip-selected.cdk-focused .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-app-on-secondary-container));opacity:var(--mdc-chip-selected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mdc-evolution-chip--disabled:not(.mdc-evolution-chip--selected) .mat-mdc-chip-avatar{opacity:var(--mdc-chip-with-avatar-disabled-avatar-opacity)}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{opacity:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity)}.mdc-evolution-chip--disabled.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{opacity:var(--mdc-chip-with-icon-disabled-icon-opacity)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:var(--mat-chip-disabled-container-opacity)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-trailing-icon-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-disabled-trailing-icon-color, var(--mat-app-on-surface))}.mat-mdc-chip-remove{opacity:var(--mat-chip-trailing-action-opacity)}.mat-mdc-chip-remove:focus{opacity:var(--mat-chip-trailing-action-focus-opacity)}.mat-mdc-chip-remove::after{background-color:var(--mat-chip-trailing-action-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-chip-remove:hover::after{opacity:var(--mat-chip-trailing-action-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-chip-remove:focus::after{opacity:var(--mat-chip-trailing-action-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-chip-selected .mat-mdc-chip-remove::after,.mat-mdc-chip-highlighted .mat-mdc-chip-remove::after{background-color:var(--mat-chip-selected-trailing-action-state-layer-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-chip-remove::before{margin:calc(var(--mat-mdc-focus-indicator-border-width, 3px)*-1);left:8px;right:8px}.mat-mdc-chip-remove::after{content:"";display:block;opacity:0;position:absolute;top:-3px;bottom:-3px;left:5px;right:5px;border-radius:50%;box-sizing:border-box;padding:12px;margin:-12px;background-clip:content-box}.mat-mdc-chip-remove .mat-icon{width:18px;height:18px;font-size:18px;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}.cdk-high-contrast-active .mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}.mat-mdc-chip-action:focus .mat-mdc-focus-indicator::before{content:""}',kZ=[[["mat-chip-avatar"],["","matChipAvatar",""]],[["","matChipEditInput",""]],"*",[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],DZ=["mat-chip-avatar, [matChipAvatar]","[matChipEditInput]","*","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function MZ(n,t){n&1&&O(0,"span",0)}function AZ(n,t){n&1&&(d(0,"span",2),Fe(1),p())}function OZ(n,t){n&1&&Fe(0,1)}function PZ(n,t){n&1&&O(0,"span",7)}function RZ(n,t){if(n&1&&x(0,OZ,1,0)(1,PZ,1,0,"span",7),n&2){let r=b
29();_t(r.contentEditInput?0:1)}}function FZ(n,t){n&1&&Fe(0,2)}function NZ(n,t){n&1&&(d(0,"span",5),Fe(1,3),p())}var OA=["*"],YG=".mat-mdc-chip-set{display:flex}.mat-mdc-chip-set:focus{outline:none}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%;margin-left:-8px;margin-right:0}.mat-mdc-chip-set .mdc-evolution-chip{margin:4px 0 4px 8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0;margin-right:-8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip{margin-left:0;margin-right:8px}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}.mat-mdc-chip-set-stacked .mdc-evolution-chip__graphic{flex-grow:0}.mat-mdc-chip-set-stacked .mdc-evolution-chip__action--primary{flex-basis:100%;justify-content:start}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}",VC=new tt("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),DT=new tt("MatChipAvatar"),MT=new tt("MatChipTrailingIcon"),AT=new tt("MatChipRemove"),LC=new tt("MatChip"),Mf=(()=>{let t=class t{get disabled(){return this._disabled||this._parentChip.disabled}set disabled(e){this._disabled=e}_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled||!this.isInteractive?null:this.tabIndex.toString()}constructor(e,i){this._elementRef=e,this._parentChip=i,this.isInteractive=!0,this._isPrimary=!0,this._disabled=!1,this.tabIndex=-1,this._allowFocusWhenDisabled=!1,e.nativeElement.nodeName==="BUTTON"&&e.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}_handleClick(e){!this.disabled&&this.isInteractive&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this.isInteractive&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(LC))},t.\u0275dir=_e({type:t,selectors:[["","matChipAction",""]],hostAttrs:[1,"mdc-evolution-chip__action","mat-mdc-chip-action"],hostVars:9,hostBindings:function(i,o){i&1&&T("click",function(s){return o._handleClick(s)})("keydown",function(s){return o._handleKeydown(s)}),i&2&&(Je("tabindex",o._getTabindex())("disabled",o._getDisabledAttribute())("aria-disabled",o.disabled),Y("mdc-evolution-chip__action--primary",o._isPrimary)("mdc-evolution-chip__action--presentational",!o.isInteractive)("mdc-evolution-chip__action--trailing",!o._isPrimary))},inputs:{isInteractive:"isInteractive",disabled:[2,"disabled","disabled",Re],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:Nr(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"},standalone:!0,features:[si]});let n=t;return n})(),hm=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-chip-avatar"],["","matChipAvatar",""]],hostAttrs:["role","img",1,"mat-mdc-chip-avatar","mdc-evolution-chip__icon","mdc-evolution-chip__icon--primary"],standalone:!0,features:[ne([{provide:DT,useExisting:t}])]});let n=t;return n})(),MA=(()=>{let t=class t extends Mf{constructor(){super(...arguments),this.isInteractive=!1,this._isPrimary=!1}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-chip-trailing-icon"],["","matChipTrailingIcon",""]],hostAttrs:["aria-hidden","true",1,"mat-mdc-chip-trailing-icon","mdc-evolution-chip__icon","mdc-evolution-chip__icon--trailing"],standalone:!0,features:[ne([{provide:MT,useExisting:t}]),Ce]});let n=t;return n})(),oa=(()=>{let t=class t extends Mf{constructor(){super(...arguments),this._isPrimary=!1}_handleClick(e){this.disabled||(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matChipRemove",""]],hostAttrs:["role","button",1,"mat-mdc-chip-remove","mat-mdc-chip-trailing-icon","mat-mdc-focus-indicator","mdc-evolution-chip__icon","mdc-evolution-chip__icon--trailing"],hostVars:1,hostBindings:function(i,o){i&2&&Je("aria-hidden",null)},standalone:!0,features:[ne([{provide:AT,useExisting:t}]),Ce]});let n=t;return n})(),VZ=0,wl=(()=>{let t=class t{_hasFocus(){return this._hasFocusInternal}get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(e){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,e)}constructor(e,i,o,a,s,c,u){this._changeDetectorRef=e,this._elementRef=i,this._ngZone=o,this._focusMonitor=a,this._globalRippleOptions=u,this._onFocus=new Te,this._onBlur=new Te,this.role=null,this._hasFocusInternal=!1,this.id=`mat-mdc-chip-${VZ++}`,this.ariaLabel=null,this.ariaDescription=null,this._ariaDescriptionId=`${this.id}-aria-description`,this._chipListDisabled=!1,this.removable=!0,this.highlighted=!1,this.disableRipple=!1,this._disabled=!1,this.removed=new J,this.destroyed=new J,this.basicChipAttrName="mat-basic-chip",this._rippleLoader=Rt(Tj),this._injector=Rt(Mn),this._document=s,this._animationsDisabled=c==="NoopAnimations",this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){let e=this._elementRef.nativeElement;this._isBasicChip=e.hasAttribute(this.basicChipAttrName)||e.tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pe
29ndingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=Xt(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe(),this.destroyed.emit({chip:this}),this.destroyed.complete()}remove(){this.removable&&this.removed.emit({chip:this})}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(i=>{let o=i._elementRef.nativeElement;return o===e||o.contains(e)})}_getActions(){let e=[];return this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),this.trailingIcon&&e.push(this.trailingIcon),e}_handlePrimaryActionInteraction(){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=e!==null;i!==this._hasFocusInternal&&(this._hasFocusInternal=i,i?this._onFocus.next({chip:this}):Lo(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})),{injector:this._injector}))})}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(ge),h(Bt),h(Po),h(Qi),h(Er,8),h(om,8))},t.\u0275cmp=L({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,DT,5),Zt(a,MT,5),Zt(a,AT,5),Zt(a,DT,5),Zt(a,MT,5),Zt(a,AT,5)),i&2){let s;Q(s=K())&&(o.leadingIcon=s.first),Q(s=K())&&(o.trailingIcon=s.first),Q(s=K())&&(o.removeIcon=s.first),Q(s=K())&&(o._allLeadingIcons=s),Q(s=K())&&(o._allTrailingIcons=s),Q(s=K())&&(o._allRemoveIcons=s)}},viewQuery:function(i,o){if(i&1&&ae(Mf,5),i&2){let a;Q(a=K())&&(o.primaryAction=a.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._handleKeydown(s)}),i&2&&(lo("id",o.id),Je("role",o.role)("aria-label",o.ariaLabel),bt("mat-"+(o.color||"primary")),Y("mdc-evolution-chip",!o._isBasicChip)("mdc-evolution-chip--disabled",o.disabled)("mdc-evolution-chip--with-trailing-action",o._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",o.leadingIcon)("mdc-evolution-chip--with-primary-icon",o.leadingIcon)("mdc-evolution-chip--with-avatar",o.leadingIcon)("mat-mdc-chip-with-avatar",o.leadingIcon)("mat-mdc-chip-highlighted",o.highlighted)("mat-mdc-chip-disabled",o.disabled)("mat-mdc-basic-chip",o._isBasicChip)("mat-mdc-standard-chip",!o._isBasicChip)("mat-mdc-chip-with-trailing-icon",o._hasTrailingIcon())("_mat-animation-noopable",o._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",Re],highlighted:[2,"highlighted","highlighted",Re],disableRipple:[2,"disableRipple","disableRipple",Re],disabled:[2,"disabled","disabled",Re]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],standalone:!0,features:[ne([{provide:LC,useExisting:t}]),si,ot],ngContentSelectors:qG,decls:8,vars:3,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","",3,"isInteractive"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-mdc-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(i,o){i&1&&(Ct(HG),O(0,"span",0),d(1,"span",1)(2,"span",2),x(3,SZ,2,0,"span",3),d(4,"span",4),Fe(5),O(6,"span",5),p()()(),x(7,TZ,2,0,"span",6)
29),i&2&&(l(2),m("isInteractive",!1),l(),_t(o.leadingIcon?3:-1),l(4),_t(o._hasTrailingIcon()?7:-1))},dependencies:[Mf],styles:['.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{flex-basis:100%;overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}.mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit;overflow-x:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-outline-width);border-radius:var(--mdc-chip-container-shape-radius);box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1;border-style:solid}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-outline-color, var(--mat-app-outline))}.mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus::before{border-color:var(--mdc-chip-focus-outline-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-disabled-outline-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-flat-selected-outline-width)}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, var(--mat-app-on-surface))}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip__text-label{-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font, var(--mat-app-label-large-font));line-height:var(--mdc-chip-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mdc-chip-label-text-size, var(--mat-app-label-large-size));font-weight:var(--mdc-chip-label-text-weight, var(--mat-app-label-large-weight));letter-spacing:var(--mdc-chip-label-text-tracking, var(--mat-app-label-large-tracking))}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-selected-label-text-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color)}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{width:var(--mdc-chip-with-avatar-avatar-size);height:var(--mdc-chip-with-avatar-avatar-size);font-size:var(--mdc-chip-with-avatar-avatar-size)}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%;height:20px;width:20px}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-app-on-surface))}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.cdk-high-contrast-active .mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove{opacity:calc(var(--mat-chip-trailing-action-opacity)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity))}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove:focus{opacity:calc(var(--mat-chip-trailing-action-focus-opacity)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity))}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius);height:var(--mdc-chip-container-height)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-app-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-flat-disabled-selected-container-color)}.cdk-high-contrast-active .mat-mdc-standard-chip{outline:solid 1px}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius);width:var(--mdc-chip-with-icon-icon-size);height:var(--mdc-chip-with-icon-icon-size);font-size:var(--mdc-chip-with-icon-icon-size)}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}
29.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-app-on-surface))}.mat-mdc-chip-highlighted{--mdc-chip-with-icon-icon-color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-app-on-secondary-container));--mdc-chip-elevated-container-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-app-secondary-container));--mdc-chip-label-text-color:var(--mdc-chip-selected-label-text-color, var(--mat-app-on-secondary-container));--mdc-chip-outline-width:var(--mdc-chip-flat-selected-outline-width)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-chip-selected .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-app-on-secondary-container))}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-hover-state-layer-color, var(--mat-app-on-surface-variant));opacity:var(--mdc-chip-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-chip-focus-overlay .mat-mdc-chip-selected:hover,.mat-mdc-chip-highlighted:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-hover-state-layer-color, var(--mat-app-on-secondary-container));opacity:var(--mdc-chip-selected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-app-on-surface-variant));opacity:var(--mdc-chip-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-chip-selected.cdk-focused .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-app-on-secondary-container));opacity:var(--mdc-chip-selected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mdc-evolution-chip--disabled:not(.mdc-evolution-chip--selected) .mat-mdc-chip-avatar{opacity:var(--mdc-chip-with-avatar-disabled-avatar-opacity)}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{opacity:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity)}.mdc-evolution-chip--disabled.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{opacity:var(--mdc-chip-with-icon-disabled-icon-opacity)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:var(--mat-chip-disabled-container-opacity)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-trailing-icon-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-disabled-trailing-icon-color, var(--mat-app-on-surface))}.mat-mdc-chip-remove{opacity:var(--mat-chip-trailing-action-opacity)}.mat-mdc-chip-remove:focus{opacity:var(--mat-chip-trailing-action-focus-opacity)}.mat-mdc-chip-remove::after{background-color:var(--mat-chip-trailing-action-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-chip-remove:hover::after{opacity:var(--mat-chip-trailing-action-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-chip-remove:focus::after{opacity:var(--mat-chip-trailing-action-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-chip-selected .mat-mdc-chip-remove::after,.mat-mdc-chip-highlighted .mat-mdc-chip-remove::after{background-color:var(--mat-chip-selected-trailing-action-state-layer-color, var(--mat-app-on-secondary-container))}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-chip-remove::before{margin:calc(var(--mat-mdc-focus-indicator-border-width, 3px)*-1);left:8px;right:8px}.mat-mdc-chip-remove::after{content:"";display:block;opacity:0;position:absolute;top:-3px;bottom:-3px;left:5px;right:5px;border-radius:50%;box-sizing:border-box;padding:12px;margin:-12px;background-clip:content-box}.mat-mdc-chip-remove .mat-icon{width:18px;height:18px;font-size:18px;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}.cdk-high-contrast-active .mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}.mat-mdc-chip-action:focus .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=t;return n})(),AA=class{constructor(t,r,e=!1){this.source=t,this.selected=r,this.isUserInput=e}},Hb=(()=>{let t=class t extends wl{constructor(){super(...arguments),this._defaultOptions=Rt(VC,{optional:!0}),this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListHideSingleSelectionIndicator=this._defaultOptions?.hide
29SingleSelectionIndicator??!1,this._selectable=!0,this._selected=!1,this.basicChipAttrName="mat-basic-chip-option",this.selectionChange=new J}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=e,this._changeDetectorRef.markForCheck()}get selected(){return this._selected}set selected(e){this._setSelectedState(e,!1,!0)}get ariaSelected(){return this.selectable?this.selected.toString():null}ngOnInit(){super.ngOnInit(),this.role="presentation"}select(){this._setSelectedState(!0,!1,!0)}deselect(){this._setSelectedState(!1,!1,!0)}selectViaInteraction(){this._setSelectedState(!0,!0,!0)}toggleSelected(e=!1){return this._setSelectedState(!this.selected,e,!0),this.selected}_handlePrimaryActionInteraction(){this.disabled||(this.focus(),this.selectable&&this.toggleSelected(!0))}_hasLeadingGraphic(){return this.leadingIcon?!0:!this._chipListHideSingleSelectionIndicator||this._chipListMultiple}_setSelectedState(e,i,o){e!==this.selected&&(this._selected=e,o&&this.selectionChange.emit({source:this,isUserInput:i,selected:this.selected}),this._changeDetectorRef.markForCheck())}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-basic-chip-option"],["","mat-basic-chip-option",""],["mat-chip-option"],["","mat-chip-option",""]],hostAttrs:[1,"mat-mdc-chip","mat-mdc-chip-option"],hostVars:37,hostBindings:function(i,o){i&2&&(lo("id",o.id),Je("tabindex",null)("aria-label",null)("aria-description",null)("role",o.role),Y("mdc-evolution-chip",!o._isBasicChip)("mdc-evolution-chip--filter",!o._isBasicChip)("mdc-evolution-chip--selectable",!o._isBasicChip)("mat-mdc-chip-selected",o.selected)("mat-mdc-chip-multiple",o._chipListMultiple)("mat-mdc-chip-disabled",o.disabled)("mat-mdc-chip-with-avatar",o.leadingIcon)("mdc-evolution-chip--disabled",o.disabled)("mdc-evolution-chip--selected",o.selected)("mdc-evolution-chip--selecting",!o._animationsDisabled)("mdc-evolution-chip--with-trailing-action",o._hasTrailingIcon())("mdc-evolution-chip--with-primary-icon",o.leadingIcon)("mdc-evolution-chip--with-primary-graphic",o._hasLeadingGraphic())("mdc-evolution-chip--with-avatar",o.leadingIcon)("mat-mdc-chip-highlighted",o.highlighted)("mat-mdc-chip-with-trailing-icon",o._hasTrailingIcon()))},inputs:{selectable:[2,"selectable","selectable",Re],selected:[2,"selected","selected",Re]},outputs:{selectionChange:"selectionChange"},standalone:!0,features:[ne([{provide:wl,useExisting:t},{provide:LC,useExisting:t}]),si,Ce,ot],ngContentSelectors:qG,decls:10,vars:8,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","","role","option",3,"_allowFocusWhenDisabled"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-mdc-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"],[1,"cdk-visually-hidden",3,"id"],[1,"mdc-evolution-chip__checkmark"],["viewBox","-2 -3 30 30","focusable","false","aria-hidden","true",1,"mdc-evolution-chip__checkmark-svg"],["fill","none","stroke","currentColor","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-evolution-chip__checkmark-path"]],template:function(i,o){i&1&&(Ct(HG),O(0,"span",0),d(1,"span",1)(2,"button",2),x(3,EZ,5,0,"span",3),d(4,"span",4),Fe(5),O(6,"span",5),p()()(),x(7,IZ,2,0,"span",6),d(8,"span",7),g(9),p()),i&2&&(l(2),m("_allowFocusWhenDisabled",!0),Je("aria-selected",o.ariaSelected)("aria-label",o.ariaLabel)("aria-describedby",o._ariaDescriptionId),l(),_t(o._hasLeadingGraphic()?3:-1),l(4),_t(o._hasTrailingIcon()?7:-1),l(),m("id",o._ariaDescriptionId),l(),z(o.ariaDescription))},dependencies:[Mf],styles:[WG],encapsulation:2,changeDetection:0});let n=t;return n})(),Ub=(()=>{let t=class t{constructor(e,i){this._elementRef=e,this._document=i}initialize(e){this.getNativeElement().focus(),this.setValue(e)}getNativeElement(){return this._elementRef.nativeElement}setValue(e){this.getNativeElement().textContent=e,this._moveCursorToEndOfInput()}getValue(){return this.getNativeElement().textContent||""}_moveCursorToEndOfInput(){let e=this._document.createRange();e.selectNodeContents(this.getNativeElement()),e.collapse(!1);let i=window.getSelection();i.removeAllRanges(),i.addRange(e)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Qi))},t.\u0275dir=_e({type:t,selectors:[["span","matChipEditInput",""]],hostAttrs:["role","textbox","tabindex","-1","contenteditable","true",1,"mat-chip-edit-input"],standalone:!0});let n=t;return n})(),Qo=(()=>{let t=class t extends wl{constructor(e,i,o,a,s,c,u,f){super(e,i,o,a,s,c,u),this.basicChipAttrName="mat-basic-chip-row",this._editStartPending=!1,this.editable=!1,this.edited=new J,this._isEditing=!1,this.role="row",this._onBlur.pipe(Be(this.destroyed)).subscribe(()=>{this._isEditing&&!this._editStartPending&&this._onEditFinish()})}_hasTrailingIcon(){return!this._isEditing&&super._hasTrailingIcon()}_handleFocus(){!this._isEditing&&!this.disabled&&this.focus()}_handleKeydown(e){e.keyCode===13&&!this.disabled?this._isEditing?(e.preventDefault(),this._onEditFinish()):this.editable&&this._startEditing(e):this._isEditing?e.stopPropagation():super._handleKeydown(e)}_handleDoubleclick(e){!this.disabled&&this.editable&&this._startEditing(e)}_startEditing(e){if(!this.primaryAction||this.removeIcon&&this._getSourceAction(e.target)===this.removeIcon)return;let i=this.value;this._isEditing=this._editStartPending=!0,Lo(()=>{this._getEditInput().initialize(i),this._editStartPending=!1},{injector:this._injector})}_onEditFinish(){this._isEditing=this._editStartPending=!1,this.edited.emit({chip:this,value:this._getEditInput().getValue()}),(this._document.activeElement===this._getEditInput().getNativeElement()||this._document.activeElement===this._document.body)&&this.primaryAction.focus()}_isRippleDisabled(){return super._isRippleDisabled()||this._isEditing}_getEditInput(){return this.contentEditInput||this.defaultEditInput}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(ge),h(Bt),h(Po),h(Qi),h(Er,8),h(om,8),ja("tabindex"))},t.\u0275cmp=L({type:t,selectors:[["mat-chip-row"],["","mat-chip-row",""],["mat-basic-chip-row"],["","mat-basic-chip-row",""]],contentQueries:function(i,o,a){if(i&1&&Zt(
29a,Ub,5),i&2){let s;Q(s=K())&&(o.contentEditInput=s.first)}},viewQuery:function(i,o){if(i&1&&ae(Ub,5),i&2){let a;Q(a=K())&&(o.defaultEditInput=a.first)}},hostAttrs:[1,"mat-mdc-chip","mat-mdc-chip-row","mdc-evolution-chip"],hostVars:27,hostBindings:function(i,o){i&1&&T("focus",function(s){return o._handleFocus(s)})("dblclick",function(s){return o._handleDoubleclick(s)}),i&2&&(lo("id",o.id),Je("tabindex",o.disabled?null:-1)("aria-label",null)("aria-description",null)("role",o.role),Y("mat-mdc-chip-with-avatar",o.leadingIcon)("mat-mdc-chip-disabled",o.disabled)("mat-mdc-chip-editing",o._isEditing)("mat-mdc-chip-editable",o.editable)("mdc-evolution-chip--disabled",o.disabled)("mdc-evolution-chip--with-trailing-action",o._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",o.leadingIcon)("mdc-evolution-chip--with-primary-icon",o.leadingIcon)("mdc-evolution-chip--with-avatar",o.leadingIcon)("mat-mdc-chip-highlighted",o.highlighted)("mat-mdc-chip-with-trailing-icon",o._hasTrailingIcon()))},inputs:{editable:"editable"},outputs:{edited:"edited"},standalone:!0,features:[ne([{provide:wl,useExisting:t},{provide:LC,useExisting:t}]),Ce,ot],ngContentSelectors:DZ,decls:10,vars:9,consts:[[1,"mat-mdc-chip-focus-overlay"],["role","gridcell","matChipAction","",1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary",3,"disabled"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],["aria-hidden","true",1,"mat-mdc-chip-primary-focus-indicator","mat-mdc-focus-indicator"],["role","gridcell",1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"],[1,"cdk-visually-hidden",3,"id"],["matChipEditInput",""]],template:function(i,o){i&1&&(Ct(kZ),x(0,MZ,1,0,"span",0),d(1,"span",1),x(2,AZ,2,0,"span",2),d(3,"span",3),x(4,RZ,2,1)(5,FZ,1,0),O(6,"span",4),p()(),x(7,NZ,2,0,"span",5),d(8,"span",6),g(9),p()),i&2&&(_t(o._isEditing?-1:0),l(),m("disabled",o.disabled),Je("aria-label",o.ariaLabel)("aria-describedby",o._ariaDescriptionId),l(),_t(o.leadingIcon?2:-1),l(2),_t(o._isEditing?4:5),l(3),_t(o._hasTrailingIcon()?7:-1),l(),m("id",o._ariaDescriptionId),l(),z(o.ariaDescription))},dependencies:[Mf,Ub],styles:[WG],encapsulation:2,changeDetection:0});let n=t;return n})(),Xc=(()=>{let t=class t{get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get chipRemovedChanges(){return this._getChipStream(e=>e.removed)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}get empty(){return!this._chips||this._chips.length===0}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}set role(e){this._explicitRole=e}get focused(){return this._hasFocusedChip()}constructor(e,i,o){this._elementRef=e,this._changeDetectorRef=i,this._dir=o,this._lastDestroyedFocusedChipIndex=null,this._destroyed=new Te,this._defaultRole="presentation",this._disabled=!1,this.tabIndex=0,this._explicitRole=null,this._chipActions=new Bs}ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips?.forEach(e=>{e._chipListDisabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){let e=this._elementRef.nativeElement.tabIndex;e!==-1&&(this._elementRef.nativeElement.tabIndex=-1,setTimeout(()=>this._elementRef.nativeElement.tabIndex=e))}_getChipStream(e){return this._chips.changes.pipe(on(null),ii(()=>Xt(...this._chips.map(e))))}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-mdc-chip"))return!0;i=i.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(on(this._chips)).subscribe(e=>{let i=[];e.forEach(o=>
29o._getActions().forEach(a=>i.push(a))),this._chipActions.reset(i),this._chipActions.notifyOnChanges()}),this._keyManager=new dc(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(Be(this._destroyed)).subscribe(({chip:e})=>{let i=e._getSourceAction(document.activeElement);i&&this._keyManager.updateActiveItem(i)}),this._dir?.change.pipe(Be(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return!e.isInteractive||e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(on(null),Be(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(Be(this._destroyed)).subscribe(e=>{let o=this._chips.toArray().indexOf(e.chip);this._isValidIndex(o)&&e.chip._hasFocus()&&(this._lastDestroyedFocusedChipIndex=o)})}_redirectDestroyedChipFocus(){if(this._lastDestroyedFocusedChipIndex!=null){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),i=this._chips.toArray()[e];i.disabled?this._chips.length===1?this.focus():this._keyManager.setPreviousItemActive():i.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(mr,8))},t.\u0275cmp=L({type:t,selectors:[["mat-chip-set"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,wl,5),i&2){let s;Q(s=K())&&(o._chips=s)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._handleKeydown(s)}),i&2&&Je("role",o.role)},inputs:{disabled:[2,"disabled","disabled",Re],role:"role",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Nr(e)]},standalone:!0,features:[si,ot],ngContentSelectors:OA,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(i,o){i&1&&(Ct(),d(0,"div",0),Fe(1),p())},styles:[".mat-mdc-chip-set{display:flex}.mat-mdc-chip-set:focus{outline:none}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%;margin-left:-8px;margin-right:0}.mat-mdc-chip-set .mdc-evolution-chip{margin:4px 0 4px 8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0;margin-right:-8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip{margin-left:0;margin-right:8px}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}.mat-mdc-chip-set-stacked .mdc-evolution-chip__graphic{flex-grow:0}.mat-mdc-chip-set-stacked .mdc-evolution-chip__action--primary{flex-basis:100%;justify-content:start}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0});let n=t;return n})(),OT=class{constructor(t,r){this.source=t,this.value=r}},QG={provide:ye,useExisting:he(()=>qb),multi:!0},qb=(()=>{let t=class t extends Xc{constructor(){super(...arguments),this._onTouched=()=>{},this._onChange=()=>{},this._defaultRole="listbox",this._defaultOptions=Rt(VC,{optional:!0}),this._multiple=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.compareWith=(e,i)=>e===i,this.required=!1,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.change=new J,this._chips=void 0}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._syncListboxProperties()}get selected(){let e=this._chips.toArray().filter(i=>i.selected);return this.multiple?e:e[0]}get selectable(){return this._selectable}set selectable(e){this._selectable=e,this._syncListboxProperties()}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncListboxProperties()}get chipSelectionChanges(){return this._getChipStream(e=>e.selectionChange)}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}ngAfterContentInit(){this._pendingInitialValue!==void 0&&Promise.resolve().then(()=>
29{this._setSelectionByValue(this._pendingInitialValue,!1),this._pendingInitialValue=void 0}),this._chips.changes.pipe(on(null),Be(this._destroyed)).subscribe(()=>{this._syncListboxProperties()}),this.chipBlurChanges.pipe(Be(this._destroyed)).subscribe(()=>this._blur()),this.chipSelectionChanges.pipe(Be(this._destroyed)).subscribe(e=>{this.multiple||this._chips.forEach(i=>{i!==e.source&&i._setSelectedState(!1,!1,!1)}),e.isUserInput&&this._propagateChanges()})}focus(){if(this.disabled)return;let e=this._getFirstSelectedChip();e&&!e.disabled?e.focus():this._chips.length>0?this._keyManager.setFirstItemActive():this._elementRef.nativeElement.focus()}writeValue(e){this._chips?this._setSelectionByValue(e,!1):e!=null&&(this._pendingInitialValue=e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_setSelectionByValue(e,i=!0){this._clearSelection(),Array.isArray(e)?e.forEach(o=>this._selectValue(o,i)):this._selectValue(e,i)}_blur(){this.disabled||setTimeout(()=>{this.focused||this._markAsTouched()})}_keydown(e){e.keyCode===9&&super._allowFocusEscape()}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck()}_propagateChanges(){let e=null;Array.isArray(this.selected)?e=this.selected.map(i=>i.value):e=this.selected?this.selected.value:void 0,this._value=e,this.change.emit(new OT(this,e)),this._onChange(e),this._changeDetectorRef.markForCheck()}_clearSelection(e){this._chips.forEach(i=>{i!==e&&i.deselect()})}_selectValue(e,i){let o=this._chips.find(a=>a.value!=null&&this.compareWith(a.value,e));return o&&(i?o.selectViaInteraction():o.select()),o}_syncListboxProperties(){this._chips&&Promise.resolve().then(()=>{this._chips.forEach(e=>{e._chipListMultiple=this.multiple,e.chipListSelectable=this._selectable,e._chipListHideSingleSelectionIndicator=this.hideSingleSelectionIndicator,e._changeDetectorRef.markForCheck()})})}_getFirstSelectedChip(){return Array.isArray(this.selected)?this.selected.length?this.selected[0]:void 0:this.selected}_skipPredicate(e){return!e.isInteractive}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-chip-listbox"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,Hb,5),i&2){let s;Q(s=K())&&(o._chips=s)}},hostAttrs:[1,"mdc-evolution-chip-set","mat-mdc-chip-listbox"],hostVars:11,hostBindings:function(i,o){i&1&&T("focus",function(){return o.focus()})("blur",function(){return o._blur()})("keydown",function(s){return o._keydown(s)}),i&2&&(lo("tabIndex",o.disabled||o.empty?-1:o.tabIndex),Je("role",o.role)("aria-describedby",o._ariaDescribedby||null)("aria-required",o.role?o.required:null)("aria-disabled",o.disabled.toString())("aria-multiselectable",o.multiple)("aria-orientation",o.ariaOrientation),Y("mat-mdc-chip-list-disabled",o.disabled)("mat-mdc-chip-list-required",o.required))},inputs:{multiple:[2,"multiple","multiple",Re],ariaOrientation:[0,"aria-orientation","ariaOrientation"],selectable:[2,"selectable","selectable",Re],compareWith:"compareWith",required:[2,"required","required",Re],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Re],value:"value"},outputs:{change:"change"},standalone:!0,features:[ne([QG]),si,Ce,ot],ngContentSelectors:OA,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(i,o){i&1&&(Ct(),d(0,"div",0),Fe(1),p())},styles:[YG],encapsulation:2,changeDetection:0});let n=t;return n})(),PT=class{constructor(t,r){this.source=t,this.value=r}},aa=(()=>{let t=class t extends Xc{get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}get id(){return this._chipInput.id}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this._chips||this._chips.length===0)}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput.focused||this._hasFocusedChip()}get required(){return this._required??this.ngControl?.control?.hasValidator(ke.required)??!1}set required(e){this._required=e,this.stateChanges.next()}get shouldLabelFloat(){return!this.empty||this.focused}get value(){return this._value}set value(e){this._value=e}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(e,i,o,a,s,c,u){super(e,i,o),this.ngControl=u,this.controlType="mat-chip-grid",this._defaultRole="grid",this._ariaDescribedbyIds=[],this._onTouched=()=>{},this._onChange=()=>{},this._value=[],this.change=new J,this.valueChange=new J,this._chips=void 0,this.stateChanges=new Te,this.ngControl&&(this.ngControl.valueAccessor=this),this._errorStateTracker=new Tb(c,u,s,a,this.stateChanges)}ngAfterContentInit(){this.chipBlurChanges.pipe(Be(this._destroyed)).subscribe(()=>{this._blur(),this.stateChanges.next()}),Xt(this.chipFocusChanges,this._chips.changes).pipe(Be(this._destroyed)).subscribe(()=>this.stateChanges.next())}ngAfterViewInit(){super.ngAfterViewInit(),this._chipInput}ngDoCheck(){this.ngControl&&this.updateErrorState()}ngOnDestroy(){super.ngOnDestroy(),this.stateChanges.complete()}registerInput(e){this._chipInput=e,this._chipInput.setDescribedByIds(this._ariaDescribedbyIds)}onContainerClick(e){!this.disabled&&!this._originatesFromChip(e)&&this.focus()}focus(){if(!(this.disabled||this._chipInput.focused)){if(!this._chips.length||this._chips.first.disabled)Promise.resolve().then(()=>this._chipInput.focus());else{let e=this._keyManager.activeItem;e?e.focus():this._keyManager.setFirstItemActive()}this.stateChanges.next()}}setDescribedByIds(e){this._ariaDescribedbyIds=e,this._chipInput?.setDescribedByIds(e)}writeValue(e){this._value=e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}updateErrorState(){this._errorStateTracker.updateErrorState()}_blur(){this.disabled||setTimeout(()=>{this.focused||(this._propagateChanges(),this._markAsTouched())})}_allowFocusEscape(){this._chipInput.focused||super._allowFocusEscape()}_handleKeydown(e){let i=e.keyCode,o=this._keyManager.activeItem;if(i===9)this._chipInput.focused&&po(e,"shiftKey")&&this._chips.length&&!this._chips.last.disabled?(e.preventDefault(),o?this._keyManager.setActiveItem(o):this._focusLastChip()):super._allowFocusEscape();else if(!this._chipInput.focused)if((i===38||i===40)&&o){let a=this._chipActions.filter(u=>u._isPrimary===o._isPrimary&&!this._skipPredicate(u)),s=a.indexOf(o),c=e.keyCode===38?-1:1;e.preventDefault(),s>-1&&this._isValidIndex(s+c)&&this._keyManager.setActiveItem(a[s+c])}else super._handleKeydown(e);this.stateChanges.next()}_focusLastChip(){this._chips.length&&this._chips.last.focus()}_propagateChanges(){let e=this._chips.length?this._chips.toArray().map(i=>i.value):[];this._value=e,this.change.emit(new PT(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(mr,8),h(Qa,8),h($e,8),h(Nn),h(Yd,10))},t.\u0275cmp=L({type:t,selectors:[["mat-chip-grid"]],contentQueries:function(i,o,a){if(i&1&&Zt(
29a,Qo,5),i&2){let s;Q(s=K())&&(o._chips=s)}},hostAttrs:[1,"mat-mdc-chip-set","mat-mdc-chip-grid","mdc-evolution-chip-set"],hostVars:10,hostBindings:function(i,o){i&1&&T("focus",function(){return o.focus()})("blur",function(){return o._blur()}),i&2&&(Je("role",o.role)("tabindex",o.disabled||o._chips&&o._chips.length===0?-1:o.tabIndex)("aria-disabled",o.disabled.toString())("aria-invalid",o.errorState),Y("mat-mdc-chip-list-disabled",o.disabled)("mat-mdc-chip-list-invalid",o.errorState)("mat-mdc-chip-list-required",o.required))},inputs:{disabled:[2,"disabled","disabled",Re],placeholder:"placeholder",required:[2,"required","required",Re],value:"value",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},standalone:!0,features:[ne([{provide:Rb,useExisting:t}]),si,Ce,ot],ngContentSelectors:OA,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(i,o){i&1&&(Ct(),d(0,"div",0),Fe(1),p())},styles:[YG],encapsulation:2,changeDetection:0});let n=t;return n})(),LZ=0,sa=(()=>{let t=class t{get chipGrid(){return this._chipGrid}set chipGrid(e){e&&(this._chipGrid=e,this._chipGrid.registerInput(this))}get disabled(){return this._disabled||this._chipGrid&&this._chipGrid.disabled}set disabled(e){this._disabled=e}get empty(){return!this.inputElement.value}constructor(e,i,o){this._elementRef=e,this.focused=!1,this.addOnBlur=!1,this.chipEnd=new J,this.placeholder="",this.id=`mat-mdc-chip-list-input-${LZ++}`,this._disabled=!1,this.inputElement=this._elementRef.nativeElement,this.separatorKeyCodes=i.separatorKeyCodes,o&&this.inputElement.classList.add("mat-mdc-form-field-input-control")}ngOnChanges(){this._chipGrid.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}_keydown(e){this.empty&&e.keyCode===8?(e.repeat||this._chipGrid._focusLastChip(),e.preventDefault()):this._emitChipEnd(e)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipGrid.focused||this._chipGrid._blur(),this._chipGrid.stateChanges.next()}_focus(){this.focused=!0,this._chipGrid.stateChanges.next()}_emitChipEnd(e){(!e||this._isSeparatorKey(e)&&!e.repeat)&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),e?.preventDefault())}_onInput(){this._chipGrid.stateChanges.next()}focus(){this.inputElement.focus()}clear(){this.inputElement.value=""}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}_isSeparatorKey(e){return!po(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(VC),h(sm,8))},t.\u0275dir=_e({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-mdc-chip-input","mat-mdc-input-element","mdc-text-field__input","mat-input-element"],hostVars:6,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._keydown(s)})("blur",function(){return o._blur()})("focus",function(){return o._focus()})("input",function(){return o._onInput()}),i&2&&(lo("id",o.id),Je("disabled",o.disabled||null)("placeholder",o.placeholder||null)("aria-invalid",o._chipGrid&&o._chipGrid.ngControl?o._chipGrid.ngControl.invalid:null)("aria-required",o._chipGrid&&o._chipGrid.required||null)("required",o._chipGrid&&o._chipGrid.required||null))},inputs:{chipGrid:[0,"matChipInputFor","chipGrid"],addOnBlur:[2,"matChipInputAddOnBlur","addOnBlur",Re],separatorKeyCodes:[0,"matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",disabled:[2,"disabled","disabled",Re]},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],standalone:!0,features:[si,lt]});let n=t;return n})();var Wb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,Ya,Mf,wl,hm,Ub,aa,sa,qb,Hb,oa,Qo,Xc,MA],exports:[Ot,wl,hm,Ub,aa,sa,qb,Hb,oa,Qo,Xc,MA]}),t.\u0275inj=Nt({providers:[Nn,{provide:VC,useValue:{separatorKeyCodes:[13]}}],imports:[Ot,Ya,Ot]});let n=t;return n})();var _z={};Ae(_z,{DateRange:()=>ya,DefaultMatCalendarRangeStrategy:()=>lz,MAT_DATEPICKER_SCROLL_STRATEGY:()=>WC,MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY:()=>pz,MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER:()=>mz,MAT_DATEPICKER_VALIDATORS:()=>gz,MAT_DATEPICKER_VALUE_ACCESSOR:()=>fz,MAT_DATE_RANGE_SELECTION_STRATEGY:()=>zC,MAT_RANGE_DATE_SELECTION_MODEL_FACTORY:()=>az,MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER:()=>sz,MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY:()=>oz,MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER:()=>KA,MatCalendar:()=>Zb,MatCalendarBody:()=>fm,MatCalendarCell:()=>Xb,MatCalendarHeader:()=>jC,MatDateRangeInput:()=>HA,MatDateRangePicker:()=>qA,MatDateSelectionModel:()=>gm,MatDatepicker:()=>$A,MatDatepickerActions:()=>QA,MatDatepickerApply:()=>WA,MatDatepickerCancel:()=>YA,MatDatepickerContent:()=>GC,MatDatepickerInput:()=>qC,MatDatepickerInputEvent:()=>Af,MatDatepickerIntl:()=>bm,MatDatepickerModule:()=>Jb,MatDatepickerToggle:()=>NT,MatDatepickerToggleIcon:()=>VT,MatEndDate:()=>BT,MatMonthView:()=>$C,MatMultiYearView:()=>UC,MatRangeDateSelectionModel:()=>rz,MatSingleDateSelectionModel:()=>nz,MatStartDate:()=>LT,MatYearView:()=>HC,matDatepickerAnimations:()=>zA,yearsPerPage:()=>Sl,yearsPerRow:()=>FT});y();var Gi={};Ae(Gi,{MAT_INPUT_VALUE_ACCESSOR:()=>Qb,MatError:()=>ni,MatFormField:()=>ze,MatHint:()=>to,MatInput:()=>at,MatInputModule:()=>Kb,MatLabel:()=>At,MatPrefix:()=>Kd,MatSuffix:()=>Yt,getMatInputUnsupportedTypeError:()=>BZ});y();y();var KG=ms({passive:!0}),PA=(()=>{let t=class t{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return Ls;let i=qc(e),o=this._monitoredElements.get(i);if(o)return o.subject;let a=new Te,s="cdk-text-field-autofilled",c=u=>{u.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(s)?(i.classList.add(s),this._ngZone.run(()=>a.next({target:u.target,isAutofilled:!0}))):u.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>a.next({target:u.target,isAutofilled:!1})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",c,KG),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:a,unlisten:()=>{i.removeEventListener("animationstart",c,KG)}}),a}stopMonitoring(e){let i=qc(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}
29ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}};t.\u0275fac=function(i){return new(i||t)(X(Ur),X(Bt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),XG=(()=>{let t=class t{constructor(e,i){this._elementRef=e,this._autofillMonitor=i,this.cdkAutofill=new J}ngOnInit(){this._autofillMonitor.monitor(this._elementRef).subscribe(e=>this.cdkAutofill.emit(e))}ngOnDestroy(){this._autofillMonitor.stopMonitoring(this._elementRef)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(PA))},t.\u0275dir=_e({type:t,selectors:[["","cdkAutofill",""]],outputs:{cdkAutofill:"cdkAutofill"},standalone:!0});let n=t;return n})(),Yb=(()=>{let t=class t{get minRows(){return this._minRows}set minRows(e){this._minRows=Ao(e),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(e){this._maxRows=Ao(e),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&((this._enabled=e)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(e){this._cachedPlaceholderHeight=void 0,e?this._textareaElement.setAttribute("placeholder",e):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}constructor(e,i,o,a){this._elementRef=e,this._platform=i,this._ngZone=o,this._destroyed=new Te,this._enabled=!0,this._previousMinRows=-1,this._isViewInited=!1,this._handleFocusEvent=s=>{this._hasFocus=s.type==="focus"},this._document=a,this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){let e=this.minRows&&this._cachedLineHeight?`${this.minRows*this._cachedLineHeight}px`:null;e&&(this._textareaElement.style.minHeight=e)}_setMaxHeight(){let e=this.maxRows&&this._cachedLineHeight?`${this.maxRows*this._cachedLineHeight}px`:null;e&&(this._textareaElement.style.maxHeight=e)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{let e=this._getWindow();Jn(e,"resize").pipe(rB(16),Be(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0)),this._textareaElement.addEventListener("focus",this._handleFocusEvent),this._textareaElement.addEventListener("blur",this._handleFocusEvent)}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._textareaElement.removeEventListener("focus",this._handleFocusEvent),this._textareaElement.removeEventListener("blur",this._handleFocusEvent),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let e=this._textareaElement.cloneNode(!1);e.rows=1,e.style.position="absolute",e.style.visibility="hidden",e.style.border="none",e.style.padding="0",e.style.height="",e.style.minHeight="",e.style.maxHeight="",e.style.overflow="hidden",this._textareaElement.parentNode.appendChild(e),this._cachedLineHeight=e.clientHeight,e.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){let e=this._textareaElement,i=e.style.marginBottom||"",o=this._platform.FIREFOX,a=o&&this._hasFocus,s=o?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";a&&(e.style.marginBottom=`${e.clientHeight}px`),e.classList.add(s);let c=e.scrollHeight-4;return e.classList.remove(s),a&&(e.style.marginBottom=i),c}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||this._cachedPlaceholderHeight!=null)return;if(!this.placeholder){this._cachedPlaceholderHeight=0;return}let e=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=e}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(e=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;let i=this._elementRef.nativeElement,o=i.value;if(!e&&this._minRows===this._previousMinRows&&o===this._previousValue)return;let a=this._measureScrollHeight(),s=Math.max(a,this._cachedPlaceholderHeight||0);i.style.height=`${s}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=o,this._previousMinRows=this._minRows}reset(){this._initialHeight!==void 0&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(e){let{selectionStart:i,selectionEnd:o}=e;
29!this._destroyed.isStopped&&this._hasFocus&&e.setSelectionRange(i,o)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ur),h(Bt),h(Qi,8))},t.\u0275dir=_e({type:t,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,o){i&1&&T("input",function(){return o._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",Re],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"],standalone:!0,features:[si]});let n=t;return n})(),RA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[XG,Yb],exports:[XG,Yb]}),t.\u0275inj=Nt({});let n=t;return n})();function BZ(n){return Error(`Input type "${n}" isn't supported by matInput.`)}var Qb=new tt("MAT_INPUT_VALUE_ACCESSOR"),jZ=["button","checkbox","file","hidden","image","radio","range","reset","submit"],GZ=0,at=(()=>{let t=class t{get disabled(){return this._disabled}set disabled(e){this._disabled=mt(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(ke.required)??!1}set required(e){this._required=mt(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&P2().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._ensureWheelDefaultBehavior()}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=mt(e)}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(e,i,o,a,s,c,u,f,_,I){this._elementRef=e,this._platform=i,this.ngControl=o,this._autofillMonitor=f,this._ngZone=_,this._formField=I,this._uid=`mat-input-${GZ++}`,this._webkitBlinkWheelListenerAttached=!1,this.focused=!1,this.stateChanges=new Te,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(H=>P2().has(H)),this._iOSKeyupListener=H=>{let q=H.target;!q.value&&q.selectionStart===0&&q.selectionEnd===0&&(q.setSelectionRange(1,1),q.setSelectionRange(0,0))},this._webkitBlinkWheelListener=()=>{};let S=this._elementRef.nativeElement,F=S.nodeName.toLowerCase();this._inputValueAccessor=u||S,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&_.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Tb(c,o,s,a,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=F==="select",this._isTextarea=F==="textarea",this._isInFormField=!!I,this._isNativeSelect&&(this.controlType=S.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener),this._webkitBlinkWheelListenerAttached&&this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){jZ.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_ensureWheelDefaultBehavior(){!this._webkitBlinkWheelListenerAttached&&this._type==="number"&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("wheel",this._webkitBlinkWheelListener)}),this._webkitBlinkWheelListenerAttached=!0),this._webkitBlinkWheelListenerAttached&&this._type!=="number"&&(this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener),this._webkitBlinkWheelListenerAttached=!0)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ur),h(Yd,10),h(Qa,8),h($e,8),h(Nn),h(Qb,10),h(PA),h(Bt),h(sm,8))},t.\u0275dir=_e({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(i,o){i&1&&T("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}
29),i&2&&(lo("id",o.id)("disabled",o.disabled)("required",o.required),Je("name",o.name||null)("readonly",o.readonly&&!o._isNativeSelect||null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),Y("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[ne([{provide:Rb,useExisting:t}]),lt]});let n=t;return n})(),Kb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,xC,at],exports:[at,xC,RA,Ot]}),t.\u0275inj=Nt({imports:[Ot,xC,xC,RA,Ot]});let n=t;return n})();var zZ=["mat-calendar-body",""];function $Z(n,t){return this._trackRow(t)}var tz=(n,t)=>t.id;function UZ(n,t){if(n&1&&(d(0,"tr",0)(1,"td",3),g(2),p()()),n&2){let r=b
29();l(),hi("padding-top",r._cellPadding)("padding-bottom",r._cellPadding),Je("colspan",r.numCols),l(),j(" ",r.label," ")}}function HZ(n,t){if(n&1&&(d(0,"td",3),g(1),p()),n&2){let r=b(2);hi("padding-top",r._cellPadding)("padding-bottom",r._cellPadding),Je("colspan",r._firstRowOffset),l(),j(" ",r._firstRowOffset>=r.labelMinRequiredCells?r.label:""," ")}}function qZ(n,t){if(n&1){let r=B();d(0,"td",6)(1,"button",7),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a._cellClicked(o,i))})("focus",function(i){let o=D(r).$implicit,a=b(2);return M(a._emitActiveDateChange(o,i))}),d(2,"span",8),g(3),p(),O(4,"span",9),p()()}if(n&2){let r=t.$implicit,e=t.$index,i=b().$index,o=b();hi("width",o._cellWidth)("padding-top",o._cellPadding)("padding-bottom",o._cellPadding),Je("data-mat-row",i)("data-mat-col",e),l(),Y("mat-calendar-body-disabled",!r.enabled)("mat-calendar-body-active",o._isActiveCell(i,e))("mat-calendar-body-range-start",o._isRangeStart(r.compareValue))("mat-calendar-body-range-end",o._isRangeEnd(r.compareValue))("mat-calendar-body-in-range",o._isInRange(r.compareValue))("mat-calendar-body-comparison-bridge-start",o._isComparisonBridgeStart(r.compareValue,i,e))("mat-calendar-body-comparison-bridge-end",o._isComparisonBridgeEnd(r.compareValue,i,e))("mat-calendar-body-comparison-start",o._isComparisonStart(r.compareValue))("mat-calendar-body-comparison-end",o._isComparisonEnd(r.compareValue))("mat-calendar-body-in-comparison-range",o._isInComparisonRange(r.compareValue))("mat-calendar-body-preview-start",o._isPreviewStart(r.compareValue))("mat-calendar-body-preview-end",o._isPreviewEnd(r.compareValue))("mat-calendar-body-in-preview",o._isInPreview(r.compareValue)),m("ngClass",r.cssClasses)("tabindex",o._isActiveCell(i,e)?0:-1),Je("aria-label",r.ariaLabel)("aria-disabled",!r.enabled||null)("aria-pressed",o._isSelected(r.compareValue))("aria-current",o.todayValue===r.compareValue?"date":null)("aria-describedby",o._getDescribedby(r.compareValue)),l(),Y("mat-calendar-body-selected",o._isSelected(r.compareValue))("mat-calendar-body-comparison-identical",o._isComparisonIdentical(r.compareValue))("mat-calendar-body-today",o.todayValue===r.compareValue),l(),j(" ",r.displayValue," ")}}function WZ(n,t){if(n&1&&(d(0,"tr",1),x(1,HZ,2,6,"td",4),Ir(2,qZ,5,48,"td",5,tz),p()),n&2){let r=t.$implicit,e=t.$index,i=b();l(),_t(e===0&&i._firstRowOffset?1:-1),l(),kr(r)}}function YZ(n,t){if(n&1&&(d(0,"th",2)(1,"span",6),g(2),p(),d(3,"span",3),g(4),p()()),n&2){let r=t.$implicit;l(2),z(r.long),l(2),z(r.narrow)}}var iz=["*"];function QZ(n,t){}function KZ(n,t){if(n&1){let r=B();d(0,"mat-month-view",4),bi("activeDateChange",function(i){D(r);let o=b();return gi(o.activeDate,i)||(o.activeDate=i),M(i)}),T("_userSelection",function(i){D(r);let o=b();return M(o._dateSelected(i))})("dragStarted",function(i){D(r);let o=b();return M(o._dragStarted(i))})("dragEnded",function(i){D(r);let o=b();return M(o._dragEnded(i))}),p()}if(n&2){let r=b();fi("activeDate",r.activeDate),m("selected",r.selected)("dateFilter",r.dateFilter)("maxDate",r.maxDate)("minDate",r.minDate)("dateClass",r.dateClass)("comparisonStart",r.comparisonStart)("comparisonEnd",r.comparisonEnd)("startDateAccessibleName",r.startDateAccessibleName)("endDateAccessibleName",r.endDateAccessibleName)("activeDrag",r._activeDrag)}}function XZ(n,t){if(n&1){let r=B();d(0,"mat-year-view",5),bi("activeDateChange",function(i){D(r);let o=b();return gi(o.activeDate,i)||(o.activeDate=i),M(i)}),T("monthSelected",function(i){D(r);let o=b();return M(o._monthSelectedInYearView(i))})("selectedChange",function(i){D(r);let o=b();return M(o._goToDateInView(i,"month"))}),p()}if(n&2){let r=b();fi("activeDate",r.activeDate),m("selected",r.selected)("dateFilter",r.dateFilter)("maxDate",r.maxDate)("minDate",r.minDate)("dateClass",r.dateClass)}}function ZZ(n,t){if(n&1){let r=B();d(0,"mat-multi-year-view",6),bi("activeDateChange",function(i){D(r);let o=b();return gi(o.activeDate,i)||(o.activeDate=i),M(i)}),T("yearSelected",function(i){D(r);let o=b();return M(o._yearSelectedInMultiYearView(i))})("selectedChange",function(i){D(r);let o=b();return M(o._goToDateInView(i,"year"))}),p()}
29if(n&2){let r=b();fi("activeDate",r.activeDate),m("selected",r.selected)("dateFilter",r.dateFilter)("maxDate",r.maxDate)("minDate",r.minDate)("dateClass",r.dateClass)}}function JZ(n,t){}var eJ=["button"],tJ=[[["","matDatepickerToggleIcon",""]]],iJ=["[matDatepickerToggleIcon]"];function nJ(n,t){n&1&&(ar(),d(0,"svg",2),O(1,"path",3),p())}var rJ=[[["input","matStartDate",""]],[["input","matEndDate",""]]],oJ=["input[matStartDate]","input[matEndDate]"];function aJ(n,t){n&1&&(d(0,"div",0),Fe(1),p())}var bm=(()=>{let t=class t{constructor(){this.changes=new Te,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(e,i){return`${e} \u2013 ${i}`}formatYearRangeLabel(e,i){return`${e} to ${i}`}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),sJ=0,Xb=class{constructor(t,r,e,i,o={},a=t,s){this.value=t,this.displayValue=r,this.ariaLabel=e,this.enabled=i,this.cssClasses=o,this.compareValue=a,this.rawValue=s,this.id=sJ++}},lJ=1,ZG=ms({passive:!1,capture:!0}),Bu=ms({passive:!0,capture:!0}),RT=ms({passive:!0}),fm=(()=>{let t=class t{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(e,i){this._elementRef=e,this._ngZone=i,this._platform=Rt(Ur),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new J,this.previewChange=new J,this.activeDateChange=new J,this.dragStarted=new J,this.dragEnded=new J,this._didDragSinceMouseDown=!1,this._injector=Rt(Mn),this._trackRow=o=>o,this._enterHandler=o=>{if(this._skipNextFocus&&o.type==="focus"){this._skipNextFocus=!1;return}if(o.target&&this.isRange){let a=this._getCellFromElement(o.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:o}))}},this._touchmoveHandler=o=>{if(!this.isRange)return;let a=JG(o),s=a?this._getCellFromElement(a):null;a!==o.target&&(this._didDragSinceMouseDown=!0),VA(o.target)&&o.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:s?.enabled?s:null,event:o}))},this._leaveHandler=o=>{this.previewEnd!==null&&this.isRange&&(o.type!=="blur"&&(this._didDragSinceMouseDown=!0),o.target&&this._getCellFromElement(o.target)&&!(o.relatedTarget&&this._getCellFromElement(o.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:o})))},this._mousedownHandler=o=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=o.target&&this._getCellFromElement(o.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:o})})},this._mouseupHandler=o=>{if(!this.isRange)return;let a=VA(o.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:o})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let s=this._getCellFromElement(a);this.dragEnded.emit({value:s?.rawValue??null,event:o})})},this._touchendHandler=o=>{let a=JG(o);a&&this._mouseupHandler({target:a})},this._id=`mat-calendar-body-${lJ++}`,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,i.runOutsideAngular(()=>{let o=e.nativeElement;o.addEventListener("touchmove",this._touchmoveHandler,ZG),o.addEventListener("mouseenter",this._enterHandler,Bu),o.addEventListener("focus",this._enterHandler,Bu),o.addEventListener("mouseleave",this._leaveHandler,Bu),o.addEventListener("blur",this._leaveHandler,Bu),o.addEventListener("mousedown",this._mousedownHandler,RT),o.addEventListener("touchstart",this._mousedownHandler,RT),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}
29_cellClicked(e,i){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:i})}_emitActiveDateChange(e,i){e.enabled&&this.activeDateChange.emit({value:e.value,event:i})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let i=e.numCols,{rows:o,numCols:a}=this;(e.rows||i)&&(this._firstRowOffset=o&&o.length&&o[0].length?a-o[0].length:0),(e.cellAspectRatio||i||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/a}%`),(i||!this._cellWidth)&&(this._cellWidth=`${100/a}%`)}ngOnDestroy(){let e=this._elementRef.nativeElement;e.removeEventListener("touchmove",this._touchmoveHandler,ZG),e.removeEventListener("mouseenter",this._enterHandler,Bu),e.removeEventListener("focus",this._enterHandler,Bu),e.removeEventListener("mouseleave",this._leaveHandler,Bu),e.removeEventListener("blur",this._leaveHandler,Bu),e.removeEventListener("mousedown",this._mousedownHandler,RT),e.removeEventListener("touchstart",this._mousedownHandler,RT),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(e,i){let o=e*this.numCols+i;return e&&(o-=this._firstRowOffset),o==this.activeCell}_focusActiveCell(e=!0){Lo(()=>{setTimeout(()=>{let i=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");i&&(e||(this._skipNextFocus=!0),i.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return LA(e,this.startValue,this.endValue)}_isRangeEnd(e){return BA(e,this.startValue,this.endValue)}_isInRange(e){return jA(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return LA(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,i,o){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let a=this.rows[i][o-1];if(!a){let s=this.rows[i-1];a=s&&s[s.length-1]}return a&&!this._isRangeEnd(a.compareValue)}_isComparisonBridgeEnd(e,i,o){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let a=this.rows[i][o+1];if(!a){let s=this.rows[i+1];a=s&&s[0]}return a&&!this._isRangeStart(a.compareValue)}_isComparisonEnd(e){return BA(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return jA(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return LA(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return BA(e,this.previewStart,this.previewEnd)}_isInPreview(e){return jA(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){return this.isRange?this.startValue===e&&this.endValue===e?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===e?this._startDateLabelId:this.endValue===e?this._endDateLabelId:null:null}_getCellFromElement(e){let i=VA(e);if(i){let o=i.getAttribute("data-mat-row"),a=i.getAttribute("data-mat-col");if(o&&a)return this.rows[parseInt(o)][parseInt(a)]}return null}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],standalone:!0,features:[lt,ot],attrs:zZ,decls:7,vars:5,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(i,o){i&1&&(x(0,UZ,3,6,"tr",0),Ir(1,WZ,4,1,"tr",1,$Z,!0),d(3,"span",2),g(4),p(),d(5,"span",2),g(6),p()),i&2&&(_t(o._firstRowOffset<o.labelMinRequiredCells?0:-1),l(),kr(o.rows),l(2),m("id",o._startDateLabelId),l(),j(" ",o.startDateAccessibleName,`
30`),l(),m("id",o._endDateLabelId),l(),j(" ",o.endDateAccessibleName,`
31`))},dependencies:[ac],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-outline-color, var(--mat-app-primary))}.mat-calendar-body-label{height:0;line-height:0;text-align:start;padding-left:4.7142857143%;padding-right:4.7142857143%;font-size:var(--mat-datepicker-calendar-body-label-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-datepicker-calendar-body-label-text-weight, var(--mat-app-title-small-weight));color:var(--mat-datepicker-calendar-body-label-text-color, var(--mat-app-on-surface))}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-app-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-app-body-medium-size))}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}
31.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview{color:var(--mat-datepicker-calendar-date-preview-state-outline-color, var(--mat-app-primary))}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--mat-datepicker-calendar-date-disabled-state-text-color)}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-disabled-state-outline-color)}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px;color:var(--mat-datepicker-calendar-date-text-color, var(--mat-app-on-surface));border-color:var(--mat-datepicker-calendar-date-outline-color)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-focus-state-background-color)}@media(hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-hover-state-background-color)}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color, var(--mat-app-primary));color:var(--mat-datepicker-calendar-date-selected-state-text-color, var(--mat-app-on-primary))}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color)}.mat-calendar-body-selected.mat-calendar-body-today{box-shadow:inset 0 0 0 1px var(--mat-datepicker-calendar-date-today-selected-state-outline-color, var(--mat-app-primary))}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-app-primary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container))}.mat-calendar-body-comparison-bridge-start::before,[dir=rtl] .mat-calendar-body-comparison-bridge-end::before{background:linear-gradient(to right, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-app-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container)) 50%)}.mat-calendar-body-comparison-bridge-end::before,[dir=rtl] .mat-calendar-body-comparison-bridge-start::before{background:linear-gradient(to left, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-app-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container)) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range::after{background:var(--mat-datepicker-calendar-date-in-overlap-range-state-background-color, var(--mat-app-secondary-container))}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:var(--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color, var(--mat-app-secondary))}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}
31.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}'],encapsulation:2,changeDetection:0});let n=t;return n})();function NA(n){return n?.nodeName==="TD"}function VA(n){let t;return NA(n)?t=n:NA(n.parentNode)?t=n.parentNode:NA(n.parentNode?.parentNode)&&(t=n.parentNode.parentNode),t?.getAttribute("data-mat-row")!=null?t:null}function LA(n,t,r){return r!==null&&t!==r&&n<r&&n===t}function BA(n,t,r){return t!==null&&t!==r&&n>=t&&n===r}function jA(n,t,r,e){return e&&t!==null&&r!==null&&t!==r&&n>=t&&n<=r}function JG(n){let t=n.changedTouches[0];return document.elementFromPoint(t.clientX,t.clientY)}var ya=class{constructor(t,r){this.start=t,this.end=r}},gm=(()=>{let t=class t{constructor(e,i){this.selection=e,this._adapter=i,this._selectionChanged=new Te,this.selectionChanged=this._selectionChanged,this.selection=e}updateSelection(e,i){let o=this.selection;this.selection=e,this._selectionChanged.next({selection:e,source:i,oldValue:o})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)}};t.\u0275fac=function(i){ab()},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),nz=(()=>{let t=class t extends gm{constructor(e){super(null,e)}add(e){super.updateSelection(e,this)}isValid(){return this.selection!=null&&this._isValidDateInstance(this.selection)}isComplete(){return this.selection!=null}clone(){let e=new t(this._adapter);return e.updateSelection(this.selection,this),e}};t.\u0275fac=function(i){return new(i||t)(X(To))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),rz=(()=>{let t=class t extends gm{constructor(e){super(new ya(null,null),e)}add(e){let{start:i,end:o}=this.selection;i==null?i=e:o==null?o=e:(i=e,o=null),super.updateSelection(new ya(i,o),this)}isValid(){let{start:e,end:i}=this.selection;return e==null&&i==null?!0:e!=null&&i!=null?this._isValidDateInstance(e)&&this._isValidDateInstance(i)&&this._adapter.compareDate(e,i)<=0:(e==null||this._isValidDateInstance(e))&&(i==null||this._isValidDateInstance(i))}isComplete(){return this.selection.start!=null&&this.selection.end!=null}clone(){let e=new t(this._adapter);return e.updateSelection(this.selection,this),e}};t.\u0275fac=function(i){return new(i||t)(X(To))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();function oz(n,t){return n||new nz(t)}var KA={provide:gm,deps:[[new Gd,new zd,gm],To],useFactory:oz};function az(n,t){return n||new rz(t)}var sz={provide:gm,deps:[[new Gd,new zd,gm],To],useFactory:az},zC=new tt("MAT_DATE_RANGE_SELECTION_STRATEGY"),lz=(()=>{let t=class t{constructor(e){this._dateAdapter=e}selectionFinished(e,i){let{start:o,end:a}=i;return o==null?o=e:a==null&&e&&this._dateAdapter.compareDate(e,o)>=0?a=e:(o=e,a=null),new ya(o,a)}createPreview(e,i){let o=null,a=null;return i.start&&!i.end&&e&&(o=i.start,a=e),new ya(o,a)}createDrag(e,i,o){let a=i.start,s=i.end;if(!a||!s)return null;let c=this._dateAdapter,u=c.compareDate(a,s)!==0,f=c.getYear(o)-c.getYear(e),_=c.getMonth(o)-c.getMonth(e),I=c.getDate(o)-c.getDate(e);return u&&c.sameDate(e,i.start)?(a=o,c.compareDate(o,s)>0&&(s=c.addCalendarYears(s,f),s=c.addCalendarMonths(s,_),s=c.addCalendarDays(s,I))):u&&c.sameDate(e,i.end)?(s=o,c.compareDate(o,a)<0&&(a=c.addCalendarYears(a,f),a=c.addCalendarMonths(a,_),a=c.addCalendarDays(a,I))):(a=c.addCalendarYears(a,f),a=c.addCalendarMonths(a,_),a=c.addCalendarDays(a,I),s=c.addCalendarYears(s,f),s=c.addCalendarMonths(s,_),s=c.addCalendarDays(s,I)),new ya(a,s)}};t.\u0275fac=function(i){return new(i||t)(X(To))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();function cJ(n,t){return n||new lz(t)}var dJ={provide:zC,deps:[[new Gd,new zd,zC],To],useFactory:cJ},GA=7,pJ=0,$C=(()=>{let t=class t{get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate,o=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(o,this.minDate,this.maxDate),this._hasSameMonthAndYear(i,this._activeDate)||this._init()}get selected(){return this._selected}set selected(e){e instanceof ya?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setRanges(this._selected)}
31get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,i,o,a,s){this._changeDetectorRef=e,this._dateFormats=i,this._dateAdapter=o,this._dir=a,this._rangeStrategy=s,this._rerenderSubscription=ln.EMPTY,this.activeDrag=null,this.selectedChange=new J,this._userSelection=new J,this.dragStarted=new J,this.dragEnded=new J,this.activeDateChange=new J,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(on(null)).subscribe(()=>this._init())}ngOnChanges(e){let i=e.comparisonStart||e.comparisonEnd;i&&!i.firstChange&&this._setRanges(this.selected),e.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(e){let i=e.value,o=this._getDateFromDayOfMonth(i),a,s;this._selected instanceof ya?(a=this._getDateInCurrentMonth(this._selected.start),s=this._getDateInCurrentMonth(this._selected.end)):a=s=this._getDateInCurrentMonth(this._selected),(a!==i||s!==i)&&this.selectedChange.emit(o),this._userSelection.emit({value:o,event:e.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(e){let i=e.value,o=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(i),this._dateAdapter.compareDate(o,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(e){let i=this._activeDate,o=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,o?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,o?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:this._selectionKeyPressed=!0,this._canSelect(this._activeDate)&&e.preventDefault();return;case 27:this._previewEnd!=null&&!po(e)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:e}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:e})),e.preventDefault(),e.stopPropagation());return;default:return}this._dateAdapter.compareDate(i,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(GA+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%GA,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(e){this._matCalendarBody._focusActiveCell(e)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:e,value:i}){if(this._rangeStrategy){let o=i?i.rawValue:null,a=this._rangeStrategy.createPreview(o,this.selected,e);if(this._previewStart=this._getCellCompareValue(a.start),this._previewEnd=this._getCellCompareValue(a.end),this.activeDrag&&o){let s=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,o,e);
31s&&(this._previewStart=this._getCellCompareValue(s.start),this._previewEnd=this._getCellCompareValue(s.end))}this._changeDetectorRef.detectChanges()}}_dragEnded(e){if(this.activeDrag)if(e.value){let i=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,e.value,e.event);this.dragEnded.emit({value:i??null,event:e.event})}else this.dragEnded.emit({value:null,event:e.event})}_getDateFromDayOfMonth(e){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),e)}_initWeekdays(){let e=this._dateAdapter.getFirstDayOfWeek(),i=this._dateAdapter.getDayOfWeekNames("narrow"),a=this._dateAdapter.getDayOfWeekNames("long").map((s,c)=>({long:s,narrow:i[c],id:pJ++}));this._weekdays=a.slice(e).concat(a.slice(0,e))}_createWeekCells(){let e=this._dateAdapter.getNumDaysInMonth(this.activeDate),i=this._dateAdapter.getDateNames();this._weeks=[[]];for(let o=0,a=this._firstWeekOffset;o<e;o++,a++){a==GA&&(this._weeks.push([]),a=0);let s=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),o+1),c=this._shouldEnableDate(s),u=this._dateAdapter.format(s,this._dateFormats.display.dateA11yLabel),f=this.dateClass?this.dateClass(s,"month"):void 0;this._weeks[this._weeks.length-1].push(new Xb(o+1,i[o],u,c,f,this._getCellCompareValue(s),s))}}_shouldEnableDate(e){return!!e&&(!this.minDate||this._dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(e))}_getDateInCurrentMonth(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null}_hasSameMonthAndYear(e,i){return!!(e&&i&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(i)&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(i))}_getCellCompareValue(e){if(e){let i=this._dateAdapter.getYear(e),o=this._dateAdapter.getMonth(e),a=this._dateAdapter.getDate(e);return new Date(i,o,a).getTime()}return null}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setRanges(e){e instanceof ya?(this._rangeStart=this._getCellCompareValue(e.start),this._rangeEnd=this._getCellCompareValue(e.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(e),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}_canSelect(e){return!this.dateFilter||this.dateFilter(e)}_clearPreview(){this._previewStart=this._previewEnd=null}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(Wd,8),h(To,8),h(mr,8),h(zC,8))},t.\u0275cmp=L({type:t,selectors:[["mat-month-view"]],viewQuery:function(i,o){if(i&1&&ae(fm,5),i&2){let a;Q(a=K())&&(o._matCalendarBody=a.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],standalone:!0,features:[lt,ot],decls:8,vars:14,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col"],["aria-hidden","true"],["colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown","label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName"],[1,"cdk-visually-hidden"]],template:function(i,o){i&1&&(d(0,"table",0)(1,"thead",1)(2,"tr"),Ir(3,YZ,5,2,"th",2,tz),p(),d(5,"tr",3),O(6,"th",4),p()(),d(7,"tbody",5),T("selectedValueChange",function(s){return o._dateSelected(s)})("activeDateChange",function(s){return o._updateActiveDate(s)})("previewChange",function(s){return o._previewChanged(s)})("dragStarted",function(s){return o.dragStarted.emit(s)})("dragEnded",function(s){return o._dragEnded(s)})("keyup",function(s){return o._handleCalendarBodyKeyup(s)})("keydown",function(s){return o._handleCalendarBodyKeydown(s)}),p()()),i&2&&(l(3),kr(o._weekdays),l(4),m("label",o._monthLabel)("rows",o._weeks)("todayValue",o._todayDate)("startValue",o._rangeStart)("endValue",o._rangeEnd)("comparisonStart",o._comparisonRangeStart)("comparisonEnd",o._comparisonRangeEnd)("previewStart",o._previewStart)("previewEnd",o._previewEnd)("isRange",o._isRange)("labelMinRequiredCells",3)("activeCell",o._dateAdapter.getDate(o.activeDate)-1)("startDateAccessibleName",o.startDateAccessibleName)("endDateAccessibleName",o.endDateAccessibleName))},dependencies:[fm],encapsulation:2,changeDetection:0});let n=t;return n})(),Sl=24,FT=4,UC=(()=>{let t=class t{get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate,o=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(o,this.minDate,this.maxDate),cz(this._dateAdapter,i,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(e){e instanceof ya?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedYear(e)}
31get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,i,o){this._changeDetectorRef=e,this._dateAdapter=i,this._dir=o,this._rerenderSubscription=ln.EMPTY,this.selectedChange=new J,this.yearSelected=new J,this.activeDateChange=new J,this._dateAdapter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(on(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());let i=this._dateAdapter.getYear(this._activeDate)-BC(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let o=0,a=[];o<Sl;o++)a.push(i+o),a.length==FT&&(this._years.push(a.map(s=>this._createCellForYear(s))),a=[]);this._changeDetectorRef.markForCheck()}_yearSelected(e){let i=e.value,o=this._dateAdapter.createDate(i,0,1),a=this._getDateFromYear(i);this.yearSelected.emit(o),this.selectedChange.emit(a)}_updateActiveDate(e){let i=e.value,o=this._activeDate;this.activeDate=this._getDateFromYear(i),this._dateAdapter.compareDate(o,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let i=this._activeDate,o=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,o?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,o?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-FT);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,FT);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-BC(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,Sl-BC(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-Sl*10:-Sl);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?Sl*10:Sl);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(i,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_getActiveCell(){return BC(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(e){let i=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));return this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),o))}_createCellForYear(e){let i=this._dateAdapter.createDate(e,0,1),o=this._dateAdapter.getYearName(i),a=this.dateClass?this.dateClass(i,"multi-year"):void 0;return new Xb(e,o,o,this._shouldEnableYear(e),a)}_shouldEnableYear(e){if(e==null||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;let i=this._dateAdapter.createDate(e,0,1);for(let o=i;this._dateAdapter.getYear(o)==e;o=this._dateAdapter.addCalendarDays(o,1))if(this.dateFilter(o))return!0;return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedYear(e){if(this._selectedYear=null,e instanceof ya){let i=e.start||e.end;i&&(this._selectedYear=this._dateAdapter.getYear(i))}else e&&(this._selectedYear=this._dateAdapter.getYear(e))}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(To,8),h(mr,8))},t.\u0275cmp=L({type:t,selectors:[["mat-multi-year-view"]],viewQuery:function(i,o){if(i&1&&ae(fm,5),i&2){let a;Q(a=K())&&(o._matCalendarBody=a.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],standalone:!0,features:[ot],decls:5,vars:7,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell"]],template:function(i,o){i&1&&(d(0,"table",0)(1,"thead",1)(2,"tr"),O(3,"th",2),p()(),d(4,"tbody",3),T("selectedValueChange",function(s){return o._yearSelected(s)})("activeDateChange",function(s){return o._updateActiveDate(s)})("keyup",function(s){return o._handleCalendarBodyKeyup(s)})("keydown",function(s){return o._handleCalendarBodyKeydown(s)}),p()()),i&2&&(l(4),m("rows",o._years)("todayValue",o._todayYear)("startValue",o._selectedYear)("endValue",o._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",o._getActiveCell()))},dependencies:[fm],encapsulation:2,changeDetection:0});let n=t;return n})();function cz(n,t,r,e,i){let o=n.getYear(t),a=n.getYear(r),s=dz(n,e,i);return Math.floor((o-s)/Sl)===Math.floor((a-s)/Sl)}function BC(n,t,r,e){let i=n.getYear(t);return mJ(i-dz(n,r,e),Sl)}function dz(n,t,r){let e=0;return r?e=n.getYear(r)-Sl+1:t&&(e=n.getYear(t)),e}function mJ(n,t){return(n%t+t)%t}var HC=(()=>{let t=class t{get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate,o=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(o,this.minDate,this.maxDate),this._dateAdapter.getYear(i)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(e){e instanceof ya?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedMonth(e)}
31get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,i,o,a){this._changeDetectorRef=e,this._dateFormats=i,this._dateAdapter=o,this._dir=a,this._rerenderSubscription=ln.EMPTY,this.selectedChange=new J,this.monthSelected=new J,this.activeDateChange=new J,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(on(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(e){let i=e.value,o=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),i,1);this.monthSelected.emit(o);let a=this._getDateFromMonth(i);this.selectedChange.emit(a)}_updateActiveDate(e){let i=e.value,o=this._activeDate;this.activeDate=this._getDateFromMonth(i),this._dateAdapter.compareDate(o,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let i=this._activeDate,o=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,o?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,o?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(i,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(i=>i.map(o=>this._createCellForMonth(o,e[o]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null}_getDateFromMonth(e){let i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),o=this._dateAdapter.getNumDaysInMonth(i);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),o))}_createCellForMonth(e,i){let o=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),a=this._dateAdapter.format(o,this._dateFormats.display.monthYearA11yLabel),s=this.dateClass?this.dateClass(o,"year"):void 0;return new Xb(e,i.toLocaleUpperCase(),a,this._shouldEnableMonth(e),s)}_shouldEnableMonth(e){let i=this._dateAdapter.getYear(this.activeDate);if(e==null||this._isYearAndMonthAfterMaxDate(i,e)||this._isYearAndMonthBeforeMinDate(i,e))return!1;if(!this.dateFilter)return!0;let o=this._dateAdapter.createDate(i,e,1);for(let a=o;this._dateAdapter.getMonth(a)==e;a=this._dateAdapter.addCalendarDays(a,1))if(this.dateFilter(a))return!0;return!1}_isYearAndMonthAfterMaxDate(e,i){if(this.maxDate){let o=this._dateAdapter.getYear(this.maxDate),a=this._dateAdapter.getMonth(this.maxDate);return e>o||e===o&&i>a}return!1}_isYearAndMonthBeforeMinDate(e,i){if(this.minDate){let o=this._dateAdapter.getYear(this.minDate),a=this._dateAdapter.getMonth(this.minDate);return e<o||e===o&&i<a}return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedMonth(e){e instanceof ya?this._selectedMonth=this._getMonthInCurrentYear(e.start)||this._getMonthInCurrentYear(e.end):this._selectedMonth=this._getMonthInCurrentYear(e)}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(Wd,8),h(To,8),h(mr,8))},t.\u0275cmp=L({type:t,selectors:[["mat-year-view"]],viewQuery:function(i,o){if(i&1&&ae(fm,5),i&2){let a;Q(a=K())&&(o._matCalendarBody=a.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],standalone:!0,features:[ot],decls:5,vars:9,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell"]],template:function(i,o){i&1&&(d(0,"table",0)(1,"thead",1)(2,"tr"),O(3,"th",2),p()(),d(4,"tbody",3),T("selectedValueChange",function(s){return o._monthSelected(s)})("activeDateChange",function(s){return o._updateActiveDate(s)})("keyup",function(s){return o._handleCalendarBodyKeyup(s)})("keydown",function(s){return o._handleCalendarBodyKeydown(s)}),p()()),i&2&&(l(4),m("label",o._yearLabel)("rows",o._months)("todayValue",o._todayMonth)("startValue",o._selectedMonth)("endValue",o._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",o._dateAdapter.getMonth(o.activeDate)))},dependencies:[fm],encapsulation:2,changeDetection:0});let n=t;return n})(),uJ=1,jC=(()=>{let t=class t{constructor(e,i,o,a,s){this._intl=e,this.calendar=i,this._dateAdapter=o,this._dateFormats=a,this._id=`mat-calendar-header-${uJ++}`,this._periodButtonLabelId=`${this._id}-period-label`,this.calendar.stateChanges.subscribe(()=>s.markForCheck())}get periodButtonText(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRange(...this._formatMinAndMaxYearLabels())}get periodButtonDescription(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels())}get periodButtonLabel(){return this.calendar.currentView=="month"?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView=this.calendar.currentView=="month"?"multi-year":"month"}previousClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?-1:-Sl)}nextClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?1:Sl)}previousEnabled(){return this.calendar.minDate?!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate):!0}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(e,i){return this.calendar.currentView=="month"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(i)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(i):this.calendar.currentView=="year"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(i):cz(this._dateAdapter,e,i,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){let i=this._dateAdapter.getYear(this.calendar.activeDate)-BC(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),o=i+Sl-1,a=this._dateAdapter.getYearName(this._dateAdapter.createDate(i,0,1)),s=this._dateAdapter.getYearName(this._dateAdapter.createDate(o,0,1));return[a,s]}};t.\u0275fac=function(i){return new(i||t)(h(bm),h(he(()=>Zb)),h(To,8),h(Wd,8),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],standalone:!0,features:[ot],ngContentSelectors:iz,decls:17,vars:11,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-control
31s"],["aria-live","polite",1,"cdk-visually-hidden",3,"id"],["mat-button","","type","button",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"click","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"click","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"]],template:function(i,o){i&1&&(Ct(),d(0,"div",0)(1,"div",1)(2,"span",2),g(3),p(),d(4,"button",3),T("click",function(){return o.currentPeriodClicked()}),d(5,"span",4),g(6),p(),ar(),d(7,"svg",5),O(8,"polygon",6),p()(),cs(),O(9,"div",7),Fe(10),d(11,"button",8),T("click",function(){return o.previousClicked()}),ar(),d(12,"svg",9),O(13,"path",10),p()(),cs(),d(14,"button",11),T("click",function(){return o.nextClicked()}),ar(),d(15,"svg",9),O(16,"path",12),p()()()()),i&2&&(l(2),m("id",o._periodButtonLabelId),l(),z(o.periodButtonDescription),l(),Je("aria-label",o.periodButtonLabel)("aria-describedby",o._periodButtonLabelId),l(2),z(o.periodButtonText),l(),Y("mat-calendar-invert",o.calendar.currentView!=="month"),l(4),m("disabled",!o.previousEnabled()),Je("aria-label",o.prevButtonLabel),l(3),m("disabled",!o.nextEnabled()),Je("aria-label",o.nextButtonLabel))},dependencies:[yt,Pe],encapsulation:2,changeDetection:0});let n=t;return n})(),Zb=(()=>{let t=class t{get startAt(){return this._startAt}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get selected(){return this._selected}set selected(e){e instanceof ya?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get activeDate(){return this._clampedActiveDate}set activeDate(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(e){let i=this._currentView!==e?e:null;this._currentView=e,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),i&&this.viewChanged.emit(i)}constructor(e,i,o,a){this._dateAdapter=i,this._dateFormats=o,this._changeDetectorRef=a,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new J,this.yearSelected=new J,this.monthSelected=new J,this.viewChanged=new J(!0),this._userSelection=new J,this._userDragDrop=new J,this._activeDrag=null,this.stateChanges=new Te,this._intlChanges=e.changes.subscribe(()=>{a.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new $a(this.headerComponent||jC),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(e){let i=e.minDate&&!this._dateAdapter.sameDate(e.minDate.previousValue,e.minDate.currentValue)?e.minDate:void 0,o=e.maxDate&&!this._dateAdapter.sameDate(e.maxDate.previousValue,e.maxDate.currentValue)?e.maxDate:void 0,a=i||o||e.dateFilter;if(a&&!a.firstChange){let s=this._getCurrentViewComponent();s&&(this._moveFocusOnNextTick=!0,this._changeDetectorRef.detectChanges(),s._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(e){let i=e.value;(this.selected instanceof ya||i&&!this._dateAdapter.sameDate(i,this.selected))&&this.selectedChange.emit(i),this._userSelection.emit(e)}_yearSelectedInMultiYearView(e){this.yearSelected.emit(e)}_monthSelectedInYearView(e){this.monthSelected.emit(e)}_goToDateInView(e,i){this.activeDate=e,this.currentView=i}_dragStarted(e){this._activeDrag=e}_dragEnded(e){this._activeDrag&&(e.value&&this._userDragDrop.emit(e),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}};t.\u0275fac=function(i){return new(i||t)(h(bm),h(To,8),h(Wd,8),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-calendar"]],viewQuery:function(i,o){if(i&1&&(ae($C,5),ae(HC,5),ae(UC,5)),i&2){let a;Q(a=K())&&(o.monthView=a.first),Q(a=K())&&(o.yearView=a.first),Q(a=K())&&(o.multiYearView=a.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],standalone:!0,features:[ne([KA]),lt,ot],decls:5,vars:2,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","_userSelection","dragStarted","dragEnded","activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDateChange","monthSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","yearSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"]],template:function(i,o){if(i&1&&(x(0,QZ,0,0,"ng-template",0),d(1,"div",1),x(2,KZ,1,11,"mat-month-view",2)(3,XZ,1,6,"mat-year-view",3)(4,ZZ,1,6,"mat-multi-year-view",3),p()),i&2){let a;m("cdkPortalOutlet",o._calendarHeaderPortal),l(2),_t((a=o.currentView)==="month"?2:a==="year"?3:a==="multi-year"?4:-1)}},dependencies:[gl,bC,$C,HC,UC],styles:['.mat-calendar{display:block;line-height:normal;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-app-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-app-body-medium-size))}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}
31.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-datepicker-calendar-period-button-text-weight, var(--mat-app-title-small-weight));--mdc-text-button-label-text-color:var(--mat-datepicker-calendar-period-button-text-color, var(--mat-app-on-surface-variant))}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color, var(--mat-app-on-surface-variant))}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color, var(--mat-app-on-surface-variant))}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color, var(--mat-app-on-surface-variant));font-size:var(--mat-datepicker-calendar-header-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-datepicker-calendar-header-text-weight, var(--mat-app-title-small-weight))}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=t;return n})(),zA={transformPanel:Qn("transformPanel",[$i("void => enter-dropdown",Vi("120ms cubic-bezier(0, 0, 0.2, 1)",al([Tt({opacity:0,transform:"scale(1, 0.8)"}),Tt({opacity:1,transform:"scale(1, 1)"})]))),$i("void => enter-dialog",Vi("150ms cubic-bezier(0, 0, 0.2, 1)",al([Tt({opacity:0,transform:"scale(0.7)"}),Tt({transform:"none",opacity:1})]))),$i("* => void",Vi("100ms linear",Tt({opacity:0})))]),fadeInCalendar:Qn("fadeInCalendar",[Ji("void",Tt({opacity:0})),Ji("enter",Tt({opacity:1})),$i("void => *",Vi("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},hJ=0,WC=new tt("mat-datepicker-scroll-strategy",{providedIn:"root",factory:()=>{let n=Rt(Vr);return()=>n.scrollStrategies.reposition()}});function pz(n){return()=>n.scrollStrategies.reposition()}var mz={provide:WC,deps:[Vr],useFactory:pz},GC=(()=>{let t=class t{constructor(e,i,o,a,s,c){this._elementRef=e,this._changeDetectorRef=i,this._globalModel=o,this._dateAdapter=a,this._rangeSelectionStrategy=s,this._subscriptions=new ln,this._animationDone=new Te,this._isAnimating=!1,this._actionsPortal=null,this._closeButtonText=c.closeCalendarLabel}ngOnInit(){this._animationState=this.datepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(e){let i=this._model.selection,o=e.value,a=i instanceof ya;if(a&&this._rangeSelectionStrategy){let s=this._rangeSelectionStrategy.selectionFinished(o,i,e.event);this._model.updateSelection(s,this)}else o&&(a||!this._dateAdapter.sameDate(o,i))&&this._model.add(o);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(e){this._model.updateSelection(e.value,this)}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_handleAnimationEvent(e){this._isAnimating=e.phaseName==="start",this._isAnimating||this._animationDone.next()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(e,i){this._model=e?this._globalModel.clone():this._globalModel,this._actionsPortal=e,i&&this._changeDetectorRef.detectChanges()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(gm),h(To),h(zC,8),h(bm))},t.\u0275cmp=L({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(i,o){if(i&1&&ae(Zb,5),i&2){let a;Q(a=K())&&(o._calendar=a.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:5,hostBindings:function(i,o){i&1&&cb("@transformPanel.start",function(s){return o._handleAnimationEvent(s)})("@transformPanel.done",function(s){return o._handleAnimationEvent(s)}),i&2&&(lb("@transformPanel",o._animationState),bt(o.color?"mat-"+o.color:""),Y("mat-datepicker-content-touch",o.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],standalone:!0,features:[ot],decls:5,vars:27,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop","id","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"focus","blur","click","color"]],template:function(i,o){if(i&1&&(d(0,"div",0)(1,"mat-calendar",1),T("yearSelected",function(s){return o.datepicker._selectYear(s)})("monthSelected",function(s){return o.datepicker._selectMonth(s)})("viewChanged",function(s){return o.datepicker._viewChanged(s)})("_userSelection",function(s){return o._handleUserSelection(s)})("_userDragDrop",function(s){return o._handleUserDragDrop(s)}),p(),x(2,JZ,0,0,"ng-template",2),d(3,"button",3),T("focus",function(){return o._closeButtonF
31ocused=!0})("blur",function(){return o._closeButtonFocused=!1})("click",function(){return o.datepicker.close()}),g(4),p()()),i&2){let a;Y("mat-datepicker-content-container-with-custom-header",o.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",o._actionsPortal),Je("aria-modal",!0)("aria-labelledby",(a=o._dialogLabelId)!==null&&a!==void 0?a:void 0),l(),bt(o.datepicker.panelClass),m("id",o.datepicker.id)("startAt",o.datepicker.startAt)("startView",o.datepicker.startView)("minDate",o.datepicker._getMinDate())("maxDate",o.datepicker._getMaxDate())("dateFilter",o.datepicker._getDateFilter())("headerComponent",o.datepicker.calendarHeaderComponent)("selected",o._getSelected())("dateClass",o.datepicker.dateClass)("comparisonStart",o.comparisonStart)("comparisonEnd",o.comparisonEnd)("@fadeInCalendar","enter")("startDateAccessibleName",o.startDateAccessibleName)("endDateAccessibleName",o.endDateAccessibleName),l(),m("cdkPortalOutlet",o._actionsPortal),l(),Y("cdk-visually-hidden",!o._closeButtonFocused),m("color",o.color||"primary"),l(),z(o._closeButtonText)}},dependencies:[iT,Zb,gl,yt],styles:[".mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-app-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-app-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow);border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-app-corner-large))}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow);border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-app-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"],encapsulation:2,data:{animation:[zA.transformPanel,zA.fadeInCalendar]},changeDetection:0});let n=t;return n})(),Of=(()=>{let t=class t{get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(e){this._color=e}get disabled(){return this._disabled===void 0&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(e){e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}get panelClass(){return this._panelClass}set panelClass(e){this._panelClass=hC(e)}get opened(){return this._opened}set opened(e){e?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}constructor(e,i,o,a,s,c,u){this._overlay=e,this._viewContainerRef=o,this._dateAdapter=s,this._dir=c,this._model=u,this._inputStateChanges=ln.EMPTY,this._document=Rt(Qi),this.startView="month",this.touchUi=!1,this.xPosition="start",this.yPosition="below",this.restoreFocus=!0,this.yearSelected=new J,this.monthSelected=new J,this.viewChanged=new J(!0),this.openedStream
31=new J,this.closedStream=new J,this._opened=!1,this.id=`mat-datepicker-${hJ++}`,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new Te,this._injector=Rt(Mn),this._changeDetectorRef=Rt(Me),this._dateAdapter,this._scrollStrategy=a,this._model.selectionChanged.subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnChanges(e){let i=e.xPosition||e.yPosition;if(i&&!i.firstChange&&this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;o instanceof cj&&(this._setConnectedPositions(o),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(e){this._model.add(e)}_selectYear(e){this.yearSelected.emit(e)}_selectMonth(e){this.monthSelected.emit(e)}_viewChanged(e){this.viewChanged.emit(e)}registerInput(e){return this.datepickerInput,this._inputStateChanges.unsubscribe(),this.datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(e){this._actionsPortal,this._actionsPortal=e,this._componentRef?.instance._assignActions(e,!0)}removeActions(e){e===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this.datepickerInput,this._focusedElementBeforeOpen=Cb(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;let e=this.restoreFocus&&this._focusedElementBeforeOpen&&typeof this._focusedElementBeforeOpen.focus=="function",i=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){let{instance:o,location:a}=this._componentRef;o._startExitAnimation(),o._animationDone.pipe($n(1)).subscribe(()=>{let s=this._document.activeElement;e&&(!s||s===this._document.activeElement||a.nativeElement.contains(s))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}e?setTimeout(i):i()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(e){e.datepicker=this,e.color=this.color,e._dialogLabelId=this.datepickerInput.getOverlayLabelId(),e._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();let e=this.touchUi,i=new $a(GC,this._viewContainerRef),o=this._overlayRef=this._overlay.create(new Ha({positionStrategy:e?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[e?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:e?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:`mat-datepicker-${e?"dialog":"popup"}`}));this._getCloseStream(o).subscribe(a=>{a&&a.preventDefault(),this.close()}),o.keydownEvents().subscribe(a=>{let s=a.keyCode;(s===38||s===40||s===37||s===39||s===33||s===34)&&a.preventDefault()}),this._componentRef=o.attach(i),this._forwardContentValues(this._componentRef.instance),e||Lo(()=>{o.updatePosition()},{injector:this._injector})}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){let e=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(e)}_setConnectedPositions(e){let i=this.xPosition==="end"?"end":"start",o=i==="start"?"end":"start",a=this.yPosition==="above"?"bottom":"top",s=a==="top"?"bottom":"top";return e.withPositions([{originX:i,originY:s,overlayX:i,overlayY:a},{originX:i,originY:a,overlayX:i,overlayY:s},{originX:o,originY:s,overlayX:o,overlayY:a},{originX:o,originY:a,overlayX:o,overlayY:s}])}_getCloseStream(e){let i=["ctrlKey","shiftKey","metaKey"];return Xt(e.backdropClick(),e.detachments(),e.keydownEvents().pipe(Pi(o=>
31o.keyCode===27&&!po(o)||this.datepickerInput&&po(o,"altKey")&&o.keyCode===38&&i.every(a=>!po(o,a)))))}};t.\u0275fac=function(i){return new(i||t)(h(Vr),h(Bt),h(ci),h(WC),h(To,8),h(mr,8),h(gm))},t.\u0275dir=_e({type:t,inputs:{calendarHeaderComponent:"calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:[2,"touchUi","touchUi",Re],disabled:[2,"disabled","disabled",Re],xPosition:"xPosition",yPosition:"yPosition",restoreFocus:[2,"restoreFocus","restoreFocus",Re],dateClass:"dateClass",panelClass:"panelClass",opened:[2,"opened","opened",Re]},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[si,lt]});let n=t;return n})(),$A=(()=>{let t=class t extends Of{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],standalone:!0,features:[ne([KA,{provide:Of,useExisting:t}]),Ce,ot],decls:0,vars:0,template:function(i,o){},encapsulation:2,changeDetection:0});let n=t;return n})(),Af=class{constructor(t,r){this.target=t,this.targetElement=r,this.value=this.target.value}},uz=(()=>{let t=class t{get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(e){this._assignValueProgrammatically(e)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(e){let i=e,o=this._elementRef.nativeElement;this._disabled!==i&&(this._disabled=i,this.stateChanges.next(void 0)),i&&this._isInitialized&&o.blur&&o.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(e){this._model=e,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(i=>{if(this._shouldHandleChangeEvent(i)){let o=this._getValueFromModel(i.selection);this._lastValueValid=this._isValidValue(o),this._cvaOnChange(o),this._onTouched(),this._formatValue(o),this.dateInput.emit(new Af(this,this._elementRef.nativeElement)),this.dateChange.emit(new Af(this,this._elementRef.nativeElement))}})}constructor(e,i,o){this._elementRef=e,this._dateAdapter=i,this._dateFormats=o,this.dateChange=new J,this.dateInput=new J,this.stateChanges=new Te,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=ln.EMPTY,this._localeSubscription=ln.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=a=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(a.value));return!s||this._matchesFilter(s)?null:{matDatepickerFilter:!0}},this._minValidator=a=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(a.value)),c=this._getMinDate();return!c||!s||this._dateAdapter.compareDate(c,s)<=0?null:{matDatepickerMin:{min:c,actual:s}}},this._maxValidator=a=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(a.value)),c=this._getMaxDate();return!c||!s||this._dateAdapter.compareDate(c,s)>=0?null:{matDatepickerMax:{max:c,actual:s}}},this._lastValueValid=!1,this._localeSubscription=i.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(e){hz(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}writeValue(e){this._assignValueProgrammatically(e)}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onKeydown(e){let i=["ctrlKey","shiftKey","metaKey"];po(e,"altKey")&&e.keyCode===40&&i.every(a=>!po(e,a))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),e.preventDefault())}_onInput(e){let i=this._lastValueValid,o=this._dateAdapter.parse(e,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(o),o=this._dateAdapter.getValidDateOrNull(o);let a=!this._dateAdapter.sameDate(o,this.value);!o||a?this._cvaOnChange(o):(e&&!this.value&&this._cvaOnChange(o),i!==this._lastValueValid&&this._val
31idatorOnChange()),a&&(this._assignValue(o),this.dateInput.emit(new Af(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Af(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(e){this._elementRef.nativeElement.value=e!=null?this._dateAdapter.format(e,this._dateFormats.display.dateInput):""}_assignValue(e){this._model?(this._assignValueToModel(e),this._pendingValue=null):this._pendingValue=e}_isValidValue(e){return!e||this._dateAdapter.isValid(e)}_parentDisabled(){return!1}_assignValueProgrammatically(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=this._isValidValue(e),e=this._dateAdapter.getValidDateOrNull(e),this._assignValue(e),this._formatValue(e)}_matchesFilter(e){let i=this._getDateFilter();return!i||i(e)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(To,8),h(Wd,8))},t.\u0275dir=_e({type:t,inputs:{value:"value",disabled:[2,"disabled","disabled",Re]},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[si,lt]});let n=t;return n})();function hz(n,t){let r=Object.keys(n);for(let e of r){let{previousValue:i,currentValue:o}=n[e];if(t.isDateInstance(i)&&t.isDateInstance(o)){if(!t.sameDate(i,o))return!0}else return!0}return!1}var fz={provide:ye,useExisting:he(()=>qC),multi:!0},gz={provide:zn,useExisting:he(()=>qC),multi:!0},qC=(()=>{let t=class t extends uz{set matDatepicker(e){e&&(this._datepicker=e,this._ariaOwns.set(e.opened?e.id:null),this._closedSubscription=e.closedStream.subscribe(()=>{this._onTouched(),this._ariaOwns.set(null)}),this._openedSubscription=e.openedStream.subscribe(()=>{this._ariaOwns.set(e.id)}),this._registerModel(e.registerInput(this)))}get min(){return this._min}set min(e){let i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(i,this._min)||(this._min=i,this._validatorOnChange())}get max(){return this._max}set max(e){let i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(i,this._max)||(this._max=i,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(e){let i=this._matchesFilter(this.value);this._dateFilter=e,this._matchesFilter(this.value)!==i&&this._validatorOnChange()}constructor(e,i,o,a){super(e,i,o),this._formField=a,this._closedSubscription=ln.EMPTY,this._openedSubscription=ln.EMPTY,this._ariaOwns=$d(null),this._validator=ke.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(e){return e}_assignValueToModel(e){this._model&&this._model.updateSelection(e,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(e){return e.source!==this}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(To,8),h(Wd,8),h(sm,8))},t.\u0275dir=_e({type:t,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(i,o){i&1&&T("input",function(s){return o._onInput(s.target.value)})("change",function(){return o._onChange()})("blur",function(){return o._onBlur()})("keydown",function(s){return o._onKeydown(s)}),i&2&&(lo("disabled",o.disabled),Je("aria-haspopup",o._datepicker?"dialog":null)("aria-owns",o._ariaOwns())("min",o.min?o._dateAdapter.toIso8601(o.min):null)("max",o.max?o._dateAdapter.toIso8601(o.max):null)("data-mat-calendar",o._datepicker?o._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:[0,"matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],standalone:!0,features:[ne([fz,gz,{provide:Qb,useExisting:t}]),Ce]});let n=t;return n})(),VT=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","matDatepickerToggleIcon",""]],standalone:!0});let n=t;return n})(),NT=(()=>{let t=class t{get disabled(){return this._disabled===void 0&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(e){this._disabled=e}constructor(e,i,o){this._intl=e,this._changeDetectorRef=i,this._stateChanges=ln.EMPTY;let a=Number(o);this.tabIndex=a||a===0?a:null}ngOnChanges(e){e.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())}_watchStateChanges(){let e=this.datepicker?this.datepicker.stateChanges:Z(),i=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:Z(),o=this.datepicker?Xt(this.datepicker.openedStream,this.datepicker.closedStream):Z();this._stateChanges.unsubscribe(),this._stateChanges=Xt(this._intl.changes,e,i,o).subscribe(()=>this._changeDetectorRef.markForCheck())}};t.\u0275fac=function(i){return new(i||t)(h(bm),h(Me),ja("tabindex"))}
31,t.\u0275cmp=L({type:t,selectors:[["mat-datepicker-toggle"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,VT,5),i&2){let s;Q(s=K())&&(o._customIcon=s.first)}},viewQuery:function(i,o){if(i&1&&ae(eJ,5),i&2){let a;Q(a=K())&&(o._button=a.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(i,o){i&1&&T("click",function(s){return o._open(s)}),i&2&&(Je("tabindex",null)("data-mat-calendar",o.datepicker?o.datepicker.id:null),Y("mat-datepicker-toggle-active",o.datepicker&&o.datepicker.opened)("mat-accent",o.datepicker&&o.datepicker.color==="accent")("mat-warn",o.datepicker&&o.datepicker.color==="warn"))},inputs:{datepicker:[0,"for","datepicker"],tabIndex:"tabIndex",ariaLabel:[0,"aria-label","ariaLabel"],disabled:[2,"disabled","disabled",Re],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],standalone:!0,features:[si,lt,ot],ngContentSelectors:iJ,decls:4,vars:6,consts:[["button",""],["mat-icon-button","","type","button",3,"disabled","disableRipple"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false","aria-hidden","true",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(i,o){i&1&&(Ct(tJ),d(0,"button",1,0),x(2,nJ,2,0,":svg:svg",2),Fe(3),p()),i&2&&(m("disabled",o.disabled)("disableRipple",o.disableRipple),Je("aria-haspopup",o.datepicker?"dialog":null)("aria-label",o.ariaLabel||o._intl.openCalendarLabel)("tabindex",o.disabled?-1:o.tabIndex),l(2),_t(o._customIcon?-1:2))},dependencies:[Pe],styles:[".mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color, var(--mat-app-on-surface-variant))}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color, var(--mat-app-on-surface-variant))}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}"],encapsulation:2,changeDetection:0});let n=t;return n})();function fJ(n){return UA(n,!0)}function ez(n){return n.nodeType===Node.ELEMENT_NODE}function gJ(n){return n.nodeName==="INPUT"}function bJ(n){return n.nodeName==="TEXTAREA"}function UA(n,t){if(ez(n)&&t){let e=(n.getAttribute?.("aria-labelledby")?.split(/\s+/g)||[]).reduce((i,o)=>{let a=document.getElementById(o);return a&&i.push(a),i},[]);if(e.length)return e.map(i=>UA(i,!1)).join(" ")}if(ez(n)){let r=n.getAttribute("aria-label")?.trim();if(r)return r}if(gJ(n)||bJ(n)){if(n.labels?.length)return Array.from(n.labels).map(i=>UA(i,!1)).join(" ");let r=n.getAttribute("placeholder")?.trim();if(r)return r;let e=n.getAttribute("title")?.trim();if(e)return e}return(n.textContent||"").replace(/\s+/g," ").trim()}var jT=new tt("MAT_DATE_RANGE_INPUT_PARENT"),bz=(()=>{let t=class t extends uz{get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(e,i,o,a,s,c,u,f){super(i,u,f),this._rangeInput=e,this._elementRef=i,this._defaultErrorStateMatcher=o,this._injector=a,this._parentForm=s,this._parentFormGroup=c,this._dir=Rt(mr,{optional:!0}),this._errorStateTracker=new Tb(this._defaultErrorStateMatcher,null,this._parentFormGroup,this._parentForm,this.stateChanges)}ngOnInit(){let e=this._injector.get(Yd,null,{optional:!0,self:!0});e&&(this.ngControl=e,this._errorStateTracker.ngControl=e)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return this._elementRef.nativeElement.value.length===0}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}getMirrorValue(){let e=this._elementRef.nativeElement,i=e.value;return i.length>0?i:e.placeholder}updateErrorState(){this._errorStateTracker.updateErrorState()}_onInput(e){super._onInput(e),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:e}){return e!==this._rangeInput._startInput&&e!==this._rangeInput._endInput}_assignValueProgrammatically(e){super._assignValueProgrammatically(e),(this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput)?._validatorOnChange()}_getAccessibleName(){return fJ(this._elementRef.nativeElement)}};t.\u0275fac=function(i){return new(i||t)(h(jT),h(ge),h(Nn),h(Mn),h(Qa,8),h($e,8),h(To,8),h(Wd,8))},t.\u0275dir=_e({type:t,inputs:{errorStateMatcher:"errorStateMatcher"},standalone:!0,features:[Ce]});let n=t;return n})(),LT=(()=>{let t=class t extends bz{constructor(e,i,o,a,s,c,u,f){super(e,i,o,a,s,c,u,f),this._startValidator=_=>{let I=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(_.value)),S=this._model?this._model.selection.end:null;return!I||!S||this._dateAdapter.compareDate(I,S)<=0?null:{matStartDateInvalid:{end:S,actual:I}}}
31,this._validator=ke.compose([...super._getValidators(),this._startValidator])}_getValueFromModel(e){return e.start}_shouldHandleChangeEvent(e){return super._shouldHandleChangeEvent(e)?e.oldValue?.start?!e.selection.start||!!this._dateAdapter.compareDate(e.oldValue.start,e.selection.start):!!e.selection.start:!1}_assignValueToModel(e){if(this._model){let i=new ya(e,this._model.selection.end);this._model.updateSelection(i,this)}}_formatValue(e){super._formatValue(e),this._rangeInput._handleChildValueChange()}_onKeydown(e){let i=this._rangeInput._endInput,o=this._elementRef.nativeElement,a=this._dir?.value!=="rtl";(e.keyCode===39&&a||e.keyCode===37&&!a)&&o.selectionStart===o.value.length&&o.selectionEnd===o.value.length?(e.preventDefault(),i._elementRef.nativeElement.setSelectionRange(0,0),i.focus()):super._onKeydown(e)}};t.\u0275fac=function(i){return new(i||t)(h(jT),h(ge),h(Nn),h(Mn),h(Qa,8),h($e,8),h(To,8),h(Wd,8))},t.\u0275dir=_e({type:t,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(i,o){i&1&&T("input",function(s){return o._onInput(s.target.value)})("change",function(){return o._onChange()})("keydown",function(s){return o._onKeydown(s)})("blur",function(){return o._onBlur()}),i&2&&(lo("disabled",o.disabled),Je("aria-haspopup",o._rangeInput.rangePicker?"dialog":null)("aria-owns",o._rangeInput._ariaOwns?o._rangeInput._ariaOwns():(o._rangeInput.rangePicker==null?null:o._rangeInput.rangePicker.opened)&&o._rangeInput.rangePicker.id||null)("min",o._getMinDate()?o._dateAdapter.toIso8601(o._getMinDate()):null)("max",o._getMaxDate()?o._dateAdapter.toIso8601(o._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[ne([{provide:ye,useExisting:t,multi:!0},{provide:zn,useExisting:t,multi:!0}]),Ce]});let n=t;return n})(),BT=(()=>{let t=class t extends bz{constructor(e,i,o,a,s,c,u,f){super(e,i,o,a,s,c,u,f),this._endValidator=_=>{let I=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(_.value)),S=this._model?this._model.selection.start:null;return!I||!S||this._dateAdapter.compareDate(I,S)>=0?null:{matEndDateInvalid:{start:S,actual:I}}},this._validator=ke.compose([...super._getValidators(),this._endValidator])}_getValueFromModel(e){return e.end}_shouldHandleChangeEvent(e){return super._shouldHandleChangeEvent(e)?e.oldValue?.end?!e.selection.end||!!this._dateAdapter.compareDate(e.oldValue.end,e.selection.end):!!e.selection.end:!1}_assignValueToModel(e){if(this._model){let i=new ya(this._model.selection.start,e);this._model.updateSelection(i,this)}}_moveCaretToEndOfStartInput(){let e=this._rangeInput._startInput._elementRef.nativeElement,i=e.value;i.length>0&&e.setSelectionRange(i.length,i.length),e.focus()}_onKeydown(e){let i=this._elementRef.nativeElement,o=this._dir?.value!=="rtl";e.keyCode===8&&!i.value?this._moveCaretToEndOfStartInput():(e.keyCode===37&&o||e.keyCode===39&&!o)&&i.selectionStart===0&&i.selectionEnd===0?(e.preventDefault(),this._moveCaretToEndOfStartInput()):super._onKeydown(e)}};t.\u0275fac=function(i){return new(i||t)(h(jT),h(ge),h(Nn),h(Mn),h(Qa,8),h($e,8),h(To,8),h(Wd,8))},t.\u0275dir=_e({type:t,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(i,o){i&1&&T("input",function(s){return o._onInput(s.target.value)})("change",function(){return o._onChange()})("keydown",function(s){return o._onKeydown(s)})("blur",function(){return o._onBlur()}),i&2&&(lo("disabled",o.disabled),Je("aria-haspopup",o._rangeInput.rangePicker?"dialog":null)("aria-owns",o._rangeInput._ariaOwns?o._rangeInput._ariaOwns():(o._rangeInput.rangePicker==null?null:o._rangeInput.rangePicker.opened)&&o._rangeInput.rangePicker.id||null)("min",o._getMinDate()?o._dateAdapter.toIso8601(o._getMinDate()):null)("max",o._getMaxDate()?o._dateAdapter.toIso8601(o._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[ne([{provide:ye,useExisting:t,multi:!0},{provide:zn,useExisting:t,multi:!0}]),Ce]});let n=t;return n})(),_J=0,HA=(()=>{let t=class t{get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){let e=this._startInput?._getPlaceholder()||"",i=this._endInput?._getPlaceholder()||"";return e||i?`${e} ${this.separator} ${i}`:""}get rangePicker(){return this._rangePicker}set rangePicker(e){e&&(this._model=e.registerInput(this),this._rangePicker=e,this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe(),this._ariaOwns.set(this.rangePicker.opened?e.id:null),this._closedSubscription=e.closedStream.subscribe(()=>{this._startInput?._onTouched(),this._endInput?._onTouched(),this._ariaOwns.set(null)}),this._openedSubscription=e.openedStream.subscribe(()=>{this._ariaOwns.set(e.id)}),this._registerModel(this._model))}get required(){return this._required??(this._isTargetRequired(this)||this._isTargetRequired(this._startInput)||this._isTargetRequired(this._endInput))??!1}set required(e){this._required=e}get dateFilter(){return this._dateFilter}set dateFilter(e){let i=this._startInput,o=this._endInput,a=i&&i._matchesFilter(i.value),s=o&&o._matchesFilter(i.value);this._dateFilter=e,i&&i._matchesFilter(i.value)!==a&&i._validatorOnChange(),o&&o._matchesFilter(o.value)!==s&&o._validatorOnChange()}get min(){return this._min}set min(e){let i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(i,this._min)||(this._min=i,this._revalidate())}get max(){return this._max}set max(e){let i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(i,this._max)||(this._max=i,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(e){e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return this._startInput&&this._endInput?this._startInput.errorState||this._endInput.errorState:!1}get empty(){let e=this._startInput?this._startInput.isEmpty():!1,i=this._endInput?this._endInput.isEmpty():!1;return e&&i}constructor(e,i,o,a,s){this._changeDetectorRef=e,this._elementRef=i,this._dateAdapter=a,this._formField=s,this._closedSubscription=ln.EMPTY,this._openedSubscription=ln.EMPTY,this.id=`mat-date-range-input-${_J++}`,this.focused=!1,this.controlType="mat-date-range-input",this._ariaOwns=$d(null),this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new Te,this.disableAutomaticLabeling=!0,s?._elementRef.nativeElement.classList.contains("mat-mdc-form-field")&&i.nativeElement.classList.add("mat-mdc-input-element","mat-mdc-form-field-input-control","mdc-text-field__input"),this.ngControl=o}setDescribedByIds(e){this._ariaDescribedBy=e.length?e.join(" "):null}onContainerClick(){!this.focused&&!this.disabled&&(!this._model||!this._model.selection.start?this._startInput.focus():this._endInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),Xt(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(e){hz(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}
31getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():null}_getInputMirrorValue(e){let i=e==="start"?this._startInput:this._endInput;return i?i.getMirrorValue():""}_shouldHidePlaceholders(){return this._startInput?!this._startInput.isEmpty():!1}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField.getLabelId()&&!this._formField._shouldLabelFloat())&&this.empty}_getAriaLabelledby(){let e=this._formField;return e&&e._hasFloatingLabel()?e._labelId:null}_getStartDateAccessibleName(){return this._startInput._getAccessibleName()}_getEndDateAccessibleName(){return this._endInput._getAccessibleName()}_updateFocus(e){this.focused=e!==null,this.stateChanges.next()}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(e){this._startInput&&this._startInput._registerModel(e),this._endInput&&this._endInput._registerModel(e)}_isTargetRequired(e){return e?.ngControl?.control?.hasValidator(ke.required)}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(ge),h(sT,10),h(To,8),h(sm,8))},t.\u0275cmp=L({type:t,selectors:[["mat-date-range-input"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,LT,5),Zt(a,BT,5)),i&2){let s;Q(s=K())&&(o._startInput=s.first),Q(s=K())&&(o._endInput=s.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(i,o){i&2&&(Je("id",o.id)("aria-labelledby",o._getAriaLabelledby())("aria-describedby",o._ariaDescribedBy)("data-mat-calendar",o.rangePicker?o.rangePicker.id:null),Y("mat-date-range-input-hide-placeholders",o._shouldHidePlaceholders())("mat-date-range-input-required",o.required))},inputs:{rangePicker:"rangePicker",required:[2,"required","required",Re],dateFilter:"dateFilter",min:"min",max:"max",disabled:[2,"disabled","disabled",Re],separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},exportAs:["matDateRangeInput"],standalone:!0,features:[ne([{provide:Rb,useExisting:t},{provide:jT,useExisting:t}]),si,lt,ot],ngContentSelectors:oJ,decls:11,vars:5,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-wrapper","mat-date-range-input-end-wrapper"]],template:function(i,o){i&1&&(Ct(rJ),d(0,"div",0),T("cdkFocusChange",function(s){return o._updateFocus(s)}),d(1,"div",1),Fe(2),d(3,"span",2),g(4),p()(),d(5,"span",3),g(6),p(),d(7,"div",4),Fe(8,1),d(9,"span",2),g(10),p()()()),i&2&&(l(4),z(o._getInputMirrorValue("start")),l(),Y("mat-date-range-input-separator-hidden",o._shouldHideSeparator()),l(),z(o.separator),l(4),z(o._getInputMirrorValue("end")))},dependencies:[bC],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px;color:var(--mat-datepicker-range-input-separator-color, var(--mat-app-on-surface))}.mat-form-field-disabled .mat-date-range-input-separator{color:var(--mat-datepicker-range-input-disabled-state-separator-color)}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner[disabled]{color:var(--mat-datepicker-range-input-disabled-state-text-color)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}
31.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}"],encapsulation:2,changeDetection:0});let n=t;return n})(),qA=(()=>{let t=class t extends Of{_forwardContentValues(e){super._forwardContentValues(e);let i=this.datepickerInput;i&&(e.comparisonStart=i.comparisonStart,e.comparisonEnd=i.comparisonEnd,e.startDateAccessibleName=i._getStartDateAccessibleName(),e.endDateAccessibleName=i._getEndDateAccessibleName())}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],standalone:!0,features:[ne([sz,dJ,{provide:Of,useExisting:t}]),Ce,ot],decls:0,vars:0,template:function(i,o){},encapsulation:2,changeDetection:0});let n=t;return n})(),WA=(()=>{let t=class t{constructor(e){this._datepicker=e}_applySelection(){this._datepicker._applyPendingSelection(),this._datepicker.close()}};t.\u0275fac=function(i){return new(i||t)(h(Of))},t.\u0275dir=_e({type:t,selectors:[["","matDatepickerApply",""],["","matDateRangePickerApply",""]],hostBindings:function(i,o){i&1&&T("click",function(){return o._applySelection()})},standalone:!0});let n=t;return n})(),YA=(()=>{let t=class t{constructor(e){this._datepicker=e}};t.\u0275fac=function(i){return new(i||t)(h(Of))},t.\u0275dir=_e({type:t,selectors:[["","matDatepickerCancel",""],["","matDateRangePickerCancel",""]],hostBindings:function(i,o){i&1&&T("click",function(){return o._datepicker.close()})},standalone:!0});let n=t;return n})(),QA=(()=>{let t=class t{constructor(e,i){this._datepicker=e,this._viewContainerRef=i}ngAfterViewInit(){this._portal=new us(this._template,this._viewContainerRef),this._datepicker.registerActions(this._portal)}ngOnDestroy(){this._datepicker.removeActions(this._portal),this._portal&&this._portal.isAttached&&this._portal?.detach()}};t.\u0275fac=function(i){return new(i||t)(h(Of),h(ci))},t.\u0275cmp=L({type:t,selectors:[["mat-datepicker-actions"],["mat-date-range-picker-actions"]],viewQuery:function(i,o){if(i&1&&ae(an,5),i&2){let a;Q(a=K())&&(o._template=a.first)}},standalone:!0,features:[ot],ngContentSelectors:iz,decls:1,vars:0,consts:[[1,"mat-datepicker-actions"]],template:function(i,o){i&1&&(Ct(
31),x(0,aJ,2,0,"ng-template"))},styles:[".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0});let n=t;return n})(),Jb=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[zi,va,Bo,pc,cc,Ot,Zb,fm,$A,GC,qC,NT,VT,$C,HC,UC,jC,HA,LT,BT,qA,QA,YA,WA],exports:[_a,Zb,fm,$A,GC,qC,NT,VT,$C,HC,UC,jC,HA,LT,BT,qA,QA,YA,WA]}),t.\u0275inj=Nt({providers:[bm,mz],imports:[zi,va,Bo,pc,cc,Ot,GC,NT,jC,_a]});let n=t;return n})();var Jd={};Ae(Jd,{MatDivider:()=>la,MatDividerModule:()=>_m});y();var la=(()=>{let t=class t{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=mt(e)}get inset(){return this._inset}set inset(e){this._inset=mt(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(i,o){i&2&&(Je("aria-orientation",o.vertical?"vertical":"horizontal"),Y("mat-divider-vertical",o.vertical)("mat-divider-horizontal",!o.vertical)("mat-divider-inset",o.inset))},inputs:{vertical:"vertical",inset:"inset"},standalone:!0,features:[ot],decls:0,vars:0,template:function(i,o){},styles:[".mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-app-outline));border-top-width:var(--mat-divider-width)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-app-outline));border-right-width:var(--mat-divider-width)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0});let n=t;return n})(),_m=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,la],exports:[la,Ot]}),t.\u0275inj=Nt({imports:[Ot,Ot]});let n=t;return n})();var Pf={};Ae(Pf,{EXPANSION_PANEL_ANIMATION_TIMING:()=>JA,MAT_ACCORDION:()=>$T,MAT_EXPANSION_PANEL:()=>rO,MAT_EXPANSION_PANEL_DEFAULT_OPTIONS:()=>oO,MatAccordion:()=>iO,MatExpansionModule:()=>e_,MatExpansionPanel:()=>Ss,MatExpansionPanelActionRow:()=>eO,MatExpansionPanelContent:()=>ep,MatExpansionPanelDescription:()=>tO,MatExpansionPanelHeader:()=>Ts,MatExpansionPanelTitle:()=>Bl,matExpansionAnimations:()=>nO});y();y();var vJ=0,XA=new tt("CdkAccordion"),GT=(()=>{let t=class t{constructor(){this._stateChanges=new Te,this._openCloseAllActions=new Te,this.id=`cdk-accordion-${vJ++}`,this.multi=!1}openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",Re]},exportAs:["cdkAccordion"],standalone:!0,features:[ne([{provide:XA,useExisting:t}]),si,lt]});let n=t;return n})(),yJ=0,zT=(()=>{let t=class t{get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let i=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,i)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}constructor(e,i,o){this.accordion=e,this._changeDetectorRef=i,this._expansionDispatcher=o,this._openCloseAllSubscription=ln.EMPTY,this.closed=new J,this.opened=new J,this.destroyed=new J,this.expandedChange=new J,this.id=`cdk-accordion-child-${yJ++}`,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=o.listen((a,s)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===s&&this.id!==a&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}
31ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}};t.\u0275fac=function(i){return new(i||t)(h(XA,12),h(Me),h(wb))},t.\u0275dir=_e({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",Re],disabled:[2,"disabled","disabled",Re]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[ne([{provide:XA,useValue:void 0}]),si]});let n=t;return n})(),ZA=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[GT,zT],exports:[GT,zT]}),t.\u0275inj=Nt({});let n=t;return n})();var CJ=["body"],wJ=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],xJ=["mat-expansion-panel-header","*","mat-action-row"];function SJ(n,t){}var TJ=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],EJ=["mat-panel-title","mat-panel-description","*"];function IJ(n,t){if(n&1&&(d(0,"span",1),ar(),d(1,"svg",2),O(2,"path",3),p()()),n&2){let r=b
31();m("@indicatorRotate",r._getExpandedState())}}var $T=new tt("MAT_ACCORDION"),JA="225ms cubic-bezier(0.4,0.0,0.2,1)",nO={indicatorRotate:Qn("indicatorRotate",[Ji("collapsed, void",Tt({transform:"rotate(0deg)"})),Ji("expanded",Tt({transform:"rotate(180deg)"})),$i("expanded <=> collapsed, void => collapsed",Vi(JA))]),bodyExpansion:Qn("bodyExpansion",[Ji("collapsed, void",Tt({height:"0px",visibility:"hidden"})),Ji("expanded",Tt({height:"*",visibility:""})),$i("expanded <=> collapsed, void => collapsed",Vi(JA))])},rO=new tt("MAT_EXPANSION_PANEL"),ep=(()=>{let t=class t{constructor(e,i){this._template=e,this._expansionPanel=i}};t.\u0275fac=function(i){return new(i||t)(h(an),h(rO,8))},t.\u0275dir=_e({type:t,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0});let n=t;return n})(),kJ=0,oO=new tt("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Ss=(()=>{let t=class t extends zT{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}constructor(e,i,o,a,s,c,u){super(e,i,o),this._viewContainerRef=a,this._animationMode=c,this._hideToggle=!1,this.afterExpand=new J,this.afterCollapse=new J,this._inputChanges=new Te,this._headerId=`mat-expansion-panel-header-${kJ++}`,this.accordion=e,this._document=s,this._animationsDisabled=c==="NoopAnimations",u&&(this.hideToggle=u.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(on(null),Pi(()=>this.expanded&&!this._portal),$n(1)).subscribe(()=>{this._portal=new us(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,i=this._body.nativeElement;return e===i||i.contains(e)}return!1}_animationStarted(e){!yz(e)&&!this._animationsDisabled&&this._body&&this._body?.nativeElement.setAttribute("inert","")}_animationDone(e){yz(e)||(e.toState==="expanded"?this.afterExpand.emit():e.toState==="collapsed"&&this.afterCollapse.emit(),!this._animationsDisabled&&this._body&&this._body.nativeElement.removeAttribute("inert"))}};t.\u0275fac=function(i){return new(i||t)(h($T,12),h(Me),h(wb),h(ci),h(Qi),h(Er,8),h(oO,8))},t.\u0275cmp=L({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,ep,5),i&2){let s;Q(s=K())&&(o._lazyContent=s.first)}},viewQuery:function(i,o){if(i&1&&ae(CJ,5),i&2){let a;Q(a=K())&&(o._body=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(i,o){i&2&&Y("mat-expanded",o.expanded)("_mat-animation-noopable",o._animationsDisabled)("mat-expansion-panel-spacing",o._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",Re],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[ne([{provide:$T,useValue:void 0},{provide:rO,useExisting:t}]),si,Ce,lt,ot],ngContentSelectors:xJ,decls:7,vars:4,consts:[["body",""],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(i,o){if(i&1){let a=B();Ct(wJ),Fe(0),d(1,"div",1,0),T("@bodyExpansion.start",function(c){return D(a),M(o._animationStarted(c))})("@bodyExpansion.done",function(c){return D(a),M(o._animationDone(c))}),d(3,"div",2),Fe(4,1),x(5,SJ,0,0,"ng-template",3),p(),Fe(6,2),p()}i&2&&(l(),m("@bodyExpansion",o._getExpandedState())("id",o.id),Je("aria-labelledby",o._headerId),l(4),m("cdkPortalOutlet",o._portal))},dependencies:[gl],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color, var(--mat-app-surface));color:var(--mat-expansion-container-text-color, var(--mat-app-on-surface));border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font, var(--mat-app-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-app-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-app-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-app-body-large-tracking))}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-app-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[nO.bodyExpansion]},changeDetection:0});let n=t;return n})();function yz(n){return n.fromState==="void"}var eO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-action-row"]],hostAttrs:[1,"mat-action-row"],standalone:!0});let n=t;return n})(),Ts=(()=>{let t=class t{constructor(e,i,o,a,s,c,u){this.panel=e,this._element=i,this._focusMonitor=o,this._changeDetectorRef=a,this._animationMode=c,this._parentChangeSubscription=ln.EMPTY,this.tabIndex=0;let f=e.accordion?e.accordion._stateChanges.pipe(Pi(_=>!!(_.hideToggle||_.togglePosition))):Ls;this.tabIndex=parseInt(u||"")||0,this._parentChangeSubscription=Xt(e.opened,e.closed,f,e._inputChanges.pipe(Pi(_=>!!(_.hideToggle||_.disabled||_.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(Pi(()=>e._containsFocus())).subscribe(()=>o.focusVia(i,"program")),s&&(this.expandedHeight=s.expandedHeight,this.collapsedHeight=s.collapsedHeight)}get disabled(){return this.panel.disabled}
31_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:po(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,i){e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}};t.\u0275fac=function(i){return new(i||t)(h(Ss,1),h(ge),h(Po),h(Me),h(oO,8),h(Er,8),ja("tabindex"))},t.\u0275cmp=L({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(i,o){i&1&&T("click",function(){return o._toggle()})("keydown",function(s){return o._keydown(s)}),i&2&&(Je("id",o.panel._headerId)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o._getPanelId())("aria-expanded",o._isExpanded())("aria-disabled",o.panel.disabled),hi("height",o._getHeaderHeight()),Y("mat-expanded",o._isExpanded())("mat-expansion-toggle-indicator-after",o._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",o._getTogglePosition()==="before")("_mat-animation-noopable",o._animationMode==="NoopAnimations"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Nr(e)]},standalone:!0,features:[si,ot],ngContentSelectors:EJ,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(i,o){i&1&&(Ct(TJ),d(0,"span",0),Fe(1),Fe(2,1),Fe(3,2),p(),x(4,IJ,3,1,"span",1)),i&2&&(Y("mat-content-hide-toggle",!o._showToggle()),l(4),_t(o._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font, var(--mat-app-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-app-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-app-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-app-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-app-title-medium-tracking))}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-app-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-app-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{dis
31play:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-app-on-surface-variant))}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-app-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, inline-block)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-app-on-surface-variant));display:var(--mat-expansion-header-indicator-display, none)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[nO.indicatorRotate]},changeDetection:0});let n=t;return n})(),tO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"],standalone:!0});let n=t;return n})(),Bl=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0});let n=t;return n})(),iO=(()=>{let t=class t extends GT{constructor(){super(...arguments),this._ownHeaders=new Bs,this.hideToggle=!1,this.displayMode="default",this.togglePosition="after"}ngAfterContentInit(){this._headers.changes.pipe(on(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(i=>i.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new dc(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-accordion"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,Ts,5),i&2){let s;Q(s=K())&&(o._headers=s)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(i,o){i&2&&Y("mat-accordion-multi",o.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",Re],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],standalone:!0,features:[ne([{provide:$T,useExisting:t}]),si,Ce]});let n=t;return n})(),e_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,ZA,cc,iO,Ss,eO,Ts,Bl,tO,ep],exports:[iO,Ss,eO,Ts,Bl,tO,ep]}),t.\u0275inj=Nt({imports:[Ot,ZA,cc]});let n=t;return n})();var FJ={};Ae(FJ,{MatGridAvatarCssMatStyler:()=>lO,MatGridList:()=>hO,MatGridListModule:()=>t_,MatGridTile:()=>HT,MatGridTileFooterCssMatStyler:()=>dO,MatGridTileHeaderCssMatStyler:()=>cO,MatGridTileText:()=>sO,\u0275TileCoordinator:()=>RJ});y();var Cz=["*"],DJ=[[["","mat-grid-avatar",""],["","matGridAvatar",""]],[["","mat-line",""],["","matLine",""]],"*"],MJ=["[mat-grid-avatar], [matGridAvatar]","[mat-line], [matLine]","*"],AJ=".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-app-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-app-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-app-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-app-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}",UT=class{constructor(){this.columnIndex=0,this.rowIndex=0}get rowCount(){return this.rowIndex+1}get rowspan(){let t=Math.max(...this.tracker);return t>1?this.rowCount+t-1:this.rowCount}update(t,r){this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=r.map(e=>this._trackTile(e))}_trackTile(t){let r=this._findMatchingGap(t.colspan);return this._markTilePosition(r,t),this.columnIndex=r+t.colspan,new aO(this.rowIndex,r)}_findMatchingGap(t){t>this.tracker.length;let r=-1,e=-1;do{if(this.columnIndex+t>this.tracker.length){this._nextRow(),r=this.tracker.indexOf(0,this.columnIndex),e=this._findGapEndIndex(r);continue}if(r=this.tracker.indexOf(0,this.columnIndex),r==-1){this._nextRow(),r=this.tracker.indexOf(0,this.columnIndex),e=this._findGapEndIndex(r);continue}e=this._findGapEndIndex(r),this.columnIndex=r+1}while(e-r<t||e==0);return Math.max(r,0)}_nextRow(){this.columnIndex=0,this.rowIndex++;for(let t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)}_findGapEndIndex(t){for(let r=t+1;r<this.tracker.length;r++)if(this.tracker[r]!=0)return r;return this.tracker.length}_markTilePosition(t,r){for(let e=0;e<r.colspan;e++)this.tracker[t+e]=r.rowspan}},aO=class{constructor(t,r){this.row=t,this.col=r}},wz=new tt("MAT_GRID_LIST"),HT=(()=>{let t=class t{constructor(e,i){this._element=e,this._gridList=i,this._rowspan=1,this._colspan=1}get rowspan(){return this._rowspan}
31set rowspan(e){this._rowspan=Math.round(Ao(e))}get colspan(){return this._colspan}set colspan(e){this._colspan=Math.round(Ao(e))}_setStyle(e,i){this._element.nativeElement.style[e]=i}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(wz,8))},t.\u0275cmp=L({type:t,selectors:[["mat-grid-tile"]],hostAttrs:[1,"mat-grid-tile"],hostVars:2,hostBindings:function(i,o){i&2&&Je("rowspan",o.rowspan)("colspan",o.colspan)},inputs:{rowspan:"rowspan",colspan:"colspan"},exportAs:["matGridTile"],standalone:!0,features:[ot],ngContentSelectors:Cz,decls:2,vars:0,consts:[[1,"mat-grid-tile-content"]],template:function(i,o){i&1&&(Ct(),d(0,"div",0),Fe(1),p())},styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-app-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-app-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-app-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-app-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}"],encapsulation:2,changeDetection:0});let n=t;return n})(),sO=(()=>{let t=class t{constructor(e){this._element=e}ngAfterContentInit(){bj(this._lines,this._element)}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275cmp=L({type:t,selectors:[["mat-grid-tile-header"],["mat-grid-tile-footer"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,gj,5),i&2){let s;Q(s=K())&&(o._lines=s)}},standalone:!0,features:[ot],ngContentSelectors:MJ,decls:4,vars:0,consts:[[1,"mat-grid-list-text"]],template:function(i,o){i&1&&(Ct(DJ),Fe(0),d(1,"div",0),Fe(2,1),p(),Fe(3,2))},encapsulation:2,changeDetection:0});let n=t;return n})(),lO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-grid-avatar",""],["","matGridAvatar",""]],hostAttrs:[1,"mat-grid-avatar"],standalone:!0});let n=t;return n})(),cO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-grid-tile-header"]],hostAttrs:[1,"mat-grid-tile-header"],standalone:!0});let n=t;return n})(),dO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-grid-tile-footer"]],hostAttrs:[1,"mat-grid-tile-footer"],standalone:!0});let n=t;return n})(),OJ=/^-?\d+((\.\d+)?[A-Za-z%$]?)+$/,YC=class{constructor(){this._rows=0,this._rowspan=0}init(t,r,e,i){this._gutterSize=xz(t),this._rows=r.rowCount,this._rowspan=r.rowspan,this._cols=e,this._direction=i}getBaseTileSize(t,r){return`(${t}% - (${this._gutterSize} * ${r}))`}getTilePosition(t,r){return r===0?"0":Rf(`(${t} + ${this._gutterSize}) * ${r}`)}getTileSize(t,r){return`(${t} * ${r}) + (${r-1} * ${this._gutterSize})`}setStyle(t,r,e){let i=100/this._cols,o=(this._cols-1)/this._cols;this.setColStyles(t,e,i,o),this.setRowStyles(t,r,i,o)}setColStyles(t,r,e,i){let o=this.getBaseTileSize(e,i),a=this._direction==="rtl"?"right":"left";t._setStyle(a,this.getTilePosition(o,r)),t._setStyle("width",Rf(this.getTileSize(o,t.colspan)))}getGutterSpan(){return`${this._gutterSize} * (${this._rowspan}
31 - 1)`}getTileSpan(t){return`${this._rowspan} * ${this.getTileSize(t,1)}`}getComputedHeight(){return null}},pO=class extends YC{constructor(t){super(),this.fixedRowHeight=t}init(t,r,e,i){super.init(t,r,e,i),this.fixedRowHeight=xz(this.fixedRowHeight),OJ.test(this.fixedRowHeight)}setRowStyles(t,r){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,r)),t._setStyle("height",Rf(this.getTileSize(this.fixedRowHeight,t.rowspan)))}getComputedHeight(){return["height",Rf(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)]}reset(t){t._setListStyle(["height",null]),t._tiles&&t._tiles.forEach(r=>{r._setStyle("top",null),r._setStyle("height",null)})}},mO=class extends YC{constructor(t){super(),this._parseRatio(t)}setRowStyles(t,r,e,i){let o=e/this.rowHeightRatio;this.baseTileHeight=this.getBaseTileSize(o,i),t._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,r)),t._setStyle("paddingTop",Rf(this.getTileSize(this.baseTileHeight,t.rowspan)))}getComputedHeight(){return["paddingBottom",Rf(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)]}reset(t){t._setListStyle(["paddingBottom",null]),t._tiles.forEach(r=>{r._setStyle("marginTop",null),r._setStyle("paddingTop",null)})}_parseRatio(t){let r=t.split(":");r.length,this.rowHeightRatio=parseFloat(r[0])/parseFloat(r[1])}},uO=class extends YC{setRowStyles(t,r){let e=100/this._rowspan,i=(this._rows-1)/this._rows,o=this.getBaseTileSize(e,i);t._setStyle("top",this.getTilePosition(o,r)),t._setStyle("height",Rf(this.getTileSize(o,t.rowspan)))}reset(t){t._tiles&&t._tiles.forEach(r=>{r._setStyle("top",null),r._setStyle("height",null)})}};function Rf(n){return`calc(${n})`}function xz(n){return n.match(/([A-Za-z%]+)$/)?n:`${n}px`}var PJ="fit",hO=(()=>{let t=class t{constructor(e,i){this._element=e,this._dir=i,this._gutter="1px"}get cols(){return this._cols}set cols(e){this._cols=Math.max(1,Math.round(Ao(e)))}get gutterSize(){return this._gutter}set gutterSize(e){this._gutter=`${e??""}`}get rowHeight(){return this._rowHeight}set rowHeight(e){let i=`${e??""}`;i!==this._rowHeight&&(this._rowHeight=i,this._setTileStyler(this._rowHeight))}ngOnInit(){this._checkCols(),this._checkRowHeight()}ngAfterContentChecked(){this._layoutTiles()}_checkCols(){this.cols}_checkRowHeight(){this._rowHeight||this._setTileStyler("1:1")}_setTileStyler(e){this._tileStyler&&this._tileStyler.reset(this),e===PJ?this._tileStyler=new uO:e&&e.indexOf(":")>-1?this._tileStyler=new mO(e):this._tileStyler=new pO(e)}_layoutTiles(){this._tileCoordinator||(this._tileCoordinator=new UT);let e=this._tileCoordinator,i=this._tiles.filter(a=>!a._gridList||a._gridList===this),o=this._dir?this._dir.value:"ltr";this._tileCoordinator.update(this.cols,i),this._tileStyler.init(this.gutterSize,e,this.cols,o),i.forEach((a,s)=>{let c=e.positions[s];this._tileStyler.setStyle(a,c.row,c.col)}),this._setListStyle(this._tileStyler.getComputedHeight())}_setListStyle(e){e&&(this._element.nativeElement.style[e[0]]=e[1])}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(mr,8))},t.\u0275cmp=L({type:t,selectors:[["mat-grid-list"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,HT,5),i&2){let s;Q(s=K())&&(o._tiles=s)}},hostAttrs:[1,"mat-grid-list"],hostVars:1,hostBindings:function(i,o){i&2&&Je("cols",o.cols)},inputs:{cols:"cols",gutterSize:"gutterSize",rowHeight:"rowHeight"},exportAs:["matGridList"],standalone:!0,features:[ne([{provide:wz,useExisting:t}]),ot],ngContentSelectors:Cz,decls:2,vars:0,template:function(i,o){i&1&&(Ct(),d(0,"div"),Fe(1),p())},styles:[AJ],encapsulation:2,changeDetection:0});let n=t;return n})(),t_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[_C,Ot,hO,HT,sO,cO,dO,lO],exports:[hO,HT,sO,_C,Ot,cO,dO,lO]}),t.\u0275inj=Nt({imports:[_C,Ot,_C,Ot]});let n=t;return n})(),RJ=UT;var _O={};Ae(_O,{MAT_MENU_CONTENT:()=>gO,MAT_MENU_DEFAULT_OPTIONS:()=>Tz,MAT_MENU_PANEL:()=>qT,MAT_MENU_SCROLL_STRATEGY:()=>bO,MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER:()=>Ez,MENU_PANEL_TOP_PADDING:()=>WJ,MatMenu:()=>Zc,MatMenuContent:()=>fO,MatMenuItem:()=>tp,MatMenuModule:()=>i_,MatMenuTrigger:()=>Ff,fadeInItems:()=>zJ,matMenuAnimations:()=>QC,transformMenu:()=>$J});y();var NJ=["mat-menu-item",""],VJ=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],LJ=["mat-icon, [matMenuItemIcon]","*"];function BJ(n,t){n&1&&(ar(),d(0,"svg",2),O(1,"polygon",3),p())}var jJ=["*"];function GJ(n,t){if(n&1){let r=B();d(0,"div",0),T("keydown",function(i){D(r);let o=b();return M(o._handleKeydown(i))})("click",function(){D(r);let i=b();
31return M(i.closed.emit("click"))})("@transformMenu.start",function(i){D(r);let o=b();return M(o._onAnimationStart(i))})("@transformMenu.done",function(i){D(r);let o=b();return M(o._onAnimationDone(i))}),d(1,"div",1),Fe(2),p()()}if(n&2){let r=b();bt(r._classList),m("id",r.panelId)("@transformMenu",r._panelAnimationState),Je("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null)("aria-describedby",r.ariaDescribedby||null)}}var qT=new tt("MAT_MENU_PANEL"),tp=(()=>{let t=class t{constructor(e,i,o,a,s){this._elementRef=e,this._document=i,this._focusMonitor=o,this._parentMenu=a,this._changeDetectorRef=s,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new Te,this._focused=new Te,this._highlighted=!1,this._triggersSubmenu=!1,a?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o<i.length;o++)i[o].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef?.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef?.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Qi),h(Po),h(qT,8),h(Me))},t.\u0275cmp=L({type:t,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-mdc-focus-indicator"],hostVars:8,hostBindings:function(i,o){i&1&&T("click",function(s){return o._checkDisabled(s)})("mouseenter",function(){return o._handleMouseEnter()}),i&2&&(Je("role",o.role)("tabindex",o._getTabIndex())("aria-disabled",o.disabled)("disabled",o.disabled||null),Y("mat-mdc-menu-item-highlighted",o._highlighted)("mat-mdc-menu-item-submenu-trigger",o._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",Re],disableRipple:[2,"disableRipple","disableRipple",Re]},exportAs:["matMenuItem"],standalone:!0,features:[si,ot],attrs:NJ,ngContentSelectors:LJ,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(i,o){i&1&&(Ct(VJ),Fe(0),d(1,"span",0),Fe(2,1),p(),O(3,"div",1),x(4,BJ,2,0,":svg:svg",2)),i&2&&(l(3),m("matRippleDisabled",o.disableRipple||o.disabled)("matRippleTrigger",o._getHostElement()),l(),_t(o._triggersSubmenu?4:-1))},dependencies:[Wa],encapsulation:2,changeDetection:0});let n=t;return n})();var gO=new tt("MatMenuContent"),fO=(()=>{let t=class t{constructor(e,i,o,a,s,c,u){this._template=e,this._componentFactoryResolver=i,this._appRef=o,this._injector=a,this._viewContainerRef=s,this._document=c,this._changeDetectorRef=u,this._attached=new Te}attach(e={}){this._portal||(this._portal=new us(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new rj(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));let i=this._template.elementRef.nativeElement;i.parentNode.insertBefore(this._outlet.outletElement,i),this._changeDetectorRef?.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal.isAttached&&this._portal.detach()}ngOnDestroy(){this._outlet&&this._outlet.dispose()}};t.\u0275fac=function(i){return new(i||t)(h(an),h(sb),h(db),h(Mn),h(ci),h(Qi),h(Me))},t.\u0275dir=_e({type:t,selectors:[["ng-template","matMenuContent",""]],standalone:!0,features:[ne([{provide:gO,useExisting:t}])]});let n=t;return n})(),QC={transformMenu:Qn("transformMenu",[Ji("void",Tt({opacity:0,transform:"scale(0.8)"})),$i("void => enter",Vi("120ms cubic-bezier(0, 0, 0.2, 1)",Tt({opacity:1,transform:"scale(1)"}))),$i("* => void",Vi("100ms 25ms linear",Tt({opacity:0}
31)))]),fadeInItems:Qn("fadeInItems",[Ji("showing",Tt({opacity:1})),$i("void => *",[Tt({opacity:0}),Vi("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},zJ=QC.fadeInItems,$J=QC.transformMenu,UJ=0,Tz=new tt("mat-menu-default-options",{providedIn:"root",factory:HJ});function HJ(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var Zc=(()=>{let t=class t{get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}set panelClass(e){let i=this._previousPanelClass,o=re({},this._classList);i&&i.length&&i.split(" ").forEach(a=>{o[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{o[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}get classList(){return this.panelClass}set classList(e){this.panelClass=e}constructor(e,i,o,a){this._elementRef=e,this._changeDetectorRef=a,this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new Bs,this._classList={},this._panelAnimationState="void",this._animationDone=new Te,this.closed=new J,this.close=this.closed,this.panelId=`mat-menu-panel-${UJ++}`,this._injector=Rt(Mn),this.overlayPanelClass=o.overlayPanelClass||"",this._xPosition=o.xPosition,this._yPosition=o.yPosition,this.backdropClass=o.backdropClass,this.overlapTrigger=o.overlapTrigger,this.hasBackdrop=o.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new dc(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(on(this._directDescendantItems),ii(e=>Xt(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let i=this._keyManager;if(this._panelAnimationState==="enter"&&i.activeItem?._hasFocus()){let o=e.toArray(),a=Math.max(0,Math.min(o.length-1,i.activeItemIndex||0));o[a]&&!o[a].disabled?i.setActiveItem(a):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(on(this._directDescendantItems),ii(i=>Xt(...i.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let i=e.keyCode,o=this._keyManager;switch(i){case 27:po(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(i===38||i===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Lo(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&i&&i.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){if(this._baseElevation===null){let c=(typeof getComputedStyle=="function"?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(c)}let i=Math.min(this._baseElevation+e,24),o=`${this._elevationPrefix}${i}`,a=Object.keys(this._classList).find(s=>s.startsWith(this._elevationPrefix));if(!a||a===this._previousElevation){let s=re({},this._classList);this._previousElevation&&(s[this._previousElevation]=!1),s[o]=!0,this._previousElevation=o,this._classList=s}}setPositionClasses(e=this.xPosition,i=this.yPosition){this._classList=Lt(re({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":i==="above","mat-menu-below":i==="below"}),this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(e){this._animationDone.next(e),this._isAnimating=!1}_onAnimationStart(e){this._isAnimating=!0,e.toState==="enter"&&this._keyManager.activeItemIndex===0&&(e.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(on(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt),h(Tz),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-menu"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,gO,5),Zt(a,tp,5),Zt(a,tp,4)),i&2){let s;Q(s=K())&&(o.lazyContent=s.first),Q(s=K())&&(o._allItems=s),Q(s=K())&&(o.items=s)}},viewQuery:function(i,o){if(i&1&&ae(an,5),i&2){let a;Q(a=K())&&(o.templateRef=a.first)}},hostVars:3,hostBindings:function(i,o){i&2&&Je("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",Re],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:Re(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[ne([{provide:qT,useExisting:t}]),si,ot],ngContentSelectors:jJ,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(i,o){i&1&&(Ct(
31),x(0,GJ,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-app-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-app-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}[dir=rtl] .mat-mdc-menu-item{padding-right:var(--mat-menu-item-leading-spacing);padding-left:var(--mat-menu-item-trailing-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-right:var(--mat-menu-item-with-icon-leading-spacing);padding-left:var(--mat-menu-item-with-icon-trailing-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[QC.transformMenu,QC.fadeInItems]},changeDetection:0});let n=t;return n})(),bO=new tt("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=Rt(Vr);return()=>n.scrollStrategies.reposition()}});function qJ(n){return()=>n.scrollStrategies.reposition()}var Ez={provide:bO,deps:[Vr],useFactory:qJ},Sz=ms({passive:!0}),WJ=8,Ff=(()=>{let t=class t{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),(i==="click"||i==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit
31(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(e,i,o,a,s,c,u,f,_){this._overlay=e,this._element=i,this._viewContainerRef=o,this._menuItemInstance=c,this._dir=u,this._focusMonitor=f,this._ngZone=_,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=ln.EMPTY,this._hoverSubscription=ln.EMPTY,this._menuCloseSubscription=ln.EMPTY,this._changeDetectorRef=Rt(Me),this._handleTouchStart=I=>{rT(I)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new J,this.onMenuOpen=this.menuOpened,this.menuClosed=new J,this.onMenuClose=this.menuClosed,this._scrollStrategy=a,this._parentMaterialMenu=s instanceof Zc?s:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,Sz)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,Sz),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let e=this.menu;if(this._menuOpen||!e)return;let i=this._createOverlay(e),o=i.getConfig(),a=o.positionStrategy;this._setPosition(e,a),o.hasBackdrop=e.hasBackdrop==null?!this.triggersSubmenu():e.hasBackdrop,i.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof Zc&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Be(e.close)).subscribe(()=>{a.withLockedPosition(!1).reapplyLastPosition(),a.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;let i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof Zc?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(Pi(o=>
31o.toState==="void"),$n(1),Be(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(e){e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,this._setMenuElevation(e),e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(e){if(e.setElevation){let i=0,o=e.parentMenu;for(;o;)i++,o=o.parentMenu;e.setElevation(i)}}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new Ha({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(o=>{let a=o.connectionPair.overlayX==="start"?"after":"before",s=o.connectionPair.overlayY==="top"?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(a,s)):e.setPositionClasses(a,s)})}_setPosition(e,i){let[o,a]=e.xPosition==="before"?["end","start"]:["start","end"],[s,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[u,f]=[s,c],[_,I]=[o,a],S=0;if(this.triggersSubmenu()){if(I=o=e.xPosition==="before"?"start":"end",a=_=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let F=this._parentMaterialMenu.items.first;this._parentInnerPadding=F?F._getHostElement().offsetTop:0}S=s==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(u=s==="top"?"bottom":"top",f=c==="top"?"bottom":"top");i.withPositions([{originX:o,originY:u,overlayX:_,overlayY:s,offsetY:S},{originX:a,originY:u,overlayX:I,overlayY:s,offsetY:S},{originX:o,originY:f,overlayX:_,overlayY:c,offsetY:-S},{originX:a,originY:f,overlayX:I,overlayY:c,offsetY:-S}])}_menuClosingActions(){let e=this._overlayRef.backdropClick(),i=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Z(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Pi(s=>s!==this._menuItemInstance),Pi(()=>this._menuOpen)):Z();return Xt(e,o,a,i)}_handleMousedown(e){nT(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let i=e.keyCode;(i===13||i===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(i===39&&this.dir==="ltr"||i===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Pi(e=>e===this._menuItemInstance&&!e.disabled),nl(0,e2)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Zc&&this.menu._isAnimating?this.menu._animationDone.pipe($n(1),nl(0,e2),Be(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new us(e.templateRef,this._viewContainerRef)),this._portal}};t.\u0275fac=function(i){return new(i||t)(h(Vr),h(ge),h(ci),h(bO),h(qT,8),h(tp,10),h(mr,8),h(Po),h(Bt))},t.\u0275dir=_e({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(i,o){i&1&&T("click",function(s){return o._handleClick(s)})("mousedown",function(s){return o._handleMousedown(s)})("keydown",function(s){return o._handleKeydown(s)}),i&2&&Je("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0});let n=t;return n})(),i_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[zi,Ya,Ot,Bo,Zc,tp,fO,Ff],exports:[_a,Zc,Ot,tp,fO,Ff]}),t.\u0275inj=Nt({providers:[Ez],imports:[zi,Ya,Ot,Bo,_a,Ot]});let n=t;return n})();var wO={};Ae(wO,{MAT_PAGINATOR_DEFAULT_OPTIONS:()=>Rz,MAT_PAGINATOR_INTL_PROVIDER:()=>Pz,MAT_PAGINATOR_INTL_PROVIDER_FACTORY:()=>Oz,MatPaginator:()=>fc,MatPaginatorIntl:()=>Nf,MatPaginatorModule:()=>n_,PageEvent:()=>CO});y();var Vn={};Ae(Vn,{MAT_TOOLTIP_DEFAULT_OPTIONS:()=>YT,MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY:()=>Az,MAT_TOOLTIP_SCROLL_STRATEGY:()=>yO,MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY:()=>Dz,MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER:()=>Mz,MatTooltip:()=>zt,MatTooltipModule:()=>vm,SCROLL_THROTTLE_MS:()=>vO,TOOLTIP_PANEL_CLASS:()=>KJ,TooltipComponent:()=>
31WT,getMatTooltipInvalidPositionError:()=>QJ,matTooltipAnimations:()=>tee});y();var YJ=["tooltip"],vO=20;function QJ(n){return Error(`Tooltip position "${n}" is invalid.`)}var yO=new tt("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=Rt(Vr);return()=>n.scrollStrategies.reposition({scrollThrottle:vO})}});function Dz(n){return()=>n.scrollStrategies.reposition({scrollThrottle:vO})}var Mz={provide:yO,deps:[Vr],useFactory:Dz};function Az(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var YT=new tt("mat-tooltip-default-options",{providedIn:"root",factory:Az}),KJ="mat-mdc-tooltip-panel",Iz="tooltip-panel",kz=ms({passive:!0}),XJ=8,ZJ=8,JJ=24,eee=200,zt=(()=>{let t=class t{get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=mt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let i=mt(e);this._disabled!==i&&(this._disabled=i,i?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Ao(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Ao(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){let i=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(i)}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(e,i,o,a,s,c,u,f,_,I,S,F){this._overlay=e,this._elementRef=i,this._scrollDispatcher=o,this._viewContainerRef=a,this._ngZone=s,this._platform=c,this._ariaDescriber=u,this._focusMonitor=f,this._dir=I,this._defaultOptions=S,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=WT,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._touchstartTimeout=null,this._destroyed=new Te,this._injector=Rt(Mn),this._scrollStrategy=_,this._document=F,S&&(this._showDelay=S.showDelay,this._hideDelay=S.hideDelay,S.position&&(this.position=S.position),S.positionAtOrigin&&(this.positionAtOrigin=S.positionAtOrigin),S.touchGestures&&(this.touchGestures=S.touchGestures),S.tooltipClass&&(this.tooltipClass=S.tooltipClass)),I.change.pipe(Be(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=XJ}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Be(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,o])=>{e.removeEventListener(i,o,kz)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let o=this._createOverlay(i);this._detach(),this._portal=this._portal||new $a(this._tooltipComponent,this._viewContainerRef);let a=this._tooltipInstance=o.attach(this._portal).instance;a._triggerElement=this._elementRef.nativeElement,a._mouseLeaveHideDelay=this._hideDelay,a.afterHidden().pipe(Be(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),a.show(e)}hide(e=this.hideDelay){let i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;
31if((!this.positionAtOrigin||!e)&&a._origin instanceof ge)return this._overlayRef;this._detach()}let i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),o=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return o.positionChanges.pipe(Be(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:o,panelClass:`${this._cssClassPrefix}-${Iz}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Be(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Be(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Be(this._destroyed)).subscribe(a=>{this._isTooltipVisible()&&a.keyCode===27&&!po(a)&&(a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let i=e.getConfig().positionStrategy,o=this._getOrigin(),a=this._getOverlayPosition();i.withPositions([this._addOffset(re(re({},o.main),a.main)),this._addOffset(re(re({},o.fallback),a.fallback))])}_addOffset(e){let i=ZJ,o=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-i:e.originY==="bottom"?e.offsetY=i:e.originX==="start"?e.offsetX=o?-i:i:e.originX==="end"&&(e.offsetX=o?i:-i),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",i=this.position,o;i=="above"||i=="below"?o={originX:"center",originY:i=="above"?"top":"bottom"}:i=="before"||i=="left"&&e||i=="right"&&!e?o={originX:"start",originY:"center"}:(i=="after"||i=="right"&&e||i=="left"&&!e)&&(o={originX:"end",originY:"center"});let{x:a,y:s}=this._invertPosition(o.originX,o.originY);return{main:o,fallback:{originX:a,originY:s}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",i=this.position,o;i=="above"?o={overlayX:"center",overlayY:"bottom"}:i=="below"?o={overlayX:"center",overlayY:"top"}:i=="before"||i=="left"&&e||i=="right"&&!e?o={overlayX:"end",overlayY:"center"}:(i=="after"||i=="right"&&e||i=="left"&&!e)&&(o={overlayX:"start",overlayY:"center"});let{x:a,y:s}=this._invertPosition(o.overlayX,o.overlayY);return{main:o,fallback:{overlayX:a,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Lo(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return this.position==="above"||this.position==="below"?i==="top"?i="bottom":i==="bottom"&&(i="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){let{overlayY:i,originX:o,originY:a}=e,s;if(i==="center"?this._dir&&this._dir.value==="rtl"?s=o==="end"?"left":"right":s=o==="start"?"left":"right":s=i==="bottom"&&a==="top"?"above":"below",s!==this._currentPosition){let c=this._overlayRef;if(c){let u=`${this._cssClassPrefix}-${Iz}-`;c.removePanelClass(u+this._currentPosition),c.addPanelClass(u+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let i;e.x!==void 0&&e.y!==void 0&&(i=e),this.show(void 0,i)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let i=e.targetTouches?.[0],o=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let a=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,o)},this._defaultOptions.touchLongPressShowDelay??a)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];
31if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{let o=i.relatedTarget;(!o||!this._overlayRef?.overlayElement.contains(o))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let i=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,o])=>{this._elementRef.nativeElement.addEventListener(i,o,kz)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let i=this._document.elementFromPoint(e.clientX,e.clientY),o=this._elementRef.nativeElement;i!==o&&!o.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let i=this._elementRef.nativeElement,o=i.style;(e==="on"||i.nodeName!=="INPUT"&&i.nodeName!=="TEXTAREA")&&(o.userSelect=o.msUserSelect=o.webkitUserSelect=o.MozUserSelect="none"),(e==="on"||!i.draggable)&&(o.webkitUserDrag="none"),o.touchAction="none",o.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}};t.\u0275fac=function(i){return new(i||t)(h(Vr),h(ge),h(wf),h(ci),h(Bt),h(Ur),h(Sb),h(Po),h(yO),h(mr),h(YT,8),h(Qi))},t.\u0275dir=_e({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(i,o){i&2&&Y("mat-mdc-tooltip-disabled",o.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0});let n=t;return n})(),WT=(()=>{let t=class t{constructor(e,i,o){this._changeDetectorRef=e,this._elementRef=i,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Te,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled=o==="NoopAnimations"}show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>JJ&&e.width>=eee}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let i=this._tooltip.nativeElement,o=this._showAnimation,a=this._hideAnimation;if(i.classList.remove(e?a:o),i.classList.add(e?o:a),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let s=getComputedStyle(i);(s.getPropertyValue("animation-duration")==="0s"||s.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(ge),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-tooltip-component"]],viewQuery:function(i,o){if(i&1&&ae(YJ,7),i&2){let a;Q(a=K())&&(o._tooltip=a.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(i,o){i&1&&T("mouseleave",function(s){return o._handleMouseLeave(s)})},standalone:!0,features:[ot],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1,0),T("animationend",function(c){return D(a),M(o._handleAnimationEnd(c))}),d(2,"div",2),g(3),p()()}i&2&&(Y("mdc-tooltip--multiline",o._isMultiline),m("ngClass",o.tooltipClass),l(3),z(o.message))},dependencies:[ac],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;
31max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-app-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-app-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-app-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-app-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-app-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-app-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-app-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0});let n=t;return n})(),tee={tooltipState:Qn("state",[Ji("initial, void, hidden",Tt({opacity:0,transform:"scale(0.8)"})),Ji("visible",Tt({transform:"scale(1)"})),$i("* => visible",Vi("150ms cubic-bezier(0, 0, 0.2, 1)")),$i("* => hidden",Vi("75ms cubic-bezier(0.4, 0, 1, 1)"))])},vm=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[pc,zi,Bo,Ot,zt,WT],exports:[zt,WT,Ot,_a]}),t.\u0275inj=Nt({providers:[Mz],imports:[pc,zi,Bo,Ot,Ot,_a]});let n=t;return n})();function iee(n,t){if(n&1&&(d(0,"mat-option",17),g(1),p()),n&2){let r=t.$implicit;m("value",r),l(),j(" ",r," ")}}function nee(n,t){if(n&1){let r=B();d(0,"mat-form-field",14)(1,"mat-select",16,0),T("selectionChange",function(i){D(r);let o=b(2);return M(o._changePageSize(i.value))}),Ir(3,iee,2,2,"mat-option",17,Jo),p(),d(5,"div",18),T("click",function(){D(r);let i=me(2);return M(i.open())}),p()()}if(n&2){let r=b(2);m("appearance",r._formFieldAppearance)("color",r.color),l(),m("value",r.pageSize)("disabled",r.disabled)("aria-labelledby",r._pageSizeLabelId)("panelClass",r.selectConfig.panelClass||"")("disableOptionCentering",r.selectConfig.disableOptionCentering),l(2),kr(r._displayedPageSizeOptions)}}
31function ree(n,t){if(n&1&&(d(0,"div",15),g(1),p()),n&2){let r=b(2);l(),z(r.pageSize)}}function oee(n,t){if(n&1&&(d(0,"div",3)(1,"div",13),g(2),p(),x(3,nee,6,7,"mat-form-field",14)(4,ree,2,1,"div",15),p()),n&2){let r=b();l(),Je("id",r._pageSizeLabelId),l(),j(" ",r._intl.itemsPerPageLabel," "),l(),_t(r._displayedPageSizeOptions.length>1?3:-1),l(),_t(r._displayedPageSizeOptions.length<=1?4:-1)}}function aee(n,t){if(n&1){let r=B();d(0,"button",19),T("click",function(){D(r);let i=b();return M(i.firstPage())}),ar(),d(1,"svg",8),O(2,"path",20),p()()}if(n&2){let r=b();m("matTooltip",r._intl.firstPageLabel)("matTooltipDisabled",r._previousButtonsDisabled())("matTooltipPosition","above")("disabled",r._previousButtonsDisabled()),Je("aria-label",r._intl.firstPageLabel)}}function see(n,t){if(n&1){let r=B();d(0,"button",21),T("click",function(){D(r);let i=b();return M(i.lastPage())}),ar(),d(1,"svg",8),O(2,"path",22),p()()}if(n&2){let r=b();m("matTooltip",r._intl.lastPageLabel)("matTooltipDisabled",r._nextButtonsDisabled())("matTooltipPosition","above")("disabled",r._nextButtonsDisabled()),Je("aria-label",r._intl.lastPageLabel)}}var Nf=(()=>{let t=class t{constructor(){this.changes=new Te,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,o)=>{if(o==0||i==0)return`0 of ${o}`;o=Math.max(o,0);let a=e*i,s=a<o?Math.min(a+i,o):a+i;return`${a+1} \u2013 ${s} of ${o}`}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function Oz(n){return n||new Nf}var Pz={provide:Nf,deps:[[new Gd,new zd,Nf]],useFactory:Oz},lee=50,CO=class{},Rz=new tt("MAT_PAGINATOR_DEFAULT_OPTIONS"),cee=0,fc=(()=>{let t=class t{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(e||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=e||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(e||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>Nr(i,0)),this._updateDisplayedPageSizeOptions()}constructor(e,i,o){if(this._intl=e,this._changeDetectorRef=i,this._pageSizeLabelId=`mat-paginator-page-size-label-${cee++}`,this._isInitialized=!1,this._initializedStream=new or(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new J,this.initialized=this._initializedStream,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),o){let{pageSize:a,pageSizeOptions:s,hidePageSize:c,showFirstLastButtons:u}=o;a!=null&&(this._pageSize=a),s!=null&&(this._pageSizeOptions=s),c!=null&&(this.hidePageSize=c),u!=null&&(this.show
31FirstLastButtons=u)}this._formFieldAppearance=o?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;let e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;let e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;let e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndex<e&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(e){let i=this.pageIndex*this.pageSize,o=this.pageIndex;this.pageIndex=Math.floor(i/e)||0,this.pageSize=e,this._emitPageEvent(o)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:lee),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((e,i)=>e-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}};t.\u0275fac=function(i){return new(i||t)(h(Nf),h(Me),h(Rz,8))},t.\u0275cmp=L({type:t,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",Nr],length:[2,"length","length",Nr],pageSize:[2,"pageSize","pageSize",Nr],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",Re],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",Re],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",Re]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[si,ot],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(i,o){i&1&&(d(0,"div",1)(1,"div",2),x(2,oee,5,4,"div",3),d(3,"div",4)(4,"div",5),g(5),p(),x(6,aee,3,5,"button",6),d(7,"button",7),T("click",function(){return o.previousPage()}),ar(),d(8,"svg",8),O(9,"path",9),p()(),cs(),d(10,"button",10),T("click",function(){return o.nextPage()}),ar(),d(11,"svg",8),O(12,"path",11),p()(),x(13,see,3,5,"button",12),p()()()),i&2&&(l(2),_t(o.hidePageSize?-1:2),l(3),j(" ",o._intl.getRangeLabel(o.pageIndex,o.pageSize,o.length)," "),l(),_t(o.showFirstLastButtons?6:-1),l(),m("matTooltip",o._intl.previousPageLabel)("matTooltipDisabled",o._previousButtonsDisabled())("matTooltipPosition","above")("disabled",o._previousButtonsDisabled()),Je("aria-label",o._intl.previousPageLabel),l(3),m("matTooltip",o._intl.nextPageLabel)("matTooltipDisabled",o._nextButtonsDisabled())("matTooltipPosition","above")("disabled",o._nextButtonsDisabled()),Je("aria-label",o._intl.nextPageLabel),l(3),_t(o.showFirstLastButtons?13:-1))},dependencies:[ze,Kn,xt,Pe,zt],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-app-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-app-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-app-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-app-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-app-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-app-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-app-body-small-tracking));--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-app-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;
31fill:var(--mat-paginator-enabled-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}"],encapsulation:2,changeDetection:0});let n=t;return n})(),n_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[va,Pu,vm,fc],exports:[fc]}),t.\u0275inj=Nt({providers:[Pz],imports:[va,Pu,vm,fc]});let n=t;return n})();var Vf={};Ae(Vf,{MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS:()=>Fz,MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY:()=>Nz,MatProgressSpinner:()=>Za,MatProgressSpinnerModule:()=>r_,MatSpinner:()=>xO});y();var dee=["determinateSpinner"];function pee(n,t){if(n&1&&(ar(),d(0,"svg",11),O(1,"circle",12),p()),n&2){let r=b
31();Je("viewBox",r._viewBox()),l(),hi("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeCircumference()/2,"px")("stroke-width",r._circleStrokeWidth(),"%"),Je("r",r._circleRadius())}}var Fz=new tt("mat-progress-spinner-default-options",{providedIn:"root",factory:Nz});function Nz(){return{diameter:Vz}}var Vz=100,mee=10,Za=(()=>{let t=class t{get color(){return this._color||this._defaultColor}set color(e){this._color=e}constructor(e,i,o){this._elementRef=e,this._defaultColor="primary",this._value=0,this._diameter=Vz,this._noopAnimations=i==="NoopAnimations"&&!!o&&!o._forceAnimations,this.mode=e.nativeElement.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",o&&(o.color&&(this.color=this._defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth))}get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_circleRadius(){return(this.diameter-mee)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Er,8),h(Fz))},t.\u0275cmp=L({type:t,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(i,o){if(i&1&&ae(dee,5),i&2){let a;Q(a=K())&&(o._determinateCircle=a.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(i,o){i&2&&(Je("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),bt("mat-"+o.color),hi("width",o.diameter,"px")("height",o.diameter,"px")("--mdc-circular-progress-size",o.diameter+"px")("--mdc-circular-progress-active-indicator-width",o.diameter+"px"),Y("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",Nr],diameter:[2,"diameter","diameter",
31Nr],strokeWidth:[2,"strokeWidth","strokeWidth",Nr]},exportAs:["matProgressSpinner"],standalone:!0,features:[si,ot],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(i,o){if(i&1&&(x(0,pee,2,8,"ng-template",null,0,kt),d(2,"div",2,1),ar(),d(4,"svg",3),O(5,"circle",4),p()(),cs(),d(6,"div",5)(7,"div",6)(8,"div",7),Ti(9,8),p(),d(10,"div",9),Ti(11,8),p(),d(12,"div",10),Ti(13,8),p()()()),i&2){let a=me(1);l(4),Je("viewBox",o._viewBox()),l(),hi("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),Je("r",o._circleRadius()),l(4),m("ngTemplateOutlet",a),l(2),m("ngTemplateOutlet",a),l(2),m("ngTemplateOutlet",a)}},dependencies:[fo],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, var(--mat-app-primary))}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0});let n=t;return n})(),xO=Za,r_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[zi,Za,xO],exports:[Za,xO,Ot]}),t.\u0275inj=Nt({imports:[zi,Ot]});let n=t;return n})();var zz={};Ae(zz,{MAT_RADIO_DEFAULT_OPTIONS:()=>jz,MAT_RADIO_DEFAULT_OPTIONS_FACTORY:()=>Gz,MAT_RADIO_GROUP:()=>SO,MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR:()=>Bz,MatRadioButton:()=>Lf,MatRadioChange:()=>KC,MatRadioGroup:()=>o_,MatRadioModule:()=>a_});y();var uee=["input"],hee=["formField"],fee=["*"],Lz=0,KC=class{constructor(t,r){this.source=t,this.value=r}},Bz={provide:ye,useExisting:he(()=>o_),multi:!0},SO=new tt("MatRadioGroup"),jz=new tt("mat-radio-default-options",{providedIn:"root",factory:Gz});function Gz(){return{color:"accent",disabledInteractive:!1}}var o_=(()=>{let t=class t{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${Lz++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new J,this._disabledInteractive=!1}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}
31_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new KC(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275dir=_e({type:t,selectors:[["mat-radio-group"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,Lf,5),i&2){let s;Q(s=K())&&(o._radios=s)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",Re],required:[2,"required","required",Re],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Re]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[ne([Bz,{provide:SO,useExisting:t}]),si]});let n=t;return n})(),Lf=(()=>{let t=class t{get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(e){this._color=e}get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,o,a,s,c,u,f){this._elementRef=i,this._changeDetector=o,this._focusMonitor=a,this._radioDispatcher=s,this._defaultOptions=u,this._ngZone=Rt(Bt),this._uniqueId=`mat-radio-${++Lz}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new J,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=Rt(Mn),this._onInputClick=_=>{this.disabled&&this.disabledInteractive&&_.preventDefault()},this.radioGroup=e,this._noopAnimations=c==="NoopAnimations",this._disabledInteractive=u?.disabledInteractive??!1,f&&(this.tabIndex=Nr(f,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._inputElement.nativeElement.addEventListener("click",this._onInputClick)})}ngOnDestroy(){this._inputElement?.nativeElement.removeEventListener("click",this._onInputClick),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new KC(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._c
31ontrolValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let o=this._inputElement?.nativeElement;o&&(o.setAttribute("tabindex",i+""),this._previousTabIndex=i,Lo(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===o&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===o&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};t.\u0275fac=function(i){return new(i||t)(h(SO,8),h(ge),h(Me),h(Po),h(wb),h(Er,8),h(jz,8),ja("tabindex"))},t.\u0275cmp=L({type:t,selectors:[["mat-radio-button"]],viewQuery:function(i,o){if(i&1&&(ae(uee,5),ae(hee,7,ge)),i&2){let a;Q(a=K())&&(o._inputElement=a.first),Q(a=K())&&(o._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(i,o){i&1&&T("focus",function(){return o._inputElement.nativeElement.focus()}),i&2&&(Je("id",o.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),Y("mat-primary",o.color==="primary")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("mat-mdc-radio-checked",o.checked)("mat-mdc-radio-disabled",o.disabled)("mat-mdc-radio-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",Re],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Nr(e)],checked:[2,"checked","checked",Re],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",Re],required:[2,"required","required",Re],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Re]},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[si,ot],ngContentSelectors:fee,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"div",2,0)(2,"div",3)(3,"div",4),T("click",function(c){return D(a),M(o._onTouchTargetClick(c))}),p(),d(4,"input",5,1),T("change",function(c){return D(a),M(o._onInputInteraction(c))}),p(),d(6,"div",6),O(7,"div",7)(8,"div",8),p(),d(9,"div",9),O(10,"div",10),p()(),d(11,"label",11),Fe(12),p()()}i&2&&(m("labelPosition",o.labelPosition),l(2),Y("mdc-radio--disabled",o.disabled),l(2),m("id",o.inputId)("checked",o.checked)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Je("name",o.name)("value",o.value)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),l(5),m("matRippleTrigger",o._rippleTrigger.nativeElement)("matRippleDisabled",o._isRippleDisabled())("matRippleCentered",!0),l(2),m("for",o.inputId))},dependencies:[Wa,Ib],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner
31-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner
31-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-app-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-app-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}
31[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let n=t;return n})(),a_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,zi,Ya,o_,Lf],exports:[Ot,o_,Lf]}),t.\u0275inj=Nt({imports:[Ot,zi,Ya,Lf,Ot]});let n=t;return n})();var Iee={};Ae(Iee,{MAT_DRAWER_DEFAULT_AUTOSIZE:()=>$z,MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY:()=>Uz,MatDrawer:()=>XC,MatDrawerContainer:()=>ZC,MatDrawerContent:()=>Bf,MatSidenav:()=>QT,MatSidenavContainer:()=>KT,MatSidenavContent:()=>JC,MatSidenavModule:()=>s_,matDrawerAnimations:()=>TO,throwMatDuplicatedDrawerError:()=>Eee});y();var XT=["*"],gee=["content"],bee=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],_ee=["mat-drawer","mat-drawer-content","*"];function vee(n,t){if(n&1){let r=B();d(0,"div",1),T("click",function(){D(r);let i=b();return M(i._onBackdropClicked())}),p()}if(n&2){let r=b();Y("mat-drawer-shown",r._isShowingBackdrop())}}function yee(n,t){n&1&&(d(0,"mat-drawer-content"),Fe(1,2),p())}var Cee=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],wee=["mat-sidenav","mat-sidenav-content","*"];function xee(n,t){if(n&1){let r=B();d(0,"div",1),T("click",function(){D(r);let i=b();return M(i._onBackdropClicked())}),p()}if(n&2){let r=b();Y("mat-drawer-shown",r._isShowingBackdrop())}}function See(n,t){n&1&&(d(0,"mat-sidenav-content"),Fe(1,2),p())}var Tee='.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-app-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-app-background));box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-app-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color, var(--mat-app-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}',TO={transformDrawer:Qn("transform",[Ji("open, open-instant",Tt({transform:"none",visibility:"visible"})),Ji("void",Tt({"box-shadow":"none",visibility:"hidden"})),$i("void => open-instant",Vi("0ms")),$i("void <=> open, open-instant => void",Vi("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])};function Eee(n){throw Error(`A drawer was already declared for 'position="${n}"'`)}var $z=new tt("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:Uz}),EO=new tt("MAT_DRAWER_CONTAINER");function Uz(){return!1}var Bf=(()=>{let t=class t extends Iu{constructor(e,i,o,a,s){super(o,a,s),this._changeDetectorRef=e,this._container=i}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(he(()=>ZC)),h(ge),h(wf),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(i,o){i&2&&hi("margin-left",o._container._contentMargins.left,"px")("margin-right",o._container._contentMargins.right,"px")},standalone:!0,features:[ne([{provide:Iu,useExisting:t}]),Ce,ot],ngContentSelectors:XT,decls:1,vars:0,template:function(i,o){i&1&&(Ct(
31),Fe(0))},encapsulation:2,changeDetection:0});let n=t;return n})(),XC=(()=>{let t=class t{get position(){return this._position}set position(e){e=e==="end"?"end":"start",e!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=mt(e)}get autoFocus(){let e=this._autoFocus;return e??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(e){(e==="true"||e==="false"||e==null)&&(e=mt(e)),this._autoFocus=e}get opened(){return this._opened}set opened(e){this.toggle(mt(e))}constructor(e,i,o,a,s,c,u,f){this._elementRef=e,this._focusTrapFactory=i,this._focusMonitor=o,this._platform=a,this._ngZone=s,this._interactivityChecker=c,this._doc=u,this._container=f,this._focusTrap=null,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new Te,this._animationEnd=new Te,this._animationState="void",this.openedChange=new J(!0),this._openedStream=this.openedChange.pipe(Pi(_=>_),W(()=>{})),this.openedStart=this._animationStarted.pipe(Pi(_=>_.fromState!==_.toState&&_.toState.indexOf("open")===0),zy(void 0)),this._closedStream
31=this.openedChange.pipe(Pi(_=>!_),W(()=>{})),this.closedStart=this._animationStarted.pipe(Pi(_=>_.fromState!==_.toState&&_.toState==="void"),zy(void 0)),this._destroyed=new Te,this.onPositionChanged=new J,this._modeChanged=new Te,this._injector=Rt(Mn),this._changeDetectorRef=Rt(Me),this.openedChange.pipe(Be(this._destroyed)).subscribe(_=>{_?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{Jn(this._elementRef.nativeElement,"keydown").pipe(Pi(_=>_.keyCode===27&&!this.disableClose&&!po(_)),Be(this._destroyed)).subscribe(_=>this._ngZone.run(()=>{this.close(),_.stopPropagation(),_.preventDefault()}))}),this._animationEnd.subscribe(_=>{let{fromState:I,toState:S}=_;(S.indexOf("open")===0&&I==="void"||S==="void"&&I.indexOf("open")===0)&&this.openedChange.emit(this._opened)})}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{e.removeEventListener("blur",o),e.removeEventListener("mousedown",o),e.removeAttribute("tabindex")};e.addEventListener("blur",o),e.addEventListener("mousedown",o)})),e.focus(i)}_focusByCssSelector(e,i){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,i)}_takeFocus(){if(!this._focusTrap)return;let e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":Lo(()=>{!this._focusTrap.focusInitialElement()&&typeof e.focus=="function"&&e.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(e){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){let e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,i){e&&i&&(this._openedVia=i);let o=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),o}_setOpen(e,i,o){return this._opened=e,e?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",i&&this._restoreFocus(o)),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(a=>{this.openedChange.pipe($n(1)).subscribe(s=>a(s?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop&&this.opened)}_updatePositionInParent(e){if(!this._platform.isBrowser)return;let i=this._elementRef.nativeElement,o=i.parentNode;e==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),o.insertBefore(this._anchor,i)),o.appendChild(i)):this._anchor&&this._anchor.parentNode.insertBefore(i,this._anchor)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(mj),h(Po),h(Ur),h(Bt),h(tT),h(Qi,8),h(EO,8))},t.\u0275cmp=L({type:t,selectors:[["mat-drawer"]],viewQuery:function(i,o){if(i&1&&ae(gee,5),i&2){let a;Q(a=K())&&(o._content=a.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(i,o){i&1&&cb("@transform.start",function(s){return o._animationStarted.next(s)})("@transform.done",function(s){return o._animationEnd.next(s)}),i&2&&(lb("@transform",o._animationState),Je("align",null),Y("mat-drawer-end",o.position==="end")("mat-drawer-over",o.mode==="over")("mat-drawer-push",o.mode==="push")("mat-drawer-side",o.mode==="side")("mat-drawer-opened",o.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],standalone:!0,features:[ot],ngContentSelectors:XT,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(i,o){i&1&&(Ct(
31),d(0,"div",1,0),Fe(2),p())},dependencies:[Iu],encapsulation:2,data:{animation:[TO.transformDrawer]},changeDetection:0});let n=t;return n})(),ZC=(()=>{let t=class t{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=mt(e)}get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(e){this._backdropOverride=e==null?null:mt(e)}get scrollable(){return this._userContent||this._content}constructor(e,i,o,a,s,c=!1,u){this._dir=e,this._element=i,this._ngZone=o,this._changeDetectorRef=a,this._animationMode=u,this._drawers=new Bs,this.backdropClick=new J,this._destroyed=new Te,this._doCheckSubject=new Te,this._contentMargins={left:null,right:null},this._contentMarginChanges=new Te,this._injector=Rt(Mn),e&&e.change.pipe(Be(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),s.change().pipe(Be(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=c}ngAfterContentInit(){this._allDrawers.changes.pipe(on(this._allDrawers),Be(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(i=>!i._container||i._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(on(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Wi(10),Be(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,i=0;if(this._left&&this._left.opened){if(this._left.mode=="side")e+=this._left._getWidth();else if(this._left.mode=="push"){let o=this._left._getWidth();e+=o,i-=o}}if(this._right&&this._right.opened){if(this._right.mode=="side")i+=this._right._getWidth();else if(this._right.mode=="push"){let o=this._right._getWidth();i+=o,e-=o}}e=e||null,i=i||null,(e!==this._contentMargins.left||i!==this._contentMargins.right)&&(this._contentMargins={left:e,right:i},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe(Pi(i=>i.fromState!==i.toState),Be(this._drawers.changes)).subscribe(i=>{i.toState!=="open-instant"&&this._animationMode!=="NoopAnimations"&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),e.mode!=="side"&&e.openedChange.pipe(Be(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e&&e.onPositionChanged.pipe(Be(this._drawers.changes)).subscribe(()=>{Lo(()=>{this._validateDrawers()},{injector:this._injector,phase:vB.Read})})}_watchDrawerMode(e){e&&e._modeChanged.pipe(Be(Xt(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){let i=this._element.nativeElement.classList,o="mat-drawer-container-has-open";e?i.add(o):i.remove(o)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{e.position=="end"?(this._end!=null,this._end=e):(this._start!=null,this._start=e)}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>
31e&&!e.disableClose&&this._drawerHasBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(e){return e!=null&&e.opened}_drawerHasBackdrop(e){return this._backdropOverride==null?!!e&&e.mode!=="side":this._backdropOverride}};t.\u0275fac=function(i){return new(i||t)(h(mr,8),h(ge),h(Bt),h(Me),h(lc),h($z),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,Bf,5),Zt(a,XC,5)),i&2){let s;Q(s=K())&&(o._content=s.first),Q(s=K())&&(o._allDrawers=s)}},viewQuery:function(i,o){if(i&1&&ae(Bf,5),i&2){let a;Q(a=K())&&(o._userContent=a.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(i,o){i&2&&Y("mat-drawer-container-explicit-backdrop",o._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],standalone:!0,features:[ne([{provide:EO,useExisting:t}]),ot],ngContentSelectors:_ee,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(i,o){i&1&&(Ct(bee),x(0,vee,1,2,"div",0),Fe(1),Fe(2,1),x(3,yee,2,0,"mat-drawer-content")),i&2&&(_t(o.hasBackdrop?0:-1),l(3),_t(o._content?-1:3))},dependencies:[Bf],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-app-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-app-background));box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-app-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color, var(--mat-app-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-app-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0});let n=t;return n})(),JC=(()=>{let t=class t extends Bf{constructor(e,i,o,a,s){super(e,i,o,a,s)}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(he(()=>KT)),h(ge),h(wf),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(i,o){i&2&&hi("margin-left",o._container._contentMargins.left,"px")("margin-right",o._container._contentMargins.right,"px")},standalone:!0,features:[ne([{provide:Iu,useExisting:t}]),Ce,ot],ngContentSelectors:XT,decls:1,vars:0,template:function(i,o){i&1&&(Ct(
31),Fe(0))},encapsulation:2,changeDetection:0});let n=t;return n})(),QT=(()=>{let t=class t extends XC{constructor(){super(...arguments),this._fixedInViewport=!1,this._fixedTopGap=0,this._fixedBottomGap=0}get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(e){this._fixedInViewport=mt(e)}get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(e){this._fixedTopGap=Ao(e)}get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(e){this._fixedBottomGap=Ao(e)}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(i,o){i&2&&(Je("align",null),hi("top",o.fixedInViewport?o.fixedTopGap:null,"px")("bottom",o.fixedInViewport?o.fixedBottomGap:null,"px"),Y("mat-drawer-end",o.position==="end")("mat-drawer-over",o.mode==="over")("mat-drawer-push",o.mode==="push")("mat-drawer-side",o.mode==="side")("mat-drawer-opened",o.opened)("mat-sidenav-fixed",o.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],standalone:!0,features:[Ce,ot],ngContentSelectors:XT,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(i,o){i&1&&(Ct(),d(0,"div",1,0),Fe(2),p())},dependencies:[Iu],encapsulation:2,data:{animation:[TO.transformDrawer]},changeDetection:0});let n=t;return n})(),KT=(()=>{let t=class t extends ZC{constructor(){super(...arguments),this._allDrawers=void 0,this._content=void 0}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-sidenav-container"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,JC,5),Zt(a,QT,5)),i&2){let s;Q(s=K())&&(o._content=s.first),Q(s=K())&&(o._allDrawers=s)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(i,o){i&2&&Y("mat-drawer-container-explicit-backdrop",o._backdropOverride)},exportAs:["matSidenavContainer"],standalone:!0,features:[ne([{provide:EO,useExisting:t}]),Ce,ot],ngContentSelectors:wee,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(i,o){i&1&&(Ct(Cee),x(0,xee,1,2,"div",0),Fe(1),Fe(2,1),x(3,See,2,0,"mat-sidenav-content")),i&2&&(_t(o.hasBackdrop?0:-1),l(3),_t(o._content?-1:3))},dependencies:[JC],styles:[Tee],encapsulation:2,changeDetection:0});let n=t;return n})(),s_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,_a,XC,ZC,Bf,QT,KT,JC],exports:[_a,Ot,XC,ZC,Bf,QT,KT,JC]}),t.\u0275inj=Nt({imports:[Ot,_a,_a,Ot]});let n=t;return n})();var ip={};Ae(ip,{MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS:()=>Hz,MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR:()=>Wz,MAT_SLIDE_TOGGLE_VALUE_ACCESSOR:()=>qz,MatSlideToggle:()=>jo,MatSlideToggleChange:()=>ew,MatSlideToggleModule:()=>l_,MatSlideToggleRequiredValidator:()=>ZT,_MatSlideToggleRequiredValidatorModule:()=>Oee});y();var kee=["switch"],Dee=["*"];function Mee(n,t){n&1&&(d(0,"span",10),ar(),d(1,"svg",12),O(2,"path",13),p(),d(3,"svg",14),O(4,"path",15),p()())}var Hz=new tt("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),qz={provide:ye,useExisting:he(()=>jo),multi:!0},ew=class{constructor(t,r){this.source=t,this.checked=r}},Aee=0,jo=(()=>{let t=class t{_createChangeEvent(e){return new ew(this,e)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,o,a,s,c){this._elementRef=e,this._focusMonitor=i,this._changeDetectorRef=o,this.defaults=s,this._onChange=u=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new J,this.toggleChange=new J,this.tabIndex=parseInt(a)||0,this.color=s.color||"accent",this._noopAnimations=c==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++Aee}`,this.hideIcon=s.hideIcon??!1,this.disabledInteractive=s.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}
31ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new ew(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Po),h(Me),ja("tabindex"),h(Hz),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(i,o){if(i&1&&ae(kee,5),i&2){let a;Q(a=K())&&(o._switchElement=a.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,o){i&2&&(lo("id",o.id),Je("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),bt(o.color?"mat-"+o.color:""),Y("mat-mdc-slide-toggle-focused",o._focused)("mat-mdc-slide-toggle-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",Re],color:"color",disabled:[2,"disabled","disabled",Re],disableRipple:[2,"disableRipple","disableRipple",Re],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Nr(e)],checked:[2,"checked","checked",Re],hideIcon:[2,"hideIcon","hideIcon",Re],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Re]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[ne([qz,{provide:zn,useExisting:t,multi:!0}]),si,lt,ot],ngContentSelectors:Dee,decls:13,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"div",1)(1,"button",2,0),T("click",function(){return D(a),M(o._handleClick())}),O(3,"span",3),d(4,"span",4)(5,"span",5)(6,"span",6),O(7,"span",7),p(),d(8,"span",8),O(9,"span",9),p(),x(10,Mee,5,0,"span",10),p()()(),d(11,"label",11),T("click",function(c){return D(a),M(c.stopPropagation())}),Fe(12),p()()}if(i&2){let a=me(2);m("labelPosition",o.labelPosition),l(),Y("mdc-switch--selected",o.checked)("mdc-switch--unselected",!o.checked)("mdc-switch--checked",o.checked)("mdc-switch--disabled",o.disabled)("mat-mdc-slide-toggle-disabled-interactive",o.disabledInteractive),m("tabIndex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex)("disabled",o.disabled&&!o.disabledInteractive),Je("id",o.buttonId)("name",o.name)("aria-label",o.ariaLabel)("aria-labelledby",o._getAriaLabelledBy())("aria-describedby",o.ariaDescribedby)("aria-required",o.required||null)("aria-checked",o.checked)("aria-disabled",o.disabled&&o.disabledInteractive?"true":null),l(8),m("matRippleTrigger",a)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),l(),_t(o.hideIcon?-1:10),l(),m("for",o.buttonId),Je("id",o._labelId)}},dependencies:[Wa,Ib],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height);border-radius:var(--mdc-switch-track-shape, var(--mat-app-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color, var(--mat-app-outline))}.cdk-high-contrast-active .mdc-switch__track::before,.cdk-high-contrast-active .mdc-switch__track::after{border-color:currentColor}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width);border-color:var(--mat-switch-selected-track-outline-color)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color, var(--mat-app-on-surface))}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color, var(--mat-app-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}
31.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, var(--mat-app-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, var(--mat-app-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, var(--mat-app-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, var(--mat-app-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color, var(--mat-app-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, var(--mat-app-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, var(--mat-app-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, var(--mat-app-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, var(--mat-app-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape, var(--mat-app-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size);margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size);margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}.cdk-high-contrast-active .mdc-switch__handle::before,.cdk-high-contrast-active .mdc-switch__handle::after{border-color:currentColor}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mat-app-on-primary))}
31.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, var(--mat-app-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, var(--mat-app-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, var(--mat-app-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, var(--mat-app-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, var(--mat-app-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, var(--mat-app-on-surface))}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size);height:var(--mdc-switch-state-layer-size)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color, var(--mat-app-primary));opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size);
31fill:var(--mdc-switch-unselected-icon-color, var(--mat-app-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mat-app-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size);fill:var(--mdc-switch-selected-icon-color, var(--mat-app-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mat-app-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-switch-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-switch-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-switch-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-switch-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-switch-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0});let n=t;return n})(),Wz={provide:zn,useExisting:he(()=>ZT),multi:!0},ZT=(()=>{let t=class t extends cT{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],standalone:!0,features:[ne([Wz]),Ce]});let n=t;return n})(),Oee=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[ZT],exports:[ZT]}),t.\u0275inj=Nt({});let n=t;return n})(),l_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[jo,Ot],exports:[jo,Ot]}),t.\u0275inj=Nt({imports:[jo,Ot,Ot]});let n=t;return n})();var kO={};Ae(kO,{MAT_SORT_DEFAULT_OPTIONS:()=>IO,MAT_SORT_HEADER_INTL_PROVIDER:()=>Qz,MAT_SORT_HEADER_INTL_PROVIDER_FACTORY:()=>Yz,MatSort:()=>gc,MatSortHeader:()=>Gf,MatSortHeaderIntl:()=>tw,MatSortModule:()=>c_,matSortAnimations:()=>jf});y();var Pee=["mat-sort-header",""],Ree=["*"];function Fee(n,t){if(n&1){let r=B();d(0,"div",2),T("@arrowPosition.start",function(){D(r);let i=b();return M(i._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){D(r);let i=b();return M(i._disableViewStateAnimation=!1)}),O(1,"div",3),d(2,"div",4),O(3,"div",5)(4,"div",6)(5,"div",7),p()()}if(n&2){let r=b();m("@arrowOpacity",r._getArrowViewState())("@arrowPosition",r._getArrowViewState())("@allowChildren",r._getArrowDirectionState()),l(2),m("@indicator",r._getArrowDirectionState()),l(),m("@leftPointer",r._getArrowDirectionState()),l(),m("@rightPointer",r._getArrowDirectionState())}}var IO=new tt("MAT_SORT_DEFAULT_OPTIONS"),gc=(()=>{let t=class t{get direction(){return this._direction}set direction(e){this._direction=e}constructor(e){this._defaultOptions=e,this._initializedStream=new or(1),this.sortables=new Map,this._stateChanges=new Te,this.start="asc",this._direction="",this.disabled=!1,this.sortChange=new J,this.initialized=this._initializedStream}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let i=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,o=Nee(e.start||this.start,i),a=o.indexOf(this.direction)+1;return a>=o.length&&(a=0),o[a]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}};t.\u0275fac=function(i){return new(i||t)(h(IO,8))},t.\u0275dir=_e({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",Re],disabled:[2,"matSortDisabled","disabled",Re]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],standalone:!0,features:[si,lt]});let n=t;return n})();function Nee(n,t){let r=["asc","desc"];return n=="desc"&&r.reverse(),t||r.push(""),r}var ju=fj.ENTERING+" "+hj.STANDARD_CURVE,jf={indicator:Qn("indicator",[Ji("active-asc, asc",Tt({transform:"translateY(0px)"})),Ji("active-desc, desc",Tt({transform:"translateY(10px)"})),$i("active-asc <=> active-desc",Vi(ju))]),leftPointer:Qn("leftPointer",[Ji("active-asc, asc",Tt({transform:"rotate(-45deg)"})),Ji("active-desc, desc",Tt({transform:"rotate(45deg)"})),$i("active-asc <=> active-desc",Vi(ju))]),rightPointer:Qn("rightPointer",[Ji("active-asc, asc",Tt({transform:"rotate(45deg)"})),Ji("active-desc, desc",Tt({transform:"rotate(-45deg)"})),$i("active-asc <=> active-desc",Vi(ju))]),arrowOpacity:Qn("arrowOpacity",[Ji("desc-to-active, asc-to-active, active",Tt({opacity:1})),Ji("desc-to-hint, asc-to-hint, hint",Tt({opacity:.54})),Ji("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Tt({opacity:0}
31)),$i("* => asc, * => desc, * => active, * => hint, * => void",Vi("0ms")),$i("* <=> *",Vi(ju))]),arrowPosition:Qn("arrowPosition",[$i("* => desc-to-hint, * => desc-to-active",Vi(ju,al([Tt({transform:"translateY(-25%)"}),Tt({transform:"translateY(0)"})]))),$i("* => hint-to-desc, * => active-to-desc",Vi(ju,al([Tt({transform:"translateY(0)"}),Tt({transform:"translateY(25%)"})]))),$i("* => asc-to-hint, * => asc-to-active",Vi(ju,al([Tt({transform:"translateY(25%)"}),Tt({transform:"translateY(0)"})]))),$i("* => hint-to-asc, * => active-to-asc",Vi(ju,al([Tt({transform:"translateY(0)"}),Tt({transform:"translateY(-25%)"})]))),Ji("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Tt({transform:"translateY(0)"})),Ji("hint-to-desc, active-to-desc, desc",Tt({transform:"translateY(-25%)"})),Ji("hint-to-asc, active-to-asc, asc",Tt({transform:"translateY(25%)"}))]),allowChildren:Qn("allowChildren",[$i("* <=> *",[sl("@*",Xy(),{optional:!0})])])},tw=(()=>{let t=class t{constructor(){this.changes=new Te}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function Yz(n){return n||new tw}var Qz={provide:tw,deps:[[new Gd,new zd,tw]],useFactory:Yz},Gf=(()=>{let t=class t{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}constructor(e,i,o,a,s,c,u,f){this._intl=e,this._changeDetectorRef=i,this._sort=o,this._columnDef=a,this._focusMonitor=s,this._elementRef=c,this._ariaDescriber=u,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this.disabled=!1,this._sortActionDescription="Sort",f?.arrowPosition&&(this.arrowPosition=f?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=!!e;i!==this._showIndicatorHint&&(this._setIndicatorHintVisible(i),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_setIndicatorHintVisible(e){this._isDisabled()&&e||(this._showIndicatorHint=e,this._isSorted()||(this._updateArrowDirection(),this._showIndicatorHint?this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"hint"}):this._setAnimationTransitionState({fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(e){this._viewState=e||{},this._disableViewStateAnimation&&(this._viewState={toState:e.toState})}_toggleOnInteraction(){this._sort.sort(this),(this._viewState.toState==="hint"||this._viewState.toState==="active")&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(e){!this._isDisabled()&&(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){let e=this._viewState.fromState;return(e?`${e}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}_handleStateChanges(){this._rerenderSubscription=Xt(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),(this._viewState.toState==="hint"||this._viewState.toState==="active")&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&this._viewState.toState==="active"&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}};t.\u0275fac=function(i){return new(i||t)(h(tw),h(Me),h(gc,8),h("MAT_SORT_HEADER_COLUMN_DEF",8),h(Po),h(ge),h(Sb,8),h(IO,8))},t.\u0275cmp=L({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(i,o){i&1&&T("click",function(){return o._handleClick()})("keydown",function(s){return o._handleKeydown(s)})("mouseenter",function(){return o._setIndicatorHintVisible(!0)})("mouseleave",function(){return o._setIndicatorHintVisible(!1)}),i&2&&(Je("aria-sort",o._getAriaSortAttribute()),Y("mat-sort-header-disabled",o._isDisabled()))},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",Re],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",Re]},exportAs:["matSortHeader"],standalone:!0,features:[si,ot],attrs:Pee,ngContentSelectors:Ree,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(i,o){i&1&&(Ct(
31),d(0,"div",0)(1,"div",1),Fe(2),p(),x(3,Fee,6,6,"div",2),p()),i&2&&(Y("mat-sort-header-sorted",o._isSorted())("mat-sort-header-position-before",o.arrowPosition==="before"),Je("tabindex",o._isDisabled()?null:0)("role",o._isDisabled()?null:"button"),l(3),_t(o._renderArrow()?3:-1))},styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;color:var(--mat-sort-arrow-color, var(--mat-app-on-surface));opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[jf.indicator,jf.leftPointer,jf.rightPointer,jf.arrowOpacity,jf.arrowPosition,jf.allowChildren]},changeDetection:0});let n=t;return n})(),c_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,gc,Gf],exports:[gc,Gf]}),t.\u0275inj=Nt({providers:[Qz],imports:[Ot]});let n=t;return n})();var RO={};Ae(RO,{MAT_STEPPER_INTL_PROVIDER:()=>t6,MAT_STEPPER_INTL_PROVIDER_FACTORY:()=>e6,MatStep:()=>zu,MatStepContent:()=>u_,MatStepHeader:()=>p_,MatStepLabel:()=>np,MatStepper:()=>Cm,MatStepperIcon:()=>m_,MatStepperIntl:()=>rw,MatStepperModule:()=>h_,MatStepperNext:()=>OO,MatStepperPrevious:()=>PO,matStepperAnimations:()=>AO});y();y();var Vee=["*"];function Lee(n,t){n&1&&Fe(0)}var iw=(()=>{let t=class t{constructor(e){this._elementRef=e}focus(){this._elementRef.nativeElement.focus()}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"],standalone:!0});let n=t;return n})(),nw=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["","cdkStepLabel",""]],standalone:!0});let n=t;return n})(),Bee=0;var ym={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},DO=new tt("STEPPER_GLOBAL_OPTIONS"),d_=(()=>{let t=class t{get completed(){return this._completedOverride==null?this._getDefaultCompleted():this._completedOverride}set completed(e){this._completedOverride=e}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return this._customError==null?this._getDefaultError():this._customError}set hasError(e){this._customError=e}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(e,i){this._stepper=e,this.interacted=!1,this.interactedStream=new J,this.editable=!0,this.optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=i||{},this._displayDefaultIndicatorType=this._stepperOptions.displayDefaultIndicatorType!==!1}select(){this._stepper.selected=this}reset(){this.interacted=!1,this._completedOverride!=null&&(this._completedOverride=!1),this._customError!=null&&(this._customError=!1),this.stepControl&&(this._childForms?.forEach(e
31=>e.resetForm?.()),this.stepControl.reset())}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??this._customError!=null}};t.\u0275fac=function(i){return new(i||t)(h(he(()=>Gu)),h(DO,8))},t.\u0275cmp=L({type:t,selectors:[["cdk-step"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,nw,5),Zt(a,sT,5)),i&2){let s;Q(s=K())&&(o.stepLabel=s.first),Q(s=K())&&(o._childForms=s)}},viewQuery:function(i,o){if(i&1&&ae(an,7),i&2){let a;Q(a=K())&&(o.content=a.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],state:"state",editable:[2,"editable","editable",Re],optional:[2,"optional","optional",Re],completed:[2,"completed","completed",Re],hasError:[2,"hasError","hasError",Re]},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],standalone:!0,features:[si,lt,ot],ngContentSelectors:Vee,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),x(0,Lee,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let n=t;return n})(),Gu=(()=>{let t=class t{get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this.steps&&this._steps?(this._isValidIndex(e),this.selected?._markAsInteracted(),this._selectedIndex!==e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e)):this._selectedIndex=e}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation(e==="vertical")}constructor(e,i,o){this._dir=e,this._changeDetectorRef=i,this._elementRef=o,this._destroyed=new Te,this.steps=new Bs,this._sortedHeaders=new Bs,this.linear=!1,this._selectedIndex=0,this.selectionChange=new J,this.selectedIndexChange=new J,this._orientation="horizontal",this._groupId=Bee++}ngAfterContentInit(){this._steps.changes.pipe(on(this._steps),Be(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(i=>i._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe(on(this._stepHeader),Be(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((i,o)=>i._elementRef.nativeElement.compareDocumentPosition(o._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new dc(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),(this._dir?this._dir.change:Z()).pipe(on(this._layoutDirection()),Be(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`cdk-step-label-${this._groupId}-${e}`}_getStepContentId(e){return`cdk-step-content-${this._groupId}-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){let i=e-this._selectedIndex;return i<0?this._layoutDirection()==="rtl"?"next":"previous":i>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getIndicatorType(e,i=ym.NUMBER){let o=this.steps.toArray()[e],a=this._isCurrentStep(e);return o._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(o,a):this._getGuidelineLogic(o,a,i)}_getDefaultIndicatorLogic(e,i){return e._showError()&&e.hasError&&!i?ym.ERROR:!e.completed||i?ym.NUMBER:e.editable?ym.EDIT:ym.DONE}_getGuidelineLogic(e,i,o=ym.NUMBER){return e._showError()&&e.hasError&&!i?ym.ERROR:e.completed&&!i?ym.DONE:e.completed&&i?o:e.editable&&i?
31ym.EDIT:o}_isCurrentStep(e){return this._selectedIndex===e}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(e){let i=this.steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:i[e],previouslySelectedStep:i[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e),this._selectedIndex=e,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(e){let i=po(e),o=e.keyCode,a=this._keyManager;a.activeItemIndex!=null&&!i&&(o===32||o===13)?(this.selectedIndex=a.activeItemIndex,e.preventDefault()):a.setFocusOrigin("keyboard").onKeydown(e)}_anyControlsInvalidOrPending(e){return this.linear&&e>=0?this.steps.toArray().slice(0,e).some(i=>{let o=i.stepControl;return(o?o.invalid||o.pending||!i.interacted:!i.completed)&&!i.optional&&!i._completedOverride}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let e=this._elementRef.nativeElement,i=Cb();return e===i||e.contains(i)}_isValidIndex(e){return e>-1&&(!this.steps||e<this.steps.length)}};t.\u0275fac=function(i){return new(i||t)(h(mr,8),h(Me),h(ge))},t.\u0275dir=_e({type:t,selectors:[["","cdkStepper",""]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,d_,5),Zt(a,iw,5)),i&2){let s;Q(s=K())&&(o._steps=s),Q(s=K())&&(o._stepHeader=s)}},inputs:{linear:[2,"linear","linear",Re],selectedIndex:[2,"selectedIndex","selectedIndex",Nr],selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange",selectedIndexChange:"selectedIndexChange"},exportAs:["cdkStepper"],standalone:!0,features:[si]});let n=t;return n})(),JT=(()=>{let t=class t{constructor(e){this._stepper=e,this.type="submit"}};t.\u0275fac=function(i){return new(i||t)(h(Gu))},t.\u0275dir=_e({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(i,o){i&1&&T("click",function(){return o._stepper.next()}),i&2&&lo("type",o.type)},inputs:{type:"type"},standalone:!0});let n=t;return n})(),eE=(()=>{let t=class t{constructor(e){this._stepper=e,this.type="button"}};t.\u0275fac=function(i){return new(i||t)(h(Gu))},t.\u0275dir=_e({type:t,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(i,o){i&1&&T("click",function(){return o._stepper.previous()}),i&2&&lo("type",o.type)},inputs:{type:"type"},standalone:!0});let n=t;return n})(),MO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[R2,d_,Gu,iw,nw,JT,eE],exports:[d_,Gu,iw,nw,JT,eE]}),t.\u0275inj=Nt({imports:[R2]});let n=t;return n})();
31function jee(n,t){if(n&1&&Ti(0,2),n&2){let r=b();m("ngTemplateOutlet",r.iconOverrides[r.state])("ngTemplateOutletContext",r._getIconContext())}}function Gee(n,t){if(n&1&&(d(0,"span",7),g(1),p()),n&2){let r=b(2);l(),z(r._getDefaultTextForState(r.state))}}function zee(n,t){if(n&1&&(d(0,"span",8),g(1),p()),n&2){let r=b(3);l(),z(r._intl.completedLabel)}}function $ee(n,t){if(n&1&&(d(0,"span",8),g(1),p()),n&2){let r=b(3);l(),z(r._intl.editableLabel)}}function Uee(n,t){if(n&1&&(x(0,zee,2,1,"span",8)(1,$ee,2,1,"span",8),d(2,"mat-icon",7),g(3),p()),n&2){let r=b(2);_t(r.state==="done"?0:r.state==="edit"?1:-1),l(3),z(r._getDefaultTextForState(r.state))}}function Hee(n,t){if(n&1&&x(0,Gee,2,1,"span",7)(1,Uee,4,2,"mat-icon",7),n&2){let r,e=b();_t((r=e.state)==="number"?0:1)}}function qee(n,t){n&1&&(d(0,"div",4),Ti(1,9),p()),n&2&&(l(),m("ngTemplateOutlet",t.template))}function Wee(n,t){if(n&1&&(d(0,"div",4),g(1),p()),n&2){let r=b();l(),z(r.label)}}function Yee(n,t){if(n&1&&(d(0,"div",5),g(1),p()),n&2){let r=b();l(),z(r._intl.optionalLabel)}}
31function Qee(n,t){if(n&1&&(d(0,"div",6),g(1),p()),n&2){let r=b();l(),z(r.errorMessage)}}var Kz=["*"];function Kee(n,t){}function Xee(n,t){if(n&1&&(Fe(0),x(1,Kee,0,0,"ng-template",0)),n&2){let r=b();l(),m("cdkPortalOutlet",r._portal)}}var Xz=(n,t)=>({step:n,i:t}),Zz=n=>({animationDuration:n}),Jz=(n,t)=>({value:n,params:t});function Zee(n,t){n&1&&Fe(0)}function Jee(n,t){n&1&&O(0,"div",6)}function ete(n,t){if(n&1&&(Ti(0,5),x(1,Jee,1,0,"div",6)),n&2){let r=t.$implicit,e=t.$index,i=t.$count;b(2);let o=me(4);m("ngTemplateOutlet",o)("ngTemplateOutletContext",Yi(3,Xz,r,e)),l(),_t(e!==i-1?1:-1)}}function tte(n,t){if(n&1){let r=B();d(0,"div",7),T("@horizontalStepTransition.done",function(i){D(r);let o=b(2);return M(o._animationDone.next(i))}),Ti(1,8),p()}if(n&2){let r=t.$implicit,e=t.$index,i=b(2);Y("mat-horizontal-stepper-content-inactive",i.selectedIndex!==e),m("@horizontalStepTransition",Yi(8,Jz,i._getAnimationDirection(e),Xe(6,Zz,i._getAnimationDuration())))("id",i._getStepContentId(e)),Je("aria-labelledby",i._getStepLabelId(e)),l(),m("ngTemplateOutlet",r.content)}}function ite(n,t){if(n&1&&(d(0,"div",1)(1,"div",2),Ir(2,ete,2,6,null,null,Jo),p(),d(4,"div",3),Ir(5,tte,2,11,"div",4,Jo),p()()),n&2){let r=b
31();l(2),kr(r.steps),l(3),kr(r.steps)}}function nte(n,t){if(n&1){let r=B();d(0,"div",9),Ti(1,5),d(2,"div",10)(3,"div",11),T("@verticalStepTransition.done",function(i){D(r);let o=b(2);return M(o._animationDone.next(i))}),d(4,"div",12),Ti(5,8),p()()()()}if(n&2){let r=t.$implicit,e=t.$index,i=t.$count,o=b(2),a=me(4);l(),m("ngTemplateOutlet",a)("ngTemplateOutletContext",Yi(10,Xz,r,e)),l(),Y("mat-stepper-vertical-line",e!==i-1),l(),Y("mat-vertical-stepper-content-inactive",o.selectedIndex!==e),m("@verticalStepTransition",Yi(15,Jz,o._getAnimationDirection(e),Xe(13,Zz,o._getAnimationDuration())))("id",o._getStepContentId(e)),Je("aria-labelledby",o._getStepLabelId(e)),l(2),m("ngTemplateOutlet",r.content)}}function rte(n,t){if(n&1&&Ir(0,nte,6,18,"div",9,Jo),n&2){let r=b();kr(r.steps)}}function ote(n,t){if(n&1){let r=B();d(0,"mat-step-header",13),T("click",function(){let i=D(r).step;return M(i.select())})("keydown",function(i){D(r);let o=b();return M(o._onKeydown(i))}),p()}if(n&2){let r=t.step,e=t.i,i=b();Y("mat-horizontal-stepper-header",i.orientation==="horizontal")("mat-vertical-stepper-header",i.orientation==="vertical"),m("tabIndex",i._getFocusIndex()===e?0:-1)("id",i._getStepLabelId(e))("index",e)("state",i._getIndicatorType(e,r.state))("label",r.stepLabel||r.label)("selected",i.selectedIndex===e)("active",i._stepIsNavigable(e,r))("optional",r.optional)("errorMessage",r.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!i._stepIsNavigable(e,r))("color",r.color||i.color),Je("aria-posinset",e+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(e))("aria-selected",i.selectedIndex==e)("aria-label",r.ariaLabel||null)("aria-labelledby",!r.ariaLabel&&r.ariaLabelledby?r.ariaLabelledby:null)("aria-disabled",i._stepIsNavigable(e,r)?null:!0)}}var np=(()=>{let t=class t extends nw{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matStepLabel",""]],standalone:!0,features:[Ce]});let n=t;return n})(),rw=(()=>{let t=class t{constructor(){this.changes=new Te,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function e6(n){return n||new rw}var t6={provide:rw,deps:[[new Gd,new zd,rw]],useFactory:e6},p_=(()=>{let t=class t extends iw{constructor(e,i,o,a){super(o),this._intl=e,this._focusMonitor=i,this._intlSubscription=e.changes.subscribe(()=>a.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._elementRef,e,i):this._elementRef.nativeElement.focus(i)}_stringLabel(){return this.label instanceof np?null:this.label}_templateLabel(){return this.label instanceof np?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(e){return e=="number"?`${this.index+1}`:e=="edit"?"create":e=="error"?"warning":e}};t.\u0275fac=function(i){return new(i||t)(h(rw),h(Po),h(ge),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],hostVars:2,hostBindings:function(i,o){i&2&&bt("mat-"+(o.color||"primary"))},inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple",color:"color"},standalone:!0,features:[Ce,ot],decls:10,vars:17,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-step-label"],[1,"mat-step-text-label"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[3,"ngTemplateOutlet"]],template:function(i,o){if(i&1&&(O(0,"div",0),d(1,"div")(2,"div",1),x(3,jee,1,2,"ng-container",2)(4,Hee,2,1),p()(),d(5,"div",3),x(6,qee,2,1,"div",4)(7,Wee,2,1,"div",4)(8,Yee,2,1,"div",5)(9,Qee,2,1,"div",6),p()),i&2){let a;m("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disableRipple),l(),yB("mat-step-icon-state-",o.state," mat-step-icon"),Y("mat-step-icon-selected",o.selected),l(2),_t(o.iconOverrides&&o.iconOverrides[o.state]?3:4),l(2),Y("mat-step-label-active",o.active)("mat-step-label-selected",o.selected)("mat-step-label-error",o.state=="error"),l(),_t((a=o._templateLabel())?6:o._stringLabel()?7:-1,a),l(2),_t(o.optional&&o.state!="error"?8:-1),l(),_t(o.state==="error"?9:-1)}},dependencies:[Wa,fo,Se],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}
31.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color);border-radius:var(--mat-stepper-header-hover-state-layer-shape, var(--mat-app-corner-medium))}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color);border-radius:var(--mat-stepper-header-focus-state-layer-shape, var(--mat-app-corner-medium))}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color, var(--mat-app-on-surface-variant))}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color, var(--mat-app-surface));background-color:var(--mat-stepper-header-icon-background-color, var(--mat-app-on-surface-variant))}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color, var(--mat-app-error))}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-stepper-header-label-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-stepper-header-label-text-weight, var(--mat-app-title-small-weight));color:var(--mat-stepper-header-label-text-color, var(--mat-app-on-surface-variant))}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color, var(--mat-app-on-surface-variant))}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color, var(--mat-app-error));font-size:var(--mat-stepper-header-error-state-label-text-size, var(--mat-app-title-small-size))}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-stepper-header-selected-state-label-text-weight, var(--mat-app-title-small-weight))}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color, var(--mat-app-primary));color:var(--mat-stepper-header-selected-state-icon-foreground-color, var(--mat-app-on-primary))}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color, var(--mat-app-primary));color:var(--mat-stepper-header-edit-state-icon-foreground-color, var(--mat-app-on-primary))}'],encapsulation:2,changeDetection:0});let n=t;return n})(),i6="500ms",n6="225ms",AO={horizontalStepTransition:Qn("horizontalStepTransition",[Ji("previous",Tt({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),Ji("current",Tt({transform:"none",visibility:"inherit"})),Ji("next",Tt({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),$i("* => *",Ky([Vi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),sl("@*",Xy(),{optional:!0})]),{params:{animationDuration:i6}})]),verticalStepTransition:Qn("verticalStepTransition",[Ji("previous",Tt({height:"0px",visibility:"hidden"})),Ji("next",Tt({height:"0px",visibility:"hidden"})),Ji("current",Tt({height:"*",visibility:"inherit"})),$i("* <=> current",Ky([Vi("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),sl("@*",Xy(),{optional:!0})]),{params:{animationDuration:n6}})])},m_=(()=>{let t=class t{constructor(e){this.templateRef=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:[0,"matStepperIcon","name"]},standalone:!0});let n=t;return n})(),u_=(()=>{let t=class t{constructor(e){this._template=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["ng-template","matStepContent",""]],standalone:!0});let n=t;return n})(),zu=(()=>{let t=class t extends d_{constructor(e,i,o,a){super(e,a),this._errorStateMatcher=i,this._viewContainerRef
31=o,this._isSelected=ln.EMPTY,this.stepLabel=void 0}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(ii(()=>this._stepper.selectionChange.pipe(W(e=>e.selectedStep===this),on(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new us(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,i){let o=this._errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invalid&&this.interacted);return o||a}};t.\u0275fac=function(i){return new(i||t)(h(he(()=>Cm)),h(Nn,4),h(ci),h(DO,8))},t.\u0275cmp=L({type:t,selectors:[["mat-step"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,np,5),Zt(a,u_,5)),i&2){let s;Q(s=K())&&(o.stepLabel=s.first),Q(s=K())&&(o._lazyContent=s.first)}},hostAttrs:["hidden",""],inputs:{color:"color"},exportAs:["matStep"],standalone:!0,features:[ne([{provide:Nn,useExisting:t},{provide:d_,useExisting:t}]),Ce,ot],ngContentSelectors:Kz,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(i,o){i&1&&(Ct(),x(0,Xee,2,1,"ng-template"))},dependencies:[gl],encapsulation:2,changeDetection:0});let n=t;return n})(),Cm=(()=>{let t=class t extends Gu{get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}constructor(e,i,o){super(e,i,o),this._stepHeader=void 0,this._steps=void 0,this.steps=new Bs,this.animationDone=new J,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new Te,this._animationDuration="",this._isServer=!Rt(Ur).isBrowser;let a=o.nativeElement.nodeName.toLowerCase();this.orientation=a==="mat-vertical-stepper"?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:i})=>this._iconOverrides[e]=i),this.steps.changes.pipe(Be(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe(Be(this._destroyed)).subscribe(e=>{e.toState==="current"&&this.animationDone.emit()})}_stepIsNavigable(e,i){return i.completed||this.selectedIndex===e||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:this.orientation==="horizontal"?i6:n6}};t.\u0275fac=function(i){return new(i||t)(h(mr,8),h(Me),h(ge))},t.\u0275cmp=L({type:t,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,zu,5),Zt(a,m_,5)),i&2){let s;Q(s=K())&&(o._steps=s),Q(s=K())&&(o._icons=s)}},viewQuery:function(i,o){if(i&1&&ae(p_,5),i&2){let a;Q(a=K())&&(o._stepHeader=a)}},hostAttrs:["role","tablist"],hostVars:11,hostBindings:function(i,o){i&2&&(Je("aria-orientation",o.orientation),Y("mat-stepper-horizontal",o.orientation==="horizontal")("mat-stepper-vertical",o.orientation==="vertical")("mat-stepper-label-position-end",o.orientation==="horizontal"&&o.labelPosition=="end")("mat-stepper-label-position-bottom",o.orientation==="horizontal"&&o.labelPosition=="bottom")("mat-stepper-header-position-bottom",o.headerPosition==="bottom"))},inputs:{disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],standalone:!0,features:[ne([{provide:Gu,useExisting:t}]),Ce,ot],ngContentSelectors:Kz,decls:5,vars:2,consts:[["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[1,"mat-horizontal-content-container"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id","mat-horizontal-stepper-content-inactive"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"click","keydown","tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color"]],template:function(i,o){if(i&1&&(Ct(
31),x(0,Zee,1,0)(1,ite,7,0,"div",1)(2,rte,2,0)(3,ote,1,23,"ng-template",null,0,kt)),i&2){let a;_t(o._isServer?0:-1),l(),_t((a=o.orientation)==="horizontal"?1:a==="vertical"?2:-1)}},dependencies:[fo,p_],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font, var(--mat-app-body-medium-font));background:var(--mat-stepper-container-color, var(--mat-app-surface))}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color, var(--mat-app-outline))}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color, var(--mat-app-outline))}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;
31left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color, var(--mat-app-outline));top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[AO.horizontalStepTransition,AO.verticalStepTransition]},changeDetection:0});let n=t;return n})(),OO=(()=>{let t=class t extends JT{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(i,o){i&2&&lo("type",o.type)},standalone:!0,features:[Ce]});let n=t;return n})(),PO=(()=>{let t=class t extends eE{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(i,o){i&2&&lo("type",o.type)},standalone:!0,features:[Ce]});let n=t;return n})(),h_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,zi,cc,MO,Qc,Ya,zu,np,Cm,OO,PO,p_,m_,u_],exports:[Ot,zu,np,Cm,OO,PO,p_,m_,u_]}),t.\u0275inj=Nt({providers:[t6,Nn],imports:[Ot,zi,cc,MO,Qc,Ya,Cm,p_,Ot]});let n=t;return n})();var fw={};Ae(fw,{MatCell:()=>Cc,MatCellDef:()=>bc,MatColumnDef:()=>vc,MatFooterCell:()=>GO,MatFooterCellDef:()=>jO,MatFooterRow:()=>$O,MatFooterRowDef:()=>zO,MatHeaderCell:()=>yc,MatHeaderCellDef:()=>_c,MatHeaderRow:()=>od,MatHeaderRowDef:()=>nd,MatNoDataRow:()=>UO,MatRecycleRows:()=>BO,MatRow:()=>ad,MatRowDef:()=>rd,MatTable:()=>id,MatTableDataSource:()=>qO,MatTableModule:()=>v_,MatTextColumn:()=>HO});y();y();var ate=[[["caption"]],[["colgroup"],["col"]],"*"],ste=["caption","colgroup, col","*"];function lte(n,t){n&1&&Fe(0,2)}function cte(n,t){n&1&&(d(0,"thead",0),Ti(1,1),p(),d(2,"tbody",0),Ti(3,2)(4,3),p(),d(5,"tfoot",0),Ti(6,4),p())}function dte(n,t){n&1&&Ti(0,1)(1,2)(2,3)(3,4)}
31function pte(n,t){if(n&1&&(d(0,"th",3),g(1),p()),n&2){let r=b();hi("text-align",r.justify),l(),j(" ",r.headerText," ")}}function mte(n,t){if(n&1&&(d(0,"td",4),g(1),p()),n&2){let r=t.$implicit,e=b();hi("text-align",e.justify),l(),j(" ",e.dataAccessor(r,e.name)," ")}}var td=new tt("CDK_TABLE"),ute=new tt("text-column-options"),$u=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["","cdkCellDef",""]],standalone:!0});let n=t;return n})(),Uu=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["","cdkHeaderCellDef",""]],standalone:!0});let n=t;return n})(),f_=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["","cdkFooterCellDef",""]],standalone:!0});let n=t;return n})(),Jc=(()=>{let t=class t{get name(){return this._name}set name(e){this._setNameInput(e)}get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}constructor(e){this._table=e,this._hasStickyChanged=!1,this._sticky=!1,this._stickyEnd=!1}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}};t.\u0275fac=function(i){return new(i||t)(h(td,8))},t.\u0275dir=_e({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,$u,5),Zt(a,Uu,5),Zt(a,f_,5)),i&2){let s;Q(s=K())&&(o.cell=s.first),Q(s=K())&&(o.headerCell=s.first),Q(s=K())&&(o.footerCell=s.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Re],stickyEnd:[2,"stickyEnd","stickyEnd",Re]},standalone:!0,features:[ne([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),si]});let n=t;return n})(),ow=class{constructor(t,r){r.nativeElement.classList.add(...t._columnCssClassName)}},aw=(()=>{let t=class t extends ow{constructor(e,i){super(e,i)}};t.\u0275fac=function(i){return new(i||t)(h(Jc),h(ge))},t.\u0275dir=_e({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],standalone:!0,features:[Ce]});let n=t;return n})(),iE=(()=>{let t=class t extends ow{constructor(e,i){super(e,i);let o=e._table?._getCellRole();o&&i.nativeElement.setAttribute("role",o)}};t.\u0275fac=function(i){return new(i||t)(h(Jc),h(ge))},t.\u0275dir=_e({type:t,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:[1,"cdk-footer-cell"],standalone:!0,features:[Ce]});let n=t;return n})(),sw=(()=>{let t=class t extends ow{constructor(e,i){super(e,i);let o=e._table?._getCellRole();o&&i.nativeElement.setAttribute("role",o)}};t.\u0275fac=function(i){return new(i||t)(h(Jc),h(ge))},t.\u0275dir=_e({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],standalone:!0,features:[Ce]});let n=t;return n})(),nE=class{constructor(){this.tasks=[],this.endTasks=[]}},rE=new tt("_COALESCED_STYLE_SCHEDULER"),NO=(()=>{let t=class t{constructor(e){this._currentSchedule=null,this._ngZone=Rt(Bt)}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new nE,this._ngZone.runOutsideAngular(()=>queueMicrotask(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){let e=this._currentSchedule;this._currentSchedule=new nE;for(let i of e.tasks)i();for(let i of e.endTasks)i()}this._currentSchedule=null})))}};t.\u0275fac=function(i){return new(i||t)(X(Bt))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();var VO=(()=>{let t=class t{constructor(e,i){this.template=e,this._differs=i}ngOnChanges(e){if(!this._columnsDiffer){let i=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(i).create(),this._columnsDiffer.diff(i)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof zf?e.headerCell.template:this instanceof $f?e.footerCell.template:e.cell.template}};t.\u0275fac=function(i){return new(i||t)(h(an),h(Cu))},t.\u0275dir=_e({type:t,features:[lt]});let n=t;return n})(),zf=(()=>{let t=class t extends VO{get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}constructor(e,i,o){super(e,i),this._table=o,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}};t.\u0275fac=function(i){return new(i||t)(h(an),h(Cu),h(td,8))},t.\u0275dir=_e({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Re]},standalone:!0,features:[si,Ce,lt]});let n=t;return n})(),$f=(()=>{let t=class t extends VO{get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}constructor(e,i,o){super(e,i),this._table=o,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}};t.\u0275fac=function(i){return new(i||t)(h(an),h(Cu),h(td,8))},t.\u0275dir=_e({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Re]},standalone:!0,features:[si,Ce,lt]});let n=t;return n})(),g_=(()=>{let t=class t extends VO{constructor(e,i,o){super(e,i),this._table=o}};t.\u0275fac=function(i){return new(i||t)(h(an),h(Cu),h(td,8))},t.\u0275dir=_e({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},standalone:!0,features:[Ce]});let n=t;return n})(),ed=(()=>{let t=class t{constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}};t.mostRecentCellOutlet=null,t.\u0275fac=function(i){return new(i||t)(h(ci))},t.\u0275dir=_e({type:t,selectors:[["","cdkCellOutlet",""]],standalone:!0});let n=t;return n})(),lw=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],standalone:!0,features:[ot],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,o){i&1&&Ti(0,0)},dependencies:[ed],encapsulation:2});let n=t;return n})(),cw=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["cdk-footer-row"],["tr","cdk-footer-row",""]],hostAttrs:["role","row",1,"cdk-footer-row"],standalone:!0,features:[ot],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,o){i&1&&Ti(0,0)},dependencies:[ed],encapsulation:2});let n=t;return n})(),dw=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],standalone:!0,features:[ot],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,o){i&1&&Ti(0,0)},dependencies:[ed],encapsulation:2});let n=t;return n})(),b_=(()=>{let t=class t{constructor(e){this.templateRef=e,this._contentClassName="
31cdk-no-data-row"}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["ng-template","cdkNoDataRow",""]],standalone:!0});let n=t;return n})(),r6=["top","bottom","left","right"],FO=class{constructor(t,r,e,i,o=!0,a=!0,s){this._isNativeHtmlTable=t,this._stickCellCss=r,this.direction=e,this._coalescedStyleScheduler=i,this._isBrowser=o,this._needsPositionStickyOnElement=a,this._positionListener=s,this._elemSizeCache=new WeakMap,this._resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(c=>this._updateCachedSizes(c)):null,this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null,this._cachedCellWidths=[],this._borderCellCss={top:`${r}-border-elem-top`,bottom:`${r}-border-elem-bottom`,left:`${r}-border-elem-left`,right:`${r}-border-elem-right`}}clearStickyPositioning(t,r){(r.includes("left")||r.includes("right"))&&this._removeFromStickyColumnReplayQueue(t);let e=[];for(let i of t)if(i.nodeType===i.ELEMENT_NODE){e.push(i);for(let o=0;o<i.children.length;o++)e.push(i.children[o])}this._coalescedStyleScheduler.schedule(()=>{for(let i of e)this._removeStickyStyle(i,r)})}updateStickyColumns(t,r,e,i=!0,o=!0){if(o&&this._updateStickyColumnReplayQueue({rows:[...t],stickyStartStates:[...r],stickyEndStates:[...e]}),!t.length||!this._isBrowser||!(r.some(a=>a)||e.some(a=>a))){this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}));return}this._coalescedStyleScheduler.schedule(()=>{let a=t[0],s=a.children.length,c=this._getCellWidths(a,i),u=this._getStickyStartColumnPositions(c,r),f=this._getStickyEndColumnPositions(c,e),_=r.lastIndexOf(!0),I=e.indexOf(!0),S=this.direction==="rtl",F=S?"right":"left",H=S?"left":"right";for(let q of t)for(let ee=0;ee<s;ee++){let Ie=q.children[ee];r[ee]&&this._addStickyStyle(Ie,F,u[ee],ee===_),e[ee]&&this._addStickyStyle(Ie,H,f[ee],ee===I)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:_===-1?[]:c.slice(0,_+1).map((q,ee)=>r[ee]?q:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:I===-1?[]:c.slice(I).map((q,ee)=>e[ee+I]?q:null).reverse()}))})}stickRows(t,r,e){this._isBrowser&&this._coalescedStyleScheduler.schedule(()=>{let i=e==="bottom"?t.slice().reverse():t,o=e==="bottom"?r.slice().reverse():r,a=[],s=[],c=[];for(let f=0,_=0;f<i.length;f++){if(!o[f])continue;a[f]=_;let I=i[f];c[f]=this._isNativeHtmlTable?Array.from(I.children):[I];let S=this._retrieveElementSize(I).height;_+=S,s[f]=S}let u=o.lastIndexOf(!0);for(let f=0;f<i.length;f++){if(!o[f])continue;let _=a[f],I=f===u;for(let S of c[f])this._addStickyStyle(S,e,_,I)}e==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:s,offsets:a,elements:c}):this._positionListener?.stickyFooterRowsUpdated({sizes:s,offsets:a,elements:c})})}updateStickyFooterContainer(t,r){this._isNativeHtmlTable&&this._coalescedStyleScheduler.schedule(()=>{let e=t.querySelector("tfoot");e&&(r.some(i=>!i)?this._removeStickyStyle(e,["bottom"]):this._addStickyStyle(e,"bottom",0,!1))})}_removeStickyStyle(t,r){for(let i of r)t.style[i]="",t.classList.remove(this._borderCellCss[i]);r6.some(i=>r.indexOf(i)===-1&&t.style[i])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,r,e,i){t.classList.add(this._stickCellCss),i&&t.classList.add(this._borderCellCss[r]),t.style[r]=`${e}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){let r={top:100,bottom:10,left:1,right:1},e=0;for(let i of r6)t.style[i]&&(e+=r[i]);return e?`${e}`:""}_getCellWidths(t,r=!0){if(!r&&this._cachedCellWidths.length)return this._cachedCellWidths;let e=[],i=t.children;for(let o=0;o<i.length;o++){let a=i[o];e.push(this._retrieveElementSize(a).width)}return this._cachedCellWidths=e,e}_getStickyStartColumnPositions(t,r){let e=[],i=0;for(let o=0;o<t.length;o++)r[o]&&(e[o]=i,i+=t[o]);return e}_getStickyEndColumnPositions(t,r){let e=[],i=0;for(let o=t.length;o>0;
31o--)r[o]&&(e[o]=i,i+=t[o]);return e}_retrieveElementSize(t){let r=this._elemSizeCache.get(t);if(r)return r;let e=t.getBoundingClientRect(),i={width:e.width,height:e.height};return this._resizeObserver&&(this._elemSizeCache.set(t,i),this._resizeObserver.observe(t,{box:"border-box"})),i}_updateStickyColumnReplayQueue(t){this._removeFromStickyColumnReplayQueue(t.rows),!this._stickyColumnsReplayTimeout&&this._updatedStickyColumnsParamsToReplay.push(t)}_removeFromStickyColumnReplayQueue(t){let r=new Set(t);for(let e of this._updatedStickyColumnsParamsToReplay)e.rows=e.rows.filter(i=>!r.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(e=>!!e.rows.length)}_updateCachedSizes(t){let r=!1;for(let e of t){let i=e.borderBoxSize?.length?{width:e.borderBoxSize[0].inlineSize,height:e.borderBoxSize[0].blockSize}:{width:e.contentRect.width,height:e.contentRect.height};i.width!==this._elemSizeCache.get(e.target)?.width&&hte(e.target)&&(r=!0),this._elemSizeCache.set(e.target,i)}r&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{for(let e of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(e.rows,e.stickyStartStates,e.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null},0))}};function hte(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(t=>n.classList.contains(t))}var oE=new tt("CDK_SPL"),o6=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["cdk-table","recycleRows",""],["table","cdk-table","","recycleRows",""]],standalone:!0,features:[ne([{provide:Cf,useClass:YS}])]});let n=t;return n})(),pw=(()=>{let t=class t{constructor(e,i){this.viewContainer=e,this.elementRef=i;let o=Rt(td);o._rowOutlet=this,o._outletAssigned()}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(ge))},t.\u0275dir=_e({type:t,selectors:[["","rowOutlet",""]],standalone:!0});let n=t;return n})(),mw=(()=>{let t=class t{constructor(e,i){this.viewContainer=e,this.elementRef=i;let o=Rt(td);o._headerRowOutlet=this,o._outletAssigned()}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(ge))},t.\u0275dir=_e({type:t,selectors:[["","headerRowOutlet",""]],standalone:!0});let n=t;return n})(),uw=(()=>{let t=class t{constructor(e,i){this.viewContainer=e,this.elementRef=i;let o=Rt(td);o._footerRowOutlet=this,o._outletAssigned()}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(ge))},t.\u0275dir=_e({type:t,selectors:[["","footerRowOutlet",""]],standalone:!0});let n=t;return n})(),hw=(()=>{let t=class t{constructor(e,i){this.viewContainer=e,this.elementRef=i;let o=Rt(td);o._noDataRowOutlet=this,o._outletAssigned()}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(ge))},t.\u0275dir=_e({type:t,selectors:[["","noDataRowOutlet",""]],standalone:!0});let n=t;return n})();var __=(()=>{let t=class t{_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(e,i,o,a,s,c,u,f,_,I,S,F){this._differs=e,this._changeDetectorRef=i,this._elementRef=o,this._dir=s,this._platform=u,this._viewRepeater=f,this._coalescedStyleScheduler
31=_,this._viewportRuler=I,this._stickyPositioningListener=S,this._onDestroy=new Te,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._hasAllOutlets=!1,this._hasInitialized=!1,this._cellRoleInternal=void 0,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new J,this.viewChange=new Gn({start:0,end:Number.MAX_VALUE}),this._injector=Rt(Mn),a||o.nativeElement.setAttribute("role","table"),this._document=c,this._isServer=!u.isBrowser,this._isNativeHtmlTable=o.nativeElement.nodeName==="TABLE"}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((e,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i),this._viewportRuler.change().pipe(Be(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),qS(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let i=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,i,(o,a,s)=>this._getEmbeddedViewArgs(o.item,s),o=>o.item.data,o=>{o.operation===ij.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let a=i.get(o.currentIndex);a.context.$implicit=o.item.data}),this._updateNoDataRow(),Lo(()=>{this.updateStickyColumnStyles()},{injector:this._injector}),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=a6(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let i=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,i,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=a6(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let i=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,i,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,i),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),i=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...i,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((a,s)=>{this._addStickyColumnStyles([a],this._headerRowDefs[s])}
31),this._rowDefs.forEach(a=>{let s=[];for(let c=0;c<i.length;c++)this._renderRows[c].rowDef===a&&s.push(i[c]);this._addStickyColumnStyles(s,a)}),o.forEach((a,s)=>{this._addStickyColumnStyles([a],this._footerRowDefs[s])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let i=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||i,this._forceRecalculateCellWidths=i,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){let e=[],i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let o=0;o<this._data.length;o++){let a=this._data[o],s=this._getRenderRowsForData(a,o,i.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let c=0;c<s.length;c++){let u=s[c],f=this._cachedRenderRowsMap.get(u.data);f.has(u.rowDef)?f.get(u.rowDef).push(u):f.set(u.rowDef,[u]),e.push(u)}}return e}_getRenderRowsForData(e,i,o){return this._getRowDefs(e,i).map(s=>{let c=o&&o.has(s)?o.get(s):[];if(c.length){let u=c.shift();return u.dataIndex=i,u}else return{data:e,rowDef:s,dataIndex:i}})}_cacheColumnDefs(){this._columnDefsByName.clear(),tE(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(i=>{this._columnDefsByName.has(i.name),this._columnDefsByName.set(i.name,i)})}_cacheRowDefs(){this._headerRowDefs=tE(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=tE(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=tE(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(i=>!i.when);!this.multiTemplateDataRows&&e.length>1,this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(s,c)=>{let u=!!c.getColumnsDiff();return s||u},i=this._rowDefs.reduce(e,!1);i&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let a=this._footerRowDefs.reduce(e,!1);return a&&this._forceRenderFooterRows(),i||o||a}_switchDataSource(e){this._data=[],qS(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;qS(this.dataSource)?e=this.dataSource.connect(this):tB(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Z(this.dataSource)),this._renderChangeSubscription=e.pipe(Be(this._onDestroy)).subscribe(i=>{this._data=i||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,i)=>this._renderRow(this._headerRowOutlet,e,i)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,i)=>this._renderRow(this._footerRowOutlet,e,i)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,i){let o=Array.from(i.columns||[]).map(c=>{let u=this._columnDefsByName.get(c);return u}),a=o.map(c=>c.sticky),s=o.map(c=>c.stickyEnd);this._stickyStyler.updateStickyColumns(e,a,s,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let i=[];for(let o=0;o<e.viewContainer.length;o++){let a=e.viewContainer.get(o);i.push(a.rootNodes[0])}return i}_getRowDefs(e,i){if(this._rowDefs.length==1)return[this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(a=>!a.when||a.when(i,e));else{let a=this._rowDefs.find(s=>s.when&&s.when(i,e))||this._defaultRowDef;a&&o.push(a)}return o.length,o}_getEmbeddedViewArgs(e,i){let o=e.rowDef,a={$implicit:e.data};return{templateRef:o.template,context:a,index:i}}_renderRow(e,i,o,a={}){let s=e.viewContainer.createEmbeddedView(i.template,a,o);return this._renderCellTemplateForItem(i,a),s}_renderCellTemplateForItem(e,i){for(let o of this._getCellTemplates(e))ed.mostRecentCellOutlet&&ed.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,i);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let i=0,o=e.length;i<o;i++){let s=e.get(i).context;s.count=o,s.first=i===0,s.last=i===o-1,s.even=i%2===0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[i].dataIndex,s.renderIndex=i):s.index=this._renderRows[i].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,i=>{let o=this._columnDefsByName.get(i);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(i,o)=>i||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr";this._stickyStyler=new FO(this._isNativeHtmlTable,this.stickyCssClass,e,this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:Z()).pipe(Be(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(i=>!i._table||i._table===this)}
31_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let i=this._rowOutlet.viewContainer.length===0;if(i===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(i){let a=o.createEmbeddedView(e.templateRef),s=a.rootNodes[0];a.rootNodes.length===1&&s?.nodeType===this._document.ELEMENT_NODE&&(s.setAttribute("role","row"),s.classList.add(e._contentClassName))}else o.clear();this._isShowingNoDataRow=i,this._changeDetectorRef.markForCheck()}};t.\u0275fac=function(i){return new(i||t)(h(Cu),h(Me),h(ge),ja("role"),h(mr,8),h(Qi),h(Ur),h(Cf),h(rE),h(lc),h(oE,12),h(Bt,8))},t.\u0275cmp=L({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,b_,5),Zt(a,Jc,5),Zt(a,g_,5),Zt(a,zf,5),Zt(a,$f,5)),i&2){let s;Q(s=K())&&(o._noDataRow=s.first),Q(s=K())&&(o._contentColumnDefs=s),Q(s=K())&&(o._contentRowDefs=s),Q(s=K())&&(o._contentHeaderRowDefs=s),Q(s=K())&&(o._contentFooterRowDefs=s)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(i,o){i&2&&Y("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Re],fixedLayout:[2,"fixedLayout","fixedLayout",Re]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],standalone:!0,features:[ne([{provide:td,useExisting:t},{provide:Cf,useClass:WS},{provide:rE,useClass:NO},{provide:oE,useValue:null}]),si,ot],ngContentSelectors:ste,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(i,o){i&1&&(Ct(ate),Fe(0),Fe(1,1),x(2,lte,1,0)(3,cte,7,0)(4,dte,4,0)),i&2&&(l(2),_t(o._isServer?2:-1),l(),_t(o._isNativeHtmlTable?3:4))},dependencies:[mw,pw,hw,uw],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2});let n=t;return n})();function tE(n,t){return n.concat(Array.from(t))}function a6(n,t){let r=t.toUpperCase(),e=n.viewContainer.element.nativeElement;for(;e;){let i=e.nodeType===1?e.nodeName:null;if(i===r)return e;if(i==="TABLE")break;e=e.parentNode}return null}var aE=(()=>{let t=class t{get name(){return this._name}set name(e){this._name=e,this._syncColumnDefName()}constructor(e,i){this._table=e,this._options=i,this.justify="start",this._options=i||{}}ngOnInit(){this._syncColumnDefName(),this.headerText===void 0&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||((e,i)=>e[i])),this._table&&(this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef))}ngOnDestroy(){this._table&&this._table.removeColumnDef(this.columnDef)}_createDefaultHeaderText(){let e=this.name;return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(e):e[0].toUpperCase()+e.slice(1)}_syncColumnDefName(){this.columnDef&&(this.columnDef.name=this.name)}};t.\u0275fac=function(i){return new(i||t)(h(__,8),h(ute,8))},t.\u0275cmp=L({type:t,selectors:[["cdk-text-column"]],viewQuery:function(i,o){if(i&1&&(ae(Jc,7),ae($u,7),ae(Uu,7)),i&2){let a;Q(a=K())&&(o.columnDef=a.first),Q(a=K())&&(o.cell=a.first),Q(a=K())&&(o.headerCell=a.first)}},inputs:{name:"name",headerText:"headerText",dataAccessor:"dataAccessor",justify:"justify"},standalone:!0,features:[ot],decls:3,vars:0,consts:[["cdkColumnDef",""],["cdk-header-cell","",3,"text-align",4,"cdkHeaderCellDef"],["cdk-cell","",3,"text-align",4,"cdkCellDef"],["cdk-header-cell",""],["cdk-cell",""]],template:function(i,o){i&1&&(pt(0,0),x(1,pte,2,3,"th",1)(2,mte,2,3,"td",2),ct())},dependencies:[Jc,Uu,aw,$u,sw],encapsulation:2});let n=t;return n})();var LO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[F2,__,g_,$u,ed,Uu,f_,Jc,sw,dw,aw,iE,lw,zf,cw,$f,pw,mw,uw,aE,b_,o6,hw],exports:[__,g_,$u,ed,Uu,f_,Jc,sw,dw,aw,iE,lw,zf,cw,$f,pw,mw,uw,aE,b_,o6,hw]}),t.\u0275inj=Nt({imports:[F2]});let n=t;return n})();var fte=[[["caption"]],[["colgroup"],["col"]],"*"],gte=["caption","colgroup, col","*"];function bte(n,t){n&1&&Fe(0,2)}function _te(n,t){n&1&&(d(0,"thead",0),Ti(1,1),p(),d(2,"tbody",2),Ti(3,3)(4,4),p(),d(5,"tfoot",0),Ti(6,5),p())}function vte(n,t){n&1&&Ti(0,1)(1,3)(2,4)(3,5)}
31function yte(n,t){if(n&1&&(d(0,"th",3),g(1),p()),n&2){let r=b();hi("text-align",r.justify),l(),j(" ",r.headerText," ")}}function Cte(n,t){if(n&1&&(d(0,"td",4),g(1),p()),n&2){let r=t.$implicit,e=b();hi("text-align",e.justify),l(),j(" ",e.dataAccessor(r,e.name)," ")}}var BO=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["mat-table","recycleRows",""],["table","mat-table","","recycleRows",""]],standalone:!0,features:[ne([{provide:Cf,useClass:YS}])]});let n=t;return n})(),id=(()=>{let t=class t extends __{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(i,o){i&2&&Y("mdc-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],standalone:!0,features:[ne([{provide:__,useExisting:t},{provide:td,useExisting:t},{provide:rE,useClass:NO},{provide:Cf,useClass:WS},{provide:oE,useValue:null}]),Ce,ot],ngContentSelectors:gte,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(i,o){i&1&&(Ct(fte),Fe(0),Fe(1,1),x(2,bte,1,0)(3,_te,7,0)(4,vte,4,0)),i&2&&(l(2),_t(o._isServer?2:-1),l(),_t(o._isNativeHtmlTable?3:4))},dependencies:[mw,pw,hw,uw],styles:[".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-app-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-app-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-app-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-app-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-app-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-app-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-app-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-app-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2});let n=t;return n})(),bc=(()=>{let t=class t extends $u{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matCellDef",""]],standalone:!0,features:[ne([{provide:$u,useExisting:t}]),Ce]});let n=t;return n})(),_c=(()=>{let t=class t extends Uu{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matHeaderCellDef",""]],standalone:!0,features:[ne([{provide:Uu,useExisting:t}]),Ce]});let n=t;return n})(),jO=(()=>{let t=class t extends f_{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matFooterCellDef",""]],standalone:!0,features:[ne([{provide:f_,useExisting:t}]),Ce]});let n=t;return n})(),vc=(()=>{let t=class t extends Jc{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},standalone:!0,features:[ne([{provide:Jc,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),Ce]});let n=t;return n})(),yc=(()=>{let t=class t extends aw{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],standalone:!0,features:[Ce]});let n=t;return n})(),GO=(()=>{let t=class t extends iE{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:[1,"mat-mdc-footer-cell","mdc-data-table__cell"],standalone:!0,features:[Ce]});let n=t;return n})(),Cc=(()=>{let t=class t extends sw{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],standalone:!0,features:[Ce]});let n=t;return n})();var nd=(()=>{let t=class t extends zf{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",Re]},standalone:!0,features:[ne([{provide:zf,useExisting:t}]),si,Ce]});let n=t;return n})(),zO=(()=>{let t=class t extends $f{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matFooterRowDef",""]],inputs:{columns:[0,"matFooterRowDef","columns"],sticky:[2,"matFooterRowDefSticky","sticky",Re]},standalone:!0,features:[ne([{provide:$f,useExisting:t}]),si,Ce]});let n=t;return n})(),rd=(()=>{let t=class t extends g_{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},standalone:!0,features:[ne([{provide:g_,useExisting:t}]),Ce]});let n=t;return n})(),od=(()=>{let t=class t extends lw{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],standalone:!0,features:[ne([{provide:lw,useExisting:t}]),Ce,ot],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,o){i&1&&Ti(0,0)},dependencies:[ed],encapsulation:2});let n=t;return n})(),$O=(()=>{let t=class t extends cw{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-footer-row"],["tr","mat-footer-row",""]],hostAttrs:["role","row",1,"mat-mdc-footer-row","mdc-data-table__row"],exportAs:["matFooterRow"],standalone:!0,features:[ne([{provide:cw,useExisting:t}]),Ce,ot],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,o){i&1&&Ti(0,0)},dependencies:[ed],encapsulation:2});let n=t;return n})(),ad=(()=>{let t=class t extends dw{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],standalone:!0,features:[ne([{provide:dw,useExisting:t}]),Ce,ot],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,o){i&1&&Ti(0,0)},dependencies:[ed],encapsulation:2});let n=t;return n})(),UO=(()=>{let t=class t extends b_{constructor(){super(...arguments),this._contentClassName="mat-mdc-no-data-row"}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["ng-template","matNoDataRow",""]],standalone:!0,features:[ne([{provide:b_,useExisting:t}]),Ce]});let n=t;return n})(),HO=(()=>{let t=class t extends aE{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-text-column"]],standalone:!0,features:[Ce,ot],decls:3,vars:0,consts:[["matColumnDef",""],["mat-header-cell","",3,"text-align",4,"matHeaderCellDef"],["mat-cell","",3,"text-align",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""]],template:function(i,o){i&1&&(pt(0,0),x(1,yte,2,3,"th",1)(2,Cte,2,3,"td",2),ct())},dependencies:[vc,_c,yc,bc,Cc],encapsulation:2});let n=t;return n})();var v_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)}
31,t.\u0275mod=Vt({type:t,imports:[Ot,LO,id,BO,_c,nd,vc,bc,rd,jO,zO,yc,Cc,GO,od,ad,$O,UO,HO],exports:[Ot,id,BO,_c,nd,vc,bc,rd,jO,zO,yc,Cc,GO,od,ad,$O,UO,HO]}),t.\u0275inj=Nt({imports:[Ot,LO,Ot]});let n=t;return n})(),wte=9007199254740991,qO=class extends HS{get data(){return this._data.value}set data(t){t=Array.isArray(t)?t:[],this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}constructor(t=[]){super(),this._renderData=new Gn([]),this._filter=new Gn(""),this._internalPageChanges=new Te,this._renderChangesSubscription=null,this.sortingDataAccessor=(r,e)=>{let i=r[e];if(tj(i)){let o=Number(i);return o<wte?o:i}return i},this.sortData=(r,e)=>{let i=e.active,o=e.direction;return!i||o==""?r:r.sort((a,s)=>{let c=this.sortingDataAccessor(a,i),u=this.sortingDataAccessor(s,i),f=typeof c,_=typeof u;f!==_&&(f==="number"&&(c+=""),_==="number"&&(u+=""));let I=0;return c!=null&&u!=null?c>u?I=1:c<u&&(I=-1):c!=null?I=1:u!=null&&(I=-1),I*(o=="asc"?1:-1)})},this.filterPredicate=(r,e)=>{let i=Object.keys(r).reduce((a,s)=>a+r[s]+"\u25EC","").toLowerCase(),o=e.trim().toLowerCase();return i.indexOf(o)!=-1},this._data=new Gn(t),this._updateChangeSubscription()}_updateChangeSubscription(){let t=this._sort?Xt(this._sort.sortChange,this._sort.initialized):Z(null),r=this._paginator?Xt(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Z(null),e=this._data,i=fu([e,this._filter]).pipe(W(([s])=>this._filterData(s))),o=fu([i,t]).pipe(W(([s])=>this._orderData(s))),a=fu([o,r]).pipe(W(([s])=>this._pageData(s)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(s=>this._renderData.next(s))}_filterData(t){return this.filteredData=this.filter==null||this.filter===""?t:t.filter(r=>this.filterPredicate(r,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;let r=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(r,r+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{let r=this.paginator;if(r&&(r.length=t,r.pageIndex>0)){let e=Math.ceil(r.length/r.pageSize)-1||0,i=Math.min(r.pageIndex,e);i!==r.pageIndex&&(r.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var eP={};Ae(eP,{MAT_TAB:()=>YO,MAT_TABS_CONFIG:()=>ZO,MAT_TAB_CONTENT:()=>h6,MAT_TAB_GROUP:()=>QO,MAT_TAB_LABEL:()=>f6,MatInkBar:()=>gw,MatPaginatedTabHeader:()=>XO,MatTab:()=>y_,MatTabBody:()=>JO,MatTabBodyPortal:()=>y6,MatTabChangeEvent:()=>cE,MatTabContent:()=>sE,MatTabGroup:()=>bw,MatTabHeader:()=>_6,MatTabLabel:()=>lE,MatTabLabelWrapper:()=>KO,MatTabLink:()=>w_,MatTabNav:()=>C_,MatTabNavPanel:()=>_w,MatTabsModule:()=>S_,_MAT_INK_BAR_POSITIONER:()=>Vte,_MAT_INK_BAR_POSITIONER_FACTORY:()=>b6,matTabsAnimations:()=>v6});y();var x_=["*"];function xte(n,t){n&1&&Fe(0)}var c6=["tabListContainer"],d6=["tabList"],p6=["tabListInner"],m6=["nextPaginator"],u6=["previousPaginator"],Ste=n=>({animationDuration:n}),Tte=(n,t)=>({value:n,params:t});function Ete(n,t){}var Ite=["tabBodyWrapper"],kte=["tabHeader"];function Dte(n,t){}function Mte(n,t){if(n&1&&x(0,Dte,0,0,"ng-template",12),n&2){let r=b
31().$implicit;m("cdkPortalOutlet",r.templateLabel)}}function Ate(n,t){if(n&1&&g(0),n&2){let r=b().$implicit;z(r.textLabel)}}function Ote(n,t){if(n&1){let r=B();d(0,"div",7,2),T("click",function(){let i=D(r),o=i.$implicit,a=i.$index,s=b(),c=me(1);return M(s._handleClick(o,c,a))})("cdkFocusChange",function(i){let o=D(r).$index,a=b();return M(a._tabFocusChanged(i,o))}),O(2,"span",8)(3,"div",9),d(4,"span",10)(5,"span",11),x(6,Mte,1,1,null,12)(7,Ate,1,1),p()()()}if(n&2){let r=t.$implicit,e=t.$index,i=me(1),o=b();bt(r.labelClass),Y("mdc-tab--active",o.selectedIndex===e),m("id",o._getTabLabelId(e))("disabled",r.disabled)("fitInkBarToContent",o.fitInkBarToContent),Je("tabIndex",o._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",o._tabs.length)("aria-controls",o._getTabContentId(e))("aria-selected",o.selectedIndex===e)("aria-label",r.ariaLabel||null)("aria-labelledby",!r.ariaLabel&&r.ariaLabelledby?r.ariaLabelledby:null),l(3),m("matRippleTrigger",i)("matRippleDisabled",r.disabled||o.disableRipple),l(3),_t(r.templateLabel?6:7)}}function Pte(n,t){n&1&&Fe(0)}function Rte(n,t){if(n&1){let r=B();d(0,"mat-tab-body",13),T("_onCentered",function(){D(r);let i=b();return M(i._removeTabBodyWrapperHeight())})("_onCentering",function(i){D(r);let o=b();return M(o._setTabBodyWrapperHeight(i))}),p()}if(n&2){let r=t.$implicit,e=t.$index,i=b();bt(r.bodyClass),Y("mat-mdc-tab-body-active",i.selectedIndex===e),m("id",i._getTabContentId(e))("content",r.content)("position",r.position)("origin",r.origin)("animationDuration",i.animationDuration)("preserveContent",i.preserveContent),Je("tabindex",i.contentTabIndex!=null&&i.selectedIndex===e?i.contentTabIndex:null)("aria-labelledby",i._getTabLabelId(e))("aria-hidden",i.selectedIndex!==e)}}var Fte=["mat-tab-nav-bar",""],Nte=["mat-tab-link",""],h6=new tt("MatTabContent"),sE=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["","matTabContent",""]],standalone:!0,features:[ne([{provide:h6,useExisting:t}])]});let n=t;return n})(),f6=new tt("MatTabLabel"),YO=new tt("MAT_TAB"),lE=(()=>{let t=class t extends oj{constructor(e,i,o){super(e,i),this._closestTab=o}};t.\u0275fac=function(i){return new(i||t)(h(an),h(ci),h(YO,8))},t.\u0275dir=_e({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],standalone:!0,features:[ne([{provide:f6,useExisting:t}]),Ce]});let n=t;return n})(),QO=new tt("MAT_TAB_GROUP"),y_=(()=>{let t=class t{get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}get content(){return this._contentPortal}constructor(e,i){this._viewContainerRef=e,this._closestTabGroup=i,this.disabled=!1,this._explicitContent=void 0,this.textLabel="",this._contentPortal=null,this._stateChanges=new Te,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new us(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(QO,8))},t.\u0275cmp=L({type:t,selectors:[["mat-tab"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,lE,5),Zt(a,sE,7,an)),i&2){let s;Q(s=K())&&(o.templateLabel=s.first),Q(s=K())&&(o._explicitContent=s.first)}},viewQuery:function(i,o){if(i&1&&ae(an,7),i&2){let a;Q(a=K())&&(o._implicitContent=a.first)}},hostAttrs:["hidden",""],inputs:{disabled:[2,"disabled","disabled",Re],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],standalone:!0,features:[ne([{provide:YO,useExisting:t}]),si,lt,ot],ngContentSelectors:x_,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),x(0,xte,1,0,"ng-template"))},encapsulation:2});let n=t;return n})(),WO="mdc-tab-indicator--active",s6="mdc-tab-indicator--no-transition",gw=class{constructor(t){this._items=t}
31hide(){this._items.forEach(t=>t.deactivateInkBar())}alignToElement(t){let r=this._items.find(i=>i.elementRef.nativeElement===t),e=this._currentItem;if(r!==e&&(e?.deactivateInkBar(),r)){let i=e?.elementRef.nativeElement.getBoundingClientRect?.();r.activateInkBar(i),this._currentItem=r}}},g6=(()=>{let t=class t{constructor(){this._elementRef=Rt(ge),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(e){this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(e){let i=this._elementRef.nativeElement;if(!e||!i.getBoundingClientRect||!this._inkBarContentElement){i.classList.add(WO);return}let o=i.getBoundingClientRect(),a=e.width/o.width,s=e.left-o.left;i.classList.add(s6),this._inkBarContentElement.style.setProperty("transform",`translateX(${s}px) scaleX(${a})`),i.getBoundingClientRect(),i.classList.remove(s6),i.classList.add(WO),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(WO)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let e=this._elementRef.nativeElement.ownerDocument||document,i=this._inkBarElement=e.createElement("span"),o=this._inkBarContentElement=e.createElement("span");i.className="mdc-tab-indicator",o.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",i.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let e=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;e.appendChild(this._inkBarElement)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",Re]},features:[si]});let n=t;return n})();function b6(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}var Vte=new tt("MatInkBarPositioner",{providedIn:"root",factory:b6}),KO=(()=>{let t=class t extends g6{constructor(e){super(),this.elementRef=e,this.disabled=!1}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(i,o){i&2&&(Je("aria-disabled",!!o.disabled),Y("mat-mdc-tab-disabled",o.disabled))},inputs:{disabled:[2,"disabled","disabled",Re]},standalone:!0,features:[si,Ce]});let n=t;return n})(),l6=ms({passive:!0}),Lte=650,Bte=100,XO=(()=>{let t=class t{get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let i=isNaN(e)?0:e;this._selectedIndex!=i&&(this._selectedIndexChanged=!0,this._selectedIndex=i,this._keyManager&&this._keyManager.updateActiveItem(i))}constructor(e,i,o,a,s,c,u){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=o,this._dir=a,this._ngZone=s,this._platform=c,this._animationMode=u,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Te,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Te,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new J,this.indexFocused=new J,this._sharedResizeObserver=Rt(Gj),this._injector=Rt(Mn),s.runOutsideAngular(()=>{Jn(e.nativeElement,"mouseleave").pipe(Be(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){Jn(this._previousPaginator.nativeElement,"touchstart",l6).pipe(Be(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Jn(this._nextPaginator.nativeElement,"touchstart",l6).pipe(Be(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){let e=this._dir?this._dir.change:Z("ltr"),i=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(Wi(32),Be(this._destroyed)),o=this._viewportRuler.change(150).pipe(Be(this._destroyed)),a=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new dc(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),Lo(a,{injector:this._injector}),Xt(e,o,i,this._items.changes,this._itemsResized()).pipe(Be(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),a()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return typeof ResizeObserver!="function"?Ls:this._items.changes.pipe(on(this._items),ii(e=>
31new Ma(i=>this._ngZone.runOutsideAngular(()=>{let o=new ResizeObserver(a=>i.next(a));return e.forEach(a=>o.observe(a.elementRef.nativeElement)),()=>{o.disconnect()}}))),ib(1),Pi(e=>e.some(i=>i.contentRect.width>0&&i.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!po(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let i=this._items.get(this.focusIndex);i&&!i.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){let e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return this._items?!!this._items.toArray()[e]:!0}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();let i=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?i.scrollLeft=0:i.scrollLeft=i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let e=this.scrollDistance,i=this._getLayoutDirection()==="ltr"?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){let i=this._tabListContainer.nativeElement.offsetWidth,o=(e=="before"?-1:1)*i/3;return this._scrollTo(this._scrollDistance+o)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;let i=this._items?this._items.toArray()[e]:null;if(!i)return;let o=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:a,offsetWidth:s}=i.elementRef.nativeElement,c,u;this._getLayoutDirection()=="ltr"?(c=a,u=c+s):(u=this._tabListInner.nativeElement.offsetWidth-a,c=u-s);let f=this.scrollDistance,_=this.scrollDistance+o;c<f?this.scrollDistance-=f-c:u>_&&(this.scrollDistance+=Math.min(u-_,c-f))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let e=this._tabListInner.nativeElement.scrollWidth,i=this._elementRef.nativeElement.offsetWidth,o=e-i>=5;o||(this.scrollDistance=0),o!==this._showPaginationControls&&(this._showPaginationControls=o,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let e=this._tabListInner.nativeElement.scrollWidth,i=this._tabListContainer.nativeElement.offsetWidth;return e-i||0}_alignInkBarToSelectedTab(){let e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&i.button!=null&&i.button!==0||(this._stopInterval(),ls(Lte,Bte).pipe(Be(Xt(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:o,distance:a}=this._scrollHeader(e);(a===0||a>=o)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(lc),h(mr,8),h(Bt),h(Ur),h(Er,8))},t.\u0275dir=_e({type:t,inputs:{disablePagination:[2,"disablePagination","disablePagination",Re],selectedIndex:[2,"selectedIndex","selectedIndex",Nr]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[si]});let n=t;return n})(),_6=(()=>{let t=class t extends XO{constructor(e,i,o,a,s,c,u){super(e,i,o,a,s,c,u),this.disableRipple=!1}ngAfterContentInit(){this._inkBar=new gw(this._items),super.ngAfterContentInit()}_itemSelected(e){e.preventDefault()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(lc),h(mr,8),h(Bt),h(Ur),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-tab-header"]],contentQueries:function(i,o,a){if(i&1&&Zt(
31a,KO,4),i&2){let s;Q(s=K())&&(o._items=s)}},viewQuery:function(i,o){if(i&1&&(ae(c6,7),ae(d6,7),ae(p6,7),ae(m6,5),ae(u6,5)),i&2){let a;Q(a=K())&&(o._tabListContainer=a.first),Q(a=K())&&(o._tabList=a.first),Q(a=K())&&(o._tabListInner=a.first),Q(a=K())&&(o._nextPaginator=a.first),Q(a=K())&&(o._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(i,o){i&2&&Y("mat-mdc-tab-header-pagination-controls-enabled",o._showPaginationControls)("mat-mdc-tab-header-rtl",o._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",Re]},standalone:!0,features:[si,Ce,ot],ngContentSelectors:x_,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"div",5,0),T("click",function(){return D(a),M(o._handlePaginatorClick("before"))})("mousedown",function(c){return D(a),M(o._handlePaginatorPress("before",c))})("touchend",function(){return D(a),M(o._stopInterval())}),O(2,"div",6),p(),d(3,"div",7,1),T("keydown",function(c){return D(a),M(o._handleKeydown(c))}),d(5,"div",8,2),T("cdkObserveContent",function(){return D(a),M(o._onContentChanges())}),d(7,"div",9,3),Fe(9),p()()(),d(10,"div",10,4),T("mousedown",function(c){return D(a),M(o._handlePaginatorPress("after",c))})("click",function(){return D(a),M(o._handlePaginatorClick("after"))})("touchend",function(){return D(a),M(o._stopInterval())}),O(12,"div",6),p()}i&2&&(Y("mat-mdc-tab-header-pagination-disabled",o._disableScrollBefore),m("matRippleDisabled",o._disableScrollBefore||o.disableRipple),l(3),Y("_mat-animation-noopable",o._animationMode==="NoopAnimations"),l(2),Je("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby||null),l(5),Y("mat-mdc-tab-header-pagination-disabled",o._disableScrollAfter),m("matRippleDisabled",o._disableScrollAfter||o.disableRipple))},dependencies:[Wa,xb],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height);border-top-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2});let n=t;return n})(),ZO=new tt("MAT_TABS_CONFIG"),v6={translateTab:Qn("translateTab",[Ji("center, void, left-origin-center, right-origin-center",Tt({transform:"none",visibility:"visible"})),Ji("left",Tt({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Ji("right",Tt({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),$i("* => left, * => right, left => center, right => center",Vi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),$i("void => left-origin-center",[Tt({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Vi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),$i("void => right-origin-center",[Tt({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Vi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},y6=(()=>{let t=class t extends gl{constructor(e,i,o,a){super(e,i,a),this._host=o,this._centeringSub=ln.EMPTY,this._leavingSub=ln.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(on(this._host._isCenterPosition(this._host._position))).subscribe(e=>{this._host._content&&e&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(h(sb),h(ci),h(he(()=>JO)),h(Qi))},t.\u0275dir=_e({type:t,selectors:[["","matTabBodyHost",""]],standalone:!0,features:[Ce]});let n=t;return n})(),JO=(()=>{let t=class t{set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(e,i,o){this._elementRef=e,this._dir=i,this._dirChangeSubscription=ln.EMPTY,this._translateTabComplete=new Te,this._onCentering=new J,this._beforeCentering=new J,this._afterLeavingCenter=new J,this._onCentered=new J(!0),this.animationDuration="500ms",this.preserveContent=!1,i&&(this._dirChangeSubscription=i.change.subscribe(a=>{this._computePositionAnimationState(a),o.markForCheck()})),this._translateTabComplete.subscribe(a=>{this._isCenterPosition(a.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(a.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){this._position=="center"&&this.origin!=null&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(e){let i=this._isCenterPosition(e.toState);this._beforeCentering.emit(i),i&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(e){return e=="center"||e=="left-origin-center"||e=="right-origin-center"}_computePositionAnimationState(e=this._getLayoutDirection()){this._positionIndex<0?this._position=e=="ltr"?"left"
31:"right":this._positionIndex>0?this._position=e=="ltr"?"right":"left":this._position="center"}_computePositionFromOrigin(e){let i=this._getLayoutDirection();return i=="ltr"&&e<=0||i=="rtl"&&e>0?"left-origin-center":"right-origin-center"}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(mr,8),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-tab-body"]],viewQuery:function(i,o){if(i&1&&ae(gl,5),i&2){let a;Q(a=K())&&(o._portalHost=a.first)}},hostAttrs:[1,"mat-mdc-tab-body"],inputs:{_content:[0,"content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"},standalone:!0,features:[ot],decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(i,o){if(i&1){let a=B();d(0,"div",1,0),T("@translateTab.start",function(c){return D(a),M(o._onTranslateTabStarted(c))})("@translateTab.done",function(c){return D(a),M(o._translateTabComplete.next(c))}),x(2,Ete,0,0,"ng-template",2),p()}i&2&&m("@translateTab",Yi(3,Tte,o._position,Xe(1,Ste,o.animationDuration)))},dependencies:[y6,Iu],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[v6.translateTab]}});let n=t;return n})(),jte=0,Gte=!0,bw=(()=>{let t=class t{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=e,this._changeDetectorRef.markForCheck()}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=isNaN(e)?null:e}get animationDuration(){return this._animationDuration}set animationDuration(e){let i=e+"";this._animationDuration=/^\d+$/.test(i)?e+"ms":i}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=isNaN(e)?null:e}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){if(!Gte)throw new Error("mat-tab-group background color must be set through the Sass theming API");let i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,i,o,a){this._elementRef=e,this._changeDetectorRef=i,this._animationMode=a,this._tabs=new Bs,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=ln.EMPTY,this._tabLabelSubscription=ln.EMPTY,this._fitInkBarToContent=!1,this.stretchTabs=!0,this.dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.disablePagination=!1,this.disableRipple=!1,this.preserveContent=!1,this.selectedIndexChange=new J,this.focusChange=new J,this.animationDone=new J,this.selectedTabChange=new J(!0),this._isServer=!Rt(Ur).isBrowser,this._groupId=jte++,this.animationDuration=o&&o.animationDuration?o.animationDuration:"500ms",this.disablePagination=o&&o.disablePagination!=null?o.disablePagination:!1,this.dynamicHeight=o&&o.dynamicHeight!=null?o.dynamicHeight:!1,o?.contentTabIndex!=null&&(this.contentTabIndex=o.contentTabIndex),this.preserveContent=!!o?.preserveContent,this.fitInkBarToContent=o&&o.fitInkBarToContent!=null?o.fitInkBarToContent:!1,this.stretchTabs=o&&o.stretchTabs!=null?o.stretchTabs:!0}ngAfterContentChecked(){let e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){let i=this._selectedIndex==null;if(!i){this.selectedTabChange.emit(this._createChangeEvent(e));let o=this._tabBodyWrapper.nativeElement;o.style.minHeight=o.clientHeight+"px"}Promise.resolve().then(()=>
31{this._tabs.forEach((o,a)=>o.isActive=a===e),i||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((i,o)=>{i.position=o-e,this._selectedIndex!=null&&i.position==0&&!i.origin&&(i.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){let i=this._tabs.toArray(),o;for(let a=0;a<i.length;a++)if(i[a].isActive){this._indexToSelect=this._selectedIndex=a,this._lastFocusedTabIndex=null,o=i[a];break}!o&&i[e]&&Promise.resolve().then(()=>{i[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(on(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(i=>i._closestTabGroup===this||!i._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){let i=this._tabHeader;i&&(i.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){let i=new cE;return i.index=e,this._tabs&&this._tabs.length&&(i.tab=this._tabs.toArray()[e]),i}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Xt(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e){return`mat-tab-label-${this._groupId}-${e}`}_getTabContentId(e){return`mat-tab-content-${this._groupId}-${e}`}_setTabBodyWrapperHeight(e){if(!this.dynamicHeight||!this._tabBodyWrapperHeight)return;let i=this._tabBodyWrapper.nativeElement;i.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(i.style.height=e+"px")}_removeTabBodyWrapperHeight(){let e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this.animationDone.emit()}_handleClick(e,i,o){i.focusIndex=o,e.disabled||(this.selectedIndex=o)}_getTabIndex(e){let i=this._lastFocusedTabIndex??this.selectedIndex;return e===i?0:-1}_tabFocusChanged(e,i){e&&e!=="mouse"&&e!=="touch"&&(this._tabHeader.focusIndex=i)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Me),h(ZO,8),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-tab-group"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,y_,5),i&2){let s;Q(s=K())&&(o._allTabs=s)}},viewQuery:function(i,o){if(i&1&&(ae(Ite,5),ae(kte,5)),i&2){let a;Q(a=K())&&(o._tabBodyWrapper=a.first),Q(a=K())&&(o._tabHeader=a.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:10,hostBindings:function(i,o){i&2&&(bt("mat-"+(o.color||"primary")),hi("--mat-tab-animation-duration",o.animationDuration),Y("mat-mdc-tab-group-dynamic-height",o.dynamicHeight)("mat-mdc-tab-group-inverted-header",o.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",o.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",Re],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",Re],dynamicHeight:[2,"dynamicHeight","dynamicHeight",Re],selectedIndex:[2,"selectedIndex","selectedIndex",Nr],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",Nr],disablePagination:[2,"disablePagination","disablePagination",Re],disableRipple:[2,"disableRipple","disableRipple",Re],preserveContent:[2,"preserveContent","preserveContent",Re],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],standalone:!0,features:[ne([{provide:QO,useExisting:t}]),si,ot],ngContentSelectors:x_,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","mat-mdc-tab-body-active","class","content","position","origin","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","id","content","position","origin","animationDuration","preserveContent"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"mat-tab-header",3,0),T("indexFocused",function(c){return D(a),M(o._focusChanged(c))})("selectFocusedIndex",function(c){return D(a),M(o.selectedIndex=c)}),Ir(2,Ote,8,17,"div",4,Jo),p(),x(4,Pte,1,0),d(5,"div",5,1),Ir(7,Rte,1,13,"mat-tab-body",6,Jo),p()}i&2&&(m("selectedIndex",o.selectedIndex||0)("disableRipple",o.disableRipple)("disablePagination",o.disablePagination)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledby),l(2),kr(o._tabs),l(2),_t(o._isServer?4:-1),l(),Y("_mat-animation-noopable",o._animationMode==="NoopAnimations"),l(2),kr(o._tabs))},dependencies:[_6,KO,bC,Wa,gl,JO],styles:['.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}
31.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height);font-family:var(--mat-tab-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-app-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-app-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-app-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-app-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-app-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height);border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-app-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-app-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-app-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}
31.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{al
31ign-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2});let n=t;return n})(),cE=class{},C6=0,C_=(()=>{let t=class t extends XO{get fitInkBarToContent(){return this._fitInkBarToContent.value}set fitInkBarToContent(e){this._fitInkBarToContent.next(e),this._changeDetectorRef.markForCheck()}get animationDuration(){return this._animationDuration}set animationDuration(e){let i=e+"";this._animationDuration=/^\d+$/.test(i)?e+"ms":i}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,i,o,a,s,c,u,f){super(e,a,s,i,o,c,u),this._fitInkBarToContent=new Gn(!1),this.stretchTabs=!0,this.disableRipple=!1,this.color="primary",this.disablePagination=f&&f.disablePagination!=null?f.disablePagination:!1,this.fitInkBarToContent=f&&f.fitInkBarToContent!=null?f.fitInkBarToContent:!1,this.stretchTabs=f&&f.stretchTabs!=null?f.stretchTabs:!0}_itemSelected(){}ngAfterContentInit(){this._inkBar=new gw(this._items),this._items.changes.pipe(on(null),Be(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}ngAfterViewInit(){this.tabPanel,super.ngAfterViewInit()}updateActiveLink(){if(!this._items)return;let e=this._items.toArray();for(let i=0;i<e.length;i++)if(e[i].active){this.selectedIndex=i,this._changeDetectorRef.markForCheck(),this.tabPanel&&(this.tabPanel._activeTabId=e[i].id);return}this.selectedIndex=-1,this._inkBar.hide()}_getRole(){return this.tabPanel?"tablist":this._elementRef.nativeElement.getAttribute("role")}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(mr,8),h(Bt),h(Me),h(lc),h(Ur),h(Er,8),h(ZO,8))},t.\u0275cmp=L({type:t,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(i,o,a){if(i&1&&Zt(a,w_,5),i&2){let s;Q(s=K())&&(o._items=s)}},viewQuery:function(i,o){if(i&1&&(ae(c6,7),ae(d6,7),ae(p6,7),ae(m6,5),ae(u6,5)),i&2){let a;Q(a=K())&&(o._tabListContainer=a.first),Q(a=K())&&(o._tabList=a.first),Q(a=K())&&(o._tabListInner=a.first),Q(a=K())&&(o._nextPaginator=a.first),Q(a=K())&&(o._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-nav-bar","mat-mdc-tab-header"],hostVars:17,hostBindings:function(i,o){i&2&&(Je("role",o._getRole()),hi("--mat-tab-animation-duration",o.animationDuration),Y("mat-mdc-tab-header-pagination-controls-enabled",o._showPaginationControls)("mat-mdc-tab-header-rtl",o._getLayoutDirection()=="rtl")("mat-mdc-tab-nav-bar-stretch-tabs",o.stretchTabs)("mat-primary",o.color!=="warn"&&o.color!=="accent")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("_mat-animation-noopable",o._animationMode==="NoopAnimations"))},inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",Re],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",Re],animationDuration:"animationDuration",backgroundColor:"backgroundColor",disableRipple:[2,"disableRipple","disableRipple",Re],color:"color",tabPanel:"tabPanel"},exportAs:["matTabNavBar","matTabNav"],standalone:!0,features:[si,Ce,ot],attrs:Fte,ngContentSelectors:x_,decls:13,vars:6,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-link-container",3,"keydown"],[1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-links"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(i,o){if(i&1){let a=B();Ct(),d(0,"div",5,0),T("click",function(){return D(a),M(o._handlePaginatorClick("before"))})("mousedown",function(c){return D(a),M(o._handlePaginatorPress("before",c))})("touchend",function(){return D(a),M(o._stopInterval())}),O(2,"div",6),p(),d(3,"div",7,1),T("keydown",function(c){return D(a),M(o._handleKeydown(c))}),d(5,"div",8,2),T("cdkObserveContent",function(){return D(a),M(o._onContentChanges())}),d(7,"div",9,3),Fe(9),p()()(),d(10,"div",10,4),T("mousedown",function(c){return D(a),M(o._handlePaginatorPress("after",c))})("click",function(){return D(a),M(o._handlePaginatorClick("after"))})("touchend",function(){return D(a),M(o._stopInterval())}),O(12,"div",6),p()}i&2&&(Y("mat-mdc-tab-header-pagination-disabled",o._disableScrollBefore),m("matRippleDisabled",o._disableScrollBefore||o.disableRipple),l(10),Y("mat-mdc-tab-header-pagination-disabled",o._disableScrollAfter),m("matRippleDisabled",o._disableScrollAfter||o.disableRipple))},dependencies:[Wa,xb],styles:[".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}
31.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}"],encapsulation:2});let n=t;return n})(),w_=(()=>{let t=class t extends g6{get active(){return this._isActive}set active(e){e!==this._isActive&&(this._isActive=e,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}constructor(e,i,o,a,s,c){super(),this._tabNavBar=e,this.elementRef=i,this._focusMonitor=s,this._destroyed=new Te,this._isActive=!1,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.id=`mat-tab-link-${C6++}`,this.rippleConfig=o||{},this.tabIndex=parseInt(a)||0,c==="NoopAnimations"&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0}),e._fitInkBarToContent.pipe(Be(this._destroyed)).subscribe(u=>{this.fitInkBarToContent=u})}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),super.ngOnDestroy(),this._focusMonitor.stopMonitoring(this.elementRef)}_handleFocus(){this._tabNavBar.focusIndex=this._tabNavBar._items.toArray().indexOf(this)}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(this.disabled?e.preventDefault():this._tabNavBar.tabPanel&&(e.keyCode===32&&e.preventDefault(),this.elementRef.nativeElement.click()))}
31_getAriaControls(){return this._tabNavBar.tabPanel?this._tabNavBar.tabPanel?.id:this.elementRef.nativeElement.getAttribute("aria-controls")}_getAriaSelected(){return this._tabNavBar.tabPanel?this.active?"true":"false":this.elementRef.nativeElement.getAttribute("aria-selected")}_getAriaCurrent(){return this.active&&!this._tabNavBar.tabPanel?"page":null}_getRole(){return this._tabNavBar.tabPanel?"tab":this.elementRef.nativeElement.getAttribute("role")}_getTabIndex(){return this._tabNavBar.tabPanel?this._isActive&&!this.disabled?0:-1:this.disabled?-1:this.tabIndex}};t.\u0275fac=function(i){return new(i||t)(h(C_),h(ge),h(om,8),ja("tabindex"),h(Po),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mdc-tab","mat-mdc-tab-link","mat-mdc-focus-indicator"],hostVars:11,hostBindings:function(i,o){i&1&&T("focus",function(){return o._handleFocus()})("keydown",function(s){return o._handleKeydown(s)}),i&2&&(Je("aria-controls",o._getAriaControls())("aria-current",o._getAriaCurrent())("aria-disabled",o.disabled)("aria-selected",o._getAriaSelected())("id",o.id)("tabIndex",o._getTabIndex())("role",o._getRole()),Y("mat-mdc-tab-disabled",o.disabled)("mdc-tab--active",o.active))},inputs:{active:[2,"active","active",Re],disabled:[2,"disabled","disabled",Re],disableRipple:[2,"disableRipple","disableRipple",Re],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Nr(e)],id:"id"},exportAs:["matTabLink"],standalone:!0,features:[si,Ce,ot],attrs:Nte,ngContentSelectors:x_,decls:5,vars:2,consts:[[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"]],template:function(i,o){i&1&&(Ct(),O(0,"span",0)(1,"div",1),d(2,"span",2)(3,"span",3),Fe(4),p()()),i&2&&(l(),m("matRippleTrigger",o.elementRef.nativeElement)("matRippleDisabled",o.rippleDisabled))},dependencies:[Wa],styles:['.mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height);font-family:var(--mat-tab-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-app-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-app-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-app-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-app-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-app-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height);border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-app-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-app-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab-link .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-app-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}'],encapsulation:2,changeDetection:0});let n=t;return n})(),_w=(()=>{let t=class t{constructor(){this.id=`mat-tab-nav-panel-${C6++}`}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["mat-tab-nav-panel"]],hostAttrs:["role","tabpanel",1,"mat-mdc-tab-nav-panel"],hostVars:2,hostBindings:function(i,o){i&2&&Je("aria-labelledby",o._activeTabId)("id",o.id
31)},inputs:{id:"id"},exportAs:["matTabNavPanel"],standalone:!0,features:[ot],ngContentSelectors:x_,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),Fe(0))},encapsulation:2,changeDetection:0});let n=t;return n})(),S_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[Ot,sE,lE,y_,bw,C_,_w,w_],exports:[Ot,sE,lE,y_,bw,C_,_w,w_]}),t.\u0275inj=Nt({imports:[Ot,Ot]});let n=t;return n})();var E6={};Ae(E6,{MAT_LIST:()=>lie,MAT_LIST_CONFIG:()=>S6,MAT_NAV_LIST:()=>cie,MAT_SELECTION_LIST_VALUE_ACCESSOR:()=>T6,MatActionList:()=>iP,MatList:()=>nP,MatListItem:()=>rP,MatListItemAvatar:()=>pE,MatListItemIcon:()=>mE,MatListItemLine:()=>yw,MatListItemMeta:()=>dE,MatListItemTitle:()=>vw,MatListModule:()=>I_,MatListOption:()=>T_,MatListSubheaderCssMatStyler:()=>oP,MatNavList:()=>aP,MatSelectionList:()=>E_,MatSelectionListChange:()=>uE,SELECTION_LIST:()=>cP,_MatListItemGraphicBase:()=>lP});y();var hE=["*"],sP='.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item{display:flex;position:relative;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer;padding-left:16px;padding-right:16px;background-color:var(--mdc-list-list-item-container-color);border-radius:var(--mdc-list-list-item-container-shape, var(--mat-app-corner-none))}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item:focus{outline:0}.mdc-list-item.mdc-list-item--disabled{cursor:auto}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--selected::before,.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item:not(.mdc-list-item--selected):focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.cdk-high-contrast-active .mdc-list-item.mdc-list-item--selected::before,.cdk-high-contrast-active .mdc-list-item.mdc-list-item--selected:focus::before,.cdk-high-contrast-active .mdc-list-item:not(.mdc-list-item--selected):focus::before{border-color:CanvasText}.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item.mdc-list-item--selected::before{border-width:3px;border-style:double}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color, var(--mat-app-on-surface-variant));width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size);margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size);margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item--with-leading-avatar .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font, var(--mat-app-label-small-font));line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height, var(--mat-app-label-small-line-height));font-size:var(--mdc-list-list-item-trailing-supporting-text-size, var(--mat-app-label-small-size));font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight, var(--mat-app-label-small-weight));letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking, var(--mat-app-label-small-tracking))}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color, var(--mat-app-on-surface-variant));width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color, var(--mat-app-on-surface-variant))}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color, var(--mat-app-primary))}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--mdc-list-list-item-label-text-color, var(--mat-app-on-surface));font-family:var(--mdc-list-list-item-label-text-font, var(--mat-app-body-large-font));line-height:var(--mdc-list-list-item-label-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mdc-list-list-item-label-text-size, var(--mat-app-body-large-size));font-weight:var(--mdc-list-list-item-label-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mdc-list-list-item-label-text-tracking, var(--mat-app-body-large-tracking))}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color, var(--mat-app-on-surface))}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color, var(--mat-app-on-surface))}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;color:var(--mdc-list-list-item-supporting-text-color, var(--mat-app-on-surface-variant));font-family:var(--mdc-list-list-item-supporting-text-font, var(--mat-app-body-medium-font));line-height:var(--mdc-list-list-item-supporting-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mdc-list-list-item-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-list-list-item-supporting-text-weight, var(--mat-app-body-medium-weight));letter-spacing:var(--mdc-list-list-item-supporting-text-tracking, var(--mat-app-body-medium-tracking))}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:16px}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:16px;padding-right:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-trailing-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:0}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-webkit-user-select:none;user-select:none;margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-left:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-right:0}.mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-group__subheader{margin:.75rem 16px}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing,[dir=rtl] .mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing{padding-left:0;padding-right:0}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color, var(--mat-app-on-surface))}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-disabled-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{o
31pacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape, var(--mat-app-corner-full));background-color:var(--mdc-list-list-item-leading-avatar-color, var(--mat-app-primary-container))}.mat-mdc-list-item-icon{font-size:var(--mdc-list-list-item-leading-icon-size)}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space)}.mat-mdc-nav-list .mat-mdc-list-item{border-radius:var(--mat-list-active-indicator-shape, var(--mat-app-corner-full));--mat-mdc-focus-indicator-border-radius:var(--mat-list-active-indicator-shape, var(--mat-app-corner-full))}.mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color, var(--mat-app-secondary-container))}',w6=["unscopedContent"],zte=["text"],$te=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],Ute=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"],Hte=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],qte=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"];function Wte(n,t){n&1&&Fe(0,4)}function Yte(n,t){if(n&1&&(d(0,"div",11),O(1,"input",12),d(2,"div",13),ar(),d(3,"svg",14),O(4,"path",15),p(),cs(),O(5,"div",16),p()()),n&2){let r=b
31();Y("mdc-checkbox--disabled",r.disabled),l(),m("checked",r.selected)("disabled",r.disabled)}}function Qte(n,t){if(n&1&&(d(0,"div",17),O(1,"input",18),d(2,"div",19),O(3,"div",20)(4,"div",21),p()()),n&2){let r=b();Y("mdc-radio--disabled",r.disabled),l(),m("checked",r.selected)("disabled",r.disabled)}}function Kte(n,t){}function Xte(n,t){if(n&1&&(d(0,"span",4),x(1,Kte,0,0,"ng-template",6),p()),n&2){b();let r=me(3);l(),m("ngTemplateOutlet",r)}}function Zte(n,t){}function Jte(n,t){if(n&1&&(d(0,"span",5),x(1,Zte,0,0,"ng-template",6),p()),n&2){b();let r=me(5);l(),m("ngTemplateOutlet",r)}}function eie(n,t){}function tie(n,t){if(n&1&&x(0,eie,0,0,"ng-template",6),n&2){b();let r=me(1);m("ngTemplateOutlet",r)}}function iie(n,t){}function nie(n,t){if(n&1&&(d(0,"span",9),x(1,iie,0,0,"ng-template",6),p()),n&2){b();let r=me(3);l(),m("ngTemplateOutlet",r)}}function rie(n,t){}function oie(n,t){if(n&1&&(d(0,"span",9),x(1,rie,0,0,"ng-template",6),p()),n&2){b();let r=me(5);l(),m("ngTemplateOutlet",r)}}function aie(n,t){}function sie(n,t){if(n&1&&x(0,aie,0,0,"ng-template",6),n&2){b();let r=me(1);m("ngTemplateOutlet",r)}}var x6=new tt("ListOption"),vw=(()=>{let t=class t{constructor(e){this._elementRef=e}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"],standalone:!0});let n=t;return n})(),yw=(()=>{let t=class t{constructor(e){this._elementRef=e}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"],standalone:!0});let n=t;return n})(),dE=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"],standalone:!0});let n=t;return n})(),lP=(()=>{let t=class t{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}};t.\u0275fac=function(i){return new(i||t)(h(x6,8))},t.\u0275dir=_e({type:t,hostVars:4,hostBindings:function(i,o){i&2&&Y("mdc-list-item__start",o._isAlignedAtStart())("mdc-list-item__end",!o._isAlignedAtStart())},standalone:!0});let n=t;return n})(),pE=(()=>{let t=class t extends lP{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],standalone:!0,features:[Ce]});let n=t;return n})(),mE=(()=>{let t=class t extends lP{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275dir=_e({type:t,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],standalone:!0,features:[Ce]});let n=t;return n})(),S6=new tt("MAT_LIST_CONFIG"),rp=(()=>{let t=class t{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Rt(S6,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=mt(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=mt(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,hostVars:1,hostBindings:function(i,o){i&2&&Je("aria-disabled",o.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},standalone:!0});let n=t;return n})(),tP=(()=>{let t=class t{set lines(e){this._explicitLines=Ao(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=mt(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=mt(e)}get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(e,i,o,a,s,c){this._elementRef=e,this._ngZone=i,this._listBase=o,this._platform=a,this._explicitLines=null,this._disableRipple=!1,this._disabled=!1,this._subscriptions=new ln,this._rippleRenderer=null,this._hasUnscopedTextContent=!1,this.rippleConfig=s||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._noopAnimations=c==="NoopAnimations",o&&!o._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new _j(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Xt(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}
31_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let i=this._explicitLines??this._inferLinesFromContent(),o=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",i===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",i===3),this._hasUnscopedTextContent){let a=this._titles.length===0&&i===1;o.classList.toggle("mdc-list-item__primary-text",a),o.classList.toggle("mdc-list-item__secondary-text",!a)}else o.classList.remove("mdc-list-item__primary-text"),o.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt),h(rp,8),h(Ur),h(om,8),h(Er,8))},t.\u0275dir=_e({type:t,contentQueries:function(i,o,a){if(i&1&&(Zt(a,pE,4),Zt(a,mE,4)),i&2){let s;Q(s=K())&&(o._avatars=s),Q(s=K())&&(o._icons=s)}},hostVars:4,hostBindings:function(i,o){i&2&&(Je("aria-disabled",o.disabled)("disabled",o._isButtonElement&&o.disabled||null),Y("mdc-list-item--disabled",o.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"},standalone:!0});let n=t;return n})();var iP=(()=>{let t=class t extends rp{constructor(){super(...arguments),this._isNonInteractive=!1}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-action-list"]],hostAttrs:["role","group",1,"mat-mdc-action-list","mat-mdc-list-base","mdc-list"],exportAs:["matActionList"],standalone:!0,features:[ne([{provide:rp,useExisting:t}]),Ce,ot],ngContentSelectors:hE,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),Fe(0))},styles:['.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item{display:flex;position:relative;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer;padding-left:16px;padding-right:16px;background-color:var(--mdc-list-list-item-container-color);border-radius:var(--mdc-list-list-item-container-shape, var(--mat-app-corner-none))}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item:focus{outline:0}.mdc-list-item.mdc-list-item--disabled{cursor:auto}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--selected::before,.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item:not(.mdc-list-item--selected):focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.cdk-high-contrast-active .mdc-list-item.mdc-list-item--selected::before,.cdk-high-contrast-active .mdc-list-item.mdc-list-item--selected:focus::before,.cdk-high-contrast-active .mdc-list-item:not(.mdc-list-item--selected):focus::before{border-color:CanvasText}.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item.mdc-list-item--selected::before{border-width:3px;border-style:double}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color, var(--mat-app-on-surface-variant));width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size);margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size);margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item--with-leading-avatar .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font, var(--mat-app-label-small-font));line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height, var(--mat-app-label-small-line-height));font-size:var(--mdc-list-list-item-trailing-supporting-text-size, var(--mat-app-label-small-size));font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight, var(--mat-app-label-small-weight));letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking, var(--mat-app-label-small-tracking))}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color, var(--mat-app-on-surface-variant));width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color, var(--mat-app-on-surface-variant))}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color, var(--mat-app-primary))}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--mdc-list-list-item-label-text-color, var(--mat-app-on-surface));font-family:var(--mdc-list-list-item-label-text-font, var(--mat-app-body-large-font));line-height:var(--mdc-list-list-item-label-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mdc-list-list-item-label-text-size, var(--mat-app-body-large-size));font-weight:var(--mdc-list-list-item-label-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mdc-list-list-item-label-text-tracking, var(--mat-app-body-large-tracking))}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color, var(--mat-app-on-surface))}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color, var(--mat-app-on-surface))}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;color:var(--mdc-list-list-item-supporting-text-color, var(--mat-app-on-surface-variant));font-family:var(--mdc-list-list-item-supporting-text-font, var(--mat-app-body-medium-font));line-height:var(--mdc-list-list-item-supporting-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mdc-list-list-item-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-list-list-item-supporting-text-weight, var(--mat-app-body-medium-weight));letter-spacing:var(--mdc-list-list-item-supporting-text-tracking, var(--mat-app-body-medium-tracking))}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:16px}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:16px;padding-right:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-trailing-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:0}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-webkit-user-select:none;user-select:none;margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-left:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-right:0}.mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-group__subheader{margin:.75rem 16px}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color, var(--mat-app-on-surface));opacity:var(--md
31c-list-list-item-disabled-trailing-icon-opacity)}.mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing,[dir=rtl] .mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing{padding-left:0;padding-right:0}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color, var(--mat-app-on-surface))}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-disabled-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-list-list-item-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape, var(--mat-app-corner-full));background-color:var(--mdc-list-list-item-leading-avatar-color, var(--mat-app-primary-container))}.mat-mdc-list-item-icon{font-size:var(--mdc-list-list-item-leading-icon-size)}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space)}.mat-mdc-nav-list .mat-mdc-list-item{border-radius:var(--mat-list-active-indicator-shape, var(--mat-app-corner-full));--mat-mdc-focus-indicator-border-radius:var(--mat-list-active-indicator-shape, var(--mat-app-corner-full))}.mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color, var(--mat-app-secondary-container))}'],encapsulation:2,changeDetection:0});let n=t;return n})(),lie=new tt("MatList"),nP=(()=>{let t=class t extends rp{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],standalone:!0,features:[ne([{provide:rp,useExisting:t}]),Ce,ot],ngContentSelectors:hE,decls:1,vars:0,template:function(i,o){i&1&&(Ct(
31),Fe(0))},styles:[sP],encapsulation:2,changeDetection:0});let n=t;return n})(),rP=(()=>{let t=class t extends tP{get activated(){return this._activated}set activated(e){this._activated=mt(e)}constructor(e,i,o,a,s,c){super(e,i,o,a,s,c),this._activated=!1}_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt),h(rp,8),h(Ur),h(om,8),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,yw,5),Zt(a,vw,5),Zt(a,dE,5)),i&2){let s;Q(s=K())&&(o._lines=s),Q(s=K())&&(o._titles=s),Q(s=K())&&(o._meta=s)}},viewQuery:function(i,o){if(i&1&&(ae(w6,5),ae(zte,5)),i&2){let a;Q(a=K())&&(o._unscopedContent=a.first),Q(a=K())&&(o._itemText=a.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(i,o){i&2&&(Je("aria-current",o._getAriaCurrent()),Y("mdc-list-item--activated",o.activated)("mdc-list-item--with-leading-avatar",o._avatars.length!==0)("mdc-list-item--with-leading-icon",o._icons.length!==0)("mdc-list-item--with-trailing-meta",o._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",o._hasBothLeadingAndTrailing())("_mat-animation-noopable",o._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],standalone:!0,features:[Ce,ot],ngContentSelectors:Ute,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-mdc-focus-indicator"]],template:function(i,o){if(i&1){let a=B();Ct($te),Fe(0),d(1,"span",1),Fe(2,1),Fe(3,2),d(4,"span",2,0),T("cdkObserveContent",function(){return D(a),M(o._updateItemLines(!0))}),Fe(6,3),p()(),Fe(7,4),Fe(8,5),O(9,"div",3)}},dependencies:[xb],encapsulation:2,changeDetection:0});let n=t;return n})(),cP=new tt("SelectionList"),T_=(()=>{let t=class t extends tP{get checkboxPosition(){return this.togglePosition}set checkboxPosition(e){this.togglePosition=e}get color(){return this._color||this._selectionList.color}set color(e){this._color=e}get value(){return this._value}set value(e){this.selected&&e!==this.value&&this._inputsInitialized&&(this.selected=!1),this._value=e}get selected(){return this._selectionList.selectedOptions.isSelected(this)}set selected(e){let i=mt(e);i!==this._selected&&(this._setSelected(i),(i||this._selectionList.multiple)&&this._selectionList._reportValueChange())}constructor(e,i,o,a,s,c,u){super(e,i,o,a,c,u),this._selectionList=o,this._changeDetectorRef=s,this.selectedChange=new J,this.togglePosition="after",this._selected=!1,this._inputsInitialized=!1}ngOnInit(){let e=this._selectionList;e._value&&e._value.some(o=>e.compareWith(this._value,o))&&this._setSelected(!0);let i=this._selected;Promise.resolve().then(()=>{(this._selected||i)&&(this.selected=!0,this._changeDetectorRef.markForCheck())}),this._inputsInitialized=!0}ngOnDestroy(){super.ngOnDestroy(),this.selected&&Promise.resolve().then(()=>{this.selected=!1})}toggle(){this.selected=!this.selected}focus(){this._hostElement.focus()}getLabel(){return(this._titles?.get(0)?._elementRef.nativeElement||this._unscopedContent?.nativeElement)?.textContent||""}_hasCheckboxAt(e){return this._selectionList.multiple&&this._getTogglePosition()===e}_hasRadioAt(e){return!this._selectionList.multiple&&this._getTogglePosition()===e&&!this._selectionList.hideSingleSelectionIndicator}_hasIconsOrAvatarsAt(e){return this._hasProjected("icons",e)||this._hasProjected("avatars",e)}_hasProjected(e,i){return this._getTogglePosition()!==i&&(e==="avatars"?this._avatars.length!==0:this._icons.length!==0)}_handleBlur(){this._selectionList._onTouched()}_getTogglePosition(){return this.togglePosition||"after"}_setSelected(e){return e===this._selected?!1:(this._selected=e,e?this._selectionList.selectedOptions.select(this):this._selectionList.selectedOptions.deselect(this),this.selectedChange.emit(e),this._changeDetectorRef.markForCheck(),!0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_toggleOnInteraction(){this.disabled||(this._selectionList.multiple?(this.selected=!this.selected,this._selectionList._emitChangeEvent([this])):this.selected||(this.selected=!0,this._selectionList._emitChangeEvent([this])))}_setTabindex(e){this._hostElement.setAttribute("tabindex",e+"")}_hasBothLeadingAndTrailing(){let e=this._hasProjected("avatars","before")||this._hasProjected("icons","before")||this._hasCheckboxAt("before")||this._hasRadioAt("before"),i=this._hasProjected("icons","after")||this._hasProjected("avatars","after")||this._hasCheckboxAt("after")||this._hasRadioAt("after");return e&&i}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt),h(cP),h(Ur),h(Me),h(om,8),h(Er,8))},t.\u0275cmp=L({type:t,selectors:[["mat-list-option"]],contentQueries:function(i,o,a){if(i&1&&(Zt(a,yw,5),Zt(a,vw,5)),i&2){let s;Q(s=K())&&(o._lines=s),Q(s=K())&&(o._titles=s)}},viewQuery:function(i,o){if(i&1&&ae(w6,5),i&2){let a;Q(a=K())&&(o._unscopedContent=a.first)}},hostAttrs:["role","option",1,"mat-mdc-list-item","mat-mdc-list-option","mdc-list-item"],hostVars:27,hostBindings:function(i,o){i&1&&T("blur",function(){return o._handleBlur()})("click",function(){return o._toggleOnInteraction()}),i&2&&(Je("aria-selected",o.selected),Y("mdc-list-item--selected",o.selected&&!o._selectionList.multiple&&o._selectionList.hideSingleSelectionIndicator)("mdc-list-item--with-leading-avatar",o._hasProjected("avatars","before"))("mdc-list-item--with-leading-icon",o._hasProjected("icons","before"))("mdc-list-item--with-trailing-icon",o._hasProjected("icons","after"))("mat-mdc-list-option-with-trailing-avatar",o._hasProjected("avatars","after"))("mdc-list-item--with-leading-checkbox",o._hasCheckboxAt("before"))("mdc-list-item--with-trailing-checkbox",o._hasCheckboxAt("after"))("mdc-list-item--with-leading-radio",o._hasRadioAt("before"))("mdc-list-item--with-trailing-radio",o._hasRadioAt("after"))("mat-mdc-list-item-both-leading-and-trailing",o._hasBothLeadingAndTrailing())("mat-accent",o.color!=="primary"&&o.color!=="warn")("mat-warn",o.color==="warn")("_mat-animation-noopable",o._noopAnimations))},inputs:{togglePosition:"togglePosition",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected"},outputs:{selectedChange:"selectedChange"},exportAs:["matListOption"],standalone:!0,features:[ne([{provide:tP,useExisting:t},{provide:x6,useExisting:t}]),Ce,ot],ngContentSelectors:qte,decls:20,vars:4,consts:[["icons",""],["checkbox",""],["radio",""],["unscopedContent",""],[1,"mdc-list-item__start","mat-mdc-list-option-checkbox-before"],[1,"mdc-list-item__start","mat-mdc-list-option-radio-before"],[3,"ngTemplateOutlet"],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mdc-list-item__end"],[1,"mat-mdc-focus-indicator"],[1,"mdc-checkbox"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","disabled"],[1,"mdc-checkbox__background"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],[1,"mdc-radio"],["type","radio",1,"mdc-radio__native-control",3,"checked","disabled"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner
31-circle"]],template:function(i,o){if(i&1){let a=B();Ct(Hte),x(0,Wte,1,0,"ng-template",null,0,kt)(2,Yte,6,4,"ng-template",null,1,kt)(4,Qte,5,4,"ng-template",null,2,kt)(6,Xte,2,1,"span",4)(7,Jte,2,1,"span",5)(8,tie,1,1,null,6),d(9,"span",7),Fe(10),Fe(11,1),d(12,"span",8,3),T("cdkObserveContent",function(){return D(a),M(o._updateItemLines(!0))}),Fe(14,2),p()(),x(15,nie,2,1,"span",9)(16,oie,2,1,"span",9)(17,sie,1,1,null,6),Fe(18,3),O(19,"div",10)}i&2&&(l(6),_t(o._hasCheckboxAt("before")?6:o._hasRadioAt("before")?7:-1),l(2),_t(o._hasIconsOrAvatarsAt("before")?8:-1),l(7),_t(o._hasCheckboxAt("after")?15:o._hasRadioAt("after")?16:-1),l(2),_t(o._hasIconsOrAvatarsAt("after")?17:-1))},dependencies:[fo,xb],styles:['.mat-mdc-list-option-with-trailing-avatar.mdc-list-item,[dir=rtl] .mat-mdc-list-option-with-trailing-avatar.mdc-list-item{padding-left:0;padding-right:0}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{margin-left:16px;margin-right:16px;width:40px;height:40px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{border-radius:50%}.mat-mdc-list-option .mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mat-mdc-list-option .mdc-checkbox--disabled{cursor:default;pointer-events:none}.cdk-high-contrast-active .mat-mdc-list-option .mdc-checkbox--disabled{opacity:.5}.mat-mdc-list-option .mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-app-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mat-mdc-list-option .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary))}.mat-mdc-list-option .mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mat-mdc-list-option .mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-app-on-surface));background-color:rgba(0,0,0,0)}.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary))}.mat-mdc-list-option .mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-app-on-surface))}.mat-mdc-list-option .mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary))}.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-mdc-list-option .mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mat-mdc-list-option .mdc-checkbox__checkmark{color:CanvasText}.mat-mdc-list-option .mdc-checkbox--disabled .mdc-checkbox__checkmark,.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.cdk-high-contrast-active .mat-mdc-list-option .mdc-checkbox--disabled .mdc-checkbox__checkmark,.cdk-high-contrast-active .mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}.mat-mdc-list-option .mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mat-mdc-list-option .mdc-checkbox__mixedmark{width:100%;height:0;
31transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mat-mdc-list-option .mdc-checkbox__mixedmark{margin:0 1px}.mat-mdc-list-option .mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mat-mdc-list-option .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.mat-mdc-list-option .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mat-mdc-list-option .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}
31}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-list-option._mat-animation-noopable .mdc-checkbox *,.mat-mdc-list-option._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-list-option .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-list-option .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-list-option .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-list-option .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-list-option .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-list-option .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner
31-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-app-primary))}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-list-option._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-list-option._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-list-option .mdc-checkbox__native-control,.mat-mdc-list-option .mdc-radio__native-control{display:none}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected [dir=rtl]::after{right:auto;left:16px}'],encapsulation:2,changeDetection:0});let n=t;return n})(),oP=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","mat-subheader",""],["","matSubheader",""]],hostAttrs:[1,"mat-mdc-subheader","mdc-list-group__subheader"],standalone:!0});let n=t;return n})(),cie=new tt("MatNavList"),aP=(()=>{let t=class t extends rp{constructor(){super(...arguments),this._isNonInteractive=!1}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275cmp=L({type:t,selectors:[["mat-nav-list"]],hostAttrs:["role","navigation",1,"mat-mdc-nav-list","mat-mdc-list-base","mdc-list"],exportAs:["matNavList"],standalone:!0,features:[ne([{provide:rp,useExisting:t}]),Ce,ot],ngContentSelectors:hE,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),Fe(0))},styles:[sP],encapsulation:2,changeDetection:0});let n=t;return n})(),T6={provide:ye,useExisting:he(()=>E_),multi:!0},uE=class{constructor(t,r){this.source=t,this.options=r}},E_=(()=>{let t=class t extends rp{get multiple(){return this._multiple}set multiple(e){let i=mt(e);i!==this._multiple&&(this._multiple=i,this.selectedOptions=new Wc(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=mt(e)}constructor(e,i){super(),this._element=e,this._ngZone=i,this._initialized=!1,this._destroyed=new Te,this._onChange=o=>{},this.selectionChange=new J,this.color="accent",this.compareWith=(o,a)=>o===a,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new Wc(this._multiple),this._onTouched=()=>{},this._changeDetectorRef=Rt(Me),this._selectionListDisabled=!1,this._handleFocusout=()=>{setTimeout(()=>{this._containsFocus()||this._resetActiveOption()})},this._handleFocusin=o=>{if(this.disabled)return;let a=this._items.toArray().findIndex(s=>s._elementRef.nativeElement.contains(o.target));a>-1?this._setActiveOption(a):this._resetActiveOption()},this._isNonInteractive=!1}ngAfterViewInit(){this._initialized=!0,this._setupRovingTabindex(),this._ngZone.runOutsideAngular(()=>{this._element.nativeElement.addEventListener("focusin",this._handleFocusin),this._element.nativeElement.addEventListener("focusout",this._handleFocusout)}),this._value&&this._setOptionsFromValues(this._value),this._watchForSelectionChange()}ngOnChanges(e){let i=e.disabled,o=e.disableRipple,a=e.hideSingleSelectionIndicator;(o&&!o.firstChange||i&&!i.firstChange||a&&!a.firstChange)&&this._markOptionsForCheck()}ngOnDestroy(){this._keyManager?.destroy(),this._element.nativeElement.removeEventListener("focusin",this._handleFocusin),this._element.nativeElement.removeEventListener("focusout",this._handleFocusout),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}focus(e){this._element.nativeElement.focus(e)}selectAll(){return this._setAllOptionsSelected(!0)}deselectAll(){return this._setAllOptionsSelected(!1)}_reportValueChange(){if(this.options&&!this._isDestroyed){let e=this._getSelectedOptionValues();this._onChange(e),this._value=e}}_emitChangeEvent(e){this.selectionChange.emit(new uE(this,e))}writeValue(e){this._value=e,this.options&&this._setOptionsFromValues(e||[])}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}get disabled(){return this._selectionListDisabled}set disabled(e){this._selectionListDisabled=mt(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Be(this._destroyed)).subscribe(e=>{for(let i of e.added)i.selected=!0;for(let i of e.removed)i.selected=!1;this._containsFocus()||this._resetActiveOption()})}_setOptionsFromValues(e){this.options.forEach(i=>
31i._setSelected(!1)),e.forEach(i=>{let o=this.options.find(a=>a.selected?!1:this.compareWith(a.value,i));o&&o._setSelected(!0)})}_getSelectedOptionValues(){return this.options.filter(e=>e.selected).map(e=>e.value)}_markOptionsForCheck(){this.options&&this.options.forEach(e=>e._markForCheck())}_setAllOptionsSelected(e,i){let o=[];return this.options.forEach(a=>{(!i||!a.disabled)&&a._setSelected(e)&&o.push(a)}),o.length&&this._reportValueChange(),o}get options(){return this._items}_handleKeydown(e){let i=this._keyManager.activeItem;if((e.keyCode===13||e.keyCode===32)&&!this._keyManager.isTyping()&&i&&!i.disabled)e.preventDefault(),i._toggleOnInteraction();else if(e.keyCode===65&&this.multiple&&!this._keyManager.isTyping()&&po(e,"ctrlKey")){let o=this.options.some(a=>!a.disabled&&!a.selected);e.preventDefault(),this._emitChangeEvent(this._setAllOptionsSelected(o,!0))}else this._keyManager.onKeydown(e)}_setupRovingTabindex(){this._keyManager=new dc(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Be(this._destroyed)).subscribe(()=>{let e=this._keyManager.activeItem;(!e||this._items.toArray().indexOf(e)===-1)&&this._resetActiveOption()})}_setActiveOption(e){this._items.forEach((i,o)=>i._setTabindex(o===e?0:-1)),this._keyManager.updateActiveItem(e)}_resetActiveOption(){if(this.disabled){this._setActiveOption(-1);return}let e=this._items.find(i=>i.selected&&!i.disabled)||this._items.first;this._setActiveOption(e?this._items.toArray().indexOf(e):-1)}_containsFocus(){let e=Cb();return e&&this._element.nativeElement.contains(e)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["mat-selection-list"]],contentQueries:function(i,o,a){if(i&1&&Zt(a,T_,5),i&2){let s;Q(s=K())&&(o._items=s)}},hostAttrs:["role","listbox",1,"mat-mdc-selection-list","mat-mdc-list-base","mdc-list"],hostVars:1,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._handleKeydown(s)}),i&2&&Je("aria-multiselectable",o.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],standalone:!0,features:[ne([T6,{provide:rp,useExisting:t},{provide:cP,useExisting:t}]),Ce,lt,ot],ngContentSelectors:hE,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),Fe(0))},styles:[sP],encapsulation:2,changeDetection:0});let n=t;return n})(),I_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[L2,zi,Ot,Ya,z2,nP,iP,aP,E_,rP,T_,oP,pE,mE,yw,vw,dE],exports:[nP,iP,aP,E_,rP,T_,pE,mE,oP,_m,yw,vw,dE]}),t.\u0275inj=Nt({imports:[L2,zi,Ot,Ya,z2,_m]});let n=t;return n})();var uP={};Ae(uP,{CLOCK_INNER_RADIUS:()=>fE,CLOCK_OUTER_RADIUS:()=>wm,CLOCK_RADIUS:()=>Uf,CLOCK_TICK_RADIUS:()=>Hf,DatetimeAdapter:()=>El,MAT_DATETIMEPICKER_VALIDATORS:()=>A6,MAT_DATETIMEPICKER_VALUE_ACCESSOR:()=>M6,MAT_DATETIME_FORMATS:()=>Qf,MAT_NATIVE_DATETIME_FORMATS:()=>k6,MatDatetimepickerCalendarBodyComponent:()=>A_,MatDatetimepickerCalendarCell:()=>M_,MatDatetimepickerCalendarComponent:()=>Cw,MatDatetimepickerClockComponent:()=>_E,MatDatetimepickerComponent:()=>Wf,MatDatetimepickerContentComponent:()=>ww,MatDatetimepickerFilterType:()=>D_,MatDatetimepickerInputDirective:()=>xm,MatDatetimepickerInputEvent:()=>qf,MatDatetimepickerModule:()=>P_,MatDatetimepickerMonthViewComponent:()=>vE,MatDatetimepickerMultiYearViewComponent:()=>bE,MatDatetimepickerToggleComponent:()=>Yf,MatDatetimepickerYearViewComponent:()=>yE,MatNativeDatetimeModule:()=>O_,NativeDatetimeAdapter:()=>CE,NativeDatetimeModule:()=>pP,getActiveOffset:()=>k_,isSameMultiYearView:()=>mP,yearsPerPage:()=>Tl,yearsPerRow:()=>gE});y();var die=["matDatetimepickerCalendarBody",""];function pie(n,t){if(n&1&&(d(0,"tr",2)(1,"td",3),g(2),p()()),n&2){let r=b
31();l(),Je("colspan",r.numCols),l(),j(" ",r.label," ")}}function mie(n,t){if(n&1&&(d(0,"td",7),g(1),p()),n&2){let r=b(2);Je("colspan",r._firstRowOffset),l(),j(" ",r._firstRowOffset>=r.labelMinRequiredCells?r.label:""," ")}}function uie(n,t){if(n&1){let r=B();d(0,"td",8),T("click",function(){let i=D(r).$implicit,o=b(2);return M(o._cellClicked(i))}),d(1,"div",9),g(2),p()()}if(n&2){let r=t.$implicit,e=t.index,i=b().index,o=b();Y("mat-datetimepicker-calendar-body-active",o._isActiveCell(i,e))("mat-datetimepicker-calendar-body-disabled",!r.enabled),Je("aria-disabled",!r.enabled||null)("aria-label",r.ariaLabel),l(),Y("mat-datetimepicker-calendar-body-selected",o.selectedValue===r.value)("mat-datetimepicker-calendar-body-today",o.todayValue===r.value),Je("aria-selected",o.selectedValue===r.value),l(),j(" ",r.displayValue," ")}}function hie(n,t){if(n&1&&(d(0,"tr",4),x(1,mie,2,2,"td",5)(2,uie,3,12,"td",6),p()),n&2){let r=t.$implicit,e=t.index,i=b();l(),m("ngIf",e===0&&i._firstRowOffset),l(),m("ngForOf",r)}}function fie(n,t){if(n&1&&(d(0,"div",7),g(1),p()),n&2){let r=t.$implicit,e=b();hi("font-size",r.fontSize)("left",r.left+"%")("top",r.top+"%"),Y("mat-datetimepicker-clock-cell-disabled",!r.enabled)("mat-datetimepicker-clock-cell-selected",e._selectedHour===r.value),l(),j(" ",r.displayValue," ")}}function gie(n,t){if(n&1&&(d(0,"div",7),g(1),p()),n&2){let r=t.$implicit,e=b();hi("left",r.left+"%")("top",r.top+"%"),Y("mat-datetimepicker-clock-cell-disabled",!r.enabled)("mat-datetimepicker-clock-cell-selected",e._selectedMinute===r.value),l(),j(" ",r.displayValue," ")}}function bie(n,t){if(n&1&&(d(0,"th"),g(1),p()),n&2){let r=t.$implicit;Je("aria-label",r.long),l(),j(" ",r.narrow," ")}}function _ie(n,t){n&1&&(d(0,"mat-icon"),g(1,"arrow_drop_down"),p())}function vie(n,t){if(n&1){let r=B();d(0,"div",10),T("click",function(){D(r);let i=b();return M(i._yearClicked())}),g(1),x(2,_ie,2,0,"mat-icon",11),p()}if(n&2){let r=b();Y("active",r.currentView==="year"||r.currentView==="multi-year"),l(),j(" ",r._yearLabel," "),l(),m("ngIf",r.multiYearSelector||r.type==="year")}}function yie(n,t){if(n&1){let r=B();d(0,"span",12),T("click",function(){D(r);let i=b();return M(i._dateClicked())}),g(1),p()}if(n&2){let r=b();Y("active",r.currentView==="month")("not-clickable",r.type==="month"),l(),z(r._dateLabel)}}function Cie(n,t){if(n&1){let r=B();d(0,"span",17)(1,"span",18),T("click",function(){D(r);let i=b(2);return M(i._ampmClicked("AM"))}),g(2,"AM"),p(),g(3,"/"),d(4,"span",18),T("click",function(){D(r);let i=b(2);return M(i._ampmClicked("PM"))}),g(5,"PM"),p()()}if(n&2){let r=b(2);l(),Y("active",r._AMPM==="AM"),l(3),Y("active",r._AMPM==="PM")}}function wie(n,t){if(n&1){let r=B();d(0,"span",13)(1,"span",14),T("click",function(){D(r);let i=b();return M(i._hoursClicked())}),g(2),p(),g(3,":"),d(4,"span",15),T("click",function(){D(r);let i=b();return M(i._minutesClicked())}),g(5),p(),O(6,"br"),x(7,Cie,6,4,"span",16),p()}if(n&2){let r=b();Y("active",r.currentView==="clock"),l(),Y("active",r._clockView==="hour"),l(),z(r._hoursLabel),l(2),Y("active",r._clockView==="minute"),l(),z(r._minutesLabel),l(2),m("ngIf",r.twelvehour)}}function xie(n,t){if(n&1){let r=B();d(0,"div",19)(1,"div",20)(2,"div",21),T("click",function(){D(r);let i=b();return M(i._previousClicked())}),ar(),d(3,"svg",22),O(4,"path",23),p()(),cs(),d(5,"div",24),T("@slideCalendar.done",function(){D(r);let i=b();return M(i._calendarStateDone())}),d(6,"strong"),g(7),p()(),d(8,"div",25),T("click",function(){D(r);let i=b();return M(i._nextClicked())}),ar(),d(9,"svg",22),O(10,"path",26),p()()()()}if(n&2){let r=b();l(2),Y("disabled",!r._previousEnabled()),Je("aria-disabled",!r._previousEnabled())("aria-label",r._ariaLabelPrev),l(3),m("@slideCalendar",r._calendarState),l(2),z(r._monthYearLabel),l(),Y("disabled",!r._nextEnabled()),Je("aria-disabled",!r._nextEnabled())("aria-label",r._ariaLabelNext)}}function Sie(n,t){if(n&1){let r=B();d(0,"mat-datetimepicker-month-view",27),T("_userSelection",function(){D(r);let i=b();return M(i._userSelected())})("selectedChange",function(i){D(r);let o=b();return M(o._dateSelected(i))}),p()}
31if(n&2){let r=b();m("activeDate",r._activeDate)("dateFilter",r._dateFilterForViews)("selected",r.selected)("type",r.type)}}function Tie(n,t){if(n&1){let r=B();d(0,"mat-datetimepicker-year-view",27),T("_userSelection",function(){D(r);let i=b();return M(i._userSelected())})("selectedChange",function(i){D(r);let o=b();return M(o._monthSelected(i))}),p()}if(n&2){let r=b();m("activeDate",r._activeDate)("dateFilter",r._dateFilterForViews)("selected",r.selected)("type",r.type)}}function Eie(n,t){if(n&1){let r=B();d(0,"mat-datetimepicker-multi-year-view",28),T("_userSelection",function(){D(r);let i=b();return M(i._userSelected())})("selectedChange",function(i){D(r);let o=b();return M(o._yearSelected(i))}),p()}if(n&2){let r=b();m("activeDate",r._activeDate)("dateFilter",r._dateFilterForViews)("maxDate",r.maxDate)("minDate",r.minDate)("selected",r.selected)("type",r.type)}}function Iie(n,t){if(n&1){let r=B();d(0,"mat-datetimepicker-clock",29),T("_userSelection",function(){D(r);let i=b();return M(i._userSelected())})("activeDateChange",function(i){D(r);let o=b();return M(o._onActiveDateChange(i))})("selectedChange",function(i){D(r);let o=b();return M(o._timeSelected(i))}),p()}if(n&2){let r=b();m("dateFilter",r.dateFilter)("interval",r.timeInterval)("maxDate",r.maxDate)("minDate",r.minDate)("selected",r._activeDate)("startView",r._clockView)("twelvehour",r.twelvehour)}}function kie(n,t){n&1&&(ar(),d(0,"svg",4),O(1,"path",5),p())}function Die(n,t){n&1&&(ar(),d(0,"svg",4),O(1,"path",6),p())}function Mie(n,t){n&1&&(ar(),d(0,"svg",4),O(1,"path",7)(2,"path",8),p())}var El=class extends To{constructor(t){super(),this._delegate=t}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}compareDatetime(t,r,e=!0){return this.compareDate(t,r)||this.getHour(t)-this.getHour(r)||e&&this.getMinute(t)-this.getMinute(r)}sameDatetime(t,r){if(t&&r){let e=this.isValid(t),i=this.isValid(r);return e&&i?!this.compareDatetime(t,r):e===i}return t===r}sameYear(t,r){return t&&r&&this.getYear(t)===this.getYear(r)}sameDay(t,r){return t&&r&&this.getDate(t)===this.getDate(r)&&this.sameMonthAndYear(t,r)}sameHour(t,r){return t&&r&&this.getHour(t)===this.getHour(r)&&this.sameDay(t,r)}sameMinute(t,r){return t&&r&&this.getMinute(t)===this.getMinute(r)&&this.sameHour(t,r)}sameMonthAndYear(t,r){if(t&&r){let e=this.isValid(t),i=this.isValid(r);return e&&i?!(this.getYear(t)-this.getYear(r)||this.getMonth(t)-this.getMonth(r)):e===i}return t===r}deserialize(t){return this._delegate.deserialize(t)}clone(t){return this._delegate.clone(t)}addCalendarYears(t,r){return this._delegate.addCalendarYears(t,r)}addCalendarMonths(t,r){return this._delegate.addCalendarMonths(t,r)}addCalendarDays(t,r){return this._delegate.addCalendarDays(t,r)}getYear(t){return this._delegate.getYear(t)}getMonth(t){return this._delegate.getMonth(t)}getDate(t){return this._delegate.getDate(t)}getDayOfWeek(t){return this._delegate.getDayOfWeek(t)}getMonthNames(t){return this._delegate.getMonthNames(t)}getDateNames(){return this._delegate.getDateNames()}getDayOfWeekNames(t){return this._delegate.getDayOfWeekNames(t)}getYearName(t){return this._delegate.getYearName(t)}getFirstDayOfWeek(){return this._delegate.getFirstDayOfWeek()}getNumDaysInMonth(t){return this._delegate.getNumDaysInMonth(t)}createDate(t,r,e){return this._delegate.createDate(t,r,e)}today(){return this._delegate.today()}parse(t,r){return this._delegate.parse(t,r)}format(t,r){return this._delegate.format(t,r)}toIso8601(t){return this._delegate.toIso8601(t)}isDateInstance(t){return this._delegate.isDateInstance(t)}isValid(t){return this._delegate.isValid(t)}invalid(){return this._delegate.invalid()}clampDate(t,r,e){return r&&this.compareDatetime(t,r)<0?r:e&&this.compareDatetime(t,e)>0?e:t}},Qf=new tt("mat-datetime-formats"),Aie=I6(24,n=>String(n)),Oie=I6(60,n=>String(n));function I6(n,t){let r=Array(n);for(let e=0;e<n;e++)r[e]=t(e);return r}var CE=(()=>{let t=class t extends El{constructor(e,i){super(i),this.setLocale(e)}clone(e){return this.createDatetime(this.getYear(e),this.getMonth(e),this.getDate(e),this.getHour(e),this.getMinute(e))}getHour(e){return e.getHours()}getMinute(e){return e.getMinutes()}isInNextMonth(e,i){let o=this.getDateInNextMonth(e);return this.sameMonthAndYear(o,i)}
31createDatetime(e,i,o,a,s){if(i<0||i>11)throw Error(`Invalid month index "${i}". Month index has to be between 0 and 11.`);if(o<1)throw Error(`Invalid date "${o}". Date has to be greater than 0.`);if(a<0||a>23)throw Error(`Invalid hour "${a}". Hour has to be between 0 and 23.`);if(s<0||s>59)throw Error(`Invalid minute "${s}". Minute has to be between 0 and 59.`);let c=this._createDateWithOverflow(e,i,o,a,s);if(c.getMonth()!==i)throw Error(`Invalid date "${o}" for month with index "${i}".`);return c}getFirstDateOfMonth(e){let i=new Date;return i.setFullYear(e.getFullYear(),e.getMonth(),1),i}getHourNames(){return Aie}getMinuteNames(){return Oie}addCalendarYears(e,i){return this.addCalendarMonths(e,i*12)}addCalendarMonths(e,i){let o=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+i,this.getDate(e),this.getHour(e),this.getMinute(e));return this.getMonth(o)!==((this.getMonth(e)+i)%12+12)%12&&(o=this._createDateWithOverflow(this.getYear(o),this.getMonth(o),0,this.getHour(e),this.getMinute(e))),o}addCalendarDays(e,i){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+i,this.getHour(e),this.getMinute(e))}addCalendarHours(e,i){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e),this.getHour(e)+i,this.getMinute(e))}addCalendarMinutes(e,i){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e),this.getHour(e),this.getMinute(e)+i)}toIso8601(e){return super.toIso8601(e)+"T"+[this._2digit(e.getUTCHours()),this._2digit(e.getUTCMinutes())].join(":")}getDateInNextMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,1,e.getHours(),e.getMinutes())}_stripDirectionalityCharacters(e){return e.replace(/[\u200e\u200f]/g,"")}_2digit(e){return("00"+e).slice(-2)}_createDateWithOverflow(e,i,o,a,s){let c=new Date(e,i,o,a,s);return e>=0&&e<100&&c.setFullYear(this.getYear(c)-1900),c}};t.\u0275fac=function(i){return new(i||t)(X(aT,8),X(To))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),k6={parse:{},display:{dateInput:{year:"numeric",month:"2-digit",day:"2-digit"},monthInput:{month:"long"},datetimeInput:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},timeInput:{hour:"2-digit",minute:"2-digit"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"},popupHeaderDateLabel:{weekday:"short",month:"short",day:"2-digit"}}},pP=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[j2]}),t.\u0275inj=Nt({providers:[{provide:El,useClass:CE}],imports:[j2]});let n=t;return n})(),O_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[pP,G2]}),t.\u0275inj=Nt({providers:[{provide:Qf,useValue:k6}],imports:[pP,G2]});let n=t;return n})(),vtt=Qn("fadeInContent",[Ji("showing",Tt({opacity:1})),$i("void => showing",[Tt({opacity:0}),Vi("150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])]),wE=Qn("slideCalendar",[$i("* => left",[Vi(180,al([Tt({transform:"translateX(100%)",offset:.5}),Tt({transform:"translateX(-100%)",offset:.51}),Tt({transform:"translateX(0)",offset:1})]))]),$i("* => right",[Vi(180,al([Tt({transform:"translateX(-100%)",offset:.5}),Tt({transform:"translateX(100%)",offset:.51}),Tt({transform:"translateX(0)",offset:1})]))])]);function sd(n){return Error(`MatDatetimepickerComponent: No provider found for ${n}. You must import one of the following modules at your application root: MatNativeDatetimeModule, MatMomentDatetimeModule, or provide a custom implementation.`)}var D_=function(n){return n[n.DATE=0]="DATE",n[n.HOUR=1]="HOUR",n[n.MINUTE=2]="MINUTE",n}(D_||{}),M_=class{constructor(t,r,e,i){this.value=t,this.displayValue=r,this.ariaLabel=e,this.enabled=i}},A_=(()=>{let t=class t{constructor(){this.numCols=7,this.allowDisabledSelection=!1,this.activeCell=0,this.selectedValueChange=new J}get _firstRowOffset(){return this.rows&&this.rows.length&&this.rows[0].length?this.numCols-this.rows[0].length:0}_cellClicked(e){!this.allowDisabledSelection&&!e.enabled||this.selectedValueChange.emit(e.value)}_isActiveCell(e,i){let o=e*this.numCols+i;return e&&(o-=this._firstRowOffset),o===this.activeCell}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tbody","matDatetimepickerCalendarBody",""]],hostAttrs:[1,"mat-datetimepicker-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",selectedValue:"selectedValue",labelMinRequiredCells:"labelMinRequiredCells",numC
31ols:"numCols",allowDisabledSelection:"allowDisabledSelection",activeCell:"activeCell"},outputs:{selectedValueChange:"selectedValueChange"},attrs:die,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-datetimepicker-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-datetimepicker-calendar-body-label",4,"ngIf"],["class","mat-datetimepicker-calendar-body-cell","role","button",3,"mat-datetimepicker-calendar-body-active","mat-datetimepicker-calendar-body-disabled","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-datetimepicker-calendar-body-label"],["role","button",1,"mat-datetimepicker-calendar-body-cell",3,"click"],[1,"mat-datetimepicker-calendar-body-cell-content"]],template:function(i,o){i&1&&x(0,pie,3,2,"tr",0)(1,hie,3,2,"tr",1),i&2&&(m("ngIf",o._firstRowOffset<o.labelMinRequiredCells),l(),m("ngForOf",o.rows))},dependencies:[Ke,ce],styles:[`.mat-datetimepicker-calendar-body{font-size:13px;min-width:224px}.mat-datetimepicker-calendar-body-label{padding:7.1428571429% 0 7.1428571429% 7.1428571429%;height:0;line-height:0;color:#0000008a;transform:translate(-6px);text-align:left}.mat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:7.1428571429% 0;text-align:center;outline:none;cursor:pointer}.mat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.mat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;color:#000000de;border:1px solid transparent;border-radius:50px}.mat-datetimepicker-calendar-body-disabled>.mat-datetimepicker-calendar-body-cell-content:not(.mat-datetimepicker-calendar-body-selected){color:#00000061}:not(.mat-datetimepicker-calendar-body-disabled):hover>.mat-datetimepicker-calendar-body-cell-content:not(.mat-datetimepicker-calendar-body-selected),.mat-datetimepicker-calendar-body-active>.mat-datetimepicker-calendar-body-cell-content:not(.mat-datetimepicker-calendar-body-selected){background-color:#0000001f}.mat-datetimepicker-calendar-body-disabled>.mat-datetimepicker-calendar-body-today:not(.mat-datetimepicker-calendar-body-selected){border-color:#0000002e}[dir=rtl] .mat-datetimepicker-calendar-body-label{padding:0 7.1428571429% 0 0;transform:translate(6px);text-align:right}
32`],encapsulation:2,changeDetection:0});let n=t;return n})(),Tl=24,gE=4,bE=(()=>{let t=class t{constructor(e,i){if(this._adapter=e,this._dateFormats=i,this._userSelection=new J,this.type="date",this.selectedChange=new J,!this._adapter)throw sd("DatetimeAdapter");if(!this._dateFormats)throw sd("MAT_DATETIME_FORMATS");this._activeDate=this._adapter.today()}get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate;this._activeDate=e||this._adapter.today(),i&&this._activeDate&&!mP(this._adapter,i,this._activeDate,this.minDate,this.maxDate)&&this._init()}get selected(){return this._selected}set selected(e){this._selected=e,this._selectedYear=this._selected&&this._adapter.getYear(this._selected)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._getValidDateOrNull(this._adapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._getValidDateOrNull(this._adapter.deserialize(e))}ngAfterContentInit(){this._init()}_yearSelected(e){let i=this._adapter.getMonth(this.activeDate),o=this._adapter.createDatetime(e,i,1,0,0);this.selectedChange.emit(this._adapter.createDatetime(e,i,Math.min(this._adapter.getDate(this.activeDate),this._adapter.getNumDaysInMonth(o)),this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate))),this.type==="year"&&this._userSelection.emit()}_getActiveCell(){return k_(this._adapter,this.activeDate,this.minDate,this.maxDate)}_calendarStateDone(){this._calendarState=""}_init(){this._todayYear=this._adapter.getYear(this._adapter.today()),this._yearLabel=this._adapter.getYearName(this.activeDate);let i=this._adapter.getYear(this.activeDate)-k_(this._adapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let o=0,a=[];o<Tl;o++)a.push(i+o),a.length==gE&&(this._years.push(a.map(s=>this._createCellForYear(s))),a=[])}_createCellForYear(e){let i=this._adapter.getYearName(this._adapter.createDate(e,0,1
32));return new M_(e,i,i,this._shouldEnableYear(e))}_shouldEnableYear(e){if(e==null||this.maxDate&&e>this._adapter.getYear(this.maxDate)||this.minDate&&e<this._adapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;let i=this._adapter.createDate(e,0,1);for(let o=i;this._adapter.getYear(o)==e;o=this._adapter.addCalendarDays(o,1))if(this.dateFilter(o))return!0;return!1}_getYearInCurrentRange(e){let i=this._adapter.getYear(e);return this._isInRange(i)?i:null}_isInRange(e){return!0}_getValidDateOrNull(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)?e:null}};t.\u0275fac=function(i){return new(i||t)(h(El,8),h(Qf,8))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-multi-year-view"]],inputs:{type:"type",dateFilter:"dateFilter",activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate"},outputs:{_userSelection:"_userSelection",selectedChange:"selectedChange"},decls:3,vars:6,consts:[[1,"mat-datetimepicker-calendar-table"],[1,"mat-datetimepicker-calendar-table-header"],["allowDisabledSelection","true","matDatetimepickerCalendarBody","","role","grid",3,"selectedValueChange","activeCell","numCols","rows","selectedValue","todayValue"]],template:function(i,o){i&1&&(d(0,"table",0),O(1,"thead",1),d(2,"tbody",2),T("@slideCalendar.done",function(){return o._calendarStateDone()})("selectedValueChange",function(s){return o._yearSelected(s)}),p()()),i&2&&(l(2),m("@slideCalendar",o._calendarState)("activeCell",o._getActiveCell())("numCols",4)("rows",o._years)("selectedValue",o._selectedYear)("todayValue",o._todayYear))},dependencies:[A_],encapsulation:2,data:{animation:[wE]},changeDetection:0});let n=t;return n})();function mP(n,t,r,e,i){let o=n.getYear(t),a=n.getYear(r),s=D6(n,e,i);return Math.floor((o-s)/Tl)===Math.floor((a-s)/Tl)}function k_(n,t,r,e){let i=n.getYear(t);return Pie(i-D6(n,r,e),Tl)}function D6(n,t,r){let e=0;return r?e=n.getYear(r)-Tl+1:t&&(e=n.getYear(t)),e}function Pie(n,t){return(n%t+t)%t}var Uf=50,fE=27.5,wm=41.25,Hf=7.0833,_E=(()=>{let t=class t{constructor(e,i){this._element=e,this._adapter=i,this._userSelection=new J,this.interval=1,this.twelvehour=!1,this.selectedChange=new J,this.activeDateChange=new J,this._hours=[],this._minutes=[],this._hourView=!0,this._timeChanged=!1,this.mouseMoveListener=o=>{this._handleMousemove(o)},this.mouseUpListener=()=>{this._handleMouseup()}}get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate;this._activeDate=this._adapter.clampDate(e,this.minDate,this.maxDate),this._adapter.sameMinute(i,this._activeDate)||this._init()}get selected(){return this._selected}set selected(e){this._selected=this._adapter.getValidDateOrNull(this._adapter.deserialize(e)),this._selected&&(this.activeDate=this._selected)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._adapter.getValidDateOrNull(this._adapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._adapter.getValidDateOrNull(this._adapter.deserialize(e))}set startView(e){this._hourView=e!="minute"}get _hand(){let e=this._adapter.getHour(this.activeDate);this.twelvehour?(e===0&&(e=24),this._selectedHour=e>12?e-12:e):this._selectedHour=e,this._selectedMinute=this._adapter.getMinute(this.activeDate);let i=0,o=wm;return this._hourView?(o=this._selectedHour>0&&this._selectedHour<13?wm:fE,this.twelvehour&&(o=wm),i=Math.round(this._selectedHour*(360/(24/2)))):i=Math.round(this._selectedMinute*(360/60)),{transform:`rotate(${i}deg)`,height:`${o}%`,"margin-top":`${50-o}%`}}ngAfterContentInit(){this.activeDate=this._activeDate||this._adapter.today(),this._init()}_handleMousedown(e){this._timeChanged=!1,this.setTime(e),document.addEventListener("mousemove",this.mouseMoveListener),document.addEventListener("touchmove",this.mouseMoveListener),document.addEventListener("mouseup",this.mouseUpListener),document.addEventListener("touchend",this.mouseUpListener)}_handleMousemove(e){e.preventDefault(),this.setTime(e)}_handleMouseup(){document.removeEventListener("mousemove",this.mouseMoveListener),document.removeEventListener("touchmove",this.mouseMoveListener),document.removeEventListener("mouseup",this.mouseUpListener),document.removeEventListener("touchend",this.mouseUpListener),this._timeChanged&&(this.selectedChange.emit(this.activeDate),this._hourView||this._userSelection.emit())}_init(){this._hours.length=0,this._minutes.length=0;let e=this._adapter.getHourNames(),i=this._adapter.getMinuteNames();if(this.twelvehour)for(let o=1;o<e.length/2+1;o++){let a=o/6*Math.PI,s=wm,c=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),o+1,0),u=(!this.minDate||this._adapter.compareDatetime(c,this.minDate)>=0)&&(!this.maxDate||this._adapter.compareDatetime(c,this.maxDate)<=0);this._hours.push({value:o,displayValue:o===0?"00":e[o],enabled:u,top:Uf-Math.cos(a)*s-Hf,left:Uf+Math.sin(a)*s-Hf})}else for(let o=0;o<e.length;o++){let a=o/6*Math.PI,s=o>0&&o<13,c=s?wm:fE,u=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),o,0),f=(!this.minDate||this._adapter.compareDatetime(u,this.minDate,!1)>=0)&&(!this.maxDate||this._adapter.compareDatetime(u,this.maxDate,!1)<=0)&&(!this.dateFilter||this.dateFilter(u,D_.HOUR));this._hours.push({value:o,displayValue:o===0?"00":e[o],enabled:f,top:Uf-Math.cos(a)*c-Hf,left:Uf+Math.sin(a)*c-Hf,fontSize:o>0&&o<13?"":"80%"})}for(let o=0;o<i.length;o+=5){let a=o/30*Math.PI,s=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),this._adapter.getHour(this.activeDate),o),c=(!this.minDate||this._adapter.compareDatetime(s,this.minDate)>=0)&&(!this.maxDate||this._adapter.compareDatetime(s,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(s,D_.MINUTE));this._minutes.push({value:o,displayValue:o===0?"00":i[o],enabled:c,top:Uf-Math.cos(a)*wm-Hf,left:Uf+Math.sin(a)*wm-Hf})}}setTime(e){let i=this._element.nativeElement,o=i.getBoundingClientRect(),a=i.offsetWidth,s=i.offsetHeight,c=e.pageX!==void 0?e.pageX:e.touches[0].pageX,u=e.pageY!==void 0?e.pageY:e.touches[0].pageY,f=a/2-(c-o.left-window.pageXOffset),_=s/2-(u-o.top-window.pageYOffset),I=Math.atan2(-f,_),S=Math.PI/(this._hourView?6:this.interval?30/this.interval:30),F=Math.sqrt(f*f+_*_),H=this._hourView&&F>(a*(wm/100)+a*(fE/100))/2;I<0&&(I=Math.PI*2+I);let q=Math.round(I/S),ee;if(this._hourView){if(this.twelvehour?q=q===0?12:q:(q===12&&(q=0),q=H?q===0?12:q:q===0?0:q+12),!this._hours.find(Ie=>Ie?.value===q)?.enabled)return;ee=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),q,this._adapter.getMinute(this.activeDate))}else this.interval&&(q*=this.interval),q===60&&(q=0),ee=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),this._adapter.getDate(this.activeDate),this._adapter.getHour(this.activeDate),q);this._timeChanged=!0,this.activeDate=ee,this.activeDateChange.emit(this.activeDate)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(El))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-clock"]],hostAttrs:["role","clock"],hostBindings:function(i,o){i&1&&T("mousedown",function(s){return o._handleMousedown(s)})},inputs:{dateFilter:"dateFilter",interval:"interval",twelvehour:"twelvehour",activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",startView:"startView"},outputs:{_userSelection:"_userSelection",selectedChange:"selectedChange",activeDateChange:"activeDateChange"},decls:7,vars:7,consts:[[1,"mat-datetimepicker-clock"],[1,"mat-datetimepicker-clock-center"],[1,"mat-datetimepicker-clock-hand",3,"ngStyle"],[1,"mat-datetimepicker-clock-hours"],["class","mat-datetimepicker-clock-cell",3,"mat-datetimepicker-clock-cell-disabled","mat-datetimepicker-clock-cell-selected","fontSize","left","top",4,"ngFor","ngForOf"],[1,"mat-datetimepicker-clock-minutes"],["class","mat-datetimepicker-clock-cell",3,"mat-datetimepicker-clock-cell-disabled","mat-datetimepicker-clock-cell-selected","left","top",4,"ngFor","ngForOf"],[1,"mat-datetimepicker-clock-cell"]],template:function(i,o){i&1&&(d(0,"div",0),O(1,"div",1)(2,"div",2),d(3,"div",3),x(4,fie,2,11,"div",4),p(),d(5,"div",5),x(6,gie,2,9,"div",6),p()()),i&2&&(l(2),m("ngStyle",o._hand),l(),Y("active",o._hourView),l(),m("ngForOf",o._hours),l(),Y("active",!o._hourView),l(),m("ngForOf",o._minutes))},dependencies:[Ke,xu],styles:['[_nghost-%COMP%]{position:relative;display:block;min-width:224px;margin:8px;font-size:14px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.mat-datetimepicker-clock[_ngcontent-%COMP%]{position:relative;width:100%;height:0;padding-top:100%;background-color:#e0e0e0;border-radius:50%}.mat-datetimepicker-clock-center[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.mat-datetimepicker-clock-hand[_ngcontent-%COMP%]{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.mat-datetimepicker-clock-hand[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.mat-datetimepicker-clock-hours[_ngcontent-%COMP%], .mat-datetimepicker-clock-minutes[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.mat-datetimepicker-clock-hours.active[_ngcontent-%COMP%], .mat-datetimepicker-clock-minutes.active[_ngcontent-%COMP%]{opacity:1;visibility:visible;transform:scale(1)}.mat-datetimepicker-clock-minutes[_ngcontent-%COMP%]{transform:scale(.8)}.mat-datetimepicker-clock-cell[_ngcontent-%COMP%]{position:absolute;display:flex;width:14.1666%;height:14.1666%;color:#000000de;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.mat-datetimepicker-clock-cell[_ngcontent-%COMP%]:not(.mat-datetimepicker-clock-cell-selected):not(.mat-datetimepicker-clock-cell-disabled):hover{background-color:#0000001a}.mat-datetimepicker-clock-cell.mat-datetimepicker-clock-cell-disabled[_ngcontent-%COMP%]{color:#00000061;pointer-events:none}.mat-datetimepicker-clock-cell.mat-datetimepicker-clock-cell-selected[_ngcontent-%COMP%]{color:#fff}']});let n=t;return n})(),dP=7,vE=(()=>{let t=class t{constructor(e,i){if(this._adapter=e,this._dateFormats=i,this.type="date",this._userSelection=new J,this.selectedChange=new J,!this._adapter)throw sd("DatetimeAdapter");if(!this._dateFormats)throw sd("MAT_DATETIME_FORMATS");let o=this._adapter.getFirstDayOfWeek(),a=this._adapter.getDayOfWeekNames("narrow"),c=this._adapter.getDayOfWeekNames("long").map((u,f)=>({long:u,narrow:a[f]}));this._weekdays=c.slice(o).concat(c.slice(0,o)),this._activeDate=this._adapter.today()}get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate;this._activeDate=e||this._adapter.today(),i&&this._activeDate&&!this._adapter.sameMonthAndYear(i,this._activeDate)&&(this._init(),this._adapter.isInNextMonth(i,this._activeDate)?this.calendarState("right"):this.calendarState("left"))}get selected(){return this._selected}set selected(e){this._selected=e,this._selectedDate=this._getDateInCurrentMonth(this.selected)}ngAfterContentInit(){this._init()}_dateSelected(e){this.selectedChange.emit(this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),e,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate))),this.type==="date"&&this._userSelection.emit()}_calendarStateDone(){this._calendarState=""}
32_init(){this._selectedDate=this._getDateInCurrentMonth(this.selected),this._todayDate=this._getDateInCurrentMonth(this._adapter.today());let e=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate));this._firstWeekOffset=(dP+this._adapter.getDayOfWeek(e)-this._adapter.getFirstDayOfWeek())%dP,this._createWeekCells()}_createWeekCells(){let e=this._adapter.getNumDaysInMonth(this.activeDate),i=this._adapter.getDateNames();this._weeks=[[]];for(let o=0,a=this._firstWeekOffset;o<e;o++,a++){a==dP&&(this._weeks.push([]),a=0);let s=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),this._adapter.getMonth(this.activeDate),o+1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate)),c=!this.dateFilter||this.dateFilter(s),u=this._adapter.format(s,this._dateFormats.display.dateA11yLabel);this._weeks[this._weeks.length-1].push(new M_(o+1,i[o],u,c))}}_getDateInCurrentMonth(e){return this._adapter.sameMonthAndYear(e,this.activeDate)?this._adapter.getDate(e):null}calendarState(e){this._calendarState=e}};t.\u0275fac=function(i){return new(i||t)(h(El,8),h(Qf,8))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-month-view"]],inputs:{type:"type",dateFilter:"dateFilter",activeDate:"activeDate",selected:"selected"},outputs:{_userSelection:"_userSelection",selectedChange:"selectedChange"},decls:5,vars:6,consts:[[1,"mat-datetimepicker-calendar-table"],[1,"mat-datetimepicker-calendar-table-header"],[4,"ngFor","ngForOf"],["matDatetimepickerCalendarBody","","role","grid",3,"selectedValueChange","activeCell","rows","selectedValue","todayValue"]],template:function(i,o){i&1&&(d(0,"table",0)(1,"thead",1)(2,"tr"),x(3,bie,2,2,"th",2),p()(),d(4,"tbody",3),T("@slideCalendar.done",function(){return o._calendarStateDone()})("selectedValueChange",function(s){return o._dateSelected(s)}),p()()),i&2&&(l(3),m("ngForOf",o._weekdays),l(),m("@slideCalendar",o._calendarState)("activeCell",o._adapter.getDate(o.activeDate)-1)("rows",o._weeks)("selectedValue",o._selectedDate)("todayValue",o._todayDate))},dependencies:[Ke,A_],encapsulation:2,data:{animation:[wE]},changeDetection:0});let n=t;return n})(),yE=(()=>{let t=class t{constructor(e,i){if(this._adapter=e,this._dateFormats=i,this._userSelection=new J,this.type="date",this.selectedChange=new J,!this._adapter)throw sd("DatetimeAdapter");if(!this._dateFormats)throw sd("MAT_DATETIME_FORMATS");this._activeDate=this._adapter.today()}get activeDate(){return this._activeDate}set activeDate(e){let i=this._activeDate;this._activeDate=e||this._adapter.today(),i&&this._activeDate&&!this._adapter.sameYear(i,this._activeDate)&&this._init()}get selected(){return this._selected}set selected(e){this._selected=e,this._selectedMonth=this._getMonthInCurrentYear(this.selected)}ngAfterContentInit(){this._init()}_monthSelected(e){let i=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),e,1,0,0);this.selectedChange.emit(this._adapter.createDatetime(this._adapter.getYear(this.activeDate),e,Math.min(this._adapter.getDate(this.activeDate),this._adapter.getNumDaysInMonth(i)),this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate))),this.type==="month"&&this._userSelection.emit()}_calendarStateDone(){this._calendarState=""}_init(){this._selectedMonth=this._getMonthInCurrentYear(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._adapter.today()),this._yearLabel=this._adapter.getYearName(this.activeDate);let e=this._adapter.getMonthNames("short");this._months=[[0,1,2,3,4],[5,6,7,8,9,10,11]].map(i=>i.map(o=>this._createCellForMonth(o,e[o])))}_getMonthInCurrentYear(e){return this._adapter.sameYear(e,this.activeDate)?this._adapter.getMonth(e):null}_createCellForMonth(e,i){let o=this._adapter.format(this._adapter.createDatetime(this._adapter.getYear(this.activeDate),e,1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate)),this._dateFormats.display.monthYearA11yLabel);return new M_(e,i.toLocaleUpperCase(),o,this._isMonthEnabled(e))}_isMonthEnabled(e){if(!this.dateFilter)return!0;let i=this._adapter.createDatetime(this._adapter.getYear(this.activeDate),e,1,this._adapter.getHour(this.activeDate),this._adapter.getMinute(this.activeDate));for(let o=i;this._adapter.getMonth(o)==e;
32o=this._adapter.addCalendarDays(o,1))if(this.dateFilter(o))return!0;return!1}};t.\u0275fac=function(i){return new(i||t)(h(El,8),h(Qf,8))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-year-view"]],inputs:{type:"type",dateFilter:"dateFilter",activeDate:"activeDate",selected:"selected"},outputs:{_userSelection:"_userSelection",selectedChange:"selectedChange"},decls:3,vars:7,consts:[[1,"mat-datetimepicker-calendar-table"],[1,"mat-datetimepicker-calendar-table-header"],["allowDisabledSelection","true","matDatetimepickerCalendarBody","","role","grid",3,"selectedValueChange","activeCell","labelMinRequiredCells","label","rows","selectedValue","todayValue"]],template:function(i,o){i&1&&(d(0,"table",0),O(1,"thead",1),d(2,"tbody",2),T("@slideCalendar.done",function(){return o._calendarStateDone()})("selectedValueChange",function(s){return o._monthSelected(s)}),p()()),i&2&&(l(2),m("@slideCalendar",o._calendarState)("activeCell",o._adapter.getMonth(o.activeDate))("labelMinRequiredCells",2)("label",o._yearLabel)("rows",o._months)("selectedValue",o._selectedMonth)("todayValue",o._todayMonth))},dependencies:[A_],encapsulation:2,data:{animation:[wE]},changeDetection:0});let n=t;return n})(),Cw=(()=>{let t=class t{constructor(e,i,o,a,s,c){if(this._elementRef=e,this._intl=i,this._ngZone=o,this._adapter=a,this._dateFormats=s,this._userSelection=new J,this.multiYearSelector=!1,this.startView="month",this.twelvehour=!1,this.timeInterval=1,this.ariaLabel="Use arrow keys to navigate",this.ariaNextMonthLabel="Next month",this.ariaPrevMonthLabel="Previous month",this.ariaNextYearLabel="Next year",this.ariaPrevYearLabel="Previous year",this.ariaNextMultiYearLabel="Next year range",this.ariaPrevMultiYearLabel="Previous year range",this.preventSameDateTimeSelection=!1,this.selectedChange=new J,this.viewChanged=new J,this._clockView="hour",this._type="date",this._dateFilterForViews=u=>!!u&&(!this.dateFilter||this.dateFilter(u,D_.DATE))&&(!this.minDate||this._adapter.compareDate(u,this.minDate)>=0)&&(!this.maxDate||this._adapter.compareDate(u,this.maxDate)<=0),!this._adapter)throw sd("DatetimeAdapter");if(!this._dateFormats)throw sd("MAT_DATETIME_FORMATS");this._intlChanges=i.changes.subscribe(()=>c.markForCheck())}get type(){return this._type}set type(e){this._type=e||"date",this.type==="year"&&(this.multiYearSelector=!0)}get startAt(){return this._startAt}set startAt(e){this._startAt=this._adapter.getValidDateOrNull(e)}get selected(){return this._selected}set selected(e){this._selected=this._adapter.getValidDateOrNull(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._adapter.getValidDateOrNull(e)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._adapter.getValidDateOrNull(e)}get _activeDate(){return this._clampedActiveDate}set _activeDate(e){let i=this._clampedActiveDate;this._clampedActiveDate=this._adapter.clampDate(e,this.minDate,this.maxDate),i&&this._clampedActiveDate&&this.currentView==="month"&&!this._adapter.sameMonthAndYear(i,this._clampedActiveDate)&&(this._adapter.isInNextMonth(i,this._clampedActiveDate)?this.calendarState("right"):this.calendarState("left"))}get currentView(){return this._currentView}set currentView(e){this._currentView=e,this.viewChanged.emit(e)}get _yearLabel(){return this._adapter.getYearName(this._activeDate)}get _monthYearLabel(){if(this.currentView==="multi-year"){let i=this._adapter.getYear(this._activeDate)-k_(this._adapter,this._activeDate,this.minDate,this.maxDate),o=i+Tl-1,a=this._adapter.getYearName(this._adapter.createDate(i,0,1)),s=this._adapter.getYearName(this._adapter.createDate(o,0,1));return this._intl.formatYearRange(a,s)}return this.currentView==="month"?this._adapter.getMonthNames("long")[this._adapter.getMonth(this._activeDate)]:this._adapter.getYearName(this._activeDate)}get _dateLabel(){switch(this.type){case"month":return this._adapter.getMonthNames("long")[this._adapter.getMonth(this._activeDate)];default:return this._adapter.format(this._activeDate,this._dateFormats.display.popupHeaderDateLabel)}}get _hoursLabel(){let e=this._adapter.getHour(this._activeDate);return this.twelvehour&&(e===0&&(e=24),e=e>12?e-12:e),this._2digit(e)}get _minutesLabel(){return this._2digit(this._adapter.getMinute(this._activeDate))}get _ariaLabelNext(){switch(this._currentView){case"month":return this.ariaNextMonthLabel;case"year":return this.ariaNextYearLabel;case"multi-year":return this.ariaNextMultiYearLabel;default:return""}}get _ariaLabelPrev(){switch(this._currentView){case"month":return this.ariaPrevMonthLabel;case"year":return this.ariaPrevYearLabel;case"multi-year":return this.ariaPrevMultiYearLabel;default:return""}}_userSelected(){this._userSelection.emit()}ngAfterContentInit(){this._activeDate=this.startAt||this._adapter.today(),this._selectAMPM(this._activeDate),this._focusActiveCell(),this.type==="year"?this.currentView="multi-year":this.t
32ype==="month"?this.currentView="year":this.type==="time"?this.currentView="clock":this.currentView=this.startView||"month"}ngOnDestroy(){this._intlChanges.unsubscribe()}_dateSelected(e){this.type==="date"?(!this._adapter.sameDate(e,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(e):(this._activeDate=e,this.currentView="clock")}_monthSelected(e){this.type==="month"?(!this._adapter.sameMonthAndYear(e,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(this._adapter.getFirstDateOfMonth(e)):(this._activeDate=e,this.currentView="month",this._clockView="hour")}_yearSelected(e){if(this.type==="year"){if(!this._adapter.sameYear(e,this.selected)||!this.preventSameDateTimeSelection){let i=this._adapter.createDatetime(this._adapter.getYear(e),0,1,0,0);this.selectedChange.emit(i)}}else this._activeDate=e,this.currentView="year"}_timeSelected(e){this._clockView!=="minute"?(this._activeDate=this._updateDate(e),this._clockView="minute"):(!this._adapter.sameDatetime(e,this.selected)||!this.preventSameDateTimeSelection)&&this.selectedChange.emit(e)}_onActiveDateChange(e){this._activeDate=e}_updateDate(e){if(this.twelvehour){if(this._adapter.getHour(e)===12){if(this._AMPM==="AM")return this._adapter.addCalendarHours(e,-12)}else if(this._AMPM==="PM")return this._adapter.addCalendarHours(e,12)}return e}_selectAMPM(e){this._adapter.getHour(e)>11?this._AMPM="PM":this._AMPM="AM"}_ampmClicked(e){e!==this._AMPM&&(this._AMPM=e,this._AMPM==="AM"?this._activeDate=this._adapter.addCalendarHours(this._activeDate,-12):this._activeDate=this._adapter.addCalendarHours(this._activeDate,12))}_yearClicked(){if(this.type==="year"||this.multiYearSelector){this.currentView="multi-year";return}this.currentView="year"}_dateClicked(){this.type!=="month"&&(this.currentView="month")}_hoursClicked(){this.currentView="clock",this._clockView="hour"}_minutesClicked(){this.currentView="clock",this._clockView="minute"}_previousClicked(){this._activeDate=this.currentView==="month"?this._adapter.addCalendarMonths(this._activeDate,-1):this._adapter.addCalendarYears(this._activeDate,this.currentView==="year"?-1:-Tl)}_nextClicked(){this._activeDate=this.currentView==="month"?this._adapter.addCalendarMonths(this._activeDate,1):this._adapter.addCalendarYears(this._activeDate,this.currentView==="year"?1:Tl)}_previousEnabled(){return this.minDate?!this.minDate||!this._isSameView(this._activeDate,this.minDate):!0}_nextEnabled(){return!this.maxDate||!this._isSameView(this._activeDate,this.maxDate)}_handleCalendarBodyKeydown(e){this.currentView==="month"?this._handleCalendarBodyKeydownInMonthView(e):this.currentView==="year"?this._handleCalendarBodyKeydownInYearView(e):this.currentView==="multi-year"?this._handleCalendarBodyKeydownInMultiYearView(e):this._handleCalendarBodyKeydownInClockView(e)}_focusActiveCell(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.asObservable().pipe(jd()).subscribe(()=>{this._elementRef.nativeElement.focus()})})}_calendarStateDone(){this._calendarState=""}_isSameView(e,i){return this.currentView==="month"?this._adapter.getYear(e)===this._adapter.getYear(i)&&this._adapter.getMonth(e)===this._adapter.getMonth(i):this.currentView==="year"?this._adapter.getYear(e)===this._adapter.getYear(i):mP(this._adapter,e,i,this.minDate,this.maxDate)}_handleCalendarBodyKeydownInMonthView(e){switch(e.keyCode){case 37:this._activeDate=this._adapter.addCalendarDays(this._activeDate,-1);break;case 39:this._activeDate=this._adapter.addCalendarDays(this._activeDate,1);break;case 38:this._activeDate=this._adapter.addCalendarDays(this._activeDate,-7);break;case 40:this._activeDate=this._adapter.addCalendarDays(this._activeDate,7);break;case 36:this._activeDate=this._adapter.addCalendarDays(this._activeDate,1-this._adapter.getDate(this._activeDate));break;case 35:this._activeDate=this._adapter.addCalendarDays(this._activeDate,this._adapter.getNumDaysInMonth(this._activeDate)-this._adapter.getDate(this._activeDate));break;case 33:this._activeDate=e.altKey?this._adapter.addCalendarYears(this._activeDate,-1):this._adapter.addCalendarMonths(this._activeDate,-1);break;case 34:this._activeDate=e.altKey?this._adapter.addCalendarYears(this._activeDate,1):this._adapter.addCalendarMonths(this._activeDate,1);break;case 13:this._dateFilterForViews(this._activeDate)&&(this._dateSelected(this._activeDate),e.preventDefault());return;default:return}e.preventDefault()}_handleCalendarBodyKeydownInYearView(e){switch(e.keyCode){case 37:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,-1);break;case 39:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,1);break;case 38:this._activeDate=this._prevMonthInSameCol(this._activeDate);break;case 40:this._activeDate=this._nextMonthInSameCol(this._activeDate);break;case 36:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,-this._adapter.getMonth(this._activeDate));break;case 35:this._activeDate=this._adapter.addCalendarMonths(this._activeDate,11-this._adapter.getMonth(this._activeDate));break;case 33:this._activeDate=this._adapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case 34:this._activeDate=this._adapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case 13:this._monthSelected(this._activeDate);break;default:return}e.preventDefault()}_handleCalendarBodyKeydownInMultiYearView(e){switch(e.keyCode){case 37:this._activeDate=this._adapter.addCalendarYears(this._activeDate,-1);break;case 39:this._activeDate=this._adapter.addCalendarYears(this._activeDate,1);break;case 38:this._activeDate=this._adapter.addCalendarYears(this._activeDate,-gE);break;case 40:this._activeDate=this._adapter.addCalendarYears(this._activeDate,gE);break;case 36:this._activeDate=this._adapter.addCalendarYears(this._activeDate,-k_(this._adapter,this._activeDate,this.minDate,this.maxDate));break;case 35:this._activeDate=this._adapter.addCalendarYears(this._activeDate,Tl-k_(this._adapter,this._activeDate,this.minDate,this.maxDate)-1);break;case 33:this._activeDate=this._adapter.addCalendarYears(this._activeDate,e.altKey?-Tl*10:-Tl);break;case 34:this._activeDate=this._adapter.addCalendarYears(this._activeDate,e.altKey?Tl*10:Tl);break;case 13:this._yearSelected(this._activeDate);break;default:return}}_handleCalendarBodyKeydownInClockView(e){switch(e.keyCode){case 38:this._activeDate=this._clockView==="hour"?this._adapter.addCalendarHours(this._activeDate,1):this._adapter.addCalendarMinutes(this._activeDate,1);break;case 40:this._activeDate=this._clockView==="hour"?this._adapter.addCalendarHours(this._activeDate,-1):this._adapter.addCalendarMinutes(this._activeDate,-1);break;case 13:this._timeSelected(this._activeDate);return;default:return}e.preventDefault()}_prevMonthInSameCol(e){let i=this._adapter.getMonth(e)<=4?-5:this._adapter.getMonth(e)>=7?-7:-12;return this._adapter.addCalendarMonths(e,i)}_nextMonthInSameCol(e){let i=this._adapter.getMonth(e)<=4?7:this._adapter.getMonth(e)>=7?5:12;return this._adapter.addCalendarMonths(e,i)}calendarState(e){this._calendarState=e}_2digit(e){return("00"+e).slice(-2)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(bm),h(Bt),h(El,8),h(Qf,8),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-calendar"]],hostAttrs:["role","dialog","tabindex","0"],hostVars:3,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._handleCalendarBodyKeydown(s)}),i&2&&(Je("aria-label",o.ariaLabel),Y("mat-datetimepicker-calendar",!0))},inputs:{multiYearSelector:"multiYearSelector",startView:"startView",twelvehour:"twelvehour",timeInterval:"timeInterval",dateFilter:"dateFilter",ariaLabel:"ariaLabel",ariaNextMonthLabel:"ariaNextMonthLabel",ariaPrevMonthLabel:"ariaPrevMonthLabel",ariaNextYearLabel:"ariaNextYearLabel",ariaPrevYearLabel:"ariaPrevYearLabel",ariaNextMultiYearLabel:"ariaNextMultiYearLabel",ariaPrevMultiYearLabel:"ariaPrevMultiYearLabel",preventSameDateTimeSelection:"preventSameDateTimeSelection",type:"type",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate"},outputs:{_userSelection:"_userSelection",selectedChange:"selectedChange",viewChanged:"viewChanged"},decls:11,vars:8,consts:[[1,"mat-datetimepicker-calendar-header"],["class","mat-datetimepicker-calendar-header-year","role","button",3,"active","click",4,"ngIf"],[1,"mat-datetimepicker-calendar-header-date-time"],["class","mat-datetimepicker-calendar-header-date","role","button",3,"active","not-clickable","click",4,"ngIf"],["class","mat-datetimepicker-calendar-header-time",3,"active",4,"ngIf"],[1,"mat-datetimepicker-calendar-content",3,"ngSwitch"],["class","mat-month-content",4,"ngIf"],[3,"activeDate","dateFilter","selected","type","_userSelection","selectedChange",4,"ngSwitchCase"],[3,"activeDate","dateFilter","maxDate","minDate","selected","type","_userSelection","selectedChange",4,"ngSwitchCase"],[3,"dateFilter","interval","maxDate","minDate","selected","startView","twelvehour","_userSelection","activeDateChange","selectedChange",4,"ngSwitchDefault"],["role","button",1,"mat-datetimepicker-calendar-header-year",3,"click"],[4,"ngIf"],["role","button",1,"mat-datetimepicker-calendar-header-date",3,"click"],[1,"mat-datetimepicker-calendar-header-time"],["role","button",1,"mat-datetimepicker-calendar-header-hours",3,"click"],["role","button",1,"mat-datetimepicker-calendar-header-minutes",3,"click"],["class","mat-datetimepicker-calendar-header-ampm-container",4,"ngIf"],[1,"mat-datetimepicker-calendar-header-ampm-container"],[1,"mat-datetimepicker-calendar-header-ampm",3,"click"],[1,"mat-month-content"],[1,"mat-datetimepicker-calendar-control
32s"],["role","button",1,"mat-datetimepicker-calendar-previous-button",3,"click"],["height","24","viewBox","0 0 24 24","width","24"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],[1,"mat-datetimepicker-calendar-period-button"],["role","button",1,"mat-datetimepicker-calendar-next-button",3,"click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],[3,"_userSelection","selectedChange","activeDate","dateFilter","selected","type"],[3,"_userSelection","selectedChange","activeDate","dateFilter","maxDate","minDate","selected","type"],[3,"_userSelection","activeDateChange","selectedChange","dateFilter","interval","maxDate","minDate","selected","startView","twelvehour"]],template:function(i,o){i&1&&(d(0,"div",0),x(1,vie,3,4,"div",1),d(2,"div",2),x(3,yie,2,5,"span",3)(4,wie,8,9,"span",4),p()(),d(5,"div",5),x(6,xie,11,10,"div",6)(7,Sie,1,4,"mat-datetimepicker-month-view",7)(8,Tie,1,4,"mat-datetimepicker-year-view",7)(9,Eie,1,6,"mat-datetimepicker-multi-year-view",8)(10,Iie,1,7,"mat-datetimepicker-clock",9),p()),i&2&&(l(),m("ngIf",o.type!=="time"),l(2),m("ngIf",o.type!=="time"&&o.type!=="year"),l(),m("ngIf",o.type.endsWith("time")),l(),m("ngSwitch",o.currentView),l(),m("ngIf",o.currentView==="month"||o.currentView==="year"||o.currentView==="multi-year"),l(),m("ngSwitchCase","month"),l(),m("ngSwitchCase","year"),l(),m("ngSwitchCase","multi-year"))},dependencies:[ce,lf,cf,p2,Se,_E,vE,yE,bE],styles:[`.mat-datetimepicker-calendar{-webkit-user-select:none;user-select:none;display:block;outline:none}.mat-datetimepicker-calendar[mode=landscape]{display:flex}.mat-datetimepicker-calendar-header{padding:16px;font-size:14px;box-sizing:border-box}[mode=landscape] .mat-datetimepicker-calendar-header{width:150px;min-width:150px}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-year,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-date-time{width:100%;font-weight:500;white-space:nowrap}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-year{font-size:16px}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-year mat-icon{transform:translateY(5px)}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-date-time{font-size:30px;line-height:34px}[mode=landscape] .mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-date-time{white-space:normal;word-wrap:break-word}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-ampm-container{font-size:.77em}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-year:not(.active),.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-date:not(.active),.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-hours:not(.active),.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-minutes:not(.active),.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-ampm:not(.active){cursor:pointer;opacity:.6}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-year.not-clickable,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-date.not-clickable,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-hours.not-clickable,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-minutes.not-clickable,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-time{padding-left:8px}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-time:not(.active) .mat-datetimepicker-calendar-header-hours,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-time:not(.active) .mat-datetimepicker-calendar-header-minutes,.mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-time:not(.active) .mat-datetimepicker-calendar-header-ampm{cursor:pointer;opacity:1}[mode=landscape] .mat-datetimepicker-calendar-header .mat-datetimepicker-calendar-header-time{display:block;padding-left:0}.mat-datetimepicker-calendar-content{width:100%;padding:0 8px 8px;outline:none;box-sizing:border-box;overflow:hidden}[mode=landscape] .mat-datetimepicker-calendar-content{padding-top:8px}
32.mat-datetimepicker-calendar-controls{display:flex;justify-content:space-between}.mat-datetimepicker-calendar-period-button{display:inline-block;height:48px;padding:12px;outline:none;border:0;background:transparent;box-sizing:border-box}.mat-datetimepicker-calendar-previous-button,.mat-datetimepicker-calendar-next-button{display:inline-block;width:48px;height:48px;padding:12px;outline:none;border:0;cursor:pointer;background:transparent;box-sizing:border-box}.mat-datetimepicker-calendar-previous-button.disabled,.mat-datetimepicker-calendar-next-button.disabled{color:#00000061;pointer-events:none}.mat-datetimepicker-calendar-previous-button svg,.mat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}.mat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-datetimepicker-calendar-table-header{color:#00000061}.mat-datetimepicker-calendar-table-header th{text-align:center;font-size:11px;padding:0 0 8px}@media (min-width: 480px){.mat-datetimepicker-calendar[mode=auto]{display:flex}.mat-datetimepicker-calendar[mode=auto] .mat-datetimepicker-calendar-header{width:150px;min-width:150px}.mat-datetimepicker-calendar[mode=auto] .mat-datetimepicker-calendar-header-date-time{white-space:normal;word-wrap:break-word}.mat-datetimepicker-calendar[mode=auto] .mat-datetimepicker-calendar-header-time{display:block;padding-left:0}.mat-datetimepicker-calendar[mode=auto] .mat-datetimepicker-calendar-content{padding-top:8px}}
33`],encapsulation:2,data:{animation:[wE]},changeDetection:0});let n=t;return n})(),Rie=0,ww=(()=>{let t=class t{ngAfterContentInit(){this._calendar._focusActiveCell()}onSelectionChange(e){this.datetimepicker._select(e),this.datetimepicker.close()}_handleKeydown(e){e.keyCode===27&&(this.datetimepicker.close(),e.preventDefault(),e.stopPropagation())}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-content"]],viewQuery:function(i,o){if(i&1&&ae(Cw,7),i&2){let a;Q(a=K())&&(o._calendar=a.first)}},hostAttrs:[1,"mat-datetimepicker-content"],hostVars:2,hostBindings:function(i,o){i&1&&T("keydown",function(s){return o._handleKeydown(s)}),i&2&&Y("mat-datetimepicker-content-touch",o.datetimepicker==null?null:o.datetimepicker.touchUi)},decls:1,vars:17,consts:[["cdkTrapFocus","",1,"mat-typography",3,"_userSelection","selectedChange","viewChanged","ariaNextMonthLabel","ariaNextYearLabel","ariaPrevMonthLabel","ariaPrevYearLabel","preventSameDateTimeSelection","dateFilter","id","maxDate","minDate","multiYearSelector","selected","startAt","startView","timeInterval","twelvehour","type"]],template:function(i,o){i&1&&(d(0,"mat-datetimepicker-calendar",0),T("_userSelection",function(){return o.datetimepicker.close()})("selectedChange",function(s){return o.onSelectionChange(s)})("viewChanged",function(s){return o.datetimepicker._viewChanged(s)}),p()),i&2&&(m("ariaNextMonthLabel",o.datetimepicker.ariaNextMonthLabel)("ariaNextYearLabel",o.datetimepicker.ariaNextYearLabel)("ariaPrevMonthLabel",o.datetimepicker.ariaPrevMonthLabel)("ariaPrevYearLabel",o.datetimepicker.ariaPrevYearLabel)("preventSameDateTimeSelection",o.datetimepicker.preventSameDateTimeSelection)("dateFilter",o.datetimepicker._dateFilter)("id",o.datetimepicker.id)("maxDate",o.datetimepicker._maxDate)("minDate",o.datetimepicker._minDate)("multiYearSelector",o.datetimepicker.multiYearSelector)("selected",o.datetimepicker._selected)("startAt",o.datetimepicker.startAt)("startView",o.datetimepicker.startView)("timeInterval",o.datetimepicker.timeInterval)("twelvehour",o.datetimepicker.twelvehour)("type",o.datetimepicker.type),Je("mode",o.datetimepicker.mode))},dependencies:[iT,Cw],styles:[`.mat-datetimepicker-content{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;display:block;background-color:#fff;border-radius:2px;overflow:hidden}.mat-datetimepicker-calendar{width:296px;height:405px}.mat-datetimepicker-calendar[mode=landscape]{width:446px;height:328px}@media (min-width: 480px){.mat-datetimepicker-calendar[mode=auto]{width:446px;height:328px}}.mat-datetimepicker-content-touch{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;display:block;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}
33.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.48}.cdk-overlay-dark-backdrop{background:#0009}.mat-datetimepicker-dialog .mat-dialog-container{padding:0}
34`],encapsulation:2,changeDetection:0});let n=t;return n})(),Wf=(()=>{let t=class t{constructor(e,i,o,a,s,c,u,f){if(this._dialog=e,this._overlay=i,this._ngZone=o,this._viewContainerRef=a,this._scrollStrategy=s,this._dateAdapter=c,this._dir=u,this._document=f,this.multiYearSelector=!1,this.twelvehour=!1,this.startView="month",this.mode="auto",this.timeInterval=1,this.ariaNextMonthLabel="Next month",this.ariaPrevMonthLabel="Previous month",this.ariaNextYearLabel="Next year",this.ariaPrevYearLabel="Previous year",this.preventSameDateTimeSelection=!1,this.selectedChanged=new J,this.openedStream=new J,this.closedStream=new J,this.viewChanged=new J,this.opened=!1,this.id=`mat-datetimepicker-${Rie++}`,this._disabledChange=new Te,this._validSelected=null,this._focusedElementBeforeOpen=null,this._inputSubscription=ln.EMPTY,this._type="date",this._touchUi=!1,!this._dateAdapter)throw sd("DateAdapter")}get startAt(){return this._startAt||(this._datepickerInput?this._datepickerInput.value:null)}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(e)}get openOnFocus(){return this._openOnFocus}set openOnFocus(e){this._openOnFocus=mt(e)}get type(){return this._type}set type(e){this._type=e||"date"}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=mt(e)}get disabled(){return this._disabled===void 0&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled}set disabled(e){let i=mt(e);i!==this._disabled&&(this._disabled=i,this._disabledChange.next(i))}get _selected(){return this._validSelected}set _selected(e){this._validSelected=e}get _minDate(){return this._datepickerInput&&this._datepickerInput.min}get _maxDate(){return this._datepickerInput&&this._datepickerInput.max}get _dateFilter(){return this._datepickerInput&&this._datepickerInput._dateFilter}_handleFocus(){!this.opened&&this.openOnFocus&&this.open()}_viewChanged(e){this.viewChanged.emit(e)}ngOnDestroy(){this.close(),this._inputSubscription.unsubscribe(),this._disabledChange.complete(),this._popupRef&&this._popupRef.dispose()}_select(e){let i=this._selected;this._selected=e,this._dateAdapter.sameDatetime(i,this._selected)||this.selectedChanged.emit(e)}_registerInput(e){if(this._datepickerInput)throw Error("A MatDatepicker can only be associated with a single input.");this._datepickerInput=e,this._inputSubscription=this._datepickerInput._valueChange.subscribe(i=>this._selected=i)}open(){if(!(this.opened||this.disabled)){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this.opened=!0,this.openedStream.emit()}}close(){if(!this.opened)return;this._popupRef&&this._popupRef.hasAttached()&&this._popupRef.detach(),this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null),this._calendarPortal&&this._calendarPortal.isAttached&&this._calendarPortal.detach();let e=()=>{this.opened&&(this.opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&typeof this._focusedElementBeforeOpen.focus=="function"?(this._focusedElementBeforeOpen.focus(),setTimeout(e)):e()}_openAsDialog(){this._dialogRef=this._dialog.open(ww,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datetimepicker-dialog"}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._dialogRef.componentInstance.datetimepicker=this}_openAsPopup(){if(this._calendarPortal||(this._calendarPortal=new $a(ww,this._viewContainerRef)),this._popupRef||this._createPopup(),!this._popupRef.hasAttached()){let e=this._popupRef.attach(this._calendarPortal);e.instance.datetimepicker=this,this._ngZone.onStable.asObservable().pipe(jd()).subscribe(()=>{this._popupRef.updatePosition()})}this._popupRef.backdropClick().subscribe(()=>this.close())}_createPopup(){let e=new Ha({positionStrategy:this._createPopupPositionStrategy(),hasBackdrop:!0,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir?this._dir.value:"ltr",scrollStrategy:this._scrollStrategy(),panelClass:"mat-datetimepicker-popup"});this._popupRef=this._overlay.create(e)}_createPopupPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datetimepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition().withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])}};t.\u0275fac=function(i){return new(i||t)(h(Lr),h(Vr),h(Bt),h(ci),h(WC),h(El,8),h(mr,8),h(Qi,8))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker"]],inputs:{multiYearSelector:"multiYearSelector",twelvehour:"twelvehour",startView:"startView",mode:"mode",timeInterval:"timeInterval",ariaNextMonthLabel:"ariaNextMonthLabel",ariaPrevMonthLabel:"ariaPrevMonthLabel",ariaNextYearLabel:"ariaNextYearLabel",ariaPrevYearLabel:"ariaPrevYearLabel",preventSameDateTimeSelection:"preventSameDateTimeSelection",panelClass:"panelClass",startAt:"startAt",openOnFocus:"openOnFocus",type:"type",touchUi:"touchUi",disabled:"disabled"},outputs:{selectedChanged:"selectedChanged",openedStream:"opened",closedStream:"closed",viewChanged:"viewChanged"},exportAs:["matDatetimepicker"],decls:0,vars:0,template:function(i,o){},encapsulation:2,changeDetection:0});let n=t;return n})(),M6={provide:ye,useExisting:he(()=>xm),multi:!0},A6={provide:zn,useExisting:he(()=>xm),multi:!0},qf=class{constructor(t,r){this.target=t,this.targetElement=r,this.value=this.target.value}},xm=(()=>{let t=class t{constructor(e,i,o,a){if(this._elementRef=e,this._dateAdapter=i,this._dateFormats=o,this._formField=a,this.dateChange=new J,this.dateInput=new J,this._valueChange=new J,this._disabledChange=new J,this._datepickerSubscription=ln.EMPTY,this._localeSubscription=ln.EMPTY,this._lastValueValid=!1,this._onTouched=()=>{},this._cvaOnChange=()=>{}
34,this._validatorOnChange=()=>{},this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._minValidator=s=>{let c=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s.value));return!this.min||!c||this._dateAdapter.compareDatetime(this.min,c)<=0?null:{matDatepickerMin:{min:this.min,actual:c}}},this._maxValidator=s=>{let c=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s.value));return!this.max||!c||this._dateAdapter.compareDatetime(this.max,c)>=0?null:{matDatepickerMax:{max:this.max,actual:c}}},this._filterValidator=s=>{let c=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(s.value));return!this._dateFilter||!c||this._dateFilter(c,D_.DATE)?null:{matDatepickerFilter:!0}},this._validator=ke.compose([this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]),!this._dateAdapter)throw sd("DatetimeAdapter");if(!this._dateFormats)throw sd("MAT_DATETIME_FORMATS");this._localeSubscription=i.localeChanges.subscribe(()=>{this.value=this.value})}set matDatetimepicker(e){this.registerDatepicker(e)}set matDatepickerFilter(e){this._dateFilter=e,this._validatorOnChange()}get value(){return this._value}set value(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=!e||this._dateAdapter.isValid(e),e=this._dateAdapter.getValidDateOrNull(e);let i=this.value;this._value=e,this._formatValue(e),setTimeout(()=>{this._dateAdapter.sameDatetime(i,e)||this._valueChange.emit(e)})}get min(){return this._min}set min(e){this._min=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._validatorOnChange()}get max(){return this._max}set max(e){this._max=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._validatorOnChange()}get disabled(){return!!this._disabled}set disabled(e){let i=mt(e);this._disabled!==i&&(this._disabled=i,this._disabledChange.emit(i))}ngAfterContentInit(){this._datepicker&&(this._datepickerSubscription=this._datepicker.selectedChanged.subscribe(e=>{this.value=e,this._cvaOnChange(e),this._onTouched(),this.dateInput.emit(new qf(this,this._elementRef.nativeElement)),this.dateChange.emit(new qf(this,this._elementRef.nativeElement))}))}ngOnDestroy(){this._datepickerSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._disabledChange.complete()}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}writeValue(e){this.value=e}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onKeydown(e){e.altKey&&e.keyCode===40&&(this._datepicker.open(),e.preventDefault())}_onInput(e){let i=this._dateAdapter.parse(e,this.getParseFormat());this._lastValueValid=!i||this._dateAdapter.isValid(i),i=this._dateAdapter.getValidDateOrNull(i),this._value=i,this._cvaOnChange(i),this._valueChange.emit(i),this.dateInput.emit(new qf(this,this._elementRef.nativeElement))}_onChange(){this.dateChange.emit(new qf(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}registerDatepicker(e){e&&(this._datepicker=e,this._datepicker._registerInput(this))}getDisplayFormat(){switch(this._datepicker.type){case"date":return this._dateFormats.display.dateInput;case"datetime":return this._dateFormats.display.datetimeInput;case"time":return this._dateFormats.display.timeInput;case"month":return this._dateFormats.display.monthInput}}getParseFormat(){let e;switch(this._datepicker.type){case"date":e=this._dateFormats.parse.dateInput;break;case"datetime":e=this._dateFormats.parse.datetimeInput;break;case"time":e=this._dateFormats.parse.timeInput;break;case"month":e=this._dateFormats.parse.monthInput;break}return e||(e=this._dateFormats.parse.dateInput),e}_formatValue(e){this._elementRef.nativeElement.value=e?this._dateAdapter.format(e,this.getDisplayFormat()):""}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(El,8),h(Qf,8),h(ze,8))},t.\u0275dir=_e({type:t,selectors:[["input","matDatetimepicker",""]],hostVars:5,hostBindings:function(i,o){i&1&&T("focus",function(){return o._datepicker._handleFocus()})("input",function(s){return o._onInput(s.target.value)})("change",function(){return o._onChange()})("blur",function(){return o._onBlur()})("keydown",function(s){return o._onKeydown(s)}),i&2&&(lo("disabled",o.disabled),Je("aria-haspopup",!0)("aria-owns",(o._datepicker==null?null:o._datepicker.opened)&&o._datepicker.id||null)("min",o.min?o._dateAdapter.toIso8601(o.min):null)("max",o.max?o._dateAdapter.toIso8601(o.max):null))},inputs:{matDatetimepicker:"matDatetimepicker",matDatepickerFilter:"matDatepickerFilter",value:"value",min:"min",max:"max",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},exportAs:["matDatepickerInput"],features:[ne([M6,A6,{provide:Qb,useExisting:t}])]});let n=t;return n})(),Yf=(()=>{let t=class t{constructor(e,i){this._intl=e,this._changeDetectorRef=i,this._stateChanges=ln.EMPTY}get disabled(){return this._disabled===void 0?this.datetimepicker.disabled:!!this._disabled}set disabled(e){this._disabled=mt(e)}ngOnChanges(e){e.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(e){this.datetimepicker&&!this.disabled&&(this.datetimepicker.open(),e.stopPropagation())}_watchStateChanges(){let e=this.datetimepicker?this.datetimepicker._disabledChange:i2([],t2),i=this.datetimepicker&&this.datetimepicker._datepickerInput?this.datetimepicker._datepickerInput._disabledChange:i2([],t2);this._stateChanges.unsubscribe(),this._stateChanges=Xt(this._intl.changes,e,i).subscribe(()=>this._changeDetectorRef.markForCheck())}};t.\u0275fac=function(i){return new(i||t)(h(bm),h(Me))},t.\u0275cmp=L({type:t,selectors:[["mat-datetimepicker-toggle"]],hostAttrs:[1,"mat-datetimepicker-toggle"],hostBindings:function(i,o){i&1&&T("click",function(s){return o._open(s)})},inputs:{datetimepicker:[0,"for","datetimepicker"],disabled:"disabled"},exportAs:["matDatetimepickerToggle"],features:[lt],decls:5,vars:5,consts:[["mat-icon-button","","type","button",3,"disabled"],[3,"ngSwitch"],["fill","currentColor","focusable","false","height","100%","style","vertical-align: top","viewBox","0 0 24 24","width","100%",4,"ngSwitchCase"],["fill","currentColor","focusable","false","height","100%","style","vertical-align: top","viewBox","0 0 24 24","width","100%",4,"ngSwitchDefault"],["fill","currentColor","focusable","false","height","100%","viewBox","0 0 24 24","width","100%",2,"vertical-align","top"],["d","M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z"],["d","M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C1
347.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z"],["d","M0 0h24v24H0z","fill","none"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(i,o){i&1&&(d(0,"button",0)(1,"mat-icon",1),x(2,kie,2,0,"svg",2)(3,Die,2,0,"svg",2)(4,Mie,3,0,"svg",3),p()()),i&2&&(m("disabled",o.disabled),Je("aria-label",o._intl.openCalendarLabel),l(),m("ngSwitch",o.datetimepicker.type),l(),m("ngSwitchCase","time"),l(),m("ngSwitchCase","datetime"))},dependencies:[lf,cf,p2,Pe,Se],encapsulation:2,changeDetection:0});let n=t;return n})(),P_=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,declarations:[Cw,A_,_E,Wf,Yf,xm,ww,vE,yE,bE],imports:[zi,va,Yc,Qc,Bo,pc],exports:[Cw,A_,_E,Wf,Yf,xm,ww,vE,yE,bE]}),t.\u0275inj=Nt({imports:[zi,va,Yc,Qc,Bo,pc]});let n=t;return n})();y();y();y();var O6=60,P6=O6*60,R6=P6*24,Fie=R6*7,Kf=1e3,R_=O6*Kf,hP=P6*Kf,F6=R6*Kf,N6=Fie*Kf,Xf="millisecond",Hu="second",ld="minute",qu="hour",Es="day",wc="week",jl="month",xE="quarter",Is="year",Wu="date",SE="YYYY-MM-DDTHH:mm:ssZ",fP="Invalid Date",V6=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L6=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;y();var j6={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var r=["th","st","nd","rd"],e=t%100;return"["+t+(r[(e-20)%10]||r[e]||r[0])+"]"}};y();var gP=function(t,r,e){var i=String(t);return!i||i.length>=r?t:""+Array(r+1-i.length).join(e)+t},Nie=function(t){var r=-t.utcOffset(),e=Math.abs(r),i=Math.floor(e/60),o=e%60;return(r<=0?"+":"-")+gP(i,2,"0")+":"+gP(o,2,"0")},Vie=function n(t,r){if(t.date()<r.date())return-n(r,t);var e=(r.year()-t.year())*12+(r.month()-t.month()),i=t.clone().add(e,jl),o=r-i<0,a=t.clone().add(e+(o?-1:1),jl);return+(-(e+(r-i)/(o?i-a:a-i))||0)},Lie=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},Bie=function(t){var r={M:jl,y:Is,w:wc,d:Es,D:Wu,h:qu,m:ld,s:Hu,ms:Xf,Q:xE};return r[t]||String(t||"").toLowerCase().replace(/s$/,"")},jie=function(t){return t===void 0},G6={s:gP,z:Nie,m:Vie,a:Lie,p:Bie,u:jie};var xw="en",Zf={};Zf[xw]=j6;var z6="$isDayjsObject",bP=function(t){return t instanceof EE||!!(t&&t[z6])},TE=function n(t,r,e){var i;if(!t)return xw;if(typeof t=="string"){var o=t.toLowerCase();Zf[o]&&(i=o),r&&(Zf[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return n(a[0])}else{var s=t.name;Zf[s]=t,i=s}return!e&&i&&(xw=i),i||!e&&xw},Ja=function(t,r){if(bP(t))return t.clone();var e=typeof r=="object"?r:{};return e.date=t,e.args=arguments,new EE(e)},Gie=function(t,r){return Ja(t,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})},mo=G6;mo.l=TE;mo.i=bP;mo.w=Gie;var zie=function(t){var r=t.date,e=t.utc;if(r===null)return new Date(NaN);if(mo.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var i=r.match(V6);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return e?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(r)},EE=function(){function n(r){this.$L=TE(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[z6]=!0}var t=n.prototype;return t.parse=function(e){this.$d=zie(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return mo},t.isValid=function(){return this.$d.toString()!==fP},t.isSame=function(e,i){var o=Ja(e);return this.startOf(i)<=o&&o<=this.endOf(i)},t.isAfter=function(e,i){return Ja(e)<this.startOf(i)},t.isBefore=function(e,i){return this.endOf(i)<Ja(e)},t.$g=function(e,i,o){return mo.u(e)?this[i]:this.set(o,e)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,i){var o=this,a=mo.u(i)?!0:i,s=mo.p(e),c=function(ee,Ie){var He=mo.w(o.$u?Date.UTC(o.$y,Ie,ee):new Date(o.$y,Ie,ee),o);return a?He:He.endOf(Es)},u=function(ee,Ie){var He=[0,0,0,0],Le=[23,59,59,999];return mo.w(o.toDate()[ee].apply(o.toDate("s"),(a?He:Le).slice(Ie)),o)},f=this.$W,_=this.$M,I=this.$D,S="set"+(this.$u?"UTC":"");switch(s){case Is:return a?c(1,0):c(31,11);case jl:return a?c(1,_):c(0,_+1);case wc:{var F=this.$locale().weekStart||0,H=(f<F?f+7:f)-F;return c(a?I-H:I+(6-H),_)}case Es:case Wu:return u(S+"Hours",0);case qu:return u(S+"Minutes",1);case ld:return u(S+"Seconds",2);case Hu:return u(S+"Milliseconds",3);default:return this.clone()}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,i){var o,a=mo.p(e),s="set"+(this.$u?"UTC":""),c=(o={},o[Es]=s+"Date",o[Wu]=s+"Date",o[jl]=s+"Month",o[Is]=s+"FullYear",o[qu]=s+"Hours",o[ld]=s+"Minutes",o[Hu]=s+"Seconds",o[Xf]=s+"Milliseconds",o)[a],u=a===Es?this.$D+(i-this.$W):i;if(a===jl||a===Is){var f=this.clone().set(Wu,1);f.$d[c](u),f.init(),this.$d=f.set(Wu,Math.min(this.$D,f.daysInMonth())).$d}else c&&this.$d[c](u);return this.init(),this},t.set=function(e,i){return this.clone().$set(e,i)},t.get=function(e){return this[mo.p(e)]()},t.add=function(e,i){var o=this,a;e=Number(e);var s=mo.p(i),c=function(I){var S=Ja(o);return mo.w(S.date(S.date()+Math.round(I*e)),o)};if(s===jl)return this.set(jl,this.$M+e);if(s===Is)return this.set(Is,this.$y+e);if(s===Es)return c(1);if(s===wc)return c(7);var u=(a={},a[ld]=R_,a[qu]=hP,a[Hu]=Kf,a)[s]||1,f=this.$d.getTime()+e*u;return mo.w(f,this)},t.subtract=function(e,i){return this.add(e*-1,i)},t.format=function(e){var i=this,o=this.$locale();if(!this.isValid())return o.invalidDate||fP;var a=e||SE,s=mo.z(this),c=this.$H,u=this.$m,f=this.$M,_=o.weekdays,I=o.months,S=o.meridiem,F=function(He,Le,qe,ue){return He&&(He[Le]||He(i,a))||qe[Le].slice(0,ue)},H=function(He){return mo.s(c%12||12,He,"0")},q=S||function(Ie,He,Le){var qe=Ie<12?"AM":"PM";return Le?qe.toLowerCase():qe},ee=function(He){switch(He){case"YY":return String(i.$y).slice(-2);case"YYYY":return mo.s(i.$y,4,"0");case"M":return f+1;case"MM":return mo.s(f+1,2,"0");case"MMM":return F(o.monthsShort,f,I,3);case"MMMM":return F(I,f);case"D":return i.$D;case"DD":return mo.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return F(o.weekdaysMin,i.$W,_,2);case"ddd":return F(o.weekdaysShort,i.$W,_,3);case"dddd":return _[i.$W];case"H":return String(c);case"HH":return mo.s(c,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return q(c,u,!0);case"A":return q(c,u,!1);case"m":return String(u);case"mm":return mo.s(u,2,"0");case"s":return String(i.$s);case"ss":return mo.s(i.$s,2,"0");case"SSS":return mo.s(i.$ms,3,"0");case"Z":return s;default:break}return null};return a.replace(L6,function(Ie,He){return He||ee(Ie)||s.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(e,i,o){var a=this,s=mo.p(i),c=Ja(e),u=(c.utcOffset()-this.utcOffset())*R_,f=this-c,_=function(){return mo.m(a,c)},I;switch(s){case Is:I=_()/12;break;case jl:I=_();break;case xE:I=_()/3;break;case wc:I=(f-u)/N6;break;case Es:I=(f-u)/F6;break;case qu:I=f/hP;break;case ld:I=f/R_;break;case Hu:I=f/Kf;break;default:I=f;break}return o?I:mo.a(I)},t.daysInMonth=function(){return this.endOf(jl).$D},t.$locale=function(){return Zf[this.$L]},t.locale=function(e,i){if(!e)return this.$L;var o=this.clone(),a=TE(e,i,!0);return a&&(o.$L=a),o},t.clone=function(){return mo.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},n}(),$6=EE.prototype;Ja.prototype=$6;[["$ms",Xf],["$s",Hu],["$m",ld],["$H",qu],["$W",Es],["$M",jl],["$y",Is],["$D",Wu]].forEac
34h(function(n){$6[n[1]]=function(t){return this.$g(t,n[0],n[1])}});Ja.extend=function(n,t){return n.$i||(n(t,EE,Ja),n.$i=!0),Ja};Ja.locale=TE;Ja.isDayjs=bP;Ja.unix=function(n){return Ja(n*1e3)};Ja.en=Zf[xw];Ja.Ls=Zf;Ja.p={};var nr=Ja;y();y();var _P=function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(r,e,i){return e||i.slice(1)})},vP={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},IE=function(t,r){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,i,o){var a=o&&o.toUpperCase();return i||r[o]||vP[o]||_P(r[a])})};var yP=function(n,t,r){var e=t.prototype,i=function(f){return f&&(f.indexOf?f:f.s)},o=function(f,_,I,S,F){var H=f.name?f:f.$locale(),q=i(H[_]),ee=i(H[I]),Ie=q||ee.map(function(Le){return Le.slice(0,S)});if(!F)return Ie;var He=H.weekStart;return Ie.map(function(Le,qe){return Ie[(qe+(He||0))%7]})},a=function(){return r.Ls[r.locale()]},s=function(f,_){return f.formats[_]||_P(f.formats[_.toUpperCase()])},c=function(){var f=this;return{months:function(I){return I?I.format("MMMM"):o(f,"months")},monthsShort:function(I){return I?I.format("MMM"):o(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(I){return I?I.format("dddd"):o(f,"weekdays")},weekdaysMin:function(I){return I?I.format("dd"):o(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(I){return I?I.format("ddd"):o(f,"weekdaysShort","weekdays",3)},longDateFormat:function(I){return s(f.$locale(),I)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};e.localeData=function(){return c.bind(this)()},r.localeData=function(){var u=a();return{firstDayOfWeek:function(){return u.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(_){return s(u,_)},meridiem:u.meridiem,ordinal:u.ordinal}},r.months=function(){return o(a(),"months")},r.monthsShort=function(){return o(a(),"monthsShort","months",3)},r.weekdays=function(u){return o(a(),"weekdays",null,null,u)},r.weekdaysShort=function(u){return o(a(),"weekdaysShort","weekdays",3,u)},r.weekdaysMin=function(u){return o(a(),"weekdaysMin","weekdays",2,u)}};y();var U6=function(n,t,r){var e=t.prototype,i=e.format;r.en.formats=vP,e.format=function(o){o===void 0&&(o=SE);var a=this.$locale(),s=a.formats,c=s===void 0?{}:s,u=IE(o,c);return i.call(this,u)}};y();var $ie="isoweek",H6=function(n,t,r){var e=function(c,u){var f=(u?r.utc:r)().year(c).startOf(Is),_=4-f.isoWeekday();return f.isoWeekday()>4&&(_+=7),f.add(_,Es)},i=function(c){return c.add(4-c.isoWeekday(),Es)},o=t.prototype;o.isoWeekYear=function(){var s=i(this);return s.year()},o.isoWeek=function(s){if(!this.$utils().u(s))return this.add((s-this.isoWeek())*7,Es);var c=i(this),u=e(this.isoWeekYear(),this.$u);return c.diff(u,wc)+1},o.isoWeekday=function(s){return this.$utils().u(s)?this.day()||7:this.day(this.day()%7?s:s-7)};var a=o.startOf;o.startOf=function(s,c){var u=this.$utils(),f=u.u(c)?!0:c,_=u.p(s);return _===$ie?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(s,c)}};y();var q6=function(n,t,r){var e=t.prototype;e.week=function(i){if(i===void 0&&(i=null),i!==null)return this.add((i-this.week())*7,Es);var o=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=r(this).startOf(Is).add(1,Is).date(o),s=r(this).endOf(wc);if(a.isBefore(s))return 1}var c=r(this).startOf(Is).date(o),u=c.startOf(wc).subtract(1,Xf),f=this.diff(u,wc,!0);return f<0?r(this).startOf("week").week():Math.ceil(f)},e.weeks=function(i){return i===void 0&&(i=null),this.week(i)}};y();var Uie=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,W6=/\d/,Sw=/\d\d/,Hie=/\d{3}/,qie=/\d{4}/,cd=/\d\d?/,Wie=/[+-]?\d+/,Yie=/[+-]\d\d:?(\d\d)?|Z/,Tw=/\d*[^-_:/,()\s\d]+/,Yu={},K6=function(t){return t=+t,t+(t>68?1900:2e3)};function Qie(n){if(!n||n==="Z")return 0;var t=n.match(/([+-]|\d\d)/g),r=+(t[1]*60)+(+t[2]||0);
34return r===0?0:t[0]==="+"?-r:r}var ks=function(t){return function(r){this[t]=+r}},Y6=[Yie,function(n){var t=this.zone||(this.zone={});t.offset=Qie(n)}],CP=function(t){var r=Yu[t];return r&&(r.indexOf?r:r.s.concat(r.f))},Q6=function(t,r){var e,i=Yu,o=i.meridiem;if(!o)e=t===(r?"pm":"PM");else for(var a=1;a<=24;a+=1)if(t.indexOf(o(a,0,r))>-1){e=a>12;break}return e},Kie={A:[Tw,function(n){this.afternoon=Q6(n,!1)}],a:[Tw,function(n){this.afternoon=Q6(n,!0)}],Q:[W6,function(n){this.month=(n-1)*3+1}],S:[W6,function(n){this.milliseconds=+n*100}],SS:[Sw,function(n){this.milliseconds=+n*10}],SSS:[Hie,function(n){this.milliseconds=+n}],s:[cd,ks("seconds")],ss:[cd,ks("seconds")],m:[cd,ks("minutes")],mm:[cd,ks("minutes")],H:[cd,ks("hours")],h:[cd,ks("hours")],HH:[cd,ks("hours")],hh:[cd,ks("hours")],D:[cd,ks("day")],DD:[Sw,ks("day")],Do:[Tw,function(n){var t=Yu,r=t.ordinal,e=n.match(/\d+/);if(this.day=e[0],!!r)for(var i=1;i<=31;i+=1)r(i).replace(/\[|\]/g,"")===n&&(this.day=i)}],w:[cd,ks("week")],ww:[Sw,ks("week")],M:[cd,ks("month")],MM:[Sw,ks("month")],MMM:[Tw,function(n){var t=CP("months"),r=CP("monthsShort"),e=(r||t.map(function(i){return i.slice(0,3)})).indexOf(n)+1;if(e<1)throw new Error;this.month=e%12||e}],MMMM:[Tw,function(n){var t=CP("months"),r=t.indexOf(n)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[Wie,ks("year")],YY:[Sw,function(n){this.year=K6(n)}],YYYY:[qie,ks("year")],Z:Y6,ZZ:Y6};function Xie(n){var t=n.afternoon;if(t!==void 0){var r=n.hours;t?r<12&&(n.hours+=12):r===12&&(n.hours=0),delete n.afternoon}}function Zie(n){n=IE(n,Yu&&Yu.formats);for(var t=n.match(Uie),r=t.length,e=0;e<r;e+=1){var i=t[e],o=Kie[i],a=o&&o[0],s=o&&o[1];s?t[e]={regex:a,parser:s}:t[e]=i.replace(/^\[|\]$/g,"")}return function(c){for(var u={},f=0,_=0;f<r;f+=1){var I=t[f];if(typeof I=="string")_+=I.length;else{var S=I.regex,F=I.parser,H=c.slice(_),q=S.exec(H),ee=q[0];F.call(u,ee),c=c.replace(ee,"")}}return Xie(u),u}}var Jie=function(t,r,e,i){try{if(["x","X"].indexOf(r)>-1)return new Date((r==="X"?1e3:1)*t);var o=Zie(r),a=o(t),s=a.year,c=a.month,u=a.day,f=a.hours,_=a.minutes,I=a.seconds,S=a.milliseconds,F=a.zone,H=a.week,q=new Date,ee=u||(!s&&!c?q.getDate():1),Ie=s||q.getFullYear(),He=0;s&&!c||(He=c>0?c-1:q.getMonth());var Le=f||0,qe=_||0,ue=I||0,Ne=S||0;if(F)return new Date(Date.UTC(Ie,He,ee,Le,qe,ue,Ne+F.offset*60*1e3));if(e)return new Date(Date.UTC(Ie,He,ee,Le,qe,ue,Ne));var st;return st=new Date(Ie,He,ee,Le,qe,ue,Ne),H&&(st=i(st).week(H).toDate()),st}catch{return new Date("")}},X6=function(n,t,r){r.p.customParseFormat=!0,n&&n.parseTwoDigitYear&&(K6=n.parseTwoDigitYear);var e=t.prototype,i=e.parse;e.parse=function(o){var a=o.date,s=o.utc,c=o.args;this.$u=s;var u=c[1];if(typeof u=="string"){var f=c[2]===!0,_=c[3]===!0,I=f||_,S=c[2];_&&(S=c[2]),Yu=this.$locale(),!f&&S&&(Yu=r.Ls[S]),this.$d=Jie(a,u,s,r),this.init(),S&&S!==!0&&(this.$L=this.locale(S).$L),I&&a!=this.format(u)&&(this.$d=new Date("")),Yu={}}else if(u instanceof Array)for(var F=u.length,H=1;H<=F;H+=1){c[1]=u[H-1];var q=r.apply(this,c);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}H===F&&(this.$d=new Date(""))}else i.call(this,o)}};y();var ene=/[+-]\d\d(?::?\d\d)?/g,tne=/([+-]|\d\d)/g;function ine(n){n===void 0&&(n="");var t=n.match(ene);if(!t)return null;var r=(""+t[0]).match(tne)||["-",0,0],e=r[0],i=r[1],o=r[2],a=+i*60+ +o;return a===0?0:e==="+"?a:-a}var Z6=function(n,t,r){var e=t.prototype;r.utc=function(_){var I={date:_,utc:!0,args:arguments};return new t(I)},e.utc=function(_){var I=r(this.toDate(),{locale:this.$L,utc:!0});return _?I.add(this.utcOffset(),ld):I},e.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var i=e.parse;e.parse=function(_){_.utc&&(this.$u=!0),this.$utils().u(_.$offset)||(this.$offset=_.$offset),i.call(this,_)};var o=e.init;e.init=function(){if(this.$u){var _=this.$d;this.$y=_.getUTCFullYear(),this.$M=_.getUTCMonth(),this.$D=_.getUTCDate(),this.$W=_.getUTCDay(),this.$H=_.getUTCHours(),this.$m=_.getUTCMinutes(),this.$s=_.getUTCSeconds(),this.$ms=_.getUTCMilliseconds()}else o.call(this)};var a=e.utcOffset;e.utcOffset=function(_,I){var S=this.$utils(),F=S.u;if(F(_))return this.$u?0:F(this.$offset)?a.call(this):this.$offset;if(typeof _=="string"&&(_=ine(_),_===null))return this;var H=Math.abs(_)<=16?_*60:_,q=this;if(I)return q.$offset=H,q.$u=_===0,q;if(_!==0){var ee=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();q=this.local().add(H+ee,ld),q.$offset=H,q.$x.$localOffset=ee}else q=this.utc();return q};var s=e.format,c="YYYY-MM-DDTHH:mm:ss[Z]";e.format=function(_){var I=_||(this.$u?c:"");return s.call(this,I)},e.valueOf=function(){var _=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-_*R_},e.isUTC=function(){return!!this.$u},e.toISOString=function(){return this.toDate().toISOString()},e.toString=function(){return this.toDate().toUTCString()};var u=e.toDate;e.toDate=function(_){return _==="s"&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var f=e.diff;e.diff=function(_,I,S){if(_&&this.$u===_.$u)return f.call(this,_,I,S);var F=this.local(),H=r(_).local();return f.call(F,H,I,S)}};var nne=["pickerContainer"],rne=(n,t,r,e,i,o,a)=>({ltr:n,rtl:t,shown:r,hidden:e,inline:i,double:o,"show-ranges":a}),one=n=>({active:n}),ane=(n,t)=>({right:n,left:t});function sne(n,t){if(n&1){let r=B();d(0,"li")(1,"button",8),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.clickRange(i,o))}),g(2),p()()}if(n&2){let r=t.$implicit,e=b(2);l(),m("disabled",e.disableRange(r))("ngClass",Xe(3,one,r===e.chosenRange)),l(),j(" ",r," ")}}function lne(n,t){if(n&1&&(pt(0),d(1,"div",6)(2,"ul"),x(3,sne,3,5,"li",7),p()(),ct()),n&2){let r=b
34();l(3),m("ngForOf",r.rangesArray)}}function cne(n,t){n&1&&O(0,"th")}function dne(n,t){if(n&1){let r=B();pt(0),d(1,"th",19),T("click",function(){D(r);let i=b(3);return M(i.clickPrev(i.sideEnum.left))}),p(),ct()}}function pne(n,t){n&1&&(pt(0),O(1,"th"),ct())}function mne(n,t){if(n&1&&(d(0,"option",25),g(1),p()),n&2){let r=t.$implicit,e=b(4);m("disabled",e.calendarVariables.left.dropdowns.inMinYear&&r<e.calendarVariables.left.minDate.month()||e.calendarVariables.left.dropdowns.inMaxYear&&r>e.calendarVariables.left.maxDate.month())("value",r)("selected",e.calendarVariables.left.dropdowns.currentMonth===r),l(),j(" ",e.locale.monthNames[r]," ")}}function une(n,t){if(n&1&&(d(0,"option",26),g(1),p()),n&2){let r=t.$implicit,e=b(4);m("selected",r===e.calendarVariables.left.dropdowns.currentYear),l(),j(" ",r," ")}}function hne(n,t){if(n&1){let r=B();pt(0),d(1,"div",20),g(2),d(3,"select",21),T("change",function(i){D(r);let o=b(3);return M(o.monthChanged(i,o.sideEnum.left))}),x(4,mne,2,4,"option",22),p()(),d(5,"div",20),g(6),d(7,"select",23),T("change",function(i){D(r);let o=b(3);return M(o.yearChanged(i,o.sideEnum.left))}),x(8,une,2,2,"option",24),p()(),ct()}if(n&2){let r=b(3);l(2),j(" ",r.locale.monthNames[r.calendarVariables==null||r.calendarVariables.left==null?null:r.calendarVariables.left.calendar[1][1].month()]," "),l(2),m("ngForOf",r.calendarVariables.left.dropdowns.monthArrays),l(2),j(" ",r.calendarVariables==null||r.calendarVariables.left==null?null:r.calendarVariables.left.calendar[1][1].format(" YYYY")," "),l(2),m("ngForOf",r.calendarVariables.left.dropdowns.yearArrays)}}
34function fne(n,t){if(n&1&&(pt(0),g(1),ct()),n&2){let r=b(3);l(),fa(" ",r.locale.monthNames[r.calendarVariables==null||r.calendarVariables.left==null?null:r.calendarVariables.left.calendar[1][1].month()]," ",r.calendarVariables==null||r.calendarVariables.left==null?null:r.calendarVariables.left.calendar[1][1].format(" YYYY")," ")}}function gne(n,t){if(n&1){let r=B();pt(0),d(1,"th",27),T("click",function(){D(r);let i=b(3);return M(i.clickNext(i.sideEnum.left))}),p(),ct()}}function bne(n,t){n&1&&(pt(0),O(1,"th"),ct())}function _ne(n,t){if(n&1&&(d(0,"th",28)(1,"span"),g(2),p()()),n&2){let r=b(3);l(2),z(r.locale.weekLabel)}}function vne(n,t){if(n&1&&(d(0,"th")(1,"span"),g(2),p()()),n&2){let r=t.$implicit;l(2),z(r)}}function yne(n,t){if(n&1&&(d(0,"td",28)(1,"span"),g(2),p()()),n&2){let r=b().$implicit,e=b(3);l(2),z(e.calendarVariables.left.calendar[r][0].week())}}function Cne(n,t){if(n&1&&(d(0,"td",28)(1,"span"),g(2),p()()),n&2){let r=b().$implicit,e=b(3);l(2),z(e.calendarVariables.left.calendar[r][0].isoWeek())}}function wne(n,t){if(n&1){let r=B();d(0,"td",30),T("click",function(i){let o=D(r).$implicit,a=b().$implicit,s=b(3);return M(s.clickDate(i,s.sideEnum.left,a,o))})("mouseenter",function(i){let o=D(r).$implicit,a=b().$implicit,s=b(3);return M(s.hoverDate(i,s.sideEnum.left,a,o))}),d(1,"span"),g(2),p()()}if(n&2){let r=t.$implicit,e=b().$implicit,i=b(3);bt(i.calendarVariables.left.classes[e][r]),l(2),z(i.calendarVariables.left.calendar[e][r].date())}}function xne(n,t){if(n&1&&(d(0,"tr"),x(1,yne,3,1,"td",16)(2,Cne,3,1,"td",16)(3,wne,3,3,"td",29),p()),n&2){let r=t.$implicit,e=b(3);bt(e.calendarVariables.left.classes[r].classList),l(),m("ngIf",e.showWeekNumbers),l(),m("ngIf",e.showISOWeekNumbers),l(),m("ngForOf",e.calendarVariables.left.calCols)}}function Sne(n,t){if(n&1&&(d(0,"table",13)(1,"thead")(2,"tr"),x(3,cne,1,0,"th",2)(4,dne,2,0,"ng-container",2)(5,pne,2,0,"ng-container",2),d(6,"th",14),x(7,hne,9,4,"ng-container",2)(8,fne,2,2,"ng-container",2),p(),x(9,gne,2,0,"ng-container",2)(10,bne,2,0,"ng-container",2),p(),d(11,"tr",15),x(12,_ne,3,1,"th",16)(13,vne,3,1,"th",7),p()(),d(14,"tbody",17),x(15,xne,4,5,"tr",18),p()()),n&2){let r=b
34(2);l(3),m("ngIf",r.showWeekNumbers||r.showISOWeekNumbers),l(),m("ngIf",!r.calendarVariables.left.minDate||r.calendarVariables.left.minDate.isBefore(r.calendarVariables.left.calendar.firstDay)&&(!r.linkedCalendars||!0)),l(),m("ngIf",!(!r.calendarVariables.left.minDate||r.calendarVariables.left.minDate.isBefore(r.calendarVariables.left.calendar.firstDay)&&(!r.linkedCalendars||!0))),l(2),m("ngIf",r.showDropdowns&&r.calendarVariables.left.dropdowns),l(),m("ngIf",!r.showDropdowns||!r.calendarVariables.left.dropdowns),l(),m("ngIf",(!r.calendarVariables.left.maxDate||r.calendarVariables.left.maxDate.isAfter(r.calendarVariables.left.calendar.lastDay))&&(!r.linkedCalendars||r.singleDatePicker)),l(),m("ngIf",!((!r.calendarVariables.left.maxDate||r.calendarVariables.left.maxDate.isAfter(r.calendarVariables.left.calendar.lastDay))&&(!r.linkedCalendars||r.singleDatePicker))),l(2),m("ngIf",r.showWeekNumbers||r.showISOWeekNumbers),l(),m("ngForOf",r.locale.daysOfWeek),l(2),m("ngForOf",r.calendarVariables.left.calRows)}}function Tne(n,t){if(n&1&&(d(0,"option",40),g(1),p()),n&2){let r=t.$implicit,e=b(3);m("value",r)("disabled",e.timepickerVariables.left.disabledHours.indexOf(r)>-1),l(),j(" ",r," ")}}function Ene(n,t){if(n&1&&(d(0,"option",40),g(1),p()),n&2){let r=t.$implicit,e=t.index,i=b(3);m("value",r)("disabled",i.timepickerVariables.left.disabledMinutes.indexOf(r)>-1),l(),j(" ",i.timepickerVariables.left.minutesLabel[e]," ")}}function Ine(n,t){if(n&1&&(d(0,"option",40),g(1),p()),n&2){let r=t.$implicit,e=t.index,i=b(4);m("value",r)("disabled",i.timepickerVariables.left.disabledSeconds.indexOf(r)>-1),l(),j(" ",i.timepickerVariables.left.secondsLabel[e]," ")}}function kne(n,t){if(n&1){let r=B();d(0,"select",41),bi("ngModelChange",function(i){D(r);let o=b(3);return gi(o.timepickerVariables.left.selectedSecond,i)||(o.timepickerVariables.left.selectedSecond=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(3);return M(o.timeChanged(i,o.sideEnum.left))}),x(1,Ine,2,3,"option",34),p()}if(n&2){let r=b(3);m("disabled",!r.startDate),fi("ngModel",r.timepickerVariables.left.selectedSecond),l(),m("ngForOf",r.timepickerVariables.left.seconds)}}function Dne(n,t){if(n&1){let r=B();d(0,"select",42),bi("ngModelChange",function(i){D(r);let o=b(3);return gi(o.timepickerVariables.left.ampmModel,i)||(o.timepickerVariables.left.ampmModel=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(3);return M(o.timeChanged(i,o.sideEnum.left))}),d(1,"option",43),g(2,"AM"),p(),d(3,"option",44),g(4,"PM"),p()()}if(n&2){let r=b(3);fi("ngModel",r.timepickerVariables.left.ampmModel),l(),m("disabled",r.timepickerVariables.left.amDisabled),l(2),m("disabled",r.timepickerVariables.left.pmDisabled)}}function Mne(n,t){if(n&1){let r=B();d(0,"div",31)(1,"div",32)(2,"select",33),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.timepickerVariables.left.selectedHour,i)||(o.timepickerVariables.left.selectedHour=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(2);return M(o.timeChanged(i,o.sideEnum.left))}),x(3,Tne,2,3,"option",34),p()(),d(4,"div",32)(5,"select",35),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.timepickerVariables.left.selectedMinute,i)||(o.timepickerVariables.left.selectedMinute=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(2);return M(o.timeChanged(i,o.sideEnum.left))}),x(6,Ene,2,3,"option",34),p(),O(7,"span",36)(8,"span",37),p(),d(9,"div",32),x(10,kne,2,3,"select",38),O(11,"span",36)(12,"span",37),p(),d(13,"div",32),x(14,Dne,5,3,"select",39),O(15,"span",36)(16,"span",37),p()()}if(n&2){let r=b(2);l(2),m("disabled",!r.startDate),fi("ngModel",r.timepickerVariables.left.selectedHour),l(),m("ngForOf",r.timepickerVariables.left.hours),l(2),m("disabled",!r.startDate),fi("ngModel",r.timepickerVariables.left.selectedMinute),l(),m("ngForOf",r.timepickerVariables.left.minutes),l(4),m("ngIf",r.timePickerSeconds),l(4),m("ngIf",!r.timePicker24Hour)}}function Ane(n,t){if(n&1&&(d(0,"div",9)(1,"div",10),x(2,Sne,16,10,"table",11),p(),x(3,Mne,17,8,"div",12),p()),n&2){let r=b
34();m("ngClass",Yi(3,ane,r.singleDatePicker,!r.singleDatePicker)),l(2),m("ngIf",r.calendarVariables),l(),m("ngIf",r.timePicker)}}function One(n,t){n&1&&O(0,"th")}function Pne(n,t){if(n&1){let r=B();pt(0),d(1,"th",19),T("click",function(){D(r);let i=b(3);return M(i.clickPrev(i.sideEnum.right))}),p(),ct()}}function Rne(n,t){n&1&&(pt(0),O(1,"th"),ct())}function Fne(n,t){if(n&1&&(d(0,"option",25),g(1),p()),n&2){let r=t.$implicit,e=b(4);m("disabled",e.calendarVariables.right.dropdowns.inMinYear&&e.calendarVariables.right.minDate&&r<e.calendarVariables.right.minDate.month()||e.calendarVariables.right.dropdowns.inMaxYear&&e.calendarVariables.right.maxDate&&r>e.calendarVariables.right.maxDate.month())("value",r)("selected",e.calendarVariables.right.dropdowns.currentMonth===r),l(),j(" ",e.locale.monthNames[r]," ")}}function Nne(n,t){if(n&1&&(d(0,"option",26),g(1),p()),n&2){let r=t.$implicit,e=b(4);m("selected",r===e.calendarVariables.right.dropdowns.currentYear),l(),j(" ",r," ")}}function Vne(n,t){if(n&1){let r=B();pt(0),d(1,"div",20),g(2),d(3,"select",21),T("change",function(i){D(r);let o=b(3);return M(o.monthChanged(i,o.sideEnum.right))}),x(4,Fne,2,4,"option",22),p()(),d(5,"div",20),g(6),d(7,"select",23),T("change",function(i){D(r);let o=b(3);return M(o.yearChanged(i,o.sideEnum.right))}),x(8,Nne,2,2,"option",24),p()(),ct()}if(n&2){let r=b(3);l(2),j(" ",r.locale.monthNames[r.calendarVariables==null||r.calendarVariables.right==null?null:r.calendarVariables.right.calendar[1][1].month()]," "),l(2),m("ngForOf",r.calendarVariables.right.dropdowns.monthArrays),l(2),j(" ",r.calendarVariables==null||r.calendarVariables.right==null?null:r.calendarVariables.right.calendar[1][1].format(" YYYY")," "),l(2),m("ngForOf",r.calendarVariables.right.dropdowns.yearArrays)}}
34function Lne(n,t){if(n&1&&(pt(0),g(1),ct()),n&2){let r=b(3);l(),fa(" ",r.locale.monthNames[r.calendarVariables==null||r.calendarVariables.right==null?null:r.calendarVariables.right.calendar[1][1].month()]," ",r.calendarVariables==null||r.calendarVariables.right==null?null:r.calendarVariables.right.calendar[1][1].format(" YYYY")," ")}}function Bne(n,t){if(n&1){let r=B();pt(0),d(1,"th",27),T("click",function(){D(r);let i=b(3);return M(i.clickNext(i.sideEnum.right))}),p(),ct()}}function jne(n,t){n&1&&(pt(0),O(1,"th"),ct())}function Gne(n,t){if(n&1&&(d(0,"th",28)(1,"span"),g(2),p()()),n&2){let r=b(3);l(2),z(r.locale.weekLabel)}}function zne(n,t){if(n&1&&(d(0,"th")(1,"span"),g(2),p()()),n&2){let r=t.$implicit;l(2),z(r)}}function $ne(n,t){if(n&1&&(d(0,"td",28)(1,"span"),g(2),p()()),n&2){let r=b().$implicit,e=b(3);l(2),z(e.calendarVariables.right.calendar[r][0].week())}}function Une(n,t){if(n&1&&(d(0,"td",28)(1,"span"),g(2),p()()),n&2){let r=b().$implicit,e=b(3);l(2),z(e.calendarVariables.right.calendar[r][0].isoWeek())}}function Hne(n,t){if(n&1){let r=B();d(0,"td",30),T("click",function(i){let o=D(r).$implicit,a=b().$implicit,s=b(3);return M(s.clickDate(i,s.sideEnum.right,a,o))})("mouseenter",function(i){let o=D(r).$implicit,a=b().$implicit,s=b(3);return M(s.hoverDate(i,s.sideEnum.right,a,o))}),d(1,"span"),g(2),p()()}if(n&2){let r=t.$implicit,e=b().$implicit,i=b(3);bt(i.calendarVariables.right.classes[e][r]),l(2),z(i.calendarVariables.right.calendar[e][r].date())}}function qne(n,t){if(n&1&&(d(0,"tr"),x(1,$ne,3,1,"td",16)(2,Une,3,1,"td",16)(3,Hne,3,3,"td",29),p()),n&2){let r=t.$implicit,e=b(3);bt(e.calendarVariables.right.classes[r].classList),l(),m("ngIf",e.showWeekNumbers),l(),m("ngIf",e.showISOWeekNumbers),l(),m("ngForOf",e.calendarVariables.right.calCols)}}function Wne(n,t){if(n&1&&(d(0,"table",13)(1,"thead")(2,"tr"),x(3,One,1,0,"th",2)(4,Pne,2,0,"ng-container",2)(5,Rne,2,0,"ng-container",2),d(6,"th",46),x(7,Vne,9,4,"ng-container",2)(8,Lne,2,2,"ng-container",2),p(),x(9,Bne,2,0,"ng-container",2)(10,jne,2,0,"ng-container",2),p(),d(11,"tr",15),x(12,Gne,3,1,"th",16)(13,zne,3,1,"th",7),p()(),d(14,"tbody"),x(15,qne,4,5,"tr",18),p()()),n&2){let r=b
34(2);l(3),m("ngIf",r.showWeekNumbers||r.showISOWeekNumbers),l(),m("ngIf",(!r.calendarVariables.right.minDate||r.calendarVariables.right.minDate.isBefore(r.calendarVariables.right.calendar.firstDay))&&!r.linkedCalendars),l(),m("ngIf",!((!r.calendarVariables.right.minDate||r.calendarVariables.right.minDate.isBefore(r.calendarVariables.right.calendar.firstDay))&&!r.linkedCalendars)),l(2),m("ngIf",r.showDropdowns&&r.calendarVariables.right.dropdowns),l(),m("ngIf",!r.showDropdowns||!r.calendarVariables.right.dropdowns),l(),m("ngIf",!r.calendarVariables.right.maxDate||r.calendarVariables.right.maxDate.isAfter(r.calendarVariables.right.calendar.lastDay)&&(!r.linkedCalendars||r.singleDatePicker||!0)),l(),m("ngIf",!(!r.calendarVariables.right.maxDate||r.calendarVariables.right.maxDate.isAfter(r.calendarVariables.right.calendar.lastDay)&&(!r.linkedCalendars||r.singleDatePicker||!0))),l(2),m("ngIf",r.showWeekNumbers||r.showISOWeekNumbers),l(),m("ngForOf",r.locale.daysOfWeek),l(2),m("ngForOf",r.calendarVariables.right.calRows)}}function Yne(n,t){if(n&1&&(d(0,"option",40),g(1),p()),n&2){let r=t.$implicit,e=b(3);m("value",r)("disabled",e.timepickerVariables.right.disabledHours.indexOf(r)>-1),l(),j(" ",r," ")}}function Qne(n,t){if(n&1&&(d(0,"option",40),g(1),p()),n&2){let r=t.$implicit,e=t.index,i=b(3);m("value",r)("disabled",i.timepickerVariables.right.disabledMinutes.indexOf(r)>-1),l(),j(" ",i.timepickerVariables.right.minutesLabel[e]," ")}}function Kne(n,t){if(n&1&&(d(0,"option",40),g(1),p()),n&2){let r=t.$implicit,e=t.index,i=b(4);m("value",r)("disabled",i.timepickerVariables.right.disabledSeconds.indexOf(r)>-1),l(),j(" ",i.timepickerVariables.right.secondsLabel[e]," ")}}function Xne(n,t){if(n&1){let r=B();d(0,"select",41),bi("ngModelChange",function(i){D(r);let o=b(3);return gi(o.timepickerVariables.right.selectedSecond,i)||(o.timepickerVariables.right.selectedSecond=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(3);return M(o.timeChanged(i,o.sideEnum.right))}),x(1,Kne,2,3,"option",34),p()}if(n&2){let r=b(3);m("disabled",!r.startDate),fi("ngModel",r.timepickerVariables.right.selectedSecond),l(),m("ngForOf",r.timepickerVariables.right.seconds)}}function Zne(n,t){if(n&1){let r=B();d(0,"select",42),bi("ngModelChange",function(i){D(r);let o=b(3);return gi(o.timepickerVariables.right.ampmModel,i)||(o.timepickerVariables.right.ampmModel=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(3);return M(o.timeChanged(i,o.sideEnum.right))}),d(1,"option",43),g(2,"AM"),p(),d(3,"option",44),g(4,"PM"),p()()}if(n&2){let r=b(3);fi("ngModel",r.timepickerVariables.right.ampmModel),l(),m("disabled",r.timepickerVariables.right.amDisabled),l(2),m("disabled",r.timepickerVariables.right.pmDisabled)}}function Jne(n,t){if(n&1){let r=B();d(0,"div",31)(1,"div",32)(2,"select",47),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.timepickerVariables.right.selectedHour,i)||(o.timepickerVariables.right.selectedHour=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(2);return M(o.timeChanged(i,o.sideEnum.right))}),x(3,Yne,2,3,"option",34),p(),O(4,"span",36)(5,"span",37),p(),d(6,"div",32)(7,"select",35),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.timepickerVariables.right.selectedMinute,i)||(o.timepickerVariables.right.selectedMinute=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b(2);return M(o.timeChanged(i,o.sideEnum.right))}),x(8,Qne,2,3,"option",34),p(),O(9,"span",36)(10,"span",37),p(),d(11,"div",32),x(12,Xne,2,3,"select",38),O(13,"span",36)(14,"span",37),p(),d(15,"div",32),x(16,Zne,5,3,"select",39),O(17,"span",36)(18,"span",37),p()()}if(n&2){let r=b(2);l(2),m("disabled",!r.startDate),fi("ngModel",r.timepickerVariables.right.selectedHour),l(),m("ngForOf",r.timepickerVariables.right.hours),l(4),m("disabled",!r.startDate),fi("ngModel",r.timepickerVariables.right.selectedMinute),l(),m("ngForOf",r.timepickerVariables.right.minutes),l(4),m("ngIf",r.timePickerSeconds),l(4),m("ngIf",!r.timePicker24Hour)}}function ere(n,t){if(n&1&&(d(0,"div",45)(1,"div",10),x(2,Wne,16,10,"table",11),p(),x(3,Jne,19,8,"div",12),p()),n&2){let r=b
34();l(2),m("ngIf",r.calendarVariables),l(),m("ngIf",r.timePicker)}}function tre(n,t){if(n&1){let r=B();d(0,"button",53),T("click",function(){D(r);let i=b(2);return M(i.clear())}),g(1),ar(),d(2,"svg",54),O(3,"path",55),p()()}if(n&2){let r=b(2);m("title",r.locale.clearLabel),l(),j(" ",r.locale.clearLabel," ")}}function ire(n,t){if(n&1){let r=B();d(0,"button",56),T("click",function(i){D(r);let o=b(2);return M(o.clickCancel(i))}),g(1),p()}if(n&2){let r=b(2);l(),z(r.locale.cancelLabel)}}function nre(n,t){if(n&1){let r=B();d(0,"div",48)(1,"div",49),x(2,tre,4,2,"button",50)(3,ire,2,1,"button",51),d(4,"button",52),T("click",function(i){D(r);let o=b();return M(o.clickApply(i))}),g(5),p()()()}if(n&2){let r=b();l(2),m("ngIf",r.showClearButton),l(),m("ngIf",r.showCancel),l(),m("disabled",r.applyBtn.disabled),l(),z(r.locale.applyLabel)}}nr.extend(yP);var wP=new tt("daterangepicker.config"),kE={direction:"ltr",separator:" - ",weekLabel:"W",applyLabel:"Apply",cancelLabel:"Cancel",clearLabel:"Clear",customRangeLabel:"Custom range",daysOfWeek:nr.weekdaysMin(),monthNames:nr.monthsShort(),firstDay:nr.localeData().firstDayOfWeek()},DE=(()=>{class n{constructor(r){this.configHolder=r}get config(){return this.configHolder?re(re({},kE),this.configHolder):kE}configWithLocale(r){return!this.configHolder&&!r?kE:re(Lt(re({},kE),{daysOfWeek:r.weekdaysMin,monthNames:r.monthsShort,firstDay:r.weekStart}),this.configHolder)}}return n.\u0275fac=function(r){return new(r||n)(X(wP))},n.\u0275prov=we({token:n,factory:n.\u0275fac}),n})();nr.extend(yP);nr.extend(U6);nr.extend(H6);nr.extend(q6);nr.extend(X6);nr.extend(Z6);var Or=function(n){return n.left="left",n.right="right",n}(Or||{}),xP=(()=>{class n{constructor(r,e,i){this.el=r,this.ref=e,this.localeHolderService=i,this.startDate=nr().utc(!0).startOf("day"),this.endDate=nr().utc(!0).endOf("day"),this.dateLimit=null,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.linkedCalendars=!1,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.maxSpan=!1,this.lockStartDate=!1,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.showClearButton=!1,this.firstMonthDayClass=null,this.lastMonthDayClass=null,this.emptyWeekRowClass=null,this.emptyWeekColumnClass=null,this.firstDayOfNextMonthClass=null,this.lastDayOfPreviousMonthClass=null,this.showCancel=!1,this.keepCalendarOpeningWithRange=!1,this.showRangeLabelOnInput=!1,this.customRangeDirection=!1,this.closeOnAutoApply=!0,this.calendarVariables={},this.timepickerVariables={},this.daterangepicker={start:new Nl,end:new Nl},this.applyBtn={disabled:!1},this.sideEnum=Or,this.rangesArray=[],this.isShown=!1,this.inline=!0,this.leftCalendar={month:null,calendar:[]},this.rightCalendar={month:null,calendar:[]},this.showCalInRanges=!1,this.nowHoveredDate=null,this.pickingDate=!1,this.localeHolder={},this.rangesHolder={},this.cachedVersion={start:null,end:null},this.clickNext=o=>{o===Or.left?this.leftCalendar.month=this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month=this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&(this.leftCalendar.month=this.leftCalendar.month.add(1,"month"))),this.updateCalendars()},this.choosedDate=new J,this.rangeClicked=new J,this.datesUpdated=new J,this.startDateChanged=new J,this.endDateChanged=new J,this.cancelClicked=new J,this.clearClicked=new J}get minDate(){return this.minDateHolder}set minDate(r){nr.isDayjs(r)?this.minDateHolder=r:typeof r=="string"?this.minDateHolder=nr(r).utc(!0):this.minDateHolder=null}get locale(){return this.localeHolder}set locale(r){this.localeHolder=re(re({},this.localeHolderService.config),r),r.locale&&(this.localeHolder=this.localeHolderService.configWithLocale(r.locale))}get ranges(){return this.rangesHolder}set ranges(r){this.rangesHolder=r,this.renderRanges()}get maxDate(){return this.maxDateHolder}set maxDate(r){nr.isDayjs(r)?this.maxDateHolder=r:typeof r=="string"?this.maxDateHolder=nr(r).utc(!0):this.maxDateHolder=null}isInvalidDate(r){return!1}isCustomDate(r){return!1}isTooltipDate(r){return null}handleInternalClick(r){return r.stopPropagation()}ngOnChanges(r){(r.startDate||r.endDate)&&this.inline&&this.updateView()}ngOnInit(){this.buildLocale();let r=[...this.locale.daysOfWeek];if(this.locale.firstDay=this.locale.firstDay%7,this.locale.firstDay!==0){let e=this.locale.firstDay;for(;e>0;)r.push(r.shift()),e--}this.locale.daysOfWeek=r,this.inline&&(this.cachedVersion.start=this.startDate.clone(),this.cachedVersion.end=this.endDate.clone()),this.startDate&&this.timePicker&&(this.setStartDate(this.startDate),this.renderTimePicker(Or.left)),this.endDate&&this.timePicker&&(this.setEndDate(this.endDate),this.renderTimePicker(Or.right)),this.updateMonthsInView(),this.renderCalendar(Or.left),this.renderCalendar(Or.right),this.renderRanges()}renderRanges(){this.rangesArray=[];let r,e;if(typeof this.ranges=="object"){for(let i in this.ranges)if(this.ranges[i]){typeof this.ranges[i][0]=="string"?r=nr(this.ranges[i][0],this.locale.format).utc(!0):r=nr(this.ranges[i][0]).utc(!0),typeof this.ranges[i][1]=="string"?e=nr(this.ranges[i][1],this.locale.format).utc(!0):e=nr(this.ranges[i][1]).utc(!0),this.minDate&&r.isBefore(this.minDate)&&(r=this.minDate.clone());let o=this.maxDate;
34if(this.maxSpan&&o&&r.clone().add(this.maxSpan).isAfter(o)&&(o=r.clone().add(this.maxSpan)),o&&e.isAfter(o)&&(e=o.clone()),this.minDate&&e.isBefore(this.minDate,this.timePicker?"minute":"day")||o&&r.isAfter(o,this.timePicker?"minute":"day"))continue;let a=document.createElement("textarea");a.innerHTML=i;let s=a.value;this.ranges[s]=[r,e]}for(let i in this.ranges)this.ranges[i]&&this.rangesArray.push(i);this.showCustomRangeLabel&&this.rangesArray.push(this.locale.customRangeLabel),this.showCalInRanges=!this.rangesArray.length||this.alwaysShowCalendars,this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"))}}renderTimePicker(r){let e,i,o=this.maxDate;r===Or.left?(e=this.startDate.clone(),i=this.minDate):r===Or.right&&this.endDate?(e=this.endDate.clone(),i=this.startDate):r===Or.right&&!this.endDate&&(e=this.getDateWithTime(this.startDate,Or.right),e.isBefore(this.startDate)&&(e=this.startDate.clone()),i=this.startDate);let a=this.timePicker24Hour?0:1,s=this.timePicker24Hour?23:12;this.timepickerVariables[r]={hours:[],minutes:[],minutesLabel:[],seconds:[],secondsLabel:[],disabledHours:[],disabledMinutes:[],disabledSeconds:[],selectedHour:0,selectedMinute:0,selectedSecond:0,selected:e};for(let c=a;c<=s;c++){let u=c;this.timePicker24Hour||(u=e.hour()>=12?c===12?12:c+12:c===12?0:c);let f=e.clone().hour(u),_=!1;i&&f.minute(59).isBefore(i)&&(_=!0),o&&f.minute(0).isAfter(o)&&(_=!0),this.timepickerVariables[r].hours.push(c),u===e.hour()&&!_?this.timepickerVariables[r].selectedHour=c:_&&this.timepickerVariables[r].disabledHours.push(c)}for(let c=0;c<60;c+=this.timePickerIncrement){let u=c<10?`0${c}`:`${c}`,f=e.clone().minute(c),_=!1;i&&f.second(59).isBefore(i)&&(_=!0),o&&f.second(0).isAfter(o)&&(_=!0),this.timepickerVariables[r].minutes.push(c),this.timepickerVariables[r].minutesLabel.push(u),e.minute()===c&&!_?this.timepickerVariables[r].selectedMinute=c:_&&this.timepickerVariables[r].disabledMinutes.push(c)}if(this.timePickerSeconds)for(let c=0;c<60;c++){let u=c<10?`0${c}`:`${c}`,f=e.clone().second(c),_=!1;i&&f.isBefore(i)&&(_=!0),o&&f.isAfter(o)&&(_=!0),this.timepickerVariables[r].seconds.push(c),this.timepickerVariables[r].secondsLabel.push(u),e.second()===c&&!_?this.timepickerVariables[r].selectedSecond=c:_&&this.timepickerVariables[r].disabledSeconds.push(c)}this.timePicker24Hour||(i&&e.clone().hour(12).minute(0).second(0).isBefore(i)&&(this.timepickerVariables[r].amDisabled=!0),o&&e.clone().hour(0).minute(0).second(0).isAfter(o)&&(this.timepickerVariables[r].pmDisabled=!0),e.hour()>=12?this.timepickerVariables[r].ampmModel="PM":this.timepickerVariables[r].ampmModel="AM"),this.timepickerVariables[r].selected=e}renderCalendar(r){let e=r===Or.left?this.leftCalendar:this.rightCalendar,i=e.month.month(),o=e.month.year(),a=e.month.hour(),s=e.month.minute(),c=e.month.second(),u=nr(new Date(o,i)).utc(!0).daysInMonth(),f=nr(new Date(o,i,1)).utc(!0),_=nr(new Date(o,i,u)).utc(!0),I=nr(f).utc(!0).subtract(1,"month").month(),S=nr(f).utc(!0).subtract(1,"month").year(),F=nr(new Date(S,I)).utc(!0).daysInMonth(),H=f.day(),q=[];q.firstDay=f,q.lastDay=_;for(let qe=0;qe<6;qe++)q[qe]=[];let ee=F-H+this.locale.firstDay+1;ee>F&&(ee-=7),H===this.locale.firstDay&&(ee=F-6);let Ie=nr(new Date(S,I,ee,12,s,c)).utc(!0);for(let qe=0,ue=0,Ne=0;qe<42;qe++,ue++,Ie=nr(Ie).utc(!0).add(24,"hours"))qe>0&&ue%7===0&&(ue=0,Ne++),q[Ne][ue]=Ie.clone().hour(a).minute(s).second(c),Ie=Ie.hour(12),this.minDate&&q[Ne][ue].format("YYYY-MM-DD")===this.minDate.format("YYYY-MM-DD")&&q[Ne][ue].isBefore(this.minDate)&&r==="left"&&(q[Ne][ue]=this.minDate.clone()),this.maxDate&&q[Ne][ue].format("YYYY-MM-DD")===this.maxDate.format("YYYY-MM-DD")&&q[Ne][ue].isAfter(this.maxDate)&&r==="right"&&(q[Ne][ue]=this.maxDate.clone());r===Or.left?this.leftCalendar.calendar=q:this.rightCalendar.calendar=q;let He=r==="left"?this.minDate:this.startDate,Le=this.maxDate;if(this.endDate===null&&this.dateLimit){let qe=this.startDate.clone().add(this.dateLimit,"day").endOf("day");if((!Le||qe.isBefore(Le))&&(Le=qe),this.customRangeDirection){He=this.minDate;let ue=this.startDate.clone().subtract(this.dateLimit,"day").endOf("day");(!He||ue.isAfter(He))&&(He=ue)}}if(this.calendarVariables[r]={month:i,year:o,hour:a,minute:s,second:c,daysInMonth:u,firstDay:f,lastDay:_,lastMonth:I,lastYear:S,daysInLastMonth:F,dayOfWeek:H,calRows:Array.from(Array(6).keys()),calCols:Array.from(Array(7).keys()),classes:{},minDate:He,maxDate:Le,calendar:q},this.showDropdowns){let qe=q[1][1].month(),ue=q[1][1].year(),Ne=nr().utc(!0).year(),st=Le&&Le.year()||Ne+5,Ui=He&&He.year()||Ne-50,Oe=ue===Ui,wt=ue===st,ei=[];for(let wi=Ui;wi<=st;wi++)ei.push(wi);this.calendarVariables[r].dropdowns={currentMonth:qe,currentYear:ue,maxYear:st,minYear:Ui,inMinYear:Oe,inMaxYear:wt,monthArrays:Array.from(Array(12).keys()),yearArrays:ei}}this.buildCells(q,r)}setStartDate(r){typeof r=="string"&&(this.startDate=nr(r,this.locale.format).utc(!0)),typeof r=="object"&&(this.pickingDate=!0,this.startDate=nr(r).utc(!0)),this.timePicker||(this.pickingDate=!0,this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&(this.startDate=this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&(this.startDate=this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement))),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&(this.startDate=this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement))),this.isShown||this.updateElement(),this.startDateChanged.emit({startDate:this.startDate}),this.updateMonthsInView()}setEndDate(r){typeof r=="string"&&(this.endDate=nr(r,this.locale.format).utc(!0)),typeof r=="object"&&(this.pickingDate=!1,this.endDate=nr(r).utc(!0)),this.timePicker||(this.pickingDate=!1,this.endDate=this.endDate.add(1,"d").startOf("day").subtract(1,"second")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.dateLimit&&this.startDate.clone().add(this.dateLimit,"day").isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit,"day")),this.isShown,this.endDateChanged.emit({endD
34ate:this.endDate}),this.updateMonthsInView()}updateView(){this.timePicker&&(this.renderTimePicker(Or.left),this.renderTimePicker(Or.right)),this.updateMonthsInView(),this.updateCalendars()}updateMonthsInView(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate&&this.leftCalendar&&this.startDate.format("YYYY-MM")===this.leftCalendar.month.format("YYYY-MM")||this.startDate&&this.rightCalendar&&this.startDate.format("YYYY-MM")===this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")===this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")===this.rightCalendar.month.format("YYYY-MM")))return;this.startDate&&(this.leftCalendar.month=this.startDate.clone().date(2),!this.linkedCalendars&&(this.endDate.month()!==this.startDate.month()||this.endDate.year()!==this.startDate.year())?this.rightCalendar.month=this.endDate.clone().date(2):this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"))}else this.leftCalendar.month.format("YYYY-MM")!==this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!==this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))}updateCalendars(){this.renderCalendar(Or.left),this.renderCalendar(Or.right),this.endDate!==null&&this.calculateChosenLabel()}updateElement(){let r=this.locale.displayFormat?this.locale.displayFormat:this.locale.format;!this.singleDatePicker&&this.autoUpdateInput?this.startDate&&this.endDate&&(this.rangesArray.length&&this.showRangeLabelOnInput===!0&&this.chosenRange&&this.locale.customRangeLabel!==this.chosenRange?this.chosenLabel=this.chosenRange:this.chosenLabel=this.startDate.format(r)+this.locale.separator+this.endDate.format(r)):this.autoUpdateInput&&(this.chosenLabel=this.startDate.format(r))}remove(){this.isShown=!1}calculateChosenLabel(){(!this.locale||!this.locale.separator)&&this.buildLocale();let r=!0,e=0;if(this.rangesArray.length>0){for(let i in this.ranges)if(this.ranges[i]){if(this.timePicker){let o=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(o)===this.ranges[i][0].format(o)&&this.endDate.format(o)===this.ranges[i][1].format(o)){r=!1,this.chosenRange=this.rangesArray[e];break}}else if(this.startDate.format("YYYY-MM-DD")===this.ranges[i][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")===this.ranges[i][1].format("YYYY-MM-DD")){r=!1,this.chosenRange=this.rangesArray[e];break}e++}r&&(this.showCustomRangeLabel?this.chosenRange=this.locale.customRangeLabel:this.chosenRange=null,this.showCalInRanges=!0)}this.updateElement()}clickApply(r){if(!this.singleDatePicker&&this.startDate&&!this.endDate&&(this.endDate=this.getDateWithTime(this.startDate,Or.right),this.calculateChosenLabel()),this.isInvalidDate&&this.startDate&&this.endDate){let e=this.startDate.clone();for(;e.isBefore(this.endDate);){if(this.isInvalidDate(e)){this.endDate=e.subtract(1,"days"),this.calculateChosenLabel();break}e=e.add(1,"days")}}this.chosenLabel&&this.choosedDate.emit({chosenLabel:this.chosenLabel,startDate:this.startDate,endDate:this.endDate}),this.datesUpdated.emit({startDate:this.startDate,endDate:this.endDate}),(r||this.closeOnAutoApply&&!r)&&this.hide()}clickCancel(r){this.startDate=this.cachedVersion.start,this.endDate=this.cachedVersion.end,this.inline&&this.updateView(),this.cancelClicked.emit(),this.hide()}monthChanged(r,e){let i=this.calendarVariables[e].dropdowns.currentYear,o=parseInt(r.target.value,10);this.monthOrYearChanged(o,i,e)}yearChanged(r,e){let i=this.calendarVariables[e].dropdowns.currentMonth,o=parseInt(r.target.value,10);this.monthOrYearChanged(i,o,e)}timeChanged(r,e){let i=parseInt(String(this.timepickerVariables[e].selectedHour),10),o=parseInt(String(this.timepickerVariables[e].selectedMinute),10),a=this.timePickerSeconds?parseInt(String(this.timepickerVariables[e].selectedSecond),10):0;if(!this.timePicker24Hour){let s=this.timepickerVariables[e].ampmModel;s==="PM"&&i<12&&(i+=12),s==="AM"&&i===12&&(i=0)}if(e===Or.left){let s=this.startDate.clone();s=s.hour(i),s=s.minute(o),s=s.second(a),this.setStartDate(s),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")===s.format("YYYY-MM-DD")&&this.endDate.isBefore(s)?this.setEndDate(s.clone()):!this.endDate&&this.timePicker&&this.getDateWithTime(s,Or.right).isBefore(s)&&(this.timepickerVariables[Or.right].selectedHour=i,this.timepickerVariables[Or.right].selectedMinute=o,this.timepickerVariables[Or.right].selectedSecond=a)}else if(this.endDate){let s=this.endDate.clone();s=s.hour(i),s=s.minute(o),s=s.second(a),this.setEndDate(s)}this.updateCalendars(),this.renderTimePicker(Or.left),this.renderTimePicker(Or.right),this.autoApply&&this.clickApply()}monthOrYearChanged(r,e,i){let o=i===Or.left,a=r,s=e;o||(s<this.startDate.year()||s===this.startDate.year()&&a<this.startDate.month())&&(a=this.startDate.month(),s=this.startDate.year()),this.minDate&&(s<this.minDate.year()||s===this.minDate.year()&&a<this.minDate.month())&&(a=this.minDate.month(),s=this.minDate.year()),this.maxDate&&(s>this.maxDate.year()||s===this.maxDate.year()&&a>this.maxDate.month())&&(a=this.maxDate.month(),s=this.maxDate.year()),this.calendarVariables[i].dropdowns.currentYear=s,this.calendarVariables[i].dropdowns.currentMonth=a,o?(this.leftCalendar.month=this.leftCalendar.month.month(a).year
34(s),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month=this.rightCalendar.month.month(a).year(s),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()}clickPrev(r){r===Or.left?(this.leftCalendar.month=this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&(this.rightCalendar.month=this.rightCalendar.month.subtract(1,"month"))):this.rightCalendar.month=this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()}hoverDate(r,e,i,o){let a=this.calendarVariables.left.calendar[i][o],s=this.calendarVariables.right.calendar[i][o];this.pickingDate&&(this.nowHoveredDate=e===Or.left?a:s,this.renderCalendar(Or.left),this.renderCalendar(Or.right))}clickDate(r,e,i,o){if(r.target.tagName==="TD"){if(!r.target.classList.contains("available"))return}else if(r.target.tagName==="SPAN"&&!r.target.parentElement.classList.contains("available"))return;this.rangesArray.length&&(this.chosenRange=this.locale.customRangeLabel);let a=e===Or.left?this.leftCalendar.calendar[i][o]:this.rightCalendar.calendar[i][o];(this.endDate||a.isBefore(this.startDate,"day")&&this.customRangeDirection===!1)&&this.lockStartDate===!1?(this.timePicker&&(a=this.getDateWithTime(a,Or.left)),this.endDate=null,this.setStartDate(a.clone())):!this.endDate&&a.isBefore(this.startDate)&&this.customRangeDirection===!1?this.setEndDate(this.startDate.clone()):(this.timePicker&&(a=this.getDateWithTime(a,Or.right)),a.isBefore(this.startDate,"day")===!0&&this.customRangeDirection===!0?(this.setEndDate(this.startDate),this.setStartDate(a.clone())):this.setEndDate(a.clone()),this.autoApply&&this.calculateChosenLabel()),this.singleDatePicker&&(this.setEndDate(this.startDate),this.updateElement(),this.autoApply&&this.clickApply()),this.updateView(),this.autoApply&&this.startDate&&this.endDate&&this.clickApply(),r.stopPropagation()}clickRange(r,e){if(this.chosenRange=e,e===this.locale.customRangeLabel)this.isShown=!0,this.showCalInRanges=!0;else{let i=this.ranges[e];if(console.log("1 ",i),this.startDate=i[0].clone(),this.endDate=i[1].clone(),this.showRangeLabelOnInput&&e!==this.locale.customRangeLabel?this.chosenLabel=e:this.calculateChosenLabel(),this.showCalInRanges=!this.rangesArray.length||this.alwaysShowCalendars,this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day")),this.alwaysShowCalendars||(this.isShown=!1),this.rangeClicked.emit({label:e,dates:i}),!this.keepCalendarOpeningWithRange||this.autoApply)this.clickApply();else{if(!this.alwaysShowCalendars)return this.clickApply();if(this.maxDate&&this.maxDate.isSame(i[0],"month"))this.rightCalendar.month=this.rightCalendar.month.month(i[0].month()),this.rightCalendar.month=this.rightCalendar.month.year(i[0].year()),this.leftCalendar.month=this.leftCalendar.month.month(i[0].month()-1),this.leftCalendar.month=this.leftCalendar.month.year(i[1].year());else{this.leftCalendar.month=this.leftCalendar.month.month(i[0].month()),this.leftCalendar.month=this.leftCalendar.month.year(i[0].year());let o=this.linkedCalendars?i[0].clone().add(1,"month"):i[1].clone();this.rightCalendar.month=this.rightCalendar.month.month(o.month()),this.rightCalendar.month=this.rightCalendar.month.year(o.year())}this.updateCalendars(),this.timePicker&&(this.renderTimePicker(Or.left),this.renderTimePicker(Or.right))}}}show(r){this.isShown||(this.cachedVersion.start=this.startDate.clone(),this.cachedVersion.end=this.endDate.clone(),this.isShown=!0,this.updateView())}hide(r){this.isShown&&(this.endDate||(this.cachedVersion.start&&(this.startDate=this.cachedVersion.start.clone()),this.cachedVersion.end&&(this.endDate=this.cachedVersion.end.clone())),!this.startDate.isSame(this.cachedVersion.start)||this.endDate.isSame(this.cachedVersion.end),this.updateElement(),this.isShown=!1,this.ref.detectChanges())}updateLocale(r){for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(this.locale[e]=r[e],e==="customRangeLabel"&&this.renderRanges())}clear(){this.startDate=nr().utc(!0).startOf("day"),this.endDate=nr().utc(!0).endOf("day"),this.choosedDate.emit({chosenLabel:"",startDate:null,endD
34ate:null}),this.datesUpdated.emit({startDate:null,endDate:null}),this.clearClicked.emit(),this.hide()}disableRange(r){if(r===this.locale.customRangeLabel)return!1;let e=this.ranges[r],i=e.every(a=>this.minDate?a.isBefore(this.minDate):!1),o=e.every(a=>this.maxDate?a.isAfter(this.maxDate):!1);return i||o}getDateWithTime(r,e){let i=parseInt(String(this.timepickerVariables[e].selectedHour),10);if(!this.timePicker24Hour){let s=this.timepickerVariables[e].ampmModel;s==="PM"&&i<12&&(i+=12),s==="AM"&&i===12&&(i=0)}let o=parseInt(String(this.timepickerVariables[e].selectedMinute),10),a=this.timePickerSeconds?parseInt(String(this.timepickerVariables[e].selectedSecond),10):0;return r.clone().hour(i).minute(o).second(a)}buildLocale(){this.locale=re(re({},this.localeHolderService.config),this.locale),this.locale.format||(this.timePicker?this.locale.format=nr.localeData().longDateFormat("lll"):this.locale.format=nr.localeData().longDateFormat("L"))}buildCells(r,e){for(let i=0;i<6;i++){this.calendarVariables[e].classes[i]={classList:""};let o=[];this.emptyWeekRowClass&&Array.from(Array(7).keys()).some(a=>r[i][a].month()!==this.calendarVariables[e].month)&&o.push(this.emptyWeekRowClass);for(let a=0;a<7;a++){let s=[];this.emptyWeekColumnClass&&r[i][a].month()!==this.calendarVariables[e].month&&s.push(this.emptyWeekColumnClass),r[i][a].isSame(nr().utc(!0),"day")&&s.push("today"),r[i][a].isoWeekday()>5&&s.push("weekend"),r[i][a].month()!==r[1][1].month()&&(s.push("off"),this.lastDayOfPreviousMonthClass&&(r[i][a].month()<r[1][1].month()||r[1][1].month()===0)&&r[i][a].date()===this.calendarVariables[e].daysInLastMonth&&s.push(this.lastDayOfPreviousMonthClass),this.firstDayOfNextMonthClass&&(r[i][a].month()>r[1][1].month()||r[i][a].month()===0)&&r[i][a].date()===1&&s.push(this.firstDayOfNextMonthClass)),this.firstMonthDayClass&&r[i][a].month()===r[1][1].month()&&r[i][a].date()===r.firstDay.date()&&s.push(this.firstMonthDayClass),this.lastMonthDayClass&&r[i][a].month()===r[1][1].month()&&r[i][a].date()===r.lastDay.date()&&s.push(this.lastMonthDayClass),this.minDate&&r[i][a].isBefore(this.minDate,"day")&&s.push("off","disabled"),this.calendarVariables[e].maxDate&&r[i][a].isAfter(this.calendarVariables[e].maxDate,"day")&&s.push("off","disabled"),this.isInvalidDate(r[i][a])&&s.push("off","disabled","invalid"),this.startDate&&r[i][a].format("YYYY-MM-DD")===this.startDate.format("YYYY-MM-DD")&&s.push("active","start-date"),this.endDate!=null&&r[i][a].format("YYYY-MM-DD")===this.endDate.format("YYYY-MM-DD")&&s.push("active","end-date"),(this.nowHoveredDate!=null&&this.pickingDate||this.endDate!=null)&&r[i][a]>this.startDate&&(r[i][a]<this.endDate||r[i][a]<this.nowHoveredDate&&this.pickingDate)&&!s.find(_=>_==="off")&&s.push("in-range");
34let c=this.isCustomDate(r[i][a]);c!==!1&&(typeof c=="string"?s.push(c):Array.prototype.push.apply(s,c));let u="",f=!1;for(let _ of s)u+=_+" ",_==="disabled"&&(f=!0);f||(u+="available"),this.calendarVariables[e].classes[i][a]=u.replace(/^\s+|\s+$/g,"")}this.calendarVariables[e].classes[i].classList=o.join(" ")}}}return n.\u0275fac=function(r){return new(r||n)(h(ge),h(Me),h(DE))},n.\u0275cmp=L({type:n,selectors:[["ngx-daterangepicker-material"]],viewQuery:function(r,e){if(r&1&&ae(nne,7),r&2){let i;Q(i=K())&&(e.pickerContainer=i.first)}},hostBindings:function(r,e){r&1&&T("click",function(o){return e.handleInternalClick(o)})},inputs:{startDate:"startDate",endDate:"endDate",dateLimit:"dateLimit",autoApply:"autoApply",singleDatePicker:"singleDatePicker",showDropdowns:"showDropdowns",showWeekNumbers:"showWeekNumbers",showISOWeekNumbers:"showISOWeekNumbers",linkedCalendars:"linkedCalendars",autoUpdateInput:"autoUpdateInput",alwaysShowCalendars:"alwaysShowCalendars",maxSpan:"maxSpan",lockStartDate:"lockStartDate",timePicker:"timePicker",timePicker24Hour:"timePicker24Hour",timePickerIncrement:"timePickerIncrement",timePickerSeconds:"timePickerSeconds",showClearButton:"showClearButton",firstMonthDayClass:"firstMonthDayClass",lastMonthDayClass:"lastMonthDayClass",emptyWeekRowClass:"emptyWeekRowClass",emptyWeekColumnClass:"emptyWeekColumnClass",firstDayOfNextMonthClass:"firstDayOfNextMonthClass",lastDayOfPreviousMonthClass:"lastDayOfPreviousMonthClass",showCustomRangeLabel:"showCustomRangeLabel",showCancel:"showCancel",keepCalendarOpeningWithRange:"keepCalendarOpeningWithRange",showRangeLabelOnInput:"showRangeLabelOnInput",customRangeDirection:"customRangeDirection",drops:"drops",opens:"opens",closeOnAutoApply:"closeOnAutoApply",minDate:"minDate",locale:"locale",ranges:"ranges",maxDate:"maxDate",isInvalidDate:"isInvalidDate",isCustomDate:"isCustomDate",isTooltipDate:"isTooltipDate"},outputs:{choosedDate:"choosedDate",rangeClicked:"rangeClicked",datesUpdated:"datesUpdated",startDateChanged:"startDateChanged",endD
34ateChanged:"endDateChanged",cancelClicked:"cancelClicked",clearClicked:"clearClicked"},features:[ne([{provide:ye,useExisting:he(()=>n),multi:!0}]),lt],decls:6,vars:15,consts:[["pickerContainer",""],[1,"md-drppicker",3,"ngClass"],[4,"ngIf"],["class","calendar",3,"ngClass",4,"ngIf"],["class","calendar right",4,"ngIf"],["class","buttons",4,"ngIf"],[1,"ranges"],[4,"ngFor","ngForOf"],["type","button",3,"click","disabled","ngClass"],[1,"calendar",3,"ngClass"],[1,"calendar-table"],["class","table-condensed",4,"ngIf"],["class","calendar-time",4,"ngIf"],[1,"table-condensed"],["colspan","5",1,"month","drp-animate"],[1,"week-days"],["class","week",4,"ngIf"],[1,"drp-animate"],[3,"class",4,"ngFor","ngForOf"],[1,"prev","available",3,"click"],[1,"dropdowns"],[1,"monthselect",3,"change"],[3,"disabled","value","selected",4,"ngFor","ngForOf"],[1,"yearselect",3,"change"],[3,"selected",4,"ngFor","ngForOf"],[3,"disabled","value","selected"],[3,"selected"],[1,"next","available",3,"click"],[1,"week"],[3,"class","click","mouseenter",4,"ngFor","ngForOf"],[3,"click","mouseenter"],[1,"calendar-time"],[1,"select"],[1,"hourselect","select-item",3,"ngModelChange","disabled","ngModel"],[3,"value","disabled",4,"ngFor","ngForOf"],[1,"select-item","minuteselect",3,"ngModelChange","disabled","ngModel"],[1,"select-highlight"],[1,"select-bar"],["class","select-item secondselect",3,"disabled","ngModel","ngModelChange",4,"ngIf"],["class","select-item ampmselect",3,"ngModel","ngModelChange",4,"ngIf"],[3,"value","disabled"],[1,"select-item","secondselect",3,"ngModelChange","disabled","ngModel"],[1,"select-item","ampmselect",3,"ngModelChange","ngModel"],["value","AM",3,"disabled"],["value","PM",3,"disabled"],[1,"calendar","right"],["colspan","5",1,"month"],[1,"select-item","hourselect",3,"ngModelChange","disabled","ngModel"],[1,"buttons"],[1,"buttons_input"],["class","btn btn-default clear","type","button",3,"title","click",4,"ngIf"],["class","btn btn-default","type","button",3,"click",4,"ngIf"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","btn-default","clear",3,"click","title"],["xmlns","http://www.w3.org/2000/svg","width","30","height","30","viewBox","0 -5 24 24"],["d","M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"],["type","button",1,"btn","btn-default",3,"click"]],template:function(r,e){r&1&&(d(0,"div",1,0),x(2,lne,4,1,"ng-container",2)(3,Ane,4,6,"div",3)(4,ere,4,2,"div",4)(5,nre,6,4,"div",5),p()),r&2&&(bt("drops-"+e.drops+"-"+e.opens),m("ngClass",wB(7,rne,e.locale.direction==="ltr",e.locale.direction==="rtl",e.isShown||e.inline,!e.isShown&&!e.inline,e.inline,!e.singleDatePicker&&e.showCalInRanges,e.rangesArray.length)),l(2),m("ngIf",e.rangesArray.length),l(),m("ngIf",e.showCalInRanges),l(),m("ngIf",e.showCalInRanges&&!e.singleDatePicker),l(),m("ngIf",!e.autoApply&&(!e.rangesArray.length||e.showCalInRanges&&!e.singleDatePicker)))},dependencies:[ac,ce,Ke,Pj,Rj,Oj,xe,eo],styles:[`.md-drppicker{position:absolute;font-family:Roboto,sans-serif;color:inherit;border-radius:4px;width:278px;padding:4px;margin-top:-10px;overflow:hidden;z-index:1000;font-size:14px;background-color:#fff;box-shadow:0 2px 4px #00000029,0 2px 8px #0000001f}.md-drppicker.double{width:auto}.md-drppicker.inline{position:relative;display:inline-block}.md-drppicker:before,.md-drppicker:after{position:absolute;display:inline-block;border-bottom-color:#0003;content:""}.md-drppicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.md-drppicker.openscenter:after{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.md-drppicker.single .ranges,.md-drppicker.single .calendar{float:none}.md-drppicker.shown{transform:scale(1);transition:all .1s ease-in-out;transform-origin:0 0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.md-drppicker.shown.drops-up-left{transform-origin:100% 100%}.md-drppicker.shown.drops-up-right{transform-origin:0 100%}.md-drppicker.shown.drops-down-left{transform-origin:100% 0}.md-drppicker.shown.drops-down-right{transform-origin:0 0}.md-drppicker.shown.drops-down-center{transform-origin:NaN%}.md-drppicker.shown.drops-up-center{transform-origin:50%}.md-drppicker.shown .calendar{display:block}.md-drppicker.hidden{transition:all .1s ease;transform:scale(0);transform-origin:0 0;
34cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.md-drppicker.hidden.drops-up-left{transform-origin:100% 100%}.md-drppicker.hidden.drops-up-right{transform-origin:0 100%}.md-drppicker.hidden.drops-down-left{transform-origin:100% 0}.md-drppicker.hidden.drops-down-right{transform-origin:0 0}.md-drppicker.hidden.drops-down-center{transform-origin:50% 0}.md-drppicker.hidden.drops-up-center{transform-origin:50% 100%}.md-drppicker.hidden .calendar{display:none}.md-drppicker .calendar{max-width:270px;margin:4px}.md-drppicker .calendar.single .calendar-table{border:none}.md-drppicker .calendar th,.md-drppicker .calendar td{padding:0;white-space:nowrap;text-align:center;min-width:32px}.md-drppicker .calendar th span,.md-drppicker .calendar td span{pointer-events:none}.md-drppicker .calendar-table{border:1px solid #fff;padding:4px;border-radius:4px;background-color:#fff}.md-drppicker table{width:100%;margin:0}.md-drppicker th{color:#988c8c}.md-drppicker td,.md-drppicker th{text-align:center;width:20px;height:20px;border-radius:4px;border:1px solid transparent;white-space:nowrap;cursor:pointer;height:2em;width:2em}.md-drppicker td.available.prev,.md-drppicker th.available.prev{display:block;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K);background-repeat:no-repeat;background-size:.5em;background-position:center;opacity:.8;transition:background-color .2s ease;border-radius:2em}.md-drppicker td.available.prev:hover,.md-drppicker th.available.prev:hover{margin:0}.md-drppicker td.available.next,.md-drppicker th.available.next{transform:rotate(180deg);display:block;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K);background-repeat:no-repeat;background-size:.5em;background-position:center;opacity:.8;transition:background-color .2s ease;border-radius:2em}.md-drppicker td.available.next:hover,.md-drppicker th.available.next:hover{margin:0;transform:rotate(180deg)}.md-drppicker td.available:hover,.md-drppicker th.available:hover{background-color:#eee;border-color:transparent;color:inherit;background-repeat:no-repeat;background-size:.5em;background-position:center;margin:.25em 0;opacity:.8;border-radius:2em;transform:scale(1);transition:all .45s cubic-bezier(.23,1,.32,1) 0ms}.md-drppicker td.week,.md-drppicker th.week{font-size:80%;color:#ccc}.md-drppicker td{margin:.25em 0;opacity:.8;transition:background-color .2s ease;border-radius:2em;transform:scale(1);transition:all .45s cubic-bezier(.23,1,.32,1) 0ms}.md-drppicker td.off,.md-drppicker td.off.in-range,.md-drppicker td.off.start-date,.md-drppicker td.off.end-date{background-color:#fff;border-color:transparent;color:#999}.md-drppicker td.in-range{background-color:#dde2e4;border-color:transparent;color:#000;border-radius:0}.md-drppicker td.start-date{border-radius:2em 0 0 2em}.md-drppicker td.end-date{border-radius:0 2em 2em 0}.md-drppicker td.start-date.end-date{border-radius:4px}.md-drppicker td.active{transition:background .3s ease-out;background:rgba(0,0,0,.1)}.md-drppicker td.active,.md-drppicker td.active:hover{background-color:#3f51b5;border-color:transparent;color:#fff}.md-drppicker th.month{width:auto}.md-drppicker td.disabled,.md-drppicker option.disabled{color:#999;cursor:not-allowed;text-decoration:line-through}.md-drppicker .dropdowns{background-repeat:no-repeat;background-size:10px;background-position-y:center;background-position-x:right;width:50px;background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDI1NSAyNTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI1NSAyNTU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8ZyBpZD0iYXJyb3ctZHJvcC1kb3duIj4KCQk8cG9seWdvbiBwb2ludHM9IjAsNjMuNzUgMTI3LjUsMTkxLjI1IDI1NSw2My43NSAgICIgZmlsbD0iIzk4OGM4YyIvPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=)}.md-drppicker .dropdowns select{display:inline-block;background-color:#ffffffe6;width:100%;padding:5px;border:1px solid #f2f2f2;border-radius:2px;height:3rem}.md-drppicker .dropdowns select.monthselect,.md-drppicker .dropdowns select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default}.md-drppicker .dropdowns select.hourselect,.md-drppicker .dropdowns select.minuteselect,.md-drppicker .dropdowns select.secondselect,.md-drppicker .dropdowns select.ampmselect{width:50px;margin:0 auto;background:#eee;border:1px solid #eee;padding:2px;outline:0;font-size:12px}.md-drppicker .dropdowns select.monthselect,.md-drppicker .dropdowns select.yearselect{cursor:pointer;opacity:0;position:absolute;top:0;left:0;margin:0;padding:0}.md-drppicker th.month>div{position:relative;display:inline-block}.md-drppicker .calendar-time{text-align:center;margin:4px auto 0;line-height:30px;position:relative}.md-drppicker .calendar-time .select{display:inline}.md-drppicker .calendar-time .select .select-item{display:inline-block;width:auto;position:relative;font-family:inherit;background-color:transparent;padding:10px 10px 10px 0;font-size:18px;border-radius:0;border:none;border-bottom:1px solid rgba(0,0,0,.12)}.md-drppicker .calendar-time .select .select-item:after{position:absolute;top:18px;right:10px;width:0;height:0;padding:0;content:"";border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(0,0,0,.12);pointer-events:none}.md-drppicker .calendar-time .select .select-item:focus{outline:none}.md-drppicker .calendar-time .select .select-item .select-label{color:#00000042;font-size:16px;font-weight:400;position:absolute;pointer-events:none;left:0;top:10px;transition:.2s ease all}.md-drppicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed}.md-drppicker .label-input{border:1px solid #ccc;border-radius:4px;color:#555;height:30px;line-height:30px;display:block;vertical-align:middle;margin:0 auto 5px;padding:0 0 0 28px;width:100%}.md-drppicker .label-input.active{border:1px solid #08c;border-radius:4px}.md-drppicker .md-drppicker_input{position:relative;padding:0 30px 0 0}.md-drppicker .md-drppicker_input i,.md-drppicker .md-drppicker_input svg{position:absolute;
34left:8px;top:8px}.md-drppicker.rtl .label-input{padding-right:28px;padding-left:6px}.md-drppicker.rtl .md-drppicker_input i,.md-drppicker.rtl .md-drppicker_input svg{left:auto;right:8px}.md-drppicker .show-ranges .drp-calendar.left{border-left:1px solid #ddd}.md-drppicker .ranges{float:none;text-align:left;margin:0}.md-drppicker .ranges ul{list-style:none;margin:0 auto;padding:0;width:100%}.md-drppicker .ranges ul li{font-size:12px}.md-drppicker .ranges ul li button{padding:8px 12px;width:100%;background:none;border:none;text-align:left;cursor:pointer}.md-drppicker .ranges ul li button.active{background-color:#3f51b5;color:#fff}.md-drppicker .ranges ul li button[disabled]{opacity:.3}.md-drppicker .ranges ul li button:active{background:transparent}.md-drppicker .ranges ul li:hover{background-color:#eee}.md-drppicker .show-calendar .ranges{margin-top:8px}.md-drppicker [hidden]{display:none}.md-drppicker .buttons{text-align:right;margin:0 5px 5px 0}.md-drppicker .btn{position:relative;overflow:hidden;border-width:0;outline:none;padding:0 6px;cursor:pointer;border-radius:2px;box-shadow:0 1px 4px #0009;background-color:#3f51b5;color:#ecf0f1;transition:background-color .4s;height:auto;text-transform:uppercase;line-height:36px;border:none}.md-drppicker .btn:hover,.md-drppicker .btn:focus{background-color:#3f51b5}.md-drppicker .btn>*{position:relative}.md-drppicker .btn span{display:block;padding:12px 24px}.md-drppicker .btn:before{content:"";position:absolute;top:50%;left:50%;display:block;width:0;padding-top:0;border-radius:100%;background-color:#ecf0f14d;transform:translate(-50%,-50%)}.md-drppicker .btn:active:before{width:120%;padding-top:120%;transition:width .2s ease-out,padding-top .2s ease-out}.md-drppicker .btn:disabled{opacity:.5}.md-drppicker .btn.btn-default{color:#000;background-color:#dcdcdc}.md-drppicker .clear{box-shadow:none;background-color:#fff!important}.md-drppicker .clear svg{color:#eb3232;fill:currentColor}@media (min-width: 564px){.md-drppicker{width:auto}.md-drppicker.single .calendar.left{clear:none}.md-drppicker.ltr{direction:ltr;text-align:left}.md-drppicker.ltr .calendar.left{clear:left}.md-drppicker.ltr .calendar.left .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.md-drppicker.ltr .calendar.right{margin-left:0}.md-drppicker.ltr .calendar.right .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.md-drppicker.ltr .left .md-drppicker_input,.md-drppicker.ltr .right .md-drppicker_input{padding-right:35px}.md-drppicker.ltr .calendar.left .calendar-table{padding-right:12px}.md-drppicker.ltr .ranges,.md-drppicker.ltr .calendar{float:left}.md-drppicker.rtl{direction:rtl;text-align:right}.md-drppicker.rtl .calendar.left{clear:right;margin-left:0}.md-drppicker.rtl .calendar.left .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.md-drppicker.rtl .calendar.right{margin-right:0}.md-drppicker.rtl .calendar.right .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.md-drppicker.rtl .left .md-drppicker_input,.md-drppicker.rtl .calendar.left .calendar-table{padding-left:12px}.md-drppicker.rtl .ranges,.md-drppicker.rtl .calendar{text-align:right;float:right}.drp-animate{transform:translate(0);transition:transform .2s ease,opacity .2s ease}.drp-animate.drp-picker-site-this{transition-timing-function:linear}.drp-animate.drp-animate-right{transform:translate(10%);opacity:0}.drp-animate.drp-animate-left{transform:translate(-10%);opacity:0}}@media (min-width: 730px){.md-drppicker .ranges{width:auto}.md-drppicker.ltr .ranges{float:left}.md-drppicker.rtl .ranges{float:right}.md-drppicker .calendar.left{clear:none!important}}
35`],encapsulation:2}),n})(),J6=(()=>{class n{constructor(r,e,i,o,a,s,c){this.viewContainerRef=r,this.ref=e,this.el=i,this.renderer=o,this.differs=a,this.localeHolderService=s,this.elementRef=c,this.onChange=new J,this.rangeClicked=new J,this.datesUpdated=new J,this.startDateChanged=new J,this.endDateChanged=new J,this.clearClicked=new J,this.dateLimit=null,this.showCancel=!1,this.lockStartDate=!1,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.closeOnAutoApply=!0,this.notForChangesProperty=["locale","endKey","startKey"],this.onChangeFn=Function.prototype,this.onTouched=Function.prototype,this.validatorChange=Function.prototype,this.localeHolder={},this.endKey="endDate",this.startKey="startDate",this.drops="down",this.opens="auto",r.clear();let u=r.createComponent(xP);this.picker=u.instance,this.picker.inline=!1}get disabled(){return this.disabledHolder}set startKey(r){r!==null?this.startKeyHolder=r:this.startKeyHolder="startDate"}get locale(){return this.localeHolder}set locale(r){this.localeHolder=re(re({},this.localeHolderService.config),r)}set endKey(r){r!==null?this.endKeyHolder=r:this.endKeyHolder="endDate"}get value(){return this.valueHolder||null}set value(r){this.valueHolder=r,this.onChangeFn(r),this.ref.markForCheck()}outsideClick(r){r.target&&(r.target.classList.contains("ngx-daterangepicker-action")||this.elementRef.nativeElement.contains(r.target)||this.hide())}hide(r){this.picker.hide(r)}onBlur(){this.onTouched()}inputChanged(r){if(r.target.tagName.toLowerCase()!=="input"||!r.target.value.length)return;let e=r.target.value.split(this.picker.locale.separator),i=null,o=null;e.length===2&&(i=nr(e[0],this.picker.locale.format),o=nr(e[1],this.picker.locale.format)),(this.singleDatePicker||i===null||o===null)&&(i=nr(r.target.value,this.picker.locale.format),o=i),!(!i.isValid()||!o.isValid())&&(this.picker.setStartDate(i),this.picker.setEndDate(o),this.picker.updateView())}open(r){this.disabled||(this.picker.show(r),setTimeout(()=>{this.setPosition()}))}ngOnInit(){this.picker.startDateChanged.asObservable().subscribe(r=>{this.startDateChanged.emit(r)}),this.picker.endDateChanged.asObservable().subscribe(r=>{this.endDateChanged.emit(r)}),this.picker.rangeClicked.asObservable().subscribe(r=>
35{this.rangeClicked.emit(r)}),this.picker.datesUpdated.asObservable().subscribe(r=>{this.datesUpdated.emit(r)}),this.picker.clearClicked.asObservable().subscribe(()=>{this.clearClicked.emit()}),this.picker.choosedDate.asObservable().subscribe(r=>{if(r){let e={[this.startKeyHolder]:r.startDate,[this.endKeyHolder]:r.endDate};this.value=e,this.onChange.emit(e),typeof r.chosenLabel=="string"&&(this.el.nativeElement.value=r.chosenLabel)}}),this.picker.firstMonthDayClass=this.firstMonthDayClass,this.picker.lastMonthDayClass=this.lastMonthDayClass,this.picker.emptyWeekRowClass=this.emptyWeekRowClass,this.picker.emptyWeekColumnClass=this.emptyWeekColumnClass,this.picker.firstDayOfNextMonthClass=this.firstDayOfNextMonthClass,this.picker.lastDayOfPreviousMonthClass=this.lastDayOfPreviousMonthClass,this.picker.drops=this.drops,this.picker.opens=this.opens,this.localeDiffer=this.differs.find(this.locale).create(),this.picker.closeOnAutoApply=this.closeOnAutoApply}ngOnChanges(r){for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&this.notForChangesProperty.indexOf(e)===-1&&(this.picker[e]=r[e].currentValue)}ngDoCheck(){this.localeDiffer&&this.localeDiffer.diff(this.locale)&&this.picker.updateLocale(this.locale)}toggle(r){this.picker.isShown?this.hide(r):this.open(r)}clear(){this.picker.clear()}writeValue(r){this.setValue(r)}registerOnChange(r){this.onChangeFn=r}registerOnTouched(r){this.onTouched=r}setDisabledState(r){this.disabledHolder=r}setPosition(){let r,e,i=this.picker.pickerContainer.nativeElement,o=this.el.nativeElement;if(this.drops&&this.drops==="up"?e=o.offsetTop-i.clientHeight+"px":e="auto",this.opens==="left")r={top:e,left:o.offsetLeft-i.clientWidth+o.clientWidth+"px",right:"auto"};else if(this.opens==="center")r={top:e,left:o.offsetLeft+o.clientWidth/2-i.clientWidth/2+"px",right:"auto"};else if(this.opens==="right")r={top:e,left:o.offsetLeft+"px",right:"auto"};else{let a=o.offsetLeft+o.clientWidth/2-i.clientWidth/2;a<0?r={top:e,left:o.offsetLeft+"px",right:"auto"}:r={top:e,left:a+"px",right:"auto"}}r&&(this.renderer.setStyle(i,"top",r.top),this.renderer.setStyle(i,"left",r.left),this.renderer.setStyle(i,"right",r.right))}setValue(r){r?(this.value=r,r[this.startKeyHolder]&&this.picker.setStartDate(r[this.startKeyHolder]),r[this.endKeyHolder]&&this.picker.setEndDate(r[this.endKeyHolder]),this.picker.calculateChosenLabel(),this.picker.chosenLabel&&(this.el.nativeElement.value=this.picker.chosenLabel)):this.picker.clear()}}return n.\u0275fac=function(r){return new(r||n)(h(ci),h(Me),h(ge),h(Ni),h(SB),h(DE),h(ge))},n.\u0275dir=_e({type:n,selectors:[["input","ngxDaterangepickerMd",""]],hostVars:1,hostBindings:function(r,e){r&1&&T("click",function(o){return e.outsideClick(o)},!1,hB)("keyup.esc",function(o){return e.hide(o)})("blur",function(){return e.onBlur()})("keyup",function(o){return e.inputChanged(o)})("click",function(o){return e.open(o)}),r&2&&lo("disabled",e.disabled)},inputs:{minDate:"minDate",maxDate:"maxDate",autoApply:"autoApply",alwaysShowCalendars:"alwaysShowCalendars",showCustomRangeLabel:"showCustomRangeLabel",linkedCalendars:"linkedCalendars",dateLimit:"dateLimit",singleDatePicker:"singleDatePicker",showWeekNumbers:"showWeekNumbers",showISOWeekNumbers:"showISOWeekNumbers",showDropdowns:"showDropdowns",isInvalidDate:"isInvalidDate",isCustomDate:"isCustomDate",isTooltipDate:"isTooltipDate",showClearButton:"showClearButton",customRangeDirection:"customRangeDirection",ranges:"ranges",opens:"opens",drops:"drops",firstMonthDayClass:"firstMonthDayClass",lastMonthDayClass:"lastMonthDayClass",emptyWeekRowClass:"emptyWeekRowClass",emptyWeekColumnClass:"emptyWeekColumnClass",firstDayOfNextMonthClass:"firstDayOfNextMonthClass",lastDayOfPreviousMonthClass:"lastDayOfPreviousMonthClass",keepCalendarOpeningWithRange:"keepCalendarOpeningWithRange",showRangeLabelOnInput:"showRangeLabelOnInput",showCancel:"showCancel",lockStartDate:"lockStartDate",timePicker:"timePicker",timePicker24Hour:"timePicker24Hour",timePickerIncrement:"timePickerIncrement",timePickerSeconds:"timePickerSeconds",closeOnAutoApply:"closeOnAutoApply",endKeyHolder:"endKeyHolder",startKey:"startKey",locale:"locale",endKey:"endKey"},outputs:{onChange:"change",rangeClicked:"rangeClicked",datesUpdated:"datesUpdated",startDateChanged:"startDateChanged",endD
35ateChanged:"endDateChanged",clearClicked:"clearClicked"},features:[ne([{provide:ye,useExisting:he(()=>n),multi:!0}]),lt]}),n})(),F_=(()=>{class n{constructor(){}static forRoot(r={}){return{ngModule:n,providers:[{provide:wP,useValue:r},{provide:DE,useClass:DE,deps:[wP]}]}}}return n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=Vt({type:n,declarations:[xP,J6],imports:[zi,Qd,Ou],exports:[xP,J6]}),n.\u0275inj=Nt({providers:[],imports:[[zi,Qd,Ou]]}),n})();y();var n$=["*"];function ore(n,t){if(n&1&&O(0,"div",0),n&2){let r=t.$index,e=b();m("ngStyle",e.gridRenderer.getGridColumnStyle(r))}}function are(n,t){if(n&1&&O(0,"div",1),n&2){let r=t.$index,e=b();m("ngStyle",e.gridRenderer.getGridRowStyle(r))}}function sre(n,t){if(n&1){let r=B();d(0,"div",8),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function lre(n,t){if(n&1){let r=B();d(0,"div",9),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function cre(n,t){if(n&1){let r=B();d(0,"div",10),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function dre(n,t){if(n&1){let r=B();d(0,"div",11),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function pre(n,t){if(n&1){let r=B();d(0,"div",12),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function mre(n,t){if(n&1){let r=B();d(0,"div",13),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function ure(n,t){if(n&1){let r=B();d(0,"div",14),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}function hre(n,t){if(n&1){let r=B();d(0,"div",15),T("mousedown",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))})("touchstart",function(i){D(r);let o=b();return M(o.resize.dragStartDelay(i))}),p()}}var Gr=function(n){return n.Fit="fit",n.ScrollVertical="scrollVertical",n.ScrollHorizontal="scrollHorizontal",n.Fixed="fixed",n.VerticalFixed="verticalFixed",n.HorizontalFixed="horizontalFixed",n}(Gr||{}),r$=function(n){return n.Always="always",n.OnDragAndResize="onDrag&Resize",n.None="none",n}(r$||{}),wo=function(n){return n.None="none",n.CompactUp="compactUp",n.CompactLeft="compactLeft",n.CompactUpAndLeft="compactUp&Left",n.CompactLeftAndUp="compactLeft&Up",n.CompactRight="compactRight",n.CompactUpAndRight="compactUp&Right",n.CompactRightAndUp="compactRight&Up",n.CompactDown="compactDown",n.CompactDownAndLeft="compactDown&Left",n.CompactLeftAndDown="compactLeft&Down",n.CompactDownAndRight="compactDown&Right",n.CompactRightAndDown="compactRight&Down",n}(wo||{}),fs=function(n){return n.LTR="ltr",n.RTL="rtl",n}(fs||{}),SP=class{constructor(t){this.gridster=t}destroy(){this.gridster=null}checkCompact(){this.gridster.$options.compactType!==wo.None&&(this.gridster.$options.compactType===wo.CompactUp?this.checkCompactMovement("y",-1):this.gridster.$options.compactType===wo.CompactLeft?this.checkCompactMovement("x",-1):this.gridster.$options.compactType===wo.CompactUpAndLeft?(this.checkCompactMovement("y",-1),this.checkCompactMovement("x",-1)):this.gridster.$options.compactType===wo.CompactLeftAndUp?(this.checkCompactMovement("x",-1),this.checkCompactMovement("y",-1)):this.gridster.$options.compactType===wo.CompactRight?this.checkCompactMovement("x",1):this.gridster.$options.compactType===wo.CompactUpAndRight?(this.checkCompactMovement("y",-1),this.checkCompactMovement("x",1)):this.gridster.$options.compactType===wo.CompactRightAndUp?(this.checkCompactMovement("x",1),this.checkCompactMovement("y",-1)):this.gridster.$options.compactType===wo.CompactDown?this.checkCompactMovement("y",1):this.gridster.$options.compactType===wo.CompactDownAndLeft?(this.checkCompactMovement("y",1),this.checkCompactMovement("x",-1)):this.gridster.$options.compactType===wo.CompactDownAndRight?(this.checkCompactMovement("y",1),this.checkCompactMovement("x",1)):this.gridster.$options.compactType===wo.CompactLeftAndDown?(this.checkCompactMovement("x",-1),this.checkCompactMovement("y",1)):this.gridster.$options.compactType===wo.CompactRightAndDown&&(this.checkCompactMovement("x",1),this.checkCompactMovement("y",1)))}checkCompactItem(t){this.gridster.$options.compactType!==wo.None&&(this.gridster.$options.compactType===wo.CompactUp?this.moveTillCollision(t,"y",-1):this.gridster.$options.compactType===wo.CompactLeft?this.moveTillCollision(t,"x",-1):this.gridster.$options.compactType===wo.CompactUpAndLeft?(this.moveTillCollision(t,"y",-1),this.moveTillCollision(t,"x",-1)):this.gridster.$options.compactType===wo.CompactLeftAndUp?(this.moveTillCollision(t,"x",-1),this.moveTillCollision(t,"y",-1)):this.gridster.$options.compactType===wo.CompactUpAndRight?(this.moveTillCollision(t,"y",-1),this.moveTillCollision(t,"x",1)):this.gridster.$options.compactType===wo.CompactDown?this.moveTillCollision(t,"y",1):this.gridster.$options.compactType===wo.CompactDownAndLeft?(this.moveTillCollision(t,"y",1),this.moveTillCollision(t,"x",-1)):this.gridster.$options.compactType===wo.CompactLeftAndDown?(this.moveTillCollision(t,"x",-1),this.moveTillCollision(t,"y",1)):this.gridster.$options.compactType===wo.CompactDownAndRight?(this.moveTillCollision(t,"y",1),this.moveTillCollision(t,"x",1)):this.gridster.$options.compactType===wo.CompactRightAndDown&&(this.moveTillCollision(t,"x",1),this.moveTillCollision(t,"y",1)))}checkCompactMovement(t,r){let e=!1;
35this.gridster.grid.forEach(i=>{i.$item.compactEnabled!==!1&&this.moveTillCollision(i.$item,t,r)&&(e=!0,i.item[t]=i.$item[t],i.itemChanged())}),e&&this.checkCompact()}moveTillCollision(t,r,e){return t[r]+=e,this.gridster.checkCollision(t)?(t[r]-=e,!1):(this.moveTillCollision(t,r,e),!0)}},fre={gridType:Gr.Fit,scale:1,fixedColWidth:250,fixedRowHeight:250,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,setGridSize:!1,compactType:wo.None,mobileBreakpoint:640,useBodyForBreakpoint:!1,allowMultiLayer:!1,defaultLayerIndex:0,maxLayerIndex:2,baseLayerIndex:1,minCols:1,maxCols:100,minRows:1,maxRows:100,defaultItemCols:1,defaultItemRows:1,maxItemCols:50,maxItemRows:50,minItemCols:1,minItemRows:1,minItemArea:1,maxItemArea:2500,addEmptyRowsCount:0,rowHeightRatio:1,margin:10,outerMargin:!0,outerMarginTop:null,outerMarginRight:null,outerMarginBottom:null,outerMarginLeft:null,useTransformPositioning:!0,scrollSensitivity:10,scrollSpeed:20,initCallback:void 0,destroyCallback:void 0,gridSizeChangedCallback:void 0,itemChangeCallback:void 0,itemResizeCallback:void 0,itemInitCallback:void 0,itemRemovedCallback:void 0,itemValidateCallback:void 0,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,enableOccupiedCellDrop:!1,emptyCellClickCallback:void 0,emptyCellContextMenuCallback:void 0,emptyCellDropCallback:void 0,emptyCellDragCallback:void 0,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!1,draggable:{delayStart:0,enabled:!1,ignoreContentClass:"gridster-item-content",ignoreContent:!1,dragHandleClass:"drag-handler",stop:void 0,start:void 0,dropOverItems:!1,dropOverItemsCallback:void 0},resizable:{delayStart:0,enabled:!1,handles:{s:!0,e:!0,n:!0,w:!0,se:!0,ne:!0,sw:!0,nw:!0},stop:void 0,start:void 0},swap:!0,swapWhileDragging:!1,pushItems:!1,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:r$.OnDragAndResize,disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!1,disableScrollHorizontal:!1,disableScrollVertical:!1,enableBoundaryControl:!1,disableAutoPositionOnConflict:!1,dirType:fs.LTR},Ds=class n{static merge(t,r,e){for(let i in r)r[i]!==void 0&&e.hasOwnProperty(i)&&(typeof r[i]=="object"?(i in t||(t[i]={}),t[i]=n.merge(t[i],r[i],e[i])):t[i]=r[i]);return t}static checkTouchEvent(t){t.clientX===void 0&&t.touches&&(t.touches&&t.touches.length?(t.clientX=t.touches[0].clientX,t.clientY=t.touches[0].clientY):t.changedTouches&&t.changedTouches.length&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY))}static checkContentClassForEvent(t,r){if(t.$options.draggable.ignoreContent){if(!n.checkDragHandleClass(r.target,r.currentTarget,t.$options.draggable.dragHandleClass,t.$options.draggable.ignoreContentClass))return!0}else if(n.checkContentClass(r.target,r.currentTarget,t.$options.draggable.ignoreContentClass))return!0;return!1}static checkContentClassForEmptyCellClickEvent(t,r){return n.checkContentClass(r.target,r.currentTarget,t.$options.draggable.ignoreContentClass)||n.checkContentClass(r.target,r.currentTarget,t.$options.draggable.dragHandleClass)}static checkDragHandleClass(t,r,e,i){if(!t||t===r)return!1;if(t.hasAttribute("class")){let o=t.getAttribute("class").split(" ");if(o.indexOf(e)>-1)return!0;if(o.indexOf(i)>-1)return!1}return n.checkDragHandleClass(t.parentNode,r,e,i)}static checkContentClass(t,r,e){return!t||t===r?!1:t.hasAttribute("class")&&t.getAttribute("class").split(" ").indexOf(e)>-1?!0:n.checkContentClass(t.parentNode,r,e)}static compareItems(t,r){return t.y>r.y?-1:t.y<r.y?1:t.x>r.x?-1:1}},TP=class{constructor(t){this.gridster=t,this.emptyCellClickCb=r=>{if(!this.gridster||this.gridster.movingItem||Ds.checkContentClassForEmptyCellClickEvent(this.gridster,r))return;let e=this.getValidItemFromEvent(r);e&&(this.gridster.options.emptyCellClickCallback&&this.gridster.options.emptyCellClickCallback(r,e),this.gridster.cdRef.markForCheck())},this.emptyCellContextMenuCb=r=>{if(this.gridster.movingItem||Ds.checkContentClassForEmptyCellClickEvent(this.gridster,r))return;r.preventDefault(),r.stopPropagation();let e=this.getValidItemFromEvent(r);e&&(this.gridster.options.emptyCellContextMenuCallback&&this.gridster.options.emptyCellContextMenuCallback(r,e),this.gridster.cdRef.markForCheck())},this.emptyCellDragDrop=r=>{let e=this.getValidItemFromEvent(r);e&&(this.gridster.options.emptyCellDropCallback&&this.gridster.options.emptyCellDropCallback(r,e),this.gridster.cdRef.markForCheck())},this.emptyCellDragOver=r=>{r.preventDefault(),r.stopPropagation();let e=this.getValidItemFromEvent(r);e?(r.dataTransfer&&(r.dataTransfer.dropEffect="move"),this.gridster.movingItem=e):(r.dataTransfer&&(r.dataTransfer.dropEffect="none"),this.gridster.movingItem=null),this.gridster.previewStyle()},this.emptyCellMouseDown=r=>{if(Ds.checkContentClassForEmptyCellClickEvent(this.gridster,r))return;r.preventDefault(),r.stopPropagation();let e=this.getValidItemFromEvent(r);!e||r.buttons!==1&&!(r instanceof TouchEvent)||(this.initialItem=e,this.gridster.movingItem=e,this.gridster.previewStyle(),this.gridster.zone.runOutsideAngular(()=>{this.removeWindowMousemoveListenerFn=this.gridster.renderer.listen("window","mousemove",this.emptyCellMouseMove),this.removeWindowTouchmoveListenerFn=this.gridster.renderer.listen("window","touchmove",this.emptyCellMouseMove)}),this.removeWindowMouseupListenerFn=this.gridster.renderer.listen("window","mouseup",this.emptyCellMouseUp),this.removeWindowTouchendListenerFn=this.gridster.renderer.listen("window","touchend",this.emptyCellMouseUp))},this.emptyCellMouseMove=r=>{r.preventDefault(),r.stopPropagation();let e=this.getValidItemFromEvent(r,this.initialItem);e&&(this.gridster.movingItem=e,this.gridster.previewStyle())},this.emptyCellMouseUp=r=>{this.removeWindowMousemoveListenerFn(),this.removeWindowTouchmoveListenerFn(),this.removeWindowMouseupListenerFn(),this.removeWindowTouchendListenerFn();let e=this.getValidItemFromEvent(r,this.initialItem);e&&(this.gridster.movingItem=e),this.gridster.options.emptyCellDragCallback&&this.gridster.movingItem&&this.gridster.options.emptyCellDragCallback(r,this.gridster.movingItem),setTimeout(()=>{this.initialItem=null,this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle())}),this.gridster.cdRef.markForCheck()}}destroy(){this.gridster.previewStyle&&this.gridster.previewStyle(),this.gridster.movingItem=null,this.initialItem=this.gridster=null,this.removeDocumentDragendListenerFn&&(this.removeDocumentDragendListenerFn(),this.removeDocumentDragendListenerFn=null)}updateOptions(){this.gridster.$options.enableEmptyCellClick&&!this.removeEmptyCellClickListenerFn&&this.gridster.options.emptyCellClickCallback?(this.removeEmptyCellClickListenerFn=this.gridster.renderer.listen(this.gridster.el,"click",this.emptyCellClickCb),this.removeEmptyCellTouchendListenerFn=this.gridster.renderer.listen(this.gridster.el,"touchend",this.emptyCellClickCb)):!this.gridster.$options.enableEmptyCellClick&&this.removeEmptyCellClickListenerFn&&this.removeEmptyCellTouchendListenerFn&&(this.removeEmptyCellClickListenerFn(),this.removeEmptyCellTouchendListenerFn(),this.removeEmptyCellClickListenerFn=null,this.removeEmptyCellTouchendListenerFn=null),this.gridster.$options.enableEmptyCellContextMenu&&!this.removeEmptyCellContextMenuListenerFn&&this.gridster.options.emptyCellContextMenuCallback?this.removeEmptyCellContextMenuListenerFn=this.gridster.renderer.listen(this.gridster.el,"contextmenu",this.emptyCellContextMenuCb):!this.gridster.$options.enableEmptyCellContextMenu&&this.removeEmptyCellContextMenuListenerFn&&(this.removeEmptyCellContextMenuListenerFn(),this.removeEmptyCellContextMenuListenerFn=null),this.gridster.$options.enableEmptyCellDrop&&!this.removeEmptyCellDropListenerFn&&this.gridster.options.emptyCellDropCallback?(this.removeEmptyCellDropListenerFn=this.gridster.renderer.listen(this.gridster.el,"drop",this.emptyCellDragDrop),this.gridster.zone.runOutsideAngular(()=>{this.removeEmptyCellDragoverListenerFn=this.gridster.renderer.listen(this.gridster.el,"dragover",this.emptyCellDragOver)}),this.removeDocumentDragendListenerFn=this.gridster.renderer.listen("document","dragend",()=>{this.gridster.movingItem=null,this.gridster.previewStyle()}
35)):!this.gridster.$options.enableEmptyCellDrop&&this.removeEmptyCellDropListenerFn&&this.removeEmptyCellDragoverListenerFn&&this.removeDocumentDragendListenerFn&&(this.removeEmptyCellDropListenerFn(),this.removeEmptyCellDragoverListenerFn(),this.removeDocumentDragendListenerFn(),this.removeEmptyCellDragoverListenerFn=null,this.removeEmptyCellDropListenerFn=null,this.removeDocumentDragendListenerFn=null),this.gridster.$options.enableEmptyCellDrag&&!this.removeEmptyCellMousedownListenerFn&&this.gridster.options.emptyCellDragCallback?(this.removeEmptyCellMousedownListenerFn=this.gridster.renderer.listen(this.gridster.el,"mousedown",this.emptyCellMouseDown),this.removeEmptyCellTouchstartListenerFn=this.gridster.renderer.listen(this.gridster.el,"touchstart",this.emptyCellMouseDown)):!this.gridster.$options.enableEmptyCellDrag&&this.removeEmptyCellMousedownListenerFn&&this.removeEmptyCellTouchstartListenerFn&&(this.removeEmptyCellMousedownListenerFn(),this.removeEmptyCellTouchstartListenerFn(),this.removeEmptyCellMousedownListenerFn=null,this.removeEmptyCellTouchstartListenerFn=null)}getPixelsX(t,r){let e=this.gridster.options.scale;return e?(t.clientX-r.left)/e+this.gridster.el.scrollLeft-this.gridster.gridRenderer.getLeftMargin():t.clientX+this.gridster.el.scrollLeft-r.left-this.gridster.gridRenderer.getLeftMargin()}getPixelsY(t,r){let e=this.gridster.options.scale;return e?(t.clientY-r.top)/e+this.gridster.el.scrollTop-this.gridster.gridRenderer.getTopMargin():t.clientY+this.gridster.el.scrollTop-r.top-this.gridster.gridRenderer.getTopMargin()}getValidItemFromEvent(t,r){t.preventDefault(),t.stopPropagation(),Ds.checkTouchEvent(t);let e=this.gridster.el.getBoundingClientRect(),i=this.getPixelsX(t,e),o=this.getPixelsY(t,e),a={x:this.gridster.pixelsToPositionX(i,Math.floor,!0),y:this.gridster.pixelsToPositionY(o,Math.floor,!0),cols:this.gridster.$options.defaultItemCols,rows:this.gridster.$options.defaultItemRows};if(r&&(a.cols=Math.min(Math.abs(r.x-a.x)+1,this.gridster.$options.emptyCellDragMaxCols),a.rows=Math.min(Math.abs(r.y-a.y)+1,this.gridster.$options.emptyCellDragMaxRows),r.x<a.x?a.x=r.x:r.x-a.x>this.gridster.$options.emptyCellDragMaxCols-1&&(a.x=this.gridster.movingItem?this.gridster.movingItem.x:0),r.y<a.y?a.y=r.y:r.y-a.y>this.gridster.$options.emptyCellDragMaxRows-1&&(a.y=this.gridster.movingItem?this.gridster.movingItem.y:0)),!(!this.gridster.$options.enableOccupiedCellDrop&&this.gridster.checkCollision(a)))return a}},EP=class{constructor(t){this.gridster=t,this.lastGridColumnStyles={},this.lastGridRowStyles={}}destroy(){this.gridster=null}updateItem(t,r,e){if(this.gridster.mobile)this.clearCellPosition(e,t),this.gridster.$options.keepFixedHeightInMobile?e.setStyle(t,"height",(r.rows-1)*this.gridster.$options.margin+r.rows*this.gridster.$options.fixedRowHeight+"px"):e.setStyle(t,"height",r.rows*this.gridster.curWidth/r.cols+"px"),this.gridster.$options.keepFixedWidthInMobile?e.setStyle(t,"width",this.gridster.$options.fixedColWidth+"px"):e.setStyle(t,"width",""),e.setStyle(t,"margin-bottom",this.gridster.$options.margin+"px"),e.setStyle(t,fs.LTR?"margin-right":"margin-left","");else{let i=this.gridster.curColWidth*r.x,o=this.gridster.curRowHeight*r.y,a=this.gridster.curColWidth*r.cols-this.gridster.$options.margin,s=this.gridster.curRowHeight*r.rows-this.gridster.$options.margin;this.setCellPosition(e,t,i,o),e.setStyle(t,"width",a+"px"),e.setStyle(t,"height",s+"px");let c=null,u=null;this.gridster.$options.outerMargin&&(this.gridster.rows===r.rows+r.y&&(this.gridster.$options.outerMarginBottom!==null?c=this.gridster.$options.outerMarginBottom+"px":c=this.gridster.$options.margin+"px"),this.gridster.columns===r.cols+r.x&&(this.gridster.$options.outerMarginBottom!==null?u=this.gridster.$options.outerMarginRight+"px":u=this.gridster.$options.margin+"px")),e.setStyle(t,"margin-bottom",c),e.setStyle(t,fs.LTR?"margin-right":"margin-left",u)}}updateGridster(){let t="",r="",e="",i="";if(this.gridster.$options.gridType===Gr.Fit)t=Gr.Fit,r=Gr.ScrollVertical,e=Gr.ScrollHorizontal,i=Gr.Fixed;else if(this.gridster.$options.gridType===Gr.ScrollVertical)this.gridster.curRowHeight=this.gridster.curColWidth*this.gridster.$options.rowHeightRatio,t=Gr.ScrollVertical,r=Gr.Fit,e=Gr.ScrollHorizontal,i=Gr.Fixed;else if(this.gridster.$options.gridType===Gr.ScrollHorizontal){let o=this.gridster.$options.rowHeightRatio,a=o>=1?o:o+1;this.gridster.curColWidth=this.gridster.curRowHeight*a,t=Gr.ScrollHorizontal,r=Gr.Fit,e=Gr.ScrollVertical,i=Gr.Fixed}else this.gridster.$options.gridType===Gr.Fixed?(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=Gr.Fixed,r=Gr.Fit,e=Gr.ScrollVertical,i=Gr.ScrollHorizontal):this.gridster.$options.gridType===Gr.VerticalFixed?(this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=Gr.ScrollVertical,r=Gr.Fit,e=Gr.ScrollHorizontal,i=Gr.Fixed):this.gridster.$options.gridType===Gr.HorizontalFixed&&(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=Gr.ScrollHorizontal,r=Gr.Fit,e=Gr.ScrollVertical,i=Gr.Fixed);this.gridster.mobile||this.gridster.$options.setGridSize&&this.gridster.$options.gridType!==Gr.Fit?this.gridster.renderer.removeClass(this.gridster.el,t):this.gridster.renderer.addClass(this.gridster.el,t),this.gridster.renderer.removeClass(this.gridster.el,r),this.gridster.renderer.removeClass(this.gridster.el,e),this.gridster.renderer.removeClass(this.gridster.el,i)}getGridColumnStyle(t){let r={left:this.gridster.curColWidth*t,width:this.gridster.curColWidth-this.gridster.$options.margin,height:this.gridster.gridRows.length*this.gridster.curRowHeight-this.gridster.$options.margin,style:{}};r.style=Lt(re({},this.getLeftPosition(r.left)),{width:r.width+"px",height:r.height+"px"});let e=this.lastGridColumnStyles[t];return e&&e.left===r.left&&e.width===r.width&&e.height===r.height?e.style:(this.lastGridColumnStyles[t]=r,r.style)}
35getGridRowStyle(t){let r={top:this.gridster.curRowHeight*t,width:this.gridster.gridColumns.length*this.gridster.curColWidth+this.gridster.$options.margin,height:this.gridster.curRowHeight-this.gridster.$options.margin,style:{}};r.style=Lt(re({},this.getTopPosition(r.top)),{width:r.width+"px",height:r.height+"px"});let e=this.lastGridRowStyles[t];return e&&e.top===r.top&&e.width===r.width&&e.height===r.height?e.style:(this.lastGridRowStyles[t]=r,r.style)}getLeftPosition(t){let r=this.gridster.$options.dirType===fs.RTL?-t:t;return this.gridster.$options.useTransformPositioning?{transform:"translateX("+r+"px)"}:{left:this.getLeftMargin()+r+"px"}}getTopPosition(t){return this.gridster.$options.useTransformPositioning?{transform:"translateY("+t+"px)"}:{top:this.getTopMargin()+t+"px"}}clearCellPosition(t,r){this.gridster.$options.useTransformPositioning?t.setStyle(r,"transform",""):(t.setStyle(r,"top",""),t.setStyle(r,"left",""))}setCellPosition(t,r,e,i){let o=this.gridster.$options.dirType===fs.RTL?-e:e;if(this.gridster.$options.useTransformPositioning){let a="translate3d("+o+"px, "+i+"px, 0)";t.setStyle(r,"transform",a)}else t.setStyle(r,"left",this.getLeftMargin()+o+"px"),t.setStyle(r,"top",this.getTopMargin()+i+"px")}getLeftMargin(){return this.gridster.$options.outerMargin?this.gridster.$options.outerMarginLeft!==null?this.gridster.$options.outerMarginLeft:this.gridster.$options.margin:0}getTopMargin(){return this.gridster.$options.outerMargin?this.gridster.$options.outerMarginTop!==null?this.gridster.$options.outerMarginTop:this.gridster.$options.margin:0}},gre=(()=>{let t=class t{constructor(e,i){this.renderer=i,this.el=e.nativeElement}ngOnInit(){this.sub=this.previewStyle$.subscribe(e=>this.previewStyle(e))}ngOnDestroy(){this.sub&&this.sub.unsubscribe()}previewStyle(e){e?(this.renderer.setStyle(this.el,"display","block"),this.gridRenderer.updateItem(this.el,e,this.renderer)):this.renderer.setStyle(this.el,"display","")}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ni))},t.\u0275cmp=L({type:t,selectors:[["gridster-preview"]],inputs:{previewStyle$:"previewStyle$",gridRenderer:"gridRenderer"},standalone:!0,features:[ot],decls:0,vars:0,template:function(i,o){},styles:[`gridster-preview{position:absolute;display:none;background:#00000026}
36`],encapsulation:2});let n=t;return n})(),IP=(()=>{let t=class t{constructor(e,i,o,a){this.renderer=i,this.cdRef=o,this.zone=a,this.columns=0,this.rows=0,this.gridColumns=[],this.gridRows=[],this.previewStyle$=new J,this.calculateLayout$=new Te,this.resize$=new Te,this.destroy$=new Te,this.optionsChanged=()=>{this.setOptions();let s=this.grid.length-1,c;for(;s>=0;s--)c=this.grid[s],c.updateOptions();this.calculateLayout()},this.onResize=()=>{this.el.clientWidth&&(this.options.setGridSize&&(this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height","")),this.setGridSize(),this.calculateLayout())},this.getNextPossiblePosition=(s,c={})=>{s.cols===-1&&(s.cols=this.$options.defaultItemCols),s.rows===-1&&(s.rows=this.$options.defaultItemRows),this.setGridDimensions();let u=c.y||0,f;for(;u<this.rows;u++)for(s.y=u,f=c.x||0;f<this.columns;f++)if(s.x=f,!this.checkCollision(s))return!0;let _=this.$options.maxRows>=this.rows+s.rows,I=this.$options.maxCols>=this.columns+s.cols;return!(this.rows<=this.columns&&_)&&I?(s.x=this.columns,s.y=0,!0):_?(s.y=this.rows,s.x=0,!0):!1},this.getFirstPossiblePosition=s=>{let c=Object.assign({},s);return this.getNextPossiblePosition(c),c},this.getLastPossiblePosition=s=>{let c={y:0,x:0};c=this.grid.reduce((f,_)=>{let I={y:_.$item.y+_.$item.rows-1,x:_.$item.x+_.$item.cols-1};return Ds.compareItems(f,I)===1?I:f},c);let u=Object.assign({},s);return this.getNextPossiblePosition(u,c),u},this.el=e.nativeElement,this.$options=JSON.parse(JSON.stringify(fre)),this.mobile=!1,this.curWidth=0,this.curHeight=0,this.grid=[],this.curColWidth=0,this.curRowHeight=0,this.dragInProgress=!1,this.emptyCell=new TP(this),this.compact=new SP(this),this.gridRenderer=new EP(this)}static checkCollisionTwoItemsForSwaping(e,i){let o=e.cols===1?0:1,a=i.cols===1?0:1,s=e.rows===1?0:1,c=i.rows===1?0:1;
36return e.x+o<i.x+i.cols&&e.x+e.cols>i.x+a&&e.y+s<i.y+i.rows&&e.y+e.rows>i.y+c}checkCollisionTwoItems(e,i){if(!(e.x<i.x+i.cols&&e.x+e.cols>i.x&&e.y<i.y+i.rows&&e.y+e.rows>i.y))return!1;if(!this.$options.allowMultiLayer)return!0;let a=this.$options.defaultLayerIndex,s=e.layerIndex===void 0?a:e.layerIndex,c=i.layerIndex===void 0?a:i.layerIndex;return s===c}ngOnInit(){this.options.initCallback&&this.options.initCallback(this),this.calculateLayout$.pipe(Wi(0),Be(this.destroy$)).subscribe(()=>this.calculateLayout()),this.resize$.pipe(ii(()=>ls(100)),Be(this.destroy$)).subscribe(()=>this.resize())}ngOnChanges(e){e.options&&(this.setOptions(),this.options.api={optionsChanged:this.optionsChanged,resize:this.onResize,getNextPossiblePosition:this.getNextPossiblePosition,getFirstPossiblePosition:this.getFirstPossiblePosition,getLastPossiblePosition:this.getLastPossiblePosition,getItemComponent:i=>this.getItemComponent(i)},this.columns=this.$options.minCols,this.rows=this.$options.minRows+this.$options.addEmptyRowsCount,this.setGridSize(),this.calculateLayout())}resize(){let e,i;this.$options.gridType==="fit"&&!this.mobile?(i=this.el.offsetWidth,e=this.el.offsetHeight):(i=this.el.clientWidth,e=this.el.clientHeight),(i!==this.curWidth||e!==this.curHeight)&&this.checkIfToResize()&&this.onResize()}setOptions(){this.$options=Ds.merge(this.$options,this.options,this.$options),!this.$options.disableWindowResize&&!this.windowResize?this.windowResize=this.renderer.listen("window","resize",this.onResize):this.$options.disableWindowResize&&this.windowResize&&(this.windowResize(),this.windowResize=null),this.emptyCell.updateOptions()}ngOnDestroy(){this.destroy$.next(),this.previewStyle$.complete(),this.windowResize&&this.windowResize(),this.options&&this.options.destroyCallback&&this.options.destroyCallback(this),this.options&&this.options.api&&(this.options.api.resize=void 0,this.options.api.optionsChanged=void 0,this.options.api.getNextPossiblePosition=void 0,this.options.api=void 0),this.emptyCell.destroy(),this.emptyCell=null,this.compact.destroy(),this.compact=null}checkIfToResize(){let e=this.el.clientWidth,i=this.el.offsetWidth,o=this.el.scrollWidth,a=this.el.clientHeight,s=this.el.offsetHeight,c=this.el.scrollHeight,u=e<i&&c>s&&c-s<i-e,f=a<s&&o>i&&o-i<s-a;return u?!1:!f}checkIfMobile(){return this.$options.useBodyForBreakpoint?this.$options.mobileBreakpoint>document.body.clientWidth:this.$options.mobileBreakpoint>this.curWidth}setGridSize(){let e=this.el,i,o;this.$options.setGridSize||this.$options.gridType===Gr.Fit&&!this.mobile?(i=e.offsetWidth,o=e.offsetHeight):(i=e.clientWidth,o=e.clientHeight),this.curWidth=i,this.curHeight=o}setGridDimensions(){this.setGridSize(),!this.mobile&&this.checkIfMobile()?(this.mobile=!this.mobile,this.renderer.addClass(this.el,"mobile")):this.mobile&&!this.checkIfMobile()&&(this.mobile=!this.mobile,this.renderer.removeClass(this.el,"mobile"));let e=this.$options.minRows,i=this.$options.minCols,o=this.grid.length-1,a;for(;o>=0;o--)a=this.grid[o],a.notPlaced||(e=Math.max(e,a.$item.y+a.$item.rows),i=Math.max(i,a.$item.x+a.$item.cols));e+=this.$options.addEmptyRowsCount,(this.columns!==i||this.rows!==e)&&(this.columns=i,this.rows=e,this.options.gridSizeChangedCallback&&this.options.gridSizeChangedCallback(this))}calculateLayout(){if(this.compact&&this.compact.checkCompact(),this.setGridDimensions(),this.$options.outerMargin){let o=-this.$options.margin;this.$options.outerMarginLeft!==null?(o+=this.$options.outerMarginLeft,this.renderer.setStyle(this.el,"padding-left",this.$options.outerMarginLeft+"px")):(o+=this.$options.margin,this.renderer.setStyle(this.el,"padding-left",this.$options.margin+"px")),this.$options.outerMarginRight!==null?(o+=this.$options.outerMarginRight,this.renderer.setStyle(this.el,"padding-right",this.$options.outerMarginRight+"px")):(o+=this.$options.margin,this.renderer.setStyle(this.el,"padding-right",this.$options.margin+"px")),this.curColWidth=(this.curWidth-o)/this.columns;let a=-this.$options.margin;this.$options.outerMarginTop!==null?(a+=this.$options.outerMarginTop,this.renderer.setStyle(this.el,"padding-top",this.$options.outerMarginTop+"px")):(a+=this.$options.margin,this.renderer.setStyle(this.el,"padding-top",this.$options.margin+"px")),this.$options.outerMarginBottom!==null?(a+=this.$options.outerMarginBottom,this.renderer.setStyle(this.el,"padding-bottom",this.$options.outerMarginBottom+"px")):(a+=this.$options.margin,this.renderer.setStyle(this.el,"padding-bottom",this.$options.margin+"px")),this.curRowHeight=(this.curHeight-a)/this.rows*this.$options.rowHeightRatio}
36else this.curColWidth=(this.curWidth+this.$options.margin)/this.columns,this.curRowHeight=(this.curHeight+this.$options.margin)/this.rows*this.$options.rowHeightRatio,this.renderer.setStyle(this.el,"padding-left","0px"),this.renderer.setStyle(this.el,"padding-right","0px"),this.renderer.setStyle(this.el,"padding-top","0px"),this.renderer.setStyle(this.el,"padding-bottom","0px");this.gridRenderer.updateGridster(),this.$options.setGridSize?(this.renderer.addClass(this.el,"gridSize"),this.mobile||(this.renderer.setStyle(this.el,"width",this.columns*this.curColWidth+this.$options.margin+"px"),this.renderer.setStyle(this.el,"height",this.rows*this.curRowHeight+this.$options.margin+"px"))):(this.renderer.removeClass(this.el,"gridSize"),this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height","")),this.updateGrid();let e=this.grid.length-1,i;for(;e>=0;e--)i=this.grid[e],i.setSize(),i.drag.toggle(),i.resize.toggle();this.resize$.next()}updateGrid(){this.$options.displayGrid==="always"&&!this.mobile?this.renderer.addClass(this.el,"display-grid"):this.$options.displayGrid==="onDrag&Resize"&&this.dragInProgress?this.renderer.addClass(this.el,"display-grid"):(this.$options.displayGrid==="none"||!this.dragInProgress||this.mobile)&&this.renderer.removeClass(this.el,"display-grid"),this.setGridDimensions(),this.gridColumns.length=t.getNewArrayLength(this.columns,this.curWidth,this.curColWidth),this.gridRows.length=t.getNewArrayLength(this.rows,this.curHeight,this.curRowHeight),this.cdRef.markForCheck()}addItem(e){e.$item.cols===void 0&&(e.$item.cols=this.$options.defaultItemCols,e.item.cols=e.$item.cols,e.itemChanged()),e.$item.rows===void 0&&(e.$item.rows=this.$options.defaultItemRows,e.item.rows=e.$item.rows,e.itemChanged()),e.$item.x===-1||e.$item.y===-1?this.autoPositionItem(e):this.checkCollision(e.$item)&&(this.$options.disableWarnings||(e.notPlaced=!0,console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n"+JSON.stringify(e.item,["cols","rows","x","y"]))),this.$options.disableAutoPositionOnConflict?e.notPlaced=!0:this.autoPositionItem(e)),this.grid.push(e),this.calculateLayout$.next()}removeItem(e){this.grid.splice(this.grid.indexOf(e),1),this.calculateLayout$.next(),this.options.itemRemovedCallback&&this.options.itemRemovedCallback(e.item,e)}checkCollision(e){let i=!1;if(this.options.itemValidateCallback&&(i=!this.options.itemValidateCallback(e)),!i&&this.checkGridCollision(e)&&(i=!0),!i){let o=this.findItemWithItem(e);o&&(i=o)}return i}checkGridCollision(e){let i=e.y>-1&&e.x>-1,o=e.cols+e.x<=this.$options.maxCols,a=e.rows+e.y<=this.$options.maxRows,s=e.maxItemCols===void 0?this.$options.maxItemCols:e.maxItemCols,c=e.minItemCols===void 0?this.$options.minItemCols:e.minItemCols,u=e.maxItemRows===void 0?this.$options.maxItemRows:e.maxItemRows,f=e.minItemRows===void 0?this.$options.minItemRows:e.minItemRows,_=e.cols<=s&&e.cols>=c,I=e.rows<=u&&e.rows>=f,S=e.minItemArea===void 0?this.$options.minItemArea:e.minItemArea,F=e.maxItemArea===void 0?this.$options.maxItemArea:e.maxItemArea,H=e.cols*e.rows,q=S<=H,ee=F>=H;return!(i&&o&&a&&_&&I&&q&&ee)}findItemWithItem(e){let i=0,o;for(;i<this.grid.length;i++)if(o=this.grid[i],o.$item!==e&&this.checkCollisionTwoItems(o.$item,e))return o;return!1}findItemsWithItem(e){let i=[],o=0,a;for(;o<this.grid.length;o++)a=this.grid[o],a.$item!==e&&this.checkCollisionTwoItems(a.$item,e)&&i.push(a);return i}autoPositionItem(e){this.getNextPossiblePosition(e.$item)?(e.notPlaced=!1,e.item.x=e.$item.x,e.item.y=e.$item.y,e.itemChanged()):(e.notPlaced=!0,this.$options.disableWarnings||console.warn("Can't be placed in the bounds of the dashboard!/n"+JSON.stringify(e.item,["cols","rows","x","y"])))}pixelsToPositionX(e,i,o){let a=i(e/this.curColWidth);return o?a:Math.max(a,0)}pixelsToPositionY(e,i,o){let a=i(e/this.curRowHeight);return o?a:Math.max(a,0)}positionXToPixels(e){return e*this.curColWidth}positionYToPixels(e){return e*this.curRowHeight}getItemComponent(e){return this.grid.find(i=>i.item===e)}checkCollisionForSwaping(e){let i=!1;if(this.options.itemValidateCallback&&(i=!this.options.itemValidateCallback(e)),!i&&this.checkGridCollision(e)&&(i=!0),!i){let o=this.findItemWithItemForSwapping(e);o&&(i=o)}return i}findItemWithItemForSwapping(e){let i=this.grid.length-1,o;for(;i>-1;i--)if(o=this.grid[i],o.$item!==e&&t.checkCollisionTwoItemsForSwaping(o.$item,e))return o;return!1}previewStyle(e=!1){this.movingItem?(this.compact&&e&&this.compact.checkCompactItem(this.movingItem),this.previewStyle$.next(this.movingItem)):this.previewStyle$.next(null)}static getNewArrayLength(e,i,o){let a=Math.max(e,Math.floor(i/o));return a<0?0:Number.isFinite(a)?Math.floor(a):0}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ni),h(Me),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["gridster"]],inputs:{options:"options"},standalone:!0,features:[lt,ot],ngContentSelectors:n$,decls:6,vars:2,consts:[[1,"gridster-column",3,"ngStyle"],[1,"gridster-row",3,"ngStyle"],[1,"gridster-preview",3,"gridRenderer","previewStyle$"]],template:function(i,o){i&1&&(Ct(
36),Ir(0,ore,1,1,"div",0,c2),Ir(2,are,1,1,"div",1,c2),Fe(4),O(5,"gridster-preview",2)),i&2&&(kr(o.gridColumns),l(2),kr(o.gridRows),l(3),m("gridRenderer",o.gridRenderer)("previewStyle$",o.previewStyle$))},dependencies:[xu,gre],styles:[`gridster{position:relative;box-sizing:border-box;background:gray;width:100%;height:100%;-webkit-user-select:none;user-select:none;display:block}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster.gridSize{height:initial;width:initial}gridster.gridSize.fit{height:100%;width:100%}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid white;border-right:1px solid white}gridster .gridster-row{border-top:1px solid white;border-bottom:1px solid white}
37`],encapsulation:2});let n=t;return n})(),ME=class{constructor(t){this.iteration=0,this.pushedItems=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],this.pushedItemsPath=[],this.gridsterItem=t,this.gridster=t.gridster,this.tryPattern={fromEast:[this.tryWest,this.trySouth,this.tryNorth,this.tryEast],fromWest:[this.tryEast,this.trySouth,this.tryNorth,this.tryWest],fromNorth:[this.trySouth,this.tryEast,this.tryWest,this.tryNorth],fromSouth:[this.tryNorth,this.tryEast,this.tryWest,this.trySouth]},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}destroy(){this.gridster=this.gridsterItem=null}pushItems(t,r){if(this.gridster.$options.pushItems&&!r){this.pushedItemsOrder=[],this.iteration=0;let e=this.push(this.gridsterItem,t);return e||this.restoreTempItems(),this.pushedItemsOrder=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],e}else return!1}restoreTempItems(){let t=this.pushedItemsTemp.length-1;for(;t>-1;t--)this.removeFromTempPushed(this.pushedItemsTemp[t])}restoreItems(){let t=0,r=this.pushedItems.length,e;for(;t<r;t++)e=this.pushedItems[t],e.$item.x=e.item.x||0,e.$item.y=e.item.y||0,e.setSize();this.pushedItems=[],this.pushedItemsPath=[]}setPushedItems(){let t=0,r=this.pushedItems.length,e;for(;t<r;t++)e=this.pushedItems[t],e.checkItemChanges(e.$item,e.item);this.pushedItems=[],this.pushedItemsPath=[]}checkPushBack(){let t=this.pushedItems.length-1,r=!1;for(;t>-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(r=!0);r&&this.checkPushBack()}push(t,r){if(this.iteration>100)return console.warn("max iteration reached"),!1;if(this.gridster.checkGridCollision(t.$item)||r==="")return!1;let e=this.gridster.findItemsWithItem(t.$item),i=r===this.fromNorth||r===this.fromWest;e.sort((u,f)=>i?f.$item.y-u.$item.y||f.$item.x-u.$item.x:u.$item.y-f.$item.y||u.$item.x-f.$item.x);let o=0,a,s=!0,c=[];for(;o<e.length;o++){if(a=e[o],a===this.gridsterItem)continue;if(!a.canBeDragged()){s=!1;break}let u=this.pushedItemsTemp.indexOf(a);if(u>-1&&this.pushedItemsTempPath[u].length>10){s=!1;break}if(this.tryPattern[r][0].call(this,a,t))this.pushedItemsOrder.push(a),c.push(a);else if(this.tryPattern[r][1].call(this,a,t))this.pushedItemsOrder.push(a),c.push(a);else if(this.tryPattern[r][2].call(this,a,t))this.pushedItemsOrder.push(a),c.push(a);else if(this.tryPattern[r][3].call(this,a,t))this.pushedItemsOrder.push(a),c.push(a);else{s=!1;break}}if(!s&&(o=this.pushedItemsOrder.lastIndexOf(c[0]),o>-1)){let u=this.pushedItemsOrder.length-1;for(;u>=o;u--)a=this.pushedItemsOrder[u],this.pushedItemsOrder.pop(),this.removeFromTempPushed(a),this.removeFromPushedItem(a)}return this.iteration++,s}trySouth(t,r){return this.gridster.$options.pushDirections.south?(this.addToTempPushed(t),t.$item.y=r.$item.y+r.$item.rows,this.push(t,this.fromNorth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1)):!1}tryNorth(t,r){return this.gridster.$options.pushDirections.north?(this.addToTempPushed(t),t.$item.y=r.$item.y-t.$item.rows,this.push(t,this.fromSouth)?(t.
37setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1)):!1}tryEast(t,r){return this.gridster.$options.pushDirections.east?(this.addToTempPushed(t),t.$item.x=r.$item.x+r.$item.cols,this.push(t,this.fromWest)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1)):!1}tryWest(t,r){return this.gridster.$options.pushDirections.west?(this.addToTempPushed(t),t.$item.x=r.$item.x-t.$item.cols,this.push(t,this.fromEast)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1)):!1}addToTempPushed(t){let r=this.pushedItemsTemp.indexOf(t);r===-1&&(r=this.pushedItemsTemp.push(t)-1,this.pushedItemsTempPath[r]=[]),this.pushedItemsTempPath[r].push({x:t.$item.x,y:t.$item.y})}removeFromTempPushed(t){let r=this.pushedItemsTemp.indexOf(t),e=this.pushedItemsTempPath[r].pop();e&&(t.$item.x=e.x,t.$item.y=e.y,t.setSize(),this.pushedItemsTempPath[r].length||(this.pushedItemsTemp.splice(r,1),this.pushedItemsTempPath.splice(r,1)))}addToPushed(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0},{x:t.$item.x,y:t.$item.y}]);else{let r=this.pushedItems.indexOf(t);this.pushedItemsPath[r].push({x:t.$item.x,y:t.$item.y})}}removeFromPushed(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))}removeFromPushedItem(t){let r=this.pushedItems.indexOf(t);r>-1&&(this.pushedItemsPath[r].pop(),this.pushedItemsPath.length||(this.pushedItems.splice(r,1),this.pushedItemsPath.splice(r,1)))}checkPushedItem(t,r){let e=this.pushedItemsPath[r],i=e.length-2,o,a,s,c=!1;for(;i>-1;i--)o=e[i],a=t.$item.x,s=t.$item.y,t.$item.x=o.x,t.$item.y=o.y,this.gridster.findItemWithItem(t.$item)?(t.$item.x=a,t.$item.y=s):(t.setSize(),e.splice(i+1,e.length-i-1),c=!0);return e.length<2&&this.removeFromPushed(r),c}},Ew,Jf,o$=50,xc,Iw,Sm,kw,Dw,Mw,Aw;function a$(n,t,r,e,i,o,a,s,c,u){Ew=n.$options.scrollSensitivity,Jf=n.$options.scrollSpeed,xc=n.el,Iw=c,Sm=u;let f=xc.offsetWidth,_=xc.offsetHeight,I=xc.scrollLeft,S=xc.scrollTop,F=r-S,H=_+S-r-i,{clientX:q,clientY:ee}=o;if(!n.$options.disableScrollVertical)if(a.clientY<ee&&H<Ew){if(p$(),Iw&&Sm&&!Sm.south||Aw)return;Aw=e$(1,s,a)}else if(a.clientY>ee&&S>0&&F<Ew){if(d$(),Iw&&Sm&&!Sm.north||Mw)return;Mw=e$(-1,s,a)}else a.clientY!==ee&&PP();let Ie=I+f-t-e,He=t-I;if(!n.$options.disableScrollHorizontal)if(a.clientX<q&&Ie<=Ew){if(c$(),Iw&&Sm&&!Sm.east||kw)return;kw=t$(1,s,a)}else if(a.clientX>q&&I>0&&He<Ew){if(l$(),Iw&&Sm&&!Sm.west||Dw)return;Dw=t$(-1,s,a)}else a.clientX!==q&&OP()}function e$(n,t,r){let e=r.clientY;return window.setInterval(()=>{(!xc||n===-1&&xc.scrollTop-Jf<0)&&PP(),xc.scrollTop+=n*Jf,e+=n*Jf,t({clientX:r.clientX,clientY:e})},o$)}function t$(n,t,r){let e=r.clientX;return window.setInterval(()=>{(!xc||n===-1&&xc.scrollLeft-Jf<0)&&OP(),xc.scrollLeft+=n*Jf,e+=n*Jf,t({clientX:e,clientY:r.clientY})},o$)}function s$(){OP(),PP(),xc=null}function OP(){l$(),c$()}function PP(){p$(),d$()}function l$(){kw&&(clearInterval(kw),kw=0)}function c$(){Dw&&(clearInterval(Dw),Dw=0)}function d$(){Aw&&(clearInterval(Aw),Aw=0)}function p$(){Mw&&(clearInterval(Mw),Mw=0)}var kP=class{constructor(t){this.gridsterItem=t,this.gridster=t.gridster}destroy(){this.gridster=this.gridsterItem=this.swapedItem=null}swapItems(){this.gridster.$options.swap&&(this.checkSwapBack(),this.checkSwap(this.gridsterItem))}checkSwapBack(){if(this.swapedItem){let t=this.swapedItem.$item.x,r=this.swapedItem.$item.y;this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.gridster.checkCollision(this.swapedItem.$item)?(this.swapedItem.$item.x=t,this.swapedItem.$item.y=r):(this.swapedItem.setSize(),this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.swapedItem=void 0)}}restoreSwapItem(){this.swapedItem&&(this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.swapedItem.setSize(),this.swapedItem=void 0)}setSwapItem(){this.swapedItem&&(this.swapedItem.checkItemChanges(this.swapedItem.$item,this.swapedItem.item),this.swapedItem=void 0)}checkSwap(t){let r;if(this.gridster.$options.swapWhileDragging?r=this.gridster.checkCollisionForSwaping(t.$item):r=this.gridster.checkCollision(t.$item),r&&r!==!0&&r.canBeDragged()){let e=r,i=e.$item.x,o=e.$item.y,a=t.$item.x,s=t.$item.y,c=a-i,u=s-o;e.$item.x=t.item.x-c,e.$item.y=t.item.y-u,t.$item.x=e.item.x+c,t.$item.y=e.item.y+u,this.gridster.checkCollision(e.$item)||this.gridster.checkCollision(t.$item)?(t.$item.x=a,t.$item.y=s,e.$item.x=i,e.$item.y=o):(e.setSize(),this.swapedItem=e,this.gridster.$options.swapWhileDragging&&(this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.setSwapItem()))}}},bre="gridster-item-resizable-handler",Gl=function(n){return n.UP="UP",n.DOWN="DOWN",n.LEFT="LEFT",n.RIGHT="RIGHT",n}(Gl||{}),DP=class{constructor(t,r,e){this.zone=e,this.collision=!1,this.dragMove=i=>{i.stopPropagation(),i.preventDefault(),Ds.checkTouchEvent(i);let o=this.getDirections(i);this.gridster.options.enableBoundaryControl&&(o.includes(Gl.UP)&&this.gridsterItem.el.getBoundingClientRect().top<this.gridster.el.getBoundingClientRect().top+(this.outerMarginTop??this.margin)&&(o=o.filter(a=>a!=Gl.UP),i=new MouseEvent(i.type,{clientX:i.clientX,clientY:this.lastMouse.clientY})),o.includes(Gl.LEFT)&&this.gridsterItem.el.getBoundingClientRect().left<this.gridster.el.getBoundingClientRect().left+(this.outerMarginLeft??this.margin)&&(o=o.filter(a=>a!=Gl.LEFT),i=new MouseEvent(i.type,{clientX:this.lastMouse.clientX,clientY:i.clientY})),o.includes(Gl.RIGHT)&&this.gridsterItem.el.getBoundingClientRect().right>this.gridster.el.getBoundingClientRect().right-(this.outerMarginRight??this.margin)&&(o=o.filter(a=>a!=Gl.RIGHT),i=new MouseEvent(i.type,{clientX:this.lastMouse.clientX,clientY:i.clientY})),o.includes(Gl.DOWN)&&this.gridsterItem.el.getBoundingClientRect().bottom>this.gridster.el.getBoundingClientRect().bottom-(this.outerMarginBottom??this.margin)&&(o=o.filter(a=>a!=Gl.DOWN),i=new MouseEvent(i.type,{clientX:i.clientX,clientY:this.lastMouse.clientY}))),o.length&&(this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,a$(this.gridster,this.left,this.top,this.width,this.height,i,this.lastMouse,this.calculateItemPositionFromMousePosition),this.calculateItemPositionFromMousePosition(i))},this.calculateItemPositionFromMousePosition=i=>{this.gridster.options.scale?this.calculateItemPositionWithScale(i,this.gridster.options.scale):this.calculateItemPositionWithoutScale(i),this.calculateItemPosition(),this.lastMouse.clientX=i.clientX,this.lastMouse.clientY=i.clientY,this.zone.run(()=>{this.gridster.updateGrid()})},this.dragStop=i=>{i.stopPropagation(),i.preventDefault(),s$(),this.cancelOnBlur(),this.mousemove(),this.mouseup(),this.mouseleave(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridsterItem.renderer.removeClass(this.gridsterItem.el,"gridster-item-moving"),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.path=[],this.gridster.options.draggable&&this.gridster.options.draggable.stop?Promise.resolve(this.gridster.options.draggable.stop(this.gridsterItem.item,this.gridsterItem,i)).then(this.makeDrag,this.cancelDrag):this.makeDrag(),setTimeout(()=>{this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle(!0))})},this.cancelDrag=()=>{this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push&&this.push.restoreItems(),this.swap&&this.swap.restoreSwapItem(),this.push&&(this.push.destroy(),this.push=null),this.swap&&(this.swap.destroy(),this.swap=null)},this.makeDrag=()=>{this.gridster.$options.draggable.dropOverItems&&this.gridster.options.draggable&&this.gridster.options.draggable.dropOverItemsCallback&&this.collision&&this.collision!==!0&&this.collision.$item&&this.gridster.options.draggable.dropOverItemsCallback(this.gridsterItem.item,this.collision.item,this.gridster),this.collision=!1,this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push&&this.push.setPushedItems(),this.swap&&this.swap.setSwapItem(),this.push&&(this.push.destroy(),this.push=null),this.swap&&(this.swap.destroy(),this.swap=null)},this.dragStartDelay=i=>{if(i.target.classList.contains(bre)||Ds.checkContentClassForEvent(this.gridster,i))return;if(Ds.checkTouchEvent(i),!this.gridster.$options.draggable.delayStart){this.dragStart(i);return}let a=setTimeout(()=>{this.dragStart(i),F()},this.gridster.$options.draggable.delayStart),s=this.gridsterItem.renderer.listen("document","mouseup",F),c=this.gridsterItem.renderer.listen("document","mouseleave",F),u=this.gridsterItem.renderer.listen("window","blur",F),f=this.gridsterItem.renderer.listen("document","touchmove",S),_=this.gridsterItem.renderer.listen("document","touchend",F),I=this.gridsterItem.renderer.listen("document","touchcancel",F);function S(H){Ds.checkTouchEvent(H),(Math.abs(H.clientX-i.clientX)>9||Math.abs(H.clientY-i.clientY)>9)&&F()}function F(){clearTimeout(a),u(),s(),c(),f(),_(),I()}},this.gridsterItem=t,this.gridster=r,this.lastMouse={clientX:0,clientY:0},this.path=[]}destroy(){this.gridster.previewStyle&&this.gridster.previewStyle(!0),this.gridsterItem=this.gridster=this.collision=null,this.mousedown&&(this.mousedown(),this.touchstart())}dragStart(t){t.which&&t.which!==1||(this.gridster.options.draggable&&this.gridster.options.draggable.start&&this.gridster.options.draggable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.zone.runOutsideAngular(()=>{this.mousemove=this.gridsterItem.renderer.listen("document","mousemove",this.dragMove),this.touchmove=this.gridster.renderer.listen(this.gridster.el,"touchmove",this.dragMove)}),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStop),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStop),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStop),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStop),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStop),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-moving"),this.margin=this.gridster.$options.margin,this.outerMarginTop=this.gridster.$options.outerMarginTop,this.outerMarginRight=this.gridster.$options.outerMarginRight,this.outerMarginBottom=this.gridster.$options.outerMarginBottom,this.outerMarginLeft=this.gridster.$options.outerMarginLeft,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.left=this.gridsterItem.left-this.margin,this.top=this.gridsterItem.top-this.margin,this.originalClientX=t.clientX,this.originalClientY=t.clientY,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.gridster.$options.dirType===fs.RTL?this.diffLeft=t.clientX-this.gridster.el.scrollWidth+this.gridsterItem.left:this.diffLeft=t.clientX+this.offsetLeft-this.margin-this.left,this.diffTop=t.clientY+this.offsetTop-this.margin-this.top,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(!0),this.push=new ME(this.gridsterItem),this.swap=new kP(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),this.path.push({x:this.gridsterItem.item.x||0,y:this.gridsterItem.item.y||0}))}calculateItemPositionWithScale(t,r){this.gridster.$options.dirType===fs.RTL?this.left=this.gridster.el.scrollWidth-this.originalClientX+(t.clientX-this.originalClientX)/r+this.diffLeft:this.left=this.originalClientX+(t.clientX-this.originalClientX)/r+this.offsetLeft-this.diffLeft,this.top=this.originalClientY+(t.clientY-this.originalClientY)/r+this.offsetTop-this.diffTop}calculateItemPositionWithoutScale(t){this.gridster.$options.dirType===fs.RTL?this.left=this.gridster.el.scrollWidth-t.clientX+this.diffLeft:this.left=t.clientX+this.offsetLeft-this.diffLeft,this.top=t.clientY+this.offsetTop-this.diffTop}calculateItemPosition(){if(this.gridster.movingItem=this.gridsterItem.$item,this.positionX=this.gridster.pixelsToPositionX(this.left,Math.round),this.positionY=this.gridster.pixelsToPositionY(this.top,Math.round),this.positionXBackup=this.gridsterItem.$item.x,this.positionYBackup=this.gridsterItem.$item.y,this.gridsterItem.$item.x=this.positionX,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.x=this.positionXBackup),this.gridsterItem.$item.y=this.positionY,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.y=this.positionYBackup),this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,this.top),this.positionXBackup!==this.gridsterItem.$item.x||this.positionYBackup!==this.gridsterItem.$item.y){let t=this.path[this.path.length-1],r="";t.x<this.gridsterItem.$item.x?r=this.push.fromWest:t.x>this.gridsterItem.$item.x?r=this.push.fromEast:t.y<this.gridsterItem.$item.y?r=this.push.fromNorth:t.y>this.gridsterItem.$item.y&&(r=this.push.fromSouth),this.push.pushItems(r,this.gridster.$options.disablePushOnDrag),this.swap.swapItems(),this.collision=this.gridster.checkCollision(this.gridsterItem.$item),this.collision?(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridster.$options.draggable.dropOverItems&&this.collision!==!0&&this.collision.$item&&(this.gridster.movingItem=null)):this.path.push({x:this.gridsterItem.$item.x,y:this.gridsterItem.$item.y}),this.push.checkPushBack()}else this.collision=!1;this.gridster.previewStyle(!0)}toggle(){let t=this.gridsterItem.canBeDragged();!this.enabled&&t?(this.enabled=!this.enabled,this.mousedown=this.gridsterItem.renderer.listen(this.gridsterItem.el,"mousedown",this.dragStartDelay),this.touchstart=this.gridsterItem.renderer.listen(this.gridsterItem.el,"touchstart",this.dragStartDelay)):this.enabled&&!t&&(this.enabled=!this.enabled,this.mousedown(),this.touchstart())}getDirections(t){let r=[];return this.lastMouse.clientX===0&&this.lastMouse.clientY===0&&(this.lastMouse.clientY=t.clientY,this.lastMouse.clientX=t.clientX),this.lastMouse.clientY>
37t.clientY&&r.push(Gl.UP),this.lastMouse.clientY<t.clientY&&r.push(Gl.DOWN),this.lastMouse.clientX<t.clientX&&r.push(Gl.RIGHT),this.lastMouse.clientX>t.clientX&&r.push(Gl.LEFT),r}},MP=class{constructor(t){this.pushedItems=[],this.pushedItemsPath=[],this.gridsterItem=t,this.gridster=t.gridster,this.tryPattern={fromEast:this.tryWest,fromWest:this.tryEast,fromNorth:this.trySouth,fromSouth:this.tryNorth},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}destroy(){this.gridster=this.gridsterItem=null}pushItems(t){return this.gridster.$options.pushResizeItems?this.push(this.gridsterItem,t):!1}restoreItems(){let t=0,r=this.pushedItems.length,e;for(;t<r;t++)e=this.pushedItems[t],e.$item.x=e.item.x||0,e.$item.y=e.item.y||0,e.$item.cols=e.item.cols||1,e.$item.row=e.item.row||1,e.setSize();this.pushedItems=[],this.pushedItemsPath=[]}setPushedItems(){let t=0,r=this.pushedItems.length,e;for(;t<r;t++)e=this.pushedItems[t],e.checkItemChanges(e.$item,e.item);this.pushedItems=[],this.pushedItemsPath=[]}checkPushBack(){let t=this.pushedItems.length-1,r=!1;for(;t>-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(r=!0);r&&this.checkPushBack()}push(t,r){let e=this.gridster.checkCollision(t.$item);if(e&&e!==!0&&e!==this.gridsterItem&&e.canBeResized()){if(this.tryPattern[r].call(this,e,t,r))return!0}else if(e===!1)return!0;return!1}trySouth(t,r,e){let i=t.$item.y,o=t.$item.rows;return t.$item.y=r.$item.y+r.$item.rows,t.$item.rows=o+i-t.$item.y,!this.gridster.checkCollisionTwoItems(t.$item,r.$item)&&!this.gridster.checkGridCollision(t.$item)?(t.setSize(),this.addToPushed(t),this.push(r,e),!0):(t.$item.y=i,t.$item.rows=o,!1)}tryNorth(t,r,e){let i=t.$item.rows;return t.$item.rows=r.$item.y-t.$item.y,!this.gridster.checkCollisionTwoItems(t.$item,r.$item)&&!this.gridster.checkGridCollision(t.$item)?(t.setSize(),this.addToPushed(t),this.push(r,e),!0):(t.$item.rows=i,!1)}tryEast(t,r,e){let i=t.$item.x,o=t.$item.cols;return t.$item.x=r.$item.x+r.$item.cols,t.$item.cols=o+i-t.$item.x,!this.gridster.checkCollisionTwoItems(t.$item,r.$item)&&!this.gridster.checkGridCollision(t.$item)?(t.setSize(),this.addToPushed(t),this.push(r,e),!0):(t.$item.x=i,t.$item.cols=o,!1)}tryWest(t,r,e){let i=t.$item.cols;return t.$item.cols=r.$item.x-t.$item.x,!this.gridster.checkCollisionTwoItems(t.$item,r.$item)&&!this.gridster.checkGridCollision(t.$item)?(t.setSize(),this.addToPushed(t),this.push(r,e),!0):(t.$item.cols=i,!1)}addToPushed(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0,cols:t.item.cols||0,rows:t.item.rows||0},{x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows}]);else{let r=this.pushedItems.indexOf(t);this.pushedItemsPath[r].push({x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows})}}removeFromPushed(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))}checkPushedItem(t,r){let e=this.pushedItemsPath[r],i=e.length-2,o,a,s,c,u;for(;i>-1;i--)o=e[i],a=t.$item.x,s=t.$item.y,c=t.$item.cols,u=t.$item.rows,t.$item.x=o.x,t.$item.y=o.y,t.$item.cols=o.cols,t.$item.rows=o.rows,this.gridster.findItemWithItem(t.$item)?(t.$item.x=a,t.$item.y=s,t.$item.cols=c,t.$item.rows=u):(t.setSize(),e.splice(i+1,e.length-1-i));return e.length<2?(this.removeFromPushed(r),!0):!1}},AP=class{constructor(t,r,e){this.zone=e,this.directionFunction=null,this.dragMove=i=>{if(this.directionFunction===null)throw new Error("The `directionFunction` has not been set before calling `dragMove`.");i.stopPropagation(),i.preventDefault(),Ds.checkTouchEvent(i),this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,a$(this.gridster,this.left,this.top,this.width,this.height,i,this.lastMouse,this.directionFunction,!0,this.resizeEventScrollType);let o=this.gridster.options.scale||1;this.directionFunction({clientX:this.originalClientX+(i.clientX-this.originalClientX)/o,clientY:this.originalClientY+(i.clientY-this.originalClientY)/o}),this.lastMouse.clientX=i.clientX,this.lastMouse.clientY=i.clientY,this.zone.run(()=>{this.gridster.updateGrid()})},this.dragStop=i=>{i.stopPropagation(),i.preventDefault(),s$(),this.mousemove(),this.mouseup(),this.mouseleave(),this.cancelOnBlur(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.gridster.options.resizable&&this.gridster.options.resizable.stop?Promise.resolve(this.gridster.options.resizable.stop(this.gridsterItem.item,this.gridsterItem,i)).then(this.makeResize,this.cancelResize):this.makeResize(),setTimeout(()=>{this.gridsterItem.renderer.removeClass(this.gridsterItem.el,"gridster-item-resizing"),this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle())})},this.cancelResize=()=>{this.gridsterItem.$item.cols=this.gridsterItem.item.cols||1,this.gridsterItem.$item.rows=this.gridsterItem.item.rows||1,this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push.restoreItems(),this.pushResize.restoreItems(),this.push.destroy(),this.push=null,this.pushResize.destroy(),this.pushResize=null},this.makeResize=()=>{this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push.setPushedItems(),this.pushResize.setPushedItems(),this.push.destroy(),this.push=null,this.pushResize.destroy(),this.pushResize=null},this.handleNorth=i=>{this.top=i.clientY+this.offsetTop-this.diffTop,this.height=this.bottom-this.top,this.minHeight>this.height?(this.height=this.minHeight,this.top=this.bottom-this.minHeight):this.gridster.options.enableBoundaryControl&&(this.top=Math.max(0,this.top),this.height=this.bottom-this.top);let o=this.gridster.options.pushItems?this.margin:0;if(this.newPosition=this.gridster.pixelsToPositionY(this.top+o,Math.floor),this.gridsterItem.$item.y!==this.newPosition){if(this.itemBackup[1]=this.gridsterItem.$item.y,this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows+=this.gridsterItem.$item.y-this.newPosition,this.gridsterItem.$item.y=this.newPosition,this.pushResize.pushItems(this.pushResize.fromSouth),this.push.pushItems(this.push.fromSouth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.y=this.itemBackup[1],this.gridsterItem.$item.rows=this.itemBackup[3],this.top=this.gridster.positionYToPixels(this.gridsterItem.$item.y),this.setItemTop(this.gridster.positionYToPixels(this.gridsterItem.$item.y)),this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemTop(this.top),this.setItemHeight(this.height)},this.handleWest=i=>{let o=this.gridster.$options.dirType===fs.RTL?this.originalClientX+(this.originalClientX-i.clientX):i.clientX;this.left=o+this.offsetLeft-this.diffLeft,this.width=this.right-this.left,this.minWidth>this.width?(this.width=this.minWidth,this.left=this.right-this.minWidth):this.gridster.options.enableBoundaryControl&&(this.left=Math.max(0,this.left),this.width=this.right-this.left);let a=this.gridster.options.pushItems?this.margin:0;if(this.newPosition=this.gridster.pixelsToPositionX(this.left+a,Math.floor),this.gridsterItem.$item.x!==this.newPosition){if(this.itemBackup[0]=this.gridsterItem.$item.x,this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols+=this.gridsterItem.$item.x-this.newPosition,this.gridsterItem.$item.x=this.newPosition,this.pushResize.pushItems(this.pushResize.fromEast),this.push.pushItems(this.push.fromEast,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.x=this.itemBackup[0],this.gridsterItem.$item.cols=this.itemBackup[2],this.left=this.gridster.positionXToPixels(this.gridsterItem.$item.x),this.setItemLeft(this.gridster.positionXToPixels(this.gridsterItem.$item.x)),this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemLeft(this.left),this.setItemWidth(this.width)},this.handleSouth=i=>{if(this.height=i.clientY+this.offsetTop-this.diffBottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight),this.bottom=this.top+this.height,this.gridster.options.enableBoundaryControl){let a=this.outerMarginBottom??this.margin,s=this.gridster.el.getBoundingClientRect();this.bottom=Math.min(this.bottom,s.bottom-s.top-2*a),this.height=this.bottom-this.top}let o=this.gridster.options.pushItems?0:this.margin;if(this.newPosition=this.gridster.pixelsToPositionY(this.bottom+o,Math.ceil),this.gridsterItem.$item.y+this.gridsterItem.$item.rows!==this.newPosition){if(this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows=this.newPosition-this.gridsterItem.$item.y,this.pushResize.pushItems(this.pushResize.fromNorth),this.push.pushItems(this.push.fromNorth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.rows=this.itemBackup[3],this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemHeight(this.height)},this.handleEast=i=>{let o=this.gridster.$options.dirType===fs.RTL?this.originalClientX+(this.originalClientX-i.clientX):i.clientX;if(this.width=o+this.offsetLeft-this.diffRight-this.left,this.minWidth>this.width&&(this.width=this.minWidth),this.right=this.left+this.width,this.gridster.options.enableBoundaryControl){let s=this.outerMarginRight??this.margin,c=this.gridster.el.getBoundingClientRect();this.right=Math.min(this.right,c.right-c.left-2*s),this.width=this.right-this.left}let a=this.gridster.options.pushItems?0:this.margin;if(this.newPosition=this.gridster.pixelsToPositionX(this.right+a,Math.ceil),this.gridsterItem.$item.x+this.gridsterItem.$item.cols!==this.newPosition){if(this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols=this.newPosition-this.gridsterItem.$item.x,this.pushResize.pushItems(this.pushResize.fromWest),this.push.pushItems(this.push.fromWest,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.cols=this.itemBackup[2],this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemWidth(this.width)},this.handleNorthWest=i=>{this.handleNorth(i),this.handleWest(i)},this.handleNorthEast=i=>{this.handleNorth(i),this.handleEast(i)},this.handleSouthWest=i=>{this.handleSouth(i),this.handleWest(i)},this.handleSouthEast=i=>{this.handleSouth(i),this.handleEast(i)},this.gridsterItem=t,this.gridster=r,this.lastMouse={clientX:0,clientY:0},this.itemBackup=[0,0,0,0],this.resizeEventScrollType={west:!1,east:!1,north:!1,south:!1}}destroy(){this.gridster?.previewStyle(),this.gridster=this.gridsterItem=null}dragStart(t){if(t.which&&t.which!==1)return;this.gridster.options.resizable&&this.gridster.options.resizable.start&&this.gridster.options.resizable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.zone.runOutsideAngular(()=>{this.mousemove=this.gridsterItem.renderer.listen("document","mousemove",this.dragMove),this.touchmove=this.gridster.renderer.listen(this.gridster.el,"touchmove",this.dragMove)}),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStop),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStop),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStop),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStop),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStop),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-resizing"),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.left=this.gridsterItem.left,this.top=this.gridsterItem.top,this.originalClientX=t.clientX,this.originalClientY=t.clientY,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.bottom=this.gridsterItem.top+this.gridsterItem.height,this.right=this.gridsterItem.left+this.gridsterItem.width,this.margin=this.gridster.$options.margin,this.outerMarginTop=this.gridster.$options.outerMarginTop,this.outerMarginRight=this.gridster.$options.outerMarginRight,this.outerMarginBottom=this.gridster.$options.outerMarginBottom,this.outerMarginLeft=this.gridster.$options.outerMarginLeft,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.diffLeft=t.clientX+this.offsetLeft-this.left,this.diffRight=t.clientX+this.offsetLeft-this.right,this.diffTop=t.clientY+this.offsetTop-this.top,this.diffBottom=t.clientY+this.offsetTop-this.bottom,this.minHeight=this.gridster.positionYToPixels(this.gridsterItem.$item.minItemRows||this.gridster.$options.minItemRows)-this.margin,this.minWidth=this.gridster.positionXToPixels(this.gridsterItem.$item.minItemCols||this.gridster.$options.minItemCols)-this.margin,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(),this.push=new ME(this.gridsterItem),this.pushResize=new MP(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid();let{classList:r}=t.target;r.contains("handle-n")?(this.resizeEventScrollType.north=!0,this.directionFunction=this.handleNorth):r.contains("handle-w")?this.gridster.$options.dirType===fs.RTL?(this.resizeEventScrollType.east=!0,this.directionFunction=this.handleEast):(this.resizeEventScrollType.west=!0,this.directionFunction=this.handleWest):r.contains("handle-s")?(this.resizeEventScrollType.south=!0,this.directionFunction=this.handleSouth):r.contains("handle-e")?this.gridster.$options.dirType===fs.RTL?(this.resizeEventScrollType.west=!0,this.directionFunction=this.handleWest):(this.resizeEventScrollType.east=!0,this.directionFunction=this.handleEast):r.contains("handle-nw")?this.gridster.$options.dirType===fs.RTL?(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleNorthEast):(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleNorthWest):r.contains("handle-ne")?this.gridster.$options.dirType===fs.RTL?(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleNorthWest):(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleNorthEast):r.contains("handle-sw")?this.gridster.$options.dirType===fs.RTL?(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleSouthEast):(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleSouthWest):r.contains("handle-se")&&(this.gridster.$options.dirType===fs.RTL?(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleSouthWest):(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleSouthEast))}toggle(){this.resizeEnabled=this.gridsterItem.canBeResized(),this.resizableHandles=this.gridsterItem.getResizableHandles()}dragStartDelay(t){if(Ds.checkTouchEvent(t),!this.gridster.$options.resizable.delayStart){this.dragStart(t);return}let r=setTimeout(()=>{this.dragStart(t),f()},this.gridster.$options.resizable.delayStart),{cancelMouse:e,cancelMouseLeave:i,cancelOnBlur:o,cancelTouchMove:a,cancelTouchEnd:s,cancelTouchCancel:c}=this.zone.runOutsideAngular(()=>{let _=this.gridsterItem.renderer.listen("document","mouseup",f),I=this.gridsterItem.renderer.listen("document","mouseleave",f),S=this.gridsterItem.renderer.listen("window","blur",f),F=this.gridsterItem.renderer.listen("document","touchmove",u),H=this.gridsterItem.renderer.listen("document","touchend",f
37),q=this.gridsterItem.renderer.listen("document","touchcancel",f);return{cancelMouse:_,cancelMouseLeave:I,cancelOnBlur:S,cancelTouchMove:F,cancelTouchEnd:H,cancelTouchCancel:q}});function u(_){Ds.checkTouchEvent(_),(Math.abs(_.clientX-t.clientX)>9||Math.abs(_.clientY-t.clientY)>9)&&f()}function f(){clearTimeout(r),o(),e(),i(),a(),s(),c()}}setItemTop(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,t)}setItemLeft(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,t,this.top)}setItemHeight(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"height",t+"px")}setItemWidth(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"width",t+"px")}},i$=(()=>{let t=class t{get zIndex(){return this.getLayerIndex()+this.gridster.$options.baseLayerIndex}constructor(e,i,o,a){this.renderer=o,this.zone=a,this.itemInit=new J,this.itemChange=new J,this.itemResize=new J,this.el=e.nativeElement,this.$item={cols:-1,rows:-1,x:-1,y:-1},this.gridster=i,this.drag=new DP(this,i,this.zone),this.resize=new AP(this,i,this.zone)}ngOnInit(){this.gridster.addItem(this)}ngOnChanges(e){e.item&&(this.updateOptions(),this.init||this.gridster.calculateLayout$.next()),e.item&&e.item.previousValue&&this.setSize()}updateOptions(){this.$item=Ds.merge(this.$item,this.item,{cols:void 0,rows:void 0,x:void 0,y:void 0,layerIndex:void 0,dragEnabled:void 0,resizeEnabled:void 0,compactEnabled:void 0,maxItemRows:void 0,minItemRows:void 0,maxItemCols:void 0,minItemCols:void 0,maxItemArea:void 0,minItemArea:void 0,resizableHandles:{s:void 0,e:void 0,n:void 0,w:void 0,se:void 0,ne:void 0,sw:void 0,nw:void 0}})}ngOnDestroy(){this.gridster.removeItem(this),this.drag.destroy(),this.resize.destroy(),this.gridster=this.drag=this.resize=null}setSize(){this.renderer.setStyle(this.el,"display",this.notPlaced?"":"block"),this.gridster.gridRenderer.updateItem(this.el,this.$item,this.renderer),this.updateItemSize()}updateItemSize(){let e=this.$item.y*this.gridster.curRowHeight,i=this.$item.x*this.gridster.curColWidth,o=this.$item.cols*this.gridster.curColWidth-this.gridster.$options.margin,a=this.$item.rows*this.gridster.curRowHeight-this.gridster.$options.margin;this.top=e,this.left=i,!this.init&&o>0&&a>0&&(this.init=!0,this.item.initCallback&&this.item.initCallback(this.item,this),this.gridster.options.itemInitCallback&&this.gridster.options.itemInitCallback(this.item,this),this.itemInit.next({item:this.item,itemComponent:this}),this.gridster.$options.scrollToNewItems&&this.el.scrollIntoView(!1)),(o!==this.width||a!==this.height)&&(this.width=o,this.height=a,this.gridster.options.itemResizeCallback&&this.gridster.options.itemResizeCallback(this.item,this),this.itemResize.next({item:this.item,itemComponent:this}))}itemChanged(){this.gridster.options.itemChangeCallback&&this.gridster.options.itemChangeCallback(this.item,this),this.itemChange.next({item:this.item,itemComponent:this})}checkItemChanges(e,i){e.rows===i.rows&&e.cols===i.cols&&e.x===i.x&&e.y===i.y||(this.gridster.checkCollision(this.$item)?(this.$item.x=i.x||0,this.$item.y=i.y||0,this.$item.cols=i.cols||1,this.$item.rows=i.rows||1,this.setSize()):(this.item.cols=this.$item.cols,this.item.rows=this.$item.rows,this.item.x=this.$item.x,this.item.y=this.$item.y,this.gridster.calculateLayout$.next(),this.itemChanged()))}canBeDragged(){let e=this.gridster.$options.draggable.enabled,i=this.$item.dragEnabled===void 0?e:this.$item.dragEnabled;return!this.gridster.mobile&&e&&i}canBeResized(){let e=this.gridster.$options.resizable.enabled,i=this.$item.resizeEnabled===void 0?e:this.$item.resizeEnabled;return!this.gridster.mobile&&e&&i}getResizableHandles(){let e=this.gridster.$options.resizable.handles,i=this.$item.resizableHandles;return i===void 0?e:re(re({},e),i)}bringToFront(e){if(e&&e<=0)return;let i=this.getLayerIndex(),o=this.gridster.$options.maxLayerIndex;if(i<o){let a=e?i+e:o;this.item.layerIndex=this.$item.layerIndex=a>o?o:a}}sendToBack(e){if(e&&e<=0)return;let i=this.getLayerIndex();if(i>0){let o=e?i-e:0;this.item.layerIndex=this.$item.layerIndex=o<0?0:o}}getLayerIndex(){return this.item.layerIndex!==void 0?this.item.layerIndex:this.gridster.$options.defaultLayerIndex!==void 0?this.gridster.$options.defaultLayerIndex:0}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(IP),h(Ni),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["gridster-item"]],hostVars:2,hostBindings:function(i,o){i&2&&hi("z-index",o.zIndex)},inputs:{item:"item"},outputs:{itemInit:"itemInit",itemChange:"itemChange",itemResize:"itemResize"},standalone:!0,features:[lt,ot],ngContentSelectors:n$,decls:9,vars:8,consts:[[1,"gridster-item-resizable-handler","handle-s"],[1,"gridster-item-resizable-handler","handle-e"],[1,"gridster-item-resizable-handler","handle-n"],[1,"gridster-item-resizable-handler","handle-w"],[1,"gridster-item-resizable-handler","handle-se"],[1,"gridster-item-resizable-handler","handle-ne"],[1,"gridster-item-resizable-handler","handle-sw"],[1,"gridster-item-resizable-handler","handle-nw"],[1,"gridster-item-resizable-handler","handle-s",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-e",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-n",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-w",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-se",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-ne",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-sw",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-nw",3,"mousedown","touchstart"]],template:function(i,o){i&1&&(Ct(
37),Fe(0),x(1,sre,1,0,"div",0)(2,lre,1,0,"div",1)(3,cre,1,0,"div",2)(4,dre,1,0,"div",3)(5,pre,1,0,"div",4)(6,mre,1,0,"div",5)(7,ure,1,0,"div",6)(8,hre,1,0,"div",7)),i&2&&(l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.s&&o.resize.resizeEnabled?1:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.e&&o.resize.resizeEnabled?2:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.n&&o.resize.resizeEnabled?3:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.w&&o.resize.resizeEnabled?4:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.se&&o.resize.resizeEnabled?5:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.ne&&o.resize.resizeEnabled?6:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.sw&&o.resize.resizeEnabled?7:-1),l(),_t(o.resize.resizableHandles!=null&&o.resize.resizableHandles.nw&&o.resize.resizeEnabled?8:-1))},styles:[`gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-resizing,gridster-item.gridster-item-moving{transition:0s;z-index:2;box-shadow:0 0 5px 5px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:ns-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:ew-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:ns-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:ew-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc}
38`],encapsulation:2});let n=t;return n})();var Ow=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[IP,i$],exports:[IP,i$]}),t.\u0275inj=Nt({});let n=t;return n})();y();y();var RP=class{constructor(t,r){this._document=r;let e=this._textarea=this._document.createElement("textarea"),i=e.style;i.position="fixed",i.top=i.opacity="0",i.left="-999em",e.setAttribute("aria-hidden","true"),e.value=t,e.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(e)}copy(){let t=this._textarea,r=!1;try{if(t){let e=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),r=this._document.execCommand("copy"),e&&e.focus()}}catch{}return r}destroy(){let t=this._textarea;t&&(t.remove(),this._textarea=void 0)}},AE=(()=>{let t=class t{constructor(e){this._document=e}copy(e){let i=this.beginCopy(e),o=i.copy();return i.destroy(),o}beginCopy(e){return new RP(e,this._document)}};t.\u0275fac=function(i){return new(i||t)(X(Qi))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),zit=new tt("CDK_COPY_TO_CLIPBOARD_CONFIG");function vre(n){return/^(http|https):\/\//.test(n)?n:(console.warn(`[ShareButtons]: Sharing link '${n}' is invalid!`),null)}function yre(){return document.defaultView.print()}function Cre({params:n,data:t,clipboard:r,uiState:e}){r.copy(n.url),e.set({icon:t.successIcon,text:t.successText,disabled:!0}),setTimeout(()=>{e.set({icon:t.icon,text:t.text,disabled:!1})},t.delay)}var wre=new tt("SHARE_BUTTONS_CONFIG",{providedIn:"root",factory:()=>Sre}),xre=new tt("SHARE_ICONS");var OE=function(n){return n.Anchor="anchor",n.Window="window",n}(OE||{}),Sre={sharerMethod:OE.Anchor,theme:"default",windowWidth:800,windowHeight:500,moreButtonIcon:["fas","ellipsis-h"],lessButtonIcon:["fas","minus"],moreButtonAriaLabel:"Show more share buttons",lessButtonAriaLabel:"Show less share buttons"},PE={description:n=>n.description?`${n.description}\r
39${n.url}`:n.url},Tre={type:"facebook",text:"Facebook",ariaLabel:"Share on Facebook",icon:["fab","facebook-f"],color:"#4267B2",share:{desktop:"https://facebook.com/sharer/sharer.php"},params:{url:"u"}},Ere={type:"x",text:"X",ariaLabel:"Post on X",icon:["fab","x-twitter"],color:"#000",share:{desktop:"https://x.com/intent/post"},params:{url:"url",description:"text",tags:"hashtags",via:"via"}},Ire={type:"linkedin",text:"LinkedIn",ariaLabel:"Share on LinkedIn",icon:["fab","linkedin-in"],color:"#0a66c2",share:{desktop:"https://www.linkedin.com/sharing/share-offsite"},params:{url:"url"}},kre={type:"pinterest",text:"Pinterest",ariaLabel:"Share on Pinterest",icon:["fab","pinterest-p"],color:"#e60023",share:{desktop:"https://pinterest.com/pin/create/button/"},params:{url:"url",description:"description",image:"media"}},Dre={type:"reddit",text:"Reddit",ariaLabel:"Share on Reddit",icon:["fab","reddit-alien"],color:"#FF4006",share:{desktop:"https://www.reddit.com/submit"},params:{url:"url",title:"title"}},Mre={type:"tumblr",text:"Tumblr",ariaLabel:"Share on Tumblr",icon:["fab","tumblr"],color:"#36465D",share:{desktop:"https://tumblr.com/widgets/share/tool"},params:{url:"canonicalUrl",description:"caption",tags:"tags"}},Are={type:"mix",text:"Mix",ariaLabel:"Share on Mix",icon:["fab","mix"],color:"#eb4924",share:{desktop:"https://mix.com/add"},params:{url:"url"}},Ore={type:"viber",text:"Viber",ariaLabel:"Share on Viber",icon:["fab","viber"],color:"#665ca7",share:{android:"viber:
39//forward",ios:"viber://forward"},params:{description:"text"},paramsFunc:PE,requiredParams:{description:!0}},Pre={type:"vk",text:"VKontakte",ariaLabel:"Share on VKontakte",icon:["fab","vk"],color:"#4C75A3",share:{desktop:"https://vk.com/share.php"},params:{url:"url"}},Rre={type:"telegram",text:"Telegram",ariaLabel:"Share on Telegram",icon:["fab","telegram-plane"],color:"#0088cc",share:{desktop:"https://t.me/share/url"},params:{url:"url",description:"text"}},Fre={type:"messenger",text:"Messenger",ariaLabel:"Share on Messenger",icon:["fab","facebook-messenger"],color:"#168AFF",share:{desktop:"https://www.facebook.com/dialog/send",android:"fb-messenger://share/",ios:"fb-messenger://share/"},params:{url:"link",appId:"app_id",redirectUrl:"redirect_uri"}},Nre={type:"whatsapp",text:"WhatsApp",ariaLabel:"Share on WhatsApp",icon:["fab","whatsapp"],color:"#25D366",share:{desktop:"https://api.whatsapp.com/send",android:"whatsapp://send",ios:"https://api.whatsapp.com/send"},params:{url:"link",description:"text"},requiredParams:{description:!0},paramsFunc:PE},Vre={type:"xing",text:"Xing",ariaLabel:"Share on Xing",icon:["fab","xing"],color:"#006567",share:{desktop:"https://www.xing.com/spi/shares/new"},params:{url:"url"}},Lre={type:"line",text:"Line",ariaLabel:"Share on Line",icon:["fab","line"],color:"#00b900",share:{desktop:"https://social-plugins.line.me/lineit/share"},params:{url:"url"}},Bre={type:"sms",text:"SMS",ariaLabel:"Share link via SMS",icon:["fas","sms"],color:"#20c16c",share:{desktop:"sms:",ios:"sms:&"},params:{description:"body"},paramsFunc:PE,requiredParams:{description:!0}},jre={type:"email",text:"Email",ariaLabel:"Share link via email",icon:["fas","envelope"],color:"#FF961C",share:{desktop:"mailto:"},params:{title:"subject",description:"body"},paramsFunc:PE,requiredParams:{description:!0}},Gre={type:"print",text:"Print",ariaLabel:"Print page",icon:["fas","print"],color:"#765AA2",func:yre},zre={type:"copy",text:"Copy link",ariaLabel:"Copy link",icon:["fas","link"],color:"#607D8B",data:{text:"Copy link",icon:["fas","link"],successText:"Copied",successIcon:["fas","check"],delay:2e3},func:Cre},FP={facebook:Tre,x:Ere,linkedin:Ire,pinterest:kre,reddit:Dre,tumblr:Mre,mix:Are,viber:Ore,vk:Pre,telegram:Rre,messenger:Fre,whatsapp:Nre,xing:Vre,line:Lre,sms:Bre,email:jre,print:Gre,copy:zre},$re=(()=>{let t=class t{constructor(){this.document=Rt(Qi),this.icons=Rt(xre,{optional:!0}),this.meta=Rt(AB),this.platform=Rt(Ur),this.clipboard=Rt(AE)}getMetaTagContent(e){let i=this.meta.getTag(`property="${e}"`),o=this.meta.getTag(`name="${e}"`);return(i||o)?.getAttribute("content")??null}getComputedUrl(e){return vre(e||this.getMetaTagContent("og:url")||this.document.location.href)}getComputedParams(e){return e.url?{title:e.title,description:e.description,image:e.image,tags:e.tags,via:e.via,url:this.getComputedUrl(e.url),appId:e.appId||this.getMetaTagContent("fb:app_id"),redirectUrl:e.redirectUrl||this.document.location.href}:{title:e.title||this.getMetaTagContent("og:title"),description:e.description||this.getMetaTagContent("og:description"),image:e.image||this.getMetaTagContent("og:image"),tags:e.tags,via:e.via,url:this.getComputedUrl(e.url),appId:e.appId||this.getMetaTagContent("fb:app_id"),redirectUrl:e.redirectUrl||this.document.location.href}}getComputedUrlParams(e,i){let o=this.getComputedParams(i);return Object.entries(e.params).reduce((a,[s,c])=>{if(e.requiredParams&&e.requiredParams[s]||o[s]){let u=e.paramsFunc?.[s];a[c]=u?u(o):o[s]}return a},{})}getShareButtonInstance(e,i){let o=i?re(re({},FP[e]),i):FP[e];if(o)return o;throw new Error(`[ShareButtons]: The share button '${o}' does not exist!`)}share(e,i){let o;this.platform.IOS&&e.share.ios?o=e.share.ios:this.platform.ANDROID&&e.share.android?o=e.share.android:o=e.share.desktop;let a=this.getComputedUrlParams(e,i.params);if(o)switch(i.method){case OE.Anchor:this.openViaAnchor({params:a,url:o,target:i.target},i.debug);break;case OE.Window:this.openViaWindow({params:a,url:o,target:i.target},i.windowOptions,i.debug);break}}open(e){let i=this.getShareButtonInstance(e.name,e.props);this.openInstance(e,i)}openInstance(e,i){i.share?this.share(i,e):i.func({params:this.getComputedParams(e.params),data:i.data,clipboard:this.clipboard,uiState:e.uiState})}openViaWindow(e,i,o){let a=`${e.url}?${new Yy({fromObject:e.params}).toString()}`;
39o&&console.log("[SHARE BUTTONS]: open link via window",a);let s=i?.windowObj||this.document.defaultView;(s?.[i?.openFunc]||this.document.defaultView.open)(a,e.target??"_blank",`width=${i?.width||800}, height=${i?.height||500}`),s.opener??=null}openViaAnchor(e,i){let o=`${e.url}?${new Yy({fromObject:e.params}).toString()}`;i&&console.log("[SHARE BUTTONS]: open link via anchor",o);let a=this.document.createElement("a");a.setAttribute("target",e.target??"_blank"),a.setAttribute("rel","noopener noreferrer"),a.href=o,a.click(),a.remove()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Ure=new tt("SHARE_BUTTONS_PROP",{providedIn:"root",factory:()=>FP});var RE=(()=>{let t=class t{constructor(){this.shareButtonsProps=Rt(Ure),this.options=Rt(wre),this.shareService=Rt($re),this.nativeElement=Rt(ge).nativeElement,this.uiState=$d({}),this.color=wu(()=>this.shareButtonInstance().color),this.text=wu(()=>this.uiState().text),this.icon=wu(()=>this.uiState().icon),this.disabled=wu(()=>this.uiState().disabled),this.shareButton=Oi.required(),this.shareButtonInstance=wu(()=>{let e=this.shareButton(),i=this.shareButtonsProps[e];if(i)return i;throw new Error(`[ShareButtons]: The share button '${i}' does not exist!`)}),this.title=Oi(),this.description=Oi(),this.image=Oi(),this.tags=Oi(),this.redirectUrl=Oi(),this.url=Oi(),this.opened=_u(),ol(()=>{let e=this.shareButtonInstance();TB(()=>{this.uiState.set({icon:e.icon,text:e.text,disabled:!1})})}),ol(()=>{this.nativeElement.toggleAttribute("disabled",this.uiState().disabled)})}share(){this.shareService.openInstance({params:{url:this.url(),title:this.title(),description:this.description(),image:this.image(),tags:this.tags(),redirectUrl:this.redirectUrl()},target:this.options.sharerTarget,debug:this.options.debug,method:this.options.sharerMethod,uiState:this.uiState},this.shareButtonInstance()),this.opened.emit(this.shareButton())}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","shareButton",""]],hostVars:3,hostBindings:function(i,o){i&1&&T("click",function(){return o.share()}),i&2&&(Je("aria-label",o.shareButtonInstance().ariaLabel),hi("--button-color",o.color()))},inputs:{shareButton:[1,"shareButton"],title:[1,"title"],description:[1,"description"],image:[1,"image"],tags:[1,"tags"],redirectUrl:[1,"redirectUrl"],url:[1,"url"]},outputs:{opened:"opened"},exportAs:["shareButton"],standalone:!0});let n=t;return n})();y();var Pw=Ld(NE(),1);var qre=n=>({in:n});function Wre(n,t){if(n&1&&(d(0,"span",8),g(1),p()),n&2){let r=t.$implicit;l(),z(r)}}function Yre(n,t){if(n&1&&(d(0,"tr")(1,"td",5),x(2,Wre,2,1,"span",6),p(),d(3,"td",7),g(4),p()()),n&2){let r=t.$implicit;l(2),m("ngForOf",r.formatted),l(2),z(r.description)}}var eg=class n{static symbolize(t){let r={command:"\u2318",shift:"\u21E7",left:"\u2190",right:"\u2192",up:"\u2191",down:"\u2193",return:"\u23CE",backspace:"\u232B"},e=t.split("+");for(let i=0;i<e.length;i++)e[i]==="mod"&&(window.navigator&&window.navigator.platform.indexOf("Mac")>=0?e[i]="command":e[i]="ctrl"),e[i]=r[e[i]]||e[i];return e.join(" + ")}constructor(t,r,e,i,o,a){this.combo=t,this.callback=r,this.allowIn=e,this.description=i,this.action=o,this.persistent=a,this.combo=Array.isArray(t)?t:[t],this.allowIn=e||[],this.description=i||""}get formatted(){if(!this.formattedHotkey){let t=[...this.combo];for(let r=0;r<t.length;r++)t[r]=n.symbolize(t[r]);this.formattedHotkey=t}return this.formattedHotkey}},h$=new tt("HotkeyOptions"),N_=(()=>{let t=class t{constructor(e){this.options=e,this.hotkeys=[],this.pausedHotkeys=[],this.cheatSheetToggle=new Te,this.preventIn=["INPUT","SELECT","TEXTAREA"],Pw.prototype.stopCallback=(i,o,a,s)=>(" "+o.className+" ").indexOf(" mousetrap ")>-1?!1:o.contentEditable&&o.contentEditable==="true",this.mousetrap=new Pw.default,this.initCheatSheet()}initCheatSheet(){this.options.disableCheatSheet||this.add(new eg(this.options.cheatSheetHotkey||"?",function(e){this.cheatSheetToggle.next()}.bind(this),[],this.options.cheatSheetDescription||"Show / hide this help menu")),this.options.cheatSheetCloseEsc&&this.add(new eg("esc",function(e){this.cheatSheetToggle.next(!1)}.bind(this),["HOTKEYS-CHEATSHEET"],this.options.cheatSheetCloseEscDescription||"Hide this help menu"))}add(e,i){if(Array.isArray(e)){let o=[];for(let a of e)o.push(this.add(a,i));return o}return this.remove(e),this.hotkeys.push(e),this.mousetrap.bind(e.combo,(o,a)=>{let s=!0;if(o){let c=o.target||o.srcElement,u=c.nodeName.toUpperCase();(" "+c.className+" ").indexOf(" mousetrap ")>-1?s=!0:this.preventIn.indexOf(u)>-1&&e.allowIn.map(f=>f.toUpperCase()).indexOf(u)===-1&&(s=!1)}if(s)return e.callback.apply(this,[o,a])},i),e}remove(e,i){let o=[];if(!e){for(let s of this.hotkeys)o.push(this.remove(s,i));return o}if(Array.isArray(e)){for(let s of e)o.push(this.remove(s));return o}let a=this.findHotkey(e);return a>-1?(this.hotkeys.splice(a,1),this.mousetrap.unbind(e.combo,i),e):null}get(e){if(!e)return this.hotkeys;if(Array.isArray(e)){let i=[];for(let o of e)i.push(this.get(o));return i}for(let i of this.hotkeys)if(i.combo.indexOf(e)>-1)return i;return null}pause(e){if(!e)return this.pause(this.hotkeys);if(Array.isArray(e)){let i=[];for(let o of e.slice())i.push(this.pause(o));return i}return this.remove(e),this.pausedHotkeys.push(e),e}unpause(e){if(!e)return this.unpause(this.pausedHotkeys);if(Array.isArray(e)){let o=[];for(let a of e.slice())o.push(this.unpause(a));return o}let i=this.pausedHotkeys.indexOf(e);return i>-1?(this.add(e),this.pausedHotkeys.splice(i,1)):null}reset(){this.mousetrap.reset(),this.hotkeys=[],this.pausedHotkeys=[],this.initCheatSheet()}findHotkey(e){return this.hotkeys.indexOf(e)}};t.\u0275fac=function(i){return new(i||t)(X(h$))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),m$=(()=>{let t=class t{constructor(e,i){this.hotkeysService=e,this.elementRef=i,this.hotkeysList=[],this.oldHotkeys=[],this.mousetrap=new Pw.default(this.elementRef.nativeElement)}ngOnInit(){for(let e of this.hotkeys){let i=Object.keys(e)[0],o=new eg(i,e[i]),a=this.hotkeysService.get(i);a!==null&&(this.oldHotkeys.push(a),this.hotkeysService.remove(a)),this.hotkeysList.push(o),this.mousetrap.bind(o.combo,o.callback)}}ngOnDestroy(){for(let e of this.hotkeysList)this.mousetrap.unbind(e.combo);this.hotkeysService.add(this.oldHotkeys)}};t.\u0275fac=function(i){return new(i||t)(h(N_),h(ge))},t.\u0275dir=_e({type:t,selectors:[["","hotkeys",""]],inputs:{hotkeys:"hotkeys"},features:[ne([N_])]});let n=t;return n})(),u$=(()=>{let t=class t{constructor(e){this.hotkeysService=e,this.helpVisible$=new Gn(!1),this.title="Keyboard Shortcuts:"}ngOnInit(){this.subscription=this.hotkeysService.cheatSheetToggle.subscribe(e=>{e!==!1&&(this.hotkeys=this.hotkeysService.hotkeys.filter(i=>i.description)),e===!1?this.helpVisible$.next(!1):this.toggleCheatSheet()})}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}toggleCheatSheet(){this.helpVisible$.next(!this.helpVisible$.value)}};t.\u0275fac=function(i){return new(i||t)(h(N_))},t.\u0275cmp=L({type:t,selectors:[["hotkeys-cheatsheet"]],inputs:{title:"title"},decls:10,vars:7,consts:[[1,"cfp-hotkeys-container","fade",2,"display","none",3,"ngClass"],[1,"cfp-hotkeys"],[1,"cfp-hotkeys-title"],[4,"ngFor","ngForOf"],[1,"cfp-hotkeys-close",3,"click"],[1,"cfp-hotkeys-keys"],["class","cfp-hotkeys-key",4,"ngFor","ngForOf"],[1,"cfp-hotkeys-text"],[1,"cfp-hotkeys-key"]],template:function(i,o){i&1&&(d(0,"div",0),v(1,"async"),d(2,"div",1)(3,"h4",2),g(4),p(),d(5,"table")(6,"tbody"),x(7,Yre,5,2,"tr",3),p()(),d(8,"div",4),T("click",function(){return o.toggleCheatSheet()}),g(9,"\xD7"),p()()()),i&2&&(m("ngClass",Xe(5,qre,C(1,3,o.helpVisible$))),l(4),z(o.title),l(3),m("ngForOf",o.hotkeys))},dependencies:[ac,Ke,Ve],styles:[".cfp-hotkeys-container[_ngcontent-%COMP%]{display:table!important;position:fixed;width:100%;height:100%;top:0;left:0;color:#333;font-size:1em;background-color:#ffffffe6}.cfp-hotkeys-container.fade[_ngcontent-%COMP%]{z-index:-1024;visibility:hidden;opacity:0;transition:opacity .15s linear}.cfp-hotkeys-container.fade.in[_ngcontent-%COMP%]{z-index:10002;visibility:visible;opacity:1}.cfp-hotkeys-title[_ngcontent-%COMP%]{font-weight:700;text-align:center;font-size:1.2em}.cfp-hotkeys[_ngcontent-%COMP%]{width:100%;height:100%;display:table-cell;vertical-align:middle}.cfp-hotkeys[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{margin:auto;color:#333}.cfp-content[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.cfp-hotkeys-keys[_ngcontent-%COMP%]{padding:5px;text-align:right}.cfp-hotkeys-key[_ngcontent-%COMP%]{display:inline-block;color:#fff;background-color:#333;border:1px solid #333;border-radius:5px;text-align:center;margin-right:5px;box-shadow:inset 0 1px #666,0 1px #bbb;padding:5px 9px;font-size:1em}.cfp-hotkeys-text[_ngcontent-%COMP%]{padding-left:10px;font-size:1em}.cfp-hotkeys-close[_ngcontent-%COMP%]{position:fixed;top:20px;right:20px;font-size:2em;font-weight:700;padding:5px 10px;border:1px solid #ddd;border-radius:5px;min-height:45px;min-width:45px;text-align:center}.cfp-hotkeys-close[_ngcontent-%COMP%]:hover{background-color:#fff;cursor:pointer}@media all and (max-width: 500px){.cfp-hotkeys[_ngcontent-%COMP%]{font-size:.8em}}@media all and (min-width: 750px){.cfp-hotkeys[_ngcontent-%COMP%]{font-size:1.2em}}"]});let n=t;return n})(),Tm=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[N_,{provide:h$,useValue:e}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,declarations:[m$,u$],imports:[zi],exports:[m$,u$]}),t.\u0275inj=Nt({imports:[zi]});let n=t;return n})();y();var VP=["pointer"],Qre=["backgroundColorEl"],$s="[_nghost-%COMP%], [_nghost-%COMP%]     *{padding:0;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}";function Kre(n,t){n&1&&(d(0,"span"),g(1,"R"),p())}function Xre(n,t){n&1&&(d(0,"span"),g(1,"G"),p())}function Zre(n,t){n&1&&(d(0,"span"),g(1,"B"),p())}function Jre(n,t){n&1&&(d(0,"span"),g(1,"A"),p())}function eoe(n,t){if(n&1){let r=B();d(0,"div",0)(1,"input",2),T("inputChange",function(i){D(r);let o=b();return M(o.onInputChange(i,"A"))}),p(),x(2,Jre,2,0,"span"),p()}
39if(n&2){let r=b();l(),m("value",r.value==null?null:r.value.getAlpha().toString()),l(),_t(r.labelVisible()?2:-1)}}function toe(n,t){n&1&&(d(0,"span"),g(1,"H"),p())}function ioe(n,t){n&1&&(d(0,"span"),g(1,"S"),p())}function noe(n,t){n&1&&(d(0,"span"),g(1,"L"),p())}function roe(n,t){n&1&&(d(0,"span"),g(1,"A"),p())}function ooe(n,t){if(n&1){let r=B();d(0,"div",0)(1,"input",3),T("inputChange",function(i){D(r);let o=b();return M(o.onInputChange(i,"A"))}),p(),x(2,roe,2,0,"span"),p()}if(n&2){let r=b();l(),m("value",r.value==null?null:r.value.getAlpha().toString()),l(),_t(r.labelVisible()?2:-1)}}var w$="[_nghost-%COMP%]{display:table;width:100%;text-align:center;color:#b4b4b4;font-size:11px}.column[_ngcontent-%COMP%]{display:table-cell;padding:0 2px}input[_ngcontent-%COMP%]{width:100%;border:1px solid rgb(218,218,218);color:#272727;text-align:center;font-size:12px;-webkit-appearance:none;border-radius:0;margin:0 0 6px;height:26px;outline:none}";function aoe(n,t){n&1&&(d(0,"span"),g(1,"HEX"),p())}function soe(n,t){if(n&1){let r=B();d(0,"color-preset",4),T("selectionChange",function(i){D(r);let o=b(2);return M(o.onSelectionChange(i))}),p()}if(n&2){let r=t.$implicit,e=b(2);m("color",r)("activeColor",e.activeColor())}}function loe(n,t){if(n&1&&(d(0,"div",2),Ir(1,soe,1,2,"color-preset",3,Jo),v(3,"reverse"),p()),n&2){let r=b
39();m("@opacityAnimation",r.showChildren)("@listAnimation",r.direction),l(),kr(ft(3,2,r.list(),r.direction()=="up"||r.direction()=="right"))}}var LP=(n,t)=>({first:n,last:t});function coe(n,t){if(n&1){let r=B();d(0,"color-preset-sublist",3),T("selectionChange",function(i){D(r);let o=b(3);return M(o.onSelectionChange(i))}),p()}if(n&2){let r=b(),e=r.$implicit,i=r.$index,o=r.$count,a=b(2);m("list",e)("direction",a.direction())("activeColor",a.color())("ngClass",Yi(4,LP,i===0,i===o-1))}}function doe(n,t){if(n&1){let r=B();d(0,"color-preset",4),T("selectionChange",function(i){D(r);let o=b(3);return M(o.onSelectionChange(i))}),p()}if(n&2){let r=b(),e=r.$implicit,i=r.$index,o=r.$count,a=b(2);m("ngClass",Yi(3,LP,i===0,i===o-1))("color",e)("activeColor",a.color())}}function poe(n,t){if(n&1&&x(0,coe,1,7,"color-preset-sublist",1)(1,doe,1,6,"color-preset",2),n&2){let r=t.$implicit,e=b(2);_t(e.isList(r)?0:1)}}function moe(n,t){if(n&1&&(d(0,"div",0),Ir(1,poe,2,1,null,null,Jo),p()),n&2){let r=t.$implicit,e=t.$index,i=t.$count;m("ngClass",Yi(1,LP,e===0,e===i-1)),l(),kr(r)}}var Nw=[[["","before",""]],"*"],Vw=["[before]","*"];function uoe(n,t){if(n&1){let r=B();d(0,"alpha-component",0),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();fi("color",r.control().value)}}function hoe(n,t){if(n&1){let r=B();d(0,"rgba-input-component",12),v(1,"async"),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();m("alpha",C(1,2,r.control().alphaChannelVisibilityChanges)),fi("color",r.control().value)}}function foe(n,t){if(n&1){let r=B();d(0,"hsla-input-component",12),v(1,"async"),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();m("alpha",C(1,2,r.control().alphaChannelVisibilityChanges)),fi("color",r.control().value)}}function goe(n,t){if(n&1){let r=B();d(0,"hex-input-component",13),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();fi("color",r.control().value)}}function boe(n,t){if(n&1){let r=B();d(0,"color-presets-component",14),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();fi("color",r.control().value),m("colorPresets",r.control().presets)}}function _oe(n,t){if(n&1){let r=B();d(0,"alpha-component",0),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();fi("color",r.control().value)}}function voe(n,t){if(n&1){let r=B();d(0,"color-presets-component",11),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();fi("color",r.control().value),m("colorPresets",r.control().presets)}}function yoe(n,t){if(n&1){let r=B();d(0,"color-presets-component",12),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();m("columns",9),fi("color",r.control().value),m("colorPresets",r.control().presets)}}function Coe(n,t){if(n&1){let r=B();d(0,"color-presets-component",2),bi("colorChange",function(i){D(r);let o=b();return gi(o.childControl.value,i)||(o.childControl.value=i),M(i)}),p()}if(n&2){let r=b();m("columns",7),fi("color",r.childControl.value),m("colorPresets",r.childControl.presets)}}function woe(n,t){if(n&1){let r=B();d(0,"color-presets-component",9),bi("colorChange",function(i){D(r);let o=b();return gi(o.control().value,i)||(o.control().value=i),M(i)}),p()}if(n&2){let r=b();m("columns",8),fi("color",r.control().value),m("colorPresets",r.control().presets)}}var V_=class{},Rw=class extends V_{constructor(t,r,e,i){super(),this.cyan=t,this.magenta=r,this.yellow=e,this.black=i}toString(){return`cmyk(${this.getCyan()}%, ${this.getMagenta()}%, ${this.getYellow()}%, ${this.getBlack()}%)`}getCyan(){return Math.round(this.cyan)}getMagenta(){return Math.round(this.magenta)}getYellow(){return Math.round(this.yellow)}getBlack(){return Math.round(this.black)}equal(t){return this===t?!0:this.cyan===t.cyan&&this.magenta===t.magenta&&this.yellow===t.yellow&&this.black===t.black}},tg=class extends V_{constructor(t,r,e,i){super(),this.hue=t,this.saturation=r,this.lightness=e,this.alpha=i}toString(t=!0){return t?`hsla(${this.getHue()}
39, ${this.getSaturation()}%, ${this.getLightness()}%, ${this.getAlpha()})`:`hsl(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%)`}getHue(){return Math.round(this.hue)}getSaturation(){return Math.round(this.saturation)}getLightness(){return Math.round(this.lightness)}getAlpha(){return Math.round(this.alpha*100)/100}equal(t){return this===t?!0:this.hue===t.hue&&this.saturation===t.saturation&&this.lightness===t.lightness&&this.alpha===t.alpha}},ig=class extends V_{constructor(t,r,e,i){super(),this.hue=t,this.saturation=r,this.value=e,this.alpha=i}toString(t=!0){return t?`hsva(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%, ${this.getAlpha()})`:`hsv(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%)`}getHue(){return Math.round(this.hue)}getSaturation(){return Math.round(this.saturation)}getValue(){return Math.round(this.value)}getAlpha(){return Math.round(this.alpha*100)/100}equal(t){return this===t?!0:this.hue===t.hue&&this.saturation===t.saturation&&this.value===t.value&&this.alpha===t.alpha}},Ue=class extends V_{constructor(t,r,e,i){super(),this.red=t,this.green=r,this.blue=e,this.alpha=i}toString(t=!0){return t?`rgba(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()}, ${this.getAlpha()})`:`rgb(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()})`}getRed(){return Math.round(this.red)}getGreen(){return Math.round(this.green)}getBlue(){return Math.round(this.blue)}getAlpha(){return Math.round(this.alpha*100)/100}equal(t){return this===t?!0:this.red===t.red&&this.green===t.green&&this.blue===t.blue&&this.alpha===t.alpha}},je=class je{};je.transparent=new Ue(0,0,0,0),je.aliceblue=new Ue(240,248,255,1),je.antiquewhite=new Ue(250,235,215,1),je.aqua=new Ue(0,255,255,1),je.aquamarine=new Ue(127,255,212,1),je.azure=new Ue(240,255,255,1),je.beige=new Ue(245,245,220,1),je.bisque=new Ue(255,228,196,1),je.black=new Ue(0,0,0,1),je.blanchedalmond=new Ue(255,235,205,1),je.blue=new Ue(0,0,255,1),je.blueviolet=new Ue(138,43,226,1),je.brown=new Ue(165,42,42,1),je.burlywood=new Ue(222,184,135,1),je.cadetblue=new Ue(95,158,160,1),je.chartreuse=new Ue(127,255,0,1),je.chocolate=new Ue(210,105,30,1),je.coral=new Ue(255,127,80,1),je.cornflowerblue=new Ue(100,149,237,1),je.cornsilk=new Ue(255,248,220,1),je.crimson=new Ue(220,20,60,1),je.cyan=new Ue(0,255,255,1),je.darkblue=new Ue(0,0,139,1),je.darkcyan=new Ue(0,139,139,1),je.darkgoldenrod=new Ue(184,134,11,1),je.darkgray=new Ue(169,169,169,1),je.darkgreen=new Ue(0,100,0,1),je.darkgrey=je.darkgray,je.darkkhaki=new Ue(189,183,107,1),je.darkmagenta=new Ue(139,0,139,1),je.darkolivegreen=new Ue(85,107,47,1),je.darkorange=new Ue(255,140,0,1),je.darkorchid=new Ue(153,50,204,1),je.darkred=new Ue(139,0,0,1),je.darksalmon=new Ue(233,150,122,1),je.darkseagreen=new Ue(143,188,143,1),je.darkslateblue=new Ue(72,61,139,1),je.darkslategray=new Ue(47,79,79,1),je.darkslategrey=je.darkslategray,je.darkturquoise=new Ue(0,206,209,1),je.darkviolet=new Ue(148,0,211,1),je.deeppink=new Ue(255,20,147,1),je.deepskyblue=new Ue(0,191,255,1),je.dimgray=new Ue(105,105,105,1),je.dimgrey=je.dimgray,je.dodgerblue=new Ue(30,144,255,1),je.firebrick=new Ue(178,34,34,1),je.floralwhite=new Ue(255,250,240,1),je.forestgreen=new Ue(34,139,34,1),je.fuchsia=new Ue(255,0,255,1),je.gainsboro=new Ue(220,220,220,1),je.ghostwhite=new Ue(248,248,255,1),je.gold=new Ue(255,215,0,1),je.goldenrod=new Ue(218,165,32,1),je.gray=new Ue(128,128,128,1),je.grey=je.gray,je.green=new Ue(0,128,0,1),je.greenyellow=new Ue(173,255,47,1),je.honeydew=new Ue(240,255,240,1),je.hotpink=new Ue(255,105,180,1),je.indianred=new Ue(205,92,92,1),je.indigo=new Ue(75,0,130,1),je.ivory=new Ue(255,255,240,1),je.khaki=new Ue(240,230,140,1),je.lavender=new Ue(230,230,250,1),je.lavenderblush=new Ue(255,240,245,1),je.lawngreen=new Ue(124,252,0,1),je.lemonchiffon=new Ue(255,250,205,1),je.lightblue=new Ue(173,216,230,1),je.lightcoral=new Ue(240,128,128,1),je.lightcyan=new Ue(224,255,255,1),je.lightgoldenrodyellow=new Ue(250,250,210,1),je.lightgray=new Ue(211,211,211,1),je.lightgreen=new Ue(144,238,144,1),je.lightgrey=je.lightgray,je.lightpink=new Ue(255,182,193,1),je.lightsalmon=new Ue(255,160,122,1),je.lightseagreen=new Ue(32,178,170,1),je.lightskyblue=new Ue(135,206,250,1),je.lightslategray=new Ue(119,136,153,1),je.lightslategrey=je.lightslategray,je.lightsteelblue=new Ue(176,196,222,1),je.lightyellow=new Ue(255,255,224,1),je.lime=new Ue(0,255,0,1),je.limegreen=new Ue(50,205,50,1),je.linen=new Ue(250,240,230,1),je.magenta=new Ue(255,0,255,1),je.maroon=new Ue(128,0,0,1),je.mediumaquamarine=new Ue(102,205,170,1),je.mediumblue=new Ue(0,0,205,1),je.mediumorchid=new Ue(186,85,211,1),je.mediumpurple=ne
39w Ue(147,112,219,1),je.mediumseagreen=new Ue(60,179,113,1),je.mediumslateblue=new Ue(123,104,238,1),je.mediumspringgreen=new Ue(0,250,154,1),je.mediumturquoise=new Ue(72,209,204,1),je.mediumvioletred=new Ue(199,21,133,1),je.midnightblue=new Ue(25,25,112,1),je.mintcream=new Ue(245,255,250,1),je.mistyrose=new Ue(255,228,225,1),je.moccasin=new Ue(255,228,181,1),je.navajowhite=new Ue(255,222,173,1),je.navy=new Ue(0,0,128,1),je.oldlace=new Ue(253,245,230,1),je.olive=new Ue(128,128,0,1),je.olivedrab=new Ue(107,142,35,1),je.orange=new Ue(255,165,0,1),je.orangered=new Ue(255,69,0,1),je.orchid=new Ue(218,112,214,1),je.palegoldenrod=new Ue(238,232,170,1),je.palegreen=new Ue(152,251,152,1),je.paleturquoise=new Ue(175,238,238,1),je.palevioletred=new Ue(219,112,147,1),je.papayawhip=new Ue(255,239,213,1),je.peachpuff=new Ue(255,218,185,1),je.peru=new Ue(205,133,63,1),je.pink=new Ue(255,192,203,1),je.plum=new Ue(221,160,221,1),je.powderblue=new Ue(176,224,230,1),je.purple=new Ue(128,0,128,1),je.red=new Ue(255,0,0,1),je.rosybrown=new Ue(188,143,143,1),je.royalblue=new Ue(65,105,225,1),je.saddlebrown=new Ue(139,69,19,1),je.salmon=new Ue(250,128,114,1),je.sandybrown=new Ue(244,164,96,1),je.seagreen=new Ue(46,139,87,1),je.seashell=new Ue(255,245,238,1),je.sienna=new Ue(160,82,45,1),je.silver=new Ue(192,192,192,1),je.skyblue=new Ue(135,206,235,1),je.slateblue=new Ue(106,90,205,1),je.slategray=new Ue(112,128,144,1),je.slategrey=je.slategray,je.snow=new Ue(255,250,250,1),je.springgreen=new Ue(0,255,127,1),je.steelblue=new Ue(70,130,180,1),je.tan=new Ue(210,180,140,1),je.teal=new Ue(0,128,128,1),je.thistle=new Ue(216,191,216,1),je.tomato=new Ue(255,99,71,1),je.turquoise=new Ue(64,224,208,1),je.violet=new Ue(238,130,238,1),je.wheat=new Ue(245,222,179,1),je.white=new Ue(255,255,255,1),je.whitesmoke=new Ue(245,245,245,1),je.yellow=new Ue(255,255,0,1),je.yellowgreen=new Ue(154,205,50,1);var NP=je,Go=class n{constructor(t){this.hsva=new ig(0,1,1,1),t&&this.stringToColor(t)}static from(t){return typeof t=="string"?new n(t):t instanceof n?t.clone():t instanceof Ue?new n().setRgba(t.red,t.green,t.blue,t.alpha):t instanceof ig?new n().setHsva(t.hue,t.saturation,t.value,t.alpha):t instanceof tg?new n().setHsla(t.hue,t.saturation,t.lightness,t.alpha):null}clone(){return n.from(this.getRgba())}setFromString(t){return this.stringToColor(t)}setHsva(t=null,r=100,e=100,i=1){return t!=null&&(this.hsva.hue=t),r!=null&&(this.hsva.saturation=r),e!=null&&(this.hsva.value=e),i!=null&&(i=i>1?1:i<0?0:i,this.hsva.alpha=i),this}setRgba(t=null,r=null,e=null,i=1){return i!=null&&(i=i>1?1:i<0?0:i),this.hsva=this.rgbaToHsva(new Ue(t,r,e,i)),this}setHsla(t,r,e,i=1){i!=null&&(i=i>1?1:i<0?0:i);let o=new tg(t,r,e,i);return this.hsva=this.hslaToHsva(o),this}toHexString(t=!1){let r=this.getRgba(),e="#"+(1<<24|r.getRed()<<16|r.getGreen()<<8|r.getBlue()).toString(16).substring(1);return t&&(e+=(256|Math.round(r.alpha*255)).toString(16).substring(1)),e.toUpperCase()}toRgbaString(){return this.getRgba().toString()}toRgbString(){return this.getRgba().toString(!1)}toHslaString(){return this.getHsla().toString()}toHslString(){return this.getHsla().toString(!1)}toHsvaString(){return this.getHsva().toString()}toHsvString(){return this.getHsva().toString(!1)}toCmykString(){return this.getCmyk().toString()}getHsva(){return new ig(this.hsva.hue,this.hsva.saturation,this.hsva.value,this.hsva.alpha)}getRgba(){return this.hsvaToRgba(this.getHsva())}getHsla(){return this.rgbaToHsla(this.getRgba())}getCmyk(){return this.rgbaToCmyk(this.getRgba())}equal(t){return this.hsva.equal(t.getHsva())}hsvaToHsla(t){let r=t.hue,e=t.saturation/100,i=t.value/100,o=(2-e)*t.value/2,a=e*i/(o<=1?o:2-o)||0;return new tg(r,o*100,a*100,t.alpha)}hslaToHsva(t){let r=t.hue,e=t.lightness/100*2,i=t.saturation/100*(e<=1?e:2-e),o=(e+i)/2,a=2*i/(e+i)||0;return new ig(r,a,o,t.alpha)}rgbaToHsva(t){let r=t.red/255,e=t.green/255,i=t.blue/255,o=t.alpha,a=Math.max(r,e,i),s=Math.min(r,e,i),c=a-s,u=0,f=a===0?0:c/a,_=a;if(a!==s){switch(a){case r:u=(e-i)/c+(e<i?6:0);break;case e:u=2+(i-r)/c;break;case i:u=4+(r-e)/c;break}u/=6}return u=u*360,f=f*100,_=_*100,new ig(u,f,_,o)}hsvaToRgba(t){let r=1,e=0,i=0,o=t.saturation/100,a=t.value/100,s=t.alpha,c=t.hue/60,u=Math.floor(c),f=c-u,_=(1-o)*a,I=(1-o*f)*a,S=(1-o*(1-f))*a;switch(u){case 6:case 0:r=a,e=S,i=_;break;case 1:r=I,e=a,i=_;break;case 2:r=_,e=a,i=S;break;case 3:r=_,e=I,i=a;break;case 4:r=S,e=_,i=a;break;case 5:r=a,e=_,i=I;break}return r=r*255,e=e*255,i=i*255,new Ue(r,e,i,s)}rgbaToHsla(t){let r=t.red/255,e=t.green/255,i=t.blue/255,o=t.alpha,a=Math.max(r,e,i),s=Math.min(r,e,i),c=0,u=0,f=(a+s)/2,_=a-s;if(a!==s){switch(u=f>.5?_/(2-a-s):_/(a+s),a){case r:c=(e-i)/_+(e<i?6:0);break;case e:c=(i-r)/_+2;break;case i:c=(r-e)/_+4;break}c/=6}return c=c*360,u=u*100,f=f*100,new tg(c,u,f,o)}hslaToRgba(t){let r=t.hue/360,e=t.saturation/100,i=t.lightness/100,o=t.alpha,a=i,s=i,c=i;if(e!==0){let u=i<.5?i*(1+e):i+e-i*e,f=2*i-u;a=this.hueToRgb(f,u,r+1/3),s=this.hueToRgb(f,u,r),c=this.hueToRgb(f,u,r-1/3)}return a=a*255,s=s*255,c=c*255,new Ue(a,s,c,o)}hueToRgb(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(r-t)*6*e:e<1/2?r:e<2/3?t+(r-t)*(2/3-e)*6:t}cmykToRgba(t){let r=t.black/100,e=t.cyan/100,i=t.magenta/100,o=t.yellow/100,a=Math.min(1,(1-e)*(1-r)),s=Math.min(1,(1-i)*(1-r)),c=Math.min(1,(1-o)*(1-r));return a=a*255,s=s*255,c=c*255,new Ue(a,s,c,1)}rgbaToCmyk(t){let r=t.red/255,e=t.green/255,i=t.blue/255,o=1-r,a=1-e,s=1-i,c=Math.min(o,a,s);return c===1?new Rw(0,0,0,100):(o=(o-c)/(1-c),a=(a-c)/(1-c),s=(s-c)/(1-c),c=c*100,o=o*100,a=a*100,s=s*100,new Rw(o,a,s,c
39))}roundNumber(t){return Math.round(t*100)/100}stringToColor(t){let r=t.replace(/ /g,"").toLowerCase(),e=NP[r]||null;if(r[0]==="#"){let a=r.substr(1),s=a.length,c=1,u=[];if(s===3)u=a.split("").map(f=>f+f);else if(s===6)u=a.match(/.{2}/g);else if(s===8){let f=a.substr(-2);a=a.substr(0,s-2),c=this.roundNumber(parseInt(f||"FF",16)/255),u=a.match(/.{2}/g)}u.length===3&&(e=new Ue(parseInt(u[0],16),parseInt(u[1],16),parseInt(u[2],16),c))}let i=r.indexOf("("),o=r.indexOf(")");if(i!==-1&&o+1===r.length){let a=r.substr(0,i),s=r.substr(i+1,o-(i+1)).split(","),c=1;switch(a){case"rgba":c=parseFloat(s.pop());case"rgb":e=new Ue(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10),c);break;case"hsla":c=parseFloat(s.pop());case"hsl":let u=new tg(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10),c);e=this.hslaToRgba(u);break;case"cmyk":let f=new Rw(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10),parseInt(s[3],10));e=this.cmykToRgba(f);break}}return e&&(this.hsva=this.rgbaToHsva(e)),this}},BP=(()=>{let t=class t{constructor(){this.subscriptions=[],this.window={pageXOffset:0,pageYOffset:0},this.mouseup=new Te,this.document=Rt(Qi),this.elementRef=Rt(ge),this.window=document.defaultView,this.requestAnimationFrame=this.getRequestAnimationFrame(),this.addEventListeners()}addEventListeners(){this.subscriptions.push(Xt(Jn(this.elementRef.nativeElement,"touchstart",{passive:!0,capture:!0}),Jn(this.elementRef.nativeElement,"mousedown",{capture:!0})).subscribe(e=>this.onEventChange(e)))}onEventChange(e){this.calculate(e),Xt(Jn(this.document,"mouseup",{capture:!0}),Jn(this.document,"touchend",{capture:!0})).pipe(Be(this.mouseup)).subscribe(()=>this.mouseup.next()),Xt(Jn(this.document,"mousemove",{capture:!0}),Jn(this.document,"touchmove",{passive:!0,capture:!0})).pipe(Be(this.mouseup)).subscribe(i=>this.calculate(i))}calculateCoordinates(e){let{width:i,height:o,top:a,left:s}=this.elementRef.nativeElement.getBoundingClientRect(),c=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,u=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,f=Math.max(0,Math.min(c-(s+this.window.pageXOffset),i)),_=Math.max(0,Math.min(u-(a+this.window.pageYOffset),o));this.movePointer({x:f,y:_,height:o,width:i})}calculate(e){if(e.stopPropagation(),e.type.includes("touch")||e.preventDefault(),!this.requestAnimationFrame)return this.calculateCoordinates(e);this.requestAnimationFrame.call(this.window,()=>this.calculateCoordinates(e))}getRequestAnimationFrame(){return this.window.requestAnimationFrame||this.window.webkitRequestAnimationFrame||this.window.mozRequestAnimationFrame||this.window.oRequestAnimationFrame||this.window.msRequestAnimationFrame}ngOnDestroy(){this.mouseup.next(),this.mouseup.complete(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t});let n=t;return n})(),Qu=(()=>{let t=class t extends BP{constructor(e){super(),this.renderer=e,this.color=Pl.required(),ol(()=>{let i=this.color().getHsva();this.changePointerPosition(i.saturation,i.value),this.updateBackgroun
39dColor()})}movePointer({x:e,y:i,height:o,width:a}){let s=e*100/a,c=-(i*100/o)+100;s>10&&(c=c<1?1:c),this.changePointerPosition(s,c);let u=this.color().getHsva(),f=new Go().setHsva(u.hue,s,c,u.alpha);this.color.set(f)}updateBackgroundColor(){let e=null;if(this.color()){let i=this.color().getHsva();e=new Go().setHsva(i.hue,100,100).toRgbString()}this.renderer.setStyle(this.elementRef.nativeElement,"backgroundColor",e)}changePointerPosition(e,i){this.renderer.setStyle(this.pointer.nativeElement,"top",`${100-i}%`),this.renderer.setStyle(this.pointer.nativeElement,"left",`${e}%`)}};t.\u0275fac=function(i){return new(i||t)(h(Ni))},t.\u0275cmp=L({type:t,selectors:[["saturation-component"]],viewQuery:function(i,o){if(i&1&&ae(VP,7),i&2){let a;Q(a=K())&&(o.pointer=a.first)}},inputs:{color:[1,"color"]},outputs:{color:"colorChange"},standalone:!0,features:[Ce,ot],decls:2,vars:0,consts:[["pointer",""],[1,"pointer"]],template:function(i,o){i&1&&O(0,"div",1,0)},styles:["[_nghost-%COMP%], [_nghost-%COMP%]     *{padding:0;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}","[_nghost-%COMP%]{display:block;position:relative;overflow:hidden;height:50px;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGaMcZrb1M/tdrvf7/d2v99P9/t93O/3cbvdxu12G9frdVwul3E+n8c///nP+2+//Xb66aefxl//+tfx5z//2YK5Al2rgvf4UsbpdGrB52bAvArXpuzjmiqAVSGz5eDmGYXzhbAZmCrnmzddpUU+8Y1dAOYeXCtDUwVwV7YCGH6uAmyMcZ9l5vkUaBPGMUZ7/J5w/792/fvv9Xq93263dr/fTxPECeME8nK5jM/Pz/HTTz/dv337dvrll1/GP/7xj/G3v/1t/OUvfwkVswongjdOp9PzH3U3D3zmWGnZVXn4jCqs7wC2BKP4/8tAzkZsoWx6XrqeHZymvp4ABCBJhTQwKfDT8gzrZCIqi5AhiACjBfEB2rP8/X63MM7f6/V6v9/v7Xa7bYC83W7jcrlsVHIq5ffv30+//fbb+OWXX8ZPP/00/v73v4+ff/75JSvbeu+bL2WMMaFbAlpBNM85QX+ct6qoSqkPAwuQlBVKqGNFSUOAA3Bmu7gC5hNOd15nSwvAOUW7C4giUCV8Sgn5L9hNFIqTsp0GxI0ysioyjAjkY/tGJVEpz+fz+OWXX+7fv38//f777+Pbt2/j119/HT///PP49ddfx8fHRwrmTjV779EXu2px2xhjwtdJZQcAWQIPLPISsMJaSwiD8gzIKrwSyATE5j5nAbR5c1dBUwBlsEWW0h6LqiYsqFPAQxCyRZ3wOSARxmlXMX5k64pQfvv27f75+dk+Pj5OHx8f4/v37+Pbt2/jt99+G9++fRsfHx/jcrmUFLO31gYDWblxRIs/TqfT7ousxJsAxXA2Gc7TA9XdgfdoHbFsj76X2+1WArgI1ageGwA3qupqoHsmcbI6Fu93quggFa9d7LeDtgKfAFHBJ+NEByIkcJ5KervdTmhhGcgJJSZ5vn//fj+fz+18Pp8+Pz/H5+fnmGD+/vvv4/v37+Pj42N8fn6O2+1Ws7JjjP6wraMI5E4RZ8x2vV5TSwkquotV7/d7Tz6HFWsD/qNcdw0CQ3q/321c686TwDVIdbuy73zNldhSHb8I2klZznm+InBS4U6n0302aBFsLhHDAKJVJVglfI9jhvu53W53sLANYNxAiDA6MCeUHx8f9+v12i6XS7tcLqcZW57P5yeY8/fz83Ocz+fnsSmYUyknWEG85WBst9stzSLyMdfr9Qi08iY15UZ0LlDGLhR3o5zK2j7OPUTD0E+nU3tk7Xb/16NFbhloAMuY1zjLUOO3BKeIDe+Z8s3/J4gFo4TM5jPmuRg28foUKKVSwo16TgA5npywcWLHgYl/Pz8/73/605/ab7/91m63W7tcLie0sZj4mao5gTyfz88E0f1+j8EcYzwTPEG2cqjyfHNF0M8fuqEiaOVnRzZZQNh5fwQyHg/HDGfJo89Q1zb/quu5XC6773I2XKfTqd/v9+d3wuqWva/YTdUdEV3fhIv/Viyps6YE3x3r43K5bJQS66zaxVGFsvd+//j4aF+/fm3fv39vt9utff36tf3+++/tdrudvn37ZuNLBaaCMgUzC+rZRiFowxUuJI8YMqcCp9Opq5vagaYU6lGJA1XQqejchw6Cj0Gw5nYBrGw01A2O206n04BGouNNyTfp/FwElhUey6nXrIKw7QQWddxuN2ldL5fL839gSPF8ahu/JvBO48CPSuqMf8Vp9/P53L58+dLu93s7n8/tfr8/39/v9/b5+TkhPJ3P56mQ436/j+/fv+/iSgbzer0+AZx/5+88bv6OMda6S5z6kd21fYC9dxv7cIJJ2d9AOS30fPMzyHiTM8B4DF6XUlYHp4KQW3W+1t77MNB1vGHxWq7Xa7vf78+y5/N5A+H1et29xuP5dbYtyaRu4AksbPq6936fjRzXRxBbPr/b+b18+fKljTHaBBBfn8/n0/1+H1++fBnn8zm0sB8fH5u4cr5GuBhMVk0EEn9RsctgVhM+ixlJtMA23R8B6yysAstBOgFXIKKCMIgToMqNEu2fYMH7ztc732dQKkCj1ytAZtY0Kx8pIr8GGJ+AT3V+2Hirhl++fBmXy2Wz73w+b17P8p+fn8/tUwGVleVkTyUb68DkfayWY4zxNRihU4EpLJPZVrK+u7J4/mgfKqeLW9X2REWlItL1diynbDDb3+jXgYjQqn0rrxWc+NkILP7F7xIbMvx7vV53x40xnlbWJF12ZSag/N0pW6t+ZzmOMzHjajKwDfond78zYTdfq18up97zr2q8v3IioBprRtBl0EZ9og5WBRGOdOHjIjXF7UotFbgOWnXzIJyzYvjG5IYgsmMOxHkz8OsMSrVNWeq5T8DaOcbEv1Od
395rbs9aO7YvMet63EkF++fMExq+MRl4/L5bLZN/+ez+fnZ6KazuMqXSQVO5spJXflHAIzes/xJseckRJiDMog9d6VfRrqXMr6KpVV27jRwJacGovOAM1zMdQMnwK1AubK63kdCChvI1C7g0z9nf/D+Xze2Vj8H7Gx4P9duQlsYCrqyN8XqG3Hm/10Oj3jw/n+crlstuM+jPmmxT2dTuPz83Pzt2pn1XsEHX/bnPaVqVmh0xwOt0o6XLLAHePUU203wHfcrspCwmV3TryB5s0Mseeg97x/BwzCjBlbB+pRAPla0BVQuT6V6QHdBlj3d0KG147b+DqxQeUymDO43W4dQar+TIjwmAd0z8/h65vf0/yLv3Pb5XLpru/ydDo9s7ET0I+Pj6dKK9VUEIeKWQWPAOrJ8LKd4vE+t91Y3e7UFlWatg2VwJnb+HPmtvm/sfK59/OaWF3x/eP1UPHvA5DDYDpYXfb0drv1V2DkBkxtw/tEWVVlXWdC9pFYs5/jfh9dS/16vW7s6lTG+TfqsxSJHxkXXq/Xdr1eu4LsfD6P3vsT3N77DkL+zPm5jSdKL4zR3AxQd6rHkLkYlSowsrq7znzu6wSwdsMJOXmA5fBcjxtgMGBYHlr5zokhtsMCTgXLQOW4XC6dEyEMprL8mAQzXRgduix2yZzorxkYsDn3hB1VeMLGsXsVtgl2pW8S3svk0vw7R4hNaHvv4cACl5HFzwIH0Kc6zu4XjDPR/jpAVxWzO1Xk2DDb3vTcxeGU1iWZHkmIDWziWKvirCJ4Dravs6IJ/GG6cTqWdXDy+fArQDVVkLqkVjAoZIITdmmIqXwqa95N3+MGYoZQdRVNO53Y1xRkhO16vY7eu507Ca9lJnbGpxOemQhSw/AQsmmp5zU9BiU8G6wvX76M6/U6Pj4+do0Bz4CpgiknTUeDqwlKBmg3u4OVjrZ1A+rAcgaejWq6eJCvCYFDONSwOgHX4EQRw8lxbzDOdEK6gZ3Hk1b+8g2o1JFtKXyv/fEdTXuWjWXdAZiBp6ADeDrCFiim7B6ZFneeI7Gvm/PMkUDX67W7xI8b0D7/v8dA9qfN5oaCf74WZjH0mf1cmfY1Y0JUFmVrTWu8uzkNcLtEj7u5FXBTkfC6GOA5q8YMxO8KVvF6sAVGdcrUbsKODcQKkLMOMdmlxum642YrPm26AlhZW1YB1R+rrGswE8TaYAWeUMxdf+WjwSvZ2Ef3ytOyfn5+PpVPAaqOn43MtNBqvmjjxbjM4lZjZY4gqNMI5ktaW/sYKNwS+9lFQzGihmMCKPa7+Z0V6Eb0GRmobtpX8JljWu5FMLN5ja6hG9kwQgZqf5+1NH5UxzkFReCdWhJ8XdlGUkxO7HRlYRm4mVO43W7ter12TPJEw/rmEN3L5SKHIWZg9mz+pUoKOYq5bJTJdX2gme1UcxMZQFaEQIlHct32M+Y1BzGkGuzfiyAN9z+ugplZ1symCrDCYYkGxDTpI9RzBy0rHyeDUC1nWaeUaD9n4xkNyYMBDZtzZ3B++fJlY21XFDOcARJlabOyiS3uCpLI9jrZjCDkaVvcCCjwognKShWdzXZWlZMvVTgD8LpqlCLrqgbcB+qYwrgKYpT0ccCqbKyCValkEabn/FynogCrPKfqf51xJ7sGB2ZXcZmxoSOztjx300DZi7a0/2AIR0UlBag9SuDw6KcAzlaB7vHZvWpjK90dyrq6bKyDUZQbR0B05biLQkHIcSUmgIK+SwuqgHCnoio2RQU1yj+BnBy9pphVKLGyC7ZzFK1pxWK+E8IhVCWLN/uLtnUU4ayoYLoaANz8FdtaSvY4pV0BEW2ls61czqllBKpTyKgMAhrZ1cdc1RROtPmvWNkdcKZ7ZKxaWjiPLJMpp7OZKxA+rqG/oJLjxf0pnJlqLoDZo3gyU0mKGys2taKecj/d1C+rJSplBqlTyAqgR+D8KjKlmRL2gtUcAdCtsL+ijCNT1oqqqkH2OHEbG5sDFnUg5Aa+yLou2VU1ptj1S2ZQqv1ORZN9IWzRfgaRBxKoBE8UWyqlJFtrIc0AxNjSjed99CTY/XDfSzCz5M0IZoVEsWnPFNTsl8ooVC1TzbGgqFZNDSgVwKK+1sGDMKqxZCWGVMDysiEr1jVSQJUYwj5iHOlThdHt44SQg9CN+nl8D90NMIgAdgr46JqRiR9I8vRdFvbr17m/yxUMKjNLMiVUADwu2CWGhhi+F55TWM9M9cogzms1dnM4uOF/LAEYWdcqnM7yFmyq3IfwmOROd7Y1iFWtOjoY8To41mTV5IysgFFuRzsbWFGbNIIJCDv1dOo4lZG7jWBwRFtVTKuWyeCByJKOan8oZ3ep9XddNl0tDuaywLz9cXPYeDAA0SpkBO9sbVcTOVWldPv4uyzEkzxHtjvonHoSkFEWNoo1d8DhcQputd2ppNon4BzoAiJ1hBFQg0dVtdbGHHDQWushmNEQukLM2QO1G2Y8bgTXqFhcBJj7EjPgcPts8US8qPpPB/dXznOh5Z438tzH5ec6QgrOKrRRfKmysBmUDB+PhYabMlVPER+GCSITTzr7am2tArH3bgcEzPJm+cr5jJ4NnHNFDVrFXcI5Le9k5Jnw+bedbV+FfRzZIHaOOaOsLY0/7UGs58DjrGwKMIMFIGzOEW1/jGsdAtCN6hEAI4hBe9YXeRROBSVPAVPAqvIM5bx5hVKWAMP6zBRy3iescridVdFBinBxXDnG2GRY2XbCvp1lhvGtO9Bxu5h908XQu42lnSArMFdizMim8uwRCxPGnnOS8lwpnbOiDqTAjsrRN/PcoAScCbaACqVM40ylnjjTBs+bwWlAG23/UKbdkiwKWIQPGzWaczpoSlxPEj822cNWkpS7FyzsDrqpfgpG3jahw2vgbaSQAxuLWZYt7JzyNe8JoZpNAcvDFOdw0wqYT9AK1rZz/DdbSlLPp0ryIxgQJlK9AZlEq7IOXpohg9PIhrCng88JsOxiV4ZWAYfg4sikx/8ky2Z9l862uqwrfscIH8+ugTmVGyiddeVYUgEMn4GZzg14EwIsh9sx2cKKiWXReuOE5gzGOQgdlRKVVdlevqb279Xq0Qnsts2VDaBO0coezsruWtHApu6sKG4IBhN0aGU2kLrMKGRTN3HmbCDwKV14zvkMEDG4QfZVspVlaNU2mhc5TEZ3N1h/zqTheuLpW05ZWTGVjb3dbnNmxKZBnN8JqidaVLKAOyARNLS+MB54Z2+VaqoMLKroVBlngefnTPAcoHNWCSvlfA8CI0HEmBNBnBlXyMrzU7A7WVm94PPqQ2gmqKx+WDGsnvilmcSOBJqOK1nYyAIzuAyesq3UdSK3KfWcYKD95HmfYOU3qser2CtYEUA+FpfqdNvgPBZUBhDrGONRVlQsh8rLcaUCykHG0OOUwTlLBrsh5soEMGezi1E4HRVt1icp5wZEFXdibCkG8Y8vX75sbO4E0iom9z+hjSiOfy3DhpXItpVhE+UGQdvoWjtChmrGHf4YAzKgBNnGtuJxFCeGdhUAfQLLK8kBYAP6gvFJZajMG3Xkycy8KuC0q4Eyymwtwdxdv2M0mIBtK0LKnf640j00Auq4gUkdWGlhs22qJc6dZCsL19oxnlTJG4SYVRIGpD8TPFBuM6OElbS1pldid4mGAyN6ZIupbC5bXJN9fdpbThSxLUaI8IG1XIYBxW3Tjs6KQosKcxfxcQmdnwRGM10GnFcCy2XYunLMyAkdgk4mePiczsLygthcBut6goOqS7YVFXADLjaosB6s6ofcZWAZSIRYqSUkizYwttYab3vUOQ9w2HRxIIg8WwRVeE68xi4UtL3zRphxplzwuZrcqYCq1I3jPI5dnJIygEohMbPqVJSzrwzxBJTs5zN+ReUSgxikPQVF3JVBeNQxbHENrEMNvEdFZVV9lH9+ORGEsNZQpyTNc4C3AG7XF4ngzq+DrO2zbuaaOXgdaFcdkEotoSFBVX2qJ0C8OWZeG4KGlpghA0XfTOPCqV2qqwQ26QWfF2PMLhI2w1lVAa2aPsYd0za25MQRwgcZN6uQDCi+ZxiD4XEM2kZxOT41FnZnaRlcpZouzlRqqdbQVWopQoSB58RV50lBNrHi/AwXS5LrwDVlpY3Fc3ByiYGc52Trist6kOXdwInAQtJpp5QchyaquYOV7Su+fxVMaV3dc0RE2S6mUY0gLt2pMcYqrKIQ9w2l1gpQUMtQYcmmbt5DTNxdhnUCjQqtbK9SUSzvrC0mmhhE1e2FS2+oxypy/ZASutkmtjx3vcBC24PX65nbqkBCRhfjS9kIYPnee8cMagVOhI/3T1fAmdtAWZsCswTJCkQVNa0qWKSKPOpHAUhD9DrbVcyoYkwqhvh17vYAayXLQyKGYdxlUDFp494rBXRjYgO17DDYetNIUj/ezp6S0lnlpEwsWmJMkOwsKXeZKEAjIHn0EQJISaRBcO6UMINz7p/bEjjnw4ft+xmDvksxX4G2rIris7qaeKwAFMP2Oi7n4criuZwtpSUwpfLxSnORSrIqusc5ZFaXysqRWjiZ2DyAWEIL35tVSoQElFACjOeGGSE7AHEQgdo/LSvCOgGBvkxsmDbvlS3Fp5vhaB2TAGqRKrKKMrhLVpaGzEVjZ0OQxDhaCTA+QyRR1d15aQzrJntL3RibsipjG6jlgL4yqbS0sNYg1e84vhbBVrElK64CUcWYXDfKxhpIuxiVJZUxsbMy/uRBKTNRQ4kQ3LdRYLS0rJjRPlTPqY6gdJsEDc+aQXAn+HgsNUCbRuF0Oj0zwnA7bWDkbhO5Ens00qeQhS1laBMl5M/cAaxsLF8rKyql+Tf7ELLEGu/ixiimdCvo0TjfpjKwaggen4eh5v7LokLKbLuyvHhcZG8dhGrEDx7Hg93ZppJF7qBqO3iVveXEDQNInzeoe8Yq6ePaZBZ2JviM3W2UAGotekRCAGq4EkF1X3DOnR11yRsBL1tRa0PVcZiNFXZ2c34FskvomInQQ6lzpJoZbJxk43NwKJFBquJSsrByHydxKOnTxQASBmS3j+JMnsHSla3Ec6K9VWoJVn9zfjwOM7hqYAAqJQwE2a3nA48J2QGegRkpZNivSY+ys3EkKd4oJIwsvIHl3cWgLt5k4NH6OmtLWdpurOkwEMupYc7eMtDRhOcI2ui5JhVIzXzLyto/GAPuZoyo8wkoduVgJglCt7OhGbgID4Mq4si+63zUS1FuFFXFlqyaj2emHlLMcBqYu0FMuR28BbB7lOxRMSiCQXFhCKuwkhZ+pYDiGSgbsKKV8MiSRsuHSIWM9rklRiIlZZuqXjsQK8ooYJMgq3JKWVkhHbhsVxFUzthOWPkYijcbx54IKsSdT+uLr3crGKyoYgFiGR9iBk4kfloUX+JIlQRQqabmpgnhqtpQpb6RVQ1WH5DnrS4hEoGZqaerQ2dhFbz8XePxShmDbo70eISjoorO2vK8SJXI4SUmEU4zWKDzUDtWTYw7xXlbSTEj4FRg7zKnKoGRALv0Gs9Tgc1BpCywGZRQAtqVz2xrBcAMzEpfZwFSa2G5W0QBFjSMapWAEFa3HcGN7CxDzECyIkJ97qwrqWNTWVo876PPsjPkj2wvgroM5lLZKMETKVql/CvnWVFiFa/SzJUQwkoZsr67Y6vlSRV3/2tmNTOY3vnaxYwMuoPKqdzR1w7IqHymlPxaAThfU7Ko2ZXYj4AYJHL+kNdKwRQYESTRa5fsUZ/rVC1TMTyWVyYoqNtuza
39HsMyv2tvoarxdfqwYgU1axFo/cnql1FGsqK+uAROV8BX4GU8WcZTATi2q7Qcyi0O0V+GhWBMNRUkn8H1SsWVE5By3Gi0ECqUeJoBfAtDa4amkdXG37AGP5Ggeb84p7UazpoKRzdFzeQ8HkoHGxprKy/Hpm5t12p47J6xTYDEz7uINEXSuxYXvFskYAc+ySxH9sf5ftKzU6IbwVBcUGg5e5FMCEXSErZR0wGayV19woM9guPjTqJdVTqR4uE4nJnLldWVkECCZLd2VLF+xtamex7IpiriSDUpvrpn9lrwGMCHyppMH+ps6LILsuFGUj1XEOXiqbqSHPUKnClpWV68kqtURVNDY4TNaocykoYeTU5ngGEQa/S1DnnE4AeXMcKjHPAmFVjCBENaeyLVNHfr3px8xUstJ94hIpfH4HKE/eDaArK6lSyVVFbdt1gxTIVk3pppVlFXi4pEhVBTObquohU85MLXn1iahvUkHJjSCMc01tLFveVVBx0DodM6jftCu7DOtIzYxrc0qp1JGP2ayYFz2Gb6HvMrO8cnGtV6Gjm3uImSfD2GpWK6uowbZGMxFKQCo1pOMtcMXFpRst+hXGoAomF3sSTBGgTglbBKWwsQ3tZqaYSp0Z1CimRDWFcCJUPYJ00BI5FkKYNoifuQxmN88SWVXWLMaUqqqgC0BmQJR6sk3u9NCf6jYLXxAfqsYEgVLAhRY2AtgtflZNFmFyhxdrLkAdWlk4D88M2ixHyepIdhMHrG/iR1ZGtq0MGpbDbRPYOXeSY1M6Ny4ZstvGSktK+XbFPATj2D371saPEsAMXhXrsZ0km/XStkhhMyBfsa6uXFZe2VCe+YMr1+GKgwrQyNYq1VRrB+EizAow6NsdNKcyVEkYeM73ys6q4kAHp6BiFklTkIrVC5oYV7uzwOGCz4UJ0Stq2lWMJy4wtb+RetL6tZFicnJmBw5UjCvXXMZVJX2MQkbf+XN5EWd78Vz8/JEsMZTBiKNzsm1inLRUQ74H4NidaqI68j5sAFgxcRveC7ieLJXfQYxjZZ2CsiWFewZXJmBIlZ1tdtrX4hSuateKso/RZOtOKW2nmq1oTzeK6dRWAWu2NRVb4hq0SXm1GvtugHrbr5IXqmSktg5CuDE2MSlPwsY5kNE2Wp3AqiZbWVLAxiBF+2iBZbuNj6MB6rsMLC7FyasaYDyo7KkoPyEtw3pEMXfPvxAJi2jAQQgjrz0rLIZSWZlIoNhwd5xK4AR9mYNjWAaLrnuImJeBVN9zBORObVvbr+mTTfFSEJLSRnHo7hEJoIi8MFqjxmvgmF5URZz4zLFgZZ8Ctu2X7ggVccKm9gVxIsOHqxXgNMKnFWZYnf1dBnOhayXq17QwFlWW09eNKyVJFmXqaONGA5aCegMbJ3UUkGY1ic3nKWgjq8qfVYGQG1gRt6rs62a6HiqqUOqdesK5NmX4nGofJoiE1d0dF9lVVkvT1/kEEaaCoYOwFpcVcoLM+
397669PxC9rWqktH0sWUYld0VCpuBZ/stVRcGgy9WX2+U1Qthi9SzAqSxzZsy+OiFzBYnySGV6Gku44rD8BCOZBV3BvD5+AKRHNwMEsB6EzHnJpkTAeiUlEGkcECeB6GDZTp5YEJTlvdrknxYjTllMkfNtXwDjM7uVjK5JXUUn43rrqpK2jytaxHW0M5G8DC8rtHMYs7KSgduVQMGTYFqFvVS6rkD3sDJ46afdYFwoq11AOKCBLhvwoUgc8IGANycR6knZrdJPdsuxnyjfd3FovTlRMdEdtOl5CMV5EHsXQBis7TOwvIDZaGj2Vnpbh7cpK63VwYEMLwqbjzyl699sawFFkF1yqjUU31HfC6sW1ZFVFuXVXVgz9keEaw0ys1lWfm+azQAQSWA+hKYVfsZjPncAcUB9oIayy/UZXRNckDGji77GsWbvBo6tPrWPqOyVkBUq+INeqpzNdYs/u0ifh5qmpqIW+33JVSUcwY70KL4U9lYdU6ljtSls7lmfi9g3YzeQfVkaGFaV3ODCnaD2N8wsEDFklE3RzM3ZghdYkWHsszq70FIecnKkVkt8ezMzRq9bkGuKojRLBVSod3Y1yPqKgYW7JRQTPVyy5xIYLjOgxgT52RKJUY1dOrIiRd4futQx/A5AcSmEjz0vFWrkLzvbWAu9HOWbGgxFk1VNTpnBKk6TgwisI/HcxYXP1uAWO72ULFlBTq+aSu2VTUs6hrxM2CF+hEor1VIA9ZmFUaab1lSSgZsVs4sxzHlVLoJHr9H4DhONTkI1XC0/wiY2NoWAG5RlnHFnq6oLccpQddMuJ/O17JVA5OHLi0BqCztq7Y1++ucCd98qLI8MIHBV/cKjxQTme3hFBS3MyCqnDsuym2o80HjvFFTtrURmNaGJsmVahImjTsUXKtQZTAVs7Mvv8/+fzUrZAXcLJ6M4koe6XP0b6SmWWNDzyUpQ8bl+LtWx4tuqZ36cRYV3yuVxPNwvIiqiQCSmu7srgTzR6nkyhpCarXwFy1vGd5iP2cY06lFr5Njhhg1Y6+NB28ftbK83s8rf7kLJbKwDFPbLg25a0AdZJEiqr5phixKMDlRUtcssq1hriLqGoH+zeNgVm9OemjsETV8JdF0NHnkIFxWY1OB4Yrp7rtWJ7NgAAAPXklEQVQ3oNs5nplyVf8u2FoLu1JrHveaZWQjqAkshtFa2gzsSG3Zpkbvg3HafF9slPPlldjFlK80Gysm8Mr4MPhneNWENPGjAIpmilTPATdTRTXlCBYHYAQuPwA36xIpWtGN4q3Y2MhiGsUpuSSnlEJRD8PorC7CFYVw+F51qThgabxsTxWzCGY0ZSsb3lfqAy0OPNjNy8xiQQKsHYFQ2HBZVvVbBuq3m1oWKajqaonsM6uZUr6CjXWNZ0l5E3h3jURma6kP3MJIiy1Lm+kahQq41N2iZja5sjtlLYNZHZrH6qUGm4vMbDp6Rw2CFmvuyFkrBcCyMtFqBaECmsHoK9BZ2LA/lJcRqSaDqnaWbrZdGaz3DLgIvBln4woGztbyJGqslwxkhhHrTjTYFXCtOoKS8uLdofVdAbOylGU6nlYpXWZts4nXBq6WxJitMNokHUJnbnJplQm+aGpY2a5GMV2QD1hRubBPFKdumf5OHkLHz0F9luE5kjBjRa0nFE5CUGqHw32MmjZ6xkgINVnSnZ1VZStK2qKlRaLlQgK7uTq7JFXJwM+3SOEKyhZNI+tJ0I5qMYy9k2qJD7dVWdqKXa0CKNR0Ccjg+B2IYu2fcBZJZkMFgM11r0X92wilghFGgzVnexlqB7xL9mS29SiYUVY2nXOZjNBRsyDsQPRWW5hrZ4XcdC4HVWRbjgJr4sFofK5SzjQ7rhI1UebdPdEbj6sqIvTZQZ5va08rABsAW0UxeWytAk7A2KJ9ZpxzCioB24XFtYAeXYxr6anSqhLgppEqWbGwLunTgrV+IjWlL29ljaAl4EQMGsErp4apeZiquwRXLXAqOCeru32mmydc6oWTSWpFAGdzeTB8RTHVMEtlM90CbbQCYhPjq3egYr1FGdYIQjiuDGZ5zZ/AzobKGOyLxti6c4Rwtv2anyWlLICnlLhxJRXt6A5ebDBWFNONbxWZ2d02mnu4S9YECpeppV1zSWRBWxHYzVIv1CXSouwqqX3jBBBDZdYQbpTQW4ZQlS8r5kH4suSRmg2++3JN10x1PaAmEkmtYlEdeGpJEM6kOuCqCR22oSujj5IV2HdT0zj5prLKTjXFAPjdQlyq7xIBxAQP5yMczG4VxAKw0n6ilZ2QBce2pLulkuxxqnoIzFfgqyqjil9S1VNwBrFmeyeops8yOjZUybZdfS8CuaTIJumzs5tODaNtLpFDQ/PcJGweLhmeL1nB0KqiUDScsiUVD89Di3HtrKtSULw3RLiygZD+7sF8JTObgYsrGvDNUFRGl1iy0Ll1YkUc2aJYMog920I8qW6YDCg1Mqk0JHJFKXkbgbRreI+qpYNOZHrVcDUba7pjsphSJNtK6upgRNAVoOS0mugBeN4bIZgHhuPZ/s1ENaX6KsVr+YNrh1Nb7ipR0PE5zbNRegCbrHRUw6Yf07dLBJl1f8KB9as2V1nNqAsl62LBBhehwalerkHmB1JFIEZKSEusdl5JQj1nJlHXSCF342gJ9CYGrXelknJIXqVP8sD+qtplCR3XH2qfKq0ygMp+KnVkKxNlZ8m2YkIlVMiCnXUwl7qznBKSvQz3m3Pt6oQbXO5b5FixCh/fHxUQW/AEcK6zCNqKQnL9sywqmKuwvqSYzT/aPVNNpVyhvRW21aqciCsjdWvBwILUvh5VyCzbWoC1pJjJ680CWsl+udKB6T5RwG1mlohnlpbg47iz5U9ha0FGtmRLFYBtO99y97Ap0z+ZDTAog6kSLZsMHg/IFkkgp6CpvU2U0cYVSdnmkjwBdOmXbxTWNWzuIbipMioVxEckZEoahSOiy2M3K0jcC1LhVDwaqG0ZvkcWqCnrG4GIxykrqlbWdw6LQyBaZR8HmLRIhQWsHswD42ZXVLNkf9l+FlW0HVQ2lwFsC/Z1FdzlQR0KaPfo+Fdfu+/dwVRICu1CGR7AEIiAhc+AZUF0kOBaPxmUqg4i64vQnU4nFDYJ9Nz+1fVXveH9qmr+kPILx8oKcRV/BFbxbE0JMT0kSD4w6L/lNY8ocsqagVdU3A3MjxhxcGuqzsPH4irpaow1q6OyrVjvp9Npc59E91LldboYVzJWdimWfAW2SNEKcDaX2FmBLLA/uKxlmhh613Is1URQApbKfttwxL02q6Onx5pQxSbPojAg+v5hAnN6LHVRDXIsvKtRjiS0qJUyZTAXVbAK82ElFJWaQdVoqUC1Unt7BVaTQudM6SuqexjQJN4+0icaxv/utbKv83ETbT8H8gjcOKxOJmbUa6OOVXht3dFY6rHv9XoNzFLceEA1o8+pKm0LAHPHZ2rYKjFq0hfZFixsqHJgD3eD5n+U0kb1mFjXkn2lvMSSOsNE/CdIAKF0Sytq6urOHUN5gwg4GZosgbmggM5ucra2qrS2Ig1cbiBBcxYzgzUDNLCvL8GbZXNp6ORy3LmS+Kk83zRIAK6A1ioKa2I9NapIuiUFdfC9766PFZUtqUr6KbWk+zZU1a/ZrIXEztrjTOfz7hwKziCeXIaraHtbZIMz+2pGgazCmw4qWAFvEdhodYp0Xq0pV7G1YWYWbO4qhGq42+Z8BYtrLWvluNPpZAeaFFS1vubPgbgxsqcpnAaszBovKaFoDQ8BGtjfUOl4NAG2nmQV04feJgumvX2fsrQEWZghL0JnVdYkn3DOZIeRN86RqPWCmsvGVqEMRnwxQAxwS8EMYo3IzmY2+BCcLp4MKiuyuhImamlbZFcNoNl7tp+RHd18ZjQIRKyXdFRhN98/hyKqwXWNo7O1wiaXoHN108REZZWEq6grnIfjzeg8jdRf1XEL4kkXa5bBjKxoKaljBjeHlVxQ4GaycpW4lDOAKtnTxHAtOfzOtZwHAM7sqVXkV6yu6kap1nHkXKqWF/4XHqjenNKqBjpR3l1ch3Ejg1+EsgdQhsdG0B4FM9sWAVWpuAyiwTPleZxt9VyZVS2qXfReWqTAilpr9ApoWTj
39xymit7NwV4JTriZyOA9B0k7HFfULourmKYHVnRQvqGL5HMHdqFcR2qWpmcK6eTwx2dipWrviDilr+fKWq3OWRWdHKwA4eu8wjchbeRzFilqjjZN3ufCpfkJ0/scVpnYk6L0PI77lxdWCZ87WiWm7B/AGquQSnujGKsB8CJmiJq8q1pKIVWyqOiTK66r18BN8r74/AE71fdC3yPS2MxdOpnE1tlVxD9JmVOoggN+r4PjAXVFPa3Eg5jVJGFVUGNolH20GVrUB7BOySWq6WqYQdWR92pcFMYMwckbSgCKCqD67DiiWu1g8MQC9ByfcFqW1L+jL714qNCuznoSxt0da2gtWN1G8F0BK0NN0nuimelUF9dIdAfjO44UT3CjQLoUeLHJFTO3gmpRuIIOvwBQCbqNeo3qtZ9iF6xVK13GRlo4zqimq+CGdTiR1uRY8oqgE02hZBa79kZXPMquxRHKla2saZWN4mRqZUj0vLCKhkjKnqOQHNuSZVJoKvAqS1wpEquvWDC1B2ypwrCPsRMEPVTODMLJMDv6qeKXwi2JYV5Sq4qKyvgGsHCLiuj2jR59V8gMqSJ2FJZRXEHVRHj3sFPrct6OpqlW1GpatQdt0GvwfM6n63InsGVFhJGaBqgqqIV6IsXllZgySPq4R3bnt3wi5cv+cN2yqQLW1T95KYVsWWtKk4cB9W53WQQflQYR6Wl4HaJZjvVE0D5yvq+RKgZCs5qdBEP5sD94cAvQLlSgNaSMAtHx88BuNQ41zdFsX30zKbcs0MLD/ihkpQzl0wiTqKLTfbKmCmyYICnK0IbaieC4CG9iSyLQ7cIMGQwau6TKoq60Apl3WN40LZpca1CKKK9VQyyIEn8w0F8F6CL2h8o3ixGwC7s7EWzCOqmcApYxYD4jsAzVS0sl2t98pA7vrKophCVSonbYpgH6mvSn24pTBV4sdtV3BtMq5k82y+IADvUJ0uAlkCVTxIaPm+UNu/qkV4F1TzHXCGrXIAqItBKypqK99VtAOVs64O4ObX7pHLVCpYHcRmwvLR7TvYAKBBN58LGVzDuFz+hQbWgncQyCZAk+VbsPSouf93261iZgmfCpwRbAvqmSqriU2PwhjaoOyYqtIegVXViTsmyta6bGySpY3gyRrpIyAeaWDDxtpsXwKyalMDKNP7YBXMqEskUsi2uC8FNAPxAKTVfT1o6VzM0E0jF+1rWcUuHvdyg7vgoFplX8HpvHpMCOMRUPHzZkInsqlFKNX/EIO52E0SxSzOwob2VmRLW5D1XIU0rbgM1AzWgyC7fe8G7xUAK/taEBat7luqtyP7EmsaJQOj5F+mrnZfCuYCfBUAWwShyd6pMY/vAHG1UqOYpbI/gy5T0CMKm+UO3gFuC85dgfDVeguPDfITrIBLsLrcgdh3CFgFZjaKJ4Iv3F8ANEqvuxR1tVKOgLoCa1jxboBAkj6v7j/icFbA7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==);touch-action:none}.pointer[_ngcontent-%COMP%]{position:absolute;top:15%;left:90%;width:12px;height:12px;border-radius:50%;border:1px solid #fff;margin:-6px 0 0 -6px}"],changeDetection:0});let n=t;return n})(),x$=new tt("COLOR_PICKER_CONFIG",{providedIn:"root",factory:()=>new VE}),VE=(()=>{let t=class t{constructor(){this.indicatorTitle="Copy color to clipboard",this.presetsTitle="{0}. Long-click to show alternate shades."}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:function(i){let o=null;return i?o=new(i||t):o=X(x$),o},providedIn:"root"});let n=t;return n})(),Ku=(()=>{let t=class t{constructor(e,i,o,a){this.pickerConfig=e,this.renderer=i,this.elementRef=o,this.document=a,this.color=Oi.required(),this.colorType=Oi("rgba"),this.subscriptions=[],this.renderTitle(),ol(()=>{this.renderBackgroundColor()})}ngOnInit(){this.subscriptions.push(Jn(this.elementRef.nativeElement,"click").subscribe(()=>this.onClick()))}renderTitle(){this.renderer.setAttribute(this.elementRef.nativeElement,"title",this.pickerConfig?.indicatorTitle||"")}renderBackgroundColor(){this.backgroundColorEl&&this.renderer.setStyle(this.backgroundColorEl.nativeElement,"backgroundColor",this.color().toRgbaString())}onClick(){let e=this.renderer.createElement("input");switch(this.renderer.setStyle(e,"position","absolute"),this.renderer.setStyle(e,"top","-100%"),this.renderer.setStyle(e,"left","-100%"),this.colorType()){case"hsla":e.value=this.color().toHslaString();break;case"hex":e.value=this.color().toHexString(this.color().getRgba().alpha<1);break;default:e.value=this.color().toRgbaString()}this.renderer.appendChild(this.elementRef.nativeElement,e),e.select(),this.document.execCommand("copy"),this.renderer.removeChild(this.elementRef.nativeElement,e)}};t.\u0275fac=function(i){return new(i||t)(h(VE),h(Ni),h(ge),h(Qi))},t.\u0275cmp=L({type:t,selectors:[["indicator-component"]],viewQuery:function(i,o){if(i&1&&ae(Qre,5),i&2){let a;Q(a=K())&&(o.backgroundColorEl=a.first)}},inputs:{color:[1,"color"],colorType:[1,"colorType"]},standalone:!0,features:[ot],decls:5,vars:0,consts:[["backgroundColorEl",""],["viewBox","0 0 48 48"],["d","M0 0h48v48h-48z","fill","none"],["d","M32 2h-24c-2.21 0-4 1.79-4 4v28h4v-28h24v-4zm6 8h-22c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h22c2.21 0 4-1.79 4-4v-28c0-2.21-1.79-4-4-4zm0 32h-22v-28h22v28z"]],template:function(i,o){i&1&&(d(0,"div",null,0),ar(),d(2,"svg",1),O(3,"path",2)(4,"path",3),p()())},styles:[$s,'@charset "UTF-8";[_nghost-%COMP%]{display:block;cursor:pointer;text-align:center;border:1px solid #e3e3e3;overflow:hidden;position:relative;height:20px;width:20px;background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC) repeat}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1}[_nghost-%COMP%]:hover:after{display:block;content:"\\a0";position:absolute;top:0;left:0;height:100%;width:100%;background:#000;opacity:.2;z-index:2}[_nghost-%COMP%]   svg[_ngcontent-%COMP%]{transition:background-color 2s ease-in-out;opacity:0;fill:#fff;height:46%;vertical-align:-20%}[_nghost-%COMP%]:hover   svg[_ngcontent-%COMP%]{opacity:1}'],changeDetection:0});let n=t;return n})(),Xu=(()=>{let t=class t extends BP{constructor(e){super(),this.renderer=e,this.color=Pl.required(),this.isVertical=Oi(!1,{alias:"vertical",transform:Re}),ol(()=>{let i=this.color().getHsva();this.changePointerPosition(i.hue)})}movePointer({x:e,y:i,height:o,width:a}){let s=this.isVertical()?i/o*359:e/a*359;this.changePointerPosition(s);let c=this.color().getHsva(),u=new Go().setHsva(s,c.saturation,c.value,c.alpha);this.color.set(u)}changePointerPosition(e){let i=e/360*100,o=this.isVertical()?"top":"left";this.renderer.setStyle(this.pointer.nativeElement,o,`${i}%`)}};t.\u0275fac=function(i){return new(i||t)(h(Ni))},t.\u0275cmp=L({type:t,selectors:[["hue-component"]],viewQuery:function(i,o){if(i&1&&ae(VP,7),i&2){let a;Q(a=K())&&(o.pointer=a.first)}},inputs:{color:[1,"color"],isVertical:[1,"vertical","isVertical"]},outputs:{color:"colorChange"},standalone:!0,features:[Ce,ot],decls:2,vars:0,consts:[["pointer",""],[1,"pointer"]],template:function(i,o){i&1&&O(0,"div",1,0)},styles:[$s,"[_nghost-%COMP%]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAA
39CXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC);background-size:100% 100%;border-radius:2px;display:block;height:12px;position:relative;touch-action:none}[vertical][_nghost-%COMP%]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAACWCAYAAADXGgikAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAJtJREFUeNrs2MEJBDEMQ1EZ5rTpv9TM1VuEBGbMTwFCfhdBqqWW8R79pOGAM95gQQCIIIIIYqhBdZvD8so8wQ644w0WBIAIIoggphqU3GGRuW2JgKPPnwAiiCCCuAWx1G0Oi7ltgYA73mBBAIgggghiqEFJ5rCYf3GBgDPeYEEAiCCCCGKqQbU7LDK3LRFw9fkTQAQRRBC3IP4HAGiDWTj81TDkAAAAAElFTkSuQmCC);width:12px;height:100px}.pointer[_ngcontent-%COMP%]{background:#fff;height:14px;width:14px;top:-1px;left:0;position:absolute;border-radius:50%;cursor:pointer;margin:0 0 0 -7px}[vertical][_nghost-%COMP%]   .pointer[_ngcontent-%COMP%]{left:-1px;margin:-7px 0 0}"],changeDetection:0});let n=t;return n})(),ng=(()=>{let t=class t extends BP{constructor(e){super(),this.renderer=e,this.color=Oi.required(),this.colorChange=_u(),this.isVertical=Oi(!1,{alias:"vertical",transform:Re}),ol(()=>{let i=this.color().getHsva();this.changePointerPosition(i.alpha)})}movePointer({x:e,y:i,height:o,width:a}){let s=this.isVertical()?i/o:e/a;this.changePointerPosition(s);let c=this.color().getHsva(),u=new Go().setHsva(c.hue,c.saturation,c.value,s);this.colorChange.emit(u)}changePointerPosition(e){let i=e*100,o=this.isVertical()?"top":"left";this.renderer.setStyle(this.pointer.nativeElement,o,`${i}%`)}get gradient(){let e=this.color().getRgba();return`linear-gradient(to ${this.isVertical()?"bottom":"right"}, rgba(${e.red}, ${e.green}, ${e.blue}, 0) 0%, rgb(${e.red}, ${e.green}, ${e.blue}) 100%)`}};t.\u0275fac=function(i){return new(i||t)(h(Ni))},t.\u0275cmp=L({type:t,selectors:[["alpha-component"]],viewQuery:function(i,o){if(i&1&&ae(VP,7),i&2){let a;Q(a=K())&&(o.pointer=a.first)}},inputs:{color:[1,"color"],isVertical:[1,"vertical","isVertical"]},outputs:{colorChange:"colorChange"},standalone:!0,features:[Ce,ot],decls:3,vars:2,consts:[["pointer",""],[1,"pointer"],[1,"gradient-color"]],template:function(i,o){i&1&&O(0,"div",1,0)(2,"div",2),i&2&&(l(2),hi("background",o.gradient))},styles:[$s,"[_nghost-%COMP%]{display:block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==);background-position:left center;height:12px;border-radius:2px;position:relative}[vertical][_nghost-%COMP%]{width:12px;height:100px;background-position:center 0}.gradient-color[_ngcontent-%COMP%]{position:absolute;
39left:0;right:0;top:0;height:100%;z-index:1}.pointer[_ngcontent-%COMP%]{background:#fff;height:14px;width:14px;top:-1px;left:0;position:absolute;border-radius:50%;cursor:pointer;margin:0 0 0 -7px;z-index:2}[vertical][_nghost-%COMP%]   .pointer[_ngcontent-%COMP%]{left:-1px;margin:-7px 0 0}"],changeDetection:0});let n=t;return n})(),jP=(()=>{let t=class t{constructor(){this.min=Oi(0,{transform:Nr}),this.max=Oi(255,{transform:Nr}),this.inputChange=_u()}inputChanges(e){let o=(e.target||e.srcElement).value,a=parseFloat(o);!isNaN(a)&&a>=this.min()&&a<=this.max()&&this.inputChange.emit(a)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","inputChange",""]],hostBindings:function(i,o){i&1&&T("input",function(s){return o.inputChanges(s)})},inputs:{min:[1,"min"],max:[1,"max"]},outputs:{inputChange:"inputChange"},standalone:!0});let n=t;return n})(),L_=(()=>{let t=class t{constructor(){this.color=Pl.required(),this.labelVisible=Oi(!1,{alias:"label",transform:Re}),this.isAlphaVisible=Oi(!0,{alias:"alpha",transform:Re})}get value(){return this.color()?.getRgba()}onInputChange(e,i){let o=this.value,a=i==="R"?e:o.red,s=i==="G"?e:o.green,c=i==="B"?e:o.blue,u=i==="A"?e:o.alpha,f=new Go().setRgba(a,s,c,u);this.color.set(f)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["rgba-input-component"]],inputs:{color:[1,"color"],labelVisible:[1,"label","labelVisible"],isAlphaVisible:[1,"alpha","isAlphaVisible"]},outputs:{color:"colorChange"},standalone:!0,features:[ot],decls:10,vars:7,consts:[[1,"column"],["type","text","pattern","[0-9]*","min","0","max","255",3,"inputChange","value"],["type","text","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1",3,"inputChange","value"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"input",1),T("inputChange",function(s){return o.onInputChange(s,"R")}),p(),x(2,Kre,2,0,"span"),p(),d(3,"div",0)(4,"input",1),T("inputChange",function(s){return o.onInputChange(s,"G")}),p(),x(5,Xre,2,0,"span"),p(),d(6,"div",0)(7,"input",1),T("inputChange",function(s){return o.onInputChange(s,"B")}),p(),x(8,Zre,2,0,"span"),p(),x(9,eoe,3,2,"div",0)),i&2&&(l(),m("value",o.value==null?null:o.value.getRed().toString()),l(),_t(o.labelVisible()?2:-1),l(2),m("value",o.value==null?null:o.value.getGreen().toString()),l(),_t(o.labelVisible()?5:-1),l(2),m("value",o.value==null?null:o.value.getBlue().toString()),l(),_t(o.labelVisible()?8:-1),l(),_t(o.isAlphaVisible()?9:-1))},dependencies:[jP],styles:[$s,"[_nghost-%COMP%]{display:table;width:100%;text-align:center;color:#b4b4b4;font-size:11px}.column[_ngcontent-%COMP%]{display:table-cell;padding:0 2px}input[_ngcontent-%COMP%]{width:100%;border:1px solid rgb(218,218,218);color:#272727;text-align:center;font-size:12px;-webkit-appearance:none;border-radius:0;margin:0 0 6px;height:26px;outline:none}"],changeDetection:0});let n=t;return n})(),Fw=(()=>{let t=class t{constructor(){this.color=Pl.required(),this.labelVisible=Oi(!1,{alias:"label",transform:Re}),this.isAlphaVisible=Oi(!0,{alias:"alpha",transform:Re})}get value(){return this.color()?.getHsla()}onInputChange(e,i){let o=this.value,a=i==="H"?e:o.hue,s=i==="S"?e:o.saturation,c=i==="L"?e:o.lightness,u=i==="A"?e:o.alpha,f=new Go().setHsla(a,s,c,u);this.color.set(f)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["hsla-input-component"]],inputs:{color:[1,"color"],labelVisible:[1,"label","labelVisible"],isAlphaVisible:[1,"alpha","isAlphaVisible"]},outputs:{color:"colorChange"},standalone:!0,features:[ot],decls:10,vars:7,consts:[[1,"column"],["type","text","pattern","[0-9]*","min","0","max","360",3,"inputChange","value"],["type","text","pattern","[0-9]*","min","0","max","100",3,"inputChange","value"],["type","text","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1",3,"inputChange","value"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"input",1),T("inputChange",function(s){return o.onInputChange(s,"H")}),p(),x(2,toe,2,0,"span"),p(),d(3,"div",0)(4,"input",2),T("inputChange",function(s){return o.onInputChange(s,"S")}),p(),x(5,ioe,2,0,"span"),p(),d(6,"div",0)(7,"input",2),T("inputChange",function(s){return o.onInputChange(s,"L")}),p(),x(8,noe,2,0,"span"),p(),x(9,ooe,3,2,"div",0)),i&2&&(l(),m("value",o.value==null?null:o.value.getHue().toString()),l(),_t(o.labelVisible()?2:-1),l(2),m("value",(o.value==null?null:o.value.getSaturation())+"%"),l(),_t(o.labelVisible()?5:-1),l(2),m("value",(o.value==null?null:o.value.getLightness())+"%"),l(),_t(o.labelVisible()?8:-1),l(),_t(o.isAlphaVisible()?9:-1))},dependencies:[jP],styles:[$s,w$],changeDetection:0});let n=t;return n})(),B_=(()=>{let t=class t{constructor(){this.color=Pl.required(),this.labelVisible=Oi(!1,{alias:"label",transform:Re}),this.prefixValue=Oi("",{alias:"prefix"})}get value(){return this.prefixValue()+(this.color()?this.color().toHexString(this.color().getRgba().alpha<1).replace("#",""):"")}onInputChange(e,i){let o=i.toLowerCase().replace("#","");if(((e.keyCode===13||e.key.toLowerCase()==="enter")&&o.length===3||o.length===6||o.length===8)&&parseInt(o,16).toString(16).padStart(o.length,"0")===o&&this.value!==o){let c=new Go(`#${o}`);this.color.set(c)}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["hex-input-component"]],inputs:{color:[1,"color"],labelVisible:[1,"label","labelVisible"],prefixValue:[1,"prefix","prefixValue"]},outputs:{color:"colorChange"},standalone:!0,features:[ot],decls:4,vars:2,consts:[["elRef",""],[1,"column"],["type","text",3,"keyup","value"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1)(1,"input",2,0),T("keyup",function(c){D(a);let u=me(2);return M(o.onInputChange(c,u.value))}),p(),x(3,aoe,2,0,"span"),p()}i&2&&(l(),m("value",o.value),l(2),_t(o.labelVisible()?3:-1))},styles:[$s,w$],changeDetection:0});let n=t;return n})(),xoe=Qn("opacityAnimation",[Ji("true",Tt({opacity:1})),$i("void => *",[Tt({opacity:0}
39),Vi(".08s ease-in")])]),Soe=Qn("listAnimation",[$i("* => up",[sl(":enter",[Tt({opacity:0,height:0}),df(-10,[Vi(".08s",Tt({opacity:1,height:"*"}))])],{optional:!0})]),$i("* => right",[sl(":enter",[Tt({opacity:0,height:0}),df(-10,[Vi(".08s",Tt({opacity:1,height:"*"}))])],{optional:!0})]),$i("* => down",[sl(":enter",[Tt({opacity:0,height:0}),df(10,[Vi(".08s",Tt({opacity:1,height:"*"}))])],{optional:!0})]),$i("* => left",[sl(":enter",[Tt({opacity:0,height:0}),df(10,[Vi(".08s",Tt({opacity:1,height:"*"}))])],{optional:!0})])]),GP=(()=>{let t=class t{constructor(e,i,o){this.pickerConfig=e,this.elementRef=i,this.renderer=o,this.activeColor=Oi.required(),this.color=Oi.required(),this.showDepthText=Oi(!1,{alias:"show-depth-title",transform:Re}),this.selectionChange=_u(),this.longPress=_u(),this.mouseup=new Te,this.subscriptions=[],this.addEventListeners(),ol(()=>{this.updateBackground(),this.updateTitleAttr()})}ngOnDestroy(){this.mouseup.next(),this.mouseup.complete(),this.removeEventListeners()}get className(){return this.activeColor()?this.color().toRgbaString()===this.activeColor().toRgbaString():!1}
39updateBackground(){this.renderer.setStyle(this.elementRef.nativeElement,"backgroundColor",this.color().toRgbaString())}updateTitleAttr(){this.renderer.setAttribute(this.elementRef.nativeElement,"title",this.getTitle())}getTitle(){let e=this.color()?this.color().toHexString():"";return this.showDepthText()?(this.pickerConfig?.presetsTitle||"").replace(/\{\s*(.+?)\s*\}/g,(i,o)=>e):e}addEventListeners(){this.subscriptions.push(Xt(Jn(this.elementRef.nativeElement,"mouseup"),Jn(this.elementRef.nativeElement,"touchend")).subscribe(()=>this.onTouchEnd())),this.subscriptions.push(Xt(Jn(this.elementRef.nativeElement,"mousedown"),Jn(this.elementRef.nativeElement,"touchstart",{passive:!0})).subscribe(e=>this.onTouch(e)))}removeEventListeners(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}onTouch(e){Z(e).pipe(W(i=>i.timeStamp||new Date().getTime()),nl(350),Be(this.mouseup)).subscribe(()=>this.longPress.emit(!0)),this.selectionChange.emit(this.color())}onTouchEnd(){this.mouseup.next()}};t.\u0275fac=function(i){return new(i||t)(h(VE),h(ge),h(Ni))},t.\u0275cmp=L({type:t,selectors:[["color-preset"]],hostVars:2,hostBindings:function(i,o){i&2&&Y("selected",o.className)},inputs:{activeColor:[1,"activeColor"],color:[1,"color"],showDepthText:[1,"show-depth-title","showDepthText"]},outputs:{selectionChange:"selectionChange",longPress:"longPress"},standalone:!0,features:[ot],decls:0,vars:0,template:function(i,o){},styles:[$s,"[_nghost-%COMP%]{display:inline-block;height:12px;width:12px;position:relative;cursor:pointer;transition:all .2s}"],changeDetection:0});let n=t;return n})(),S$=(()=>{let t=class t{transform(e,i=!0){return i?e.slice().reverse():e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"reverse",type:t,pure:!0,standalone:!0});let n=t;return n})(),T$=(()=>{let t=class t{constructor(e,i){this.document=e,this.cdr=i,this.list=Oi.required(),this.activeColor=Oi.required(),this.direction=Oi("up"),this.selectionChange=_u(),this.showChildren=!1,this.subscriptions=[]}ngOnDestroy(){this.removeListeners(),this.cdr.detach()}get className(){return`direction-${this.direction()}`}onSelectionChange(e){this.selectionChange.emit(e)}onLongPress(){this.showChildren=!0,this.listenDocumentEvents()}removeListeners(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}listenDocumentEvents(){this.subscriptions.push(Xt(Jn(this.document,"mousedown"),Jn(this.document,"touchstart",{passive:!0})).subscribe(()=>this.closeList()))}closeList(){this.showChildren&&(this.showChildren=!1,this.cdr.markForCheck(),this.removeListeners())}};t.\u0275fac=function(i){return new(i||t)(h(Qi),h(Me))},t.\u0275cmp=L({type:t,selectors:[["color-preset-sublist"]],hostVars:1,hostBindings:function(i,o){i&2&&lo("className",o.className)},inputs:{list:[1,"list"],activeColor:[1,"activeColor"],direction:[1,"direction"]},outputs:{selectionChange:"selectionChange"},standalone:!0,features:[ot],decls:4,vars:8,consts:[[3,"longPress","selectionChange","show-depth-title","color","activeColor"],[1,"reflection"],[1,"sublist"],[3,"color","activeColor"],[3,"selectionChange","color","activeColor"]],template:function(i,o){i&1&&(d(0,"color-preset",0),T("longPress",function(){return o.onLongPress()})("selectionChange",function(s){return o.onSelectionChange(s)}),p(),O(1,"div",1)(2,"div",1),x(3,loe,4,5,"div",2)),i&2&&(m("show-depth-title",o.list().length>1)("color",o.list()[0])("activeColor",o.activeColor()),l(),hi("background-color",o.list()[0].toRgbaString()),l(),hi("background-color",o.list()[0].toRgbaString()),l(),_t(o.showChildren?3:-1))},dependencies:[GP,S$],styles:[$s,"[_nghost-%COMP%]{position:relative;display:inline-block}color-preset[_ngcontent-%COMP%]{position:relative;z-index:3}.reflection[_ngcontent-%COMP%]{display:none;position:absolute;height:100%;width:100%;z-index:2;right:-2px;top:-2px;opacity:.5}.reflection[_ngcontent-%COMP%] + .reflection[_ngcontent-%COMP%]{opacity:.2;right:-4px;top:-4px;z-index:1}color-preset[_ngcontent-%COMP%]:hover + .reflection[_ngcontent-%COMP%], color-preset[_ngcontent-%COMP%]:hover + .reflection[_ngcontent-%COMP%] + .reflection[_ngcontent-%COMP%]{display:block}.sublist[_ngcontent-%COMP%]{position:absolute;bottom:-8px;left:-8px;right:-8px;background:#fff;border-radius:2px;box-shadow:#0000004d 0 0 2px,#0000004d 0 2px 4px;padding:8px 5px;text-align:center;z-index:1000}.sublist[_ngcontent-%COMP%]   color-preset[_ngcontent-%COMP%]{margin:8px 0 0}.sublist[_ngcontent-%COMP%]   color-preset[_ngcontent-%COMP%]:first-child{margin:0}.direction-down[_nghost-%COMP%]   .sublist[_ngcontent-%COMP%]{bottom:auto;top:-8px}"],data:{animation:[xoe,Soe]},changeDetection:0});let n=t;return n})(),E$=(()=>{let t=class t{transform(e,i){return e.reduce((o,a,s)=>s%i?o:o.concat([e.slice(s,s+i)]),[])}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"chunks",type:t,pure:!0,standalone:!0});let n=t;return n})(),op=(()=>{let t=class t{constructor(){this.columns=Oi(8,{transform:Nr}),this.colorPresets=Oi.required(),this.color=Pl.required(),this.direction=Oi("up")}onSelectionChange(e){let i=e.getRgba(),o=new Go().setRgba(i.red,i.green,i.blue,i.alpha);this.color.set(o)}isList(e){return Array.isArray(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["color-presets-component"]],inputs:{columns:[1,"columns"],colorPresets:[1,"colorPresets"],color:[1,"color"],direction:[1,"direction"]},outputs:{color:"colorChange"},standalone:!0,features:[ot],decls:3,vars:3,consts:[[1,"presets-row",3,"ngClass"],[3,"list","direction","activeColor","ngClass"],[3,"ngClass","color","activeColor"],[3,"selectionChange","list","direction","activeColor","ngClass"],[3,"selectionChange","ngClass","color","activeColor"]],template:function(i,o){i&1&&(Ir(0,moe,3,4,"div",0,Jo),v(2,"chunks")),i&2&&kr(ft(2,0,o.colorPresets(),o.columns()))},dependencies:[GP,T$,ac,E$],styles:[$s,"[_nghost-%COMP%]{display:block;font-size:0}[_nghost-%COMP%]   .presets-row[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%]   .presets-row[_ngcontent-%COMP%]:first-child{padding:0}
39color-preset-sublist[_ngcontent-%COMP%]:first-child, color-preset[_ngcontent-%COMP%]:first-child{margin:0}"],changeDetection:0});let n=t;return n})(),Ra=function(n){return n.hex="hex",n.hexa="hexa",n.rgba="rgba",n.rgb="rgb",n.hsla="hsla",n.hsl="hsl",n.cmyk="cmyk",n}(Ra||{}),dd=class{constructor(){this.modelValue=null,this.initValue=null,this.valueChanged=new Te,this.presetsVisibilityChanges=new Gn(!0),this.initType=null,this.alphaChannelVisibilityChanges=new Gn(!0),this.valueChanges=this.valueChanged.asObservable().pipe(xr((r,e)=>r.toRgbaString()==e.toRgbaString())),this.colorPresets=[];let t=Go.from(new Ue(255,0,0,1));this.setValue(t)}setValueFrom(t){let r=Go.from(t);return this.initValue||(this.initValue=Go.from(t)),typeof t=="string"&&!this.initType&&(this.initType=this.finOutInputType(t)),this.setValue(r),this}get value(){return this.modelValue}set value(t){this.setValue(t)}reset(){let t=this.initValue?this.initValue.clone():Go.from(new Ue(255,0,0,1));return this.setValue(t),this}isAlphaChannelEnabled(){return this.alphaChannelVisibilityChanges.value}showAlphaChannel(){return this.alphaChannelVisibilityChanges.next(!0),this}hideAlphaChannel(){return this.alphaChannelVisibilityChanges.next(!1),this}getColorType(t){return this.finOutInputType(t)}setColorPresets(t){return this.colorPresets=this.setPresets(t),this}get presets(){return this.colorPresets}hasPresets(){return this.colorPresets.length>0}isPresetVisible(){return this.presetsVisibilityChanges.value}showPresets(){return this.presetsVisibilityChanges.next(!0),this}hidePresets(){return this.presetsVisibilityChanges.next(!1),this}setValue(t){return this.modelValue=t,this.valueChanged.next(t),this}finOutInputType(t){let r=t.replace(/ /g,"").toLowerCase();if(r[0]==="#")return r.length>7?Ra.hexa:Ra.hex;let e=r.indexOf("(");switch(r.substr(0,e)){case Ra.rgba:return Ra.rgba;case Ra.rgb:return Ra.rgb;case Ra.hsla:return Ra.hsla;case Ra.hsl:return Ra.hsl;case Ra.cmyk:return Ra.cmyk}return null}setPresets(t){let r=[];for(let e of t)Array.isArray(e)?r.push(this.setPresets(e)):r.push(new Go(e));return r}};function zl(n,t){switch(t){case Ra.hex:return n.toHexString();case Ra.hexa:return n.toHexString(!0);case Ra.rgb:return n.toRgbString();case Ra.rgba:return n.toRgbaString();case Ra.hsl:return n.toHslString();case Ra.hsla:return n.toHslaString();default:return n.toRgbaString()}}function j_(n,t){return n instanceof Go&&t instanceof Go?n.equal(t):n===t}var g$=(()=>{let t=class t{constructor(e){this.cdr=e,this.selectedPresentation=0,this.presentations=["rgba","hsla","hex"],this.color=Pl(),this.control=Oi(new dd),this.subscriptions=[]}ngOnInit(){this.color()&&this.control().setValueFrom(this.color()),this.control().hasPresets()||this.control().setColorPresets([["#f44336","#ffebee","#ffcdd2","#EF9A9A","#E57373","#EF5350","#F44336","#E53935","#D32F2F","#C62828","#B71C1C"],["#E91E63","#fce4ec","#f8bbd0","#f48fb1","#f06292","#ec407a","#e91e63","#d81b60","#c2185b","#ad1457","#880e4f"],["#9C27B0","#F3e5f5","#e1bee7","#ce93d8","#ba68c8","#ab47bc","#9c27b0","#8e24aa","#7b1fa2","#6a1b9a","#4a148c"],["#673AB7","#ede7f6","#d1c4e9","#b39ddb","#9575cd","#7e57c2","#673ab7","#5e35b1","#512da8","#4527a0","#311b92"],["#3F51B5","#e8eaf6","#c5cae9","#9fa8da","#7986cb","#5c6bc0","#3f51b5","#3949ab","#303f9f","#283593","#1a237e"],["#2196F3","#e3f2fd","#bbdefb","#90caf9","#64b5f6","#42a5f5","#2196f3","#1e88e5","#1976d2","#1565c0","#0D47a1"],["#03A9F4","#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"],["#00BCD4","#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"],["#009688","#E0F2f1","#b2dfdb","#80cbc4","#4db6ac","#26a69a","#009688","#00897b","#00796b","#00695c","#004d40"],["#4CAF50","#e8f5e9","#c8e6c9","#a5d6a7","#81c784","#66bb6a","#4caf50","#43a047","#388e3c","#2e7d32","#1b5e20"],["#8BC34A","#f1f8e9","#dcedc8","#c5e1a5","#aed581","#9ccc65","#8bc34a","#7cb342","#689f38","#558b2f","#33691e"],["#cddc39","#f9fbe7","#f0f4c3","#e6ee9c","#dce775","#d4e157","#c0dc39","#c0ca33","#afb42b","#9e9d24","#827717"],["#ffeb3b","#fffde7","#fff9c4","#fff59d","#fff176","#ffee58","#ffeb3b","#fdd835","#fbc02d","#f9a825","#f57f17"],["#ffc107","#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"],["#ff9800","#fff3e0","#ffe0b2","#ffcc80","#ffb74d","#ffa726","#ff9800","#fb8c00","#f57c00","#ef6c00","#e65100"],["#ff5722","#fbe9e7","#ffccbc","#ffab91","#ff8a65","#ff7043","#ff5722","#f4511e","#e64a19","#d84315","#bf360c"],["#795548","#efebe9","#d7ccc8","#bcaaa4","#a1887f","#8d6e63","#795548","#6d4c41","#5d4037","#4e342e","#3e2723"],["#9e9e9e","#fafafa","#f5f5f5","#eee","#e0e0e0","#bdbdbd","#9e9e9e","#757575","#616161","#424242","#212121"],["#607d8b","#eceff1","#cfd8dc","#b0bec5","#90a4ae","#78909c","#60708b","#546e7a","#455a64","#37474f","#263238"]]),this.subscriptions.push(this.control().valueChanges.subscribe(e=>{this.color.set(zl(e,this.control().initType)),this.cdr.detectChanges()}))}ngOnChanges(e){let i=this.color(),o=this.control();i&&o&&!j_(zl(o.value,o.initType),i)&&o.setValueFrom(i)}
39ngOnDestroy(){this.cdr.detach(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}changePresentation(){this.selectedPresentation=this.selectedPresentation===this.presentations.length-1?0:this.selectedPresentation+1}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275cmp=L({type:t,selectors:[["chrome-picker"]],inputs:{color:[1,"color"],control:[1,"control"]},outputs:{color:"colorChange"},standalone:!0,features:[lt,ot],ngContentSelectors:Vw,decls:20,vars:11,consts:[[3,"colorChange","color"],[1,"controls"],[1,"controls-row","hue-alpha"],[1,"column"],[3,"colorType","color"],[3,"color"],[1,"controls-row","presentation"],["label","",3,"alpha","color"],["label","","prefix","#",3,"color"],[1,"column","type-column"],[1,"type-btn",3,"click"],[3,"color","colorPresets"],["label","",3,"colorChange","alpha","color"],["label","","prefix","#",3,"colorChange","color"],[3,"colorChange","color","colorPresets"]],template:function(i,o){if(i&1&&(Ct(Nw),Fe(0),d(1,"saturation-component",0),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p(),d(2,"div",1)(3,"div",2)(4,"div",3),O(5,"indicator-component",4),p(),d(6,"div",3)(7,"hue-component",0),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p(),x(8,uoe,1,1,"alpha-component",5),v(9,"async"),p()(),d(10,"div",6)(11,"div",3),x(12,hoe,2,4,"rgba-input-component",7)(13,foe,2,4,"hsla-input-component",7)(14,goe,1,1,"hex-input-component",8),p(),d(15,"div",9)(16,"span",10),T("click",function(){return o.changePresentation()}),p()()()(),x(17,boe,1,2,"color-presets-component",11),v(18,"async"),Fe(19,1)),i&2){let a;l(),fi("color",o.control().value),l(4),m("colorType",o.presentations[o.selectedPresentation])("color",o.control().value),l(2),fi("color",o.control().value),l(),_t(C(9,7,o.control().alphaChannelVisibilityChanges)?8:-1),l(4),_t((a=o.presentations[o.selectedPresentation])==="rgba"?12:a==="hsla"?13:a==="hex"?14:-1),l(5),_t(C(18,9,o.control().presetsVisibilityChanges)?17:-1)}},dependencies:[Qu,Ku,Xu,ng,L_,Fw,B_,op,Ve],styles:[$s,"[_nghost-%COMP%]{display:block;width:230px;border-radius:2px;background:#fff;box-shadow:#0000004d 0 0 2px,#0000004d 0 1px 4px}[_nghost-%COMP%]     .controls .pointer{box-shadow:#0000004d 0 0 2px,#0000004d 0 1px 4px}[_nghost-%COMP%]     .reflection, [_nghost-%COMP%]     color-preset{border-radius:2px}[_nghost-%COMP%]     color-preset{box-shadow:inset #0000004d 0 0 2px}[_nghost-%COMP%]     color-preset, [_nghost-%COMP%]     color-preset-sublist{margin:0 0 0 12px}[_nghost-%COMP%]     color-preset:first-child, [_nghost-%COMP%]     color-preset-sublist:first-child{margin:0}[_nghost-%COMP%]     .sublist color-preset:hover, [_nghost-%COMP%]     .presets-row>color-preset:hover{transform:scale(1.18)}saturation-component[_ngcontent-%COMP%]{height:120px}.controls[_ngcontent-%COMP%]{padding:15px 15px 10px}.controls-row[_ngcontent-%COMP%]{display:table;width:100%}.column[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.hue-alpha[_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{width:42px;padding:0 10px 0 0}indicator-component[_ngcontent-%COMP%]{height:32px;width:32px;border-radius:50%}alpha-component[_ngcontent-%COMP%]{margin-top:8px}color-presets-component[_ngcontent-%COMP%]{border-top:1px solid #d0d0d0;padding:12px}color-presets-component[_ngcontent-%COMP%]     .presets-row{padding:12px 0 0}.type-btn[_ngcontent-%COMP%]{display:inline-block;height:20px;width:20px;background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==) no-repeat center;background-size:6px 12px}.type-btn[_ngcontent-%COMP%]:hover{background-color:#eee}.type-column[_ngcontent-%COMP%]{width:25px;text-align:right}.presentation[_ngcontent-%COMP%]{padding:12px 0 0}"],changeDetection:0});let n=t;return n}
39)(),b$=(()=>{let t=class t{constructor(e){this.cdr=e,this.color=Pl(),this.control=Oi(new dd),this.subscriptions=[]}ngOnInit(){this.color()&&this.control().setValueFrom(this.color()),this.control().hasPresets()||this.control().setColorPresets(["#d0041b","#8b572a","#f5a623","#f8e71c","#7ed321","#417506","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#030303","#4a4a4a","#9b9b9b","#fff"]),this.subscriptions.push(this.control().valueChanges.subscribe(e=>{this.color.set(zl(e,this.control().initType)),this.cdr.detectChanges()}))}ngOnChanges(e){let i=this.color(),o=this.control();i&&o&&!j_(zl(o.value,o.initType),i)&&o.setValueFrom(i)}ngOnDestroy(){this.cdr.detach(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275cmp=L({type:t,selectors:[["sketch-picker"]],inputs:{color:[1,"color"],control:[1,"control"]},outputs:{color:"colorChange"},standalone:!0,features:[lt,ot],ngContentSelectors:Vw,decls:19,vars:14,consts:[[3,"colorChange","color"],[1,"controls"],[1,"controls-row","hue-alpha"],[1,"column"],[3,"color"],[1,"column","indicator-column"],["colorType","rgba",3,"color"],[1,"controls-row","presentation"],["label","",3,"colorChange","color"],["label","",3,"colorChange","alpha","color"],[3,"color","colorPresets"],[3,"colorChange","color","colorPresets"]],template:function(i,o){i&1&&(Ct(Nw),Fe(0),d(1,"saturation-component",0),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p(),d(2,"div",1)(3,"div",2)(4,"div",3)(5,"hue-component",0),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p(),x(6,_oe,1,1,"alpha-component",4),v(7,"async"),p(),d(8,"div",5),O(9,"indicator-component",6),p()(),d(10,"div",7)(11,"div",3)(12,"hex-input-component",8),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()(),d(13,"div",3)(14,"rgba-input-component",9),v(15,"async"),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()()()(),x(16,voe,1,2,"color-presets-component",10),v(17,"async"),Fe(18,1)),i&2&&(l(),fi("color",o.control().value),l(4),fi("color",o.control().value),l(),_t(C(7,8,o.control().alphaChannelVisibilityChanges)?6:-1),l(3),m("color",o.control().value),l(3),fi("color",o.control().value),l(2),m("alpha",C(15,10,o.control().alphaChannelVisibilityChanges)),fi("color",o.control().value),l(2),_t(C(17,12,o.control().presetsVisibilityChanges)?16:-1))},dependencies:[Qu,Ku,Xu,ng,B_,L_,op,Ve],styles:[$s,"[_nghost-%COMP%]{display:block;padding:9px;width:220px;border-radius:4px;background:#fff;box-shadow:#0000004d 0 0 2px,#0000004d 0 1px 4px}saturation-component[_ngcontent-%COMP%]{height:146px;border-radius:2px;box-shadow:inset #0009 0 0 2px}saturation-component[_ngcontent-%COMP%]     .pointer{border-width:2px;box-shadow:#0009 0 0 2px;width:10px;height:10px}.controls[_ngcontent-%COMP%]{padding:4px 0 0}hue-component[_ngcontent-%COMP%], alpha-component[_ngcontent-%COMP%]{height:10px;border-radius:2px;box-shadow:inset #0009 0 0 2px}hue-component[_ngcontent-%COMP%]{margin-bottom:4px}.controls-row[_ngcontent-%COMP%]{display:table;width:100%}.column[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.indicator-column[_ngcontent-%COMP%]{width:25px}indicator-component[_ngcontent-%COMP%]{height:24px;width:100%;box-shadow:inset #0009 0 0 2px;border-radius:2px}color-presets-component[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding:10px 9px 0;margin:8px -9px 0}color-presets-component[_ngcontent-%COMP%]     .presets-row{padding:10px 0 0}[_nghost-%COMP%]   indicator-component[_ngcontent-%COMP%]     svg{vertical-align:5%}.controls-row.hue-alpha[_ngcontent-%COMP%]{padding-bottom:9px}.controls-row.hue-alpha[_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{padding-right:5px}.hue-alpha[_ngcontent-%COMP%]     .pointer{width:6px;margin:0 0 0 -3px;height:100%;top:0;border-radius:2px;border:1px solid #898989}.presentation[_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{width:56px}.presentation[_ngcontent-%COMP%]     input{height:20px;font-size:11px}[_nghost-%COMP%]     .reflection, [_nghost-%COMP%]     color-preset{height:16px;width:16px;border-radius:2px}[_nghost-%COMP%]     color-preset{box-shadow:inset #0006 0 0 2px}[_nghost-%COMP%]     color-preset.selected{box-shadow:inset #0006 0 1px 4px}[_nghost-%COMP%]     .presets-row>color-preset, [_nghost-%COMP%]     .presets-row>color-preset-sublist{margin:0 0 0 10px}[_nghost-%COMP%]     .presets-row>color-preset:first-child, [_nghost-%COMP%]     .presets-row>color-preset-sublist:first-child{margin:0}"],changeDetection:0});let n=t;return n})(),_$=(()=>{let t=class t{constructor(e){this.cdr=e,this.color=Pl(),this.control=Oi(new dd),this.subscriptions=[]}ngOnInit(){this.color()&&this.control().setValueFrom(this.color()),this.control().hasPresets()||this.control().setColorPresets(["#6da6e8","#74c283","#f9d948","#f5943f","#f66c6c","#ef8ab8","#696cd4","#6c6c6c","#f6f5f5"]),this.subscriptions.push(this.control().valueChanges.subscribe(e=>{this.color.set(zl(e,this.control().initType)),this.cdr.detectChanges()}))}ngOnChanges(e){let i=this.color(),o=this.control();i&&o&&!j_(zl(o.value,o.initType),i)&&o.setValueFrom(i)}
39ngOnDestroy(){this.cdr.detach(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275cmp=L({type:t,selectors:[["compact-picker"]],inputs:{color:[1,"color"],control:[1,"control"]},outputs:{color:"colorChange"},standalone:!0,features:[lt,ot],ngContentSelectors:Vw,decls:17,vars:7,consts:[["direction","down",3,"columns","color","colorPresets"],[1,"controls"],[1,"controls-row","saturation-hue"],[1,"column"],[3,"colorChange","color"],[1,"column","hue-column"],["vertical","",3,"colorChange","color"],[1,"controls-row","presentation"],["viewBox","0 0 1024 1024",1,"pencil"],["d",`M639.77,121.045l-48.598,84.2l112.215,64.8l48.6-84.205L639.77,121.045z M558.773,261.354
40                    L315.78,682.206l112.215,64.795L670.99,326.15L558.773,261.354z M690.816,75.691l74.922,43.286
41                    c41.682,24.045,55.52,76.564,31.725,117.784l-37.967,65.68l-32.398,56.11L451.706,835.594L282.452,947.303
42                    c-40.961,27.004-70.24,9.027-67.329-38.894l12.149-202.411l275.395-477.041l32.398-56.11l37.883-65.686
43                    C596.824,65.946,649.473,51.857,690.816,75.691z M274.689,883.015l120.908-79.818l-112.218-64.8L274.689,883.015z`],["prefix","#",3,"colorChange","color"],["colorType","hex",3,"color"],["direction","down",3,"colorChange","columns","color","colorPresets"]],template:function(i,o){i&1&&(Ct(Nw),Fe(0),x(1,yoe,1,3,"color-presets-component",0),v(2,"async"),d(3,"div",1)(4,"div",2)(5,"div",3)(6,"saturation-component",4),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()(),d(7,"div",5)(8,"hue-component",6),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()()(),d(9,"div",7)(10,"div",3),ar(),d(11,"svg",8),O(12,"path",9),p(),cs(),d(13,"hex-input-component",10),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()(),d(14,"div",3),O(15,"indicator-component",11),p()()(),Fe(16,1)),i&2&&(l(),_t(C(2,5,o.control().presetsVisibilityChanges)?1:-1),l(5),fi("color",o.control().value),l(2),fi("color",o.control().value),l(5),fi("color",o.control().value),l(2),m("color",o.control().value))},dependencies:[Qu,Ku,Xu,op,B_,Ve],styles:[$s,"[_nghost-%COMP%]{display:block;width:240px;border-radius:3px;background:#fff;box-shadow:#0000004d 0 0 2px,#0000004d 0 0 4px}[_nghost-%COMP%]     .reflection{display:none}[_nghost-%COMP%]     color-preset{height:18px;width:18px;border-radius:50%;box-shadow:inset #0009 0 1px 1px}[_nghost-%COMP%]     .presets-row>color-preset, [_nghost-%COMP%]     .presets-row>color-preset-sublist{margin:0 0 0 6px}[_nghost-%COMP%]     .presets-row>color-preset:first-child, [_nghost-%COMP%]     .presets-row>color-preset-sublist:first-child{margin:0}[_nghost-%COMP%]     color-preset.selected, [_nghost-%COMP%]     .sublist color-preset:hover, [_nghost-%COMP%]     .presets-row>color-preset:hover{box-shadow:inset #0009 0 1px 6px}[_nghost-%COMP%]   hue-component[_ngcontent-%COMP%]{width:100%;height:178px;box-shadow:inset #0009 0 0 2px}[_nghost-%COMP%]   hue-component[vertical][_ngcontent-%COMP%]     .pointer{width:auto;height:9px;left:-3px;right:-3px;margin:-4.5px 0 0;background:transparent;border:3px solid #fff;border-radius:5px;box-shadow:#0009 0 0 2px}[_nghost-%COMP%]   indicator-component[_ngcontent-%COMP%]     svg{vertical-align:25%}color-presets-component[_ngcontent-%COMP%]{border-bottom:1px solid #e4e4e6;padding:9px 12px}color-presets-component[_ngcontent-%COMP%]     .presets-row{padding:10px 0 0}.controls[_ngcontent-%COMP%]{padding:10px 12px 12px}.controls-row[_ngcontent-%COMP%]{display:table;width:100%}.column[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.controls-row.saturation-hue[_ngcontent-%COMP%]{padding-bottom:9px}.controls-row.saturation-hue[_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{width:178px}saturation-component[_ngcontent-%COMP%]{height:178px;box-shadow:inset #0009 0 0 2px}saturation-component[_ngcontent-%COMP%]     .pointer{border-width:2px;box-shadow:#0009 0 0 2px}.hue-column[_ngcontent-%COMP%]{padding-left:14px}.controls-row.presentation[_ngcontent-%COMP%]{border:1px solid #e4e4e6;border-radius:3px;padding:6px 6px 6px 26px;position:relative}
43indicator-component[_ngcontent-%COMP%]{height:18px;width:18px;box-shadow:inset #0009 0 0 2px;border-radius:50%}hex-input-component[_ngcontent-%COMP%]     input{border:0;color:#817e81;margin:0;text-align:left;height:18px}.pencil[_ngcontent-%COMP%]{position:absolute;height:14px;width:14px;left:6px;top:50%;margin:-7px 0 0}.pencil[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{fill:#000}"],changeDetection:0});let n=t;return n})();function Toe(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))?Number(n):"auto"}var v$=(()=>{let t=class t{get width(){return this.columns()==="auto"?"auto":`${25*this.columns()+12}px`}get columnsCount(){return this.columns()==="auto"?this.control().presets.length:this.columns()}constructor(e){this.cdr=e,this.color=Pl(),this.control=Oi(new dd),this.columns=Oi(8,{transform:Toe}),this.subscriptions=[]}ngOnInit(){this.color()&&this.control().setValueFrom(this.color()),this.control().hasPresets()||this.control().setColorPresets(["#b80000","#db3e00","#fccb00","#008b02","#006b76","#1273de","#004dcf","#5300eb","#eb9694","#fad0c3","#fef3bd","#c1e1c5","#bedadc","#c4def6","#bed3f3","#d4c4fb"]),this.subscriptions.push(this.control().valueChanges.subscribe(e=>{this.color.set(zl(e,this.control().initType)),this.cdr.detectChanges()}))}ngOnChanges(e){let i=this.color(),o=this.control();i&&o&&!j_(zl(o.value,o.initType),i)&&o.setValueFrom(i)}ngOnDestroy(){this.cdr.detach(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275cmp=L({type:t,selectors:[["github-picker"]],hostVars:2,hostBindings:function(i,o){i&2&&hi("width",o.width)},inputs:{color:[1,"color"],control:[1,"control"],columns:[1,"columns"]},outputs:{color:"colorChange"},standalone:!0,features:[lt,ot],ngContentSelectors:Vw,decls:3,vars:3,consts:[["direction","down",3,"colorChange","columns","color","colorPresets"]],template:function(i,o){i&1&&(Ct(Nw),Fe(0),d(1,"color-presets-component",0),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p(),Fe(2,1)),i&2&&(l(),m("columns",o.columnsCount),fi("color",o.control().value),m("colorPresets",o.control().presets))},dependencies:[op],styles:[$s,'@charset "UTF-8";[_nghost-%COMP%]{display:block;background:#fff;border:1px solid rgba(0,0,0,.2);box-shadow:#00000026 0 3px 12px;border-radius:4px;padding:5px}[_nghost-%COMP%]     color-preset, [_nghost-%COMP%]     color-preset-sublist{width:25px;height:25px}[_nghost-%COMP%]     color-preset:hover:after, [_nghost-%COMP%]     color-preset.selected:after{display:block;content:"\\a0";position:absolute;inset:-1px;z-index:10;border:2px solid #fff;box-shadow:#0003 0 0 5px 2px}'],changeDetection:0});let n=t;return n})(),y$=(()=>{let t=class t{constructor(e){this.cdr=e,this.color=Pl(),this.control=new dd,this.childControl=new dd,this.subscriptions=[],this.mapColors={"#E6315B":["#fc8da7","#fa7d9a","#f56484","#f04a71","#e82c58","#e31746","#de0235","#d60234","#d10232","#c70230","#b8022c","#ab0229","#9c0225","#8f0122","#8c0122","#82011f","#78011b","#690117","#5c0012","#4f0010","#42000c"],"#793183":["#ef8dfc","#eb7dfa","#e664f5","#dc4af0","#d22ce8","#cb17e3","#c402de","#c002d9","#bb02d4","#b002c7","#a202b8","#9702ab","#8a029c","#7e018f","#7a018a","#730182","#6c0178","#5e0169","#54015c","#49014f","#3d0142"],"#009DE7":["#8dd9fc","#7dd2fa","#64c7f5","#4abbf0","#2cade8","#17a2e3","#0298de","#0295d9","#0291d4","#0289c7","#027eb8","#0275ab","#026b9c","#01628f","#015f8a","#015982","#015278","#014869","#013f5c","#01364f","#012e42"],"#00B59C":["#8dfeea","#7dfbe4","#63f4db","#4befd2","#2de7c6","#16e2be","#03deb7","#01ddb6","#01d4ae","#01c7a4","#01b897","#01aa8b","#019b80","#019076","#018c73","#01836c","#017763","#016857","#005c4e","#005044","#004239"],"#FFCE00":["#fce68d","#fae17d","#f5da64","#f0cf4a","#e8c22c","#e5bc17","#deb202","#deb100","#d4aa02","#c7a002","#b89302","#ab8902","#9c7d02","#8f7301","#8c7001","#826801","#786201","#695601","#5c4b00","#4f4100","#423700"],"#FF4A21":["#fca28d","#fa947d","#f57f64","#f0694a","#e84f2c","#e33c17","#de2a02","#d92a02","#d42902","#c72602","#b82302","#ab2102","#9c1e02","#8f1b01","#8a1a01","#821901","#781701","#691300","#5c1100","#4f0e00","#420c00"],"#D6D5D6":["#fff","#f2f2f2","#e5e5e5","#d9d9d9","#cccccc","#bfbfbf","#b3b3b3","#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#595959","#4d4d4d","#424242","#363636","#262626","#1a1a1a","#0f0f0f","#000"]}}ngOnInit(){this.color()?this.childControl.setValueFrom(this.color()):this.control.setValueFrom("#E6315B"),this.control.setColorPresets(["#e6315b","#793183","#009de7","#00b59c","#ffce00","#ff4a21","#d6d5d6"]),this.childControl.setColorPresets(this.mapColors["#E6315B"]),this.subscriptions.push(this.childControl.valueChanges.subscribe(e=>{this.color.set(zl(e,this.childControl.initType))})),this.subscriptions.push(this.control.valueChanges.subscribe(e=>{let i=this.mapColors[e.toHexString()];i&&this.childControl.setColorPresets(i),this.color.set(zl(this.childControl.value,this.childControl.initType)),this.cdr.detectChanges()}))}ngOnChanges(e){let i=this.color(),o=this.control;i&&o&&!j_(zl(o.value,o.initType),i)&&this.childControl.setValueFrom(i)}
43ngOnDestroy(){this.cdr.detach(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275cmp=L({type:t,selectors:[["swatches-picker"]],inputs:{color:[1,"color"]},outputs:{color:"colorChange"},standalone:!0,features:[lt,ot],ngContentSelectors:Vw,decls:4,vars:4,consts:[["direction","down",3,"colorChange","columns","color","colorPresets"],["direction","down",1,"child-list",3,"columns","color","colorPresets"],["direction","down",1,"child-list",3,"colorChange","columns","color","colorPresets"]],template:function(i,o){i&1&&(Ct(Nw),Fe(0),d(1,"color-presets-component",0),bi("colorChange",function(s){return gi(o.control.value,s)||(o.control.value=s),s}),p(),x(2,Coe,1,3,"color-presets-component",1),Fe(3,1)),i&2&&(l(),m("columns",7),fi("color",o.control.value),m("colorPresets",o.control.presets),l(),_t(o.childControl.presets.length?2:-1))},dependencies:[op],styles:[$s,'@charset "UTF-8";[_nghost-%COMP%]{display:block;background:#fff;width:224px;border:1px solid rgba(0,0,0,.2);box-shadow:#0000004d 0 0 2px;border-radius:4px;padding:6px}[_nghost-%COMP%]     color-preset, [_nghost-%COMP%]     color-preset-sublist{width:30px;height:30px}[_nghost-%COMP%]     color-preset:hover:after, [_nghost-%COMP%]     color-preset.selected:after{display:block;content:"\\a0";position:absolute;inset:3px;z-index:10;border:3px solid #fff;box-shadow:#0003 0 0 5px 2px}[_nghost-%COMP%]     .presets-row:first-child color-preset:first-child, [_nghost-%COMP%]     .presets-row:first-child color-preset-sublist:first-child{border-radius:4px 0 0 4px}[_nghost-%COMP%]     .presets-row.last color-preset.last, [_nghost-%COMP%]     .presets-row.last color-preset-sublist.last{border-radius:0 4px 4px 0}[_nghost-%COMP%]     .child-list{margin-top:6px;border-top:1px solid #e5e5e5;padding:6px 0 0}[_nghost-%COMP%]     .child-list .presets-row.first color-preset.first, [_nghost-%COMP%]     .child-list .presets-row.first color-preset-sublist.first{border-radius:4px 0 0}[_nghost-%COMP%]     .child-list .presets-row.first color-preset.last, [_nghost-%COMP%]     .child-list .presets-row.first color-preset-sublist.last{border-radius:0 4px 0 0}[_nghost-%COMP%]     .child-list .presets-row.last color-preset.first, [_nghost-%COMP%]     .child-list .presets-row.last color-preset-sublist.first{border-radius:0 0 0 4px}[_nghost-%COMP%]     .child-list .presets-row.last color-preset.last, [_nghost-%COMP%]     .child-list .presets-row.last color-preset-sublist.last{border-radius:0 0 4px}[_nghost-%COMP%]     .child-list color-preset:hover:after, [_nghost-%COMP%]     .child-list color-preset.selected:after{content:"\\2714";font-size:18px;color:#fff;border:0;inset:0;line-height:30px;box-shadow:none;text-align:center}'],changeDetection:0});let n=t;return n})(),C$=(()=>{let t=class t{constructor(e){this.cdr=e,this.color=Pl(),this.control=Oi(new dd),this.subscriptions=[]}ngOnInit(){this.control().hasPresets()||this.control().setColorPresets([["#f44336","#ffebee","#ffcdd2","#EF9A9A","#E57373","#EF5350","#F44336","#E53935","#D32F2F","#C62828","#B71C1C"],["#E91E63","#fce4ec","#f8bbd0","#f48fb1","#f06292","#ec407a","#e91e63","#d81b60","#c2185b","#ad1457","#880e4f"],["#9C27B0","#F3e5f5","#e1bee7","#ce93d8","#ba68c8","#ab47bc","#9c27b0","#8e24aa","#7b1fa2","#6a1b9a","#4a148c"],["#673AB7","#ede7f6","#d1c4e9","#b39ddb","#9575cd","#7e57c2","#673ab7","#5e35b1","#512da8","#4527a0","#311b92"],["#3F51B5","#e8eaf6","#c5cae9","#9fa8da","#7986cb","#5c6bc0","#3f51b5","#3949ab","#303f9f","#283593","#1a237e"],["#2196F3","#e3f2fd","#bbdefb","#90caf9","#64b5f6","#42a5f5","#2196f3","#1e88e5","#1976d2","#1565c0","#0D47a1"],["#03A9F4","#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"],["#00BCD4","#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"],["#009688","#E0F2f1","#b2dfdb","#80cbc4","#4db6ac","#26a69a","#009688","#00897b","#00796b","#00695c","#004d40"],["#4CAF50","#e8f5e9","#c8e6c9","#a5d6a7","#81c784","#66bb6a","#4caf50","#43a047","#388e3c","#2e7d32","#1b5e20"],["#8BC34A","#f1f8e9","#dcedc8","#c5e1a5","#aed581","#9ccc65","#8bc34a","#7cb342","#689f38","#558b2f","#33691e"],["#cddc39","#f9fbe7","#f0f4c3","#e6ee9c","#dce775","#d4e157","#c0dc39","#c0ca33","#afb42b","#9e9d24","#827717"],["#ffeb3b","#fffde7","#fff9c4","#fff59d","#fff176","#ffee58","#ffeb3b","#fdd835","#fbc02d","#f9a825","#f57f17"],["#ffc107","#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"],["#ff9800","#fff3e0","#ffe0b2","#ffcc80","#ffb74d","#ffa726","#ff9800","#fb8c00","#f57c00","#ef6c00","#e65100"],["#ff5722","#fbe9e7","#ffccbc","#ffab91","#ff8a65","#ff7043","#ff5722","#f4511e","#e64a19","#d84315","#bf360c"],["#795548","#efebe9","#d7ccc8","#bcaaa4","#a1887f","#8d6e63","#795548","#6d4c41","#5d4037","#4e342e","#3e2723"],["#9e9e9e","#fafafa","#f5f5f5","#eee","#e0e0e0","#bdbdbd","#9e9e9e","#757575","#616161","#424242","#212121"],["#607d8b","#eceff1","#cfd8dc","#b0bec5","#90a4ae","#78909c","#60708b","#546e7a","#455a64","#37474f","#263238"]]),this.subscriptions.push(this.control().valueChanges.subscribe(e=>{this.color.set(zl(e,this.control().initType)),this.cdr.detectChanges()}))}ngOnChanges(e){let i=this.color(),o=this.control();i&&o&&!j_(zl(o.value,o.initType),i)&&o.setValueFrom(i)}
43ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions.length=0}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275cmp=L({type:t,selectors:[["ip-picker"]],inputs:{color:[1,"color"],control:[1,"control"]},outputs:{color:"colorChange"},standalone:!0,features:[lt,ot],decls:12,vars:8,consts:[[1,"controls"],[1,"controls-row","presentation"],["colorType","hex",3,"color"],[3,"colorChange","color"],[1,"controls-row","saturation-hue-alpha"],[1,"column"],[1,"column","hue-column"],["vertical","",3,"colorChange","color"],[3,"columns","color","colorPresets"],[3,"colorChange","columns","color","colorPresets"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"div",1),O(2,"indicator-component",2),d(3,"hex-input-component",3),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()(),d(4,"div",4)(5,"div",5)(6,"saturation-component",3),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p(),d(7,"alpha-component",3),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()(),d(8,"div",6)(9,"hue-component",7),bi("colorChange",function(s){return gi(o.control().value,s)||(o.control().value=s),s}),p()()()(),x(10,woe,1,3,"color-presets-component",8),v(11,"async")),i&2&&(l(2),m("color",o.control().value),l(),fi("color",o.control().value),l(3),fi("color",o.control().value),l(),fi("color",o.control().value),l(2),fi("color",o.control().value),l(),_t(C(11,6,o.control().presetsVisibilityChanges)?10:-1))},dependencies:[Qu,Ku,Xu,ng,op,B_,Ve],styles:[$s,'@charset "UTF-8";[_nghost-%COMP%]{display:block;width:240px;border-radius:3px;background:#fff;box-shadow:#0000004d 0 0 2px,#0000004d 0 0 4px}.controls[_ngcontent-%COMP%]{padding:6px}.controls-row[_ngcontent-%COMP%]{display:table;width:100%}.column[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.controls-row.saturation-hue-alpha[_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{width:178px}saturation-component[_ngcontent-%COMP%]{height:178px;box-shadow:inset #0009 0 0 2px;margin-bottom:16px}.controls-row.presentation[_ngcontent-%COMP%]{border:1px solid #e4e4e6;border-radius:3px;padding:6px 6px 6px 36px;position:relative;margin:0 0 6px}.controls-row.saturation-hue-alpha[_ngcontent-%COMP%]{padding:0 0 6px}indicator-component[_ngcontent-%COMP%]{height:22px;width:22px;box-shadow:inset #0009 0 0 2px;position:absolute;left:4px;top:50%;border-radius:50%;margin-top:-11px}[_nghost-%COMP%]   indicator-component[_ngcontent-%COMP%]     svg{vertical-align:15%}hex-input-component[_ngcontent-%COMP%]     input{border:0;color:#817e81;margin:0;text-align:left;height:18px}.hue-column[_ngcontent-%COMP%]{vertical-align:top;padding:0 10px 0 16px}[_nghost-%COMP%]   hue-component[_ngcontent-%COMP%]{width:100%;height:178px;box-shadow:inset #0009 0 0 2px}[_nghost-%COMP%]   hue-component[vertical][_ngcontent-%COMP%]     .pointer{width:auto;height:0;left:0;right:0;margin:0;background:transparent}[_nghost-%COMP%]   alpha-component[_ngcontent-%COMP%]     .pointer{width:0;height:auto;top:0;bottom:0;margin:0;background:transparent}[_nghost-%COMP%]   hue-component[vertical][_ngcontent-%COMP%]     .pointer:after, [_nghost-%COMP%]   hue-component[vertical][_ngcontent-%COMP%]     .pointer:before{top:-5.5px;display:block;content:"\\a0";position:absolute;height:0;width:0;border-top:5px solid transparent;border-bottom:5px solid transparent}[_nghost-%COMP%]   hue-component[vertical][_ngcontent-%COMP%]     .pointer:after{border-left:8px solid #666;left:-8px}[_nghost-%COMP%]   hue-component[vertical][_ngcontent-%COMP%]     .pointer:before{border-right:8px solid #666;right:-8px}[_nghost-%COMP%]   alpha-component[_ngcontent-%COMP%]{height:24px}[_nghost-%COMP%]   alpha-component[_ngcontent-%COMP%]     .pointer:after, [_nghost-%COMP%]   alpha-component[_ngcontent-%COMP%]     .pointer:before{left:-5.5px;display:block;content:"\\a0";position:absolute;height:0;width:0;border-left:5px solid transparent;border-right:5px solid transparent}[_nghost-%COMP%]   alpha-component[_ngcontent-%COMP%]     .pointer:after{border-top:8px solid #666;top:-8px}
43[_nghost-%COMP%]   alpha-component[_ngcontent-%COMP%]     .pointer:before{border-bottom:8px solid #666;bottom:-8px}'],changeDetection:0});let n=t;return n})(),Lw=(()=>{let t=class t{static forRoot(e){return{ngModule:t,providers:[{provide:x$,useValue:e||new VE}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[zi,Qu,Ku,Xu,ng,L_,Fw,B_,op,GP,T$,jP,E$,S$,g$,b$,y$,v$,_$,C$],exports:[Qu,Ku,Xu,ng,L_,Fw,B_,op,g$,b$,y$,v$,_$,C$]}),t.\u0275inj=Nt({imports:[zi]});let n=t;return n})();y();y();function I$(n,t,r=200){let e;return new Ma(i=>{e=new ResizeObserver((o,a)=>{i.next(e)}),e.observe(n)}).pipe(Wi(r),et(()=>{t()}),gu(()=>{e.unobserve(n),e.disconnect()}))}var Ioe=["carouselPrev"],koe=["carouselNext"],Doe=["carouselDot"],Moe=["carouselProgress"],Aoe=["infiniteContainer"],Ooe=["carouselContent"],Poe=["containerElm"],Roe=["prev"],Foe=["next"],Noe=["progress"],Voe=[[["","ngx-hm-carousel-container",""]]],Loe=["[ngx-hm-carousel-container]"],Boe=(n,t)=>({index:n,currentIndex:t}),joe=n=>({$implicit:n});function Goe(n,t){n&1&&Ti(0)}function zoe(n,t){n&1&&(d(0,"div",5,1),x(2,Goe,1,0,"ng-container",9),p()),n&2&&(l(2),m("ngTemplateOutlet",t))}function $oe(n,t){n&1&&Ti(0)}function Uoe(n,t){n&1&&(d(0,"div",6,2),x(2,$oe,1,0,"ng-container",9),p()),n&2&&(l(2),m("ngTemplateOutlet",t))}function Hoe(n,t){n&1&&Ti(0)}function qoe(n,t){if(n&1){let r=B();d(0,"li",10),T("click",function(){let i=D(r).$index,o=b(2);return M(o.currentIndex=i)}),x(1,Hoe,1,0,"ng-container",11),p()}if(n&2){let r=t.$index,e=b(),i=b();l(),m("ngTemplateOutlet",e)("ngTemplateOutletContext",Xe(5,joe,Yi(2,Boe,r,i.currentIndex)))}}function Woe(n,t){if(n&1&&(d(0,"ul",7),Ir(1,qoe,2,7,"li",null,Jo),p()),n&2){let r=b
43();l(),kr(r.itemElms())}}function Yoe(n,t){n&1&&Ti(0)}function Qoe(n,t){n&1&&(d(0,"div",null,3),x(2,Yoe,1,0,"ng-container",9),p()),n&2&&(l(2),m("ngTemplateOutlet",t))}function Koe(n,t){}function Xoe(n,t){if(n&1&&(d(0,"div",8),x(1,Koe,0,0),v(2,"async"),p()),n&2){let r=b();l(),_t(C(2,1,r.leaveObs$)?1:-1)}}var Bw=(()=>{let t=class t{};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275dir",_e({type:t,selectors:[["","ngx-hm-carousel-item",""]],standalone:!0}));let n=t;return n})(),zP=(()=>{let t=class t{constructor(){se(this,"_view",Rt(ci));se(this,"_template",Rt(an));se(this,"index",Oi(void 0,{alias:"ngxHmCarouselDynamic"}));se(this,"length",Oi(0,{alias:"ngxHmCarouselDynamicLength"}));se(this,"show",Oi(1,{alias:"ngxHmCarouselDynamicShow"}));se(this,"currentI",Oi(0,{alias:"ngxHmCarouselDynamicIndex",transform:e=>{if(!this.completed){let i=e+this.show(),o=e-this.show();(this.index()===0||this.index()===this.length()-1||this.index()===i||this.index()===o||this.index()===e)&&(this._view.createEmbeddedView(this._template),this.completed=!0)}return e}}));se(this,"completed",!1);this._view.clear()}};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275dir",_e({type:t,selectors:[["","ngxHmCarouselDynamic",""]],inputs:{index:[1,"ngxHmCarouselDynamic","index"],length:[1,"ngxHmCarouselDynamicLength","length"],show:[1,"ngxHmCarouselDynamicShow","show"],currentI:[1,"ngxHmCarouselDynamicIndex","currentI"]},standalone:!0}));let n=t;return n})(),LE=(()=>{let t=class t{constructor(){se(this,"platformId",Rt(vu));se(this,"_document",Rt(Qi));se(this,"_destroyRef",Rt(En));se(this,"_renderer",Rt(Ni));se(this,"_zone",Rt(Bt));se(this,"_cd",Rt(Me));se(this,"container",Uy.required("containerElm",{read:ge}));se(this,"btnPrev",Uy("prev"));se(this,"btnNext",Uy("next"));se(this,"progressContainerElm",Uy("progress",{read:ge}));se(this,"itemElms",bB(Bw,{read:ge,descendants:!0}));se(this,"contentPrev",sf("carouselPrev",{read:an}));se(this,"contentNext",sf("carouselNext",{read:an}));se(this,"dotElm",sf("carouselDot"));se(this,"progressElm",sf("carouselProgress"));se(this,"infiniteContainer",sf("infiniteContainer",{read:ci}));se(this,"contentContent",sf.required("carouselContent",{read:an}));se(this,"data",Oi([]));se(this,"aniTime",Oi(400));se(this,"aniClass",Oi("transition"));se(this,"aniClassAuto",Oi(this.aniClass()));se(this,"panBoundary",Oi(.15,{alias:"pan-boundary"}));se(this,"align",Oi("center"));se(this,"notDrag",Oi(!1,{alias:"not-follow-pan"}));se(this,"mouseEnable",Oi(!1,{alias:"mouse-enable"}));se(this,"delay",Oi(8e3,{alias:"between-delay"}));se(this,"direction",Oi("right",{alias:"autoplay-direction"}));se(this,"scrollNum",Oi(1,{alias:"scroll-num"}));se(this,"isDragMany",Oi(!1,{alias:"drag-many"}));se(this,"swipeVelocity",Oi(.3,{alias:"swipe-velocity"}));se(this,"breakpoint",Oi([]));se(this,"disableDrag",Oi(void 0,{alias:"disable-drag",transform:e=>(this.rootElm&&(e?this.destroyHammer():this.hammer=this.bindHammer()),e)}));se(this,"infinite",Oi(!1,{alias:"infinite"}));se(this,"speed",Oi(void 0,{alias:"autoplay-speed",transform:e=>(this.speedChange.next(e),e)}));se(this,"recognizers",Oi([]));se(this,"stopPanListener",Oi(!1));se(this,"_showNum",1);se(this,"showNum",Oi(this._showNum,{alias:"show-num",transform:e=>(e==="auto"?this.isAutoNum=!0:(this._showNum=+e,this.rootElm&&(this.setViewWidth(),this.reSetAlignDistance())),this._showNum)}));se(this,"autoplay",Oi(void 0,{alias:"autoplay",transform:e=>(Ga(this.platformId)&&this.elms&&(this.progressWidth=0,e?this.doNextSub$=this.doNext$?.subscribe():this.doNextSub$&&this.doNextSub$.unsubscribe()),e)}));se(this,"leaveObs$",Xt(Jn(this._document,"mouseup"),Jn(this._document,"touchend")).pipe(et(e=>{this.grabbing=!1,e.stopPropagation(),e.preventDefault()})));se(this,"hammer");se(this,"runLoop",wu(()=>this.autoplay()||this.infinite()));se(this,"isFromAuto",!0);se(this,"isAutoNum",!1);se(this,"mouseOnContainer",!1);se(this,"alignDistance",0);se(this,"elmWidth",0);se(this,"rootElm");se(this,"containerElm");se(this,"elms");se(this,"infiniteElmRefs",$d([]));se(this,"saveTimeOut$");se(this,"doNextSub$");se(this,"doNext$");se(this,"restart",new Gn(null));se(this,"speedChange",new Gn(5e3));se(this,"stopEvent",new Te);se(this,"_progressWidth",0);se(this,"_currentIndex",0);se(this,"_grabbing",!1);se(this,"panCount",0);
43se(this,"hasInitWriteValue",!1);se(this,"itemElmsChanges",sS(this.itemElms));se(this,"onChange",e=>{});se(this,"onTouched",()=>{});ol(()=>{this.infiniteElmRefs().forEach(i=>{this.addStyle(i.rootNodes[0],{visibility:this.runLoop()?"visible":"hidden"})})});let e=ol(()=>{this.rootElm=this.container().nativeElement,this.containerElm=this.rootElm.children[0],this.init(),Rn([this.bindClick(),this.itemElmsChanges.pipe(et(()=>{this.currentIndex>this.itemElms().length-1&&requestAnimationFrame(()=>{this.currentIndex=this.itemElms().length-1}),this.destroy(),this.removeInfiniteElm(),this.init(),this.progressWidth=0}),et(()=>this._cd.detectChanges())),I$(this.rootElm,()=>this.containerResize())]).pipe(yi(this._destroyRef)).subscribe(),e.destroy()},{allowSignalWrites:!0})}get currentIndex(){return this._currentIndex}set currentIndex(e){if(this.currentIndex!==e){if(!this.runLoop()&&!(0<=e&&e<=this.itemElms().length-1))return;this._currentIndex=e,this.elms&&(this.autoplay()&&!this.isFromAuto&&this._zone.runOutsideAngular(()=>{this.stopEvent.next(void 0),this.callRestart()}),this.drawView(this.currentIndex,this.hasInitWriteValue),this.isDragMany()&&(this.hasInitWriteValue=!0)),0<=this.currentIndex&&this.currentIndex<=this.itemElms().length-1&&this._zone.run(()=>{this.onChange(this.currentIndex),this._cd.detectChanges()})}this.isFromAuto=!1}get progressWidth(){return this._progressWidth}set progressWidth(e){let i=this.progressContainerElm();this.progressElm()&&i&&this.autoplay()&&(this._progressWidth=e,this._renderer.setStyle(i.nativeElement.children[0],"width",`${this.progressWidth}%`))}get grabbing(){return this._grabbing}set grabbing(e){this._grabbing!==e&&this._zone.run(()=>{this._grabbing=e,e?this._renderer.addClass(this.containerElm,"grabbing"):(this.panCount=0,this.callRestart(),this._renderer.removeClass(this.containerElm,"grabbing")),this._cd.detectChanges()})}set left(e){Ga(this.platformId)?this._renderer.setStyle(this.containerElm,"transform",`translateX(${e}px)`):this._renderer.setStyle(this.containerElm,"transform",`translateX(${e}%)`)}get maxRightIndex(){let e=0;switch(this.align()){case"left":e=0;break;case"center":e=this.showNum()-1;break;case"right":e=this.showNum()-1;break}return this.itemElms().length-1-this._showNum+1+e}get lengthOne(){return this.itemElms().length===1}get rootElmWidth(){return Ga(this.platformId)?this.rootElm.getBoundingClientRect().width:100}set containerElmWidth(e){this.setStyle(this.containerElm,"width",e)}ngOnDestroy(){this.destroy()}writeValue(e){(e||e===0)&&(this.currentIndex=e,this.hasInitWriteValue=!0)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}init(){this.initVariable(),this.setViewWidth(!0),this.reSetAlignDistance(),this.disableDrag()||(this.hammer=this.bindHammer()),this.drawView(this.currentIndex,!1),Ga(this.platformId)&&this.runLoop()&&this.addInfiniteElm()}destroy(){this.destroyHammer(),this.autoplay()&&this.doNextSub$?.unsubscribe()}destroyHammer(){this.hammer&&this.hammer.destroy()}addInfiniteElm(){let e=this.infiniteContainer(),i=this.showNum();if(!(!e||typeof i!="number"))for(let o=1;o<=i;o++){let a=e.createEmbeddedView(this.contentContent(),{$implicit:this.data()[this.itemElms().length-o],index:this.itemElms().length-o});this.addStyle(a.rootNodes[0],{position:"absolute",transform:`translateX(-${100*o}%)`,visibility:this.runLoop()?"visible":"hidden"}),this.setStyle(a.rootNodes[0],"width",this.elmWidth);let s=e.createEmbeddedView(this.contentContent(),{$implicit:this.data()[o-1],index:o-1});this.addStyle(s.rootNodes[0],{position:"absolute",right:0,top:0,transform:`translateX(${100*o}%)`,visibility:this.runLoop()?"visible":"hidden"}),this.setStyle(s.rootNodes[0],"width",this.elmWidth),a.detectChanges(),s.detectChanges(),this.infiniteElmRefs.set([...this.infiniteElmRefs(),a,s])}}removeInfiniteElm(){this.infiniteElmRefs().forEach(e=>{e.detach(),e.destroy()}),this.infiniteContainer()&&this.infiniteContainer().clear(),this.infiniteElmRefs.set([])}containerResize(){this.setViewWidth(),this.reSetAlignDistance();let e=this.showNum(),i=typeof e=="number"&&e>=this.elms.length;this.align()!=="center"&&i&&(this.currentIndex=0),this.drawView(this.currentIndex,!1)}initVariable(){this._zone.runOutsideAngular(()=>{this.elms=this.itemElms().map(o=>o.nativeElement);let e=this.restart.asObservable(),i=this.stopEvent.asObservable();this.mouseEnable()&&(e=Xt(e,Jn(this.containerElm,"mouseleave").pipe(Pi(()=>!this.grabbing),et(()=>this.mouseOnContainer=!1))),i=Xt(i,Jn(this.containerElm,"mouseover").pipe(et(()=>this.mouseOnContainer=!0)))),this.doNext$=e.pipe(ii(()=>this.speedChange),ii(()=>ls(this.delay()).pipe(ii(()=>this.runProgress(20)),et(()=>{this.isFromAuto=!0,this.direction()==="left"?this.currentIndex-=this.scrollNum():this.currentIndex+=this.scrollNum()}),Be(i.pipe(et(()=>this.progressWidth=0)))))),this.autoplay()&&(this.doNextSub$=this.doNext$.subscribe())})}reSetAlignDistance(){switch(this.align()){case"center":this.alignDistance=(this.rootElmWidth-this.elmWidth)/2;break;case"left":this.alignDistance=0;break;case"right":this.alignDistance=this.rootElmWidth-this.elmWidth;break}}setViewWidth(e){this.isAutoNum&&(this._showNum=this.getAutoNum()),this._renderer.addClass(this.containerElm,"grab"),e&&this._renderer.addClass(this.containerElm,"ngx-hm-carousel-display-nowrap"),this.elmWidth=this.rootElmWidth/this._showNum,this._renderer.removeClass(this.containerElm,"ngx-hm-carousel-display-nowrap"),this.containerElmWidth=this.elmWidth*this.elms.length,this._renderer.setStyle(this.containerElm,"position","relative"),this.infiniteElmRefs().forEac
43h(i=>{this.setStyle(i.rootNodes[0],"width",this.elmWidth)}),this.elms.forEach(i=>{this.setStyle(i,"width",this.elmWidth)})}bindHammer(){return Ga(this.platformId)?this._zone.runOutsideAngular(()=>{let e=new Hammer.Manager(this.containerElm),i=new Hammer.Pan({direction:Hammer.DIRECTION_HORIZONTAL,threshold:0});return e.add(i),e.on("panleft panright panend pancancel",o=>{if(!this.stopPanListener()&&!this.lengthOne)switch(this.removeContainerTransition(),this.autoplay()&&this._zone.runOutsideAngular(()=>{this.stopEvent.next(void 0)}),o.type){case"panleft":case"panright":{if(this.panCount++,this.panCount<2)return;this.grabbing=!0;let a=this.showNum();if(this.align()!=="center"&&typeof a=="number"&&a>=this.elms.length){this.hammer?.stop(!0);return}if(!this.runLoop()&&this.outOfBound(o.type)&&(o.deltaX*=.2),this.notDrag()||(this.left=-this.currentIndex*this.elmWidth+this.alignDistance+o.deltaX),!this.isDragMany()&&Math.abs(o.deltaX)>this.elmWidth*.5){o.deltaX>0?this.currentIndex-=this.scrollNum():this.currentIndex+=this.scrollNum(),this.hammer?.stop(!0);return}}break;case"pancancel":this.drawView(this.currentIndex);break;case"panend":{let a=this.panBoundary();if(a!==!1&&Math.abs(o.deltaX)>this.elmWidth*a){let s=this.isDragMany()?Math.ceil(Math.abs(o.deltaX)/this.elmWidth):this.scrollNum(),c=this.currentIndex-s,u=this.currentIndex+s;o.deltaX>0?this.goPrev(c):this.goNext(u);break}else o.velocityX<-this.swipeVelocity()&&o.distance>10?this.goNext(this.currentIndex+this.scrollNum()):o.velocityX>this.swipeVelocity()&&o.distance>10?this.goPrev(this.currentIndex-this.scrollNum()):this.drawView(this.currentIndex)}break}}),this.recognizers().forEach(o=>{e.add(o)}),e}):null}goPrev(e){!this.runLoop()&&e<0&&(e=0,this.drawView(0)),this.currentIndex=e}goNext(e){!this.runLoop()&&e>this.maxRightIndex&&(e=this.maxRightIndex,this.drawView(e)),this.currentIndex=e}bindClick(){let e=this.btnNext(),i=this.btnPrev();return e&&i?Rn([Jn(e.nativeElement,"click").pipe(et(()=>this.currentIndex++)),Jn(i.nativeElement,"click").pipe(et(()=>this.currentIndex--))]):Z(null)}callRestart(){this.autoplay()&&!this.mouseOnContainer&&!this.grabbing&&this._zone.runOutsideAngular(()=>{this.restart.next(null)})}drawView(e,i=!0,o=this.isFromAuto){this.elms.length>1?(this.removeContainerTransition(),this.left=-(e*this.elmWidth-this.alignDistance),i&&(o?this._renderer.addClass(this.containerElm,this.aniClassAuto()):this._renderer.addClass(this.containerElm,this.aniClass()),this.infiniteHandler(e))):this.left=this.alignDistance}removeContainerTransition(){this._renderer.removeClass(this.containerElm,this.aniClass()),this._renderer.removeClass(this.containerElm,this.aniClassAuto())}infiniteHandler(e){if(this.runLoop()){let i=0;if(i=e<0?-1:i,i=e>this.itemElms().length-1?1:i,i!==0){switch(i){case-1:this._currentIndex=(this.itemElms().length+e)%this.itemElms().length;break;case 1:this._currentIndex=e%this.itemElms().length;break}let o=this.isFromAuto;this.saveTimeOut$&&this.saveTimeOut$.unsubscribe(),this.saveTimeOut$=ls(this.aniTime()).pipe(ii(()=>this.aniTime()===this.speed()?(this.removeContainerTransition(),this.left=-((this._currentIndex-i)*this.elmWidth)+this.alignDistance,ls(50).pipe(et(()=>{this.drawView(this.currentIndex,this.hasInitWriteValue,o)}))):(this.drawView(this.currentIndex,!1),Z(null))),Be(this.stopEvent)).subscribe()}}}outOfBound(e){switch(e){case"panleft":return this.currentIndex>=this.maxRightIndex;case"panright":return this.currentIndex<=0}}runProgress(e){return this._zone.runOutsideAngular(()=>{let i=this.speed(),o=i/e,a=100/i*e;return eS(e).pipe(et(s=>{this.progressWidth=s%o*a}),oB(o))})}getAutoNum(){let e=this.rootElmWidth;if(this.breakpoint().length>0){let o=this.breakpoint().find(a=>a.width>=e);return o?o.number:this.breakpoint()[this.breakpoint().length-1].number}let i=3;return e>300?Math.floor(i+e/200):i}
43addStyle(e,i){i&&Object.keys(i).forEach(o=>{let a=i[o];this._renderer.setStyle(e,o,a)})}setStyle(e,i,o){Ga(this.platformId)?this._renderer.setStyle(e,i,`${o}px`):this._renderer.setStyle(e,i,`${o}%`)}};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275cmp",L({type:t,selectors:[["ngx-hm-carousel"]],contentQueries:function(i,o,a){i&1&&(yu(a,o.itemElms,Bw,5,ge),yu(a,o.contentPrev,Ioe,5,an),yu(a,o.contentNext,koe,5,an),yu(a,o.dotElm,Doe,5),yu(a,o.progressElm,Moe,5),yu(a,o.infiniteContainer,Aoe,5,ci),yu(a,o.contentContent,Ooe,5,an)),i&2&&d2(7)},viewQuery:function(i,o){i&1&&(qy(o.container,Poe,5,ge),qy(o.btnPrev,Roe,5),qy(o.btnNext,Foe,5),qy(o.progressContainerElm,Noe,5,ge)),i&2&&d2(4)},inputs:{data:[1,"data"],aniTime:[1,"aniTime"],aniClass:[1,"aniClass"],aniClassAuto:[1,"aniClassAuto"],panBoundary:[1,"pan-boundary","panBoundary"],align:[1,"align"],notDrag:[1,"not-follow-pan","notDrag"],mouseEnable:[1,"mouse-enable","mouseEnable"],delay:[1,"between-delay","delay"],direction:[1,"autoplay-direction","direction"],scrollNum:[1,"scroll-num","scrollNum"],isDragMany:[1,"drag-many","isDragMany"],swipeVelocity:[1,"swipe-velocity","swipeVelocity"],breakpoint:[1,"breakpoint"],disableDrag:[1,"disable-drag","disableDrag"],infinite:[1,"infinite"],speed:[1,"autoplay-speed","speed"],recognizers:[1,"recognizers"],stopPanListener:[1,"stopPanListener"],showNum:[1,"show-num","showNum"],autoplay:[1,"autoplay"]},standalone:!0,features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),ot],ngContentSelectors:Loe,decls:8,vars:5,consts:[["containerElm",""],["prev",""],["next",""],["progress",""],[1,"carousel"],[1,"direction","left"],[1,"direction","right"],[1,"indicators"],[1,"mask"],[4,"ngTemplateOutlet"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(i&1&&(Ct(Voe),d(0,"div",4,0),Fe(2),x(3,zoe,3,1,"div",5)(4,Uoe,3,1,"div",6)(5,Woe,3,0,"ul",7)(6,Qoe,3,1,"div")(7,Xoe,3,3,"div",8),p()),i&2){let a,s,c,u;l(3),_t((a=o.contentPrev())?3:-1,a),l(),_t((s=o.contentNext())?4:-1,s),l(),_t((c=o.dotElm())?5:-1,c),l(),_t((u=o.autoplay()&&o.progressElm())?6:-1,u),l(),_t(o.grabbing?7:-1)}},dependencies:[fo,Ve],styles:["[_nghost-%COMP%]{display:block;height:100%}.ngx-hm-carousel-display-nowrap[_ngcontent-%COMP%]{display:flex!important;flex-wrap:nowrap!important;flex-direction:row!important;overflow:hidden!important}.carousel[_ngcontent-%COMP%]{overflow:hidden;position:relative;width:100%;height:100%}.carousel[_ngcontent-%COMP%]   ul.indicators[_ngcontent-%COMP%]{list-style:none;bottom:1rem;left:0;margin:0;padding:0;position:absolute;text-align:center;width:100%}.carousel[_ngcontent-%COMP%]   ul.indicators[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;position:relative;padding:.5rem}.carousel[_ngcontent-%COMP%]   .direction[_ngcontent-%COMP%]{position:absolute;height:100%;cursor:pointer;display:flex;align-items:center;justify-content:center;top:0}.carousel[_ngcontent-%COMP%]   .direction.left[_ngcontent-%COMP%]{left:0}.carousel[_ngcontent-%COMP%]   .direction.right[_ngcontent-%COMP%]{position:absolute;right:0}.grab[_ngcontent-%COMP%]{cursor:grab}.grabbing[_ngcontent-%COMP%]{cursor:grabbing}.mask[_ngcontent-%COMP%]{position:absolute;inset:0}"],changeDetection:0}));let n=t;return n})();y();var BE=()=>{let n=typeof window<"u"?window:void 0;return n&&n.tinymce?n.tinymce:null},Zoe=(()=>{let t=class t{constructor(){se(this,"onBeforePaste",new J);se(this,"onBlur",new J);se(this,"onClick",new J);se(this,"onCompositionEnd",new J);se(this,"onCompositionStart",new J);se(this,"onCompositionUpdate",new J);se(this,"onContextMenu",new J);se(this,"onCopy",new J);se(this,"onCut",new J);se(this,"onDblclick",new J);se(this,"onDrag",new J);se(this,"onDragDrop",new J);se(this,"onDragEnd",new J);se(this,"onDragGesture",new J);se(this,"onDragOver",new J);se(this,"onDrop",new J);se(this,"onFocus",new J);se(this,"onFocusIn",new J);se(this,"onFocusOut",new J);se(this,"onKeyDown",new J);se(this,"onKeyPress",new J);se(this,"onKeyUp",new J);se(this,"onMouseDown",new J);se(this,"onMouseEnter",new J);se(this,"onMouseLeave",new J);se(this,"onMouseMove",new J);se(this,"onMouseOut",new J);se(this,"onMouseOver",new J);se(this,"onMouseUp",new J);se(this,"onPaste",new J);se(this,"onSelectionChange",new J);se(this,"onActivate",new J);se(this,"onAddUndo",new J);se(this,"onBeforeAddUndo",new J);se(this,"onBeforeExecCommand",new J);se(this,"onBeforeGetContent",new J);se(this,"onBeforeRenderUI",new J);se(this,"onBeforeSetContent",new J);se(this,"onChange",new J);se(this,"onClearUndos",new J);se(this,"onDeactivate",new J);se(this,"onDirty",new J);se(this,"onExecCommand",new J);se(this,"onGetContent",new J);se(this,"onHide",new J);se(this,"onInit",new J);se(this,"onInput",new J);se(this,"onInitNgModel",new J);se(this,"onLoadContent",new J);se(this,"onNodeChange",new J);se(this,"onPostProcess",new J);se(this,"onPostRender",new J);se(this,"onPreInit",new J);se(this,"onPreProcess",new J);se(this,"onProgressState",new J);se(this,"onRedo",new J);se(this,"onRemove",new J);se(this,"onReset",new J);se(this,"onResizeEditor",new J);se(this,"onSaveContent",new J);se(this,"onSetAttrib",new J);se(this,"onObjectResizeStart",new J);se(this,"onObjectResized",new J);se(this,"onObjectSelected",new J);se(this,"onSetContent",new J);se(this,"onShow",new J);se(this,"onSubmit",new J);se(this,"onUndo",new J);se(this,"onVisualAid",new J)}};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275dir",_e({type:t,outputs:{onBeforePaste:"onBeforePaste",onBlur:"onBlur",onClick:"onClick",onCompositionEnd:"onCompositionEnd",onCompositionStart:"onCompositionStart",onCompositionUpdate:"onCompositionUpdate",onContextMenu:"onContextMenu",onCopy:"onCopy",onCut:"onCut",onDblclick:"onDblclick",onDrag:"onDrag",onDragDrop:"onDragDrop",onDragEnd:"onDragEnd",onDragGesture:"onDragGesture",onDragOver:"onDragOver",onDrop:"onDrop",onFocus:"onFocus",onF
43ocusIn:"onFocusIn",onFocusOut:"onFocusOut",onKeyDown:"onKeyDown",onKeyPress:"onKeyPress",onKeyUp:"onKeyUp",onMouseDown:"onMouseDown",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave",onMouseMove:"onMouseMove",onMouseOut:"onMouseOut",onMouseOver:"onMouseOver",onMouseUp:"onMouseUp",onPaste:"onPaste",onSelectionChange:"onSelectionChange",onActivate:"onActivate",onAddUndo:"onAddUndo",onBeforeAddUndo:"onBeforeAddUndo",onBeforeExecCommand:"onBeforeExecCommand",onBeforeGetContent:"onBeforeGetContent",onBeforeRenderUI:"onBeforeRenderUI",onBeforeSetContent:"onBeforeSetContent",onChange:"onChange",onClearUndos:"onClearUndos",onDeactivate:"onDeactivate",onDirty:"onDirty",onExecCommand:"onExecCommand",onGetContent:"onGetContent",onHide:"onHide",onInit:"onInit",onInput:"onInput",onInitNgModel:"onInitNgModel",onLoadContent:"onLoadContent",onNodeChange:"onNodeChange",onPostProcess:"onPostProcess",onPostRender:"onPostRender",onPreInit:"onPreInit",onPreProcess:"onPreProcess",onProgressState:"onProgressState",onRedo:"onRedo",onRemove:"onRemove",onReset:"onReset",onResizeEditor:"onResizeEditor",onSaveContent:"onSaveContent",onSetAttrib:"onSetAttrib",onObjectResizeStart:"onObjectResizeStart",onObjectResized:"onObjectResized",onObjectSelected:"onObjectSelected",onSetContent:"onSetContent",onShow:"onShow",onSubmit:"onSubmit",onUndo:"onUndo",onVisualAid:"onVisualAid"}}));let n=t;return n})(),k$=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onCompositionEnd","onCompositionStart","onCompositionUpdate","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onInput","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onResizeEditor","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],jE=(n,t,r)=>Jn(n,t).pipe(Be(r)),Joe=(n,t,r)=>{eae(n).forEach(i=>{let o=n[i];jE(t,i.substring(2),r).subscribe(a=>{rae(o)&&n.ngZone.run(()=>o.emit({event:a,editor:t}))})})},eae=n=>{let t=D$(n.ignoreEvents,[]);return D$(n.allowedEvents,k$).filter(e=>k$.includes(e)&&!t.includes(e))},D$=(n,t)=>typeof n=="string"?n.split(",").map(r=>r.trim()):Array.isArray(n)?n:t,M$=0,tae=n=>{let r=new Date().getTime(),e=Math.floor(Math.random()*1e9);return M$++,n+"_"+e+M$+String(r)},A$=n=>typeof n<"u"&&n.tagName.toLowerCase()==="textarea",O$=n=>typeof n>"u"||n===""?[]:Array.isArray(n)?n:n.split(" "),iae=(n,t)=>O$(n).concat(O$(t)),nae=()=>{},P$=n=>n==null,rae=n=>n.observed||n.observers?.length>0,oae=()=>n=>n.pipe(jd(),W(()=>{})),aae=()=>{let n=new Gn(null),t=n.pipe(Pi(Boolean),ii(([r,e])=>{let i=r.createElement("script");return i.referrerPolicy="origin",i.type="application/javascript",i.src=e,r.head.appendChild(i),Jn(i,"load").pipe(oae())}),Cs({bufferSize:1,refCount:!0}));return{load:(...r)=>(n.getValue()||n.next(r),t),reinitialize:()=>{n.next(null)}}},sae=aae(),$P=new tt("TINYMCE_SCRIPT_SRC"),lae={provide:ye,useExisting:he(()=>G_),multi:!0},G_=(()=>{let t=class t extends Zoe{constructor(i,o,a,s,c){super();se(this,"cdRef");se(this,"platformId");se(this,"tinymceScriptSrc");se(this,"cloudChannel","7");se(this,"apiKey","no-api-key");se(this,"licenseKey");se(this,"init");se(this,"id","");se(this,"initialValue");se(this,"outputFormat");se(this,"inline");se(this,"tagName");se(this,"plugins");se(this,"toolbar");se(this,"modelEvents","change input undo redo");se(this,"allowedEvents");se(this,"ignoreEvents");se(this,"ngZone");se(this,"_elementRef");se(this,"_element");se(this,"_disabled");se(this,"_editor");se(this,"onTouchedCallback",nae);se(this,"onChangeCallback");se(this,"destroy$",new Te);se(this,"initialise",()=>{let i=Lt(re({},this.init),{selector:void 0,target:this._element,inline:this.inl
43ine,readonly:this.disabled,license_key:this.licenseKey,plugins:iae(this.init&&this.init.plugins,this.plugins),toolbar:this.toolbar||this.init&&this.init.toolbar,setup:o=>{this._editor=o,jE(o,"init",this.destroy$).subscribe(()=>{this.initEditor(o)}),Joe(this,o,this.destroy$),this.init&&typeof this.init.setup=="function"&&this.init.setup(o)}});A$(this._element)&&(this._element.style.visibility=""),this.ngZone.runOutsideAngular(()=>{BE().init(i)})});this.cdRef=a,this.platformId=s,this.tinymceScriptSrc=c,this._elementRef=i,this.ngZone=o}set disabled(i){this._disabled=i,this._editor&&this._editor.initialized&&(typeof this._editor.mode?.set=="function"?this._editor.mode.set(i?"readonly":"design"):this._editor.setMode(i?"readonly":"design"))}get disabled(){return this._disabled}get editor(){return this._editor}writeValue(i){this._editor&&this._editor.initialized?this._editor.setContent(P$(i)?"":i):this.initialValue=i===null?void 0:i}registerOnChange(i){this.onChangeCallback=i}registerOnTouched(i){this.onTouchedCallback=i}setDisabledState(i){this.disabled=i}ngAfterViewInit(){Ga(this.platformId)&&(this.id=this.id||tae("tiny-angular"),this.inline=this.inline!==void 0?this.inline!==!1:!!this.init?.inline,this.createElement(),BE()!==null?this.initialise():this._element&&this._element.ownerDocument&&sae.load(this._element.ownerDocument,this.getScriptSrc()).pipe(Be(this.destroy$)).subscribe(this.initialise))}ngOnDestroy(){this.destroy$.next(),BE()!==null&&BE().remove(this._editor)}createElement(){let i=typeof this.tagName=="string"?this.tagName:"div";if(this._element=document.createElement(this.inline?i:"textarea"),this._element){let o=document.getElementById(this.id);o&&o!==this._elementRef.nativeElement&&console.warn(`TinyMCE-Angular: an element with id [${this.id}] already exists. Editors with duplicate Id will not be able to mount`),this._element.id=this.id,A$(this._element)&&(this._element.style.visibility="hidden"),this._elementRef.nativeElement.appendChild(this._element)}}getScriptSrc(){return P$(this.tinymceScriptSrc)?`https://cdn.tiny.cloud/1/${this.apiKey}/tinymce/${this.cloudChannel}/tinymce.min.js`:this.tinymceScriptSrc}initEditor(i){jE(i,"blur",this.destroy$).subscribe(()=>{this.cdRef.markForCheck(),this.ngZone.run(()=>this.onTouchedCallback())}),jE(i,this.modelEvents,this.destroy$).subscribe(()=>{this.cdRef.markForCheck(),this.ngZone.run(()=>this.emitOnChange(i))}),typeof this.initialValue=="string"&&this.ngZone.run(()=>{i.setContent(this.initialValue),i.getContent()!==this.initialValue&&this.emitOnChange(i),this.onInitNgModel!==void 0&&this.onInitNgModel.emit(i)})}emitOnChange(i){this.onChangeCallback&&this.onChangeCallback(i.getContent({format:this.outputFormat}))}};se(t,"\u0275fac",function(o){return new(o||t)(h(ge),h(Bt),h(Me),h(vu),h($P,8))}),se(t,"\u0275cmp",L({type:t,selectors:[["editor"]],inputs:{cloudChannel:"cloudChannel",apiKey:"apiKey",licenseKey:"licenseKey",init:"init",id:"id",initialValue:"initialValue",outputFormat:"outputFormat",inline:"inline",tagName:"tagName",plugins:"plugins",toolbar:"toolbar",modelEvents:"modelEvents",allowedEvents:"allowedEvents",ignoreEvents:"ignoreEvents",disabled:"disabled"},standalone:!0,features:[ne([lae]),Ce,ot],decls:0,vars:0,template:function(o,a){},dependencies:[zi,Qd],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}));let n=t;return n})(),UP=(()=>{let t=class t{};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275mod",Vt({type:t,imports:[G_],exports:[G_]})),se(t,"\u0275inj",Nt({imports:[G_]}));let n=t;return n})();var hae={};Ae(hae,{UserMenuComponent:()=>GE});y();function dae(n,t){if(n&1&&(d(0,"span",12),g(1),p()),n&2){let r=t.$implicit;l(),z(r)}}function pae(n,t){if(n&1&&(d(0,"span",13),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit;l(),z(C(2,1,r))}}function mae(n,t){if(n&1&&(d(0,"div",7)(1,"mat-icon",8),g(2,"account_circle"),p(),d(3,"div",9),x(4,dae,2,1,"span",10),v(5,"async"),x(6,pae,3,3,"span",11),v(7,"async"),p()()),n&2){let r=b
43();l(4),m("ngIf",C(5,2,r.userDisplayName$)),l(2),m("ngIf",C(7,4,r.authorityName$))}}function uae(n,t){if(n&1){let r=B();d(0,"div",14)(1,"button",15),T("click",function(){D(r);let i=b();return M(i.openAccount())}),d(2,"mat-icon",4),g(3,"account_circle"),p(),d(4,"span",16),g(5,"account.account"),p()(),d(6,"button",15),T("click",function(){D(r);let i=b();return M(i.logout())}),d(7,"mat-icon",4),g(8,"exit_to_app"),p(),d(9,"span",16),g(10,"home.logout"),p()()()}}var GE=(()=>{let t=class t{constructor(e,i,o){this.store=e,this.router=i,this.authService=o,this.authorities=Mt,this.authority$=this.store.pipe(Aa(N4),W(a=>a?a.authority:Mt.ANONYMOUS)),this.authorityName$=this.store.pipe(Aa(C2),W(a=>this.getAuthorityName(a))),this.userDisplayName$=this.store.pipe(Aa(C2),W(a=>this.getUserDisplayName(a)))}ngOnInit(){}ngOnDestroy(){}getAuthorityName(e){let i=null;if(e)switch(e.authority){case Mt.SYS_ADMIN:i="user.sys-admin";break;case Mt.TENANT_ADMIN:i="user.tenant-admin";break;case Mt.CUSTOMER_USER:i="user.customer";break}return i}getUserDisplayName(e){let i="";return e&&(e.firstName&&e.firstName.length>0||e.lastName&&e.lastName.length>0?(e.firstName&&(i+=e.firstName),e.lastName&&(i.length>0&&(i+=" "),i+=e.lastName)):i=e.email),i}openAccount(){this.router.navigate(["account"])}logout(){this.authService.logout()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(Ro))},t.\u0275cmp=L({type:t,selectors:[["tb-user-menu"]],inputs:{displayUserInfo:"displayUserInfo"},decls:9,vars:5,consts:[["userMenu","matMenu"],[1,"flex","flex-row"],["class","tb-user-info flex flex-row lt-lg:!hidden",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor"],[1,"material-icons"],["xPosition","before"],["class","tb-user-menu-items",4,"ngIf"],[1,"tb-user-info","flex","flex-row","lt-lg:!hidden"],[1,"material-icons","tb-mini-avatar"],[1,"flex","flex-col","items-stretch","justify-center"],["class","tb-user-display-name",4,"ngIf"],["class","tb-user-authority",4,"ngIf"],[1,"tb-user-display-name"],[1,"tb-user-authority"],[1,"tb-user-menu-items"],["mat-menu-item","",3,"click"],["translate",""]],template:function(i,o){if(i&1&&(d(0,"section",1),x(1,mae,8,6,"div",2),d(2,"button",3)(3,"mat-icon",4),g(4,"more_vert"),p()(),d(5,"mat-menu",5,0),x(7,uae,11,0,"div",6),v(8,"async"),p()()),i&2){let a=me(6);l(),m("ngIf",o.displayUserInfo),l(),m("matMenuTriggerFor",a),l(5),m("ngIf",C(8,3,o.authority$))}},dependencies:[ce,jt,Pe,Se,Zc,tp,Ff,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   div.tb-user-info[_ngcontent-%COMP%]{line-height:1.5}[_nghost-%COMP%]   div.tb-user-info[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{text-transform:none}[_nghost-%COMP%]   div.tb-user-info[_ngcontent-%COMP%]   span.tb-user-display-name[_ngcontent-%COMP%]{font-size:.8rem;font-weight:300;letter-spacing:.008em}[_nghost-%COMP%]   div.tb-user-info[_ngcontent-%COMP%]   span.tb-user-authority[_ngcontent-%COMP%]{font-size:.8rem;font-weight:300;letter-spacing:.005em;opacity:.8}[_nghost-%COMP%]   .mat-icon.tb-mini-avatar[_ngcontent-%COMP%]{width:36px;height:36px;margin:auto 8px;font-size:36px;cursor:default}.tb-user-menu-items[_ngcontent-%COMP%]{min-width:256px}'],changeDetection:0});let n=t;return n})();var jw={};Ae(jw,{TruncateWithTooltipDirective:()=>Sc});y();var Sc=(()=>{let t=class t{constructor(e,i,o,a){this.elementRef=e,this.renderer=i,this.tooltip=o,this.contentObserver=a,this.text=Oi(void 0,{alias:"tbTruncateWithTooltip"}),this.tooltipEnabled=Oi(!0,{transform:Re}),this.position=Oi("above"),Xt(sS(this.text),this.contentObserver.observe(this.elementRef)).pipe(yi()).subscribe(()=>{this.tooltip.message=this.text()||this.elementRef.nativeElement.innerText})}ngOnInit(){this.applyTruncationStyles(),this.tooltip.position=this.position(),this.showTooltipOnOverflow(this)}showTooltipOnOverflow(e){e.tooltip.show=function(i){function o(){e.tooltipEnabled()&&e.isOverflown()&&i.apply(e.tooltip,arguments)}return o}(e.tooltip.show)}applyTruncationStyles(){this.renderer.setStyle(this.elementRef.nativeElement,"white-space","nowrap"),this.renderer.setStyle(this.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.elementRef.nativeElement,"text-overflow","ellipsis")}isOverflown(){return this.elementRef.nativeElement.clientWidth<this.elementRef.nativeElement.scrollWidth}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ni),h(zt),h(ZS))},t.\u0275dir=_e({type:t,selectors:[["","tbTruncateWithTooltip",""]],inputs:{text:[1,"tbTruncateWithTooltip","text"],tooltipEnabled:[1,"tooltipEnabled"],position:[1,"position"]},features:[_B([{directive:zt,inputs:["matTooltipClass","matTooltipClass","matTooltipTouchGestures","matTooltipTouchGestures"]}])]});let n=t;return n})();y();var HP=(()=>{let t=class t{constructor(e){this.el=e,this.tbcontextmenu=new J,$(this.el.nativeElement).on("tbcontextmenu",i=>this.tbcontextmenu.emit(i))}ngOnDestroy(){$(this.el.nativeElement).off("tbcontextmenu")}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","tbcontextmenu",""]],outputs:{tbcontextmenu:"tbcontextmenu"}});let n=t;return n})();var fae={};Ae(fae,{NospacePipe:()=>zE});y();var zE=(()=>{let t=class t{transform(e,i){return e?e.replace(/ /g,""):""}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"nospace",type:t,pure:!0});let n=t;return n})();var bae={};Ae(bae,{TbCheckboxComponent:()=>$E});y();var gae=["*"],$E=(()=>{let t=class t{constructor(){this.trueValue=!0,this.falseValue=!1,this.valueChange=new J,this.prop
43agateChange=e=>{}}onHostChange(e){this.propagateChange(e.checked?this.trueValue:this.falseValue)}modelChange(e){e?(this.innerValue=!0,this.valueChange.emit(this.trueValue)):(this.innerValue=!1,this.valueChange.emit(this.falseValue))}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}writeValue(e){e===this.trueValue?this.innerValue=!0:this.innerValue=!1}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tb-checkbox"]],inputs:{disabled:"disabled",trueValue:"trueValue",falseValue:"falseValue"},outputs:{valueChange:"valueChange"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],ngContentSelectors:gae,decls:2,vars:3,consts:[[3,"ngModelChange","change","ngModel","checked","disabled"]],template:function(i,o){i&1&&(Ct(),d(0,"mat-checkbox",0),bi("ngModelChange",function(s){return gi(o.innerValue,s)||(o.innerValue=s),s}),T("ngModelChange",function(s){return o.modelChange(s)})("change",function(s){return o.onHostChange(s)}),Fe(1),p()),i&2&&(fi("ngModel",o.innerValue),m("checked",o.innerValue)("disabled",o.disabled))},dependencies:[ra,xe,eo],encapsulation:2});let n=t;return n})();var rg={};Ae(rg,{HelpComponent:()=>Ms});y();var _ae=["tb-help",""];function vae(n,t){if(n&1){let r=B();d(0,"button",1),v(1,"translate"),T("click",function(){D(r);let i=b();return M(i.gotoHelpPage())}),d(2,"mat-icon",2),g(3,"help"),p()()}n&2&&te("matTooltip",C(1,1,"help.goto-help-page"))}var Ms=(()=>{let t=class t{constructor(e){this.wl=e}gotoHelpPage(){let e=KB.linksMap[this.helpLinkId];if(!e&&this.helpLinkId&&(this.helpLinkId.startsWith("http://")||this.helpLinkId.startsWith("https://"))&&(e=this.helpLinkId),e){let i=this.wl.getHelpLinkBaseUrl();i&&(e=e.replace("https://thingsboard.io",i)),window.open(e,"_blank")}}};t.\u0275fac=function(i){return new(i||t)(h(fl))},t.\u0275cmp=L({type:t,selectors:[["","tb-help",""]],inputs:{helpLinkId:[0,"tb-help","helpLinkId"]},attrs:_ae,decls:2,vars:3,consts:[["mat-icon-button","","type","button","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","type","button","matTooltipPosition","above",3,"click","matTooltip"],[1,"material-icons"]],template:function(i,o){i&1&&(x(0,vae,4,3,"button",0),v(1,"async")),i&2&&m("ngIf",C(1,1,o.wl.isEnableHelpLinks$()))},dependencies:[ce,Pe,Se,zt,Ve,be],encapsulation:2});let n=t;return n})();var R$={};Ae(R$,{TbAnchorComponent:()=>Zu});y();function yae(n,t){}var Zu=(()=>{let t=class t{constructor(e){this.viewContainerRef=e}};t.\u0275fac=function(i){return new(i||t)(h(ci))},t.\u0275cmp=L({type:t,selectors:[["tb-anchor"]],decls:1,vars:0,template:function(i,o){i&1&&x(0,yae,0,0,"ng-template")},encapsulation:2});let n=t;return n})();var Ale={};Ae(Ale,{TimewindowComponent:()=>Ko});y();var wle={};Ae(wle,{TIMEWINDOW_PANEL_DATA:()=>zw,TimewindowPanelComponent:()=>ug});y();y();var Im={};Ae(Im,{TbPopoverService:()=>Fa});y();y();y();var Vo={top:new Fl({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topLeft:new Fl({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),topRight:new Fl({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"}),right:new Fl({originX:"end",originY:"center"},{overlayX:"start",overlayY:"center"}),rightTop:new Fl({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"}),rightBottom:new Fl({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),bottom:new Fl({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomLeft:new Fl({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),bottomRight:new Fl({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"}),left:new Fl({originX:"start",originY:"center"},{overlayX:"end",overlayY:"center"}),leftTop:new Fl({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"}),leftBottom:new Fl({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})},F$=[Vo.bottomLeft,Vo.bottomRight,Vo.topLeft,Vo.topRight,Vo.left,Vo.right,Vo.bottom];var N$=Qn("popoverMotion",[$i("void => active",[Tt({opacity:0,transform:"scale(0.8)"}),Vi("0.2s cubic-bezier(0.08, 0.82, 0.17, 1)",Tt({opacity:1,transform:"scale(1)"}))]),$i("active => void",[Tt({opacity:1,transform:"scale(1)"}),Vi("0.2s cubic-bezier(0.78, 0.14, 0.15, 0.86)",Tt({opacity:0,transform:"scale(0.8)"}))])]),zrt=["top","topLeft","topRight","right","rightTop","rightBottom","bottom","bottomLeft","bottomRight","left","leftTop","leftBottom"],Cae=["topOnly","topLeftOnly","topRightOnly","rightOnly","rightTopOnly","rightBottomOnly","bottomOnly","bottomLeftOnly","bottomRightOnly","leftOnly","leftTopOnly","leftBottomOnly"],UE=[Vo.top,Vo.right,Vo.bottom,Vo.left],qP=n=>Cae.includes(n),WP=n=>n.substring(0,n.length-4),V$=n=>
43{for(let t in Vo)if(n.connectionPair.originX===Vo[t].originX&&n.connectionPair.originY===Vo[t].originY&&n.connectionPair.overlayX===Vo[t].overlayX&&n.connectionPair.overlayY===Vo[t].overlayY)return t},L$={preferredPlacement:"top",hideOnClickOutside:!0,overlayStyle:{},popoverStyle:{},showCloseButton:!0,visibleFn:()=>{},popoverContentStyle:{},isModal:!1};var G$={};Ae(G$,{TbPopoverComponent:()=>Em,TbPopoverDirective:()=>og});y();var Sae={};Ae(Sae,{coerceArray:()=>pd,coerceBoolean:()=>fe,coerceCssPixelValue:()=>wae,coerceNumber:()=>U_,coerceStringArray:()=>xae});y();var fe=()=>(n,t,r)=>{if(r&&r.set){let e=r.set;r.set=function(i){e.apply(this,[mt(i)])}}else Object.defineProperty(n,t,{get:function(){return this["__"+t]},set:function(o){this["__"+t]=mt(o)},enumerable:!0,configurable:!0})},U_=()=>(n,t,r)=>{if(r&&r.set){let e=r.set;r.set=function(i){e.apply(this,[Ao(i)])}}else Object.defineProperty(n,t,{get:function(){return this["__"+t]},set:function(o){this["__"+t]=Ao(o)},enumerable:!0,configurable:!0})},wae=()=>(n,t,r)=>{if(r&&r.set){let e=r.set;r.set=function(i){e.apply(this,[O2(i)])}}else Object.defineProperty(n,t,{get:function(){return this["__"+t]},set:function(o){this["__"+t]=O2(o)},enumerable:!0,configurable:!0})},pd=()=>(n,t,r)=>{if(r&&r.set){let e=r.set;r.set=function(i){e.apply(this,[uC(i)])}}else Object.defineProperty(n,t,{get:function(){return this["__"+t]},set:function(o){this["__"+t]=uC(o)},enumerable:!0,configurable:!0})},xae=n=>(t,r,e)=>{if(e&&e.set){let i=e.set;e.set=function(o){i.apply(this,[hC(o,n)])}}else Object.defineProperty(t,r,{get:function(){return this["__"+r]},set:function(a){this["__"+r]=hC(a,n)},enumerable:!0,configurable:!0})};var B$={};Ae(B$,{TbStringTemplateOutletContext:()=>HE,TbStringTemplateOutletDirective:()=>H_});y();var H_=(()=>{let t=class t{static ngTemplateContextGuard(e,i){return!0}recreateView(){this.viewContainer.clear();let e=this.tbStringTemplateOutlet instanceof an,i=e?this.tbStringTemplateOutlet:this.templateRef;this.embeddedViewRef=this.viewContainer.createEmbeddedView(i,e?this.tbStringTemplateOutletContext:this.context)}updateContext(){let i=this.tbStringTemplateOutlet instanceof an?this.tbStringTemplateOutletContext:this.context,o=this.embeddedViewRef.context;if(i)for(let a of Object.keys(i))o[a]=i[a]}constructor(e,i){this.viewContainer=e,this.templateRef=i,this.embeddedViewRef=null,this.context=new HE,this.tbStringTemplateOutletContext=null,this.tbStringTemplateOutlet=null}ngOnChanges(e){let{tbStringTemplateOutletContext:i,tbStringTemplateOutlet:o}=e,a=()=>{let c=!1;if(o)if(o.firstChange)c=!0;else{let _=o.previousValue instanceof an,I=o.currentValue instanceof an;c=_||I}return i&&(_=>{let I=Object.keys(_.previousValue||{}),S=Object.keys(_.currentValue||{});if(I.length===S.length){for(let F of S)if(I.indexOf(F)===-1)return!0;return!1}else return!0})(i)||c};o&&(this.context.$implicit=o.currentValue),a()?this.recreateView():this.updateContext()}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(an))},t.\u0275dir=_e({type:t,selectors:[["","tbStringTemplateOutlet",""]],inputs:{tbStringTemplateOutletContext:"tbStringTemplateOutletContext",tbStringTemplateOutlet:"tbStringTemplateOutlet"},exportAs:["tbStringTemplateOutlet"],features:[lt]});let n=t;return n})(),HE=class{};var j$={};Ae(j$,{TbComponentOutletContext:()=>qE,TbComponentOutletDirective:()=>q_});y();var q_=(()=>{let t=class t{static ngTemplateContextGuard(e,i){return!0}recreateComponent(){if(this.viewContainer.clear(),this.componentRef=this.viewContainer.createComponent(this.tbComponentOutlet,{index:0,injector:this.tbComponentInjector}),this.componentChange.next(this.componentRef),this.tbComponentOutletContext)for(let e of Object.keys(this.tbComponentOutletContext))this.componentRef.instance[e]=this.tbComponentOutletContext[e];if(this.tbComponentStyle)for(let e of Object.keys(this.tbComponentStyle))this.renderer.setStyle(this.componentRef.location.nativeElement,e,this.tbComponentStyle[e])}updateContext(){let e=this.tbComponentOutletContext,i=this.componentRef.instance;if(e)for(let o of Object.keys(e))i[o]=e[o]}constructor(e,i){this.viewContainer=e,this.renderer=i,this.componentRef=null,this.context=new qE,this.tbComponentOutletContext=null,this.tbComponentStyle=null,this.tbComponentInjector=null,this.tbComponentOutlet=null,this.componentChange=new J}ngOnChanges(e){let{tbComponentOutletContext:i,tbComponentOutlet:o}=e,a=()=>{let c=!1;if(o)if(o.firstChange)c=!0;else{let _=o.previousValue instanceof $y,I=o.currentValue instanceof $y;c=_||I}
43return i&&(_=>{let I=Object.keys(_.previousValue||{}),S=Object.keys(_.currentValue||{});if(I.length===S.length){for(let F of S)if(I.indexOf(F)===-1)return!0;return!1}else return!0})(i)||c};o&&(this.context.$implicit=o.currentValue),a()?this.recreateComponent():this.updateContext()}};t.\u0275fac=function(i){return new(i||t)(h(ci),h(Ni))},t.\u0275dir=_e({type:t,selectors:[["","tbComponentOutlet",""]],inputs:{tbComponentOutletContext:"tbComponentOutletContext",tbComponentStyle:"tbComponentStyle",tbComponentInjector:"tbComponentInjector",tbComponentOutlet:"tbComponentOutlet"},outputs:{componentChange:"componentChange"},exportAs:["tbComponentOutlet"],features:[lt]});let n=t;return n})(),qE=class{};var Tae=["overlay"],Eae=["popoverRoot"],Iae=["popover"];function kae(n,t){if(n&1){let r=B();d(0,"div",14),T("click",function(i){D(r);let o=b(2);return M(o.closeButtonClick(i))}),g(1,"\xD7"),p()}}function Dae(n,t){if(n&1&&(pt(0),g(1),ct()),n&2){let r=b(3);l(),j(" ",r.tbContent," ")}}function Mae(n,t){if(n&1&&(pt(0),x(1,Dae,2,1,"ng-container",15),ct()),n&2){let r=b
43(2);l(),m("tbStringTemplateOutlet",r.tbContent)("tbStringTemplateOutletContext",r.tbComponentContext)}}function Aae(n,t){if(n&1){let r=B();pt(0,16),T("componentChange",function(i){D(r);let o=b(2);return M(o.onComponentChange(i))}),ct()}if(n&2){let r=b(2);m("tbComponentOutlet",r.tbComponent)("tbComponentInjector",r.tbComponentInjector)("tbComponentOutletContext",r.tbComponentContext)("tbComponentStyle",r.tbComponentStyle)}}function Oae(n,t){if(n&1){let r=B();d(0,"div",null,1),T("@popoverMotion.done",function(){D(r);let i=b();return M(i.animationDone())}),d(2,"div",4,2)(4,"div",5)(5,"div",6),O(6,"span",7),p(),d(7,"div",8),x(8,kae,2,0,"div",9),d(9,"div",10)(10,"div",11),x(11,Mae,2,2,"ng-container",12)(12,Aae,1,4,"ng-container",13),p()()()()()()}if(n&2){let r=b();m("@popoverMotion",r.tbAnimationState),l(2),_n(r.tbOverlayStyle),bt(r.classMap),Y("strict-position",r.strictPosition)("tb-popover-rtl",r.dir==="rtl"),l(5),_n(r.tbPopoverInnerStyle),l(),m("ngIf",r.tbShowCloseButton),l(2),_n(r.tbPopoverInnerContentStyle),Y("strict-position",r.strictPosition),l(),m("ngIf",r.tbContent),l(),m("ngIf",r.tbComponent)}}var W_=class W_{constructor(t,r,e){this.elementRef=t,this.hostView=r,this.renderer=e,this.context=null,this.trigger="hover",this.placement="top",this.showCloseButton=!0,this.tbPopoverBackdrop=!1,this.visibleChange=new J,this.destroy$=new Te,this.triggerDisposables=[],this.internalVisible=!1}ngOnChanges(t){let{trigger:r}=t;r&&!r.isFirstChange()&&this.registerTriggers(),this.component&&this.updatePropertiesByChanges(t)}ngAfterViewInit(){this.registerTriggers()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.clearTogglingTimer(),this.removeTriggerListeners()}show(){this.component||this.createComponent(),this.component?.show()}hide(){this.component?.hide()}updatePosition(){this.component&&this.component.updatePosition()}createComponent(){let t=this.hostView.createComponent(Em);this.component=t.instance,this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),t.location.nativeElement),this.component.setOverlayOrigin(new Tf(this.origin||this.elementRef)),this.initProperties(),this.component.tbVisibleChange.pipe(xr(),Be(this.destroy$)).subscribe(r=>{this.internalVisible=r,this.visibleChange.emit(r)})}registerTriggers(){let t=this.elementRef.nativeElement,r=this.trigger;if(this.removeTriggerListeners(),r==="hover"){let e;this.triggerDisposables.push(this.renderer.listen(t,"mouseenter",()=>{this.delayEnterLeave(!0,!0,this.mouseEnterDelay)})),this.triggerDisposables.push(this.renderer.listen(t,"mouseleave",()=>{this.delayEnterLeave(!0,!1,this.mouseLeaveDelay),this.component?.overlay.overlayRef&&!e&&(e=this.component.overlay.overlayRef.overlayElement,this.triggerDisposables.push(this.renderer.listen(e,"mouseenter",()=>{this.delayEnterLeave(!1,!0,this.mouseEnterDelay)})),this.triggerDisposables.push(this.renderer.listen(e,"mouseleave",()=>{this.delayEnterLeave(!1,!1,this.mouseLeaveDelay)})))}))}else r==="focus"?(this.triggerDisposables.push(this.renderer.listen(t,"focusin",()=>this.show())),this.triggerDisposables.push(this.renderer.listen(t,"focusout",()=>this.hide()))):r==="click"&&this.triggerDisposables.push(this.renderer.listen(t,"click",e=>{e.preventDefault(),this.component?.visible?this.hide():this.show()}))}updatePropertiesByChanges(t){this.updatePropertiesByKeys(Object.keys(t))}updatePropertiesByKeys(t){let r={content:["tbContent",()=>this.content],context:["tbComponentContext",()=>this.context],trigger:["tbTrigger",()=>this.trigger],placement:["tbPlacement",()=>this.placement],visible:["tbVisible",()=>this.visible],showCloseButton:["tbShowCloseButton",()=>this.showCloseButton],mouseEnterDelay:["tbMouseEnterDelay",()=>this.mouseEnterDelay],mouseLeaveDelay:["tbMouseLeaveDelay",()=>this.mouseLeaveDelay],overlayClassName:["tbOverlayClassName",()=>this.overlayClassName],overlayStyle:["tbOverlayStyle",()=>this.overlayStyle],tbPopoverBackdrop:["tbBackdrop",()=>this.tbPopoverBackdrop]};(t||Object.keys(r).filter(e=>!e.startsWith("directive"))).forEach(e=>{if(r[e]){let[i,o]=r[e];this.updateComponentValue(i,o())}}),this.component?.updateByDirective()}initProperties(){this.updatePropertiesByKeys()}updateComponentValue(t,r){typeof r<"u"&&(this.component[t]=r)}delayEnterLeave(t,r,e=-1){this.delayTimer?this.clearTogglingTimer():e>0?this.delayTimer=setTimeout(()=>{this.delayTimer=void 0,r?this.show():this.hide()},e*1e3):r&&t?this.show():this.hide()}
43removeTriggerListeners(){this.triggerDisposables.forEach(t=>t()),this.triggerDisposables.length=0}clearTogglingTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=void 0)}};W_.\u0275fac=function(r){return new(r||W_)(h(ge),h(ci),h(Ni))},W_.\u0275dir=_e({type:W_,selectors:[["","tb-popover",""]],hostVars:2,hostBindings:function(r,e){r&2&&Y("tb-popover-open",e.visible)},inputs:{content:[0,"tbPopoverContent","content"],context:[0,"tbPopoverContext","context"],trigger:[0,"tbPopoverTrigger","trigger"],placement:[0,"tbPopoverPlacement","placement"],origin:[0,"tbPopoverOrigin","origin"],visible:[0,"tbPopoverVisible","visible"],showCloseButton:[0,"tbPopoverShowCloseButton","showCloseButton"],mouseEnterDelay:[0,"tbPopoverMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[0,"tbPopoverMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[0,"tbPopoverOverlayClassName","overlayClassName"],overlayStyle:[0,"tbPopoverOverlayStyle","overlayStyle"],tbPopoverBackdrop:"tbPopoverBackdrop"},outputs:{visibleChange:"tbPopoverVisibleChange"},exportAs:["tbPopover"],features:[lt]});var og=W_;pe([fe(),le("design:type",Object)],og.prototype,"showCloseButton",void 0);var Em=(()=>{let t=class t{set tbVisible(e){let i=e;this.visible!==i&&(this.visible=i,this.tbVisibleChange.next(i))}get tbVisible(){return this.visible&&this.tbAnimationState==="active"}set tbHidden(e){let i=e;this.hidden!==i&&(this.hidden=i,this.hidden?(this.renderer.setStyle(this.popoverRoot.nativeElement,"width",this.popoverRoot.nativeElement.offsetWidth+"px"),this.renderer.setStyle(this.popoverRoot.nativeElement,"height",this.popoverRoot.nativeElement.offsetHeight+"px")):setTimeout(()=>{this.renderer.removeStyle(this.popoverRoot.nativeElement,"width"),this.renderer.removeStyle(this.popoverRoot.nativeElement,"height")}),this.updateStyles(),this.cdr.markForCheck())}get tbHidden(){return this.hidden}set tbTrigger(e){this.trigger=e}get tbTrigger(){return this.trigger}set tbPlacement(e){if(typeof e=="string")if(qP(e)){let i=WP(e);this.positions=[Vo[i]],this.strictPosition=!0}else this.positions=[Vo[e],...UE];else if(e.length&&qP(e[0]))this.positions=e.map(i=>Vo[WP(i)]),this.strictPosition=!0;else{let i=e.map(o=>Vo[o]);this.positions=[...i,...UE]}}get hasBackdrop(){return this.tbModal||this.tbTrigger==="click"&&this.tbBackdrop}get backdropClass(){return this.tbModal?"tb-popover-overlay-backdrop":""}set tbOverlayStyle(e){this._tbOverlayStyle=e,this.popover&&this.cdr.detectChanges()}get tbOverlayStyle(){return this._tbOverlayStyle}constructor(e,i,o,a){this.cdr=e,this.renderer=i,this.animationBuilder=o,this.directionality=a,this.tbContent=null,this.tbComponent=null,this.tbComponentRef=null,this.tbComponentInjector=null,this.tbComponentStyle={},this.tbPopoverInnerStyle={},this.tbPopoverInnerContentStyle={},this.tbBackdrop=!1,this.tbHideOnClickOutside=!0,this.tbShowCloseButton=!0,this.tbModal=!1,this.tbAnimationState="active",this.tbHideStart=new Te,this.tbVisibleChange=new Te,this.tbAnimationDone=new Te,this.tbComponentChange=new Te,this.tbDestroy=new Te,this.visible=!1,this.hidden=!1,this.lastIsIntersecting=!0,this.trigger="hover",this.preferredPlacement="top",this.strictPosition=!1,this.dir="ltr",this.classMap={},this.positions=[...UE],this.scrollStrategy=new lj,this.parentScrollSubscription=null,this.intersectionObserver=new IntersectionObserver(s=>{this.lastIsIntersecting!==s[0].isIntersecting&&(this.lastIsIntersecting=s[0].isIntersecting,this.updateStyles(),this.cdr.markForCheck())},{threshold:[.5]}),this._tbOverlayStyle={}}ngOnInit(){this.directionality.change?.pipe(Be(this.tbDestroy)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){if(this.parentScrollSubscription&&(this.parentScrollSubscription.unsubscribe(),this.parentScrollSubscription=null),this.origin){let e=this.origin.elementRef.nativeElement;this.intersectionObserver.unobserve(e)}this.intersectionObserver.disconnect(),this.intersectionObserver=null,this.tbHideStart.complete(),this.tbVisibleChange.complete(),this.tbAnimationDone.complete(),this.tbDestroy.next(),this.tbDestroy.complete()}closeButtonClick(e){e&&(e.preventDefault(),e.stopPropagation()),this.hide()}show(){if(!this.tbVisible){if(this.isEmpty()||(this.tbVisible=!0,this.tbVisibleChange.next(!0),this.cdr.detectChanges()),this.origin&&this.overlay&&this.overlay.overlayRef){this.overlay.overlayRef.getDirection()==="rtl"&&this.overlay.overlayRef.setDirection("ltr");let e=this.origin.elementRef.nativeElement;this.parentScrollSubscription=gS(e).subscribe(()=>{this.overlay.overlayRef.updatePosition()}),this.intersectionObserver.observe(e)}this.tbAnimationState="active"}}
43hide(){if(this.tbVisible){if(this.tbHideStart.next(),this.parentScrollSubscription&&(this.parentScrollSubscription.unsubscribe(),this.parentScrollSubscription=null),this.origin){let e=this.origin.elementRef.nativeElement;this.intersectionObserver.unobserve(e)}this.tbAnimationState="void",this.cdr.detectChanges(),this.tbAnimationDone.pipe($n(1)).subscribe(()=>{this.tbVisible=!1,this.cdr.detectChanges()})}}updateByDirective(){this.updateStyles(),this.cdr.detectChanges(),Promise.resolve().then(()=>{this.updatePosition(),this.updateVisibilityByContent()})}resize(e,i,o){if(o&&o>0){let a=this.popover.nativeElement.offsetWidth,s=this.popover.nativeElement.offsetHeight,c=[Tt({width:a+"px",height:s+"px"}),Vi(o+"ms",Tt({width:e,height:i}))],f=this.animationBuilder.build(c).create(this.popover.nativeElement);f.play();let _=new ResizeObserver(()=>{this.updatePosition()});_.observe(this.popover.nativeElement),f.onDone(()=>{f.destroy(),_.disconnect(),this.setSize(e,i)})}else this.setSize(e,i)}setSize(e,i){this.renderer.setStyle(this.popover.nativeElement,"width",e),this.renderer.setStyle(this.popover.nativeElement,"height",i),this.updatePosition()}updatePosition(){this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.updatePosition()}onPositionChange(e){this.preferredPlacement=V$(e),this.updateStyles(),this.cdr.detectChanges()}updateStyles(){this.classMap={[`tb-popover-placement-${this.preferredPlacement}`]:!0,"tb-popover-hidden":this.tbHidden||!this.lastIsIntersecting},this.tbOverlayClassName&&(this.classMap[this.tbOverlayClassName]=!0)}setOverlayOrigin(e){this.origin=e,this.cdr.markForCheck()}onClickOutside(e){!this.tbModal&&this.tbHideOnClickOutside&&!this.origin.elementRef.nativeElement.contains(e.target)&&this.tbTrigger!==null&&(this.isTopOverlay(e.target)||this.hide())}onComponentChange(e){this.tbComponentRef=e,this.strictPosition&&(this.renderer.setStyle(this.tbComponentRef.location.nativeElement,"display","flex"),this.renderer.setStyle(this.tbComponentRef.location.nativeElement,"height","100%")),this.tbComponentChange.next(e)}animationDone(){this.tbAnimationDone.next()}isTopOverlay(e){let i=$(e);if(i.parents(".cdk-overlay-container").length){let o;i.hasClass("cdk-overlay-backdrop")?o=i:o=i.parents(".cdk-overlay-pane").parent();let a=$(this.overlay.overlayRef.overlayElement).parent();return o.index()>a.index()}return!1}updateVisibilityByContent(){this.isEmpty()&&this.hide()}isEmpty(){return this.tbComponent instanceof $y||this.tbContent instanceof an?!1:!fn(this.tbContent)}};t.\u0275fac=function(i){return new(i||t)(h(Me),h(Ni),h(RB),h(mr,8))},t.\u0275cmp=L({type:t,selectors:[["tb-popover"]],viewQuery:function(i,o){if(i&1&&(ae(Tae,5),ae(Eae,5),ae(Iae,5)),i&2){let a;Q(a=K())&&(o.overlay=a.first),Q(a=K())&&(o.popoverRoot=a.first),Q(a=K())&&(o.popover=a.first)}},exportAs:["tbPopoverComponent"],decls:2,vars:8,consts:[["overlay","cdkConnectedOverlay"],["popoverRoot",""],["popover",""],["cdkConnectedOverlay","",3,"overlayOutsideClick","detach","positionChange","cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","cdkConnectedOverlayFlexibleDimensions"],[1,"tb-popover"],[1,"tb-popover-content"],[1,"tb-popover-arrow"],[1,"tb-popover-arrow-content"],["role","tooltip",1,"tb-popover-inner"],["class","tb-popover-close-button",3,"click",4,"ngIf"],[2,"width","100%","height","100%"],[1,"tb-popover-inner-content"],[4,"ngIf"],[3,"tbComponentOutlet","tbComponentInjector","tbComponentOutletContext","tbComponentStyle","componentChange",4,"ngIf"],[1,"tb-popover-close-button",3,"click"],[4,"tbStringTemplateOutlet","tbStringTemplateOutletContext"],[3,"componentChange","tbComponentOutlet","tbComponentInjector","tbComponentOutletContext","tbComponentStyle"]],template:function(i,o){if(i&1){let a=B();x(0,Oae,13,18,"ng-template",3,0,kt),T("overlayOutsideClick",function(c){return D(a),M(o.onClickOutside(c))})("detach",function(){return D(a),M(o.hide())})("positionChange",function(c){return D(a),M(o.onPositionChange(c))})}i&2&&m("cdkConnectedOverlayHasBackdrop",o.hasBackdrop)("cdkConnectedOverlayBackdropClass",o.backdropClass)("cdkConnectedOverlayOrigin",o.origin)("cdkConnectedOverlayPositions",o.positions)("cdkConnectedOverlayScrollStrategy",o.scrollStrategy)("cdkConnectedOverlayOpen",o.visible)("cdkConnectedOverlayPush",!o.strictPosition)("cdkConnectedOverlayFlexibleDimensions",o.strictPosition)},dependencies:[ce,dj,H_,q_],styles:[`@charset "UTF-8";.tb-popover{z-index:1030;font-weight:400;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;user-select:text;max-width:100vw;max-height:100vh}.tb-popover.strict-position{width:100%;height:100%}.tb-popover:after{position:absolute;background:#ffffff03;content:""}.tb-popover-hidden{display:none}.tb-popover-placement-top,.tb-popover-placement-topLeft,.tb-popover-placement-topRight{padding-bottom:10px}.tb-popover-placement-right,.tb-popover-placement-rightTop,.tb-popover-placement-rightBottom{padding-left:10px}.tb-popover-placement-bottom,.tb-popover-placement-bottomLeft,.tb-popover-placement-bottomRight{padding-top:10px}.tb-popover-placement-left,.tb-popover-placement-leftTop,.tb-popover-placement-leftBottom{padding-right:10px}.tb-popover-inner{background-color:#fff;background-clip:padding-box;border-radius:6px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d,0 0 8px #00000026;overflow:hidden;position:relative;width:100%;height:100%}
43.tb-popover-close-button{cursor:pointer;position:absolute;top:6px;right:6px;padding:0;border:none;text-align:center;width:30px;height:30px;font-size:30px;color:#8e8e8e;text-decoration:none;font-weight:700;background:transparent;z-index:15}.tb-popover-close-button:hover{color:#313131}.tb-popover-content{width:100%;height:100%}.tb-popover-inner-content{padding:12px 16px;color:#000000d9;overflow:auto;width:100%;height:100%}.tb-popover-inner-content.strict-position{display:flex;overflow:hidden}.tb-popover-arrow{position:absolute;display:block;width:8.4852813742px;height:8.4852813742px;background:transparent;border-style:solid;border-width:4.2426406871px;transform:rotate(45deg);z-index:10}.tb-popover-placement-top>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-topLeft>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-topRight>.tb-popover-content>.tb-popover-arrow{bottom:6.2px;border-top-color:transparent;border-right-color:#fff;border-bottom-color:#fff;border-left-color:transparent;box-shadow:3px 3px 7px #00000012}.tb-popover-placement-top>.tb-popover-content>.tb-popover-arrow{left:50%;transform:translate(-50%) rotate(45deg)}.tb-popover-placement-topLeft>.tb-popover-content>.tb-popover-arrow{left:16px}.tb-popover-placement-topRight>.tb-popover-content>.tb-popover-arrow{right:16px}.tb-popover-placement-right>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-rightTop>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-rightBottom>.tb-popover-content>.tb-popover-arrow{left:6px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#fff;border-left-color:#fff;box-shadow:-3px 3px 7px #00000012}.tb-popover-placement-right>.tb-popover-content>.tb-popover-arrow{top:50%;transform:translateY(-50%) rotate(45deg)}.tb-popover-placement-rightTop>.tb-popover-content>.tb-popover-arrow{top:12px}.tb-popover-placement-rightBottom>.tb-popover-content>.tb-popover-arrow{bottom:12px}.tb-popover-placement-bottom>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-bottomLeft>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-bottomRight>.tb-popover-content>.tb-popover-arrow{top:6px;border-top-color:#fff;border-right-color:transparent;border-bottom-color:transparent;border-left-color:#fff;box-shadow:-2px -2px 5px #0000000f}.tb-popover-placement-bottom>.tb-popover-content>.tb-popover-arrow{left:50%;transform:translate(-50%) rotate(45deg)}.tb-popover-placement-bottomLeft>.tb-popover-content>.tb-popover-arrow{left:16px}.tb-popover-placement-bottomRight>.tb-popover-content>.tb-popover-arrow{right:16px}.tb-popover-placement-left>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-leftTop>.tb-popover-content>.tb-popover-arrow,.tb-popover-placement-leftBottom>.tb-popover-content>.tb-popover-arrow{right:6px;border-top-color:#fff;border-right-color:#fff;border-bottom-color:transparent;border-left-color:transparent;box-shadow:3px -3px 7px #00000012}.tb-popover-placement-left>.tb-popover-content>.tb-popover-arrow{top:50%;transform:translateY(-50%) rotate(45deg)}.tb-popover-placement-leftTop>.tb-popover-content>.tb-popover-arrow{top:12px}.tb-popover-placement-leftBottom>.tb-popover-content>.tb-popover-arrow{bottom:12px}
44`],encapsulation:2,data:{animation:[N$]},changeDetection:0});let n=t;return n})();y();var WE=new tt("HELP_MARKDOWN_COMPONENT_TOKEN"),YE=new tt("SHARED_MODULE_TOKEN");var Fa=(()=>{let t=class t{constructor(e){this.helpMarkdownComponent=e,this.popoverWithTriggers=[]}hasPopover(e){return this.findPopoverByTrigger(e)!==null}hidePopover(e){let i=this.findPopoverByTrigger(e);return i&&i.tbVisible?(i.hide(),!0):!1}createPopoverRef(e){return e.createComponent(Em)}displayPopover(e,i,o,a,s,c,u,f,_,I,S,F,H,q){if(!(e instanceof Element)&&"trigger"in e&&"renderer"in e&&"componentType"in e){let ee=this.createPopoverRef(e.hostView);return this.displayPopoverWithComponentRef(Lt(re({},e),{componentRef:ee}))}else if(e instanceof Element){let ee=this.createPopoverRef(o);return this.displayPopoverWithComponentRef(ee,e,i,a,s,c,u,f,_,I,S,F,H,q)}else throw new Error("Invalid configuration provided for displayPopover")}displayPopoverWithComponentRef(e,i,o,a,s,c,u,f,_,I,S,F,H,q={}){let ee;if(!(e instanceof l2)&&"trigger"in e&&"renderer"in e&&"componentType"in e)ee=e;else if(e instanceof l2)ee={componentRef:e,trigger:i,renderer:o,componentType:a,preferredPlacement:s,hideOnClickOutside:c,injector:u,context:f,overlayStyle:_,popoverStyle:I,style:S,showCloseButton:F,visibleFn:H,popoverContentStyle:q};else throw new Error("Invalid configuration provided for displayPopoverWithComponentRef");return ee=go({},L$,ee),this._displayPopoverWithComponentRef(ee)}
44_displayPopoverWithComponentRef(e){let i=e.componentRef.instance;this.popoverWithTriggers.push({trigger:e.trigger,popoverComponent:i}),e.renderer.removeChild(e.renderer.parentNode(e.trigger),e.componentRef.location.nativeElement);let o=new ge(e.trigger);return i.setOverlayOrigin(new Tf(o)),i.tbPlacement=e.preferredPlacement,i.tbComponent=e.componentType,i.tbComponentInjector=e.injector,i.tbComponentContext=e.context,i.tbOverlayStyle=e.overlayStyle,i.tbModal=e.isModal,i.tbPopoverInnerStyle=e.popoverStyle,i.tbPopoverInnerContentStyle=e.popoverContentStyle,i.tbComponentStyle=e.style,i.tbHideOnClickOutside=e.hideOnClickOutside,i.tbShowCloseButton=e.showCloseButton,i.tbVisibleChange.subscribe(a=>{a||e.componentRef.destroy()}),i.tbDestroy.subscribe(()=>{this.removePopoverByComponent(i)}),i.tbHideStart.subscribe(()=>{e.visibleFn(!1)}),i.show(),e.visibleFn(!0),i}toggleHelpPopover(e,i,o,a="",s="",c="",u=null,f=()=>{},_=()=>{},I="bottom",S={},F={}){if(this.hasPopover(e))this.hidePopover(e);else{_(!1);let H=Mn.create({parent:o.injector,providers:[]}),q=o.createComponent(Em),ee=q.instance;this.popoverWithTriggers.push({trigger:e,popoverComponent:ee}),i.removeChild(i.parentNode(e),q.location.nativeElement);let Ie=new ge(e);ee.tbAnimationState="void",ee.tbOverlayStyle=Lt(re({},S),{opacity:"0"}),ee.setOverlayOrigin(new Tf(Ie)),ee.tbPlacement=I,ee.tbComponent=this.helpMarkdownComponent,ee.tbComponentInjector=H,ee.tbComponentContext={helpId:a,helpContent:s,helpContentBase64:c,asyncHelpContent:u,style:F,visible:!0},ee.tbHideOnClickOutside=!0,ee.tbVisibleChange.subscribe(qe=>{qe||(f(!1),q.destroy())}),ee.tbDestroy.subscribe(()=>{this.removePopoverByComponent(ee)});let He=()=>{ee.tbOverlayStyle=Lt(re({},ee.tbOverlayStyle),{opacity:"1"}),ee.tbAnimationState="active",ee.updatePosition(),_(!0),setTimeout(()=>{ee.updatePosition()})},Le=qe=>{qe.isMarkdownReady?He():qe.markdownReady.subscribe(()=>{He()})};ee.tbComponentRef?Le(ee.tbComponentRef.instance):ee.tbComponentChange.subscribe(qe=>{Le(qe.instance)}),ee.show(),f(!0)}}findPopoverByTrigger(e){let i=this.popoverWithTriggers.find(o=>this.elementsAreEqualOrDescendant(e,o.trigger));return i?i.popoverComponent:null}removePopoverByComponent(e){let i=this.popoverWithTriggers.findIndex(o=>o.popoverComponent===e);i>-1&&this.popoverWithTriggers.splice(i,1)}elementsAreEqualOrDescendant(e,i){return e===i||e.contains(i)||i.contains(e)}};t.\u0275fac=function(i){return new(i||t)(X(WE))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();var Rae={};Ae(Rae,{AggregationOptionsConfigPanelComponent:()=>Y_});y();function Pae(n,t){if(n&1&&(d(0,"mat-list-option",12),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",C(2,2,e.aggregationTypesTranslations.get(e.aggregationTypes[r]))," ")}}var Y_=(()=>{let t=class t{constructor(e){this.fb=e,this.aggregationTypes=Uc,this.allAggregationTypes=Object.values(Uc),this.aggregationTypesTranslations=kS}ngOnInit(){this.aggregationOptionsConfigForm=this.fb.group({allowedAggregationTypes:[this.allowedAggregationTypes?.length?this.allowedAggregationTypes:this.allAggregationTypes]})}update(){if(this.onClose){let e=this.aggregationOptionsConfigForm.get("allowedAggregationTypes").value;this.onClose(e?.length<this.allAggregationTypes.length?e:[])}}cancel(){this.onClose&&this.onClose(null)}};t.\u0275fac=function(i){return new(i||t)(h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-aggregation-options-config-panel"]],inputs:{allowedAggregationTypes:"allowedAggregationTypes",onClose:"onClose",popoverComponent:"popoverComponent"},decls:22,vars:18,consts:[[1,"tb-aggregation-options-form","tb-form-panel","no-border",3,"formGroup"],[1,"tb-form-panel-title"],[1,"tb-form-hint","tb-primary-fill"],[1,"tb-form-table","no-gap","no-padding"],[1,"tb-form-table-header"],[1,"tb-form-table-header-cell"],[1,"tb-form-table-body"],["formControlName","allowedAggregationTypes"],["togglePosition","before","color","primary",3,"value",4,"ngFor","ngForOf"],[1,"tb-flex","flex-end","no-gap"],["type","button","mat-button","",3,"click"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["togglePosition","before","color","primary",3,"value"]],template:function(i,o){i&1&&(d(0,"form",0)(1,"div",1),g(2),v(3,"translate"),p(),d(4,"div",2),g(5),v(6,"translate"),p(),d(7,"div",3)(8,"div",4)(9,"div",5),g(10),v(11,"translate"),p()(),d(12,"div",6)(13,"mat-selection-list",7),x(14,Pae,3,4,"mat-list-option",8),p()()(),d(15,"div",9)(16,"button",10),T("click",function(){return o.cancel()}),g(17),v(18,"translate"),p(),d(19,"button",11),T("click",function(){return o.update()}),g(20),v(21,"translate"),p()()()),i&2&&(m("formGroup",o.aggregationOptionsConfigForm),l(2),z(C(3,8,"timewindow.edit-aggregation-functions-list")),l(3),z(C(6,10,"timewindow.edit-aggregation-functions-list-hint")),l(5),z(C(11,12,"timewindow.allowed-aggregation-functions")),l(4),m("ngForOf",o.allAggregationTypes),l(3),j(" ",C(18,14,"action.cancel")," "),l(2),m("disabled",o.aggregationOptionsConfigForm.invali
44d||!o.aggregationOptionsConfigForm.dirty),l(),j(" ",C(21,16,"action.apply")," "))},dependencies:[Ke,yt,E_,T_,ur,xe,We,$e,Qe,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-aggregation-options-form[_ngcontent-%COMP%]{height:100%;max-width:350px}[_nghost-%COMP%]   .tb-aggregation-options-form[_ngcontent-%COMP%]   .tb-form-table[_ngcontent-%COMP%]{overflow:hidden}[_nghost-%COMP%]   .tb-aggregation-options-form[_ngcontent-%COMP%]   .tb-form-table-body[_ngcontent-%COMP%]{overflow-y:auto}[_nghost-%COMP%]   .tb-aggregation-options-form[_ngcontent-%COMP%]   .tb-form-hint[_ngcontent-%COMP%]{flex-shrink:0}[_nghost-%COMP%]   .tb-aggregation-options-form[_ngcontent-%COMP%]   .mdc-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%]   .tb-aggregation-options-form[_ngcontent-%COMP%]   .mdc-list[_ngcontent-%COMP%]   .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line[_ngcontent-%COMP%]{height:40px}']});let n=t;return n})();var Uae={};Ae(Uae,{IntervalOptionsConfigPanelComponent:()=>Dm});y();y();var z$=n=>({"tb-inline-field":n});function Fae(n,t){n&1&&(d(0,"mat-select-trigger"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"timewindow.all")," "))}function Nae(n,t){if(n&1&&(d(0,"mat-option",7),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit;m("value",r.value),l(),j(" ",ft(2,2,r.name,r.translateParams)," ")}}function Vae(n,t){if(n&1&&(d(0,"mat-option",7),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit;m("value",r.value),l(),j(" ",ft(2,2,r.name,r.translateParams)," ")}}var ag=class ag{constructor(t,r){this.timeService=t,this.fb=r,this.useCalendarIntervals=!1,this.subscriptSizing="fixed",this.appearance="fill",this.rendered=!1,this.propagateChange=e=>{this.propagateChangeValue=e},this.timeintervalFormGroup=this.fb.group({aggIntervals:[[]],defaultAggInterval:[null]}),this.timeintervalFormGroup.get("aggIntervals").valueChanges.pipe(yi()).subscribe(e=>this.setSelectedIntervals(e)),this.timeintervalFormGroup.valueChanges.pipe(yi()).subscribe(()=>this.updateView())}ngOnInit(){this.updateIntervalsList()}registerOnChange(t){this.propagateChange=t,dt(this.propagateChangeValue)&&this.propagateChange(this.propagateChangeValue)}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?this.timeintervalFormGroup.disable({emitEvent:!1}):this.timeintervalFormGroup.enable({emitEvent:!1})}writeValue(t){this.modelValue=t,this.rendered=!0,this.timeintervalFormGroup.get("defaultAggInterval").patchValue(t.defaultAggInterval,{emitEvent:!1}),this.setIntervals(t.aggIntervals)}updateIntervalsList(){this.allIntervals=this.timeService.getIntervals(this.min,this.max,this.useCalendarIntervals),this.allIntervalValues=this.allIntervals.map(t=>t.value)}setIntervals(t){let r=t?.length?t:this.allIntervalValues;this.timeintervalFormGroup.get("aggIntervals").patchValue(r,{emitEvent:!1}),this.setSelectedIntervals(r)}setSelectedIntervals(t){!t.length||t.length===this.allIntervalValues.length?this.selectedIntervals=this.allIntervals:this.selectedIntervals=NS(t);let r=this.timeintervalFormGroup.get("defaultAggInterval").value;r&&!t.includes(r)&&this.timeintervalFormGroup.get("defaultAggInterval").patchValue(null)}updateView(){if(!this.rendered)return;let t,r=this.timeintervalFormGroup.get("aggIntervals").value;r.length<this.allIntervals.length?t=r:t=[],this.modelValue={aggIntervals:t,defaultAggInterval:this.timeintervalFormGroup.get("defaultAggInterval").value},this.propagateChange(this.modelValue)}};ag.\u0275fac=function(r){return new(r||ag)(h(ba),h(Ai))},ag.\u0275cmp=L({type:ag,selectors:[["tb-grouping-interval-options"]],inputs:{min:"min",max:"max",useCalendarIntervals:"useCalendarIntervals",disabled:"disabled",subscriptSizing:"subscriptSizing",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>ag),multi:!0}])],decls:12,vars:22,consts:[[1,"flex","flex-1","flex-row","gap-2",3,"formGroup"],[1,"agg-interval","flex","flex-1",3,"subscriptSizing","appearance"],["formControlName","aggIntervals","multiple","",3,"placeholder"],[4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"flex","flex-1",3,"subscriptSizing","appearance"],["formControlName","defaultAggInterval",3,"placeholder"],[3,"value"]],template:function(r,e){if(r&1&&(d(0,"section",0)(1,"mat-form-field",1)(2,"mat-select",2),v(3,"translate"),x(4,Fae,3,3,"mat-select-trigger",3)(5,Nae,3,5,"mat-option",4),p()(),d(6,"mat-form-field",5)(7,"mat-select",6),v(8,"translate"),d(9,"mat-option"),g(10,"--"),p(),x(11,Vae,3,5,"mat-option",4),p()()()),r&2){let i;m("formGroup",e.timeintervalFormGroup),l(),bt(Xe(18,z$,e.appearance==="outline")),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(),te("placeholder",C(3,14,"timewindow.all")),l(2),m("ngIf",((i=e.timeintervalFormGroup.get("aggIntervals").value)==null?null:i.length)===e.allIntervals.length),l(),m("ngForOf",e.allIntervals),l(),bt(Xe(20,z$,e.appearance==="outline")),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(),te("placeholder",C(8,16,"action.set")),l(4),m("ngForOf",e.selectedIntervals)}},dependencies:[Ke,ce,ze,Kn,Fb,xt,xe,We,$e,Qe,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .agg-interval[_ngcontent-%COMP%]{max-width:180px}@media screen and (max-width: 599px){[_nghost-%COMP%]{min-width:0;width:100%}}']});var ap=ag;pe([U_(),le("design:type",Number)],ap.prototype,"min",void 0);pe([U_(),le("design:type",Number)],ap.prototype,"max",void 0);pe([fe(),le("design:type",Object)],ap.prototype,"useCalendarIntervals",void 0);var Bae=()=>({maxWidth:"600px"}),jae=()=>({maxWidth:"350px"});function Gae(n,t){n&1&&(pt(0),d(1,"div",15),g(2),v(3,"translate"),p(),d(4,"div",15),g(5),v(6,"translate"),p(),ct()),n&2&&(l(2),z(C(3,2,"timewindow.allowed-agg-intervals")),l(3),z(C(6,4,"timewindow.default-agg-interval")))}function zae(n,t){if(n&1&&(pt(0),d(1,"div",20),O(2,"tb-grouping-interval-options",21),p(),ct()),n&2){let r=b
44().$implicit,e=b();l(2),m("min",e.minAggInterval(r.get("value").value))("max",e.maxAggInterval(r.get("value").value))}}function $ae(n,t){if(n&1&&(pt(0),d(1,"div",16)(2,"div",17)(3,"mat-checkbox",18)(4,"mat-label",19),g(5),p()()(),x(6,zae,3,2,"ng-container",7),p(),ct()),n&2){let r=t.$implicit,e=t.index,i=b();l(),m("formGroupName",e),l(4),z(r.get("name").value),l(),m("ngIf",i.aggregation)}}var Q_=class Q_{constructor(t,r,e){this.fb=t,this.timeService=r,this.translate=e,this.aggregation=!1,this.timeIntervalTranslationMap=gf,this.destroyRef=Rt(En)}ngOnInit(){this.intervalType===ia.LAST_INTERVAL||this.intervalType===Ar.LAST_INTERVAL?(this.allIntervals=this.timeService.getIntervals(void 0,void 0,!1),this.allIntervalValues=this.allIntervals.map(r=>r.value)):(this.allIntervalValues=this.getQuickIntervals(),this.allIntervals=this.allIntervalValues.map(r=>({name:this.timeIntervalTranslationMap.get(r),value:r}))),this.intervalOptionsConfigForm=this.fb.group({intervals:this.fb.array([])});let t=[];for(let r of this.allIntervals){let e=this.aggIntervalsConfig?.hasOwnProperty(r.value)?this.aggIntervalsConfig[r.value]:null,i=this.allowedIntervals?.length?this.allowedIntervals.includes(r.value):!0,o=this.fb.group({name:[this.translate.instant(r.name,r.translateParams)],value:[r.value],enabled:[i],aggIntervalsConfig:[{value:{aggIntervals:e?.aggIntervals?e.aggIntervals:[],defaultAggInterval:e?.defaultAggInterval?e.defaultAggInterval:null},disabled:!(i&&this.aggregation)}]});this.aggregation&&o.get("enabled").valueChanges.pipe(yi(this.destroyRef)).subscribe(a=>{a?o.get("aggIntervalsConfig").enable({emitEvent:!1}):o.get("aggIntervalsConfig").disable({emitEvent:!1})}),t.push(o)}this.intervalOptionsConfigForm.setControl("intervals",this.fb.array(t),{emitEvent:!1})}get intervalsFormArray(){return this.intervalOptionsConfigForm.get("intervals")}minAggInterval(t){return this.timeService.minIntervalLimit(this.getIntervalMs(t))}maxAggInterval(t){return this.timeService.maxIntervalLimit(this.getIntervalMs(t))}getIntervalMs(t){return this.intervalType===ia.INTERVAL||this.intervalType===Ar.INTERVAL?T5(t):t}trackByElement(t,r){return r}update(){if(this.onClose){let t=[],r={},e=this.intervalOptionsConfigForm.get("intervals").value;for(let i of e)if(i.enabled&&(t.push(i.value),this.aggregation&&(i.aggIntervalsConfig.aggIntervals.length||i.aggIntervalsConfig.defaultAggInterval))){let o={};i.aggIntervalsConfig.aggIntervals.length&&(o.aggIntervals=i.aggIntervalsConfig.aggIntervals),i.aggIntervalsConfig.defaultAggInterval&&(o.defaultAggInterval=i.aggIntervalsConfig.defaultAggInterval),r[i.value]=o}this.onClose({allowedIntervals:t?.length<this.allIntervals.length?t:[],aggIntervalsConfig:r})}}cancel(){this.onClose&&this.onClose(null)}reset(){let t=this.intervalsFormArray.controls;for(let r of t)r.patchValue({enabled:!0,aggIntervalsConfig:{aggIntervals:[],defaultAggInterval:null}});this.intervalOptionsConfigForm.markAsDirty()}getQuickIntervals(){let t=Object.values(DS);return this.timewindowType===Gs.REALTIME?t.filter(r=>r.startsWith("CURRENT_")):t}getIndeterminate(){let t=this.intervalsFormArray.value.filter(r=>r.enabled);return t.length!==0&&t.length!==this.allIntervals.length}enableDisableIntervals(t){let r=this.intervalsFormArray.controls;for(let e of r)e.patchValue({enabled:t});this.intervalOptionsConfigForm.markAsDirty()}getChecked(){return this.intervalsFormArray.value.every(r=>r.enabled)}};Q_.\u0275fac=function(r){return new(r||Q_)(h(Ai),h(ba),h(Ge))},Q_.\u0275cmp=L({type:Q_,selectors:[["tb-interval-options-config-panel"]],inputs:{aggregation:"aggregation",allowedIntervals:"allowedIntervals",aggIntervalsConfig:"aggIntervalsConfig",intervalType:"intervalType",timewindowType:"timewindowType",onClose:"onClose",popoverComponent:"popoverComponent"},decls:28,vars:32,consts:[[1,"tb-interval-options-form","tb-form-panel","no-border",3,"formGroup"],[1,"tb-form-panel-title"],[1,"tb-form-hint","tb-primary-fill"],[1,"tb-form-table"],[1,"tb-form-table-header"],["tbTruncateWithTooltip","",1,"tb-form-table-header-cell","tb-interval"],["color","warn",3,"click","change","indeterminate","checked"],[4,"ngIf"],["formArrayName","intervals",1,"tb-form-table-body"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex","flex-row","gap-2","items-center"],["type","button","mat-button","","color","primary",3,"click"],[1,"flex-1"],["type","button","mat-button","",3,"click"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["tbTruncateWithTooltip","",1,"tb-form-table-header-cell","tb-agg-interval-header"],[1,"tb-form-table-row",3,"formGroupName"],[1,"tb-form-table-row-cell","tb-interval"],["formControlName","enabled","color","primary",1,"tb-interval-option"],["tbTruncateWithTooltip",""],[1,"tb-form-table-row-cell","tb-agg-interval"],["formControlName","aggIntervalsConfig","useCalendarIntervals","","subscriptSizing","dynamic","appearance","outline",3,"min","max"]],template:function(r,e){r&1&&
44(d(0,"form",0)(1,"div",1),g(2),v(3,"translate"),p(),d(4,"div",2),g(5),v(6,"translate"),v(7,"translate"),p(),d(8,"div",3)(9,"div",4)(10,"div",5)(11,"mat-checkbox",6),T("click",function(o){return o.stopPropagation()})("change",function(o){return e.enableDisableIntervals(o.checked)}),p(),g(12),v(13,"translate"),p(),x(14,Gae,7,6,"ng-container",7),p(),d(15,"div",8),x(16,$ae,7,3,"ng-container",9),p()(),d(17,"div",10)(18,"button",11),T("click",function(){return e.reset()}),g(19),v(20,"translate"),p(),O(21,"span",12),d(22,"button",13),T("click",function(){return e.cancel()}),g(23),v(24,"translate"),p(),d(25,"button",14),T("click",function(){return e.update()}),g(26),v(27,"translate"),p()()()),r&2&&(_n(e.aggregation?hn(30,Bae):hn(31,jae)),m("formGroup",e.intervalOptionsConfigForm),l(2),z(C(3,16,"timewindow.edit-intervals-list")),l(3),fa(" ",C(6,18,"timewindow.edit-intervals-list-hint")," ",e.aggregation?C(7,20,"timewindow.edit-grouping-intervals-list-hint"):""," "),l(6),m("indeterminate",e.getIndeterminate())("checked",e.getChecked()),l(),j(" ",C(13,22,"timewindow.interval")," "),l(2),m("ngIf",e.aggregation),l(2),m("ngForOf",e.intervalsFormArray.controls)("ngForTrackBy",e.trackByElement),l(3),j(" ",C(20,24,"action.reset")," "),l(4),j(" ",C(24,26,"action.cancel")," "),l(2),m("disabled",e.intervalOptionsConfigForm.invalid||!e.intervalOptionsConfigForm.dirty),l(),j(" ",C(27,28,"action.apply")," "))},dependencies:[Ke,ce,yt,ra,At,ur,xe,We,$e,Qe,Ka,Ob,ap,Sc,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table[_ngcontent-%COMP%]{overflow:hidden}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-body[_ngcontent-%COMP%]{overflow-y:auto}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-header-cell.tb-interval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-row-cell.tb-interval[_ngcontent-%COMP%]{flex:1 1 30%;min-width:calc(30% - 8px)}@media screen and (min-width: 1280px){[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-header-cell.tb-interval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-row-cell.tb-interval[_ngcontent-%COMP%]{min-width:calc(30% - 12px)}}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-header-cell.tb-agg-interval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-row-cell.tb-agg-interval[_ngcontent-%COMP%]{flex:1 1 70%;min-width:70%}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-table-header-cell.tb-agg-interval-header[_ngcontent-%COMP%]{flex:1 1 35%;width:35%}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]   .tb-form-hint[_ngcontent-%COMP%]{flex-shrink:0}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]     .tb-interval-option{display:block}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]     .tb-interval-option .mdc-form-field{width:100%}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]     .tb-interval-option .mdc-label{overflow:hidden}[_nghost-%COMP%]   .tb-interval-options-form[_ngcontent-%COMP%]     .tb-interval-option .mdc-label mat-label{display:block}']});var Dm=Q_;pe([fe(),le("design:type",Object)],Dm.prototype,"aggregation",void 0);var YP={};Ae(YP,{TimeintervalComponent:()=>md});y();var Hae=["*",[["","matSuffix",""]]],qae=["*","[matSuffix]"];function Wae(n,t){if(n&1&&(d(0,"mat-label",10),g(1),p()),n&2){let r=b
44();l(),z(r.predefinedName)}}function Yae(n,t){if(n&1&&(d(0,"mat-option",15),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit;m("value",r.value),l(),j(" ",ft(2,2,r.name,r.translateParams)," ")}}var sg=class sg{set min(t){let r=Ao(t);typeof r<"u"&&r!==this.minValue&&(this.minValue=r,this.maxValue=Math.max(this.maxValue,this.minValue),this.updateView())}set max(t){let r=Ao(t);typeof r<"u"&&r!==this.maxValue&&(this.maxValue=r,this.minValue=Math.min(this.minValue,this.maxValue),this.updateView(!0))}constructor(t,r){this.timeService=t,this.fb=r,this.disabledAdvanced=!1,this.useCalendarIntervals=!1,this.subscriptSizing="fixed",this.appearance="fill",this.advanced=!1,this.customTimeInterval={name:"timeinterval.custom",translateParams:{},value:ES.CUSTOM},this.rendered=!1,this.propagateChange=e=>{this.propagateChangeValue=e},this.destroy$=new Te,this.timeintervalFormGroup=this.fb.group({interval:[1],customInterval:this.fb.group({days:[0],hours:[0],mins:[1],secs:[0]})}),this.timeintervalFormGroup.get("interval").valueChanges.pipe(Be(this.destroy$)).subscribe(()=>this.onIntervalChange()),this.timeintervalFormGroup.get("customInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(()=>this.updateView()),this.timeintervalFormGroup.get("customInterval.secs").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>this.onSecsChange(e)),this.timeintervalFormGroup.get("customInterval.mins").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>this.onMinsChange(e)),this.timeintervalFormGroup.get("customInterval.hours").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>this.onHoursChange(e)),this.timeintervalFormGroup.get("customInterval.days").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>this.onDaysChange(e))}ngOnInit(){this.boundInterval()}ngOnChanges({disabledAdvanced:t,allowedIntervals:r}){(t&&!t.firstChange&&t.currentValue!==t.previousValue||r&&!r.firstChange&&!Fn(r.currentValue,r.previousValue))&&this.updateIntervalValue(!0)}registerOnChange(t){this.propagateChange=t,dt(this.propagateChangeValue)&&this.propagateChange(this.propagateChangeValue)}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?this.timeintervalFormGroup.disable({emitEvent:!1}):this.timeintervalFormGroup.enable({emitEvent:!1})}writeValue(t){this.modelValue=t,this.rendered=!0,this.updateIntervalValue()}updateIntervalValue(t=!1){if(typeof this.modelValue<"u"){let r=this.timeService.boundMinInterval(this.minValue),e=this.timeService.boundMaxInterval(this.maxValue);if(lC.numberValue(this.modelValue)>=r&&lC.numberValue(this.modelValue)<=e){let i=this.allowedIntervals?.length?!this.allowedIntervals.includes(this.modelValue):!this.timeService.matchesExistingInterval(this.minValue,this.maxValue,this.modelValue,this.useCalendarIntervals);i&&this.disabledAdvanced?(this.advanced=!1,this.boundInterval()):(this.advanced=i,this.setInterval(this.modelValue),t&&this.boundInterval())}else this.boundInterval()}}setInterval(t){this.advanced?(this.timeintervalFormGroup.get("interval").patchValue(ES.CUSTOM,{emitEvent:!1}),this.setCustomInterval(t)):this.timeintervalFormGroup.get("interval").patchValue(t,{emitEvent:!1})}setCustomInterval(t){let r=Math.floor(lC.numberValue(t)/1e3);this.timeintervalFormGroup.get("customInterval").patchValue({days:Math.floor(r/86400),hours:Math.floor(r%86400/3600),mins:Math.floor(r%86400%3600/60),secs:r%60},{emitEvent:!1})}boundInterval(t=!1){let r=this.timeService.boundMinInterval(this.minValue),e=this.timeService.boundMaxInterval(this.maxValue);if(this.intervals=this.allowedIntervals?.length?NS(this.allowedIntervals):this.timeService.getIntervals(this.minValue,this.maxValue,this.useCalendarIntervals),this.disabledAdvanced||this.intervals.push(this.customTimeInterval),this.rendered){let i=this.modelValue;if(this.allowedIntervals?.length)!this.allowedIntervals.includes(i)&&!this.advanced&&(i=this.allowedIntervals[0]);else{let o=lC.numberValue(i);o<r?i=r:o>=e&&t&&(i=this.timeService.boundMaxInterval(e/7)),this.advanced||(i=this.timeService.boundToPredefinedInterval(r,e,i,this.useCalendarIntervals))}i!==this.modelValue&&(this.setInterval(i),this.updateView())}}updateView(t=!1){if(!this.rendered)return;let r=null,e;this.advanced?e=this.calculateIntervalMs():(e=this.timeintervalFormGroup.get("interval").value,(!e||typeof e=="number"&&isNaN(e))&&(e=this.calculateIntervalMs())),(typeof e=="string"||!isNaN(e)&&e>
440)&&(r=e),this.modelValue=r,this.propagateChange(this.modelValue),this.boundInterval(t)}calculateIntervalMs(){let t=this.timeintervalFormGroup.get("customInterval").value;return(t.days*86400+t.hours*3600+t.mins*60+t.secs)*1e3}onIntervalChange(){let t=this.timeintervalFormGroup.get("interval").value===ES.CUSTOM;t!==this.advanced&&(this.advanced=t,this.advanced&&this.setCustomInterval(this.modelValue)),this.updateView()}onSecsChange(t){let r=this.timeintervalFormGroup.get("customInterval").value;typeof t>"u"||(t<0?r.days+r.hours+r.mins>0?(this.timeintervalFormGroup.get("customInterval.secs").patchValue(t+60,{emitEvent:!1}),this.timeintervalFormGroup.get("customInterval.mins").patchValue(r.mins-1,{emitEvent:!0})):this.timeintervalFormGroup.get("customInterval.secs").patchValue(0,{emitEvent:!1}):t>=60&&(this.timeintervalFormGroup.get("customInterval.secs").patchValue(t-60,{emitEvent:!1}),this.timeintervalFormGroup.get("customInterval.mins").patchValue(r.mins+1,{emitEvent:!0})))}onMinsChange(t){let r=this.timeintervalFormGroup.get("customInterval").value;typeof t>"u"||(t<0?r.days+r.hours>0?(this.timeintervalFormGroup.get("customInterval.mins").patchValue(t+60,{emitEvent:!1}),this.timeintervalFormGroup.get("customInterval.hours").patchValue(r.hours-1,{emitEvent:!0})):this.timeintervalFormGroup.get("customInterval.mins").patchValue(0,{emitEvent:!1}):t>=60&&(this.timeintervalFormGroup.get("customInterval.mins").patchValue(t-60,{emitEvent:!1}),this.timeintervalFormGroup.get("customInterval.hours").patchValue(r.hours+1,{emitEvent:!0})))}onHoursChange(t){let r=this.timeintervalFormGroup.get("customInterval").value;typeof t>"u"||(t<0?r.days>0?(this.timeintervalFormGroup.get("customInterval.hours").patchValue(t+24,{emitEvent:!1}),this.timeintervalFormGroup.get("customInterval.days").patchValue(r.days-1,{emitEvent:!0})):this.timeintervalFormGroup.get("customInterval.hours").patchValue(0,{emitEvent:!1}):t>=24&&(this.timeintervalFormGroup.get("customInterval.hours").patchValue(t-24,{emitEvent:!1}),this.timeintervalFormGroup.get("customInterval.days").patchValue(r.days+1,{emitEvent:!0})))}onDaysChange(t){typeof t>"u"||t<0&&this.timeintervalFormGroup.get("customInterval.days").patchValue(0,{emitEvent:!1})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};sg.\u0275fac=function(r){return new(r||sg)(h(ba),h(Ai))},sg.\u0275cmp=L({type:sg,selectors:[["tb-timeinterval"]],inputs:{min:"min",max:"max",predefinedName:"predefinedName",disabledAdvanced:[2,"disabledAdvanced","disabledAdvanced",Re],allowedIntervals:"allowedIntervals",useCalendarIntervals:"useCalendarIntervals",disabled:"disabled",subscriptSizing:"subscriptSizing",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>sg),multi:!0}]),si,lt],ngContentSelectors:qae,decls:28,vars:15,consts:[[1,"tb-form-panel","no-border","no-padding",3,"formGroup"],[1,"tb-form-row","column-xs","no-border","no-padding","tb-standard-fields"],[1,"flex","flex-1",3,"subscriptSizing","appearance"],["translate","",4,"ngIf"],["formControlName","interval"],[3,"value",4,"ngFor","ngForOf"],["matSuffix",""],["formGroupName","customInterval",1,"tb-form-row","column-xs","no-border","no-padding","tb-standard-fields","advanced-input"],[1,"tb-flex"],[1,"number-input","flex",3,"subscriptSizing","appearance"],["translate",""],["matInput","","type","number","step","1","min","0","formControlName","days"],["matInput","","type","number","step","1","formControlName","hours"],["matInput","","type","number","step","1","formControlName","mins"],["matInput","","type","number","step","1","formControlName","secs"],[3,"value"]],template:function(r,e){r&1&&(Ct(Hae),d(0,"section",0)(1,"section",1),Fe(2),d(3,"mat-form-field",2),x(4,Wae,2,1,"mat-label",3),d(5,"mat-select",4),x(6,Yae,3,5,"mat-option",5),p(),pt(7,6),Fe(8,1),ct(),p()(),d(9,"section",7)(10,"div",8)(11,"mat-form-field",9)(12,"mat-label",10),g(13,"timeinterval.days"),p(),O(14,"input",11),p(),d(15,"mat-form-field",9)(16,"mat-label",10),g(17,"timeinterval.hours"),p(),O(18,"input",12),p()(),d(19,"div",8)(20,"mat-form-field",9)(21,"mat-label",10),g(22,"timeinterval.minutes"),p(),O(23,"input",13),p(),d(24,"mat-form-field",9)(25,"mat-label",10),g(26,"timeinterval.seconds"),p(),O(27,"input",14),p()()()()),r&2&&(m("formGroup",e.timeintervalFormGroup),l(3),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(),m("ngIf",e.predefinedName),l(2),m("ngForOf",e.intervals),l(3),Y("!hidden",!e.advanced),l(2),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(4),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(5),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(4),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance))},dependencies:[Ke,ce,jt,at,ze,At,Yt,Kn,xt,ut,Au,xe,We,lT,$e,Qe,Ka,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .advanced-input[_ngcontent-%COMP%]{gap:8px}@media screen and (max-width: 599px){[_nghost-%COMP%]{min-width:0;width:100%}}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper:has(.mat-mdc-form-field-icon-suffix:empty){padding-right:12px}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-form-field-icon-suffix:empty{padding:0}[_nghost-%COMP%]     .number-input .mat-mdc-form-field-infix{width:50px}']});var md=sg;pe([fe(),le("design:type",Object)],md.prototype,"useCalendarIntervals",void 0);var QP={};Ae(QP,{QuickTimeIntervalComponent:()=>ud}
44);y();var Qae=[[["","matSuffix",""]]],Kae=["[matSuffix]"];function Xae(n,t){n&1&&(d(0,"mat-label",6),g(1,"timewindow.interval"),p())}function Zae(n,t){if(n&1&&(d(0,"mat-option",7),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",C(2,2,e.timeIntervalTranslationMap.get(r))," ")}}var lg=class lg{constructor(t){this.fb=t,this.allIntervals=Object.values(DS),this.timeIntervalTranslationMap=gf,this.rendered=!1,this.displayLabel=!0,this.onlyCurrentInterval=!1,this.subscriptSizing="fixed",this.appearance="fill",this.propagateChange=r=>{},this.quickIntervalFormGroup=this.fb.group({interval:[null]}),this.quickIntervalFormGroup.get("interval").valueChanges.pipe(yi()).subscribe(r=>{let e;r?e=r:e=null,this.updateView(e)})}ngOnInit(){this.allAvailableIntervals=this.getAllAvailableIntervals(),this.intervals=this.allowedIntervals?.length?this.allowedIntervals:this.allAvailableIntervals}ngOnChanges({allowedIntervals:t}){if(t&&!t.firstChange&&!Fn(t.currentValue,t.previousValue)){this.intervals=this.allowedIntervals?.length?this.allowedIntervals:this.allAvailableIntervals;let r=this.quickIntervalFormGroup.get("interval").value;r&&!this.intervals.includes(r)&&this.quickIntervalFormGroup.get("interval").patchValue(this.intervals[0],{emitEvent:!0})}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?this.quickIntervalFormGroup.disable({emitEvent:!1}):this.quickIntervalFormGroup.enable({emitEvent:!1})}writeValue(t){let r;t&&this.allowedIntervals?.length&&!this.allowedIntervals.includes(t)?r=this.allowedIntervals[0]:r=t,this.modelValue=r,this.quickIntervalFormGroup.get("interval").patchValue(r,{emitEvent:!1})}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}getAllAvailableIntervals(){return this.onlyCurrentInterval?this.allIntervals.filter(t=>t.startsWith("CURRENT_")):this.allIntervals}};lg.\u0275fac=function(r){return new(r||lg)(h(Ai))},lg.\u0275cmp=L({type:lg,selectors:[["tb-quick-time-interval"]],inputs:{displayLabel:"displayLabel",disabled:"disabled",onlyCurrentInterval:"onlyCurrentInterval",allowedIntervals:"allowedIntervals",subscriptSizing:"subscriptSizing",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>lg),multi:!0}]),lt],ngContentSelectors:Kae,decls:7,vars:5,consts:[[1,"interval-section","flex","flex-1","flex-row",3,"formGroup"],[1,"flex-1",3,"subscriptSizing","appearance"],["translate","",4,"ngIf"],["formControlName","interval"],[3,"value",4,"ngFor","ngForOf"],["matSuffix",""],["translate",""],[3,"value"]],template:function(r,e){r&1&&(Ct(Qae),d(0,"section",0)(1,"mat-form-field",1),x(2,Xae,2,0,"mat-label",2),d(3,"mat-select",3),x(4,Zae,3,4,"mat-option",4),p(),pt(5,5),Fe(6),ct(),p()()),r&2&&(m("formGroup",e.quickIntervalFormGroup),l(),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(),m("ngIf",e.displayLabel),l(2),m("ngForOf",e.intervals))},dependencies:[Ke,ce,jt,ze,At,Yt,Kn,xt,xe,We,$e,Qe,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{min-width:300px;display:block}@media screen and (max-width: 599px){[_nghost-%COMP%]{min-width:0;width:100%}}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper:has(.mat-mdc-form-field-icon-suffix:empty){padding-right:12px}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-form-field-icon-suffix:empty{padding:0}']});var ud=lg;pe([fe(),le("design:type",Object)],ud.prototype,"displayLabel",void 0);var KP={};Ae(KP,{DatapointsLimitComponent:()=>Ju});y();var Ju=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){let i=mt(e);this.requiredValue!==i&&(this.requiredValue=i,this.updateValidators())}constructor(e,i){this.fb=e,this.timeService=i,this.propagateChange=o=>{},this.destroy$=new Te}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.datapointsLimitFormGroup=this.fb.group({limit:[null,[ke.min(this.minDatapointsLimit()),ke.max(this.maxDatapointsLimit())]]}),this.datapointsLimitFormGroup.get("limit").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>{this.updateView(e)})}updateValidators(){this.datapointsLimitFormGroup&&(this.required?this.datapointsLimitFormGroup.get("limit").addValidators(ke.required):this.datapointsLimitFormGroup.get("limit").removeValidators(ke.required),this.datapointsLimitFormGroup.get("limit").updateV
44alueAndValidity())}setDisabledState(e){this.disabled=e,this.disabled?this.datapointsLimitFormGroup.disable({emitEvent:!1}):this.datapointsLimitFormGroup.enable({emitEvent:!1})}checkLimit(e){return!e||e<this.minDatapointsLimit()?this.minDatapointsLimit():e>this.maxDatapointsLimit()?this.maxDatapointsLimit():e}writeValue(e){this.modelValue=this.checkLimit(e),this.datapointsLimitFormGroup.patchValue({limit:this.modelValue},{emitEvent:!1})}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}validate(){return this.datapointsLimitFormGroup.get("limit").valid?null:{datapointsLimitFormGroup:!1}}minDatapointsLimit(){return this.timeService.getMinDatapointsLimit()}maxDatapointsLimit(){return this.timeService.getMaxDatapointsLimit()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};t.\u0275fac=function(i){return new(i||t)(h(Ai),h(ba))},t.\u0275cmp=L({type:t,selectors:[["tb-datapoints-limit"]],inputs:{required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}])],decls:5,vars:7,consts:[[1,"limit-slider-container","flex","flex-row","items-center","justify-start",3,"formGroup"],[1,"flex-1",3,"min","max"],["matSliderThumb","","formControlName","limit",3,"value"],["subscriptSizing","dynamic","appearance","outline",1,"limit-slider-value"],["matInput","","formControlName","limit","type","number","step","1",3,"value","min","max"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"mat-slider",1),O(2,"input",2),p(),d(3,"mat-form-field",3),O(4,"input",4),p()()),i&2&&(m("formGroup",o.datapointsLimitFormGroup),l(),te("min",o.minDatapointsLimit()),te("max",o.maxDatapointsLimit()),l(),m("value",o.datapointsLimitFormGroup.get("limit").value),l(2),te("min",o.minDatapointsLimit()),te("max",o.maxDatapointsLimit()),m("value",o.datapointsLimitFormGroup.get("limit").value))},dependencies:[at,ze,$j,Uj,ut,Au,xe,We,lT,Fj,$e,Qe],styles:['@charset "UTF-8";.limit-slider-container[_ngcontent-%COMP%]{width:100%}.limit-slider-container[_ngcontent-%COMP%]   .limit-slider-value[_ngcontent-%COMP%]{margin-left:16px;min-width:25px;max-width:106px}.limit-slider-container[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]   input[type=number][_ngcontent-%COMP%]{text-align:center}.limit-slider-container[_ngcontent-%COMP%]   .mdc-slider[_ngcontent-%COMP%]{height:40px}.limit-slider-container[_ngcontent-%COMP%]   .mdc-slider[_ngcontent-%COMP%]     .mdc-slider__thumb{left:-20px;height:40px;width:40px}.limit-slider-container[_ngcontent-%COMP%]   .mdc-slider[_ngcontent-%COMP%]     .mdc-slider__thumb .mat-ripple-element.mat-mdc-slider-focus-ripple, .limit-slider-container[_ngcontent-%COMP%]   .mdc-slider[_ngcontent-%COMP%]     .mdc-slider__thumb .mat-ripple-element.mat-mdc-slider-active-ripple, .limit-slider-container[_ngcontent-%COMP%]   .mdc-slider[_ngcontent-%COMP%]     .mdc-slider__thumb .mat-ripple-element.mat-mdc-slider-hover-ripple{left:0!important;top:0!important;height:40px!important;width:40px!important}@media screen and (min-width: 960px){.limit-slider-container[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{margin-right:16px;width:min-content;max-width:40%}}']});let n=t;return n})();var XP={};Ae(XP,{AggregationTypeSelectComponent:()=>Tc});y();var Jae=[[["","matSuffix",""]]],ese=["[matSuffix]"];function tse(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
44();l(),z(r.label)}}function ise(n,t){if(n&1&&(d(0,"mat-option",5),g(1),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",e.displayAggregationTypeFn(r)," ")}}var cg=class cg{get label(){return this.labelText&&this.labelText.length?this.labelText:this.defaultLabel}constructor(t,r){this.translate=t,this.fb=r,this.displayLabel=!0,this.subscriptSizing="fixed",this.appearance="fill",this.defaultLabel=this.translate.instant("aggregation.aggregation"),this.allAggregationTypes=Object.values(Uc),this.propagateChange=e=>{},this.aggregationTypeFormGroup=this.fb.group({aggregationType:[null]}),this.aggregationTypeFormGroup.get("aggregationType").valueChanges.pipe(yi()).subscribe(e=>{let i;e?i=e:i=null,this.updateView(i)})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.aggregationTypes=this.allowedAggregationTypes?.length?this.allowedAggregationTypes:this.allAggregationTypes}ngOnChanges({allowedAggregationTypes:t}){if(t&&!t.firstChange&&!Fn(t.currentValue,t.previousValue)){this.aggregationTypes=this.allowedAggregationTypes?.length?this.allowedAggregationTypes:this.allAggregationTypes;let r=this.aggregationTypeFormGroup.get("aggregationType").value;r&&!this.aggregationTypes.includes(r)&&this.aggregationTypeFormGroup.get("aggregationType").patchValue(this.aggregationTypes[0],{emitEvent:!0})}}setDisabledState(t){this.disabled=t,this.disabled?this.aggregationTypeFormGroup.disable():this.aggregationTypeFormGroup.enable()}writeValue(t){let r;t&&this.allowedAggregationTypes?.length&&!this.allowedAggregationTypes.includes(t)?r=this.allowedAggregationTypes[0]:r=t,this.modelValue=r,this.aggregationTypeFormGroup.get("aggregationType").patchValue(r,{emitEvent:!1})}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}displayAggregationTypeFn(t){return t?this.translate.instant(kS.get(t)):""}};cg.\u0275fac=function(r){return new(r||cg)(h(Ge),h(Ai))},cg.\u0275cmp=L({type:cg,selectors:[["tb-aggregation-type-select"]],inputs:{allowedAggregationTypes:"allowedAggregationTypes",required:"required",disabled:"disabled",displayLabel:"displayLabel",labelText:"labelText",subscriptSizing:"subscriptSizing",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>cg),multi:!0}]),lt],ngContentSelectors:ese,decls:6,vars:6,consts:[[1,"flex","flex-1",3,"formGroup","subscriptSizing","appearance"],[4,"ngIf"],["formControlName","aggregationType",3,"required"],[3,"value",4,"ngFor","ngForOf"],["matSuffix",""],[3,"value"]],template:function(r,e){r&1&&(Ct(Jae),d(0,"mat-form-field",0),x(1,tse,2,1,"mat-label",1),d(2,"mat-select",2),x(3,ise,2,2,"mat-option",3),p(),pt(4,4),Fe(5),ct(),p()),r&2&&(m("formGroup",e.aggregationTypeFormGroup)("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(),m("ngIf",e.displayLabel),l(),m("required",e.required),l(),m("ngForOf",e.aggregationTypes))},dependencies:[Ke,ce,ze,At,Yt,Kn,xt,xe,We,St,$e,Qe],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]     .mat-mdc-form-field-infix{width:100%}[_nghost-%COMP%]     .mat-mdc-select-value{min-width:100px}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper:has(.mat-mdc-form-field-icon-suffix:empty){padding-right:12px}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-form-field-icon-suffix:empty{padding:0}']});var Tc=cg;pe([fe(),le("design:type",Boolean)],Tc.prototype,"required",void 0);pe([fe(),le("design:type",Object)],Tc.prototype,"displayLabel",void 0);var ZP={};Ae(ZP,{DatetimePeriodComponent:()=>eh});y();var eh=(()=>{let t=class t{constructor(e){this.fb=e,this.subscriptSizing="fixed",this.appearance="fill",this.timeShiftMs=sC,this.dateTimePeriodFormGroup=this.fb.group({startDate:this.fb.control(null),endDate:this.fb.control(null)}),this.changePending=!1,this.propagateChange=null,this.dateTimePeriodFormGroup.valueChanges.pipe(xr((i,o)=>i.startDate===o.startDate&&i.endDate===o.endDate),yi()).subscribe(i=>{this.updateMinMaxDates(i),this.updateView()}),this.dateTimePeriodFormGroup.get("startDate").valueChanges.pipe(xr(),yi()).subscribe(i=>this.onStartDateChange(i)),this.dateTimePeriodFormGroup.get("endDate").valueChanges.pipe(xr(),yi()).subscribe(i=>this.onEndDateChange(i))}
44registerOnChange(e){this.propagateChange=e,this.changePending&&this.propagateChange&&(this.changePending=!1,this.propagateChange(this.modelValue))}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.disabled?this.dateTimePeriodFormGroup.disable({emitEvent:!1}):this.dateTimePeriodFormGroup.enable({emitEvent:!1})}writeValue(e){if(this.modelValue=e,this.modelValue)this.dateTimePeriodFormGroup.patchValue({startDate:new Date(this.modelValue.startTimeMs),endDate:new Date(this.modelValue.endTimeMs)},{emitEvent:!1});else{let i=new Date;this.dateTimePeriodFormGroup.patchValue({startDate:new Date(i.getTime()-ff),endDate:i},{emitEvent:!1}),this.updateView()}this.updateMinMaxDates(this.dateTimePeriodFormGroup.value)}updateView(){let e=null,i=this.dateTimePeriodFormGroup.value;i.startDate&&i.endDate&&(e={startTimeMs:i.startDate.getTime(),endTimeMs:i.endDate.getTime()}),this.modelValue=e,this.propagateChange?this.propagateChange(this.modelValue):this.changePending=!0}updateMinMaxDates(e){this.maxEndDate=new Date,this.maxEndTs=this.maxEndDate.getTime(),this.maxStartTs=this.maxEndTs-this.timeShiftMs,this.maxStartDate=new Date(this.maxStartTs),e.endDate&&(this.maxStartDateTs=e.endDate.getTime()-this.timeShiftMs),e.startDate&&(this.minEndDateTs=e.startDate.getTime()+this.timeShiftMs)}onStartDateChange(e){if(e){let i=e.getTime();i>this.maxStartTs&&(i=this.maxStartTs,this.dateTimePeriodFormGroup.get("startDate").patchValue(new Date(i),{emitEvent:!1})),i>this.maxStartDateTs&&this.dateTimePeriodFormGroup.get("endDate").patchValue(new Date(i+this.timeShiftMs),{emitEvent:!1})}}onEndDateChange(e){if(e){let i=e.getTime();i>this.maxEndTs&&(i=this.maxEndTs,this.dateTimePeriodFormGroup.get("endDate").patchValue(new Date(i),{emitEvent:!1})),i<this.minEndDateTs&&this.dateTimePeriodFormGroup.get("startDate").patchValue(new Date(i-this.timeShiftMs),{emitEvent:!1})}}};t.\u0275fac=function(i){return new(i||t)(h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-datetime-period"]],inputs:{disabled:"disabled",subscriptSizing:"subscriptSizing",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:15,vars:11,consts:[["startDatePicker",""],["endDatePicker",""],[1,"tb-form-row","column-xs","no-border","no-padding","tb-standard-fields",3,"formGroup"],[1,"flex",3,"subscriptSizing","appearance"],["translate",""],["matSuffix","",3,"for"],["type","datetime","openOnFocus","true"],["matInput","","formControlName","startDate",3,"matDatetimepicker","max"],["matInput","","formControlName","endDate",3,"matDatetimepicker","max"]],template:function(i,o){if(i&1&&(d(0,"section",2)(1,"mat-form-field",3)(2,"mat-label",4),g(3,"datetime.from"),p(),O(4,"mat-datetimepicker-toggle",5)(5,"mat-datetimepicker",6,0)(7,"input",7),p(),d(8,"mat-form-field",3)(9,"mat-label",4),g(10,"datetime.to"),p(),O(11,"mat-datetimepicker-toggle",5)(12,"mat-datetimepicker",6,1)(14,"input",8),p()()),i&2){let a=me(6),s=me(13);m("formGroup",o.dateTimePeriodFormGroup),l(),m("subscriptSizing",o.subscriptSizing)("appearance",o.appearance),l(3),m("for",a),l(3),m("matDatetimepicker",a)("max",o.maxStartDate),l(),m("subscriptSizing",o.subscriptSizing)("appearance",o.appearance),l(3),m("for",s),l(3),m("matDatetimepicker",s)("max",o.maxEndDate)}},dependencies:[jt,at,ze,At,Yt,Wf,Yf,xm,ut,xe,We,$e,Qe],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-form-row[_ngcontent-%COMP%]{gap:8px}']});let n=t;return n})();var QE={};Ae(QE,{TimezoneSelectComponent:()=>$l});y();var Pr={};Ae(Pr,{HighlightPipe:()=>Mi});y();var Mi=(()=>{let t=class t{transform(e,i,o=!1,a="i"){let s=i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),c=new RegExp((o?"":"^")+s,a);return i?e.replace(c,u=>`<b>${u}</b>`):e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"highlight",type:t,pure:!0});let n=t;return n})();var nse=["timezoneInput"],rse=n=>({timezone:n});function ose(n,t){n&1&&(d(0,"mat-label",10),g(1,"timezone.timezone"),p())}function ase(n,t){if(n&1){let r=B();d(0,"button",11),T("mousedown",function(){D(r);let i=b();return M(i.ignoreClosePanel=!0)})("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",12),g(2,"close"),p()()}}function sse(n,t){if(n&1&&(d(0,"mat-option",13),O(1,"span",14),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,e.displayTimezoneFn(r),e.searchText),Ut)}}function lse(n,t){if(n&1&&(d(0,"mat-option",13)(1,"span"),g(2),v(3,"async"),p()()),n&2){let r=b
44();m("value",null),l(2),j(" ",C(3,2,r.translate.get("timezone.no-timezones-matching",Xe(4,rse,r.searchText)))," ")}}function cse(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"timezone.timezone-required")," "))}var dg=class dg{set defaultTimezone(t){this.defaultTimezoneId!==t&&(this.defaultTimezoneId=t)}get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}get userTimezoneByDefault(){return this.userTimezoneByDefaultValue}set userTimezoneByDefault(t){this.userTimezoneByDefaultValue=mt(t)}get localBrowserTimezonePlaceholderOnEmpty(){return this.localBrowserTimezonePlaceholderOnEmptyValue}set localBrowserTimezonePlaceholderOnEmpty(t){this.localBrowserTimezonePlaceholderOnEmptyValue=mt(t)}constructor(t,r,e,i,o){this.store=t,this.translate=r,this.ngZone=e,this.fb=i,this.timeService=o,this.defaultTimezoneId=null,this.displayLabel=!0,this.subscriptSizing="fixed",this.appearance="fill",this.searchText="",this.ignoreClosePanel=!1,this.dirty=!1,this.localBrowserTimezoneInfoPlaceholder=this.timeService.getLocalBrowserTimezoneInfoPlaceholder(),this.prop
44agateChange=a=>{},this.selectTimezoneFormGroup=this.fb.group({timezone:[null]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.filteredTimezones=this.selectTimezoneFormGroup.get("timezone").valueChanges.pipe(et(t=>{let r;typeof t=="string"||!t?r=null:r=t.id,this.updateView(r),t===null&&this.clear()}),W(t=>t?typeof t=="string"?t:t.name:""),Ft(t=>this.fetchTimezones(t)),Si())}ngAfterViewInit(){}setDisabledState(t){this.disabled=t,this.disabled?this.selectTimezoneFormGroup.disable({emitEvent:!1}):this.selectTimezoneFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="";let r=bf(t,this.defaultTimezoneId,this.userTimezoneByDefaultValue);r!==null?(this.selectTimezoneFormGroup.get("timezone").patchValue(r,{emitEvent:!1}),r.id!==t?setTimeout(()=>{this.updateView(r.id)},0):this.modelValue=t):(this.modelValue=null,this.localBrowserTimezonePlaceholderOnEmptyValue?this.selectTimezoneFormGroup.get("timezone").patchValue(this.localBrowserTimezoneInfoPlaceholder,{emitEvent:!1}):this.selectTimezoneFormGroup.get("timezone").patchValue("",{emitEvent:!1})),this.dirty=!0}onFocus(){this.dirty&&(this.selectTimezoneFormGroup.get("timezone").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}onPanelClosed(){if(this.ignoreClosePanel)this.ignoreClosePanel=!1;else if(!this.modelValue)if(this.defaultTimezoneId||this.userTimezoneByDefaultValue){let t=bf(this.defaultTimezoneId,this.defaultTimezoneId,this.userTimezoneByDefaultValue);t!==null&&this.ngZone.run(()=>{this.selectTimezoneFormGroup.get("timezone").reset(t,{emitEvent:!0})})}else this.localBrowserTimezonePlaceholderOnEmptyValue&&this.ngZone.run(()=>{this.selectTimezoneFormGroup.get("timezone").reset(this.localBrowserTimezoneInfoPlaceholder,{emitEvent:!0})})}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}displayTimezoneFn(t){return t?`${t.name} (${t.offset})`:void 0}fetchTimezones(t){return this.searchText=t,t&&t.length?Z(this.loadTimezones().filter(r=>r.name.toLowerCase().includes(t.toLowerCase()))):Z(this.loadTimezones())}clear(){this.selectTimezoneFormGroup.get("timezone").patchValue("",{emitEvent:!0}),setTimeout(()=>
44{this.timezoneInputTrigger.openPanel()},0)}loadTimezones(){return this.timezones||(this.timezones=[],this.localBrowserTimezonePlaceholderOnEmptyValue&&this.timezones.push(this.localBrowserTimezoneInfoPlaceholder),this.timezones.push(...I5())),this.timezones}};dg.\u0275fac=function(r){return new(r||dg)(h(ve),h(Ge),h(Bt),h(Wt),h(ba))},dg.\u0275cmp=L({type:dg,selectors:[["tb-timezone-select"]],viewQuery:function(r,e){if(r&1&&ae(nse,7,mi),r&2){let i;Q(i=K())&&(e.timezoneInputTrigger=i.first)}},inputs:{defaultTimezone:"defaultTimezone",displayLabel:"displayLabel",subscriptSizing:"subscriptSizing",appearance:"appearance",required:"required",userTimezoneByDefault:"userTimezoneByDefault",localBrowserTimezonePlaceholderOnEmpty:"localBrowserTimezonePlaceholderOnEmpty",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>dg),multi:!0}])],decls:13,vars:18,consts:[["timezoneInput",""],["timezoneAutocomplete","matAutocomplete"],[1,"mat-block","flex","flex-1",3,"formGroup","subscriptSizing","appearance"],["translate","",4,"ngIf"],["matInput","","type","text","formControlName","timezone",3,"focusin","placeholder","required","matAutocomplete"],["type","button","style","margin-right: 1px","matSuffix","","mat-icon-button","","aria-label","Clear",3,"mousedown","click",4,"ngIf"],[1,"tb-autocomplete",3,"closed","optionSelected","displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[4,"ngIf"],["translate",""],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",2,"margin-right","1px",3,"mousedown","click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",2),x(1,ose,2,0,"mat-label",3),d(2,"input",4,0),v(4,"translate"),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(5,ase,3,0,"button",5),d(6,"mat-autocomplete",6,1),T("closed",function(){return D(i),M(e.onPanelClosed())})("optionSelected",function(){return D(i),M(e.ignoreClosePanel=!0)}),x(8,sse,3,5,"mat-option",7),v(9,"async"),x(10,lse,4,6,"mat-option",8),v(11,"async"),p(),x(12,cse,3,3,"mat-error",9),p()}if(r&2){let i,o=me(7);m("formGroup",e.selectTimezoneFormGroup)("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(),m("ngIf",e.displayLabel),l(),te("placeholder",C(4,12,"timezone.select-timezone")),m("required",e.required)("matAutocomplete",o),l(3),m("ngIf",e.selectTimezoneFormGroup.get("timezone").value&&!e.disabled),l(),m("displayWith",e.displayTimezoneFn),l(2),m("ngForOf",C(9,14,e.filteredTimezones)),l(2),m("ngIf",!((i=C(11,16,e.filteredTimezones))!=null&&i.length)),l(2),m("ngIf",e.selectTimezoneFormGroup.get("timezone").hasError("required"))}},dependencies:[Ke,ce,jt,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});var $l=dg;pe([fe(),le("design:type",Object)],$l.prototype,"displayLabel",void 0);var X_={};Ae(X_,{ToggleSelectComponent:()=>ca});y();var XE={};Ae(XE,{ToggleHeaderComponent:()=>Us,ToggleOption:()=>Mm,_ToggleBase:()=>KE});y();var dse=["toggleGroup"],pse=["toggleGroupContainer"];function mse(n,t){if(n&1&&(d(0,"mat-icon",10),v(1,"async"),g(2," warning "),p()),n&2){let r=b
44().$implicit;m("matTooltip",C(1,1,r.error$))}}function use(n,t){if(n&1&&(d(0,"mat-button-toggle",8),v(1,"async"),g(2),x(3,mse,3,3,"mat-icon",9),v(4,"async"),p()),n&2){let r=t.$implicit,e=b(2);Y("tb-toggle-button-error",C(1,6,r.error$)&&e.value!==r.value),m("value",r.value)("disabled",e.disabled),l(2),j(" ",r.name," "),l(),m("ngIf",C(4,8,r.error$)&&e.value!==r.value)}}function hse(n,t){if(n&1){let r=B();d(0,"div",5,1)(2,"mat-button-toggle-group",6,2),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.value,i)||(o.value=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.valueChange.emit(i.value))}),x(4,use,5,10,"mat-button-toggle",7),p()()}if(n&2){let r=b();Y("tb-disable-pagination",r.disablePagination)("fill-height",r.fillHeight)("extra-padding",r.extraPadding),l(2),Y("tb-fill",r.appearance==="fill"||r.appearance==="fill-invert")("tb-invert",r.appearance==="fill-invert")("tb-primary-fill",r.primaryBackground)("tb-ignore-md-lg",r.ignoreMdLgSize)("tb-disabled",r.disabled),m("name",r.name),fi("ngModel",r.value),l(2),m("ngForOf",r.options)("ngForTrackBy",r.trackByHeaderOption)}}function fse(n,t){if(n&1&&(d(0,"mat-option",14),g(1),p()),n&2){let r=t.$implicit;m("value",r.value),l(),j(" ",r.name,"")}}function gse(n,t){if(n&1){let r=B();d(0,"mat-form-field",11)(1,"mat-select",12),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.value,i)||(o.value=i),M(i)}),T("ngModelChange",function(i){D(r);let o=b();return M(o.valueChange.emit(i))}),x(2,fse,2,2,"mat-option",13),p()()}if(n&2){let r=b();Y("fill-height",r.fillHeight),l(),fi("ngModel",r.value),m("disabled",r.disabled),l(),m("ngForOf",r.options)}}var Mm=(()=>{let t=class t{get viewValue(){return(this._element?.nativeElement.textContent||"").trim()}constructor(e){this._element=e,this.currentError=new or(1)}ngOnChanges(e){e?.error&&e.error.currentValue!==e.error.previousValue&&this.currentError.next(this.error)}ngOnDestroy(){this.currentError.complete()}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["tb-toggle-option"]],inputs:{value:"value",error:"error"},features:[lt]});let n=t;return n})(),KE=(()=>{let t=class t extends sn{constructor(e){super(e),this.store=e,this.options=[],this._destroyed=new Te}ngAfterContentInit(){this.toggleOptions.changes.pipe(on(null),Be(this._destroyed)).subscribe(()=>{this.syncToggleHeaderOptions()})}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}syncToggleHeaderOptions(){this.toggleOptions?.length&&(this.options.length=0,this.toggleOptions.forEach(e=>{this.options.push({name:e.viewValue,value:e.value,error$:e.currentError.asObservable()})}))}};t.\u0275fac=function(i){return new(i||t)(h(ve))},t.\u0275dir=_e({type:t,contentQueries:function(i,o,a){if(i&1&&Zt(a,Mm,4),i&2){let s;Q(s=K())&&(o.toggleOptions=s)}},inputs:{options:"options"},features:[Ce]});let n=t;return n})(),K_=class K_ extends KE{get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}set useSelectOnMdLg(t){t?this.selectMediaBreakpoint="md-lg":this.selectMediaBreakpoint==="md-lg"&&(this.selectMediaBreakpoint="")}get isMdLg(){return!this.ignoreMdLgSize&&this.isMdLgValue}constructor(t,r,e,i,o){super(t),this.store=t,this.cd=r,this.platform=e,this.breakpointObserver=i,this.zone=o,this.showPaginationControls=!1,this._showPaginationControlsChanged=!1,this.leftPaginationEnabled=!1,this.rightPaginationEnabled=!1,this._scrollDistance=0,this.valueChange=new J,this.disablePagination=!1,this.selectMediaBreakpoint="md-lg",this.ignoreMdLgSize=!1,this.appearance="stroked",this.disabled=!1,this.fillHeight=!1,this.extraPadding=!1,this.primaryBackground=!1,this.useSelectSubject=new Gn(!1),this.useSelect$=this.useSelectSubject.asObservable()}ngOnInit(){let t=[cl["md-lg"]];this.selectMediaBreakpoint&&this.selectMediaBreakpoint!=="md-lg"&&t.push(cl[this.selectMediaBreakpoint]),this.observeBreakpointSubscription=this.breakpointObserver.observe(t).subscribe(r=>{this.isMdLgValue=r.breakpoints[cl["md-lg"]],this.selectMediaBreakpoint?this.useSelectSubject.next(r.breakpoints[cl[this.selectMediaBreakpoint]]):this.useSelectSubject.next(!1),this.cd.markForCheck()}),this.disablePagination||this.valueChange.pipe(Be(this._destroyed)).subscribe(()=>{this.scrollToToggleOptionValue()})}ngOnDestroy(){this.stopObservePagination(),super.ngOnDestroy()}ngAfterViewInit(){this.disablePagination||this.useSelect$.pipe(Be(this._destroyed)).subscribe(t=>{t?this.removePagination():setTimeout(()=>{this.startObservePagination()},0)})}ngAfterContentChecked(){this._scrollDistanceChanged&&(this.updateToggleHeaderScrollPosition(),this._scrollDistanceChanged=!1,this.cd.markForCheck())}ngAfterViewChecked(){this._showPaginationControlsChanged&&(this.scrollToToggleOptionValue(),this._showPaginationControlsChanged=!1,this.cd.markForCheck())}trackByHeaderOption(t,r){return r.value}handlePaginatorClick(t,r){r&&r.stopPropagation(),this.scrollHeader(t)}handlePaginatorTouchStart(t,r){(t==="before"&&!this.leftPaginationEnabled||t==="after"&&!this.rightPaginationEnabled)&&r.preventDefault()}startObservePagination(){this.toggleGroupResize$=new ResizeObserver(()=>{this.zone.run(()=>{this.updatePagination()})}),this.toggleGroupResize$.observe(this.toggleGroupContainer.nativeElement)}removePagination(){this.stopObservePagination(),this.showPaginationControls=!1}stopObservePagination(){this.toggleGroupResize$&&(this.toggleGroupResize$.disconnect(),this.toggleGroupResize$=null)}scrollHeader(t){let r=this.toggleGroup.nativeElement.offsetWidth,e=(t==="before"?-1:1)*r/3;return this._scrollTo(this._scrollDistance+e)}scrollToToggleOptionValue(){if(this.buttonToggleGroup&&this.buttonToggleGroup.selected){let t=this.buttonToggleGroup.selected,r=this.options.findIndex(I=>I.value===t.value),e=r===this.options.length-1,i=r===0,o=this.toggleGroupContainer.nativeElement.offsetWidth,{offsetLeft:a,offsetWidth:s}=t._buttonElement.nativeElement.offsetParent,c=i?0:a,u=e?this.toggleGroup.nativeElement.scrollWidth:c+s,f=this.scrollDistance,_=this.scrollDistance+o;c<f?this.scrollDistance-=f-c:u>_&&(this.scrollDistance+=Math.min(u-_,c-f))}}updatePagination(){this.checkPaginationEnabled(),this.checkPaginationControls(),this.updateToggleHeaderScrollPosition()}checkPaginationEnabled(){if(this.toggleGroupContainer){let t=this.toggleGroup.nativeElement.scrollWidth>this.toggleGroupContainer.nativeElement.offsetWidth;t!==this.showPaginationControls&&(t?this._showPaginationControlsChanged=!0:this.scrollDistance=0,this.cd.markForCheck(),this.showPaginationControls=t)}else this.showPaginationControls=!1}checkPaginationControls(){this.showPaginationControls?(this.leftPaginationEnabled=this.scrollDistance>0,this.rightPaginationEnabled=this.scrollDistance<this.getMaxScrollDistance(),this.cd.markForCheck()):this.leftPaginationEnabled=this.rightPaginationEnabled=!1}getMaxScrollDistance(){let t=this.toggleGroup.nativeElement.scrollWidth,r=this.toggleGroupContainer.nativeElement.offsetWidth;return t-r||0}_scrollTo(t){if(this.showPaginationControls){let r=this.getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(r,t)),this._scrollDistanceChanged=!0,this.checkPaginationControls(),{maxScrollDistance:r,distance:this._scrollDistance}}else return{maxScrollDistance:0,distance:0}}updateToggleHeaderScrollPosition(){if(this.toggleGroupContainer){let r=-this.scrollDistance;this.toggleGroup.nativeElement.style.transform=`translateX(${Math.round(r)}px)`,(this.platform.TRIDENT||this.platform.EDGE)&&(this.toggleGroupContainer.nativeElement.scrollLeft=0)}}};K_.\u0275fac=function(r){return new(r||K_)(h(ve),h(Me),h(Ur),h(qa),h(Bt))},K_.\u0275cmp=L({type:K_,selectors:[["tb-toggle-header"]],viewQuery:function(r,e){if(r&1&&(ae(dse,5),ae(hc,5),ae(pse,5)),r&2){let i;Q(i=K())&&(e.toggleGroup=i.first),Q(i=K())&&(e.buttonToggleGroup=i.first),Q(i=K())&&(e.toggleGroupContainer=i.first)}},hostVars:2,hostBindings:function(r,e){r&2&&Y("tb-toggle-header-pagination-controls-enabled",e.showPaginationControls)},inputs:{value:"value",name:"name",disablePagination:"disablePagination",selectMediaBreakpoint:"selectMediaBreakpoint",useSelectOnMdLg:"useSelectOnMdLg",ignoreMdLgSize:"ignoreMdLgSize",appearance:"appearance",disabled:"disabled",fillHeight:"fillHeight",extraPadding:"extraPadding",primaryBackgroun
44d:"primaryBackground"},outputs:{valueChange:"valueChange"},features:[Ce],decls:10,vars:18,consts:[["select",""],["toggleGroupContainer",""],["toggleGroup",""],["mat-icon-button","","type","button",1,"tb-toggle-header-pagination-button",3,"click","touchstart","disabled"],["class","tb-toggle-container",3,"tb-disable-pagination","fill-height","extra-padding",4,"ngIf","ngIfElse"],[1,"tb-toggle-container"],[1,"tb-toggle-header",3,"ngModelChange","name","ngModel"],[3,"value","disabled","tb-toggle-button-error",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error tb-error-icon",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error","tb-error-icon",3,"matTooltip"],["appearance","outline","subscriptSizing","dynamic",1,"tb-toggle-header-select"],[3,"ngModelChange","ngModel","disabled"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(r,e){if(r&1){let i=B();d(0,"button",3),T("click",function(a){return D(i),M(e.handlePaginatorClick("before",a))})("touchstart",function(a){return D(i),M(e.handlePaginatorTouchStart("before",a))}),d(1,"mat-icon"),g(2,"chevron_left"),p()(),x(3,hse,5,20,"div",4),v(4,"async"),d(5,"button",3),T("click",function(a){return D(i),M(e.handlePaginatorClick("after",a))})("touchstart",function(a){return D(i),M(e.handlePaginatorTouchStart("after",a))}),d(6,"mat-icon"),g(7,"chevron_right"),p()(),x(8,gse,3,5,"ng-template",null,0,kt)}if(r&2){let i=me(9);Y("fill-height",e.fillHeight)("tb-mat-32",!e.isMdLg)("tb-mat-24",e.isMdLg),m("disabled",!e.leftPaginationEnabled),l(3),m("ngIf",C(4,16,e.useSelect$)===!1)("ngIfElse",i),l(2),Y("fill-height",e.fillHeight)("tb-mat-32",!e.isMdLg)("tb-mat-24",e.isMdLg),m("disabled",!e.rightPaginationEnabled)}},dependencies:[Ke,ce,Pe,hc,Kc,Se,ze,Kn,xt,zt,xe,eo,Ve],styles:['@charset "UTF-8";[_nghost-%COMP%]{max-width:100%;display:grid;grid-template-columns:min-content minmax(auto,1fr) min-content}[_nghost-%COMP%]   .tb-toggle-header-pagination-button[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-toggle-header-pagination-button.fill-height[_ngcontent-%COMP%]{height:100%}.tb-toggle-header-pagination-controls-enabled[_nghost-%COMP%]   .tb-toggle-header-pagination-button[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]   .tb-toggle-container[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-toggle-header-select[_ngcontent-%COMP%]{display:inline-grid;grid-column:2;overflow:hidden}[_nghost-%COMP%]   .tb-toggle-container.tb-disable-pagination[_ngcontent-%COMP%]{overflow:visible}[_nghost-%COMP%]   .tb-toggle-header[_ngcontent-%COMP%]{transition:transform .5s cubic-bezier(.35,0,.25,1)}[_nghost-%COMP%]   .tb-error-icon[_ngcontent-%COMP%]{width:12px;height:12px;font-size:12px}[_nghost-%COMP%]     .tb-toggle-container.fill-height .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header{height:100%}[_nghost-%COMP%]     .tb-toggle-container.fill-height .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button{height:100%}[_nghost-%COMP%]     .tb-toggle-container.extra-padding .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 20px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header{overflow:visible;width:100%;border-radius:100px;height:32px;padding:2px;border:none;background:#0000000f}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-primary-fill{background:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-primary-fill:before{border-radius:100px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .tb-toggle-button-error .mat-button-toggle-button{border:1px solid rgb(221,44,0);border-radius:20px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle+.mat-button-toggle{border-left:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard{flex:1;color:#00000061;background:transparent;position:relative}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-ripple{border-radius:20px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button{height:28px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button .mat-button-toggle-label-content{line-height:26px;font-weight:400;font-size:14px;letter-spacing:.2px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button .mat-button-toggle-label-content .mat-pseudo-checkbox{display:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{position:relative;background:#fff;color:var(--tb-primary-500);border:1px solid var(--tb-primary-500);border-radius:20px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button:before{content:"";display:block;position:absolute;inset:0;border-radius:20px;background:var(--tb-primary-500);opacity:.04}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button .mat-button-toggle-label-content{font-weight:500;line-height:24px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-fill .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{background:var(--tb-primary-500);color:#fff}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-fill .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button:before{content:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-fill.tb-invert .mat-button-toggle.mat-button-toggle-appearance-standard{color:#fffc}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-fill.tb-invert .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{background:#fff;color:var(--tb-primary-500)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled{pointer-events:none;background:#00000008}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled .mat-button-toggle.mat-button-toggle-appearance-standard{color:#00000047}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{background:transparent;color:#00000061;border-color:#00000061}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{opacity:0}
44[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled.tb-fill .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{background:#0000001f;color:#00000061;border:transparent}@media screen and (min-width: 960px) and (max-width: 1819px){[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(.tb-ignore-md-lg){height:24px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(.tb-ignore-md-lg) .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button{height:20px;display:grid}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(.tb-ignore-md-lg) .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button .mat-button-toggle-label-content{line-height:20px;font-size:10px;padding:0 2px}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(.tb-ignore-md-lg) .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button .mat-button-toggle-label-content{line-height:18px}}[_nghost-%COMP%]     .tb-toggle-header-select.mat-mdc-form-field{line-height:16px;font-size:12px}[_nghost-%COMP%]     .tb-toggle-header-select.mat-mdc-form-field.fill-height .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex{margin:auto}[_nghost-%COMP%]     .tb-toggle-header-select.mat-mdc-form-field.fill-height .mat-mdc-form-field-subscript-wrapper{display:none}[_nghost-%COMP%]     .tb-toggle-header-select .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:0;width:auto;padding-top:8px;padding-bottom:8px}[_nghost-%COMP%]     .tb-toggle-header-select .mdc-text-field--outlined{padding-left:8px;padding-right:6px}[_nghost-%COMP%]     .tb-toggle-header-select .mat-mdc-select{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.25px}[_nghost-%COMP%]     .tb-toggle-header-select .mat-mdc-select-arrow-wrapper{height:12px;padding-left:6px}[_nghost-%COMP%]     .tb-toggle-header-select .mat-mdc-select-arrow{width:12px;height:12px}[_nghost-%COMP%]     .tb-toggle-header-select .mat-mdc-select-arrow>svg{display:none}[_nghost-%COMP%]     .tb-toggle-header-select .mat-mdc-select-arrow:after{font-family:Material Icons;content:"expand_more";position:absolute;display:inline-block;font-size:20px;line-height:12px;inset:0 0 0 -6px;color:#00000061}']});var Us=K_;pe([fe(),le("design:type",Object)],Us.prototype,"disablePagination",void 0);pe([fe(),le("design:type",Boolean),le("design:paramtypes",[Boolean])],Us.prototype,"useSelectOnMdLg",null);pe([fe(),le("design:type",Object)],Us.prototype,"ignoreMdLgSize",void 0);pe([fe(),le("design:type",Object)],Us.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],Us.prototype,"fillHeight",void 0);pe([fe(),le("design:type",Object)],Us.prototype,"extraPadding",void 0);pe([fe(),le("design:type",Object)],Us.prototype,"primaryBackground",void 0);var pg=class pg extends KE{get maxWidth(){return"100%"}constructor(t){super(t),this.store=t,this.appearance="stroked",this.disablePagination=!1,this.fillHeight=!1,this.extraPadding=!1,this.primaryBackground=!1,this.propagateChange=null}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.modelValue=t}updateModel(t){this.modelValue=t,this.propagateChange(this.modelValue)}};pg.\u0275fac=function(r){return new(r||pg)(h(ve))},pg.\u0275cmp=L({type:pg,selectors:[["tb-toggle-select"]],hostVars:2,hostBindings:function(r,e){r&2&&hi("max-width",e.maxWidth)},inputs:{disabled:"disabled",selectMediaBreakpoint:"selectMediaBreakpoint",appearance:"appearance",disablePagination:"disablePagination",fillHeight:"fillHeight",extraPadding:"extraPadding",primaryBackground:"primaryBackground"},features:[ne([{provide:ye,useExisting:he(()=>pg),multi:!0}]),Ce],decls:1,vars:11,consts:[["ignoreMdLgSize","true","useSelectOnMdLg","false",3,"valueChange","disabled","appearance","fillHeight","extraPadding","primaryBackgroun
44d","disablePagination","selectMediaBreakpoint","options","value"]],template:function(r,e){r&1&&(d(0,"tb-toggle-header",0),T("valueChange",function(o){return e.updateModel(o)}),p()),r&2&&(Y("fill-height",e.fillHeight),m("disabled",e.disabled)("appearance",e.appearance)("fillHeight",e.fillHeight)("extraPadding",e.extraPadding)("primaryBackground",e.primaryBackground)("disablePagination",e.disablePagination)("selectMediaBreakpoint",e.selectMediaBreakpoint)("options",e.options)("value",e.modelValue))},dependencies:[Us],styles:['@charset "UTF-8";[_nghost-%COMP%]   tb-toggle-header.fill-height[_ngcontent-%COMP%]{height:100%}']});var ca=pg;pe([fe(),le("design:type",Boolean)],ca.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],ca.prototype,"disablePagination",void 0);pe([fe(),le("design:type",Object)],ca.prototype,"fillHeight",void 0);pe([fe(),le("design:type",Object)],ca.prototype,"extraPadding",void 0);pe([fe(),le("design:type",Object)],ca.prototype,"primaryBackground",void 0);var Z_={};Ae(Z_,{HintTooltipIconComponent:()=>Hs});y();var bse=["tb-hint-tooltip-icon",""],_se=["*"];function vse(n,t){if(n&1&&(d(0,"tb-icon",1),g(1),p()),n&2){let r=b
44();te("matTooltip",r.tooltipText),m("matTooltipPosition",r.tooltipPosition),l(),z(r.hintIcon)}}var Hs=(()=>{let t=class t{constructor(){this.tooltipPosition="right",this.hintIcon="info"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["","tb-hint-tooltip-icon",""]],hostVars:2,hostBindings:function(i,o){i&2&&Y("tb-hint-tooltip",o.tooltipText)},inputs:{tooltipText:[0,"tb-hint-tooltip-icon","tooltipText"],tooltipPosition:"tooltipPosition",hintIcon:"hintIcon"},attrs:bse,ngContentSelectors:_se,decls:2,vars:1,consts:[["class","tb-hint-tooltip-icon tb-mat-18",3,"matTooltip","matTooltipPosition",4,"ngIf"],[1,"tb-hint-tooltip-icon","tb-mat-18",3,"matTooltip","matTooltipPosition"]],template:function(i,o){i&1&&(Ct(),Fe(0,0,[1,"tb-hint-tooltip-content"]),x(1,vse,2,3,"tb-icon",0)),i&2&&(l(),m("ngIf",o.tooltipText))},dependencies:[ce,zt,In],styles:['@charset "UTF-8";.tb-hint-tooltip[_nghost-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px}[_nghost-%COMP%]   .tb-hint-tooltip-content[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;max-width:fit-content}[_nghost-%COMP%]   .tb-hint-tooltip-icon[_ngcontent-%COMP%]{color:#e0e0e0;overflow:visible;order:3;margin-left:4px;flex-shrink:0}[_nghost-%COMP%]   .tb-hint-tooltip-icon[_ngcontent-%COMP%]:hover{color:#9e9e9e}']});let n=t;return n})();function yse(n,t){if(n&1&&O(0,"tb-toggle-select",27),n&2){let r=b
44(2);m("options",r.realtimeTimewindowOptions)}}function Cse(n,t){n&1&&(d(0,"mat-slide-toggle",32)(1,"div",17),v(2,"translate"),g(3),v(4,"translate"),p()()),n&2&&(l(),te("tb-hint-tooltip-icon",C(2,2,"timewindow.hide-last-interval")),l(2),j(" ",C(4,4,"timewindow.hide")," "))}function wse(n,t){if(n&1){let r=B();d(0,"button",33),T("click",function(i){D(r);let o=b(3);return M(o.configureRealtimeLastIntervalOptions(i))}),d(1,"mat-icon"),g(2,"edit"),p()()}}function xse(n,t){if(n&1&&(pt(0),d(1,"div",23)(2,"mat-slide-toggle",28),g(3),v(4,"translate"),p()(),d(5,"div",15),x(6,Cse,5,6,"mat-slide-toggle",29),d(7,"tb-timeinterval",30),x(8,wse,3,0,"button",31),p()(),ct()),n&2){let r=b(2);l(3),j(" ",C(4,6,"timewindow.disable-custom-interval")," "),l(3),m("ngIf",!r.quickIntervalOnly),l(),m("allowedIntervals",r.timewindowForm.get("realtime.advancedParams.allowedLastIntervals").value)("disabledAdvanced",r.timewindowForm.get("realtime.disableCustomInterval").value)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.REALTIME&&r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.LAST_INTERVAL),l(),m("ngIf",!(r.timewindowForm.get("realtime.hideLastInterval").value||r.timewindowForm.get("realtime.hideInterval").value))}}function Sse(n,t){n&1&&(d(0,"mat-slide-toggle",36)(1,"div",17),v(2,"translate"),g(3),v(4,"translate"),p()()),n&2&&(l(),te("tb-hint-tooltip-icon",C(2,2,"timewindow.hide-relative-interval")),l(2),j(" ",C(4,4,"timewindow.hide")," "))}function Tse(n,t){if(n&1){let r=B();d(0,"button",33),T("click",function(i){D(r);let o=b(3);return M(o.configureRealtimeQuickIntervalOptions(i))}),d(1,"mat-icon"),g(2,"edit"),p()()}}function Ese(n,t){if(n&1&&(d(0,"div",15),x(1,Sse,5,6,"mat-slide-toggle",34),d(2,"tb-quick-time-interval",35),x(3,Tse,3,0,"button",31),p()()),n&2){let r=b
44(2);l(),m("ngIf",!r.quickIntervalOnly),l(),m("allowedIntervals",r.timewindowForm.get("realtime.advancedParams.allowedQuickIntervals").value)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.REALTIME&&r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.INTERVAL),l(),m("ngIf",!(r.timewindowForm.get("realtime.hideQuickInterval").value||r.timewindowForm.get("realtime.hideInterval").value))}}function Ise(n,t){if(n&1&&(d(0,"section",22)(1,"div",14),g(2),v(3,"translate"),p(),d(4,"div",23)(5,"mat-slide-toggle",24),g(6),v(7,"translate"),p()(),x(8,yse,1,1,"tb-toggle-select",25)(9,xse,9,8,"ng-container",12)(10,Ese,4,4,"div",26),p()),n&2){let r=b();l(2),z(C(3,5,"timewindow.timewindow")),l(4),j(" ",C(7,7,"timewindow.hide-timewindow-section")," "),l(2),m("ngIf",r.realtimeTypeSelectionAvailable),l(),m("ngIf",r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.LAST_INTERVAL),l(),m("ngIf",r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.INTERVAL)}}function kse(n,t){if(n&1){let r=B();d(0,"button",33),T("click",function(i){D(r);let o=b(3);return M(o.configureHistoryLastIntervalOptions(i))}),d(1,"mat-icon"),g(2,"edit"),p()()}}function Dse(n,t){if(n&1&&(pt(0),d(1,"div",23)(2,"mat-slide-toggle",28),g(3),v(4,"translate"),p()(),d(5,"div",15)(6,"mat-slide-toggle",32)(7,"div",17),v(8,"translate"),g(9),v(10,"translate"),p()(),d(11,"tb-timeinterval",30),x(12,kse,3,0,"button",31),p()(),ct()),n&2){let r=b
44(2);l(3),j(" ",C(4,7,"timewindow.disable-custom-interval")," "),l(4),te("tb-hint-tooltip-icon",C(8,9,"timewindow.hide-last-interval")),l(2),j(" ",C(10,11,"timewindow.hide")," "),l(2),m("allowedIntervals",r.timewindowForm.get("history.advancedParams.allowedLastIntervals").value)("disabledAdvanced",r.timewindowForm.get("history.disableCustomInterval").value)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY&&r.timewindowForm.get("history.historyType").value===r.historyTypes.LAST_INTERVAL),l(),m("ngIf",!(r.timewindowForm.get("history.hideLastInterval").value||r.timewindowForm.get("history.hideInterval").value))}}function Mse(n,t){if(n&1&&(d(0,"div",15)(1,"mat-slide-toggle",39)(2,"div",17),v(3,"translate"),g(4),v(5,"translate"),p()(),O(6,"tb-datetime-period",40),p()),n&2){let r=b(2);l(2),te("tb-hint-tooltip-icon",C(3,3,"timewindow.hide-fixed-interval")),l(2),j(" ",C(5,5,"timewindow.hide")," "),l(2),m("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY&&r.timewindowForm.get("history.historyType").value===r.historyTypes.FIXED)}}function Ase(n,t){if(n&1){let r=B();d(0,"button",33),T("click",function(i){D(r);let o=b(3);return M(o.configureHistoryQuickIntervalOptions(i))}),d(1,"mat-icon"),g(2,"edit"),p()()}}function Ose(n,t){if(n&1&&(d(0,"div",15)(1,"mat-slide-toggle",36)(2,"div",17),v(3,"translate"),g(4),v(5,"translate"),p()(),d(6,"tb-quick-time-interval",41),x(7,Ase,3,0,"button",31),p()()),n&2){let r=b
44(2);l(2),te("tb-hint-tooltip-icon",C(3,5,"timewindow.hide-relative-interval")),l(2),j(" ",C(5,7,"timewindow.hide")," "),l(2),m("allowedIntervals",r.timewindowForm.get("history.advancedParams.allowedQuickIntervals").value)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY&&r.timewindowForm.get("history.historyType").value===r.historyTypes.INTERVAL),l(),m("ngIf",!(r.timewindowForm.get("history.hideQuickInterval").value||r.timewindowForm.get("history.hideInterval").value))}}function Pse(n,t){if(n&1&&(d(0,"section",37)(1,"div",14),g(2),v(3,"translate"),p(),d(4,"div",23)(5,"mat-slide-toggle",24),g(6),v(7,"translate"),p()(),O(8,"tb-toggle-select",38),x(9,Dse,13,13,"ng-container",12)(10,Mse,7,7,"div",26)(11,Ose,8,9,"div",26),p()),n&2){let r=b();l(2),z(C(3,6,"timewindow.timewindow")),l(4),j(" ",C(7,8,"timewindow.hide-timewindow-section")," "),l(2),m("options",r.historyTimewindowOptions),l(),m("ngIf",r.timewindowForm.get("history.historyType").value===r.historyTypes.LAST_INTERVAL),l(),m("ngIf",r.timewindowForm.get("history.historyType").value===r.historyTypes.FIXED),l(),m("ngIf",r.timewindowForm.get("history.historyType").value===r.historyTypes.INTERVAL)}}function Rse(n,t){if(n&1){let r=B();d(0,"button",33),T("click",function(i){D(r);let o=b(2);return M(o.openAggregationOptionsConfig(i))}),d(1,"mat-icon"),g(2,"edit"),p()()}}function Fse(n,t){if(n&1&&(d(0,"section",13)(1,"div",14),g(2),v(3,"translate"),p(),d(4,"div",15)(5,"mat-slide-toggle",46)(6,"div",17),v(7,"translate"),g(8),v(9,"translate"),p()(),pt(10,43),O(11,"tb-datapoints-limit",47),ct(),p()()),n&2){let r=b
44(2);l(2),z(C(3,4,"aggregation.limit")),l(4),te("tb-hint-tooltip-icon",C(7,6,"timewindow.hide-max-values")),l(2),j(" ",C(9,8,"timewindow.hide")," "),l(3),m("required",r.timewindowForm.get("aggregation.type").value===r.aggregationTypes.NONE)}}function Nse(n,t){n&1&&Ti(0)}function Vse(n,t){if(n&1&&(pt(0),d(1,"div",48)(2,"mat-slide-toggle",49),g(3),v(4,"translate"),p()(),d(5,"div",15),x(6,Nse,1,0,"ng-container",50),pt(7,51),O(8,"tb-timeinterval",52),ct(),p(),ct()),n&2){b();let r=me(22),e=b();l(3),j(" ",C(4,6,"timewindow.disable-custom-interval")," "),l(3),m("ngTemplateOutlet",e.timewindowForm.get("aggregation.type").value!==e.aggregationTypes.NONE?r:null),l(2),m("min",e.minRealtimeAggInterval)("max",e.maxRealtimeAggInterval)("allowedIntervals",e.realtimeAllowedAggIntervals)("disabledAdvanced",e.timewindowForm.get("realtime.disableCustomGroupInterval").value)}}function Lse(n,t){n&1&&Ti(0)}function Bse(n,t){if(n&1&&(pt(0),d(1,"div",53)(2,"mat-slide-toggle",49),g(3),v(4,"translate"),p()(),d(5,"div",15),x(6,Lse,1,0,"ng-container",50),pt(7,54),O(8,"tb-timeinterval",52),ct(),p(),ct()),n&2){b();let r=me(22),e=b();l(3),j(" ",C(4,6,"timewindow.disable-custom-interval")," "),l(3),m("ngTemplateOutlet",e.timewindowForm.get("aggregation.type").value!==e.aggregationTypes.NONE?r:null),l(2),m("min",e.minHistoryAggInterval)("max",e.maxHistoryAggInterval)("allowedIntervals",e.historyAllowedAggIntervals)("disabledAdvanced",e.timewindowForm.get("history.disableCustomGroupInterval").value)}}function jse(n,t){n&1&&(d(0,"mat-slide-toggle",46)(1,"div",17),v(2,"translate"),g(3),v(4,"translate"),p()()),n&2&&(l(),te("tb-hint-tooltip-icon",C(2,2,"timewindow.hide-group-interval")),l(2),j(" ",C(4,4,"timewindow.hide")," "))}function Gse(n,t){if(n&1&&(pt(0),d(1,"section",13)(2,"div",14),g(3),v(4,"translate"),p(),d(5,"div",15)(6,"mat-slide-toggle",42)(7,"div",17),v(8,"translate"),g(9),v(10,"translate"),p()(),pt(11,43),d(12,"tb-aggregation-type-select",44),x(13,Rse,3,0,"button",31),p(),ct(),p()(),x(14,Fse,12,10,"section",45),d(15,"section",13)(16,"div",14),g(17),v(18,"translate"),p(),x(19,Vse,9,8,"ng-container",12)(20,Bse,9,8,"ng-container",12)(21,jse,5,6,"ng-template",null,0,kt),p(),ct()),n&2){let r=b
44();l(3),z(C(4,11,"aggregation.aggregation")),l(4),te("tb-hint-tooltip-icon",C(8,13,"timewindow.hide-aggregation")),l(2),j(" ",C(10,15,"timewindow.hide")," "),l(3),m("allowedAggregationTypes",r.timewindowForm.get("allowedAggTypes").value),l(),m("ngIf",!r.timewindowForm.get("hideAggregation").value),l(),m("ngIf",r.timewindowForm.get("aggregation.type").value===r.aggregationTypes.NONE),l(),Y("!hidden",r.timewindowForm.get("aggregation.type").value===r.aggregationTypes.NONE),l(2),z(C(18,17,"aggregation.group-interval")),l(2),m("ngIf",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.REALTIME),l(),m("ngIf",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY)}}var Gw=(()=>{let t=class t extends sn{constructor(e,i,o,a,s,c,u,f,_,I){super(o),this.data=e,this.dialogRef=i,this.store=o,this.fb=a,this.timeService=s,this.translate=c,this.popoverService=u,this.renderer=f,this.cd=_,this.viewContainerRef=I,this.quickIntervalOnly=!1,this.aggregation=!1,this.historyTypes=Ar,this.realtimeTypes=ia,this.timewindowTypes=Gs,this.aggregationTypes=Uc,this.timewindowTypeOptions=[{name:this.translate.instant("timewindow.realtime"),value:this.timewindowTypes.REALTIME},{name:this.translate.instant("timewindow.history"),value:this.timewindowTypes.HISTORY}],this.realtimeTimewindowOptions=[{name:this.translate.instant(bb.get(ia.INTERVAL)),value:this.realtimeTypes.INTERVAL}],this.historyTimewindowOptions=[{name:this.translate.instant(nm.get(Ar.LAST_INTERVAL)),value:this.historyTypes.LAST_INTERVAL},{name:this.translate.instant(nm.get(Ar.FIXED)),value:this.historyTypes.FIXED},{name:this.translate.instant(nm.get(Ar.INTERVAL)),value:this.historyTypes.INTERVAL}],this.destroy$=new Te,this.quickIntervalOnly=e.quickIntervalOnly,this.aggregation=e.aggregation,this.timewindow=e.timewindow,this.quickIntervalOnly||this.realtimeTimewindowOptions.unshift({name:this.translate.instant(bb.get(ia.LAST_INTERVAL)),value:this.realtimeTypes.LAST_INTERVAL}),this.realtimeTypeSelectionAvailable=this.realtimeTimewindowOptions.length>1}ngOnInit(){let e=this.timewindow.realtime,i=this.timewindow.history,o=this.timewindow.aggregation;this.timewindowForm=this.fb.group({selectedTab:[dt(this.timewindow.selectedTab)?this.timewindow.selectedTab:Gs.REALTIME],realtime:this.fb.group({realtimeType:[dt(e?.realtimeType)?this.timewindow.realtime.realtimeType:ia.LAST_INTERVAL],timewindowMs:[dt(e?.timewindowMs)?this.timewindow.realtime.timewindowMs:null],interval:[dt(e?.interval)?this.timewindow.realtime.interval:null],quickInterval:[dt(e?.quickInterval)?this.timewindow.realtime.quickInterval:null],disableCustomInterval:[De(this.timewindow.realtime?.disableCustomInterval)?this.timewindow.realtime?.disableCustomInterval:!1],disableCustomGroupInterval:[De(this.timewindow.realtime?.disableCustomGroupInterval)?this.timewindow.realtime?.disableCustomGroupInterval:!1],hideInterval:[De(this.timewindow.realtime.hideInterval)?this.timewindow.realtime.hideInterval:!1],hideLastInterval:[{value:De(this.timewindow.realtime.hideLastInterval)?this.timewindow.realtime.hideLastInterval:!1,disabled:this.timewindow.realtime.hideInterval}],hideQuickInterval:[{value:De(this.timewindow.realtime.hideQuickInterval)?this.timewindow.realtime.hideQuickInterval:!1,disabled:this.timewindow.realtime.hideInterval}],advancedParams:this.fb.group({allowedLastIntervals:[De(this.timewindow.realtime?.advancedParams?.allowedLastIntervals)?this.timewindow.realtime.advancedParams.allowedLastIntervals:null],allowedQuickIntervals:[De(this.timewindow.realtime?.advancedParams?.allowedQuickIntervals)?this.timewindow.realtime.advancedParams.allowedQuickIntervals:null],lastAggIntervalsConfig:[De(this.timewindow.realtime?.advancedParams?.lastAggIntervalsConfig)?this.timewindow.realtime.advancedParams.lastAggIntervalsConfig:null],quickAggIntervalsConfig:[De(this.timewindow.realtime?.advancedParams?.quickAggIntervalsConfig)?this.timewindow.realtime.advancedParams.quickAggIntervalsConfig:null]})}),history:this.fb.group({historyType:[dt(i?.historyType)?this.timewindow.history.historyType:Ar.LAST_INTERVAL],timewindowMs:[dt(i?.timewindowMs)?this.timewindow.history.timewindowMs:null],interval:[dt(i?.interval)?this.timewindow.history.interval:null],fixedTimewindow:[dt(i?.fixedTimewindow)?this.timewindow.history.fixedTimewindow:null],quickInterval:[dt(i?.quickInterval)?this.timewindow.history.quickInterval:null],disableCustomInterval:[De(this.timewindow.history?.disableCustomInterval)?this.timewindow.history?.disableCustomInterval:!1],disableCustomGroupInterval:[De(this.timewindow.history?.disableCustomGroupInterval)?this.timewindow.history?.disableCustomGroupInterval:!1],hideInterval:[De(this.timewindow.history.hideInterval)?this.timewindow.history.hideInterval:!1],hideLastInterval:[{value:De(this.timewindow.history.hideLastInterval)?this.timewindow.history.hideLastInterval:!1,disabled:this.timewindow.history.hideInterval}],hideQuickInterval:[{value:De(this.timewindow.history.hideQuickInterval)?this.timewindow.history.hideQuickInterval:!1,disabled:this.timewindow.history.hideInterval}],hideFixedInterval:[{value:De(this.timewindow.history.hideFixedInterval)?this.timewindow.history.hideFixedInterval:!1,disabled:this.timewindow.history.hideInterval}],advancedParams:this.fb.group({allowedLastIntervals:[De(this.timewindow.history?.advancedParams?.allowedLastIntervals)?this.timewindow.history.advancedParams.allowedLastIntervals:null],allowedQuickIntervals:[De(this.timewindow.history?.advancedParams?.allowedQuickIntervals)?this.timewindow.history.advancedParams.allowedQuickIntervals:null],lastAggIntervalsConfig:[De(this.timewindow.history?.advancedParams?.lastAggIntervalsConfig)?this.timewindow.history.advancedParams.lastAggIntervalsConfig:null],quickAggIntervalsConfig:[De(this.timewindow.history?.advancedParams?.quickAggIntervalsConfig)?this.timewindow.history.advancedParams.quickAggIntervalsConfig:null]})}),aggregation:this.fb.group({type:[dt(o?.type)?this.timewindow.aggregation.type:null],limit:[dt(o?.limit)?this.timewindow.aggregation.limit:null]}),timezone:[dt(this.timewindow.timezone)?this.timewindow.timezone:null],allowedAggTypes:[De(this.timewindow.allowedAggTypes)?this.timewindow.allowedAggTypes:null],hideAggregation:[De(this.timewindow.hideAggregation)?this.timewindow.hideAggregation:!1],hideAggInterval:[De(this.timewindow.hideAggInterval)?this.timewindow.hideAggInterval:!1],hideTimezone:[De(this.timewindow.hideTimezone)?this.timewindow.hideTimezone:!1]}
44),this.updateValidators(this.timewindowForm.get("aggregation.type").value),this.aggregation&&(this.timewindowForm.get("realtime.timewindowMs").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{let s=this.timewindowForm.get("realtime.advancedParams.lastAggIntervalsConfig").value;s?.hasOwnProperty(a)&&s[a].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("realtime.interval").patchValue(s[a].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("realtime.quickInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{let s=this.timewindowForm.get("realtime.advancedParams.quickAggIntervalsConfig").value;s?.hasOwnProperty(a)&&s[a].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("realtime.interval").patchValue(s[a].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("history.timewindowMs").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{let s=this.timewindowForm.get("history.advancedParams.lastAggIntervalsConfig").value;s?.hasOwnProperty(a)&&s[a].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("history.interval").patchValue(s[a].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("history.quickInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{let s=this.timewindowForm.get("history.advancedParams.quickAggIntervalsConfig").value;s?.hasOwnProperty(a)&&s[a].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("history.interval").patchValue(s[a].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("aggregation.type").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{this.updateValidators(a)})),this.timewindowForm.get("selectedTab").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{this.onTimewindowTypeChange(a)}),this.timewindowForm.get("realtime.hideInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a?(this.timewindowForm.get("realtime.hideLastInterval").disable({emitEvent:!1}),this.timewindowForm.get("realtime.hideQuickInterval").disable({emitEvent:!1})):(this.timewindowForm.get("realtime.hideLastInterval").enable({emitEvent:!1}),this.timewindowForm.get("realtime.hideQuickInterval").enable({emitEvent:!1})),this.updateDisableAdvancedOptionState("realtime.disableCustomInterval",a)}),this.timewindowForm.get("realtime.hideLastInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a&&!this.timewindowForm.get("realtime.hideQuickInterval").value&&this.timewindowForm.get("realtime.realtimeType").setValue(ia.INTERVAL),this.updateDisableAdvancedOptionState("realtime.disableCustomInterval",a)}),this.timewindowForm.get("realtime.hideQuickInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a&&!this.timewindowForm.get("realtime.hideLastInterval").value&&this.timewindowForm.get("realtime.realtimeType").setValue(ia.LAST_INTERVAL)}),this.timewindowForm.get("history.hideInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a?(this.timewindowForm.get("history.hideLastInterval").disable({emitEvent:!1}),this.timewindowForm.get("history.hideQuickInterval").disable({emitEvent:!1}),this.timewindowForm.get("history.hideFixedInterval").disable({emitEvent:!1})):(this.timewindowForm.get("history.hideLastInterval").enable({emitEvent:!1}),this.timewindowForm.get("history.hideQuickInterval").enable({emitEvent:!1}),this.timewindowForm.get("history.hideFixedInterval").enable({emitEvent:!1})),this.updateDisableAdvancedOptionState("history.disableCustomInterval",a)}),this.timewindowForm.get("history.hideLastInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a&&(this.timewindowForm.get("history.hideFixedInterval").value?this.timewindowForm.get("history.hideQuickInterval").value||this.timewindowForm.get("history.historyType").setValue(Ar.INTERVAL):this.timewindowForm.get("history.historyType").setValue(Ar.FIXED)),this.updateDisableAdvancedOptionState("history.disableCustomInterval",a)}),this.timewindowForm.get("history.hideFixedInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a&&(this.timewindowForm.get("history.hideLastInterval").value?this.timewindowForm.get("history.hideQuickInterval").value||this.timewindowForm.get("history.historyType").setValue(Ar.INTERVAL):this.timewindowForm.get("history.historyType").setValue(Ar.LAST_INTERVAL))}),this.timewindowForm.get("history.hideQuickInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{a&&(this.timewindowForm.get("history.hideLastInterval").value?this.timewindowForm.get("history.hideFixedInterval").value||this.timewindowForm.get("history.historyType").setValue(Ar.FIXED):this.timewindowForm.get("history.historyType").setValue(Ar.LAST_INTERVAL))}),this.timewindowForm.get("hideAggInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{this.updateDisableAdvancedOptionState("realtime.disableCustomGroupInterval",a),this.updateDisableAdvancedOptionState("history.disableCustomGroupInterval",a)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateDisableAdvancedOptionState(e,i){i?(this.timewindowForm.get(e).disable({emitEvent:!1}),this.timewindowForm.get(e).patchValue(!1,{emitEvent:!1})):this.timewindowForm.get(e).enable({emitEvent:!1})}updateValidators(e){e!==Uc.NONE?this.timewindowForm.get("aggregation.limit").clearValidators():this.timewindowForm.get("aggregation.limit").setValidators([ke.required]),this.timewindowForm.get("aggregation.limit").updateV
44alueAndValidity({emitEvent:!1})}onTimewindowTypeChange(e){let i=this.timewindowForm.getRawValue(),o=i.realtime.disableCustomInterval,a=i.history.disableCustomInterval;AS(e,this.quickIntervalOnly,this.timewindowForm,o,a,i.realtime.advancedParams,i.history.advancedParams),this.timewindowForm.patchValue({hideAggregation:i.hideAggregation,hideAggInterval:i.hideAggInterval,hideTimezone:i.hideTimezone})}update(){let e=this.timewindowForm.getRawValue();this.timewindow=go(this.timewindow,e);let i=!(e.hideAggInterval&&(e.realtime.hideInterval||e.realtime.hideLastInterval)),o=!(e.hideAggInterval&&(e.realtime.hideInterval||e.realtime.hideQuickInterval)),a=!(e.hideAggInterval&&(e.history.hideInterval||e.history.hideLastInterval)),s=!(e.hideAggInterval&&(e.history.hideInterval||e.history.hideQuickInterval));i&&e.realtime.advancedParams.allowedLastIntervals?.length?this.timewindow.realtime.advancedParams.allowedLastIntervals=e.realtime.advancedParams.allowedLastIntervals:delete this.timewindow.realtime.advancedParams.allowedLastIntervals,o&&e.realtime.advancedParams.allowedQuickIntervals?.length?this.timewindow.realtime.advancedParams.allowedQuickIntervals=e.realtime.advancedParams.allowedQuickIntervals:delete this.timewindow.realtime.advancedParams.allowedQuickIntervals,i&&Co(e.realtime.advancedParams.lastAggIntervalsConfig)&&Object.keys(e.realtime.advancedParams.lastAggIntervalsConfig).length?this.timewindow.realtime.advancedParams.lastAggIntervalsConfig=e.realtime.advancedParams.lastAggIntervalsConfig:delete this.timewindow.realtime.advancedParams.lastAggIntervalsConfig,o&&Co(e.realtime.advancedParams.quickAggIntervalsConfig)&&Object.keys(e.realtime.advancedParams.quickAggIntervalsConfig).length?this.timewindow.realtime.advancedParams.quickAggIntervalsConfig=e.realtime.advancedParams.quickAggIntervalsConfig:delete this.timewindow.realtime.advancedParams.quickAggIntervalsConfig,a&&e.history.advancedParams.allowedLastIntervals?.length?this.timewindow.history.advancedParams.allowedLastIntervals=e.history.advancedParams.allowedLastIntervals:delete this.timewindow.history.advancedParams.allowedLastIntervals,s&&e.history.advancedParams.allowedQuickIntervals?.length?this.timewindow.history.advancedParams.allowedQuickIntervals=e.history.advancedParams.allowedQuickIntervals:delete this.timewindow.history.advancedParams.allowedQuickIntervals,a&&Co(e.history.advancedParams.lastAggIntervalsConfig)&&Object.keys(e.history.advancedParams.lastAggIntervalsConfig).length?this.timewindow.history.advancedParams.lastAggIntervalsConfig=e.history.advancedParams.lastAggIntervalsConfig:delete this.timewindow.history.advancedParams.lastAggIntervalsConfig,s&&Co(e.history.advancedParams.quickAggIntervalsConfig)&&Object.keys(e.history.advancedParams.quickAggIntervalsConfig).length?this.timewindow.history.advancedParams.quickAggIntervalsConfig=e.history.advancedParams.quickAggIntervalsConfig:delete this.timewindow.history.advancedParams.quickAggIntervalsConfig,Object.keys(this.timewindow.realtime.advancedParams).length||delete this.timewindow.realtime.advancedParams,Object.keys(this.timewindow.history.advancedParams).length||delete this.timewindow.history.advancedParams,e.allowedAggTypes?.length&&!e.hideAggregation?this.timewindow.allowedAggTypes=e.allowedAggTypes:delete this.timewindow.allowedAggTypes,this.timewindow.realtime.disableCustomInterval||delete this.timewindow.realtime.disableCustomInterval,this.timewindow.realtime.disableCustomGroupInterval||delete this.timewindow.realtime.disableCustomGroupInterval,this.timewindow.history.disableCustomInterval||delete this.timewindow.history.disableCustomInterval,this.timewindow.history.disableCustomGroupInterval||delete this.timewindow.history.disableCustomGroupInterval,this.aggregation||delete this.timewindow.aggregation,this.dialogRef.close(this.timewindow)}cancel(){this.dialogRef.close()}get minRealtimeAggInterval(){return this.timeService.minIntervalLimit(this.currentRealtimeTimewindow())}get maxRealtimeAggInterval(){return this.timeService.maxIntervalLimit(this.currentRealtimeTimewindow())}currentRealtimeTimewindow(){return OS(this.timewindowForm.getRawValue())}get minHistoryAggInterval(){return this.timeService.minIntervalLimit(this.currentHistoryTimewindow())}get maxHistoryAggInterval(){return this.timeService.maxIntervalLimit(this.currentHistoryTimewindow())}currentHistoryTimewindow(){return PS(this.timewindowForm.getRawValue())}get realtimeAllowedAggIntervals(){let e=this.timewindowForm.getRawValue();return RS(e,e.realtime.advancedParams)}get historyAllowedAggIntervals(){let e=this.timewindowForm.getRawValue();return FS(e,e.history.advancedParams)}openAggregationOptionsConfig(e){e&&e.stopPropagation();let i=e.target||e.currentTarget;if(this.popoverService.hasPopover(i))this.popoverService.hidePopover(i);else{let o=this.popoverService.displayPopover({trigger:i,renderer:this.renderer,hostView:this.viewContainerRef,componentType:Y_,preferredPlacement:["left","leftTop","leftBottom"],context:{allowedAggregationTypes:Di(this.timewindowForm.get("allowedAggTypes").value),onClose:a=>{o.hide(),a&&(this.timewindowForm.get("allowedAggTypes").patchValue(a),this.timewindowForm.markAsDirty())}},overlayStyle:{maxHeight:"500px",height:"100%"},popoverContentStyle:{padding:0},isModal:!0});o.tbComponentRef.instance.popoverComponent=o}this.cd.detectChanges()}configureRealtimeLastIntervalOptions(e){this.openIntervalOptionsConfig(e,"realtime.advancedParams.allowedLastIntervals","realtime.advancedParams.lastAggIntervalsConfig",ia.LAST_INTERVAL)}configureRealtimeQuickIntervalOptions(e){this.openIntervalOptionsConfig(e,"realtime.advancedParams.allowedQuickIntervals","realtime.advancedParams.quickAggIntervalsConfig",ia.INTERVAL,Gs.REALTIME)}configureHistoryLastIntervalOptions(e){this.openIntervalOptionsConfig(e,"history.advancedParams.allowedLastIntervals","history.advancedParams.lastAggIntervalsConfig",Ar.LA
44ST_INTERVAL)}configureHistoryQuickIntervalOptions(e){this.openIntervalOptionsConfig(e,"history.advancedParams.allowedQuickIntervals","history.advancedParams.quickAggIntervalsConfig",Ar.INTERVAL,Gs.HISTORY)}openIntervalOptionsConfig(e,i,o,a,s){e&&e.stopPropagation();let c=e.target||e.currentTarget;if(this.popoverService.hasPopover(c))this.popoverService.hidePopover(c);else{let u=this.popoverService.displayPopover({trigger:c,renderer:this.renderer,hostView:this.viewContainerRef,componentType:Dm,preferredPlacement:["left","leftTop","leftBottom"],context:{aggregation:this.aggregation,allowedIntervals:Di(this.timewindowForm.get(i).value),aggIntervalsConfig:Di(this.timewindowForm.get(o).value),intervalType:a,timewindowType:s,onClose:f=>{u.hide(),f&&(this.timewindowForm.get(i).patchValue(f.allowedIntervals),this.timewindowForm.get(o).patchValue(f.aggIntervalsConfig),this.timewindowForm.markAsDirty())}},overlayStyle:{maxHeight:"500px",height:"100%"},popoverContentStyle:{padding:0},isModal:!0});u.tbComponentRef.instance.popoverComponent=u}this.cd.detectChanges()}};t.\u0275fac=function(i){return new(i||t)(h(un),h(en),h(ve),h(Ai),h(ba),h(Ge),h(Fa),h(Ni),h(Me),h(ci))},t.\u0275cmp=L({type:t,selectors:[["tb-timewindow-config-dialog"]],features:[Ce],decls:37,vars:30,consts:[["hideAggInterval",""],["mat-dialog-content","",1,"tb-timewindow-form",3,"formGroup"],["color","primary"],[1,"flex-1"],["tb-help","timewindowSettings"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],[1,"tb-timewindow-form-header","tb-form-panel","no-border","no-padding-bottom"],["appearance","fill","formControlName","selectedTab",1,"tb-timewindow-form-type-options",3,"options"],[1,"tb-timewindow-form-content","tb-form-panel","no-border"],["formGroupName","realtime","class","tb-form-panel",4,"ngIf"],["formGroupName","history","class","tb-form-panel",4,"ngIf"],[4,"ngIf"],[1,"tb-form-panel"],[1,"tb-form-panel-title"],[1,"tb-form-row","column-xs"],["formControlName","hideTimezone",1,"mat-slide"],[3,"tb-hint-tooltip-icon"],["formControlName","timezone","subscriptSizing","dynamic","appearance","outline","displayLabel","false",3,"localBrowserTimezonePlaceholderOnEmpty"],["mat-dialog-actions","",1,"tb-dialog-actions","tb-flex","flex-end","no-gap"],["type","button","mat-button","",3,"click","disabled"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["formGroupName","realtime",1,"tb-form-panel"],[1,"tb-form-row"],["formControlName","hideInterval",1,"mat-slide","fixed-title-width"],["appearance","stroked","formControlName","realtimeType",3,"options",4,"ngIf"],["class","tb-form-row column-xs",4,"ngIf"],["appearance","stroked","formControlName","realtimeType",3,"options"],["formControlName","disableCustomInterval",1,"mat-slide","fixed-title-width"],["class","mat-slide","formControlName","hideLastInterval",4,"ngIf"],["formControlName","timewindowMs","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","disabledAdvanced","required"],["matSuffix","","mat-icon-button","","type","button",3,"click",4,"ngIf"],["formControlName","hideLastInterval",1,"mat-slide"],["matSuffix","","mat-icon-button","","type","button",3,"click"],["class","mat-slide","formControlName","hideQuickInterval",4,"ngIf"],["displayLabel","false","formControlName","quickInterval","onlyCurrentInterval","true","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","required"],["formControlName","hideQuickInterval",1,"mat-slide"],["formGroupName","history",1,"tb-form-panel"],["appearance","stroked","formControlName","historyType",3,"options"],["formControlName","hideFixedInterval",1,"mat-slide"],["formControlName","fixedTimewindow","subscriptSizing","dynamic","appearance","outline",1,"history-time-input",3,"required"],["displayLabel","false","formControlName","quickInterval","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","required"],["formControlName","hideAggregation",1,"mat-slide"],["formGroupName","aggregation"],["subscriptSizing","dynamic","appearance","outline","displayLabel","false","formControlName","type",1,"flex",3,"allowedAggregationTypes"],["class","tb-form-panel",4,"ngIf"],["formControlName","hideAggInterval",1,"mat-slide"],["formControlName","limit",3,"required"],["formGroupName","realtime",1,"tb-form-row"],["formControlName","disableCustomGroupInterval",1,"mat-slide","fixed-title-width"],[4,"ngTemplateOutlet"],["formGroupName","realtime"],["formControlName","interval","useCalendarIntervals","","subscriptSizing","dynamic","appearance","outline",3,"min","max","allowedIntervals","disabledAdvanced"],["formGroupName","history",1,"tb-form-row"],["formGroupName","history"]],template:function(i,o){i&1&&(d(0,"form",1)(1,"mat-toolbar",2)(2,"h2"),g(3),v(4,"translate"),p(),O(5,"span",3)(6,"div",4),d(7,"button",5),T("click",function(){return o.cancel()}),d(8,"mat-icon",6),g(9,"close"),p()()(),d(10,"div",7),O(11,"tb-toggle-select",8),p(),d(12,"div",9),x(13,Ise,11,9,"section",10)(14,Pse,12,10,"section",11)(15,Gse,23,19,"ng-container",12),d(16,"section",13)(17,"div",14),g(18),v(19,"translate"),p(),d(20,"div",15)(21,"mat-slide-toggle",16)(22,"div",17),v(23,"translate"),g(24),v(25,"translate"),p()(),O(26,"tb-timezone-select",18),p()()(),O(27,"mat-divider"),d(28,"div",19)(29,"button",20),v(30,"async"),T("click",function(){return o.cancel()}),g(31),v(32,"translate"),p(),d(33,"button",21),v(34,"async"),T("click",function(){return o.update()}),g(35),v(36,"translate"),p()()()),i&2&&(m("formGroup",o.timewindowForm),l(3),z(C(4,14,"timewindow.timewindow-settings")),l(8),m("options",o.timewindowTypeOptions),l(2),m("ngIf",o.timewindowForm.get("selectedTab").value===o.timewindowTypes.REALTIME),l(),m("ngIf",o.timewindowForm.get("selectedTab").value===o.timewindowTypes.HISTORY),l(),m("ngIf",o.aggregation),l(3),z(C(19,16,"timezone.timezone")),l(4),te("tb-hint-tooltip-icon",C(23,18,"timewindow.hide-timezone")),l(2),j(" ",C(25,20,"timewindow.hide")," "),l(2),m("localBrowserTimezonePlaceholderOnEmpty",!0),l(3),m("disabled",C(30,22,o.isLoading$)),l(2),j(" ",C(32,24,"action.cancel")," "),l(2),m("disabled",C(34,26,o.isLoading$)||o.timewindowForm.invali
44d||!o.timewindowForm.dirty),l(2),j(" ",C(36,28,"action.apply")," "))},dependencies:[ce,fo,yt,Pe,Se,Yt,ir,gr,Dn,la,jo,ur,xe,We,St,$e,Qe,Ka,Ms,md,ud,Ju,Tc,eh,$l,ca,Hs,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%]{width:600px}[_nghost-%COMP%]   .tb-timewindow-form.mat-mdc-dialog-content[_ngcontent-%COMP%]{overflow:hidden;padding:0}[_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%]   tb-timezone-select[_ngcontent-%COMP%]{flex:1}.mat-mdc-dialog-container[_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%], .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%]{display:grid;grid-template-rows:min-content min-content minmax(auto,1fr) min-content min-content}','@charset "UTF-8";[_nghost-%COMP%]{background-color:#fff}[_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%]{overflow:hidden}[_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]{overflow-y:auto}[_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-timeinterval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-quick-time-interval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-datetime-period[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-datapoints-limit[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-aggregation-type-select[_ngcontent-%COMP%]{flex:1}']});let n=t;return n})();var $$={};Ae($$,{TimezoneComponent:()=>gs});y();var zse={};Ae(zse,{TimezonePanelComponent:()=>J_});y();var J_=(()=>{let t=class t extends sn{constructor(e,i){super(e),this.store=e,this.fb=i}ngOnInit(){this.timezoneForm=this.fb.group({timezone:[this.timezone]})}update(){this.onClose&&this.onClose({timezone:this.timezoneForm.get("timezone").value})}cancel(){this.onClose&&this.onClose(null)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-timezone-panel"]],inputs:{timezone:"timezone",userTimezoneByDefault:"userTimezoneByDefault",localBrowserTimezonePlaceholderOnEmpty:"localBrowserTimezonePlaceholderOnEmpty",defaultTimezone:"defaultTimezone",onClose:"onClose",popoverComponent:"popoverComponent"},features:[Ce],decls:15,vars:17,consts:[[3,"formGroup"],[1,"tb-form-row","column-xs","space-between"],["formControlName","timezone","subscriptSizing","dynamic","appearance","outline","displayLabel","false",1,"flex",3,"localBrowserTimezonePlaceholderOnEmpty"],[1,"tb-timezone-panel-actions","tb-flex","flex-end","no-gap"],["type","button","mat-button","",3,"click","disabled"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"]],template:function(i,o){i&1&&(d(0,"form",0)(1,"section",1)(2,"div"),g(3),v(4,"translate"),p(),O(5,"tb-timezone-select",2),p()(),d(6,"div",3)(7,"button",4),v(8,"async"),T("click",function(){return o.cancel()}),g(9),v(10,"translate"),p(),d(11,"button",5),v(12,"async"),T("click",function(){return o.update()}),g(13),v(14,"translate"),p()()),i&2&&(m("formGroup",o.timezoneForm),l(3),z(C(4,7,"timezone.timezone")),l(2),m("localBrowserTimezonePlaceholderOnEmpty",o.localBrowserTimezonePlaceholderOnEmpty),l(2),m("disabled",C(8,9,o.isLoading$)),l(2),j(" ",C(10,11,"action.cancel")," "),l(2),m("disabled",C(12,13,o.isLoading$)||o.timezoneForm.invali
44d||!o.timezoneForm.dirty),l(2),j(" ",C(14,15,"action.apply")," "))},dependencies:[yt,ur,xe,We,$e,Qe,$l,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex-direction:column;width:380px;max-height:100%;max-width:100%;background-color:#fff}[_nghost-%COMP%]   tb-timezone-select[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]   .tb-timezone-panel-actions[_ngcontent-%COMP%]{padding-top:12px}']});let n=t;return n})();var $se=n=>({"no-padding":n});function Use(n,t){if(n&1){let r=B();d(0,"button",4),T("click",function(i){D(r);let o=b();return M(o.toggleTimezone(i))}),d(1,"span"),g(2),p()()}if(n&2){let r=b();m("disabled",r.timezoneDisabled)("matTooltip",r.tooltipValue())("matTooltipPosition",r.tooltipPosition),l(2),z(r.displayValue())}}function Hse(n,t){if(n&1){let r=B();d(0,"button",5),T("click",function(i){D(r);let o=b();return M(o.toggleTimezone(i))}),d(1,"span"),g(2),p()()}if(n&2){let r=b();m("disabled",r.timezoneDisabled)("matTooltip",r.tooltipValue())("matTooltipPosition",r.tooltipPosition),l(2),z(r.displayValue())}}function qse(n,t){if(n&1){let r=B();d(0,"button",6),T("click",function(i){D(r);let o=b();return M(o.toggleTimezone(i))}),d(1,"span"),g(2),p()()}if(n&2){let r=b();m("disabled",r.timezoneDisabled)("matTooltip",r.tooltipValue())("matTooltipPosition",r.tooltipPosition),l(2),z(r.displayValue())}}function Wse(n,t){if(n&1){let r=B();d(0,"section",7),T("click",function(i){D(r);let o=b();return M(o.toggleTimezone(i))}),d(1,"div",8),g(2),p()()}if(n&2){let r=b();bt(Xe(7,$se,r.noPadding)),m("matTooltip",r.tooltipValue())("matTooltipPosition",r.tooltipPosition),l(),Y("!hidden",r.hideLabel),l(),j(" ",r.displayValue()," ")}}var mg=class mg{get userTimezoneByDefault(){return this.userTimezoneByDefaultValue}set userTimezoneByDefault(t){this.userTimezoneByDefaultValue=mt(t)}get localBrowserTimezonePlaceholderOnEmpty(){return this.localBrowserTimezonePlaceholderOnEmptyValue}set localBrowserTimezonePlaceholderOnEmpty(t){this.localBrowserTimezonePlaceholderOnEmptyValue=mt(t)}set defaultTimezone(t){this.defaultTimezoneId!==t&&(this.defaultTimezoneId=t)}get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}constructor(t,r,e,i,o,a){this.translate=t,this.cd=r,this.viewContainerRef=e,this.popoverService=i,this.renderer=o,this.timeService=a,this.noMargin=!1,this.noPadding=!1,this.disablePanel=!1,this.asButton=!1,this.strokedButton=!1,this.flatButton=!1,this.displayTimezoneValue=!0,this.hideLabel=!1,this.tooltipPosition="above",this.defaultTimezoneId=null,this.localBrowserTimezoneInfoPlaceholder=this.timeService.getLocalBrowserTimezoneInfoPlaceholder(),this.prop
44agateChange=s=>{}}ngOnInit(){}toggleTimezone(t){if(t&&t.stopPropagation(),this.disablePanel)return;let r=t.target||t.currentTarget;if(this.popoverService.hasPopover(r))this.popoverService.hidePopover(r);else{let e=this.popoverService.displayPopover({trigger:r,renderer:this.renderer,hostView:this.viewContainerRef,componentType:J_,preferredPlacement:["bottomRight","leftBottom"],context:{timezone:this.modelValue,userTimezoneByDefault:this.userTimezoneByDefaultValue,localBrowserTimezonePlaceholderOnEmpty:this.localBrowserTimezonePlaceholderOnEmptyValue,defaultTimezone:this.defaultTimezoneId,onClose:i=>{e.hide(),i&&(this.modelValue=i.timezone,this.setTimezoneInfo(),this.timezoneDisabled=this.isTimezoneDisabled(),this.updateDisplayValue(),this.notifyChanged())}},showCloseButton:!1,isModal:!0});e.tbComponentRef.instance.popoverComponent=e}this.cd.detectChanges()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.timezoneDisabled=this.isTimezoneDisabled()}writeValue(t){this.modelValue=t,this.setTimezoneInfo(),this.timezoneDisabled=this.isTimezoneDisabled(),this.updateDisplayValue()}notifyChanged(){this.propagateChange(this.modelValue)}displayValue(){return this.displayTimezoneValue&&this.timezoneInfo?this.timezoneInfo.offset:this.translate.instant("timezone.timezone")}tooltipValue(){return this.timezoneInfo?`${this.timezoneInfo.name} (${this.timezoneInfo.offset})`:void 0}updateDisplayValue(){this.cd.detectChanges()}isTimezoneDisabled(){return this.disabled}setTimezoneInfo(){let t=bf(this.modelValue,this.defaultTimezoneId,this.userTimezoneByDefaultValue);t!==null?this.timezoneInfo=t:this.localBrowserTimezonePlaceholderOnEmptyValue?this.timezoneInfo=this.localBrowserTimezoneInfoPlaceholder:this.timezoneInfo=null}};mg.\u0275fac=function(r){return new(r||mg)(h(Ge),h(Me),h(ci),h(Fa),h(Ni),h(ba))},mg.\u0275cmp=L({type:mg,selectors:[["tb-timezone"]],hostVars:2,hostBindings:function(r,e){r&2&&Y("no-margin",e.noMargin)},inputs:{noMargin:"noMargin",noPadding:"noPadding",disablePanel:"disablePanel",asButton:"asButton",strokedButton:"strokedButton",flatButton:"flatButton",displayTimezoneValue:"displayTimezoneValue",hideLabel:"hideLabel",tooltipPosition:"tooltipPosition",disabled:"disabled",userTimezoneByDefault:"userTimezoneByDefault",localBrowserTimezonePlaceholderOnEmpty:"localBrowserTimezonePlaceholderOnEmpty",defaultTimezone:"defaultTimezone",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>mg),multi:!0}])],decls:4,vars:4,consts:[["type","button","mat-raised-button","","color","primary",3,"disabled","matTooltip","matTooltipPosition","click",4,"ngIf"],["type","button","mat-stroked-button","","color","primary",3,"disabled","matTooltip","matTooltipPosition","click",4,"ngIf"],["type","button","mat-button","",3,"disabled","matTooltip","matTooltipPosition","click",4,"ngIf"],["class","tb-timezone",3,"class","matTooltip","matTooltipPosition","click",4,"ngIf"],["type","button","mat-raised-button","","color","primary",3,"click","disabled","matTooltip","matTooltipPosition"],["type","button","mat-stroked-button","","color","primary",3,"click","disabled","matTooltip","matTooltipPosition"],["type","button","mat-button","",3,"click","disabled","matTooltip","matTooltipPosition"],[1,"tb-timezone",3,"click","matTooltip","matTooltipPosition"],[1,"tb-timezone-label"]],template:function(r,e){r&1&&x(0,Use,3,4,"button",0)(1,Hse,3,4,"button",1)(2,qse,3,4,"button",2)(3,Wse,3,9,"section",3),r&2&&(m("ngIf",e.asButton&&!e.strokedButton&&!e.flatButton),l(),m("ngIf",e.asButton&&e.strokedButton),l(),m("ngIf",e.asButton&&e.flatButton),l(),m("ngIf",!e.asButton))},dependencies:[ce,yt,zt],styles:['@charset "UTF-8";[_nghost-%COMP%]{min-width:88px;margin:8px 0;max-width:100%}.no-margin[_nghost-%COMP%]{margin:0}[_nghost-%COMP%]   .mdc-button[_ngcontent-%COMP%]{max-width:100%}[_nghost-%COMP%]   section.tb-timezone[_ngcontent-%COMP%]{padding:0 8px;line-height:32px;pointer-events:all;cursor:pointer;display:flex;flex-direction:row;place-content:center flex-start;align-items:center;gap:4px;width:100%}[_nghost-%COMP%]   section.tb-timezone.no-padding[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   section.tb-timezone[_ngcontent-%COMP%]   .tb-timezone-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%]   section.tb-timezone[_ngcontent-%COMP%]   .timezone-abbr[_ngcontent-%COMP%]{font-weight:500}[_nghost-%COMP%]     .mdc-button .mat-icon{min-width:24px}[_nghost-%COMP%]     .mdc-button .mdc-button__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}']});var gs=mg;pe([fe(),le("design:type",Object)],gs.prototype,"noMargin",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"noPadding",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"disablePanel",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"asButton",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"strokedButton",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"flatButton",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"displayTimezoneValue",void 0);pe([fe(),le("design:type",Object)],gs.prototype,"hideLabel",void 0);pe([fe(),le("design:type",Boolean)],gs.prototype,"disabled",void 0);function Yse(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b(2);return M(i.openTimewindowConfig())}),d(1,"mat-icon"),g(2,"settings"),p()()}}function Qse(n,t){if(n&1&&(d(0,"div",7),O(1,"tb-toggle-select",8),x(2,Yse,3,0,"button",9),p()),n&2){let r=b
44();l(),m("options",r.timewindowTypeOptions),l(),m("ngIf",r.isEdit)}}function Kse(n,t){if(n&1&&(pt(0,21),O(1,"tb-toggle-select",22),ct()),n&2){let r=b(3);l(),m("options",r.realtimeTimewindowOptions)}}function Xse(n,t){n&1&&Ti(0)}function Zse(n,t){if(n&1&&O(0,"tb-timeinterval",23),n&2){let r=b(3);m("allowedIntervals",r.realtimeAllowedLastIntervals)("disabledAdvanced",r.realtimeDisableCustomInterval)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.REALTIME&&r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.LAST_INTERVAL)}}function Jse(n,t){if(n&1&&O(0,"tb-quick-time-interval",24),n&2){let r=b(3);m("allowedIntervals",r.realtimeAllowedQuickIntervals)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.REALTIME&&r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.INTERVAL)}}function ele(n,t){if(n&1&&(d(0,"section",12)(1,"div",13)(2,"div",14)(3,"div",15),g(4),v(5,"translate"),p(),x(6,Kse,2,1,"ng-container",16),p(),x(7,Xse,1,0,"ng-container",17),p(),d(8,"div",18),x(9,Zse,1,3,"tb-timeinterval",19)(10,Jse,1,2,"tb-quick-time-interval",20),p()()),n&2){let r=b
44(2),e=me(9);l(),Y("align-end",r.realtimeTypeSelectionAvailable)("align-center",!r.realtimeTypeSelectionAvailable),l(3),z(C(5,9,"timewindow.timewindow")),l(2),m("ngIf",r.realtimeTypeSelectionAvailable),l(),m("ngTemplateOutlet",e),l(2),m("ngIf",r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.LAST_INTERVAL),l(),m("ngIf",r.timewindowForm.get("realtime.realtimeType").value===r.realtimeTypes.INTERVAL)}}function tle(n,t){if(n&1&&(pt(0),x(1,ele,11,11,"section",11),ct()),n&2){let r=b(),e=me(7);l(),m("ngIf",r.realtimeIntervalSelectionAvailable)("ngIfElse",e)}}function ile(n,t){if(n&1&&(pt(0,27),O(1,"tb-toggle-select",28),ct()),n&2){let r=b(3);l(),m("options",r.historyTimewindowOptions)}}function nle(n,t){n&1&&Ti(0)}function rle(n,t){if(n&1&&O(0,"tb-timeinterval",23),n&2){let r=b(4);m("allowedIntervals",r.historyAllowedLastIntervals)("disabledAdvanced",r.historyDisableCustomInterval)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY&&r.timewindowForm.get("history.historyType").value===r.historyTypes.LAST_INTERVAL)}}function ole(n,t){if(n&1&&O(0,"tb-datetime-period",32),n&2){let r=b
44(4);m("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY&&r.timewindowForm.get("history.historyType").value===r.historyTypes.FIXED)}}function ale(n,t){if(n&1&&O(0,"tb-quick-time-interval",33),n&2){let r=b(4);m("allowedIntervals",r.historyAllowedQuickIntervals)("required",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY&&r.timewindowForm.get("history.historyType").value===r.historyTypes.INTERVAL)}}function sle(n,t){if(n&1&&(d(0,"div",29),x(1,rle,1,3,"tb-timeinterval",19)(2,ole,1,1,"tb-datetime-period",30)(3,ale,1,2,"tb-quick-time-interval",31),p()),n&2){let r=b(3);l(),m("ngIf",r.timewindowForm.get("history.historyType").value===r.historyTypes.LAST_INTERVAL),l(),m("ngIf",r.timewindowForm.get("history.historyType").value===r.historyTypes.FIXED),l(),m("ngIf",r.timewindowForm.get("history.historyType").value===r.historyTypes.INTERVAL)}}function lle(n,t){if(n&1&&(d(0,"section",12)(1,"div",13)(2,"div",14)(3,"div",15),g(4),v(5,"translate"),p(),x(6,ile,2,1,"ng-container",25),p(),x(7,nle,1,0,"ng-container",17),p(),x(8,sle,4,3,"div",26),p()),n&2){let r=b
44(2),e=me(9);l(),Y("align-end",r.historyTypeSelectionAvailable)("align-center",!r.historyTypeSelectionAvailable),l(3),z(C(5,8,"timewindow.timewindow")),l(2),m("ngIf",r.historyTypeSelectionAvailable),l(),m("ngTemplateOutlet",e),l(),m("ngIf",r.historyIntervalSelectionAvailable&&r.timewindowForm.get("history.historyType").value!==r.historyTypes.FOR_ALL_TIME)}}function cle(n,t){if(n&1&&(pt(0),x(1,lle,9,10,"section",11),ct()),n&2){let r=b(),e=me(7);l(),m("ngIf",r.historyIntervalSelectionAvailable)("ngIfElse",e)}}function dle(n,t){if(n&1&&(d(0,"section",37)(1,"div",38),g(2),v(3,"translate"),p(),O(4,"tb-aggregation-type-select",39),p()),n&2){let r=b(2);l(2),z(C(3,2,"aggregation.aggregation")),l(2),m("allowedAggregationTypes",r.allowedAggTypes)}}function ple(n,t){if(n&1&&(d(0,"section",37)(1,"div"),g(2),v(3,"translate"),p(),O(4,"tb-datapoints-limit",40),p()),n&2){let r=b(2);l(2),z(C(3,2,"aggregation.limit")),l(2),m("required",r.timewindowForm.get("aggregation.type").value===r.aggregationTypes.NONE)}}function mle(n,t){if(n&1&&(pt(0,21),d(1,"tb-timeinterval",42)(2,"div",38),g(3),v(4,"translate"),p()(),ct()),n&2){let r=b
44(3);l(),m("min",r.minRealtimeAggInterval)("max",r.maxRealtimeAggInterval)("allowedIntervals",r.realtimeAllowedAggIntervals)("disabledAdvanced",r.realtimeDisableCustomGroupInterval),l(2),z(C(4,5,"aggregation.group-interval"))}}function ule(n,t){if(n&1&&(pt(0,27),d(1,"tb-timeinterval",42)(2,"div",38),g(3),v(4,"translate"),p()(),ct()),n&2){let r=b(3);l(),m("min",r.minHistoryAggInterval)("max",r.maxHistoryAggInterval)("allowedIntervals",r.historyAllowedAggIntervals)("disabledAdvanced",r.historyDisableCustomGroupInterval),l(2),z(C(4,5,"aggregation.group-interval"))}}function hle(n,t){if(n&1&&(d(0,"section",41),x(1,mle,5,7,"ng-container",16)(2,ule,5,7,"ng-container",25),p()),n&2){let r=b(2);Y("!hidden",!(r.isEdit||!r.timewindow.hideAggInterval)),l(),m("ngIf",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.REALTIME),l(),m("ngIf",r.timewindowForm.get("selectedTab").value===r.timewindowTypes.HISTORY)}}function fle(n,t){if(n&1&&(pt(0)(1,34),x(2,dle,5,4,"section",35)(3,ple,5,4,"section",35),ct(),x(4,hle,3,4,"section",36),ct()),n&2){let r=b
44();l(2),m("ngIf",r.isEdit||!r.timewindow.hideAggregation),l(),m("ngIf",r.timewindowForm.get("aggregation.type").value===r.aggregationTypes.NONE&&(r.isEdit||!r.timewindow.hideAggInterval)),l(),m("ngIf",r.timewindowForm.get("aggregation.type").value!==r.aggregationTypes.NONE)}}function gle(n,t){n&1&&Ti(0)}function ble(n,t){if(n&1&&(d(0,"section",43)(1,"div"),g(2),v(3,"translate"),p(),x(4,gle,1,0,"ng-container",17),p()),n&2){b();let r=me(9);l(2),z(C(3,2,"timezone.timezone")),l(2),m("ngTemplateOutlet",r)}}function _le(n,t){n&1&&O(0,"tb-timezone",45)}function vle(n,t){if(n&1&&x(0,_le,1,0,"tb-timezone",44),n&2){let r=b();m("ngIf",r.timezone&&(r.isEdit||!r.timewindow.hideTimezone))}}function yle(n,t){n&1&&O(0,"mat-divider")}function Cle(n,t){if(n&1){let r=B();d(0,"div",46)(1,"button",47),v(2,"async"),T("click",function(){D(r);let i=b();return M(i.cancel())}),g(3),v(4,"translate"),p(),d(5,"button",48),v(6,"async"),T("click",function(){D(r);let i=b();return M(i.update())}),g(7),v(8,"translate"),p()()}if(n&2){let r=b();l(),m("disabled",C(2,4,r.isLoading$)),l(2),j(" ",C(4,6,"action.cancel")," "),l(2),m("disabled",C(6,8,r.isLoading$)||r.timewindowForm.invalid||!r.timewindowForm.dirty),l(2),j(" ",C(8,10,"action.update")," ")}}var zw=new tt("TimewindowPanelData"),ug=(()=>{let t=class t extends sn{constructor(e,i,o,a,s,c,u,f){super(o),this.data=e,this.overlayRef=i,this.store=o,this.fb=a,this.timeService=s,this.translate=c,this.viewContainerRef=u,this.dialog=f,this.width="450px",this.changeTimewindow=new J,this.historyOnly=!1,this.forAllTimeEnabled=!1,this.quickIntervalOnly=!1,this.aggregation=!1,this.timezone=!1,this.isEdit=!1,this.panelMode=!0,this.historyTypes=Ar,this.realtimeTypes=ia,this.timewindowTypes=Gs,this.aggregationTypes=Uc,this.timewindowTypeOptions=[{name:this.translate.instant("timewindow.history"),value:this.timewindowTypes.HISTORY}],this.realtimeTimewindowOptions=[],this.historyTimewindowOptions=[],this.destroy$=new Te,this.historyOnly=e.historyOnly,this.forAllTimeEnabled=e.forAllTimeEnabled,this.quickIntervalOnly=e.quickIntervalOnly,this.timewindow=e.timewindow,this.aggregation=e.aggregation,this.timezone=e.timezone,this.isEdit=e.isEdit,this.panelMode=e.panelMode,this.forAllTimeEnabled&&(this.width="500px"),this.updateTimewindowAdvancedParams(),this.historyOnly||this.timewindowTypeOptions.unshift({name:this.translate.instant("timewindow.realtime"),value:this.timewindowTypes.REALTIME}),(this.isEdit||!this.timewindow.realtime.hideLastInterval)&&!this.quickIntervalOnly&&this.realtimeTimewindowOptions.push({name:this.translate.instant(bb.get(ia.LAST_INTERVAL)),value:this.realtimeTypes.LAST_INTERVAL}),(this.isEdit||!this.timewindow.realtime.hideQuickInterval||this.quickIntervalOnly)&&this.realtimeTimewindowOptions.push({name:this.translate.instant(bb.get(ia.INTERVAL)),value:this.realtimeTypes.INTERVAL}),this.forAllTimeEnabled&&this.historyTimewindowOptions.push({name:this.translate.instant(nm.get(Ar.FOR_ALL_TIME)),value:this.historyTypes.FOR_ALL_TIME}),(this.isEdit||!this.timewindow.history.hideLastInterval)&&this.historyTimewindowOptions.push({name:this.translate.instant(nm.get(Ar.LAST_INTERVAL)),value:this.historyTypes.LAST_INTERVAL}),(this.isEdit||!this.timewindow.history.hideFixedInterval)&&this.historyTimewindowOptions.push({name:this.translate.instant(nm.get(Ar.FIXED)),value:this.historyTypes.FIXED}),(this.isEdit||!this.timewindow.history.hideQuickInterval)&&this.historyTimewindowOptions.push({name:this.translate.instant(nm.get(Ar.INTERVAL)),value:this.historyTypes.INTERVAL}),this.realtimeTypeSelectionAvailable=this.realtimeTimewindowOptions.length>1,this.historyTypeSelectionAvailable=this.historyTimewindowOptions.length>1,this.realtimeIntervalSelectionAvailable=this.isEdit||!(this.timewindow.realtime.hideInterval||this.timewindow.realtime.hideLastInterval&&this.timewindow.realtime.hideQuickInterval),this.historyIntervalSelectionAvailable=this.isEdit||!(this.timewindow.history.hideInterval||this.timewindow.history.hideLastInterval&&this.timewindow.history.hideQuickInterval&&this.timewindow.history.hideFixedInterval),this.aggregationOptionsAvailable=this.aggregation&&(this.isEdit||!(this.timewindow.hideAggregation&&this.timewindow.hideAggInterval))}ngOnInit(){let e=this.timewindow.hideAggregation||!1,i=this.timewindow.hideAggInterval||!1,o=this.timewindow.hideTimezone||!1,a=this.timewindow.realtime,s=this.timewindow.history,c=this.timewindow.aggregation;
44this.isEdit||(a.hideLastInterval&&!a.hideQuickInterval&&(a.realtimeType=ia.INTERVAL),a.hideQuickInterval&&!a.hideLastInterval&&(a.realtimeType=ia.LAST_INTERVAL),s.hideLastInterval&&(s.hideFixedInterval?s.hideQuickInterval||(s.historyType=Ar.INTERVAL):s.historyType=Ar.FIXED),s.hideFixedInterval&&(s.hideLastInterval?s.hideQuickInterval||(s.historyType=Ar.INTERVAL):s.historyType=Ar.LAST_INTERVAL),s.hideQuickInterval&&(s.hideLastInterval?s.hideFixedInterval||(s.historyType=Ar.FIXED):s.historyType=Ar.LAST_INTERVAL)),this.timewindowForm=this.fb.group({selectedTab:[dt(this.timewindow.selectedTab)?this.timewindow.selectedTab:Gs.REALTIME],realtime:this.fb.group({realtimeType:[{value:dt(a?.realtimeType)?a.realtimeType:ia.LAST_INTERVAL,disabled:a.hideInterval}],timewindowMs:[{value:dt(a?.timewindowMs)?a.timewindowMs:null,disabled:a.hideInterval||a.hideLastInterval}],interval:[{value:dt(a?.interval)?a.interval:null,disabled:i}],quickInterval:[{value:dt(a?.quickInterval)?a.quickInterval:null,disabled:a.hideInterval||a.hideQuickInterval}]}),history:this.fb.group({historyType:[{value:dt(s?.historyType)?s.historyType:Ar.LAST_INTERVAL,disabled:s.hideInterval}],timewindowMs:[{value:dt(s?.timewindowMs)?s.timewindowMs:null,disabled:s.hideInterval||s.hideLastInterval}],interval:[{value:dt(s?.interval)?s.interval:null,disabled:i}],fixedTimewindow:[{value:dt(s?.fixedTimewindow)&&this.timewindow.selectedTab===Gs.HISTORY&&s.historyType===Ar.FIXED?s.fixedTimewindow:null,disabled:s.hideInterval||s.hideFixedInterval}],quickInterval:[{value:dt(s?.quickInterval)?s.quickInterval:null,disabled:s.hideInterval||s.hideQuickInterval}]}),aggregation:this.fb.group({type:[{value:dt(c?.type)?c.type:null,disabled:e}],limit:[{value:dt(c?.limit)?c.limit:null,disabled:i},[]]}),timezone:[{value:dt(this.timewindow.timezone)?this.timewindow.timezone:null,disabled:o}]}),this.updateValidators(this.timewindowForm.get("aggregation.type").value),this.aggregation&&(this.timewindowForm.get("realtime.timewindowMs").valueChanges.pipe(Be(this.destroy$)).subscribe(u=>{this.realtimeAdvancedParams?.lastAggIntervalsConfig?.hasOwnProperty(u)&&this.realtimeAdvancedParams.lastAggIntervalsConfig[u].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("realtime.interval").patchValue(this.realtimeAdvancedParams.lastAggIntervalsConfig[u].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("realtime.quickInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(u=>{this.realtimeAdvancedParams?.quickAggIntervalsConfig?.hasOwnProperty(u)&&this.realtimeAdvancedParams.quickAggIntervalsConfig[u].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("realtime.interval").patchValue(this.realtimeAdvancedParams.quickAggIntervalsConfig[u].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("history.timewindowMs").valueChanges.pipe(Be(this.destroy$)).subscribe(u=>{this.historyAdvancedParams?.lastAggIntervalsConfig?.hasOwnProperty(u)&&this.historyAdvancedParams.lastAggIntervalsConfig[u].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("history.interval").patchValue(this.historyAdvancedParams.lastAggIntervalsConfig[u].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("history.quickInterval").valueChanges.pipe(Be(this.destroy$)).subscribe(u=>{this.historyAdvancedParams?.quickAggIntervalsConfig?.hasOwnProperty(u)&&this.historyAdvancedParams.quickAggIntervalsConfig[u].defaultAggInterval&&setTimeout(()=>this.timewindowForm.get("history.interval").patchValue(this.historyAdvancedParams.quickAggIntervalsConfig[u].defaultAggInterval,{emitEvent:!1}))}),this.timewindowForm.get("aggregation.type").valueChanges.pipe(Be(this.destroy$)).subscribe(u=>{this.updateValidators(u)})),this.timewindowForm.get("selectedTab").valueChanges.pipe(Be(this.destroy$)).subscribe(u=>{this.onTimewindowTypeChange(u)}),this.panelMode||this.timewindowForm.valueChanges.pipe(Be(this.destroy$)).subscribe(()=>{this.prepareTimewindowConfig(),this.changeTimewindow.emit(this.timewindow)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateValidators(e){e!==Uc.NONE?this.timewindowForm.get("aggregation.limit").clearValidators():this.timewindowForm.get("aggregation.limit").setValidators([ke.required]),this.timewindowForm.get("aggregation.limit").updateV
44alueAndValidity({emitEvent:!1})}onTimewindowTypeChange(e){AS(e,this.quickIntervalOnly,this.timewindowForm,this.realtimeDisableCustomInterval,this.historyDisableCustomInterval,this.realtimeAdvancedParams,this.historyAdvancedParams)}update(){this.prepareTimewindowConfig(),this.result=this.timewindow,this.overlayRef?.dispose()}prepareTimewindowConfig(){let e=this.timewindowForm.getRawValue();this.timewindow.selectedTab=e.selectedTab,this.timewindow.realtime=Lt(re({},this.timewindow.realtime),{realtimeType:e.realtime.realtimeType,timewindowMs:e.realtime.timewindowMs,quickInterval:e.realtime.quickInterval,interval:e.realtime.interval}),this.timewindow.history=Lt(re({},this.timewindow.history),{historyType:e.history.historyType,timewindowMs:e.history.timewindowMs,interval:e.history.interval,fixedTimewindow:e.history.fixedTimewindow,quickInterval:e.history.quickInterval}),this.aggregation&&(this.timewindow.aggregation={type:e.aggregation.type,limit:e.aggregation.limit}),this.timezone&&(this.timewindow.timezone=e.timezone)}updateTimewindowForm(){this.timewindowForm.patchValue(this.timewindow,{emitEvent:!1}),this.updateValidators(this.timewindowForm.get("aggregation.type").value),this.timewindow.realtime.hideInterval?(this.timewindowForm.get("realtime.realtimeType").disable({emitEvent:!1}),this.timewindowForm.get("realtime.timewindowMs").disable({emitEvent:!1}),this.timewindowForm.get("realtime.quickInterval").disable({emitEvent:!1})):(this.timewindowForm.get("realtime.realtimeType").enable({emitEvent:!1}),this.timewindow.realtime.hideLastInterval?this.timewindowForm.get("realtime.timewindowMs").disable({emitEvent:!1}):this.timewindowForm.get("realtime.timewindowMs").enable({emitEvent:!1}),this.timewindow.realtime.hideQuickInterval?this.timewindowForm.get("realtime.quickInterval").disable({emitEvent:!1}):this.timewindowForm.get("realtime.quickInterval").enable({emitEvent:!1})),this.timewindow.history.hideInterval?(this.timewindowForm.get("history.historyType").disable({emitEvent:!1}),this.timewindowForm.get("history.timewindowMs").disable({emitEvent:!1}),this.timewindowForm.get("history.fixedTimewindow").disable({emitEvent:!1}),this.timewindowForm.get("history.quickInterval").disable({emitEvent:!1})):(this.timewindowForm.get("history.historyType").enable({emitEvent:!1}),this.timewindow.history.hideLastInterval?this.timewindowForm.get("history.timewindowMs").disable({emitEvent:!1}):this.timewindowForm.get("history.timewindowMs").enable({emitEvent:!1}),this.timewindow.history.hideFixedInterval?this.timewindowForm.get("history.fixedTimewindow").disable({emitEvent:!1}):this.timewindowForm.get("history.fixedTimewindow").enable({emitEvent:!1}),this.timewindow.history.hideQuickInterval?this.timewindowForm.get("history.quickInterval").disable({emitEvent:!1}):this.timewindowForm.get("history.quickInterval").enable({emitEvent:!1})),this.timewindow.hideAggregation?this.timewindowForm.get("aggregation.type").disable({emitEvent:!1}):this.timewindowForm.get("aggregation.type").enable({emitEvent:!1}),this.timewindow.hideAggInterval?(this.timewindowForm.get("aggregation.limit").disable({emitEvent:!1}),this.timewindowForm.get("realtime.interval").disable({emitEvent:!1}),this.timewindowForm.get("history.interval").disable({emitEvent:!1})):(this.timewindowForm.get("aggregation.limit").enable({emitEvent:!1}),this.timewindowForm.get("realtime.interval").enable({emitEvent:!1}),this.timewindowForm.get("history.interval").enable({emitEvent:!1})),this.timewindow.hideTimezone?this.timewindowForm.get("timezone").disable({emitEvent:!1}):this.timewindowForm.get("timezone").enable({emitEvent:!1}),this.timewindowForm.markAsDirty()}cancel(){this.overlayRef?.dispose()}get minRealtimeAggInterval(){return this.timeService.minIntervalLimit(this.currentRealtimeTimewindow())}get maxRealtimeAggInterval(){return this.timeService.maxIntervalLimit(this.currentRealtimeTimewindow())}currentRealtimeTimewindow(){return OS(this.timewindowForm.getRawValue())}get minHistoryAggInterval(){return this.timeService.minIntervalLimit(this.currentHistoryTimewindow())}get maxHistoryAggInterval(){return this.timeService.maxIntervalLimit(this.currentHistoryTimewindow())}currentHistoryTimewindow(){return PS(this.timewindowForm.getRawValue())}get realtimeAllowedAggIntervals(){return RS(this.timewindowForm.getRawValue(),this.realtimeAdvancedParams)}get historyAllowedAggIntervals(){return FS(this.timewindowForm.getRawValue(),this.historyAdvancedParams)}openTimewindowConfig(){this.prepareTimewindowConfig(),this.dialog.open(Gw,{autoFocus:!1,disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{quickIntervalOnly:this.quickIntervalOnly,aggregation:this.aggregation,timewindow:Di(this.timewindow)}}).afterClosed().subscribe(e=>{e&&(this.timewindow=e,this.updateTimewindowAdvancedParams(),this.updateTimewindowForm())})}updateTimewindowAdvancedParams(){this.realtimeDisableCustomInterval=this.timewindow.realtime.disableCustomInterval,this.realtimeDisableCustomGroupInterval=this.timewindow.realtime.disableCustomGroupInterval,this.historyDisableCustomInterval=this.timewindow.history.disableCustomInterval,this.historyDisableCustomGroupInterval=this.timewindow.history.disableCustomGroupInterval,this.timewindow.realtime.advancedParams?(this.realtimeAdvancedParams=this.timewindow.realtime.advancedParams,this.realtimeAllowedLastIntervals=this.timewindow.realtime.advancedParams.allowedLastIntervals,this.realtimeAllowedQuickIntervals=this.timewindow.realtime.advancedParams.allowedQuickIntervals):(this.realtimeAdvancedParams=null,this.realtimeAllowedLastIntervals=null,this.realtimeAllowedQuickIntervals=null),this.timewindow.history.advancedParams?(this.historyAdvancedParams=this.timewindow.history.advancedParams,this.historyAllowedLastIntervals=this.timewindow.history.advancedParams.allowedLastIntervals,this.historyAllowedQuickIntervals=this.timewindow.history.advancedParams.allowedQuickIntervals):(this.historyAdvancedParams=null,this.historyAllowedLastIntervals=null,this.historyAllowedQuickIntervals=null),this.allowedAggTypes=this.timewindow.allowedAggTypes}};t.\u0275fac=function(i){return new(i||t)(h(zw),h(qd,8),h(ve),h(Wt),h(ba),h(Ge),h(ci),h(Lr))},t.\u0275cmp=L({type:t,selectors:[["tb-timewindow-panel"]],hostVars:2,hostBindings:function(i,o){i&2&&hi("width",o.width)},outputs:{changeTimewindow:"changeTimewindow"},features:[Ce],decls:12,vars:9,consts:[["timezoneSelectionPanel",""],["t
44imezoneSelection",""],[1,"tb-timewindow-form",3,"formGroup"],["class","tb-timewindow-form-header tb-form-panel no-border no-padding-bottom",4,"ngIf"],[1,"tb-timewindow-form-content","tb-form-panel","no-border"],[4,"ngIf"],["class","tb-panel-actions tb-flex flex-end no-gap",4,"ngIf"],[1,"tb-timewindow-form-header","tb-form-panel","no-border","no-padding-bottom"],["appearance","fill","formControlName","selectedTab",1,"tb-timewindow-form-type-options",3,"options"],["mat-icon-button","","type","button","class","tb-timewindow-form-settings-btn tb-mat-24",3,"click",4,"ngIf"],["mat-icon-button","","type","button",1,"tb-timewindow-form-settings-btn","tb-mat-24",3,"click"],["class","tb-form-panel stroked",4,"ngIf","ngIfElse"],[1,"tb-form-panel","stroked"],[1,"tb-flex","space-between"],[1,"tb-flex-xs","column"],[1,"tb-form-panel-title"],["formGroupName","realtime",4,"ngIf"],[4,"ngTemplateOutlet"],["formGroupName","realtime",1,"tb-form-row","no-border","no-padding"],["formControlName","timewindowMs","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","disabledAdvanced","required",4,"ngIf"],["displayLabel","false","formControlName","quickInterval","onlyCurrentInterval","true","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","required",4,"ngIf"],["formGroupName","realtime"],["appearance","stroked","formControlName","realtimeType",3,"options"],["formControlName","timewindowMs","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","disabledAdvanced","required"],["displayLabel","false","formControlName","quickInterval","onlyCurrentInterval","true","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","required"],["formGroupName","history",4,"ngIf"],["class","tb-form-row no-border no-padding","formGroupName","history",4,"ngIf"],["formGroupName","history"],["appearance","stroked","formControlName","historyType",3,"options"],["formGroupName","history",1,"tb-form-row","no-border","no-padding"],["formControlName","fixedTimewindow","subscriptSizing","dynamic","appearance","outline","class","history-time-input",3,"required",4,"ngIf"],["displayLabel","false","formControlName","quickInterval","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","required",4,"ngIf"],["formControlName","fixedTimewindow","subscriptSizing","dynamic","appearance","outline",1,"history-time-input",3,"required"],["displayLabel","false","formControlName","quickInterval","subscriptSizing","dynamic","appearance","outline",3,"allowedIntervals","required"],["formGroupName","aggregation"],["class","tb-form-row column-xs space-between same-padding",4,"ngIf"],["class","tb-form-row column-xs same-padding",3,"!hidden",4,"ngIf"],[1,"tb-form-row","column-xs","space-between","same-padding"],[1,"fixed-title-width-180"],["subscriptSizing","dynamic","appearance","outline","displayLabel","false","formControlName","type",1,"flex",3,"allowedAggregationTypes"],["formControlName","limit",3,"required"],[1,"tb-form-row","column-xs","same-padding"],["formControlName","interval","useCalendarIntervals","","subscriptSizing","dynamic","appearance","outline",3,"min","max","allowedIntervals","disabledAdvanced"],[1,"tb-form-row","space-between","same-padding"],["asButton","","strokedButton","","noMargin","","localBrowserTimezonePlaceholderOnEmpty","true","formControlName","timezone",4,"ngIf"],["asButton","","strokedButton","","noMargin","","localBrowserTimezonePlaceholderOnEmpty","true","formControlName","timezone"],[1,"tb-panel-actions","tb-flex","flex-end","no-gap"],["type","button","mat-button","",3,"click","disabled"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"]],template:function(i,o){i&1&&(d(0,"form",2),x(1,Qse,3,2,"div",3),d(2,"div",4),x(3,tle,2,2,"ng-container",5)(4,cle,2,2,"ng-container",5)(5,fle,5,3,"ng-container",5),p(),x(6,ble,5,4,"ng-template",null,0,kt)(8,vle,1,1,"ng-template",null,1,kt)(10,yle,1,0,"mat-divider",5)(11,Cle,9,12,"div",6),p()),i&2&&(m("formGroup",o.timewindowForm),l(),m("ngIf",!o.historyOnly),l(),Y("no-padding",!o.panelMode),l(),m("ngIf",o.timewindowForm.get("selectedTab").value===o.timewindowTypes.REALTIME),l(),m("ngIf",o.timewindowForm.get("selectedTab").value===o.timewindowTypes.HISTORY),l(),m("ngIf",o.aggregationOptionsAvailable),l(5),m("ngIf",o.panelMode),l(),m("ngIf",o.panelMode))},dependencies:[ce,fo,yt,Pe,Se,la,ur,xe,We,St,$e,Qe,Ka,md,gs,ud,Ju,T
44c,eh,ca,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:100%}[_nghost-%COMP%]   .tb-timewindow-form-header[_ngcontent-%COMP%]{flex-direction:row;align-items:center}[_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   .tb-flex[_ngcontent-%COMP%]{gap:16px}[_nghost-%COMP%]   .tb-timewindow-form-type-options[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]   .tb-timewindow-form-settings-btn[_ngcontent-%COMP%]{color:#0000008a}','@charset "UTF-8";[_nghost-%COMP%]{background-color:#fff}[_nghost-%COMP%]   .tb-timewindow-form[_ngcontent-%COMP%]{overflow:hidden}[_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]{overflow-y:auto}[_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-timeinterval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-quick-time-interval[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-datetime-period[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-datapoints-limit[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-timewindow-form-content[_ngcontent-%COMP%]   tb-aggregation-type-select[_ngcontent-%COMP%]{flex:1}']});let n=t;return n})();var xle=["panelContainer"],Sle=n=>({"no-padding":n});function Tle(n,t){if(n&1){let r=B();d(0,"button",5),T("click",function(i){D(r);let o=b();return M(o.toggleTimewindow(i))}),d(1,"mat-icon",6),g(2,"query_builder"),p(),d(3,"span"),g(4),p()()}if(n&2){let r=b();m("disabled",r.timewindowDisabled),l(4),z(r.displayValue())}}function Ele(n,t){if(n&1){let r=B();d(0,"button",7),T("click",function(i){D(r);let o=b();return M(o.toggleTimewindow(i))}),d(1,"mat-icon",6),g(2,"query_builder"),p(),d(3,"span"),g(4),p()()}if(n&2){let r=b();m("disabled",r.timewindowDisabled),l(4),z(r.displayValue())}}function Ile(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(i){D(r);let o=b();return M(o.toggleTimewindow(i))}),d(1,"mat-icon",6),g(2,"query_builder"),p(),d(3,"span"),g(4),p()()}if(n&2){let r=b();m("disabled",r.timewindowDisabled),l(4),z(r.displayValue())}}function kle(n,t){if(n&1&&(d(0,"tb-icon"),g(1),p()),n&2){let r=b
44(2);_n(r.timewindowIconStyle),l(),z(r.computedTimewindowStyle.icon)}}function Dle(n,t){if(n&1&&(d(0,"tb-icon"),g(1),p()),n&2){let r=b(2);_n(r.timewindowIconStyle),l(),z(r.computedTimewindowStyle.icon)}}function Mle(n,t){if(n&1){let r=B();d(0,"section",9),v(1,"translate"),T("click",function(i){D(r);let o=b();return M(o.toggleTimewindow(i))}),x(2,kle,2,3,"tb-icon",10),d(3,"div",11),g(4),d(5,"span"),g(6,"| "),d(7,"span",12),g(8),p()()(),x(9,Dle,2,3,"tb-icon",10),p()}if(n&2){let r=b();_n(r.timewindowComponentStyle),bt(Xe(17,Sle,r.noPadding)),te("matTooltip",C(1,15,"timewindow.edit")),m("matTooltipPosition",r.tooltipPosition)("matTooltipDisabled",r.timewindowDisabled),l(2),m("ngIf",r.computedTimewindowStyle.showIcon&&r.computedTimewindowStyle.iconPosition==="left"),l(),Y("!hidden",r.hideLabel),l(),j(" ",r.innerValue==null?null:r.innerValue.displayValue," "),l(),Y("!hidden",(r.innerValue==null?null:r.innerValue.displayTimezoneAbbr)===""),l(3),z(r.innerValue==null?null:r.innerValue.displayTimezoneAbbr),l(),m("ngIf",r.computedTimewindowStyle.showIcon&&r.computedTimewindowStyle.iconPosition==="right")}}var hg=class hg{set historyOnly(t){let r=mt(t);this.historyOnlyValue!==r&&(this.historyOnlyValue=r,this.onHistoryOnlyChanged()&&this.notifyChanged())}get historyOnly(){return this.historyOnlyValue}get displayTypePrefix(){return De(this.computedTimewindowStyle?.displayTypePrefix)?this.computedTimewindowStyle?.displayTypePrefix:!0}set isEdit(t){this.isEditValue=mt(t),this.timewindowDisabled=this.isTimewindowDisabled()}get isEdit(){return this.isEditValue}constructor(t,r,e,i,o,a,s,c,u){this.overlay=t,this.translate=r,this.timeService=e,this.millisecondsToTimeStringPipe=i,this.datePipe=o,this.cd=a,this.nativeElement=s,this.viewContainerRef=c,this.destroyRef=u,this.historyOnlyValue=!1,this.noMargin=!1,this.noPadding=!1,this.disablePanel=!1,this.forAllTimeEnabled=!1,this.alwaysDisplayTypePrefix=!1,this.quickIntervalOnly=!1,this.aggregation=!1,this.timezone=!1,this.isToolbar=!1,this.asButton=!1,this.strokedButton=!1,this.flatButton=!1,this.displayTimewindowValue=!0,this.hideLabel=!1,this.isEditValue=!1,this.tooltipPosition="above",this.panelMode=!0,this.propagateChange=f=>{}}ngOnInit(){this.updateTimewindowStyle()}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];!e.firstChange&&e.currentValue!==e.previousValue&&r==="timewindowStyle"&&(this.updateTimewindowStyle(),this.updateDisplayValue())}}toggleTimewindow(t){if(t&&t.stopPropagation(),this.disablePanel||this.timewindowDisabled)return;let r=new Ha({panelClass:"tb-timewindow-panel",backdropClass:"cdk-overlay-transparent-backdrop",hasBackdrop:!0,maxHeight:"70vh",height:"min-content"});r.positionStrategy=this.overlay.position().flexibleConnectedTo(this.nativeElement).withPositions(F$);let e=this.overlay.create(r);e.backdropClick().subscribe(()=>{e.dispose()});let i=[{provide:zw,useValue:{timewindow:Di(this.innerValue),historyOnly:this.historyOnly,forAllTimeEnabled:this.forAllTimeEnabled,quickIntervalOnly:this.quickIntervalOnly,aggregation:this.aggregation,timezone:this.timezone,isEdit:this.isEdit,panelMode:this.panelMode}},{provide:qd,useValue:e}],o=Mn.create({parent:this.viewContainerRef.injector,providers:i}),a=e.attach(new $a(ug,this.viewContainerRef,o)),s=Jn(window,"resize").subscribe(()=>{e.updatePosition()});a.onDestroy(()=>{s.unsubscribe(),a.instance.result&&(this.innerValue=a.instance.result,this.timewindowDisabled=this.isTimewindowDisabled(),this.updateDisplayValue(),this.notifyChanged())}),this.cd.detectChanges()}updateTimewindowStyle(){this.asButton||(this.computedTimewindowStyle=re(re({},O5),this.timewindowStyle||{}),this.timewindowComponentStyle=_f(this.computedTimewindowStyle.font),this.computedTimewindowStyle.color&&(this.timewindowComponentStyle.color=this.computedTimewindowStyle.color),this.timewindowIconStyle=this.computedTimewindowStyle.iconSize?rm(this.computedTimewindowStyle.iconSize):{})}onHistoryOnlyChanged(){return this.historyOnlyValue&&this.innerValue&&this.innerValue.selectedTab!==Gs.HISTORY?(this.innerValue.selectedTab=Gs.HISTORY,this.updateDisplayValue(),!0):!1}
44registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.timewindowDisabled=this.isTimewindowDisabled()}writeValue(t){this.innerValue=MS(t,this.quickIntervalOnly,this.historyOnly,this.timeService),this.timewindowDisabled=this.isTimewindowDisabled(),this.onHistoryOnlyChanged()?setTimeout(()=>{this.notifyChanged()}):this.updateDisplayValue(),this.panelMode||this.createPanel()}notifyChanged(){this.propagateChange(E5(this.innerValue))}displayValue(){return this.displayTimewindowValue?this.innerValue?.displayValue:this.translate.instant("timewindow.timewindow")}updateDisplayValue(){if(this.panelMode){if(this.innerValue.selectedTab===Gs.REALTIME&&!this.historyOnly)this.innerValue.displayValue=this.displayTypePrefix?this.translate.instant("timewindow.realtime")+" - ":"",this.innerValue.realtime.realtimeType===ia.INTERVAL?this.innerValue.displayValue+=this.translate.instant(gf.get(this.innerValue.realtime.quickInterval)):this.innerValue.displayValue+=this.translate.instant("timewindow.last-prefix")+" "+this.millisecondsToTimeStringPipe.transform(this.innerValue.realtime.timewindowMs);else if(this.innerValue.displayValue=this.displayTypePrefix&&(!this.historyOnly||this.alwaysDisplayTypePrefix)?this.translate.instant("timewindow.history")+" - ":"",this.innerValue.history.historyType===Ar.LAST_INTERVAL)this.innerValue.displayValue+=this.translate.instant("timewindow.last-prefix")+" "+this.millisecondsToTimeStringPipe.transform(this.innerValue.history.timewindowMs);else if(this.innerValue.history.historyType===Ar.INTERVAL)this.innerValue.displayValue+=this.translate.instant(gf.get(this.innerValue.history.quickInterval));else if(this.innerValue.history.historyType===Ar.FOR_ALL_TIME)this.innerValue.displayValue+=this.translate.instant("timewindow.for-all-time");else{let t=this.datePipe.transform(this.innerValue.history.fixedTimewindow.startTimeMs,"yyyy-MM-dd HH:mm:ss"),r=this.datePipe.transform(this.innerValue.history.fixedTimewindow.endTimeMs,"yyyy-MM-dd HH:mm:ss");this.innerValue.displayValue+=this.translate.instant("timewindow.period",{startTime:t,endTime:r})}De(this.innerValue.timezone)&&this.innerValue.timezone!==""?(this.innerValue.displayValue+=" ",this.innerValue.displayTimezoneAbbr=bf(this.innerValue.timezone).abbr):this.innerValue.displayTimezoneAbbr="",this.cd.detectChanges()}}isTimewindowDisabled(){return this.disabled||!this.isEdit&&(!this.innerValue||(this.innerValue.realtime?.hideInterval&&this.innerValue.history?.hideInterval||this.innerValue.realtime?.hideLastInterval&&this.innerValue.realtime?.hideQuickInterval&&this.innerValue.history?.hideLastInterval&&this.innerValue.history?.hideFixedInterval&&this.innerValue.history?.hideQuickInterval)&&(!this.aggregation||this.innerValue.hideAggregation&&this.innerValue.hideAggInterval)&&(!this.timezone||this.innerValue.hideTimezone))}createPanel(){this.panelContainer.clear();let t={timewindow:Di(this.innerValue),historyOnly:this.historyOnly,forAllTimeEnabled:this.forAllTimeEnabled,quickIntervalOnly:this.quickIntervalOnly,aggregation:this.aggregation,timezone:this.timezone,isEdit:this.isEdit,panelMode:this.panelMode},r=Mn.create({providers:[{provide:zw,useValue:t}],parent:this.viewContainerRef.injector});this.panelContainer.createComponent(ug,{index:0,injector:r}).instance.changeTimewindow.pipe(yi(this.destroyRef)).subscribe(i=>{this.innerValue=i,this.timewindowDisabled=this.isTimewindowDisabled(),this.notifyChanged()})}};hg.\u0275fac=function(r){return new(r||hg)(h(Vr),h(Ge),h(ba),h(lm),h(pb),h(Me),h(ge),h(ci),h(En))},hg.\u0275cmp=L({type:hg,selectors:[["tb-timewindow"]],viewQuery:function(r,e){if(r&1&&ae(xle,7,ci),r&2){let i;Q(i=K())&&(e.panelContainer=i.first)}},hostVars:2,hostBindings:function(r,e){r&2&&Y("no-margin",e.noMargin)},inputs:{historyOnly:"historyOnly",noMargin:"noMargin",noPadding:"noPadding",disablePanel:"disablePanel",forAllTimeEnabled:"forAllTimeEnabled",alwaysDisplayTypePrefix:"alwaysDisplayTypePrefix",quickIntervalOnly:"quickIntervalOnly",aggregation:"aggregation",timezone:"timezone",isToolbar:"isToolbar",asButton:"asButton",strokedButton:"strokedButton",flatButton:"flatButton",displayTimewindowValue:"displayTimewindowValue",hideLabel:"hideLabel",isEdit:"isEdit",tooltipPosition:"tooltipPosition",timewindowStyle:"timewindowStyle",disabled:"disabled",panelMode:"panelMode"},features:[ne([{provide:ye,useExisting:he(()=>hg),multi:!0}]),lt],decls:6,vars:4,consts:[["panelContainer",""],["type","button","mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["type","button","mat-stroked-button","","color","primary",3,"disabled","click",4,"ngIf"],["type","button","mat-button","",3,"disabled","click",4,"ngIf"],["class","tb-timewindow",3,"class","matTooltip","matTooltipPosition","matTooltipDisabled","style","click",4,"ngIf"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],[1,"material-icons"],["type","button","mat-stroked-button","","color","primary",3,"click","disabled"],["type","button","mat-button","",3,"click","disabled"],[1,"tb-timewindow",3,"click","matTooltip","matTooltipPosition","matTooltipDisabled"],[3,"style",4,"ngIf"],[1,"tb-timewindow-label"],[1,"timezone-abbr"]],template:function(r,e){r&1&&
44(x(0,Tle,5,2,"button",1)(1,Ele,5,2,"button",2)(2,Ile,5,2,"button",3)(3,Mle,10,19,"section",4),Ti(4,null,0)),r&2&&(m("ngIf",e.asButton&&e.panelMode&&!e.strokedButton&&!e.flatButton),l(),m("ngIf",e.asButton&&e.panelMode&&e.strokedButton),l(),m("ngIf",e.asButton&&e.panelMode&&e.flatButton),l(),m("ngIf",!e.asButton&&e.panelMode))},dependencies:[ce,yt,Se,zt,In,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{min-width:48px;margin:8px 0;max-width:100%}.no-margin[_nghost-%COMP%]{margin:0}[_nghost-%COMP%]   .mdc-button[_ngcontent-%COMP%]{max-width:100%}[_nghost-%COMP%]   section.tb-timewindow[_ngcontent-%COMP%]{padding:0 8px;line-height:32px;pointer-events:all;cursor:pointer;display:flex;flex-direction:row;place-content:center flex-start;align-items:center;gap:4px;width:100%}[_nghost-%COMP%]   section.tb-timewindow.no-padding[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   section.tb-timewindow[_ngcontent-%COMP%]   .tb-timewindow-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%]   section.tb-timewindow[_ngcontent-%COMP%]   .timezone-abbr[_ngcontent-%COMP%]{font-weight:500}[_nghost-%COMP%]     .mdc-button .mat-icon{min-width:24px}[_nghost-%COMP%]     .mdc-button .mdc-button__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}']});var Ko=hg;pe([fe(),le("design:type",Object)],Ko.prototype,"noMargin",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"noPadding",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"disablePanel",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"forAllTimeEnabled",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"alwaysDisplayTypePrefix",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"quickIntervalOnly",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"aggregation",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"timezone",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"isToolbar",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"asButton",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"strokedButton",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"flatButton",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"displayTimewindowValue",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"hideLabel",void 0);pe([fe(),le("design:type",Boolean)],Ko.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],Ko.prototype,"panelMode",void 0);var Ole={};Ae(Ole,{EnumToArrayPipe:()=>$w});y();var $w=(()=>{let t=class t{transform(e){let i=Object.keys(e);return i.slice(i.length/2)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"enumToArray",type:t,pure:!0});let n=t;return n})();y();y();var U$=new tt("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var ZE=(()=>{class n{constructor(r,e,i){this.ngZone=r,this.document=e,this.window=i,this.copySubject=ne
44w Te,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(r){this.config=r}copy(r){if(!this.isSupported||!r)return this.pushCopyResponse({isSuccess:!1,content:r});let e=this.copyFromContent(r);return e?this.pushCopyResponse({content:r,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:r})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(r){if(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement){if(r.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(r,e=!0){try{this.selectTarget(r);let i=this.copyText();return this.clearSelection(e?r:void 0,this.window),i&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let r=this.window.clipboardData;return!(r&&r.getData&&!r.getData("Text"))}copyFromContent(r,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=r;let i=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),i}destroy(r=this.document.body){this.tempTextArea&&(r.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(r){return r.select(),r.setSelectionRange(0,r.value.length),r.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(r,e){r&&r.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(r,e){let i=r.documentElement.getAttribute("dir")==="rtl",o;o=r.createElement("textarea"),o.style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[i?"right":"left"]="-9999px";let a=e.pageYOffset||r.documentElement.scrollTop;return o.style.top=a+"px",o.setAttribute("readonly",""),o}pushCopyResponse(r){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(r)})}pushCopyReponse(r){this.pushCopyResponse(r)}}return n.\u0275fac=function(r){return new(r||n)(X(Bt),X(Qi),X(U$,8))},n.\u0275prov=we({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),H$=(()=>{class n{constructor(r,e,i,o){this.ngZone=r,this.host=e,this.renderer=i,this.clipboardSrv=o,this.cbOnSuccess=new J,this.cbOnError=new J,this.onClick=a=>{this.clipboardSrv.isSupported?this.targetElm&&this.clipboardSrv.isTargetValid(this.targetElm)?this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm),this.targetElm.value,a):this.cbContent&&this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent,this.container),this.cbContent,a):this.handleResult(!1,void 0,a)}}ngOnInit(){this.ngZone.runOutsideAngular(()=>{this.clickListener=this.renderer.listen(this.host.nativeElement,"click",this.onClick)})}ngOnDestroy(){this.clickListener&&this.clickListener(),this.clipboardSrv.destroy(this.container)}handleResult(r,e,i){let o={isSuccess:r,content:e,successMessage:this.cbSuccessMsg,event:i};r?this.cbOnSuccess.observed&&this.ngZone.run(()=>{this.cbOnSuccess.emit(o)}):this.cbOnError.observed&&this.ngZone.run(()=>{this.cbOnError.emit(o)}),this.clipboardSrv.pushCopyResponse(o)}}return n.\u0275fac=function(r){return new(r||n)(h(Bt),h(ge),h(Ni),h(ZE))},n.\u0275dir=_e({type:n,selectors:[["","ngxClipboard",""]],inputs:{targetElm:[0,"ngxClipboard","targetElm"],container:"container",cbContent:"cbContent",cbSuccessMsg:"cbSuccessMsg"},outputs:{cbOnSuccess:"cbOnSuccess",cbOnError:"cbOnError"}}),n})(),q$=(()=>{class n{constructor(r,e,i){this._clipboardService=r,this._viewContainerRef=e,this._templateRef=i}ngOnInit(){this._clipboardService.isSupported&&this._viewContainerRef.createEmbeddedView(this._templateRef)}}return n.\u0275fac=function(r){return new(r||n)(h(ZE),h(ci),h(an))},n.\u0275dir=_e({type:n,selectors:[["","ngxClipboardIfSupported",""]]}),n})(),Uw=(()=>{class n{}return n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=Vt({type:n,declarations:[H$,q$],imports:[zi],exports:[H$,q$]}),n.\u0275inj=Nt({imports:[zi]}),n})();var rce={};Ae(rce,{ValueInputComponent:()=>sp});y();var zle={};Ae(zle,{JsonObjectEditDialogComponent:()=>ev});y();var iR={};Ae(iR,{JsonObjectEditComponent:()=>Ec,jsonRequired:()=>Gle});y();y();var es=(()=>{let t=class t{constructor(e,i){this.window=e,this.ngZone=i;let o=e.requestAnimationFrame||e.webkitRequestAnimationFrame,a=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame;this.rafSupported=!!o,this.rafSupported?this.rafFunction=s=>{let c=o(s);return()=>{a(c)}}:this.rafFunction=s=>{let c=setTimeout(s,16.66);return()=>{clearTimeout(c)}}}raf(e,i=!1){return i?this.rafFunction(e):this.ngZone.runOutsideAngular(()=>this.rafFunction(e))}};t.\u0275fac=function(i){return new(i||t)(X(Wr),X(Bt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var W$=!1,JP,eR;function Rle(){if(W$)return Z(null);{let n=[];return n.push(Yn(import("./chunk-PON64C7K.js"))),n.push(Yn(import("./chunk-PNR3CFLQ.js"))),n.push(Yn(import("./chunk-CWFRY26U.js"))),n.push(Yn(import("./chunk-B46CACFH.js"))),n.push(Yn(import("./chunk-2EX7JH7K.js"))),n.push(Yn(import("./chunk-Z5RRKKJ6.js"))),n.push(Yn(import("./chunk-X237DAL5.js"))),n.push(Yn(import("./chunk-KVSOE52O.js"))),n.push(Yn(import("./chunk-BS6ELDZ3.js"))),n.push(Yn(import("./chunk-Z2T36XDS.js"))),n.push(Yn(import("./chunk-MS6YKBQN.js"))),n.push(Yn(import("./chunk-YJO2FLQP.js"))),n.push(Yn(import("./chunk-R2QVVEF2.js"))),n.push(Yn(import("./chunk-UHPOYON5.js"))),n.push(Yn(import("./chunk-P66BOYQC.js"))),n.push(Yn(import("./chunk-PA4NHBHF.js"))),n.push(Yn(import("./chunk-5NMRZJDE.js"))),n.push(Yn(import("./chunk-PXATJLZY.js"))),n.push(Yn(import("./chunk-KCWVFJ3F.js"))),n.push(Yn(import("./chunk-DTSQB6QA.js"))),n.push(Yn(import("./chunk-Q2WJX5HF.js"))),n.push(Yn(import("./chunk-PQQHUK7H.js"))),n.push(Yn(import("./chunk-JFZW425M.js"))),n.push(Yn(import("./chunk-N2AU6QTN.js"))),n.push(Yn(import("./chunk-JLWVUSIB.js"))),n.push(Yn(import("./chunk-SNJK47MF.js"))),n.push(Yn(import("./chunk-OPCHNGAW.js"))),Rn(n).pipe(et(()=>{W$=!0}))}}function da(){return JP?Z(JP):Yn(import("./chunk-MW3P7HQV.js")).pipe(Ft(n=>Rle().pipe(W(()=>Jp(n)))),et(n=>{JP=n}))}function _dt(){return eR?Z(eR):da().pipe(Ft(n=>Yn(import("./chunk-4J5ZBS2E.js")).pipe(W(t=>Jp(t)))),et(n=>{eR=n}))}var JE=class n{constructor(t,r,e,i){this.start={row:t,column:r},this.end={row:e,column:i}}static fromPoints(t,r){return new n(t.row,t.column,r.row,r.column)}clipRows(t,r){let e,i;return this.end.row>r?e={row:r+1,column:0}:this.end.row<t&&(e={row:t,column:0}),this.start.row>r?i={row:r+1,column:0}:this.start.row<t&&(i={row:t,column:0}),n.fromPoints(i||this.start,e||this.end)}clone(){return n.fromPoints(this.start,this.end)}collapseRows(){return this.end.column===0?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)}compare(t,r){return!this.isMultiLine()&&t===this.start.row?r<this.start.column?-1:r>this.end.column?1:0:t<this.start.row?-1:t>this.end.row?1:this.start.row===t?r>=this.start.column?0:-1:this.end.row===t?r<=this.end.column?0:1:0}compareEnd(t,r){return this.end.row===t&&this.end.column===r?1:this.compare(t,r)}compareInside(t,r){return this.end.row===t&&this.end.column===r?1:this.start.row===t&&this.start.column===r?-1:this.compare(t,r)}comparePoint(t){return this.compare(t.row,t.column)}compareRange(t){let r,e=t.end,i=t.start;return r=this.compare(e.row,e.column),r===1?(r=this.compare(i.row,i.column),r===1?2:r===0?1:0):r===-1?-2:(r=this.compare(i.row,i.column),r===-1?-1:r===1?42:0)}compareStart(t,r){return this.start.row===t&&this.start.column===r?-1:this.compare(t,r)}contains(t,r){return this.compare(t,r)===0}containsRange(t){return this.comparePoint(t.start)===0&&this.comparePoint(t.end)===0}extend(t,r){let e=this.compare(t,r),i,o;return e===0?this:(e===-1?o={row:t,column:r}:i={row:t,column:r},n.fromPoints(o||this.start,i||this.end))}inside(t,r){return this.compare(t,r)===0?!(this.isEnd(t,r)||this.isStart(t,r)):!1}insideEnd(t,r){return this.compare(t,r)===0?!this.isStart(t,r):!1}insideStart(t,r){return this.compare(t,r)===0?!this.isEnd(t,r):!1}intersects(t){let r=this.compareRange(t);return r===-1||r===0||r===1}isEmpty(){return this.start.row===this.end.row&&this.start.column===this.end.column}isEnd(t,r){return this.end.row===t&&this.end.column===r}isEqual(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column}isMultiLine(){return this.start.row!==this.end.row}isStart(t,r){return this.start.row===t&&this.start.column===r}moveBy(t,r){this.start.row+=t,this.start.column+=r,this.end.row+=t,this.end.column+=r}setEnd(t,r){typeof t=="object"?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=r)}setStart(t,r){typeof t=="object"?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=r)}toScreenRange(t){let r=t.documentToScreenPosition(this.start),e=t.documentToScreenPosition(this.end);return new n(r.row,r.column,e.row,e.column)}},vdt={token:"punctuation.operator",regex:/[.](?![.])/},ydt={regex:"",token:"empty",next:"no_regex"};var Om={};Ae(Om,{FullscreenDirective:()=>xa});y();var xa=(()=>{let t=class t{constructor(e,i,o,a){this.elementRef=e,this.renderer=i,this.sanitizer=o,this.overlay=a,this.fullscreenValue=!1,this.fullscreenChanged=new J}ngOnChanges(e){let i=!1;for(let o of Object.keys(e)){let a=e[o];!a.firstChange&&a.currentValue!==a.previousValue&&o==="fullscreen"&&(i=!0)}i&&(this.fullscreen?this.enterFullscreen():this.exitFullscreen())}ngOnDestroy(){this.fullscreen&&this.exitFullscreen()}enterFullscreen(){let e=this.fullscreenElement||this.elementRef.nativeElement;this.parentElement=e.parentElement,this.parentElement.removeChild(e),e.classList.add("tb-fullscreen");let i=this.overlay.position(),o=new Ha({hasBackdrop:!1,panelClass:"tb-fullscreen-parent"});if(o.minWidth="100%",o.minHeight="100%",o.positionStrategy=i.global().top("0%").left("0%").right("0%").bottom("0%"),this.overlayRef=this.overlay.create(o),this.overlayRef.attach(new tR),this.fullscreenBackgroun
44dStyle)for(let a of Object.keys(this.fullscreenBackgroundStyle))this.setStyle(this.overlayRef.overlayElement,a,this.fullscreenBackgroundStyle[a]);this.fullscreenBackgroundImage&&this.setStyle(this.overlayRef.overlayElement,"backgroundImage",this.fullscreenBackgroundImage),this.overlayRef.overlayElement.appendChild(e),this.fullscreenChanged.emit(!0)}setStyle(e,i,o){let[a,s]=i.split("."),c=this.sanitizer.sanitize(ob.STYLE,o);c!=null&&(c=c.toString()),c=c!=null&&s?`${c}${s}`:c,c!=null?this.renderer.setStyle(this.overlayRef.overlayElement,a,c):this.renderer.removeStyle(this.overlayRef.overlayElement,a)}exitFullscreen(){let e=this.fullscreenElement||this.elementRef.nativeElement;this.parentElement&&(this.overlayRef.overlayElement.removeChild(e),this.parentElement.appendChild(e),this.parentElement=null),e.classList.remove("tb-fullscreen"),this.elementRef&&this.elementRef.nativeElement.classList.remove("tb-fullscreen"),this.overlayRef&&this.overlayRef.dispose(),this.fullscreenChanged.emit(!1)}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Ni),h(js),h(Vr))},t.\u0275dir=_e({type:t,selectors:[["","tb-fullscreen",""]],inputs:{fullscreen:"fullscreen",fullscreenElement:"fullscreenElement",fullscreenBackgroundStyle:"fullscreenBackgroundStyle",fullscreenBackgroundImage:"fullscreenBackgroundImage"},outputs:{fullscreenChanged:"fullscreenChanged"},features:[lt]});let n=t;return n})(),tR=class extends $a{constructor(){super(Zu)}};var Fle=["jsonEditor"],Nle=[[["","toolbarSuffixButton",""]]],Vle=["[toolbarSuffixButton]"],Lle=(n,t,r)=>({"tb-required":n,"tb-readonly":t,"tb-error":r});function Ble(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.beautifyJSON())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.tidy")," "))}function jle(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.minifyJSON())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.mini")," "))}var Gle=n=>n.value?null:{required:!0},th=class th{constructor(t,r,e,i){this.elementRef=t,this.store=r,this.raf=e,this.cd=i,this.position="relative",this.toastTargetId=`jsonObjectEditor-${Zr()}`,this.fullscreen=!1,this.errorShowed=!1,this.ignoreChange=!1,this.propagateChange=null}ngOnInit(){let t=this.jsonEditorElmRef.nativeElement,r={mode:"ace/mode/json",showGutter:!0,showPrintMargin:!1,readOnly:this.disabled||this.readonly},e={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};r=re(re({},r),e),da().subscribe(i=>{this.jsonEditor=i.edit(t,r),this.jsonEditor.session.setUseWrapMode(!1),this.jsonEditor.setValue(this.contentValue?this.contentValue:"",-1),this.jsonEditor.setReadOnly(this.disabled||this.readonly),this.jsonEditor.on("change",()=>{this.ignoreChange||(this.cleanupJsonErrors(),this.updateView())}),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(t)})}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.jsonEditor&&this.jsonEditor.destroy()}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.jsonEditor.resize(),this.jsonEditor.renderer.updateFull()})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.jsonEditor&&this.jsonEditor.setReadOnly(this.disabled||this.readonly)}validate(t){return this.objectValid?null:{jsonParseError:{valid:!1}}}validateOnSubmit(){!this.disabled&&!this.readonly&&(this.cleanupJsonErrors(),this.objectValid||(this.store.dispatch(new Sr({message:this.validationError,type:"error",target:this.toastTargetId,verticalPosition:"bottom",horizontalPosition:"left"})),this.errorShowed=!0))}cleanupJsonErrors(){this.errorShowed&&(this.store.dispatch(new Mb({target:this.toastTargetId})),this.errorShowed=!1)}beautifyJSON(){if(this.jsonEditor&&this.objectValid){let t=JSON.stringify(this.modelValue,null,2);this.jsonEditor.setValue(t||"",-1),this.updateView()}}minifyJSON(){if(this.jsonEditor&&this.objectValid){let t=JSON.stringify(this.modelValue);this.jsonEditor.setValue(t||"",-1),this.updateView()}}writeValue(t){this.modelValue=t,this.contentValue="",this.objectValid=!1;try{De(this.modelValue)?(this.contentValue=JSON.stringify(this.modelValue,Bi(this.sort)?void 0:(r,e)=>this.sort(r,e),2),this.objectValid=!0):(this.objectValid=!this.jsonRequired,this.validationError="Json object is required.")}catch{}this.jsonEditor&&(this.ignoreChange=!0,this.jsonEditor.setValue(this.contentValue?this.contentValue:"",-1),this.ignoreChange=!1)}updateView(){let t=this.jsonEditor.getValue();if(this.contentValue!==t){this.contentValue=t;let r=null;if(this.objectValid=!1,this.contentValue&&this.contentValue.length>0)try{if(r=JSON.parse(this.contentValue),!Co(r))throw new TypeError("Value is not a valid JSON");this.objectValid=!0,this.validationError=""}catch(e){let i="Error:";e.name&&(i+=" "+e.name+":"),e.message&&(i+=" "+e.message),this.validationError=i}else this.objectValid=!this.jsonRequired,this.validationError=this.jsonRequired?"Json object is required.":"";
44this.modelValue=r,this.propagateChange(r),this.cd.markForCheck()}}onFullscreen(){this.jsonEditor&&setTimeout(()=>{this.jsonEditor.resize()},0)}};th.\u0275fac=function(r){return new(r||th)(h(ge),h(ve),h(es),h(Me))},th.\u0275cmp=L({type:th,selectors:[["tb-json-object-edit"]],viewQuery:function(r,e){if(r&1&&ae(Fle,7),r&2){let i;Q(i=K())&&(e.jsonEditorElmRef=i.first)}},hostVars:2,hostBindings:function(r,e){r&2&&hi("position",e.position)},inputs:{label:"label",disabled:"disabled",fillHeight:"fillHeight",editorStyle:"editorStyle",sort:"sort",jsonRequired:"jsonRequired",readonly:"readonly"},features:[ne([{provide:ye,useExisting:he(()=>th),multi:!0},{provide:zn,useExisting:he(()=>th),multi:!0}])],ngContentSelectors:Vle,decls:15,vars:21,consts:[["jsonEditor",""],["tb-fullscreen","",1,"tb-json-object","flex","flex-col",2,"background","#fff",3,"fullscreenChanged","fullscreen"],[1,"tb-json-object-toolbar","flex","flex-row","items-center","justify-start"],[1,"tb-title","no-padding"],[1,"flex-1"],["type","button","mat-button","","class","tidy",3,"click",4,"ngIf"],["mat-icon-button","","matTooltipPosition","above",1,"tb-mat-32",3,"click","matTooltip"],[1,"material-icons"],["id","tb-json-panel","tb-toast","",1,"tb-json-object-panel","flex","flex-col",3,"toastTarget"],["id","tb-json-input"],["type","button","mat-button","",1,"tidy",3,"click"]],template:function(r,e){if(r&1){let i=B();Ct(Nle),d(0,"div",1),T("fullscreenChanged",function(){return D(i),M(e.onFullscreen())}),d(1,"div",2)(2,"label",3),g(3),p(),O(4,"span",4),x(5,Ble,3,3,"button",5)(6,jle,3,3,"button",5),Fe(7),d(8,"button",6),v(9,"translate"),T("click",function(){return D(i),M(e.fullscreen=!e.fullscreen)}),d(10,"mat-icon",7),g(11),p()()(),d(12,"div",8),O(13,"div",9,0),p()()}r&2&&(Y("fill-height",e.fillHeight),m("fullscreen",e.fullscreen),l(2),bt(rl(17,Lle,e.jsonRequired,e.readonly,!e.objectValid)),l(),z(e.label),l(2),m("ngIf",!e.readonly&&!e.disabled),l(),m("ngIf",!e.readonly&&!e.disabled),l(2),te("matTooltip",C(9,15,e.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(3),z(e.fullscreen?"fullscreen_exit":"fullscreen"),l(),te("toastTarget",e.toastTargetId),l(),_n(e.editorStyle),Y("fill-height",e.fillHeight))},dependencies:[ce,yt,Pe,Se,zt,xs,xa,be],styles:[`@charset "UTF-8";.tb-json-object{position:relative}.tb-json-object.fill-height{height:100%}.tb-json-object .tb-json-object-toolbar button.mat-mdc-button-base,.tb-json-object .tb-json-object-toolbar button.mat-mdc-button-base.tb-mat-32{align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;margin:0;font-size:.8rem;line-height:15px;color:#7b7b7b;background:#dcdcdc59}.tb-json-object .tb-json-object-toolbar button.mat-mdc-button-base:not(:last-child),.tb-json-object .tb-json-object-toolbar button.mat-mdc-button-base.tb-mat-32:not(:last-child){margin-right:4px}.tb-json-object .tb-json-object-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.tb-json-object .tb-json-object-panel{height:100%;margin-left:15px;border:1px solid #c0c0c0}.tb-json-object .tb-json-object-panel #tb-json-input{width:100%;
44min-width:200px;height:100%;min-height:300px}.tb-json-object .tb-json-object-panel #tb-json-input:not(.fill-height){min-height:200px}
45`],encapsulation:2});var Ec=th;pe([fe(),le("design:type",Boolean)],Ec.prototype,"jsonRequired",void 0);pe([fe(),le("design:type",Boolean)],Ec.prototype,"readonly",void 0);var ev=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.fb=s,this.translate=c,this.title=this.translate.instant("details.edit-json"),this.saveButtonLabel=this.translate.instant("action.save"),this.cancelButtonLabel=this.translate.instant("action.cancel"),this.required=this.data.required===!0,fn(this.data.title)&&(this.title=this.data.title),fn(this.data.saveLabel)&&(this.saveButtonLabel=this.data.saveLabel),fn(this.data.cancelLabel)&&(this.cancelButtonLabel=this.data.cancelLabel),this.jsonFormGroup=this.fb.group({json:[this.data.jsonValue,[]]})}cancel(){this.dialogRef.close(void 0)}add(){this.dialogRef.close(this.jsonFormGroup.get("json").value)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en),h(Ai),h(Ge))},t.\u0275cmp=L({type:t,selectors:[["tb-object-edit-dialog"]],features:[Ce],decls:18,vars:10,consts:[[1,"h-full",2,"min-width","400px",3,"ngSubmit","formGroup"],["color","primary",1,"flex","flex-row"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],[2,"height","4px"],["mat-dialog-content","",1,"flex-1"],["formControlName","json",1,"block","h-full",3,"label","jsonRequired","fillHeight"],["mat-dialog-actions","",1,"flex","flex-row","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click"],["mat-button","","mat-raised-button","","color","primary","type","submit",3,"disabled"]],template:function(i,o){i&1&&(d(0,"form",0),T("ngSubmit",function(){return o.add()}),d(1,"mat-toolbar",1)(2,"h2"),g(3),p(),O(4,"span",2),d(5,"button",3),T("click",function(){return o.cancel()}),d(6,"mat-icon",4),g(7,"close"),p()()(),O(8,"div",5),d(9,"div",6),O(10,"tb-json-object-edit",7),v(11,"translate"),p(),d(12,"div",8),O(13,"span",2),d(14,"button",9),T("click",function(){return o.cancel()}),g(15),p(),d(16,"button",10),g(17),p()()()),i&2&&(m("formGroup",o.jsonFormGroup),l(3),z(o.title),l(7),te("label",C(11,8,"value.json-value")),m("jsonRequired",o.required)("fillHeight",o.data.fillHeight),l(5),j(" ",o.cancelButtonLabel," "),l(),m("disabled",o.jsonFormGroup.invalid||!o.jsonFormGroup.dirty),l(),j(" ",o.saveButtonLabel," "))},dependencies:[yt,Pe,Se,ir,gr,Dn,ur,xe,We,$e,Qe,Ec,be],encapsulation:2});let n=t;return n})();var Y$={};Ae(Y$,{TbJsonToStringDirective:()=>tv});y();var tv=(()=>{let t=class t{input(e){try{e?(this.data=JSON.parse(e),Co(this.data)?this.parseError=!1:(this.data=null,this.parseError=!0)):(this.data=null,this.parseError=!1)}catch{this.data=null,this.parseError=!0}this.propagateChange(this.data)}constructor(e,i,o){this.render=e,this.element=i,this.errorStateMatcher=o,this.prop
45agateChange=null,this.onTouched=()=>{}}isErrorState(e,i){return!!(e&&e.invalid&&!Array.isArray(e.value)&&e.touched)}validate(e){return this.parseError?{invalidJSON:{valid:!1}}:null}writeValue(e){this.data=e,this.parseError=!1,this.render.setProperty(this.element.nativeElement,"value",e?JSON.stringify(e):"")}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){this.onTouched=e}};t.\u0275fac=function(i){return new(i||t)(h(Ni),h(ge),h(Nn,4))},t.\u0275dir=_e({type:t,selectors:[["","tb-json-to-string",""]],hostBindings:function(i,o){i&1&&T("blur",function(){return o.onTouched()})("input",function(s){return o.input(s.target.value)})},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0},{provide:Nn,useExisting:t}])]});let n=t;return n})();var $le=["inputForm"];function Ule(n,t){if(n&1&&(d(0,"mat-option",13),O(1,"mat-icon",14),d(2,"span"),g(3),v(4,"translate"),p()()),n&2){let r=t.$implicit,e=b(2);m("value",r),l(),te("svgIcon",e.valueTypes.get(e.valueTypeEnum[r]).icon),l(2),z(C(4,3,e.valueTypes.get(e.valueTypeEnum[r]).name))}}function Hle(n,t){if(n&1){let r=B();d(0,"mat-form-field",8)(1,"mat-select",9),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.valueType,i)||(o.valueType=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.onValueTypeChanged())}),d(2,"mat-select-trigger")(3,"div",10),O(4,"mat-icon",11),d(5,"span"),g(6),v(7,"translate"),p()()(),x(8,Ule,5,5,"mat-option",12),p()()}if(n&2){let r=b();bt(r.computedLayout),l(),m("disabled",r.disabled),fi("ngModel",r.valueType),l(3),te("svgIcon",r.valueTypes.get(r.valueType).icon),l(2),z(C(7,7,r.valueTypes.get(r.valueType).name)),l(2),m("ngForOf",r.valueTypeKeys)}}function qle(n,t){if(n&1&&(d(0,"mat-icon",18),v(1,"translate"),g(2," warning "),p()),n&2){let r=b
45(2);m("matTooltip",C(1,1,r.requiredText?r.requiredText:"value.string-value-required"))}}function Wle(n,t){if(n&1){let r=B();d(0,"mat-form-field",15)(1,"input",16,1),v(3,"translate"),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.modelValue,i)||(o.modelValue=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.onValueChanged())}),p(),x(4,qle,3,3,"mat-icon",17),p()}if(n&2){let r=me(2),e=b();l(),Hy("placeholder","",C(3,7,"value.string-value"),"",e.required&&!e.stringNotRequired?"*":"",""),m("disabled",e.disabled)("required",e.required&&!e.stringNotRequired),fi("ngModel",e.modelValue),l(3),m("ngIf",r.hasError("required")&&r.control.touched)}}function Yle(n,t){if(n&1&&(d(0,"mat-icon",18),v(1,"translate"),v(2,"translate"),g(3," warning "),p()),n&2){b();let r=me(2),e=b();m("matTooltip",r.hasError("required")?C(1,1,e.requiredText?e.requiredText:"value.integer-value-required"):C(2,3,"value.invalid-integer-value"))}}function Qle(n,t){if(n&1){let r=B();d(0,"mat-form-field",19)(1,"input",20,1),v(3,"translate"),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.modelValue,i)||(o.modelValue=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.onValueChanged())}),p(),x(4,Yle,4,5,"mat-icon",17),p()}if(n&2){let r=me(2),e=b();l(),Hy("placeholder","",C(3,7,"value.integer-value"),"",e.required?"*":"",""),m("disabled",e.disabled)("required",e.required),fi("ngModel",e.modelValue),l(3),m("ngIf",r.control.invalid&&r.control.touched)}}function Kle(n,t){if(n&1&&(d(0,"mat-icon",18),v(1,"translate"),g(2," warning "),p()),n&2){let r=b
45(2);m("matTooltip",C(1,1,r.requiredText?r.requiredText:"value.double-value-required"))}}function Xle(n,t){if(n&1){let r=B();d(0,"mat-form-field",19)(1,"input",21,1),v(3,"translate"),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.modelValue,i)||(o.modelValue=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.onValueChanged())}),p(),x(4,Kle,3,3,"mat-icon",17),p()}if(n&2){let r=me(2),e=b();l(),Hy("placeholder","",C(3,7,"value.double-value"),"",e.required?"*":"",""),m("disabled",e.disabled)("required",e.required),fi("ngModel",e.modelValue),l(3),m("ngIf",r.hasError("required")&&r.control.touched)}}function Zle(n,t){if(n&1){let r=B();d(0,"mat-chip-listbox",24,1),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.modelValue,i)||(o.modelValue=i),M(i)}),T("ngModelChange",function(){D(r);let i=b(2);return M(i.onValueChanged())}),d(2,"mat-chip-option",25),g(3),p(),d(4,"mat-chip-option",25),g(5),p()()}if(n&2){let r=b(2);m("disabled",r.disabled),fi("ngModel",r.modelValue),l(2),m("selectable",!r.modelValue)("value",!0),l(),z(r.trueLabel),l(),m("selectable",r.modelValue)("value",!1),l(),z(r.falseLabel)}}function Jle(n,t){if(n&1){let r=B();d(0,"mat-checkbox",26,1),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.modelValue,i)||(o.modelValue=i),M(i)}),T("ngModelChange",function(){D(r);let i=b(2);return M(i.onValueChanged())}),g(2),p()}if(n&2){let r=b(2);m("disabled",r.disabled),fi("ngModel",r.modelValue),l(2),j(" ",r.modelValue?r.trueLabel:r.falseLabel," ")}}function ece(n,t){if(n&1&&(pt(0),x(1,Zle,6,8,"mat-chip-listbox",22)(2,Jle,3,3,"mat-checkbox",23),ct()),n&2){let r=b
45();l(),m("ngIf",!r.shortBooleanField),l(),m("ngIf",r.shortBooleanField)}}function tce(n,t){if(n&1&&(d(0,"mat-icon",18),v(1,"translate"),v(2,"translate"),g(3," warning "),p()),n&2){b();let r=me(3),e=b();m("matTooltip",r.hasError("invalidJSON")?C(1,1,"value.json-value-invalid"):C(2,3,e.requiredText?e.requiredText:"value.json-value-required"))}}function ice(n,t){if(n&1){let r=B();d(0,"button",30),T("click",function(i){D(r);let o=b(2);return M(o.openEditJSONDialog(i))}),d(1,"mat-icon",31),g(2,"open_in_new"),p()()}}function nce(n,t){if(n&1){let r=B();d(0,"div",27)(1,"mat-form-field",15)(2,"input",28,1),v(4,"translate"),bi("ngModelChange",function(i){D(r);let o=b();return gi(o.modelValue,i)||(o.modelValue=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.onValueChanged())}),p(),x(5,tce,4,5,"mat-icon",17),p(),x(6,ice,3,0,"button",29),p()}if(n&2){let r=me(3),e=b();l(2),Hy("placeholder","",C(4,8,"value.json-value"),"",e.required?"*":"",""),m("disabled",e.disabled)("required",e.required),fi("ngModel",e.modelValue),l(3),m("ngIf",r.control.invalid&&r.control.touched),l(),m("ngIf",!e.hideJsonEdit)}}var gg=class gg{constructor(t,r,e,i){this.breakpointObserver=t,this.cd=r,this.translate=e,this.dialog=i,this.shortBooleanField=!1,this.required=!0,this.hideJsonEdit=!1,this.layout="row",this.stringNotRequired=!1,this.valueTypeEnum=co,this.valueTypeKeys=Object.keys(co),this.valueTypes=XB,this.showValueType=!0,this.propagateChange=null}ngOnInit(){if(this.trueLabel||(this.trueLabel=this.translate.instant("value.true")),this.falseLabel||(this.falseLabel=this.translate.instant("value.false")),this.allowedValueTypes?.length&&(this.valueTypeKeys=this.allowedValueTypes),this._subscription=new ln,this.showValueType=!this.valueType,this.computedLayout=this._computeLayout(),typeof this.layout=="object"&&this.layout.breakpoints){let t=Object.keys(this.layout.breakpoints);this._subscription.add(this.breakpointObserver.observe(t.map(r=>hb(r))).subscribe(()=>{this.computedLayout=this._computeLayout()}))}}ngOnChanges(t){for(let r of Object.keys(t))t[r].firstChange||r==="valueType"&&(this.showValueType=!this.valueType,this.valueType?this.updateModelToValueType():this.detectValueType(),this.cd.markForCheck())}ngOnDestroy(){this._subscription.unsubscribe()}openEditJSONDialog(t){t&&t.stopPropagation(),this.dialog.open(ev,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{jsonValue:this.modelValue,required:!0}}).afterClosed().subscribe(r=>{r&&(this.modelValue=r,this.inputForm.control.patchValue({value:this.modelValue}),this.updateView())})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.modelValue=t,this.showValueType?this.detectValueType():setTimeout(()=>{this.updateModelToValueType(),this.cd.markForCheck()},0)}updateView(){if(this.inputForm.valid||this.valueType===co.BOOLEAN||this.valueType===co.JSON&&Array.isArray(this.modelValue)){let t=this.modelValue;this.stringNotRequired&&this.valueType===co.STRING&&!t&&(t=""),this.propagateChange(t)}else this.propagateChange(null)}onValueTypeChanged(){this.valueType===co.BOOLEAN?this.modelValue=!1:this.valueType===co.JSON?(this.modelValue={},this.inputForm.form.get("value").patchValue({})):this.valueType===co.STRING&&this.stringNotRequired?this.modelValue="":this.modelValue=null,this.updateView()}onValueChanged(){this.updateView()}detectValueType(){this.modelValue===!0||this.modelValue===!1?this.valueType=co.BOOLEAN:typeof this.modelValue=="number"?this.modelValue.toString().indexOf(".")===-1?this.valueType=co.INTEGER:this.valueType=co.DOUBLE:Co(this.modelValue)?this.valueType=co.JSON:this.valueType=co.STRING}updateModelToValueType(){this.valueType===co.BOOLEAN&&typeof this.modelValue!="boolean"?(this.modelValue=!!this.modelValue,this.updateView()):this.valueType===co.STRING&&typeof this.modelValue!="string"?(this.modelValue=null,this.updateView()):[co.DOUBLE,co.INTEGER].includes(this.valueType)&&typeof this.modelValue!="number"?(this.modelValue=null,this.updateView()):this.valueType===co.JSON&&typeof this.modelValue!="object"&&(this.modelValue={},this.inputForm.form.get("value").patchValue({}),this.updateView())}_computeLayout(){if(typeof this.layout!="object")return this.layout;{let t=this.layout.layout;if(this.layout.breakpoints)for(let r of Object.keys(this.layout.breakpoints)){let e=hb(r);if(this.breakpointObserver.isMatched(e)){t=this.layout.breakpoints[r];break}}return t}}};gg.\u0275fac=function(r){return new(r||gg)(h(qa),h(Me),h(Ge),h(Lr))},gg.\u0275cmp=L({type:gg,selectors:[["tb-value-input"]],viewQuery:function(r,e){if(r&1&&ae($le,7),r&2){let i;Q(i=K())&&(e.inputForm=i.first)}},inputs:{disabled:"disabled",requiredText:"requiredText",valueType:"valueType",allowedValueTypes:"allowedValueTypes",trueLabel:"trueLabel",falseLabel:"falseLabel",shortBooleanField:"shortBooleanField",required:"required",hideJsonEdit:"hideJsonEdit",layout:"layout",stringNotRequired:"stringNotRequired"},features:[ne([{provide:ye,useExisting:he(()=>gg),multi:!0}]),lt],decls:9,vars:8,consts:[["inputForm","ngForm"],["value","ngModel"],[1,"flex","gap-2"],["appearance","outline","subscriptSizing","dynamic","class","tb-value-type tb-inline-field",3,"class",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","tb-inline-field tb-suffix-absolute flex flex-1",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","tb-inline-field tb-suffix-absolute number flex flex-1",4,"ngIf"],[4,"ngIf"],["class","flex flex-1 flex-row items-center justify-start gap-2",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic",1,"tb-value-type","tb-inline-field"],["name","valueType",3,"ngModelChange","disabled","ngModel"],[1,"tb-value-type-row"],[1,"tb-mat-18",3,"svgIcon"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"tb-mat-20",3,"svgIcon"],["appearance","outline","subscriptSizing","dynamic",1,"tb-inline-field","tb-suffix-absolute","flex","flex-1"],["matInput","","name","value",3,"ngModelChange","disabled","required","ngModel","placeholder"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error",3,"matTooltip",4,"ngIf"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"],["appearance","outline","subscriptSizing","dynamic",1,"tb-inline-field","tb-suffix-absolute","number","flex","flex-1"],["matInput","","name","value","type","number","step","1","pattern","^-?[0-9]+$",3,"ngModelChange","disabled","required","ngModel","placeholder"],["matInput","","name","value","type","number","step","any",3,"ngModelChange","disabled","required","ngModel","placeholder"],["class","tb-boolean-input center-stretch flex-1","name","value",3,"disabled","ngModel","ngModelChange",4,"ngIf"],["name","value",3,"disabled","ngModel","ngModelChange",4,"ngIf"],["name","value",1,"tb-boolean-input","center-stretch","flex-1",3,"ngModelChange","disabled","ngModel"],[3,"selectable","value"],["name","value",3,"ngModelChange","disabled","ngModel"],[1,"flex","flex-1","flex-row","items-center","justify-start","gap-2"],["matInput","","tb-json-to-string","","name","value",3,"ngModelChange","disabled","required","ngModel","placeholder"],["mat-icon-button","","class","tb-mat-32",3,"click",4,"ngIf"],["mat-icon-button","",1,"tb-mat-32",3,"click"],[1,"tb-mat-20"]],template:function(r,e){r&1&&
vendor: 20,693 bytes, lines 45-60
45(d(0,"form",null,0)(2,"section",2),x(3,Hle,9,9,"mat-form-field",3)(4,Wle,5,9,"mat-form-field",4)(5,Qle,5,9,"mat-form-field",5)(6,Xle,5,9,"mat-form-field",5)(7,ece,3,2,"ng-container",6)(8,nce,7,10,"div",7),p()()),r&2&&(l(2),bt(e.computedLayout==="row"?"flex-row":"flex-col"),l(),m("ngIf",e.showValueType),l(),m("ngIf",e.valueType===e.valueTypeEnum.STRING),l(),m("ngIf",e.valueType===e.valueTypeEnum.INTEGER),l(),m("ngIf",e.valueType===e.valueTypeEnum.DOUBLE),l(),m("ngIf",e.valueType===e.valueTypeEnum.BOOLEAN),l(),m("ngIf",e.valueType===e.valueTypeEnum.JSON))},dependencies:[Ke,ce,Pe,ra,Se,at,ze,Yt,Kn,Fb,xt,zt,qb,Hb,ur,ut,Au,xe,We,St,Nj,eo,Qa,tv,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-boolean-input[_ngcontent-%COMP%]{min-width:210px}[_nghost-%COMP%]     .mat-mdc-form-field.tb-value-type.row{width:140px;min-width:140px}[_nghost-%COMP%]     .mat-mdc-form-field.tb-value-type.column{flex:1;width:auto}[_nghost-%COMP%]     .mat-mdc-form-field.tb-value-type .mat-mdc-form-field-infix{max-height:40px}[_nghost-%COMP%]     .mat-mdc-form-field.tb-value-type mat-select-trigger .tb-value-type-row{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px}[_nghost-%COMP%]     .mat-mdc-form-field.tb-value-type mat-select-trigger .tb-value-type-row .mat-icon{color:#00000061;vertical-align:bottom}']});var sp=gg;pe([fe(),le("design:type",Object)],sp.prototype,"shortBooleanField",void 0);pe([fe(),le("design:type",Object)],sp.prototype,"required",void 0);pe([fe(),le("design:type",Object)],sp.prototype,"hideJsonEdit",void 0);pe([fe(),le("design:type",Object)],sp.prototype,"stringNotRequired",void 0);y();y();function oR(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vg=oR();function eU(n){vg=n}var tU=/[&<>"']/,oce=new RegExp(tU.source,"g"),iU=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ace=new RegExp(iU.source,"g"),sce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Q$=n=>sce[n];function Ul(n,t){if(t){if(tU.test(n))return n.replace(oce,Q$)}else if(iU.test(n))return n.replace(ace,Q$);return n}var lce=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function cce(n){return n.replace(lce,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}var dce=/(^|[^\[])\^/g;function uo(n,t){let r=typeof n=="string"?n:n.source;t=t||"";let e={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(dce,"$1"),r=r.replace(i,a),e},getRegex:()=>new RegExp(r,t)};return e}function K$(n){try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}var qw={exec:()=>null};function X$(n,t){let r=n.replace(/\|/g,(o,a,s)=>{let c=!1,u=a;for(;--u>=0&&s[u]==="\\";)c=!c;return c?"|":" |"}),e=r.split(/ \|/),i=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),t)if(e.length>t)e.splice(t);else for(;e.length<t;)e.push("");for(;i<e.length;i++)e[i]=e[i].trim().replace(/\\\|/g,"|");return e}function eI(n,t,r){let e=n.length;if(e===0)return"";let i=0;for(;i<e;){let o=n.charAt(e-i-1);if(o===t&&!r)i++;else if(o!==t&&r)i++;else break}return n.slice(0,e-i)}function pce(n,t){if(n.indexOf(t[1])===-1)return-1;let r=0;for(let e=0;e<n.length;e++)if(n[e]==="\\")e++;else if(n[e]===t[0])r++;else if(n[e]===t[1]&&(r--,r<0))return e;return-1}function Z$(n,t,r,e){let i=t.href,o=t.title?Ul(t.title):null,a=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){e.state.inLink=!0;let s={type:"link",raw:r,href:i,title:o,text:a,tokens:e.inlineTokens(a)};return e.state.inLink=!1,s}return{type:"image",raw:r,href:i,title:o,text:Ul(a)}}function mce(n,t){let r=n.match(/^(\s+)(?:```)/);if(r===null)return t;let e=r[1];return t.split(`
46`).map(i=>{let o=i.match(/^\s+/);if(o===null)return i;let[a]=o;return a.length>=e.length?i.slice(e.length):i}).join(`
47`)}var iv=class{constructor(t){se(this,"options");se(this,"rules");se(this,"lexer");this.options=t||vg}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let e=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?e:eI(e,`
48`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let e=r[0],i=mce(e,r[3]||"");return{type:"code",raw:e,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let e=r[2].trim();if(/#$/.test(e)){let i=eI(e,"#");(this.options.pedantic||!i||/ $/.test(i))&&(e=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let e=r[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
49    $1`);e=eI(e.replace(/^ *>[ \t]?/gm,""),`
50`);let i=this.lexer.state.top;this.lexer.state.top=!0;let o=this.lexer.blockTokens(e);return this.lexer.state.top=i,{type:"blockquote",raw:r[0],tokens:o,text:e}}}list(t){let r=this.rules.block.list.exec(t);if(r){let e=r[1].trim(),i=e.length>1,o={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let a=new RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),s="",c="",u=!1;for(;t;){let f=!1;if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;s=r[0],t=t.substring(s.length);let _=r[2].split(`
51`,1)[0].replace(/^\t+/,ee=>" ".repeat(3*ee.length)),I=t.split(`
52`,1)[0],S=0;this.options.pedantic?(S=2,c=_.trimStart()):(S=r[2].search(/[^ ]/),S=S>4?1:S,c=_.slice(S),S+=r[1].length);let F=!1;if(!_&&/^ *$/.test(I)&&(s+=I+`
53`,t=t.substring(I.length+1),f=!0),!f){let ee=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),Ie=new RegExp(`^ {0,${Math.min(3,S-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),He=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:\`\`\`|~~~)`),Le=new RegExp(`^ {0,${Math.min(3,S-1)}}#`);for(;t;){let qe=t.split(`
54`,1)[0];if(I=qe,this.options.pedantic&&(I=I.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),He.test(I)||Le.test(I)||ee.test(I)||Ie.test(t))break;if(I.search(/[^ ]/)>=S||!I.trim())c+=`
55`+I.slice(S);else{if(F||_.search(/[^ ]/)>=4||He.test(_)||Le.test(_)||Ie.test(_))break;c+=`
56`+I}!F&&!I.trim()&&(F=!0),s+=qe+`
57`,t=t.substring(qe.length+1),_=I.slice(S)}}o.loose||(u?o.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let H=null,q;this.options.gfm&&(H=/^\[[ xX]\] /.exec(c),H&&(q=H[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:s,task:!!H,checked:q,loose:!1,text:c,tokens:[]}),o.raw+=s}o.items[o.items.length-1].raw=s.trimEnd(),o.items[o.items.length-1].text=c.trimEnd(),o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){let _=o.items[f].tokens.filter(S=>S.type==="space"),I=_.length>0&&_.some(S=>/\n.*\n/.test(S.raw));o.loose=I}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let e=r[1].toLowerCase().replace(/\s+/g," "),i=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:e,raw:r[0],href:i,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;let e=X$(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),o=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(`
58`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let s of i)/^ *-+: *$/.test(s)?a.align.push("right"):/^ *:-+: *$/.test(s)?a.align.push("center"):/^ *:-+ *$/.test(s)?a.align.push("left"):a.align.push(null);for(let s of e)a.header.push({text:s,tokens:this.lexer.inline(s)});for(let s of o)a.rows.push(X$(s,a.header.length).map(c=>({text:c,tokens:this.lexer.inline(c)})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let e=r[1].charAt(r[1].length-1)===`
59`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:e,tokens:this.lexer.inline(e)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:Ul(r[1])}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let e=r[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let a=eI(e.slice(0,-1),"\\");if((e.length-a.length)%2===0)return}else{let a=pce(r[2],"()");if(a>-1){let c=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,c).trim(),r[3]=""}}let i=r[2],o="";if(this.options.pedantic){let a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(e)?i=i.slice(1):i=i.slice(1,-1)),Z$(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let e;if((e=this.rules.inline.reflink.exec(t))||(e=this.rules.inline.nolink.exec(t))){let i=(e[2]||e[1]).replace(/\s+/g," "),o=r[i.toLowerCase()];if(!o){let a=e[0].charAt(0);return{type:"text",raw:a,text:a}}return Z$(e,o,e[0],this.lexer)}}emStrong(t,r,e=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&e.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!e||this.rules.inline.punctuation.exec(e)){let a=[...i[0]].length-1,s,c,u=a,f=0,_=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(_.lastIndex=0,r=r.slice(-1*t.length+a);(i=_.exec(r))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(c=[...s].length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&a%3&&!((a+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);let I=[...i[0]][0].length,S=t.slice(0,a+i.index+I+c);if(Math.min(a,c)%2){let H=S.slice(1,-1);return{type:"em",raw:S,text:H,tokens:this.lexer.inlineTokens(H)}}let F=S.slice(2,-2);return{type:"strong",raw:S,text:F,tokens:this.lexer.inlineTokens(F)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let e=r[2].replace(/\n/g," "),i=/[^ ]/.test(e),o=/^ /.test(e)&&/ $/.test(e);return i&&o&&(e=e.substring(1,e.length-1)),e=Ul(e,!0),{type:"codespan",raw:r[0],text:e}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let e,i;return r[2]==="@"?(e=Ul(r[1]),i="mailto:"+e):(e=Ul(r[1]),i=e),{type:"link",raw:r[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let e,i;if(r[2]==="@")e=Ul(r[0]),i="mailto:"+e;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);e=Ul(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let e;return this.lexer.state.inRawBlock?e=r[0]:e=Ul(r[0]),{type:"text",raw:r[0],text:e}}}},uce=/^(?: *(?:\n|$))+/,hce=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fce=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yw=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,gce=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nU=/(?:[*+-]|\d{1,9}[.)])/,rU=uo(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,nU).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),aR=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bce=/^[^\n]+/,sR=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_ce=uo(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",sR).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vce=uo(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nU).getRegex(),nI="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",lR=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,yce=uo("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",lR).replace("tag",nI).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oU=uo(aR).replace("hr",Yw).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nI).getRegex(),Cce=uo(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",oU).getRegex(),cR={blockquote:Cce,code:hce,def:_ce,fences:fce,heading:gce,hr:Yw,html:yce,lheading:rU,list:vce,newline:uce,paragraph:oU,table:qw,text:bce},J$=uo("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yw).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nI).getRegex(),wce=Lt(re({},cR),{table:J$,paragraph:uo(aR).replace("hr",Yw).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",J$).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nI).getRegex()}),xce=Lt(re({},cR),{html:uo(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",lR).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qw,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:uo(aR).replace("hr",Yw).replace("heading",` *#{1,6} *[^
60]`).replace("lheading",rU).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),aU=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Sce=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sU=/^( {2,}|\\)\n(?!\s*$)/,Tce=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qw="\\p{P}\\p{S}",Ece=uo(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Qw).getRegex(),Ice=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,kce=uo(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Qw).getRegex(),Dce=uo("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Qw).getRegex(),Mce=uo("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Qw).getRegex(),Ace=uo(/\\([punct])/,"gu").replace(/punct/g,Qw).getRegex(),Oce=uo(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pce=uo(lR).replace("(?:-->|$)","-->").getRegex(),Rce=uo("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pce).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),iI=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Fce=uo(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",iI).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lU=uo(/^!?\[(label)\]\[(ref)\]/).replace("label",iI).replace("ref",sR).getRegex(),cU=uo(/^!?\[(ref)\](?:\[\])?/).replace("ref",sR).getRegex(),Nce=uo("reflink|nolink(?!\\()","g").replace("reflink",lU).replace("nolink",cU).getRegex(),dR={_backpedal:qw,anyPunctuation:Ace,autolink:Oce,blockSkip:Ice,br:sU,code:Sce,del:qw,emStrongLDelim:kce,emStrongRDelimAst:Dce,emStrongRDelimUnd:Mce,escape:aU,link:Fce,nolink:cU,punctuation:Ece,reflink:lU,reflinkSearch:Nce,tag:Rce,text:Tce,url:qw},Vce=Lt(re({},dR),{link:uo(/^!?\[(label)\]\((.*?)\)/).replace("label",iI).getRegex(),reflink:uo(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",iI).getRegex()}),nR=Lt(re({},dR),{escape:uo(aU).replace("])","~|])").getRegex(),url:uo(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Lce=Lt(re({},nR),{br:uo(sU).replace("{2,}","*").getRegex(),text:uo(nR.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),tI={normal:cR,gfm:wce,pedantic:xce},Hw={normal:dR,gfm:nR,breaks:Lce,pedantic:Vce},Pm=class n{constructor(t){se(this,"tokens");se(this,"options");se(this,"state");se(this,"tokenizer");se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||vg,this.options.tokenizer=this.options.tokenizer||new iv,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={block:tI.normal,inline:Hw.normal};this.options.pedantic?(r.block=tI.pedantic,r.inline=Hw.pedantic):this.options.gfm&&(r.block=tI.gfm,this.options.breaks?r.inline=Hw.breaks:r.inline=Hw.gfm),this.tokenizer.rules=r}
vendor: 11,772 bytes, lines 60-89
60static get rules(){return{block:tI,inline:Hw}}static lex(t,r){return new n(r).lex(t)}static lexInline(t,r){return new n(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
61`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let e=this.inlineQueue[r];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g,"    ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,c,u)=>c+"    ".repeat(u.length));let e,i,o,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(e=s.call({lexer:this},t,r))?(t=t.substring(e.raw.length),r.push(e),!0):!1))){if(e=this.tokenizer.space(t)){t=t.substring(e.raw.length),e.raw.length===1&&r.length>0?r[r.length-1].raw+=`
62`:r.push(e);continue}if(e=this.tokenizer.code(t)){t=t.substring(e.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
63`+e.raw,i.text+=`
64`+e.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(e);continue}if(e=this.tokenizer.fences(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.heading(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.hr(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.blockquote(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.list(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.html(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.def(t)){t=t.substring(e.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
65`+e.raw,i.text+=`
66`+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});continue}if(e=this.tokenizer.table(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.lheading(t)){t=t.substring(e.raw.length),r.push(e);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},c),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(e=this.tokenizer.paragraph(o))){i=r[r.length-1],a&&i.type==="paragraph"?(i.raw+=`
67`+e.raw,i.text+=`
68`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(e),a=o.length!==t.length,t=t.substring(e.raw.length);continue}if(e=this.tokenizer.text(t)){t=t.substring(e.raw.length),i=r[r.length-1],i&&i.type==="text"?(i.raw+=`
69`+e.raw,i.text+=`
70`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(e);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let e,i,o,a=t,s,c,u;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(u=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(e=f.call({lexer:this},t,r))?(t=t.substring(e.raw.length),r.push(e),!0):!1))){if(e=this.tokenizer.escape(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.tag(t)){t=t.substring(e.raw.length),i=r[r.length-1],i&&e.type==="text"&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):r.push(e);continue}if(e=this.tokenizer.link(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(e.raw.length),i=r[r.length-1],i&&e.type==="text"&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):r.push(e);continue}if(e=this.tokenizer.emStrong(t,a,u)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.codespan(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.br(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.del(t)){t=t.substring(e.raw.length),r.push(e);continue}if(e=this.tokenizer.autolink(t)){t=t.substring(e.raw.length),r.push(e);continue}if(!this.state.inLink&&(e=this.tokenizer.url(t))){t=t.substring(e.raw.length),r.push(e);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let f=1/0,_=t.slice(1),I;this.options.extensions.startInline.forEach(S=>{I=S.call({lexer:this},_),typeof I=="number"&&I>=0&&(f=Math.min(f,I))}),f<1/0&&f>=0&&(o=t.substring(0,f+1))}if(e=this.tokenizer.inlineText(o)){t=t.substring(e.raw.length),e.raw.slice(-1)!=="_"&&(u=e.raw.slice(-1)),c=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):r.push(e);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Hl=class{constructor(t){se(this,"options");this.options=t||vg}code(t,r,e){let i=(r||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
71`,i?'<pre><code class="language-'+Ul(i)+'">'+(e?t:Ul(t,!0))+`</code></pre>
72`:"<pre><code>"+(e?t:Ul(t,!0))+`</code></pre>
73`}blockquote(t){return`<blockquote>
74${t}</blockquote>
75`}html(t,r){return t}heading(t,r,e){return`<h${r}>${t}</h${r}>
76`}hr(){return`<hr>
77`}list(t,r,e){let i=r?"ol":"ul",o=r&&e!==1?' start="'+e+'"':"";return"<"+i+o+`>
78`+t+"</"+i+`>
79`}listitem(t,r,e){return`<li>${t}</li>
80`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
81`}table(t,r){return r&&(r=`<tbody>${r}</tbody>`),`<table>
82<thead>
83`+t+`</thead>
84`+r+`</table>
85`}tablerow(t){return`<tr>
86${t}</tr>
87`}tablecell(t,r){let e=r.header?"th":"td";return(r.align?`<${e} align="${r.align}">`:`<${e}>`)+t+`</${e}>
88`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,r,e){let i=K$(t);if(i===null)return e;t=i;let o='<a href="'+t+'"';return r&&(o+=' title="'+r+'"'),o+=">"+e+"</a>",o}image(t,r,e){let i=K$(t);if(i===null)return e;t=i;let o=`<img src="${t}" alt="${e}"`;return r&&(o+=` title="${r}"`),o+=">",o}text(t){return t}},Ww=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,e){return""+e}image(t,r,e){return""+e}br(){return""}},Rm=class n{constructor(t){se(this,"options");se(this,"renderer");se(this,"textRenderer");this.options=t||vg,this.options.renderer=this.options.renderer||new Hl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ww}static parse(t,r){return new n(r).parse(t)}static parseInline(t,r){return new n(r).parseInline(t)}parse(t,r=!0){let e="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){let a=o,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){e+=s||"";continue}}switch(o.type){case"space":continue;case"hr":{e+=this.renderer.hr();continue}case"heading":{let a=o;e+=this.renderer.heading(this.parseInline(a.tokens),a.depth,cce(this.parseInline(a.tokens,this.textRenderer)));continue}case"code":{let a=o;e+=this.renderer.code(a.text,a.lang,!!a.escaped);continue}case"table":{let a=o,s="",c="";for(let f=0;f<a.header.length;f++)c+=this.renderer.tablecell(this.parseInline(a.header[f].tokens),{header:!0,align:a.align[f]});s+=this.renderer.tablerow(c);let u="";for(let f=0;f<a.rows.length;f++){let _=a.rows[f];c="";for(let I=0;I<_.length;I++)c+=this.renderer.tablecell(this.parseInline(_[I].tokens),{header:!1,align:a.align[I]});u+=this.renderer.tablerow(c)}e+=this.renderer.table(s,u);continue}case"blockquote":{let a=o,s=this.parse(a.tokens);e+=this.renderer.blockquote(s);continue}case"list":{let a=o,s=a.ordered,c=a.start,u=a.loose,f="";for(let _=0;_<a.items.length;_++){let I=a.items[_],S=I.checked,F=I.task,H="";if(I.task){let q=this.renderer.checkbox(!!S);u?I.tokens.length>0&&I.tokens[0].type==="paragraph"?(I.tokens[0].text=q+" "+I.tokens[0].text,I.tokens[0].tokens&&I.tokens[0].tokens.length>0&&I.tokens[0].tokens[0].type==="text"&&(I.tokens[0].tokens[0].text=q+" "+I.tokens[0].tokens[0].text)):I.tokens.unshift({type:"text",text:q+" "}):H+=q+" "}H+=this.parse(I.tokens,u),f+=this.renderer.listitem(H,F,!!S)}e+=this.renderer.list(f,s,c);continue}case"html":{let a=o;e+=this.renderer.html(a.text,a.block);continue}case"paragraph":{let a=o;e+=this.renderer.paragraph(this.parseInline(a.tokens));continue}case"text":{let a=o,s=a.tokens?this.parseInline(a.tokens):a.text;for(;i+1<t.length&&t[i+1].type==="text";)a=t[++i],s+=`
89`+(a.tokens?this.parseInline(a.tokens):a.text);e+=r?this.renderer.paragraph(s):s;continue}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return e}parseInline(t,r){r=r||this.renderer;let e="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){e+=a||"";continue}}switch(o.type){case"escape":{let a=o;e+=r.text(a.text);break}case"html":{let a=o;e+=r.html(a.text);break}case"link":{let a=o;e+=r.link(a.href,a.title,this.parseInline(a.tokens,r));break}case"image":{let a=o;e+=r.image(a.href,a.title,a.text);break}case"strong":{let a=o;e+=r.strong(this.parseInline(a.tokens,r));break}case"em":{let a=o;e+=r.em(this.parseInline(a.tokens,r));break}case"codespan":{let a=o;e+=r.codespan(a.text);break}case"br":{e+=r.br();break}case"del":{let a=o;e+=r.del(this.parseInline(a.tokens,r));break}case"text":{let a=o;e+=r.text(a.text);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return e}},bg=class{constructor(t){se(this,"options");this.options=t||vg}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}};se(bg,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var rR=class{constructor(...t){se(this,"defaults",oR());se(this,"options",this.setOptions);se(this,"parse",this.#e(Pm.lex,Rm.parse));se(this,"parseInline",this.#e(Pm.lexInline,Rm.parseInline));se(this,"Parser",Rm);se(this,"Renderer",Hl);se(this,"TextRenderer",Ww);se(this,"Lexer",Pm);se(this,"Tokenizer",iv);se(this,"Hooks",bg);this.use(...t)}walkTokens(t,r){let e=[];for(let i of t)switch(e=e.concat(r.call(this,i)),i.type){case"table":{let o=i;for(let a of o.header)e=e.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let s of a)e=e.concat(this.walkTokens(s.tokens,r));break}case"list":{let o=i;e=e.concat(this.walkTokens(o.items,r));break}default:{let o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let s=o[a].flat(1/0);e=e.concat(this.walkTokens(s,r))}):o.tokens&&(e=e.concat(this.walkTokens(o.tokens,r)))}}return e}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};
89return t.forEach(e=>{let i=re({},e);if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...s){let c=o.renderer.apply(this,s);return c===!1&&(c=a.apply(this,s)),c}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),i.extensions=r),e.renderer){let o=this.defaults.renderer||new Hl(this.defaults);for(let a in e.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(a==="options")continue;let s=a,c=e.renderer[s],u=o[s];o[s]=(...f)=>{let _=c.apply(o,f);return _===!1&&(_=u.apply(o,f)),_||""}}i.renderer=o}if(e.tokenizer){let o=this.defaults.tokenizer||new iv(this.defaults);for(let a in e.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,c=e.tokenizer[s],u=o[s];o[s]=(...f)=>{let _=c.apply(o,f);return _===!1&&(_=u.apply(o,f)),_}}i.tokenizer=o}if(e.hooks){let o=this.defaults.hooks||new bg;for(let a in e.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(a==="options")continue;let s=a,c=e.hooks[s],u=o[s];bg.passThroughHooks.has(a)?o[s]=f=>{if(this.defaults.async)return Promise.resolve(c.call(o,f)).then(I=>u.call(o,I));let _=c.call(o,f);return u.call(o,_)}:o[s]=(...f)=>{let _=c.apply(o,f);return _===!1&&(_=u.apply(o,f)),_}}i.hooks=o}if(e.walkTokens){let o=this.defaults.walkTokens,a=e.walkTokens;i.walkTokens=function(s){let c=[];return c.push(a.call(this,s)),o&&(c=c.concat(o.call(this,s))),c}}this.defaults=re(re({},this.defaults),i)}),this}setOptions(t){return this.defaults=re(re({},this.defaults),t),this}lexer(t,r){return Pm.lex(t,r??this.defaults)}parser(t,r){return Rm.parse(t,r??this.defaults)}#e(t,r){return(e,i)=>{let o=re({},i),a=re(re({},this.defaults),o);this.defaults.async===!0&&o.async===!1&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);let s=this.#t(!!a.silent,!!a.async);if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(e):e).then(c=>t(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>r(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(s);try{a.hooks&&(e=a.hooks.preprocess(e));let c=t(e,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let u=r(c,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(c){return s(c)}}}#t(t,r){return e=>{if(e.message+=`
90Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Ul(e.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(e);throw e}}},_g=new rR;function Rr(n,t){return _g.parse(n,t)}Rr.options=Rr.setOptions=function(n){return _g.setOptions(n),Rr.defaults=_g.defaults,eU(Rr.defaults),Rr};Rr.getDefaults=oR;Rr.defaults=vg;Rr.use=function(...n){return _g.use(...n),Rr.defaults=_g.defaults,eU(Rr.defaults),Rr};Rr.walkTokens=function(n,t){return _g.walkTokens(n,t)};Rr.parseInline=_g.parseInline;Rr.Parser=Rm;Rr.parser=Rm.parse;Rr.Renderer=Hl;Rr.TextRenderer=Ww;Rr.Lexer=Pm;Rr.lexer=Pm.lex;Rr.Tokenizer=iv;Rr.Hooks=bg;Rr.parse=Rr;var Ipt=Rr.options,kpt=Rr.setOptions,Dpt=Rr.use,Mpt=Rr.walkTokens,Apt=Rr.parseInline;var Opt=Rm.parse,Ppt=Pm.lex;var Bce=["*"],jce="Copy",Gce="Copied",pR=(()=>{let t=class t{constructor(){this._buttonClick$=new Te,this.copied$=this._buttonClick$.pipe(ii(()=>Xt(Z(!0),ls(3e3).pipe(zy(!1)))),xr(),Cs(1)),this.copiedText$=this.copied$.pipe(on(!1),W(e=>e?Gce:jce))}onCopyToClipboardClick(){this._buttonClick$.next()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["markdown-clipboard"]],standalone:!0,features:[ot],decls:4,vars:7,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(i,o){i&1&&(d(0,"button",0),v(1,"async"),T("click",function(){return o.onCopyToClipboardClick()}),g(2),v(3,"async"),p()),i&2&&(Y("copied",C(1,3,o.copied$)),l(2),z(C(3,5,o.copiedText$)))},dependencies:[Ve],encapsulation:2,changeDetection:0});let n=t;return n})(),zce=new tt("CLIPBOARD_OPTIONS");var dU=(()=>{let t=class t{transform(e,i){return e==null&&(e=""),i==null&&(i=""),typeof e!="string"?(console.error(`LanguagePipe has been invoked with an invali
90d value type [${typeof e}]`),e):typeof i!="string"?(console.error(`LanguagePipe has been invoked with an invalid parameter [${typeof i}]`),e):"```"+i+`
91`+e+"\n```"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"language",type:t,pure:!0,standalone:!0});let n=t;return n})(),Kw=function(n){return n.CommandLine="command-line",n.LineHighlight="line-highlight",n.LineNumbers="line-numbers",n}(Kw||{}),hU=new tt("MARKED_EXTENSIONS"),mR=new tt("MARKED_OPTIONS"),$ce="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",Uce="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",Hce="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",qce="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",Wce="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",Yce="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",fU=new tt("SECURITY_CONTEXT");var Xw=(()=>{let t=class t{get options(){return this._options}set options(e){this._options=re(re({},this.DEFAULT_MARKED_OPTIONS),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}constructor(e,i,o,a,s,c,u){this.clipboardOptions=e,this.extensions=i,this.platform=a,this.securityContext=s,this.http=c,this.sanitizer=u,this.DEFAULT_MARKED_OPTIONS={renderer:new Hl},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new Te,this.reload$=this._reload$.asObservable(),this.options=o}parse(e,i=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:o,inline:a,emoji:s,mermaid:c,disableSanitizer:u}=i,f=re(re({},this.options),i.markedOptions),_=f.renderer||this.renderer||new Hl;this.extensions&&(this.renderer=this.extendsRendererForExtensions(_)),c&&(this.renderer=this.extendsRendererForMermaid(_));let I=this.trimIndentation(e),S=o?this.decodeHtml(I):I,F=s?this.parseEmoji(S):S,H=this.parseMarked(F,f,a);return(u?H:this.sanitizer.sanitize(this.securityContext,H))||""}render(e,i=this.DEFAULT_RENDER_OPTIONS,o){let{clipboard:a,clipboardOptions:s,katex:c,katexOptions:u,mermaid:f,mermaidOptions:_}=i;c&&this.renderKatex(e,re(re({},this.DEFAULT_KATEX_OPTIONS),u)),f&&this.renderMermaid(e,re(re({},this.DEFAULT_MERMAID_OPTIONS),_)),a&&this.renderClipboard(e,o,re(re(re({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),s)),this.highlight(e)}reload(){this._reload$.next()}getSource(e){if(!this.http)throw new Error(Yce);return this.http.get(e,{responseType:"text"}).pipe(W(i=>this.handleExtension(e,i)))}highlight(e){if(!Ga(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let i=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(i,o=>o.classList.add("language-none")),Prism.highlightAllUnder(e)}decodeHtml(e){if(!Ga(this.platform))return e;let i=document.createElement("textarea");return i.innerHTML=e,i.value}extendsRendererForExtensions(e){let i=e;return i.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions?.length>0&&Rr.use(...this.extensions),i.\u0275NgxMarkdownRendererExtendedForExtensions=!0),e}extendsRendererForMermaid(e){let i=e;if(i.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return e;let o=e.code;return e.code=function(a,s,c){return s==="mermaid"?`<div class="mermaid">${a}</div>`:o.call(this,a,s,c)},i.\u0275NgxMarkdownRendererExtendedForMermaid=!0,e}handleExtension(e,i){let o=e.lastIndexOf("://"),a=o>-1?e.substring(o+4):e,s=a.lastIndexOf("/"),c=s>-1?a.substring(s+1).split("?")[0]:"",u=c.lastIndexOf("."),f=u>-1?c.substring(u+1):"";return f&&f!=="md"?"```"+f+`
92`+i+"\n```":i}parseMarked(e,i,o=!1){if(i.renderer){let a=re({},i.renderer);delete a.\u0275NgxMarkdownRendererExtendedForExtensions,delete a.\u0275NgxMarkdownRendererExtendedForMermaid,delete i.renderer,Rr.use({renderer:a})}
92return o?Rr.parseInline(e,i):Rr.parse(e,i)}parseEmoji(e){if(!Ga(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error($ce);return joypixels.shortnameToUnicode(e)}renderKatex(e,i){if(Ga(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(Uce);renderMathInElement(e,i)}}renderClipboard(e,i,o){if(!Ga(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(qce);if(!i)throw new Error(Wce);let{buttonComponent:a,buttonTemplate:s}=o,c=e.querySelectorAll("pre");for(let u=0;u<c.length;u++){let f=c.item(u),_=document.createElement("div");_.style.position="relative",f.parentNode.insertBefore(_,f),_.appendChild(f);let I=document.createElement("div");I.classList.add("markdown-clipboard-toolbar"),I.style.position="absolute",I.style.top=".5em",I.style.right=".5em",I.style.zIndex="1",_.insertAdjacentElement("beforeend",I),_.onmouseenter=()=>I.classList.add("hover"),_.onmouseleave=()=>I.classList.remove("hover");let S;if(a){let H=i.createComponent(a);S=H.hostView,H.changeDetectorRef.markForCheck()}else if(s)S=i.createEmbeddedView(s);else{let H=i.createComponent(pR);S=H.hostView,H.changeDetectorRef.markForCheck()}let F;S.rootNodes.forEach(H=>{I.appendChild(H),F=new ClipboardJS(H,{text:()=>f.innerText})}),S.onDestroy(()=>F.destroy())}}renderMermaid(e,i=this.DEFAULT_MERMAID_OPTIONS){if(!Ga(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(Hce);let o=e.querySelectorAll(".mermaid");o.length!==0&&(mermaid.initialize(i),mermaid.run({nodes:o}))}trimIndentation(e){if(!e)return"";let i;return e.split(`
93`).map(o=>{let a=i;return o.length>0&&(a=isNaN(a)?o.search(/\S|$/):Math.min(o.search(/\S|$/),a)),isNaN(i)&&(i=a),a?o.substring(a):o}).join(`
94`)}};t.\u0275fac=function(i){return new(i||t)(X(zce,8),X(hU,8),X(mR,8),X(vu),X(fU),X(Jt,8),X(js))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),pU=(()=>{let t=class t{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(e){this._disableSanitizer=this.coerceBooleanProperty(e)}get inline(){return this._inline}set inline(e){this._inline=this.coerceBooleanProperty(e)}get clipboard(){return this._clipboard}set clipboard(e){this._clipboard=this.coerceBooleanProperty(e)}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get mermaid(){return this._mermaid}set mermaid(e){this._mermaid=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}get commandLine(){return this._commandLine}set commandLine(e){this._commandLine=this.coerceBooleanProperty(e)}constructor(e,i,o){this.element=e,this.markdownService=i,this.viewContainerRef=o,this.error=new J,this.load=new J,this.ready=new J,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new Te}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(Be(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(e,i=!1){return Gy(this,null,function*(){let o={decodeHtml:i,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},a={clipboard:this.clipboard,clipboardOptions:this.getClipboardOptions(),katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},s=yield this.markdownService.parse(e,o);this.element.nativeElement.innerHTML=s,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,a,this.viewContainerRef),this.ready.emit()})}coerceBooleanProperty(e){return e!=null&&`${String(e)}`!="false"}getClipboardOptions(){if(this.clipboardButtonComponent||this.clipboardButtonTemplate)return{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate}}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:e=>{this.render(e).then(()=>{this.load.emit(e)})},error:e=>this.error.emit(e)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,Kw.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,Kw.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,i){let o=e.querySelectorAll("pre");for(let a=0;a<o.length;a++){let s=i instanceof Array?i:[i];o.item(a).classList.add(...s)}}setPluginOptions(e,i){let o=e.querySelectorAll("pre");for(let a=0;a<o.length;
94a++)Object.keys(i).forEach(s=>{let c=i[s];if(c){let u=this.toLispCase(s);o.item(a).setAttribute(u,c.toString())}})}toLispCase(e){let i=e.match(/([A-Z])/g);if(!i)return e;let o=e.toString();for(let a=0,s=i.length;a<s;a++)o=o.replace(new RegExp(i[a]),"-"+i[a].toLowerCase());return o.slice(0,1)==="-"&&(o=o.slice(1)),o}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Xw),h(ci))},t.\u0275cmp=L({type:t,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},standalone:!0,features:[lt,ot],ngContentSelectors:Bce,decls:1,vars:0,template:function(i,o){i&1&&(Ct(),Fe(0))},encapsulation:2});let n=t;return n})(),mU=(()=>{let t=class t{constructor(e,i,o,a,s){this.domSanitizer=e,this.elementRef=i,this.markdownService=o,this.viewContainerRef=a,this.zone=s}transform(e,i){return Gy(this,null,function*(){if(e==null)return"";if(typeof e!="string")return console.error(`MarkdownPipe has been invoked with an invalid value type [${typeof e}]`),e;let o=yield this.markdownService.parse(e,i);return this.zone.onStable.pipe(jd()).subscribe(()=>this.markdownService.render(this.elementRef.nativeElement,i,this.viewContainerRef)),this.domSanitizer.bypassSecurityTrustHtml(o)})}};t.\u0275fac=function(i){return new(i||t)(h(js,16),h(ge,16),h(Xw,16),h(ci,16),h(Bt,16))},t.\u0275pipe=_r({name:"markdown",type:t,pure:!0,standalone:!0});let n=t;return n})();function Qce(n){return[Xw,n?.loader??[],n?.clipboardOptions??[],n?.markedOptions??[],{provide:hU,useValue:n?.markedExtensions??[]},{provide:fU,useValue:n?.sanitize??ob.HTML}]}var nv=(()=>{let t=class t{static forRoot(e){return{ngModule:t,providers:[Qce(e)]}}static forChild(){return{ngModule:t}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[zi,pR,dU,pU,mU],exports:[pR,dU,pU,mU]}),t.\u0275inj=Nt({imports:[zi]});let n=t;return n})(),uU;(function(n){let t;(function(i){i.Strict="strict",i.Loose="loose",i.Antiscript="antiscript",i.Sandbox="sandbox"})(t=n.SecurityLevel||(n.SecurityLevel={}));let r;(function(i){i.Base="base",i.Forest="forest",i.Dark="dark",i.Default="default",i.Neutral="neutral"})(r=n.Theme||(n.Theme={}));let e;(function(i){i[i.Debug=1]="Debug",i[i.Info=2]="Info",i[i.Warn=3]="Warn",i[i.Error=4]="Error",i[i.Fatal=5]="Fatal"})(e=n.LogLevel||(n.LogLevel={}))})(uU||(uU={}));y();var rI={};Ae(rI,{TbMarkdownComponent:()=>qs});y();y();var bU=(()=>{let t=class t{constructor(){this.compiler$=Yn(import("./chunk-V6B6VG4L.js")).pipe(Cs({refCount:!0,bufferSize:1}))}createDynamicComponent(e,i,o,a,s){return this.compiler$.pipe(W(()=>{let c=[zi];return o&&(c=[...c,...o]),this.createAndCompileDynamicComponent(e,i,c,a,s).type}))}destroyDynamicComponent(e){}getComponentDef(e){return e[a2]}createAndCompileDynamicComponent(e,i,o,a,s){return xB({template:i,imports:o,preserveWhitespaces:a,styles:s,standalone:!0,selector:"tb-dynamic-component#"+Zr()})(e)[a2]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Xce=["markdownContainer"],Zce=["fallbackElement"];
94function Jce(n,t){if(n&1&&(d(0,"div",4),g(1),p()),n&2){let r=b();l(),j(" ",r.error,`
95`)}}var uR,yg=class yg{constructor(t,r,e,i,o,a){this.cd=t,this.zone=r,this.markdownService=e,this.sharedModule=i,this.dynamicComponentFactoryService=o,this.renderer=a,this.style={},this.applyDefaultMarkdownStyle=!0,this.lineNumbers=!1,this.fallbackToPlainMarkdown=!1,this.usePlainMarkdown=!1,this.ready=new J,this.isMarkdownReady=!1,this.error=null}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];if(r==="data"&&e.currentValue!==e.previousValue)De(this.data)&&this.zone.run(()=>this.render(this.data));else if(r==="context"&&!e.firstChange&&this.context&&this.tbMarkdownInstanceComponentRef)for(let i of Object.keys(this.context))this.tbMarkdownInstanceComponentRef.instance[i]=this.context[i]}}render(t){let r=this.markdownService.parse(t,{decodeHtml:!1}),e="tb-markdown-view";this.markdownClass&&(e+=` ${this.markdownClass}`);let i=`<div [style]="style" class="${e}">${r}</div>`;this.containerClass&&(i=`<div class="${this.containerClass}" style="width: 100%; height: 100%;">${i}</div>`);let o=this.renderer.createElement("div");o.innerHTML=i,this.handlePlugins(o),this.markdownService.highlight(o);let a=o.querySelectorAll("pre"),s=Array.from(i.matchAll(/<pre[\S\s]+?(?=<\/pre>)<\/pre>/g));for(let f=0;f<a.length;f++){let _=a.item(f).outerHTML.replace('ngnonbindable=""',"ngNonBindable");i=i.replace(s[f][0],_)}i=this.sanitize(i),this.markdownContainer.clear();let c=[],u;if(this.applyDefaultMarkdownStyle&&(uR||(uR=this.dynamicComponentFactoryService.getComponentDef(yg).styles[0].replace(/\[_nghost-%COMP%]/g,"").replace(/\[_ngcontent-%COMP%]/g,"")),c.push(uR)),this.additionalStyles&&(c=c.concat(this.additionalStyles)),this.usePlainMarkdown)u=this.plainMarkdown(i,c),this.cd.detectChanges(),u.subscribe(()=>{this.ready.emit()});else{let f=this.destroyMarkdownInstanceResources.bind(this),_=[this.sharedModule];this.additionalCompileModules&&(_=_.concat(this.additionalCompileModules)),this.dynamicComponentFactoryService.createDynamicComponent(class{ngOnDestroy(){f()}},i,_,!0,c).subscribe({next:I=>{this.tbMarkdownInstanceComponentType=I;let S=Mn.create({providers:[],parent:this.markdownContainer.injector});try{if(this.tbMarkdownInstanceComponentRef=this.markdownContainer.createComponent(this.tbMarkdownInstanceComponentType,{index:0,injector:S}),this.context)for(let F of Object.keys(this.context))this.tbMarkdownInstanceComponentRef.instance[F]=this.context[F];this.tbMarkdownInstanceComponentRef.instance.style=this.style,u=this.handleImages(this.tbMarkdownInstanceComponentRef.location.nativeElement),this.cd.detectChanges(),this.error=null}catch(F){u=this.handleError(i,F,c),this.cd.detectChanges()}u.subscribe(()=>{this.ready.emit()})},error:I=>{u=this.handleError(i,I,c),this.cd.detectChanges(),u.subscribe(()=>{this.ready.emit()})}})}}handleError(t,r,e){return this.error=(r?r+"":"Failed to render markdown!").replace(/\n/g,"<br>"),this.markdownContainer.clear(),this.fallbackToPlainMarkdown?this.plainMarkdown(t,e):Z(null)}plainMarkdown(t,r){let e=this.fallbackElement.nativeElement,i;if(r?.length){let o="tb-markdown-view-"+Zr(),a=r.join(`
96`);a=a.replace(/\.tb-markdown-view/g,"."+o),t=t.replace(/tb-markdown-view/g,o),i=this.renderer.createElement("style"),i.innerHTML=a}return e.innerHTML=t,i&&this.renderer.appendChild(e,i),this.handleImages(e)}handlePlugins(t){this.lineNumbers&&this.setPluginClass(t,Kw.LineNumbers)}setPluginClass(t,r){let e=t.querySelectorAll("pre");for(let i=0;i<e.length;i++){let o=r instanceof Array?r:[r];e.item(i).classList.add(...o)}}handleImages(t){let r=$("img",t);if(r.length){let e=r.length,i=new or;return r.each((o,a)=>{$(a).one("load error",()=>{e--,e===0&&(i.next(),i.complete())})}),i.asObservable()}else return Z(null)}sanitize(t){return t.replace(/{/g,"&#123;").replace(/}/g,"&#125;").replace(/@/g,"&#64;")}destroyMarkdownInstanceResources(){this.tbMarkdownInstanceComponentType&&(this.dynamicComponentFactoryService.destroyDynamicComponent(this.tbMarkdownInstanceComponentType),this.tbMarkdownInstanceComponentType=null),this.tbMarkdownInstanceComponentRef=null}};yg.\u0275fac=function(r){return new(r||yg)(h(Me),h(Bt),h(Xw),h(YE),h(bU),h(Ni))},yg.\u0275cmp=L({type:yg,selectors:[["tb-markdown"]],viewQuery:function(r,e){if(r&1&&(ae(Xce,7,ci),ae(Zce,7)),r&2){let i;Q(i=K())&&(e.markdownContainer=i.first),Q(i=K())&&(e.fallbackElement=i.first)}},inputs:{data:"data",context:"context",additionalCompileModules:"additionalCompileModules",markdownClass:"markdownClass",containerClass:"containerClass",style:"style",applyDefaultMarkdownStyle:"applyDefaultMarkdownStyle",additionalStyles:"additionalStyles",lineNumbers:"lineNumbers",fallbackToPlainMarkdown:"fallbackToPlainMarkdown",usePlainMarkdown:"usePlainMarkdown"},outputs:{ready:"ready"},features:[lt],decls:5,vars:7,consts:[["markdownContainer",""],["fallbackElement",""],["style",`color: #f00; font-size: 14px;
97                                                      line-height: 28px;
98                                                      background: #efefef;`,4,"ngIf"],[1,"tb-markdown-view"],[2,"color","#f00","font-size","14px","line-height","28px","background","#efefef"]],template:function(r,e){r&1&&
98(Ti(0,null,0),x(2,Jce,2,1,"div",2),O(3,"div",3,1)),r&2&&(l(2),m("ngIf",e.error&&!e.fallbackToPlainMarkdown),l(),_n(e.style),bt(e.markdownClass),Y("!hidden",!e.usePlainMarkdown&&!(e.error&&e.fallbackToPlainMarkdown)))},dependencies:[ce],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:32px;padding-right:60px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:#0f161d;line-height:normal;font-weight:500;border-bottom:none;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > h1[_ngcontent-%COMP%]{padding:30px 32px 10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#0f161d;line-height:normal;font-weight:500;border-bottom:none;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > h2[_ngcontent-%COMP%]{padding:30px 32px 10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#0f161d;line-height:normal;font-weight:500;border-bottom:none;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > h3[_ngcontent-%COMP%]{padding:30px 32px 10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{color:#0f161d;line-height:normal;font-weight:500;border-bottom:none;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > h4[_ngcontent-%COMP%]{padding:30px 32px 10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{color:#0f161d;line-height:normal;font-weight:500;border-bottom:none;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > h5[_ngcontent-%COMP%]{padding:30px 32px 10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:#0f161d;line-height:normal;font-weight:500;border-bottom:none;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > h6[_ngcontent-%COMP%]{padding:30px 32px 10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px;font-weight:400;line-height:1.25em;margin:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:10px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{color:#0f161dcc;line-height:1.5em}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding-right:32px;padding-left:32px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:62px;padding-right:32px;color:#0f161dcc;margin-top:16px;margin-bottom:16px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + h1[_ngcontent-%COMP%]{padding-top:14px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + h2[_ngcontent-%COMP%]{padding-top:14px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + h3[_ngcontent-%COMP%]{padding-top:14px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + h4[_ngcontent-%COMP%]{padding-top:14px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + h5[_ngcontent-%COMP%]{padding-top:14px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + h6[_ngcontent-%COMP%]{padding-top:14px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{padding-bottom:.75em;line-height:1.5em}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{padding-left:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-weight:500;color:#2a7dec;text-decoration:none;border:none}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:#2a7dec;text-decoration:underline;border:none}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]{margin-left:32px;width:calc(100% - 64px);border:1px solid rgba(42,125,236,.2);border-radius:4px;border-collapse:unset;border-spacing:0;margin-top:30px;margin-bottom:30px;overflow:hidden;table-layout:fixed}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table.auto[_ngcontent-%COMP%]{table-layout:auto}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%]{background-color:#f9fbff;color:#21252999}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{border-bottom:1px solid rgba(42,125,236,.2);font-size:16px;padding:12px 16px;text-align:left;margin:0}@media screen and (max-width: 400px){[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-size:12px;padding:12px 4px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]:not([class*=language-]){font-size:12px}}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(:last-child) > td[_ngcontent-%COMP%]{border-bottom:1px solid rgba(42,125,236,.2)}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{font-size:16px;padding:12px 16px;text-align:left;margin:0;color:#0f161dcc}@media screen and (max-width: 400px){[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{font-size:12px;padding:12px 4px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]:not([class*=language-]){font-size:12px}}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:.85em;padding:8px;margin:0;text-align:left}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]   td[align=center][_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] >
98 table[_ngcontent-%COMP%]   th[align=center][_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]   td[align=right][_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]   th[align=right][_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%] > table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{padding-left:0;padding-right:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.divider[_ngcontent-%COMP%]{padding-top:32px;border-bottom:1px solid rgba(15,22,29,.1)}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] + div.divider[_ngcontent-%COMP%]{padding-top:16px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   button.tb-button[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;border-radius:4px;border:none;padding:10px 20px;line-height:24px;color:#fff;background-color:#305680;box-shadow:0 1px 5px #0000001f,0 2px 2px #00000024,0 3px 1px -2px #0003;text-decoration:none;font-size:16px;font-weight:500;transition:background-color .4s cubic-bezier(.25,.8,.25,1)}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   button.tb-button[_ngcontent-%COMP%]:hover{background-color:#264363;color:#fff;text-decoration:none}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   #video[_ngcontent-%COMP%]{width:100%;margin:0;position:relative}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   #video[_ngcontent-%COMP%]   #video_wrapper[_ngcontent-%COMP%]{position:relative;width:100%;padding-bottom:56.25%;padding-left:0;padding-right:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   #video[_ngcontent-%COMP%]   #video_wrapper[_ngcontent-%COMP%]   iframe[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}@media screen and (min-width: 750px){[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   #video[_ngcontent-%COMP%]{width:100%;display:block}}@media screen and (min-width: 1025px){[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   #video[_ngcontent-%COMP%]{width:50%;position:relative}}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]:not([class*=language-]){color:#eb5757;font-family:monospace;font-size:16px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn[_ngcontent-%COMP%]{pointer-events:none;outline:none;position:absolute;width:206px;height:32px;top:0;right:32px;background:0 0;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn.multiline[_ngcontent-%COMP%]{right:38px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{padding:8px 8px 0;top:1px;transition:.2s;color:#2a7dec;background:#ffffffd9;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:0;font-weight:500;right:32px;position:absolute}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{background-color:#fff;position:absolute;width:38px;height:28px;top:3px;right:3px;padding:10px 10px 0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{position:initial;width:18px;height:18px;filter:invert(51%) sepia(6%) saturate(172%) hue-rotate(177deg) brightness(94%) contrast(92%)}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]:hover   pre[class*=language-][_ngcontent-%COMP%]{border:solid 1px #2a7dec}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]:hover   button.clipboard-btn[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]:hover   button.clipboard-btn[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{filter:invert(49%) sepia(97%) saturate(3730%) hue-rotate(200deg) brightness(95%) contrast(95%)}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]{display:inline-block;width:100%}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div.code-wrapper[_ngcontent-%COMP%]   button.clipboard-btn[_ngcontent-%COMP%]{top:-10px;right:0;padding:0 3px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]{font-size:16px;border:1px solid rgba(42,125,236,.2);border-radius:4px;background:0 0;padding:8px 16px;color:#212529}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.atrule[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.attr-value[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.keyword[_ngcontent-%COMP%]{color:#2a7dec}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.selector[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.attr-name[_ng
98content-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.string[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.char[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.builtin[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.inserted[_ngcontent-%COMP%]{color:#eb5757}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-][_ngcontent-%COMP%]   .token.punctuation[_ngcontent-%COMP%]{color:#212529}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-].line-numbers[_ngcontent-%COMP%]{padding-left:66px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-].line-numbers[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]   span.line-numbers-rows[_ngcontent-%COMP%]{top:-11px;bottom:-11px;left:-66px;width:50px;border:none;padding:8px 12px 8px 18px;text-align:right;background:#f9fbff}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-].line-numbers[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]   span.line-numbers-rows[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:before{color:#21252999;padding-right:0}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-].line-numbers.no-line-numbers[_ngcontent-%COMP%]{padding-left:16px}[_nghost-%COMP%]   .tb-markdown-view[_ngcontent-%COMP%]   pre[class*=language-].line-numbers.no-line-numbers[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]   span.line-numbers-rows[_ngcontent-%COMP%]{display:none}']});var qs=yg;pe([fe(),le("design:type",Object)],qs.prototype,"lineNumbers",void 0);pe([fe(),le("design:type",Object)],qs.prototype,"fallbackToPlainMarkdown",void 0);pe([fe(),le("design:type",Object)],qs.prototype,"usePlainMarkdown",void 0);var Zw={};Ae(Zw,{HelpPopupComponent:()=>Ws});y();var ede=["toggleHelpButton"],tde=["toggleHelpTextButton"],ide=["tb-help-popup",""],nde=(n,t)=>({"mat-mdc-outlined-button mdc-button--outlined":n,"hint-button":t});function rde(n,t){n&1&&(d(0,"div",8),O(1,"mat-spinner",9),p())}function ode(n,t){if(n&1){let r=B();d(0,"fieldset",3)(1,"div",4,0),T("click",function(){D(r);let i=b();return M(i.toggleHelp())}),d(3,"button",5)(4,"tb-icon",6),g(5),p(),x(6,rde,2,0,"div",7),p()()()}if(n&2){let r=b();l(),te("matTooltip",r.helpIconTooltip),l(2),bt(r.helpIconButtonClass),m("disabled",r.disabled()),l(2),z(r.popoverVisible?r.helpOpenedIcon:r.helpIcon),l(),m("ngIf",r.popoverVisible&&!r.popoverReady)}}function ade(n,t){if(n&1&&(pt(0),O(1,"span",15),ct()),n&2){let r=b
98(2);l(),_n(r.triggerStyle),m("innerHTML",r.triggerSafeHtml,Ut)}}function sde(n,t){if(n&1&&(d(0,"mat-icon"),g(1,"open_in_new"),p()),n&2){let r=b(2);bt(r.hintMode?"tb-mat-12":"tb-mat-16")}}function lde(n,t){if(n&1&&O(0,"mat-spinner",16),n&2){let r=b(2);m("diameter",r.hintMode?12:16)}}function cde(n,t){if(n&1){let r=B();d(0,"fieldset",3)(1,"div",10,1),T("click",function(){D(r);let i=b();return M(i.toggleHelp())}),d(3,"button",11)(4,"span"),x(5,ade,2,3,"ng-container",12)(6,sde,2,2,"mat-icon",13)(7,lde,1,1,"mat-spinner",14),p()()()()}if(n&2){let r=b();l(3),bt(Yi(6,nde,r.popoverVisible&&r.popoverReady,r.hintMode)),m("disabled",r.disabled()),l(2),m("ngIf",r.triggerSafeHtml),l(),m("ngIf",!r.popoverVisible||r.popoverReady),l(),m("ngIf",r.popoverVisible&&!r.popoverReady)}}var rv=class rv{constructor(t,r,e,i,o,a){this.viewContainerRef=t,this.sanitizer=r,this.renderer=e,this.popoverService=i,this.translate=o,this.wl=a,this.helpIcon="help_outline",this.helpOpenedIcon="help",this.helpIconTooltip=this.translate.instant("help.show-help"),this.helpIconButtonClass="tb-mat-32",this.helpPopupStyle={},this.popoverVisible=!1,this.popoverReady=!0,this.hintMode=!1,this.triggerSafeHtml=null,this.textMode=!1}ngOnChanges(t){De(this.triggerText)?this.triggerSafeHtml=this.sanitizer.bypassSecurityTrustHtml(this.triggerText):this.triggerSafeHtml=null,this.textMode=this.triggerSafeHtml!=null}disabled(){return!this.helpId&&!this.helpContent&&!this.helpContentBase64&&!this.asyncHelpContent}toggleHelp(){if(!this.disabled()){let t=this.textMode?this.toggleHelpTextButton.nativeElement:this.toggleHelpButton.nativeElement;this.popoverService.toggleHelpPopover(t,this.renderer,this.viewContainerRef,this.helpId,this.helpContent,this.helpContentBase64,this.asyncHelpContent?this.asyncHelpContent():null,r=>{this.popoverVisible=r},r=>{this.popoverReady=r},this.helpPopupPlacement,{},this.helpPopupStyle)}}};rv.\u0275fac=function(r){return new(r||rv)(h(ci),h(js),h(Ni),h(Fa),h(Ge),h(fl))},rv.\u0275cmp=L({type:rv,selectors:[["","tb-help-popup",""],["","tb-help-popup-content",""],["","tb-help-popup-content-base64",""],["","tb-help-popup-async-content",""]],viewQuery:function(r,e){if(r&1&&(ae(ede,5,ge),ae(tde,5,ge)),r&2){let i;Q(i=K())&&(e.toggleHelpButton=i.first),Q(i=K())&&(e.toggleHelpTextButton=i.first)}},inputs:{helpId:[0,"tb-help-popup","helpId"],helpContent:[0,"tb-help-popup-content","helpContent"],helpContentBase64:[0,"tb-help-popup-content-base64","helpContentBase64"],asyncHelpContent:[0,"tb-help-popup-async-content","asyncHelpContent"],helpIcon:[0,"help-icon","helpIcon"],helpOpenedIcon:[0,"help-opened-icon","helpOpenedIcon"],helpIconTooltip:[0,"help-icon-tooltip","helpIconTooltip"],helpIconButtonClass:[0,"help-icon-button-class","helpIconButtonClass"],triggerText:[0,"trigger-text","triggerText"],triggerStyle:[0,"trigger-style","triggerStyle"],helpPopupPlacement:[0,"tb-help-popup-placement","helpPopupPlacement"],helpPopupStyle:[0,"tb-help-popup-style","helpPopupStyle"],hintMode:"hintMode"},features:[lt],attrs:ide,decls:4,vars:6,consts:[["toggleHelpButton",""],["toggleHelpTextButton",""],["class","tb-help-popup-button-container",4,"ngIf"],[1,"tb-help-popup-button-container"],["matTooltipPosition","above",1,"tb-toggle-help-popup-button",3,"click","matTooltip"],["mat-icon-button","","color","primary","type","button",1,"tb-help-popup-button",3,"disabled"],["matButtonIcon",""],["class","tb-help-popup-button-loading absolute inset-0 flex items-center justify-center",4,"ngIf"],[1,"tb-help-popup-button-loading","absolute","inset-0","flex","items-center","justify-center"],["mode","indeterminate","diameter","20","strokeWidth","2"],[1,"tb-toggle-help-popup-text-button",3,"click"],["mat-button","","type","button","color","primary",1,"tb-help-popup-text-button",3,"disabled"],[4,"ngIf"],[3,"class",4,"ngIf"],["mode","indeterminate","strokeWidth","2",3,"diameter",4,"ngIf"],[3,"innerHTML"],["mode","indeterminate","strokeWidth","2",3,"diameter"]],template:function(r,e){r&1&&(x(0,ode,7,6,"fieldset",2),v(1,"async"),x(2,cde,8,9,"fieldset",2),v(3,"async")),r&2&&(m("ngIf",C(1,2,e.wl.isEnableHelpLinks$())&&!e.textMode),l(2),m("ngIf",C(3,4,e.wl.isEnableHelpLinks$())&&e.textMode))},dependencies:[ce,yt,Pe,Se,zt,Za,In,Ve],styles:[`@charset "UTF-8";.tb-help-popup-button-container{width:initial;display:inline-block;vertical-align:middle;line-height:1}.tb-help-popup-button-loading{background:#fff;border-radius:50%;z-index:1}.tb-toggle-help-popup-button{border-radius:50%;line-height:normal}.tb-help-popup-button{position:relative}.tb-help-popup-button .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-container{width:20px;height:20px}.tb-help-popup-button .mat-mdc-progress-spinner svg{width:20px;height:20px}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base{position:relative;padding:0 2px 0 8px;line-height:28px;height:auto;transition:border 0s}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base.mat-mdc-outlined-button{padding:0 1px 0 7px;line-height:26px}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base .mdc-button__label>span .mat-icon{vertical-align:middle;padding-left:4px;box-sizing:initial}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base .mdc-button__label>span .mat-mdc-progress-spinner{display:inline-block;margin-left:4px;margin-right:5px;vertical-align:middle}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base.hint-button{padding:2px 3px;line-height:1}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base.hint-button.mat-mdc-outlined-button{padding:1px 2px}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base.hint-button .mdc-button__label>span .mat-icon{margin-right:0}.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base.hint-button .mdc-button__label>span .mat-mdc-progress-spinner{margin-right:0}
99`],encapsulation:2});var Ws=rv;pe([fe(),le("design:type",Object)],Ws.prototype,"hintMode",void 0);var dde=["markdownEditor"],pde=(n,t)=>({"tb-error":n,"tb-required":t});
99function mde(n,t){if(n&1&&O(0,"div",16),n&2){let r=b();m("tb-help-popup",r.helpId)}}function ude(n,t){if(n&1&&(d(0,"div",13),O(1,"tb-markdown",14),p()),n&2){let r=b();l(),m("data",r.renderValue)}}var Cg=class Cg{constructor(t,r){this.cd=t,this.raf=r,this.editorMode=!0,this.fullscreen=!1,this.ignoreChange=!1,this.propagateChange=()=>{}}ngOnInit(){if(!this.readonly){let t=this.markdownEditorElmRef.nativeElement,r={mode:"ace/mode/markdown",showGutter:!0,showPrintMargin:!1,readOnly:!1},e={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};r=re(re({},r),e),da().subscribe(i=>{this.markdownEditor=i.edit(t,r),this.markdownEditor.session.setUseWrapMode(!1),this.markdownEditor.setValue(this.markdownValue?this.markdownValue:"",-1),this.markdownEditor.on("change",()=>{this.ignoreChange||this.updateView()}),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(t)})}}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.markdownEditor&&this.markdownEditor.destroy()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.editorMode=!0,this.markdownValue=t,this.renderValue=this.markdownValue?this.markdownValue:" ",this.markdownEditor&&(this.ignoreChange=!0,this.markdownEditor.setValue(this.markdownValue?this.markdownValue:"",-1),this.ignoreChange=!1)}onFullscreen(){this.markdownEditor&&setTimeout(()=>{this.markdownEditor.resize()},0)}toggleEditMode(){this.editorMode=!this.editorMode,this.editorMode&&this.markdownEditor&&setTimeout(()=>{this.markdownEditor.resize()},0)}updateView(){let t=this.markdownEditor.getValue();this.markdownValue!==t&&(this.markdownValue=t,this.renderValue=this.markdownValue?this.markdownValue:" ",this.propagateChange(this.markdownValue),this.cd.markForCheck())}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.markdownEditor.resize(),this.markdownEditor.renderer.updateFull()})}};Cg.\u0275fac=function(r){return new(r||Cg)(h(Me),h(es))},Cg.\u0275cmp=L({type:Cg,selectors:[["tb-markdown-editor"]],viewQuery:function(r,e){if(r&1&&ae(dde,7),r&2){let i;Q(i=K())&&(e.markdownEditorElmRef=i.first)}},inputs:{label:"label",disabled:"disabled",readonly:"readonly",helpId:"helpId",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>Cg),multi:!0}])],decls:24,vars:32,consts:[["markdownEditor",""],["tb-fullscreen","",1,"markdown-content",3,"fullscreenChanged","fullscreen"],[1,"markdown-editor-toolbar","flex","flex-row","items-center","justify-start",2,"min-height","40px"],[1,"tb-title","no-padding"],[1,"flex-1"],["type","button","mat-button","",3,"click"],[3,"tb-help-popup",4,"ngIf"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],[1,"markdown-content-editor"],[1,"tb-markdown-editor"],[1,"tb-markdown-view-container"],["lineNumbers","","fallbackToPlainMarkdown","",3,"data"],["class","tb-markdown-view-container",4,"ngIf"],[3,"tb-help-popup"]],template:function(r,e){if(r&1){let i=B();d(0,"div",1),T("fullscreenChanged",function(){return D(i),M(e.onFullscreen())}),d(1,"div",2)(2,"label",3),g(3),p(),O(4,"span",4),d(5,"button",5),T("click",function(){return D(i),M(e.toggleEditMode())}),g(6),v(7,"translate"),p(),d(8,"button",5),T("click",function(){return D(i),M(e.toggleEditMode())}),g(9),v(10,"translate"),p(),x(11,mde,1,1,"div",6),d(12,"fieldset",7)(13,"div",8),v(14,"translate"),T("click",function(){return D(i),M(e.fullscreen=!e.fullscreen)}),d(15,"button",9)(16,"mat-icon",10),g(17),p()()()()(),d(18,"div",11),O(19,"div",12,0),d(21,"div",13),O(22,"tb-markdown",14),p()(),x(23,ude,2,1,"div",15),p()}r&2&&(Y("tb-edit-mode",!e.readonly),m("fullscreen",e.fullscreen),l(2),bt(Yi(29,pde,!e.disabled&&e.required&&!e.markdownValue,!e.disabled&&e.required)),l(),z(e.label),l(2),Y("!hidden",e.editorMode),l(),z(C(7,23,"markdown.edit")),l(2),Y("!hidden",!e.editorMode),l(),z(C(10,25,"markdown.preview")),l(2),m("ngIf",e.helpId),l(2),te("matTooltip",C(14,27,e.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(e.fullscreen?"fullscreen_exit":"fullscreen"),l(),Y("!hidden",e.readonly||e.disabled),l(),Y("!hidden",!e.editorMode),l(2),Y("!hidden",e.editorMode),l(),m("data",e.renderValue),l(),m("ngIf",e.readonly||e.disabled))},dependencies:[ce,yt,Pe,Se,zt,xa,qs,Ws,be],styles:[`@charset "UTF-8";.markdown-content{min-width:300px}.markdown-content.tb-edit-mode .tb-markdown-view-container{border:1px solid #c0c0c0}.markdown-content.tb-edit-mode .tb-markdown-view{padding:20px}.markdown-content.tb-edit-mode:not(.tb-fullscreen){padding-bottom:15px}.markdown-content.tb-edit-mode:not(.tb-fullscreen) .markdown-content-editor{min-height:200px;max-height:200px;height:200px}.markdown-content.tb-edit-mode:not(.tb-fullscreen) .tb-markdown-view-container{min-height:200px;max-height:200px;height:200px}.markdown-content.tb-fullscreen{background:#fff}.markdown-content.tb-fullscreen .markdown-content-editor{height:calc(100% - 40px)}.markdown-content .markdown-content-editor{position:relative;height:100%}.markdown-content .tb-markdown-editor{position:absolute;inset:0;border:1px solid #c0c0c0}.markdown-content .tb-markdown-view-container{overflow:auto;height:100%}.markdown-content .markdown-editor-toolbar>*:not(:last-child){margin-right:4px}.markdown-content .markdown-editor-toolbar button.mat-mdc-button-base,.markdown-content .markdown-editor-toolbar button.mat-mdc-button-base.tb-mat-32{background:#dcdcdc59;align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;font-size:.8rem;line-height:15px}.markdown-content .markdown-editor-toolbar button.mat-mdc-button-base:not(.tb-help-popup-button),.markdown-content .markdown-editor-toolbar button.mat-mdc-button-base.tb-mat-32:not(.tb-help-popup-button){color:#7b7b7b}.markdown-content .markdown-editor-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.markdown-content .markdown-editor-toolbar .tb-help-popup-button-loading{background:#f3f3f3}
100`],encapsulation:2});var ov=Cg;pe([fe(),le("design:type",Boolean)],ov.prototype,"required",void 0);var vU={};Ae(vU,{DashboardAutocompleteComponent:()=>cp});y();y();var lp=(()=>{let t=class t{constructor(e,i,o){this.http=e,this.router=i,this.window=o,this.currentUrl=this.router.url.split("?")[0],this.router.events.pipe(Pi(a=>a instanceof Xp)).subscribe(()=>{let a=this.router.url.split("?")[0];this.currentUrl!==a&&(this.stDiffObservable=null,this.currentUrl=a)})}getTenantDashboards(e,i){return this.http.get(`/api/tenant/dashboards${e.toQuery()}`,N(i))}getTenantDashboardsByTenantId(e,i,o){return this.http.get(`/api/tenant/${e}/dashboards${i.toQuery()}`,N(o))}getDashboards(e,i){return this.http.get(`/api/dashboards?dashboardIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getUserDashboards(e,i,o,a){let s=`/api/user/dashboards${o.toQuery()}`;return e&&(s+=`&userId=${e}`),i&&(s+=`&operation=${i}`),this.http.get(s,N(a))}getAllDashboards(e,i,o){let a=`/api/dashboards/all${i.toQuery()}`;return e&&(a+="&includeCustomers=true"),this.http.get(a,N(o))}getCustomerDashboards(e,i,o,a){let s=`/api/customer/${i}/dashboards${o.toQuery()}`;return e&&(s+="&includeCustomers=true"),this.http.get(s,N(a))}getGroupDashboards(e,i,o){return this.http.get(`/api/entityGroup/${e}/dashboards${i.toQuery()}`,N(o))}getDashboard(e,i){return this.http.get(`/api/dashboard/${e}`,N(i))}exportDashboard(e,i=!0,o){let a=`/api/dashboard/${e}`;return i&&(a+="?includeResources=true"),this.http.get(a,N(o))}getDashboardInfo(e,i){return this.http.get(`/api/dashboard/info/${e}`,N(i))}saveDashboard(e,i,o){let a="/api/dashboard";return i&&(Array.isArray(i)?a+=`?entityGroupIds=${i.join(",")}`:a+=`?entityGroupId=${i}`),this.http.post(a,e,N(o))}deleteDashboard(e,i){return this.http.delete(`/api/dashboard/${e}`,N(i))}getPublicDashboardLink(e,i){let o=i.additionalInfo.publicCustomerId,a=this.window.location.protocol+"//"+this.window.location.hostname,s=this.window.location.port;return s&&s.length>0&&s!=="80"&&s!=="443"&&(a+=":"+s),a+=`/dashboard/${e.id.id}?publicId=${o}`,a}getHomeDashboard(e){return this.http.get("/api/dashboard/home",N(e))}getTenantHomeDashboardInfo(e){return this.http.get("/api/tenant/dashboard/home/info",N(e))}getCustomerHomeDashboardInfo(e){return this.http.get("/api/customer/dashboard/home/info",N(e))}setTenantHomeDashboardInfo(e,i){return this.http.post("/api/tenant/dashboard/home/info",e,N(i))}setCustomerHomeDashboardInfo(e,i){return this.http.post("/api/customer/dashboard/home/info",e,N(i))}
100getServerTimeDiff(){if(!this.stDiffObservable){let e="/api/dashboard/serverTime",i=Date.now();this.stDiffObservable=this.http.get(e,dS(!0)).pipe(W(o=>{let a=Date.now();return Math.ceil(o-(i+a)/2)}),bu(1),hu())}return this.stDiffObservable}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(vi),X(Wr))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var _U=["dashboardInput"],hde=[[["","tb-error",""]],[["","tb-hint",""]]],fde=["[tb-error]","[tb-hint]"],gde=(n,t,r)=>({"tb-inline-field":n,flex:t,"tb-suffix-absolute":r}),bde=n=>({entity:n});function _de(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b();l(),z(r.label)}}function vde(n,t){if(n&1&&(d(0,"a",12),v(1,"translate"),g(2),v(3,"customTranslate"),p()),n&2){let r=b();m("routerLink",r.dashboardURL),Je("aria-label",C(1,3,"dashboard.open-dashboard")),l(2),j(" ",C(3,5,r.displayDashboardFn(r.selectDashboardFormGroup.get("dashboard").value))," ")}}function yde(n,t){if(n&1){let r=B();d(0,"button",13),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",14),g(2,"close"),p()()}}function Cde(n,t){if(n&1&&(d(0,"mat-icon",15),v(1,"translate"),g(2," warning "),p()),n&2){let r=b
100();m("matTooltip",C(1,1,r.requiredText))}}function wde(n,t){if(n&1&&(d(0,"mat-option",16),O(1,"span",17),v(2,"customTranslate"),v(3,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(3,4,C(2,2,r.title),e.searchText),Ut)}}function xde(n,t){n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2&&(l(2),z(C(3,1,"dashboard.no-dashboards-text")))}function Sde(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"async"),p()),n&2){let r=b(2);l(),j(" ",C(2,1,r.translate.get("dashboard.no-dashboards-matching",Xe(3,bde,r.searchText)))," ")}}function Tde(n,t){if(n&1){let r=B();d(0,"mat-option",16)(1,"div",18),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,xde,4,3,"div",19)(3,Sde,3,5,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function Ede(n,t){n&1&&(d(0,"mat-error"),Fe(1),p())}function Ide(n,t){n&1&&(d(0,"mat-hint"),Fe(1,1),p())}var wg=class wg{constructor(t,r,e,i){this.store=t,this.translate=r,this.dashboardService=e,this.fb=i,this.dirty=!1,this.useIdValue=!0,this.selectFirstDashboard=!1,this.label=this.translate.instant("dashboard.dashboard"),this.floatLabel="auto",this.appearance="fill",this.subscriptSizing="fixed",this.searchText="",this.useDashboardLink=!0,this.propagateChange=o=>{},this.authUser=Mr(this.store),this.authUser.authority===Mt.SYS_ADMIN&&(this.useDashboardLink=!1),this.selectDashboardFormGroup=this.fb.group({dashboard:[null,this.required?[ke.required]:[]]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.filteredDashboards=this.selectDashboardFormGroup.get("dashboard").valueChanges.pipe(Wi(150),et(t=>{let r;typeof t=="string"||!t?r=null:r=this.useIdValue?t.id.id:t,this.updateView(r)}),W(t=>t?typeof t=="string"?t:t.name:""),ii(t=>this.fetchDashboards(t)),Si())}selectFirstDashboardIfNeeded(){this.selectFirstDashboard&&!this.modelValue&&this.getDashboards(new On(1,0,null,{property:"title",direction:Xn.ASC})).subscribe(t=>{if(t.data.length){let r=t.data[0];this.modelValue=this.useIdValue?r.id.id:r,this.selectDashboardFormGroup.get("dashboard").patchValue(r,{emitEvent:!1}
100),this.propagateChange(this.modelValue)}})}setDisabledState(t){this.disabled=t,this.disabled?(this.selectDashboardFormGroup.disable({emitEvent:!1}),this.dashboardAutocomplete.closePanel()):this.selectDashboardFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="",t!=null?typeof t=="string"?this.dashboardService.getDashboardInfo(t,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:r=>{this.modelValue=this.useIdValue?r.id.id:r,this.useDashboardLink&&(this.dashboardURL=ml(this.modelValue,G.DASHBOARD)),this.selectDashboardFormGroup.get("dashboard").patchValue(r,{emitEvent:!1})},error:()=>{this.modelValue=null,this.selectDashboardFormGroup.get("dashboard").patchValue("",{emitEvent:!1}),this.required&&this.propagateChange(this.modelValue)}}):(this.modelValue=this.useIdValue?t.id.id:t,this.selectDashboardFormGroup.get("dashboard").patchValue(t,{emitEvent:!1})):(this.modelValue=null,this.selectDashboardFormGroup.get("dashboard").patchValue("",{emitEvent:!1}),this.selectFirstDashboardIfNeeded()),this.dirty=!0}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}displayDashboardFn(t){return t?t.title:void 0}fetchDashboards(t){this.searchText=t;let r=new On(25,0,t,{property:"title",direction:Xn.ASC});return this.getDashboards(r).pipe(vt(()=>Z(yr())),W(e=>e.data))}getDashboards(t){let r,e=Mr(this.store);if(e.authority===Mt.SYS_ADMIN&&this.tenantId)r=this.dashboardService.getTenantDashboardsByTenantId(this.tenantId,t,{ignoreLoading:!0});else if(e.authority===Mt.TENANT_ADMIN&&this.customerId)r=this.dashboardService.getCustomerDashboards(!0,this.customerId,t,{ignoreLoading:!0});else{let i=this.userId;i||(i=e.userId),r=this.dashboardService.getUserDashboards(i,this.operation,t,{ignoreLoading:!0})}return r}onFocus(){this.dirty&&(this.selectDashboardFormGroup.get("dashboard").updateValueAndValidity({onlySelf:!0}),this.dirty=!1)}clear(){this.selectDashboardFormGroup.get("dashboard").patchValue(""),setTimeout(()=>{this.dashboardInput.nativeElement.blur(),this.dashboardInput.nativeElement.focus()},0)}textIsNotEmpty(t){return t&&t.length>0}};wg.\u0275fac=function(r){return new(r||wg)(h(ve),h(Ge),h(lp),h(Wt))},wg.\u0275cmp=L({type:wg,selectors:[["tb-dashboard-autocomplete"]],viewQuery:function(r,e){if(r&1&&(ae(_U,7),ae(_U,7,mi)),r&2){let i;Q(i=K())&&(e.dashboardInput=i.first),Q(i=K())&&(e.dashboardAutocomplete=i.first)}},inputs:{useIdValue:"useIdValue",selectFirstDashboard:"selectFirstDashboard",label:"label",placeholder:"placeholder",userId:"userId",tenantId:"tenantId",customerId:"customerId",operation:"operation",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",inlineField:"inlineField",requiredText:"requiredText",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>wg),multi:!0}])],ngContentSelectors:fde,decls:15,vars:28,consts:[["dashboardInput",""],["dashboardAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","floatLabel","appearance","subscriptSizing"],[4,"ngIf"],["matInput","","type","text","formControlName","dashboard",3,"focusin","placeholder","required","matAutocomplete"],[3,"routerLink",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error",3,"matTooltip",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[3,"routerLink"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"],[3,"value"],[3,"innerHTML"],[3,"click"],[4,"ngIf","ngIfElse"]],template:function(r,e){if(r&1){let i=B();Ct(hde),d(0,"mat-form-field",3),x(1,_de,2,1,"mat-label",4),d(2,"input",5,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(4,vde,4,7,"a",6)(5,yde,3,0,"button",7)(6,Cde,3,3,"mat-icon",8),d(7,"mat-autocomplete",9,1),x(9,wde,4,7,"mat-option",10),v(10,"async"),x(11,Tde,5,3,"mat-option",11),v(12,"async"),p(),x(13,Ede,2,0,"mat-error",4)(14,Ide,2,0,"mat-hint",4),p()}if(r&2){let i,o=me(8);bt(rl(24,gde,e.inlineField,e.inlineField,e.inlineField&&!e.selectDashboardFormGroup.get("dashboard").value)),m("formGroup",e.selectDashboardFormGroup)("floatLabel",e.floatLabel)("appearance",e.inlineField?"outline":e.appearance)("subscriptSizing",e.inlineField?"dynamic":e.subscriptSizing),l(),m("ngIf",!e.inlineField&&e.label),l(),Y("!hidden",e.useDashboardLink&&e.disabled&&e.selectDashboardFormGroup.get("dashboard").value),te("placeholder",e.placeholder),m("required",e.required)("matAutocomplete",o),l(2),m("ngIf",e.useDashboardLink&&e.selectDashboardFormGroup.get("dashboard").value&&e.disabled),l(),m("ngIf",e.selectDashboardFormGroup.get("dashboard").value&&!e.disabled),l(),m("ngIf",e.inlineField&&e.requiredText&&e.selectDashboardFormGroup.get("dashboard").hasError("required")&&e.selectDashboardFormGroup.get("dashboard").touched),l(),m("displayWith",e.displayDashboardFn),l(2),m("ngForOf",C(10,20,e.filteredDashboards)),l(2),m("ngIf",!((i=C(12,22,e.filteredDashboards))!=null&&i.length)),l(2),m("ngIf",!e.inlineField&&e.subscriptSizing!=="dynamic"),l(),m("ngIf",!e.inlineField&&e.subscriptSizing!=="dynamic")}},dependencies:[Ke,ce,ll,Pe,Se,at,ze,At,to,ni,Yt,xt,zt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi,yl],encapsulation:2});var cp=wg;pe([fe(),le("design:type",Boolean)],cp.prototype,"inlineField",void 0);pe([fe(),le("design:type",Boolean)],cp.prototype,"required",void 0);y();y();y();var ih=function(n){return n.default="default",n.scada="scada",n.divider="divider",n}(ih||{}),Vut=Object.keys(ih),Lut=new Map([[ih.default,"dashboard.layout-type-default"],[ih.scada,"dashboard.layout-type-scada"],[ih.divider,"dashboard.layout-type-divider"]]),oI=function(n){return n.grid="grid",n.list="list",n}(oI||{}),But=Object.keys(oI),jut=new Map([[oI.grid,"dashboard.view-format-type-grid"],[oI.list,"dashboard.view-format-type-list"]]),hR=new Map([["default","dashboard.breakpoints-id.default"],["xs","dashboard.breakpoints-id.xs"],["sm","dashboard.breakpoints-id.sm"],["md","dashboard.breakpoints-id.md"],["lg","dashboard.breakpoints-id.lg"],["xl","dashboard.breakpoints-id.xl"]]),fR=new Map([["default","desktop_windows"],["xs","phone_iphone"],["sm","tablet_mac"],["md","computer"],["lg","monitor"],["xl","desktop_windows"]]),Gut=n=>n&&n.assignedCustomers?n.assignedCustomers.filter(t=>t.public).length>0:!1,zut=n=>n&&n.assignedCustomers&&n.assignedCustomers.length>0?n.assignedCustomers.filter(t=>!t.public).map(t=>t.title).join(", "):"",$ut=(n,t)=>t&&n&&n.assignedCustomers?n.assignedCustomers.filter(r=>r.public&&t===r.customerId.id).length>0:!1;y();var ht=function(n){return n.singleEntity="singleEntity",n.entityGroup="entityGroup",n.entityList="entityList",n.entityName="entityName",n.entityType="entityType",n.entityGroupList="entityGroupList",n.entityGroupName="entityGroupName",n.entitiesByGroupName="entitiesByGroupName",n.stateEntity="stateEntity",n.stateEntityOwner="stateEntityOwner",n.assetType="assetType",n.deviceType="deviceType",n.entityViewType="entityViewType",n.edgeType="edgeType",n.apiUsageState="apiUsageState",n.relationsQuery="relationsQuery",n.assetSearchQuery="assetSearchQuery",n.deviceSearchQuery="deviceSearchQuery",n.entityViewSearchQuery="entityViewSearchQuery",n.edgeSearchQuery="edgeSearchQuery",n.schedulerEvent="schedulerEvent",n}(ht||{}),yU=new Array(ht.edgeType,ht.edgeSearchQuery),CU=new Map([[ht.singleEntity,"alias.filter-type-single-entity"],[ht.entityGroup,"alias.filter-type-entity-group"],[ht.entityList,"alias.filter-type-entity-list"],[ht.entityName,"alias.filter-type-entity-name"],[ht.entityType,"alias.filter-type-entity-type"],[ht.entityGroupList,"alias.filter-type-entity-group-list"],[ht.entityGroupName,"alias.filter-type-entity-group-name"],[ht.entitiesByGroupName,"alias.filter-type-entities-by-group-name"],[ht.stateEntity,"alias.filter-type-state-entity"],[ht.stateEntityOwner,"alias.filter-type-state-entity-owner"],[ht.assetType,"alias.filter-type-asset-type"],[ht.deviceType,"alias.filter-type-device-type"],[ht.entityViewType,"alias.filter-type-entity-view-type"],[ht.edgeType,"alias.filter-type-edge-type"],[ht.apiUsageState,"alias.filter-type-apiUsageState"],[ht.relationsQuery,"alias.filter-type-relations-query"],[ht.assetSearchQuery,"alias.filter-type-asset-search-query"],[ht.deviceSearchQuery,"alias.filter-type-device-search-query"],[ht.entityViewSearchQuery,"alias.filter-type-entity-view-search-query"],[ht.edgeSearchQuery,"alias.filter-type-edge-search-query"],[ht.schedulerEvent,"alias.filter-type-scheduler-event"]]),wU=new Map(CU);wU.set(ht.stateEntity,"alias.filter-type-state-entity-originator");wU.set(ht.stateEntityOwner,"alias.filter-type-state-entity-owner-originator");var xU=new Map(CU);xU.set(ht.stateEntity,"alias.filter-type-state-entity-master-report");xU.set(ht.stateEntityOwner,"alias.filter-type-state-entity-owner-master-report");var e1=(n,t)=>{let r;for(let e of Object.keys(n))if(kde(n[e],t)){r=e;break}if(!r){let e=Dde(n,t.alias);r=Zr(),n[r]={id:r,alias:e,filter:t.filter}}return r},kde=(n,t)=>Fn(n.filter,t.filter),Dde=(n,t)=>{let r=0,e=t,i=!1;for(;!i;){i=!0;for(let o of Object.keys(n)){let a=n[o];e===a.alias&&(r++,e=t+r,i=!1)}}return e};y();y();y();var br=function(n){return n.ATTRIBUTE="ATTRIBUTE",n.CLIENT_ATTRIBUTE="CLIENT_ATTRIBUTE",n.SHARED_ATTRIBUTE="SHARED_ATTRIBUTE",n.SERVER_ATTRIBUTE="SERVER_ATTRIBUTE",n.TIME_SERIES="TIME_SERIES",n.ENTITY_FIELD="ENTITY_FIELD",n.ALARM_FIELD="ALARM_FIELD",n.CONSTANT="CONSTANT",n.COUNT="COUNT",n}(br||{}),tht=new Map([[br.ATTRIBUTE,"filter.key-type.attribute"],[br.TIME_SERIES,"filter.key-type.timeseries"],[br.ENTITY_FIELD,"filter.key-type.entity-field"],[br.CONSTANT,"filter.key-type.constant"],[br.CLIENT_ATTRIBUTE,"filter.key-type.client-attribute"],[br.SERVER_ATTRIBUTE,"filter.key-type.server-attribute"],[br.SHARED_ATTRIBUTE,"filter.key-type.shared-attribute"]]);function iht(n){switch(n){case br.ATTRIBUTE:case br.CLIENT_ATTRIBUTE:case br.SHARED_ATTRIBUTE:case br.SERVER_ATTRIBUTE:return Zi.attribute;case br.TIME_SERIES:return Zi.timeseries;case br.ENTITY_FIELD:return Zi.entityField;case br.ALARM_FIELD:return Zi.alarm;case br.COUNT:return Zi.count}}function Mde(n){switch(n){case Zi.timeseries:return br.TIME_SERIES;case Zi.attribute:return br.ATTRIBUTE;case Zi.function:return br.ENTITY_FIELD;case Zi.alarm:return br.ALARM_FIELD;case Zi.entityField:return br.ENTITY_FIELD;case Zi.count:return br.COUNT}}function nht(n){return{key:n.name,type:Mde(n.type)}}var bs=function(n){return n.STRING="STRING",n.NUMERIC="NUMERIC",n.BOOLEAN="BOOLEAN",n.DATE_TIME="DATE_TIME",n}(bs||{}),rht=new Map([[bs.STRING,{name:"filter.value-type.string",icon:"mdi:format-text"}],[bs.NUMERIC,{name:"filter.value-type.numeric",icon:"mdi:numeric"}],[bs.BOOLEAN,{name:"filter.value-type.boolean",icon:"mdi:checkbox-marked-outline"}],[bs.DATE_TIME,{name:"filter.value-type.date-time",icon:"mdi:calendar-clock"}]]);function Ade(n){switch(n){case bs.STRING:return pa.STRING;case bs.NUMERIC:case bs.DATE_TIME:return pa.NUMERIC;case bs.BOOLEAN:return pa.BOOLEAN}}function oht(n,t){return{keyFilterPredicate:Pde(n,t),userInfo:Ode()}}function Ode(){return{editable:!0,label:"",autogeneratedLabel:!0,order:0,unit:""}}
100function Pde(n,t){let r={type:t?pa.COMPLEX:Ade(n)};switch(r.type){case pa.STRING:r.operation=Ic.STARTS_WITH,r.value={defaultValue:""},r.ignoreCase=!1;break;case pa.NUMERIC:r.operation=nh.EQUAL,r.value={defaultValue:n===bs.DATE_TIME?Date.now():0};break;case pa.BOOLEAN:r.operation=aI.EQUAL,r.value={defaultValue:!1};break;case pa.COMPLEX:r.operation=xg.AND,r.predicates=[];break}return r}function aht(n){let t=[hd.CURRENT_TENANT,hd.CURRENT_CUSTOMER];return n?t.push(hd.CURRENT_USER):t.push(hd.CURRENT_DEVICE),t}var pa=function(n){return n.STRING="STRING",n.NUMERIC="NUMERIC",n.BOOLEAN="BOOLEAN",n.COMPLEX="COMPLEX",n}(pa||{}),Ic=function(n){return n.EQUAL="EQUAL",n.NOT_EQUAL="NOT_EQUAL",n.STARTS_WITH="STARTS_WITH",n.ENDS_WITH="ENDS_WITH",n.CONTAINS="CONTAINS",n.NOT_CONTAINS="NOT_CONTAINS",n.IN="IN",n.NOT_IN="NOT_IN",n}(Ic||{}),SU=new Map([[Ic.EQUAL,"filter.operation.equal"],[Ic.NOT_EQUAL,"filter.operation.not-equal"],[Ic.STARTS_WITH,"filter.operation.starts-with"],[Ic.ENDS_WITH,"filter.operation.ends-with"],[Ic.CONTAINS,"filter.operation.contains"],[Ic.NOT_CONTAINS,"filter.operation.not-contains"],[Ic.IN,"filter.operation.in"],[Ic.NOT_IN,"filter.operation.not-in"]]),nh=function(n){return n.EQUAL="EQUAL",n.NOT_EQUAL="NOT_EQUAL",n.GREATER="GREATER",n.LESS="LESS",n.GREATER_OR_EQUAL="GREATER_OR_EQUAL",n.LESS_OR_EQUAL="LESS_OR_EQUAL",n}(nh||{}),TU=new Map([[nh.EQUAL,"filter.operation.equal"],[nh.NOT_EQUAL,"filter.operation.not-equal"],[nh.GREATER,"filter.operation.greater"],[nh.LESS,"filter.operation.less"],[nh.GREATER_OR_EQUAL,"filter.operation.greater-or-equal"],[nh.LESS_OR_EQUAL,"filter.operation.less-or-equal"]]),aI=function(n){return n.EQUAL="EQUAL",n.NOT_EQUAL="NOT_EQUAL",n}(aI||{}),EU=new Map([[aI.EQUAL,"filter.operation.equal"],[aI.NOT_EQUAL,"filter.operation.not-equal"]]),xg=function(n){return n.AND="AND",n.OR="OR",n}(xg||{}),Rde=new Map([[xg.AND,"filter.operation.and"],[xg.OR,"filter.operation.or"]]),hd=function(n){return n.CURRENT_TENANT="CURRENT_TENANT",n.CURRENT_CUSTOMER="CURRENT_CUSTOMER",n.CURRENT_USER="CURRENT_USER",n.CURRENT_DEVICE="CURRENT_DEVICE",n}(hd||{}),Fde=new Map([[hd.CURRENT_TENANT,"filter.current-tenant"],[hd.CURRENT_CUSTOMER,"filter.current-customer"],[hd.CURRENT_USER,"filter.current-user"],[hd.CURRENT_DEVICE,"filter.current-device"]]),sht=[hd.CURRENT_CUSTOMER,hd.CURRENT_DEVICE];function lht(n,t,r){let e=r.map(o=>Nde(n,t,o,r.length>1?xg.AND:void 0)),i;if(e.length>1){let o=n.instant("filter.operation.and");i=e.join(' <span class="tb-filter-complex-operation">'+o+"</span> ")}else i=e[0];return i}function Nde(n,t,r,e){let i=r.predicate;return IU(n,t,r,i,e)}function IU(n,t,r,e,i){if(e.type===pa.COMPLEX){let o=e,a=o.operation,s=o.predicates.map(c=>IU(n,t,r,c,a));if(s.length>1){let c=n.instant(Rde.get(a)),u=s.join(' <span class="tb-filter-complex-operation">'+c+"</span> ");return a===xg.OR&&i&&xg.OR!==i&&(u=`<span class="tb-filter-bracket"><span class="tb-left-bracket">(</span>${u}<span class="tb-right-bracket">)</span></span>`),u}else return s[0]}else return Vde(n,t,r,e)}function Vde(n,t,r,e){let i=r.key.key,o,a,s=e.value,c=!!s.dynamicValue&&!!s.dynamicValue.sourceType;switch(c&&(a='<span class="tb-filter-dynamic-value"><span class="tb-filter-dynamic-source">'+n.instant(Fde.get(s.dynamicValue.sourceType))+"</span>",a+='.<span class="tb-filter-value">'+s.dynamicValue.sourceAttribute+"</span></span>"),e.type){case pa.STRING:o=n.instant(SU.get(e.operation)),e.ignoreCase&&(o+=" "+n.instant("filter.ignore-case")),c||(a=`'${e.value.defaultValue}'`);break;case pa.NUMERIC:o=n.instant(TU.get(e.operation)),c||(r.valueType===bs.DATE_TIME?a=t.transform(e.value.defaultValue,"yyyy-MM-dd HH:mm"):a=e.value.defaultValue+"");break;case pa.BOOLEAN:o=n.instant(EU.get(e.operation)),c||(a=n.instant(e.value.defaultValue?"value.true":"value.false"));break}return c||(a=`<span class="tb-filter-value">${a}</span>`),`<span class="tb-filter-predicate"><span class="tb-filter-entity-key">${i}</span> <span class="tb-filter-simple-operation">${o}</span> ${a}</span>`}function kU(n){if(!n)return[];let t=[];for(let r of n){let e=r.key;for(let i of r.predicates){let o={key:e,valueType:r.valueType,value:r.value,predicate:gR(i)};t.push(o)}}return t}function DU(n){let t=[],r={};if(n)for(let e of n){let i=e.key,o=i.key+i.type+e.valueType,a=r[o];a||(a={key:i,valueType:e.valueType,value:e.value,predicates:[]},r[o]=a,t.push(a)),e.predicate&&a.predicates.push(MU(e.predicate))}return t}function cht(n){let t=n.keyFilters,r=[];for(let e of t){let i=e.key;for(let o of e.predicates){let a={key:i,valueType:e.valueType,value:e.value,predicate:gR(o)};r.push(a)}}return r}function gR(n){let t=n.keyFilterPredicate;if(t.type===pa.COMPLEX){let r=t,e=r.predicates.map(i=>gR(i));t={type:pa.COMPLEX,operation:r.operation,predicates:e}}return t}function MU(n){let t={keyFilterPredicate:null,userInfo:null};if(n.type===pa.COMPLEX){let r=n,e=r.predicates.map(i=>MU(i));t.keyFilterPredicate={predicates:e,operation:r.operation,type:pa.COMPLEX}}else t.keyFilterPredicate=n;return t}function dht(n){return n.editable?n.keyFilters.some(t=>Lde(t)):!1}function Lde(n){return n.predicates.some(t=>AU(t))}function AU(n){return n.keyFilterPredicate.type===pa.COMPLEX?n.keyFilterPredicate.predicates.some(r=>AU(r)):n.userInfo.editable}function pht(n,t){let r=n.keyFilters.map(i=>Bde(i,t)),e=[].concat.apply([],r);return e=e.sort((i,o)=>{let a=dt(i.info.userInfo.order)?i.info.userInfo.order:0,s=dt(o.info.userInfo.order)?o.info.userInfo.order:0;return a-s}),e}function Bde(n,t){let r=n.predicates.map(e=>OU(n.key,n.valueType,e,t));return[].concat.apply([],r)}function OU(n,t,r,e){if(r.keyFilterPredicate.type===pa.COMPLEX){let o=r.keyFilterPredicate.predicates.map(a=>OU(n,t,a,e));return[].concat.apply([],o)}else if(r.userInfo.editable){let i={info:r,label:r.userInfo.label,unit:r.userInfo.unit,valueType:t};return r.userInfo.autogeneratedLabel&&(i.label=jde(n.key,t,r.keyFilterPredicate.operation,e)),[i]}else return[]}
100function jde(n,t,r,e){let i=n,o;switch(t){case bs.STRING:o=SU.get(r);break;case bs.NUMERIC:case bs.DATE_TIME:o=TU.get(r);break;case bs.BOOLEAN:o=EU.get(r);break}return i+=" "+e.instant(o),i}var mht=(n,t)=>n===t||(ga(n)||sc(n))&&(ga(t)||sc(t))?!0:De(n)&&De(t)?!(!hf(n.typeList,t.typeList)||!hf(n.statusList,t.statusList)||!hf(n.severityList,t.severityList)||!uf(n.assigneeId,t.assigneeId)||!uf(n.searchPropagatedAlarms,t.searchPropagatedAlarms)||!uf(n.assignedToCurrentUser,t.assignedToCurrentUser)):!1;function uht(n){return n.sortOrder?(n.sortOrder.direction+"").toLowerCase():""}function av(n){return{pageSize:n,page:0,sortOrder:{key:{type:br.ENTITY_FIELD,key:"createdTime"},direction:Xn.DESC}}}var bR=av(1),PU=n=>({type:ht.singleEntity,singleEntity:{entityType:G.DEVICE,id:n}});function hht(n,t,r,e){let i=e,o=n[t];if(o){let a=o[r];a&&De(a.value)&&(i=a.value)}return i}function fht(n,t){let r=n.data.map(i=>i.entityId.id),e=t.data.map(i=>i.entityId.id);return!Fn(r,e)}var _R=[{type:br.ENTITY_FIELD,key:"name"},{type:br.ENTITY_FIELD,key:"label"},{type:br.ENTITY_FIELD,key:"additionalInfo"}];function vR(n){let t={id:n.entityId.id,entityType:n.entityId.entityType};if(n.latest&&n.latest[br.ENTITY_FIELD]){let r=n.latest[br.ENTITY_FIELD];if(r.name?t.name=r.name.value:t.name="",r.label?t.label=r.label.value:t.label="",t.entityDescription="",r.additionalInfo){let e=r.additionalInfo.value;if(e&&e.length)try{let i=JSON.parse(e);i&&i.description&&(t.entityDescription=i.description)}catch{}}r.queueName&&r.serviceId&&(t.name=r.queueName.value+"_"+r.serviceId.value)}return t}function ght(n,t,r=!1){n.entity={id:{entityType:t.entityType,id:t.id}}
100,n.entityId=t.id,n.entityType=t.entityType,(n.type===qi.entity||n.type===qi.entityCount||n.type===qi.alarmCount)&&(n.type===qi.entity&&(n.entityName=t.name,n.entityLabel=t.label,n.name=t.name,n.entityDescription=t.entityDescription,n.entity.label=t.label,n.entity.name=t.name),r&&(n.entityFilter={type:ht.singleEntity,singleEntity:{id:t.id,entityType:t.entityType}}))}var sI=(n,t)=>{let r;for(let e of Object.keys(n))if(Gde(n[e],t)){r=e;break}if(!r){let e=zde(n,t.filter);r=Zr(),n[r]={id:r,filter:e,keyFilters:t.keyFilters,editable:t.editable}}return r},Gde=(n,t)=>Fn(n.keyFilters,t.keyFilters),zde=(n,t)=>{let r=0,e=t,i=!1;for(;!i;){i=!0;for(let o of Object.keys(n)){let a=n[o];e===a.filter&&(r++,e=t+r,i=!1)}}return e};var yR=[G.CUSTOMER,G.ASSET,G.DEVICE,G.USER,G.ENTITY_VIEW,G.DASHBOARD,G.EDGE],xht=[Eu.openDashboard,Eu.custom],Sht={actionCellButton:{name:"widget-action.action-cell-button",value:"actionCellButton",multiple:!0},rowClick:{name:"widget-action.row-click",value:"rowClick",multiple:!0}},t1=function(n){return n.onRowClick="onRowClick",n.onActionButtonClick="onActionButtonClick",n.disabled="disabled",n}(t1||{}),Tht=new Map([[t1.onRowClick,"entity-group.details-mode.on-row-click"],[t1.onActionButtonClick,"entity-group.details-mode.on-action-button-click"],[t1.disabled,"entity-group.details-mode.disabled"]]),lI=function(n){return n.ASC="ASC",n.DESC="DESC",n.NONE="NONE",
100n}(lI||{}),Eht=new Map([[lI.ASC,"entity-group.sort-order.asc"],[lI.DESC,"entity-group.sort-order.desc"],[lI.NONE,"entity-group.sort-order.none"]]),Il=function(n){return n.CLIENT_ATTRIBUTE="CLIENT_ATTRIBUTE",n.SHARED_ATTRIBUTE="SHARED_ATTRIBUTE",n.SERVER_ATTRIBUTE="SERVER_ATTRIBUTE",n.TIMESERIES="TIMESERIES",n.ENTITY_FIELD="ENTITY_FIELD",n}(Il||{}),Iht=new Map([[Il.CLIENT_ATTRIBUTE,"entity-group.column-type.client-attribute"],[Il.SHARED_ATTRIBUTE,"entity-group.column-type.shared-attribute"],[Il.SERVER_ATTRIBUTE,"entity-group.column-type.server-attribute"],[Il.TIMESERIES,"entity-group.column-type.timeseries"],[Il.ENTITY_FIELD,"entity-group.column-type.entity-field"]]),kht={created_time:{name:"entity-group.entity-field.created-time",value:"created_time",time:!0},name:{name:"entity-group.entity-field.name",value:"name"},type:{name:"entity-group.entity-field.type",value:"type"},device_profile:{name:"entity-group.entity-field.device_profile",value:"device_profile"},asset_profile:{name:"entity-group.entity-field.asset_profile",value:"asset_profile"},assigned_customer:{name:"entity-group.entity-field.assigned_customer",value:"assigned_customer"},authority:{name:"entity-group.entity-field.authority",value:"authority"},first_name:{name:"entity-group.entity-field.first_name",value:"first_name"},last_name:{name:"entity-group.entity-field.last_name",value:"last_name"},email:{name:"entity-group.entity-field.email",value:"email"},title:{name:"entity-group.entity-field.title",value:"title"},country:{name:"entity-group.entity-field.country",value:"country"},state:{name:"entity-group.entity-field.state",value:"state"},city:{name:"entity-group.entity-field.city",value:"city"},address:{name:"entity-group.entity-field.address",value:"address"},address2:{name:"entity-group.entity-field.address2",value:"address2"},zip:{name:"entity-group.entity-field.zip",value:"zip"},phone:{name:"entity-group.entity-field.phone",value:"phone"},label:{name:"entity-group.entity-field.label",value:"label"}},$de={created_time:"createdTime",assigned_customer:"assignedCustomer",first_name:"firstName",last_name:"lastName",device_profile:"type",asset_profile:"type"},CR=(n,t)=>(t&&(n===G.DEVICE?t.columns&&t.columns.filter(r=>r.key==="type").forEach(r=>{r.key="device_profile"}):n===G.ASSET&&t.columns&&t.columns.filter(r=>r.key==="type").forEach(r=>{r.key="asset_profile"})),t),RU=n=>{switch(n){case Il.CLIENT_ATTRIBUTE:return br.CLIENT_ATTRIBUTE;case Il.SHARED_ATTRIBUTE:return br.SHARED_ATTRIBUTE;case Il.SERVER_ATTRIBUTE:return br.SERVER_ATTRIBUTE;case Il.TIMESERIES:return br.TIME_SERIES;case Il.ENTITY_FIELD:return br.ENTITY_FIELD}},FU=n=>{if(n.type===Il.ENTITY_FIELD){let t=$de[n.key];return t||n.key}else return n.key},Dht=n=>({type:RU(n.type),key:FU(n)}),Mht=n=>{let t={};for(let r of Object.keys(Il)){let e=Il[r],i=n.filter(o=>o.type===e);if(i.length){i=i.filter((a,s,c)=>c.map(u=>u.property).indexOf(a.property)===s);let o=RU(e);t[o]=i}}return t},Aht=(n,t,r=!1)=>{let e={id:n.entityId,name:""};if(n.latest){if(n.latest[br.ENTITY_FIELD]){let i=n.latest[br.ENTITY_FIELD];i.name?e.name=i.name.value:e.name=""}for(let i of Object.keys(t)){let o=n.latest[i],a=t[i];if(o)for(let s of a){let c=FU(s),u=o[c];u&&(e[s.property]=u.value)}if(!r)for(let s of a)ga(e[s.property])&&(e[s.property]="")}}return e},Oht=(n,t)=>{let r={dynamic:!1,pageSize:n.pageSize,page:n.page,textSearch:n.textSearch,sortOrder:null};if(n.sortOrder&&n.sortOrder.property){let e=t[n.sortOrder.property];e&&(r.sortOrder={key:e,direction:n.sortOrder.direction})}return r},Pht=(n,t)=>(t=re({groupTableTitle:"",enableSearch:!0,enableAdd:!0,enableDelete:!0,enableSelection:!0,enableGroupTransfer:!0,detailsMode:t1.onRowClick,displayPagination:!0,defaultPageSize:10,pageStepIncrement:10,pageStepCount:3},t),n===G.DEVICE&&(t=re({enableCredentialsManagement:!0},t)),n===G.USER&&(t=re({enableLoginAsUser:!0},t)),n===G.CUSTOMER&&(t=re({enableUsersManagement:!0,enableCustomersManagement:!0,enableAssetsManagement:!0,enableDevicesManagement:!0,enableEntityViewsManagement:!0,enableDashboardsManagement:!0,enableEdgesManagement:!0},t)),n===G.EDGE&&(t=re({enableUsersManagement:!0,enableAssetsManagement:!0,enableDevicesM
100anagement:!0,enableEntityViewsManagement:!0,enableDashboardsManagement:!0,enableSchedulerEventsManagement:!0},t)),t),Ude=(n,t=!1)=>{let r=t?"shared-":"";switch(n){case G.ASSET:return`entity-group.${r}asset-groups`;case G.DEVICE:return`entity-group.${r}device-groups`;case G.CUSTOMER:return`entity-group.${r}customer-groups`;case G.USER:return"entity-group.user-groups";case G.ENTITY_VIEW:return`entity-group.${r}entity-view-groups`;case G.DASHBOARD:return`entity-group.${r}dashboard-groups`;case G.EDGE:return`entity-group.${r}edge-groups`}},Rht=n=>{switch(n){case G.ASSET:case G.DEVICE:case G.CUSTOMER:case G.USER:case G.ENTITY_VIEW:case G.DASHBOARD:case G.EDGE:return Ude(n);case G.SCHEDULER_EVENT:return"scheduler.scheduler";case G.RULE_CHAIN:return"rulechain.rulechains";case G.INTEGRATION:return"edge.integrations"}},Fht=n=>{let t=re({},n.params),r=re({},n.data),e;for(n.data.backNavigationCommands&&(e=r.backNavigationCommands);n.parent!==null;)n=n.parent,t.entityGroupId&&n.params.entityGroupId&&!Fn(t.entityGroupId,n.params.entityGroupId)&&(t.childEntityGroupId=t.entityGroupId),r.groupType&&n.data.groupType&&!Fn(r.groupType,n.data.groupType)&&(r.childGroupType=r.groupType),ga(r.edgeEntitiesGroupId)&&(r.edgeEntitiesGroupId=t.childEntityGroupId),t=re(re({},t),n.params),r=re(re({},r),n.data),n.data.backNavigationCommands&&!e&&(e=r.backNavigationCommands);return{customerId:t.customerId,entityGroupId:t.entityGroupId,groupType:r.groupType,shared:r.shared,childEntityGroupId:t.childEntityGroupId,childGroupType:r.childGroupType,edgeId:t.edgeId,edgeEntitiesType:r.edgeEntitiesType,edgeEntitiesGroupId:r.edgeEntitiesGroupId,backNavigationCommands:e}};y();y();var rh=function(n){return n.MD5="MD5",n.SHA256="SHA256",n.SHA384="SHA384",n.SHA512="SHA512",n.CRC32="CRC32",n.MURMUR3_32="MURMUR3_32",n.MURMUR3_128="MURMUR3_128",n}(rh||{}),Bht=new Map([[rh.MD5,"MD5"],[rh.SHA256,"SHA-256"],[rh.SHA384,"SHA-384"],[rh.SHA512,"SHA-512"],[rh.CRC32,"CRC-32"],[rh.MURMUR3_32,"MURMUR3-32"],[rh.MURMUR3_128,"MURMUR3-128"]]),As=function(n){return n.FIRMWARE="FIRMWARE",n.SOFTWARE="SOFTWARE",n}(As||{}),jht=new Map([[As.FIRMWARE,"ota-update.types.firmware"],[As.SOFTWARE,"ota-update.types.software"]]),sv=new Map([[As.FIRMWARE,{label:"ota-update.assign-firmware",required:"ota-update.assign-firmware-required",noFound:"ota-update.no-firmware-text",noMatching:"ota-update.no-firmware-matching",hint:"ota-update.chose-firmware-distributed-device"}],[As.SOFTWARE,{label:"ota-update.assign-software",required:"ota-update.assign-software-required",noFound:"ota-update.no-software-text",noMatching:"ota-update.no-software-matching",hint:"ota-update.chose-software-distributed-device"}]]);y();var Hde={};Ae(Hde,{ColorPickerDialogComponent:()=>Sg});y();var Sg=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.color=o.color,this.colorClearButton=o.colorClearButton,this.useThemePalette=o.useThemePalette,this.disableAlpha=o.disableAlpha}selectColor(e){this.dialogRef.close({color:e})}cancel(){this.dialogRef.close({canceled:!0})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-color-picker-dialog"]],features:[Ce],decls:2,vars:4,consts:[["mat-dialog-content",""],["colorCancelButton","",3,"colorCancelDialog","colorSelected","color","colorClearButton","useThemePalette","disableAlpha"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"tb-color-picker-panel",1),T("colorCancelDialog",function(){return o.cancel()})("colorSelected",function(s){return o.selectColor(s)}),p()()),i&2&&(l(),m("color",o.color)("colorClearButton",o.colorClearButton)("useThemePalette",o.useThemePalette)("disableAlpha",o.disableAlpha))},styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-close-button[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px}[_nghost-%COMP%]     .mat-mdc-dialog-content{max-height:100%;overflow:hidden;padding:12px 4px 12px 12px!important}@media screen and (min-width: 600px) and (max-width: 959px){[_nghost-%COMP%]     .tb-color-picker-panel{width:342px}[_nghost-%COMP%]     .tb-color-picker-panel .color-input-container{flex-direction:column!important}[_nghost-%COMP%]     .tb-color-picker-panel .color-presets-component color-preset{width:48px}}@media screen and (max-width: 599px){[_nghost-%COMP%]     .tb-color-picker-panel{width:100%}[_nghost-%COMP%]     .tb-color-picker-panel .hex-input{flex:1;max-width:100%!important}}']});let n=t;return n})();var qde={};Ae(qde,{MaterialIconsDialogComponent:()=>Tg});y();var Tg=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.selectedIcon=o.icon,this.iconClearButton=o.iconClearButton}selectIcon(e){this.dialogRef.close({icon:e})}cancel(){this.dialogRef.close({canceled:!0})}};
100t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-material-icons-dialog"]],features:[ne([]),Ce],decls:5,vars:2,consts:[["mat-dialog-content",""],["mat-icon-button","","type","button",1,"tb-close-button",3,"click"],[3,"iconSelected","selectedIcon","iconClearButton"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"button",1),T("click",function(){return o.cancel()}),d(2,"mat-icon"),g(3,"close"),p()(),d(4,"tb-material-icons",2),T("iconSelected",function(s){return o.selectIcon(s)}),p()()),i&2&&(l(4),m("selectedIcon",o.selectedIcon)("iconClearButton",o.iconClearButton))},styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-close-button[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px}']});let n=t;return n})();var Wde={};Ae(Wde,{ConfirmDialogComponent:()=>lv});y();var lv=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,o),this.store=e,this.router=i,this.dialogRef=o,this.data=a}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(en),h(un))},t.\u0275cmp=L({type:t,selectors:[["tb-confirm-dialog"]],features:[Ce],decls:9,vars:9,consts:[["mat-dialog-title","","tbTruncateWithTooltip",""],["mat-dialog-content","",3,"innerHTML"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary",3,"mat-dialog-close"],["mat-button","","color","primary","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(i,o){i&1&&(d(0,"h2",0),g(1),p(),O(2,"div",1),v(3,"safe"),d(4,"div",2)(5,"button",3),g(6),p(),d(7,"button",4),g(8),p()()),i&2&&(l(),z(o.data.title),l(),m("innerHTML",ft(3,6,o.data.message,"html"),Ut),l(3),m("mat-dialog-close",!1),l(),z(o.data.cancel),l(),m("mat-dialog-close",!0),l(),z(o.data.ok))},dependencies:[yt,kb,Mu,gr,Dn,Sc,mc],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]{padding:0 24px 24px}']});let n=t;return n})();y();function Yde(n,t){if(n&1&&(d(0,"mat-expansion-panel")(1,"mat-expansion-panel-header"),g(2),v(3,"translate"),p(),O(4,"small",7),p()),n&2){let r=b
100();l(2),z(C(3,2,"dialog.error-details-title")),l(2),m("innerHTML",r.errorDetails,Ut)}}var i1=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,o),this.store=e,this.router=i,this.dialogRef=o,this.data=a,this.title=this.data.title,this.message=this.data.message,this.errorMessage=this.data.error.message?this.data.error.message:JSON.stringify(this.data.error),this.data.error.stack&&(this.errorDetails=this.data.error.stack.replaceAll(`
101`,"<br/>"))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(en),h(un))},t.\u0275cmp=L({type:t,selectors:[["tb-error-alert-dialog"]],features:[Ce],decls:13,vars:6,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"tb-error-alert-dialog-content"],["translate","",1,"error-message-title"],[1,"error-message-content"],[4,"ngIf"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","cdkFocusInitial","",3,"mat-dialog-close"],[1,"error-details-content",3,"innerHTML"]],template:function(i,o){i&1&&(d(0,"h2",0),g(1),p(),d(2,"div",1)(3,"div"),g(4),p(),d(5,"div",2),g(6,"dialog.error-message-title"),p(),d(7,"div",3),g(8),p(),x(9,Yde,5,4,"mat-expansion-panel",4),p(),d(10,"div",5)(11,"button",6),g(12),p()()),i&2&&(l(),z(o.title),l(3),z(o.message),l(4),j(" ",o.errorMessage," "),l(),m("ngIf",o.errorDetails),l(2),m("mat-dialog-close",!0),l(),z(o.data.ok))},dependencies:[ce,jt,yt,kb,Mu,gr,Dn,Ss,Ts,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]{padding:0 24px 24px}[_nghost-%COMP%]   .tb-error-alert-dialog-content[_ngcontent-%COMP%]   .error-message-title[_ngcontent-%COMP%]{font-style:italic}[_nghost-%COMP%]   .tb-error-alert-dialog-content[_ngcontent-%COMP%]   .error-message-content[_ngcontent-%COMP%]{color:red}[_nghost-%COMP%]   .tb-error-alert-dialog-content[_ngcontent-%COMP%]   .error-details-content[_ngcontent-%COMP%]{display:block;border:solid 1px #d3d3d3;padding:8px;border-radius:4px}[_nghost-%COMP%]   .tb-error-alert-dialog-content[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child){padding-bottom:16px}']});let n=t;return n})();var Qde={};Ae(Qde,{TodoDialogComponent:()=>cv});y();var cv=(()=>{let t=class t{constructor(e){this.dialogRef=e}};t.\u0275fac=function(i){return new(i||t)(h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-todo-dialog"]],decls:8,vars:1,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"flex","flex-row","items-center","justify-end"],["mat-button","","color","primary","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(i,o){i&1&&(d(0,"h2",0),g(1,"Coming soon!"),p(),d(2,"div",1)(3,"h1"),g(4,"COMING SOON!"),p()(),d(5,"div",2)(6,"button",3),g(7,"Ok"),p()()),i&2&&(l(6),m("mat-dialog-close",!0))},dependencies:[yt,kb,Mu,gr,Dn],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]{padding:0 24px 24px}[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:500px}']});let n=t;return n})();y();var n1=(()=>{let t=class t{constructor(e,i){this.dialogRef=e,this.data=i,this.progressText=i.progressText,this.data.progressObservable.subscribe(o=>{this.dialogRef.close(o)},()=>{this.dialogRef.close(null)})}};t.\u0275fac=function(i){return new(i||t)(h(en),h(un))},t.\u0275cmp=L({type:t,selectors:[["tb-progress-dialog"]],decls:7,vars:1,consts:[[2,"min-width","600px"],["color","primary",1,"flex","flex-row"],["mat-dialog-content",""],[1,"mat-content","mat-padding","flex","flex-col"],["mode","indeterminate"]],template:function(i,o){i&1&&(d(0,"form",0)(1,"mat-toolbar",1)(2,"h2"),g(3),p()(),d(4,"div",2)(5,"div",3),O(6,"mat-progress-bar",4),p()()()),i&2&&(l(3),z(o.progressText))},dependencies:[Jr,ir,Dn,ur,We,Qa],encapsulation:2});let n=t;return n})();y();function Kde(n,t){n&1&&O(0,"mat-progress-bar",26)}function Xde(n,t){n&1&&O(0,"div",27)}var r1=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,a),this.store=e,this.router=i,this.window=o,this.dialogRef=a,this.width="100%",this.height="100%",this.whiteLabelingSvg="assets/white-labeling.svg"}gotoWhiteLabelingDoc(){this.window.open("https://thingsboard.io/docs/user-guide/white-labeling/","_blank")}upgrade(){this.dialogRef.close(),this.window.open("https://thingsboard.io/pricing/","_blank")}close(){this.dialogRef.close()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(Wr),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-white-labeling-feature-dialog"]],hostVars:4,hostBindings:function(i,o){i&2&&hi("width",o.width)("height",o.height)},features:[Ce],decls:48,vars:34,consts:[[1,"tb-white-labeling-feature-dialog"],["color","primary",1,"flex","flex-row"],["translate",""],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[2,"text-align","center","padding-top","10px"],[2,"height","120px",3,"src"],[1,"tb-white-labeling-feature-content","enable",2,"margin-bottom","10px"],[1,"flex","flex-row","items-center","justify-center",2,"margin-bottom","16px"],["mat-raised-button","","color","warn","type","button",3,"click","disabled"],[1,"tb-white-labeling-feature-content","flex","flex-row"],[1,"flex","flex-1","flex-col"],[2,"margin-bottom","10px",3,"innerHTML"],[1,"flex","flex-row","items-center","justify-center"],["mat-raised-button","","color","primary","type","button",3,"click","disabled"],[1,"tb-white-labeling-feature-content",2,"margin-bottom","10px",3,"innerHTML"],[1,"flex","flex-row","items-center","justify-center",2,"padding-bottom","10px"],[1,"video"],[1,"video-wrapper"],["src",uB`https://www.youtube.com/embed/4dkbVASJ1J
101U`,"frameborder","0","allowfullscreen",""],["mat-dialog-actions","",1,"flex","flex-row"],["mat-button","","type","button",2,"margin-right","20px",3,"click","disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"mat-toolbar",1)(2,"h2",2),g(3,"subscription.white-labeling-feature"),p(),O(4,"span",3),d(5,"button",4),T("click",function(){return o.close()}),d(6,"mat-icon",5),g(7,"close"),p()()(),x(8,Kde,1,0,"mat-progress-bar",6),v(9,"async"),x(10,Xde,1,0,"div",7),v(11,"async"),d(12,"div",8)(13,"div",9),O(14,"img",10),p(),d(15,"p",11),g(16),v(17,"translate"),p(),d(18,"div",12)(19,"button",13),v(20,"async"),T("click",function(){return o.upgrade()}),d(21,"mat-icon"),g(22,"trending_up"),p(),d(23,"span"),g(24),v(25,"translate"),p()()(),d(26,"div",14)(27,"div",15),O(28,"div",16),v(29,"translate"),d(30,"div",17)(31,"button",18),v(32,"async"),T("click",function(){return o.gotoWhiteLabelingDoc()}),d(33,"span"),g(34),v(35,"translate"),p()()()()(),O(36,"p",19),v(37,"translate"),d(38,"div",20)(39,"div",21)(40,"div",22),O(41,"iframe",23),p()()()(),d(42,"div",24),O(43,"span",3),d(44,"button",25),v(45,"async"),T("click",function(){return o.close()}),g(46),v(47,"translate"),p()()()),i&2&&(l(8),m("ngIf",C(9,12,o.isLoading$)),l(2),m("ngIf",!C(11,14,o.isLoading$)),l(4),m("src",o.whiteLabelingSvg,yo),l(2),z(C(17,16,"subscription.enable-white-labeling")),l(3),m("disabled",C(20,18,o.isLoading$)),l(5),z(C(25,20,"subscription.upgrade-your-plan")),l(4),m("innerHTML",C(29,22,"subscription.white-labeling-text-full"),Ut),l(3),m("disabled",C(32,24,o.isLoading$)),l(3),z(C(35,26,"subscription.read-more")),l(2),m("innerHTML",C(37,28,"subscription.white-labeling-video-text"),Ut),l(8),m("disabled",C(45,30,o.isLoading$)),l(2),j(" ",C(47,32,"action.close")," "))},dependencies:[ce,jt,yt,Pe,Se,Jr,ir,gr,Dn,Ve,be],styles:[`@charset "UTF-8";.tb-white-labeling-feature-dialog{width:100%;height:100%;display:flex;flex-direction:column}.tb-white-labeling-feature-dialog .mat-toolbar{height:64px;min-height:64px}.tb-white-labeling-feature-dialog p.tb-white-labeling-feature-content,.tb-white-labeling-feature-dialog div.tb-white-labeling-feature-content{padding:0 30px;font-size:.9em;font-weight:300;line-height:1.2em;color:#000c;text-align:center}.tb-white-labeling-feature-dialog p.tb-white-labeling-feature-content.enable,.tb-white-labeling-feature-dialog div.tb-white-labeling-feature-content.enable{font-size:1.4em}@media screen and (min-width: 960px){.tb-white-labeling-feature-dialog p.tb-white-labeling-feature-content,.tb-white-labeling-feature-dialog div.tb-white-labeling-feature-content{font-size:1.2em;line-height:1.4em}.tb-white-labeling-feature-dialog p.tb-white-labeling-feature-content.enable,.tb-white-labeling-feature-dialog div.tb-white-labeling-feature-content.enable{font-size:1.8em}}.tb-white-labeling-feature-dialog .video{position:relative;display:block;width:90%;padding:0}@media screen and (min-width: 960px){.tb-white-labeling-feature-dialog .video{width:70%}}@media screen and (min-width: 1280px){.tb-white-labeling-feature-dialog .video{width:50%}}@media screen and (min-width: 1920px){.tb-white-labeling-feature-dialog .video{width:30%}}.tb-white-labeling-feature-dialog .video .video-wrapper{width:100%;padding-bottom:56.25%}.tb-white-labeling-feature-dialog .video .video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}
102`],encapsulation:2});let n=t;return n})();y();var Eg=function(n){return n.LIMIT_REACHED="LIMIT_REACHED",n.FEATURE_DISABLED="FEATURE_DISABLED",n.UNSUPPORTED_SOLUTION_TEMPLATE_PLAN="UNSUPPORTED_SOLUTION_TEMPLATE_PLAN",n}(Eg||{}),dv=function(n){return n.DEVICE_COUNT="DEVICE_COUNT",n.ASSET_COUNT="ASSET_COUNT",n.WHITE_LABELING="WHITE_LABELING",n}(dv||{}),pv=new Map([[Eg.LIMIT_REACHED,new Map([[dv.DEVICE_COUNT,"subscription-error.limit-reached.device-count"],[dv.ASSET_COUNT,"subscription-error.limit-reached.asset-count"]])],[Eg.FEATURE_DISABLED,new Map([[dv.WHITE_LABELING,"subscription-error.feature-disabled.white-labeling"]])]]);y();function Zde(n,t){n&1&&O(0,"mat-progress-bar",16)}function Jde(n,t){n&1&&O(0,"div",17)}var o1=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c){super(e,i,c),this.store=e,this.router=i,this.translate=o,this.data=a,this.window=s,this.dialogRef=c,this.limitReachedSvg="assets/limit-reached.svg";let u=pv.get(a.subscriptionErrorCode).get(a.subscriptionEntry);this.errorContent=this.translate.instant(u,{value:a.value.value})}upgrade(){this.dialogRef.close(),this.window.open("https://thingsboard.io/pricing/","_blank")}close(){this.dialogRef.close()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(Ge),h(un),h(Wr),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-limit-dialog"]],features:[Ce],decls:34,vars:23,consts:[[1,"tb-entity-limit-dialog",2,"width","800px"],["color","primary",1,"flex","flex-row"],["translate",""],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[2,"text-align","center","padding-top","20px"],[2,"height","180px",3,"src"],[1,"tb-entity-limit-content"],[1,"flex","flex-row","items-center","justify-center"],["mat-raised-button","","color","warn","type","button",3,"click","disabled"],["mat-dialog-actions","",1,"flex","flex-row"],["mat-button","","type","button",2,"margin-right","20px",3,"click","disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"mat-toolbar",1)(2,"h2",2),g(3,"subscription-error.title"),p(),O(4,"span",3),d(5,"button",4),T("click",function(){return o.close()}),d(6,"mat-icon",5),g(7,"close"),p()()(),x(8,Zde,1,0,"mat-progress-bar",6),v(9,"async"),x(10,Jde,1,0,"div",7),v(11,"async"),d(12,"div",8)(13,"div",9),O(14,"img",10),p(),d(15,"p",11),g(16),O(17,"br"),g(18),v(19,"translate"),p(),d(20,"div",12)(21,"button",13),v(22,"async"),T("click",function(){return o.upgrade()}),d(23,"mat-icon"),g(24,"trending_up"),p(),d(25,"span"),g(26),v(27,"translate"),p()()()(),d(28,"div",14),O(29,"span",3),d(30,"button",15),v(31,"async"),T("click",function(){return o.close()}),g(32),v(33,"translate"),p()()()),i&2&&(l(8),m("ngIf",C(9,9,o.isLoading$)),l(2),m("ngIf",!C(11,11,o.isLoading$)),l(4),m("src",o.limitReachedSvg,yo),l(2),z(o.errorContent),l(2),z(C(19,13,"subscription.entity-limit-text")),l(3),m("disabled",C(22,15,o.isLoading$)),l(5),z(C(27,17,"subscription.upgrade-your-plan")),l(4),m("disabled",C(31,19,o.isLoading$)),l(2),j(" ",C(33,21,"action.close")," "))},dependencies:[ce,jt,yt,Pe,Se,Jr,ir,gr,Dn,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-entity-limit-dialog[_ngcontent-%COMP%]   p.tb-entity-limit-content[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-entity-limit-dialog[_ngcontent-%COMP%]   div.tb-entity-limit-content[_ngcontent-%COMP%]{padding:0 30px;font-size:1.2em;font-weight:400;line-height:1.4em;color:#000c}']});let n=t;return n})();y();y();var cI=function(n){return n.MAKER="MAKER",n.PROTOTYPE="PROTOTYPE",n.STARTUP="STARTUP",n}(cI||{}),NU=new Map([[cI.MAKER,"Maker"],[cI.PROTOTYPE,"Prototype"],[cI.STARTUP,"Startup"]]);function epe(n,t){n&1&&O(0,"mat-progress-bar",12)}function tpe(n,t){n&1&&O(0,"div",13)}var dI=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c){super(e,i,c),this.store=e,this.router=i,this.translate=o,this.window=a,this.data=s,this.dialogRef=c;let u=NU.get(this.data.solutionTemplateLevel);this.dialogMessage=this.translate.instant("subscription-error.upgrade-subscription-plan-to-install-solution-template",{solutionTemplateName:this.data.solutionTemplateName,planName:u})}upgrade(e){this.dialogRef.close(),this.window.open("https://thingsboard.io/pricing/","_blank")}close(){this.dialogRef.close()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(Ge),h(Wr),h(un),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-unsupported-solution-template-level-dialog"]],features:[Ce],decls:27,vars:19,consts:[["color","primary",1,"flex","flex-row"],["translate",""],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[3,"innerHTML"],["mat-dialog-actions","",1,"flex","flex-row"],["mat-button","","type","button",3,"click","disabled"],["mat-raised-button","","color","warn","type","button",3,"click","disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"]],template:function(i,o){i&1&&(d(0,"div")(1,"mat-toolbar",0)(2,"h2",1),g(3,"subscription-error.upgrade-subscription-plan"),p(),O(4,"span",2),d(5,"button",3),T("click",function(){return o.close()}),d(6,"mat-icon",4),g(7,"close"),p()()(),x(8,epe,1,0,"mat-progress-bar",5),v(9,"async"),x(10,tpe,1,0,"div",6),v(11,"async"),d(12,"div",7),O(13,"div",8),p(),d(14,"div",9),O(15,"span",2),d(16,"button",10),v(17,"async"),T("click",function(){return o.close()}),g(18),v(19,"translate"),p(),d(20,"button",11),v(21,"async"),T("click",function(s){return o.upgrade(s)}),d(22,"mat-icon"),g(23,"trending_up"),p(),d(24,"span"),g(25),v(26,"translate"),p()()()()),i&2&&(l(8),m("ngIf",C(9,7,o.isLoading$)),l(2),m("ngIf",!C(11,9,o.isLoading$)),l(3),m("innerHTML",o.dialogMessage,Ut),l(3),m("disabled",C(17,11,o.isLoading$)),l(2),j(" ",C(19,13,"action.cancel")," "),l(2),m("disabled",C(21,15,o.isLoading$)),l(5),z(C(26,17,"subscription.upgrade-your-plan")))},dependencies:[ce,jt,yt,Pe,Se,Jr,ir,gr,Dn,Ve,be],encapsulation:2});let n=t;return n})();var Sa=(()=>{let t=class t{constructor(e,i,o){this.translate=e,this.authService=i,this.dialog=o}confirm(e,i,o=null,a=null,s=!1){let c={disableClose:!0,data:{title:e,message:i,cancel:o||this.translate.instant("action.cancel"),ok:a||this.translate.instant("action.ok")}};return s&&(c.panelClass=["tb-fullscreen-dialog"]),this.dialog.open(lv,c).afterClosed()}alert(e,i,o=null,a=!1){let s={disableClose:!0,data:{title:e,message:i,ok:o||this.translate.instant("action.ok")}};return a&&(s.panelClass=["tb-fullscreen-dialog"]),this.dialog.open(yC,s).afterClosed()}errorAlert(e,i,o,a=null,s=!1){let c={disableClose:!0,data:{title:e,message:i,error:o,ok:a||this.translate.instant("action.ok")}};return s&&(c.panelClass=["tb-fullscreen-dialog"]),this.dialog.open(i1,c).afterClosed()}colorPicker(e,i=!1,o=!1,a=!1){return this.dialog.open(Sg,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{color:e,colorClearButton:i,useThemePalette:o,disableAlpha:a},autoFocus:!1}).afterClosed()}materialIconPicker(e,i=!1){return this.dialog.open(Tg,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{icon:e,iconClearButton:i},autoFocus:!1}).afterClosed()}subscriptionViolation(e){let i=e.subscriptionErrorCode,o=e.subscriptionEntry;return i===Eg.LIMIT_REACHED?this.entityLimit(e):i===Eg.FEATURE_DISABLED&&o===dv.WHITE_LABELING?this.whiteLabelingFeature
102():i===Eg.UNSUPPORTED_SOLUTION_TEMPLATE_PLAN?this.unsupportedSolutionTemplateLevel(e):this.subscriptionAlert(e)}entityLimit(e){let i=e.subscriptionErrorCode,o=e.subscriptionEntry,a=e.subscriptionValue;return this.dialog.open(o1,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{subscriptionErrorCode:i,subscriptionEntry:o,value:a}}).afterClosed()}whiteLabelingFeature(){return this.dialog.open(r1,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog","tb-fullscreen-dialog-gt-sm"]}).afterClosed()}unsupportedSolutionTemplateLevel(e){let i=e.subscriptionValue;return this.dialog.open(dI,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{solutionTemplateName:i.solutionTemplateName,solutionTemplateLevel:i.solutionTemplateLevel}}).afterClosed()}subscriptionAlert(e){let i=e.subscriptionErrorCode,o=e.subscriptionEntry,a=e.subscriptionValue,s;if(o&&a&&pv.has(i)&&pv.get(i).has(o)){let c=pv.get(i).get(o);s=this.translate.instant(c,{value:a.value})}else s=e.message;return this.alert(this.translate.instant("subscription-error.title"),s,this.translate.instant("action.ok"),!0)}permissionDenied(){this.alert(this.translate.instant("access.permission-denied"),this.translate.instant("access.permission-denied-text"),this.translate.instant("action.close"))}forbidden(){let e=this.confirm(this.translate.instant("access.access-forbidden"),this.translate.instant("access.access-forbidden-text"),this.translate.instant("action.cancel"),this.translate.instant("action.sign-in"),!0);return e.subscribe(i=>{i&&this.authService.logout()}),e}progress(e,i){return this.dialog.open(n1,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{progressObservable:e,progressText:i}}).afterClosed()}todo(){let e={disableClose:!0,panelClass:["tb-fullscreen-dialog"]};return this.dialog.open(cv,e).afterClosed()}};t.\u0275fac=function(i){return new(i||t)(X(Ge),X(Ro),X(Lr))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var oh=(()=>{let t=class t{constructor(e,i,o,a){this.http=e,this.translate=i,this.dialogService=o,this.resourcesService=a}getOtaPackages(e,i){return this.http.get(`/api/otaPackages${e.toQuery()}`,N(i))}getOtaPackagesInfoByDeviceProfileId(e,i,o,a){let s=`/api/otaPackages/${i}/${o}${e.toQuery()}`;return this.http.get(s,N(a))}getOtaPackage(e,i){return this.http.get(`/api/otaPackage/${e}`,N(i))}getOtaPackageInfo(e,i){return this.http.get(`/api/otaPackage/info/${e}`,N(i))}downloadOtaPackage(e){return this.resourcesService.downloadResource(`/api/otaPackage/${e}/download`)}saveOtaPackage(e,i){if(!e.file)return this.saveOtaPackageInfo(e,i);let o=Di(e);return delete o.file,delete o.checksum,delete o.checksumAlgorithm,this.saveOtaPackageInfo(o,i).pipe(Ft(a=>this.uploadOtaPackageFile(a.id.id,e.file,e.checksumAlgorithm,e.checksum).pipe(vt(()=>this.deleteOtaPackage(a.id.id)))))}saveOtaPackageInfo(e,i){return this.http.post("/api/otaPackage",e,N(i))}uploadOtaPackageFile(e,i,o,a,s){s||(s={});let c=new FormData;c.append("file",i);let u=`/api/otaPackage/${e}?checksumAlgorithm=${o}`;return a&&(u+=`&checksum=${a}`),this.http.post(u,c,WB(s.ignoreLoading,s.ignoreErrors,s.resendRequest))}deleteOtaPackage(e,i){return this.http.delete(`/api/otaPackage/${e}`,N(i))}getOtaPackageInfoByDeviceGroupId(e,i,o){let a=`/api/deviceGroupOtaPackage/${e}/${i}`;return this.http.get(a,N(o))}getOtaPackagesInfoByDeviceGroupId(e,i,o,a){let s=`/api/otaPackages/group/${i}/${o}${e.toQuery()}`;return this.http.get(s,N(a))}countUpdateDeviceAfterChangePackage(e,i,o,a){let s;return i.entityType===G.ENTITY_GROUP?s=`/api/devices/count/${e}/${o}/${i.id}`:s=`/api/devices/count/${e}/${i.id}`,this.http.get(s,N(a))}confirmDialogUpdatePackage(e,i){let o=[];if(i?.id?.id&&i.firmwareId?.id!==e.firmwareId?.id){let a=e.firmwareId?.id||i.firmwareId?.id;o.push(this.countUpdateDeviceAfterChangePackage(As.FIRMWARE,e.id,a))}else o.push(Z(0));if(i?.id?.id&&i.softwareId?.id!==e.softwareId?.id){let a=e.softwareId?.id||i.softwareId?.id;o.push(this.countUpdateDeviceAfterChangePackage(As.SOFTWARE,e.id,a))}else o.push(Z(0));return Rn(o).pipe(Ft(([a,s])=>{let c=[];return a>0&&c.push(this.translate.instant("ota-update.change-firmware",{count:a})),s>0&&c.push(this.translate.instant("ota-update.change-software",{count:s})),c.length?this.dialogService.confirm(this.translate.instant("ota-update.change-ota-setting-title"),c.join("<br/>"),null,this.translate.instant("common.proceed")):Z(!0)}))}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(Ge),X(Sa),X(uc))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Dl=(()=>{let t=class t{constructor(e,i){this.http=e,this.otaPackageService=i}getOwners(e,i){return this.http.get(`/api/owners${e.toQuery()}`,N(i))}getOwnerInfos(e,i){return this.http.get(`/api/ownerInfos${e.toQuery()}`,N(i))}getOwnerInfo(e,i){return this.http.get(`/api/ownerInfo/${e.entityType}/${e.id}`,N(i))}getEntityGroup(e,i){return this.http.get(`/api/entityGroup/${e}`,N(i)).pipe(W(o=>(o.configuration=CR(o.type,o.configuration),o)))}getDeviceEntityGroup(e,i){return this.http.get(`/api/entityGroup/${e}`,N(i)).pipe(W(o=>(o.configuration=CR(o.type,o.configuration),o)),Ft(o=>this.fetchOtaPackageGroupInfo(o,i)))}fetchOtaPackageGroupInfo(e,i){if(De(e)&&e.type===G.DEVICE&&!e.groupAll){let o=[];return o.push(this.otaPackageService.getOtaPackageInfoByDeviceGroupId(e.id.id,As.FIRMWARE,i)),o.push(this.otaPackageService.getOtaPackageInfoByDeviceGroupId(e.id.id,As.SOFTWARE,i)),Rn(o).pipe(W(([a,s])=>{let c=e;return De(a)&&(c.firmwareGroup=a,c.firmwareId=Di(a.otaPackageId)),De(s)&&(c.softwareGroup=s,c.softwareId=Di(s.otaPackageId)),c}))}return Z(e)}
102updateDeviceGroupOtaPackage(e,i,o,a,s){if(De(e))return i===null?this.deleteDeviceGroupOtaPackage(e.id,s):i.id!==e.otaPackageId.id?(e.otaPackageId=i,this.saveDeviceGroupOtaPackage(e,s)):Z(e);if(De(i)){let c={otaPackageId:i,otaPackageType:a,groupId:o};return this.saveDeviceGroupOtaPackage(c,s)}return Z(null)}saveDeviceGroupOtaPackage(e,i){return this.http.post("/api/deviceGroupOtaPackage",e,N(i))}saveDeviceEntityGroup(e,i,o){return De(e.id)?this.otaPackageService.confirmDialogUpdatePackage(e,i).pipe(Ft(a=>{if(a){let s=e.firmwareId,c=e.firmwareGroup,u=e.softwareId,f=e.softwareGroup;delete e.firmwareId,delete e.firmwareGroup,delete e.softwareId,delete e.softwareGroup;let _=[this.updateDeviceGroupOtaPackage(c,s,e.id,As.FIRMWARE,o),this.updateDeviceGroupOtaPackage(f,u,e.id,As.SOFTWARE,o),this.saveEntityGroup(e,o)];return Rn(_).pipe(W(([I,S,F])=>Object.assign(F,{firmwareId:Di(I?.otaPackageId),firmwareGroup:I,softwareId:Di(S?.otaPackageId),softwareGroup:S})))}return zr(()=>"Canceled saving device group")})):this.saveEntityGroup(e,o)}deleteDeviceGroupOtaPackage(e,i){return this.http.delete(`/api/deviceGroupOtaPackage/${e}`,N(i))}getEntityGroupEntityInfo(e,i){return this.http.get(`/api/entityGroupInfo/${e}`,N(i))}saveEntityGroup(e,i){return this.http.post("/api/entityGroup",e,N(i))}deleteEntityGroup(e,i){return this.http.delete(`/api/entityGroup/${e}`,N(i))}makeEntityGroupPublic(e,i){return this.http.post(`/api/entityGroup/${e}/makePublic`,null,N(i))}makeEntityGroupPrivate(e,i){return this.http.post(`/api/entityGroup/${e}/makePrivate`,null,N(i))}shareEntityGroup(e,i,o){return this.http.post(`/api/entityGroup/${e}/share`,i,N(o))}getEntityGroups(e,i,o=!0,a){return this.http.get(`/api/entityGroups/${i}${e.toQuery()}&includeShared=${o}`,N(a))}getEntityGroupEntityInfos(e,i,o=!0,a){return this.http.get(`/api/entityGroupInfos/${i}${e.toQuery()}&includeShared=${o}`,N(a))}getAllEntityGroups(e,i,o=!0,a){let s=new On(e,0,null,{property:"name",direction:Xn.ASC});if(e===-1)return s.pageSize=i===G.CUSTOMER?1024:100,this.getAllEntityGroupsByPageLink(s,i,o,a).pipe(W(c=>c&&c.length?c:null));{let c=this.getEntityGroups(s,i,o,a);return c?c.pipe(W(u=>u&&u.data.length?u.data:null)):Z(null)}}getAllEntityGroupsByPageLink(e,i,o=!0,a){let s=this.getEntityGroups(e,i,o,a);return s?s.pipe(af(c=>c.hasNext?(e.page+=1,this.getEntityGroups(e,i,o,a)):Ls),W(c=>c.data),Bd(c=>c),of()):Z(null)}getSharedEntityGroups(e,i,o){return this.http.get(`/api/entityGroups/${i}/shared${e.toQuery()}`,N(o))}getSharedEntityGroupEntityInfos(e,i,o){return this.http.get(`/api/entityGroupInfos/${i}/shared${e.toQuery()}`,N(o))}getEntityGroupIdsForEntityId(e,i,o){return this.http.get(`/api/entityGroups/${e}/${i}`,N(o))}getEntityGroupsByIds(e,i){return this.http.get(`/api/entityGroups?entityGroupIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getEntityGroupEntityInfosByIds(e,i){return this.http.get(`/api/entityGroupInfos?entityGroupIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getEntityGroupsHierarchyByOwnerId(e,i,o,a,s){return this.http.get(`/api/entityGroupsHierarchy/${i}/${o}/${a}${e.toQuery()}`,N(s))}getEntityGroupEntityInfosHierarchyByOwnerId(e,i,o,a,s){return this.http.get(`/api/entityGroupInfosHierarchy/${i}/${o}/${a}${e.toQuery()}`,N(s))}getEntityGroupsByOwnerIdAndPageLink(e,i,o,a,s){return this.http.get(`/api/entityGroups/${e}/${i}/${o}${a.toQuery()}`,N(s))}getEntityGroupsByOwnerId(e,i,o,a){return this.http.get(`/api/entityGroups/${e}/${i}/${o}`,N(a))}getEntityGroupEntityInfosByOwnerId(e,i,o,a,s){return this.http.get(`/api/entityGroupInfos/${i}/${o}/${a}${e.toQuery()}`,N(s))}getAllEntityGroupsByOwnerId(e,i,o,a,s){let c=new On(e,0,null,{property:"name",direction:Xn.ASC});if(e===-1)return c.pageSize=a===G.CUSTOMER?1024:100,this.getAllEntityGroupsByOwnerIdAndPageLink(c,i,o,a,s).pipe(W(u=>u&&u.length?u:null));{let u=this.getEntityGroupsByOwnerIdAndPageLink(i,o,a,c,s);return u?u.pipe(W(f=>f&&f.data.length?f.data:null)):Z(null)}}getAllEntityGroupsByOwnerIdAndPageLink(e,i,o,a,s){let c=this.getEntityGroupsByOwnerIdAndPageLink(i,o,a,e,s);return c?c.pipe(af(u=>u.hasNext?(e.page+=1,this.getEntityGroupsByOwnerIdAndPageLink(i,o,a,e,s)):Ls),W(u=>u.data),Bd(u=>u),of()):Z(null)}getEntityGroupsByPageLink(e,i,o){return this.getEntityGroups(e,i,!0,o)}getEntityGroupAllByOwnerId(e,i,o,a){return this.http.get(`/api/entityGroup/all/${e}/${i}/${o}`,N(a))}addEntityToEntityGroup(e,i,o){return this.http.post(`/api/entityGroup/${e}
102/addEntities`,[i],N(o))}addEntitiesToEntityGroup(e,i,o){return this.http.post(`/api/entityGroup/${e}/addEntities`,i,N(o))}changeEntityOwner(e,i,o,a){return this.http.post(`/api/owner/${e.entityType}/${e.id}/${i.entityType}/${i.id}`,o,N(a))}removeEntityFromEntityGroup(e,i,o){return this.http.post(`/api/entityGroup/${e}/deleteEntities`,[i],N(o))}removeEntitiesFromEntityGroup(e,i,o){return this.http.post(`/api/entityGroup/${e}/deleteEntities`,i,N(o))}getEntityGroupEntity(e,i,o){return this.http.get(`/api/entityGroup/${e}/${i}`,N(o))}getEntityGroupEntities(e,i,o,a){let s=`/api/entityGroup/${e}/`;if(o)switch(o){case G.ASSET:s+="assets";break;case G.CUSTOMER:s+="customers";break;case G.DEVICE:s+="devices";break;case G.USER:s+="users";break;case G.ENTITY_VIEW:s+="entityViews";break;case G.DASHBOARD:s+="dashboards";break;case G.EDGE:s+="edges";break;default:s+="entities"}else s+="entities";return s+=i.toQuery(),this.http.get(s,N(a))}getEdgeEntityGroups(e,i,o,a){return this.http.get(`/api/entityGroups/edge/${i}/${o}${e.toQuery()}`,N(a))}getAllEdgeEntityGroups(e,i,o,a){let s=new On(e,0,null,{property:"name",direction:Xn.ASC});if(e===-1)return s.pageSize=o===G.CUSTOMER?1024:100,this.getAllEdgeEntityGroupsByPageLink(s,i,o,a).pipe(W(c=>c&&c.length?c:null));{let c=this.getEdgeEntityGroups(s,i,o,a);return c?c.pipe(W(u=>u&&u.data.length?u.data:null)):Z(null)}}getAllEdgeEntityGroupsByPageLink(e,i,o,a){let s=this.getEdgeEntityGroups(e,i,o,a);return s?s.pipe(af(c=>c.hasNext?(e.page+=1,this.getEdgeEntityGroups(e,i,o,a)):Ls),W(c=>c.data),Bd(c=>c),of()):Z(null)}assignEntityGroupToEdge(e,i,o,a){return this.http.post(`/api/edge/${e}/entityGroup/${i}/${o}`,N(a))}unassignEntityGroupFromEdge(e,i,o,a){return this.http.delete(`/api/edge/${e}/entityGroup/${i}/${o}`,N(a))}};
102t.\u0275fac=function(i){return new(i||t)(X(Jt),X(oh))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var ipe={};Ae(ipe,{enumerable:()=>kg});y();function kg(n){return(t,r,e)=>{e.enumerable=n}}var LU=3e3,BU=3e3,VU=class{[Symbol.iterator](){return this.activeDashboardWidgets[Symbol.iterator]()}get activeDashboardWidgets(){return this.dashboard.isEdit?this.dashboardWidgets:this.dashboard.isMobileSize?this.dashboardWidgets.filter(t=>!t.mobileHide):this.dashboardWidgets.filter(t=>!t.desktopHide)}constructor(t,r,e){this.dashboard=t,this.widgetsDiffer=r,this.widgetLayoutsDiffer=e,this.highlightedMode=!1,this.dashboardWidgets=[]}doCheck(){let t=this.widgetsDiffer.diff(this.widgets),r=this.widgetLayoutsDiffer.diff(this.widgetLayouts),e=[];t!==null&&(t.forEachAddedItem(i=>{e.push({widget:i.item,widgetId:i.item.id,widgetLayout:this.widgetLayouts?this.widgetLayouts[i.item.id]:null,operation:"add"})}),t.forEachRemovedItem(i=>{let o=e.find(a=>a.widgetId===i.item.id);o?o.operation="update":(o={widgetId:i.item.id,operation:"remove"},e.push(o))})),r!==null&&r.forEachChangedItem(i=>{if(!e.find(a=>a.widgetId===i.key)){let a=this.dashboardWidgets.find(s=>s.widgetId===i.key);a&&e.push({widget:a.widget,widgetId:i.key,widgetLayout:i.currentValue,operation:"update"})}}),e.length&&(e.forEach(i=>{let o;switch(i.operation){case"add":this.dashboardWidgets.push(new Fm(this.dashboard,i.widget,i.widgetLayout,this.parentDashboard,this.popoverComponent));break;case"remove":o=this.dashboardWidgets.findIndex(a=>a.widgetId===i.widgetId),o>-1&&this.dashboardWidgets.splice(o,1);break;case"update":if(o=this.dashboardWidgets.findIndex(a=>a.widgetId===i.widgetId),o>-1){let a=this.dashboardWidgets[o];Fn(a.widget,i.widget)?(this.dashboardWidgets[o].widget=i.widget,this.dashboardWidgets[o].widgetLayout=i.widgetLayout):(this.dashboardWidgets[o]=new Fm(this.dashboard,i.widget,i.widgetLayout,this.parentDashboard,this.popoverComponent),this.dashboardWidgets[o].highlighted=a.highlighted,this.dashboardWidgets[o].selected=a.selected)}break}}),this.updateRowsAndSort())}widgetLayoutsUpdated(){for(let t of Object.keys(this.widgetLayouts)){let r=this.widgetLayouts[t],e=this.dashboardWidgets.findIndex(i=>i.widgetId===t);e>-1&&(this.dashboardWidgets[e].widgetLayout=r)}this.updateRowsAndSort()}setWidgets(t,r){this.highlightedMode=!1,this.widgets=t,this.widgetLayouts=r}highlightWidget(t){let r=this.findWidgetById(t);if(r&&(!this.highlightedMode||!r.highlighted||this.highlightedMode&&r.highlighted)){let e=!1;return this.highlightedMode||(this.highlightedMode=!0,e=!0),r.highlighted=!0,r.selected=!1,this.dashboardWidgets.forEach(i=>{i!==r&&(i.highlighted=!1,i.selected=!1,e&&i.widgetContext?.detectContainerChanges())}),r}else return null}selectWidget(t){let r=this.findWidgetById(t);return r&&!r.selected?(r.selected=!0,this.dashboardWidgets.forEach(e=>{e!==r&&(e.selected=!1)}),r):null}resetHighlight(){let t=this.dashboardWidgets.find(r=>r.highlighted);return this.highlightedMode=!1,this.dashboardWidgets.forEach(r=>{r.highlighted=!1,r.selected=!1}),t}isHighlighted(t){return this.highlightedMode&&t.highlighted||t.selected}isNotHighlighted(t){return this.highlightedMode&&!t.highlighted}getSelectedWidget(){return this.dashboardWidgets.find(t=>t.selected)}findWidgetById(t){return this.dashboardWidgets.find(r=>r.widgetId===t)}updateRowsAndSort(){let t=this.dashboard.gridsterOpts.maxRows;this.activeDashboardWidgets.forEach(r=>{let e=r.y+r.rows;t=Math.max(t,e)}),this.sortWidgets(),this.dashboard.gridsterOpts.maxRows=t,this.dashboard.notifyGridsterOptionsChanged()}sortWidgets(){this.dashboardWidgets.sort((t,r)=>{let e=t.widgetOrder,i=r.widgetOrder;if(dt(e)&&Bi(i))return-1;if(Bi(e)&&dt(i))return 1;if(Bi(e)&&Bi(i))return 0;let o=e-i;return o===0&&(o=t.x-r.x),o})}},Fm=class{get mobileHide(){return this.widgetLayout?this.widgetLayout.mobileHide===!0:!1}get desktopHide(){return this.widgetLayout?this.widgetLayout.desktopHide===!0:!1}set gridsterItemComponent(t){this.gridsterItemComponentValue=t,this.widgetLayout?.preserveAspectRatio&&this.applyPreserveAspectRatio(t),this.gridsterItemComponentSubject.next(this.gridsterItemComponentValue),this.gridsterItemComponentSubject.complete()}applyPreserveAspectRatio(t){if(this.widgetLayout?.preserveAspectRatio?(this.resizableHandles.ne=!1,this.resizableHandles.sw=!1,this.resizableHandles.nw=!1):(this.resizableHandles.ne=!0,this.resizableHandles.sw=!0,this.resizableHandles.nw=!0),!this.preserveAspectRatioApplied){let r=t.$item;this.rowsValue=r.rows,this.colsValue=r.cols,Object.defineProperty(r,"rows",{get:()=>this.rowsValue,set:i=>{this.rowsValue!==i&&(this.preserveAspectRatio&&(this.colsValue=i*this.aspectRatio),this.rowsValue=i)}}),Object.defineProperty(r,"cols",{get:()=>
102this.colsValue,set:i=>{this.colsValue!==i&&(this.preserveAspectRatio&&(this.rowsValue=i/this.aspectRatio),this.colsValue=i)}});let e=t.resize;if(e){this.heightValue=e.height,this.widthValue=e.width;let i=e.setItemHeight.bind(e),o=e.setItemWidth.bind(e);e.setItemHeight=a=>{i(a),this.heightValue=a,this.preserveAspectRatio&&o(a*this.aspectRatio)},e.setItemWidth=a=>{o(a),this.widthValue=a,this.preserveAspectRatio&&i(a/this.aspectRatio)},Object.defineProperty(e,"height",{get:()=>this.heightValue,set:a=>{this.heightValue!==a&&(this.preserveAspectRatio&&(this.widthValue=a*this.aspectRatio),this.heightValue=a)}}),Object.defineProperty(e,"width",{get:()=>this.widthValue,set:a=>{this.widthValue!==a&&(this.preserveAspectRatio&&(this.heightValue=a/this.aspectRatio),this.widthValue=a)}})}this.preserveAspectRatioApplied=!0}}get highlighted(){return this.highlightedValue}set highlighted(t){this.highlightedValue!==t&&(this.highlightedValue=t,this.widgetContext.detectContainerChanges())}onSelected(t){this.selectedCallback=t}get selected(){return this.selectedValue}set selected(t){this.selectedValue!==t&&(this.selectedValue=t,this.selectedCallback(t),this.widgetContext.detectContainerChanges())}get widgetLayout(){return this.widgetLayoutValue}set widgetLayout(t){this.widgetLayoutValue=t,this._widgetLayoutUpdated()}_widgetLayoutUpdated(){dt(this.widgetLayout?.resizable)&&(this.resizeEnabled=this.widgetLayout.resizable),this.widgetLayout?.preserveAspectRatio&&(this.aspectRatio=this.widgetLayout.sizeX/this.widgetLayout.sizeY),this.gridsterItemComponentValue&&this.applyPreserveAspectRatio(this.gridsterItemComponentValue)}constructor(t,r,e,i,o){this.dashboard=t,this.widget=r,this.widgetLayoutValue=e,this.parentDashboard=i,this.popoverComponent=o,this.highlightedValue=!1,this.selectedValue=!1,this.selectedCallback=()=>{},this.resizableHandles={},this.resizeEnabled=!0,this.isFullscreen=!1,this.isReference=!1,this.widgetContext=new Hj(this.dashboard,this,this.widget,this.parentDashboard,this.popoverComponent),this.gridsterItemComponentSubject=new Te,this.preserveAspectRatioApplied=!1,this.widgetLayout=e,r.id||(r.id=Zr()),this.widgetId=r.id,this.updateWidgetParams(!1)}gridsterItemComponent$(){return this.gridsterItemComponentValue?Z(this.gridsterItemComponentValue):this.gridsterItemComponentSubject.asObservable()}updateWidgetParams(t=!0){this.color=this.widget.config.color||"rgba(0, 0, 0, 0.87)",this.backgroundColor=this.widget.config.backgroundColor||"#fff",this.padding=this.widget.config.padding||"8px",this.margin=this.widget.config.margin||"0px",this.borderRadius=this.widget.config.borderRadius;let r=dt(this.widgetContext.widgetTitle)&&this.widgetContext.widgetTitle.length?this.widgetContext.widgetTitle:this.widget.config.title;this.title$=this.widgetContext.registerLabelPattern(r,this.title$),this.titleTooltip=dt(this.widgetContext.widgetTitleTooltip)&&this.widgetContext.widgetTitleTooltip.length?this.widgetContext.widgetTitleTooltip:this.widget.config.titleTooltip,this.titleTooltip=this.dashboard.utils.customTranslation(this.titleTooltip,this.titleTooltip),this.showTitle=dt(this.widget.config.showTitle)?this.widget.config.showTitle:!0,this.titleStyle=re(re({},this.widget.config.titleStyle||{}),_f(this.widget.config.titleFont)),this.widget.config.titleColor&&(this.titleStyle.color=this.widget.config.titleColor),this.titleIcon=dt(this.widget.config.titleIcon)?this.widget.config.titleIcon:"",this.showTitleIcon=dt(this.widget.config.showTitleIcon)?this.widget.config.showTitleIcon:!1,this.titleIconStyle=this.widget.config.iconSize?rm(this.widget.config.iconSize):{},this.widget.config.iconColor&&(this.titleIconStyle.color=this.widget.config.iconColor),this.dropShadow=dt(this.widget.config.dropShadow)?this.widget.config.dropShadow:!0,this.enableFullscreen=dt(this.widget.config.enableFullscreen)?this.widget.config.enableFullscreen:!0,this.widget.type===mn.timeseries||this.widget.type===mn.latest||this.widget.type===mn.alarm?this.enableDataExport=dt(this.widget.config.enableDataExport)?this.widget.config.enableDataExport:!0:this.enableDataExport=!1;let e=!1,i=!1,o=!1;this.widget.type===mn.timeseries||this.widget.type===mn.alarm?e=!0:this.widget.type===mn.latest&&(e=jS(this.widget.config.datasources),i=e,e&&(o=yb(this.widget.config.datasources))),this.hasTimewindow=e&&dt(this.widget.config.useDashboardTimewindow)?!this.widget.config.useDashboardTimewindow&&(Bi(this.widget.config.displayTimewindow)||this.widget.config.displayTimewindow):!1,this.onlyQuickInterval=i,this.onlyHistoryTimewindow=o,this.hasAggregation=this.widget.type===mn.timeseries,this.style={color:this.color,backgroundColor:this.backgroundColor,padding:this.padding,margin:this.margin,borderRadius:this.borderRadius},sc(this.widget.config.widgetStyle)||(this.style=re(re({},this.style),D4(this.widget.config.widgetStyle))),this.showWidgetTitlePanel=this.widgetContext.hideTitlePanel?!1:this.showTitle||this.hasTimewindow,this.showWidgetActions=!this.widgetContext.hideTitlePanel,this.updateParamsFromData(),this.widgetActions=this.widgetContext.widgetActions?this.widgetContext.widgetActions:[],t&&this.widgetContext.detectContainerChanges()}exportWidgetData(t,r){this.widgetContext.exportWidgetData(r)}updateParamsFromData(t=!1){this.widgetContext.updateLabelPatterns(),this.updateCustomHeaderActions()&&t&&this.widgetContext.detectContainerChanges()}updateCustomHeaderActions(){let t;if(this.widgetContext.customHeaderActions){let r=[];this.widgetContext.customHeaderActions.some(e=>e.useShowWidgetHeaderActionFunction)&&(r=S4(this.widgetContext.data||[])),t=this.widgetContext.customHeaderActions.filter(e=>this.filterCustomHeaderAction(e,r))}else t=[];return Fn(this.customHeaderActions,t)?!1:(this.customHeaderActions=t,!0)}filterCustomHeaderAction(t,r){if(t.useShowWidgetHeaderActionFunction)try{return t.showWidgetHeaderActionFunction.execute(this.widgetContext,r)}catch(e){return console.warn("Failed to execute showWidgetHeaderActionFunction",e),!1}else return!0}get x(){let t;return this.widgetLayout?t=this.widgetLayout.col:t=this.widget.col,Math.floor(t)}set x(t){}get y(){let t;return this.widgetLayout?t=this.widgetLayout.row:t=this.widget.row,Math.floor(t)}set y(t){}get preserveAspectRatio(){return!this.dashboard.isMobileSize&&this.widgetLayout?this.widgetLayout.preserveAspectRatio:!1}get cols(){return Math.floor(this.sizeX)}set cols(t){this.dashboard.isMobileSize||(this.sizeX=t)}get rows(){let t;if(this.dashboard.isMobileSize){let r;this.widgetLayout&&(r=this.widgetLayout.mobileHeight),!r&&this.widget.config.mobileHeight&&(r=this.widget.config.mobileHeight),r?t=r:t=this.sizeY*24/this.dashboard.gridsterOpts.minCols}else t=this.sizeY;return Math.max(Math.floor(t),1)}set rows(t){!this.dashboard.isMobileSize&&!this.dashboard.autofillHeight&&(this.sizeY=t)}get sizeX(){return this.widgetLayout?this.widgetLayout.sizeX:this.widget.sizeX}set sizeX(t){this.widgetLayout?this.widgetLayout.sizeX=t:this.widget.sizeX=t}get sizeY(){return this.widgetLayout?this.widgetLayout.sizeY:this.widget.sizeY}set sizeY(t){this.widgetLayout?this.widgetLayout.sizeY=t:this.widget.sizeY=t}get widgetOrder(){let t;return this.widgetLayout&&dt(this.widgetLayout.mobileOrder)&&this.widgetLayout.mobileOrder>=0?t=this.widgetLayout.mobileOrder:dt(this.widget.config.mobileOrder)&&this.widget.config.mobileOrder>=0?t=this.widget.config.mobileOrder:this.dashboard.isMobileSize||(this.widgetLayout?t=this.widgetLayout.row:t=this.widget.row),t}updatePosition(t,r){this.widgetLayout?(this.widgetLayout.col=t,this.widgetLayout.row=r):(this.widget.col=t,this.widget.row=r)}};pe([kg(!0),le("design:type",Number),le("design:paramtypes",[Number])],Fm.prototype,"x",null);pe([kg(!0),le("design:type",Number),le("design:paramtypes",[Number])],Fm.prototype,"y",null);pe([kg(!0),le("design:type",Number),le("design:paramtypes",[Number])],Fm.prototype,"cols",null);pe([kg(!0),le("design:type",Number),le("design:paramtypes",[Number])],Fm.prototype,"rows",null);pe([kg(!0),le("design:type",Number),le("design:paramtypes",[])],Fm.prototype,"widgetOrder",null);y();y();y();y();var Nme={};Ae(Nme,{A:()=>ph,Animator:()=>ch,Array:()=>Qs,Box:()=>bo,Circle:()=>Ng,ClipPath:()=>Vg,Color:()=>ns,Container:()=>_o,Controller:()=>Gm,Defs:()=>Nm,Dom:()=>Ql,Ease:()=>jm,Element:()=>xo,Ellipse:()=>Vm,EventTarget:()=>Yl,ForeignObject:()=>Cv,Fragment:()=>TI,G:()=>Mc,Gradient:()=>mp,Image:()=>Lm,Line:()=>up,List:()=>pp,Marker:()=>Bm,Mask:()=>Lg,Matrix:()=>Sn,Morphable:()=>kc,NonMorphable:()=>Fg,Number:()=>kn,ObjectBag:()=>hp,PID:()=>g1,Path:()=>Dc,PathArray:()=>Ks,Pattern:()=>bd,Point:()=>io,PointArray:()=>rs,Polygon:()=>fp,Polyline:()=>gp,Queue:()=>lh,Rect:()=>zm,Runner:()=>_d,SVG:()=>Um,Shape:()=>oo,Spring:()=>f1,Stop:()=>wv,Style:()=>Bg,Svg:()=>_p,Symbol:()=>dh,Text:()=>Ta,TextPath:()=>jg,Timeline:()=>bp,TransformBag:()=>b1,Tspan:()=>$m,Use:()=>xv,adopt:()=>ts,assignNewId:()=>bI,clearEvents:()=>JU,create:()=>ah,defaults:()=>HR,dispatch:()=>$R,easing:()=>nF,eid:()=>gI,extend:()=>tn,find:()=>Ml,getClass:()=>OR,getEventTarget:()=>wI,getEvents:()=>zR,getWindow:()=>hI,makeInstance:()=>Xo,makeMorphable:()=>dF,mockAdopt:()=>ope,namespaces:()=>kR,nodeOrNew:()=>xn,off:()=>Al,on:()=>gd,parser:()=>Wl,regex:()=>BR,register:()=>Fi,registerMorphableType:()=>cF,registerWindow:()=>DR,restoreWindow:()=>AR,root:()=>d1,saveWindow:()=>MR,utils:()=>ER,windowEvents:()=>GR,withWindow:()=>zU,wrapWithAttrCheck:()=>Pn});y();y();y();y();var wR={},jU=[];function ki(n,t){if(Array.isArray(n)){for(let r of n)ki(r,t);return}if(typeof n=="object"){for(let r in n)ki(r,n[r]);return}xR(Object.getOwnPropertyNames(t)),wR[n]=Object.assign(wR[n]||{},t)}function Ys(n){return wR[n]||{}}function GU(){return[...new Set(jU)]}function xR(n){jU.push(...n)}var ER={};Ae(ER,{capitalize:()=>mI,degrees:()=>npe,filter:()=>SR,getOrigin:()=>mv,isDescriptive:()=>uv,map:()=>Dg,proportionalSize:()=>ql,radians:()=>s1,unCamelCase:()=>TR,writeDataToDom:()=>l1});y();function Dg(n,t){let r,e=n.length,i=[];for(r=0;r<e;r++)i.push(t(n[r]));return i}function SR(n,t){let r,e=n.length,i=[];for(r=0;r<e;r++)t(n[r])&&i.push(n[r]);return i}function s1(n){return n%360*Math.PI/180}function npe(n){return n*180/Math.PI%360}function TR(n){return n.replace(/([A-Z])/g,function(t,r){return"-"+r.toLowerCase()})}function mI(n){return n.charAt(0).toUpperCase()+n.slice(1)}function ql(n,t,r,e){return(t==null||r==null)&&(e=e||n.bbox(),t==null?t=e.width/e.height*r:r==null&&(r=e.height/e.width*t)),{width:t,height:r}}function mv(n,t){let r=n.origin,e=n.ox!=null?n.ox:n.originX!=null?n.originX:"center",i=n.oy!=null?n.oy:n.originY!=null?n.originY:"center";r!=null&&([e,i]=Array.isArray(r)?r:typeof r=="object"?[r.x,r.y]:[r,r]);let o=typeof e=="string",a=typeof i=="string";if(o||a){let{height:s,width:c,x:u,y:f}=t.bbox();o&&(e=e.includes("left")?u:e.includes("right")?u+c:u+c/2),a&&(i=i.includes("top")?f:i.includes("bottom")?f+s:f+s/2)}return[e,i]}var rpe=new Set(["desc","metadata","title"]),uv=n=>rpe.has(n.nodeName),l1=(n,t,r={})=>{let e=re({},t);for(let i in e)e[i].valueOf()===r[i]&&delete e[i];Object.keys(e).length?n.node.setAttribute("data-svgjs",JSON.stringify(e)):(n.node.removeAttribute("data-svgjs"),n.node.removeAttribute("svgjs:data"))};var kR={};Ae(kR,{html:()=>IR,svg:()=>Mg,xlink:()=>fd,xmlns:()=>c1});y();var Mg="http://www.w3.org/2000/svg",IR="http://www.w3.org/1999/xhtml",c1="http://www.w3.org/2000/xmlns/",fd="http://www.w3.org/1999/xlink";y();var cn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function DR(n=null,t=null){cn.window=n,cn.document=t}var uI={};function MR(){uI.window=cn.window,uI.document=cn.document}function AR(){cn.window=uI.window,cn.document=uI.document}function zU(n,t){MR(),DR(n,n.document),t(n,n.document),AR()}function hI(){return cn.window}y();var Ag=class{};var Og={},d1="___SYMBOL___ROOT___";function ah(n,t=Mg){return cn.document.createElementNS(t,n)}function Xo(n,t=!1){if(n instanceof Ag)return n;if(typeof n=="object")return fI(n);if(n==null)return new Og[d1];if(typeof n=="string"&&n.charAt(0)!=="<")return fI(cn.document.querySelector(n));let r=t?cn.document.createElement("div"):ah("svg");return r.innerHTML=n,n=fI(r.firstChild),r.removeChild(r.firstChild),n}function xn(n,t){return t&&(t instanceof cn.window.Node||t.ownerDocument&&t instanceof t.ownerDocument.defaultView.Node)?t:ah(n)}
vendor: 70,473 bytes, lines 102-107
102function ts(n){if(!n)return null;if(n.instance instanceof Ag)return n.instance;if(n.nodeName==="#document-fragment")return new Og.Fragment(n);let t=mI(n.nodeName||"Dom");return t==="LinearGradient"||t==="RadialGradient"?t="Gradient":Og[t]||(t="Dom"),new Og[t](n)}var fI=ts;function ope(n=ts){fI=n}function Fi(n,t=n.name,r=!1){return Og[t]=n,r&&(Og[d1]=n),xR(Object.getOwnPropertyNames(n.prototype)),n}function OR(n){return Og[n]}var ape=1e3;function gI(n){return"Svgjs"+mI(n)+ape++}function bI(n){for(let t=n.children.length-1;t>=0;t--)bI(n.children[t]);return n.id&&(n.id=gI(n.nodeName)),n}function tn(n,t){let r,e;for(n=Array.isArray(n)?n:[n],e=n.length-1;e>=0;e--)for(r in t)n[e].prototype[r]=t[r]}function Pn(n){return function(...t){let r=t[t.length-1];return r&&r.constructor===Object&&!(r instanceof Array)?n.apply(this,t.slice(0,-1)).attr(r):n.apply(this,t)}}function spe(){return this.parent().children()}function lpe(){return this.parent().index(this)}function cpe(){return this.siblings()[this.position()+1]}function dpe(){return this.siblings()[this.position()-1]}function ppe(){let n=this.position();return this.parent().add(this.remove(),n+1),this}function mpe(){let n=this.position();return this.parent().add(this.remove(),n?n-1:0),this}function upe(){return this.parent().add(this.remove()),this}function hpe(){return this.parent().add(this.remove(),0),this}function fpe(n){n=Xo(n),n.remove();let t=this.position();return this.parent().add(n,t),this}function gpe(n){n=Xo(n),n.remove();let t=this.position();return this.parent().add(n,t+1),this}function bpe(n){return n=Xo(n),n.before(this),this}function _pe(n){return n=Xo(n),n.after(this),this}ki("Dom",{siblings:spe,position:lpe,next:cpe,prev:dpe,forward:ppe,backward:mpe,front:upe,back:hpe,before:fpe,after:gpe,insertBefore:bpe,insertAfter:_pe});y();var BR={};Ae(BR,{delimiter:()=>is,hex:()=>PR,isBlank:()=>yI,isHex:()=>_I,isImage:()=>LR,isNumber:()=>CI,isPathLetter:()=>hv,isRgb:()=>vI,numberAndUnit:()=>p1,reference:()=>FR,rgb:()=>RR,transforms:()=>NR,whitespace:()=>VR});y();var p1=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,PR=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,RR=/rgb\((\d+),(\d+),(\d+)\)/,FR=/(#[a-z_][a-z0-9\-_]*)/i,NR=/\)\s*,?\s*/,VR=/\s/g,_I=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,vI=/^rgb\(/,yI=/^(\s+)?$/,CI=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,LR=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,is=/[\s,]+/,hv=/[MLHVCSQTAZ]/i;function vpe(){let n=this.attr("class");return n==null?[]:n.trim().split(is)}function ype(n){return this.classes().indexOf(n)!==-1}function Cpe(n){if(!this.hasClass(n)){let t=this.classes();t.push(n),this.attr("class",t.join(" "))}return this}function wpe(n){return this.hasClass(n)&&this.attr("class",this.classes().filter(function(t){return t!==n}).join(" ")),this}function xpe(n){return this.hasClass(n)?this.removeClass(n):this.addClass(n)}ki("Dom",{classes:vpe,hasClass:ype,addClass:Cpe,removeClass:wpe,toggleClass:xpe});y();function Spe(n,t){let r={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(e){return!!e.length}).forEach(function(e){let i=e.split(/\s*:\s*/);r[i[0]]=i[1]}),r;if(arguments.length<2){if(Array.isArray(n)){for(let e of n){let i=e;r[e]=this.node.style.getPropertyValue(i)}return r}if(typeof n=="string")return this.node.style.getPropertyValue(n);if(typeof n=="object")for(let e in n)this.node.style.setProperty(e,n[e]==null||yI.test(n[e])?"":n[e])}return arguments.length===2&&this.node.style.setProperty(n,t==null||yI.test(t)?"":t),this}function Tpe(){return this.css("display","")}function Epe(){return this.css("display","none")}function Ipe(){return this.css("display")!=="none"}ki("Dom",{css:Spe,show:Tpe,hide:Epe,visible:Ipe});y();function kpe(n,t,r){if(n==null)return this.data(Dg(SR(this.node.attributes,e=>e.nodeName.indexOf("data-")===0),e=>e.nodeName.slice(5)));if(n instanceof Array){let e={};for(let i of n)e[i]=this.data(i);return e}else if(typeof n=="object")for(t in n)this.data(t,n[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+n))}catch{return this.attr("data-"+n)}else this.attr("data-"+n,t===null?null:r===!0||typeof t=="string"||typeof t=="number"?t:JSON.stringify(t));return this}ki("Dom",{data:kpe});y();function Dpe(n,t){if(typeof arguments[0]=="object")for(let r in n)this.remember(r,n[r]);else{if(arguments.length===1)return this.memory()[n];this.memory()[n]=t}return this}function Mpe(){if(arguments.length===0)this._memory={};else for(let n=arguments.length-1;n>=0;n--)delete this.memory()[arguments[n]];return this}function Ape(){return this._memory=this._memory||{}}ki("Dom",{remember:Dpe,forget:Mpe,memory:Ape});y();y();function Ope(n){return n.length===4?["#",n.substring(1,2),n.substring(1,2),n.substring(2,3),n.substring(2,3),n.substring(3,4),n.substring(3,4)].join(""):n}function Ppe(n){let t=Math.round(n),e=Math.max(0,Math.min(255,t)).toString(16);return e.length===1?"0"+e:e}function fv(n,t){for(let r=t.length;r--;)if(n[t[r]]==null)return!1;return!0}function Rpe(n,t){let r=fv(n,"rgb")?{_a:n.r,_b:n.g,_c:n.b,_d:0,space:"rgb"}:fv(n,"xyz")?{_a:n.x,_b:n.y,_c:n.z,_d:0,space:"xyz"}:fv(n,"hsl")?{_a:n.h,_b:n.s,_c:n.l,_d:0,space:"hsl"}:fv(n,"lab")?{_a:n.l,_b:n.a,_c:n.b,_d:0,space:"lab"}:fv(n,"lch")?{_a:n.l,_b:n.c,_c:n.h,_d:0,space:"lch"}:fv(n,"cmyk")?{_a:n.c,_b:n.m,_c:n.y,_d:n.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=t||r.space,r}function Fpe(n){return n==="lab"||n==="xyz"||n==="lch"}function jR(n,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?n+(t-n)*6*r:r<1/2?t:r<2/3?n+(t-n)*(2/3-r)*6:n}var ns=class n{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof n||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&typeof t.r=="number"&&typeof t.g=="number"&&typeof t.b=="number"}static random(t="vibrant",r){let{random:e,round:i,sin:o,PI:a}=Math;if(t==="vibrant"){let s=24*e()+57,c=38*e()+45,u=360*e();return new n(s,c,u,"lch")}else if(t==="sine"){r=r??e();let s=i(80*o(2*a*r/.5+.01)+150),c=i(50*o(2*a*r/.5+4.6)+200),u=i(100*o(2*a*r/.5+2.3)+150);return new n(s,c,u)}else if(t==="pastel"){let s=8*e()+86,c=17*e()+9,u=360*e();return new n(s,c,u,"lch")}else if(t==="dark"){let s=10+10*e(),c=50*e()+86,u=360*e();return new n(s,c,u,"lch")}else if(t==="rgb"){let s=255*e(),c=255*e(),u=255*e();return new n(s,c,u)}else if(t==="lab"){let s=100*e(),c=256*e()-128,u=256*e()-128;return new n(s,c,u,"lab")}else if(t==="grey"){let s=255*e();return new n(s,s,s)}else throw new Error("Unsupported random color mode")}static test(t){return typeof t=="string"&&(_I.test(t)||vI.test(t))}cmyk(){let{_a:t,_b:r,_c:e}=this.rgb(),[i,o,a]=[t,r,e].map(I=>I/255),s=Math.min(1-i,1-o,1-a);if(s===1)return new n(0,0,0,1,"cmyk");let c=(1-i-s)/(1-s),u=(1-o-s)/(1-s),f=(1-a-s)/(1-s);return new n(c,u,f,s,"cmyk")}hsl(){let{_a:t,_b:r,_c:e}=this.rgb(),[i,o,a]=[t,r,e].map(H=>H/255),s=Math.max(i,o,a),c=Math.min(i,o,a),u=(s+c)/2,f=s===c,_=s-c,I=f?0:u>.5?_/(2-s-c):_/(s+c),S=f?0:s===i?((o-a)/_+(o<a?6:0))/6:s===o?((a-i)/_+2)/6:s===a?((i-o)/_+4)/6:0;return new n(360*S,100*I,100*u,"hsl")}init(t=0,r=0,e=0,i=0,o="rgb"){if(t=t||0,this.space)for(let _ in this.space)delete this[this.space[_]];if(typeof t=="number")o=typeof i=="string"?i:o,i=typeof i=="string"?0:i,Object.assign(this,{_a:t,_b:r,_c:e,_d:i,space:o});else if(t instanceof Array)this.space=r||(typeof t[3]=="string"?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){let _=Rpe(t,r);Object.assign(this,_)}else if(typeof t=="string")if(vI.test(t)){let _=t.replace(VR,""),[I,S,F]=RR.exec(_).slice(1,4).map(H=>parseInt(H));Object.assign(this,{_a:I,_b:S,_c:F,_d:0,space:"rgb"})}else if(_I.test(t)){let _=H=>parseInt(H,16),[,I,S,F]=PR.exec(Ope(t)).map(_);Object.assign(this,{_a:I,_b:S,_c:F,_d:0,space:"rgb"})}else throw Error("Unsupported string format, can't construct Color");let{_a:a,_b:s,_c:c,_d:u}=this,f=this.space==="rgb"?{r:a,g:s,b:c}:this.space==="xyz"?{x:a,y:s,z:c}:this.space==="hsl"?{h:a,s,l:c}:this.space==="lab"?{l:a,a:s,b:c}:this.space==="lch"?{l:a,c:s,h:c}:this.space==="cmyk"?{c:a,m:s,y:c,k:u}:{};Object.assign(this,f)}lab(){let{x:t,y:r,z:e}=this.xyz(),i=116*r-16,o=500*(t-r),a=200*(r-e);return new n(i,o,a,"lab")}lch(){let{l:t,a:r,b:e}=this.lab(),i=Math.sqrt(r**2+e**2),o=180*Math.atan2(e,r)/Math.PI;return o<0&&(o*=-1,o=360-o),new n(t,i,o,"lch")}rgb(){if(this.space==="rgb")return this;if(Fpe(this.space)){let{x:t,y:r,z:e}=this;if(this.space==="lab"||this.space==="lch"){let{l:S,a:F,b:H}=this;if(this.space==="lch"){let{c:ue,h:Ne}=this,st=Math.PI/180;F=ue*Math.cos(st*Ne),H=ue*Math.sin(st*Ne)}let q=(S+16)/116,ee=F/500+q,Ie=q-H/200,He=16/116,Le=.008856,qe=7.787;t=.95047*(ee**3>Le?ee**3:(ee-He)/qe),r=1*(q**3>Le?q**3:(q-He)/qe),e=1.08883*(Ie**3>Le?Ie**3:(Ie-He)/qe)}let i=t*3.2406+r*-1.5372+e*-.4986,o=t*-.9689+r*1.8758+e*.0415,a=t*.0557+r*-.204+e*1.057,s=Math.pow,c=.0031308,u=i>c?1.055*s(i,1/2.4)-.055:12.92*i,f=o>c?1.055*s(o,1/2.4)-.055:12.92*o,_=a>c?1.055*s(a,1/2.4)-.055:12.92*a;return new n(255*u,255*f,255*_)}else if(this.space==="hsl"){let{h:t,s:r,l:e}=this;if(t/=360,r/=100,e/=100,r===0)return e*=255,new n(e,e,e);let i=e<.5?e*(1+r):e+r-e*r,o=2*e-i,a=255*jR(o,i,t+1/3),s=255*jR(o,i,t),c=255*jR(o,i,t-1/3);return new n(a,s,c)}else if(this.space==="cmyk"){let{c:t,m:r,y:e,k:i}=this,o=255*(1-Math.min(1,t*(1-i)+i)),a=255*(1-Math.min(1,r*(1-i)+i)),s=255*(1-Math.min(1,e*(1-i)+i));return new n(o,a,s)}else return this}toArray(){let{_a:t,_b:r,_c:e,_d:i,space:o}=this;return[t,r,e,i,o]}toHex(){let[t,r,e]=this._clamped().map(Ppe);return`#${t}${r}${e}`}toRgb(){let[t,r,e]=this._clamped();return`rgb(${t},${r},${e})`}toString(){return this.toHex()}xyz(){let{_a:t,_b:r,_c:e}=this.rgb(),[i,o,a]=[t,r,e].map(ee=>ee/255),s=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,c=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,u=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,f=(s*.4124+c*.3576+u*.1805)/.95047,_=(s*.2126+c*.7152+u*.0722)/1,I=(s*.0193+c*.1192+u*.9505)/1.08883,S=f>.008856?Math.pow(f,1/3):7.787*f+16/116,F=_>.008856?Math.pow(_,1/3):7.787*_+16/116,H=I>.008856?Math.pow(I,1/3):7.787*I+16/116;return new n(S,F,H,"xyz")}_clamped(){let{_a:t,_b:r,_c:e}=this.rgb(),{max:i,min:o,round:a}=Math,s=c=>i(0,o(a(c),255));return[t,r,e].map(s)}};y();y();y();y();var io=class n{constructor(...t){this.init(...t)}clone(){return new n(this)}init(t,r){let e={x:0,y:0},i=Array.isArray(t)?{x:t[0],y:t[1]}:typeof t=="object"?{x:t.x,y:t.y}:{x:t,y:r};return this.x=i.x==null?e.x:i.x,this.y=i.y==null?e.y:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){Sn.isMatrixLike(t)||(t=new Sn(t));let{x:r,y:e}=this;return this.x=t.a*r+t.c*e+t.e,this.y=t.b*r+t.d*e+t.f,this}};function $U(n,t){return new io(n,t).transformO(this.screenCTM().inverseO())}function gv(n,t,r){return Math.abs(t-n)<(r||1e-6)}var Sn=class n{constructor(...t){this.init(...t)}static formatTransforms(t){let r=t.flip==="both"||t.flip===!0,e=t.flip&&(r||t.flip==="x")?-1:1,i=t.flip&&(r||t.flip==="y")?-1:1,o=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,a=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,s=t.scale&&t.scale.length?t.scale[0]*e:isFinite(t.scale)?t.scale*e:isFinite(t.scaleX)?t.scaleX*e:e,c=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,u=t.shear||0,f=t.rotate||t.theta||0,_=new io(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),I=_.x,S=_.y,F=new io(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),H=F.x,q=F.y,ee=new io(t.translate||t.tx||t.translateX,t.ty||t.translateY),Ie=ee.x,He=ee.y,Le=new io(t.relative||t.rx||t.relativeX,t.ry||t.relativeY),qe=Le.x,ue=Le.y;return{scaleX:s,scaleY:c,skewX:o,skewY:a,shear:u,theta:f,rx:qe,ry:ue,tx:Ie,ty:He,ox:I,oy:S,px:H,py:q}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return t.a!=null||t.b!=null||t.c!=null||t.d!=null||t.e!=null||t.f!=null}static matrixMultiply(t,r,e){let i=t.a*r.a+t.c*r.b,o=t.b*r.a+t.d*r.b,a=t.a*r.c+t.c*r.d,s=t.b*r.c+t.d*r.d,c=t.e+t.a*r.e+t.c*r.f,u=t.f+t.b*r.e+t.d*r.f;return e.a=i,e.b=o,e.c=a,e.d=s,e.e=c,e.f=u,e}around(t,r,e){return this.clone().aroundO(t,r,e)}aroundO(t,r,e){let i=t||0,o=r||0;return this.translateO(-i,-o).lmultiplyO(e).translateO(i,o)}clone(){return new n(this)}decompose(t=0,r=0){let e=this.a,i=this.b,o=this.c,a=this.d,s=this.e,c=this.f,u=e*a-i*o,f=u>0?1:-1,_=f*Math.sqrt(e*e+i*i),I=Math.atan2(f*i,f*e),S=180/Math.PI*I,F=Math.cos(I),H=Math.sin(I),q=(e*o+i*a)/u,ee=o*_/(q*e-i)||a*_/(q*i+e),Ie=s-t+t*F*_+r*(q*F*_-H*ee),He=c-r+t*H*_+r*(q*H*_+F*ee);return{scaleX:_,scaleY:ee,shear:q,rotate:S,translateX:Ie,translateY:He,originX:t,originY:r,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;let r=new n(t);return gv(this.a,r.a)&&gv(this.b,r.b)&&gv(this.c,r.c)&&gv(this.d,r.d)&&gv(this.e,r.e)&&gv(this.f,r.f)}flip(t,r){return this.clone().flipO(t,r)}flipO(t,r){return t==="x"?this.scaleO(-1,1,r,0):t==="y"?this.scaleO(1,-1,0,r):this.scaleO(-1,-1,t,r||t)}init(t){let r=n.fromArray([1,0,0,1,0,0]);return t=t instanceof xo?t.matrixify():typeof t=="string"?n.fromArray(t.split(is).map(parseFloat)):Array.isArray(t)?n.fromArray(t):typeof t=="object"&&n.isMatrixLike(t)?t:typeof t=="object"?new n().transform(t):arguments.length===6?n.fromArray([].slice.call(arguments)):r,this.a=t.a!=null?t.a:r.a,this.b=t.b!=null?t.b:r.b,this.c=t.c!=null?t.c:r.c,this.d=t.d!=null?t.d:r.d,this.e=t.e!=null?t.e:r.e,this.f=t.f!=null?t.f:r.f,this}inverse(){return this.clone().inverseO()}inverseO(){let t=this.a,r=this.b,e=this.c,i=this.d,o=this.e,a=this.f,s=t*i-r*e;if(!s)throw new Error("Cannot invert "+this);let c=i/s,u=-r/s,f=-e/s,_=t/s,I=-(c*o+f*a),S=-(u*o+_*a);return this.a=c,this.b=u,this.c=f,this.d=_,this.e=I,this.f=S,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){let r=this,e=t instanceof n?t:new n(t);return n.matrixMultiply(e,r,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){let r=this,e=t instanceof n?t:new n(t);return n.matrixMultiply(r,e,this)}rotate(t,r,e){return this.clone().rotateO(t,r,e)}rotateO(t,r=0,e=0){t=s1(t);let i=Math.cos(t),o=Math.sin(t),{a,b:s,c,d:u,e:f,f:_}=this;return this.a=a*i-s*o,this.b=s*i+a*o,this.c=c*i-u*o,this.d=u*i+c*o,this.e=f*i-_*o+e*o-r*i+r,this.f=_*i+f*o-r*o-e*i+e,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,r=t,e=0,i=0){arguments.length===3&&(i=e,e=r,r=t);let{a:o,b:a,c:s,d:c,e:u,f}=this;return this.a=o*t,this.b=a*r,this.c=s*t,this.d=c*r,this.e=u*t-e*t+e,this.f=f*r-i*r+i,this}shear(t,r,e){return this.clone().shearO(t,r,e)}shearO(t,r=0,e=0){let{a:i,b:o,c:a,d:s,e:c,f:u}=this;return this.a=i+o*t,this.c=a+s*t,this.e=c+u*t-e*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,r=t,e=0,i=0){arguments.length===3&&(i=e,e=r,r=t),t=s1(t),r=s1(r);let o=Math.tan(t),a=Math.tan(r),{a:s,b:c,c:u,d:f,e:_,f:I}=this;return this.a=s+c*o,this.b=c+s*a,this.c=u+f*o,this.d=f+u*a,this.e=_+I*o-i*o,this.f=I+_*a-e*a,this}skewX(t,r,e){return this.skew(t,0,r,e)}skewY(t,r,e){return this.skew(0,t,r,e)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(n.isMatrixLike(t))return new n(t).multiplyO(this);let r=n.formatTransforms(t),e=this,{x:i,y:o}=new io(r.ox,r.oy).transform(e),a=new n().translateO(r.rx,r.ry).lmultiplyO(e).translateO(-i,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(i,o);if(isFinite(r.px)||isFinite(r.py)){let s=new io(i,o).transform(a),c=isFinite(r.px)?r.px-s.x:0,u=isFinite(r.py)?r.py-s.y:0;a.translateO(c,u)}return a.translateO(r.tx,r.ty),a}translate(t,r){return this.clone().translateO(t,r)}translateO(t,r){return this.e+=t||0,this.f+=r||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function UU(){return new Sn(this.node.getCTM())}function HU(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){let n=this.rect(1,1),t=n.node.getScreenCTM();return n.remove(),new Sn(t)}return new Sn(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Sn}}Fi(Sn,"Matrix");y();function Wl(){if(!Wl.nodes){let n=Xo().size(2,0);n.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),n.attr("focusable","false"),n.attr("aria-hidden","true");let t=n.path().node;Wl.nodes={svg:n,path:t}}if(!Wl.nodes.svg.node.parentNode){let n=cn.document.body||cn.document.documentElement;Wl.nodes.svg.addTo(n)}return Wl.nodes}function qU(n){return!n.width&&!n.height&&!n.x&&!n.y}function Npe(n){return n===cn.document||(cn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===cn.document}).call(cn.document.documentElement,n)}var bo=class n{constructor(...t){this.init(...t)}addOffset(){return this.x+=cn.window.pageXOffset,this.y+=cn.window.pageYOffset,new n(this)}init(t){let r=[0,0,0,0];return t=typeof t=="string"?t.split(is).map(parseFloat):Array.isArray(t)?t:typeof t=="object"?[t.left!=null?t.left:t.x,t.top!=null?t.top:t.y,t.width,t.height]:arguments.length===4?[].slice.call(arguments):r,this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return qU(this)}merge(t){let r=Math.min(this.x,t.x),e=Math.min(this.y,t.y),i=Math.max(this.x+this.width,t.x+t.width)-r,o=Math.max(this.y+this.height,t.y+t.height)-e;return new n(r,e,i,o)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof Sn||(t=new Sn(t));let r=1/0,e=-1/0,i=1/0,o=-1/0;return[new io(this.x,this.y),new io(this.x2,this.y),new io(this.x,this.y2),new io(this.x2,this.y2)].forEach(function(s){s=s.transform(t),r=Math.min(r,s.x),e=Math.max(e,s.x),i=Math.min(i,s.y),o=Math.max(o,s.y)}),new n(r,i,e-r,o-i)}};function WU(n,t,r){let e;try{if(e=t(n.node),qU(e)&&!Npe(n.node))throw new Error("Element not in the dom")}catch{e=r(n)}return e}function YU(){let r=WU(this,i=>i.getBBox(),i=>{try{let o=i.clone().addTo(Wl().svg).show(),a=o.node.getBBox();return o.remove(),a}catch(o){throw new Error(`Getting bbox of element "${i.node.nodeName}" is not possible: ${o.toString()}`)}});return new bo(r)}function QU(n){let e=WU(this,o=>o.getBoundingClientRect(),o=>{throw new Error(`Getting rbox of element "${o.node.nodeName}" is not possible`)}),i=new bo(e);return n?i.transform(n.screenCTM().inverseO()):i.addOffset()}function KU(n,t){let r=this.bbox();return n>r.x&&t>r.y&&n<r.x+r.width&&t<r.y+r.height}ki({viewbox:{viewbox(n,t,r,e){return n==null?new bo(this.attr("viewBox")):this.attr("viewBox",new bo(n,t,r,e))},zoom(n,t){let{width:r,height:e}=this.attr(["width","height"]);if((!r&&!e||typeof r=="string"||typeof e=="string")&&(r=this.node.clientWidth,e=this.node.clientHeight),!r||!e)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");let i=this.viewbox(),o=r/i.width,a=e/i.height,s=Math.min(o,a);if(n==null)return s;let c=s/n;c===1/0&&(c=Number.MAX_SAFE_INTEGER/100),t=t||new io(r/2/o+i.x,e/2/a+i.y);let u=new bo(i).transform(new Sn({scale:c,origin:t}));return this.viewbox(u)}}});Fi(bo,"Box");y();y();y();var bv=class extends Array{constructor(t=[],...r){if(super(t,...r),typeof t=="number")return this;this.length=0,this.push(...t)}},pp=bv;tn([bv],{each(n,...t){return typeof n=="function"?this.map((r,e,i)=>n.call(r,r,e,i)):this.map(r=>r[n](...t))},toArray(){return Array.prototype.concat.apply([],this)}});var Vpe=["toArray","constructor","each"];bv.extend=function(n){n=n.reduce((t,r)=>(Vpe.includes(r)||r[0]==="_"||(r in Array.prototype&&(t["$"+r]=Array.prototype[r]),t[r]=function(...e){return this.each(r,...e)}),t),{}),tn([bv],n)};function Ml(n,t){return new pp(Dg((t||cn.document).querySelectorAll(n),function(r){return ts(r)}))}function XU(n){return Ml(n,this.node)}function ZU(n){return ts(this.node.querySelector(n))}y();y();var Lpe=0,GR={};function zR(n){let t=n.getEventHolder();return t===cn.window&&(t=GR),t.events||(t.events={}),t.events}function wI(n){return n.getEventTarget()}function JU(n){let t=n.getEventHolder();t===cn.window&&(t=GR),t.events&&(t.events={})}function gd(n,t,r,e,i){let o=r.bind(e||n),a=Xo(n),s=zR(a),c=wI(a);t=Array.isArray(t)?t:t.split(is),r._svgjsListenerId||(r._svgjsListenerId=++Lpe),t.forEach(function(u){let f=u.split(".")[0],_=u.split(".")[1]||"*";s[f]=s[f]||{},s[f][_]=s[f][_]||{},s[f][_][r._svgjsListenerId]=o,c.addEventListener(f,o,i||!1)})}function Al(n,t,r,e){let i=Xo(n),o=zR(i),a=wI(i);typeof r=="function"&&(r=r._svgjsListenerId,!r)||(t=Array.isArray(t)?t:(t||"").split(is),t.forEach(function(s){let c=s&&s.split(".")[0],u=s&&s.split(".")[1],f,_;if(r)o[c]&&o[c][u||"*"]&&(a.removeEventListener(c,o[c][u||"*"][r],e||!1),delete o[c][u||"*"][r]);else if(c&&u){if(o[c]&&o[c][u]){for(_ in o[c][u])Al(a,[c,u].join("."),_);delete o[c][u]}}else if(u)for(s in o)for(f in o[s])u===f&&Al(a,[s,u].join("."));else if(c){if(o[c]){for(f in o[c])Al(a,[c,f].join("."));delete o[c]}}else{for(s in o)Al(a,s);JU(i)}}))}function $R(n,t,r,e){let i=wI(n);return t instanceof cn.window.Event||(t=new cn.window.CustomEvent(t,re({detail:r,cancelable:!0},e))),i.dispatchEvent(t),t}var Yl=class extends Ag{addEventListener(){}dispatch(t,r,e){return $R(this,t,r,e)}dispatchEvent(t){let r=this.getEventHolder().events;if(!r)return!0;let e=r[t.type];for(let i in e)for(let o in e[i])e[i][o](t);return!t.defaultPrevented}fire(t,r,e){return this.dispatch(t,r,e),this}getEventHolder(){return this}getEventTarget(){return this}off(t,r,e){return Al(this,t,r,e),this}on(t,r,e,i){return gd(this,t,r,e,i),this}removeEventListener(){}};Fi(Yl,"EventTarget");y();var HR={};Ae(HR,{attrs:()=>UR,noop:()=>xI,timeline:()=>sh});y();function xI(){}var sh={duration:400,ease:">",delay:0},UR={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};y();var Qs=class extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return typeof t=="number"?this:(this.length=0,this.push(...this.parse(t)),this)}parse(t=[]){return t instanceof Array?t:t.trim().split(is).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){let t=[];return t.push(...this),t}};y();var kn=class n{constructor(...t){this.init(...t)}convert(t){return new n(this.value,t)}divide(t){return t=new n(t),new n(this/t,this.unit||t.unit)}init(t,r){return r=Array.isArray(t)?t[1]:r,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=r||"",typeof t=="number"?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:typeof t=="string"?(r=t.match(p1),r&&(this.value=parseFloat(r[1]),r[5]==="%"?this.value/=100:r[5]==="s"&&(this.value*=1e3),this.unit=r[5])):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new n(t),new n(this-t,this.unit||t.unit)}plus(t){return t=new n(t),new n(this+t,this.unit||t.unit)}times(t){return t=new n(t),new n(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(this.value*1e8)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}};var Bpe=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),eH=[];function tH(n){eH.push(n)}function qR(n,t,r){if(n==null){n={},t=this.node.attributes;for(let e of t)n[e.nodeName]=CI.test(e.nodeValue)?parseFloat(e.nodeValue):e.nodeValue;return n}else{if(n instanceof Array)return n.reduce((e,i)=>(e[i]=this.attr(i),e),{});if(typeof n=="object"&&n.constructor===Object)for(t in n)this.attr(t,n[t]);else if(t===null)this.node.removeAttribute(n);else{if(t==null)return t=this.node.getAttribute(n),t==null?UR[n]:CI.test(t)?parseFloat(t):t;t=eH.reduce((e,i)=>i(n,e,this),t),typeof t=="number"?t=new kn(t):Bpe.has(n)&&ns.isColor(t)?t=new ns(t):t.constructor===Array&&(t=new Qs(t)),n==="leading"?this.leading&&this.leading(t):typeof r=="string"?this.node.setAttributeNS(r,n,t.toString()):this.node.setAttribute(n,t.toString()),this.rebuild&&(n==="font-size"||n==="x")&&this.rebuild()}}return this}var Ql=class n extends Yl{constructor(t,r){super(),this.node=t,this.type=t.nodeName,r&&t!==r&&this.attr(r)}add(t,r){return t=Xo(t),t.removeNamespace&&this.node instanceof cn.window.SVGElement&&t.removeNamespace(),r==null?this.node.appendChild(t.node):t.node!==this.node.childNodes[r]&&this.node.insertBefore(t.node,this.node.childNodes[r]),this}addTo(t,r){return Xo(t).put(this,r)}children(){return new pp(Dg(this.node.children,function(t){return ts(t)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,r=!0){this.writeDataToDom();let e=this.node.cloneNode(t);return r&&(e=bI(e)),new this.constructor(e)}each(t,r){let e=this.children(),i,o;for(i=0,o=e.length;i<o;i++)t.apply(e[i],[i,e]),r&&e[i].each(t,r);return this}element(t,r){return this.put(new n(ah(t),r))}first(){return ts(this.node.firstChild)}get(t){return ts(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,r){return this.xml(t,r,IR)}id(t){return typeof t>"u"&&!this.node.id&&(this.node.id=gI(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return ts(this.node.lastChild)}matches(t){let r=this.node,e=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector||null;return e&&e.call(r,t)}parent(t){let r=this;if(!r.node.parentNode)return null;if(r=ts(r.node.parentNode),!t)return r;do if(typeof t=="string"?r.matches(t):r instanceof t)return r;while(r=ts(r.node.parentNode));return r}put(t,r){return t=Xo(t),this.add(t,r),t}putIn(t,r){return Xo(t).add(this,r)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Xo(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,r=null){let e=10**t,i=this.attr(r);for(let o in i)typeof i[o]=="number"&&(i[o]=Math.round(i[o]*e)/e);return this.attr(i),this}svg(t,r){return this.xml(t,r,Mg)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){let r=this.parent();if(!r)return this.addTo(t);let e=r.index(this);return r.put(t,e).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(t,r,e){if(typeof t=="boolean"&&(e=r,r=t,t=null),t==null||typeof t=="function"){r=r??!0,this.writeDataToDom();let s=this;if(t!=null){if(s=ts(s.node.cloneNode(!0)),r){let c=t(s);if(s=c||s,c===!1)return""}s.each(function(){let c=t(this),u=c||this;c===!1?this.remove():c&&this!==u&&this.replace(u)},!0)}return r?s.node.outerHTML:s.node.innerHTML}r=r??!1;let i=ah("wrapper",e),o=cn.document.createDocumentFragment();i.innerHTML=t;for(let s=i.children.length;s--;)o.appendChild(i.firstElementChild);let a=this.parent();return r?this.replace(o)&&a:this.add(o)}};tn(Ql,{attr:qR,find:XU,findOne:ZU});Fi(Ql,"Dom");var xo=class extends Ql{constructor(t,r){super(t,r),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,r){return this.cx(t).cy(r)}cx(t){return t==null?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return t==null?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){let t=this.root();return t&&t.defs()}dmove(t,r){return this.dx(t).dy(r)}dx(t=0){return this.x(new kn(t).plus(this.x()))}dy(t=0){return this.y(new kn(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,r){return this.x(t).y(r)}parents(t=this.root()){let r=typeof t=="string";r||(t=Xo(t));let e=new pp,i=this;for(;(i=i.parent())&&i.node!==cn.document&&i.nodeName!=="#document-fragment"&&(e.push(i),!(!r&&i.node===t.node||r&&i.matches(t)));)if(i.node===this.root().node)return null;return e}reference(t){if(t=this.attr(t),!t)return null;let r=(t+"").match(FR);return r?Xo(r[1]):null}root(){let t=this.parent(OR(d1));return t&&t.root()}setData(t){return this.dom=t,this}size(t,r){let e=ql(this,t,r);return this.width(new kn(e.width)).height(new kn(e.height))}width(t){return this.attr("width",t)}writeDataToDom(){return l1(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};tn(xo,{bbox:YU,rbox:QU,inside:KU,point:$U,ctm:UU,screenCTM:HU});Fi(xo,"Element");var m1={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(n,t){return t==="color"?n:n+"-"+t}};["fill","stroke"].forEach(function(n){let t={},r;t[n]=function(e){if(typeof e>"u")return this.attr(n);if(typeof e=="string"||e instanceof ns||ns.isRgb(e)||e instanceof xo)this.attr(n,e);else for(r=m1[n].length-1;r>=0;r--)e[m1[n][r]]!=null&&this.attr(m1.prefix(n,m1[n][r]),e[m1[n][r]]);return this},ki(["Element","Runner"],t)});ki(["Element","Runner"],{matrix:function(n,t,r,e,i,o){return n==null?new Sn(this):this.attr("transform",new Sn(n,t,r,e,i,o))},rotate:function(n,t,r){return this.transform({rotate:n,ox:t,oy:r},!0)},skew:function(n,t,r,e){return arguments.length===1||arguments.length===3?this.transform({skew:n,ox:t,oy:r},!0):this.transform({skew:[n,t],ox:r,oy:e},!0)},shear:function(n,t,r){return this.transform({shear:n,ox:t,oy:r},!0)},scale:function(n,t,r,e){return arguments.length===1||arguments.length===3?this.transform({scale:n,ox:t,oy:r},!0):this.transform({scale:[n,t],ox:r,oy:e},!0)},translate:function(n,t){return this.transform({translate:[n,t]},!0)},relative:function(n,t){return this.transform({relative:[n,t]},!0)},flip:function(n="both",t="center"){return"xybothtrue".indexOf(n)===-1&&(t=n,n="both"),this.transform({flip:n,origin:t},!0)},opacity:function(n){return this.attr("opacity",n)}});ki("radius",{radius:function(n,t=n){return(this._element||this).type==="radialGradient"?this.attr("r",new kn(n)):this.rx(n).ry(t)}});ki("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(n){return new io(this.node.getPointAtLength(n))}});ki(["Element","Runner"],{font:function(n,t){if(typeof n=="object"){for(t in n)this.font(t,n[t]);return this}return n==="leading"?this.leading(t):n==="anchor"?this.attr("text-anchor",t):n==="size"||n==="family"||n==="weight"||n==="stretch"||n==="variant"||n==="style"?this.attr("font-"+n,t):this.attr(n,t)}});var jpe=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(n,t){let r=function(e){return e===null?this.off(t):this.on(t,e),this};return n[t]=r,n},{});ki("Element",jpe);y();function Gpe(){return this.attr("transform",null)}function zpe(){return(this.attr("transform")||"").split(NR).slice(0,-1).map(function(t){let r=t.trim().split("(");return[r[0],r[1].split(is).map(function(e){return parseFloat(e)})]}).reverse().reduce(function(t,r){return r[0]==="matrix"?t.lmultiply(Sn.fromArray(r[1])):t[r[0]].apply(t,r[1])},new Sn)}function $pe(n,t){if(this===n)return this;if(uv(this.node))return this.addTo(n,t);let r=this.screenCTM(),e=n.screenCTM().inverse();return this.addTo(n,t).untransform().transform(e.multiply(r)),this}function Upe(n){return this.toParent(this.root(),n)}function Hpe(n,t){if(n==null||typeof n=="string"){let i=new Sn(this).decompose();return n==null?i:i[n]}Sn.isMatrixLike(n)||(n=Lt(re({},n),{origin:mv(n,this)}));let r=t===!0?this:t||!1,e=new Sn(r).transform(n);return this.attr("transform",e)}ki("Element",{untransform:Gpe,matrixify:zpe,toParent:$pe,toRoot:Upe,transform:Hpe});y();var _o=class n extends xo{flatten(){return this.each(function(){if(this instanceof n)return this.flatten().ungroup()}),this}ungroup(t=this.parent(),r=t.index(this)){return r=r===-1?t.children().length:r,this.each(function(e,i){return i[i.length-e-1].toParent(t,r)}),this.remove()}};Fi(_o,"Container");y();var Nm=class extends _o{constructor(t,r=t){super(xn("defs",t),r)}flatten(){return this}ungroup(){return this}};Fi(Nm,"Defs");y();y();var oo=class extends xo{};Fi(oo,"Shape");var JR={};Ae(JR,{cx:()=>QR,cy:()=>KR,height:()=>ZR,rx:()=>u1,ry:()=>h1,width:()=>XR,x:()=>WR,y:()=>YR});y();function u1(n){return this.attr("rx",n)}function h1(n){return this.attr("ry",n)}function WR(n){return n==null?this.cx()-this.rx():this.cx(n+this.rx())}function YR(n){return n==null?this.cy()-this.ry():this.cy(n+this.ry())}function QR(n){return this.attr("cx",n)}function KR(n){return this.attr("cy",n)}function XR(n){return n==null?this.rx()*2:this.rx(new kn(n).divide(2))}function ZR(n){return n==null?this.ry()*2:this.ry(new kn(n).divide(2))}var Vm=class extends oo{constructor(t,r=t){super(xn("ellipse",t),r)}size(t,r){let e=ql(this,t,r);return this.rx(new kn(e.width).divide(2)).ry(new kn(e.height).divide(2))}};tn(Vm,JR);ki("Container",{ellipse:Pn(function(n=0,t=n){return this.put(new Vm).size(n,t).move(0,0)})});Fi(Vm,"Ellipse");y();var SI=class extends Ql{constructor(t=cn.document.createDocumentFragment()){super(t)}xml(t,r,e){if(typeof t=="boolean"&&(e=r,r=t,t=null),t==null||typeof t=="function"){let i=new Ql(ah("wrapper",e));return i.add(this.node.cloneNode(!0)),i.xml(!1,e)}return super.xml(t,!1,e)}};Fi(SI,"Fragment");var TI=SI;y();var iF={};Ae(iF,{from:()=>eF,to:()=>tF});y();function eF(n,t){return(this._element||this).type==="radialGradient"?this.attr({fx:new kn(n),fy:new kn(t)}):this.attr({x1:new kn(n),y1:new kn(t)})}function tF(n,t){return(this._element||this).type==="radialGradient"?this.attr({cx:new kn(n),cy:new kn(t)}):this.attr({x2:new kn(n),y2:new kn(t)})}var mp=class extends _o{constructor(t,r){super(xn(t+"Gradient",typeof t=="string"?null:t),r)}attr(t,r,e){return t==="transform"&&(t="gradientTransform"),super.attr(t,r,e)}bbox(){return new bo}targets(){return Ml("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};tn(mp,iF);ki({Container:{gradient(...n){return this.defs().gradient(...n)}},Defs:{gradient:Pn(function(n,t){return this.put(new mp(n)).update(t)})}});Fi(mp,"Gradient");y();y();var bd=class extends _o{constructor(t,r=t){super(xn("pattern",t),r)}attr(t,r,e){return t==="transform"&&(t="patternTransform"),super.attr(t,r,e)}bbox(){return new bo}targets(){return Ml("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};ki({Container:{pattern(...n){return this.defs().pattern(...n)}},Defs:{pattern:Pn(function(n,t,r){return this.put(new bd).update(r).attr({x:0,y:0,width:n,height:t,patternUnits:"userSpaceOnUse"})})}});Fi(bd,"Pattern");var Lm=class extends oo{constructor(t,r=t){super(xn("image",t),r)}load(t,r){if(!t)return this;let e=new cn.window.Image;return gd(e,"load",function(i){let o=this.parent(bd);this.width()===0&&this.height()===0&&this.size(e.width,e.height),o instanceof bd&&o.width()===0&&o.height()===0&&o.size(this.width(),this.height()),typeof r=="function"&&r.call(this,i)},this),gd(e,"load error",function(){Al(e)}),this.attr("href",e.src=t,fd)}};tH(function(n,t,r){return(n==="fill"||n==="stroke")&&LR.test(t)&&(t=r.root().defs().image(t)),t instanceof Lm&&(t=r.root().defs().pattern(0,0,e=>{e.add(t)})),t});ki({Container:{image:Pn(function(n,t){return this.put(new Lm).size(0,0).load(n,t)})}});Fi(Lm,"Image");y();y();var rs=class extends Qs{bbox(){let t=-1/0,r=-1/0,e=1/0,i=1/0;return this.forEach(function(o){t=Math.max(o[0],t),r=Math.max(o[1],r),e=Math.min(o[0],e),i=Math.min(o[1],i)}),new bo(e,i,t-e,r-i)}move(t,r){let e=this.bbox();if(t-=e.x,r-=e.y,!isNaN(t)&&!isNaN(r))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+r];return this}parse(t=[0,0]){let r=[];t instanceof Array?t=Array.prototype.concat.apply([],t):t=t.trim().split(is).map(parseFloat),t.length%2!==0&&t.pop();for(let e=0,i=t.length;e<i;e=e+2)r.push([t[e],t[e+1]]);return r}size(t,r){let e,i=this.bbox();for(e=this.length-1;e>=0;e--)i.width&&(this[e][0]=(this[e][0]-i.x)*t/i.width+i.x),i.height&&(this[e][1]=(this[e][1]-i.y)*r/i.height+i.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){let t=[];for(let r=0,e=this.length;r<e;r++)t.push(this[r].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){Sn.isMatrixLike(t)||(t=new Sn(t));for(let r=this.length;r--;){let[e,i]=this[r];this[r][0]=t.a*e+t.c*i+t.e,this[r][1]=t.b*e+t.d*i+t.f}return this}};var Pg={};Ae(Pg,{MorphArray:()=>qpe,height:()=>Kpe,width:()=>Qpe,x:()=>Wpe,y:()=>Ype});y();var qpe=rs;function Wpe(n){return n==null?this.bbox().x:this.move(n,this.bbox().y)}function Ype(n){return n==null?this.bbox().y:this.move(this.bbox().x,n)}function Qpe(n){let t=this.bbox();return n==null?t.width:this.size(n,t.height)}function Kpe(n){let t=this.bbox();return n==null?t.height:this.size(t.width,n)}var up=class extends oo{constructor(t,r=t){super(xn("line",t),r)}array(){return new rs([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,r){return this.attr(this.array().move(t,r).toLine())}plot(t,r,e,i){return t==null?this.array():(typeof r<"u"?t={x1:t,y1:r,x2:e,y2:i}:t=new rs(t).toLine(),this.attr(t))}size(t,r){let e=ql(this,t,r);return this.attr(this.array().size(e.width,e.height).toLine())}};tn(up,Pg);ki({Container:{line:Pn(function(...n){return up.prototype.plot.apply(this.put(new up),n[0]!=null?n:[0,0,0,0])})}});Fi(up,"Line");y();var Bm=class extends _o{constructor(t,r=t){super(xn("marker",t),r)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,r){return this.attr("refX",t).attr("refY",r)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};ki({Container:{marker(...n){return this.defs().marker(...n)}},Defs:{marker:Pn(function(n,t,r){return this.put(new Bm).size(n,t).ref(n/2,t/2).viewbox(0,0,n,t).attr("orient","auto").update(r)})},marker:{marker(n,t,r,e){let i=["marker"];return n!=="all"&&i.push(n),i=i.join("-"),n=arguments[1]instanceof Bm?arguments[1]:this.defs().marker(t,r,e),this.attr(i,n)}}});Fi(Bm,"Marker");y();y();function _v(n,t){return function(r){return r==null?this[n]:(this[n]=r,t&&t.call(this),this)}}var nF={"-":function(n){return n},"<>":function(n){return-Math.cos(n*Math.PI)/2+.5},">":function(n){return Math.sin(n*Math.PI/2)},"<":function(n){return-Math.cos(n*Math.PI/2)+1},bezier:function(n,t,r,e){return function(i){return i<0?n>0?t/n*i:r>0?e/r*i:0:i>1?r<1?(1-e)/(1-r)*i+(e-r)/(1-r):n<1?(1-t)/(1-n)*i+(t-n)/(1-n):1:3*i*(1-i)**2*t+3*i**2*(1-i)*e+i**3}},steps:function(n,t="end"){t=t.split("-").reverse()[0];let r=n;return t==="none"?--r:t==="both"&&++r,(e,i=!1)=>{let o=Math.floor(e*n),a=e*o%1===0;return(t==="start"||t==="both")&&++o,i&&a&&--o,e>=0&&o<0&&(o=0),e<=1&&o>r&&(o=r),o/r}}},vv=class{done(){return!1}},jm=class extends vv{constructor(t=sh.ease){super(),this.ease=nF[t]||t}step(t,r,e){return typeof t!="number"?e<1?t:r:t+(r-t)*this.ease(e)}},Gm=class extends vv{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,r,e,i){return this.stepper(t,r,e,i)}};function iH(){let n=(this._duration||500)/1e3,t=this._overshoot||0,r=1e-10,e=Math.PI,i=Math.log(t/100+r),o=-i/Math.sqrt(e*e+i*i),a=3.9/(o*n);this.d=2*o*a,this.k=a*a}var f1=class extends Gm{constructor(t=500,r=0){super(),this.duration(t).overshoot(r)}step(t,r,e,i){if(typeof t=="string")return t;if(i.done=e===1/0,e===1/0)return r;if(e===0)return t;e>100&&(e=16),e/=1e3;let o=i.velocity||0,a=-this.d*o-this.k*(t-r),s=t+o*e+a*e*e/2;return i.velocity=o+a*e,i.done=Math.abs(r-s)+Math.abs(o)<.002,i.done?r:s}};tn(f1,{duration:_v("_duration",iH),overshoot:_v("_overshoot",iH)});var g1=class extends Gm{constructor(t=.1,r=.01,e=0,i=1e3){super(),this.p(t).i(r).d(e).windup(i)}step(t,r,e,i){if(typeof t=="string")return t;if(i.done=e===1/0,e===1/0)return r;if(e===0)return t;let o=r-t,a=(i.integral||0)+o*e,s=(o-(i.error||0))/e,c=this._windup;return c!==!1&&(a=Math.max(-c,Math.min(a,c))),i.error=o,i.integral=a,i.done=Math.abs(o)<.001,i.done?r:t+(this.P*o+this.I*a+this.D*s)}};tn(g1,{windup:_v("_windup"),p:_v("P"),i:_v("I"),d:_v("D")});y();y();var Xpe={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},oF={M:function(n,t,r){return t.x=r.x=n[0],t.y=r.y=n[1],["M",t.x,t.y]},L:function(n,t){return t.x=n[0],t.y=n[1],["L",n[0],n[1]]},H:function(n,t){return t.x=n[0],["H",n[0]]},V:function(n,t){return t.y=n[0],["V",n[0]]},C:function(n,t){return t.x=n[4],t.y=n[5],["C",n[0],n[1],n[2],n[3],n[4],n[5]]},S:function(n,t){return t.x=n[2],t.y=n[3],["S",n[0],n[1],n[2],n[3]]},Q:function(n,t){return t.x=n[2],t.y=n[3],["Q",n[0],n[1],n[2],n[3]]},T:function(n,t){return t.x=n[0],t.y=n[1],["T",n[0],n[1]]},Z:function(n,t,r){return t.x=r.x,t.y=r.y,["Z"]},A:function(n,t){return t.x=n[5],t.y=n[6],["A",n[0],n[1],n[2],n[3],n[4],n[5],n[6]]}},rF="mlhvqtcsaz".split("");for(let n=0,t=rF.length;n<t;++n)oF[rF[n]]=function(r){return function(e,i,o){if(r==="H")e[0]=e[0]+i.x;else if(r==="V")e[0]=e[0]+i.y;else if(r==="A")e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(let a=0,s=e.length;a<s;++a)e[a]=e[a]+(a%2?i.y:i.x);return oF[r](e,i,o)}}(rF[n].toUpperCase());function Zpe(n){let t=n.segment[0];return oF[t](n.segment.slice(1),n.p,n.p0)}function aF(n){return n.segment.length&&n.segment.length-1===Xpe[n.segment[0].toUpperCase()]}function Jpe(n,t){n.inNumber&&Rg(n,!1);let r=hv.test(t);if(r)n.segment=[t];else{let e=n.lastCommand,i=e.toLowerCase(),o=e===i;n.segment=[i==="m"?o?"l":"L":e]}return n.inSegment=!0,n.lastCommand=n.segment[0],r}function Rg(n,t){if(!n.inNumber)throw new Error("Parser Error");n.number&&n.segment.push(parseFloat(n.number)),n.inNumber=t,n.number="",n.pointSeen=!1,n.hasExponent=!1,aF(n)&&sF(n)}function sF(n){n.inSegment=!1,n.absolute&&(n.segment=Zpe(n)),n.segments.push(n.segment)}function eme(n){if(!n.segment.length)return!1;let t=n.segment[0].toUpperCase()==="A",r=n.segment.length;return t&&(r===4||r===5)}function tme(n){return n.lastToken.toUpperCase()==="E"}var ime=new Set([" ",",","	",`
103`,"\r","\f"]);function nH(n,t=!0){let r=0,e="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:t,p0:new io,p:new io};for(;i.lastToken=e,e=n.charAt(r++);)if(!(!i.inSegment&&Jpe(i,e))){if(e==="."){if(i.pointSeen||i.hasExponent){Rg(i,!1),--r;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=e;continue}if(!isNaN(parseInt(e))){if(i.number==="0"||eme(i)){i.inNumber=!0,i.number=e,Rg(i,!0);continue}i.inNumber=!0,i.number+=e;continue}if(ime.has(e)){i.inNumber&&Rg(i,!1);continue}if(e==="-"||e==="+"){if(i.inNumber&&!tme(i)){Rg(i,!1),--r;continue}i.number+=e,i.inNumber=!0;continue}if(e.toUpperCase()==="E"){i.number+=e,i.hasExponent=!0;continue}if(hv.test(e)){if(i.inNumber)Rg(i,!1);else if(aF(i))sF(i);else throw new Error("parser Error");--r}}return i.inNumber&&Rg(i,!1),i.inSegment&&aF(i)&&sF(i),i.segments}function nme(n){let t="";for(let r=0,e=n.length;r<e;r++)t+=n[r][0],n[r][1]!=null&&(t+=n[r][1],n[r][2]!=null&&(t+=" ",t+=n[r][2],n[r][3]!=null&&(t+=" ",t+=n[r][3],t+=" ",t+=n[r][4],n[r][5]!=null&&(t+=" ",t+=n[r][5],t+=" ",t+=n[r][6],n[r][7]!=null&&(t+=" ",t+=n[r][7])))));return t+" "}var Ks=class extends Qs{bbox(){return Wl().path.setAttribute("d",this.toString()),new bo(Wl.nodes.path.getBBox())}move(t,r){let e=this.bbox();if(t-=e.x,r-=e.y,!isNaN(t)&&!isNaN(r))for(let i,o=this.length-1;o>=0;o--)i=this[o][0],i==="M"||i==="L"||i==="T"?(this[o][1]+=t,this[o][2]+=r):i==="H"?this[o][1]+=t:i==="V"?this[o][1]+=r:i==="C"||i==="S"||i==="Q"?(this[o][1]+=t,this[o][2]+=r,this[o][3]+=t,this[o][4]+=r,i==="C"&&(this[o][5]+=t,this[o][6]+=r)):i==="A"&&(this[o][6]+=t,this[o][7]+=r);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),nH(t)}size(t,r){let e=this.bbox(),i,o;for(e.width=e.width===0?1:e.width,e.height=e.height===0?1:e.height,i=this.length-1;i>=0;i--)o=this[i][0],o==="M"||o==="L"||o==="T"?(this[i][1]=(this[i][1]-e.x)*t/e.width+e.x,this[i][2]=(this[i][2]-e.y)*r/e.height+e.y):o==="H"?this[i][1]=(this[i][1]-e.x)*t/e.width+e.x:o==="V"?this[i][1]=(this[i][1]-e.y)*r/e.height+e.y:o==="C"||o==="S"||o==="Q"?(this[i][1]=(this[i][1]-e.x)*t/e.width+e.x,this[i][2]=(this[i][2]-e.y)*r/e.height+e.y,this[i][3]=(this[i][3]-e.x)*t/e.width+e.x,this[i][4]=(this[i][4]-e.y)*r/e.height+e.y,o==="C"&&(this[i][5]=(this[i][5]-e.x)*t/e.width+e.x,this[i][6]=(this[i][6]-e.y)*r/e.height+e.y)):o==="A"&&(this[i][1]=this[i][1]*t/e.width,this[i][2]=this[i][2]*r/e.height,this[i][6]=(this[i][6]-e.x)*t/e.width+e.x,this[i][7]=(this[i][7]-e.y)*r/e.height+e.y);return this}toString(){return nme(this)}};var rH=n=>{let t=typeof n;return t==="number"?kn:t==="string"?ns.isColor(n)?ns:is.test(n)?hv.test(n)?Ks:Qs:p1.test(n)?kn:Fg:lF.indexOf(n.constructor)>-1?n.constructor:Array.isArray(n)?Qs:t==="object"?hp:Fg},kc=class{constructor(t){this._stepper=t||new jm("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(r,e){return r&&e},!0)}from(t){return t==null?this._from:(this._from=this._set(t),this)}stepper(t){return t==null?this._stepper:(this._stepper=t,this)}to(t){return t==null?this._to:(this._to=this._set(t),this)}type(t){return t==null?this._type:(this._type=t,this)}_set(t){this._type||this.type(rH(t));let r=new this._type(t);return this._type===ns&&(r=this._to?r[this._to[4]]():this._from?r[this._from[4]]():r),this._type===hp&&(r=this._to?r.align(this._to):this._from?r.align(this._from):r),r=r.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(r.length)).map(Object).map(function(e){return e.done=!0,e}),r}};var Fg=class{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}},b1=(()=>{class n{constructor(...r){this.init(...r)}init(r){return Array.isArray(r)&&(r={scaleX:r[0],scaleY:r[1],shear:r[2],rotate:r[3],translateX:r[4],translateY:r[5],originX:r[6],originY:r[7]}),Object.assign(this,n.defaults,r),this}toArray(){let r=this;return[r.scaleX,r.scaleY,r.shear,r.rotate,r.translateX,r.translateY,r.originX,r.originY]}}return n.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0},n})(),rme=(n,t)=>n[0]<t[0]?-1:n[0]>t[0]?1:0,hp=class{constructor(...t){this.init(...t)}align(t){let r=this.values;for(let e=0,i=r.length;e<i;++e){if(r[e+1]===t[e+1]){if(r[e+1]===ns&&t[e+7]!==r[e+7]){let s=t[e+7],c=new ns(this.values.splice(e+3,5))[s]().toArray();this.values.splice(e+3,0,...c)}e+=r[e+2]+2;continue}if(!t[e+1])return this;let o=new t[e+1]().toArray(),a=r[e+2]+3;r.splice(e,a,t[e],t[e+1],t[e+2],...o),e+=r[e+2]+2}return this}init(t){if(this.values=[],Array.isArray(t)){this.values=t.slice();return}t=t||{};let r=[];for(let e in t){let i=rH(t[e]),o=new i(t[e]).toArray();r.push([e,i,o.length,...o])}return r.sort(rme),this.values=r.reduce((e,i)=>e.concat(i),[]),this}toArray(){return this.values}valueOf(){let t={},r=this.values;for(;r.length;){let e=r.shift(),i=r.shift(),o=r.shift(),a=r.splice(0,o);t[e]=new i(a)}return t}},lF=[Fg,b1,hp];function cF(n=[]){lF.push(...[].concat(n))}function dF(){tn(lF,{to(n){return new kc().type(this.constructor).from(this.toArray()).to(n)},fromArray(n){return this.init(n),this},toConsumable(){return this.toArray()},morph(n,t,r,e,i){let o=function(a,s){return e.step(a,t[s],r,i[s],i)};return this.fromArray(n.map(o))}})}y();var Dc=class extends oo{constructor(t,r=t){super(xn("path",t),r)}array(){return this._array||(this._array=new Ks(this.attr("d")))}clear(){return delete this._array,this}height(t){return t==null?this.bbox().height:this.size(this.bbox().width,t)}move(t,r){return this.attr("d",this.array().move(t,r))}plot(t){return t==null?this.array():this.clear().attr("d",typeof t=="string"?t:this._array=new Ks(t))}size(t,r){let e=ql(this,t,r);return this.attr("d",this.array().size(e.width,e.height))}width(t){return t==null?this.bbox().width:this.size(t,this.bbox().height)}x(t){return t==null?this.bbox().x:this.move(t,this.bbox().y)}y(t){return t==null?this.bbox().y:this.move(this.bbox().x,t)}};Dc.prototype.MorphArray=Ks;ki({Container:{path:Pn(function(n){return this.put(new Dc).plot(n||new Ks)})}});Fi(Dc,"Path");y();var _1={};Ae(_1,{array:()=>ome,clear:()=>ame,move:()=>sme,plot:()=>lme,size:()=>cme});y();function ome(){return this._array||(this._array=new rs(this.attr("points")))}function ame(){return delete this._array,this}function sme(n,t){return this.attr("points",this.array().move(n,t))}function lme(n){return n==null?this.array():this.clear().attr("points",typeof n=="string"?n:this._array=new rs(n))}function cme(n,t){let r=ql(this,n,t);return this.attr("points",this.array().size(r.width,r.height))}var fp=class extends oo{constructor(t,r=t){super(xn("polygon",t),r)}};ki({Container:{polygon:Pn(function(n){return this.put(new fp).plot(n||new rs)})}});tn(fp,Pg);tn(fp,_1);Fi(fp,"Polygon");y();var gp=class extends oo{constructor(t,r=t){super(xn("polyline",t),r)}};ki({Container:{polyline:Pn(function(n){return this.put(new gp).plot(n||new rs)})}});tn(gp,Pg);tn(gp,_1);Fi(gp,"Polyline");y();var zm=class extends oo{constructor(t,r=t){super(xn("rect",t),r)}};tn(zm,{rx:u1,ry:h1});ki({Container:{rect:Pn(function(n,t){return this.put(new zm).size(n,t)})}});Fi(zm,"Rect");y();y();y();var lh=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){let r=typeof t.next<"u"?t:{value:t,next:null,prev:null};return this._last?(r.prev=this._last,this._last.next=r,this._last=r):(this._last=r,this._first=r),r}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){let t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}};var vo={nextDraw:null,frames:new lh,timeouts:new lh,immediates:new lh,timer:()=>cn.window.performance||cn.window.Date,transforms:[],frame(n){let t=vo.frames.push({run:n});return vo.nextDraw===null&&(vo.nextDraw=cn.window.requestAnimationFrame(vo._draw)),t},timeout(n,t){t=t||0;let r=vo.timer().now()+t,e=vo.timeouts.push({run:n,time:r});return vo.nextDraw===null&&(vo.nextDraw=cn.window.requestAnimationFrame(vo._draw)),e},immediate(n){let t=vo.immediates.push(n);return vo.nextDraw===null&&(vo.nextDraw=cn.window.requestAnimationFrame(vo._draw)),t},cancelFrame(n){n!=null&&vo.frames.remove(n)},clearTimeout(n){n!=null&&vo.timeouts.remove(n)},cancelImmediate(n){n!=null&&vo.immediates.remove(n)},_draw(n){let t=null,r=vo.timeouts.last();for(;(t=vo.timeouts.shift())&&(n>=t.time?t.run():vo.timeouts.push(t),t!==r););let e=null,i=vo.frames.last();for(;e!==i&&(e=vo.frames.shift());)e.run(n);let o=null;for(;o=vo.immediates.shift();)o();vo.nextDraw=vo.timeouts.first()||vo.frames.first()?cn.window.requestAnimationFrame(vo._draw):null}},ch=vo;y();var dme=function(n){let t=n.start,r=n.runner.duration(),e=t+r;return{start:t,duration:r,end:e,runner:n.runner}},pme=function(){let n=cn.window;return(n.performance||n.Date).now()},bp=class extends Yl{constructor(t=pme){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){let t=this.getLastRunnerInfo(),r=t?t.runner.duration():0;return(t?t.start:this._time)+r}getEndTimeOfTimeline(){let t=this._runners.map(r=>r.start+r.runner.duration());return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return t==null?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){let r=this.speed();if(t==null)return this.speed(-r);let e=Math.abs(r);return this.speed(t?-e:e)}schedule(t,r,e){if(t==null)return this._runners.map(dme);let i=0,o=this.getEndTime();if(r=r||0,e==null||e==="last"||e==="after")i=o;else if(e==="absolute"||e==="start")i=r,r=0;else if(e==="now")i=this._time;else if(e==="relative"){let c=this.getRunnerInfoById(t.id);c&&(i=c.start+r,r=0)}else if(e==="with-last"){let c=this.getLastRunnerInfo();i=c?c.start:this._time}else throw new Error('Invalid value for the "when" parameter');t.unschedule(),t.timeline(this);let a=t.persist(),s={persist:a===null?this._persist:a,start:i+r,runner:t};return this._lastRunnerId=t.id,this._runners.push(s),this._runners.sort((c,u)=>c.start-u.start),this._runnerIds=this._runners.map(c=>c.runner.id),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return t==null?this._timeSource:(this._timeSource=t,this)}speed(t){return t==null?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return t==null?this._time:(this._time=t,this._continue(!0))}unschedule(t){let r=this._runnerIds.indexOf(t.id);return r<0?this:(this._runners.splice(r,1),this._runnerIds.splice(r,1),t.timeline(null),this)}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return ch.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():this._paused?this:(this._nextFrame=ch.frame(this._step),this)}_stepFn(t=!1){let r=this._timeSource(),e=r-this._lastSourceTime;t&&(e=0);let i=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=r,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let a=this._runners.length;a--;){let s=this._runners[a],c=s.runner;this._time-s.start<=0&&c.reset()}let o=!1;for(let a=0,s=this._runners.length;a<s;a++){let c=this._runners[a],u=c.runner,f=i,_=this._time-c.start;if(_<=0){o=!0;continue}else _<f&&(f=_);if(!u.active())continue;u.step(f).done?c.persist!==!0&&u.duration()-u.time()+this._time+c.persist<this._time&&(u.unschedule(),--a,--s):o=!0}return o&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}};ki({Element:{timeline:function(n){return n==null?(this._timeline=this._timeline||new bp,this._timeline):(this._timeline=n,this)}}});var _d=(()=>{class n extends Yl{constructor(r){super(),this.id=n.id++,r=r??sh.duration,r=typeof r=="function"?new Gm(r):r,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof r=="number"&&r,this._isDeclarative=r instanceof Gm,this._stepper=this._isDeclarative?r:new jm,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Sn,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=this._isDeclarative?!0:null}static sanitise(r,e,i){let o=1,a=!1,s=0;return r=r??sh.duration,e=e??sh.delay,i=i||"last",typeof r=="object"&&!(r instanceof vv)&&(e=r.delay??e,i=r.when??i,a=r.swing||a,o=r.times??o,s=r.wait??s,r=r.duration??sh.duration),{duration:r,delay:e,swing:a,times:o,wait:s,when:i}}active(r){return r==null?this.enabled:(this.enabled=r,this)}addTransform(r){return this.transforms.lmultiplyO(r),this}after(r){return this.on("finished",r)}animate(r,e,i){let o=n.sanitise(r,e,i),a=new n(o.duration);return this._timeline&&a.timeline(this._timeline),this._element&&a.element(this._element),a.loop(o).schedule(o.delay,o.when)}clearTransform(){return this.transforms=new Sn,this}clearTransformsFromQueue(){(!this.done||!this._timeline||!this._timeline._runnerIds.includes(this.id))&&(this._queue=this._queue.filter(r=>!r.isTransform))}delay(r){return this.animate(0,r)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(r){return this.queue(null,r)}ease(r){return this._stepper=new jm(r),this}element(r){return r==null?this._element:(this._element=r,r._prepareRunner(),this)}finish(){return this.step(1/0)}loop(r,e,i){return typeof r=="object"&&(e=r.swing,i=r.wait,r=r.times),this._times=r||1/0,this._swing=e||!1,this._wait=i||0,this._times===!0&&(this._times=1/0),this}loops(r){let e=this._duration+this._wait;if(r==null){let s=Math.floor(this._time/e),u=(this._time-s*e)/this._duration;return Math.min(s+u,this._times)}let i=Math.floor(r),o=r%1,a=e*i+this._duration*o;return this.time(a)}persist(r){return r==null?this._persist:(this._persist=r,this)}position(r){let e=this._time,i=this._duration,o=this._wait,a=this._times,s=this._swing,c=this._reverse,u;if(r==null){let S=function(H){let q=s*Math.floor(H%(2*(o+i))/(o+i)),ee=q&&!c||!q&&c,Ie=Math.pow(-1,ee)*(H%(o+i))/i+ee;return Math.max(Math.min(Ie,1),0)},F=a*(o+i)-o;return u=e<=0?Math.round(S(1e-5)):e<F?S(e):Math.round(S(F-1e-5)),u}let f=Math.floor(this.loops()),_=s&&f%2===0;return u=f+(_&&!c||c&&_?r:1-r),this.loops(u)}progress(r){return r==null?Math.min(1,this._time/this.duration()):this.time(r*this.duration())}queue(r,e,i,o){return this._queue.push({initialiser:r||xI,runner:e||xI,retarget:i,isTransform:o,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted?this:(this.time(0),this._reseted=!0,this)}reverse(r){return this._reverse=r??!this._reverse,this}schedule(r,e,i){if(r instanceof bp||(i=e,e=r,r=this.timeline()),!r)throw Error("Runner cannot be scheduled without timeline");return r.schedule(this,e,i),this}step(r){if(!this.enabled)return this;r=r??16,this._time+=r;let e=this.position(),i=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;let o=this.duration(),a=this._lastTime<=0&&this._time>0,s=this._lastTime<o&&this._time>=o;this._lastTime=this._time,a&&this.fire("start",this);let c=this._isDeclarative;this.done=!c&&!s&&this._time>=o,this._reseted=!1;let u=!1;return(i||c)&&(this._initialise(i),this.transforms=new Sn,u=this._run(c?r:e),this.fire("step",this)),this.done=this.done||u&&c,s&&this.fire("finished",this),this}time(r){if(r==null)return this._time;let e=r-this._time;return this.step(e),this}timeline(r){return typeof r>"u"?this._timeline:(this._timeline=r,this)}unschedule(){let r=this.timeline();return r&&r.unschedule(this),this}_initialise(r){if(!(!r&&!this._isDeclarative))for(let e=0,i=this._queue.length;e<i;++e){let o=this._queue[e],a=this._isDeclarative||!o.initialised&&r;r=!o.finished,a&&r&&(o.initialiser.call(this),o.initialised=!0)}}_rememberMorpher(r,e){if(this._history[r]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){let i=this.timeline();i&&i.play()}}_run(r){let e=!0;for(let i=0,o=this._queue.length;i<o;++i){let a=this._queue[i],s=a.runner.call(this,r);a.finished=a.finished||s===!0,e=e&&a.finished}return e}_tryRetarget(r,e,i){if(this._history[r]){if(!this._history[r].caller.initialised){let a=this._queue.indexOf(this._history[r].caller);return this._queue.splice(a,1),!1}this._history[r].caller.retarget?this._history[r].caller.retarget.call(this,e,i):this._history[r].morpher.to(e),this._history[r].caller.finished=!1;let o=this.timeline();return o&&o.play(),!0}return!1}}return n.id=0,n})();var yv=class{constructor(t=new Sn,r=-1,e=!0){this.transforms=t,this.id=r,this.done=e}clearTransformsFromQueue(){}};tn([_d,yv],{mergeWith(n){return new yv(n.transforms.lmultiply(this.transforms),n.id)}});var oH=(n,t)=>n.lmultiplyO(t),aH=n=>n.transforms;function mme(){let t=this._transformationRunners.runners.map(aH).reduce(oH,new Sn);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}var pF=class{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;let r=t.id+1;return this.runners.push(t),this.ids.push(r),this}clearBefore(t){let r=this.ids.indexOf(t+1)||1;return this.ids.splice(0,r,0),this.runners.splice(0,r,new yv).forEach(e=>e.clearTransformsFromQueue()),this}edit(t,r){let e=this.ids.indexOf(t+1);return this.ids.splice(e,1,t+1),this.runners.splice(e,1,r),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let r=0;r<this.runners.length;++r){let e=this.runners[r];if(t&&e.done&&t.done&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(e.id);let o=e.mergeWith(t);this.edit(t.id,o),t=o,--r}else t=e}return this}remove(t){let r=this.ids.indexOf(t+1);return this.ids.splice(r,1),this.runners.splice(r,1),this}};ki({Element:{animate(n,t,r){let e=_d.sanitise(n,t,r),i=this.timeline();return new _d(e.duration).loop(e).element(this).timeline(i.play()).schedule(e.delay,e.when)},delay(n,t){return this.animate(0,n,t)},_clearTransformRunnersBefore(n){this._transformationRunners.clearBefore(n.id)},_currentTransform(n){return this._transformationRunners.runners.filter(t=>t.id<=n.id).map(aH).reduce(oH,new Sn)},_addRunner(n){this._transformationRunners.add(n),ch.cancelImmediate(this._frameId),this._frameId=ch.immediate(mme.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new pF().add(new yv(new Sn(this))))}}});var ume=(n,t)=>n.filter(r=>!t.includes(r));tn(_d,{attr(n,t){return this.styleAttr("attr",n,t)},css(n,t){return this.styleAttr("css",n,t)},styleAttr(n,t,r){if(typeof t=="string")return this.styleAttr(n,{[t]:r});let e=t;if(this._tryRetarget(n,e))return this;let i=new kc(this._stepper).to(e),o=Object.keys(e);return this.queue(function(){i=i.from(this.element()[n](o))},function(a){return this.element()[n](i.at(a).valueOf()),i.done()},function(a){let s=Object.keys(a),c=ume(s,o);if(c.length){let f=this.element()[n](c),_=new hp(i.from()).valueOf();Object.assign(_,f),i.from(_)}let u=new hp(i.to()).valueOf();Object.assign(u,a),i.to(u),o=s,e=a}),this._rememberMorpher(n,i),this},zoom(n,t){if(this._tryRetarget("zoom",n,t))return this;let r=new kc(this._stepper).to(new kn(n));return this.queue(function(){r=r.from(this.element().zoom())},function(e){return this.element().zoom(r.at(e),t),r.done()},function(e,i){t=i,r.to(e)}),this._rememberMorpher("zoom",r),this},transform(n,t,r){if(t=n.relative||t,this._isDeclarative&&!t&&this._tryRetarget("transform",n))return this;let e=Sn.isMatrixLike(n);r=n.affine!=null?n.affine:r??!e;let i=new kc(this._stepper).type(r?b1:Sn),o,a,s,c,u;function f(){a=a||this.element(),o=o||mv(n,a),u=new Sn(t?void 0:a),a._addRunner(this),t||a._clearTransformRunnersBefore(this)}function _(S){t||this.clearTransform();let{x:F,y:H}=new io(o).transform(a._currentTransform(this)),q=new Sn(Lt(re({},n),{origin:[F,H]})),ee=this._isDeclarative&&s?s:u;if(r){q=q.decompose(F,H),ee=ee.decompose(F,H);let He=q.rotate,Le=ee.rotate,qe=[He-360,He,He+360],ue=qe.map(Ui=>Math.abs(Ui-Le)),Ne=Math.min(...ue),st=ue.indexOf(Ne);q.rotate=qe[st]}t&&(e||(q.rotate=n.rotate||0),this._isDeclarative&&c&&(ee.rotate=c)),i.from(ee),i.to(q);let Ie=i.at(S);return c=Ie.rotate,s=new Sn(Ie),this.addTransform(s),a._addRunner(this),i.done()}function I(S){(S.origin||"center").toString()!==(n.origin||"center").toString()&&(o=mv(S,a)),n=Lt(re({},S),{origin:o})}return this.queue(f,_,I,!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(n){return this._queueNumber("x",n)},y(n){return this._queueNumber("y",n)},ax(n){return this._queueNumber("ax",n)},ay(n){return this._queueNumber("ay",n)},dx(n=0){return this._queueNumberDelta("x",n)},dy(n=0){return this._queueNumberDelta("y",n)},dmove(n,t){return this.dx(n).dy(t)},_queueNumberDelta(n,t){if(t=new kn(t),this._tryRetarget(n,t))return this;let r=new kc(this._stepper).to(t),e=null;return this.queue(function(){e=this.element()[n](),r.from(e),r.to(e+t)},function(i){return this.element()[n](r.at(i)),r.done()},function(i){r.to(e+new kn(i))}),this._rememberMorpher(n,r),this},_queueObject(n,t){if(this._tryRetarget(n,t))return this;let r=new kc(this._stepper).to(t);return this.queue(function(){r.from(this.element()[n]())},function(e){return this.element()[n](r.at(e)),r.done()}),this._rememberMorpher(n,r),this},_queueNumber(n,t){return this._queueObject(n,new kn(t))},cx(n){return this._queueNumber("cx",n)},cy(n){return this._queueNumber("cy",n)},move(n,t){return this.x(n).y(t)},amove(n,t){return this.ax(n).ay(t)},center(n,t){return this.cx(n).cy(t)},size(n,t){let r;return(!n||!t)&&(r=this._element.bbox()),n||(n=r.width/r.height*t),t||(t=r.height/r.width*n),this.width(n).height(t)},width(n){return this._queueNumber("width",n)},height(n){return this._queueNumber("height",n)},plot(n,t,r,e){if(arguments.length===4)return this.plot([n,t,r,e]);if(this._tryRetarget("plot",n))return this;let i=new kc(this._stepper).type(this._element.MorphArray).to(n);return this.queue(function(){i.from(this._element.array())},function(o){return this._element.plot(i.at(o)),i.done()}),this._rememberMorpher("plot",i),this},leading(n){return this._queueNumber("leading",n)},viewbox(n,t,r,e){return this._queueObject("viewbox",new bo(n,t,r,e))},update(n){return typeof n!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(n.opacity!=null&&this.attr("stop-opacity",n.opacity),n.color!=null&&this.attr("stop-color",n.color),n.offset!=null&&this.attr("offset",n.offset),this)}});tn(_d,{rx:u1,ry:h1,from:eF,to:tF});Fi(_d,"Runner");y();var _p=class extends _o{constructor(t,r=t){super(xn("svg",t),r),this.namespace()}defs(){return this.isRoot()?ts(this.node.querySelector("defs"))||this.put(new Nm):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof cn.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:Mg,version:"1.1"}).attr("xmlns:xlink",fd,c1):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,c1).attr("xmlns:svgjs",null,c1)}root(){return this.isRoot()?this:super.root()}};ki({Container:{nested:Pn(function(){return this.put(new _p)})}});Fi(_p,"Svg",!0);y();var dh=class extends _o{constructor(t,r=t){super(xn("symbol",t),r)}};ki({Container:{symbol:Pn(function(){return this.put(new dh)})}});Fi(dh,"Symbol");y();var v1={};Ae(v1,{amove:()=>Sme,ax:()=>wme,ay:()=>xme,build:()=>Tme,center:()=>Cme,cx:()=>vme,cy:()=>yme,length:()=>fme,move:()=>_me,plain:()=>hme,x:()=>gme,y:()=>bme});y();function hme(n){return this._build===!1&&this.clear(),this.node.appendChild(cn.document.createTextNode(n)),this}function fme(){return this.node.getComputedTextLength()}function gme(n,t=this.bbox()){return n==null?t.x:this.attr("x",this.attr("x")+n-t.x)}function bme(n,t=this.bbox()){return n==null?t.y:this.attr("y",this.attr("y")+n-t.y)}function _me(n,t,r=this.bbox()){return this.x(n,r).y(t,r)}function vme(n,t=this.bbox()){return n==null?t.cx:this.attr("x",this.attr("x")+n-t.cx)}function yme(n,t=this.bbox()){return n==null?t.cy:this.attr("y",this.attr("y")+n-t.cy)}function Cme(n,t,r=this.bbox()){return this.cx(n,r).cy(t,r)}function wme(n){return this.attr("x",n)}function xme(n){return this.attr("y",n)}function Sme(n,t){return this.ax(n).ay(t)}function Tme(n){return this._build=!!n,this}var Ta=class extends oo{constructor(t,r=t){super(xn("text",t),r),this.dom.leading=this.dom.leading??new kn(1.3),this._rebuild=!0,this._build=!1}leading(t){return t==null?this.dom.leading:(this.dom.leading=new kn(t),this.rebuild())}rebuild(t){if(typeof t=="boolean"&&(this._rebuild=t),this._rebuild){let r=this,e=0,i=this.dom.leading;this.each(function(o){if(uv(this.node))return;let a=cn.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=i*new kn(a);this.dom.newLined&&(this.attr("x",r.attr("x")),this.text()===`
104`?e+=s:(this.attr("dy",o?s+e:0),e=0))}),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new kn(t.leading||1.3),this}writeDataToDom(){return l1(this,this.dom,{leading:1.3}),this}text(t){if(t===void 0){let r=this.node.childNodes,e=0;t="";for(let i=0,o=r.length;i<o;++i){if(r[i].nodeName==="textPath"||uv(r[i])){i===0&&(e=i+1);continue}i!==e&&r[i].nodeType!==3&&ts(r[i]).dom.newLined===!0&&(t+=`
105`),t+=r[i].textContent}return t}if(this.clear().build(!0),typeof t=="function")t.call(this,this);else{t=(t+"").split(`
106`);for(let r=0,e=t.length;r<e;r++)this.newLine(t[r])}return this.build(!1).rebuild()}};tn(Ta,v1);ki({Container:{text:Pn(function(n=""){return this.put(new Ta).text(n)}),plain:Pn(function(n=""){return this.put(new Ta).plain(n)})}});Fi(Ta,"Text");y();var $m=class extends oo{constructor(t,r=t){super(xn("tspan",t),r),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;let t=this.parent();if(!(t instanceof Ta))return this;let r=t.index(this),e=cn.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new kn(e);return this.dy(r?i:0).attr("x",t.x())}text(t){return t==null?this.node.textContent+(this.dom.newLined?`
107`:""):(typeof t=="function"?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}};tn($m,v1);ki({Tspan:{tspan:Pn(function(n=""){let t=new $m;return this._build||this.clear(),this.put(t).text(n)})},Text:{newLine:function(n=""){return this.tspan(n).newLine()}}});Fi($m,"Tspan");y();var Ng=class extends oo{constructor(t,r=t){super(xn("circle",t),r)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new kn(t).divide(2))}};
107tn(Ng,{x:WR,y:YR,cx:QR,cy:KR,width:XR,height:ZR});ki({Container:{circle:Pn(function(n=0){return this.put(new Ng).size(n).move(0,0)})}});Fi(Ng,"Circle");y();var Vg=class extends _o{constructor(t,r=t){super(xn("clipPath",t),r)}remove(){return this.targets().forEach(function(t){t.unclip()}),super.remove()}targets(){return Ml("svg [clip-path*="+this.id()+"]")}};ki({Container:{clip:Pn(function(){return this.defs().put(new Vg)})},Element:{clipper(){return this.reference("clip-path")},clipWith(n){let t=n instanceof Vg?n:this.parent().clip().add(n);return this.attr("clip-path","url(#"+t.id()+")")},unclip(){return this.attr("clip-path",null)}}});Fi(Vg,"ClipPath");y();var Cv=class extends xo{constructor(t,r=t){super(xn("foreignObject",t),r)}};ki({Container:{foreignObject:Pn(function(n,t){return this.put(new Cv).size(n,t)})}});Fi(Cv,"ForeignObject");y();var y1={};Ae(y1,{dmove:()=>Eme,dx:()=>Ime,dy:()=>kme,height:()=>Dme,move:()=>Mme,size:()=>Ame,width:()=>Ome,x:()=>Pme,y:()=>Rme});y();function Eme(n,t){return this.children().forEac
vendor: 4,186 bytes, line 107
107h(r=>{let e;try{e=r.node instanceof hI().SVGSVGElement?new bo(r.attr(["x","y","width","height"])):r.bbox()}catch{return}let i=new Sn(r),o=i.translate(n,t).transform(i.inverse()),a=new io(e.x,e.y).transform(o);r.move(a.x,a.y)}),this}function Ime(n){return this.dmove(n,0)}function kme(n){return this.dmove(0,n)}function Dme(n,t=this.bbox()){return n==null?t.height:this.size(t.width,n,t)}function Mme(n=0,t=0,r=this.bbox()){let e=n-r.x,i=t-r.y;return this.dmove(e,i)}function Ame(n,t,r=this.bbox()){let e=ql(this,n,t,r),i=e.width/r.width,o=e.height/r.height;return this.children().forEach(a=>{let s=new io(r).transform(new Sn(a).inverse());a.scale(i,o,s.x,s.y)}),this}function Ome(n,t=this.bbox()){return n==null?t.width:this.size(n,t.height,t)}function Pme(n,t=this.bbox()){return n==null?t.x:this.move(n,t.y,t)}function Rme(n,t=this.bbox()){return n==null?t.y:this.move(t.x,n,t)}var Mc=class extends _o{constructor(t,r=t){super(xn("g",t),r)}};tn(Mc,y1);ki({Container:{group:Pn(function(){return this.put(new Mc)})}});Fi(Mc,"G");y();var ph=class extends _o{constructor(t,r=t){super(xn("a",t),r)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,fd)}};tn(ph,y1);ki({Container:{link:Pn(function(n){return this.put(new ph).to(n)})},Element:{unlink(){let n=this.linker();if(!n)return this;let t=n.parent();if(!t)return this.remove();let r=t.index(n);return t.add(this,r),n.remove(),this},linkTo(n){let t=this.linker();return t||(t=new ph,this.wrap(t)),typeof n=="function"?n.call(t,t):t.to(n),this},linker(){let n=this.parent();return n&&n.node.nodeName.toLowerCase()==="a"?n:null}}});Fi(ph,"A");y();var Lg=class extends _o{constructor(t,r=t){super(xn("mask",t),r)}remove(){return this.targets().forEach(function(t){t.unmask()}),super.remove()}targets(){return Ml("svg [mask*="+this.id()+"]")}};ki({Container:{mask:Pn(function(){return this.defs().put(new Lg)})},Element:{masker(){return this.reference("mask")},maskWith(n){let t=n instanceof Lg?n:this.parent().mask().add(n);return this.attr("mask","url(#"+t.id()+")")},unmask(){return this.attr("mask",null)}}});Fi(Lg,"Mask");y();var wv=class extends xo{constructor(t,r=t){super(xn("stop",t),r)}update(t){return(typeof t=="number"||t instanceof kn)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),t.opacity!=null&&this.attr("stop-opacity",t.opacity),t.color!=null&&this.attr("stop-color",t.color),t.offset!=null&&this.attr("offset",new kn(t.offset)),this}};ki({Gradient:{stop:function(n,t,r){return this.put(new wv).update(n,t,r)}}});Fi(wv,"Stop");y();function Fme(n,t){if(!n)return"";if(!t)return n;let r=n+"{";for(let e in t)r+=TR(e)+":"+t[e]+";";return r+="}",r}var Bg=class extends xo{constructor(t,r=t){super(xn("style",t),r)}addText(t=""){return this.node.textContent+=t,this}font(t,r,e={}){return this.rule("@font-face",re({fontFamily:t,src:r},e))}rule(t,r){return this.addText(Fme(t,r))}};ki("Dom",{style(n,t){return this.put(new Bg).rule(n,t)},fontface(n,t,r){return this.put(new Bg).font(n,t,r)}});Fi(Bg,"Style");y();var jg=class extends Ta{constructor(t,r=t){super(xn("textPath",t),r)}array(){let t=this.track();return t?t.array():null}plot(t){let r=this.track(),e=null;return r&&(e=r.plot(t)),t==null?e:this}track(){return this.reference("href")}};ki({Container:{textPath:Pn(function(n,t){return n instanceof Ta||(n=this.text(n)),n.path(t)})},Text:{path:Pn(function(n,t=!0){let r=new jg;n instanceof Dc||(n=this.defs().path(n)),r.attr("href","#"+n,fd);let e;if(t)for(;e=this.node.firstChild;)r.node.appendChild(e);return this.put(r)}),textPath(){return this.findOne("textPath")}},Path:{text:Pn(function(n){return n instanceof Ta||(n=new Ta().addTo(this.parent()).text(n)),n.path(this)}),targets(){return Ml("svg textPath").filter(n=>(n.attr("href")||"").includes(this.id()))}}});jg.prototype.MorphArray=Ks;Fi(jg,"TextPath");y();var xv=class extends oo{constructor(t,r=t){super(xn("use",t),r)}use(t,r){return this.attr("href",(r||"")+"#"+t,fd)}};ki({Container:{use:Pn(function(n,t){return this.put(new xv).use(n,t)})}});Fi(xv,"Use");var Um=Xo;tn([_p,dh,Lm,bd,Bm],Ys("viewbox"));tn([up,gp,fp,Dc],Ys("marker"));tn(Ta,Ys("Text"));tn(Dc,Ys("Path"));tn(Nm,Ys("Defs"));tn([Ta,$m],Ys("Tspan"));
107tn([zm,Vm,mp,_d],Ys("radius"));tn(Yl,Ys("EventTarget"));tn(Ql,Ys("Dom"));tn(xo,Ys("Element"));tn(oo,Ys("Shape"));tn([_o,TI],Ys("Container"));tn(mp,Ys("Gradient"));tn(_d,Ys("Runner"));pp.extend(GU());cF([kn,ns,bo,Sn,Qs,rs,Ks,io]);dF();var Wn=function(n){return n.markerShape1="markerShape1",n.markerShape2="markerShape2",n.markerShape3="markerShape3",n.markerShape4="markerShape4",n.markerShape5="markerShape5",n.markerShape6="markerShape6",n.markerShape7="markerShape7",n.markerShape8="markerShape8",n.markerShape9="markerShape9",n.markerShape10="markerShape10",n.tripMarkerShape1="tripMarkerShape1",n.tripMarkerShape2="tripMarkerShape2",n.tripMarkerShape3="tripMarkerShape3",n.tripMarkerShape4="tripMarkerShape4",n.tripMarkerShape5="tripMarkerShape5",n.tripMarkerShape6="tripMarkerShape6",n.tripMarkerShape7="tripMarkerShape7",n.tripMarkerShape8="tripMarkerShape8",n.tripMarkerShape9="tripMarkerShape9",n.tripMarkerShape10="tripMarkerShape10",n}(Wn||{}),Tr=function(n){return n.iconContainer1="iconContainer1",n.iconContainer2="iconContainer2",n.iconContainer3="iconContainer3",n.iconContainer4="iconContainer4",n.iconContainer5="iconContainer5",n.iconContainer6="iconContainer6",n.iconContainer7="iconContainer7",n.tripIconContainer1="tripIconContainer1",n.tripIconContainer2="tripIconContainer2",n.tripIconContainer3="tripIconContainer3",n}(Tr||{}),Vme=new Map([[Wn.markerShape1,"/assets/markers/shape1.svg"],[Wn.markerShape2,"/assets/markers/shape2.svg"],[Wn.markerShape3,"/assets/markers/shape3.svg"],[Wn.markerShape4,"/assets/markers/shape4.svg"],[Wn.markerShape5,"/assets/markers/shape5.svg"],[Wn.markerShape6,"/assets/markers/shape6.svg"],[Wn.markerShape7,"/assets/markers/shape7.svg"],[Wn.markerShape8,"/assets/markers/shape8.svg"],[Wn.markerShape9,"/assets/markers/shape9.svg"],[Wn.markerShape10,"/assets/markers/shape10.svg"],[Wn.tripMarkerShape1,"/assets/markers/tripShape1.svg"],[Wn.tripMarkerShape2,"/assets/markers/tripShape2.svg"],[Wn.tripMarkerShape3,"/assets/markers/tripShape3.svg"],[Wn.tripMarkerShape4,"/assets/markers/tripShape4.svg"],[Wn.tripMarkerShape5,"/assets/markers/tripShape5.svg"],[Wn.tripMarkerShape6,"/assets/markers/tripShape6.svg"],[Wn.tripMarkerShape7,"/assets/markers/tripShape7.svg"],[Wn.tripMarkerShape8,"/assets/markers/tripShape8.svg"],[Wn.tripMarkerShape9,"/assets/markers/tripShape9.svg"],[Wn.tripMarkerShape10,"/assets/markers/tripShape10.svg"]]),Lme=new Map([[Tr.iconContainer1,"/assets/markers/iconContainer1.svg"],[Tr.iconContainer2,"/assets/markers/iconContainer2.svg"],[Tr.iconContainer3,"/assets/markers/iconContainer3.svg"],[Tr.iconContainer4,"/assets/markers/iconContainer4.svg"],[Tr.iconContainer5,"/assets/markers/iconContainer5.svg"],[Tr.iconContainer6,"/assets/markers/iconContainer6.svg"],[Tr.iconContainer7,"/assets/markers/iconContainer7.svg"],[Tr.tripIconContainer1,"/assets/markers/tripIconContainer1.svg"],[Tr.tripIconContainer2,"/assets/markers/tripIconContainer2.svg"],[Tr.tripIconContainer3,"/assets/markers/tripIconContainer3.svg"]]),Bme={iconSize:24,iconColor:n=>n,iconAlpha:n=>n.getAlpha()},mF={iconSize:12,iconColor:n=>n,iconAlpha:n=>n.getAlpha()},Gg={iconSize:24,iconColor:()=>Hd("#000"),iconAlpha:()=>1,appendIcon:(n,t,r)=>{let e=uF(t,r),i=e.cx,o=e.cy,a=n.getElementsByClassName("icon-mask-exclude");a.length&&(a=a[0].getElementsByClassName("marker-icon-container"),a.length&&new Mc(a[0]).add(t.clone().fill("#000").translate(-i,-o))),a=n.getElementsByClassName("icon-mask-overlay"),a.length&&(a=a[0].getElementsByClassName("marker-icon-container"),a.length&&new Mc(a[0]).add(t.clone().fill("#fff").translate(-i,-o)))}},jme=new Map([[Tr.iconContainer1,mF],[Tr.iconContainer2,mF],[Tr.iconContainer3,mF],[Tr.iconContainer4,Gg],[Tr.iconContainer5,Gg],[Tr.iconContainer6,Lt(re({},Gg),{iconSize:28})],[Tr.iconContainer7,Lt(re({},Gg),{iconSize:28})],[Tr.tripIconContainer1,Gg],[Tr.tripIconContainer2,Lt(re({},Gg),{iconSize:16})],[Tr.tripIconContainer3,Lt(re({},Gg),{iconSize:16})]]),Ext=[Wn.markerShape1,Wn.markerShape2,Wn.markerShape3,Wn.markerShape4,Wn.markerShape5,Wn.markerShape6,Wn.markerShape7,Wn.markerShape8,Wn.markerShape9,Wn.markerShape10],Ixt=[Wn.tripMarkerShape1,Wn.tripMarkerShape2,Wn.tripMarkerShape3,Wn.tripMarkerShape4,Wn.tripMarkerShape5,Wn.tripMarkerShape6,Wn.tripMarkerShape7,Wn.tripMarkerShape8,Wn.tripMarkerShape9,Wn.tripMarkerShape10],kxt=[Tr.iconContainer1,Tr.iconContainer2,Tr.iconContainer3,Tr.iconContainer4,Tr.iconContainer5,Tr.iconContainer6,Tr.iconContainer7],Dxt=[Tr.tripIconContainer1,Tr.tripIconContainer2,Tr.tripIconContainer3,Tr.iconContainer4,Tr.iconContainer5],Gme=()=>{let n=Zr(),t=n.charAt(0);return t>="0"&&t<="9"?"a"+n:n},zme=n=>{let t=n.outerHTML,r=/\sid="([^"]*)"[\s>]/g,e="_"+Gme(),i=[],o=r.exec(t);for(;o!==null;)i.push(o[1]),o=r.exec(t);for(let a of i){let s=a+e;t=t.replace(new RegExp('id="'+a+'"',"g"),'id="'+s+'"'),t=t.replace(new RegExp("url\\(#"+a+"\\)","g"),"url(#"+s+")")}return Um(t).node},sH=(n,t,r,e)=>{let i=t.bypassSecurityTrustResourceUrl(r);return n.getSvgIconFromUrl(i).pipe(W(o=>{let a=Array.from(o.getElementsByClassName("marker-color"));o.classList.contains("marker-color")&&a.push(o),a.forEach(c=>{c.setAttribute("fill","#"+e.toHex()),c.setAttribute("fill-opacity",`${e.getAlpha()}`)});let s=Array.from(o.getElementsByClassName("marker-opacity"));return o.classList.contains("marker-opacity")&&s.push(o),s.forEac
107h(c=>{c.setAttribute("opacity",`${e.getAlpha()}`)}),zme(o)}))},$me=(n,t,r,e)=>{let i=Vme.get(r);return sH(n,t,i,e).pipe(W(o=>{let a=o.outerHTML;return"data:image/svg+xml;base64,"+btoa(a)}))},Ume=(n,t,r,e,i)=>{if(Pb(t)){let[a,s]=am(t);return n.getNamedSvgIcon(s,a).pipe($n(1),W(c=>{let u=new xo(c.firstChild);u.fill("#"+e.toHex()),u.attr("fill-opacity",i);let f=r/24;return u.scale(f),u}),vt(()=>Z(null)))}else{let a=am(t)[1],s=new Ta(document.createElementNS("http://www.w3.org/2000/svg","text"));return n.getDefaultFontSetClass().filter(f=>f.length>0).forEach(f=>s.addClass(f)),s.font({size:`${r}px`}),s.attr({style:`font-size: ${r}px`,"text-anchor":"start"}),s.fill("#"+e.toHex()),s.attr("fill-opacity",i),s.tspan(a).attr({"dominant-baseline":"hanging"}),Z(s)}},Mxt=(n,t,r,e,i)=>(r?sH(n,t,Lme.get(r),i):Z(null)).pipe(ii(a=>{let s=r?jme.get(r):Bme,c=s.iconSize,u=s.iconColor(i),f=s.iconAlpha(i);return Ume(n,e,c,u,f).pipe(W(_=>{if(a){if(_)if(s.appendIcon)s.appendIcon(a,_,c);else{let I=a.getElementsByClassName("marker-icon-container");if(I.length){new Mc(I[0]).add(_);let F=uF(_,c);_.translate(-F.cx,-F.cy)}}return a}else{let I=Um();I.viewbox(0,0,c,c);let S=new Mc;S.translate(c/2,c/2),S.add(_);let F=uF(_,c);return _.translate(-F.cx,-F.cy),I.add(S),I.node}}))})),EI,Axt=(n,t)=>EI||(EI=$me(n,t,Wn.markerShape1,Hd("rgba(255,255,255,0.75)")).pipe(Cs({refCount:!0,bufferSize:1})),EI),uF=(n,t)=>{let r=n.bbox();return n.type==="text"?{cx:t/2+r.x,cy:t/2+r.y}:{cx:r.cx,cy:r.cy}};var pH=Ld(YB());var Os=function(n){return n.geoMap="geoMap",n.image="image",n}(Os||{}),DI=(n,t=Zr())=>({type:n.dsType,name:n.dsLabel,deviceId:n.dsDeviceId,entityAliasId:n.dsEntityAliasId,filterId:n.dsFilterId,dataKeys:[],latestDataKeys:[],mapDataIds:[t]}),II=function(n){return n.pattern="pattern",n.function="function",n}(II||{}),Iv=function(n){return n.click="click",n.hover="hover",n}(Iv||{}),$xt=Object.keys(Iv),Uxt=new Map([[Iv.click,"widgets.maps.data-layer.tooltip-trigger-click"],[Iv.hover,"widgets.maps.data-layer.tooltip-trigger-hover"]]),Sv=function(n){return n.add="add",n.edit="edit",n.move="move",n.remove="remove",n}(Sv||{}),Hxt=Object.keys(Sv),qxt=new Map([[Sv.add,"widgets.maps.data-layer.action-add"],[Sv.edit,"widgets.maps.data-layer.action-edit"],[Sv.move,"widgets.maps.data-layer.action-move"],[Sv.remove,"widgets.maps.data-layer.action-remove"]]),hF=n=>({label:{show:!0,type:II.pattern,pattern:"${entityName}"},tooltip:{show:!0,trigger:Iv.click,autoclose:!0,type:II.pattern,pattern:n===Os.geoMap?"<b>${entityName}</b><br/><br/><b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>Temperature:</b> ${temperature} \xB0C<br/><small>See tooltip settings for details</small>":"<b>${entityName}</b><br/><br/><b>X Pos:</b> ${xPos:2}<br/><b>Y Pos:</b> ${yPos:2}<br/><b>Temperature:</b> ${temperature} \xB0C<br/><small>See tooltip settings for details</small>",offsetX:0,offsetY:-1},click:{type:Eu.doNothing},edit:{enabledActions:[],attributeScope:im.SERVER_SCOPE,snappable:!1}}),Wxt=["trips","markers","polygons","circles"],Hme=(n,t)=>{if(!n.dsType||![qi.function,qi.device,qi.entity].includes(n.dsType))return!1;switch(n.dsType){case qi.function:break;case qi.device:if(!n.dsDeviceId)return!1;break;case qi.entity:if(!n.dsEntityAliasId)return!1;break}switch(t){case"markers":let r=n;if(!r.xKey?.type||!r.xKey?.name||!r.yKey?.type||!r.xKey?.name)return!1;break;case"polygons":let e=n;if(!e.polygonKey?.type||!e.polygonKey?.name)return!1;break;case"circles":let i=n;if(!i.circleKey?.type||!i.circleKey?.name)return!1;break}return!0},Yxt=n=>t=>{let r=t.value;return Hme(r,n)?null:{layer:!0}},mH=function(n){return n.shape="shape",n.icon="icon",n.image="image",n}(mH||{}),Xl=function(n){return n.constant="constant",n.range="range",n.function="function",n}(Xl||{}),uH=function(n){return n.image="image",n.function="function",n}(uH||{}),qme=`var value = prevValue || 15.833293;
108if (time % 500 < 500) {
109    value += Math.random() * 0.05 - 0.025;
110}
111return value;`,Wme=`var value = prevValue || -90.454350;
112if (time % 500 < 500) {
113    value += Math.random() * 0.05 - 0.025;
114}
115return value;`,Yme=`var value = prevValue || 0.2;
116if (time % 500 < 500) {
117    value += Math.random() * 0.05 - 0.025;
118}
119return value;`,Qme=`var value = prevValue || 0.3;
120if (time % 500 < 500) {
121    value += Math.random() * 0.05 - 0.025;
122}
123return value;`,hH=(n,t=!1,r=!1)=>({dsType:r?qi.function:qi.entity,dsLabel:r?"First point":"",xKey:{name:r?"f(x)":Os.geoMap===n?"latitude":"xPos",label:Os.geoMap===n?"latitude":"xPos",type:r?Zi.function:t?Zi.timeseries:Zi.attribute,funcBody:r?Os.geoMap===n?qme:Yme:void 0,settings:{},color:mC[0].value},yKey:{name:r?"f(x)":Os.geoMap===n?"longitude":"yPos",label:Os.geoMap===n?"longitude":"yPos",type:r?Zi.function:t?Zi.timeseries:Zi.attribute,funcBody:r?Os.geoMap===n?Wme:Qme:void 0,settings:{},color:mC[0].value}}),Kme=(n,t=!1)=>go(hH(n,!1,t),fF(n)),fF=n=>
123go({markerType:mH.shape,markerShape:{shape:Wn.markerShape1,size:34,color:{type:Xl.constant,color:"#307FE5"}},markerIcon:{iconContainer:Tr.iconContainer1,icon:"mdi:lightbulb-on",size:48,color:{type:Xl.constant,color:"#307FE5"}},markerImage:{type:uH.image,image:"/assets/markers/shape1.svg",imageSize:34},markerOffsetX:.5,markerOffsetY:1,positionFunction:"return {x: origXPos, y: origYPos};",markerClustering:{enable:!1,zoomOnClick:!0,maxZoom:null,maxClusterRadius:80,zoomAnimation:!0,showCoverageOnHover:!0,spiderfyOnMaxZoom:!1,chunkedLoad:!1,lazyLoad:!0,useClusterMarkerColorFunction:!1,clusterMarkerColorFunction:null}},hF(n)),C1=function(n){return n.arrowHead="arrowHead",n.dash="dash",n}(C1||{}),Qxt=Object.keys(C1),Kxt=new Map([[C1.arrowHead,"widgets.maps.data-layer.path.decorator-symbol-arrow-head"],[C1.dash,"widgets.maps.data-layer.path.decorator-symbol-dash"]]),Xme=(n,t=!1)=>go(hH(n,!0,t),fH(n)),fH=n=>go(fF(n),{showMarker:!0,tooltip:{offsetY:-.5,pattern:n===Os.geoMap?"<b>${entityName}</b><br/><br/><b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>End Time:</b> ${maxTime}<br/><b>Start Time:</b> ${minTime}":"<b>${entityName}</b><br/><br/><b>X Pos:</b> ${xPos:2}<br/><b>Y Pos:</b> ${yPos:2}<br/><b>End Time:</b> ${maxTime}<br/><b>Start Time:</b> ${minTime}"},rotateMarker:!0,offsetAngle:0,markerShape:{shape:Wn.tripMarkerShape2},markerIcon:{iconContainer:Tr.tripIconContainer1,icon:"arrow_forward"},markerImage:{image:"/assets/markers/tripShape2.svg"},markerOffsetX:.5,markerOffsetY:.5,showPath:!0,pathStrokeWeight:4,pathStrokeColor:{type:Xl.constant,color:"#307FE5"},usePathDecorator:!1,pathDecoratorSymbol:C1.arrowHead,pathDecoratorSymbolSize:10,pathDecoratorSymbolColor:"#307FE5",pathDecoratorOffset:20,pathEndDecoratorOffset:20,pathDecoratorRepeat:20,showPoints:!1,pointSize:10,pointColor:{type:Xl.constant,color:"#307FE5"},pointTooltip:{show:!0,trigger:Iv.click,autoclose:!0,type:II.pattern,pattern:n===Os.geoMap?"<b>${entityName}</b><br/><br/><b>Latitude:</b> ${latitude:7}<br/><b>Longitude:</b> ${longitude:7}<br/><b>End Time:</b> ${maxTime}<br/><b>Start Time:</b> ${minTime}":"<b>${entityName}</b><br/><br/><b>X Pos:</b> ${xPos:2}<br/><b>Y Pos:</b> ${yPos:2}<br/><b>End Time:</b> ${maxTime}<br/><b>Start Time:</b> ${minTime}",offsetX:0,offsetY:-1}}),gF=function(n){return n.color="color",n.image="image",n.stripe="stripe",n}(gF||{}),bF=function(n){return n.image="image",n.function="function",n}(bF||{}),Zme=(n,t=!1)=>go({dsType:t?qi.function:qi.entity,dsLabel:t?"First polygon":"",polygonKey:{name:t?"f(x)":"perimeter",label:"perimeter",type:t?Zi.function:Zi.attribute,settings:{},color:mC[0].value}},gH(n)),gH=n=>go({fillType:gF.color,fillColor:{type:Xl.constant,color:"rgba(51,136,255,0.2)"},fillImage:{type:bF.image,image:"/assets/widget-preview-empty.svg",preserveAspectRatio:!0,opacity:1,angle:0,scale:1},fillStripe:{weight:3,color:{type:Xl.constant,color:"#8f8f8f"},spaceWeight:9,spaceColor:{type:Xl.constant,color:"rgba(143,143,143,0)"},angle:45},strokeColor:{type:Xl.constant,color:"#3388ff"},strokeWeight:3},hF(n),{label:{show:!1},tooltip:{show:!1,pattern:"<b>${entityName}</b><br/><br/><b>TimeStamp:</b> ${ts:7}"}}),Jme=(n,t=!1)=>go({dsType:t?qi.function:qi.entity,dsLabel:t?"First circle":"",circleKey:{name:t?"f(x)":"perimeter",label:"perimeter",type:t?Zi.function:Zi.attribute,settings:{},color:mC[0].value}},bH(n)),bH=n=>go({fillType:gF.color,fillColor:{type:Xl.constant,color:"rgba(51,136,255,0.2)"},fillImage:{type:bF.image,image:"/assets/widget-preview-empty.svg",preserveAspectRatio:!0,opacity:1,angle:0,scale:1},fillStripe:{weight:3,color:{type:Xl.constant,color:"#8f8f8f"},spaceWeight:9,spaceColor:{type:Xl.constant,color:"rgba(143,143,143,0)"},angle:45},strokeColor:{type:Xl.constant,color:"#3388ff"},strokeWeight:3},hF(n),{label:{show:!1},tooltip:{show:!1,pattern:"<b>${entityName}</b><br/><br/><b>TimeStamp:</b> ${ts:7}"}}),Xxt=(n,t,r=!1)=>{switch(t){case"trips":return Xme(n,r);case"markers":return Kme(n,r);case"polygons":return Zme(n,r);case"circles":return Jme(n,r)}},Zxt=(n,t)=>{switch(t){case"trips":return fH(n);case"markers":return fF(n);case"polygons":return gH(n);case"circles":return bH(n)}},Jxt=n=>n.map(t=>{let r=DI(t);return r.dataKeys=t.dataKeys,r}),eue=n=>!n.dsType||![qi.device,qi.entity].includes(n.dsType)||n.dsType===qi.device&&!n.dsDeviceId?!1:!(n.dsType===qi.entity&&!n.dsEntityAliasId),eSt=n=>{let t=n.value;return eue(t)?null:{dataSource:!0}},tSt={dsType:qi.entity,dsLabel:""},tue=n=>!n.dsType||![qi.function,qi.device,qi.entity].includes(n.dsType)?!1:!!n.dataKeys?.length,iSt=n=>{let t=n.value;return tue(t)?null:{dataSource:!0}},nSt=(n=!1)=>({dsType:n?qi.function:qi.entity,dsLabel:n?"Additional data":"",dataKeys:[]}),zg=function(n){return n.topleft="topleft",n.topright="topright",n.bottomleft="bottomleft",n.bottomright="bottomright",n}(zg||{}),rSt=Object.keys(zg),oSt=new Map([[zg.topleft,"widgets.maps.control.position-topleft"],[zg.topright,"widgets.maps.control.position-topright"],[zg.bottomleft,"widgets.maps.control.position-bottomleft"],[zg.bottomright,"widgets.maps.control.position-bottomright"]]),mh=function(n){return n.scroll="scroll",n.doubleClick="doubleClick",n.controlButtons="controlButtons",n}(mh||{}),aSt=Object.keys(mh),sSt=new Map([[mh.scroll,"widgets.maps.control.zoom-scroll"],[mh.doubleClick,"widgets.maps.control.zoom-double-click"],[mh.controlButtons,"widgets.maps.control.zoom-control-buttons"]]),kI=function(n){return n.metric="metric",n.imperial="imperial",n}(kI||{}),lSt=Object.keys(kI),cSt=new Map([[kI.metric,"widgets.maps.control.scale-metric"],[kI.imperial,"widgets.maps.control.scale-imperial"]]),iue=16384,dSt=8,_H={mapType:Os.geoMap,trips:[],markers:[],polygons:[],circles:[],additionalDataSources:[],controlsPosition:zg.topleft,zoomActions:[mh.scroll,mh.doubleClick,mh.controlButtons],scales:[],dragModeButton:!1,fitMapBounds:!0,useDefaultCenterPosition:!1,defaultCenterPosition:"0,0",defaultZoomLevel:null,minZoomLevel:16,mapPageSize:iue,mapActionButtons:[],tripTimeline:{showTimelineControl:!1,timeStep:1e3,speedOptions:[1,5,10,15,25],showTimestamp:!0,timestampFormat:R5("yyyy-MM-dd HH:mm:ss"),snapToRealLocation:!1,locationSnapFilter:"return true;"}},pSt={label:"",icon:"add",color:"#0000008a",action:{type:Eu.doNothing}},no=function(n){return n.openstreet="openstreet",n.google="google",n.here="here",n.tencent="tencent",n.custom="custom",n}(no||{}
123),mSt=Object.keys(no),uSt=new Map([[no.openstreet,"widgets.maps.layer.provider.openstreet.title"],[no.google,"widgets.maps.layer.provider.google.title"],[no.here,"widgets.maps.layer.provider.here.title"],[no.tencent,"widgets.maps.layer.provider.tencent.title"],[no.custom,"widgets.maps.layer.provider.custom.title"]]),Tv=function(n){return n.openstreetmap_hybrid="openstreetmap_hybrid",n.world_edition_hybrid="world_edition_hybrid",n.enhanced_contrast_hybrid="enhanced_contrast_hybrid",n}(Tv||{}),hSt=Object.keys(Tv),fSt=new Map([[Tv.openstreetmap_hybrid,"widgets.maps.layer.reference.openstreetmap-hybrid"],[Tv.world_edition_hybrid,"widgets.maps.layer.reference.world-edition-hybrid"],[Tv.enhanced_contrast_hybrid,"widgets.maps.layer.reference.enhanced-contrast-hybrid"]]),nue=n=>{if(!n.provider)return!1;switch(n.provider){case no.openstreet:return!!n.layerType;case no.google:return!!n.layerType;case no.here:return!!n.layerType;case no.tencent:return!!n.layerType;case no.custom:return!!n.tileUrl}},gSt=n=>{let t=n.value;return nue(t)?null:{layer:!0}},bSt=n=>{if(!n.provider)return null;switch(n.provider){case no.openstreet:let t=n;return rue.get(t.layerType);case no.google:let r=n;return aue.get(r.layerType);case no.here:let e=n;return lue.get(e.layerType);case no.tencent:let i=n;return due.get(i.layerType);case no.custom:return"widgets.maps.layer.provider.custom.title"}},Kl=function(n){return n.openStreetMapnik="OpenStreetMap.Mapnik",n.openStreetHot="OpenStreetMap.HOT",n.esriWorldStreetMap="Esri.WorldStreetMap",n.esriWorldTopoMap="Esri.WorldTopoMap",n.esriWorldImagery="Esri.WorldImagery",n.cartoDbPositron="CartoDB.Positron",n.cartoDbDarkMatter="CartoDB.DarkMatter",n}(Kl||{}),_St=Object.values(Kl),rue=new Map([[Kl.openStreetMapnik,"widgets.maps.layer.provider.openstreet.mapnik"],[Kl.openStreetHot,"widgets.maps.layer.provider.openstreet.hot"],[Kl.esriWorldStreetMap,"widgets.maps.layer.provider.openstreet.esri-street"],[Kl.esriWorldTopoMap,"widgets.maps.layer.provider.openstreet.esri-topo"],[Kl.esriWorldImagery,"widgets.maps.layer.provider.openstreet.esri-imagery"],[Kl.cartoDbPositron,"widgets.maps.layer.provider.openstreet.cartodb-positron"],[Kl.cartoDbDarkMatter,"widgets.maps.layer.provider.openstreet.cartodb-dark-matter"]]),oue={provider:no.openstreet,layerType:Kl.openStreetMapnik},$g=function(n){return n.roadmap="roadmap",n.satellite="satellite",n.hybrid="hybrid",n.terrain="terrain",n}($g||{}),vSt=Object.values($g),aue=new Map([[$g.roadmap,"widgets.maps.layer.provider.google.roadmap"],[$g.satellite,"widgets.maps.layer.provider.google.satellite"],[$g.hybrid,"widgets.maps.layer.provider.google.hybrid"],[$g.terrain,"widgets.maps.layer.provider.google.terrain"]]),sue={provider:no.google,layerType:$g.roadmap,apiKey:"AIzaSyDoEx2kaGz3PxwbI9T7ccTSg5xjdw8Nw8Q"},Ug=function(n){return n.hereNormalDay="HEREv3.normalDay",n.hereNormalNight="HEREv3.normalNight",n.hereHybridDay="HEREv3.hybridDay",n.hereTerrainDay="HEREv3.terrainDay",n}(Ug||{}),ySt=Object.values(Ug),lue=new Map([[Ug.hereNormalDay,"widgets.maps.layer.provider.here.normal-day"],[Ug.hereNormalNight,"widgets.maps.layer.provider.here.normal-night"],[Ug.hereHybridDay,"widgets.maps.layer.provider.here.hybrid-day"],[Ug.hereTerrainDay,"widgets.maps.layer.provider.here.terrain-day"]]),cue={provider:no.here,layerType:Ug.hereNormalDay,apiKey:"kVXykxAfZ6LS4EbCTO02soFVfjA7HoBzNVVH9u7nzoE"},Ev=function(n){return n.tencentNormal="Tencent.Normal",n.tencentSatellite="Tencent.Satellite",n.tencentTerrain="Tencent.Terrain",n}(Ev||{}),CSt=Object.values(Ev),due=new Map([[Ev.tencentNormal,"widgets.maps.layer.provider.tencent.normal"],[Ev.tencentSatellite,"widgets.maps.layer.provider.tencent.satellite"],[Ev.tencentTerrain,"widgets.maps.layer.provider.tencent.terrain"]]),pue={provider:no.tencent,layerType:Ev.tencentNormal},mue={provider:no.custom,tileUrl:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},wSt=n=>{switch(n){case no.openstreet:return oue;case no.google:return sue;case no.here:return cue;case no.tencent:return pue;case no.custom:return mue}},uue=[{label:"{i18n:widgets.maps.layer.roadmap}",provider:no.openstreet,layerType:Kl.openStreetMapnik},{label:"{i18n:widgets.maps.layer.satellite}",provider:no.openstreet,layerType:Kl.esriWorldImagery},{label:"{i18n:widgets.maps.layer.hybrid}",provider:no.openstreet,layerType:Kl.esriWorldImagery,referenceLayer:Tv.openstreetmap_hybrid}
123],hue=re({mapType:Os.geoMap,layers:go([],uue)},go({},_H)),_F=function(n){return n.image="image",n.entityKey="entityKey",n}(_F||{}),fue=n=>n?.sourceType?n.sourceType===_F.image?fn(n.url):fn(n.entityAliasId)&&!!n.entityKey:!1,xSt=n=>{let t=n.value;return fue(t)?null:{imageMapSource:!0}},gue={sourceType:_F.image,url:"data:image/svg+xml;base64,PHN2ZyBpZD0ic3ZnMiIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTAwIiB3aWR0aD0iMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgogPGcgaWQ9ImxheWVyMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtOTUyLjM2KSI+CiAgPHJlY3QgaWQ9InJlY3Q0Njg0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBoZWlnaHQ9Ijk5LjAxIiB3aWR0aD0iOTkuMDEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiB5PSI5NTIuODYiIHg9Ii40OTUwNSIgc3Ryb2tlLXdpZHRoPSIuOTkwMTAiIGZpbGw9IiNlZWUiLz4KICA8dGV4dCBpZD0idGV4dDQ2ODYiIHN0eWxlPSJ3b3JkLXNwYWNpbmc6MHB4O2xldHRlci1zcGFjaW5nOjBweDt0ZXh0LWFuY2hvcjptaWRkbGU7dGV4dC1hbGlnbjpjZW50ZXIiIGZvbnQtd2VpZ2h0PSJib2xkIiB4bWw6c3BhY2U9InByZXNlcnZlIiBmb250LXNpemU9IjEwcHgiIGxpbmUtaGVpZ2h0PSIxMjUlIiB5PSI5NzAuNzI4MDkiIHg9IjQ5LjM5NjQ3NyIgZm9udC1mYW1pbHk9IlJvYm90byIgZmlsbD0iIzY2NjY2NiI+PHRzcGFuIGlkPSJ0c3BhbjQ2OTAiIHg9IjUwLjY0NjQ3NyIgeT0iOTcwLjcyODA5Ij5JbWFnZSBiYWNrZ3JvdW5kIDwvdHNwYW4+PHRzcGFuIGlkPSJ0c3BhbjQ2OTIiIHg9IjQ5LjM5NjQ3NyIgeT0iOTgzLjIyODA5Ij5pcyBub3QgY29uZmlndXJlZDwvdHNwYW4+PC90ZXh0PgogIDxyZWN0IGlkPSJyZWN0NDY5NCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgaGVpZ2h0PSIxOS4zNiIgd2lkdGg9IjY5LjM2IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgeT0iOTkyLjY4IiB4PSIxNS4zMiIgc3Ryb2tlLXdpZHRoPSIuNjM5ODYiIGZpbGw9Im5vbmUiLz4KIDwvZz4KPC9zdmc+Cg=="},SSt=n=>({type:qi.entity,name:"",entityAliasId:n.entityAliasId,dataKeys:[n.entityKey]}),TSt=re({mapType:Os.image,imageSource:go({},gue)},go({},_H)),ESt=hue,ISt=n=>{try{let t=JSON.parse(n);return!Array.isArray(t)}catch{return!1}},bue=n=>De(n)&&!pl(n)&&!isNaN(n)&&isFinite(n)&&Math.abs(n)<=90,_ue=n=>De(n)&&!pl(n)&&!isNaN(n)&&isFinite(n)&&Math.abs(n)<=180,kSt=(n,t)=>bue(n)&&_ue(t),DSt=n=>n.length>1&&Array.isArray(n[0])&&(Array.isArray(n[0][0])||mf(n[0][0].lat)&&mf(n[0][0].lng)),MSt=n=>{if(typeof n=="string"){let t=n.split(",");if(t.length===2)return[Number(t[0]),Number(t[1])]}return typeof n=="object"?n:[0,0]},ASt=(n,t,r=!1)=>{if(t===qi.function){if(n&&n.type!==Zi.function)return n.type=Zi.function,!0}else if(n?.type===Zi.function)return n.type=r?Zi.timeseries:Zi.attribute,!0;return!1},OSt=(n,t)=>{let r=[];for(let e of t){let i=!1;for(let o=0;o<n.length;o++){let a=n[o];if(vue(a,e)){n[o]=yue(a,e),i=!0;break}}i||r.push(e)}return n.push(...r),n},vue=(n,t)=>{if(n.type===t.type)switch(n.type){case qi.function:return n.name===t.name;case qi.device:case qi.entity:if(n.filterId===t.filterId)return n.type===qi.device?n.deviceId===t.deviceId:n.entityAliasId===t.entityAliasId}return!1},yue=(n,t)=>{n.mapDataIds=pH.default.union(n.mapDataIds,t.mapDataIds);let r=[];for(let e of t.dataKeys)n.dataKeys.find(o=>o.type===e.type&&o.name===e.name&&o.label===e.label)||r.push(e);return n.dataKeys.push(...r),n},lH={},Cue=n=>new Ma(t=>{let r=document.createElement("img");r.style.position="absolute",r.style.left="-99999px",r.style.top="-99999px",r.onload=()=>{t.next(r),document.body.removeChild(r),t.complete()},r.onerror=e=>{t.error(e),document.body.removeChild(r),t.complete()},document.body.appendChild(r),r.src=n}),vF=n=>Cue(n).pipe(W(t=>[t.width,t.height])),PSt=(n,t)=>{if(t?.length){let r=_4(t),e=lH[r];return e?Z(e):n.transform(t,{asString:!0,ignoreLoadingImage:!0}).pipe(ii(i=>{let o=i;return vF(o).pipe(W(a=>(e={url:o,width:a[0],height:a[1],aspect:a[0]/a[1]},lH[r]=e,e)))}))}else return Z(null)},cH=/<link-act name=['"]([^['"]*)['"]>([^<]*)<\/link-act>/g,dH=/<button-act name=['"]([^['"]*)['"]>([^<]*)<\/button-act>/g,wue=(n,t)=>`<a href="javascript:void(0);" class="tb-custom-action" data-action-name="${n}">${t}</a>`,xue=(n,t)=>`<button mat-button class="tb-custom-action" data-action-name="${n}">${t}</button>`,RSt=n=>{let t,r,e,i,o=cH.exec(n);for(;o!==null;)[t,e,r]=o,i=wue(e,r),n=n.replace(t,i),o=cH.exec(n);for(o=dH.exec(n);o!==null;)[t,e,r]=o,i=xue(e,r),n=n.replace(t,i),o=dH.exec(n);return n},FSt=(n,t)=>{let r=n/t;return r<0?r=0:r>1&&(r=1),r},NSt=(n,t,r,e=0)=>{let i=r.lng-e,o=t.lng+e,a=r.lat-e,s=t.lat+e;return n.lng>i?n.lng=i:n.lng<o&&(n.lng=o),n.lat>a?n.lat=a:n.lat<s&&(n.lat=s),n},VSt=(n,t,r)=>(r-n)/(t-n),LSt=(n,t,r,e,i)=>({[r]:n[r]+(t[r]-n[r])*i,[e]:n[e]+(t[e]-n[e])*i}),BSt=(n,t)=>{if(ga(n)||ga(t))return 0;let r=-Math.atan2(t.lat-n.lat,t.lng-n.lng);return r=r*180/Math.PI,parseInt(r.toFixed(2),10)},jSt=(n,t)=>{let r=Object.keys(n),e=r.findIndex(i=>Number(i)>=t);return e!==-1?Number(r[e])!==t&&e!==0&&e--:e=r.length-1,n[r[e]]};var yH={testWidget(n){if(n?.config?.settings){let t=n.config.settings;
123if(t.mapType&&[Os.image,Os.geoMap].includes(t.mapType)&&(t.trips&&Array.isArray(t.trips)||t.markers&&Array.isArray(t.markers)||t.polygons&&Array.isArray(t.polygons)||t.circles&&Array.isArray(t.circles)))return!0}return!1},prepareExportInfo(n,t){let r=t.config.settings,e={};return r.trips?.length&&(e.trips=w1(n,r.trips)),r.markers?.length&&(e.markers=w1(n,r.markers)),r.polygons?.length&&(e.polygons=w1(n,r.polygons)),r.circles?.length&&(e.circles=w1(n,r.circles)),r.additionalDataSources?.length&&(e.additionalDataSources=w1(n,r.additionalDataSources)),e},updateFromExportInfo(n,t,r,e){let i=n.config.settings;e?.trips&&kv(t,r,i.trips,e.trips),e?.markers&&kv(t,r,i.markers,e.markers),e?.polygons&&kv(t,r,i.polygons,e.polygons),e?.circles&&kv(t,r,i.circles,e.circles),e?.additionalDataSources&&kv(t,r,i.additionalDataSources,e.additionalDataSources)},datasources(n){let t=n.config.settings,r=[];return t.trips?.length&&r.push(...x1(t.trips)),t.markers?.length&&r.push(...x1(t.markers)),t.polygons?.length&&r.push(...x1(t.polygons)),t.circles?.length&&r.push(...x1(t.circles)),t.additionalDataSources?.length&&r.push(...x1(t.additionalDataSources)),r}},kv=(n,t,r,e)=>{for(let i of Object.keys(e)){let o=Number(i),a=e[o];r[o]&&(r[o].dsType===qi.entity&&r[o].dsType===qi.entity&&(a.alias&&(r[o].dsEntityAliasId=e1(n,a.alias)),a.filter&&(r[o].dsFilterId=sI(t,a.filter))),a.additionalDsInfo&&r[o].additionalDataSources?.length&&kv(n,t,r[o].additionalDataSources,a.additionalDsInfo))}},w1=(n,t)=>{let r={};return t.forEach((e,i)=>{Sue(n,r,e,i)}),r},Sue=(n,t,r,e)=>{let i={},o=vH(n,r);o&&(i.alias=o.alias,i.filter=o.filter),r.additionalDataSources?.length&&r.dsType!==qi.function&&r.additionalDataSources.forEach((a,s)=>{let c=vH(n,a);c&&(i.additionalDsInfo||(i.additionalDsInfo={}),i.additionalDsInfo[s]=c)}),(i.alias||i.filter||i.additionalDsInfo)&&(t[e]=i)},vH=(n,t)=>{let r={};if(t.dsType===qi.entity){let e=n.configuration.entityAliases[t.dsEntityAliasId];if(e&&(r.alias={alias:e.alias,filter:e.filter}),t.dsFilterId&&n.configuration.filters){let i=n.configuration.filters[t.dsFilterId];i&&(r.filter={filter:i.filter,keyFilters:i.keyFilters,editable:i.editable})}}return r.alias||r.filter?r:null},x1=n=>{let t=[];return n.forEach(r=>{t.push(DI(r)),r.additionalDataSources?.length&&r.additionalDataSources.forEach(e=>{t.push(DI(e))})}),t};var Tue=[yH],S1=n=>Tue.find(t=>t.testWidget(n));var Dv=(()=>{let t=class t{constructor(e,i,o,a){this.utils=e,this.timeService=i,this.translate=o,this.entityGroupService=a}validateAndUpdateDashboard(e){if(e.configuration||(e.configuration={}),Bi(e.configuration.widgets))e.configuration.widgets={};else if(Array.isArray(e.configuration.widgets)){let a={};e.configuration.widgets.forEach(s=>{s.id||(s.id=this.utils.guid()),a[s.id]=s}),e.configuration.widgets=a}for(let a of Object.keys(e.configuration.widgets)){let s=e.configuration.widgets[a];e.configuration.widgets[a]=this.validateAndUpdateWidget(s)}if(Bi(e.configuration.states)){e.configuration.states={default:this.createDefaultState(e.title,!0)};let a=e.configuration.states.default.layouts.main;for(let s of Object.keys(e.configuration.widgets)){let c=e.configuration.widgets[s];a.widgets[s]={sizeX:c.sizeX,sizeY:c.sizeY,row:c.row,col:c.col},dt(c.config.mobileHeight)&&(a.widgets[s].mobileHeight=c.config.mobileHeight),dt(c.config.mobileOrder)&&(a.widgets[s].mobileOrder=c.config.mobileOrder)}}else{let a=e.configuration.states,s=!1;for(let c of Object.keys(a)){let u=a[c];Bi(u.root)?u.root=!1:u.root&&(s=!0),this.validateAndUpdateState(u)}if(!s){let c=Object.keys(a)[0];a[c].root=!0}}let i={},o={};for(let a of Object.keys(e.configuration.widgets)){let s=e.configuration.widgets[a];if((s.type===mn.alarm?[s.config.alarmSource]:s.config.datasources).forEach(u=>{if(u.entityAliasId){let f=u.entityAliasId,_=i[f];_||(_=[],i[f]=_),_.push(u)}}),s.config.targetDevice?.type===Tu.entity&&s.config.targetDevice.entityAliasId){let u=s.config.targetDevice.entityAliasId,f=o[u];f||(f=[],o[u]=f),f.push(s.config.targetDevice)}}if(e.configuration=this.validateAndUpdateEntityAliases(e.configuration,i,o),e.configuration.filters||(e.configuration.filters={}),Bi(e.configuration.timewindow)&&(e.configuration.timewindow=this.timeService.defaultTimewindow()),Bi(e.configuration.settings)?(e.configuration.settings={},e.configuration.settings.stateControllerId="entity",e.configuration.settings.showTitle=!1,e.configuration.settings.showDashboardsSelect=!0,e.configuration.settings.showEntitiesSelect=!0,e.configuration.settings.showDashboardTimewindow=!0,e.configuration.settings.showDashboardExport=!0,e.configuration.settings.toolbarAlwaysOpen=!0):Bi(e.configuration.settings.stateControllerId)&&(e.configuration.settings.stateControllerId="entity"),dt(e.configuration.gridSettings)){let a=e.configuration.gridSettings;dt(a.showTitle)&&(e.configuration.settings.showTitle=a.showTitle,delete a.showTitle),dt(a.titleColor)&&(e.configuration.settings.titleColor=a.titleColor,delete a.titleColor),dt(a.showDevicesSelect)&&(e.configuration.settings.showEntitiesSelect=a.showDevicesSelect,delete a.showDevicesSelect),dt(a.showEntitiesSelect)&&(e.configuration.settings.showEntitiesSelect=a.showEntitiesSelect,delete a.showEntitiesSelect),dt(a.showDashboardTimewindow)&&(e.configuration.settings.showDashboardTimewindow=a.showDashboardTimewindow,delete a.showDashboardTimewindow),dt(a.showDashboardExport)&&(e.configuration.settings.showDashboardExport=
123a.showDashboardExport,delete a.showDashboardExport),e.configuration.states.default.layouts.main.gridSettings=a,delete e.configuration.gridSettings}return e}createSingleWidgetDashboard(e){e.id||(e.id=this.utils.guid());let i={};return i=this.validateAndUpdateDashboard(i),i.configuration.widgets[e.id]=e,i.configuration.states.default.layouts.main.widgets[e.id]={sizeX:e.sizeX,sizeY:e.sizeY,row:e.row,col:e.col},i}validateAndUpdateWidget(e){if(e.config=this.validateAndUpdateWidgetConfig(e.config,e.type),e=this.validateAndUpdateWidgetTypeFqn(e),dt(e.title)&&delete e.title,dt(e.image)&&delete e.image,dt(e.description)&&delete e.description,["system.charts.state_chart","system.charts.basic_timeseries","system.charts.timeseries_bars_flot"].includes(e.typeFullFqn)){let i=e.config,o=e.config.settings;De(i.showLegend)?(o.showLegend=i.showLegend,delete i.showLegend):Bi(o.showLegend)&&(o.showLegend=!0),De(i.legendConfig)?(o.legendConfig=i.legendConfig,delete i.legendConfig):Bi(o.legendConfig)&&(o.legendConfig=W5(e.type))}return e}validateAndUpdateWidgetTypeFqn(e){let i=e;return H5(e.typeFullFqn)||De(i.isSystemType)&&fn(i.bundleAlias)&&fn(i.typeAlias)&&(e.typeFullFqn=(i.isSystemType?"system":"tenant")+"."+i.bundleAlias+"."+i.typeAlias),dt(i.isSystemType)&&delete i.isSystemType,dt(i.bundleAlias)&&delete i.bundleAlias,dt(i.typeAlias)&&delete i.typeAlias,e.typeFullFqn==="system.charts.timeseries"&&(e.typeFullFqn="system.charts.basic_timeseries"),e}validateAndUpdateWidgetConfig(e,i){if(e||(e={}),e.datasources=this.validateAndUpdateDatasources(e.datasources),i===mn.latest){let o=yb(e.datasources);e.timewindow=MS(e.timewindow,!0,o,this.timeService)}else if(i===mn.rpc)e.targetDeviceAliasIds&&e.targetDeviceAliasIds.length?(e.targetDevice={type:Tu.entity,entityAliasId:e.targetDeviceAliasIds[0]},delete e.targetDeviceAliasIds):e.targetDevice||(e.targetDevice={type:Tu.device});else if(i===mn.alarm&&!e.alarmFilterConfig){e.alarmFilterConfig={};let o=e.alarmFilterConfig;dt(e.alarmStatusList)&&e.alarmStatusList.length?o.statusList=e.alarmStatusList:dt(e.alarmSearchStatus)&&e.alarmSearchStatus!==SS.ANY?o.statusList=[e.alarmSearchStatus]:o.statusList=[],dt(e.alarmStatusList)&&delete e.alarmStatusList,dt(e.alarmSearchStatus)&&delete e.alarmSearchStatus,dt(e.alarmSeverityList)?(o.severityList=e.alarmSeverityList,delete e.alarmSeverityList):o.severityList=[],dt(e.alarmTypeList)?(o.typeList=e.alarmTypeList,delete e.alarmTypeList):o.typeList=[],dt(e.searchPropagatedAlarms)?(o.searchPropagatedAlarms=e.searchPropagatedAlarms,delete e.searchPropagatedAlarms):o.searchPropagatedAlarms=!0}return e}prepareWidgetForScadaLayout(e,i){let o=e.config;o.showTitle=!1,o.dropShadow=!1,o.resizable=!0,o.preserveAspectRatio=i,o.padding="0",o.margin="0",o.backgroundColor="rgba(0,0,0,0)";let a=o.settings||{};a.padding="0";let s=a.background;return V5(s)?(s.type=N5.color,s.color="rgba(0,0,0,0)",s.overlay.enabled=!1):a.background=L5("rgba(0,0,0,0)"),o.settings=a,e}validateAndUpdateDatasources(e){return e||(e=[]),e.forEach(i=>{i.deviceAliasId&&(i.type=qi.entity,i.entityAliasId=i.deviceAliasId,delete i.deviceAliasId),i.deviceName&&(i.entityName=i.deviceName,delete i.deviceName),i.type===qi.entity&&i.entityId&&(i.name=i.entityName),i.dataKeys||(i.dataKeys=[]),i.dataKeys.forEach(o=>{Bi(o.label)&&(o.label=o.name)})}),e}getWidgetDatasources(e){let i=S1(e);return i?i.datasources(e):this.validateAndUpdateDatasources(e.config.datasources)}createDefaultLayoutData(){return{widgets:{},gridSettings:this.createDefaultGridSettings()}}createDefaultGridSettings(){return{layoutType:ih.default,backgroundColor:"#eeeeee",columns:24,margin:10,outerMargin:!0,backgroundSizeMode:"100%"}}createDefaultLayouts(){return{main:this.createDefaultLayoutData()}}createDefaultState(e,i){return{name:e,root:i,layouts:this.createDefaultLayouts()}}createSingleEntityFilter(e){return e.entityType===G.ENTITY_GROUP?this.entityGroupService.getEntityGroup(e.id).pipe(W(i=>({type:ht.entityGroupList,groupType:i.type,entityGroupList:[e.id],resolveMultiple:!1}))):Z({type:ht.singleEntity,singleEntity:e,resolveMultiple:!1})}widgetConfigFromWidgetType(e){let i=JSON.parse(e.defaultConfig);return i.datasources=this.convertDatasourcesFromWidgetType(e,i,i.datasources),De(i.alarmSource)&&(i.alarmSource=this.convertDatasourceFromWidgetType(e,i,i.alarmSource)),i}convertDatasourcesFromWidgetType(e,i,o){let a=[];return o?.length&&a.push(this.convertDatasourceFromWidgetType(e,i,o[0])),a}convertDatasourceFromWidgetType(e,i,o){let a=Di(o);if(a.type===qi.function){a.type=qi.entity,a.name="",e.hasBasicMode&&i.configMode===Hc.basic&&(a.type=qi.device);let s=a.dataKeys;
123a.dataKeys=[],e.type===mn.alarm&&s.forEach(c=>{let u=Di(c);u.funcBody=null,u.type=Zi.alarm,a.dataKeys.push(u)})}return a}validateAndUpdateState(e){e.layouts||(e.layouts=this.createDefaultLayouts());for(let i of Object.keys(e.layouts)){let o=e.layouts[i];this.validateAndUpdateLayout(o)}}validateAndUpdateLayout(e){e.gridSettings||(e.gridSettings=this.createDefaultGridSettings()),e.gridSettings.margins&&e.gridSettings.margins.length===2&&(e.gridSettings.margin=e.gridSettings.margins[0],delete e.gridSettings.margins),e.gridSettings.outerMargin=dt(e.gridSettings.outerMargin)?e.gridSettings.outerMargin:!0,e.gridSettings.margin=dt(e.gridSettings.margin)?e.gridSettings.margin:10,e.gridSettings.layoutType||(e.gridSettings.layoutType=ih.default)}setLayouts(e,i,o){let c=e.configuration.states[i],u=0,f=0;for(let S of Object.keys(c.layouts))o[S]||f++;for(let S of Object.keys(o))c.layouts[S]||u++;c.layouts=o;let _=Object.keys(c.layouts).length,I;if(u)for(let S of Object.keys(c.layouts))I=c.layouts[S].gridSettings.columns*(_-u)/_,I>0&&(c.layouts[S].gridSettings.columns=I);if(f)for(let S of Object.keys(c.layouts))I=c.layouts[S].gridSettings.columns*(_+f)/_,I>0&&(c.layouts[S].gridSettings.columns=I);this.removeUnusedWidgets(e)}isReferenceWidget(e,i){let o=e.configuration.states,a=0;for(let s of Object.values(o))for(let c of Object.values(s.layouts))if(c.widgets[i]&&a++,c.breakpoints)for(let u of Object.values(c.breakpoints))u.widgets[i]&&a++;return a>1}getRootStateId(e){for(let i of Object.keys(e))if(e[i].root)return i;return Object.keys(e)[0]}getStateLayoutsData(e,i){let s=e.configuration.states[i];if(s){let c={};for(let u of Object.keys(s.layouts)){let f=s.layouts[u];if(f&&(c[u]={default:this.getBreakpointLayoutData(f)},f.breakpoints))for(let _ of Object.keys(f.breakpoints))c[u][_]=this.getBreakpointLayoutData(f.breakpoints[_])}return c}else return null}getBreakpointLayoutData(e){let i={widgetIds:[],widgetLayouts:{},gridSettings:{}};for(let o of Object.keys(e.widgets))i.widgetIds.push(o);return i.widgetLayouts=e.widgets,i.gridSettings=e.gridSettings,i}getWidgetsArray(e){let i=[],a=e.configuration.widgets;for(let s of Object.keys(a)){let c=a[s];i.push(c)}return i}isEmptyDashboard(e){return e?.configuration?.widgets?Object.keys(e?.configuration?.widgets).length===0:!0}addWidgetToLayout(e,i,o,a,s,c,u,f,_="default"){let I=e.configuration,F=I.states[i],H=F.layouts[o];_!=="default"&&H.breakpoints?.[_]&&(H=H.breakpoints[_]);let q=Object.keys(F.layouts).length;a.id||(a.id=this.utils.guid()),I.widgets[a.id]||(I.widgets[a.id]=a);let ee={sizeX:c?c.sizeX:a.sizeX,sizeY:c?c.sizeY:a.sizeY,mobileOrder:a.config.mobileOrder,mobileHeight:a.config.mobileHeight,mobileHide:a.config.mobileHide,desktopHide:a.config.desktopHide,preserveAspectRatio:c?c.preserveAspectRatio:a.config.preserveAspectRatio,resizable:c?c.resizable:a.config.resizable};Bi(s)&&(s=24);let Ie=H.gridSettings,He=24;if(Ie&&Ie.columns&&(He=Ie.columns),He=He*q,He!==s){let Le=He/s;ee.sizeX*=Le,ee.sizeY*=Le}if(u>-1&&f>-1)ee.row=u,ee.col=f,this.hasWidgetCollision(ee.row,ee.col,ee.sizeX,ee.sizeY,Object.values(H.widgets))&&this.widgetPossiblePosition(ee,H);else{u=0;for(let Le of Object.keys(H.widgets)){let qe=H.widgets[Le],ue=qe.row?qe.row:0,Ne=qe.sizeY?qe.sizeY:1,st=ue+Ne;u=Math.max(u,st)}ee.row=u,ee.col=0}ee.sizeX=Math.floor(ee.sizeX),ee.sizeY=Math.floor(ee.sizeY),ee.row=Math.floor(ee.row),ee.col=Math.floor(ee.col),H.widgets[a.id]=ee}widgetPossiblePosition(e,i){let o=0,a=0,s=i.gridSettings.minColumns||i.gridSettings.columns||0,c=0,u=Object.values(i.widgets);for(u.forEach(S=>{s=Math.max(s,S.col+S.sizeX),c=Math.max(c,S.row+S.sizeY)});o<c;o++)for(a=0;a<s;a++)if(!this.hasWidgetCollision(o,a,e.sizeX,e.sizeY,u)){e.row=o,e.col=a;return}let f=BU>=c+o,_=LU>=s+a;!(o<=a&&f)&&_?(e.col=s,e.row=0):f&&(e.row=c,e.col=0)}hasWidgetCollision(e,i,o,a,s){let c=i,u=i+o,f=e,_=e+a;for(let I of s){let S=I.col,F=I.col+I.sizeX,H=I.row,q=I.row+I.sizeY;if(c<F&&u>S&&f<q&&_>H)return!0}return!1}removeWidgetFromLayout(e,i,o,a,s){let c=this.getDashboardLayoutConfig(e.configuration.states[i].layouts[o],s);delete c.widgets[a],this.removeUnusedWidgets(e)}isSingleLayoutDashboard(e){let o=e.configuration.states,a=Object.keys(o);if(a.length===1){let c=o[a[0]].layouts,u=Object.keys(c);if(u.length===1)return{state:a[0],layout:u[0]}}return null}
123updateLayoutSettings(e,i){let o=e.gridSettings,a=o?o.columns:24;a||(a=24);let c=(i.columns||24)/a;e.gridSettings=i;for(let f of Object.keys(e.widgets)){let _=e.widgets[f];_.sizeX||(_.sizeX=1),_.sizeY||(_.sizeY=1)}let u=[];for(let f of Object.keys(e.widgets)){let _=e.widgets[f];_.row=Math.round(_.row*c),_.col=Math.round(_.col*c),_.sizeX=Math.max(1,Math.round(_.sizeX*c)),_.sizeY=Math.max(1,Math.round(_.sizeY*c)),u.push(_)}u.sort((f,_)=>{let I=f.col-_.col;return I===0&&(I=f.row-_.row),I});for(let f of u)for(let _ of u)if(f!==_){let I=f.col,S=f.col+f.sizeX,F=f.row,H=f.row+f.sizeY,q=_.col,ee=_.col+_.sizeX,Ie=_.row,He=_.row+_.sizeY;if(I<ee&&S>q&&F<He&&H>Ie){let Le=!1;S-q===1&&(f.sizeX>1?(f.sizeX--,Le=!0):_.sizeX>1&&(_.col++,_.sizeX--,Le=!0)),!Le&&H-Ie===1&&(f.sizeY>1?f.sizeY--:_.sizeY>1&&(_.row++,_.sizeY--))}}}moveWidgets(e,i,o){if(i=De(i)?Math.round(i):0,o=De(o)?Math.round(o):0,i<0||o<0){let a=1/0,s=1/0;for(let c of Object.keys(e.widgets)){let u=e.widgets[c];a=Math.min(a,u.col),s=Math.min(s,u.row)}i+a<0&&(i=-a),o+s<0&&(o=-s)}for(let a of Object.keys(e.widgets)){let s=e.widgets[a];s.col+=i,s.row+=o}}removeUnusedWidgets(e){let i=e.configuration,o=i.states,a=i.widgets;for(let s of Object.keys(a)){let c=!1;for(let u of Object.keys(o)){let f=o[u];for(let _ of Object.keys(f.layouts)){let I=f.layouts[_];if(I.widgets[s]){c=!0;break}if(I.breakpoints){for(let S of Object.keys(I.breakpoints))if(I.breakpoints[S].widgets[s]){c=!0;break}}}}c||delete i.widgets[s]}}validateAndUpdateEntityAliases(e,i,o){let a;if(Bi(e.entityAliases)){if(e.entityAliases={},e.deviceAliases){let s=e.deviceAliases;for(let c of Object.keys(s)){let u=s[c];a=this.validateAndUpdateDeviceAlias(c,u,i,o),e.entityAliases[a.id]=a}delete e.deviceAliases}}else{let s=e.entityAliases;for(let c of Object.keys(s))a=s[c],a=this.validateAndUpdateEntityAlias(c,a,i,o),c!==a.id&&delete s[c],s[a.id]=a}return e}validateAndUpdateDeviceAlias(e,i,o,a){e=this.validateAliasId(e,o,a);let s=i.alias,c={id:e,alias:s,filter:{type:null,entityType:G.DEVICE,resolveMultiple:!1}};return i.deviceFilter?(c.filter.type=i.deviceFilter.useFilter?ht.entityName:ht.entityList,c.filter.type===ht.entityList?c.filter.entityList=i.deviceFilter.deviceList:c.filter.entityNameFilter=i.deviceFilter.deviceNameFilter):(c.filter.type=ht.entityList,c.filter.entityList=[i.deviceId]),c}validateAndUpdateEntityAlias(e,i,o,a){return i.id=this.validateAliasId(e,o,a),i.filter||(i.filter={type:i.entityFilter.useFilter?ht.entityName:ht.entityList,entityType:i.entityType,resolveMultiple:!1},i.filter.type===ht.entityList?i.filter.entityList=i.entityFilter.entityList:i.filter.entityNameFilter=i.entityFilter.entityNameFilter,delete i.entityType,delete i.entityFilter),i=this.validateAndUpdateEntityAliasSingleTypeFilters(i),i}validateAndUpdateEntityAliasSingleTypeFilters(e){return e.filter.type===ht.deviceType&&e.filter.deviceType&&(e.filter.deviceTypes||(e.filter.deviceTypes=[]),e.filter.deviceTypes.push(e.filter.deviceType),delete e.filter.deviceType),e.filter.type===ht.assetType&&e.filter.assetType&&(e.filter.assetTypes||(e.filter.assetTypes=[]),e.filter.assetTypes.push(e.filter.assetType),delete e.filter.assetType),e.filter.type===ht.entityViewType&&e.filter.entityViewType&&(e.filter.entityViewTypes||(e.filter.entityViewTypes=[]),e.filter.entityViewTypes.push(e.filter.entityViewType),delete e.filter.entityViewType),e.filter.type===ht.edgeType&&e.filter.edgeType&&(e.filter.edgeTypes||(e.filter.edgeTypes=[]),e.filter.edgeTypes.push(e.filter.edgeType),delete e.filter.edgeType),e}validateAliasId(e,i,o){if(!e||!pl(e)||e.length!==36){let a=this.utils.guid(),s=i[e];s&&s.forEach(u=>{u.entityAliasId=a});let c=o[e];return c&&c.forEach(u=>{u.entityAliasId=a}),a}else return e}replaceReferenceWithWidgetCopy(e,i,o,a,s,c){let u=Di(e);u.id=this.utils.guid();let f=this.getOriginalColumns(i,o,a,s),_=this.getOriginalSize(i,o,a,e,s),S=this.getDashboardLayoutConfig(i.configuration.states[o].layouts[a],s).widgets[e.id],F=S.row,H=S.col;return c&&this.removeWidgetFromLayout(i,o,a,e.id,s),this.addWidgetToLayout(i,o,a,u,f,_,F,H,s),u}getDashboardLayoutConfig(e,i){return i!=="default"&&e.breakpoints?e.breakpoints[i]:e}getOriginalColumns(e,i,o,a){let s=24,c=null,u=e.configuration.states[i],f=Object.keys(u.layouts).length;if(u){let _=this.getDashboardLayoutConfig(u.layouts[o],a);_&&(c=_.gridSettings)}return c&&c.columns&&(s=c.columns),s=s*f,s}getOriginalSize(e,i,o,a,s){let u=this.getDashboardLayoutConfig(e.configuration.states[i].layouts[o],s).widgets[a.id];return{sizeX:u.sizeX,sizeY:u.sizeY,preserveAspectRatio:u.preserveAspectRatio,resizable:u.resizable}}loadSystemBreakpoints(){this.systemBreakpoints={},["xs","sm","md","lg","xl"].forEach(i=>
123{let o=cl[i],a=o.match(/min-width:\s*(\d+)px/)?.[1],s=o.match(/max-width:\s*(\d+)px/)?.[1];this.systemBreakpoints[i]={id:i,minWidth:a?Number(a):void 0,maxWidth:s?Number(s):void 0,value:o}})}getListBreakpoint(){this.systemBreakpoints||this.loadSystemBreakpoints();let e=Object.values(this.systemBreakpoints);return e.unshift({id:"default"}),e}getBreakpoints(){return this.systemBreakpoints||this.loadSystemBreakpoints(),Object.values(this.systemBreakpoints).map(e=>e.value)}getBreakpointInfoByValue(e){return this.systemBreakpoints||this.loadSystemBreakpoints(),Object.values(this.systemBreakpoints).find(i=>i.value===e)}getBreakpointInfoById(e){return this.systemBreakpoints||this.loadSystemBreakpoints(),this.systemBreakpoints[e]}getBreakpointName(e){return hR.has(e)?this.translate.instant(hR.get(e)):e}getBreakpointIcon(e){return fR.has(e)?fR.get(e):"desktop_windows"}getBreakpointSizeDescription(e){let i=this.getBreakpointInfoById(e),o=dt(i?.minWidth)?`min ${i.minWidth}px`:"",a=dt(i?.maxWidth)?`max ${i.maxWidth}px`:"";return o&&a?`${o} - ${a}`:`${o}${a}`}updatedLayoutForBreakpoint(e,i){let o="default";e.layoutCtx.layoutData[i]&&(o=i),e.layoutCtx.breakpoint=o;let a=e.layoutCtx.layoutData[o];a.gridSettings&&(e.layoutCtx.gridSettings=a.gridSettings),e.layoutCtx.widgets.setWidgetIds(a.widgetIds),e.layoutCtx.widgetLayouts=a.widgetLayouts,e.show&&e.layoutCtx.ctrl&&e.layoutCtx.ctrl.reload(),e.layoutCtx.ignoreLoading=!0}};t.\u0275fac=function(i){return new(i||t)(X(vn),X(ba),X(Ge),X(Dl))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Eue=["dashboardStateInput"];function Iue(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",9),g(2,"close"),p()()}}function kue(n,t){if(n&1&&(d(0,"mat-option",10),O(1,"span",11),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r,e.searchText),Ut)}}function Due(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"widget-action.target-dashboard-state-required")," "))}var T1=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}get dashboardId(){return this.dashboardIdValue}set dashboardId(e){this.dashboardIdValue!==e&&(this.dashboardIdValue=e,this.clearDashboardStateCache(),this.searchText="",this.selectDashboardStateFormGroup.get("dashboardStateId").patchValue("",{emitEvent:!1}),this.dirty=!0)}constructor(e,i,o,a,s){this.store=e,this.translate=i,this.dashboardService=o,this.dashboardUtils=a,this.fb=s,this.dirty=!1,this.latestDashboardStates=null,this.dashboardStatesFetchObservable$=null,this.propagateChange=c=>{},this.label=this.translate.instant("widget-action.target-dashboard-state"),this.dashboardIdValue=null,this.searchText="",this.selectDashboardStateFormGroup=this.fb.group({dashboardStateId:[null]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.required&&(this.selectDashboardStateFormGroup.get("dashboardStateId").addValidators(ke.required),this.selectDashboardStateFormGroup.get("dashboardStateId").updateValueAndValidity({emitEvent:!1})),this.filteredStatesDashboard$=this.selectDashboardStateFormGroup.get("dashboardStateId").valueChanges.pipe(Wi(150),et(e=>{let i;!e||!this.latestDashboardStates?.includes(e)?i=null:i=e,this.updateView(i)}),xr(),ii(e=>this.fetchDashboardStates(e)),Si())}setDisabledState(e){this.disabled=e,this.disabled?this.selectDashboardStateFormGroup.disable({emitEvent:!1}):this.selectDashboardStateFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="",e!=null?(this.modelValue=e,this.selectDashboardStateFormGroup.get("dashboardStateId").patchValue(e,{emitEvent:!1})):(this.modelValue=null,this.selectDashboardStateFormGroup.get("dashboardStateId").patchValue("",{emitEvent:!1})),this.dirty=!0}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}displayDashboardFn(e){return e?e.title:void 0}onFocus(){this.dirty&&(this.selectDashboardStateFormGroup.get("dashboardStateId").updateValueAndValidity({onlySelf:!0}),this.dirty=!1)}clear(e=""){this.dashboardStateInput.nativeElement.value=e,this.selectDashboardStateFormGroup.get("dashboardStateId").patchValue(e,{emitEvent:!0}),setTimeout(()=>{this.dashboardStateInput.nativeElement.blur(),this.dashboardStateInput.nativeElement.focus()},0)}fetchDashboardStates(e){if(this.searchText!==e||this.latestDashboardStates===null){this.searchText=e;let i=this.createFilterForDashboardState(this.searchText);return this.getDashboardStatesById().pipe(W(o=>o.filter(i)),et(o=>this.latestDashboardStates=o))}return Z(this.latestDashboardStates)}getDashboardStatesById(){if(this.dashboardStatesFetchObservable$===null){let e;this.dashboardId?e=this.dashboardService.getDashboard(this.dashboardId,{ignoreLoading:!0}).pipe(W(i=>{if(i){i=this.dashboardUtils.validateAndUpdateDashboard(i);let o=i.configuration.states;return Object.keys(o)}else return[]})):e=Z([]),this.dashboardStatesFetchObservable$=e.pipe(Si({connector:()=>new or(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!1}))}return this.dashboardStatesFetchObservable$}createFilterForDashboardState(e){let i=e.toLowerCase();return o=>o.toLowerCase().indexOf(i)===0}clearDashboardStateCache(){this.latestDashboardStates=null,this.dashboardStatesFetchObservable$=null}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(lp),h(Dv),h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-dashboard-state-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(Eue,7),i&2){let a;Q(a=K())&&(o.dashboardStateInput=a.first)}},inputs:{label:"label",placeholder:"placeholder",required:"required",disabled:"disabled",dashboardId:"dashboardId"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:11,vars:10,consts:[["dashboardStateInput",""],["dashboardStateAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","dashboardStateId",3,"focus","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"mat-label"),g(2),p(),d(3,"input",3,0),T("focus",function(){return D(a),M(o.onFocus())}),p(),x(5,Iue,3,0,"button",4),d(6,"mat-autocomplete",5,1),x(8,kue,3,5,"mat-option",6),v(9,"async"),p(),x(10,Due,3,3,"mat-error",7),p()}if(i&2){let a=me(7);m("formGroup",o.selectDashboardStateFormGroup),l(2),z(o.label),l(),te("placeholder",o.placeholder),m("required",o.required)("matAutocomplete",a),l(2),m("ngIf",o.selectDashboardStateFormGroup.get("dashboardStateId").value),l(3),m("ngForOf",C(9,8,o.filteredStatesDashboard$)),l(2),m("ngIf",o.selectDashboardStateFormGroup.get("dashboardStateId").hasError("required"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();var Khe={};Ae(Khe,{EntitySubTypeAutocompleteComponent:()=>ZI});y();y();y();var Mv=(()=>{let t=class t{constructor(e,i){this.http=e,this.resourcesService=i}getDeviceInfosByQuery(e,i){return this.http.get(`/api${e.toQuery()}`,N(i))}getTenantDevices(e,i="",o){return this.http.get(`/api/tenant/devices${e.toQuery()}&type=${i}`,N(o))}getCustomerDevices(e,i,o="",a){return this.http.get(`/api/customer/${e}/devices${i.toQuery()}&type=${o}`,N(a))}getDevice(e,i){return this.http.get(`/api/device/${e}`,N(i))}getDevices(e,i){return this.http.get(`/api/devices?deviceIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getUserDevices(e,i="",o){return this.http.get(`/api/user/devices${e.toQuery()}&type=${i}`,N(o))}getAllDeviceInfos(e,i,o="",a){let s=`/api/deviceInfos/all${i.toQuery()}&deviceProfileId=${o}`;return e&&(s+="&includeCustomers=true"),this.http.get(s,N(a))}getCustomerDeviceInfos(e,i,o,a="",s){let c=`/api/customer/${i}/deviceInfos${o.toQuery()}&deviceProfileId=${a}`;return e&&(c+="&includeCustomers=true"),this.http.get(c,N(s))}getDeviceInfo(e,i){return this.http.get(`/api/device/info/${e}`,N(i))}saveDevice(e,i,o){let a="/api/device";return i&&(Array.isArray(i)?a+=`?entityGroupIds=${i.join(",")}`:a+=`?entityGroupId=${i}`),this.http.post(a,e,N(o))}saveDeviceWithCredentials(e,i,o,a){let s="/api/device-with-credentials";return o&&(Array.isArray(o)?s+=`?entityGroupIds=${o.join(",")}`:s+=`?entityGroupId=${o}`),this.http.post(s,{device:e,credentials:i},N(a))}deleteDevice(e,i){return this.http.delete(`/api/device/${e}`,N(i))}getDeviceTypes(e){return this.http.get("/api/device/types",N(e))}getDeviceCredentials(e,i=!1,o){let a=`/api/device/${e}/credentials`;if(i){let s=new or,c=new XMLHttpRequest;c.open("GET",a,!1),c.setRequestHeader("Accept","application/json, text/plain, */*");let u=Ro.getJwtToken();if(u&&c.setRequestHeader("X-Authorization","Bearer "+u),c.send(null),c.status===200){let f=JSON.parse(c.responseText);s.next(f)}else s.error(null);return s.asObservable()}else return this.http.get(a,N(o))}saveDeviceCredentials(e,i){return this.http.post("/api/device/credentials",e,N(i))}sendOneWayRpcCommand(e,i,o){return this.http.post(`/api/rpc/oneway/${e}`,i,N(o))}sendTwoWayRpcCommand(e,i,o){return this.http.post(`/api/rpc/twoway/${e}`,i,N(o))}getPersistedRpc(e,i=!1,o){return this.http.get(`/api/rpc/persistent/${e}`,N(o))}deletePersistedRpc(e,i){return this.http.delete(`/api/rpc/persistent/${e}`,N(i))}getPersistedRpcRequests(e,i,o,a){let s=`/api/rpc/persistent/device/${e}${i.toQuery()}`;return o&&o.length&&(s+=`&rpcStatus=${o}`),this.http.get(s,N(a))}findByQuery(e,i){return this.http.post("/api/devices",e,N(i))}findByName(e,i){return this.http.get(`/api/tenant/devices?deviceName=${e}`,N(i))}claimDevice(e,i,o){return this.http.post(`/api/customer/device/${e}/claim`,i,N(o))}unclaimDevice(e,i){return this.http.delete(`/api/customer/device/${e}/claim`,N(i))}bulkImportDevices(e,i){return this.http.post("/api/device/bulk_import",e,N(i))}getDevicePublishTelemetryCommands(e,i){return this.http.get(`/api/device-connectivity/${e}`,N(i))}downloadGatewayDockerComposeFile(e){return this.resourcesService.downloadResource(`/api/device-connectivity/gateway-launch/${e}/docker-compose/download`)}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(uc))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();
123var CH=(()=>{let t=class t{constructor(e){this.http=e}getTenants(e,i){return this.http.get(`/api/tenants${e.toQuery()}`,N(i))}getTenantsByIds(e,i){return this.http.get(`/api/tenants?tenantIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getTenantInfos(e,i){return this.http.get(`/api/tenantInfos${e.toQuery()}`,N(i))}getTenant(e,i){return this.http.get(`/api/tenant/${e}`,N(i))}getTenantInfo(e,i){return this.http.get(`/api/tenant/info/${e}`,N(i))}saveTenant(e,i){return this.http.post("/api/tenant",e,N(i))}deleteTenant(e,i){return this.http.delete(`/api/tenant/${e}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var MI=(()=>{let t=class t{constructor(e){this.http=e}getCustomers(e,i){return this.http.get(`/api/customers${e.toQuery()}`,N(i))}getCustomer(e,i){return this.http.get(`/api/customer/${e}`,N(i))}getCustomerInfo(e,i){return this.http.get(`/api/customer/info/${e}`,N(i))}saveCustomer(e,i,o){let a="/api/customer";return i&&(Array.isArray(i)?a+=`?entityGroupIds=${i.join(",")}`:a+=`?entityGroupId=${i}`),this.http.post(a,e,N(o))}deleteCustomer(e,i){return this.http.delete(`/api/customer/${e}`,N(i))}getCustomersByIds(e,i){return this.http.get(`/api/customers?customerIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getUserCustomers(e,i){return this.http.get(`/api/user/customers${e.toQuery()}`,N(i))}getAllCustomerInfos(e,i,o){let a=`/api/customerInfos/all${i.toQuery()}`;return e&&(a+="&includeCustomers=true"),this.http.get(a,N(o))}getCustomerCustomerInfos(e,i,o,a){let s=`/api/customer/${i}/customerInfos${o.toQuery()}`;return e&&(s+="&includeCustomers=true"),this.http.get(s,N(a))}getShortCustomerInfo(e,i){return this.http.get(`/api/customer/${e}/shortInfo`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var AI=(()=>{let t=class t{constructor(e){this.http=e}getTenantAssets(e,i="",o){return this.http.get(`/api/tenant/assets${e.toQuery()}&type=${i}`,N(o))}getCustomerAssets(e,i,o="",a){return this.http.get(`/api/customer/${e}/assets${i.toQuery()}&type=${o}`,N(a))}getAsset(e,i){return this.http.get(`/api/asset/${e}`,N(i))}getAssets(e,i){return this.http.get(`/api/assets?assetIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getUserAssets(e,i="",o){return this.http.get(`/api/user/assets${e.toQuery()}&type=${i}`,N(o))}getAllAssetInfos(e,i,o="",a){let s=`/api/assetInfos/all${i.toQuery()}&assetProfileId=${o}`;return e&&(s+="&includeCustomers=true"),this.http.get(s,N(a))}getCustomerAssetInfos(e,i,o,a="",s){let c=`/api/customer/${i}/assetInfos${o.toQuery()}&assetProfileId=${a}`;return e&&(c+="&includeCustomers=true"),this.http.get(c,N(s))}getAssetInfo(e,i){return this.http.get(`/api/asset/info/${e}`,N(i))}saveAsset(e,i,o){let a="/api/asset";return i&&(Array.isArray(i)?a+=`?entityGroupIds=${i.join(",")}`:a+=`?entityGroupId=${i}`),this.http.post(a,e,N(o))}deleteAsset(e,i){return this.http.delete(`/api/asset/${e}`,N(i))}getAssetTypes(e){return this.http.get("/api/asset/types",N(e))}findByQuery(e,i){return this.http.post("/api/assets",e,N(i))}findByName(e,i){return this.http.get(`/api/tenant/assets?assetName=${e}`,N(i))}bulkImportAssets(e,i){return this.http.post("/api/asset/bulk_import",e,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var SH=(()=>{let t=class t{constructor(e){this.http=e}getTenantEntityViews(e,i="",o){return this.http.get(`/api/tenant/entityViews${e.toQuery()}&type=${i}`,N(o))}getCustomerEntityViews(e,i,o="",a){return this.http.get(`/api/customer/${e}/entityViews${i.toQuery()}&type=${o}`,N(a))}getEntityView(e,i){return this.http.get(`/api/entityView/${e}`,N(i))}getEntityViews(e,i){return this.http.get(`/api/entityViews?entityViewIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getUserEntityViews(e,i="",o){return this.http.get(`/api/user/entityViews${e.toQuery()}&type=${i}`,N(o))}getAllEntityViewInfos(e,i,o="",a){let s=`/api/entityViewInfos/all${i.toQuery()}&type=${o}`;return e&&(s+="&includeCustomers=true"),this.http.get(s,N(a))}getCustomerEntityViewInfos(e,i,o,a="",s){let c=`/api/customer/${i}/entityViewInfos${o.toQuery()}&type=${a}`;return e&&(c+="&includeCustomers=true"),this.http.get(c,N(s))}getEntityViewInfo(e,i){return this.http.get(`/api/entityView/info/${e}`,N(i))}saveEntityView(e,i,o){let a="/api/entityView";return i&&(Array.isArray(i)?a+=`?entityGroupIds=${i.join(",")}`:a+=`?entityGroupId=${i}`),this.http.post(a,e,N(o))}deleteEntityView(e,i){return this.http.delete(`/api/entityView/${e}`,N(i))}getEntityViewTypes(e){return this.http.get("/api/entityView/types",N(e))}findByQuery(e,i){return this.http.post("/api/entityViews",e,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();y();y();var EH=(()=>{let t=class t extends sn{set disabled(e){this.disabledValue!==e&&(this.disabledValue=e,e?this.configForm().disable({emitEvent:!1}):(this.configForm().enable({emitEvent:!1}
123),this.updateValidators(!1)))}set configuration(e){this.configurationValue=e,this.configurationSet?this.updateConfiguration(e):(this.configurationSet=!0,this.setupConfiguration(e))}get configuration(){return this.configurationValue}constructor(...e){super(),this.hasScript=!1,this.configurationSet=!1,this.disabledValue=!1,this.destroyRef=Rt(En),this.configurationChangedEmiter=new J,this.configurationChanged=this.configurationChangedEmiter.asObservable()}ngOnInit(){}ngAfterViewInit(){setTimeout(()=>{this.validateConfig()||this.configurationChangedEmiter.emit(null)},0)}validate(){this.onValidate()}setupConfiguration(e){this.onConfigurationSet(this.prepareInputConfig(e)),this.updateValidators(!1);for(let i of this.validatorTriggers()){let o=i.split("."),a=this.configForm();for(let s of o)a=a.get(s);a.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateValidators(!0,i)})}this.configForm().valueChanges.pipe(yi(this.destroyRef)).subscribe(i=>{this.onConfigurationChanged(i)})}updateConfiguration(e){this.configForm().reset(this.prepareInputConfig(e),{emitEvent:!1}),this.updateValidators(!1)}updateValidators(e,i){}validatorTriggers(){return[]}onConfigurationChanged(e){this.configurationValue=e,this.validateConfig()?this.configurationChangedEmiter.emit(this.prepareOutputConfig(e)):this.configurationChangedEmiter.emit(null)}prepareInputConfig(e){return e}prepareOutputConfig(e){return e}validateConfig(){return this.configForm().valid}onValidate(){}};t.\u0275fac=function(i){ab()},t.\u0275dir=_e({type:t,features:[Ce]});let n=t;return n})(),ao=function(n){return n.FILTER="FILTER",n.ENRICHMENT="ENRICHMENT",n.TRANSFORMATION="TRANSFORMATION",n.ACTION="ACTION",n.ANALYTICS="ANALYTICS",n.EXTERNAL="EXTERNAL",n.FLOW="FLOW",n.UNKNOWN="UNKNOWN",n.INPUT="INPUT",n}(ao||{}),cEt=[ao.FILTER,ao.ENRICHMENT,ao.TRANSFORMATION,ao.ACTION,ao.ANALYTICS,ao.EXTERNAL,ao.FLOW],wF=new Map([[ao.FILTER,{value:ao.FILTER,name:"rulenode.type-filter",details:"rulenode.type-filter-details",nodeClass:"tb-filter-type",icon:"filter_list"}],[ao.ENRICHMENT,{value:ao.ENRICHMENT,name:"rulenode.type-enrichment",details:"rulenode.type-enrichment-details",nodeClass:"tb-enrichment-type",icon:"playlist_add"}],[ao.TRANSFORMATION,{value:ao.TRANSFORMATION,name:"rulenode.type-transformation",details:"rulenode.type-transformation-details",nodeClass:"tb-transformation-type",icon:"transform"}],[ao.ACTION,{value:ao.ACTION,name:"rulenode.type-action",details:"rulenode.type-action-details",nodeClass:"tb-action-type",icon:"flash_on"}],[ao.ANALYTICS,{value:ao.ANALYTICS,name:"rulenode.type-analytics",details:"rulenode.type-analytics-details",nodeClass:"tb-analytics-type",icon:"timeline"}],[ao.EXTERNAL,{value:ao.EXTERNAL,name:"rulenode.type-external",details:"rulenode.type-external-details",nodeClass:"tb-external-type",icon:"cloud_upload"}],[ao.FLOW,{value:ao.FLOW,name:"rulenode.type-flow",details:"rulenode.type-flow-details",nodeClass:"tb-flow-type",icon:"settings_ethernet"}],[ao.INPUT,{value:ao.INPUT,name:"rulenode.type-input",details:"rulenode.type-input-details",nodeClass:"tb-input-type",icon:"input",special:!0}],[ao.UNKNOWN,{value:ao.UNKNOWN,name:"rulenode.type-unknown",details:"rulenode.type-unknown-details",nodeClass:"tb-unknown-type",icon:"help_outline"}]]),Ea=function(n){return n.JS="JS",n.TBEL="TBEL",n}(Ea||{}),Tn=function(n){return n.POST_ATTRIBUTES_REQUEST="POST_ATTRIBUTES_REQUEST",n.POST_TELEMETRY_REQUEST="POST_TELEMETRY_REQUEST",n.TO_SERVER_RPC_REQUEST="TO_SERVER_RPC_REQUEST",n.RPC_CALL_FROM_SERVER_TO_DEVICE="RPC_CALL_FROM_SERVER_TO_DEVICE",n.RPC_QUEUED="RPC_QUEUED",n.RPC_SENT="RPC_SENT",n.RPC_DELIVERED="RPC_DELIVERED",n.RPC_SUCCESSFUL="RPC_SUCCESSFUL",n.RPC_TIMEOUT="RPC_TIMEOUT",n.RPC_EXPIRED="RPC_EXPIRED",n.RPC_FAILED="RPC_FAILED",n.RPC_DELETED="RPC_DELETED",n.ACTIVITY_EVENT="ACTIVITY_EVENT",n.INACTIVITY_EVENT="INACTIVITY_EVENT",n.CONNECT_EVENT="CONNECT_EVENT",n.DISCONNECT_EVENT="DISCONNECT_EVENT",n.ENTITY_CREATED="ENTITY_CREATED",n.ENTITY_UPDATED="ENTITY_UPDATED",n.ENTITY_DELETED="ENTITY_DELETED",n.ENTITY_ASSIGNED="ENTITY_ASSIGNED",n.ENTITY_UNASSIGNED="ENTITY_UNASSIGNED",n.ATTRIBUTES_UPDATED="ATTRIBUTES_UPDATED",n.ATTRIBUTES_DELETED="ATTRIBUTES_DELETED",n.ALARM_ACKNOWLEDGED="ALARM_ACKNOWLEDGED",n.ALARM_CLEARED="ALARM_CLEARED",n.ALARM_ASSIGNED="ALARM_ASSIGNED",n.ALARM_UNASSIGNED="ALARM_UNASSIGNED",n.COMMENT_CREATED="COMMENT_CREATED",n.COMMENT_UPDATED="COMMENT_UPDATED",n.ADDED_TO_GROUP="ADDED_TO_GROUP",n.REMOVED_FROM_GROUP="REMOVED_FROM_GROUP",n.ENTITY_ASSIGNED_FROM_TENANT="ENTITY_ASSIGNED_FROM_TENANT",n.ENTITY_ASSIGNED_TO_TENANT="ENTITY_ASSIGNED_TO_TENANT",n.TIMESERIES_UPDATED="TIMESERIES_UPDATED",n.TIMESERIES_DELETED="TIMESERIES_DELETED",n.ADDED_TO_ENTITY_GROUP="ADDED_TO_ENTITY_GROUP",n.REMOVED_FROM_ENTITY_GROUP="REMOVED_FROM_ENTITY_GROUP",n.REST_API_REQUEST="REST_API_REQUEST",n.FIRMWARE_UPDATED="FIRMWARE_UPDATED",n.SOFTWARE_UPDATED="SOFTWARE_UPDATED",n.generateReport="generateReport",n.generateDashboardReport="generateDashboardReport",n.OWNER_CHANGED="OWNER_CHANGED",n}(Tn||{}),xF=new Map([[Tn.POST_ATTRIBUTES_REQUEST,"Post attributes"],[Tn.POST_TELEMETRY_REQUEST,"Post telemetry"],[Tn.TO_SERVER_RPC_REQUEST,"RPC Request from Device"],[Tn.RPC_CALL_FROM_SERVER_TO_DEVICE,"RPC Request to Device"],[Tn.RPC_QUEUED,"RPC Queued"],[Tn.RPC_SENT,"RPC Sent"],[Tn.RPC_DELIVERED,"RPC Delivered"],[Tn.RPC_SUCCESSFUL,"RPC Successful"],[Tn.RPC_TIMEOUT,"RPC Timeout"],[Tn.RPC_EXPIRED,"RPC Expired"],[Tn.RPC_FAILED,"RPC Failed"],[Tn.RPC_DELETED,"RPC Deleted"],[Tn.ACTIVITY_EVENT,"Activity Event"],[Tn.INACTIVITY_EVENT,"Inactivity Event"],[Tn.CONNECT_EVENT,"Connect Event"],[Tn.DISCONNECT_EVENT,"Disconnect Event"],[Tn.ENTITY_CREATED,"Entity Created"],[Tn.ENTITY_UPDATED,"Entity Upd
123ated"],[Tn.ENTITY_DELETED,"Entity Deleted"],[Tn.ENTITY_ASSIGNED,"Entity Assigned"],[Tn.ENTITY_UNASSIGNED,"Entity Unassigned"],[Tn.ATTRIBUTES_UPDATED,"Attributes Updated"],[Tn.ATTRIBUTES_DELETED,"Attributes Deleted"],[Tn.ALARM_ACKNOWLEDGED,"Alarm Acknowledged"],[Tn.ALARM_CLEARED,"Alarm Cleared"],[Tn.ALARM_ASSIGNED,"Alarm Assigned"],[Tn.ALARM_UNASSIGNED,"Alarm Unassigned"],[Tn.COMMENT_CREATED,"Comment Created"],[Tn.COMMENT_UPDATED,"Comment Updated"],[Tn.ADDED_TO_GROUP,"Added to Group"],[Tn.REMOVED_FROM_GROUP,"Removed from Group"],[Tn.ENTITY_ASSIGNED_FROM_TENANT,"Entity Assigned From Tenant"],[Tn.ENTITY_ASSIGNED_TO_TENANT,"Entity Assigned To Tenant"],[Tn.TIMESERIES_UPDATED,"Timeseries Updated"],[Tn.TIMESERIES_DELETED,"Timeseries Deleted"],[Tn.ADDED_TO_ENTITY_GROUP,"Added to Group"],[Tn.REMOVED_FROM_ENTITY_GROUP,"Removed from Group"],[Tn.REST_API_REQUEST,"REST API request"],[Tn.FIRMWARE_UPDATED,"Firmware Update"],[Tn.SOFTWARE_UPDATED,"Software Update"],[Tn.generateReport,"Generate Report"],[Tn.generateDashboardReport,"Generate Dashboard Report"],[Tn.OWNER_CHANGED,"Owner Changed"]]),dEt="org.thingsboard.rule.engine.flow.TbRuleChainInputNode",pEt="org.thingsboard.rule.engine.flow.TbRuleChainOutputNode",TH={"org.thingsboard.rule.engine.filter.TbCheckRelationNode":"ruleNodeCheckRelation","org.thingsboard.rule.engine.filter.TbCheckMessageNode":"ruleNodeCheckExistenceFields","org.thingsboard.rule.engine.geo.TbGpsGeofencingFilterNode":"ruleNodeGpsGeofencingFilter","org.thingsboard.rule.engine.filter.TbJsFilterNode":"ruleNodeJsFilter","org.thingsboard.rule.engine.filter.TbJsSwitchNode":"ruleNodeJsSwitch","org.thingsboard.rule.engine.filter.TbAssetTypeSwitchNode":"ruleNodeAssetProfileSwitch","org.thingsboard.rule.engine.filter.TbDeviceTypeSwitchNode":"ruleNodeDeviceProfileSwitch","org.thingsboard.rule.engine.filter.TbCheckAlarmStatusNode":"ruleNodeCheckAlarmStatus","org.thingsboard.rule.engine.filter.TbMsgTypeFilterNode":"ruleNodeMessageTypeFilter","org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode":"ruleNodeMessageTypeSwitch","org.thingsboard.rule.engine.filter.TbOriginatorTypeFilterNode":"ruleNodeOriginatorTypeFilter","org.thingsboard.rule.engine.filter.TbOriginatorTypeSwitchNode":"ruleNodeOriginatorTypeSwitch","org.thingsboard.rule.engine.metadata.TbGetAttributesNode":"ruleNodeOriginatorAttributes","org.thingsboard.rule.engine.metadata.TbGetOriginatorFieldsNode":"ruleNodeOriginatorFields","org.thingsboard.rule.engine.metadata.TbGetTelemetryNode":"ruleNodeOriginatorTelemetry","org.thingsboard.rule.engine.metadata.TbGetCustomerAttributeNode":"ruleNodeCustomerAttributes","org.thingsboard.rule.engine.metadata.TbGetCustomerDetailsNode":"ruleNodeCustomerDetails","org.thingsboard.rule.engine.metadata.TbFetchDeviceCredentialsNode":"ruleNodeFetchDeviceCredentials","org.thingsboard.rule.engine.metadata.TbGetDeviceAttrNode":"ruleNodeDeviceAttributes","org.thingsboard.rule.engine.metadata.TbGetRelatedAttributeNode":"ruleNodeRelatedAttributes","org.thingsboard.rule.engine.metadata.TbGetTenantAttributeNode":"ruleNodeTenantAttributes","org.thingsboard.rule.engine.metadata.TbGetTenantDetailsNode":"ruleNodeTenantDetails","org.thingsboard.rule.engine.metadata.CalculateDeltaNode":"ruleNodeCalculateDelta","org.thingsboard.rule.engine.transform.TbChangeOriginatorNode":"ruleNodeChangeOriginator","org.thingsboard.rule.engine.transform.TbTransformMsgNode":"ruleNodeTransformMsg","org.thingsboard.rule.engine.mail.TbMsgToEmailNode":"ruleNodeMsgToEmail","org.thingsboard.rule.engine.action.TbAssignToCustomerNode":"ruleNodeAssignToCustomer","org.thingsboard.rule.engine.action.TbUnassignFromCustomerNode":"ruleNodeUnassignFromCustomer","org.thingsboard.rule.engine.telemetry.TbCalculatedFieldsNode":"ruleNodeCalculatedFields","org.thingsboard.rule.engine.action.TbClearAlarmNode":"ruleNodeClearAlarm","org.thingsboard.rule.engine.action.TbCreateAlarmNode":"ruleNodeCreateAlarm","org.thingsboard.rule.engine.action.TbCopyAttributesToEntityViewNode":"ruleNodeCopyToView","org.thingsboard.rule.engine.action.TbCreateRelationNode":"ruleNodeCreateRelation","org.thingsboard.rule.engine.action.TbDeleteRelationNode":"ruleNodeDeleteRelation","org.thingsboard.rule.engine.action.TbDeviceStateNode":"ruleNodeDeviceState","org.thingsboard.rule.engine.action.TbMsgCountNode":"ruleNodeMessageCount","org.thingsboard.rule.engine.delay.TbMsgDelayNode":"ruleNodeMsgDelay","org.thingsboard.rule.engine.debug.TbMsgGeneratorNode":"ruleNodeMsgGenerator","org.thingsboard.rule.engine.geo.TbGpsGeofencingActionNode":"ruleNodeGpsGeofencingEvents","org.thingsboard.rule.engine.action.TbLogNode":"ruleNodeLog","org.thingsboard.rule.engine.rpc.TbSendRPCReplyNode":"ruleNodeRpcCallReply","org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode":"ruleNodeRpcCallRequest","org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode":"ruleNodeSaveAttributes","org.thingsboard.rule.engine.telemetry.TbMsgDeleteAttributesNode":"ruleNodeDeleteAttributes","org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode":"ruleNodeSaveTimeseries","org.thingsboard.rule.engine.action.TbSaveToCu
123stomCassandraTableNode":"ruleNodeSaveToCustomTable","org.thingsboard.rule.engine.aws.lambda.TbAwsLambdaNode":"ruleNodeAwsLambda","org.thingsboard.rule.engine.ai.TbAiNode":"ruleNodeAiRequest","org.thingsboard.rule.engine.aws.sns.TbSnsNode":"ruleNodeAwsSns","org.thingsboard.rule.engine.aws.sqs.TbSqsNode":"ruleNodeAwsSqs","org.thingsboard.rule.engine.kafka.TbKafkaNode":"ruleNodeKafka","org.thingsboard.rule.engine.mqtt.TbMqttNode":"ruleNodeMqtt","org.thingsboard.rule.engine.mqtt.azure.TbAzureIotHubNode":"ruleNodeAzureIotHub","org.thingsboard.rule.engine.rabbitmq.TbRabbitMqNode":"ruleNodeRabbitMq","org.thingsboard.rule.engine.rest.TbRestApiCallNode":"ruleNodeRestApiCall","org.thingsboard.rule.engine.mail.TbSendEmailNode":"ruleNodeSendEmail","org.thingsboard.rule.engine.sms.TbSendSmsNode":"ruleNodeSendSms","org.thingsboard.rule.engine.edge.TbMsgPushToCloudNode":"ruleNodePushToCloud","org.thingsboard.rule.engine.edge.TbMsgPushToEdgeNode":"ruleNodePushToEdge","org.thingsboard.rule.engine.profile.TbDeviceProfileNode":"ruleNodeDeviceProfile","org.thingsboard.rule.engine.integration.TbIntegrationDownlinkNode":"ruleNodeIntegrationDownlink","org.thingsboard.rule.engine.action.TbAddToGroupNode":"ruleNodeAddToGroup","org.thingsboard.rule.engine.action.TbRemoveFromGroupNode":"ruleNodeRemoveFromGroup","org.thingsboard.rule.engine.transform.TbDuplicateMsgToGroupNode":"ruleNodeDuplicateToGroup","org.thingsboard.rule.engine.transform.TbDuplicateMsgToGroupByNameNode":"ruleNodeDuplicateToGroupByName","org.thingsboard.rule.engine.transform.TbDuplicateMsgToRelatedNode":"ruleNodeDuplicateToRelated","org.thingsboard.rule.engine.action.TbChangeOwnerNode":"ruleNodeChangeOwner","org.thingsboard.rule.engine.report.TbGenerateReportNode":"ruleNodeGenerateReport","org.thingsboard.rule.engine.analytics.latest.telemetry.TbAggLatestTelemetryNode":"ruleNodeAggregateLatest","org.thingsboard.rule.engine.analytics.incoming.TbSimpleAggMsgNode":"ruleNodeAggregateStream","org.thingsboard.rule.engine.analytics.latest.alarm.TbAlarmsCountNodeV2":"ruleNodeAlarmsCount","org.thingsboard.rule.engine.analytics.latest.alarm.TbAlarmsCountNode":"ruleNodeAlarmsCountDeprecated","org.thingsboard.rule.engine.flow.TbRuleChainInputNode":"ruleNodeRuleChain","org.thingsboard.rule.engine.flow.TbRuleChainOutputNode":"ruleNodeOutputNode","org.thingsboard.rule.engine.flow.TbAckNode":"ruleNodeAcknowledge","org.thingsboard.rule.engine.flow.TbCheckpointNode":"ruleNodeCheckpoint","org.thingsboard.rule.engine.math.TbMathNode":"ruleNodeMath","org.thingsboard.rule.engine.rest.TbSendRestApiCallReplyNode":"ruleNodeRestCallReply","org.thingsboard.rule.engine.notification.TbNotificationNode":"ruleNodeSendNotification","org.thingsboard.rule.engine.notification.TbSlackNode":"ruleNodeSendSlack"};function mEt(n){if(n){if(n.configurationDescriptor&&n.configurationDescriptor.nodeDefinition&&n.configurationDescriptor.nodeDefinition.docUrl)return n.configurationDescriptor.nodeDefinition.docUrl;if(n.clazz&&TH[n.clazz])return TH[n.clazz]}return"ruleEngine"}y();var Hm=function(n){return n.ENRICHMENT="ENRICHMENT",n.FILTER="FILTER",n.TRANSFORMATION="TRANSFORMATION",n.ACTION="ACTION",n.ANALYTICS="ANALYTICS",n.EXTERNAL="EXTERNAL",n.FLOW="FLOW",n}(Hm||{}),Pue=function(n){return n.SYSTEM="SYSTEM",n.TENANT="TENANT",n}(Pue||{}),OI=function(n){return n.USER_PREFERENCE="USER_PREFERENCE",n.ENABLED="ENABLED",n.SINGLETON="SINGLETON",n}(OI||{});var IH=[Hm.FILTER,Hm.ENRICHMENT,Hm.TRANSFORMATION,Hm.ACTION,Hm.ANALYTICS,Hm.EXTERNAL,Hm.FLOW],kH={type:ao.UNKNOWN,name:"unknown",clusteringMode:OI.ENABLED,configurationVersion:0,clazz:"tb.internal.Unknown",configurationDescriptor:{nodeDefinition:{description:"",details:"",inEnabled:!0,outEnabled:!0,relationTypes:[],customRelations:!1,defaultConfiguration:{}}}},vEt={type:ao.INPUT,configurationVersion:0,clusteringMode:OI.ENABLED,name:"Input",clazz:"tb.internal.Input"},vd=function(n){return n.CORE="CORE",n.EDGE="EDGE",n}(vd||{});y();var DH=(()=>{let t=class t{constructor(e){this.http=e,this.componentsByTypeByRuleChainType=new Map,this.componentsByClazz=new Map}getComponentDescriptorsByType(e,i,o){this.componentsByTypeByRuleChainType.get(i)||this.componentsByTypeByRuleChainType.set(i,new Map);let a=this.componentsByTypeByRuleChainType.get(i).get(e);return a?Z(a):this.http.get(`/api/components/${e}&ruleChainType=${i}`,N(o)).pipe(W(s=>
123(this.componentsByTypeByRuleChainType.get(i).set(e,s),s.forEach(c=>{this.componentsByClazz.set(c.clazz,c)}),s)))}getComponentDescriptorsByTypes(e,i,o){this.componentsByTypeByRuleChainType.get(i)||this.componentsByTypeByRuleChainType.set(i,new Map);let a=[];for(let s=e.length-1;s>=0;s--){let c=e[s],u=this.componentsByTypeByRuleChainType.get(i).get(c);u&&(a=a.concat(u),e.splice(s,1))}return e.length?this.http.get(`/api/components?ruleChainType=${i}&componentTypes=${e.join(",")}`,N(o)).pipe(W(s=>(s.forEach(c=>{let u=this.componentsByTypeByRuleChainType.get(i).get(c.type);u||(u=new Array,this.componentsByTypeByRuleChainType.get(i).set(c.type,u)),u.push(c),this.componentsByClazz.set(c.clazz,c)}),a=a.concat(s),a))):Z(a)}getComponentDescriptorByClazz(e,i){let o=this.componentsByClazz.get(e);return o?Z(o):this.http.get(`/api/component/${e}`,N(i)).pipe(W(a=>(this.componentsByClazz.set(e,a),a)))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var vp=(()=>{let t=class t{constructor(e,i,o,a){this.http=e,this.componentDescriptorService=i,this.resourcesService=o,this.translate=a,this.ruleNodeComponentsMap=new Map,this.ruleNodeConfigComponents={}}getRuleChains(e,i=vd.CORE,o){return this.http.get(`/api/ruleChains${e.toQuery()}&type=${i}`,N(o))}getRuleChainsByIds(e,i){return this.http.get(`/api/ruleChains?ruleChainIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getRuleChain(e,i){return this.http.get(`/api/ruleChain/${e}`,N(i))}getRuleChainOutputLabels(e,i){return this.http.get(`/api/ruleChain/${e}/output/labels`,N(i))}createDefaultRuleChain(e,i){return this.http.post("/api/ruleChain/device/default",{name:e},N(i))}saveRuleChain(e,i){return this.http.post("/api/ruleChain",e,N(i))}deleteRuleChain(e,i){return this.http.delete(`/api/ruleChain/${e}`,N(i))}setRootRuleChain(e,i){return this.http.post(`/api/ruleChain/${e}/root`,null,N(i))}getRuleChainMetadata(e,i){return this.http.get(`/api/ruleChain/${e}/metadata`,N(i))}saveRuleChainMetadata(e,i){return this.http.post("/api/ruleChain/metadata",e,N(i))}getRuleNodeComponents(e,i,o){return this.ruleNodeComponentsMap.get(i)?Z(this.ruleNodeComponentsMap.get(i)):this.loadRuleNodeComponents(i,o).pipe(Ft(a=>this.resolveRuleNodeComponentsUiResources(a,e).pipe(W(s=>(this.ruleNodeComponentsMap.set(i,s),this.ruleNodeComponentsMap.get(i).sort((c,u)=>{let f=c.type.toString().localeCompare(u.type.toString());return f===0&&(f=c.name.localeCompare(u.name)),f}),this.ruleNodeComponentsMap.get(i))))))}getRuleNodeConfigComponent(e){return this.ruleNodeConfigComponents[e]}getRuleNodeComponentByClazz(e=vd.CORE,i){let o=this.ruleNodeComponentsMap.get(e).filter(a=>a.clazz===i);if(o&&o.length)return o[0];{let a=Di(kH);return a.clazz=i,a.configurationDescriptor.nodeDefinition.details="Unknown Rule Node class: "+i,a}}getRuleNodeSupportedLinks(e){let i=e.configurationDescriptor.nodeDefinition.relationTypes,o={};return i.forEach(a=>{o[a]={name:a,value:a}}),o}ruleNodeAllowCustomLinks(e){return e.configurationDescriptor.nodeDefinition.customRelations}ruleNodeSourceRuleChainId(e,i){return e.configurationDescriptor.nodeDefinition.ruleChainNode?i?.ruleChainId:null}getLatestRuleNodeDebugInput(e,i){return this.http.get(`/api/ruleNode/${e}/debugIn`,N(i))}testScript(e,i,o){let a="/api/ruleChain/testScript";return i&&(a+=`?scriptLang=${i}`),this.http.post(a,e,N(o))}registerSystemRuleNodeConfigModule(e){Object.assign(this.ruleNodeConfigComponents,this.resourcesService.extractComponentsFromModule(e,EH,!0))}loadRuleNodeComponents(e,i){return this.componentDescriptorService.getComponentDescriptorsByTypes(IH,e,i).pipe(W(o=>{let a=[];return o.forEach(s=>{a.push(s)}),a}))}resolveRuleNodeComponentsUiResources(e,i){let o=[];return e.forEach(a=>{o.push(this.resolveRuleNodeComponentUiResources(a,i))}),Rn(o).pipe(vt(()=>Z(e)))}resolveRuleNodeComponentUiResources(e,i){let o=e.configurationDescriptor.nodeDefinition,a=o.uiResources;if(!this.ruleNodeConfigComponents[o.configDirective]&&a&&a.length){let s=a.filter(f=>!f.endsWith(".js")),c=a.find(f=>f.endsWith(".js")),u=[];
123return s&&s.length&&s.forEach(f=>{u.push(this.resourcesService.loadResource(f))}),c&&u.push(this.resourcesService.loadModulesWithComponents(c,i).pipe(W(f=>{if(o.configDirective&&o.configDirective.length){let _=w4(o.configDirective,"-"),I=Bj(f,_);I?this.ruleNodeConfigComponents[o.configDirective]=I:e.configurationDescriptor.nodeDefinition.uiResourceLoadError=this.translate.instant("rulenode.directive-is-not-loaded",{directiveName:o.configDirective})}return Z(e)}))),Rn(u).pipe(W(()=>e),vt(()=>(e.configurationDescriptor.nodeDefinition.uiResourceLoadError=this.translate.instant("rulenode.ui-resources-load-error"),Z(e))))}else return Z(e)}getEdgeRuleChains(e,i,o){return this.http.get(`/api/edge/${e}/ruleChains${i.toQuery()}`,N(o))}assignRuleChainToEdge(e,i,o){return this.http.post(`/api/edge/${e}/ruleChain/${i}`,null,N(o))}unassignRuleChainFromEdge(e,i,o){return this.http.delete(`/api/edge/${e}/ruleChain/${i}`,N(o))}setEdgeTemplateRootRuleChain(e,i){return this.http.post(`/api/ruleChain/${e}/edgeTemplateRoot`,N(i))}setAutoAssignToEdgeRuleChain(e,i){return this.http.post(`/api/ruleChain/${e}/autoAssignToEdge`,N(i))}unsetAutoAssignToEdgeRuleChain(e,i){return this.http.delete(`/api/ruleChain/${e}/autoAssignToEdge`,N(i))}getAutoAssignToEdgeRuleChains(e){return this.http.get("/api/ruleChain/autoAssignToEdgeRuleChains",N(e))}setEdgeRootRuleChain(e,i,o){return this.http.post(`/api/edge/${e}/${i}/root`,N(o))}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(DH),X(uc),X(Ge))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var MH=(()=>{let t=class t{constructor(e){this.http=e}saveRelation(e,i){return this.http.post("/api/relation",e,N(i))}deleteRelation(e,i,o,a){return this.http.delete(`/api/relation?fromId=${e.id}&fromType=${e.entityType}&relationType=${i}&toId=${o.id}&toType=${o.entityType}`,N(a))}deleteRelations(e,i){return this.http.delete(`/api/relations?entityId=${e.id}&entityType=${e.entityType}`,N(i))}getRelation(e,i,o,a){return this.http.get(`/api/relation?fromId=${e.id}&fromType=${e.entityType}&relationType=${i}&toId=${o.id}&toType=${o.entityType}`,N(a))}findByFrom(e,i){return this.http.get(`/api/relations?fromId=${e.id}&fromType=${e.entityType}`,N(i))}findInfoByFrom(e,i){return this.http.get(`/api/relations/info?fromId=${e.id}&fromType=${e.entityType}`,N(i))}findByFromAndType(e,i,o){return this.http.get(`/api/relations?fromId=${e.id}&fromType=${e.entityType}&relationType=${i}`,N(o))}findByTo(e,i){return this.http.get(`/api/relations?toId=${e.id}&toType=${e.entityType}`,N(i))}findInfoByTo(e,i){return this.http.get(`/api/relations/info?toId=${e.id}&toType=${e.entityType}`,N(i))}findByToAndType(e,i,o){return this.http.get(`/api/relations?toId=${e.id}&toType=${e.entityType}&relationType=${i}`,N(o))}findByQuery(e,i){return this.http.post("/api/relations",e,N(i))}findInfoByQuery(e,i){return this.http.post("/api/relations/info",e,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var Ov=Ld(j4());y();var GEt=50,zEt="instances",$Et="resources",UEt="observe",HEt="attribute",qEt="telemetry",WEt="keyName";var AH="localhost",OH=5685;var YEt=0,QEt=65535,PH="coap://",KEt=PH+AH+":"+OH,XEt=PH+AH+":"+OH,ZEt=1e4,JEt=81e3,eIt=1e4,Ac=function(n){return n.U="U",n.M="M",n.H="H",n.T="T",n.S="S",n.N="N",n.UQ="UQ",n.UQS="UQS",n.TQ="TQ",n.TQS="TQS",n.SQ="SQ",n}(Ac||{}),tIt=new Map([[Ac.U,"device-profile.lwm2m.binding-type.u"],[Ac.M,"device-profile.lwm2m.binding-type.m"],[Ac.H,"device-profile.lwm2m.binding-type.h"],[Ac.T,"device-profile.lwm2m.binding-type.t"],[Ac.S,"device-profile.lwm2m.binding-type.s"],[Ac.N,"device-profile.lwm2m.binding-type.n"],[Ac.UQ,"device-profile.lwm2m.binding-type.uq"],[Ac.UQS,"device-profile.lwm2m.binding-type.uqs"],[Ac.TQ,"device-profile.lwm2m.binding-type.tq"],[Ac.TQS,"device-profile.lwm2m.binding-type.tqs"],[Ac.SQ,"device-profile.lwm2m.binding-type.sq"]]),uh=function(n){return n.pmin="pmin",n.pmax="pmax",n.gt="gt",n.lt="lt",n.st="st",n}(uh||{}),iIt=new Map([[uh.pmin,"device-profile.lwm2m.attributes-name.min-period"],[uh.pmax,"device-profile.lwm2m.attributes-name.max-period"],[uh.gt,"device-profile.lwm2m.attributes-name.greater-than"],[uh.lt,"device-profile.lwm2m.attributes-name.less-than"],[uh.st,"device-profile.lwm2m.attributes-name.step"]]),SF=function(n){return n.LWM2M="LWM2M",n.BOOTSTRAP="BOOTSTRAP",n}(SF||{}),nIt=new Map([[SF.LWM2M,"device-profile.lwm2m.lwm2m-server"],[SF.BOOTSTRAP,"device-profile.lwm2m.bootstrap-server"]]),Hg=function(n){return n.PSM="PSM",n.DRX="DRX",n.E_DRX="E_DRX",n}(Hg||{}),rIt=new Map([[Hg.PSM,"device-profile.power-saving-mode-type.psm"],[Hg.DRX,"device-profile.power-saving-mode-type.drx"],[Hg.E_DRX,"device-profile.power-saving-mode-type.edrx"]]),I1=function(n){return n.V1_0="1.0",n.V1_1="1.1",n.V1_2="1.2",n}(I1||{}),oIt=new Map([[I1.V1_0,"device-profile.lwm2m.default-object-id-ver.v1-0"],[I1.V1_1,"device-profile.lwm2m.default-object-id-ver.v1-1"],[I1.V1_2,"device-profile.lwm2m.default-object-id-ver.v1-2"]]),k1=function(n){return n.SINGLE="SINGLE",n.COMPOSITE_ALL="COMPOSITE_ALL",n.COMPOSITE_BY_OBJECT="COMPOSITE_BY_OBJECT",n}(k1||{}),aIt=new Map([[k1.SINGLE,{name:"device-profile.lwm2m.observe-strategy.single",description:"device-profile.lwm2m.observe-strategy.single-description"}],[k1.COMPOSITE_ALL,{name:"device-profile.lwm2m.observe-strategy.composite-all",description:"device-profile.lwm2m.observe-strategy.composite-all-description"}],[k1.COMPOSITE_BY_OBJECT,{name:"device-profile.lwm2m.observe-strategy.composite-by-object",description:"device-profile.lwm2m.observe-strategy.composite-by-object-description"}]]);function RH(){return{observe:[],attribute:[],telemetry:[],keyName:{},attributeLwm2m:{},observeStrategy:k1.SINGLE}}function FH(){return{clientOnlyObserveAfterConnect:1,fwUpdateStrategy:1,swUpdateStrategy:1,powerMode:Hg.DRX,defaultObjectIDVer:I1.V1_0}}function sIt(n){let t=[ke.required];switch(n){case uh.pmin:case uh.pmax:t.push(ke.min(0),ke.pattern("[0-9]*"));break}return t}var hh=function(n){return n.DEFAULT="DEFAULT",n.SNMP="SNMP",n}(hh||{}),lr=function(n){return n.DEFAULT="DEFAULT",n.MQTT="MQTT",n.COAP="COAP",n.LWM2M="LWM2M",n.SNMP="SNMP",n}(lr||{}),EF=function(n){return n.HTTP="HTTP",n}(EF||{}),A1=function(n){return n.JSON="JSON",n.PROTOBUF="PROTOBUF",n}(A1||{}),FI=function(n){return n.DEFAULT="DEFAULT",n.EFENTO="EFENTO",n}(FI||{}),D1=function(n){return n.DISABLED="DISABLED",n.ALLOW_CREATE_NEW_DEVICES="ALLOW_CREATE_NEW_DEVICES",n.CHECK_PRE_PROVISIONED_DEVICES="CHECK_PRE_PROVISIONED_DEVICES",n.X509_CERTIFICATE_CHAIN="X509_CERTIFICATE_CHAIN",n}(D1||{}),mIt=new Map([[hh.DEFAULT,"device-profile.type-default"]]),uIt=new Map([[hh.DEFAULT,{hasProfileConfiguration:!1,hasDeviceConfiguration:!1}],[hh.SNMP,{hasProfileConfiguration:!0,hasDeviceConfiguration:!0}
123]]),hIt=new Map([[lr.DEFAULT,"device-profile.transport-type-default"],[lr.MQTT,"device-profile.transport-type-mqtt"],[lr.COAP,"device-profile.transport-type-coap"],[lr.LWM2M,"device-profile.transport-type-lwm2m"],[lr.SNMP,"device-profile.transport-type-snmp"],[EF.HTTP,"device-profile.transport-type-http"]]),fIt=new Map([[D1.DISABLED,"device-profile.provision-strategy-disabled"],[D1.ALLOW_CREATE_NEW_DEVICES,"device-profile.provision-strategy-created-new"],[D1.CHECK_PRE_PROVISIONED_DEVICES,"device-profile.provision-strategy-check-pre-provisioned"],[D1.X509_CERTIFICATE_CHAIN,"device-profile.provision-strategy-x509.certificate-chain"]]),gIt=new Map([[lr.DEFAULT,"device-profile.transport-type-default-hint"],[lr.MQTT,"device-profile.transport-type-mqtt-hint"],[lr.COAP,"device-profile.transport-type-coap-hint"],[lr.LWM2M,"device-profile.transport-type-lwm2m-hint"],[lr.SNMP,"device-profile.transport-type-snmp-hint"],[EF.HTTP,""]]),bIt=new Map([[A1.JSON,"device-profile.transport-device-payload-type-json"],[A1.PROTOBUF,"device-profile.transport-device-payload-type-proto"]]),_It=`syntax ="proto3";
124package telemetry;
125
126message SensorDataReading {
127
128  optional double temperature = 1;
129  optional double humidity = 2;
130  InnerObject innerObject = 3;
131
132  message InnerObject {
133    optional string key1 = 1;
134    optional bool key2 = 2;
135    optional double key3 = 3;
136    optional int32 key4 = 4;
137    optional string key5 = 5;
138  }
139}
140`,vIt=`syntax ="proto3";
141package attributes;
142
143message SensorConfiguration {
144  optional string firmwareVersion = 1;
145  optional string serialNumber = 2;
146}`,yIt=`syntax ="proto3";
147package rpc;
148
149message RpcRequestMsg {
150  optional string method = 1;
151  optional int32 requestId = 2;
152  optional string params = 3;
153}`,CIt=`syntax ="proto3";
154package rpc;
155
156message RpcResponseMsg {
157  optional string payload = 1;
158}`,wIt=new Map([[FI.DEFAULT,"device-profile.coap-device-type-default"],[FI.EFENTO,"device-profile.coap-device-type-efento"]]),xIt=new Map([[lr.DEFAULT,{hasProfileConfiguration:!1,hasDeviceConfiguration:!1}],[lr.MQTT,{hasProfileConfiguration:!0,hasDeviceConfiguration:!1}],[lr.LWM2M,{hasProfileConfiguration:!0,hasDeviceConfiguration:!0}],[lr.COAP,{hasProfileConfiguration:!0,hasDeviceConfiguration:!0}],[lr.SNMP,{hasProfileConfiguration:!0,hasDeviceConfiguration:!0}]]),Av=function(n){return n.TELEMETRY_QUERYING="TELEMETRY_QUERYING",n.CLIENT_ATTRIBUTES_QUERYING="CLIENT_ATTRIBUTES_QUERYING",n.SHARED_ATTRIBUTES_SETTING="SHARED_ATTRIBUTES_SETTING",n.TO_DEVICE_RPC_REQUEST="TO_DEVICE_RPC_REQUEST",n.TO_SERVER_RPC_REQUEST="TO_SERVER_RPC_REQUEST",n}(Av||{}),SIt=new Map([[Av.TELEMETRY_QUERYING," Telemetry (SNMP GET)"],[Av.CLIENT_ATTRIBUTES_QUERYING,"Client attributes (SNMP GET)"],[Av.SHARED_ATTRIBUTES_SETTING,"Shared attributes (SNMP SET)"],[Av.TO_DEVICE_RPC_REQUEST,"To-device RPC request (SNMP GET/SET)"],[Av.TO_SERVER_RPC_REQUEST,"From-device RPC request (SNMP TRAP)"]]),TIt=n=>{let t=null;if(n)switch(n){case hh.DEFAULT:t=Lt(re({},{}),{type:hh.DEFAULT});break}return t},EIt=n=>{let t=null;if(n)switch(n){case hh.DEFAULT:t=Lt(re({},{}),{type:hh.DEFAULT});break}return t},IIt=n=>{let t=null;if(n)switch(n){case lr.DEFAULT:t=Lt(re({},{}),{type:lr.DEFAULT});break;case lr.MQTT:let e={deviceTelemetryTopic:"v1/devices/me/telemetry",deviceAttributesTopic:"v1/devices/me/attributes",deviceAttributesSubscribeTopic:"v1/devices/me/attributes",sparkplug:!1,sparkplugAttributesMetricNames:["Node Control/*","Device Control/*","Properties/*"],sendAckOnValidationException:!1,transportPayloadTypeConfiguration:{transportPayloadType:A1.JSON,enableCompatibilityWithJsonPayloadFormat:!1,useJsonPayloadFormatForDefaultDownlinkTopics:!1}};t=Lt(re({},e),{type:lr.MQTT});break;case lr.COAP:let i={coapDeviceTypeConfiguration:{coapDeviceType:FI.DEFAULT,transportPayloadTypeConfiguration:{transportPayloadType:A1.JSON}},clientSettings:{powerMode:Hg.DRX}};t=Lt(re({},i),{type:lr.COAP});break;case lr.LWM2M:let o={observeAttr:RH(),bootstrap:[],clientLwM2mSettings:FH()};t=Lt(re({},o),{type:lr.LWM2M});break;case lr.SNMP:t=Lt(re({},{timeoutMs:500,retries:0,communicationConfigs:null}),{type:lr.SNMP});break}return t},kIt=n=>{let t=null;if(n)switch(n){case lr.DEFAULT:t=Lt(re({},{}),{type:lr.DEFAULT});break;case lr.MQTT:t=Lt(re({},{}),{type:lr.MQTT});break;case lr.COAP:t=Lt(re({},{powerMode:null}),{type:lr.COAP});break;case lr.LWM2M:t=Lt(re({},{powerMode:null}),{type:lr.LWM2M});break;case lr.SNMP:let a={host:"localhost",port:161,protocolVersion:LH.V2C,c
158ommunity:"public"};t=Lt(re({},a),{type:lr.SNMP});break}return t},PI=function(n){return n.SIMPLE="SIMPLE",n.DURATION="DURATION",n.REPEATING="REPEATING",n}(PI||{}),DIt=new Map([[PI.SIMPLE,"device-profile.condition-type-simple"],[PI.DURATION,"device-profile.condition-type-duration"],[PI.REPEATING,"device-profile.condition-type-repeating"]]),RI=function(n){return n.ANY_TIME="ANY_TIME",n.SPECIFIC_TIME="SPECIFIC_TIME",n.CUSTOM="CUSTOM",n}(RI||{}),MIt=new Map([[RI.ANY_TIME,"device-profile.schedule-any-time"],[RI.SPECIFIC_TIME,"device-profile.schedule-specific-time"],[RI.CUSTOM,"device-profile.schedule-custom"]]),TF=n=>!(!n||!n.condition||!n.condition.condition||!n.condition.condition.length),AIt=n=>{let t=n.value;return TF(t)?null:{alarmRule:!0}},OIt=n=>{let t=n.value;if(t&&t.id&&t.alarmType&&t.createRules){let r=Object.keys(t.createRules);if(r.length){let e=!0;for(let i of r){let o=t.createRules[i];if(!TF(o)){e=!1;break}}if(e&&t.clearRule&&!TF(t.clearRule)&&(e=!1),e)return null}}return{deviceProfileAlarm:!0}},LH=function(n){return n.V1="V1",n.V2C="V2C",n.V3="V3",n}(LH||{}),qg=function(n){return n.SHA_1="SHA_1",n.SHA_224="SHA_224",n.SHA_256="SHA_256",n.SHA_384="SHA_384",n.SHA_512="SHA_512",n.MD5="MD5",n}(qg||{}),PIt=new Map([[qg.SHA_1,"SHA-1"],[qg.SHA_224,"SHA-224"],[qg.SHA_256,"SHA-256"],[qg.SHA_384,"SHA-384"],[qg.SHA_512,"SHA-512"],[qg.MD5,"MD5"]]),M1=function(n){return n.DES="DES",n.AES_128="AES_128",n.AES_192="AES_192",n.AES_256="AES_256",n}(M1||{}),RIt=new Map([[M1.DES,"DES"],[M1.AES_128,"AES-128"],[M1.AES_192,"AES-192"],[M1.AES_256,"AES-256"]]),NH=class{constructor(t,r){this.pageLink=t,this.deviceInfoFilter=r}toQuery(){let t;return this.deviceInfoFilter.customerId?t=`/customer/${this.deviceInfoFilter.customerId.id}/deviceInfos`:t="/deviceInfos/all",t+=this.pageLink.toQuery(),De(this.deviceInfoFilter.includeCustomers)&&(t+=`&includeCustomers=${this.deviceInfoFilter.includeCustomers}`),this.deviceInfoFilter.deviceProfileId&&(t+=`&deviceProfileId=${this.deviceInfoFilter.deviceProfileId.id}`),De(this.deviceInfoFilter.active)&&(t+=`&active=${this.deviceInfoFilter.active}`),t}},Ia=function(n){return n.ACCESS_TOKEN="ACCESS_TOKEN",n.X509_CERTIFICATE="X509_CERTIFICATE",n.MQTT_BASIC="MQTT_BASIC",n.LWM2M_CREDENTIALS="LWM2M_CREDENTIALS",n}(Ia||{}),FIt=new Map([[Ia.ACCESS_TOKEN,"Access token"],[Ia.X509_CERTIFICATE,"X.509"],[Ia.M
158QTT_BASIC,"MQTT Basic"],[Ia.LWM2M_CREDENTIALS,"LwM2M Credentials"]]),NIt=new Map([[lr.DEFAULT,[Ia.ACCESS_TOKEN,Ia.X509_CERTIFICATE,Ia.MQTT_BASIC]],[lr.MQTT,[Ia.ACCESS_TOKEN,Ia.X509_CERTIFICATE,Ia.MQTT_BASIC]],[lr.COAP,[Ia.ACCESS_TOKEN,Ia.X509_CERTIFICATE]],[lr.LWM2M,[Ia.LWM2M_CREDENTIALS]],[lr.SNMP,[Ia.ACCESS_TOKEN]]]),VIt=()=>({clientId:"",userName:"",password:""}),Nue=function(n){return n.SUCCESS="SUCCESS",n.FAILURE="FAILURE",n.CLAIMED="CLAIMED",n}(Nue||{}),LIt=new Array("device-profile.schedule-day.monday","device-profile.schedule-day.tuesday","device-profile.schedule-day.wednesday","device-profile.schedule-day.thursday","device-profile.schedule-day.friday","device-profile.schedule-day.saturday","device-profile.schedule-day.sunday"),BIt=n=>typeof n=="number"||n===null?0:Ov.default.utc([1970,0,1,n.getHours(),n.getMinutes(),n.getSeconds(),0]).valueOf(),jIt=(n=0)=>new Date(n+new Date(n).getTimezoneOffset()*60*1e3),VH=n=>typeof n=="number"||n===null?(0,Ov.default)([1970,0,1,0,0,0,0]):(0,Ov.default)([1970,0,1,n.getHours(),n.getMinutes(),0,0]),GIt=(n,t)=>{let r=VH(n),e=VH(t);return r<e?`<span><span class="nowrap">${r.format("hh:mm A")}</span> \u2013 <span class="nowrap">${e.format("hh:mm A")}</span></span>`:r.valueOf()===0&&e.valueOf()===0||r.isSame((0,Ov.default)([1970,0]))&&e.isSame((0,Ov.default)([1970,0]))?'<span><span class="nowrap">12:00 AM</span> \u2013 <span class="nowrap">12:00 PM</span></span>':`<span><span class="nowrap">12:00 AM</span> \u2013 <span class="nowrap">${e.format("hh:mm A")}</span> and <span class="nowrap">${r.format("hh:mm A")}</span> \u2013 <span class="nowrap">12:00 PM</span></span>`};y();var NI=(()=>{let t=class t{constructor(e){this.http=e}getConverters(e,i){return this.getConvertersByEdgeTemplate(e,!1,null,i)}getConvertersByEdgeTemplate(e,i,o,a){let s=`/api/converters${e.toQuery()}`;return i&&(s+=`&isEdgeTemplate=${i}`),o&&(s+=`&integrationType=${o}`),this.http.get(s,N(a))}getConvertersByIds(e,i){return this.http.get(`/api/converters?converterIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getConverter(e,i){return this.http.get(`/api/converter/${e}`,N(i))}saveConverter(e,i){return this.http.post("/api/converter",e,N(i))}deleteConverter(e,i){return this.http.delete(`/api/converter/${e}`,N(i))}testUpLink(e,i,o){let a="/api/converter/testUpLink";return i&&(a+=`?scriptLang=${i}`),this.http.post(a,e,N(o))}testDownLink(e,i,o){let a="/api/converter/testDownLink";return i&&(a+=`?scriptLang=${i}`),this.http.post(a,e,N(o))}getLatestConverterDebugInput(e,i,o){let a=`/api/converter/${e}/debugIn`;if(i){let s=new Yy;i.converterType&&(s=s.set("converterType",i.converterType)),i.integrationType&&(s=s.set("integrationType",i.integrationType)),i.integrationName&&(s=s.set("integrationName",i.integrationName)),i.converterVersion&&(s=s.set("converterVersion",i.converterVersion)),s.toString()&&(a+=`?${s.toString()}`)}return this.http.get(a,N(o))}unwrapRawPayload(e,i,o){return this.http.post(`/api/converter/unwrap/${e}`,i,N(o))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var jH=(()=>{let t=class t{constructor(e){this.http=e}getIntegrations(e,i){return this.getIntegrationsByEdgeTemplate(e,!1,i)}getIntegrationsConvertersInfo(e){return this.http.get("/api/integrations/converters/info",N(e))}getIntegrationsConvertersInfoCached(e){return this.integrationsConvertersInfo$||(this.integrationsConvertersInfo$=this.http.get("/api/integrations/converters/info",N(e)).pipe(Cs({bufferSize:1,refCount:!0})),ls(36e5).subscribe(()=>this.integrationsConvertersInfo$=null)),this.integrationsConvertersInfo$}getIntegrationsInfo(e,i,o){return this.http.get(`/api/integrationInfos${e.toQuery()}&isEdgeTemplate=${i}`,N(o))}getIntegrationsByEdgeTemplate(e,i,o){return this.http.get(`/api/integrations${e.toQuery()}&isEdgeTemplate=${i}`,N(o))}getIntegrationsByIds(e,i){return this.http.get(`/api/integrations?integrationIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getIntegration(e,i){return this.http.get(`/api/integration/${e}`,N(i))}saveIntegration(e,i){return this.http.post("/api/integration",e,N(i))}deleteIntegration(e,i){return this.http.delete(`/api/integration/${e}`,N(i))}getIntegrationHttpEndpointLink(e,i,o){let a=e.baseUrl,s=i?i.toLowerCase():"";return a+=`/api/v1/integrations/${s}/${o||""}`,a}checkIntegrationConnection(e,i){return this.http.post("/api/integration/check",e,N(i))}assignIntegrationToEdge(e,i,o){return this.http.post(`/api/edge/${e}/integration/${i}`,N(o))}unassignIntegrationFromEdge(e,i,o){return this.http.delete(`/api/edge/${e}/integration/${i}`,N(o))}getEdgeIntegrations(e,i,o){return this.http.get(`/api/edge/${e}/integrations${i.toQuery()}`,N(o))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var GH=(()=>{let t=class t{constructor(e){this.http=e}getSchedulerEvents(e="",i){let o="/api/schedulerEvents";return De(e)&&e!==""&&(o+=`?type=${e}`),this.http.get(o,N(i))}getSchedulerEventsByPageLink(e,i,o,a){return this.http.get(`/api/schedulerEvents${i.toQuery()}${e?`&type=${e}`:""}${o?`&edgeId=${o}`:""}`,N(a))}getCalendarSchedulerEvents(e,i,o,a,s,c){return this.http.get(`/api/schedulerEvents?startTime=${i}&endTime=${o}${e?`&type=${e}`:""}${a?`&textSearch=${a}`:""}${s?`&edgeId=${s}`:""}`,N(c))}getSchedulerEventsByIds(e,i){return this.http.get(`/api/schedulerEvents?schedulerEventIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getSchedulerEventInfo(e,i){return this.http.get(`/api/schedulerEvent/info/${e}`,N(i))}getSchedulerEvent(e,i){return this.http.get(`/api/schedulerEvent/${e}`,N(i))}saveSchedulerEvent(e,i){return this.http.post("/api/schedulerEvent",e,N(i))}deleteSchedulerEvent(e,i){return this.http.delete(`/api/schedulerEvent/${e}`,N(i))}getEdgeSchedulerEvents(e,i){return this.http.get(`/api/edge/${e}/allSchedulerEvents`,N(i))}assignSchedulerEventToEdge(e,i,o){return this.http.post(`/api/edge/${e}/schedulerEvent/${i}`,N(o))}unassignSchedulerEventFromEdge(e,i,o){return this.http.delete(`/api/edge/${e}/schedulerEvent/${i}`,N(o))}updateSchedulerStatus(e,i,o){return this.http.put(`/api/schedulerEvent/${e}/enabled/${i}`,N(o))}getScheduledReports(e,i){return this.http.get(`/api/scheduledReports${e.toQuery()}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var zH=(()=>{let t=class t{constructor(e,i,o){this.window=e,this.document=i,this.http=o}getBlobEntityInfo(e,i){return this.http.get(`/api/blobEntity/info/${e}`,N(i))}getBlobEntities(e,i="",o){let a=`/api/blobEntities${e.toQuery()}`;return De(i)&&(a+=`&type=${i}`),this.http.get(a,N(o))}getBlobEntitiesByIds(e,i){return this.http.get(`/api/blobEntities?blobEntityIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}deleteBlobEntity(e,i){return this.http.delete(`/api/blobEntity/${e}`,N(i))}downloadBlobEntity(e){return this.http.get(`/api/blobEntity/${e}/download`,{responseType:"arraybuffer",observe:"response"}).pipe(W(i=>{let o=i.headers,a=o.get("x-filename"),s=o.get("content-type"),c=this.document.createElement("a");try{let u=new Blob([i.body],{type:s}),f=URL.createObjectURL(u);c.setAttribute("href",f),c.setAttribute("download",a);let _=new MouseEvent("click",{view:this.window,bubbles:!0,cancelable:!1});return c.dispatchEvent(_),null}catch(u){throw u}}))}};t.\u0275fac=function(i){return new(i||t)(X(Wr),X(Qi),X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var Pv=(()=>{let t=class t{constructor(e){this.http=e}getRoles(e,i,o){let a=`/api/roles${e.toQuery()}`;return i&&(a+=`&type=${i}`),this.http.get(a,N(o))}getRolesByIds(e,i){return this.http.get(`/api/roles?roleIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getRole(e,i){return this.http.get(`/api/role/${e}`,N(i))}saveRole(e,i){return this.http.post("/api/role",e,N(i))}deleteRole(e,i){return this.http.delete(`/api/role/${e}`,N(i))}saveGroupPermission(e,i){return this.http.post("/api/groupPermission",e,N(i))}deleteGroupPermissions(e,i){let o=e.map(a=>this.deleteGroupPermission(a,i));return Rn(o)}deleteGroupPermission(e,i){return this.http.delete(`/api/groupPermission/${e}`,N(i))}getUserGroupPermissions(e,i){return this.http.get(`/api/userGroup/${e}/groupPermissions`,N(i))}getEntityGroupPermissions(e,i){return this.http.get(`/api/entityGroup/${e}/groupPermissions`,N(i))}getGroupPermissionInfo(e,i,o){return this.http.get(`/api/groupPermission/info/${e}?isUserGroup=${i}`,N(o))}loadUserGroupPermissionInfos(e,i){return this.http.post("/api/userGroup/groupPermissions/info",e,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();
158var Ci=function(n){return n.MQTT="MQTT",n.HTTP="HTTP",n.TTN="TTN",n.AWS_IOT="AWS_IOT",n.TCP="TCP",n.SIGFOX="SIGFOX",n.TTI="TTI",n.CHIRPSTACK="CHIRPSTACK",n.PARTICLE="PARTICLE",n.KPN="KPN",n.AZURE_EVENT_HUB="AZURE_EVENT_HUB",n.AZURE_SERVICE_BUS="AZURE_SERVICE_BUS",n.COAP="COAP",n.OPC_UA="OPC_UA",n.APACHE_PULSAR="APACHE_PULSAR",n.AWS_KINESIS="AWS_KINESIS",n.AWS_SQS="AWS_SQS",n.AZURE_IOT_HUB="AZURE_IOT_HUB",n.CUSTOM="CUSTOM",n.KAFKA="KAFKA",n.LORIOT="LORIOT",n.OCEANCONNECT="OCEANCONNECT",n.PUB_SUB="PUB_SUB",n.RABBITMQ="RABBITMQ",n.THINGPARK="THINGPARK",n.TMOBILE_IOT_CDP="TMOBILE_IOT_CDP",n.TPE="TPE",n.UDP="UDP",n.TUYA="TUYA",n}(Ci||{}),LI=function(n){return n.NO_SECURE="NO_SECURE",n.DTLS="DTLS",n.MIXED="MIXED",n}(LI||{}),vkt=new Map([[LI.NO_SECURE,"integration.coap-security-mode-no-secure"],[LI.DTLS,"integration.coap-security-mode-dtls"],[LI.MIXED,"integration.coap-security-mode-mixed"]]),ykt=new Map([[Ci.HTTP,{name:"integration.type-http",description:"integration.type-http-description",icon:"assets/integration-icon/http.svg"}],[Ci.OCEANCONNECT,{name:"integration.type-ocean-connect",description:"integration.type-ocean-connect-description",icon:"assets/integration-icon/ocean-connect.svg",hideDownlink:!0}],[Ci.SIGFOX,{name:"integration.type-sigfox",description:"integration.type-sigfox-description",icon:"assets/integration-icon/sigfox.svg"}],[Ci.THINGPARK,{name:"integration.type-thingpark",description:"integration.type-thingpark-description",icon:"assets/integration-icon/thingpark.svg"}],[Ci.TPE,{name:"integration.type-thingpark-enterprise",description:"integration.type-thingpark-enterprise-description",icon:"assets/integration-icon/thingpark-enterprise.svg"}],[Ci.TMOBILE_IOT_CDP,{name:"integration.type-tmobile-iot-cdp",description:"integration.type-tmobile-iot-cdp-description",icon:"assets/integration-icon/iotcreators.com.svg",hideDownlink:!0}],[Ci.LORIOT,{name:"integration.type-loriot",description:"integration.type-loriot-description",icon:"assets/integration-icon/loriot.svg"}],[Ci.MQTT,{name:"integration.type-mqtt",description:"integration.type-mqtt-description",icon:"assets/integration-icon/mqtt.svg",checkConnection:!0}],[Ci.AWS_IOT,{name:"integration.type-aws-iot",description:"integration.type-aws-iot-description",icon:"assets/integration-icon/aws-iot.svg"}],[Ci.AWS_SQS,{name:"integration.type-aws-sqs",description:"integration.type-aws-sqs-description",icon:"assets/integration-icon/aws-sqs.svg",hideDownlink:!0}],[Ci.AWS_KINESIS,{name:"integration.type-aws-kinesis",description:"integration.type-aws-kinesis-description",icon:"assets/integration-icon/aws-kinesis.svg"}],[Ci.TTN,{name:"integration.type-ttn",description:"integration.type-ttn-description",icon:"assets/integration-icon/ttn.svg",checkConnection:!0}],[Ci.TTI,{name:"integration.type-tti",description:"integration.type-tti-description",icon:"assets/integration-icon/things-stack-industries.svg",checkConnection:!0}],[Ci.CHIRPSTACK,{name:"integration.type-chirpstack",description:"integration.type-chirpstack-description",icon:"assets/integration-icon/chirpstack.svg"}],[Ci.PARTICLE,{name:"integration.type-particle",description:"integration.type-particle-description",icon:"assets/integration-icon/particle.svg"}],[Ci.KPN,{name:"integration.type-kpn",description:"integration.type-kpn-description",icon:"assets/integration-icon/kpn.svg"}],[Ci.AZURE_EVENT_HUB,{name:"integration.type-azure-event-hub",description:"integration.type-azure-event-hub-description",icon:"assets/integration-icon/azure-event-hub.svg",checkConnection:!0}],[Ci.AZURE_SERVICE_BUS,{name:"integration.type-azure-service-bus",description:"integration.type-azure-service-bus-description",icon:"assets/integration-icon/azure-service-bus.svg",checkConnection:!0}],[Ci.AZURE_IOT_HUB,{name:"integration.type-azure-iot-hub",description:"integration.type-azure-iot-hub-description",icon:"assets/integration-icon/azure-iot-hub.svg"}],[Ci.OPC_UA,{name:"integration.type-opc-ua",description:"integration.type-opc-ua-description",icon:"assets/integration-icon/opc-ua.svg"}],[Ci.UDP,{name:"integration.type-udp",description:"integration.type-udp-description",icon:"assets/integration-icon/udp.svg",remote:!0}],[Ci.TCP,{name:"integration.type-tcp",description:"integration.type-tcp-description",icon:"assets/integration-icon/tcp.svg",remote:!0}],[Ci.KAFKA,{name:"integration.type-kafka",description:"integration.type-kafka-description",icon:"assets/integration-icon/kafka.svg",hideDownlink:!0}],[Ci.RABBITMQ,{name:"integration.type-rabbitmq",description:"integration.type-rabbitmq-description",icon:"assets/integration-icon/rabbitmq.svg",checkConnection:!0}
158],[Ci.APACHE_PULSAR,{name:"integration.type-apache-pulsar",description:"integration.type-apache-pulsar-description",icon:"assets/integration-icon/apache-pulsar.svg",hideDownlink:!0}],[Ci.PUB_SUB,{name:"integration.type-pubsub",description:"integration.type-pubsub-description",icon:"assets/integration-icon/pub-sub.svg",hideDownlink:!0}],[Ci.COAP,{name:"integration.type-coap",description:"integration.type-coap-description",icon:"assets/integration-icon/coap.svg",hideDownlink:!0}],[Ci.TUYA,{name:"integration.type-tuya",description:"integration.type-tuya-description",icon:"assets/integration-icon/tuya.svg"}],[Ci.CUSTOM,{name:"integration.type-custom",description:"",icon:"assets/integration-icon/custom.svg",remote:!0}]]),$H=new Map([[Ci.HTTP,"integrationHttp"],[Ci.OCEANCONNECT,"integrationOceanConnect"],[Ci.SIGFOX,"integrationSigFox"],[Ci.THINGPARK,"integrationThingPark"],[Ci.TPE,"integrationThingParkEnterprise"],[Ci.TMOBILE_IOT_CDP,"integrationTMobileIotCdp"],[Ci.LORIOT,"integrationLoriot"],[Ci.MQTT,"integrationMqtt"],[Ci.AWS_IOT,"integrationAwsIoT"],[Ci.AWS_SQS,"integrationAwsSQS"],[Ci.AWS_KINESIS,"integrationAwsKinesis"],[Ci.TTN,"integrationTheThingsNetwork"],[Ci.TTI,"integrationTheThingsIndustries"],[Ci.CHIRPSTACK,"integrationChirpStack"],[Ci.PARTICLE,"integrationParticle"],[Ci.KPN,"integrationKpn"],[Ci.AZURE_EVENT_HUB,"integrationAzureEventHub"],[Ci.AZURE_IOT_HUB,"integrationAzureIoTHub"],[Ci.AZURE_SERVICE_BUS,"integrationAzureServiceBus"],[Ci.OPC_UA,"integrationOpcUa"],[Ci.UDP,"integrationUdp"],[Ci.TCP,"integrationTcp"],[Ci.KAFKA,"integrationKafka"],[Ci.RABBITMQ,"integrationRabbitmq"],[Ci.APACHE_PULSAR,"integrationApachePulsar"],[Ci.PUB_SUB,"integrationPubsub"],[Ci.COAP,"integrationCoAP"],[Ci.TUYA,"integrationTuya"],[Ci.CUSTOM,"integrationCustom"]]);function Ckt(n){return n&&n.type&&$H.has(n.type)?$H.get(n.type):"integrations"}var zI=function(n){return n.CORE="CORE",n.EDGE="EDGE",n}(zI||{});function wkt(n){let t=re({},n.params),r=re({},n.data),e;r.backNavigationCommands&&(e=r.backNavigationCommands);let i,o;return t?.hierarchyView?(i=t.edgeId,o=t.integrationScope):(i=t?.edgeId,o=r.integrationsType?r.integrationsType:"tenant"),{edgeId:i,integrationScope:o,hierarchyView:t?.hierarchyView,entityGroupId:t?.entityGroupId,childEntityGroupId:t?.childEntityGroupId,customerId:t?.customerId,backNavigationCommands:e}}var BI=function(n){return n[n.AT_MOST_ONE=0]="AT_MOST_ONE",n[n.AT_LEAST_ONCE=1]="AT_LEAST_ONCE",n[n.EXACTLY_ONCE=2]="EXACTLY_ONCE",n}(BI||{}),xkt=new Map([[BI.AT_MOST_ONE,"integration.mqtt-qos-at-most-once"],[BI.AT_LEAST_ONCE,"integration.mqtt-qos-at-least-once"],[BI.EXACTLY_ONCE,"integration.mqtt-qos-exactly-once"]]),jue=function(n){return n.LITTLE_ENDIAN="LITTLE_ENDIAN",n.BIG_ENDIAN="BIG_ENDIAN",n}(jue||{}),jI=function(n){return n.SYSTEM_LINE_SEPARATOR="SYSTEM_LINE_SEPARATOR",n.NUL_DELIMITER="NUL_DELIMITER",n.CUSTOM_SEPARATOR="CUSTOM_SEPARATOR",n}(jI||{}),Skt=new Map([[jI.SYSTEM_LINE_SEPARATOR,"integration.tcp.system-line-separator"],[jI.NUL_DELIMITER,"integration.tcp.nul-delimiter"],[jI.CUSTOM_SEPARATOR,"integration.tcp.custom-separator"]]),Rv=function(n){return n.Anonymous="anonymous",n.Basic="basic",n.CertPEM="cert.PEM",n.Token="token",n.SAS="sas",n}(Rv||{}),Tkt=new Map([[Rv.Anonymous,"extension.anonymous"],[Rv.Basic,"extension.basic"],[Rv.CertPEM,"extension.pem"],[Rv.Token,"extension.token"],[Rv.SAS,"extension.sas"]]),UH=function(n){return n.TEXT="TEXT",n.BINARY="BINARY",n.JSON="JSON",n}(UH||{}),HH=function(n){return n.HEX="HEX",n}(HH||{}),VI=re(re({},UH),HH),Ekt=new Map([[VI.TEXT,"extension.text"],[VI.BINARY,"extension.binary"],[VI.JSON,"extension.json"],[VI.HEX,"extension.hex"]]),kF=function(n){return n.Anonymous="anonymous",n.Username="username",n}(kF||{}),Ikt=new Map([[kF.Anonymous,"extension.anonymous"],[kF.Username,"extension.username"]]),Gue=function(n){return n.Basic128Rsa15="Basic128Rsa15",n.Basic256="Basic256",n.Basic256Sha256="Basic256Sha256",n.None="None",n}(Gue||{}),zue=function(n){return n.PKCS12="PKCS12",n.JKS="JKS",n}(zue||{}),DF=function(n){return n.ID="ID",n.FQN="FQN",n}(DF||{}),kkt=new Map([[DF.ID,"ID"],[DF.FQN,"Fully Qualified Name"]]),GI=function(n){return n.LATEST="LATEST",n.TRIM_HORIZON="TRIM_HORIZON",n.AT_TIMESTAMP="AT_TIMESTAMP",n}(GI||{}),Dkt=new Map([[GI.LATEST,"Latest"],[GI.TRIM_HORIZON,"Trim horizon"],[GI.AT_TIMESTAMP,"At timestamp"]]),O1=function(n){return n.CN="CN",n.US="US",n.EU="EU",n.IN="IN",n}(O1||{}),$ue=function(n){return n.PROD="PROD",n.TEST="TEST",n}($ue||{}),Mkt=new Map([[O1.CN,"integration.region-cn"],[O1.US,"integration.region-us"],[O1.EU,"integration.region-eu"],[O1.IN,"integration.region-in"]]);y();var $I=(()=>{let t=class t{constructor(e){this.http=e}getEdges(e,i){return this.http.get(`/api/edges?edgeIds=${e.join(",")}`,N(i))}getEdge(e,i){return this.http.get(`/api/edge/${e}`,N(i))}getEdgeInfo(e,i){return this.http.get(`/api/edge/info/${e}`,N(i))}saveEdge(e,i,o){let a="/api/edge";return i&&(Array.isArray(i)?a+=`?entityGroupIds=${i.join(",")}`:a+=`?entityGroupId=${i}`),this.http.post(a,e,N(o))}deleteEdge(e,i){return this.http.delete(`/api/edge/${e}`,N(i))}getEdgeTypes(e){return this.http.get("/api/edge/types",N(e))}assignEdgeToCustomer(e,i,o){return this.http.post(`/api/customer/${e}/edge/${i}`,N(o))}unassignEdgeFromCustomer(e,i){return this.http.delete(`/api/customer/edge/${e}`,N(i))}makeEdgePublic(e,i){return this.http.post(`/api/customer/public/edge/${e}`,null,N(i))}getTenantEdges(e,i="",o){return this.http.get(`/api/tenant/edges${e.toQuery()}&type=${i}`,N(o))}getTenantEdgeInfos(e,i="",o){return this.http.get(`/api/tenant/edgeInfos${e.toQuery()}&type=${i}`,N(o))}getUserEdges(e,i="",o){return this.http.get(`/api/user/edges${e.toQuery()}&type=${i}`,N(o))}getAllEdgeInfos(e,i,o="",a){let s=`/api/edgeInfos/all${i.toQuery()}&type=${o}`;return e&&(s+="&includeCustomers=true"),this.http.get(s,N(a))}getCustomerEdgeInfos(e,i,o,a="",s){let c=`/api/customer/${i}/edgeInfos${o.toQuery()}&type=${a}`;return e&&(c+="&includeCustomers=true"),this.http.get(c,N(s))}findByQuery(e,i){return this.http.post("/api/edges",e,N(i))}getEdgeEvents(e,i,o){return this.http.get(`/api/edge/${e.id}/events${i.toQuery()}`,N(o))}syncEdge(e,i){return this.http.post(`/api/edge/sync/${e}`,e,N(i))}
158findMissingToRelatedRuleChains(e,i){return this.http.get(`/api/edge/missingToRelatedRuleChains/${e}`,N(i))}findByName(e,i){return this.http.get(`/api/tenant/edges?edgeName=${e}`,N(i))}bulkImportEdges(e,i){return this.http.post("/api/edge/bulk_import",e,N(i))}getEdgeInstallInstructions(e,i="ubuntu",o){return this.http.get(`/api/edge/instructions/install/${e}/${i}`,N(o))}getEdgeUpgradeInstructions(e,i="ubuntu",o){return this.http.get(`/api/edge/instructions/upgrade/${e}/${i}`,N(o))}findAllRelatedEdgesMissingAttributes(e,i){let o=`/api/edge/integration/${e}/allMissingAttributes`;return this.http.get(o,N(i))}findEdgeMissingAttributes(e,i,o){let a=`/api/edge/integration/${i}/missingAttributes?integrationIds=${e.join(",")}`;return this.http.get(a,N(o))}isEdgeUpgradeAvailable(e,i){return this.http.get(`/api/edge/${e}/upgrade/available`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var yn=function(n){return n.DASHBOARD="DASHBOARD",n.ASSET="ASSET",n.DEVICE="DEVICE",n.DEVICE_PROFILE="DEVICE_PROFILE",n.ASSET_PROFILE="ASSET_PROFILE",n.ENTITY_VIEW="ENTITY_VIEW",n.ALARM="ALARM",n.RULE_CHAIN="RULE_CHAIN",n.RULE_CHAIN_METADATA="RULE_CHAIN_METADATA",n.EDGE="EDGE",n.USER="USER",n.CUSTOMER="CUSTOMER",n.RELATION="RELATION",n.TENANT="TENANT",n.TENANT_PROFILE="TENANT_PROFILE",n.WIDGETS_BUNDLE="WIDGETS_BUNDLE",n.WIDGET_TYPE="WIDGET_TYPE",n.ADMIN_SETTINGS="ADMIN_SETTINGS",n.OTA_PACKAGE="OTA_PACKAGE",n.QUEUE="QUEUE",n.ENTITY_GROUP="ENTITY_GROUP",n.SCHEDULER_EVENT="SCHEDULER_EVENT",n.WHITE_LABELING="WHITE_LABELING",n.LOGIN_WHITE_LABELING="LOGIN_WHITE_LABELING",n.CUSTOM_TRANSLATION="CUSTOM_TRANSLATION",n.ROLE="ROLE",n.GROUP_PERMISSION="GROUP_PERMISSION",n.INTEGRATION="INTEGRATION",n.CONVERTER="CONVERTER",n}(yn||{}),ho=function(n){return n.ADDED="ADDED",n.DELETED="DELETED",n.UPDATED="UPDATED",n.POST_ATTRIBUTES="POST_ATTRIBUTES",n.ATTRIBUTES_UPDATED="ATTRIBUTES_UPDATED",n.ATTRIBUTES_DELETED="ATTRIBUTES_DELETED",n.TIMESERIES_UPDATED="TIMESERIES_UPDATED",n.CREDENTIALS_UPDATED="CREDENTIALS_UPDATED",n.RELATION_ADD_OR_UPDATE="RELATION_ADD_OR_UPDATE",n.RELATION_DELETED="RELATION_DELETED",n.RPC_CALL="RPC_CALL",n.ALARM_ACK="ALARM_ACK",n.ALARM_CLEAR="ALARM_CLEAR",n.ALARM_ASSIGNED="ALARM_ASSIGNED",n.ALARM_UNASSIGNED="ALARM_UNASSIGNED",n.ASSIGNED_TO_EDGE="ASSIGNED_TO_EDGE",n.UNASSIGNED_FROM_EDGE="UNASSIGNED_FROM_EDGE",n.CREDENTIALS_REQUEST="CREDENTIALS_REQUEST",n.ENTITY_MERGE_REQUEST="ENTITY_MERGE_REQUEST",n.ADDED_TO_ENTITY_GROUP="ADDED_TO_ENTITY_GROUP",n.REMOVED_FROM_ENTITY_GROUP="REMOVED_FROM_ENTITY_GROUP",n.CHANGE_OWNER="CHANGE_OWNER",n}(ho||{}),MF=function(n){return n.DEPLOYED="DEPLOYED",n.PENDING="PENDING",n}(MF||{}),Vkt=new Map([[yn.DASHBOARD,"edge-event.type-dashboard"],[yn.ASSET,"edge-event.type-asset"],[yn.DEVICE,"edge-event.type-device"],[yn.DEVICE_PROFILE,"edge-event.type-device-profile"],[yn.ASSET_PROFILE,"edge-event.type-asset-profile"],[yn.ENTITY_VIEW,"edge-event.type-entity-view"],[yn.ALARM,"edge-event.type-alarm"],[yn.RULE_CHAIN,"edge-event.type-rule-chain"],[yn.RULE_CHAIN_METADATA,"edge-event.type-rule-chain-metadata"],[yn.EDGE,"edge-event.type-edge"],[yn.USER,"edge-event.type-user"],[yn.CUSTOMER,"edge-event.type-customer"],[yn.RELATION,"edge-event.type-relation"],[yn.TENANT,"edge-event.type-tenant"],[yn.TENANT_PROFILE,"edge-event.type-tenant-profile"],[yn.WIDGETS_BUNDLE,"edge-event.type-widgets-bundle"],[yn.WIDGET_TYPE,"edge-event.type-widgets-type"],[yn.ADMIN_SETTINGS,"edge-event.type-admin-settings"],[yn.OTA_PACKAGE,"edge-event.type-ota-package"],[yn.QUEUE,"edge-event.type-queue"],[yn.ENTITY_GROUP,"edge-event.type-entity-group"],[yn.SCHEDULER_EVENT,"edge-event.type-scheduler-event"],[yn.WHITE_LABELING,"edge-event.type-white-labeling"],[yn.LOGIN_WHITE_LABELING,"edge-event.type-login-white-labeling"],[yn.CUSTOM_TRANSLATION,"edge-event.type-custom-translation"],[yn.ROLE,"edge-event.type-role"],[yn.GROUP_PERMISSION,"edge-event.type-group-permission"],[yn.INTEGRATION,"edge-event.type-integration"],[yn.CONVERTER,"edge-event.type-converter"]]),Lkt=new Map([[ho.ADDED,"edge-event.action-type-a
158dded"],[ho.DELETED,"edge-event.action-type-deleted"],[ho.UPDATED,"edge-event.action-type-updated"],[ho.POST_ATTRIBUTES,"edge-event.action-type-post-attributes"],[ho.ATTRIBUTES_UPDATED,"edge-event.action-type-attributes-updated"],[ho.ATTRIBUTES_DELETED,"edge-event.action-type-attributes-deleted"],[ho.TIMESERIES_UPDATED,"edge-event.action-type-timeseries-updated"],[ho.CREDENTIALS_UPDATED,"edge-event.action-type-credentials-updated"],[ho.RELATION_ADD_OR_UPDATE,"edge-event.action-type-relation-add-or-update"],[ho.RELATION_DELETED,"edge-event.action-type-relation-deleted"],[ho.RPC_CALL,"edge-event.action-type-rpc-call"],[ho.ALARM_ACK,"edge-event.action-type-alarm-ack"],[ho.ALARM_CLEAR,"edge-event.action-type-alarm-clear"],[ho.ALARM_ASSIGNED,"edge-event.action-type-alarm-assigned"],[ho.ALARM_UNASSIGNED,"edge-event.action-type-alarm-unassigned"],[ho.ASSIGNED_TO_EDGE,"edge-event.action-type-assigned-to-edge"],[ho.UNASSIGNED_FROM_EDGE,"edge-event.action-type-unassigned-from-edge"],[ho.CREDENTIALS_REQUEST,"edge-event.action-type-credentials-request"],[ho.ENTITY_MERGE_REQUEST,"edge-event.action-type-entity-merge-request"],[ho.ADDED_TO_ENTITY_GROUP,"edge-event.action-type-added-to-entity-group"],[ho.REMOVED_FROM_ENTITY_GROUP,"edge-event.action-type-removed-from-entity-group"],[ho.CHANGE_OWNER,"edge-event.action-type-change-owner"]]),WH=[ho.POST_ATTRIBUTES,ho.ATTRIBUTES_UPDATED,ho.ATTRIBUTES_DELETED,ho.TIMESERIES_UPDATED,ho.RPC_CALL],Bkt=new Map([[MF.DEPLOYED,"#000000"],[MF.PENDING,"#9e9e9e"]]),Uue=function(n){return n[n.ubuntu=0]="ubuntu",n[n.centos=1]="centos",n[n.docker=2]="docker",n}(Uue||{}),jkt=[G.USER,G.ASSET,G.DEVICE,G.ENTITY_VIEW,G.DASHBOARD],Gkt="edgeVersion",AF=function(n){return n.CONNECTED="CONNECTED",n.DISCONNECTED="DISCONNECTED",n}(AF||{}),zkt=new Map([[AF.CONNECTED,"edge.connected"],[AF.DISCONNECTED,"edge.disconnected"]]);y();y();var QH={};Ae(QH,{WidgetConfigComponent:()=>yp});y();var Que={};Ae(Que,{EntityAliasDialogComponent:()=>UI});y();function Hue(n,t){n&1&&O(0,"mat-progress-bar",19)}function que(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"alias.name-required")," "))}function Wue(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"alias.duplicate-alias")," "))}function Yue(n,t){n&1&&(d(0,"div",20),v(1,"translate"),d(2,"mat-slide-toggle",21),g(3),v(4,"translate"),p()()),n&2&&(te("tb-hint-tooltip-icon",C(1,2,"alias.resolve-multiple-hint")),l(3),j(" ",C(4,4,"alias.resolve-multiple")," "))}var UI=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f,_){if(super(e,i,s),this.store=e,this.router=i,this.data=o,this.errorStateMatcher=a,this.dialogRef=s,this.fb=c,this.utils=u,this.translate=f,this.entityService=_,this.submitted=!1,this.isAdd=o.isAdd,this.disableResolveMultiple=o.disableResolveMultiple,this.allowedEntityTypes=o.allowedEntityTypes,this.reportMode=o.reportMode,this.subReport=o.subReport,Array.isArray(o.entityAliases))this.entityAliases=o.entityAliases;else{this.entityAliases=[];for(let I of Object.keys(o.entityAliases))this.entityAliases.push(o.entityAliases[I])}this.isAdd&&!this.data.alias?(this.alias={id:null,alias:"",filter:{}},this.disableResolveMultiple||(this.alias.filter.resolveMultiple=!1)):this.alias=o.alias,this.entityAliasFormGroup=this.fb.group({alias:[this.alias.alias,[this.validateDuplicateAliasName(),ke.required]],filter:[this.alias.filter,ke.required]}),this.disableResolveMultiple||this.entityAliasFormGroup.addControl("resolveMultiple",this.fb.control(this.alias.filter.resolveMultiple))}validateDuplicateAliasName(){return e=>{let i=e.value.trim(),o=this.entityAliases.find(a=>a.alias===i);return o&&(this.isAdd||this.alias.id!==o.id)?{duplicateAliasName:{valid:!1}}:null}}ngOnInit(){}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invalid&&this.submitted);return o||a}cancel(){this.dialogRef.close(null)}validate(){return this.entityService.resolveAliasFilter(this.alias.filter,null)}save(){this.submitted=!0,this.alias.alias=this.entityAliasFormGroup.get("alias").value.trim(),this.alias.filter=this.entityAliasFormGroup.get("filter").value,this.disableResolveMultiple||(this.alias.filter.resolveMultiple=this.entityAliasFormGroup.get("resolveMultiple").value),sc(this.alias.filter?.filters)||(this.alias.filter.filters=this.alias.filter.filters.filter((e,i,o)=>o.findIndex(a=>a.relationType===e.relationType&&Fn(a.entityTypes,e.entityTypes))===i&&(e.relationType||e.entityTypes?.length))),this.alias.filter.type&&this.validate().subscribe(()=>{this.isAdd&&(this.alias.id=this.utils.guid()),this.dialogRef.close(this.alias)},()=>{this.entityAliasFormGroup.setErrors({noEntityMatched:!0});let e=this.entityAliasFormGroup.valueChanges.subscribe(()=>{this.entityAliasFormGroup.setErrors(null),e.unsubscribe()})})}};
158t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(Nn,4),h(en),h(Wt),h(vn),h(Ge),h(rr))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-alias-dialog"]],features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:33,vars:31,consts:[[2,"width","700px",3,"ngSubmit","formGroup"],["color","primary"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["mat-dialog-content",""],[1,"tb-form-panel","outlined",3,"disabled"],[1,"flex","flex-row","items-start","xs:flex-col","xs:items-stretch"],["appearance","outline",1,"flex-1"],["translate",""],["matInput","","formControlName","alias","required",""],[4,"ngIf"],["class","tb-resolve-multiple-switch",3,"tb-hint-tooltip-icon",4,"ngIf"],["formControlName","filter",3,"resolveMultipleChanged","disableResolveMultiple","resolveMultiple","allowedEntityTypes","reportMode","subReport"],[3,"error"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],[1,"tb-resolve-multiple-switch",3,"tb-hint-tooltip-icon"],["formControlName","resolveMultiple",1,"mat-slide"]],template:function(i,o){i&1&&(d(0,"form",0),T("ngSubmit",function(){return o.save()}),d(1,"mat-toolbar",1)(2,"h2"),g(3),v(4,"translate"),p(),O(5,"span",2),d(6,"button",3),T("click",function(){return o.cancel()}),d(7,"mat-icon",4),g(8,"close"),p()()(),x(9,Hue,1,0,"mat-progress-bar",5),v(10,"async"),d(11,"div",6)(12,"fieldset",7),v(13,"async"),d(14,"div",8)(15,"mat-form-field",9)(16,"mat-label",10),g(17,"alias.name"),p(),O(18,"input",11),x(19,que,3,3,"mat-error",12)(20,Wue,3,3,"mat-error",12),p(),x(21,Yue,5,6,"div",13),p(),d(22,"tb-entity-filter",14),T("resolveMultipleChanged",function(s){return o.entityAliasFormGroup.get("resolveMultiple").patchValue(s)}),p(),O(23,"tb-error",15),p()(),d(24,"div",16)(25,"button",17),v(26,"async"),T("click",function(){return o.cancel()}),g(27),v(28,"translate"),p(),d(29,"button",18),v(30,"async"),g(31),v(32,"translate"),p()()()),i&2&&(m("formGroup",o.entityAliasFormGroup),l(3),z(C(4,17,o.isAdd?"alias.add":"alias.edit")),l(6),m("ngIf",C(10,19,o.isLoading$)),l(3),m("disabled",C(13,21,o.isLoading$)),l(7),m("ngIf",o.entityAliasFormGroup.get("alias").hasError("required")),l(),m("ngIf",o.entityAliasFormGroup.get("alias").hasError("duplicateAliasName")),l(),m("ngIf",!o.disableResolveMultiple),l(),m("disableResolveMultiple",o.disableResolveMultiple)("resolveMultiple",o.disableResolveMultiple?!1:o.entityAliasFormGroup.get("resolveMultiple").value)("allowedEntityTypes",o.allowedEntityTypes)("reportMode",o.reportMode)("subReport",o.subReport),l(),m("error",o.entityAliasFormGroup.hasError("noEntityMatched")?o.translate.instant("alias.entity-filter-no-entity-matched"):""),l(2),m("disabled",C(26,23,o.isLoading$)),l(2),j(" ",C(28,25,"action.cancel")," "),l(2),m("disabled",C(30,27,o.isLoading$)||o.entityAliasFormGroup.invalid||!o.entityAliasFormGroup.dirty),l(2),j(" ",C(32,29,o.isAdd?"action.add":"action.save")," "))},styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-resolve-multiple-switch[_ngcontent-%COMP%]{padding:18px 0 0 18px}@media screen and (max-width: 599px){[_nghost-%COMP%]   .tb-resolve-multiple-switch[_ngcontent-%COMP%]{padding:0 0 22px}}']});let n=t;return n})();var ehe={};Ae(ehe,{FilterDialogComponent:()=>OF});y();function Kue(n,t){n&1&&O(0,"mat-progress-bar",19)}function Xue(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"filter.name-required")," "))}function Zue(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"filter.duplicate-filter")," "))}function Jue(n,t){n&1&&(d(0,"section",20)(1,"label",21),g(2,"filter.editable"),p(),O(3,"mat-slide-toggle",22),p())}var OF=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f){if(super(e,i,s),this.store=e,this.router=i,this.data=o,this.errorStateMatcher=a,this.dialogRef=s,this.fb=c,this.utils=u,this.translate=f,this.submitted=!1,this.isAdd=o.isAdd,this.disableUserEdit=o.disableUserEdit,Array.isArray(o.filters))this.filters=o.filters;else{this.filters=[];for(let _ of Object.keys(o.filters))this.filters.push(o.filters[_])}this.isAdd&&!this.data.filter?this.filter={id:null,filter:"",keyFilters:[],editable:!this.disableUserEdit}:this.filter=o.filter,this.filterFormGroup=this.fb.group({filter:[this.filter.filter,[this.validateDuplicateFilterName(),ke.required]],keyFilters:[this.filter.keyFilters,ke.required]}),this.disableUserEdit||this.filterFormGroup.addControl("editable",this.fb.control(this.filter.editable))}validateDuplicateFilterName(){return e=>{let i=e.value.trim(),o=this.filters.find(a=>a.filter===i);return o&&(this.isAdd||this.filter.id!==o.id)?{duplicateFilterName:{valid:!1}}:null}}ngOnInit(){}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invali
158d&&this.submitted);return o||a}cancel(){this.dialogRef.close(null)}save(){this.submitted=!0,this.filter.filter=this.filterFormGroup.get("filter").value.trim(),this.filter.editable=this.disableUserEdit?!1:this.filterFormGroup.get("editable").value,this.filter.keyFilters=this.filterFormGroup.get("keyFilters").value,this.isAdd&&(this.filter.id=this.utils.guid()),this.dialogRef.close(this.filter)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(Nn,4),h(en),h(Wt),h(vn),h(Ge))},t.\u0275cmp=L({type:t,selectors:[["tb-filter-dialog"]],features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:33,vars:26,consts:[[2,"width","700px",3,"ngSubmit","formGroup"],["color","primary"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["mat-dialog-content",""],[3,"disabled"],[1,"flex","flex-1","flex-col"],[1,"flex","flex-row"],[1,"mat-block","flex-1"],["translate",""],["matInput","","formControlName","filter","required",""],[4,"ngIf"],["class","tb-editable-switch flex flex-col items-center justify-start",4,"ngIf"],["formControlName","keyFilters",3,"displayUserParameters"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],[1,"tb-editable-switch","flex","flex-col","items-center","justify-start"],["translate","",1,"tb-small","editable-label"],["formControlName","editable",1,"editable-switch"]],template:function(i,o){i&1&&(d(0,"form",0),T("ngSubmit",function(){return o.save()}),d(1,"mat-toolbar",1)(2,"h2"),g(3),v(4,"translate"),p(),O(5,"span",2),d(6,"button",3),T("click",function(){return o.cancel()}),d(7,"mat-icon",4),g(8,"close"),p()()(),x(9,Kue,1,0,"mat-progress-bar",5),v(10,"async"),d(11,"div",6)(12,"fieldset",7),v(13,"async"),d(14,"div",8)(15,"div",9)(16,"mat-form-field",10)(17,"mat-label",11),g(18,"filter.name"),p(),O(19,"input",12),x(20,Xue,3,3,"mat-error",13)(21,Zue,3,3,"mat-error",13),p(),x(22,Jue,4,0,"section",14),p(),O(23,"tb-key-filter-list",15),p()()(),d(24,"div",16)(25,"button",17),v(26,"async"),T("click",function(){return o.cancel()}),g(27),v(28,"translate"),p(),d(29,"button",18),v(30,"async"),g(31),v(32,"translate"),p()()()),i&2&&(m("formGroup",o.filterFormGroup),l(3),z(C(4,12,o.isAdd?"filter.add":"filter.edit")),l(6),m("ngIf",C(10,14,o.isLoading$)),l(3),m("disabled",C(13,16,o.isLoading$)),l(8),m("ngIf",o.filterFormGroup.get("filter").hasError("required")),l(),m("ngIf",o.filterFormGroup.get("filter").hasError("duplicateFilterName")),l(),m("ngIf",!o.disableUserEdit),l(),m("displayUserParameters",!o.disableUserEdit),l(2),m("disabled",C(26,18,o.isLoading$)),l(2),j(" ",C(28,20,"action.cancel")," "),l(2),m("disabled",C(30,22,o.isLoading$)||o.filterFormGroup.invalid||!o.filterFormGroup.dirty),l(2),j(" ",C(32,24,o.isAdd?"action.add":"action.update")," "))},styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-editable-switch[_ngcontent-%COMP%]{padding-left:10px}[_nghost-%COMP%]   .tb-editable-switch[_ngcontent-%COMP%]   .editable-switch[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .tb-editable-switch[_ngcontent-%COMP%]   .editable-label[_ngcontent-%COMP%]{margin:5px 0}']});let n=t;return n})();var the=["basicModeContainer"],ihe=[[["",8,"tb-widget-config-header-prefix"]],[["",8,"tb-widget-config-header-suffix"]]],nhe=[".tb-widget-config-header-prefix",".tb-widget-config-header-suffix"],rhe=()=>["$event","widgetContext","entityId","entityName","additionalParams","entityLabel"],YH=()=>({minHeight:"100px"}),ohe=()=>({});function ahe(n,t){if(n&1){let r=B();d(0,"tb-toggle-select",12),bi("ngModelChange",function(i){D(r);let o=b(2);return gi(o.selectedOption,i)||(o.selectedOption=i),M(i)}),p()}if(n&2){let r=b(2);m("options",r.headerOptions),fi("ngModel",r.selectedOption)}}function she(n,t){if(n&1&&(d(0,"div",9),x(1,ahe,1,2,"tb-toggle-select",10),d(2,"div",11),Fe(3),Fe(4,1),p()()),n&2){let r=b
158();l(),m("ngIf",!r.hideToggleHeader&&r.widgetConfigMode===r.widgetConfigModes.advanced)}}function lhe(n,t){n&1&&Ti(0)}function che(n,t){if(n&1&&(d(0,"div",15),x(1,lhe,1,0,"ng-container",16),p()),n&2){let r=b(2),e=me(6);Y("!hidden",r.selectedOption!=="data"),l(),m("ngTemplateOutlet",e)}}function dhe(n,t){n&1&&Ti(0)}function phe(n,t){n&1&&(O(0,"tb-json-object-edit",52),v(1,"translate")),n&2&&(te("label",C(1,2,"widget-config.title-style")),m("editorStyle",hn(4,YH)))}function mhe(n,t){n&1&&(O(0,"tb-json-object-edit",53),v(1,"translate"),O(2,"tb-css",54),v(3,"translate")),n&2&&(te("label",C(1,3,"widget-config.widget-style")),m("editorStyle",hn(7,YH)),l(2),te("label",C(3,5,"widget-config.widget-css")))}function uhe(n,t){n&1&&(d(0,"div",18)(1,"div",19),g(2,"widget-config.resize-options"),p(),d(3,"div",21)(4,"mat-slide-toggle",55),g(5),v(6,"translate"),p()(),d(7,"div",21)(8,"mat-slide-toggle",56),g(9),v(10,"translate"),p()()()),n&2&&(l(5),j(" ",C(6,2,"widget-config.resizable")," "),l(4),j(" ",C(10,4,"widget-config.preserve-aspect-ratio")," "))}function hhe(n,t){n&1&&(d(0,"div",21)(1,"mat-slide-toggle",63),g(2),v(3,"translate"),p()()),n&2&&(l(2),j(" ",C(3,1,"widget-config.mobile-hide")," "))}function fhe(n,t){n&1&&(d(0,"div",21)(1,"mat-slide-toggle",64),g(2),v(3,"translate"),p()()),n&2&&(l(2),j(" ",C(3,1,"widget-config.desktop-hide")," "))}function ghe(n,t){if(n&1&&(d(0,"div",18)(1,"div",57),g(2),v(3,"translate"),p(),x(4,hhe,4,3,"div",58)(5,fhe,4,3,"div",58),d(6,"div",39)(7,"div",59),g(8,"widget-config.order"),p(),d(9,"mat-form-field",60),O(10,"input",61),v(11,"translate"),p()(),d(12,"div",39)(13,"div",59),g(14,"widget-config.height"),p(),d(15,"mat-form-field",60),O(16,"input",62),v(17,"translate"),p()()()),n&2){let r=b
158(2);l(2),z(C(3,5,r.isDefaultBreakpoint?"widget-config.mobile":"widget-config.list-layout")),l(2),m("ngIf",r.isDefaultBreakpoint),l(),m("ngIf",r.isDefaultBreakpoint),l(5),te("placeholder",C(11,7,"widget-config.set")),l(6),te("placeholder",C(17,9,"widget-config.set"))}}function bhe(n,t){if(n&1&&(d(0,"div",13),x(1,che,2,3,"div",14),d(2,"div",15),x(3,dhe,1,0,"ng-container",16),p(),d(4,"div",17)(5,"div",18)(6,"div",19),g(7,"widget-config.card-title"),p(),d(8,"mat-slide-toggle",20),g(9),v(10,"translate"),p(),d(11,"div",21)(12,"div",22),g(13,"widget-config.title"),p(),d(14,"div",23)(15,"mat-form-field",24),O(16,"input",25),v(17,"translate"),p(),O(18,"tb-font-settings",26)(19,"tb-color-input",27),p()(),d(20,"div",21)(21,"div",22),g(22,"widget-config.title-tooltip"),p(),d(23,"mat-form-field",24),O(24,"input",28),v(25,"translate"),p()(),d(26,"div",29)(27,"mat-slide-toggle",30),g(28),v(29,"translate"),p(),d(30,"div",31)(31,"mat-form-field",32),O(32,"input",33),p(),O(33,"tb-material-icon-select",34)(34,"tb-color-input",35),p()(),d(35,"mat-expansion-panel",36)(36,"mat-expansion-panel-header")(37,"mat-panel-description",37),g(38," widget-config.advanced-title-style "),p()(),x(39,phe,2,5,"ng-template",38),p()(),d(40,"div",18)(41,"div",19),g(42,"widget-config.card-style"),p(),d(43,"div",39)(44,"div"),g(45),v(46,"translate"),p(),O(47,"tb-color-input",40),p(),d(48,"div",39)(49,"div"),g(50),v(51,"translate"),p(),O(52,"tb-color-input",41),p(),d(53,"div",39)(54,"div"),g(55),v(56,"translate"),p(),d(57,"mat-form-field",32),O(58,"input",42),v(59,"translate"),p()(),d(60,"div",39)(61,"div"),g(62),v(63,"translate"),p(),d(64,"mat-form-field",32),O(65,"input",43),v(66,"translate"),p()(),d(67,"div",39)(68,"div"),g(69),v(70,"translate"),p(),d(71,"mat-form-field",32),O(72,"input",44),v(73,"translate"),p()(),d(74,"mat-slide-toggle",45),g(75),v(76,"translate"),p(),d(77,"mat-expansion-panel",36)(78,"mat-expansion-panel-header")(79,"mat-panel-description",37),g(80," widget-config.advanced-widget-style "),p()(),x(81,mhe,4,8,"ng-template",38),p()(),d(82,"div",18)(83,"div",19),g(84,"widget-config.card-buttons"),p(),d(85,"mat-slide-toggle",46),g(86),v(87,"translate"),p(),d(88,"mat-slide-toggle",47),g(89),v(90,"translate"),p()()(),d(91,"div",48)(92,"div",49),O(93,"tb-manage-widget-actions",50),p()(),d(94,"div",17),x(95,uhe,11,6,"div",51)(96,ghe,18,11,"div",51),p()()),n&2){let r=b
158(),e=me(8);l(),m("ngIf",r.displayData),l(),Y("!hidden",r.selectedOption!=="appearance"),l(),m("ngTemplateOutlet",e),l(),Y("!hidden",r.selectedOption!=="card"),m("formGroup",r.widgetSettings),l(5),j(" ",C(10,42,"widget-config.display-title")," "),l(7),te("placeholder",C(17,44,"widget-config.set")),l(2),m("previewText",r.widgetSettings.get("title").value)("initialPreviewStyle",r.widgetSettings.get("titleStyle").value),l(6),te("placeholder",C(25,46,"widget-config.set")),l(4),j(" ",C(29,48,"widget-config.display-icon")," "),l(5),m("color",r.widgetSettings.get("iconColor").value),l(12),z(C(46,50,"widget-config.text-color")),l(5),z(C(51,52,"widget-config.background-color")),l(5),z(C(56,54,"widget-config.padding")),l(3),te("placeholder",C(59,56,"widget-config.set")),l(4),z(C(63,58,"widget-config.margin")),l(3),te("placeholder",C(66,60,"widget-config.set")),l(4),z(C(70,62,"widget-config.border-radius")),l(3),te("placeholder",C(73,64,"widget-config.set")),l(3),j(" ",C(76,66,"widget-config.drop-shadow")," "),l(11),j(" ",C(87,68,"widget-config.enable-fullscreen")," "),l(2),Y("!hidden",!r.displayDataExport),l(),j(" ",C(90,70,"widget-config.enable-data-export")," "),l(2),Y("!hidden",r.selectedOption!=="actions"),m("formGroup",r.actionsSettings),l(2),m("callbacks",r.widgetConfigCallbacks)("actionTypes",r.widgetActionTypesList)("customFunctionArgs",hn(72,rhe))("widgetType",r.modelValue.widgetType)("defaultIconColor",r.widgetSettings.get("color").value)("actionSources",r.modelValue.actionSources)("additionalWidgetActionTypes",r.modelValue.typeParameters==null?null:r.modelValue.typeParameters.additionalWidgetActionTypes),l(),Y("!hidden",r.selectedOption!=="layout"),m("formGroup",r.layoutSettings),l(),m("ngIf",!r.showLayoutConfig||r.isDefaultBreakpoint),l(),m("ngIf",r.showLayoutConfig)}}
158function _he(n,t){if(n&1&&(d(0,"div",67),g(1),p()),n&2){let r=b(3);l(),z(r.basicModeDirectiveError)}}function vhe(n,t){if(n&1&&(d(0,"div",15),Ti(1,null,4),x(3,_he,2,1,"div",66),p()),n&2){let r=b(2);l(3),m("ngIf",r.basicModeDirectiveError)}}function yhe(n,t){n&1&&Ti(0)}function Che(n,t){n&1&&Ti(0)}function whe(n,t){if(n&1&&(d(0,"div",15),x(1,yhe,1,0,"ng-container",16)(2,Che,1,0,"ng-container",16),pt(3,68),O(4,"tb-widget-actions-panel",69),ct(),p()),n&2){let r=b(2),e=me(6),i=me(8);l(),m("ngTemplateOutlet",e),l(),m("ngTemplateOutlet",i),l(),m("formGroup",r.actionsSettings)}}function xhe(n,t){if(n&1&&(d(0,"div",13),x(1,vhe,4,1,"div",65)(2,whe,5,3,"ng-template",null,3,kt),p()),n&2){let r=me(3),e=b();l(),m("ngIf",e.hasBasicModeDirective)("ngIfElse",r)}}function She(n,t){if(n&1&&(pt(0,68),O(1,"tb-timewindow-config-panel",72),ct()),n&2){let r=b(2);m("formGroup",r.dataSettings),l(),m("onlyHistoryTimewindow",r.onlyHistoryTimewindow())}}function The(n,t){if(n&1){let r=B();d(0,"div",73)(1,"div",74)(2,"div",19),g(3,"alarm.filter"),p(),d(4,"button",75),T("click",function(){D(r);let i=me(8);return M(i.reset())}),g(5),v(6,"translate"),p()(),O(7,"tb-alarm-filter-config",76,5),p()}if(n&2){let r=b(2);m("formGroup",r.dataSettings),l(5),j(" ",C(6,3,"action.reset")," "),l(2),m("initialAlarmFilterConfig",hn(5,ohe))}}function Ehe(n,t){if(n&1&&(d(0,"div",68),O(1,"tb-datasources",77),p()),n&2){let r=b
158(2);m("formGroup",r.dataSettings),l(),m("configMode",r.widgetConfigMode)}}function Ihe(n,t){if(n&1&&(pt(0,68),O(1,"tb-target-device",78),ct()),n&2){let r=b(2);m("formGroup",r.targetDeviceSettings)}}function khe(n,t){if(n&1&&(d(0,"div",73)(1,"div",19),g(2,"widget-config.alarm-source"),p(),O(3,"tb-datasource",79),p()),n&2){let r=b(2);m("formGroup",r.dataSettings)}}function Dhe(n,t){if(n&1&&(d(0,"div",73)(1,"div",19),g(2,"widget-config.limits"),p(),d(3,"div",29)(4,"div",59),g(5,"widget-config.data-page-size"),p(),d(6,"mat-form-field",60),O(7,"input",80),p()()()),n&2){let r=b(2);m("formGroup",r.widgetSettings)}}function Mhe(n,t){if(n&1&&x(0,She,2,2,"ng-container",70)(1,The,9,6,"div",71)(2,Ehe,2,2,"div",70)(3,Ihe,2,1,"ng-container",70)(4,khe,4,1,"div",71)(5,Dhe,8,1,"div",71),n&2){let r=b();m("ngIf",r.displayTimewindowConfig),l(),m("ngIf",r.widgetType===r.widgetTypes.alarm),l(),m("ngIf",r.widgetType!==r.widgetTypes.rpc&&r.widgetType!==r.widgetTypes.alarm&&(r.modelValue==null?null:r.modelValue.isDataEnabled)),l(),m("ngIf",r.widgetType===r.widgetTypes.rpc&&(r.modelValue==null?null:r.modelValue.isDataEnabled)),l(),m("ngIf",r.widgetType===r.widgetTypes.alarm&&(r.modelValue==null?null:r.modelValue.isDataEnabled)),l(),m("ngIf",r.displayLimits)}}function Ahe(n,t){if(n&1&&(pt(0,68),O(1,"tb-timewindow-config-panel",72),ct()),n&2){let r=b
158(2);m("formGroup",r.dataSettings),l(),m("onlyHistoryTimewindow",r.onlyHistoryTimewindow())}}function Ohe(n,t){if(n&1&&(d(0,"div",39)(1,"div",84),v(2,"translate"),g(3,"widget-config.units-by-default"),p(),O(4,"tb-unit-input",85),p()),n&2){let r=b(3);l(),te("tb-hint-tooltip-icon",C(2,2,"widget-config.default-data-key-parameter-hint")),l(3),m("supportsUnitConversion",r.modelValue.typeParameters.supportsUnitConversion)}}function Phe(n,t){n&1&&(d(0,"div",39)(1,"div",84),v(2,"translate"),g(3,"widget-config.decimals-by-default"),p(),d(4,"mat-form-field",60),O(5,"input",86),v(6,"translate"),p()()),n&2&&(l(),te("tb-hint-tooltip-icon",C(2,2,"widget-config.default-data-key-parameter-hint")),l(4),te("placeholder",C(6,4,"widget-config.set")))}function Rhe(n,t){n&1&&(d(0,"div",87)(1,"div",22),g(2,"widget-config.no-data-display-message"),p(),d(3,"mat-form-field",24),O(4,"input",88),v(5,"translate"),p()()),n&2&&(l(4),te("placeholder",C(5,1,"widget-config.set-message")))}function Fhe(n,t){if(n&1&&(d(0,"div",73)(1,"div",19),g(2,"widget-config.data-settings"),p(),x(3,Ohe,5,4,"div",82)(4,Phe,7,6,"div",82)(5,Rhe,6,3,"div",83),p()),n&2){let r=b
158(2);m("formGroup",r.widgetSettings),l(3),m("ngIf",r.displayUnitsConfig),l(),m("ngIf",r.displayUnitsConfig),l(),m("ngIf",r.displayNoDataDisplayMessageConfig)}}function Nhe(n,t){if(n&1&&(d(0,"div",89),O(1,"tb-widget-settings",90),p()),n&2){let r=b(2);m("formGroup",r.advancedSettings),l(),m("aliasController",r.aliasController)("callbacks",r.widgetConfigCallbacks)("functionsOnly",r.functionsOnly)("dashboard",r.dashboard)("widget",r.widget)("widgetConfig",r.modelValue)}}function Vhe(n,t){if(n&1&&x(0,Ahe,2,2,"ng-container",70)(1,Fhe,6,4,"div",71)(2,Nhe,2,7,"div",81),n&2){let r=b();m("ngIf",!r.displayData&&r.displayTimewindowConfig),l(),m("ngIf",r.displayAppearanceDataSettings),l(),m("ngIf",r.displayAdvancedAppearance)}}var fh=class fh extends sn{constructor(t,r,e,i,o,a,s,c,u){super(t),this.store=t,this.utils=r,this.entityService=e,this.dialog=i,this.translate=o,this.fb=a,this.cd=s,this.widgetService=c,this.destroyRef=u,this.widgetTypes=mn,this.widgetConfigModes=Hc,this.entityTypes=G,this.hideHeader=!1,this.hideToggleHeader=!1,this.isAdd=!1,this.showLayoutConfig=!0,this.isDefaultBreakpoint=!0,this.widgetConfigMode=Hc.advanced,this.widgetActionTypesList=Q5,this.widgetConfigCallbacks={createEntityAlias:this.createEntityAlias.bind(this),editEntityAlias:this.editEntityAlias.bind(this),createFilter:this.createFilter.bind(this),generateDataKey:this.generateDataKey.bind(this),fetchEntityKeysForDevice:this.fetchEntityKeysForDevice.bind(this),fetchEntityKeys:this.fetchEntityKeys.bind(this),fetchDashboardStates:this.fetchDashboardStates.bind(this),fetchCellClickColumns:this.fetchCellClickColumns.bind(this)},this.widgetEditMode=this.utils.widgetEditMode,this.propagateChange=null,this.headerOptions=[],this.displayDataExport=!0,this.basicModeComponent$=null}ngOnInit(){this.dataSettings=this.fb.group({}),this.targetDeviceSettings=this.fb.group({}),this.advancedSettings=this.fb.group({}),this.widgetSettings=this.fb.group({title:[null,[]],titleFont:[null,[]],titleColor:[null,[]],showTitleIcon:[null,[]],titleIcon:[null,[]],iconColor:[null,[]],iconSize:[null,[]],titleTooltip:[null,[]],showTitle:[null,[]],dropShadow:[null,[]],enableFullscreen:[null,[]],enableDataExport:[null,[]],backgroundColor:[null,[]],color:[null,[]],padding:[null,[]],margin:[null,[]],borderRadius:[null,[]],widgetStyle:[null,[]],widgetCss:[null,[]],titleStyle:[null,[]],pageSize:[1024,[ke.min(1),ke.pattern(/^\d*$/)]],units:[null,[]],decimals:[null,[ke.min(0),ke.max(15),ke.pattern(/^\d*$/)]],noDataDisplayMessage:[null,[]]}),Xt(this.widgetSettings.get("showTitle").valueChanges,this.widgetSettings.get("showTitleIcon").valueChanges).pipe(yi(this.destroyRef)).subscribe(()=>{this.updateWidgetSettingsEnabledState()}),this.layoutSettings=this.fb.group({resizable:[!0],preserveAspectRatio:[!1],mobileOrder:[null,[ke.pattern(/^-?[0-9]+$/)]],mobileHeight:[null,[ke.min(1),ke.pattern(/^\d*$/)]],mobileHide:[!1],desktopHide:[!1]}),this.layoutSettings.get("resizable").valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateLayoutEnabledState()}),this.actionsSettings=this.fb.group({actions:[null,[]]})}ngOnDestroy(){this.destroyBasicModeComponent(),this.removeChangeSubscriptions()}removeChangeSubscriptions(){this.dataSettingsChangesSubscription&&(this.dataSettingsChangesSubscription.unsubscribe(),this.dataSettingsChangesSubscription=null),this.targetDeviceSettingsSubscription&&(this.targetDeviceSettingsSubscription.unsubscribe(),this.targetDeviceSettingsSubscription=null),this.widgetSettingsSubscription&&(this.widgetSettingsSubscription.unsubscribe(),this.widgetSettingsSubscription=null),this.layoutSettingsSubscription&&(this.layoutSettingsSubscription.unsubscribe(),this.layoutSettingsSubscription=null),this.advancedSettingsSubscription&&(this.advancedSettingsSubscription.unsubscribe(),this.advancedSettingsSubscription=null),this.actionsSettingsSubscription&&(this.actionsSettingsSubscription.unsubscribe(),this.actionsSettingsSubscription=null)}createChangeSubscriptions(){this.dataSettingsChangesSubscription=this.dataSettings.valueChanges.subscribe(()=>
158this.updateDataSettings()),this.targetDeviceSettingsSubscription=this.targetDeviceSettings.valueChanges.subscribe(()=>this.updateTargetDeviceSettings()),this.widgetSettingsSubscription=this.widgetSettings.valueChanges.subscribe(()=>this.updateWidgetSettings()),this.layoutSettingsSubscription=this.layoutSettings.valueChanges.subscribe(()=>this.updateLayoutSettings()),this.advancedSettingsSubscription=this.advancedSettings.valueChanges.subscribe(()=>this.updateAdvancedSettings()),this.actionsSettingsSubscription=this.actionsSettings.valueChanges.subscribe(()=>this.updateActionSettings())}buildHeader(){this.headerOptions.length=0,this.displayData&&this.headerOptions.push({name:this.translate.instant("widget-config.data"),value:"data"}),this.displayAppearance&&this.headerOptions.push({name:this.translate.instant("widget-config.appearance"),value:"appearance"}),this.headerOptions.push({name:this.translate.instant("widget-config.widget-card"),value:"card"}),this.headerOptions.push({name:this.translate.instant("widget-config.actions"),value:"actions"}),this.headerOptions.push({name:this.translate.instant("widget-config.layout"),value:"layout"}),(!this.selectedOption||!this.headerOptions.find(t=>t.value===this.selectedOption))&&(this.selectedOption=this.headerOptions[0].value)}buildForms(){this.dataSettings=this.fb.group({}),this.targetDeviceSettings=this.fb.group({}),this.advancedSettings=this.fb.group({}),(this.widgetType===mn.timeseries||this.widgetType===mn.alarm||this.widgetType===mn.latest)&&(this.dataSettings.addControl("timewindowConfig",this.fb.control({useDashboardTimewindow:!0,displayTimewindow:!0,timewindow:null,timewindowStyle:null})),this.widgetType===mn.alarm&&this.dataSettings.addControl("alarmFilterConfig",this.fb.control(null))),this.modelValue.isDataEnabled&&(this.widgetType!==mn.rpc&&this.widgetType!==mn.alarm&&this.widgetType!==mn.static?this.dataSettings.addControl("datasources",this.fb.control(null)):this.widgetType===mn.rpc?(this.targetDeviceSettings.addControl("targetDevice",this.fb.control(null,[])),this.displayDataExport=!1):this.widgetType===mn.alarm?this.dataSettings.addControl("alarmSource",this.fb.control(null)):this.widgetType===mn.static&&(this.displayDataExport=!1)),this.advancedSettings.addControl("settings",this.fb.control(null,[]))}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.modelValue=t,this.widgetType=this.modelValue?.widgetType,this.widgetConfigMode=this.modelValue?.hasBasicMode?this.modelValue?.config?.configMode||Hc.advanced:Hc.advanced,this.setupConfig(this.isAdd)}setWidgetConfigMode(t){this.modelValue?.hasBasicMode&&this.widgetConfigMode!==t&&(this.widgetConfigMode=t,this.modelValue.config.configMode=t,this.hasBasicModeDirective&&this.setupConfig(),this.prop
158agateChange(this.modelValue))}setupConfig(t=!1){this.modelValue&&(this.destroyBasicModeComponent(),this.removeChangeSubscriptions(),this.hasBasicModeDirective&&this.widgetConfigMode===Hc.basic?this.setupBasicModeConfig(t):this.setupDefaultConfig())}setupBasicModeConfig(t=!1){let r=this.widgetService.getBasicWidgetSettingsComponentBySelector(this.modelValue.basicModeDirective);r?this.createBasicModeComponentTimeout=setTimeout(()=>{this.createBasicModeComponentTimeout=null,this.basicModeComponentRef=this.basicModeContainer.createComponent(r),this.basicModeComponent=this.basicModeComponentRef.instance,this.basicModeComponent.isAdd=t,this.basicModeComponent.widgetConfig=this.modelValue,this.basicModeComponentChangeSubscription=this.basicModeComponent.widgetConfigChanged.subscribe(e=>{this.modelValue=e,this.propagateChange(this.modelValue),this.cd.markForCheck()}),this.basicModeComponent$&&(this.basicModeComponent$.next(this.basicModeComponent),this.basicModeComponent$.complete(),this.basicModeComponent$=null),this.cd.markForCheck()},0):this.basicModeDirectiveError=this.translate.instant("widget-config.settings-component-not-found",{selector:this.modelValue.basicModeDirective})}destroyBasicModeComponent(){this.basicModeDirectiveError=null,this.basicModeComponentChangeSubscription&&(this.basicModeComponentChangeSubscription.unsubscribe(),this.basicModeComponentChangeSubscription=null),this.createBasicModeComponentTimeout&&(clearTimeout(this.createBasicModeComponentTimeout),this.createBasicModeComponentTimeout=null),this.basicModeComponentRef&&(this.basicModeComponentRef.destroy(),this.basicModeComponentRef=null,this.basicModeComponent=null),this.basicModeContainer&&this.basicModeContainer.clear()}setupDefaultConfig(){this.defaultConfigFormsType!==this.widgetType&&(this.defaultConfigFormsType=this.widgetType,this.buildForms()),this.buildHeader();let t=this.modelValue.config,r=this.modelValue.layout;if(t){let e=dt(t.showTitle)?t.showTitle:!1;if(this.widgetSettings.patchValue({title:t.title,titleFont:t.titleFont,titleColor:t.titleColor,showTitleIcon:dt(t.showTitleIcon)&&e?t.showTitleIcon:!1,titleIcon:dt(t.titleIcon)?t.titleIcon:"",iconColor:dt(t.iconColor)?t.iconColor:"rgba(0, 0, 0, 0.87)",iconSize:dt(t.iconSize)?t.iconSize:"24px",titleTooltip:dt(t.titleTooltip)?t.titleTooltip:"",showTitle:e,dropShadow:dt(t.dropShadow)?t.dropShadow:!0,enableFullscreen:dt(t.enableFullscreen)?t.enableFullscreen:!0,enableDataExport:dt(t.enableDataExport)?t.enableDataExport:!0,backgroundColor:t.backgroundColor,color:t.color,padding:t.padding,margin:t.margin,borderRadius:t.borderRadius,widgetStyle:dt(t.widgetStyle)?t.widgetStyle:{},widgetCss:dt(t.widgetCss)?t.widgetCss:"",titleStyle:dt(t.titleStyle)?t.titleStyle:{fontSize:"16px",fontWeight:400},pageSize:dt(t.pageSize)?t.pageSize:1024,units:t.units,decimals:t.decimals,noDataDisplayMessage:dt(t.noDataDisplayMessage)?t.noDataDisplayMessage:""},{emitEvent:!1}),this.updateWidgetSettingsEnabledState(),this.actionsSettings.patchValue({actions:t.actions||{}},{emitEvent:!1}),this.widgetType===mn.timeseries||this.widgetType===mn.alarm||this.widgetType===mn.latest){let i=dt(t.useDashboardTimewindow)?t.useDashboardTimewindow:!0;this.dataSettings.get("timewindowConfig").patchValue({useDashboardTimewindow:i,displayTimewindow:dt(t.displayTimewindow)?t.displayTimewindow:!0,timewindow:t.timewindow,timewindowStyle:t.timewindowStyle},{emitEvent:!1})}if(this.modelValue.isDataEnabled)if(this.widgetType!==mn.rpc&&this.widgetType!==mn.alarm&&this.widgetType!==mn.static)this.dataSettings.patchValue({datasources:t.datasources},{emitEvent:!1});else if(this.widgetType===mn.rpc){let i=t.targetDevice;this.targetDeviceSettings.patchValue({targetDevice:i},{emitEvent:!1})}else this.widgetType===mn.alarm&&this.dataSettings.patchValue({alarmFilterConfig:dt(t.alarmFilterConfig)?t.alarmFilterConfig:{statusList:[SS.ACTIVE],searchPropagatedAlarms:!0},alarmSource:t.alarmSource},{emitEvent:!1});this.updateAdvancedForm(t.settings),r?this.layoutSettings.patchValue({resizable:dt(r.resizable)?r.resizable:!0,preserveAspectRatio:r.preserveAspectRatio,mobileOrder:r.mobileOrder,mobileHeight:r.mobileHeight,mobileHide:r.mobileHide,desktopHide:r.desktopHide},{emitEvent:!1}):this.layoutSettings.patchValue({resizable:!0,preserveAspectRatio:!1,mobileOrder:null,mobileHeight:null,mobileHide:!1,desktopHide:!1},{emitEvent:!1}),this.updateLayoutEnabledState()}this.createChangeSubscriptions()}updateWidgetSettingsEnabledState(){let t=this.widgetSettings.get("showTitle").value,r=this.widgetSettings.get("showTitleIcon").value;t?(this.widgetSettings.get("title").enable({emitEvent:!1}),this.widgetSettings.get("titleFont").enable({emitEvent:!1}),this.widgetSettings.get("titleColor").enable({emitEvent:!1}),this.widgetSettings.get("titleTooltip").enable({emitEvent:!1}),this.widgetSettings.get("titleStyle").enable({emitEvent:!1}),this.widgetSettings.get("showTitleIcon").enable({emitEvent:!1})):(this.widgetSettings.get("title").disable({emitEvent:!1}),this.widgetSettings.get("titleFont").disable({emitEvent:!1}),this.widgetSettings.get("titleColor").disable({emitEvent:!1}),this.widgetSettings.get("titleTooltip").disable({emitEvent:!1}),this.widgetSettings.get("titleStyle").disable({emitEvent:!1}),this.widgetSettings.get("showTitleIcon").disable({emitEvent:!1})),t&&r?(this.widgetSettings.get("titleIcon").enable({emitEvent:!1}),this.widgetSettings.get("iconColor").enable({emitEvent:!1}),this.widgetSettings.get("iconSize").enable({emitEvent:!1})):(this.widgetSettings.get("titleIcon").disable({emitEvent:!1}),this.widgetSettings.get("iconColor").disable({emitEvent:!1}),this.widgetSettings.get("iconSize").disable({emitEvent:!1}))}updateLayoutEnabledState(){this.layoutSettings.get("resizable").value?this.layoutSettings.get("preserveAspectRatio").enable({emitEvent:!1}):this.layoutSettings.get("preserveAspectRatio").disable({emitEvent:!1})}updateAdvancedForm(t){let r={};r.model=t||{},this.modelValue.settingsForm?.length?r.settingsForm=this.modelValue.settingsForm:r.settingsForm=[],r.settingsDirective=this.modelValue.settingsDirective,this.advancedSettings.patchValue({settings:r},{emitEvent:!1})}updateDataSettings(){if(this.modelValue){if(this.modelValue.config){let t=this.dataSettings.value;if(t.timewindowConfig){let r=t.timewindowConfig;t=re(re({},t),r),delete t.timewindowConfig}Object.assign(this.modelValue.config,t)}
158this.propagateChange(this.modelValue)}}updateTargetDeviceSettings(){this.modelValue&&(this.modelValue.config&&(this.modelValue.config.targetDevice=this.targetDeviceSettings.get("targetDevice").value),this.propagateChange(this.modelValue))}updateWidgetSettings(){this.modelValue&&(this.modelValue.config&&Object.assign(this.modelValue.config,this.widgetSettings.value),this.propagateChange(this.modelValue))}updateLayoutSettings(){this.modelValue&&(this.modelValue.layout&&Object.assign(this.modelValue.layout,this.layoutSettings.value),this.propagateChange(this.modelValue))}updateAdvancedSettings(){this.modelValue&&(this.modelValue.config&&(this.modelValue.config.settings=this.advancedSettings.get("settings").value?.model),this.propagateChange(this.modelValue))}updateActionSettings(){this.modelValue&&(this.modelValue.config&&(this.modelValue.config.actions=this.actionsSettings.get("actions").value),this.propagateChange(this.modelValue))}get hasBasicModeDirective(){return this.modelValue?.basicModeDirective?.length>0}get useDefinedBasicModeDirective(){return this.modelValue?.basicModeDirective?.length&&!this.basicModeDirectiveError}get displayData(){return!this.modelValue?.typeParameters?.hideDataTab&&this.widgetType!==mn.static}get displayAppearance(){return this.displayAppearanceDataSettings||this.displayAdvancedAppearance}get displayAdvancedAppearance(){return!!this.modelValue&&(!!this.modelValue.settingsForm&&!!this.modelValue.settingsForm.length||!!this.modelValue.settingsDirective&&!!this.modelValue.settingsDirective.length)}get displayTimewindowConfig(){if(this.widgetType===mn.timeseries||this.widgetType===mn.alarm)return!0;if(this.widgetType===mn.latest){let t=this.dataSettings.get("datasources").value;return jS(t)}}get displayLimits(){return this.widgetType!==mn.rpc&&this.widgetType!==mn.alarm&&this.modelValue?.isDataEnabled&&!this.modelValue?.typeParameters?.singleEntity}get displayAppearanceDataSettings(){return!this.modelValue?.typeParameters?.hideDataSettings&&(this.displayUnitsConfig||this.displayNoDataDisplayMessageConfig)}get displayUnitsConfig(){return this.widgetType===mn.latest||this.widgetType===mn.timeseries}get displayNoDataDisplayMessageConfig(){return this.widgetType!==mn.static&&!this.modelValue?.typeParameters?.processNoDataByWidget}onlyHistoryTimewindow(){if(this.widgetType===mn.latest){let t=this.dataSettings.get("datasources").value;
158return yb(t)}else return!1}generateDataKey(t,r,e,i,o){if(Co(t))return t._hash=Math.random(),t;{let a=t;if(r===Zi.alarm||r===Zi.entityField){let u=r===Zi.alarm?TS[a]:Un[t];u&&(a=this.translate.instant(u.name))}let s=this.widgetType===mn.alarm?[this.modelValue.config.alarmSource]:this.modelValue.config.datasources;a=E4(a,s);let c={name:t,type:r,label:a,color:this.genNextColor(),settings:{},_hash:Math.random()};if(r===Zi.function?(c.name="f(x)",c.funcBody=this.utils.getPredefinedFunctionBody(t),c.funcBody||(c.funcBody="return prevValue + 1;")):r===Zi.count&&(c.name="count"),e?.length)c.settings=B5(e);else if(o){let u=o(c,i);u&&(c.settings=u)}return c}}genNextColor(){let t=0,r=this.widgetType===mn.alarm?[this.modelValue.config.alarmSource]:this.modelValue.config.datasources;return r&&r.forEach(e=>{e&&(e.dataKeys||e.latestDataKeys)&&(t+=(e.dataKeys?e.dataKeys.length:0)+(e.latestDataKeys?e.latestDataKeys.length:0))}),this.utils.getMaterialColor(t)}createEntityAlias(t,r){let e={id:null,alias:t,filter:{resolveMultiple:!1}};return this.dialog.open(UI,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{isAdd:!0,allowedEntityTypes:r,entityAliases:this.dashboard.configuration.entityAliases,alias:e}}).afterClosed().pipe(et(i=>{i&&(this.dashboard.configuration.entityAliases[i.id]=i,this.aliasController.updateEntityAliases(this.dashboard.configuration.entityAliases))}))}editEntityAlias(t,r){return this.dialog.open(UI,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{isAdd:!1,allowedEntityTypes:r,entityAliases:this.dashboard.configuration.entityAliases,alias:Di(t)}}).afterClosed().pipe(et(e=>{e&&(this.dashboard.configuration.entityAliases[e.id]=e,this.aliasController.updateEntityAliases(this.dashboard.configuration.entityAliases))}))}createFilter(t){let r={id:null,filter:t,keyFilters:[],editable:!0};return this.dialog.open(OF,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{isAdd:!0,filters:this.dashboard.configuration.filters,filter:r}}).afterClosed().pipe(et(e=>{e&&(this.dashboard.configuration.filters[e.id]=e,this.aliasController.updateFilters(this.dashboard.configuration.filters))}))}fetchEntityKeysForDevice(t,r){let e=PU(t);return this.entityService.getEntityKeysByEntityFilter(e,r,[G.DEVICE],{ignoreLoading:!0,ignoreErrors:!0}).pipe(vt(()=>Z([])))}fetchEntityKeys(t,r){return this.aliasController.getAliasInfo(t).pipe(Ft(e=>this.entityService.getEntityKeysByEntityFilter(e.entityFilter,r,[],{ignoreLoading:!0,ignoreErrors:!0}).pipe(vt(()=>Z([])))),vt(()=>Z([])))}fetchDashboardStates(t){let r=Object.keys(this.dashboard.configuration.states),e=t?r.filter(this.createFilterForDashboardState(t)):r;return e&&e.length?e:[t]}fetchCellClickColumns(){if(this.modelValue){let t=new Array;return this.modelValue.config?.datasources[0]?.dataKeys?.length&&t.push(...this.keysToCellClickColumns(this.modelValue.config.datasources[0].dataKeys)),this.modelValue.config?.alarmSource?.dataKeys?.length&&t.push(...this.keysToCellClickColumns(this.modelValue.config.alarmSource.dataKeys)),t}}keysToCellClickColumns(t){let r=[];for(let e of t)r.push({name:e.name,label:e?.label});return r}createFilterForDashboardState(t){let r=t.toLowerCase();return e=>e.toLowerCase().indexOf(r)===0}validate(t){let r=this.hasBasicModeDirective&&this.widgetConfigMode===Hc.basic,e;return r?this.basicModeComponent?e=Z(this.basicModeComponent):this.useDefinedBasicModeDirective?(this.basicModeComponent$=new Te,e=this.basicModeComponent$):e=Z(null):e=Z(null),e.pipe(W(i=>this.doValidate(r,i)))}doValidate(t,r){if(t){if(!r||!r.validateConfig())return{basicWidgetConfig:{valid:!1}}}else if(this.dataSettings.valid)if(this.widgetSettings.valid)if(this.layoutSettings.valid){if(!this.advancedSettings.valid)return{advancedSettings:{valid:!1}}}else return{widgetSettings:{valid:!1}};else return{widgetSettings:{valid:!1}};else return{dataSettings:{valid:!1}};if(this.modelValue){let e=this.modelValue.config;if(this.widgetType===mn.rpc&&this.modelValue.isDataEnabled&&!this.widgetEditMode&&!this.modelValue?.typeParameters.targetDeviceOptional&&!Y5(e.targetDevice))return{targetDevice:{valid:!1}}}return null}};fh.\u0275fac=function(r){return new(r||fh)(h(ve),h(vn),h(rr),h(Lr),h(Ge),h(Wt),h(Me),h(Cp),h(En))},fh.\u0275cmp=L({type:fh,selectors:[["tb-widget-config"]],viewQuery:function(r,e){if(r&1&&ae(the,5,ci),r&2){let i;Q(i=K())&&(e.basicModeContainer=i.first)}},inputs:{forceExpandDatasources:"forceExpandDatasources",aliasController:"aliasController",dashboard:"dashboard",widget:"widget",functionsOnly:"functionsOnly",hideHeader:"hideHeader",hideToggleHeader:"hideToggleHeader",isAdd:"isAdd",showLayoutConfig:"showLayoutConfig",isDefaultBreakp
vendor: 4,388 bytes, line 158
158oint:"isDefaultBreakpoint",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>fh),multi:!0},{provide:Aj,useExisting:he(()=>fh),multi:!0}]),Ce],ngContentSelectors:nhe,decls:9,vars:3,consts:[["basicMode",""],["data",""],["appearance",""],["basicModeContent",""],["basicModeContainer",""],["alarmFilterConfig",""],[1,"tb-widget-config","tb-absolute-fill"],["class","tb-widget-config-header",4,"ngIf"],["class","tb-widget-config-content",4,"ngIf","ngIfElse"],[1,"tb-widget-config-header"],["appearance","fill",3,"options","ngModel","ngModelChange",4,"ngIf"],[1,"tb-widget-config-header-components"],["appearance","fill",3,"ngModelChange","options","ngModel"],[1,"tb-widget-config-content"],["class","mat-content",3,"!hidden",4,"ngIf"],[1,"mat-content"],[4,"ngTemplateOutlet"],[1,"mat-content",3,"formGroup"],[1,"tb-form-panel"],["translate","",1,"tb-form-panel-title"],["formControlName","showTitle",1,"mat-slide"],[1,"tb-form-row"],["translate","",1,"fixed-title-width"],[1,"flex","flex-1","flex-row","items-center","justify-start","gap-2"],["appearance","outline","subscriptSizing","dynamic",1,"flex-1"],["matInput","","formControlName","title",3,"placeholder"],["formControlName","titleFont","clearButton","",3,"previewText","initialPreviewStyle"],["asBoxInput","","colorClearButton","","formControlName","titleColor"],["matInput","","formControlName","titleTooltip",3,"placeholder"],[1,"tb-form-row","space-between","column-xs"],["formControlName","showTitleIcon",1,"mat-slide"],[1,"flex","flex-row","items-center","justify-start","gap-2"],["appearance","outline","subscriptSizing","dynamic"],["matInput","","formControlName","iconSize"],["asBoxInput","","iconClearButton","","formControlName","titleIcon",3,"color"],["asBoxInput","","colorClearButton","","formControlName","iconColor"],[1,"tb-settings"],["translate","",1,"flex","items-stretch","justify-start"],["matExpansionPanelContent",""],[1,"tb-form-row","space-between"],["asBoxInput","","colorClearButton","","formControlName","color"],["asBoxInput","","colorClearButton","","formControlName","backgroundColor"],["matInput","","formControlName","padding",3,"placeholder"],["matInput","","formControlName","margin",3,"placeholder"],["matInput","","formControlName","borderRadius",3,"placeholder"],["formControlName","dropShadow",1,"mat-slide","slide-block"],["formControlName","enableFullscreen",1,"mat-slide","slide-block"],["formControlName","enableDataExport",1,"mat-slide","slide-block"],[1,"mat-content",2,"height","100%",3,"formGroup"],[1,"tb-form-panel",2,"height","100%"],["formControlName","actions",3,"callbacks","actionTypes","customFunctionArgs","widgetType","defaultIconColor","actionSources","additionalWidgetActionTypes"],["class","tb-form-panel",4,"ngIf"],["formControlName","titleStyle",3,"editorStyle","label"],["formControlName","widgetStyle",3,"editorStyle","label"],["formControlName","widgetCss",3,"label"],["formControlName","resizable",1,"mat-slide"],["formControlName","preserveAspectRatio",1,"mat-slide"],[1,"tb-form-panel-title"],["class","tb-form-row",4,"ngIf"],["translate",""],["appearance","outline","subscriptSizing","dynamic",1,"number"],["matInput","","formControlName","mobileOrder","type","number","step","1",3,"placeholder"],["matInput","","formControlName","mobileHeight","type","number","min","1","step","1",3,"placeholder"],["formControlName","mobileHide",1,"mat-slide"],["formControlName","desktopHide",1,"mat-slide"],["class","mat-content",4,"ngIf","ngIfElse"],["class","tb-basic-mode-directive-error",4,"ngIf"],[1,"tb-basic-mode-directive-error"],[3,"formGroup"],["formControlName","actions"],[3,"formGroup",4,"ngIf"],["class","tb-form-panel",3,"formGroup",4,"ngIf"],["formControlName","timewindowConfig",3,"onlyHistoryTimewindow"],[1,"tb-form-panel",3,"formGroup"],[1,"flex","flex-row","items-center","justify-between"],["mat-button","","color","primary",3,"click"],["buttonMode","false","formControlName","alarmFilterConfig",3,"initialAlarmFilterConfig"],["formControlName","datasources",3,"configMode"],["formControlName","targetDevice"],["formControlName","alarmSource"],["matInput","","formControlName","pageSize","type","number","min","1","step","1"],["style","height: 100%;",3,"formGroup",4,"ngIf"],["class","tb-form-row space-between",4,"ngIf"],["class","tb-form-row column-xs",4,"ngIf"],["translate","",3,"tb-hint-tooltip-icon"],["formControlName","units",3,"supp
158ortsUnitConversion"],["matInput","","formControlName","decimals","type","number","min","0","max","15","step","1",3,"placeholder"],[1,"tb-form-row","column-xs"],["matInput","","formControlName","noDataDisplayMessage",3,"placeholder"],[2,"height","100%",3,"formGroup"],["formControlName","settings",3,"aliasController","callbacks","functionsOnly","dashboard","widget","widgetConfig"]],template:function(r,e){if(r&1&&(Ct(ihe),d(0,"div",6),x(1,she,5,1,"div",7)(2,bhe,97,73,"div",8)(3,xhe,4,2,"ng-template",null,0,kt)(5,Mhe,6,6,"ng-template",null,1,kt)(7,Vhe,3,3,"ng-template",null,2,kt),p()),r&2){let i=me(4);l(),m("ngIf",!e.hideHeader),l(),m("ngIf",e.widgetConfigMode===e.widgetConfigModes.advanced)("ngIfElse",i)}},styles:['@charset "UTF-8";.tb-widget-config[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-header[_ngcontent-%COMP%]{padding:24px 24px 0;display:flex;gap:12px;flex-direction:column-reverse;align-items:flex-start}@media screen and (min-width: 960px){.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-header[_ngcontent-%COMP%]{gap:0;flex-direction:row;align-items:center;justify-content:space-between}}.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-header[_ngcontent-%COMP%]   .tb-widget-config-header-components[_ngcontent-%COMP%]{width:100%;flex:1;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-content[_ngcontent-%COMP%]{flex:1;overflow:auto}.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-content[_ngcontent-%COMP%] > .mat-content[_ngcontent-%COMP%]{padding-top:8px}@media screen and (max-width: 599px){.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-content[_ngcontent-%COMP%] > .mat-content[_ngcontent-%COMP%]{padding-left:8px;padding-right:8px}}.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:16px}.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-content[_ngcontent-%COMP%]   .mat-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}@media screen and (max-width: 599px){.tb-widget-config[_ngcontent-%COMP%]   .tb-widget-config-content[_ngcontent-%COMP%]   .mat-content[_ngcontent-%COMP%]{gap:8px}}.tb-widget-config[_ngcontent-%COMP%]   .tb-basic-mode-directive-error[_ngcontent-%COMP%]{font-size:13px;font-weight:400;color:#dd2c00}[_nghost-%COMP%]     .tb-widget-config .tb-widget-config-header .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 20px}[_nghost-%COMP%]     .tb-widget-config .mat-mdc-tab-body-wrapper{position:absolute;inset:49px 0 0}']});var yp=fh;pe([fe(),le("design:type",Object)],yp.prototype,"hideHeader",void 0);pe([fe(),le("design:type",Object)],yp.prototype,"hideToggleHeader",void 0);pe([fe(),le("design:type",Object)],yp.prototype,"isAdd",void 0);pe([fe(),le("design:type",Object)],yp.prototype,"showLayoutConfig",void 0);pe([fe(),le("design:type",Object)],yp.prototype,"isDefaultBreakpoint",void 0);var KH=(()=>{let t=class t extends sn{set widgetConfig(e){this.widgetConfigValue=e,this.setupConfig(this.widgetConfigValue)}get widgetConfig(){return this.widgetConfigValue}get aliasController(){return this.widgetConfigComponent.aliasController}get callbacks(){return this.widgetConfigComponent.widgetConfigCallbacks}get functionsOnly(){return this.widgetConfigComponent.functionsOnly}get widgetType(){return this.widgetConfigComponent.widgetType}get widgetEditMode(){return this.widgetConfigComponent.widgetEditMode}get widget(){return this.widgetConfigComponent.widget}constructor(e,i){super(e),this.store=e,this.widgetConfigComponent=i,this.isAdd=!1,this.basicMode=Hc.basic,this.widgetConfigChangedEmitter=new J,this.widgetConfigChanged=this.widgetConfigChangedEmitter.asObservable(),this.destroyRef=Rt(En)}ngOnInit(){}ngAfterViewInit(){this.validateConfig()||setTimeout(()=>{this.onConfigChanged(this.prepareOutputConfig(this.configForm().getRawValue()))},0)}setupConfig(e){this.isAdd&&this.setupDefaults(e),this.onConfigSet(e),this.updateV
158alidators(!1);for(let i of this.validatorTriggers()){let o=i.split("."),a=this.configForm();for(let s of o)a=a.get(s);a.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateValidators(!0,i)})}this.configForm().valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.onConfigChanged(this.prepareOutputConfig(this.configForm().getRawValue()))})}setupDefaults(e){let i=e.typeParameters,o,a;i.defaultDataKeysFunction&&(o=i.defaultDataKeysFunction(this,e)),i.defaultLatestDataKeysFunction&&(a=i.defaultLatestDataKeysFunction(this,e)),o||(o=this.defaultDataKeys(e)),a||(a=this.defaultLatestDataKeys(e)),(o||a)&&this.setupDefaultDatasource(e,o,a)}defaultDataKeys(e){return null}defaultLatestDataKeys(e){return null}updateValidators(e,i){}validatorTriggers(){return[]}onConfigChanged(e){this.widgetConfigValue=e,this.widgetConfigChangedEmitter.emit(this.widgetConfigValue)}prepareOutputConfig(e){return e}validateConfig(){return this.configForm().valid}setupDefaultDatasource(e,i,o){let a=e.config.datasources;(!a||!a.length)&&(a=[{type:qi.device,dataKeys:[]}],e.config.datasources=a);let s=a[0].dataKeys;s||(s=[],a[0].dataKeys=s);let c=a[0].latestDataKeys;c||(c=[],a[0].latestDataKeys=c),i&&i.length&&(s.length=0,i.forEach(u=>{let f=this.constructDataKey(e,u,!1);s.push(f)})),o&&o.length&&(c.length=0,o.forEach(u=>{let f=this.constructDataKey(e,u,!0);c.push(f)}))}constructDataKey(e,i,o){let a=this.widgetConfigComponent.widgetConfigCallbacks.generateDataKey(i.name,i.type,e.dataKeySettingsForm,o,e.dataKeySettingsFunction);return i.label&&(a.label=i.label),i.units&&(a.units=i.units),De(i.decimals)&&(a.decimals=i.decimals),i.color&&(a.color=i.color),De(i.settings)&&(a.settings=i.settings),De(i.aggregationType)&&(a.aggregationType=i.aggregationType),De(i.comparisonEnabled)&&(a.comparisonEnabled=i.comparisonEnabled),De(i.timeForComparison)&&(a.timeForComparison=i.timeForComparison),De(i.comparisonCustomIntervalValue)&&(a.comparisonCustomIntervalValue=i.comparisonCustomIntervalValue),De(i.comparisonResultType)&&(a.comparisonResultType=i.comparisonResultType),a}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(yp))},t.\u0275dir=_e({type:t,features:[Ce]});let n=t;return n})();var Cp=(()=>{let t=class t{constructor(e,i,o,a){this.http=e,this.userPermissionsService=i,this.router=o,this.resourcesService=a,this.widgetsInfoInMemoryCache=new Map,this.widgetsBundleCacheSubject=null,this.basicWidgetSettingsComponentsMap={},this.widgetSettingsComponentsMap={},this.router.events.pipe(Pi(s=>s instanceof pf)).subscribe(()=>{this.invalidateWidgetsBundleCache()})}getWidgetScopeVariables(){return["tinycolor","cssjs","moment","$","jQuery"]}getAllWidgetsBundles(e){return this.loadWidgetsBundleCache(e).pipe(W(()=>this.allWidgetsBundles))}getSystemWidgetsBundles(e){return this.loadWidgetsBundleCache(e).pipe(W(()=>this.systemWidgetsBundles))}getTenantWidgetsBundles(e){return this.loadWidgetsBundleCache(e).pipe(W(()=>this.tenantWidgetsBundles))}getWidgetBundles(e,i=!1,o=!1,a=!1,s){return this.http.get(`/api/widgetsBundles${e.toQuery()}&tenantOnly=${o}&fullSearch=${i}&scadaFirst=${a}`,N(s))}getWidgetsBundle(e,i){return this.http.get(`/api/widgetsBundle/${e}`,N(i))}exportWidgetsBundle(e,i){return this.http.get(`/api/widgetsBundle/${e}?inlineImages=true`,N(i))}getWidgetsBundlesByIds(e,i){return this.http.get(`/api/widgetsBundles?widgetsBundleIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}saveWidgetsBundle(e,i){return this.http.post("/api/widgetsBundle",e,N(i)).pipe(et(()=>{this.invalidateWidgetsBundleCache()}))}updateWidgetsBundleWidgetTypes(e,i,o){return this.http.post(`/api/widgetsBundle/${e}/widgetTypes`,i,N(o))}updateWidgetsBundleWidgetFqns(e,i,o){return this.http.post(`/api/widgetsBundle/${e}/widgetTypeFqns`,i,N(o))}deleteWidgetsBundle(e,i){return this.http.delete(`/api/widgetsBundle/${e}`,N(i)).pipe(et(()=>this.invalidateWidgetsBundleCache()))}getBundleWidgetTypes(e,i){return this.http.get(`/api/widgetTypes?widgetsBundleId=${e}`,N(i))}exportBundleWidgetTypesDetails(e,i=!0,o){let a=`/api/widgetTypesDetails?widgetsBundleId=${e}`;return i&&(a+="&includeResources=true"),this.http.get(a,N(o))}
158getBundleWidgetTypeFqns(e,i){return this.http.get(`/api/widgetTypeFqns?widgetsBundleId=${e}`,N(i))}getBundleWidgetTypeInfosList(e,i){return this.getBundleWidgetTypeInfos(new On(1024),e,!1,vb.ALL,null,i).pipe(W(o=>o.data))}getBundleWidgetTypeInfos(e,i,o=!1,a=vb.ALL,s=null,c){let u=`/api/widgetTypesInfos${e.toQuery()}&widgetsBundleId=${i}&fullSearch=${o}&deprecatedFilter=${a}`;return s&&s.length&&(u+=`&widgetTypeList=${s.join(",")}`),this.http.get(u,N(c))}getWidgetType(e,i){return this.http.get(`/api/widgetType?fqn=${e}`,N(i))}saveWidgetTypeDetails(e,i,o,a,s){let c=Wj(e,i,void 0,o,a);return this.http.post("/api/widgetType",c,N(s)).pipe(et(u=>{this.widgetTypeUpdated(u)}))}saveImportedWidgetTypeDetails(e,i){return this.http.post("/api/widgetType?updateExistingByFqn=true",e,N(i)).pipe(et(o=>{this.widgetTypeUpdated(o)}))}getWidgetTypeById(e,i){return this.http.get(`/api/widgetType/${e}`,N(i))}exportWidgetType(e,i=!0,o){let a=`/api/widgetType/${e}`;return i&&(a+="?includeResources=true"),this.http.get(a,N(o))}getWidgetTypeInfoById(e,i){return this.http.get(`/api/widgetTypeInfo/${e}`,N(i))}saveWidgetType(e,i){return this.http.post("/api/widgetType",e,N(i))}deleteWidgetType(e,i){return this.getWidgetTypeById(e,i).pipe(Ft(o=>this.http.delete(`/api/widgetType/${e}`,N(i)).pipe(et(()=>{this.widgetTypeUpdated(o)}))))}getWidgetTypes(e,i=!1,o=!1,a=!1,s=vb.ALL,c=null,u){let f=`/api/widgetTypes${e.toQuery()}&tenantOnly=${i}&fullSearch=${o}
159      &scadaFirst=${a}&deprecatedFilter=${s}`;return c&&c.length&&(f+=`&widgetTypeList=${c.join(",")}`),this.http.get(f,N(u))}addWidgetFqnToWidgetBundle(e,i,o){return this.getBundleWidgetTypeFqns(e,o).pipe(Ft(a=>(a.push(i),this.updateWidgetsBundleWidgetFqns(e,a,o))))}getWidgetTemplate(e,i){let o=$5.get(e);return this.getWidgetType(o.template.fullFqn,i).pipe(W(a=>{a=q5(a);let s=qj(a);return s.fullFqn=void 0,s}))}clearWidgetInfoInMemoryCache(){this.widgetsInfoInMemoryCache.clear()}getWidgetInfoFromCache(e){return this.widgetsInfoInMemoryCache.get(e)}putWidgetInfoToCache(e){this.widgetsInfoInMemoryCache.set(e.fullFqn,e)}registerBasicWidgetConfigComponents(e){Object.assign(this.basicWidgetSettingsComponentsMap,this.resourcesService.extractComponentsFromModule(e,KH))}getBasicWidgetSettingsComponentBySelector(e){return this.basicWidgetSettingsComponentsMap[e]}putBasicWidgetSettingsComponentToMap(e,i){this.basicWidgetSettingsComponentsMap[e]=i}registerWidgetSettingsComponents(e){Object.assign(this.widgetSettingsComponentsMap,this.resourcesService.extractComponentsFromModule(e,X5))}getWidgetSettingsComponentTypeBySelector(e){return this.widgetSettingsComponentsMap[e]}putWidgetSettingsComponentToMap(e,i){this.widgetSettingsComponentsMap[e]=i}widgetTypeUpdated(e){this.deleteWidgetInfoFromCache(U5(e))}deleteWidgetInfoFromCache(e){this.widgetsInfoInMemoryCache.delete(e)}loadWidgetsBundleCache(e){if(this.allWidgetsBundles)return Z(null);if(this.widgetsBundleCacheSubject)return this.widgetsBundleCacheSubject.asObservable();{let i=new or;return this.widgetsBundleCacheSubject=i,this.userPermissionsService.hasGenericPermission(Ei.WIDGETS_BUNDLE,qo.READ)?this.http.get("/api/widgetsBundles",N(e)).subscribe(o=>{this.allWidgetsBundles=o,this.systemWidgetsBundles=new Array,this.tenantWidgetsBundles=new Array,this.allWidgetsBundles=this.allWidgetsBundles.sort((a,s)=>{let c=a.title.localeCompare(s.title);return c===0&&(c=s.createdTime-a.createdTime),c}),this.allWidgetsBundles.forEach(a=>{a.tenantId.id===Oa?this.systemWidgetsBundles.push(a):this.tenantWidgetsBundles.push(a)}),i.next(),i.complete(),this.widgetsBundleCacheSubject=null},()=>{i.error(null),this.widgetsBundleCacheSubject=null}):(this.allWidgetsBundles=[],this.systemWidgetsBundles=[],this.tenantWidgetsBundles=[],i.next(),i.complete(),this.widgetsBundleCacheSubject=null),i.asObservable()}}invalidateWidgetsBundleCache(){this.allWidgetsBundles=void 0,this.systemWidgetsBundles=void 0,this.tenantWidgetsBundles=void 0,this.widgetsBundleCacheSubject=void 0}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(So),X(vi),X(uc))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();y();var zo=function(n){return n.PSK="PSK",n.RPK="RPK",n.X509="X509",n.NO_SEC="NO_SEC",n}(zo||{}),vMt=new Map([[zo.PSK,"Pre-Shared Key"],[zo.RPK,"Raw Public Key"],[zo.X509,"X.509 Certificate"],[zo.NO_SEC,"
159No Security"]]),yMt=new Map([[zo.PSK,"device.lwm2m-security-config.client-publicKey-or-id-tooltip-psk"],[zo.RPK,"device.lwm2m-security-config.client-publicKey-or-id-tooltip-rpk"],[zo.X509,"device.lwm2m-security-config.client-publicKey-or-id-tooltip-x509"]]),CMt=new Map([[zo.PSK,"device.lwm2m-security-config.client-secret-key-tooltip-psk"],[zo.RPK,"device.lwm2m-security-config.client-secret-key-tooltip-prk"],[zo.X509,"device.lwm2m-security-config.client-secret-key-tooltip-x509"]]),wMt=new Map([[zo.PSK,"device.lwm2m-security-config.client-secret-key-tooltip-psk"],[zo.RPK,"device.lwm2m-security-config.client-secret-key-tooltip-prk"]]);function xMt(n,t=""){let r={securityConfigClientMode:n,endpoint:t,identity:"",key:""};switch(n){case zo.X509:r=Lt(re({},r),{cert:""});break;case zo.PSK:r=Lt(re({},r),{identity:t,key:""});break;case zo.RPK:r=Lt(re({},r),{key:""});break}return r}function SMt(){return{securityMode:zo.NO_SEC}}var HI=(()=>{let t=class t{constructor(e,i){this.http=e,this.otaPackageService=i,this.lwm2mBootstrapSecurityInfoInMemoryCache=new Map}getDeviceProfiles(e,i){return this.http.get(`/api/deviceProfiles${e.toQuery()}`,N(i))}getDeviceProfile(e,i){return this.http.get(`/api/deviceProfile/${e}`,N(i))}exportDeviceProfile(e,i){return this.http.get(`/api/deviceProfile/${e}?inlineImages=true`,N(i))}getLwm2mObjects(e,i,o,a){let s=`/api/resource/lwm2m?sortProperty=${e.property}&sortOrder=${e.direction}`;return De(i)&&i.length>0&&(s+=`&objectIds=${i}`),De(o)&&!bS(o)&&(s+=`&searchText=${o}`),this.http.get(s,N(a))}getLwm2mBootstrapSecurityInfo(e,i){let o=this.lwm2mBootstrapSecurityInfoInMemoryCache.get(e);return o?Z(o):this.http.get(`/api/lwm2m/deviceProfile/bootstrap/${e}`,N(i)).pipe(et(a=>this.lwm2mBootstrapSecurityInfoInMemoryCache.set(e,a)))}getLwm2mBootstrapSecurityInfoBySecurityType(e,i=zo.NO_SEC,o){return this.getLwm2mBootstrapSecurityInfo(e,o).pipe(W(a=>{let s=Di(a);if(s)switch(i){case zo.PSK:s.port=s.securityPort,s.host=s.securityHost,s.serverPublicKey="";break;case zo.RPK:case zo.X509:s.port=s.securityPort,s.host=s.securityHost;break;case zo.NO_SEC:s.serverPublicKey="";break}return s}))}getLwm2mObjectsPage(e,i){return this.http.get(`/api/resource/lwm2m/page${e.toQuery()}`,N(i))}saveDeviceProfileAndConfirmOtaChange(e,i,o){return this.otaPackageService.confirmDialogUpdatePackage(i,e).pipe(Ft(a=>a?this.saveDeviceProfile(i,o):zr("Canceled saving device profiles")))}saveDeviceProfile(e,i){return this.http.post("/api/deviceProfile",e,N(i))}deleteDeviceProfile(e,i){return this.http.delete(`/api/deviceProfile/${e}`,N(i))}setDefaultDeviceProfile(e,i){return this.http.post(`/api/deviceProfile/${e}/default`,N(i))}getDefaultDeviceProfileInfo(e){return this.http.get("/api/deviceProfileInfo/default",N(e))}getDeviceProfileInfo(e,i){return this.http.get(`/api/deviceProfileInfo/${e}`,N(i))}getDeviceProfileInfos(e,i,o){let a=`/api/deviceProfileInfos${e.toQuery()}`;return De(i)&&(a+=`&transportType=${i}`),this.http.get(a,N(o))}getDeviceProfilesByIds(e,i){return this.http.get(`/api/deviceProfileInfos?deviceProfileIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getDeviceProfileDevicesAttributesKeys(e,i){let o="/api/deviceProfile/devices/keys/attributes";return De(e)&&(o+=`?deviceProfileId=${e}`),this.http.get(o,N(i))}getDeviceProfileDevicesTimeseriesKeys(e,i){let o="/api/deviceProfile/devices/keys/timeseries";return De(e)&&(o+=`?deviceProfileId=${e}`),this.http.get(o,N(i))}getDeviceProfileNames(e=!1,i){let o="/api/deviceProfile/names";return De(e)&&(o+=`?activeOnly=${e}`),this.http.get(o,N(i))}};
159t.\u0275fac=function(i){return new(i||t)(X(Jt),X(oh))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var qI=(()=>{let t=class t{constructor(e){this.http=e,this.parseQueueStatName=i=>Object.defineProperty(i,"name",{get(){return`${this.queueName} (${this.serviceId})`}})}getQueueById(e,i){return this.http.get(`/api/queues/${e}`,N(i))}getQueueByName(e,i){return this.http.get(`/api/queues/name/${e}`,N(i))}getTenantQueuesByServiceType(e,i,o){return this.http.get(`/api/queues${e.toQuery()}&serviceType=${i}`,N(o))}saveQueue(e,i,o){return this.http.post(`/api/queues?serviceType=${i}`,e,N(o))}deleteQueue(e){return this.http.delete(`/api/queues/${e}`)}getQueueStatistics(e,i){return this.http.get(`/api/queueStats${e.toQuery()}`,N(i)).pipe(W(o=>(o.data.map(a=>this.parseQueueStatName(a)),o)))}getQueueStatisticsById(e,i){return this.http.get(`/api/queueStats/${e}`,N(i)).pipe(W(o=>this.parseQueueStatName(o)))}getQueueStatisticsByIds(e,i){return this.http.get(`/api/queueStats?QueueStatsIds=${e.join(",")}`,N(i)).pipe(W(o=>o.map(a=>this.parseQueueStatName(a))))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var WI=(()=>{let t=class t{constructor(e){this.http=e}getAssetProfiles(e,i){return this.http.get(`/api/assetProfiles${e.toQuery()}`,N(i))}getAssetProfile(e,i){return this.http.get(`/api/assetProfile/${e}`,N(i))}exportAssetProfile(e,i){return this.http.get(`/api/assetProfile/${e}?inlineImages=true`,N(i))}saveAssetProfile(e,i){return this.http.post("/api/assetProfile",e,N(i))}deleteAssetProfile(e,i){return this.http.delete(`/api/assetProfile/${e}`,N(i))}setDefaultAssetProfile(e,i){return this.http.post(`/api/assetProfile/${e}/default`,N(i))}getDefaultAssetProfileInfo(e){return this.http.get("/api/assetProfileInfo/default",N(e))}getAssetProfileInfo(e,i){return this.http.get(`/api/assetProfileInfo/${e}`,N(i))}getAssetProfileInfos(e,i){return this.http.get(`/api/assetProfileInfos${e.toQuery()}`,N(i))}getAssetProfilesByIds(e,i){return this.http.get(`/api/assetProfileInfos?assetProfileIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}getAssetProfileNames(e=!1,i){let o="/api/assetProfile/names";return De(e)&&(o+=`?activeOnly=${e}`),this.http.get(o,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var gh=(()=>{let t=class t{constructor(e){this.http=e}getNotifications(e,i=!1,o){return this.http.get(`/api/notifications${e.toQuery()}&unreadOnly=${i}`,N(o))}deleteNotification(e,i){return this.http.delete(`/api/notification/${e}`,N(i))}markNotificationAsRead(e,i){return this.http.put(`/api/notification/${e}/read`,N(i))}markAllNotificationsAsRead(e){return this.http.put("/api/notifications/read",N(e))}createNotificationRequest(e,i){return this.http.post("/api/notification/request",e,N(i))}getNotificationRequestById(e,i){return this.http.get(`/api/notification/request/${e}`,N(i))}getAvailableDeliveryMethods(e){return this.http.get("/api/notification/deliveryMethods",N(e))}deleteNotificationRequest(e,i){return this.http.delete(`/api/notification/request/${e}`,N(i))}getNotificationRequestPreview(e,i){return this.http.post("/api/notification/request/preview",e,N(i))}getNotificationRequests(e,i){return this.http.get(`/api/notification/requests${e.toQuery()}`,N(i))}getNotificationSettings(e){return this.http.get("/api/notification/settings",N(e))}saveNotificationSettings(e,i){return this.http.post("/api/notification/settings",e,N(i))}listSlackConversations(e,i,o){let a=`/api/notification/slack/conversations?type=${e}`;return fn(i)&&(a+=`&token=${i}`),this.http.get(a,N(o))}saveNotificationRule(e,i){return this.http.post("/api/notification/rule",e,N(i))}getNotificationRuleById(e,i){return this.http.get(`/api/notification/rule/${e}`,N(i))}deleteNotificationRule(e,i){return this.http.delete(`/api/notification/rule/${e}`,N(i))}getNotificationRules(e,i){return this.http.get(`/api/notification/rules${e.toQuery()}`,N(i))}saveNotificationTarget(e,i){return this.http.post("/api/notification/target",e,N(i))}getNotificationTargetById(e,i){return this.http.get(`/api/notification/target/${e}`,N(i))}deleteNotificationTarget(e,i){return this.http.delete(`/api/notification/target/${e}`,N(i))}getNotificationTargetsByIds(e,i){return this.http.get(`/api/notification/targets?ids=${e.join(",")}`,N(i))}getNotificationTargets(e,i,o){let a=`/api/notification/targets${e.toQuery()}`;return fn(i)&&(a+=`&notificationType=${i}`),this.http.get(a,N(o))}getRecipientsForNotificationTargetConfig(e,i,o){return this.http.post(`/api/notification/target/recipients${i.toQuery()}`,e,N(o))}saveNotificationTemplate(e,i){return this.http.post("/api/notification/template",e,N(i))}getNotificationTemplateById(e,i){return this.http.get(`/api/notification/template/${e}`,N(i))}deleteNotificationTemplate(e,i){return this.http.delete(`/api/notification/template/${e}`,N(i))}getNotificationTemplates(e,i,o){let a=`/api/notification/templates${e.toQuery()}`;return fn(i)&&(a+=`&notificationTypes=${i}`),this.http.get(a,N(o))}getNotificationUserSettings(e){return this.http.get("/api/notification/settings/user",N(e))}saveNotificationUserSettings(e,i){return this.http.post("/api/notification/settings/user",e,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var QI=(()=>{let t=class t{constructor(e){this.http=e}getTenantProfiles(e,i){return this.http.get(`/api/tenantProfiles${e.toQuery()}`,N(i))}getTenantProfile(e,i){return this.http.get(`/api/tenantProfile/${e}`,N(i))}saveTenantProfile(e,i){return this.http.post("/api/tenantProfile",e,N(i))}deleteTenantProfile(e,i){return this.http.delete(`/api/tenantProfile/${e}`,N(i))}setDefaultTenantProfile(e,i){return this.http.post(`/api/tenantProfile/${e}/default`,N(i))}getDefaultTenantProfileInfo(e){return this.http.get("/api/tenantProfileInfo/default",N(e))}getTenantProfileInfo(e,i){return this.http.get(`/api/tenantProfileInfo/${e}`,N(i))}getTenantProfileInfos(e,i){return this.http.get(`/api/tenantProfileInfos${e.toQuery()}`,N(i))}getTenantProfilesByIds(e,i){return this.http.get(`/api/tenantProfiles?ids=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var KI=(()=>{let t=class t{constructor(e){this.http=e}getAlarm(e,i){return this.http.get(`/api/alarm/${e}`,N(i))}getAlarmInfo(e,i){return this.http.get(`/api/alarm/info/${e}`,N(i))}saveAlarm(e,i){return this.http.post("/api/alarm",e,N(i))}ackAlarm(e,i){return this.http.post(`/api/alarm/${e}/ack`,null,N(i))}clearAlarm(e,i){return this.http.post(`/api/alarm/${e}/clear`,null,N(i))}assignAlarm(e,i,o){return this.http.post(`/api/alarm/${e}/assign/${i}`,null,N(o))}unassignAlarm(e,i){return this.http.delete(`/api/alarm/${e}/assign`,N(i))}deleteAlarm(e,i){return this.http.delete(`/api/alarm/${e}`,N(i))}getAlarms(e,i){return this.http.get(`/api/alarm${e.toQuery()}`,N(i))}getAlarmsV2(e,i){return this.http.get(`/api/v2/alarm${e.toQuery()}`,N(i))}getAllAlarms(e,i){return this.http.get(`/api/alarms${e.toQuery()}`,N(i))}getAllAlarmsV2(e,i){return this.http.get(`/api/v2/alarms${e.toQuery()}`,N(i))}getHighestAlarmSeverity(e,i,o,a){let s=`/api/alarm/highestSeverity/${e.entityType}/${e.id}`;return i?s+=`?searchStatus=${i}`:o&&(s+=`?status=${o}`),this.http.get(s,N(a))}getAlarmTypes(e,i){return this.http.get(`/api/alarm/types${e.toQuery()}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var XI=(()=>{let t=class t{constructor(e,i){this.http=e,this.resourcesService=i}getResources(e,i,o,a){let s=`/api/resource${e.toQuery()}`;return fn(i)&&(s+=`&resourceType=${i}`),fn(o)&&(s+=`&resourceSubType=${o}`),this.http.get(s,N(a))}getTenantResources(e,i){return this.http.get(`/api/resource/tenant${e.toQuery()}`,N(i))}getResource(e,i){return this.http.get(`/api/resource/${e}`,N(i))}getResourceInfoById(e,i){return this.http.get(`/api/resource/info/${e}`,N(i))}getResourceInfo(e,i,o,a){return this.http.get(`/api/resource/${e}/${i}/${o}/info`,N(a))}downloadResource(e){return this.resourcesService.downloadResource(`/api/resource/${e}/download`)}saveResources(e,i){let o=100;o=e.length>
159o?o:e.length;let a=[];for(let s=0;s<o;s++)a.push(this.saveResource(e[s],i).pipe(vt(()=>Z({}))));return Rn(a).pipe(Ft(s=>(e.splice(0,o),e.length?this.saveResources(e,i):Z(s))))}saveResource(e,i){return this.http.post("/api/resource",e,N(i))}deleteResource(e,i=!1,o){return this.http.delete(`/api/resource/${e}?force=${i}`,N(o))}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(uc))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var n8=(()=>{let t=class t{constructor(e){this.http=e}getOAuth2Template(e){return this.http.get("/api/oauth2/config/template",N(e))}saveOAuth2Client(e,i){return this.http.post("/api/oauth2/client",e,N(i))}findTenantOAuth2ClientInfos(e,i){return this.http.get(`/api/oauth2/client/infos${e.toQuery()}`,N(i))}findTenantOAuth2ClientInfosByIds(e,i){return this.http.get(`/api/oauth2/client/infos?clientIds=${e.join(",")}`,N(i))}getOAuth2ClientById(e,i){return this.http.get(`/api/oauth2/client/${e}`,N(i))}deleteOauth2Client(e,i){return this.http.delete(`/api/oauth2/client/${e}`,N(i))}getLoginProcessingUrl(e){return this.http.get("/api/oauth2/loginProcessingUrl",N(e))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var r8=(()=>{let t=class t{constructor(e){this.http=e}saveMobileApp(e,i){return this.http.post("/api/mobile/app",e,N(i))}getTenantMobileAppInfos(e,i,o){let a=`/api/mobile/app${e.toQuery()}`;return i&&(a+=`&platformType=${i}`),this.http.get(a,N(o))}getMobileAppInfoById(e,i){return this.http.get(`/api/mobile/app/${e}`,N(i))}deleteMobileApp(e,i){return this.http.delete(`/api/mobile/app/${e}`,N(i))}saveMobileAppBundle(e,i,o){let a="/api/mobile/bundle";return i?.length&&(a+=`?oauth2ClientIds=${i.join(",")}`),this.http.post(a,e,N(o))}updateOauth2Clients(e,i,o){return this.http.put(`/api/mobile/bundle/${e}/oauth2Clients`,i??[],N(o))}getTenantMobileAppBundleInfos(e,i){return this.http.get(`/api/mobile/bundle/infos${e.toQuery()}`,N(i))}getMobileAppBundleInfoById(e,i){return this.http.get(`/api/mobile/bundle/info/${e}`,N(i))}deleteMobileAppBundle(e,i){return this.http.delete(`/api/mobile/bundle/${e}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var o8=(()=>{let t=class t{constructor(e){this.http=e}saveDomain(e,i,o){let a="/api/domain";return i?.length&&(a+=`?oauth2ClientIds=${i.join(",")}`),this.http.post(a,e,N(o))}updateOauth2Clients(e,i,o){return this.http.put(`/api/domain/${e}/oauth2Clients`,i,N(o))}getDomainInfos(e,i){return this.http.get(`/api/domain/infos${e.toQuery()}`,N(i))}getDomainInfoById(e,i){return this.http.get(`/api/domain/info/${e}`,N(i))}deleteDomain(e,i){return this.http.delete(`/api/domain/${e}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var a8=(()=>{let t=class t{constructor(e){this.http=e}saveAiModel(e,i){return this.http.post("/api/ai/model",e,N(i))}getAiModels(e,i){return this.http.get(`/api/ai/model${e.toQuery()}`,N(i))}getAiModelById(e,i){return this.http.get(`/api/ai/model/${e}`,N(i))}deleteAiModel(e,i){return this.http.delete(`/api/ai/model/${e}`,N(i))}checkConnectivity(e,i){return this.http.post("/api/ai/model/chat",e,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var Fv=(()=>{let t=class t{constructor(e){this.http=e}getReportTemplate(e,i){return this.http.get(`/api/reportTemplate/${e}`,N(i))}getReportTemplateInfo(e,i){return this.http.get(`/api/reportTemplate/info/${e}`,N(i))}saveReportTemplate(e,i){return this.http.post("/api/reportTemplate",e,N(i))}deleteReportTemplate(e,i){return this.http.delete(`/api/reportTemplate/${e}`,N(i))}getAllReportTemplateInfos(e,i){return this.http.get(`/api/reportTemplateInfos/all${e.toQuery()}`,N(i))}getReportTemplatesByIds(e,i){return this.http.get(`/api/reportTemplates?reportTemplateIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var Oc=function(n){return n.REPORT="REPORT",n.SUB_REPORT="SUB_REPORT",n}(Oc||{}),C2t=Object.keys(Oc),w2t=new Map([[Oc.REPORT,"report-template.type-report"],[Oc.SUB_REPORT,"report-template.type-sub-report"]]),x2t=n=>{let t=[];for(let r of Object.keys(n))t.push(n[r]);return t},S2t=n=>{let t={};if(n)for(let r of n)t[r.id]=r;return t},T2t=n=>{let t=[];for(let r of Object.keys(n))t.push($he(n[r]));return t},E2t=n=>{let t={};if(n)for(let r of n)t[r.id]=zhe(r);return t},zhe=n=>{let t=DU(n.keyFilters);return{id:n.id,filter:n.filter,keyFilters:t,editable:!1}},$he=n=>{let t=kU(n.keyFilters);return{id:n.id,filter:n.filter,keyFilters:t}},yd=function(n){return n.PDF="PDF",n.CSV="CSV",n}(yd||{}),I2t=Object.keys(yd),Ps=function(n){return n.A4="A4",n.LETTER="LETTER",n.LEGAL="LEGAL",n.A5="A5",n.A3="A3",n.TABLOID="TABLOID",n}(Ps||{}
159),k2t=Object.keys(Ps),D2t=new Map([[Ps.A4,"A4"],[Ps.LETTER,"US Letter"],[Ps.LEGAL,"US Legal"],[Ps.A5,"A5"],[Ps.A3,"A3"],[Ps.TABLOID,"Tabloid"]]),M2t=new Map([[Ps.A4,[595,842]],[Ps.LETTER,[612,792]],[Ps.LEGAL,[612,1008]],[Ps.A5,[420,595]],[Ps.A3,[842,1191]],[Ps.TABLOID,[792,1224]]]),Nv=function(n){return n.PORTRAIT="PORTRAIT",n.LANDSCAPE="LANDSCAPE",n}(Nv||{}),A2t=Object.keys(Nv),O2t=new Map([[Nv.PORTRAIT,"report-template.orientation-portrait"],[Nv.LANDSCAPE,"report-template.orientation-landscape"]]),P2t=n=>typeof n=="object"&&n!==null&&"format"in n&&n.format===yd.PDF,R2t=n=>{let t={name:n.name,namePattern:n.configuration.namePattern,timeDataPattern:n.configuration.timeDataPattern,description:n.description};if(n.format===yd.PDF){let r=t,e=n.configuration;r.pageSize=e.pageSize,r.pageOrientation=e.pageOrientation,r.pageMargins=e.pageMargins,r.pageBackground=e.pageBackground}return t},F2t=(n,t)=>{if(n.name=t.name,n.configuration.namePattern=t.namePattern,n.configuration.timeDataPattern=t.timeDataPattern,n.description=t.description,n.format===yd.PDF){let r=n.configuration,e=t;r.pageSize=e.pageSize,r.pageOrientation=e.pageOrientation,r.pageMargins=e.pageMargins,r.pageBackgroun
159d=e.pageBackground}},N2t=(n,t)=>n===t||(ga(n)||sc(n))&&(ga(t)||sc(t))?!0:De(n)&&De(t)?!(!hf(n.typeList,t.typeList)||!hf(n.formatList,t.formatList)):!1,Vv=class{constructor(t,r){this.pageLink=t,this.formatList=r.formatList,this.typeList=r.typeList}toQuery(){let t=this.pageLink.toQuery();return this.formatList&&this.formatList.length&&(t+=`&formatList=${this.formatList.join(",")}`),this.typeList&&this.typeList.length&&(t+=`&typeList=${this.typeList.join(",")}`),t}},V2t={format:yd.PDF,namePattern:"report-%d{yyyy-MM-dd_HH:mm:ss}",timeDataPattern:"yyyy-MM-dd HH:mm:ss",pageSize:Ps.A4,pageOrientation:Nv.PORTRAIT,pageMargins:{left:20,right:20,top:20,bottom:20},pageBackground:"#fff",header:{enabled:!0,components:[]},footer:{enabled:!0,components:[]},entityAliases:[],filters:[],components:[]},L2t={format:yd.CSV,namePattern:"report-%d{yyyy-MM-dd_HH:mm:ss}",timeDataPattern:"yyyy-MM-dd HH:mm:ss",entityAliases:[],filters:[],components:[]},B2t=n=>{n.format||(n.format=yd.PDF),n.configuration.format||(n.configuration.format=n.format);let t=n.configuration;if(t.components||(t.components=[]),t.components=t.components.map(r=>RF(r)),n.configuration.format===yd.PDF){let r=n.configuration;r.pageSize||(r.pageSize=Ps.A4),r.pageOrientation||(r.pageOrientation=Nv.PORTRAIT),r.pageMargins||(r.pageMargins={left:20,right:20,top:20,bottom:20}
159),r.pageBackground||(r.pageBackground="#fff"),r.header=s8(r.header),r.footer=s8(r.footer)}return n},s8=n=>(n||(n={enabled:!0,components:[],firstPage:{enabled:!1,components:[]}}),n.components||(n.components=[]),n.components=n.components.map(t=>RF(t)),n.firstPage||(n.firstPage={enabled:!1,components:[]}),n.firstPage.components||(n.firstPage.components=[]),n.firstPage.components=n.firstPage.components.map(t=>RF(t)),n),RF=n=>n,j2t=(n,t)=>n===t||(ga(n)||sc(n))&&(ga(t)||sc(t))?!0:De(n)&&De(t)?!(!uf(n.reportTemplateId,t.reportTemplateId)||!uf(n.userId,t.userId)):!1,l8=class{constructor(t,r){this.pageLink=t,this.reportTemplateId=r.reportTemplateId,this.userId=r.userId}toQuery(){let t=this.pageLink.toQuery()+"&includeCustomers=true";return this.reportTemplateId?.id&&(t+=`&reportTemplateId=${this.reportTemplateId.id}`),this.userId?.id&&(t+=`&userId=${this.userId.id}`),t}};y();var c8=(()=>{let t=class t{constructor(e,i,o){this.window=e,this.document=i,this.http=o}getReport(e,i){return this.http.get(`/api/v2/report/${e}`,N(i))}deleteReport(e,i){return this.http.delete(`/api/v2/report/${e}`,N(i))}getReports(e,i){return this.http.get(`/api/v2/reports${e.toQuery()}`,N(i))}getReportInfos(e,i){return this.http.get(`/api/v2/reportInfos/all${e.toQuery()}`,N(i))}downloadReport(e){let i=`/api/v2/report/${e}/download`,o=this.http.get(i,{responseType:"arraybuffer",observe:"response"});return this.processDownloadReportResponse(o)}downloadTestReport(e,i=!0){let a=this.http.post("/api/v2/report/test",e,{responseType:"arraybuffer",observe:"response"});return this.processDownloadReportResponse(a,i)}getReportsInfosByIds(e,i){return this.http.get(`/api/v2/reportInfos?reportIds=${e.join(",")}`,N(i)).pipe(W(o=>fr(o,e)))}processDownloadReportResponse(e,i=!0){return e.pipe(W(o=>{let a=o.headers,s=a.get("content-type"),c=new Blob([o.body],{type:s}),u=URL.createObjectURL(c);if(i){let f=a.get("x-filename"),_=this.document.createElement("a");_.setAttribute("href",u),_.setAttribute("download",f);let I=new MouseEvent("click",{view:this.window,bubbles:!0,cancelable:!1});_.dispatchEvent(I)}else this.window.open(u,"_blank");return null}))}};t.\u0275fac=function(i){return new(i||t)(X(Wr),X(Qi),X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var rr=(()=>{let t=class t{constructor(e,i,o,a,s,c,u,f,_,I,S,F,H,q,ee,Ie,He,Le,qe,ue,Ne,st,Ui,Oe,wt,ei,wi,pn,Ki,It,ai,ti,ri,li,rn,ji){this.http=e,this.store=i,this.deviceService=o,this.assetService=a,this.entityViewService=s,this.edgeService=c,this.tenantService=u,this.customerService=f,this.userService=_,this.ruleChainService=I,this.dashboardService=S,this.entityRelationService=F,this.attributeService=H,this.otaPackageService=q,this.widgetService=ee,this.deviceProfileService=Ie,this.tenantProfileService=He,this.assetProfileService=Le,this.converterService=qe,this.integrationService=ue,this.schedulerEventService=Ne,this.blobEntityService=st,this.reportTemplateService=Ui,this.reportService=Oe,this.roleService=wt,this.entityGroupService=ei,this.userPermissionsService=wi,this.utils=pn,this.queueService=Ki,this.notificationService=It,this.alarmService=ai,this.resourceService=ti,this.oauth2Service=ri,this.mobileAppService=li,this.domainService=rn,this.aiModelService=ji}getEntityObservable(e,i,o){let a;switch(e){case G.DEVICE:a=this.deviceService.getDevice(i,o);break;case G.ASSET:a=this.assetService.getAsset(i,o);break;case G.ENTITY_VIEW:a=this.entityViewService.getEntityView(i,o);break;case G.EDGE:a=this.edgeService.getEdge(i,o);break;case G.TENANT:a=this.tenantService.getTenant(i,o);break;case G.CUSTOMER:a=this.customerService.getCustomer(i,o);break;case G.DASHBOARD:o&&o.loadEntityDetails?a=this.dashboardService.getDashboard(i,o):a=this.dashboardService.getDashboardInfo(i,o);break;case G.USER:a=this.userService.getUser(i,o);break;case G.RULE_CHAIN:a=this.ruleChainService.getRuleChain(i,o);break;case G.ALARM:a=this.alarmService.getAlarm(i,o);break;case G.CONVERTER:a=this.converterService.getConverter(i,o);break;case G.INTEGRATION:a=this.integrationService.getIntegration(i,o);break;case G.SCHEDULER_EVENT:a=this.schedulerEventService.getSchedulerEventInfo(i,o);break;case G.BLOB_ENTITY:a=this.blobEntityService.getBlobEntityInfo(i,o);break;case G.REPORT_TEMPLATE:o&&o.loadEntityDetails?a=this.reportTemplateService.getReportTemplate(i,o):a=this.reportTemplateService.getReportTemplateInfo(i,o);break;case G.REPORT:a=this.reportService.getReport(i,o);break;case G.ROLE:a=this.roleService.getRole(i,o);break;case G.ENTITY_GROUP:a=this.entityGroupService.getEntityGroup(i,o);break;
159case G.OTA_PACKAGE:a=this.otaPackageService.getOtaPackageInfo(i,o);break;case G.QUEUE:a=this.queueService.getQueueById(i,o);break;case G.QUEUE_STATS:a=this.queueService.getQueueStatisticsById(i,o);break;case G.MOBILE_APP:a=this.mobileAppService.getMobileAppInfoById(i,o);break;case G.MOBILE_APP_BUNDLE:a=this.mobileAppService.getMobileAppBundleInfoById(i,o);break;case G.NOTIFICATION_TARGET:a=this.notificationService.getNotificationTargetById(i,o);break;case G.DOMAIN:a=this.domainService.getDomainInfoById(i,o);break;case G.AI_MODEL:a=this.aiModelService.getAiModelById(i,o);break}return a}saveEntityObservable(e,i){let o,a=e.id.entityType;switch(e.id.id||delete e.id,a){case G.DEVICE:o=this.deviceService.saveDevice(e,null,i);break;case G.ASSET:o=this.assetService.saveAsset(e,null,i);break;case G.ENTITY_VIEW:o=this.entityViewService.saveEntityView(e,null,i);break;case G.EDGE:o=this.edgeService.saveEdge(e,null,i);break;case G.TENANT:o=this.tenantService.saveTenant(e,i);break;case G.CUSTOMER:o=this.customerService.saveCustomer(e,null,i);break;case G.DASHBOARD:o=this.dashboardService.saveDashboard(e,null,i);break;case G.USER:o=this.userService.saveUser(e,!1,null,i);break;case G.RULE_CHAIN:o=this.ruleChainService.saveRuleChain(e,i);break;case G.ALARM:console.error("Save Alarm Entity is not implemented!");break;case G.CONVERTER:o=this.converterService.saveConverter(e,i);break;case G.INTEGRATION:o=this.integrationService.saveIntegration(e,i);break;case G.SCHEDULER_EVENT:o=this.schedulerEventService.saveSchedulerEvent(e,i);break;case G.REPORT_TEMPLATE:o=this.reportTemplateService.saveReportTemplate(e,i);break;case G.REPORT:console.error("Save Report Entity is not implemented!");break;case G.ROLE:o=this.roleService.saveRole(e,i);break}return o}getEntity(e,i,o){let a=this.getEntityObservable(e,i,o);return a||zr(null)}saveEntity(e,i){let o=this.saveEntityObservable(e,i);return o||zr(null)}saveGroupEntityObservable(e,i,o){let a,s=e.id.entityType;switch(e.id.id||delete e.id,s){case G.DEVICE:a=this.deviceService.saveDevice(e,i,o);break;case G.ASSET:a=this.assetService.saveAsset(e,i,o);break;case G.ENTITY_VIEW:a=this.entityViewService.saveEntityView(e,i,o);break;case G.EDGE:a=this.edgeService.saveEdge(e,i,o);break;case G.CUSTOMER:a=this.customerService.saveCustomer(e,i,o);break;case G.DASHBOARD:a=this.dashboardService.saveDashboard(e,i,o);break;case G.USER:a=this.userService.saveUser(e,!1,i,o);break}return a}saveGroupEntity(e,i,o){let a=this.saveGroupEntityObservable(e,i,o);return a||zr(null)}getEntitiesObservable(e,i,o){let a;switch(e){case G.DEVICE:a=this.deviceService.getDevices(i,o);break;case G.ASSET:a=this.assetService.getAssets(i,o);break;case G.ENTITY_VIEW:a=this.entityViewService.getEntityViews(i,o);break;case G.EDGE:a=this.edgeService.getEdges(i,o);break;case G.TENANT:a=this.tenantService.getTenantsByIds(i,o);break;case G.CUSTOMER:a=this.customerService.getCustomersByIds(i,o);break;case G.DASHBOARD:a=this.dashboardService.getDashboards(i,o);break;case G.USER:a=this.userService.getUsers(i,o);break;case G.ALARM:console.error("Get Alarm Entity is not implemented!");break;case G.DEVICE_PROFILE:a=this.deviceProfileService.getDeviceProfilesByIds(i,o);break;case G.ENTITY_GROUP:a=this.entityGroupService.getEntityGroupsByIds(i,o);break;case G.CONVERTER:a=this.converterService.getConvertersByIds(i,o);break;case G.INTEGRATION:a=this.integrationService.getIntegrationsByIds(i,o);break;case G.SCHEDULER_EVENT:a=this.schedulerEventService.getSchedulerEventsByIds(i,o);break;case G.BLOB_ENTITY:a=this.blobEntityService.getBlobEntitiesByIds(i,o);break;case G.REPORT_TEMPLATE:a=this.reportTemplateService.getReportTemplatesByIds(i,o);break;case G.REPORT:a=this.reportService.getReportsInfosByIds(i,o);break;case G.ROLE:a=this.roleService.getRolesByIds(i,o);break;case G.TENANT_PROFILE:a=this.tenantProfileService.getTenantProfilesByIds(i,o);break;case G.ASSET_PROFILE:a=this.assetProfileService.getAssetProfilesByIds(i,o);break;case G.WIDGETS_BUNDLE:a=this.widgetService.getWidgetsBundlesByIds(i,o);break;case G.NOTIFICATION_TARGET:a=this.notificationService.getNotificationTargetsByIds(i,o);break;case G.QUEUE_STATS:a=this.queueService.getQueueStatisticsByIds(i,o);break;case G.OAUTH2_CLIENT:a=this.oauth2Service.findTenantOAuth2ClientInfosByIds(i,o);break;case G.RULE_CHAIN:a=this.ruleChainService.getRuleChainsByIds(i,o);break}return a}getEntities(e,i,o){let a=this.getEntitiesObservable(e,i,o);return a||zr(null)}getSingleTenantByPageLinkObservable(e,i){let a=Mr(this.store).tenantId;return this.tenantService.getTenant(a,i).pipe(W(s=>{let c={data:[],totalPages:0,totalElements:0,hasNext:!1};return s.title.toLowerCase().startsWith(e.textSearch.toLowerCase())&&(c.data.push(s),c.totalPages=1,c.totalElements=1),c}))}getEntitiesByPageLinkObservable(e,i,o="",a){let s,c=Mr(this.store),u=this.userPermissionsService.hasReadGenericPermission(cC.get(e));switch(e){case G.DEVICE:i.sortOrder.property="name",c.authority===Mt.TENANT_ADMIN&&u?s=this.deviceService.getTenantDevices(i,o,a):s=this.deviceService.getUserDevices(i,o,a);break;case G.ASSET:i.sortOrder.property="name",c.authority===Mt.TENANT_ADMIN&&u?s=this.assetService.getTenantAssets(i,o,a):s=this.assetService.getUserAssets(i,o,a);break;case G.ENTITY_VIEW:i.sortOrder.property="name",c.authority===Mt.TENANT_ADMIN&&u?s=this.entityViewService.getTenantEntityViews(i,o,a):s=this.entityViewService.getUserEntityViews(i,o,a);break;case G.EDGE:i.sortOrder.property="name",c.authority===Mt.TENANT_ADMIN&&u?s=this.edgeService.getTenantEdges(i,o,a):s=this.edgeService.getUserEdges(i,o,a);break;case G.TENANT:i.sortOrder.property="title",c.authority===Mt.TENANT_ADMIN?s=this.getSingleTenantByPageLinkObservable(i,a):s=this.tenantService.getTenants(i,a);break;case G.CUSTOMER:i.sortOrder.property="title",s=this.customerService.getUserCustomers(i,a);break;case G.RULE_CHAIN:i.sortOrder.property="name",vd[o]?s=this.ruleChainService.getRuleChains(i,o,a):s=this.ruleChainService.getRuleChains(i,vd.CORE,a);break;case G.DASHBOARD:i.sortOrder.property="title",c.authority===Mt.TENANT_ADMIN&&u?s=this.dashboardService.getTenantDashboards(i,a):s=this.dashboardService.getUserDashboards(null,null,i,a);break;case G.USER:i.sortOrder.property="email",s=this.userService.getUserUsers(i,a);break;case G.ALARM:console.error("Get Alarm Entities is not implemented!");break;case G.ENTITY_GROUP:i.sortOrder.property="name",o&&o.length?s=this.entityGroupService.getEntityGroups(i,o,!0,a):s=Z(null);break;case G.CONVERTER:i.sortOrder.property="name",s=this.converterService.getConvertersByEdgeTemplate(i,!1,null,a);break;case G.INTEGRATION:i.sortOrder.property="name";
159let f=dt(zI[o])&&o===zI.EDGE;s=this.integrationService.getIntegrationsByEdgeTemplate(i,f,a);break;case G.SCHEDULER_EVENT:i.sortOrder.property="name",s=this.schedulerEventService.getSchedulerEventsByPageLink(null,i,null,a);break;case G.BLOB_ENTITY:i.sortOrder.property="name",s=this.blobEntityService.getBlobEntities(i,null,a);break;case G.REPORT_TEMPLATE:i.sortOrder.property="name";let _=o?[o]:null,I=new Vv(i,{typeList:_});s=this.reportTemplateService.getAllReportTemplateInfos(I,a);break;case G.REPORT:i.sortOrder.property="name",s=this.reportService.getReports(i,a);break;case G.ROLE:i.sortOrder.property="name",s=this.roleService.getRoles(i,o,a);break;case G.OTA_PACKAGE:i.sortOrder.property="title",s=this.otaPackageService.getOtaPackages(i,a);break;case G.DEVICE_PROFILE:i.sortOrder.property="name",s=this.deviceProfileService.getDeviceProfileInfos(i,null,a);break;case G.TENANT_PROFILE:i.sortOrder.property="name",s=this.tenantProfileService.getTenantProfiles(i,a);break;case G.ASSET_PROFILE:i.sortOrder.property="name",s=this.assetProfileService.getAssetProfileInfos(i,a);break;case G.WIDGETS_BUNDLE:i.sortOrder.property="title",s=this.widgetService.getWidgetBundles(i,!1,!0,!1,a);break;case G.WIDGET_TYPE:i.sortOrder.property="name",s=this.widgetService.getWidgetTypes(i,!0,!1,!1,vb.ALL,null,a);break;case G.NOTIFICATION_TARGET:i.sortOrder.property="name",s=this.notificationService.getNotificationTargets(i,o,a);break;case G.NOTIFICATION_TEMPLATE:i.sortOrder.property="name",s=this.notificationService.getNotificationTemplates(i,o,a);break;case G.NOTIFICATION_RULE:i.sortOrder.property="name",s=this.notificationService.getNotificationRules(i,a);break;case G.TB_RESOURCE:i.sortOrder.property="title",s=this.resourceService.getTenantResources(i,a);break;case G.QUEUE_STATS:i.sortOrder.property="createdTime",s=this.queueService.getQueueStatistics(i,a);break;case G.OAUTH2_CLIENT:i.sortOrder.property="title",s=this.oauth2Service.findTenantOAuth2ClientInfos(i,a);break;case G.MOBILE_APP:i.sortOrder.property="pkgName",s=this.mobileAppService.getTenantMobileAppInfos(i,o,a);break;case G.MOBILE_APP_BUNDLE:i.sortOrder.property="title",s=this.mobileAppService.getTenantMobileAppBundleInfos(i,a);break;case G.DOMAIN:i.sortOrder.property="name",s=this.domainService.getDomainInfos(i,a);break;case G.AI_MODEL:i.sortOrder.property="name",s=this.aiModelService.getAiModels(i,a);break}return s}getEntitiesByPageLink(e,i,o="",a){let s=this.getEntitiesByPageLinkObservable(e,i,o,a);return s?s.pipe(af(c=>c.hasNext?(i.page+=1,this.getEntitiesByPageLinkObservable(e,i,o,a)):Ls),W(c=>c.data),Bd(c=>c),of()):Z(null)}getEntitiesByNameFilter(e,i,o,a="",s){let c=new On(o,0,i,{property:"name",direction:Xn.ASC});if(o===-1)return c.pageSize=100,this.getEntitiesByPageLink(e,c,a,s).pipe(W(u=>u&&u.length?u:null));{let u=this.getEntitiesByPageLinkObservable(e,c,a,s);return u?u.pipe(W(f=>f&&f.data.length?f.data:null)):Z(null)}}getEntityGroupEntitiesByPageLink(e,i,o,a){let s=this.entityGroupService.getEntityGroupEntities(e,i,o,a);return s?s.pipe(af(c=>c.hasNext?(i.page+=1,this.entityGroupService.getEntityGroupEntities(e,i,o,a)):Ls),W(c=>c.data),Bd(c=>c),of()):Z(null)}getEntityGroupEntities(e,i,o,a){let s=new On(o,0,null,{property:"name",direction:Xn.ASC});if(o===-1)return s.pageSize=i===G.CUSTOMER?1024:100,this.getEntityGroupEntitiesByPageLink(e,s,i,a).pipe(W(c=>c&&c.length?c:null));{let c=this.entityGroupService.getEntityGroupEntities(e,s,i,a);return c?c.pipe(W(u=>u&&u.data.length?u.data:null)):Z(null)}}findEntityDataByQuery(e,i){return this.http.post("/api/entitiesQuery/find",e,N(i))}findEntityKeysByQuery(e,i=!0,o=!0,a,s){let c=`/api/entitiesQuery/find/keys?attributes=${i}&timeseries=${o}`;return a&&(c+=`&scope=${a}`),this.http.post(c,e,N(s))}findAlarmDataByQuery(e,i){return this.http.post("/api/alarmsQuery/find",e,N(i))}findEntityInfosByFilterAndName(e,i,o){let a={type:br.ENTITY_FIELD,key:"name"},s={entityFilter:e,pageLink:{pageSize:10,page:0,sortOrder:{key:a,direction:Xn.ASC}},entityFields:_R,keyFilters:i&&i.length?[{key:a,valueType:bs.STRING,value:null,predicate:{type:pa.STRING,operation:Ic.STARTS_WITH,ignoreCase:!0,value:{defaultValue:i}}}]:null};return this.findEntityDataByQuery(s,o).pipe(W(c=>({data:c.data.map(f=>vR(f)),hasNext:c.hasNext,totalElements:c.totalElements,totalPages:c.totalPages})))}findSingleEntityInfoByEntityFilter(e,i){let o={entityFilter:e,pageLink:av(1),entityFields:_R};return this.findEntityDataByQuery(o,i).pipe(W(a=>{if(a.data.length){let s=a.data[0];return vR(s)}else return null}))}getAliasFilterTypesByEntityTypes(e){let i=em(this.store),o=Object.values(ht);if(i.edgesSupportEnabled||(o=o.filter(s=>!yU.includes(s))),!e||!e.length)return o;let a=[];for(let s of o)this.filterAliasFilterTypeByEntityTypes(s,e)&&a.push(s);return a}filterAliasByEntityTypes(e,i){let o=e.filter;if(this.filterAliasFilterTypeByEntityTypes(o.type,i))switch(o.type){case ht.singleEntity:return i.indexOf(o.singleEntity.entityType)>-1;case ht.entityGroup:return i.indexOf(o.groupType)>-1;case ht.entityList:return i.indexOf(o.entityType)>-1;case ht.entityName:return i.indexOf(o.entityType)>-1;case ht.entityType:return i.indexOf(o.entityType)>-1;case ht.entityGroupList:return i.indexOf(G.ENTITY_GROUP)>-1;case ht.entityGroupName:return i.indexOf(G.ENTITY_GROUP)>-1;case ht.entitiesByGroupName:return i.indexOf(o.entityType)>-1;case ht.stateEntity:case ht.stateEntityOwner:return!0;case ht.assetType:return i.indexOf(G.ASSET)>-1;case ht.deviceType:return i.indexOf(G.DEVICE)>-1;case ht.entityViewType:return i.indexOf(G.ENTITY_VIEW)>-1;case ht.edgeType:return i.indexOf(G.EDGE)>-1;case ht.relationsQuery:if(o.filters&&o.filters.length){let a=!1;for(let s of o.filters)if(s.entityTypes&&s.entityTypes.length){for(let c of s.entityTypes)if(i.indexOf(c)>-1){a=!0;break}}else{a=!0;break}return a}else return!0;case ht.assetSearchQuery:return i.indexOf(G.ASSET)>-1;case ht.deviceSearchQuery:return i.indexOf(G.DEVICE)>-1;case ht.entityViewSearchQuery:return i.indexOf(G.ENTITY_VIEW)>-1;case ht.edgeSearchQuery:return i.indexOf(G.EDGE)>-1;case ht.schedulerEvent:return i.indexOf(G.SCHEDULER_EVENT)>-1}
159return!1}filterAliasFilterTypeByEntityTypes(e,i){if(!i||!i.length)return!0;let o=!1;return i.forEach(a=>{o=o||this.filterAliasFilterTypeByEntityType(e,a)}),o}filterAliasFilterTypeByEntityType(e,i){switch(e){case ht.singleEntity:return!0;case ht.entityGroup:return!0;case ht.entityList:return!0;case ht.entityName:return!0;case ht.entityType:return!0;case ht.entityGroupList:return i===G.ENTITY_GROUP;case ht.entityGroupName:return i===G.ENTITY_GROUP;case ht.entitiesByGroupName:return!0;case ht.stateEntity:case ht.stateEntityOwner:return!0;case ht.assetType:return i===G.ASSET;case ht.deviceType:return i===G.DEVICE;case ht.entityViewType:return i===G.ENTITY_VIEW;case ht.edgeType:return i===G.EDGE;case ht.relationsQuery:return!0;case ht.apiUsageState:return!0;case ht.assetSearchQuery:return i===G.ASSET;case ht.deviceSearchQuery:return i===G.DEVICE;case ht.entityViewSearchQuery:return i===G.ENTITY_VIEW;case ht.edgeSearchQuery:return i===G.EDGE;case ht.schedulerEvent:return i===G.SCHEDULER_EVENT}return!1}prepareAllowedEntityTypesList(e,i,o){let a=em(this.store),s=[];switch(a.authUser.authority){case Mt.SYS_ADMIN:s.push(G.TENANT);break;case Mt.TENANT_ADMIN:s.push(G.DEVICE),s.push(G.ASSET),s.push(G.ENTITY_VIEW),s.push(G.TENANT),s.push(G.CUSTOMER),s.push(G.DASHBOARD),s.push(G.USER),s.push(G.CONVERTER),s.push(G.INTEGRATION),s.push(G.SCHEDULER_EVENT),s.push(G.BLOB_ENTITY),s.push(G.REPORT_TEMPLATE),s.push(G.REPORT),s.push(G.ROLE),a.edgesSupportEnabled&&s.push(G.EDGE),i&&(s.push(G.QUEUE_STATS),s.push(ea.CURRENT_CUSTOMER),s.push(ea.CURRENT_TENANT));break;case Mt.CUSTOMER_USER:s.push(G.DEVICE),s.push(G.ASSET),s.push(G.ENTITY_VIEW),s.push(G.CUSTOMER),s.push(G.DASHBOARD),s.push(G.USER),s.push(G.SCHEDULER_EVENT),s.push(G.BLOB_ENTITY),a.edgesSupportEnabled&&s.push(G.EDGE),i&&s.push(ea.CURRENT_CUSTOMER);break}if(i&&(s.push(ea.CURRENT_USER),a.authUser.authority!==Mt.SYS_ADMIN&&s.push(ea.CURRENT_USER_OWNER)),e&&e.length)for(let c=s.length-1;c>=0;c--)e.indexOf(s[c])===-1&&s.splice(c,1);if(o)for(let c=s.length-1;c>=0;c--){let u=cC.get(s[c]);u&&(this.userPermissionsService.hasGenericPermission(u,o)||s.splice(c,1))}return s}getEntityFieldKeys(e,i=""){let o=[Un.createdTime.keyName],a=i.toLowerCase();switch(e){case G.USER:o.push(Un.name.keyName),o.push(Un.email.keyName),o.push(Un.firstName.keyName),o.push(Un.lastName.keyName),o.push(Un.phone.keyName),o.push(Un.ownerName.keyName),o.push(Un.ownerType.keyName);break;case G.TENANT:case G.CUSTOMER:o.push(Un.title.keyName),o.push(Un.email.keyName),o.push(Un.country.keyName),o.push(Un.state.keyName),o.push(Un.city.keyName),o.push(Un.address.keyName),o.push(Un.address2.keyName),o.push(Un.zip.keyName),o.push(Un.phone.keyName);break;case G.ENTITY_VIEW:o.push(Un.name.keyName),o.push(Un.type.keyName),o.push(Un.ownerName.keyName),o.push(Un.ownerType.keyName);break;case G.DEVICE:case G.EDGE:case G.ASSET:o.push(Un.name.keyName),o.push(Un.type.keyName),o.push(Un.label.keyName),o.push(Un.ownerName.keyName),o.push(Un.ownerType.keyName);break;case G.DASHBOARD:o.push(Un.title.keyName),o.push(Un.ownerName.keyName),o.push(Un.ownerType.keyName);break;case G.CONVERTER:case G.INTEGRATION:case G.BLOB_ENTITY:case G.REPORT_TEMPLATE:case G.ROLE:o.push(Un.name.keyName),o.push(Un.type.keyName);break;case G.ENTITY_GROUP:o.push(Un.name.keyName),o.push(Un.type.keyName);break;case G.API_USAGE_STATE:case G.REPORT:o.push(Un.name.keyName);break;case G.SCHEDULER_EVENT:o.push(Un.name.keyName),o.push(Un.type.keyName),o.push(Un.configuration.keyName),o.push(Un.schedule.keyName),o.push(Un.originatorId.keyName),o.push(Un.originatorType.keyName);break;case G.QUEUE_STATS:o.push(Un.queueName.keyName),o.push(Un.serviceId.keyName);break}return a?o.filter(s=>s.toLowerCase().indexOf(a)===0):o}getAlarmKeys(e=""){let i=Object.keys(TS),o=e.toLowerCase();return o?i.filter(a=>a.toLowerCase().indexOf(o)===0):i}getEntityKeys(e,i,o,a){if(o===Zi.entityField)return Z(this.getEntityFieldKeys(e.entityType,i));if(o===Zi.alarm)return Z(this.getAlarmKeys(i));let s=`/api/plugins/telemetry/${e.entityType}/${e.id}/keys/`;return o===Zi.timeseries?s+="timeseries":o===Zi.attribute&&(s+="attributes"),this.http.get(s,N(a)).pipe(W(c=>{if(i){let u=i.toLowerCase();return c.filter(f=>f.toLowerCase().indexOf(u)===0)}else return c}))}getEntityKeysByEntityFilter(e,i,o,a){return this.getEntityKeysByEntityFilterAndScope(e,i,o,null,a)}
159getEntityKeysByEntityFilterAndScope(e,i,o,a,s){if(!i.length)return Z([]);let c;if(e!==null&&i.some(u=>[Zi.timeseries,Zi.attribute].includes(u))){let u={entityFilter:e,pageLink:av(100)};c=this.findEntityKeysByQuery(u,i.includes(Zi.attribute),i.includes(Zi.timeseries),a,s)}else c=Z({attribute:[],timeseries:[],entityTypes:o||[]});return c.pipe(W(u=>{let f=[];return i.forEach(_=>{let I;switch(_){case Zi.entityField:if(u.entityTypes.length){let S=[];u.entityTypes.forEach(F=>S.push(...this.getEntityFieldKeys(F))),I=Array.from(new Set(S))}break;case Zi.alarm:I=this.getAlarmKeys();break;case Zi.attribute:case Zi.timeseries:u[_].length&&(I=u[_]);break}I&&f.push(...I.map(S=>({name:S,type:_})))}),f}))}createDatasourcesFromSubscriptionsInfo(e){let i=e.map(o=>this.createDatasourceFromSubscriptionInfo(o));return this.utils.generateColors(i),i}createAlarmSourceFromSubscriptionInfo(e){if(e.entityId&&e.entityType){let i=this.createDatasourceFromSubscriptionInfo(e);return this.utils.generateColors([i]),i}else throw new Error("Can't crate alarm source without entityId information!")}resolveAlias(e,i){let o=e.filter;return this.resolveAliasFilter(o,i).pipe(Ft(a=>{let s={alias:e.alias,entityFilter:a.entityFilter,stateEntity:a.stateEntity,entityParamName:a.entityParamName,resolveMultiple:o.resolveMultiple};if(s.currentEntity=null,!s.resolveMultiple&&s.entityFilter){let c=null;if(a.stateEntity&&s.entityFilter.type===ht.singleEntity&&i){let f=i;a.entityParamName&&a.entityParamName.length&&(f=i[a.entityParamName]),f&&f.entityId&&f.entityName&&(c={id:f.entityId.id,entityType:f.entityId.entityType,name:f.entityName,label:f.entityLabel})}return(c?Z(c):this.findSingleEntityInfoByEntityFilter(s.entityFilter,{ignoreLoading:!0,ignoreErrors:!0})).pipe(W(f=>(s.currentEntity=f,s)))}return Z(s)}))}resolveAliasFilter(e,i){let o={entityFilter:null,stateEntity:!1};e.stateEntityParamName&&e.stateEntityParamName.length&&(o.entityParamName=e.stateEntityParamName);let a=this.getStateEntityInfo(e,i),s=a.entityId,c=a.entityGroupType;switch(e.type){case ht.singleEntity:return o.entityFilter=Di(e),Z(o);case ht.entityGroup:o.stateEntity=e.groupStateEntity;let u,f;return o.stateEntity&&s?(u=s.id,f=c):(u=e.entityGroup,f=e.groupType),u&&f?(o.entityFilter=Di(e),o.entityFilter.groupType=f,o.entityFilter.entityGroup=u,Z(o)):Z(o);case ht.entityList:return o.entityFilter=Di(e),Z(o);case ht.entityName:return o.entityFilter=Di(e),Z(o);case ht.entityType:return o.entityFilter=Di(e),Z(o);case ht.entityGroupList:return o.entityFilter=Di(e),Z(o);case ht.entityGroupName:return o.entityFilter=Di(e),Z(o);case ht.entitiesByGroupName:return o.stateEntity=e.groupStateEntity,o.entityFilter=Di(e),e.groupStateEntity&&s&&(s.entityType===G.TENANT||s.entityType===G.CUSTOMER)&&(o.entityFilter.ownerId=s),Z(o);case ht.stateEntity:return o.stateEntity=!0,s&&(o.entityFilter={type:ht.singleEntity,singleEntity:s}),Z(o);case ht.stateEntityOwner:return o.stateEntity=!0,s&&(o.entityFilter={type:ht.stateEntityOwner,singleEntity:s}),Z(o);case ht.assetType:return o.entityFilter=Di(e),Z(o);case ht.deviceType:return o.entityFilter=Di(e),Z(o);case ht.entityViewType:return o.entityFilter=Di(e),Z(o);case ht.apiUsageState:return o.entityFilter=Di(e),Z(o);case ht.edgeType:return o.entityFilter=Di(e),Z(o);case ht.relationsQuery:case ht.assetSearchQuery:case ht.deviceSearchQuery:case ht.edgeSearchQuery:case ht.entityViewSearchQuery:let _,I;return o.stateEntity=e.rootStateEntity,o.stateEntity&&s?(_=s.entityType,I=s.id):o.stateEntity||(_=e.rootEntity.entityType,I=e.rootEntity.id),_&&I?(o.entityFilter=Di(e),o.entityFilter.rootEntity={entityType:_,id:I},Z(o)):Z(o);case ht.schedulerEvent:let S,F;return o.stateEntity=e.originatorStateEntity,o.entityFilter=Di(e),o.stateEntity&&s?(S=s.entityType,F=s.id):!o.stateEntity&&e.originator&&(S=e.originator.entityType,F=e.originator.id),S&&F?(o.entityFilter.originator={entityType:S,id:F},Z(o)):Z(o)}}checkEntityAlias(e){return this.resolveAliasFilter(e.filter,null).pipe(W(i=>i.stateEntity?!0:De(i.entityFilter)),vt(()=>Z(!1)))}resolveAlarmFilter(e,i=!0){let o={};if(e)if(o.typeList=e.typeList,o.severityList=e.severityList,o.statusList=e.statusList,o.searchPropagatedAlarms=dt(e.searchPropagatedAlarms)?e.searchPropagatedAlarms:i,e.assignedToCurrentUser){let a=Mr(this.store);o.assigneeId=new $4(a.userId)}else o.assigneeId=e.assigneeId;return o}
159saveEntityParameters(e,i,o,a,s,c){return this.getSaveEntityObservable(e,i,o,a,c).pipe(Ft(f=>this.saveEntityData(f.id,a,c).pipe(W(()=>({create:{entity:1}})),vt(_=>Z({error:{entity:1,errors:_.message}})))),vt(f=>{if(s){let _,I=Mr(this.store);switch(i){case G.DEVICE:if(I.authority===Mt.TENANT_ADMIN)_=this.deviceService.findByName(a.name,c);else{let S=new On(1,null,a.name);_=this.deviceService.getUserDevices(S,"",c).pipe(W(F=>F.data[0]))}break;case G.ASSET:if(I.authority===Mt.TENANT_ADMIN)_=this.assetService.findByName(a.name,c);else{let S=new On(1,null,a.name);_=this.assetService.getUserAssets(S,"",c).pipe(W(F=>F.data[0]))}break;case G.EDGE:if(I.authority===Mt.TENANT_ADMIN)_=this.edgeService.findByName(a.name,c);else{let S=new On(1,null,a.name);_=this.edgeService.getUserEdges(S,"",c).pipe(W(F=>F.data[0]))}break}return _.pipe(Ft(S=>{let F=this.getUpdateEntityTasks(i,a,o,S,c);return Rn(F).pipe(W(()=>({update:{entity:1}})),vt(H=>Z({error:{entity:1,errors:H.message}})))}),vt(S=>Z({error:{entity:1,errors:`Line: ${a.lineNumber}; Error: ${S.error.message}`}})))}else return Z({error:{entity:1,errors:`Line: ${a.lineNumber}; Error: ${f.error.message}`}})}))}getSaveEntityObservable(e,i,o,a,s){let c;switch(i){case G.DEVICE:let u={name:a.name,type:a.type,label:a.label,customerId:e,additionalInfo:{description:a.description}};a.gateway!==null&&(u.additionalInfo=Lt(re({},u.additionalInfo),{gateway:a.gateway})),c=this.deviceService.saveDevice(u,o,s);break;case G.ASSET:let f={name:a.name,type:a.type,label:a.label,customerId:e,additionalInfo:{description:a.description}};c=this.assetService.saveAsset(f,o,s);break;case G.EDGE:let _=a,I={name:_.name,type:_.type,label:_.label,additionalInfo:{description:_.description},edgeLicenseKey:_.edgeLicenseKey!==""?_.edgeLicenseKey:"6qcGys6gz4M2ZuIqZ6hRDjWT",cloudEndpoint:_.cloudEndpoint!==""?_.cloudEndpoint:window.location.origin,routingKey:_.routingKey!==""?_.routingKey:Zr(),secret:_.secret!==""?_.secret:T4(20)};c=this.edgeService.saveEdge(I,o,s);break}return c}getUpdateEntityTasks(e,i,o,a,s){let c=[],u,f;switch(e){case G.ASSET:case G.DEVICE:if(u=a,f=u.additionalInfo||{},u.label!==i.label||u.type!==i.type||f.description!==i.description||u.id.entityType===G.DEVICE&&f.gateway!==i.gateway)switch(u.label=i.label,u.type=i.type,u.additionalInfo=f,u.additionalInfo.description=i.description,u.id.entityType===G.DEVICE&&(u.additionalInfo.gateway=i.gateway),u.id.entityType===G.DEVICE&&u.deviceProfileId&&delete u.deviceProfileId,u.id.entityType){case G.DEVICE:c.push(this.deviceService.saveDevice(u,o,s));break;case G.ASSET:c.push(this.assetService.saveAsset(u,o,s));break}c.push(this.saveEntityData(a.id,i,s));break;case G.EDGE:u=a,f=u.additionalInfo||{};let _=i;(u.label!==_.label||u.type!==_.type||_.cloudEndpoint!==""&&u.cloudEndpoint!==_.cloudEndpoint||_.edgeLicenseKey!==""&&u.edgeLicenseKey!==_.edgeLicenseKey||_.routingKey!==""&&u.routingKey!==_.routingKey||_.secret!==""&&u.secret!==_.secret||f.description!==_.description)&&(u.label=_.label,u.type=_.type,u.additionalInfo=f,u.additionalInfo.description=_.description,_.cloudEndpoint!==""&&(u.cloudEndpoint=_.cloudEndpoint),_.edgeLicenseKey!==""&&(u.edgeLicenseKey=_.edgeLicenseKey),_.routingKey!==""&&(u.routingKey=_.routingKey),_.secret!==""&&(u.secret=_.secret),c.push(this.edgeService.saveEdge(u,o,s))),c.push(this.saveEntityData(a.id,_,s));break}return c}saveEntityData(e,i,o){let a=[],s;if(Object.keys(i.credential).length){let c,u=null,f=null;De(i.credential.mqtt)?(c=Ia.MQTT_BASIC,f=JSON.stringify(i.credential.mqtt)):De(i.credential.lwm2m)?(c=Ia.LWM2M_CREDENTIALS,f=JSON.stringify(i.credential.lwm2m)):fn(i.credential.x509)?(c=Ia.X509_CERTIFICATE,f=i.credential.x509):(c=Ia.ACCESS_TOKEN,u=i.credential.accessToken),s=this.deviceService.getDeviceCredentials(e.id,!1,o).pipe(Ft(_=>(_.credentialsId=u,_.credentialsType=c,_.credentialsValue=f,this.deviceService.saveDeviceCredentials(_,o).pipe(W(()=>"ok"),vt(I=>Z(`Line: ${i.lineNumber}; Error: ${I.error.message}`)))))),a.push(s)}return i.attributes.shared&&i.attributes.shared.length&&(s=this.attributeService.saveEntityAttributes(e,im.SHARED_SCOPE,i.attributes.shared,o).pipe(W(()=>"ok"),vt(c=>Z(`Line: ${i.lineNumber}; Error: ${c.error.message}`))),a.push(s)),i.attributes.server&&i.attributes.server.length&&(s=this.attributeService.saveEntityAttributes(e,im.SERVER_SCOPE,i.attributes.server,o).pipe(W(()=>"ok"),vt(c=>Z(`Line: ${i.lineNumber}; Error: ${c.error.message}`))),a.push(s)),i.timeseries&&i.timeseries.length&&(s=this.attributeService.saveEntityTimeseries(e,"time",i.timeseries,o).pipe(W(()=>"ok"),vt(c=>Z(`Line: ${i.lineNumber}; Error: ${c.error.message}`))),a.push(s)),a.length?Rn(a).pipe(W(c=>{let u=c.filter(f=>f!=="ok");if(u.length>0)throw Error(u.join(`
160`));return c})):Z(null)}getStateEntityInfo(e,i){let o=null,a=null;return i&&(e.stateEntityParamName&&e.stateEntityParamName.length?
160i[e.stateEntityParamName]&&(o=i[e.stateEntityParamName].entityId,a=i[e.stateEntityParamName].entityGroupType):(o=i.entityId,a=i.entityGroupType)),o||(e.type===ht.entityGroup&&e.defaultStateEntityGroup?(o={entityType:G.ENTITY_GROUP,id:e.defaultStateEntityGroup},a=e.defaultStateGroupType):o=e.defaultStateEntity),{entityId:o,entityGroupType:a}}createDatasourceFromSubscriptionInfo(e){e=this.validateSubscriptionInfo(e);let i=null;if(e.type===qi.entity?(i={type:e.type,entityName:e.entityName,name:e.entityName,entityType:e.entityType,entityId:e.entityId,dataKeys:[]},this.prepareEntityFilterFromSubscriptionInfo(i,e)):(e.type===qi.function||e.type===qi.entityCount||e.type===qi.alarmCount)&&(i={type:e.type,name:e.name||e.type,dataKeys:[]}),i!==null&&(e.timeseries&&this.createDatasourceKeys(e.timeseries,Zi.timeseries,i),e.attributes&&this.createDatasourceKeys(e.attributes,Zi.attribute,i),e.functions&&this.createDatasourceKeys(e.functions,Zi.function,i),e.alarmFields&&this.createDatasourceKeys(e.alarmFields,Zi.alarm,i),e.type===qi.entityCount||e.type===qi.alarmCount)){let o=this.utils.createKey({name:"count"},Zi.count);i.dataKeys.push(o)}return i}validateSubscriptionInfo(e){return e.type==="device"&&(e.type=qi.entity,e.entityType=G.DEVICE,e.deviceId?e.entityId=e.deviceId:e.deviceName?e.entityName=e.deviceName:e.deviceNamePrefix?e.entityNamePrefix=e.deviceNamePrefix:e.deviceIds&&(e.entityIds=e.deviceIds)),e}prepareEntityFilterFromSubscriptionInfo(e,i){if(i.entityId)e.entityFilter={type:ht.singleEntity,singleEntity:{entityType:i.entityType,id:i.entityId}},e.pageLink=bR;else if(i.entityName||i.entityNamePrefix){let o,a;if(dt(i.entityName)&&i.entityName.length)o=i.entityName,a=Di(bR);else{o=i.entityNamePrefix;let s=De(i.pageSize)&&i.pageSize>0?i.pageSize:1024;a=av(s)}e.entityFilter={type:ht.entityName,entityType:i.entityType,entityNameFilter:o},e.pageLink=a}else if(i.entityIds){e.entityFilter={type:ht.entityList,entityType:i.entityType,entityList:i.entity
160Ids};let o=De(i.pageSize)&&i.pageSize>0?i.pageSize:1024;e.pageLink=av(o)}}createDatasourceKeys(e,i,o){e.forEach(a=>{let s=this.utils.createKey(a,i);o.dataKeys.push(s)})}getAssignedToEdgeEntitiesByType(e,i,o){let a;switch(i){case G.USER:case G.ASSET:case G.DEVICE:case G.ENTITY_VIEW:case G.DASHBOARD:a=this.entityGroupService.getEdgeEntityGroups(o,e,i,{ignoreLoading:!0}).pipe(W(s=>s.data));break;case G.SCHEDULER_EVENT:a=this.schedulerEventService.getSchedulerEventsByPageLink(null,o,e);break;case G.RULE_CHAIN:a=this.ruleChainService.getEdgeRuleChains(e,o).pipe(W(s=>s.data));break;case G.INTEGRATION:a=this.integrationService.getEdgeIntegrations(e,o).pipe(W(s=>s.data));break;default:a=Z(null),console.error(`Edge does not support EntityType ${i}`);break}return a}getEdgeEventContent(e){let i,o=e.entityId,a=e.type;switch(a){case yn.DASHBOARD:case yn.ALARM:case yn.RULE_CHAIN:case yn.EDGE:case yn.USER:case yn.CUSTOMER:case yn.ENTITY_GROUP:case yn.SCHEDULER_EVENT:case yn.INTEGRATION:case yn.CONVERTER:case yn.TENANT:case yn.ASSET:case yn.DEVICE:case yn.ENTITY_VIEW:WH.includes(e.action)?i=Z(e.body):i=this.getEntity(a,o,{ignoreLoading:!0,ignoreErrors:!0});break;case yn.RULE_CHAIN_METADATA:i=this.ruleChainService.getRuleChainMetadata(o);break;case yn.WIDGET_TYPE:i=this.widgetService.getWidgetTypeById(o);break;case yn.WIDGETS_BUNDLE:i=this.widgetService.getWidgetsBundle(o);break;case yn.DEVICE_PROFILE:i=this.deviceProfileService.getDeviceProfile(o);break;case yn.GROUP_PERMISSION:i=this.roleService.getGroupPermissionInfo(o,!1);break;case yn.ASSET_PROFILE:i=this.assetProfileService.getAssetProfile(o);break;case yn.RELATION:i=Z(e.body);break}return i}getEntitySubtypesObservable(e){let i;switch(e){case G.ASSET:i=this.assetProfileService.getAssetProfileNames(!1,{ignoreLoading:!0}).pipe(W(o=>o.map(a=>a.name)));break;case G.DEVICE:i=this.deviceProfileService.getDeviceProfileNames(!1,{ignoreLoading:!0}).pipe(W(o=>o.map(a=>a.name)));break;case G.EDGE:i=this.edgeService.getEdgeTypes({ignoreLoading:!0}).pipe(W(o=>o.map(a=>a.type)));break;case G.ENTITY_VIEW:i=this.entityViewService.getEntityViewTypes({ignoreLoading:!0}).pipe(W(o=>o.map(a=>a.type)));break}return i}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(ve),X(Mv),X(AI),X(SH),X($I),X(CH),X(MI),X(M4),X(vp),X(lp),X(MH),X(Yj),X(oh),X(Cp),X(HI),X(QI),X(WI),X(NI),X(jH),X(GH),X(zH),X(Fv),X(c8),X(Pv),X(Dl),X(So),X(vn),X(qI),X(gh),X(KI),X(XI),X(n8),X(r8),X(o8),X(a8))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Hhe=["subTypeInput"];function qhe(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",9),g(2,"close"),p()()}}function Whe(n,t){if(n&1&&(d(0,"mat-option",10),O(1,"span",11),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r,e.searchText),Ut)}}function Yhe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
160();l(),j(" ",C(2,1,r.entitySubtypeRequiredText)," ")}}function Qhe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.entitySubtypeMaxLength)," ")}}var ZI=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s){this.store=e,this.broadcast=i,this.translate=o,this.fb=a,this.entityService=s,this.appearance="fill",this.searchText="",this.dirty=!1,this.propagateChange=c=>{},this.subTypeFormGroup=this.fb.group({subType:[null,ke.maxLength(255)]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){switch(this.entityType){case G.ASSET:this.selectEntitySubtypeText="asset.select-asset-type",this.entitySubtypeText="asset.asset-type",this.entitySubtypeRequiredText="asset.asset-type-required",this.entitySubtypeMaxLength="asset.asset-type-max-length",this.broadcastSubscription=this.broadcast.on("assetSaved",()=>{this.subTypes=null});break;case G.DEVICE:this.selectEntitySubtypeText="device.select-device-type",this.entitySubtypeText="device.device-type",this.entitySubtypeRequiredText="device.device-type-required",this.entitySubtypeMaxLength="device.device-type-max-length",this.broadcastSubscription=this.broadcast.on("deviceSaved",()=>{this.subTypes=null});break;case G.EDGE:this.selectEntitySubtypeText="edge.select-edge-type",this.entitySubtypeText="edge.edge-type",this.entitySubtypeRequiredText="edge.edge-type-required",this.entitySubtypeMaxLength="edge.type-max-length",this.broadcastSubscription=this.broadcast.on("edgeSaved",()=>{this.subTypes=null});break;case G.ENTITY_VIEW:this.selectEntitySubtypeText="entity-view.select-entity-view-type",this.entitySubtypeText="entity-view.entity-view-type",this.entitySubtypeRequiredText="entity-view.entity-view-type-required",this.entitySubtypeMaxLength="entity-view.type-max-length",this.broadcastSubscription=this.broadcast.on("entityViewSaved",()=>{this.subTypes=null});break}this.filteredSubTypes=this.subTypeFormGroup.get("subType").valueChanges.pipe(Wi(150),xr(),et(e=>{this.updateView(e)}),W(e=>e||""),ii(e=>this.fetchSubTypes(e)))}ngAfterViewInit(){}ngOnDestroy(){this.broadcastSubscription&&this.broadcastSubscription.unsubscribe()}setDisabledState(e){this.disabled=e,this.disabled?this.subTypeFormGroup.disable({emitEvent:!1}):this.subTypeFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="",this.modelValue=e,this.subTypeFormGroup.get("subType").patchValue(e,{emitEvent:!1}),this.dirty=!0}onFocus(){this.dirty&&(this.subTypeFormGroup.get("subType").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}displaySubTypeFn(e){return e||void 0}fetchSubTypes(e,i=!1){return this.searchText=e,this.getSubTypes().pipe(W(o=>o.filter(a=>i?e?a===e:!1:e?a.toUpperCase().startsWith(e.toUpperCase()):!0)))}getSubTypes(){if(!this.subTypes){let e=this.entityService.getEntitySubtypesObservable(this.entityType);if(e){let i=new Set(this.excludeSubTypes);this.subTypes=e.pipe(vt(()=>Z([])),W(o=>{let a=[];return o.forEach(s=>!i.has(s)&&a.push(s)),a}),Si({connector:()=>new or(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!1}))}else return zr(null)}return this.subTypes}clear(){this.subTypeFormGroup.get("subType").patchValue(null,{emitEvent:!0}),setTimeout(()=>{this.subTypeInput.nativeElement.blur(),this.subTypeInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Zd),h(Ge),h(Wt),h(rr))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-subtype-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(Hhe,7),i&2){let a;Q(a=K())&&(o.subTypeInput=a.first)}},inputs:{entityType:"entityType",required:"required",disabled:"disabled",excludeSubTypes:"excludeSubTypes",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:14,vars:17,consts:[["subTypeInput",""],["subTypeAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup","appearance"],["matInput","","type","text","formControlName","subType",3,"focusin","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",3,0),v(6,"translate"),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(7,qhe,3,0,"button",4),d(8,"mat-autocomplete",5,1),x(10,Whe,3,5,"mat-option",6),v(11,"async"),p(),x(12,Yhe,3,3,"mat-error",7)(13,Qhe,3,3,"mat-error",7),p()}if(i&2){let a=me(9);m("formGroup",o.subTypeFormGroup)("appearance",o.appearance),l(2),z(C(3,11,o.entitySubtypeText)),l(2),te("placeholder",C(6,13,o.selectEntitySubtypeText)),m("required",o.required)("matAutocomplete",a),l(3),m("ngIf",o.subTypeFormGroup.get("subType").value&&!o.disabled),l(),m("displayWith",o.displaySubTypeFn),l(2),m("ngForOf",C(11,15,o.filteredSubTypes)),l(2),m("ngIf",o.subTypeFormGroup.get("subType").hasError("required")),l(),m("ngIf",o.subTypeFormGroup.get("subType").hasError("maxlength"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();var efe={};Ae(efe,{EntitySubTypeSelectComponent:()=>JI});y();function Xhe(n,t){if(n&1&&(d(0,"mat-label"),g(1),v(2,"translate"),p()),n&2){let r=b
160();l(),z(C(2,1,r.entitySubtypeTitle))}}function Zhe(n,t){if(n&1&&(d(0,"mat-option",4),g(1),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",e.displaySubTypeFn(r)," ")}}function Jhe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.entitySubtypeRequiredText)," ")}}var JI=(()=>{let t=class t{constructor(e,i,o,a,s,c){this.store=e,this.broadcast=i,this.translate=o,this.fb=a,this.entityService=s,this.destroyRef=c,this.modelValue="",this.subscriptSizing="fixed",this.subTypesOptionsSubject=new Te,this.subTypesLoaded=!1,this.propagateChange=u=>{},this.subTypeFormGroup=this.fb.group({subType:[""]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){switch(this.entityType){case G.ASSET:this.entitySubtypeTitle="asset.asset-type",this.entitySubtypeRequiredText="asset.asset-type-required",this.broadcastSubscription=this.broadcast.on("assetSaved",()=>{this.subTypes=null,this.subTypesOptionsSubject.next("")});break;case G.DEVICE:this.entitySubtypeTitle="device.device-type",this.entitySubtypeRequiredText="device.device-type-required",this.broadcastSubscription=this.broadcast.on("deviceSaved",()=>{this.subTypes=null,this.subTypesOptionsSubject.next("")});break;case G.ENTITY_VIEW:this.entitySubtypeTitle="entity-view.entity-view-type",this.entitySubtypeRequiredText="entity-view.entity-view-type-required",this.broadcastSubscription=this.broadcast.on("entityViewSaved",()=>{this.subTypes=null,this.subTypesOptionsSubject.next("")});break;case G.EDGE:this.entitySubtypeTitle="edge.edge-type",this.entitySubtypeRequiredText="edge.edge-type-required",this.broadcastSubscription=this.broadcast.on("edgeSaved",()=>{this.subTypes=null,this.subTypesOptionsSubject.next("")});break}this.subTypesOptions=this.subTypesOptionsSubject.asObservable().pipe(on(""),Ft(()=>this.getSubTypes())),this.subTypeFormGroup.get("subType").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{let i;!e||e===""?i="":i=e,this.updateView(i)})}ngAfterViewInit(){}ngOnDestroy(){this.broadcastSubscription&&this.broadcastSubscription.unsubscribe()}setDisabledState(e){this.disabled=e,this.disabled?this.subTypeFormGroup.disable():this.subTypeFormGroup.enable()}writeValue(e){e!=null&&e!==""?(this.modelValue=e,this.findSubTypes(e).subscribe(i=>{let o=i&&i.length===1?i[0]:"";this.subTypeFormGroup.get("subType").patchValue(o,{emitEvent:!0})}
160)):(this.modelValue="",this.subTypeFormGroup.get("subType").patchValue("",{emitEvent:!0}))}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}displaySubTypeFn(e){return fn(e)?this.typeTranslatePrefix?this.translate.instant(this.typeTranslatePrefix+"."+e):e:this.translate.instant("entity.all-subtypes")}findSubTypes(e){return this.getSubTypes().pipe(W(i=>i.filter(o=>o===e)))}getSubTypes(){if(!this.subTypes){let e=this.entityService.getEntitySubtypesObservable(this.entityType);if(e)this.subTypes=e.pipe(W(i=>(this.subTypesLoaded=!0,i.unshift(""),i)),et(i=>{let o=i.find(a=>a===this.subTypeFormGroup.get("subType").value);o&&this.subTypeFormGroup.get("subType").patchValue(o)}),Si());else return zr(null)}return this.subTypes}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Zd),h(Ge),h(Wt),h(rr),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-subtype-select"]],inputs:{subscriptSizing:"subscriptSizing",entityType:"entityType",showLabel:"showLabel",required:"required",disabled:"disabled",typeTranslatePrefix:"typeTranslatePrefix"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:6,vars:9,consts:[[1,"mat-block",3,"formGroup","subscriptSizing"],[4,"ngIf"],["formControlName","subType",1,"tb-entity-subtype-select"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(i,o){i&1&&(d(0,"mat-form-field",0),x(1,Xhe,3,3,"mat-label",1),d(2,"mat-select",2),x(3,Zhe,2,2,"mat-option",3),v(4,"async"),p(),x(5,Jhe,3,3,"mat-error",1),p()),i&2&&(te("subscriptSizing",o.subscriptSizing),m("formGroup",o.subTypeFormGroup),l(),m("ngIf",o.showLabel),l(),Y("!hidden",!o.subTypesLoaded),l(),m("ngForOf",C(4,7,o.subTypesOptions)),l(2),m("ngIf",o.subTypeFormGroup.get("subType").hasError("required")))},dependencies:[Ke,ce,ze,At,ni,Kn,xt,xe,We,$e,Qe,Ve,be],styles:['@charset "UTF-8";']});let n=t;return n})();var ek={};Ae(ek,{EntityAutocompleteComponent:()=>Na});y();var tfe=["entityInput"],ife=n=>({entity:n});function nfe(n,t){if(n&1&&(d(0,"mat-label"),g(1),v(2,"translate"),p()),n&2){let r=b
160();l(),z(C(2,1,r.label))}}function rfe(n,t){if(n&1&&(d(0,"a",14),g(1),p()),n&2){let r=b();m("routerLink",r.entityURL),l(),j(" ",r.displayEntityFn(r.selectEntityFormGroup.get("entity").value)," ")}}function ofe(n,t){if(n&1){let r=B();d(0,"button",15),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",16),g(2,"close"),p()()}}function afe(n,t){if(n&1){let r=B();d(0,"button",17),T("click",function(i){D(r);let o=b();return M(o.createNewEntity(i))}),d(1,"span",18),g(2),v(3,"translate"),p()()}n&2&&(l(2),z(C(3,1,"entity.create-new")))}function sfe(n,t){if(n&1){let r=B();d(0,"button",19),v(1,"translate"),T("click",function(i){D(r);let o=b();return M(o.openEntityDetailsNewTab(i))}),d(2,"tb-icon",20),g(3,"open_in_new"),p()()}if(n&2){let r=b();te("matTooltip",r.newTabDetailsButtonHint?r.newTabDetailsButtonHint:C(1,1,"common.open-details-page"))}}function lfe(n,t){if(n&1&&(d(0,"mat-icon",21),v(1,"translate"),g(2," warning "),p()),n&2){let r=b();m("matTooltip",C(1,1,r.requiredErrorText))}}function cfe(n,t){if(n&1&&(d(0,"mat-option",22),O(1,"span",23),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ds(2,2,r.name,e.searchText,!0,"ig"),Ut)}}function dfe(n,t){if(n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2){let r=b
160(2);l(2),z(C(3,1,r.notFoundEntities))}}function pfe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"translate"),p()),n&2){let r=b(2);l(),j(" ",ft(2,1,r.noEntitiesMatchingText,Xe(4,ife,r.searchText))," ")}}function mfe(n,t){if(n&1){let r=B();d(0,"mat-option",22)(1,"div",24),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,dfe,4,3,"div",25)(3,pfe,3,6,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function ufe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.requiredErrorText)," ")}}var Wg=class Wg{set entityType(t){this.entityTypeValue!==t&&(this.entityTypeValue=t,this.load(),this.reset(),this.refresh$.next([]),this.dirty=!0)}set entitySubtype(t){if(this.entitySubtypeValue!==t){this.entitySubtypeValue=t,this.load();let r=this.getCurrentEntity();r&&r.type!==this.entitySubtypeValue&&(this.reset(),this.refresh$.next([]),this.dirty=!0),this.selectEntityFormGroup.get("entity").updateValueAndValidity()}}get requiredErrorText(){return this.requiredText&&this.requiredText.length?this.requiredText:this.entityRequiredText}get label(){return this.labelText&&this.labelText.length?this.labelText:this.entityText}constructor(t,r,e,i){this.store=t,this.entityService=r,this.fb=e,this.router=i,this.notFoundEntities="entity.no-entities-text",this.searchText="",this.dirty=!1,this.refresh$=new Te,this.propagateChange=()=>{},this.appearance="fill",this.subscriptSizing="fixed",this.entityChanged=new J,this.createNew=new J,this.selectEntityFormGroup=this.fb.group({entity:[null]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.filteredEntities=Xt(this.refresh$.asObservable(),this.selectEntityFormGroup.get("entity").valueChanges.pipe(Wi(150),et(t=>{let r;typeof t=="string"||!t?r=null:r=this.useFullEntityId?t.id:t.id.id,this.updateView(r,t),t===null&&this.clear()}),W(t=>t?typeof t=="string"?t:t.name:""),ii(t=>this.fetchEntities(t)),Si()))}load(){if(this.entityTypeValue)switch(this.entityTypeValue){case G.ASSET:this.entityText="asset.asset",this.noEntitiesMatchingText="asset.no-assets-matching",this.entityRequiredText="asset.asset-required",this.notFoundEntities="asset.no-assets-text";break;case G.DEVICE:this.entityText="device.device",this.noEntitiesMatchingText="device.no-devices-matching",this.entityRequiredText="device.device-required",this.notFoundEntities="device.no-devices-text";break;case G.ENTITY_VIEW:this.entityText="entity-view.entity-view",this.noEntitiesMatchingText="entity-view.no-entity-views-matching",this.entityRequiredText="entity-view.entity-view-required",this.notFoundEntities="entity-view.no-entity-views-text";break;case G.EDGE:this.entityText="edge.edge",this.noEntitiesMatchingText="edge.no-edges-matching",this.entityRequiredText="edge.edge-required",this.notFoundEntities="edge.no-edges-text";break;case G.RULE_CHAIN:this.entityText="rulechain.rulechain",this.noEntitiesMatchingText="rulechain.no-rulechains-matching",this.entityRequiredText="rulechain.rulechain-required",this.notFoundEntities="rulechain.no-rulechains-text";break;case G.TENANT:case ea.CURRENT_TENANT:this.entityText="tenant.tenant",this.noEntitiesMatchingText="tenant.no-tenants-matching",this.entityRequiredText="tenant.tenant-required",this.notFoundEntities="tenant.no-tenants-text";break;case G.CUSTOMER:this.entityText="customer.customer",this.noEntitiesMatchingText="customer.no-customers-matching",this.entityRequiredText="customer.customer-required",this.notFoundEntities="customer.no-customers-text";break;case G.USER:case ea.CURRENT_USER:this.entityText="user.user",this.noEntitiesMatchingText="user.no-users-matching",this.entityRequiredText="user.user-required",this.notFoundEntities="user.no-users-text";break;case G.DASHBOARD:this.entityText="dashboard.dashboard",this.noEntitiesMatchingText="dashboard.no-dashboards-matching",this.entityRequiredText="dashboard.dashboard-required",this.notFoundEntities="dashboard.no-dashboards-text";break;case G.ALARM:this.entityText="alarm.alarm",this.noEntitiesMatchingText="alarm.no-alarms-matching",this.entityRequiredText="alarm.alarm-required",this.notFoundEntities="alarm.no-alarms-prompt";break;case G.QUEUE_STATS:this.entityText="queue-statistics.queue-statistics",this.noEntitiesMatchingText="queue-statistics.no-queue-statistics-matching",this.entityRequiredText="queue-statistics.queue-statistics-required",this.notFoundEntities="queue-statistics.no-queue-statistics-text";break;case G.MOBILE_APP:this.entityText="mobile.application",this.noEntitiesMatchingText="mobile.no-application-matching",this.entityRequiredText="mobile.application-required",this.notFoundEntities="mobile.no-application-text";break;case G.MOBILE_APP_BUNDLE:this.entityText="mobile.bundle",this.noEntitiesMatchingText="mobile.no-bundle-matching",this.entityRequiredText="mobile.bundle-required",this.notFoundEntities="mobile.no-bundle-text";break;case G.NOTIFICATION_TARGET:this.entityText="notification.notification-recipient",this.noEntitiesMatchingText="notification.no-recipients-matching",this.entityRequiredText="notification.notification-recipient-required",this.notFoundEntities="notification.no-recipients-text";break;case G.AI_MODEL:this.entityText="ai-models.ai-model",this.noEntitiesMatchingText="ai-models.no-model-matching",this.entityRequiredText="ai-models.model-required",this.notFoundEntities="ai-models.no-model-text";break;case G.DOMAIN:this.entityText="entity.type-domain",this.noEntitiesMatchingText="admin.oauth2.no-domain-matching",this.entityRequiredText="admin.oauth2.domain-required",this.notFoundEntities="admin.oauth2.no-domain-text";break;case ea.CURRENT_CUSTOMER:this.entityText="customer.default-customer",this.noEntitiesMatchingText="customer.no-customers-matching",this.entityRequiredText="customer.default-customer-required",this.notFoundEntities="customer.no-customers-text";break;case ea.CURRENT_USER_OWNER:Mr(this.store).authority===Mt.TENANT_ADMIN?(this.entityText="tenant.tenant",this.noEntitiesMatchingText="tenant.no-tenants-matching",this.entityRequiredText="tenant.tenant-required"):(this.entityText="customer.customer",this.noEntitiesMatchingText="customer.no-customers-matching",this.entityRequiredText="customer.customer-required");break;case G.CONVERTER:this.entityText="converter.converter",this.noEntitiesMatchingText="converter.no-converters-matching",this.entityRequiredText="converter.converter-required",this.notFoundEntities="converter.no-converters-text";break;case G.INTEGRATION:this.entityText="integration.integration",this.noEntitiesMatchingText="integration.no-integrations-matching",this.entityRequiredText="integration.integration-required",this.notFoundEntities="integration.no-integrations-text";break;case G.SCHEDULER_EVENT:this.entityText="scheduler.scheduler-event",this.noEntitiesMatchingText="scheduler.no-scheduler-events-matching",this.entityRequiredText="scheduler.scheduler-event-required",this.notFoundEntities="scheduler.no-scheduler-events";break;case G.BLOB_ENTITY:this.entityText="blob-entity.blob-entity",this.noEntitiesMatchingText="blob-entity.no-blob-entities-matching",this.entityRequiredText="blob-entity.blob-entity-required",this.notFoundEntities="blob-entity.no-blob-entities-prompt";break;case G.REPORT_TEMPLATE:this.entityText="report-template.report-template",this.entitySubtypeValue===Oc.SUB_REPORT?(this.noEntitiesMatchingText="report-template.no-sub-reports-matching",this.notFoundEntities="report-template.no-sub-reports-text"):(this.noEntitiesMatchingText="report-template.no-report-templates-matching",this.notFoundEntities="report-template.no-report-templates-text"),this.entityRequiredText="report-template.report-template-required";break;case G.ROLE:this.entityText="role.role",this.noEntitiesMatchingText="role.no-roles-matching",this.entityRequiredText="role.role-required",this.notFoundEntities="role.no-roles-text";break}}getCurrentEntity(){let t=this.selectEntityFormGroup.get("entity").value;return t&&typeof t!="string"?t:null}setDisabledState(t){this.disabled=t,this.disabled?this.selectEntityFormGroup.disable({emitEvent:!1}):this.selectEntityFormGroup.enable({emitEvent:!1})}writeValue(t){return Gy(this,null,function*(){if(this.searchText="",De(t)&&(typeof t=="string"||t.entityType&&t.id)){let r,e;typeof t=="string"?(r=this.checkEntityType(this.entityTypeValue),e=t):(r=this.checkEntityType(t.entityType),e=t.id);let i=null;try{i=yield iB(this.entityService.getEntity(r,e,{ignoreLoading:!0,ignoreErrors:!0}))}
160catch{this.propagateChange(null)}this.modelValue=i!==null?this.useFullEntityId?i.id:i.id.id:null,this.entityURL=i?ml(i.id.id,r):"",this.selectEntityFormGroup.get("entity").patchValue(i!==null?i:"",{emitEvent:!1}),this.entityChanged.emit(i)}else this.modelValue=null,this.entityURL="",this.selectEntityFormGroup.get("entity").patchValue("",{emitEvent:!1});this.dirty=!0})}onFocus(){this.dirty&&(this.selectEntityFormGroup.get("entity").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}reset(){this.selectEntityFormGroup.get("entity").patchValue("",{emitEvent:!1})}updateView(t,r){Fn(this.modelValue,t)||(this.modelValue=t,this.entityURL=typeof r=="string"||!r?"":ml(r.id.id,r.id.entityType),this.propagateChange(this.modelValue),this.entityChanged.emit(r))}displayEntityFn(t){return t?t.name:void 0}fetchEntities(t){this.searchText=t;let r=this.checkEntityType(this.entityTypeValue);return this.entityService.getEntitiesByNameFilter(r,t,50,this.entitySubtypeValue,{ignoreLoading:!0}).pipe(vt(()=>Z(null)),W(e=>{if(e)if(this.excludeEntityIds&&this.excludeEntityIds.length){let i=new Set(this.excludeEntityIds),o=[];return e.forEach(a=>!i.has(a.id.id)&&o.push(a)),o}else return e;else return[]}))}textIsNotEmpty(t){return t&&t.length>0}clear(){this.selectEntityFormGroup.get("entity").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.entityInput.nativeElement.blur(),this.entityInput.nativeElement.focus()},0)}checkEntityType(t){return t===ea.CURRENT_CUSTOMER?G.CUSTOMER:t===ea.CURRENT_TENANT?G.TENANT:t===ea.CURRENT_USER?G.USER:t===ea.CURRENT_USER_OWNER?Mr(this.store).authority===Mt.TENANT_ADMIN?G.TENANT:G.CUSTOMER:t}createNewEntity(t){t.stopPropagation(),this.createNew.emit()}openEntityDetailsNewTab(t){t.stopPropagation();let r=this.router.serializeUrl(this.router.createUrlTree([this.entityURL]));window.open(r,"_blank")}get showEntityLink(){return this.selectEntityFormGroup.get("entity").value&&this.disabled&&this.entityURL!==""}};Wg.\u0275fac=function(r){return new(r||Wg)(h(ve),h(rr),h(Wt),h(vi))},Wg.\u0275cmp=L({type:Wg,selectors:[["tb-entity-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(tfe,7),r&2){let i;Q(i=K())&&(e.entityInput=i.first)}},inputs:{entityType:"entityType",entitySubtype:"entitySubtype",excludeEntityIds:"excludeEntityIds",labelText:"labelText",requiredText:"requiredText",placeholder:"placeholder",useFullEntityId:"useFullEntityId",appearance:"appearance",inlineField:"inlineField",required:"required",disabled:"disabled",allowCreateNew:"allowCreateNew",newTabDetailsButton:"newTabDetailsButton",newTabDetailsButtonHint:"newTabDetailsButtonHint",subscriptSizing:"subscriptSizing",additionalClasses:"additionalClasses"},outputs:{entityChanged:"entityChanged",createNew:"createNew"},features:[ne([{provide:ye,useExisting:he(()=>Wg),multi:!0}])],decls:16,vars:30,consts:[["entityInput",""],["entityAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","appearance","subscriptSizing"],[4,"ngIf"],["matInput","","type","text","formControlName","entity",3,"focusin","placeholder","required","matAutocomplete"],["aria-label","Open entity details page",3,"routerLink",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["mat-button","","color","primary","matSuffix","","type","button",3,"click",4,"ngIf"],["type","button","matTooltipPosition","above","matSuffix","","mat-icon-button","","aria-label","Details",3,"matTooltip","click",4,"ngIf"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error",3,"matTooltip",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],["aria-label","Open entity details page",3,"routerLink"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],["mat-button","","color","primary","matSuffix","","type","button",3,"click"],[2,"white-space","nowrap"],["type","button","matTooltipPosition","above","matSuffix","","mat-icon-button","","aria-label","Details",3,"click","matTooltip"],["matButtonIcon",""],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"],[3,"value"],[3,"innerHTML"],[3,"click"],[4,"ngIf","ngIfElse"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",3),x(1,nfe,3,3,"mat-label",4),d(2,"input",5,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(4,rfe,2,2,"a",6)(5,ofe,3,0,"button",7)(6,afe,4,3,"button",8)(7,sfe,4,3,"button",9)(8,lfe,3,3,"mat-icon",10),d(9,"mat-autocomplete",11,1),x(11,cfe,3,7,"mat-option",12),v(12,"async"),x(13,mfe,5,3,"mat-option",13),v(14,"async"),p(),x(15,ufe,3,3,"mat-error",4),p()}if(r&2){let i,o=me(10);bt(e.additionalClasses),Y("tb-inline-field",e.inlineField)("flex",e.inlineField)("tb-suffix-absolute",e.inlineField&&!e.selectEntityFormGroup.get("entity").value),m("formGroup",e.selectEntityFormGroup)("appearance",e.inlineField?"outline":e.appearance)("subscriptSizing",e.inlineField?"dynamic":e.subscriptSizing),l(),m("ngIf",!e.inlineField),l(),Y("!hidden",e.showEntityLink),te("placeholder",e.placeholder),m("required",e.required)("matAutocomplete",o),l(2),m("ngIf",e.showEntityLink),l(),m("ngIf",e.selectEntityFormGroup.get("entity").value&&!e.disabled),l(),m("ngIf",e.allowCreateNew&&!e.selectEntityFormGroup.get("entity").value&&!e.disabled),l(),m("ngIf",e.selectEntityFormGroup.get("entity").value&&e.newTabDetailsButton&&e.entityURL!==""&&!e.disabled),l(),m("ngIf",e.inlineField&&e.selectEntityFormGroup.get("entity").hasError("required")&&e.selectEntityFormGroup.get("entity").touched),l(),m("displayWith",e.displayEntityFn),l(2),m("ngForOf",C(12,26,e.filteredEntities)),l(2),m("ngIf",!((i=C(14,28,e.filteredEntities))!=null&&i.length)),l(2),m("ngIf",!e.inlineField&&e.selectEntityFormGroup.get("entity").hasError("required"))}},dependencies:[Ke,ce,ll,yt,Pe,Se,at,ze,At,ni,Yt,xt,zt,Ri,mi,ut,xe,We,St,$e,Qe,In,Ve,be,Mi],encapsulation:2});var Na=Wg;pe([fe(),le("design:type",Boolean)],Na.prototype,"useFullEntityId",void 0);pe([fe(),le("design:type",Boolean)],Na.prototype,"inlineField",void 0);pe([fe(),le("design:type",Boolean)],Na.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Na.prototype,"disabled",void 0);pe([fe(),le("design:type",Boolean)],Na.prototype,"allowCreateNew",void 0);pe([fe(),le("design:type",Boolean)],Na.prototype,"newTabDetailsButton",void 0);pe([pd(),le("design:type",Array)],Na.prototype,"additionalClasses",void 0);var FF={};Ae(FF,{EntityListComponent:()=>Pc});y();var d8=Ld(YB());var hfe=["entityInput"],ffe=["entityAutocomplete"],gfe=["chipList"],bfe=[[["","matSuffix",""]]],_fe=["[matSuffix]"],vfe=n=>({entity:n});function yfe(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
160();l(),z(r.labelText)}}function Cfe(n,t){n&1&&(d(0,"mat-icon",15),g(1,"close"),p())}function wfe(n,t){if(n&1){let r=B();d(0,"mat-chip-row",13),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,Cfe,2,0,"mat-icon",14),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",r.name," "),l(),m("ngIf",!e.disabled)}}function xfe(n,t){if(n&1&&(d(0,"mat-option",16),O(1,"span",17),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function Sfe(n,t){n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2&&(l(2),z(C(3,1,"entity.no-entities-text")))}function Tfe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"translate"),p()),n&2){let r=b(2);l(),j(" ",ft(2,1,r.noEntitiesText,Xe(4,vfe,r.searchText))," ")}}function Efe(n,t){if(n&1){let r=B();d(0,"mat-option",16)(1,"div",18),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,Sfe,4,3,"div",19)(3,Tfe,3,6,"ng-template",null,3,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function Ife(n,t){if(n&1&&(d(0,"mat-hint"),g(1),p()),n&2){let r=b
160();l(),j(" ",r.hint," ")}}function kfe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.requiredLabel," ")}}var bh=class bh{get required(){return this.requiredValue}set required(t){let r=mt(t);this.requiredValue!==r&&(this.requiredValue=r,this.updateValidators())}constructor(t,r,e){this.translate=t,this.entityService=r,this.fb=e,this.appearance="fill",this.entitySubType="",this.entityListText="entity.entity-list",this.noEntitiesText="entity.no-entities-matching",this.entitiesRequiredText="entity.entity-list-empty",this.placeholderText=this.translate.instant("entity.entity-list"),this.requiredText=this.translate.instant("entity.entity-list-empty"),this.subscriptSizing="fixed",this.syncIdsWithDB=!1,this.entities=[],this.searchText="",this.dirty=!1,this.propagateChange=i=>{},this.entityListFormGroup=this.fb.group({entities:[this.entities],entity:[null]})}updateValidators(){this.entityListFormGroup.get("entities").setValidators(this.required?[ke.required]:[]),this.entityListFormGroup.get("entities").updateValueAndValidity()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.filteredEntities=this.entityListFormGroup.get("entity").valueChanges.pipe(et(t=>{t&&typeof t!="string"?this.add(t):t===null&&this.clear(this.entityInput.nativeElement.value)}),Pi(t=>typeof t=="string"),W(t=>t||""),Ft(t=>this.fetchEntities(t)),Si())}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];!e.firstChange&&e.currentValue!==e.previousValue&&r==="entityType"&&this.reset()}}setDisabledState(t){this.disabled=t,t?this.entityListFormGroup.disable({emitEvent:!1}):this.entityListFormGroup.enable({emitEvent:!1})}writeValue(t){if(this.searchText="",t?.length>0){let r;if(typeof t[0]=="string"){let e=t;this.modelValue=[...e],r=this.entityService.getEntities(this.entityType,e)}else{let e=t;this.modelValue=e.map(i=>i.id.id),r=Z(e)}r.subscribe(e=>{this.entities=e,this.entityListFormGroup.get("entities").setValue(this.entities),this.syncIdsWithDB&&this.modelValue.length!==e.length&&(this.modelValue=e.map(i=>
160i.id.id),this.propagateChange(this.modelValue))})}else this.entities=[],this.entityListFormGroup.get("entities").setValue(this.entities),this.modelValue=null;this.dirty=!0}validate(){return(0,d8.isArray)(this.modelValue)&&this.modelValue.length||!this.required?null:{entities:{valid:!1}}}reset(){this.entities=[],this.entityListFormGroup.get("entities").setValue(this.entities),this.modelValue=null,this.entityInput&&(this.entityInput.nativeElement.value=""),this.entityListFormGroup.get("entity").patchValue("",{emitEvent:!1}),this.propagateChange(this.modelValue),this.dirty=!0}add(t){(!this.modelValue||this.modelValue.indexOf(t.id.id)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(t.id.id),this.entities.push(t),this.entityListFormGroup.get("entities").setValue(this.entities)),this.propagateChange(this.modelValue),this.clear()}remove(t){let r=this.entities.indexOf(t);r>=0&&(this.entities.splice(r,1),this.entityListFormGroup.get("entities").setValue(this.entities),r=this.modelValue.indexOf(t.id.id),this.modelValue.splice(r,1),this.modelValue.length||(this.modelValue=null),this.propagateChange(this.modelValue),this.clear())}displayEntityFn(t){return t?t.name:void 0}fetchEntities(t){return this.searchText=t,this.fetchEntitiesFunction?this.fetchEntitiesFunction(t).pipe(W(r=>r||[])):this.entityService.getEntitiesByNameFilter(this.entityType,t,50,this.entitySubType,{ignoreLoading:!0}).pipe(W(r=>r||[]))}onFocus(){this.dirty&&(this.entityListFormGroup.get("entity").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}clear(t=""){this.entityInput.nativeElement.value=t,this.entityListFormGroup.get("entity").patchValue(t,{emitEvent:!0}),setTimeout(()=>{this.entityInput.nativeElement.blur(),this.entityInput.nativeElement.focus()},0)}get placeholder(){return this.placeholderText?this.placeholderText:this.entityListText?this.translate.instant(this.entityListText):void 0}get requiredLabel(){return this.requiredText?this.requiredText:this.entitiesRequiredText?this.translate.instant(this.entitiesRequiredText):void 0}textIsNotEmpty(t){return t&&t.length>0}};bh.\u0275fac=function(r){return new(r||bh)(h(Ge),h(rr),h(Wt))},bh.\u0275cmp=L({type:bh,selectors:[["tb-entity-list"]],viewQuery:function(r,e){if(r&1&&(ae(hfe,5),ae(ffe,5),ae(gfe,7)),r&2){let i;Q(i=K())&&(e.entityInput=i.first),Q(i=K())&&(e.matAutocomplete=i.first),Q(i=K())&&(e.chipList=i.first)}},inputs:{fetchEntitiesFunction:"fetchEntitiesFunction",appearance:"appearance",entityType:"entityType",entitySubType:"entitySubType",entityListText:"entityListText",noEntitiesText:"noEntitiesText",entitiesRequiredText:"entitiesRequiredText",labelText:"labelText",placeholderText:"placeholderText",requiredText:"requiredText",required:"required",disabled:"disabled",subscriptSizing:"subscriptSizing",hint:"hint",syncIdsWithDB:"syncIdsWithDB",inlineField:"inlineField"},features:[ne([{provide:ye,useExisting:he(()=>bh),multi:!0},{provide:zn,useExisting:he(()=>bh),multi:!0}]),lt],ngContentSelectors:_fe,decls:18,vars:24,consts:[["chipList",""],["entityInput","","origin","matAutocompleteOrigin"],["entityAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","appearance","subscriptSizing"],[4,"ngIf"],["formControlName","entities"],["class","tb-chip-row-ellipsis",3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","entity","matAutocompleteOrigin","",3,"focusin","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],["matSuffix",""],[1,"tb-chip-row-ellipsis",3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"],[3,"click"],[4,"ngIf","ngIfElse"]],template:function(r,e){if(r&1){let i=B();Ct(bfe),d(0,"mat-form-field",4),x(1,yfe,2,1,"mat-label",5),d(2,"mat-chip-grid",6,0),x(4,wfe,3,3,"mat-chip-row",7),d(5,"input",8,1),T("focusin",function(){return D(i),M(e.onFocus())}),p()(),d(8,"mat-autocomplete",9,2),x(10,xfe,3,5,"mat-option",10),v(11,"async"),x(12,Efe,5,3,"mat-option",11),v(13,"async"),p(),x(14,Ife,2,1,"mat-hint",5)(15,kfe,2,1,"mat-error",5),d(16,"div",12),Fe(17),p()()}if(r&2){let i,o=me(3),a=me(7),s=me(9);Y("tb-chip-list",!e.labelText&&!e.inlineField)("tb-chips",e.inlineField)("flex",e.inlineField),m("formGroup",e.entityListFormGroup)("appearance",e.inlineField?"outline":e.appearance)("subscriptSizing",e.inlineField?"dynamic":e.subscriptSizing),l(),m("ngIf",!e.inlineField&&e.labelText),l(3),m("ngForOf",e.entities),l(),te("placeholder",e.disabled?"":e.placeholderText),m("matAutocompleteConnectedTo",a)("matAutocomplete",s)("matChipInputFor",o),l(3),m("displayWith",e.displayEntityFn),l(2),m("ngForOf",C(11,20,e.filteredEntities)),l(2),m("ngIf",!((i=C(13,22,e.filteredEntities))!=null&&i.length)),l(2),m("ngIf",!e.inlineField&&e.hint),l(),m("ngIf",!e.inlineField&&e.entityListFormGroup.get("entities").hasError("required"))}},dependencies:[Ke,ce,Se,at,ze,At,to,ni,Yt,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi],encapsulation:2});var Pc=bh;pe([fe(),le("design:type",Object)],Pc.prototype,"syncIdsWithDB",void 0);pe([fe(),le("design:type",Boolean)],Pc.prototype,"inlineField",void 0);var tk={};Ae(tk,{EntityTypeSelectComponent:()=>Xs});y();function Dfe(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
160();l(),z(r.label)}}function Mfe(n,t){if(n&1&&(d(0,"mat-option",4),g(1),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",e.displayEntityTypeFn(r)," ")}}function Afe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"entity.type-required")," "))}var Yg=class Yg{constructor(t,r,e,i){this.entityService=t,this.translate=r,this.fb=e,this.destroyRef=i,this.filterAllowedEntityTypes=!0,this.label=this.translate.instant("entity.type"),this.additionEntityTypes={},this.appearance="fill",this.propagateChange=o=>{},this.entityTypeFormGroup=this.fb.group({entityType:[null]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.entityTypes=this.filterAllowedEntityTypes?this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes,this.useAliasEntityTypes,this.operation):this.allowedEntityTypes;let t=Object.keys(this.additionEntityTypes);t.length>0&&this.entityTypes.push(...t),this.entityTypeFormGroup.get("entityType").valueChanges.pipe(yi(this.destroyRef)).subscribe(r=>{let e;!r||r===""?e=null:e=r,this.updateView(e)})}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];if(!e.firstChange&&e.currentValue!==e.previousValue&&r==="allowedEntityTypes"){this.entityTypes=this.filterAllowedEntityTypes?this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes,this.useAliasEntityTypes):this.allowedEntityTypes;let i=Object.keys(this.additionEntityTypes);i.length>0&&this.entityTypes.push(...i);let o=this.entityTypeFormGroup.get("entityType").value;o&&!this.entityTypes.includes(o)&&this.entityTypeFormGroup.get("entityType").patchValue(null,{emitEvent:!0})}}}setDisabledState(t){this.disabled=t,this.disabled?this.entityTypeFormGroup.disable():this.entityTypeFormGroup.enable()}writeValue(t){t!=null?(this.modelValue=t,this.entityTypeFormGroup.get("entityType").patchValue(t,{emitEvent:!0})):(this.modelValue=null,this.entityTypeFormGroup.get("entityType").patchValue(null,{emitEvent:!0}))}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}displayEntityTypeFn(t){return this.additionEntityTypes[t]?this.additionEntityTypes[t]:t?this.overrideEntityTypeTranslations&&this.overrideEntityTypeTranslations.has(t)?this.translate.instant(this.overrideEntityTypeTranslations.get(t)):this.translate.instant(ta.get(t).type):""}};Yg.\u0275fac=function(r){return new(r||Yg)(h(rr),h(Ge),h(Wt),h(En))},Yg.\u0275cmp=L({type:Yg,selectors:[["tb-entity-type-select"]],inputs:{allowedEntityTypes:"allowedEntityTypes",useAliasEntityTypes:"useAliasEntityTypes",operation:"operation",filterAllowedEntityTypes:"filterAllowedEntityTypes",overrideEntityTypeTranslations:"overrideEntityTypeTranslations",showLabel:"showLabel",label:"label",required:"required",disabled:"disabled",additionEntityTypes:"additionEntityTypes",appearance:"appearance",inlineField:"inlineField"},features:[ne([{provide:ye,useExisting:he(()=>Yg),multi:!0}]),lt],decls:5,vars:7,consts:[[3,"formGroup","subscriptSizing","appearance"],[4,"ngIf"],["formControlName","entityType",3,"required"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(r,e){r&1&&(d(0,"mat-form-field",0),x(1,Dfe,2,1,"mat-label",1),d(2,"mat-select",2),x(3,Mfe,2,2,"mat-option",3),p(),x(4,Afe,3,3,"mat-error",1),p()),r&2&&(m("formGroup",e.entityTypeFormGroup)("subscriptSizing",e.inlineField?"dynamic":"fixed")("appearance",e.inlineField?"outline":e.appearance),l(),m("ngIf",e.showLabel&&!e.inlineField),l(),m("required",e.required),l(),m("ngForOf",e.entityTypes),l(),m("ngIf",!e.inlineField&&e.entityTypeFormGroup.get("entityType").hasError("required")))},dependencies:[Ke,ce,ze,At,ni,Kn,xt,xe,We,St,$e,Qe,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]     .mat-mdc-form-field-infix{width:100%}[_nghost-%COMP%]     .mat-mdc-select-value{min-width:100px}']});var Xs=Yg;pe([fe(),le("design:type",Boolean)],Xs.prototype,"showLabel",void 0);pe([fe(),le("design:type",Boolean)],Xs.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Xs.prototype,"inlineField",void 0);var p8={};Ae(p8,{EntitySelectComponent:()=>qm});
160y();function Ofe(n,t){if(n&1&&O(0,"tb-entity-type-select",3),n&2){let r=b();m("appearance",r.appearance)("showLabel",!0)("required",r.required)("useAliasEntityTypes",r.useAliasEntityTypes)("allowedEntityTypes",r.allowedEntityTypes)("additionEntityTypes",r.additionEntityTypes)("operation",r.operation)}}function Pfe(n,t){if(n&1&&O(0,"tb-entity-autocomplete",4),n&2){let r=b();m("appearance",r.appearance)("required",r.required)("entityType",r.modelValue.entityType)}}var Qg=class Qg{constructor(t,r,e,i,o){this.store=t,this.entityService=r,this.translate=e,this.fb=i,this.destroyRef=o,this.modelValue={entityType:null,id:null},this.additionEntityTypes={},this.appearance="fill",this.AliasEntityType=ea,this.entityTypeNullUUID=new Set([ea.CURRENT_TENANT,ea.CURRENT_USER,ea.CURRENT_USER_OWNER]),this.defaultEntityType=null,this.propagateChange=s=>{};let a=this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes,this.useAliasEntityTypes,this.operation);a.length===1?(this.displayEntityTypeSelect=!1,this.defaultEntityType=a[0]):this.displayEntityTypeSelect=!0,this.entitySelectFormGroup=this.fb.group({entityType:[this.defaultEntityType],entityId:[null]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.entitySelectFormGroup.get("entityType").valueChanges.pipe(yi(this.destroyRef)).subscribe(r=>{this.updateView(r,this.modelValue.id)}),this.entitySelectFormGroup.get("entityId").valueChanges.pipe(yi(this.destroyRef)).subscribe(r=>{let e=r?typeof r=="string"?r:r.id:null;this.updateView(this.modelValue.entityType,e)});let t=Object.keys(this.additionEntityTypes);t.length>0&&t.forEach(r=>this.entityTypeNullUUID.add(r))}ngAfterViewInit(){}setDisabledState(t){this.disabled=t,this.disabled?this.entitySelectFormGroup.disable():this.entitySelectFormGroup.enable()}writeValue(t){t!=null?this.modelValue={entityType:t.entityType,id:t.id!==Oa?t.id:null}:this.modelValue={entityType:this.defaultEntityType,id:null},this.entitySelectFormGroup.get("entityType").patchValue(this.modelValue.entityType,{emitEvent:!1}),this.entitySelectFormGroup.get("entityId").patchValue(this.modelValue,{emitEvent:!1})}updateView(t,r){(this.modelValue.entityType!==t||this.modelValue.id!==r)&&(this.modelValue={entityType:t,id:this.modelValue.entityType!==t?null:r},this.entityTypeNullUUID.has(this.modelValue.entityType)?this.modelValue.id=Oa:this.modelValue.entityType===ea.CURRENT_CUSTOMER&&!this.modelValue.id&&(this.modelValue.id=Oa),this.modelValue.entityType&&this.modelValue.id?this.propagateChange(this.modelValue):this.propagateChange(null))}};Qg.\u0275fac=function(r){return new(r||Qg)(h(ve),h(rr),h(Ge),h(Wt),h(En))},Qg.\u0275cmp=L({type:Qg,selectors:[["tb-entity-select"]],inputs:{allowedEntityTypes:"allowedEntityTypes",useAliasEntityTypes:"useAliasEntityTypes",operation:"operation",required:"required",disabled:"disabled",additionEntityTypes:"additionEntityTypes",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>Qg),multi:!0}])],decls:3,vars:3,consts:[[1,"flex","flex-row","gap-4","xs:flex-col","xs:gap-0",3,"formGroup"],["class","flex-1","formControlName","entityType",3,"appearance","showLabel","required","useAliasEntityTypes","allowedEntityTypes","additionEntityTypes","operation",4,"ngIf"],["class","flex-1","formControlName","entityId",3,"appearance","required","entityType",4,"ngIf"],["formControlName","entityType",1,"flex-1",3,"appearance","showLabel","required","useAliasEntityTypes","allowedEntityTypes","additionEntityTypes","operation"],["formControlName","entityId",1,"flex-1",3,"appearance","required","entityType"]],template:function(r,e){r&1&&(d(0,"div",0),x(1,Ofe,1,7,"tb-entity-type-select",1)(2,Pfe,1,3,"tb-entity-autocomplete",2),p()),r&2&&(m("formGroup",e.entitySelectFormGroup),l(),m("ngIf",e.displayEntityTypeSelect),l(),m("ngIf",e.modelValue.entityType&&!e.entityTypeNullUUID.has(e.modelValue.entityType)))},dependencies:[ce,xe,We,St,$e,Qe,Na,Xs],styles:['@charset "UTF-8";']});var qm=Qg;pe([fe(),le("design:type",Boolean)],qm.prototype,"required",void 0);var m8={};Ae(m8,{EntityGroupAutocompleteComponent:()=>Wm});y();var Rfe=["entityGroupInput"],Ffe=n=>({entityGroup:n});function Nfe(n,t){if(n&1){let r=B();d(0,"button",9),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",10),g(2,"close"),p()()}}function Vfe(n,t){if(n&1&&(d(0,"mat-option",11),O(1,"span",12),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function Lfe(n,t){if(n&1&&(d(0,"mat-option",11)(1,"span"),g(2),v(3,"async"),p()()),n&2){let r=b
160();m("value",null),l(2),j(" ",C(3,2,r.translate.get(r.notFoundText,Xe(4,Ffe,r.searchText)))," ")}}function Bfe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.requiredText)," ")}}var Kg=class Kg{get groupType(){return this.groupTypeValue}set groupType(t){this.groupTypeValue!==t&&(this.groupTypeValue&&this.reset(),this.groupTypeValue=t)}get ownerId(){return this.ownerIdValue}set ownerId(t){if(!Fn(this.ownerIdValue,t)){this.ownerIdValue=t;let e=this.getCurrentEntityGroup()===null;this.reset(e)}}get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}constructor(t,r,e){this.translate=t,this.entityGroupService=r,this.fb=e,this.modelValue=null,this.ownerIdValue=null,this.appearance="fill",this.entityGroupLoaded=new J,this.searchText="",this.pristine=!0,this.cleanFilteredEntityGroups=new Te,this.propagateChange=i=>{},this.selectEntityGroupFormGroup=this.fb.group({entityGroup:[null]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){let t=this.selectEntityGroupFormGroup.get("entityGroup").valueChanges.pipe(Wi(150),et(r=>{let e;typeof r=="string"||!r?e=null:e=this.useFullEntityId?r.id:r.id.id,this.updateView(e,r),r===null&&this.clear()}),W(r=>r?typeof r=="string"?r:r.name:""),ii(r=>this.fetchEntityGroups(r)),Si());this.filteredEntityGroups=Xt(this.cleanFilteredEntityGroups,t)}ngOnDestroy(){this.cleanFilteredEntityGroups.complete(),this.cleanFilteredEntityGroups=null}getCurrentEntityGroup(){let t=this.selectEntityGroupFormGroup.get("entityGroup").value;return t&&typeof t!="string"?t:null}setDisabledState(t){this.disabled=t,this.disabled?this.selectEntityGroupFormGroup.disable({emitEvent:!1}):this.selectEntityGroupFormGroup.enable({emitEvent:!1})}writeValue(t){if(this.searchText="",t!==null)if(t?.id?.id){let r=t;this.modelValue=this.useFullEntityId?r.id:r.id.id,this.selectEntityGroupFormGroup.get("entityGroup").patchValue(r,{emitEvent:!1}),this.entityGroupLoaded.next(r)}else{let r;typeof t=="string"?r=t:r=t.id,this.entityGroupService.getEntityGroup(r,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:({name:e,id:i,ownerId:o,type:a})=>{let s={name:e,id:i};this.modelValue=this.useFullEntityId?i:i.id,this.ownerIdValue=o,this.groupTypeValue=a,this.selectEntityGroupFormGroup.get("entityGroup").patchValue(s,{emitEvent:!1}),this.entityGroupLoaded.next(s)},error:()=>{this.modelValue=null,this.selectEntityGroupFormGroup.get("entityGroup").patchValue("",{emitEvent:!1}),this.entityGroupLoaded.next(null)}})}else this.modelValue=null,this.selectEntityGroupFormGroup.get("entityGroup").patchValue("",{emitEvent:!1}),this.entityGroupLoaded.next(null);this.pristine=!0}onFocus(){this.pristine&&(this.selectEntityGroupFormGroup.get("entityGroup").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.pristine=!1)}reset(t=!1){this.cleanFilteredEntityGroups.next([]),this.allEntityGroups=null,this.pristine=!0,t||(this.selectEntityGroupFormGroup.get("entityGroup").patchValue("",{emitEvent:!1}),setTimeout(()=>this.updateView(null,this.getCurrentEntityGroup())))}updateView(t,r){Fn(this.modelValue,t)||(this.modelValue=t,this.propagateChange(this.modelValue),pl(r)||r===null||this.entityGroupLoaded.next(r))}displayEntityGroupFn(t){return t?t.name:void 0}fetchEntityGroups(t){this.searchText=t;let r=new On(50,0,t,{property:"name",direction:Xn.ASC});return this.getEntityGroups(r).pipe(vt(()=>Z(yr())),W(e=>{let i=e.data;if(this.excludeGroupAll&&(i=i.filter(o=>o.name!=="All")),this.excludeGroupIds&&this.excludeGroupIds.length){let o=[];return i.forEach(a=>{this.excludeGroupIds.indexOf(a.id.id)===-1&&o.push(a)}),o}else return i}))}getEntityGroups(t){return this.ownerId?this.entityGroupService.getEntityGroupEntityInfosByOwnerId(t,this.ownerId.entityType,this.ownerId.id,this.groupType,{ignoreLoading:!0}):this.entityGroupService.getEntityGroupEntityInfos(t,this.groupType,!0,{ignoreLoading:!0})}clear(){this.selectEntityGroupFormGroup.get("entityGroup").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.entityGroupInput.nativeElement.blur(),this.entityGroupInput.nativeElement.focus()},0)}};Kg.\u0275fac=function(r){return new(r||Kg)(h(Ge),h(Dl),h(Ai))},Kg.\u0275cmp=L({type:Kg,selectors:[["tb-entity-group-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(Rfe,7),r&2){let i;Q(i=K())&&(e.entityGroupInput=i.first)}},inputs:{groupType:"groupType",ownerId:"ownerId",excludeGroupIds:"excludeGroupIds",excludeGroupAll:"excludeGroupAll",placeholderText:"placeholderText",notFoundText:"notFoundText",requiredText:"requiredText",required:"required",disabled:"disabled",appearance:"appearance",useFullEntityId:"useFullEntityId"},outputs:{entityGroupLoaded:"entityGroupLoaded"},features:[ne([{provide:ye,useExisting:he(()=>Kg),multi:!0}])],decls:14,vars:16,consts:[["entityGroupInput",""],["entityGroupAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup","appearance"],["matInput","","type","text","formControlName","entityGroup",3,"focusin","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",2)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",3,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(6,Nfe,3,0,"button",4),d(7,"mat-autocomplete",5,1),x(9,Vfe,3,5,"mat-option",6),v(10,"async"),x(11,Lfe,4,6,"mat-option",7),v(12,"async"),p(),x(13,Bfe,3,3,"mat-error",8),p()}if(r&2){let i,o=me(8);m("formGroup",e.selectEntityGroupFormGroup)("appearance",e.appearance),l(2),z(C(3,10,e.placeholderText)),l(2),m("required",e.required)("matAutocomplete",o),l(2),m("ngIf",e.selectEntityGroupFormGroup.get("entityGroup").value&&!e.disabled),l(),m("displayWith",e.displayEntityGroupFn),l(2),m("ngForOf",C(10,12,e.filteredEntityGroups)),l(2),m("ngIf",!((i=C(12,14,e.filteredEntityGroups))!=null&&i.length)),l(2),m("ngIf",e.selectEntityGroupFormGroup.get("entityGroup").hasError("required"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});var Wm=Kg;pe([fe(),le("design:type",Boolean)],Wm.prototype,"useFullEntityId",void 0);var nk={};Ae(nk,{OwnerAutocompleteComponent:()=>wp});y();y();var ik=(n,t)=>De(n)&&De(t)?n.id===t.id&&n.entityType===t.entityType:n===t,u8=(n,t)=>n.entityType===t.entityType?De(n.id)&&De(t.id)?n.id.localeCompare(t.id):!De(n.id)&&!De(t.id)?0:De(n.id)?1:-1:De(n.entityType)&&De(t.entityType)?n.entityType.localeCompare(t.entityType):!De(n.entityType)&&!De(t.entityType)?0:De(n.entityType)?1:-1,h8=(n,t)=>{if(De(n)&&De(t))if(n.length===t.length){n=[...n].sort(u8),t=[...t].sort(u8);for(let r=0;r<n.length;r++)if(!ik(n[r],t[r]))return!1;return!0}else return!1;else return n===t},XRt=(n,t)=>{for(let r of n)if(ik(r,t))return!0;return!1};var jfe=["ownerAutocomplete"],Gfe=["ownerInput"],zfe=(n,t)=>({owner:n,entity:t});function $fe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",11),g(2,"close"),p()()}}function Ufe(n,t){if(n&1&&(d(0,"mat-option",12),O(1,"span",13),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function Hfe(n,t){n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2&&(l(2),z(C(3,1,"entity-group.no-owners-text")))}function qfe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"translate"),p()),n&2){let r=b
160(2);l(),j(" ",ft(2,1,r.notFoundText,Yi(4,zfe,r.searchText,r.searchText))," ")}}function Wfe(n,t){if(n&1){let r=B();d(0,"mat-option",12)(1,"div",14),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,Hfe,4,3,"div",15)(3,qfe,3,7,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function Yfe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.requiredText)," ")}}var wp=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o){this.store=e,this.entityGroupService=i,this.fb=o,this.useOwnerInfoValue=!1,this.searchText="",this.dirty=!1,this.excludeOwnerIdsChanged=!1,this.clearButtonClicked=!1,this.propagateChange=a=>{},this.selectOwnerFormGroup=this.fb.group({owner:[null]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredOwners=this.selectOwnerFormGroup.get("owner").valueChanges.pipe(Wi(150),et(e=>{let i;typeof e=="string"||!e?i=null:i=e.id,this.updateView(i),e===null&&this.clear()}),W(e=>e?typeof e=="string"?e:e.name:""),xr((e,i)=>this.excludeOwnerIdsChanged?(this.excludeOwnerIdsChanged=!1,!1):e===i),ii(e=>this.fetchOwners(e)),Si())}ngAfterViewInit(){}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&i==="excludeOwnerIds"&&!h8(o.currentValue,o.previousValue)&&(this.dirty=!0,this.excludeOwnerIdsChanged=!0)}}setDisabledState(e){this.disabled=e,this.disabled?this.selectOwnerFormGroup.disable({emitEvent:!1}):this.selectOwnerFormGroup.enable({emitEvent:!1})}selectDefaultOwnerIfNeeded(){this.defaultOwnerId&&!this.modelValue&&setTimeout(()=>{this.entityGroupService.getOwnerInfo(this.defaultOwnerId,{ignoreLoading:!0}).subscribe(e=>{this.selectOwnerFormGroup.get("owner").patchValue(e,{emitEvent:!1}),this.updateView(e.id)})},0)}writeValue(e){if(this.searchText="",e!==null)if(e.entityType&&e.id){let i=e;this.entityGroupService.getOwnerInfo(i,{ignoreLoading:!0}).subscribe(o=>{this.modelValue=o.id,this.selectOwnerFormGroup.get("owner").patchValue(o,{emitEvent:!1})})}else{let i=e;this.modelValue=i.id,this.selectOwnerFormGroup.get("owner").patchValue(i,{emitEvent:!1})}else this.modelValue=null,this.selectOwnerFormGroup.get("owner").patchValue("",{emitEvent:!1}),this.selectDefaultOwnerIfNeeded();this.dirty=!0}onFocus(){this.dirty&&(this.selectOwnerFormGroup.get("owner").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}onBlur(){this.clearButtonClicked?this.clearButtonClicked=!1:this.matAutocomplete.isOpen||this.selectDefaultOwnerIfNeeded()}onPanelClosed(){this.selectDefaultOwnerIfNeeded()}reset(){this.selectOwnerFormGroup.get("owner").patchValue("",{emitEvent:!1})}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.useOwnerInfoValue?this.propagateChange(this.selectOwnerFormGroup.get("owner").value):this.propagateChange(this.modelValue))}displayOwnerFn(e){return e?e.name:void 0}fetchOwners(e){this.searchText=e;let i=50;this.excludeOwnerIds&&this.excludeOwnerIds.length&&(i+=this.excludeOwnerIds.length);let o=new On(i,0,e,{property:"name",direction:Xn.ASC});return this.entityGroupService.getOwnerInfos(o,{ignoreLoading:!0}).pipe(vt(()=>Z(null)),W(a=>{if(a)if(this.excludeOwnerIds&&this.excludeOwnerIds.length){let s=[];return a.data.forEach(c=>{this.excludeOwnerIds.indexOf(c.id.id)===-1&&s.push(c)}),s}else return a.data;else return[]}))}clear(){this.clearButtonClicked=!0,this.selectOwnerFormGroup.get("owner").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.ownerInput.nativeElement.blur(),this.ownerInput.nativeElement.focus()},0)}textIsNotEmpty(e){return e&&e.length>0}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Dl),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-owner-autocomplete"]],viewQuery:function(i,o){if(i&1&&(ae(jfe,5),ae(Gfe,7)),i&2){let a;Q(a=K())&&(o.matAutocomplete=a.first),Q(a=K())&&(o.ownerInput=a.first)}},inputs:{excludeOwnerIds:"excludeOwnerIds",placeholderText:"placeholderText",notFoundText:"notFoundText",requiredText:"requiredText",required:"required",useOwnerInfoValue:"useOwnerInfoValue",defaultOwnerId:"defaultOwnerId",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),lt],decls:15,vars:15,consts:[["ownerInput","","ownerMatInput","matInput"],["ownerAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","owner",3,"focusin","blur","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"closed","displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"],[3,"click"],[4,"ngIf","ngIfElse"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",4,0),T("focusin",function(){return D(a),M(o.onFocus())})("blur",function(){return D(a),M(o.onBlur())}),p(),x(7,$fe,3,0,"button",5),d(8,"mat-autocomplete",6,1),T("closed",function(){D(a);
160let c=me(6);return M(c.focused?!1:o.onPanelClosed())}),x(10,Ufe,3,5,"mat-option",7),v(11,"async"),x(12,Wfe,5,3,"mat-option",8),v(13,"async"),p(),x(14,Yfe,3,3,"mat-error",9),p()}if(i&2){let a,s=me(9);m("formGroup",o.selectOwnerFormGroup),l(2),z(C(3,9,o.placeholderText)),l(2),m("required",o.required)("matAutocomplete",s),l(3),m("ngIf",o.selectOwnerFormGroup.get("owner").value&&!o.disabled),l(),m("displayWith",o.displayOwnerFn),l(2),m("ngForOf",C(11,11,o.filteredOwners)),l(2),m("ngIf",!((a=C(13,13,o.filteredOwners))!=null&&a.length)),l(2),m("ngIf",o.selectOwnerFormGroup.get("owner").hasError("required"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();var rk={};Ae(rk,{EntityGroupSelectComponent:()=>xp});y();function Qfe(n,t){if(n&1&&O(0,"tb-entity-type-select",3),n&2){let r=b();m("showLabel",!0)("required",r.required)("allowedEntityTypes",r.entityGroupTypes)("appearance",r.appearance)}}var xp=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c){this.store=e,this.entityService=i,this.entityGroupService=o,this.translate=a,this.fb=s,this.destroyRef=c,this.appearance="fill",this.currentGroupType=new J,this.currentGroupInfo=new J,this.propagateChange=u=>{}}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.entityGroupTypes=[...yR],this.allowedGroupTypes&&this.allowedGroupTypes.length&&(this.entityGroupTypes=[],yR.forEach(e=>{this.allowedGroupTypes.indexOf(e)!==-1&&this.entityGroupTypes.push(e)})),this.excludeGroupTypes&&this.excludeGroupTypes.length&&this.excludeGroupTypes.forEach(e=>{let i=this.entityGroupTypes.indexOf(e);i>-1&&this.entityGroupTypes.splice(i,1)}),this.entityGroupTypes.length===1?(this.displayGroupTypeSelect=!1,this.defaultGroupType=this.entityGroupTypes[0]):this.displayGroupTypeSelect=!0,this.entityGroupSelectFormGroup=this.fb.group({groupType:[this.defaultGroupType],groupId:[null]}),this.currentGroupType.next(this.defaultGroupType),this.entityGroupSelectFormGroup.get("groupType").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{this.currentGroupType.next(e)}),this.entityGroupSelectFormGroup.get("groupId").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{this.updateView(e)})}ngAfterViewInit(){}setDisabledState(e){this.disabled=e,this.disabled?this.entityGroupSelectFormGroup.disable():this.entityGroupSelectFormGroup.enable()}writeValue(e){e!==null?(this.modelValue=e.id,this.entityGroupSelectFormGroup.get("groupId").patchValue(e.id,{emitEvent:!0})):this.entityGroupSelectFormGroup.get("groupId").patchValue(null,{emitEvent:!0})}entityGroupLoaded(e){(e?this.entityGroupService.getEntityGroup(e.id.id,{ignoreLoading:!0}):Z(null)).subscribe(i=>{this.currentGroupInfo.next(i),this.entityGroupSelectFormGroup.get("groupType").patchValue(i?i.type:null,{emitEvent:!0})})}getCurrentGroupType(){let e=this.entityGroupSelectFormGroup.get("groupType").value;return e||(e=this.defaultGroupType),e}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.modelValue?this.propagateChange({entityType:G.ENTITY_GROUP,id:this.modelValue}):this.propagateChange(null))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(rr),h(Dl),h(Ge),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-group-select"]],inputs:{allowedGroupTypes:"allowedGroupTypes",excludeGroupTypes:"excludeGroupTypes",defaultGroupType:"defaultGroupType",excludeGroupIds:"excludeGroupIds",excludeGroupAll:"excludeGroupAll",placeholderText:"placeholderText",notFoundText:"notFoundText",requiredText:"requiredText",ownerId:"ownerId",originator:"originator",appearance:"appearance",required:"required",disabled:"disabled"},outputs:{currentGroupType:"currentGroupType",currentGroupInfo:"currentGroupInfo"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:3,vars:15,consts:[[1,"tb-entity-group-select","flex","flex-row","gap-2",3,"formGroup"],["style","min-width: 100px","class","flex-1","formControlName","groupType",3,"showLabel","required","allowedEntityTypes","appearance",4,"ngIf"],["formControlName","groupId",1,"flex-1",3,"entityGroupLoaded","required","groupType","ownerId","appearance","excludeGroupIds","excludeGroupAll","placeholderText","notFoundText","requiredText"],["formControlName","groupType",1,"flex-1",2,"min-width","100px",3,"showLabel","required","allowedEntityTypes","appearance"]],template:function(i,o){i&1&&(d(0,"div",0),x(1,Qfe,1,4,"tb-entity-type-select",1),d(2,"tb-entity-group-autocomplete",2),T("entityGroupLoaded",function(s){return o.entityGroupLoaded(s)}),p()()),i&2&&(Y("!hidden",!o.ownerId&&o.originator==="ownerGroup"),m("formGroup",o.entityGroupSelectFormGroup),l(),m("ngIf",o.displayGroupTypeSelect),l(),Y("!hidden",!o.entityGroupSelectFormGroup.get("groupType").value&&!o.entityGroupSelectFormGroup.get("groupId").value&&o.displayGroupTypeSelect),te("placeholderText",o.placeholderText),te("notFoundText",o.notFoundText),te("requiredText",o.requiredText),m("required",o.required)("groupType",o.getCurrentGroupType())("ownerId",o.ownerId)("appearance",o.appearance)("excludeGroupIds",o.excludeGroupIds)("excludeGroupAll",o.excludeGroupAll))},dependencies:[ce,xe,We,St,$e,Qe,Xs,Wm],encapsulation:2});let n=t;return n})();var cge={};Ae(cge,{EntityGroupListComponent:()=>ok});y();var Sp={};Ae(Sp,{TruncatePipe:()=>$o});y();var $o=(()=>{let t=class t{transform(e,i,o,a){if(!e)return"";if(pl(o)&&(o=parseInt(o,10)),!o||e.length<=o)return e;if(e=e.substr(0,o),i){let s=e.lastIndexOf(" ");s!==-1&&((e.charAt(s-1)==="."||e.charAt(s-1)===",")&&(s=s-1),e=e.substr(0,s))}return e+(a||" \u2026")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"truncate",type:t,pure:!0});let n=t;return n})();var Kfe=["entityGroupInput"],Xfe=["entityGroupAutocomplete"],Zfe=["chipList"],Jfe=n=>({entityGroup:n});function ege(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
160();l(),z(r.labelText)}}function tge(n,t){n&1&&(d(0,"mat-icon",14),g(1,"close"),p())}function ige(n,t){if(n&1){let r=B();d(0,"mat-chip-row",12),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,tge,2,0,"mat-icon",13),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",r.name," "),l(),m("ngIf",!e.disabled)}}function nge(n,t){if(n&1&&(d(0,"mat-option",15),O(1,"span",16),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function rge(n,t){n&1&&(d(0,"div")(1,"span",20),g(2,"entity-group.no-entity-groups-text"),p()())}function oge(n,t){if(n&1&&(d(0,"div"),g(1),v(2,"async"),p()),n&2){let r=b(2);l(),j(" ",C(2,1,r.translate.get("entity-group.no-entity-groups-matching",Xe(3,Jfe,r.truncate.transform(r.searchText,!0,12,"..."))))," ")}}function age(n,t){if(n&1){let r=B();d(0,"span")(1,"a",21),T("click",function(i){D(r);let o=b(2);return M(o.createEntityGroup(i,o.searchText))}),g(2,"entity-group.create-new-entity-group"),p()()}}function sge(n,t){if(n&1){let r=B();d(0,"mat-option",17)(1,"div",18),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,rge,3,0,"div",19)(3,oge,3,5,"ng-template",null,3,kt)(5,age,3,0,"span",5),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r),l(3),m("ngIf",e.createGroupFunction)}}function lge(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"entity-group.entity-group-list-empty")," "))}var ok=(()=>{let t=class t{get ownerId(){return this.ownerIdValue}set ownerId(e){ik(this.ownerIdValue,e)||this.reset(),this.ownerIdValue=e}get required(){return this.requiredValue}set required(e){let i=mt(e);this.requiredValue!==i&&(this.requiredValue=i,this.updateValidators())}constructor(e,i,o,a,s){this.store=e,this.translate=i,this.entityGroupService=o,this.fb=a,this.truncate=s,this.appearance="fill",this.useGroupInfoValue=!1,this.entityGroups=[],this.searchText="",this.dirty=!1,this.propagateChange=c=>{},this.entityGroupListFormGroup=this.fb.group({entityGroups:[this.entityGroups,this.required?[ke.required]:[]],entityGroup:[null]})}updateValidators(){this.entityGroupListFormGroup.get("entityGroups").setValidators(this.required?[ke.required]:[]),this.entityGroupListFormGroup.get("entityGroups").updateValueAndValidity()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredEntityGroups=this.entityGroupListFormGroup.get("entityGroup").valueChanges.pipe(et(e=>{e&&typeof e!="string"?this.add(e):e===null&&this.clear(this.entityGroupInput.nativeElement.value)}),Pi(e=>typeof e=="string"),W(e=>e||""),Ft(e=>this.fetchEntityGroups(e)),Si())}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&i==="groupType"&&this.reset()}}ngAfterViewInit(){}setDisabledState(e){this.disabled=e,e?this.entityGroupListFormGroup.disable({emitEvent:!1}):this.entityGroupListFormGroup.enable({emitEvent:!1})}writeValue(e){if(this.searchText="",e!=null&&e.length>0)if(e[0].id){let i=e;this.modelValue=i.map(o=>o.id.id),this.entityGroups=[...i],this.entityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups)}else{let i=e;this.modelValue=[...i],this.entityGroupService.getEntityGroupEntityInfosByIds(i,{ignoreLoading:!0}).subscribe(o=>{this.entityGroups=o,this.entityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups)})}else this.entityGroups=[],this.entityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups),this.modelValue=null;this.dirty=!0}reset(){this.entityGroups=[],this.entityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups),this.modelValue=null,this.entityGroupInput&&(this.entityGroupInput.nativeElement.value=""),this.entityGroupListFormGroup.get("entityGroup").patchValue("",{emitEvent:!1}),this.updateView(),this.dirty=!0}add(e){(!this.modelValue||this.modelValue.indexOf(e.id.id)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(e.id.id),this.entityGroups.push(e),this.entityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups)),this.updateView(),this.clear()}remove(e){let i=this.entityGroups.indexOf(e);i>=0&&(this.entityGroups.splice(i,1),this.entityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups),this.modelValue.splice(i,1),this.modelValue.length||(this.modelValue=null),this.updateView(),this.clear())}
160updateView(){this.useGroupInfoValue?this.propagateChange(this.entityGroups):this.propagateChange(this.modelValue)}displayEntityGroupFn(e){return e?e.name:void 0}fetchEntityGroups(e){this.searchText=e;let i=new On(50,0,e,{property:"name",direction:Xn.ASC});return this.getEntityGroups(i).pipe(vt(()=>Z(yr())),W(o=>{let a=o.data;return this.excludeGroupAll&&(a=a.filter(s=>s.name!=="All")),this.modelValue&&(a=a.filter(s=>!this.modelValue.includes(s.id.id))),a}))}getEntityGroups(e){return this.ownerId?this.entityGroupService.getEntityGroupEntityInfosByOwnerId(e,this.ownerId.entityType,this.ownerId.id,this.groupType,{ignoreLoading:!0}):this.entityGroupService.getEntityGroupEntityInfos(e,this.groupType,!0,{ignoreLoading:!0})}onFocus(){this.dirty&&(this.entityGroupListFormGroup.get("entityGroup").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}textIsNotEmpty(e){return!!(e&&e!=null&&e.length>0)}clear(e=""){this.entityGroupInput.nativeElement.value=e,this.entityGroupListFormGroup.get("entityGroup").patchValue(e,{emitEvent:!0}),setTimeout(()=>{this.entityGroupInput.nativeElement.blur(),this.entityGroupInput.nativeElement.focus()},0)}entityGroupEnter(e){e.keyCode===13&&(e.preventDefault(),this.createEntityGroup(e,this.searchText))}createEntityGroup(e,i){e.preventDefault(),this.createGroupFunction&&this.createGroupFunction(this.groupType,i,this.ownerId).subscribe(o=>{o?this.add(o):setTimeout(()=>{this.entityGroupInput.nativeElement.blur(),this.entityGroupInput.nativeElement.focus()},0)})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(Dl),h(Wt),h($o))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-group-list"]],viewQuery:function(i,o){if(i&1&&(ae(Kfe,5),ae(Xfe,5),ae(Zfe,7)),i&2){let a;Q(a=K())&&(o.entityGroupInput=a.first),Q(a=K())&&(o.matAutocomplete=a.first),Q(a=K())&&(o.chipList=a.first)}},inputs:{groupType:"groupType",ownerId:"ownerId",excludeGroupAll:"excludeGroupAll",labelText:"labelText",appearance:"appearance",required:"required",useGroupInfoValue:"useGroupInfoValue",createGroupFunction:"createGroupFunction",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),lt],decls:16,vars:20,consts:[["chipList",""],["entityGroupInput","","origin","matAutocompleteOrigin"],["entityGroupAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","appearance"],[4,"ngIf"],["formControlName","entityGroups"],["class","tb-chip-row-ellipsis",3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","entityGroup","matAutocompleteOrigin","",2,"max-width","200px",3,"focusin","keydown","keypress","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor"],["panelWidth","fit-content",1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[1,"tb-chip-row-ellipsis",3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate",""],["translate","",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",4),x(1,ege,2,1,"mat-label",5),d(2,"mat-chip-grid",6,0),x(4,ige,3,3,"mat-chip-row",7),d(5,"input",8,1),v(8,"translate"),T("focusin",function(){return D(a),M(o.onFocus())})("keydown",function(c){return D(a),M(o.entityGroupEnter(c))})("keypress",function(c){return D(a),M(o.entityGroupEnter(c))}),p()(),d(9,"mat-autocomplete",9,2),x(11,nge,3,5,"mat-option",10),v(12,"async"),x(13,sge,6,4,"mat-option",11),v(14,"async"),p(),x(15,lge,3,3,"mat-error",5),p()}if(i&2){let a,s=me(3),c=me(7),u=me(10);Y("tb-chip-list",!o.labelText),m("formGroup",o.entityGroupListFormGroup)("appearance",o.appearance),l(),m("ngIf",o.labelText),l(3),m("ngForOf",o.entityGroups),l(),te("placeholder",o.disabled?"":C(8,14,"entity-group.entity-group-list")),m("matAutocompleteConnectedTo",c)("matAutocomplete",u)("matChipInputFor",s),l(4),m("displayWith",o.displayEntityGroupFn),l(2),m("ngForOf",C(12,16,o.filteredEntityGroups)),l(2),m("ngIf",!((a=C(14,18,o.filteredEntityGroups))!=null&&a.length)),l(2),m("ngIf",o.entityGroupListFormGroup.get("entityGroups").hasError("required"))}},dependencies:[Ke,ce,jt,Se,at,ze,At,ni,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();var mge={};Ae(mge,{DatetimeComponent:()=>_h});y();function dge(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
160();l(),z(r.dateText)}}function pge(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(i){D(r);let o=b();return M(o.clear(i))}),d(1,"mat-icon"),g(2,"close"),p()()}}var Xg=class Xg{get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}set minDate(t){this.minDateValue=t?new Date(t):null}set maxDate(t){this.maxDateValue=t?new Date(t):null}constructor(){this.floatLabel="auto",this.subscriptSizing="fixed",this.appearance="fill",this.type="datetime",this.showLabel=!0,this.allowClear=!1,this.propagateChange=t=>{}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}ngOnInit(){}writeValue(t){this.modelValue=t,this.modelValue?this.date=new Date(this.modelValue):this.date=null}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}onDateChange(){let t=this.date?this.date.getTime():null;this.updateView(t)}clear(t){t.stopPropagation(),this.date=null,this.updateView(null)}};Xg.\u0275fac=function(r){return new(r||Xg)},Xg.\u0275cmp=L({type:Xg,selectors:[["tb-datetime"]],inputs:{required:"required",floatLabel:"floatLabel",subscriptSizing:"subscriptSizing",appearance:"appearance",type:"type",disabled:"disabled",dateText:"dateText",showLabel:"showLabel",allowClear:"allowClear",fieldClass:"fieldClass",minDate:"minDate",maxDate:"maxDate"},features:[ne([{provide:ye,useExisting:he(()=>Xg),multi:!0}])],decls:8,vars:23,consts:[["datePicker",""],[3,"subscriptSizing","appearance","floatLabel"],[4,"ngIf"],["matSuffix","",1,"mat-mdc-form-field-icon-suffix","flex","flex-row"],["type","button","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[3,"for"],["openOnFocus","true",3,"type"],["matInput","",3,"ngModelChange","min","max","disabled","required","ngModel","matDatetimepicker"],["type","button","mat-icon-button","","aria-label","Clear",3,"click"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",1),x(1,dge,2,1,"mat-label",2),d(2,"div",3),x(3,pge,3,0,"button",4),O(4,"mat-datetimepicker-toggle",5),p(),O(5,"mat-datetimepicker",6,0),d(7,"input",7),bi("ngModelChange",function(a){return D(i),gi(e.date,a)||(e.date=a),M(a)}),T("ngModelChange",function(){return D(i),M(e.onDateChange())}),p()()}if(r&2){let i=me(6);bt(e.fieldClass),Y("tb-datetime-field",!e.fieldClass&&e.type==="datetime")("tb-date-field",!e.fieldClass&&e.type==="date")("tb-time-field",!e.fieldClass&&e.type==="time")("with-clear",e.allowClear),m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance)("floatLabel",e.floatLabel),l(),m("ngIf",e.showLabel),l(2),m("ngIf",e.allowClear&&e.date&&!e.disabled),l(),m("for",i),l(),m("type",e.type),l(2),m("min",e.minDateValue)("max",e.maxDateValue)("disabled",e.disabled)("required",e.required),fi("ngModel",e.date),m("matDatetimepicker",i)}},dependencies:[ce,Pe,Se,at,ze,At,Yt,Wf,Yf,xm,ut,xe,St,eo],styles:['@charset "UTF-8";.tb-form-row   [_nghost-%COMP%]{display:flex}.tb-form-row[_nghost-%COMP%]   .mat-mdc-form-field.tb-datetime-field[_ngcontent-%COMP%], .tb-form-row   [_nghost-%COMP%]   .mat-mdc-form-field.tb-datetime-field[_ngcontent-%COMP%]{width:185px}.tb-form-row[_nghost-%COMP%]   .mat-mdc-form-field.tb-datetime-field.with-clear[_ngcontent-%COMP%], .tb-form-row   [_nghost-%COMP%]   .mat-mdc-form-field.tb-datetime-field.with-clear[_ngcontent-%COMP%]{width:225px}.tb-form-row[_nghost-%COMP%]   .mat-mdc-form-field.tb-date-field[_ngcontent-%COMP%], .tb-form-row   [_nghost-%COMP%]   .mat-mdc-form-field.tb-date-field[_ngcontent-%COMP%]{width:140px}.tb-form-row[_nghost-%COMP%]   .mat-mdc-form-field.tb-date-field.with-clear[_ngcontent-%COMP%], .tb-form-row   [_nghost-%COMP%]   .mat-mdc-form-field.tb-date-field.with-clear[_ngcontent-%COMP%]{width:180px}.tb-form-row[_nghost-%COMP%]   .mat-mdc-form-field.tb-time-field[_ngcontent-%COMP%], .tb-form-row   [_nghost-%COMP%]   .mat-mdc-form-field.tb-time-field[_ngcontent-%COMP%]{width:100px}.tb-form-row[_nghost-%COMP%]   .mat-mdc-form-field.tb-time-field.with-clear[_ngcontent-%COMP%], .tb-form-row   [_nghost-%COMP%]   .mat-mdc-form-field.tb-time-field.with-clear[_ngcontent-%COMP%]{width:140px}@media screen and (max-width: 599px){.tb-form-row.column-xs[_nghost-%COMP%]   .mat-mdc-form-field.tb-datetime-field[_ngcontent-%COMP%], .tb-form-row.column-xs   [_nghost-%COMP%]   .mat-mdc-form-field.tb-datetime-field[_ngcontent-%COMP%], .tb-form-row.column-xs[_nghost-%COMP%]   .mat-mdc-form-field.tb-date-field[_ngcontent-%COMP%], .tb-form-row.column-xs   [_nghost-%COMP%]   .mat-mdc-form-field.tb-date-field[_ngcontent-%COMP%], .tb-form-row.column-xs[_nghost-%COMP%]   .mat-mdc-form-field.tb-time-field[_ngcontent-%COMP%], .tb-form-row.column-xs   [_nghost-%COMP%]   .mat-mdc-form-field.tb-time-field[_ngcontent-%COMP%]{width:auto;flex:1}}[_nghost-%COMP%]   .mat-mdc-form-field-icon-suffix[_ngcontent-%COMP%], [_nghost-%COMP%]   .mat-datetimepicker-toggle[_ngcontent-%COMP%]{color:#00000061}']});var _h=Xg;pe([fe(),le("design:type",Object)],_h.prototype,"showLabel",void 0);pe([fe(),le("design:type",Object)],_h.prototype,"allowClear",void 0);var vge={};Ae(vge,{EntityKeysListComponent:()=>ak});y();var uge=["keyInput"],hge=["keyAutocomplete"],fge=["chipList"];function gge(n,t){n&1&&(d(0,"mat-icon",10),g(1,"close"),p())}function bge(n,t){if(n&1){let r=B();d(0,"mat-chip-row",8),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,gge,2,0,"mat-icon",9),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",r," "),l(),m("ngIf",!e.disabled)}}function _ge(n,t){if(n&1&&(d(0,"mat-option",11),O(1,"span",12),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r,e.searchText),Ut)}}var ak=(()=>
160{let t=class t{set entityId(e){Fn(this.entityIdValue,e)||(this.entityIdValue=e,this.dirty=!0)}get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a){this.store=e,this.translate=i,this.entityService=o,this.fb=a,this.separatorKeysCodes=[13,188,186],this.searchText="",this.dirty=!1,this.propagateChange=s=>{},this.keysListFormGroup=this.fb.group({key:[null]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredKeys=this.keysListFormGroup.get("key").valueChanges.pipe(W(e=>e||""),Ft(e=>this.fetchKeys(e)),Si())}ngAfterViewInit(){}setDisabledState(e){this.disabled=e,this.disabled?this.keysListFormGroup.disable({emitEvent:!1}):this.keysListFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="",e!=null?this.modelValue=[...e]:this.modelValue=[]}onFocus(){this.dirty&&(this.keysListFormGroup.get("key").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}addKey(e){(!this.modelValue||this.modelValue.indexOf(e)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(e),this.required&&(this.chipList.errorState=!1)),this.prop
160agateChange(this.modelValue)}add(e){if(!this.matAutocomplete.isOpen){let i=(e.value||"").trim();i&&this.addKey(i),this.clear("",document.activeElement===this.keyInput.nativeElement)}}remove(e){let i=this.modelValue.indexOf(e);i>=0&&(this.modelValue.splice(i,1),this.modelValue.length||this.required&&(this.chipList.errorState=!0),this.propagateChange(this.modelValue.length?this.modelValue:null))}selected(e){this.addKey(e.option.viewValue),this.clear("")}displayKeyFn(e){return e||void 0}fetchKeys(e){return this.searchText=e,this.entityIdValue?this.entityService.getEntityKeys(this.entityIdValue,e,this.dataKeyType,{ignoreLoading:!0}).pipe(W(i=>i||[])):Z([])}clear(e="",i=!0){this.keyInput.nativeElement.value=e,this.keysListFormGroup.get("key").patchValue(null,{emitEvent:i}),i&&setTimeout(()=>{this.keyInput.nativeElement.blur(),this.keyInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(rr),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-keys-list"]],viewQuery:function(i,o){if(i&1&&(ae(uge,5),ae(hge,5),ae(fge,5)),i&2){let a;Q(a=K())&&(o.keyInput=a.first),Q(a=K())&&(o.matAutocomplete=a.first),Q(a=K())&&(o.chipList=a.first)}},inputs:{entityId:"entityId",keysText:"keysText",dataKeyType:"dataKeyType",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:12,vars:13,consts:[["chipList",""],["keyInput","","origin","matAutocompleteOrigin"],["keyAutocomplete","matAutocomplete"],[1,"mat-block","tb-chip-list",3,"formGroup"],[3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","key","matAutocompleteOrigin","","matChipInputAddOnBlur","",2,"max-width","200px",3,"focusin","matChipInputTokenEnd","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"tb-autocomplete",3,"optionSelected","displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-chip-grid",null,0),x(3,bge,3,3,"mat-chip-row",4),d(4,"input",5,1),v(7,"translate"),T("focusin",function(){return D(a),M(o.onFocus())})("matChipInputTokenEnd",function(c){return D(a),M(o.add(c))}),p()(),d(8,"mat-autocomplete",6,2),T("optionSelected",function(c){return D(a),M(o.selected(c))}),x(10,_ge,3,5,"mat-option",7),v(11,"async"),p()()}if(i&2){let a=me(2),s=me(6),c=me(9);m("formGroup",o.keysListFormGroup),l(3),m("ngForOf",o.modelValue),l(),te("placeholder",o.disabled?"":C(7,9,o.keysText)),m("matAutocompleteConnectedTo",s)("matAutocomplete",c)("matChipInputFor",a)("matChipInputSeparatorKeyCodes",o.separatorKeysCodes),l(4),m("displayWith",o.displayKeyFn),l(2),m("ngForOf",C(11,11,o.filteredKeys))}},dependencies:[Ke,ce,Se,at,ze,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();var Sge={};Ae(Sge,{SocialSharePanelComponent:()=>sk});y();var yge=()=>({provider:"Facebook"}),Cge=()=>({provider:"Twitter"}),wge=()=>({provider:"Linkedin"}),xge=()=>({provider:"Reddit"}),sk=(()=>{let t=class t{constructor(){}ngOnInit(){}isShareLinkLocal(){return this.shareLink&&this.shareLink.length>0?m4(this.shareLink):!0}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tb-social-share-panel"]],inputs:{shareTitle:"shareTitle",shareText:"shareText",shareLink:"shareLink",shareHashTags:"shareHashTags"},decls:13,vars:32,consts:[[1,"flex","flex-row","gap-3"],["mat-mini-fab","","color","primary","shareButton","facebook","matTooltipPosition","above",3,"title","description","url","matTooltip"],["svgIcon","mdi:facebook"],["mat-mini-fab","","color","primary","shareButton","x","matTooltipPosition","above",3,"title","tags","url","matTooltip"],["svgIcon","mdi:twitter"],["mat-mini-fab","","color","primary","shareButton","linkedin","matTooltipPosition","above",3,"title","url","matTooltip"],["svgIcon","mdi:linkedin"],["mat-mini-fab","","color","primary","shareButton","reddit","matTooltipPosition","above",3,"title","url","matTooltip"],["svgIcon","mdi:reddit"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"button",1),v(2,"translate"),O(3,"mat-icon",2),p(),d(4,"button",3),v(5,"translate"),O(6,"mat-icon",4),p(),d(7,"button",5),v(8,"translate"),O(9,"mat-icon",6),p(),d(10,"button",7),v(11,"translate"),O(12,"mat-icon",8),p()()),i&2&&(Y("!hidden",o.isShareLinkLocal()),l(),te("title",o.shareTitle),te("description",o.shareText),te("url",o.shareLink),te("matTooltip",ft(2,16,"action.share-via",hn(28,yge))),l(3),te("title",o.shareTitle),te("tags",o.shareHashTags),te("url",o.shareLink),te("matTooltip",ft(5,19,"action.share-via",hn(29,Cge))),l(3),te("title",o.shareTitle),te("url",o.shareLink),te("matTooltip",ft(8,22,"action.share-via",hn(30,wge))),l(3),te("title",o.shareTitle),te("url",o.shareLink),te("matTooltip",ft(11,25,"action.share-via",hn(31,xge))))},dependencies:[Dj,Se,zt,RE,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}']});let n=t;return n})();var Fge={};Ae(Fge,{StringItemsListComponent:()=>Cd});y();var Tge=["stringItemInput"],Ege=[[["","matHintEnd",""]],[["","matSuffix",""]]],Ige=["[matHintEnd]","[matSuffix]"],kge=(n,t)=>t.value;function Dge(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
160();l(),z(r.label)}}function Mge(n,t){n&1&&(d(0,"mat-icon",16),g(1,"close"),p())}function Age(n,t){if(n&1){let r=B();d(0,"mat-chip-row",14),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.removeItems(i))}),g(1),x(2,Mge,2,0,"mat-icon",15),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled)("contentEditable",e.editable&&!e.disabled),l(),j(" ",r.name," "),l(),m("ngIf",!e.disabled)}}function Oge(n,t){if(n&1&&(d(0,"mat-option",10),O(1,"span",17),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function Pge(n,t){n&1&&(d(0,"mat-option",10),g(1),v(2,"translate"),p()),n&2&&(m("value",null),l(),z(C(2,2,"common.not-found")))}function Rge(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.requiredText," ")}}var Zg=class Zg{get required(){return this.requiredValue}set required(t){this.requiredValue!==t&&(this.requiredValue=t,this.updateValidators())}get itemsControl(){return this.stringItemsForm.get("items")}get itemControl(){return this.stringItemsForm.get("item")}constructor(t){this.fb=t,this.searchText="",this.itemList=[],this.separatorKeysCodes=[13,188,186],this.floatLabel="auto",this.appearance="fill",this.editable=!1,this.subscriptSizing="fixed",this.allowUserValue=!1,this.onTouched=()=>{},this.propagateChange=()=>{},this.dirty=!1,this.stringItemsForm=this.fb.group({item:[null],items:[null]})}ngOnInit(){(this.predefinedValues||dt(this.fetchOptionsFn))&&(this.filteredValues=this.itemControl.valueChanges.pipe(et(t=>{t&&typeof t!="string"?this.add(t):t===null&&this.clear()}),Pi(t=>typeof t=="string"),et(t=>this.searchText=t),Ft(t=>this.fetchOptionsFn?this.fetchOptionsFn(t):this.fetchValues(t)),Si()))}updateValidators(){this.itemsControl.setValidators(this.required?[ke.required]:[]),this.itemsControl.updateValueAndValidity()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,t?this.stringItemsForm.disable({emitEvent:!1}):this.stringItemsForm.enable({emitEvent:!1})}writeValue(t){this.searchText="",t!=null&&t.length>0?(this.modelValue=[...t],this.itemList=[],this.predefinedValues&&!this.allowUserValue?t.forEach(r=>{let e=this.predefinedValues.find(i=>i.value===r);e&&this.itemList.push(e)}):t.forEach(r=>this.itemList.push({value:r,name:r})),this.itemsControl.setValue(this.itemList,{emitEvents:!1})):(this.itemsControl.setValue(null,{emitEvents:!1}),this.modelValue=null,this.itemList=[]),this.dirty=!0}addOnBlur(t){let r=t.relatedTarget;r&&r.tagName!=="MAT-OPTION"&&this.addItem(this.stringItemInput.nativeElement.value??""),this.onTouched()}addOnEnd(t){this.addItem(t.value??"")}removeItems(t){let r=this.modelValue.indexOf(t.value);r>=0&&(this.modelValue.splice(r,1),this.itemList.splice(r,1),this.modelValue.length||(this.modelValue=null),this.itemsControl.setValue(this.itemList),this.propagateChange(this.modelValue),this.autocomplete?.closePanel())}onFocus(){this.dirty&&(this.itemControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}displayValueFn(t){return t?t.name:void 0}
160addItem(t){if(t=t.trim(),t)if(this.allowUserValue||!this.predefinedValues&&Bi(this.fetchOptionsFn))this.add({value:t,name:t});else if(this.predefinedValues){let r=this.predefinedValues.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));r.length===1&&this.add(r[0])}else dt(this.fetchOptionsFn)&&this.fetchOptionsFn(t).subscribe(r=>{r.length===1&&this.add(r[0])})}add(t){(!this.modelValue||this.modelValue.indexOf(t.value)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(t.value),this.itemList.push(t),this.itemsControl.setValue(this.itemList)),this.propagateChange(this.modelValue),this.clear()}fetchValues(t){if(!this.predefinedValues?.length)return Z([]);let r=this.predefinedValues;return t&&t.length&&(r=this.predefinedValues.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()))),Z(r)}clear(t=""){this.stringItemInput.nativeElement.value=t,this.itemControl.patchValue(t,{emitEvent:!0}),setTimeout(()=>{this.stringItemInput.nativeElement.blur(),this.stringItemInput.nativeElement.focus()},0)}};Zg.\u0275fac=function(r){return new(r||Zg)(h(Ai))},Zg.\u0275cmp=L({type:Zg,selectors:[["tb-string-items-list"]],viewQuery:function(r,e){if(r&1&&(ae(Tge,7),ae(mi,5)),r&2){let i;Q(i=K())&&(e.stringItemInput=i.first),Q(i=K())&&(e.autocomplete=i.first)}},inputs:{required:"required",disabled:"disabled",label:"label",placeholder:"placeholder",hint:"hint",requiredText:"requiredText",floatLabel:"floatLabel",appearance:"appearance",editable:"editable",subscriptSizing:"subscriptSizing",fieldClass:"fieldClass",predefinedValues:"predefinedValues",fetchOptionsFn:"fetchOptionsFn",allowUserValue:"allowUserValue"},features:[ne([{provide:ye,useExisting:he(()=>Zg),multi:!0}])],ngContentSelectors:Ige,decls:22,vars:23,consts:[["itemsChipList",""],["stringItemInput","","origin","matAutocompleteOrigin"],["stringItemAutocomplete","matAutocomplete"],["matHintEnd",""],[1,"tb-string-items-list","mat-block","flex-1",3,"formGroup","floatLabel","appearance","subscriptSizing"],[4,"ngIf"],["formControlName","items",3,"required"],["class","tb-chip-row-ellipsis",3,"removable","contentEditable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","item","matAutocompleteOrigin","",2,"max-width","300px","min-width","250px",3,"blur","focusin","matChipInputTokenEnd","placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matAutocompleteConnectedTo","matAutocomplete","matAutocompleteDisabled"],[1,"tb-autocomplete",3,"displayWith"],[3,"value"],[3,"hidden"],["align","end",3,"hidden"],["matSuffix",""],[1,"tb-chip-row-ellipsis",3,"removed","removable","contentEditable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();Ct(Ege),d(0,"mat-form-field",4),x(1,Dge,2,1,"mat-label",5),d(2,"mat-chip-grid",6,0),x(4,Age,3,4,"mat-chip-row",7),d(5,"input",8,1),T("blur",function(a){return D(i),M(e.addOnBlur(a))})("focusin",function(){return D(i),M(e.onFocus())})("matChipInputTokenEnd",function(a){return D(i),M(e.addOnEnd(a))}),p()(),d(8,"mat-autocomplete",9,2),Ir(10,Oge,3,5,"mat-option",10,kge,!1,Pge,3,4,"mat-option",10),v(13,"async"),p(),d(14,"mat-hint",11),g(15),p(),d(16,"mat-hint",12,3),Fe(18),p(),d(19,"div",13),Fe(20,1),p(),x(21,Rge,2,1,"mat-error",5),p()}if(r&2){let i=me(3),o=me(7),a=me(9),s=me(17);bt(e.fieldClass),m("formGroup",e.stringItemsForm)("floatLabel",e.floatLabel)("appearance",e.appearance)("subscriptSizing",e.subscriptSizing),l(),m("ngIf",e.label),l(),m("required",e.required),l(2),m("ngForOf",e.itemList),l(),te("placeholder",e.placeholder),m("matChipInputFor",i)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matAutocompleteConnectedTo",o)("matAutocomplete",a)("matAutocompleteDisabled",!(e.predefinedValues!=null&&e.predefinedValues.length)&&!e.fetchOptionsFn),l(3),m("displayWith",e.displayValueFn),l(2),kr(C(13,21,e.filteredValues)),l(4),m("hidden",!e.hint),l(),j(" ",e.hint," "),l(),m("hidden",!s.children.length),l(5),m("ngIf",e.stringItemsForm.get("items").hasError("required"))}},dependencies:[Ke,ce,Se,at,ze,At,to,ni,Yt,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});
160var Cd=Zg;pe([fe(),le("design:type",Boolean),le("design:paramtypes",[Boolean])],Cd.prototype,"required",null);pe([fe(),le("design:type",Boolean)],Cd.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],Cd.prototype,"editable",void 0);pe([pd(),le("design:type",Array)],Cd.prototype,"predefinedValues",void 0);pe([fe(),le("design:type",Object)],Cd.prototype,"allowUserValue",void 0);var Hge={};Ae(Hge,{RelationTypeAutocompleteComponent:()=>Ym});y();y();var Nge="Contains",Vge="Manages",f8=[Nge,Vge],Lge=function(n){return n.COMMON="COMMON",n.ALARM="ALARM",n.DASHBOARD="DASHBOARD",n.RULE_CHAIN="RULE_CHAIN",n.RULE_NODE="RULE_NODE",n.FROM_ENTITY_GROUP="FROM_ENTITY_GROUP",n}(Lge||{}),R1=function(n){return n.FROM="FROM",n.TO="TO",n}(R1||{}),$Nt=new Map([[R1.FROM,"relation.search-direction.FROM"],[R1.TO,"relation.search-direction.TO"]]),UNt=new Map([[R1.FROM,"relation.direction-type.FROM"],[R1.TO,"relation.direction-type.TO"]]);var Bge=["relationTypeInput"];function jge(n,t){n&1&&(d(0,"mat-label"),g(1),v(2,"translate"),p()),n&2&&(l(),z(C(2,1,"relation.relation-type")))}function Gge(n,t){if(n&1){let r=B();d(0,"button",8),v(1,"translate"),T("click",function(){D(r);let i=b();return M(i.clear())}),d(2,"mat-icon",9),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"relation.clear-relation-type"))}function zge(n,t){if(n&1&&(d(0,"mat-option",10),O(1,"span",11),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r,e.searchText),Ut)}}function $ge(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"relation.relation-type-required")," "))}function Uge(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"relation.relation-type-max-length")," "))}var Jg=class Jg{constructor(t,r,e,i){this.store=t,this.broadcast=r,this.translate=e,this.fb=i,this.showLabel=!0,this.appearance="fill",this.subscriptSizing="fixed",this.searchText="",this.dirty=!1,this.propagateChange=o=>{},this.relationTypeFormGroup=this.fb.group({relationType:[null,this.required?[ke.required,ke.maxLength(255)]:[ke.maxLength(255)]]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.filteredRelationTypes=this.relationTypeFormGroup.get("relationType").valueChanges.pipe(et(t=>{this.updateView(t)}),W(t=>t||""),Ft(t=>this.fetchRelationTypes(t)))}ngAfterViewInit(){}ngOnDestroy(){}setDisabledState(t){this.disabled=t,this.disabled?this.relationTypeFormGroup.disable({emitEvent:!1}):this.relationTypeFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="",this.modelValue=t,this.relationTypeFormGroup.get("relationType").patchValue(t,{emitEvent:!1}),this.dirty=!0}onFocus(){this.dirty&&(this.relationTypeFormGroup.get("relationType").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}displayRelationTypeFn(t){return t||void 0}fetchRelationTypes(t,r=!1){return this.searchText=t,Z(f8).pipe(W(e=>e.filter(i=>r?t?i===t:!1:t?i.toUpperCase().startsWith(t.toUpperCase()):!0)))}clear(){this.relationTypeFormGroup.get("relationType").patchValue(null,{emitEvent:!0}),setTimeout(()=>{this.relationTypeInput.nativeElement.blur(),this.relationTypeInput.nativeElement.focus()},0)}};Jg.\u0275fac=function(r){return new(r||Jg)(h(ve),h(Zd),h(Ge),h(Ai))},Jg.\u0275cmp=L({type:Jg,selectors:[["tb-relation-type-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(Bge,7),r&2){let i;Q(i=K())&&(e.relationTypeInput=i.first)}},inputs:{showLabel:"showLabel",additionalClasses:"additionalClasses",appearance:"appearance",required:"required",disabled:"disabled",subscriptSizing:"subscriptSizing"},features:[ne([{provide:ye,useExisting:he(()=>Jg),multi:!0}])],decls:12,vars:19,consts:[["relationTypeInput",""],["relationTypeAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup","appearance","floatLabel","subscriptSizing"],[4,"ngIf"],["matInput","","type","text","formControlName","relationType",3,"focusin","placeholder","required","matAutocomplete"],["type","button","color","primary","matSuffix","","mat-icon-button","","aria-label","Clear",3,"matTooltip","click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["type","button","color","primary","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click","matTooltip"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",2),x(1,jge,3,3,"mat-label",3),d(2,"input",4,0),v(4,"translate"),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(5,Gge,4,3,"button",5),d(6,"mat-autocomplete",6,1),x(8,zge,3,5,"mat-option",7),v(9,"async"),p(),x(10,$ge,3,3,"mat-error",3)(11,Uge,3,3,"mat-error",3),p()}if(r&2){let i=me(7);bt(e.additionalClasses),te("subscriptSizing",e.subscriptSizing),m("formGroup",e.relationTypeFormGroup)("appearance",e.appearance)("floatLabel",e.required?"auto":"always"),l(
160),m("ngIf",e.showLabel),l(),m("placeholder",e.required?"":C(4,15,"relation.any-relation-type"))("required",e.required)("matAutocomplete",i),l(3),m("ngIf",e.relationTypeFormGroup.get("relationType").value&&!e.disabled),l(),m("displayWith",e.displayRelationTypeFn),l(2),m("ngForOf",C(9,17,e.filteredRelationTypes)),l(2),m("ngIf",e.relationTypeFormGroup.get("relationType").hasError("required")),l(),m("ngIf",e.relationTypeFormGroup.get("relationType").hasError("maxlength"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,zt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});var Ym=Jg;pe([fe(),le("design:type",Object)],Ym.prototype,"showLabel",void 0);pe([pd(),le("design:type",Array)],Ym.prototype,"additionalClasses",void 0);pe([fe(),le("design:type",Boolean)],Ym.prototype,"required",void 0);var Yge={};Ae(Yge,{EntityListSelectComponent:()=>lk});y();function qge(n,t){if(n&1&&O(0,"tb-entity-type-select",3),n&2){let r=b();Y("flex-1",r.inlineField&&!r.modelValue.entityType),m("inlineField",r.inlineField)("showLabel",!0)("required",r.required)("useAliasEntityTypes",r.useAliasEntityTypes)("allowedEntityTypes",r.allowedEntityTypes)("filterAllowedEntityTypes",r.filterAllowedEntityTypes)("additionEntityTypes",r.additionEntityTypes)("operation",r.operation)}}
160function Wge(n,t){if(n&1&&O(0,"tb-entity-list",4),n&2){let r=b();Y("tb-not-empty",(r.modelValue.ids==null?null:r.modelValue.ids.length)>0),m("inlineField",r.inlineField)("required",r.required)("entityType",r.modelValue.entityType)}}var lk=(()=>{let t=class t{constructor(e,i,o){this.entityService=e,this.fb=i,this.destroyRef=o,this.modelValue={entityType:null,ids:[]},this.filterAllowedEntityTypes=!0,this.additionEntityTypes={},this.defaultEntityType=null,this.propagateChange=s=>{};let a=this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes,this.useAliasEntityTypes,this.operation);a.length===1?(this.displayEntityTypeSelect=!1,this.defaultEntityType=a[0]):this.displayEntityTypeSelect=!0,this.entityListSelectFormGroup=this.fb.group({entityType:[this.defaultEntityType],entityIds:[[]]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.entityListSelectFormGroup.get("entityType").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{this.updateView(e,this.modelValue.ids)}),this.entityListSelectFormGroup.get("entityIds").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{this.updateView(this.modelValue.entityType,e)}),De(this.predefinedEntityType)&&(this.defaultEntityType=this.predefinedEntityType)}setDisabledState(e){this.disabled=e,this.disabled?this.entityListSelectFormGroup.disable():this.entityListSelectFormGroup.enable()}writeValue(e){if(e!=null&&e.length>0){let i=e[0];this.modelValue={entityType:i.entityType,ids:e.map(o=>o.id)}}else this.modelValue={entityType:this.defaultEntityType,ids:[]};this.entityListSelectFormGroup.get("entityType").patchValue(this.modelValue.entityType,{emitEvent:!0}),this.entityListSelectFormGroup.get("entityIds").patchValue([...this.modelValue.ids],{emitEvent:!0})}updateView(e,i){(this.modelValue.entityType!==e||!this.compareIds(this.modelValue.ids,i))&&(this.modelValue={entityType:e,ids:this.modelValue.entityType!==e||!i?[]:[...i]},this.propagateChange(this.toEntityIds(this.modelValue)))}compareIds(e,i){return e!==null&&i!==null?JSON.stringify(e)===JSON.stringify(i):e===i}toEntityIds(e){if(e!==null&&e.entityType&&e.ids&&e.ids.length>0){let i=e.entityType;return e.ids.map(o=>({entityType:i,id:o}))}else return null}};t.\u0275fac=function(i){return new(i||t)(h(rr),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-list-select"]],inputs:{allowedEntityTypes:"allowedEntityTypes",useAliasEntityTypes:"useAliasEntityTypes",operation:"operation",required:[2,"required","required",Re],disabled:"disabled",inlineField:[2,"inlineField","inlineField",Re],filterAllowedEntityTypes:[2,"filterAllowedEntityTypes","filterAllowedEntityTypes",Re],predefinedEntityType:"predefinedEntityType",additionEntityTypes:"additionEntityTypes"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),si],decls:3,vars:3,consts:[[1,"tb-entity-list-select","flex","flex-row",3,"formGroup"],["style","min-width: 100px; padding-right: 8px;","formControlName","entityType",3,"inlineField","flex-1","showLabel","required","useAliasEntityTypes","allowedEntityTypes","filterAllowedEntityTypes","additionEntityTypes","operation",4,"ngIf"],["class","flex-1","formControlName","entityIds",3,"inlineField","tb-not-empty","required","entityType",4,"ngIf"],["formControlName","entityType",2,"min-width","100px","padding-right","8px",3,"inlineField","showLabel","required","useAliasEntityTypes","allowedEntityTypes","filterAllowedEntityTypes","additionEntityTypes","operation"],["formControlName","entityIds",1,"flex-1",3,"inlineField","required","entityType"]],template:function(i,o){i&1&&(d(0,"div",0),x(1,qge,1,10,"tb-entity-type-select",1)(2,Wge,1,5,"tb-entity-list",2),p()),i&2&&(m("formGroup",o.entityListSelectFormGroup),l(),m("ngIf",o.displayEntityTypeSelect),l(),m("ngIf",o.modelValue.entityType))},dependencies:[ce,xe,We,St,$e,Qe,Pc,Xs],styles:['@charset "UTF-8";[_nghost-%COMP%]     tb-entity-list.tb-not-empty .mat-mdc-form-field-flex{padding-top:0}']});let n=t;return n})();var Xge={};Ae(Xge,{JsonObjectViewComponent:()=>ck}
160);y();var Qge=["jsonViewer"];function Kge(n,t){if(n&1&&(d(0,"label",5),g(1),p()),n&2){let r=b();l(),z(r.label)}}var ck=(()=>{let t=class t{get autoWidth(){return this.widthValue}set autoWidth(e){this.widthValue=mt(e)}get autoHeight(){return this.heigthValue}set autoHeight(e){this.heigthValue=mt(e)}constructor(e,i,o,a){this.elementRef=e,this.store=i,this.raf=o,this.renderer=a,this.propagateChange=null}ngOnInit(){this.viewerElement=this.jsonViewerElmRef.nativeElement;let e={mode:"ace/mode/java",theme:"ace/theme/github",showGutter:!1,showPrintMargin:!1,readOnly:!0},i={enableSnippets:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};e=re(re({},e),i),da().subscribe(o=>{this.jsonViewer=o.edit(this.viewerElement,e),this.jsonViewer.session.setUseWrapMode(!1),this.jsonViewer.setValue(this.contentValue?this.contentValue:"",-1),this.contentValue&&(this.widthValue||this.heigthValue)&&this.updateEditorSize(this.viewerElement,this.contentValue,this.jsonViewer)})}ngOnDestroy(){this.jsonViewer&&this.jsonViewer.destroy()}updateEditorSize(e,i,o){let a=200,s=600;if(i&&i.length>0){let c=i.split(`
161`);a=17*c.length+17;let u=0;c.forEach(f=>{let I=f.replace(/\t/g,"    ").replace(/\n/g,"").length;u=Math.max(u,I)}),s=8*u+16}this.heigthValue&&this.renderer.setStyle(e,"height",a.toString()+"px"),this.widthValue&&this.renderer.setStyle(e,"width",s.toString()+"px"),o.resize()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.modelValue=e,this.contentValue="";try{De(this.modelValue)&&(this.contentValue=JSON.stringify(this.modelValue,Bi(this.sort)?void 0:(i,o)=>this.sort(i,o),2))}catch(i){console.error(i)}this.jsonViewer&&(this.jsonViewer.setValue(this.contentValue?this.contentValue:"",-1),this.contentValue&&(this.widthValue||this.heigthValue)&&this.updateEditorSize(this.viewerElement,this.contentValue,this.jsonViewer))}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(ve),h(es),h(Ni))},t.\u0275cmp=L({type:t,selectors:[["tb-json-object-view"]],viewQuery:function(i,o){if(i&1&&ae(Qge,7),i&2){let a;Q(a=K())&&(o.jsonViewerElmRef=a.first)}},inputs:{label:"label",fillHeight:"fillHeight",editorStyle:"editorStyle",sort:"sort",autoWidth:"autoWidth",autoHeight:"autoHeight"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:5,vars:5,consts:[["jsonViewer",""],[2,"background","#fff"],["class","tb-title no-padding",4,"ngIf"],[1,"flex-1"],["id","tb-json-view"],[1,"tb-title","no-padding"]],template:function(i,o){i&1&&(d(0,"div",1),x(1,Kge,2,1,"label",2),O(2,"span",3)(3,"div",4,0),p()),i&2&&(Y("fill-height",o.fillHeight),l(),m("ngIf",o.label),l(2),Y("fill-height",o.fillHeight))},dependencies:[ce],styles:['@charset "UTF-8";[_nghost-%COMP%]   #tb-json-view[_ngcontent-%COMP%]{width:100%;height:100%;margin-bottom:16px;border:1px solid #c0c0c0}[_nghost-%COMP%]   #tb-json-view[_ngcontent-%COMP%]:not(.fill-height){min-height:100px}']});let n=t;return n})();var e0e={};Ae(e0e,{FooterFabButtonsComponent:()=>dk});y();y();var g8=[Qn("fabToggler",[Ji("inactive",Tt({transform:"rotate(0deg)"})),Ji("active",Tt({transform:"rotate(225deg)"})),$i("* <=> *",Vi("200ms cubic-bezier(0.4, 0.0, 0.2, 1)"))]),Qn("speedDialStagger",[$i("* => *",[sl(":enter",Tt({opacity:0}),{optional:!0}),sl(":enter",df("40ms",[Vi("200ms cubic-bezier(0.4, 0.0, 0.2, 1)",al([Tt({opacity:0,transform:"translateY(10px)"}),Tt({opacity:1,transform:"translateY(0)"})]))]),{optional:!0}),sl(":leave",Vi("200ms cubic-bezier(0.4, 0.0, 0.2, 1)",al([Tt({opacity:1}),Tt({opacity:0})])),{optional:!0})])])];var Zge=n=>({value:n});function Jge(n,t){if(n&1){let r=B();d(0,"button",4),v(1,"translate"),T("click",function(i){let o=D(r).$implicit;return M(o.onAction(i))}),d(2,"mat-icon"),g(3),p()()}if(n&2){let r=t.$implicit;te("matTooltip",C(1,2,r.name)),l(3),z(r.icon)}}var dk=(()=>{let t=class t extends sn{get relative(){return this.relativeValue}set relative(e){this.relativeValue=mt(e)}onFocusOut(e){this.closeTimeout||(this.closeTimeout=setTimeout(()=>{this.hideItems()},100))}onFocusIn(e){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}constructor(e){super(e),this.store=e,this.buttons=[],this.fabTogglerState="inactive",this.closeTimeout=null}showItems(){this.fabTogglerState="active",this.buttons=this.footerFabButtons.buttons}hideItems(){this.fabTogglerState="inactive",this.buttons=[]}onToggleFab(){this.buttons.length?this.hideItems():this.showItems()}};t.\u0275fac=function(i){return new(i||t)(h(ve))},t.\u0275cmp=L({type:t,selectors:[["tb-footer-fab-buttons"]],hostBindings:function(i,o){i&1&&T("focusout",function(s){return o.onFocusOut(s)})("focusin",function(s){return o.onFocusIn(s)})},inputs:{footerFabButtons:"footerFabButtons",relative:"relative"},features:[Ce],decls:9,vars:14,consts:[[1,"tb-footer-fab-buttons","flex","flex-row","flex-wrap"],[1,"fab-container"],["mat-fab","","color","accent","matTooltipPosition","above",1,"fab-toggler","tb-btn-footer",3,"click","disabled","matTooltip"],["mat-fab","","color","accent","matTooltipPosition","above",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-fab","","color","accent","matTooltipPosition","above",3,"click","matTooltip"]],template:function(i,o){i&1&&(d(0,"section",0)(1,"div",1)(2,"button",2),v(3,"translate"),v(4,"async"),T("click",function(){return o.onToggleFab()}),d(5,"mat-icon"),g(6),p()(),d(7,"div"),x(8,Jge,4,4,"button",3),p()()()),i&2&&(Y("relative-buttons",o.relative),l(2),te("matTooltip",C(3,8,o.footerFabButtons.fabTogglerName)),m("disabled",C(4,10,o.isLoading$)),l(3),m("@fabToggler",Xe(12,Zge,o.fabTogglerState)),l(),z(o.footerFabButtons.fabTogglerIcon),l(),m("@speedDialStagger",o.buttons.length),l(),m("ngForOf",o.buttons))},dependencies:[Ke,kj,Se,zt,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]:not(.relative-buttons){position:fixed;right:20px;bottom:20px;z-index:30;pointer-events:none}[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]   .fab-container[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;align-items:center}[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]   .fab-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;align-items:center}[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]   .fab-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-bottom:17px}[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]   .tb-btn-footer[_ngcontent-%COMP%]{position:relative!important;animation:tbMoveFromBottomFade .3s ease both}[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]   .tb-btn-footer.fab-toggler[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   section.tb-footer-fab-buttons[_ngcontent-%COMP%]   .tb-btn-footer.tb-hide[_ngcontent-%COMP%]{animation:tbMoveToBottomFade .3s ease both}'],data:{animation:g8}});let n=t;return n})();var t0e={};Ae(t0e,{CircularProgressDirective:()=>pk});y();var pk=(()=>{let t=class t{set showProgress(e){if(this.showProgressValue!==e){let i=this.elementRef.nativeElement;if(this.showProgressValue=e,this.spinnerRef.instance._elementRef.nativeElement.style.display=e?"block":"none",e){if(this.cssWidth=$(i).prop("style").width,!this.cssWidth){$(i).css("width","");let o=$(i).prop("offsetWidth");$(i).css("width",o+"px")}this.children=$(i).children(),$(i).empty(),$(i).append($(this.spinnerRef.instance._elementRef.nativeElement))}else $(i).empty(),$(i).append(this.children),this.cssWidth?$(i).css("width",this.cssWidth):$(i).css("width","")}}
161constructor(e,i){this.elementRef=e,this.viewContainerRef=i,this.showProgressValue=!1,this.createCircularProgress()}createCircularProgress(){this.elementRef.nativeElement.style.position="relative",this.spinnerRef=this.viewContainerRef.createComponent(Za,{index:0}),this.spinnerRef.instance.mode="indeterminate",this.spinnerRef.instance.diameter=20;let e=this.spinnerRef.instance._elementRef.nativeElement;e.style.margin="auto",e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.display="none"}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(ci))},t.\u0275dir=_e({type:t,selectors:[["","tb-circular-progress",""]],inputs:{showProgress:[0,"tb-circular-progress","showProgress"]}});let n=t;return n})();var r0e={};Ae(r0e,{FabActionsDirective:()=>uk,FabToolbarComponent:()=>hk,FabTriggerDirective:()=>mk});y();var i0e=["*"],NF=class{constructor(t){this._elementRef=t}},n0e=oT(NF),mk=(()=>{let t=class t{constructor(e){this.el=e}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["mat-fab-trigger"]]});let n=t;return n})(),uk=(()=>{let t=class t{constructor(e){this.el=e}ngOnInit(){$(this.el.nativeElement).children().wrap('<div class="mat-fab-action-item">')}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["mat-fab-actions"]]});let n=t;return n})(),hk=(()=>{let t=class t extends n0e{constructor(e,i){super(e),this.el=e,this.window=i}ngOnInit(){let e=$(this.el.nativeElement);e.addClass("mat-fab-toolbar"),e.find("mat-fab-trigger").find("button").prepend('<div class="mat-fab-toolbar-background"></div>'),e.addClass(`mat-${this.direction}`),this.fabToolbarResize$=new ResizeObserver(()=>{this.onFabToolbarResize()}),this.fabToolbarResize$.observe(this.el.nativeElement)}ngOnDestroy(){this.fabToolbarResize$.disconnect()}ngAfterViewInit(){this.triggerOpenClose(!0)}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&i==="isOpen"&&this.triggerOpenClose()}}onFabToolbarResize(){this.isOpen&&this.triggerOpenClose(!0)}triggerOpenClose(e){let i=this.el.nativeElement,o=$(this.el.nativeElement);e?o.removeClass("mat-animation"):o.addClass("mat-animation");let a=i.querySelector(".mat-fab-toolbar-background"),s=i.querySelector("mat-fab-trigger button"),c=i.querySelector("mat-toolbar"),u=i.querySelector("mat-fab-trigger button mat-icon"),f=o.find("mat-fab-actions").children();if(s&&a){let _=i.offsetWidth,I=2*(_/s.offsetWidth);a.style.borderRadius=_+"px",this.isOpen?(o.addClass("mat-is-open"),c.style.pointerEvents="inherit",a.style.width=s.offsetWidth+"px",a.style.height=s.offsetHeight+"px",a.style.transform="scale("+I+")",a.style.transitionDelay="0ms",u&&(u.style.transitionDelay=e?"0ms":".3s"),f.each((S,F)=>{F.style.transitionDelay=e?"0ms":(f.length-S)*25+"ms"})):(o.removeClass("mat-is-open"),c.style.pointerEvents="none",a.style.transform="scale(1)",a.style.top="0",o.hasClass("mat-right")&&(a.style.left="0",a.style.right=null),o.hasClass("mat-left")&&(a.style.right="0",a.style.left=null),a.style.transitionDelay=e?"0ms":"200ms",f.each((S,F)=>{F.style.transitionDelay=(e?0:200)+S*25+"ms"}))}}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Wr))},t.\u0275cmp=L({type:t,selectors:[["mat-fab-toolbar"]],inputs:{isOpen:"isOpen",direction:"direction",color:"color"},features:[Ce,lt],ngContentSelectors:i0e,decls:3,vars:0,consts:[[1,"mat-fab-toolbar-wrapper"],[1,"mat-fab-toolbar-content"]],template:function(i,o){i&1&&(Ct(),d(0,"div",0)(1,"div",1),Fe(2),p()())},styles:[`@charset "UTF-8";mat-fab-toolbar{display:block}mat-fab-toolbar.mat-fab-bottom-right{inset:auto 20px 20px auto;position:absolute}mat-fab-toolbar.mat-fab-bottom-left{inset:auto auto 20px 20px;position:absolute}mat-fab-toolbar.mat-fab-top-right{inset:20px 20px auto auto;position:absolute}mat-fab-toolbar.mat-fab-top-left{inset:20px auto auto 20px;position:absolute}mat-fab-toolbar .mat-fab-toolbar-wrapper{display:block;position:relative;overflow:hidden;height:68px}mat-fab-toolbar mat-fab-trigger{position:absolute;z-index:20}mat-fab-toolbar mat-fab-trigger button.mat-mdc-fab{overflow:visible!important;opacity:.5}mat-fab-toolbar mat-fab-trigger button.mat-mdc-fab .mat-icon{position:relative;z-index:22;opacity:1}mat-fab-toolbar mat-fab-trigger .mat-fab-toolbar-background{display:block;position:absolute;z-index:21;opacity:1}mat-fab-toolbar.mat-left mat-fab-trigger{right:0}[dir=rtl] mat-fab-toolbar.mat-left mat-fab-trigger{right:auto;left:0}mat-fab-toolbar.mat-left .mat-toolbar-tools{flex-direction:row-reverse}mat-fab-toolbar.mat-left .mat-toolbar-tools>.mat-mdc-button:first-child{margin-right:.6rem}[dir=rtl] mat-fab-toolbar.mat-left .mat-toolbar-tools>.mat-mdc-button:first-child{margin-right:auto;margin-left:.6rem}mat-fab-toolbar.mat-left .mat-toolbar-tools>.mat-mdc-button:first-child{margin-left:-.8rem}[dir=rtl] mat-fab-toolbar.mat-left .mat-toolbar-tools>.mat-mdc-button:first-child{margin-left:auto;margin-right:-.8rem}mat-fab-toolbar.mat-left .mat-toolbar-tools>.mat-mdc-button:last-child{margin-right:8px}[dir=rtl] mat-fab-toolbar.mat-left .mat-toolbar-tools>.mat-mdc-button:last-child{margin-right:auto;margin-left:8px}mat-fab-toolbar.mat-right mat-fab-trigger{left:0}[dir=rtl] mat-fab-toolbar.mat-right mat-fab-trigger{left:auto;right:0}mat-fab-toolbar.mat-right .mat-toolbar-tools{flex-direction:row}mat-fab-toolbar .mat-toolbar.mat-toolbar-single-row{padding:0!important;background-color:transparent!important;pointer-events:none;position:relative;z-index:23}mat-fab-toolbar .mat-toolbar.mat-toolbar-single-row .mat-toolbar-tools{padding:0 20px!important;margin-top:3px}mat-fab-toolbar .mat-toolbar.mat-toolbar-single-row .mat-fab-action-item{opacity:0;transform:scale(0)}mat-fab-toolbar.mat-is-open mat-fab-trigger>button.mat-mdc-fab{box-shadow:none;opacity:1}mat-fab-toolbar.mat-is-open mat-fab-trigger>button.mat-mdc-fab .mat-icon{opacity:0}
161mat-fab-toolbar.mat-is-open .mat-toolbar.mat-toolbar-single-row .mat-fab-action-item{opacity:1;transform:scale(1)}mat-fab-toolbar.mat-animation mat-fab-trigger button.mat-mdc-fab{transition:opacity .3s cubic-bezier(.55,0,.55,.2) .2s}mat-fab-toolbar.mat-animation mat-fab-trigger button.mat-mdc-fab .mat-icon{transition:all .2s ease-in}mat-fab-toolbar.mat-animation mat-fab-trigger .mat-fab-toolbar-background{transition:all .3s cubic-bezier(.55,0,.55,.2)}mat-fab-toolbar.mat-animation .mat-toolbar.mat-toolbar-single-row .mat-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.15s}mat-fab-toolbar.mat-animation.mat-is-open mat-fab-trigger>button.mat-mdc-fab{transition:opacity .3s cubic-bezier(.55,0,.55,.2)}
162`],encapsulation:2});let n=t;return n})();var a0e={};Ae(a0e,{DASHBOARD_SELECT_PANEL_DATA:()=>fk,DashboardSelectPanelComponent:()=>F1});y();function o0e(n,t){if(n&1&&(d(0,"mat-option",3),g(1),p()),n&2){let r=t.$implicit;m("value",r.id.id),l(),j(" ",r.title," ")}}var fk=new tt("DashboardSelectPanelData"),F1=(()=>{let t=class t{constructor(e){this.data=e,this.dashboards$=this.data.dashboards$,this.dashboardId=this.data.dashboardId}dashboardSelected(e){this.data.onDashboardSelected(e)}};t.\u0275fac=function(i){return new(i||t)(h(fk))},t.\u0275cmp=L({type:t,selectors:[["tb-dashboard-select-panel"]],decls:8,vars:7,consts:[[1,"mat-content","mat-padding","flex","flex-col"],["matInput","",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"mat-form-field")(2,"mat-label"),g(3),v(4,"translate"),p(),d(5,"mat-select",1),bi("ngModelChange",function(s){return gi(o.dashboardId,s)||(o.dashboardId=s),s}),T("ngModelChange",function(){return o.dashboardSelected(o.dashboardId)}),x(6,o0e,2,2,"mat-option",2),v(7,"async"),p()()()),i&2&&(l(3),z(C(4,3,"dashboard.select-dashboard")),l(2),fi("ngModel",o.dashboardId),l(),m("ngForOf",C(7,5,o.dashboards$)))},dependencies:[Ke,ze,At,Kn,xt,xe,eo,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{min-width:300px;max-width:320px;max-height:150px;overflow-x:hidden;overflow-y:auto;background:#fff;border-radius:4px;box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}@media (min-height: 350px){[_nghost-%COMP%]{max-height:250px}}[_nghost-%COMP%]   .mat-content[_ngcontent-%COMP%]{background-color:#fff}']});let n=t;return n})();var c0e={};Ae(c0e,{DashboardSelectComponent:()=>gk});y();var s0e=["dashboardSelectPanelOrigin"];function l0e(n,t){if(n&1&&(d(0,"mat-option",5),g(1),p()),n&2){let r=t.$implicit,e=b();m("value",r.id.id),l(),j(" ",e.getDashboardTitle(r.title)," ")}}var gk=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c,u,f,_){this.store=e,this.dashboardService=i,this.utils=o,this.overlay=a,this.breakpointObserver=s,this.viewContainerRef=c,this.nativeElement=u,this.document=f,this.window=_,this.tooltipPosition="above",this.propagateChange=I=>{}}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){let e=new On(100);this.dashboards$=this.getDashboards(e).pipe(W(i=>i.data),Si())}setDisabledState(e){this.disabled=e}writeValue(e){this.dashboardId=e}dashboardIdChanged(){this.updateView()}openDashboardSelectPanel(){if(!this.disabled){let e=new Ha({panelClass:"tb-dashboard-select-panel",backdropClass:"cdk-overlay-transparent-backdrop",hasBackdrop:!0}),i={originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"};e.positionStrategy=this.overlay.position().flexibleConnectedTo(this.nativeElement).withPositions([i]);let o=this.overlay.create(e);o.backdropClick().subscribe(()=>{o.dispose()});let a=[{provide:fk,useValue:{dashboards$:this.dashboards$,dashboardId:this.dashboardId,onDashboardSelected:c=>{o.dispose(),this.dashboardId=c,this.updateView()}}},{provide:qd,useValue:o}],s=Mn.create({parent:this.viewContainerRef.injector,providers:a});o.attach(new $a(F1,this.viewContainerRef,s))}}getDashboardTitle(e){return this.utils.customTranslation(e,e)}updateView(){this.propagateChange(this.dashboardId)}getDashboards(e){let i;return this.groupId?i=this.dashboardService.getGroupDashboards(this.groupId,e,{ignoreLoading:!0}):this.customerId?i=this.dashboardService.getCustomerDashboards(!0,this.customerId,e,{ignoreLoading:!0}):i=this.dashboardService.getUserDashboards(null,this.operation,e,{ignoreLoading:!0}),i}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(lp),h(vn),h(Vr),h(qa),h(ci),h(ge),h(Qi),h(Wr))},t.\u0275cmp=L({type:t,selectors:[["tb-dashboard-select"]],viewQuery:function(i,o){if(i&1&&ae(s0e,5),i&2){let a;Q(a=K())&&(o.dashboardSelectPanelOrigin=a.first)}},inputs:{groupId:"groupId",customerId:"customerId",operation:"operation",tooltipPosition:"tooltipPosition",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:9,vars:10,consts:[["dashboardSelectPanelOrigin","cdkOverlayOrigin"],[1,"lt-lg:!hidden",3,"ngModelChange","required","disabled","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"tb-dashboard-select","gt-md:!hidden"],["mat-icon-button","","cdkOverlayOrigin","",3,"click","matTooltip","matTooltipPosition"],[3,"value"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-select",1),bi("ngModelChange",function(c){return D(a),gi(o.dashboardId,c)||(o.dashboardId=c),M(c)}),T("ngModelChange",function(){return D(a),M(o.dashboardIdChanged())}),x(1,l0e,2,2,"mat-option",2),v(2,"async"),p(),d(3,"section",3)(4,"button",4,0),v(6,"translate"),T("click",function(){return D(a),M(o.openDashboardSelectPanel())}),d(7,"mat-icon"),g(8,"dashboards"),p()()()}i&2&&(m("required",o.required)("disabled",o.disabled),fi("ngModel",o.dashboardId),l(),m("ngForOf",C(2,6,o.dashboards$)),l(3),te("matTooltip",C(6,8,"dashboard.select-dashboard")),m("matTooltipPosition",o.tooltipPosition))},dependencies:[Ke,Pe,Se,Kn,xt,zt,xe,St,eo,Tf,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{width:min-content;min-width:52px}[_nghost-%COMP%]   .mat-mdc-select[_ngcontent-%COMP%]{max-width:300px;pointer-events:all}[_nghost-%COMP%]   .tb-dashboard-select[_ngcontent-%COMP%]{min-height:32px}[_nghost-%COMP%]   .tb-dashboard-select[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{pointer-events:all;cursor:pointer}[_nghost-%COMP%]     .mat-mdc-select .mat-mdc-select-value{max-width:282px}[_nghost-%COMP%]     .mat-mdc-select .mat-mdc-select-arrow{width:24px}']}
162);let n=t;return n})();var nye={};Ae(nye,{WidgetsBundleSelectComponent:()=>Km});y();y();y();y();var b8=(()=>{let t=class t extends sn{set entitiesTableConfig(e){this.setEntitiesTableConfig(e)}get entitiesTableConfig(){return this.entitiesTableConfigValue}set isEdit(e){this.isEditValue=e,this.cd.markForCheck(),this.updateFormState()}get isEdit(){return this.isEditValue}get isAdd(){return this.entityValue&&(!this.entityValue.id||!this.entityValue.id.id)}set entity(e){this.entityValue=e,this.entityForm&&(this.entityForm.markAsPristine(),this.updateForm(e))}get entity(){return this.entityValue}constructor(e,i,o,a,s){super(e),this.store=e,this.fb=i,this.entityValue=o,this.entitiesTableConfigValue=a,this.cd=s,this.isDetailsPage=!1,this.entityAction=new J,this.entityForm=this.buildForm(this.entityValue)}ngOnInit(){}onEntityAction(e,i){let o={event:e,action:i,entity:this.entity},a=!1;this.entitiesTableConfig&&(a=this.entitiesTableConfig.onEntityAction(o)),a||this.entityAction.emit(o)}updateFormState(){this.entityForm&&(this.isEditValue?this.entityForm.enable({emitEvent:!1}):this.entityForm.disable({emitEvent:!1}))}entityFormValue(){let e=this.entityForm?re({},this.entityForm.getRawValue()):{};return this.prepareFormValue(e)}prepareFormValue(e){return fb(e)}setEntitiesTableConfig(e){this.entitiesTableConfigValue=e}};t.\u0275fac=function(i){ab()},t.\u0275dir=_e({type:t,inputs:{entitiesTableConfig:"entitiesTableConfig",isEdit:"isEdit",entity:"entity"},outputs:{entityAction:"entityAction"},features:[Ce]});let n=t;return n})();y();y();var bk=class{constructor(t,r,e){this.fetchFunction=t,this.selectionEnabledFunction=r,this.dataLoadedFunction=e,this.entitiesSubject=new Gn([]),this.pageDataSubject=ne
162w Gn(yr()),this.currentLoadSubscription=null,this.pageData$=this.pageDataSubject.asObservable(),this.selection=new Wc(!0,[]),this.currentEntity=null,this.dataLoading=!0}connect(t){return this.entitiesSubject.asObservable()}disconnect(t){this.entitiesSubject.complete(),this.pageDataSubject.complete()}reset(){let t=yr();this.onEntities(t.data),this.pageDataSubject.next(t),this.dataLoadedFunction()}loadEntities(t){this.currentLoadSubscription&&this.currentLoadSubscription.unsubscribe(),this.dataLoading=!0;let r=new or;return this.currentLoadSubscription=this.fetchFunction(t).pipe(et(()=>{this.selection.clear()}),vt(()=>Z(yr()))).subscribe(e=>{this.onEntities(e.data),this.pageDataSubject.next(e),r.next(e),this.dataLoadedFunction(),this.dataLoading=!1}),r}onEntities(t){this.entitiesSubject.next(t)}isAllSelected(){let t=this.selection.selected.length;return this.entitiesSubject.pipe(W(r=>t===this.selectableEntitiesCount(r)),Si())}isEmpty(){return this.entitiesSubject.pipe(W(t=>!t.length),Si())}total(){return this.pageDataSubject.pipe(W(t=>t.totalElements),Si())}toggleCurrentEntity(t){return this.currentEntity!==t?(this.currentEntity=t,!0):!1}isCurrentEntity(t){return this.currentEntity&&t&&this.currentEntity.id&&t.id&&this.currentEntity.id.id===t.id.id}masterToggle(){this.entitiesSubject.pipe(et(t=>{this.selection.selected.length===this.selectableEntitiesCount(t)?this.selection.clear():t.forEach(e=>{this.selectionEnabledFunction(e)&&this.selection.select(e)})}),$n(1)).subscribe()}selectableEntitiesCount(t){return t.filter(r=>this.selectionEnabledFunction(r)).length}};var d0e=function(n){return n[n.DEFAULT=0]="DEFAULT",n[n.COPY_BUTTON=1]="COPY_BUTTON",n}(d0e||{}),vh=class{constructor(t,r,e,i="0px",o=!0,a=!1,s=!1){this.type=t,this.key=r,this.title=e,this.width=i,this.sortable=o,this.ignoreTranslate=a,this.mobileHide=s}},VF=class extends vh{constructor(t,r,e="0px",i=(_,I)=>_[I]?_[I]:"",o=()=>({}),a=!0,s=()=>({}),c=()=>{},u=!1,f=null){super("content",t,r,e,a),this.key=t,this.title=r,this.width=e,this.cellContentFunction=i,this.cellStyleFunction=o,this.sortable=a,this.headerCellStyleFunction=s,this.cellTooltipFunction=c,this.isNumberColumn=u,this.actionCell=f}},_8=class extends vh{constructor(t,r,e,i="0px"){super("action",t,r,i,!1),this.key=t,this.title=r,this.actionDescriptor=e,this.width=i}},v8=class extends vh{constructor(t,r,e="0px",i=(_,I)=>_[I]?_[I]:"",o,a=!0,s=()=>({}),c=()=>({}),u=()=>{},f=null){super("link",t,r,e,a),this.key=t,this.title=r,this.width=e,this.cellContentFunction=i,this.entityURL=o,this.sortable=a,this.cellStyleFunction=s,this.headerCellStyleFunction=c,this.cellTooltipFunction=u,this.actionCell=f}},y8=class extends VF{constructor(t,r,e,i="0px",o="yyyy-MM-dd HH:mm:ss",a=()=>({})){super(t,r,i,(s,c)=>e.transform(s[c],o),a)}},C8=class extends vh{constructor(t,r,e="0px",i=(s,c)=>s[c]?s[c]:[],o=()=>({}),a=()=>({})){super("chart",t,r,e,!1),this.key=t,this.title=r,this.width=e,this.cellContentFunction=i,this.chartStyleFunction=o,this.cellStyleFunction=a}},w8=class extends vh{constructor(t,r,e="0px",i=(s,c)=>s[c]?s[c]:0,o=()=>({}),a=()=>({})){super("progressBar",t,r,e,!1),this.key=t,this.title=r,this.width=e,this.cellContentFunction=i,this.cellStyleFunction=o,this.progressBarStyleFunction=a}},x8=class extends vh{constructor(t,r,e="0px",i){super("entityChips",t,r,e,!1),this.key=t,this.title=r,this.width=e,this.entityURL=i}},S8=class{constructor(t){this.groupParams=t,this.table=null,this.entityDetailsPage=null,this.componentsData=null,this.loadDataOnInit=!0,this.onLoadAction=null,this.useTimePageLink=!1,this.forAllTimeEnabled=!1,this.defaultTimewindowInterval=S5(ff),this.entityType=null,this.tableTitle="",this.selectionEnabled=!0,this.searchEnabled=!0,this.addEnabled=!0,this.addAsTextButton=!1,this.entitiesDeleteEnabled=!0,this.detailsPanelEnabled=!0,this.hideDetailsTabsOnEdit=!0,this.rowPointer=!1,this.actionsColumnTitle=null,this.addDialogStyle={},this.defaultSortOrder={property:"createdTime",direction:Xn.DESC},this.displayPagination=!0,this.pageMode=!0,this.defaultPageSize=10,this.pageStepCount=3,this.columns=[],this.cellActionDescriptors=[],this.groupActionDescriptors=[],this.headerActionDescriptors=[],this.addActionDescriptors=[],this.addEntity=null,this.addDialogOwnerAndGroupWizard=!0,this.dataSource=r=>new bk(this.entitiesFetchFunction,this.entitySelectionEnabled,r),this.detailsReadonly=()=>!1,this.entitySelectionEnabled=()=>!0,this.deleteEnabled=()=>!0,this.deleteEntityTitle=()=>"",this.deleteEntityContent=()=>"",this.deleteEntitiesTitle=()=>"",this.deleteEntitiesContent=()=>"",this.loadEntity=()=>Z(),this.saveEntity=(r,e)=>Z(r),this.deleteEntity=()=>Z(),this.entitiesFetchFunction=()=>Z(yr()),this.onEntityAction=()=>!1,this.handleRowClick=()=>!1,this.entityTitle=r=>r?.name,this.entityAdded=()=>{},this.entityUpdated=()=>{},this.entitiesDeleted=()=>{},this.defaultEntity=null,this.customerId=t?.customerId,this.backNavigationCommands=t?.backNavigationCommands}displayBackButton(){return De(this.backNavigationCommands)}getTable(){return this.table}setTable(t){this.table=t,this.entityDetailsPage=null}getEntityDetailsPage(){return this.entityDetailsPage}setEntityDetailsPage(t){this.entityDetailsPage=t,this.table=null}updateData(t=!1){this.table?this.table.updateData(t):this.entityDetailsPage&&this.entityDetailsPage.reload()}toggleEntityDetails(t,r){this.table&&this.table.toggleEntityDetails(t,r)}
162isDetailsOpen(){return this.table?this.table.isDetailsOpen:!1}getActivatedRoute(){return this.table?this.table.route:null}},HVt=n=>`<mat-icon class="material-icons mat-icon">${n?"check_box":"check_box_outline_blank"}</mat-icon>`;var qVt=(n,t)=>{let r=cC.get(t.entityType);n.hasGenericPermission(r,qo.CREATE)||(t.addEnabled=!1),n.hasGenericPermission(r,qo.DELETE)||(t.entitiesDeleteEnabled=!1,t.deleteEnabled=()=>!1),n.hasGenericPermission(r,qo.WRITE)||(t.detailsReadonly=()=>!0)};var r7={};Ae(r7,{GalleryImageInputComponent:()=>Ep,ImageLinkType:()=>ua});y();y();y();var T8={};Ae(T8,{ScrollGridComponent:()=>yh});y();y();var _k=class extends HS{constructor(t,r,e,i){super(),this.breakpointObserver=t,this.columns=r,this.fetchFunction=e,this.filter=i,this.initialDataLoading=!0,this._data=[],this._rows=Array.from({length:1e5}),this._hasNext=!0,this._pendingRange=null,this._fetchingData=!1,this._totalElements=0}connect(t){if(this._viewport=t._viewport,this._init(),typeof this.columns=="object"&&this.columns.breakpoints){let r=Object.keys(this.columns.breakpoints);this._subscription.add(this.breakpointObserver.observe(r.map(e=>hb(e))).subscribe(()=>{this._columnsChanged(this._detectColumns())}))}return this._subscription.add(t.viewChange.subscribe(r=>this._fetchDataFromRange(r))),this._dataStream}disconnect(){this._reset(),this._subscription.unsubscribe()}get isEmpty(){return!this._data.length}get active(){return!!this._subscription&&!this._subscription.closed}get currentColumns(){return this._columns}updateFilter(t){this.filter=t,this.update()}update(){if(this.active){let t=this._rows.length;this._reset();let r=t!==this._rows.length,e=this._viewport.getRenderedRange();r&&(e.start===0&&(e.start=1),this._viewport.appendOnly=!1),this._viewport.measureScrollOffset()>0&&this._viewport.scrollToOffset(0),this._dataUpdated(),this._viewport.appendOnly=!0,r||this._fetchDataFromRange(e)}}updateItem(t,r){this._data[t]=r,this._dataUpdated()}deleteItem(t){if(t<this._data.length){this._data.splice(t,1),this._totalElements--;let r=this._totalElements?Math.ceil(this._totalElements/this._columns):1e5;this._rows=Array.from({length:r}),this._dataUpdated(),this._hasNext&&this._fetchDataFromRange(this._viewport.getRenderedRange())}}_detectColumns(){if(typeof this.columns!="object")return this.columns;{let t=this.columns.columns;if(this.columns.breakpoints)for(let r of Object.keys(this.columns.breakpoints)){let e=hb(r);if(this.breakpointObserver.isMatched(e)){t=this.columns.breakpoints[r];break}}return t}}_init(){this._subscription=new ln,this._columns=this._detectColumns(),this._dataStream&&this._dataStream.complete(),this._dataStream=new Gn(this._rows)}_reset(){this._data=[],this._totalElements=0,this.initialDataLoading=!0,this._rows=Array.from({length:1e5}),this._hasNext=!0,this._pendingRange=null,this._fetchingData=!1,this._fetchSub
162scription&&this._fetchSubscription.unsubscribe()}_columnsChanged(t){if(this._columns!==t){let r=t>this._columns;this._columns=t;let e=this._totalElements?Math.ceil(this._totalElements/this._columns):1e5;this._rows=Array.from({length:e}),this._dataUpdated(),r&&this._hasNext&&this._fetchDataFromRange(this._viewport.getRenderedRange())}}_fetchDataFromRange(t){if(this._hasNext)if(this._fetchingData)this._pendingRange=t;else{let r=(t.end+1)*this._columns;if(r>this._data.length){let e=this._data.length,i=r-e,o=i*2,a=i,s=Math.floor(e/a);for(;e%a!==0&&a<=o&&!((s+1)*a>r);)a++,s=Math.floor(e/a);let c=e%a;this._fetchData(c,a,s)}}}_fetchData(t,r,e){this._fetchingData=!0,this._fetchSubscription=this.fetchFunction(r,e,this.filter).pipe(vt(()=>Z(yr()))).subscribe(i=>{if(this._hasNext=i.hasNext,i.data.length>t)for(let a=t;a<i.data.length;a++)this._data.push(i.data[a]);this._totalElements=i.totalElements;let o=this._totalElements?Math.ceil(this._totalElements/this._columns):1e5;if(this._rows=Array.from({length:o}),this._dataUpdated(),this.initialDataLoading=!1,this._fetchingData=!1,this._pendingRange){let a=this._pendingRange;this._pendingRange=null,this._fetchDataFromRange(a)}})}_dataUpdated(){for(let t=0;t<this._data.length;t++){let r=Math.floor(t/this._columns),e=t%this._columns;this._rows[r]||(this._rows[r]=[]),this._rows[r][e]=this._data[t]}this._fillGridCells(),this._dataStream.next(this._rows)}_fillGridCells(){if(this._totalElements){let t=this._data.length,r=this._rows.length*this._columns;for(let e=t;e<r;e++){let i=Math.floor(e/this._columns),o=e%this._columns,a=e<this._totalElements?"loadingCell":"emptyCell";this._rows[i]||(this._rows[i]=[]),this._rows[i][o]=a}}}};var p0e=["viewport"],m0e=n=>({gap:n}),u0e=(n,t)=>({item:n,itemIndex:t}),h0e=n=>({minHeight:n});function f0e(n,t){n&1&&Ti(0)}function g0e(n,t){if(n&1&&(pt(0),x(1,f0e,1,0,"ng-container",12),ct()),n&2){let r=b
162(4),e=me(9);l(),m("ngTemplateOutlet",r.loadingCell?r.loadingCell:e)}}function b0e(n,t){n&1&&Ti(0)}function _0e(n,t){if(n&1&&(pt(0),x(1,b0e,1,0,"ng-container",13),ct()),n&2){let r=b(),e=r.$implicit,i=r.index,o=b(2).index,a=b();l(),m("ngTemplateOutlet",a.itemCard)("ngTemplateOutletContext",Yi(2,u0e,e,o*a.dataSource.currentColumns+i))}}function v0e(n,t){if(n&1&&(d(0,"div",11),x(1,g0e,2,1,"ng-container",7)(2,_0e,2,5,"ng-container",7),p()),n&2){let r=t.$implicit,e=b(3);l(),m("ngIf",r==="loadingCell"),l(),m("ngIf",e.isObject(r))}}function y0e(n,t){if(n&1&&(d(0,"div",9),x(1,v0e,3,2,"div",10),p()),n&2){let r=b().$implicit,e=b();_n(Xe(4,m0e,e.gap+"px")),l(),m("ngForOf",r)("ngForTrackBy",e.trackByItem)}}function C0e(n,t){if(n&1&&(pt(0),x(1,y0e,2,6,"div",8),ct()),n&2){let r=t.$implicit;l(),m("ngIf",r)}}function w0e(n,t){n&1&&Ti(0)}function x0e(n,t){if(n&1&&(pt(0),x(1,w0e,1,0,"ng-container",12),ct()),n&2){b();let r=me(5);l(),m("ngTemplateOutlet",r)}}function S0e(n,t){n&1&&Ti(0)}function T0e(n,t){if(n&1&&(pt(0),x(1,S0e,1,0,"ng-container",12),ct()),n&2){let r=b
162(2),e=me(11);l(),m("ngTemplateOutlet",r.dataLoading?r.dataLoading:e)}}function E0e(n,t){if(n&1&&x(0,T0e,2,1,"ng-container",14),n&2){let r=b(),e=me(7);m("ngIf",r.dataSource.initialDataLoading)("ngIfElse",e)}}function I0e(n,t){n&1&&Ti(0)}function k0e(n,t){if(n&1&&x(0,I0e,1,0,"ng-container",12),n&2){let r=b();m("ngTemplateOutlet",r.noData)}}function D0e(n,t){if(n&1&&(d(0,"div",15),O(1,"mat-spinner",16),p()),n&2){let r=b();_n(Xe(2,h0e,r.itemSize+"px"))}}function M0e(n,t){n&1&&(d(0,"div",17),O(1,"mat-spinner",16),p())}var yh=(()=>{let t=class t{constructor(e,i,o,a){this.breakpointObserver=e,this.cd=i,this.renderer=o,this.zone=a,this.columns=1,this.itemSize=200,this.gap=12}ngOnInit(){typeof this.itemSize=="number"?this.calculatedItemSize=this.itemSize:this.calculatedItemSize=this.itemSize.defaultItemSize,this.minBuffer=this.calculatedItemSize,this.maxBuffer=this.calculatedItemSize*2,this.dataSource=new _k(this.breakpointObserver,this.columns,this.fetchFunction,this.filter)}ngAfterViewInit(){this.renderer.setStyle(this.viewport._contentWrapper.nativeElement,"gap",this.gap+"px"),this.renderer.setStyle(this.viewport._contentWrapper.nativeElement,"padding",this.gap+"px"),typeof this.itemSize!="number"&&(this.contentResize$=new ResizeObserver(()=>{this.zone.run(()=>{this.onContentResize()})}),this.contentResize$.observe(this.viewport._contentWrapper.nativeElement))}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&i==="filter"&&this.dataSource.updateFilter(this.filter)}}ngOnDestroy(){this.contentResize$&&this.contentResize$.disconnect()}isObject(e){return Co(e)}trackByItemsRow(e,i){return e}trackByItem(e,i){return i}update(){this.dataSource.update()}updateItem(e,i){this.dataSource.updateItem(e,i)}deleteItem(e){this.dataSource.deleteItem(e)}onContentResize(){let e=this.viewport._contentWrapper.nativeElement.getBoundingClientRect().width,i=this.dataSource.currentColumns,o=(e-this.gap*(i+1))/i;this.calculatedItemSize=this.itemSize.itemSizeFunction(o),this.minBuffer=this.calculatedItemSize,this.maxBuffer=this.calculatedItemSize*2,this.cd.markForCheck()}};t.\u0275fac=function(i){return new(i||t)(h(qa),h(Me),h(Ni),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["tb-scroll-grid"]],viewQuery:function(i,o){if(i&1&&ae(p0e,5),i&2){let a;Q(a=K())&&(o.viewport=a.first)}},inputs:{columns:"columns",fetchFunction:"fetchFunction",filter:"filter",itemSize:"itemSize",gap:"gap",itemCard:"itemCard",loadingCell:"loadingCell",dataLoading:"dataLoading",noData:"noData"},features:[lt],decls:12,vars:6,consts:[["viewport",""],["loadingItems",""],["emptyData",""],["defaultLoadingCell",""],["defaultDataLoading",""],["appendOnly","",1,"tb-scroll-grid-viewport",3,"itemSize","minBufferPx","maxBufferPx"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[4,"ngIf"],["class","tb-scroll-grid-items-row",3,"style",4,"ngIf"],[1,"tb-scroll-grid-items-row"],["class","tb-scroll-grid-item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"tb-scroll-grid-item-container"],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf","ngIfElse"],[1,"flex","flex-col","items-center","justify-center"],["color","accent","strokeWidth","5"],[1,"tb-absolute-fill","flex","flex-col","items-center","justify-center"]],template:function(i,o){i&1&&(d(0,"cdk-virtual-scroll-viewport",5,0),x(2,C0e,2,1,"ng-container",6),p(),x(3,x0e,2,1,"ng-container",7)(4,E0e,1,2,"ng-template",null,1,kt)(6,k0e,1,1,"ng-template",null,2,kt)(8,D0e,2,4,"ng-template",null,3,kt)(10,M0e,2,0,"ng-template",null,4,kt)),i&2&&(m("itemSize",o.calculatedItemSize)("minBufferPx",o.minBuffer)("maxBufferPx",o.maxBuffer),l(2),m("cdkVirtualForOf",o.dataSource)("cdkVirtualForTrackBy",o.trackByItemsRow),l(),m("ngIf",o.dataSource.isEmpty))},dependencies:[Ke,ce,fo,Za,QS,XS,KS],styles:[`@charset "UTF-8";.tb-scroll-grid-viewport{height:100%}.tb-scroll-grid-viewport .cdk-virtual-scroll-content-wrapper{display:flex;flex-direction:column;width:100%}.tb-scroll-grid-viewport .cdk-virtual-scroll-spacer{height:auto!important}.tb-scroll-grid-viewport .tb-scroll-grid-items-row{display:flex;flex-direction:row}.tb-scroll-grid-viewport .tb-scroll-grid-item-container{flex:1;min-width:0}
163`],encapsulation:2});let n=t;return n})();y();y();y();var N1=function(t){return t.touches||[{clientX:t.clientX,clientY:t.clientY}]};tn(_p,{panZoom:function(t){var r,e,i,o,a,s,c,u,f,_,I,S,F=this;if(this.off(".panZoom"),t===!1)return this;t=(r=t)!=null?r:{};var H=(e=t.zoomFactor)!=null?e:2,q=(i=t.zoomMin)!=null?i:Number.MIN_VALUE,ee=(o=t.zoomMax)!=null?o:Number.MAX_VALUE,Ie=(a=t.
163wheelZoom)!=null?a:!0,He=(s=t.pinchZoom)!=null?s:!0,Le=(c=t.panning)!=null?c:!0,qe=(u=t.panButton)!=null?u:0,ue=(f=t.oneFingerPan)!=null?f:!1,Ne=(_=t.margins)!=null?_:!1,st=(I=t.wheelZoomDeltaModeLinePixels)!=null?I:17,Ui=(S=t.wheelZoomDeltaModeScreenPixels)!=null?S:53,Oe,wt,ei=!1,wi=this.viewbox(),pn=function(Gt){if(!Ne)return Gt;var di=Ne.top,er=Ne.left,Ln=Ne.bottom,gn=Ne.right,Cr=F.attr(["width","height"]),cr=Cr.width,Vs=Cr.height,bn=F.node.preserveAspectRatio.baseVal,Rd=0,Fd=0,Ry=0,Fy=0;if(bn.align!==bn.SVG_PRESERVEASPECTRATIO_NONE){var Z0=cr/Vs,pu=wi.width/wi.height;if(pu!==Z0){var Gx=bn.meetOrSlice!==bn.SVG_MEETORSLICE_SLICE,Ny=Z0>pu?"width":"height",Vy=Ny==="width",zx=Gx&&Vy||!Gx&&!Vy,qM=zx?Z0/pu:pu/Z0,nc=Gt[Ny]-Gt[Ny]*qM;zx?bn.align===bn.SVG_PRESERVEASPECTRATIO_XMIDYMIN||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMIDYMID||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMIDYMAX?(Rd=nc/2,Fd=-nc/2):bn.align===bn.SVG_PRESERVEASPECTRATIO_XMINYMIN||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMINYMID||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMINYMAX?Fd=-nc:(bn.align===bn.SVG_PRESERVEASPECTRATIO_XMAXYMIN||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMAXYMID||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMAXYMAX)&&(Rd=nc):bn.align===bn.SVG_PRESERVEASPECTRATIO_XMINYMID||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMIDYMID||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMAXYMID?(Ry=nc/2,Fy=-nc/2):bn.align===bn.SVG_PRESERVEASPECTRATIO_XMINYMIN||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMIDYMIN||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMAXYMIN?Fy=-nc:(bn.align===bn.SVG_PRESERVEASPECTRATIO_XMINYMAX||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMIDYMAX||bn.align===bn.SVG_PRESERVEASPECTRATIO_XMAXYMAX)&&(Ry=nc)}}var WM=wi.width+wi.x-er-Rd,Zh=wi.x+gn-Gt.width-Fd,$x=wi.height+wi.y-di-Ry,Ux=wi.y+Ln-Gt.height-Fy;return Gt.x=Math.min(WM,Math.max(Zh,Gt.x)),Gt.y=Math.min($x,Math.max(Ux,Gt.y)),Gt},Ki=function(Gt){Gt.preventDefault();var di;switch(Gt.deltaMode){case 1:di=Gt.deltaY*st;break;case 2:di=Gt.deltaY*Ui;break;default:di=Gt.deltaY;break}var er=Math.pow(1+H,-1*di/100)*this.zoom(),Ln=this.point(Gt.clientX,Gt.clientY);if(er>ee&&(er=ee),er<q&&(er=q),this.dispatch("zoom",{level:er,focus:Ln}).defaultPrevented)return this;if(this.zoom(er,Ln),Ne){var gn=pn(this.viewbox());this.viewbox(gn)}},It=function ji(Gt){if(wt=N1(Gt),wt.length<2){Le&&ue&&ri.call(this,Gt);return}Le&&ue&&li.call(this,Gt),Gt.preventDefault(),!this.dispatch("pinchZoomStart",{event:Gt}).defaultPrevented&&(this.off("touchstart.panZoom",ji),ei=!0,gd(document,"touchmove.panZoom",ti,this,{passive:!1}),gd(document,"touchend.panZoom",ai,this,{passive:!1}))},ai=function ji(Gt){Gt.preventDefault();var di=N1(Gt);di.length>1||(ei=!1,this.dispatch("pinchZoomEnd",{event:Gt}),Al(document,"touchmove.panZoom",ti),Al(document,"touchend.panZoom",ji),this.on("touchstart.panZoom",It),di.length&&Le&&ue&&ri.call(this,Gt))},ti=function(Gt){Gt.preventDefault();var di=N1(Gt),er=this.zoom(),Ln=Math.sqrt(Math.pow(wt[0].clientX-wt[1].clientX,2)+Math.pow(wt[0].clientY-wt[1].clientY,2)),gn=Math.sqrt(Math.pow(di[0].clientX-di[1].clientX,2)+Math.pow(di[0].clientY-di[1].clientY,2)),Cr=Ln/gn;(er<q&&Cr>1||er>ee&&Cr<1)&&(Cr=1);var cr={x:di[0].clientX+.5*(di[1].clientX-di[0].clientX),y:di[0].clientY+.5*(di[1].clientY-di[0].clientY)},Vs={x:wt[0].clientX+.5*(wt[1].clientX-wt[0].clientX),y:wt[0].clientY+.5*(wt[1].clientY-wt[0].clientY)},bn=this.point(cr.x,cr.y),Rd=this.point(2*cr.x-Vs.x,2*cr.y-Vs.y),Fd=new bo(this.viewbox()).transform(new Sn().translate(-Rd.x,-Rd.y).scale(Cr,0,0).translate(bn.x,bn.y));pn(Fd),this.viewbox(Fd),wt=di,this.dispatch("zoom",{box:Fd,focus:Rd})},ri=function ji(Gt){var di=Gt.type.indexOf("mouse")>-1;di&&Gt.button!==qe&&Gt.which!==qe+1||(Gt.preventDefault(),this.off("mousedown.panZoom",ji),wt=N1(Gt),!ei&&(this.dispatch("panStart",{event:Gt}),Oe={x:wt[0].clientX,y:wt[0].clientY},gd(document,"touchmove.panZoom mousemove.panZoom",rn,this,{passive:!1}),gd(document,"touchend.panZoom mouseup.panZoom",li,this,{passive:!1})))},li=function ji(Gt){Gt.preventDefault(),Al(document,"touchmove.panZoom mousemove.panZoom",rn),Al(document,"touchend.panZoom mouseup.panZ
163oom",ji),this.on("mousedown.panZoom",ri),this.dispatch("panEnd",{event:Gt})},rn=function(Gt){Gt.preventDefault();var di=N1(Gt),er={x:di[0].clientX,y:di[0].clientY},Ln=this.point(er.x,er.y),gn=this.point(Oe.x,Oe.y),Cr=[gn.x-Ln.x,gn.y-Ln.y];if(!(!Cr[0]&&!Cr[1])){var cr=new bo(this.viewbox()).transform(new Sn().translate(Cr[0],Cr[1]));Oe=er,pn(cr),!this.dispatch("panning",{box:cr,event:Gt}).defaultPrevented&&this.viewbox(cr)}};return Ie&&this.on("wheel.panZoom",Ki,this,{passive:!1}),He&&this.on("touchstart.panZoom",It,this,{passive:!1}),Le&&this.on("mousedown.panZoom",ri,this,{passive:!1}),this}});y();var Eo=function(n){return n.DO_NOTHING="DO_NOTHING",n.EXECUTE_RPC="EXECUTE_RPC",n.GET_ATTRIBUTE="GET_ATTRIBUTE",n.GET_TIME_SERIES="GET_TIME_SERIES",n.GET_ALARM_STATUS="GET_ALARM_STATUS",n.GET_DASHBOARD_STATE="GET_DASHBOARD_STATE",n.GET_DASHBOARD_STATE_OBJECT="GET_DASHBOARD_STATE_OBJECT",n}(Eo||{}),E8=Object.keys(Eo),lLt=n=>n!==mn.rpc?E8.filter(t=>t!==Eo.EXECUTE_RPC):E8,cLt=new Map([[Eo.DO_NOTHING,"widgets.value-action.do-nothing"],[Eo.EXECUTE_RPC,"widgets.value-action.execute-rpc"],[Eo.GET_ATTRIBUTE,"widgets.value-action.get-attribute"],[Eo.GET_TIME_SERIES,"widgets.value-action.get-time-series"],[Eo.GET_ALARM_STATUS,"widgets.value-action.get-alarm-status"],[Eo.GET_DASHBOARD_STATE,"widgets.value-action.get-dashboard-state"],[Eo.GET_DASHBOARD_STATE_OBJECT,"widgets.value-action.get-dashboard-state-object"]]),wd=function(n){return n.NONE="NONE",
163n.FUNCTION="FUNCTION",n}(wd||{}),Rc=function(n){return n.EXECUTE_RPC="EXECUTE_RPC",n.SET_ATTRIBUTE="SET_ATTRIBUTE",n.ADD_TIME_SERIES="ADD_TIME_SERIES",n}(Rc||{}),I8=Object.keys(Rc),dLt=n=>n!==mn.rpc?I8.filter(t=>t!==Rc.EXECUTE_RPC):I8,pLt=new Map([[Rc.EXECUTE_RPC,"widgets.value-action.execute-rpc"],[Rc.SET_ATTRIBUTE,"widgets.value-action.set-attribute"],[Rc.ADD_TIME_SERIES,"widgets.value-action.add-time-series"]]),Zl=function(n){return n.VALUE="VALUE",n.CONSTANT="CONSTANT",n.FUNCTION="FUNCTION",n.NONE="NONE",n}(Zl||{});y();var TLt=(()=>{let t=class t{constructor(e){this.cd=e,this.loadingSubject=new Gn(!1),this.valueGetters=[],this.valueActions=[],this.loading$=this.loadingSubject.asObservable().pipe(Si())}ngOnInit(){this.ctx.$scope.actionWidget=this}ngAfterViewInit(){let e=[];this.valueGetters.forEach(i=>{e.push(i.getValue())}),this.loadingSubject.next(!0),Rn(e).subscribe({next:()=>{this.loadingSubject.next(!1)},error:()=>{this.loadingSubject.next(!1)}})}ngOnDestroy(){this.valueActions.forEach(e=>e.destroy()),this.loadingSubject.complete(),this.loadingSubject.unsubscribe()}onInit(){}clearError(){this.ctx.hideToast(this.ctx.toastTargetId)}createValueGetter(e,i,o){let a={next:u=>{o?.next&&o.next(u)},error:u=>{let f=nC(u);this.onError(f),o?.error&&o.error(u)}},s=this.ctx.utilsService.widgetEditMode||this.ctx.isPreview,c=xd.fromSettings(this.ctx,e,i,a,s);return this.valueGetters.push(c),this.valueActions.push(c),c}createValueSetter(e){let i=this.ctx.utilsService.widgetEditMode||this.ctx.isPreview,o=e0.fromSettings(this.ctx,e,i);return this.valueActions.push(o),o}onError(e){this.ctx.showErrorToast(e,"bottom","center",this.ctx.toastTargetId,!0)}updateValue(e,i,o){this.clearError(),this.loadingSubject.next(!0),e.setValue(i).subscribe({next:()=>{o?.next&&o.next(),this.loadingSubject.next(!1)},error:a=>{this.loadingSubject.next(!1),o?.error&&o.error(a);let s=nC(a);this.onError(s)}})}};t.\u0275fac=function(i){return new(i||t)(h(Me))},t.\u0275dir=_e({type:t,inputs:{ctx:"ctx",widgetTitlePanel:"widgetTitlePanel"}});let n=t;return n})(),LF=class{constructor(t,r,e){switch(this.http=t,this.settings=r,this.valueType=e,this.compareToValue=r.compareToValue,r.type){case wd.FUNCTION:this.dataToValueFunction$=rC(this.http,r.dataToValueFunction,"data").pipe(vt(()=>Z(new _2(i=>i,[]))),Si({connector:()=>new or(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!1}));break;case wd.NONE:break}}dataToValue(t){let r;switch(this.settings.type){case wd.FUNCTION:r=this.dataToValueFunction$.pipe(W(e=>{let i=t;if(t)try{i=JSON.parse(t)}catch{}return e.execute(i)}),vt(()=>Z(t)));break;case wd.NONE:r=Z(t);break}return this.valueType===co.BOOLEAN&&(r=r.pipe(W(e=>e===this.compareToValue))),r}},vk=class{constructor(t,r){this.ctx=t,this.settings=r}handleError(t){let r=nC(t),e=this.ctx.translate.instant("widgets.value-action.error.failed-to-perform-action",{actionLabel:this.settings.actionLabel});return r&&(e+="<br>"+r),new Error(e)}destroy(){}},xd=class extends vk{static fromSettings(t,r,e,i,o){switch(r.action){case Eo.DO_NOTHING:return new jF(t,r,e,i,o);case Eo.EXECUTE_RPC:return new GF(t,r,e,i,o);case Eo.GET_ATTRIBUTE:return new zF(t,r,e,i,o);case Eo.GET_TIME_SERIES:return new $F(t,r,e,i,o);case Eo.GET_ALARM_STATUS:return new UF(t,r,e,i,o);case Eo.GET_DASHBOARD_STATE:return new HF(t,r,e,i,o);case Eo.GET_DASHBOARD_STATE_OBJECT:return new qF(t,r,e,i,o)}}constructor(t,r,e,i,o){super(t,r),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o,this.settings.action!==Eo.DO_NOTHING&&this.settings.action!==Eo.GET_ALARM_STATUS&&(this.dataConverter=new LF(t.http,r.dataToValue,e))}getValue(){let t=this.doGetValue().pipe(ii(r=>this.dataConverter?this.dataConverter.dataToValue(r):Z(r)),vt(r=>{throw this.handleError(r)}));return this.getValueSubscription&&this.getValueSubscription.unsubscribe(),this.getValueSubscription=t.subscribe({next:r=>{this.valueObserver.next(r)},error:r=>{this.valueObserver.error(r)}}),t.pipe($n(1))}destroy(){this.getValueSubscription&&this.getValueSubscription.unsubscribe(),super.destroy()}},BF=class{constructor(t,r){switch(this.http=t,this.settings=r,r.type){case Zl.VALUE:break;case Zl.CONSTANT:this.constantValue=this.settings.constantValue;break;case Zl.FUNCTION:this.valueToDataFunction$=rC(this.http,r.valueToDataFunction,"value").pipe(vt(()=>Z(new _2(e=>e,[]))),Si({connector:()=>new or(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!1}));break;case Zl.NONE:break}}valueToData(t){switch(this.settings.type){case Zl.VALUE:return Z(t);case Zl.CONSTANT:return Z(this.constantValue);case Zl.FUNCTION:return this.valueToDataFunction$.pipe(W(r=>r.execute(t)),vt(()=>Z(t)));case Zl.NONE:return Z(null)}}},e0=class extends vk{static fromSettings(t,r,e){switch(r.action){case Rc.EXECUTE_RPC:return new WF(t,r,e);case Rc.SET_ATTRIBUTE:return new YF(t,r,e);case Rc.ADD_TIME_SERIES:return new QF(t,r,e)}}constructor(t,r,e){super(t,r),this.ctx=t,this.settings=r,this.simulated=e,this.valueToDataConverter=new BF(t.http,r.valueToData)}setValue(t){return this.simulated?Z(null).pipe(nl(500)):this.valueToDataConverter.valueToData(t).pipe(ii(r=>this.doSetValue(r)),vt(r=>{throw this.handleError(r)}))}},jF=class extends xd{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o,this.defaultValue=r.defaultValue}doGetValue(){return Z(this.defaultValue)}},GF=class extends xd{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o,this.executeRpcSettings=r.executeRpc}doGetValue(){if(this.simulated){let t=De(this.settings.defaultValue)?this.settings.defaultValue:null;return Z(t).pipe(nl(500))}else return this.ctx.controlApi.sendTwoWayCommand(this.executeRpcSettings.method,null,this.executeRpcSettings.requestTimeout,this.executeRpcSettings.requestPersistent,this.executeRpcSettings.persistentPollingInterval).pipe(vt(t=>{throw k8(this.ctx,t)}))}},yk=class extends xd{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o;let a=this.ctx.defaultSubscription.getFirstEntityInfo();this.targetEntityId=a?.entityId}doGetValue(){if(this.simulated){let t=De(this.settings.defaultValue)?this.settings.defaultValue:null;return Z(t).pipe(nl(100))}else{if(!this.targetEntityId&&!this.ctx.defaultSubscription.rpcEnabled)return zr(()=>new Error(this.ctx.translate.instant("widgets.value-action.error.target-entity-is-not-set")));if(this.targetEntityId){let t=D8(this.ctx,this.targetEntityId,this.scope());return t?zr(()=>t):this.subscribeForTelemetryValue()}else return Z(null)}}subscribeForTelemetryValue(){return this.telemetrySubscriber=S2.createEntityAttributesSubscription(this.ctx.telemetryWsService,this.targetEntityId,this.scope(),this.ctx.ngZone,[this.getTelemetryValueSettings().key]),this.telemetrySubscriber.subscribe(),this.telemetrySubscriber.attributeData$.pipe(W(t=>{let r=null,e=t.find(i=>i.key===this.getTelemetryValueSettings().key);if(e){r=e.value;try{r=JSON.parse(e.value)}catch{}}return r}))}scope(){return aC.LATEST_TELEMETRY}destroy(){this.telemetrySubscriber&&(this.telemetrySubscriber.unsubscribe(),this.telemetrySubscriber=null),super.destroy()}},zF=class extends yk{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o}getTelemetryValueSettings(){return this.settings.getAttribute}scope(){return this.getTelemetryValueSettings().scope}},$F=class extends yk{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o}getTelemetryValueSettings(){return this.settings.getTimeSeries}},UF=class extends xd{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o;let a=this.ctx.defaultSubscription.getFirstEntityInfo();this.targetEntityId=a?.entityId}doGetValue(){return this.simulated?Z(!1).pipe(nl(100)):!this.targetEntityId&&!this.ctx.defaultSubscription.rpcEnabled?zr(()=>new Error(this.ctx.translate.instant("widgets.value-action.error.target-entity-is-not-set"))):this.targetEntityId?this.subscribeForTelemetryValue():Z(null)}
163subscribeForTelemetryValue(){return this.telemetrySubscriber=S2.createAlarmStatusSubscription(this.ctx.telemetryWsService,this.targetEntityId,this.ctx.ngZone,this.settings.getAlarmStatus.severityList,this.settings.getAlarmStatus.typeList),this.telemetrySubscriber.subscribe(),this.telemetrySubscriber.alarmStatus$.pipe(W(t=>t.active))}destroy(){this.telemetrySubscriber&&(this.telemetrySubscriber.unsubscribe(),this.telemetrySubscriber=null),super.destroy()}},HF=class extends xd{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o}doGetValue(){return this.simulated?Z("default"):this.ctx.stateController.dashboardCtrl.dashboardCtx.stateId}},qF=class extends xd{constructor(t,r,e,i,o){super(t,r,e,i,o),this.ctx=t,this.settings=r,this.valueType=e,this.valueObserver=i,this.simulated=o}doGetValue(){return this.simulated?Z({id:"default",params:{}}):Xt(this.ctx.stateController.dashboardCtrl.dashboardCtx.stateId,this.ctx.stateController.dashboardCtrl.dashboardCtx.stateChanged).pipe(Wi(10),W(()=>({id:this.ctx.stateController.getStateId(),params:Di(this.ctx.stateController.getStateParams())})))}},WF=class extends e0{constructor(t,r,e){super(t,r,e),this.ctx=t,this.settings=r,this.simulated=e,this.executeRpcSettings=r.executeRpc}doSetValue(t){return this.ctx.controlApi.sendOneWayCommand(this.executeRpcSettings.method,t,this.executeRpcSettings.requestTimeout,this.executeRpcSettings.requestPersistent,this.executeRpcSettings.persistentPollingInterval).pipe(vt(r=>{throw k8(this.ctx,r)}))}},Ck=class extends e0{constructor(t,r,e){super(t,r,e),this.ctx=t,this.settings=r,this.simulated=e;let i=this.ctx.defaultSubscription.getFirstEntityInfo();this.targetEntityId=i?.entityId}doSetValue(t){if(!this.targetEntityId&&!this.ctx.defaultSubscription.rpcEnabled)return zr(()=>new Error(this.ctx.translate.instant("widgets.value-action.error.target-entity-is-not-set")));if(this.targetEntityId){let r=D8(this.ctx,this.targetEntityId,this.scope());return r?zr(()=>r):this.doSetTelemetryValue(t)}else return Z(null)}scope(){return aC.LATEST_TELEMETRY}},YF=class extends Ck{constructor(t,r,e){super(t,r,e),this.ctx=t,this.settings=r,this.simulated=e,this.setAttributeValueSettings=r.setAttribute}doSetTelemetryValue(t){let r=[{key:this.setAttributeValueSettings.key,value:t}];return this.ctx.attributeService.saveEntityAttributes(this.targetEntityId,this.setAttributeValueSettings.scope,r,{ignoreLoading:!0,ignoreErrors:!0})}scope(){return this.setAttributeValueSettings.scope}},QF=class extends Ck{constructor(t,r,e){super(t,r,e),this.ctx=t,this.settings=r,this.simulated=e,this.putTimeSeriesValueSettings=r.putTimeSeries}doSetTelemetryValue(t){let r=[{key:this.putTimeSeriesValueSettings.key,value:t}];return this.ctx.attributeService.saveEntityTimeseries(this.targetEntityId,aC.LATEST_TELEMETRY,r,{ignoreLoading:!0,ignoreErrors:!0})}},k8=(n,t)=>{let r;return n.defaultSubscription.rpcErrorText?r=n.defaultSubscription.rpcErrorText:r=nC(t),new Error(r)},D8=(n,t,r)=>{if(t.entityType!==G.DEVICE&&r&&![im.SERVER_SCOPE,aC.LATEST_TELEMETRY].includes(r)){let e=n.translate.instant(H4.get(r)),i=n.translate.instant(ta.get(t.entityType).type),o=n.translate.instant("widgets.value-action.error.invalid-attribute-scope",{scope:e,entityType:i});return new Error(o)}else return null};var Zs=function(n){return n.value="value",n.action="action",n.widgetAction="widgetAction",n}(Zs||{}),zLt=Object.keys(Zs),$Lt=new Map([[Zs.value,"scada.behavior.type-value"],[Zs.action,"scada.behavior.type-action"],[Zs.widgetAction,"scada.behavior.type-widget-action"]]),V1=(n,t)=>({title:"",widgetSizeX:n?Math.max(Math.round(n/100),1):3,widgetSizeY:t?Math.max(Math.round(t/100),1):3,tags:[],behavior:[],properties:[]}),wk=/(<svg.*?>)(.*)<\/svg>/gms,M8=/<svg.*(xmlns:tb="https:\/\/thingsboard.io\/svg").*>/gms,KF=/tb:tag="([^"]*)"/gms,A0e=Date.now(),XF=()=>{let n=Zr(),t=n.charAt(0);return t>="0"&&t<="9"?"a"+n:n},nN=n=>{wk.lastIndex=0;let t,r="",e=wk.exec(n);if(e!=null&&(e.length>1&&(t=e[1]),e.length>2&&(r=e[2])),!t)throw new Error("Invalid SVG document.");return M8.lastIndex=0,e=M8.exec(t),e===null||!e.length?(t=t.slice(0,-1)+' xmlns:tb="https://thingsboard.io/svg">',`${t}
164${r}
165</svg>`):n},P8=n=>{try{n=nN(n);let t=new DOMParser().parseFromString(n,"image/svg+xml");return R8(t)}catch{return V1()}},ULt=n=>{let t=[];KF.lastIndex=0;let r=KF.exec(n);for(;r!==null;)t.push(r[1]),r=KF.exec(n);return t.filter((e,i,o)=>o.indexOf(e)===i)},R8=n=>{try{let t=n.getElementsByTagName("tb:metadata");if(t.length)return JSON.parse(t[0].textContent);{let r=n.getElementsByTagName("svg")[0],e=null,i=null;return r.viewBox?.baseVal?.width&&r.viewBox?.baseVal?.height?(e=r.viewBox.baseVal.width,i=r.viewBox.baseVal.height):r.width?.baseVal?.value&&r.height?.baseVal?.value&&(e=r.width.baseVal.value,i=r.height.baseVal.value),V1(e,i)}}catch(t){return console.error(t),V1()}},F8=(n,t)=>{n=nN(n);let r=new DOMParser().parseFromString(n,"image/svg+xml"),e=r.getElementsByTagName("parsererror");
165if(e?.length)throw Error(e[0].textContent);return O0e(r,t),r.documentElement.outerHTML},O0e=(n,t)=>{let r,e=n.getElementsByTagName("tb:metadata");e?.length?(r=e[0],r.textContent=""):(r=n.createElement("tb:metadata"),n.documentElement.insertBefore(r,n.documentElement.firstChild));let i=JSON.stringify(t,null,2),o=n.createCDATASection(i);r.appendChild(o)},xk=/<tb:metadata[^>]*>.*<\/tb:metadata>/gs,HLt=n=>{let t=n;xk.lastIndex=0;let r=xk.exec(n);if(r!==null&&r.length){let e=r[0];t=t.replace(e,"")}return t},qLt=n=>{let t={svgRootNode:"",innerSvg:""};wk.lastIndex=0;let r=wk.exec(n);if(r!=null&&(r.length>1&&(t.svgRootNode=r[1]),r.length>2)){let e=r[2];xk.lastIndex=0;let i=xk.exec(n);if(i!==null&&i.length){let o=i[0];e=e.replace(o,"")}t.innerSvg=e}return t},N8=n=>{if(!n)return null;switch(n){case co.STRING:return"";case co.INTEGER:case co.DOUBLE:return 0;case co.BOOLEAN:return!1;case co.JSON:return{}}},V8=n=>({action:Eo.DO_NOTHING,defaultValue:N8(n),executeRpc:{method:"getState",requestTimeout:5e3,requestPersistent:!1,persistentPollingInterval:1e3},getAttribute:{key:"state",scope:null},getTimeSeries:{key:"state"},getAlarmStatus:{severityList:null,typeList:null},dataToValue:{type:wd.NONE,compareToValue:!0,dataToValueFunction:`/* Should return boolean value */
166return data;`}}),L8=n=>({action:Rc.EXECUTE_RPC,executeRpc:{method:"setState",requestTimeout:5e3,requestPersistent:!1,persistentPollingInterval:1e3},setAttribute:{key:"state",scope:im.SERVER_SCOPE},putTimeSeries:{key:"state"},valueToData:{type:n!==co.BOOLEAN?Zl.VALUE:Zl.CONSTANT,constantValue:!1,valueToDataFunction:`/* Convert input boolean value to RPC parameters or attribute/time-series value */
167return value;`}}),B8={type:Eu.doNothing,targetDashboardStateId:null,openRightLayout:!1,setEntityId:!1,stateEntityParamName:null},WLt=n=>{if(n.type)switch(n.type){case Zs.value:delete n.defaultSetValueSettings,delete n.defaultWidgetActionSettings,n.defaultGetValueSettings||(n.defaultGetValueSettings=go({},V8(n.valueType)));break;case Zs.action:delete n.defaultGetValueSettings,delete n.defaultWidgetActionSettings,n.defaultSetValueSettings||(n.defaultSetValueSettings=go({},L8(n.valueType)));break;case Zs.widgetAction:delete n.defaultGetValueSettings,delete n.defaultSetValueSettings,n.defaultWidgetActionSettings||(n.defaultWidgetActionSettings=go({},B8));break}return n},P0e=n=>{let t={behavior:{},properties:{}};for(let r of n.behavior)r.type===Zs.value?t.behavior[r.id]=go({},V8(r.valueType),r.defaultGetValueSettings||{}):r.type===Zs.action?t.behavior[r.id]=go({},L8(r.valueType),r.defaultSetValueSettings||{}):r.type===Zs.widgetAction&&(t.behavior[r.id]=go({},B8,r.defaultWidgetActionSettings||{}));for(let r of n.properties)t.properties[r.id]=j5(r);return t},A8=(n,t)=>n.$injector.get(vn).parseException(t).message||"Unknown Error",O8=class{constructor(t,r,e,i,o,a,s,c){this.rootElement=t,this.ctx=r,this.iconRegistry=e,this.raf=i,this.svgContent=o,this.inputSettings=a,this.callbacks=s,this.simulated=c,this.valueGetters=[],this.valueActions=[],this.valueSetters={},this.stateValueSubjects={},this.valueProcessor={},this.destroy$=new Te,this.scale=1,this.performInit=!0,this.shapeResize$=new ResizeObserver(()=>{this.resize()}),this.svgContent=nN(this.svgContent);let u=new DOMParser().parseFromString(this.svgContent,"image/svg+xml");this.metadata=R8(u);let f=P0e(this.metadata);this.settings=C4({},f,this.inputSettings||{}),this.prepareMetadata(),this.prepareSvgShape(u),this.shapeResize$.observe(this.rootElement)}destroy(){this.destroy$.next(),this.destroy$.complete(),this.shapeResize$&&this.shapeResize$.disconnect();for(let t of Object.keys(this.stateValueSubjects))this.stateValueSubjects[t].complete(),this.stateValueSubjects[t].unsubscribe();if(this.valueActions.forEach(t=>t.destroy()),this.context)for(let t of this.metadata.tags){let r=this.context.tags[t.tag];r&&r.forEach(e=>{e.timeline().stop(),e.timeline(null)})}this.svgShape&&this.svgShape.remove()}prepareMetadata(){this.metadata.stateRender=vS(this.metadata.stateRenderFunction,["ctx","svg"])||(()=>{});for(let t of this.metadata.tags)if(t.stateRender=vS(t.stateRenderFunction,["ctx","element"])||(()=>{}),t.actions)for(let r of Object.keys(t.actions)){let e=t.actions[r];e.action=vS(e.actionFunction,["ctx","element","event"])||(()=>{})}}prepareSvgShape(t){let r=t.getElementsByTagName("tb:metadata");for(let u=0;u<r.length;u++)r.item(u).remove();let e=t.documentElement.innerHTML,i=/\sid="([^"]*)"\s/g,o="_"+XF(),a=[],s=i.exec(e);for(;s!==null;)a.push(s[1]),s=i.exec(e);for(let u of a){let f=u+o;e=e.replace(new RegExp('id="'+u+'"',"g"),'id="'+f+'"'),e=e.replace(new RegExp("#"+u,"g"),"#"+f)}this.svgShape=Um().svg(e),this.svgShape.node.style.overflow="hidden",this.svgShape.node.style.position="absolute",this.svgShape.node.style["user-select"]="none";let c=Um(t.documentElement.outerHTML);c.type==="svg"?(this.box=c.viewbox(),c.fill()&&this.svgShape.fill(c.fill())):this.box=this.svgShape.bbox(),c.remove(),this.svgShape.size(this.box.width,this.box.height),this.svgShape.addTo(this.rootElement)}init(){this.cssAnimations=new ZF(this.svgShape,this.raf),this.connectorAnimations=new JF,this.context={api:{generateElementId:()=>XF(),formatValue:this.formatValue.bind(this),text:this.setElementText.bind(this),font:this.setElementFont.bind(this),icon:this.setElementIcon.bind(this),cssAnimate:this.cssAnimate.bind(this),cssAnimation:this.cssAnimation.bind(this),resetCssAnimation:this.resetCssAnimation.bind(this),finishCssAnimation:this.finishCssAnimation.bind(this),connectorAnimation:this.connectorAnimation.bind(this),connectorAnimate:this.connectorAnimate.bind(this),resetConnectorAnimation:this.resetConnectorAnimation.bind(this),finishConnectorAnimation:this.finishConnectorAnimation.bind(this),disable:this.disableElement.bind(this),enable:this.enableElement.bind(this),callAction:this.callAction.bind(this),setValue:this.setValue.bind(this),unitSymbol:this.unitSymbol.bind(this),convertUnitValue:this.convertUnitValue.bind(this)},tags:{},properties:{},values:{},svg:this.svgShape};let t=this.svgShape.find("[tb\\:tag]");for(let r of t){let e=r.attr("tb:tag"),i=this.context.tags[e];i||(i=[],this.context.tags[e]=i),i.push(r)}for(let r of this.metadata.properties)r.type!==ws.htmlSection&&(this.context.properties[r.id]=this.getPropertyValue(this.metadata.properties,this.settings.properties,r.id));for(let r of this.metadata.tags)if(r.actions){let e=this.svgShape.find(`[tb\\:tag="${r.tag}"]`);for(let i of Object.keys(r.actions)){let o=r.actions[i];e.forEach(a=>{a.attr("cursor","pointer"),a.on(i,s=>{o.action(this.context,a,s)})})}}for(let r of this.metadata.behavior)if(r.type===Zs.value){let e=r,i=this.settings.behavior[e.id];i=Lt(re({},i),{actionLabel:this.ctx.utilsService.customTranslation(e.name,e.name)});let o=new Gn(i.defaultValue);this.stateValueSubjects[e.id]=o,this.context.values[e.id]=i.defaultValue,o.pipe(Be(this.destroy$)).subscribe(s=>{this.onStateValueChanged(e.id,s)});let a=xd.fromSettings(this.ctx,i,e.valueType,{next:s=>{this.onValue(e.id,s)},error:s=>{let c=A8(this.ctx,s);this.onError(c)}},this.simulated);this.valueGetters.push(a),this.valueActions.push(a)}else if(r.type===Zs.action){let e=r,i=this.settings.behavior[e.id];i=Lt(re({},i),{actionLabel:this.ctx.utilsService.customTranslation(e.name,e.name)});let o=e0.fromSettings(this.ctx,i,this.simulated);this.valueSetters[e.id]=o,this.valueActions.push(o)}if(this.renderState(),this.valueGetters.length){let r=[];
167this.valueGetters.forEach(e=>{r.push(e.getValue())}),this.onLoadingState(!0),Rn(r).pipe(Be(this.destroy$)).subscribe({next:()=>{this.onLoadingState(!1)},error:()=>{this.onLoadingState(!1)}})}}onLoadingState(t){this.callbacks.onScadaSymbolObjectLoadingState(t)}onError(t){this.callbacks.onScadaSymbolObjectError(t)}onMessage(t){this.callbacks.onScadaSymbolObjectMessage(t)}callAction(t,r,e,i){let o=this.metadata.behavior.find(a=>a.id===r);if(o){if(o.type===Zs.action){let a=this.valueSetters[r];a&&(this.onLoadingState(!0),a.setValue(e).pipe(Be(this.destroy$)).subscribe({next:()=>{i?.next&&i.next(),this.onLoadingState(!1)},error:s=>{this.onLoadingState(!1),i?.error&&i.error(s);let c=A8(this.ctx,s);this.onError(c)}}))}else if(o.type===Zs.widgetAction){let a=this.settings.behavior[o.id];if(this.simulated){let s=this.ctx.translate.instant(K5.get(a.type)),c=this.ctx.translate.instant("scada.preview-widget-action-text",{type:s});this.onMessage(c)}else this.ctx.actionsApi.onWidgetAction(t,a);i?.next&&i.next()}}}resize(){if(this.svgShape){let t=this.rootElement.getBoundingClientRect().width,r=this.rootElement.getBoundingClientRect().height;if(t&&r){let e=this.box.width/this.box.height,i=t/r,o;e>i?o=t/this.box.width:o=r/this.box.height,this.scale!==o&&(this.scale=o,this.svgShape.node.style.transform=`scale(${this.scale})`),this.performInit&&(this.performInit=!1,this.init())}}}onValue(t,r){let e=this.metadata.behavior.find(i=>i.id===t);r=this.normalizeValue(r,e.valueType),this.setValue(e.id,r)}setValue(t,r){let e=this.stateValueSubjects[t];e&&e.value!==r&&e.next(r)}unitSymbol(t){return this.ctx.unitService.getTargetUnitSymbol(t)}convertUnitValue(t,r){return this.ctx.unitService.convertUnitValue(t,r)}formatValue(t,r,e,i){let o;typeof r=="object"?o=Di(r):o={units:e,decimals:r,showZeroDecimals:i};let a=v4(o)+"";return this.valueProcessor[a]||(this.valueProcessor[a]=F5.fromSettings(this.ctx.$injector,o)),this.valueProcessor[a].format(t)}onStateValueChanged(t,r){this.context.values[t]!==r&&(this.context.values[t]=r,this.renderState())}renderState(){try{this.metadata.stateRender(this.context,this.svgShape)}catch(t){console.error(t)}for(let t of this.metadata.tags){let r=this.context.tags[t.tag];r&&r.forEach(e=>{try{t.stateRender(this.context,e)}catch(i){console.error(i)}})}}normalizeValue(t,r){return ga(t)?N8(r):t}setElementText(t,r){this.elements(t).forEach(e=>{let i;if(e.type==="text"){let o=e.children();o.length&&o[0].type==="tspan"?i=o[0]:i=e}else e.type==="tspan"&&(i=e);i&&i.text(r)})}setElementFont(t,r,e){this.elements(t).forEach(i=>{if(i.type==="text"){let o=i;r&&o.font({family:r.family,size:De(r.size)&&De(r.sizeUnit)?r.size+r.sizeUnit:null,weight:r.weight,style:r.style}),e&&o.fill(e)}})}setElementIcon(t,r,e=12,i="#0000008A",o=!0){this.elements(t).forEach(a=>{if(a.type==="g"){let s=!1,c=a.first();if(c){let u=c.remember("iconData");u&&u.icon===r&&u.size===e&&u.color===i&&(s=!0)}s||(a.clear(),this.createIconElement(r,e,i).subscribe(u=>{if(u&&(u.remember("iconData",{icon:r,size:e,color:i}),a.add(u),o)){let f=u.bbox();u.translate(-f.cx,-f.cy)}}))}})}createIconElement(t,r,e){if(Pb(t)){let[o,a]=am(t);return this.iconRegistry.getNamedSvgIcon(a,o).pipe($n(1),W(s=>{let c=new xo(s.firstChild),u=c.bbox(),f=r/u.height;return c.scale(f),c.fill(e),c}),vt(()=>Z(null)))}else{let o=am(t)[1],a=this.svgShape.text(o);return this.iconRegistry.getDefaultFontSetClass().filter(u=>u.length>0).forEach(u=>a.addClass(u)),a.font({size:`${r}px`}),a.attr({style:`font-size: ${r}px`,"text-anchor":"start"}),a.fill(e),a.first().attr({"dominant-baseline":"hanging"}),Z(a)}}cssAnimate(t,r){return this.cssAnimations.animate(t,r)}cssAnimation(t){return this.cssAnimations.animation(t)}resetCssAnimation(t){this.cssAnimations.resetAnimation(t)}finishCssAnimation(t){this.cssAnimations.finishAnimation(t)}connectorAnimate(t,r,e){return this.connectorAnimations.animate(t,r,e)}connectorAnimation(t){return this.connectorAnimations.animation(t)}resetConnectorAnimation(t){this.connectorAnimations.resetAnimation(t)}finishConnectorAnimation(t){this.connectorAnimations.finishAnimation(t)}disableElement(t){this.elements(t).forEach(r=>{r.attr({"pointer-events":"none"})})}enableElement(t){this.elements(t).forEach(r=>{r.attr({"pointer-events":null})})}elements(t){return Array.isArray(t)?t:[t]}getProperty(t,...r){let e;for(let i of r)t?(e=t.find(o=>o.id===i),e&&e.type===ws.fieldset?t=e.properties:t=null):e=null;return e}getSettingsValue(t,...r){let e,i=t;
167for(let o of r)i?(e=i[o],e&&typeof e=="object"?i=e:i=null):e=null;return e}getPropertyValue(t,r,...e){let i=this.getProperty(t,...e);if(i)if(i.type===ws.array){let o=[];if(i.arrayItemType!==ws.htmlSection){let a=this.getSettingsValue(r,...e);if(a&&Array.isArray(a))for(let s of a){let c;if(i.arrayItemType===ws.fieldset){let u={};for(let f of i.properties)f.type!==ws.htmlSection&&(u[f.id]=this.getPropertyValue(i.properties,s,f.id));c=u}else c=this.convertPropertyValue(i,s);o.push(c)}}return o}else if(i.type===ws.fieldset){let o={};for(let a of i.properties)a.type!==ws.htmlSection&&(o[a.id]=this.getPropertyValue(t,r,...e,a.id));return o}else{let o=this.getSettingsValue(r,...e);return this.convertPropertyValue(i,o)}else return""}convertPropertyValue(t,r){if(De(r)){if(t.type===ws.color_settings)return M2.fromSettings(r);if([ws.text,ws.textarea].includes(t.type)){let e=this.ctx.utilsService.customTranslation(r,r),i=this.ctx.defaultSubscription.getFirstEntityInfo();return x4(i,e)}return r}else switch(t.type){case ws.color_settings:return M2.fromSettings(P5("#000"));case ws.font:case ws.units:case ws.icon:return null;default:return z5(t.type)}}},t0="scadaSymbolAnimation",i0="scadaSymbolConnectorFlowAnimation",ZF=class{constructor(t,r){this.svgShape=t,this.raf=r}animate(t,r=1e3){return this.checkOldAnimation(t),this.setupAnimation(t,this.createAnimation(t,r))}animation(t){return t.remember(t0)}resetAnimation(t){let r=t.remember(t0);r&&(r.stop(),t.remember(t0,null))}finishAnimation(t){let r=t.remember(t0);r&&(r.finish(),t.remember(t0,null))}checkOldAnimation(t){let r=t.remember(t0);r&&r.finish()}setupAnimation(t,r){return t.remember(t0,r),r}createAnimation(t,r){return(I4()||k4())&&t.type==="pattern"?new iN(t,r):new tN(this.svgShape,this.raf,t,r)}},JF=class{constructor(){}animate(t,r="",e=""){return this.checkOldAnimation(t),this.setupAnimation(t,this.createAnimation(t,r,e))}animation(t){return t.remember(i0)}resetAnimation(t){let r=t.remember(i0);r&&(r.stop(),t.remember(i0,null))}finishAnimation(t){let r=t.remember(i0);r&&(r.finish(),t.remember(i0,null))}setupAnimation(t,r){return t.remember(i0,r),r}checkOldAnimation(t){let r=t.remember(i0);r&&r.finish()}createAnimation(t,r,e){return new eN(t,r,e)}},eN=class{constructor(t,r,e){this.element=t,this._duration=1,this._lineColor="#C8DFF7",this._lineWidth=4,this._strokeLineCap="butt",this._dashWidth=10,this._dashGap=10,this._direction=!0,this._path=r,this._reversedPath=e;let i=`${this._dashWidth} ${this._dashGap}`,o=`${this._dashWidth+this._dashGap};0`;this._animation=Um(`<path d="${this._path}" stroke-dasharray="${i}" stroke-linecap="${this._strokeLineCap}" fill="none" stroke="${this._lineColor}" stroke-width="${this._lineWidth}"><animate attributeName="stroke-dashoffset" values="${o}" dur="${this._duration}s" begin="indefinite" calcMode="linear" repeatCount="indefinite"></animate></path>`)}play(){this.element.node.childElementCount||this.element.add(this._animation);let t=this.element.node.getElementsByTagName("animate")[0],r=(Date.now()-A0e)%1e3*-1;t.beginElementAt(r)}stop(){this.element.node.getElementsByTagName("animate")[0]?.endElement()}finish(){this.element.findOne("path")?.remove()}flowAppearance(t,r,e,i,o){let a=this._animation.node.getTotalLength(),s=0;if(a%100!==0){let _=(a<100?100:this.element.node.ownerSVGElement.clientWidth)/(i+o),I=a/_;s=(i+o-I)/2}this._lineColor=r,this._lineWidth=t,this._strokeLineCap=e,this._dashWidth=i-s,this._dashGap=o-s;let c=`${this._dashWidth} ${this._dashGap}`,u=`${this._dashWidth+(this._dashGap||this._dashWidth)};0`;return this._animation.stroke({width:t,color:r,linecap:e,dasharray:c}),this._animation.findOne("animate").attr("values",u),this}duration(t){return this._duration=t,this._animation.findOne("animate").attr("dur",`${t}s`),this}direction(t){return this._direction=t,this._animation.attr("d",t?this._path:this._reversedPath),this}},tN=class{constructor(t,r,e,i=1e3){this.svgShape=t,this.raf=r,this.element=e,this._active=!1,this._running=!0,this._speed=1,this._duration=1e3,this._easing="linear",this._times=1,this._swing=!1,this._hasAnimations=!1,this._transformOriginX=null,this._transformOriginY=null,this._caf=null,this._duration=i,this.fixPatternAnimationForChrome()}fixPatternAnimationForChrome(){try{let t=window.navigator.userAgent;+/Chrome\/(\d+)/i.exec(t)[1]>0&&this.svgShape.defs().findOne("pattern")&&!this.svgShape.defs().findOne("pattern.empty-animation")&&(this.svgShape.defs().add(Um('<pattern class="empty-animation"></pattern>')),this.svgShape.style().rule(".empty-animation",{"animation-name":"empty-animation","animation-duration":"1000ms","animation-iteration-count":"infinite"}).addText("@keyframes empty-animation {0% {<!--opacity:1;-->}100% {<!--opacity:1;-->}}"))}catch{}}running(){return this._active&&this._running}play(){this._running||(this._running=!0,this.updateAnimationStyle("animation-play-state",this.playStateStyle()))}pause(){this._running&&(this._running=!1,this.updateAnimationStyle("animation-play-state",this.playStateStyle()))}
167stop(){this._running=!1,this._hasAnimations&&(this.destroy(),this.applyStartAttrs())}finish(){this._running=!1,this._hasAnimations&&this.destroy()}speed(t){return this._speed=t,this.updateAnimationStyle("animation-duration",this.durationStyle()),this.updateAnimationStyle("animation-play-state",this.playStateStyle()),this}ease(t){return this._easing=this.easingLiteralToCssEasing(t),this.updateAnimationStyle("animation-timing-function",this._easing),this}loop(t=0,r=!1){return this._times=t,this._swing=r,this._animationStyle&&this.createOrUpdateAnimation(),this}transform(t,r=!1){this._hasAnimations=!0;for(let e of Object.keys(t)){let i=t[e];!isFinite(i)&&!Array.isArray(i)&&delete t[e]}return this._transform?this._transform=Object.assign(this._transform,t):this._transform=Di(t),this._relative=r,this.createOrUpdateAnimation(),this}rotate(t,r,e){return this.transform({rotate:t,ox:r,oy:e},!0)}x(t){return this.transform({translateX:t})}y(t){return this.transform({translateY:t})}size(t,r){let e=this.element.bbox();(t==null||r==null)&&(t==null?t=e.width/e.height*r:r==null&&(r=e.height/e.width*t));let i=t/e.width,o=r/e.height;return this.scale(i,o)}width(t){return this.size(t,this.element.bbox().height)}height(t){return this.size(this.element.bbox().width,t)}move(t,r){let e=this.element.bbox(),i=t-e.x,o=r-e.y;return this.dmove(i,o)}dmove(t,r){return this.transform({translateX:t,translateY:r},!0)}relative(t,r){return this.transform({translateX:t,translateY:r},!0)}scale(t,r,e,i){return this.transform({scaleX:t,scaleY:Bi(r)?t:r,ox:e,oy:i},!0)}attr(t,r){if(this._hasAnimations=!0,this._attrs||(this._attrs={}),typeof t=="object")for(let e of Object.keys(t))this._attrs[e]=t[e];else this._attrs[t]=r;return this.createOrUpdateAnimation(),this}createOrUpdateAnimation(){this.destroy(),this._caf=this.raf.raf(()=>this.prepareAnimation())}prepareAnimation(){this._active=!0,this.prepareTransform(),this.prepareStartEndAttrs(),this._animationName="animation_"+XF(),this.element.on("animationend",i=>{i.animationName===this._animationName&&this.destroy()}),this._animationStyle=this.svgShape.style();let t={"animation-name":this._animationName,"animation-duration":this.durationStyle(),"animation-timing-function":this._easing,"animation-iteration-count":this._times===0?"infinite":this._times,"animation-play-state":this.playStateStyle()};this._animationStyle.rule("."+this._animationName,t);let r=this.animationKeyframes(),e=`
168@keyframes ${this._animationName} {
169`;for(let i of r){let o=`  ${i.stop} {
170`;for(let a of Object.keys(i.style))o+="    "+a+":"+i.style[a]+`;
171`;o+=`  }
172`,e+=o}e+="}",this._animationStyle.addText(e),setTimeout(()=>{this.element.addClass(this._animationName),this._swing||this.applyEndAttrs()},0)}destroy(){this.element.off("animationend"),this._active=!1,this._caf&&(this._caf(),this._caf=null),this._animationStyle&&(this._animationStyle.remove(),this.element.removeClass(this._animationName),this._animationStyle=null,this._animationName=null)}updateAnimationStyle(t,r){if(this._animationStyle){let e=this._animationStyle.node.innerHTML,i=new RegExp(`${t}:([^;]+);`);this._animationStyle.node.innerHTML=e.replace(i,`${t}:${r};`)}}durationStyle(){return this._speed>0&&this._duration>0?Math.round(this._duration/this._speed*(this._swing?2:1))+"ms":"1000ms"}playStateStyle(){return this._running&&this._speed>0?"running":"paused"}animationKeyframes(){let t=[],r={},e={};if(this._transform){let i=this.transformedData();r=this.cssTransform(),e=this.cssTransform(i)}return this._attrs&&(r=re(re({},r),this.currentCssAttrs()),e=re(re({},e),this.toCssAttrs(this._attrs))),t.push({stop:"0%",style:r}),this._swing?t.push({stop:"50%",style:e},{stop:"100%",style:r}):t.push({stop:"100%",style:e}),t}prepareStartEndAttrs(){this._attrs&&(this._startAttrs=re(re({},this._startAttrs),this.currentSvgAttrs()),this._endAttrs=re(re({},this._endAttrs),this._attrs))}applyStartAttrs(){this._initialTransform&&this.element.transform(this._initialTransform),this._startAttrs&&this.element.attr(this._startAttrs)}applyEndAttrs(){this._transform&&this.element.transform(this._transform,this._relative),this._endAttrs&&this.element.attr(this._endAttrs)}prepareTransform(){if(this._transform){this._transformOriginX=this.element.cx(),this._transformOriginY=this.element.cy(),De(this._transform.originX)?this._transformOriginX=this._transform.originX:De(this._transform.ox)&&(this._transformOriginX=this._transform.ox),De(this._transform.originY)?this._transformOriginY=this._transform.originY:De(this._transform.oy)&&(this._transformOriginX=this._transform.oy),this._transformOriginX=this.normFloat(this._transformOriginX),this._transformOriginY=this.normFloat(this._transformOriginY);let t=this.element.attr("transform");if(t&&t.startsWith("matrix")){let e=new Sn(this.element);this._initialTransform=e.decompose(this._transformOriginX,this._transformOriginY)}else this._initialTransform=this.element.transform();this._initialTransform.originX=this._transformOriginX,this._initialTransform.originY=this._transformOriginY;for(let e of["translateX","translateY","scaleX","scaleY","rotate"])this._initialTransform[e]=this.normFloat(this._initialTransform[e]);for(let e of["b","c"])this._initialTransform[e]=this.normFloat(this._initialTransform[e],0)}}transformedData(){let t={},r=this._initialTransform;
172for(let e of Object.keys(this._transform))this._relative?["scaleX","scaleY"].includes(e)?t[e]=this.normFloat(r[e]*this._transform[e]):t[e]=this.normFloat(r[e]+this._transform[e]):t[e]=this.normFloat(this._transform[e]);return t}currentCssAttrs(){let t={},r=getComputedStyle(this.element.node);for(let e of Object.keys(this._attrs)){let i=r.getPropertyValue(e);De(i)&&(t[e]=i)}return t}currentSvgAttrs(){let t={};for(let r of Object.keys(this._attrs)){let e=this.element.attr(r);De(e)&&(t[r]=e)}return t}toCssAttrs(t){let r={};for(let e of Object.keys(t)){let i=t[e];["x","y","width","height"].includes(e)&&u4(i)&&(i+="px"),r[e]=i}return r}cssTransform(t){let r=this._initialTransform||this.element.transform();return t&&(r=Di(r),Object.assign(r,t)),{"transform-origin":`${r.originX}px ${r.originY}px`,transform:`translate(${r.translateX}px, ${r.translateY}px) scale(${r.scaleX}, ${r.scaleY}) rotate(${r.rotate}deg)`}}normFloat(t,r=2){let e=Math.pow(10,r);return Math.round((t+Number.EPSILON)*e)/e}easingLiteralToCssEasing(t){switch(t){case"<>":return"ease-in-out";case"-":return"linear";case">":return"ease-out";case"<":return"ease-in";default:return t}}},iN=class{constructor(t,r=1e3){this.element=t,this._running=!0,this._timeline=this.element.timeline(),this._runner=this.element.animate(r,0,"now").ease("-")}runner(){return this._runner}running(){return this._running}play(){this._running||(this._timeline.play(),this._running=!0)}pause(){this._running&&(this._timeline.pause(),this._running=!1)}stop(){this._running=!1,this._timeline.stop(),this._timeline=new bp,this.element.timeline(this._timeline)}finish(){this._running=!1,this._timeline.finish(),this._timeline=new bp,this.element.timeline(this._timeline)}speed(t){return this._timeline.speed(t),this}ease(t){return this._runner.ease(t),this}loop(t,r,e){return typeof t=="object"?this._runner.loop(t):this._runner.loop(t,r,e),this}transform(t,r){return this._runner.transform(t,r),this}rotate(t,r,e){return this._runner.rotate(...arguments),this}x(t){return this._runner.x(t),this}y(t){return this._runner.y(t),this}size(t,r){return this._runner.size(t,r),this}width(t){return this._runner.width(t),this}height(t){return this._runner.height(t),this}move(t,r){return this._runner.move(t,r),this}dmove(t,r){return this._runner.dmove(t,r),this}relative(t,r){return this._runner.relative(...arguments),this}scale(t,r,e,i){return this._runner.scale(...arguments),this}attr(t,r){return this._runner.attr(t,r),this}};var j8={};Ae(j8,{ImageInputComponent:()=>Sd});y();var n0={};Ae(n0,{FileSizePipe:()=>ka});y();var R0e={bytes:0,KB:1,MB:1,GB:1,TB:2,PB:2},ka=(()=>{let t=class t{constructor(){this.units=["bytes","KB","MB","GB","TB","PB"]}transform(e=0,i=R0e){if(isNaN(parseFloat(String(e)))||!isFinite(e))return"?";let o=0;for(;e>=1024;)e/=1024,o++;let a=this.units[o];return typeof i=="number"?`${e.toFixed(+i)} ${a}`:`${e.toFixed(i[a])} ${a}`}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"fileSize",type:t,pure:!0});let n=t;return n})();var F0e=["flow"],N0e=()=>({singleFile:!0,allowDuplicateUploads:!0}),V0e=(n,t)=>({"tb-error":n,"tb-required":t}),L0e=n=>({disabled:n}),B0e=n=>({accept:n}),j0e=n=>({size:n});function G0e(n,t){if(n&1&&(d(0,"label",10),g(1),p()),n&2){let r=b
172();bt(Yi(3,V0e,!r.disabled&&r.required&&!r.safeImageUrl,!r.disabled&&r.required)),l(),z(r.label)}}function z0e(n,t){if(n&1&&(d(0,"div",14),g(1),p()),n&2){let r=b(2);l(),z(r.emptyImageText)}}function $0e(n,t){if(n&1&&O(0,"img",15),n&2){let r=b(2);m("src",r.safeImageUrl,yo)}}function U0e(n,t){if(n&1){let r=B();d(0,"button",16),v(1,"translate"),T("click",function(){D(r);let i=b(2);return M(i.clearImage())}),d(2,"mat-icon"),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"action.remove"))}function H0e(n,t){if(n&1&&(d(0,"div",11)(1,"div",12),x(2,z0e,2,1,"div",13)(3,$0e,1,1,"ng-template",null,1,kt),p(),x(5,U0e,4,3,"button",8),p()),n&2){let r=me(4),e=b();bt(Xe(5,L0e,e.disabled)),l(2),m("ngIf",!e.safeImageUrl&&e.disabled)("ngIfElse",r),l(3),m("ngIf",e.safeImageUrl&&e.showClearButton&&!e.disabled)}}function q0e(n,t){if(n&1&&(d(0,"div",17)(1,"div",18)(2,"mat-icon",19),g(3,"cloud_upload"),p(),d(4,"div",20)(5,"span",21),g(6),p(),d(7,"div",22)(8,"span",23),g(9,"image-input.or"),p(),d(10,"button",24)(11,"label",25),g(12),v(13,"translate"),p()(),O(14,"input",26),p()()()()),n&2){let r=b
172(),e=me(3);m("flow",e.flowJs),l(6),z(r.dropLabel),l(5),te("for",r.inputId),l(),z(C(13,7,"image-input.browse")),l(2),te("id",r.inputId),m("flow",e.flowJs)("flowAttributes",Xe(9,B0e,r.accept))}}function W0e(n,t){if(n&1){let r=B();d(0,"button",16),v(1,"translate"),T("click",function(){D(r);let i=b();return M(i.clearImage())}),d(2,"mat-icon"),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"action.remove"))}function Y0e(n,t){if(n&1&&(d(0,"div",30),g(1),p()),n&2){let r=b(2);m("title",r.fileName),l(),z(r.fileName)}}function Q0e(n,t){if(n&1&&(d(0,"div",31),v(1,"fileSize"),g(2,"dashboard.maximum-upload-file-size"),p()),n&2){let r=b(2);m("translateParams",Xe(3,j0e,C(1,1,r.maxSizeByte)))}}function K0e(n,t){if(n&1&&(d(0,"div",27),x(1,Y0e,2,2,"div",28)(2,Q0e,3,5,"div",29),p()),n&2){let r=b();l(),m("ngIf",r.showFileName&&r.fileName),l(),m("ngIf",r.maxSizeByte&&!r.disabled)}}var r0=class r0 extends sn{get required(){return this.requiredValue}set required(t){let r=mt(t);this.requiredValue!==r&&(this.requiredValue=r)}constructor(t,r,e,i,o,a,s,c){super(t),this.store=t,this.translate=r,this.utils=e,this.sanitizer=i,this.imagePipe=o,this.dialog=a,this.fileSize=s,this.cd=c,this.accept="image/*",this.emptyImageText=this.translate.instant("dashboard.empty-image"),this.noImageText=this.translate.instant("dashboard.no-image"),this.dropLabel=this.translate.instant("image-input.drag-and-drop"),this.maxImageSize=0,this.imageTypeChanged=new J,this.imageSizeOverflow=new J,this.imageTypeError=new J,this.imageCleared=new J,this.showClearButton=!0,this.showPreview=!0,this.inputId=this.utils.guid(),this.processImageApiLink=!1,this.resultAsFile=!1,this.showFileName=!1,this.fileNameChanged=new J,this.propagateChange=null}ngAfterViewInit(){this.autoUploadSubscription=this.flow.events$.subscribe(t=>{if(t.type==="fileAdded"){let r=t.event[0],e=r.file,i=r.name;if(this.maxSizeByte&&this.maxSizeByte<e.size)return this.dialog.alert(this.translate.instant("dashboard.cannot-upload-file"),this.translate.instant("dashboard.maximum-upload-file-size",{size:this.fileSize.transform(this.maxSizeByte)})).subscribe(()=>{}),!1;if(this.filterFile(r)){let o=new FileReader;o.onload=a=>{let s=!0,c,u;typeof o.result=="string"&&o.result.startsWith("data:image/")?(u=o.result,c=this.extractType(u),this.allowedImageMimeTypes&&this.allowedImageMimeTypes.length&&(!c||this.allowedImageMimeTypes.indexOf(c)===-1)&&(s=!1)):s=!1,s?(this.imageType=c,this.imageUrl=u,this.safeImageUrl=this.sanitizer.bypassSecurityTrustUrl(u),this.file=e,this.fileName=i,this.updateModel()):this.imageTypeError.emit()},this.maxImageSize>0&&e.size>this.maxImageSize?this.imageSizeOverflow.emit():o.readAsDataURL(e)}}})}extractType(t){let r;if(t){let e=t.split(";");e&&e.length&&(e=e[0],e=e.split(":"),e&&e.length>1&&(r=e[1]))}return r}ngOnDestroy(){this.autoUploadSubscription.unsubscribe()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.imageUrl=t,this.imageType=this.extractType(t),this.imageUrl?this.processImageApiLink?this.imagePipe.transform(this.imageUrl,{preview:!0,ignoreLoadingImage:!0}).subscribe(r=>{this.safeImageUrl=r}):this.safeImageUrl=this.sanitizer.bypassSecurityTrustUrl(this.imageUrl):this.safeImageUrl=null}updateModel(){this.cd.markForCheck(),this.resultAsFile?this.prop
172agateChange(this.file):(this.propagateChange(this.imageUrl),this.imageTypeChanged.emit(this.imageType)),this.fileNameChanged.emit(this.fileName)}filterFile(t){return this.allowedExtensions?this.allowedExtensions.split(",").indexOf(t.getExtension())>-1:!0}clearImage(){this.imageType=null,this.imageUrl=null,this.safeImageUrl=null,this.file=null,this.fileName=null,this.updateModel(),this.imageCleared.emit()}};r0.\u0275fac=function(r){return new(r||r0)(h(ve),h(Ge),h(vn),h(js),h(Wo),h(Sa),h(ka),h(Me))},r0.\u0275cmp=L({type:r0,selectors:[["tb-image-input"]],viewQuery:function(r,e){if(r&1&&ae(F0e,7),r&2){let i;Q(i=K())&&(e.flow=i.first)}},inputs:{accept:"accept",label:"label",emptyImageText:"emptyImageText",noImageText:"noImageText",dropLabel:"dropLabel",maxImageSize:"maxImageSize",allowedImageMimeTypes:"allowedImageMimeTypes",maxSizeByte:"maxSizeByte",required:"required",disabled:"disabled",showClearButton:"showClearButton",showPreview:"showPreview",inputId:"inputId",allowedExtensions:"allowedExtensions",processImageApiLink:"processImageApiLink",resultAsFile:"resultAsFile",showFileName:"showFileName",fileName:"fileName"},outputs:{imageTypeChanged:"imageTypeChanged",imageSizeOverflow:"imageSizeOverflow",imageTypeError:"imageTypeError",imageCleared:"imageCleared",fileNameChanged:"fileNameChanged"},features:[ne([{provide:ye,useExisting:he(()=>r0),multi:!0}]),Ce],decls:9,vars:7,consts:[["flow","flow"],["elseBlock",""],[1,"tb-container"],["class","tb-title",3,"class",4,"ngIf"],[3,"flowConfig"],[1,"tb-image-select-container"],["class","image-container",3,"class",4,"ngIf"],["class","drop-area tb-flow-drop","flowDrop","",3,"flow",4,"ngIf"],["mat-icon-button","","color","primary","class","tb-mat-24","type","button","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["class","tb-image-info-container",4,"ngIf"],[1,"tb-title"],[1,"image-container"],[1,"tb-image-preview-container"],["class","tb-image-preview-text",4,"ngIf","ngIfElse"],[1,"tb-image-preview-text"],[1,"tb-image-preview",3,"src"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",1,"tb-mat-24",3,"click","matTooltip"],["flowDrop","",1,"drop-area","tb-flow-drop",3,"flow"],[1,"upload-label"],[1,"tb-mat-32"],[1,"upload-text-area"],[1,"hide-xs"],[1,"upload-button-area"],["translate","",1,"hide-xs"],["type","button","mat-button","","color","primary",1,"browse-file"],[3,"for"],["flowButton","","type","file",1,"file-input",3,"flow","flowAttributes","id"],[1,"tb-image-info-container"],["class","tb-image-file-name",3,"title",4,"ngIf"],["class","tb-image-file-hint","translate","",3,"translateParams",4,"ngIf"],[1,"tb-image-file-name",3,"title"],["translate","",1,"tb-image-file-hint",3,"translateParams"]],template:function(r,e){r&1&&(d(0,"div",2),x(1,G0e,2,6,"label",3),pt(2,4,0),d(4,"div",5),x(5,H0e,6,7,"div",6)(6,q0e,15,11,"div",7)(7,W0e,4,3,"button",8),p(),ct(),x(8,K0e,3,2,"div",9),p()),r&2&&(l(),m("ngIf",e.label),l(),m("flowConfig",hn(6,N0e)),l(3),m("ngIf",e.showPreview&&(e.safeImageUrl||e.disabled)),l(),m("ngIf",!e.disabled),l(),m("ngIf",!e.showPreview&&e.safeImageUrl&&e.showClearButton&&!e.disabled),l(),m("ngIf",e.showFileName&&e.fileName||e.maxSizeByte&&!e.disabled))},dependencies:[ce,jt,yt,Pe,Se,zt,Nu,Vu,Lu,be,ka],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0;padding:0 0 16px;display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:block;padding-bottom:0}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]{width:100%;height:96px;display:flex;gap:12px;align-items:center}[_nghost-%COMP%]   .image-container[_ngcontent-%COMP%]{position:relative;border-radius:4px;border:1px solid rgba(0,0,0,.05);padding:8px 12px 8px 8px;display:flex;align-items:center;gap:12px}[_nghost-%COMP%]   .image-container.disabled[_ngcontent-%COMP%]{padding:8px}[_nghost-%COMP%]   .image-container[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;border-radius:4px;background:var(--tb-primary-500);opacity:.04}[_nghost-%COMP%]   .tb-image-preview-container[_ngcontent-%COMP%]{z-index:1;width:78px;height:78px;border:1px solid rgba(0,0,0,.12);background:#fff;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%]   .tb-image-preview-text[_ngcontent-%COMP%]{font-size:14px;text-align:center}[_nghost-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{width:auto;max-width:76px;height:auto;max-height:76px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]{display:flex;gap:12px;font-size:13px;font-style:normal;line-height:16px;letter-spacing:normal}
172[_nghost-%COMP%]   .tb-image-file-name[_ngcontent-%COMP%]{width:136px;color:#0000008a;font-weight:500;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%]   .tb-image-file-hint[_ngcontent-%COMP%]{color:#00000061;font-weight:400;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%]   .file-input[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]{height:100%;flex:1;overflow:hidden;border:2px dashed rgba(0,0,0,.2);border-radius:4px;box-sizing:border-box}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]{width:100%;height:100%;padding:0 16px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{color:#0000001f}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .upload-text-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;font-size:16px;line-height:24px;color:#0000008a;text-align:center}@media screen and (max-width: 599px){[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .upload-text-area[_ngcontent-%COMP%]   .hide-xs[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .upload-button-area[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;gap:6px}[_nghost-%COMP%]   .tb-hint[_ngcontent-%COMP%]{margin-top:8px;padding-bottom:0}[_nghost-%COMP%]     button.mat-mdc-button.mat-mdc-button-base.browse-file{padding:0;min-width:0;height:24px;font-size:16px}[_nghost-%COMP%]     button.mat-mdc-button.mat-mdc-button-base.browse-file label{display:block;cursor:pointer}']});var Sd=r0;pe([fe(),le("design:type",Object)],Sd.prototype,"processImageApiLink",void 0);pe([fe(),le("design:type",Object)],Sd.prototype,"resultAsFile",void 0);pe([fe(),le("design:type",Object)],Sd.prototype,"showFileName",void 0);function X0e(n,t){n&1&&O(0,"mat-progress-bar",14)}function Z0e(n,t){n&1&&O(0,"div",15)}function J0e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.name-required")," "))}function ebe(n,t){if(n&1&&(d(0,"mat-form-field",16)(1,"mat-label",17),g(2,"image.name"),p(),O(3,"input",18),x(4,J0e,3,3,"mat-error",19),p()),n&2){let r=b
172();l(4),m("ngIf",r.uploadImageFormGroup.get("title").hasError("required"))}}var o0=(()=>{let t=class t extends An{get isScada(){return this.data.imageSubType===za.SCADA_SYMBOL}constructor(e,i,o,a,s,c,u,f){super(e,i,c),this.store=e,this.router=i,this.imageService=o,this.data=a,this.errorStateMatcher=s,this.dialogRef=c,this.fb=u,this.destroyRef=f,this.uploadImage=!0,this.submitted=!1,this.maxResourceSize=em(this.store).maxResourceSize}ngOnInit(){this.uploadImage=!this.data?.image,this.uploadImageFormGroup=this.fb.group({file:[this.data?.image?.link,[ke.required]]}),this.uploadImage&&(this.uploadImageFormGroup.addControl("title",this.fb.control(null,[ke.required])),this.isScada&&this.uploadImageFormGroup.get("file").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{e&&y2(e).subscribe(i=>{this.scadaSymbolContent=i,this.scadaSymbolMetadata=P8(this.scadaSymbolContent);let o=this.uploadImageFormGroup.get("title");this.scadaSymbolMetadata.title&&(!o.value||!o.touched)&&o.setValue(this.scadaSymbolMetadata.title)})}))}imageFileNameChanged(e){if(this.uploadImage){let i=this.uploadImageFormGroup.get("title");(!i.value||!i.touched)&&i.setValue(e)}}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invalid&&this.submitted);return o||a}cancel(){this.dialogRef.close(null)}upload(){this.submitted=!0;let e=this.uploadImageFormGroup.get("file").value;try{if(this.uploadImage){let i=this.uploadImageFormGroup.get("title").value;if(this.isScada){this.scadaSymbolMetadata||(this.scadaSymbolMetadata=V1()),this.scadaSymbolMetadata.title!==i&&(this.scadaSymbolMetadata.title=i);let o=F8(this.scadaSymbolContent,this.scadaSymbolMetadata);e=b4(e,o)}Rn([this.imageService.uploadImage(e,i,this.data.imageSubType),v2(e)]).subscribe(([o,a])=>{this.dialogRef.close({image:Object.assign(o,{base64:a})})})}else if(this.isScada)y2(e).subscribe(i=>{this.dialogRef.close({scadaSymbolContent:i})});else{let i=this.data.image;Rn([this.imageService.updateImage(dl(i),i.resourceKey,e),v2(e)]).subscribe(([o,a])=>{this.dialogRef.close({image:Object.assign(o,{base64:a})})})}}catch(i){this.store.dispatch(new Sr({message:i.message,type:"error",verticalPosition:"top",horizontalPosition:"right",target:"uploadRoot"}))}}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(vl),h(un),h(Nn,4),h(en),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-upload-image-dialog"]],features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:28,vars:33,consts:[[2,"width","560px",3,"ngSubmit","formGroup"],["color","primary"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content","",1,"relative"],["tb-toast","","toastTarget","uploadRoot",3,"disabled"],["resultAsFile","","processImageApiLink","","formControlName","file","showFileName","",3,"fileNameChanged","label","accept","allowedExtensions","maxSizeByte","fileName"],["class","mat-block",4,"ngIf"],["mat-dialog-actions","",1,"flex","flex-row","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"],[1,"mat-block"],["translate",""],["matInput","","formControlName","title","required",""],[4,"ngIf"]],template:function(i,o){i&1&&(d(0,"form",0),T("ngSubmit",function(){return o.upload()}),d(1,"mat-toolbar",1)(2,"h2"),g(3),v(4,"translate"),p(),O(5,"span",2),d(6,"button",3),T("click",function(){return o.cancel()}),d(7,"mat-icon",4),g(8,"close"),p()()(),x(9,X0e,1,0,"mat-progress-bar",5),v(10,"async"),x(11,Z0e,1,0,"div",6),v(12,"async"),d(13,"div",7)(14,"fieldset",8),v(15,"async"),d(16,"tb-image-input",9),v(17,"translate"),T("fileNameChanged",function(s){return o.imageFileNameChanged(s)}),p(),x(18,ebe,5,1,"mat-form-field",10),p()(),d(19,"div",11)(20,"button",12),v(21,"async"),T("click",function(){return o.cancel()}),g(22),v(23,"translate"),p(),d(24,"button",13),v(25,"async"),g(26),v(27,"translate"),p()()()),i&2&&(m("formGroup",o.uploadImageFormGroup),l(3),z(C(4,15,o.uploadImage?o.isScada?"scada.upload-symbol":"image.upload-image":o.isScada?"scada.update-symbol":"image.update-image")),l(6),m("ngIf",C(10,17,o.isLoading$)),l(2),m("ngIf",!C(12,19,o.isLoading$)),l(3),m("disabled",C(15,21,o.isLoading$)),l(2),te("label",C(17,23,o.isScada?"scada.symbol-preview":"image.image-preview")),m("accept",o.isScada?"image/svg+xml":"image/*")("allowedExtensions",o.isScada?"svg":null)("maxSizeByte",o.maxResourceSize)("fileName",o.data==null||o.data.image==null?null:o.data.image.fileName),l(2),m("ngIf",o.uploadImage&&o.uploadImageFormGroup.get("file").value),l(2),m("disabled",C(21,25,o.isLoading$)),l(2),j(" ",C(23,27,"action.cancel")," "),l(2),m("disabled",C(25,29,o.isLoading$)||o.uploadImageFormGroup.invalid||!o.uploadImageFormGroup.dirty),l(2),j(" ",C(27,31,o.uploadImage?"action.upload":"action.update")," "))},dependencies:[ce,jt,yt,Pe,Se,Jr,at,ze,At,ni,ir,gr,Dn,ur,ut,xe,We,St,$e,Qe,xs,Sd,Ve,be],encapsulation:2});let n=t;return n})();y();var j1={};Ae(j1,{ImportExportService:()=>Td}
172);y();var fbe={};Ae(fbe,{ImportDialogComponent:()=>jv});y();var L1={};Ae(L1,{FileInputComponent:()=>Va});y();var rN={};Ae(rN,{TbErrorComponent:()=>Fc});y();var Bv=class Bv{constructor(t){this.cd=t,this.state="hide",this.noMargin=!1}set error(t){this.errorValue!==t&&(this.errorValue=t,t&&(this.message=t),this.state=t?"show":"hide",this.cd.markForCheck())}};Bv.\u0275fac=function(r){return new(r||Bv)(h(Me))},Bv.\u0275cmp=L({type:Bv,selectors:[["tb-error"]],inputs:{noMargin:"noMargin",error:"error"},decls:3,vars:4,consts:[[2,"font-size",".75rem"]],template:function(r,e){r&1&&(d(0,"div",0)(1,"mat-error"),g(2),p()()),r&2&&(hi("margin-top",e.noMargin?"0":"0.5rem"),m("@animation",e.state),l(2),j(" ",e.message," "))},dependencies:[ni],styles:["[_nghost-%COMP%]{height:24px}"],data:{animation:[Qn("animation",[Ji("show",Tt({opacity:1,transform:"translateY(0)"})),Ji("hide",Tt({opacity:0,transform:"translateY(-1rem)"})),$i("* <=> *",Vi("200ms ease-out"))])]}});var Fc=Bv;pe([fe(),le("design:type",Object)],Fc.prototype,"noMargin",void 0);var tbe=["flow"],ibe=["flowInput"],nbe=()=>({allowDuplicateUploads:!0}),rbe=n=>({accept:n}),obe=n=>({size:n});function abe(n,t){if(n&1&&(d(0,"label",20),g(1),p()),n&2){let r=b
172();Y("tb-required",!r.disabled&&r.required)("pointer-event",r.hint),te("tb-hint-tooltip-icon",r.hint),l(),j("",r.label," ")}}function sbe(n,t){if(n&1&&(O(0,"tb-error",21),v(1,"translate")),n&2){let r=b();te("error",C(1,1,r.noFileText))}}function lbe(n,t){if(n&1&&(d(0,"div",22),g(1),p()),n&2){let r=b();l(),z(r.noFileText)}}function cbe(n,t){if(n&1&&(d(0,"div",23),g(1),p()),n&2){let r=b();l(),z(r.fileName)}}function dbe(n,t){if(n&1&&(d(0,"div",24),v(1,"fileSize"),g(2,"dashboard.maximum-upload-file-size"),p()),n&2){let r=b();m("translateParams",Xe(3,obe,C(1,1,r.maxSizeByte)))}}var a0=class a0 extends sn{set multipleFile(t){this.multipleFileValue=t,this.flow?.flowJs&&this.updateMultipleFileMode(this.multipleFile)}get multipleFile(){return this.multipleFileValue}constructor(t,r,e,i,o){super(t),this.store=t,this.utils=r,this.translate=e,this.dialog=i,this.fileSize=o,this.accept="*/*",this.noFileText="import.no-file",this.inputId=this.utils.guid(),this.readAsBinary=!1,this.workFromFileObj=!1,this.uploadButtonClass="browse-file",this.multipleFileValue=!1,this.hideClearButtonOnEmpty=!1,this.fileNameChanged=new J,this.propagateChange=null}ngAfterViewInit(){this.autoUploadSubscription=this.flow.events$.subscribe(t=>{if(t.type==="filesAdded"){let r=[],e=!1;
172t.event[0].forEach(i=>{this.filterFile(i)&&(this.checkMaxSize(i)?r.push(this.readerAsFile(i)):e=!0)}),e&&this.dialog.alert(this.translate.instant("dashboard.cannot-upload-file"),this.translate.instant("dashboard.maximum-upload-file-size",{size:this.fileSize.transform(this.maxSizeByte)})).subscribe(()=>{}),r.length&&Promise.all(r).then(i=>{i=i.filter(o=>o.fileContent!=null||o.files!=null),i.length===1?(this.fileContent=i[0].fileContent,this.fileName=i[0].fileName,this.files=i[0].files,this.updateModel()):i.length>1&&(this.fileContent=i.map(o=>o.fileContent),this.fileName=i.map(o=>o.fileName),this.files=i.map(o=>o.files),this.updateModel())})}}),this.multipleFile||this.updateMultipleFileMode(this.multipleFile)}readerAsFile(t){return new Promise(r=>{let e=new FileReader;e.onload=()=>{let i=null,o=null,a=null;e.readyState===e.DONE&&(this.workFromFileObj?(t.name||t.file)&&(a=t.file,i=t.name):(o=e.result,o&&o.length>0&&(this.contentConvertFunction&&(o=this.contentConvertFunction(o)),i=o?t.name:null))),r({fileContent:o,fileName:i,files:a})},e.onerror=()=>{r({fileContent:null,fileName:null,files:null})},this.readAsBinary?e.readAsBinaryString(t.file):e.readAsText(t.file)})}checkMaxSize(t){return!this.maxSizeByte||t.size<=this.maxSizeByte}filterFile(t){return this.allowedExtensions?this.allowedExtensions.split(",").indexOf(t.getExtension())>-1:!0}ngOnDestroy(){this.autoUploadSubscription&&this.autoUploadSubscription.unsubscribe()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){let r=null;this.workFromFileObj&&t instanceof File&&(r=Array.isArray(t)?t.map(e=>e.name):t.name),this.fileName=this.existingFileName||r}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];e.currentValue!==e.previousValue&&r==="existingFileName"&&(this.fileName=this.existingFileName||null)}}updateModel(){this.workFromFileObj?this.propagateChange(this.files):(this.propagateChange(this.fileContent),this.fileNameChanged.emit(this.fileName))}clearFile(){this.fileName=null,this.fileContent=null,this.files=null,this.updateModel()}updateMultipleFileMode(t){this.flow.flowJs.opts.singleFile=!t,t||this.flowInput.nativeElement.removeAttribute("multiple")}};a0.\u0275fac=function(r){return new(r||a0)(h(ve),h(vn),h(Ge),h(Sa),h(ka))},a0.\u0275cmp=L({type:a0,selectors:[["tb-file-input"]],viewQuery:function(r,e){if(r&1&&(ae(tbe,7),ae(ibe,7)),r&2){let i;Q(i=K())&&(e.flow=i.first),Q(i=K())&&(e.flowInput=i.first)}},inputs:{label:"label",hint:"hint",accept:"accept",noFileText:"noFileText",inputId:"inputId",allowedExtensions:"allowedExtensions",dropLabel:"dropLabel",maxSizeByte:"maxSizeByte",contentConvertFunction:"contentConvertFunction",required:"required",requiredAsError:"requiredAsError",disabled:"disabled",existingFileName:"existingFileName",readAsBinary:"readAsBinary",workFromFileObj:"workFromFileObj",asButton:"asButton",uploadButtonClass:"uploadButtonClass",uploadButtonText:"uploadButtonText",multipleFile:"multipleFile",hideClearButtonOnEmpty:[2,"hideClearButtonOnEmpty","hideClearButtonOnEmpty",Re]},outputs:{fileNameChanged:"fileNameChanged"},features:[ne([{provide:ye,useExisting:he(()=>a0),multi:!0}]),si,Ce,lt],decls:27,vars:27,consts:[["flow","flow"],["flowInput",""],[1,"tb-container"],["class","tb-title",3,"tb-required","pointer-event","tb-hint-tooltip-icon",4,"ngIf"],[3,"flowConfig"],[1,"tb-file-select-container"],[1,"tb-file-clear-container"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",1,"tb-file-clear-btn",3,"click","matTooltip"],["flowDrop","",1,"drop-area","tb-flow-drop",3,"flow"],[1,"upload-label"],[1,"tb-mat-32","drop-label-icon"],[1,"drop-label-text"],["type","button","mat-button","","color","primary",1,"browse-file"],[3,"for"],["flowButton","","type","file",1,"file-input",3,"flow","flowAttributes","id"],[1,"tb-file-info-container"],["class","font-medium",3,"error",4,"ngIf"],["class","tb-file-name","tbTruncateWithTooltip","","translate","",4,"ngIf"],["class","tb-file-name","tbTruncateWithTooltip","",4,"ngIf"],["class","tb-file-hint","tbTruncateWithTooltip","","translate","",3,"translateParams",4,"ngIf"],[1,"tb-title",3,"tb-hint-tooltip-icon"],[1,"font-medium",3,"error"],["tbTruncateWithTooltip","","translate","",1,"tb-file-name"],["tbTruncateWithTooltip","",1,"tb-file-name"],["tbTruncateWithTooltip","","translate","",1,"tb-file-hint",3,"translateParams"]],template:function(r,e){if(r&1){let i=B();d(0,"div",2),x(1,abe,2,6,"label",3),pt(2,4,0),d(4,"div",5)(5,"div",6)(6,"button",7),v(7,"translate"),T("click",function(){return D(i),M(e.clearFile())}),d(8,"mat-icon"),g(9,"close"),p()()(),d(10,"div",8)(11,"div",9)(12,"mat-icon",10),g(13,"cloud_upload"),p(),d(14,"span",11),g(15),p(),d(16,"button",12)(17,"label",13),g(18),v(19,"translate"),p()(),O(20,"input",14,1),p()()(),ct(),d(22,"div",15),x(23,sbe,2,3,"tb-error",16)(24,lbe,2,1,"div",17)(25,cbe,2,1,"div",18)(26,dbe,3,5,"div",19),p()()}if(r&2){let i=me(3);Y("tb-button",e.asButton),l(),m("ngIf",e.label),l(),m("flowConfig",hn(24,nbe)),l(3),Y("!hidden",e.hideClearButtonOnEmpty&&!e.fileContent),l(),te("matTooltip",C(7,20,"action.remove")),l(4),m("flow",i.flowJs),l(5),z(e.dropLabel),l(
172),bt(e.uploadButtonClass),l(),te("for",e.inputId),l(),z(e.uploadButtonText?e.uploadButtonText:C(19,22,e.multipleFile?"file-input.browse-files":"file-input.browse-file")),l(2),te("id",e.inputId),m("flow",i.flowJs)("flowAttributes",Xe(25,rbe,e.accept)),l(3),m("ngIf",!e.fileName&&e.required&&e.requiredAsError),l(),m("ngIf",!e.fileName&&!e.requiredAsError),l(),m("ngIf",e.fileName),l(),m("ngIf",e.maxSizeByte&&!e.disabled)}},dependencies:[ce,jt,yt,Pe,Se,zt,Nu,Vu,Lu,Fc,Sc,Hs,be,ka],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0;padding:0 0 16px;display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:flex;padding-bottom:0}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]{padding:0;gap:0}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-title[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]{width:auto;height:auto}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]   .tb-file-clear-container[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]{height:auto;border:none;border-radius:0}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .drop-label-icon[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .drop-label-text[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-container.tb-button[_ngcontent-%COMP%]   .tb-file-info-container[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-file-select-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100px}[_nghost-%COMP%]   .tb-file-preview[_ngcontent-%COMP%]{width:auto;max-width:100px;height:auto;max-height:100px}[_nghost-%COMP%]   .tb-file-clear-container[_ngcontent-%COMP%]{position:relative;float:right;width:48px;height:100px}[_nghost-%COMP%]   .tb-file-clear-btn[_ngcontent-%COMP%]{position:absolute!important;top:50%;transform:translateY(-50%)!important}[_nghost-%COMP%]   .file-input[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]{position:relative;height:100px;overflow:hidden;border:2px dashed rgba(0,0,0,.2);border-radius:4px;box-sizing:border-box}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]{width:100%;height:100%;padding:0 16px;display:flex;flex-direction:row;justify-content:center;align-items:center;font-size:16px;color:#0000008a;text-align:center}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:17px;color:#0000001f}[_nghost-%COMP%]   .tb-file-info-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;font-size:13px;font-style:normal;line-height:16px;letter-spacing:normal}[_nghost-%COMP%]   .tb-file-name[_ngcontent-%COMP%]{color:#0000008a;font-weight:500}[_nghost-%COMP%]   .tb-file-hint[_ngcontent-%COMP%]{color:#00000061;font-weight:400}[_nghost-%COMP%]     button.mat-mdc-button.mat-mdc-button-base.browse-file:not(.tb-ignore-browse-file-button-style){padding:0;min-width:0;height:24px;font-size:16px}[_nghost-%COMP%]     button.mat-mdc-button.mat-mdc-button-base.browse-file label{display:block;cursor:pointer;padding:0 8px}[_nghost-%COMP%]     .pointer-event{pointer-events:auto}']});var Va=a0;pe([fe(),le("design:type",Boolean)],Va.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Va.prototype,"requiredAsError",void 0);pe([fe(),le("design:type",Boolean)],Va.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],Va.prototype,"readAsBinary",void 0);pe([fe(),le("design:type",Boolean)],Va.prototype,"asButton",void 0);function pbe(n,t){n&1&&O(0,"mat-progress-bar",15)}function mbe(n,t){if(n&1&&(d(0,"tb-toggle-select",16)(1,"tb-toggle-option",17),g(2),v(3,"translate"),p(),d(4,"tb-toggle-option",18),g(5),v(6,"translate"),p()()),n&2){let r=b
172();l(2),z(C(3,2,r.importFileLabel)),l(3),z(C(6,4,r.importContentLabel))}}function ube(n,t){if(n&1){let r=B();d(0,"tb-file-input",19),v(1,"translate"),v(2,"translate"),T("fileNameChanged",function(i){D(r);let o=b();return M(o.currentFileName=i)}),p()}if(n&2){let r=b();te("label",C(1,4,r.importFileLabel)),te("dropLabel",C(2,6,"import.drop-json-file-or")),m("contentConvertFunction",r.loadDataFromJsonContent)("existingFileName",r.currentFileName)}}function hbe(n,t){if(n&1&&(O(0,"tb-json-object-edit",20),v(1,"translate")),n&2){let r=b();te("label",C(1,1,r.importContentLabel))}}var jv=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u){super(e,i,s),this.store=e,this.router=i,this.data=o,this.errorStateMatcher=a,this.dialogRef=s,this.destroyRef=c,this.fb=u,this.submitted=!1,this.importTitle=o.importTitle,this.importFileLabel=o.importFileLabel,this.enableImportFromContent=De(o.enableImportFromContent)?o.enableImportFromContent:!1,this.importContentLabel=o.importContentLabel}ngOnInit(){this.importFormGroup=this.fb.group({importType:["file"],fileContent:[null,[ke.required]],jsonContent:[{value:null,disabled:!0},[ke.required]]}),this.importFormGroup.get("importType").valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.importTypeChanged()})}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invalid&&this.submitted);return o||a}loadDataFromJsonContent(e){try{return JSON.parse(e)}catch(i){return this.store.dispatch(new Sr({message:i.message,type:"error"})),null}}cancel(){this.dialogRef.close(null)}importFromJson(){this.submitted=!0;let e=this.importFormGroup.get("importType").value,i=this.importFormGroup.get(e==="file"?"fileContent":"jsonContent").value;this.dialogRef.close(i)}importTypeChanged(){this.importFormGroup.get("importType").value==="file"?(this.importFormGroup.get("fileContent").enable({emitEvent:!1}),this.importFormGroup.get("jsonContent").disable({emitEvent:!1})):(this.importFormGroup.get("fileContent").disable({emitEvent:!1}),this.importFormGroup.get("jsonContent").enable({emitEvent:!1}))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(Nn,4),h(en),h(En),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-import-dialog"]],features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:24,vars:20,consts:[[2,"width","500px",3,"ngSubmit","formGroup"],["color","primary"],["translate",""],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["mat-dialog-content",""],[1,"flex","flex-1","flex-col"],["class","flex-1","formControlName","importType",4,"ngIf"],["formControlName","fileContent","required","","accept",".json,application/json","allowedExtensions","json",3,"contentConvertFunction","existingFileName","label","dropLabel","fileNameChanged",4,"ngIf"],["formControlName","jsonContent","jsonRequired","",3,"label",4,"ngIf"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],["formControlName","importType",1,"flex-1"],["value","file"],["value","content"],["formControlName","fileContent","required","","accept",".json,application/json","allowedExtensions","json",3,"fileNameChanged","contentConvertFunction","existingFileName","label","dropLabel"],["formControlName","jsonContent","jsonRequired","",3,"label"]],template:function(i,o){i&1&&(d(0,"form",0),T("ngSubmit",function(){return o.importFromJson()}),d(1,"mat-toolbar",1)(2,"h2",2),g(3),p(),O(4,"span",3),d(5,"button",4),T("click",function(){return o.cancel()}),d(6,"mat-icon",5),g(7,"close"),p()()(),x(8,pbe,1,0,"mat-progress-bar",6),v(9,"async"),d(10,"div",7)(11,"div",8),x(12,mbe,7,6,"tb-toggle-select",9)(13,ube,3,8,"tb-file-input",10)(14,hbe,2,3,"tb-json-object-edit",11),p()(),d(15,"div",12)(16,"button",13),v(17,"async"),T("click",function(){return o.cancel()}),g(18),v(19,"translate"),p(),d(20,"button",14),v(21,"async"),g(22),v(23,"translate"),p()()()),i&2&&(m("formGroup",o.importFormGroup),l(3),z(o.importTitle),l(5),m("ngIf",C(9,10,o.isLoading$)),l(4),m("ngIf",o.enableImportFromContent),l(),m("ngIf",o.importFormGroup.get("importType").value==="file"),l(),m("ngIf",o.importFormGroup.get("importType").value==="content"),l(2),m("disabled",C(17,12,o.isLoading$)),l(2),j(" ",C(19,14,"action.cancel")," "),l(2),m("disabled",C(21,16,o.isLoading$)||o.importFormGroup.invalid||!o.importFormGroup.dirty),l(2),j(" ",C(23,18,"action.import")," "))},dependencies:[ce,jt,yt,Pe,Se,Jr,ir,gr,Dn,ur,xe,We,St,$e,Qe,Ec,Va,Mm,ca,Ve,be],encapsulation:2});let n=t;return n})();y();var oN="widget_item",aN="widget_reference",sN="rule_nodes",Sk="rule_chain_import",G8=(()=>{let t=class t{constructor(e,i,o){this.dashboardUtils=e,this.ruleChainService=i,this.utils=o,this.namespace="tbBufferStore",this.delimiter="."}prepareWidgetItem(e,i,o,a,s){let c={datasourceAliases:{},targetDeviceAlias:null},u={datasourceFilters:{}},f=this.dashboardUtils.getOriginalColumns(e,i,o,s),_=this.dashboardUtils.getOriginalSize(e,i,o,a,s),I=a.type===mn.alarm?[a.config.alarmSource]:a.config.datasources;if(a.config&&e.configuration&&e.configuration.entityAliases){let H;if(I)for(let q=0;q<I.length;q++){let ee=I[q];(ee.type===qi.entity||ee.type===qi.entityCount||ee.type===qi.alarmCount)&&ee.entityAliasId&&(H=e.configuration.entityAliases[ee.entityAliasId],H&&(c.datasourceAliases[q]=this.prepareAliasInfo(H)))}if(a.config.targetDevice?.type===Tu.entity&&a.config.targetDevice.entityAliasId){let q=a.config.targetDevice.entityAliasId;H=e.configuration.entityAliases[q],H&&(c.targetDeviceAlias=this.prepareAliasInfo(H))}}if(a.config&&e.configuration&&e.configuration.filters){let H;if(I)for(let q=0;q<I.length;q++){let ee=I[q];(ee.type===qi.entity||ee.type===qi.entityCount||ee.type===qi.alarmCount)&&ee.filterId&&(H=e.configuration.filters[ee.filterId],H&&(u.datasourceFilters[q]=this.prepareFilterInfo(H)))}}let S,F=S1(a);return F&&(S=F.prepareExportInfo(e,a)),{widget:a,aliasesInfo:c,filtersInfo:u,originalSize:_,originalColumns:f,widgetExportInfo:S}}copyWidget(e,i,o,a,s){let c=this.prepareWidgetItem(e,i,o,a,s);this.storeSet(oN,c)}copyWidgetReference(e,i,o,a,s){let c=this.prepareWidgetReference(e,i,o,a,s);this.storeSet(aN,c)}hasWidget(){return this.storeHas(oN)}canPasteWidgetReference(e,i,o,a){let s=this.storeGet(aN);return!!(s&&s.dashboardId===e.id.id&&(s.sourceState!==i||s.sourceLayout!==o||s.breakpoint!==a)&&e.configuration.widgets[s.widgetId])}pasteWidget(e,i,o,a,s,c,u){let f=this.storeGet(oN);if(f){let _=f.widget,I=f.aliasesInfo,S=f.filtersInfo,F=f.originalColumns,H=f.originalSize,q=f.widgetExportInfo,ee=-1,Ie=-1;return s&&(ee=s.row,Ie=s.column),_.id=this.utils.guid(),this.addWidgetToDashboard(e,i,o,_,I,S,c,u,F,H,ee,Ie,a,q).pipe(W(()=>_))}else return zr("Failed to read widget from buffer!")}pasteWidgetReference(e,i,o,a,s){let c=this.storeGet(aN);if(c){let u=e.configuration.widgets[c.widgetId];if(u){let f=c.originalColumns,_=c.originalSize,I=-1,S=-1;return s&&(I=s.row,S=s.column),this.addWidgetToDashboard(e,i,o,u,null,null,null,null,f,_,I,S,a).pipe(W(()=>u))}else return zr("Failed to read widget reference from buffer!")}else return zr("Failed to read widget reference from buffer!")}addWidgetToDashboard(e,i,o,a,s,c,u,f,_,I,S,F,H="default",q){let ee;e?ee=e:ee={},ee=this.dashboardUtils.validateAndUpdateDashboard(ee);let Ie=!1,He=!1,Le,qe,ue=S1(a);return(ue&&q||s)&&(Le=Di(e.configuration.entityAliases)),(ue&&q||c)&&(qe=Di(e.configuration.filters)),s&&this.updateAliases(a,Le,s),c&&this.updateFilters(a,qe,c),ue&&q&&ue.updateFromExportInfo(a,Le,qe,q),Le&&!Fn(Le,ee.configuration.entityAliases)&&(ee.configuration.entityAliases=Le,u&&(Ie=!0)),qe&&!Fn(qe,ee.configuration.filters)&&(ee.configuration.filters=qe,f&&(He=!0)),this.dashboardUtils.addWidgetToLayout(ee,i,o,a,_,I,S,F,H),Ie&&u(),He&&f(),Z(ee)}copyRuleNodes(e,i){let o={nodes:[],connections:[]},a=-1,s=-1,c=-1,u=-1;for(let f=0;f<e.length;f++){let _=e[f],I={id:"",connectors:[],additionalInfo:_.additionalInfo,configuration:_.configuration,debugSettings:{failuresEnabled:_.debugSettings?.failuresEnabled,allEnabled:_.debugSettings?.allEnabled||_.debugSettings?.allEnabledUntil>new Date().getTime(),allEnabledUntil:0}
172,x:_.x,y:_.y,name:_.name,componentClazz:_.component.clazz,ruleChainType:_.ruleChainType};_.targetRuleChainId&&(I.targetRuleChainId=_.targetRuleChainId),_.error&&(I.error=_.error),De(_.singletonMode)&&(I.singletonMode=_.singletonMode),De(_.queueName)&&(I.queueName=_.queueName),o.nodes.push(I),f===0?(a=I.y,s=I.x,c=I.y+50,u=I.x+170):(a=Math.min(a,I.y),s=Math.min(s,I.x),c=Math.max(c,I.y+50),u=Math.max(u,I.x+170))}o.originX=s+(u-s)/2,o.originY=a+(c-a)/2,i.forEach(f=>{o.connections.push(f)}),this.storeSet(sN,o)}hasRuleNodes(){return this.storeHas(sN)}pasteRuleNodes(e,i){let o=this.storeGet(sN);if(o){let a=e-o.originX,s=i-o.originY;for(let c of o.nodes){let u=this.ruleChainService.getRuleNodeComponentByClazz(c.ruleChainType,c.componentClazz);if(u){let f=wF.get(u.type).icon,_=null;u.configurationDescriptor.nodeDefinition.icon&&(f=u.configurationDescriptor.nodeDefinition.icon),u.configurationDescriptor.nodeDefinition.iconUrl&&(_=u.configurationDescriptor.nodeDefinition.iconUrl),delete c.componentClazz,c.component=u,c.nodeClass=wF.get(u.type).nodeClass,c.icon=f,c.iconUrl=_,c.connectors=[],c.x=Math.round(c.x+a),c.y=Math.round(c.y+s)}else return null}return o}return null}hasRuleChainImport(){return this.storeHas(Sk)}storeRuleChainImport(e){this.storeSet(Sk,e)}getRuleChainImport(){let e=this.storeGet(Sk);return this.storeRemove(Sk),e}prepareAliasInfo(e){return{alias:e.alias,filter:e.filter}}prepareFilterInfo(e){return{filter:e.filter,keyFilters:e.keyFilters,editable:e.editable}}prepareWidgetReference(e,i,o,a,s){let c=this.dashboardUtils.getOriginalColumns(e,i,o,s),u=this.dashboardUtils.getOriginalSize(e,i,o,a,s);return{dashboardId:e.id.id,sourceState:i,sourceLayout:o,widgetId:a.id,originalSize:u,originalColumns:c,breakpoint:s}}updateAliases(e,i,o){let a,s;for(let c of Object.keys(o.datasourceAliases)){let u=Number(c);a=o.datasourceAliases[u],s=e1(i,a),e.type===mn.alarm?e.config.alarmSource.entityAliasId=s:e.config.datasources[u].entityAliasId=s}o.targetDeviceAlias&&(a=o.targetDeviceAlias,s=e1(i,a),e.config.targetDevice?.type!==Tu.entity&&(e.config.targetDevice={type:Tu.entity}),e.config.targetDevice.entityAliasId=s)}updateFilters(e,i,o){let a,s;for(let c of Object.keys(o.datasourceFilters)){let u=Number(c);a=o.datasourceFilters[u],s=sI(i,a),e.type===mn.alarm?e.config.alarmSource.filterId=s:e.config.datasources[u].filterId=s}}storeSet(e,i){localStorage.setItem(this.getNamespacedKey(e),JSON.stringify(i))}storeGet(e){let i=null,o=localStorage.getItem(this.getNamespacedKey(e));try{typeof o>"u"||o==="undefined"?i=void 0:i=JSON.parse(o)}catch{this.storeRemove(e)}return i}storeHas(e){let i=localStorage.getItem(this.getNamespacedKey(e));return typeof i<"u"&&i!=="undefined"&&i!==null}storeRemove(e){localStorage.removeItem(this.getNamespacedKey(e))}getNamespacedKey(e){return[this.namespace,e].join(this.delimiter)}};t.\u0275fac=function(i){return new(i||t)(X(Dv),X(vp),X(vn))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var $t=function(n){return n.name="NAME",n.type="TYPE",n.label="LABEL",n.clientAttribute="CLIENT_ATTRIBUTE",n.sharedAttribute="SHARED_ATTRIBUTE",n.serverAttribute="SERVER_ATTRIBUTE",n.timeseries="TIMESERIES",n.accessToken="ACCESS_TOKEN",n.x509="X509",n.mqttClientId="MQTT_CLIENT_ID",n.mqttUserName="MQTT_USER_NAME",n.mqttPassword="MQTT_PASSWORD",n.lwm2mClientEndpoint="LWM2M_CLIENT_ENDPOINT",n.lwm2mClientSecurityConfigMode="LWM2M_CLIENT_SECURITY_CONFIG_MODE",n.lwm2mClientIdentity="LWM2M_CLIENT_IDENTITY",n.lwm2mClientKey="LWM2M_CLIENT_KEY",n.lwm2mClientCert="LWM2M_CLIENT_CERT",n.lwm2mBootstrapServerSecurityMode="LWM2M_BOOTSTRAP_SERVER_SECURITY_MODE",n.lwm2mBootstrapServerClientPublicKeyOrId="LWM2M_BOOTSTRAP_SERVER_PUBLIC_KEY_OR_ID",n.lwm2mBootstrapServerClientSecretKey="LWM2M_BOOTSTRAP_SERVER_SECRET_KEY",n.lwm2mServerSecurityMode="LWM2M_SERVER_SECURITY_MODE",n.lwm2mServerClientPublicKeyOrId="LWM2M_SERVER_CLIENT_PUBLIC_KEY_OR_ID",n.lwm2mServerClientSecretKey="LWM2M_SERVER_CLIENT_SECRET_KEY",n.snmpHost="SNMP_HOST",n.snmpPort="SNMP_PORT",n.snmpVersion="SNMP_VERSION",n.snmpCommunityString="SNMP_COMMUNITY_STRING",n.isGateway="IS_GATEWAY",n.description="DESCRIPTION",n.edgeLicenseKey="EDGE_LICENSE_KEY",n.cloudEndpoint="CLOUD_ENDPOINT",n.routingKey="ROUTING_KEY",n.secret="SECRET",n}($t||{}),$8=new Map([[$t.name,"import.column-type.name"],[$t.type,"import.column-type.type"],[$t.label,"import.column-type.label"],[$t.clientAttribute,"import.column-type.client-attribute"],[$t.sharedAttribute,"import.column-type.shared-attribute"],[$t.serverAttribute,"import.column-type.server-attribute"],[$t.timeseries,"import.column-type.timeseries"],[$t.accessToken,"import.column-type.access-token"],[$t.x509,"import.column-type.x509"],[$t.mqttClientId,"import.column-type.mqtt.client-id"],[$t.mqttUserName,"import.column-type.mqtt.user-name"],[$t.mqttPassword,"import.column-type.mqtt.password"],[$t.lwm2mClientEndpoint,"import.column-type.lwm2m.client-endpoint"],[$t.lwm2mClientSecurityConfigMode,"import.column-type.lwm2m.security-config-mode"],[$t.lwm2mClientIdentity,"import.column-type.lwm2m.client-identity"],[$t.lwm2mClientKey,"import.column-type.lwm2m.client-key"],[$t.lwm2mClientCert,"import.column-type.lwm2m.client-cert"],[$t.lwm2mBootstrapServerSecurityMode,"import.column-type.lwm2m.bootstrap-server-security-mode"],[$t.lwm2mBootstrapServerClientPublicKeyOrId,"import.column-type.lwm2m.bootstrap-server-public-key-id"],[$t.lwm2mBootstrapServerClientSecretKey,"import.column-type.lwm2m.bootstrap-server-secret-key"],[$t.lwm2mServerSecurityMode,"import.column-type.lwm2m.lwm2m-server-security-mode"],[$t.lwm2mServerClientPublicKeyOrId,"import.column-type.lwm2m.lwm2m-server-public-key-id"],[$t.lwm2mServerClientSecretKey,"import.column-type.lwm2m.lwm2m-server-secret-key"],[$t.snmpHost,"import.column-type.snmp.host"],[$t.snmpPort,"import.column-type.snmp.port"],[$t.snmpVersion,"import.column-type.snmp.version"],[$t.snmpCommunityString,"import.column-type.snmp.community-string"],[$t.isGateway,"import.column-type.isgateway"],[$t.description,"import.column-type.description"],[$t.edgeLicenseKey,"import.column-type.edge-license-key"],[$t.cloudEndpoint,"import.column-type.cloud-endpoint"],[$t.routingKey,"import.column-type.routing-key"],[$t.secret,"import.column-type.secret"]]),U8={mimeType:"text/plain",extension:"txt"},lN={mimeType:"text/json",extension:"json"},H8={mimeType:"text/csv",extension:"csv"},q8={mimeType:"application/vnd.ms-excel",extension:"xls"},W8={mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",extension:"xlsx"},Y8={mimeType:"application/zip",extension:"zip"},Q8=`
173  <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
174  <meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"/>
175  <head><!--[if gte mso 9]><xml>
176  <x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{title}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml>
177  <![endif]--></head>
178  <body>{table}</body></html>`;function K8(n,t,r){t=t||{};let e=t.delim||",",i=t.header||!1,o={},a=n.split(/[\r\n]+/),s=z8(a[0],e);if(s.length<2)return r("import.import-csv-number-columns-error"),-1;let c=i?a.slice(1,a.length):a;o.headers=s,o.rows=[];for(let u of c){if(u.length===0)break;let f=z8(u,e);if(f.length!==o.headers.length)return r("import.import-csv-invalid-format-error",{line:i?o.rows.length+2:o.rows.length+1}),-1;for(let _=0;_<f.length;_++)f[_]=_be(f[_]);o.rows.push(f)}return o}function z8(n,t){let r,e,i;for(r=n.split(t=t||","),e=r.length-1,i;e>=0;e--)r[e].replace(/"\s+$/,'"').charAt(r[e].length-1)==='"'?(i=r[e].replace(/^\s+"/,'"')).length>1&&i.charAt(0)==='"'?r[e]=r[e].replace(/^\s*"|"\s*$/g,"").replace(/""/g,'"'):e?r.splice(e-1,2,[r[e-1],r[e]].join(t)):r=r.shift().split(t).concat(r):r[e].replace(/""/g,'"');return r}function bbe(n){return n=n.replace(",","."),n-parseFloat(n)+1>=0&&Number(n).toString()===n}function _be(n){return bbe(n.replace(",","."))?parseFloat(n.replace(",",".")):n.search(/^(true|false)$/im)===0?n.toLowerCase()==="true":n===""?null:n}y();var ro=function(n){return n.UPLINK="UPLINK",n.DOWNLINK="DOWNLINK",n}(ro||{}),X8=new Map([[Ci.CHIRPSTACK,"/assets/converters/tbel-chirpstack-decoder.raw"],[Ci.LORIOT,"/assets/converters/tbel-loriot-decoder.raw"],[Ci.TTI,"/assets/converters/tbel-tti-decoder.raw"],[Ci.TTN,"/assets/converters/tbel-ttn-decoder.raw"],[Ci.SIGFOX,"/assets/converters/tbel-sigfox-decoder.raw"],[Ci.AZURE_IOT_HUB,"/assets/converters/tbel-azure-decoder.raw"],[Ci.AZURE_EVENT_HUB,"/assets/converters/tbel-azure-decoder.raw"],[Ci.AZURE_SERVICE_BUS,"/assets/converters/tbel-azure-decoder.raw"],[Ci.AWS_IOT,"/assets/converters/tbel-aws-iot-decoder.raw"],[Ci.KPN,"/assets/converters/tbel-kpn-decoder.raw"],[Ci.THINGPARK,"/assets/converters/tbel-thingpark-decoder.raw"],[Ci.TPE,"/assets/converters/tbel-tpe-decoder.raw"]]),Z8=new Map([[Ci.CHIRPSTACK,"/assets/converters/js-chirpstack-decoder.raw"],[Ci.LORIOT,"/assets/converters/js-loriot-decoder.raw"],[Ci.TTI,"/assets/converters/js-tti-decoder.raw"],[Ci.TTN,"/assets/converters/js-ttn-decoder.raw"],[Ci.THINGPARK,"/assets/converters/js-thingpark-decoder.raw"],[Ci.TPE,"/assets/converters/js-tpe-decoder.raw"]]),vbe=new Map([[ro.UPLINK,"/assets/converters/js-decoder.raw"],[ro.DOWNLINK,"/assets/converters/js-encoder.raw"]]),ybe=new Map([[ro.UPLINK,"/assets/converters/js-decoder-v2.raw"],[ro.DOWNLINK,"/assets/converters/js-encoder.raw"]]),Cbe=new Map([[ro.UPLINK,"/assets/converters/tbel-decoder.raw"],[ro.DOWNLINK,"/assets/converters/tbel-encoder.raw"]]),wbe=new Map([[ro.UPLINK,"/assets/converters/tbel-decoder.raw"],[ro.DOWNLINK,"/assets/converters/tbel-encoder.raw"]]),A4t=["manufacturer"],O4t=new Map([[ro.UPLINK,"converter.type-uplink"],[ro.DOWNLINK,"converter.type-downlink"]]),P4t=new Map([[ro.UPLINK,"integration.uplink-converter"],[ro.DOWNLINK,"integration.downlink-converter"]]),xbe=function(n){return n.NEW="new",n.EXISTING="existing",n.LIBRARY="library",n.SKIP="skip",n}(xbe||{});function R4t(n){let t="converters";return n&&n.type&&(n.type===ro.UPLINK?t="uplinkConverters":t="downlinkConverters"),t}function F4t(n){return{converterScope:n.data.convertersType?n.data.convertersType:"tenant"}}var Sbe=(n,t)=>{let r=t===2?ybe.get(n):vbe.get(n);if(!r)throw new Error(`JS template URL not found for converterType: ${n} and converterVersion: ${t}`);return r},Tbe=(n,t)=>{let r=t===2?wbe.get(n):Cbe.get(n);if(!r)throw new Error(`Tbel template URL not found for converterType: ${n} and converterVersion: ${t}`);return r},N4t=(n,t)=>t===Ea.TBEL?n===ro.UPLINK?"tbelDecoder":"tbelEncoder":n===ro.UPLINK?"decoder":"encoder",V4t=(n,t,r,e=1)=>t===Ea.JS&&n===ro.UPLINK&&Z8.has(r)?Z8.get(r):t===Ea.JS?Sbe(n,e):n===ro.UPLINK&&X8.has(r)?X8.get(r):Tbe(n,e),Ebe=(n,t)=>t===2?n===ro.UPLINK?"converter/tbel/decoder_fn_v2":"converter/tbel/encoder_fn":n===ro.UPLINK?"converter/tbel/decoder_fn":"converter/tbel/encoder_fn",Ibe=(n,t)=>t===2?n===ro.UPLINK?"converter/decoder_fn_v2":"converter/encoder_fn":n===ro.UPLINK?"converter/decoder_fn":"converter/encoder_fn",L4t=(n,t,r)=>t===Ea.TBEL?Ebe(n,r):Ibe(n,r),B4t=n=>n===ro.DOWNLINK?{width:"700px"}:{width:"1300px"},j4t=(n,t)=>n===ro.UPLINK?t===2?"payloadDecoder":"decoder":"encoder",G4t=(n,t)=>n===ro.UPLINK?t===2?"converter.test-payload-decoder":"converter.test-decoder-fuction":"converter.test-encoder-fuction",kbe=["payload","metadata"],Dbe=["msg","metadata","msgType","integrationMetadata"],z4t=n=>n===ro.UPLINK?kbe:Dbe;var e7=Ld(j4());y();function Mbe(n,t){n&1&&O(0,"mat-progress-bar",11)}var B1=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.ignoreLoading=!1,this.includeResourcesFormControl=new Nl(!0),this.ignoreLoading=this.data.ignoreLoading,this.title=this.data.title,this.prompt=this.data.prompt,De(this.data.include)&&this.includeResourcesFormControl.patchValue(this.data.include,{emitEvent:!1})}cancel(){this.dialogRef.close(null)}export(){this.dialogRef.close({include:this.includeResourcesFormControl.value})}};
178t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-export-resource-dialog"]],features:[Ce],decls:25,vars:25,consts:[["color","primary"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["mat-dialog-content",""],[1,"tb-form-row","no-border","no-padding",3,"disabled"],[1,"mat-slide",3,"formControl"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","type","button",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["color","warn","mode","indeterminate"]],template:function(i,o){i&1&&(d(0,"mat-toolbar",0)(1,"h2"),g(2),v(3,"translate"),p(),O(4,"span",1),d(5,"button",2),T("click",function(){return o.cancel()}),d(6,"mat-icon",3),g(7,"close"),p()()(),x(8,Mbe,1,0,"mat-progress-bar",4),v(9,"async"),d(10,"div",5)(11,"fieldset",6),v(12,"async"),d(13,"mat-slide-toggle",7),g(14),v(15,"translate"),p()()(),d(16,"div",8)(17,"button",9),v(18,"async"),T("click",function(){return o.cancel()}),g(19),v(20,"translate"),p(),d(21,"button",10),v(22,"async"),T("click",function(){return o.export()}),g(23),v(24,"translate"),p()()),i&2&&(l(2),z(C(3,9,o.title)),l(6),m("ngIf",C(9,11,o.isLoading$)&&!o.ignoreLoading),l(3),m("disabled",C(12,13,o.isLoading$)&&!o.ignoreLoading),l(2),m("formControl",o.includeResourcesFormControl),l(),z(C(15,15,o.prompt)),l(3),m("disabled",C(18,17,o.isLoading$)&&!o.ignoreLoading),l(2),j(" ",C(20,19,"action.cancel")," "),l(2),m("disabled",C(22,21,o.isLoading$)&&!o.ignoreLoading),l(2),j(" ",C(24,23,"action.export")," "))},dependencies:[ce,yt,Pe,Se,Jr,ir,gr,Dn,jo,xe,Br,Ve,be],encapsulation:2});let n=t;return n})();y();var J8=(()=>{let t=class t{constructor(e){this.http=e}getCalculatedFieldById(e,i){return this.http.get(`/api/calculatedField/${e}`,N(i))}saveCalculatedField(e,i){return this.http.post("/api/calculatedField",e,N(i))}deleteCalculatedField(e,i){return this.http.delete(`/api/calculatedField/${e}`,N(i))}getCalculatedFields({entityType:e,id:i},o,a){return this.http.get(`/api/${e}/${i}/calculatedFields${o.toQuery()}`,N(a))}testScript(e,i){return this.http.post("/api/calculatedField/testScript",e,N(i))}getLatestCalculatedFieldDebugEvent(e,i){return this.http.get(`/api/calculatedField/${e}/debug`,N(i))}reprocessCalculatedField(e,i,o,a){return this.http.get(`/api/calculatedField/${e}/reprocess?startTs=${i}&endTs=${o}`,N(a))}getLastCalculatedFieldReprocessingJob(e,i){return this.http.get(`/api/calculatedField/${e}/reprocess/job`,N(i))}validateCalculatedFieldReprocessing(e,i){return this.http.get(`/api/calculatedField/${e}/reprocess/validate`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Obe=e7.default,Td=(()=>{let t=class t{constructor(e,i,o,a,s,c,u,f,_,I,S,F,H,q,ee,Ie,He,Le,qe,ue,Ne,st){this.window=e,this.document=i,this.store=o,this.translate=a,this.dashboardService=s,this.dashboardUtils=c,this.widgetService=u,this.deviceProfileService=f,this.assetProfileService=_,this.tenantProfileService=I,this.entityService=S,this.ruleChainService=F,this.converterService=H,this.deviceService=q,this.assetService=ee,this.edgeService=Ie,this.imageService=He,this.utils=Le,this.itembuffer=qe,this.calculatedFieldsService=ue,this.reportTemplateService=Ne,this.dialog=st}exportFormProperties(e,i){this.exportToPc(e,i)}importFormProperties(){return this.openImportDialog("dynamic-form.import-form","dynamic-form.json-file",!0,"dynamic-form.json-content").pipe(W(e=>{if(this.validateImportedFormProperties(e))return e;throw this.store.dispatch(new Sr({message:this.translate.instant("dynamic-form.invalid-form-json-file-error"),type:"error"})),new Error("Invalid form JSON file")}),vt(()=>Z(null)))}exportImage(e,i){this.imageService.exportImage(e,i).subscribe({next:o=>{let a=o.fileName.split(".")[0];this.exportToPc(o,a)},error:o=>{this.handleExportError(o,"image.export-failed-error")}})}importImage(){return this.openImportDialog("image.import-image","image.image-json-file").pi
178pe(Ft(e=>{if(this.validateImportedImage(e))return this.imageService.importImage(e);throw this.store.dispatch(new Sr({message:this.translate.instant("image.invalid-image-json-file-error"),type:"error"})),new Error("Invalid image JSON file")}),vt(()=>Z(null)))}exportReportTemplate(e){this.reportTemplateService.getReportTemplate(e).subscribe({next:i=>{let o=i.name;o=o.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareReportTemplateExport(i),o)},error:i=>{this.handleExportError(i,"report-template.export-failed-error")}})}importReportTemplate(){return this.openImportDialog("report-template.import","report-template.report-template-file").pipe(Ft(e=>{if(this.validateImportedReportTemplate(e))return this.reportTemplateService.saveReportTemplate(this.prepareImport(e));throw this.store.dispatch(new Sr({message:this.translate.instant("report-template.invalid-report-template-file-error"),type:"error"})),new Error("Invalid report template file")}),vt(()=>Z(null)))}exportCalculatedField(e){this.calculatedFieldsService.getCalculatedFieldById(e).subscribe({next:i=>{let o=i.name;o=o.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareCalculatedFieldExport(i),o)},error:i=>{this.handleExportError(i,"calculated-fields.export-failed-error")}})}openCalculatedFieldImportDialog(){return this.openImportDialog("calculated-fields.import","calculated-fields.file").pipe(vt(()=>Z(null)))}exportDashboard(e){this.getIncludeResourcesPreference("includeResourcesInExportDashboard").subscribe(i=>{this.openExportDialog("dashboard.export","dashboard.export-prompt",i).subscribe(o=>{o&&(this.updateUserSettingsIncludeResourcesIfNeeded(i,o.include,"includeResourcesInExportDashboard"),this.dashboardService.exportDashboard(e,o.include).subscribe({next:a=>{let s=a.title;s=s.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareDashboardExport(a),s)},error:a=>{this.handleExportError(a,"dashboard.export-failed-error")}}))})})}importDashboard(e,i,o){return this.openImportDialog("dashboard.import","dashboard.dashboard-file").pipe(Ft(a=>{if(this.validateImportedDashboard(a)){a=this.prepareImport(a),a=this.dashboardUtils.validateAndUpdateDashboard(a),a.customerId=e;let s=null,c=a.configuration.entityAliases;return c&&(s=Object.keys(c)),s&&s.length>0?this.processEntityAliases(c,s).pipe(Ft(u=>Object.keys(u).length>0?i(this.dashboardUtils.getWidgetsArray(a),!1,"dashboard.dashboard-import-missing-aliases-title",u).pipe(Ft(f=>{for(let _ of Object.keys(f))c[_]=f[_];return this.saveImportedDashboard(a,o)})):this.saveImportedDashboard(a,o))):this.saveImportedDashboard(a,o)}else throw this.store.dispatch(new Sr({message:this.translate.instant("dashboard.invalid-dashboard-file-error"),type:"error"})),new Error("Invalid dashboard file")}),vt(()=>Z(null)))}exportWidget(e,i,o,a,s,c){let u=this.itembuffer.prepareWidgetItem(e,i,o,a,c),_=this.widgetService.getWidgetInfoFromCache(a.typeFullFqn).widgetName+(fn(s)?`_${s}`:"");_=_.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareExport(u),_)}importWidget(e,i,o,a,s,c){return this.openImportDialog("dashboard.import-widget","dashboard.widget-file").pipe(Ft(u=>{if(this.validateImportedWidget(u)){let f=this.prepareImport(u.widget);f=this.dashboardUtils.validateAndUpdateWidget(f),f.id=Zr();let _=this.prepareAliasesInfo(u.aliasesInfo),I=u.filtersInfo||{datasourceFilters:{}},S=u.originalColumns,F=u.originalSize,H=_.datasourceAliases;if(H||_.targetDeviceAlias){let q={},ee={},Ie,He,Le;if(H)for(let ue of Object.keys(H))Le=Number(ue),He=this.utils.guid(),ee[He]=Le,q[He]=re({id:He},H[Le]);_.targetDeviceAlias&&(He=this.utils.guid(),Ie=He,q[He]=re({id:He},_.targetDeviceAlias));let qe=Object.keys(q);return qe.length>0?this.processEntityAliases(q,qe).pipe(Ft(ue=>
178{if(Object.keys(ue).length>0)o([f],!1,"dashboard.widget-import-missing-aliases-title",ue).pipe(Ft(Ne=>{for(let st of Object.keys(Ne)){let Ui=Ne[st],Oe;dt(ee[st])?(Oe=ee[st],H[Oe]=Ui):Ie===st&&(_.targetDeviceAlias=Ui)}return this.addImportedWidget(e,i,a,f,_,I,s,c,S,F,u.widgetExportInfo)}));else return this.addImportedWidget(e,i,a,f,_,I,s,c,S,F,u.widgetExportInfo)})):this.addImportedWidget(e,i,a,f,_,I,s,c,S,F,u.widgetExportInfo)}else return this.addImportedWidget(e,i,a,f,_,I,s,c,S,F,u.widgetExportInfo)}else throw this.store.dispatch(new Sr({message:this.translate.instant("dashboard.invalid-widget-file-error"),type:"error"})),new Error("Invalid widget file")}),vt(()=>Z(null)))}exportWidgetType(e){this.getIncludeResourcesPreference("includeResourcesInExportWidgetTypes").subscribe(i=>{this.openExportDialog("widget.export","widget.export-prompt",i).subscribe(o=>{o&&(this.updateUserSettingsIncludeResourcesIfNeeded(i,o.include,"includeResourcesInExportWidgetTypes"),this.widgetService.exportWidgetType(e,o.include).subscribe({next:a=>{let s=a.name;s=s.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareExport(a),s)},error:a=>{this.handleExportError(a,"widget-type.export-failed-error")}}))})})}exportWidgetTypes(e){return this.getIncludeResourcesPreference("includeResourcesInExportWidgetTypes").pipe(Ft(i=>this.openExportDialog("widget.export-widgets","widget.export-widgets-prompt",i).pipe(Ft(o=>{if(o){this.updateUserSettingsIncludeResourcesIfNeeded(i,o.include,"includeResourcesInExportWidgetTypes");let a=[];for(let s of e)a.push(this.widgetService.exportWidgetType(s,o.include));return Rn(a).pipe(W(s=>Object.fromEntries(s.map(c=>{let u=c.name;u=u.toLowerCase().replace(/\W/g,"_")+`.${lN.extension}`;let f=JSON.stringify(this.prepareExport(c),null,2);return[u,f]}))),Ft(s=>this.exportJSZip(s,"widget_types")),vt(s=>{throw this.handleExportError(s,"widget-type.export-failed-error"),s}))}}))))}importWidgetType(){return this.openImportDialog("widget.import","widget-type.widget-file").pipe(Ft(e=>{if(this.validateImportedWidgetTypeDetails(e))return this.widgetService.saveImportedWidgetTypeDetails(this.prepareImport(e));throw this.store.dispatch(new Sr({message:this.translate.instant("widget-type.invalid-widget-file-error"),type:"error"})),new Error("Invalid widget file")}),vt(()=>Z(null)))}exportWidgetsBundle(e){let i={includeBundleWidgetsInExport:this.store.pipe(Aa(CS("includeBundleWidgetsInExport"))).pipe($n(1)),widgetsBundle:this.widgetService.exportWidgetsBundle(e)};Rn(i).subscribe({next:({includeBundleWidgetsInExport:o,widgetsBundle:a})=>{this.handleExportWidgetsBundle(a,o)},error:o=>{this.handleExportError(o,"widgets-bundle.export-failed-error")}})}exportEntity(e){let i=e.id??e.ruleChainId,o=e.name,a;switch(i.entityType){case G.DEVICE_PROFILE:case G.ASSET_PROFILE:a=this.prepareProfileExport(e);break;case G.RULE_CHAIN:Rn([this.ruleChainService.getRuleChainMetadata(i.id),this.ruleChainService.getRuleChain(i.id)]).pipe($n(1),W(([s,c])=>({ruleChain:this.prepareRuleChain(c),metadata:this.prepareRuleChainMetaData(s)}))).subscribe(this.onRuleChainExported());return;case G.WIDGETS_BUNDLE:this.exportSelectedWidgetsBundle(e);return;case G.DASHBOARD:a=this.prepareDashboardExport(e);break;case G.CUSTOMER:o=e.title,a=this.prepareExport(e);break;default:a=this.prepareExport(e)}this.exportToPc(a,o)}exportSelectedWidgetsBundle(e){this.store.pipe(Aa(CS("includeBundleWidgetsInExport"))).pipe($n(1)).subscribe({next:i=>{this.handleExportWidgetsBundle(e,i,!0)},error:i=>{this.handleExportError(i,"widgets-bundle.export-failed-error")}})}handleExportWidgetsBundle(e,i,o){this.openExportDialog("widgets-bundle.export","widgets-bundle.export-widgets-bundle-widgets-prompt",i,o).subscribe(a=>{a&&(this.updateUserSettingsIncludeResourcesIfNeeded(i,a.include,"includeBundleWidgetsInExport"),a.include?this.exportWidgetsBundleWithWidgetTypes(e):this.exportWidgetsBundleWithWidgetTypeFqns(e))})}exportWidgetsBundleWithWidgetTypes(e){this.widgetService.exportBundleWidgetTypesDetails(e.id.id).subscribe({next:i=>{let o={widgetsBundle:this.prepareExport(e),widgetTypes:[]};for(let s of i)o.widgetTypes.push(this.prepareExport(s));let a=e.title;a=a.toLowerCase().replace(/\W/g,"_"),this.exportToPc(o,a)},error:i=>{this.handleExportError(i,"widgets-bundle.export-failed-error")}})}exportWidgetsBundleWithWidgetTypeFqns(e){this.widgetService.getBundleWidgetTypeFqns(e.id.id).subscribe({next:i=>{let o={widgetsBundle:this.prepareExport(e),widgetTypeFqns:i},a=e.title;a=a.toLowerCase().replace(/\W/g,"_"),this.exportToPc(o,a)},error:i=>{this.handleExportError(i,"widgets-bundle.export-failed-error")}})}importWidgetsBundle(){return this.openImportDialog("widgets-bundle.import","widgets-bundle.widgets-bundle-file").pi
178pe(Ft(e=>{if(this.validateImportedWidgetsBundle(e)){let i=this.prepareImport(e.widgetsBundle);return this.widgetService.saveWidgetsBundle(i).pipe(Ft(o=>{if(e.widgetTypes?.length||e.widgetTypeFqns?.length){let a;if(e.widgetTypes?.length){let s=e.widgetTypes,c=[];for(let u of s)c.push(this.widgetService.saveImportedWidgetTypeDetails(this.prepareWidgetType(u,o)));a=Rn(c)}else a=Z([]);return a.pipe(ii(s=>{let c=s.map(u=>u.fqn);return e.widgetTypeFqns?.length&&(c=c.concat(e.widgetTypeFqns)),c.length?this.widgetService.updateWidgetsBundleWidgetFqns(o.id.id,c).pipe(W(()=>o)):Z(o)}))}else return Z(o)}))}else throw this.store.dispatch(new Sr({message:this.translate.instant("widgets-bundle.invalid-widgets-bundle-file-error"),type:"error"})),new Error("Invalid widgets bundle file")}),vt(()=>Z(null)))}prepareWidgetType(e,i){return e.fqn||(e.fqn=`${i.alias}.${e.alias?e.alias:e.name.toLowerCase().replace(/\W/g,"_")}`),e}bulkImportEntities(e,i,o){switch(i){case G.DEVICE:return this.deviceService.bulkImportDevices(e,o);case G.ASSET:return this.assetService.bulkImportAssets(e,o);case G.EDGE:return this.edgeService.bulkImportEdges(e,o)}}importEntities(e,i,o,a,s,c,u){let f=100;f=e.length>f?f:e.length;let _={},I=[];for(let S=0;S<f;S++){let H=this.entityService.saveEntityParameters(i,o,a,e[S],s,u).pipe(et(()=>{c&&c()}));I.push(H)}return Rn(I).pipe(Ft(S=>{for(let F of S)_=this.sumObject(_,F);return e.splice(0,f),e.length?this.importEntities(e,i,o,a,s,c,u).pipe(W(F=>this.sumObject(_,F))):Z(_)}))}exportRuleChain(e){this.ruleChainService.getRuleChain(e).pipe(Ft(i=>this.ruleChainService.getRuleChainMetadata(e).pipe(W(o=>({ruleChain:this.prepareRuleChain(i),metadata:this.prepareRuleChainMetaData(o)}))))).subscribe(this.onRuleChainExported())}onRuleChainExported(){return{next:e=>{let i=e.ruleChain.name;i=i.toLowerCase().replace(/\W/g,"_"),this.exportToPc(e,i)},error:e=>{this.handleExportError(e,"rulechain.export-failed-error")}}}importRuleChain(e){return this.openImportDialog("rulechain.import","rulechain.rulechain-file").pipe(Ft(i=>{if(this.validateImportedRuleChain(i)){if(i.ruleChain.type!==e)throw this.store.dispatch(new Sr({message:this.translate.instant("rulechain.invalid-rulechain-type-error",{expectedRuleChainType:e}),type:"error"})),new Error("Invalid rule chain type");return this.processOldRuleChainConnections(i)}else throw this.store.dispatch(new Sr({message:this.translate.instant("rulechain.invalid-rulechain-file-error"),type:"error"})),new Error("Invalid rule chain file")}),vt(()=>Z(null)))}processOldRuleChainConnections({ruleChain:e,metadata:i}){if(e=this.prepareImport(e),i=Lt(re({},i),{nodes:i.nodes.map(s=>{var c=s,{debugMode:o}=c,a=Zx(c,["debugMode"]);return o?Lt(re({},a),{debugSettings:{failuresEnabled:!0,allEnabled:!0}}):a})}),i.ruleChainConnections){let o=[];for(let a of i.ruleChainConnections)if(a.targetRuleChainId&&a.targetRuleChainId.id){let s={name:"",singletonMode:!1,type:"org.thingsboard.rule.engine.flow.TbRuleChainInputNode",configuration:{ruleChainId:a.targetRuleChainId.id},additionalInfo:a.additionalInfo};o.push(this.ruleChainService.getRuleChain(s.configuration.ruleChainId,{ignoreErrors:!0,ignoreLoading:!0}).pipe(vt(()=>Z({name:"Rule Chain Input"})),W(u=>(s.name=u.name,null))));let c=i.nodes.length;i.nodes.push(s),i.connections.push({toIndex:c,fromIndex:a.fromIndex,type:a.type})}return o.length?Rn(o).pipe(W(()=>({ruleChain:e,metadata:i}))):Z({ruleChain:e,metadata:i})}else return Z({ruleChain:e,metadata:i})}exportConverter(e){this.converterService.getConverter(e).subscribe({next:i=>{i.configuration||(i.configuration={});let o=i.name;o=o.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareExport(i),o)},error:i=>{this.handleExportError(i,"converter.export-failed-error")}})}importConverter(){return this.openImportDialog("converter.import","converter.converter-file").pipe(Ft(e=>{if(this.validateImportedConverter(e))return this.converterService.saveConverter(this.prepareImport(e));throw this.store.dispatch(new Sr({message:this.translate.instant("converter.invalid-converter-file-error"),type:"error"})),new Error("Invalid converter file")}),vt(()=>Z(null)))}exportTenantProfile(e){this.tenantProfileService.getTenantProfile(e).subscribe({next:i=>{let o=i.name;o=o.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareProfileExport(i),o)},error:i=>{this.handleExportError(i,"tenant-profile.export-failed-error")}})}importTenantProfile(){return this.openImportDialog("tenant-profile.import","tenant-profile.tenant-profile-file").pi
178pe(Ft(e=>{if(this.validateImportedTenantProfile(e))return this.tenantProfileService.saveTenantProfile(this.prepareImport(e));throw this.store.dispatch(new Sr({message:this.translate.instant("tenant-profile.invalid-tenant-profile-file-error"),type:"error"})),new Error("Invalid tenant profile file")}),vt(()=>Z(null)))}exportDeviceProfile(e){this.deviceProfileService.exportDeviceProfile(e).subscribe({next:i=>{let o=i.name;o=o.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareProfileExport(i),o)},error:i=>{this.handleExportError(i,"device-profile.export-failed-error")}})}importDeviceProfile(){return this.openImportDialog("device-profile.import","device-profile.device-profile-file").pipe(Ft(e=>{if(this.validateImportedDeviceProfile(e))return this.deviceProfileService.saveDeviceProfile(this.prepareImport(e));throw this.store.dispatch(new Sr({message:this.translate.instant("device-profile.invalid-device-profile-file-error"),type:"error"})),new Error("Invalid device profile file")}),vt(()=>Z(null)))}exportAssetProfile(e){this.assetProfileService.exportAssetProfile(e).subscribe({next:i=>{let o=i.name;o=o.toLowerCase().replace(/\W/g,"_"),this.exportToPc(this.prepareProfileExport(i),o)},error:i=>{this.handleExportError(i,"asset-profile.export-failed-error")}})}importAssetProfile(){return this.openImportDialog("asset-profile.import","asset-profile.asset-profile-file").pipe(Ft(e=>{if(this.validateImportedAssetProfile(e))return this.assetProfileService.saveAssetProfile(this.prepareImport(e));throw this.store.dispatch(new Sr({message:this.translate.instant("asset-profile.invalid-asset-profile-file-error"),type:"error"})),new Error("Invalid asset profile file")}),vt(()=>Z(null)))}processCSVCell(e){if(pl(e)){let i=e.replace(/"/g,'""');return i.search(/([",;\n])/g)>=0&&(i=`"${i}"`),i}return e}exportCsv(e,i){let o,a;e&&e.length?(this.formatDataAccordingToLocale(e),o=Object.keys(e[0]).map(c=>[this.processCSVCell(c)]).join(";"),a=e.map(c=>[Object.keys(c).map(u=>[this.processCSVCell(c[u])]).join(";")]).join(`
179`)):(o="",a="");let s=`${o}
180${a}`;this.downloadFile(s,i,H8)}exportXls(e,i){let o,a;e&&e.length?(this.formatDataAccordingToLocale(e),o=`<tr>${Object.keys(e[0]).map(f=>`<td><b>${f}</b></td>`).join("")}</tr>`,a=e.map(f=>[`<tr>
181                ${Object.keys(f).map(_=>`<td>${f[_]?f[_]:""}</td>`).join("")}
182            </tr>`]).join("")):(o="",a="");let s=`<table>${o}${a}</table>`.trim(),c={title:i,table:s},u=Q8.replace(/{(\w+)}/g,(f,_)=>c[_]);this.downloadFile(u,i,q8)}exportXlsx(e,i,o="yyyy-MM-dd HH:mm:ss"){import("./chunk-XUDYFG2W.js").then(a=>{let s=Jp(a),c=new s.Workbook;c.creator="ThingsBoard, Inc.",c.lastModifiedBy="ThingsBoard, Inc.",c.properties.date1904=!1;let u=c.addWorksheet("Export"),f={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}};if(e&&e.length){let _=Object.keys(e[0]),I=[];_.forEach(S=>{I.push({header:S,key:S,width:(S==="Timestamp"?o.length:S.length)*1.2,style:{numFmt:S==="Timestamp"?o:null}})}),u.columns=I,u.views=[{state:"frozen",xSplit:0,ySplit:1,activeCell:"B1"}],u.getRow(1).eachCell(S=>S.border=f),e.forEach(S=>{S.Timestamp&&(S.Timestamp=Obe(new Date(Date.parse(S.Timestamp))).utcOffset(0,!0).toDate()),u.addRow(S).eachCell({includeEmpty:!0},F=>{F.border=f})})}c.xlsx.writeBuffer().then(_=>{this.downloadFile(_,i,W8)})})}formatDataAccordingToLocale(e){for(let i of e)for(let o in Object.keys(i))mf(i[o])&&(i[o]=i[o].toLocaleString(void 0,{maximumFractionDigits:14}))}validateImportedConverter(e){if(Bi(e.name)||Bi(e.type||Bi(e.configuration))||!ro[e.type])return!1;if(e.type===ro.UPLINK){let i=e.configuration.scriptLang===Ea.JS?"decoder":"tbelDecoder";if(!e.configuration[i]||!e.configuration[i].length)return!1}if(e.type===ro.DOWNLINK){let i=e.configuration.scriptLang===Ea.JS?"encoder":"tbelEncoder";if(!e.configuration[i]||!e.configuration[i].length)return!1}return!0}exportText(e,i){let o=e;Array.isArray(e)&&(o=e.join(`
183`)),this.downloadFile(o,i,U8)}exportJSZip(e,i){let o=new Te;return import("./chunk-62HH7GN6.js").then(a=>{try{let s=new a.default;for(let c in e)if(e.hasOwnProperty(c)){let u=e[c];s.file(c,u)}s.generateAsync({type:"blob"}).then(c=>{this.downloadFile(c,i,Y8),o.next(null)}
183).catch(c=>{o.error(c)})}catch(s){o.error(s)}}),o.asObservable()}prepareRuleChain(e){return e=this.prepareExport(e),e.firstRuleNodeId&&(e.firstRuleNodeId=null),e.root=!1,e}prepareRuleChainMetaData(e){delete e.ruleChainId;for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i];delete o.ruleChainId,e.nodes[i]=this.prepareExport(o)}return e}validateImportedRuleChain(e){return Bi(e.ruleChain)||Bi(e.metadata)||Bi(e.ruleChain.name)?!1:(Bi(e.ruleChain.type)&&(e.ruleChain.type=vd.CORE),!0)}validateImportedDeviceProfile(e){return!(Bi(e.name)||Bi(e.type)||Bi(e.transportType)||Bi(e.provisionType)||Bi(e.profileData))}validateImportedAssetProfile(e){return!Bi(e.name)}validateImportedTenantProfile(e){return dt(e.name)&&dt(e.profileData)&&dt(e.isolatedTbRuleEngine)}sumObject(e,i){return Object.keys(i).map(o=>{Co(i[o])?(e[o]=e[o]||{},e[o]=re(re({},e[o]),this.sumObject(e[o],i[o]))):pl(i[o])?e[o]=(e[o]||"")+`${i[o]}
184`:e[o]=(e[o]||0)+i[o]}),e}handleExportError(e,i){let o=e;o||(o=this.translate.instant("error.unknown-error")),this.store.dispatch(new Sr({message:this.translate.instant(i,{error:o}),type:"error"}))}validateImportedFormProperties(e){return e.length?!e.some(i=>!G5(i)):!1}validateImportedImage(e){return!(!fn(e.data)||!fn(e.title)||!fn(e.fileName)||!fn(e.mediaType)||!fn(e.resourceKey))}validateImportedReportTemplate(e){return!(!fn(e.name)||Bi(e.format)||Bi(e.type)||Bi(e.configuration)||!yd[e.format]||!Oc[e.type]||!e.configuration.format||e.configuration.format!==e.format)}validateImportedDashboard(e){return!(Bi(e.title)||Bi(e.configuration))}validateImportedWidget(e){if(Bi(e.widget)||Bi(e.aliasesInfo)||Bi(e.originalColumns))return!1;let i=e.widget;return!(Bi(i.typeFullFqn)&&(Bi(i.isSystemType)||Bi(i.bundleAlias)||Bi(i.typeAlias))||Bi(i.type))}validateImportedWidgetTypeDetails(e){return!(Bi(e.name)||Bi(e.descriptor))}validateImportedWidgetsBundle(e){if(Bi(e.widgetsBundle)||Bi(e.widgetTypes)&&Bi(e.widgetTypeFqns))return!1;let i=e.widgetsBundle;if(Bi(i.title))return!1;if(dt(e.widgetTypes)){let o=e.widgetTypes;for(let a of o)if(!this.validateImportedWidgetTypeDetails(a))return!1}return!(dt(e.widgetTypeFqns)&&!Array.isArray(e.widgetTypeFqns))}saveImportedDashboard(e,i){return this.dashboardService.saveDashboard(e,i)}addImportedWidget(e,i,o,a,s,c,u,f,_,I,S){return o().pipe(Ft(F=>this.itembuffer.addWidgetToDashboard(e,i,F,a,s,c,u,f,_,I,-1,-1,"default",S).pipe(W(()=>({widget:a,layoutId:F})))))}processEntityAliases(e,i){let o=[];for(let a of i){let s=e[a];o.push(this.entityService.checkEntityAlias(s).pipe(W(c=>{if(!c){let u=Di(s);return u.filter=null,u}return null})))}return Rn(o).pipe(W(a=>{a=a.filter(c=>c!==null);let s={};for(let c of a)s[c.id]=c;return s}))}prepareAliasesInfo(e){let i=e.datasourceAliases;if(i||e.targetDeviceAlias){if(i)for(let o of Object.keys(i)){let a=Number(o);i[a]=this.prepareEntityAlias(i[a])}e.targetDeviceAlias&&(e.targetDeviceAlias=this.prepareEntityAlias(e.targetDeviceAlias))}return e}prepareEntityAlias(e){let i,o;return e.deviceId?(i=e.aliasName,o={type:ht.entityList,entityType:G.DEVICE,entityList:[e.deviceId],resolveMultiple:!1}):e.deviceFilter?(i=e.aliasName,o={type:e.deviceFilter.useFilter?ht.entityName:ht.entityList,entityType:G.DEVICE,resolveMultiple:!1},o.type===ht.entityList?o.entityList=e.deviceFilter.deviceList:o.entityNameFilter=e.deviceFilter.deviceNameFilter):e.entityFilter?(i=e.aliasName,o={type:e.entityFilter.useFilter?ht.entityName:ht.entityList,entityType:e.entityType,resolveMultiple:!1},o.type===ht.entityList?o.entityList=e.entityFilter.entityList:o.entityNameFilter=e.entityFilter.entityNameFilter):(i=e.alias,o=e.filter),{alias:i,filter:o}}prepareDashboardExport(e){return e=this.dashboardUtils.validateAndUpdateDashboard(e),e=this.prepareExport(e),delete e.assignedCustomers,delete e.ownerId,e}prepareExport(e){let i=Di(e);return dt(i.id)&&delete i.id,dt(i.createdTime)&&delete i.createdTime,dt(i.tenantId)&&delete i.tenantId,dt(i.customerId)&&delete i.customerId,dt(i.externalId)&&delete i.externalId,dt(i.version)&&delete i.version,i}prepareImport(e){let i=Di(e);return dt(i.externalId)&&delete i.externalId,i}openImportDialog(e,i,o=!1,a){return this.dialog.open(jv,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{importTitle:e,importFileLabel:i,enableImportFromContent:o,importContentLabel:a}}).afterClosed().pipe(W(s=>{if(s)return s;throw new Error("No file selected!")}))}exportToPc(e,i){if(!e){console.error("No data");return}this.exportJson(e,i)}exportJson(e,i){Co(e)&&(e=JSON.stringify(e,null,2)),this.downloadFile(e,i,lN)}downloadFile(e,i,o){i||(i="download"),i+="."+o.extension;let a=new Blob([e],{type:o.mimeType});if(this.window.navigator&&this.window.navigator.msSaveOrOpenBlob)this.window.navigator.msSaveOrOpenBlob(a,i);else{let s=this.document.createEvent("MouseEvents"),c=this.document.createElement("a");c.download=i,c.href=URL.createObjectURL(a),c.dataset.downloadurl=[o.mimeType,c.download,c.href].join(":"),s.initEvent("click",!0,!1,this.window,0,0,0,0,0,!1,!1,
184!1,!1,0,null),c.dispatchEvent(s)}}prepareProfileExport(e){return e=this.prepareExport(e),e.default=!1,e}prepareCalculatedFieldExport(e){return delete e.entityId,this.prepareExport(e)}prepareReportTemplateExport(e){return e=this.prepareExport(e),delete e.ownerId,e}getIncludeResourcesPreference(e){return this.store.pipe(Aa(CS(e)),$n(1))}openExportDialog(e,i,o,a){return this.dialog.open(B1,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{title:e,prompt:i,include:o,ignoreLoading:a}}).afterClosed()}updateUserSettingsIncludeResourcesIfNeeded(e,i,o){e!==i&&this.store.dispatch(new O4({[o]:i}))}};t.\u0275fac=function(i){return new(i||t)(X(Wr),X(Qi),X(ve),X(Ge),X(lp),X(Dv),X(Cp),X(HI),X(WI),X(QI),X(rr),X(vp),X(NI),X(Mv),X(AI),X($I),X(vl),X(vn),X(G8),X(J8),X(Fv),X(Lr))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();y();function Pbe(n,t){n&1&&O(0,"mat-progress-bar",12)}function Rbe(n,t){n&1&&O(0,"div",13)}function Fbe(n,t){if(n&1){let r=B();d(0,"div",20),v(1,"translate"),d(2,"mat-slide-toggle",21),T("click",function(i){return D(r),M(i.stopPropagation())}),d(3,"div",22),g(4),v(5,"translate"),p()()()}if(n&2){let r=b(2);te("tb-hint-tooltip-icon",C(1,3,"image.embed-to-html-hint")),l(2),m("formControl",r.publicStatusControl),l(2),z(C(5,5,"image.embed-to-html"))}}function Nbe(n,t){n&1&&(d(0,"div",9),g(1,"image.embed-to-html"),p())}function Vbe(n,t){if(n&1&&(O(0,"div",10),v(1,"translate"),O(2,"tb-markdown",11)),n&2){let r=b
184(2);m("innerHTML",C(1,2,"image.embed-to-html-text"),Ut),l(2),m("data",r.embedToHtmlCode())}}function Lbe(n,t){if(n&1&&(d(0,"div",14)(1,"mat-expansion-panel",15)(2,"mat-expansion-panel-header",16)(3,"mat-panel-title"),x(4,Fbe,6,7,"div",17)(5,Nbe,2,0,"div",18),p()(),x(6,Vbe,3,4,"ng-template",19),p()()),n&2){let r=b();l(),m("expanded",r.image.public),l(3),m("ngIf",!r.readonly),l(),m("ngIf",r.readonly)}}var s0=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u){super(e,i,s),this.store=e,this.router=i,this.imageService=o,this.data=a,this.dialogRef=s,this.fb=c,this.destroyRef=u,this.image=this.data.image,this.readonly=this.data.readonly,this.imageChanged=!1,this.publicStatusControl=new Nl(this.image.public)}ngOnInit(){this.readonly||this.publicStatusControl.valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{this.updateImagePublicStatus(e)})}cancel(){this.dialogRef.close(this.imageChanged?this.image:null)}embedToHtmlCode(){return'```html\n<img src="'+this.image.publicLink+'" alt="'+this.image.title.replace(/"/g,"&quot;")+'" />{:copy-code}\n```'}embedToAngularTemplateCode(){return"```html\n<img [src]=\"'"+this.image.link+"' | image | async\" />{:copy-code}\n```"}updateImagePublicStatus(e){this.imageService.updateImagePublicStatus(this.image,e).subscribe(i=>{this.image=i,this.imageChanged=!0})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(vl),h(un),h(en),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-embed-image-dialog"]],features:[Ce],decls:20,vars:14,consts:[["color","primary"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],["class","tb-form-panel stroked tb-slide-toggle",4,"ngIf"],[1,"tb-form-panel","stroked"],["translate","",1,"tb-form-panel-title"],[1,"tb-embed-image-text",3,"innerHTML"],["usePlainMarkdown","","containerClass","tb-embed-image-code",3,"data"],["color","warn","mode","indeterminate"],[2,"height","4px"],[1,"tb-form-panel","stroked","tb-slide-toggle"],["disabled","",1,"tb-settings",3,"expanded"],[1,"flex","flex-row","flex-wrap"],["class","tb-form-row no-border no-padding",3,"tb-hint-tooltip-icon",4,"ngIf"],["class","tb-form-panel-title","translate","",4,"ngIf"],["matExpansionPanelContent",""],[1,"tb-form-row","no-border","no-padding",3,"tb-hint-tooltip-icon"],[1,"mat-slide","flex","items-stretch","justify-center",3,"click","formControl"],[1,"tb-form-panel-title"]],template:function(i,o){i&1&&(d(0,"mat-toolbar",0)(1,"h2"),g(2),v(3,"translate"),p(),O(4,"span",1),d(5,"button",2),T("click",function(){return o.cancel()}),d(6,"mat-icon",3),g(7,"close"),p()()(),x(8,Pbe,1,0,"mat-progress-bar",4),v(9,"async"),x(10,Rbe,1,0,"div",5),v(11,"async"),d(12,"div",6),x(13,Lbe,7,3,"div",7),d(14,"div",8)(15,"div",9),g(16,"image.embed-to-angular-template"),p(),O(17,"div",10),v(18,"translate"),O(19,"tb-markdown",11),p()()),i&2&&(l(2),z(C(3,6,"image.embed-image")),l(6),m("ngIf",C(9,8,o.isLoading$)),l(2),m("ngIf",!C(11,10,o.isLoading$)),l(3),m("ngIf",!o.readonly||o.image.public),l(4),m("innerHTML",C(18,12,"image.embed-to-angular-template-text"),Ut),l(2),m("data",o.embedToAngularTemplateCode()))},dependencies:[ce,jt,Pe,Se,Jr,ir,Dn,jo,Ss,Ts,Bl,ep,xe,Br,qs,Hs,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]{display:flex;width:780px;flex-direction:column;gap:16px}[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]   .tb-embed-image-text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:20px;color:#0000008a;letter-spacing:.2px}[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]   .tb-form-panel-title[_ngcontent-%COMP%]{color:#000000de}[_nghost-%COMP%]     .tb-markdown-view{max-width:700px}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper{padding:0}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper pre[class*=language-]{margin:0;padding:9px 38px 9px 16px}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper code[class*=language-], [_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper pre[class*=language-]{font-size:12px;overflow:hidden;white-space:normal;word-break:break-word}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper button.clipboard-btn{right:0;height:36px}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper button.clipboard-btn p, [_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper button.clipboard-btn div{background:transparent}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper button.clipboard-btn p{margin:0;padding:6px;font-size:14px}[_nghost-%COMP%]     .tb-markdown-view .tb-embed-image-code .code-wrapper button.clipboard-btn div{top:0;padding:8px;height:38px;width:38px}']});let n=t;return n})();function Bbe(n,t){n&1&&O(0,"mat-progress-bar",24)}function jbe(n,t){n&1&&O(0,"div",25)}function Gbe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.name-required")," "))}function zbe(n,t){if(n&1){let r=B();d(0,"button",26),v(1,"translate"),v(2,"async"),T("click",function(){D(r);let i=b();return M(i.revertInfo())}),d(3,"mat-icon"),g(4,"close"),p()()}
184if(n&2){let r=b();te("matTooltip",C(1,2,"action.undo")),m("disabled",C(2,4,r.isLoading$))}}function $be(n,t){if(n&1){let r=B();d(0,"button",27),v(1,"translate"),v(2,"async"),T("click",function(){D(r);let i=b();return M(i.saveInfo())}),d(3,"mat-icon"),g(4,"check"),p()()}if(n&2){let r=b();te("matTooltip",C(1,2,"action.save")),m("disabled",C(2,4,r.isLoading$))}}function Ube(n,t){if(n&1){let r=B();d(0,"button",28),v(1,"async"),T("click",function(i){D(r);let o=b();return M(o.updateImage(i))}),g(2),v(3,"translate"),p()}if(n&2){let r=b();m("disabled",C(1,2,r.isLoading$)),l(2),j(" ",C(3,4,"image.update-image")," ")}}var G1=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f){super(e,i,u),this.store=e,this.router=i,this.imageService=o,this.dialog=a,this.importExportService=s,this.data=c,this.dialogRef=u,this.fb=f,this.imageChanged=!1,this.image=c.image,this.readonly=c.readonly,this.imagePreviewData={url:this.image.link}}ngOnInit(){this.imageFormGroup=this.fb.group({title:[this.image.title,[ke.required]]}),this.data.readonly&&this.imageFormGroup.disable()}cancel(){this.dialogRef.close(this.imageChanged?this.image:null)}revertInfo(){this.imageFormGroup.get("title").setValue(this.image.title),this.imageFormGroup.markAsPristine()}saveInfo(){let e=this.imageFormGroup.get("title").value,i=Lt(re({},this.image),{title:e});this.imageService.updateImageInfo(i).subscribe(o=>{this.image=o,this.imageChanged=!0,this.imageFormGroup.markAsPristine()})}downloadImage(e){e&&e.stopPropagation(),this.imageService.downloadImage(dl(this.image),this.image.resourceKey).subscribe()}exportImage(e){e&&e.stopPropagation(),this.importExportService.exportImage(dl(this.image),this.image.resourceKey)}embedImage(e){e&&e.stopPropagation(),this.dialog.open(s0,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{image:this.image,readonly:this.readonly}}).afterClosed().subscribe(i=>{i&&(this.imageChanged=!0,this.image=i,this.imagePreviewData={url:this.image.public?this.image.publicLink:this.image.link})})}updateImage(e){e&&e.stopPropagation(),this.dialog.open(o0,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{imageSubType:this.image.resourceSubType,image:this.image}}).afterClosed().subscribe(i=>{if(i?.image){this.imageChanged=!0,this.image=i.image;let o;i.image.base64?o=i.image.base64:o=this.image.link,this.imagePreviewData={url:o}}})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(vl),h(Lr),h(Td),h(un),h(en),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-image-dialog"]],features:[Ce],decls:55,vars:45,consts:[[1,"tb-image-dialog",3,"formGroup"],["color","primary"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[3,"disabled"],["translate",""],["matInput","","formControlName","title","required",""],[4,"ngIf"],["matIconSuffix","","type","button","mat-icon-button","","matTooltipPosition","above",3,"disabled","matTooltip","click",4,"ngIf"],["matIconSuffix","","type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"disabled","matTooltip","click",4,"ngIf"],[1,"tb-image-container","tb-primary-fill"],[1,"tb-image-content"],[1,"tb-image-actions"],["type","button","mat-icon-button","","matTooltipPosition","above",3,"click","disabled","matTooltip"],["type","button","mat-flat-button","","color","primary",3,"disabled","click",4,"ngIf"],[1,"tb-image-preview-container"],[1,"tb-image-preview-spacer"],[1,"tb-image-preview",3,"src"],[1,"tb-image-preview-details"],["vertical",""],["color","warn","mode","indeterminate"],[2,"height","4px"],["matIconSuffix","","type","button","mat-icon-button","","matTooltipPosition","above",3,"click","disabled","matTooltip"],["matIconSuffix","","type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"click","disabled","matTooltip"],["type","button","mat-flat-button","","color","primary",3,"click","disabled"]],template:function(i,o){i&1&&(d(0,"form",0)(1,"mat-toolbar",1)(2,"h2"),g(3),v(4,"translate"),p(),O(5,"span",2),d(6,"button",3),T("click",function(){return o.cancel()}),d(7,"mat-icon",4),g(8,"close"),p()()(),x(9,Bbe,1,0,"mat-progress-bar",5),v(10,"async"),x(11,jbe,1,0,"div",6),v(12,"async"),d(13,"div",7)(14,"fieldset",8),v(15,"async"),d(16,"mat-form-field")(17,"mat-label",9),g(18,"image.name"),p(),O(19,"input",10),x(20,Gbe,3,3,"mat-error",11)(21,zbe,5,6,"button",12)(22,$be,5,6,"button",13),p(),d(23,"div",14)(24,"div",15)(25,"div",16)(26,"div",16)(27,"button",17),v(28,"translate"),v(29,"async"),T("click",function(s){return o.downloadImage(s)}),d(30,"mat-icon"),g(31,"file_download"),p()(),d(32,"button",17),v(33,"translate"),v(34,"async"),T("click",function(s){return o.exportImage(s)}),d(35,"tb-icon"),g(36,"mdi:file-export"),p()(),d(37,"button",17),v(38,"translate"),v(39,"async"),T("click",function(s){return o.embedImage(s)}),d(40,"mat-icon"),g(41,"code"),p()()(),x(42,Ube,4,6,"button",18),p(),d(43,"div",19),O(44,"div",20)(45,"img",21),v(46,"image"),v(47,"async"),p(),d(48,"div",22)(49,"div"),g(50),p(),O(51,"mat-divider",23),d(52,"div"),g(53),v(54,"fileSize"),p()()()()()()()),i&2&&(m("formGroup",o.imageFormGroup),l(3),z(C(4,19,o.readonly?"image.image-details":"image.edit-image")),l(6),m("ngIf",C(10,21,o.isLoading$)),l(2),m("ngIf",!C(12,23,o.isLoading$)),l(3),m("disabled",C(15,25,o.isLoading$)),l(6),m("ngIf",o.imageFormGroup.get("title").hasError("required")),l(),m("ngIf",!o.readonly&&o.imageFormGroup.dirty),l(),m("ngIf",!o.readonly&&!o.imageFormGroup.invalid&&o.imageFormGroup.dirty),l(5),te("matTooltip",C(28,27,"image.download-image")),m("disabled",C(29,29,o.isLoading$)),l(5),te("matTooltip",C(33,31,"image.export-image")),m("disabled",C(34,33,o.isLoading$)),l(5),te("matTooltip",C(38,35,"image.embed-image")),m("disabled",C(39,37,o.isLoading$)),l(5),m("ngIf",!o.readonly),l(3),m("src",C(47,41,C(46,39,o.imagePreviewData)),yo),l(5),fa("",o.image.descriptor.width,"x",o.image.descriptor.height,""),l(3),z(C(54,43,o.image.descriptor.size)))},dependencies:[ce,jt,yt,Pe,Se,Jr,at,ze,At,ni,Yt,ir,Dn,zt,la,ur,ut,xe,We,St,$e,Qe,In,Ve,be,ka,Wo],styles:['@charset "UTF-8";@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-image-dialog[_ngcontent-%COMP%]{width:50vh}}[_nghost-%COMP%]   .tb-image-dialog[_ngcontent-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:100%}[_nghost-%COMP%]   .tb-image-dialog[_ngcontent-%COMP%]   fieldset[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]{height:100%;border-radius:4px;border:1px solid rgba(0,0,0,.05);padding:12px;display:flex;flex-direction:column;align-items:flex-start;gap:12px}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:8px}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]   .tb-image-preview-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;border:1px solid rgba(0,0,0,.12);border-radius:4px;background:#fff;display:flex;align-items:center;justify-content:center;z-index:1}@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]   .tb-image-preview-container[_ngcontent-%COMP%]   .tb-image-preview-spacer[_ngcontent-%COMP%]{margin-top:100%}}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]   .tb-image-preview-container[_ngcontent-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]   .tb-image-preview-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#00000061;font-size:14px;font-style:normal;font-weight:400;line-height:20px}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]   .tb-image-preview-details[_ngcontent-%COMP%]   .mat-divider.mat-divider-vertical[_ngcontent-%COMP%]{height:20px}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-content[_ngcontent-%COMP%]   .tb-image-actions[_ngcontent-%COMP%]{display:flex;align-items:center;align-self:stretch;justify-content:space-between;gap:8px;color:#0000008a}']});let n=t;return n})();y();y();var Hbe=n=>
184({entriesList:n,showDetailsLink:!0}),t7=(n,t)=>({entriesList:n,showDetailsLink:t});function qbe(n,t){n&1&&Ti(0)}function Wbe(n,t){if(n&1&&(pt(0),x(1,qbe,1,0,"ng-container",6),ct()),n&2){let r=b(),e=me(4);l(),m("ngTemplateOutlet",e)("ngTemplateOutletContext",Xe(2,Hbe,r.referencedEntitiesList))}}function Ybe(n,t){n&1&&Ti(0)}function Qbe(n,t){if(n&1&&(d(0,"li",10)(1,"div",11),g(2),v(3,"translate"),p(),x(4,Ybe,1,0,"ng-container",6),p()),n&2){let r=b().$implicit;b(3);let e=me(4);l(2),z(C(3,3,"image.system-entities")),l(2),m("ngTemplateOutlet",e)("ngTemplateOutletContext",Yi(5,t7,r[1].entities,r[1].currentHolder))}}function Kbe(n,t){if(n&1&&(d(0,"a",13),g(1),p()),n&2){let r=b(2).$implicit;m("routerLink",r[1].detailsUrl),l(),z(r[1].name)}}function Xbe(n,t){n&1&&Ti(0)}function Zbe(n,t){if(n&1&&(d(0,"li",10)(1,"div",11),g(2),x(3,Kbe,2,2,"a",12),g(4),v(5,"translate"),p(),x(6,Xbe,1,0,"ng-container",6),p()),n&2){let r=b().$implicit,e=b(3),i=me(4);l(2),j(" ",e.holderName(r[0])," "),l(),m("ngIf",!r[1].currentHolder&&r[1].name),l(),j(" ",C(5,5,"image.entities")," "),l(2),m("ngTemplateOutlet",i)("ngTemplateOutletContext",Yi(7,t7,r[1].entities,r[1].currentHolder))}}function Jbe(n,t){if(n&1&&(pt(0),x(1,Qbe,5,8,"li",9)(2,Zbe,7,10,"ng-template",null,3,kt),ct()),n&2){let r=t.$implicit,e=me(3),i=b(3);l(),m("ngIf",i.isSystem(r[0]))("ngIfElse",e)}}function e_e(n,t){if(n&1&&(pt(0),d(1,"ul",7),x(2,Jbe,4,2,"ng-container",8),p(),ct()),n&2){let r=b
184(2);l(2),m("ngForOf",r.referencedEntitiesEntries)}}function t_e(n,t){if(n&1&&x(0,e_e,3,1,"ng-container",5),n&2){let r=b(),e=me(6);m("ngIf",r.contentReady)("ngIfElse",e)}}function i_e(n,t){if(n&1&&(d(0,"a",19),g(1),p()),n&2){let r=b(2).$implicit,e=b(2);m("routerLink",r.detailsUrl)("queryParams",r.queryParams),l(),z(e.getAdminSettingsName(r.entity))}}function n_e(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b(2).$implicit;l(),z(r.entity.name)}}function r_e(n,t){if(n&1&&(pt(0),d(1,"td",15),g(2),p(),d(3,"td",16),x(4,i_e,2,3,"a",17)(5,n_e,2,1,"span",18),p(),ct()),n&2){let r=b().$implicit,e=b().showDetailsLink;l(2),z(r.typeName),l(2),m("ngIf",e),l(),m("ngIf",!e)}}function o_e(n,t){if(n&1&&(d(0,"a",13),g(1),p()),n&2){let r=b(2).$implicit;m("routerLink",r.detailsUrl),l(),z(r.typeName)}}function a_e(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b(2).$implicit;l(),z(r.typeName)}}function s_e(n,t){if(n&1&&(d(0,"td",15),x(1,o_e,2,2,"a",12)(2,a_e,2,1,"span",18),p(),O(3,"td",16)),n&2){let r=b(2).showDetailsLink;l(),m("ngIf",r),l(),m("ngIf",!r)}}function l_e(n,t){if(n&1&&(d(0,"tr"),x(1,r_e,6,3,"ng-container",5)(2,s_e,4,2,"ng-template",null,4,kt),p()),n&2){let r=t.$implicit,e=me(3);l(),m("ngIf",!r.isWl)("ngIfElse",e)}}function c_e(n,t){if(n&1&&(d(0,"table",14),x(1,l_e,4,2,"tr",8),p()),n&2){let r=t.entriesList;l(),m("ngForOf",r)}}function d_e(n,t){n&1&&O(0,"mat-spinner",20),n&2&&m("diameter",32)}var l0=(()=>{let t=class t{constructor(e,i,o,a){this.store=e,this.entityService=i,this.cd=o,this.translate=a,this.contentReady=!1,this.authUser=Mr(this.store),this.simpleList=!0}ngOnInit(){this.hasNotSameAuthLevelEntities(this.references)?(this.simpleList=!1,this.toReferencedEntitiesEntries(this.references).subscribe(e=>{this.referencedEntitiesEntries=e,this.contentReady=!0,this.cd.detectChanges(),this.popoverComponent&&Promise.resolve().then(()=>{this.popoverComponent.updatePosition()})})):(this.referencedEntitiesList=this.toReferencedEntitiesList(this.references),this.contentReady=!0)}isSystem(e){return e.entityType===G.TENANT&&e.id===Oa}holderName(e){return this.translate.instant(e.entityType===G.TENANT?"tenant.tenant":"customer.customer")}hasNotSameAuthLevelEntities(e){let i=this.authUser.authority;return!!(i===Mt.SYS_ADMIN&&e.some(o=>o.tenantId&&o.tenantId.id&&o.tenantId.id!==Oa)||i===Mt.TENANT_ADMIN&&e.some(o=>o.customerId&&o.customerId.id&&o.customerId.id!==Oa)||i===Mt.CUSTOMER_USER&&e.some(o=>this.authUser.customerId!==o.customerId?.id))}getAdminSettingsPageURL(e){let i="/settings/";switch(e.name){case"mail":return i+"outgoing-mail";case"entitiesVersionControl":return i+"repository";case"sms":case"notifications":return i+"notifications";default:return i+"general"}}getAdminSettingsName(e){if(e.id.entityType===G.ADMIN_SETTINGS){let i;switch(e.name){case"mail":i="admin.outgoing-mail-settings";break;case"entitiesVersionControl":i="admin.repository-settings";break;case"sms":case"notifications":i="admin.notifications-settings";break;default:i="admin.general-settings"}return this.translate.instant(i)}return e.name}toReferencedEntitiesList(e){let i=[];for(let o of e)if(o.id){let a=o,s=a.id.entityType,c=this.translate.instant(ta.get(s).type),u,f;switch(s){case G.ADMIN_SETTINGS:u=this.getAdminSettingsPageURL(a);break;case G.AI_MODEL:u="/settings/ai-models",f={textSearch:a.name};break;default:u=ml(a.id.id,s)}i.push({entity:a,typeName:c,detailsUrl:u,queryParams:f,isWl:!1})}else{let a=o,s=this.translate.instant(a.type===J5.GENERAL?"white-labeling.white-labeling":"white-labeling.login-white-labeling"),c=ej.get(a.type);i.push({entity:a,typeName:s,detailsUrl:c,isWl:!0})}return i}toReferencedEntitiesEntries(e){let i={},o=this.toReferencedEntitiesList(e);for(let s of o){let c=s.entity.tenantId?.id||Oa,u=s.entity.customerId?.id||Oa,f="system",_=Oa,I=this.authUser.authority===Mt.SYS_ADMIN;c!==Oa&&(f="tenant",_=c,I=_===this.authUser.tenantId&&this.authUser.authority===Mt.TENANT_ADMIN,u!==Oa&&(f="customer",_=u,I=_===this.authUser.customerId&&this.authUser.authority===Mt.CUSTOMER_USER,_!==this.authUser.customerId&&(f="subCustomer")));let S=i[f];S||(S={},i[f]=S);let F=S[_];F||(F={entities:[],currentHolder:I},S[_]=F),F.entities.push(s)}i=Object.keys(i).sort((s,c)=>s===c?0:s==="system"?-1:s==="tenant"?c==="system"?1:-1:s==="customer"?c==="system"||c==="tenant"?1:-1:1).reduce((s,c)=>(s[c]=i[c],s),{});let a=[];for(let s of Object.keys(i))if(s==="tenant"){if(this.authUser.authority===Mt.SYS_ADMIN){let c=i[s],u=Object.keys(c);a.push(this.entityService.getEntities(G.TENANT,u).pipe(W(f=>{for(let _ of f){let I=c[_.id.id];
184I.name=_.name,I.detailsUrl=ml(_.id.id,G.TENANT)}})))}}else if((s==="customer"||s==="subCustomer")&&(this.authUser.authority===Mt.TENANT_ADMIN||this.authUser.authority===Mt.CUSTOMER_USER)){let c=i[s],u=Object.keys(c);a.push(this.entityService.getEntities(G.CUSTOMER,u).pipe(W(f=>{for(let _ of f){let I=c[_.id.id];I.name=_.name,I.detailsUrl=ml(_.id.id,G.CUSTOMER)}})))}return(a.length?Rn(a):Z(null)).pipe(W(()=>{let s=[];for(let c of Object.keys(i)){let u=Object.entries(i[c]);for(let f of u){let _;c==="system"||c==="tenant"?_=new G4(f[0]):_=new z4(f[0]),s.push([_,f[1]])}}return s}))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(rr),h(Me),h(Ge))},t.\u0275cmp=L({type:t,selectors:[["tb-image-references"]],inputs:{references:"references"},decls:7,vars:2,consts:[["complexEntityReferences",""],["referencesList",""],["loading",""],["holderEntities",""],["whiteLabelEntity",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"tb-references"],[4,"ngFor","ngForOf"],["class","tb-entities-container tb-primary-fill",4,"ngIf","ngIfElse"],[1,"tb-entities-container","tb-primary-fill"],[1,"tb-entities-title"],["class","tb-reference",3,"routerLink",4,"ngIf"],[1,"tb-reference",3,"routerLink"],[1,"tb-entities-list-table"],[1,"tb-entity-type"],[1,"tb-entity-name"],["class","tb-reference",3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[1,"tb-reference",3,"routerLink","queryParams"],["strokeWidth","2",3,"diameter"]],template:function(i,o){if(i&1&&x(0,Wbe,2,4,"ng-container",5)(1,t_e,1,2,"ng-template",null,0,kt)(3,c_e,2,1,"ng-template",null,1,kt)(5,d_e,1,1,"ng-template",null,2,kt),i&2){let a=me(2);m("ngIf",o.simpleList)("ngIfElse",a)}},dependencies:[Ke,ce,fo,ll,Za,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   ul.tb-references[_ngcontent-%COMP%]{padding:0;margin:0;display:flex;flex-direction:column;gap:12px}[_nghost-%COMP%]   li.tb-entities-container[_ngcontent-%COMP%]{padding:8px 12px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;border-radius:8px}[_nghost-%COMP%]   a.tb-reference[_ngcontent-%COMP%]{color:var(--tb-primary-500);font-weight:inherit}[_nghost-%COMP%]   .tb-entities-title[_ngcontent-%COMP%]{display:flex;gap:8px;color:#000000de;font-size:16px;font-style:normal;font-weight:500;line-height:24px;letter-spacing:.25px}[_nghost-%COMP%]   table.tb-entities-list-table[_ngcontent-%COMP%]{position:relative;overflow:hidden;padding:8px 10px 8px 4px;border-radius:4px;background:#fff;align-self:stretch;z-index:1;color:#000000c2}[_nghost-%COMP%]   table.tb-entities-list-table[_ngcontent-%COMP%]:before{display:block;height:auto;content:"";position:absolute;inset:0;border-radius:4px;border:1px solid var(--tb-primary-500);background:transparent;opacity:.4;pointer-events:none}[_nghost-%COMP%]   table.tb-entities-list-table[_ngcontent-%COMP%]   td.tb-entity-type[_ngcontent-%COMP%]{white-space:nowrap;padding-right:20px;font-size:14px;font-style:normal;font-weight:500;line-height:20px;letter-spacing:.25px}[_nghost-%COMP%]   table.tb-entities-list-table[_ngcontent-%COMP%]   td.tb-entity-type[_ngcontent-%COMP%]:before{content:"\\2022";padding-left:8px;padding-right:8px}[_nghost-%COMP%]   table.tb-entities-list-table[_ngcontent-%COMP%]   td.tb-entity-name[_ngcontent-%COMP%]{width:100%;font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.2px}']});let n=t;return n})();var m_e=n=>({multiple:n}),u_e=()=>({preview:!0}),i7=n=>({count:n});function h_e(n,t){if(n&1){let r=B();d(0,"mat-header-cell",22)(1,"mat-checkbox",23),v(2,"async"),v(3,"async"),T("change",function(i){D(r);let o=b(2);return M(i?o.dataSource.masterToggle():null)}),p()()}if(n&2){let r=b(2);l(),m("checked",r.dataSource.selection.hasValue()&&C(2,2,r.dataSource.isAllSelected()))("indeterminate",r.dataSource.selection.hasValue()&&C(3,4,r.dataSource.isAllSelected())===!1)}}function f_e(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"mat-checkbox",24),T("click",function(i){return D(r),M(i.stopPropagation())})("change",function(i){let o=D(r).$implicit,a=b(2);return M(i?a.dataSource.selection.toggle(o):null)}),p()()}if(n&2){let r=t.$implicit,e=b(2);l(),m("checked",e.dataSource.selection.isSelected(r))}}function g_e(n,t){n&1&&O(0,"mat-header-cell",27)}function b_e(n,t){if(n&1&&(d(0,"mat-cell"),O(1,"img",28),v(2,"image"),v(3,"async"),p()),n&2){let r=t.$implicit;l(),te("alt",r.title),m("src",C(3,5,ft(2,2,r.link,hn(7,u_e))),yo)}}function __e(n,t){n&1&&(pt(0,25),x(1,g_e,1,0,"mat-header-cell",26)(2,b_e,4,8,"mat-cell",14),
184ct())}function v_e(n,t){n&1&&(pt(0),g(1),v(2,"translate"),ct()),n&2&&(l(),j(" ",C(2,1,"resource.title")," "))}function y_e(n,t){if(n&1&&(g(0),v(1,"async")),n&2){let r=b(4);j(" ",C(1,1,r.translate.get(r.configuration.selectedText,Xe(3,i7,r.dataSource.selection.selected.length)))," ")}}function C_e(n,t){if(n&1&&(d(0,"mat-header-cell",31),x(1,v_e,3,3,"ng-container",6)(2,y_e,2,5,"ng-template",null,1,kt),p()),n&2){let r=me(3),e=b(3);l(),m("ngIf",e.dataSource.selection.isEmpty())("ngIfElse",r)}}function w_e(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),j(" ",r.title," ")}}function x_e(n,t){n&1&&(pt(0,29),x(1,C_e,4,2,"mat-header-cell",30)(2,w_e,2,1,"mat-cell",14),ct())}function S_e(n,t){n&1&&(pt(0),g(1),v(2,"translate"),ct()),n&2&&(l(),j(" ",C(2,1,"secret-storage.name")," "))}function T_e(n,t){if(n&1&&(g(0),v(1,"async")),n&2){let r=b(4);j(" ",C(1,1,r.translate.get(r.configuration.selectedText,Xe(3,i7,r.dataSource.selection.selected.length)))," ")}}function E_e(n,t){if(n&1&&(d(0,"mat-header-cell",31),x(1,S_e,3,3,"ng-container",6)(2,T_e,2,5,"ng-template",null,1,kt),p()),n&2){let r=me(3),e=b(3);l(),m("ngIf",e.dataSource.selection.isEmpty())("ngIfElse",r)}}function I_e(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),j(" ",r.name," ")}}function k_e(n,t){n&1&&(pt(0,32),x(1,E_e,4,2,"mat-header-cell",30)(2,I_e,2,1,"mat-cell",14),ct())}function D_e(n,t){n&1&&O(0,"mat-header-cell")}function M_e(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"button",33,2),T("click",function(i){let o=D(r).$implicit,a=me(2),s=b(2);return M(s.toggleShowReferences(i,o,a))}),g(3),v(4,"translate"),p()()}n&2&&(l(3),z(C(4,1,"image.references")))}function A_e(n,t){n&1&&O(0,"mat-header-row",34)}function O_e(n,t){if(n&1&&O(0,"mat-row",34),n&2){let r=t.$implicit,e=b(2);Y("mat-selected",e.dataSource.selection.isSelected(r))}}function P_e(n,t){if(n&1&&(pt(0),d(1,"div",10)(2,"table",11),pt(3,12),x(4,h_e,4,6,"mat-header-cell",13)(5,f_e,2,1,"mat-cell",14),ct(),x(6,__e,3,0,"ng-container",15)(7,x_e,3,0,"ng-container",16)(8,k_e,3,0,"ng-container",17),pt(9,18),x(10,D_e,1,0,"mat-header-cell",19)(11,M_e,5,3,"mat-cell",14),ct(),x(12,A_e,1,0,"mat-header-row",20)(13,O_e,1,2,"mat-row",21),p()(),ct()),n&2){let r=b
184();l(2),m("dataSource",r.dataSource),l(4),m("ngIf",r.displayPreview),l(),m("ngIf",r.displayTitle),l(),m("ngIf",r.displayName),l(4),m("matHeaderRowDef",r.configuration.columns)("matHeaderRowDefSticky",!0),l(),m("matRowDefColumns",r.configuration.columns)}}function R_e(n,t){if(n&1){let r=B();d(0,"button",35),T("click",function(){D(r);let i=b();return M(i.delete())}),g(1),v(2,"translate"),p()}if(n&2){let r=b();m("disabled",r.data.multiple&&r.dataSource.selection.isEmpty()),l(),j(" ",C(2,2,r.data.multiple?"action.delete-selected":"action.delete-anyway")," ")}}function F_e(n,t){if(n&1&&(O(0,"tb-image-references",36)(1,"div",5),v(2,"translate"),v(3,"safe")),n&2){let r=b();m("references",r.references),l(),m("innerHTML",ft(3,4,C(2,2,r.configuration.deleteText),"html"),Ut)}}var Gv=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.translate=s,this.renderer=c,this.viewContainerRef=u,this.popoverService=f,this.allowForceDelete=!0}ngOnInit(){this.configuration=this.data.configuration,this.displayPreview=this.data.configuration.columns.includes("preview"),this.displayTitle=this.data.configuration.columns.includes("title"),this.displayName=this.data.configuration.columns.includes("name"),dt(this.data?.allowForceDelete)&&(this.allowForceDelete=this.data.allowForceDelete),this.data.multiple?this.dataSource=this.data.configuration.datasource:this.references=this.data.resources[0].references}cancel(){this.dialogRef.close(null)}delete(){this.data.multiple?this.dialogRef.close(this.dataSource.selection.selected):this.dialogRef.close(this.data.resources)}toggleShowReferences(e,i,o){e&&e.stopPropagation();let a=o._elementRef.nativeElement;if(this.popoverService.hasPopover(a))this.popoverService.hidePopover(a);else{let s=this.popoverService.displayPopover(a,this.renderer,this.viewContainerRef,l0,"top",!0,null,{references:i.references},{},{},{},!1,c=>{let u=c?"mdc-button--unelevated mat-mdc-unelevated-button":"mdc-button--outlined mat-mdc-outlined-button",f=c?"mdc-button--outlined mat-mdc-outlined-button":"mdc-button--unelevated mat-mdc-unelevated-button";u.split(" ").forEach(_=>{this.renderer.addClass(a,_)}),f.split(" ").forEach(_=>{this.renderer.removeClass(a,_)})});s.tbComponentRef.instance.popoverComponent=s}}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en),h(Ge),h(Ni),h(ci),h(Fa))},t.\u0275cmp=L({type:t,selectors:[["tb-resources-in-use-dialog"]],features:[Ce],decls:13,vars:15,consts:[["singleResourceReferences",""],["selectedResources",""],["showReferencesButton",""],["mat-dialog-title","","translate",""],["mat-dialog-content","",1,"tb-resources-in-use-content"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary",3,"click"],["mat-raised-button","","color","accent",3,"disabled","click",4,"ngIf"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","select","sticky",""],["style","width: 30px;",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","preview",4,"ngIf"],["matColumnDef","title",4,"ngIf"],["matColumnDef","name",4,"ngIf"],["matColumnDef","references"],[4,"matHeaderCellDef"],["class","mat-row-select",4,"matHeaderRowDef","matHeaderRowDefSticky"],["class","mat-row-select",3,"mat-selected",4,"matRowDef","matRowDefColumns"],[2,"width","30px"],[3,"change","checked","indeterminate"],[3,"click","change","checked"],["matColumnDef","preview"],["style","width: 50px; min-width: 50px;",4,"matHeaderCellDef"],[2,"width","50px","min-width","50px"],[1,"tb-image-preview",3,"src","alt"],["matColumnDef","title"],["style","width: 100%;",4,"matHeaderCellDef"],[2,"width","100%"],["matColumnDef","name"],["mat-stroked-button","","color","primary",3,"click"],[1,"mat-row-select"],["mat-raised-button","","color","accent",3,"click","disabled"],[3,"references"]],template:function(i,o){if(i&1){let a=B();d(0,"h2",3),g(1),p(),d(2,"div",4),O(3,"div",5),v(4,"safe"),x(5,P_e,14,7,"ng-container",6),p(),d(6,"div",7)(7,"button",8),T("click",function(){return D(a),M(o.cancel())}),g(8),v(9,"translate"),p(),x(10,R_e,3,4,"button",9),p(),x(11,F_e,4,7,"ng-template",null,0,kt)}if(i&2){let a=me(12);
184l(),z(o.configuration.title),l(),bt(Xe(13,m_e,o.data.multiple)),l(),m("innerHTML",ft(4,8,o.configuration.message,"html"),Ut),l(2),m("ngIf",o.data.multiple)("ngIfElse",a),l(3),z(C(9,11,"action.cancel")),l(2),m("ngIf",o.allowForceDelete)}},dependencies:[ce,jt,yt,ra,Mu,gr,Dn,id,_c,nd,vc,bc,rd,yc,Cc,od,ad,l0,Ve,be,Wo,mc],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-resources-in-use-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}[_nghost-%COMP%]   .tb-resources-in-use-content.multiple[_ngcontent-%COMP%]{gap:16px}[_nghost-%COMP%]   .tb-resources-in-use-content[_ngcontent-%COMP%]   .table-container[_ngcontent-%COMP%]{overflow:auto}[_nghost-%COMP%]   .tb-resources-in-use-content[_ngcontent-%COMP%]   .table-container[_ngcontent-%COMP%]   .mat-mdc-cell.mat-column-preview[_ngcontent-%COMP%]{width:50px;height:50px;padding:2px 12px;display:block}[_nghost-%COMP%]   .tb-resources-in-use-content[_ngcontent-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain;border-radius:4px}']});let n=t;return n})();y();var zv=class{constructor(t,r,e){this.imageService=t,this.images=r,this.selectionEnabledFunction=e,this.selection=new Wc(!0,[]),this.dataLoading=!0,this.images&&this.images.length?this.entitiesSubject=new Gn(this.images):(this.entitiesSubject=new Gn([]),this.pageDataSubject=ne
184w Gn(yr()),this.pageData$=this.pageDataSubject.asObservable())}connect(t){return this.entitiesSubject.asObservable()}disconnect(t){this.entitiesSubject.complete(),this.pageDataSubject&&this.pageDataSubject.complete()}reset(){this.entitiesSubject.next([]),this.pageDataSubject&&this.pageDataSubject.next(yr())}loadEntities(t,r,e=!1){this.dataLoading=!0;let i=new or;return this.fetchEntities(t,r,e).pipe(et(()=>{this.selection.clear()}),vt(()=>Z(yr()))).subscribe(o=>{this.entitiesSubject.next(o.data),this.pageDataSubject.next(o),i.next(o),this.dataLoading=!1}),i}fetchEntities(t,r,e=!1){return this.imageService.getImages(t,e,r)}isAllSelected(){let t=this.selection.selected.length;return this.entitiesSubject.pipe(W(r=>t===r.length))}isEmpty(){return this.entitiesSubject.pipe(W(t=>!t.length))}total(){return this.pageDataSubject.pipe(W(t=>t.totalElements))}masterToggle(){this.entitiesSubject.pipe(et(t=>{this.selection.selected.length===this.selectableEntitiesCount(t)?this.selection.clear():t.forEach(e=>{this.selectionEnabledFunction(e)&&this.selection.select(e)})}),$n(1)).subscribe()}selectableEntitiesCount(t){return t.filter(r=>this.selectionEnabledFunction(r)).length}};var N_e=["searchInput"],V_e=n=>({count:n}),n7=()=>({preview:!0});function L_e(n,t){n&1&&O(0,"div",32)}function B_e(n,t){if(n&1){let r=B();d(0,"mat-slide-toggle",33),T("ngModelChange",function(i){D(r);let o=b();return M(o.includeSystemImagesChanged(i))}),g(1),v(2,"translate"),p()}if(n&2){let r=b();m("ngModel",r.includeSystemImages),l(),z(C(2,2,r.isScada?"scada.include-system-symbols":"image.include-system-images"))}}function j_e(n,t){if(n&1){let r=B();d(0,"mat-slide-toggle",34),T("ngModelChange",function(i){D(r);let o=b();return M(o.includeSystemImagesChanged(i))}),g(1),v(2,"translate"),p()}if(n&2){let r=b();m("ngModel",r.includeSystemImages),l(),z(C(2,2,r.isScada?"scada.include-system-symbols":"image.include-system-images"))}}function G_e(n,t){if(n&1){let r=B();d(0,"mat-header-cell",62)(1,"mat-checkbox",63),v(2,"async"),v(3,"async"),T("change",function(i){D(r);let o=b(2);return M(i?o.dataSource.masterToggle():null)}),p()()}if(n&2){let r=b(2);l(),m("checked",r.dataSource.selection.hasValue()&&C(2,2,r.dataSource.isAllSelected()))("indeterminate",r.dataSource.selection.hasValue()&&C(3,4,r.dataSource.isAllSelected())===!1)}}function z_e(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"mat-checkbox",64),T("click",function(i){return D(r),M(i.stopPropagation())})("change",function(i){let o=D(r).$implicit,a=b(2);return M(i?a.dataSource.selection.toggle(o):null)}),p()()}if(n&2){let r=t.$implicit,e=b(2);l(),Y("!hidden",!e.deleteEnabled(r)),m("checked",e.dataSource.selection.isSelected(r))}}function $_e(n,t){n&1&&O(0,"mat-header-cell",65)}function U_e(n,t){if(n&1&&(d(0,"mat-cell")(1,"div",66),O(2,"img",67),v(3,"image"),v(4,"async"),p()()),n&2){let r=t.$implicit;l(2),te("alt",r.title),m("src",C(4,5,ft(3,2,r.link,hn(7,n7))),yo)}}function H_e(n,t){n&1&&(d(0,"mat-header-cell",68),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.name")," "))}function q_e(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),j(" ",r.title," ")}}function W_e(n,t){n&1&&(d(0,"mat-header-cell",69),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.created-time")," "))}function Y_e(n,t){if(n&1&&(d(0,"mat-cell"),g(1),v(2,"date"),p()),n&2){let r=t.$implicit;l(),j(" ",ft(2,1,r.createdTime,"yyyy-MM-dd HH:mm:ss")," ")}}function Q_e(n,t){n&1&&(d(0,"mat-header-cell",70),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.resolution")," "))}function K_e(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),fa(" ",r.descriptor.width,"x",r.descriptor.height," ")}}function X_e(n,t){n&1&&(d(0,"mat-header-cell",70),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.size")," "))}function Z_e(n,t){if(n&1&&(d(0,"mat-cell"),g(1),v(2,"fileSize"),p()),n&2){let r=t.$implicit;l(),j(" ",C(2,1,r.descriptor.size)," ")}}function J_e(n,t){n&1&&(d(0,"mat-header-cell",71),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"image.system")," "))}function eve(n,t){if(n&1&&(d(0,"mat-cell")(1,"mat-icon",72),g(2),p()()),n&2){let r=t.$implicit,e=b(2);l(2),z(e.isSystem(r)?"check_box":"check_box_outline_blank")}}
184function tve(n,t){if(n&1&&O(0,"mat-header-cell"),n&2){let r=b(2);Y("gt-md:min-w-60",!r.isScada)("gt-md:max-w-60",!r.isScada)("gt-md:w-60",!r.isScada)("gt-md:min-w-48",r.isScada)("gt-md:max-w-48",r.isScada)("gt-md:w-48",r.isScada)}}function ive(n,t){if(n&1){let r=B();d(0,"button",21),v(1,"translate"),v(2,"async"),T("click",function(i){D(r);let o=b().$implicit,a=b(2);return M(a.embedImage(i,o))}),d(3,"mat-icon"),g(4,"code"),p()()}if(n&2){let r=b(3);te("matTooltip",C(1,2,"image.embed-image")),m("disabled",C(2,4,r.isLoading$))}}function nve(n,t){if(n&1){let r=B();d(0,"button",79),v(1,"async"),T("click",function(i){D(r);let o=b().$implicit,a=b(2);return M(a.embedImage(i,o))}),d(2,"mat-icon"),g(3,"code"),p(),d(4,"span"),g(5),v(6,"translate"),p()()}if(n&2){let r=b(3);m("disabled",C(1,2,r.isLoading$)),l(5),z(C(6,4,"image.embed-image"))}}function rve(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"div",73)(2,"button",21),v(3,"translate"),v(4,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.downloadImage(i,o))}),d(5,"mat-icon"),g(6,"file_download"),p()(),d(7,"button",21),v(8,"translate"),v(9,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.exportImage(i,o))}),d(10,"tb-icon"),g(11,"mdi:file-export"),p()(),x(12,ive,5,6,"button",74),d(13,"button",21),v(14,"translate"),v(15,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.editImage(i,o))}),d(16,"mat-icon"),g(17,"edit"),p()(),d(18,"button",21),v(19,"translate"),v(20,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.deleteImage(i,o))}),d(21,"mat-icon"),g(22,"delete"),p()()(),d(23,"div",75)(24,"button",76),T("click",function(i){return D(r),M(i.stopPropagation())}),d(25,"mat-icon",77),g(26,"more_vert"),p()(),d(27,"mat-menu",78,5)(29,"button",79),v(30,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.downloadImage(i,o))}),d(31,"mat-icon"),g(32,"file_download"),p(),d(33,"span"),g(34),v(35,"translate"),p()(),d(36,"button",79),v(37,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.exportImage(i,o))}),d(38,"tb-icon",80),g(39,"mdi:file-export"),p(),d(40,"span"),g(41),v(42,"translate"),p()(),x(43,nve,7,6,"button",81),d(44,"button",79),v(45,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.editImage(i,o))}),d(46,"mat-icon"),g(47,"edit"),p(),d(48,"span"),g(49),v(50,"translate"),p()(),d(51,"button",79),v(52,"async"),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.deleteImage(i,o))}),d(53,"mat-icon"),g(54,"delete"),p(),d(55,"span"),g(56),v(57,"translate"),p()()()()()}if(n&2){let r=t.$implicit,e=me(28),i=b(2);Y("gt-md:min-w-60",!i.isScada)("gt-md:max-w-60",!i.isScada)("gt-md:w-60",!i.isScada)("gt-md:min-w-48",i.isScada)("gt-md:max-w-48",i.isScada)("gt-md:w-48",i.isScada),l(2),te("matTooltip",C(3,33,i.isScada?"scada.download-symbol":"image.download-image")),m("disabled",C(4,35,i.isLoading$)),l(5),te("matTooltip",C(8,37,i.isScada?"scada.export-symbol":"image.export-image")),m("disabled",C(9,39,i.isLoading$)),l(5),m("ngIf",!i.isScada),l(),te("matTooltip",C(14,41,i.readonly(r)?i.isScada?"scada.symbol-details":"image.image-details":i.isScada?"scada.edit-symbol":"image.edit-image")),m("disabled",C(15,43,i.isLoading$)),l(5),te("matTooltip",C(19,45,i.isScada?"scada.delete-symbol":"image.delete-image")),m("disabled",C(20,47,i.isLoading$)||!i.deleteEnabled(r)),l(6),m("matMenuTriggerFor",e),l(5),m("disabled",C(30,49,i.isLoading$)),l(5),z(C(35,51,i.isScada?"scada.download-symbol":"image.download-image")),l(2),m("disabled",C(37,53,i.isLoading$)),l(5),z(C(42,55,i.isScada?"scada.export-symbol":"image.export-image")),l(2),m("ngIf",!i.isScada),l(),m("disabled",C(45,57,i.isLoading$)),l(5),z(C(50,59,i.readonly(r)?i.isScada?"scada.symbol-details":"image.image-details":i.isScada?"scada.edit-symbol":"image.edit-image")),l(2),Y("!hidden",!i.deleteEnabled(r)),m("disabled",C(52,61,i.isLoading$)),l(5),z(C(57,63,i.isScada?"scada.delete-symbol":"image.delete-image"))}}function ove(n,t){n&1&&O(0,"mat-header-cell")}function ave(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"button",82),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.selectImage(i,o))}),g(2),v(3,"translate"),p()()}n&2&&(l(2),z(C(3,1,"action.select")))}function sve(n,t){n&1&&O(0,"mat-header-row",83)}function lve(n,t){if(n&1){let r=B();d(0,"mat-row",84),T("click",function(i){let o=D(r).$implicit,a=b(2);return M(a.rowClick(i,o))}),p()}if(n&2){let r=t.$implicit,e=b(2);Y("!hidden",e.dataSource.dataLoading)("mat-selected",e.dataSource.selection.isSelected(r))}}function cve(n,t){n&1&&Ti(0)}function dve(n,t){if(n&1&&(pt(0),x(1,cve,1,0,"ng-container",85),ct()),n&2){b(2);let r=me(82);l(),m("ngTemplateOutlet",r)}}function pve(n,t){if(n&1&&(d(0,"div",35)(1,"div",36)(2,"table",37),pt(3,38),x(4,G_e,4,6,"mat-header-cell",39)(5,z_e,2,3,"mat-cell",40),ct(),pt(6,41),x(7,$_e,1,0,"mat-header-cell",42)(8,U_e,5,8,"mat-cell",40),ct(),pt(9,43),x(10,H_e,3,3,"mat-header-cell",44)(11,q_e,2,1,"mat-cell",40),ct(),pt(12,45),x(13,W_e,3,3,"mat-header-cell",46)(14,Y_e,3,4,"mat-cell",40),ct(),pt(15,47),x(16,Q_e,3,3,"mat-header-cell",48)(17,K_e,2,2,"mat-cell",40),ct(),pt(18,49),x(19,X_e,3,3,"mat-header-cell",48)(20,Z_e,3,3,"mat-cell",40),ct(),pt(21,50),x(22,J_e,3,3,"mat-header-cell",51)(23,eve,3,1,"mat-cell",40),ct(),pt(24,52),x(25,tve,1,12,"mat-header-cell",53)(26,rve,58,65,"mat-cell",54),ct(),pt(27,55),x(28,ove,1,0,"mat-header-cell",56)(29,ave,4,3,"mat-cell",40),ct(),x(30,sve,1,0,"mat-header-row",57)(31,lve,1,4,"mat-row",58),p(),x(32,dve,2,1,"ng-container",59),v(33,"async"),d(34,"span",60),g(35),v(36,"translate"),p()(),O(37,"mat-divider")(38,"mat-paginator",61),v(39,"async"),p()),n&2){let r=b
184();l(2),m("dataSource",r.dataSource)("trackBy",r.trackByEntity)("matSortActive",r.pageLink.sortOrder.property)("matSortDirection",r.pageLink.sortDirection()),l(28),m("matHeaderRowDef",r.displayedColumns)("matHeaderRowDefSticky",!0),l(),m("matRowDefColumns",r.displayedColumns),l(),m("ngIf",C(33,16,r.dataSource.isEmpty())&&!r.dataSource.dataLoading),l(2),Y("!hidden",!r.dataSource.dataLoading),l(),z(C(36,18,"common.loading")),l(3),m("length",C(39,20,r.dataSource.total()))("pageIndex",r.pageLink.page)("pageSize",r.pageLink.pageSize)("pageSizeOptions",r.pageSizeOptions)("hidePageSize",r.hidePageSize)}}function mve(n,t){if(n&1&&(d(0,"div",86),O(1,"tb-scroll-grid",87),p()),n&2){let r=b(),e=me(80),i=me(82),o=me(84),a=me(86);Y("mat-padding",!r.dialogMode),l(),m("columns",r.gridColumns)("itemSize",r.gridImagesItemSizeStrategy)("fetchFunction",r.gridImagesFetchFunction)("filter",r.gridImagesFilter)("itemCard",o)("loadingCell",a)("dataLoading",e)("noData",i)}}function uve(n,t){n&1&&(d(0,"div",88)(1,"span"),g(2),v(3,"translate"),p()()),n&2&&(l(2),j(" ",C(3,1,"common.loading")," "))}function hve(n,t){if(n&1&&(d(0,"div",89),O(1,"div",90),d(2,"div",91),g(3),v(4,"translate"),p()()),n&2){let r=b
184();l(3),z(C(4,1,r.isScada?"scada.no-symbols":"image.no-images"))}}function fve(n,t){if(n&1){let r=B();d(0,"button",21),v(1,"translate"),v(2,"async"),T("click",function(i){D(r);let o=b(2),a=o.item,s=o.itemIndex,c=b();return M(c.embedImage(i,a,s))}),d(3,"mat-icon"),g(4,"code"),p()()}if(n&2){let r=b(3);te("matTooltip",C(1,2,"image.embed-image")),m("disabled",C(2,4,r.isLoading$))}}function gve(n,t){if(n&1){let r=B();d(0,"button",21),v(1,"translate"),v(2,"async"),T("click",function(i){D(r);let o=b(2),a=o.item,s=o.itemIndex,c=b();return M(c.deleteImage(i,a,s))}),d(3,"mat-icon"),g(4,"delete"),p()()}if(n&2){let r=b(3);te("matTooltip",C(1,2,r.isScada?"scada.delete-symbol":"image.delete-image")),m("disabled",C(2,4,r.isLoading$))}}function bve(n,t){if(n&1){let r=B();d(0,"div",105)(1,"button",21),v(2,"translate"),v(3,"async"),T("click",function(i){D(r);let o=b().item,a=b();return M(a.downloadImage(i,o))}),d(4,"mat-icon"),g(5,"file_download"),p()(),d(6,"button",21),v(7,"translate"),v(8,"async"),T("click",function(i){D(r);let o=b().item,a=b();return M(a.exportImage(i,o))}),d(9,"tb-icon"),g(10,"mdi:file-export"),p()(),x(11,fve,5,6,"button",74)(12,gve,5,6,"button",74),p()}if(n&2){let r=b().item,e=b();l(),te("matTooltip",C(2,6,e.isScada?"scada.download-symbol":"image.download-image")),m("disabled",C(3,8,e.isLoading$)),l(5),te("matTooltip",C(7,10,e.isScada?"scada.export-symbol":"image.export-image")),m("disabled",C(8,12,e.isLoading$)),l(5),m("ngIf",!e.isScada),l(),m("ngIf",e.deleteEnabled(r))}}function _ve(n,t){if(n&1){let r=B();d(0,"button",106),T("click",function(i){D(r);let o=b(),a=o.item,s=o.itemIndex,c=b();return M(c.editImage(i,a,s))}),g(1),v(2,"translate"),p()}if(n&2){let r=b().item,e=b();l(),j(" ",C(2,1,e.readonly(r)?e.isScada?"scada.symbol-details":"image.image-details":e.isScada?"scada.edit-symbol":"image.edit-image")," ")}}function vve(n,t){if(n&1){let r=B();d(0,"button",106),T("click",function(i){D(r);let o=b().item,a=b();return M(a.selectImage(i,o))}),g(1),v(2,"translate"),p()}n&2&&(l(),j("",C(2,1,"action.select")," "))}function yve(n,t){n&1&&(d(0,"div",107),g(1,"sys"),p())}function Cve(n,t){if(n&1){let r=B();d(0,"div",92)(1,"div",93),x(2,bve,13,14,"div",94),p(),d(3,"div",95)(4,"div",96),T("click",function(i){let o=D(r).item,a=b();return M(a.selectionMode&&a.selectImage(i,o))}),x(5,_ve,3,3,"button",97)(6,vve,3,3,"button",97),p(),O(7,"div",98)(8,"img",67),v(9,"image"),v(10,"async"),p(),d(11,"div",99)(12,"div",100)(13,"div",101),g(14),p(),x(15,yve,2,0,"div",102),p(),d(16,"div",103)(17,"div"),g(18),p(),O(19,"mat-divider",104),d(20,"div"),g(21),v(22,"fileSize"),p()()()()}if(n&2){let r=t.item,e=b();l(2),m("ngIf",!e.selectionMode),l(3),m("ngIf",!e.selectionMode),l(),m("ngIf",e.selectionMode),l(2),te("alt",r.title),m("src",C(10,13,ft(9,10,r.link,hn(17,n7))),yo),l(6),j(" ",r.title," "),l(),m("ngIf",e.isSystem(r)),l(3),fa("",r.descriptor.width,"x",r.descriptor.height,""),l(3),z(C(22,15,r.descriptor.size))}}function wve(n,t){n&1&&(d(0,"div",108)(1,"div",95),O(2,"div",98)(3,"div",109),p(),O(4,"div",99),p())}var xve={columns:2,breakpoints:{"screen and (min-width: 2320px)":10,"screen and (min-width: 2000px)":8,"gt-lg":7,"screen and (min-width: 1600px)":6,"gt-md":5,"screen and (min-width: 1120px)":4,"gt-xs":3}},Sve={columns:2,breakpoints:{"gt-md":4,"gt-xs":3}},$v=class $v extends sn{get isScada(){return this.imageSubType===za.SCADA_SYMBOL}constructor(t,r,e,i,o,a,s,c,u,f,_,I){super(t),this.store=t,this.route=r,this.router=e,this.dialog=i,this.translate=o,this.imageService=a,this.dialogService=s,this.importExportService=c,this.elementRef=u,this.cd=f,this.fb=_,this.zone=I,this.display="block",this.width="100%",this.height="100%",this.pageMode=!0,this.dialogMode=!1,this.imageSubType=za.IMAGE,this.mode="list",this.selectionMode=!1,this.imageSelected=new J,this.defaultPageSize=10,this.defaultSortOrder={property:"createdTime",direction:Xn.DESC},this.hidePageSize=!1,this.textSearchMode=!1,this.textSearch=this.fb.control("",{nonNullable:!0}),this.includeSystemImages=!1,this.gridImagesFilter={search:"",includeSystemImages:!1},this.gridImagesItemSizeStrategy={defaultItemSize:200,itemSizeFunction:S=>S+72},this.authUser=Mr(this.store),this.destroy$=new Te,this.gridImagesFetchFunction=(S,F,H)=>{let q=new On(S,F,H.search,{property:"createdTime",direction:Xn.DESC});return this.imageService.getImages(q,H.includeSystemImages,this.imageSubType)}}ngOnInit(){this.gridColumns=this.dialogMode?Sve:xve,this.displayedColumns=this.computeDisplayedColumns();let t=this.defaultSortOrder;this.pageSizeOptions=[this.defaultPageSize,this.defaultPageSize*2,this.defaultPageSize*3];
184let r=this.route.snapshot.queryParams;if(this.pageMode&&(this.imageSubType=this.route.snapshot.data.imageSubType||za.IMAGE,(r.hasOwnProperty("direction")||r.hasOwnProperty("property"))&&(t={property:r?.property||this.defaultSortOrder.property,direction:r?.direction||this.defaultSortOrder.direction})),this.pageLink=new On(this.defaultPageSize,0,null,t),this.pageMode){r.hasOwnProperty("page")&&(this.pageLink.page=Number(r.page)),r.hasOwnProperty("pageSize")&&(this.pageLink.pageSize=Number(r.pageSize));let e=r.textSearch;if(fn(e)){let i=decodeURI(e);this.textSearchMode=!0,this.pageLink.textSearch=i.trim(),this.textSearch.setValue(i,{emitEvent:!1})}}this.mode==="list"&&(this.dataSource=new zv(this.imageService,null,e=>this.deleteEnabled(e)))}ngOnDestroy(){this.widgetResize$&&this.widgetResize$.disconnect(),this.destroyListMode$&&(this.destroyListMode$.next(),this.destroyListMode$.complete()),this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.textSearch.valueChanges.pipe(Wi(150),xr((t,r)=>((this.mode==="list"?this.pageLink.textSearch:this.gridImagesFilter.search)??"")===r.trim()),Be(this.destroy$)).subscribe(t=>{if(this.mode==="list")if(this.pageMode){let r={textSearch:fn(t)?encodeURI(t):null,page:null};this.updatedRouterParamsAndData(r)}else this.pageLink.textSearch=fn(t)?t.trim():null,this.paginator.pageIndex=0,this.updateData();else this.gridImagesFilter={search:fn(t)?t.trim():null,includeSystemImages:this.includeSystemImages},this.cd.markForCheck()}),this.updateMode()}includeSystemImagesChanged(t){this.includeSystemImages=t,this.displayedColumns=this.computeDisplayedColumns(),this.gridImagesFilter={search:this.gridImagesFilter.search,includeSystemImages:this.includeSystemImages},this.mode==="list"?(this.paginator.pageIndex=0,this.updateData()):this.cd.markForCheck()}setMode(t){this.mode!==t&&(this.widgetResize$&&(this.widgetResize$.disconnect(),this.widgetResize$=null),this.destroyListMode$&&(this.destroyListMode$.next(),this.destroyListMode$.complete(),this.destroyListMode$=null),this.mode=t,this.mode==="list"&&(this.dataSource=new zv(this.imageService,null,r=>this.deleteEnabled(r))),setTimeout(()=>{this.updateMode()}))}get isSysAdmin(){return this.authUser.authority===Mt.SYS_ADMIN}get isTenantAdmin(){return this.authUser.authority===Mt.TENANT_ADMIN}computeDisplayedColumns(){let t;return this.selectionMode?(t=["preview","title"],this.isTenantAdmin&&this.includeSystemImages&&t.push("system"),t.push("imageSelect")):(t=["select","preview","title","createdTime","resolution","size"],!this.isSysAdmin&&this.includeSystemImages&&t.push("system"),t.push("actions")),t}updateMode(){this.mode==="list"?this.initListMode():this.initGridMode()}initListMode(){this.destroyListMode$=new Te,this.widgetResize$=new ResizeObserver(()=>{this.zone.run(()=>{let t=this.elementRef.nativeElement.offsetWidth<mS;t!==this.hidePageSize&&(this.hidePageSize=t,this.cd.markForCheck())})}),this.widgetResize$.observe(this.elementRef.nativeElement),this.pageMode&&this.route.queryParams.pipe(ib(1),Be(this.destroyListMode$)).subscribe(t=>{this.paginator.pageIndex=Number(t.page)||0,this.paginator.pageSize=Number(t.pageSize)||this.defaultPageSize,this.sort.active=t.property||this.defaultSortOrder.property,this.sort.direction=(t.direction||this.defaultSortOrder.direction).toLowerCase();let r=t.textSearch;if(fn(r)){let e=decodeURI(r);this.textSearchMode=!0,this.pageLink.textSearch=e.trim(),this.textSearch.setValue(e,{emitEvent:!1})}else this.pageLink.textSearch=null,this.textSearch.reset("",{emitEvent:!1});this.updateData()}),this.updatePaginationSubscriptions(),this.updateData()}initGridMode(){}updatePaginationSubscriptions(){this.updateDataSubscription&&(this.updateDataSubscription.unsubscribe(),this.updateDataSubscription=null);let t=this.sort.sortChange.asObservable().pipe(W(e=>{let i=e.direction.toUpperCase(),o={direction:this.defaultSortOrder.direction===i?null:i,property:this.defaultSortOrder.property===e.active?null:e.active};return o.page=null,this.paginator.pageIndex=0,o})),r=this.paginator.page.asObservable().pipe(W(e=>({page:e.pageIndex===0?null:e.pageIndex,pageSize:e.pageSize===this.defaultPageSize?null:e.pageSize})));this.updateDataSubscription=Xt(t,r).pipe(Be(this.destroyListMode$)).subscribe(e=>this.updatedRouterParamsAndData(e))}clearSelection(){this.dataSource.selection.clear(),this.cd.detectChanges()}updateData(){this.mode==="list"?(this.pageLink.page=this.paginator.pageIndex,this.pageLink.pageSize=this.paginator.pageSize,this.sort.active?this.pageLink.sortOrder={property:this.sort.active,direction:Xn[this.sort.direction.toUpperCase()]}:this.pageLink.sortOrder=null,this.dataSource.loadEntities(this.pageLink,this.imageSubType,this.includeSystemImages)):this.gridComponent.update(
184)}imageUpdated(t,r=-1){this.mode==="list"?this.updateData():this.gridComponent.updateItem(r,t)}imageDeleted(t=-1){this.mode==="list"?this.updateData():this.gridComponent.deleteItem(t)}enterFilterMode(){this.textSearchMode=!0,setTimeout(()=>{this.searchInputField.nativeElement.focus(),this.searchInputField.nativeElement.setSelectionRange(0,0)},10)}exitFilterMode(){this.textSearchMode=!1,this.textSearch.reset()}trackByEntity(t,r){return r}isSystem(t){return!this.isSysAdmin&&t?.tenantId?.id===Oa}readonly(t){return this.authUser.authority!==Mt.SYS_ADMIN&&this.isSystem(t)}deleteEnabled(t){return this.authUser.authority===Mt.SYS_ADMIN||!this.isSystem(t)}deleteImage(t,r,e=-1){t&&t.stopPropagation();let i=this.translate.instant(this.isScada?"scada.delete-symbol-title":"image.delete-image-title",{imageTitle:r.title}),o=this.translate.instant(this.isScada?"scada.delete-symbol-text":"image.delete-image-text");this.dialogService.confirm(i,o,this.translate.instant("action.no"),this.translate.instant("action.yes")).subscribe(a=>{a&&this.imageService.deleteImage(dl(r),r.resourceKey,!1,{ignoreErrors:!0}).pipe(W(()=>iC(r)),vt(s=>Z(iC(r,s)))).subscribe(s=>{if(s.success)this.imageDeleted(e);else if(s.resourceIsReferencedError){let c=[Lt(re({},r),{references:s.references})],u={multiple:!1,resources:c,configuration:{title:"image.image-is-in-use",message:this.translate.instant("image.image-is-in-use-text",{title:c[0].title}),deleteText:"image.delete-image-in-use-text",selectedText:"image.selected-images",columns:["select","preview","title","references"]}};this.dialog.open(Gv,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:u}).afterClosed().subscribe(f=>{f&&this.imageService.deleteImage(dl(r),r.resourceKey,!0).subscribe(()=>{this.imageDeleted(e)})})}else{let c=oC(s.error,this.translate);setTimeout(()=>{this.store.dispatch(new Sr({message:c.message,type:"error"}))},c.timeout)}})})}deleteImages(t){t&&t.stopPropagation();let r=this.dataSource.selection.selected;if(r&&r.length){let e=this.translate.instant(this.isScada?"scada.delete-symbols-title":"image.delete-images-title",{count:r.length}),i=this.translate.instant(this.isScada?"scada.delete-symbols-text":"image.delete-images-text");this.dialogService.confirm(e,i,this.translate.instant("action.no"),this.translate.instant("action.yes")).subscribe(o=>{if(o){let a=r.map(s=>this.imageService.deleteImage(dl(s),s.resourceKey,!1,{ignoreErrors:!0}).pipe(W(()=>iC(s)),vt(c=>Z(iC(s,c)))));Rn(a).subscribe(s=>{let c=s.some(_=>_.success),u=s.filter(_=>_.resourceIsReferencedError),f=s.find(_=>!_.success);if(c&&this.updateData(),u?.length){let _=u.map(S=>Lt(re({},S.resource),{references:S.references})),I={multiple:!0,resources:_,configuration:{title:"image.images-are-in-use",message:this.translate.instant("image.images-are-in-use-text"),deleteText:"image.delete-image-in-use-text",selectedText:"image.selected-images",columns:["select","preview","title","references"],datasource:new zv(null,_,S=>!0)}};this.dialog.open(Gv,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:I}).afterClosed().subscribe(S=>{if(S&&S.length){let F=S.map(H=>this.imageService.deleteImage(dl(H),H.resourceKey,!0));Rn(F).subscribe(()=>{this.updateData()})}})}else if(f){let _=oC(f.error,this.translate);setTimeout(()=>{this.store.dispatch(new Sr({message:_.message,type:"error"}))},_.timeout)}})}})}}downloadImage(t,r){t&&t.stopPropagation(),this.imageService.downloadImage(dl(r),r.resourceKey).subscribe()}exportImage(t,r){t&&t.stopPropagation(),this.importExportService.exportImage(dl(r),r.resourceKey)}importImage(){this.importExportService.importImage().subscribe(t=>{t&&(this.selectionMode?this.imageSelected.next(t):this.updateData())})}selectImage(t,r){t&&t.stopPropagation(),this.imageSelected.next(r)}rowClick(t,r){this.isScada?this.editImage(t,r):this.selectionMode?this.selectImage(t,r):this.deleteEnabled(r)&&this.dataSource.selection.toggle(r)}uploadImage(){this.dialog.open(o0,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{imageSubType:this.imageSubType}}).afterClosed().subscribe(t=>
184{if(t?.image)if(this.selectionMode)this.imageSelected.next(t.image);else if(this.isScada){let r=dl(t.image),e=encodeURIComponent(t.image.resourceKey);this.router.navigateByUrl(`resources/scada-symbols/${r}/${e}`)}else this.updateData()})}editImage(t,r,e=-1){if(t&&t.stopPropagation(),this.isScada){let i=dl(r),o=encodeURIComponent(r.resourceKey);this.router.navigateByUrl(`resources/scada-symbols/${i}/${o}`)}else this.dialog.open(G1,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{image:r,readonly:this.readonly(r)}}).afterClosed().subscribe(i=>{i&&this.imageUpdated(i,e)})}embedImage(t,r,e=-1){t&&t.stopPropagation(),this.dialog.open(s0,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{image:r,readonly:this.readonly(r)}}).afterClosed().subscribe(i=>{i&&this.imageUpdated(i,e)})}updatedRouterParamsAndData(t,r="merge"){this.pageMode?(this.router.navigate([],{relativeTo:this.route,queryParams:t,queryParamsHandling:r}),r===""&&Fn(this.route.snapshot.queryParams,t)&&this.updateData()):this.updateData()}};$v.\u0275fac=function(r){return new(r||$v)(h(ve),h(ub),h(vi),h(Lr),h(Ge),h(vl),h(Sa),h(Td),h(ge),h(Me),h(Ai),h(Bt))},$v.\u0275cmp=L({type:$v,selectors:[["tb-image-gallery"]],viewQuery:function(r,e){if(r&1&&(ae(N_e,5),ae(fc,5),ae(gc,5),ae(yh,5)),r&2){let i;Q(i=K())&&(e.searchInputField=i.first),Q(i=K())&&(e.paginator=i.first),Q(i=K())&&(e.sort=i.first),Q(i=K())&&(e.gridComponent=i.first)}},hostVars:6,hostBindings:function(r,e){r&2&&hi("display",e.display)("width",e.width)("height",e.height)},inputs:{pageMode:"pageMode",dialogMode:"dialogMode",imageSubType:"imageSubType",mode:"mode",selectionMode:"selectionMode"},outputs:{imageSelected:"imageSelected"},features:[Ce],decls:87,vars:87,consts:[["searchInput",""],["loadingImages",""],["noImages",""],["imageCard",""],["imageLoadingCard",""],["cellActionsMenu","matMenu"],[1,"tb-images","tb-absolute-fill"],[1,"tb-images-content","flex","flex-1","flex-col"],[1,"mat-mdc-table-toolbar","lt-lg:flex","lt-lg:flex-col","lt-lg:items-stretch","lt-lg:justify-start"],[1,"flex","flex-1","flex-row","items-center","justify-start"],[1,"mat-toolbar-tools"],[1,"tb-images-title","lt-md:!hidden"],["tbTruncateWithTooltip",""],["tb-help","scada",4,"ngIf"],[1,"tb-images-view-type-toolbar","flex","flex-row","items-center","justify-start"],[1,"tb-toolbar-button"],["mat-icon-button","","matTooltipPosition","below",3,"click","matTooltip"],["class","lt-lg:!hidden",3,"ngModel","ngModelChange",4,"ngIf"],[1,"flex","flex-1","flex-row","items-center","justify-start","gt-md:gap-4"],[1,"flex-1"],[1,"flex","flex-row","items-center","justify-start"],["mat-icon-button","","matTooltipPosition","above",3,"click","disabled","matTooltip"],["mat-icon-button","","color","primary","matTooltipPosition","above",1,"gt-md:!hidden",3,"click","disabled","matTooltip"],["mat-flat-button","","color","primary",1,"lt-lg:!hidden",3,"click","disabled"],["class","gt-md:!hidden",3,"ngModel","ngModelChange",4,"ngIf"],[1,"mat-mdc-table-toolbar"],["mat-icon-button","","matTooltipPosition","above",3,"matTooltip"],["matInput","",3,"formControl","placeholder"],["mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["color","primary",1,"mat-mdc-table-toolbar"],["class","flex flex-1 flex-col min-h-0",4,"ngIf"],["class","flex flex-1 flex-col",3,"mat-padding",4,"ngIf"],["tb-help","scada"],[1,"lt-lg:!hidden",3,"ngModelChange","ngModel"],[1,"gt-md:!hidden",3,"ngModelChange","ngModel"],[1,"flex","flex-1","flex-col","min-h-0"],[1,"table-container","flex-1"],["mat-table","","matSort","","matSortDisableClear","",3,"dataSource","trackBy","matSortActive","matSortDirection"],["matColumnDef","select","sticky",""],["style","width: 30px;",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","preview"],["style","width: 50px; min-width: 50px;",4,"matHeaderCellDef"],["matColumnDef","title"],["mat-sort-header","","style","width: 100%;",4,"matHeaderCellDef"],["matColumnDef","createdTime"],["mat-sort-header","","style","width: 160px; min-width: 160px;",4,"matHeaderCellDef"],["matColumnDef","resolution"],["style","width: 80px; min-width: 80px;",4,"matHeaderCellDef"],["matColumnDef","size"],["matColumnDef","system"],["style","width: 60px; min-width: 60px;",4,"matHeaderCellDef"],["matColumnDef","actions","stickyEnd",""],[3,"gt-md:min-w-60","gt-md:max-w-60","gt-md:w-60","gt-md:min-w-48","gt-md:max-w-48","gt-md:w-48",4,"matHeaderCellDef"],[3,"gt-md:min-w-60","gt-md:max-w-60","gt-md:w-60","gt-md:min-w-48","gt-md:max-w-48","gt-md:w-48",4,"matCellDef"],["matColumnDef","imageSelect","stickyEnd",""],[4,"matHeaderCellDef"],["class","mat-row-select",4,"matHeaderRowDef","matHeaderRowDefSticky"],["class","mat-row-select",3,"!hidden","mat-selected","click",4,"matRowDef","matRowDefColumns"],[4,"ngIf"],[1,"no-data-found","flex","items-center","justify-center"],["showFirstLastButtons","",3,"length","pageIndex","pageSize","pageSizeOptions","hidePageSize"],[2,"width","30px"],[3,"change","checked","indeterminate"],[3,"click","change","checked"],[2,"width","50px","min-width","50px"],[1,"tb-image-preview-cell"],[1,"tb-image-preview",3,"src","alt"],["mat-sort-header","",2,"width","100%"],["mat-sort-header","",2,"width","160px","min-width","160px"],[2,"width","80px","min-width","80px"],[2,"width","60px","min-width","60px"],[1,"material-icons","mat-icon"],[1,"flex","flex-1","flex-row","items-stretch","justify-end","lt-lg:!hidden"],["mat-icon-button","","matTooltipPosition","above",3,"disabled","matTooltip","click",4,"ngIf"],[1,"gt-md:!hidden"],["mat-icon-button","",3,"click","matMenuTriggerFor"],[1,"material-icons"],["xPosition","before"],["mat-menu-item","",3,"click","disabled"],["matMenuItemIcon",""],["mat-menu-item","",3,"disabled","click",4,"ngIf"],["mat-stroked-button","","color","primary",3,"click"],[1,"mat-row-select"],[1,"mat-row-select",3,"click"],[4,"ngTemplateOutlet"],[1,"flex","flex-1","flex-col"],[1,"flex-1",3,"columns","itemSize","fetchFunction","filter","itemCard","loadingCell","dataLoading","noData"],[1,"tb-absolute-fill","flex","flex-col","items-center","justify-center"],[1,"tb-no-images"],[1,"tb-no-data-bg"],[1,"tb-no-data-text"],[1,"tb-image-card","tb-primary-fill"],[1,"tb-image-card-overlay"],["class","tb-image-card-overlay-buttons",4,"ngIf"],[1,"tb-image-preview-container"],[1,"tb-image-preview-overlay",3,"click"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],[1,"tb-image-preview-spacer"],[1,"tb-image-details"],[1,"tb-image-title-container"],[1,"tb-image-title"],["class","tb-image-sys",4,"ngIf"],[1,"tb-image-info-container"],["vertical",""],[1,"tb-image-card-overlay-buttons"],["mat-flat-button","","color","primary",3,"click"],[1,"tb-image-sys"],[1,"tb-image-card","tb-primary-fill","loading-cell"],[1,"tb-image-preview"]],template:function(r,e){if(r&1){let i=B();d(0,"div",6)(1,"div",7)(2,"mat-toolbar",8)(3,"div",9)(4,"div",10)(5,"div",11)(6,"div",12),g(7),v(8,"translate"),p(),x(9,L_e,1,0,"div",13),p(),d(10,"div",14)(11,"div",15)(12,"button",16),v(13,"translate"),T("click",function(){return D(i),M(e.setMode("list"))}),d(14,"mat-icon"),g(15,"view_list"),p()()(),d(16,"div",15)(17,"button",16),v(18,"translate"),T("click",function(){return D(i),M(e.setMode("grid"))}),d(19,"tb-icon"),g(20,"mdi:view-grid"),p()()()(),x(21,B_e,3,4,"mat-slide-toggle",17),p(),d(22,"section",18),O(23,"span",19),d(24,"section",20)(25,"button",21),v(26,"translate"),v(27,"async"),T("click",function(){return D(i),M(e.enterFilterMode())}),d(28,"mat-icon"),g(29,"search"),p()(),d(30,"button",21),v(31,"translate"),v(32,"async"),T("click",function(){return D(i),M(e.updateData())}),d(33,"mat-icon"),g(34,"refresh"),p()(),d(35,"button",21),v(36,"translate"),v(37,"async"),T("click",function(){return D(i),M(e.importImage())}),d(38,"tb-icon"),g(39,"mdi:file-import"),p()(),d(40,"button",22),v(41,"translate"),v(42,"async"),T("click",function(){return D(i),M(e.uploadImage())}),d(43,"mat-icon"),g(44,"add"),p()()(),d(45,"button",23),v(46,"async"),T("click",function(){return D(i),M(e.uploadImage())}),g(47),v(48,"translate"),p()()(),x(49,j_e,3,4,"mat-slide-toggle",24),p(),d(50,"mat-toolbar",25)(51,"div",10)(52,"button",26),v(53,"translate"),d(54,"mat-icon"),g(55,"search"),p()(),d(56,"mat-form-field",19)(57,"mat-label"),g(58,"\xA0"),p(),O(59,"input",27,0),v(61,"translate"),p(),d(62,"button",28),v(63,"translate"),T("click",function(){return D(i),M(e.exitFilterMode())}),d(64,"mat-icon"),g(65,"close"),p()()()(),d(66,"mat-toolbar",29)(67,"div",10)(68,"span"),g(69),v(70,"async"),p(),O(71,"span",19),d(72,"button",21),v(73,"translate"),v(74,"async"),T("click",function(a){return D(i),M(e.deleteImages(a))}),d(75,"mat-icon"),g(76,"delete"),p()()()(),x(77,pve,40,22,"div",30)(78,mve,2,10,"div",31),p()(),x(79,uve,4,3,"ng-template",null,1,kt)(81,hve,5,3,"ng-template",null,2,kt)(83,Cve,23,18,"ng-template",null,3,kt)(85,wve,5,0,"ng-template",null,4,kt)}r&2&&(Y("tb-dialog-mode",e.dialogMode)("mat-padding",!e.dialogMode),l(),Y("tb-outlined-border",e.pageMode),l(),Y("!hidden",e.textSearchMode||!(e.mode==="grid"||e.dataSource!=null&&e.dataSource.selection.isEmpty()))("multi-row",!e.isSysAdmin),l(5),z(C(8,47,e.isScada?"scada.symbols":"image.gallery")),l(2),m("ngIf",e.isScada),l(2),Y("tb-selected",e.mode==="list"),l(),te("matTooltip",C(13,49,"image.list-mode")),l(4),Y("tb-selected",e.mode==="grid"),l(),te("matTooltip",C(18,51,"image.grid-mode")),l(4),m("ngIf",e.isTenantAdmin),l(4),te("matTooltip",C(26,53,"action.search")),m("disabled",C(27,55,e.
184isLoading$)),l(5),te("matTooltip",C(31,57,"action.refresh")),m("disabled",C(32,59,e.isLoading$)),l(5),te("matTooltip",C(36,61,e.isScada?"scada.import-symbol":"image.import-image")),m("disabled",C(37,63,e.isLoading$)),l(5),Y("!hidden",e.dialogMode&&e.isScada),te("matTooltip",C(41,65,e.isScada?"scada.upload-symbol":"image.upload-image")),m("disabled",C(42,67,e.isLoading$)),l(5),Y("!hidden",e.dialogMode&&e.isScada),m("disabled",C(46,69,e.isLoading$)),l(2),j(" ",C(48,71,e.isScada?"scada.upload-symbol":"image.upload-image")," "),l(2),m("ngIf",e.isTenantAdmin),l(),Y("!hidden",!e.textSearchMode||!(e.mode==="grid"||e.dataSource!=null&&e.dataSource.selection.isEmpty())),l(2),te("matTooltip",C(53,73,e.isScada?"scada.search":"image.search")),l(7),te("placeholder",C(61,75,e.isScada?"scada.search":"image.search")),m("formControl",e.textSearch),l(3),te("matTooltip",C(63,77,"action.close")),l(4),Y("!hidden",e.mode!=="list"||(e.dataSource==null?null:e.dataSource.selection.isEmpty())),l(3),j(" ",C(70,79,e.translate.get(e.isScada?"scada.selected-symbols":"image.selected-images",Xe(85,V_e,e.dataSource==null?null:e.dataSource.selection.selected.length)))," "),l(3),te("matTooltip",C(73,81,"action.delete")),m("disabled",C(74,83,e.isLoading$)),l(5),m("ngIf",e.mode==="list"),l(),m("ngIf",e.mode==="grid"))},dependencies:[ce,fo,yt,Pe,ra,Se,at,ze,At,ir,Zc,tp,Ff,zt,id,_c,nd,vc,bc,rd,yc,Cc,od,ad,fc,gc,Gf,la,jo,ut,xe,eo,Br,Ms,Sc,In,yh,Ve,pb,be,ka,Wo],styles:[`@charset "UTF-8";.tb-images.tb-dialog-mode{position:relative;width:100%;height:100%}.tb-images.tb-dialog-mode .mat-toolbar.mat-mdc-table-toolbar{padding:0}.tb-images .tb-images-content{width:100%;height:100%;background:#fff;overflow:hidden}.tb-images .tb-images-content.tb-outlined-border{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}@media screen and (max-width: 1279px){.tb-images .tb-images-content .mat-mdc-table-toolbar.multi-row.mat-toolbar-single-row{height:112px}.tb-images .tb-images-content .mat-mdc-table-toolbar.multi-row .mat-mdc-slide-toggle{display:flex;min-height:48px}}.tb-images .tb-images-content .tb-images-title{padding-right:20px;display:flex;align-items:center}.tb-images .tb-images-content .tb-images-view-type-toolbar{height:55px;min-height:55px;padding-right:16px;background-color:transparent;box-shadow:none}.tb-images .tb-images-content .tb-images-view-type-toolbar .tb-toolbar-button{height:48px}.tb-images .tb-images-content .tb-images-view-type-toolbar .tb-toolbar-button button.mat-mdc-icon-button{margin:0}.tb-images .tb-images-content .tb-images-view-type-toolbar .tb-toolbar-button.tb-selected{background-color:#ffffff26;border-bottom:rgb(255,110,64) solid 4px}.tb-images .tb-images-content .tb-images-view-type-toolbar .tb-toolbar-button.tb-selected button.mat-mdc-icon-button{margin-bottom:-4px}.tb-images .tb-images-content .tb-images-view-type-toolbar .tb-toolbar-button.tb-selected button.mat-mdc-icon-button .mat-icon{color:#ff6e40;fill:#ff6e40}.tb-images .tb-images-content .table-container,.tb-images .tb-images-content tb-scroll-grid{position:relative}.tb-images .tb-images-content .tb-no-images{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.tb-images .tb-images-content .tb-image-card{position:relative;height:100%;border-radius:4px;box-shadow:0 1px 4px #0000003d;padding:8px;display:flex;gap:8px;flex-direction:column;
184cursor:pointer}.tb-images .tb-images-content .tb-image-card .tb-image-card-overlay{position:absolute;pointer-events:none;inset:0;border-radius:4px;z-index:2;display:flex;flex-direction:column}.tb-images .tb-images-content .tb-image-card .tb-image-card-overlay .tb-image-card-overlay-buttons{width:100%;display:flex;justify-content:flex-end;align-items:center;color:#000000c7;opacity:0;transition:opacity .5s}.tb-images .tb-images-content .tb-image-card:hover .tb-image-card-overlay .tb-image-card-overlay-buttons{opacity:1}.tb-images .tb-images-content .tb-image-card:hover .tb-image-preview-container .tb-image-preview-overlay{background:#f5f5f599;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.tb-images .tb-images-content .tb-image-card:hover .tb-image-preview-container .tb-image-preview-overlay .mdc-button{opacity:1}.tb-images .tb-images-content .tb-image-card .tb-image-preview-container{position:relative}.tb-images .tb-images-content .tb-image-card .tb-image-preview-container .tb-image-preview-overlay{position:absolute;inset:0;z-index:1;background:#f5f5f500;-webkit-backdrop-filter:none;backdrop-filter:none;transition:all .5s;display:flex;flex-direction:column;align-items:center;justify-content:center}.tb-images .tb-images-content .tb-image-card .tb-image-preview-container .tb-image-preview-overlay .mdc-button{opacity:0;transition:opacity .5s}.tb-images .tb-images-content .tb-image-card .tb-image-preview-container .tb-image-preview-spacer{margin-top:100%}.tb-images .tb-images-content .tb-image-card .tb-image-preview-container .tb-image-preview{position:absolute;inset:0;width:100%;height:100%}.tb-images .tb-images-content .tb-image-card .tb-image-details{min-height:52px;flex:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:4px;align-self:stretch}.tb-images .tb-images-content .tb-image-card .tb-image-details .tb-image-title-container{display:flex;align-items:center;gap:8px;align-self:stretch}.tb-images .tb-images-content .tb-image-card .tb-image-details .tb-image-title-container .tb-image-title{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;color:#000000c2;font-size:12px;font-style:normal;font-weight:500;line-height:16px}.tb-images .tb-images-content .tb-image-card .tb-image-details .tb-image-title-container .tb-image-sys{padding:1px 4px;border-radius:4px;background:#ecececa3;color:#0000008a;font-size:11px;font-style:normal;font-weight:500;line-height:16px;letter-spacing:.017px}.tb-images .tb-images-content .tb-image-card .tb-image-details .tb-image-info-container{display:flex;align-items:center;gap:8px;align-self:stretch;color:#00000061;font-size:10px;font-style:normal;font-weight:400;line-height:16px}.tb-images .tb-images-content .tb-image-card .tb-image-details .tb-image-info-container .mat-divider.mat-divider-vertical{height:16px}.tb-images .tb-images-content .tb-image-card.loading-cell .tb-image-preview-container,.tb-images .tb-images-content .tb-image-card.loading-cell .tb-image-details{background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);border-radius:5px;background-size:200% 100%;animation:1s shine linear infinite}.tb-images .tb-images-content .table-container{overflow:auto}.tb-images .tb-images-content .table-container .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1!important}.tb-images .tb-images-content .table-container .mat-mdc-cell.mat-column-preview{width:50px;height:50px;padding:2px 12px}.tb-images .tb-images-content .tb-image-preview-cell{width:50px;height:50px}.tb-images .tb-images-content .tb-image-preview{width:50px;height:50px;object-fit:contain;border-radius:4px}@keyframes shine{to{background-position-x:-200%}}
185`],encapsulation:2});var Tp=$v;pe([fe(),le("design:type",Object)],Tp.prototype,"pageMode",void 0);pe([fe(),le("design:type",Object)],Tp.prototype,"dialogMode",void 0);pe([fe(),le("design:type",Object)],Tp.prototype,"selectionMode",void 0);var Qm=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a}ngOnInit(){}cancel(){this.dialogRef.close(null)}imageSelected(e){this.dialogRef.close(e)}};
185t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en))},t.\u0275cmp=L({type:t,selectors:[["tb-image-gallery-dialog"]],features:[Ce],decls:5,vars:1,consts:[[1,"tb-image-gallery-dialog"],["mat-icon-button","","type","button",1,"tb-image-gallery-close","tb-mat-20",3,"click"],["pageMode","false","dialogMode","","mode","grid","selectionMode","",3,"imageSelected","imageSubType"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"button",1),T("click",function(){return o.cancel()}),d(2,"mat-icon"),g(3,"close"),p()(),d(4,"tb-image-gallery",2),T("imageSelected",function(s){return o.imageSelected(s)}),p()()),i&2&&(l(4),m("imageSubType",o.data.imageSubType))},dependencies:[Pe,Se,Tp],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-image-gallery-dialog[_ngcontent-%COMP%]{position:relative;padding:24px 32px 16px;width:100vw;height:100vh;max-height:100vh}@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-image-gallery-dialog[_ngcontent-%COMP%]{width:80vw;height:80vh;max-height:80vh}}@media screen and (min-width: 960px){[_nghost-%COMP%]   .tb-image-gallery-dialog[_ngcontent-%COMP%]{width:700px}}@media screen and (min-width: 1280px){[_nghost-%COMP%]   .tb-image-gallery-dialog[_ngcontent-%COMP%]{width:900px}}@media screen and (min-width: 1920px){[_nghost-%COMP%]   .tb-image-gallery-dialog[_ngcontent-%COMP%]{width:900px}}[_nghost-%COMP%]   .tb-image-gallery-dialog[_ngcontent-%COMP%]   .tb-image-gallery-close[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px;z-index:1;color:#00000061}']});let n=t;return n})();var Eve=n=>({disabled:n}),Ive=(n,t)=>({"tb-error":n,"tb-required":t}),kve=()=>({preview:!0}),Dve=n=>({loading:n});function Mve(n,t){if(n&1&&(d(0,"label",9),g(1),p()),n&2){let r=b
185();bt(Yi(3,Ive,!r.disabled&&r.required&&r.linkType===r.ImageLinkType.none,!r.disabled&&r.required)),l(),z(r.label)}}function Ave(n,t){if(n&1&&(O(0,"img",10),v(1,"image"),v(2,"async")),n&2){let r=b();m("src",C(2,4,ft(1,1,r.imageUrl,hn(6,kve))),yo)}}function Ove(n,t){n&1&&O(0,"div",16)}function Pve(n,t){if(n&1&&(pt(0),d(1,"div",19),g(2),p(),d(3,"div",20)(4,"div"),g(5),p(),O(6,"mat-divider",21),d(7,"div"),g(8),v(9,"fileSize"),p()(),ct()),n&2){let r=b(3);l(2),j(" ",r.imageResource.title," "),l(3),fa("",r.imageResource.descriptor.width,"x",r.imageResource.descriptor.height,""),l(3),z(C(9,4,r.imageResource.descriptor.size))}}function Rve(n,t){if(n&1&&(d(0,"div",17),x(1,Pve,10,6,"ng-container",18),p()),n&2){let r=b(2),e=me(10);bt(Xe(4,Dve,r.loadingImageResource)),l(),m("ngIf",!r.loadingImageResource)("ngIfElse",e)}}function Fve(n,t){if(n&1){let r=B();d(0,"button",27),v(1,"translate"),T("click",function(){D(r);let i=b(3);return M(i.clearImage())}),d(2,"mat-icon"),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"image.clear-image"))}function Nve(n,t){if(n&1&&(d(0,"div",22)(1,"div",23),g(2),v(3,"translate"),p(),d(4,"div",24)(5,"mat-form-field",25),O(6,"input",26),v(7,"translate"),p(),x(8,Fve,4,3,"button",15),p()()),n&2){let r=b
185(2);l(2),j(" ",C(3,4,"image.image-link")," "),l(4),te("placeholder",C(7,6,"widget-config.set")),m("formControl",r.externalLinkControl),l(2),m("ngIf",!r.disabled)}}function Vve(n,t){if(n&1){let r=B();d(0,"button",27),v(1,"translate"),T("click",function(){D(r);let i=b(2);return M(i.clearImage())}),d(2,"mat-icon"),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"image.clear-image"))}function Lve(n,t){if(n&1&&(d(0,"div",11),x(1,Ove,1,0,"div",12)(2,Rve,2,6,"div",13)(3,Nve,9,8,"div",14)(4,Vve,4,3,"button",15),p()),n&2){let r=b();l(),m("ngIf",r.linkType===r.ImageLinkType.base64),l(),m("ngIf",r.linkType===r.ImageLinkType.resource),l(),m("ngIf",r.linkType===r.ImageLinkType.external),l(),m("ngIf",!r.disabled&&r.linkType!==r.ImageLinkType.external)}}function Bve(n,t){if(n&1){let r=B();d(0,"div",28)(1,"button",29),T("click",function(i){D(r);let o=b();return M(o.openGallery(i))}),d(2,"tb-icon",30),g(3,"filter"),p(),d(4,"span",31),g(5,"image.browse-from-gallery"),p()(),d(6,"button",29),T("click",function(i){D(r);let o=b();return M(o.setLink(i))}),d(7,"tb-icon",30),g(8,"link"),p(),d(9,"span",31),g(10,"image.set-link"),p()()()}}function jve(n,t){if(n&1&&(d(0,"div",32),g(1),v(2,"translate"),p()),n&2){let r=b
185();l(),z(C(2,1,r.disabled?"image.no-image":"image.no-image-selected"))}}function Gve(n,t){n&1&&O(0,"mat-spinner",33),n&2&&m("diameter",80)}var ua=function(n){return n.none="none",n.base64="base64",n.external="external",n.resource="resource",n}(ua||{}),c0=class c0 extends sn{constructor(t,r,e,i,o){super(t),this.store=t,this.imageService=r,this.dialog=e,this.cd=i,this.destroyRef=o,this.required=!1,this.detectImageSize=!1,this.imageSize=new J,this.loadingImageResource=!1,this.ImageLinkType=ua,this.linkType=ua.none,this.externalLinkControl=new Nl(null),this.propagateChange=null}ngOnInit(){this.externalLinkControl.valueChanges.pipe(yi(this.destroyRef)).subscribe(t=>{this.linkType===ua.external&&this.updateModel(t)})}ngOnDestroy(){}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?(this.detectLinkType(),this.externalLinkControl.disable({emitEvent:!1})):this.externalLinkControl.enable({emitEvent:!1})}writeValue(t){if(t=uS(t),this.imageUrl!==t)if(this.reset(),this.imageUrl=t,this.detectLinkType(),this.linkType===ua.resource){let r=fS(this.imageUrl);r?(this.loadingImageResource=!0,this.imageService.getImageInfo(r.type,r.key,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:e=>{this.imageResource=e,this.loadingImageResource=!1,this.imageLoaded(),this.cd.markForCheck()},error:()=>{this.reset(),this.loadingImageResource=!1,this.cd.markForCheck()}})):(this.reset(),this.cd.markForCheck())}else this.linkType===ua.base64?(this.imageLoaded(),this.cd.markForCheck()):this.linkType===ua.external&&(this.externalLinkControl.setValue(this.imageUrl,{emitEvent:!1}),this.imageLoaded(),this.cd.markForCheck())}detectLinkType(){this.imageUrl?r4(this.imageUrl)?this.linkType=ua.resource:s4(this.imageUrl)?this.linkType=ua.base64:this.linkType=ua.external:this.linkType=ua.none}updateModel(t){this.cd.markForCheck(),this.imageUrl!==t&&(this.imageUrl=t,this.propagateChange(hS(this.imageUrl)),this.imageLoaded())}reset(){this.linkType=ua.none,this.imageResource=null,this.externalLinkControl.setValue(null,{emitEvent:!1})}clearImage(){this.reset(),this.updateModel(null)}setLink(t){t&&t.stopPropagation(),this.linkType=ua.external}openGallery(t){t&&t.stopPropagation(),this.dialog.open(Qm,{autoFocus:!1,disableClose:!1,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{imageSubType:za.IMAGE}}).afterClosed().subscribe(r=>{r&&(this.linkType=ua.resource,this.imageResource=r,this.updateModel(r.link))})}imageLoaded(){if(this.detectImageSize&&this.imageUrl)if(this.linkType===ua.resource){let t=this.imageResource?.descriptor?.width,r=this.imageResource?.descriptor?.height;this.imageSize.emit({width:t,height:r})}else vF(this.imageUrl).subscribe({next:t=>{this.imageSize.emit({width:t[0],height:t[1]})},error:t=>{}})}};c0.\u0275fac=function(r){return new(r||c0)(h(ve),h(vl),h(Lr),h(Me),h(En))},c0.\u0275cmp=L({type:c0,selectors:[["tb-gallery-image-input"]],inputs:{label:"label",required:"required",detectImageSize:"detectImageSize",disabled:"disabled"},outputs:{imageSize:"imageSize"},features:[ne([{provide:ye,useExisting:he(()=>c0),multi:!0}]),Ce],decls:11,vars:9,consts:[["noImage",""],["loading",""],[1,"tb-container"],["class","tb-title",3,"class",4,"ngIf"],[1,"tb-image-select-container"],[1,"tb-image-container"],["class","tb-image-preview",3,"src",4,"ngIf","ngIfElse"],["class","tb-image-info-container",4,"ngIf"],["class","tb-image-select-buttons-container",4,"ngIf"],[1,"tb-title"],[1,"tb-image-preview",3,"src"],[1,"tb-image-info-container"],["class","tb-base64-image-container",4,"ngIf"],["class","tb-resource-image-container",3,"class",4,"ngIf"],["class","tb-external-image-container",4,"ngIf"],["class","tb-image-clear-btn","type","button","mat-icon-button","","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],[1,"tb-base64-image-container"],[1,"tb-resource-image-container"],[4,"ngIf","ngIfElse"],[1,"tb-resource-image-name"],[1,"tb-resource-image-details"],["vertical",""],[1,"tb-external-image-container"],[1,"tb-external-link-label"],[1,"tb-external-link-input-container"],["appearance","outline","subscriptSizing","dynamic",1,"tb-inline-field"],["matInput","",3,"formControl","placeholder"],["type","button","mat-icon-button","","matTooltipPosition","above",1,"tb-image-clear-btn",3,"click","matTooltip"],[1,"tb-image-select-buttons-container"],["mat-stroked-button","","type","button","color","primary",1,"tb-image-select-button",3,"click"],["matButtonIcon",""],["translate",""],[1,"tb-no-image"],["strokeWidth","4",3,"diameter"]],template:function(r,e){if(r&1&&(d(0,"div",2),x(1,Mve,2,6,"label",3),d(2,"div",4)(3,"div",5),x(4,Ave,3,7,"img",6),p(),x(5,Lve,5,4,"div",7)(6,Bve,11,0,"div",8),p()(),x(7,jve,3,3,"ng-template",null,0,kt)(9,Gve,1,1,"ng-template",null,1,kt)),r&2){let i=me(8);l(),m("ngIf",e.label),l(),bt(Xe(7,Eve,e.disabled&&(e.linkType===e.ImageLinkType.none||e.linkType===e.ImageLinkType.base64))),l(2),m("ngIf",e.linkType!==e.ImageLinkType.none&&e.imageUrl)("ngIfElse",i),l(),m("ngIf",e.linkType!==e.ImageLinkType.none&&(e.linkType!==e.ImageLinkType.base64||!e.disabled)),l(),m("ngIf",e.linkType===e.ImageLinkType.none&&!e.disabled)}},dependencies:[ce,jt,yt,Pe,Se,at,ze,zt,Za,la,ut,xe,Br,In,Ve,be,ka,Wo],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0;padding:0 0 16px;display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:block;padding-bottom:0}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]{width:100%;height:96px;border-radius:4px;border:1px solid rgba(0,0,0,.12);display:flex;align-items:center}[_nghost-%COMP%]   .tb-image-select-container.disabled[_ngcontent-%COMP%]{width:96px}[_nghost-%COMP%]   .tb-image-select-container.disabled[_ngcontent-%COMP%]   .tb-image-container[_ngcontent-%COMP%]{width:94px;border-right:none}[_nghost-%COMP%]   .tb-image-container[_ngcontent-%COMP%]{width:95px;height:94px;display:flex;justify-content:center;align-items:center;border-radius:4px;border-right:1px solid rgba(0,0,0,.12);background:#fff;overflow:hidden}[_nghost-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{width:auto;max-width:94px;height:auto;max-height:94px}[_nghost-%COMP%]   .tb-no-image[_ngcontent-%COMP%]{text-align:center;color:#00000061;font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.4px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:0 8px;justify-content:flex-end;align-items:center;gap:4px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-base64-image-container[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-resource-image-container[_ngcontent-%COMP%], [_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-resource-image-container[_ngcontent-%COMP%]{padding:8px;justify-content:center;align-items:flex-start;flex-direction:column;gap:4px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-resource-image-container[_ngcontent-%COMP%]   .tb-resource-image-name[_ng
185content-%COMP%]{color:#0000008a;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;font-size:12px;font-style:normal;font-weight:500;line-height:16px;letter-spacing:.25px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-resource-image-container[_ngcontent-%COMP%]   .tb-resource-image-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#00000061;font-size:11px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.017px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-resource-image-container[_ngcontent-%COMP%]   .tb-resource-image-details[_ngcontent-%COMP%]   .mat-divider.mat-divider-vertical[_ngcontent-%COMP%]{height:16px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-resource-image-container.loading[_ngcontent-%COMP%]{align-items:center}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]{padding:16px 8px 0 16px;flex-direction:column;align-items:flex-start;gap:4px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-label[_ngcontent-%COMP%]{color:#0000008a;font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.4px}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-input-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:4px;align-self:stretch}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-input-container[_ngcontent-%COMP%]   .tb-inline-field[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-image-clear-btn[_ngcontent-%COMP%]{color:#00000061}[_nghost-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:8px;gap:8px;justify-content:center;align-items:flex-start}[_nghost-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]   .tb-image-select-button[_ngcontent-%COMP%]{width:100%;height:100%;align-self:stretch;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px;line-height:normal;font-size:12px}@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]   .tb-image-select-button[_ngcontent-%COMP%]{padding:16px}}[_nghost-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]   .tb-image-select-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:24px;height:24px;font-size:24px;margin:0}']});var Ep=c0;pe([fe(),le("design:type",Object)],Ep.prototype,"required",void 0);pe([fe(),le("design:type",Object)],Ep.prototype,"detectImageSize",void 0);var o7={};Ae(o7,{HasEntityGroupPermissionPipe:()=>z1,HasGenericPermissionPipe:()=>d0,HasGroupEntityOrGenericPermissionPipe:()=>U1,HasGroupEntityPermissionPipe:()=>$1});y();var d0=(()=>{let t=class t{constructor(e){this.userPermissionsService=e}transform(e,i){return this.userPermissionsService.hasResourcesGenericPermission(e,i)}};t.\u0275fac=function(i){return new(i||t)(h(So,16))},t.\u0275pipe=_r({name:"hasGenericPermission",type:t,pure:!0});let n=t;return n})(),z1=(()=>{let t=class t{constructor(e){this.userPermissionsService=e}transform(e,i){return this.userPermissionsService.hasEntityGroupPermission(i,e)}};t.\u0275fac=function(i){return new(i||t)(h(So,16))},t.\u0275pipe=_r({name:"hasEntityGroupPermission",type:t,pure:!0});let n=t;return n})(),$1=(()=>{let t=class t{constructor(e){this.userPermissionsService=e}transform(e,i){return this.userPermissionsService.hasGroupEntityPermission(i,e)}};t.\u0275fac=function(i){return new(i||t)(h(So,16))},t.\u0275pipe=_r({name:"hasGroupEntityPermission",type:t,pure:!0});let n=t;return n})(),U1=(()=>{let t=class t{constructor(e){this.userPermissionsService=e}transform(e,i,o){return e?this.userPermissionsService.hasGroupEntityPermission(o,e):this.userPermissionsService.hasResourcesGenericPermission(i,o)}};t.\u0275fac=function(i){return new(i||t)(h(So,16))},t.\u0275pipe=_r({name:"hasGroupEntityOrGenericPermission",type:t,pure:!0});let n=t;return n})();function zve(n,t){if(n&1){let r=B();d(0,"button",16),v(1,"async"),T("click",function(i){D(r);let o=b(2);return M(o.onEntityAction(i,"open"))}),g(2),v(3,"translate"),p()}
185if(n&2){let r=b(2);Y("!hidden",r.isEdit),m("disabled",C(1,4,r.isLoading$)),l(2),j(" ",C(3,6,"widgets-bundle.open-widgets-bundle")," ")}}function $ve(n,t){if(n&1){let r=B();d(0,"button",16),v(1,"async"),T("click",function(i){D(r);let o=b(2);return M(o.onEntityAction(i,"openDetails"))}),g(2),v(3,"translate"),p()}if(n&2){let r=b(2);Y("!hidden",r.isEdit||r.isDetailsPage),m("disabled",C(1,4,r.isLoading$)),l(2),j(" ",C(3,6,"common.open-details-page")," ")}}function Uve(n,t){if(n&1){let r=B();d(0,"div",14),x(1,zve,4,8,"button",15),v(2,"hasGenericPermission"),x(3,$ve,4,8,"button",15),v(4,"hasGenericPermission"),d(5,"button",16),v(6,"async"),T("click",function(i){D(r);let o=b();return M(o.onEntityAction(i,"export"))}),g(7),v(8,"translate"),p(),d(9,"button",16),v(10,"async"),T("click",function(i){D(r);let o=b();return M(o.onEntityAction(i,"delete"))}),g(11),v(12,"translate"),p()()}if(n&2){let r=b();l(),m("ngIf",ft(2,10,r.resource.WIDGET_TYPE,r.operation.READ)),l(2),m("ngIf",ft(4,13,r.resource.WIDGET_TYPE,r.operation.READ)),l(2),Y("!hidden",r.isEdit),m("disabled",C(6,16,r.isLoading$)),l(2),j(" ",C(8,18,"widgets-bundle.export")," "),l(2),Y("!hidden",r.hideDelete()||r.isEdit),m("disabled",C(10,20,r.isLoading$)),l(2),j(" ",C(12,22,"widgets-bundle.delete")," ")}}function Hve(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"widgets-bundle.title-required")," "))}function qve(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"widgets-bundle.title-max-length")," "))}var a7=(()=>{let t=class t extends b8{constructor(e,i,o,a,s){super(e,a,i,o,s),this.store=e,this.entityValue=i,this.entitiesTableConfigValue=o,this.fb=a,this.cd=s,this.standalone=!1}hideDelete(){return this.entitiesTableConfig?!this.entitiesTableConfig.deleteEnabled(this.entity):!1}buildForm(e){return this.fb.group({title:[e?e.title:"",[ke.required,ke.maxLength(255)]],image:[e?e.image:""],description:[e?e.description:"",ke.maxLength(1024)],scada:[e?e.scada:!1],order:[e?e.order:null]})}updateForm(e){this.entityForm.patchValue({title:e.title,image:e.image,description:e.description,scada:e.scada,order:e.order})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h("entity",8),h("entitiesTableConfig",8),h(Wt),h(Me))},t.\u0275cmp=L({type:t,selectors:[["tb-widgets-bundle"]],inputs:{standalone:"standalone"},features:[Ce],decls:27,vars:14,consts:[["descriptionInput",""],["class","tb-details-buttons xs:flex xs:flex-col",4,"ngIf"],[1,"mat-padding","flex","flex-col"],[3,"formGroup"],[3,"disabled"],[1,"mat-block"],["translate",""],["matInput","","formControlName","title","required",""],[4,"ngIf"],["formControlName","image",1,"flex-1",3,"label"],["matInput","","formControlName","description","rows","2","maxlength","1024"],["align","end"],["formControlName","scada",2,"padding-bottom","16px"],["matInput","","type","number","step","1","formControlName","order"],[1,"tb-details-buttons","xs:flex","xs:flex-col"],["mat-raised-button","","color","primary",3,"disabled","!hidden","click",4,"ngIf"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(i,o){if(i&1&&(x(0,Uve,13,24,"div",1),d(1,"div",2)(2,"form",3)(3,"fieldset",4),v(4,"async"),d(5,"mat-form-field",5)(6,"mat-label",6),g(7,"widgets-bundle.title"),p(),O(8,"input",7),x(9,Hve,3,3,"mat-error",8)(10,qve,3,3,"mat-error",8),p(),O(11,"tb-gallery-image-input",9),v(12,"translate"),d(13,"mat-form-field",5)(14,"mat-label",6),g(15,"widgets-bundle.description"),p(),O(16,"textarea",10,0),d(18,"mat-hint",11),g(19),p()(),d(20,"mat-slide-toggle",12),g(21),v(22,"translate"),p(),d(23,"mat-form-field",5)(24,"mat-label",6),g(25,"widgets-bundle.order"),p(),O(26,"input",13),p()()()()),i&2){let a=me(17);m("ngIf",!o.standalone),l(2),m("formGroup",o.entityForm),l(),m("disabled",C(4,8,o.isLoading$)||!o.isEdit),l(6),m("ngIf",o.entityForm.get("title").hasError("required")),l(),m("ngIf",o.entityForm.get("title").hasError("maxlength")),l(),te("label",C(12,10,"widgets-bundle.image-preview")),l(8),j("",(a.value==null?null:a.value.length)||0,"/1024"),l(2),j(" ",C(22,12,"widgets-bundle.scada")," ")}},dependencies:[ce,yt,at,ze,At,to,ni,jo,ur,ut,Au,xe,We,St,dT,$e,Qe,jt,Ep,Ve,d0,be],styles:['@charset "UTF-8";']});let n=t;return n})();var Yve=["widgetsBundleComponent"];function Qve(n,t){n&1&&O(0,"mat-progress-bar",14)}function Kve(n,t){n&1&&O(0,"div",15)}var s7=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.errorStateMatcher=s,this.widgetsService=c,this.submitted=!1,this.widgetsBundle=this.data.widgetsBundle}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invali
185d&&this.submitted);return o||a}cancel(){this.dialogRef.close(null)}save(){this.submitted=!0,this.widgetsBundleComponent.entityForm.valid&&(this.widgetsBundle=re(re({},this.widgetsBundle),this.widgetsBundleComponent.entityFormValue()),this.widgetsService.saveWidgetsBundle(this.widgetsBundle).subscribe(e=>{this.dialogRef.close(e)}))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en),h(Nn,4),h(Cp))},t.\u0275cmp=L({type:t,selectors:[["tb-widgets-bundle-dialog"]],viewQuery:function(i,o){if(i&1&&ae(Yve,7),i&2){let a;Q(a=K())&&(o.widgetsBundleComponent=a.first)}},features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:24,vars:21,consts:[["widgetsBundleComponent",""],[2,"width","650px",3,"ngSubmit"],["color","primary"],["translate",""],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[3,"isEdit","entity","standalone"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"]],template:function(i,o){if(i&1){let a=B();d(0,"form",1),T("ngSubmit",function(){return D(a),M(o.save())}),d(1,"mat-toolbar",2)(2,"h2",3),g(3,"widgets-bundle.add"),p(),O(4,"span",4),d(5,"button",5),T("click",function(){return D(a),M(o.cancel())}),d(6,"mat-icon",6),g(7,"close"),p()()(),x(8,Qve,1,0,"mat-progress-bar",7),v(9,"async"),x(10,Kve,1,0,"div",8),v(11,"async"),d(12,"div",9),O(13,"tb-widgets-bundle",10,0),p(),d(15,"div",11)(16,"button",12),v(17,"async"),T("click",function(){return D(a),M(o.cancel())}),g(18),v(19,"translate"),p(),d(20,"button",13),v(21,"async"),g(22),v(23,"translate"),p()()()}if(i&2){let a=me(14);l(8),m("ngIf",C(9,9,o.isLoading$)),l(2),m("ngIf",!C(11,11,o.isLoading$)),l(3),m("isEdit",!0)("entity",o.widgetsBundle)("standalone",!0),l(3),m("disabled",C(17,13,o.isLoading$)),l(2),j(" ",C(19,15,"action.cancel")," "),l(2),m("disabled",C(21,17,o.isLoading$)||(a.entityForm==null?null:a.entityForm.invalid)||!(a.entityForm!=null&&a.entityForm.dirty)),l(2),j(" ",C(23,19,"action.add")," ")}},dependencies:[ce,yt,Pe,Se,Jr,ir,gr,Dn,ur,We,Qa,jt,a7,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]     tb-widgets-bundle .mat-padding{padding:0}']});let n=t;return n})();function Xve(n,t){n&1&&(d(0,"span",7),g(1,"widgets-bundle.system"),p())}function Zve(n,t){if(n&1){let r=B();d(0,"mat-option",8),T("click",function(i){D(r);let o=b();return M(o.openWidgetsBundleDialog(i))}),d(1,"a",9),g(2,"widgets-bundle.create-new"),p()()}n&2&&m("value",null)}function Jve(n,t){n&1&&O(0,"mat-option",11),n&2&&m("value",null)}function eye(n,t){if(n&1&&x(0,Jve,1,1,"mat-option",10),n&2){let r=b
185();m("ngIf",!r.required)}}function tye(n,t){n&1&&(d(0,"span",7),g(1,"widgets-bundle.system"),p())}function iye(n,t){if(n&1&&(d(0,"mat-option",11)(1,"div",3)(2,"span"),g(3),p(),x(4,tye,2,0,"span",4),p()()),n&2){let r=t.$implicit,e=b();m("value",r),l(3),z(r.title),l(),m("ngIf",e.isSystem(r))}}var p0=class p0{constructor(t,r,e,i,o){this.store=t,this.widgetService=r,this.dialog=e,this.userPermissionsService=i,this.cd=o,this.onTouched=()=>{},this.propagateChange=()=>{}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){this.onTouched=t}ngOnInit(){this.createNew=this.createNew&&this.userPermissionsService.hasGenericPermission(Ei.WIDGETS_BUNDLE,qo.CREATE),this.widgetsBundles$=this.getWidgetsBundles().pipe(W(t=>(em(this.store).edgesSupportEnabled||(t=t.filter(e=>e.alias!=="edge_widgets")),t)),et(t=>{this.widgetsBundles=t,this.selectFirstBundle&&t.length>0&&(this.widgetsBundle!==t[0]?(this.widgetsBundle=t[0],this.updateView()):dt(this.selectBundleAlias)&&this.selectWidgetsBundleByAlias(this.selectBundleAlias))}),Si())}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];!e.firstChange&&e.currentValue!==e.previousValue&&r==="selectBundleAlias"&&this.selectWidgetsBundleByAlias(this.selectBundleAlias)}}setDisabledState(t){this.disabled=t}writeValue(t){this.widgetsBundle=t}widgetsBundleChanged(){this.updateView()}isSystem(t){return t&&t.tenantId.id===Oa}selectWidgetsBundleByAlias(t){if(this.widgetsBundles&&t){let r=this.widgetsBundles.find(e=>e.alias===t);r&&this.widgetsBundle!==r&&(this.widgetsBundle=r,this.updateView())}else this.widgetsBundle&&(this.widgetsBundle=null,this.updateView())}updateView(){this.propagateChange(this.widgetsBundle)}getWidgetsBundles(){let t;return this.bundlesScope?this.bundlesScope==="system"?t=this.widgetService.getSystemWidgetsBundles():this.bundlesScope==="tenant"&&(t=this.widgetService.getTenantWidgetsBundles()):t=this.widgetService.getAllWidgetsBundles(),this.excludeBundleIds&&this.excludeBundleIds.length&&(t=t.pipe(W(r=>r.filter(e=>!this.excludeBundleIds.includes(e.id.id))))),t}compareById(t,r){return t&&r&&t.id.id===r.id.id}openWidgetsBundleDialog(t){t.preventDefault();let r={title:"",image:"",description:"",scada:!0,order:null};this.dialog.open(s7,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{widgetsBundle:r}}).afterClosed().subscribe(e=>{e&&(this.widgetsBundles$=Z([...this.widgetsBundles,e]),this.widgetsBundle=e,this.widgetsBundleChanged())})}};p0.\u0275fac=function(r){return new(r||p0)(h(ve),h(Cp),h(Lr),h(So),h(Me))},p0.\u0275cmp=L({type:p0,selectors:[["tb-widgets-bundle-select"]],inputs:{bundlesScope:"bundlesScope",selectFirstBundle:"selectFirstBundle",selectBundleAlias:"selectBundleAlias",required:"required",disabled:"disabled",excludeBundleIds:"excludeBundleIds",createNew:"createNew"},features:[ne([{provide:ye,useExisting:he(()=>p0),multi:!0}]),lt],decls:13,vars:14,consts:[["empty",""],[1,"mat-block"],["panelClass","tb-widgets-bundle-select",3,"ngModelChange","blur","required","disabled","ngModel","placeholder","compareWith"],[1,"tb-bundle-item"],["translate","","class","tb-bundle-system",4,"ngIf"],[3,"value","click",4,"ngIf","ngIfElse"],[3,"value",4,"ngFor","ngForOf"],["translate","",1,"tb-bundle-system"],[3,"click","value"],["translate",""],[3,"value",4,"ngIf"],[3,"value"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",1)(1,"mat-select",2),v(2,"translate"),bi("ngModelChange",function(a){return D(i),gi(e.widgetsBundle,a)||(e.widgetsBundle=a),M(a)}),T("blur",function(){return D(i),M(e.onTouched())})("ngModelChange",function(){return D(i),M(e.widgetsBundleChanged())}),d(3,"mat-select-trigger")(4,"div",3)(5,"span"),g(6),p(),x(7,Xve,2,0,"span",4),p()(),x(8,Zve,3,1,"mat-option",5)(9,eye,1,1,"ng-template",null,0,kt)(11,iye,5,3,"mat-option",6),v(12,"async"),p()()}if(r&2){let i=me(10);l(),te("placeholder",C(2,10,"widget.select-widgets-bundle")),m("required",e.required)("disabled",e.disabled),fi("ngModel",e.widgetsBundle),m("compareWith",e.compareById),l(5),z(e.widgetsBundle==null?null:e.widgetsBundle.title),l(),m("ngIf",e.isSystem(e.widgetsBundle)),l(),m("ngIf",e.createNew)("ngIfElse",i),l(3),m("ngForOf",C(12,12,e.widgetsBundles$))}},dependencies:[Ke,ce,jt,ze,Kn,Fb,xt,xe,St,eo,Ve,be],styles:[`@charset "UTF-8";.tb-widgets-bundle-select .mdc-list-item__primary-text{width:100%}tb-widgets-bundle-select .mat-mdc-select-arrow{width:18px}tb-widgets-bundle-select .tb-bundle-item .tb-bundle-system,.tb-widgets-bundle-select .tb-bundle-item .tb-bundle-system{float:right;font-size:.8rem;opacity:.8}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper{border-radius:0}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{background:#fff3;padding:5px 20px!important;min-height:44.5px}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-select .mat-mdc-select-trigger{height:34.5px}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-select .mat-mdc-select-trigger .mat-mdc-select-value{vertical-align:middle;min-height:30px;height:30px;padding:2px 2px 1px}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-select .mat-mdc-select-trigger .mat-mdc-select-value .mat-mdc-select-value-text{font-size:1.2rem;color:#fff}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-select .mat-mdc-select-arrow{width:18px}@media screen and (max-width: 599px){mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{width:auto}}mat-toolbar tb-widgets-bundle-select .mat-mdc-text-field-wrapper .mdc-line-ripple{display:none}mat-toolbar tb-widgets-bundle-select .mat-mdc-form-field-subscript-wrapper{display:none}mat-toolbar tb-widgets-bundle-select .mat-mdc-form-field.mat-focused.mat-primary .mat-mdc-select-arrow-wrapper .mat-mdc-select-arrow{color:#fff}
186`],encapsulation:2});var Km=p0;pe([fe(),le("design:type",Boolean)],Km.prototype,"selectFirstBundle",void 0);pe([fe(),le("design:type",Boolean)],Km.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Km.prototype,"createNew",void 0);var rye={};Ae(rye,{KeyboardShortcutPipe:()=>Tk});y();var Tk=(()=>{let t=class t{constructor(e){this.window=e}transform(e){if(!e)return;let i=e.split("-"),o=/Mac OS X/.test(this.window.navigator.userAgent),a=!o||i.length>2?"+":"",s={M:o?"\u2318":"Ctrl",A:o?"Option":"Alt",S:"Shift"};return i.map((c,u)=>u===i.length-1?c:s[c]).join(a)}};t.\u0275fac=function(i){return new(i||t)(h(Wr,16))},t.\u0275pipe=_r({name:"keyboardShortcut",type:t,pure:!0});let n=t;return n})();var bye={};Ae(bye,{EntityTypeListComponent:()=>Xm});y();var oye=["entityTypeInput"],aye=["entityTypeAutocomplete"],sye=["chipList"],lye=[[["","matSuffix",""]]],cye=["[matSuffix]"],dye=n=>({entityType:n});function pye(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
186();l(),j(" ",r.label,"")}}function mye(n,t){n&1&&(d(0,"mat-icon",14),g(1,"close"),p())}function uye(n,t){if(n&1){let r=B();d(0,"mat-chip-row",12),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,mye,2,0,"mat-icon",13),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",r.name," "),l(),m("ngIf",!e.disabled)}}function hye(n,t){if(n&1&&(d(0,"mat-option",15),O(1,"span",16),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function fye(n,t){if(n&1&&(d(0,"mat-option",15)(1,"span"),g(2),v(3,"async"),p()()),n&2){let r=b();m("value",null),l(2),j(" ",C(3,2,r.translate.get("entity.no-entity-types-matching",Xe(4,dye,r.searchText)))," ")}}function gye(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"entity.entity-type-list-required")," "))}var m0=class m0{get required(){return this.requiredValue}set required(t){this.requiredValue!==t&&(this.requiredValue=t,this.updateValidators())}constructor(t,r,e,i){this.store=t,this.translate=r,this.entityService=e,this.fb=i,this.appearance="fill",this.floatLabel="auto",this.subscriptSizing="fixed",this.allEntityTypeList=[],this.entityTypeList=[],this.searchText="",this.dirty=!1,this.propagateChange=o=>{},this.entityTypeListFormGroup=this.fb.group({entityTypeList:[this.entityTypeList,this.required?[ke.required]:[]],entityType:[null]})}updateValidators(){this.entityTypeListFormGroup.get("entityTypeList").setValidators(this.required?[ke.required]:[]),this.entityTypeListFormGroup.get("entityTypeList").updateValueAndValidity()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.emptyInputPlaceholder?this.placeholder=this.emptyInputPlaceholder:this.placeholder=this.required?this.translate.instant("entity.enter-entity-type"):this.translate.instant("entity.any-entity"),this.filledInputPlaceholder?this.secondaryPlaceholder=this.filledInputPlaceholder:this.secondaryPlaceholder="+"+this.translate.instant("entity.entity-type");let t;this.ignoreAuthorityFilter&&this.allowedEntityTypes&&this.allowedEntityTypes.length?(t=[],this.allowedEntityTypes.forEach(r=>{t.push(r)})):t=this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes),t.forEach(r=>{this.allEntityTypeList.push({name:this.translate.instant(ta.get(r).type),value:r})}),this.filteredEntityTypeList=this.entityTypeListFormGroup.get("entityType").valueChanges.pipe(et(r=>{r&&typeof r!="string"?this.add(r):r===null&&this.clear(this.entityTypeInput.nativeElement.value)}),Pi(r=>typeof r=="string"),W(r=>r||""),Ft(r=>this.fetchEntityTypes(r)),Si())}ngAfterViewInit(){}setDisabledState(t){this.disabled=t,t?this.entityTypeListFormGroup.disable({emitEvent:!1}):this.entityTypeListFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="",t!=null&&t.length>0?(this.modelValue=[...t],this.entityTypeList=[],t.forEach(r=>{this.entityTypeList.push({name:ta.has(r)?this.translate.instant(ta.get(r).type):"Unknown",value:r})}),this.entityTypeListFormGroup.get("entityTypeList").setValue(this.entityTypeList)):(this.entityTypeList=[],this.entityTypeListFormGroup.get("entityTypeList").setValue(this.entityTypeList),this.modelValue=null),this.dirty=!0}add(t){(!this.modelValue||this.modelValue.indexOf(t.value)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(t.value),this.entityTypeList.push(t),this.entityTypeListFormGroup.get("entityTypeList").setValue(this.entityTypeList)),this.propagateChange(this.modelValue),this.clear()}remove(t){let r=this.entityTypeList.indexOf(t);r>=0&&(this.entityTypeList.splice(r,1),this.entityTypeListFormGroup.get("entityTypeList").setValue(this.entityTypeList),this.modelValue.splice(r,1),this.modelValue.length||(this.modelValue=null),this.propagateChange(this.modelValue),this.clear())}displayEntityTypeFn(t){return t?t.name:void 0}fetchEntityTypes(t){this.searchText=t;let r=this.allEntityTypeList;return t&&t.length&&(r=this.allEntityTypeList.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()))),Z(r)}onFocus(){this.dirty&&(this.entityTypeListFormGroup.get("entityType").updateV
186alueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}clear(t=""){this.entityTypeInput.nativeElement.value=t,this.entityTypeListFormGroup.get("entityType").patchValue(t,{emitEvent:!0}),setTimeout(()=>{this.entityTypeInput.nativeElement.blur(),this.entityTypeInput.nativeElement.focus()},0)}};m0.\u0275fac=function(r){return new(r||m0)(h(ve),h(Ge),h(rr),h(Ai))},m0.\u0275cmp=L({type:m0,selectors:[["tb-entity-type-list"]],viewQuery:function(r,e){if(r&1&&(ae(oye,5),ae(aye,5),ae(sye,7)),r&2){let i;Q(i=K())&&(e.entityTypeInput=i.first),Q(i=K())&&(e.entityTypeAutocomplete=i.first),Q(i=K())&&(e.chipList=i.first)}},inputs:{required:"required",additionalClasses:"additionalClasses",appearance:"appearance",label:"label",floatLabel:"floatLabel",disabled:"disabled",subscriptSizing:"subscriptSizing",allowedEntityTypes:"allowedEntityTypes",emptyInputPlaceholder:"emptyInputPlaceholder",filledInputPlaceholder:"filledInputPlaceholder",ignoreAuthorityFilter:"ignoreAuthorityFilter"},features:[ne([{provide:ye,useExisting:he(()=>m0),multi:!0}])],ngContentSelectors:cye,decls:17,vars:20,consts:[["chipList",""],["entityTypeInput","","origin","matAutocompleteOrigin"],["entityTypeAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup","appearance","floatLabel","subscriptSizing"],[4,"ngIf"],["formControlName","entityTypeList"],[3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","entityType","matAutocompleteOrigin","",2,"max-width","200px",3,"focusin","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],["matSuffix",""],[3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();Ct(lye),d(0,"mat-form-field",3),x(1,pye,2,1,"mat-label",4),d(2,"mat-chip-grid",5,0),x(4,uye,3,3,"mat-chip-row",6),d(5,"input",7,1),T("focusin",function(){return D(i),M(e.onFocus())}),p()(),d(8,"mat-autocomplete",8,2),x(10,hye,3,5,"mat-option",9),v(11,"async"),x(12,fye,4,6,"mat-option",10),v(13,"async"),p(),d(14,"div",11),Fe(15),p(),x(16,gye,3,3,"mat-error",4),p()}if(r&2){let i,o=me(3),a=me(7),s=me(9);bt(e.additionalClasses),te("subscriptSizing",e.subscriptSizing),m("formGroup",e.entityTypeListFormGroup)("appearance",e.appearance)("floatLabel",e.floatLabel),l(),m("ngIf",e.label),l(3),m("ngForOf",e.entityTypeList),l(),te("placeholder",e.disabled?"":!e.entityTypeList||!e.entityTypeList.length?e.placeholder:e.secondaryPlaceholder),m("matAutocompleteConnectedTo",a)("matAutocomplete",s)("matChipInputFor",o),l(3),m("displayWith",e.displayEntityTypeFn),l(2),m("ngForOf",C(11,16,e.filteredEntityTypeList)),l(2),m("ngIf",!((i=C(13,18,e.filteredEntityTypeList))!=null&&i.length)),l(4),m("ngIf",e.entityTypeListFormGroup.get("entityTypeList").hasError("required"))}},dependencies:[Ke,ce,Se,at,ze,At,ni,Yt,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi],encapsulation:2});var Xm=m0;pe([fe(),le("design:type",Boolean),le("design:paramtypes",[Boolean])],Xm.prototype,"required",null);pe([pd(),le("design:type",Array)],Xm.prototype,"additionalClasses",void 0);pe([fe(),le("design:type",Boolean)],Xm.prototype,"ignoreAuthorityFilter",void 0);var kye={};Ae(kye,{EntitySubTypeListComponent:()=>wh});y();var _ye=["entitySubtypeInput"],vye=["entitySubtypeAutocomplete"],yye=["chipList"],Cye=[[["","matSuffix",""]]],wye=["[matSuffix]"];function xye(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
186();l(),z(r.label)}}function Sye(n,t){n&1&&(d(0,"mat-icon",13),g(1,"close"),p())}function Tye(n,t){if(n&1){let r=B();d(0,"mat-chip-row",11),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,Sye,2,0,"mat-icon",12),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",e.customTranslate(r)," "),l(),m("ngIf",!e.disabled)}}function Eye(n,t){if(n&1&&(d(0,"mat-option",14),O(1,"span",15),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r,e.searchText),Ut)}}function Iye(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.subtypeListEmptyText)," ")}}var u0=class u0{get required(){return this.requiredValue}set required(t){this.requiredValue!==t&&(this.requiredValue=t,this.updateValidators())}constructor(t,r,e,i,o,a){this.broadcast=t,this.translate=r,this.alarmService=e,this.utils=i,this.fb=o,this.entityService=a,this.floatLabel="auto",this.appearance="fill",this.subscriptSizing="fixed",this.entitySubtypeList=[],this.separatorKeysCodes=[13,188,186],this.searchText="",this.dirty=!1,this.propagateChange=s=>{},this.hasPageDataEntitySubTypes=new Set([G.ALARM]),this.entitySubtypeListFormGroup=this.fb.group({entitySubtypeList:[this.entitySubtypeList,this.required?[ke.required]:[]],entitySubtype:[null]})}updateValidators(){this.entitySubtypeListFormGroup.get("entitySubtypeList").setValidators(this.required?[ke.required]:[]),this.entitySubtypeListFormGroup.get("entitySubtypeList").updateValueAndValidity()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){switch(this.entityType){case G.ASSET:this.placeholder=this.required?this.translate.instant("asset.enter-asset-type"):this.translate.instant("asset.any-asset"),this.secondaryPlaceholder="+"+this.translate.instant("asset.asset-type"),this.noSubtypesMathingText="asset.no-asset-types-matching",this.subtypeListEmptyText="asset.asset-type-list-empty",this.broadcastSubscription=this.broadcast.on("assetSaved",()=>{this.entitySubtypes=null});break;case G.DEVICE:this.placeholder=this.required?this.translate.instant("device.enter-device-type"):this.translate.instant("device.any-device"),this.secondaryPlaceholder="+"+this.translate.instant("device.device-type"),this.noSubtypesMathingText="device.no-device-types-matching",this.subtypeListEmptyText="device.device-profile-type-list-empty",this.broadcastSubscription=this.broadcast.on("deviceSaved",()=>{this.entitySubtypes=null});break;case G.ENTITY_VIEW:this.placeholder=this.required?this.translate.instant("entity-view.enter-entity-view-type"):this.translate.instant("entity-view.any-entity-view"),this.secondaryPlaceholder="+"+this.translate.instant("entity-view.entity-view-type"),this.noSubtypesMathingText="entity-view.no-entity-view-types-matching",this.subtypeListEmptyText="entity-view.entity-view-type-list-empty",this.broadcastSubscription=this.broadcast.on("entityViewSaved",()=>{this.entitySubtypes=null});break;case G.EDGE:this.placeholder=this.required?this.translate.instant("edge.enter-edge-type"):this.translate.instant("edge.any-edge"),this.secondaryPlaceholder="+"+this.translate.instant("edge.edge-type"),this.noSubtypesMathingText="edge.no-edge-types-matching",this.subtypeListEmptyText="edge.edge-type-list-empty",this.broadcastSubscription=this.broadcast.on("edgeSaved",()=>{this.entitySubtypes=null});break;case G.ALARM:this.placeholder=this.required?this.translate.instant("alarm.enter-alarm-type"):this.translate.instant("alarm.any-type"),this.secondaryPlaceholder="+"+this.translate.instant("alarm.alarm-type"),this.noSubtypesMathingText="alarm.no-alarm-types-matching",this.subtypeListEmptyText="alarm.alarm-type-list-empty";break}this.emptyInputPlaceholder&&(this.placeholder=this.emptyInputPlaceholder),this.filledInputPlaceholder&&(this.secondaryPlaceholder=this.filledInputPlaceholder),this.filteredEntitySubtypeList=this.entitySubtypeListFormGroup.get("entitySubtype").valueChanges.pipe(Wi(150),W(t=>t||""),Ft(t=>this.fetchEntitySubtypes(t)),Si())}ngAfterViewInit(){}ngOnDestroy(){this.broadcastSubscription&&this.broadcastSubscription.unsubscribe()}setDisabledState(t){this.disabled=t,t?this.entitySubtypeListFormGroup.disable({emitEvent:!1}):this.entitySubtypeListFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="",t!=null&&t.length>0?(this.modelValue=[...t],this.entitySubtypeList=[...t],this.entitySubtypeListFormGroup.get("entitySubtypeList").setValue(this.entitySubtypeList)):(this.entitySubtypeList=[],this.entitySubtypeListFormGroup.get("entitySubtypeList").setValue(this.entitySubtypeList),this.modelValue=null),this.dirty=!0}add(t){(!this.modelValue||this.modelValue.indexOf(t)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(t),this.entitySubtypeList.push(t),this.entitySubtypeListFormGroup.get("entitySubtypeList").setValue(this.entitySubtypeList)),this.prop
186agateChange(this.modelValue)}chipAdd(t){let r=(t.value||"").trim();r&&(this.add(r),this.clear(""))}addOnBlur(t){if(!t.relatedTarget)return;let r=this.entitySubtypeInput.nativeElement.value;this.chipAdd({value:r})}remove(t){let r=this.entitySubtypeList.indexOf(t);r>=0&&(this.entitySubtypeList.splice(r,1),this.entitySubtypeListFormGroup.get("entitySubtypeList").setValue(this.entitySubtypeList),this.modelValue.splice(r,1),this.modelValue.length||(this.modelValue=null),this.propagateChange(this.modelValue))}selected(t){this.add(t.option.viewValue),this.clear("")}displayEntitySubtypeFn(t){return t||void 0}fetchEntitySubtypes(t){return this.searchText=t,this.getEntitySubtypes(t).pipe(W(r=>{let e;return this.hasPageDataEntitySubTypes.has(this.entityType)?e=r:e=r.filter(i=>t?i.toUpperCase().startsWith(t.toUpperCase()):!0),!e.length&&t.length&&(e=[t]),e}))}getEntitySubtypes(t){if(this.hasPageDataEntitySubTypes.has(this.entityType)){let r=new On(25,0,t),e;switch(this.entityType){case G.ALARM:e=this.alarmService.getAlarmTypes(r,{ignoreLoading:!0});break}if(e)this.entitySubtypes=e.pipe(W(i=>i.data.map(o=>o.type)));else return zr(null)}if(!this.entitySubtypes){let r=this.entityService.getEntitySubtypesObservable(this.entityType);if(r)this.entitySubtypes=r.pipe(Si({connector:()=>new or(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!0}));else return zr(null)}return this.entitySubtypes}onFocus(){this.dirty&&(this.entitySubtypeListFormGroup.get("entitySubtype").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}clear(t=""){this.entitySubtypeInput.nativeElement.value=t,this.entitySubtypeListFormGroup.get("entitySubtype").patchValue(t,{emitEvent:!0}),setTimeout(()=>{this.entitySubtypeInput.nativeElement.blur(),this.entitySubtypeInput.nativeElement.focus()},0)}customTranslate(t){return this.utils.customTranslation(t,t)}};u0.\u0275fac=function(r){return new(r||u0)(h(Zd),h(Ge),h(KI),h(vn),h(Ai),h(rr))},u0.\u0275cmp=L({type:u0,selectors:[["tb-entity-subtype-list"]],viewQuery:function(r,e){if(r&1&&(ae(_ye,5),ae(vye,5),ae(yye,7)),r&2){let i;Q(i=K())&&(e.entitySubtypeInput=i.first),Q(i=K())&&(e.entitySubtypeAutocomplete=i.first),Q(i=K())&&(e.chipList=i.first)}},inputs:{required:"required",floatLabel:"floatLabel",label:"label",disabled:"disabled",entityType:"entityType",emptyInputPlaceholder:"emptyInputPlaceholder",filledInputPlaceholder:"filledInputPlaceholder",appearance:"appearance",subscriptSizing:"subscriptSizing",additionalClasses:"additionalClasses"},features:[ne([{provide:ye,useExisting:he(()=>u0),multi:!0}])],ngContentSelectors:wye,decls:15,vars:20,consts:[["chipList",""],["entitySubtypeInput","","origin","matAutocompleteOrigin"],["entitySubtypeAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup","floatLabel","appearance","subscriptSizing"],[4,"ngIf"],["formControlName","entitySubtypeList"],["class","tb-chip-row-ellipsis",3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","entitySubtype","matAutocompleteOrigin","",2,"max-width","200px",3,"focusin","blur","matChipInputTokenEnd","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"tb-autocomplete",3,"optionSelected","displayWith"],[3,"value",4,"ngFor","ngForOf"],["matSuffix",""],[1,"tb-chip-row-ellipsis",3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();Ct(Cye),d(0,"mat-form-field",3),x(1,xye,2,1,"mat-label",4),d(2,"mat-chip-grid",5,0),x(4,Tye,3,3,"mat-chip-row",6),d(5,"input",7,1),T("focusin",function(){return D(i),M(e.onFocus())})("blur",function(a){return D(i),M(e.addOnBlur(a))})("matChipInputTokenEnd",function(a){return D(i),M(e.chipAdd(a))}),p()(),d(8,"mat-autocomplete",8,2),T("optionSelected",function(a){return D(i),M(e.selected(a))}),x(10,Eye,3,5,"mat-option",9),v(11,"async"),p(),d(12,"div",10),Fe(13),p(),x(14,Iye,3,3,"mat-error",4),p()}if(r&2){let i=me(3),o=me(7),a=me(9);bt(e.additionalClasses),Y("tb-chip-list",!e.label),m("formGroup",e.entitySubtypeListFormGroup)("floatLabel",e.floatLabel)("appearance",e.appearance)("subscriptSizing",e.subscriptSizing),l(),m("ngIf",e.label),l(3),m("ngForOf",e.entitySubtypeList),l(),te("placeholder",e.disabled?"":!e.entitySubtypeList||!e.entitySubtypeList.length?e.placeholder:e.secondaryPlaceholder),m("matAutocompleteConnectedTo",o)("matAutocomplete",a)("matChipInputFor",i)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes),l(3),m("displayWith",e.displayEntitySubtypeFn),l(2),m("ngForOf",C(11,18,e.filteredEntitySubtypeList)),l(4),m("ngIf",e.entitySubtypeListFormGroup.get("entitySubtypeList").hasError("required"))}},dependencies:[Ke,ce,Se,at,ze,At,ni,Yt,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi],encapsulation:2});var wh=u0;pe([fe(),le("design:type",Boolean),le("design:paramtypes",[Boolean])],wh.prototype,"required",null);pe([pd(),le("design:type",Array)],wh.prototype,"additionalClasses",void 0);var Dye={};Ae(Dye,{TbJsonPipe:()=>H1});y();var H1=(()=>{let t=class t{transform(e){return Co(e)?JSON.stringify(e):mf(e)?e.toString():e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"tbJson",type:t,pure:!0});let n=t;return n})();var d7={};Ae(d7,{ColorInputComponent:()=>Js});y();y();y();function Mye(n,t){n&1&&(d(0,"mat-icon"),g(1,"check"),p())}function Aye(n,t){if(n&1){let r=B();d(0,"div",8),T("click",function(){let i=D(r).$implicit,o=b();return M(o.selectColor(i))}),d(1,"div",9)(2,"div",10)(3,"span"),g(4),p()(),d(5,"div",11)(6,"span"),g(7),p()(),d(8,"div",12),x(9,Mye,2,0,"mat-icon",6),p()()()}if(n&2){let r=t.$implicit,e=b();l(),_n(e.hueStyle(r)),l(3),z(r),l(3),z(e.colors[r]),l(2),m("ngIf",r===e.selectedHue)}}
186function Oye(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b();l(),fa("",r.selectedHue," (",r.colors[r.selectedHue],")")}}function Pye(n,t){n&1&&(d(0,"span",13),g(1,"color.no-color-selected"),p())}var q1=(()=>{let t=class t extends sn{constructor(e,i){super(e),this.store=e,this.wl=i,this.palette="primary",this.propagateChange=null}ngOnInit(){this.paletteInfo=this.palette==="primary"?GS:zS;let e=this.palette==="primary"?this.wl.primaryPalette:this.wl.accentPalette;this.paletteKey=["custom","tb-primary","tb-accent"].includes(e.type)?e.extends:e.type,this.hues=Object.keys(this.paletteInfo),this.colors={};for(let i of this.hues)this.colors[i]=Zp(this.paletteInfo[i])}hueStyle(e){if(e){let i=this.colors[e],o=Z5(this.paletteKey,e);return{backgroundColor:i,color:o}}else return{}}selectedColorStyle(){return this.selectedHue?{background:this.colors[this.selectedHue]}:{}}updateValidators(){}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.modelValue=e;let i=null;if(e){let o=Object.values(this.paletteInfo).indexOf(e);o>-1&&(i=this.hues[o])}this.selectedHue=i}selectColor(e){if(e){this.selectedHue=e;let i=this.paletteInfo[e];this.modelValue!==i&&(this.modelValue=i,this.propagateChange(this.modelValue))}}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(fl))},t.\u0275cmp=L({type:t,selectors:[["tb-theme-color-select"]],inputs:{palette:"palette"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),Ce],decls:8,vars:5,consts:[[1,"flex","h-full","flex-col"],[1,"tb-hue-container","flex","flex-col"],["class","tb-hue-row flex flex-row",3,"click",4,"ngFor","ngForOf"],[1,"tb-selected-hue"],[1,"tb-color-preview"],[1,"tb-color-result"],[4,"ngIf"],["translate","",4,"ngIf"],[1,"tb-hue-row","flex","flex-row",3,"click"],[1,"flex","flex-1","flex-row",2,"padding","10px"],[1,"flex","flex-row","items-center","justify-start",2,"width","100px"],[1,"flex","flex-1","flex-col","items-center","justify-center"],[1,"flex","flex-row","items-center","justify-end",2,"width","100px"],["translate",""]],template:function(i,o){i&1&&(d(0,"div",0)(1,"div",1),x(2,Aye,10,5,"div",2),p(),d(3,"div",3)(4,"div",4),O(5,"div",5),p(),x(6,Oye,2,2,"span",6)(7,Pye,2,0,"span",7),p()()),i&2&&(l(2),m("ngForOf",o.hues),l(3),_n(o.selectedColorStyle()),l(),m("ngIf",o.selectedHue),l(),m("ngIf",!o.selectedHue))},dependencies:[Ke,ce,jt,Se],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-hue-container[_ngcontent-%COMP%]{overflow-y:auto}[_nghost-%COMP%]   .tb-hue-row[_ngcontent-%COMP%]{height:48px;cursor:pointer;font-weight:500;outline:none;position:relative}[_nghost-%COMP%]   .tb-hue-row[_ngcontent-%COMP%]:after{position:absolute;inset:0;background:#000;opacity:.1}[_nghost-%COMP%]   .tb-hue-row[_ngcontent-%COMP%]:hover:after{content:""}[_nghost-%COMP%]   .tb-selected-hue[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:48px;height:48px;font-weight:500;color:#000000de;border:solid 1px #ccc;border-radius:4px;margin-top:4px}[_nghost-%COMP%]   .tb-selected-hue[_ngcontent-%COMP%]   .tb-color-preview[_ngcontent-%COMP%]{margin-left:8px;margin-right:8px}'],changeDetection:0});let n=t;return n})();y();y();var l7={};Ae(l7,{CopyButtonComponent:()=>Ip});y();function Fye(n,t){if(n&1&&(d(0,"tb-icon"),g(1),p()),n&2){let r=b
186();_n(r.style),l(),j(" ",r.icon||r.mdiIcon," ")}}function Nye(n,t){if(n&1&&(d(0,"mat-icon",3),g(1,"done"),p()),n&2){let r=b();_n(r.style)}}var Uv=class Uv{constructor(t,r,e){this.clipboardService=t,this.translate=r,this.cd=e,this.copied=!1,this.disabled=!1,this.style={},this.miniButton=!0,this.successCopied=new J}copy(t){t.stopPropagation(),this.timer&&clearTimeout(this.timer),this.clipboardService.copy(this.copyText),this.successCopied.emit(this.copyText),this.copied=!0,this.timer=setTimeout(()=>{this.copied=!1,this.cd.detectChanges()},1500)}get matTooltipText(){return this.copied?this.translate.instant("ota-update.copied"):this.tooltipText}get matTooltipPosition(){return this.copied?"below":this.tooltipPosition}};Uv.\u0275fac=function(r){return new(r||Uv)(h(ZE),h(Ge),h(Me))},Uv.\u0275cmp=L({type:Uv,selectors:[["tb-copy-button"]],inputs:{copyText:"copyText",disabled:"disabled",mdiIcon:"mdiIcon",icon:"icon",tooltipText:"tooltipText",tooltipPosition:"tooltipPosition",style:"style",color:"color",miniButton:"miniButton"},outputs:{successCopied:"successCopied"},decls:4,vars:8,consts:[["copiedTemplate",""],["mat-icon-button","","type","button",3,"click","color","disabled","matTooltip","matTooltipPosition"],[3,"style",4,"ngIf","ngIfElse"],[1,"copied"]],template:function(r,e){if(r&1){let i=B();d(0,"button",1),T("click",function(a){return D(i),M(e.copy(a))}),x(1,Fye,2,3,"tb-icon",2)(2,Nye,2,2,"ng-template",null,0,kt),p()}if(r&2){let i=me(3);Y("mini-button",e.miniButton),m("color",e.color)("disabled",e.disabled)("matTooltip",e.matTooltipText)("matTooltipPosition",e.matTooltipPosition),l(),m("ngIf",!e.copied)("ngIfElse",i)}},dependencies:[ce,Pe,Se,zt,In],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mini-button[_ngcontent-%COMP%]{height:32px;width:32px;line-height:32px;padding:4px;vertical-align:middle}[_nghost-%COMP%]   .mat-icon.copied[_ngcontent-%COMP%]{color:#00c851!important}[_nghost-%COMP%]:hover   .mat-icon[_ngcontent-%COMP%]{color:var(--tb-primary-500)!important}']});var Ip=Uv;pe([fe(),le("design:type",Object)],Ip.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],Ip.prototype,"miniButton",void 0);function Vye(n,t){if(n&1){let r=B();d(0,"mat-form-field",8)(1,"input",9,1),T("keyup",function(i){D(r);let o=me(2),a=b();return M(a.onHueInputChange(i,o.value))}),p(),d(3,"span",10),g(4,"%"),p()()}if(n&2){let r=b();l(),m("value",r.hueValue)}}var Hv=class Hv{constructor(){this.alpha=!0,this.colorChange=new J(!1),this.labelVisible=!1,this.prefixValue="#"}get value(){return this.color?this.color.toHexString(this.color.getRgba().alpha<1).replace("#",""):""}get copyColor(){return this.prefixValue+this.value}get hueValue(){return this.color?Math.round(this.color.getRgba().alpha*100).toString():""}onHueInputChange(t,r){let e=this.color.getRgba(),i=+r/100;if(e.getAlpha()!==i){let o=new Go().setRgba(e.red,e.green,e.blue,i).toHexString(!0);this.colorChange.emit(new Go(o))}}onInputChange(t,r){let e=r.replace("#","").toLowerCase();if(((t.keyCode===13||t.key.toLowerCase()==="enter")&&e.length===3||e.length===6||e.length===8)&&parseInt(e,16).toString(16).padStart(e.length,"0")===e&&this.value.toLowerCase()!==e){let a=new Go(`#${e}`);this.colorChange.emit(a)}}};Hv.\u0275fac=function(r){return new(r||Hv)},Hv.\u0275cmp=L({type:Hv,selectors:[["tb-hex-input"]],inputs:{color:"color",alpha:"alpha",labelVisible:"labelVisible",prefixValue:"prefixValue"},outputs:{colorChange:"colorChange"},decls:9,vars:7,consts:[["elRef",""],["hue",""],[1,"hex-input-container"],["subscriptSizing","dynamic",1,"hex-input"],["matPrefix",""],["matInput","","type","text",3,"keyup","value"],["matSuffix","","miniButton","false","tooltipPosition","above","icon","content_copy",1,"copy-button",3,"copyText","tooltipText"],["class","alpha-input","subscriptSizing","dynamic",4,"ngIf"],["subscriptSizing","dynamic",1,"alpha-input"],["matInput","","min","0","max","100",3,"keyup","value"],["matSuffix",""]],template:function(r,e){if(r&1){let i=B();d(0,"div",2)(1,"mat-form-field",3)(2,"span",4),g(3),p(),d(4,"input",5,0),T("keyup",function(a){D(i);let s=me(5);return M(e.onInputChange(a,s.value))}),p(),O(6,"tb-copy-button",6),v(7,"translate"),p(),x(8,Vye,5,1,"mat-form-field",7),p()}r&2&&(l(3),z(e.prefixValue),l(),m("value",e.value),l(2),te("tooltipText",C(7,5,"action.copy")),m("copyText",e.copyColor),l(2),m("ngIf",e.alpha))},dependencies:[ce,at,ze,Kd,Yt,Ip,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .hex-input-container[_ngcontent-%COMP%]{display:flex;gap:8px}[_nghost-%COMP%]   .hex-input[_ngcontent-%COMP%]{max-width:190px}[_nghost-%COMP%]   .alpha-input[_ngcontent-%COMP%]{min-width:60px;max-width:60px}[_nghost-%COMP%]     .mdc-text-field--filled:before, [_nghost-%COMP%]     .mat-mdc-form-field-focus-overlay:before{background-color:transparent!important}[_nghost-%COMP%]     .mat-mdc-form-field-icon-prefix, [_nghost-%COMP%]     .mdc-line-ripple, [_nghost-%COMP%]     .copy-button{opacity:.4}[_nghost-%COMP%]     .alpha-input .mat-mdc-text-field-wrapper{padding-left:0}'],changeDetection:0});var h0=Hv;pe([fe(),le("design:type",Object)],h0.prototype,"alpha",void 0);function Bye(n,t){if(n&1){let r=B();d(0,"alpha-component",6),bi("colorChange",function(i){D(r);let o=b();return gi(o.control.value,i)||(o.control.value=i),M(i)}),p()}
186if(n&2){let r=b();fi("color",r.control.value)}}function jye(n,t){if(n&1){let r=B();d(0,"rgba-input-component",16),bi("colorChange",function(i){D(r);let o=b();return gi(o.control.value,i)||(o.control.value=i),M(i)}),p()}if(n&2){let r=b();m("alpha",!r.disableAlpha),fi("color",r.control.value)}}function Gye(n,t){if(n&1){let r=B();d(0,"hsla-input-component",16),bi("colorChange",function(i){D(r);let o=b();return gi(o.control.value,i)||(o.control.value=i),M(i)}),p()}if(n&2){let r=b();m("alpha",!r.disableAlpha),fi("color",r.control.value)}}function zye(n,t){if(n&1){let r=B();d(0,"tb-hex-input",17),bi("colorChange",function(i){D(r);let o=b();return gi(o.control.value,i)||(o.control.value=i),M(i)}),p()}if(n&2){let r=b();m("alpha",!r.disableAlpha),fi("color",r.control.value)}}var Jl=function(n){return n.hex="hex",n.hexa="hexa",n.rgba="rgba",n.rgb="rgb",n.hsla="hsla",n.hsl="hsl",n.cmyk="cmyk",n}(Jl||{}),$ye=["#435B63","#F44336","#E89623","#F5DD00","#8BC34A","#4CAF50","#009688","#048AD3","#673AB7","#9C27B0","#E91E63","#6F113A","#A1ADB1","#F9A19B","#FFD190","#FFF59D","#C5E1A4","#A5D7A7","#80CBC3","#81C4E9","#B39CDB","#CD93D7","#F48FB1","#BC91A4"],f0=class f0{constructor(){this.disableAlpha=!1,this.presentations=[Jl.hex,Jl.rgba,Jl.hsla],this.control=new dd,this.presentationControl=new Ab(0),this.colorPresets=$ye.map(t=>Go.from(t)),this.subscriptions=[],this.propagateChange=t=>{},this.setValue=!1,this.subscriptions.push(this.control.valueChanges.subscribe(()=>{this.setValue?this.setValue=!1:this.updateModel()})),this.subscriptions.push(this.presentationControl.valueChanges.subscribe(()=>{this.updateModel()}))}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}writeValue(t){let r=this.isValidColorValue(t);this.setValue=r,this.control.setValueFrom(r?t:"#fff"),this.modelValue=t,this.control.initType===Jl.hexa?this.control.initType=Jl.hex:this.control.initType===Jl.rgb?this.control.initType=Jl.rgba:this.control.initType===Jl.hsl&&(this.control.initType=Jl.hsla),this.presentationControl.patchValue(this.presentations.indexOf(this.control.initType),{emitEvent:!1})}isValidColorValue(t){return t&&pl(t)&&t.trim().length>0}updateModel(){let t=this.getValueByType(this.control.value,this.presentations[this.presentationControl.value]);this.modelValue!==t&&(this.modelValue=t,this.propagateChange(t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions.length=0}getValueByType(t,r){switch(r){case Jl.hex:return t.toHexString(!this.disableAlpha&&this.control.value.getRgba().getAlpha()!==1);case Jl.rgba:return!this.disableAlpha&&this.control.value.getRgba().getAlpha()!==1?t.toRgbaString():t.toRgbString();case Jl.hsla:return!this.disableAlpha&&this.control.value.getRgba().getAlpha()!==1?t.toHslaString():t.toHslString();default:return this.disableAlpha?t.toRgbString():t.toRgbaString()}}};f0.\u0275fac=function(r){return new(r||f0)},f0.\u0275cmp=L({type:f0,selectors:[["tb-color-picker"]],inputs:{disableAlpha:"disableAlpha"},features:[ne([{provide:ye,useExisting:he(()=>f0),multi:!0}])],decls:22,vars:20,consts:[[1,"color-input-container"],[1,"saturation-component",3,"colorChange","color"],[1,"control-input-container"],[1,"control-component"],[1,"indicator-component",3,"colorType","color"],[1,"hue-alpha-range"],[3,"colorChange","color"],[3,"color","colorChange",4,"ngIf"],[1,"color-input-block"],[1,"presentation-select",3,"formControl"],[3,"value"],[1,"color-input",3,"ngSwitch"],["label","",3,"alpha","color","colorChange",4,"ngSwitchCase"],[3,"alpha","color","colorChange",4,"ngSwitchCase"],[1,"color-presets-block"],[1,"color-presets-component",3,"colorChange","columns","colorPresets","color"],["label","",3,"colorChange","alpha","color"],[3,"colorChange","alpha","color"]],template:function(r,e){r&1&&(d(0,"div",0)(1,"saturation-component",1),bi("colorChange",function(o){return gi(e.control.value,o)||(e.control.value=o),o}),p(),d(2,"div",2)(3,"div",3),O(4,"indicator-component",4),d(5,"div",5)(6,"hue-component",6),bi("colorChange",function(o){return gi(e.control.value,o)||(e.control.value=o),o}),p(),x(7,Bye,1,1,"alpha-component",7),p()(),d(8,"div",8)(9,"mat-select",9)(10,"mat-option",10),g(11,"HEX"),p(),d(12,"mat-option",10),g(13),p(),d(14,"mat-option",10),g(15),p()(),d(16,"div",11),x(17,jye,1,2,"rgba-input-component",12)(18,Gye,1,2,"hsla-input-component",12)(19,zye,1,2,"tb-hex-input",13),p()()()(),d(20,"div",14)(21,"color-presets-component",15),bi("colorChange",function(o){return gi(e.control.value,o)||(e.control.value=o),o}),p()()),r&2&&(l(),fi("color",e.control.value),l(3),m("colorType",e.presentations[e.presentationControl.value])("color",e.control.value),l(),Y("single-item",e.disableAlpha),l(),fi("color",e.control.value),l(),m("ngIf",!e.disableAlpha),l(2),m("formControl",e.presentationControl),l(),m("value",0),l(2),m("value",1),l(),z(e.disableAlpha?"RGB":"RGBA"),l(),m("value",2),l(),z(e.disableAlpha?"HSL":"HSLA"),l(),m("ngSwitch",e.presentations[e.presentationControl.value]),l(),m("ngSwitchCase","rgba"),l(),m("ngSwitchCase","hsla"),l(),m("ngSwitchCase","hex"),l(2),m("columns",6)("colorPresets",e.colorPresets),fi("color",e.control.value))}
186,dependencies:[ce,lf,cf,Kn,xt,xe,Br,Qu,Ku,Xu,ng,L_,Fw,op,h0],styles:['@charset "UTF-8";[_nghost-%COMP%]{width:100%;display:flex;flex-direction:column;gap:32px;overflow:auto}[_nghost-%COMP%]   .color-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}@media screen and (min-width: 600px) and (max-width: 959px){[_nghost-%COMP%]   .color-input-container[_ngcontent-%COMP%]{flex-direction:row;gap:12px}}[_nghost-%COMP%]   .control-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}@media screen and (min-width: 600px) and (max-width: 959px){[_nghost-%COMP%]   .control-input-container[_ngcontent-%COMP%]{width:100%;justify-content:center}}[_nghost-%COMP%]   .saturation-component[_ngcontent-%COMP%]{width:100%;height:238px;min-height:160px;border-radius:8px}@media screen and (min-width: 600px) and (max-width: 959px){[_nghost-%COMP%]   .saturation-component[_ngcontent-%COMP%]{max-height:160px}}[_nghost-%COMP%]   .control-component[_ngcontent-%COMP%]{max-height:48px;display:flex;gap:16px}[_nghost-%COMP%]   .control-component[_ngcontent-%COMP%]   .indicator-component[_ngcontent-%COMP%]{height:48px;width:48px;border-radius:8px;background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMUAFg9Gm0AAAAPSURBVAjXY2D4jxXhEgYAfr8P8QhChVEAAAAASUVORK5CYII=) repeat}[_nghost-%COMP%]   .control-component[_ngcontent-%COMP%]   .hue-alpha-range[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-direction:column;flex:1}[_nghost-%COMP%]   .control-component[_ngcontent-%COMP%]   .hue-alpha-range.single-item[_ngcontent-%COMP%]{justify-content:center}[_nghost-%COMP%]   .control-component[_ngcontent-%COMP%]   .hue-alpha-range[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{height:18px;overflow:hidden;border-radius:9px;border:1px solid rgba(0,0,0,.1)}[_nghost-%COMP%]   .color-input-block[_ngcontent-%COMP%]{height:56px;display:flex;align-items:center;gap:20px}[_nghost-%COMP%]   .color-input-block[_ngcontent-%COMP%]   .presentation-select[_ngcontent-%COMP%]{font-size:14px;width:56px}[_nghost-%COMP%]   .color-input-block[_ngcontent-%COMP%]   .color-input[_ngcontent-%COMP%]{flex:1;width:min-content}[_nghost-%COMP%]   .color-input-block[_ngcontent-%COMP%]   .color-input[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:initial}[_nghost-%COMP%]   .color-presets-block[_ngcontent-%COMP%]   .color-presets-component[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;gap:8px}@media screen and (max-width: 599px){[_nghost-%COMP%]   .color-presets-block[_ngcontent-%COMP%]   .color-presets-component[_ngcontent-%COMP%]{flex-direction:column}}[_nghost-%COMP%]     .saturation-component .pointer{border-width:2px;width:16px;height:16px}[_nghost-%COMP%]     indicator-component svg{transform:scale(.5);height:100%!important;vertical-align:baseline!important}[_nghost-%COMP%]     .hue-alpha-range alpha-component .pointer, [_nghost-%COMP%]     .hue-alpha-range hue-component .pointer{height:18px;width:18px;background:none;border:2px solid #fff}[_nghost-%COMP%]     .hue-alpha-range alpha-component .gradient-color, [_nghost-%COMP%]     .hue-alpha-range hue-component .gradient-color{border-radius:9px}[_nghost-%COMP%]     .color-presets-component .presets-row{gap:8px;justify-content:space-between}[_nghost-%COMP%]     .color-presets-component color-preset{height:20px;width:20px;border-radius:4px}@media screen and (max-width: 599px){[_nghost-%COMP%]     .color-presets-component color-preset{height:40px;width:48px}}@media screen and (min-width: 600px) and (max-width: 959px){[_nghost-%COMP%]     .color-presets-component color-preset{height:40px;width:40px}}']});var xh=f0;pe([fe(),le("design:type",Object)],xh.prototype,"disableAlpha",void 0);var c7=()=>({standalone:!0});function Hye(n,t){n&1&&Ti(0)}function qye(n,t){if(n&1){let r=B();d(0,"mat-tab-group",9),T("selectedIndexChange",function(i){D(r);let o=b();return M(o.selectedIndexChange(i))}),d(1,"mat-tab",10),v(2,"translate"),d(3,"div",11),x(4,Hye,1,0,"ng-container",12),p()(),d(5,"mat-tab",10),v(6,"translate"),d(7,"tb-theme-color-select",13),T("ngModelChange",function(i){D(r);let o=b();return M(o.onPrimaryColorChange(i))}),p()(),d(8,"mat-tab",10),v(9,"translate"),d(10,"tb-theme-color-select",14),T("ngModelChange",function(i){D(r);let o=b();return M(o.onAccentColorChange(i))}),p()()()}
186if(n&2){let r=b(),e=me(3);m("selectedIndex",r.colorMode==="color"?0:r.colorMode==="primary"?1:2),l(),te("label",C(2,9,"color.color-picker")),l(3),m("ngTemplateOutlet",e),l(),te("label",C(6,11,"color.primary-colors")),l(2),m("ngModel",r.primaryColor)("ngModelOptions",hn(15,c7)),l(),te("label",C(9,13,"color.accent-colors")),l(2),m("ngModel",r.accentColor)("ngModelOptions",hn(16,c7))}}function Wye(n,t){if(n&1&&O(0,"tb-color-picker",15),n&2){let r=b();m("disableAlpha",r.disableAlpha)("formControl",r.plainColorControl)}}function Yye(n,t){if(n&1){let r=B();d(0,"button",16),T("click",function(){D(r);let i=b();return M(i.clearColor())}),g(1),v(2,"translate"),p()}if(n&2){let r=b();m("disabled",!r.getColor()),l(),j(" ",C(2,2,"action.clear")," ")}}function Qye(n,t){if(n&1){let r=B();d(0,"button",17),T("click",function(){D(r);let i=b();return M(i.cancelColor())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"action.cancel")," "))}var qv=class qv extends sn{constructor(t){super(t),this.store=t,this.colorClearButton=!1,this.disableAlpha=!1,this.colorCancelButton=!1,this.colorSelected=new J,this.colorCancelDialog=new J,this.colorMode="color",this.plainColorControl=new Ab,this.dirty=!1,this.valid=!0,this.destroy$=new Te}ngOnInit(){this.plainColorControl.valueChanges.pipe(Be(this.destroy$)).subscribe(()=>{this.onPlainColorChange()}),this.useThemePalette?this.color&&this.color.startsWith("var(")?(this.colorMode="primary",Object.values(GS).indexOf(this.color)>-1?this.primaryColor=this.color:Object.values(zS).indexOf(this.color)>-1&&(this.colorMode="accent",this.accentColor=this.color),this.plainColorControl.patchValue(Zp(this.color),{emitEvent:!1})):this.plainColorControl.patchValue(this.color,{emitEvent:!1}):this.plainColorControl.patchValue(this.color,{emitEvent:!1})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),super.ngOnDestroy()}onPrimaryColorChange(t){this.primaryColor=t,this.accentColor=null,this.plainColorControl.patchValue(Zp(this.primaryColor),{emitEvent:!1}),this.dirty=!0,this.updateValidity()}onAccentColorChange(t){this.accentColor=t,this.primaryColor=null,this.plainColorControl.patchValue(Zp(this.accentColor),{emitEvent:!1}),this.dirty=!0,this.updateValidity()}onPlainColorChange(){this.primaryColor=null,this.accentColor=null,this.dirty=!0,this.updateValidity()}selectedIndexChange(t){switch(t){case 0:this.colorMode="color";break;case 1:this.colorMode="primary";break;case 2:this.colorMode="accent";break}this.dirty=!0,this.updateValidity()}updateValidity(){let t=this.getColor();this.valid=De(t)}selectColor(){let t=this.getColor();this.colorSelected.emit(t)}getColor(){switch(this.colorMode){case"color":return this.plainColorControl.value;case"primary":return this.primaryColor;case"accent":return this.accentColor}}clearColor(){this.colorSelected.emit(null)}cancelColor(){this.popover?this.popover.hide():this.colorCancelDialog.emit()}};qv.\u0275fac=function(r){return new(r||qv)(h(ve))},qv.\u0275cmp=L({type:qv,selectors:[["tb-color-picker-panel"]],inputs:{color:"color",colorClearButton:"colorClearButton",useThemePalette:"useThemePalette",disableAlpha:"disableAlpha",colorCancelButton:"colorCancelButton",popover:"popover"},outputs:{colorSelected:"colorSelected",colorCancelDialog:"colorCancelDialog"},features:[ne([]),Ce],decls:12,vars:10,consts:[["colorPicker",""],[1,"tb-color-picker-panel"],[3,"selectedIndex","selectedIndexChange",4,"ngIf","ngIfElse"],[1,"tb-color-picker-panel-buttons"],["mat-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],[1,"flex-1"],[1,"flex","flex-row","gap-2"],["mat-button","","type","button",3,"click",4,"ngIf"],["mat-raised-button","","color","primary","type","button",3,"click","disabled"],[3,"selectedIndexChange","selectedIndex"],[3,"label"],[1,"tb-color-picker-tab"],[4,"ngTemplateOutlet"],["palette","primary",3,"ngModelChange","ngModel","ngModelOptions"],["palette","accent",3,"ngModelChange","ngModel","ngModelOptions"],[1,"tb-color-picker",3,"disableAlpha","formControl"],["mat-button","","color","primary","type","button",3,"click","disabled"],["mat-button","","type","button",3,"click"]],template:function(r,e){if(r&1){let i=B();d(0,"div",1),x(1,qye,11,17,"mat-tab-group",2)(2,Wye,1,2,"ng-template",null,0,kt),d(4,"div",3),x(5,Yye,3,4,"button",4),O(6,"span",5),d(7,"div",6),x(8,Qye,3,3,"button",7),d(9,"button",8),T("click",function(){return D(i),M(e.selectColor())}),g(10),v(11,"translate"),p()()()()}if(r&2){let i=me(3);Y("singleTab",!e.useThemePalette),l(),m("ngIf",e.useThemePalette)("ngIfElse",i),l(4),m("ngIf",e.colorClearButton),l(3),m("ngIf",e.colorCancelButton),l(),m("disabled",!e.valid||!e.dirty),l(),j(" ",C(11,8,"action.select")," ")}},dependencies:[ce,fo,yt,y_,bw,xe,eo,Br,q1,xh,be],styles:[`@charset "UTF-8";.tb-color-picker-panel{width:342px;display:flex;flex-direction:column;max-height:calc(100vh - 24px);min-height:100%}@media screen and (min-width: 600px) and (max-width: 959px){.tb-color-picker-panel{width:578px}}.tb-color-picker-panel.singleTab{width:342px}@media screen and (min-width: 600px) and (max-width: 959px){.tb-color-picker-panel.singleTab{width:578px}}.tb-color-picker-panel .tb-color-picker-title{font-size:16px;font-weight:500;line-height:24px;letter-spacing:.25px;color:#000000de}.tb-color-picker-panel .mat-mdc-tab-body-wrapper{height:100%}.tb-color-picker-panel .mat-mdc-tab-group{width:100%;overflow:auto}.tb-color-picker-panel .tb-color-picker-tab{height:100%;padding:8px 0 0;display:flex}.tb-color-picker-panel .tb-color-picker{padding-right:4px;overflow-y:scroll}.tb-color-picker-panel .tb-color-picker-panel-buttons{height:60px;padding:8px 8px 0 0;display:flex;flex-direction:row;gap:16px;justify-content:space-between;align-items:flex-end}
187`],encapsulation:2});var Nc=qv;pe([fe(),le("design:type",Object)],Nc.prototype,"colorClearButton",void 0);pe([fe(),le("design:type",Boolean)],Nc.prototype,"useThemePalette",void 0);pe([fe(),le("design:type",Object)],Nc.prototype,"disableAlpha",void 0);pe([fe(),le("design:type",Object)],Nc.prototype,"colorCancelButton",void 0);var Kye=n=>({background:n}),Xye=()=>({});function Zye(n,t){if(n&1&&(d(0,"mat-icon"),g(1),p()),n&2){let r=b
187(3);l(),z(r.icon)}}function Jye(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b(3);l(),z(r.label)}}function eCe(n,t){if(n&1&&(d(0,"mat-label"),x(1,Zye,2,1,"mat-icon",4)(2,Jye,2,1,"span",4),p()),n&2){let r=b(2);l(),m("ngIf",r.icon),l(),m("ngIf",r.label)}}function tCe(n,t){if(n&1){let r=B();d(0,"button",9),T("click",function(){D(r);let i=b(2);return M(i.clear())}),d(1,"mat-icon",10),g(2,"close"),p()()}}function iCe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b(2);l(),j(" ",r.requiredText," ")}}function nCe(n,t){if(n&1){let r=B();d(0,"mat-form-field",3),x(1,eCe,3,2,"mat-label",4),d(2,"div",5),T("click",function(i){D(r);let o=b();return M(!o.disabled&&o.showColorPicker(i))}),O(3,"div",6),p(),d(4,"input",7),T("keydown",function(i){return D(r),M(i.preventDefault())})("click",function(i){D(r);let o=b();return M(o.openOnInput&&o.showColorPicker(i))}),p(),x(5,tCe,3,0,"button",8)(6,iCe,2,1,"mat-error",4),p()}if(n&2){let r=b();m("formGroup",r.colorFormGroup),l(),m("ngIf",r.icon||r.label),l(2),hi("background",r.colorFormGroup.get("color").value),l(),m("required",r.required),l(),m("ngIf",r.colorClearButton&&!r.disabled),l(),m("ngIf",r.colorFormGroup.get("color").hasError("required"))}}function rCe(n,t){if(n&1){let r=B();d(0,"button",11,1),T("click",function(i){D(r);let o=me(1),a=b();return M(a.openColorPickerPopup(i,o._elementRef))}),d(2,"div",12),O(3,"div",6),p()()}if(n&2){let r=b();Y("button-no-border",r.noBorder),m("disabled",r.disabled),l(2),Y("disabled",r.disabled),l(),_n(r.disabled?hn(9,Xye):Xe(7,Kye,r.colorFormGroup.get("color").value))}}var g0=class g0 extends sn{get required(){return this.requiredValue}set required(t){let r=mt(t);this.requiredValue!==r&&(this.requiredValue=r,this.updateValidators())}constructor(t,r,e,i,o,a,s,c){super(t),this.store=t,this.dialogs=r,this.popoverService=e,this.renderer=i,this.viewContainerRef=o,this.fb=a,this.cd=s,this.destroyRef=c,this.asBoxInput=!1,this.colorClearButton=!1,this.useThemePalette=!1,this.disableAlpha=!1,this.openOnInput=!1,this.noBorder=!1,this.readonly=!1,this.propagateChange=null}ngOnInit(){this.colorFormGroup=this.fb.group({color:[null,this.required?[ke.required]:[]]}),this.colorFormGroup.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateModel()})}updateValidators(){this.colorFormGroup&&(this.colorFormGroup.get("color").setValidators(this.required?[ke.required]:[]),this.colorFormGroup.get("color").updateValueAndValidity())}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,t?this.colorFormGroup.disable({emitEvent:!1}):this.colorFormGroup.enable({emitEvent:!1})}writeValue(t){this.modelValue=t,this.colorFormGroup.patchValue({color:this.modelValue},{emitEvent:!1})}updateModel(){let t=this.colorFormGroup.get("color").value;this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}showColorPicker(t){t.stopPropagation(),!this.disabled&&!this.readonly&&this.dialogs.colorPicker(this.colorFormGroup.get("color").value,this.colorClearButton,this.useThemePalette,this.disableAlpha).subscribe(r=>{r?.canceled||(this.colorFormGroup.patchValue({color:r?.color},{emitEvent:!0}),this.cd.markForCheck())})}openColorPickerPopup(t,r){if(t&&t.stopPropagation(),!this.disabled&&!this.readonly){let e=r?r.nativeElement:t.target;if(this.popoverService.hasPopover(e))this.popoverService.hidePopover(e);else{let i=this.popoverService.displayPopover({trigger:e,renderer:this.renderer,hostView:this.viewContainerRef,componentType:Nc,preferredPlacement:["leftTopOnly","leftOnly","leftBottomOnly"],context:{color:this.colorFormGroup.get("color").value,colorClearButton:this.colorClearButton,useThemePalette:this.useThemePalette,disableAlpha:this.disableAlpha,colorCancelButton:!0},showCloseButton:!1,popoverContentStyle:{padding:"12px 4px 12px 12px"},isModal:!0});i.tbComponentRef.instance.popover=i,i.tbComponentRef.instance.colorSelected.subscribe(o=>{i.hide(),this.colorFormGroup.patchValue({color:o},{emitEvent:!0}),this.cd.markForCheck()})}}}clear(){this.colorFormGroup.get("color").patchValue(null,{emitEvent:!0}),this.cd.markForCheck()}};g0.\u0275fac=function(r){return new(r||g0)(h(ve),h(Sa),h(Fa),h(Ni),h(ci),h(Wt),h(Me),h(En))},g0.\u0275cmp=L({type:g0,selectors:[["tb-color-input"]],inputs:{asBoxInput:"asBoxInput",icon:"icon",label:"label",requiredText:"requiredText",colorClearButton:"colorClearButton",useThemePalette:"useThemePalette",disableAlpha:"disableAlpha",openOn
187Input:"openOnInput",noBorder:"noBorder",required:"required",disabled:"disabled",readonly:"readonly"},features:[ne([{provide:ye,useExisting:he(()=>g0),multi:!0}]),Ce],decls:3,vars:2,consts:[["boxInput",""],["matButton",""],[3,"formGroup",4,"ngIf","ngIfElse"],[3,"formGroup"],[4,"ngIf"],["matPrefix","",1,"tb-color-preview",3,"click"],[1,"tb-color-result"],["matInput","","formControlName","color",3,"keydown","click","required"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],["type","button","mat-stroked-button","",1,"tb-box-button",3,"click","disabled"],[1,"tb-color-preview","no-margin","box"]],template:function(r,e){if(r&1&&x(0,nCe,7,7,"mat-form-field",2)(1,rCe,4,10,"ng-template",null,0,kt),r&2){let i=me(2);m("ngIf",!e.asBoxInput)("ngIfElse",i)}},dependencies:[ce,yt,Pe,Se,at,ze,At,ni,Kd,Yt,ut,xe,We,St,$e,Qe],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   .mat-mdc-form-field[_ngcontent-%COMP%]   mat-label[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:4px}[_nghost-%COMP%]   .tb-color-preview[_ngcontent-%COMP%]{margin-left:8px;margin-right:5px}[_nghost-%COMP%]   .tb-color-preview.no-margin[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .button-no-border[_ngcontent-%COMP%]{border:none}']});var Js=g0;pe([fe(),le("design:type",Object)],Js.prototype,"asBoxInput",void 0);pe([fe(),le("design:type",Object)],Js.prototype,"colorClearButton",void 0);pe([fe(),le("design:type",Object)],Js.prototype,"useThemePalette",void 0);pe([fe(),le("design:type",Object)],Js.prototype,"disableAlpha",void 0);pe([fe(),le("design:type",Object)],Js.prototype,"openOnInput",void 0);pe([fe(),le("design:type",Object)],Js.prototype,"noBorder",void 0);pe([fe(),le("design:type",Object)],Js.prototype,"readonly",void 0);var b7={};Ae(b7,{JsFuncComponent:()=>Lc});y();y();var cN,dN,pN;function oCe(){return cN?Z(cN):Yn(import("./chunk-D5JC3F7G.js")).pipe(W(n=>Jp(n)),et(n=>{cN=n}))}function aCe(){return dN?Z(dN):Yn(import("./chunk-YA4IFQC4.js")).pipe(W(n=>Jp(n)),et(n=>{dN=n}))}function sCe(){return pN?Z(pN):Yn(import("./chunk-YUWL7ZNQ.js")).pipe(W(n=>Jp(n)),et(n=>{pN=n}))}function Zm(n,t){return oCe().pipe(W(r=>r.js_beautify(n,t)))}function p7(n,t){return sCe().pipe(W(r=>r.css_beautify(n,t)))}function m7(n,t){return aCe().pipe(W(r=>r.html_beautify(n,t)))}y();y();y();var lCe=["resourceInput"],cCe=(n,t)=>({"tb-inline-field":n,flex:t}),dCe=n=>({module:n});function pCe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",11),g(2,"close"),p()()}}function mCe(n,t){if(n&1&&(d(0,"mat-option",12),O(1,"span",13),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.title,e.searchText),Ut)}}function uCe(n,t){n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2&&(l(2),z(C(3,1,"js-func.no-js-module-text")))}function hCe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"truncate"),v(3,"translate"),p()),n&2){let r=b
187(3);l(),j(" ",ft(3,6,"js-func.no-js-module-matching",Xe(9,dCe,ds(2,1,r.searchText,!0,6,"...")))," ")}}function fCe(n,t){if(n&1){let r=B();d(0,"mat-option",12)(1,"div",15),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,uCe,4,3,"div",9)(3,hCe,4,11,"ng-template",null,3,kt),p()()}if(n&2){let r=me(4),e=b(2);m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function gCe(n,t){if(n&1&&(pt(0),x(1,fCe,5,3,"mat-option",14),v(2,"async"),ct()),n&2){let r,e=b();l(),m("ngIf",!((r=C(2,1,e.filteredResources$))!=null&&r.length))}}function bCe(n,t){if(n&1&&(d(0,"mat-option",12),g(1),p()),n&2){let r=b(2);m("value",r.searchText),l(),j(" ",r.searchText," ")}}function _Ce(n,t){if(n&1&&(x(0,bCe,2,2,"mat-option",14),v(1,"async")),n&2){let r,e=b();m("ngIf",!((r=C(1,1,e.filteredResources$))!=null&&r.length))}}var b0=class b0{constructor(t,r){this.fb=t,this.resourceService=r,this.appearance="fill",this.subscriptSizing="fixed",this.hideRequiredMarker=!1,this.allowAutocomplete=!1,this.subType=za.EXTENSION,this.ResourceSubType=za,this.resourceFormGroup=this.fb.group({resource:this.fb.control(null)}),this.searchText="",this.dirty=!1,this.propagateChange=()=>{}}ngOnInit(){this.required&&(this.resourceFormGroup.get("resource").setValidators(ke.required),this.resourceFormGroup.get("resource").updateValueAndValidity({emitEvent:!1})),this.filteredResources$=this.resourceFormGroup.get("resource").valueChanges.pipe(Wi(150),et(t=>{let r;Co(t)?(this.resource=t,r=b2(this.resource.link)):bS(t)||this.subType!==za.EXTENSION?(this.resource=null,r=null):(this.resource=null,r=t),this.updateView(r),t===null&&this.clear()}),W(t=>t?typeof t=="string"?t:t.title:""),ii(t=>this.fetchResources(t)),Si())}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?this.resourceFormGroup.disable({emitEvent:!1}):this.resourceFormGroup.enable({emitEvent:!1})}writeValue(t){if(De(t)){if(this.searchText="",Co(t)&&typeof t!="string"&&t.id)this.resourceService.getResourceInfoById(t.id,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:r=>{this.resource=r,this.modelValue=b2(r.link),this.resourceFormGroup.get("resource").patchValue(r,{emitEvent:!1})},error:()=>{this.resource=null,this.modelValue="",this.resourceFormGroup.get("resource").patchValue("")}});else if(typeof t=="string"&&o4(t)){let r=t4(t),e=a4(r);this.resourceService.getResourceInfo(e.type,e.scope,e.key,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:i=>{this.resource=i,this.modelValue=t,this.resourceFormGroup.get("resource").patchValue(i,{emitEvent:!1})},error:()=>{this.resource=null,this.modelValue="",this.resourceFormGroup.get("resource").patchValue("")}})}else this.modelValue=t,this.resourceFormGroup.get("resource").patchValue(t,{emitEvent:!1});this.dirty=!0}}displayResourceFn(t){return Co(t)?t.title:t}clear(){this.resourceFormGroup.get("resource").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.resourceInput.nativeElement.blur(),this.resourceInput.nativeElement.focus()},0)}onFocus(){this.dirty&&(this.resourceFormGroup.get("resource").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(t){Fn(this.modelValue,t)||(this.modelValue=t,this.propagateChange(this.modelValue))}textIsNotEmpty(t){return t&&t.length>0}fetchResources(t){return this.searchText=t,this.resourceService.getResources(new On(50,0,t),JB.JS_MODULE,this.subType,{ignoreLoading:!0}).pipe(vt(()=>Z(null)),W(r=>r.data))}};b0.\u0275fac=function(r){return new(r||b0)(h(Ai),h(XI))},b0.\u0275cmp=L({type:b0,selectors:[["tb-resource-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(lCe,7),r&2){let i;Q(i=K())&&(e.resourceInput=i.first)}},inputs:{disabled:"disabled",required:"required",appearance:"appearance",subscriptSizing:"subscriptSizing",inlineField:"inlineField",placeholder:"placeholder",hideRequiredMarker:"hideRequiredMarker",allowAutocomplete:"allowAutocomplete",subType:"subType"},features:[ne([{provide:ye,useExisting:he(()=>b0),multi:!0}])],decls:11,vars:20,consts:[["resourceInput",""],["entityAutocomplete","matAutocomplete"],["extensionNoText",""],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","appearance","hideRequiredMarker","subscriptSizing"],["matInput","","type","text","formControlName","resource",3,"focusin","placeholder","required","matAutocomplete","matAutocompleteDisabled"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"],[3,"value",4,"ngIf"],[3,"click"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",4)(1,"input",5,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(3,pCe,3,0,"button",6),d(4,"mat-autocomplete",7,1),x(6,mCe,3,5,"mat-option",8),v(7,"async"),x(8,gCe,3,3,"ng-container",9)(9,_Ce,2,3,"ng-template",null,2,kt),p()()}if(r&2){let i=me(5),o=me(10);bt(Yi(17,cCe,e.inlineField,e.inlineField)),m("formGroup",e.resourceFormGroup)("appearance",e.inlineField?"outline":e.appearance)("hideRequiredMarker",e.hideRequiredMarker)("subscriptSizing",e.inlineField?"dynamic":e.subscriptSizing),l(),m("placeholder",e.placeholder)("required",e.required)("matAutocomplete",i)("matAutocompleteDisabled",!e.allowAutocomplete),l(2),m("ngIf",e.resourceFormGroup.get("resource").value&&!e.disabled),l(),m("displayWith",e.displayRes
187ourceFn),l(2),m("ngForOf",C(7,15,e.filteredResources$)),l(2),m("ngIf",e.subType!==e.ResourceSubType.EXTENSION)("ngIfElse",o)}},dependencies:[Ke,ce,Pe,Se,at,ze,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi,$o],encapsulation:2});var Vc=b0;pe([fe(),le("design:type",Boolean)],Vc.prototype,"disabled",void 0);pe([fe(),le("design:type",Boolean)],Vc.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Vc.prototype,"inlineField",void 0);pe([fe(),le("design:type",Object)],Vc.prototype,"hideRequiredMarker",void 0);pe([fe(),le("design:type",Object)],Vc.prototype,"allowAutocomplete",void 0);var yCe=["resourceAutocomplete"],u7=()=>({marginTop:"8px"});function CCe(n,t){n&1&&(d(0,"mat-icon",10),v(1,"translate"),g(2," warning "),p()),n&2&&m("matTooltip",C(1,1,"js-func.invalid-module-alias-name"))}var mN=n=>!(!n.alias||!n.moduleLink),Ek=(()=>{let t=class t{constructor(e,i,o,a,s,c){this.fb=e,this.cd=i,this.modulesComponent=o,this.http=a,this.translate=s,this.destroyRef=c,this.ResourceSubType=za,this.moduleRemoved=new J,this.moduleDescription=this.loadModuleDescription.bind(this),this.moduleSourceCode=this.loadModuleSourceCode.bind(this),this.propagateChange=u=>{}}ngOnInit(){this.moduleRowFormGroup=this.fb.group({alias:[null,[this.moduleAliasValidator(),ke.pattern(/^[$_\p{ID_Start}][$\p{ID_Continue}]*$/u)]],moduleLink:[null,[ke.required]]}),this.moduleRowFormGroup.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>this.updateModel())}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.modelValue=e,this.moduleRowFormGroup.patchValue({alias:e?.alias,moduleLink:e?.moduleLink},{emitEvent:!1}),this.cd.markForCheck()}validate(e){let i=this.moduleRowFormGroup.get("alias");if((i.hasError("moduleAliasNotUnique")||i.hasError("pattern"))&&i.updateValueAndValidity({onlySelf:!1,emitEvent:!1}),i.hasError("moduleAliasNotUnique"))return this.moduleRowFormGroup.get("alias").markAsTouched(),{moduleAliasNotUnique:!0};if(i.hasError("pattern"))return this.moduleRowFormGroup.get("alias").markAsTouched(),{invalidVariableName:!0};let o=re(re({},this.modelValue),this.moduleRowFormGroup.value);return mN(o)?null:{module:!0}}loadModuleDescription(){if(this.moduleRowFormGroup.get("moduleLink").value){let i=this.resourceAutocomplete.resource;return d4(this.http,this.translate,i)}else return null}loadModuleSourceCode(){if(this.moduleRowFormGroup.get("moduleLink").value){let i=this.resourceAutocomplete.resource;return p4(this.http,this.translate,i)}else return null}moduleAliasValidator(){return e=>e.value?this.modulesComponent.moduleAliasUnique(e.value,this.index)?null:{moduleAliasNotUnique:!0}:{required:!0}}updateModel(){let e=this.moduleRowFormGroup.value;this.modelValue=re(re({},this.modelValue),e),this.propagateChange(this.modelValue)}};t.\u0275fac=function(i){return new(i||t)(h(Wt),h(Me),h(Sh),h(Jt),h(Ge),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-js-func-module-row"]],viewQuery:function(i,o){if(i&1&&ae(yCe,5),i&2){let a;Q(a=K())&&(o.resourceAutocomplete=a.first)}},inputs:{index:"index"},outputs:{moduleRemoved:"moduleRemoved"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}])],decls:17,vars:25,consts:[["resourceAutocomplete",""],[1,"tb-form-table-row","tb-js-func-module-row",3,"formGroup"],["appearance","outline","subscriptSizing","dynamic",1,"tb-inline-field","tb-alias-field"],["required","","matInput","","formControlName","alias",3,"placeholder"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error",3,"matTooltip",4,"ngIf"],["formControlName","moduleLink","inlineField","","hideRequiredMarker","","required","",1,"tb-module-link-field",3,"subType","allowAutocomplete","placeholder"],[1,"tb-form-table-row-cell-buttons"],["tb-help-popup-placement","top","help-icon-button-class","","help-icon","info_outline","help-opened-icon","info",3,"tb-help-popup-async-content","tb-help-popup-style","help-icon-tooltip"],["tb-help-popup-placement","top","help-icon-button-class","","help-icon","mdi:application-brackets-outline","help-opened-icon","mdi:application-brackets",3,"tb-help-popup-async-content","tb-help-popup-style","help-icon-tooltip"],["type","button","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1)(1,"mat-form-field",2),O(2,"input",3),v(3,"translate"),x(4,CCe,3,3,"mat-icon",4),p(),O(5,"tb-resource-autocomplete",5,0),v(7,"translate"),d(8,"div",6),O(9,"div",7),v(10,"translate"),O(11,"div",8),v(12,"translate"),d(13,"button",9),v(14,"translate"),T("click",function(){return D(a),M(o.moduleRemoved.emit())}),d(15,"mat-icon"),g(16,"delete"),p()()()()}i&2&&(m("formGroup",o.moduleRowFormGroup),l(2),te("placeholder",C(3,13,"widget-config.set")),l(2),m("ngIf",o.moduleRowFormGroup.get("alias").invalid&&o.moduleRowFormGroup.get("alias").touched),l(),te("placeholder",C(7,15,"widget-config.set")),m("subType",o.ResourceSubType.MODULE)("allowAutocomplete",!0),l(4),te("help-icon-tooltip",C(10,17,"js-func.show-module-info")),m("tb-help-popup-async-content",o.moduleRowFormGroup.get("moduleLink").value?o.moduleDescription:null)("tb-help-popup-style",hn(23,u7)),l(2),te("help-icon-tooltip",C(12,19,"js-func.show-module-source-code")),m("tb-help-popup-async-content",o.moduleRowFormGroup.get("moduleLink").value?o.moduleSourceCode:null)("tb-help-popup-style",hn(24,u7)),l(2),te("matTooltip",C(14,21,"js-func.remove-module")))},dependencies:[ce,Pe,Se,at,ze,Yt,zt,ut,xe,We,St,$e,Qe,Ws,Vc,be],styles:[`@charset "UTF-8";.tb-js-func-module-row .tb-alias-field{flex:1 1 25%}.tb-js-func-module-row .tb-module-link-field{flex:1 1 75%}
188`],encapsulation:2});let n=t;return n})();function xCe(n,t){if(n&1){let r=B();d(0,"div")(1,"tb-js-func-module-row",18),T("moduleRemoved",function(){let i=D(r).index,o=b(2);return M(o.removeModule(i))}),p()()}if(n&2){let r=t.$implicit,e=t.index;l(),m("index",e)("formControl",r)}}function SCe(n,t){if(n&1&&(d(0,"div",16),x(1,xCe,2,2,"div",17),p()),n&2){let r=b
188();l(),m("ngForOf",r.modulesFormArray().controls)("ngForTrackBy",r.trackByModule)}}function TCe(n,t){n&1&&(O(0,"tb-error",19),v(1,"translate")),n&2&&m("error",C(1,1,"js-func.not-unique-module-aliases-error"))}function ECe(n,t){n&1&&(d(0,"span",20),g(1),v(2,"translate"),p()),n&2&&(l(),z(C(2,1,"js-func.no-modules")))}var ICe=n=>{let t=n.get("modules");if(t.controls.filter(i=>i.hasError("moduleAliasNotUnique")).length)return{moduleAliasNotUnique:!0};let e=!t.controls.some(i=>!i.valid);return e=e&&n.valid,e?null:{modules:{valid:!1}}},Sh=(()=>{let t=class t{constructor(e,i){this.fb=e,this.cd=i,this.modulesApplied=new J}ngOnInit(){let e=[];this.modules&&Object.keys(this.modules).length&&Object.keys(this.modules).forEach(i=>{let o={alias:i,moduleLink:this.modules[i]};e.push(this.fb.control(o,[]))}),this.modulesFormGroup=this.fb.group({modules:this.fb.array(e)},{validators:ICe})}cancel(){this.popover?.hide()}applyModules(){let e=this.modulesFormGroup.get("modules").value;if(e&&(e=e.filter(i=>mN(i))),e?.length){let i={};e.forEach(o=>{i[o.alias]=o.moduleLink}),this.modulesApplied.emit(i)}else this.modulesApplied.emit(null)}moduleAliasUnique(e,i){let o=this.modulesFormGroup.get("modules");for(let a=0;a<o.controls.length;a++)if(a!==i){let s=o.controls[a];if(e===s.value.alias)return!1}return!0}modulesFormArray(){return this.modulesFormGroup.get("modules")}trackByModule(e,i){return i}removeModule(e,i=!0){this.modulesFormGroup.get("modules").removeAt(e,{emitEvent:i}),this.modulesFormGroup.get("modules").markAsDirty({emitEvent:i})}addModule(){let e={alias:"",moduleLink:""},i=this.modulesFormGroup.get("modules"),o=this.fb.control(e,[]);i.push(o),this.cd.detectChanges()}};t.\u0275fac=function(i){return new(i||t)(h(Wt),h(Me))},t.\u0275cmp=L({type:t,selectors:[["tb-js-func-modules"]],inputs:{modules:"modules",popover:"popover"},outputs:{modulesApplied:"modulesApplied"},decls:27,vars:13,consts:[["noModules",""],[1,"tb-js-func-modules-panel"],["translate","",1,"tb-js-func-modules-panel-title"],[1,"tb-js-func-modules-panel-content"],[1,"tb-form-panel","no-border","no-padding","tb-js-func-modules"],[1,"tb-form-table"],[1,"tb-form-table-header"],["translate","",1,"tb-form-table-header-cell","tb-alias-header"],["translate","",1,"tb-form-table-header-cell","tb-module-link-header"],[1,"tb-form-table-header-cell","tb-actions-header"],["class","tb-form-table-body",4,"ngIf","ngIfElse"],["noMargin","","style","padding-left: 12px;",3,"error",4,"ngIf"],["type","button","mat-stroked-button","","color","primary",3,"click"],[1,"tb-js-func-modules-panel-buttons"],["mat-button","","color","primary","type","button",3,"click"],["mat-raised-button","","color","primary","type","button",3,"click","disabled"],[1,"tb-form-table-body"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex",3,"moduleRemoved","index","formControl"],["noMargin","",2,"padding-left","12px",3,"error"],[1,"tb-prompt","flex","items-center","justify-center"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1)(1,"div",2),g(2,"js-func.modules"),p(),d(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7),g(8,"js-func.module-alias"),p(),d(9,"div",8),g(10,"js-func.module-resource"),p(),O(11,"div",9),p(),x(12,SCe,2,2,"div",10)(13,TCe,2,3,"tb-error",11),p(),d(14,"div")(15,"button",12),T("click",function(){return D(a),M(o.addModule())}),g(16),v(17,"translate"),p()()()(),d(18,"div",13)(19,"button",14),T("click",function(){return D(a),M(o.cancel())}),g(20),v(21,"translate"),p(),d(22,"button",15),T("click",function(){return D(a),M(o.applyModules())}),g(23),v(24,"translate"),p()()(),x(25,ECe,3,3,"ng-template",null,0,kt)}if(i&2){let a=me(26);l(12),m("ngIf",o.modulesFormArray().controls.length)("ngIfElse",a),l(),m("ngIf",o.modulesFormGroup.hasError("moduleAliasNotUnique")),l(3),j(" ",C(17,7,"js-func.add-module")," "),l(4),j(" ",C(21,9,"action.cancel")," "),l(2),m("disabled",o.modulesFormGroup.invalid||!o.modulesFormGroup.dirty),l(),j(" ",C(24,11,"action.apply")," ")}},styles:[`@charset "UTF-8";.tb-js-func-modules-panel{width:540px;display:flex;flex-direction:column;gap:16px}@media screen and (max-width: 959px){.tb-js-func-modules-panel{width:90vw}}.tb-js-func-modules-panel .tb-js-func-modules-panel-content{display:flex;flex-direction:column;gap:16px;overflow:auto;margin:-10px;padding:10px}.tb-js-func-modules-panel .tb-js-func-modules-panel-title{font-size:16px;font-weight:500;line-height:24px;letter-spacing:.25px;color:#000000de}.tb-js-func-modules-panel .tb-js-func-modules-panel-buttons{height:40px;
188display:flex;flex-direction:row;gap:16px;justify-content:flex-end;align-items:flex-end}.tb-js-func-modules-panel .tb-js-func-modules{flex:1;margin:12px}.tb-js-func-modules-panel .tb-js-func-modules .tb-form-table-header-cell.tb-alias-header{flex:1 1 25%}.tb-js-func-modules-panel .tb-js-func-modules .tb-form-table-header-cell.tb-module-link-header{flex:1 1 75%}.tb-js-func-modules-panel .tb-js-func-modules .tb-form-table-header-cell.tb-actions-header{width:120px;min-width:120px}.tb-js-func-modules-panel .tb-js-func-modules .tb-form-table{overflow:hidden}.tb-js-func-modules-panel .tb-js-func-modules .tb-form-table-body{overflow:auto}.tb-js-func-modules-panel .tb-js-func-modules .tb-form-table-body tb-js-func-module-row{overflow:hidden}
189`],encapsulation:2});let n=t;return n})();y();var h7={btoa:{meta:"function",description:"Encodes a string to Base64.",args:[{name:"str",description:"The string to encode",type:"string"}],return:{description:"The Base64 encoded string",type:"string"}},atob:{meta:"function",description:"Decodes a Base64 encoded string.",args:[{name:"str",description:"The Base64 encoded string to decode",type:"string"}],return:{description:"The decoded string",type:"string"}},bytesToString:{meta:"function",description:"Converts a list of bytes to a string, optionally specifying the charset.",args:[{name:"data",description:"The list of bytes to convert",type:"list"},{name:"charsetName",description:'The charset to use for conversion (e.g., "UTF-8")',type:"string",optional:!0}],return:{description:"The string representation of the bytes",type:"string"}},decodeToString:{meta:"function",description:"Converts a list of bytes to a string.",args:[{name:"data",description:"The list of bytes to convert",type:"list"}],return:{description:"The string representation of the bytes",type:"string"}},decodeToJson:{meta:"function",description:"Parses a JSON string or converts a list of bytes to a string and parses it as JSON.",args:[{name:"data",description:"The JSON string or list of bytes to parse into JSON object",type:"string | list"}],return:{description:"The parsed JSON object",type:"object"}},stringToBytes:{meta:"function",description:"Converts a string to a list of bytes, optionally specifying the charset.",args:[{name:"str",description:"The string to convert",type:"string"},{name:"charsetName",description:'The charset to use for conversion (e.g., "UTF-8")',type:"string",optional:!0}],return:{description:"The list of bytes representing the string",type:"list"}},parseInt:{meta:"function",description:"Parses a string to an integer, optionally specifying the radix.",args:[{name:"str",description:"The string to parse",type:"string"},{name:"radix",description:"The radix for parsing (e.g., 2 for binary, 16 for hex). Defaults to auto-detected (e.g., 0x for hex).",type:"number",optional:!0}],return:{description:"The parsed integer, or null if invalid",type:"number"}},parseLong:{meta:"function",description:"Parses a string to a long integer, optionally specifying the radix.",args:[{name:"str",description:"The string to parse",type:"string"},{name:"radix",description:"The radix for parsing (e.g., 2 for binary, 16 for hex). Defaults to auto-detected (e.g., 0x for hex).",type:"number",optional:!0}],return:{description:"The parsed long integer, or null if invalid",type:"number"}},parseFloat:{meta:"function",description:"Parses a string to a float, optionally specifying the radix.",args:[{name:"str",description:"The string to parse",type:"string"},{name:"radix",description:"The radix for parsing (e.g., 16 indicates a standard IEEE 754 hexadecimal float, defaults to 10 if unspecified)",type:"number",optional:!0}],return:{description:"The parsed float, or null if invalid",type:"number"}},parseHexIntLongToFloat:{meta:"function",description:"Parses a hexadecimal string to a float, treating it as an integer value.",args:[{name:"hex",description:'The hexadecimal string to parse (e.g., "0x0A" for 10.0)',type:"string"},{name:"bigEndian",description:"Whether to interpret the string in big-endian order",type:"boolean"}],return:{description:"The parsed float, or null if invalid",type:"number"}},parseDouble:{meta:"function",description:"Parses a string to a double, optionally specifying the radix.",args:[{name:"str",description:"The string to parse",type:"string"},{name:"radix",description:"The radix for parsing (e.g., 16 indicates a standard IEEE 754 double bits, defaults to 10 if unspecified)",type:"number",optional:!0}],return:{description:"The parsed double, or null if invalid",type:"number"}},parseLittleEndianHexToInt:{meta:"function",description:"Parses a little-endian hexadecimal string to an integer.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed integer",type:"number"}},parseBigEndianHexToInt:{meta:"function",description:"Parses a big-endian hexadecimal string to an integer.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed integer",type:"number"}},parseHexToInt:{meta:"function",description:"Parses a hexadecimal string to an integer, optionally specifying endianness.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"},{name:"bigEndian",description:"Whether to interpret the string in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed integer",type:"number"}},parseBytesToInt:{meta:"function",description:"Parses a list or array of bytes to an integer.",args:[{name:"data",description:"The bytes to parse",type:"list | array"},{name:"offset",description:"The starting index in the byte list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bytes to parse (max 4)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to interpret bytes in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed integer",type:"number"}},parseLittleEndianHexToLong:{meta:"function",description:"Parses a little-endian hexadecimal string to a long integer.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed long integer",type:"number"}},parseBigEndianHexToLong:{meta:"function",description:"Parses a big-endian hexadecimal string to a long integer.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed long integer",type:"number"}},parseHexToLong:{meta:"function",description:"Parses a hexadecimal string to a long integer, optionally specifying endianness.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"},{name:"bigEndian",description:"Whether to interpret the string in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed long integer",type:"number"}},parseBytesToLong:{meta:"function",description:"Parses a list or array of bytes to a long integer.",args:[{name:"data",description:"The bytes to parse",type:"list | array"},{name:"offset",description:"The starting index in the byte list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bytes to parse (max 8)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to interpret bytes in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed long integer",type:"number"}},parseLittleEndianHexToFloat:{meta:"function",description:"Parses a little-endian hexadecimal string to a float using IEEE 754 format.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed float",type:"number"}},parseBigEndianHexToFloat:{meta:"function",description:"Parses a big-endian hexadecimal string to a float using IEEE 754 format.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed float",type:"number"}},parseHexToFloat:{meta:"function",description:"Parses a hexadecimal string to a float using IEEE 754 format, optionally specifying endianness.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"},{name:"bigEndian",description:"Whether to interpret the string in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed float",type:"number"}},parseBytesToFloat:{meta:"function",description:"Parses a list or array of bytes to a float using IEEE 754 format.",args:[{name:"data",description:"The bytes to parse",type:"list | array"},{name:"offset",description:"The starting index in the byte list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bytes to parse (max 4)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to interpret bytes in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed float",type:"number"}},parseBytesIntToFloat:{meta:"function",description:"Parses a list or array of bytes to a float by first interpreting them as an integer.",args:[{name:"data",description:"The bytes to parse",type:"list | array"},{name:"offset",description:"The starting index in the byte list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bytes to parse (max 4)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to interpret bytes in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed float",type:"number"}},parseLittleEndianHexToDouble:{meta:"function",description:"Parses a little-endian hexadecimal string to a double using IEEE 754 format.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed double",type:"number"}},parseBigEndianHexToDouble:{meta:"function",description:"Parses a big-endian hexadecimal string to a double using IEEE 754 format.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"}],return:{description:"The parsed double",type:"number"}},parseHexToDouble:{meta:"function",description:"Parses a hexadecimal string to a double using IEEE 754 format, optionally specifying endianness.",args:[{name:"hex",description:"The hexadecimal string to parse",type:"string"},{name:"bigEndian",description:"Whether to interpret the string in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed double",type:"number"}},parseBytesToDouble:{meta:"function",description:"Parses a list or array of bytes to a double using IEEE 754 format.",args:[{name:"data",description:"The bytes to parse",type:"list | array"},{name:"offset",description:"The starting index in the byte list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bytes to parse (max 8)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to interpret bytes in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed double",type:"number"}},parseBytesLongToDouble:{meta:"function",description:"Parses a list or array of bytes to a double by first interpreting them as a long integer.",args:[{name:"data",description:"The bytes to parse",type:"list | array"},{name:"offset",description:"The starting index in the byte list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bytes to parse (max 8)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to interpret bytes in big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The parsed double",type:"number"}},toFixed:{meta:"function",description:"Rounds a floating-point number to a set precision using half-up rounding.",args:[{name:"value",description:"The floating-point number",type:"number"},{name:"precision",description:"The number of decimal places",type:"number"}],return:{description:"The rounded floating-point number.",type:"number"}},toInt:{meta:"function",description:"Converts a floating-point number to an integer by half-up rounding.",args:[{name:"value",description:"The floating-point number to convert",type:"number"}],return:{description:"The rounded integer",type:"number"}},hexToBytes:{meta:"function",description:"Converts a hexadecimal string to a list of b
189ytes.",args:[{name:"hex",description:"The hexadecimal string to convert",type:"string"}],return:{description:"The list of bytes",type:"list"}},hexToBytesArray:{meta:"function",description:"Converts a hexadecimal string to an array of bytes.",args:[{name:"hex",description:"The hexadecimal string to convert",type:"string"}],return:{description:"The array of bytes",type:"array"}},intToHex:{meta:"function",description:"Converts an integer to a hexadecimal string.",args:[{name:"value",description:"The integer to convert",type:"number"},{name:"bigEndian",description:"Whether to use big-endian order (defaults to true)",type:"boolean",optional:!0},{name:"prefix",description:'Whether to prefix with "0x" (defaults to false)',type:"boolean",optional:!0},{name:"length",description:"The desired length of the hex string (defaults to minimum required)",type:"number",optional:!0}],return:{description:"The hexadecimal string",type:"string"}},longToHex:{meta:"function",description:"Converts a long integer to a hexadecimal string.",args:[{name:"value",description:"The long integer to convert",type:"number"},{name:"bigEndian",description:"Whether to use big-endian order (defaults to true)",type:"boolean",optional:!0},{name:"prefix",description:'Whether to prefix with "0x" (defaults to false)',type:"boolean",optional:!0},{name:"length",description:"The desired length of the hex string (defaults to minimum required)",type:"number",optional:!0}],return:{description:"The hexadecimal string",type:"string"}},intLongToRadixString:{meta:"function",description:"Converts a long integer to a string in the specified radix.",args:[{name:"value",description:"The number to convert",type:"number"},{name:"radix",description:"The radix for conversion (e.g., 2 for binary, 16 for hex). Defaults to 10.",type:"number",optional:!0},{name:"bigEndian",description:"Whether to use big-endian order for hex (defaults to true)",type:"boolean",optional:!0},{name:"prefix",description:'Whether to prefix hex with "0x" (defaults to false)',type:"boolean",optional:!0}],return:{description:"The string representation in the specified radix",type:"string"}},floatToHex:{meta:"function",description:"Converts a float to its IEEE 754 hexadecimal representation.",args:[{name:"value",description:"The float to convert",type:"number"},{name:"bigEndian",description:"Whether to use big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The hexadecimal string",type:"string"}},doubleToHex:{meta:"function",description:"Converts a double to its IEEE 754 hexadecimal representation.",args:[{name:"value",description:"The double to convert",type:"number"},{name:"bigEndian",description:"Whether to use big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The hexadecimal string",type:"string"}},printUnsignedBytes:{meta:"function",description:"Converts a list of signed bytes to a list of unsigned integer values.",args:[{name:"data",description:"The list of bytes to convert",type:"list"}],return:{description:"The list of unsigned integers (0-255)",type:"list"}},base64ToHex:{meta:"function",description:"Converts a Base64 string to a hexadecimal string.",args:[{name:"str",description:"The Base64 string to convert",type:"string"}],return:{description:"The hexadecimal string",type:"string"}},hexToBase64:{meta:"function",description:"Converts a hexadecimal string to a Base64 string.",args:[{name:"hex",description:"The hexadecimal string to convert",type:"string"}],return:{description:"The Base64 string",type:"string"}},base64ToBytes:{meta:"function",description:"Converts a Base64 string to an array of bytes.",args:[{name:"str",description:"The Base64 string to convert",type:"string"}],return:{description:"The array of bytes",type:"array"}},base64ToBytesList:{meta:"function",description:"Converts a Base64 string to a list of bytes.",args:[{name:"str",description:"The Base64 string to convert",type:"string"}],return:{description:"The list of bytes",type:"list"}},bytesToBase64:{meta:"function",description:"Converts an array of bytes to a Base64 string.",args:[{name:"data",description:"The array of bytes to convert",type:"array"}],return:{description:"The Base64 string",type:"string"}},bytesToHex:{meta:"function",description:"Converts a list or array of bytes to a hexadecimal string.",args:[{name:"data",description:"The bytes to convert",type:"list | array"}],return:{description:"The hexadecimal string",type:"string"}},toFlatMap:{meta:"function",description:"Converts a nested map to a flat map, with customizable key paths and exclusions",args:[{name:"json",description:"The nested map to flatten",type:"object"},{name:"excludeKeys",description:"List of keys to exclude from flattening",type:"list",optional:!0},{name:"pathInKey",description:"Whether to include full path in keys (defaults to true)",type:"boolean",optional:!0}],return:{description:"The flattened map",type:"object"}},encodeURI:{meta:"function",description:"Encodes a URI string, preserving certain characters as per MDN standards.",args:[{name:"str",description:"The URI string to encode",type:"string"}],return:{description:"The encoded URI string",type:"string"}},decodeURI:{meta:"function",description:"Decodes a URI string previously encoded.",args:[{name:"str",description:"The URI string to decode",type:"string"}],return:{description:"The decoded URI string",type:"string"}},raiseError:{meta:"function",description:"Throws an error with a custom message.",args:[{name:"str",description:"The error message to throw",type:"string"}],return:{description:"Does not return; throws an exception",type:"void"}},isBinary:{meta:"function",description:"Checks if a string is a binary number.",args:[{name:"str",description:"The string to check",type:"string"}],return:{description:"2 if the string is binary, -1 otherwise",type:"number"}},isOctal:{meta:"function",description:"Checks if a string is an octal number.",args:[{name:"str",description:"The string to check",type:"string"}],return:{description:"8 if the string is octal, -1 otherwise",type:"number"}},isDecimal:{meta:"function",description:"Checks if a string is a decimal number.",args:[{name:"str",description:"The string to check",type:"string"}],return:{description:"10 if the string is decimal, -1 otherwise",type:"number"}},isHexadecimal:{meta:"function",description:"Checks if a string is a hexadecimal number.",args:[{name:"str",description:"The string to check",type:"string"}],return:{description:"16 if the string is hexadecimal, -1 otherwise",type:"number"}},bytesToExecutionArrayList:{meta:"function",description:"Converts an array of bytes to a list.",args:[{name:"data",description:"The array of bytes to convert",type:"array"}
189],return:{description:"The list of bytes",type:"list"}},padStart:{meta:"function",description:"Pads the start of a string with a character until it reaches the target length.",args:[{name:"str",description:"The string to pad",type:"string"},{name:"length",description:"The desired length of the resulting string",type:"number"},{name:"padString",description:"The character to pad with (single character)",type:"string"}],return:{description:"The padded string",type:"string"}},padEnd:{meta:"function",description:"Pads the end of a string with a character until it reaches the target length.",args:[{name:"str",description:"The string to pad",type:"string"},{name:"length",description:"The desired length of the resulting string",type:"number"},{name:"padString",description:"The character to pad with (single character)",type:"string"}],return:{description:"The padded string",type:"string"}},parseByteToBinaryArray:{meta:"function",description:"Converts a byte to a binary array.",args:[{name:"value",description:"The byte value to convert",type:"number"},{name:"length",description:"The length of the binary array (defaults to 8)",type:"number",optional:!0},{name:"bigEndian",description:"Whether to use big-endian order (defaults to true)",type:"boolean",optional:!0}],return:{description:"The binary array",type:"array"}},parseBytesToBinaryArray:{meta:"function",description:"Converts a list or array of bytes to a binary array.",args:[{name:"data",description:"The bytes to convert",type:"list | array"},{name:"length",description:"The total length of the binary array (defaults to bytes.length * 8)",type:"number",optional:!0}],return:{description:"The binary array",type:"array"}},parseLongToBinaryArray:{meta:"function",description:"Converts a long integer to a binary array.",args:[{name:"value",description:"The long integer to convert",type:"number"},{name:"length",description:"The length of the binary array (defaults to 64)",type:"number",optional:!0}],return:{description:"The binary array",type:"array"}},parseBinaryArrayToInt:{meta:"function",description:"Converts a binary list or array to an integer.",args:[{name:"data",description:"The binary list or array to convert",type:"list | array"},{name:"offset",description:"The starting index in the binary list or array (defaults to 0)",type:"number",optional:!0},{name:"length",description:"The number of bits to parse (defaults to array length)",type:"number",optional:!0}],return:{description:"The parsed integer",type:"number"}},isNaN:{meta:"function",description:"Checks if the given number is NaN (Not a Number).",args:[{name:"value",description:"The number to check",type:"number"}],return:{description:"True if the number is NaN, false otherwise",type:"boolean"}},isInsidePolygon:{meta:"function",description:"Checks if a given point is inside a polygon.",args:[{name:"latitude",description:"The latitude of the point",type:"number"},{name:"longitude",description:"The longitude of the point",type:"number"},{name:"perimeter",description:"The polygon perimeter represented as a string",type:"string"}],return:{description:"True if the point is inside the polygon, false otherwise.",type:"boolean"}},isInsideCircle:{meta:"function",description:"Checks if a given point is inside a circular area.",args:[{name:"latitude",description:"The latitude of the point",type:"number"},{name:"longitude",description:"The longitude of the point",type:"number"},{name:"perimeter",description:"A string representation of the circle, containing center coordinates and radius",type:"string"}],return:{description:"True if the point is inside the circle, false otherwise.",type:"boolean"}},parseDateToTimestampOrNow:{meta:"function",description:"Parses an ISO-8601 date string to a Unix timestamp (ms). Returns current time on failure.",args:[{name:"str",description:"The date string to be parsed (expected in ISO-8601 format).",type:"string"}],return:{description:"A Unix timestamp in milliseconds representing.",type:"number"}}},f7=new l4(h7),kCe=Object.keys(h7),g7=kCe.map(n=>({token:"tb.tbel-utils-func",regex:`\\b${n}\\b`,next:"no_regex"}));var DCe=["javascriptEditor"],MCe=[[["","toolbarStartButton",""]],[["","toolbarPrefixButton",""]],[["","toolbarSuffixButton",""]]],ACe=["[toolbarStartButton]","[toolbarPrefixButton]","[toolbarSuffixButton]"],OCe=(n,t,r)=>({"tb-disabled":n,"fill-height":t,"tb-hide-brackets":r}),PCe=()=>({}),RCe=n=>({minHeight:n}),FCe=(n,t)=>({"tb-error":n,"tb-required":t}),NCe=n=>({"tb-error":n});function VCe(n,t){if(n&1&&(d(0,"label",16),g(1),p()),n&2){let r=b
189();bt(Yi(3,FCe,!r.disabled&&(r.hasErrors||!r.functionValid||r.required&&!r.modelValue),!r.disabled&&r.required)),l(),j(" ",r.functionLabel," ")}}function LCe(n,t){if(n&1){let r=B();d(0,"fieldset",9)(1,"div",10,1),v(3,"translate"),T("click",function(i){D(r);let o=me(2),a=b();return M(a.editModules(i,o))}),d(4,"button",11)(5,"tb-icon",17),g(6,"mdi:application-braces-outline"),p()()()()}n&2&&(l(),te("matTooltip",C(3,1,"js-func.modules")))}function BCe(n,t){if(n&1){let r=B();d(0,"button",18),T("click",function(){D(r);let i=b();return M(i.beautifyJs())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.tidy")," "))}function jCe(n,t){if(n&1&&O(0,"div",19),n&2){let r=b();m("tb-help-popup",r.helpId)("tb-help-popup-style",r.helpPopupStyle)}}function GCe(n,t){if(n&1&&(d(0,"div",20)(1,"label",16),g(2,"}"),p()()),n&2){let r=b();l(),bt(Xe(2,NCe,r.hasErrors||!r.functionValid||r.required&&!r.modelValue))}}var Th=class Th{get noValidate(){return this.noValidateValue}set noValidate(t){this.noValidateValue=mt(t)}get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}constructor(t,r,e,i,o,a,s,c,u,f){this.elementRef=t,this.utils=r,this.translate=e,this.store=i,this.raf=o,this.cd=a,this.popoverService=s,this.renderer=c,this.viewContainerRef=u,this.http=f,this.ignoreChange=!1,this.toastTargetId=`jsFuncEditor-${Zr()}`,this.minHeight="200px",this.helpPopupStyle={},this.disableUndefinedCheck=!1,this.scriptLanguage=Ea.JS,this.hideBrackets=!1,this.hideLabel=!1,this.withModules=!1,this.fullscreen=!1,this.functionValid=!0,this.errorShowed=!1,this.errorMarkers=[],this.errorAnnotationId=-1,this.functionArgsString="",this.propagateChange=null,this._onTouched=null,this.hasErrors=!1}ngOnInit(){(!this.resultType||this.resultType.length===0)&&(this.resultType="nocheck"),this.updateFunctionArgsString(),this.updateFunctionLabel();let t=this.javascriptEditorElmRef.nativeElement,r={mode:"ace/mode/javascript",showGutter:!0,showPrintMargin:!0,readOnly:this.disabled};Ea.TBEL===this.scriptLanguage&&(r.mode="ace/mode/tbel");let e={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};r=re(re({},r),e),da().subscribe(i=>{this.jsEditor=i.edit(t,r),this.jsEditor.session.setUseWrapMode(!0),this.jsEditor.setValue(this.modelValue?this.modelValue:"",-1),this.jsEditor.setReadOnly(this.disabled),this.jsEditor.on("change",()=>{this.ignoreChange||(this.cleanupJsErrors(),this.updateView())}),this.jsEditor.on("blur",()=>{this._onTouched&&this._onTouched()}),this.disableUndefinedCheck||this.jsEditor.session.on("changeAnnotation",()=>{let o=this.jsEditor.session.getAnnotations();o.filter(s=>s.text.includes("is not defined")).forEach(s=>{s.type="error"}),this.jsEditor.renderer.setAnnotations(o);let a=o.filter(s=>s.type==="error").length>0;this.hasErrors!==a&&(this.hasErrors=a,this.propagateValue(this.modelValue),this.cd.markForCheck())}),this.updateHighlightRules(),this.updateJsWorkerGlobals(),this.initialCompleters=this.jsEditor.completers||[],this.updateCompleters(),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(t)})}ngOnChanges(t){for(let r of Object.keys(t)){let{firstChange:e,currentValue:i,previousValue:o}=t[r],a=Co(i)?!Fn(i,o):i!==o;!e&&a&&this.updateByChangesPropName(r)}}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.jsEditor&&this.jsEditor.destroy()}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.jsEditor.resize(),this.jsEditor.renderer.updateFull()})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this.jsEditor&&this.jsEditor.setReadOnly(this.disabled)}validate(t){return this.functionValid&&!this.hasErrors?null:{jsFunc:{valid:!1}}}beautifyJs(){Zm(this.modelValue,{indent_size:4,wrap_line_length:60}).subscribe(t=>{this.jsEditor.setValue(t||"",-1),this.updateView()})}updateFunctionArgsString(){this.functionArgsString="",this.functionArgs&&(this.functionArgsString=this.functionArgs.join(", "))}updateFunctionLabel(){(this.functionTitle||this.label)&&(this.hideBrackets=!0),this.functionTitle?this.functionLabel=`${this.functionTitle}: f(${this.functionArgsString})`:this.label?this.functionLabel=this.label:this.functionLabel=`function ${this.functionName?this.functionName:""}(${this.functionArgsString})${this.hideBrackets?"":" {"}`,this.cd.markForCheck()}updatedScriptLanguage(){this.jsEditor?.session?.setMode(`ace/mode/${Ea.TBEL===this.scriptLanguage?"tbel":"javascript"}`)}
189validateOnSubmit(){return this.disabled?Z(null):(this.cleanupJsErrors(),this.validateJsFunc().pipe(W(t=>{this.functionValid=t,this.functionValid||(this.propagateValue(this.modelValue),this.cd.markForCheck(),this.store.dispatch(new Sr({message:this.validationError,type:"error",target:this.toastTargetId,verticalPosition:"bottom",horizontalPosition:"left"})),this.errorShowed=!0)})))}focus(){this.javascriptEditorElmRef.nativeElement.scrollIntoView(),this.jsEditor?.focus()}validateJsFunc(){let t;this.withModules&&this.modules&&Object.keys(this.modules).length?t={body:this.modelValue,modules:this.modules}:t=this.modelValue;let r=this.functionArgs||[];return rC(this.http,t,...r).pipe(W(e=>{if(this.noValidate)return!0;if(this.validationArgs){let i,o;for(let a of this.validationArgs)try{i=e.apply(this,a),o=null;break}catch(s){o=s}if(o)throw o;if(this.resultType!=="nocheck"){if(this.resultType==="any"){if(Bi(i))return this.validationError=this.translate.instant("js-func.no-return-error"),!1}else if(typeof i!==this.resultType)return this.validationError=this.translate.instant("js-func.return-type-mismatch",{type:this.resultType}),!1}return!0}else return!0}),vt(e=>{let i=this.utils.parseException(e),o="Error:";if(i.name&&(o+=" "+i.name+":"),i.message&&(o+=" "+i.message),i.lineNumber&&(o+="<br>Line "+i.lineNumber,i.columnNumber&&(o+=" column "+i.columnNumber),o+=" of script."),this.validationError=o,i.lineNumber){let a=i.lineNumber-1,s=0;i.columnNumber&&(s=i.columnNumber);let c=this.jsEditor.session.addMarker(new JE(a,0,a,1/0),"ace_active-line","screenLine");this.errorMarkers.push(c);let u=this.jsEditor.session.getAnnotations(),f={row:a,column:s,text:i.message,type:"error"};this.errorAnnotationId=u.push(f)-1,this.jsEditor.session.setAnnotations(u)}return Z(!1)}))}cleanupJsErrors(){if(this.errorShowed&&(this.store.dispatch(new Mb({target:this.toastTargetId})),this.errorShowed=!1),this.errorMarkers.forEach(t=>{this.jsEditor.session.removeMarker(t)}),this.errorMarkers.length=0,this.errorAnnotationId>-1){let t=this.jsEditor.session.getAnnotations();t.splice(this.errorAnnotationId,1),this.jsEditor.session.setAnnotations(t),this.errorAnnotationId=-1}}writeValue(t){ga(t)||typeof t=="string"?(this.modelValue=t,this.modules=null):(this.modelValue=t.body,this.modules=t.modules),this.jsEditor&&(this.withModules&&(this.updateJsWorkerGlobals(),this.updateCompleters()),this.ignoreChange=!0,this.jsEditor.setValue(this.modelValue?this.modelValue:"",-1),this.ignoreChange=!1)}updateView(t=!1){let r=this.jsEditor.getValue();(this.modelValue!==r||t)&&(this.modelValue=r,this.functionValid=!0,this.propagateValue(this.modelValue),this.cd.markForCheck())}editModules(t,r){t&&t.stopPropagation();let e=r;if(this.popoverService.hasPopover(e))this.popoverService.hidePopover(e);else{let i=this.popoverService.displayPopover({trigger:e,renderer:this.renderer,componentType:Sh,hostView:this.viewContainerRef,preferredPlacement:"leftTop",context:{modules:Di(this.modules)},isModal:!0});i.tbComponentRef.instance.popover=i,i.tbComponentRef.instance.modulesApplied.subscribe(o=>{i.hide(),this.modules=o,this.updateJsWorkerGlobals(),this.updateCompleters(),this.updateView(!0)})}}propagateValue(t){if(this.withModules&&this.modules&&Object.keys(this.modules).length){let r={body:t,modules:this.modules};this.propagateChange(r)}else this.propagateChange(t)}updateByChangesPropName(t){switch(t){case"functionArgs":this.updateFunctionArgsString(),this.updateFunctionLabel(),this.updateJsWorkerGlobals();break;case"label":case"functionTitle":case"functionName":this.updateFunctionLabel();break;case"scriptLanguage":this.updatedScriptLanguage(),this.updateHighlightRules(),this.updateCompleters(),this.updateJsWorkerGlobals();break;case"disableUndefinedCheck":case"globalVariables":this.updateJsWorkerGlobals();break;case"editorCompleter":this.updateCompleters();break;case"highlightRules":this.updateHighlightRules();break}}updateHighlightRules(){if(this.jsEditor?.session?.$mode){let t=new this.jsEditor.session.$mode.constructor;if(t.$highlightRules=new t.HighlightRules,this.highlightRules)for(let e in this.highlightRules)t.$highlightRules.$rules[e]?t.$highlightRules.$rules[e].unshift(...this.highlightRules[e]):t.$highlightRules.$rules[e]=this.highlightRules[e];this.scriptLanguage===Ea.TBEL&&(t.$highlightRules.$rules.start=[...g7,...t.$highlightRules.$rules.start]);let r=t.$highlightRules.$rules.no_regex.find(e=>Array.isArray(e.token)&&e.token.includes("identifier"));r&&r.next==="no_regex"&&(r.next="start"),this.jsEditor.session.$onCh
189angeMode(t)}}updateJsWorkerGlobals(){if(this.jsEditor?.session?.$worker){let t={undef:!this.disableUndefinedCheck,unused:!0,globals:{}};this.disableUndefinedCheck||(this.functionArgs&&this.functionArgs.forEach(r=>{t.globals[r]=!1}),this.withModules&&this.modules&&Object.keys(this.modules).forEach(r=>{t.globals[r]=!1}),this.globalVariables&&this.globalVariables.forEach(r=>{t.globals[r]=!1})),this.jsEditor.session.$worker.send("changeOptions",[t])}}updateCompleters(){if(!this.jsEditor)return;let t;this.withModules?t=c4(this.http,this.modules):t=Z(null),t.subscribe(r=>{let e=[];this.editorCompleter&&e.push(this.editorCompleter),r&&e.push(r),this.scriptLanguage===Ea.TBEL&&e.push(f7),e.push(...this.initialCompleters),this.jsEditor.completers=e})}};Th.\u0275fac=function(r){return new(r||Th)(h(ge),h(vn),h(Ge),h(ve),h(es),h(Me),h(Fa),h(Ni),h(ci),h(Jt))},Th.\u0275cmp=L({type:Th,selectors:[["tb-js-func"]],viewQuery:function(r,e){if(r&1&&ae(DCe,7),r&2){let i;Q(i=K())&&(e.javascriptEditorElmRef=i.first)}},inputs:{label:"label",functionTitle:"functionTitle",functionName:"functionName",functionArgs:"functionArgs",validationArgs:"validationArgs",resultType:"resultType",disabled:"disabled",fillHeight:"fillHeight",minHeight:"minHeight",editorCompleter:"editorCompleter",highlightRules:"highlightRules",globalVariables:"globalVariables",helpPopupStyle:"helpPopupStyle",disableUndefinedCheck:"disableUndefinedCheck",helpId:"helpId",scriptLanguage:"scriptLanguage",hideBrackets:"hideBrackets",hideLabel:"hideLabel",withModules:"withModules",noValidate:"noValidate",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>Th),multi:!0},{provide:zn,useExisting:he(()=>Th),multi:!0}]),lt],ngContentSelectors:ACe,decls:20,vars:24,consts:[["javascriptEditor",""],["editModulesButton",""],["tb-fullscreen","",1,"tb-js-func","flex","flex-col",2,"background","#fff",3,"fullscreen"],[1,"tb-js-func-toolbar","flex","flex-row","items-center","justify-start",2,"min-height","40px"],["class","tb-title no-padding",3,"class",4,"ngIf"],[1,"flex-1"],["style","width: initial",4,"ngIf"],["type","button","mat-button","","class","tidy",3,"click",4,"ngIf"],[3,"tb-help-popup","tb-help-popup-style",4,"ngIf"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],["id","tb-javascript-panel","tb-toast","",1,"tb-js-func-panel","flex","flex-col",3,"toastTarget"],["id","tb-javascript-input"],["class","flex flex-row items-center justify-start","style","height: 40px;",4,"ngIf"],[1,"tb-title","no-padding"],["color","primary","matButtonIcon",""],["type","button","mat-button","",1,"tidy",3,"click"],[3,"tb-help-popup","tb-help-popup-style"],[1,"flex","flex-row","items-center","justify-start",2,"height","40px"]],template:function(r,e){if(r&1){let i=B();Ct(MCe),d(0,"div",2)(1,"div",3),x(2,VCe,2,6,"label",4),Fe(3),O(4,"span",5),Fe(5,1),x(6,LCe,7,3,"fieldset",6)(7,BCe,3,3,"button",7),Fe(8,2),x(9,jCe,1,2,"div",8),d(10,"fieldset",9)(11,"div",10),v(12,"translate"),T("click",function(){return D(i),M(e.fullscreen=!e.fullscreen)}),d(13,"button",11)(14,"mat-icon",12),g(15),p()()()()(),d(16,"div",13),O(17,"div",14,0),p(),x(19,GCe,3,4,"div",15),p()}r&2&&(bt(rl(17,OCe,e.disabled,e.fillHeight,e.hideBrackets)),m("fullscreen",e.fullscreen),l(2),m("ngIf",!e.hideLabel),l(4),m("ngIf",!e.disabled&&e.withModules),l(),m("ngIf",!e.disabled),l(2),m("ngIf",e.helpId),l(2),te("matTooltip",C(12,15,e.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(e.fullscreen?"fullscreen_exit":"fullscreen"),l(),te("toastTarget",e.toastTargetId),l(),_n(e.fillHeight?hn(21,PCe):Xe(22,RCe,e.minHeight)),Y("fill-height",e.fillHeight),l(2),m("ngIf",!e.hideBrackets))},dependencies:[ce,yt,Pe,Se,zt,xs,xa,Ws,In,be],styles:[`@charset "UTF-8";.tb-js-func{position:relative}.tb-js-func.tb-disabled{color:#00000061}.tb-js-func.fill-height{height:100%}.tb-js-func:not(.tb-hide-brackets) .tb-js-func-panel{margin-left:15px}.tb-js-func.tb-hide-brackets .tb-js-func-panel{height:calc(100% - 40px)}.tb-js-func .tb-js-func-panel{height:calc(100% - 80px);border:1px solid #c0c0c0}.tb-js-func .tb-js-func-panel #tb-javascript-input{width:100%;
189min-width:200px;height:100%}.tb-js-func:not(.tb-fullscreen).tb-hide-brackets{padding-bottom:15px}.tb-js-func .tb-js-func-toolbar>*:not(:last-child){margin-right:4px}.tb-js-func .tb-js-func-toolbar button.mat-mdc-button-base,.tb-js-func .tb-js-func-toolbar button.mat-mdc-button-base.tb-mat-32{background:#dcdcdc59;align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;font-size:.8rem;line-height:15px}.tb-js-func .tb-js-func-toolbar button.mat-mdc-button-base:not(.tb-help-popup-button),.tb-js-func .tb-js-func-toolbar button.mat-mdc-button-base.tb-mat-32:not(.tb-help-popup-button){color:#7b7b7b}.tb-js-func .tb-js-func-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.tb-js-func .tb-js-func-toolbar .tb-help-popup-button-loading{background:#f3f3f3}.tb-js-func .ace_tb.ace_tbel-utils-func{color:#318495}.tb-js-func label.tb-title.tb-required:after{content:"*"}
190`],encapsulation:2});var Lc=Th;pe([fe(),le("design:type",Object)],Lc.prototype,"disableUndefinedCheck",void 0);pe([fe(),le("design:type",Object)],Lc.prototype,"hideBrackets",void 0);pe([fe(),le("design:type",Object)],Lc.prototype,"hideLabel",void 0);pe([fe(),le("design:type",Object)],Lc.prototype,"withModules",void 0);var _7={};Ae(_7,{MaterialIconSelectComponent:()=>kp});y();var ewe={};Ae(ewe,{MaterialIconsComponent:()=>Ed});y();var zCe=["iconsPanel"],$Ce=n=>({iconSearch:n});function UCe(n,t){n&1&&(d(0,"div",11),g(1,"icon.icons"),p())}function HCe(n,t){if(n&1){let r=B();d(0,"button",12),T("click",function(){D(r);let i=b();return M(i.clearSearch())}),d(1,"mat-icon",13),g(2,"close"),p()()}}function qCe(n,t){if(n&1){let r=B();d(0,"button",18),T("click",function(){D(r);let i=b().$implicit,o=b(2);return M(o.selectIcon(i))}),d(1,"tb-icon",19),g(2),p()()}if(n&2){let r=b().$implicit;te("matTooltip",r.displayName),l(2),z(r.name)}}function WCe(n,t){if(n&1){let r=B();d(0,"button",20),T("click",function(){D(r);let i=b().$implicit,o=b(2);return M(o.selectIcon(i))}),d(1,"tb-icon",19),g(2),p()()}if(n&2){let r=b().$implicit;te("matTooltip",r.displayName),l(2),z(r.name)}}function YCe(n,t){if(n&1&&(pt(0),x(1,qCe,3,2,"button",16)(2,WCe,3,2,"button",17),ct()),n&2){let r=t.$implicit,e=b(2);l(),m("ngIf",r.name===e.selectedIcon),l(),m("ngIf",r.name!==e.selectedIcon)}}function QCe(n,t){if(n&1&&(d(0,"div",14),x(1,YCe,3,2,"ng-container",15),p()),n&2){let r=t.$implicit;l(),m("ngForOf",r)}}function KCe(n,t){if(n&1&&(pt(0),d(1,"div",21),O(2,"div",22),d(3,"div",23),g(4),v(5,"translate"),p()(),ct()),n&2){let r=b
190();l(),hi("width",r.iconsPanelWidth),l(3),z(ft(5,3,"icon.no-icons-found",Xe(6,$Ce,r.searchIconControl.value)))}}function XCe(n,t){if(n&1){let r=B();d(0,"button",28),T("click",function(){D(r);let i=b(2);return M(i.clearIcon())}),g(1),v(2,"translate"),p()}if(n&2){let r=b(2);m("disabled",!r.selectedIcon),l(),j(" ",C(2,2,"action.clear")," ")}}function ZCe(n,t){if(n&1){let r=B();d(0,"button",29),T("click",function(){D(r);let i=b(2);return M(i.showAllSubject.next(!0))}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"action.show-more")," "))}function JCe(n,t){if(n&1&&(d(0,"div",24),x(1,XCe,3,4,"button",25),O(2,"span",26),x(3,ZCe,3,3,"button",27),p()),n&2){let r=b();l(),m("ngIf",r.iconClearButton),l(2),m("ngIf",!r.showAllSubject.value)}}var Wv=class Wv extends sn{constructor(t,r,e,i){super(t),this.store=t,this.resourcesService=r,this.breakpointObserver=e,this.cd=i,this.iconClearButton=!1,this.showTitle=!0,this.iconSelected=new J,this.showAllSubject=new Gn(!1),this.iconsRowHeight=48,this.notFound=!1,this.searchIconControl=new Ab("")}ngOnInit(){let t=this.breakpointObserver.isMatched(cl["lt-md"])?8:11;this.calculatePanelSize(t);let r=this.breakpointObserver.observe(cl["lt-md"]).pipe(W(e=>e.matches?8:11),on(t));this.iconRows$=fu({showAll:this.showAllSubject.asObservable(),rowSize:r,searchText:this.searchIconControl.valueChanges.pipe(on(""),aB(e=>e?ls(150):Z({})))}).pipe(W(e=>(e.searchText&&!e.showAll&&(e.showAll=!0,this.showAllSubject.next(!0)),e)),xr((e,i)=>i.showAll===e.showAll&&i.searchText===e.searchText&&i.rowSize===e.rowSize),Ft(e=>jj(this.resourcesService,e.rowSize,e.showAll,e.searchText).pipe(W(i=>({iconRows:i,iconsRowSize:e.rowSize})))),et(e=>{this.notFound=!e.iconRows.length,this.calculatePanelSize(e.iconsRowSize,e.iconRows.length),this.cd.markForCheck(),setTimeout(()=>{this.checkSize()},0)}),W(e=>e.iconRows),Si())}clearSearch(){this.searchIconControl.patchValue("",{emitEvent:!0})}selectIcon(t){this.iconSelected.emit(t.name)}clearIcon(){this.iconSelected.emit(null)}calculatePanelSize(t,r=4){this.iconsPanelHeight=Math.min(r*this.iconsRowHeight,10*this.iconsRowHeight)+"px",this.iconsPanelWidth=t*36+(t-1)*12+6+"px"}checkSize(){this.iconsPanel?.checkViewportSize(),this.popover?.updatePosition()}};Wv.\u0275fac=function(r){return new(r||Wv)(h(ve),h(uc),h(qa),h(Me))},Wv.\u0275cmp=L({type:Wv,selectors:[["tb-material-icons"]],viewQuery:function(r,e){if(r&1&&ae(zCe,5),r&2){let i;Q(i=K())&&(e.iconsPanel=i.first)}},inputs:{selectedIcon:"selectedIcon",iconClearButton:"iconClearButton",showTitle:"showTitle",popover:"popover"},outputs:{iconSelected:"iconSelected"},features:[ne([]),Ce],decls:14,vars:18,consts:[["iconsPanel",""],[1,"tb-material-icons-panel"],["class","tb-material-icons-title","translate","",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic",1,"tb-material-icons-search","tb-inline-field"],["matPrefix",""],["matInput","",3,"formControl","placeholder"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-material-icons-viewport",3,"itemSize"],["class","tb-material-icons-row",4,"cdkVirtualFor","cdkVirtualForOf"],[4,"ngIf"],["class","tb-material-icons-panel-buttons",4,"ngIf"],["translate","",1,"tb-material-icons-title"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[1,"tb-material-icons-row"],[4,"ngFor","ngForOf"],["class","tb-select-icon-button","mat-raised-button","","color","primary","matTooltipPosition","above","type","button",3,"matTooltip","click",4,"ngIf"],["class","tb-select-icon-button","mat-button","","matTooltipPosition","above","type","button",3,"matTooltip","click",4,"ngIf"],["mat-raised-button","","color","primary","matTooltipPosition","above","type","button",1,"tb-select-icon-button",3,"click","matTooltip"],["matButtonIcon",""],["mat-button","","matTooltipPosition","above","type","button",1,"tb-select-icon-button",3,"click","matTooltip"],[1,"tb-no-data-available"],[1,"tb-no-data-bg"],[1,"tb-no-data-text"],[1,"tb-material-icons-panel-buttons"],["mat-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],[1,"flex-1"],["class","tb-material-icons-show-more","mat-button","","color","primary",3,"click",4,"ngIf"],["mat-button","","color","primary","type","button",3,"click","disabled"],["mat-button","","color","primary",1,"tb-material-icons-show-more",3,"click"]],template:function(r,e){r&1&&
190(d(0,"div",1),x(1,UCe,2,0,"div",2),d(2,"mat-form-field",3)(3,"mat-icon",4),g(4,"search"),p(),O(5,"input",5),v(6,"translate"),x(7,HCe,3,0,"button",6),p(),d(8,"cdk-virtual-scroll-viewport",7,0),x(10,QCe,2,1,"div",8),v(11,"async"),p(),x(12,KCe,6,8,"ng-container",9)(13,JCe,4,2,"div",10),p()),r&2&&(l(),m("ngIf",e.showTitle),l(4),te("placeholder",C(6,14,"icon.search-icon")),m("formControl",e.searchIconControl),l(2),m("ngIf",e.searchIconControl.value),l(),hi("width",e.iconsPanelWidth)("height",e.iconsPanelHeight),Y("!hidden",e.notFound),m("itemSize",e.iconsRowHeight),l(2),m("cdkVirtualForOf",C(11,16,e.iconRows$)),l(2),m("ngIf",e.notFound),l(),m("ngIf",e.iconClearButton||!e.showAllSubject.value))},dependencies:[Ke,ce,jt,yt,Pe,Se,at,ze,Kd,Yt,zt,ut,xe,Br,QS,XS,KS,In,Ve,be],styles:[`@charset "UTF-8";.tb-material-icons-panel{width:100%;display:flex;flex-direction:column;gap:16px;align-items:center}.tb-material-icons-panel .tb-material-icons-title{font-size:16px;font-weight:500;line-height:24px;letter-spacing:.25px;color:#000000de}.tb-material-icons-panel .tb-material-icons-title,.tb-material-icons-panel .tb-material-icons-search{width:100%}.tb-material-icons-panel .tb-material-icons-viewport{min-height:144px}.tb-material-icons-panel .tb-material-icons-row{display:flex;flex-direction:row;gap:12px}.tb-material-icons-panel .tb-material-icons-row+.tb-material-icons-row{margin-top:12px}.tb-material-icons-panel .tb-no-data-available{min-height:144px}.tb-material-icons-panel button.mat-mdc-button-base.tb-select-icon-button{width:36px;min-width:36px;height:36px;padding:6px}.tb-material-icons-panel button.mat-mdc-button-base.tb-select-icon-button:not(.mat-primary){color:#0000008a}.tb-material-icons-panel button.mat-mdc-button-base.tb-select-icon-button>.mat-icon{width:24px;height:24px;font-size:24px;margin:0}.tb-material-icons-panel .tb-material-icons-panel-buttons{height:40px;display:flex;flex-direction:row;gap:16px;align-items:flex-start;align-self:stretch}
191`],encapsulation:2});var Ed=Wv;pe([fe(),le("design:type",Object)],Ed.prototype,"iconClearButton",void 0);pe([fe(),le("design:type",Object)],Ed.prototype,"showTitle",void 0);var twe=n=>({color:n}),iwe=()=>({});function nwe(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(){D(r);let i=b(2);return M(i.clear())}),d(1,"tb-icon"),g(2,"close"),p()()}}function rwe(n,t){if(n&1){let r=B();d(0,"div",3)(1,"tb-icon",4),T("click",function(){D(r);let i=b();return M(i.openIconDialog())}),g(2),p(),d(3,"mat-form-field",5)(4,"mat-label"),g(5),p(),d(6,"input",6),T("mousedown",function(){D(r);let i=b();return M(i.openIconDialog())}),p(),x(7,nwe,3,0,"button",7),p()()}if(n&2){let r=b();m("formGroup",r.materialIconFormGroup),l(),_n(r.color?Xe(7,twe,r.color):hn(9,iwe)),l(),z(r.materialIconFormGroup.get("icon").value),l(3),z(r.label),l(),m("required",r.required),l(),m("ngIf",r.iconClearButton)}}function owe(n,t){if(n&1){let r=B();d(0,"button",9,1),T("click",function(i){D(r);let o=me(1),a=b();return M(a.openIconPopup(i,o))}),d(2,"tb-icon",10),g(3),p()()}if(n&2){let r=b();hi("color",r.color&&!r.disabled?r.color:"")("background-color",r.backgroundColor&&!r.disabled?r.backgroundColor:""),m("disabled",r.disabled),l(3),z(r.materialIconFormGroup.get("icon").value)}}var _0=class _0 extends sn{get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}constructor(t,r,e,i,o,a,s,c,u){super(t),this.store=t,this.dialogs=r,this.translate=e,this.popoverService=i,this.renderer=o,this.viewContainerRef=a,this.fb=s,this.cd=c,this.destroyRef=u,this.asBoxInput=!1,this.label=this.translate.instant("icon.icon"),this.iconClearButton=!1,this.propagateChange=null}ngOnInit(){this.materialIconFormGroup=this.fb.group({icon:[null,[]]}),this.materialIconFormGroup.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateModel()})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,t?this.materialIconFormGroup.disable({emitEvent:!1}):this.materialIconFormGroup.enable({emitEvent:!1})}writeValue(t){this.modelValue=t,this.materialIconFormGroup.patchValue({icon:this.modelValue},{emitEvent:!1})}updateModel(){let t=this.materialIconFormGroup.get("icon").value;
191this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}openIconDialog(){this.disabled||this.dialogs.materialIconPicker(this.materialIconFormGroup.get("icon").value,this.iconClearButton).subscribe(t=>{t?.canceled||(this.materialIconFormGroup.patchValue({icon:t?.icon},{emitEvent:!0}),this.cd.markForCheck())})}openIconPopup(t,r){t&&t.stopPropagation();let e=r._elementRef.nativeElement;if(this.popoverService.hasPopover(e))this.popoverService.hidePopover(e);else{let i=this.popoverService.displayPopover(e,this.renderer,this.viewContainerRef,Ed,"left",!0,null,{selectedIcon:this.materialIconFormGroup.get("icon").value,iconClearButton:this.iconClearButton},{},{},{},!0);i.tbComponentRef.instance.popover=i,i.tbComponentRef.instance.iconSelected.subscribe(o=>{i.hide(),this.materialIconFormGroup.patchValue({icon:o},{emitEvent:!0}),this.cd.markForCheck()})}}clear(){this.materialIconFormGroup.get("icon").patchValue(null,{emitEvent:!0}),this.cd.markForCheck()}};_0.\u0275fac=function(r){return new(r||_0)(h(ve),h(Sa),h(Ge),h(Fa),h(Ni),h(ci),h(Wt),h(Me),h(En))},_0.\u0275cmp=L({type:_0,selectors:[["tb-material-icon-select"]],inputs:{asBoxInput:"asBoxInput",label:"label",color:"color",backgroundColor:"backgroundColor",disabled:"disabled",iconClearButton:"iconClearButton",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>_0),multi:!0}]),Ce],decls:3,vars:2,consts:[["boxInput",""],["matButton",""],["class","flex flex-row",3,"formGroup",4,"ngIf","ngIfElse"],[1,"flex","flex-row",3,"formGroup"],[1,"icon-value",3,"click"],[1,"flex-1"],["matInput","","formControlName","icon",3,"mousedown","required"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["type","button","mat-stroked-button","",1,"tb-box-button",3,"click","disabled"],["matButtonIcon",""]],template:function(r,e){if(r&1&&x(0,rwe,8,10,"div",2)(1,owe,4,6,"ng-template",null,0,kt),r&2){let i=me(2);m("ngIf",!e.asBoxInput)("ngIfElse",i)}},dependencies:[ce,yt,Pe,at,ze,At,Yt,ut,xe,We,St,$e,Qe,In],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-icon.icon-value[_ngcontent-%COMP%]{padding:4px;margin:12px 4px 4px;cursor:pointer;border:solid 1px rgba(0,0,0,.27);box-sizing:initial}']});var kp=_0;pe([fe(),le("design:type",Object)],kp.prototype,"asBoxInput",void 0);pe([fe(),le("design:type",Object)],kp.prototype,"iconClearButton",void 0);var kwe={};Ae(kwe,{NodeScriptTestDialogComponent:()=>Ik});y();var v7={};Ae(v7,{JsonContentComponent:()=>ec});y();var awe=["jsonEditor"],swe=n=>({"fill-height":n}),lwe=(n,t)=>({"tb-error":n,"tb-required":t});function cwe(n,t){if(n&1){let r=B();d(0,"button",13),T("click",function(){D(r);let i=b(2);return M(i.beautifyJSON())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.tidy")," "))}function dwe(n,t){if(n&1){let r=B();d(0,"button",13),T("click",function(){D(r);let i=b(2);return M(i.minifyJSON())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.mini")," "))}function pwe(n,t){if(n&1){let r=B();d(0,"div",5)(1,"label",6),g(2),p(),O(3,"span",7),x(4,cwe,3,3,"button",8)(5,dwe,3,3,"button",8),d(6,"fieldset",9)(7,"div",10),v(8,"translate"),T("click",function(){D(r);let i=b();return M(i.fullscreen=!i.fullscreen)}),d(9,"button",11)(10,"mat-icon",12),g(11),p()()()()()}if(n&2){let r=b();l(),bt(Yi(9,lwe,!r.disabled&&(!r.contentValid||r.required&&!r.contentBody),!r.disabled&&r.required)),l(),z(r.label),l(2),m("ngIf",!r.readonly&&!r.disabled),l(),m("ngIf",!r.readonly&&!r.disabled),l(2),te("matTooltip",C(8,7,r.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(r.fullscreen?"fullscreen_exit":"fullscreen")}}var Eh=class Eh{constructor(t,r,e,i){this.elementRef=t,this.store=r,this.raf=e,this.cd=i,this.ignoreChange=!1,this.toastTargetId=`jsonContentEditor-${Zr()}`,this.hideToolbar=!1,this.fullscreen=!1,this.errorShowed=!1,this.propagateChange=null}ngOnInit(){let t=this.jsonEditorElmRef.nativeElement,r="text";this.contentType&&(r=g2.get(this.contentType).code);let e={mode:`ace/mode/${r}`,showGutter:!0,showPrintMargin:!1,readOnly:this.disabled||this.readonly},i={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};e=re(re({},e),i),da().subscribe(o=>{this.jsonEditor=o.edit(t,e),this.jsonEditor.session.setUseWrapMode(!0),this.jsonEditor.setValue(this.contentBody?this.contentBody:"",-1),this.jsonEditor.setReadOnly(this.disabled||this.readonly),this.jsonEditor.on("change",()=>
191{this.ignoreChange||(this.cleanupJsonErrors(),this.updateView())}),this.validateContent&&this.jsonEditor.on("blur",()=>{this.contentValid=this.doValidate(!0),this.cd.markForCheck()}),this.tbPlaceholder&&this.tbPlaceholder.length&&this.createPlaceholder(),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(t)})}createPlaceholder(){this.jsonEditor.on("input",this.updateEditorPlaceholder.bind(this)),setTimeout(this.updateEditorPlaceholder.bind(this),100)}updateEditorPlaceholder(){let t=!this.jsonEditor.session.getValue().length,r=this.jsonEditor.renderer.emptyMessageNode;if(!t&&r)this.jsonEditor.renderer.getMouseEventTarget().removeChild(r),this.jsonEditor.renderer.emptyMessageNode=null;else if(t&&!r){let e=$("<textarea></textarea>");e.text(this.tbPlaceholder),e.addClass("ace_invisible ace_emptyMessage"),e.css({padding:"0 9px",width:"100%",border:"none",textWrap:"nowrap",whiteSpace:"pre",overflow:"hidden",resize:"none",fontSize:"15px"});let i=this.tbPlaceholder.split(`
192`).length;e.attr("rows",i),r=e[0],this.jsonEditor.renderer.emptyMessageNode=r,this.jsonEditor.renderer.getMouseEventTarget().appendChild(r)}}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.jsonEditor&&this.jsonEditor.destroy()}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.jsonEditor.resize(),this.jsonEditor.renderer.updateFull()})}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];if(!e.firstChange&&e.currentValue!==e.previousValue&&r==="contentType"&&this.jsonEditor){let i="text";this.contentType&&(i=g2.get(this.contentType).code),this.jsonEditor.session.setMode(`ace/mode/${i}`)}}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.jsonEditor&&this.jsonEditor.setReadOnly(this.disabled||this.readonly)}validate(t){return this.contentValid?null:{contentBody:{valid:!1}}}validateOnSubmit(){!this.disabled&&!this.readonly&&(this.cleanupJsonErrors(),this.contentValid=!0,this.propagateChange(this.contentBody),this.contentValid=this.doValidate(!0),this.propagateChange(this.contentBody),this.cd.markForCheck())}doValidate(t=!1){try{return this.contentType===pS.JSON&&JSON.parse(this.contentBody),!0}catch(r){if(t){let e="Error:";r.name&&(e+=" "+r.name+":"),r.message&&(e+=" "+r.message),this.store.dispatch(new Sr({message:e,type:"error",target:this.toastTargetId,verticalPosition:"bottom",horizontalPosition:"left"})),this.errorShowed=!0}return!1}}cleanupJsonErrors(){this.errorShowed&&(this.store.dispatch(new Mb({target:this.toastTargetId})),this.errorShowed=!1)}writeValue(t){this.contentBody=t,this.contentValid=!0,this.jsonEditor&&(this.ignoreChange=!0,this.jsonEditor.setValue(this.contentBody?this.contentBody:"",-1),this.ignoreChange=!1)}updateView(){let t=this.jsonEditor.getValue();this.contentBody!==t&&(this.contentBody=t,this.contentValid=!this.validateOnChange||this.doValidate(),this.prop
192agateChange(this.contentBody),this.cd.markForCheck())}beautifyJSON(){Zm(this.contentBody,{indent_size:4,wrap_line_length:60}).subscribe(t=>{this.jsonEditor.setValue(t||"",-1),this.updateView()})}minifyJSON(){let t=null;try{t=JSON.stringify(JSON.parse(this.contentBody))}catch{}t&&(this.jsonEditor.setValue(t,-1),this.updateView())}onFullscreen(){this.jsonEditor&&setTimeout(()=>{this.jsonEditor.resize()},0)}};Eh.\u0275fac=function(r){return new(r||Eh)(h(ge),h(ve),h(es),h(Me))},Eh.\u0275cmp=L({type:Eh,selectors:[["tb-json-content"]],viewQuery:function(r,e){if(r&1&&ae(awe,7),r&2){let i;Q(i=K())&&(e.jsonEditorElmRef=i.first)}},inputs:{label:"label",contentType:"contentType",disabled:"disabled",fillHeight:"fillHeight",editorStyle:"editorStyle",tbPlaceholder:"tbPlaceholder",hideToolbar:"hideToolbar",readonly:"readonly",validateContent:"validateContent",validateOnChange:"validateOnChange",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>Eh),multi:!0},{provide:zn,useExisting:he(()=>Eh),multi:!0}]),lt],decls:5,vars:11,consts:[["jsonEditor",""],["tb-fullscreen","",1,"tb-json-content","flex","flex-col",2,"background","#fff",3,"fullscreenChanged","fullscreen"],["style","height: 40px;","class","tb-json-content-toolbar flex flex-row items-center justify-start",4,"ngIf"],["id","tb-json-panel","tb-toast","",1,"tb-json-content-panel","flex","flex-col",3,"toastTarget"],["id","tb-json-input"],[1,"tb-json-content-toolbar","flex","flex-row","items-center","justify-start",2,"height","40px"],[1,"tb-title","no-padding"],[1,"flex-1"],["type","button","mat-button","","class","tidy",3,"click",4,"ngIf"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],["type","button","mat-button","",1,"tidy",3,"click"]],template:function(r,e){if(r&1){let i=B();d(0,"div",1),T("fullscreenChanged",function(){return D(i),M(e.onFullscreen())}),x(1,pwe,12,12,"div",2),d(2,"div",3),O(3,"div",4,0),p()()}r&2&&(bt(Xe(9,swe,e.fillHeight)),m("fullscreen",e.fullscreen),l(),m("ngIf",!e.hideToolbar),l(),te("toastTarget",e.toastTargetId),l(),_n(e.editorStyle),Y("fill-height",e.fillHeight))},dependencies:[ce,yt,Pe,Se,zt,xs,xa,be],styles:[`@charset "UTF-8";.tb-json-content{position:relative}.tb-json-content.fill-height{height:100%}.tb-json-content:not(.tb-fullscreen){padding-bottom:15px}.tb-json-content .tb-json-content-toolbar button.mat-mdc-button-base,.tb-json-content .tb-json-content-toolbar button.mat-mdc-button-base.tb-mat-32{align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;margin:0;font-size:.8rem;line-height:15px;color:#7b7b7b;background:#dcdcdc59}.tb-json-content .tb-json-content-toolbar button.mat-mdc-button-base:not(:last-child),.tb-json-content .tb-json-content-toolbar button.mat-mdc-button-base.tb-mat-32:not(:last-child){margin-right:4px}.tb-json-content .tb-json-content-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.tb-json-content .tb-json-content-panel{height:100%;border:1px solid #c0c0c0}.tb-json-content .tb-json-content-panel #tb-json-input{width:100%;
192min-width:200px;height:100%}.tb-json-content .tb-json-content-panel #tb-json-input:not(.fill-height){min-height:200px}
193`],encapsulation:2});var ec=Eh;pe([fe(),le("design:type",Object)],ec.prototype,"hideToolbar",void 0);pe([fe(),le("design:type",Boolean)],ec.prototype,"readonly",void 0);pe([fe(),le("design:type",Boolean)],ec.prototype,"validateContent",void 0);pe([fe(),le("design:type",Boolean)],ec.prototype,"validateOnChange",void 0);pe([fe(),le("design:type",Boolean)],ec.prototype,"required",void 0);var y7={};Ae(y7,{MessageTypeAutocompleteComponent:()=>Yv});y();var mwe=["messageTypeInput"];function uwe(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",9),g(2,"close"),p()()}}function hwe(n,t){if(n&1&&(d(0,"mat-option",10),O(1,"span",11),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,e.displayMessageTypeFn(r),e.searchText),Ut)}}function fwe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"rulenode.message-type-required")," "))}var Yv=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o){this.store=e,this.translate=i,this.fb=o,this.searchText="",this.dirty=!1,this.propagateChange=a=>{},this.messageTypeFormGroup=this.fb.group({messageType:[null]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredMessageTypes=this.messageTypeFormGroup.get("messageType").valueChanges.pipe(et(e=>{this.updateView(e)}),on(""),W(e=>e||""),Ft(e=>this.fetchMessageTypes(e)))}ngAfterViewInit(){}ngOnDestroy(){}setDisabledState(e){this.disabled=e,this.disabled?this.messageTypeFormGroup.disable({emitEvent:!1}):this.messageTypeFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="",this.modelValue=e;let i=null;e&&(_S(Tn).includes(e)?i=Tn[e]:i=e),this.messageTypeFormGroup.get("messageType").patchValue(i,{emitEvent:!1}),this.dirty=!0}onFocus(){this.dirty&&(this.messageTypeFormGroup.get("messageType").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(e){let i=null;e&&(_S(Tn).includes(e)?i=Tn[e]:i=e),this.modelValue!==i&&(this.modelValue=i,this.propagateChange(this.modelValue))}displayMessageTypeFn(e){if(e)return _S(Tn).includes(e)?xF.get(Tn[e]):e}fetchMessageTypes(e){this.searchText=e;let i=[];return xF.forEach((o,a)=>{o.toUpperCase().includes(e.toUpperCase())&&i.push(a)}),i.length?Z(i):Z([e])}clear(){this.messageTypeFormGroup.get("messageType").patchValue(null,{emitEvent:!0}),setTimeout(()=>{this.messageTypeInput.nativeElement.blur(),this.messageTypeInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-message-type-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(mwe,7),i&2){let a;Q(a=K())&&(o.messageTypeInput=a.first)}},inputs:{required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:13,vars:15,consts:[["messageTypeInput",""],["messageTypeAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","messageType",3,"focusin","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",3,0),v(6,"translate"),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(7,uwe,3,0,"button",4),d(8,"mat-autocomplete",5,1),x(10,hwe,3,5,"mat-option",6),v(11,"async"),p(),x(12,fwe,3,3,"mat-error",7),p()}if(i&2){let a=me(9);m("formGroup",o.messageTypeFormGroup),l(2),z(C(3,9,"rulenode.message-type")),l(2),te("placeholder",C(6,11,"rulenode.select-message-type")),m("required",o.required)("matAutocomplete",a),l(3),m("ngIf",o.messageTypeFormGroup.get("messageType").value&&!o.disabled),l(),m("displayWith",o.displayMessageTypeFn),l(2),m("ngForOf",C(11,13,o.filteredMessageTypes)),l(2),m("ngIf",o.messageTypeFormGroup.get("messageType").hasError("required"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();
193var C7={};Ae(C7,{KeyValMapComponent:()=>Jm});y();var gwe=(n,t)=>({disabled:n,"!hidden":t});function bwe(n,t){if(n&1){let r=B();d(0,"div",7)(1,"mat-form-field",8),O(2,"input",9),v(3,"translate"),p(),d(4,"mat-form-field",8),O(5,"input",10),v(6,"translate"),p(),d(7,"button",11),v(8,"translate"),v(9,"async"),T("click",function(){let i=D(r).index,o=b();return M(o.removeKeyVal(i))}),d(10,"mat-icon"),g(11,"close"),p()()()}if(n&2){let r=t.$implicit,e=b();l(),te("subscriptSizing",e.subscriptSizing),l(),te("placeholder",C(3,11,e.keyPlaceholderText?e.keyPlaceholderText:"key-val.key")),m("formControl",r.get("key")),l(2),te("subscriptSizing",e.subscriptSizing),l(),te("placeholder",C(6,13,e.valuePlaceholderText?e.valuePlaceholderText:"key-val.value")),m("formControl",r.get("value"))("required",e.isValueRequired),l(2),Y("!hidden",e.disabled),te("matTooltip",C(8,15,"key-val.remove-entry")),m("disabled",C(9,17,e.isLoading$))}}function _we(n,t){if(n&1){let r=B();d(0,"button",12),v(1,"translate"),v(2,"async"),T("click",function(){D(r);let i=b();return M(i.addKeyVal())}),g(3),v(4,"translate"),p()}if(n&2){let r=b();Y("!hidden",r.disabled||r.isSingleMode&&r.keyValsFormArray().length),te("matTooltip",C(1,5,"key-val.add-entry")),m("disabled",C(2,7,r.isLoading$)),l(3),j(" ",C(4,9,"action.add")," ")}}function vwe(n,t){if(n&1){let r=B();d(0,"button",13),v(1,"translate"),v(2,"async"),T("click",function(){D(r);let i=b();return M(i.addKeyVal())}),g(3),v(4,"translate"),p()}if(n&2){let r=b();Y("!hidden",r.disabled||r.isSingleMode&&r.keyValsFormArray().length),te("matTooltip",C(1,5,"key-val.add-entry")),m("disabled",C(2,7,r.isLoading$)),l(3),j(" ",C(4,9,"action.add")," ")}}var Ih=class Ih extends sn{constructor(t,r){super(t),this.store=t,this.fb=r,this.isValueRequired=!0,this.isStrokedButton=!1,this.subscriptSizing="fixed",this.destroy$=new Te,this.propagateChange=null}ngOnInit(){this.kvListFormGroup=this.fb.group({keyVals:this.fb.array([])}),this.kvListFormGroup.valueChanges.pipe(Be(this.destroy$)).subscribe(()=>this.updateModel())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}keyValsFormArray(){return this.kvListFormGroup.get("keyVals")}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?this.kvListFormGroup.disable({emitEvent:!1}):this.kvListFormGroup.enable({emitEvent:!1})}writeValue(t){let r=[];if(t&&!Fn(t,{}))for(let e of Object.keys(t))Object.prototype.hasOwnProperty.call(t,e)&&r.push(this.fb.group({key:[e,[ke.required]],value:[t[e],this.isValueRequired?[ke.required]:[]]}));this.kvListFormGroup.setControl("keyVals",this.fb.array(r),{emitEvent:!1}),this.isSinglePredefinedKey&&!r.length&&this.addKeyVal(),this.disabled?this.kvListFormGroup.disable({emitEvent:!1}):this.kvListFormGroup.enable({emitEvent:!1})}removeKeyVal(t){this.kvListFormGroup.get("keyVals").removeAt(t)}addKeyVal(){this.kvListFormGroup.get("keyVals").push(this.fb.group({key:[this.isSinglePredefinedKey?this.singlePredefinedKey:"",[ke.required]],value:["",this.isValueRequired?[ke.required]:[]]}))}validate(){return this.kvListFormGroup.valid?null:{keyVals:{valid:!1}}}get isSingleMode(){return De(this.singlePredefinedKey)}get isSinglePredefinedKey(){return De(this.singlePredefinedKey)}updateModel(){let t=this.kvListFormGroup.get("keyVals").value,r={};t.forEach(e=>{r[e.key]=e.value}),this.propagateChange(r)}};Ih.\u0275fac=function(r){return new(r||Ih)(h(ve),h(Wt))},Ih.\u0275cmp=L({type:Ih,selectors:[["tb-key-val-map"]],inputs:{disabled:"disabled",isValueRequired:"isValueRequired",titleText:"titleText",keyPlaceholderText:"keyPlaceholderText",valuePlaceholderText:"valuePlaceholderText",noDataText:"noDataText",singlePredefinedKey:"singlePredefinedKey",isStrokedButton:"isStrokedButton",subscriptSizing:"subscriptSizing"},features:[ne([{provide:ye,useExisting:he(()=>Ih),multi:!0},{provide:zn,useExisting:he(()=>Ih),multi:!0}]),Ce],decls:9,vars:11,consts:[[1,"tb-kv-map","flex","flex-col",3,"formGroup"],["translate","",1,"tb-title"],["class","flex flex-row items-center justify-start gap-2","formArrayName","keyVals",4,"ngFor","ngForOf"],["translate","",1,"no-data-found","flex","items-center","justify-center"],[2,"margin-top","8px"],["mat-button","","mat-raised-button","","color","primary","type","button","matTooltipPosition","above",3,"!hidden","disabled","matTooltip","click",4,"ngIf"],["mat-button","","mat-stroked-button","","color","primary","type","button","matTooltipPosition","above",3,"!hidden","disabled","matTooltip","click",4,"ngIf"],["formArrayName","keyVals",1,"flex","flex-row","items-center","justify-start","gap-2"],[1,"mat-block","flex-1",3,"subscriptSizing"],["matInput","","required","",3,"formControl","placeholder"],["matInput","",3,"formControl","required","placeholder"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",3,"click","disabled","matTooltip"],["mat-button","","mat-raised-button","","color","primary","type","button","matTooltipPosition","above",3,"click","disabled","matTooltip"],["mat-button","","mat-stroked-button","","color","primary","type","button","matTooltipPosition","above",3,"click","disabled","matTooltip"]],template:function(r,e){r&1&&
193(d(0,"section",0)(1,"label",1),g(2),p(),x(3,bwe,12,19,"div",2),d(4,"span",3),g(5),p(),d(6,"div",4),x(7,_we,5,11,"button",5)(8,vwe,5,11,"button",6),p()()),r&2&&(m("formGroup",e.kvListFormGroup),l(2),z(e.titleText),l(),m("ngForOf",e.keyValsFormArray().controls),l(),bt(Yi(8,gwe,e.disabled,e.keyValsFormArray().length)),l(),z(e.noDataText?e.noDataText:"key-val.no-data"),l(2),m("ngIf",!e.isStrokedButton),l(),m("ngIf",e.isStrokedButton))},dependencies:[Ke,ce,jt,yt,Pe,Se,at,ze,zt,ut,xe,We,St,Br,$e,Ob,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-kv-map[_ngcontent-%COMP%]   span.no-data-found[_ngcontent-%COMP%]{position:relative;display:flex;height:40px}[_nghost-%COMP%]   .tb-kv-map[_ngcontent-%COMP%]   span.no-data-found.disabled[_ngcontent-%COMP%]{color:#00000061}']});var Jm=Ih;pe([fe(),le("design:type",Object)],Jm.prototype,"isValueRequired",void 0);var ywe=["payloadContent"],Cwe=["topPanel"],wwe=["topLeftPanel"],xwe=["topRightPanel"],Swe=["bottomPanel"],Twe=["bottomLeftPanel"],Ewe=["bottomRightPanel"],Iwe=(n,t,r)=>[n,t,r],Ik=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f){super(e,i,s),this.store=e,this.router=i,this.data=o,this.errorStateMatcher=a,this.dialogRef=s,this.fb=c,this.wl=u,this.ruleChainService=f,this.width="100%",this.height="100%",this.submitted=!1,this.contentTypes=pS,this.scriptLanguage=Ea,this.scriptLang=this.data.scriptLang?this.data.scriptLang:Ea.JS,this.functionTitle=this.data.functionTitle}ngOnInit(){this.nodeScriptTestFormGroup=this.fb.group({payload:this.fb.group({msgType:[this.data.msgType,[ke.required]],msg:[null,[]]}),metadata:[this.data.metadata,[ke.required]],script:[this.data.script,[]],output:["",[]]}),Zm(JSON.stringify(this.data.msg),{indent_size:4}).subscribe(e=>{this.nodeScriptTestFormGroup.get("payload").get("msg").patchValue(e,{emitEvent:!1})})}ngAfterViewInit(){this.initSplitLayout(this.topPanelElmRef.first.nativeElement,this.topLeftPanelElmRef.first.nativeElement,this.topRightPanelElmRef.first.nativeElement,this.bottomPanelElmRef.first.nativeElement,this.bottomLeftPanelElmRef.first.nativeElement,this.bottomRightPanelElmRef.first.nativeElement)}initSplitLayout(e,i,o,a,s,c){Split([e,a],{sizes:[35,65],gutterSize:8,cursor:"row-resize",direction:"vertical"}),Split([i,o],{sizes:[50,50],gutterSize:8,cursor:"col-resize"}),Split([s,c],{sizes:[50,50],gutterSize:8,cursor:"col-resize"})}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invalid&&this.submitted);return o||a}cancel(){this.dialogRef.close(null)}test(){this.testNodeScript().subscribe(e=>{Zm(e,{indent_size:4}).subscribe(i=>{this.nodeScriptTestFormGroup.get("output").setValue(i)})})}testNodeScript(){if(this.checkInputParamErrors()){let e={argNames:this.data.argNames,scriptType:this.data.scriptType,msgType:this.nodeScriptTestFormGroup.get("payload.msgType").value,msg:this.nodeScriptTestFormGroup.get("payload.msg").value,metadata:this.nodeScriptTestFormGroup.get("metadata").value,script:this.nodeScriptTestFormGroup.get("script").value};return this.ruleChainService.testScript(e,this.scriptLang).pipe(Ft(i=>i.error?(this.store.dispatch(new Sr({message:i.error,type:"error"})),n2):Z(i.output)))}else return n2}checkInputParamErrors(){return this.payloadContent.validateOnSubmit(),!!this.nodeScriptTestFormGroup.get("payload").valid}save(){this.submitted=!0,this.testNodeScript().subscribe(()=>{this.nodeScriptTestFormGroup.get("script").markAsPristine(),this.dialogRef.close(this.nodeScriptTestFormGroup.get("script").value)})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(Nn,4),h(en),h(Wt),h(fl),h(vp))},t.\u0275cmp=L({type:t,selectors:[["tb-node-script-test-dialog"]],viewQuery:function(i,o){if(i&1&&(ae(ywe,7),ae(Cwe,5),ae(wwe,5),ae(xwe,5),ae(Swe,5),ae(Twe,5),ae(Ewe,5)),i&2){let a;Q(a=K())&&(o.payloadContent=a.first),Q(a=K())&&(o.topPanelElmRef=a),Q(a=K())&&(o.topLeftPanelElmRef=a),Q(a=K())&&(o.topRightPanelElmRef=a),Q(a=K())&&(o.bottomPanelElmRef=a),Q(a=K())&&(o.bottomLeftPanelElmRef=a),Q(a=K())&&(o.bottomRightPanelElmRef=a)}},hostVars:4,hostBindings:function(i,o){i&2&&hi("width",o.width)("height",o.height)},features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:64,vars:50,consts:[["topPanel",""],["topLeftPanel",""],["payloadContent",""],["topRightPanel",""],["bottomPanel",""],["bottomLeftPanel",""],["bottomRightPanel",""],[1,"tb-node-script-test-dialog",3,"ngSubmit","formGroup"],["color","primary",1,"flex","flex-row"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["mat-dialog-content","",1,"flex-1",2,"position","relative"],[1,"tb-absolute-fill"],[1,"tb-split","tb-split-vertical"],[1,"tb-split","tb-content"],[1,"tb-resize-container"],[1,"tb-editor-area-title-panel"],["translate",""],["formGroupName","payload",1,"flex","flex-col",2,"height","100%"],[1,"flex","flex-row"],["formControlName","msgType","required","",2,"margin-bottom","0","min-width","300px"],["formControlName","msg","validateContent","",1,"flex-1",3,"label","contentType","fillHeight"],["tb-toast","","toastTarget","metadataPanel",1,"tb-resize-container"],["subscriptSizing","dynamic","formControlName","metadata","titleText","rulenode.metadata",3,"isValueRequired"],[1,"tb-editor-area-title-panel","tb-js-function"],["formControlName","script","resultType","object",3,"functionName","functionArgs","validationArgs","disableUndefinedCheck","scriptLanguage","helpId","fillHeight"],["formControlName","output","validateContent","false","readonly","true",1,"flex-1",3,"label","contentType","fillHeight"],["mat-dialog-actions","",1,"flex","flex-row"],["mat-button","","mat-raised-button","","color","primary","type","button",3,"click","disabled"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-button","","mat-raised-button","","color","primary","type","submit",3,"disabled"]],template:function(i,o){if(i&1){let a=B();d(0,"form",7),T("ngSubmit",function(){return D(a),M(o.save())}),d(1,"mat-toolbar",8)(2,"h2"),g(3),v(4,"translate"),v(5,"translate"),p(),O(6,"span",9),d(7,"button",10),T("click",function(){return D(a),M(o.cancel())}),d(8,"mat-icon",11),g(9,"close"),p()()(),d(10,"div",12)(11,"div",13)(12,"div",14,0)(14,"div",15,1)(16,"div",16)(17,"div",17)(18,"label",18),g(19,"rulenode.message"),p()(),d(20,"div",19)(21,"div",20),O(22,"tb-message-type-autocomplete",21),p(),O(23,"tb-json-content",22,2),v(25,"translate"),p()()(),d(26,"div",15,3)(28,"div",23)(29,"div",17)(30,"label",18),g(31,"rulenode.metadata"),p()(),O(32,"tb-key-val-map",24),p()()(),d(33,"div",14,4)(35,"div",15,5)(37,"div",16)(38,"div",25)(39,"label"),g(40),p()(),O(41,"tb-js-func",26),p()(),d(42,"div",15,6)(44,"div",16)(45,"div",17)(46,"label",18),g(47,"rulenode.output"),p()(),O(48,"tb-json-content",27),v(49,"translate"),p()()()()(),d(50,"div",28)(51,"button",29),v(52,"async"),T("click",function(){return D(a),M(o.test())}),g(53),v(54,"translate"),p(),O(55,"span",9),d(56,"button",30),v(57,"async"),T("click",function(){return D(a),M(o.cancel())}),g(58),v(59,"translate"),p(),d(60,"button",31),v(61,"async"),g(62),v(63,"translate"),p()()()}i&2&&(m("formGroup",o.nodeScriptTestFormGroup),l(3),fa("",C(4,26,"rulenode.test-script-function")," (",C(5,28,o.scriptLang===o.scriptLanguage.JS?"rulenode.script-lang-java-script":"rulenode.script-lang-tbel"),")"),l(20),te("label",C(25,30,"rulenode.message")),m("contentType",o.contentTypes.JSON)("fillHeight",!0),l(9),m("isValueRequired",!1),l(6),Y("tb-js-function-help",o.data.helpId&&o.wl.isEnableHelpLinks()),l(2),z(o.functionTitle),l(
193),te("functionName",o.data.functionName),m("functionArgs",o.data.argNames)("validationArgs",rl(46,Iwe,o.data.msg,o.data.metadata,o.data.msgType))("disableUndefinedCheck",o.scriptLang===o.scriptLanguage.TBEL)("scriptLanguage",o.scriptLang)("helpId",o.data.helpId)("fillHeight",!0),l(7),te("label",C(49,32,"rulenode.output")),m("contentType",o.contentTypes.JSON)("fillHeight",!0),l(3),m("disabled",C(52,34,o.isLoading$)||o.nodeScriptTestFormGroup.invalid),l(2),j(" ",C(54,36,"rulenode.test")," "),l(3),m("disabled",C(57,38,o.isLoading$)),l(2),j(" ",C(59,40,"action.cancel")," "),l(2),m("disabled",C(61,42,o.isLoading$)||o.nodeScriptTestFormGroup.get("script").invalid||!o.nodeScriptTestFormGroup.get("script").dirty),l(2),j(" ",C(63,44,"action.save")," "))},dependencies:[jt,yt,Pe,Se,ir,gr,Dn,ur,xe,We,St,$e,Qe,Ka,xs,ec,Lc,Yv,Jm,Ve,be],styles:[`@charset "UTF-8";.tb-node-script-test-dialog{width:100%;height:100%}.tb-node-script-test-dialog .tb-split{box-sizing:border-box;overflow-x:hidden;overflow-y:auto}.tb-node-script-test-dialog .ace_editor{font-size:14px!important}.tb-node-script-test-dialog .tb-content{padding-top:5px;padding-left:5px;border:1px solid #c0c0c0}.tb-node-script-test-dialog .gutter{background-color:#eee;background-repeat:no-repeat;background-position:50%}.tb-node-script-test-dialog .gutter.gutter-horizontal{cursor:col-resize;background-image:url("./vertical-6GFVMCUE.png")}.tb-node-script-test-dialog .gutter.gutter-vertical{cursor:row-resize;background-image:url("./horizontal-2FDVWMXP.png")}.tb-node-script-test-dialog .tb-split.tb-split-horizontal,.tb-node-script-test-dialog .gutter.gutter-horizontal{float:left;height:100%}.tb-node-script-test-dialog .tb-split.tb-split-vertical{display:flex}.tb-node-script-test-dialog .tb-split.tb-split-vertical .tb-split.tb-content{height:100%}.tb-node-script-test-dialog div.tb-editor-area-title-panel{position:absolute;top:8px;right:40px;z-index:5;font-size:.8rem;font-weight:500}.tb-node-script-test-dialog div.tb-editor-area-title-panel.tb-js-function{right:80px}.tb-node-script-test-dialog div.tb-editor-area-title-panel.tb-js-function.tb-js-function-help{right:116px}.tb-node-script-test-dialog div.tb-editor-area-title-panel label{padding:4px;color:#00acc1;background:#dcdcdc59;border-radius:5px}.tb-node-script-test-dialog div.tb-editor-area-title-panel .mat-mdc-button{min-width:32px;min-height:15px;padding:4px;margin:0;font-size:.8rem;line-height:15px;color:#7b7b7b;background:#dcdcdc59}.tb-node-script-test-dialog .tb-resize-container{position:relative;width:100%;height:100%;overflow-y:auto}.tb-node-script-test-dialog .tb-resize-container .ace_editor{height:100%}
194`],encapsulation:2});let n=t;return n})();var Owe={};Ae(Owe,{TbCheatSheetComponent:()=>kk});y();var w7=Ld(NE());function Dwe(n,t){if(n&1&&(d(0,"span",9),g(1),p()),n&2){let r=t.$implicit;l(),z(r)}}function Mwe(n,t){if(n&1&&(d(0,"tr")(1,"td",6),x(2,Dwe,2,1,"span",7),p(),d(3,"td",8),g(4),p()()),n&2){let r=t.$implicit;l(2),m("ngForOf",r.formatted),l(2),z(r.description)}}function Awe(n,t){if(n&1&&(d(0,"table")(1,"tbody"),x(2,Mwe,5,2,"tr",5),p()()),n&2){let r=b
194();l(2),m("ngForOf",r.hotkeysList)}}var kk=(()=>{let t=class t{constructor(e,i){this.elementRef=e,this.hotkeysService=i,this.helpVisible=!1,this.title="Keyboard Shortcuts:",this.mousetrap=new w7.default(this.elementRef.nativeElement),this.mousetrap.bind("?",(o,a)=>{this.toggleCheatSheet()})}ngOnInit(){this.hotkeys&&(this.hotkeysList=this.hotkeys.filter(e=>e.description))}setHotKeys(e){this.hotkeysList=e.filter(i=>i.description)}toggleCheatSheet(){this.helpVisible=!this.helpVisible}ngOnDestroy(){this.mousetrap.unbind("?")}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(N_))},t.\u0275cmp=L({type:t,selectors:[["tb-hotkeys-cheatsheet"]],inputs:{title:"title",hotkeys:"hotkeys"},decls:7,vars:4,consts:[["tabindex","-1",1,"tb-hotkeys-container","fade",2,"display","none"],[1,"tb-hotkeys"],[1,"tb-hotkeys-title"],[4,"ngIf"],[1,"tb-hotkeys-close",3,"click"],[4,"ngFor","ngForOf"],[1,"tb-hotkeys-keys"],["class","tb-hotkeys-key",4,"ngFor","ngForOf"],[1,"tb-hotkeys-text"],[1,"tb-hotkeys-key"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"div",1)(2,"h4",2),g(3),p(),x(4,Awe,3,1,"table",3),d(5,"div",4),T("click",function(){return o.toggleCheatSheet()}),g(6,"\xD7"),p()()()),i&2&&(Y("in",o.helpVisible),l(3),z(o.title),l(),m("ngIf",o.helpVisible))},dependencies:[Ke,ce],styles:[".tb-hotkeys-container[_ngcontent-%COMP%]{display:table!important;position:fixed;width:100%;height:100%;top:0;left:0;color:#333;font-size:1em;background-color:#ffffffe6;outline:0}.tb-hotkeys-container.fade[_ngcontent-%COMP%]{z-index:-1024;visibility:hidden;opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.tb-hotkeys-container.fade.in[_ngcontent-%COMP%]{z-index:10002;visibility:visible;opacity:1}.tb-hotkeys-title[_ngcontent-%COMP%]{font-weight:700;text-align:center;font-size:1.2em}.tb-hotkeys[_ngcontent-%COMP%]{width:100%;height:100%;display:table-cell;vertical-align:middle}.tb-hotkeys[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{margin:auto;color:#333}.tb-content[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.tb-hotkeys-keys[_ngcontent-%COMP%]{padding:5px;text-align:right}.tb-hotkeys-key[_ngcontent-%COMP%]{display:inline-block;color:#fff;background-color:#333;border:1px solid #333;border-radius:5px;text-align:center;margin-right:5px;box-shadow:inset 0 1px #666,0 1px #bbb;padding:5px 9px;font-size:1em}.tb-hotkeys-text[_ngcontent-%COMP%]{padding-left:10px;font-size:1em}.tb-hotkeys-close[_ngcontent-%COMP%]{position:fixed;top:20px;right:20px;font-size:2em;font-weight:700;padding:5px 10px;border:1px solid #ddd;border-radius:5px;min-height:45px;min-width:45px;text-align:center}.tb-hotkeys-close[_ngcontent-%COMP%]:hover{background-color:#fff;cursor:pointer}@media all and (max-width: 500px){.tb-hotkeys[_ngcontent-%COMP%]{font-size:.8em}}@media all and (min-width: 750px){.tb-hotkeys[_ngcontent-%COMP%]{font-size:1.2em}}"]});let n=t;return n})();var Pwe={};Ae(Pwe,{TbHotkeysDirective:()=>Dk});y();var x7=Ld(NE());var Dk=(()=>{let t=class t{constructor(e){this.elementRef=e,this.hotkeys=[],this.hotkeysList=[],this.preventIn=["INPUT","SELECT","TEXTAREA"],this.mousetrap=new x7.default(this.elementRef.nativeElement),this.elementRef.nativeElement.tabIndex=-1,this.elementRef.nativeElement.style.outline="0"}ngOnInit(){for(let e of this.hotkeys)this.hotkeysList.push(e),this.bindEvent(e);
194if(this.cheatSheet){let e=new eg("?",()=>(this.cheatSheet.toggleCheatSheet(),!1),[],"Show / hide this help menu");this.hotkeysList.unshift(e),this.bindEvent(e),this.cheatSheet.setHotKeys(this.hotkeysList)}}bindEvent(e){this.mousetrap.bind(e.combo,(i,o)=>{let a=!0;if(i){let s=i.target,c=s.nodeName.toUpperCase();(" "+s.className+" ").indexOf(" mousetrap ")>-1?a=!0:this.preventIn.indexOf(c)>-1&&e.allowIn.map(u=>u.toUpperCase()).indexOf(c)===-1&&(a=!1)}if(a)return e.callback.apply(this,[i,o])})}ngOnDestroy(){for(let e of this.hotkeysList)this.mousetrap.unbind(e.combo)}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275dir=_e({type:t,selectors:[["","tb-hotkeys",""]],inputs:{hotkeys:[0,"tb-hotkeys","hotkeys"],cheatSheet:"cheatSheet"}});let n=t;return n})();var Rwe={};Ae(Rwe,{NavTreeComponent:()=>Mk});y();var Mk=(()=>{let t=class t{get enableSearch(){return this.enableSearchValue}set enableSearch(e){this.enableSearchValue=mt(e)}constructor(e,i){this.elementRef=e,this.ngZone=i}ngOnInit(){this.initTree()}initTree(){let i={core:{worker:!1,multiple:!1,check_callback:!0,themes:{name:"proton",responsive:!0},data:(o,a)=>{let s=c=>{let u=[];c&&c.forEach(f=>{u.push(Di(f,["data"]))}),a(u)};this.ngZone.runOutsideAngular(()=>{this.loadNodes(o,s)})},error:()=>{console.error("Unexpected jstree error!")}},plugins:[]};this.enableSearch&&(i.plugins.push("search"),i.search={ajax:!1,fuzzy:!1,close_opened_onclear:!0,case_sensitive:!1,show_only_matches:!0,show_only_matches_children:!1,search_leaves_only:!1,search_callback:this.searchCallback}),import("./chunk-XYK3I3SX.js").then(()=>{this.treeElement=$(".tb-nav-tree-container",this.elementRef.nativeElement).jstree(i),this.treeElement.on("changed.jstree",(o,a)=>{if(this.onNodeSelected&&a.action!=="ready"){let s=a.instance.get_selected(!0)[0];this.ngZone.run(()=>this.onNodeSelected(s,o))}}),this.treeElement.on("model.jstree",(o,a)=>{this.onNodesInserted&&this.ngZone.run(()=>this.onNodesInserted(a.nodes,a.parent))}),this.editCallbacks&&(this.editCallbacks.selectNode=o=>{let a=this.treeElement.jstree("get_node",o);a&&(this.treeElement.jstree("deselect_all",!0),this.treeElement.jstree("select_node",a))},this.editCallbacks.deselectAll=()=>{this.treeElement.jstree("deselect_all")},this.editCallbacks.getNode=o=>this.treeElement.jstree("get_node",o),this.editCallbacks.getParentNodeId=o=>{let a=this.treeElement.jstree("get_node",o);if(a)return this.treeElement.jstree("get_parent",a)},this.editCallbacks.openNode=(o,a)=>{let s=this.treeElement.jstree("get_node",o);s&&this.treeElement.jstree("open_node",s,a)},this.editCallbacks.nodeIsOpen=o=>{let a=this.treeElement.jstree("get_node",o);return a?this.treeElement.jstree("is_open",a):!0},this.editCallbacks.nodeIsLoaded=o=>{let a=this.treeElement.jstree("get_node",o);return a?this.treeElement.jstree("is_loaded",a):!0},this.editCallbacks.refreshNode=o=>{if(o==="#")this.treeElement.jstree("refresh"),this.treeElement.jstree("redraw");else{let a=this.treeElement.jstree("get_node",o);if(a){let s=this.treeElement.jstree("is_open",a);this.treeElement.jstree("refresh_node",a),this.treeElement.jstree("redraw"),a.children&&s&&this.treeElement.jstree("open_node",a)}}},this.editCallbacks.updateNode=(o,a,s)=>{let c=this.treeElement.jstree("get_node",o);c&&this.treeElement.jstree("rename_node",c,a),s&&c.data&&Object.assign(c.data,s)},this.editCallbacks.createNode=(o,a,s)=>{let c=this.treeElement.jstree("get_node",o);c&&this.treeElement.jstree("create_node",c,a,s)},this.editCallbacks.deleteNode=o=>{let a=this.treeElement.jstree("get_node",o);a&&this.treeElement.jstree("delete_node",a)},this.editCallbacks.disableNode=o=>{let a=this.treeElement.jstree("get_node",o);a&&this.treeElement.jstree("disable_node",a)},this.editCallbacks.enableNode=o=>{let a=this.treeElement.jstree("get_node",o);a&&this.treeElement.jstree("enable_node",a)},this.editCallbacks.setNodeHasChildren=(o,a)=>{let s=this.treeElement.jstree("get_node",o);s&&(!s.children||Array.isArray(s.children)&&!s.children.length)&&(s.children=a,s.state.loaded=!a,s.state.opened=!1,this.treeElement.jstree("_node_changed",s.id),this.treeElement.jstree("redraw"))},this.editCallbacks.search=o=>{this.treeElement.jstree("search",o)},this.editCallbacks.clearSearch=()=>{this.treeElement.jstree("clear_search")})})}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["tb-nav-tree"]],inputs:{enableSearch:"enableSearch",loadNodes:"loadNodes",searchCallback:"searchCallback",onNodeSelected:"onNodeSelected",onNodesInserted:"onNodesInserted",editCallbacks:"editCallbacks"},decls:1,vars:0,consts:[[1,"tb-nav-tree-container"]],template:function(i,o){i&1&&O(0,"div",0)},styles:[`@charset "UTF-8";.tb-nav-tree-container{padding:15px;font-family:Roboto,Helvetica Neue,sans-serif}.tb-nav-tree-container.jstree-proton .jstree-node,.tb-nav-tree-container.jstree-proton .jstree-icon,.tb-nav-tree-container.jstree-proton-small .jstree-node,.tb-nav-tree-container.jstree-proton-small .jstree-icon,.tb-nav-tree-container.jstree-proton-large .jstree-node,.tb-nav-tree-container.jstree-proton-large .jstree-icon{background-image:url("./tb32px-PRKG5MGR.png")}.tb-nav-tree-container.jstree-proton .jstree-last,.tb-nav-tree-container.jstree-proton-small .jstree-last,.tb-nav-tree-container.jstree-proton-large .jstree-last{background:transparent}.tb-nav-tree-container.jstree-proton .jstree-themeicon-custom,.tb-nav-tree-container.jstree-proton-small .jstree-themeicon-custom,.tb-nav-tree-container.jstree-proton-large .jstree-themeicon-custom{background-image:none}.tb-nav-tree-container.jstree-proton .jstree-themeicon-custom.material-icons{font-size:18px}.tb-nav-tree-container.jstree-proton .jstree-anchor{font-size:16px}.tb-nav-tree-container.jstree-proton .jstree-file{background:url("./tb32px-PRKG5MGR.png") -101px -69px no-repeat}.tb-nav-tree-container.jstree-proton .jstree-folder{background:url("./tb32px-PRKG5MGR.png") -261px -5px no-repeat}.tb-nav-tree-container.jstree-proton-small .jstree-themeicon-custom.material-icons,.tb-nav-tree-container.jstree-proton-small .jstree-anchor{font-size:14px}.tb-nav-tree-container.jstree-proton-small .jstree-file{background:url("./tb32px-PRKG5MGR.png") -103px -71px no-repeat}.tb-nav-tree-container.jstree-proton-small .jstree-folder{background:url("./tb32px-PRKG5MGR.png") -263px -7px no-repeat}.tb-nav-tree-container.jstree-proton-large .jstree-themeicon-custom.material-icons{font-size:24px}.tb-nav-tree-container.jstree-proton-large .jstree-anchor{font-size:20px}.tb-nav-tree-container.jstree-proton-large .jstree-file{background:url("./tb32px-PRKG5MGR.png") -96px -64px no-repeat}.tb-nav-tree-container.jstree-proton-large .jstree-folder{background:url("./tb32px-PRKG5MGR.png") -256px 0px no-repeat}.tb-nav-tree-container a{border-bottom:none}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-user-group:before{content:"account_circle"}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-customer-group:before{content:"supervisor_account"}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-asset-group:before{content:"domain"}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-device-group:before{content:"devices_other"}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-entity-view-group:before{content:"view_quilt"}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-dashboard-group:before{content:"dashboard"}.tb-nav-tree-container a i.jstree-themeicon-custom.tb-customer:before{content:"supervisor_account"}#jstree-dnd.jstree-proton .jstree-ok,#jstree-dnd.jstree-proton .jstree-er,#jstree-dnd.jstree-proton-small .jstree-ok,#jstree-dnd.jstree-proton-small .jstree-er,#jstree-dnd.jstree-proton-large .jstree-ok,#jstree-dnd.jstree-proton-large .jstree-er{background-image:url("./tb32px-PRKG5MGR.png")}@media (max-width: 768px){.tb-nav-tree-container.jstree-proton-responsive .jstree-node,.tb-nav-tree-container.jstree-proton-responsive .jstree-icon,.tb-nav-tree-container.jstree-proton-responsive .jstree-node>.jstree-ocl,.tb-nav-tree-container.jstree-proton-responsive .jstree-themeicon,.tb-nav-tree-container.jstree-proton-responsive .jstree-checkbox{background-image:url("./tb40px-QFB5QABV.png");background-size:120px 240px}.tb-nav-tree-container.jstree-proton-responsive .jstree-container-ul{overflow:visible}.tb-nav-tree-container.jstree-proton-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.tb-nav-tree-container.jstree-proton-responsive .jstree-themeicon-custom.material-icons{margin:0;font-size:24px}.tb-nav-tree-container.jstree-proton-responsive .jstree-node,.tb-nav-tree-container.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background:0 0}.tb-nav-tree-container.jstree-proton-responsive .jstree-node{min-width:40px;min-height:40px;margin-left:40px;line-height:40px;white-space:nowrap;background-repeat:repeat-y;background-position:-80px 0}.tb-nav-tree-container.jstree-proton-responsive .jstree-last{background:0 0}.tb-nav-tree-container.jstree-proton-responsive .jstree-anchor{height:40px;font-size:1.1em;font-weight:700;line-height:40px;text-shadow:1px 1px #fff}.tb-nav-tree-container.jstree-proton-responsive .jstree-icon,.tb-nav-tree-container.jstree-proton-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.tb-nav-tree-container.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-right:0;margin-left:0}.tb-nav-tree-container.jstree-proton-responsive .jstree-ocl,.tb-nav-tree-container.jstree-proton-responsive .jstree-themeicon,.tb-nav-tree-container.jstree-proton-responsive .jstree-checkbox{background-size:120px 240px}.tb-nav-tree-container.jstree-proton-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.tb-nav-tree-container.jstree-proton-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.tb-nav-tree-container.jstree-proton-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.tb-nav-tree-container.jstree-proton-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.tb-nav-tree-container.jstree-proton-responsive .jstree-themeicon{background-position:-40px -40px}.tb-nav-tree-container.jstree-proton-responsive .jstree-file{background:url("./tb40px-QFB5QABV.png") 0 -160px no-repeat;background-size:120px 240px}.tb-nav-tree-container.jstree-proton-responsive .jstree-folder{background:url("./tb40px-QFB5QABV.png") -40px -40px no-repeat;background-size:120px 240px}.tb-nav-tree-container.jstree-proton-responsive .jstree-checkbox,.tb-nav-tree-container.jstree-proton-responsive .jstree-checkbox:hover{background-position:-40px -80px}.tb-nav-tree-container.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.tb-nav-tree-container.jstree-proton-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:0 -80px}.tb-nav-tree-container.jstree-proton-responsive .jstree-checked>.jstree-checkbox,.tb-nav-tree-container.jstree-proton-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.tb-nav-tree-container.jstree-proton-responsive .jstree-anchor>.jstree-undetermined,.tb-nav-tree-container.jstree-proton-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.tb-nav-tree-container.jstree-proton-responsive .jstree-striped{background:0 0}.tb-nav-tree-container.jstree-proton-responsive .jstree-wholerow{height:40px;background:#ebebeb;border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2)}.tb-nav-tree-container.jstree-proton-responsive .jstree-wholerow-hovered{background:#e7f4f9}.tb-nav-tree-container.jstree-proton-responsive .jstree-wholerow-clicked{background:#beebff}.tb-nav-tree-container.jstree-proton-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.tb-nav-tree-container.jstree-proton-responsive .jstree-children .jstree-open>.jstree-wholerow{border-top:0;box-shadow:inset 0 6px 3px -5px #666}.tb-nav-tree-container.jstree-proton-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.tb-nav-tree-container.jstree-proton-responsive.jstree-rtl .jstree-node{margin-right:40px;margin-left:0}.tb-nav-tree-container.jstree-proton-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.tb-nav-tree-container.jstree-proton-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}}@media (max-width: 768px){#jstree-dnd.jstree-dnd-responsive .jstree-ok,#jstree-dnd.jstree-dnd-responsive .jstree-er{background-image:url("./tb40px-QFB5QABV.png");background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive .jstree-ok{background-position:0 -200px}#jstree-dnd.jstree-dnd-responsive .jstree-er{background-position:-40px -200px}}.tb-nav-tree .mat-mdc-button.tb-active{font-weight:500;background-color:#ffffff26}.tb-nav-tree,.tb-nav-tree ul{margin-top:0;list-style:none}.tb-nav-tree:first-child,.tb-nav-tree ul:first-child{padding:0}.tb-nav-tree li .mat-mdc-button,.tb-nav-tree ul li .mat-mdc-button{width:100%;max-height:40px;padding:0 16px;margin:0;overflow:hidden;line-height:40px;color:inherit;text-align:left;text-decoration:none;text-overflow:ellipsis;text-transform:none;text-rendering:optimizeLegibility;white-space:nowrap;cursor:pointer;border-radius:0}.tb-nav-tree li .mat-mdc-button span,.tb-nav-tree ul li .mat-mdc-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
195`],encapsulation:2});let n=t;return n})();var Fwe={};Ae(Fwe,{LedLightComponent:()=>Ak});y();var Ak=(()=>{let t=class t{get enabled(){return this.enabledValue}set enabled(e){this.enabledValue=mt(e)}constructor(e){this.elementRef=e}ngOnInit(){this.offOpacity=this.offOpacity||.4,this.glowColor=Hd(this.colorOn).lighten().toHexString()}ngAfterViewInit(){this.update()}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&(i==="enabled"&&this.circleElement?this.draw():i==="size"&&this.update())}}update(){this.size=this.size||50,this.canvasSize=this.size,this.radius=this.canvasSize/4,this.glowSize=this.radius/5,import("./chunk-DOLVJOHJ.js").then(e=>{this.paper&&this.paper.remove(),this.paper=e.default($("#canvas_container",this.elementRef.nativeElement)[0],this.canvasSize,this.canvasSize);let i=this.canvasSize/2;this.circleElement=this.paper.circle(i,i,this.radius),this.draw()})}draw(){this.enabled?(this.circleElement.attr("fill",this.colorOn),this.circleElement.attr("stroke",this.colorOn),this.circleElement.attr("opacity",1),this.circleElement.theGlow&&this.circleElement.theGlow.remove(),this.circleElement.theGlow=this.circleElement.glow({color:this.glowColor,width:this.radius+this.glowSize,opacity:.8,fill:!0})):(this.circleElement.theGlow&&this.circleElement.theGlow.remove(),this.circleElement.attr("fill",this.colorOff),this.circleElement.attr("stroke",this.colorOff),this.circleElement.attr("opacity",this.offOpacity))}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275cmp=L({type:t,selectors:[["tb-led-light"]],inputs:{size:"size",colorOn:"c
195olorOn",colorOff:"colorOff",offOpacity:"offOpacity",enabled:"enabled"},features:[lt],decls:1,vars:4,consts:[["id","canvas_container"]],template:function(i,o){i&1&&O(0,"div",0),i&2&&hi("width",o.size+"px")("height",o.size+"px")},encapsulation:2});let n=t;return n})();var Uwe={};Ae(Uwe,{EntityGatewaySelectComponent:()=>Ok});y();var Nwe=["deviceGatewayInput"],Vwe=n=>({item:n});function Lwe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",11),g(2,"close"),p()()}}function Bwe(n,t){if(n&1&&(d(0,"mat-option",12),O(1,"span",13),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function jwe(n,t){n&1&&(d(0,"div")(1,"span",18),g(2,"gateway.no-gateway-found"),p()())}function Gwe(n,t){if(n&1&&(d(0,"span",19),v(1,"truncate"),g(2," gateway.no-gateway-matching "),p()),n&2){let r=b(2);m("translateParams",Xe(6,Vwe,ds(1,1,r.searchText,!0,6,"...")))}}function zwe(n,t){if(n&1){let r=B();d(0,"mat-option",14)(1,"div",15),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,jwe,3,0,"div",16)(3,Gwe,3,8,"ng-template",null,2,kt),d(5,"span")(6,"a",17),T("click",function(i){D(r);let o=b();return M(o.createGateway(i,o.searchText))}),g(7,"gateway.create-new-gateway"),p()()()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function $we(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"gateway.gateway-name-required")," "))}var Ok=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}set newGatewayType(e){this.gatewayType=e}constructor(e,i,o,a,s,c){this.store=e,this.entityService=i,this.dialogService=o,this.deviceService=a,this.translate=s,this.fb=c,this.gatewayNameExist=new J,this.gatewayType="Gateway",this.searchText="",this.propagateChange=u=>{}}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.selectDeviceGatewayFormGroup=this.fb.group({gateway:this.fb.control({value:null,disabled:this.isStateForm})}),this.loadGatewayList(),this.filteredGateways=this.selectDeviceGatewayFormGroup.get("gateway").valueChanges.pipe(et(e=>{let i;typeof e=="string"||!e?i=null:i=e.id.id,this.updateView(i),e===null&&this.clear()}),W(e=>e?typeof e=="string"?e:e.name:""),Ft(e=>this.fetchGateway(e)),Si())}fetchGateway(e){this.searchText=e;let i=[];return e&&e.length?i=this.gatewayList.filter(o=>o.name.toLowerCase().includes(e.toLowerCase())):i=this.gatewayList,Z(i)}onFocus(){this.dirty&&(this.selectDeviceGatewayFormGroup.get("gateway").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}displayGatewayFn(e){return e?e.name:void 0}setDisabledState(e){}writeValue(e){e===null&&(this.searchText="",this.selectDeviceGatewayFormGroup.get("gateway").patchValue("",{emitEvent:!1}),this.dirty=!0)}clear(e="",i){this.searchText=e,this.selectDeviceGatewayFormGroup.get("gateway").patchValue(e,{emitEvent:!0}),i||setTimeout(()=>{this.deviceGatewayInput.nativeElement.blur(),this.deviceGatewayInput.nativeElement.focus()},0)}textIsNotEmpty(e){return!!e&&e.length>0}gatewayNameEnter(e){e.keyCode===13&&(this.modelValue||this.createGateway(e,this.searchText))}createGateway(e,i){e.preventDefault(),e.stopPropagation();let o=this.translate.instant("gateway.create-new-gateway"),a=this.translate.instant("gateway.create-new-gateway-text",{gatewayName:i});this.dialogService.confirm(o,a,null,null,!0).subscribe(s=>{s?this.createDeviceGateway(i):this.clear("",!0)})}createDeviceGateway(e){this.deviceService.findByName(e,{ignoreErrors:!0}).subscribe(i=>{this.gatewayNameExist.emit(e)},()=>{let i={name:e,label:null,type:this.gatewayType,additionalInfo:{gateway:!0}};this.deviceService.saveDevice(i).subscribe(o=>{this.searchText="",this.gatewayList.push(o),this.selectDeviceGatewayFormGroup.get("gateway").patchValue(o,{emitEvent:!0})})})}loadGatewayList(){let e;if(Mr(this.store).authority===Mt.SYS_ADMIN)e=Z([]);else{let i=this.isStateForm&&this.deviceName?this.deviceName:"";e=this.entityService.getEntitiesByNameFilter(G.DEVICE,i,-1,"",{ignoreLoading:!0})}e.pipe(W(i=>i?i.filter(o=>o?.additionalInfo?.gateway):[])).subscribe(i=>{if(this.gatewayList=i,!this.searchText&&this.gatewayList.length){let o=null;this.deviceName&&(o=this.gatewayList.find(a=>a.name===this.deviceName)),o||(o=this.gatewayList[0]),o&&this.selectDeviceGatewayFormGroup.get("gateway").patchValue(o,{emitEvent:!0})}})}
195updateView(e){this.propagateChange(e)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(rr),h(Sa),h(Mv),h(Ge),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-gateway-select"]],viewQuery:function(i,o){if(i&1&&ae(Nwe,7),i&2){let a;Q(a=K())&&(o.deviceGatewayInput=a.first)}},inputs:{required:"required",newGatewayType:"newGatewayType",deviceName:"deviceName",isStateForm:"isStateForm"},outputs:{gatewayNameExist:"gatewayNameExist"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:12,vars:15,consts:[["deviceGatewayInput",""],["gatewayAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","gateway",3,"focusin","keydown","keypress","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate","",3,"click"],["translate",""],["translate","",3,"translateParams"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"input",4,0),v(3,"translate"),T("focusin",function(){return D(a),M(o.onFocus())})("keydown",function(c){return D(a),M(o.gatewayNameEnter(c))})("keypress",function(c){return D(a),M(o.gatewayNameEnter(c))}),p(),x(4,Lwe,3,0,"button",5),d(5,"mat-autocomplete",6,1),x(7,Bwe,3,5,"mat-option",7),v(8,"async"),x(9,zwe,8,3,"mat-option",8),v(10,"async"),p(),x(11,$we,3,3,"mat-error",9),p()}if(i&2){let a,s=me(6);m("formGroup",o.selectDeviceGatewayFormGroup),l(),te("placeholder",C(3,9,"gateway.gateway-name")),m("required",o.required)("matAutocomplete",s),l(3),m("ngIf",o.selectDeviceGatewayFormGroup.get("gateway").value&&!o.isStateForm),l(),m("displayWith",o.displayGatewayFn),l(2),m("ngForOf",C(8,11,o.filteredGateways)),l(2),m("ngIf",!((a=C(10,13,o.filteredGateways))!=null&&a.length)),l(2),m("ngIf",o.selectDeviceGatewayFormGroup.get("gateway").hasError("required"))}},dependencies:[Ke,ce,jt,Pe,Se,at,ze,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi,$o],encapsulation:2});let n=t;return n})();var Qwe={};Ae(Qwe,{OriginatorSelectComponent:()=>Pk});y();var Hwe=n=>[n];function qwe(n,t){if(n&1&&O(0,"tb-owner-autocomplete",7),n&2){let r=b
195(2);m("excludeOwnerIds",Xe(2,Hwe,r.currentUser.tenantId))("required",r.required)}}function Wwe(n,t){if(n&1){let r=B();d(0,"tb-entity-group-select",8),T("currentGroupInfo",function(i){D(r);let o=b(2);return M(o.entityGroupLoaded(i))})("currentGroupType",function(i){D(r);let o=b(2);return M(o.currentGroupType.emit(i))}),p()}if(n&2){let r=b(2);m("ownerId",r.originatorFormGroup.get("groupOwnerId").value)("originator",r.originatorFormGroup.get("originator").value)("allowedGroupTypes",r.allowedEntityTypes)("required",r.required&&r.originatorFormGroup.get("originator").value!=="entity")}}function Ywe(n,t){if(n&1&&(d(0,"section",4),x(1,qwe,1,4,"tb-owner-autocomplete",5)(2,Wwe,1,4,"tb-entity-group-select",6),p()),n&2){let r=b();l(),m("ngIf",r.originatorFormGroup.get("originator").value==="ownerGroup"),l(),m("ngIf",r.originatorFormGroup.get("groupOwnerId").value||r.originatorFormGroup.get("originator").value==="groupTenant")}}var Pk=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o){this.store=e,this.translate=i,this.fb=o,this.singleEntityText="scheduler.single-entity",this.groupOfEntitiesText="scheduler.group-entities",this.entitiesGroupOwnerText="scheduler.entities-group-owner",this.headerOptions=[{name:this.translate.instant(this.singleEntityText),value:"entity"},{name:this.translate.instant(this.groupOfEntitiesText),value:"groupTenant"},{name:this.translate.instant(this.entitiesGroupOwnerText),value:"ownerGroup"}],this.currentGroupType=new J,this.currentUser=Mr(this.store),this.destroy$=new Te,this.loadData=!1,this.propagateChange=a=>{},this.originatorFormGroup=this.fb.group({originator:["entity"],entityOriginatorId:[null],groupOriginatorId:[null],groupOwnerId:[null]}),this.originatorFormGroup.get("originator").valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{if(a==="groupTenant"||a==="ownerGroup"){let s={entityType:G.ENTITY_GROUP,id:null};this.originatorFormGroup.patchValue({groupOriginatorId:s,groupOwnerId:null},{emitEvent:!1})}else a==="entity"&&this.originatorFormGroup.get("entityOriginatorId").patchValue(null,{emitEvent:!1})}),this.originatorFormGroup.get("groupOwnerId").valueChanges.pipe(Be(this.destroy$)).subscribe(()=>{this.originatorFormGroup.patchValue({groupOriginatorId:null},{emitEvent:!1})}),this.originatorFormGroup.valueChanges.pipe(Be(this.destroy$)).subscribe(a=>{this.updateView(a)})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){}ngAfterViewInit(){}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setDisabledState(e){this.disabled=e,this.disabled?this.originatorFormGroup.disable({emitEvent:!1}):this.originatorFormGroup.enable({emitEvent:!1})}writeValue(e){this.modelValue=e,this.modelValue&&this.modelValue.entityType===G.ENTITY_GROUP?(this.originatorFormGroup.patchValue({originator:"groupTenant",groupOriginatorId:this.modelValue},{emitEvent:!1}),this.loadData=!0):this.originatorFormGroup.patchValue({originator:"entity",entityOriginatorId:e,groupOriginatorId:null},{emitEvent:!1})}entityGroupLoaded(e){this.loadData&&(this.loadData=!1,De(e)?this.currentUser.authority===Mt.TENANT_ADMIN&&e.ownerId?.id!==this.currentUser.tenantId?(this.originatorFormGroup.get("originator").patchValue("ownerGroup",{emitEvent:!1}),this.originatorFormGroup.get("groupOwnerId").patchValue(e.ownerId,{emitEvent:!1})):(this.originatorFormGroup.get("originator").patchValue("groupTenant",{emitEvent:!1}),this.originatorFormGroup.get("groupOwnerId").patchValue(null,{emitEvent:!1})):this.originatorFormGroup.patchValue({originator:"groupTenant",groupOwnerId:null,groupOriginatorId:null},{emitEvent:!0}))}updateView(e){let i=null;e&&(i=e.originator!=="entity"?e.groupOriginatorId:e.entityOriginatorId),Fn(this.modelValue,i)||(this.modelValue=i,this.modelValue&&this.modelValue.id?this.propagateChange(this.modelValue):this.propagateChange(null))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-originator-select"]],inputs:{allowedEntityTypes:"allowedEntityTypes",singleEntityText:"singleEntityText",groupOfEntitiesText:"groupOfEntitiesText",entitiesGroupOwnerText:"entitiesGroupOwnerText",required:"required",disabled:"disabled"},outputs:{currentGroupType:"currentGroupType"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:4,vars:9,consts:[[1,"tb-originator-select","flex","flex-col","gap-4",3,"formGroup"],["appearance","fill","formControlName","originator",3,"options"],["formControlName","entityOriginatorId",3,"allowedEntityTypes","required"],["class","flex flex-row gap-2",4,"ngIf"],[1,"flex","flex-row","gap-2"],["class","flex-1","formControlName","groupOwnerId","placeholderText","group-permission.user-group-owner","notFoundText","group-permission.no-owners-matching","requiredText","group-permission.target-user-group-owner-required",3,"excludeOwnerIds","required",4,"ngIf"],["class","flex-1","formControlName","groupOriginatorId","placeholderText","entity-group.select-entity-group","notFoundText","entity-group.no-entity-groups-matching","requiredText","entity-group.target-entity-group-required",3,"ownerId","originator","allowedGroupTypes","required","currentGroupInfo","currentGroupType",4,"ngIf"],["formControlName","groupOwnerId","placeholderText","group-permission.user-group-owner","notFoundText","group-permission.no-owners-matching","requiredText","group-permission.target-user-group-owner-required",1,"flex-1",3,"excludeOwnerIds","required"],["formControlName","groupOriginatorId","placeholderText","entity-group.select-entity-group","notFoundText","entity-group.no-entity-groups-matching","requiredText","entity-group.target-entity-group-required",1,"flex-1",3,"currentGroupInfo","currentGroupType","ownerId","originator","allowedGroupTypes","required"]],template:function(i,o){i&1&&(d(0,"section",0),O(1,"tb-toggle-select",1)(2,"tb-entity-select",2),x(3,Ywe,3,2,"section",3),p()),i&2&&(Y("optional",!o.required),m("formGroup",o.originatorFormGroup),l(),m("options",o.headerOptions),l(),Y("!hidden",o.originatorFormGroup.get("originator").value!=="entity"),m("allowedEntityTypes",o.allowedEntityTypes)("required",o.required&&o.originatorFormGroup.get("originator").value==="entity"),l(),m("ngIf",o.originatorFormGroup.get("originator").value!=="entity"))},dependencies:[ce,xe,We,St,$e,Qe,qm,wp,xp,ca],styles:[`@charset "UTF-8";
195.tb-originator-select tb-entity-select tb-entity-type-select{width:100%}.tb-originator-select tb-entity-select tb-entity-autocomplete{min-width:50%}.tb-originator-select tb-owner-autocomplete{width:100%}.tb-originator-select tb-entity-group-select tb-entity-type-select{width:100%}.tb-originator-select tb-entity-group-select tb-entity-group-autocomplete{min-width:50%}
196`],encapsulation:2});let n=t;return n})();y();y();y();y();var Lk,dn,k7,hN,Qv,v0,S7,D7,M7,Fk={},A7=[],Kwe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function kh(n,t){for(var r in t)n[r]=t[r];return n}function O7(n){var t=n.parentNode;t&&t.removeChild(n)}function Qt(n,t,r){var e,i,o,a={};for(o in t)o=="key"?e=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Lk.call(arguments,2):r),typeof n=="function"&&n.defaultProps!=null)for(o in n.defaultProps)a[o]===void 0&&(a[o]=n.defaultProps[o]);return Rk(n,a,e,i,null)}function Rk(n,t,r,e,i){var o={type:n,props:t,key:r,ref:e,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++k7};return i==null&&dn.vnode!=null&&dn.vnode(o),o}function Y1(){return{current:null}}function el(n){return n.children}function Xwe(n,t,r,e,i){var o;for(o in r)o==="children"||o==="key"||o in t||Nk(n,o,null,r[o],e);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||Nk(n,o,t[o],r[o],e)}function T7(n,t,r){t[0]==="-"?n.setProperty(t,r??""):n[t]=r==null?"":typeof r!="number"||Kwe.test(t)?r:r+"px"}function Nk(n,t,r,e,i){var o;e:if(t==="style")if(typeof r=="string")n.style.cssText=r;else{if(typeof e=="string"&&(n.style.cssText=e=""),e)for(t in e)r&&t in r||T7(n.style,t,"");if(r)for(t in r)e&&r[t]===e[t]||T7(n.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in n?t.toLowerCase().slice(2):t.slice(2),n.l||(n.l={}),n.l[t+o]=r,r?e||n.addEventListener(t,o?I7:E7,o):n.removeEventListener(t,o?I7:E7,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in n)try{n[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t.indexOf("-")==-1?n.removeAttribute(t):n.setAttribute(t,r))}}function E7(n){Qv=!0;try{return this.l[n.type+!1](dn.event?dn.event(n):n)}finally{Qv=!1}}function I7(n){Qv=!0;try{return this.l[n.type+!0](dn.event?dn.event(n):n)}finally{Qv=!1}}function _s(n,t){this.props=n,this.context=t}function W1(n,t){if(t==null)return n.__?W1(n.__,n.__.__k.indexOf(n)+1):null;for(var r;t<n.__k.length;t++)if((r=n.__k[t])!=null&&r.__e!=null)return r.__e;return typeof n.type=="function"?W1(n):null}function P7(n){var t,r;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,t=0;t<n.__k.length;t++)if((r=n.__k[t])!=null&&r.__e!=null){n.__e=n.__c.base=r.__e;break}return P7(n)}}function Zwe(n){Qv?setTimeout(n):D7(n)}function uN(n){(!n.__d&&(n.__d=!0)&&v0.push(n)&&!Vk.__r++||S7!==dn.debounceRendering)&&((S7=dn.debounceRendering)||Zwe)(Vk)}function Vk(){var n,t,r,e,i,o,a,s;for(v0.sort(function(c,u){return c.__v.__b-u.__v.__b});n=v0.shift();)n.__d&&(t=v0.length,e=void 0,i=void 0,a=(o=(r=n).__v).__e,(s=r.__P)&&(e=[],(i=kh({},o)).__v=o.__v+1,fN(s,o,i,r.__n,s.ownerSVGElement!==void 0,o.__h!=null?[a]:null,e,a??W1(o),o.__h),L7(e,o),o.__e!=a&&P7(o)),v0.length>t&&v0.sort(function(c,u){return c.__v.__b-u.__v.__b}));Vk.__r=0}function R7(n,t,r,e,i,o,a,s,c,u){var f,_,I,S,F,H,q,ee=e&&e.__k||A7,Ie=ee.length;for(r.__k=[],f=0;f<t.length;f++)if((S=r.__k[f]=(S=t[f])==null||typeof S=="boolean"?null:typeof S=="string"||typeof S=="number"||typeof S=="bigint"?Rk(null,S,null,null,S):Array.isArray(S)?Rk(el,{children:S},null,null,null):S.__b>0?Rk(S.type,S.props,S.key,S.ref?S.ref:null,S.__v):S)!=null){if(S.__=r,S.__b=r.__b+1,(I=ee[f])===null||I&&S.key==I.key&&S.type===I.type)ee[f]=void 0;else for(_=0;_<Ie;_++){if((I=ee[_])&&S.key==I.key&&S.type===I.type){ee[_]=void 0;break}I=null}fN(n,S,I=I||Fk,i,o,a,s,c,u),F=S.__e,(_=S.ref)&&I.ref!=_&&(q||(q=[]),I.ref&&q.push(I.ref,null,S),q.push(_,S.__c||F,S)),F!=null?(H==null&&(H=F),typeof S.type=="function"&&S.__k===I.__k?S.__d=c=F7(S,c,n):c=N7(n,S,I,ee,F,c),typeof r.type=="function"&&(r.__d=c)):c&&I.__e==c&&c.parentNode!=n&&(c=W1(I))}for(r.__e=H,f=Ie;f--;)ee[f]!=null&&(typeof r.type=="function"&&ee[f].__e!=null&&ee[f].__e==r.__d&&(r.__d=V7(e).nextSibling),j7(ee[f],ee[f]));if(q)for(f=0;f<q.length;f++)B7(q[f],q[++f],q[++f])}function F7(n,t,r){for(var e,i=n.__k,o=0;i&&o<i.length;o++)(e=i[o])&&(e.__=n,t=typeof e.type=="function"?F7(e,t,r):N7(r,e,e,i,e.__e,t));return t}function Q1(n,t){return t=t||[],n==null||typeof n=="boolean"||(Array.isArray(n)?n.some(function(r){Q1(r,t)}):t.push(n)),t}function N7(n,t,r,e,i,o){var a,s,c;if(t.__d!==void 0)a=t.__d,t.__d=void 0;else if(r==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==n)n.appendChild(i),a=null;else{for(s=o,c=0;(s=s.nextSibling)&&c<e.length;c+=1)if(s==i)break e;n.insertBefore(i,o),a=o}return a!==void 0?a:i.nextSibling}function V7(n){var t,r,e;if(n.type==null||typeof n.type=="string")return n.__e;if(n.__k){for(t=n.__k.length-1;t>=0;t--)if((r=n.__k[t])&&(e=V7(r)))return e}return null}function fN(n,t,r,e,i,o,a,s,c){var u,f,_,I,S,F,H,q,ee,Ie,He,Le,qe,ue,Ne,st=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,s=t.__e=r.__e,t.__h=null,o=[s]),(u=dn.__b)&&u(t);try{e:if(typeof st=="function"){if(q=t.props,ee=(u=st.contextType)&&e[u.__c],Ie=u?ee?ee.props.value:u.__:e,r.__c?H=(f=t.__c=r.__c).__=f.__E:("prototype"in st&&st.prototype.render?t.__c=f=new st(q,Ie):(t.__c=f=new _s(q,Ie),f.constructor=st,f.render=e1e),ee&&ee.sub(f),f.props=q,f.state||(f.state={}),f.context=Ie,f.__n=e,_=f.__d=!0,f.__h=[],f._sb=[]),f.__s==null&&(f.__s=f.state),st.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=kh({},f.__s)),kh(f.__s,st.getDerivedStateFromProps(q,f.__s))),I=f.props,S=f.state,f.__v=t,_)st.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(st.getDerivedStateFromProps==null&&q!==I&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(q,Ie),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(q,f.__s,Ie)===!1||t.__v===r.__v){for(t.__v!==r.__v&&(f.props=q,f.state=f.__s,f.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEac
vendor: 15,249 bytes, line 196
196h(function(Ui){Ui&&(Ui.__=t)}),He=0;He<f._sb.length;He++)f.__h.push(f._sb[He]);f._sb=[],f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(q,f.__s,Ie),f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(I,S,F)})}if(f.context=Ie,f.props=q,f.__P=n,Le=dn.__r,qe=0,"prototype"in st&&st.prototype.render){for(f.state=f.__s,f.__d=!1,Le&&Le(t),u=f.render(f.props,f.state,f.context),ue=0;ue<f._sb.length;ue++)f.__h.push(f._sb[ue]);f._sb=[]}else do f.__d=!1,Le&&Le(t),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++qe<25);f.state=f.__s,f.getChildContext!=null&&(e=kh(kh({},e),f.getChildContext())),_||f.getSnapshotBeforeUpdate==null||(F=f.getSnapshotBeforeUpdate(I,S)),Ne=u!=null&&u.type===el&&u.key==null?u.props.children:u,R7(n,Array.isArray(Ne)?Ne:[Ne],t,r,e,i,o,a,s,c),f.base=t.__e,t.__h=null,f.__h.length&&a.push(f),H&&(f.__E=f.__=null),f.__e=!1}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Jwe(r.__e,t,r,e,i,o,a,c);(u=dn.diffed)&&u(t)}catch(Ui){t.__v=null,(c||o!=null)&&(t.__e=s,t.__h=!!c,o[o.indexOf(s)]=null),dn.__e(Ui,t,r)}}function L7(n,t){dn.__c&&dn.__c(t,n),n.some(function(r){try{n=r.__h,r.__h=[],n.some(function(e){e.call(r)})}catch(e){dn.__e(e,r.__v)}})}function Jwe(n,t,r,e,i,o,a,s){var c,u,f,_=r.props,I=t.props,S=t.type,F=0;if(S==="svg"&&(i=!0),o!=null){for(;F<o.length;F++)if((c=o[F])&&"setAttribute"in c==!!S&&(S?c.localName===S:c.nodeType===3)){n=c,o[F]=null;break}}if(n==null){if(S===null)return document.createTextNode(I);n=i?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,I.is&&I),o=null,s=!1}if(S===null)_===I||s&&n.data===I||(n.data=I);else{if(o=o&&Lk.call(n.childNodes),u=(_=r.props||Fk).dangerouslySetInnerHTML,f=I.dangerouslySetInnerHTML,!s){if(o!=null)for(_={},F=0;F<n.attributes.length;F++)_[n.attributes[F].name]=n.attributes[F].value;(f||u)&&(f&&(u&&f.__html==u.__html||f.__html===n.innerHTML)||(n.innerHTML=f&&f.__html||""))}if(Xwe(n,I,_,i,s),f)t.__k=[];else if(F=t.props.children,R7(n,Array.isArray(F)?F:[F],t,r,e,i&&S!=="foreignObject",o,a,o?o[0]:r.__k&&W1(r,0),s),o!=null)for(F=o.length;F--;)o[F]!=null&&O7(o[F]);s||("value"in I&&(F=I.value)!==void 0&&(F!==n.value||S==="progress"&&!F||S==="option"&&F!==_.value)&&Nk(n,"value",F,_.value,!1),"checked"in I&&(F=I.checked)!==void 0&&F!==n.checked&&Nk(n,"checked",F,_.checked,!1))}return n}function B7(n,t,r){try{typeof n=="function"?n(t):n.current=t}catch(e){dn.__e(e,r)}}function j7(n,t,r){var e,i;if(dn.unmount&&dn.unmount(n),(e=n.ref)&&(e.current&&e.current!==n.__e||B7(e,null,t)),(e=n.__c)!=null){if(e.componentWillUnmount)try{e.componentWillUnmount()}catch(o){dn.__e(o,t)}e.base=e.__P=null,n.__c=void 0}if(e=n.__k)for(i=0;i<e.length;i++)e[i]&&j7(e[i],t,r||typeof n.type!="function");r||n.__e==null||O7(n.__e),n.__=n.__e=n.__d=void 0}function e1e(n,t,r){return this.constructor(n,r)}function Dh(n,t,r){var e,i,o;dn.__&&dn.__(n,t),i=(e=typeof r=="function")?null:r&&r.__k||t.__k,o=[],fN(t,n=(!e&&r||t).__k=Qt(el,null,[n]),i||Fk,Fk,t.ownerSVGElement!==void 0,!e&&r?[r]:i?null:t.firstChild?Lk.call(t.childNodes):null,o,!e&&r?r:i?i.__e:t.firstChild,e),L7(o,n)}function Bk(n,t){var r={__c:t="__cC"+M7++,__:n,Consumer:function(e,i){return e.children(i)},Provider:function(e){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,uN(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}Lk=A7.slice,dn={__e:function(n,t,r,e){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(n)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,e||{}),a=i.__d),a)return i.__E=i}catch(s){n=s}throw n}},k7=0,hN=function(n){return n!=null&&n.constructor===void 0},Qv=!1,_s.prototype.setState=function(n,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=kh({},this.state),typeof n=="function"&&(n=n(kh({},r),this.props)),n&&kh(r,n),n!=null&&this.__v&&(t&&this._sb.push(t),uN(this))},_s.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),uN(this))},_s.prototype.render=el,v0=[],D7=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vk.__r=0,M7=0;y();y();var i1e,Dp,gN,G7;var Y7=[],bN=[],z7=dn.__b,$7=dn.__r,U7=dn.diffed,H7=dn.__c,q7=dn.unmount;function n1e(){for(var n;n=Y7.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(jk),n.__H.__h.forEach(_N),n.__H.__h=[]}catch(t){n.__H.__h=[],dn.__e(t,n.__v)}}dn.__b=function(n){Dp=null,z7&&z7(n)},dn.__r=function(n){$7&&$7(n),i1e=0;var t=(Dp=n.__c).__H;t&&(gN===Dp?(t.__h=[],Dp.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=bN,r.__N=r.i=void 0})):(t.__h.forEach(jk),t.__h.forEach(_N),t.__h=[])),gN=Dp},dn.diffed=function(n){U7&&U7(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(Y7.push(t)!==1&&G7===dn.requestAnimationFrame||((G7=dn.requestAnimationFrame)||r1e)(n1e)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==bN&&(r.__=r.__V),r.i=void 0,r.__V=bN})),gN=Dp=null},dn.__c=function(n,t){t.some(function(r){try{r.__h.forEach(jk),r.__h=r.__h.filter(function(e){return!e.__||_N(e)})}catch(e){t.some(function(i){i.__h&&(i.__h=[])}),t=[],dn.__e(e,r.__v)}}),H7&&H7(n,t)},dn.unmount=function(n){q7&&q7(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(e){try{jk(e)}catch(i){t=i}}),r.__H=void 0,t&&dn.__e(t,r.__v))};var W7=typeof requestAnimationFrame=="function";function r1e(n){var t,r=function(){clearTimeout(e),W7&&cancelAnimationFrame(t),setTimeout(n)},e=setTimeout(r,100);W7&&(t=requestAnimationFrame(r))}function jk(n){var t=Dp,r=n.__c;typeof r=="function"&&(n.__c=void 0,r()),Dp=t}function _N(n){var t=Dp;n.__c=n.__(),Dp=t}function o1e(n,t){for(var r in t)n[r]=t[r];return n}function Q7(n,t){for(var r in n)if(r!=="__source"&&!(r in t))return!0;for(var e in t)if(e!=="__source"&&n[e]!==t[e])return!0;return!1}function K7(n){this.props=n}(K7.prototype=new _s).isPureReactComponent=!0,K7.prototype.shouldComponentUpdate=function(n,t){return Q7(this.props,n)||Q7(this.state,t)};var X7=dn.__b;dn.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),X7&&X7(n)};var Uqt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var a1e=dn.__e;dn.__e=function(n,t,r,e){if(n.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(n,t)}a1e(n,t,r,e)};var Z7=dn.unmount;function rq(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(e){typeof e.__c=="function"&&e.__c()}),n.__c.__H=null),(n=o1e({},n)).__c!=null&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(e){return rq(e,t,r)})),n}function oq(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(e){return oq(e,t,r)}),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}function vN(){this.__u=0,this.t=null,this.__b=null}function aq(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function Gk(){this.u=null,this.o=null}dn.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&n.__h===!0&&(n.type=null),Z7&&Z7(n)},(vN.prototype=new _s).__c=function(n,t){var r=t.__c,e=this;e.t==null&&(e.t=[]),e.t.push(r);var i=aq(e.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--e.__u){if(e.state.__a){var u=e.state.__a;e.__v.__k[0]=oq(u,u.__c.__P,u.__c.__O)}var f;for(e.setState({__a:e.__b=null});f=e.t.pop();)f.forceUpdate()}},c=t.__h===!0;e.__u++||c||e.setState({__a:e.__b=e.__v.__k[0]}),n.then(a,a)},vN.prototype.componentWillUnmount=function(){this.t=[]},vN.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),e=this.__v.__k[0].__c;this.__v.__k[0]=rq(this.__b,r,e.__O=e.__P)}this.__b=null}var i=t.__a&&Qt(el,null,n.fallback);return i&&(i.__h=null),[Qt(el,null,t.__a?null:n.children),i]};var J7=function(n,t,r){if(++r[1]===r[0]&&n.o.delete(t),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.o.size))for(r=n.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;n.u=r=r[2]}};function s1e(n){return this.getChildContext=function(){return n.context},n.children}function l1e(n){var t=this,r=n.i;t.componentWillUnmount=function(){Dh(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),n.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,i){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),Dh(Qt(s1e,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount()}function sq(n,t){var r=Qt(l1e,{__v:n,i:t});return r.containerInfo=t,r}(Gk.prototype=new _s).__a=function(n){var t=this,r=aq(t.__v),e=t.o.get(n);return e[0]++,function(i){var o=function(){t.props.revealOrder?(e.push(i),J7(t,n,e)):i()};r?r(o):o()}},Gk.prototype.render=function(n){this.u=null,this.o=new Map;var t=Q1(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return n.children},Gk.prototype.componentDidUpdate=Gk.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,r){J7(n,r,t)})};var c1e=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,d1e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,p1e=typeof document<"u",m1e=function(n){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(n)};_s.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(_s.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var eq=dn.event;function u1e(){}function h1e(){return this.cancelBubble}function f1e(){return this.defaultPrevented}dn.event=function(n){return eq&&(n=eq(n)),n.persist=u1e,n.isPropagationStopped=h1e,n.isDefaultPrevented=f1e,n.nativeEvent=n};var g1e,tq={configurable:!0,get:function(){return this.class}},iq=dn.vnode;dn.vnode=function(n){var t=n.type,r=n.props,e=r;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in e={},r){var a=r[o];p1e&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in r&&a==null||(o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!m1e(r.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&d1e.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),e[o]&&(o="oninputCapture")),e[o]=a)}t=="select"&&e.multiple&&Array.isArray(e.value)&&(e.value=Q1(r.children).forEach(function(s){s.props.selected=e.value.indexOf(s.props.value)!=-1})),t=="select"&&e.defaultValue!=null&&(e.value=Q1(r.children).forEach(function(s){s.props.selected=e.multiple?e.defaultValue.indexOf(s.props.value)!=-1:e.defaultValue==s.props.value})),n.props=e,r.class!=r.className&&(tq.enumerable="className"in r,r.className!=null&&(e.class=r.className),Object.defineProperty(e,"className",tq))}n.$$typeof=c1e,iq&&iq(n)};var nq=dn.__r;dn.__r=function(n){nq&&nq(n),g1e=n.__c};var xq=[],DN=new Map;function Sq(n){xq.push(n),DN.forEach(t=>{Iq(t,n)})}function Tq(n){n.isConnected&&n.getRootNode&&Eq(n.getRootNode())}function Eq(n){let t=DN.get(n);if(!t||!t.isConnected){if(t=n.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");let r=_1e();r&&(t.nonce=r);let e=n===document?document.head:n,i=n===document?e.querySelector("script,link[rel=stylesheet],link[as=style],style"):e.firstChild;e.insertBefore(t,i)}DN.set(n,t),b1e(t)}}function b1e(n){for(let t of xq)Iq(n,t)}function Iq(n,t){let{sheet:r}=n,e=r.cssRules.length;t.split("}").forEach((i,o)=>{i=i.trim(),i&&r.insertRule(i+"}",e+o)})}var yN;function _1e(){return yN===void 0&&(yN=v1e()),yN}function v1e(){let n=document.querySelector('meta[name="csp-nonce"]');if(n&&n.hasAttribute("content"))return n.getAttribute("content");let t=document.querySelector("script[nonce]");return t&&t.nonce||""}typeof document<"u"&&Eq(document);var y1e=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyY
196iDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center
vendor: 8,348 bytes, line 196
196;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';
vendor: 133,482 bytes, line 196
196Sq(y1e);var w0=class{constructor(t){this.drainedOption=t,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(t){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),t==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),t))}pause(t=""){let{pauseDepths:r}=this;r[t]=(r[t]||0)+1,this.clearTimeout()}resume(t="",r){let{pauseDepths:e}=this;t in e&&(r?delete e[t]:(e[t]-=1,e[t]<=0&&delete e[t]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}};function o3(n){n.parentNode&&n.parentNode.removeChild(n)}function Id(n,t){if(n.closest)return n.closest(t);if(!document.documentElement.contains(n))return null;do{if(kq(n,t))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}function kq(n,t){return(n.matches||n.matchesSelector||n.msMatchesSelector).call(n,t)}function Dq(n,t){let r=n instanceof HTMLElement?[n]:n,e=[];for(let i=0;i<r.length;i+=1){let o=r[i].querySelectorAll(t);for(let a=0;a<o.length;a+=1)e.push(o[a])}return e}var C1e=/(top|left|right|bottom|width|height)$/i;function a3(n,t){for(let r in t)s3(n,r,t[r])}function s3(n,t,r){r==null?n.style[t]="":typeof r=="number"&&C1e.test(t)?n.style[t]=`${r}px`:n.style[t]=r}function Mq(n){var t,r;return(r=(t=n.composedPath)===null||t===void 0?void 0:t.call(n)[0])!==null&&r!==void 0?r:n.target}var lq=0;function dx(){return lq+=1,"fc-dom-"+lq}function px(n){n.preventDefault()}function w1e(n,t){return r=>{let e=Id(r.target,n);e&&t.call(e,r,e)}}function l3(n,t,r,e){let i=w1e(r,e);return n.addEventListener(t,i),()=>{n.removeEventListener(t,i)}}function Aq(n,t,r,e){let i;return l3(n,"mouseover",t,(o,a)=>{if(a!==i){i=a,r(o,a);let s=c=>{i=null,e(c,a),a.removeEventListener("mouseleave",s)};a.addEventListener("mouseleave",s)}})}var cq=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function x1e(n,t){let r=e=>{t(e),cq.forEach(i=>{n.removeEventListener(i,r)})};cq.forEach(e=>{n.addEventListener(e,r)})}function Oq(n){return Object.assign({onClick:n},Pq(n))}function Pq(n){return{tabIndex:0,onKeyDown(t){(t.key==="Enter"||t.key===" ")&&(n(t),t.preventDefault())}}}var dq=0;function iu(){return dq+=1,String(dq)}function S1e(){document.body.classList.add("fc-not-allowed")}function T1e(){document.body.classList.remove("fc-not-allowed")}function E1e(n){n.style.userSelect="none",n.style.webkitUserSelect="none",n.addEventListener("selectstart",px)}function I1e(n){n.style.userSelect="",n.style.webkitUserSelect="",n.removeEventListener("selectstart",px)}function k1e(n){n.addEventListener("contextmenu",px)}function D1e(n){n.removeEventListener("contextmenu",px)}function Rq(n){let t=[],r=[],e,i;for(typeof n=="string"?r=n.split(/\s*,\s*/):typeof n=="function"?r=[n]:Array.isArray(n)&&(r=n),e=0;e<r.length;e+=1)i=r[e],typeof i=="string"?t.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&t.push({func:i});return t}function Fq(n,t,r){let e,i;for(e=0;e<r.length;e+=1)if(i=M1e(n,t,r[e]),i)return i;return 0}function M1e(n,t,r){return r.func?r.func(n,t):Nq(n[r.field],t[r.field])*(r.order||1)}function Nq(n,t){return!n&&!t?0:t==null?-1:n==null?1:typeof n=="string"||typeof t=="string"?String(n).localeCompare(String(t)):n-t}function C0(n,t){let r=String(n);return"000".substr(0,t-r.length)+r}function ty(n,t,r){return typeof n=="function"?n(...t):typeof n=="string"?t.reduce((e,i,o)=>e.replace("$"+o,i||""),n):r}function A1e(n,t){return n-t}function X1(n){return n%1===0}function O1e(n){let t=n.querySelector(".fc-scrollgrid-shrink-frame"),r=n.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!r)throw new Error("needs fc-scrollgrid-shrink-cushion className");return n.getBoundingClientRect().width-t.getBoundingClientRect().width+r.getBoundingClientRect().width}var pq=["years","months","days","milliseconds"],P1e=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Xr(n,t){return typeof n=="string"?R1e(n):typeof n=="object"&&n?mq(n):typeof n=="number"?mq({[t||"milliseconds"]:n}):null}function R1e(n){let t=P1e.exec(n);if(t){let r=t[1]?-1:1;return{years:0,months:0,days:r*(t[2]?parseInt(t[2],10):0),milliseconds:r*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function mq(n){let t={years:n.years||n.year||0,months:n.months||n.month||0,days:n.days||n.day||0,milliseconds:(n.hours||n.hour||0)*60*60*1e3+(n.minutes||n.minute||0)*60*1e3+(n.seconds||n.second||0)*1e3+(n.milliseconds||n.millisecond||n.ms||0)},r=n.weeks||n.week;return r&&(t.days+=r*7,t.specifiedWeeks=!0),t}function F1e(n,t){return n.years===t.years&&n.months===t.months&&n.days===t.days&&n.milliseconds===t.milliseconds}function N1e(n,t){return{years:n.years+t.years,months:n.months+t.months,days:n.days+t.days,milliseconds:n.milliseconds+t.milliseconds}}function Vq(n,t){return{years:n.years-t.years,months:n.months-t.months,days:n.days-t.days,milliseconds:n.milliseconds-t.milliseconds}}function V1e(n,t){return{years:n.years*t,months:n.months*t,days:n.days*t,milliseconds:n.milliseconds*t}}function L1e(n){return Kv(n)/365}function B1e(n){return Kv(n)/30}function Kv(n){return Xv(n)/864e5}function Xv(n){return n.years*(365*864e5)+n.months*(30*864e5)+n.days*864e5+n.milliseconds}function j1e(n,t){let r=null;for(let e=0;e<pq.length;e+=1){let i=pq[e];if(t[i]){let o=n[i]/t[i];if(!X1(o)||r!==null&&r!==o)return null;r=o}else if(n[i])return null}return r}function Z1(n){let t=n.milliseconds;if(t){if(t%1e3!==0)return{unit:"millisecond",value:t};if(t%(1e3*60)!==0)return{unit:"second",value:t/1e3};if(t%(1e3*60*60)!==0)return{unit:"minute",value:t/(1e3*60)};if(t)return{unit:"hour",value:t/(1e3*60*60)}}return n.days?n.specifiedWeeks&&n.days%7===0?{unit:"week",value:n.days/7}:{unit:"day",value:n.days}:n.months?{unit:"month",value:n.months}:n.years?{unit:"year",value:n.years}:{unit:"millisecond",value:0}}function Pp(n,t,r){if(n===t)return!0;let e=n.length,i;if(e!==t.length)return!1;for(i=0;i<e;i+=1)if(!(r?r(n[i],t[i]):n[i]===t[i]))return!1;return!0}var G1e=["sun","mon","tue","wed","thu","fri","sat"];function z1e(n,t){let r=Ah(n);return r[2]+=t*7,Ol(r)}function tl(n,t){let r=Ah(n);return r[2]+=t,Ol(r)}function Ph(n,t){let r=Ah(n);return r[6]+=t,Ol(r)}function $1e(n,t){return Rh(n,t)/7}function Rh(n,t){return(t.valueOf()-n.valueOf())/(1e3*60*60*24)}function U1e(n,t){return(t.valueOf()-n.valueOf())/(1e3*60*60)}function H1e(n,t){return(t.valueOf()-n.valueOf())/(1e3*60)}function q1e(n,t){return(t.valueOf()-n.valueOf())/1e3}function Lq(n,t){let r=Io(n),e=Io(t);return{years:0,months:0,days:Math.round(Rh(r,e)),milliseconds:t.valueOf()-e.valueOf()-(n.valueOf()-r.valueOf())}}function Bq(n,t){let r=Zv(n,t);return r!==null&&r%7===0?r/7:null}function Zv(n,t){return Oh(n)===Oh(t)?Math.round(Rh(n,t)):null}function Io(n){return Ol([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()])}function W1e(n){return Ol([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours()])}function Y1e(n){return Ol([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes()])}function Q1e(n){return Ol([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()])}function K1e(n,t,r){let e=n.getUTCFullYear(),i=CN(n,e,t,r);if(i<1)return CN(n,e-1,t,r);let o=CN(n,e+1,t,r);return o>=1?Math.min(i,o):i}function CN(n,t,r,e){let i=Ol([t,0,1+X1e(t,r,e)]),o=Io(n),a=Math.round(Rh(i,o));return Math.floor(a/7)+1}function X1e(n,t,r){let e=7+t-r;return-((7+Ol([n,0,e]).getUTCDay()-t)%7)+e-1}function uq(n){return[n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()]}function hq(n){return new Date(n[0],n[1]||0,n[2]==null?1:n[2],n[3]||0,n[4]||0,n[5]||0)}function Ah(n){return[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()]}function Ol(n){return n.length===1&&(n=n.concat([0])),new Date(Date.UTC(...n))}function c3(n){return!isNaN(n.valueOf())}function Oh(n){return n.getUTCHours()*1e3*60*60+n.getUTCMinutes()*1e3*60+n.getUTCSeconds()*1e3+n.getUTCMilliseconds()}function jq(n,t,r=!1){let e=n.toISOString();return e=e.replace(".000",""),r&&(e=e.replace("T00:00:00Z","")),e.length>10&&(t==null?e=e.replace("Z",""):t!==0&&(e=e.replace("Z",p3(t,!0)))),e}function d3(n){return n.toISOString().replace(/T.*$/,"")}function Z1e(n){return n.toISOString().match(/^\d{4}-\d{2}/)[0]}function J1e(n){return C0(n.getUTCHours(),2)+":"+C0(n.getUTCMinutes(),2)+":"+C0(n.getUTCSeconds(),2)}function p3(n,t=!1){let r=n<0?"-":"+",e=Math.abs(n),i=Math.floor(e/60),o=Math.round(e%60);return t?`${r+C0(i,2)}:${C0(o,2)}`:`GMT${r}${i}${o?`:${C0(o,2)}`:""}`}function Yr(n,t,r){let e,i;return function(...o){if(!e)i=n.apply(this,o);else if(!Pp(e,o)){r&&r(i);let a=n.apply(this,o);(!t||!t(a,i))&&(i=a)}return e=o,i}}function iy(n,t,r){let e,i;return o=>{if(!e)i=n.call(this,o);else if(!Op(e,o)){r&&r(i);let a=n.call(this,o);(!t||!t(a,i))&&(i=a)}return e=o,i}}var fq={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Qk={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},zk=/\s*([ap])\.?m\.?/i,exe=/,/g,txe=/\s+/g,ixe=/\u200e/g,nxe=/UTC|GMT/,MN=class{constructor(t){let r={},e={},i=0;for(let o in t)o in fq?(e[o]=t[o],i=Math.max(fq[o],i)):(r[o]=t[o],o in Qk&&(i=Math.max(Qk[o],i)));this.standardDateProps=r,this.extendedSettings=e,this.severity=i,this.buildFormattingFunc=Yr(gq)}format(t,r){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,r)(t)}formatRange(t,r,e,i){let{standardDateProps:o,extendedSettings:a}=this,s=cxe(t.marker,r.marker,e.calendarSystem);if(!s)return this.format(t,e);let c=s;c>1&&(o.year==="numeric"||o.year==="2-digit")&&(o.month==="numeric"||o.month==="2-digit")&&(o.day==="numeric"||o.day==="2-digit")&&(c=1);let u=this.format(t,e),f=this.format(r,e);if(u===f)return u;let _=dxe(o,c),I=gq(_,a,e),S=I(t),F=I(r),H=pxe(u,S,f,F),q=a.separator||i||e.defaultSeparator||"";return H?H.before+S+q+F+H.after:u+q+f}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}};function gq(n,t,r){let e=Object.keys(n).length;return e===1&&n.timeZoneName==="short"?i=>p3(i.timeZoneOffset):e===0&&t.week?i=>lxe(r.computeWeekNumber(i.marker),r.weekText,r.weekTextLong,r.locale,t.week):rxe(n,t,r)}function rxe(n,t,r){n=Object.assign({},n),t=Object.assign({},t),oxe(n,t),n.timeZone="UTC";let e=new Intl.DateTimeFormat(r.locale.codes,n),i;if(t.omitZeroMinute){let o=Object.assign({},n);delete o.minute,i=new Intl.DateTimeFormat(r.locale.codes,o)}return o=>{let{marker:a}=o,s;i&&!a.getUTCMinutes()?s=i:s=e;let c=s.format(a);return axe(c,o,n,t,r)}}function oxe(n,t){n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),n.timeZoneName==="long"&&(n.timeZoneName="short"),t.omitZeroMinute&&(n.second||n.millisecond)&&delete t.omitZeroMinute}function axe(n,t,r,e,i){return n=n.replace(ixe,""),r.timeZoneName==="short"&&(n=sxe(n,i.timeZone==="UTC"||t.timeZoneOffset==null?"UTC":p3(t.timeZoneOffset))),e.omitCommas&&(n=n.replace(exe,"").trim()),e.omitZeroMinute&&(n=n.replace(":00","")),e.meridiem===!1?n=n.replace(zk,"").trim():e.meridiem==="narrow"?n=n.replace(zk,(o,a)=>a.toLocaleLowerCase()):e.meridiem==="short"?n=n.replace(zk,(o,a)=>`${a.toLocaleLowerCase()}m`):e.meridiem==="lowercase"&&(n=n.replace(zk,o=>o.toLocaleLowerCase())),n=n.replace(txe," "),n=n.trim(),n}function sxe(n,t){let r=!1;return n=n.replace(nxe,()=>(r=!0,t)),r||(n+=` ${t}`),n}function lxe(n,t,r,e,i){let o=[];return i==="long"?o.push(r):(i==="short"||i==="narrow")&&o.push(t),(i==="long"||i==="short")&&o.push(" "),o.push(e.simpleNumberFormat.format(n)),e.options.direction==="rtl"&&o.reverse(),o.join("")}function cxe(n,t,r){return r.getMarkerYear(n)!==r.getMarkerYear(t)?5:r.getMarkerMonth(n)!==r.getMarkerMonth(t)?4:r.getMarkerDay(n)!==r.getMarkerDay(t)?2:Oh(n)!==Oh(t)?1:0}function dxe(n,t){let r={};for(let e in n)(!(e in Qk)||Qk[e]<=t)&&(r[e]=n[e]);return r}function pxe(n,t,r,e){let i=0;for(;i<n.length;){let o=n.indexOf(t,i);if(o===-1)break;let a=n.substr(0,o);i=o+t.length;let s=n.substr(i),c=0;for(;c<r.length;){let u=r.indexOf(e,c);if(u===-1)break;let f=r.substr(0,u);c=u+e.length;let _=r.substr(c);if(a===f&&s===_)return{before:a,after:s}}}return null}function bq(n,t){let r=t.markerToArray(n.marker);return{marker:n.marker,timeZoneOffset:n.timeZoneOffset,array:r,year:r[0],month:r[1],day:r[2],hour:r[3],minute:r[4],second:r[5],millisecond:r[6]}}function Kk(n,t,r,e){let i=bq(n,r.calendarSystem),o=t?bq(t,r.calendarSystem):null;return{date:i,start:i,end:o,timeZone:r.timeZone,localeCodes:r.locale.codes,defaultSeparator:e||r.defaultSeparator}}var AN=class{constructor(t){this.cmdStr=t}format(t,r,e){return r.cmdFormatter(this.cmdStr,Kk(t,null,r,e))}formatRange(t,r,e,i){return e.cmdFormatter(this.cmdStr,Kk(t,r,e,i))}},ON=class{constructor(t){this.func=t}format(t,r,e){return this.func(Kk(t,null,r,e))}formatRange(t,r,e,i){return this.func(Kk(t,r,e,i))}};function os(n){return typeof n=="object"&&n?new MN(n):typeof n=="string"?new AN(n):typeof n=="function"?new ON(n):null}var m3={navLinkDayClick:rt,navLinkWeekClick:rt,duration:Xr,bootstrapFontAwesome:rt,buttonIcons:rt,customButtons:rt,defaultAllDayEventDuration:Xr,defaultTimedEventDuration:Xr,nextDayThreshold:Xr,scrollTime:Xr,scrollTimeReset:Boolean,slotMinTime:Xr,slotMaxTime:Xr,dayPopoverFormat:os,slotDuration:Xr,snapDuration:Xr,headerToolbar:rt,footerToolbar:rt,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:os,dayHeaderClassNames:rt,dayHeaderContent:rt,dayHeaderDidMount:rt,dayHeaderWillUnmount:rt,dayCellClassNames:rt,dayCellContent:rt,dayCellDidMount:rt,dayCellWillUnmount:rt,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:rt,weekNumbers:Boolean,weekNumberClassNames:rt,weekNumberContent:rt,weekNumberDidMount:rt,weekNumberWillUnmount:rt,editable:Boolean,viewClassNames:rt,viewDidMount:rt,viewWillUnmount:rt,nowIndicator:Boolean,nowIndicatorClassNames:rt,nowIndicatorContent:rt,nowIndicatorDidMount:rt,nowIndicatorWillUnmount:rt,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:rt,locale:rt,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:rt,eventOrder:Rq,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:rt,contentHeight:rt,direction:String,weekNumberFormat:os,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:rt,initialDate:rt,now:rt,eventDataTransform:rt,stickyHeaderDates:rt,stickyFooterScrollbar:rt,viewHeight:rt,defaultAllDay:Boolean,eventSourceFailure:rt,eventSourceSuccess:rt,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:rt,eventConstraint:rt,eventAllow:rt,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:rt,eventContent:rt,eventDidMount:rt,eventWillUnmount:rt,selectConstraint:rt,selectOverlap:rt,selectAllow:rt,droppable:Boolean,unselectCancel:String,slotLabelFormat:rt,slotLaneClassNames:rt,slotLaneContent:rt,slotLaneDidMount:rt,slotLaneWillUnmount:rt,slotLabelClassNames:rt,slotLabelContent:rt,slotLabelDidMount:rt,slotLabelWillUnmount:rt,dayMaxEvents:rt,dayMaxEventRows:rt,dayMinWidth:Number,slotLabelInterval:Xr,allDayText:String,allDayClassNames:rt,allDayContent:rt,allDayDidMount:rt,allDayWillUnmount:rt,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:os,rerenderDelay:Number,moreLinkText:rt,moreLinkHint:rt,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:rt,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Xr,hiddenDays:rt,fixedWeekCount:Boolean,validRange:rt,visibleRange:rt,titleFormat:rt,eventInteractive:Boolean,noEventsText:String,viewHint:rt,navLinkHint:rt,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:rt,moreLinkClassNames:rt,moreLinkContent:rt,moreLinkDidMount:rt,moreLinkWillUnmount:rt,monthStartFormat:os,handleCustomRendering:rt,customRenderingMetaMap:rt,customRenderingReplaces:Boolean},T0={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},u3={datesSet:rt,eventsSet:rt,eventAdd:rt,eventChange:rt,eventRemove:rt,windowResize:rt,eventClick:rt,eventMouseEnter:rt,eventMouseLeave:rt,select:rt,unselect:rt,loading:rt,_unmount:rt,_beforeprint:rt,_afterprint:rt,_noEventDrop:rt,_noEventResize:rt,_resize:rt,_scrollRequest:rt},h3={buttonText:rt,buttonHints:rt,views:rt,plugins:rt,initialEvents:rt,events:rt,eventSources:rt},Fh={headerToolbar:y0,footerToolbar:y0,buttonText:y0,buttonHints:y0,buttonIcons:y0,dateIncrement:y0,plugins:$k,events:$k,eventSources:$k,resources:$k};function y0(n,t){return typeof n=="object"&&typeof t=="object"&&n&&t?Op(n,t):n===t}function $k(n,t){return Array.isArray(n)&&Array.isArray(t)?Pp(n,t):n===t}var Gq={type:String,component:rt,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:rt,usesMinMaxTime:Boolean,classNames:rt,content:rt,didMount:rt,willUnmount:rt};function pD(n){return uD(n,Fh)}function mD(n,t){let r={},e={};for(let i in t)i in n&&(r[i]=t[i](n[i]));for(let i in n)i in t||(e[i]=n[i]);return{refined:r,extra:e}}function rt(n){return n}var{hasOwnProperty:Xk}=Object.prototype;function uD(n,t){let r={};if(t){for(let e in t)if(t[e]===y0){let i=[];for(let o=n.length-1;o>=0;o-=1){let a=n[o][e];if(typeof a=="object"&&a)i.unshift(a);else if(a!==void 0){r[e]=a;break}}i.length&&(r[e]=uD(i))}}for(let e=n.length-1;e>=0;e-=1){let i=n[e];for(let o in i)o in r||(r[o]=i[o])}return r}function eu(n,t){let r={};for(let e in n)t(n[e],e)&&(r[e]=n[e]);return r}function Ap(n,t){let r={};for(let e in n)r[e]=t(n[e],e);return r}function f3(n){let t={};for(let r of n)t[r]=!0;return t}function hD(n){let t=[];for(let r in n)t.push(n[r]);return t}function Op(n,t){if(n===t)return!0;for(let r in n)if(Xk.call(n,r)&&!(r in t))return!1;for(let r in t)if(Xk.call(t,r)&&n[r]!==t[r])return!1;return!0}var mxe=/^on[A-Z]/;function uxe(n,t){let r=PN(n,t);for(let e of r)if(!mxe.test(e))return!1;return!0}function PN(n,t){let r=[];for(let e in n)Xk.call(n,e)&&(e in t||r.push(e));for(let e in t)Xk.call(t,e)&&n[e]!==t[e]&&r.push(e);return r}function Wk(n,t,r={}){if(n===t)return!0;for(let e in t)if(!(e in n&&hxe(n[e],t[e],r[e])))return!1;for(let e in n)if(!(e in t))return!1;return!0}function hxe(n,t,r){return n===t||r===!0?!0:r?r(n,t):!1}function zq(n,t=0,r,e=1){let i=[];r==null&&(r=Object.keys(n).length);for(let o=t;o<r;o+=e){let a=n[o];a!==void 0&&i.push(a)}return i}var $q={};function fxe(n,t){$q[n]=t}function gxe(n){return new $q[n]}var RN=class{getMarkerYear(t){return t.getUTCFullYear()}getMarkerMonth(t){return t.getUTCMonth()}getMarkerDay(t){return t.getUTCDate()}arrayToMarker(t){return Ol(t)}markerToArray(t){return Ah(t)}};fxe("gregory",RN);var bxe=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Uq(n){let t=bxe.exec(n);if(t){let r=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?+`0.${t[12]}`*1e3:0));if(c3(r)){let e=null;return t[13]&&(e=(t[15]==="-"?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:r,isTimeUnspecified:!t[6],timeZoneOffset:e}}}return null}var J1=class{constructor(t){let r=this.timeZone=t.timeZone,e=r!=="local"&&r!=="UTC";t.namedTimeZoneImpl&&e&&(this.namedTimeZoneImpl=new t.namedTimeZoneImpl(r)),this.canComputeOffset=!!(!e||this.namedTimeZoneImpl),this.calendarSystem=gxe(t.calendarSystem),this.locale=t.locale,this.weekDow=t.locale.week.dow,this.weekDoy=t.locale.week.doy,t.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof t.firstDay=="number"&&(this.weekDow=t.firstDay),typeof t.weekNumberCalculation=="function"&&(this.weekNumberFunc=t.weekNumberCalculation),this.weekText=t.weekText!=null?t.weekText:t.locale.options.weekText,this.weekTextLong=(t.weekTextLong!=null?t.weekTextLong:t.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=t.cmdFormatter,this.defaultSeparator=t.defaultSeparator}createMarker(t){let r=this.createMarkerMeta(t);return r===null?null:r.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):Ol(uq(new Date))}createMarkerMeta(t){if(typeof t=="string")return this.parse(t);let r=null;return typeof t=="number"?r=this.timestampToMarker(t):t instanceof Date?(t=t.valueOf(),isNaN(t)||(r=this.timestampToMarker(t))):Array.isArray(t)&&(r=Ol(t)),r===null||!c3(r)?null:{marker:r,isTimeUnspecified:!1,forcedTzo:null}}parse(t){let r=Uq(t);if(r===null)return null;let{marker:e}=r,i=null;return r.timeZoneOffset!==null&&(this.canComputeOffset?e=this.timestampToMarker(e.valueOf()-r.timeZoneOffset*60*1e3):i=r.timeZoneOffset),{marker:e,isTimeUnspecified:r.isTimeUnspecified,forcedTzo:i}}getYear(t){return this.calendarSystem.getMarkerYear(t)}getMonth(t){return this.calendarSystem.getMarkerMonth(t)}getDay(t){return this.calendarSystem.getMarkerDay(t)}add(t,r){let e=this.calendarSystem.markerToArray(t);return e[0]+=r.years,e[1]+=r.months,e[2]+=r.days,e[6]+=r.milliseconds,this.calendarSystem.arrayToMarker(e)}subtract(t,r){let e=this.calendarSystem.markerToArray(t);return e[0]-=r.years,e[1]-=r.months,e[2]-=r.days,e[6]-=r.milliseconds,this.calendarSystem.arrayToMarker(e)}addYears(t,r){let e=this.calendarSystem.markerToArray(t);return e[0]+=r,this.calendarSystem.arrayToMarker(e)}addMonths(t,r){let e=this.calendarSystem.markerToArray(t);return e[1]+=r,this.calendarSystem.arrayToMarker(e)}diffWholeYears(t,r){let{calendarSystem:e}=this;return Oh(t)===Oh(r)&&e.getMarkerDay(t)===e.getMarkerDay(r)&&e.getMarkerMonth(t)===e.getMarkerMonth(r)?e.getMarkerYear(r)-e.getMarkerYear(t):null}diffWholeMonths(t,r){let{calendarSystem:e}=this;return Oh(t)===Oh(r)&&e.getMarkerDay(t)===e.getMarkerDay(r)?e.getMarkerMonth(r)-e.getMarkerMonth(t)+(e.getMarkerYear(r)-e.getMarkerYear(t))*12:null}greatestWholeUnit(t,r){let e=this.diffWholeYears(t,r);return e!==null?{unit:"year",value:e}:(e=this.diffWholeMonths(t,r),e!==null?{unit:"month",value:e}:(e=Bq(t,r),e!==null?{unit:"week",value:e}:(e=Zv(t,r),e!==null?{unit:"day",value:e}:(e=U1e(t,r),X1(e)?{unit:"hour",value:e}:(e=H1e(t,r),X1(e)?{unit:"minute",value:e}:(e=q1e(t,r),X1(e)?{unit:"second",value:e}:{unit:"millisecond",value:r.valueOf()-t.valueOf()}))))))}countDurationsBetween(t,r,e){let i;return e.years&&(i=this.diffWholeYears(t,r),i!==null)?i/L1e(e):e.months&&(i=this.diffWholeMonths(t,r),i!==null)?i/B1e(e):e.days&&(i=Zv(t,r),i!==null)?i/Kv(e):(r.valueOf()-t.valueOf())/Xv(e)}startOf(t,r){return r==="year"?this.startOfYear(t):r==="month"?this.startOfMonth(t):r==="week"?this.startOfWeek(t):r==="day"?Io(t):r==="hour"?W1e(t):r==="minute"?Y1e(t):r==="second"?Q1e(t):null}startOfYear(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t)])}startOfMonth(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t)])}startOfWeek(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t),t.getUTCDate()-(t.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(t){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(t)):K1e(t,this.weekDow,this.weekDoy)}format(t,r,e={}){return r.format({marker:t,timeZoneOffset:e.forcedTzo!=null?e.forcedTzo:this.offsetForMarker(t)},this)}formatRange(t,r,e,i={}){return i.isEndExclusive&&(r=Ph(r,-1)),e.formatRange({marker:t,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(t)},{marker:r,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(r)},this,i.defaultSeparator)}formatIso(t,r={}){let e=null;return r.omitTimeZoneOffset||(r.forcedTzo!=null?e=r.forcedTzo:e=this.offsetForMarker(t)),jq(t,e,r.omitTime)}timestampToMarker(t){return this.timeZone==="local"?Ol(uq(new Date(t))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(t):Ol(this.namedTimeZoneImpl.timestampToArray(t))}offsetForMarker(t){return this.timeZone==="local"?-hq(Ah(t)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ah(t)):null}toDate(t,r){return this.timeZone==="local"?hq(Ah(t)):this.timeZone==="UTC"?new Date(t.valueOf()):this.namedTimeZoneImpl?new Date(t.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ah(t))*1e3*60):new Date(t.valueOf()-(r||0))}},tu=class{constructor(t){this.iconOverrideOption&&this.setIconOverride(t[this.iconOverrideOption])}setIconOverride(t){let r,e;if(typeof t=="object"&&t){r=Object.assign({},this.iconClasses);for(e in t)r[e]=this.applyIconOverridePrefix(t[e]);this.iconClasses=r}else t===!1&&(this.iconClasses={})}applyIconOverridePrefix(t){let r=this.iconOverridePrefix;return r&&t.indexOf(r)!==0&&(t=r+t),t}getClass(t){return this.classes[t]||""}getIconClass(t,r){let e;return r&&this.rtlIconClasses?e=this.rtlIconClasses[t]||this.iconClasses[t]:e=this.iconClasses[t],e?`${this.baseIconClass} ${e}`:""}getCustomButtonIconClass(t){let r;return this.iconOverrideCustomButtonOption&&(r=t[this.iconOverrideCustomButtonOption],r)?`${this.baseIconClass} ${this.applyIconOverridePrefix(r)}`:""}};tu.prototype.classes={};tu.prototype.iconClasses={};tu.prototype.baseIconClass="";tu.prototype.iconOverridePrefix="";function ex(n){n();let t=dn.debounceRendering,r=[];function e(i){r.push(i)}for(dn.debounceRendering=e,Dh(Qt(FN,{}),document.createElement("div"));r.length;)r.shift()();dn.debounceRendering=t}var FN=class extends _s{render(){return Qt("div",{})}componentDidMount(){this.setState({})}};function Hq(n){let t=Bk(n),r=t.Provider;return t.Provider=function(){let e=!this.getChildContext,i=r.apply(this,arguments);if(e){let o=[];this.shouldComponentUpdate=a=>{this.props.value!==a.value&&o.forEach(s=>{s.context=a.value,s.forceUpdate()})},this.sub=a=>{o.push(a);let s=a.componentWillUnmount;a.componentWillUnmount=()=>{o.splice(o.indexOf(a),1),s&&s.call(a)}}}return i},t}var Zk=class{constructor(t,r,e,i){this.execFunc=t,this.emitter=r,this.scrollTime=e,this.scrollTimeReset=i,this.handleScrollRequest=o=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},o),this.drain()},r.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(t){t&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},Rp=Hq({});function qq(n,t,r,e,i,o,a,s,c,u,f,_,I){return{dateEnv:i,options:r,pluginHooks:a,emitter:u,dispatch:s,getCurrentData:c,calendarApi:f,viewSpec:n,viewApi:t,dateProfileGenerator:e,theme:o,isRtl:r.direction==="rtl",addResizeHandler(S){u.on("_resize",S)},removeResizeHandler(S){u.off("_resize",S)},createScrollResponder(S){return new Zk(S,u,Xr(r.scrollTime),r.scrollTimeReset)},registerInteractiveComponent:_,unregisterInteractiveComponent:I}}var mx=(()=>{class n extends _s{shouldComponentUpdate(r,e){return this.debug&&console.log(PN(r,this.props),PN(e,this.state)),!Wk(this.props,r,this.propEquality)||!Wk(this.state,e,this.stateEquality)}safeSetState(r){Wk(this.state,Object.assign(Object.assign({},this.state),r),this.stateEquality)||this.setState(r)}}return n.addPropsEquality=_xe,n.addStateEquality=vxe,n.contextType=Rp,n})();mx.prototype.propEquality={};mx.prototype.stateEquality={};var ha=(()=>{class n extends mx{}return n.contextType=Rp,n})();function _xe(n){let t=Object.create(this.prototype.propEquality);Object.assign(t,n),this.prototype.propEquality=t}function vxe(n){let t=Object.create(this.prototype.stateEquality);Object.assign(t,n),this.prototype.stateEquality=t}function nu(n,t){typeof n=="function"?n(t):n&&(n.current=t)}var tx=class extends ha{constructor(){super(...arguments),this.id=iu(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=t=>{let{options:r}=this.context,{generatorName:e}=this.props;(!r.customRenderingReplaces||!NN(e,r))&&this.updateElRef(t)},this.updateElRef=t=>{this.props.elRef&&nu(this.props.elRef,t)}}render(){let{props:t,context:r}=this,{options:e}=r,{customGenerator:i,defaultGenerator:o,renderProps:a}=t,s=g3(t,[],this.handleEl),c=!1,u,f=[],_;if(i!=null){let I=typeof i=="function"?i(a,Qt):i;if(I===!0)c=!0;else{let S=I&&typeof I=="object";S&&"html"in I?s.dangerouslySetInnerHTML={__html:I.html}:S&&"domNodes"in I?f=Array.prototype.slice.call(I.domNodes):(S?hN(I):typeof I!="function")?u=I:_=I}}else c=!NN(t.generatorName,e);return c&&o&&(u=o(a)),this.queuedDomNodes=f,this.currentGeneratorMeta=_,Qt(t.elTag,s,u)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(t){var r;let{props:e,context:i}=this,{handleCustomRendering:o,customRenderingMetaMap:a}=i.options;if(o){let s=(r=this.currentGeneratorMeta)!==null&&r!==void 0?r:a?.[e.generatorName];s&&o(Object.assign(Object.assign({id:this.id,isActive:t,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:s},e),{elClasses:(e.elClasses||[]).filter(yxe)}))}}applyQueueudDomNodes(){let{queuedDomNodes:t,currentDomNodes:r}=this,e=this.base;if(!Pp(t,r)){r.forEach(o3);for(let i of t)e.appendChild(i);this.currentDomNodes=t}}};tx.addPropsEquality({elClasses:Pp,elStyle:Op,elAttrs:uxe,renderProps:Op});function NN(n,t){var r;return!!(t.handleCustomRendering&&n&&(!((r=t.customRenderingMetaMap)===null||r===void 0)&&r[n]))}function g3(n,t,r){let e=Object.assign(Object.assign({},n.elAttrs),{ref:r});return(n.elClasses||t)&&(e.className=(n.elClasses||[]).concat(t||[]).concat(e.className||[]).filter(Boolean).join(" ")),n.elStyle&&(e.style=n.elStyle),e}function yxe(n){return!!n}var b3=Hq(0),kd=(()=>{class n extends _s{constructor(){super(...arguments),this.InnerContent=Cxe.bind(void 0,this),this.handleEl=r=>{this.el=r,this.props.elRef&&(nu(this.props.elRef,r),r&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:r}=this,e=wxe(r.classNameGenerator,r.renderProps);if(r.children){let i=g3(r,e,this.handleEl),o=r.children(this.InnerContent,r.renderProps,i);return r.elTag?Qt(r.elTag,i,o):o}else return Qt(tx,Object.assign(Object.assign({},r),{elRef:this.handleEl,elTag:r.elTag||"div",elClasses:(r.elClasses||[]).concat(e),renderId:this.context}))}componentDidMount(){var r,e;this.el?(e=(r=this.props).didMount)===null||e===void 0||e.call(r,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var r,e;(e=(r=this.props).willUnmount)===null||e===void 0||e.call(r,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}return n.contextType=b3,n})();function Cxe(n,t){let r=n.props;return Qt(tx,Object.assign({renderProps:r.renderProps,generatorName:r.generatorName,customGenerator:r.customGenerator,defaultGenerator:r.defaultGenerator,renderId:n.context},t))}function wxe(n,t){let r=typeof n=="function"?n(t):n||[];return typeof r=="string"?[r]:r}var VN=class extends ha{render(){let{props:t,context:r}=this,{options:e}=r,i={view:r.viewApi};return Qt(kd,Object.assign({},t,{elTag:t.elTag||"div",elClasses:[..._3(t.viewSpec),...t.elClasses||[]],renderProps:i,classNameGenerator:e.viewClassNames,generatorName:void 0,didMount:e.viewDidMount,willUnmount:e.viewWillUnmount}),()=>t.children)}};function _3(n){return[`fc-${n.type}-view`,"fc-view"]}function xxe(n,t){let r=null,e=null;return n.start&&(r=t.createMarker(n.start)),n.end&&(e=t.createMarker(n.end)),!r&&!e||r&&e&&e<r?null:{start:r,end:e}}function _q(n,t){let r=[],{start:e}=t,i,o;for(n.sort(Sxe),i=0;i<n.length;i+=1)o=n[i],o.start>e&&r.push({start:e,end:o.start}),o.end>e&&(e=o.end);return e<t.end&&r.push({start:e,end:t.end}),r}function Sxe(n,t){return n.start.valueOf()-t.start.valueOf()}function x0(n,t){let{start:r,end:e}=n,i=null;return t.start!==null&&(r===null?r=t.start:r=new Date(Math.max(r.valueOf(),t.start.valueOf()))),t.end!=null&&(e===null?e=t.end:e=new Date(Math.min(e.valueOf(),t.end.valueOf()))),(r===null||e===null||r<e)&&(i={start:r,end:e}),i}function Wq(n,t){return(n.start===null?null:n.start.valueOf())===(t.start===null?null:t.start.valueOf())&&(n.end===null?null:n.end.valueOf())===(t.end===null?null:t.end.valueOf())}function fD(n,t){return(n.end===null||t.start===null||n.end>t.start)&&(n.start===null||t.end===null||n.start<t.end)}function gD(n,t){return(n.start===null||t.start!==null&&t.start>=n.start)&&(n.end===null||t.end!==null&&t.end<=n.end)}function Mp(n,t){return(n.start===null||t>=n.start)&&(n.end===null||t<n.end)}function Txe(n,t){return t.start!=null&&n<t.start?t.start:t.end!=null&&n>=t.end?new Date(t.end.valueOf()-1):n}function Yq(n){let t=Math.floor(Rh(n.start,n.end))||1,r=Io(n.start),e=tl(r,t);return{start:r,end:e}}function bD(n,t=Xr(0)){let r=null,e=null;if(n.end){e=Io(n.end);let i=n.end.valueOf()-e.valueOf();i&&i>=Xv(t)&&(e=tl(e,1))}return n.start&&(r=Io(n.start),e&&e<=r&&(e=tl(r,1))),{start:r,end:e}}function Exe(n){let t=bD(n);return Rh(t.start,t.end)>1}function K1(n,t,r,e){return e==="year"?Xr(r.diffWholeYears(n,t),"year"):e==="month"?Xr(r.diffWholeMonths(n,t),"month"):Lq(n,t)}function Qq(n,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return n}}function Kq(n,t){let r=n.initialDate;return r!=null?t.createMarker(r):ny(n.now,t)}function ny(n,t){return typeof n=="function"&&(n=n()),n==null?t.createNowMarker():t.createMarker(n)}var ix=class{constructor(t){this.props=t,this.nowDate=ny(t.nowInput,t.dateEnv),this.initHiddenDays()}buildPrev(t,r,e){let{dateEnv:i}=this.props,o=i.subtract(i.startOf(r,t.currentRangeUnit),t.dateIncrement);return this.build(o,-1,e)}buildNext(t,r,e){let{dateEnv:i}=this.props,o=i.add(i.startOf(r,t.currentRangeUnit),t.dateIncrement);return this.build(o,1,e)}build(t,r,e=!0){let{props:i}=this,o,a,s,c,u,f;return o=this.buildValidRange(),o=this.trimHiddenDays(o),e&&(t=Txe(t,o)),a=this.buildCurrentRangeInfo(t,r),s=/^(year|month|week|day)$/.test(a.unit),c=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,s),c=this.trimHiddenDays(c),u=c,i.showNonCurrentDates||(u=x0(u,a.range)),u=this.adjustActiveRange(u),u=x0(u,o),f=fD(a.range,o),Mp(c,t)||(t=c.start),{currentDate:t,validRange:o,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:s,activeRange:u,renderRange:c,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:f,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let t=this.props.validRangeInput,r=typeof t=="function"?t.call(this.props.calendarApi,this.nowDate):t;return this.refineRange(r)||{start:null,end:null}}buildCurrentRangeInfo(t,r){let{props:e}=this,i=null,o=null,a=null,s;return e.duration?(i=e.duration,o=e.durationUnit,a=this.buildRangeFromDuration(t,r,i,o)):(s=this.props.dayCount)?(o="day",a=this.buildRangeFromDayCount(t,r,s)):(a=this.buildCustomVisibleRange(t))?o=e.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=this.getFallbackDuration(),o=Z1(i).unit,a=this.buildRangeFromDuration(t,r,i,o)),{duration:i,unit:o,range:a}}getFallbackDuration(){return Xr({day:1})}adjustActiveRange(t){let{dateEnv:r,usesMinMaxTime:e,slotMinTime:i,slotMaxTime:o}=this.props,{start:a,end:s}=t;return e&&(Kv(i)<0&&(a=Io(a),a=r.add(a,i)),Kv(o)>1&&(s=Io(s),s=tl(s,-1),s=r.add(s,o))),{start:a,end:s}}buildRangeFromDuration(t,r,e,i){let{dateEnv:o,dateAlignment:a}=this.props,s,c,u;if(!a){let{dateIncrement:_}=this.props;_&&Xv(_)<Xv(e)?a=Z1(_).unit:a=i}Kv(e)<=1&&this.isHiddenDay(s)&&(s=this.skipHiddenDays(s,r),s=Io(s));function f(){s=o.startOf(t,a),c=o.add(s,e),u={start:s,end:c}}return f(),this.trimHiddenDays(u)||(t=this.skipHiddenDays(t,r),f()),u}buildRangeFromDayCount(t,r,e){let{dateEnv:i,dateAlignment:o}=this.props,a=0,s=t,c;o&&(s=i.startOf(s,o)),s=Io(s),s=this.skipHiddenDays(s,r),c=s;do c=tl(c,1),this.isHiddenDay(c)||(a+=1);while(a<e);return{start:s,end:c}}buildCustomVisibleRange(t){let{props:r}=this,e=r.visibleRangeInput,i=typeof e=="function"?e.call(r.calendarApi,r.dateEnv.toDate(t)):e,o=this.refineRange(i);return o&&(o.start==null||o.end==null)?null:o}buildRenderRange(t,r,e){return t}buildDateIncrement(t){let{dateIncrement:r}=this.props,e;return r||((e=this.props.dateAlignment)?Xr(1,e):t||Xr({days:1}))}refineRange(t){if(t){let r=xxe(t,this.props.dateEnv);return r&&(r=bD(r)),r}return null}initHiddenDays(){let t=this.props.hiddenDays||[],r=[],e=0,i;for(this.props.weekends===!1&&t.push(0,6),i=0;i<7;i+=1)(r[i]=t.indexOf(i)!==-1)||(e+=1);if(!e)throw new Error("invalid hiddenDays");this.isHiddenDayHash=r}trimHiddenDays(t){let{start:r,end:e}=t;return r&&(r=this.skipHiddenDays(r)),e&&(e=this.skipHiddenDays(e,-1,!0)),r==null||e==null||r<e?{start:r,end:e}:null}isHiddenDay(t){return t instanceof Date&&(t=t.getUTCDay()),this.isHiddenDayHash[t]}skipHiddenDays(t,r=1,e=!1){for(;this.isHiddenDayHash[(t.getUTCDay()+(e?r:0)+7)%7];)t=tl(t,r);return t}};function _D(n,t,r,e){return{instanceId:iu(),defId:n,range:t,forcedStartTzo:r??null,forcedEndTzo:e??null}}function Ixe(n,t,r,e){for(let i=0;i<e.length;i+=1){let o=e[i].parse(n,r);if(o){let{allDay:a}=n;return a==null&&(a=t,a==null&&(a=o.allDayGuess,a==null&&(a=!1))),{allDay:a,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}function S0(n,t,r){let{dateEnv:e,pluginHooks:i,options:o}=r,{defs:a,instances:s}=n;s=eu(s,c=>!a[c.defId].recurringDef);for(let c in a){let u=a[c];if(u.recurringDef){let{duration:f}=u.recurringDef;f||(f=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);let _=kxe(u,f,t,e,i.recurringTypes);for(let I of _){let S=_D(c,{start:I,end:e.add(I,f)});s[S.instanceId]=S}}}return{defs:a,instances:s}}function kxe(n,t,r,e,i){let a=i[n.recurringDef.typeId].expand(n.recurringDef.typeData,{start:e.subtract(r.start,t),end:r.end},e);return n.allDay&&(a=a.map(Io)),a}var Yk={id:String,groupId:String,title:String,url:String,interactive:Boolean},Xq={start:rt,end:rt,date:rt,allDay:Boolean},Dxe=Object.assign(Object.assign(Object.assign({},Yk),Xq),{extendedProps:rt});function Zq(n,t,r,e,i=y3(r),o,a){let{refined:s,extra:c}=v3(n,r,i),u=Axe(t,r),f=Ixe(s,u,r.dateEnv,r.pluginHooks.recurringTypes);if(f){let I=Jk(s,c,t?t.sourceId:"",f.allDay,!!f.duration,r,o);return I.recurringDef={typeId:f.typeId,typeData:f.typeData,duration:f.duration},{def:I,instance:null}}let _=Mxe(s,u,r,e);if(_){let I=Jk(s,c,t?t.sourceId:"",_.allDay,_.hasEnd,r,o),S=_D(I.defId,_.range,_.forcedStartTzo,_.forcedEndTzo);return a&&I.publicId&&a[I.publicId]&&(S.instanceId=a[I.publicId]),{def:I,instance:S}}return null}function v3(n,t,r=y3(t)){return mD(n,r)}function y3(n){return Object.assign(Object.assign(Object.assign({},tD),Dxe),n.pluginHooks.eventRefiners)}function Jk(n,t,r,e,i,o,a){let s={title:n.title||"",groupId:n.groupId||"",publicId:n.id||"",url:n.url||"",recurringDef:null,defId:(a&&n.id?a[n.id]:"")||iu(),sourceId:r,allDay:e,hasEnd:i,interactive:n.interactive,ui:ry(n,o),extendedProps:Object.assign(Object.assign({},n.extendedProps||{}),t)};for(let c of o.pluginHooks.eventDefMemberAdders)Object.assign(s,c(n));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function Mxe(n,t,r,e){let{allDay:i}=n,o,a=null,s=!1,c,u=null,f=n.start!=null?n.start:n.date;if(o=r.dateEnv.createMarkerMeta(f),o)a=o.marker;else if(!e)return null;return n.end!=null&&(c=r.dateEnv.createMarkerMeta(n.end)),i==null&&(t!=null?i=t:i=(!o||o.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&a&&(a=Io(a)),c&&(u=c.marker,i&&(u=Io(u)),a&&u<=a&&(u=null)),u?s=!0:e||(s=r.options.forceEventDuration||!1,u=r.dateEnv.add(a,i?r.options.defaultAllDayEventDuration:r.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:a,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function Axe(n,t){let r=null;return n&&(r=n.defaultAllDay),r==null&&(r=t.options.defaultAllDay),r}function nx(n,t,r,e,i,o){let a=Dd(),s=y3(r);for(let c of n){let u=Zq(c,t,r,e,s,i,o);u&&eD(u,a)}return a}function eD(n,t=Dd()){return t.defs[n.def.defId]=n.def,n.instance&&(t.instances[n.instance.instanceId]=n.instance),t}function Jq(n,t){let r=n.instances[t];if(r){let e=n.defs[r.defId],i=yD(n,o=>Oxe(e,o));return i.defs[e.defId]=e,i.instances[r.instanceId]=r,i}return Dd()}function Oxe(n,t){return!!(n.groupId&&n.groupId===t.groupId)}function Dd(){return{defs:{},instances:{}}}function vD(n,t){return{defs:Object.assign(Object.assign({},n.defs),t.defs),instances:Object.assign(Object.assign({},n.instances),t.instances)}}function yD(n,t){let r=eu(n.defs,t),e=eu(n.instances,i=>r[i.defId]);return{defs:r,instances:e}}function Pxe(n,t){let{defs:r,instances:e}=n,i={},o={};for(let a in r)t.defs[a]||(i[a]=r[a]);for(let a in e)!t.instances[a]&&i[e[a].defId]&&(o[a]=e[a]);return{defs:i,instances:o}}function Rxe(n,t){return Array.isArray(n)?nx(n,null,t,!0):typeof n=="object"&&n?nx([n],null,t,!0):n!=null?String(n):null}function LN(n){return Array.isArray(n)?n:typeof n=="string"?n.split(/\s+/):[]}var tD={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:rt,overlap:rt,allow:rt,className:LN,classNames:LN,color:String,backgroundColor:String,borderColor:String,textColor:String},Fxe={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function ry(n,t){let r=Rxe(n.constraint,t);return{display:n.display||null,startEditable:n.startEditable!=null?n.startEditable:n.editable,durationEditable:n.durationEditable!=null?n.durationEditable:n.editable,constraints:r!=null?[r]:[],overlap:n.overlap!=null?n.overlap:null,allows:n.allow!=null?[n.allow]:[],backgroundColor:n.backgroundColor||n.color||"",borderColor:n.borderColor||n.color||"",textColor:n.textColor||"",classNames:(n.className||[]).concat(n.classNames||[])}}function C3(n){return n.reduce(Nxe,Fxe)}function Nxe(n,t){return{display:t.display!=null?t.display:n.display,startEditable:t.startEditable!=null?t.startEditable:n.startEditable,durationEditable:t.durationEditable!=null?t.durationEditable:n.durationEditable,constraints:n.constraints.concat(t.constraints),overlap:typeof t.overlap=="boolean"?t.overlap:n.overlap,allows:n.allows.concat(t.allows),backgroundColor:t.backgroundColor||n.backgroundColor,borderColor:t.borderColor||n.borderColor,textColor:t.textColor||n.textColor,classNames:n.classNames.concat(t.classNames)}}var Vxe={id:String,defaultAllDay:Boolean,url:String,format:String,events:rt,eventDataTransform:rt,success:rt,failure:rt};function w3(n,t,r=x3(t)){let e;if(typeof n=="string"?e={url:n}:typeof n=="function"||Array.isArray(n)?e={events:n}:typeof n=="object"&&n&&(e=n),e){let{refined:i,extra:o}=mD(e,r),a=Lxe(i,t);if(a)return{_raw:n,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:iu(),sourceDefId:a.sourceDefId,meta:a.meta,ui:ry(i,t),extendedProps:o}}return null}function x3(n){return Object.assign(Object.assign(Object.assign({},tD),Vxe),n.pluginHooks.eventSourceRefiners)}function Lxe(n,t){let r=t.pluginHooks.eventSourceDefs;for(let e=r.length-1;e>=0;e-=1){let o=r[e].parseMeta(n);if(o)return{sourceDefId:e,meta:o}}return null}function eW(n,t,r,e,i){switch(t.type){case"RECEIVE_EVENTS":return Bxe(n,r[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return jxe(n,r[t.sourceId],t.rawEvents,e.activeRange,i);case"ADD_EVENTS":return Gxe(n,t.eventStore,e?e.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return vD(n,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return e?S0(n,e.activeRange,i):n;case"REMOVE_EVENTS":return Pxe(n,t.eventStore);case"REMOVE_EVENT_SOURCE":return iW(n,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return yD(n,o=>!o.sourceId);case"REMOVE_ALL_EVENTS":return Dd();default:return n}}function Bxe(n,t,r,e,i,o){if(t&&r===t.latestFetchId){let a=nx(tW(i,t,o),t,o);return e&&(a=S0(a,e,o)),vD(iW(n,t.sourceId),a)}return n}function jxe(n,t,r,e,i){let{defIdMap:o,instanceIdMap:a}=$xe(n),s=nx(tW(r,t,i),t,i,!1,o,a);return S0(s,e,i)}function tW(n,t,r){let e=r.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(n=vq(n,i)),e&&(n=vq(n,e)),n}function vq(n,t){let r;if(!t)r=n;else{r=[];for(let e of n){let i=t(e);i?r.push(i):i==null&&r.push(e)}}return r}function Gxe(n,t,r,e){return r&&(t=S0(t,r,e)),vD(n,t)}function S3(n,t,r){let{defs:e}=n,i=Ap(n.instances,o=>e[o.defId].allDay?o:Object.assign(Object.assign({},o),{range:{start:r.createMarker(t.toDate(o.range.start,o.forcedStartTzo)),end:r.createMarker(t.toDate(o.range.end,o.forcedEndTzo))},forcedStartTzo:r.canComputeOffset?null:o.forcedStartTzo,forcedEndTzo:r.canComputeOffset?null:o.forcedEndTzo}));return{defs:e,instances:i}}function iW(n,t){return yD(n,r=>r.sourceId!==t)}function zxe(n,t){return{defs:n.defs,instances:eu(n.instances,r=>!t[r.instanceId])}}function $xe(n){let{defs:t,instances:r}=n,e={},i={};for(let o in t){let a=t[o],{publicId:s}=a;s&&(e[s]=o)}for(let o in r){let a=r[o],s=t[a.defId],{publicId:c}=s;c&&(i[c]=o)}return{defIdMap:e,instanceIdMap:i}}var Jv=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(t){this.thisContext=t}setOptions(t){this.options=t}on(t,r){Uxe(this.handlers,t,r)}off(t,r){Hxe(this.handlers,t,r)}trigger(t,...r){let e=this.handlers[t]||[],i=this.options&&this.options[t],o=[].concat(i||[],e);for(let a of o)a.apply(this.thisContext,r)}hasHandlers(t){return!!(this.handlers[t]&&this.handlers[t].length||this.options&&this.options[t])}};function Uxe(n,t,r){(n[t]||(n[t]=[])).push(r)}function Hxe(n,t,r){r?n[t]&&(n[t]=n[t].filter(e=>e!==r)):delete n[t]}var qxe={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function T3(n,t){return nx(Wxe(n),null,t)}function Wxe(n){let t;return n===!0?t=[{}]:Array.isArray(n)?t=n.filter(r=>r.daysOfWeek):typeof n=="object"&&n?t=[n]:t=[],t=t.map(r=>Object.assign(Object.assign({},qxe),r)),t}function nW(n,t,r){r.emitter.trigger("select",Object.assign(Object.assign({},E3(n,r)),{jsEvent:t?t.origEvent:null,view:r.viewApi||r.calendarApi.view}))}function Yxe(n,t){t.emitter.trigger("unselect",{jsEvent:n?n.origEvent:null,view:t.viewApi||t.calendarApi.view})}function E3(n,t){let r={};for(let e of t.pluginHooks.dateSpanTransforms)Object.assign(r,e(n,t));return Object.assign(r,pSe(n,t.dateEnv)),r}function BN(n,t,r){let{dateEnv:e,options:i}=r,o=t;return n?(o=Io(o),o=e.add(o,i.defaultAllDayEventDuration)):o=e.add(o,i.defaultTimedEventDuration),o}function rW(n,t,r,e){let i=nD(n.defs,t),o=Dd();for(let a in n.defs){let s=n.defs[a];o.defs[a]=Qxe(s,i[a],r,e)}for(let a in n.instances){let s=n.instances[a],c=o.defs[s.defId];o.instances[a]=Kxe(s,c,i[s.defId],r,e)}return o}function Qxe(n,t,r,e){let i=r.standardProps||{};i.hasEnd==null&&t.durationEditable&&(r.startDelta||r.endDelta)&&(i.hasEnd=!0);let o=Object.assign(Object.assign(Object.assign({},n),i),{ui:Object.assign(Object.assign({},n.ui),i.ui)});r.extendedProps&&(o.extendedProps=Object.assign(Object.assign({},o.extendedProps),r.extendedProps));for(let a of e.pluginHooks.eventDefMutationAppliers)a(o,r,e);return!o.hasEnd&&e.options.forceEventDuration&&(o.hasEnd=!0),o}function Kxe(n,t,r,e,i){let{dateEnv:o}=i,a=e.standardProps&&e.standardProps.allDay===!0,s=e.standardProps&&e.standardProps.hasEnd===!1,c=Object.assign({},n);return a&&(c.range=Yq(c.range)),e.datesDelta&&r.startEditable&&(c.range={start:o.add(c.range.start,e.datesDelta),end:o.add(c.range.end,e.datesDelta)}),e.startDelta&&r.durationEditable&&(c.range={start:o.add(c.range.start,e.startDelta),end:c.range.end}),e.endDelta&&r.durationEditable&&(c.range={start:c.range.start,end:o.add(c.range.end,e.endDelta)}),s&&(c.range={start:c.range.start,end:BN(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:Io(c.range.start),end:Io(c.range.end)}),c.range.end<c.range.start&&(c.range.end=BN(t.allDay,c.range.start,i)),c}var Mh=class{constructor(t,r){this.context=t,this.internalEventSource=r}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},La=class n{constructor(t,r,e){this._context=t,this._def=r,this._instance=e||null}setProp(t,r){if(t in Xq)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(t==="id")r=Yk[t](r),this.mutate({standardProps:{publicId:r}});else if(t in Yk)r=Yk[t](r),this.mutate({standardProps:{[t]:r}});else if(t in tD){let e=tD[t](r);t==="color"?e={backgroundColor:r,borderColor:r}:t==="editable"?e={startEditable:r,durationEditable:r}:e={[t]:r},this.mutate({standardProps:{ui:e}})}else console.warn(`Could not set prop '${t}'. Use setExtendedProp instead.`)}setExtendedProp(t,r){this.mutate({extendedProps:{[t]:r}})}setStart(t,r={}){let{dateEnv:e}=this._context,i=e.createMarker(t);if(i&&this._instance){let o=this._instance.range,a=K1(o.start,i,e,r.granularity);r.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}}setEnd(t,r={}){let{dateEnv:e}=this._context,i;if(!(t!=null&&(i=e.createMarker(t),!i))&&this._instance)if(i){let o=K1(this._instance.range.end,i,e,r.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(t,r,e={}){let{dateEnv:i}=this._context,o={allDay:e.allDay},a=i.createMarker(t),s;if(a&&!(r!=null&&(s=i.createMarker(r),!s))&&this._instance){let c=this._instance.range;e.allDay===!0&&(c=Yq(c));let u=K1(c.start,a,i,e.granularity);if(s){let f=K1(c.end,s,i,e.granularity);F1e(u,f)?this.mutate({datesDelta:u,standardProps:o}):this.mutate({startDelta:u,endDelta:f,standardProps:o})}else o.hasEnd=!1,this.mutate({datesDelta:u,standardProps:o})}}moveStart(t){let r=Xr(t);r&&this.mutate({startDelta:r})}moveEnd(t){let r=Xr(t);r&&this.mutate({endDelta:r})}moveDates(t){let r=Xr(t);r&&this.mutate({datesDelta:r})}setAllDay(t,r={}){let e={allDay:t},{maintainDuration:i}=r;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==t&&(e.hasEnd=i),this.mutate({standardProps:e})}formatRange(t){let{dateEnv:r}=this._context,e=this._instance,i=os(t);return this._def.hasEnd?r.formatRange(e.range.start,e.range.end,i,{forcedStartTzo:e.forcedStartTzo,forcedEndTzo:e.forcedEndTzo}):r.format(e.range.start,i,{forcedTzo:e.forcedStartTzo})}mutate(t){let r=this._instance;if(r){let e=this._def,i=this._context,{eventStore:o}=i.getCurrentData(),a=Jq(o,r.instanceId);a=rW(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);let c=new n(i,e,r);this._def=a.defs[e.defId],this._instance=a.instances[r.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:a}),i.emitter.trigger("eventChange",{oldEvent:c,event:this,relatedEvents:ux(a,i,r),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:o})}})}}remove(){let t=this._context,r=oW(this);t.dispatch({type:"REMOVE_EVENTS",eventStore:r}),t.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:r})}})}get source(){let{sourceId:t}=this._def;return t?new Mh(this._context,this._context.getCurrentData().eventSources[t]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let t=this._instance;return t?this._context.dateEnv.formatIso(t.range.start,{omitTime:this._def.allDay,forcedTzo:t.forcedStartTzo}):""}get endStr(){let t=this._instance;return t&&this._def.hasEnd?this._context.dateEnv.formatIso(t.range.end,{omitTime:this._def.allDay,forcedTzo:t.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(t={}){let r=this._def,{ui:e}=r,{startStr:i,endStr:o}=this,a={allDay:r.allDay};return r.title&&(a.title=r.title),i&&(a.start=i),o&&(a.end=o),r.publicId&&(a.id=r.publicId),r.groupId&&(a.groupId=r.groupId),r.url&&(a.url=r.url),e.display&&e.display!=="auto"&&(a.display=e.display),t.collapseColor&&e.backgroundColor&&e.backgroundColor===e.borderColor?a.color=e.backgroundColor:(e.backgroundColor&&(a.backgroundColor=e.backgroundColor),e.borderColor&&(a.borderColor=e.borderColor)),e.textColor&&(a.textColor=e.textColor),e.classNames.length&&(a.classNames=e.classNames),Object.keys(r.extendedProps).length&&(t.collapseExtendedProps?Object.assign(a,r.extendedProps):a.extendedProps=r.extendedProps),a}toJSON(){return this.toPlainObject()}};function oW(n){let t=n._def,r=n._instance;return{defs:{[t.defId]:t},instances:r?{[r.instanceId]:r}:{}}}function ux(n,t,r){let{defs:e,instances:i}=n,o=[],a=r?r.instanceId:"";for(let s in i){let c=i[s],u=e[c.defId];c.instanceId!==a&&o.push(new La(t,u,c))}return o}function iD(n,t,r,e){let i={},o={},a={},s=[],c=[],u=nD(n.defs,t);for(let f in n.defs){let _=n.defs[f];u[_.defId].display==="inverse-background"&&(_.groupId?(i[_.groupId]=[],a[_.groupId]||(a[_.groupId]=_)):o[f]=[])}for(let f in n.instances){let _=n.instances[f],I=n.defs[_.defId],S=u[I.defId],F=_.range,H=!I.allDay&&e?bD(F,e):F,q=x0(H,r);q&&(S.display==="inverse-background"?I.groupId?i[I.groupId].push(q):o[_.defId].push(q):S.display!=="none"&&(S.display==="background"?s:c).push({def:I,ui:S,instance:_,range:q,isStart:H.start&&H.start.valueOf()===q.start.valueOf(),isEnd:H.end&&H.end.valueOf()===q.end.valueOf()}))}for(let f in i){let _=i[f],I=_q(_,r);for(let S of I){let F=a[f],H=u[F.defId];s.push({def:F,ui:H,instance:null,range:S,isStart:!1,isEnd:!1})}}for(let f in o){let _=o[f],I=_q(_,r);for(let S of I)s.push({def:n.defs[f],ui:u[f],instance:null,range:S,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function Xxe(n){return n.ui.display==="background"||n.ui.display==="inverse-background"}function yq(n,t){n.fcSeg=t}function hx(n){return n.fcSeg||n.parentNode.fcSeg||null}function nD(n,t){return Ap(n,r=>aW(r,t))}function aW(n,t){let r=[];return t[""]&&r.push(t[""]),t[n.defId]&&r.push(t[n.defId]),r.push(n.ui),C3(r)}function Zxe(n,t){let r=n.map(Jxe);return r.sort((e,i)=>Fq(e,i,t)),r.map(e=>e._seg)}function Jxe(n){let{eventRange:t}=n,r=t.def,e=t.instance?t.instance.range:t.range,i=e.start?e.start.valueOf():0,o=e.end?e.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},r.extendedProps),r),{id:r.publicId,start:i,end:o,duration:o-i,allDay:Number(r.allDay),_seg:n})}function eSe(n,t){let{pluginHooks:r}=t,e=r.isDraggableTransformers,{def:i,ui:o}=n.eventRange,a=o.startEditable;for(let s of e)a=s(a,i,o,t);return a}function tSe(n,t){return n.isStart&&n.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function iSe(n,t){return n.isEnd&&n.eventRange.ui.durationEditable}function sW(n,t,r,e,i,o,a){let{dateEnv:s,options:c}=r,{displayEventTime:u,displayEventEnd:f}=c,_=n.eventRange.def,I=n.eventRange.instance;u==null&&(u=e!==!1),f==null&&(f=i!==!1);let S=I.range.start,F=I.range.end,H=o||n.start||n.eventRange.range.start,q=a||n.end||n.eventRange.range.end,ee=Io(S).valueOf()===Io(H).valueOf(),Ie=Io(Ph(F,-1)).valueOf()===Io(Ph(q,-1)).valueOf();return u&&!_.allDay&&(ee||Ie)?(H=ee?S:H,q=Ie?F:q,f&&_.hasEnd?s.formatRange(H,q,t,{forcedStartTzo:o?null:I.forcedStartTzo,forcedEndTzo:a?null:I.forcedEndTzo}):s.format(H,t,{forcedTzo:o?null:I.forcedStartTzo})):""}function nSe(n,t,r){let e=n.eventRange.range;return{isPast:e.end<=(r||t.start),isFuture:e.start>=(r||t.end),isToday:t&&Mp(t,e.start)}}function rSe(n){let t=["fc-event"];return n.isMirror&&t.push("fc-event-mirror"),n.isDraggable&&t.push("fc-event-draggable"),(n.isStartResizable||n.isEndResizable)&&t.push("fc-event-resizable"),n.isDragging&&t.push("fc-event-dragging"),n.isResizing&&t.push("fc-event-resizing"),n.isSelected&&t.push("fc-event-selected"),n.isStart&&t.push("fc-event-start"),n.isEnd&&t.push("fc-event-end"),n.isPast&&t.push("fc-event-past"),n.isToday&&t.push("fc-event-today"),n.isFuture&&t.push("fc-event-future"),t}function oSe(n){return n.instance?n.instance.instanceId:`${n.def.defId}:${n.range.start.toISOString()}`}function lW(n,t){let{def:r,instance:e}=n.eventRange,{url:i}=r;if(i)return{href:i};let{emitter:o,options:a}=t,{eventInteractive:s}=a;return s==null&&(s=r.interactive,s==null&&(s=!!o.hasHandlers("eventClick"))),s?Pq(c=>{o.trigger("eventClick",{el:c.target,event:new La(t,r,e),jsEvent:c,view:t.viewApi})}):{}}var aSe={start:rt,end:rt,allDay:Boolean};function sSe(n,t,r){let e=lSe(n,t),{range:i}=e;if(!i.start)return null;if(!i.end){if(r==null)return null;i.end=t.add(i.start,r)}return e}function lSe(n,t){let{refined:r,extra:e}=mD(n,aSe),i=r.start?t.createMarkerMeta(r.start):null,o=r.end?t.createMarkerMeta(r.end):null,{allDay:a}=r;return a==null&&(a=i&&i.isTimeUnspecified&&(!o||o.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:o?o.marker:null},allDay:a},e)}function cSe(n,t){return Wq(n.range,t.range)&&n.allDay===t.allDay&&dSe(n,t)}function dSe(n,t){for(let r in t)if(r!=="range"&&r!=="allDay"&&n[r]!==t[r])return!1;for(let r in n)if(!(r in t))return!1;return!0}function pSe(n,t){return Object.assign(Object.assign({},cW(n.range,t,n.allDay)),{allDay:n.allDay})}function I3(n,t,r){return Object.assign(Object.assign({},cW(n,t,r)),{timeZone:t.timeZone})}function cW(n,t,r){return{start:t.toDate(n.start),end:t.toDate(n.end),startStr:t.formatIso(n.start,{omitTime:r}),endStr:t.formatIso(n.end,{omitTime:r})}}function mSe(n,t,r){let e=v3({editable:!1},r),i=Jk(e.refined,e.extra,"",n.allDay,!0,r);return{def:i,ui:aW(i,t),instance:_D(i.defId,n.range),range:n.range,isStart:!0,isEnd:!0}}function k3(n,t,r){let e=!1,i=function(s){e||(e=!0,t(s))},o=function(s){e||(e=!0,r(s))},a=n(i,o);a&&typeof a.then=="function"&&a.then(i,o)}var rD=class extends Error{constructor(t,r){super(t),this.response=r}};function D3(n,t,r){n=n.toUpperCase();let e={method:n};return n==="GET"?t+=(t.indexOf("?")===-1?"?":"&")+new URLSearchParams(r):(e.body=new URLSearchParams(r),e.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,e).then(i=>{if(i.ok)return i.json().then(o=>[o,i],()=>{throw new rD("Failure parsing JSON",i)});throw new rD("Request failed",i)})}var wN;function M3(){return wN==null&&(wN=uSe()),wN}function uSe(){if(typeof document>"u")return!0;let n=document.createElement("div");n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.innerHTML="<table><tr><td><div></div></td></tr></table>",n.querySelector("table").style.height="100px",n.querySelector("div").style.height="100%",document.body.appendChild(n);let r=n.querySelector("div").offsetHeight>0;return document.body.removeChild(n),r}var rx=class extends ha{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{ex(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{ex(()=>{this.setState({forPrint:!1})})}}render(){let{props:t}=this,{options:r}=t,{forPrint:e}=this.state,i=e||r.height==="auto"||r.contentHeight==="auto",o=!i&&r.height!=null?r.height:"",a=["fc",e?"fc-media-print":"fc-media-screen",`fc-direction-${r.direction}`,t.theme.getClass("root")];return M3()||a.push("fc-liquid-hack"),t.children(a,o,i,e)}componentDidMount(){let{emitter:t}=this.props;t.on("_beforeprint",this.handleBeforePrint),t.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:t}=this.props;t.off("_beforeprint",this.handleBeforePrint),t.off("_afterprint",this.handleAfterPrint)}},ey=class{constructor(t){this.component=t.component,this.isHitComboAllowed=t.isHitComboAllowed||null}destroy(){}};function dW(n,t){return{component:n,el:t.el,useEventCenter:t.useEventCenter!=null?t.useEventCenter:!0,isHitComboAllowed:t.isHitComboAllowed||null}}function hSe(n){return{[n.component.uid]:n}}var CD={},ox=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(t){this.currentDataManager.dispatch(t)}get view(){return this.getCurrentData().viewApi}batchRendering(t){t()}updateSize(){this.trigger("_resize",!0)}setOption(t,r){this.dispatch({type:"SET_OPTION",optionName:t,rawOptionValue:r})}getOption(t){return this.currentDataManager.currentCalendarOptionsInput[t]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(t,r){let{currentDataManager:e}=this;e.currentCalendarOptionsRefiners[t]?e.emitter.on(t,r):console.warn(`Unknown listener name '${t}'`)}off(t,r){this.currentDataManager.emitter.off(t,r)}trigger(t,...r){this.currentDataManager.emitter.trigger(t,...r)}changeView(t,r){this.batchRendering(()=>{if(this.unselect(),r)if(r.start&&r.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:r});else{let{dateEnv:e}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t,dateMarker:e.createMarker(r)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:t})})}zoomTo(t,r){let e=this.getCurrentData(),i;r=r||"day",i=e.viewSpecs[r]||this.getUnitViewSpec(r),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:t}):this.dispatch({type:"CHANGE_DATE",dateMarker:t})}getUnitViewSpec(t){let{viewSpecs:r,toolbarConfig:e}=this.getCurrentData(),i=[].concat(e.header?e.header.viewsWithButtons:[],e.footer?e.footer.viewsWithButtons:[]),o,a;for(let s in r)i.push(s);for(o=0;o<i.length;o+=1)if(a=r[i[o]],a&&a.singleUnit===t)return a;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.addYears(t.currentDate,-1)})}nextYear(){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.addYears(t.currentDate,1)})}today(){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:ny(t.calendarOptions.now,t.dateEnv)})}gotoDate(t){let r=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:r.dateEnv.createMarker(t)})}incrementDate(t){let r=this.getCurrentData(),e=Xr(t);e&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:r.dateEnv.add(r.currentDate,e)}))}getDate(){let t=this.getCurrentData();return t.dateEnv.toDate(t.currentDate)}formatDate(t,r){let{dateEnv:e}=this.getCurrentData();return e.format(e.createMarker(t),os(r))}formatRange(t,r,e){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(t),i.createMarker(r),os(e),e)}formatIso(t,r){let{dateEnv:e}=this.getCurrentData();return e.formatIso(e.createMarker(t),{omitTime:r})}select(t,r){let e;r==null?t.start!=null?e=t:e={start:t,end:null}:e={start:t,end:r};let i=this.getCurrentData(),o=sSe(e,i.dateEnv,Xr({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),nW(o,null,i))}unselect(t){let r=this.getCurrentData();r.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Yxe(t,r))}addEvent(t,r){if(t instanceof La){let a=t._def,s=t._instance;return this.getCurrentData().eventStore.defs[a.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:eD({def:a,instance:s})}),this.triggerEventAdd(t)),t}let e=this.getCurrentData(),i;if(r instanceof Mh)i=r.internalEventSource;else if(typeof r=="boolean")r&&([i]=hD(e.eventSources));else if(r!=null){let a=this.getEventSourceById(r);if(!a)return console.warn(`Could not find an event source with ID "${r}"`),null;i=a.internalEventSource}let o=Zq(t,i,e,!1);if(o){let a=new La(e,o.def,o.def.recurringDef?null:o.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:eD(o)}),this.triggerEventAdd(a),a}return null}triggerEventAdd(t){let{emitter:r}=this.getCurrentData();r.trigger("eventAdd",{event:t,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:oW(t)})}})}getEventById(t){let r=this.getCurrentData(),{defs:e,instances:i}=r.eventStore;t=String(t);for(let o in e){let a=e[o];if(a.publicId===t){if(a.recurringDef)return new La(r,a,null);for(let s in i){let c=i[s];if(c.defId===a.defId)return new La(r,a,c)}}}return null}getEvents(){let t=this.getCurrentData();return ux(t.eventStore,t)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let t=this.getCurrentData(),r=t.eventSources,e=[];for(let i in r)e.push(new Mh(t,r[i]));return e}getEventSourceById(t){let r=this.getCurrentData(),e=r.eventSources;t=String(t);for(let i in e)if(e[i].publicId===t)return new Mh(r,e[i]);return null}addEventSource(t){let r=this.getCurrentData();if(t instanceof Mh)return r.eventSources[t.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[t.internalEventSource]}),t;let e=w3(t,r);return e?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e]}),new Mh(r,e)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(t){let r=Xr(t);r&&this.trigger("_scrollRequest",{time:r})}};function fSe(n,t){return n.left>=t.left&&n.left<t.right&&n.top>=t.top&&n.top<t.bottom}function pW(n,t){let r={left:Math.max(n.left,t.left),right:Math.min(n.right,t.right),top:Math.max(n.top,t.top),bottom:Math.min(n.bottom,t.bottom)};return r.left<r.right&&r.top<r.bottom?r:!1}function gSe(n,t){return{left:Math.min(Math.max(n.left,t.left),t.right),top:Math.min(Math.max(n.top,t.top),t.bottom)}}function bSe(n){return{left:(n.left+n.right)/2,top:(n.top+n.bottom)/2}}function _Se(n,t){return{left:n.left-t.left,top:n.top-t.top}}var xN=Dd(),jN=class{constructor(){this.getKeysForEventDefs=Yr(this._getKeysForEventDefs),this.splitDateSelection=Yr(this._splitDateSpan),this.splitEventStore=Yr(this._splitEventStore),this.splitIndividualUi=Yr(this._splitIndividualUi),this.splitEventDrag=Yr(this._splitInteraction),this.splitEventResize=Yr(this._splitInteraction),this.eventUiBuilders={}}splitProps(t){let r=this.getKeyInfo(t),e=this.getKeysForEventDefs(t.eventStore),i=this.splitDateSelection(t.dateSelection),o=this.splitIndividualUi(t.eventUiBases,e),a=this.splitEventStore(t.eventStore,e),s=this.splitEventDrag(t.eventDrag),c=this.splitEventResize(t.eventResize),u={};this.eventUiBuilders=Ap(r,(f,_)=>this.eventUiBuilders[_]||Yr(vSe));for(let f in r){let _=r[f],I=a[f]||xN,S=this.eventUiBuilders[f];u[f]={businessHours:_.businessHours||t.businessHours,dateSelection:i[f]||null,eventStore:I,eventUiBases:S(t.eventUiBases[""],_.ui,o[f]),eventSelection:I.instances[t.eventSelection]?t.eventSelection:"",eventDrag:s[f]||null,eventResize:c[f]||null}}return u}_splitDateSpan(t){let r={};if(t){let e=this.getKeysForDateSpan(t);for(let i of e)r[i]=t}return r}_getKeysForEventDefs(t){return Ap(t.defs,r=>this.getKeysForEventDef(r))}_splitEventStore(t,r){let{defs:e,instances:i}=t,o={};for(let a in e)for(let s of r[a])o[s]||(o[s]=Dd()),o[s].defs[a]=e[a];for(let a in i){let s=i[a];for(let c of r[s.defId])o[c]&&(o[c].instances[a]=s)}return o}_splitIndividualUi(t,r){let e={};for(let i in t)if(i)for(let o of r[i])e[o]||(e[o]={}),e[o][i]=t[i];return e}_splitInteraction(t){let r={};if(t){let e=this._splitEventStore(t.affectedEvents,this._getKeysForEventDefs(t.affectedEvents)),i=this._getKeysForEventDefs(t.mutatedEvents),o=this._splitEventStore(t.mutatedEvents,i),a=s=>{r[s]||(r[s]={affectedEvents:e[s]||xN,mutatedEvents:o[s]||xN,isEvent:t.isEvent})};for(let s in e)a(s);for(let s in o)a(s)}return r}};function vSe(n,t,r){let e=[];n&&e.push(n),t&&e.push(t);let i={"":C3(e)};return r&&Object.assign(i,r),i}function A3(n,t,r,e){return{dow:n.getUTCDay(),isDisabled:!!(e&&!Mp(e.activeRange,n)),isOther:!!(e&&!Mp(e.currentRange,n)),isToday:!!(t&&Mp(t,n)),isPast:!!(r?n<r:t&&n<t.start),isFuture:!!(r?n>r:t&&n>=t.end)}}function wD(n,t){let r=["fc-day",`fc-day-${G1e[n.dow]}`];return n.isDisabled?r.push("fc-day-disabled"):(n.isToday&&(r.push("fc-day-today"),r.push(t.getClass("today"))),n.isPast&&r.push("fc-day-past"),n.isFuture&&r.push("fc-day-future"),n.isOther&&r.push("fc-day-other")),r}var ySe=os({year:"numeric",month:"long",day:"numeric"}),CSe=os({week:"long"});function mW(n,t,r="day",e=!0){let{dateEnv:i,options:o,calendarApi:a}=n,s=i.format(t,r==="week"?CSe:ySe);if(o.navLinks){let c=i.toDate(t),u=f=>{let _=r==="day"?o.navLinkDayClick:r==="week"?o.navLinkWeekClick:null;typeof _=="function"?_.call(a,i.toDate(t),f):(typeof _=="string"&&(r=_),a.zoomTo(t,r))};return Object.assign({title:ty(o.navLinkHint,[s,c],s),"data-navlink":""},e?Oq(u):{onClick:u})}return{"aria-label":s}}var SN=null;function uW(){return SN===null&&(SN=wSe()),SN}function wSe(){let n=document.createElement("div");a3(n,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),n.innerHTML="<div></div>",document.body.appendChild(n);let r=n.firstChild.getBoundingClientRect().left>n.getBoundingClientRect().left;return o3(n),r}var TN;function hW(){return TN||(TN=xSe()),TN}function xSe(){let n=document.createElement("div");n.style.overflow="scroll",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",document.body.appendChild(n);let t=fW(n);return document.body.removeChild(n),t}function fW(n){return{x:n.offsetHeight-n.clientHeight,y:n.offsetWidth-n.clientWidth}}function gW(n,t=!1){let r=window.getComputedStyle(n),e=parseInt(r.borderLeftWidth,10)||0,i=parseInt(r.borderRightWidth,10)||0,o=parseInt(r.borderTopWidth,10)||0,a=parseInt(r.borderBottomWidth,10)||0,s=fW(n),c=s.y-e-i,u=s.x-o-a,f={borderLeft:e,borderRight:i,borderTop:o,borderBottom:a,scrollbarBottom:u,scrollbarLeft:0,scrollbarRight:0};return uW()&&r.direction==="rtl"?f.scrollbarLeft=c:f.scrollbarRight=c,t&&(f.paddingLeft=parseInt(r.paddingLeft,10)||0,f.paddingRight=parseInt(r.paddingRight,10)||0,f.paddingTop=parseInt(r.paddingTop,10)||0,f.paddingBottom=parseInt(r.paddingBottom,10)||0),f}function SSe(n,t=!1,r){let e=r?n.getBoundingClientRect():bW(n),i=gW(n,t),o={left:e.left+i.borderLeft+i.scrollbarLeft,right:e.right-i.borderRight-i.scrollbarRight,top:e.top+i.borderTop,bottom:e.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function bW(n){let t=n.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY}}function TSe(n){let t=_W(n),r=n.getBoundingClientRect();for(let e of t){let i=pW(r,e.getBoundingClientRect());if(i)r=i;else return null}return r}function _W(n){let t=[];for(;n instanceof HTMLElement;){let r=window.getComputedStyle(n);if(r.position==="fixed")break;/(auto|scroll)/.test(r.overflow+r.overflowY+r.overflowX)&&t.push(n),n=n.parentNode}return t}var GN=class{constructor(t,r,e,i){this.els=r;let o=this.originClientRect=t.getBoundingClientRect();e&&this.buildElHorizontals(o.left),i&&this.buildElVerticals(o.top)}buildElHorizontals(t){let r=[],e=[];for(let i of this.els){let o=i.getBoundingClientRect();r.push(o.left-t),e.push(o.right-t)}this.lefts=r,this.rights=e}buildElVerticals(t){let r=[],e=[];for(let i of this.els){let o=i.getBoundingClientRect();r.push(o.top-t),e.push(o.bottom-t)}this.tops=r,this.bottoms=e}leftToIndex(t){let{lefts:r,rights:e}=this,i=r.length,o;for(o=0;o<i;o+=1)if(t>=r[o]&&t<e[o])return o}topToIndex(t){let{tops:r,bottoms:e}=this,i=r.length,o;for(o=0;o<i;o+=1)if(t>=r[o]&&t<e[o])return o}getWidth(t){return this.rights[t]-this.lefts[t]}getHeight(t){return this.bottoms[t]-this.tops[t]}similarTo(t){return Uk(this.tops||[],t.tops||[])&&Uk(this.bottoms||[],t.bottoms||[])&&Uk(this.lefts||[],t.lefts||[])&&Uk(this.rights||[],t.rights||[])}};function Uk(n,t){let r=n.length;if(r!==t.length)return!1;for(let e=0;e<r;e++)if(Math.round(n[e])!==Math.round(t[e]))return!1;return!0}var ax=class{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}},zN=class extends ax{constructor(t){super(),this.el=t}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(t){this.el.scrollTop=t}setScrollLeft(t){this.el.scrollLeft=t}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}},$N=class extends ax{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(t){window.scroll(window.scrollX,t)}setScrollLeft(t){window.scroll(t,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}},oD=class extends ha{constructor(){super(...arguments),this.uid=iu()}prepareHits(){}queryHit(t,r,e,i){return null}isValidSegDownEl(t){return!this.props.eventDrag&&!this.props.eventResize&&!Id(t,".fc-event-mirror")}isValidDateDownEl(t){return!Id(t,".fc-event:not(.fc-bg-event)")&&!Id(t,".fc-more-link")&&!Id(t,"a[data-navlink]")&&!Id(t,".fc-popover")}};var UN=class{constructor(t=r=>r.thickness||1){this.getEntryThickness=t,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(t){let r=[];for(let e of t)this.insertEntry(e,r);return r}insertEntry(t,r){let e=this.findInsertion(t);this.isInsertionValid(e,t)?this.insertEntryAt(t,e):this.handleInvalidInsertion(e,t,r)}isInsertionValid(t,r){return(this.maxCoord===-1||t.levelCoord+this.getEntryThickness(r)<=this.maxCoord)&&(this.maxStackCnt===-1||t.stackCnt<this.maxStackCnt)}handleInvalidInsertion(t,r,e){if(this.allowReslicing&&t.touchingEntry){let i=Object.assign(Object.assign({},r),{span:O3(r.span,t.touchingEntry.span)});e.push(i),this.splitEntry(r,t.touchingEntry,e)}else e.push(r)}splitEntry(t,r,e){let i=t.span,o=r.span;i.start<o.start&&this.insertEntry({index:t.index,thickness:t.thickness,span:{start:i.start,end:o.start}},e),i.end>o.end&&this.insertEntry({index:t.index,thickness:t.thickness,span:{start:o.end,end:i.end}},e)}insertEntryAt(t,r){let{entriesByLevel:e,levelCoords:i}=this;r.lateral===-1?(EN(i,r.level,r.levelCoord),EN(e,r.level,[t])):EN(e[r.level],r.lateral,t),this.stackCnts[qN(t)]=r.stackCnt}findInsertion(t){let{levelCoords:r,entriesByLevel:e,strictOrder:i,stackCnts:o}=this,a=r.length,s=0,c=-1,u=-1,f=null,_=0;for(let F=0;F<a;F+=1){let H=r[F];if(!i&&H>=s+this.getEntryThickness(t))break;let q=e[F],ee,Ie=WN(q,t.span.start,HN),He=Ie[0]+Ie[1];for(;(ee=q[He])&&ee.span.start<t.span.end;){let Le=H+this.getEntryThickness(ee);Le>s&&(s=Le,f=ee,c=F,u=He),Le===s&&(_=Math.max(_,o[qN(ee)]+1)),He+=1}}let I=0;if(f)for(I=c+1;I<a&&r[I]<s;)I+=1;let S=-1;return I<a&&r[I]===s&&(S=WN(e[I],t.span.end,HN)[0]),{touchingLevel:c,touchingLateral:u,touchingEntry:f,stackCnt:_,levelCoord:s,level:I,lateral:S}}toRects(){let{entriesByLevel:t,levelCoords:r}=this,e=t.length,i=[];for(let o=0;o<e;o+=1){let a=t[o],s=r[o];for(let c of a)i.push(Object.assign(Object.assign({},c),{thickness:this.getEntryThickness(c),levelCoord:s}))}return i}};function HN(n){return n.span.end}function qN(n){return n.index+":"+n.span.start}function ESe(n){let t=[];for(let r of n){let e=[],i={span:r.span,entries:[r]};for(let o of t)O3(o.span,i.span)?i={entries:o.entries.concat(i.entries),span:ISe(o.span,i.span)}:e.push(o);e.push(i),t=e}return t}function ISe(n,t){return{start:Math.min(n.start,t.start),end:Math.max(n.end,t.end)}}function O3(n,t){let r=Math.max(n.start,t.start),e=Math.min(n.end,t.end);return r<e?{start:r,end:e}:null}function EN(n,t,r){n.splice(t,0,r)}function WN(n,t,r){let e=0,i=n.length;if(!i||t<r(n[e]))return[0,0];if(t>r(n[i-1]))return[i,0];for(;e<i;){let o=Math.floor(e+(i-e)/2),a=r(n[o]);if(t<a)i=o;else if(t>a)e=o+1;else return[o,1]}return[e,0]}var YN=class{constructor(t,r){this.emitter=new Jv}destroy(){}setMirrorIsVisible(t){}setMirrorNeedsRevert(t){}setAutoScrollEnabled(t){}},kSe={};function vW(n,t){return!n||t>10?os({weekday:"short"}):t>1?os({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):os({weekday:"long"})}var yW="fc-col-header-cell";function CW(n){return n.text}var aD=class extends ha{render(){let{dateEnv:t,options:r,theme:e,viewApi:i}=this.context,{props:o}=this,{date:a,dateProfile:s}=o,c=A3(a,o.todayRange,null,s),u=[yW].concat(wD(c,e)),f=t.format(a,o.dayHeaderFormat),_=!c.isDisabled&&o.colCnt>1?mW(this.context,a):{},I=Object.assign(Object.assign(Object.assign({date:t.toDate(a),view:i},o.extraRenderProps),{text:f}),c);return Qt(kd,{elTag:"th",elClasses:u,elAttrs:Object.assign({role:"columnheader",colSpan:o.colSpan,"data-date":c.isDisabled?void 0:d3(a)},o.extraDataAttrs),renderProps:I,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:CW,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},S=>Qt("div",{className:"fc-scrollgrid-sync-inner"},!c.isDisabled&&Qt(S,{elTag:"a",elAttrs:_,elClasses:["fc-col-header-cell-cushion",o.isSticky&&"fc-sticky"]})))}},DSe=os({weekday:"long"}),sD=class extends ha{render(){let{props:t}=this,{dateEnv:r,theme:e,viewApi:i,options:o}=this.context,a=tl(new Date(2592e5),t.dow),s={dow:t.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},c=r.format(a,t.dayHeaderFormat),u=Object.assign(Object.assign(Object.assign(Object.assign({date:a},s),{view:i}),t.extraRenderProps),{text:c});return Qt(kd,{elTag:"th",elClasses:[yW,...wD(s,e),...t.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:t.colSpan},t.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:o.dayHeaderContent,defaultGenerator:CW,classNameGenerator:o.dayHeaderClassNames,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},f=>Qt("div",{className:"fc-scrollgrid-sync-inner"},Qt(f,{elTag:"a",elClasses:["fc-col-header-cell-cushion",t.isSticky&&"fc-sticky"],elAttrs:{"aria-label":r.format(a,DSe)}})))}},wW=(()=>{class n extends _s{constructor(r,e){super(r,e),this.initialNowDate=ny(e.options.now,e.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:r,state:e}=this;return r.children(e.nowDate,e.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(r){r.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:r,context:e}=this,i=Ph(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),o=e.dateEnv.startOf(i,r.unit),a=e.dateEnv.add(o,Xr(1,r.unit)),s=a.valueOf()-i.valueOf();return s=Math.min(1e3*60*60*24,s),{currentState:{nowDate:o,todayRange:Cq(o)},nextState:{nowDate:a,todayRange:Cq(a)},waitMs:s}}setTimeout(){let{nextState:r,waitMs:e}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(r,()=>{this.setTimeout()})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}return n.contextType=Rp,n})();function Cq(n){let t=Io(n),r=tl(t,1);return{start:t,end:r}}var QN=class extends ha{constructor(){super(...arguments),this.createDayHeaderFormatter=Yr(MSe)}render(){let{context:t}=this,{dates:r,dateProfile:e,datesRepDistinctDays:i,renderIntro:o}=this.props,a=this.createDayHeaderFormatter(t.options.dayHeaderFormat,i,r.length);return Qt(wW,{unit:"day"},(s,c)=>Qt("tr",{role:"row"},o&&o("day"),r.map(u=>i?Qt(aD,{key:u.toISOString(),date:u,dateProfile:e,todayRange:c,colCnt:r.length,dayHeaderFormat:a}):Qt(sD,{key:u.getUTCDay(),dow:u.getUTCDay(),dayHeaderFormat:a}))))}};function MSe(n,t,r){return n||vW(t,r)}var KN=class{constructor(t,r){let e=t.start,{end:i}=t,o=[],a=[],s=-1;for(;e<i;)r.isHiddenDay(e)?o.push(s+.5):(s+=1,o.push(s),a.push(e)),e=tl(e,1);this.dates=a,this.indices=o,this.cnt=a.length}sliceRange(t){let r=this.getDateDayIndex(t.start),e=this.getDateDayIndex(tl(t.end,-1)),i=Math.max(0,r),o=Math.min(this.cnt-1,e);return i=Math.ceil(i),o=Math.floor(o),i<=o?{firstIndex:i,lastIndex:o,isStart:r===i,isEnd:e===o}:null}getDateDayIndex(t){let{indices:r}=this,e=Math.floor(Rh(this.dates[0],t));return e<0?r[0]-1:e>=r.length?r[r.length-1]+1:r[e]}},XN=class{constructor(t,r){let{dates:e}=t,i,o,a;if(r){for(o=e[0].getUTCDay(),i=1;i<e.length&&e[i].getUTCDay()!==o;i+=1);a=Math.ceil(e.length/i)}else a=1,i=e.length;this.rowCnt=a,this.colCnt=i,this.daySeries=t,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let t=[];for(let r=0;r<this.rowCnt;r+=1){let e=[];for(let i=0;i<this.colCnt;i+=1)e.push(this.buildCell(r,i));t.push(e)}return t}buildCell(t,r){let e=this.daySeries.dates[t*this.colCnt+r];return{key:e.toISOString(),date:e}}buildHeaderDates(){let t=[];for(let r=0;r<this.colCnt;r+=1)t.push(this.cells[0][r].date);return t}sliceRange(t){let{colCnt:r}=this,e=this.daySeries.sliceRange(t),i=[];if(e){let{firstIndex:o,lastIndex:a}=e,s=o;for(;s<=a;){let c=Math.floor(s/r),u=Math.min((c+1)*r,a+1);i.push({row:c,firstCol:s%r,lastCol:(u-1)%r,isStart:e.isStart&&s===o,isEnd:e.isEnd&&u-1===a}),s=u}}return i}},ZN=class{constructor(){this.sliceBusinessHours=Yr(this._sliceBusinessHours),this.sliceDateSelection=Yr(this._sliceDateSpan),this.sliceEventStore=Yr(this._sliceEventStore),this.sliceEventDrag=Yr(this._sliceInteraction),this.sliceEventResize=Yr(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(t,r,e,i,...o){let{eventUiBases:a}=t,s=this.sliceEventStore(t.eventStore,a,r,e,...o);return{dateSelectionSegs:this.sliceDateSelection(t.dateSelection,r,e,a,i,...o),businessHourSegs:this.sliceBusinessHours(t.businessHours,r,e,i,...o),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag(t.eventDrag,a,r,e,...o),eventResize:this.sliceEventResize(t.eventResize,a,r,e,...o),eventSelection:t.eventSelection}}sliceNowDate(t,r,e,i,...o){return this._sliceDateSpan({range:{start:t,end:Ph(t,1)},allDay:!1},r,e,{},i,...o)}_sliceBusinessHours(t,r,e,i,...o){return t?this._sliceEventStore(S0(t,Hk(r,!!e),i),{},r,e,...o).bg:[]}_sliceEventStore(t,r,e,i,...o){if(t){let a=iD(t,r,Hk(e,!!i),i);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}}_sliceInteraction(t,r,e,i,...o){if(!t)return null;let a=iD(t.mutatedEvents,r,Hk(e,!!i),i);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:t.affectedEvents.instances,isEvent:t.isEvent}}_sliceDateSpan(t,r,e,i,o,...a){if(!t)return[];let s=Hk(r,!!e),c=x0(t.range,s);if(c){t=Object.assign(Object.assign({},t),{range:c});let u=mSe(t,i,o),f=this.sliceRange(t.range,...a);for(let _ of f)_.eventRange=u;return f}return[]}sliceEventRanges(t,r){let e=[];for(let i of t)e.push(...this.sliceEventRange(i,r));return e}sliceEventRange(t,r){let e=t.range;this.forceDayIfListItem&&t.ui.display==="list-item"&&(e={start:e.start,end:tl(e.start,1)});let i=this.sliceRange(e,...r);for(let o of i)o.eventRange=t,o.isStart=t.isStart&&o.isStart,o.isEnd=t.isEnd&&o.isEnd;return i}};function Hk(n,t){let r=n.activeRange;return t?r:{start:Ph(r.start,n.slotMinTime.milliseconds),end:Ph(r.end,n.slotMaxTime.milliseconds-864e5)}}function ASe(n,t,r){let{instances:e}=n.mutatedEvents;for(let i in e)if(!gD(t.validRange,e[i].range))return!1;return xW({eventDrag:n},r)}function OSe(n,t,r){return gD(t.validRange,n.range)?xW({dateSelection:n},r):!1}function xW(n,t){let r=t.getCurrentData(),e=Object.assign({businessHours:r.businessHours,dateSelection:"",eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},n);return(t.pluginHooks.isPropsValid||SW)(e,t)}function SW(n,t,r={},e){return!(n.eventDrag&&!PSe(n,t,r,e)||n.dateSelection&&!RSe(n,t,r,e))}function PSe(n,t,r,e){let i=t.getCurrentData(),o=n.eventDrag,a=o.mutatedEvents,s=a.defs,c=a.instances,u=nD(s,o.isEvent?n.eventUiBases:{"":i.selectionConfig});e&&(u=Ap(u,e));let f=zxe(n.eventStore,o.affectedEvents.instances),_=f.defs,I=f.instances,S=nD(_,n.eventUiBases);for(let F in c){let H=c[F],q=H.range,ee=u[H.defId],Ie=s[H.defId];if(!TW(ee.constraints,q,f,n.businessHours,t))return!1;let{eventOverlap:He}=t.options,Le=typeof He=="function"?He:null;for(let ue in I){let Ne=I[ue];if(fD(q,Ne.range)&&(S[Ne.defId].overlap===!1&&o.isEvent||ee.overlap===!1||Le&&!Le(new La(t,_[Ne.defId],Ne),new La(t,Ie,H))))return!1}let qe=i.eventStore;for(let ue of ee.allows){let Ne=Object.assign(Object.assign({},r),{range:H.range,allDay:Ie.allDay}),st=qe.defs[Ie.defId],Ui=qe.instances[F],Oe;if(st?Oe=new La(t,st,Ui):Oe=new La(t,Ie),!ue(E3(Ne,t),Oe))return!1}}return!0}function RSe(n,t,r,e){let i=n.eventStore,o=i.defs,a=i.instances,s=n.dateSelection,c=s.range,{selectionConfig:u}=t.getCurrentData();if(e&&(u=e(u)),!TW(u.constraints,c,i,n.businessHours,t))return!1;let{selectOverlap:f}=t.options,_=typeof f=="function"?f:null;for(let I in a){let S=a[I];if(fD(c,S.range)&&(u.overlap===!1||_&&!_(new La(t,o[S.defId],S),null)))return!1}for(let I of u.allows){let S=Object.assign(Object.assign({},r),s);if(!I(E3(S,t),null))return!1}return!0}function TW(n,t,r,e,i){for(let o of n)if(!NSe(FSe(o,t,r,e,i),t))return!1;return!0}function FSe(n,t,r,e,i){return n==="businessHours"?IN(S0(e,t,i)):typeof n=="string"?IN(yD(r,o=>o.groupId===n)):typeof n=="object"&&n?IN(S0(n,t,i)):[]}function IN(n){let{instances:t}=n,r=[];for(let e in t)r.push(t[e].range);return r}function NSe(n,t){for(let r of n)if(gD(r,t))return!0;return!1}var qk=/^(visible|hidden)$/,lD=class extends ha{constructor(){super(...arguments),this.handleEl=t=>{this.el=t,nu(this.props.elRef,t)}}render(){let{props:t}=this,{liquid:r,liquidIsAbsolute:e}=t,i=r&&e,o=["fc-scroller"];return r&&(e?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),Qt("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:t.overflowX,overflowY:t.overflowY,left:i&&-(t.overcomeLeft||0)||"",right:i&&-(t.overcomeRight||0)||"",bottom:i&&-(t.overcomeBottom||0)||"",marginLeft:!i&&-(t.overcomeLeft||0)||"",marginRight:!i&&-(t.overcomeRight||0)||"",marginBottom:!i&&-(t.overcomeBottom||0)||"",maxHeight:t.maxHeight||""}},t.children)}needsXScrolling(){if(qk.test(this.props.overflowX))return!1;let{el:t}=this,r=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:e}=t;for(let i=0;i<e.length;i+=1)if(e[i].getBoundingClientRect().width>r)return!0;return!1}needsYScrolling(){if(qk.test(this.props.overflowY))return!1;let{el:t}=this,r=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:e}=t;for(let i=0;i<e.length;i+=1)if(e[i].getBoundingClientRect().height>r)return!0;return!1}getXScrollbarWidth(){return qk.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return qk.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},sx=class{constructor(t){this.masterCallback=t,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(r,e)=>{let{depths:i,currentMap:o}=this,a=!1,s=!1;r!==null?(a=e in o,o[e]=r,i[e]=(i[e]||0)+1,s=!0):(i[e]-=1,i[e]||(delete o[e],delete this.callbackMap[e],a=!0)),this.masterCallback&&(a&&this.masterCallback(null,String(e)),s&&this.masterCallback(r,String(e)))}}createRef(t){let r=this.callbackMap[t];return r||(r=this.callbackMap[t]=e=>{this.handleValue(e,String(t))}),r}collect(t,r,e){return zq(this.currentMap,t,r,e)}getAll(){return hD(this.currentMap)}};function EW(n){let t=Dq(n,".fc-scrollgrid-shrink"),r=0;for(let e of t)r=Math.max(r,O1e(e));return Math.ceil(r)}function P3(n,t){return n.liquid&&t.liquid}function IW(n,t){return t.maxHeight!=null||P3(n,t)}function kW(n,t,r,e){let{expandRows:i}=r;return typeof t.content=="function"?t.content(r):Qt("table",{role:"presentation",className:[t.tableClassName,n.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:r.tableMinWidth,width:r.clientWidth,height:i?r.clientHeight:""}},r.tableColGroupNode,Qt(e?"thead":"tbody",{role:"presentation"},typeof t.rowContent=="function"?t.rowContent(r):t.rowContent))}function DW(n,t){return Pp(n,t,Op)}function MW(n,t){let r=[];for(let e of n){let i=e.span||1;for(let o=0;o<i;o+=1)r.push(Qt("col",{style:{width:e.width==="shrink"?AW(t):e.width||"",minWidth:e.minWidth||""}}))}return Qt("colgroup",{},...r)}function AW(n){return n??4}function OW(n){for(let t of n)if(t.width==="shrink")return!0;return!1}function PW(n,t){let r=["fc-scrollgrid",t.theme.getClass("table")];return n&&r.push("fc-scrollgrid-liquid"),r}function RW(n,t){let r=["fc-scrollgrid-section",`fc-scrollgrid-section-${n.type}`,n.className];return t&&n.liquid&&n.maxHeight==null&&r.push("fc-scrollgrid-section-liquid"),n.isSticky&&r.push("fc-scrollgrid-section-sticky"),r}function VSe(n){return Qt("div",{className:"fc-scrollgrid-sticky-shim",style:{width:n.clientWidth,minWidth:n.tableMinWidth}})}function LSe(n){let{stickyHeaderDates:t}=n;return(t==null||t==="auto")&&(t=n.height==="auto"||n.viewHeight==="auto"),t}function BSe(n){let{stickyFooterScrollbar:t}=n;return(t==null||t==="auto")&&(t=n.height==="auto"||n.viewHeight==="auto"),t}var cD=class extends ha{constructor(){super(...arguments),this.processCols=Yr(t=>t,DW),this.renderMicroColGroup=Yr(MW),this.scrollerRefs=new sx,this.scrollerElRefs=new sx(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:t,state:r,context:e}=this,i=t.sections||[],o=this.processCols(t.cols),a=this.renderMicroColGroup(o,r.shrinkWidth),s=PW(t.liquid,e);t.collapsibleWidth&&s.push("fc-scrollgrid-collapsible");let c=i.length,u=0,f,_=[],I=[],S=[];for(;u<c&&(f=i[u]).type==="header";)_.push(this.renderSection(f,a,!0)),u+=1;for(;u<c&&(f=i[u]).type==="body";)I.push(this.renderSection(f,a,!1)),u+=1;for(;u<c&&(f=i[u]).type==="footer";)S.push(this.renderSection(f,a,!0)),u+=1;let F=!M3(),H={role:"rowgroup"};return Qt("table",{role:"grid",className:s.join(" "),style:{height:t.height}},!!(!F&&_.length)&&Qt("thead",H,..._),!!(!F&&I.length)&&Qt("tbody",H,...I),!!(!F&&S.length)&&Qt("tfoot",H,...S),F&&Qt("tbody",H,..._,...I,...S))}renderSection(t,r,e){return"outerContent"in t?Qt(el,{key:t.key},t.outerContent):Qt("tr",{key:t.key,role:"presentation",className:RW(t,this.props.liquid).join(" ")},this.renderChunkTd(t,r,t.chunk,e))}renderChunkTd(t,r,e,i){if("outerContent"in e)return e.outerContent;let{props:o}=this,{forceYScrollbars:a,scrollerClientWidths:s,scrollerClientHeights:c}=this.state,u=IW(o,t),f=P3(o,t),_=o.liquid?a?"scroll":u?"auto":"hidden":"visible",I=t.key,S=kW(t,e,{tableColGroupNode:r,tableMinWidth:"",clientWidth:!o.collapsibleWidth&&s[I]!==void 0?s[I]:null,clientHeight:c[I]!==void 0?c[I]:null,expandRows:t.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return Qt(i?"th":"td",{ref:e.elRef,role:"presentation"},Qt("div",{className:`fc-scroller-harness${f?" fc-scroller-harness-liquid":""}`},Qt(lD,{ref:this.scrollerRefs.createRef(I),elRef:this.scrollerElRefs.createRef(I),overflowY:_,overflowX:o.liquid?"hidden":"visible",maxHeight:t.maxHeight,liquid:f,liquidIsAbsolute:!0},S)))}_handleScrollerEl(t,r){let e=jSe(this.props.sections,r);e&&nu(e.chunk.scrollerElRef,t)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return OW(this.props.cols)?EW(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let t=hW(),{scrollerRefs:r,scrollerElRefs:e}=this,i=!1,o={},a={};for(let s in r.currentMap){let c=r.currentMap[s];if(c&&c.needsYScrolling()){i=!0;break}}for(let s of this.props.sections){let c=s.key,u=e.currentMap[c];if(u){let f=u.parentNode;o[c]=Math.floor(f.getBoundingClientRect().width-(i?t.y:0)),a[c]=Math.floor(f.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:a}}};cD.addStateEquality({scrollerClientWidths:Op,scrollerClientHeights:Op});function jSe(n,t){for(let r of n)if(r.key===t)return r;return null}var lx=class extends ha{constructor(){super(...arguments),this.handleEl=t=>{this.el=t,t&&yq(t,this.props.seg)}}render(){let{props:t,context:r}=this,{options:e}=r,{seg:i}=t,{eventRange:o}=i,{ui:a}=o,s={event:new La(r,o.def,o.instance),view:r.viewApi,timeText:t.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!t.disableDragging&&eSe(i,r),isStartResizable:!t.disableResizing&&tSe(i,r),isEndResizable:!t.disableResizing&&iSe(i),isMirror:!!(t.isDragging||t.isResizing||t.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!t.isPast,isFuture:!!t.isFuture,isToday:!!t.isToday,isSelected:!!t.isSelected,isDragging:!!t.isDragging,isResizing:!!t.isResizing};return Qt(kd,Object.assign({},t,{elRef:this.handleEl,elClasses:[...rSe(s),...i.eventRange.ui.classNames,...t.elClasses||[]],renderProps:s,generatorName:"eventContent",customGenerator:e.eventContent,defaultGenerator:t.defaultGenerator,classNameGenerator:e.eventClassNames,didMount:e.eventDidMount,willUnmount:e.eventWillUnmount}))}componentDidUpdate(t){this.el&&this.props.seg!==t.seg&&yq(this.el,this.props.seg)}},JN=class extends ha{render(){let{props:t,context:r}=this,{options:e}=r,{seg:i}=t,{ui:o}=i.eventRange,a=e.eventTimeFormat||t.defaultTimeFormat,s=sW(i,a,r,t.defaultDisplayEventTime,t.defaultDisplayEventEnd);return Qt(lx,Object.assign({},t,{elTag:"a",elStyle:{borderColor:o.borderColor,backgroundColor:o.backgroundColor},elAttrs:lW(i,r),defaultGenerator:GSe,timeText:s}),(c,u)=>Qt(el,null,Qt(c,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:u.textColor}}),!!u.isStartResizable&&Qt("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!u.isEndResizable&&Qt("div",{className:"fc-event-resizer fc-event-resizer-end"})))}};function GSe(n){return Qt("div",{className:"fc-event-main-frame"},n.timeText&&Qt("div",{className:"fc-event-time"},n.timeText),Qt("div",{className:"fc-event-title-container"},Qt("div",{className:"fc-event-title fc-sticky"},n.event.title||Qt(el,null,"\xA0"))))}var zSe=n=>Qt(Rp.Consumer,null,t=>{let{options:r}=t,e={isAxis:n.isAxis,date:t.dateEnv.toDate(n.date),view:t.viewApi};return Qt(kd,Object.assign({},n,{elTag:n.elTag||"div",renderProps:e,generatorName:"nowIndicatorContent",customGenerator:r.nowIndicatorContent,classNameGenerator:r.nowIndicatorClassNames,didMount:r.nowIndicatorDidMount,willUnmount:r.nowIndicatorWillUnmount}))}),$Se=os({day:"numeric"}),dD=class extends ha{constructor(){super(...arguments),this.refineRenderProps=iy(USe)}render(){let{props:t,context:r}=this,{options:e}=r,i=this.refineRenderProps({date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,isMonthStart:t.isMonthStart||!1,showDayNumber:t.showDayNumber,extraRenderProps:t.extraRenderProps,viewApi:r.viewApi,dateEnv:r.dateEnv,monthStartFormat:e.monthStartFormat});return Qt(kd,Object.assign({},t,{elClasses:[...wD(i,r.theme),...t.elClasses||[]],elAttrs:Object.assign(Object.assign({},t.elAttrs),i.isDisabled?{}:{"data-date":d3(t.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:e.dayCellContent,defaultGenerator:t.defaultGenerator,classNameGenerator:i.isDisabled?void 0:e.dayCellClassNames,didMount:e.dayCellDidMount,willUnmount:e.dayCellWillUnmount}))}};function FW(n){return!!(n.dayCellContent||NN("dayCellContent",n))}function USe(n){let{date:t,dateEnv:r,dateProfile:e,isMonthStart:i}=n,o=A3(t,n.todayRange,null,e),a=n.showDayNumber?r.format(t,i?n.monthStartFormat:$Se):"";return Object.assign(Object.assign(Object.assign({date:r.toDate(t),view:n.viewApi},o),{isMonthStart:i,dayNumberText:a}),n.extraRenderProps)}var e3=class extends ha{render(){let{props:t}=this,{seg:r}=t;return Qt(lx,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:r.eventRange.ui.backgroundColor},defaultGenerator:HSe,seg:r,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:t.isPast,isFuture:t.isFuture,isToday:t.isToday,disableDragging:!0,disableResizing:!0})}};function HSe(n){let{title:t}=n.event;return t&&Qt("div",{className:"fc-event-title"},n.event.title)}function qSe(n){return Qt("div",{className:`fc-${n}`})}var WSe=n=>Qt(Rp.Consumer,null,t=>{let{dateEnv:r,options:e}=t,{date:i}=n,o=e.weekNumberFormat||n.defaultFormat,a=r.computeWeekNumber(i),s=r.format(i,o);return Qt(kd,Object.assign({},n,{renderProps:{num:a,text:s,date:i},generatorName:"weekNumberContent",customGenerator:e.weekNumberContent,defaultGenerator:YSe,classNameGenerator:e.weekNumberClassNames,didMount:e.weekNumberDidMount,willUnmount:e.weekNumberWillUnmount}))});function YSe(n){return n.text}var kN=10,t3=class extends ha{constructor(){super(...arguments),this.state={titleId:dx()},this.handleRootEl=t=>{this.rootEl=t,this.props.elRef&&nu(this.props.elRef,t)},this.handleDocumentMouseDown=t=>{let r=Mq(t);this.rootEl.contains(r)||this.handleCloseClick()},this.handleDocumentKeyDown=t=>{t.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:t}=this.props;t&&t()}}render(){let{theme:t,options:r}=this.context,{props:e,state:i}=this,o=["fc-popover",t.getClass("popover")].concat(e.extraClassNames||[]);return sq(Qt("div",Object.assign({},e.extraAttrs,{id:e.id,className:o.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),Qt("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},Qt("span",{className:"fc-popover-title",id:i.titleId},e.title),Qt("span",{className:"fc-popover-close "+t.getIconClass("close"),title:r.closeHint,onClick:this.handleCloseClick})),Qt("div",{className:"fc-popover-body "+t.getClass("popoverContent")},e.children)),e.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:t}=this.context,{alignmentEl:r,alignGridTop:e}=this.props,{rootEl:i}=this,o=TSe(r);if(o){let a=i.getBoundingClientRect(),s=e?Id(r,".fc-scrollgrid").getBoundingClientRect().top:o.top,c=t?o.right-a.width:o.left;s=Math.max(s,kN),c=Math.min(c,document.documentElement.clientWidth-kN-a.width),c=Math.max(c,kN);let u=i.offsetParent.getBoundingClientRect();a3(i,{top:s-u.top,left:c-u.left})}}},i3=class extends oD{constructor(){super(...arguments),this.handleRootEl=t=>{this.rootEl=t,t?this.context.registerInteractiveComponent(this,{el:t,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:t,dateEnv:r}=this.context,{props:e}=this,{startDate:i,todayRange:o,dateProfile:a}=e,s=r.format(i,t.dayPopoverFormat);return Qt(dD,{elRef:this.handleRootEl,date:i,dateProfile:a,todayRange:o},(c,u,f)=>Qt(t3,{elRef:f.ref,id:e.id,title:s,extraClassNames:["fc-more-popover"].concat(f.className||[]),extraAttrs:f,parentEl:e.parentEl,alignmentEl:e.alignmentEl,alignGridTop:e.alignGridTop,onClose:e.onClose},FW(t)&&Qt(c,{elTag:"div",elClasses:["fc-more-popover-misc"]}),e.children))}queryHit(t,r,e,i){let{rootEl:o,props:a}=this;return t>=0&&t<e&&r>=0&&r<i?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:e,bottom:i},layer:1}:null}},n3=class extends ha{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:dx()},this.handleLinkEl=t=>{this.linkEl=t,this.props.elRef&&nu(this.props.elRef,t)},this.handleClick=t=>{let{props:r,context:e}=this,{moreLinkClick:i}=e.options,o=wq(r).start;function a(s){let{def:c,instance:u,range:f}=s.eventRange;return{event:new La(e,c,u),start:e.dateEnv.toDate(f.start),end:e.dateEnv.toDate(f.end),isStart:s.isStart,isEnd:s.isEnd}}typeof i=="function"&&(i=i({date:o,allDay:!!r.allDayDate,allSegs:r.allSegs.map(a),hiddenSegs:r.hiddenSegs.map(a),jsEvent:t,view:e.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&e.calendarApi.zoomTo(o,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:t,state:r}=this;return Qt(Rp.Consumer,null,e=>{let{viewApi:i,options:o,calendarApi:a}=e,{moreLinkText:s}=o,{moreCnt:c}=t,u=wq(t),f=typeof s=="function"?s.call(a,c):`+${c} ${s}`,_=ty(o.moreLinkHint,[c],f),I={num:c,shortText:`+${c}`,text:f,view:i};return Qt(el,null,!!t.moreCnt&&Qt(kd,{elTag:t.elTag||"a",elRef:this.handleLinkEl,elClasses:[...t.elClasses||[],"fc-more-link"],elStyle:t.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},t.elAttrs),Oq(this.handleClick)),{title:_,"aria-expanded":r.isPopoverOpen,"aria-controls":r.isPopoverOpen?r.popoverId:""}),renderProps:I,generatorName:"moreLinkContent",customGenerator:o.moreLinkContent,defaultGenerator:t.defaultGenerator||QSe,classNameGenerator:o.moreLinkClassNames,didMount:o.moreLinkDidMount,willUnmount:o.moreLinkWillUnmount},t.children),r.isPopoverOpen&&Qt(i3,{id:r.popoverId,startDate:u.start,endDate:u.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:this.parentEl,alignmentEl:t.alignmentElRef?t.alignmentElRef.current:this.linkEl,alignGridTop:t.alignGridTop,forceTimed:t.forceTimed,onClose:this.handlePopoverClose},t.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=Id(this.linkEl,".fc-view-harness"))}};function QSe(n){return n.text}function wq(n){if(n.allDayDate)return{start:n.allDayDate,end:tl(n.allDayDate,1)};let{hiddenSegs:t}=n;return{start:NW(t),end:XSe(t)}}function NW(n){return n.reduce(KSe).eventRange.range.start}function KSe(n,t){return n.eventRange.range.start<t.eventRange.range.start?n:t}function XSe(n){return n.reduce(ZSe).eventRange.range.end}function ZSe(n,t){return n.eventRange.range.end>t.eventRange.range.end?n:t}var r3=class{constructor(){this.handlers=[]}set(t){this.currentValue=t;for(let r of this.handlers)r(t)}subscribe(t){this.handlers.push(t),this.currentValue!==void 0&&t(this.currentValue)}},cx=class extends r3{constructor(){super(...arguments),this.map=new Map}handle(t){let{map:r}=this,e=!1;t.isActive?(r.set(t.id,t),e=!0):r.has(t.id)&&(r.delete(t.id),e=!0),e&&this.set(r)}};var JSe=[],$W={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},UW=Object.assign(Object.assign({},$W),{buttonHints:{prev:"Previous $0",next:"Next $0",today(n,t){return t==="day"?"Today":`This ${n}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(n){return`Show ${n} more event${n===1?"":"s"}`}});function eTe(n){let t=n.length>0?n[0].code:"en",r=JSe.concat(n),e={en:UW};for(let i of r)e[i.code]=i;return{map:e,defaultCode:t}}function HW(n,t){return typeof n=="object"&&!Array.isArray(n)?qW(n.code,[n.code],n):tTe(n,t)}function tTe(n,t){let r=[].concat(n||[]),e=iTe(r,t)||UW;return qW(n,r,e)}function iTe(n,t){for(let r=0;r<n.length;r+=1){let e=n[r].toLocaleLowerCase().split("-");for(let i=e.length;i>0;i-=1){let o=e.slice(0,i).join("-");if(t[o])return t[o]}}return null}function qW(n,t,r){let e=uD([$W,r],["buttonText"]);delete e.code;let{week:i}=e;return delete e.week,{codeArg:n,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(n),options:e}}function oy(n){return{id:iu(),name:n.name,premiumReleaseDate:n.premiumReleaseDate?new Date(n.premiumReleaseDate):void 0,deps:n.deps||[],reducers:n.reducers||[],isLoadingFuncs:n.isLoadingFuncs||[],contextInit:[].concat(n.contextInit||[]),eventRefiners:n.eventRefiners||{},eventDefMemberAdders:n.eventDefMemberAdders||[],eventSourceRefiners:n.eventSourceRefiners||{},isDraggableTransformers:n.isDraggableTransformers||[],eventDragMutationMassagers:n.eventDragMutationMassagers||[],eventDefMutationAppliers:n.eventDefMutationAppliers||[],dateSelectionTransformers:n.dateSelectionTransformers||[],datePointTransforms:n.datePointTransforms||[],dateSpanTransforms:n.dateSpanTransforms||[],views:n.views||{},viewPropsTransformers:n.viewPropsTransformers||[],isPropsValid:n.isPropsValid||null,externalDefTransforms:n.externalDefTransforms||[],viewContainerAppends:n.viewContainerAppends||[],eventDropTransformers:n.eventDropTransformers||[],componentInteractions:n.componentInteractions||[],calendarInteractions:n.calendarInteractions||[],themeClasses:n.themeClasses||{},eventSourceDefs:n.eventSourceDefs||[],cmdFormatter:n.cmdFormatter,recurringTypes:n.recurringTypes||[],namedTimeZonedImpl:n.namedTimeZonedImpl,initialView:n.initialView||"",elementDraggingImpl:n.elementDraggingImpl,optionChangeHandlers:n.optionChangeHandlers||{},scrollGridImpl:n.scrollGridImpl||null,listenerRefiners:n.listenerRefiners||{},optionRefiners:n.optionRefiners||{},propSetHandlers:n.propSetHandlers||{}}}function nTe(n,t){let r={},e={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(o){for(let a of o){let s=a.name,c=r[s];c===void 0?(r[s]=a.id,i(a.deps),e=oTe(e,a)):c!==a.id&&console.warn(`Duplicate plugin '${s}'`)}}return n&&i(n),i(t),e}function rTe(){let n=[],t=[],r;return(e,i)=>((!r||!Pp(e,n)||!Pp(i,t))&&(r=nTe(e,i)),n=e,t=i,r)}function oTe(n,t){return{premiumReleaseDate:aTe(n.premiumReleaseDate,t.premiumReleaseDate),reducers:n.reducers.concat(t.reducers),isLoadingFuncs:n.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:n.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},n.eventRefiners),t.eventRefiners),eventDefMemberAdders:n.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},n.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:n.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:n.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:n.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:n.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:n.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:n.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},n.views),t.views),viewPropsTransformers:n.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||n.isPropsValid,externalDefTransforms:n.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:n.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:n.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:n.calendarInteractions.concat(t.calendarInteractions),componentInteractions:n.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},n.themeClasses),t.themeClasses),eventSourceDefs:n.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||n.cmdFormatter,recurringTypes:n.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||n.namedTimeZonedImpl,initialView:n.initialView||t.initialView,elementDraggingImpl:n.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},n.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||n.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},n.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},n.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},n.propSetHandlers),t.propSetHandlers)}}function aTe(n,t){return n===void 0?t:t===void 0?n:new Date(Math.max(n.valueOf(),t.valueOf()))}var Fp=class extends tu{};Fp.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};Fp.prototype.baseIconClass="fc-icon";Fp.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"};Fp.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};Fp.prototype.iconOverrideOption="buttonIcons";Fp.prototype.iconOverrideCustomButtonOption="icon";Fp.prototype.iconOverridePrefix="fc-icon-";function sTe(n,t){let r={},e;for(e in n)F3(e,r,n,t);for(e in t)F3(e,r,n,t);return r}function F3(n,t,r,e){if(t[n])return t[n];let i=lTe(n,t,r,e);return i&&(t[n]=i),i}function lTe(n,t,r,e){let i=r[n],o=e[n],a=f=>i&&i[f]!==null?i[f]:o&&o[f]!==null?o[f]:null,s=a("component"),c=a("superType"),u=null;if(c){if(c===n)throw new Error("Can't have a custom view type that references itself");u=F3(c,t,r,e)}return!s&&u&&(s=u.component),s?{type:n,component:s,defaults:Object.assign(Object.assign({},u?u.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},u?u.overrides:{}),o?o.rawOptions:{})}:null}function VW(n){return Ap(n,cTe)}function cTe(n){let t=typeof n=="function"?{component:n}:n,{component:r}=t;return t.content?r=LW(t):r&&!(r.prototype instanceof ha)&&(r=LW(Object.assign(Object.assign({},t),{content:r}))),{superType:t.type,component:r,rawOptions:t}}function LW(n){return t=>Qt(Rp.Consumer,null,r=>Qt(kd,{elTag:"div",elClasses:_3(r.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:r.options.nextDayThreshold}),generatorName:void 0,customGenerator:n.content,classNameGenerator:n.classNames,didMount:n.didMount,willUnmount:n.willUnmount}))}function dTe(n,t,r,e){let i=VW(n),o=VW(t.views),a=sTe(i,o);return Ap(a,s=>pTe(s,o,t,r,e))}function pTe(n,t,r,e,i){let o=n.overrides.duration||n.defaults.duration||e.duration||r.duration,a=null,s="",c="",u={};if(o&&(a=mTe(o),a)){let I=Z1(a);s=I.unit,I.value===1&&(c=s,u=t[s]?t[s].rawOptions:{})}let f=I=>{let S=I.buttonText||{},F=n.defaults.buttonTextKey;return F!=null&&S[F]!=null?S[F]:S[n.type]!=null?S[n.type]:S[c]!=null?S[c]:null},_=I=>{let S=I.buttonHints||{},F=n.defaults.buttonTextKey;return F!=null&&S[F]!=null?S[F]:S[n.type]!=null?S[n.type]:S[c]!=null?S[c]:null};return{type:n.type,component:n.component,duration:a,durationUnit:s,singleUnit:c,optionDefaults:n.defaults,optionOverrides:Object.assign(Object.assign({},u),n.overrides),buttonTextOverride:f(e)||f(r)||n.overrides.buttonText,buttonTextDefault:f(i)||n.defaults.buttonText||f(T0)||n.type,buttonTitleOverride:_(e)||_(r)||n.overrides.buttonHint,buttonTitleDefault:_(i)||n.defaults.buttonHint||_(T0)}}var BW={};function mTe(n){let t=JSON.stringify(n),r=BW[t];return r===void 0&&(r=Xr(n),BW[t]=r),r}function uTe(n,t){switch(t.type){case"CHANGE_VIEW_TYPE":n=t.viewType}return n}function hTe(n,t){switch(t.type){case"SET_OPTION":return Object.assign(Object.assign({},n),{[t.optionName]:t.rawOptionValue});default:return n}}function fTe(n,t,r,e){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return e.build(t.dateMarker||r);case"CHANGE_DATE":return e.build(t.dateMarker);case"PREV":if(i=e.buildPrev(n,r),i.isValid)return i;break;case"NEXT":if(i=e.buildNext(n,r),i.isValid)return i;break}return n}function gTe(n,t,r){let e=t?t.activeRange:null;return YW({},xTe(n,r),e,r)}function bTe(n,t,r,e){let i=r?r.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return YW(n,t.sources,i,e);case"REMOVE_EVENT_SOURCE":return vTe(n,t.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?QW(n,i,e):n;case"FETCH_EVENT_SOURCES":return U3(n,t.sourceIds?f3(t.sourceIds):KW(n,e),i,t.isRefetch||!1,e);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return wTe(n,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return n}}function _Te(n,t,r){let e=t?t.activeRange:null;return U3(n,KW(n,r),e,!0,r)}function WW(n){for(let t in n)if(n[t].isFetching)return!0;return!1}function YW(n,t,r,e){let i={};for(let o of t)i[o.sourceId]=o;return r&&(i=QW(i,r,e)),Object.assign(Object.assign({},n),i)}function vTe(n,t){return eu(n,r=>r.sourceId!==t)}function QW(n,t,r){return U3(n,eu(n,e=>yTe(e,t,r)),t,!1,r)}function yTe(n,t,r){return XW(n,r)?!r.options.lazyFetching||!n.fetchRange||n.isFetching||t.start<n.fetchRange.start||t.end>n.fetchRange.end:!n.latestFetchId}function U3(n,t,r,e,i){let o={};for(let a in n){let s=n[a];t[a]?o[a]=CTe(s,r,e,i):o[a]=s}return o}function CTe(n,t,r,e){let{options:i,calendarApi:o}=e,a=e.pluginHooks.eventSourceDefs[n.sourceDefId],s=iu();return a.fetch({eventSource:n,range:t,isRefetch:r,context:e},c=>{let{rawEvents:u}=c;i.eventSourceSuccess&&(u=i.eventSourceSuccess.call(o,u,c.response)||u),n.success&&(u=n.success.call(o,u,c.response)||u),e.dispatch({type:"RECEIVE_EVENTS",sourceId:n.sourceId,fetchId:s,fetchRange:t,rawEvents:u})},c=>{let u=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(o,c),u=!0),n.failure&&(n.failure(c),u=!0),u||console.warn(c.message,c),e.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:n.sourceId,fetchId:s,fetchRange:t,error:c})}),Object.assign(Object.assign({},n),{isFetching:!0,latestFetchId:s})}function wTe(n,t,r,e){let i=n[t];return i&&r===i.latestFetchId?Object.assign(Object.assign({},n),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:e})}):n}function KW(n,t){return eu(n,r=>XW(r,t))}function xTe(n,t){let r=x3(t),e=[].concat(n.eventSources||[]),i=[];n.initialEvents&&e.unshift(n.initialEvents),n.events&&e.unshift(n.events);for(let o of e){let a=w3(o,t,r);a&&i.push(a)}return i}function XW(n,t){return!t.pluginHooks.eventSourceDefs[n.sourceDefId].ignoreRange}function STe(n,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return n}}function TTe(n,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return n}}function ETe(n,t){let r;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return r=t.state,{affectedEvents:r.affectedEvents,mutatedEvents:r.mutatedEvents,isEvent:r.isEvent};default:return n}}function ITe(n,t){let r;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return r=t.state,{affectedEvents:r.affectedEvents,mutatedEvents:r.mutatedEvents,isEvent:r.isEvent};default:return n}}function kTe(n,t,r,e,i){let o=n.headerToolbar?jW(n.headerToolbar,n,t,r,e,i):null,a=n.footerToolbar?jW(n.footerToolbar,n,t,r,e,i):null;return{header:o,footer:a}}function jW(n,t,r,e,i,o){let a={},s=[],c=!1;for(let u in n){let f=n[u],_=DTe(f,t,r,e,i,o);a[u]=_.widgets,s.push(..._.viewsWithButtons),c=c||_.hasTitle}return{sectionWidgets:a,viewsWithButtons:s,hasTitle:c}}function DTe(n,t,r,e,i,o){let a=t.direction==="rtl",s=t.customButtons||{},c=r.buttonText||{},u=t.buttonText||{},f=r.buttonHints||{},_=t.buttonHints||{},I=n?n.split(" "):[],S=[],F=!1;return{widgets:I.map(q=>q.split(",").map(ee=>{if(ee==="title")return F=!0,{buttonName:ee};let Ie,He,Le,qe,ue,Ne;if(Ie=s[ee])Le=st=>{Ie.click&&Ie.click.call(st.target,st,st.target)},(qe=e.getCustomButtonIconClass(Ie))||(qe=e.getIconClass(ee,a))||(ue=Ie.text),Ne=Ie.hint||Ie.text;else if(He=i[ee]){S.push(ee),Le=()=>{o.changeView(ee)},(ue=He.buttonTextOverride)||(qe=e.getIconClass(ee,a))||(ue=He.buttonTextDefault);let st=He.buttonTextOverride||He.buttonTextDefault;Ne=ty(He.buttonTitleOverride||He.buttonTitleDefault||t.viewHint,[st,ee],st)}else if(o[ee])if(Le=()=>{o[ee]()},(ue=c[ee])||(qe=e.getIconClass(ee,a))||(ue=u[ee]),ee==="prevYear"||ee==="nextYear"){let st=ee==="prevYear"?"prev":"next";Ne=ty(f[st]||_[st],[u.year||"year","year"],u[ee])}else Ne=st=>ty(f[ee]||_[ee],[u[st]||st,st],u[ee]);return{buttonName:ee,buttonClick:Le,buttonIcon:qe,buttonText:ue,buttonHint:Ne}})),viewsWithButtons:S,hasTitle:F}}var N3=class{constructor(t,r,e){this.type=t,this.getCurrentData=r,this.dateEnv=e}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(t){return this.getCurrentData().options[t]}},MTe={ignoreRange:!0,parseMeta(n){return Array.isArray(n.events)?n.events:null},fetch(n,t){t({rawEvents:n.eventSource.meta})}},ATe=oy({name:"array-event-source",eventSourceDefs:[MTe]}),OTe={parseMeta(n){return typeof n.events=="function"?n.events:null},fetch(n,t,r){let{dateEnv:e}=n.context,i=n.eventSource.meta;k3(i.bind(null,I3(n.range,e)),o=>t({rawEvents:o}),r)}},PTe=oy({name:"func-event-source",eventSourceDefs:[OTe]}),RTe={method:String,extraParams:rt,startParam:String,endParam:String,timeZoneParam:String},FTe={parseMeta(n){return n.url&&(n.format==="json"||!n.format)?{url:n.url,format:"json",method:(n.method||"GET").toUpperCase(),extraParams:n.extraParams,startParam:n.startParam,endParam:n.endParam,timeZoneParam:n.timeZoneParam}:null},fetch(n,t,r){let{meta:e}=n.eventSource,i=VTe(e,n.range,n.context);D3(e.method,e.url,i).then(([o,a])=>{t({rawEvents:o,response:a})},r)}},NTe=oy({name:"json-event-source",eventSourceRefiners:RTe,eventSourceDefs:[FTe]});function VTe(n,t,r){let{dateEnv:e,options:i}=r,o,a,s,c,u={};return o=n.startParam,o==null&&(o=i.startParam),a=n.endParam,a==null&&(a=i.endParam),s=n.timeZoneParam,s==null&&(s=i.timeZoneParam),typeof n.extraParams=="function"?c=n.extraParams():c=n.extraParams||{},Object.assign(u,c),u[o]=e.formatIso(t.start),u[a]=e.formatIso(t.end),e.timeZone!=="local"&&(u[s]=e.timeZone),u}var LTe={daysOfWeek:rt,startTime:Xr,endTime:Xr,duration:Xr,startRecur:rt,endRecur:rt},BTe={parse(n,t){if(n.daysOfWeek||n.startTime||n.endTime||n.startRecur||n.endRecur){let r={daysOfWeek:n.daysOfWeek||null,startTime:n.startTime||null,endTime:n.endTime||null,startRecur:n.startRecur?t.createMarker(n.startRecur):null,endRecur:n.endRecur?t.createMarker(n.endRecur):null},e;return n.duration&&(e=n.duration),!e&&n.startTime&&n.endTime&&(e=Vq(n.endTime,n.startTime)),{allDayGuess:!n.startTime&&!n.endTime,duration:e,typeData:r}}return null},expand(n,t,r){let e=x0(t,{start:n.startRecur,end:n.endRecur});return e?GTe(n.daysOfWeek,n.startTime,e,r):[]}},jTe=oy({name:"simple-recurring-event",recurringTypes:[BTe],eventRefiners:LTe});function GTe(n,t,r,e){let i=n?f3(n):null,o=Io(r.start),a=r.end,s=[];for(;o<a;){let c;(!i||i[o.getUTCDay()])&&(t?c=e.add(o,t):c=o,s.push(c)),o=tl(o,1)}return s}var zTe=oy({name:"change-handler",optionChangeHandlers:{events(n,t){GW([n],t)},eventSources:GW}});function GW(n,t){let r=hD(t.getCurrentData().eventSources);if(r.length===1&&n.length===1&&Array.isArray(r[0]._raw)&&Array.isArray(n[0])){t.dispatch({type:"RESET_RAW_EVENTS",sourceId:r[0].sourceId,rawEvents:n[0]});return}let e=[];for(let i of n){let o=!1;for(let a=0;a<r.length;a+=1)if(r[a]._raw===i){r.splice(a,1),o=!0;break}o||e.push(i)}for(let i of r)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of e)t.calendarApi.addEventSource(i)}function $Te(n,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},I3(n.activeRange,t.dateEnv)),{view:t.viewApi}))}function UTe(n,t){let{emitter:r}=t;r.hasHandlers("eventsSet")&&r.trigger("eventsSet",ux(n,t))}var HTe=[ATe,PTe,NTe,jTe,zTe,oy({name:"misc",isLoadingFuncs:[n=>WW(n.eventSources)],propSetHandlers:{dateProfile:$Te,eventStore:UTe}})],V3=class{constructor(t,r){this.runTaskOption=t,this.drainedOption=r,this.queue=[],this.delayedRunner=new w0(this.drain.bind(this))}request(t,r){this.queue.push(t),this.delayedRunner.request(r)}pause(t){this.delayedRunner.pause(t)}resume(t,r){this.delayedRunner.resume(t,r)}drain(){let{queue:t}=this;for(;t.length;){let r=[],e;for(;e=t.shift();)this.runTask(e),r.push(e);this.drained(r)}}runTask(t){this.runTaskOption&&this.runTaskOption(t)}drained(t){this.drainedOption&&this.drainedOption(t)}};function qTe(n,t,r){let e;return/^(year|month)$/.test(n.currentRangeUnit)?e=n.currentRange:e=n.activeRange,r.formatRange(e.start,e.end,os(t.titleFormat||WTe(n)),{isEndExclusive:n.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function WTe(n){let{currentRangeUnit:t}=n;if(t==="year")return{year:"numeric"};if(t==="month")return{year:"numeric",month:"long"};let r=Zv(n.currentRange.start,n.currentRange.end);return r!==null&&r>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}var L3=class{constructor(t){this.computeCurrentViewData=Yr(this._computeCurrentViewData),this.organizeRawLocales=Yr(eTe),this.buildLocale=Yr(HW),this.buildPluginHooks=rTe(),this.buildDateEnv=Yr(YTe),this.buildTheme=Yr(QTe),this.parseToolbars=Yr(kTe),this.buildViewSpecs=Yr(dTe),this.buildDateProfileGenerator=iy(KTe),this.buildViewApi=Yr(XTe),this.buildViewUiProps=iy(eEe),this.buildEventUiBySource=Yr(ZTe,Op),this.buildEventUiBases=Yr(JTe),this.parseContextBusinessHours=iy(tEe),this.buildTitle=Yr(qTe),this.emitter=new Jv,this.actionRunner=new V3(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=I=>{this.actionRunner.request(I)},this.props=t,this.actionRunner.pause();let r={},e=this.computeOptionsData(t.optionOverrides,r,t.calendarApi),i=e.calendarOptions.initialView||e.pluginHooks.initialView,o=this.computeCurrentViewData(i,e,t.optionOverrides,r);t.calendarApi.currentDataManager=this,this.emitter.setThisContext(t.calendarApi),this.emitter.setOptions(o.options);let a=Kq(e.calendarOptions,e.dateEnv),s=o.dateProfileGenerator.build(a);Mp(s.activeRange,a)||(a=s.currentRange.start);let c={dateEnv:e.dateEnv,options:e.calendarOptions,pluginHooks:e.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let I of e.pluginHooks.contextInit)I(c);let u=gTe(e.calendarOptions,s,c),f={dynamicOptionOverrides:r,currentViewType:i,currentDate:a,dateProfile:s,businessHours:this.parseContextBusinessHours(c),eventSources:u,eventUiBases:{},eventStore:Dd(),renderableEventStore:Dd(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(c).selectionConfig},_=Object.assign(Object.assign({},c),f);for(let I of e.pluginHooks.reducers)Object.assign(f,I(null,null,_));R3(f,c)&&this.emitter.trigger("loading",!0),this.state=f,this.updateData(),this.actionRunner.resume()}resetOptions(t,r){let{props:e}=this;r===void 0?e.optionOverrides=t:(e.optionOverrides=Object.assign(Object.assign({},e.optionOverrides||{}),t),this.optionsForRefining.push(...r)),(r===void 0||r.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(t){let{props:r,state:e,emitter:i}=this,o=hTe(e.dynamicOptionOverrides,t),a=this.computeOptionsData(r.optionOverrides,o,r.calendarApi),s=uTe(e.currentViewType,t),c=this.computeCurrentViewData(s,a,r.optionOverrides,o);r.calendarApi.currentDataManager=this,i.setThisContext(r.calendarApi),i.setOptions(c.options);let u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:r.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:f,dateProfile:_}=e;this.data&&this.data.dateProfileGenerator!==c.dateProfileGenerator&&(_=c.dateProfileGenerator.build(f)),f=Qq(f,t),_=fTe(_,t,f,c.dateProfileGenerator),(t.type==="PREV"||t.type==="NEXT"||!Mp(_.currentRange,f))&&(f=_.currentRange.start);let I=bTe(e.eventSources,t,_,u),S=eW(e.eventStore,t,I,_,u),H=WW(I)&&!c.options.progressiveEventRendering&&e.renderableEventStore||S,{eventUiSingleBase:q,selectionConfig:ee}=this.buildViewUiProps(u),Ie=this.buildEventUiBySource(I),He=this.buildEventUiBases(H.defs,q,Ie),Le={dynamicOptionOverrides:o,currentViewType:s,currentDate:f,dateProfile:_,eventSources:I,eventStore:S,renderableEventStore:H,selectionConfig:ee,eventUiBases:He,businessHours:this.parseContextBusinessHours(u),dateSelection:STe(e.dateSelection,t),eventSelection:TTe(e.eventSelection,t),eventDrag:ETe(e.eventDrag,t),eventResize:ITe(e.eventResize,t)},qe=Object.assign(Object.assign({},u),Le);for(let st of a.pluginHooks.reducers)Object.assign(Le,st(e,t,qe));let ue=R3(e,u),Ne=R3(Le,u);!ue&&Ne?i.trigger("loading",!0):ue&&!Ne&&i.trigger("loading",!1),this.state=Le,r.onAction&&r.onAction(t)}updateData(){let{props:t,state:r}=this,e=this.data,i=this.computeOptionsData(t.optionOverrides,r.dynamicOptionOverrides,t.calendarApi),o=this.computeCurrentViewData(r.currentViewType,i,t.optionOverrides,r.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(r.dateProfile,o.options,i.dateEnv),calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),o),r),s=i.pluginHooks.optionChangeHandlers,c=e&&e.calendarOptions,u=i.calendarOptions;if(c&&c!==u){c.timeZone!==u.timeZone&&(r.eventSources=a.eventSources=_Te(a.eventSources,r.dateProfile,a),r.eventStore=a.eventStore=S3(a.eventStore,e.dateEnv,a.dateEnv),r.renderableEventStore=a.renderableEventStore=S3(a.renderableEventStore,e.dateEnv,a.dateEnv));for(let f in s)(this.optionsForHandling.indexOf(f)!==-1||c[f]!==u[f])&&s[f](u[f],a)}this.optionsForHandling=[],t.onData&&t.onData(a)}computeOptionsData(t,r,e){if(!this.optionsForRefining.length&&t===this.stableOptionOverrides&&r===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:o,localeDefaults:a,availableLocaleData:s,extra:c}=this.processRawCalendarOptions(t,r);zW(c);let u=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,s,i.defaultRangeSeparator),f=this.buildViewSpecs(o.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),_=this.buildTheme(i,o),I=this.parseToolbars(i,this.stableOptionOverrides,_,f,e);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:o,dateEnv:u,viewSpecs:f,theme:_,toolbarConfig:I,localeDefaults:a,availableRawLocales:s.map}}processRawCalendarOptions(t,r){let{locales:e,locale:i}=pD([T0,t,r]),o=this.organizeRawLocales(e),a=o.map,s=this.buildLocale(i||o.defaultCode,a).options,c=this.buildPluginHooks(t.plugins||[],HTe),u=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m3),u3),h3),c.listenerRefiners),c.optionRefiners),f={},_=pD([T0,s,t,r]),I={},S=this.currentCalendarOptionsInput,F=this.currentCalendarOptionsRefined,H=!1;for(let q in _)this.optionsForRefining.indexOf(q)===-1&&(_[q]===S[q]||Fh[q]&&q in S&&Fh[q](S[q],_[q]))?I[q]=F[q]:u[q]?(I[q]=u[q](_[q]),H=!0):f[q]=S[q];return H&&(this.currentCalendarOptionsInput=_,this.currentCalendarOptionsRefined=I,this.stableOptionOverrides=t,this.stableDynamicOptionOverrides=r),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:c,availableLocaleData:o,localeDefaults:s,extra:f}}_computeCurrentViewData(t,r,e,i){let o=r.viewSpecs[t];if(!o)throw new Error(`viewType "${t}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:s}=this.processRawViewOptions(o,r.pluginHooks,r.localeDefaults,e,i);zW(s);let c=this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:r.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),u=this.buildViewApi(t,this.getCurrentData,r.dateEnv);return{viewSpec:o,options:a,dateProfileGenerator:c,viewApi:u}}processRawViewOptions(t,r,e,i,o){let a=pD([T0,t.optionDefaults,e,i,t.optionOverrides,o]),s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m3),u3),h3),Gq),r.listenerRefiners),r.optionRefiners),c={},u=this.currentViewOptionsInput,f=this.currentViewOptionsRefined,_=!1,I={};for(let S in a)a[S]===u[S]||Fh[S]&&Fh[S](a[S],u[S])?c[S]=f[S]:(a[S]===this.currentCalendarOptionsInput[S]||Fh[S]&&Fh[S](a[S],this.currentCalendarOptionsInput[S])?S in this.currentCalendarOptionsRefined&&(c[S]=this.currentCalendarOptionsRefined[S]):s[S]?c[S]=s[S](a[S]):I[S]=a[S],_=!0);return _&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=c),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:I}}};function YTe(n,t,r,e,i,o,a,s){let c=HW(t||a.defaultCode,a.map);return new J1({calendarSystem:"gregory",timeZone:n,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:c,weekNumberCalculation:r,firstDay:e,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:s})}function QTe(n,t){let r=t.themeClasses[n.themeSystem]||Fp;return new r(n)}function KTe(n){let t=n.dateProfileGeneratorClass||ix;return new t(n)}function XTe(n,t,r){return new N3(n,t,r)}function ZTe(n){return Ap(n,t=>t.ui)}function JTe(n,t,r){let e={"":t};for(let i in n){let o=n[i];o.sourceId&&r[o.sourceId]&&(e[i]=r[o.sourceId])}return e}function eEe(n){let{options:t}=n;return{eventUiSingleBase:ry({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap=="boolean"?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroun
vendor: 8,849 bytes, line 196
196dColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},n),selectionConfig:ry({constraint:t.selectConstraint,overlap:typeof t.selectOverlap=="boolean"?t.selectOverlap:void 0,allow:t.selectAllow},n)}}function R3(n,t){for(let r of t.pluginHooks.isLoadingFuncs)if(r(n))return!0;return!1}function tEe(n){return T3(n.options.businessHours,n)}function zW(n,t){for(let r in n)console.warn(`Unknown option '${r}'`+(t?` for view '${t}'`:""))}var B3=class extends ha{render(){let t=this.props.widgetGroups.map(r=>this.renderWidgetGroup(r));return Qt("div",{className:"fc-toolbar-chunk"},...t)}renderWidgetGroup(t){let{props:r}=this,{theme:e}=this.context,i=[],o=!0;for(let a of t){let{buttonName:s,buttonClick:c,buttonText:u,buttonIcon:f,buttonHint:_}=a;if(s==="title")o=!1,i.push(Qt("h2",{className:"fc-toolbar-title",id:r.titleId},r.title));else{let I=s===r.activeButton,S=!r.isTodayEnabled&&s==="today"||!r.isPrevEnabled&&s==="prev"||!r.isNextEnabled&&s==="next",F=[`fc-${s}-button`,e.getClass("button")];I&&F.push(e.getClass("buttonActive")),i.push(Qt("button",{type:"button",title:typeof _=="function"?_(r.navUnit):_,disabled:S,"aria-pressed":I,className:F.join(" "),onClick:c},u||(f?Qt("span",{className:f,role:"img"}):"")))}}if(i.length>1){let a=o&&e.getClass("buttonGroup")||"";return Qt("div",{className:a},...i)}return i[0]}},xD=class extends ha{render(){let{model:t,extraClassName:r}=this.props,e=!1,i,o,a=t.sectionWidgets,s=a.center;return a.left?(e=!0,i=a.left):i=a.start,a.right?(e=!0,o=a.right):o=a.end,Qt("div",{className:[r||"","fc-toolbar",e?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",s||[]),this.renderSection("end",o||[]))}renderSection(t,r){let{props:e}=this;return Qt(B3,{key:t,widgetGroups:r,title:e.title,navUnit:e.navUnit,activeButton:e.activeButton,isTodayEnabled:e.isTodayEnabled,isPrevEnabled:e.isPrevEnabled,isNextEnabled:e.isNextEnabled,titleId:e.titleId})}},j3=class extends ha{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=t=>{this.el=t,nu(this.props.elRef,t),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:t,state:r}=this,{aspectRatio:e}=t,i=["fc-view-harness",e||t.liquid||t.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",a="";return e?r.availableWidth!==null?o=r.availableWidth/e:a=`${1/e*100}%`:o=t.height||"",Qt("div",{"aria-labelledby":t.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:o,paddingBottom:a}},t.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},G3=class extends ey{constructor(t){super(t),this.handleSegClick=(r,e)=>{let{component:i}=this,{context:o}=i,a=hx(e);if(a&&i.isValidSegDownEl(r.target)){let s=Id(r.target,".fc-event-forced-url"),c=s?s.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:e,event:new La(i.context,a.eventRange.def,a.eventRange.instance),jsEvent:r,view:o.viewApi}),c&&!r.defaultPrevented&&(window.location.href=c)}},this.destroy=l3(t.el,"click",".fc-event",this.handleSegClick)}},z3=class extends ey{constructor(t){super(t),this.handleEventElRemove=r=>{r===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(r,e)=>{hx(e)&&(this.currentSegEl=e,this.triggerEvent("eventMouseEnter",r,e))},this.handleSegLeave=(r,e)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",r,e))},this.removeHoverListeners=Aq(t.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(t,r,e){let{component:i}=this,{context:o}=i,a=hx(e);(!r||i.isValidSegDownEl(r.target))&&o.emitter.trigger(t,{el:e,event:new La(o,a.eventRange.def,a.eventRange.instance),jsEvent:r,view:o.viewApi})}},$3=class extends mx{constructor(){super(...arguments),this.buildViewContext=Yr(qq),this.buildViewPropTransformers=Yr(nEe),this.buildToolbarProps=Yr(iEe),this.headerRef=Y1(),this.footerRef=Y1(),this.interactionsStore={},this.state={viewLabelId:dx()},this.registerInteractiveComponent=(t,r)=>{let e=dW(t,r),a=[G3,z3].concat(this.props.pluginHooks.componentInteractions).map(s=>new s(e));this.interactionsStore[t.uid]=a,CD[t.uid]=e},this.unregisterInteractiveComponent=t=>{let r=this.interactionsStore[t.uid];if(r){for(let e of r)e.destroy();delete this.interactionsStore[t.uid]}delete CD[t.uid]},this.resizeRunner=new w0(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=t=>{let{options:r}=this.props;r.handleWindowResize&&t.target===window&&this.resizeRunner.request(r.windowResizeDelay)}}render(){let{props:t}=this,{toolbarConfig:r,options:e}=t,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,ny(t.options.now,t.dateEnv),t.viewTitle),o=!1,a="",s;t.isHeightAuto||t.forPrint?a="":e.height!=null?o=!0:e.contentHeight!=null?a=e.contentHeight:s=Math.max(e.aspectRatio,.5);let c=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),u=r.header&&r.header.hasTitle?this.state.viewLabelId:void 0;return Qt(Rp.Provider,{value:c},r.header&&Qt(xD,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:r.header,titleId:u},i)),Qt(j3,{liquid:o,height:a,aspectRatio:s,labeledById:u},this.renderView(t),this.buildAppendContent()),r.footer&&Qt(xD,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:r.footer,titleId:""},i)))}componentDidMount(){let{props:t}=this;this.calendarInteractions=t.pluginHooks.calendarInteractions.map(e=>new e(t)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:r}=t.pluginHooks;for(let e in r)r[e](t[e],t)}componentDidUpdate(t){let{props:r}=this,{propSetHandlers:e}=r.pluginHooks;for(let i in e)r[i]!==t[i]&&e[i](r[i],r)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let t of this.calendarInteractions)t.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:t}=this,r=t.pluginHooks.viewContainerAppends.map(e=>e(t));return Qt(el,{},...r)}renderView(t){let{pluginHooks:r}=t,{viewSpec:e}=t,i={dateProfile:t.dateProfile,businessHours:t.businessHours,eventStore:t.renderableEventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isHeightAuto:t.isHeightAuto,forPrint:t.forPrint},o=this.buildViewPropTransformers(r.viewPropsTransformers);for(let s of o)Object.assign(i,s.transform(i,t));let a=e.component;return Qt(a,Object.assign({},i))}};function iEe(n,t,r,e,i,o){let a=r.build(i,void 0,!1),s=r.buildPrev(t,e,!1),c=r.buildNext(t,e,!1);return{title:o,activeButton:n.type,navUnit:n.singleUnit,isTodayEnabled:a.isValid&&!Mp(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function nEe(n){return n.map(t=>new t)}var SD=class extends ox{constructor(t,r={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;ex(()=>{Dh(Qt(rx,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(i,o,a,s)=>(this.setClassNames(i),this.setHeight(o),Qt(b3.Provider,{value:this.customContentRenderId},Qt($3,Object.assign({isHeightAuto:a,forPrint:s},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Dh(null,this.el),this.setClassNames([]),this.setHeight(""))},Tq(t),this.el=t,this.renderRunner=new w0(this.handleRenderRequest),new L3({optionOverrides:r,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let t=this.isRendering;t?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),t&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){ex(()=>{super.updateSize()})}batchRendering(t){this.renderRunner.pause("batchRendering"),t(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(t,r){this.currentDataManager.resetOptions(t,r)}setClassNames(t){if(!Pp(t,this.currentClassNames)){let{classList:r}=this.el;
196for(let e of this.currentClassNames)r.remove(e);for(let e of t)r.add(e);this.currentClassNames=t}}setHeight(t){s3(this.el,"height",t)}};y();var rEe=["*"],oEe=["rootEl"],sy=n=>({$implicit:n});function aEe(n,t){if(n&1&&(d(0,"div",2,0),Ti(2,3),p()),n&2){let r=b();m("ngClass",r.elClasses||"")("ngStyle",r.elStyle||null),l(2),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Xe(4,sy,r.renderProps))}}function sEe(n,t){if(n&1&&(d(0,"span",2,0),Ti(2,3),p()),n&2){let r=b();m("ngClass",r.elClasses||"")("ngStyle",r.elStyle||null),l(2),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Xe(4,sy,r.renderProps))}}function lEe(n,t){if(n&1&&(d(0,"a",2,0),Ti(2,3),p()),n&2){let r=b();m("ngClass",r.elClasses||"")("ngStyle",r.elStyle||null),l(2),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Xe(4,sy,r.renderProps))}}function cEe(n,t){if(n&1&&(d(0,"tr",2,0),Ti(2,3),p()),n&2){let r=b();m("ngClass",r.elClasses||"")("ngStyle",r.elStyle||null),l(2),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Xe(4,sy,r.renderProps))}}function dEe(n,t){if(n&1&&(d(0,"th",2,0),Ti(2,3),p()),n&2){let r=b
196();m("ngClass",r.elClasses||"")("ngStyle",r.elStyle||null),l(2),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Xe(4,sy,r.renderProps))}}function pEe(n,t){if(n&1&&(d(0,"td",2,0),Ti(2,3),p()),n&2){let r=b();m("ngClass",r.elClasses||"")("ngStyle",r.elStyle||null),l(2),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Xe(4,sy,r.renderProps))}}var mEe=["dayHeaderContent"],uEe=["dayCellContent"],hEe=["weekNumberContent"],fEe=["nowIndicatorContent"],gEe=["eventContent"],bEe=["slotLaneContent"],_Ee=["slotLabelContent"],vEe=["allDayContent"],yEe=["moreLinkContent"],CEe=["noEventsContent"],wEe=["resourceAreaHeaderContent"],xEe=["resourceGroupLabelContent"],SEe=["resourceLabelContent"],TEe=["resourceLaneContent"],EEe=["resourceGroupLaneContent"];function IEe(n,t){if(n&1&&O(0,"transport-container",1),n&2){let r=t.$implicit,e=b();m("inPlaceOf",r.containerEl)("reportEl",r.reportNewContainerEl)("elTag",r.elTag)("elClasses",r.elClasses)("elStyle",r.elStyle)("elAttrs",r.elAttrs)("template",e.templateMap[r.generatorName])("renderProps",r.renderProps)}}var ZW={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},kEe=["events","eventSources","resources"],DEe=Object.prototype.hasOwnProperty;function ED(n){return Array.isArray(n)?n.map(ED):n instanceof Date?new Date(n.valueOf()):typeof n=="object"&&n?t9(n,ED):n}function t9(n,t){let r={};for(let e in n)DEe.call(n,e)&&(r[e]=t(n[e],e));return r}function q3(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){if(n.constructor!==t.constructor)return!1;var r,e,i;if(Array.isArray(n)){if(r=n.length,r!=t.length)return!1;for(e=r;e--!==0;)if(!q3(n[e],t[e]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if(i=Object.keys(n),r=i.length,r!==Object.keys(t).length)return!1;for(e=r;e--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[e]))return!1;for(e=r;e--!==0;){var o=i[e];if(!q3(n[o],t[o]))return!1}return!0}return n!==n&&t!==t}var TD=typeof document<"u"?document.createDocumentFragment():null,i9=(()=>{class n{constructor(r){this.element=r}ngAfterViewInit(){TD&&TD.appendChild(this.element.nativeElement)}ngOnDestroy(){TD&&TD.removeChild(this.element.nativeElement)}}return n.\u0275fac=function(r){return new(r||n)(h(ge))},n.\u0275cmp=L({type:n,selectors:[["offscreen-fragment"]],ngContentSelectors:rEe,decls:1,vars:0,template:function(r,e){r&1&&(Ct(),Fe(0))},encapsulation:2}),n})(),ay=typeof document<"u"?document.createDocumentFragment():null,n9=(()=>{class n{ngAfterViewInit(){let r=this.rootElRef?.nativeElement;JW(r,this.inPlaceOf),H3(r,void 0,this.elAttrs),this.inPlaceOf.style.display="none",this.reportEl(r)}ngOnChanges(r){let e=this.rootElRef?.nativeElement;if(e)if(this.inPlaceOf.parentNode!==ay)JW(e,this.inPlaceOf),H3(e,void 0,this.elAttrs),this.reportEl(e);else{let i=r.elAttrs;i&&H3(e,i.previousValue,i.currentValue)}}ngOnDestroy(){this.inPlaceOf.parentNode===ay&&ay&&ay.removeChild(this.inPlaceOf),this.reportEl(null)}}return n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=L({type:n,selectors:[["transport-container"]],viewQuery:function(r,e){if(r&1&&ae(oEe,5),r&2){let i;Q(i=K())&&(e.rootElRef=i.first)}},inputs:{inPlaceOf:"inPlaceOf",reportEl:"reportEl",elTag:"elTag",elClasses:"elClasses",elStyle:"elStyle",elAttrs:"elAttrs",template:"template",renderProps:"renderProps"},features:[lt],decls:6,vars:6,consts:[["rootEl",""],[3,"ngIf"],[3,"ngClass","ngStyle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,e){r&1&&x(0,aEe,3,6,"ng-template",1)(1,sEe,3,6,"ng-template",1)(2,lEe,3,6,"ng-template",1)(3,cEe,3,6,"ng-template",1)(4,dEe,3,6,"ng-template",1)(5,pEe,3,6,"ng-template",1),r&2&&(m("ngIf",e.elTag=="div"),l(),m("ngIf",e.elTag=="span"),l(),m("ngIf",e.elTag=="a"),l(),m("ngIf",e.elTag=="tr"),l(),m("ngIf",e.elTag=="th"),l(),m("ngIf",e.elTag=="td"))},dependencies:[ce,ac,xu,fo],encapsulation:2}),n})();function JW(n,t){t.parentNode?.insertBefore(n,t.nextSibling),ay&&ay.appendChild(t)}function H3(n,t={},r={}){for(let e in t)e in r||(n[e]=null);for(let e in r)n[e]=r[e]}var e9=(()=>{class n{constructor(r,e){this.element=r,this.calendar=null,this.optionSnapshot={},this.customRenderingMap=new Map,this.templateMap={};let i=new cx;i.subscribe(o=>{this.customRenderingMap=o,this.customRenderingArray=void 0,e.detectChanges()}),this.handleCustomRendering=i.handle.bind(i),this.templateMap=this}ngAfterViewInit(){let{deepChangeDetection:r}=this,e=re(re({},this.options),this.buildInputOptions());this.optionSnapshot=t9(e,(s,c)=>r&&ZW[c]?ED(s):s);let i=this.element.nativeElement,o=this.calendar=new SD(i,re(re({},e),this.buildExtraOptions())),a=i.closest("ion-content");a&&a.componentOnReady?a.componentOnReady().then(()=>{window.requestAnimationFrame(()=>{o.render()})}):o.render()}ngDoCheck(){if(this.calendar){let{deepChangeDetection:r,optionSnapshot:e}=this,i=re(re({},this.options),this.buildInputOptions()),o={},a=[];for(let c in i)if(i.hasOwnProperty(c)){let u=i[c];r&&ZW[c]?q3(e[c],u)||(e[c]=ED(u),a.push(c)):e[c]!==u&&(e[c]=u,a.push(c)),o[c]=u}let s=Object.keys(e);for(let c of s)c in i||(delete e[c],a.push(c));a.length&&(this.calendar.pauseRendering(),this.calendar.resetOptions(re(re({},o),this.buildExtraOptions()),a))}}ngAfterContentChecked(){this.calendar&&this.calendar.resumeRendering()}ngOnDestroy(){this.calendar&&(this.calendar.destroy(),this.calendar=null)}get customRenderings(){return this.customRenderingArray||(this.customRenderingArray=[...this.customRenderingMap.values()])}getApi(){return this.calendar}buildInputOptions(){let r={};for(let e of kEe){let i=this[e];i!=null&&(r[e]=i)}return r}buildExtraOptions(){return{handleCustomRendering:this.handleCustomRendering,customRenderingMetaMap:this.templateMap,customRenderingReplaces:!0}}trackCustomRendering(r,e){return e.id}}return n.\u0275fac=function(r){return new(r||n)(h(ge),h(Me))}
196,n.\u0275cmp=L({type:n,selectors:[["full-calendar"]],contentQueries:function(r,e,i){if(r&1&&(Zt(i,mEe,7),Zt(i,uEe,7),Zt(i,hEe,7),Zt(i,fEe,7),Zt(i,gEe,7),Zt(i,bEe,7),Zt(i,_Ee,7),Zt(i,vEe,7),Zt(i,yEe,7),Zt(i,CEe,7),Zt(i,wEe,7),Zt(i,xEe,7),Zt(i,SEe,7),Zt(i,TEe,7),Zt(i,EEe,7)),r&2){let o;Q(o=K())&&(e.dayHeaderContent=o.first),Q(o=K())&&(e.dayCellContent=o.first),Q(o=K())&&(e.weekNumberContent=o.first),Q(o=K())&&(e.nowIndicatorContent=o.first),Q(o=K())&&(e.eventContent=o.first),Q(o=K())&&(e.slotLaneContent=o.first),Q(o=K())&&(e.slotLabelContent=o.first),Q(o=K())&&(e.allDayContent=o.first),Q(o=K())&&(e.moreLinkContent=o.first),Q(o=K())&&(e.noEventsContent=o.first),Q(o=K())&&(e.resourceAreaHeaderContent=o.first),Q(o=K())&&(e.resourceGroupLabelContent=o.first),Q(o=K())&&(e.resourceLabelContent=o.first),Q(o=K())&&(e.resourceLaneContent=o.first),Q(o=K())&&(e.resourceGroupLaneContent=o.first)}},inputs:{options:"options",deepChangeDetection:"deepChangeDetection",events:"events",eventSources:"eventSources",resources:"resources"},decls:2,vars:2,consts:[[3,"inPlaceOf","reportEl","elTag","elClasses","elStyle","elAttrs","template","renderProps",4,"ngFor","ngForOf","ngForTrackBy"],[3,"inPlaceOf","reportEl","elTag","elClasses","elStyle","elAttrs","template","renderProps"]],template:function(r,e){r&1&&(d(0,"offscreen-fragment"),x(1,IEe,1,8,"transport-container",0),p()),r&2&&(l(),m("ngForOf",e.customRenderings)("ngForTrackBy",e.trackCustomRendering))},dependencies:[i9,n9,Ke],encapsulation:2}),n})(),fx=(()=>{class n{}return n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=Vt({type:n,declarations:[e9,i9,n9],imports:[zi],exports:[e9]}),n.\u0275inj=Nt({imports:[[zi]]}),n})();y();var l9=["move","copy","link"],kD="application/x-dnd",K3="application/json",DD="Text";function c9(n){return n.substr(0,kD.length)===kD}function d9(n){if(n.dataTransfer){let t=n.dataTransfer.types;if(!t)return DD;for(let r=0;r<t.length;r++)if(t[r]===DD||t[r]===K3||c9(t[r]))return t[r]}return null}function MEe(n,t,r){let e=kD+(t.type?"-"+t.type:""),i=JSON.stringify(t);try{n.dataTransfer?.setData(e,i)}catch{try{n.dataTransfer?.setData(K3,i)}catch{let s=ID(l9,r);n.dataTransfer&&(n.dataTransfer.effectAllowed=s[0]),n.dataTransfer?.setData(DD,i)}}}function AEe(n,t){let r=d9(n);return t===!0?r!==null&&c9(r)?JSON.parse(n.dataTransfer?.getData(r)??"{}"):{}:r!==null?JSON.parse(n.dataTransfer?.getData(r)??"{}"):{}}function ID(n,t){return t==="all"||t==="uninitialized"?n:n.filter(function(r){return t.toLowerCase().indexOf(r)!==-1})}function OEe(n,t){let r=t;for(;r.parentNode!==n;){if(!r.parentNode)return null;r=r.parentNode}return r}function PEe(n,t,r){let e=t.getBoundingClientRect();return r?n.clientX<e.left+e.width/2:n.clientY<e.top+e.height/2}function REe(n,t){let r=window.getComputedStyle(t),e=parseFloat(r.paddingTop)||0,i=parseFloat(r.paddingLeft)||0,o=parseFloat(r.borderTopWidth)||0,a=parseFloat(r.borderLeftWidth)||0;return{x:n.offsetX+i+a,y:n.offsetY+e+o}}function FEe(n,t,r){let e=r(n,t)||{x:0,y:0};n.dataTransfer.setDragImage(t,e.x,e.y)}var Rs={isDragging:!1,dropEffect:"none",effectAllowed:"all",type:void 0};function NEe(n,t,r){Rs.isDragging=!0,Rs.dropEffect="none",Rs.effectAllowed=t,Rs.type=r,n.dataTransfer&&(n.dataTransfer.effectAllowed=t)}function r9(){Rs.isDragging=!1,Rs.dropEffect=void 0,Rs.effectAllowed=void 0,Rs.type=void 0}function W3(n,t){Rs.isDragging===!0&&(Rs.dropEffect=t),n.dataTransfer&&(n.dataTransfer.dropEffect=t)}function o9(n,t){let r=n.dataTransfer?n.dataTransfer.effectAllowed:"uninitialized",e=ID(l9,r);return Rs.isDragging===!0&&(e=ID(e,Rs.effectAllowed)),t&&(e=ID(e,t)),e.length===0?"none":n.ctrlKey&&e.indexOf("copy")!==-1?"copy":n.altKey&&e.indexOf("link")!==-1?"link":e[0]}function Y3(n){if(Rs.isDragging===!0)return Rs.type;let t=d9(n);if(t!==null&&!(t===DD||t===K3))return t.substr(kD.length+1)||void 0}function Q3(){return Rs.isDragging===!1}var a9=Rs,s9=(()=>{let t=class t{constructor(){se(this,"dndDraggableDirective",Rt(he(()=>Nh)));se(this,"elementRef",Rt(ge))}ngOnInit(){this.dndDraggableDirective.registerDragImage(this.elementRef)}};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275dir",_e({type:t,selectors:[["","dndDragImageRef",""]],standalone:!0}));let n=t;return n})(),Nh=(()=>{let t=class t{constructor(){se(this,"dndDraggable");se(this,"dndEffectAllowed","copy");se(this,"dndType");se(this,"dndDraggingClass","dndDragging");se(this,"dndDraggingSourceClass","dndDraggingSource");se(this,"dndDraggableDisabledClass","dndDraggableDisabled");se(this,"dndDragImageOffsetFunction",REe);
196se(this,"dndStart",new J);se(this,"dndDrag",new J);se(this,"dndEnd",new J);se(this,"dndMoved",new J);se(this,"dndCopied",new J);se(this,"dndLinked",new J);se(this,"dndCanceled",new J);se(this,"draggable",!0);se(this,"dndHandle");se(this,"dndDragImageElementRef");se(this,"dragImage");se(this,"isDragStarted",!1);se(this,"elementRef",Rt(ge));se(this,"renderer",Rt(Ni));se(this,"ngZone",Rt(Bt));se(this,"dragEventHandler",e=>this.onDrag(e))}set dndDisableIf(e){this.draggable=!e,this.draggable?this.renderer.removeClass(this.elementRef.nativeElement,this.dndDraggableDisabledClass):this.renderer.addClass(this.elementRef.nativeElement,this.dndDraggableDisabledClass)}set dndDisableDragIf(e){this.dndDisableIf=e}ngAfterViewInit(){this.ngZone.runOutsideAngular(()=>{this.elementRef.nativeElement.addEventListener("drag",this.dragEventHandler)})}ngOnDestroy(){this.elementRef.nativeElement.removeEventListener("drag",this.dragEventHandler),this.isDragStarted&&r9()}onDragStart(e){if(!this.draggable)return!1;if(this.dndHandle!=null&&e._dndUsingHandle==null)return e.stopPropagation(),!1;NEe(e,this.dndEffectAllowed,this.dndType),this.isDragStarted=!0,MEe(e,{data:this.dndDraggable,type:this.dndType},a9.effectAllowed),this.dragImage=this.determineDragImage(),this.renderer.addClass(this.dragImage,this.dndDraggingClass),(this.dndDragImageElementRef!=null||e._dndUsingHandle!=null)&&FEe(e,this.dragImage,this.dndDragImageOffsetFunction);let i=this.renderer.listen(this.elementRef.nativeElement,"drag",()=>{this.renderer.addClass(this.elementRef.nativeElement,this.dndDraggingSourceClass),i()});return this.dndStart.emit(e),e.stopPropagation(),setTimeout(()=>{this.isDragStarted&&this.renderer.setStyle(this.dragImage,"pointer-events","none")},100),!0}onDrag(e){this.dndDrag.emit(e)}onDragEnd(e){if(!this.draggable||!this.isDragStarted)return;let i=a9.dropEffect;this.renderer.setStyle(this.dragImage,"pointer-events","unset");let o;switch(i){case"copy":o=this.dndCopied;break;case"link":o=this.dndLinked;break;case"move":o=this.dndMoved;break;default:o=this.dndCanceled;break}o.emit(e),this.dndEnd.emit(e),r9(),this.isDragStarted=!1,this.renderer.removeClass(this.dragImage,this.dndDraggingClass),window.setTimeout(()=>{this.renderer.removeClass(this.elementRef.nativeElement,this.dndDraggingSourceClass)},0),e.stopPropagation()}registerDragHandle(e){this.dndHandle=e}registerDragImage(e){this.dndDragImageElementRef=e}determineDragImage(){return typeof this.dndDragImageElementRef<"u"?this.dndDragImageElementRef.nativeElement:this.elementRef.nativeElement}};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275dir",_e({type:t,selectors:[["","dndDraggable",""]],hostVars:1,hostBindings:function(i,o){i&1&&T("dragstart",function(s){return o.onDragStart(s)})("dragend",function(s){return o.onDragEnd(s)}),i&2&&Je("draggable",o.draggable)},inputs:{dndDraggable:"dndDraggable",dndEffectAllowed:"dndEffectAllowed",dndType:"dndType",dndDraggingClass:"dndDraggingClass",dndDraggingSourceClass:"dndDraggingSourceClass",dndDraggableDisabledClass:"dndDraggableDisabledClass",dndDragImageOffsetFunction:"dndDragImageOffsetFunction",dndDisableIf:"dndDisableIf",dndDisableDragIf:"dndDisableDragIf"},outputs:{dndStart:"dndStart",dndDrag:"dndDrag",dndEnd:"dndEnd",dndMoved:"dndMoved",dndCopied:"dndCopied",dndLinked:"dndLinked",dndCanceled:"dndCanceled"},standalone:!0}));let n=t;return n})(),E0=(()=>{let t=class t{constructor(e){se(this,"elementRef");this.elementRef=e}ngOnInit(){this.elementRef.nativeElement.style.pointerEvents="none"}};se(t,"\u0275fac",function(i){return new(i||t)(h(ge))}),se(t,"\u0275dir",_e({type:t,selectors:[["","dndPlaceholderRef",""]],standalone:!0}));let n=t;return n})(),ly=(()=>{let t=class t{constructor(e,i,o){se(this,"ngZone");se(this,"elementRef");se(this,"renderer");se(this,"dndDropzone","");se(this,"dndEffectAllowed","uninitialized");se(this,"dndAllowExternal",!1);se(this,"dndHorizontal",!1);se(this,"dndDragoverClass","dndDragover");se(this,"dndDropzoneDisabledClass","dndDropzoneDisabled");se(this,"dndDragover",new J);se(this,"dndDrop",new J);se(this,"dndPlaceholderRef");se(this,"placeholder",null);se(this,"disabled",!1);se(this,"dragEnterEventHandler",e=>this.onDragEnter(e));se(this,"dragOverEventHandler",e=>this.onDragOver(e));se(this,"dragLeaveEventHandler",e=>this.onDragLeave(e));this.ngZone=e,this.elementRef=i,this.renderer=o}set dndDisableIf(e){this.disabled=e,this.disabled?this.renderer.addClass(this.elementRef.nativeElement,this.dndDropzoneDisabledClass):this.renderer.removeClass(this.elementRef.nativeElement,this.dndDropzoneDisabledClass)}set dndDisableDropIf(e){this.dndDisableIf=e}ngAfterViewInit(){this.placeholder=this.tryGetPlaceholder(),this.removePlaceholderFromDOM(),this.ngZone.runOutsideAngular(()=>{this.elementRef.nativeElement.addEventListener("dragenter",this.dragEnterEventHandler),this.elementRef.nativeElement.addEventListener("dragover",this.dragOverEventHandler),this.elementRef.nativeElement.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){this.elementRef.nativeElement.removeEventListener("dragenter",this.dragEnterEventHandler),this.elementRef.nativeElement.removeEventListener("dragover",this.dragOverEventHandler),this.elementRef.nativeElement.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragEnter(e){if(e._dndDropzoneActive===!0){this.cleanupDragoverState();return}if(e._dndDropzoneActive==null){let o=document.elementFromPoint(e.clientX,e.clientY);this.elementRef.nativeElement.contains(o)&&(e._dndDropzoneActive=!0)}let i=Y3(e);this.isDropAllowed(i)&&e.preventDefault()}onDragOver(e){if(e.defaultPrevented)return;let i=Y3(e);
196if(!this.isDropAllowed(i))return;this.checkAndUpdatePlaceholderPosition(e);let o=o9(e,this.dndEffectAllowed);if(o==="none"){this.cleanupDragoverState();return}e.preventDefault(),W3(e,o),this.dndDragover.emit(e),this.renderer.addClass(this.elementRef.nativeElement,this.dndDragoverClass)}onDrop(e){try{let i=Y3(e);if(!this.isDropAllowed(i))return;let o=AEe(e,Q3());if(!this.isDropAllowed(o.type))return;e.preventDefault();let a=o9(e);if(W3(e,a),a==="none")return;let s=this.getPlaceholderIndex();if(s===-1)return;this.dndDrop.emit({event:e,dropEffect:a,isExternal:Q3(),data:o.data,index:s,type:i}),e.stopPropagation()}finally{this.cleanupDragoverState()}}onDragLeave(e){if(e.preventDefault(),e.stopPropagation(),e._dndDropzoneActive==null&&this.elementRef.nativeElement.contains(e.relatedTarget)){e._dndDropzoneActive=!0;return}this.cleanupDragoverState(),W3(e,"none")}isDropAllowed(e){if(this.disabled||Q3()&&!this.dndAllowExternal)return!1;if(!this.dndDropzone||!e)return!0;if(!Array.isArray(this.dndDropzone))throw new Error("dndDropzone: bound value to [dndDropzone] must be an array!");return this.dndDropzone.indexOf(e)!==-1}tryGetPlaceholder(){return typeof this.dndPlaceholderRef<"u"?this.dndPlaceholderRef.elementRef.nativeElement:this.elementRef.nativeElement.querySelector("[dndPlaceholderRef]")}removePlaceholderFromDOM(){this.placeholder!==null&&this.placeholder.parentNode!==null&&this.placeholder.parentNode.removeChild(this.placeholder)}checkAndUpdatePlaceholderPosition(e){if(this.placeholder===null)return;this.placeholder.parentNode!==this.elementRef.nativeElement&&this.renderer.appendChild(this.elementRef.nativeElement,this.placeholder);let i=OEe(this.elementRef.nativeElement,e.target);if(i===null||i===this.placeholder)return;PEe(e,i,this.dndHorizontal)?i.previousSibling!==this.placeholder&&this.renderer.insertBefore(this.elementRef.nativeElement,this.placeholder,i):i.nextSibling!==this.placeholder&&this.renderer.insertBefore(this.elementRef.nativeElement,this.placeholder,i.nextSibling)}getPlaceholderIndex(){if(this.placeholder===null)return;let e=this.elementRef.nativeElement;return Array.prototype.indexOf.call(e.children,this.placeholder)}cleanupDragoverState(){this.renderer.removeClass(this.elementRef.nativeElement,this.dndDragoverClass),this.removePlaceholderFromDOM()}};se(t,"\u0275fac",function(i){return new(i||t)(h(Bt),h(ge),h(Ni))}),se(t,"\u0275dir",_e({type:t,selectors:[["","dndDropzone",""]],contentQueries:function(i,o,a){if(i&1&&Zt(a,E0,5),i&2){let s;Q(s=K())&&(o.dndPlaceholderRef=s.first)}},hostBindings:function(i,o){i&1&&T("drop",function(s){return o.onDrop(s)})},inputs:{dndDropzone:"dndDropzone",dndEffectAllowed:"dndEffectAllowed",dndAllowExternal:"dndAllowExternal",dndHorizontal:"dndHorizontal",dndDragoverClass:"dndDragoverClass",dndDropzoneDisabledClass:"dndDropzoneDisabledClass",dndDisableIf:"dndDisableIf",dndDisableDropIf:"dndDisableDropIf"},outputs:{dndDragover:"dndDragover",dndDrop:"dndDrop"},standalone:!0}));let n=t;return n})(),cy=(()=>{let t=class t{constructor(){se(this,"draggable",!0);se(this,"dndDraggableDirective",Rt(Nh))}ngOnInit(){this.dndDraggableDirective.registerDragHandle(this)}ngOnDestroy(){this.dndDraggableDirective.registerDragHandle(void 0)}onDragEvent(e){e._dndUsingHandle=!0}};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275dir",_e({type:t,selectors:[["","dndHandle",""]],hostVars:1,hostBindings:function(i,o){i&1&&T("dragstart",function(s){return o.onDragEvent(s)})("dragend",function(s){return o.onDragEvent(s)}),i&2&&Je("draggable",o.draggable)},standalone:!0}));let n=t;return n})(),gx=(()=>{let t=class t{};se(t,"\u0275fac",function(i){return new(i||t)}),se(t,"\u0275mod",Vt({type:t,imports:[s9,ly,cy,E0,Nh],exports:[Nh,ly,cy,E0,s9]})),se(t,"\u0275inj",Nt({}));let n=t;return n})();var WEe={};Ae(WEe,{QueueAutocompleteComponent:()=>MD});y();y();var VEe=function(n){return n.TB_CORE="TB_CORE",n.TB_RULE_ENGINE="TB_RULE_ENGINE",n.TB_TRANSPORT="TB_TRANSPORT",n.JS_EXECUTOR="JS_EXECUTOR",n}(VEe||{}),dy=function(n){return n.SEQUENTIAL_BY_ORIGINATOR="SEQUENTIAL_BY_ORIGINATOR",n.SEQUENTIAL_BY_TENANT="SEQUENTIAL_BY_TENANT",n.SEQUENTIAL="SEQUENTIAL",n.BURST="BURST",n.BATCH="BATCH",n}(dy||{}),NWt=new Map([[dy.SEQUENTIAL_BY_ORIGINATOR,{label:"queue.strategies.sequential-by-originator-label",hint:"queue.strategies.sequential-by-originator-hint"}],[dy.SEQUENTIAL_BY_TENANT,{label:"queue.strategies.sequential-by-tenant-label",hint:"queue.strategies.sequential-by-tenant-hint"}],[dy.SEQUENTIAL,{label:"queue.strategies.sequential-label",hint:"queue.strategies.sequential-hint"}],[dy.BURST,{label:"queue.strategies.burst-label",hint:"queue.strategies.burst-hint"}],[dy.BATCH,{label:"queue.strategies.batch-label",hint:"queue.strategies.batch-hint"}]]),I0=function(n){return n.RETRY_FAILED_AND_TIMED_OUT="RETRY_FAILED_AND_TIMED_OUT",n.SKIP_ALL_FAILURES="SKIP_ALL_FAILURES",n.SKIP_ALL_FAILURES_AND_TIMED_OUT="SKIP_ALL_FAILURES_AND_TIMED_OUT",n.RETRY_ALL="RETRY_ALL",n.RETRY_FAILED="RETRY_FAILED",n.RETRY_TIMED_OUT="RETRY_TIMED_OUT",n}(I0||{}),VWt=new Map([[I0.RETRY_FAILED_AND_TIMED_OUT,{label:"queue.strategies.retry-failed-and-timeout-label",hint:"queue.strategies.retry-failed-and-timeout-hint"}],[I0.SKIP_ALL_FAILURES,{label:"queue.strategies.skip-all-failures-label",hint:"queue.strategies.skip-all-failures-hint"}],[I0.SKIP_ALL_FAILURES_AND_TIMED_OUT,{label:"queue.strategies.skip-all-failures-and-timeouts-label",hint:"queue.strategies.skip-all-failures-and-timeouts-hint"}],[I0.RETRY_ALL,{label:"queue.strategies.retry-all-label",hint:"queue.strategies.retry-all-hint"}],[I0.RETRY_FAILED,{label:"queue.strategies.retry-failed-label",hint:"queue.strategies.retry-failed-hint"}],[I0.RETRY_TIMED_OUT,{label:"queue.strategies.retry-timeout-label",hint:"queue.strategies.retry-timeout-hint"}]]);var LEe=["queueInput"],BEe=n=>({queue:n});function jEe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",11),g(2,"close"),p()()}}function GEe(n,t){if(n&1&&(d(0,"mat-option",12),O(1,"span",13),v(2,"highlight"),d(3,"small",14),g(4),p()()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,3,r.name,e.searchText),Ut),l(3),z(e.getDescription(r))}}function zEe(n,t){n&1&&(d(0,"div")(1,"span",18),g(2,"queue.no-queues-found"),p()())}function $Ee(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"async"),p()),n&2){let r=b
196(2);l(),j(" ",C(2,1,r.translate.get("queue.no-queues-matching",Xe(3,BEe,r.truncate.transform(r.searchText,!0,6,"..."))))," ")}}function UEe(n,t){if(n&1){let r=B();d(0,"mat-option",15)(1,"div",16),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,zEe,3,0,"div",17)(3,$Ee,3,5,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function HEe(n,t){if(n&1&&(d(0,"mat-hint"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),z(C(2,1,r.autocompleteHint))}}function qEe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"queue.queue-required")," "))}var MD=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c){this.store=e,this.translate=i,this.truncate=o,this.entityService=a,this.queueService=s,this.fb=c,this.subscriptSizing="fixed",this.searchText="",this.dirty=!1,this.propagateChange=u=>{},this.selectQueueFormGroup=this.fb.group({queueName:[null]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredQueues=this.selectQueueFormGroup.get("queueName").valueChanges.pipe(Wi(150),et(e=>{let i;typeof e=="string"||!e?i=null:i=e.name,this.updateView(i),e===null&&this.clear()}),W(e=>e?typeof e=="string"?e:e.name:""),xr(),ii(e=>this.fetchQueue(e)),Si())}setDisabledState(e){this.disabled=e,this.disabled?this.selectQueueFormGroup.disable({emitEvent:!1}):this.selectQueueFormGroup.enable({emitEvent:!1})}textIsNotEmpty(e){return e&&e.length>0}writeValue(e){this.searchText="",e!=null?this.queueService.getQueueByName(e,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:i=>{this.modelValue=i.name,this.selectQueueFormGroup.get("queueName").patchValue(i,{emitEvent:!1})},error:()=>{this.modelValue=null,this.selectQueueFormGroup.get("queueName").patchValue("",{emitEvent:!1}
196),e!==null&&this.propagateChange(this.modelValue)}}):(this.modelValue=null,this.selectQueueFormGroup.get("queueName").patchValue("",{emitEvent:!1})),this.dirty=!0}onFocus(){this.dirty&&(this.selectQueueFormGroup.get("queueName").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}reset(){this.selectQueueFormGroup.get("queueName").patchValue("",{emitEvent:!1})}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}displayQueueFn(e){return e?e.name:void 0}fetchQueue(e){this.searchText=e;let i=new On(10,0,e,{property:"name",direction:Xn.ASC});return this.queueService.getTenantQueuesByServiceType(i,this.queueType,{ignoreLoading:!0}).pipe(vt(()=>Z(yr())),W(o=>o.data))}getDescription(e){return e.additionalInfo?.description?e.additionalInfo.description:this.translate.instant("queue.alt-description",{submitStrategy:e.submitStrategy.type,processingStrategy:e.processingStrategy.type})}clear(){this.selectQueueFormGroup.get("queueName").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.queueInput.nativeElement.blur(),this.queueInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h($o),h(rr),h(qI),h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-queue-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(LEe,7),i&2){let a;Q(a=K())&&(o.queueInput=a.first)}},inputs:{labelText:"labelText",requiredText:"requiredText",autocompleteHint:"autocompleteHint",subscriptSizing:"subscriptSizing",required:"required",queueType:"queueType",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:15,vars:17,consts:[["queueInput",""],["queueAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block","autocomplete-queue",3,"formGroup","subscriptSizing"],["matInput","","type","text","formControlName","queueName",3,"focusin","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],["class","queue-option",3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[1,"queue-option",3,"value"],[3,"innerHTML"],[1,"queue-option-description"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate",""]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",4,0),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(6,jEe,3,0,"button",5),d(7,"mat-autocomplete",6,1),x(9,GEe,5,6,"mat-option",7),v(10,"async"),x(11,UEe,5,3,"mat-option",8),v(12,"async"),p(),x(13,HEe,3,3,"mat-hint",9)(14,qEe,3,3,"mat-error",9),p()}if(i&2){let a,s=me(8);te("subscriptSizing",o.subscriptSizing),m("formGroup",o.selectQueueFormGroup),l(2),z(C(3,11,"queue.queue-name")),l(2),m("required",o.required)("matAutocomplete",s),l(2),m("ngIf",o.selectQueueFormGroup.get("queueName").value&&!o.disabled),l(),m("displayWith",o.displayQueueFn),l(2),m("ngForOf",C(10,13,o.filteredQueues)),l(2),m("ngIf",!((a=C(12,15,o.filteredQueues))!=null&&a.length)),l(2),m("ngIf",o.autocompleteHint),l(),m("ngIf",o.selectQueueFormGroup.get("queueName").hasError("required"))}},dependencies:[Ke,ce,jt,Pe,Se,at,ze,At,to,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],styles:['@charset "UTF-8";.queue-option[_ngcontent-%COMP%]   .queue-option-description[_ngcontent-%COMP%]{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}']});let n=t;return n})();var gIe={};Ae(gIe,{ContactComponent:()=>AD});y();y();y();var de=function(n){return n.Afghanistan="AF",n.Albania="AL",n.Algeria="DZ",n.AmericanSamoa="AS",n.Andorra="AD",n.Angola="AO",n.Anguilla="AI",n.Antarctica="AQ",n.AntiguaAndBarbuda="AG",n.Argentina="AR",n.Armenia="AM",n.Aruba="AW",n.Australia="AU",n.Austria="AT",n.Azerbaijan="AZ",n.Bahamas="BS",n.Bahrain="BH",n.Bangladesh="BD",n.Barbados="BB",n.Belarus="BY",n.Belgium="BE",n.Belize="BZ",n.Benin="BJ",n.Bermuda="BM",n.Bhutan="BT",n.Bolivia="BO",n.BonaireAndSintEustatiusAndSaba="BQ",n.BouvetIsland="BV",n.BosniaAndHerzegovina="BA",n.Botswana="BW",n.Brazil="BR",n.BritishIndianOceanTerritory="IO",n.BritishVirginIslands="VG",n.Brunei="BN",n.Bulgaria="BG",n.BurkinaFaso="BF",n.Burundi="BI",n.Cambodia="KH",n.Cameroon="CM",n.Canada="CA",n.CapeVerde="CV",n.CaribbeanNetherlands="BQ",n.CaymanIslands="KY",n.CentralAfricanRepublic="CF",n.Chad="TD",n.Chile="CL",n.China="CN",
196n.ChristmasIsland="CX",n.Cocos="CC",n.Colombia="CC",n.Comoros="KM",n.CongoDRCJamhuriYaKidemokrasiaYaKongo="CD",n.CongoRepublicCongoBrazzaville="CG",n.CookIslands="CK",n.CostaRica="CR",n.CoteDivoire="CI",n.Croatia="HR",n.Cuba="CU",n.Curacao="CW",n.Cyprus="CY",n.CzechRepublic="CZ",n.Denmark="DK",n.Djibouti="DJ",n.Dominica="DM",n.DominicanRepublic="DO",n.Ecuador="EC",n.Egypt="EG",n.ElSalvador="SV",n.EquatorialGuinea="GQ",n.Eritrea="ER",n.Estonia="EE",n.Ethiopia="ET",n.FalklandIslands="FK",n.FaroeIslands="FO",n.Fiji="FJ",n.Finland="FI",n.France="FR",n.FrenchGuiana="GF",n.FrenchPolynesia="PF",n.FrenchSouthernTerritories="TF",n.Gabon="GA",n.Gambia="GM",n.Georgia="GE",n.Germany="DE",n.Ghana="GH",n.Gibraltar="GI",n.Greece="GR",n.Greenland="GL",n.Grenada="GD",n.Guadeloupe="GP",n.Guam="GU",n.Guatemala="GT",n.Guernsey="GG",n.Guinea="GN",n.GuineaBissau="GW",n.Guyana="GY",n.Haiti="HT",n.HeardIslandandMcDonaldIslands="HM",n.Honduras="HN",n.HongKong="HK",n.Hungary="HU",n.Iceland="IS",n.India="IN",n.Indonesia="ID",n.Iran="IR",n.Iraq="IQ",n.Ireland="IE",n.IsleOfMan="IM",n.Israel="IL",n.Italy="IT",n.Jamaica="JM",n.Japan="JP",n.Jersey="JE",n.Jordan="JO",n.Kazakhstan="KZ",n.Kenya="KE",n.Kiribati="KI",n.Kosovo="XK",n.Kuwait="KW",n.Kyrgyzstan="KG",n.Laos="LA",n.Latvia="LV",n.Lebanon="LB",n.Lesotho="LS",n.Liberia="LR",n.Libya="LY",n.Liechtenstein="LI",n.Lithuania="LT",n.Luxembourg="LU",n.Macau="MO",n.Madagascar="MG",n.Malawi="MW",n.Malaysia="MY",n.Maldives="MV",n.Mali="ML",n.Malta="MT",n.MarshallIslands="MH",n.Martinique="MQ",n.Mauritania="MR",n.Mauritius="MU",n.Mayotte="YT",n.Mexico="MX",n.Micronesia="FM",n.Moldova="MD",n.Monaco="MC",n.Mongolia="MN",n.Montenegro="ME",n.Montserrat="MS",n.Morocco="MA",n.Mozambique="MZ",n.Myanmar="MM",n.Namibia="NA",n.Nauru="NR",n.Nepal="NP",n.Netherlands="NL",n.NewCaledonia="NC",n.NewZealand="NZ",n.Nicaragua="NI",n.Niger="NE",n.Nigeria="NG",n.Niue="NU",n.NorfolkIsland="NF",n.NorthKorea="KP",n.NorthMacedonia="MK",n.NorthernMarianaIslands="MP",n.Norway="NO",n.Oman="OM",n.Pakistan="PK",n.Palau="PW",n.Palestine="PS",n.Panama="PA",n.PapuaNewGuinea="PG",n.Paraguay="PY",n.Peru="PE",n.Philippines="PH",n.PitcairnIslands="PN",n.Poland="PL",n.Portugal="PT",n.PuertoRico="PR",n.Qatar="QA",n.Reunion="RE",n.Romania="RO",n.Russia="RU",n.Rwanda="RW",n.SaintBarthelemy="BL",n.SaintHelena="SH",n.SaintKittsAndNevis="KN",n.SaintLucia="LC",n.SaintMartin="MF",n.SaintPierreAndMiquelon="PM",n.SaintVincentAndTheGrenadines="VC",n.Samoa="WS",n.SanMarino="SM",n.SaoTomeAndPrincipe="ST",n.SaudiArabia="SA",n.Senegal="SN",n.Serbia="RS",n.Seychelles="SC",n.SierraLeone="SL",n.Singapore="SG",n.SintMaarten="SX",n.Slovakia="SK",n.Slovenia="SI",n.SolomonIslands="SB",n.Somalia="SO",n.SouthAfrica="ZA",n.SouthGeorgiaAndTheSouthSandwichIslands="GS",n.SouthKorea="KR",n.SouthSudan="SS",n.Spain="ES",n.SriLanka="LK",n.Sudan="SD",n.Suriname="SR",n.SvalbardAndJanMayen="SJ",n.Swaziland="SZ",n.Sweden="SE",n.Switzerland="CH",n.Syria="SY",n.Taiwan="TW",n.Tajikistan="TJ",n.Tanzania="TZ",n.Thailand="TH",n.TimorLeste="TL",n.Togo="TG",n.Tokelau="TK",n.Tonga="TO",n.TrinidadAndTobago="TT",n.Tunisia="TN",n.Turkey="TR",n.Turkmenistan="TM",n.TurksAndCaicosIslands="TC",n.Tuvalu="TV",n.USVirginIslands="VI",n.Uganda="UG",n.Ukraine="UA",n.UnitedArabEmirates="AE",n.UnitedKingdom="GB",n.UnitedStates="US",n.Uruguay="UY",n.Uzbekistan="UZ",n.Vanuatu="VU",n.VaticanCity="VA",n.Venezuela="VE",n.Vietnam="VN",n.WallisAndFutuna="WF",n.WesternSahara="EH",n.Yemen="YE",n.Zambia="ZM",n.Zimbabwe="ZW",n.AlandIslands="AX",n}(de||{}),Np=(()=>{let t=class t{constructor(){this.allCountries=[{name:"Afghanistan",iso2:de.Afghanistan,dialCode:"93",flag:"\u{1F1E6}\u{1F1EB}"},{name:"Albania",iso2:de.Albania,dialCode:"355",flag:"\u{1F1E6}\u{1F1F1}"},{name:"Algeria",iso2:de.Algeria,dialCode:"213",flag:"\u{1F1E9}\u{1F1FF}"},{name:"American Samoa",iso2:de.AmericanSamoa,dialCode:"1",flag:"\u{1F1E6}\u{1F1F8}"},{name:"Andorra",iso2:de.Andorra,dialCode:"376",flag:"\u{1F1E6}\u{1F1E9}"},{name:"Angola",iso2:de.Angola,dialCode:"244",flag:"\u{1F1E6}\u{1F1F4}"},{name:"Anguilla",iso2:de.Anguilla,dialCode:"1",flag:"\u{1F1E6}\u{1F1EE}"},{name:"Antarctica",iso2:de.Antarctica,dialCode:"672",flag:"\u{1F1E6}\u{1F1F6}"},{name:"Antigua and Barbuda",iso2:de.AntiguaAndBarbuda,dialCode:"1",flag:"\u{1F1E6}\u{1F1EC}"},{name:"Argentina",iso2:de.Argentina,dialCode:"54",flag:"\u{1F1E6}\u{1F1F7}"},{name:"Armenia",iso2:de.Armenia,dialCode:"374",flag:"\u{1F1E6}\u{1F1F2}"},{name:"Aruba",iso2:de.Aruba,dialCode:"297",flag:"\u{1F1E6}\u{1F1FC}"},{name:"Australia",iso2:de.Australia,dialCode:"61",flag:"\u{1F1E6}\u{1F1FA}",postCodePattern:/[0-9]{4}/},{name:"Austria",iso2:de.Austria,dialCode:"43",flag:"\u{1F1E6}\u{1F1F9}",postCodePattern:/[0-9]{4}/},{name:"Azerbaijan",iso2:de.Azerbaijan,dialCode:"994",flag:"\u{1F1E6}\u{1F1FF}"},{name:"Bahamas",iso2:de.Bahamas,dialCode:"1",flag:"\u{1F1E7}\u{1F1F8}"},{name:"Bahrain",iso2:de.Bahrain,dialCode:"973",flag:"\u{1F1E7}\u{1F1ED}"},{name:"Bangladesh",iso2:de.Bangladesh,dialCode:"880",flag:"\u{1F1E7}\u{1F1E9}"},{name:"Barbados",iso2:de.Barbados,dialCode:"1",flag:"\u{1F1E7}\u{1F1E7}"},{name:"Belarus",iso2:de.Belarus,dialCode:"375",flag:"\u{1F1E7}\u{1F1FE}"},{name:"Belgium",iso2:de.Belgium,dialCode:"32",flag:"\u{1F1E7}\u{1F1EA}",postCodePattern:/[0-9]{4}/},{name:"Belize",iso2:de.Belize,dialCode:"501",flag:"\u{1F1E7}\u{1F1FF}"},{name:"Benin",iso2:de.Benin,dialCode:"229",flag:"\u{1F1E7}\u{1F1EF}"},{name:"Bermuda",iso2:de.Bermuda,dialCode:"1",flag:"\u{1F1E7}\u{1F1F2}"},{name:"Bhutan",iso2:de.Bhutan,dialCode:"975",flag:"\u{1F1E7}\u{1F1F9}"},{name:"Bolivia",iso2:de.Bolivia,dialCode:"591",flag:"\u{1F1E7}\u{1F1F4}"},{name:"Bonaire, Sint Eustatius and Saba",iso2:de.BonaireAndSintEustatiusAndSaba,dialCode:"599",flag:"\u{1F1E7}\u{1F1F6}"},{name:"Bouvet Island",iso2:de.BouvetIsland,dialCode:"47",flag:"\u{1F1E7}\u{1F1FB}"},{name:"Bosnia and Herzegovina",iso2:de.BosniaAndHerzegovina,dialCode:"387",flag:"\u{1F1E7}\u{1F1E6}"},{name:"Botswana",iso2:de.Botswana,dialCode:"267",flag:"\u{1F1E7}\u{1F1FC}"},{name:"Brazil",iso2:de.Brazil,dialCode:"55",flag:"\u{1F1E7}\u{1F1F7}",postCodePattern:/[0-9]{5}-?[0-9]{3}/},{name:"British Indian Ocean Territory",iso2:de.BritishIndianOceanTerritory,dialCode:"246",flag:"\u{1F1EE}\u{1F1F4}"},{name:"British Virgin Islands",iso2:de.BritishVirginIslands,dialCode:"1",flag:"\u{1F1FB}\u{1F1EC}"},{name:"Brunei Darussalam",iso2:de.Brunei,dialCode:"673",flag:"\u{1F1E7}\u{1F1F3}"},{name:"Bulgaria",iso2:de.Bulgaria,dialCode:"359",flag:"\u{1F1E7}\u{1F1EC}"},{name:"Burkina Faso",iso2:de.BurkinaFaso,dialCode:"226",flag:"\u{1F1E7}\u{1F1EB}"},{name:"Burundi",iso2:de.Burundi,dialCode:"257",flag:"\u{1F1E7}\u{1F1EE}"},{name:"Cambodia",iso2:de.Cambodia,dialCode:"855",flag:"\u{1F1F0}\u{1F1ED}"},{name:"Cameroon",iso2:de.Cameroon,dialCode:"237",flag:"\u{1F1E8}\u{1F1F2}"},{name:"Canada",iso2:de.Canada,dialCode:"1",flag:"\u{1F1E8}\u{1F1E6}",postCodePattern:/^(?!.*[DFIOQU])[A-VXY][0-9][A-Z][ -]?[0-9][A-Z][0-9]$/},{name:"Cape Verde",iso2:de.CapeVerde,dialCode:"238",flag:"\u{1F1E8}\u{1F1FB}"},{name:"Caribbean Netherlands",iso2:de.CaribbeanNetherlands,dialCode:"599",flag:"\u{1F1E7}\u{1F1F6}"},{name:"Cayman Islands",iso2:de.CaymanIslands,dialCode:"1",flag:"\u{1F1F0}\u{1F1FE}"},{name:"Central African Republic",iso2:de.CentralAfricanRepublic,dialCode:"236",flag:"\u{1F1E8}\u{1F1EB}"}
196,{name:"Chad",iso2:de.Chad,dialCode:"235",flag:"\u{1F1F9}\u{1F1E9}"},{name:"Chile",iso2:de.Chile,dialCode:"56",flag:"\u{1F1E8}\u{1F1F1}"},{name:"China",iso2:de.China,dialCode:"86",flag:"\u{1F1E8}\u{1F1F3}"},{name:"Christmas Island",iso2:de.ChristmasIsland,dialCode:"61",flag:"\u{1F1E8}\u{1F1FD}"},{name:"Cocos (Keeling) Islands",iso2:de.Cocos,dialCode:"61",flag:"\u{1F1E8}\u{1F1E8}"},{name:"Colombia",iso2:de.Colombia,dialCode:"57",flag:"\u{1F1E8}\u{1F1E8}"},{name:"Comoros",iso2:de.Comoros,dialCode:"269",flag:"\u{1F1F0}\u{1F1F2}"},{name:"Congo",iso2:de.CongoDRCJamhuriYaKidemokrasiaYaKongo,dialCode:"243",flag:"\u{1F1E8}\u{1F1E9}"},{name:"Congo, Democratic Republic of the",iso2:de.CongoRepublicCongoBrazzaville,dialCode:"242",flag:"\u{1F1E8}\u{1F1EC}"},{name:"Cook Islands",iso2:de.CookIslands,dialCode:"682",flag:"\u{1F1E8}\u{1F1F0}"},{name:"Costa Rica",iso2:de.CostaRica,dialCode:"506",flag:"\u{1F1E8}\u{1F1F7}"},{name:"C\xF4te d'Ivoire",iso2:de.CoteDivoire,dialCode:"225",flag:"\u{1F1E8}\u{1F1EE}"},{name:"Croatia",iso2:de.Croatia,dialCode:"385",flag:"\u{1F1ED}\u{1F1F7}"},{name:"Cuba",iso2:de.Cuba,dialCode:"53",flag:"\u{1F1E8}\u{1F1FA}"},{name:"Cura\xE7ao",iso2:de.Curacao,dialCode:"599",flag:"\u{1F1E8}\u{1F1FC}"},{name:"Cyprus",iso2:de.Cyprus,dialCode:"357",flag:"\u{1F1E8}\u{1F1FE}"},{name:"Czech Republic",iso2:de.CzechRepublic,dialCode:"420",flag:"\u{1F1E8}\u{1F1FF}"},{name:"Denmark",iso2:de.Denmark,dialCode:"45",flag:"\u{1F1E9}\u{1F1F0}",postCodePattern:/[0-9]{3,4}/},{name:"Djibouti",iso2:de.Djibouti,dialCode:"253",flag:"\u{1F1E9}\u{1F1EF}"},{name:"Dominica",iso2:de.Dominica,dialCode:"1767",flag:"\u{1F1E9}\u{1F1F2}"},{name:"Dominican Republic",iso2:de.DominicanRepublic,dialCode:"1",flag:"\u{1F1E9}\u{1F1F4}"},{name:"Ecuador",iso2:de.Ecuador,dialCode:"593",flag:"\u{1F1EA}\u{1F1E8}"},{name:"Egypt",iso2:de.Egypt,dialCode:"20",flag:"\u{1F1EA}\u{1F1EC}"},{name:"El Salvador",iso2:de.ElSalvador,dialCode:"503",flag:"\u{1F1F8}\u{1F1FB}"},{name:"Equatorial Guinea",iso2:de.EquatorialGuinea,dialCode:"240",flag:"\u{1F1EC}\u{1F1F6}"},{name:"Eritrea",iso2:de.Eritrea,dialCode:"291",flag:"\u{1F1EA}\u{1F1F7}"},{name:"Estonia",iso2:de.Estonia,dialCode:"372",flag:"\u{1F1EA}\u{1F1EA}"},{name:"Ethiopia",iso2:de.Ethiopia,dialCode:"251",flag:"\u{1F1EA}\u{1F1F9}"},{name:"Falkland Islands (Malvinas)",iso2:de.FalklandIslands,dialCode:"500",flag:"\u{1F1EB}\u{1F1F0}"},{name:"Faroe Islands",iso2:de.FaroeIslands,dialCode:"298",flag:"\u{1F1EB}\u{1F1F4}",postCodePattern:/[0-9]{3,4}/},{name:"Fiji",iso2:de.Fiji,dialCode:"679",flag:"\u{1F1EB}\u{1F1EF}"},{name:"Finland",iso2:de.Finland,dialCode:"358",flag:"\u{1F1EB}\u{1F1EE}"},{name:"France",iso2:de.France,dialCode:"33",flag:"\u{1F1EB}\u{1F1F7}"},{name:"French Guiana",iso2:de.FrenchGuiana,dialCode:"594",flag:"\u{1F1EC}\u{1F1EB}"},{name:"French Polynesia",iso2:de.FrenchPolynesia,dialCode:"689",flag:"\u{1F1F5}\u{1F1EB}"},{name:"French Southern Territories",iso2:de.FrenchSouthernTerritories,dialCode:"262",flag:"\u{1F1F9}\u{1F1EB}"},{name:"Gabon",iso2:de.Gabon,dialCode:"241",flag:"\u{1F1EC}\u{1F1E6}"},{name:"Gambia",iso2:de.Gambia,dialCode:"220",flag:"\u{1F1EC}\u{1F1F2}"},{name:"Georgia",iso2:de.Georgia,dialCode:"995",flag:"\u{1F1EC}\u{1F1EA}"},{name:"Germany",iso2:de.Germany,dialCode:"49",flag:"\u{1F1E9}\u{1F1EA}",postCodePattern:/[0-9]{5}/},{name:"Ghana",iso2:de.Ghana,dialCode:"233",flag:"\u{1F1EC}\u{1F1ED}"},{name:"Gibraltar",iso2:de.Gibraltar,dialCode:"350",flag:"\u{1F1EC}\u{1F1EE}"},{name:"Greece",iso2:de.Greece,dialCode:"30",flag:"\u{1F1EC}\u{1F1F7}"},{name:"Greenland",iso2:de.Greenland,dialCode:"299",flag:"\u{1F1EC}\u{1F1F1}"},{name:"Grenada",iso2:de.Grenada,dialCode:"1",flag:"\u{1F1EC}\u{1F1E9}"},{name:"Guadeloupe",iso2:de.Guadeloupe,dialCode:"590",flag:"\u{1F1EC}\u{1F1F5}"},{name:"Guam",iso2:de.Guam,dialCode:"1",flag:"\u{1F1EC}\u{1F1FA}"},{name:"Guatemala",iso2:de.Guatemala,dialCode:"502",flag:"\u{1F1EC}\u{1F1F9}"},{name:"Guernsey",iso2:de.Guernsey,dialCode:"44",flag:"\u{1F1EC}\u{1F1EC}"},{name:"Guinea",iso2:de.Guinea,dialCode:"224",flag:"\u{1F1EC}\u{1F1F3}"},{name:"Guinea-Bissau",iso2:de.GuineaBissau,dialCode:"245",flag:"\u{1F1EC}\u{1F1FC}"},{name:"Guyana",iso2:de.Guyana,dialCode:"592",flag:"\u{1F1EC}\u{1F1FE}"},{name:"Haiti",iso2:de.Haiti,dialCode:"509",flag:"\u{1F1ED}\u{1F1F9}"},{name:"Heard Island and McDonald Islands",iso2:de.HeardIslandandMcDonaldIslands,dialCode:"672",flag:"\u{1F1ED}\u{1F1F2}"},{name:"Honduras",iso2:de.Honduras,dialCode:"504",flag:"\u{1F1ED}\u{1F1F3}"},{name:"Hong Kong",iso2:de.HongKong,dialCode:"852",flag:"\u{1F1ED}\u{1F1F0}"},{name:"Hungary",iso2:de.Hungary,dialCode:"36",flag:"\u{1F1ED}\u{1F1FA}",postCodePattern:/[0-9]{4}/},{name:"Iceland",iso2:de.Iceland,dialCode:"354",flag:"\u{1F1EE}\u{1F1F8}"},{name:"India",iso2:de.India,dialCode:"91",flag:"\u{1F1EE}\u{1F1F3}"},{name:"Indonesia",iso2:de.Indonesia,dialCode:"62",flag:"\u{1F1EE}\u{1F1E9}"},{name:"Islamic Republic of Iran",iso2:de.Iran,dialCode:"98",flag:"\u{1F1EE}\u{1F1F7}"},{name:"Iraq",iso2:de.Iraq,dialCode:"964",flag:"\u{1F1EE}\u{1F1F6}"},{name:"Ireland",iso2:de.Ireland,dialCode:"353",flag:"\u{1F1EE}\u{1F1EA}"},{name:"Isle of Man",iso2:de.IsleOfMan,dialCode:"44",flag:"\u{1F1EE}\u{1F1F2}"},{name:"Israel",iso2:de.Israel,dialCode:"972",flag:"\u{1F1EE}\u{1F1F1}"},{name:"Italy",iso2:de.Italy,dialCode:"39",flag:"\u{1F1EE}\u{1F1F9}",postCodePattern:/[0-9]{5}/},{name:"Jamaica",iso2:de.Jamaica,dialCode:"1",flag:"\u{1F1EF}\u{1F1F2}"},{name:"Japan",iso2:de.Japan,dialCode:"81",flag:"\u{1F1EF}\u{1F1F5}",postCodePattern:/\d{3}-\d{4}/}
196,{name:"Jersey",iso2:de.Jersey,dialCode:"44",flag:"\u{1F1EF}\u{1F1EA}"},{name:"Jordan",iso2:de.Jordan,dialCode:"962",flag:"\u{1F1EF}\u{1F1F4}"},{name:"Kazakhstan",iso2:de.Kazakhstan,dialCode:"7",flag:"\u{1F1F0}\u{1F1FF}"},{name:"Kenya",iso2:de.Kenya,dialCode:"254",flag:"\u{1F1F0}\u{1F1EA}"},{name:"Kiribati",iso2:de.Kiribati,dialCode:"686",flag:"\u{1F1F0}\u{1F1EE}"},{name:"Kosovo",iso2:de.Kosovo,dialCode:"383",flag:"\u{1F1FD}\u{1F1F0}"},{name:"Kuwait",iso2:de.Kuwait,dialCode:"965",flag:"\u{1F1F0}\u{1F1FC}"},{name:"Kyrgyzstan",iso2:de.Kyrgyzstan,dialCode:"996",flag:"\u{1F1F0}\u{1F1EC}"},{name:"Lao People's Democratic Republic",iso2:de.Laos,dialCode:"856",flag:"\u{1F1F1}\u{1F1E6}"},{name:"Latvia",iso2:de.Latvia,dialCode:"371",flag:"\u{1F1F1}\u{1F1FB}"},{name:"Lebanon",iso2:de.Lebanon,dialCode:"961",flag:"\u{1F1F1}\u{1F1E7}"},{name:"Lesotho",iso2:de.Lesotho,dialCode:"266",flag:"\u{1F1F1}\u{1F1F8}"},{name:"Liberia",iso2:de.Liberia,dialCode:"231",flag:"\u{1F1F1}\u{1F1F7}"},{name:"Libya",iso2:de.Libya,dialCode:"218",flag:"\u{1F1F1}\u{1F1FE}"},{name:"Liechtenstein",iso2:de.Liechtenstein,dialCode:"423",flag:"\u{1F1F1}\u{1F1EE}"},{name:"Lithuania",iso2:de.Lithuania,dialCode:"370",flag:"\u{1F1F1}\u{1F1F9}"},{name:"Luxembourg",iso2:de.Luxembourg,dialCode:"352",flag:"\u{1F1F1}\u{1F1FA}",postCodePattern:/(L\s*([-—–]))\s*?\d{4}/},{name:"Macao",iso2:de.Macau,dialCode:"853",flag:"\u{1F1F2}\u{1F1F4}"},{name:"Madagascar",iso2:de.Madagascar,dialCode:"261",flag:"\u{1F1F2}\u{1F1EC}"},{name:"Malawi",iso2:de.Malawi,dialCode:"265",flag:"\u{1F1F2}\u{1F1FC}"},{name:"Malaysia",iso2:de.Malaysia,dialCode:"60",flag:"\u{1F1F2}\u{1F1FE}"},{name:"Maldives",iso2:de.Maldives,dialCode:"960",flag:"\u{1F1F2}\u{1F1FB}"},{name:"Mali",iso2:de.Mali,dialCode:"223",flag:"\u{1F1F2}\u{1F1F1}"},{name:"Malta",iso2:de.Malta,dialCode:"356",flag:"\u{1F1F2}\u{1F1F9}"},{name:"Marshall Islands",iso2:de.MarshallIslands,dialCode:"692",flag:"\u{1F1F2}\u{1F1ED}"},{name:"Martinique",iso2:de.Martinique,dialCode:"596",flag:"\u{1F1F2}\u{1F1F6}"},{name:"Mauritania",iso2:de.Mauritania,dialCode:"222",flag:"\u{1F1F2}\u{1F1F7}"},{name:"Mauritius",iso2:de.Mauritius,dialCode:"230",flag:"\u{1F1F2}\u{1F1FA}"},{name:"Mayotte",iso2:de.Mayotte,dialCode:"262",flag:"\u{1F1FE}\u{1F1F9}"},{name:"Mexico",iso2:de.Mexico,dialCode:"52",flag:"\u{1F1F2}\u{1F1FD}"},{name:"Micronesia, Federated States of",iso2:de.Micronesia,dialCode:"691",flag:"\u{1F1EB}\u{1F1F2}"},{name:"Moldova, Republic of",iso2:de.Moldova,dialCode:"373",flag:"\u{1F1F2}\u{1F1E9}"},{name:"Monaco",iso2:de.Monaco,dialCode:"377",flag:"\u{1F1F2}\u{1F1E8}"},{name:"Mongolia",iso2:de.Mongolia,dialCode:"976",flag:"\u{1F1F2}\u{1F1F3}"},{name:"Montenegro",iso2:de.Montenegro,dialCode:"382",flag:"\u{1F1F2}\u{1F1EA}"},{name:"Montserrat",iso2:de.Montserrat,dialCode:"1",flag:"\u{1F1F2}\u{1F1F8}"},{name:"Morocco",iso2:de.Morocco,dialCode:"212",flag:"\u{1F1F2}\u{1F1E6}"},{name:"Mozambique",iso2:de.Mozambique,dialCode:"258",flag:"\u{1F1F2}\u{1F1FF}"},{name:"Myanmar",iso2:de.Myanmar,dialCode:"95",flag:"\u{1F1F2}\u{1F1F2}"},{name:"Namibia",iso2:de.Namibia,dialCode:"264",flag:"\u{1F1F3}\u{1F1E6}"},{name:"Nauru",iso2:de.Nauru,dialCode:"674",flag:"\u{1F1F3}\u{1F1F7}"},{name:"Nepal",iso2:de.Nepal,dialCode:"977",flag:"\u{1F1F3}\u{1F1F5}"},{name:"Netherlands",iso2:de.Netherlands,dialCode:"31",flag:"\u{1F1F3}\u{1F1F1}",postCodePattern:/[1-9][0-9]{3}\s?[a-zA-Z]{2}/},{name:"New Caledonia",iso2:de.NewCaledonia,dialCode:"687",flag:"\u{1F1F3}\u{1F1E8}"},{name:"New Zealand",iso2:de.NewZealand,dialCode:"64",flag:"\u{1F1F3}\u{1F1FF}"},{name:"Nicaragua",iso2:de.Nicaragua,dialCode:"505",flag:"\u{1F1F3}\u{1F1EE}"},{name:"Niger",iso2:de.Niger,dialCode:"227",flag:"\u{1F1F3}\u{1F1EA}"},{name:"Nigeria",iso2:de.Nigeria,dialCode:"234",flag:"\u{1F1F3}\u{1F1EC}"},{name:"Niue",iso2:de.Niue,dialCode:"683",flag:"\u{1F1F3}\u{1F1FA}"},{name:"Norfolk Island",iso2:de.NorfolkIsland,dialCode:"672",flag:"\u{1F1F3}\u{1F1EB}"},{name:"North Korea",iso2:de.NorthKorea,dialCode:"850",flag:"\u{1F1F0}\u{1F1F5}"},{name:"North Macedonia",iso2:de.NorthMacedonia,dialCode:"389",flag:"\u{1F1F2}\u{1F1F0}"},{name:"Northern Mariana Islands",iso2:de.NorthernMarianaIslands,dialCode:"1",flag:"\u{1F1F2}\u{1F1F5}"},{name:"Norway",iso2:de.Norway,dialCode:"47",flag:"\u{1F1F3}\u{1F1F4}"},{name:"Oman",iso2:de.Oman,dialCode:"968",flag:"\u{1F1F4}\u{1F1F2}"},{name:"Pakistan",iso2:de.Pakistan,dialCode:"92",flag:"\u{1F1F5}\u{1F1F0}"},{name:"Palau",iso2:de.Palau,dialCode:"680",flag:"\u{1F1F5}\u{1F1FC}"},{name:"Palestine, State of",iso2:de.Palestine,dialCode:"970",flag:"\u{1F1F5}\u{1F1F8}"},{name:"Panama",iso2:de.Panama,dialCode:"507",flag:"\u{1F1F5}\u{1F1E6}"},{name:"Papua New Guinea",iso2:de.PapuaNewGuinea,dialCode:"675",flag:"\u{1F1F5}\u{1F1EC}"},{name:"Paraguay",iso2:de.Paraguay,dialCode:"595",flag:"\u{1F1F5}\u{1F1FE}"},{name:"Peru",iso2:de.Peru,dialCode:"51",flag:"\u{1F1F5}\u{1F1EA}"},{name:"Philippines",iso2:de.Philippines,dialCode:"63",flag:"\u{1F1F5}\u{1F1ED}"},{name:"Pitcairn Islands",iso2:de.PitcairnIslands,dialCode:"649",flag:"\u{1F1F5}\u{1F1F3}"},{name:"Poland",iso2:de.Poland,dialCode:"48",flag:"\u{1F1F5}\u{1F1F1}",postCodePattern:/[0-9]{2}-[0-9]{3}/},{name:"Portugal",iso2:de.Portugal,dialCode:"351",flag:"\u{1F1F5}\u{1F1F9}"},{name:"Puerto Rico",iso2:de.PuertoRico,dialCode:"1",flag:"\u{1F1F5}\u{1F1F7}"},{name:"Qatar",iso2:de.Qatar,dialCode:"974",flag:"\u{1F1F6}\u{1F1E6}"},{name:"R\xE9union",iso2:de.Reunion,dialCode:"262",flag:"\u{1F1F7}\u{1F1EA}"},{name:"Romania",iso2:de.Romania,dialCode:"40",flag:"\u{1F1F7}\u{1F1F4}"},{name:"Russian Federation",iso2:de.Russia,dialCode:"7",flag:"\u{1F1F7}\u{1F1FA}"},{name:"Rwanda",iso2:de.Rwanda,dialCode:"250",flag:"\u{1F1F7}\u{1F1FC}"},{name:"Saint Barth\xE9lemy",iso2:de.SaintBarthelemy,dialCode:"590",flag:"\u{1F1E7}\u{1F1F1}"},{name:"Saint Helena, Ascension and Tristan da Cunha",iso2:de.SaintHelena,dialCode:"290",flag:"\u{1F1F8}\u{1F1ED}"},{name:"Saint Kitts and Nevis",iso2:de.SaintKittsAndNevis,dialCode:"1",flag:"\u{1F1F0}\u{1F1F3}"},{name:"Saint Lucia",iso2:de.SaintLucia,dialCode:"1",flag:"\u{1F1F1}\u{1F1E8}"},{name:"Saint Martin (French part)",iso2:de.SaintMartin,dialCode:"590",flag:"\u{1F1F2}\u{1F1EB}"},{name:"Saint Pierre and Miquelon",iso2:de.SaintPierreAndMiquelon,dialCode:"508",flag:"\u{1F1F5}\u{1F1F2}"},{name:"Saint Vincent and the Grenadines",iso2:de.SaintVincentAndTheGrenadines,dialCode:"1",flag:"\u{1F1FB}\u{1F1E8}"},{name:"Samoa",iso2:de.Samoa,dialCode:"685",flag:"\u{1F1FC}\u{1F1F8}"},{name:"San Marino",iso2:de.SanMarino,dialCode:"378",flag:"\u{1F1F8}\u{1F1F2}"},{name:"Sao Tome and Principe",iso2:de.SaoTomeAndPrincipe,dialCode:"239",flag:"\u{1F1F8}\u{1F1F9}"},{name:"Saudi Arabia",iso2:de.SaudiArabia,dialCode:"966",flag:"\u{1F1F8}\u{1F1E6}"},{name:"Senegal",iso2:de.Senegal,dialCode:"221",flag:"\u{1F1F8}\u{1F1F3}"},{name:"Serbia",iso2:de.Serbia,dialCode:"381",flag:"\u{1F1F7}\u{1F1F8}"},{name:"Seychelles",iso2:de.Seychelles,dialCode:"248",flag:"\u{1F1F8}\u{1F1E8}"},{name:"Sierra Leone",iso2:de.SierraLeone,dialCode:"232",flag:"\u{1F1F8}\u{1F1F1}"},{name:"Singapore",iso2:de.Singapore,dialCode:"65",flag:"\u{1F1F8}\u{1F1EC}"},{name:"Sint Maarten (Dutch Part)",iso2:de.SintMaarten,dialCode:"1",flag:"\u{1F1F8}\u{1F1FD}"},{name:"Slovakia",iso2:de.Slovakia,dialCode:"421",flag:"\u{1F1F8}\u{1F1F0}"},{name:"Slovenia",iso2:de.Slovenia,dialCode:"386",flag:"\u{1F1F8}\u{1F1EE}"},{name:"Solomon Islands",iso2:de.SolomonIslands,dialCode:"677",flag:"\u{1F1F8}
196\u{1F1E7}"},{name:"Somalia",iso2:de.Somalia,dialCode:"252",flag:"\u{1F1F8}\u{1F1F4}"},{name:"South Africa",iso2:de.SouthAfrica,dialCode:"27",flag:"\u{1F1FF}\u{1F1E6}"},{name:"South Georgia and the South Sandwich Islands",iso2:de.SouthGeorgiaAndTheSouthSandwichIslands,dialCode:"500",flag:"\u{1F1EC}\u{1F1F8}"},{name:"South Korea",iso2:de.SouthKorea,dialCode:"82",flag:"\u{1F1F0}\u{1F1F7}"},{name:"South Sudan",iso2:de.SouthSudan,dialCode:"211",flag:"\u{1F1F8}\u{1F1F8}"},{name:"Spain",iso2:de.Spain,dialCode:"34",flag:"\u{1F1EA}\u{1F1F8}",postCodePattern:/((0[1-9]|5[0-2])|[1-4][0-9])[0-9]{3}/},{name:"Sri Lanka",iso2:de.SriLanka,dialCode:"94",flag:"\u{1F1F1}\u{1F1F0}"},{name:"Sudan",iso2:de.Sudan,dialCode:"249",flag:"\u{1F1F8}\u{1F1E9}"},{name:"Suriname",iso2:de.Suriname,dialCode:"597",flag:"\u{1F1F8}\u{1F1F7}"},{name:"Svalbard and Jan Mayen",iso2:de.SvalbardAndJanMayen,dialCode:"47",flag:"\u{1F1F8}\u{1F1EF}"},{name:"Swaziland",iso2:de.Swaziland,dialCode:"268",flag:"\u{1F1F8}\u{1F1FF}"},{name:"Sweden",iso2:de.Sweden,dialCode:"46",flag:"\u{1F1F8}\u{1F1EA}",postCodePattern:/\d{3}\s?\d{2}/},{name:"Switzerland",iso2:de.Switzerland,dialCode:"41",flag:"\u{1F1E8}\u{1F1ED}"},{name:"Syrian Arab Republic",iso2:de.Syria,dialCode:"963",flag:"\u{1F1F8}\u{1F1FE}"},{name:"Taiwan",iso2:de.Taiwan,dialCode:"886",flag:"\u{1F1F9}\u{1F1FC}"},{name:"Tajikistan",iso2:de.Tajikistan,dialCode:"992",flag:"\u{1F1F9}\u{1F1EF}"},{name:"Tanzania, United Republic of",iso2:de.Tanzania,dialCode:"255",flag:"\u{1F1F9}\u{1F1FF}"},{name:"Thailand",iso2:de.Thailand,dialCode:"66",flag:"\u{1F1F9}\u{1F1ED}"},{name:"Timor-Leste",iso2:de.TimorLeste,dialCode:"670",flag:"\u{1F1F9}\u{1F1F1}"},{name:"Togo",iso2:de.Togo,dialCode:"228",flag:"\u{1F1F9}\u{1F1EC}"},{name:"Tokelau",iso2:de.Tokelau,dialCode:"690",flag:"\u{1F1F9}\u{1F1F0}"},{name:"Tonga",iso2:de.Tonga,dialCode:"676",flag:"\u{1F1F9}\u{1F1F4}"},{name:"Trinidad and Tobago",iso2:de.TrinidadAndTobago,dialCode:"1",flag:"\u{1F1F9}\u{1F1F9}"},{name:"Tunisia",iso2:de.Tunisia,dialCode:"216",flag:"\u{1F1F9}\u{1F1F3}"},{name:"Turkey",iso2:de.Turkey,dialCode:"90",flag:"\u{1F1F9}\u{1F1F7}"},{name:"Turkmenistan",iso2:de.Turkmenistan,dialCode:"993",flag:"\u{1F1F9}\u{1F1F2}"},{name:"Turks and Caicos Islands",iso2:de.TurksAndCaicosIslands,dialCode:"1",flag:"\u{1F1F9}\u{1F1E8}"},{name:"Tuvalu",iso2:de.Tuvalu,dialCode:"688",flag:"\u{1F1F9}\u{1F1FB}"},{name:"U.S. Virgin Islands",iso2:de.USVirginIslands,dialCode:"1",flag:"\u{1F1FB}\u{1F1EE}"},{name:"Uganda",iso2:de.Uganda,dialCode:"256",flag:"\u{1F1FA}\u{1F1EC}"},{name:"Ukraine",iso2:de.Ukraine,dialCode:"380",flag:"\u{1F1FA}\u{1F1E6}"},{name:"United Arab Emirates",iso2:de.UnitedArabEmirates,dialCode:"971",flag:"\u{1F1E6}\u{1F1EA}"},{name:"United Kingdom",iso2:de.UnitedKingdom,dialCode:"44",flag:"\u{1F1EC}\u{1F1E7}",postCodePattern:/[A-Za-z]{1,2}[0-9Rr][0-9A-Za-z]? [0-9][ABD-HJLNP-UW-Zabd-hjlnp-uw-z]{2}/},{name:"United States",iso2:de.UnitedStates,dialCode:"1",flag:"\u{1F1FA}\u{1F1F8}",postCodePattern:/(\d{5}(-\d{4})?)/},{name:"Uruguay",iso2:de.Uruguay,dialCode:"598",flag:"\u{1F1FA}\u{1F1FE}"},{name:"Uzbekistan",iso2:de.Uzbekistan,dialCode:"998",flag:"\u{1F1FA}\u{1F1FF}"},{name:"Vanuatu",iso2:de.Vanuatu,dialCode:"678",flag:"\u{1F1FB}\u{1F1FA}"},{name:"Vatican City",iso2:de.VaticanCity,dialCode:"39",flag:"\u{1F1FB}\u{1F1E6}"},{name:"Venezuela",iso2:de.Venezuela,dialCode:"58",flag:"\u{1F1FB}\u{1F1EA}"},{name:"Vietnam",iso2:de.Vietnam,dialCode:"84",flag:"\u{1F1FB}\u{1F1F3}"},{name:"Wallis and Futuna",iso2:de.WallisAndFutuna,dialCode:"681",flag:"\u{1F1FC}\u{1F1EB}"},{name:"Western Sahara",iso2:de.WesternSahara,dialCode:"212",flag:"\u{1F1EA}\u{1F1ED}"},{name:"Yemen",iso2:de.Yemen,dialCode:"967",flag:"\u{1F1FE}\u{1F1EA}"},{name:"Zambia",iso2:de.Zambia,dialCode:"260",flag:"\u{1F1FF}\u{1F1F2}"},{name:"Zimbabwe",iso2:de.Zimbabwe,dialCode:"263",flag:"\u{1F1FF}\u{1F1FC}"},{name:"\xC5land Islands",iso2:de.AlandIslands,dialCode:"358",flag:"\u{1F1E6}\u{1F1FD}"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();var YEe=["countryInput"],QEe=n=>({country:n});function KEe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",11),g(2,"close"),p()()}}function XEe(n,t){if(n&1&&(d(0,"mat-option",12)(1,"span",13),g(2),p(),O(3,"span",14),v(4,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(2),z(r.flag),l(),m("innerHTML",ft(4,3,r.name,e.searchText),Ut)}}function ZEe(n,t){n&1&&(d(0,"div")(1,"span",18),g(2,"contact.no-country-found"),p()())}function JEe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"truncate"),v(3,"translate"),p()),n&2){let r=b
196(2);l(),j(" ",ft(3,6,"contact.no-country-matching",Xe(9,QEe,ds(2,1,r.searchText,!0,6,"...")))," ")}}function eIe(n,t){if(n&1){let r=B();d(0,"mat-option",15)(1,"div",16),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,ZEe,3,0,"div",17)(3,JEe,4,11,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function tIe(n,t){if(n&1&&(d(0,"mat-hint"),g(1),p()),n&2){let r=b();l(),z(r.autocompleteHint)}}function iIe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.requiredText," ")}}var Vh=class Vh{constructor(t,r,e){this.fb=t,this.countryData=r,this.translate=e,this.labelText=this.translate.instant("contact.country"),this.requiredText=this.translate.instant("contact.country-required"),this.required=!1,this.appearance="fill",this.subscriptSizing="fixed",this.selectCountryCode=new J,this.searchText="",this.onTouched=()=>{},this.propagateChange=()=>{},this.allCountries=this.countryData.allCountries,this.initSearchData=!1,this.dirty=!1,this.countryFormGroup=this.fb.group({country:[""]})}ngOnInit(){this.filteredCountries=this.countryFormGroup.get("country").valueChanges.pipe(Wi(150),et(t=>{let r;typeof t=="string"||!t?r=null:r=t,this.updateView(r),t===null&&this.clear()}),W(t=>t?typeof t=="string"?t:t.name:""),xr(),ii(t=>Z(this.fetchCountries(t))),Si())}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,t?this.countryFormGroup.disable({emitEvent:!1}):this.countryFormGroup.enable({emitEvent:!1})}validate(){return this.countryFormGroup.valid?null:{countryFormGroup:!1}}writeValue(t){this.dirty=!0;let r=fn(t)?this.allCountries.find(e=>e.name===t):null;this.modelValue=r||null,this.countryFormGroup.get("country").patchValue(this.modelValue||"",{emitEvent:!1}),this.selectCountryCode.emit(this.modelValue?this.modelValue.iso2:null)}displayCountryFn(t){return t?`${t.flag} ${t.name}`:void 0}onFocus(){this.dirty&&(this.countryFormGroup.get("country").updateValueAndValidity({onlySelf:!0}),this.dirty=!1)}textIsNotEmpty(t){return t&&t.length>0}clear(){this.countryFormGroup.get("country").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.countryInput.nativeElement.blur(),this.countryInput.nativeElement.focus()},0)}fetchCountries(t){if(this.searchText=t,this.initSearchData||(this.allCountries.forEach(r=>{r.searchText=`${r.name} ${r.iso2}`.toLowerCase()}),this.initSearchData=!0),fn(t)){let r=t.toLowerCase();return this.allCountries.filter(e=>e.searchText.includes(r))}return this.allCountries}updateView(t){this.modelValue?.name!==t?.name&&(this.modelValue=t,this.propagateChange(this.modelValue?.name),t&&this.selectCountryCode.emit(t.iso2))}};Vh.\u0275fac=function(r){return new(r||Vh)(h(Ai),h(Np),h(Ge))},Vh.\u0275cmp=L({type:Vh,selectors:[["tb-country-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(YEe,7),r&2){let i;Q(i=K())&&(e.countryInput=i.first)}},inputs:{labelText:"labelText",requiredText:"requiredText",autocompleteHint:"autocompleteHint",disabled:"disabled",required:"required",appearance:"appearance",subscriptSizing:"subscriptSizing"},outputs:{selectCountryCode:"selectCountryCode"},features:[ne([Np,{provide:ye,useExisting:he(()=>Vh),multi:!0},{provide:zn,useExisting:he(()=>Vh),multi:!0}])],decls:14,vars:16,consts:[["countryInput",""],["countryAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","subscriptSizing","appearance"],["matInput","","type","text","formControlName","country",3,"focusin","blur","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[2,"font-size","20px","padding-right","4px"],[3,"innerHTML"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate",""]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",3)(1,"mat-label"),g(2),p(),d(3,"input",4,0),T("focusin",function(){return D(i),M(e.onFocus())})("blur",function(){return D(i),M(e.onTouched())}),p(),x(5,KEe,3,0,"button",5),d(6,"mat-autocomplete",6,1),x(8,XEe,5,6,"mat-option",7),v(9,"async"),x(10,eIe,5,3,"mat-option",8),v(11,"async"),p(),x(12,tIe,2,1,"mat-hint",9)(13,iIe,2,1,"mat-error",9),p()}if(r&2){let i,o=me(7);te("subscriptSizing",e.subscriptSizing),m("formGroup",e.countryFormGroup)("appearance",e.appearance),l(2),z(e.labelText),l(
196),m("required",e.required)("matAutocomplete",o),l(2),m("ngIf",e.countryFormGroup.get("country").value&&!e.disabled),l(),m("displayWith",e.displayCountryFn),l(2),m("ngForOf",C(9,12,e.filteredCountries)),l(2),m("ngIf",!((i=C(11,14,e.filteredCountries))!=null&&i.length)),l(2),m("ngIf",e.autocompleteHint),l(),m("ngIf",e.countryFormGroup.get("country").hasError("required"))}},dependencies:[Ke,ce,jt,Pe,Se,at,ze,At,to,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi,$o],encapsulation:2});var Lh=Vh;pe([fe(),le("design:type",Object)],Lh.prototype,"required",void 0);y();y();var u9={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"67622901",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};var rIe=n=>({phoneNumber:n});function oIe(n,t){if(n&1&&(d(0,"span",12),g(1),p()),n&2){let r=b
196(2);l(),z(r.flagIcon)}}function aIe(n,t){n&1&&O(0,"mat-spinner",13)}function sIe(n,t){if(n&1&&(d(0,"mat-option",14)(1,"span",15),g(2),p(),d(3,"span"),g(4),p()()),n&2){let r=t.$implicit;m("value",r.iso2),l(2),z(r.flag),l(2),z(" "+r.name+" +"+r.dialCode)}}function lIe(n,t){if(n&1&&(d(0,"div",7),x(1,oIe,2,1,"span",8)(2,aIe,1,0,"mat-spinner",9),d(3,"mat-select",10),x(4,sIe,5,3,"mat-option",11),p()()),n&2){let r=b();l(),m("ngIf",!r.isLoad),l(),m("ngIf",r.isLoad),l(2),m("ngForOf",r.allCountries)}}function cIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"phone-input.phone-input-required")," "))}function dIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"phone-input.phone-input-validation")," "))}var bx=(()=>{let t=class t{get showFlagSelect(){return this.enableFlagsSelect&&!this.isLegacy}get isLoad(){return this.isLoading}set isLoad(e){if(this.isLoading&&(this.isLoading=e,this.defaultCountry&&this.getFlagAndPhoneNumberData(this.defaultCountry),this.phoneFormGroup&&this.phoneFormGroup.get("phoneNumber").value)){let i=this.parsePhoneNumberFromString(this.phoneFormGroup.get("phoneNumber").value);this.defineCountryFromNumber(i)}}constructor(e,i,o){this.translate=e,this.fb=i,this.countryCodeData=o,this.defaultCountry="US",this.enableFlagsSelect=!0,this.required=!0,this.floatLabel="auto",this.appearance="fill",this.label=this.translate.instant("phone-input.phone-input-label"),this.allCountries=this.countryCodeData.allCountries,this.phonePlaceholder="+12015550123",this.isLoading=!0,this.isLegacy=!1,this.baseCode=127397,this.countryCallingCode="+",this.changeSubscriptions=[],this.validators=[this.validatePhoneNumber()],this.propagateChange=a=>{},import("./chunk-YUDZDLK4.js").then(a=>{this.parsePhoneNumberFromString=a.parsePhoneNumberFromString,this.getExampleNumber=a.getExampleNumber}).then(()=>this.isLoad=!1)}ngOnInit(){this.required&&this.validators.push(ke.required),this.phoneFormGroup=this.fb.group({country:[null,[]],phoneNumber:[null,this.validators]}),this.changeSubscriptions.push(this.phoneFormGroup.get("phoneNumber").valueChanges.subscribe(e=>{let i=null;e&&this.parsePhoneNumberFromString&&(i=this.parsePhoneNumberFromString(e),this.defineCountryFromNumber(i)),this.updateModel(i)})),this.changeSubscriptions.push(this.phoneFormGroup.get("country").valueChanges.subscribe(e=>{if(e){let i=this.countryCallingCode;this.getFlagAndPhoneNumberData(e);let o=this.phoneFormGroup.get("phoneNumber").value;o&&i!=="+"&&i!==this.countryCallingCode&&o.includes(i)&&(o=o.replace(i,this.countryCallingCode),this.phoneFormGroup.get("phoneNumber").patchValue(o))}}))}ngOnDestroy(){for(let e of this.changeSubscriptions)e.unsubscribe()}focus(){let e=this.phoneFormGroup.get("phoneNumber");e.value||e.patchValue(this.countryCallingCode,{emitEvent:!0})}getFlagAndPhoneNumberData(e){this.enableFlagsSelect&&(this.flagIcon=this.getFlagIcon(e)),this.getPhoneNumberData(e)}getPhoneNumberData(e){if(this.getExampleNumber){let i=this.getExampleNumber(e,u9);this.phonePlaceholder=i.number,this.countryCallingCode=`+${this.enableFlagsSelect?i.countryCallingCode:""}`}}getFlagIcon(e){return String.fromCodePoint(...e.split("").map(i=>this.baseCode+i.charCodeAt(0)))}updateModelValueInFormat(e){this.modelValue=e.format("E.164")}validatePhoneNumber(){return e=>{let i=e.value;if(i&&this.parsePhoneNumberFromString){let o=this.parsePhoneNumberFromString(i);if(!o?.isValid()||!o?.isPossible())return{invalidPhoneNumber:{valid:!1}}}return null}}defineCountryFromNumber(e){let i=this.phoneFormGroup.get("country").value;e?.country&&e?.country!==i&&this.phoneFormGroup.get("country").patchValue(e.country,{emitEvent:!0})}validate(){let e=this.phoneFormGroup.get("phoneNumber");return e.valid||this.countryCallingCode===e.value?null:{phoneFormGroup:!1}}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,e?this.phoneFormGroup.disable({emitEvent:!1}):this.phoneFormGroup.enable({emitEvent:!1})}writeValue(e){this.modelValue=e;let i=this.defaultCountry;if(this.parsePhoneNumberFromString){if(this.phoneFormGroup.get("phoneNumber").clearValidators(),this.phoneFormGroup.get("phoneNumber").setValidators(this.validators),e){let o=this.parsePhoneNumberFromString(e);if(o?.isValid()&&o?.isPossible())i=o?.country||this.defaultCountry,this.updateModelValueInFormat(o),this.isLegacy=!1;else{let a=[ke.maxLength(255)];this.required&&a.push(ke.required),this.phoneFormGroup.get("phoneNumber").setValidators(a),this.isLegacy=!0}}else this.isLegacy=!1;
196this.phoneFormGroup.updateValueAndValidity({emitEvent:!1}),this.getFlagAndPhoneNumberData(i)}this.phoneFormGroup.reset({phoneNumber:e,country:i},{emitEvent:!1})}updateModel(e){let i=this.phoneFormGroup.get("phoneNumber");i.value==="+"||i.value===this.countryCallingCode?this.propagateChange(null):i.valid?(this.modelValue=i.value,e&&this.updateModelValueInFormat(e),this.propagateChange(this.modelValue)):this.propagateChange(null)}};t.\u0275fac=function(i){return new(i||t)(h(Ge),h(Wt),h(Np))},t.\u0275cmp=L({type:t,selectors:[["tb-phone-input"]],inputs:{disabled:"disabled",defaultCountry:"defaultCountry",enableFlagsSelect:"enableFlagsSelect",required:"required",floatLabel:"floatLabel",appearance:"appearance",placeholder:"placeholder",label:"label"},features:[ne([Np,{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}])],decls:11,vars:15,consts:[[3,"formGroup"],[1,"phone-input-container"],["class","flags-select-container",4,"ngIf"],[1,"phone-input",3,"appearance","floatLabel"],["formControlName","phoneNumber","type","tel","matInput","","autocomplete","off",3,"focus","placeholder","required"],[3,"innerHTML"],[4,"ngIf"],[1,"flags-select-container"],["class","flag-container",4,"ngIf"],["diameter","20","class","flag-loader",4,"ngIf"],["formControlName","country",1,"country-select"],[3,"value",4,"ngFor","ngForOf"],[1,"flag-container"],["diameter","20",1,"flag-loader"],[3,"value"],[2,"font-size","20px"]],template:function(i,o){i&1&&(d(0,"form",0)(1,"div",1),x(2,lIe,5,3,"div",2),d(3,"mat-form-field",3)(4,"mat-label"),g(5),p(),d(6,"input",4),T("focus",function(){return o.focus()}),p(),O(7,"mat-hint",5),v(8,"translate"),x(9,cIe,3,3,"mat-error",6)(10,dIe,3,3,"mat-error",6),p()()()),i&2&&(m("formGroup",o.phoneFormGroup),l(2),m("ngIf",o.showFlagSelect),l(),m("appearance",o.appearance)("floatLabel",o.floatLabel),l(2),z(o.label),l(),te("placeholder",o.placeholder),m("required",o.required),l(),te("innerHTML",ft(8,10,"phone-input.phone-input-hint",Xe(13,rIe,o.phonePlaceholder)),Ut),l(2),m("ngIf",o.phoneFormGroup.get("phoneNumber").hasError("required")),l(),m("ngIf",o.phoneFormGroup.get("phoneNumber").hasError("invalidPhoneNumber")))},dependencies:[Ke,ce,at,ze,At,to,ni,Kn,xt,Za,ur,ut,xe,We,St,$e,Qe,be],styles:['@charset "UTF-8";[_nghost-%COMP%]     .flag-loader{position:absolute;top:50%;left:0;transform:translateY(-50%)}[_nghost-%COMP%]     .phone-input-container{display:flex}[_nghost-%COMP%]     .phone-input-container .phone-input{width:100%}[_nghost-%COMP%]     .flags-select-container{display:flex;align-items:center;position:relative;width:50px;height:56px;margin-right:5px}[_nghost-%COMP%]     .flag-container{position:absolute;font-size:20px;top:50%;left:0;transform:translateY(-50%)}[_nghost-%COMP%]     .country-select{width:45px;height:30px}[_nghost-%COMP%]     .country-select .mat-mdc-select-trigger{height:100%}[_nghost-%COMP%]     .country-select .mat-mdc-select-value{visibility:hidden}']});let n=t;return n})();function mIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"contact.city-max-length")," "))}function uIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"contact.state-max-length")," "))}function hIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"contact.postal-code-invalid")," "))}function fIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"user.invalid-email-format")," "))}var AD=(()=>{let t=class t{constructor(){this.phoneInputDefaultCountry="US"}changeCountry(e){this.phoneInputDefaultCountry=e??"US",setTimeout(()=>{this.parentForm.get("phone").setValue(this.parentForm.get("phone").value)})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tb-contact"]],inputs:{parentForm:"parentForm",isEdit:"isEdit"},decls:36,vars:11,consts:[[3,"formGroup"],["formControlName","country",3,"selectCountryCode"],[1,"tb-form-row","column-xs","tb-standard-fields","no-border","no-padding"],["subscriptSizing","dynamic",1,"flex"],["translate",""],["matInput","","formControlName","city"],[4,"ngIf"],["matInput","","formControlName","state"],["matInput","","formControlName","zip"],[1,"mat-block"],["matInput","","formControlName","address"],["matInput","","formControlName","address2"],["formControlName","phone",3,"required","defaultCountry","label","enableFlagsSelect"],["matInput","","type","email","formControlName","email"]],template:function(i,o){i&1&&(d(0,"section",0)(1,"tb-country-autocomplete",1),T("selectCountryCode",function(s){return o.changeCountry(s)}),p(),d(2,"div",2)(3,"mat-form-field",3)(4,"mat-label",4),g(5,"contact.city"),p(),O(6,"input",5),x(7,mIe,3,3,"mat-error",6),O(8,"mat-hint"),p(),d(9,"mat-form-field",3)(10,"mat-label",4),g(11,"contact.state"),p(),O(12,"input",7),x(13,uIe,3,3,"mat-error",6),O(14,"mat-hint"),p(),d(15,"mat-form-field",3)(16,"mat-label",4),g(17,"contact.postal-code"),p(),O(18,"input",8),x(19,hIe,3,3,"mat-error",6),O(20,"mat-hint"),p()(),d(21,"mat-form-field",9)(22,"mat-label",4),g(23,"contact.address"),p(),O(24,"input",10),p(),d(25,"mat-form-field",9)(26,"mat-label",4),g(27,"contact.address2"),p(),O(28,"input",11),p(),O(29,"tb-phone-input",12),v(30,"translate"),d(31,"mat-form-field",9)(32,"mat-label",4),g(33,"contact.email"),p(),O(34,"input",13),x(35,fIe,3,3,"mat-error",6),p()()),i&2&&(m("formGroup",o.parentForm),l(7),m("ngIf",o.parentForm.get("city").hasError("maxlength")),l(6),m("ngIf",o.parentForm.get("state").hasError("maxlength")),l(6),m("ngIf",o.parentForm.get("zip").hasError("pattern")),l(10),te("label",C(30,9,"contact.phone")),m("required",!1)("defaultCountry",o.phoneInputDefaultCountry)("enableFlagsSelect",!0),l(6),m("ngIf",o.parentForm.get("email").hasError("email")))},dependencies:[ce,jt,at,ze,At,to,ni,ut,xe,We,St,$e,Qe,Lh,bx,be],encapsulation:2});let n=t;return n})();var vIe={};Ae(vIe,{WidgetsBundleSearchComponent:()=>py});y();var bIe=["searchInput"];function _Ie(n,t){if(n&1){let r=B();d(0,"button",3),T("click",function(i){D(r);let o=b();return M(o.clear(i))}),d(1,"mat-icon",4),g(2,"close"),p()()}}var py=(()=>
196{let t=class t{constructor(){this.focus=!1,this.propagateChange=e=>{}}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.searchText=e}updateSearchText(){this.updateView()}updateView(){this.propagateChange(this.searchText)}clear(e){e.preventDefault(),e.stopPropagation(),this.searchText="",this.updateView()}toggleFocus(){this.focus=!this.focus}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["tb-widgets-bundle-search"]],viewQuery:function(i,o){if(i&1&&ae(bIe,5),i&2){let a;Q(a=K())&&(o.searchInput=a.first)}},inputs:{placeholder:"placeholder"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:5,vars:5,consts:[[1,"input-wrapper","flex","items-center","justify-start","gap-4"],["type","text",3,"ngModelChange","focus","blur","ngModel","placeholder"],["type","button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-icon-button","",3,"click"],[1,"close"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"mat-icon"),g(2,"search"),p(),d(3,"input",1),bi("ngModelChange",function(s){return gi(o.searchText,s)||(o.searchText=s),s}),T("ngModelChange",function(){return o.updateSearchText()})("focus",function(){return o.toggleFocus()})("blur",function(){return o.toggleFocus()}),p(),x(4,_Ie,3,0,"button",2),p()),i&2&&(Y("focus",o.focus),l(3),fi("ngModel",o.searchText),m("placeholder",o.placeholder),l(),m("ngIf",o.searchText))},dependencies:[ce,Pe,Se,ut,xe,eo],styles:[`@charset "UTF-8";.input-wrapper{background:#fff3;border-radius:8px;color:#ffffffd6;padding:5px 8px 5px 16px;height:46px}.input-wrapper input{width:100%;height:100%;padding:0;font-size:20px;outline:none;border:none;background-color:transparent;color:#fff}.input-wrapper input::placeholder{color:#fff;opacity:.6;line-height:26px}.input-wrapper.focus{background:#fff;color:#0000008a}.input-wrapper.focus input{color:#000;opacity:.6}.input-wrapper.focus .close{color:#000!important;opacity:.54}
197`],encapsulation:2});let n=t;return n})();var yIe={};Ae(yIe,{SelectableColumnsPipe:()=>OD});y();var OD=(()=>{let t=class t{transform(e){return e.filter(i=>i.selectable)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"selectableColumns",type:t,pure:!0});let n=t;return n})();var Ske={};Ae(Ske,{GroupPermissionsComponent:()=>RD});y();y();y();function h9(n,t){return n?.roleId?.id===t?.roleId?.id&&n.entityGroupId?.id===t.entityGroupId?.id}var PD=class{constructor(t,r){this.roleService=t,this.translate=r,this.groupPermissionsSubject=new Gn([]),this.pageDataSubject=ne
197w Gn(yr()),this.pageData$=this.pageDataSubject.asObservable(),this.selection=new Wc(!0,[])}connect(t){return this.groupPermissionsSubject.asObservable()}disconnect(t){this.groupPermissionsSubject.complete(),this.pageDataSubject.complete()}loadGroupPermissions(t,r,e,i=!1){i&&(this.allGroupPermissions=null);let o=new or;return this.fetchGroupPermissions(t,r,e).pipe(et(()=>{this.selection.clear()}),vt(()=>Z(yr()))).subscribe(a=>{this.groupPermissionsSubject.next(a.data),this.pageDataSubject.next(a),o.next(a)}),o}fetchGroupPermissions(t,r,e){return this.getAllGroupPermissions(t,r).pipe(W(i=>e.filterData(i)))}getAllGroupPermissions(t,r){if(!this.allGroupPermissions){let e,i;t?(i=t.type===G.USER,i?e=this.roleService.getUserGroupPermissions(t.id.id):e=this.roleService.getEntityGroupPermissions(t.id.id)):(i=!0,r&&r.length?e=this.roleService.loadUserGroupPermissionInfos(r):e=Z([])),this.allGroupPermissions=e.pipe(W(o=>{for(let a of o)if(r&&(a.sourceGroupPermission=r.find(s=>h9(a,s))),a.roleName=a.role.name,i)if(a.roleTypeName=this.translate.instant(`role.display-type.${a.role.type}`),a.entityGroupType?a.entityGroupTypeName=this.translate.instant(ta.get(a.entityGroupType).typePlural):a.entityGroupTypeName="",a.entityGroupOwnerId){let s=a.entityGroupOwnerName,c=a.entityGroupOwnerId.entityType;s+=` (${this.translate.instant(ta.get(c).type)})`,a.entityGroupOwnerFullName=s}else a.entityGroupOwnerFullName="";else{let s=a.userGroupOwnerName,c=a.userGroupOwnerId.entityType;s+=` (${this.translate.instant(ta.get(c).type)})`,a.userGroupOwnerFullName=s}return o}),bu(1),hu())}return this.allGroupPermissions}isAllSelected(){let t=this.selection.selected.length;return this.groupPermissionsSubject.pipe(W(r=>t===this.selectableGroupPermissionsCount(r)))}isEmpty(){return this.groupPermissionsSubject.pipe(W(t=>!t.length))}total(){return this.pageDataSubject.pipe(W(t=>t.totalElements))}masterToggle(){this.groupPermissionsSubject.pipe(et(t=>{this.selection.selected.length===this.selectableGroupPermissionsCount(t)?this.selection.clear():t.forEach(e=>{e.readOnly||this.selection.select(e)})}),$n(1)).subscribe()}selectableGroupPermissionsCount(t){return t.filter(r=>!r.readOnly).length}};var IIe={};Ae(IIe,{GroupPermissionDialogComponent:()=>my});y();var f9=n=>[n];function CIe(n,t){n&1&&O(0,"mat-progress-bar",22)}function wIe(n,t){n&1&&O(0,"div",23)}function xIe(n,t){if(n&1&&(d(0,"mat-option",24),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",C(2,2,e.roleTypeTranslations.get(r))," ")}}function SIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"role.role-type-required")," "))}function TIe(n,t){if(n&1&&(d(0,"section",10)(1,"label",11),g(2,"group-permission.entity-group"),p(),d(3,"section",25),O(4,"tb-owner-autocomplete",26)(5,"tb-entity-group-select",27),p()()),n&2){let r=b
197();l(4),Y("!hidden",r.data.groupPermissionsMode!=="group"),l(),Y("!hidden",!r.groupPermissionFormGroup.get("entityGroupOwnerId").value),m("ownerId",r.groupPermissionFormGroup.get("entityGroupOwnerId").value)("excludeGroupTypes",Xe(6,f9,r.entityType.USER))}}function EIe(n,t){if(n&1&&(d(0,"section",10)(1,"label",11),g(2,"group-permission.user-group"),p(),d(3,"section",25),O(4,"tb-owner-autocomplete",28)(5,"tb-entity-group-select",29),p()()),n&2){let r=b();l(5),Y("!hidden",!r.groupPermissionFormGroup.get("userGroupOwnerId").value),m("ownerId",r.groupPermissionFormGroup.get("userGroupOwnerId").value)("allowedGroupTypes",Xe(4,f9,r.entityType.USER))}}var my=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f,_){super(e,i,u),this.store=e,this.router=i,this.data=o,this.roleService=a,this.userPermissionsService=s,this.errorStateMatcher=c,this.dialogRef=u,this.fb=f,this.destroyRef=_,this.isAdd=this.data.isAdd,this.isUserGroup=this.data.isUserGroup,this.groupPermission=this.data.groupPermission,this.roleType=ul,this.roleTypes=Object.keys(ul),this.roleTypeTranslations=VS,this.entityType=G,this.submitted=!1,this.isUserGroup?(this.groupPermission.role&&this.groupPermission.role.type!==ul.GROUP&&(this.groupPermission.entityGroupId=null,this.groupPermission.entityGroupType=null),(this.isAdd||this.data.groupPermissionsMode==="registration")&&(this.groupPermission.entityGroupOwnerId=this.userPermissionsService.getUserOwnerId())):this.isAdd&&(this.groupPermission.role={type:ul.GROUP,name:null,permissions:null},this.groupPermission.userGroupOwnerId=this.userPermissionsService.getUserOwnerId())}ngOnInit(){this.groupPermissionFormGroup=this.fb.group({role:this.fb.group({type:[null,ke.required],id:[null,ke.required]}),entityGroupOwnerId:[null,ke.required],entityGroupId:[null,ke.required],userGroupOwnerId:[null,ke.required],userGroupId:[null,ke.required]}),this.groupPermissionFormGroup.reset(this.groupPermission,{emitEvent:!1}),this.updateEnabledState(),this.isUserGroup&&this.groupPermissionFormGroup.get("role.type").valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateEnabledState()})}updateEnabledState(){this.isUserGroup?(this.groupPermissionFormGroup.get("role.type").enable({emitEvent:!1}),this.groupPermissionFormGroup.get("userGroupOwnerId").disable({emitEvent:!1}),this.groupPermissionFormGroup.get("userGroupId").disable({emitEvent:!1})):(this.groupPermissionFormGroup.get("role.type").disable({emitEvent:!1}),this.groupPermissionFormGroup.get("userGroupOwnerId").enable({emitEvent:!1}),this.groupPermissionFormGroup.get("userGroupId").enable({emitEvent:!1}));let e=this.groupPermissionFormGroup.get("role.type").value;this.isUserGroup&&e===ul.GROUP?(this.groupPermissionFormGroup.get("entityGroupOwnerId").enable({emitEvent:!1}),this.groupPermissionFormGroup.get("entityGroupId").enable({emitEvent:!1})):(this.groupPermissionFormGroup.get("entityGroupOwnerId").disable({emitEvent:!1}),this.groupPermissionFormGroup.get("entityGroupId").disable({emitEvent:!1}))}isErrorState(e,i){let o=this.errorStateMatcher.isErrorState(e,i),a=!!(e&&e.invalid&&this.submitted);return o||a}cancel(){this.dialogRef.close(!1)}save(){this.submitted=!0,this.groupPermissionFormGroup.valid&&(this.groupPermission=re(re({},this.groupPermission),this.groupPermissionFormGroup.getRawValue()),this.groupPermission.roleId={entityType:G.ROLE,id:this.groupPermission.role.id.id},this.groupPermission.role.type!==ul.GROUP&&(this.groupPermission.entityGroupId=null,this.groupPermission.entityGroupType=null),this.data.groupPermissionsMode==="group"?this.roleService.saveGroupPermission(this.groupPermission).subscribe(()=>{this.dialogRef.close(!0)}):this.dialogRef.close(this.groupPermission))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(Pv),h(So),h(Nn,4),h(en),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-group-permission-dialog"]],features:[ne([{provide:Nn,useExisting:t}]),Ce],decls:38,vars:34,consts:[[2,"min-width","600px",3,"ngSubmit","formGroup"],["color","primary",1,"flex","flex-row"],["translate",""],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[3,"disabled"],[1,"flex","flex-col"],["translate","",1,"tb-title","no-padding"],["formGroupName","role",1,"flex","flex-row","gap-2"],[1,"mat-block",2,"width","200px"],["matInput","","required","","formControlName","type"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["required","","formControlName","id",1,"flex-1",3,"entitySubtype","entityType","useFullEntityId"],["class","flex flex-col",4,"ngIf"],["mat-dialog-actions","",1,"flex","flex-row"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-button","","mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"],[3,"value"],[1,"flex","flex-row","gap-2"],["formControlName","entityGroupOwnerId","required","","placeholderText","group-permission.group-owner","notFoundText","group-permission.no-owners-matching","requiredText","group-permission.target-owner-required"],["formControlName","entityGroupId","required","","placeholderText","entity-group.select-entity-group","notFoundText","entity-group.no-entity-groups-matching","requiredText","entity-group.target-entity-group-required",1,"flex-1",3,"ownerId","excludeGroupTypes"],["formControlName","userGroupOwnerId","required","","placeholderText","group-permission.user-group-owner","notFoundText","group-permission.no-owners-matching","requiredText","group-permission.target-user-group-owner-required"],["formControlName","userGroupId","required","","placeholderText","entity-group.select-user-group","notFoundText","entity-group.no-user-groups-matching","requiredText","entity-group.target-user-group-required",1,"flex-1",3,"ownerId","allowedGroupTypes"]],template:function(i,o){i&1&&(d(0,"form",0),T("ngSubmit",function(){return o.save()}),d(1,"mat-toolbar",1)(2,"h2",2),g(3),p(),O(4,"span",3),d(5,"button",4),T("click",function(){return o.cancel()}),d(6,"mat-icon",5),g(7,"close"),p()()(),x(8,CIe,1,0,"mat-progress-bar",6),v(9,"async"),x(10,wIe,1,0,"div",7),v(11,"async"),d(12,"div",8)(13,"fieldset",9),v(14,"async"),d(15,"section",10)(16,"label",11),g(17,"role.role"),p(),d(18,"section",12)(19,"mat-form-field",13)(20,"mat-label",2),g(21,"role.role-type"),p(),d(22,"mat-select",14),x(23,xIe,3,4,"mat-option",15),p(),x(24,SIe,3,3,"mat-error",16),p(),O(25,"tb-entity-autocomplete",17),p()(),x(26,TIe,6,8,"section",18)(27,EIe,6,6,"section",18),p()(),d(28,"div",19),O(29,"span",3),d(30,"button",20),v(31,"async"),T("click",function(){return o.cancel()}),g(32),v(33,"translate"),p(),d(34,"button",21),v(35,"async"),g(36),v(37,"translate"),p()()()),i&2&&(m("formGroup",o.groupPermissionFormGroup),l(3),z(o.isAdd?"group-permission.add-group-permission":"group-permission.edit-group-permission"),l(5),m("ngIf",C(9,20,o.isLoading$)),l(2),m("ngIf",!C(11,22,o.isLoading$)),l(3),m("disabled",C(14,24,o.isLoading$)),l(6),Y("!hidden",!o.isUserGroup),l(4),m("ngForOf",o.roleTypes),l(),m("ngIf",o.groupPermissionFormGroup.get("role.type").hasError("required")),l(),Y("!hidden",!o.groupPermissionFormGroup.get("role.type").value),m("entitySubtype",o.groupPermissionFormGroup.get("role.type").value)("entityType",o.entityType.ROLE)("useFullEntityId",!0),l(),m("ngIf",o.isUserGroup&&o.groupPermissionFormGroup.get("role.type").value===o.roleType.GROUP),l(),m("ngIf",!o.isUserGroup),l(3),m("disabled",C(31,26,o.isLoading$)),l(2),j(" ",C(33,28,"action.cancel")," "),l(2),m("disabled",C(35,30,o.isLoading$)||o.groupPermissionFormGroup.invalid||!o.groupPermissionFormGroup.dirty),l(2),j(" ",C(37,32,o.isAdd?"action.add":"action.save")," "))},dependencies:[Ke,ce,jt,yt,Pe,Se,Jr,ze,At,ni,ir,gr,Dn,Kn,xt,ur,xe,We,St,$e,Qe,Ka,Na,wp,xp,Ve,be],styles:['@charset "UTF-8";']});let n=t;return n})();var WIe={};Ae(WIe,{ViewRoleDialogComponent:()=>eV});y();var X3={};Ae(X3,{OperationTypeListComponent:()=>_x});y();var kIe=["operationTypeInput"],DIe=["operationTypeAutocomplete"],MIe=["chipList"],AIe=n=>({operation:n});function OIe(n,t){n&1&&(d(0,"mat-icon",13),g(1,"close"),p())}function PIe(n,t){if(n&1){let r=B();d(0,"mat-chip-row",11),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,OIe,2,0,"mat-icon",12),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",r.name," "),l(),m("ngIf",!e.disabled)}}function RIe(n,t){if(n&1&&(d(0,"mat-option",14),O(1,"span",15),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function FIe(n,t){if(n&1&&(d(0,"mat-option",14)(1,"span"),g(2),v(3,"async"),p()()),n&2){let r=b
197();m("value",null),l(2),j(" ",C(3,2,r.translate.get("permission.operation.no-operations-matching",Xe(4,AIe,r.searchText)))," ")}}function NIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"permission.operation.operations-required")," "))}var _x=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){let i=mt(e);this.requiredValue!==i&&(this.requiredValue=i,this.updateValidators())}get groupRoleOperations(){return this.groupRoleOperationsValue}set groupRoleOperations(e){let i=mt(e);this.groupRoleOperationsValue!==i&&(this.groupRoleOperationsValue=i)}constructor(e,i,o,a){this.store=e,this.translate=i,this.userPermissionsService=o,this.fb=a,this.allOperationTypeList=[],this.operationTypeList=[],this.placeholder=this.translate.instant("permission.operation.enter-operation"),this.secondaryPlaceholder="+"+this.translate.instant("permission.operation.operation"),this.searchText="",this.dirty=!1,this.propagateChange=s=>{},this.operationTypeListFormGroup=this.fb.group({operationTypeList:[this.operationTypeList,this.required?[ke.required]:[]],operationType:[null]})}updateValidators(){this.operationTypeListFormGroup.get("operationTypeList").setValidators(this.required?[ke.required]:[]),this.operationTypeListFormGroup.get("operationTypeList").updateValueAndValidity()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.updateOperationsList(),this.filteredOperationTypeList=this.operationTypeListFormGroup.get("operationType").valueChanges.pipe(et(e=>{e&&typeof e!="string"?this.add(e):e===null&&this.clear(this.operationTypeInput.nativeElement.value)}),Pi(e=>typeof e=="string"),W(e=>e||""),Ft(e=>this.fetchOperationTypes(e)),Si())}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&i==="resource"&&o.currentValue&&this.reset()}}reset(){this.updateOperationsList(),this.validateOperationList()}updateOperationsList(){this.allOperationTypeList=[];let e;this.groupRoleOperations?e=this.userPermissionsService.getAllowedGroupRoleOperations():this.resource?e=this.userPermissionsService.getOperationsByResource(this.resource):e=[],this.allOperationTypeList=e.map(i=>({name:this.translate.instant(LS.get(i)),value:i})).sort(this.sortOperation)}sortOperation(e,i){return e.value==="ALL"||i.value==="ALL"?e.value==="ALL"?-1:1:e.name>i.name?1:e.name<i.name?-1:0}validateOperationList(){let e=!1,i=[];if(this.operationTypeList&&this.operationTypeList.length)for(let o of this.operationTypeList){let a=this.allOperationTypeList.find(s=>s.value===o.value);a?i.push(a):e=!0}e&&(this.operationTypeList=i,this.checkOperationTypeAll(),this.operationTypeListFormGroup.get("operationTypeList").setValue(this.operationTypeList)),this.operationTypeInput&&(this.operationTypeInput.nativeElement.value=""),this.operationTypeListFormGroup.get("operationType").patchValue("",{emitEvent:!1}),e&&this.notifyValueChanged(),this.dirty=!0}ngAfterViewInit(){}setDisabledState(e){this.disabled=e,e?this.operationTypeListFormGroup.disable({emitEvent:!1}):this.operationTypeListFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="",e!=null&&e.length>0?(this.operationTypeList=[],e.forEach(i=>{this.operationTypeList.push({name:LS.has(i)?this.translate.instant(LS.get(i)):"Unknown",value:i})}),this.checkOperationTypeAll(),this.operationTypeListFormGroup.get("operationTypeList").setValue(this.operationTypeList)):(this.operationTypeList=[],this.operationTypeListFormGroup.get("operationTypeList").setValue(this.operationTypeList)),this.dirty=!0}add(e){this.operationTypeList.findIndex(i=>i.value===e.value)===-1&&(this.operationTypeList.push(e),this.checkOperationTypeAll(),this.operationTypeListFormGroup.get("operationTypeList").setValue(this.operationTypeList),this.notifyValueChanged()),this.clear()}remove(e){let i=this.operationTypeList.indexOf(e);i>=0&&(this.operationTypeList.splice(i,1),this.checkOperationTypeAll(),this.operationTypeListFormGroup.get("operationTypeList").setValue(this.operationTypeList),this.notifyValueChanged(),this.clear())}notifyValueChanged(){let e=this.operationTypeList.map(i=>i.value);
197e.length||(e=null),this.propagateChange(e)}checkOperationTypeAll(){let e=this.operationTypeList.filter(i=>i.value===qo.ALL);e&&e.length?(this.secondaryPlaceholder="",this.operationTypeList.length>1&&(this.operationTypeList=e)):this.secondaryPlaceholder="+"+this.translate.instant("permission.operation.operation")}displayOperationTypeFn(e){return e?e.name:void 0}fetchOperationTypes(e){this.searchText=e;let i=this.allOperationTypeList;return e&&e.length&&(i=this.allOperationTypeList.filter(o=>o.name.toLowerCase().includes(e.toLowerCase()))),Z(i)}onFocus(){this.dirty&&(this.operationTypeListFormGroup.get("operationType").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}clear(e=""){this.operationTypeInput.nativeElement.value=e,this.operationTypeListFormGroup.get("operationType").patchValue(e,{emitEvent:!0}),setTimeout(()=>{this.operationTypeInput.nativeElement.blur(),this.operationTypeInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(So),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-operation-type-list"]],viewQuery:function(i,o){if(i&1&&(ae(kIe,5),ae(DIe,5),ae(MIe,7)),i&2){let a;Q(a=K())&&(o.operationTypeInput=a.first),Q(a=K())&&(o.operationTypeAutocomplete=a.first),Q(a=K())&&(o.chipList=a.first)}},inputs:{required:"required",disabled:"disabled",groupRoleOperations:"groupRoleOperations",resource:"resource"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),lt],decls:14,vars:16,consts:[["chipList",""],["operationTypeInput","","origin","matAutocompleteOrigin"],["operationTypeAutocomplete","matAutocomplete"],[1,"mat-block","tb-chip-list",3,"formGroup"],["formControlName","operationTypeList"],[3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","operationType","matAutocompleteOrigin","",2,"max-width","200px",3,"focusin","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[4,"ngIf"],[3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-chip-grid",4,0),x(3,PIe,3,3,"mat-chip-row",5),d(4,"input",6,1),T("focusin",function(){return D(a),M(o.onFocus())}),p()(),d(7,"mat-autocomplete",7,2),x(9,RIe,3,5,"mat-option",8),v(10,"async"),x(11,FIe,4,6,"mat-option",9),v(12,"async"),p(),x(13,NIe,3,3,"mat-error",10),p()}if(i&2){let a,s=me(2),c=me(6),u=me(8);m("formGroup",o.operationTypeListFormGroup),l(3),m("ngForOf",o.operationTypeList),l(),Y("!hidden",o.disabled),te("placeholder",o.disabled?"":!o.operationTypeList||!o.operationTypeList.length?o.placeholder:o.secondaryPlaceholder),m("matAutocompleteConnectedTo",c)("matAutocomplete",u)("matChipInputFor",s),l(3),m("displayWith",o.displayOperationTypeFn),l(2),m("ngForOf",C(10,12,o.filteredOperationTypeList)),l(2),m("ngIf",!((a=C(12,14,o.filteredOperationTypeList))!=null&&a.length)),l(2),m("ngIf",o.operationTypeListFormGroup.get("operationTypeList").hasError("required"))}},dependencies:[Ke,ce,Se,at,ze,ni,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,Mi,be],encapsulation:2});let n=t;return n})();var b9={};Ae(b9,{PermissionListComponent:()=>J3});y();var g9={};Ae(g9,{ResourceTypeAutocompleteComponent:()=>Z3});y();var VIe=["resourceTypeInput"],LIe=n=>({resource:n});function BIe(n,t){if(n&1){let r=B();d(0,"button",9),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",10),g(2,"close"),p()()}}function jIe(n,t){if(n&1&&(d(0,"mat-option",11),O(1,"span",12),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,e.displayResourceTypeFn(r),e.searchText),Ut)}}function GIe(n,t){if(n&1&&(d(0,"mat-option",11)(1,"span"),g(2),v(3,"async"),p()()),n&2){let r=b
197();m("value",null),l(2),j(" ",C(3,2,r.translate.get("permission.resource.no-resources-matching",Xe(4,LIe,r.searchText)))," ")}}function zIe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"permission.resource.resource-required")," "))}var Z3=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a){this.store=e,this.translate=i,this.userPermissionsService=o,this.fb=a,this.resources=this.userPermissionsService.getAllowedResources().map(s=>({name:this.translate.instant(M5.get(s)),value:s})).sort(this.sortResource),this.searchText="",this.dirty=!1,this.propagateChange=s=>{},this.resourceTypeFormGroup=this.fb.group({resourceType:[null]})}sortResource(e,i){return e.value==="ALL"||i.value==="ALL"?e.value==="ALL"?-1:1:e.name>i.name?1:e.name<i.name?-1:0}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredResources=this.resourceTypeFormGroup.get("resourceType").valueChanges.pipe(Wi(150),et(e=>{this.updateView(e)}),on(""),W(e=>e?typeof e=="string"?e:e.name:""),xr(),ii(e=>this.fetchResources(e)),bu(1),hu())}ngAfterViewInit(){}ngOnDestroy(){}setDisabledState(e){this.disabled=e,this.disabled?this.resourceTypeFormGroup.disable({emitEvent:!1}):this.resourceTypeFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="";let i=this.resources.find(o=>o.value===e);i?this.modelValue=i.value:this.modelValue=null,this.resourceTypeFormGroup.get("resourceType").patchValue(i,{emitEvent:!1}),this.dirty=!0}onFocus(){this.dirty&&(this.resourceTypeFormGroup.get("resourceType").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(e){let i=null;e&&typeof e!="string"&&(i=e.value),this.modelValue!==i&&(this.modelValue=i,this.propagateChange(this.modelValue))}displayResourceTypeFn(e){if(e)return e.name}fetchResources(e){this.searchText=e;let i=this.resources;return e&&e.length&&(i=this.resources.filter(o=>o.name.toLowerCase().includes(e.toLowerCase()))),Z(i)}clear(e=""){this.resourceTypeInput.nativeElement.value=e,this.resourceTypeFormGroup.get("resourceType").patchValue(e,{emitEvent:!0}),setTimeout(()=>{this.resourceTypeInput.nativeElement.blur(),this.resourceTypeInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(So),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-resource-type-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(VIe,7),i&2){let a;Q(a=K())&&(o.resourceTypeInput=a.first)}},inputs:{required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:12,vars:15,consts:[["resourceTypeInput",""],["resourceTypeAutocomplete","matAutocomplete"],["floatLabel","always","hideRequiredMarker","",1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","resourceType",3,"focusin","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"input",3,0),v(3,"translate"),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(4,BIe,3,0,"button",4),d(5,"mat-autocomplete",5,1),x(7,jIe,3,5,"mat-option",6),v(8,"async"),x(9,GIe,4,6,"mat-option",7),v(10,"async"),p(),x(11,zIe,3,3,"mat-error",8),p()}if(i&2){let a,s=me(6);m("formGroup",o.resourceTypeFormGroup),l(),te("placeholder",C(3,9,"permission.resource.select-resource")),m("required",o.required)("matAutocomplete",s),l(3),m("ngIf",o.resourceTypeFormGroup.get("resourceType").value&&!o.disabled),l(),m("displayWith",o.displayResourceTypeFn),l(2),m("ngForOf",C(8,11,o.filteredResources)),l(2),m("ngIf",!((a=C(10,13,o.filteredResources))!=null&&a.length)),l(2),m("ngIf",o.resourceTypeFormGroup.get("resourceType").hasError("required"))}},dependencies:[Ke,ce,Pe,Se,at,ze,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,Mi,be],encapsulation:2});let n=t;return n})();function $Ie(n,t){if(n&1){let r=B();d(0,"div",9),O(1,"tb-resource-type-autocomplete",10)(2,"tb-operation-type-list",11),d(3,"button",12),v(4,"translate"),v(5,"async"),T("click",function(){let i=D(r).index,o=b();return M(o.removePermission(i))}),d(6,"mat-icon"),g(7,"close"),p()()()}if(n&2){let r=t.$implicit,e=b();l(),m("formControl",r.get("resource")),l(),m("resource",r.get("resource").value)("formControl",r.get("operations")),l(),Y("!hidden",e.disabled),te("matTooltip",C(4,7,"permission.remove-permission")),m("disabled",C(5,9,e.isLoading$))}}var J3=(()=>{let t=class t extends sn{constructor(e,i,o){super(e),this.store=e,this.injector=i,this.fb=o,this.prop
197agateChange=null,this.destroy$=new Te}ngOnInit(){this.ngControl=this.injector.get(Yd),this.permissionListFormGroup=this.fb.group({permissions:this.fb.array([])}),this.permissionListFormGroup.valueChanges.pipe(Be(this.destroy$)).subscribe(()=>this.updateModel())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}permissionsFormArray(){return this.permissionListFormGroup.get("permissions")}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.disabled?this.permissionListFormGroup.disable({emitEvent:!1}):this.permissionListFormGroup.enable({emitEvent:!1})}writeValue(e){let i=[];if(e)for(let o of Object.keys(e)){let a=this.fb.group({resource:[Ei[o],[ke.required]],operations:[e[o],[ke.required]]});this.disabled&&a.disable(),i.push(a)}this.permissionListFormGroup.setControl("permissions",this.fb.array(i),{emitEvent:!1})}removePermission(e){this.permissionListFormGroup.get("permissions").removeAt(e)}addPermission(){this.permissionListFormGroup.get("permissions").push(this.fb.group({resource:[null,[ke.required]],operations:[null,[ke.required]]}))}updateModel(){let e=this.permissionListFormGroup.get("permissions").value,i={};e.forEach(o=>{i[o.resource]=o.operations}
197),this.propagateChange(i)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Mn),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-permission-list"]],inputs:{disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),Ce],decls:20,vars:18,consts:[[1,"tb-permission-list","flex","flex-col",3,"formGroup"],[1,"header","flex","flex-1","flex-row"],["translate","",1,"cell","max-w-30%","flex-full"],["translate","",1,"cell","max-w-70%","flex-full"],[2,"width","48px","min-width","48px"],[1,"body"],["class","row flex flex-1 flex-row items-center justify-start","formArrayName","permissions",4,"ngFor","ngForOf"],[2,"margin-top","-20px","padding-bottom","40px",3,"error"],["mat-button","","mat-raised-button","","color","primary","type","button","matTooltipPosition","above",3,"click","disabled","matTooltip"],["formArrayName","permissions",1,"row","flex","flex-1","flex-row","items-center","justify-start"],["required","",1,"cell","mat-block","max-w-30%","flex-full",3,"formControl"],["required","",1,"cell","mat-block","max-w-70%","flex-full",3,"resource","formControl"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",3,"click","disabled","matTooltip"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"div",1)(2,"span",2),g(3,"permission.resource.resource"),p(),d(4,"span",3),g(5,"permission.operation.operations"),p(),d(6,"span",4),g(7,"\xA0"),p()(),d(8,"div",5),x(9,$Ie,8,11,"div",6),p(),O(10,"tb-error",7),v(11,"translate"),d(12,"div")(13,"button",8),v(14,"translate"),v(15,"async"),T("click",function(){return o.addPermission()}),d(16,"mat-icon"),g(17,"add"),p(),g(18),v(19,"translate"),p()()()),i&2&&(m("formGroup",o.permissionListFormGroup),l(6),Y("!hidden",o.disabled),l(3),m("ngForOf",o.permissionsFormArray().controls),l(),m("error",o.ngControl.hasError("required")?C(11,10,"permission.permissions-required"):""),l(3),Y("!hidden",o.disabled),te("matTooltip",C(14,12,"permission.add-permission")),m("disabled",C(15,14,o.isLoading$)),l(5),j(" ",C(19,16,"action.add")," "))},dependencies:[Ke,Fc,yt,Pe,Se,zt,xe,We,St,Br,$e,Ob,jt,_x,Z3,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-permission-list[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{padding-right:5px;padding-bottom:5px;padding-left:5px}[_nghost-%COMP%]   .tb-permission-list[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .cell[_ngcontent-%COMP%]{padding-right:5px;padding-left:5px;font-size:12px;font-weight:700;color:#0000008a;white-space:nowrap}[_nghost-%COMP%]   .tb-permission-list[_ngcontent-%COMP%]   .body[_ngcontent-%COMP%]{max-height:300px;padding-right:5px;padding-bottom:20px;padding-left:5px;overflow:auto}[_nghost-%COMP%]   .tb-permission-list[_ngcontent-%COMP%]   .body[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]{padding-top:5px}[_nghost-%COMP%]   .tb-permission-list[_ngcontent-%COMP%]   .body[_ngcontent-%COMP%]   .cell[_ngcontent-%COMP%]{padding-right:5px;padding-left:5px}']});let n=t;return n})();function UIe(n,t){n&1&&O(0,"mat-progress-bar",25)}function HIe(n,t){n&1&&O(0,"div",26)}function qIe(n,t){if(n&1&&(d(0,"mat-option",27),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",C(2,2,e.roleTypeTranslations.get(r))," ")}}var eV=(()=>{let t=class t extends An{constructor(e,i,o,a,s){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.fb=s,this.role=this.data.role,this.roleType=ul,this.roleTypes=Object.keys(ul),this.roleTypeTranslations=VS}ngOnInit(){this.roleFormGroup=this.fb.group({name:[this.role.name,[]],type:[this.role.type,[ke.required]],additionalInfo:this.fb.group({description:[this.role.additionalInfo?this.role.additionalInfo.description:""]}),genericPermissions:[this.role.type===ul.GENERIC?this.role.permissions:null,[]],groupPermissions:[this.role.type===ul.GROUP?this.role.permissions:null,[]]}),this.roleFormGroup.disable()}close(){this.dialogRef.close()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-view-role-dialog"]],features:[Ce],decls:46,vars:22,consts:[[2,"width","800px",3,"formGroup"],["color","primary",1,"flex","flex-row"],["translate",""],[1,"flex-1"],[3,"tb-help"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[3,"disabled"],[1,"mat-block"],["matInput","","formControlName","name","required",""],["matInput","","formControlName","type","required",""],[3,"value",4,"ngFor","ngForOf"],["formGroupName","additionalInfo",1,"flex","flex-col"],["matInput","","formControlName","description","rows","2"],[3,"expanded"],["translate","",1,"tb-panel-title"],["formControlName","genericPermissions"],[1,"flex","flex-col"],["translate","",1,"tb-title","tb-required"],["formControlName","groupPermissions","groupRoleOperations","",3,"required"],["mat-dialog-actions","",1,"flex","flex-row"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"],[3,"value"]],template:function(i,o){i&1&&(d(0,"form",0)(1,"mat-toolbar",1)(2,"h2",2),g(3,"role.view"),p(),O(4,"span",3)(5,"div",4),d(6,"button",5),T("click",function(){return o.close()}),d(7,"mat-icon",6),g(8,"close"),p()()(),x(9,UIe,1,0,"mat-progress-bar",7),v(10,"async"),x(11,HIe,1,0,"div",8),v(12,"async"),d(13,"div",9)(14,"fieldset",10)(15,"mat-form-field",11)(16,"mat-label",2),g(17,"role.name"),p(),O(18,"input",12),p(),d(19,"mat-form-field",11)(20,"mat-label",2),g(21,"role.role-type"),p(),d(22,"mat-select",13),x(23,qIe,3,4,"mat-option",14),p()(),d(24,"div",15)(25,"mat-form-field",11)(26,"mat-label",2),g(27,"role.description"),p(),O(28,"textarea",16),p()(),d(29,"mat-expansion-panel",17)(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"div",18),g(33,"role.permissions"),p()()(),d(34,"section"),O(35,"tb-permission-list",19),p(),d(36,"section",20)(37,"label",21),g(38,"permission.operation.operations"),p(),O(39,"tb-
197operation-type-list",22),p()()()(),d(40,"div",23),O(41,"span",3),d(42,"button",24),v(43,"async"),T("click",function(){return o.close()}),g(44),v(45,"translate"),p()()()),i&2&&(m("formGroup",o.roleFormGroup),l(5),m("tb-help","roles"),l(4),m("ngIf",C(10,14,o.isLoading$)),l(2),m("ngIf",!C(12,16,o.isLoading$)),l(3),m("disabled",!0),l(9),m("ngForOf",o.roleTypes),l(6),m("expanded",!0),l(5),Y("!hidden",o.roleFormGroup.get("type").value!==o.roleType.GENERIC),l(2),Y("!hidden",o.roleFormGroup.get("type").value!==o.roleType.GROUP),l(3),m("required",o.roleFormGroup.get("type").value===o.roleType.GROUP),l(3),m("disabled",C(43,18,o.isLoading$)),l(2),j(" ",C(45,20,"action.close")," "))},dependencies:[Ke,ce,Ms,yt,Pe,Se,Jr,at,ze,At,ir,gr,Dn,Kn,xt,Ss,Ts,Bl,ur,ut,xe,We,St,$e,Qe,Ka,jt,_x,J3,Ve,be],encapsulation:2});let n=t;return n})();var YIe=["searchInput"],QIe=n=>({count:n}),KIe=()=>[10,20,30];function XIe(n,t){if(n&1){let r=B();d(0,"button",8),v(1,"translate"),v(2,"async"),T("click",function(i){D(r);let o=b();return M(o.addGroupPermission(i))}),d(3,"mat-icon"),g(4,"add"),p()()}if(n&2){let r=b();te("matTooltip",C(1,2,"action.add")),m("disabled",C(2,4,r.isLoading$))}}function ZIe(n,t){if(n&1){let r=B();d(0,"mat-header-cell",32)(1,"mat-checkbox",33),v(2,"async"),v(3,"async"),T("change",function(i){D(r);let o=b();return M(i?o.dataSource.masterToggle():null)}),p()()}if(n&2){let r=b();l(),m("checked",r.dataSource.selection.hasValue()&&C(2,2,r.dataSource.isAllSelected()))("indeterminate",r.dataSource.selection.hasValue()&&!C(3,4,r.dataSource.isAllSelected()))}}function JIe(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"mat-checkbox",34),T("click",function(i){return D(r),M(i.stopPropagation())})("change",function(i){let o=D(r).$implicit,a=b();return M(i?a.dataSource.selection.toggle(o):null)}),p()()}if(n&2){let r=t.$implicit,e=b();l(),Y("!hidden",r.readOnly),m("checked",e.dataSource.selection.isSelected(r))}}function eke(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b
197();hi("width",r.columnsWidth.roleName),l(),j(" ",C(2,3,"group-permission.role-name")," ")}}function tke(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"div",36)(2,"span",6),g(3),p(),d(4,"button",11),v(5,"translate"),T("click",function(i){let o=D(r).$implicit,a=b();return M(a.viewRole(i,o))}),d(6,"mat-icon"),g(7,"more_horiz"),p()()()()}if(n&2){let r=t.$implicit;l(3),z(r.roleName),l(),te("matTooltip",C(5,2,"role.view"))}}function ike(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b(2);hi("width",r.columnsWidth.roleTypeName),l(),j(" ",C(2,3,"group-permission.role-type")," ")}}function nke(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),j(" ",r.roleTypeName," ")}}function rke(n,t){n&1&&(pt(0,37),x(1,ike,3,5,"mat-header-cell",19)(2,nke,2,1,"mat-cell",17),ct())}function oke(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b(2);hi("width",r.columnsWidth.entityGroupTypeName),l(),j(" ",C(2,3,"group-permission.group-type")," ")}}function ake(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),j(" ",r.entityGroupTypeName," ")}}function ske(n,t){n&1&&(pt(0,38),x(1,oke,3,5,"mat-header-cell",19)(2,ake,2,1,"mat-cell",17),ct())}function lke(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b
vendor: 1,310 bytes, line 197
197(2);hi("width",r.columnsWidth.entityGroupName),l(),j(" ",C(2,3,"group-permission.group-name")," ")}}function cke(n,t){if(n&1&&(d(0,"mat-cell"),g(1),v(2,"customTranslate"),p()),n&2){let r=t.$implicit;l(),j(" ",C(2,1,r.entityGroupName)," ")}}function dke(n,t){n&1&&(pt(0,39),x(1,lke,3,5,"mat-header-cell",19)(2,cke,3,3,"mat-cell",17),ct())}function pke(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b(2);hi("width",r.columnsWidth.entityGroupOwnerFullName),l(),j(" ",C(2,3,"group-permission.group-owner")," ")}}function mke(n,t){if(n&1&&(d(0,"mat-cell"),g(1),v(2,"customTranslate"),p()),n&2){let r=t.$implicit;l(),j(" ",C(2,1,r.entityGroupOwnerFullName)," ")}}function uke(n,t){n&1&&(pt(0,40),x(1,pke,3,5,"mat-header-cell",19)(2,mke,3,3,"mat-cell",17),ct())}function hke(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b(2);hi("width",r.columnsWidth.userGroupName),l(),j(" ",C(2,3,"group-permission.user-group-name")," ")}}function fke(n,t){if(n&1&&(d(0,"mat-cell"),g(1),v(2,"customTranslate"),p()),n&2){let r=t.$implicit;l(),j(" ",C(2,1,r.userGroupName)," ")}}function gke(n,t){n&1&&(pt(0,41),x(1,hke,3,5,"mat-header-cell",19)(2,fke,3,3,"mat-cell",17),ct())}function bke(n,t){if(n&1&&(d(0,"mat-header-cell",35),g(1),v(2,"translate"),p()),n&2){let r=b
197(2);hi("width",r.columnsWidth.userGroupOwnerFullName),l(),j(" ",C(2,3,"group-permission.user-group-owner")," ")}}function _ke(n,t){if(n&1&&(d(0,"mat-cell"),g(1),v(2,"customTranslate"),p()),n&2){let r=t.$implicit;l(),j(" ",C(2,1,r.userGroupOwnerFullName)," ")}}function vke(n,t){n&1&&(pt(0,42),x(1,bke,3,5,"mat-header-cell",19)(2,_ke,3,3,"mat-cell",17),ct())}function yke(n,t){n&1&&O(0,"mat-header-cell",43)}function Cke(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"div",44)(2,"button",8),v(3,"translate"),v(4,"async"),T("click",function(i){let o=D(r).$implicit,a=b();return M(a.editGroupPermission(i,o))}),d(5,"mat-icon"),g(6,"edit"),p()(),d(7,"button",8),v(8,"translate"),v(9,"async"),T("click",function(i){let o=D(r).$implicit,a=b();return M(a.deleteGroupPermission(i,o))}),d(10,"mat-icon"),g(11,"delete"),p()()()()}if(n&2){let r=t.$implicit,e=b();l(2),hi("visibility",!r.readOnly&&e.editEnabled?"visible":"hidden"),te("matTooltip",C(3,8,"group-permission.edit")),m("disabled",C(4,10,e.isLoading$)),l(5),hi("visibility",!r.readOnly&&e.deleteEnabled?"visible":"hidden"),te("matTooltip",C(8,12,"group-permission.delete")),m("disabled",C(9,14,e.isLoading$))}}
197function wke(n,t){if(n&1&&O(0,"mat-header-row"),n&2){let r=b();Y("mat-row-select",r.deleteEnabled)}}function xke(n,t){if(n&1){let r=B();d(0,"mat-row",45),T("click",function(i){let o=D(r).$implicit,a=b();return M(a.onRowClick(i,o))}),p()}if(n&2){let r=t.$implicit,e=b();Y("mat-row-select",e.deleteEnabled)("tb-read-only",r.readOnly)("mat-selected",e.dataSource.selection.isSelected(r))}}var RD=(()=>{let t=class t extends sn{set active(e){this.activeValue!==e&&(this.activeValue=e,this.activeValue&&this.dirtyValue&&(this.dirtyValue=!1,this.viewsInited&&this.updateData(!0)))}set entityGroup(e){this.entityGroupValue!==e&&(this.entityGroupValue=e,this.entityGroupUpdated(e),this.viewsInited&&(this.resetSortAndFilter(this.activeValue),this.activeValue||(this.dirtyValue=!0)))}get entityGroup(){return this.entityGroupValue}set registrationPermissions(e){this.registrationPermissionsValue!==e&&(this.registrationPermissionsValue=e,this.registrationPermissionsUpdated(e),this.viewsInited&&(this.resetSortAndFilter(this.activeValue),this.activeValue||(this.dirtyValue=!0)))}get registrationPermissions(){return this.registrationPermissionsValue}get readonly(){return this.readonlyValue}set readonly(e){this.readonlyValue=mt(e)}constructor(e,i,o,a,s,c,u,f,_,I){super(e),this.store=e,this.roleService=i,this.translate=o,this.dialog=a,this.userPermissionsService=s,this.dialogService=c,this.cd=u,this.elementRef=f,this.fb=_,this.zone=I,this.displayedColumns=[],this.columnsWidth={},this.editEnabled=!1,this.addEnabled=!1,this.deleteEnabled=!1,this.isUserGroup=!1,this.textSearchMode=!1,this.hidePageSize=!1,this.activeValue=!1,this.dirtyValue=!1,this.viewsInited=!1,this.permissionsChanged=new J,this.textSearch=this.fb.control("",{nonNullable:!0}),this.destroy$=new Te,this.dirtyValue=!this.activeValue;let S={property:"roleName",direction:Xn.ASC};this.pageLink=new On(10,0,null,S),this.dataSource=new PD(this.roleService,this.translate)}ngOnInit(){this.widgetResize$=new ResizeObserver(()=>{this.zone.run(()=>{let e=this.elementRef.nativeElement.offsetWidth<mS;e!==this.hidePageSize&&(this.hidePageSize=e,this.cd.markForCheck())})}),this.widgetResize$.observe(this.elementRef.nativeElement)}ngOnDestroy(){this.widgetResize$&&this.widgetResize$.disconnect(),this.destroy$.next(),this.destroy$.complete()}entityGroupUpdated(e){this.groupPermissionsMode="group",this.editEnabled=!1,this.addEnabled=!1,this.deleteEnabled=!1,this.isUserGroup=e.type===G.USER,!this.userPermissionsService.hasEntityGroupPermission(qo.WRITE,e)||(this.editEnabled=!this.readonly&&this.userPermissionsService.hasGenericPermission(Ei.GROUP_PERMISSION,qo.WRITE),this.addEnabled=!this.readonly&&this.userPermissionsService.hasGenericPermission(Ei.GROUP_PERMISSION,qo.CREATE),this.deleteEnabled=!this.readonly&&this.userPermissionsService.hasGenericPermission(Ei.GROUP_PERMISSION,qo.DELETE)),this.updateColumns()}registrationPermissionsUpdated(e){this.groupPermissionsMode="registration",this.editEnabled=!this.readonly,this.addEnabled=!this.readonly,this.deleteEnabled=!this.readonly,this.isUserGroup=!0,this.updateColumns()}updateColumns(){this.displayedColumns=[],this.deleteEnabled&&this.displayedColumns.push("select"),this.displayedColumns.push("roleName"),this.isUserGroup?(this.displayedColumns.push("roleTypeName","entityGroupTypeName","entityGroupName"),this.groupPermissionsMode==="group"?(this.displayedColumns.push("entityGroupOwnerFullName"),this.columnsWidth.roleName="20%",this.columnsWidth.roleTypeName="15%",this.columnsWidth.entityGroupTypeName="15%",this.columnsWidth.entityGroupName="25%",this.columnsWidth.entityGroupOwnerFullName="25%"):(this.columnsWidth.roleName="40%",this.columnsWidth.roleTypeName="20%",this.columnsWidth.entityGroupTypeName="20%",this.columnsWidth.entityGroupName="20%")):(this.displayedColumns.push("userGroupName","userGroupOwnerFullName"),this.columnsWidth.roleName="33%",this.columnsWidth.userGroupName="33%",this.columnsWidth.userGroupOwnerFullName="33%"),this.displayedColumns.push("actions")}ngAfterViewInit(){this.textSearch.valueChanges.pipe(Wi(150),xr((e,i)=>(this.pageLink.textSearch??"")===i.trim()),Be(this.destroy$)).subscribe(e=>{this.paginator.pageIndex=0,this.pageLink.textSearch=e.trim(),this.updateData()}),this.sort.sortChange.pipe(Be(this.destroy$)).subscribe(()=>this.paginator.pageIndex=0),Xt(this.sort.sortChange,this.paginator.page).pipe(Be(this.destroy$)).subscribe(()=>this.updateData()),this.viewsInited=!0,this.activeValue&&(this.entityGroupValue||this.registrationPermissionsValue)&&this.updateData(!0)}updateData(e=!1){this.pageLink.page=this.paginator.pageIndex,this.pageLink.pageSize=this.paginator.pageSize,this.pageLink.sortOrder.property=this.sort.active,this.pageLink.sortOrder.direction=Xn[this.sort.direction.toUpperCase()],this.dataSource.loadGroupPermissions(this.entityGroupValue,this.registrationPermissionsValue,this.pageLink,e)}enterFilterMode(){this.textSearchMode=!0,setTimeout(()=>{this.searchInputField.nativeElement.focus(),this.searchInputField.nativeElement.setSelectionRange(0,0)},10)}exitFilterMode(){this.textSearchMode=!1,this.textSearch.reset()}resetSortAndFilter(e=!0){this.textSearchMode=!1,this.pageLink.textSearch=null,this.textSearch.reset("",{emitEvent:!1}),this.paginator.pageIndex=0;let i=this.sort.sortables.get("roleName");this.sort.active=i.id,this.sort.direction="asc",e&&this.updateData(!0)}onRowClick(e,i){e&&e.stopPropagation(),this.readonly||this.dataSource.selection.toggle(i)}reloadGroupPermissions(){this.updateData(!0)}addGroupPermission(e){this.openGroupPermissionDialog(e)}editGroupPermission(e,i){this.openGroupPermissionDialog(e,i)}deleteGroupPermission(e,i){e&&e.stopPropagation();let o=this.translate.instant("group-permission.delete-group-permission-title",{roleName:i.roleName}),a=this.translate.instant("group-permission.delete-group-permission-text");this.dialogService.confirm(o,a,this.translate.instant("action.no"),this.translate.instant("action.yes"),!0).subscribe(s=>{if(s)if(this.groupPermissionsMode==="registration"){let c=this.registrationPermissionsValue.indexOf(i.sourceGroupPermission);c>-1&&(this.registrationPermissionsValue.splice(c,1),this.permissionsChanged.emit(),this.reloadGroupPermissions())}else this.roleService.deleteGroupPermission(i.id.id).subscribe(()=>{this.permissionsChanged.emit(),this.reloadGroupPermissions()})})}deleteGroupPermissions(e){if(e&&e.stopPropagation(),this.dataSource.selection.selected.length>0){let i=this.translate.instant("group-permission.delete-group-permissions-title",{count:this.dataSource.selection.selected.length}),o=this.translate.instant("group-permission.delete-group-permissions-text");this.dialogService.confirm(i,o,this.translate.instant("action.no"),this.translate.instant("action.yes"),!0).subscribe(a=>{if(a)if(this.groupPermissionsMode==="registration")this.dataSource.selection.selected.forEach(s=>{let c=this.registrationPermissionsValue.indexOf(s.sourceGroupPermission);c>-1&&this.registrationPermissionsValue.splice(c,1)}),this.permissionsChanged.emit(),this.reloadGroupPermissions();else{let s=[];this.dataSource.selection.selected.forEach(c=>{s.push(this.roleService.deleteGroupPermission(c.id.id))}),Rn(s).subscribe(()=>{this.permissionsChanged.emit(),this.reloadGroupPermissions()})}})}}openGroupPermissionDialog(e,i=null){e&&e.stopPropagation();let o=!1,a=-1;i?(this.groupPermissionsMode==="registration"&&(a=this.registrationPermissionsValue.indexOf(i.sourceGroupPermission)),i=Di(i,["sourceGroupPermission"])):(o=!0,i={},this.isUserGroup?this.groupPermissionsMode==="group"&&(i.userGroupId={entityType:G.ENTITY_GROUP,id:this.entityGroup.id.id}):(i.entityGroupId={entityType:G.ENTITY_GROUP,id:this.entityGroup.id.id},i.entityGroupType=this.entityGroup.type)),this.dialog.open(my,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{isAdd:o,isUserGroup:this.isUserGroup,groupPermission:i,groupPermissionsMode:this.groupPermissionsMode}}).afterClosed().subscribe(s=>{s&&(this.groupPermissionsMode==="registration"&&(o?this.registrationPermissionsValue.push(s):this.registrationPermissionsValue[a]=s),this.permissionsChanged.emit(),this.reloadGroupPermissions())})}viewRole(e,i){e&&e.stopPropagation(),this.dialog.open(eV,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{role:i.role}})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Pv),h(Ge),h(Lr),h(So),h(Sa),h(Me),h(ge),h(Ai),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["tb-group-permissions"]],viewQuery:function(i,o){if(i&1&&(ae(YIe,5),ae(fc,5),ae(gc,5)),i&2){let a;Q(a=K())&&(o.searchInputField=a.first),Q(a=K())&&(o.paginator=a.first),Q(a=K())&&(o.sort=a.first)}},inputs:{active:"active",entityGroup:"entityGroup",registrationPermissions:"registrationPermissions",readonly:"readonly"},outputs:{permissionsChanged:"permissionsChanged"},features:[Ce],decls:71,vars:72,consts:[["searchInput",""],[1,"mat-padding","tb-entity-table"],[1,"tb-entity-table-content","tb-outlined-border","flex","flex-col"],[1,"mat-mdc-table-toolbar"],[1,"mat-toolbar-tools"],[1,"tb-entity-table-title"],[1,"flex-1"],["mat-icon-button","","type","button","matTooltipPosition","above",3,"disabled","matTooltip","click",4,"ngIf"],["mat-icon-button","","type","button","matTooltipPosition","above",3,"click","disabled","matTooltip"],["mat-icon-button","","type","button","matTooltipPosition","above",3,"matTooltip"],["matInput","",3,"formControl","placeholder"],["mat-icon-button","","type","button","matTooltipPosition","above",3,"click","matTooltip"],["color","primary",1,"mat-mdc-table-toolbar"],[1,"table-container"],["mat-table","","matSort","","matSortDisableClear","",3,"dataSource","matSortActive","matSortDirection"],["matColumnDef","select","sticky",""],["style","width: 30px;",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","roleName"],["mat-sort-header","",3,"width",4,"matHeaderCellDef"],["matColumnDef","roleTypeName",4,"ngIf"],["matColumnDef","entityGroupTypeName",4,"ngIf"],["matColumnDef","entityGroupName",4,"ngIf"],["matColumnDef","entityGroupOwnerFullName",4,"ngIf"],["matColumnDef","userGroupName",4,"ngIf"],["matColumnDef","userGroupOwnerFullName",4,"ngIf"],["matColumnDef","actions","stickyEnd",""],["style","min-width: 80px; max-width: 80px; width: 80px",4,"matHeaderCellDef"],[3,"mat-row-select",4,"matHeaderRowDef","matHeaderRowDefSticky"],[3,"mat-row-select","tb-read-only","mat-selected","click",4,"matRowDef","matRowDefColumns"],["translate","",1,"no-data-found","flex","items-center","justify-center"],[3,"length","pageIndex","pageSize","pageSizeOptions","hidePageSize"],[2,"width","30px"],[3,"change","checked","indeterminate"],[3,"click","change","checked"],["mat-sort-header",""],[1,"flex","flex-row","items-center","justify-start"],["matColumnDef","roleTypeName"],["matColumnDef","entityGroupTypeName"],["matColumnDef","entityGroupName"],["matColumnDef","entityGroupOwnerFullName"],["matColumnDef","userGroupName"],["matColumnDef","userGroupOwnerFullName"],[2,"min-width","80px","max-width","80px","width","80px"],[1,"flex","flex-1","flex-row","items-stretch","justify-end"],[3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1)(1,"div",2)(2,"mat-toolbar",3)(3,"div",4)(4,"span",5),g(5),v(6,"translate"),p(),O(7,"span",6),x(8,XIe,5,6,"button",7),d(9,"button",8),v(10,"translate"),v(11,"async"),T("click",function(){return D(a),M(o.enterFilterMode())}),d(12,"mat-icon"),g(13,"search"),p()(),d(14,"button",8),v(15,"translate"),v(16,"async"),T("click",function(){return D(a),M(o.reloadGroupPermissions())}),d(17,"mat-icon"),g(18,"refresh"),p()()()(),d(19,"mat-toolbar",3)(20,"div",4)(21,"button",9),v(22,"translate"),d(23,"mat-icon"),g(24,"search"),p()(),d(25,"mat-form-field",6)(26,"mat-label"),g(27,"\xA0"),p(),O(28,"input",10,0),v(30,"translate"),p(),d(31,"button",11),v(32,"translate"),T("click",function(){return D(a),M(o.exitFilterMode())}),d(33,"mat-icon"),g(34,"close"),p()()()(),d(35,"mat-toolbar",12)(36,"div",4)(37,"span"),g(38),v(39,"async"),p(),O(40,"span",6),d(41,"button",8),v(42,"translate"),v(43,"async"),T("click",function(c){return D(a),M(o.deleteGroupPermissions(c))}),d(44,"mat-icon"),g(45,"delete"),p()()()(),d(46,"div",13)(47,"table",14),pt(48,15),x(49,ZIe,4,6,"mat-header-cell",16)(50,JIe,2,3,"mat-cell",17),ct(),pt(51,18),x(52,eke,3,5,"mat-header-cell",19)(53,tke,8,4,"mat-cell",17),ct(),x(54,rke,3,0,"ng-container",20)(55,ske,3,0,"ng-container",21)(56,dke,3,0,"ng-container",22)(57,uke,3,0,"ng-container",23)(58,gke,3,0,"ng-container",24)(59,vke,3,0,"ng-container",25),pt(60,26),x(61,yke,1,0,"mat-header-cell",27)(62,Cke,12,16,"mat-cell",17),ct(),x(63,wke,1,2,"mat-header-row",28)(64,xke,1,6,"mat-row",29),p(),d(65,"span",30),v(66,"async"),g(67),p()(),O(68,"mat-divider")(69,"mat-paginator",31),v(70,"async"),p()()}i&2&&(Y("tb-absolute-fill",o.groupPermissionsMode==="group"),l(2),Y("!hidden",o.textSearchMode||!
197o.dataSource.selection.isEmpty()),l(3),z(C(6,43,o.isUserGroup?"group-permission.user-group-roles":"group-permission.entity-group-permissions")),l(3),m("ngIf",o.addEnabled),l(),te("matTooltip",C(10,45,"action.search")),m("disabled",C(11,47,o.isLoading$)),l(5),te("matTooltip",C(15,49,"action.refresh")),m("disabled",C(16,51,o.isLoading$)),l(5),Y("!hidden",!o.textSearchMode||!o.dataSource.selection.isEmpty()),l(2),te("matTooltip",C(22,53,"action.search")),l(7),te("placeholder",C(30,55,"common.enter-search")),m("formControl",o.textSearch),l(3),te("matTooltip",C(32,57,"action.close")),l(4),Y("!hidden",o.dataSource.selection.isEmpty()),l(3),j(" ",C(39,59,o.translate.get("group-permission.selected-group-permissions",Xe(69,QIe,o.dataSource.selection.selected.length)))," "),l(3),te("matTooltip",C(42,61,"action.delete")),m("disabled",C(43,63,o.isLoading$)),l(5),Y("flex-1",o.groupPermissionsMode==="group"),l(),m("dataSource",o.dataSource)("matSortActive",o.pageLink.sortOrder.property)("matSortDirection",o.pageLink.sortDirection()),l(7),m("ngIf",o.isUserGroup),l(),m("ngIf",o.isUserGroup),l(),m("ngIf",o.isUserGroup),l(),m("ngIf",o.isUserGroup),l(),m("ngIf",!o.isUserGroup),l(),m("ngIf",!o.isUserGroup),l(4),m("matHeaderRowDef",o.displayedColumns)("matHeaderRowDefSticky",!0),l(),m("matRowDefColumns",o.displayedColumns),l(),Y("!hidden",C(66,65,o.dataSource.isEmpty())===!1),l(2),z("group-permission.no-group-permissions-text"),l(2),m("length",C(70,67,o.dataSource.total()))("pageIndex",o.pageLink.page)("pageSize",o.pageLink.pageSize)("pageSizeOptions",hn(71,KIe))("hidePageSize",o.hidePageSize))},dependencies:[ce,jt,Pe,ra,Se,at,ze,At,ir,zt,id,_c,nd,vc,bc,rd,yc,Cc,od,ad,fc,gc,Gf,la,ut,xe,Br,Ve,be,yl],styles:['@charset "UTF-8";[_nghost-%COMP%]{width:100%;height:100%;display:block}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]   .tb-entity-table-content[_ngcontent-%COMP%]{width:100%;height:100%;background:#fff;overflow:hidden}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]   .tb-entity-table-content.tb-outlined-border[_ngcontent-%COMP%]{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f;border:solid 1px #e0e0e0;border-radius:4px}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]   .tb-entity-table-content[_ngcontent-%COMP%]   .tb-entity-table-title[_ngcontent-%COMP%]{padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]   .tb-entity-table-content[_ngcontent-%COMP%]   .table-container[_ngcontent-%COMP%]{overflow:auto}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]   .tb-entity-table-content[_ngcontent-%COMP%]   .table-container[_ngcontent-%COMP%]   .mat-mdc-row.tb-read-only[_ngcontent-%COMP%]   .mat-mdc-cell[_ngcontent-%COMP%]{color:#00000061}[_nghost-%COMP%]   .tb-entity-table[_ngcontent-%COMP%]   .tb-entity-table-content[_ngcontent-%COMP%]   .mat-divider[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%]     .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1!important}']});let n=t;return n})();var kke={};Ae(kke,{ShareEntityGroupComponent:()=>ND});y();y();var FD=class{constructor(t){this.entityType=G.ROLE,this.id=t}};var Tke=n=>[n];function Eke(n,t){if(n&1&&O(0,"tb-entity-group-select",8),n&2){let r=b
197();m("ownerId",r.shareEntityGroupFormGroup.get("ownerId").value)("allowedGroupTypes",Xe(2,Tke,r.entityType.USER))}}function Ike(n,t){if(n&1&&(O(0,"tb-entity-list",9),v(1,"translate"),v(2,"translate")),n&2){let r=b();te("placeholderText",C(1,4,"role.roles")),te("requiredText",C(2,6,"role.roles-required")),m("entityType",r.entityType.ROLE)("entitySubType",r.roleType.GROUP)}}var ND=(()=>{let t=class t{constructor(e,i,o){this.store=e,this.fb=i,this.destroyRef=o,this.entityType=G,this.roleType=ul,this.shareGroupRequest=null,this.propagateChange=null,this.propagateChangePending=!1}registerOnChange(e){this.propagateChange=e,this.propagateChangePending&&(this.propagateChangePending=!1,setTimeout(()=>{this.propagateChange(this.shareGroupRequest)},0))}registerOnTouched(e){}ngOnInit(){this.shareEntityGroupFormGroup=this.fb.group({ownerId:[null,ke.required],allUserGroup:[null],userGroupId:[null],permissionType:[null],roleIds:[null]}),this.shareEntityGroupFormGroup.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateModel()}),this.shareEntityGroupFormGroup.get("allUserGroup").valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateValidators()}),this.shareEntityGroupFormGroup.get("permissionType").valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateValidators()})}setDisabledState(e){this.disabled=e,this.disabled?this.shareEntityGroupFormGroup.disable({emitEvent:!1}):this.shareEntityGroupFormGroup.enable({emitEvent:!1})}writeValue(e){if(e){let i=e.roleIds?e.roleIds.map(a=>a.id):[];e.roleIds=i,this.shareEntityGroupFormGroup.patchValue(e,{emitEvent:!1});let o=e.roleIds&&e.roleIds.length?2:e.readElseWrite?0:1;this.shareEntityGroupFormGroup.get("permissionType").patchValue(o,{emitEvent:!1})}else this.shareEntityGroupFormGroup.patchValue({},{emitEvent:!1});this.updateValidators(),this.updateModel()}updateValidators(){this.shareEntityGroupFormGroup.get("allUserGroup").value?this.shareEntityGroupFormGroup.get("userGroupId").clearValidators():this.shareEntityGroupFormGroup.get("userGroupId").setValidators(ke.required),this.shareEntityGroupFormGroup.get("permissionType").value===2?this.shareEntityGroupFormGroup.get("roleIds").setValidators(ke.required):this.shareEntityGroupFormGroup.get("roleIds").clearValidators(),this.shareEntityGroupFormGroup.get("userGroupId").updateValueAndValidity({emitEvent:!1}),this.shareEntityGroupFormGroup.get("roleIds").updateValueAndValidity({emitEvent:!1})}updateModel(){if(this.shareGroupRequest=null,this.shareEntityGroupFormGroup.valid){this.shareGroupRequest=this.shareEntityGroupFormGroup.getRawValue();let e=this.shareEntityGroupFormGroup.get("permissionType").value;this.shareGroupRequest.readElseWrite=e===0,delete this.shareGroupRequest.permissionType;let i=this.shareEntityGroupFormGroup.get("roleIds").value;i&&i.length&&(this.shareGroupRequest.roleIds=i.map(o=>new FD(o)))}this.propagateChange?this.propagateChange(this.shareGroupRequest):this.propagateChangePending=!0}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-share-entity-group"]],inputs:{disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:19,vars:9,consts:[[1,"flex","flex-col",3,"formGroup"],["formControlName","ownerId","required","","placeholderText","customer.customer","notFoundText","customer.no-customers-matching","requiredText","customer.customer-required"],["formControlName","allUserGroup"],["formControlName","userGroupId","required","","placeholderText","entity-group.select-user-group","notFoundText","entity-group.no-user-groups-matching","requiredText","entity-group.target-user-group-required",3,"ownerId","allowedGroupTypes",4,"ngIf"],["translate",""],["color","primary","formControlName","permissionType",1,"flex","flex-row","xs:flex-col","gt-xs:gap-4"],["color","primary",3,"value"],["noEntitiesText","role.no-roles-matching","required","","formControlName","roleIds",3,"entityType","entitySubType","placeholderText","requiredText",4,"ngIf"],["formControlName","userGroupId","required","","placeholderText","entity-group.select-user-group","notFoundText","entity-group.no-user-groups-matching","requiredText","entity-group.target-user-group-required",3,"ownerId","allowedGroupTypes"],["noEntitiesText","role.no-roles-matching","required","","formControlName","roleIds",3,"entityType","entitySubType","placeholderText","requiredText"]],template:function(i,o){i&1&&(d(0,"section",0),O(1,"tb-owner-autocomplete",1),d(2,"mat-checkbox",2),g(3),v(4,"translate"),p(),x(5,Eke,1,4,"tb-entity-group-select",3),d(6,"small",4),g(7,"entity-group.permissions"),p(),d(8,"mat-radio-group",5)(9,"mat-radio-button",6)(10,"span",4),g(11,"permission.operation.display-type.READ"),p()(),d(12,"mat-radio-button",6)(13,"span",4),g(14,"permission.operation.display-type.WRITE"),p()(),d(15,"mat-radio-button",6)(16,"span",4),g(17,"permission.other"),p()()(),x(18,Ike,3,8,"tb-entity-list",7),p()),i&2&&(m("formGroup",o.shareEntityGroupFormGroup),l(3),z(C(4,7,"entity-group.all-users")),l(2),m("ngIf",!o.shareEntityGroupFormGroup.get("allUserGroup").value),l(4),m("value",0),l(3),m("value",1),l(3),m("value",2),l(3),m("ngIf",o.shareEntityGroupFormGroup.get("permissionType").value===2))},dependencies:[ce,jt,ra,o_,Lf,xe,We,St,$e,Qe,Pc,wp,xp,be],encapsulation:2});let n=t;return n})();var Lke={};Ae(Lke,{EdgeEntityGroupListComponent:()=>VD});y();var Dke=["entityGroupInput"],Mke=["entityGroupAutocomplete"],Ake=["chipList"],Oke=n=>({entityGroup:n});function Pke(n,t){n&1&&(d(0,"mat-icon",13),g(1,"close"),p())}function Rke(n,t){if(n&1){let r=B();d(0,"mat-chip-row",11),T("removed",function(){let i=D(r).$implicit,o=b();return M(o.remove(i))}),g(1),x(2,Pke,2,0,"mat-icon",12),p()}if(n&2){let r=t.$implicit,e=b();m("removable",!e.disabled),l(),j(" ",r.name," "),l(),m("ngIf",!e.disabled)}}function Fke(n,t){if(n&1&&(d(0,"mat-option",14),O(1,"span",15),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function Nke(n,t){if(n&1&&(d(0,"mat-option",14)(1,"span"),g(2),v(3,"async"),p()()),n&2){let r=b
197();m("value",null),l(2),j(" ",C(3,2,r.translate.get("entity-group.no-entity-groups-matching",Xe(4,Oke,r.searchText)))," ")}}function Vke(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"entity-group.entity-group-list-empty")," "))}var VD=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){let i=mt(e);this.requiredValue!==i&&(this.requiredValue=i,this.updateValidators())}constructor(e,i,o,a,s,c){this.store=e,this.translate=i,this.entityGroupService=o,this.customerService=a,this.data=s,this.fb=c,this.entityGroups=[],this.searchText="",this.dirty=!1,this.propagateChange=f=>{};let u=Mr(this.store);this.tenantId=u.tenantId,this.ownerId=this.data.ownerId,this.edgeId=this.data.edgeId,this.groupType=this.data.groupType,this.edgeEntityGroupListFormGroup=this.fb.group({entityGroups:[this.entityGroups,this.required?[ke.required]:[]],entityGroup:[null]})}updateValidators(){this.edgeEntityGroupListFormGroup.get("entityGroups").setValidators(this.required?[ke.required]:[]),this.edgeEntityGroupListFormGroup.get("entityGroups").updateValueAndValidity()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredEntityGroups=this.edgeEntityGroupListFormGroup.get("entityGroup").valueChanges.pipe(et(e=>{e&&typeof e!="string"?this.add(e):e===null&&this.clear(this.entityGroupInput.nativeElement.value)}),Pi(e=>typeof e=="string"),W(e=>e||""),Ft(e=>this.fetchEntityGroups(e)),Si())}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&i==="groupType"&&this.reset()}}ngAfterViewInit(){}setDisabledState(e){this.disabled=e,e?this.edgeEntityGroupListFormGroup.disable({emitEvent:!1}):this.edgeEntityGroupListFormGroup.enable({emitEvent:!1})}writeValue(e){if(this.searchText="",e!=null&&e.length>0)if(e[0].id){let i=e;this.modelValue=i.map(o=>o.id.id),this.entityGroups=[...i],this.edgeEntityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups)}else{let i=e;this.modelValue=[...i],this.entityGroupService.getEntityGroupEntityInfosByIds(i,{ignoreLoading:!0}).subscribe(o=>{this.entityGroups=o,this.edgeEntityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups)})}else this.entityGroups=[],this.edgeEntityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups),this.modelValue=null;this.dirty=!0}reset(){this.entityGroups=[],this.edgeEntityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups),this.modelValue=null,this.entityGroupInput&&(this.entityGroupInput.nativeElement.value=""),this.edgeEntityGroupListFormGroup.get("entityGroup").patchValue("",{emitEvent:!1}
197),this.propagateChange(this.modelValue),this.dirty=!0}add(e){(!this.modelValue||this.modelValue.indexOf(e.id.id)===-1)&&(this.modelValue||(this.modelValue=[]),this.modelValue.push(e.id.id),this.entityGroups.push(e),this.edgeEntityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups)),this.propagateChange(this.modelValue),this.clear()}remove(e){let i=this.entityGroups.indexOf(e);i>=0&&(this.entityGroups.splice(i,1),this.edgeEntityGroupListFormGroup.get("entityGroups").setValue(this.entityGroups),this.modelValue.splice(i,1),this.modelValue.length||(this.modelValue=null),this.propagateChange(this.modelValue),this.clear())}displayEntityGroupFn(e){return e?e.name:void 0}fetchEntityGroups(e){this.searchText=e;let i=new On(50,0,e,{property:"name",direction:Xn.ASC});return this.getEntityGroups(i).pipe(vt(()=>Z(yr())),W(o=>{let a=o.data;return this.excludeGroupAll&&(a=a.filter(s=>s.name!=="All")),a}))}getEntityGroups(e){return this.entityGroupService.getEntityGroupEntityInfosHierarchyByOwnerId(e,this.ownerId.entityType,this.ownerId.id,this.groupType,{ignoreLoading:!0})}onFocus(){this.dirty&&(this.edgeEntityGroupListFormGroup.get("entityGroup").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}clear(e=""){this.entityGroupInput.nativeElement.value=e,this.edgeEntityGroupListFormGroup.get("entityGroup").patchValue(e,{emitEvent:!0}),setTimeout(()=>{this.entityGroupInput.nativeElement.blur(),this.entityGroupInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h(Dl),h(MI),h(un),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-edge-entity-group-list"]],viewQuery:function(i,o){if(i&1&&(ae(Dke,5),ae(Mke,5),ae(Ake,7)),i&2){let a;Q(a=K())&&(o.entityGroupInput=a.first),Q(a=K())&&(o.matAutocomplete=a.first),Q(a=K())&&(o.chipList=a.first)}},inputs:{groupType:"groupType",excludeGroupAll:"excludeGroupAll",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),lt],decls:15,vars:16,consts:[["chipList",""],["entityGroupInput","","origin","matAutocompleteOrigin"],["entityGroupAutocomplete","matAutocomplete"],[1,"mat-block","tb-chip-list",3,"formGroup"],["formControlName","entityGroups"],[3,"removable","removed",4,"ngFor","ngForOf"],["matInput","","type","text","formControlName","entityGroup","matAutocompleteOrigin","",2,"max-width","200px",3,"focusin","placeholder","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[4,"ngIf"],[3,"removed","removable"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[3,"value"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-chip-grid",4,0),x(3,Rke,3,3,"mat-chip-row",5),d(4,"input",6,1),v(7,"translate"),T("focusin",function(){return D(a),M(o.onFocus())}),p()(),d(8,"mat-autocomplete",7,2),x(10,Fke,3,5,"mat-option",8),v(11,"async"),x(12,Nke,4,6,"mat-option",9),v(13,"async"),p(),x(14,Vke,3,3,"mat-error",10),p()}if(i&2){let a,s=me(2),c=me(6),u=me(9);m("formGroup",o.edgeEntityGroupListFormGroup),l(3),m("ngForOf",o.entityGroups),l(),te("placeholder",o.disabled?"":C(7,10,"entity-group.entity-group-list")),m("matAutocompleteConnectedTo",c)("matAutocomplete",u)("matChipInputFor",s),l(4),m("displayWith",o.displayEntityGroupFn),l(2),m("ngForOf",C(11,12,o.filteredEntityGroups)),l(2),m("ngIf",!((a=C(13,14,o.filteredEntityGroups))!=null&&a.length)),l(2),m("ngIf",o.edgeEntityGroupListFormGroup.get("entityGroups").hasError("required"))}},dependencies:[Ke,ce,Se,at,ze,ni,xt,Ri,mi,na,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi],encapsulation:2});let n=t;return n})();var Kke={};Ae(Kke,{OtaPackageAutocompleteComponent:()=>LD});y();var Bke=["packageInput"],jke=n=>({entity:n});
197function Gke(n,t){if(n&1&&(d(0,"a",12),g(1),p()),n&2){let r=b();m("routerLink",r.packageURL),l(),j(" ",r.displayPackageFn(r.otaPackageFormGroup.get("packageId").value)," ")}}function zke(n,t){if(n&1){let r=B();d(0,"button",13),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",14),g(2,"close"),p()()}}function $ke(n,t){if(n&1&&(d(0,"mat-option",15),O(1,"span",16),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,e.packageTitleText(r),e.searchText),Ut)}}function Uke(n,t){if(n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2){let r=b(2);l(2),z(C(3,1,r.notFoundPackage))}}function Hke(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"async"),p()),n&2){let r=b(2);l(),j(" ",C(2,1,r.translate.get(r.notMatchingPackage,Xe(3,jke,r.truncate.transform(r.searchText,!0,6,"..."))))," ")}}function qke(n,t){if(n&1){let r=B();d(0,"mat-option",17)(1,"div",18),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,Uke,4,3,"div",19)(3,Hke,3,5,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function Wke(n,t){n&1&&(d(0,"mat-hint",20),g(1,"ota-update.cant-applied-group-all"),p())}function Yke(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
197();l(),j(" ",C(2,1,r.requiredErrorText)," ")}}function Qke(n,t){if(n&1&&(d(0,"mat-hint"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),z(C(2,1,r.hintText))}}var LD=(()=>{let t=class t{get type(){return this.otaUpdateType}set type(e){this.otaUpdateType=e||As.FIRMWARE,this.reset()}get deviceProfileId(){return this.deviceProfileIdValue}set deviceProfileId(e){this.deviceProfileIdValue!==e&&(this.deviceProfileIdValue&&this.reset(),this.deviceProfileIdValue=e)}get deviceGroupAll(){return this.deviceGroupAllValue}set deviceGroupAll(e){this.deviceGroupAllValue=mt(e),this.setDisabledState(this.deviceGroupAll)}get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c){this.store=e,this.translate=i,this.truncate=o,this.entityService=a,this.otaPackageService=s,this.fb=c,this.otaUpdateType=As.FIRMWARE,this.useFullEntityId=!1,this.showDetailsPageLink=!1,this.searchText="",this.usePackageLink=!0,this.dirty=!1,this.cleanFilteredPackages=new Te,this.propagateChange=u=>{},this.authUser=Mr(this.store),this.authUser.authority===Mt.CUSTOMER_USER&&(this.usePackageLink=!1),this.otaPackageFormGroup=this.fb.group({packageId:[null]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){let e=this.otaPackageFormGroup.get("packageId").valueChanges.pipe(Wi(150),et(i=>{let o;typeof i=="string"||!i?o=null:o=this.useFullEntityId?i.id:i.id.id,this.updateView(o),i===null&&this.clear()}),W(i=>i?typeof i=="string"?i:i.title:""),ii(i=>this.fetchPackages(i)),Si());this.filteredPackages=Xt(this.cleanFilteredPackages,e)}ngOnDestroy(){this.cleanFilteredPackages.complete(),this.cleanFilteredPackages=null}getCurrentEntity(){let e=this.otaPackageFormGroup.get("packageId").value;return e&&typeof e!="string"?e:null}setDisabledState(e){this.disabled=e||this.deviceGroupAll,this.disabled?this.otaPackageFormGroup.disable({emitEvent:!1}):this.otaPackageFormGroup.enable({emitEvent:!1})}textIsNotEmpty(e){return e&&e.length>0}writeValue(e){if(this.searchText="",e!=null&&e!==""){let i="";typeof e=="string"?i=e:e.entityType&&e.id&&(i=e.id),i!==""?this.entityService.getEntity(G.OTA_PACKAGE,i,{ignoreLoading:!0,ignoreErrors:!0}).subscribe(o=>{this.usePackageLink&&(this.packageURL=ml(o.id.id,G.OTA_PACKAGE)),this.modelValue=this.useFullEntityId?o.id:o.id.id,this.otaPackageFormGroup.get("packageId").patchValue(o,{emitEvent:!1})},()=>{this.modelValue=null,this.otaPackageFormGroup.get("packageId").patchValue("",{emitEvent:!1}
197),e!==null&&this.propagateChange(this.modelValue)}):(this.modelValue=null,this.otaPackageFormGroup.get("packageId").patchValue("",{emitEvent:!1}),this.propagateChange(null))}else this.modelValue=null,this.otaPackageFormGroup.get("packageId").patchValue("",{emitEvent:!1});this.dirty=!0}onFocus(){this.dirty&&(this.otaPackageFormGroup.get("packageId").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}reset(){this.cleanFilteredPackages.next([]),this.otaPackageFormGroup.get("packageId").patchValue("",{emitEvent:!1})}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}displayPackageFn(e){return e?`${e.title} (${e.version})`:void 0}fetchPackages(e){this.searchText=e;let i=new On(50,0,e,{property:"title",direction:Xn.ASC}),o;if(De(this.deviceGroupId))o=this.otaPackageService.getOtaPackagesInfoByDeviceGroupId(i,this.deviceGroupId,this.type,{ignoreLoading:!0});else if(De(this.deviceProfileId))o=this.otaPackageService.getOtaPackagesInfoByDeviceProfileId(i,this.deviceProfileId,this.type,{ignoreLoading:!0});else return Z([]);return o.pipe(vt(()=>Z(yr())),W(a=>a&&a.data.length?a.data:null))}clear(){this.otaPackageFormGroup.get("packageId").patchValue(""),setTimeout(()=>{this.packageInput.nativeElement.blur(),this.packageInput.nativeElement.focus()},0)}get placeholderText(){return this.labelText||sv.get(this.type).label}get requiredErrorText(){return this.requiredText||sv.get(this.type).required}get notFoundPackage(){return sv.get(this.type).noFound}get notMatchingPackage(){return sv.get(this.type).noMatching}get hintText(){return sv.get(this.type).hint}packageTitleText(e){return`${e.title} (${e.version})`}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h($o),h(rr),h(oh),h(Wt))},t.\u0275cmp=L({type:t,selectors:[["tb-ota-package-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(Bke,7),i&2){let a;Q(a=K())&&(o.packageInput=a.first)}},inputs:{type:"type",deviceProfileId:"deviceProfileId",deviceGroupId:"deviceGroupId",labelText:"labelText",requiredText:"requiredText",useFullEntityId:"useFullEntityId",deviceGroupAll:"deviceGroupAll",showDetailsPageLink:"showDetailsPageLink",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:17,vars:21,consts:[["packageInput",""],["packageAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","packageId",3,"focusin","required","matAutocomplete","matAutocompleteDisabled"],["aria-label","Open ota package",3,"routerLink",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],["translate","",4,"ngIf"],[4,"ngIf"],["aria-label","Open ota package",3,"routerLink"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"value"],[3,"innerHTML"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate",""]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",4,0),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(6,Gke,2,2,"a",5)(7,zke,3,0,"button",6),d(8,"mat-autocomplete",7,1),x(10,$ke,3,5,"mat-option",8),v(11,"async"),x(12,qke,5,3,"mat-option",9),v(13,"async"),p(),x(14,Wke,2,0,"mat-hint",10)(15,Yke,3,3,"mat-error",11)(16,Qke,3,3,"mat-hint",11),p()}if(i&2){let a,s=me(9);m("formGroup",o.otaPackageFormGroup),l(2),z(C(3,15,o.placeholderText)),l(2),Y("!hidden",o.showDetail
197sPageLink&&o.usePackageLink&&o.disabled&&o.otaPackageFormGroup.get("packageId").value),m("required",o.required)("matAutocomplete",s)("matAutocompleteDisabled",o.disabled),l(2),m("ngIf",o.showDetailsPageLink&&o.usePackageLink&&o.otaPackageFormGroup.get("packageId").value&&o.disabled),l(),m("ngIf",o.otaPackageFormGroup.get("packageId").value&&!o.disabled),l(),m("displayWith",o.displayPackageFn),l(2),m("ngForOf",C(11,17,o.filteredPackages)),l(2),m("ngIf",!((a=C(13,19,o.filteredPackages))!=null&&a.length)),l(2),m("ngIf",o.deviceGroupAll),l(),m("ngIf",o.otaPackageFormGroup.get("packageId").hasError("required")),l(),m("ngIf",!o.disabled&&!o.deviceGroupAll)}},dependencies:[Ke,ce,ll,jt,Pe,Se,at,ze,At,to,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],styles:['@charset "UTF-8";[_nghost-%COMP%]   .mat-mdc-icon-button[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{border-bottom:none;color:inherit}']});let n=t;return n})();var tV={};Ae(tV,{TogglePasswordComponent:()=>Bh});y();function Xke(n,t){if(n&1){let r=B();d(0,"button",1),T("click",function(i){D(r);let o=b();return M(o.togglePassword(i))}),d(1,"mat-icon"),g(2),p()()}if(n&2){let r=b();Je("aria-pressed",r.showPassword),l(2),z(r.showPassword?"visibility":"visibility_off")}}var Bh=(()=>{let t=class t{constructor(e){this.hostElement=e,this.showPassword=!1,this.hideToggle=!1,this.input=null}togglePassword(e){e.stopPropagation(),this.showPassword=!this.showPassword,this.input.type=this.showPassword?"text":"password"}ngAfterViewInit(){this.input=this.hostElement.nativeElement.closest("mat-form-field").querySelector('input[type="password"]'),this.input===null&&(this.hideToggle=!0)}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275cmp=L({type:t,selectors:[["tb-toggle-password"]],decls:1,vars:1,consts:[["mat-icon-button","","type","button","tabindex","-1",3,"click",4,"ngIf"],["mat-icon-button","","type","button","tabindex","-1",3,"click"]],template:function(i,o){i&1&&x(0,Xke,3,2,"button",0),i&2&&m("ngIf",!o.hideToggle)},dependencies:[ce,Pe,Se],encapsulation:2});let n=t;return n})();y();y();var Zke="#00695C",_9="#E8E8E8",Jke="rgba(0, 0, 0, 0.38)",v9="rgba(0, 0, 0, 0.03)",eDe=v9,tDe=_9,ru=function(n){return n.squared="squared",n.rounded="rounded",n}(ru||{}),QKt=Object.keys(ru),KKt=new Map([[ru.squared,"widgets.segmented-button.layout-squared"],[ru.rounded,"widgets.segmented-button.layout-rounded"]]),XKt=new Map([[ru.squared,"assets/widget/segmented-button/squared-layout.svg"],[ru.rounded,"assets/widget/segmented-button/rounded-layout.svg"]]),oV=new Map([[ru.squared,"4px"],[ru.rounded,"40px"]]),aV={layout:ru.squared,autoScale:!0,cardBorder:1,cardBorderColor:"#305680",leftAppearance:{showLabel:!0,label:"Traditional",labelFont:{family:"Roboto",weight:"500",style:"normal",size:14,sizeUnit:"px",lineHeight:"18px"},showIcon:!0,icon:"home",iconSize:24,iconSizeUnit:"px"},rightAppearance:{showLabel:!0,label:"Hi-Perf",labelFont:{family:"Roboto",weight:"500",style:"normal",size:14,sizeUnit:"px",lineHeight:"18px"},showIcon:!0,icon:"home",iconSize:24,iconSizeUnit:"px"},selectedStyle:{mainColor:"#FFFFFF",backgroundColor:"#00695C",customStyle:{enabled:null,hovered:null,disabled:null}},unselectedStyle:{mainColor:"#000000C2",backgroundColor:"#E8E8E8",customStyle:{enabled:null,hovered:null,disabled:null}}},ZKt={initialState:{action:Eo.DO_NOTHING,defaultValue:!0,getAttribute:{key:"state",scope:null},getTimeSeries:{key:"state"},getAlarmStatus:{severityList:null,typeList:null},dataToValue:{type:wd.NONE,compareToValue:!0,dataToValueFunction:`/* Should return boolean value */
198return data;`}},disabledState:{action:Eo.DO_NOTHING,defaultValue:!1,getAttribute:{key:"state",scope:null},getTimeSeries:{key:"state"},getAlarmStatus:{severityList:null,typeList:null},dataToValue:{type:wd.NONE,compareToValue:!0,dataToValueFunction:`/* Should return boolean value */
199return data;`}},leftButtonClick:A2(),rightButtonClick:A2(),appearance:aV},iDe="--tb-widget-button-toggle-main-checked-color-",nDe="--tb-widget-button-toggle-background-checked-color-",rDe="--tb-widget-button-toggle-border-checked-color-",oDe="--tb-widget-button-toggle-main-unchecked-color-",aDe="--tb-widget-button-toggle-background-unchecked-color-",sDe="--tb-widget-button-toggle-border-unchecked-color-",Md=function(n){return n.enabled="enabled",n.hovered="hovered",n.disabled="disabled",n}(Md||{}),lDe=Object.keys(Md),JKt=new Map([[Md.enabled,"widgets.button-state.enabled"],[Md.hovered,"widgets.button-state.hovered"],[Md.disabled,"widgets.button-state.disabled"]]),vx=class{constructor(){}generateStateCss(t,r){let e=this.getColors(t),i=this.getColors(r);return`${iDe}${this.state}: ${e.mainColor};
200${nDe}${this.state}: ${e.backgroundColor};
201${rDe}${this.state}: ${e.borderColor};
202${oDe}${this.state}: ${i.mainColor};
203${aDe}${this.state}: ${i.backgroundColor};
204${sDe}${this.state}: ${i.borderColor};`}
204getColors(t){let r=this.getMainColor(t),e=this.getBackgroundColor(t),i=this.getBorderColor(),o=t.customStyle[this.state];return o?.overrideMainColor&&o?.mainColor&&(r=o.mainColor),o?.overrideBackgroundColor&&o?.backgroundColor&&(e=o.backgroundColor),o?.overrideBorderColor&&o?.borderColor&&(i=o.borderColor),{mainColor:r,backgroundColor:e,borderColor:i}}getMainColor(t){return t.mainColor||Zke}getBackgroundColor(t){return t.backgroundColor||_9}getBorderColor(){return tDe}},iV=class extends vx{get state(){return Md.enabled}},nV=class extends vx{get state(){return Md.hovered}},rV=class extends vx{get state(){return Md.disabled}getMainColor(){return Jke}getBackgroundColor(){return v9}getBorderColor(){return eDe}},cDe=new Map([[Md.enabled,new iV],[Md.hovered,new nV],[Md.disabled,new rV]]),y9=".mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header",C9=(n,t)=>{let r="";for(let e of lDe){let i=cDe.get(e);r+=`
205${i.generateStateCss(n,t)}`}return`${y9} {
206${r}
207}`},w9=n=>`${y9} {
208--tb-widget-button-toggle-border-radius: ${oV.get(n)}
209}`;var dDe=["toggleGroupContainer"],pDe=["widgetButton"],mDe=["leftButtonContent"],uDe=["rightButtonContent"];function hDe(n,t){if(n&1&&(d(0,"tb-icon",11),g(1),p()),n&2){let r=b
209(2);_n(r.leftIconStyle),l(),z(r.appearance.leftAppearance.icon)}}function fDe(n,t){if(n&1&&(d(0,"span",12),g(1),v(2,"async"),p()),n&2){let r=b(2);_n(r.leftLabelStyle),l(),z(C(2,3,r.leftLabel$))}}function gDe(n,t){if(n&1&&(d(0,"div",8,2),x(2,hDe,2,3,"tb-icon",9)(3,fDe,3,5,"span",10),p()),n&2){let r=b();l(2),m("ngIf",r.appearance.leftAppearance.showIcon),l(),m("ngIf",r.appearance.leftAppearance.showLabel)}}function bDe(n,t){if(n&1&&(d(0,"tb-icon",11),g(1),p()),n&2){let r=b(2);_n(r.rightIconStyle),l(),z(r.appearance.rightAppearance.icon)}}function _De(n,t){if(n&1&&(d(0,"span",12),g(1),v(2,"async"),p()),n&2){let r=b(2);_n(r.rightLabelStyle),l(),z(C(2,3,r.rightLabel$))}}function vDe(n,t){if(n&1&&(d(0,"div",8,3),x(2,bDe,2,3,"tb-icon",9)(3,_De,3,5,"span",10),p()),n&2){let r=b();l(2),m("ngIf",r.appearance.rightAppearance.showIcon),l(),m("ngIf",r.appearance.rightAppearance.showLabel)}}var yDe=60,CDe=10,uy=class uy{constructor(t,r,e){this.renderer=t,this.elementRef=r,this.utils=e,this.appearance=aV,this.value=!1,this.disabled=!1,this.hovered=!1,this.disableEvents=!1,this.clicked=new J,this.leftIconStyle={},this.rightIconStyle={},this.leftLabelStyle={},this.rightLabelStyle={}}ngOnInit(){this.updateAppearance()}ngOnChanges(t){for(let r of Object.keys(t))t[r].firstChange||(r==="appearance"?this.updateAppearance():r==="borderRadius"?this.updateBorderRadius():r==="autoScale"&&this.updateAutoScale())}ngAfterViewInit(){this.updateAutoScale()}ngOnDestroy(){this.buttonResize$&&this.buttonResize$.disconnect(),this.clearAppearanceCss()}validateSize(){this.appearance.autoScale&&this.widgetButton.nativeElement&&this.onResize()}updateAppearance(){this.clearAppearanceCss(),this.computedBorderColor=this.appearance.cardBorderColor,this.computedBorderWidth=pC(this.appearance.cardBorder.toString()),this.appearance.leftAppearance.showIcon&&(this.leftIconStyle=rm(this.appearance.leftAppearance.iconSize,this.appearance.leftAppearance.iconSizeUnit)),this.appearance.rightAppearance.showIcon&&(this.rightIconStyle=rm(this.appearance.rightAppearance.iconSize,this.appearance.rightAppearance.iconSizeUnit)),this.appearance.leftAppearance.showLabel&&(this.leftLabelStyle=_f(this.appearance.leftAppearance.labelFont),this.leftLabel$=this.ctx?this.ctx.registerLabelPattern(this.appearance.leftAppearance.label,this.leftLabel$):Z(this.appearance.leftAppearance.label)),this.appearance.rightAppearance.showLabel&&(this.rightLabelStyle=_f(this.appearance.rightAppearance.labelFont),this.rightLabel$=this.ctx?this.ctx.registerLabelPattern(this.appearance.rightAppearance.label,this.rightLabel$):Z(this.appearance.rightAppearance.label)),this.updateBorderRadius();let t=C9(this.appearance.selectedStyle,this.appearance.unselectedStyle),r=w9(this.appearance.layout);this.appearanceCssClass=this.utils.applyCssToElement(this.renderer,this.elementRef.nativeElement,"tb-widget-button",t+r),this.updateAutoScale()}updateBorderRadius(){if(this.borderRadius?.length){let t=pC(this.borderRadius);t?this.computedBorderRadius=t:this.computedBorderRadius=this.borderRadius}else this.computedBorderRadius=oV.get(this.appearance.layout)}clearAppearanceCss(){this.appearanceCssClass&&(this.utils.clearCssElement(this.renderer,this.appearanceCssClass,this.elementRef?.nativeElement),this.appearanceCssClass=null)}updateAutoScale(){this.buttonResize$&&this.buttonResize$.disconnect(),this.widgetButton&&this.rightButtonContent&&this.leftButtonContent&&((De(this.autoScale)?this.autoScale:this.appearance.autoScale)?(this.buttonResize$=new ResizeObserver(()=>{this.onResize()}),this.buttonResize$.observe(this.widgetButton.nativeElement),this.onResize()):(this.renderer.setStyle(this.widgetButton.nativeElement,"transform","none"),this.renderer.setStyle(this.widgetButton.nativeElement,"width","100%")))}onResize(){let r=this.widgetButton.nativeElement.getBoundingClientRect().height/yDe,e=this.widgetButton.nativeElement.getBoundingClientRect().width,i=this.widgetButton.nativeElement.getBoundingClientRect().height;this.renderer.setStyle(this.leftButtonContent.nativeElement,"transform","scale(1)"),this.renderer.setStyle(this.rightButtonContent.nativeElement,"transform","scale(1)");let o=this.leftButtonContent.nativeElement.getBoundingClientRect().width,a=this.leftButtonContent.nativeElement.getBoundingClientRect().height,s=Math.max(1,r),c=Math.min(Math.min((e/2-CDe)/o,i/a),s);this.renderer.setStyle(this.leftButtonContent.nativeElement,"transform",`scale(${c})`),this.renderer.setStyle(this.rightButtonContent.nativeElement,"transform",`scale(${c})`)}};uy.\u0275fac=function(r){return new(r||uy)(h(Ni),h(ge),h(vn))},uy.\u0275cmp=L({type:uy,selectors:[["tb-widget-button-toggle"]],viewQuery:function(r,e){if(r&1&&(ae(dDe,5),ae(pDe,5,ge),ae(mDe,5),ae(uDe,5)),r&2){let i;Q(i=K())&&(e.toggleGroupContainer=i.first),Q(i=K())&&(e.widgetButton=i.first),Q(i=K())&&(e.leftButtonContent=i.first),Q(i=K())&&(e.rightButtonContent=i.first)}},inputs:{appearance:"appearance",borderRadius:"borderRadius",autoScale:"autoScale",value:"value",disabled:"disabled",hovered:"hovered",disableEvents:"disableEvents",ctx:"ctx"},outputs:{clicked:"clicked"},features:[lt],decls:8,vars:23,consts:[["toggleGroupContainer",""],["widgetButton",""],["leftButtonContent",""],["rightButtonContent",""],[1,"tb-toggle-container"],[1,"tb-toggle-header",3,"change","ngModel"],[3,"value","disabled"],["class","tb-widget-button-content",4,"ngIf"],[1,"tb-widget-button-content"],["matButtonIcon","",3,"style",4,"ngIf"],["class","tb-widget-button-label",3,"style",4,"ngIf"],["matButtonIcon",""],[1,"tb-widget-button-label"]],template:function(r,e){if(r&1){let i=B();d(0,"div",4,0)(2,"mat-button-toggle-group",5,1),T("change",function(a){return D(i),M(e.clicked.emit
209(a))}),d(4,"mat-button-toggle",6),x(5,gDe,4,2,"div",7),p(),d(6,"mat-button-toggle",6),x(7,vDe,4,2,"div",7),p()()()}r&2&&(l(2),hi("border-radius",e.computedBorderRadius)("border-color",e.disabled?"rgba(0,0,0,0.38)":e.computedBorderColor)("border-width",e.computedBorderWidth),Y("tb-pointer-events",e.disableEvents)("tb-disabled-state",e.disabled)("tb-disabled",e.disabled),m("ngModel",e.value),l(2),Y("tb-hover-state",e.hovered),m("value",!0)("disabled",e.disabled),l(),m("ngIf",e.appearance.leftAppearance.showIcon||e.appearance.leftAppearance.showLabel),l(),Y("tb-hover-state",e.hovered),m("value",!1)("disabled",e.disabled),l(),m("ngIf",e.appearance.rightAppearance.showIcon||e.appearance.rightAppearance.showLabel))},dependencies:[ce,hc,Kc,xe,eo,In,Ve],styles:['@charset "UTF-8";[_nghost-%COMP%]{max-width:100%}[_nghost-%COMP%]   .tb-toggle-container[_ngcontent-%COMP%]{display:block;height:100%}[_nghost-%COMP%]   .tb-toggle-header[_ngcontent-%COMP%]{transition:transform .5s cubic-bezier(.35,0,.25,1)}[_nghost-%COMP%]   .tb-widget-button-content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;gap:4px;justify-content:center;align-items:center}[_nghost-%COMP%]   .tb-widget-button-content[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .tb-widget-button-content[_ngcontent-%COMP%]   span.tb-widget-button-label[_ngcontent-%COMP%]{line-height:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header{overflow:visible;width:100%;height:100%;padding:3px;border:1px solid;background:transparent}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle+.mat-button-toggle{border-left:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard{flex:1;width:50%;border-radius:var(--tb-widget-button-toggle-border-radius, 4px)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard.tb-hover-state .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-unchecked-color-hovered, #FFFFFF);background-color:var(--tb-widget-button-toggle-background-unchecked-color-hovered, #00695C);border:1px solid var(--tb-widget-button-toggle-border-unchecked-color-hovered, #00695C)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard.tb-hover-state.mat-button-toggle-checked .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-checked-color-hovered, #FFFFFF);background-color:var(--tb-widget-button-toggle-background-checked-color-hovered, #00695C);border:1px solid var(--tb-widget-button-toggle-border-checked-color-hovered, #00695C)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button{display:flex;align-items:center;justify-content:center;height:100%;border-radius:var(--tb-widget-button-toggle-border-radius, 4px);color:var(--tb-widget-button-toggle-main-unchecked-color-enabled, rgba(0, 0, 0, .76));background-color:var(--tb-widget-button-toggle-background-unchecked-color-enabled, #E8E8E8);border:1px solid var(--tb-widget-button-toggle-border-unchecked-color-enabled, #E8E8E8)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button .mat-button-toggle-label-content .mat-pseudo-checkbox{display:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-checked-color-enabled, #FFFFFF);background-color:var(--tb-widget-button-toggle-background-checked-color-enabled, #00695C);border:1px solid var(--tb-widget-button-toggle-border-checked-color-enabled, #00695C)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-pointer-events .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button{pointer-events:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-pointer-events .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-pointer-events .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-ripple{opacity:0}
209[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(:disabled):not(.tb-disabled-state):not(.tb-pointer-events) .mat-button-toggle.mat-button-toggle-appearance-standard:hover .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-unchecked-color-hovered, #FFFFFF);background-color:var(--tb-widget-button-toggle-background-unchecked-color-hovered, #00695C);border:1px solid var(--tb-widget-button-toggle-border-unchecked-color-hovered, #00695C)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(:disabled):not(.tb-disabled-state):not(.tb-pointer-events) .mat-button-toggle.mat-button-toggle-appearance-standard:hover.mat-button-toggle-checked .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-checked-color-hovered, #FFFFFF);background-color:var(--tb-widget-button-toggle-background-checked-color-hovered, #00695C);border:1px solid var(--tb-widget-button-toggle-border-checked-color-hovered, #00695C)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:disabled, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled-state{pointer-events:none}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:disabled .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled-state .mat-button-toggle.mat-button-toggle-appearance-standard .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-unchecked-color-disabled, rgba(0, 0, 0, .12));background-color:var(--tb-widget-button-toggle-background-unchecked-color-disabled, #E8E8E8);border:1px solid var(--tb-widget-button-toggle-border-unchecked-color-disabled, #E8E8E8)}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:disabled .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled-state .mat-button-toggle.mat-button-toggle-appearance-standard.mat-button-toggle-checked .mat-button-toggle-button{color:var(--tb-widget-button-toggle-main-checked-color-disabled, rgba(255, 255, 255, .8));background-color:var(--tb-widget-button-toggle-background-checked-color-disabled, rgba(0, 0, 0, .12));border:1px solid var(--tb-widget-button-toggle-border-checked-color-disabled, rgba(0, 0, 0, .12))}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:disabled .mat-button-toggle-focus-overlay, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:disabled .mat-button-toggle-ripple, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled-state .mat-button-toggle-focus-overlay, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header.tb-disabled-state .mat-button-toggle-ripple{opacity:0}[_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle-focus-overlay, [_nghost-%COMP%]     .mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header .mat-button-toggle-ripple{border-radius:inherit}']});var ou=uy;pe([fe(),le("design:type",Object)],ou.prototype,"value",void 0);pe([fe(),le("design:type",Object)],ou.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],ou.prototype,"hovered",void 0);pe([fe(),le("design:type",Object)],ou.prototype,"disableEvents",void 0);var SDe={};Ae(SDe,{HelpMarkdownComponent:()=>jh});y();y();y();var x9=(()=>{let t=class t{constructor(e){this.http=e}getHelpBaseUrl(){return this.helpBaseUrlObservable||(this.helpBaseUrlObservable=this.http.get("/api/uiSettings/helpBaseUrl",re({responseType:"text"},dS(!0))).pipe(bu(1),hu())),this.helpBaseUrlObservable}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var sV="/assets",S9={content:"## Not found",helpBaseUrl:sV},T9=(()=>{let t=class t{constructor(e,i,o,a){this.translate=e,this.wl=i,this.http=o,this.uiSettingsService=a,this.docPlatformPrefix=QB,this.helpCache={},this.wl.getUiHelpBaseUrl$().subscribe(s=>{this.wlHelpBaseUrl!==s&&(this.wlHelpBaseUrl=s,this.helpCache={})})}getHelpContent(e){let i=this.translate.currentLang;return this.helpCache[i]&&this.helpCache[i][e]?Z(this.helpCache[i][e]):this.loadHelpContent(i,e).pipe(vt(()=>{let o=this.translate.getDefaultLang();return i!==o?this.loadHelpContent(o,e).pipe(vt(()=>Z(S9))):Z(S9)}),Ft(o=>this.processIncludes(this.processVariables(o))),et(o=>{let a=this.helpCache[i];a||(a={},this.helpCache[i]=a),a[e]=o}))}getHelpBaseUrl(){return this.wlHelpBaseUrl?Z(this.wlHelpBaseUrl):this.uiSettingsService.getHelpBaseUrl()}loadHelpContent(e,i){return this.getHelpBaseUrl().pipe(Ft(o=>this.loadHelpContentFromBaseUrl(o,e,i).pipe(vt(a=>{if(sV!==o)return this.loadHelpContentFromBaseUrl(sV,e,i);throw a}))))}loadHelpContentFromBaseUrl(e,i,o){return this.http.get(`${e}/help/${i}/${o}.md`,{responseType:"text"}).pipe(W(a=>({content:a,helpBaseUrl:e})))}processVariables(e){let i={siteBaseUrl:this.wl.getHelpLinkBaseUrl(),docPlatformPrefix:this.docPlatformPrefix,helpBaseUrl:e.helpBaseUrl},o=new RegExp(Object.keys(i).map(a=>`\\\${${a}}`).join("|"),"g");return e.content.replace(o,a=>i[a.slice(2,-1)])}processIncludes(e){let o=/{% include (.*) %}/.exec(e);if(o){let a=o[1];return this.getHelpContent(a).pipe(Ft(s=>(e=e.replace(o[0],s),this.processIncludes(e))))}else return Z(e)}};t.\u0275fac=function(i){return new(i||t)(X(Ge),X(fl),X(Jt),X(x9))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var hy=class hy{constructor(t){this.help=t,this.style={},this.markdownReady=new J,this.markdownText=new Gn(null),this.markdownText$=this.markdownText.pipe(Si()),this.loadHelpPending=!1}ngOnInit(){this.loadHelpWhenVisible()}ngOnDestroy(){this.markdownText.complete()}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];!e.firstChange&&e.currentValue!==e.previousValue&&(r==="visible"&&this.loadHelpPending&&(this.loadHelpPending=!1,this.loadHelp()),["helpId","helpContent","helpContentBase64","asyncHelpContent"].includes(r)&&(this.markdownText.next(null),this.loadHelpWhenVisible()))}}loadHelpWhenVisible(){this.visible?this.loadHelp():this.loadHelpPending=!0}loadHelp(){this.helpId?this.help.getHelpContent(this.helpId).subscribe(t=>{this.markdownText.next(t)}):this.helpContent?this.markdownText.next(this.helpContent):this.helpContentBase64?this.markdownText.next(f4(this.helpContentBase64)):this.asyncHelpContent&&this.asyncHelpContent.subscribe(t=>{this.markdownText.next(t)})}onMarkdownReady(){this.markdownReady.next()}markdownClick(t){}}
209;hy.\u0275fac=function(r){return new(r||hy)(h(T9))},hy.\u0275cmp=L({type:hy,selectors:[["tb-help-markdown"]],inputs:{helpId:"helpId",helpContent:"helpContent",helpContentBase64:"helpContentBase64",asyncHelpContent:"asyncHelpContent",visible:"visible",style:"style"},outputs:{markdownReady:"markdownReady"},features:[lt],decls:2,vars:5,consts:[["lineNumbers","","markdownClass","tb-help-markdown",3,"ready","click","data"]],template:function(r,e){r&1&&(d(0,"tb-markdown",0),v(1,"async"),T("ready",function(){return e.onMarkdownReady()})("click",function(o){return e.markdownClick(o)}),p()),r&2&&(_n(e.style),m("data",C(1,3,e.markdownText$)))},dependencies:[qs,Ve],styles:['@charset "UTF-8";[_nghost-%COMP%]     .tb-help-markdown{overflow:auto;max-width:80vw;max-height:80vh;margin-top:30px}[_nghost-%COMP%]     .tb-help-markdown.tb-markdown-view h1:first-child, [_nghost-%COMP%]     .tb-help-markdown.tb-markdown-view h2:first-child, [_nghost-%COMP%]     .tb-help-markdown.tb-markdown-view h3:first-child, [_nghost-%COMP%]     .tb-help-markdown.tb-markdown-view h4:first-child, [_nghost-%COMP%]     .tb-help-markdown.tb-markdown-view h5:first-child, [_nghost-%COMP%]     .tb-help-markdown.tb-markdown-view h6:first-child{padding-top:0}']});var jh=hy;pe([fe(),le("design:type",Boolean)],jh.prototype,"visible",void 0);y();var BD="{:copy-code}",E9=`^{:code-style="(.*)"}
210`,I9="{:auto}",k9="{:target=&quot;_blank&quot;}",A9=(()=>{let t=class t{constructor(e,i,o,a){this.translate=e,this.clipboardService=i,this.window=o,this.document=a,this.renderer=new Hl,this.headerIds=!0,this.gfm=!0,this.breaks=!1,this.pedantic=!1,this.smartLists=!0,this.smartypants=!1,this.mangle=!1,this.renderer2=new Hl,this.id=1;let s={autolink(c){if(!c.endsWith(BD))return!1},url(c){if(!c.endsWith(BD))return!1}};Rr.use({tokenizer:s}),this.renderer.code=(c,u,f)=>{let _=D9(c);if(_.copyCode){let I=M9(this.renderer2.code(_.code,u,f),_);return this.id++,this.wrapCopyCode(this.id,I,_)}else return this.wrapDiv(M9(this.renderer2.code(_.code,u,f),_))},this.renderer.table=(c,u)=>{let f=!1;c.includes(I9)&&(f=!0,c=c.replace(I9,""));let _=this.renderer2.table(c,u);return f&&(_=_.replace("<table",'<table class="auto"')),_},this.renderer.tablecell=(c,u)=>{let f=D9(c);return f.multiline=!1,f.copyCode&&(this.id++,c=this.wrapCopyCode(this.id,f.code,f)),this.renderer2.tablecell(c,u)},this.renderer.link=(c,u,f)=>f.endsWith(k9)?(f=f.substring(0,f.length-k9.length),this.renderer2.link(c,u,f).replace("<a href=",'<a target="_blank" href=')):this.renderer2.link(c,u,f),this.document.addEventListener("selectionchange",this.onSelectionChange.bind(this)),this.window.markdownCopyCode=this.markdownCopyCode.bind(this)}wrapDiv(e){return`<div>${e}</div>`}wrapCopyCode(e,i,o){let a="clipboard-btn";return o.multiline&&(a+=" multiline"),`<div class="code-wrapper noChars" id="codeWrapper${e}" onClick="markdownCopyCode(${e})">${i}<span id="copyCodeId${e}" style="display: none;">${encodeURIComponent(o.code)}</span><button class="${a}">
211    <p>${this.translate.instant("markdown.copy-code")}</p>
212    <div>
213       <img src="/assets/copy-code-icon.svg" alt="${this.translate.instant("markdown.copy-code")}">
214    </div>
215</button></div>`}onSelectionChange(){let e=$(".code-wrapper");e.removeClass("noChars"),this.getSelectedText()||e.addClass("noChars")}getSelectedText(){let e;return this.window.getSelection?e=this.window.getSelection().toString():this.document.getSelection?e=this.document.getSelection():this.document.selection&&(e=this.document.selection.createRange().text),e}markdownCopyCode(e){let i=$("#codeWrapper"+e);if(i.hasClass("noChars")){let o=decodeURIComponent($("#copyCodeId"+e).text());this.clipboardService.copy(o)&&import("./chunk-4TV2XRNX.js").then(()=>{i.hasClass("tooltipstered")||i.tooltipster({content:this.translate.instant("markdown.copied"),delay:0,trigger:"custom",triggerClose:{click:!0,tap:!0,scroll:!0,mouseleave:!0},side:"top",distance:12,trackOrigin:!0}),i.tooltipster("instance").open()})}}};t.\u0275fac=function(i){return new(i||t)(X(Ge),X(AE),X(Wr),X(Qi))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function D9(n){let t={copyCode:!1,multiline:!1,code:n};t.code.endsWith(BD)&&(t.code=t.code.substring(0,t.code.length-BD.length),t.copyCode=!0);let r=t.code.match(new RegExp(E9));r&&(t.codeStyle=r[1],t.code=t.code.replace(new RegExp(E9),""));let e=t.code.trim().split(`
216`).length;return t.multiline=e>1,t}function M9(n,t){let r="<pre ngNonBindable";return t.multiline||(r+=' class="no-line-numbers"'),t.codeStyle&&(r+=` style="${t.codeStyle}"`),r+=">",n.replace("<pre>",r)}var IDe={};Ae(IDe,{ProtobufContentComponent:()=>jD});y();var TDe=["protobufEditor"];function EDe(n,t){if(n&1){let r=B();d(0,"button",12),T("click",function(){D(r);let i=b();return M(i.beautifyProtobuf())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.tidy")," "))}var jD=(()=>{let t=class t{get readonly(){return this.readonlyValue}set readonly(e){this.readonlyValue=mt(e)}constructor(e,i,o){this.elementRef=e,this.store=i,this.raf=o,this.ignoreChange=!1,this.toastTargetId=`protobufContentEditor-${Zr()}
216`,this.fullscreen=!1,this.errorShowed=!1,this.propagateChange=null}ngOnInit(){let e=this.protobufEditorElmRef.nativeElement,i={mode:"ace/mode/protobuf",showGutter:!0,showPrintMargin:!1,readOnly:this.disabled||this.readonly},o={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};i=re(re({},i),o),da().subscribe(a=>{this.protobufEditor=a.edit(e,i),this.protobufEditor.session.setUseWrapMode(!0),this.protobufEditor.setValue(this.contentBody?this.contentBody:"",-1),this.protobufEditor.setReadOnly(this.disabled||this.readonly),this.protobufEditor.on("change",()=>{this.ignoreChange||this.updateView()}),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(e)})}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.protobufEditor&&this.protobufEditor.destroy()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.protobufEditor&&this.protobufEditor.setReadOnly(this.disabled||this.readonly)}writeValue(e){this.contentBody=e,this.protobufEditor&&(this.ignoreChange=!0,this.protobufEditor.setValue(this.contentBody?this.contentBody:"",-1),this.ignoreChange=!1)}updateView(){let e=this.protobufEditor.getValue();this.contentBody!==e&&(this.contentBody=e,this.propagateChange(this.contentBody))}beautifyProtobuf(){Zm(this.contentBody,{indent_size:4,wrap_line_length:60}).subscribe(e=>{this.protobufEditor.setValue(e||"",-1),this.updateView()})}onFullscreen(){this.protobufEditor&&setTimeout(()=>{this.protobufEditor.resize()},0)}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.protobufEditor.resize(),this.protobufEditor.renderer.updateFull()})}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(ve),h(es))},t.\u0275cmp=L({type:t,selectors:[["tb-protobuf-content"]],viewQuery:function(i,o){if(i&1&&ae(TDe,7),i&2){let a;Q(a=K())&&(o.protobufEditorElmRef=a.first)}},inputs:{label:"label",disabled:"disabled",fillHeight:"fillHeight",editorStyle:"editorStyle",tbPlaceholder:"tbPlaceholder",readonly:"readonly"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:15,vars:14,consts:[["protobufEditor",""],["tb-fullscreen","",1,"flex","flex-col",2,"background","#fff",3,"fullscreenChanged","fullscreen"],[1,"tb-protobuf-content-toolbar","flex","flex-row","items-center","justify-start",2,"height","40px"],[1,"tb-title","no-padding"],[1,"flex-1"],["type","button","mat-button","","class","tidy",3,"click",4,"ngIf"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],["id","tb-protobuf-panel","tb-toast","",1,"tb-protobuf-content-panel","flex","flex-col",3,"toastTarget"],["id","tb-protobuf-input"],["type","button","mat-button","",1,"tidy",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1),T("fullscreenChanged",function(){return D(a),M(o.onFullscreen())}),d(1,"div",2)(2,"label",3),g(3),p(),O(4,"span",4),x(5,EDe,3,3,"button",5),d(6,"fieldset",6)(7,"div",7),v(8,"translate"),T("click",function(){return D(a),M(o.fullscreen=!o.fullscreen)}),d(9,"button",8)(10,"mat-icon",9),g(11),p()()()()(),d(12,"div",10),O(13,"div",11,0),p()()}i&2&&(Y("fill-height",o.fillHeight),m("fullscreen",o.fullscreen),l(3),z(o.label),l(2),m("ngIf",!o.readonly&&!o.disabled),l(2),te("matTooltip",C(8,12,o.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(o.fullscreen?"fullscreen_exit":"fullscreen"),l(),te("toastTarget",o.toastTargetId),l(),_n(o.editorStyle),Y("fill-height",o.fillHeight))},dependencies:[ce,yt,Pe,Se,zt,xs,xa,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{position:relative}[_nghost-%COMP%]   .fill-height[_ngcontent-%COMP%]{height:100%}.tb-protobuf-content-toolbar[_ngcontent-%COMP%]   button.mat-mdc-button-base[_ngcontent-%COMP%], .tb-protobuf-content-toolbar[_ngcontent-%COMP%]   button.mat-mdc-button-base.tb-mat-32[_ngcontent-%COMP%]{align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;margin:0;font-size:.8rem;line-height:15px;color:#7b7b7b;background:#dcdcdc59}.tb-protobuf-content-toolbar[_ngcontent-%COMP%]   button.mat-mdc-button-base[_ngcontent-%COMP%]:not(:last-child), .tb-protobuf-content-toolbar[_ngcontent-%COMP%]   button.mat-mdc-button-base.tb-mat-32[_ngcontent-%COMP%]:not(:last-child){margin-right:4px}.tb-protobuf-content-toolbar[_ngcontent-%COMP%]   button.mat-mdc-button-base[_ngcontent-%COMP%]:not(.mat-mdc-icon-button){height:23px}.tb-protobuf-content-panel[_ngcontent-%COMP%]{height:100%;margin-left:15px;border:1px solid #c0c0c0}.tb-protobuf-content-panel[_ngcontent-%COMP%]   #tb-protobuf-input[_ngcontent-%COMP%]{width:100%;
216min-width:200px;min-height:160px;height:100%}.tb-protobuf-content-panel[_ngcontent-%COMP%]   #tb-protobuf-input[_ngcontent-%COMP%]:not(.fill-height){min-height:200px}']});let n=t;return n})();y();var kDe=["cssEditor"],DDe=(n,t)=>({"tb-disabled":n,"fill-height":t}),MDe=(n,t)=>({"tb-error":n,"tb-required":t});function ADe(n,t){if(n&1){let r=B();d(0,"button",12),T("click",function(){D(r);let i=b();return M(i.beautifyCss())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.tidy")," "))}var lV=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c){this.elementRef=e,this.utils=i,this.translate=o,this.store=a,this.raf=s,this.cd=c,this.ignoreChange=!1,this.fullscreen=!1,this.hasErrors=!1,this.propagateChange=null}ngOnInit(){let e=this.cssEditorElmRef.nativeElement,i={mode:"ace/mode/css",showGutter:!0,showPrintMargin:!0,readOnly:this.disabled},o={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};i=re(re({},i),o),da().subscribe(a=>{this.cssEditor=a.edit(e,i),this.cssEditor.session.setUseWrapMode(!0),this.cssEditor.setValue(this.modelValue?this.modelValue:"",-1),this.cssEditor.setReadOnly(this.disabled),this.cssEditor.on("change",()=>{this.ignoreChange||this.updateView()}),this.cssEditor.session.on("changeAnnotation",()=>{let c=this.cssEditor.session.getAnnotations().filter(u=>u.type==="error").length>0;this.hasErrors!==c&&(this.hasErrors=c,this.propagateChange(this.modelValue),this.cd.markForCheck())}),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(e)})}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.cssEditor&&this.cssEditor.destroy()}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.cssEditor.resize(),this.cssEditor.renderer.updateFull()})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.cssEditor&&this.cssEditor.setReadOnly(this.disabled)}validate(e){return this.hasErrors?{css:{valid:!1}}:null}beautifyCss(){p7(this.modelValue,{indent_size:4}).subscribe(e=>{this.modelValue!==e&&(this.cssEditor.setValue(e||"",-1),this.updateView())})}writeValue(e){this.modelValue=e,this.cssEditor&&(this.ignoreChange=!0,this.cssEditor.setValue(this.modelValue?this.modelValue:"",-1),this.ignoreChange=!1)}updateView(){let e=this.cssEditor.getValue();this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue),this.cd.markForCheck())}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(vn),h(Ge),h(ve),h(es),h(Me))},t.\u0275cmp=L({type:t,selectors:[["tb-css"]],viewQuery:function(i,o){if(i&1&&ae(kDe,7),i&2){let a;Q(a=K())&&(o.cssEditorElmRef=a.first)}},inputs:{label:"label",disabled:"disabled",fillHeight:"fillHeight",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}])],decls:15,vars:19,consts:[["cssEditor",""],["tb-fullscreen","",1,"tb-css","flex","flex-col",2,"background","#fff",3,"fullscreen"],[1,"tb-css-toolbar","flex","flex-row","items-center","justify-start",2,"height","40px"],[1,"tb-title","no-padding"],[1,"flex-1"],["type","button","mat-button","","class","tidy",3,"click",4,"ngIf"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],["id","tb-css-panel",1,"tb-css-content-panel","flex","flex-col"],["id","tb-css-in
216put"],["type","button","mat-button","",1,"tidy",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1)(1,"div",2)(2,"label",3),g(3),p(),O(4,"span",4),x(5,ADe,3,3,"button",5),d(6,"fieldset",6)(7,"div",7),v(8,"translate"),T("click",function(){return D(a),M(o.fullscreen=!o.fullscreen)}),d(9,"button",8)(10,"mat-icon",9),g(11),p()()()()(),d(12,"div",10),O(13,"div",11,0),p()()}i&2&&(bt(Yi(13,DDe,o.disabled,o.fillHeight)),m("fullscreen",o.fullscreen),l(2),bt(Yi(16,MDe,!o.disabled&&(o.hasErrors||o.required&&!o.modelValue),!o.disabled&&o.required)),l(),z(o.label),l(2),m("ngIf",!o.disabled),l(2),te("matTooltip",C(8,11,o.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(o.fullscreen?"fullscreen_exit":"fullscreen"),l(2),Y("fill-height",o.fillHeight))},dependencies:[ce,yt,Pe,Se,zt,xa,be],styles:[`@charset "UTF-8";.tb-css{position:relative}.tb-css.tb-disabled{color:#00000061}.tb-css.fill-height{height:100%}.tb-css .tb-css-content-panel{height:calc(100% - 40px);border:1px solid #c0c0c0}.tb-css .tb-css-content-panel #tb-css-in
216put{width:100%;min-width:200px;height:100%}.tb-css .tb-css-content-panel #tb-css-input:not(.fill-height){min-height:200px}.tb-css .tb-css-toolbar>*:not(:last-child){margin-right:4px}.tb-css .tb-css-toolbar button.mat-mdc-button-base,.tb-css .tb-css-toolbar button.mat-mdc-button-base.tb-mat-32{background:#dcdcdc59;align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;font-size:.8rem;line-height:15px}.tb-css .tb-css-toolbar button.mat-mdc-button-base:not(.tb-help-popup-button),.tb-css .tb-css-toolbar button.mat-mdc-button-base.tb-mat-32:not(.tb-help-popup-button){color:#7b7b7b}.tb-css .tb-css-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.tb-css .tb-css-toolbar .tb-help-popup-button-loading{background:#f3f3f3}
217`],encapsulation:2});let n=t;return n})();y();var ODe=["htmlEditor"],PDe=(n,t)=>({"tb-disabled":n,"fill-height":t}),RDe=(n,t)=>({"tb-error":n,"tb-required":t}),FDe=()=>({}),NDe=n=>({minHeight:n});function VDe(n,t){if(n&1){let r=B();d(0,"button",12),T("click",function(){D(r);let i=b();return M(i.beautifyHtml())}),g(1),v(2,"translate"),p()}n&2&&(l(),j(" ",C(2,1,"js-func.tidy")," "))}var cV=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c){this.elementRef=e,this.utils=i,this.translate=o,this.store=a,this.raf=s,this.cd=c,this.ignoreChange=!1,this.minHeight="200px",this.fullscreen=!1,this.hasErrors=!1,this.propagateChange=null}ngOnInit(){let e=this.htmlEditorElmRef.nativeElement,i={mode:"ace/mode/html",showGutter:!0,showPrintMargin:!0,readOnly:this.disabled},o={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};i=re(re({},i),o),da().subscribe(a=>{this.htmlEditor=a.edit(e,i),this.htmlEditor.session.setUseWrapMode(!0),this.htmlEditor.setValue(this.modelValue?this.modelValue:"",-1),this.htmlEditor.setReadOnly(this.disabled),this.htmlEditor.on("change",()=>{this.ignoreChange||this.updateView()}),this.htmlEditor.session.on("changeAnnotation",()=>{let s=this.htmlEditor.session.getAnnotations()||[],c=s.length,u=c;for(;u--;)s[u].text.includes("Named entity expected")&&s.splice(u,1);c>s.length&&this.htmlEditor.session.setAnnotations(s);let f=s.filter(_=>_.type==="error").length>0;this.hasErrors!==f&&(this.hasErrors=f,this.propagateChange(this.modelValue),this.cd.markForCheck())}),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(e)})}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.htmlEditor&&this.htmlEditor.destroy()}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.htmlEditor.resize(),this.htmlEditor.renderer.updateFull()})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.htmlEditor&&this.htmlEditor.setReadOnly(this.disabled)}validate(e){return this.hasErrors?{html:{valid:!1}}:null}beautifyHtml(){m7(this.modelValue,{indent_size:4}).subscribe(e=>{this.modelValue!==e&&(this.htmlEditor.setValue(e||"",-1),this.updateView())})}writeValue(e){this.modelValue=e,this.htmlEditor&&(this.ignoreChange=!0,this.htmlEditor.setValue(this.modelValue?this.modelValue:"",-1),this.ignoreChange=!1)}updateView(){let e=this.htmlEditor.getValue();this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue),this.cd.markForCheck())}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(vn),h(Ge),h(ve),h(es),h(Me))},t.\u0275cmp=L({type:t,selectors:[["tb-html"]],viewQuery:function(i,o){if(i&1&&ae(ODe,7),i&2){let a;Q(a=K())&&(o.htmlEditorElmRef=a.first)}},inputs:{label:"label",disabled:"disabled",fillHeight:"fillHeight",minHeight:"minHeight",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}])],decls:15,vars:24,consts:[["htmlEditor",""],["tb-fullscreen","",1,"tb-html","flex","flex-col",2,"background","#fff",3,"fullscreen"],[1,"tb-html-toolbar","flex","flex-row","items-center","justify-start",2,"min-height","40px"],[1,"tb-title","no-padding"],[1,"flex-1"],["type","button","mat-button","","class","tidy",3,"click",4,"ngIf"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],["id","tb-html-panel",1,"tb-html-content-panel","flex","flex-col"],["id","tb-html-input"],["type","button","mat-button","",1,"tidy",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"div",1)(1,"div",2)(2,"label",3),g(3),p(),O(4,"span",4),x(5,VDe,3,3,"button",5),d(6,"fieldset",6)(7,"div",7),v(8,"translate"),T("click",function(){return D(a),M(o.fullscreen=!o.fullscreen)}),d(9,"button",8)(10,"mat-icon",9),g(11),p()()()()(),d(12,"div",10),O(13,"div",11,0),p()()}i&2&&(bt(Yi(15,PDe,o.disabled,o.fillHeight)),m("fullscreen",o.fullscreen),l(2),bt(Yi(18,RDe,!o.disabled&&(o.hasErrors||o.required&&!o.modelValue),!o.disabled&&o.required)),l(),z(o.label),l(2),m("ngIf",!o.disabled),l(2),te("matTooltip",C(8,13,o.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(o.fullscreen?"fullscreen_exit":"fullscreen"),l(2),_n(o.fillHeight?hn(21,FDe):Xe(22,NDe,o.minHeight)),Y("fill-height",o.fillHeight))},dependencies:[ce,yt,Pe,Se,zt,xa,be],styles:[`@charset "UTF-8";.tb-html{position:relative}.tb-html.tb-disabled{color:#00000061}.tb-html.fill-height{height:100%}.tb-html .tb-html-content-panel{height:calc(100% - 40px);border:1px solid #c0c0c0}.tb-html .tb-html-content-panel #tb-html-input{width:100%;
217min-width:200px;height:100%}.tb-html:not(.tb-fullscreen){padding-bottom:15px}.tb-html .tb-html-toolbar>*:not(:last-child){margin-right:4px}.tb-html .tb-html-toolbar button.mat-mdc-button-base,.tb-html .tb-html-toolbar button.mat-mdc-button-base.tb-mat-32{background:#dcdcdc59;align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;font-size:.8rem;line-height:15px}.tb-html .tb-html-toolbar button.mat-mdc-button-base:not(.tb-help-popup-button),.tb-html .tb-html-toolbar button.mat-mdc-button-base.tb-mat-32:not(.tb-help-popup-button){color:#7b7b7b}.tb-html .tb-html-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.tb-html .tb-html-toolbar .tb-help-popup-button-loading{background:#f3f3f3}
218`],encapsulation:2});let n=t;return n})();var QDe={};Ae(QDe,{CDK_DRAG_CONFIG:()=>xV,CDK_DRAG_HANDLE:()=>wV,CDK_DRAG_PARENT:()=>gy,CDK_DRAG_PLACEHOLDER:()=>J9,CDK_DRAG_PREVIEW:()=>Z9,CDK_DROP_LIST:()=>SV,CDK_DROP_LIST_GROUP:()=>KD,CdkDrag:()=>fV,CdkDragHandle:()=>hV,CdkDragPlaceholder:()=>vV,CdkDragPreview:()=>_V,CdkDropList:()=>bV,CdkDropListGroup:()=>gV,DragDrop:()=>XD,DragDropModule:()=>by,DragDropRegistry:()=>X9,DragRef:()=>WD,DropListRef:()=>QD,copyArrayItem:()=>$De,moveItemInArray:()=>Gh,transferArrayItem:()=>zDe});y();function q9(n){let t=n.cloneNode(!0),r=t.querySelectorAll("[id]"),e=n.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<r.length;i++)r[i].removeAttribute("id");return e==="canvas"?R9(n,t):(e==="input"||e==="select"||e==="textarea")&&P9(n,t),O9("canvas",n,t,R9),O9("input, textarea, select",n,t,P9),t}function O9(n,t,r,e){let i=t.querySelectorAll(n);if(i.length){let o=r.querySelectorAll(n);for(let a=0;a<i.length;a++)e(i[a],o[a])}}var LDe=0;function P9(n,t){t.type!=="file"&&(t.value=n.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${LDe++}`)}function R9(n,t){let r=t.getContext("2d");if(r)try{r.drawImage(n,0,0)}catch{}}function yV(n){let t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function pV(n,t,r){let{top:e,bottom:i,left:o,right:a}=n;return r>=e&&r<=i&&t>=o&&t<=a}function Cx(n,t,r){n.top+=t,n.bottom=n.top+n.height,n.left+=r,n.right=n.left+n.width}function F9(n,t,r,e){let{top:i,right:o,bottom:a,left:s,width:c,height:u}=n,f=c*t,_=u*t;return e>
vendor: 4,099 bytes, line 218
218i-_&&e<a+_&&r>s-f&&r<o+f}var UD=class{constructor(t){this._document=t,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(r=>{this.positions.set(r,{scrollPosition:{top:r.scrollTop,left:r.scrollLeft},clientRect:yV(r)})})}handleScroll(t){let r=yf(t),e=this.positions.get(r);if(!e)return null;let i=e.scrollPosition,o,a;if(r===this._document){let u=this.getViewportScrollPosition();o=u.top,a=u.left}else o=r.scrollTop,a=r.scrollLeft;let s=i.top-o,c=i.left-a;return this.positions.forEach((u,f)=>{u.clientRect&&r!==f&&r.contains(f)&&Cx(u.clientRect,s,c)}),i.top=o,i.left=a,{top:s,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function W9(n,t){let r=n.rootNodes;if(r.length===1&&r[0].nodeType===t.ELEMENT_NODE)return r[0];let e=t.createElement("div");return r.forEach(i=>e.appendChild(i)),e}function CV(n,t,r){for(let e in t)if(t.hasOwnProperty(e)){let i=t[e];i?n.setProperty(e,i,r?.has(e)?"important":""):n.removeProperty(e)}return n}function fy(n,t){let r=t?"":"none";CV(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":r,"-ms-user-select":r,"-webkit-user-select":r,"-moz-user-select":r})}function N9(n,t,r){CV(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},r)}function HD(n,t){return t&&t!="none"?n+" "+t:n}function V9(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=qD(t.left,t.top)}function qD(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function L9(n){let t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function BDe(n){let t=getComputedStyle(n),r=dV(t,"transition-property"),e=r.find(s=>s==="transform"||s==="all");if(!e)return 0;let i=r.indexOf(e),o=dV(t,"transition-duration"),a=dV(t,"transition-delay");return L9(o[i])+L9(a[i])}function dV(n,t){return n.getPropertyValue(t).split(",").map(e=>e.trim())}var jDe=new Set(["position"]),mV=class{get element(){return this._preview}constructor(t,r,e,i,o,a,s,c,u){this._document=t,this._rootElement=r,this._direction=e,this._initialDomRect=i,this._previewTemplate=o,this._previewClass=a,this._pickupPositionOnPage=s,this._initialTransform=c,this._zIndex=u}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),B9(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return BDe(this._preview)}addEventListener(t,r){this._preview.addEventListener(t,r)}removeEventListener(t,r){this._preview.removeEventListener(t,r)}_createPreview(){let t=this._previewTemplate,r=this._previewClass,e=t?t.template:null,i;if(e&&t){let o=t.matchSize?this._initialDomRect:null,a=t.viewContainer.createEmbeddedView(e,t.context);a.detectChanges(),i=W9(a,this._document),this._previewEmbeddedView=a,t.matchSize?V9(i,o):i.style.transform=qD(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=q9(this._rootElement),V9(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return CV(i.style,{"pointer-events":"none",margin:B9(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},jDe),fy(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),r&&(Array.isArray(r)?r.forEach(o=>i.classList.add(o)):i.classList.add(r)),i}};function B9(n){return"showPopover"in n}var j9=ms({passive:!0}),GD=ms({passive:!1}),G9=ms({passive:!1,capture:!0}),GDe=800,z9=new Set(["position"]),WD=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEac
218h(r=>fy(r,t)))}constructor(t,r,e,i,o,a){this._config=r,this._document=e,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=a,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=$d(!1),this._moveEvents=new Te,this._pointerMoveSubscription=ln.EMPTY,this._pointerUpSubscription=ln.EMPTY,this._scrollSubscription=ln.EMPTY,this._resizeSubscription=ln.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new Te,this.started=new Te,this.released=new Te,this.ended=new Te,this.entered=new Te,this.exited=new Te,this.dropped=new Te,this.moved=this._moveEvents,this._pointerDown=s=>{if(this.beforeStarted.next(),this._handles.length){let c=this._getTargetHandle(s);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,s)}else this.disabled||this._initializeDragSequence(this._rootElement,s)},this._pointerMove=s=>{let c=this._getPointerPositionOnPage(s);if(!this._hasStartedDragging()){let f=Math.abs(c.x-this._pickupPositionOnPage.x),_=Math.abs(c.y-this._pickupPositionOnPage.y);if(f+_>=this._config.dragStartThreshold){let S=Date.now()>=this._dragStartTime+this._getDragStartDelay(s),F=this._dropContainer;if(!S){this._endDragSequence(s);return}(!F||!F.isDragging()&&!F.isReceiving())&&(s.cancelable&&s.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(s)))}return}s.cancelable&&s.preventDefault();let u=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(u),this._dropContainer)this._updateActiveDropContainer(u,c);else{let f=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,_=this._activeTransform;_.x=u.x-f.x+this._passiveTransform.x,_.y=u.y-f.y+this._passiveTransform.y,this._applyRootElementTransform(_.x,_.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:u,event:s,distance:this._getDragDistance(u),delta:this._pointerDirectionDelta})})},this._pointerUp=s=>{this._endDragSequence(s)},this._nativeDragStart=s=>{if(this._handles.length){let c=this._getTargetHandle(s);c&&!this._disabledHandles.has(c)&&!this.disabled&&s.preventDefault()}else this.disabled||s.preventDefault()},this.withRootElement(t).withParent(r.parentDragRef||null),this._parentPositions=new UD(e),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(e=>qc(e)),this._handles.forEach(e=>fy(e,this.disabled)),this._toggleNativeDragInteractions();let r=new Set;return this._disabledHandles.forEach(e=>{this._handles.indexOf(e)>-1&&r.add(e)}),this._disabledHandles=r,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let r=qc(t);return r!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{r.addEventListener("mousedown",this._pointerDown,GD),r.addEventListener("touchstart",this._pointerDown,j9),r.addEventListener("dragstart",this._nativeDragStart,GD)}),this._initialTransform=void 0,this._rootElement=r),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?qc(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),fy(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),fy(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",
vendor: 7,405 bytes, line 218
218U9,G9)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let r=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(r),dropPoint:r,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){yx(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let r=this._getShadowRoot(),e=this._dropContainer;if(r&&this._ngZone.runOutsideAngular(()=>{r.addEventListener("selectstart",U9,G9)}),e){let i=this._rootElement,o=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(s,i),this._initialTransform=i.style.transform||"",this._preview=new mV(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,r)),N9(i,!1,z9),this._document.body.appendChild(o.replaceChild(a,i)),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,r){this._parentDragRef&&r.stopPropagation();let e=this.isDragging(),i=yx(r),o=!i&&r.button!==0,a=this._rootElement,s=yf(r),c=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+GDe>Date.now(),u=i?rT(r):nT(r);if(s&&s.draggable&&r.type==="mousedown"&&r.preventDefault(),e||o||c||u)return;if(this._handles.length){let I=a.style;this._rootElementTapHighlight=I.webkitTapHighlightColor||"",I.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(I=>this._updateOnScroll(I)),this._boundaryElement&&(this._boundaryRect=yV(this._boundaryElement));let f=this._previewTemplate;this._pickupPositionInElement=f&&f.template&&!f.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,r);let _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(r);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,r)}_cleanupDragArtifacts(t){N9(this._rootElement,!0,z9),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let r=this._dropContainer,e=r.getItemIndex(this),i=this._getPointerPositionOnPage(t),o=this._getDragDistance(i),a=r._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:t}),this.dropped.next({item:this,currentIndex:e,previousIndex:this._initialIndex,container:r,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:o,dropPoint:i,event:t}),r.drop(this,e,this._initialIndex,this._initialContainer,a,o,i,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:r},{x:e,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,r);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,r)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,r,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(e,i),this._dropContainer._sortItem(this,t,r,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,r):this._applyPreviewTransform(t-this._pickupPositionInElement.x,r-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let r=this._preview.getTransitionDuration();return r===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(e=>{let i=a=>{(!a||this._preview&&yf(a)===this._preview.element&&a.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",i),e(),clearTimeout(o))},o=setTimeout(i,r*1.5);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,r=t?t.template:null,e;return r?(this._placeholderRef=t.viewContainer.createEmbeddedView(r,t.context),this._placeholderRef.detectChanges(),e=W9(this._placeholderRef,this._document)):e=q9(this._rootElement),e.style.pointerEvents="none",e.classList.add("cdk-drag-placeholder"),e}_getPointerPositionInElement(t,r,e){let i=r===this._rootElement?null:r,o=i?i.getBoundingClientRect():t,a=yx(e)?e.targetTouches[0]:e,s=this._getViewportScrollPosition(),c=a.pageX-o.left-s.left,u=a.pageY-o.top-s.top;return{x:o.left-t.left+c,y:o.top-t.top+u}}_getPointerPositionOnPage(t){let r=this._getViewportScrollPosition(),e=yx(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=e.pageX-r.left,o=e.pageY-r.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let s=this._ownerSVGElement.createSVGPoint();return s.x=i,s.y=o,s.matrixTransform(a.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(t){let r=this._dropContainer?this._dropContainer.lockAxis:null,{x:e,y:i}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||r==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||r==="y")&&(e=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,s=this._boundaryRect,{width:c,height:u}=this._getPreviewRect(),f=s.top+a,_=s.bottom-(u-a),I=s.left+o,S=s.right-(c-o);
218e=$9(e,I,S),i=$9(i,f,_)}return{x:e,y:i}}_updatePointerDirectionDelta(t){let{x:r,y:e}=t,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,a=Math.abs(r-o.x),s=Math.abs(e-o.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=r>o.x?1:-1,o.x=r),s>this._config.pointerDirectionChangeThreshold&&(i.y=e>o.y?1:-1,o.y=e),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,fy(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,GD),t.removeEventListener("touchstart",this._pointerDown,j9),t.removeEventListener("dragstart",this._nativeDragStart,GD)}_applyRootElementTransform(t,r){let e=1/this.scale,i=qD(t*e,r*e),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=HD(i,this._initialTransform)}_applyPreviewTransform(t,r){let e=this._previewTemplate?.template?void 0:this._initialTransform,i=qD(t,r);this._preview.setTransform(HD(i,e))}_getDragDistance(t){let r=this._pickupPositionOnPage;return r?{x:t.x-r.x,y:t.y-r.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:r}=this._passiveTransform;if(t===0&&r===0||this.isDragging()||!this._boundaryElement)return;let e=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||e.width===0&&e.height===0)return;let o=i.left-e.left,a=e.right-i.right,s=i.top-e.top,c=e.bottom-i.bottom;i.width>e.width?(o>0&&(t+=o),a>0&&(t-=a)):t=0,i.height>e.height?(s>0&&(r+=s),c>0&&(r-=c)):r=0,(t!==this._passiveTransform.x||r!==this._passiveTransform.y)&&this.setFreeDragPosition({y:r,x:t})}_getDragStartDelay(t){let r=this.dragStartDelay;return typeof r=="number"?r:yx(t)?r.touch:r?r.mouse:0}_updateOnScroll(t){let r=this._parentPositions.handleScroll(t);if(r){let e=yf(t);this._boundaryRect&&e!==this._boundaryElement&&e.contains(this._boundaryElement)&&Cx(this._boundaryRect,r.top,r.left),this._pickupPositionOnPage.x+=r.left,this._pickupPositionOnPage.y+=r.top,this._dropContainer||(this._activeTransform.x-=r.left,this._activeTransform.y-=r.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=US(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,r){let e=this._previewContainer||"global";if(e==="parent")return t;if(e==="global"){let i=this._document;return r||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return qc(e)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(t){return this._handles.find(r=>t.target&&(t.target===r||r.contains(t.target)))}};function $9(n,t,r){return Math.max(t,Math.min(r,n))}function yx(n){return n.type[0]==="t"}function U9(n){n.preventDefault()}function Gh(n,t,r){let e=wx(t,n.length-1),i=wx(r,n.length-1);if(e===i)return;let o=n[e],a=i<e?-1:1;for(let s=e;s!==i;s+=a)n[s]=n[s+a];n[i]=o}function zDe(n,t,r,e){let i=wx(r,n.length-1),o=wx(e,t.length);n.length&&t.splice(o,0,n.splice(i,1)[0])}function $De(n,t,r,e){let i=wx(e,t.length);n.length&&t.splice(i,0,n[r])}function wx(n,t){return Math.max(0,Math.min(t,n))}var YD=class{constructor(t){this._dragDropRegistry=t,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(t){this.withItems(t)}sort(t,r,e,i){let o=this._itemPositions,a=this._getItemIndexFromPointerPosition(t,r,e,i);if(a===-1&&o.length>0)return null;let s=this.orientation==="horizontal",c=o.findIndex(q=>q.drag===t),u=o[a],f=o[c].clientRect,_=u.clientRect,I=c>a?1:-1,S=this._getItemOffsetPx(f,_,I),F=this._getSiblingOffsetPx(c,o,I),H=o.slice();return Gh(o,c,a),o.forEach((q,ee)=>{if(H[ee]===q)return;let Ie=q.drag===t,He=Ie?S:F,Le=Ie?t.getPlaceholderElement():q.drag.getRootElement();q.offset+=He;
vendor: 10,191 bytes, line 218
218let qe=Math.round(q.offset*(1/q.drag.scale));s?(Le.style.transform=HD(`translate3d(${qe}px, 0, 0)`,q.initialTransform),Cx(q.clientRect,0,He)):(Le.style.transform=HD(`translate3d(0, ${qe}px, 0)`,q.initialTransform),Cx(q.clientRect,He,0))}),this._previousSwap.overlaps=pV(_,r,e),this._previousSwap.drag=u.drag,this._previousSwap.delta=s?i.x:i.y,{previousIndex:c,currentIndex:a}}enter(t,r,e,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(t,r,e):i,a=this._activeDraggables,s=a.indexOf(t),c=t.getPlaceholderElement(),u=a[o];if(u===t&&(u=a[o+1]),!u&&(o==null||o===-1||o<a.length-1)&&this._shouldEnterAsFirstChild(r,e)&&(u=a[0]),s>-1&&a.splice(s,1),u&&!this._dragDropRegistry.isDragging(u)){let f=u.getRootElement();f.parentElement.insertBefore(c,f),a.splice(o,0,t)}else this._element.appendChild(c),a.push(t);c.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let r=t.getRootElement();if(r){let e=this._itemPositions.find(i=>i.drag===t)?.initialTransform;r.style.transform=e||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(e=>e.drag===t)}updateOnScroll(t,r){this._itemPositions.forEach(({clientRect:e})=>{Cx(e,t,r)}),this._itemPositions.forEach(({drag:e})=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(r=>{let e=r.getVisibleElement();return{drag:r,offset:0,initialTransform:e.style.transform||"",clientRect:yV(e)}}).sort((r,e)=>t?r.clientRect.left-e.clientRect.left:r.clientRect.top-e.clientRect.top)}_getItemOffsetPx(t,r,e){let i=this.orientation==="horizontal",o=i?r.left-t.left:r.top-t.top;return e===-1&&(o+=i?r.width-t.width:r.height-t.height),o}_getSiblingOffsetPx(t,r,e){let i=this.orientation==="horizontal",o=r[t].clientRect,a=r[t+e*-1],s=o[i?"width":"height"]*e;if(a){let c=i?"left":"top",u=i?"right":"bottom";e===-1?s-=a.clientRect[c]-o[u]:s+=o[c]-a.clientRect[u]}return s}_shouldEnterAsFirstChild(t,r){if(!this._activeDraggables.length)return!1;let e=this._itemPositions,i=this.orientation==="horizontal";if(e[0].drag!==this._activeDraggables[0]){let a=e[e.length-1].clientRect;return i?t>=a.right:r>=a.bottom}else{let a=e[0].clientRect;return i?t<=a.left:r<=a.top}}_getItemIndexFromPointerPosition(t,r,e,i){let o=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:s,clientRect:c})=>{if(s===t)return!1;if(i){let u=o?i.x:i.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&u===this._previousSwap.delta)return!1}return o?r>=Math.floor(c.left)&&r<Math.floor(c.right):e>=Math.floor(c.top)&&e<Math.floor(c.bottom)});return a===-1||!this._sortPredicate(a,t)?-1:a}},uV=class{constructor(t,r){this._document=t,this._dragDropRegistry=r,this._previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1},this._relatedNodes=[]}start(t){let r=this._element.childNodes;this._relatedNodes=[];for(let e=0;e<r.length;e++){let i=r[e];this._relatedNodes.push([i,i.nextSibling])}this.withItems(t)}sort(t,r,e,i){let o=this._getItemIndexFromPointerPosition(t,r,e),a=this._previousSwap;if(o===-1||this._activeItems[o]===t)return null;let s=this._activeItems[o];if(a.drag===s&&a.overlaps&&a.deltaX===i.x&&a.deltaY===i.y)return null;let c=this.getItemIndex(t),u=t.getPlaceholderElement(),f=s.getRootElement();o>c?f.after(u):f.before(u),Gh(this._activeItems,c,o);let _=this._getRootNode().elementFromPoint(r,e);return a.deltaX=i.x,a.deltaY=i.y,a.drag=s,a.overlaps=f===_||f.contains(_),{previousIndex:c,currentIndex:o}}enter(t,r,e,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(t,r,e):i;o===-1&&(o=this._getClosestItemIndexToPointer(t,r,e));let a=this._activeItems[o],s=this._activeItems.indexOf(t);s>-1&&this._activeItems.splice(s,1),a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,t),a.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,r=this._previousSwap;for(let e=this._relatedNodes.length-1;e>-1;e--){let[i,o]=this._relatedNodes[e];i.parentNode===t&&i.nextSibling!==o&&(o===null?t.appendChild(i):o.parentNode===t&&t.insertBefore(i,o))}this._relatedNodes=[],this._activeItems=[],r.drag=null,r.deltaX=r.deltaY=0,r.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,r,e){let i=this._getRootNode().elementFromPoint(Math.floor(r),Math.floor(e)),o=i?this._activeItems.findIndex(a=>{let s=a.getRootElement();return i===s||s.contains(i)}):-1;return o===-1||!this._sortPredicate(o,t)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=US(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,r,e){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,o=-1;for(let a=0;a<this._activeItems.length;a++){let s=this._activeItems[a];if(s!==t){let{x:c,y:u}=s.getRootElement().getBoundingClientRect(),f=Math.hypot(r-c,e-u);f<i&&(i=f,o=a)}}return o}},H9=.05,Y9=.05,Bc=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(Bc||{}),il=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(il||{}),QD=class{constructor(t,r,e,i,o){this._dragDropRegistry=r,this._ngZone=i,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new Te,this.entered=new Te,this.exited=new Te,this.dropped=new Te,this.sorted=new Te,this.receivingStarted=new Te,this.receivingStopped=new Te,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=ln.EMPTY,this._verticalScrollDirection=Bc.NONE,this._horizontalScrollDirection=il.NONE,this._stopScrollTimers=new Te,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),eS(0,JL).pipe(Be(this._stopScrollTimers)).subscribe(()=>{let s=this._scrollNode,c=this.autoScrollStep;this._verticalScrollDirection===Bc.UP?s.scrollBy(0,-c):this._verticalScrollDirection===Bc.DOWN&&s.scrollBy(0,c),this._horizontalScrollDirection===il.LEFT?s.scrollBy(-c,0):this._horizontalScrollDirection===il.RIGHT&&s.scrollBy(c,0)})};let a=this.element=qc(t);this._document=e,this.withOrientation("vertical").withElementContainer(a),r.registerDropContainer(this),this._parentPositions=new UD(e)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,r,e,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(t)),this._sortStrategy.enter(t,r,e,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,r,e,i,o,a,s,c={}){this._reset(),this.dropped.next({item:t,currentIndex:r,previousIndex:e,container:this,previousContainer:i,isPointerOverContainer:o,distance:a,dropPoint:s,event:c})}withItems(t){let r=this._draggables;return this._draggables=t,t.forEach(e=>e._withDropContainer(this)),this.isDragging()&&(r.filter(i=>i.isDragging()).every(i=>t.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof YD&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new uV(this._document,this._dragDropRegistry);else{let r=new YD(this._dragDropRegistry);r.direction=this._direction,r.orientation=t,this._sortStrategy=r}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((r,e)=>this.sortPredicate(r,e,this)),this}withScrollableParents(t){let r=this._container;return this._scrollableElements=t.indexOf(r)===-1?[r,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let r=qc(this.element),e=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(t);return e>-1&&this._scrollableElements.splice(e,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,r,e,i){if(this.sortingDisabled||!this._domRect||!F9(this._domRect,H9,r,e))return;let o=this._sortStrategy.sort(t,r,e,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,r){if(this.autoScrollDisabled)return;let e,i=Bc.NONE,o=il.NONE;if(this._parentPositions.positions.forEach((a,s)=>
218{s===this._document||!a.clientRect||e||F9(a.clientRect,H9,t,r)&&([i,o]=UDe(s,a.clientRect,this._direction,t,r),(i||o)&&(e=s))}),!i&&!o){let{width:a,height:s}=this._viewportRuler.getViewportSize(),c={width:a,height:s,top:0,right:a,bottom:s,left:0};i=Q9(c,r),o=K9(c,t),e=window}e&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||e!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=e,(i||o)&&e?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(r=>r._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,r){return this._domRect!=null&&pV(this._domRect,t,r)}_getSiblingContainerFromPosition(t,r,e){return this._siblings.find(i=>i._canReceive(t,r,e))}_canReceive(t,r,e){if(!this._domRect||!pV(this._domRect,r,e)||!this.enterPredicate(t,this))return!1;let i=this._getShadowRoot().elementFromPoint(r,e);return i?i===this._container||this._container.contains(i):!1}_startReceiving(t,r){let e=this._activeSiblings;!e.has(t)&&r.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:r}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let r=this._parentPositions.handleScroll(t);r&&this._sortStrategy.updateOnScroll(r.top,r.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=US(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(r=>r.isDragging());this._siblings.forEach(r=>r._startReceiving(this,t))}};function Q9(n,t){let{top:r,bottom:e,height:i}=n,o=i*Y9;return t>=r-o&&t<=r+o?Bc.UP:t>=e-o&&t<=e+o?Bc.DOWN:Bc.NONE}function K9(n,t){let{left:r,right:e,width:i}=n,o=i*Y9;return t>=r-o&&t<=r+o?il.LEFT:t>=e-o&&t<=e+o?il.RIGHT:il.NONE}function UDe(n,t,r,e,i){let o=Q9(t,i),a=K9(t,e),s=Bc.NONE,c=il.NONE;if(o){let u=n.scrollTop;o===Bc.UP?u>0&&(s=Bc.UP):n.scrollHeight-u>n.clientHeight&&(s=Bc.DOWN)}if(a){let u=n.scrollLeft;r==="rtl"?a===il.RIGHT?u<0&&(c=il.RIGHT):n.scrollWidth+u>n.clientWidth&&(c=il.LEFT):a===il.LEFT?u>0&&(c=il.LEFT):n.scrollWidth-u>n.clientWidth&&(c=il.RIGHT)}return[s,c]}var zD=ms({passive:!1,capture:!0}),$D=new Set,HDe=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=L({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[ot],decls:0,vars:0,template:function(i,o){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0});let n=t;return n})(),X9=(()=>{let t=class t{constructor(e,i){this._ngZone=e,this._appRef=Rt(db),this._environmentInjector=Rt(tS),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=$d([]),this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new Te,this.pointerUp=new Te,this.scroll=ne
218w Te,this._preventDefaultWhileDragging=o=>{this._activeDragInstances().length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,zD)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,zD)}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._loadResets(),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=i.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:a=>this.pointerUp.next(a),options:!0}).set("scroll",{handler:a=>this.scroll.next(a),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:zD}),o||this._globalListeners.set("mousemove",{handler:a=>this.pointerMove.next(a),options:zD}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((a,s)=>{this._document.addEventListener(s,a.handler,a.options)})})}}stopDragging(e){this._activeDragInstances.update(i=>{let o=i.indexOf(e);return o>-1?(i.splice(o,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this.scroll];return e&&e!==this._document&&i.push(new Ma(o=>this._ngZone.runOutsideAngular(()=>{let s=c=>{this._activeDragInstances().length&&o.next(c)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),Xt(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}_loadResets(){if(!$D.has(this._appRef)){$D.add(this._appRef);let e=rS(HDe,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{$D.delete(this._appRef),$D.size===0&&e.destroy()})}}};t.\u0275fac=function(i){return new(i||t)(X(Bt),X(Qi))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),qDe={dragStartThreshold:5,pointerDirectionChangeThreshold:5},XD=(()=>{let t=class t{constructor(e,i,o,a){this._document=e,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=a}createDrag(e,i=qDe){return new WD(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new QD(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};t.\u0275fac=function(i){return new(i||t)(X(Qi),X(Bt),X(lc),X(X9))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),gy=new tt("CDK_DRAG_PARENT");var wV=new tt("CdkDragHandle"),hV=(()=>{let t=class t{get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._stateChanges.next(this)}constructor(e,i){this.element=e,this._parentDrag=i,this._stateChanges=new Te,this._disabled=!1,i?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(gy,12))},t.\u0275dir=_e({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",Re]},standalone:!0,features:[ne([{provide:wV,useExisting:t}]),si]});let n=t;return n})(),xV=new tt("CDK_DRAG_CONFIG"),WDe="cdk-drag",SV=new tt("CdkDropList"),fV=(()=>{let t=class t{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}constructor(e,i,o,a,s,c,u,f,_,I,S){this.element=e,this.dropContainer=i,this._ngZone=a,this._viewContainerRef
218=s,this._dir=u,this._changeDetectorRef=_,this._selfHandle=I,this._parentDrag=S,this._destroyed=new Te,this._handles=new Gn([]),this.scale=1,this.started=new J,this.released=new J,this.ended=new J,this.entered=new J,this.exited=new J,this.dropped=new J,this.moved=new Ma(F=>{let H=this._dragRef.moved.pipe(W(q=>({source:this,pointerPosition:q.pointerPosition,event:q.event,delta:q.delta,distance:q.distance}))).subscribe(F);return()=>{H.unsubscribe()}}),this._injector=Rt(Mn),this._dragRef=f.createDrag(e,{dragStartThreshold:c&&c.dragStartThreshold!=null?c.dragStartThreshold:5,pointerDirectionChangeThreshold:c&&c.pointerDirectionChangeThreshold!=null?c.pointerDirectionChangeThreshold:5,zIndex:c?.zIndex}),this._dragRef.data=this,t._dragInstances.push(this),c&&this._assignDefaults(c),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this),i._dropListRef.beforeStarted.pipe(Be(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Lo(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let i=e.rootElementSelector,o=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let e=t._dragInstances.indexOf(this);e>-1&&t._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),o=i.indexOf(e);o>-1&&(i.splice(o,1),this._handles.next(i))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):qc(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,o=this.dragStartDelay,a=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof o=="object"&&o?o:Ao(o),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe($n(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains(WDe)){e.withParent(t._dragInstances.find(o=>o.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>
218{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){let{lockAxis:i,dragStartDelay:o,constrainPosition:a,previewClass:s,boundaryElement:c,draggingDisabled:u,rootElementSelector:f,previewContainer:_}=e;this.disabled=u??!1,this.dragStartDelay=o||0,i&&(this.lockAxis=i),a&&(this.constrainPosition=a),s&&(this.previewClass=s),c&&(this.boundaryElement=c),f&&(this.rootElementSelector=f),_&&(this.previewContainer=_)}_setupHandlesListener(){this._handles.pipe(et(e=>{let i=e.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),ii(e=>Xt(...e.map(i=>i._stateChanges.pipe(on(i))))),Be(this._destroyed)).subscribe(e=>{let i=this._dragRef,o=e.element.nativeElement;e.disabled?i.disableHandle(o):i.enableHandle(o)})}};t._dragInstances=[],t.\u0275fac=function(i){return new(i||t)(h(ge),h(SV,12),h(Qi),h(Bt),h(ci),h(xV,8),h(mr,8),h(XD),h(Me),h(wV,10),h(gy,12))},t.\u0275dir=_e({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,o){i&2&&Y("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Re],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Nr]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[ne([{provide:gy,useExisting:t}]),si,lt]});let n=t;return n})(),KD=new tt("CdkDropListGroup"),gV=(()=>{let t=class t{constructor(){this._items=new Set,this.disabled=!1}ngOnDestroy(){this._items.clear()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:[2,"cdkDropListGroupDisabled","disabled",Re]},exportAs:["cdkDropListGroup"],standalone:!0,features:[ne([{provide:KD,useExisting:t}]),si]});let n=t;return n})(),YDe=0,bV=(()=>{let t=class t{get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}constructor(e,i,o,a,s,c,u){this.element=e,this._changeDetectorRef=o,this._scrollDispatcher=a,this._dir=s,this._group=c,this._destroyed=new Te,this.connectedTo=[],this.id=`cdk-drop-list-${YDe++}`,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new J,this.entered=new J,this.exited=new J,this.sorted=new J,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,u&&this._assignDefaults(u),this._dropListRef.enterPredicate=(f,_)=>this.enterPredicate(f.data,_.data),this._dropListRef.sortPredicate=(f,_,I)=>this.sortPredicate(f,_.data,I.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),c&&c._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(on(this._dir.value),Be(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=uC(this.connectedTo).map(o=>
218{if(typeof o=="string"){let a=t._dropLists.find(s=>s.id===o);return a}return o});if(this._group&&this._group._items.forEach(o=>{i.indexOf(o)===-1&&i.push(o)}),!this._scrollableParentsResolved){let o=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(o),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let o=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(o)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=Ao(this.autoScrollStep,2),e.connectedTo(i.filter(o=>o&&o!==this).map(o=>o._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),Xt(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:i,draggingDisabled:o,sortingDisabled:a,listAutoScrollDisabled:s,listOrientation:c}=e;this.disabled=o??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=s??!1,this.orientation=c||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}};t._dropLists=[],t.\u0275fac=function(i){return new(i||t)(h(ge),h(XD),h(Me),h(wf),h(mr,8),h(KD,12),h(xV,8))},t.\u0275dir=_e({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,o){i&2&&(Je("id",o.id),Y("cdk-drop-list-disabled",o.disabled)("cdk-drop-list-dragging",o._dropListRef.isDragging())("cdk-drop-list-receiving",o._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",Re],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",Re],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Re],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[ne([{provide:KD,useValue:void 0},{provide:SV,useExisting:t}]),si]});let n=t;return n})(),Z9=new tt("CdkDragPreview"),_V=(()=>{let t=class t{constructor(e){this.templateRef=e,this._drag=Rt(gy,{optional:!0}),this.matchSize=!1,this._drag?._setPreviewTemplate(this)}ngOnDestroy(){this._drag?._resetPreviewTemplate(this)}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["ng-template","cdkDragPreview",""]],inputs:{data:"data",matchSize:[2,"matchSize","matchSize",Re]},standalone:!0,features:[ne([{provide:Z9,useExisting:t}]),si]});let n=t;return n})(),J9=new tt("CdkDragPlaceholder"),vV=(()=>{let t=class t{constructor(e){this.templateRef=e,this._drag=Rt(gy,{optional:!0}),this._drag?._setPlaceholderTemplate(this)}ngOnDestroy(){this._drag?._resetPlaceholderTemplate(this)}};t.\u0275fac=function(i){return new(i||t)(h(an))},t.\u0275dir=_e({type:t,selectors:[["ng-template","cdkDragPlaceholder",""]],inputs:{data:"data"},standalone:!0,features:[ne([{provide:J9,useExisting:t}])]});let n=t;return n})();var by=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,imports:[bV,gV,fV,hV,_V,vV],exports:[_a,bV,gV,fV,hV,_V,vV]}),t.\u0275inj=Nt({providers:[XD],imports:[_a]});let n=t;return n})();var cMe={};Ae(cMe,{MultipleImageInputComponent:()=>ZD});y();var KDe=["flow"],XDe=["flowDrop"],ZDe=()=>({allowDuplicateUploads:!0}
218),JDe=(n,t)=>({"tb-error":n,"tb-required":t}),eMe=()=>({accept:"image/*"}),tMe=n=>({size:n});function iMe(n,t){if(n&1&&(d(0,"label",12),g(1),p()),n&2){let r=b();bt(Yi(3,JDe,!r.disabled&&r.required&&!r.safeImageUrls.length,!r.disabled&&r.required)),l(),z(r.label)}}function nMe(n,t){n&1&&(d(0,"div",20)(1,"mat-icon",21),g(2,"drag_indicator"),p()())}function rMe(n,t){if(n&1){let r=B();d(0,"div",22)(1,"button",23),v(2,"translate"),T("click",function(){D(r);let i=b().index,o=b();return M(o.clearImage(i))}),d(3,"mat-icon"),g(4,"close"),p()()()}n&2&&(l(),te("matTooltip",C(2,1,"action.remove")))}function oMe(n,t){if(n&1){let r=B();d(0,"div",13),T("dndStart",function(){let i=D(r).index,o=b();return M(o.imageDragStart(i))})("dndEnd",function(){D(r);let i=b();return M(i.imageDragEnd())}),d(1,"span",14),g(2),v(3,"translate"),p(),d(4,"div",15),x(5,nMe,3,0,"div",16),d(6,"div",17),O(7,"img",18),p(),x(8,rMe,5,3,"div",19),p()()}if(n&2){let r=t.$implicit,e=t.index,i=b();Y("image-dragging",i.dragIndex===e),m("dndDraggable",r)("dndDisableIf",i.disabled),l(2),fa("",C(3,9,"image-input.images")," [",e,"]"),l(3),m("ngIf",!i.disabled),l(2),m("src",r,yo),l(),m("ngIf",!i.disabled)}}function aMe(n,t){n&1&&(d(0,"div",24),g(1),v(2,"translate"),p()),n&2&&(l(),z(C(2,1,"image-input.no-images")))}function sMe(n,t){if(n&1&&(d(0,"div",25)(1,"div",26)(2,"mat-icon"),g(3,"cloud_upload"),p(),d(4,"span",27),g(5,"image-input.drop-images-or"),p(),d(6,"button",28)(7,"label",29),g(8),v(9,"translate"),p()(),O(10,"input",30),p()()),n&2){let r=b
218(),e=me(3);l(7),te("for",r.inputId),l(),z(C(9,5,"file-input.browse-files")),l(2),te("id",r.inputId),m("flow",e.flowJs)("flowAttributes",hn(7,eMe))}}function lMe(n,t){if(n&1&&(d(0,"div",31),v(1,"fileSize"),g(2,"dashboard.maximum-upload-file-size"),p()),n&2){let r=b();m("translateParams",Xe(3,tMe,C(1,1,r.maxSizeByte)))}}var ZD=(()=>{let t=class t extends sn{get required(){return this.requiredValue}set required(e){let i=mt(e);this.requiredValue!==i&&(this.requiredValue=i)}constructor(e,i,o,a,s,c,u){super(e),this.store=e,this.utils=i,this.sanitizer=o,this.dialog=a,this.translate=s,this.fileSize=c,this.cd=u,this.inputId=this.utils.guid(),this.propagateChange=null,this.viewInited=!1}ngAfterViewInit(){this.autoUploadSubscription=this.flow.events$.subscribe(e=>{if(e.type==="filesAdded"){let i=[];e.event[0].forEach(o=>{i.push(this.readImageUrl(o))}),i.length&&Promise.all(i).then(o=>{o=o.filter(a=>a.imageUrl!=null||a.safeImageUrl!=null),this.imageUrls=this.imageUrls.concat(o.map(a=>a.imageUrl)),this.safeImageUrls=this.safeImageUrls.concat(o.map(a=>a.safeImageUrl)),this.updateModel()})}}),this.disabled?this.flowDrop.disable():this.flowDrop.enable(),this.viewInited=!0}readImageUrl(e){return new Promise(i=>{this.maxSizeByte&&this.maxSizeByte<e.size&&i({imageUrl:null,safeImageUrl:null});let o=new FileReader;o.onload=()=>{let a=null,s=null;typeof o.result=="string"&&o.result.startsWith("data:image/")&&(a=o.result,a&&a.length>0&&(s=this.sanitizer.bypassSecurityTrustUrl(a))),i({imageUrl:a,safeImageUrl:s})},o.onerror=()=>{i({imageUrl:null,safeImageUrl:null})},o.readAsDataURL(e.file)})}ngOnDestroy(){this.autoUploadSubscription.unsubscribe()}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.viewInited&&(this.disabled?this.flowDrop.disable():this.flowDrop.enable())}writeValue(e){this.imageUrls=e||[],this.safeImageUrls=this.imageUrls.map(i=>this.sanitizer.bypassSecurityTrustUrl(i))}updateModel(){this.cd.markForCheck(),this.propagateChange(this.imageUrls)}clearImage(e){this.imageUrls.splice(e,1),this.safeImageUrls.splice(e,1),this.updateModel()}imageDragStart(e){setTimeout(()=>{this.dragIndex=e,this.cd.markForCheck()})}imageDragEnd(){this.dragIndex=-1,this.cd.markForCheck()}imageDrop(e){let i=e.index;Bi(i)&&(i=this.safeImageUrls.length),Gh(this.imageUrls,this.dragIndex,i),Gh(this.safeImageUrls,this.dragIndex,i),this.dragIndex=-1,this.updateModel()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vn),h(js),h(Sa),h(Ge),h(ka),h(Me))},t.\u0275cmp=L({type:t,selectors:[["tb-multiple-image-input"]],viewQuery:function(i,o){if(i&1&&(ae(KDe,7),ae(XDe,7)),i&2){let a;Q(a=K())&&(o.flow=a.first),Q(a=K())&&(o.flowDrop=a.first)}},inputs:{label:"label",maxSizeByte:"maxSizeByte",required:"required",disabled:"disabled",inputId:"inputId"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),Ce],decls:12,vars:12,consts:[["flow","flow"],["flowDrop","flowDrop"],[1,"tb-container"],["class","tb-title",3,"class",4,"ngIf"],[3,"flowConfig"],["flowDrop","",1,"tb-image-select-container",3,"flow"],["dndDropzone","","dndEffectAllowed","move",1,"images-container","flex","flex-row","gap-2",3,"dndDrop","dndHorizontal","dndDisableIf"],["dndPlaceholderRef","",1,"image-card","image-dnd-placeholder"],["dndEffectAllowed","move","class","image-card flex flex-col",3,"dndDraggable","dndDisableIf","image-dragging","dndStart","dndEnd",4,"ngFor","ngForOf"],["class","no-images-prompt",4,"ngIf"],["class","drop-area tb-flow-drop",4,"ngIf"],["class","tb-hint","translate","",3,"translateParams",4,"ngIf"],[1,"tb-title"],["dndEffectAllowed","move",1,"image-card","flex","flex-col",3,"dndStart","dndEnd","dndDraggable","dndDisableIf"],[1,"image-title"],[1,"image-content-container","flex","flex-row"],["dndHandle","","class","tb-image-action-container tb-drag-handle",4,"ngIf"],[1,"tb-image-preview-container"],[1,"tb-image-preview",3,"src"],["class","tb-image-action-container",4,"ngIf"],["dndHandle","",1,"tb-image-action-container","tb-drag-handle"],["color","primary"],[1,"tb-image-action-container"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",3,"click","matTooltip"],[1,"n
218o-images-prompt"],[1,"drop-area","tb-flow-drop"],[1,"upload-label"],["translate",""],["type","button","mat-button","","color","primary",1,"browse-file"],[3,"for"],["flowButton","","type","file",1,"file-input",3,"flow","flowAttributes","id"],["translate","",1,"tb-hint",3,"translateParams"]],template:function(i,o){if(i&1){let a=B();d(0,"div",2),x(1,iMe,2,6,"label",3),pt(2,4,0),d(4,"div",5,1)(6,"div",6),T("dndDrop",function(c){return D(a),M(o.imageDrop(c))}),O(7,"div",7),x(8,oMe,9,11,"div",8)(9,aMe,3,3,"div",9),p(),x(10,sMe,11,8,"div",10),p(),ct(),x(11,lMe,3,5,"div",11),p()}if(i&2){let a=me(3);l(),m("ngIf",o.label),l(),m("flowConfig",hn(11,ZDe)),l(2),m("flow",a.flowJs),l(2),Y("no-images",!o.safeImageUrls.length),m("dndHorizontal",!0)("dndDisableIf",o.disabled),l(2),m("ngForOf",o.safeImageUrls),l(),m("ngIf",!o.safeImageUrls.length),l(),m("ngIf",!o.disabled),l(),m("ngIf",o.maxSizeByte&&!o.disabled)}},dependencies:[Ke,ce,jt,yt,Pe,Se,zt,Nh,ly,cy,E0,Nu,Vu,Lu,be,ka],styles:['@charset "UTF-8";.image-card[_ngcontent-%COMP%]{margin-bottom:8px}.image-card.image-dnd-placeholder[_ngcontent-%COMP%]{height:82px;width:146px;border:2px dashed rgba(0,0,0,.2);background:#0000001a;border-radius:4px}.image-card.image-dragging[_ngcontent-%COMP%]{display:none!important}.image-title[_ngcontent-%COMP%]{font-size:11px;font-weight:400;line-height:14px;color:#0009;padding-bottom:4px}.image-content-container[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.2);border-radius:4px;height:64px}.tb-image-preview[_ngcontent-%COMP%]{width:auto;max-width:62px;height:auto;max-height:62px}.tb-image-preview-container[_ngcontent-%COMP%]{position:relative;width:64px;height:64px;margin-top:-1px;margin-bottom:-1px;border:1px solid rgba(0,0,0,.54)}.tb-image-preview-container[_ngcontent-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tb-image-action-container[_ngcontent-%COMP%]{position:relative;height:62px;display:flex;align-items:center;justify-content:center;min-width:40px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:block;padding-bottom:8px}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]{position:relative;width:100%}[_nghost-%COMP%]   .images-container[_ngcontent-%COMP%]{padding:12px 12px 4px;background:#00000008;border-radius:4px;flex-wrap:wrap;margin-bottom:8px}[_nghost-%COMP%]   .images-container.no-images[_ngcontent-%COMP%]{height:106px;padding-bottom:12px;align-items:center;justify-content:center}[_nghost-%COMP%]   .no-images-prompt[_ngcontent-%COMP%]{font-size:18px;color:#0000008a}[_nghost-%COMP%]   .file-input[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]{position:relative;height:120px;overflow:hidden;border:2px dashed rgba(0,0,0,.2);border-radius:4px;box-sizing:border-box}[_nghost-%COMP%]   .tb-flow-drop.float-left[_ngcontent-%COMP%]{float:left}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]{width:100%;height:100%;padding:0 16px;display:flex;flex-direction:row;justify-content:center;align-items:center;font-size:16px;color:#0000008a;text-align:center}[_nghost-%COMP%]   .tb-flow-drop[_ngcontent-%COMP%]   .upload-label[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:17px}[_nghost-%COMP%]   .tb-hint[_ngcontent-%COMP%]{margin-top:8px}[_nghost-%COMP%]     button.browse-file{padding:0;font-size:16px}[_nghost-%COMP%]     button.browse-file label{display:block;cursor:pointer;padding:0 16px}']});let n=t;return n})();y();y();y();var eY=[G.ASSET,G.DEVICE,G.ENTITY_VIEW,G.DASHBOARD,G.CUSTOMER,G.USER,G.DEVICE_PROFILE,G.ASSET_PROFILE,G.RULE_CHAIN,G.WIDGET_TYPE,G.WIDGETS_BUNDLE,G.CONVERTER,G.INTEGRATION,G.REPORT_TEMPLATE,G.ROLE,G.TB_RESOURCE,G.OTA_PACKAGE,G.NOTIFICATION_TEMPLATE,G.NOTIFICATION_TARGET,G.NOTIFICATION_RULE,G.SCHEDULER_EVENT,G.AI_MODEL],JD=new Set([G.NOTIFICATION_TEMPLATE,G.NOTIFICATION_TARGET,G.NOTIFICATION_RULE,G.REPORT_TEMPLATE,G.TB_RESOURCE,G.OTA_PACKAGE,G.SCHEDULER_EVENT,G.AI_MODEL]),dMe=function(n){return n.SINGLE_ENTITY="SINGLE_ENTITY",n.COMPLEX="COMPLEX",n}(dMe||{}),xx=function(n){return n.MERGE="MERGE",n.OVERWRITE="OVERWRITE",n}(xx||{}),OJt=new Map([[xx.MERGE,"version-control.sync-strategy-merge"],[xx.OVERWRITE,"version-control.sync-strategy-overwrite"]]
218),PJt=new Map([[xx.MERGE,"version-control.sync-strategy-merge-hint"],[xx.OVERWRITE,"version-control.sync-strategy-overwrite-hint"]]);function RJt(){let n={};for(let t of eY)n[t]={syncStrategy:null,saveAttributes:!JD.has(t),saveRelations:!JD.has(t),saveCalculatedFields:iY.has(t),saveCredentials:!0,savePermissions:!0,saveGroupEntities:!0,allEntities:!0,entityIds:[]};return n}var pMe=function(n){return n.SINGLE_ENTITY="SINGLE_ENTITY",n.ENTITY_TYPE="ENTITY_TYPE",n}(pMe||{});function FJt(){let n={};for(let t of eY)n[t]={loadAttributes:!JD.has(t),loadRelations:!JD.has(t),loadCredentials:!0,loadCalculatedFields:iY.has(t),loadPermissions:!0,loadGroupEntities:!0,autoGenerateIntegrationKey:!1,removeOtherEntities:!1,findExistingEntityByName:!0};return n}var Vp=function(n){return n.DEVICE_CREDENTIALS_CONFLICT="DEVICE_CREDENTIALS_CONFLICT",n.MISSING_REFERENCED_ENTITY="MISSING_REFERENCED_ENTITY",n.INTEGRATION_ROUTING_KEY_CONFLICT="INTEGRATION_ROUTING_KEY_CONFLICT",n.RUNTIME="RUNTIME",n}(Vp||{}),tY=new Map([[Vp.DEVICE_CREDENTIALS_CONFLICT,"version-control.device-credentials-conflict"],[Vp.MISSING_REFERENCED_ENTITY,"version-control.missing-referenced-entity"],[Vp.INTEGRATION_ROUTING_KEY_CONFLICT,"version-control.integration-routing-key-conflict"],[Vp.RUNTIME,"version-control.runtime-failed"]]);function NJt(n){return JSON.stringify(n,null,4)}var VJt=new Map([[G.USER,"entity-group.user-group"]]),iY=new Set([G.DEVICE,G.ASSET,G.ASSET_PROFILE,G.DEVICE_PROFILE]);y();var _y=function(n){return n.START_LOAD="[Load] Start",n.FINISH_LOAD="[Load] Finish",n}(_y||{}),k0=class{constructor(){this.type=_y.START_LOAD}},D0=class{constructor(){this.type=_y.FINISH_LOAD}};var nY=(()=>{let t=class t{constructor(e,i,o,a){this.http=e,this.translate=i,this.sanitizer=o,this.store=a,this.branchList=null,this.store.pipe(Aa(F4)).subscribe(()=>{this.branchList=null})}clearBranchList(){this.branchList=null}listBranches(){return this.branchList?Z(this.branchList):this.http.get("/api/entities/vc/branches",N({ignoreErrors:!0,ignoreLoading:!1})).pipe(vt(()=>Z([])),et(e=>{this.branchList=e}))}getEntityDataInfo(e,i,o,a){return this.http.get(`/api/entities/vc/info/${o}/${e.entityType}/${e.id}?internalEntityId=${i.id}`,N(a))}saveEntitiesVersion(e,i){return this.store.dispatch(new k0),this.http.post("/api/entities/vc/version",e,N(Lt(re({},i),{ignoreLoading:!0}))).pipe(ii(o=>ls(0,2e3).pipe(ii(()=>this.getVersionCreateRequestStatus(o,i)),o2(a=>!a.done,!0))),gu(()=>{let o=e.branch;this.branchList&&!this.branchList.find(a=>a.name===o)&&(this.branchList=null),this.store.dispatch(new D0)}))}getVersionCreateRequestStatus(e,i){return this.http.get(`/api/entities/vc/version/${e}/status`,N(Lt(re({},i),{ignoreLoading:!0})))}listEntityVersions(e,i,o,a,s){let c=encodeURIComponent(i);return this.http.get(`/api/entities/vc/version/${o.entityType}/${o.id}${e.toQuery()}&branch=${c}&internalEntityId=${a.id}`,N(s))}listEntityTypeVersions(e,i,o,a){let s=encodeURIComponent(i);return this.http.get(`/api/entities/vc/version/${o}${e.toQuery()}&branch=${s}`,N(a))}listVersions(e,i,o){let a=encodeURIComponent(i);return this.http.get(`/api/entities/vc/version${e.toQuery()}&branch=${a}`,N(o))}loadEntitiesVersion(e,i){return this.store.dispatch(new k0),this.http.post("/api/entities/vc/entity",e,N(Lt(re({},i),{ignoreLoading:!0}))).pipe(ii(o=>ls(0,2e3).pipe(ii(()=>this.getVersionLoadRequestStatus(o,i)),o2(a=>!a.done,!0))),gu(()=>{this.store.dispatch(new D0)}))}getVersionLoadRequestStatus(e,i){return this.http.get(`/api/entities/vc/entity/${e}/status`,N(Lt(re({},i),{ignoreLoading:!0})))}compareEntityDataToVersion(e,i,o){return this.http.get(`/api/entities/vc/diff/${e.entityType}/${e.id}?versionId=${i}`,N(o))}entityLoadErrorToMessage(e){let i=e.type,o=tY.get(i),a={};switch(i){case Vp.DEVICE_CREDENTIALS_CONFLICT:case Vp.INTEGRATION_ROUTING_KEY_CONFLICT:a.entityId=e.source.id;break;case Vp.MISSING_REFERENCED_ENTITY:a.sourceEntityTypeName=this.translate.instant(ta.get(e.source.entityType).type).toLowerCase(),a.sourceEntityId=e.source.id,a.targetEntityTypeName=this.translate.instant(ta.get(e.target.entityType).type).toLowerCase(),a.targetEntityId=e.target.id;break;case Vp.RUNTIME:a.message=e.message;break}return this.sanitizer.bypassSecurityTrustHtml(this.translate.instant(o,a))}};t.\u0275fac=function(i){return new(i||t)(X(Jt),X(Ge),X(js),X(ve))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var uMe=["branchAutocomplete"],rY=["branchInput"];function hMe(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",9),g(2,"close"),p()()}}function fMe(n,t){n&1&&(d(0,"mat-icon",15),g(1,"check"),p())}function gMe(n,t){n&1&&O(0,"span",16)}function bMe(n,t){n&1&&(d(0,"small",17),g(1),v(2,"translate"),p()),n&2&&(l(),z(C(2,1,"version-control.default")))}function _Me(n,t){if(n&1&&(d(0,"mat-option",10),x(1,fMe,2,0,"mat-icon",11)(2,gMe,1,0,"span",12),O(3,"span",13),v(4,"highlight"),x(5,bMe,3,3,"small",14),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("ngIf",e.selectionMode&&r.name===e.modelValue),l(),m("ngIf",e.selectionMode&&r.name!==e.modelValue),l(),m("innerHTML",ft(4,5,r.name,e.searchText),Ut),l(2),m("ngIf",r.default)}}function vMe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"version-control.branch-required")," "))}var TV=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}get disabled(){return this.disabledValue}set disabled(e){this.disabledValue=mt(e),this.disabledValue?this.branchFormGroup.disable({emitEvent:!1}):this.branchFormGroup.enable({emitEvent:!1})}constructor(e,i,o,a){this.store=e,this.entitiesVersionControlService=i,this.fb=o,this.zone=a,this.subscriptSizing="fixed",this.selectDefaultBranch=!0,this.selectionMode=!1,this.defaultBranch=null,this.searchText="",this.loading=!1,this.dirty=!1,this.clearButtonClicked=!1,this.prop
218agateChange=s=>{},this.branchFormGroup=this.fb.group({branch:[null,[]]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.filteredBranches=this.branchFormGroup.get("branch").valueChanges.pipe(et(e=>{let i;typeof e=="string"||!e?!this.selectionMode&&typeof e=="string"&&fn(e)?i={name:e,default:!1}:i=null:i=e,(!this.selectionMode||i)&&this.updateView(i)}),W(e=>e?typeof e=="string"?e:e.name:""),Wi(150),xr(),ii(e=>this.fetchBranches(e)),Si())}ngAfterViewInit(){}setDisabledState(e){this.disabled=e}isDefaultBranchSelected(){return this.defaultBranch&&this.defaultBranch.name===this.modelValue}selectDefaultBranchIfNeeded(e=!1){(this.selectDefaultBranch&&!this.modelValue||e)&&setTimeout(()=>{this.defaultBranch?(this.branchFormGroup.get("branch").patchValue(this.defaultBranch,{emitEvent:!1}),this.modelValue=this.defaultBranch?.name,this.propagateChange(this.modelValue)):(this.loading=!0,this.getBranches().subscribe(()=>{this.defaultBranch||e?(this.branchFormGroup.get("branch").patchValue(this.defaultBranch,{emitEvent:!1}),this.modelValue=this.defaultBranch?.name,this.propagateChange(this.modelValue),this.loading=!1):this.loading=!1}))})}writeValue(e){this.searchText="",this.modelValue=e,e!=null?this.branchFormGroup.get("branch").patchValue({name:e},{emitEvent:!1}):(this.branchFormGroup.get("branch").patchValue(null,{emitEvent:!1}),this.selectDefaultBranchIfNeeded()),this.dirty=!0}onFocus(){this.dirty&&(this.branchFormGroup.get("branch").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}onBlur(){this.clearButtonClicked?this.clearButtonClicked=!1:this.matAutocomplete.isOpen||this.selectAvailableValue()}onPanelClosed(){this.selectAvailableValue()}selectAvailableValue(){if(this.selectionMode){let e=this.branchFormGroup.get("branch").value;this.getBranches().pipe(W(i=>{let o=i.find(a=>a.name===e);return!o&&fn(this.modelValue)&&(o=i.find(a=>a.name===this.modelValue)),o})).subscribe(i=>{!i&&this.defaultBranch&&(i=this.defaultBranch),this.zone.run(()=>{this.branchFormGroup.get("branch").patchValue(i,{emitEvent:!0})},0)})}}updateView(e){this.modelValue!==e?.name&&(this.modelValue=e?.name,this.propagateChange(this.modelValue))}displayBranchFn(e){return e?e.name:void 0}fetchBranches(e){return this.searchText=e,this.getBranches().pipe(W(i=>{let o=i.filter(a=>e?a.name.toUpperCase().startsWith(e.toUpperCase()):!0);return!this.selectionMode&&fn(e)&&!o.find(a=>a.name===e)&&(o=[{name:e,default:!1},...o]),o}))}getBranches(){return this.entitiesVersionControlService.listBranches().pipe(et(e=>{this.defaultBranch=e.find(i=>i.default)}))}clear(){this.clearButtonClicked=!0,setTimeout(()=>{this.branchFormGroup.get("branch").patchValue(null,{emitEvent:!0}),this.branchInput.nativeElement.blur(),this.branchInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(nY),h(Wt),h(Bt))},t.\u0275cmp=L({type:t,selectors:[["tb-branch-autocomplete"]],viewQuery:function(i,o){if(i&1&&(ae(uMe,5),ae(rY,7,mi),ae(rY,7)),i&2){let a;Q(a=K())&&(o.matAutocomplete=a.first),Q(a=K())&&(o.autoCompleteTrigger=a.first),Q(a=K())&&(o.branchInput=a.first)}},inputs:{subscriptSizing:"subscriptSizing",required:"required",disabled:"disabled",selectDefaultBranch:"selectDefaultBranch",selectionMode:"selectionMode",emptyPlaceholder:"emptyPlaceholder"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}])],decls:14,vars:17,consts:[["branchInput","","branchMatInput","matInput"],["branchAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup","floatLabel","subscriptSizing"],["matInput","","type","text","formControlName","branch",3,"keydown.enter","focusin","blur","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"closed","displayWith"],["class","branch-option",3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[1,"branch-option",3,"value"],["class","tb-mat-18",4,"ngIf"],["class","check-placeholder",4,"ngIf"],[3,"innerHTML"],["class","default-branch",4,"ngIf"],[1,"tb-mat-18"],[1,"check-placeholder"],[1,"default-branch"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"input",3,0),v(7,"translate"),T("keydown.enter",function(){return D(a),me(5).blur(),M(o.autoCompleteTrigger.closePanel())})("focusin",function(){return D(a),M(o.onFocus())})("blur",function(){return D(a),M(o.onBlur())}),p(),x(8,hMe,3,0,"button",4),d(9,"mat-autocomplete",5,1),T("closed",function(){D(a);
218let c=me(6);return M(c.focused?!1:o.onPanelClosed())}),x(11,_Me,6,8,"mat-option",6),v(12,"async"),p(),x(13,vMe,3,3,"mat-error",7),p()}if(i&2){let a=me(10);te("subscriptSizing",o.subscriptSizing),m("formGroup",o.branchFormGroup)("floatLabel",o.selectionMode||o.emptyPlaceholder?"always":"auto"),l(2),z(C(3,11,"version-control.branch")),l(2),te("placeholder",o.emptyPlaceholder||C(7,13,o.loading?"common.loading":"version-control.select-branch")),m("required",o.required)("matAutocomplete",a),l(4),m("ngIf",o.branchFormGroup.get("branch").value&&!o.disabled),l(),m("displayWith",o.displayBranchFn),l(2),m("ngForOf",C(12,15,o.filteredBranches)),l(2),m("ngIf",o.branchFormGroup.get("branch").hasError("required"))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],styles:[`@charset "UTF-8";.mat-mdc-option.branch-option .mat-icon,.mat-mdc-option.branch-option .check-placeholder{margin-right:8px}.mat-mdc-option.branch-option .check-placeholder{width:18px;display:inline-block}.mat-mdc-option.branch-option .mdc-list-item__primary-text{width:100%}.mat-mdc-option.branch-option .mdc-list-item__primary-text .default-branch{float:right}
219`],encapsulation:2});let n=t;return n})();y();var EV=(()=>{let t=class t{set chartData(e){this.chartDataValue=e,this.updatedChartData()}get chartData(){return this.chartDataValue}constructor(e){this.elementRef=e,this.viewInit=!1,this.libraryLoad=!1,this.scheduleUpdateLine=!1,import("./chunk-563BTNB4.js").then(()=>{this.libraryLoad=!0,this.viewInit&&this.scheduleUpdateLine&&this.updatedChartData()})}ngAfterViewInit(){this.viewInit=!0,this.libraryLoad&&this.scheduleUpdateLine&&this.updatedChartData()}updatedChartData(){this.viewInit&&this.libraryLoad?$(this.elementRef.nativeElement).sparkline(this.chartData,this.chartProperty):this.scheduleUpdateLine=!0}};t.\u0275fac=function(i){return new(i||t)(h(ge))},t.\u0275cmp=L({type:t,selectors:[["tb-spark-line"]],inputs:{chartData:"chartData",chartProperty:"chartProperty"},decls:0,vars:0,template:function(i,o){},encapsulation:2});let n=t;return n})();y();var oY=(()=>{let t=class t extends CE{parse(e){if(typeof e=="number")return new Date(e);let i=e,o=Intl.DateTimeFormat(this.locale).formatToParts();if(o[0].type.toLowerCase()==="day"){let a=o[1].value;i=i.replace(new RegExp(`(\\d+[${a}])(\\d+[${a}])`),"$2$1")}return i?new Date(Date.parse(i)):null}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();y();var aY=(()=>{let t=class t{constructor(e){this.translate=e,this.changes=new Te,this.firstPageLabel=this.translate.instant("paginator.first-page-label"),this.itemsPerPageLabel=this.translate.instant("paginator.items-per-page"),this.lastPageLabel=this.translate.instant("paginator.last-page-label"),this.nextPageLabel=this.translate.instant("paginator.next-page-label"),this.previousPageLabel=this.translate.instant("paginator.previous-page-label"),this.separator=this.translate.instant("paginator.items-per-page-separator")}getRangeLabel(e,i,o){let a=e*i+1,s=i*(e+1);return`${a} \u2013 ${s>o?o:s}  ${this.separator} ${o}`}};t.\u0275fac=function(i){return new(i||t)(X(Ge))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();var yMe={};Ae(yMe,{TbScriptLangComponent:()=>eM});y();var eM=(()=>{let t=class t extends sn{constructor(e,i,o){super(e),this.store=e,this.fb=i,this.destroyRef=o,this.scriptLanguage=Ea,this.propagateChange=null,this.scriptLangFormGroup=this.fb.group({scriptLang:[null]})}ngOnInit(){this.scriptLangFormGroup.get("scriptLang").valueChanges.pipe(yi(this.destroyRef)).subscribe(e=>{this.updateView(e)})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.disabled?this.scriptLangFormGroup.disable({emitEvent:!1}):this.scriptLangFormGroup.enable({emitEvent:!1})}writeValue(e){this.scriptLangFormGroup.get("scriptLang").patchValue(e,{emitEvent:!1})}updateView(e){this.propagateChange(e)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-script-lang"]],inputs:{disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),Ce],decls:8,vars:9,consts:[[1,"flex","flex-row","items-stretch","justify-center",3,"formGroup"],["formControlName","scriptLang","aria-label","Script language",1,"tb-script-lang-toggle-group"],[1,"flex-1",3,"value"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"mat-button-toggle-group",1)(2,"mat-button-toggle",2),g(3),v(4,"translate"),p(),d(5,"mat-button-toggle",2),g(6),v(7,"translate"),p()()()),i&2&&(m("formGroup",o.scriptLangFormGroup),l(2),te("value",o.scriptLanguage.TBEL),l(),z(C(4,5,"rulenode.script-lang-tbel")),l(2),te("value",o.scriptLanguage.JS),l(),j(" ",C(7,7,"rulenode.script-lang-java-script")," "))},dependencies:[hc,Kc,xe,We,$e,Qe,be],styles:[`@charset "UTF-8";.mat-button-toggle-group.tb-script-lang-toggle-group{width:320px}.mat-button-toggle-group.tb-script-lang-toggle-group.mat-button-toggle-group-appearance-standard{border:none;border-radius:18px}.mat-button-toggle-group.tb-script-lang-toggle-group.mat-button-toggle-group-appearance-standard .mat-button-toggle+.mat-button-toggle{border-left:none}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle{--mat-standard-button-toggle-disabled-selected-state-background-color: rgba(0, 0, 0, .06);background:#0000000f;height:36px;align-items:center;display:flex}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle .mat-button-toggle-ripple{inset:2px;border-radius:16px}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-button{color:#959595}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-focus-overlay{border-radius:16px;margin:2px}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-checked .mat-button-toggle-button{background-color:var(--tb-primary-500);color:#fff;border-radius:16px;margin-left:2px;margin-right:2px}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:32px;font-size:16px;font-weight:500}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-appearance-standard .mat-button-toggle-label-content .mat-pseudo-checkbox{display:none}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-checked.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.01}.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-appearance-standard.mat-button-toggle-disabled:hover .mat-button-toggle-focus-overlay{opacity:0}
219.mat-button-toggle-group.tb-script-lang-toggle-group .mat-button-toggle-disabled{opacity:.6}
220`],encapsulation:2});let n=t;return n})();var kMe={};Ae(kMe,{NotificationComponent:()=>M0});y();y();var tM=function(n){return n.STARTED="STARTED",n.UPDATED="UPDATED",n.STOPPED="STOPPED",n}(tM||{}),Vei=new Map([[tM.STARTED,"event.started"],[tM.UPDATED,"event.updated"],[tM.STOPPED,"event.stopped"]]),Sx=function(n){return n.CREATED="CREATED",n.SEVERITY_CHANGED="SEVERITY_CHANGED",n.ACKNOWLEDGED="ACKNOWLEDGED",n.CLEARED="CLEARED",n}(Sx||{}),Lei=new Map([[Sx.CREATED,"notification.notify-alarm-action.created"],[Sx.SEVERITY_CHANGED,"notification.notify-alarm-action.severity-changed"],[Sx.ACKNOWLEDGED,"notification.notify-alarm-action.acknowledged"],[Sx.CLEARED,"notification.notify-alarm-action.cleared"]]),IV=function(n){return n.ASSIGNED="ASSIGNED",n.UNASSIGNED="UNASSIGNED",n}(IV||{}),Bei=new Map([[IV.ASSIGNED,"notification.notify-alarm-action.assigned"],[IV.UNASSIGNED,"notification.notify-alarm-action.unassigned"]]),kV=function(n){return n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n}(kV||{}),jei=new Map([[kV.ACTIVE,"notification.active"],[kV.INACTIVE,"notification.inactive"]]),iM=function(n){return n.PLATFORM_USERS="PLATFORM_USERS",n.SLACK="SLACK",n.MICROSOFT_TEAMS="MICROSOFT_TEAMS",n}(iM||{}),Gei=new Map([[iM.PLATFORM_USERS,"notification.platform-users"],[iM.SLACK,"notification.delivery-method.slack"],[iM.MICROSOFT_TEAMS,"notification.delivery-method.microsoft-teams"]]),DV=function(n){return n.SENT="SENT",n.READ="READ",n}(DV||{}),Uo=function(n){return n.WEB="WEB",n.MOBILE_APP="MOBILE_APP",n.SMS="SMS",n.EMAIL="EMAIL",n.SLACK="SLACK",n.MICROSOFT_TEAMS="MICROSOFT_TEAMS",n}(Uo||{}),vy=new Map([[Uo.WEB,{name:"notification.delivery-method.web",icon:"mdi:bell-badge"}],[Uo.SMS,{name:"notification.delivery-method.sms",icon:"mdi:message-processing"}],[Uo.EMAIL,{name:"notification.delivery-method.email",icon:"mdi:email"}],[Uo.SLACK,{name:"notification.delivery-method.slack",icon:"mdi:slack"}],[Uo.MOBILE_APP,{name:"notification.delivery-method.mobile-app",icon:"mdi:cellphone-text"}],[Uo.MICROSOFT_TEAMS,{name:"notification.delivery-method.microsoft-teams",icon:"mdi:microsoft-teams"}]]),nM=function(n){return n.PROCESSING="PROCESSING",n.SCHEDULED="SCHEDULED",n.SENT="SENT",n}(nM||{}),zei=new Map([[nM.PROCESSING,"notification.request-status.processing"],[nM.SCHEDULED,"notification.request-status.scheduled"],[nM.SENT,"notification.request-status.sent"]]),rM=function(n){return n.PUBLIC_CHANNEL="PUBLIC_CHANNEL",n.PRIVATE_CHANNEL="PRIVATE_CHANNEL",n.DIRECT="DIRECT",n}(rM||{}),$ei=new Map([[rM.DIRECT,"notification.slack-chanel-types.direct"],[rM.PUBLIC_CHANNEL,"notification.slack-chanel-types.public-channel"],[rM.PRIVATE_CHANNEL,"notification.slack-chanel-types.private-channel"]]),Ad=function(n){return n.ALL_USERS="ALL_USERS",n.TENANT_ADMINISTRATORS="TENANT_ADMINISTRATORS",n.USER_LIST="USER_LIST",n.USER_GROUP_LIST="USER_GROUP_LIST",n.CUSTOMER_USERS="CUSTOMER_USERS",n.USER_ROLE="USER_ROLE",n.ORIGINATOR_ENTITY_OWNER_USERS="ORIGINATOR_ENTITY_OWNER_USERS",n.AFFECTED_USER="AFFECTED_USER",n.SYSTEM_ADMINISTRATORS="SYSTEM_ADMINISTRATORS",n.AFFECTED_TENANT_ADMINISTRATORS="AFFECTED_TENANT_ADMINISTRATORS",n}(Ad||{}),Uei=new Map([[Ad.ALL_USERS,{name:"notification.recipient-type.all-users"}],[Ad.TENANT_ADMINISTRATORS,{name:"notification.recipient-type.tenant-administrators"}],[Ad.CUSTOMER_USERS,{name:"notification.recipient-type.customer-users"}],[Ad.USER_LIST,{name:"notification.recipient-type.user-list"}],[Ad.ORIGINATOR_ENTITY_OWNER_USERS,{name:"notification.recipient-type.users-entity-owner"}],[Ad.AFFECTED_USER,{name:"notification.recipient-type.affected-user"}],[Ad.SYSTEM_ADMINISTRATORS,{name:"notification.recipient-type.system-administrators"}],[Ad.AFFECTED_TENANT_ADMINISTRATORS,{name:"notification.recipient-type.affected-tenant-administrators"}],[Ad.USER_ROLE,{name:"notification.recipient-type.user-role"}],[Ad.USER_GROUP_LIST,{name:"notification.recipient-type.user-group-list"}]]),Xi=function(n){return n.GENERAL="GENERAL",n.ALARM="ALARM",n.DEVICE_ACTIVITY="DEVICE_ACTIVITY",n.ENTITY_ACTION="ENTITY_ACTION",n.ALARM_COMMENT="ALARM_COMMENT",n.ALARM_ASSIGNMENT="ALARM_ASSIGNMENT",n.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT="RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT",n.ENTITIES_LIMIT="ENTITIES_LIMIT",n.API_USAGE_LIMIT="API_USAGE_LIMIT",n.NEW_PLATFORM_VERSION="NEW_PLATFORM_VERSION",n.RULE_NODE="RULE_NODE",n.INTEGRATION_LIFECYCLE_EVENT="INTEGRATION_LIFECYCLE_EVENT",n.RATE_LIMITS="RATE_LIMITS",n.EDGE_CONNECTION="EDGE_CONNECTION",n.EDGE_COMMUNICATION_FAILURE="EDGE_COMMUNICATION_FAILURE",n.TASK_PROCESSING_FAILURE="TASK_PROCESSING_FAILURE",n.RESOURCES_SHORTAGE="RESOURCES_SHORTAGE",n.USER_ACTIVATED="USER_ACTIVATED",n.USER_REGISTERED="USER_REGISTERED",n.REPORT_GENERATED="REPORT_GENERATED",n}(Xi||{}),sY=new Map([[Xi.ALARM,"warning"],[Xi.DEVICE_ACTIVITY,"phonelink_off"],[Xi.ENTITY_ACTION,"devices"],[Xi.ALARM_COMMENT,"comment"],[Xi.ALARM_ASSIGNMENT,"assignment_turned_in"],[Xi.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT,"settings_ethernet"],[Xi.ENTITIES_LIMIT,"data_thresholding"],[Xi.API_USAGE_LIMIT,"insert_chart"],[Xi.INTEGRATION_LIFECYCLE_EVENT,"integration_instructions"],[Xi.TASK_PROCESSING_FAILURE,"warning"],[Xi.RESOURCES_SHORTAGE,"warning"],[Xi.REPORT_GENERATED,"description"]]),oM=new Map([[gb.CRITICAL,"#D12730"],[gb.MAJOR,"#FEAC0C"],[gb.MINOR,"#F2DA05"],[gb.WARNING,"#F66716"],[gb.INDETERMINATE,"#00000061"]]),Lp=function(n){return n.LINK="LINK",n.DASHBOARD="DASHBOARD",n}(Lp||{}
220),lY=new Map([[Lp.LINK,"notification.link-type.link"],[Lp.DASHBOARD,"notification.link-type.dashboard"]]),aM=new Map([[Xi.GENERAL,{name:"notification.template-type.general",helpId:"notification/general"}],[Xi.ALARM,{name:"notification.template-type.alarm",helpId:"notification/alarm"}],[Xi.DEVICE_ACTIVITY,{name:"notification.template-type.device-activity",helpId:"notification/device_activity"}],[Xi.ENTITY_ACTION,{name:"notification.template-type.entity-action",helpId:"notification/entity_action"}],[Xi.ALARM_COMMENT,{name:"notification.template-type.alarm-comment",helpId:"notification/alarm_comment"}],[Xi.ALARM_ASSIGNMENT,{name:"notification.template-type.alarm-assignment",helpId:"notification/alarm_assignment"}],[Xi.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT,{name:"notification.template-type.rule-engine-lifecycle-event",helpId:"notification/rule_engine_lifecycle_event"}],[Xi.ENTITIES_LIMIT,{name:"notification.template-type.entities-limit",helpId:"notification/entities_limit"}],[Xi.API_USAGE_LIMIT,{name:"notification.template-type.api-usage-limit",helpId:"notification/api_usage_limit"}],[Xi.NEW_PLATFORM_VERSION,{name:"notification.template-type.new-platform-version",helpId:"notification/new_platform_version"}],[Xi.RULE_NODE,{name:"notification.template-type.rule-node",helpId:"notification/rule_node"}],[Xi.INTEGRATION_LIFECYCLE_EVENT,{name:"notification.template-type.integration-lifecycle-event",helpId:"notification/integration_lifecycle_event"}],[Xi.RATE_LIMITS,{name:"notification.template-type.rate-limits",helpId:"notification/rate_limits"}],[Xi.EDGE_CONNECTION,{name:"notification.template-type.edge-connection",helpId:"notification/edge_connection"}],[Xi.EDGE_COMMUNICATION_FAILURE,{name:"notification.template-type.edge-communication-failure",helpId:"notification/edge_communication_failure"}],[Xi.TASK_PROCESSING_FAILURE,{name:"notification.template-type.task-processing-failure",helpId:"notification/task_processing_failure"}],[Xi.USER_ACTIVATED,{name:"notification.template-type.user-activated",helpId:"notification/user_activated"}],[Xi.USER_REGISTERED,{name:"notification.template-type.user-registered",helpId:"notification/user_registered"}],[Xi.RESOURCES_SHORTAGE,{name:"notification.template-type.resources-shortage",helpId:"notification/resources_shortage"}],[Xi.REPORT_GENERATED,{name:"notification.template-type.report-generated",helpId:"notification/report_generated"}]]),Fs=function(n){return n.ALARM="ALARM",n.DEVICE_ACTIVITY="DEVICE_ACTIVITY",n.ENTITY_ACTION="ENTITY_ACTION",n.ALARM_COMMENT="ALARM_COMMENT",n.ALARM_ASSIGNMENT="ALARM_ASSIGNMENT",n.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT="RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT",n.ENTITIES_LIMIT="ENTITIES_LIMIT",n.API_USAGE_LIMIT="API_USAGE_LIMIT",n.INTEGRATION_LIFECYCLE_EVENT="INTEGRATION_LIFECYCLE_EVENT",n.NEW_PLATFORM_VERSION="NEW_PLATFORM_VERSION",n.RATE_LIMITS="RATE_LIMITS",n.EDGE_CONNECTION="EDGE_CONNECTION",n.EDGE_COMMUNICATION_FAILURE="EDGE_COMMUNICATION_FAILURE",n.TASK_PROCESSING_FAILURE="TASK_PROCESSING_FAILURE",n.RESOURCES_SHORTAGE="RESOURCES_SHORTAGE",n}(Fs||{}),Hei=new Map([[Fs.ALARM,"notification.trigger.alarm"],[Fs.DEVICE_ACTIVITY,"notification.trigger.device-activity"],[Fs.ENTITY_ACTION,"notification.trigger.entity-action"],[Fs.ALARM_COMMENT,"notification.trigger.alarm-comment"],[Fs.ALARM_ASSIGNMENT,"notification.trigger.alarm-assignment"],[Fs.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT,"notification.trigger.rule-engine-lifecycle-event"],[Fs.ENTITIES_LIMIT,"notification.trigger.entities-limit"],[Fs.API_USAGE_LIMIT,"notification.trigger.api-usage-limit"],[Fs.INTEGRATION_LIFECYCLE_EVENT,"notification.trigger.integration-lifecycle-event"],[Fs.NEW_PLATFORM_VERSION,"notification.trigger.new-platform-version"],[Fs.RATE_LIMITS,"notification.trigger.rate-limits"],[Fs.EDGE_CONNECTION,"notification.trigger.edge-connection"],[Fs.EDGE_COMMUNICATION_FAILURE,"notification.trigger.edge-communication-failure"],[Fs.TASK_PROCESSING_FAILURE,"notification.trigger.task-processing-failure"],[Fs.RESOURCES_SHORTAGE,"notification.trigger.resources-shortage"]]),qei=n=>n===Xi.USER_ACTIVATED||n===Xi.USER_REGISTERED;
220var CMe=(n,t)=>({borderColor:n,backgroundColor:t});function wMe(n,t){if(n&1&&(d(0,"div")(1,"tb-icon",11),g(2),p()()),n&2){let r=b();l(),hi("color",r.notification.additionalConfig.icon.color),l(),j(" ",r.notification.additionalConfig.icon.icon," ")}}function xMe(n,t){if(n&1&&(d(0,"tb-icon",11),g(1),p()),n&2){let r=b(2);_n(r.notificationIconColor()),l(),j(" ",r.notificationTypeIcons.get(r.notification.type)," ")}}function SMe(n,t){if(n&1&&x(0,xMe,2,3,"tb-icon",12),n&2){let r=b();m("ngIf",r.notificationTypeIcons.get(r.notification.type))}}function TMe(n,t){if(n&1){let r=B();d(0,"button",13),T("click",function(i){D(r);let o=b();return M(o.navigate(i))}),g(1),p()}if(n&2){let r=b();l(),j(" ",r.buttonLabel," ")}}function EMe(n,t){if(n&1){let r=B();d(0,"button",14),v(1,"translate"),T("click",function(i){D(r);let o=b();return M(o.markRead(i))}),d(2,"mat-icon"),g(3,"check_circle_outline"),p()()}n&2&&te("matTooltip",C(1,1,"notification.mark-as-read"))}function IMe(n,t){if(n&1&&(d(0,"div",15)(1,"span",16),g(2),v(3,"translate"),p()()),n&2){let r=b
220();hi("background-color",r.alarmColorSeverity(.06)),l(),_n(r.notificationIconColor()),l(),j(" ",C(3,5,r.alarmSeverityTranslations.get(r.notification.info.alarmSeverity))," ")}}var yy=class yy{constructor(t,r){this.utils=t,this.router=r,this.markAsRead=new J,this.preview=!1,this.showIcon=!1,this.showButton=!1,this.buttonLabel="",this.hideMarkAsReadButton=!1,this.notificationType=Xi,this.notificationTypeIcons=sY,this.alarmSeverityTranslations=U4,this.currentDate=Date.now(),this.title="",this.message=""}ngOnInit(){this.showIcon=this.notification.additionalConfig?.icon?.enabled,this.showButton=this.notification.additionalConfig?.actionButtonConfig?.enabled,this.hideMarkAsReadButton=this.notification.status===DV.READ,this.title=this.utils.customTranslation(this.notification.subject,this.notification.subject),this.message=this.utils.customTranslation(this.notification.text,this.notification.text),this.showButton&&(this.buttonLabel=this.utils.customTranslation(this.notification.additionalConfig.actionButtonConfig.text,this.notification.additionalConfig.actionButtonConfig.text))}markRead(t){t&&t.stopPropagation(),this.preview||this.markAsRead.next(this.notification.id.id)}navigate(t){if(t&&t.stopPropagation(),!this.preview){let r;if(this.notification.additionalConfig.actionButtonConfig.linkType===Lp.DASHBOARD){let e=null;if(this.notification.additionalConfig.actionButtonConfig.dashboardState||this.notification.additionalConfig.actionButtonConfig.setEntityIdInState){let i={};this.notification.additionalConfig.actionButtonConfig.setEntityIdInState?i.params={entityId:this.notification.info?.stateEntityId??null}:i.params={},this.notification.additionalConfig.actionButtonConfig.dashboardState&&(i.id=this.notification.additionalConfig.actionButtonConfig.dashboardState),e=g4([i])}r=`/dashboards/${this.notification.additionalConfig.actionButtonConfig.dashboardId}`,e&&(r+=`?state=${e}`)}else r=this.notification.additionalConfig.actionButtonConfig.link;r.startsWith("/")?this.router.navigateByUrl(this.router.parseUrl(r)).then(()=>{}):window.open(r,"_blank"),this.onClose&&this.onClose()}}alarmColorSeverity(t){return Hd(oM.get(this.notification.info.alarmSeverity)).setAlpha(t).toRgbString()}notificationColor(){return this.notification.type===Xi.ALARM&&!this.notification.info.cleared?oM.get(this.notification.info.alarmSeverity):"transparent"}notificationBackgroundColor(){return this.notification.type===Xi.ALARM&&!this.notification.info.cleared?"#fff":"transparent"}notificationIconColor(){return this.notification.type===Xi.ALARM?{color:oM.get(this.notification.info.alarmSeverity)}:this.notification.type===Xi.RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT?{color:"#D12730"}:null}};yy.\u0275fac=function(r){return new(r||yy)(h(vn),h(vi))},yy.\u0275cmp=L({type:yy,selectors:[["tb-notification"]],inputs:{notification:"notification",onClose:"onClose",preview:"preview"},outputs:{markAsRead:"markAsRead"},decls:16,vars:21,consts:[["defaultIcon",""],[1,"notification","flex","flex-row","items-start","justify-between"],[4,"ngIf","ngIfElse"],[1,"content","flex-1"],[1,"title",3,"innerHTML"],[1,"message",3,"innerHTML"],["mat-stroked-button","","class","button","color","primary",3,"click",4,"ngIf"],[1,"description","flex","flex-col","items-end","justify-start"],[1,"time"],["mat-icon-button","","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["class","alarm-severity",3,"background-color",4,"ngIf"],[1,"icon"],["class","icon",3,"style",4,"ngIf"],["mat-stroked-button","","color","primary",1,"button",3,"click"],["mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],[1,"alarm-severity"],[1,"severity"]],template:function(r,e){if(r&1&&(d(0,"section",1),x(1,wMe,3,3,"div",2)(2,SMe,1,1,"ng-template",null,0,kt),d(4,"div",3),O(5,"div",4),v(6,"safe"),O(7,"div",5),v(8,"safe"),x(9,TMe,2,1,"button",6),p(),d(10,"div",7)(11,"span",8),g(12),v(13,"dateAgo"),p(),x(14,EMe,4,3,"button",9)(15,IMe,4,7,"div",10),p()()),r&2){let i,o=me(3);_n(Yi(18,CMe,e.notificationColor(),e.notificationBackgroundColor())),l(),m("ngIf",e.showIcon)("ngIfElse",o),l(4),m("innerHTML",ft(6,10,e.title,"html"),Ut),l(2),m("innerHTML",ft(8,13,e.message,"html"),Ut),l(2),m("ngIf",e.showButton),l(3),z(C(13,16,(i=e.notification.createdTime)!==null&&i!==void 0?i:e.currentDate)),l(2),m("ngIf",!e.hideMarkAsReadButton),l(),m("ngIf",e.notification.type===e.notificationType.ALARM&&
220!e.notification.info.cleared)}},dependencies:[ce,yt,Pe,Se,zt,In,be,_b,mc],styles:['@charset "UTF-8";[_nghost-%COMP%]   .notification[_ngcontent-%COMP%]{padding:10px 0 10px 10px;border:1px solid;border-radius:4px;margin:4px}[_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{margin-right:14px;color:#0000008a}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{letter-spacing:.25px;word-break:break-word}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:4px;font-weight:500}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]{font-size:14px;line-height:16px;color:#000000c2}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{margin-top:12px;border-color:initial;height:fit-content;line-height:2}[_nghost-%COMP%]   .description[_ngcontent-%COMP%]{margin-left:8px;min-width:70px;color:#0000008a}[_nghost-%COMP%]   .description[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.25px;margin-right:12px;margin-top:4px}[_nghost-%COMP%]   .description[_ngcontent-%COMP%]   .alarm-severity[_ngcontent-%COMP%]{padding:5px;border-radius:8px;margin-right:7px}[_nghost-%COMP%]   .description[_ngcontent-%COMP%]   .alarm-severity[_ngcontent-%COMP%]   .severity[_ngcontent-%COMP%]{font-weight:500;letter-spacing:.25px}']});var M0=yy;pe([fe(),le("design:type",Object)],M0.prototype,"preview",void 0);var nAe={};Ae(nAe,{TemplateAutocompleteComponent:()=>au});y();y();y();var cY=(()=>{let t=class t extends An{constructor(e,i,o,a){super(e,i,o),this.store=e,this.router=i,this.dialogRef=o,this.fb=a,this.notificationType=Xi,this.ReportTemplateType=Oc,this.entityType=G,this.notificationDeliveryMethods=Object.keys(Uo),this.notificationDeliveryMethodInfoMap=vy,this.notificationTemplateTypeTranslateMap=aM,this.destroy$=new Te,this.authUser=Mr(this.store),this.templateNotificationForm=this.fb.group({name:["",ke.required],notificationType:[Xi.GENERAL],configuration:this.fb.group({deliveryMethodsTemplates:this.fb.group({},{validators:this.atLeastOne()}),attachReport:[],reportTemplateId:[null,[ke.required]],userId:[null,[ke.required]],timezone:[null,[ke.required]]})}),this.templateNotificationForm.get("configuration.deliveryMethodsTemplates").valueChanges.pipe(Be(this.destroy$)).subscribe(s=>{this.deliveryConfiguration=s}),Xt(this.templateNotificationForm.get("notificationType").valueChanges,this.templateNotificationForm.get("configuration.attachReport").valueChanges).pipe(Be(this.destroy$)).subscribe(()=>{this.updateValidators()}),this.notificationTemplateConfigurationForm=this.fb.group({deliveryMethodsTemplates:null}),this.notificationDeliveryMethods.forEach(s=>{this.templateNotificationForm.get("configuration.deliveryMethodsTemplates").addControl(s,this.fb.group({enabled:s===Uo.WEB}),{emitEvent:!1})}),Xt(this.templateNotificationForm.get("configuration.deliveryMethodsTemplates.SLACK").valueChanges,this.templateNotificationForm.get("configuration.deliveryMethodsTemplates.EMAIL").valueChanges).pipe(Be(this.destroy$)).subscribe(()=>{this.updateAttachReportValidators()}),this.deliveryConfiguration=this.templateNotificationForm.get("configuration.deliveryMethodsTemplates").value,this.updateAttachReportValidators()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}atLeastOne(){return e=>{let i=!0;return e?.controls&&(i=Object.entries(e.controls).map(a=>a[1]).some(a=>a.controls.enabled.value)),i?null:{atLeastOne:!0}}}isSysAdmin(){return this.authUser.authority===Mt.SYS_ADMIN}isTenantAdmin(){return this.authUser.authority===Mt.TENANT_ADMIN}getNotificationTemplateValue(){let e=Di(this.templateNotificationForm.value);return e.configuration.deliveryMethodsTemplates=Di(this.notificationTemplateConfigurationForm.get("deliveryMethodsTemplates").value),fb(e)}updateValidators(){this.templateNotificationForm.get("notificationType").value===Xi.REPORT_GENERATED&&this.templateNotificationForm.get("configuration.attachReport").patchValue(!1,{emitEvent:!1});let i=this.templateNotificationForm.get("configuration.attachReport");i.value&&!i.disabled?(this.templateNotificationForm.get("configuration.reportTemplateId").enable({emitEvent:!1}),this.templateNotificationForm.get("configuration.userId").enable({emitEvent:!1}),this.templateNotificationForm.get("configuration.timezone").enable({emitEvent:!1})):(this.templateNotificationForm.get("configuration.reportTemplateId").disable({emitEvent:!1}),this.templateNotificationForm.get("configuration.userId").disable({emitEvent:!1}),this.templateNotificationForm.get("configuration.timezone").disable({emitEvent:!1}))}updateAttachReportValidators(){let e=this.templateNotificationForm.get("configuration.deliveryMethodsTemplates.SLACK").value;!this.templateNotificationForm.get("configuration.deliveryMethodsTemplates.EMAIL").value.enabled&&!e.enabled?(this.templateNotificationForm.get("configuration.attachReport").patchValue(!1,{emitEvent:!1}),this.templateNotificationForm.get("configuration.attachReport").disable()):this.templateNotificationForm.get("configuration.attachReport").enable()}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(en),h(Ai))},t.\u0275dir=_e({type:t,features:[Ce]});let n=t;return n})();y();var dY=["reportTemplateInput"],DMe=[[["","tb-error",""]],[["","tb-hint",""]]],MMe=["[tb-error]","[tb-hint]"],AMe=(n,t,r)=>({"tb-inline-field":n,flex:t,"tb-suffix-absolute":r}),OMe=n=>({entity:n});function PMe(n,t){if(n&1&&(d(0,"mat-label"),g(1),v(2,"translate"),p()),n&2){let r=b
220();l(),z(C(2,1,r.labelTranslationKey))}}function RMe(n,t){if(n&1&&(d(0,"a",13),v(1,"translate"),g(2),p()),n&2){let r=b();m("routerLink",r.reportTemplateURL),Je("aria-label",C(1,3,"report-template.open-report-template")),l(2),j(" ",r.displayReportTemplateFn(r.selectReportTemplateFormGroup.get("reportTemplate").value)," ")}}function FMe(n,t){if(n&1){let r=B();d(0,"button",14),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",15),g(2,"close"),p()()}}function NMe(n,t){if(n&1){let r=B();d(0,"button",16),v(1,"translate"),T("click",function(i){D(r);let o=b();return M(o.openReportTemplateNewTab(i))}),d(2,"tb-icon",17),g(3,"open_in_new"),p()()}if(n&2){let r=b();te("matTooltip",C(1,1,r.openNewTabTranslationKey))}}function VMe(n,t){if(n&1&&(d(0,"mat-icon",18),v(1,"translate"),g(2," warning "),p()),n&2){let r=b();m("matTooltip",C(1,1,r.reportTemplateRequiredTranslationKey))}}function LMe(n,t){if(n&1&&(d(0,"mat-option",19),O(1,"span",20),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function BMe(n,t){if(n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2){let r=b
220(2);l(2),z(C(3,1,r.noReportTemplatesTranslationKey))}}function jMe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"async"),p()),n&2){let r=b(2);l(),j(" ",C(2,1,r.translate.get(r.noReportTemplatesMatchingTranslationKey,Xe(3,OMe,r.searchText)))," ")}}function GMe(n,t){if(n&1){let r=B();d(0,"mat-option",19)(1,"div",21),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,BMe,4,3,"div",22)(3,jMe,3,5,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function zMe(n,t){n&1&&(d(0,"mat-error"),Fe(1),p())}function $Me(n,t){n&1&&(d(0,"mat-hint"),Fe(1,1),p())}var A0=class A0{constructor(t,r,e,i){this.translate=t,this.reportTemplateService=r,this.router=e,this.fb=i,this.dirty=!1,this.floatLabel="auto",this.appearance="fill",this.subscriptSizing="fixed",this.searchText="",this.reportTemplateURL="",this.propagateChange=o=>{},this.selectReportTemplateFormGroup=this.fb.group({reportTemplate:[null,this.required?[ke.required]:[]]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){Oc.SUB_REPORT===this.type?(this.labelTranslationKey="report-template.sub-report",this.placeholderTranslationKey="report-template.select-sub-report",this.openNewTabTranslationKey="report-template.open-subreport-new-tab",this.noReportTemplatesTranslationKey="report-template.no-sub-reports-text",this.noReportTemplatesMatchingTranslationKey="report-template.no-sub-reports-matching",this.reportTemplateRequiredTranslationKey="report-template.sub-report-required"):(this.labelTranslationKey="report-template.report-template",this.placeholderTranslationKey="report-template.select-report-template",this.openNewTabTranslationKey="report-template.open-report-template-new-tab",this.noReportTemplatesTranslationKey="report-template.no-report-templates-text",this.noReportTemplatesMatchingTranslationKey="report-template.no-report-templates-matching",this.reportTemplateRequiredTranslationKey="report-template.report-template-required"),this.filteredReportTemplates=this.selectReportTemplateFormGroup.get("reportTemplate").valueChanges.pipe(Wi(150),et(t=>{let r;typeof t=="string"||!t?r=null:r=t.id,this.updateView(r)}),W(t=>t?typeof t=="string"?t:t.name:""),ii(t=>this.fetchReportTemplates(t)),Si())}setDisabledState(t){this.disabled=t,this.disabled?(this.selectReportTemplateFormGroup.disable({emitEvent:!1}),this.reportTemplateAutocomplete.closePanel()):this.selectReportTemplateFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="",t!=null?this.reportTemplateService.getReportTemplateInfo(t.id,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:r=>{this.modelValue=r.id,this.reportTemplateURL=ml(this.modelValue.id,G.REPORT_TEMPLATE),this.selectReportTemplateFormGroup.get("reportTemplate").patchValue(r,{emitEvent:!1})},error:()=>{this.modelValue=null,this.reportTemplateURL="",this.selectReportTemplateFormGroup.get("reportTemplate").patchValue("",{emitEvent:!1}),this.required&&this.propagateChange(this.modelValue)}}):(this.modelValue=null,this.reportTemplateURL="",this.selectReportTemplateFormGroup.get("reportTemplate").patchValue("",{emitEvent:!1})),this.dirty=!0}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.reportTemplateURL=this.modelValue?ml(this.modelValue.id,G.REPORT_TEMPLATE):"",this.propagateChange(this.modelValue))}displayReportTemplateFn(t){return t?t.name:void 0}fetchReportTemplates(t){this.searchText=t;let r=new On(25,0,t,{property:"name",direction:Xn.ASC});return this.getReportTemplates(r).pipe(vt(()=>Z(yr())),W(e=>e.data))}getReportTemplates(t){let r={typeList:this.type?[this.type]:null,formatList:this.format?[this.format]:null},e=new Vv(t,r);return this.reportTemplateService.getAllReportTemplateInfos(e,{ignoreLoading:!0})}onFocus(){this.dirty&&(this.selectReportTemplateFormGroup.get("reportTemplate").updateValueAndValidity({onlySelf:!0}),this.dirty=!1)}clear(){this.selectReportTemplateFormGroup.get("reportTemplate").patchValue(""),setTimeout(()=>{this.reportTemplateInput.nativeElement.blur(),this.reportTemplateInput.nativeElement.focus()},0)}textIsNotEmpty(t){return t&&t.length>0}openReportTemplateNewTab(t){t.stopPropagation();let r=this.router.serializeUrl(this.router.createUrlTree([this.reportTemplateURL]));window.open(r,"_blank")}};
220A0.\u0275fac=function(r){return new(r||A0)(h(Ge),h(Fv),h(vi),h(Wt))},A0.\u0275cmp=L({type:A0,selectors:[["tb-report-template-autocomplete"]],viewQuery:function(r,e){if(r&1&&(ae(dY,7),ae(dY,7,mi)),r&2){let i;Q(i=K())&&(e.reportTemplateInput=i.first),Q(i=K())&&(e.reportTemplateAutocomplete=i.first)}},inputs:{type:"type",format:"format",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",inlineField:"inlineField",required:"required",disabled:"disabled",placeholder:"placeholder",newTabDetailsButton:"newTabDetailsButton"},features:[ne([{provide:ye,useExisting:he(()=>A0),multi:!0}])],ngContentSelectors:MMe,decls:17,vars:31,consts:[["reportTemplateInput",""],["reportTemplateAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","floatLabel","appearance","subscriptSizing"],[4,"ngIf"],["matInput","","type","text","formControlName","reportTemplate",3,"focusin","placeholder","required","matAutocomplete"],[3,"routerLink",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["type","button","matTooltipPosition","above","matSuffix","","mat-icon-button","","aria-label","Details",3,"matTooltip","click",4,"ngIf"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error",3,"matTooltip",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[3,"routerLink"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],["type","button","matTooltipPosition","above","matSuffix","","mat-icon-button","","aria-label","Details",3,"click","matTooltip"],["matButtonIcon",""],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"],[3,"value"],[3,"innerHTML"],[3,"click"],[4,"ngIf","ngIfElse"]],template:function(r,e){if(r&1){let i=B();Ct(DMe),d(0,"mat-form-field",3),x(1,PMe,3,3,"mat-label",4),d(2,"input",5,0),v(4,"translate"),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(5,RMe,3,5,"a",6)(6,FMe,3,0,"button",7)(7,NMe,4,3,"button",8)(8,VMe,3,3,"mat-icon",9),d(9,"mat-autocomplete",10,1),x(11,LMe,3,5,"mat-option",11),v(12,"async"),x(13,GMe,5,3,"mat-option",12),v(14,"async"),p(),x(15,zMe,2,0,"mat-error",4)(16,$Me,2,0,"mat-hint",4),p()}if(r&2){let i,o=me(10);bt(rl(27,AMe,e.inlineField,e.inlineField,e.inlineField&&!e.selectReportTemplateFormGroup.get("reportTemplate").value)),m("formGroup",e.selectReportTemplateFormGroup)("floatLabel",e.floatLabel)("appearance",e.inlineField?"outline":e.appearance)("subscriptSizing",e.inlineField?"dynamic":e.subscriptSizing),l(),m("ngIf",!e.inlineField),l(),Y("!hidden",e.disabled&&e.selectReportTemplateFormGroup.get("reportTemplate").value),te("placeholder",e.placeholder?e.placeholder:C(4,21,e.placeholderTranslationKey)),m("required",e.required)("matAutocomplete",o),l(3),m("ngIf",e.selectReportTemplateFormGroup.get("reportTemplate").value&&e.disabled),l(),m("ngIf",e.selectReportTemplateFormGroup.get("reportTemplate").value&&!e.disabled),l(),m("ngIf",e.selectReportTemplateFormGroup.get("reportTemplate").value&&e.newTabDetailsButton&&e.reportTemplateURL!==""&&!e.disabled),l(),m("ngIf",e.inlineField&&e.selectReportTemplateFormGroup.get("reportTemplate").hasError("required")&&e.selectReportTemplateFormGroup.get("reportTemplate").touched),l(),m("displayWith",e.displayReportTemplateFn),l(2),m("ngForOf",C(12,23,e.filteredReportTemplates)),l(2),m("ngIf",!((i=C(14,25,e.filteredReportTemplates))!=null&&i.length)),l(2),m("ngIf",!e.inlineField&&e.subscriptSizing!=="dynamic"),l(),m("ngIf",!e.inlineField&&e.subscriptSizing!=="dynamic")}},dependencies:[Ke,ce,ll,Pe,Se,at,ze,At,to,ni,Yt,xt,zt,Ri,mi,ut,xe,We,St,$e,Qe,In,Ve,be,Mi],encapsulation:2});var Bp=A0;pe([fe(),le("design:type",Boolean)],Bp.prototype,"inlineField",void 0);pe([fe(),le("design:type",Boolean)],Bp.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Bp.prototype,"newTabDetailsButton",void 0);y();y();var pY=n=>({length:n});function HMe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.button-text-required")," "))}function qMe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
220(3);l(),j(" ",ft(2,1,"notification.button-text-max-length",Xe(4,pY,r.actionButtonConfigForm.get("text").getError("maxlength").requiredLength))," ")}}function WMe(n,t){if(n&1&&(d(0,"mat-form-field",16)(1,"mat-label",11),g(2,"notification.button-text"),p(),O(3,"input",17),x(4,HMe,3,3,"mat-error",18)(5,qMe,3,6,"mat-error",18),p()),n&2){let r=b(2);l(4),m("ngIf",r.actionButtonConfigForm.get("text").hasError("required")),l(),m("ngIf",r.actionButtonConfigForm.get("text").hasError("maxlength"))}}function YMe(n,t){if(n&1&&(d(0,"mat-option",19),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b(2);m("value",r),l(),j(" ",C(2,2,e.actionButtonLinkTypeTranslateMap.get(r))," ")}}function QMe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.link-required")," "))}function KMe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b(3);l(),j(" ",ft(2,1,"notification.link-max-length",Xe(4,pY,r.actionButtonConfigForm.get("link").getError("maxlength").requiredLength))," ")}}function XMe(n,t){if(n&1&&(d(0,"mat-form-field",20)(1,"mat-label",11),g(2,"notification.link"),p(),O(3,"input",21),x(4,QMe,3,3,"mat-error",18)(5,KMe,3,6,"mat-error",18),p()),n&2){let r=b
220(2);l(4),m("ngIf",r.actionButtonConfigForm.get("link").hasError("required")),l(),m("ngIf",r.actionButtonConfigForm.get("link").hasError("maxlength"))}}function ZMe(n,t){if(n&1&&O(0,"tb-dashboard-autocomplete",22)(1,"tb-dashboard-state-autocomplete",23),n&2){let r=b(2);l(),m("dashboardId",r.actionButtonConfigForm.get("dashboardId").value)}}function JMe(n,t){n&1&&(d(0,"mat-slide-toggle",24),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.set-entity-from-notification")," "))}function e2e(n,t){if(n&1&&(d(0,"div",8),x(1,WMe,6,2,"mat-form-field",9),p(),d(2,"div",8)(3,"mat-form-field",10)(4,"mat-label",11),g(5,"notification.action-type"),p(),d(6,"mat-select",12),x(7,YMe,3,4,"mat-option",13),p()(),x(8,XMe,6,2,"mat-form-field",14)(9,ZMe,2,1,"ng-template",null,0,kt),p(),x(11,JMe,3,3,"mat-slide-toggle",15)),n&2){let r=me(10),e=b();l(),m("ngIf",!e.hideButtonText),l(6),m("ngForOf",e.actionButtonLinkTypes),l(),m("ngIf",e.actionButtonConfigForm.get("linkType").value===e.actionButtonLinkType.LINK)("ngIfElse",r),l(3),m("ngIf",e.actionButtonConfigForm.get("linkType").value===e.actionButtonLinkType.DASHBOARD)}}var zh=class zh{get hideButtonText(){return this.hideButtonTextValue}set hideButtonText(t){this.hideButtonTextValue=t,this.hideButtonTextValue&&this.actionButtonConfigForm.removeControl("text")}constructor(t){this.fb=t,this.hideButtonTextValue=!1,this.actionButtonLinkType=Lp,this.actionButtonLinkTypes=Object.keys(Lp),this.actionButtonLinkTypeTranslateMap=lY,this.propagateChange=r=>{},this.destroy$=new Te,this.actionButtonConfigForm=this.fb.group({enabled:[!1],text:[{value:"",disabled:!0}
220,[ke.required,ke.maxLength(50)]],linkType:[Lp.LINK],link:[{value:"",disabled:!0},[ke.required,ke.maxLength(300)]],dashboardId:[{value:null,disabled:!0},ke.required],dashboardState:[{value:null,disabled:!0}],setEntityIdInState:[{value:!0,disabled:!0}]}),this.actionButtonConfigForm.get("enabled").valueChanges.pipe(Be(this.destroy$)).subscribe(r=>{r?(this.hideButtonText||this.actionButtonConfigForm.get("text").enable({emitEvent:!1}),this.actionButtonConfigForm.get("linkType").enable({onlySelf:!1})):(this.actionButtonConfigForm.disable({emitEvent:!1}),this.actionButtonConfigForm.get("enabled").enable({emitEvent:!1}))}),this.actionButtonConfigForm.get("linkType").valueChanges.pipe(Be(this.destroy$)).subscribe(r=>{this.actionButtonConfigForm.get("enabled").value&&(r===Lp.LINK?(this.actionButtonConfigForm.get("link").enable({emitEvent:!1}),this.actionButtonConfigForm.get("dashboardId").disable({emitEvent:!1}),this.actionButtonConfigForm.get("dashboardState").disable({emitEvent:!1}),this.actionButtonConfigForm.get("setEntityIdInState").disable({emitEvent:!1})):(this.actionButtonConfigForm.get("link").disable({emitEvent:!1}),this.actionButtonConfigForm.get("dashboardId").enable({emitEvent:!1}),this.actionButtonConfigForm.get("dashboardState").enable({emitEvent:!1}),this.actionButtonConfigForm.get("setEntityIdInState").enable({emitEvent:!1})))}),this.actionButtonConfigForm.valueChanges.pipe(Be(this.destroy$)).subscribe(r=>this.propagateChange(r))}ngOnInit(){}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){t?this.actionButtonConfigForm.disable({emitEvent:!1}):(this.actionButtonConfigForm.enable({emitEvent:!1}),this.actionButtonConfigForm.get("enabled").updateValueAndValidity({onlySelf:!0}))}validate(){return this.actionButtonConfigForm.valid?null:{actionButtonConfigForm:{valid:!1}}}writeValue(t){De(t)&&(this.actionButtonConfigForm.patchValue(t,{emitEvent:!1}),this.actionButtonConfigForm.get("enabled").updateValueAndValidity({onlySelf:!0}))}};zh.\u0275fac=function(r){return new(r||zh)(h(Ai))},zh.\u0275cmp=L({type:zh,selectors:[["tb-notification-action-button-configuration"]],inputs:{actionTitle:"actionTitle",sliderHint:"sliderHint",hideButtonText:"hideButtonText"},features:[ne([{provide:ye,useExisting:he(()=>zh),multi:!0},{provide:zn,useExisting:he(()=>zh),multi:!0}])],decls:8,vars:4,consts:[["dashboardSelector",""],[1,"tb-form-panel","tb-slide-toggle","stroked",3,"formGroup"],[1,"tb-settings",3,"expanded"],[1,"fill-width","flex","flex-row","flex-wrap"],[1,"max-w-60%","flex-full"],[1,"tb-form-row","no-border","no-padding",3,"tb-hint-tooltip-icon"],["formControlName","enabled",1,"mat-slide","flex","items-stretch","justify-center",3,"click"],["matExpansionPanelContent","",1,"tb-extension-panel"],[1,"flex","flex-row","xs:flex-col","gt-xs:gap-2"],["class","mat-block flex-1",4,"ngIf"],[1,"max-w-30%","flex-full","xs:max-w-full"],["translate",""],["formControlName","linkType"],[3,"value",4,"ngFor","ngForOf"],["class","flex-1",4,"ngIf","ngIfElse"],["formControlName","setEntityIdInState","class","toggle",4,"ngIf"],[1,"mat-block","flex-1"],["matInput","","formControlName","text","required",""],[4,"ngIf"],[3,"value"],[1,"flex-1"],["matInput","","formControlName","link","required",""],["required","","formControlName","dashboardId",1,"max-w-35%","flex-full","xs:max-w-full"],["formControlName","dashboardState",1,"max-w-35%","flex-full","xs:max-w-full",3,"dashboardId"],["formControlName","setEntityIdInState",1,"toggle"]],template:function(r,e){r&1&&(d(0,"div",1)(1,"mat-expansion-panel",2)(2,"mat-expansion-panel-header",3)(3,"mat-panel-title",4)(4,"div",5)(5,"mat-slide-toggle",6),T("click",function(o){return o.stopPropagation()}),g(6),p()()()(),x(7,e2e,12,5,"ng-template",7),p()()),r&2&&(m("formGroup",e.actionButtonConfigForm),l(),m("expanded",e.actionButtonConfigForm.get("enabled").value),l(3),te("tb-hint-tooltip-icon",e.sliderHint),l(2),j(" ",e.actionTitle," "))},dependencies:[Ke,ce,cp,T1,at,ze,At,ni,Kn,xt,jo,Ss,Ts,Bl,ep,ut,xe,We,St,$e,Qe,jt,Hs,be],encapsulation:2});var Tx=zh;pe([fe(),le("design:type",Boolean),le("design:paramtypes",[Boolean])],Tx.prototype,"hideButtonText",null);var i2e=()=>({maxWidth:"800px"}),Cy=n=>({length:n});function n2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.subject-required")," "))}function r2e(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
220(3);l(),j(" ",ft(2,1,"notification.subject-max-length",Xe(4,Cy,r.templateConfigurationForm.get("WEB.subject").getError("maxlength").requiredLength))," ")}}function o2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.message-required")," "))}function a2e(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b(3);l(),j(" ",ft(2,1,"notification.message-max-length",Xe(4,Cy,r.templateConfigurationForm.get("WEB.body").getError("maxlength").requiredLength))," ")}}function s2e(n,t){if(n&1&&(d(0,"mat-form-field",12)(1,"mat-label",13),g(2,"notification.subject"),p(),O(3,"input",14),x(4,n2e,3,3,"mat-error",15)(5,r2e,3,6,"mat-error",15),p(),d(6,"mat-form-field",12)(7,"mat-label",13),g(8,"notification.message"),p(),d(9,"textarea",16),g(10,"          "),p(),x(11,o2e,3,3,"mat-error",15)(12,a2e,3,6,"mat-error",15),p(),d(13,"section",17)(14,"div",18)(15,"mat-slide-toggle",19),g(16),v(17,"translate"),p(),d(18,"div",20),O(19,"tb-material-icon-select",21)(20,"tb-color-input",22),p()(),O(21,"tb-notification-action-button-configuration",23),v(22,"translate"),p()),n&2){let r=b
220(2);l(4),m("ngIf",r.templateConfigurationForm.get("WEB.subject").hasError("required")),l(),m("ngIf",r.templateConfigurationForm.get("WEB.subject").hasError("maxlength")),l(6),m("ngIf",r.templateConfigurationForm.get("WEB.body").hasError("required")),l(),m("ngIf",r.templateConfigurationForm.get("WEB.body").hasError("maxlength")),l(4),j(" ",C(17,7,"icon.icon")," "),l(3),m("color",r.templateConfigurationForm.get("WEB.additionalConfig.icon.color").value),l(2),te("actionTitle",C(22,9,"notification.action-button"))}}function l2e(n,t){if(n&1&&(d(0,"section",7)(1,"mat-expansion-panel",8)(2,"mat-expansion-panel-header",9)(3,"mat-panel-title",10)(4,"tb-icon"),g(5),p(),g(6),v(7,"translate"),p()(),x(8,s2e,23,11,"ng-template",11),p()()),n&2){let r=b();m("formGroupName",r.NotificationDeliveryMethod.WEB),l(),te("expanded",r.expandedForm(r.NotificationDeliveryMethod.WEB)),l(4),z(r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.WEB).icon),l(),j(" ",C(7,4,r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.WEB).name)," ")}}function c2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.subject-required")," "))}function d2e(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
220(3);l(),j(" ",ft(2,1,"notification.subject-max-length",Xe(4,Cy,r.templateConfigurationForm.get("MOBILE_APP.subject").getError("maxlength").requiredLength))," ")}}function p2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.message-required")," "))}function m2e(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b(3);l(),j(" ",ft(2,1,"notification.message-max-length",Xe(4,Cy,r.templateConfigurationForm.get("MOBILE_APP.body").getError("maxlength").requiredLength))," ")}}function u2e(n,t){if(n&1&&(d(0,"mat-form-field",12)(1,"mat-label",13),g(2,"notification.subject"),p(),O(3,"input",14),x(4,c2e,3,3,"mat-error",15)(5,d2e,3,6,"mat-error",15),p(),d(6,"mat-form-field",12)(7,"mat-label",13),g(8,"notification.message"),p(),d(9,"textarea",16),g(10,"          "),p(),x(11,p2e,3,3,"mat-error",15)(12,m2e,3,6,"mat-error",15),p(),d(13,"div",17)(14,"div",18)(15,"mat-slide-toggle",19),g(16),v(17,"translate"),p(),d(18,"div",20),O(19,"tb-material-icon-select",21)(20,"tb-color-input",22),p()(),O(21,"tb-notification-action-button-configuration",24),v(22,"translate"),p()),n&2){let r=b
220(2);l(4),m("ngIf",r.templateConfigurationForm.get("MOBILE_APP.subject").hasError("required")),l(),m("ngIf",r.templateConfigurationForm.get("MOBILE_APP.subject").hasError("maxlength")),l(6),m("ngIf",r.templateConfigurationForm.get("MOBILE_APP.body").hasError("required")),l(),m("ngIf",r.templateConfigurationForm.get("MOBILE_APP.body").hasError("maxlength")),l(4),j(" ",C(17,8,"icon.icon")," "),l(3),m("color",r.templateConfigurationForm.get("MOBILE_APP.additionalConfig.icon.color").value),l(2),te("actionTitle",C(22,10,"notification.notification-tap-action")),m("sliderHint",r.notificationTapActionHint)}}function h2e(n,t){if(n&1&&(d(0,"section",7)(1,"mat-expansion-panel",8)(2,"mat-expansion-panel-header",9)(3,"mat-panel-title",10)(4,"tb-icon"),g(5),p(),g(6),v(7,"translate"),p()(),x(8,u2e,23,12,"ng-template",11),p()()),n&2){let r=b();m("formGroupName",r.NotificationDeliveryMethod.MOBILE_APP),l(),te("expanded",r.expandedForm(r.NotificationDeliveryMethod.MOBILE_APP)),l(4),z(r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.MOBILE_APP).icon),l(),j(" ",C(7,4,r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.MOBILE_APP).name)," ")}}function f2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.message-required")," "))}function g2e(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
220(3);l(),j(" ",ft(2,1,"notification.message-max-length",Xe(4,Cy,r.templateConfigurationForm.get("SMS.body").getError("maxlength").requiredLength))," ")}}function b2e(n,t){if(n&1&&(d(0,"mat-form-field",25)(1,"mat-label",13),g(2,"notification.message"),p(),d(3,"textarea",16),g(4,"          "),p(),O(5,"mat-hint"),x(6,f2e,3,3,"mat-error",15)(7,g2e,3,6,"mat-error",15),p()),n&2){let r=b(2);l(6),m("ngIf",r.templateConfigurationForm.get("SMS.body").hasError("required")),l(),m("ngIf",r.templateConfigurationForm.get("SMS.body").hasError("maxlength"))}}function _2e(n,t){if(n&1&&(d(0,"section",7)(1,"mat-expansion-panel",8)(2,"mat-expansion-panel-header",9)(3,"mat-panel-title",10)(4,"tb-icon"),g(5),p(),g(6),v(7,"translate"),p()(),x(8,b2e,8,2,"ng-template",11),p()()),n&2){let r=b();m("formGroupName",r.NotificationDeliveryMethod.SMS),l(),te("expanded",r.expandedForm(r.NotificationDeliveryMethod.SMS)),l(4),z(r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.SMS).icon),l(),j(" ",C(7,4,r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.SMS).name)," ")}}function v2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.subject-required")," "))}function y2e(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b
220(3);l(),j(" ",ft(2,1,"notification.subject-max-length",Xe(4,Cy,r.templateConfigurationForm.get("EMAIL.subject").getError("maxlength").requiredLength))," ")}}function C2e(n,t){n&1&&(d(0,"mat-error",29),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.message-required")," "))}function w2e(n,t){if(n&1&&(d(0,"mat-form-field",12)(1,"mat-label",13),g(2,"notification.subject"),p(),O(3,"input",14),x(4,v2e,3,3,"mat-error",15)(5,y2e,3,6,"mat-error",15),p(),d(6,"mat-label",26),g(7,"notification.message "),p(),O(8,"editor",27),x(9,C2e,3,3,"mat-error",28)),n&2){let r=b(2);l(4),m("ngIf",r.templateConfigurationForm.get("EMAIL.subject").hasError("required")),l(),m("ngIf",r.templateConfigurationForm.get("EMAIL.subject").hasError("maxlength")),l(),Y("tb-error",(r.interacted||r.templateConfigurationForm.get("EMAIL.body").touched)&&r.templateConfigurationForm.get("EMAIL.body").hasError("required")),l(2),m("init",r.tinyMceOptions),l(),m("ngIf",(r.interacted||r.templateConfigurationForm.get("EMAIL.body").touched)&&r.templateConfigurationForm.get("EMAIL.body").hasError("required"))}}function x2e(n,t){if(n&1&&(d(0,"section",7)(1,"mat-expansion-panel",8)(2,"mat-expansion-panel-header",9)(3,"mat-panel-title",10)(4,"tb-icon"),g(5),p(),g(6),v(7,"translate"),p()(),x(8,w2e,10,6,"ng-template",11),p()()),n&2){let r=b
220();m("formGroupName",r.NotificationDeliveryMethod.EMAIL),l(),te("expanded",r.expandedForm(r.NotificationDeliveryMethod.EMAIL)),l(4),z(r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.EMAIL).icon),l(),j(" ",C(7,4,r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.EMAIL).name)," ")}}function S2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.message-required")," "))}function T2e(n,t){if(n&1&&(d(0,"mat-form-field",12)(1,"mat-label",13),g(2,"notification.message"),p(),d(3,"textarea",16),g(4,"          "),p(),x(5,S2e,3,3,"mat-error",15),p()),n&2){let r=b(2);l(5),m("ngIf",r.templateConfigurationForm.get("SLACK.body").hasError("required"))}}function E2e(n,t){if(n&1&&(d(0,"section",7)(1,"mat-expansion-panel",8)(2,"mat-expansion-panel-header",9)(3,"mat-panel-title",10)(4,"tb-icon"),g(5),p(),g(6),v(7,"translate"),p()(),x(8,T2e,6,1,"ng-template",11),p()()),n&2){let r=b();m("formGroupName",r.NotificationDeliveryMethod.SLACK),l(),te("expanded",r.expandedForm(r.NotificationDeliveryMethod.SLACK)),l(4),z(r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.SLACK).icon),l(),j(" ",C(7,4,r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.SLACK).name)," ")}}function I2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.message-required")," "))}function k2e(n,t){if(n&1&&(d(0,"mat-form-field",12)(1,"mat-label",13),g(2,"notification.subject"),p(),O(3,"input",14),p(),d(4,"mat-form-field",12)(5,"mat-label",13),g(6,"notification.message"),p(),d(7,"textarea",16),g(8,"          "),p(),x(9,I2e,3,3,"mat-error",15),p(),d(10,"div",30)(11,"div",31)(12,"div",13),g(13,"notification.theme-color"),p(),O(14,"tb-color-input",32),p(),O(15,"tb-notification-action-button-configuration",33),v(16,"translate"),p()),n&2){let r=b
220(2);l(9),m("ngIf",r.templateConfigurationForm.get("MICROSOFT_TEAMS.body").hasError("required")),l(6),te("actionTitle",C(16,2,"notification.action-button"))}}function D2e(n,t){if(n&1&&(d(0,"section",7)(1,"mat-expansion-panel",8)(2,"mat-expansion-panel-header",9)(3,"mat-panel-title",10)(4,"tb-icon"),g(5),p(),g(6),v(7,"translate"),p()(),x(8,k2e,17,4,"ng-template",11),p()()),n&2){let r=b();m("formGroupName",r.NotificationDeliveryMethod.MICROSOFT_TEAMS),l(),te("expanded",r.expandedForm(r.NotificationDeliveryMethod.MICROSOFT_TEAMS)),l(4),z(r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.MICROSOFT_TEAMS).icon),l(),j(" ",C(7,4,r.NotificationDeliveryMethodInfoMap.get(r.NotificationDeliveryMethod.MICROSOFT_TEAMS).name)," ")}}var $h=class $h{set predefinedDeliveryMethodsTemplate(t){De(t)&&(this.templateConfigurationForm.patchValue(t,{emitEvent:!1}),this.updateDisabledForms(),this.updateExpandedForm(),this.templateConfigurationForm.updateValueAndValidity())}constructor(t,r){this.fb=t,this.translate=r,this.NotificationDeliveryMethodInfoMap=vy,this.NotificationDeliveryMethod=Uo,this.NotificationTemplateTypeTranslateMap=aM,this.tinyMceOptions={base_url:"/assets/tinymce",suffix:".min",plugins:["link","table","image","lists","code","fullscreen"],menubar:"edit insert tools view format table",toolbar:"undo redo | fontfamily fontsize blocks | bold italic  strikethrough | forecolor backcolor | link table image | alignleft aligncenter alignright al
220ignjustify  | numlist bullist | outdent indent  | removeformat | code | fullscreen",toolbar_mode:"sliding",height:400,autofocus:!1,branding:!1,promotion:!1,relative_urls:!1,urlconverter_callback:e=>e},this.propagateChange=null,this.destroy$=new Te,this.propagateChangePending=!1,this.templateConfigurationForm=this.buildForm(),this.templateConfigurationForm.valueChanges.pipe(Be(this.destroy$)).subscribe(e=>{this.updateModel(e)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}writeValue(t){let r=Di(t);if(De(r))for(let e of Object.values(Uo))De(r[e]?.enabled)&&delete r[e].enabled;this.templateConfigurationForm.patchValue(r,{emitEvent:!1}),this.updateExpandedForm()}registerOnChange(t){this.propagateChange=t,this.propagateChangePending&&(this.propagateChangePending=!1,Promise.resolve().then(()=>{this.templateConfigurationForm.updateValueAndValidity()}))}registerOnTouched(t){}setDisabledState(t){t?this.templateConfigurationForm.disable({emitEvent:!1}):this.updateDisabledForms()}validate(){return this.templateConfigurationForm.valid?null:{templateConfiguration:{valid:!1}}}get notificationTapActionHint(){switch(this.notificationType){case Xi.ALARM:case Xi.ALARM_ASSIGNMENT:case Xi.ALARM_COMMENT:return this.translate.instant("notification.notification-tap-action-hint")}return""}expandedForm(t){return this.expendedBlocks.includes(t)}updateModel(t){this.propagateChange?this.propagateChange(t):this.propagateChangePending=!0}updateExpandedForm(){this.expendedBlocks=[],Object.keys(this.templateConfigurationForm.controls).forEach(t=>{this.templateConfigurationForm.get(t).invalid&&this.expendedBlocks.push(t)})}updateDisabledForms(){Object.values(Uo).forEach(t=>{let r=this.templateConfigurationForm.get(t);if(!r.get("enabled").value)r.disable({emitEvent:!1});else switch(r.enable({emitEvent:!1}),t){case Uo.WEB:r.get("additionalConfig.icon.enabled").updateValueAndValidity({onlySelf:!0});break;case Uo.MOBILE_APP:r.get("additionalConfig.icon.enabled").updateValueAndValidity({onlySelf:!0});break}})}buildForm(){let t=this.fb.group({});return Object.values(Uo).forEach(r=>{t.addControl(r,this.buildDeliveryMethodControl(r),{emitEvent:!1})}),t}buildDeliveryMethodControl(t){let r;switch(t){case Uo.WEB:r=this.fb.group({subject:["",[ke.required,ke.maxLength(150)]],body:["",[ke.required,ke.maxLength(250)]],additionalConfig:this.fb.group({icon:this.fb.group({enabled:[!1],icon:[{value:"notifications",disabled:!0},ke.required],color:[{value:"#757575",disabled:!0}]}),actionButtonConfig:[null]})}),r.get("additionalConfig.icon.enabled").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>{e?(r.get("additionalConfig.icon.icon").enable({emitEvent:!1}),r.get("additionalConfig.icon.color").enable({emitEvent:!1})):(r.get("additionalConfig.icon.icon").disable({emitEvent:!1}),r.get("additionalConfig.icon.color").disable({emitEvent:!1}))});break;case Uo.EMAIL:r=this.fb.group({subject:["",[ke.required,ke.maxLength(250)]],body:["",ke.required]});break;case Uo.SMS:r=this.fb.group({body:["",[ke.required,ke.maxLength(320)]]});break;case Uo.SLACK:r=this.fb.group({body:["",ke.required]});break;case Uo.MOBILE_APP:r=this.fb.group({subject:["",[ke.required,ke.maxLength(50)]],body:["",[ke.required,ke.maxLength(150)]],additionalConfig:this.fb.group({icon:this.fb.group({enabled:[!1],icon:[{value:"notifications",disabled:!0},ke.required],color:[{value:"#757575",disabled:!0}]}),onClick:[null]})}),r.get("additionalConfig.icon.enabled").valueChanges.pipe(Be(this.destroy$)).subscribe(e=>{e?(r.get("additionalConfig.icon.icon").enable({emitEvent:!1}),r.get("additionalConfig.icon.color").enable({emitEvent:!1})):(r.get("additionalConfig.icon.icon").disable({emitEvent:!1}),r.get("additionalConfig.icon.color").disable({emitEvent:!1}))});break;case Uo.MICROSOFT_TEAMS:r=this.fb.group({subject:[""],body:["",ke.required],themeColor:[""],button:[null]});break;default:throw new Error(`Not configured templated for notification delivery method: ${t}`)}return r.addControl("enabled",this.fb.control(!1),{emitEvent:!1}),r.addControl("method",this.fb.control(t),{emitEvent:!1}),r}};$h.\u0275fac=function(r){return new(r||$h)(h(Ai),h(Ge))}
220,$h.\u0275cmp=L({type:$h,selectors:[["tb-template-configuration"]],inputs:{predefinedDeliveryMethodsTemplate:"predefinedDeliveryMethodsTemplate",notificationType:"notificationType",interacted:"interacted"},features:[ne([{provide:ye,useExisting:he(()=>$h),multi:!0},{provide:zn,useExisting:he(()=>$h),multi:!0}])],decls:16,vars:16,consts:[[1,"tb-template-header"],["translate","",1,"tb-form-panel-title"],[1,"tb-form-panel-hint","tb-hint-available-params"],[1,"content"],["tb-help-popup-placement","bottom","trigger-style","letter-spacing:0.25px;font-size:12px;",3,"tb-help-popup","tb-help-popup-style","trigger-text"],[1,"tb-form-panel","no-border","no-padding",3,"formGroup"],["class","tb-form-panel tb-slide-toggle stroked",3,"formGroupName",4,"ngIf"],[1,"tb-form-panel","tb-slide-toggle","stroked",3,"formGroupName"],[1,"tb-settings",3,"expanded"],[1,"fill-width","flex","flex-row","flex-wrap"],[1,"template-tittle"],["matExpansionPanelContent","",1,"tb-extension-panel"],[1,"mat-block"],["translate",""],["matInput","","formControlName","subject"],[4,"ngIf"],["matInput","","cdkTextareaAutosize","","cols","1","cdkAutosizeMinRows","1","formControlName","body"],["formGroupName","additionalConfig",1,"tb-form-panel","no-padding","no-border"],["formGroupName","icon",1,"tb-form-row","space-between"],["formControlName","enabled",1,"mat-slide"],[1,"flex","flex-row","items-center","justify-start","gap-2"],["asBoxInput","","formControlName","icon",3,"color"],["asBoxInput","","formControlName","color"],["formControlName","actionButtonConfig",3,"actionTitle"],["formControlName","onClick","hideButtonText","",3,"sliderHint","actionTitle"],["subscriptSizing","dynamic",1,"mat-block"],["translate","",1,"tb-title","tb-required"],["formControlName","body",3,"init"],["class","tb-mat-error",4,"ngIf"],[1,"tb-mat-error"],[1,"tb-form-panel","no-padding","no-border"],[1,"tb-form-row","space-between"],["asBoxInput","","formControlName","themeColor"],["formControlName","button",3,"actionTitle"]],template:function(r,e){r&1&&(d(0,"section",0)(1,"div",1),g(2,"notification.customize-messages"),p(),d(3,"div",2)(4,"span",3),g(5),v(6,"translate"),p(),O(7,"span",4),v(8,"translate"),p()(),d(9,"section",5),x(10,l2e,9,6,"section",6)(11,h2e,9,6,"section",6)(12,_2e,9,6,"section",6)(13,x2e,9,6,"section",6)(14,E2e,9,6,"section",6)(15,D2e,9,6,"section",6),p()),r&2&&(l(5),z(C(6,11,"notification.input-fields-support-templatization")),l(2),te("tb-help-popup",e.NotificationTemplateTypeTranslateMap.get(e.notificationType).helpId),te("trigger-text",C(8,13,"notification.see-documentation")),m("tb-help-popup-style",hn(15,i2e)),l(2),m("formGroup",e.templateConfigurationForm),l(),m("ngIf",e.templateConfigurationForm.get("WEB.enabled").value),l(),m("ngIf",e.templateConfigurationForm.get("MOBILE_APP.enabled").value),l(),m("ngIf",e.templateConfigurationForm.get("SMS.enabled").value),l(),m("ngIf",e.templateConfigurationForm.get("EMAIL.enabled").value),l(),m("ngIf",e.templateConfigurationForm.get("SLACK.enabled").value),l(),m("ngIf",e.templateConfigurationForm.get("MICROSOFT_TEAMS.enabled").value))},dependencies:[ce,Ws,at,ze,At,to,ni,Yb,jo,Ss,Ts,Bl,ep,ut,xe,We,$e,Qe,Ka,G_,Js,kp,jt,In,Tx,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-template-header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:5;padding-bottom:12px;background-color:var(--mdc-dialog-container-color, white)}[_nghost-%COMP%]   .tb-template-header[_ngcontent-%COMP%]   .tb-hint-available-params[_ngcontent-%COMP%]{color:#0000008a;letter-spacing:.4px}[_nghost-%COMP%]   .tb-template-header[_ngcontent-%COMP%]   .tb-hint-available-params[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{vertical-align:middle}[_nghost-%COMP%]   .template-tittle[_ngcontent-%COMP%]{gap:12px;font-weight:400}[_nghost-%COMP%]   .template-tittle[_ngcontent-%COMP%]   tb-icon[_ngcontent-%COMP%]{color:#00000061}[_nghost-%COMP%]   .tb-mat-error[_ngcontent-%COMP%]{font-size:13px}[_nghost-%COMP%]   .tb-title[_ngcontent-%COMP%]{font-size:16px;line-height:24px}[_nghost-%COMP%]   .tb-title.tb-required[_ngcontent-%COMP%]:after{font-size:initial;content:"*"}[_nghost-%COMP%]   .tb-title.tb-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #f44336)}[_nghost-%COMP%]   .tb-title.tb-error.tb-required[_ngcontent-%COMP%]:after{color:var(--mdc-theme-error, #f44336)}[_nghost-%COMP%]     .tb-form-panel .mat-expansion-panel.tb-sett
220ings>.mat-expansion-panel-content>.mat-expansion-panel-body{gap:0}']});var Ex=$h;pe([fe(),le("design:type",Boolean)],Ex.prototype,"interacted",void 0);var A2e=["notificationTemplateStepper"];function O2e(n,t){n&1&&O(0,"mat-progress-bar",29)}function P2e(n,t){n&1&&(d(0,"mat-icon"),g(1,"check"),p())}function R2e(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"notification.setup"))}function F2e(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.name-required")," "))}function N2e(n,t){if(n&1&&(d(0,"mat-option",33),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b(2);m("value",r),l(),j(" ",C(2,2,e.notificationTemplateTypeTranslateMap.get(r).name)," ")}}function V2e(n,t){if(n&1&&(d(0,"mat-form-field",30)(1,"mat-label",15),g(2,"notification.type"),p(),d(3,"mat-select",31),x(4,N2e,3,4,"mat-option",32),p()()),n&2){let r=b();l(4),m("ngForOf",r.notificationTypes)}}function L2e(n,t){if(n&1&&(d(0,"section",34)(1,"mat-slide-toggle",35),g(2),v(3,"translate"),p()()),n&2){let r=t.$implicit,e=b();m("formGroupName",r),l(2),j(" ",C(3,2,e.notificationDeliveryMethodInfoMap.get(r).name)," ")}}function B2e(n,t){if(n&1&&(d(0,"div",38)(1,"tb-report-template-autocomplete",39)(2,"span",40),g(3),v(4,"translate"),p()(),O(5,"tb-entity-autocomplete",41)(6,"tb-timezone-select",42),p()),n&2){let r=b
220(2);l(),m("type",r.ReportTemplateType.REPORT),l(2),z(C(4,3,"report-template.report-template-required")),l(2),m("entityType",r.entityType.USER)}}function j2e(n,t){if(n&1&&(d(0,"div",24)(1,"mat-slide-toggle",36)(2,"div",37),v(3,"translate"),g(4," notification.attach-report "),p()(),x(5,B2e,7,5,"div",38),p()),n&2){let r=b();l(2),te("tb-hint-tooltip-icon",C(3,2,"notification.attach-report-hint")),l(3),_t(r.templateNotificationForm.get("configuration.attachReport").value?5:-1)}}function G2e(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"notification.compose"))}function z2e(n,t){if(n&1&&(d(0,"form",43),O(1,"tb-template-configuration",44),p()),n&2){let r=b(),e=me(35);m("formGroup",r.notificationTemplateConfigurationForm),l(),m("notificationType",r.templateNotificationForm.get("notificationType").value)("predefinedDeliveryMethodsTemplate",r.deliveryConfiguration)("interacted",e.interacted)}}function $2e(n,t){if(n&1){let r=B();d(0,"button",45),T("click",function(){D(r);let i=b();return M(i.backStep())}),g(1),v(2,"translate"),p()}n&2&&(l(),z(C(2,1,"action.back")))}function U2e(n,t){if(n&1){let r=B();d(0,"button",46),T("click",function(){D(r);let i=b();return M(i.nextStep())}),g(1),v(2,"translate"),p()}if(n&2){let r=b();l(),z(C(2,1,r.nextStepLabel()))}}var mY=(()=>{let t=class t extends cY{constructor(e,i,o,a,s,c,u,f){super(e,i,o,c),this.store=e,this.router=i,this.dialogRef=o,this.data=a,this.breakpointObserver=s,this.fb=c,this.notificationService=u,this.translate=f,this.dialogTitle="notification.edit-notification-template",this.selectedIndex=0,this.hideSelectType=!1,this.notificationTypes=this.allowNotificationType(),this.stepperOrientation=this.breakpointObserver.observe(cl["gt-sm"]).pipe(W(({matches:_})=>_?"horizontal":"vertical")),De(this.data?.predefinedType)&&(this.hideSelectType=!0,this.templateNotificationForm.get("notificationType").setValue(this.data.predefinedType,{emitEvent:!1})),De(this.data?.name)&&this.templateNotificationForm.get("name").setValue(this.data.name,{emitEvent:!1}),(a.isAdd||a.isCopy)&&(this.dialogTitle="notification.add-notification-template"),this.templateNotification=Di(this.data.template),this.templateNotification&&(this.isSysAdmin()&&this.notificationTypes.push(Xi.USER_REGISTERED,Xi.USER_ACTIVATED),this.data.isCopy?this.templateNotification.name+=` (${this.translate.instant("action.copy")})`:this.templateNotificationForm.get("notificationType").disable({emitEvent:!1}),this.templateNotificationForm.reset({},{emitEvent:!1}),this.templateNotificationForm.patchValue(this.templateNotification,{emitEvent:!1}),this.notificationTemplateConfigurationForm.patchValue({deliveryMethodsTemplates:this.templateNotification.configuration.deliveryMethodsTemplates},{emitEvent:!1}),this.deliveryConfiguration=this.templateNotificationForm.get("configuration.deliveryMethodsTemplates").value),a?.readonly?(this.dialogTitle="notification.view-notification-template",this.templateNotificationForm.disable({emitEvent:!1}),Array.from(this.deliveryMethodFormsMap.values()).map(_=>_.disable({emitEvent:!1}))):(this.updateValidators(),this.updateAttachReportValidators())}ngOnDestroy(){super.ngOnDestroy(),this.destroy$.next(),this.destroy$.complete()}cancel(){this.dialogRef.close(null)}changeStep(e){this.selectedIndex=e.selectedIndex,e.previouslySelectedIndex>e.selectedIndex&&(e.previouslySelectedStep.interacted=!1)}backStep(){this.notificationTemplateStepper.previous()}nextStep(){this.selectedIndex>=this.maxStepperIndex?this.add():this.notificationTemplateStepper.next()}nextStepLabel(){return this.selectedIndex>=this.maxStepperIndex&&this.selectedIndex!==0?this.data.isAdd||this.data.isCopy?"action.add":"action.save":"action.next"}get maxStepperIndex(){return this.notificationTemplateStepper?._steps?.length-1}add(){if(this.allValid()){let e=this.getNotificationTemplateValue();this.templateNotification&&!this.data.isCopy&&(e=re(re({},this.templateNotification),e)),this.notificationService.saveNotificationTemplate(e).subscribe(i=>this.dialogRef.close(i))}}allValid(){return!this.notificationTemplateStepper.steps.find((e,i)=>e.stepControl.invalid?(e.interacted=!0,this.notificationTemplateStepper.selectedIndex=i,!0):!1)}allowNotificationType(){let e=new Set([Xi.ENTITIES_LIMIT,Xi.API_USAGE_LIMIT,Xi.NEW_PLATFORM_VERSION,Xi.RATE_LIMITS,Xi.TASK_PROCESSING_FAILURE,Xi.RESOURCES_SHORTAGE]);return this.isSysAdmin()?[Xi.GENERAL,...e]:Object.values(Xi).filter(i=>!e.has(i))}};
220t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(en),h(un),h(qa),h(Ai),h(gh),h(Ge))},t.\u0275cmp=L({type:t,selectors:[["tb-template-notification-dialog"]],viewQuery:function(i,o){if(i&1&&ae(A2e,7),i&2){let a;Q(a=K())&&(o.notificationTemplateStepper=a.first)}},features:[Ce],decls:43,vars:23,consts:[["notificationTemplateStepper",""],["composeStep","matStep"],["color","primary"],[1,"flex-1"],["tb-help","templateNotifications"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["mat-dialog-content",""],["linear","","labelPosition","end",3,"selectionChange","orientation"],["matStepperIcon","edit"],[3,"stepControl"],["matStepLabel",""],[2,"padding-bottom","16px",3,"formGroup"],[1,"mat-block"],["translate",""],["matInput","","formControlName","name","required",""],[4,"ngIf"],["class","mat-block flex-1",4,"ngIf"],["formGroupName","configuration"],[1,"tb-title","tb-required"],["translate","",1,"tb-hint"],["formGroupName","deliveryMethodsTemplates",1,"delivery-methods-container"],["class","tb-form-panel stroked",3,"formGroupName",4,"ngFor","ngForOf"],[1,"tb-form-panel","stroked","no-padding-bottom","no-gap"],["matStepContent",""],["mat-dialog-actions","",1,"tb-dialog-actions"],["mat-stroked-button","",3,"click",4,"ngIf"],["mat-raised-button","","color","primary",3,"click",4,"ngIf"],["color","warn","mode","indeterminate"],[1,"mat-block","flex-1"],["formControlName","notificationType"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"tb-form-panel","stroked",3,"formGroupName"],["formControlName","enabled"],["formControlName","attachReport",1,"toggle"],["translate","",3,"tb-hint-tooltip-icon"],[1,"tb-form-panel","outlined"],["required","","appearance","outline","formControlName","reportTemplateId",3,"type"],["tb-error",""],["appearance","outline","required","","useFullEntityId","","formControlName","userId",3,"entityType"],["appearance","outline","userTimezoneByDefault","","required","","formControlName","timezone"],[3,"formGroup"],["formControlName","deliveryMethodsTemplates",3,"notificationType","predefinedDeliveryMethodsTemplate","interacted"],["mat-stroked-button","",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-toolbar",2)(1,"h2"),g(2),v(3,"translate"),p(),O(4,"span",3)(5,"div",4),d(6,"button",5),T("click",function(){return D(a),M(o.cancel())}),d(7,"mat-icon",6),g(8,"close"),p()()(),x(9,O2e,1,0,"mat-progress-bar",7),v(10,"async"),d(11,"div",8)(12,"mat-horizontal-stepper",9,0),v(14,"async"),T("selectionChange",function(c){return D(a),M(o.changeStep(c))}),x(15,P2e,2,0,"ng-template",10),d(16,"mat-step",11),x(17,R2e,2,3,"ng-template",12),d(18,"form",13)(19,"mat-form-field",14)(20,"mat-label",15),g(21,"notification.name"),p(),O(22,"input",16),x(23,F2e,3,3,"mat-error",17),p(),x(24,V2e,5,1,"mat-form-field",18),d(25,"section",19)(26,"label",20),g(27),v(28,"translate"),p(),d(29,"div",21),g(30,"notification.at-least-one-should-be-selected"),p(),d(31,"section",22),x(32,L2e,4,4,"section",23),p(),x(33,j2e,6,4,"div",24),p()()(),d(34,"mat-step",11,1),x(36,G2e,2,3,"ng-template",12)(37,z2e,2,4,"ng-template",25),p()()(),O(38,"mat-divider"),d(39,"div",26),x(40,$2e,3,3,"button",27),O(41,"span",3),x(42,U2e,3,3,"button",28),p()}i&2&&(l(2),z(C(3,15,o.dialogTitle)),l(7),m("ngIf",C(10,17,o.isLoading$)),l(3),m("orientation",C(14,19,o.stepperOrientation)),l(4),m("stepControl",o.templateNotificationForm),l(2),m("formGroup",o.templateNotificationForm),l(5),m("ngIf",o.templateNotificationForm.get("name").hasError("required")),l(),m("ngIf",!o.hideSelectType),l(2),Y("tb-error",o.templateNotificationForm.get("configuration.deliveryMethodsTemplates").hasError("atLeastOne")),l(),z(C(28,21,"notification.delivery-methods")),l(5),m("ngForOf",o.notificationDeliveryMethods),l(),_t(!o.isSysAdmin()&&o.templateNotificationForm.get("notificationType").value!==o.notificationType.REPORT_GENERATED?33:-1),l(),m("stepControl",o.notificationTemplateConfigurationForm),l(6),m("ngIf",o.selectedIndex>
2200),l(2),m("ngIf",!o.data.readonly||o.selectedIndex<o.maxStepperIndex))},dependencies:[Ke,ce,Ms,$l,Na,yt,Pe,Se,Jr,at,ze,At,ni,ir,gr,Dn,Kn,xt,la,jo,zu,np,Cm,m_,u_,ur,ut,xe,We,St,$e,Qe,Ka,jt,Hs,Bp,Ex,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{width:780px;height:100%;max-width:100%;max-height:100vh;display:grid;grid-template-rows:min-content 4px minmax(auto,1fr) min-content min-content}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .mat-mdc-dialog-content[_ngcontent-%COMP%]{grid-row:3;display:flex;flex-direction:column;height:100%;padding:0;color:#000000de}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .tb-dialog-actions[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-dialog-actions[_ngcontent-%COMP%]{grid-row:5;display:flex}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .mat-divider[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .mat-divider[_ngcontent-%COMP%]{grid-row:4}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .tb-title[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-title[_ngcontent-%COMP%]{font-size:16px;line-height:24px}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .tb-title.tb-required[_ngcontent-%COMP%]:after, .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-title.tb-required[_ngcontent-%COMP%]:after{font-size:initial;content:"*"}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .tb-title.tb-error[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-title.tb-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #f44336)}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .tb-title.tb-error.tb-required[_ngcontent-%COMP%]:after, .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-title.tb-error.tb-required[_ngcontent-%COMP%]:after{color:var(--mdc-theme-error, #f44336)}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .toggle[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .toggle[_ngcontent-%COMP%]{margin-bottom:16px}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .tb-hint[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .tb-hint[_ngcontent-%COMP%]{padding:0 0 8px}.tb-fullscreen-dialog   .mat-mdc-dialog-container[_nghost-%COMP%]   .delivery-methods-container[_ngcontent-%COMP%], .tb-fullscreen-dialog   .mat-mdc-dialog-container   [_nghost-%COMP%]   .delivery-methods-container[_ngcontent-%COMP%]{margin-bottom:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,auto));gap:8px}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-stepper-horizontal{display:flex;height:100%;overflow:hidden}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-stepper-horizontal .mat-horizontal-stepper-wrapper{flex:1 1 100%;width:100%}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-stepper-horizontal .mat-horizontal-content-container{height:550px;max-height:100%;width:100%;overflow-y:auto;scrollbar-gutter:stable}@media screen and (min-width: 960px){[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-stepper-horizontal .mat-horizontal-content-container{min-width:500px}}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-stepper-horizontal .mat-horizontal-stepper-content[aria-expanded=true]{height:100%;position:relative}[_nghost-%COMP%]     .mat-radio-group{display:flex;flex-direction:row;margin-bottom:8px}[_nghost-%COMP%]     .mat-radio-group .mat-radio-button{flex:1 1 100%;padding:14px;border:1px solid rgba(0,0,0,.12);border-radius:6px}[_nghost-%COMP%]     .mat-radio-group .mat-radio-button .mat-radio-label{white-space:break-spaces;align-items:start}[_nghost-%COMP%]     .mat-radio-group .mat-radio-button:not(:last-child){margin-bottom:8px}[_nghost-%COMP%]     .mat-radio-group .mat-radio-button.mat-radio-checked{border-color:var(--tb-accent-500)}[_nghost-%COMP%]     .mat-form-field .mat-form-field-wrapper{padding-bottom:0}[_nghost-%COMP%]     .mat-form-field .mat-form-field-wrapper .mat-form-field-underline{position:initial!important;display:block;margin-top:-1px}[_nghost-%COMP%]     .mat-form-field .mat-form-field-wrapper .mat-form-field-subscript-wrapper, [_nghost-%COMP%]     .mat-form-field .mat-form-field-wrapper .mat-form-field-ripple{position:initial!important;display:table}[_nghost-%COMP%]     .mat-form-field .mat-form-field-wrapper .mat-form-field-subscript-wrapper{min-height:calc(1em + 1px)}']});let n=t;return n})();var H2e=["templateInput"],q2e=n=>({template:n});function W2e(n,t){if(n&1){let r=B();d(0,"button",14),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",15),g(2,"close"),p()()}}function Y2e(n,t){if(n&1){let r=B();d(0,"button",16),v(1,"translate"),T("click",function(i){D(r);let o=b();return M(o.editTemplate(i))}),d(2,"mat-icon",15),g(3,"edit"),p()()}n&2&&te("matTooltip",C(1,1,"notification.edit-notification-template"))}function Q2e(n,t){if(n&1){let r=B();d(0,"button",17,2),T("click",function(i){D(r);let o=me(1),a=b();return M(a.createTemplate(i,o))}),d(2,"span",18),g(3),v(4,"translate"),p()()}n&2&&(l(3),z(C(4,1,"notification.create-new")))}function K2e(n,t){if(n&1&&(d(0,"mat-chip",22),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b(2);l(),j(" ",C(2,1,e.notificationDeliveryMethodInfoMap.get(r.key).name)," ")}}function X2e(n,t){if(n&1&&(d(0,"mat-option",19),O(1,"span",20),v(2,"highlight"),d(3,"mat-chip-set"),x(4,K2e,3,3,"mat-chip",21),v(5,"keyvalue"),p()()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,3,r.name,e.searchText),Ut),l(3),m("ngForOf",C(5,6,r.configuration.deliveryMethodsTemplates))}}function Z2e(n,t){n&1&&(d(0,"div")(1,"span",5),g(2,"notification.no-notification-templates"),p()())}function J2e(n,t){if(n&1){let r=B();d(0,"span")(1,"a",26),T("click",function(i){D(r);let o=b(3);return M(o.createTemplateByName(i,o.searchText))}),g(2,"notification.create-new-template"),p()()}}function eAe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"translate"),p(),x(3,J2e,3,0,"span",13)),n&2){let r=b
220(2);l(),z(ft(2,2,"notification.no-template-matching",Xe(5,q2e,r.truncate.transform(r.searchText,!0,6,"...")))),l(2),m("ngIf",r.allowCreate)}}function tAe(n,t){if(n&1){let r=B();d(0,"mat-option",23)(1,"div",24),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,Z2e,3,0,"div",25)(3,eAe,4,7,"ng-template",null,3,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function iAe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"notification.template-required")," "))}var O0=class O0{get notificationTypes(){return this.notificationTypeValue}set notificationTypes(t){t!==this.notificationTypeValue&&(this.notificationTypeValue=t,this.reset())}constructor(t,r,e,i,o,a,s){this.store=t,this.translate=r,this.truncate=e,this.entityService=i,this.notificationService=o,this.fb=a,this.dialog=s,this.notificationDeliveryMethodInfoMap=vy,this.allowCreate=!1,this.allowEdit=!1,this.appearance="fill",this.searchText="",this.dirty=!1,this.propagateChange=c=>{},this.selectTemplateFormGroup=this.fb.group({templateName:[null]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.required&&(this.selectTemplateFormGroup.get("templateName").addValidators(ke.required),this.selectTemplateFormGroup.get("templateName").updateValueAndValidity({emitEvent:!1})),this.filteredTemplate=this.selectTemplateFormGroup.get("templateName").valueChanges.pipe(Wi(150),et(t=>{let r;typeof t=="string"||!t?r=null:r=t.id,this.updateView(r),t===null&&this.clear()}),W(t=>t?typeof t=="string"?t:t.name:""),ii(t=>this.fetchTemplate(t)),Si())}setDisabledState(t){this.disabled=t,this.disabled?this.selectTemplateFormGroup.disable({emitEvent:!1}):this.selectTemplateFormGroup.enable({emitEvent:!1})}textIsNotEmpty(t){return t&&t.length>0}writeValue(t){this.searchText="",t!=null?this.notificationService.getNotificationTemplateById(t.id,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:r=>{this.modelValue=r.id,this.selectTemplateFormGroup.get("templateName").patchValue(r,{emitEvent:!1})},error:()=>{this.modelValue=null,this.selectTemplateFormGroup.get("templateName").patchValue("",{emitEvent:!1}
220),t!==null&&this.propagateChange(this.modelValue)}}):(this.modelValue=null,this.selectTemplateFormGroup.get("templateName").patchValue("",{emitEvent:!1})),this.dirty=!0}onFocus(){this.dirty&&(this.selectTemplateFormGroup.get("templateName").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}displayTemplateFn(t){return t?t.name:void 0}clear(){this.selectTemplateFormGroup.get("templateName").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.templateInput.nativeElement.blur(),this.templateInput.nativeElement.focus()},0)}editTemplate(t){t&&t.stopPropagation(),this.notificationService.getNotificationTemplateById(this.modelValue.id).subscribe(r=>{this.openNotificationTemplateDialog({template:r})})}createTemplate(t,r){t?.stopPropagation(),r._elementRef.nativeElement.blur(),this.createTemplateByName(t)}createTemplateByName(t,r){t?.stopPropagation(),this.openNotificationTemplateDialog({isAdd:!0,predefinedType:this.notificationTypes,name:r})}openNotificationTemplateDialog(t){this.dialog.open(mY,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:t}).afterClosed().subscribe(r=>{r&&this.selectTemplateFormGroup.get("templateName").patchValue(r)})}updateView(t){Fn(this.modelValue,t)||(this.modelValue=t,this.propagateChange(this.modelValue))}fetchTemplate(t){this.searchText=t;let r=new On(10,0,t,{property:"name",direction:Xn.ASC});return this.notificationService.getNotificationTemplates(r,this.notificationTypes,{ignoreLoading:!0}).pipe(vt(()=>Z(yr())),W(e=>e.data))}reset(){this.selectTemplateFormGroup.get("templateName").patchValue("",{emitEvent:!1}),this.updateView(null),this.dirty=!0}};O0.\u0275fac=function(r){return new(r||O0)(h(ve),h(Ge),h($o),h(rr),h(gh),h(Ai),h(Lr))},O0.\u0275cmp=L({type:O0,selectors:[["tb-template-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(H2e,7),r&2){let i;Q(i=K())&&(e.templateInput=i.first)}},inputs:{required:"required",allowCreate:"allowCreate",allowEdit:"allowEdit",appearance:"appearance",disabled:"disabled",notificationTypes:"notificationTypes"},features:[ne([{provide:ye,useExisting:he(()=>O0),multi:!0}])],decls:15,vars:15,consts:[["templateInput",""],["templateAutocomplete","matAutocomplete"],["createTemplateButton",""],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","appearance"],["translate",""],["matInput","","type","text","formControlName","templateName",3,"focusin","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Edit","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["type","button","mat-button","","color","primary","matSuffix","",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],["class","template-option",3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],["type","button","matSuffix","","mat-icon-button","","aria-label","Edit","matTooltipPosition","above",3,"click","matTooltip"],["type","button","mat-button","","color","primary","matSuffix","",3,"click"],[2,"white-space","nowrap"],[1,"template-option",3,"value"],[1,"template-option-name",3,"innerHTML"],["disabled","",4,"ngFor","ngForOf"],["disabled",""],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate","",3,"click"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",4)(1,"mat-label",5),g(2,"notification.template"),p(),d(3,"input",6,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(5,W2e,3,0,"button",7)(6,Y2e,4,3,"button",8)(7,Q2e,5,3,"button",9),d(8,"mat-autocomplete",10,1),x(10,X2e,6,8,"mat-option",11),v(11,"async"),x(12,tAe,5,3,"mat-option",12),v(13,"async"),p(),x(14,iAe,3,3,"mat-error",13),p()}if(r&2){let i,o,a=me(9);m("formGroup",e.selectTemplateFormGroup)("appearance",e.appearance),l(3),m("required",e.required)("matAutocomplete",a),l(2),m("ngIf",e.selectTemplateFormGroup.get("templateName").value&&!e.disabled),l(),m("ngIf",((i=e.selectTemplateFormGroup.get("templateName").value)==null?null:i.id)&&!e.disabled&&e.allowEdit),l(),m("ngIf",e.allowCreate&&!e.selectTemplateFormGroup.get("templateName").value&&!e.disabled),l(),m("displayWith",e.displayTemplateFn),l(2),m("ngForOf",C(11,11,e.filteredTemplate)),l(2),m("ngIf",!((o=C(13,13,e.filteredTemplate))!=null&&o.length)),l(2),m("ngIf",e.selectTemplateFormGroup.get("templateName").hasError("required"))}},dependencies:[Ke,ce,jt,yt,Pe,Se,at,ze,At,ni,Yt,xt,zt,Ri,mi,wl,Xc,ut,xe,We,St,$e,Qe,Ve,EB,be,Mi],styles:[`@charset "UTF-8";.template-option .mdc-list-item__primary-text{display:flex;flex-direction:row;align-items:center}.template-option .template-option-name{margin-right:8px}.template-option .mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:1}
221`],encapsulation:2});var au=O0;pe([fe(),le("design:type",Boolean)],au.prototype,"required",void 0);pe([fe(),le("design:type",Object)],au.prototype,"allowCreate",void 0);pe([fe(),le("design:type",Object)],au.prototype,"allowEdit",void 0);var pAe={};Ae(pAe,{SlackConversationAutocompleteComponent:()=>sM});y();var rAe=["slackInput"];function oAe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",11),g(2,"close"),p()()}}function aAe(n,t){if(n&1&&(d(0,"mat-option",12),O(1,"span",13),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.title,e.slackSearchText),Ut)}}function sAe(n,t){n&1&&(d(0,"div")(1,"span",17),g(2,"notification.not-found-slack-recipient"),p()())}
221function lAe(n,t){if(n&1&&(d(0,"span"),g(1),p()),n&2){let r=b(2);l(),j("Not slack recipient matches ",r.truncate.transform(r.slackSearchText,!0,6,"..."),"")}}function cAe(n,t){if(n&1){let r=B();d(0,"mat-option",14)(1,"div",15),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,sAe,3,0,"div",16)(3,lAe,2,1,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.slackSearchText))("ngIfElse",r)}}function dAe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.requiredText," ")}}var sM=(()=>{let t=class t{get required(){return this.requiredValue}set required(e){this.requiredValue=mt(e)}constructor(e,i,o,a,s,c){this.store=e,this.translate=i,this.truncate=o,this.entityService=a,this.notificationService=s,this.fb=c,this.labelText=this.translate.instant("notification.conversation"),this.requiredText=this.translate.instant("notification.conversation-required"),this.slackSearchText="",this.dirty=!1,this.latestSearchConversetionResult=null,this.slackConversetionFetchObservable$=null,this.propagateChange=u=>{},this.conversationSlackFormGroup=this.fb.group({conversation:[""]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.required&&(this.conversationSlackFormGroup.get("conversation").addValidators(ke.required),this.conversationSlackFormGroup.get("conversation").updateValueAndValidity({emitEvent:!1})),this.slackConversation$=this.conversationSlackFormGroup.get("conversation").valueChanges.pipe(Wi(150),et(e=>{let i;typeof e=="string"||!e?i=null:i=e,this.updateView(i),e===null&&this.clear()}),W(e=>e?typeof e=="string"?e:e.title:""),ii(e=>this.fetchSlackConversation(e)),Si())}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&(i==="slackChanelType"||i==="token")&&(this.clearSlackCache(),this.dirty=!0,this.conversationSlackFormGroup.get("conversation").patchValue(""))}}setDisabledState(e){this.disabled=e,this.disabled?this.conversationSlackFormGroup.disable({emitEvent:!1}):this.conversationSlackFormGroup.enable({emitEvent:!1})}textIsNotEmpty(e){return e&&e.length>0}writeValue(e){this.slackSearchText="",e!=null?(this.modelValue=e,this.conversationSlackFormGroup.get("conversation").patchValue(e,{emitEvent:!1})):(this.modelValue=null,this.conversationSlackFormGroup.get("conversation").patchValue("",{emitEvent:!1})),this.dirty=!0}onFocus(){this.dirty&&(this.dirty=!1,this.conversationSlackFormGroup.get("conversation").updateValueAndValidity({onlySelf:!0,emitEvent:!0}))}updateView(e){Fn(this.modelValue,e)||(this.modelValue=e,this.propagateChange(this.modelValue))}displaySlackConversationFn(e){return e?e.title:void 0}fetchSlackConversation(e){if(this.dirty)return Z([]);if(this.slackSearchText!==e||this.latestSearchConversetionResult===null){this.slackSearchText=e;let i=this.createSlackConversationFilter(this.slackSearchText);return this.getSlackConversationByType().pipe(W(o=>o.filter(i)),et(o=>this.latestSearchConversetionResult=o))}return Z(this.latestSearchConversetionResult)}getSlackConversationByType(){if(this.slackConversetionFetchObservable$===null){let e;this.slackChanelType?e=this.notificationService.listSlackConversations(this.slackChanelType,this.token,{ignoreLoading:!0}):e=Z([]),this.slackConversetionFetchObservable$=e.pipe(vt(()=>Z([])),Si({connector:()=>new or(1),resetOnError:!1,resetOnComplete:!1,resetOnRefCountZero:!1}))}return this.slackConversetionFetchObservable$}createSlackConversationFilter(e){let i=e.toLowerCase();return o=>o.title.toLowerCase().includes(i)}clearSlackCache(){this.latestSearchConversetionResult=null,this.slackConversetionFetchObservable$=null}clear(){this.conversationSlackFormGroup.get("conversation").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.slackInput.nativeElement.blur(),this.slackInput.nativeElement.focus()},0)}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Ge),h($o),h(rr),h(gh),h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-slack-conversation-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(rAe,7),i&2){let a;Q(a=K())&&(o.slackInput=a.first)}},inputs:{labelText:"labelText",requiredText:"requiredText",required:"required",disabled:"disabled",slackChanelType:"slackChanelType",token:"token"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),lt],decls:13,vars:13,consts:[["slackInput",""],["slackAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","conversation",3,"focusin","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],["class","template-option",3,"value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[1,"template-option",3,"value"],[3,"innerHTML"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"],[4,"ngIf","ngIfElse"],["translate",""]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-label"),g(2),p(),d(3,"input",4,0),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(5,oAe,3,0,"button",5),d(6,"mat-autocomplete",6,1),x(8,aAe,3,5,"mat-option",7),v(9,"async"),x(10,cAe,5,3,"mat-option",8),v(11,"async"),p(),x(12,dAe,2,1,"mat-error",9),p()}if(i&2){let a,s=me(7);m("formGroup",o.conversationSlackFormGroup),l(2),z(o.labelText),l(
221),m("required",o.required)("matAutocomplete",s),l(2),m("ngIf",o.conversationSlackFormGroup.get("conversation").value&&!o.disabled),l(),m("displayWith",o.displaySlackConversationFn),l(2),m("ngForOf",C(9,9,o.slackConversation$)),l(2),m("ngIf",!((a=C(11,11,o.slackConversation$))!=null&&a.length)),l(2),m("ngIf",o.conversationSlackFormGroup.get("conversation").hasError("required"))}},dependencies:[Ke,ce,jt,Pe,Se,at,ze,At,ni,Yt,xt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,Mi],styles:['@charset "UTF-8";  .slack-option .mat-option-text{display:flex;flex-direction:row;align-items:center;margin-bottom:4px}']});let n=t;return n})();var mAe={};Ae(mAe,{ShortNumberPipe:()=>Ix});y();var Ix=(()=>{let t=class t{transform(e,i){if(isNaN(e)||e===null||e===0)return 0;let o=Math.abs(e),a=Math.pow(10,1),s=e<0,c=i&&i.long,u="",f=[{key:"Q",longKey:" quadrillion",value:Math.pow(10,15)},{key:"T",longKey:" trillion",value:Math.pow(10,12)},{key:"B",longKey:" billion",value:Math.pow(10,9)},{key:"M",longKey:" million",value:Math.pow(10,6)},{key:"K",longKey:" thousand",value:1e3}];for(let _=0;_<f.length;_++){let I=o/f[_].value;if(I=Math.round(I*a)/a,I>=1){o=I,u=c?f[_].longKey:f[_].key;break}}return(s?"-":"")+o+u}};t.\u0275fac=function(i){return new(i||t)},t.\u0275pipe=_r({name:"shortNumber",type:t,pure:!0});let n=t;return n})();var _Ae={};Ae(_Ae,{RuleChainSelectComponent:()=>Uh});y();y();var uAe=["ruleChainInput"],hAe=n=>({entity:n});function fAe(n,t){n&1&&(d(0,"mat-icon"),g(1,"check"),p())}function gAe(n,t){if(n&1&&(d(0,"mat-option",8),x(1,fAe,2,0,"mat-icon",9),O(2,"span",10),v(3,"highlight"),p()),n&2){let r=t.$implicit,e=b();Y("tb-selected-option",e.ruleChainId===r.id.id),m("value",r),l(),m("ngIf",e.ruleChainId===r.id.id),l(),m("innerHTML",nS(3,5,r.name,e.searchText,!0),Ut)}}function bAe(n,t){if(n&1){let r=B();d(0,"mat-option",11)(1,"div",12),T("click",function(i){return D(r),M(i.stopPropagation())}),d(2,"span"),g(3),v(4,"translate"),p()()()}if(n&2){let r=b();m("value",null),l(3),j(" ",ft(4,2,"rulechain.no-rulechains-matching",Xe(5,hAe,r.searchText))," ")}}var MV=new tt("RuleChainSelectPanelData"),kx=(()=>{let t=class t{constructor(e,i,o,a){this.data=e,this.overlayRef=i,this.fb=o,this.ruleChainService=a,this.searchText="",this.ruleChainSelected=!1,this.dirty=!1,this.ruleChainId=e.ruleChainId,this.ruleChainType=e.ruleChainType,this.selectRuleChainGroup=this.fb.group({ruleChainInput:["",{nonNullable:!0}]}),this.filteredRuleChains=this.selectRuleChainGroup.get("ruleChainInput").valueChanges.pipe(Wi(150),on(""),xr((s,c)=>s.trim()===c.trim()),ii(s=>this.fetchRuleChains(s)),Si())}ngAfterViewInit(){setTimeout(()=>{this.userInput.nativeElement.focus()},0)}selected(e){this.clear(),this.ruleChainSelected=!0,e.option.value?.id&&(this.result=e.option.value),this.overlayRef.dispose()}fetchRuleChains(e){this.searchText=e;let i=new On(50,0,e,{property:"name",direction:Xn.ASC});return this.getRuleChains(i).pipe(vt(()=>Z(yr())),W(o=>o.data))}onFocus(){this.dirty||(this.selectRuleChainGroup.get("ruleChainInput").updateValueAndValidity({onlySelf:!0}),this.dirty=!0)}clear(){this.selectRuleChainGroup.get("ruleChainInput").patchValue("",{emitEvent:!0}),setTimeout(()=>{this.userInput.nativeElement.blur(),this.userInput.nativeElement.focus()},0)}getRuleChains(e){return this.ruleChainService.getRuleChains(e,this.ruleChainType,{ignoreLoading:!0})}};t.\u0275fac=function(i){return new(i||t)(h(MV),h(qd),h(Ai),h(vp))},t.\u0275cmp=L({type:t,selectors:[["tb-rule-chain-select-panel"]],viewQuery:function(i,o){if(i&1&&ae(uAe,7),i&2){let a;Q(a=K())&&(o.userInput=a.first)}},decls:12,vars:11,consts:[["ruleChainInput",""],["ruleChainAutocomplete","matAutocomplete"],[1,"mat-block",3,"formGroup"],["matInput","","type","text","formControlName","ruleChainInput",3,"focusin","placeholder","matAutocomplete"],["matSuffix",""],[1,"tb-autocomplete","tb-rule-chain-search",3,"optionSelected"],[3,"tb-selected-option","value",4,"ngFor","ngForOf"],["class","tb-not-found",3,"value",4,"ngIf"],[3,"value"],[4,"ngIf"],[3,"innerHTML"],[1,"tb-not-found",3,"value"],[1,"tb-not-found-content",3,"click"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"input",3,0),v(3,"translate"),T("focusin",function(){return D(a),M(o.onFocus())}),p(),d(4,"mat-icon",4),g(5,"search"),p(),d(6,"mat-autocomplete",5,1),T("optionSelected",function(c){return D(a),M(o.selected(c))}),x(8,gAe,4,9,"mat-option",6),v(9,"async"),x(10,bAe,5,7,"mat-option",7),v(11,"async"),p()()}if(i&2){let a,s=me(7);m("formGroup",o.selectRuleChainGroup),l(),te("placeholder",C(3,5,"rulechain.search")),m("matAutocomplete",s),l(7),m("ngForOf",C(9,7,o.filteredRuleChains)),l(2),m("ngIf",!((a=C(11,9,o.filteredRuleChains))!=null&&a.length))}},dependencies:[Ke,ce,Se,at,ze,Yt,xt,Ri,mi,ut,xe,We,$e,Qe,Ve,be,Mi],styles:['@charset "UTF-8";[_nghost-%COMP%]{width:100%}  .tb-autocomplete.tb-rule-chain-search .mat-mdc-option.tb-selected-option{dis
221play:flex;flex-direction:row-reverse;background-color:#0000000a}  .tb-autocomplete.tb-rule-chain-search .mat-mdc-option.tb-selected-option mat-icon{margin-right:0;margin-left:16px;color:var(--tb-primary-500)}  .tb-autocomplete.tb-rule-chain-search .mat-mdc-option.tb-selected-option .mdc-list-item__primary-text{color:var(--tb-primary-500)}']});let n=t;return n})();var P0=class P0{constructor(t,r){this.overlay=t,this.viewContainerRef=r,this.tooltipPosition="above",this.ruleChainType=vd.CORE,this.panelOpened=!1,this.propagateChange=e=>{}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){De(t)&&(this.ruleChain=t)}ruleChainIdChanged(){this.updateView()}openRuleChainSelectPanel(t){if(t&&t.stopPropagation(),!this.disabled){let r=t.currentTarget,e=new Ha({panelClass:"tb-filter-panel",backdropClass:"cdk-overlay-transparent-backdrop",hasBackdrop:!0,width:r.offsetWidth});e.positionStrategy=this.overlay.position().flexibleConnectedTo(r).withPositions([Vo.bottom]);let i=this.overlay.create(e);i.backdropClick().subscribe(()=>{i.dispose()});let o=[{provide:MV,useValue:{ruleChainId:this.ruleChain.id?.id,ruleChainType:this.ruleChainType}},{provide:qd,useValue:i}],a=Mn.create({parent:this.viewContainerRef.injector,providers:o}),s=i.attach(new $a(kx,this.viewContainerRef,a));this.panelOpened=!0,s.onDestroy(()=>{this.panelOpened=!1,s.instance.ruleChainSelected&&(this.ruleChain=s.instance.result,this.updateView())})}}updateView(){this.propagateChange(this.ruleChain)}};P0.\u0275fac=function(r){return new(r||P0)(h(Vr),h(ci))},P0.\u0275cmp=L({type:P0,selectors:[["tb-rule-chain-select"]],inputs:{tooltipPosition:"tooltipPosition",required:"required",disabled:"disabled",ruleChainType:"ruleChainType"},features:[ne([{provide:ye,useExisting:he(()=>P0),multi:!0}])],decls:6,vars:6,consts:[["subscriptSizing","dynamic","appearance","fill",1,"tb-rule-select",3,"click"],["matPrefix",""],["matInput","","readonly","","disabled","",3,"required","value"],["matSuffix",""]],template:function(r,e){r&1&&(d(0,"mat-form-field",0),T("click",function(o){return e.openRuleChainSelectPanel(o)}),d(1,"mat-icon",1),g(2,"settings_ethernet"),p(),O(3,"input",2),d(4,"mat-icon",3),g(5,"arrow_drop_down"),p()()),r&2&&(Y("cursor-pointer",!e.disabled),l(3),m("required",e.required)("value",e.ruleChain==null?null:e.ruleChain.name),l(),Y("disabled",e.disabled||e.panelOpened))},dependencies:[Se,at,ze,Kd,Yt],styles:['@charset "UTF-8";[_nghost-%COMP%]{min-width:52px;width:100%;padding:0}[_nghost-%COMP%]   .tb-rule-select[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   .tb-rule-select[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{color:#fff;cursor:pointer;text-overflow:ellipsis;pointer-events:none}[_nghost-%COMP%]   .tb-rule-select[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:disabled{cursor:unset}[_nghost-%COMP%]   .disabled[_ngcontent-%COMP%]{opacity:.5}']});var Uh=P0;pe([fe(),le("design:type",Boolean)],Uh.prototype,"required",void 0);pe([fe(),le("design:type",Boolean)],Uh.prototype,"disabled",void 0);var MAe={};Ae(MAe,{UnitInputComponent:()=>Mx});y();y();function yAe(n,t){if(n&1){let r=B();d(0,"button",17),T("click",function(){D(r);let i=b();return M(i.clearUnit())}),g(1),v(2,"translate"),p()}if(n&2){let r=b();m("disabled",!(r.unitSettingForm.value.from||r.unitSettingForm.value.convertUnit)),l(),j(" ",C(2,2,"action.clear")," ")}}function CAe(n,t){if(n&1){let r=B();d(0,"button",18),T("click",function(){D(r);let i=b();return M(i.applyUnitSettings())}),g(1),v(2,"translate"),p()}if(n&2){let r=b();m("disabled",r.unitSettingForm.invalid||r.unitSettingForm.pristine),l(),j(" ",C(2,2,"action.apply")," ")}}var Dx=(()=>{let t=class t{constructor(e,i,o){this.popover=e,this.fb=i,this.unitService=o,this.unitSettingsApplied=new J,this.UnitSystem=dC,this.unitSettingForm=this.fb.group({from:[""],convertUnit:[!0],METRIC:[""],IMPERIAL:[""],HYBRID:[""]}),this.unitSettingForm.get("from").valueChanges.pipe(Wi(200),yi()).subscribe(a=>{let s=this.unitService.getUnitInfo(a),c=s?this.unitService.getUnits(s.measure):[];s&&c.length>1?(this.unitSettingForm.get("convertUnit").enable({emitEvent:!0}),this.targetMeasure=s.measure,s.system===dC.IMPERIAL?(this.unitSettingForm.get("METRIC").setValue(this.unitService.getDefaultUnit(this.targetMeasure,dC.METRIC),{emitEvent:!1}),this.unitSettingForm.get("IMPERIAL").setValue(a,{emitEvent:!1}),this.unitSettingForm.get("HYBRID").setValue(a,{emitEvent:!1})):(this.unitSettingForm.get("METRIC").setValue(a,{emitEvent:!1}),this.unitSettingForm.get("IMPERIAL").setValue(this.unitService.getDefaultUnit(this.targetMeasure,dC.IMPERIAL),{emitEvent:!1}),this.unitSettingForm.get("HYBRID").setValue(a,{emitEvent:!1}))):(this.unitSettingForm.get("convertUnit").setValue(!1,{onlySelf:!0}),this.unitSettingForm.get("convertUnit").disable({emitEvent:!1}),this.unitSettingForm.patchValue({METRIC:"",IMPERIAL:"",HYBRID:""},{emitEvent:!1}))}),this.unitSettingForm.get("convertUnit").valueChanges.pipe(yi()).subscribe(a=>{a?(this.unitSettingForm.get("METRIC").enable({emitEvent:!1}),this.unitSettingForm.get("IMPERIAL").enable({emitEvent:!1}),this.unitSettingForm.get("HYBRID").enable({emitEvent:!1})):(this.unitSettingForm.get("METRIC").disable({emitEvent:!1}),this.unitSettingForm.get("IMPERIAL").disable({emitEvent:!1}),this.unitSettingForm.get("HYBRID").disable({emitEvent:!1}))})}ngOnInit(){let e;this.required&&this.unitSettingForm.get("from").setValidators(ke.required),typeof this.unit=="string"?(this.unitSettingForm.get("convertUnit").setValue(!1,{onlySelf:!0}),this.unitSettingForm.get("from").setValue(this.unit),e=this.unitService.getUnitInfo(this.unit)):ga(this.unit)?(this.unitSettingForm.get("convertUnit").setValue(!1,{onlySelf:!0}),this.unitSettingForm.get("from").setValue(null)):(this.unitSettingForm.patchValue(this.unit,{emitEvent:!1}),e=this.unitService.getUnitInfo(this.unit.from)),e?.measure?this.targetMeasure=e.measure:this.unitSettingForm.get("convertUnit").disable({emitEvent:!1}),this.disabled&&this.unitSettingForm.disable({emitEvent:!1})}clearUnit(){this.unitSettingForm.reset({convertUnit:!1}),this.required&&this.unitSettingForm.markAllAsTouched(),this.unitSettingForm.markAsDirty()}cancel(){this.popover.hide()}applyUnitSettings(){if(this.unitSettingForm.value.convertUnit){let e=this.unitSettingForm.value;delete e.convertUnit,this.unitSettingsApplied.emit(e)}else this.unitSettingsApplied.emit(this.unitSettingForm.value.from)}};t.\u0275fac=function(i){return new(i||t)(h(Em),h(Ai),h(BS))},t.\u0275cmp=L({type:t,selectors:[["tb-covert-unit-settings-panel"]],inputs:{unit:"unit",required:"required",disabled:"disabled",tagFilter:"tagFilter",measure:"measure"},outputs:{unitSettingsApplied:"unitSettingsApplied"},features:[ne([])],decls:37,vars:43,consts:[[1,"tb-convert-settings-panel"],["translate","",1,"tb-convert-settings-title"],[1,"tb-convert-settings-panel-content",3,"formGroup"],[1,"tb-form-row"],["translate","",1,"min-w-44",3,"tb-hint-tooltip-icon"],["formControlName","from",1,"flex-1",3,"required","measure","tagFilter"],[1,"tb-form-panel","stroked"],["formControlName","convertUnit",1,"mat-slide"],[3,"tb-hint-tooltip-icon"],["onlySystemUnits","true","formControlName","METRIC",1,"flex-1",3,"tagFilter","unitSystem","measure"],["onlySystemUnits","true","formControlName","IMPERIAL",1,"flex-1",3,"tagFilter","unitSystem","measure"],["onlySystemUnits","true","formControlName","HYBRID",1,"flex-1",3,"tagFilter","measure"],[1,"tb-convert-settings-panel-buttons"],["mat-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],[1,"flex-1"],["mat-button","","color","primary","type","button",3,"click"],["mat-raised-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-button","","color","primary","type","button",3,"click","disabled"],["mat-raised-button","","color","primary","type","button",3,"click","disabled"]],template:function(i,o){i&1&&(d(0,"div",0)(1,"div",1),g(2,"unit.unit-settings.unit-settings"),p(),d(3,"div",2)(4,"div",3)(5,"div",4),v(6,"translate"),g(7,"unit.unit-settings.source-unit"),p(),O(8,"tb-unit-input",5),p(),d(9,"div",6)(10,"mat-slide-toggle",7)(11,"div",8),v(12,"translate"),g(13),v(14,"translate"),p()(),d(15,"div",3)(16,"div",4),v(17,"translate"),g(18,"unit.unit-settings.target-metric-unit"),p(),O(19,"tb-unit-input",9),p(),d(20,"div",3)(21,"div",4),v(22,"translate"),g(23,"unit.unit-settings.target-imperial-unit"),p(),O(24,"tb-unit-input",10),p(),d(25,"div",3)(26,"div",4),v(27,"translate"),g(28,"unit.unit-settings.target-hybrid-unit"),p(),O(29,"tb-unit-input",11),p()()(),d(30,"div",12),x(31,yAe,3,4,"button",13),O(32,"span",14),d(33,"button",15),T("click",function(){return o.cancel()}),g(34),v(35,"translate"),p(),x(36,CAe,3,4,"button",16),p()()),i&2&&(l(3),m("formGroup",o.unitSettingForm),l(2),Y("tb-disabled-label",o.unitSettingForm.get("from").disabled),te("tb-hint-tooltip-icon",C(6,29,"unit.unit-settings.source-unit-hint")),l(3),m("required",o.required)("measure",o.measure)("tagFilter",o.tagFilter),l(3),te("tb-hint-tooltip-icon",C(12,31,"unit.unit-settings.enable-unit-conversion-hint")),l(2),j(" ",C(14,33,"unit.unit-settings.enable-unit-conversion")," "),l(3),Y("tb-disabled-label",o.unitSettingForm.get("METRIC").disabled),te("tb-hint-tooltip-icon",C(17,35,"unit.unit-settings.target-metric-unit-hint")),l(3),m("tagFilter",o.tagFilter)("unitSystem",o.UnitSystem.METRIC)("measure",o.targetMeasure),l(2),Y("tb-disabled-label",o.unitSettingForm.get("IMPERIAL").disabled),te("tb-hint-tooltip-icon",C(22,37,"unit.unit-settings.target-imperial-unit-hint")),l(3),m("tagFilter",o.tagFilter)("unitSystem",o.UnitSystem.IMPERIAL)("measure",o.targetMeasure),l(2),Y("tb-disabled-label",o.unitSettingForm.get("HYBRID").disabled),te("tb-hint-tooltip-icon",C(27,39,"unit.unit-settings.target-hybrid-unit-hint")),l(3),m("tagFilter",o.tagFilter)("measure",o.targetMeasure),l(2),m("ngIf",!o.disabled),l(3),j(" ",C(35,41,o.disabled?"action.close":"action.cancel")," "),l(2),m("ngIf",!o.disabled))},styles:[`@charset "UTF-8";.tb-convert-settings-panel{width:360px;display:flex;flex-direction:column;gap:16px;max-height:calc(100vh - 24px)}@media screen and (max-width: 599px){.tb-convert-settings-panel{width:90vw}.tb-convert-settings-panel .tb-form-row tb-unit-input{width:90px}}.tb-convert-settings-panel .tb-convert-settings-title{font-size:16px;font-weight:500;line-height:24px;letter-spacing:.25px;color:#000000de}.tb-convert-settings-panel .tb-convert-settings-panel-content{display:flex;flex-direction:column;gap:16px;overflow:auto;margin:-10px;padding:10px}.tb-convert-settings-panel .tb-convert-settings-panel-buttons{height:40px;
221display:flex;flex-direction:row;gap:16px;justify-content:flex-end;align-items:flex-end}
222`],encapsulation:2});let n=t;return n})();var wAe=["unitInput"],xAe=(n,t)=>t[0],SAe=(n,t)=>t.abbr;function TAe(n,t){if(n&1){let r=B();d(0,"button",9),T("click",function(i){D(r);let o=b();return M(o.clear(i))}),d(1,"mat-icon",10),g(2,"close"),p()()}}function EAe(n,t){n&1&&(d(0,"mat-icon",11),v(1,"translate"),g(2," warning "),p()),n&2&&m("matTooltip",C(1,1,"widget-config.units-required"))}function IAe(n,t){if(n&1&&(d(0,"tb-icon",12),v(1,"translate"),g(2," mdi:swap-vertical-circle-outline "),p()),n&2){let r=b();m("color",r.disabled?null:"primary")("matTooltip",C(1,2,"unit.set-unit-conversion"))}}function kAe(n,t){if(n&1&&(d(0,"mat-option",13),O(1,"span",14),v(2,"highlight"),O(3,"span",15),v(4,"highlight"),p()),n&2){let r=t.$implicit,e=b(2);m("value",r),l(),m("innerHTML",ds(2,3,r.name,e.searchText,!0,"ig"),Ut),l(2),m("innerHTML",ds(4,8,r.abbr,e.searchText,!0,"ig"),Ut)}}function DAe(n,t){if(n&1&&(d(0,"mat-optgroup",8),v(1,"translate"),Ir(2,kAe,5,13,"mat-option",13,SAe),p()),n&2){let r=t.$implicit;m("label",C(1,1,"unit.measures."+r[0])),l(2),kr(r[1])}}var Mx=(()=>{let t=class t{constructor(e,i,o,a,s,c){this.fb=e,this.unitService=i,this.popoverService=o,this.renderer=a,this.viewContainerRef=s,this.elementRef=c,this.hostDisplay="flex",this.required=!1,this.supportsUnitConversion=!1,this.onlySystemUnits=!1,this.searchText="",this.isUnitMapping=!1,this.dirty=!1,this.fetchUnits$=null,this.propagateChange=u=>{}}ngOnInit(){this.unitsFormControl=this.fb.control("",this.required?[ke.required]:[]),this.filteredUnits$=this.unitsFormControl.valueChanges.pipe(W(e=>(this.updateModel(e),I2(e))),Ft(e=>this.fetchUnits(e)))}ngOnChanges(e){for(let i of Object.keys(e)){let o=e[i];!o.firstChange&&o.currentValue!==o.previousValue&&(i==="measure"||i==="unitSystem")&&(this.fetchUnits$=null,this.dirty=!0)}}writeValue(e){this.searchText="",this.modelValue=e,typeof e=="string"?(this.unitsFormControl.patchValue(this.unitService.getUnitInfo(e)??e,{emitEvent:!1}),this.isUnitMapping=!1):(this.unitsFormControl.patchValue(e,{emitEvent:!1}),this.isUnitMapping=De(e)),this.dirty=!0}onFocus(){this.dirty&&(this.unitsFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}displayUnitFn(e){if(e)return I2(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,this.disabled?this.unitsFormControl.disable({emitEvent:!1}):this.unitsFormControl.enable({emitEvent:!1})}clear(e){e.stopPropagation(),this.unitsFormControl.patchValue(null,{emitEvent:!0}),setTimeout(()=>{this.unitInput.nativeElement.blur(),this.unitInput.nativeElement.focus()},0)}openUnitSettingsPopup(e){if(!this.supportsUnitConversion)return;e.stopPropagation(),this.unitInput.nativeElement.blur();let i=this.elementRef.nativeElement;if(this.popoverService.hasPopover(i))this.popoverService.hidePopover(i);else{let o=this.popoverService.displayPopover({trigger:i,renderer:this.renderer,componentType:Dx,hostView:this.viewContainerRef,preferredPlacement:["left","bottom","top"],context:{unit:D2(this.unitsFormControl.value),required:this.required,disabled:this.disabled,tagFilter:this.tagFilter,measure:this.measure},isModal:!0});o.tbComponentRef.instance.unitSettingsApplied.subscribe(a=>{o.hide(),this.unitsFormControl.patchValue(a,{emitEvent:!1}),this.updateModel(a)})}}updateModel(e){let i=D2(e);if(this.onlySystemUnits&&!k2(i)){let o=this.unitService.getUnitInfo(i);o?this.measure&&o.measure!==this.measure&&(i=null):i=null}Fn(this.modelValue,i)||(this.modelValue=i,this.isUnitMapping=k2(i),this.propagateChange(this.modelValue))}fetchUnits(e){return this.searchText=e,this.getGroupedUnits().pipe(W(i=>A5(i,e)))}getGroupedUnits(){return this.fetchUnits$===null&&(this.fetchUnits$=Z(this.unitService.getUnitsGroupedByMeasure(this.measure,this.unitSystem,this.tagFilter)).pipe(W(e=>Object.entries(e)),Cs(1))),this.fetchUnits$}};t.\u0275fac=function(i){return new(i||t)(h(Ai),h(BS),h(Fa),h(Ni),h(ci),h(ge))},t.\u0275cmp=L({type:t,selectors:[["tb-unit-input"]],viewQuery:function(i,o){if(i&1&&ae(wAe,7),i&2){let a;Q(a=K())&&(o.unitInput=a.first)}},hostVars:2,hostBindings:function(i,o){i&2&&hi("display",o.hostDisplay)},inputs:{disabled:[2,"disabled","disabled",Re],required:[2,"required","required",Re],tagFilter:"tagFilter",measure:"measure",unitSystem:"unitSystem",supportsUnitConversion:[2,"supportsUnitConversion","supportsUnitConversion",Re],onlySystemUnits:[2,"onlySystemUnits","onlySystemUnits",Re]},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),si,lt],decls:12,vars:14,consts:[["unitInput",""],["unitsAutocomplete","matAutocomplete"],["appearance","outline","subscriptSizing","dynamic",1,"tb-inline-field","tb-suffix-show-on-hover","w-full","flex-1",3,"click"],["matInput","",3,"focusin","formControl","placeholder","matAutocomplete","matAutocompleteDisabled"],["type","button","class","tb-icon-24 mr-2","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","material-icons tb-suffix-show-always tb-error",3,"matTooltip",4,"ngIf"],["matSuffix","","matTooltipPosition","above","class","material-icons tb-suffix-show-always mr-2 !p-0",3,"color","matTooltip",4,"ngIf"],["panelWidth","fit-content",1,"tb-autocomplete","tb-unit-input-autocomplete",3,"displayWith"],[3,"label"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",1,"tb-icon-24","mr-2",3,"click"],[1,"material-icons"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"material-icons","tb-suffix-show-always","tb-error",3,"matTooltip"],["matSuffix","","matTooltipPosition","above",1,"material-icons","tb-suffix-show-always","mr-2","!p-0",3,"color","matTooltip"],[3,"value"],[1,"tb-unit-name","flex-1",3,"innerHTML"],[1,"tb-unit-symbol",3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2),T("click",function(c){return D(a),M(o.openUnitSettingsPopup(c))}),d(1,"input",3,0),v(3,"translate"),T("focusin",function(){return D(a),M(o.onFocus())}),p(),x(4,TAe,3,0,"button",4)(5,EAe,3,3,"mat-icon",5)(6,IAe,3,4,"tb-icon",6),d(7,"mat-autocomplete",7,1),Ir(9,DAe,4,3,"mat-optgroup",8,xAe),v(11,"async"),p()()}if(i&2){let a=me(8);l(),Y("!pointer-events-none",o.disabled),te("placeholder",C(3,10,"widget-config.set")),m("formControl",o.unitsFormControl)("matAutocomplete",a)("matAutocompleteDisabled",o.supportsUnitConversion),l(3),m("ngIf",o.unitsFormControl.value&&!o.disabled&&o.unitsFormControl.valid&&!o.isUnitMapping),l(
222),m("ngIf",o.unitsFormControl.hasError("required")),l(),m("ngIf",o.supportsUnitConversion&&o.isUnitMapping),l(),m("displayWith",o.displayUnitFn.bind(o)),l(2),kr(C(11,12,o.filteredUnits$))}},dependencies:[ce,Pe,Se,at,ze,Yt,xt,Eb,zt,Ri,mi,ut,xe,Br,In,Ve,be,Mi],styles:[`@charset "UTF-8";.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-optgroup-label{min-height:36px}.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:14px;font-weight:500;line-height:20px;letter-spacing:.2px}.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-option{border-bottom:none}.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-option .mdc-list-item__primary-text{flex:1;display:flex;flex-direction:row;gap:8px}.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-option .mdc-list-item__primary-text .tb-unit-name,.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-option .mdc-list-item__primary-text .tb-unit-symbol{font-size:14px;font-weight:400;line-height:20px;letter-spacing:.2px}.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-option .mdc-list-item__primary-text .tb-unit-symbol{color:#00000061;min-width:22px;text-align:end}.tb-autocomplete.tb-unit-input-autocomplete .mat-mdc-option .mdc-list-item__primary-text .tb-unit-symbol b{color:#000000de}
223`],encapsulation:2});let n=t;return n})();y();var AAe=["inputRef"],OAe=["highlightTextRef"],PAe=["autocompleteTemplate"],RAe=["optionItem"];function FAe(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
223();l(),z(r.label)}}function NAe(n,t){if(n&1){let r=B();d(0,"button",10),T("click",function(i){D(r);let o=b();return M(o.openValues(i))}),d(1,"tb-icon",11),g(2,"mdi:variable"),p()()}}function VAe(n,t){if(n&1&&(d(0,"mat-icon",12),g(1," warning "),p()),n&2){let r=b();m("matTooltip",r.errorText)("matTooltipClass",r.tooltipClass)}}function LAe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.errorText," ")}}function BAe(n,t){if(n&1){let r=B();d(0,"mat-option",15,3),T("click",function(){let i=D(r).$implicit,o=b(2);return M(o.optionSelected(i))}),O(2,"span",16),v(3,"highlight"),p()}if(n&2){let r=t.$implicit,e=t.$index,i=b(2);Y("mat-mdc-option-active",e===i.activeOptionIndex),l(2),m("innerHTML",ds(3,3,r,i.searchText,!1,"ig"),Ut)}}function jAe(n,t){if(n&1&&(d(0,"div",13),Ir(1,BAe,4,8,"mat-option",14,Jo),p()),n&2){let r=b();l(),kr(r.filteredOptions)}}var R0=class R0{constructor(t,r,e,i,o,a){this.fb=t,this.overlay=r,this.translate=e,this.viewContainerRef=i,this.destroyRef=o,this.cd=a,this.required=!1,this.placeholderText=this.translate.instant("widget-config.set"),this.subscriptSizing="fixed",this.appearance="fill",this.tooltipClass="tb-error-tooltip",this.showInlineError=!1,this.predefinedValuesButton=!1,this.patternSymbol="$",this.searchText="",this.highlightedHtml="",this.activeOptionIndex=-1,this.predefinedValuesButtonMode=!1,this.propagateChange=s=>{}}ngOnInit(){this.selectionFormControl=this.fb.control("",this.required?[ke.required]:[]),Xt(Jn(this.inputRef.nativeElement,"selectionchange"),this.selectionFormControl.valueChanges.pipe(et(t=>this.updateView(t)))).pipe(Wi(50),yi(this.destroyRef)).subscribe(()=>{this.onSelectionChange(),this.cd.markForCheck()}),Jn(this.inputRef.nativeElement,"keydown").pipe(yi(this.destroyRef)).subscribe(t=>this.handleKeydown(t))}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];!e.firstChange&&e.currentValue!==e.previousValue&&((r==="predefinedValues"||r==="patternSymbol")&&(this.highlightedHtml=this.getHighlightHtml(this.modelValue)),r==="required"&&(e.currentValue?this.selectionFormControl.addValidators(ke.required):this.selectionFormControl.removeValidators(ke.required),this.selectionFormControl.updateValueAndValidity({emitEvent:!1})))}}writeValue(t){this.searchText="",this.modelValue=t??null,this.highlightedHtml=this.getHighlightHtml(this.modelValue),this.selectionFormControl.patchValue(this.modelValue,{emitEvent:!1})}onFocus(){this.onSelectionChange()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?(this.selectionFormControl.disable({emitEvent:!1}),this.closeAutocomplete()):this.selectionFormControl.enable({emitEvent:!1})}onInputScroll(t){let r=t.target.scrollLeft,e=t.target.scrollTop;this.highlightTextRef&&this.highlightTextRef.nativeElement&&(this.highlightTextRef.nativeElement.scrollLeft=r,this.highlightTextRef.nativeElement.scrollTop=e)}optionSelected(t){let r=this.inputRef.nativeElement.selectionStart,e=this.predefinedValuesButtonMode?r:this.modelValue.lastIndexOf(this.patternSymbol,r-1);if(e===-1)return;let i;switch(this.brackets){case"curly":i=`{${t}}`;break;case"square":i=`[${t}]`;break;default:i=t}let o=`${this.modelValue.substring(0,e)}${this.patternSymbol}${i}${this.modelValue.substring(r)}`;this.selectionFormControl.patchValue(o),this.searchText="",setTimeout(()=>{this.inputRef.nativeElement.setSelectionRange(e+i.length+1,e+i.length+1),this.inputRef.nativeElement.focus()}),this.closeAutocomplete()}openValues(t){t.stopPropagation();let r=this.inputRef.nativeElement.selectionStart;this.filteredOptions=[...this.predefinedValues],this.predefinedValuesButtonMode=!0,this.openAutocomplete(r)}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.highlightedHtml=this.getHighlightHtml(this.modelValue),this.propagateChange(this.modelValue))}onSelectionChange(){let t=this.inputRef.nativeElement.selectionStart,r=this.inputRef.nativeElement.selectionEnd;t===r&&t>0&&!this.disabled?(this.filteredOptions=this.getFilteredOptions(this.modelValue,t),this.activeOptionIndex=0):(this.filteredOptions=[],this.activeOptionIndex=-1),this.filteredOptions.length?this.openAutocomplete(t):this.closeAutocomplete()}getHighlightHtml(t){if(!t)return"";let r,e=!1;switch(this.brackets){case"curly":r=new RegExp(`([${this.patternSymbol}](\\{([^}]*)\\}))`,"g");break;case"square":r=new RegExp(`([${this.patternSymbol}](\\[([^]]*)\\]))`,"g");break;default:r=new RegExp(`([${this.patternSymbol}
223](\\w+))`,"g"),e=!0;break}return t.replace(r,(i,o,a,s)=>{let c=e?a:s;return this.predefinedValues.includes(c)?`<span class="highlight">${o}</span>`:o})}getFilteredOptions(t,r=t.length){let e=t.lastIndexOf(this.patternSymbol,r-1);if(e===-1)return[];let i=t.indexOf(" ",r);i===-1&&(i=t.length);let o=1;switch(this.brackets){case"curly":t[e+o]==="{"&&o++;break;case"square":t[e+o]==="["&&o++;break}if(this.searchText=t.substring(e+o,i).toLowerCase(),this.searchText.includes(" "))return[];let a=this.predefinedValues.filter(s=>s.toLowerCase().startsWith(this.searchText));return a.length===1&&a[0].toLowerCase()===this.searchText?[]:a}openAutocomplete(t){let r=this.predefinedValuesButtonMode?t:this.modelValue.lastIndexOf(this.patternSymbol,t-1);if(this.overlayRef||(this.overlayRef=this.overlay.create({positionStrategy:this.getOverlayPosition(r),scrollStrategy:this.overlay.scrollStrategies.reposition(),panelClass:"tb-select-overlay",backdropClass:"cdk-overlay-transparent-backdrop",hasBackdrop:!0}),this.overlayRef.backdropClick().pipe(yi(this.destroyRef)).subscribe(()=>this.closeAutocomplete())),!this.overlayRef.hasAttached()){let e=new us(this.autocompleteTemplate,this.viewContainerRef);this.overlayRef.attach(e),this.overlayRef.updatePositionStrategy(this.getOverlayPosition(r))}}closeAutocomplete(){this.predefinedValuesButtonMode=!1,this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach()}getOverlayPosition(t){let r=this.overlay.position().flexibleConnectedTo(this.inputRef).withFlexibleDimensions(!1).withPush(!1);return this.setStrategyPositions(r,t),r}setStrategyPositions(t,r){let e=r>0?r*8:0,i=this.inputRef.nativeElement.getBoundingClientRect();e+180>i.width&&(e=i.width-180);let o=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetX:e},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top",offsetX:e}],a="mat-mdc-autocomplete-panel-above",s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:a,offsetX:e},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:a,offsetX:e}],c=[...o,...s];t.withPositions(c)}setActiveOption(t){if(this.filteredOptions.length===0){this.activeOptionIndex=-1;return}this.activeOptionIndex=Math.max(-1,Math.min(t,this.filteredOptions.length-1)),this.cd.markForCheck(),this.activeOptionIndex>=0&&this.optionItems.get(this.activeOptionIndex)&&this.optionItems.get(this.activeOptionIndex).nativeElement.scrollIntoView({block:"nearest"})}handleKeydown(t){if(this.overlayRef?.hasAttached())switch(t.key){case"ArrowDown":t.preventDefault(),this.setActiveOption(this.activeOptionIndex+1);break;case"ArrowUp":t.preventDefault(),this.setActiveOption(this.activeOptionIndex-1);break;case"Enter":t.preventDefault(),this.activeOptionIndex>=0&&this.activeOptionIndex<this.filteredOptions.length&&this.optionSelected(this.filteredOptions[this.activeOptionIndex]);break;case"Escape":this.closeAutocomplete();break}}};R0.\u0275fac=function(r){return new(r||R0)(h(Ai),h(Vr),h(Ge),h(ci),h(En),h(Me))},R0.\u0275cmp=L({type:R0,selectors:[["tb-string-pattern-autocomplete"]],viewQuery:function(r,e){if(r&1&&(ae(AAe,7),ae(OAe,7),ae(PAe,7),ae(RAe,5,ge)),r&2){let i;Q(i=K())&&(e.inputRef=i.first),Q(i=K())&&(e.highlightTextRef=i.first),Q(i=K())&&(e.autocompleteTemplate=i.first),Q(i=K())&&(e.optionItems=i)}},inputs:{disabled:"disabled",required:"required",predefinedValues:"predefinedValues",placeholderText:"placeholderText",subscriptSizing:"subscriptSizing",additionalClass:"additionalClass",appearance:"appearance",label:"label",tooltipClass:"tooltipClass",errorText:"errorText",showInlineError:"showInlineError",predefinedValuesButton:"predefinedValuesButton",patternSymbol:"patternSymbol",brackets:"brackets"},features:[ne([{provide:ye,useExisting:he(()=>R0),multi:!0}]),lt],decls:11,vars:13,consts:[["highlightTextRef",""],["inputRef",""],["autocompleteTemplate",""],["optionItem",""],[2,"width","100%",3,"appearance","subscriptSizing"],[4,"ngIf"],[1,"highlighted-text",3,"innerHTML"],["matInput","",1,"input-field-highlight",3,"focusin","scroll","formControl","placeholder"],["type","button","matSuffix","","mat-icon-button",""],["matIconSuffix","","matTooltipPosition","above","class","material-icons tb-suffix-show-always tb-error",3,"matTooltip","matTooltipClass",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","",3,"click"],["matButtonIcon",""],["matIconSuffix","","matTooltipPosition","above",1,"material-icons","tb-suffix-show-always","tb-error",3,"matTooltip","matTooltipClass"],["role","listbox",1,"mat-mdc-autocomplete-panel","mat-mdc-autocomplete-visible","tb-autocomplete","tb-sting-pattern-autocomplete-panel"],[1,"mdc-list-item",3,"mat-mdc-option-active"],[1,"mdc-list-item",3,"click"],[1,"flex-1",3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",4),x(1,FAe,2,1,"mat-label",5),O(2,"pre",6,0),d(4,"input",7,1),T("focusin",function(){return D(i),M(e.onFocus())})("scroll",function(a){return D(i),M(e.onInputScroll(a))}),p(),x(6,NAe,3,0,"button",8)(7,VAe,2,2,"mat-icon",9)(8,LAe,2,1,"mat-error",5),p(),x(9,jAe,3,0,"ng-template",null,2,kt)}r&2&&(bt(e.additionalClass),m("appearance",e.appearance)("subscriptSizing",e.subscriptSizing),l(),m("ngIf",e.label),l(),Y("disabled",e.disabled),m("innerHTML",e.highlightedHtml,Ut),l(2),m("formControl",e.selectionFormControl)("placeholder",e.placeholderText),l(2),_t(e.predefinedValuesButton?6:-1),l(),m("ngIf",e.selectionFormControl.hasError("required")&&!e.showInlineError),l(),m("ngIf",e.selectionFormControl.hasError("required")&&e.showInlineError))},dependencies:[ce,Pe,Se,at,ze,At,ni,Yt,xt,zt,ut,xe,Br,In,Mi],styles:['@charset "UTF-8";[_nghost-%COMP%]   .highlighted-text[_ngcontent-%COMP%]{position:absolute;inset:0;margin:0;z-index:1;pointer-events:none;padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom);font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;overflow:hidden;color:var(--mdc-filled-text-field-input-text-color, var(--mat-app-on-surface))}[_nghost-%COMP%]   .highlighted-text.disabled[_ngcontent-%COMP%]{color:var(--mdc-filled-text-field-disabled-input-text-color)}[_nghost-%COMP%]   .input-field-highlight[_ngcontent-%COMP%]{position:relative;background:transparent;z-index:2;color:transparent;width:100%}[_nghost-%COMP%]     .mdc-text-field--outlined .mat-mdc-form-field-infix .highlighted-text{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}[_nghost-%COMP%]     .highlighted-text .highlight{color:var(--tb-primary-600);text-shadow:0 0 .5px var(--tb-primary-600, var(--mat-app-on-surface))}[_nghost-%COMP%]     .highlighted-text.disabled .highlight{color:var(--tb-primary-300);text-shadow:0 0 .5px var(--tb-primary-300, var(--mdc-filled-text-field-disabled-input-text-color))}  div.tb-sting-pattern-autocomplete-panel{width:100%;max-height:256px;visibility:visible;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-app-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color, var(--mat-app-surface-container))}.cdk-overlay-pane[_ngcontent-%COMP%]:not(.mat-mdc-autocomplete-panel-above)    {border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above[_ngcontent-%COMP%]    {border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}']});var Hh=R0;pe([fe(),le("design:type",Object)],Hh.prototype,"required",void 0);pe([fe(),le("design:type",Object)],Hh.prototype,"showInlineError",void 0);pe([fe(),le("design:type",Object)],Hh.prototype,"predefinedValuesButton",void 0);y();var GAe=["nameInput"];function zAe(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
223();l(),z(r.label)}}function $Ae(n,t){if(n&1){let r=B();d(0,"button",9),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",10),g(2,"close"),p()()}}function UAe(n,t){if(n&1&&(d(0,"mat-icon",11),g(1," warning "),p()),n&2){let r=b();m("matTooltip",r.errorText)("matTooltipClass",r.tooltipClass)}}function HAe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.errorText," ")}}function qAe(n,t){if(n&1&&(d(0,"mat-option",12),O(1,"span",13),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ds(2,2,r,e.searchText,!0,"ig"),Ut)}}var F0=class F0{constructor(t,r){this.fb=t,this.translate=r,this.required=!1,this.placeholderText=this.translate.instant("widget-config.set"),this.subscriptSizing="dynamic",this.additionalClass="tb-inline-field tb-suffix-show-on-hover",this.appearance="outline",this.panelWidth="fit-content",this.tooltipClass="tb-error-tooltip",this.showInlineError=!1,this.searchText="",this.dirty=!1,this.propagateChange=e=>{}}ngOnInit(){this.selectionFormControl=this.fb.control("",this.required?[ke.required]:[]),this.filteredOptions$=this.selectionFormControl.valueChanges.pipe(et(t=>this.updateView(t)),W(t=>t||""),ii(t=>this.fetchOptionsFn?this.fetchOptionsFn(t):Z([])))}writeValue(t){this.searchText="",this.modelValue=t||null,this.fetchOptionsFn?this.fetchOptionsFn(t).pipe(W(r=>{if(r){let e=r.find(i=>i===t);return e||t}return t}),$n(1)).subscribe(r=>{this.selectionFormControl.patchValue(r,{emitEvent:!1}),this.dirty=!0}):(this.selectionFormControl.patchValue(null,{emitEvent:!1}),this.dirty=!0)}onFocus(){this.dirty&&(this.selectionFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(t){this.searchText=t||"",this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled?this.selectionFormControl.disable({emitEvent:!1}):this.selectionFormControl.enable({emitEvent:!1})}clear(){this.selectionFormControl.patchValue(null,{emitEvent:!0}),setTimeout(()=>{this.nameInput.nativeElement.blur(),this.nameInput.nativeElement.focus()},0)}};F0.\u0275fac=function(r){return new(r||F0)(h(Ai),h(Ge))},F0.\u0275cmp=L({type:F0,selectors:[["tb-string-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(GAe,7),r&2){let i;Q(i=K())&&(e.nameInput=i.first)}},inputs:{disabled:"disabled",required:"required",fetchOptionsFn:"fetchOptionsFn",placeholderText:"placeholderText",subscriptSizing:"subscriptSizing",additionalClass:"additionalClass",appearance:"appearance",label:"label",panelWidth:"panelWidth",tooltipClass:"tooltipClass",errorText:"errorText",showInlineError:"showInlineError"},features:[ne([{provide:ye,useExisting:he(()=>F0),multi:!0}])],decls:11,vars:15,consts:[["nameInput",""],["optionsAutocomplete","matAutocomplete"],[2,"width","100%",3,"appearance","subscriptSizing"],[4,"ngIf"],["matInput","",3,"focusin","formControl","placeholder","matAutocomplete"],["type","button","class","tb-icon-24 mr-2","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["matIconSuffix","","matTooltipPosition","above","class","material-icons tb-suffix-show-always tb-error",3,"matTooltip","matTooltipClass",4,"ngIf"],[1,"tb-autocomplete","tb-options-input-autocomplete",3,"panelWidth"],[3,"value",4,"ngFor","ngForOf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",1,"tb-icon-24","mr-2",3,"click"],[1,"material-icons"],["matIconSuffix","","matTooltipPosition","above",1,"material-icons","tb-suffix-show-always","tb-error",3,"matTooltip","matTooltipClass"],[3,"value"],[1,"tb-option-name","flex-1",3,"innerHTML"]],template:function(r,e){if(r&1){let i=B();d(0,"mat-form-field",2),x(1,zAe,2,1,"mat-label",3),d(2,"input",4,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(4,$Ae,3,0,"button",5)(5,UAe,2,2,"mat-icon",6)(6,HAe,2,1,"mat-error",3),d(7,"mat-autocomplete",7,1),x(9,qAe,3,7,"mat-option",8),v(10,"async"),p()()}if(r&2){let i=me(8);bt(e.additionalClass),m("appearance",e.appearance)("subscriptSizing",e.subscriptSizing),l(),m("ngIf",e.label),l(),m("formControl",e.selectionFormControl)("placeholder",e.placeholderText)("matAutocomplete",i),l(2),m("ngIf",e.selectionFormControl.value&&!e.disabled),l(),m("ngIf",e.selectionFormControl.hasError("required")&&e.selectionFormControl.touched&&!e.showInlineError),l(),m("ngIf",e.selectionFormControl.hasError("required")&&e.showInlineError),l(),m("panelWidth",e.panelWidth),l(2),m("ngForOf",C(10,13,e.filteredOptions$))}},dependencies:[Ke,ce,Pe,Se,at,ze,At,ni,Yt,xt,zt,Ri,mi,ut,xe,Br,Ve,Mi],styles:['@charset "UTF-8";[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]{display:flex;flex:1;max-width:100%;box-sizing:border-box}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]   .tb-autocomplete.tb-option-input-autocomplete[_ngcontent-%COMP%]   .mat-mdc-option[_ngcontent-%COMP%]{border-bottom:none}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]   .tb-autocomplete.tb-option-input-autocomplete[_ngcontent-%COMP%]   .mat-mdc-option[_ngcontent-%COMP%]   .mdc-list-item__primary-text[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:row;gap:8px}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]   .tb-autocomplete.tb-option-input-autocomplete[_ngcontent-%COMP%]   .mat-mdc-option[_ngcontent-%COMP%]   .mdc-list-item__primary-text[_ngcontent-%COMP%]   .tb-option[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:20px;letter-spacing:.2px}']});var N0=F0;pe([fe(),le("design:type",Object)],N0.prototype,"required",void 0);pe([fe(),le("design:type",Object)],N0.prototype,"showInlineError",void 0);var COe={};Ae(COe,{ImportDialogCsvComponent:()=>lM});y();var uY={};
223Ae(uY,{TableColumnsAssignmentComponent:()=>wy});y();function WAe(n,t){n&1&&O(0,"mat-header-cell",12)}function YAe(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.index;l(),j(" ",r+1," ")}}function QAe(n,t){n&1&&(d(0,"mat-header-cell",13),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"import.column-example")," "))}function KAe(n,t){if(n&1&&(d(0,"mat-cell"),g(1),p()),n&2){let r=t.$implicit;l(),j(" ",r.sampleData," ")}}function XAe(n,t){n&1&&(d(0,"mat-header-cell",14),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"import.column-type.column-type")," "))}function ZAe(n,t){if(n&1&&(d(0,"mat-option",18),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b(2);m("value",r.value)("disabled",r.disabled),l(),j(" ",C(2,3,e.columnTypesTranslations.get(r.value))," ")}}function JAe(n,t){if(n&1&&(d(0,"mat-option",18),g(1),v(2,"translate"),p()),n&2){let r=t.$implicit,e=b(3);m("value",r.value)("disabled",r.disabled),l(),j(" ",C(2,3,e.columnTypesTranslations.get(r.value))," ")}}function eOe(n,t){if(n&1&&(d(0,"mat-optgroup",19),v(1,"translate"),x(2,JAe,3,5,"mat-option",16),p()),n&2){let r=b
223(2);te("label",C(1,2,"import.credentials")),l(2),m("ngForOf",r.columnDeviceCredentials)}}function tOe(n,t){if(n&1){let r=B();d(0,"mat-cell")(1,"mat-select",15),bi("ngModelChange",function(i){let o=D(r).$implicit;return gi(o.type,i)||(o.type=i),M(i)}),T("ngModelChange",function(){D(r);let i=b();return M(i.columnsUpdated())}),x(2,ZAe,3,5,"mat-option",16)(3,eOe,3,4,"mat-optgroup",17),p()()}if(n&2){let r=t.$implicit,e=b();l(),fi("ngModel",r.type),l(),m("ngForOf",e.columnTypes),l(),m("ngIf",e.entityType===e.entityTypeDevice)}}function iOe(n,t){n&1&&(d(0,"mat-header-cell",20),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"import.column-key")," "))}function nOe(n,t){if(n&1){let r=B();d(0,"mat-form-field")(1,"input",22),v(2,"translate"),bi("ngModelChange",function(i){D(r);let o=b().$implicit;return gi(o.key,i)||(o.key=i),M(i)}),T("ngModelChange",function(){D(r);let i=b(2);return M(i.columnsUpdated())}),p()()}if(n&2){let r=b().$implicit,e=b();l(),te("placeholder",C(2,3,"import.column-value")),m("required",e.isColumnTypeDiffers(r.type)),fi("ngModel",r.key)}}function rOe(n,t){if(n&1&&(d(0,"mat-cell"),x(1,nOe,3,5,"mat-form-field",21),p()),n&2){let r=t.$implicit,e=b();l(),m("ngIf",e.isColumnTypeDiffers(r.type))}}function oOe(n,t){n&1&&O(0,"mat-header-row")}function aOe(n,t){n&1&&O(0,"mat-row")}var wy=(()=>{let t=class t{constructor(e,i){this.elementRef=e,this.store=i,this.dataSource=new AV,this.displayedColumns=["order","sampleData","type","key"],this.columnTypes=[],this.columnDeviceCredentials=[],this.columnTypesTranslations=$8,this.entityTypeDevice=G.DEVICE,this.valid=!0,this.propagateChangePending=!1,this.propagateChange=null}ngOnInit(){switch(this.columnTypes.push({value:$t.name},{value:$t.type},{value:$t.label},{value:$t.description}),this.entityType){case G.DEVICE:this.columnTypes.push({value:$t.sharedAttribute},{value:$t.serverAttribute},{value:$t.timeseries},{value:$t.isGateway}),this.columnDeviceCredentials.push({value:$t.accessToken},{value:$t.x509},{value:$t.mqttClientId},{value:$t.mqttUserName},{value:$t.mqttPassword},{value:$t.lwm2mClientEndpoint},{value:$t.lwm2mClientSecurityConfigMode},{value:$t.lwm2mClientIdentity},{value:$t.lwm2mClientKey},{value:$t.lwm2mClientCert},{value:$t.lwm2mBootstrapServerSecurityMode},{value:$t.lwm2mBootstrapServerClientPublicKeyOrId},{value:$t.lwm2mBootstrapServerClientSecretKey},{value:$t.lwm2mServerSecurityMode},{value:$t.lwm2mServerClientPublicKeyOrId},{value:$t.lwm2mServerClientSecretKey},{value:$t.snmpHost},{value:$t.snmpPort},{value:$t.snmpVersion},{value:$t.snmpCommunityString});break;case G.ASSET:this.columnTypes.push({value:$t.serverAttribute},{value:$t.timeseries});break;case G.EDGE:this.columnTypes.push({value:$t.edgeLicenseKey},{value:$t.cloudEndpoint},{value:$t.routingKey},{value:$t.secret},{value:$t.serverAttribute},{value:$t.timeseries});break}}registerOnChange(e){this.propagateChange=e,this.propagateChangePending&&(this.propagateChange(this.columns),this.propagateChangePending=!1)}registerOnTouched(e){}setDisabledState(e){this.disabled=e}columnsUpdated(){let e=this.columns.findIndex(c=>c.type===$t.name)>-1,i=this.columns.findIndex(c=>c.type===$t.type)>-1,o=this.columns.findIndex(c=>c.type===$t.label)>-1,a=this.columns.findIndex(c=>c.type===$t.description)>-1,s=this.columns.findIndex(c=>!this.columnValid(c))>-1;if(this.valid=e&&i&&!s,this.columnTypes.find(c=>c.value===$t.name).disabled=e,this.columnTypes.find(c=>c.value===$t.type).disabled=i,this.columnTypes.find(c=>c.value===$t.label).disabled=o,this.columnTypes.find(c=>c.value===$t.description).disabled=a,this.entityType===G.DEVICE){let c=this.columns.findIndex(f=>f.type===$t.isGateway)>-1,u=this.columnTypes.find(f=>f.value===$t.isGateway);u&&(u.disabled=c),this.columnDeviceCredentials.forEach(f=>{f.disabled=this.columns.findIndex(_=>_.type===f.value)>-1})}if(this.entityType===G.EDGE){let c=this.columns.findIndex(I=>I.type===$t.edgeLicenseKey)>-1,u=this.columns.findIndex(I=>I.type===$t.cloudEndpoint)>-1,f=this.columns.findIndex(I=>I.type===$t.routingKey)>-1,_=this.columns.findIndex(I=>I.type===$t.secret)>-1;this.valid=this.valid&&c&&u&&_&&f,this.columnTypes.find(I=>I.value===$t.edgeLicenseKey).disabled=c,this.columnTypes.find(I=>I.value===$t.cloudEndpoint).disabled=u,this.columnTypes.find(I=>I.value===$t.routingKey).disabled=f,this.columnTypes.find(I=>I.value===$t.secret).disabled=_}
223this.propagateChange?this.propagateChange(this.columns):this.propagateChangePending=!0}isColumnTypeDiffers(e){return e===$t.clientAttribute||e===$t.sharedAttribute||e===$t.serverAttribute||e===$t.timeseries}columnValid(e){return this.isColumnTypeDiffers(e.type)?e.key&&e.key.trim().length>0:!0}validate(e){return this.valid?null:{columnsInvalid:!0}}writeValue(e){this.columns=e,this.dataSource.setColumns(this.columns),this.columnsUpdated()}};t.\u0275fac=function(i){return new(i||t)(h(ge),h(ve))},t.\u0275cmp=L({type:t,selectors:[["tb-table-columns-assignment"]],inputs:{entityType:"entityType",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}])],decls:16,vars:3,consts:[["mat-table","",3,"dataSource"],["matColumnDef","order"],["style","min-width: 40px; max-width: 40px; width: 40px",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","sampleData"],["class","mat-column-sampleData",4,"matHeaderCellDef"],["matColumnDef","type"],["class","mat-column-type",4,"matHeaderCellDef"],["matColumnDef","key"],["class","mat-column-key",4,"matHeaderCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[2,"min-width","40px","max-width","40px","width","40px"],[1,"mat-column-sampleData"],[1,"mat-column-type"],[3,"ngModelChange","ngModel"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"label",4,"ngIf"],[3,"value","disabled"],[3,"label"],[1,"mat-column-key"],[4,"ngIf"],["matInput","",3,"ngModelChange","required","ngModel","placeholder"]],template:function(i,o){i&1&&(d(0,"table",0),pt(1,1),x(2,WAe,1,0,"mat-header-cell",2)(3,YAe,2,1,"mat-cell",3),ct(),pt(4,4),x(5,QAe,3,3,"mat-header-cell",5)(6,KAe,2,1,"mat-cell",3),ct(),pt(7,6),x(8,XAe,3,3,"mat-header-cell",7)(9,tOe,4,3,"mat-cell",3),ct(),pt(10,8),x(11,iOe,3,3,"mat-header-cell",9)(12,rOe,2,1,"mat-cell",3),ct(),x(13,oOe,1,0,"mat-header-row",10)(14,aOe,1,0,"mat-row",11),p(),O(15,"mat-divider")),i&2&&(m("dataSource",o.dataSource),l(13),m("matHeaderRowDef",o.displayedColumns),l(),m("matRowDefColumns",o.displayedColumns))},dependencies:[Ke,ce,at,ze,Kn,xt,Eb,id,_c,nd,vc,bc,rd,yc,Cc,od,ad,la,ut,xe,St,eo,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{overflow-x:auto}[_nghost-%COMP%]   .mat-column-order[_ngcontent-%COMP%]{flex:0 0 40px}[_nghost-%COMP%]   .mat-column-sampleData[_ngcontent-%COMP%]{flex:0 0 120px;min-width:120px;max-width:230px}[_nghost-%COMP%]   .mat-column-type[_ngcontent-%COMP%]{flex:0 0 180px;min-width:180px}[_nghost-%COMP%]   .mat-column-key[_ngcontent-%COMP%]{flex:0 0 120px;min-width:120px}']});let n=t;return n}
223)(),AV=class{constructor(){this.columnsSubject=new Gn([])}connect(t){return this.columnsSubject.asObservable()}disconnect(t){this.columnsSubject.complete()}setColumns(t){this.columnsSubject.next(t)}};var sOe=["importStepper"],lOe=["columnsAssignmentComponent"],cOe=["failureDetailsEditor"],OV=n=>({count:n});function dOe(n,t){n&1&&O(0,"mat-progress-bar",35)}function pOe(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"import.stepper-text.select-file"))}function mOe(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"import.stepper-text.configuration"))}function uOe(n,t){if(n&1&&(d(0,"mat-option",36),g(1),p()),n&2){let r=t.$implicit;m("value",r.key),l(),j(" ",r.value," ")}}function hOe(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"import.stepper-text.column-type"))}function fOe(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"import.stepper-text.creat-entities"))}function gOe(n,t){n&1&&(g(0),v(1,"translate")),n&2&&z(C(1,1,"action.done"))}function bOe(n,t){if(n&1&&(d(0,"p",37),g(1),p()),n&2){let r=b();l(),j(" ",r.translate.instant("import.message.create-entities",Xe(1,OV,r.statistical.created))," ")}}
223function _Oe(n,t){if(n&1&&(d(0,"p",37),g(1),p()),n&2){let r=b();l(),j(" ",r.translate.instant("import.message.update-entities",Xe(1,OV,r.statistical.updated))," ")}}function vOe(n,t){if(n&1&&(d(0,"p",38),g(1),p()),n&2){let r=b();l(),j(" ",r.translate.instant("import.message.error-entities",Xe(1,OV,r.statistical.errors))," ")}}function yOe(n,t){if(n&1){let r=B();d(0,"mat-expansion-panel",39),T("opened",function(){D(r);let i=b();return M(i.initEditor())}),d(1,"mat-expansion-panel-header",40)(2,"mat-panel-title")(3,"div",41),g(4,"import.details"),p()()(),O(5,"mat-divider")(6,"div",42,2),p()}n&2&&(m("expanded",!1),l(),m("collapsedHeight","38px")("expandedHeight","38px"))}var lM=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u,f){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.translate=s,this.importExport=c,this.fb=u,this.renderer=f,this.delimiters=[{key:",",value:","},{key:";",value:";"},{key:"|",value:"|"},{key:"	",value:"Tab"}],this.selectedIndex=0,this.isImportData=!1,this.initEditorComponent=!1,this.entityType=o.entityType,this.importTitle=o.importTitle,this.importFileLabel=o.importFileLabel,this.customerId=o.customerId,this.entityGroupId=o.entityGroupId,this.selectFileFormGroup=this.fb.group({importData:[null,[ke.required]]}),this.importParametersFormGroup=this.fb.group({delim:[",",[ke.required]],isHeader:[!0,[]],isUpdate:[!0,[]]}),this.columnTypesFormGroup=this.fb.group({columnsParam:[[],[]]})}ngAfterViewInit(){let e=this.columnsAssignmentComponent.columnTypes;this.entityType===G.DEVICE&&(e=e.concat(this.columnsAssignmentComponent.columnDeviceCredentials)),this.allowAssignColumn=e.map(i=>i.value)}ngOnDestroy(){this.aceEditor&&this.aceEditor.destroy(),super.ngOnDestroy()}cancel(){this.dialogRef.close(!1)}previousStep(){this.importStepper.previous()}nextStep(e){switch(e){case 2:this.importStepper.next();break;case 3:let i=this.selectFileFormGroup.get("importData").value,o=this.parseCSV(i);if(o===-1)this.importStepper.previous(),this.importStepper.selected.reset();else{this.parseData=o;let a=this.createColumnsData();this.columnTypesFormGroup.patchValue({columnsParam:a},{emitEvent:!0}),this.importStepper.next()}break;case 4:this.importStepper.next(),this.isImportData=!0,this.addEntities();break;case 6:this.dialogRef.close(!0);break}}parseCSV(e){let i={delim:this.importParametersFormGroup.get("delim").value,header:this.importParametersFormGroup.get("isHeader").value};return K8(e,i,(o,a)=>{this.store.dispatch(new Sr({message:this.translate.instant(o,a),type:"error"}))})}createColumnsData(){let e=[],i=this.importParametersFormGroup.get("isHeader").value;for(let o=0;o<this.parseData.headers.length;o++){let a,s;if(i){let c=this.parseData.headers[o].toUpperCase();s=this.allowAssignColumn.find(u=>u===c)}i&&s?a={type:s,key:this.parseData.headers[o].toLowerCase(),sampleData:this.parseData.rows[0][o]}:a={type:$t.serverAttribute,key:i?this.parseData.headers[o]:"",sampleData:this.parseData.rows[0][o]},e.push(a)}return e}addEntities(){let e={file:this.selectFileFormGroup.get("importData").value,customerId:this.customerId,entityGroupId:this.entityGroupId,mapping:{columns:this.processingColumnsParams(),delimiter:this.importParametersFormGroup.get("delim").value,header:this.importParametersFormGroup.get("isHeader").value,update:this.importParametersFormGroup.get("isUpdate").value}};this.importExport.bulkImportEntities(e,this.entityType,{ignoreErrors:!0}).subscribe(i=>{this.statistical=i,this.isImportData=!1,this.importStepper.next()})}processingColumnsParams(){let e=this.columnTypesFormGroup.get("columnsParam").value,i=[$t.serverAttribute,$t.timeseries,$t.sharedAttribute];return e.map(o=>({type:o.type,key:i.some(a=>a===o.type)?o.key:void 0}))}initEditor(){this.initEditorComponent||this.createEditor(this.failureDetailsEditorElmRef,this.statistical.errorsList)}createEditor(e,i){let o=e.nativeElement,a={mode:"ace/mode/java",theme:"ace/theme/github",showGutter:!1,showPrintMargin:!1,readOnly:!0},s={enableSnippets:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};a=re(re({},a),s);let c=i.map(u=>u.replace(`
224`,"")).join(`
225`);da().subscribe(u=>{this.aceEditor=u.edit(o,a),this.aceEditor.session.setUseWrapMode(!1),this.aceEditor.setValue(c,-1),this.updateEditorSize(o,c,this.aceEditor)})}updateEditorSize(e,i,o){let a=200;i&&i.length>0&&(a=16*i.split(`
226`).length+24);let s=Math.min(200,a);this.renderer.setStyle(e,"minHeight",s.toString()+"px"),this.renderer.setStyle(e,"height",a.toString()+"px"),o.resize()}};
226t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en),h(Ge),h(Td),h(Wt),h(Ni))},t.\u0275cmp=L({type:t,selectors:[["tb-import-csv-dialog"]],viewQuery:function(i,o){if(i&1&&(ae(sOe,7),ae(lOe,7),ae(cOe,5)),i&2){let a;Q(a=K())&&(o.importStepper=a.first),Q(a=K())&&(o.columnsAssignmentComponent=a.first),Q(a=K())&&(o.failureDetailsEditorElmRef=a.first)}},features:[ne([]),Ce],decls:96,vars:94,consts:[["importStepper",""],["columnsAssignmentComponent",""],["failureDetailsEditor",""],["color","primary",1,"flex","flex-row"],["translate",""],[1,"flex-1"],[3,"tb-help"],["mat-icon-button","","type","button",3,"click","disabled"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["mat-dialog-content",""],[3,"linear","selectedIndex"],[3,"stepControl"],[3,"formGroup"],["matStepLabel",""],[3,"disabled"],["formControlName","importData","required","",3,"label","allowedExtensions","accept","dropLabel"],[1,"flex","flex-row","items-center","justify-end","gap-5"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"flex","flex-col",3,"disabled"],[1,"mat-block"],["required","","formControlName","delim"],[3,"value",4,"ngFor","ngForOf"],[1,"flex","flex-col","gap-3"],["formControlName","isHeader"],["formControlName","isUpdate"],[1,"flex","flex-row","flex-wrap","items-center","justify-between"],[1,"flex","flex-row","flex-wrap","gap-5"],["formControlName","columnsParam",3,"entityType"],["color","warn","mode","indeterminate",1,"tb-import-progress"],[1,"flex","flex-col"],["class","mat-body-2",4,"ngIf"],["class","mat-body-2","style","margin-bottom: 0.8em",4,"ngIf"],["class","advanced-logs",3,"expanded","opened",4,"ngIf"],["color","warn","mode","indeterminate"],[3,"value"],[1,"mat-body-2"],[1,"mat-body-2",2,"margin-bottom","0.8em"],[1,"advanced-logs",3,"opened","expanded"],[3,"collapsedHeight","expandedHeight"],["translate","",1,"tb-small"],[1,"tb-failure-details"]],template:function(i,o){if(i&1){let a=B();d(0,"form")(1,"mat-toolbar",3)(2,"h2",4),g(3),p(),O(4,"span",5)(5,"div",6),d(6,"button",7),T("click",function(){return D(a),M(o.cancel())}),d(7,"mat-icon",8),g(8,"close"),p()()(),x(9,dOe,1,0,"mat-progress-bar",9),v(10,"async"),d(11,"div",10)(12,"mat-vertical-stepper",11,0)(14,"mat-step",12)(15,"form",13),x(16,pOe,2,3,"ng-template",14),d(17,"fieldset",15),v(18,"async"),O(19,"tb-file-input",16),v(20,"translate"),v(21,"translate"),p()(),d(22,"div",17)(23,"button",18),v(24,"async"),T("click",function(){return D(a),M(o.cancel())}),g(25),v(26,"translate"),p(),d(27,"button",19),v(28,"async"),T("click",function(){return D(a),M(o.nextStep(2))}),g(29),v(30,"translate"),p()()(),d(31,"mat-step",12)(32,"form",13),x(33,mOe,2,3,"ng-template",14),d(34,"fieldset",20),v(35,"async"),d(36,"mat-form-field",21)(37,"mat-label",4),g(38,"import.csv-delimiter"),p(),d(39,"mat-select",22),x(40,uOe,2,2,"mat-option",23),p()(),d(41,"div",24)(42,"mat-checkbox",25),g(43),v(44,"translate"),p(),d(45,"mat-checkbox",26),g(46),v(47,"translate"),p()()()(),d(48,"div",27)(49,"button",18),v(50,"async"),T("click",function(){return D(a),M(o.previousStep())}),g(51),v(52,"translate"),p(),d(53,"div",28)(54,"button",18),v(55,"async"),T("click",function(){return D(a),M(o.cancel())}),g(56),v(57,"translate"),p(),d(58,"button",19),v(59,"async"),T("click",function(){return D(a),M(o.nextStep(3))}),g(60),v(61,"translate"),p()()()(),d(62,"mat-step",12)(63,"form",13),x(64,hOe,2,3,"ng-template",14),O(65,"tb-table-columns-assignment",29,1),p(),d(67,"div",27)(68,"button",18),v(69,"async"),T("click",function(){return D(a),M(o.previousStep())}),g(70),v(71,"translate"),p(),d(72,"div",28)(73,"button",18),v(74,"async"),T("click",function(){return D(a),M(o.cancel())}),g(75),v(76,"translate"),p(),d(77,"button",19),v(78,"async"),T("click",function(){return D(a),M(o.nextStep(4))}),g(79),v(80,"translate"),p()()()(),d(81,"mat-step"),x(82,fOe,2,3,"ng-template",14),O(83,"mat-progress-bar",30),p(),d(84,"mat-step"),x(85,gOe,2,3,"ng-template",14),d(86,"div",31),x(87,bOe,2,3,"p",32)(88,_Oe,2,3,"p",32)(89,vOe,2,3,"p",33)(90,yOe,8,3,"mat-expansion-panel",34),p(),d(91,"div",17)(92,"button",19),v(93,"async"),T("click",function(){return D(a),M(o.nextStep(6))}),g(94),v(95,"translate"),p()()()()()()}i&2&&(l(3),z(o.importTitle),l(2),m("tb-help","entitiesImport"),l(),m("disabled",o.isImportData),l(3),m("ngIf",C(10,44,o.isLoading$)),l(3),m("linear",!0)("selectedIndex",o.selectedIndex),l(2),m("stepControl",o.selectFileFormGroup),l(),m("formGroup",o.selectFileFormGroup),l(2),m("disabled",C(18,46,o.isLoading$)),l(2),te("label",C(20,48,o.importFileLabel)),te("dropLabel",C(21,50,"import.drop-file-csv-or")),m("allowedExtensions","csv,txt")("accept",".csv,application/csv,text/csv,.txt,text/plain"),l(4),m("disabled",C(24,52,o.isLoading$)),l(2),z(C(26,54,"action.cancel")),l(2),m("disabled",C(28,56,o.isLoading$)||o.selectFileFormGroup.invalid||!o.selectFileFormGroup.dirty),l(2),z(C(30,58,"action.continue")),l(2),m("stepControl",o.importParametersFormGroup),l(),m("formGroup",o.importParametersFormGroup),l(2),m("disabled",C(35,60,o.isLoading$)),l(6),m("ngForOf",o.delimiters),l(3),j(" ",C(44,62,"import.csv-first-line-header")," "),l(3),j(" ",C(47,64,"import.csv-update-data")," "),l(3),m("disabled",C(50,66,o.isLoading$)),l(2),z(C(52,68,"action.back")),l(3),m("disabled",C(55,70,o.isLoading$)),l(2),z(C(57,72,"action.cancel")),l(2),m("disabled",C(59,74,o.isLoading$)),l(2),z(C(61,76,"action.continue")),l(2),m("stepControl",o.columnTypesFormGroup),l(),m("formGroup",o.columnTypesFormGroup),l(2),m("entityType",o.entityType),l(3),m("disabled",C(69,78,o.isLoading$)),l(2),z(C(71,80,"action.back")),l(3),m("disabled",C(74,82,o.isLoading$)),l(2),z(C(76,84,"action.cancel")),l(2),m("disabled",C(78,86,o.isLoading$)||o.columnTypesFormGroup.invalid||!o.columnTypesFormGroup.dirty),l(2),z(C(80,88,"action.continue")),l(8),m("ngIf",o.statistical==null?null:o.statistical.created),l(),m("ngIf",o.statistical==null?null:o.statistical.updated),l(),m("ngIf",o.statistical==null?null:o.statistical.errors),l(),m("ngIf",o.statistical==null||o.statistical.errorsList==null?null:o.statistical.errorsList.length),l(2),m("disabled",C(93,90,o.isLoading$)),l(2),z(C(95,92,"action.ok")))},dependencies:[Ke,ce,jt,yt,Pe,ra,Se,Jr,ze,At,ir,Dn,Kn,xt,la,Ss,Ts,Bl,zu,np,Cm,ur,xe,We,St,Qa,$e,Qe,Ms,Va,wy,Ve,be],styles:['@charset "UTF-8";[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-vertical-content form{padding-bottom:12px}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-vertical-stepper-header{pointer-events:none!important}[_nghost-%COMP%]     .mat-mdc-dialog-content .tb-import-progress{margin:7px 0}[_nghost-%COMP%]     .mat-mdc-dialog-content .tb-failure-details{width:100%;min-width:300px;height:100%;min-height:50px;margin-top:8px}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-expansion-panel{box-shadow:none}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-expansion-panel.advanced-logs{border:1px groove rgba(0,0,0,.25);padding:0;margin-bottom:1.6em}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-expansion-panel.advanced-logs .mat-expansion-panel-header{padding:0 8px}[_nghost-%COMP%]     .mat-mdc-dialog-content .mat-expansion-panel.advanced-logs .mat-expansion-panel-body{padding:0}']});let n=t;return n})();var FOe={};Ae(FOe,{MultipleGalleryImageInputComponent:()=>L0});y();var wOe=(n,t)=>({"tb-error":n,"tb-required":t}),xOe=()=>({preview:!0});function SOe(n,t){if(n&1&&(d(0,"label",8),g(1),p()),n&2){let r=b
226();bt(Yi(3,wOe,!r.disabled&&r.required&&!r.imageUrls.length,!r.disabled&&r.required)),l(),z(r.label)}}function TOe(n,t){n&1&&(d(0,"div",16)(1,"mat-icon",17),g(2,"drag_indicator"),p()())}function EOe(n,t){if(n&1){let r=B();d(0,"div",18)(1,"button",19),v(2,"translate"),T("click",function(){D(r);let i=b().index,o=b();return M(o.clearImage(i))}),d(3,"mat-icon"),g(4,"close"),p()()()}n&2&&(l(),te("matTooltip",C(2,1,"action.remove")))}function IOe(n,t){if(n&1){let r=B();d(0,"div",9),T("dndStart",function(){let i=D(r).index,o=b();return M(o.imageDragStart(i))})("dndEnd",function(){D(r);let i=b();return M(i.imageDragEnd())}),d(1,"span",10),g(2),v(3,"translate"),p(),d(4,"div",11),x(5,TOe,3,0,"div",12),d(6,"div",13),O(7,"img",14),v(8,"image"),v(9,"async"),p(),x(10,EOe,5,3,"div",15),p()()}if(n&2){let r=t.$implicit,e=t.index,i=b();Y("image-dragging",i.dragIndex===e),m("dndDraggable",r)("dndDisableIf",i.disabled),l(2),fa("",C(3,9,"image-input.images")," [",e,"]"),l(3),m("ngIf",!i.disabled),l(2),m("src",C(9,14,ft(8,11,r,hn(16,xOe))),yo),l(3),m("ngIf",!i.disabled)}}function kOe(n,t){n&1&&(d(0,"div",20),g(1),v(2,"translate"),p()),n&2&&(l(),z(C(2,1,"image-input.no-images")))}function DOe(n,t){if(n&1&&(O(0,"img",14),v(1,"image"),v(2,"async")),n&2){let r=b
226(3);m("src",C(2,3,C(1,1,r.externalLinkControl.value)),yo)}}function MOe(n,t){if(n&1&&(d(0,"div",25),x(1,DOe,3,5,"img",26),p()),n&2){let r=b(2),e=me(8);l(),m("ngIf",r.externalLinkControl.value)("ngIfElse",e)}}function AOe(n,t){if(n&1){let r=B();d(0,"div",27)(1,"div",28)(2,"div",29),g(3),v(4,"translate"),p(),d(5,"div",30)(6,"mat-form-field",31),O(7,"input",32),v(8,"translate"),p(),d(9,"button",33),v(10,"translate"),T("click",function(i){D(r);let o=b(2);return M(o.declineLink(i))}),d(11,"mat-icon"),g(12,"close"),p()(),d(13,"button",34),v(14,"translate"),T("click",function(i){D(r);let o=b(2);return M(o.applyLink(i))}),d(15,"mat-icon"),g(16,"check"),p()()()()()}if(n&2){let r=b(2);l(3),j(" ",C(4,6,"image.image-link")," "),l(4),te("placeholder",C(8,8,"widget-config.set")),m("formControl",r.externalLinkControl),l(2),te("matTooltip",C(10,10,"action.decline")),l(4),te("matTooltip",C(14,12,"action.apply")),m("disabled",!r.externalLinkControl.value)}}function OOe(n,t){if(n&1){let r=B();d(0,"div",35)(1,"button",36),T("click",function(i){D(r);let o=b(2);return M(o.toggleGallery(i))}),d(2,"tb-icon",37),g(3,"filter"),p(),d(4,"span",38),g(5,"image.browse-from-gallery"),p()(),d(6,"button",36),T("click",function(i){D(r);let o=b(2);return M(o.setLink(i))}),d(7,"tb-icon",37),g(8,"link"),p(),d(9,"span",38),g(10,"image.set-link"),p()()()}}function POe(n,t){if(n&1&&(d(0,"div",21),x(1,MOe,2,2,"div",22)(2,AOe,17,14,"div",23)(3,OOe,11,0,"div",24),p()),n&2){let r=b
226();l(),m("ngIf",r.linkType===r.ImageLinkType.external),l(),m("ngIf",r.linkType===r.ImageLinkType.external),l(),m("ngIf",r.linkType===r.ImageLinkType.none)}}function ROe(n,t){n&1&&(d(0,"div",39),g(1),v(2,"translate"),p()),n&2&&(l(),z(C(2,1,"image.no-image-selected")))}var V0=class V0 extends sn{constructor(t,r,e){super(t),this.store=t,this.dialog=r,this.cd=e,this.required=!1,this.ImageLinkType=ua,this.linkType=ua.none,this.externalLinkControl=new Nl(null),this.propagateChange=null}ngOnDestroy(){}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.reset(),this.imageUrls=i4(t)}updateModel(){this.cd.markForCheck(),this.propagateChange(n4(this.imageUrls))}reset(){this.linkType=ua.none,this.externalLinkControl.setValue(null,{emitEvent:!1})}clearImage(t){this.imageUrls.splice(t,1),this.updateModel()}setLink(t){t&&t.stopPropagation(),this.linkType=ua.external}declineLink(t){t&&t.stopPropagation(),this.reset()}applyLink(t){t&&t.stopPropagation(),this.imageUrls.push(this.externalLinkControl.value),this.reset(),this.updateModel()}toggleGallery(t){t&&t.stopPropagation(),this.dialog.open(Qm,{autoFocus:!1,disableClose:!1,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{imageSubType:za.IMAGE}}).afterClosed().subscribe(r=>{r&&(this.imageUrls.push(r.link),this.updateModel())})}imageDragStart(t){setTimeout(()=>{this.dragIndex=t,this.cd.markForCheck()})}imageDragEnd(){this.dragIndex=-1,this.cd.markForCheck()}imageDrop(t){let r=t.index;Bi(r)&&(r=this.imageUrls.length),Gh(this.imageUrls,this.dragIndex,r),this.dragIndex=-1,this.updateModel()}};V0.\u0275fac=function(r){return new(r||V0)(h(ve),h(Lr),h(Me))},V0.\u0275cmp=L({type:V0,selectors:[["tb-multiple-gallery-image-input"]],inputs:{label:"label",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>V0),multi:!0}]),Ce],decls:9,vars:8,consts:[["noImage",""],[1,"tb-container"],["class","tb-title",3,"class",4,"ngIf"],["dndDropzone","","dndEffectAllowed","move",1,"images-container","flex","flex-row","gap-2",3,"dndDrop","dndHorizontal","dndDisableIf"],["dndPlaceholderRef","",1,"image-card","image-dnd-placeholder"],["dndEffectAllowed","move","class","image-card flex flex-col",3,"dndDraggable","dndDisableIf","image-dragging","dndStart","dndEnd",4,"ngFor","ngForOf"],["class","no-images-prompt",4,"ngIf"],["class","tb-image-select-container",4,"ngIf"],[1,"tb-title"],["dndEffectAllowed","move",1,"image-card","flex","flex-col",3,"dndStart","dndEnd","dndDraggable","dndDisableIf"],[1,"image-title"],[1,"image-content-container","flex","flex-row"],["dndHandle","","class","tb-image-action-container tb-drag-handle",4,"ngIf"],[1,"tb-image-preview-container"],[1,"tb-image-preview",3,"src"],["class","tb-image-action-container",4,"ngIf"],["dndHandle","",1,"tb-image-action-container","tb-drag-handle"],["color","primary"],[1,"tb-image-action-container"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",3,"click","matTooltip"],[1,"no-images-prompt"],[1,"tb-image-select-container"],["class","tb-image-container",4,"ngIf"],["class","tb-image-info-container",4,"ngIf"],["class","tb-image-select-buttons-container",4,"ngIf"],[1,"tb-image-container"],["class","tb-image-preview",3,"src",4,"ngIf","ngIfElse"],[1,"tb-image-info-container"],[1,"tb-external-image-container"],[1,"tb-external-link-label"],[1,"tb-external-link-input-container"],["appearance","outline","subscriptSizing","dynamic",1,"tb-inline-field"],["matInput","",3,"formControl","placeholder"],["type","button","mat-icon-button","","matTooltipPosition","above",1,"tb-image-decline-btn",3,"click","matTooltip"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",1,"tb-image-apply-btn",3,"click","disabled","matTooltip"],[1,"tb-image-select-buttons-container"],["mat-stroked-button","","type","button","color","primary",1,"tb-image-select-button",3,"click"],["matButtonIcon",""],["translate",""],[1,"tb-no-image"]],template:function(r,e){if(r&1){let i=B();d(0,"div",1),x(1,SOe,2,6,"label",2),d(2,"div",3),T("dndDrop",function(a){return D(i),M(e.imageDrop(a))}),O(3,"div",4),x(4,IOe,11,17,"div",5)(5,kOe,3,3,"div",6),p(),x(6,POe,4,3,"div",7),p(),x(7,ROe,3,3,"ng-template",null,0,kt)}r&2&&(l(),m("ngIf",e.label),l(),Y("no-images",!e.imageUrls.length),m("dndHorizontal",!0)("dndDisableIf",e.disabled),l(2),m("ngForOf",e.imageUrls),l(),m("ngIf",!e.imageUrls.length),l(),m("ngIf",!e.disabled))},dependencies:[Ke,ce,jt,yt,Pe,Se,at,ze,zt,ut,xe,Br,Nh,ly,cy,E0,In,Ve,be,Wo],styles:['@charset "UTF-8";.image-card[_ngcontent-%COMP%]{margin-bottom:8px}.image-card.image-dnd-placeholder[_ngcontent-%COMP%]{height:82px;width:146px;border:2px dashed rgba(0,0,0,.2);background:#0000001a;border-radius:4px}.image-card.image-dragging[_ngcontent-%COMP%]{display:none!important}.image-card[_ngcontent-%COMP%]   .image-title[_ngcontent-%COMP%]{font-size:11px;font-weight:400;line-height:14px;color:#0009;padding-bottom:4px}.image-card[_ngcontent-%COMP%]   .image-content-container[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.2);border-radius:4px;
226height:64px}.image-card[_ngcontent-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{width:auto;max-width:62px;height:auto;max-height:62px}.image-card[_ngcontent-%COMP%]   .tb-image-preview-container[_ngcontent-%COMP%]{position:relative;width:64px;height:64px;margin-top:-1px;margin-bottom:-1px;border:1px solid rgba(0,0,0,.54)}.image-card[_ngcontent-%COMP%]   .tb-image-preview-container[_ngcontent-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.image-card[_ngcontent-%COMP%]   .tb-image-action-container[_ngcontent-%COMP%]{position:relative;height:62px;display:flex;align-items:center;justify-content:center;min-width:40px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0;padding:0 0 16px;display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:block;padding-bottom:0}[_nghost-%COMP%]   .images-container[_ngcontent-%COMP%]{padding:12px 12px 4px;background:#00000008;border-radius:4px;flex-wrap:wrap;margin-bottom:8px}[_nghost-%COMP%]   .images-container.no-images[_ngcontent-%COMP%]{height:106px;padding-bottom:12px;align-items:center;justify-content:center}[_nghost-%COMP%]   .no-images-prompt[_ngcontent-%COMP%]{font-size:18px;color:#0000008a}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]{width:100%;height:96px;border-radius:4px;border:1px solid rgba(0,0,0,.12);display:flex;align-items:center}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-container[_ngcontent-%COMP%]{width:95px;height:94px;display:flex;justify-content:center;align-items:center;border-radius:4px;border-right:1px solid rgba(0,0,0,.12);background:#fff;overflow:hidden}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-image-preview[_ngcontent-%COMP%]{width:auto;max-width:94px;height:auto;max-height:94px}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-container[_ngcontent-%COMP%]   .tb-no-image[_ngcontent-%COMP%]{text-align:center;color:#00000061;font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.4px}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:0 8px;justify-content:flex-end;align-items:center;gap:4px}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:16px 8px 0 16px;flex-direction:column;align-items:flex-start;gap:4px}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-label[_ngcontent-%COMP%]{color:#0000008a;font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.4px}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-input-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:4px;align-self:stretch}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-input-container[_ngcontent-%COMP%]   .tb-inline-field[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-info-container[_ngcontent-%COMP%]   .tb-external-image-container[_ngcontent-%COMP%]   .tb-external-link-input-container[_ngcontent-%COMP%]   .tb-image-decline-btn[_ngcontent-%COMP%]{color:#00000061}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:8px;gap:8px;justify-content:center;align-items:flex-start}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]   .tb-image-select-button[_ngcontent-%COMP%]{width:100%;height:100%;align-self:stretch;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px;line-height:normal;font-size:12px}@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]   .tb-image-select-button[_ngcontent-%COMP%]{padding:16px}}[_nghost-%COMP%]   .tb-image-select-container[_ngcontent-%COMP%]   .tb-image-select-buttons-container[_ngcontent-%COMP%]   .tb-image-select-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:24px;height:24px;font-size:24px;margin:0}']});var L0=V0;pe([fe(),le("design:type",Object)],L0.prototype,"required",void 0);y();y();var gY="var(--tb-primary-500)",bY="#FFFFFF",NOe=6,VOe=12,LOe=12,BOe=18,jOe="rgba(0, 0, 0, 0.38)",GOe="rgba(0, 0, 0, 0.03)",hY="rgba(0, 0, 0, 0.08)",fY="rgba(0, 0, 0, 0)",jc=function(n){return n.outlined="outlined",n.filled="filled",n.underlined="underlined",n.basic="basic",n}(jc||{}),Zoi=Object.keys(jc),Joi=new Map([[jc.outlined,"widgets.button.outlined"],[jc.filled,"widgets.button.filled"],[jc.underlined,"widgets.button.underlined"],[jc.basic,"widgets.button.basic"]]),eai=new Map([[jc.outlined,"assets/widget/button/outlined.svg"],[jc.filled,"assets/widget/button/filled.svg"],[jc.underlined,"assets/widget/button/underlined.svg"],[jc.basic,"assets/widget/button/basic.svg"]]),vs=function(n){return n.enabled="enabled",n.hovered="hovered",n.pressed="pressed",n.activated="activated",n.disabled="disabled",n}(vs||{}),zOe=Object.keys(vs),tai=new Map([[vs.enabled,"widgets.button-state.enabled"],[vs.hovered,"widgets.button-state.hovered"],[vs.pressed,"widgets.button-state.pressed"],[vs.activated,"widgets.button-state.activated"],[vs.disabled,"widgets.button-state.disabled"]]),_Y={type:jc.outlined,autoScale:!0,showLabel:!0,label:"Button",showIcon:!0,icon:"home",iconSize:24,iconSizeUnit:"px",mainColor:gY,backgroundColor:bY,customStyle:{enabled:null,hovered:null,pressed:null,activated:null,disabled:null}},$Oe="--tb-widget-button-main-color-",UOe="--tb-widget-button-background-color-",HOe="--tb-widget-button-box-sha
226dow-color-",B0=class{constructor(){}generateStateCss(t){let r=this.getMainColor(t),e=this.getBackgroundColor(t),o=t.type!==jc.basic?hY:fY,a=t.customStyle[this.state];a?.overrideMainColor&&a?.mainColor&&(r=a.mainColor),a?.overrideBackgroundColor&&a?.backgroundColor&&(e=a.backgroundColor),a?.overrideDropShadow&&(o=a.dropShadow?hY:fY);let s=`${$Oe}${this.state}: ${r};
227${UOe}${this.state}: ${e};
228${HOe}${this.state}: ${o};`,c=this.generateAdditionalStateCss(r,e);return c&&(s+=`
229${c}`),s}getMainColor(t){return t.mainColor||gY}getBackgroundColor(t){return t.backgroundColor||bY}generateAdditionalStateCss(t,r){return null}},PV=class extends B0{get state(){return vs.enabled}},RV=class extends B0{get state(){return vs.hovered}generateAdditionalStateCss(t){return`--tb-widget-button-main-color-hovered-filled: ${cM(t,NOe)};`}},FV=class extends B0{get state(){return vs.pressed}generateAdditionalStateCss(t){let r=cM(t,VOe),e=Hd(Zp(t)),i=e.setAlpha(e.getAlpha()*.1).toRgbString(),o=cM(t,BOe);return`--tb-widget-button-main-color-pressed-filled: ${r};
230--tb-widget-button-main-color-pressed-ripple: ${i};
231--tb-widget-button-main-color-pressed-ripple-filled: ${o};`}},NV=class extends B0{get state(){return vs.activated}generateAdditionalStateCss(t){return`--tb-widget-button-main-color-activated-filled: ${cM(t,LOe)};`}},VV=class extends B0{get state(){return vs.disabled}getMainColor(){return jOe}getBackgroundColor(){return GOe}},qOe=new Map([[vs.enabled,new PV],[vs.hovered,new RV],[vs.pressed,new FV],[vs.activated,new NV],[vs.disabled,new VV]]),WOe=".mat-mdc-button.mat-mdc-button-base.tb-widget-button",vY=n=>{let t="";for(let r of zOe){let e=qOe.get(r);t+=`
232${e.generateStateCss(n)}`}return`${WOe} {
233${t}
234}`},cM=(n,t)=>{let r=Hd(Zp(n)),e=r.getBrightness()/255,i;return e>=.4&&e<=.5?i=e+.2:i=Math.max(.1,Math.log10(e*8)),r.darken(i*t).toRgbString()};var YOe=["widgetButton"],QOe=["widgetButtonContent"];function KOe(n,t){if(n&1&&(d(0,"tb-icon",7),g(1),p()),n&2){let r=b
234(2);_n(r.iconStyle),l(),z(r.appearance.icon)}}function XOe(n,t){if(n&1&&(d(0,"span",8),g(1),v(2,"async"),p()),n&2){let r=b(2);l(),z(C(2,1,r.label$))}}function ZOe(n,t){if(n&1&&(d(0,"div",4,1),x(2,KOe,2,3,"tb-icon",5)(3,XOe,3,3,"span",6),p()),n&2){let r=b();l(2),m("ngIf",r.appearance.showIcon),l(),m("ngIf",r.appearance.showLabel)}}var JOe=60,ePe=24,tPe=16,xy=class xy{constructor(t,r,e){this.renderer=t,this.elementRef=r,this.utils=e,this.appearance=_Y,this.borderRadius="4px",this.disabled=!1,this.activated=!1,this.hovered=!1,this.pressed=!1,this.disableEvents=!1,this.clicked=new J,this.iconStyle={},this.mousePressed=!1}ngOnInit(){this.updateAppearance()}ngOnChanges(t){for(let r of Object.keys(t))t[r].firstChange||(r==="appearance"?this.updateAppearance():r==="borderRadius"?this.updateBorderRadius():r==="autoScale"&&this.updateAutoScale())}ngAfterViewInit(){this.updateAutoScale()}ngOnDestroy(){this.buttonResize$&&this.buttonResize$.disconnect(),this.clearAppearanceCss()}validateSize(){this.appearance.autoScale&&this.widgetButton.nativeElement&&this.onResize()}updateAppearance(){this.clearAppearanceCss(),this.appearance.showIcon&&(this.iconStyle=rm(this.appearance.iconSize,this.appearance.iconSizeUnit)),this.appearance.showLabel&&(this.label$=this.ctx?this.ctx.registerLabelPattern(this.appearance.label,this.label$):Z(this.appearance.label)),this.updateBorderRadius();let t=vY(this.appearance);this.appearanceCssClass=this.utils.applyCssToElement(this.renderer,this.elementRef.nativeElement,"tb-widget-button",t),this.updateAutoScale()}updateBorderRadius(){let t=pC(this.appearance.borderRadius);t?this.computedBorderRadius=t:this.computedBorderRadius=this.borderRadius}clearAppearanceCss(){this.appearanceCssClass&&(this.utils.clearCssElement(this.renderer,this.appearanceCssClass,this.elementRef?.nativeElement),this.appearanceCssClass=null)}updateAutoScale(){this.buttonResize$&&this.buttonResize$.disconnect(),this.widgetButton&&this.widgetButtonContent&&((De(this.autoScale)?this.autoScale:this.appearance.autoScale)?(this.buttonResize$=new ResizeObserver(()=>{this.onResize()}),this.buttonResize$.observe(this.widgetButton.nativeElement),this.onResize()):(this.renderer.setStyle(this.widgetButtonContent.nativeElement,"transform","none"),this.renderer.setStyle(this.widgetButtonContent.nativeElement,"width","100%")))}onResize(){let r=this.widgetButton.nativeElement.getBoundingClientRect().height/JOe,e=Math.min(r,1),i=this.widgetButton.nativeElement.getBoundingClientRect().width-ePe*e,o=this.widgetButton.nativeElement.getBoundingClientRect().height-tPe*e;this.renderer.setStyle(this.widgetButtonContent.nativeElement,"transform","scale(1)"),this.renderer.setStyle(this.widgetButtonContent.nativeElement,"width","auto");let a=this.widgetButtonContent.nativeElement.getBoundingClientRect().width,s=this.widgetButtonContent.nativeElement.getBoundingClientRect().height,c=Math.max(1,r),u=Math.min(Math.min(i/a,o/s),c),f=i/u;this.renderer.setStyle(this.widgetButtonContent.nativeElement,"width",f+"px"),this.renderer.setStyle(this.widgetButtonContent.nativeElement,"transform",`scale(${u})`)}};xy.\u0275fac=function(r){return new(r||xy)(h(Ni),h(ge),h(vn))},xy.\u0275cmp=L({type:xy,selectors:[["tb-widget-button"]],viewQuery:function(r,e){if(r&1&&(ae(YOe,5,ge),ae(QOe,5)),r&2){let i;Q(i=K())&&(e.widgetButton=i.first),Q(i=K())&&(e.widgetButtonContent=i.first)}},inputs:{appearance:"appearance",borderRadius:"borderRadius",autoScale:"autoScale",disabled:"disabled",activated:"activated",hovered:"hovered",pressed:"pressed",disableEvents:"disableEvents",ctx:"ctx"},outputs:{clicked:"clicked"},features:[lt],decls:3,vars:20,consts:[["widgetButton",""],["widgetButtonContent",""],["mat-button","","type","button",1,"tb-widget-button",3,"click","mousedown","mouseup","mouseleave","disabled"],["class","tb-widget-button-content",4,"ngIf"],[1,"tb-widget-button-content"],["matButtonIcon","",3,"style",4,"ngIf"],["class","tb-widget-button-label",4,"ngIf"],["matButtonIcon",""],[1,"tb-widget-button-label"]],template:function(r,e){if(r&1){let i=B();d(0,"button",2,0),T("click",function(a){return D(i),M(e.clicked.emit
234(a))})("mousedown",function(){return D(i),M(e.mousePressed=!0)})("mouseup",function(){return D(i),M(e.mousePressed=!1)})("mouseleave",function(){return D(i),M(e.mousePressed=!1)}),x(2,ZOe,4,2,"div",3),p()}r&2&&(bt("tb-"+e.appearance.type),hi("border-radius",e.computedBorderRadius)("pointer-events",e.disableEvents?"none":""),Y("tb-icon-only",e.appearance.showIcon&&!e.appearance.showLabel)("tb-pressed",e.mousePressed)("tb-pressed-state",e.pressed)("tb-hover-state",e.hovered)("tb-active-state",e.activated)("tb-disabled-state",e.disabled),m("disabled",e.disabled),l(2),m("ngIf",e.appearance.showIcon||e.appearance.showLabel))},dependencies:[ce,yt,In,Ve],styles:[`@charset "UTF-8";.mat-mdc-button.mat-mdc-button-base.tb-widget-button{width:100%;height:100%;min-width:0;padding:8px 12px;color:var(--tb-widget-button-main-color-enabled, var(--tb-primary-500));background-color:var(--tb-widget-button-background-color-enabled, #FFFFFF);box-shadow:0 4px 8px 0 var(--tb-widget-button-box-shadow-color-enabled, rgba(0, 0, 0, .08))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-icon-only{padding:8px}.mat-mdc-button.mat-mdc-button-base.tb-widget-button .mdc-button__label{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.mat-mdc-button.mat-mdc-button-base.tb-widget-button .tb-widget-button-content{width:100%;display:flex;flex-direction:row;gap:4px;justify-content:center;align-items:center}.mat-mdc-button.mat-mdc-button-base.tb-widget-button .tb-widget-button-content .mat-icon{margin:0}.mat-mdc-button.mat-mdc-button-base.tb-widget-button .tb-widget-button-content span.tb-widget-button-label{line-height:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-button.mat-mdc-button-base.tb-widget-button .mat-mdc-button-persistent-ripple:before{opacity:0}.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-outlined{border:1px solid var(--tb-widget-button-main-color-enabled, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-filled{color:var(--tb-widget-button-background-color-enabled, #FFFFFF);background-color:var(--tb-widget-button-main-color-enabled, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-underlined{border-bottom:2px solid var(--tb-widget-button-main-color-enabled, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-basic{background-color:transparent}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state),.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state){color:var(--tb-widget-button-main-color-hovered, var(--tb-primary-500));background-color:var(--tb-widget-button-background-color-hovered, #FFFFFF);box-shadow:0 4px 8px 0 var(--tb-widget-button-box-shadow-color-hovered, rgba(0, 0, 0, .08))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state):not(.tb-filled) .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state):not(.tb-filled) .mat-mdc-button-persistent-ripple:before{opacity:.04;background-color:var(--tb-widget-button-main-color-hovered, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state).tb-filled .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state).tb-filled .mat-mdc-button-persistent-ripple:before{opacity:1;background-color:var(--tb-widget-button-main-color-hovered-filled, #005e52)}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state).tb-outlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state).tb-outlined{border:1px solid var(--tb-widget-button-main-color-hovered, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state).tb-filled,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state).tb-filled{color:var(--tb-widget-button-background-color-hovered, #FFFFFF);background-color:var(--tb-widget-button-main-color-hovered, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state).tb-underlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state).tb-underlined{border-bottom:2px solid var(--tb-widget-button-main-color-hovered, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):hover:not(:active):not(.tb-active-state).tb-basic,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-hover-state:not(:active):not(.tb-active-state).tb-basic{background-color:transparent}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state:not(.tb-filled) .mat-mdc-button-ripple{background-color:var(--tb-widget-button-main-color-pressed-ripple, rgba(0, 105, 92, .1))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state.tb-filled .mat-mdc-button-ripple{background-color:var(--tb-widget-button-main-color-pressed-ripple-filled, #00483f)}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed:not(.tb-filled) .mat-ripple-element{background-color:var(--tb-widget-button-main-color-pressed-ripple, rgba(0, 105, 92, .1))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed.tb-filled .mat-ripple-element{background-color:var(--tb-widget-button-main-color-pressed-ripple-filled, #00483f)}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state{color:var(--tb-widget-button-main-color-pressed, var(--tb-primary-500));background-color:var(--tb-widget-button-background-color-pressed, #FFFFFF);
234box-shadow:0 4px 8px 0 var(--tb-widget-button-box-shadow-color-pressed, rgba(0, 0, 0, .08))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed:not(.tb-filled) .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state:not(.tb-filled) .mat-mdc-button-persistent-ripple:before{opacity:.12;background-color:var(--tb-widget-button-main-color-pressed, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed.tb-filled .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state.tb-filled .mat-mdc-button-persistent-ripple:before{opacity:1;background-color:var(--tb-widget-button-main-color-pressed-filled, #005349)}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed.tb-outlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state.tb-outlined{border:1px solid var(--tb-widget-button-main-color-pressed, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed.tb-filled,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state.tb-filled{color:var(--tb-widget-button-background-color-pressed, #FFFFFF);background-color:var(--tb-widget-button-main-color-pressed, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed.tb-underlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state.tb-underlined{border-bottom:2px solid var(--tb-widget-button-main-color-pressed, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed.tb-basic,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-pressed-state.tb-basic{background-color:transparent}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state),.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state){color:var(--tb-widget-button-main-color-activated, var(--tb-primary-500));background-color:var(--tb-widget-button-background-color-activated, #FFFFFF);box-shadow:0 4px 8px 0 var(--tb-widget-button-box-shadow-color-activated, rgba(0, 0, 0, .08))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state):not(.tb-filled) .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state):not(.tb-filled) .mat-mdc-button-persistent-ripple:before{opacity:.12;background-color:var(--tb-widget-button-main-color-activated, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state).tb-filled .mat-mdc-button-persistent-ripple:before,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state).tb-filled .mat-mdc-button-persistent-ripple:before{opacity:1;background-color:var(--tb-widget-button-main-color-activated-filled, #005349)}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state).tb-outlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state).tb-outlined{border:1px solid var(--tb-widget-button-main-color-activated, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state).tb-filled,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state).tb-filled{color:var(--tb-widget-button-background-color-activated, #FFFFFF);background-color:var(--tb-widget-button-main-color-activated, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state).tb-underlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state).tb-underlined{border-bottom:2px solid var(--tb-widget-button-main-color-activated, var(--tb-primary-500))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state):active:not(.tb-pressed):not(.tb-pressed-state).tb-basic,.mat-mdc-button.mat-mdc-button-base.tb-widget-button:not(:disabled):not(.tb-disabled-state).tb-active-state:not(.tb-pressed):not(.tb-pressed-state).tb-basic{background-color:transparent}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled:not(.tb-filled),.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state:not(.tb-filled){color:var(--tb-widget-button-main-color-disabled, rgba(0, 0, 0, .38));background-color:var(--tb-widget-button-background-color-disabled, rgba(0, 0, 0, .03));
234box-shadow:0 4px 8px 0 var(--tb-widget-button-box-shadow-color-disabled, rgba(0, 0, 0, .08))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled:not(.tb-filled).tb-outlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state:not(.tb-filled).tb-outlined{border:1px solid var(--tb-widget-button-main-color-disabled, rgba(0, 0, 0, .38))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled:not(.tb-filled).tb-filled,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state:not(.tb-filled).tb-filled{color:var(--tb-widget-button-background-color-disabled, rgba(0, 0, 0, .03));background-color:var(--tb-widget-button-main-color-disabled, rgba(0, 0, 0, .38))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled:not(.tb-filled).tb-underlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state:not(.tb-filled).tb-underlined{border-bottom:2px solid var(--tb-widget-button-main-color-disabled, rgba(0, 0, 0, .38))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled:not(.tb-filled).tb-basic,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state:not(.tb-filled).tb-basic{background-color:transparent}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled.tb-filled,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state.tb-filled{color:var(--tb-widget-button-background-color-disabled, rgba(0, 0, 0, .03));background-color:var(--tb-widget-button-main-color-disabled, rgba(0, 0, 0, .38));box-shadow:0 4px 8px 0 var(--tb-widget-button-box-shadow-color-disabled, rgba(0, 0, 0, .08))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled.tb-filled.tb-outlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state.tb-filled.tb-outlined{border:1px solid var(--tb-widget-button-background-color-disabled, rgba(0, 0, 0, .03))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled.tb-filled.tb-filled,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state.tb-filled.tb-filled{color:var(--tb-widget-button-main-color-disabled, rgba(0, 0, 0, .38));background-color:var(--tb-widget-button-background-color-disabled, rgba(0, 0, 0, .03))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled.tb-filled.tb-underlined,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state.tb-filled.tb-underlined{border-bottom:2px solid var(--tb-widget-button-background-color-disabled, rgba(0, 0, 0, .03))}.mat-mdc-button.mat-mdc-button-base.tb-widget-button:disabled.tb-filled.tb-basic,.mat-mdc-button.mat-mdc-button-base.tb-widget-button.tb-disabled-state.tb-filled.tb-basic{background-color:transparent}
235`],encapsulation:2});var jp=xy;pe([fe(),le("design:type",Object)],jp.prototype,"disabled",void 0);pe([fe(),le("design:type",Object)],jp.prototype,"activated",void 0);pe([fe(),le("design:type",Object)],jp.prototype,"hovered",void 0);pe([fe(),le("design:type",Object)],jp.prototype,"pressed",void 0);pe([fe(),le("design:type",Object)],jp.prototype,"disableEvents",void 0);y();var iPe=n=>({disabled:n}),nPe=(n,t)=>({"tb-error":n,"tb-required":t}),rPe=()=>({preview:!0}),oPe=n=>({loading:n});function aPe(n,t){if(n&1&&(d(0,"label",9),g(1),p()),n&2){let r=b
235();bt(Yi(3,nPe,!r.disabled&&r.required&&r.linkType===r.ScadaSymbolLinkType.none,!r.disabled&&r.required)),l(),z(r.label)}}function sPe(n,t){if(n&1&&(O(0,"img",10),v(1,"image"),v(2,"async")),n&2){let r=b();m("src",C(2,4,ft(1,1,r.scadaSymbolUrl,hn(6,rPe))),yo)}}function lPe(n,t){if(n&1&&(pt(0),d(1,"div",17),g(2),v(3,"customTranslate"),p(),ct()),n&2){let r=b(3);l(2),j(" ",C(3,1,r.imageResource.title)," ")}}function cPe(n,t){if(n&1&&(d(0,"div",15),x(1,lPe,4,3,"ng-container",16),p()),n&2){let r=b(2),e=me(10);bt(Xe(4,oPe,r.loadingImageResource)),l(),m("ngIf",!r.loadingImageResource)("ngIfElse",e)}}function dPe(n,t){if(n&1&&(d(0,"div",15)(1,"div",17),g(2),v(3,"customTranslate"),p()()),n&2){let r=b(2);l(2),j(" ",C(3,1,r.scadaSymbolMetadata.title)," ")}}function pPe(n,t){if(n&1){let r=B();d(0,"button",18),v(1,"translate"),T("click",function(){D(r);let i=b(2);return M(i.clearSymbol())}),d(2,"mat-icon"),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"scada.clear-symbol"))}function mPe(n,t){if(n&1&&(d(0,"div",11),x(1,cPe,2,6,"div",12)(2,dPe,4,3,"div",13)(3,pPe,4,3,"button",14),p()),n&2){let r=b
235();l(),m("ngIf",r.linkType===r.ScadaSymbolLinkType.resource),l(),m("ngIf",r.linkType===r.ScadaSymbolLinkType.content),l(),m("ngIf",r.linkType===r.ScadaSymbolLinkType.resource&&!r.disabled)}}function uPe(n,t){if(n&1){let r=B();d(0,"div",19)(1,"button",20),T("click",function(i){D(r);let o=b();return M(o.openGallery(i))}),d(2,"tb-icon",21),g(3,"filter"),p(),d(4,"span",22),g(5,"scada.browse-symbol-from-gallery"),p()()()}}function hPe(n,t){if(n&1&&(d(0,"div",23),g(1),v(2,"translate"),p()),n&2){let r=b();l(),z(C(2,1,r.disabled?"scada.no-symbol":"scada.no-symbol-selected"))}}function fPe(n,t){n&1&&O(0,"mat-spinner",24),n&2&&m("diameter",80)}var su=function(n){return n.none="none",n.content="content",n.resource="resource",n}(su||{}),j0=class j0 extends sn{constructor(t,r,e,i){super(t),this.store=t,this.imageService=r,this.dialog=e,this.cd=i,this.required=!1,this.loadingImageResource=!1,this.ScadaSymbolLinkType=su,this.linkType=su.none,this.propagateChange=null}ngOnInit(){this.scadaSymbolContent&&this.scadaSymbolMetadata&&(this.scadaSymbolUrl=e4+"svg+xml;base64,"+h4(this.scadaSymbolContent),this.linkType=su.content)}ngOnDestroy(){}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.disabled&&this.detectLinkType()}writeValue(t){if(t=uS(t),this.scadaSymbolUrl!==t&&(this.reset(),this.scadaSymbolUrl=t,this.detectLinkType(),this.linkType===su.resource)){let r=fS(this.scadaSymbolUrl);r?(this.loadingImageResource=!0,this.imageService.getImageInfo(r.type,r.key,{ignoreLoading:!0,ignoreErrors:!0}).subscribe({next:e=>{this.imageResource=e,this.loadingImageResource=!1,this.cd.markForCheck()},error:()=>{this.reset(),this.loadingImageResource=!1,this.cd.markForCheck()}})):(this.reset(),this.cd.markForCheck())}}detectLinkType(){this.scadaSymbolUrl?this.linkType=su.resource:this.linkType=su.none}updateModel(t){this.cd.markForCheck(),this.scadaSymbolUrl!==t&&(this.scadaSymbolUrl=t,this.propagateChange(hS(this.scadaSymbolUrl)))}reset(){this.linkType=su.none,this.imageResource=null}clearSymbol(){this.reset(),this.updateModel(null)}openGallery(t){t&&t.stopPropagation(),this.dialog.open(Qm,{autoFocus:!1,disableClose:!1,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{imageSubType:za.SCADA_SYMBOL}}).afterClosed().subscribe(r=>{r&&(this.linkType=su.resource,this.imageResource=r,this.updateModel(r.link))})}};j0.\u0275fac=function(r){return new(r||j0)(h(ve),h(vl),h(Lr),h(Me))},j0.\u0275cmp=L({type:j0,selectors:[["tb-scada-symbol-input"]],inputs:{label:"label",required:"required",disabled:"disabled",scadaSymbolContent:"scadaSymbolContent",scadaSymbolMetadata:"scadaSymbolMetadata"},features:[ne([{provide:ye,useExisting:he(()=>j0),multi:!0}]),Ce],decls:11,vars:9,consts:[["noSymbol",""],["loading",""],[1,"tb-container"],["class","tb-title",3,"class",4,"ngIf"],[1,"tb-scada-symbol-select-container"],[1,"tb-scada-symbol-container"],["class","tb-scada-symbol-preview",3,"src",4,"ngIf","ngIfElse"],["class","tb-scada-symbol-info-container",4,"ngIf"],["class","tb-scada-symbol-select-buttons-container",4,"ngIf"],[1,"tb-title"],[1,"tb-scada-symbol-preview",3,"src"],[1,"tb-scada-symbol-info-container"],["class","tb-resource-scada-symbol-container",3,"class",4,"ngIf"],["class","tb-resource-scada-symbol-container",4,"ngIf"],["class","tb-scada-symbol-clear-btn","type","button","mat-icon-button","","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],[1,"tb-resource-scada-symbol-container"],[4,"ngIf","ngIfElse"],[1,"tb-scada-symbol-title"],["type","button","mat-icon-button","","matTooltipPosition","above",1,"tb-scada-symbol-clear-btn",3,"click","matTooltip"],[1,"tb-scada-symbol-select-buttons-container"],["mat-stroked-button","","type","button","color","primary",1,"tb-scada-symbol-select-button",3,"click"],["matButtonIcon",""],["translate",""],[1,"tb-no-symbol"],["strokeWidth","4",3,"diameter"]],template:function(r,e){if(r&1&&(d(0,"div",2),x(1,aPe,2,6,"label",3),d(2,"div",4)(3,"div",5),x(4,sPe,3,7,"img",6),p(),x(5,mPe,4,3,"div",7)(6,uPe,6,0,"div",8),p()(),x(7,hPe,3,3,"ng-template",null,0,kt)(9,fPe,1,1,"ng-template",null,1,kt)),r&2){let i=me(8);l(),m("ngIf",e.label),l(),bt(Xe(7,iPe,e.disabled&&e.linkType===e.ScadaSymbol
235LinkType.none)),l(2),m("ngIf",e.linkType!==e.ScadaSymbolLinkType.none&&e.scadaSymbolUrl)("ngIfElse",i),l(),m("ngIf",e.linkType!==e.ScadaSymbolLinkType.none&&!e.disabled),l(),m("ngIf",e.linkType===e.ScadaSymbolLinkType.none&&!e.disabled)}},dependencies:[ce,jt,yt,Pe,Se,zt,Za,In,Ve,be,Wo,yl],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0;padding:0 0 16px;display:flex;flex-direction:column;gap:8px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:block;padding-bottom:0}[_nghost-%COMP%]   .tb-scada-symbol-select-container[_ngcontent-%COMP%]{width:100%;height:96px;border-radius:4px;border:1px solid rgba(0,0,0,.12);display:flex;align-items:center}[_nghost-%COMP%]   .tb-scada-symbol-select-container.disabled[_ngcontent-%COMP%]{width:96px}[_nghost-%COMP%]   .tb-scada-symbol-select-container.disabled[_ngcontent-%COMP%]   .tb-scada-symbol-container[_ngcontent-%COMP%]{width:94px;border-right:none}[_nghost-%COMP%]   .tb-scada-symbol-container[_ngcontent-%COMP%]{width:95px;height:94px;padding:8px;display:flex;justify-content:center;align-items:center;border-radius:4px;border-right:1px solid rgba(0,0,0,.12);background:#fff;overflow:hidden}[_nghost-%COMP%]   .tb-scada-symbol-preview[_ngcontent-%COMP%]{width:auto;max-width:94px;height:auto;max-height:94px}[_nghost-%COMP%]   .tb-no-symbol[_ngcontent-%COMP%]{text-align:center;color:#00000061;font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.4px}[_nghost-%COMP%]   .tb-scada-symbol-info-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:0 8px;justify-content:flex-end;align-items:center;gap:4px}[_nghost-%COMP%]   .tb-scada-symbol-info-container[_ngcontent-%COMP%]   .tb-resource-scada-symbol-container[_ngcontent-%COMP%]{padding:8px;display:flex;flex:1;align-self:stretch;justify-content:center;align-items:flex-start;flex-direction:column;gap:4px}[_nghost-%COMP%]   .tb-scada-symbol-info-container[_ngcontent-%COMP%]   .tb-resource-scada-symbol-container[_ngcontent-%COMP%]   .tb-scada-symbol-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;font-size:18px;font-style:normal;font-weight:500;line-height:24px;letter-spacing:.25px}[_nghost-%COMP%]   .tb-scada-symbol-info-container[_ngcontent-%COMP%]   .tb-resource-scada-symbol-container.loading[_ngcontent-%COMP%]{align-items:center}[_nghost-%COMP%]   .tb-scada-symbol-info-container[_ngcontent-%COMP%]   .tb-scada-symbol-clear-btn[_ngcontent-%COMP%]{color:#00000061}[_nghost-%COMP%]   .tb-scada-symbol-select-buttons-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:8px;gap:8px;justify-content:center;align-items:flex-start}[_nghost-%COMP%]   .tb-scada-symbol-select-buttons-container[_ngcontent-%COMP%]   .tb-scada-symbol-select-button[_ngcontent-%COMP%]{width:100%;height:100%;align-self:stretch;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px;line-height:normal;font-size:12px}@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-scada-symbol-select-buttons-container[_ngcontent-%COMP%]   .tb-scada-symbol-select-button[_ngcontent-%COMP%]{padding:16px}}[_nghost-%COMP%]   .tb-scada-symbol-select-buttons-container[_ngcontent-%COMP%]   .tb-scada-symbol-select-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:24px;height:24px;font-size:24px;margin:0}']});var Sy=j0;pe([fe(),le("design:type",Object)],Sy.prototype,"required",void 0);y();var gPe=["svgXmlEditor"],bPe=(n,t,r)=>({"tb-disabled":n,"fill-height":t,"no-label":r}),_Pe=()=>({}),vPe=n=>({minHeight:n}),yPe=(n,t)=>({"tb-error":n,"tb-required":t});function CPe(n,t){if(n&1&&(d(0,"label",11),g(1),p()),n&2){let r=b
235();bt(Yi(3,yPe,!r.disabled&&(r.hasErrors||r.required&&!r.modelValue),!r.disabled&&r.required)),l(),z(r.label)}}var qh=class qh{get required(){return this.requiredValue}set required(t){this.requiredValue=mt(t)}constructor(t,r,e,i,o,a){this.elementRef=t,this.utils=r,this.translate=e,this.store=i,this.raf=o,this.cd=a,this.ignoreChange=!1,this.fillHeight=!1,this.noLabel=!1,this.minHeight="200px",this.fullscreen=!1,this.hasErrors=!1,this.propagateChange=null}ngOnInit(){let t=this.svgXmlEditorElmRef.nativeElement,r={mode:"ace/mode/svg",showGutter:!0,showPrintMargin:!0,readOnly:this.disabled},e={enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0};r=re(re({},r),e),da().subscribe(i=>{this.svgXmlEditor=i.edit(t,r),this.svgXmlEditor.session.setUseWrapMode(!0),this.svgXmlEditor.setValue(this.modelValue?this.modelValue:"",-1),this.svgXmlEditor.setReadOnly(this.disabled),this.svgXmlEditor.on("change",()=>{this.ignoreChange||this.updateView()}),this.svgXmlEditor.session.on("changeAnnotation",()=>{let a=this.svgXmlEditor.session.getAnnotations().filter(s=>s.type==="error").length>0;this.hasErrors!==a&&(this.hasErrors=a,this.propagateChange(this.modelValue),this.cd.markForCheck())}),this.editorResize$=new ResizeObserver(()=>{this.onAceEditorResize()}),this.editorResize$.observe(t)})}ngOnDestroy(){this.editorResize$&&this.editorResize$.disconnect(),this.svgXmlEditor&&this.svgXmlEditor.destroy()}onAceEditorResize(){this.editorsResizeCaf&&(this.editorsResizeCaf(),this.editorsResizeCaf=null),this.editorsResizeCaf=this.raf.raf(()=>{this.svgXmlEditor.resize(),this.svgXmlEditor.renderer.updateFull()})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,this.svgXmlEditor&&this.svgXmlEditor.setReadOnly(this.disabled)}validate(t){return this.hasErrors?{svgXml:{valid:!1}}:null}writeValue(t){this.modelValue=t,this.svgXmlEditor&&(this.ignoreChange=!0,this.svgXmlEditor.setValue(this.modelValue?this.modelValue:"",-1),this.ignoreChange=!1)}updateView(){let t=this.svgXmlEditor.getValue();this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue),this.cd.markForCheck())}};qh.\u0275fac=function(r){return new(r||qh)(h(ge),h(vn),h(Ge),h(ve),h(es),h(Me))},qh.\u0275cmp=L({type:qh,selectors:[["tb-svg-xml"]],viewQuery:function(r,e){if(r&1&&ae(gPe,7),r&2){let i;Q(i=K())&&(e.svgXmlEditorElmRef=i.first)}},inputs:{label:"label",disabled:"disabled",fillHeight:"fillHeight",noLabel:"noLabel",minHeight:"minHeight",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>qh),multi:!0},{provide:zn,useExisting:he(()=>qh),multi:!0}])],decls:13,vars:19,consts:[["svgXmlEditor",""],["tb-fullscreen","",1,"tb-svg-xml","flex","flex-col",2,"background","#fff",3,"fullscreen"],[1,"tb-svg-xml-toolbar","flex","flex-row","items-center","justify-start",2,"min-height","40px"],["class","tb-title no-padding",3,"class",4,"ngIf"],[1,"flex-1"],[2,"width","initial"],["matTooltipPosition","above",2,"border-radius","50%",3,"click","matTooltip"],["type","button","mat-icon-button","",1,"tb-mat-32"],[1,"material-icons"],["id","tb-svg-xml-panel",1,"tb-svg-xml-content-panel","flex","flex-col"],["id","tb-svg-xml-input"],[1,"tb-title","no-padding"]],template:function(r,e){if(r&1){let i=B();d(0,"div",1)(1,"div",2),x(2,CPe,2,6,"label",3),O(3,"span",4),d(4,"fieldset",5)(5,"div",6),v(6,"translate"),T("click",function(){return D(i),M(e.fullscreen=!e.fullscreen)}),d(7,"button",7)(8,"mat-icon",8),g(9),p()()()()(),d(10,"div",9),O(11,"div",10,0),p()()}r&2&&(bt(rl(12,bPe,e.disabled,e.fillHeight,e.noLabel)),m("fullscreen",e.fullscreen),l(2),m("ngIf",!e.noLabel),l(3),te("matTooltip",C(6,10,e.fullscreen?"fullscreen.exit":"fullscreen.expand")),l(4),z(e.fullscreen?"fullscreen_exit":"fullscreen"),l(2),_n(e.fillHeight?hn(16,_Pe):Xe(17,vPe,e.minHeight)),Y("fill-height",e.fillHeight))},dependencies:[ce,Pe,Se,zt,xa,be],styles:[`@charset "UTF-8";.tb-svg-xml{position:relative}.tb-svg-xml.tb-disabled{color:#00000061}.tb-svg-xml.fill-height,.tb-svg-xml.no-label .tb-svg-xml-content-panel{height:100%}.tb-svg-xml.no-label .tb-svg-xml-toolbar{position:absolute;top:0;left:0;right:0;z-index:10;pointer-events:none}.tb-svg-xml.no-label .tb-svg-xml-toolbar button{pointer-events:auto}.tb-svg-xml .tb-svg-xml-content-panel{height:calc(100% - 40px);border:1px solid #c0c0c0}.tb-svg-xml .tb-svg-xml-content-panel #tb-svg-xml-input{width:100%;
235min-width:200px;height:100%}.tb-svg-xml:not(.tb-fullscreen){padding-bottom:15px}.tb-svg-xml .tb-svg-xml-toolbar>*:not(:last-child){margin-right:4px}.tb-svg-xml .tb-svg-xml-toolbar button.mat-mdc-button-base,.tb-svg-xml .tb-svg-xml-toolbar button.mat-mdc-button-base.tb-mat-32{background:#dcdcdc59;align-items:center;vertical-align:middle;min-width:32px;min-height:15px;padding:4px;font-size:.8rem;line-height:15px}.tb-svg-xml .tb-svg-xml-toolbar button.mat-mdc-button-base:not(.tb-help-popup-button),.tb-svg-xml .tb-svg-xml-toolbar button.mat-mdc-button-base.tb-mat-32:not(.tb-help-popup-button){color:#7b7b7b}.tb-svg-xml .tb-svg-xml-toolbar button.mat-mdc-button-base:not(.mat-mdc-icon-button){height:23px}.tb-svg-xml .tb-svg-xml-toolbar .tb-help-popup-button-loading{background:#f3f3f3}
236`],encapsulation:2});var G0=qh;pe([fe(),le("design:type",Object)],G0.prototype,"fillHeight",void 0);pe([fe(),le("design:type",Object)],G0.prototype,"noLabel",void 0);y();var wPe=["customMenuInput"],xPe=[[["","tb-error",""]],[["","tb-hint",""]]],SPe=["[tb-error]","[tb-hint]"],TPe=(n,t,r)=>({"tb-inline-field":n,flex:t,"tb-suffix-absolute":r}),EPe=n=>({entity:n});function IPe(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b
236();l(),z(r.label)}}function kPe(n,t){if(n&1){let r=B();d(0,"button",11),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",12),g(2,"close"),p()()}}function DPe(n,t){if(n&1&&(d(0,"mat-icon",13),v(1,"translate"),g(2," warning "),p()),n&2){let r=b();m("matTooltip",C(1,1,r.requiredText))}}function MPe(n,t){if(n&1&&(d(0,"mat-option",14),O(1,"span",15),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r.name,e.searchText),Ut)}}function APe(n,t){n&1&&(d(0,"div")(1,"span"),g(2),v(3,"translate"),p()()),n&2&&(l(2),z(C(3,1,"custom-menu.no-custom-menus-prompt")))}function OPe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"async"),p()),n&2){let r=b(2);l(),j(" ",C(2,1,r.translate.get("custom-menu.no-custom-menus-matching",Xe(3,EPe,r.searchText)))," ")}}function PPe(n,t){if(n&1){let r=B();d(0,"mat-option",14)(1,"div",16),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,APe,4,3,"div",17)(3,OPe,3,5,"ng-template",null,2,kt),p()()}if(n&2){let r=me(4),e=b();m("value",null),l(2),m("ngIf",!e.textIsNotEmpty(e.searchText))("ngIfElse",r)}}function RPe(n,t){n&1&&(d(0,"mat-error"),Fe(1),p())}function FPe(n,t){n&1&&(d(0,"mat-hint"),Fe(1,1),p())}var z0=class z0{set scope(t){this.scopeValue!==t&&(this.scopeValue=t,this.selectCustomMenuFormGroup.get("customMenu").patchValue("",{emitEvent:!1}),this.refresh$.next([]),this.dirty=!0)}get scope(){return this.scopeValue}constructor(t,r,e,i){this.store=t,this.translate=r,this.customMenuService=e,this.fb=i,this.dirty=!1,this.refresh$=new Te,this.label=this.translate.instant("custom-menu.custom-menu"),this.floatLabel="auto",this.appearance="fill",this.subscriptSizing="fixed",this.searchText="",this.propagateChange=o=>{},this.selectCustomMenuFormGroup=this.fb.group({customMenu:[null,this.required?[ke.required]:[]]})}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}ngOnInit(){this.filteredCustomMenus=Xt(this.refresh$.asObservable(),this.selectCustomMenuFormGroup.get("customMenu").valueChanges.pipe(Wi(150),et(t=>{let r;typeof t=="string"||!t?r=null:r=t.id,this.updateView(r)}),W(t=>t?typeof t=="string"?t:t.name:""),ii(t=>this.fetchCustomMenus(t)),Si()))}ngAfterViewInit(){}setDisabledState(t){this.disabled=t,this.disabled?this.selectCustomMenuFormGroup.disable({emitEvent:!1}):this.selectCustomMenuFormGroup.enable({emitEvent:!1})}writeValue(t){this.searchText="",t!=null?this.customMenuService.getCustomMenuInfo(t.id,{ignoreLoading:!0,ignoreErrors:!0}).subscribe(r=>{this.modelValue=r.id,this.selectCustomMenuFormGroup.get("customMenu").patchValue(r,{emitEvent:!1})}):(this.modelValue=null,this.selectCustomMenuFormGroup.get("customMenu").patchValue("",{emitEvent:!1})),this.dirty=!0}displayCustomMenuFn(t){return t?.name}onFocus(){this.dirty&&(this.selectCustomMenuFormGroup.get("customMenu").updateValueAndValidity({onlySelf:!0}),this.dirty=!1)}clear(){this.selectCustomMenuFormGroup.get("customMenu").patchValue(""),setTimeout(()=>{this.customMenuInput.nativeElement.blur(),this.customMenuInput.nativeElement.focus()},0)}textIsNotEmpty(t){return t&&t.length>0}updateView(t){this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}fetchCustomMenus(t){this.searchText=t;let r=new On(25,0,t,{property:"name",direction:Xn.ASC});return this.getCustomMenus(r).pipe(vt(()=>Z(yr())),W(e=>e.data))}getCustomMenus(t){return this.customMenuService.getCustomMenuInfos(t,this.scope,this.assigneeType,{ignoreLoading:!0})}};z0.\u0275fac=function(r){return new(r||z0)(h(ve),h(Ge),h($S),h(Wt))},z0.\u0275cmp=L({type:z0,selectors:[["tb-custom-menu-autocomplete"]],viewQuery:function(r,e){if(r&1&&ae(wPe,7),r&2){let i;Q(i=K())&&(e.customMenuInput=i.first)}},inputs:{label:"label",placeholder:"placeholder",scope:"scope",assigneeType:"assigneeType",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",inlineField:"inlineField",requiredText:"requiredText",required:"required",disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>z0),multi:!0}])],ngContentSelectors:SPe,decls:14,vars:25,consts:[["customMenuInput",""],["customMenuAutocomplete","matAutocomplete"],["searchNotEmpty",""],[1,"mat-block",3,"formGroup","floatLabel","appearance","subscriptSizing"],[4,"ngIf"],["matInput","","type","text","formControlName","customMenu",3,"focusin","placeholder","required","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip","class","tb-error",3,"matTooltip",4,"ngIf"],[1,"tb-autocomplete",3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"],[3,"value"],[3,"innerHTML"],[3,"click"],[4,"ngIf","ngIfElse"]],template:function(r,e){if(r&1){let i=B();Ct(xPe),d(0,"mat-form-field",3),x(1,IPe,2,1,"mat-label",4),d(2,"input",5,0),T("focusin",function(){return D(i),M(e.onFocus())}),p(),x(4,kPe,3,0,"button",6)(5,DPe,3,3,"mat-icon",7),d(6,"mat-autocomplete",8,1),x(8,MPe,3,5,"mat-option",9),v(9,"async"),x(10,PPe,5,3,"mat-option",10),v(11,"async"),p(),x(12,RPe,2,0,"mat-error",4)(13,FPe,2,0,"mat-hint",4),p()}if(r&2){let i,o=me(7);bt(rl(21,TPe,e.inlineField,e.inlineField,e.inlineField&&!e.selectCustomMenuFormGroup.get("customMenu").value)),m("formGroup",e.selectCustomMenuFormGroup)("floatLabel",e.floatLabel)("appearance",e.inlineField?"outline":e.appearance)("subscriptSizing",e.inlineField?"dynamic":e.subscriptSizing),l(),m("ngIf",!e.inlineField&&e.label),l(),te("placeholder",e.placeholder),m("required",e.required)("matAutocomplete",o),l(2),m("ngIf",e.selectCustomMenuFormGroup.get("customMenu").value&&!e.disabled),l(),m("ngIf",e.inlineField&&e.requiredText&&e.selectCustomMenuFormGroup.get("customMenu").hasError("required")&&e.selectCustomMenuFormGroup.get("customMenu").touched),l(),m("displayWith",e.displayCustomMenuFn),l(2),m("ngForOf",C(9,17,e.filteredCustomMenus)),l(2),m("ngIf",!((i=C(11,19,e.filteredCustomMenus))!=null&&i.length)),l(2),m("ngIf",!e.inlineField&&e.subscriptSizing!=="dynamic"),l(),m("ngIf",!e.inlineField&&e.subscriptSizing!=="dynamic")}},dependencies:[Ke,ce,Pe,Se,at,ze,At,to,ni,Yt,xt,zt,Ri,mi,ut,xe,We,St,$e,Qe,Ve,be,Mi],encapsulation:2});var $0=z0;pe([fe(),le("design:type",Boolean)],$0.prototype,"inlineField",void 0);pe([fe(),le("design:type",Boolean)],$0.prototype,"required",void 0);y();var NPe=["keyInput"];function VPe(n,t){if(n&1){let r=B();d(0,"button",8),T("click",function(){D(r);let i=b();return M(i.clear())}),d(1,"mat-icon",9),g(2,"close"),p()()}}function LPe(n,t){n&1&&(d(0,"mat-icon",5),v(1,"translate"),g(2," warning "),p()),n&2&&m("matTooltip",C(1,1,"common.hint.key-required"))}function BPe(n,t){if(n&1&&(d(0,"mat-option",7),O(1,"span",10),v(2,"highlight"),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),m("innerHTML",ft(2,2,r,e.searchText),Ut)}}function jPe(n,t){n&1&&(d(0,"mat-option",7),g(1),v(2,"translate"),p()),n&2&&(m("value",""),l(),z(C(2,2,"entity.no-keys-found")))}function GPe(n,t){if(n&1&&x(0,jPe,3,4,"mat-option",7),n&2){let r=b
236();_t(r.keyControl.value?-1:0)}}var LV=(()=>{let t=class t{constructor(e,i){this.fb=e,this.entityService=i,this.entityFilter=Oi.required(),this.dataKeyType=Oi.required(),this.keyScopeType=Oi(),this.keyControl=this.fb.control("",[ke.required]),this.searchText="",this.keyInputSubject=new Te,this.keys$=this.keyInputSubject.asObservable().pipe(ii(()=>this.cachedResult?Z(this.cachedResult):this.entityService.findEntityKeysByQuery({pageLink:{page:0,pageSize:100},entityFilter:this.entityFilter()},this.dataKeyType()===Zi.attribute,this.dataKeyType()===Zi.timeseries,this.keyScopeType())),W(o=>{switch(this.cachedResult=o,this.dataKeyType()){case Zi.attribute:return o.attribute;case Zi.timeseries:return o.timeseries;default:return[]}})),this.filteredKeys$=fu([this.keys$,this.keyControl.valueChanges.pipe(on(""))]).pipe(W(([o,a=""])=>(this.searchText=a,a?o.filter(s=>s.toLowerCase().includes(a.toLowerCase())):o))),this.keyControl.valueChanges.pipe(yi()).subscribe(o=>this.propagateChange(o)),ol(()=>{(this.keyScopeType()||this.entityFilter()&&this.dataKeyType())&&(this.cachedResult=null,this.searchText="")})}ngOnChanges(e){let i=e.entityFilter?.previousValue&&!Fn(e.entityFilter.currentValue,e.entityFilter.previousValue),o=e.keyScopeType?.previousValue&&e.keyScopeType.currentValue!==e.keyScopeType.previousValue,a=e.dataKeyType?.previousValue&&e.dataKeyType.currentValue!==e.dataKeyType.previousValue;(i||o||a)&&this.keyControl.setValue("",{emitEvent:!1})}clear(){this.keyControl.patchValue("",{emitEvent:!0}),setTimeout(()=>{this.keyInput.nativeElement.blur(),this.keyInput.nativeElement.focus()},0)}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}validate(){return this.keyControl.valid?null:{keyControl:!1}}writeValue(e){this.keyControl.patchValue(e,{emitEvent:!1})}};t.\u0275fac=function(i){return new(i||t)(h(Ai),h(rr))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-key-autocomplete"]],viewQuery:function(i,o){if(i&1&&ae(NPe,7),i&2){let a;Q(a=K())&&(o.keyInput=a.first)}},inputs:{entityFilter:[1,"entityFilter"],dataKeyType:[1,"dataKeyType"],keyScopeType:[1,"keyScopeType"]},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0},{provide:zn,useExisting:he(()=>t),multi:!0}]),lt],decls:12,vars:9,consts:[["keyInput",""],["keysAutocomplete","matAutocomplete"],["appearance","outline","subscriptSizing","dynamic",1,"tb-flex","no-gap","!w-full"],["matInput","","type","text","required","",3,"focusin","placeholder","formControl","matAutocomplete"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear"],["matSuffix","","matTooltipPosition","above","matTooltipClass","tb-error-tooltip",1,"tb-error",3,"matTooltip"],[1,"tb-autocomplete"],[3,"value"],["type","button","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"material-icons"],[3,"innerHTML"]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",2)(1,"input",3,0),v(3,"translate"),T("focusin",function(){return D(a),M(o.keyInputSubject.next())}),p(),x(4,VPe,3,0,"button",4)(5,LPe,3,3,"mat-icon",5),d(6,"mat-autocomplete",6,1),Ir(8,BPe,3,5,"mat-option",7,Jo,!1,GPe,1,1),v(11,"async"),p()()}if(i&2){let a=me(7);l(),te("placeholder",C(3,5,"action.set")),m("formControl",o.keyControl)("matAutocomplete",a),l(3),_t(o.keyControl.value?4:o.keyControl.hasError("required")&&o.keyControl.touched?5:-1),l(4),kr(C(11,7,o.filteredKeys$))}},dependencies:[Pe,Se,at,ze,Yt,xt,zt,Ri,mi,ut,xe,St,Br,Ve,be,Mi],encapsulation:2});let n=t;return n})();y();var dM=(()=>{let t=class t{constructor(e,i){this.imagePipe=e,this.sanitizer=i,this.domParser=new DOMParser}transform(e,i){let o=[],a=i?.getImageSrcCallback||(_=>_.getAttribute("src")),s=i?.setImageSrcCallback||null,c,u=null;typeof e=="string"?(u=this.domParser.parseFromString(e,"text/html"),c=u.images):c=e.getElementsByTagName("img");for(let _=0;_<c.length;_++){let I=c.item(_),S=a(I);o.push(this.imagePipe.transform(S,re({asString:!0,ignoreLoadingImage:!0},i||{})).pipe(et(F=>{I.setAttribute("src",F),s&&s(I,S,F)})))}let f;return o.length?f=Rn(o):f=Z(null),f.pipe(W(()=>{if(u){let _=u.body.innerHTML;return this.sanitizer.bypassSecurityTrustHtml(_)}return null}))}};t.\u0275fac=function(i){return new(i||t)(h(Wo,16),h(js,16))},t.\u0275pipe=_r({name:"htmlWithImage",type:t,pure:!0});let n=t;return n})();y();y();var lu=function(n){return n.MQTT_3_1="MQTT_3_1",n.MQTT_3_1_1="MQTT_3_1_1",n.MQTT_5="MQTT_5",n}(lu||{}),qsi=lu.MQTT_3_1_1,yY=new Map([[lu.MQTT_3_1,"MQTT 3.1"],[lu.MQTT_3_1_1,"MQTT 3.1.1"],[lu.MQTT_5,"MQTT 5.0"]]);function zPe(n,t){if(n&1&&(d(0,"mat-option",3),g(1),p()),n&2){let r=t.$implicit,e=b();m("value",r),l(),j(" ",e.mqttVersionTranslation.get(r)," ")}}var U0=class U0{constructor(){this.subscriptSizing="dynamic",this.appearance="fill",this.mqttVersions=Object.values(lu),this.mqttVersionTranslation=yY,this.required=!1,this.prop
236agateChange=t=>{}}ngOnChanges(t){for(let r of Object.keys(t)){let e=t[r];if(r==="excludeVersions"&&e.currentValue!==e.previousValue){let i=e.currentValue;i?.length?this.mqttVersions=Object.values(lu).filter(o=>!i.includes(o)):this.mqttVersions=Object.values(lu)}}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t}writeValue(t){this.modelValue=t}mqttVersionChanged(){this.updateView()}updateView(){this.propagateChange(this.modelValue)}};U0.\u0275fac=function(r){return new(r||U0)},U0.\u0275cmp=L({type:U0,selectors:[["tb-mqtt-version-select"]],inputs:{disabled:"disabled",subscriptSizing:"subscriptSizing",appearance:"appearance",excludeVersions:"excludeVersions",required:"required"},features:[ne([{provide:ye,useExisting:he(()=>U0),multi:!0}]),lt],decls:6,vars:5,consts:[[1,"flex","flex-1",3,"subscriptSizing","appearance"],["translate",""],[3,"ngModelChange","required","disabled","ngModel"],[3,"value"]],template:function(r,e){r&1&&(d(0,"mat-form-field",0)(1,"mat-label",1),g(2,"device-profile.mqtt-protocol-version"),p(),d(3,"mat-select",2),bi("ngModelChange",function(o){return gi(e.modelValue,o)||(e.modelValue=o),o}),T("ngModelChange",function(){return e.mqttVersionChanged()}),Ir(4,zPe,2,2,"mat-option",3,Jo),p()()),r&2&&(m("subscriptSizing",e.subscriptSizing)("appearance",e.appearance),l(3),m("required",e.required)("disabled",e.disabled),fi("ngModel",e.modelValue),l(),kr(e.mqttVersions))},dependencies:[jt,ze,At,Kn,xt,xe,St,eo],encapsulation:2});var Ty=U0;pe([fe(),le("design:type",Object)],Ty.prototype,"required",void 0);var uRe={};Ae(uRe,{SecretKeyInputComponent:()=>q0});y();var sRe={};Ae(sRe,{SecretStorageDialogComponent:()=>Qh});y();y();var Ns=function(n){return n.TEXT="TEXT",n.TEXT_FILE="TEXT_FILE",n}(Ns||{}),oli=new Map([[Ns.TEXT,"secret-storage.types.text"],[Ns.TEXT_FILE,"secret-storage.types.file"]]),CY=new Map([[Ns.TEXT,"secret-storage.create.text"],[Ns.TEXT_FILE,"secret-storage.create.file"]]),ali=(n,t)=>{if(t){let r={resource:n,success:!1,error:t};if(t?.status===400&&t?.error?.success===!1&&t?.error?.references){let e=t?.error?.references,i=[];if(e)for(let o of Object.keys(e)){let a=e[o];i.push.apply(i,a)}r.resourceIsReferencedError=!0,r.references=i}return r}else return{resource:n,success:!0}},Wh=n=>{if(fn(n)){let t=/^\${secret:([^;]+);type:[^}]+}$/,r=n.match(t);return r?r[1]:null}return null};y();var Yh=(()=>{let t=class t{constructor(e){this.http=e}getSecrets(e,i){return this.http.get(`/api/secrets${e.toQuery()}`,N(i))}saveSecret(e,i){return this.http.post("/api/secret",e,N(i))}deleteSecret(e,i){return this.http.delete(`/api/secret/${e}`,N(i))}updateSecretDescription(e,i,o){return this.http.put(`/api/secret/${e}/description`,i,N(o))}updateSecretValue(e,i,o){return this.http.put(`/api/secret/${e}/value`,i,N(o))}getSecretByName(e,i){let o=encodeURIComponent(e);return this.http.get(`/api/secret?name=${o}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var xY={};Ae(xY,{SecretAutocompleteComponent:()=>Ey});y();var wY=["converterInput"],$Pe=(n,t)=>t.id.id,UPe=n=>({entity:n});function HPe(n,t){n&1&&(d(0,"mat-icon",14),g(1,"close"),p())}function qPe(n,t){if(n&1){let r=B();d(0,"mat-chip-row",11),T("removed",function(){D(r);let i=b();return M(i.clear())}),O(1,"mat-icon",12),g(2),x(3,HPe,2,0,"mat-icon",13),p()}if(n&2){let r=b();m("removable",!r.disabled),l(2),j(" ",r.selectedSecret," "),l(),m("ngIf",!r.disabled)}}function WPe(n,t){if(n&1&&(d(0,"mat-option",8)(1,"div",15),O(2,"mat-icon",16),d(3,"div",17),O(4,"div",18),v(5,"highlight"),d(6,"div",19),g(7),p()()()()),n&2){let r=t.$implicit,e=b();m("value",r),l(4),m("innerHTML",nS(5,3,r.name,e.searchText,!0),Ut),l(3),z(r.description)}}function YPe(n,t){n&1&&(d(0,"span",21),g(1,"secret-storage.no-secrets-found"),p())}function QPe(n,t){if(n&1&&(d(0,"span"),g(1),v(2,"truncate"),v(3,"translate"),p()),n&2){let r=b
236(2);l(),j(" ",ft(3,6,"secret-storage.no-secrets-matching",Xe(9,UPe,ds(2,1,r.searchText,!0,6,"...")))," ")}}function KPe(n,t){if(n&1){let r=B();d(0,"mat-option",9)(1,"div",20),T("click",function(i){return D(r),M(i.stopPropagation())}),x(2,YPe,2,0,"span",21)(3,QPe,4,11,"span"),p()()}if(n&2){let r=b();m("value",null),l(2),_t(r.textIsNotEmpty(r.searchText)?3:2)}}function XPe(n,t){if(n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2){let r=b();l(),j(" ",C(2,1,r.requiredText)," ")}}var Ey=(()=>{let t=class t{constructor(e,i){this.secretStorageService=e,this.fb=i,this.searchText="",this.dirty=!1,this.propagateChange=()=>{},this.selectSecretFormGroup=this.fb.group({secret:[null,[ke.required]]})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}ngOnInit(){this.labelText=this.secretType===Ns.TEXT?"secret-storage.autocomplete-title.text":"secret-storage.autocomplete-title.file",this.requiredText=this.secretType===Ns.TEXT?"secret-storage.autocomplete-title.text-required":"secret-storage.autocomplete-title.file-required",this.filteredEntities=this.selectSecretFormGroup.get("secret").valueChanges.pipe(Wi(150),et(e=>{let i;e===null?this.clear():(typeof e=="string"||!e?i=null:(i=e.name,this.selectedSecret=e.name,this.converterInput.nativeElement.value=""),this.updateView(i))}),W(e=>e?typeof e=="string"?e.trim():e.name:""),ii(e=>this.fetchEntities(e)),Cs(1))}setDisabledState(e){this.disabled=e,this.disabled?this.selectSecretFormGroup.disable({emitEvent:!1}):this.selectSecretFormGroup.enable({emitEvent:!1})}writeValue(e){this.searchText="",De(e)?this.secretStorageService.getSecretByName(e,{ignoreLoading:!0}).subscribe(i=>{i&&(this.modelValue=i.name,this.selectedSecret=i.name,this.selectSecretFormGroup.get("secret").patchValue(i,{emitEvent:!1}))}):(this.modelValue=null,this.selectSecretFormGroup.get("secret").patchValue("",{emitEvent:!1})),this.dirty=!0}onFocus(){this.dirty&&(this.selectSecretFormGroup.get("secret").updateValueAndValidity({onlySelf:!0,emitEvent:!0}),this.dirty=!1)}updateView(e){this.modelValue!==e&&(this.modelValue=e,this.propagateChange(this.modelValue))}displayEntityFn(e){return e?e.name:void 0}fetchEntities(e){this.searchText=e;let i=50,o=new On(i,0,this.searchText,{property:"name",direction:Xn.ASC});return this.secretStorageService.getSecrets(o,{ignoreLoading:!0}).pipe(vt(()=>Z(yr())),W(a=>{let s;return s=a.data,this.secretType&&(s=s.filter(c=>c.type===this.secretType)),s}))}clear(){this.selectSecretFormGroup.get("secret").patchValue("",{emitEvent:!0}),this.converterInput.nativeElement.value="",this.selectedSecret=null,setTimeout(()=>{this.converterInput.nativeElement.blur(),this.converterInput.nativeElement.focus()},0)}textIsNotEmpty(e){return e?.trim().length>0}};t.\u0275fac=function(i){return new(i||t)(h(Yh),h(Ai))},t.\u0275cmp=L({type:t,selectors:[["tb-secret-autocomplete"]],viewQuery:function(i,o){if(i&1&&(ae(wY,7),ae(wY,7,mi)),i&2){let a;Q(a=K())&&(o.converterInput=a.first),Q(a=K())&&(o.converterAutocomplete=a.first)}},inputs:{secretType:"secretType",required:[2,"required","required",Re],disabled:"disabled"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),si],decls:17,vars:18,consts:[["chipList",""],["converterInput","","origin","matAutocompleteOrigin"],["labelAutocomplete","matAutocomplete"],["appearance","outline",1,"tb-secret-autocomplete",3,"formGroup"],[1,"mat-secret-chip-container",3,"required"],["class","mat-secret-chip tb-chip-row-ellipsis",3,"removable","removed",4,"ngIf"],["matInput","","type","text","formControlName","secret","matAutocompleteOrigin","",3,"focusin","readonly","matAutocompleteDisabled","matAutocompleteConnectedTo","matAutocomplete","matChipInputFor"],[1,"tb-autocomplete",3,"displayWith"],[3,"value"],[1,"tb-not-found",3,"value"],[4,"ngIf"],[1,"mat-secret-chip","tb-chip-row-ellipsis",3,"removed","removable"],["matChipAvatar","","svgIcon","mdi:key-variant",1,"icon-key"],["matChipRemove","",4,"ngIf"],["matChipRemove",""],[1,"tb-secret-autocomplete-option","flex","flex-row"],["svgIcon","mdi:key-variant",1,"tb-secret-autocomplete-option-icon"],[1,"flex-1"],[1,"tb-secret-autocomplete-option-name",3,"innerHTML"],[1,"tb-secret-autocomplete-option-description"],[1,"tb-not-found-content",3,"click"],["translate",""]],template:function(i,o){if(i&1){let a=B();d(0,"mat-form-field",3)(1,"mat-label"),g(2),v(3,"translate"),p(),d(4,"mat-chip-grid",4,0),x(6,qPe,4,3,"mat-chip-row",5),d(7,"input",6,1),T("focusin",function(){return D(a),M(o.onFocus())}),p()(),d(10,"mat-autocomplete",7,2),Ir(12,WPe,8,7,"mat-option",8,$Pe,!1,KPe,4,2,"mat-option",9),v(15,"async"),p(),x(16,XPe,3,3,"mat-error",10),p()}if(i&2){let a=me(5),s=me(9),c=me(11);m("formGroup",o.selectSecretFormGroup),l(2),z(C(3,14,o.labelText)),l(2),m("required",o.required),l(2),m("ngIf",o.selectedSecret),l(),Y("!hidden",o.selectedSecret),m("readonly",!!o.selectedSecret)("matAutocompleteDisabled",!!o.selectedSecret)("matAutocompleteConnectedTo",s)("matAutocomplete",c)("matChipInputFor",a),l(3),m("displayWith",o.displayEntityFn),l(2),kr(C(15,16,o.filteredEntities)),l(4),m("ngIf",o.selectSecretFormGroup.get("secret").hasError("required"))}},dependencies:[ce,jt,Se,at,ze,At,ni,xt,Ri,mi,na,hm,aa,sa,oa,Qo,ut,xe,We,$e,Qe,Ve,be,Mi,$o],styles:[`@charset "UTF-8";.tb-secret-autocomplete{width:100%}.tb-secret-autocomplete .mat-secret-chip-container .mat-secret-chip{margin:0 0 0 8px;--mdc-chip-container-height: 24px}.tb-secret-autocomplete .mat-secret-chip-container .mat-secret-chip .icon-key{--mdc-chip-with-icon-icon-color: rgba(0, 0, 0, .38)}.tb-secret-autocomplete-option{padding:6px 0;position:relative}.tb-secret-autocomplete-option-icon{width:28px;height:28px}.tb-secret-autocomplete-option-name{max-width:60ch;overflow:hidden;text-overflow:ellipsis;font-size:15px;font-weight:400;letter-spacing:.25px;line-height:130%}.tb-secret-autocomplete-option-description{max-width:60ch;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#00000061;line-height:100%}
237`],encapsulation:2});let n=t;return n})();var ZPe=()=>({standalone:!0});function JPe(n,t){n&1&&O(0,"mat-progress-bar",29)}function eRe(n,t){n&1&&O(0,"div",30)}function tRe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"secret-storage.name-required")," "))}function iRe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"secret-storage.name-pattern")," "))}function nRe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"secret-storage.name-max-length")," "))}function rRe(n,t){n&1&&(d(0,"mat-error"),g(1),v(2,"translate"),p()),n&2&&(l(),j(" ",C(2,1,"secret-storage.value-required")," "))}function oRe(n,t){if(n&1&&(d(0,"mat-form-field",15)(1,"mat-label",16),g(2,"secret-storage.value"),p(),O(3,"input",31,1),d(5,"mat-hint",24),g(6),p(),O(7,"tb-toggle-password",32),x(8,rRe,3,3,"mat-error",20),p()),n&2){let r=me(4),e=b();Y("!hidden",e.secretForm.get("type").value!==e.SecretStorageType.TEXT),l(6),j("",(r.value==null?null:r.value.length)||0,"/255"),l(2),m("ngIf",e.secretForm.get("value").hasError("required"))}}function aRe(n,t){if(n&1&&(O(0,"tb-file-input",22),v(1,"translate")),n&2){let r=b
237();te("dropLabel",C(1,3,"resource.drop-resource-file-or")),m("maxSizeByte",524288)("existingFileName",r.fileName)}}var Qh=(()=>{let t=class t extends An{constructor(e,i,o,a,s,c,u){super(e,i,a),this.store=e,this.router=i,this.data=o,this.dialogRef=a,this.destroyRef=s,this.fb=c,this.secretStorageService=u,this.createNew=!0,this.onlyCreateNew=!0,this.hideType=!0,this.secretType=Ns.TEXT,this.SecretStorageType=Ns,this.secretForm=this.fb.group({type:[Ns.TEXT,[]],name:["",[ke.required,ke.pattern("^[^{};]+$"),ke.maxLength(255)]],description:["",[]],value:["",[ke.required]]}),this.secret=new Nl(null)}ngOnInit(){this.createNewLabel=CY.get(this.data.type),this.secretForm.get("type").patchValue(this.data.type,{emitEvent:!1}),this.secretType=this.data.type,this.fileName=this.data.fileName,this.hideType=this.data.hideType,this.onlyCreateNew=this.data.onlyCreateNew,this.secretForm.get("type").valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>this.secretForm.get("value").patchValue("",{emitEvent:!1}));let e=Wh(this.data.value);e?(this.createNew=!1,this.secret.enable({emitEvent:!1}),this.secret.patchValue(e,{emitEvent:!1}),this.secretForm.disable({emitEvent:!1})):(this.secret.disable({emitEvent:!1}),this.secretForm.enable({emitEvent:!1}),this.createNew=!0,this.secretForm.get("value").patchValue(this.data.value))}onChange(e){e?(this.secretForm.enable({emitEvent:!1}),this.secret.disable({emitEvent:!1})):(this.secretForm.disable({emitEvent:!1}),this.secret.enable({emitEvent:!1}))}get dialogTitle(){return this.createNew?"secret-storage.dialog-title":"secret-storage.use-secret"}get addButtonLabel(){return this.createNew?"action.add":"secret-storage.action-use"}helpLinkId(){return"secretStorage"}cancel(){this.dialogRef.close(null)}prepareOutputSecret(e,i){return"${secret:"+e+";type:"+i+"}"}add(){this.createNew?this.secretStorageService.saveSecret(Lt(re({},fb(this.secretForm.value)),{value:this.secretForm.value.value})).subscribe(e=>{this.onlyCreateNew?this.dialogRef.close(e):this.dialogRef.close(this.prepareOutputSecret(e.name,this.data.type))}):this.onlyCreateNew?this.dialogRef.close(null):this.dialogRef.close(this.prepareOutputSecret(this.secret.value,this.data.type))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(vi),h(un),h(en),h(En),h(Ai),h(Yh))},t.\u0275cmp=L({type:t,selectors:[["tb-secret-storage-dialog"]],features:[Ce],decls:62,vars:58,consts:[["input",""],["valueInput",""],[2,"min-width","400px","width","700px",3,"ngSubmit"],["color","primary"],[1,"flex-1"],[3,"tb-help"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["color","warn","mode","indeterminate",4,"ngIf"],["style","height: 4px;",4,"ngIf"],["mat-dialog-content",""],[1,"flex","flex-full","flex-row","items-center","justify-start","mb-4"],["appearance","fill",1,"w-full",3,"ngModelChange","ngModel","ngModelOptions"],[3,"value"],[1,"tb-form-panel","no-gap","no-border","no-padding",3,"formGroup"],["appearance","outline",1,"mat-block"],["translate",""],["formControlName","type"],["appearance","outline","subscriptSizing","dynamic",1,"mat-block"],["matInput","","formControlName","name","type","text","autocomplete","off"],[4,"ngIf"],["appearance","outline",1,"mat-block",3,"!hidden"],["formControlName","value","required","","hideClearButtonOnEmpty","",3,"maxSizeByte","existingFileName","dropLabel"],["cdkTextareaAutosize","","matInput","","formControlName","description","rows","2",3,"maxLength"],["align","end"],["required","",1,"flex-1",3,"formControl","secretType"],["mat-dialog-actions","",1,"flex","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click","disabled"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["color","warn","mode","indeterminate"],[2,"height","4px"],["matInput","","formControlName","value","type","password","maxlength","255","autocomplete","new-password"],["matSuffix",""]],template:function(i,o){if(i&1){let a=B();d(0,"form",2),T("ngSubmit",function(){return D(a),M(o.add())}),d(1,"mat-toolbar",3)(2,"h2"),g(3),v(4,"translate"),p(),O(5,"span",4)(6,"div",5),d(7,"button",6),T("click",function(){return D(a),M(o.cancel())}),d(8,"mat-icon",7),g(9,"close"),p()()(),x(10,JPe,1,0,"mat-progress-bar",8),v(11,"async"),x(12,eRe,1,0,"div",9),v(13,"async"),d(14,"div",10)(15,"div",11)(16,"tb-toggle-select",12),bi("ngModelChange",function(c){return D(a),gi(o.createNew,c)||(o.createNew=c),M(c)}),T("ngModelChange",function(){return D(a),M(o.onChange(o.createNew))}),d(17,"tb-toggle-option",13),g(18),v(19,"translate"),p(),d(20,"tb-toggle-option",13),g(21),v(22,"translate"),p()()(),d(23,"section",14)(24,"mat-form-field",15)(25,"mat-label",16),g(26,"secret-storage.type"),p(),d(27,"mat-select",17)(28,"mat-option",13),g(29),v(30,"translate"),p(),d(31,"mat-option",13),g(32),v(33,"translate"),p()()(),d(34,"mat-form-field",18)(35,"mat-label",16),g(36,"secret-storage.name"),p(),O(37,"input",19),x(38,tRe,3,3,"mat-error",20)(39,iRe,3,3,"mat-error",20)(40,nRe,3,3,"mat-error",20),O(41,"mat-hint"),p(),x(42,oRe,9,4,"mat-form-field",21)(43,aRe,2,5,"tb-file-input",22),d(44,"mat-form-field",15)(45,"mat-label",16),g(46,"secret-storage.description"),p(),O(47,"textarea",23,0),d(49,"mat-hint",24),g(50),p()()(),d(51,"div"),O(52,"tb-secret-autocomplete",25),p()(),d(53,"div",26)(54,"button",27),v(55,"async"),T("click",function(){return D(a),M(o.cancel())}),g(56),v(57,"translate"),p(),d(58,"button",28),v(59,"async"),g(60),v(61,"translate"),p()()()}if(i&2){let a=me(48);l(3),z(C(4,35,o.dialogTitle)),l(3),m("tb-help",o.helpLinkId()),l(4),m("ngIf",C(11,37,o.isLoading$)),l(2),m("ngIf",!C(13,39,o.isLoading$)),l(3),Y("!hidden",o.onlyCreateNew),l(),fi("ngModel",o.createNew),m("ngModelOptions",hn(57,ZPe)),l(),m("value",!1),l(),z(C(19,41,"secret-storage.use-storage")),l(2),m("value",!0),l(),z(C(22,43,o.createNewLabel)),l(2),Y("!hidden",!o.createNew),m("formGroup",o.secretForm),l(),Y("!hidden",o.hideType),l(4),m("value",o.SecretStorageType.TEXT),l(),j(" ",C(30,45,"secret-storage.types.text")," "),l(2),m("value",o.SecretStorageType.TEXT_FILE),l(),j(" ",C(33,47,"secret-storage.types.file")," "),l(6),m("ngIf",o.secretForm.get("name").hasError("required")),l(),m("ngIf",o.secretForm.get("name").hasError("pattern")),l(),m("ngIf",o.secretForm.get("name").hasError("maxlength")),l(2),_t(o.secretForm.get("type").value===o.SecretStorageType.TEXT?42:43),l(5),m("maxLength",255),l(3),j("",(a.value==null?null:a.value.length)||0,"/255"),l(),Y("!hidden",o.createNew),l(),m("formControl",o.secret)("secretType",o.secretType),l(2),m("disabled",C(55,49,o.isLoading$)),l(2),j(" ",C(57,51,"action.cancel")," "),l(2),m("disabled",C(59,53,o.isLoading$)||(o.secretForm==null?null:o.secretForm.invali
237d)||(o.secret==null?null:o.secret.invalid)||!(o.secret!=null&&o.secret.dirty)&&!o.createNew),l(2),j(" ",C(61,55,o.addButtonLabel)," ")}},dependencies:[ce,jt,yt,Pe,Se,Jr,at,ze,At,to,ni,Yt,Yb,ir,gr,Dn,Kn,xt,ur,ut,xe,We,St,dT,eo,Qa,Br,$e,Qe,Ms,Va,Bh,Mm,ca,Ey,Ve,be],encapsulation:2});let n=t;return n})();function lRe(n,t){if(n&1&&(d(0,"mat-label"),g(1),p()),n&2){let r=b();l(),z(r.label)}}function cRe(n,t){if(n&1&&(d(0,"mat-chip-set",2)(1,"mat-chip",8),O(2,"mat-icon",9),g(3),p()()),n&2){let r=b();m("disabled",r.disabled),l(3),j(" ",r.secretStorageKey," ")}}function dRe(n,t){if(n&1){let r=B();d(0,"button",5),v(1,"translate"),T("click",function(i){D(r);let o=b();return M(o.openSecretKeyDialog(i))}),O(2,"mat-icon",10),p()}if(n&2){let r=b();Y("secret-warning-btn",!r.secretStorageKey&&!r.disabled&&!r.readonly&&r.secretKeyFormGroup.get("secretKey").value),te("matTooltip",C(1,4,"secret-storage.use-secret")),m("disabled",r.disabled||r.readonly)}}function pRe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b();l(),j(" ",r.requiredText," ")}}function mRe(n,t){if(n&1&&(d(0,"mat-error"),g(1),p()),n&2){let r=b
237();l(),j(" ",r.maxLengthErrorText," ")}}var H0=class H0 extends sn{constructor(t,r,e,i,o,a){super(),this.store=t,this.secretStorageService=r,this.userPermissionsService=e,this.dialog=i,this.fb=o,this.destroyRef=a,this.required=!1,this.readonly=!1,this.appearance="fill",this.allowSecret=Mr(this.store).authority!==Mt.CUSTOMER_USER,this.propagateChange=null}ngOnInit(){this.readonly=this.readonly||!this.userPermissionsService.hasGenericPermission(Ei.SECRET,qo.WRITE);let t=[];this.required&&t.push(ke.required),this.maxLength&&this.maxLengthErrorText&&t.push(ke.maxLength(this.maxLength)),this.secretKeyFormGroup=this.fb.group({secretKey:[null,t]}),this.secretKeyFormGroup.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateModel()})}ngOnChanges(t){if(t.required){let r=t.required;!r.firstChange&&r.currentValue!==r.previousValue&&this.updateValidators()}if(t.maxLength){let r=t.maxLength;!r.firstChange&&r.currentValue!==r.previousValue&&this.updateValidators()}}updateValidators(){if(this.secretKeyFormGroup){let t=[];this.required&&t.push(ke.required),this.maxLength&&this.maxLengthErrorText&&t.push(ke.maxLength(this.maxLength)),this.secretKeyFormGroup.get("secretKey").setValidators(t),this.secretKeyFormGroup.get("secretKey").updateValueAndValidity()}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}setDisabledState(t){this.disabled=t,t?this.secretKeyFormGroup.disable({emitEvent:!1}):this.secretKeyFormGroup.enable({emitEvent:!1})}writeValue(t){let r=Wh(t);this.modelValue=t,r?this.secretStorageService.getSecretByName(r,{ignoreErrors:!0}).subscribe({next:()=>{this.secretStorageKey=r,this.secretKeyFormGroup.patchValue({secretKey:this.modelValue},{emitEvent:!1})},error:()=>{this.secretStorageKey=null,this.secretKeyFormGroup.patchValue({secretKey:null},{emitEvent:!0}),this.secretKeyFormGroup.get("secretKey").markAsTouched()}}):(this.secretStorageKey=null,this.secretKeyFormGroup.patchValue({secretKey:this.modelValue},{emitEvent:!1}))}updateModel(){let t=this.secretKeyFormGroup.get("secretKey").value;this.secretStorageKey=Wh(t),this.modelValue!==t&&(this.modelValue=t,this.propagateChange(this.modelValue))}remove(t){t&&t.stopPropagation(),this.secretKeyFormGroup.get("secretKey").patchValue(null,{emitEvent:!0}),this.secretKeyFormGroup.get("secretKey").markAsTouched()}openSecretKeyDialog(t){t&&t.stopPropagation(),this.dialog.open(Qh,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{type:Ns.TEXT,value:this.secretKeyFormGroup.get("secretKey").value,hideType:!0}}).afterClosed().subscribe(r=>{r&&this.secretKeyFormGroup.get("secretKey").patchValue(r,{emitEvent:!0})})}};H0.\u0275fac=function(r){return new(r||H0)(h(ve),h(Yh),h(So),h(Lr),h(Wt),h(En))},H0.\u0275cmp=L({type:H0,selectors:[["tb-secret-key-input"]],inputs:{label:"label",requiredText:"requiredText",hint:"hint",required:[2,"required","required",Re],disabled:"disabled",readonly:[2,"readonly","readonly",Re],maxLength:"maxLength",maxLengthErrorText:"maxLengthErrorText",appearance:"appearance"},features:[ne([{provide:ye,useExisting:he(()=>H0),multi:!0}]),si,Ce,lt],decls:13,vars:19,consts:[["subscriptSizing","dynamic",1,"flex","flex-1",3,"formGroup","appearance"],[4,"ngIf"],[1,"secret-chip-container",3,"disabled"],["matInput","","type","password","autocomplete","new-password","name","custom-field","formControlName","secretKey",3,"required"],["matSuffix",""],["mat-icon-button","","matSuffix","","type","button","matTooltipPosition","above",1,"tb-small",3,"click","disabled","matTooltip"],["mat-icon-button","","matSuffix","","type","button","matTooltipPosition","above",1,"tb-small",3,"secret-warning-btn","disabled","matTooltip"],[3,"innerHTML"],[1,"secret-chip","tb-chip-row-ellipsis"],["matChipAvatar","","svgIcon","mdi:key-variant",1,"icon-key"],["svgIcon","mdi:key-variant"]],template:function(r,e){r&1&&(d(0,"mat-form-field",0),x(1,lRe,2,1,"mat-label",1)(2,cRe,4,2,"mat-chip-set",2),O(3,"input",3)(4,"tb-toggle-password",4),d(5,"button",5),v(6,"translate"),T("click",function(o){return e.remove(o)}),d(7,"mat-icon"),g(8,"close"),p()(),x(9,dRe,3,6,"button",6),O(10,"mat-hint",7),x(11,pRe,2,1,"mat-error",1)(12,mRe,2,1,"mat-error",1),p()),r&2&&(m("formGroup",e.secretKeyFormGroup)("appearance",e.appearance),l(),m("ngIf",e.label),l(),_t(e.secretStorageKey?2:-1),l(),Y("!hidden",e.secretStorageKey),m("required",e.required),l(),Y("!hidden",e.secretStorageKey),l(),Y("!hidden",!e.secretStorageKey||e.disabled),te("matTooltip",C(6,17,"action.remove")),m("disabled",e.disabled),l(4),_t(e.allowSecret?9:-1),l(),te("innerHTML",e.hint,Ut),l(),m("ngIf",e.secretKeyFormGroup.get("secretKey").hasError("required")),l(),m("ngIf",e.secretKeyFormGroup.get("secretKey").hasError("maxlength")))},dependencies:[ce,Pe,Se,at,ze,At,to,ni,Yt,zt,wl,hm,Xc,ut,xe,We,St,$e,Qe,Bh,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .secret-warning-btn[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #FF5722;--mdc-icon-button-disabled-icon-color: #FF5722}[_nghost-%COMP%]     .mat-mdc-form-field .mat-mdc-form-field-icon-suffix{display:flex}[_nghost-%COMP%]     .secret-chip-container .secret-chip{margin:0 0 0 8px;--mdc-chip-container-height: 24px;--mdc-chip-with-icon-icon-color: rgba(0, 0, 0, .38)}']});var q0=H0;pe([U_(),le("design:type",Number)],q0.prototype,"maxLength",void 0);var ERe={};Ae(ERe,{SecretFileInputComponent:()=>mM});y();var hRe=(n,t)=>({"tb-error":n,"tb-required":t});function fRe(n,t){if(n&1&&(d(0,"label",6),g(1),p()),n&2){let r=b
237();bt(Yi(3,hRe,!r.disabled&&r.required&&!r.secretFileFormGroup.get("secretFile").value,!r.disabled&&r.required)),l(),z(r.label)}}function gRe(n,t){n&1&&Ti(0)}function bRe(n,t){if(n&1&&(d(0,"div",5)(1,"label",6),g(2,"Secret storage"),p(),d(3,"div",7)(4,"mat-form-field",8)(5,"mat-chip-set",9)(6,"mat-chip",10),O(7,"mat-icon",11),g(8),p()(),O(9,"input",12),p(),x(10,gRe,1,0,"ng-container",13),p()()),n&2){let r=b(),e=me(6);l(5),m("disabled",r.disabled),l(3),j(" ",r.secretStorageFile," "),l(2),m("ngTemplateOutlet",e)}}function _Re(n,t){if(n&1){let r=B();d(0,"button",21),T("click",function(i){D(r);let o=b(3);return M(o.openSecretKeyDialog(i))}),d(1,"tb-icon",18),g(2,"mdi:key-variant"),p(),d(3,"span",22),g(4,"secret-storage.use-secret-storage"),p()()}if(n&2){let r=b(3);m("disabled",r.readonly)}}function vRe(n,t){if(n&1){let r=B();d(0,"div",16)(1,"button",17),T("click",function(){D(r);let i=me(8);return M(i.flowInput.nativeElement.click())}),d(2,"tb-icon",18),g(3,"cloud_upload"),p(),d(4,"label"),g(5),v(6,"translate"),p()(),d(7,"tb-file-input",19,1),T("fileNameChanged",function(i){D(r);let o=b(2);return M(o.fileNameChange(i))}),p(),x(9,_Re,5,1,"button",20),p()}if(n&2){let r=b(2);l(5),z(C(6,6,"file-input.browse-file")),l(2),m("maxSizeByte",r.maxSizeByte)("accept",r.accept)("allowedExtensions",r.allowedExtensions)("inputId",r.inputId),l(2),_t(r.allowSecret?9:-1)}}function yRe(n,t){n&1&&Ti(0)}function CRe(n,t){if(n&1&&(d(0,"div",23)(1,"div",24)(2,"div",25),g(3),p()(),x(4,yRe,1,0,"ng-container",13),p()),n&2){let r=b
237(2),e=me(6);l(3),j(" ",r.existingFileName," "),l(),m("ngTemplateOutlet",e)}}function wRe(n,t){if(n&1&&x(0,vRe,10,8,"div",14)(1,CRe,5,2,"div",15),n&2){let r=b();m("ngIf",!r.existingFileName),l(),m("ngIf",r.existingFileName)}}function xRe(n,t){if(n&1){let r=B();d(0,"button",28),v(1,"translate"),T("click",function(i){D(r);let o=b(2);return M(o.openSecretKeyDialog(i))}),O(2,"mat-icon",29),p()}if(n&2){let r=b(2);Y("secret-warning-btn",!r.secretStorageFile&&!r.readonly),te("matTooltip",C(1,4,"secret-storage.use-secret")),m("disabled",r.disabled||r.readonly)}}function SRe(n,t){if(n&1){let r=B();d(0,"button",30),v(1,"translate"),T("click",function(i){D(r);let o=b(2);return M(o.remove(i))}),d(2,"mat-icon"),g(3,"close"),p()()}n&2&&te("matTooltip",C(1,1,"action.remove"))}function TRe(n,t){if(n&1&&x(0,xRe,3,6,"button",26)(1,SRe,4,3,"button",27),n&2){let r=b();_t(r.allowSecret?0:-1),l(),m("ngIf",!r.disabled)}}var mM=(()=>{let t=class t extends sn{constructor(e,i,o,a,s,c,u){super(),this.store=e,this.dialog=i,this.secretStorageService=o,this.userPermissionsService=a,this.utils=s,this.fb=c,this.destroyRef=u,this.inputId=this.utils.guid(),this.required=!1,this.readonly=!1,this.fileNameChanged=new J,this.accept="*/*",this.maxSizeByte=524288,this.allowSecret=Mr(this.store).authority!==Mt.CUSTOMER_USER,this.propagateChange=null}ngOnInit(){this.readonly=this.readonly||!this.userPermissionsService.hasGenericPermission(Ei.SECRET,qo.WRITE),this.secretFileFormGroup=this.fb.group({secretFile:[null,this.required?[ke.required]:[]]}),this.secretFileFormGroup.valueChanges.pipe(yi(this.destroyRef)).subscribe(()=>{this.updateModel()})}ngOnChanges(e){if(e.required){let i=e.required;!i.firstChange&&i.currentValue!==i.previousValue&&this.updateValidators()}}updateValidators(){this.secretFileFormGroup&&(this.secretFileFormGroup.get("secretFile").setValidators(this.required?[ke.required]:[]),this.secretFileFormGroup.get("secretFile").updateValueAndValidity())}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e,e?this.secretFileFormGroup.disable({emitEvent:!1}):this.secretFileFormGroup.enable({emitEvent:!1})}writeValue(e){let i=Wh(e);this.modelValue=e,i?this.secretStorageService.getSecretByName(i,{ignoreErrors:!0}).subscribe({next:()=>{this.secretStorageFile=i,this.existingFileName=null,this.secretFileFormGroup.patchValue({secretFile:this.modelValue},{emitEvent:!1})},error:()=>{this.secretStorageFile=null,this.existingFileName=null,this.secretFileFormGroup.patchValue({secretFile:null},{emitEvent:!0})}}):(this.secretStorageFile=null,this.secretFileFormGroup.patchValue({secretFile:this.modelValue},{emitEvent:!1}))}fileNameChange(e){this.existingFileName=e,this.fileNameChanged.emit(this.existingFileName)}updateModel(){let e=this.secretFileFormGroup.get("secretFile").value;this.secretStorageFile=Wh(e),this.modelValue!==e&&(this.modelValue=e),this.propagateChange(this.modelValue)}remove(e){e&&e.stopPropagation(),this.secretFileFormGroup.get("secretFile").patchValue(null,{emitEvent:!0}),this.fileNameChanged.emit(""),this.existingFileName=null}openSecretKeyDialog(e){e&&e.stopPropagation(),this.dialog.open(Qh,{disableClose:!0,panelClass:["tb-dialog","tb-fullscreen-dialog"],data:{type:Ns.TEXT_FILE,value:this.secretFileFormGroup.get("secretFile").value,fileName:this.existingFileName,hideType:!0}}).afterClosed().subscribe(i=>{i&&this.secretFileFormGroup.get("secretFile").patchValue(i,{emitEvent:!0})})}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(Lr),h(Yh),h(So),h(vn),h(Wt),h(En))},t.\u0275cmp=L({type:t,selectors:[["tb-secret-file-input"]],inputs:{label:"label",noFileText:"noFileText",existingFileName:"existingFileName",inputId:"inputId",required:[2,"required","required",Re],disabled:"disabled",readonly:[2,"readonly","readonly",Re],accept:"accept",maxSizeByte:"maxSizeByte",allowedExtensions:"allowedExtensions"},outputs:{fileNameChanged:"fileNameChanged"},features:[ne([{provide:ye,useExisting:he(()=>t),multi:!0}]),si,Ce,lt],decls:7,vars:3,consts:[["btnContainer",""],["flowInput",""],[1,"tb-container","flex-col","gt-sm:flex-row",3,"formGroup"],["class","tb-title",3,"class",4,"ngIf"],[1,"tb-secret-select-container"],[1,"flex","flex-col","flex-1","p-2"],[1,"tb-title"],[1,"flex","flex-row","items-center"],["appearance","outline","subscriptSizing","dynamic",1,"flex","flex-1"],[1,"secret-chip-container",3,"disabled"],[1,"secret-chip","tb-chip-row-ellipsis"],["matChipAvatar","","svgIcon","mdi:key-variant",1,"icon-key"],["matInput","","required","","type","password","formControlName","secretFile","autocomplete","new-password",1,"input-hidden"],[4,"ngTemplateOutlet"],["class","tb-secret-select-buttons-container",4,"ngIf"],["class","tb-secret-info-container",4,"ngIf"],[1,"tb-secret-select-buttons-container"],["mat-stroked-button","","type","button","color","primary",1,"tb-secret-select-button",3,"click"],["matButtonIcon",""],["formControlName","secretFile",1,"hidden",3,"fileNameChanged","maxSizeByte","accept","allowedExtensions","inputId"],["mat-stroked-button","","type","button","color","primary",1,"tb-secret-select-button",3,"disabled"],["mat-stroked-button","","type","button","color","primary",1,"tb-secret-select-button",3,"click","disabled"],["translate",""],[1,"tb-secret-info-container"],[1,"tb-resource-secret-container"],[1,"tb-resource-secret-name"],["mat-icon-button","","matSuffix","","matTooltipPosition","above",1,"tb-small","tb-secret-btn",3,"secret-warning-btn","disabled","matTooltip"],["class","tb-secret-btn","type","button","mat-icon-button","","matTooltipPosition","above",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","matSuffix","","matTooltipPosition","above",1,"tb-small","tb-secret-btn",3,"click","disabled","matTooltip"],["svgIcon","mdi:key-variant"],["type","button","mat-icon-button","","matTooltipPosition","above",1,"tb-secret-btn",3,"click","matTooltip"]],template:function(i,o){i&1&&(d(0,"div",2),x(1,fRe,2,6,"label",3),d(2,"div",4),x(3,bRe,11,3,"div",5)(4,wRe,2,2),p()(),x(5,TRe,2,2,"ng-template",null,0,kt)),i&2&&(m("formGroup",o.secretFileFormGroup),l(),m("ngIf",o.label),l(2),_t(o.secretStorageFile?3:4))},dependencies:[ce,fo,jt,yt,Pe,Se,at,ze,Yt,zt,wl,hm,Xc,ut,xe,We,St,$e,Qe,Va,In,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]{margin-top:0;padding:0 0 16px;display:flex;gap:8px}[_nghost-%COMP%]   .tb-container[_ngcontent-%COMP%]   label.tb-title[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:150px;padding-bottom:0}[_nghost-%COMP%]   .tb-secret-select-container[_ngcontent-%COMP%]{width:100%;height:96px;border-radius:4px;border:1px solid rgba(0,0,0,.12)}[_nghost-%COMP%]   .tb-secret-select-container[_ngcontent-%COMP%]   .input-hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .tb-secret-info-container[_ngcontent-%COMP%]{display:flex;height:100%;flex:1;align-self:stretch;padding:0 8px;justify-content:flex-end;align-items:center;gap:4px}[_nghost-%COMP%]   .tb-secret-info-container[_ngcontent-%COMP%]   .tb-resource-secret-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:8px;justify-content:center;align-items:flex-start;flex-direction:column;gap:4px}[_nghost-%COMP%]   .tb-secret-info-container[_ngcontent-%COMP%]   .tb-resource-secret-container[_ngcontent-%COMP%]   .tb-resource-secret-name[_ng
237content-%COMP%]{color:#0000008a;overflow:hidden;text-overflow:ellipsis;word-break:break-all;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;font-size:12px;font-style:normal;font-weight:500;line-height:16px;letter-spacing:.25px}[_nghost-%COMP%]   .tb-secret-btn[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: rgba(0,0,0,.38)}[_nghost-%COMP%]   .tb-secret-select-buttons-container[_ngcontent-%COMP%]{display:flex;flex:1;align-self:stretch;padding:8px;gap:8px;justify-content:center;align-items:flex-start}[_nghost-%COMP%]   .tb-secret-select-buttons-container[_ngcontent-%COMP%]   .tb-secret-select-button[_ngcontent-%COMP%]{width:100%;height:100%;align-self:stretch;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px;line-height:normal;font-size:12px;border-color:#0000001f}@media screen and (min-width: 600px){[_nghost-%COMP%]   .tb-secret-select-buttons-container[_ngcontent-%COMP%]   .tb-secret-select-button[_ngcontent-%COMP%]{padding:16px}}[_nghost-%COMP%]   .tb-secret-select-buttons-container[_ngcontent-%COMP%]   .tb-secret-select-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:24px;height:24px;font-size:24px;margin:0}[_nghost-%COMP%]   .tb-secret-btn.secret-warning-btn[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #FF5722;--mdc-icon-button-disabled-icon-color: #FF5722}[_nghost-%COMP%]     .secret-chip-container .secret-chip{margin:0 0 0 8px;--mdc-chip-container-height: 24px;--mdc-chip-with-icon-icon-color: rgba(0, 0, 0, .38)}']});let n=t;return n})();y();var BV=(()=>{let t=class t{get disabled(){return!this.controls?.some(e=>!e.control.disabled)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=_e({type:t,selectors:[["","tbFormRow",""]],contentQueries:function(i,o,a){if(i&1&&Zt(a,Yd,4),i&2){let s;Q(s=K())&&(o.controls=s)}},hostAttrs:[1,"tb-form-row"],hostVars:2,hostBindings:function(i,o){i&2&&Y("disabled",o.disabled)}});let n=t;return n})();function IRe(n){return n}var jV=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t}),t.\u0275inj=Nt({providers:[pb,lm,$w,Mi,$o,H1,ka,_b,mc,d0,z1,$1,U1,Ix,Wo,dM,yl,Qj,{provide:Q2,useValue:SY.default},{provide:$P,useValue:"assets/tinymce/tinymce.min.js"},{provide:aT,useValue:"en-GB"},{provide:El,useClass:oY},{provide:WE,useValue:jh},{provide:YE,useValue:t},{provide:Nf,useClass:aY},Fa,Td,{provide:zj,useValue:{overlayPanelClass:"tb-select-overlay",hideSingleSelectionIndicator:!0}},{provide:FC,useValue:{hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",hideSingleSelectionIndicator:!0}},{provide:YT,useValue:{disableTooltipInteractivity:!0}},Np],imports:[zi,Zy,tm,jb,va,Gb,$b,Qc,zb,CC,Kb,dm,s_,wC,i_,t_,Yc,Pu,vm,v_,n_,c_,r_,_m,S_,a_,l_,Jb,O_,P_,F_.forRoot(),SC,e_,h_,Bb,Wb,I_,by,Ow,Uw,Qd,Ou,Bo,Tm,Lw,fx,LE,gx,K2,PC,nv.forRoot({sanitize:ob.NONE,markedOptions:{provide:mR,useFactory:IRe,deps:[A9]}}),jb,va,Gb,$b,Qc,zb,CC,Kb,dm,s_,wC,i_,t_,Yc,Pu,vm,v_,n_,c_,r_,_m,S_,a_,l_,Jb,O_,P_,F_,SC,e_,h_,Bb,Wb,I_,by,Ow,Uw,Qd,Ou,Bo,Tm,Lw,UP,fx,gx,PC,nv,Zy,tm]});let n=t;return n})();(function(){iS(jV,{declarations:[pT,mT,dk,xs,xa,pk,Dk,Zu,Em,H_,q_,og,qs,Ms,jh,Ws,$E,TC,Fc,kk,xT,GE,Ko,ug,Gw,md,ap,gs,J_,ud,Ju,Tc,Y_,Dm,gk,F1,eh,_h,$l,sp,cp,T1,ZI,JI,wh,Na,Pc,Xs,qm,Wm,wp,xp,ok,VD,Pk,ak,lk,Xm,MD,Ym,sk,Cd,Ec,ck,ec,Lc,Sh,Ek,lV,cV,G0,mk,uk,hk,Km,lv,yC,i1,n1,cv,Sg,Tg,r1,o1,Js,kp,Ik,Sd,ZD,Va,Yv,Jm,Mk,Ak,ov,Sc,BV,HP,zE,lm,$w,Mi,$o,H1,ka,_b,Wo,dM,yl,mc,Ix,OD,Tk,d0,z1,$1,U1,tv,ev,$2,Ok,AD,py,RD,my,ND,LD,py,Ip,Bh,ou,jD,dI,TV,Lh,bx,EV,eM,M0,au,sM,q1,xh,Nc,Vc,Us,Mm,ca,Mx,Dx,Hh,N0,Ed,Uh,kx,In,Hs,jv,lM,B1,wy,yh,Tp,o0,G1,l0,Gv,Ep,L0,s0,Qm,jp,h0,Sy,$0,LV,Ty,q0,mM,Qh,Ey,Bp],imports:[zi,Zy,tm,jb,va,Gb,$b,Qc,zb,CC,Kb,dm,s_,wC,i_,t_,Yc,Pu,vm,v_,n_,c_,r_,_m,S_,a_,l_,Jb,O_,P_,F_,SC,e_,h_,Bb,Wb,I_,by,Ow,Uw,Qd,Ou,Bo,RE,Tm,Lw,fx,LE,zP,Bw,gx,K2,PC,nv],exports:[pT,mT,dk,xs,xa,pk,Dk,Zu,H_,q_,og,qs,Ms,jh,Ws,$E,Fc,kk,xT,GE,Ko,ug,Gw,md,ap,gs,J_,ud,Ju,Tc,Y_,Dm,gk,eh,_h,$l,cp,T1,ZI,JI,wh,Na,Pc,Xs,qm,Wm,wp,xp,ok,VD,Pk,ak,lk,Xm,MD,Ym,sk,Cd,Ec,ck,ec,Lc,Sh,Ek,lV,cV,G0,mk,uk,tv,hk,Km,sp,jb,va,Gb,$b,Qc,zb,CC,Kb,dm,s_,wC,i_,t_,Yc,Pu,vm,v_,n_,c_,r_,_m,S_,a_,l_,Jb,O_,P_,F_,SC,e_,h_,Bb,Wb,I_,by,Ow,Uw,Qd,Ou,Bo,Tm,Lw,LE,zP,Bw,UP,fx,gx,PC,nv,lv,yC,i1,n1,cv,Sg,Tg,r1,o1,Js,kp,Ik,Sd,ZD,Va,Yv,Jm,Mk,Ak,ov,Sc,BV,HP,zE,lm,$w,Mi,$o,H1,Tk,ka,_b,Wo,dM,yl,mc,Ix,OD,Zy,d0,z1,$1,U1,tm,ev,$2,Ok,AD,py,RD,my,ND,LD,py,Ip,Bh,ou,jD,TV,Lh,bx,EV,eM,M0,au,sM,q1,xh,Nc,Vc,Us,Mm,ca,Mx,Hh,N0,Ed,Uh,kx,In,Hs,jv,lM,B1,wy,yh,Tp,o0,G1,l0,Gv,Ep,L0,s0,Qm,jp,Sy,$0,LV,Ty,q0,mM,Qh,Ey,Bp]})})();Wy(Sh,function(){return[Ke,ce,jt,yt,xe,Br,Fc,Ek]},function(){return[be]});Wy(Sg,function(){return[Dn,Nc]},[]);Wy(Tg,function(){return[Pe,Se,Dn,Ed]},[]);Wy(Dx,function(){return[ce,jt,yt,jo,xe,We,St,$e,Qe,Mx,Hs]},function(){return[be]});var oNe={};Ae(oNe,{ANIMATION_MODULE_TYPE:()=>Er,BrowserAnimationsModule:()=>tNe,NoopAnimationsModule:()=>nNe,provideAnimations:()=>iNe,provideNoopAnimations:()=>rNe,\u0275InjectableAnimationEngine:()=>ZY});y();y();function TY(n){return new $r(3e3,!1)}function kRe(){return new $r(3100,!1)}function DRe(){return new $r(3101,!1)}function MRe(n){return new $r(3001,!1)}function ARe(n){return new $r(3003,!1)}function ORe(n){return new $r(3004,!1)}function PRe(n,t){return new $r(3005,!1)}function RRe(){return new $r(3006,!1)}function FRe(){return new $r(3007,!1)}function NRe(n,t){return new $r(3008,!1)}function VRe(n){return new $r(3002,!1)}function LRe(n,t,r,e,i){return new $r(3010,!1)}function BRe(){return new $r(3011,!1)}function jRe(){return new $r(3012,!1)}function GRe(){return new $r(3200,!1)}function zRe(){return new $r(3202,!1)}function $Re(){return new $r(3013,!1)}function URe(n){return new $r(3014,!1)}function HRe(n){return new $r(3015,!1)}function qRe(n){return new $r(3016,!1)}function WRe(n,t){return new $r(3404,!1)}function YRe(n){return new $r(3502,!1)}function QRe(n){return new $r(3503,!1)}function KRe(){return new $r(3300,!1)}function XRe(n){return new $r(3504,!1)}function ZRe(n){return new $r(3301,!1)}function JRe(n,t){return new $r(3302,!1)}function eFe(n){return new $r(3303,!1)}function tFe(n,t){return new $r(3400,!1)}function iFe(n){return new $r(3401,!1)}function nFe(n){return new $r(3402,!1)}function rFe(n,t){return new $r(3505,!1)}function Kh(n){switch(n.length){case 0:return new mb;case 1:return n[0];default:return new u2(n)}}function BY(n,t,r=new Map,e=new Map){let i=[],o=[],a=-1,s=null;if(t.forEach(c=>{let u=c.get("offset"),f=u==a,_=f&&s||new Map;
vendor: 47,300 bytes, line 237
237c.forEach((I,S)=>{let F=S,H=I;if(S!=="offset")switch(F=n.normalizePropertyName(F,i),H){case aS:H=r.get(S);break;case Ud:H=e.get(S);break;default:H=n.normalizeStyleValue(S,F,H,i);break}_.set(F,H)}),f||o.push(_),s=_,a=u}),i.length)throw YRe(i);return o}function cL(n,t,r,e){switch(t){case"start":n.onStart(()=>e(r&&GV(r,"start",n)));break;case"done":n.onDone(()=>e(r&&GV(r,"done",n)));break;case"destroy":n.onDestroy(()=>e(r&&GV(r,"destroy",n)));break}}function GV(n,t,r){let e=r.totalTime,i=!!r.disabled,o=dL(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e??n.totalTime,i),a=n._data;return a!=null&&(o._data=a),o}function dL(n,t,r,e,i="",o=0,a){return{element:n,triggerName:t,fromState:r,toState:e,phaseName:i,totalTime:o,disabled:!!a}}function ic(n,t,r){let e=n.get(t);return e||n.set(t,e=r),e}function EY(n){let t=n.indexOf(":"),r=n.substring(1,t),e=n.slice(t+1);return[r,e]}var oFe=typeof document>"u"?null:document.documentElement;function pL(n){let t=n.parentNode||n.host||null;return t===oFe?null:t}function aFe(n){return n.substring(1,6)=="ebkit"}var W0=null,IY=!1;function sFe(n){W0||(W0=lFe()||{},IY=W0.style?"WebkitAppearance"in W0.style:!1);let t=!0;return W0.style&&!aFe(n)&&(t=n in W0.style,!t&&IY&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in W0.style)),t}function lFe(){return typeof document<"u"?document.body:null}function jY(n,t){for(;t;){if(t===n)return!0;t=pL(t)}return!1}function GY(n,t,r){if(r)return Array.from(n.querySelectorAll(t));let e=n.querySelector(t);return e?[e]:[]}var mL=(()=>{let t=class t{validateStyleProperty(e){return sFe(e)}containsElement(e,i){return jY(e,i)}getParentElement(e){return pL(e)}query(e,i,o){return GY(e,i,o)}computeStyle(e,i,o){return o||""}animate(e,i,o,a,s,c=[],u){return new mb(o,a)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),gL=class gL{};gL.NOOP=new mL;var K0=gL,X0=class{};var cFe=1e3,zY="{{",dFe="}}",$Y="ng-enter",WV="ng-leave",uM="ng-trigger",_M=".ng-trigger",kY="ng-animating",YV=".ng-animating";function cu(n){if(typeof n=="number")return n;let t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:QV(parseFloat(t[1]),t[2])}function QV(n,t){switch(t){case"s":return n*cFe;default:return n}}function vM(n,t,r){return n.hasOwnProperty("duration")?n:pFe(n,t,r)}function pFe(n,t,r){let e=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,o=0,a="";if(typeof n=="string"){let s=n.match(e);if(s===null)return t.push(TY(n)),{duration:0,delay:0,easing:""};i=QV(parseFloat(s[1]),s[2]);let c=s[3];c!=null&&(o=QV(parseFloat(c),s[4]));let u=s[5];u&&(a=u)}else i=n;if(!r){let s=!1,c=t.length;i<0&&(t.push(kRe()),s=!0),o<0&&(t.push(DRe()),s=!0),s&&t.splice(c,0,TY(n))}return{duration:i,delay:o,easing:a}}function mFe(n){return n.length?n[0]instanceof Map?n:n.map(t=>new Map(Object.entries(t))):[]}function Gp(n,t,r){t.forEach((e,i)=>{let o=uL(i);r&&!r.has(i)&&r.set(i,n.style[o]),n.style[o]=e})}function Q0(n,t){t.forEach((r,e)=>{let i=uL(e);n.style[i]=""})}function Ax(n){return Array.isArray(n)?n.length==1?n[0]:PB(n):n}function uFe(n,t,r){let e=t.params||{},i=UY(n);i.length&&i.forEach(o=>{e.hasOwnProperty(o)||r.push(MRe(o))})}var KV=new RegExp(`${zY}\\s*(.+?)\\s*${dFe}`,"g");function UY(n){let t=[];if(typeof n=="string"){let r;for(;r=KV.exec(n);)t.push(r[1]);KV.lastIndex=0}return t}function Px(n,t,r){let e=`${n}`,i=e.replace(KV,(o,a)=>{let s=t[a];return s==null&&(r.push(ARe(a)),s=""),s.toString()});return i==e?n:i}var hFe=/-+([a-z0-9])/g;function uL(n){return n.replace(hFe,(...t)=>t[1].toUpperCase())}function fFe(n,t){return n===0||t===0}function gFe(n,t,r){if(r.size&&t.length){let e=t[0],i=[];if(r.forEach((o,a)=>{e.has(a)||i.push(a),e.set(a,o)}),i.length)for(let o=1;o<t.length;o++){let a=t[o];i.forEach(s=>a.set(s,hL(n,s)))}}return t}function tc(n,t,r){switch(t.type){case Dr.Trigger:return n.visitTrigger(t,r);case Dr.State:return n.visitState(t,r);case Dr.Transition:return n.visitTransition(t,r);case Dr.Sequence:return n.visitSequence(t,r);case Dr.Group:return n.visitGroup(t,r);case Dr.Animate:return n.visitAnimate(t,r);case Dr.Keyframes:return n.visitKeyframes(t,r);case Dr.Style:return n.visitStyle(t,r);case Dr.Reference:return n.visitReference(t,r);case Dr.AnimateChild:return n.visitAnimateChild(t,r);case Dr.AnimateRef:return n.visitAnimateRef(t,r);case Dr.Query:return n.visitQuery(t,r);case Dr.Stagger:return n.visitStagger(t,r);default:throw ORe(t.type)}}function hL(n,t){return window.getComputedStyle(n)[t]}var bFe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),yM=class extends X0{normalizePropertyName(t,r){return uL(t)}normalizeStyleValue(t,r,e,i){let o="",a=e.toString().trim();if(bFe.has(r)&&e!==0&&e!=="0")if(typeof e=="number")o="px";else{let s=e.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&s[1].length==0&&i.push(PRe(t,e))}return a+o}};var CM="*";function _Fe(n,t){let r=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(e=>vFe(e,r,t)):r.push(n),r}function vFe(n,t,r){if(n[0]==":"){let c=yFe(n,r);if(typeof c=="function"){t.push(c);return}n=c}let e=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(e==null||e.length<4)return r.push(HRe(n)),t;let i=e[1],o=e[2],a=e[3];t.push(DY(i,a));let s=i==CM&&a==CM;o[0]=="<"&&!s&&t.push(DY(a,i))}function yFe(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(r,e)=>parseFloat(e)>parseFloat(r);case":decrement":return(r,e)=>parseFloat(e)<parseFloat(r);default:return t.push(qRe(n)),"* => *"}}var hM=new Set(["true","1"]),fM=new Set(["false","0"]);function DY(n,t){let r=hM.has(n)||fM.has(n),e=hM.has(t)||fM.has(t);return(i,o)=>{let a=n==CM||n==i,s=t==CM||t==o;return!a&&r&&typeof i=="boolean"&&(a=i?hM.has(n):fM.has(n)),!s&&e&&typeof o=="boolean"&&(s=o?hM.has(t):fM.has(t)),a&&s}}var HY=":self",CFe=new RegExp(`s*${HY}s*,?`,"g");function qY(n,t,r,e){return new XV(n).build(t,r,e)}var MY="",XV=class{constructor(t){this._driver=t}build(t,r,e){let i=new ZV(r);return this._resetContextStyleTimingState(i),tc(this,Ax(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector=MY,t.collectedStyles=new Map,t.collectedStyles.set(MY,new Map),t.currentTime=0}visitTrigger(t,r){let e=r.queryCount=0,i=r.depCount=0,o=[],a=[];return t.name.charAt(0)=="@"&&r.errors.push(RRe()),t.definitions.forEach(s=>{if(this._resetContextStyleTimingState(r),s.type==Dr.State){let c=s,u=c.name;u.toString().split(/\s*,\s*/).forEach(f=>{c.name=f,o.push(this.visitState(c,r))}),c.name=u}else if(s.type==Dr.Transition){let c=this.visitTransition(s,r);e+=c.queryCount,i+=c.depCount,a.push(c)}else r.errors.push(FRe())}),{type:Dr.Trigger,name:t.name,states:o,transitions:a,queryCount:e,depCount:i,options:null}}visitState(t,r){let e=this.visitStyle(t.styles,r),i=t.options&&t.options.params||null;if(e.containsDynamicStyles){let o=new Set,a=i||{};e.styles.forEach(s=>{s instanceof Map&&s.forEach(c=>{UY(c).forEach(u=>{a.hasOwnProperty(u)||o.add(u)})})}),o.size&&r.errors.push(NRe(t.name,[...o.values()]))}return{type:Dr.State,name:t.name,style:e,options:i?{params:i}:null}}visitTransition(t,r){r.queryCount=0,r.depCount=0;let e=tc(this,Ax(t.animation),r),i=_Fe(t.expr,r.errors);return{type:Dr.Transition,matchers:i,animation:e,queryCount:r.queryCount,depCount:r.depCount,options:Y0(t.options)}}visitSequence(t,r){return{type:Dr.Sequence,steps:t.steps.map(e=>tc(this,e,r)),options:Y0(t.options)}}visitGroup(t,r){let e=r.currentTime,i=0,o=t.steps.map(a=>{r.currentTime=e;let s=tc(this,a,r);return i=Math.max(i,r.currentTime),s});return r.currentTime=i,{type:Dr.Group,steps:o,options:Y0(t.options)}}visitAnimate(t,r){let e=TFe(t.timings,r.errors);r.currentAnimateTimings=e;let i,o=t.styles?t.styles:Tt({});if(o.type==Dr.Keyframes)i=this.visitKeyframes(o,r);else{let a=t.styles,s=!1;if(!a){s=!0;let u={};e.easing&&(u.easing=e.easing),a=Tt(u)}r.currentTime+=e.duration+e.delay;let c=this.visitStyle(a,r);c.isEmptyStep=s,i=c}return r.currentAnimateTimings=null,{type:Dr.Animate,timings:e,style:i,options:null}}visitStyle(t,r){let e=this._makeStyleAst(t,r);return this._validateStyleAst(e,r),e}_makeStyleAst(t,r){let e=[],i=Array.isArray(t.styles)?t.styles:[t.styles];for(let s of i)typeof s=="string"?s===Ud?e.push(s):r.errors.push(VRe(s)):e.push(new Map(Object.entries(s)));let o=!1,a=null;return e.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(a=s.get("easing"),s.delete("easing")),!o)){for(let c of s.values())if(c.toString().indexOf(zY)>=0){o=!0;break}}}),{type:Dr.Style,styles:e,easing:a,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,r){let e=r.currentAnimateTimings,i=r.currentTime,o=r.currentTime;e&&o>0&&(o-=e.duration+e.delay),t.styles.forEach(a=>{typeof a!="string"&&a.forEach((s,c)=>{let u=r.collectedStyles.get(r.currentQuerySelector),f=u.get(c),_=!0;f&&(o!=i&&o>=f.startTime&&i<=f.endTime&&(r.errors.push(LRe(c,f.startTime,f.endTime,o,i)),_=!1),o=f.startTime),_&&u.set(c,{startTime:o,endTime:i}),r.options&&uFe(s,r.options,r.errors)})})}visitKeyframes(t,r){let e={type:Dr.Keyframes,styles:[],options:null};if(!r.currentAnimateTimings)return r.errors.push(BRe()),e;let i=1,o=0,a=[],s=!1,c=!1,u=0,f=t.steps.map(ee=>{let Ie=this._makeStyleAst(ee,r),He=Ie.offset!=null?Ie.offset:SFe(Ie.styles),Le=0;return He!=null&&(o++,Le=Ie.offset=He),c=c||Le<0||Le>1,s=s||Le<u,u=Le,a.push(Le),Ie});c&&r.errors.push(jRe()),s&&r.errors.push(GRe());let _=t.steps.length,I=0;o>0&&o<_?r.errors.push(zRe()):o==0&&(I=i/(_-1));let S=_-1,F=r.currentTime,H=r.currentAnimateTimings,q=H.duration;return f.forEach((ee,Ie)=>{let He=I>0?Ie==S?1:I*Ie:a[Ie],Le=He*q;r.currentTime=F+H.delay+Le,H.duration=Le,this._validateStyleAst(ee,r),ee.offset=He,e.styles.push(ee)}),e}visitReference(t,r){return{type:Dr.Reference,animation:tc(this,Ax(t.animation),r),options:Y0(t.options)}}visitAnimateChild(t,r){return r.depCount++,{type:Dr.AnimateChild,options:Y0(t.options)}}visitAnimateRef(t,r){return{type:Dr.AnimateRef,animation:this.visitReference(t.animation,r),options:Y0(t.options)}}visitQuery(t,r){let e=r.currentQuerySelector,i=t.options||{};r.queryCount++,r.currentQuery=t;let[o,a]=wFe(t.selector);r.currentQuerySelector=e.length?e+" "+o:o,ic(r.collectedStyles,r.currentQuerySelector,new Map);let s=tc(this,Ax(t.animation),r);return r.currentQuery=null,r.currentQuerySelector=e,{type:Dr.Query,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:s,originalSelector:t.selector,options:Y0(t.options)}}visitStagger(t,r){r.currentQuery||r.errors.push($Re());let e=t.timings==="full"?{duration:0,delay:0,easing:"full"}:vM(t.timings,r.errors,!0);return{type:Dr.Stagger,animation:tc(this,Ax(t.animation),r),timings:e,options:null}}};function wFe(n){let t=!!n.split(/\s*,\s*/).find(r=>r==HY);return t&&(n=n.replace(CFe,"")),n=n.replace(/@\*/g,_M).replace(/@\w+/g,r=>_M+"-"+r.slice(1)).replace(/:animating/g,YV),[n,t]}function xFe(n){return n?re({},n):null}var ZV=class{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function SFe(n){if(typeof n=="string")return null;let t=null;if(Array.isArray(n))n.forEach(r=>{if(r instanceof Map&&r.has("offset")){let e=r;t=parseFloat(e.get("offset")),e.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let r=n;t=parseFloat(r.get("offset")),r.delete("offset")}return t}function TFe(n,t){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let o=vM(n,t).duration;return zV(o,0,"")}let r=n;if(r.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=zV(0,0,"");return o.dynamic=!0,o.strValue=r,o}let i=vM(r,t);return zV(i.duration,i.delay,i.easing)}function Y0(n){return n?(n=re({},n),n.params&&(n.params=xFe(n.params))):n={},n}function zV(n,t,r){return{duration:n,delay:t,easing:r}}function fL(n,t,r,e,i,o,a=null,s=!1){return{type:1,element:n,keyframes:t,preStyleProps:r,postStyleProps:e,duration:i,delay:o,totalTime:i+o,easing:a,subTimeline:s}}var Rx=class{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,r){let e=this._map.get(t);e||this._map.set(t,e=[]),e.push(...r)}has(t){return this._map.has(t)}clear(){this._map.clear()}},EFe=1,IFe=":enter",kFe=new RegExp(IFe,"g"),DFe=":leave",MFe=new RegExp(DFe,"g");function WY(n,t,r,e,i,o=new Map,a=new Map,s,c,u=[]){return new JV().buildKeyframes(n,t,r,e,i,o,a,s,c,u)}var JV=class{buildKeyframes(t,r,e,i,o,a,s,c,u,f=[]){u=u||new Rx;let _=new eL(t,r,u,i,o,f,[]);_.options=c;let I=c.delay?cu(c.delay):0;_.currentTimeline.delayNextStep(I),_.currentTimeline.setStyles([a],null,_.errors,c),tc(this,e,_);let S=_.timelines.filter(F=>F.containsAnimation());if(S.length&&s.size){let F;for(let H=S.length-1;H>=0;H--){let q=S[H];if(q.element===r){F=q;break}}F&&!F.allowOnlyTimelineStyles()&&F.setStyles([s],null,_.errors,c)}return S.length?S.map(F=>F.buildKeyframes()):[fL(r,[],[],[],0,I,"",!1)]}visitTrigger(t,r){}visitState(t,r){}visitTransition(t,r){}visitAnimateChild(t,r){let e=r.subInstructions.get(r.element);if(e){let i=r.createSubContext(t.options),o=r.currentTimeline.currentTime,a=this._visitSubInstructions(e,i,i.options);o!=a&&r.transformIntoNewTimeline(a)}r.previousNode=t}visitAnimateRef(t,r){let e=r.createSubContext(t.options);e.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],r,e),this.visitReference(t.animation,e),r.transformIntoNewTimeline(e.currentTimeline.currentTime),r.previousNode=t}_applyAnimationRefDelays(t,r,e){for(let i of t){let o=i?.delay;if(o){let a=typeof o=="number"?o:cu(Px(o,i?.params??{},r.errors));e.delayNextStep(a)}}}_visitSubInstructions(t,r,e){let o=r.currentTimeline.currentTime,a=e.duration!=null?cu(e.duration):null,s=e.delay!=null?cu(e.delay):null;return a!==0&&t.forEach(c=>{let u=r.appendInstructionToTimeline(c,a,s);o=Math.max(o,u.duration+u.delay)}),o}visitReference(t,r){r.updateOptions(t.options,!0),tc(this,t.animation,r),r.previousNode=t}visitSequence(t,r){let e=r.subContextCount,i=r,o=t.options;if(o&&(o.params||o.delay)&&(i=r.createSubContext(o),i.transformIntoNewTimeline(),o.delay!=null)){i.previousNode.type==Dr.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=wM);let a=cu(o.delay);i.delayNextStep(a)}t.steps.length&&(t.steps.forEach(a=>tc(this,a,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>e&&i.transformIntoNewTimeline()),r.previousNode=t}visitGroup(t,r){let e=[],i=r.currentTimeline.currentTime,o=t.options&&t.options.delay?cu(t.options.delay):0;t.steps.forEach(a=>{let s=r.createSubContext(t.options);o&&s.delayNextStep(o),tc(this,a,s),i=Math.max(i,s.currentTimeline.currentTime),e.push(s.currentTimeline)}),e.forEach(a=>r.currentTimeline.mergeTimelineCollectedStyles(a)),r.transformIntoNewTimeline(i),r.previousNode=t}_visitTiming(t,r){if(t.dynamic){let e=t.strValue,i=r.params?Px(e,r.params,r.errors):e;return vM(i,r.errors)}else return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,r){let e=r.currentAnimateTimings=this._visitTiming(t.timings,r),i=r.currentTimeline;e.delay&&(r.incrementTime(e.delay),i.snapshotCurrentStyles());let o=t.style;o.type==Dr.Keyframes?this.visitKeyframes(o,r):(r.incrementTime(e.duration),this.visitStyle(o,r),i.applyStylesToKeyframe()),r.currentAnimateTimings=null,r.previousNode=t}visitStyle(t,r){let e=r.currentTimeline,i=r.currentAnimateTimings;!i&&e.hasCurrentStyleProperties()&&e.forwardFrame();let o=i&&i.easing||t.easing;t.isEmptyStep?e.applyEmptyStep(o):e.setStyles(t.styles,o,r.errors,r.options),r.previousNode=t}visitKeyframes(t,r){let e=r.currentAnimateTimings,i=r.currentTimeline.duration,o=e.duration,s=r.createSubContext().currentTimeline;s.easing=e.easing,t.styles.forEach(c=>{let u=c.offset||0;s.forwardTime(u*o),s.setStyles(c.styles,c.easing,r.errors,r.options),s.applyStylesToKeyframe()}),r.currentTimeline.mergeTimelineCollectedStyles(s),r.transformIntoNewTimeline(i+o),r.previousNode=t}visitQuery(t,r){let e=r.currentTimeline.currentTime,i=t.options||{},o=i.delay?cu(i.delay):0;o&&(r.previousNode.type===Dr.Style||e==0&&r.currentTimeline.hasCurrentStyleProperties())&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=wM);let a=e,s=r.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,r.errors);r.currentQueryTotal=s.length;let c=null;s.forEach((u,f)=>{r.currentQueryIndex=f;let _=r.createSubContext(t.options,u);o&&_.delayNextStep(o),u===r.element&&(c=_.currentTimeline),tc(this,t.animation,_),_.currentTimeline.applyStylesToKeyframe();let I=_.currentTimeline.currentTime;a=Math.max(a,I)}),r.currentQueryIndex=0,r.currentQueryTotal=0,r.transformIntoNewTimeline(a),c&&(r.currentTimeline.mergeTimelineCollectedStyles(c),r.currentTimeline.snapshotCurrentStyles()),r.previousNode=t}visitStagger(t,r){let e=r.parentContext,i=r.currentTimeline,o=t.timings,a=Math.abs(o.duration),s=a*(r.currentQueryTotal-1),c=a*r.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=s-c;break;case"full":c=e.currentStaggerTime;break}let f=r.currentTimeline;c&&f.delayNextStep(c);let _=f.currentTime;tc(this,t.animation,r),r.previousNode=t,e.currentStaggerTime=i.currentTime-_+(i.startTime-e.currentTimeline.startTime)}},wM={},eL=class n{constructor(t,r,e,i,o,a,s,c){this._driver=t,this.element=r,this.subInstructions=e,this._enterClassName=i,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=wM,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new xM(this._driver,r,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,r){if(!t)return;let e=t,i=this.options;e.duration!=null&&(i.duration=cu(e.duration)),e.delay!=null&&(i.delay=cu(e.delay));let o=e.params;if(o){let a=i.params;a||(a=this.options.params={}),Object.keys(o).forEach(s=>{(!r||!a.hasOwnProperty(s))&&(a[s]=Px(o[s],a,this.errors))})}}_copyOptions(){let t={};if(this.options){let r=this.options.params;if(r){let e=t.params={};Object.keys(r).forEach(i=>{e[i]=r[i]})}}return t}createSubContext(t=null,r,e){let i=r||this.element,o=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,e||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=wM,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,r,e){let i={duration:r??t.duration,delay:this.currentTimeline.currentTime+(e??0)+t.delay,easing:""},o=new tL(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,r,e,i,o,a){let s=[];if(i&&s.push(this.element),t.length>0){t=t.replace(kFe,"."+this._enterClassName),t=t.replace(MFe,"."+this._leaveClassName);let c=e!=1,u=this._driver.query(this.element,t,c);e!==0&&(u=e<0?u.slice(u.length+e,u.length):u.slice(0,e)),s.push(...u)}return!o&&s.length==0&&a.push(URe(r)),s}},xM=class n{constructor(t,r,e,i){this._driver=t,this.element=r,this.startTime=e,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(r),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(r,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){let r=this._keyframes.size===1&&this._pendingStyles.size;this.duration||r?(this.forwardTime(this.currentTime+t),r&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,r){return this.applyStylesToKeyframe(),new n(this._driver,t,r||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=EFe,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,r){this._localTimelineStyles.set(t,r),this._globalTimelineStyles.set(t,r),this._styleSummary.set(t,{time:this.currentTime,value:r})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[r,e]of this._globalTimelineStyles)this._backFill.set(r,e||Ud),this._currentKeyframe.set(r,Ud);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,r,e,i){r&&this._previousKeyframe.set("easing",r);let o=i&&i.params||{},a=AFe(t,this._globalTimelineStyles);for(let[s,c]of a){let u=Px(c,o,e);this._pendingStyles.set(s,u),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??Ud),this._updateStyle(s,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((t,r)=>{this._currentKeyframe.set(r,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,r)=>{this._currentKeyframe.has(r)||this._currentKeyframe.set(r,t)}))}snapshotCurrentStyles(){for(let[t,r]of this._localTimelineStyles)this._pendingStyles.set(t,r),this._updateStyle(t,r)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let r in this._currentKeyframe)t.push(r);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((r,e)=>{let i=this._styleSummary.get(e);(!i||r.time>i.time)&&this._updateStyle(e,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,r=new Set,e=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((s,c)=>{let u=new Map([...this._backFill,...s]);u.forEach((f,_)=>{f===aS?t.add(_):f===Ud&&r.add(_)}),e||u.set("offset",c/this.duration),i.push(u)});let o=[...t.values()],a=[...r.values()];if(e){let s=i[0],c=new Map(s);s.set("offset",0),c.set("offset",1),i=[s,c]}return fL(this.element,i,o,a,this.duration,this.startTime,this.easing,!1)}},tL=class extends xM{constructor(t,r,e,i,o,a,s=!1){super(t,r,a.delay),this.keyframes=e,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=s,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:r,duration:e,easing:i}=this.timings;if(this._stretchStartingKeyframe&&r){let o=[],a=e+r,s=r/a,c=new Map(t[0]);c.set("offset",0),o.push(c);let u=new Map(t[0]);u.set("offset",AY(s)),o.push(u);let f=t.length-1;for(let _=1;_<=f;_++){let I=new Map(t[_]),S=I.get("offset"),F=r+S*e;I.set("offset",AY(F/a)),o.push(I)}e=a,r=0,i="",t=o}return fL(this.element,t,this.preStyleProps,this.postStyleProps,e,r,i,!0)}};function AY(n,t=3){let r=Math.pow(10,t-1);return Math.round(n*r)/r}function AFe(n,t){let r=new Map,e;return n.forEach(i=>{if(i==="*"){e??=t.keys();for(let o of e)r.set(o,Ud)}else for(let[o,a]of i)r.set(o,a)}),r}function OY(n,t,r,e,i,o,a,s,c,u,f,_,I){return{type:0,element:n,triggerName:t,isRemovalTransition:i,fromState:r,fromStyles:o,toState:e,toStyles:a,timelines:s,queriedElements:c,preStyleProps:u,postStyleProps:f,totalTime:_,errors:I}}var $V={},SM=class{constructor(t,r,e){this._triggerName=t,this.ast=r,this._stateStyles=e}match(t,r,e,i){return OFe(this.ast.matchers,t,r,e,i)}buildStyles(t,r,e){let i=this._stateStyles.get("*");return t!==void 0&&(i=this._stateStyles.get(t?.toString())||i),i?i.buildStyles(r,e):new Map}build(t,r,e,i,o,a,s,c,u,f){let _=[],I=this.ast.options&&this.ast.options.params||$V,S=s&&s.params||$V,F=this.buildStyles(e,S,_),H=c&&c.params||$V,q=this.buildStyles(i,H,_),ee=new Set,Ie=new Map,He=new Map,Le=i==="void",qe={params:YY(H,I),delay:this.ast.options?.delay},ue=f?[]:WY(t,r,this.ast.animation,o,a,F,q,qe,u,_),Ne=0;return ue.forEach(st=>{Ne=Math.max(st.duration+st.delay,Ne)}),_.length?OY(r,this._triggerName,e,i,Le,F,q,[],[],Ie,He,Ne,_):(ue.forEach(st=>{let Ui=st.element,Oe=ic(Ie,Ui,new Set);st.preStyleProps.forEach(ei=>Oe.add(ei));let wt=ic(He,Ui,new Set);st.postStyleProps.forEach(ei=>wt.add(ei)),Ui!==r&&ee.add(Ui)}),OY(r,this._triggerName,e,i,Le,F,q,ue,[...ee.values()],Ie,He,Ne))}};function OFe(n,t,r,e,i){return n.some(o=>o(t,r,e,i))}function YY(n,t){let r=re({},t);return Object.entries(n).forEach(([e,i])=>{i!=null&&(r[e]=i)}),r}var iL=class{constructor(t,r,e){this.styles=t,this.defaultParams=r,this.normalizer=e}buildStyles(t,r){let e=new Map,i=YY(t,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,s)=>{a&&(a=Px(a,i,r));let c=this.normalizer.normalizePropertyName(s,r);a=this.normalizer.normalizeStyleValue(s,c,a,r),e.set(s,a)})}),e}};function PFe(n,t,r){return new nL(n,t,r)}var nL=class{constructor(t,r,e){this.name=t,this.ast=r,this._normalizer=e,this.transitionFactories=[],this.states=new Map,r.states.forEach(i=>{let o=i.options&&i.options.params||{};this.states.set(i.name,new iL(i.style,o,e))}),PY(this.states,"true","1"),PY(this.states,"false","0"),r.transitions.forEach(i=>{this.transitionFactories.push(new SM(t,i,this.states))}),this.fallbackTransition=RFe(t,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,r,e,i){return this.transitionFactories.find(a=>a.match(t,r,e,i))||null}matchStyles(t,r,e){return this.fallbackTransition.buildStyles(t,r,e)}};function RFe(n,t,r){let e=[(a,s)=>!0],i={type:Dr.Sequence,steps:[],options:null},o={type:Dr.Transition,animation:i,matchers:e,options:null,queryCount:0,depCount:0};return new SM(n,o,t)}function PY(n,t,r){n.has(t)?n.has(r)||n.set(r,n.get(t)):n.has(r)&&n.set(t,n.get(r))}var FFe=new Rx,rL=class{constructor(t,r,e){this.bodyNode=t,this._driver=r,this._normalizer=e,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,r){let e=[],i=[],o=qY(this._driver,r,e,i);if(e.length)throw QRe(e);i.length&&void 0,this._animations.set(t,o)}_buildPlayer(t,r,e){let i=t.element,o=BY(this._normalizer,t.keyframes,r,e);return this._driver.animate(i,o,t.duration,t.delay,t.easing,[],!0)}create(t,r,e={}){let i=[],o=this._animations.get(t),a,s=new Map;if(o?(a=WY(this._driver,r,o,$Y,WV,new Map,new Map,e,FFe,i),a.forEach(f=>{let _=ic(s,f.element,new Map);f.postStyleProps.forEach(I=>_.set(I,null))})):(i.push(KRe()),a=[]),i.length)throw XRe(i);s.forEach((f,_)=>{f.forEach((I,S)=>{f.set(S,this._driver.computeStyle(_,S,Ud))})});let c=a.map(f=>{let _=s.get(f.element);return this._buildPlayer(f,new Map,_)}),u=Kh(c);return this._playersById.set(t,u),u.onDestroy(()=>this.destroy(t)),this.players.push(u),u}destroy(t){let r=this._getPlayer(t);r.destroy(),this._playersById.delete(t);let e=this.players.indexOf(r);e>=0&&this.players.splice(e,1)}_getPlayer(t){let r=this._playersById.get(t);if(!r)throw ZRe(t);return r}listen(t,r,e,i){let o=dL(r,"","","");return cL(this._getPlayer(t),e,o,i),()=>{}}command(t,r,e,i){if(e=="register"){this.register(t,i[0]);return}if(e=="create"){let a=i[0]||{};this.create(t,r,a);return}let o=this._getPlayer(t);switch(e){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t);break}}},RY="ng-animate-queued",NFe=".ng-animate-queued",UV="ng-animate-disabled",VFe=".ng-animate-disabled",LFe="ng-star-inserted",BFe=".ng-star-inserted",jFe=[],QY={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},GFe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Od="__ng_removed",Fx=class{get params(){return this.options.params}constructor(t,r=""){this.namespaceId=r;let e=t&&t.hasOwnProperty("value"),i=e?t.value:t;if(this.value=$Fe(i),e){let o=t,{value:a}=o,s=Zx(o,["value"]);this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let r=t.params;if(r){let e=this.options.params;Object.keys(r).forEach(i=>{e[i]==null&&(e[i]=r[i])})}}},Ox="void",HV=new Fx(Ox),oL=class{constructor(t,r,e){this.id=t,this.hostElement=r,this._engine=e,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Gc(r,this._hostClassName)}listen(t,r,e,i){if(!this._triggers.has(r))throw JRe(e,r);if(e==null||e.length==0)throw eFe(r);if(!UFe(e))throw tFe(e,r);let o=ic(this._elementListeners,t,[]),a={name:r,phase:e,callback:i};o.push(a);let s=ic(this._engine.statesByElement,t,new Map);return s.has(r)||(Gc(t,uM),Gc(t,uM+"-"+r),s.set(r,HV)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(a);c>=0&&o.splice(c,1),this._triggers.has(r)||s.delete(r)})}}register(t,r){return this._triggers.has(t)?!1:(this._triggers.set(t,r),!0)}_getTrigger(t){let r=this._triggers.get(t);if(!r)throw iFe(t);return r}trigger(t,r,e,i=!0){let o=this._getTrigger(r),a=new Nx(this.id,r,t),s=this._engine.statesByElement.get(t);s||(Gc(t,uM),Gc(t,uM+"-"+r),this._engine.statesByElement.set(t,s=new Map));let c=s.get(r),u=new Fx(e,this.id);if(!(e&&e.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),s.set(r,u),c||(c=HV),!(u.value===Ox)&&c.value===u.value){if(!WFe(c.params,u.params)){let H=[],q=o.matchStyles(c.value,c.params,H),ee=o.matchStyles(u.value,u.params,H);H.length?this._engine.reportError(H):this._engine.afterFlush(()=>{Q0(t,q),Gp(t,ee)})}return}let I=ic(this._engine.playersByElement,t,[]);I.forEach(H=>{H.namespaceId==this.id&&H.triggerName==r&&H.queued&&H.destroy()});let S=o.matchTransition(c.value,u.value,t,u.params),F=!1;if(!S){if(!i)return;S=o.fallbackTransition,F=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:S,fromState:c,toState:u,player:a,isFallbackTransition:F}),F||(Gc(t,RY),a.onStart(()=>{Iy(t,RY)})),a.onDone(()=>{let H=this.players.indexOf(a);H>=0&&this.players.splice(H,1);let q=this._engine.playersByElement.get(t);if(q){let ee=q.indexOf(a);ee>=0&&q.splice(ee,1)}}),this.players.push(a),I.push(a),a}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(r=>r.delete(t)),this._elementListeners.forEach((r,e)=>{this._elementListeners.set(e,r.filter(i=>i.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let r=this._engine.playersByElement.get(t);r&&(r.forEach(e=>e.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,r){let e=this._engine.driver.query(t,_M,!0);e.forEach(i=>{if(i[Od])return;let o=this._engine.fetchNamespacesByElement(i);o.size?o.forEach(a=>a.triggerLeaveAnimation(i,r,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>e.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(t,r,e,i){let o=this._engine.statesByElement.get(t),a=new Map;if(o){let s=[];if(o.forEach((c,u)=>{if(a.set(u,c.value),this._triggers.has(u)){let f=this.trigger(t,u,Ox,i);f&&s.push(f)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,r,a),e&&Kh(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let r=this._elementListeners.get(t),e=this._engine.statesByElement.get(t);if(r&&e){let i=new Set;r.forEach(o=>{let a=o.name;if(i.has(a))return;i.add(a);let c=this._triggers.get(a).fallbackTransition,u=e.get(a)||HV,f=new Fx(Ox),_=new Nx(this.id,a,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:a,transition:c,fromState:u,toState:f,player:_,isFallbackTransition:!0})})}}removeNode(t,r){let e=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,r),this.triggerLeaveAnimation(t,r,!0))return;let i=!1;if(e.totalAnimations){let o=e.players.length?e.playersByQueriedElement.get(t):[];if(o&&o.length)i=!0;else{let a=t;for(;a=a.parentNode;)if(e.statesByElement.get(a)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)e.markElementAsRemoved(this.id,t,!1,r);else{let o=t[Od];(!o||o===QY)&&(e.afterFlush(()=>this.clearElementCache(t)),e.destroyInnerAnimations(t),e._onRemovalComplete(t,r))}}insertNode(t,r){Gc(t,this._hostClassName)}drainQueuedTransitions(t){let r=[];return this._queue.forEach(e=>{let i=e.player;if(i.destroyed)return;let o=e.element,a=this._elementListeners.get(o);a&&a.forEach(s=>{if(s.name==e.triggerName){let c=dL(o,e.triggerName,e.fromState.value,e.toState.value);c._data=t,cL(e.player,s.phase,c,s.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):r.push(e)}),this._queue=[],r.sort((e,i)=>{let o=e.transition.ast.depCount,a=i.transition.ast.depCount;return o==0||a==0?o-a:this._engine.driver.containsElement(e.element,i.element)?1:-1})}destroy(t){this.players.forEach(r=>r.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}},aL=class{_onRemovalComplete(t,r){this.onRemovalComplete(t,r)}constructor(t,r,e){this.bodyNode=t,this.driver=r,this._normalizer=e,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,o)=>{}}get queuedPlayers(){let t=[];return this._namespaceList.forEach(r=>{r.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,r){let e=new oL(t,r,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,r)?this._balanceNamespaceList(e,r):(this.newHostElements.set(r,e),this.collectEnterElement(r)),this._namespaceLookup[t]=e}_balanceNamespaceList(t,r){let e=this._namespaceList,i=this.namespacesByHostElement;if(e.length-1>=0){let a=!1,s=this.driver.getParentElement(r);for(;s;){let c=i.get(s);if(c){let u=e.indexOf(c);e.splice(u+1,0,t),a=!0;break}s=this.driver.getParentElement(s)}a||e.unshift(t)}else e.push(t);return i.set(r,t),t}register(t,r){let e=this._namespaceLookup[t];return e||(e=this.createNamespace(t,r)),e}registerTrigger(t,r,e){let i=this._namespaceLookup[t];i&&i.register(r,e)&&this.totalAnimations++}destroy(t,r){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let e=this._fetchNamespace(t);this.namespacesByHostElement.delete(e.hostElement);let i=this._namespaceList.indexOf(e);i>=0&&this._namespaceList.splice(i,1),e.destroy(r),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let r=new Set,e=this.statesByElement.get(t);if(e){for(let i of e.values())if(i.namespaceId){let o=this._fetchNamespace(i.namespaceId);o&&r.add(o)}}return r}trigger(t,r,e,i){if(gM(r)){let o=this._fetchNamespace(t);if(o)return o.trigger(r,e,i),!0}return!1}insertNode(t,r,e,i){if(!gM(r))return;let o=r[Od];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let a=this.collectedLeaveElements.indexOf(r);a>=0&&this.collectedLeaveElements.splice(a,1)}if(t){let a=this._fetchNamespace(t);a&&a.insertNode(r,e)}i&&this.collectEnterElement(r)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,r){r?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Gc(t,UV)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Iy(t,UV))}removeNode(t,r,e){if(gM(r)){let i=t?this._fetchNamespace(t):null;i?i.removeNode(r,e):this.markElementAsRemoved(t,r,!1,e);let o=this.namespacesByHostElement.get(r);o&&o.id!==t&&o.removeNode(r,e)}else this._onRemovalComplete(r,e)}markElementAsRemoved(t,r,e,i,o){this.collectedLeaveElements.push(r),r[Od]={namespaceId:t,setForRemoval:i,hasAnimation:e,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,r,e,i,o){return gM(r)?this._fetchNamespace(t).listen(r,e,i,o):()=>{}}_buildInstruction(t,r,e,i,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,e,i,t.fromState.options,t.toState.options,r,o)}destroyInnerAnimations(t){let r=this.driver.query(t,_M,!0);r.forEach(e=>this.destroyActiveAnimationsForElement(e)),this.playersByQueriedElement.size!=0&&(r=this.driver.query(t,YV,!0),r.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(t){let r=this.playersByElement.get(t);r&&r.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(t){let r=this.playersByQueriedElement.get(t);r&&r.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Kh(this.players).onDone(()=>t());t()})}processLeaveNode(t){let r=t[Od];if(r&&r.setForRemoval){if(t[Od]=QY,r.namespaceId){this.destroyInnerAnimations(t);let e=this._fetchNamespace(r.namespaceId);e&&e.clearElementCache(t)}this._onRemovalComplete(t,r.setForRemoval)}t.classList?.contains(UV)&&this.markElementAsDisabled(t,!1),this.driver.query(t,VFe,!0).forEach(e=>{this.markElementAsDisabled(e,!1)})}flush(t=-1){let r=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,i)=>this._balanceNamespaceList(e,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let e=0;e<this.collectedEnterElements.length;e++){let i=this.collectedEnterElements[e];Gc(i,LFe)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let e=[];try{r=this._flushAnimations(e,t)}finally{for(let i=0;i<e.length;i++)e[i]()}}else for(let e=0;e<this.collectedLeaveElements.length;e++){let i=this.collectedLeaveElements[e];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(e=>e()),this._flushFns=[],this._whenQuietFns.length){let e=this._whenQuietFns;this._whenQuietFns=[],r.length?Kh(r).onDone(()=>{e.forEach(i=>i())}):e.forEach(i=>i())}}reportError(t){throw nFe(t)}_flushAnimations(t,r){let e=new Rx,i=[],o=new Map,a=[],s=new Map,c=new Map,u=new Map,f=new Set;this.disabledNodes.forEach(It=>{f.add(It);let ai=this.driver.query(It,NFe,!0);for(let ti=0;ti<ai.length;ti++)f.add(ai[ti])});let _=this.bodyNode,I=Array.from(this.statesByElement.keys()),S=VY(I,this.collectedEnterElements),F=new Map,H=0;S.forEach((It,ai)=>{let ti=$Y+H++;F.set(ai,ti),It.forEach(ri=>Gc(ri,ti))});let q=[],ee=new Set,Ie=new Set;for(let It=0;It<this.collectedLeaveElements.length;It++){let ai=this.collectedLeaveElements[It],ti=ai[Od];ti&&ti.setForRemoval&&(q.push(ai),ee.add(ai),ti.hasAnimation?this.driver.query(ai,BFe,!0).forEach(ri=>ee.add(ri)):Ie.add(ai))}let He=new Map,Le=VY(I,Array.from(ee));Le.forEach((It,ai)=>{let ti=WV+H++;He.set(ai,ti),It.forEach(ri=>Gc(ri,ti))}),t.push(()=>{S.forEach((It,ai)=>{let ti=F.get(ai);It.forEach(ri=>Iy(ri,ti))}),Le.forEach((It,ai)=>{let ti=He.get(ai);It.forEach(ri=>Iy(ri,ti))}),q.forEach(It=>{this.processLeaveNode(It)})});let qe=[],ue=[];for(let It=this._namespaceList.length-1;It>=0;It--)this._namespaceList[It].drainQueuedTransitions(r).forEach(ti=>{let ri=ti.player,li=ti.element;if(qe.push(ri),this.collectedEnterElements.length){let gn=li[Od];if(gn&&gn.setForMove){if(gn.previousTriggersValues&&gn.previousTriggersValues.has(ti.triggerName)){let Cr=gn.previousTriggersValues.get(ti.triggerName),cr=this.statesByElement.get(ti.element);if(cr&&cr.has(ti.triggerName)){let Vs=cr.get(ti.triggerName);Vs.value=Cr,cr.set(ti.triggerName,Vs)}}ri.destroy();return}}let rn=!_||!this.driver.containsElement(_,li),ji=He.get(li),Gt=F.get(li),di=this._buildInstruction(ti,e,Gt,ji,rn);if(di.errors&&di.errors.length){ue.push(di);return}if(rn){ri.onStart(()=>Q0(li,di.fromStyles)),ri.onDestroy(()=>Gp(li,di.toStyles)),i.push(ri);return}if(ti.isFallbackTransition){ri.onStart(()=>Q0(li,di.fromStyles)),ri.onDestroy(()=>Gp(li,di.toStyles)),i.push(ri);return}let er=[];di.timelines.forEach(gn=>{gn.stretchStartingKeyframe=!0,this.disabledNodes.has(gn.element)||er.push(gn)}),di.timelines=er,e.append(li,di.timelines);let Ln={instruction:di,player:ri,element:li};a.push(Ln),di.queriedElements.forEach(gn=>ic(s,gn,[]).push(ri)),di.preStyleProps.forEach((gn,Cr)=>{if(gn.size){let cr=c.get(Cr);cr||c.set(Cr,cr=new Set),gn.forEach((Vs,bn)=>cr.add(bn))}}),di.postStyleProps.forEach((gn,Cr)=>{let cr=u.get(Cr);cr||u.set(Cr,cr=new Set),gn.forEach((Vs,bn)=>cr.add(bn))})});if(ue.length){let It=[];ue.forEach(ai=>{It.push(rFe(ai.triggerName,ai.errors))}),qe.forEach(ai=>ai.destroy()),this.reportError(It)}let Ne=new Map,st=new Map;a.forEach(It=>{let ai=It.element;e.has(ai)&&(st.set(ai,ai),this._beforeAnimationBuild(It.player.namespaceId,It.instruction,Ne))}),i.forEach(It=>{let ai=It.element;this._getPreviousPlayers(ai,!1,It.namespaceId,It.triggerName,null).forEach(ri=>{ic(Ne,ai,[]).push(ri),ri.destroy()})});let Ui=q.filter(It=>LY(It,c,u)),Oe=new Map;NY(Oe,this.driver,Ie,u,Ud).forEach(It=>{LY(It,c,u)&&Ui.push(It)});let ei=new Map;S.forEach((It,ai)=>{NY(ei,this.driver,new Set(It),c,aS)}),Ui.forEach(It=>{let ai=Oe.get(It),ti=ei.get(It);Oe.set(It,new Map([...ai?.entries()??[],...ti?.entries()??[]]))});let wi=[],pn=[],Ki={};a.forEach(It=>{let{element:ai,player:ti,instruction:ri}=It;if(e.has(ai)){if(f.has(ai)){ti.onDestroy(()=>Gp(ai,ri.toStyles)),ti.disabled=!0,ti.overrideTotalTime(ri.totalTime),i.push(ti);return}let li=Ki;if(st.size>1){let ji=ai,Gt=[];for(;ji=ji.parentNode;){let di=st.get(ji);if(di){li=di;break}Gt.push(ji)}Gt.forEach(di=>st.set(di,li))}let rn=this._buildAnimation(ti.namespaceId,ri,Ne,o,ei,Oe);if(ti.setRealPlayer(rn),li===Ki)wi.push(ti);else{let ji=this.playersByElement.get(li);ji&&ji.length&&(ti.parentPlayer=Kh(ji)),i.push(ti)}}else Q0(ai,ri.fromStyles),ti.onDestroy(()=>Gp(ai,ri.toStyles)),pn.push(ti),f.has(ai)&&i.push(ti)}),pn.forEach(It=>{let ai=o.get(It.element);if(ai&&ai.length){let ti=Kh(ai);It.setRealPlayer(ti)}}),i.forEach(It=>{It.parentPlayer?It.syncPlayerEvents(It.parentPlayer):It.destroy()});for(let It=0;It<q.length;It++){let ai=q[It],ti=ai[Od];if(Iy(ai,WV),ti&&ti.hasAnimation)continue;let ri=[];if(s.size){let rn=s.get(ai);rn&&rn.length&&ri.push(...rn);let ji=this.driver.query(ai,YV,!0);for(let Gt=0;Gt<ji.length;Gt++){let di=s.get(ji[Gt]);di&&di.length&&ri.push(...di)}}let li=ri.filter(rn=>!rn.destroyed);li.length?HFe(this,ai,li):this.processLeaveNode(ai)}return q.length=0,wi.forEach(It=>{this.players.push(It),It.onDone(()=>{It.destroy();let ai=this.players.indexOf(It);this.players.splice(ai,1)}),It.play()}),wi}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,r,e,i,o){let a=[];if(r){let s=this.playersByQueriedElement.get(t);s&&(a=s)}else{let s=this.playersByElement.get(t);if(s){let c=!o||o==Ox;s.forEach(u=>{u.queued||!c&&u.triggerName!=i||a.push(u)})}}return(e||i)&&(a=a.filter(s=>!(e&&e!=s.namespaceId||i&&i!=s.triggerName))),a}_beforeAnimationBuild(t,r,e){let i=r.triggerName,o=r.element,a=r.isRemovalTransition?void 0:t,s=r.isRemovalTransition?void 0:i;for(let c of r.timelines){let u=c.element,f=u!==o,_=ic(e,u,[]);this._getPreviousPlayers(u,f,a,s,r.toState).forEach(S=>{let F=S.getRealPlayer();F.beforeDestroy&&F.beforeDestroy(),S.destroy(),_.push(S)})}Q0(o,r.fromStyles)}_buildAnimation(t,r,e,i,o,a){let s=r.triggerName,c=r.element,u=[],f=new Set,_=new Set,I=r.timelines.map(F=>{let H=F.element;f.add(H);let q=H[Od];if(q&&q.removedBeforeQueried)return new mb(F.duration,F.delay);let ee=H!==c,Ie=qFe((e.get(H)||jFe).map(Ne=>Ne.getRealPlayer())).filter(Ne=>{let st=Ne;return st.element?st.element===H:!1}),He=o.get(H),Le=a.get(H),qe=BY(this._normalizer,F.keyframes,He,Le),ue=this._buildPlayer(F,qe,Ie);if(F.subTimeline&&i&&_.add(H),ee){let Ne=new Nx(t,s,H);Ne.setRealPlayer(ue),u.push(Ne)}return ue});u.forEach(F=>{ic(this.playersByQueriedElement,F.element,[]).push(F),F.onDone(()=>zFe(this.playersByQueriedElement,F.element,F))}),f.forEach(F=>Gc(F,kY));let S=Kh(I);return S.onDestroy(()=>{f.forEach(F=>Iy(F,kY)),Gp(c,r.toStyles)}),_.forEach(F=>{ic(i,F,[]).push(S)}),S}_buildPlayer(t,r,e){return r.length>0?this.driver.animate(t.element,r,t.duration,t.delay,t.easing,e):new mb(t.duration,t.delay)}},Nx=class{constructor(t,r,e){this.namespaceId=t,this.triggerName=r,this.element=e,this._player=new mb,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((r,e)=>{r.forEach(i=>cL(t,e,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let r=this._player;r.triggerCallback&&t.onStart(()=>r.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,r){ic(this._queuedCallbacks,t,[]).push(r)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let r=this._player;r.triggerCallback&&r.triggerCallback(t)}};function zFe(n,t,r){let e=n.get(t);if(e){if(e.length){let i=e.indexOf(r);e.splice(i,1)}e.length==0&&n.delete(t)}return e}function $Fe(n){return n??null}function gM(n){return n&&n.nodeType===1}function UFe(n){return n=="start"||n=="done"}function FY(n,t){let r=n.style.display;return n.style.display=t??"none",r}function NY(n,t,r,e,i){let o=[];r.forEach(c=>o.push(FY(c)));let a=[];e.forEach((c,u)=>{let f=new Map;
237c.forEach(_=>{let I=t.computeStyle(u,_,i);f.set(_,I),(!I||I.length==0)&&(u[Od]=GFe,a.push(u))}),n.set(u,f)});let s=0;return r.forEach(c=>FY(c,o[s++])),a}function VY(n,t){let r=new Map;if(n.forEach(s=>r.set(s,[])),t.length==0)return r;let e=1,i=new Set(t),o=new Map;function a(s){if(!s)return e;let c=o.get(s);if(c)return c;let u=s.parentNode;return r.has(u)?c=u:i.has(u)?c=e:c=a(u),o.set(s,c),c}return t.forEach(s=>{let c=a(s);c!==e&&r.get(c).push(s)}),r}function Gc(n,t){n.classList?.add(t)}function Iy(n,t){n.classList?.remove(t)}function HFe(n,t,r){Kh(r).onDone(()=>n.processLeaveNode(t))}function qFe(n){let t=[];return KY(n,t),t}function KY(n,t){for(let r=0;r<n.length;r++){let e=n[r];e instanceof u2?KY(e.players,t):t.push(e)}}function WFe(n,t){let r=Object.keys(n),e=Object.keys(t);if(r.length!=e.length)return!1;for(let i=0;i<r.length;i++){let o=r[i];if(!t.hasOwnProperty(o)||n[o]!==t[o])return!1}return!0}function LY(n,t,r){let e=r.get(n);if(!e)return!1;let i=t.get(n);return i?e.forEach(o=>i.add(o)):t.set(n,e),r.delete(n),!0}var Dy=class{constructor(t,r,e){this._driver=r,this._normalizer=e,this._triggerCache={},this.onRemovalComplete=(i,o)=>{},this._transitionEngine=new aL(t.body,r,e),this._timelineEngine=new rL(t.body,r,e),this._transitionEngine.onRemovalComplete=(i,o)=>this.onRemovalComplete(i,o)}registerTrigger(t,r,e,i,o){let a=t+"-"+i,s=this._triggerCache[a];if(!s){let c=[],u=[],f=qY(this._driver,o,c,u);if(c.length)throw WRe(i,c);u.length&&void 0,s=PFe(i,f,this._normalizer),this._triggerCache[a]=s}this._transitionEngine.registerTrigger(r,i,s)}register(t,r){this._transitionEngine.register(t,r)}destroy(t,r){this._transitionEngine.destroy(t,r)}onInsert(t,r,e,i){this._transitionEngine.insertNode(t,r,e,i)}onRemove(t,r,e){this._transitionEngine.removeNode(t,r,e)}disableAnimations(t,r){this._transitionEngine.markElementAsDisabled(t,r)}process(t,r,e,i){if(e.charAt(0)=="@"){let[o,a]=EY(e),s=i;this._timelineEngine.command(o,r,a,s)}else this._transitionEngine.trigger(t,r,e,i)}listen(t,r,e,i,o){if(e.charAt(0)=="@"){let[a,s]=EY(e);return this._timelineEngine.listen(a,r,s,o)}return this._transitionEngine.listen(t,r,e,i,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}};function YFe(n,t){let r=null,e=null;return Array.isArray(t)&&t.length?(r=qV(t[0]),t.length>1&&(e=qV(t[t.length-1]))):t instanceof Map&&(r=qV(t)),r||e?new sL(n,r,e):null}var ky=class ky{constructor(t,r,e){this._element=t,this._startStyles=r,this._endStyles=e,this._state=0;let i=ky.initialStylesByElement.get(t);i||ky.initialStylesByElement.set(t,i=new Map),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&Gp(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Gp(this._element,this._initialStyles),this._endStyles&&(Gp(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(ky.initialStylesByElement.delete(this._element),this._startStyles&&(Q0(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Q0(this._element,this._endStyles),this._endStyles=null),Gp(this._element,this._initialStyles),this._state=3)}};ky.initialStylesByElement=new WeakMap;var sL=ky;function qV(n){let t=null;return n.forEach((r,e)=>{QFe(e)&&(t=t||new Map,t.set(e,r))}),t}function QFe(n){return n==="display"||n==="position"}var TM=class{constructor(t,r,e,i){this.element=t,this.keyframes=r,this.options=e,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=e.duration,this._delay=e.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;let r=()=>this._onFinish();this.domPlayer.addEventListener("finish",r),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",r)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let r=[];
237return t.forEach(e=>{r.push(Object.fromEntries(e))}),r}_triggerWebAnimation(t,r,e){return t.animate(this._convertKeyframesToObject(r),e)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((e,i)=>{i!=="offset"&&t.set(i,this._finished?e:hL(this.element,i))}),this.currentSnapshot=t}triggerCallback(t){let r=t==="start"?this._onStartFns:this._onDoneFns;r.forEach(e=>e()),r.length=0}},EM=class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,r){return jY(t,r)}getParentElement(t){return pL(t)}query(t,r,e){return GY(t,r,e)}computeStyle(t,r,e){return hL(t,r)}animate(t,r,e,i,o,a=[]){let s=i==0?"both":"forwards",c={duration:e,delay:i,fill:s};o&&(c.easing=o);let u=new Map,f=a.filter(S=>S instanceof TM);fFe(e,i)&&f.forEach(S=>{S.currentSnapshot.forEach((F,H)=>u.set(H,F))});let _=mFe(r).map(S=>new Map(S));_=gFe(t,_,u);let I=YFe(t,_);return new TM(t,_,c,I)}};var bM="@",XY="@.disabled",IM=class{constructor(t,r,e,i){this.namespaceId=t,this.delegate=r,this.engine=e,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,r){return this.delegate.createElement(t,r)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,r){this.delegate.appendChild(t,r),this.engine.onInsert(this.namespaceId,r,t,!1)}insertBefore(t,r,e,i=!0){this.delegate.insertBefore(t,r,e),this.engine.onInsert(this.namespaceId,r,t,i)}removeChild(t,r,e){this.parentNode(r)&&this.engine.onRemove(this.namespaceId,r,this.delegate)}selectRootElement(t,r){return this.delegate.selectRootElement(t,r)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,r,e,i){this.delegate.setAttribute(t,r,e,i)}removeAttribute(t,r,e){this.delegate.removeAttribute(t,r,e)}addClass(t,r){this.delegate.addClass(t,r)}removeClass(t,r){this.delegate.removeClass(t,r)}setStyle(t,r,e,i){this.delegate.setStyle(t,r,e,i)}removeStyle(t,r,e){this.delegate.removeStyle(t,r,e)}setProperty(t,r,e){r.charAt(0)==bM&&r==XY?this.disableAnimations(t,!!e):this.delegate.setProperty(t,r,e)}setValue(t,r){this.delegate.setValue(t,r)}listen(t,r,e){return this.delegate.listen(t,r,e)}disableAnimations(t,r){this.engine.disableAnimations(t,r)}},lL=class extends IM{constructor(t,r,e,i,o){super(r,e,i,o),this.factory=t,this.namespaceId=r}setProperty(t,r,e){r.charAt(0)==bM?r.charAt(1)=="."&&r==XY?(e=e===void 0?!0:!!e,this.disableAnimations(t,e)):this.engine.process(this.namespaceId,t,r.slice(1),e):this.delegate.setProperty(t,r,e)}listen(t,r,e){if(r.charAt(0)==bM){let i=KFe(t),o=r.slice(1),a="";return o.charAt(0)!=bM&&([o,a]=XFe(o)),this.engine.listen(this.namespaceId,i,o,a,s=>{let c=s._data||-1;this.factory.scheduleListenerCallback(c,e,s)})}return this.delegate.listen(t,r,e)}};function KFe(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function XFe(n){let t=n.indexOf("."),r=n.substring(0,t),e=n.slice(t+1);return[r,e]}var kM=class{constructor(t,r,e){this.delegate=t,this.engine=r,this._zone=e,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,r.onRemovalComplete=(i,o)=>{o?.removeChild(null,i)}}createRenderer(t,r){let e="",i=this.delegate.createRenderer(t,r);
237if(!t||!r?.data?.animation){let u=this._rendererCache,f=u.get(i);if(!f){let _=()=>u.delete(i);f=new IM(e,i,this.engine,_),u.set(i,f)}return f}let o=r.id,a=r.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);let s=u=>{Array.isArray(u)?u.forEach(s):this.engine.registerTrigger(o,a,t,u.name,u)};return r.data.animation.forEach(s),new lL(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,r,e){if(t>=0&&t<this._microtaskId){this._zone.run(()=>r(e));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(o=>{let[a,s]=o;a(s)}),this._animationCallbacksBuffer=[]})}),i.push([r,e])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var ZY=(()=>{let t=class t extends Dy{constructor(e,i,o){super(e,i,o)}ngOnDestroy(){this.flush()}};t.\u0275fac=function(i){return new(i||t)(X(Qi),X(K0),X(X0))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();function JFe(){return new yM}function eNe(n,t,r){return new kM(n,t,r)}var JY=[{provide:X0,useFactory:JFe},{provide:Dy,useClass:ZY},{provide:fB,useFactory:eNe,deps:[MB,Dy,Bt]}],bL=[{provide:K0,useFactory:()=>new EM},{provide:Er,useValue:"BrowserAnimations"},...JY],_L=[{provide:K0,useClass:mL},{provide:Er,useValue:"NoopAnimations"},...JY],tNe=(()=>{let t=class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?_L:bL}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,exports:[Qy]}),t.\u0275inj=Nt({providers:bL,imports:[Qy]});let n=t;return n})();function iNe(){return gB("NgEagerAnimations"),[...bL]}var nNe=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t,exports:[Qy]}),t.\u0275inj=Nt({providers:_L,imports:[Qy]});let n=t;return n})();function rNe(){return[..._L]}y();y();var aNe={dispatch:!0,functional:!1,useEffectsErrorHandler:!0},MM="__@ngrx/effects_create__";function zc(n,t={}){let r=t.functional?n:n(),e=re(re({},aNe),t);return Object.defineProperty(r,MM,{value:e}),r}function sNe(n){return Object.getOwnPropertyNames(n).filter(e=>n[e]&&n[e].hasOwnProperty(MM)?n[e][MM].hasOwnProperty("dispatch"):!1).map(e=>{let i=n[e][MM];return re({propertyName:e},i)})}function lNe(n){return sNe(n)}function nQ(n){return Object.getPrototypeOf(n)}function cNe(n){return!!n.constructor&&n.constructor.name!=="Object"&&n.constructor.name!=="Function"}function rQ(n){return typeof n=="function"}function eQ(n){return n.filter(rQ)}function dNe(n){return n instanceof tt||rQ(n)}function pNe(n,t,r){let e=nQ(n),o=!!e&&e.constructor.name!=="Object"?e.constructor.name:null,a=lNe(n).map(({propertyName:s,dispatch:c,useEffectsErrorHandler:u})=>{let f=typeof n[s]=="function"?n[s]():n[s],_=u?r(f,t):f;return c===!1?_.pipe(sB()):_.pipe(dB()).pipe(W(S=>({effect:n[s],notification:S,propertyName:s,sourceName:o,sourceInstance:n})))});return Xt(...a)}var mNe=10;function oQ(n,t,r=mNe){return n.pipe(vt(e=>(t&&t.handleError(e),r<=1?n:oQ(n,t,r-1))))}var My=(()=>{let t=class t extends Ma{constructor(e){super(),e&&(this.source=e)}lift(e){let i=new t;return i.source=this,i.operator=e,i}};t.\u0275fac=function(i){return new(i||t)(X(cS))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function Pd(...n){return Pi(t=>n.some(r=>typeof r=="string"?r===t.type:r.type===t.type))}var aQ=new tt("@ngrx/effects Internal Root Guard"),DM=new tt("@ngrx/effects User Provided Effects"),vL=new tt("@ngrx/effects Internal Root Effects"),sQ=new tt("@ngrx/effects Internal Root Effects Instances"),tQ=new tt("@ngrx/effects Internal Feature Effects"),lQ=new tt("@ngrx/effects Internal Feature Effects Instance Groups"),uNe=new tt("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>oQ}),cQ="@ngrx/effects/init",Shi=LB(cQ);function hNe(n,t){if(n.notification.kind==="N"){let r=n.notification.value;!fNe(r)&&t.handleError(new Error(`Effect ${gNe(n)}
237 dispatched an invalid action: ${bNe(r)}`))}}function fNe(n){return typeof n!="function"&&n&&n.type&&typeof n.type=="string"}function gNe({propertyName:n,sourceInstance:t,sourceName:r}){let e=typeof t[n]=="function";return!!r?`"${r}.${String(n)}${e?"()":""}"`:`"${String(n)}()"`}function bNe(n){try{return JSON.stringify(n)}catch{return n}}var _Ne="ngrxOnIdentifyEffects";function vNe(n){return yL(n,_Ne)}var yNe="ngrxOnRunEffects";function CNe(n){return yL(n,yNe)}var wNe="ngrxOnInitEffects";function xNe(n){return yL(n,wNe)}function yL(n,t){return n&&t in n&&typeof n[t]=="function"}var dQ=(()=>{let t=class t extends Te{constructor(e,i){super(),this.errorHandler=e,this.effectsErrorHandler=i}addEffects(e){this.next(e)}toActions(){return this.pipe(r2(e=>cNe(e)?nQ(e):e),Ft(e=>e.pipe(r2(SNe))),Ft(e=>{let i=e.pipe(cB(a=>TNe(this.errorHandler,this.effectsErrorHandler)(a)),W(a=>(hNe(a,this.errorHandler),a.notification)),Pi(a=>a.kind==="N"&&a.value!=null),lB()),o=e.pipe($n(1),Pi(xNe),W(a=>a.ngrxOnInitEffects()));return Xt(i,o)}))}};t.\u0275fac=function(i){return new(i||t)(X(rb),X(uNe))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function SNe(n){return vNe(n)?n.ngrxOnIdentifyEffects():""}function TNe(n,t){return r=>{let e=pNe(r,n,t);return CNe(r)?r.ngrxOnRunEffects(e):e}}var pQ=(()=>{let t=class t{get isStarted(){return!!this.effectsSubscription}constructor(e,i){this.effectSources=e,this.store=i,this.effectsSubscription=null}start(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))}ngOnDestroy(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)}};t.\u0275fac=function(i){return new(i||t)(X(dQ),X(ve))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),AM=(()=>{let t=class t{constructor(e,i,o,a,s,c,u){this.sources=e,i.start();for(let f of a)e.addEffects(f);o.dispatch({type:cQ})}addEffects(e){this.sources.addEffects(e)}};t.\u0275fac=function(i){return new(i||t)(X(dQ),X(pQ),X(ve),X(sQ),X(tC,8),X(f2,8),X(aQ,8))},t.\u0275mod=Vt({type:t}),t.\u0275inj=Nt({});let n=t;return n})(),ENe=(()=>{let t=class t{constructor(e,i,o,a){let s=i.flat();for(let c of s)e.addEffects(c)}};t.\u0275fac=function(i){return new(i||t)(X(AM),X(lQ),X(tC,8),X(f2,8))},t.\u0275mod=Vt({type:t}),t.\u0275inj=Nt({});let n=t;return n})(),mQ=(()=>{let t=class t{static forFeature(...e){let i=e.flat(),o=eQ(i);return{ngModule:ENe,providers:[o,{provide:tQ,multi:!0,useValue:i},{provide:DM,multi:!0,useValue:[]},{provide:lQ,multi:!0,useFactory:iQ,deps:[tQ,DM]}]}}static forRoot(...e){let i=e.flat(),o=eQ(i);return{ngModule:AM,providers:[o,{provide:vL,useValue:[i]},{provide:aQ,useFactory:INe},{provide:DM,multi:!0,useValue:[]},{provide:sQ,useFactory:iQ,deps:[vL,DM]}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t}),t.\u0275inj=Nt({});let n=t;return n})();function iQ(n,t){let r=[];for(let e of n)r.push(...e);for(let e of t)r.push(...e);return r.map(e=>dNe(e)?Rt(e):e)}function INe(){let n=Rt(pQ,{optional:!0,skipSelf:!0}),t=Rt(vL,{self:!0});if(!(t.length===1&&t[0].length===0)&&n)throw new TypeError("EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.");return"guarded"}y();var Lx="PERFORM_ACTION",kNe="REFRESH",_Q="RESET",vQ="ROLLBACK",yQ="COMMIT",CQ="SWEEP",wQ="TOGGLE_ACTION",DNe="SET_ACTIONS_ACTIVE",xQ="JUMP_TO_STATE",SQ="JUMP_TO_ACTION",PL="IMPORT_STATE",TQ="LOCK_CHANGES",EQ="PAUSE_RECORDING",Ay=class{constructor(t,r){if(this.action=t,this.timestamp=r,this.type=Lx,typeof t.type>"u")throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?')}},CL=class{constructor(){this.type=kNe}},wL=class{constructor(t){this.timestamp=t,this.type=_Q}},xL=class{constructor(t){this.timestamp=t,this.type=vQ}},SL=class{constructor(t){this.timestamp=t,this.type=yQ}},TL=class{constructor(){this.type=CQ}},EL=class{constructor(t){this.id=t,this.type=wQ}};var IL=class{constructor(t){this.index=t,this.type=xQ}},kL=class{constructor(t){this.actionId=t,this.type=SQ}},DL=class{constructor(t){this.nextLiftedState=t,this.type=PL}},ML=class{constructor(t){this.status=t,this.type=TQ}},AL=class{constructor(t){this.status=t,this.type=EQ}};var NM=new tt("@ngrx/store-devtools Options"),uQ=new tt("@ngrx/store-devtools Initial Config");function IQ(){return null}var MNe="NgRx Store DevTools";function ANe(n){let t={maxAge:!1,monitor:IQ,actionSanitizer:void 0,stateSanitizer:void 0,name:MNe,serialize:!1,logOnly:!1,autoPause:!1,trace:!1,traceLimit:75,features:{pause:!0,lock:!0,persist:!0,export:!0,import:"custom",jump:!0,skip:!0,reorder:!0,dispatch:!0,test:!0},connectInZone:!1},r=typeof n=="function"?n():n,e=r.logOnly?{pause:!0,export:!0,test:!0}:!1,i=r.features||e||t.features;i.import===!0&&(i.import="custom");let o=Object.assign({},t,{features:i},r);if(o.maxAge&&o.maxAge<2)throw new Error(`Devtools 'maxAge' cannot be less than 2, got ${o.maxAge}`);return o}function hQ(n,t){return n.filter(r=>t.indexOf(r)<0)}function kQ(n){let{computedStates:t,currentStateIndex:r}=n;if(r>=t.length){let{state:i}=t[t.length-1];return i}let{state:e}=t[r];return e}
237function Vx(n){return new Ay(n,+Date.now())}function ONe(n,t){return Object.keys(t).reduce((r,e)=>{let i=Number(e);return r[i]=DQ(n,t[i],i),r},{})}function DQ(n,t,r){return Lt(re({},t),{action:n(t.action,r)})}function PNe(n,t){return t.map((r,e)=>({state:MQ(n,r.state,e),error:r.error}))}function MQ(n,t,r){return n(t,r)}function AQ(n){return n.predicate||n.actionsSafelist||n.actionsBlocklist}function RNe(n,t,r,e){let i=[],o={},a=[];return n.stagedActionIds.forEach((s,c)=>{let u=n.actionsById[s];u&&(c&&RL(n.computedStates[c],u,t,r,e)||(o[s]=u,i.push(s),a.push(n.computedStates[c])))}),Lt(re({},n),{stagedActionIds:i,actionsById:o,computedStates:a})}function RL(n,t,r,e,i){let o=r&&!r(n,t.action),a=e&&!t.action.type.match(e.map(c=>fQ(c)).join("|")),s=i&&t.action.type.match(i.map(c=>fQ(c)).join("|"));return o||a||s}function fQ(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function OQ(n){return{ngZone:n?Rt(Bt):null,connectInZone:n}}var VM=(()=>{let t=class t extends lS{};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),PM={START:"START",DISPATCH:"DISPATCH",STOP:"STOP",ACTION:"ACTION"},OL=new tt("@ngrx/store-devtools Redux Devtools Extension"),PQ=(()=>{let t=class t{constructor(e,i,o){this.config=i,this.dispatcher=o,this.zoneConfig=OQ(this.config.connectInZone),this.devtoolsExtension=e,this.createActionStreams()}notify(e,i){if(this.devtoolsExtension)if(e.type===Lx){if(i.isLocked||i.isPaused)return;let o=kQ(i);if(AQ(this.config)&&RL(o,e,this.config.predicate,this.config.actionsSafelist,this.config.actionsBlocklist))return;let a=this.config.stateSanitizer?MQ(this.config.stateSanitizer,o,i.currentStateIndex):o,s=this.config.actionSanitizer?DQ(this.config.actionSanitizer,e,i.nextActionId):e;this.sendToReduxDevtools(()=>this.extensionConnection.send(s,a))}else{let o=Lt(re({},i),{stagedActionIds:i.stagedActionIds,actionsById:this.config.actionSanitizer?ONe(this.config.actionSanitizer,i.actionsById):i.actionsById,computedStates:this.config.stateSanitizer?PNe(this.config.stateSanitizer,i.computedStates):i.computedStates});this.sendToReduxDevtools(()=>this.devtoolsExtension.send(null,o,this.getExtensionConfig(this.config)))}}createChangesObservable(){return this.devtoolsExtension?new Ma(e=>{let i=this.zoneConfig.connectInZone?this.zoneConfig.ngZone.runOutsideAngular(()=>this.devtoolsExtension.connect(this.getExtensionConfig(this.config))):this.devtoolsExtension.connect(this.getExtensionConfig(this.config));return this.extensionConnection=i,i.init(),i.subscribe(o=>e.next(o)),i.unsubscribe}):Ls}createActionStreams(){let e=this.createChangesObservable().pipe(Si()),i=e.pipe(Pi(f=>f.type===PM.START)),o=e.pipe(Pi(f=>f.type===PM.STOP)),a=e.pipe(Pi(f=>f.type===PM.DISPATCH),W(f=>this.unwrapAction(f.payload)),Bd(f=>f.type===PL?this.dispatcher.pipe(Pi(_=>_.type===eC),nB(1e3),Wi(1e3),W(()=>f),vt(()=>Z(f)),$n(1)):Z(f))),c=e.pipe(Pi(f=>f.type===PM.ACTION),W(f=>this.unwrapAction(f.payload))).pipe(Be(o)),u=a.pipe(Be(o));this.start$=i.pipe(Be(o)),this.actions$=this.start$.pipe(ii(()=>c)),this.liftedActions$=this.start$.pipe(ii(()=>u))}unwrapAction(e){return typeof e=="string"?(0,eval)(`(${e})`):e}getExtensionConfig(e){let i={name:e.name,features:e.features,serialize:e.serialize,autoPause:e.autoPause??!1,trace:e.trace??!1,traceLimit:e.traceLimit??75};return e.maxAge!==!1&&(i.maxAge=e.maxAge),i}sendToReduxDevtools(e){try{e()}catch(i){console.warn("@ngrx/store-devtools: something went wrong inside the redux devtools",i)}}};t.\u0275fac=function(i){return new(i||t)(X(OL),X(NM),X(VM))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})(),FM={type:Jy},FNe="@ngrx/store-devtools/recompute",NNe={type:FNe};function RQ(n,t,r,e,i){if(e)return{state:r,error:"Interrupted by an error up the chain"};let o=r,a;try{o=n(r,t)}catch(s){a=s.toString(),i.handleError(s)}return{state:o,error:a}}function RM(n,t,r,e,i,o,a,s,c){if(t>=n.length&&n.length===o.length)return n;let u=n.slice(0,t),f=o.length-(c?1:0);for(let _=t;_<f;_++){let I=o[_],S=i[I].action,F=u[_-1],H=F?F.state:e,q=F?F.error:void 0,Ie=a.indexOf(I)>-1?F:RQ(r,S,H,q,s);u.push(Ie)}return c&&u.push(n[n.length-1]),u}function VNe(n,t){return{monitorState:t(void 0,{}),nextActionId:1,actionsById:{0:Vx(FM)},stagedActionIds:[0],skippedActionIds:[],committedState:n,currentStateIndex:0,computedStates:[],isLocked:!1,isPaused:!1}}function LNe(n,t,r,e,i={}){return o=>(a,s)=>{let{monitorState:c,actionsById:u,nextActionId:f,stagedActionIds:_,skippedActionIds:I,committedState:S,currentStateIndex:F,computedStates:H,isLocked:q,isPaused:ee}=a||t;a||(u=Object.create(u));function Ie(qe){let ue=qe,Ne=_.slice(1,ue+1);for(let st=0;st<Ne.length;st++)if(H[st+1].error){ue=st,Ne=_.slice(1,ue+1);break}else delete u[Ne[st]];I=I.filter(st=>Ne.indexOf(st)===-1),_=[0,..._.slice(ue+1)],S=H[ue].state,H=H.slice(ue),F=F>ue?F-ue:0}function He(){u={0:Vx(FM)},f=1,_=[0],I=[],S=H[F].state,F=0,H=[]}let Le=0;switch(s.type){case TQ:{q=s.status,Le=1/0;break}case EQ:{ee=s.status,ee?(_=[..._,f],u[f]=new Ay({type:"@ngrx/devtools/pause"},+Date.now()),f++,Le=_.length-1,H=H.concat(H[H.length-1]),F===_.length-2&&F++,Le=1/0):He();break}case _Q:{u={0:Vx(FM)},f=1,_=[0],I=[],S=n,F=0,H=[];break}case yQ:{He();break}case vQ:{u={0:Vx(FM)},f=1,_=[0],I=[],F=0,H=[];break}case wQ:{let{id:qe}=s;I.indexOf(qe)===-1?I=[qe,...I]:I=I.filter(Ne=>Ne!==qe),Le=_.indexOf(qe);break}case DNe:{let{start:qe,end:ue,active:Ne}=s,st=[];for(let Ui=qe;Ui<ue;Ui++)st.push(Ui);Ne?I=hQ(I,st):I=[...I,...st],Le=_.indexOf(qe);break}case xQ:{F=s.index,Le=1/0;break}case SQ:{let qe=_.indexOf(s.actionId);qe!==-1&&(F=qe),Le=1/0;break}case CQ:{_=hQ(_,I),I=[],F=Math.min(F,_.length-1);break}case Lx:{if(q)return a||t;if(ee||a&&RL(a.computedStates[F],s,i.predicate,i.actionsSafelist,i.actionsBlocklist)){let ue=H[H.length-1];H=[...H.slice(0,-1),RQ(o,s.action,ue.state,ue.error,r)],Le=1/0;break}i.maxAge&&_.length===i.maxAge&&Ie(1),F===_.length-1&&F++;let qe=f++;u[qe]=s,_=[..._,qe],Le=_.length-1;break}case PL:{({monitorState:c,actionsById:u,nextActionId:f,stagedActionIds:_,skippedActionIds:I,committedState:S,currentStateIndex:F,computedStates:H,isLocked:q,isPaused:ee}=s.nextLiftedState);break}case Jy:{Le=0,i.maxAge&&_.length>i.maxAge&&(H=RM(H,Le,o,S,u,_,I,r,ee),Ie(_.length-i.maxAge),Le=1/0);break}case eC:{if(H.filter(ue=>ue.error).length>0)Le=0,i.maxAge&&_.length>i.maxAge&&(H=RM(H,Le,o,S,u,_,I,r,ee),Ie(_.length-i.maxAge),Le=1/0);else{if(!ee&&!q){F===_.length-1&&F++;let ue=f++;
237u[ue]=new Ay(s,+Date.now()),_=[..._,ue],Le=_.length-1,H=RM(H,Le,o,S,u,_,I,r,ee)}H=H.map(ue=>Lt(re({},ue),{state:o(ue.state,NNe)})),F=_.length-1,i.maxAge&&_.length>i.maxAge&&Ie(_.length-i.maxAge),Le=1/0}break}default:{Le=1/0;break}}return H=RM(H,Le,o,S,u,_,I,r,ee),c=e(c,s),{monitorState:c,actionsById:u,nextActionId:f,stagedActionIds:_,skippedActionIds:I,committedState:S,currentStateIndex:F,computedStates:H,isLocked:q,isPaused:ee}}}var gQ=(()=>{let t=class t{constructor(e,i,o,a,s,c,u,f){let _=VNe(u,f.monitor),I=LNe(u,_,c,f.monitor,f),S=Xt(Xt(i.asObservable().pipe(ib(1)),a.actions$).pipe(W(Vx)),e,a.liftedActions$).pipe(eB(ZL)),F=o.pipe(W(I)),H=OQ(f.connectInZone),q=new or(1);this.liftedStateSubscription=S.pipe(nb(F),bQ(H),pB(({state:He},[Le,qe])=>{let ue=qe(He,Le);return Le.type!==Lx&&AQ(f)&&(ue=RNe(ue,f.predicate,f.actionsSafelist,f.actionsBlocklist)),a.notify(Le,ue),{state:ue,action:Le}},{state:_,action:null})).subscribe(({state:He,action:Le})=>{if(q.next(He),Le.type===Lx){let qe=Le.action;s.next(qe)}}),this.extensionStartSubscription=a.start$.pipe(bQ(H)).subscribe(()=>{this.refresh()});let ee=q.asObservable(),Ie=ee.pipe(W(kQ));Object.defineProperty(Ie,"state",{value:VB(Ie,{manualCleanup:!0,requireSync:!0})}),this.dispatcher=e,this.liftedState=ee,this.state=Ie}ngOnDestroy(){this.liftedStateSubscription.unsubscribe(),this.extensionStartSubscription.unsubscribe()}dispatch(e){this.dispatcher.next(e)}next(e){this.dispatcher.next(e)}error(e){}complete(){}performAction(e){this.dispatch(new Ay(e,+Date.now()))}refresh(){this.dispatch(new CL)}reset(){this.dispatch(new wL(+Date.now()))}rollback(){this.dispatch(new xL(+Date.now()))}commit(){this.dispatch(new SL(+Date.now()))}sweep(){this.dispatch(new TL)}toggleAction(e){this.dispatch(new EL(e))}jumpToAction(e){this.dispatch(new kL(e))}jumpToState(e){this.dispatch(new IL(e))}importState(e){this.dispatch(new DL(e))}lockChanges(e){this.dispatch(new ML(e))}pauseRecording(e){this.dispatch(new AL(e))}};t.\u0275fac=function(i){return new(i||t)(X(VM),X(lS),X(jB),X(PQ),X(cS),X(rb),X(BB),X(NM))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();function bQ({ngZone:n,connectInZone:t}){return r=>t?new Ma(e=>r.subscribe({next:i=>n.run(()=>e.next(i)),error:i=>n.run(()=>e.error(i)),complete:()=>n.run(()=>e.complete())})):r}var BNe=new tt("@ngrx/store-devtools Is Devtools Extension or Monitor Present");function jNe(n,t){return!!n||t.monitor!==IQ}function GNe(){let n="__REDUX_DEVTOOLS_EXTENSION__";return typeof window=="object"&&typeof window[n]<"u"?window[n]:null}function zNe(n={}){return s2([PQ,VM,gQ,{provide:uQ,useValue:n},{provide:BNe,deps:[OL,NM],useFactory:jNe},{provide:OL,useFactory:GNe},{provide:NM,deps:[uQ],useFactory:ANe},{provide:zB,deps:[gQ],useFactory:$Ne},{provide:GB,useExisting:VM}])}function $Ne(n){return n.state}var FQ=(()=>{let t=class t{static instrument(e={}){return{ngModule:t,providers:[zNe(e)]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t}),t.\u0275inj=Nt({});let n=t;return n})();y();y();var UNe=["/api/auth/token","/api/rpc"],Bx=n=>{let t;return n.params&&n.params instanceof HB?t=n.params.interceptorConfig:t=new qB,HNe(n.url)&&(t.ignoreLoading=!0),t},HNe=n=>{for(let t of UNe)if(n.startsWith(t))return!0;return!1};var NQ={},VQ=(()=>{let t=class t{constructor(e,i,o,a){this.store=e,this.dialogService=i,this.translate=o,this.authService=a,this.AUTH_SCHEME="Bearer ",this.AUTH_HEADER_NAME="X-Authorization",this.activeRequests=0}intercept(e,i){if(e.url.startsWith("/api/")){let o=Bx(e);this.updateLoadingState(o,!0);let a;return this.isTokenBasedAuthEntryPoint(e.url)?!Ro.getJwtToken()&&!this.authService.refreshTokenPending()?a=this.handleResponseError(e,i,new oS({error:{message:"Unauthorized!"},status:401})):Ro.isJwtTokenValid()?a=this.jwtIntercept(e,i):a=this.handleResponseError(e,i,new oS({error:{refreshTokenPending:!0}})):a=this.handleRequest(e,i),a.pipe(gu(()=>{e.url.startsWith("/api/")&&this.updateLoadingState(o,!1)}))}else return i.handle(e)}jwtIntercept(e,i){let o=this.updateAuthorizationHeader(e);return o?this.handleRequest(o,i):zr(()=>new Error("Could not get JWT token from store."))}handleRequest(e,i){return i.handle(e).pipe(vt(o=>{let a=o;return this.handleResponseError(e,i,a)}))}handleResponseError(e,i,o){let a=Bx(e),s=!1,c=a.ignoreErrors,u=a.resend
237Request,f=o.error?o.error.errorCode:null;if(o.error&&o.error.refreshTokenPending||o.status===401&&e.url!==Su.entryPoints.tokenRefresh){if(o.error&&o.error.refreshTokenPending||f&&f===Su.serverErrorCode.jwtTokenExpired)return this.refreshTokenAndRetry(e,i);f!==Su.serverErrorCode.credentialsExpired&&(s=!0)}else if(f&&f===Su.serverErrorCode.subscriptionViolation)c||this.dialogService.subscriptionViolation(o.error);else if(o.status===429){if(u)return this.retryRequest(e,i)}else o.status===403?c||this.dialogService.permissionDenied():o.status===0||o.status===-1?this.showError("Unable to connect"):e.url.startsWith("/api/rpc")||e.url.startsWith("/api/plugins/rpc")||(o.status===404?c||this.showError(e.method+": "+e.url+"<br/>"+o.status+": "+o.statusText):s=!0);if(s&&!c){let _=oC(o,this.translate,e.responseType);this.showError(_.message,_.timeout)}return zr(()=>o)}retryRequest(e,i){let o=1e3+Math.random()*3e3;return Z(null).pipe(nl(o),Ft(()=>this.jwtIntercept(e,i)))}refreshTokenAndRetry(e,i){return this.authService.refreshJwtToken().pipe(vt(o=>{this.authService.logout(!0,!0);let a=o?o.message:"Unauthorized!";return this.handleResponseError(e,i,new oS({error:{message:a,timeout:200},status:401}))}),ii(()=>this.jwtIntercept(e,i)))}updateAuthorizationHeader(e){let i=Ro.getJwtToken();return i?(NQ[this.AUTH_HEADER_NAME]=`${this.AUTH_SCHEME}${i}`,e=e.clone({setHeaders:NQ}),e):null}isTokenBasedAuthEntryPoint(e){return e.startsWith("/api/")&&!e.startsWith(Su.entryPoints.login)&&!e.startsWith(Su.entryPoints.tokenRefresh)&&!e.startsWith(Su.entryPoints.nonTokenBased)}updateLoadingState(e,i){e.ignoreLoading||(i?this.activeRequests++:this.activeRequests--,this.activeRequests===1&&i?this.store.dispatch(new k0):this.activeRequests===0&&this.store.dispatch(new D0))}showError(e,i=0){setTimeout(()=>{this.store.dispatch(new Sr({message:e,type:"error"}))},i)}};t.\u0275fac=function(i){return new(i||t)(X(ve),X(Sa),X(Ge),X(Ro))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();y();y();y();var FL=BQ();function jQ(n){return function(r,e){r=r||{},FL(r),e.payload&&FL(e.payload);var i=n(r,e);return FL(i),i}}y();y();var jx="TB-",LM=(()=>{let t=class t{constructor(){}static loadInitialState(){return Object.keys(localStorage).reduce((e,i)=>{if(i.includes(jx)){let o=i.replace(jx,"").toLowerCase().split(".").map(s=>s.split("-").map((c,u)=>u===0?c:c.charAt(0).toUpperCase()+c.slice(1)).join("")),a=e;o.forEach((s,c)=>{if(c===o.length-1){a[s]=JSON.parse(localStorage.getItem(i));return}a[s]=a[s]||{},a=a[s]})}return e},{})}setItem(e,i){localStorage.setItem(`${jx}${e}`,JSON.stringify(i))}getItem(e){return JSON.parse(localStorage.getItem(`${jx}${e}`))}removeItem(e){localStorage.removeItem(`${jx}${e}`)}testLocalStorage(){let e="testValue",i="testKey",o,a="localStorage did not return expected value";if(this.setItem(i,e),o=this.getItem(i),this.removeItem(i),o!==e)throw new Error(a)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function GQ(n){return(t,r)=>{let e=n(t,r);return[Jy.toString(),eC.toString()].includes(r.type)?re(re({},e),LM.loadInitialState()):e}}y();function zQ(n){return(t,r)=>{let e=n(t,r);return console.log(`[DEBUG] action: ${r.type}`,{payload:r.payload,oldState:t,newState:e}),e}}y();var WNe={isLoading:!1};function $Q(n=WNe,t){switch(t.type){case _y.START_LOAD:return Lt(re({},n),{isLoading:!0});case _y.FINISH_LOAD:return Lt(re({},n),{isLoading:!1});default:return n}}y();y();var BM={openedMenuSections:[]},Xh=function(n){return n.GENERAL="GENERAL",n.QUICK_LINKS="QUICK_LINKS",n.DOC_LINKS="DOC_LINKS",n.DASHBOARDS="DASHBOARDS",n.GETTING_STARTED="GETTING_STARTED",n}(Xh||{}),YNe=function(n){return n.VISIT="VISIT",n.STAR="STAR",n.UNSTAR="UNSTAR",n}(YNe||{});y();var UQ={enabled:!1,baseUrl:null,apiKey:null};var NL={authUser:null,userDetails:null,userTokenAccessEnabled:!1,forceFullscreen:!1,edgesSupportEnabled:!1,whiteLabelingAllowed:!1,customerWhiteLabelingAllowed:!1,hasRepository:!1,tbelEnabled:!1,persistDeviceStateToTelemetry:!1,mobileQrEnabled:!1,maxResourceSize:0,maxArgumentsPerCF:0,maxDataPointsPerRollingArg:0,maxDebugModeDurationMinutes:0,userSettings:BM,allowedDashboardIds:[],availableLocales:hl.supportedLangs,trendzSettings:UQ},QNe=re({isAuthenticated:!1,isUserLoaded:!1,lastPublicDashboardId:null},NL),HQ=(n=QNe,t)=>{let r;switch(t.type){case ps.AUTHENTICATED:return re(Lt(re({},n),{isAuthenticated:!0}),t.payload);case ps.UNAUTHENTICATED:return re(Lt(re({},n),{isAuthenticated:!1}),NL);case ps.LOAD_USER:return re(Lt(re(re({},n),t.payload),{isAuthenticated:t.payload.isUserLoaded?n.isAuthenticated:!1}),t.payload.isUserLoaded?{}:NL);case ps.UPDATE_USER_DETAILS:return re(re({},n),t.payload);case ps.UPDATE_AUTH_USER:let e=re(re({},n.authUser),t.payload);return Lt(re({},n),{authUser:e});case ps.UPDATE_LAST_PUBLIC_DASHBOARD_ID:return re(re({},n),t.payload);case ps.UPDATE_HAS_REPOSITORY:return re(re({},n),t.payload);case ps.UPDATE_MOBILE_QR_ENABLED:return re(re({},n),t.payload);case ps.UPDATE_OPENED_MENU_SECTION:let i=new Set(n.userSettings.openedMenuSections);return t.payload.opened?i.has(t.payload.path)||i.add(t.payload.path):i.delete(t.payload.path),r=Lt(re({},n.userSettings),{openedMenuSections:Array.from(i)}),Lt(re({},n),{userSettings:r});case ps.PUT_USER_SETTINGS:return r=re(re({},n.userSettings),t.payload),Lt(re({},n),{userSettings:r});case ps.DELETE_USER_SETTINGS:return r=re({}
237,n.userSettings),t.payload.forEach(o=>y4(r,o)),Lt(re({},n),{userSettings:r});case ps.UPDATE_TRENDZ_SETTINGS:return Lt(re({},n),{trendzSettings:t.payload});default:return n}};y();var KNe={userLang:null};function qQ(n=KNe,t){switch(t.type){case vf.CHANGE_LANGUAGE:return re(re({},n),t.payload);default:return n}}y();y();var VL=$B("settings"),XNe=h2(VL,n=>n),Vfi=h2(XNe,n=>n.userLang);y();var WQ=(()=>{let t=class t{constructor(e,i,o,a,s){this.translate=e,this.menuService=i,this.utils=o,this.whiteLabelingService=a,this.title=s}setTitle(e,i){let o=e;for(;o.children.length;)o=o.children[0];let{title:a,customTitle:s,customChildTitle:c}=o.data,u=null;if((s||c)&&(u=c?this.menuService.getCurrentCustomChildSection():this.menuService.getCurrentCustomSection()),u){let f=this.utils.customTranslation(u.name,u.name);this.title.setTitle(`${this.whiteLabelingService.appTitle()} | ${f}`)}else{let f=i||this.translate;a?f.get(a).pipe(Pi(_=>_!==a)).subscribe(_=>this.title.setTitle(`${this.whiteLabelingService.appTitle()} | ${_}`)):this.title.setTitle(this.whiteLabelingService.appTitle())}}};t.\u0275fac=function(i){return new(i||t)(X(Ge),X(Vb),X(vn),X(fl),X(OB))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var YQ=(()=>{let t=class t{constructor(e,i){this.whiteLabelingService=e,this.imagePipe=i,this.favicon=$('link[rel="icon"]')}setFavicon(){let e=this.whiteLabelingService.faviconUrl(),i=!this.whiteLabelingService.isUserWlMode;this.imagePipe.transform(e,{asString:!0,ignoreLoadingImage:!0,loginFavicon:i}).subscribe(o=>{this.favicon.attr("href",o)})}};t.\u0275fac=function(i){return new(i||t)(X(fl),X(Wo))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var jM=(()=>{let t=class t{constructor(e,i,o,a,s,c){this.window=e,this.document=i,this.utils=o,this.http=a,this.router=s,this.authService=c,this.reportView=!1,this.reportTimewindow=null,this.openReportSubject=new Te,this.onWindowMessageListener=this.onWindowMessage.bind(this),this.receiveWsData=new Map,this.lastWsCommandTimeMs=0,this.waitForWidgets=new Set,this.lastWaitWidgetTimeMs=0,this.widgetsCount=0,this.lastWaitWidgetsTimeMs=0}loadReportParams(){return this.utils.getQueryParam("reportView")==="true"&&(this.reportView=!0,this.authService.loadUserFromAccessToken(null).subscribe(()=>{if(window.addEventListener("message",this.onWindowMessageListener),this.window.postWebReportResult)this.postReportResult({success:!0});else{let i=setInterval(()=>{this.window.postWebReportResult&&(clearInterval(i),this.postReportResult({success:!0}))},20)}})),this.reportView}onSendWsCommands(e){for(let i of e.cmds)!i.type.toLowerCase().includes("unsubscribe")&&typeof i.cmdId=="number"&&!this.receiveWsData.has(i.cmdId)&&(this.receiveWsData.set(i.cmdId,!1),this.lastWsCommandTimeMs=this.utils.currentPerfTime())}onWsCmdUpdateMessage(e){let i=e;"cmdId"in i&&i.cmdId?this.receiveWsData.set(i.cmdId,!0):"subscriptionId"in i&&i.subscriptionId&&this.receiveWsData.set(i.subscriptionId,!0)}onDashboardLoaded(e){this.widgetsCount=e,this.lastWaitWidgetsTimeMs=this.utils.currentPerfTime()}onWaitForMap(){return this.onWaitForWidget()}onWaitForWidget(){let e=this.utils.guid();return this.waitForWidgets.add(e),this.lastWaitWidgetTimeMs=this.utils.currentPerfTime(),e}onMapLoaded(e){this.onWidgetLoaded(e)}onWidgetLoaded(e){this.waitForWidgets.delete(e)}downloadDashboardReport(e,i,o,a){let s=`/api/report/${e}/download`,c=k5(),u={type:i,timezone:c};return o&&(u.state=o),a&&(u.timewindow=a),this.downloadReport(s,u)}downloadTestReport(e,i){let o="/api/report/test",a={};return i&&(a.reportsServerEndpointUrl=i),this.downloadReport(o,e,a)}onWindowMessage(e){if(e.data){let i;try{i=JSON.parse(e.data)}catch{}if(i&&i.type)switch(i.type){case"openReport":let o=i.data;this.openReport(o).subscribe(s=>{this.postReportResult(s)});break;case"waitReportWidgets":let a=i.data;this.waitWidgets(a.timeout).subscribe(s=>{this.postReportResult(s)});break;case"clearReport":this.clearReport().subscribe(s=>{let c={success:s};s||(c.error="Navigation failed while clear report!"),this.postReportResult(c)});break}}}postReportResult(e){this.window.postWebReportResult?this.window.postWebReportResult(e):this.window.postMessage(JSON.stringify({type:"reportResult",data:e}),"*")}openReport(e){return e&&(e.accessToken||e.publicId)&&e.dashboardId?this.loadUser(e.accessToken,e.publicId).pipe(Ft(i=>{if(i){e.reportTimewindow?this.reportTimewindow=e.reportTimewindow:this.reportTimewindow=null;let o=`/dashboard/${e.dashboardId}`,a=[];return e.state&&a.push(`state=${e.state}`),a.length&&(o+=`?${a.join("&")}`),this.openReportSubject.next(),this.widgetsCount=0,this.receiveWsD
237ata.clear(),this.waitForWidgets.clear(),this.lastWaitWidgetsTimeMs=0,this.lastWsCommandTimeMs=this.utils.currentPerfTime(),this.lastWaitWidgetTimeMs=this.utils.currentPerfTime(),Yn(this.router.navigateByUrl(o,{replaceUrl:!0})).pipe(Ft(s=>s?this.waitForLayoutReady(e.timeout).pipe(W(()=>({success:!0,pageHeight:this.pageHeight()})),vt(c=>Z({success:!1,error:c}))):Z({success:!1,error:"Failed to navigate to target dashboard!"})),vt(s=>Z({success:!1,error:s?.error?.message})))}else return Z({success:!1,error:"Authentication failed!"})})):Z({success:!1,error:"Invalid message arguments provided!"})}pageHeight(){let e=0,i=document.getElementById("gridster-child");if(i){e=Math.round(i.scrollHeight);let o=document.querySelector(".tb-dashboard-title");o&&(e+=Math.round(o.offsetHeight))}return e}waitForLayoutReady(e=3e3){return Yn(this.waitForReportPage(e)).pipe(Ft(()=>Yn(this.waitForWebsocketData(e))))}waitForReportPage(e=3e3){return new Promise((i,o)=>{let a=0,s=setInterval(()=>{this.lastWaitWidgetsTimeMs&&this.isReportPageDomReady()&&this.utils.currentPerfTime()-this.lastWaitWidgetsTimeMs>=300?(clearInterval(s),i()):(a+=10,a>=e&&(clearInterval(s),o("Wait for report page timed out!")))},10)})}waitForWebsocketData(e=3e3){return new Promise((i,o)=>{let a=0,s=setInterval(()=>{(!this.receiveWsData.size||Array.from(this.receiveWsData.values()).every(c=>c))&&this.utils.currentPerfTime()-this.lastWsCommandTimeMs>=100?(clearInterval(s),i()):(a+=10,a>=e&&(clearInterval(s),o("Wait for websocket data timed out!")))},10)})}waitWidgets(e=3e3){return Yn(this.waitForWidgetsLoaded(e)).pipe(Ft(()=>this.waitForLayoutReady(e)),Ft(()=>this.waitForWidgetsLoaded(e)),W(()=>({success:!0})),vt(i=>Z({success:!1,error:i})))}waitForWidgetsLoaded(e=3e3){return new Promise((i,o)=>{let a=0,s=setInterval(()=>{!this.waitForWidgets.size&&this.utils.currentPerfTime()-this.lastWaitWidgetTimeMs>=100?(clearInterval(s),i()):(a+=10,a>=e&&(clearInterval(s),o("Wait for map tiles timed out!")))},10)})}isReportPageDomReady(){if($("section.tb-dashboard-container gridster#gridster-child").not("tb-widget-container gridster#gridster-child").length){let e=Array.from($("tb-widget>div.tb-widget-loading"));if(e.length>=this.widgetsCount&&e.every(i=>i.classList.contains("!hidden")))return!0}return!1}clearReport(){return this.publicId?(this.publicId=null,this.authService.logout(),Z(!0)):Yn(this.router.navigateByUrl("/empty-page",{replaceUrl:!0}))}loadUser(e,i){return i&&i.length?this.publicId!==i?this.authService.loadUserFromPublicId(i).pipe(W(o=>o!==null),et(o=>{o&&(this.publicId=i,this.accessToken=null)})):Z(!0):this.accessToken!==e?this.authService.loadUserFromAccessToken(e).pipe(W(o=>o!==null),et(o=>{o&&(this.accessToken=e,this.publicId=null)})):Z(!0)}downloadReport(e,i,o){return o||(o={}),this.http.post(e,i,{params:o,responseType:"arraybuffer",observe:"response"}).pipe(W(a=>{let s=a.headers,c=s.get("x-filename"),u=s.get("content-type"),f=this.document.createElement("a"),_=new Blob([a.body],{type:u}),I=URL.createObjectURL(_);f.setAttribute("href",I),f.setAttribute("download",c);let S=new MouseEvent("click",{view:this.window,bubbles:!0,cancelable:!1});return f.dispatchEvent(S),null}))}};t.\u0275fac=function(i){return new(i||t)(X(Wr),X(Qi),X(vn),X(Jt),X(vi),X(Ro))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var e3e="SETTINGS",KQ=(()=>{let t=class t{constructor(e,i,o,a,s,c,u,f,_,I){this.actions$=e,this.store=i,this.utils=o,this.router=a,this.localStorageService=s,this.titleService=c,this.translate=u,this.document=f,this.faviconService=_,this.reportService=I,this.setTranslateServiceLanguage=zc(()=>this.actions$.pipe(Pd(vf.CHANGE_LANGUAGE),nb(this.store.pipe(Aa(VL))),et(([S,F])=>{if(this.localStorageService.setItem(e3e,{userLang:F.userLang}),!F.ignoredLoad){let H=em(this.store)?.availableLocales;Mj(this.translate,this.document,F.userLang,H,F.reload).subscribe(()=>{})}})),{dispatch:!1}),this.setTitle=zc(()=>Xt(this.actions$.pipe(Pd(vf.CHANGE_LANGUAGE,vf.CHANGE_WHITE_LABELING)),this.router.events.pipe(Pi(S=>S instanceof pf))).pipe(et(()=>{this.titleService.setTitle(this.router.routerState.snapshot.root,this.translate)})),{dispatch:!1}),this.setFavicon=zc(()=>Xt(this.actions$.pipe(Pd(vf.CHANGE_WHITE_LABELING))).pipe(et(()=>{this.faviconService.setFavicon()})),{dispatch:!1}),this.setPublicId=zc(()=>Xt(this.router.events.pipe(Pi(S=>
237S instanceof pf))).pipe(et(S=>{let F=Mr(this.store),H=S.snapshot;!this.reportService.reportView&&F&&F.isPublic&&H.url&&H.url.length&&H.url[0].path==="dashboard"&&(this.utils.updateQueryParam("publicId",F.sub),this.store.dispatch(new A4({lastPublicDashboardId:H.params.dashboardId})))})),{dispatch:!1})}};t.\u0275fac=function(i){return new(i||t)(X(My),X(ve),X(vn),X(vi),X(LM),X(WQ),X(Ge),X(Qi),X(YQ),X(jM))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();y();var t3e={notification:null,hideNotification:null};function XQ(n=t3e,t){switch(t.type){case Db.SHOW_NOTIFICATION:return Lt(re({},n),{notification:t.notification});case Db.HIDE_NOTIFICATION:return Lt(re({},n),{hideNotification:t.hideNotification});default:return n}}y();var ZQ=(()=>{let t=class t{constructor(e,i){this.actions$=e,this.notificationService=i,this.dispatchNotification=zc(()=>this.actions$.pipe(Pd(Db.SHOW_NOTIFICATION),W(({notification:o})=>{this.notificationService.dispatchNotification(o)})),{dispatch:!1}),this.hideNotification=zc(()=>this.actions$.pipe(Pd(Db.HIDE_NOTIFICATION),W(({hideNotification:o})=>{this.notificationService.hideNotification(o)})),{dispatch:!1})}};t.\u0275fac=function(i){return new(i||t)(X(My),X(vT))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();y();y();var JQ=(()=>{let t=class t{constructor(e){this.http=e}loadUserSettings(){return this.http.get("/api/user/settings",N({ignoreLoading:!0,ignoreErrors:!0})).pipe(W(e=>!e||!Object.keys(e).length?BM:e))}saveUserSettings(e){return this.http.post("/api/user/settings",e,N({ignoreLoading:!0,ignoreErrors:!0}))}putUserSettings(e){return this.http.put("/api/user/settings",e,N({ignoreLoading:!0,ignoreErrors:!0}))}deleteUserSettings(e){return this.http.delete(`/api/user/settings/${e.join(",")}`,N({ignoreLoading:!0,ignoreErrors:!0}))}getDocumentationLinks(e){return this.http.get(`/api/user/settings/${Xh.DOC_LINKS}`,N(e))}updateDocumentationLinks(e,i){return this.http.put(`/api/user/settings/${Xh.DOC_LINKS}`,e,N(i))}getQuickLinks(e){return this.http.get(`/api/user/settings/${Xh.QUICK_LINKS}`,N(e))}updateQuickLinks(e,i){return this.http.put(`/api/user/settings/${Xh.QUICK_LINKS}`,e,N(i))}getGettingStarted(e){return this.http.get(`/api/user/settings/${Xh.GETTING_STARTED}`,N(e))}updateGettingStarted(e,i){return this.http.put(`/api/user/settings/${Xh.GETTING_STARTED}`,e,N(i))}getUserDashboardsInfo(e){return this.http.get("/api/user/dashboards",N(e))}reportUserDashboardAction(e,i,o){return this.http.get(`/api/user/dashboards/${e}/${i}`,N(o))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var eK=(()=>{let t=class t{constructor(e,i,o){this.actions$=e,this.store=i,this.userSettingsService=o,this.persistOpenedMenuSections=zc(()=>this.actions$.pipe(Pd(ps.UPDATE_OPENED_MENU_SECTION),nb(this.store.pipe(Aa(P4))),Ft(([a,s])=>this.userSettingsService.putUserSettings({openedMenuSections:s.userSettings.openedMenuSections}))),{dispatch:!1}),this.putUserSettings=zc(()=>this.actions$.pipe(Pd(ps.PUT_USER_SETTINGS),Ft(a=>this.userSettingsService.putUserSettings(a.payload))),{dispatch:!1}),this.deleteUserSettings=zc(()=>this.actions$.pipe(Pd(ps.DELETE_USER_SETTINGS),Ft(a=>this.userSettingsService.deleteUserSettings(a.payload))),{dispatch:!1})}};t.\u0275fac=function(i){return new(i||t)(X(My),X(ve),X(JQ))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();var tK={load:$Q,auth:HQ,settings:qQ,notification:XQ},GM=[GQ];hl.production||(GM.unshift(jQ),GM.unshift(zQ));var iK=[eK,KQ,ZQ];y();var zM=class{handle(t){if(t.key&&!t.key.startsWith(ZB)){console.warn("Translation for '"+t.key+"' doesn't exist");let r,e=t.key.split(".");for(let i=e.length-1;i>=0;i--){let o={};i===e.length-1?o[e[i]]=t.key:o[e[i]]=r,r=o}t.translateService.setTranslation(t.translateService.currentLang,r,!0)}}};y();y();var rK=Ld(nK(),1);var jL=new tt("MESSAGE_FORMAT_CONFIG"),n3e={biDiSupport:!1,formatters:{},strictNumberSign:!1,currency:"USD",strictPluralKeys:!0,throwOnError:!1,fallbackPrefix:void 0},oK=(()=>{let t=class t extends xS{constructor(e){super(),this.mfCache=new Map;let{formatters:i,biDiSupport:o,strictNumberSign:a,currency:s,strictPluralKeys:c,throwOnError:u,fallbackPrefix:f}=re(re({},n3e),e);this.messageFormatOptions={customFormatters:i,biDiSupport:o,strict:a,currency:s,strictPluralKeys:c},this.throwOnError=!!u,this.fallbackPrefix=f}compile(e,i){if(this.fallbackPrefix&&e.startsWith(this.fallbackPrefix))return e.slice(this.fallbackPrefix.length);let o;try{o=this.getMessageFormatInstance(i).compile(e)}catch(a){if(this.throwOnError)throw a;console.error(a),console.error(`[ngx-translate-messageformat-compiler] Could not compile message for lang '${i}': '${e}'`),o=o3e(e,i)}return this.throwOnError||(o=r3e(o,e)),o}compileTranslations(e,i){return typeof e=="string"?this.compile(e,i):Object.keys(e).reduce((o,a)=>{let s=e[a];return o[a]=this.compileTranslations(s,i),o},{})}getMessageFormatInstance(e){return this.mfCache.has(e)||this.mfCache.set(e,new rK.default(e,this.messageFormatOptions)),this.mfCache.get(e)}};t.\u0275fac=function(i){return new(i||t)(X(jL,8))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();function r3e(n,t){return r=>{let e=t;try{e=n(r)}catch(i){console.error(i),console.error(`[ngx-translate-messageformat-compiler] Could not interpolate '${t}' with params '${r}'`)}return e}}function o3e(n,t){return()=>(console.warn(`[ngx-translate-messageformat-compiler] Falling back to original invalid message: '${n}' ('${t}')`),String(n))}var mK=Ld(pK());var uK=(()=>{let t=class t extends oK{constructor(e){super(e)}compile(e,i){return this.defaultCompile(e,i)}compileTranslations(e,i){return this.defaultCompile(e,i)}defaultCompile(e,i){if(typeof e!="object")if(this.checkIsPlural(e))try{return super.compile(e,i.replace("_","-"))}catch(o){return console.warn("Failed compile translate:",e,o),e}else return e;else{let o={};for(let a of Object.keys(e))o[a]=this.defaultCompile(e[a],i);return o}}checkIsPlural(e){let i;try{i=(0,mK.parse)(e.replace(/\{\{/g,"{").replace(/\}\}/g,"}"),{cardinal:[],ordinal:[]})}catch(a){return console.warn(`Failed to parse source: ${e}`),console.error(a),!1}return i.filter(a=>typeof a!="string"&&a.type==="plural").length>0}};t.\u0275fac=function(i){return new(i||t)(X(jL,8))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var hK=(()=>{let t=class t extends wS{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(e,i){let o;return typeof e=="string"?o=this.interpolateString(e,i):typeof e=="function"?(o=this.interpolateFunction(e,i),typeof o=="str
237ing"&&(o=this.interpolateString(o,i))):o=e,o}getValue(e,i){let o=typeof i=="string"?i.split("."):[i];i="";do i+=o.shift(),De(e)&&De(e[i])&&(typeof e[i]=="object"||!o.length)?(e=e[i],i=""):o.length?i+=".":e=void 0;while(o.length);return e}interpolateFunction(e,i){return e(i)}interpolateString(e,i){return i?e.replace(this.templateMatcher,(o,a)=>{let s=this.getValue(i,a);return De(s)?s:o}):e}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=wn(t)))(o||t)}})(),t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var fK=(()=>{let t=class t{constructor(e){this.http=e,this.isAuthenticated=!1}getTranslation(e){let i;if(this.isAuthenticated){let o=[this.http.get(`/api/translation/full/${e}`)];!hl.production&&hl.supportedLangs&&hl.supportedLangs.indexOf(e)!==-1&&o.push(this.http.get(`/assets/locale/locale.constant-${e}.json`)),i=Rn(o).pipe(W(a=>a.length>1?go({},a[0],a[1]):a[0]))}else i=this.http.get(`/api/noauth/translation/login/${e}`);return i.pipe(vt(()=>this.loadSystemLang(e)))}loadSystemLang(e){let i=[this.http.get(`/assets/locale/locale.constant-${hl.defaultLang}.json`)];return hl.supportedLangs&&hl.supportedLangs.indexOf(e)!==-1&&i.push(this.http.get(`/assets/locale/locale.constant-${e}.json`)),Rn(i).pipe(W(o=>o.length>1?go({},o[0],o[1]):o[0]))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();y();var p3e=n=>({entityType:n}),gK=(()=>{let t=class t{constructor(e,i,o){this.data=e,this.dialogRef=i,this.importExportService=o,this.entityTypeTranslations=ta,this.defaultEntityLabel="entity.entity",this.entityId=e.entity.id??e.entity.ruleChainId,this.entityTypeLabel=ta.has(this.entityId.entityType)?ta.get(this.entityId.entityType).type:this.defaultEntityLabel}onCancel(){this.dialogRef.close()}onDiscard(){this.dialogRef.close(!1)}onConfirm(){this.dialogRef.close(!0)}onLinkClick(e){e.preventDefault(),this.importExportService.exportEntity(this.data.entity)}};t.\u0275fac=function(i){return new(i||t)(h(un),h(en),h(Td))},t.\u0275cmp=L({type:t,selectors:[["tb-entity-conflict-dialog"]],standalone:!0,features:[ot],decls:28,vars:21,consts:[["color","primary"],[1,"main-label"],[1,"flex-1"],["mat-icon-button","","type","button",3,"click"],[1,"material-icons"],["mat-dialog-content",""],[1,"message-container"],[1,"cursor-pointer",3,"click"],["mat-dialog-actions","",1,"flex","flex-row","items-center","justify-end"],["mat-button","","color","primary","type","button","cdkFocusInitial","",3,"click"],["mat-raised-button","","color","primary","type","submit",3,"click"]],template:function(i,o){i&1&&(d(0,"mat-toolbar",0)(1,"h2",1),g(2),p(),O(3,"span",2),d(4,"button",3),T("click",function(){return o.onCancel()}),d(5,"mat-icon",4),g(6,"close"),p()()(),d(7,"div",5)(8,"div",6)(9,"span"),g(10),v(11,"translate"),v(12,"translate"),d(13,"a",7),T("click",function(s){return o.onLinkClick(s)}),g(14),v(15,"translate"),p(),g(16,". "),p(),O(17,"br"),d(18,"span"),g(19),v(20,"translate"),p()()(),d(21,"div",8)(22,"button",9),T("click",function(){return o.onDiscard()}),g(23),v(24,"translate"),p(),d(25,"button",10),T("click",function(){return o.onConfirm()}),g(26),v(27,"translate"),p()()),i&2&&(l(2),j(" ",o.data.message," "),l(8),j(" ",ft(12,8,"entity.version-conflict.link",Xe(19,p3e,C(11,6,o.entityTypeLabel)))," "),l(4),z(C(15,11,"entity.link")),l(5),z(C(20,13,"entity.version-conflict.message")),l(4),j(" ",C(24,15,"entity.version-conflict.discard")," "),l(3),j(" ",C(27,17,"entity.version-conflict.overwrite")," "))},dependencies:[zi,jV,yt,Pe,Se,ir,gr,Dn,be],styles:['@charset "UTF-8";[_nghost-%COMP%]   .main-label[_ngcontent-%COMP%]{padding-left:8px}[_nghost-%COMP%]   .message-container[_ngcontent-%COMP%]{max-width:530px}']});let n=t;return n})();var bK=(()=>{let t=class t{constructor(e){this.dialog=e}intercept(e,i){return e.url.startsWith("/api/")?i.handle(e).pipe(vt(o=>o.status!==IB.Conflict?zr(()=>o):this.handleConflictError(e,i,o))):i.handle(e)}handleConflictError(e,i,o){return Bx(e).ignoreVersionConflict||!this.isVersionedEntity(e.body)?zr(()=>o):this.openConflictDialog(e.body,o.error.message).pipe(ii(a=>dt(a)?a?i.handle(this.updateRequestVersion(e)):(e.params.interceptorConfig.ignoreErrors=!0,zr(()=>o)):Z(null)))}updateRequestVersion(e){let i=Lt(re({},e.body),{version:null});return e.clone({body:i})}isVersionedEntity(e){return!!(e?.id??e?.ruleChainId)}openConflictDialog(e,i){return this.dialog.open(gK,{disableClose:!0,data:{message:i,entity:e},panelClass:["tb-dialog","tb-fullscreen-dialog"]}).afterClosed()}};t.\u0275fac=function(i){return new(i||t)(X(Lr))},t.\u0275prov=we({token:t,factory:t.\u0275fac});let n=t;return n})();var m3e=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=Vt({type:t}),t.\u0275inj=Nt({providers:[{provide:m2,useClass:VQ,multi:!0},{provide:m2,useClass:bK,multi:!0},{provide:Ij,useValue:Lt(re({},new Ej),{restoreFocus:!1})},D5,kB(DB()),{provide:mB,useValue:{disableImageSizeWarning:!0,disableImageLazyLoadWarning:!0}}],imports:[zi,Yc,va,dm,tm.forRoot({loader:{provide:L4,useClass:fK},missingTranslationHandler:{provide:B4,useClass:zM},compiler:{provide:xS,useClass:uK},parser:{provide:wS,useClass:hK}}),Tm.forRoot(),UB.forRoot(tK,{metaReducers:GM,runtimeChecks:{strictStateImmutability:!0,strictActionImmutability:!0,strictStateSeri
237alizability:!0,strictActionSerializability:!0}}),mQ.forRoot(iK),hl.production?[]:FQ.instrument({name:hl.appTitle,connectInZone:!0})]});let n=t;return n})();(function(){iS(m3e,{imports:[zi,Yc,va,dm,tm,Tm,tC,AM]})})();y();var u3e=["tabsHeaderComponent"];function h3e(n,t){if(n&1&&(d(0,"tb-icon",13),g(1),p()),n&2){let r=b().$implicit;l(),z(r.icon)}}function f3e(n,t){if(n&1&&(d(0,"a",11,3),x(2,h3e,2,1,"tb-icon",12),d(3,"span"),g(4),v(5,"customTranslate"),v(6,"translate"),p()()),n&2){let r=t.$implicit,e=me(1),i=b(2);te("routerLink",r.path),te("replaceUrl",i.replaceUrl),m("active",e.isActive),l(2),m("ngIf",r.icon!==null),l(2),z(r.customTranslate?C(5,5,r.name):C(6,7,r.name))}}function g3e(n,t){if(n&1&&(d(0,"nav",9),x(1,f3e,7,9,"a",10),v(2,"async"),p()),n&2){let r=b(),e=me(7);m("tabPanel",e),l(),m("ngForOf",C(2,2,r.tabs$))}}var Kbi=(()=>{let t=class t extends sn{constructor(e,i,o,a,s){super(e),this.store=e,this.activatedRoute=i,this.router=o,this.menuService=a,this.activeComponentService=s,this.hideCurrentTabs=!1,this.replaceUrl=!1}ngOnInit(){this.activatedRoute.snapshot.data.useChildrenRoutesForTabs?this.tabs$=this.router.events.pipe(Pi(e=>e instanceof Xp),on(""),W(()=>this.buildTabsForRoutes(this.activatedRoute))):this.tabs$=Xt(this.menuService.menuSections(),this.router.events.pipe(Pi(e=>e instanceof Xp),xr())).pipe(Ft(()=>this.menuService.menuSections().pipe($n(1))),W(e=>this.buildTabs(this.activatedRoute,e))),this.activatedRoute.snapshot.data.replaceUrl&&(this.replaceUrl=!0),this.activatedRoute.data.subscribe(e=>this.buildTabsHeaderComponent(e))}activeComponentChanged(e){this.activeComponentService.setCurrentActiveComponent(e);let i=this.router.routerState.snapshot.root;this.hideCurrentTabs=!1;let o=!1;for(;i.children.length;){if(i.component&&i.component===t){if(this.activatedRoute.snapshot===i)o=!0;else if(o){this.hideCurrentTabs=!0;break}}i=i.children[0]}}getSectionPath(e){return"/"+e.pathFromRoot.map(i=>i.snapshot.url).filter(i=>!!i[0]).map(i=>i.map(o=>o.path).join("/")).join("/")}buildTabs(e,i){let o=this.getSectionPath(e),a=this.findRootSection(i,o);if(a){let s=o.substring(0,o.length-a.path.length),c=s==="";return(a?a.pages.filter(f=>!f.rootOnly||c):[]).map(f=>Lt(re({},f),{path:s+f.path}))}return[]}buildTabsForRoutes(e){let i=this.getSectionPath(e),o=Mr(this.store).authority,a=e.routeConfig.children.filter(s=>s.path!==""?s.data?.auth?s.data?.auth.includes(o):!0:!1);return a.length?a.map(s=>({id:s.component.name,type:"link",name:s.data?.breadcrumb?.label??"",icon:s.data?.breadcrumb?.icon??"",path:`${i}/${s.path}`})):[]}findRootSection(e,i){for(let o of e){if(i.endsWith(o.path))return o;if(o.pages?.length){let a=this.findRootSection(o.pages,i);if(a)return a}}return null}buildTabsHeaderComponent(e){let i=this.tabsHeaderComponentAnchor.viewContainerRef;this.tabsHeaderComponentRef&&(this.tabsHeaderComponentRef.destroy(),this.tabsHeaderComponentRef=null,i.clear());let o=e.routerTabsHeaderComponent;o&&(this.tabsHeaderComponentRef=i.createComponent(o,{index:0}))}};t.\u0275fac=function(i){return new(i||t)(h(ve),h(ub),h(vi),h(Vb),h(wT))},t.\u0275cmp=L({type:t,selectors:[["tb-router-tabs"]],viewQuery:function(i,o){if(i&1&&ae(u3e,7),i&2){let a;Q(a=K())&&(o.tabsHeaderComponentAnchor=a.first)}},features:[Ce],decls:10,vars:3,consts:[["tabsHeaderComponent",""],["tabPanel",""],["routerOutlet","outlet"],["rla","routerLinkActive"],[1,"flex","flex-1","flex-col",2,"width","100%"],[1,"flex","flex-row",2,"width","100%"],["mat-tab-nav-bar","","mat-stretch-tabs","false","class","tb-router-tabs flex-1",3,"tabPanel",4,"ngIf"],[1,"tb-router-tabs-content","flex","flex-1","flex-col"],[3,"activate"],["mat-tab-nav-bar","","mat-stretch-tabs","false",1,"tb-router-tabs","flex-1",3,"tabPanel"],["routerLinkActive","","mat-tab-link","",3,"routerLink","replaceUrl","active",4,"ngFor","ngForOf"],["routerLinkActive","","mat-tab-link","",3,"routerLink","replaceUrl","active"],["class","tb-mat-18",4,"ngIf"],[1,"tb-mat-18"]],template:function(i,o){if(i&1){let a=B();d(0,"div",4)(1,"div",5),x(2,g3e,3,4,"nav",6),v(3,"async"),O(4,"tb-anchor",null,0),p(),d(6,"mat-tab-nav-panel",7,1)(8,"router-outlet",8,2),T("activate",function(c){return D(a),M(o.activeComponentChanged(c))}),p()()()}if(i&2){let a=me(9);l(2),m("ngIf",!(!(a==null||a.activatedRouteData==null)&&a.activatedRouteData.hideTabs)&&!o.hideCurrentTabs&&C(3,1,o.tabs$).length>1)}},dependencies:[Ke,ce,Zu,C_,_w,w_,FB,ll,NB,In,Ve,yl,be],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;width:100%;height:100%}[_nghost-%COMP%]   .mat-mdc-tab-nav-bar.tb-router-tabs[_ngcontent-%COMP%]   a.mat-mdc-tab-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;overflow:hidden;line-height:40px;
237min-width:200px;border-bottom:none}[_nghost-%COMP%]   .mat-mdc-tab-nav-bar.tb-router-tabs[_ngcontent-%COMP%]   a.mat-mdc-tab-link[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:8px;margin-left:0}[_nghost-%COMP%]   .mat-mdc-tab-nav-bar.tb-router-tabs[_ngcontent-%COMP%]   a.mat-mdc-tab-link[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%]   .tb-router-tabs-content[_ngcontent-%COMP%]{overflow:auto;position:relative;height:100%}']});let n=t;return n})();y();var r_i=(()=>{let t=class t{constructor(e,i){this.router=e,this.http=i,this.signUpParams=null}getRegistrationLink(e){return`${e}/signup`}loadSelfRegistrationParams(){return this.http.get("/api/noauth/selfRegistration/signUpSelfRegistrationParams").pipe(et(e=>{this.signUpParams=e||{},this.signUpParams.activate=De(e?.captcha?.siteKey),De(e?.captcha)||(this.signUpParams.captcha={}),this.signUpParams.captcha.version=e?.captcha?.version||"v3"}))}loadPrivacyPolicy(){return this.http.get("/api/noauth/selfRegistration/privacyPolicy")}loadTermsOfUse(){return this.http.get("/api/noauth/selfRegistration/termsOfUse")}isAvailablePage(){return this.signUpParams?(this.signUpParams.activate||this.router.navigateByUrl("login"),Z(null)):this.loadSelfRegistrationParams().pipe(et(()=>{this.signUpParams.activate||this.router.navigateByUrl("login")}))}saveSelfRegistrationParams(e,i){return this.http.post("/api/selfRegistration/selfRegistrationParams",e,N(i))}getSelfRegistrationParams(e){return this.http.get("/api/selfRegistration/selfRegistrationParams",N(e))}deleteSelfRegistrationParams(e){return this.http.delete("/api/selfRegistration/selfRegistrationParams",N(e))}};t.\u0275fac=function(i){return new(i||t)(X(vi),X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var b3e="tbMobileDashboardStateNameHandler",_3e="tbMobileDashboardLoadedHandler",v3e="tbMobileDashboardLayoutHandler",y3e="tbMobileNavigationHandler",C3e="tbMobileHandler",w3e="tbMobileReadyHandler",x3e="tbMobileRecaptchaHandler",S3e="tbMobileRecaptchaLoadedHandler",u_i=(()=>{let t=class t{constructor(e,i,o){this.window=e,this.router=i,this.authService=o,this.onWindowMessageListener=this.onWindowMessage.bind(this);let a=this.window;this.mobileChannel=a.flutter_inappwebview,this.mobileApp=dt(this.mobileChannel),this.mobileApp&&(e.addEventListener("message",this.onWindowMessageListener),this.mobileChannel.callHandler(w3e))}isMobileApp(){return this.mobileApp}handleDashboardStateName(e){this.mobileApp&&this.mobileChannel.callHandler(b3e,e)}onDashboardLoaded(e,i){this.mobileApp&&this.mobileChannel.callHandler(_3e,e,i)}onDashboardRightLayoutChanged(e){this.mobileApp&&this.mobileChannel.callHandler(v3e,e)}registerToggleLayoutFunction(e){this.toggleLayoutFunction=e}unregisterToggleLayoutFunction(){this.toggleLayoutFunction=null}handleWidgetMobileAction(e,...i){return this.mobileApp?Yn(this.mobileChannel.callHandler(C3e,e,...i)).pipe(vt(o=>Z({hasError:!0,error:o?.message?o.message:`Failed to execute mobile action ${e}`}))):Z(null)}handleMobileNavigation(e,i){this.mobileApp&&this.mobileChannel.callHandler(y3e,e,i)}onRecaptchaLoaded(){this.mobileApp&&this.mobileChannel.callHandler(S3e)}handleReCaptchaResponse(e){this.mobileApp&&this.mobileChannel.callHandler(x3e,e)}registerResetRecaptchaFunction(e){this.resetRecaptchaFunction=e}unregisterResetRecaptchaFunction(){this.resetRecaptchaFunction=null}onWindowMessage(e){if(e.data){let i;try{i=JSON.parse(e.data)}catch{}if(i&&i.type)switch(i.type){case"openDashboardMessage":let o=i.data;this.openDashboard(o);break;case"reloadUserMessage":let a=i.data;this.reloadUser(a);break;case"toggleDashboardLayout":this.toggleLayoutFunction&&this.toggleLayoutFunction();break;case"resetRecaptcha":this.resetRecaptchaFunction&&this.resetRecaptchaFunction()}}}openDashboard(e){e&&e.dashboardId&&(this.reloadUserObservable?this.reloadUserObservable.subscribe(i=>{i&&this.doDashboardNavigation(e)}):this.doDashboardNavigation(e))}doDashboardNavigation(e){let i=`/dashboard/${e.dashboardId}`,o=[];e.state&&o.push(`state=${e.state}`),e.embedded&&o.push("embedded=true"),e.hideToolbar&&o.push("hideToolbar=true"),this.lastDashboardId===e.dashboardId&&o.push(`reload=${new Date().getTime()}`),o.length&&(i+=`?${o.join("&")}`),this.lastDashboardId=e.dashboardId,this.router.navigateByUrl(i,{replaceUrl:!0})}reloadUser(e){e&&e.accessToken&&e.refreshToken&&(this.reloadUserObservable=this.authService.setUserFromJwtToken(e.accessToken,e.refreshToken,!0).pipe(et(()=>{this.reloadUserObservable=null})))}};t.\u0275fac=function(i){return new(i||t)(X(Wr),X(vi),X(Ro))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var __i=(()=>{let t=class t{constructor(e){this.http=e}getTwoFaSettings(e){return this.http.get("/api/2fa/settings",N(e))}saveTwoFaSettings(e,i){return this.http.post("/api/2fa/settings",e,N(i))}getAvailableTwoFaProviders(e){return this.http.get("/api/2fa/providers",N(e))}generateTwoFaAccountConfig(e,i){return this.http.post(`/api/2fa/account/config/generate?providerType=${e}`,N(i))}getAccountTwoFaSettings(e){return this.http.get("/api/2fa/account/settings",N(e))}updateTwoFaAccountConfig(e,i,o){return this.http.put(`/api/2fa/account/config?providerType=${e}`,{useByDefault:i},N(o))}submitTwoFaAccountConfig(e,i){return this.http.post("/api/2fa/account/config/submit",e,N(i))}verifyAndSaveTwoFaAccountConfig(e,i,o){let a="/api/2fa/account/config";return De(i)&&(a+=`?verificationCode=${i}`),this.http.post(a,e,N(o))}deleteTwoFaAccountConfig(e,i){return this.http.delete(`/api/2fa/account/config?providerType=${e}`,N(i))}requestTwoFaVerificationCodeSend(e,i){return this.http.post(`/api/auth/2fa/verification/send?providerType=${e}`,N(i))}};t.\u0275fac=function(i){return new(i||t)(X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();y();y();y();y();var T3e={url:"",deserializer:n=>JSON.parse(n.data),serializer:n=>JSON.stringify(n)},E3e="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",HM=class n extends XL{constructor(t,r){if(super(),this._socket=null,t instanceof Ma)this.destination=r,this.source=t;else{let e=this._config=Object.assign({},T3e);if(this._output=new Te,typeof t=="string")e.url=t;else for(let i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);if(!e.WebSocketCtor&&WebSocket)e.WebSocketCtor=WebSocket;else if(!e.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new or}}lift(t){let r=new n(this._config,this.destination);return r.operator=t,r.source=this,r}_resetState(){this._socket=null,this.source||(this.destination=new or),this._output=new Te}multiplex(t,r,e){let i=this;return new Ma(o=>{try{i.next(t())}catch(s){o.error(s)}let a=i.subscribe({next:s=>{try{e(s)&&o.next(s)}catch(c){o.error(c)}},error:s=>o.error(s),complete:()=>o.complete()});return()=>{try{i.next(r())}catch(s){o.error(s)}a.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:t,protocol:r,url:e,binaryType:i}=this._config,o=this._output,a=null;
237try{a=r?new t(e,r):new t(e),this._socket=a,i&&(this._socket.binaryType=i)}catch(c){o.error(c);return}let s=new ln(()=>{this._socket=null,a&&a.readyState===1&&a.close()});a.onopen=c=>{let{_socket:u}=this;if(!u){a.close(),this._resetState();return}let{openObserver:f}=this._config;f&&f.next(c);let _=this.destination;this.destination=KL.create(I=>{if(a.readyState===1)try{let{serializer:S}=this._config;a.send(S(I))}catch(S){this.destination.error(S)}},I=>{let{closingObserver:S}=this._config;S&&S.next(void 0),I&&I.code?a.close(I.code,I.reason):o.error(new TypeError(E3e)),this._resetState()},()=>{let{closingObserver:I}=this._config;I&&I.next(void 0),a.close(),this._resetState()}),_&&_ instanceof or&&s.add(_.subscribe(this.destination))},a.onerror=c=>{this._resetState(),o.error(c)},a.onclose=c=>{a===this._socket&&this._resetState();let{closeObserver:u}=this._config;u&&u.next(c),c.wasClean?o.complete():o.error(c)},a.onmessage=c=>{try{let{deserializer:u}=this._config;o.next(u(c))}catch(u){o.error(u)}}}_subscribe(t){let{source:r}=this;return r?r.subscribe(t):(this._socket||this._connectSocket(),this._output.subscribe(t),t.add(()=>{let{_socket:e}=this;this._output.observers.length===0&&(e&&(e.readyState===1||e.readyState===0)&&e.close(),this._resetState())}),t)}unsubscribe(){let{_socket:t}=this;t&&(t.readyState===1||t.readyState===0)&&t.close(),this._resetState(),super.unsubscribe()}};function $L(n){return new HM(n)}var I3e=2e3,k3e=9e4,D3e=10,Py=class{constructor(t,r,e,i,o,a,s){this.store=t,this.authService=r,this.ngZone=e,this.apiEndpoint=i,this.cmdWrapper=o,this.window=a,this.reportService=s,this.isActive=!1,this.isOpening=!1,this.isOpened=!1,this.isReconnect=!1,this.lastCmdId=0,this.subscribersCount=0,this.subscribersMap=new Map,this.reconnectSubscribers=new Set,this.errorName="WebSocket Error",this.store.pipe(Aa(yS)).subscribe(()=>{this.reset(!0)});let c=this.window.location.port;this.window.location.protocol==="https:"?(c||(c="443"),this.wsUri="wss:"):(c||(c="80"),this.wsUri="ws:"),this.wsUri+=`//${this.window.location.hostname}:${c}/${i}`}batchSubscribe(t){t.forEach(r=>{this.subscribe(r,!0)})}batchUnsubscribe(t){t.forEach(r=>{this.unsubscribe(r,!0),r.complete()})}nextCmdId(){return this.lastCmdId++,this.lastCmdId}publishCommands(){for(;this.isOpened&&this.cmdWrapper.hasCommands();){let t=this.cmdWrapper.preparePublishCommands(D3e);this.reportService?.reportView&&this.reportService.onSendWsCommands(t),this.dataStream.next(t),this.checkToClose()}this.subscribersCount>0&&this.tryOpenSocket()}checkToClose(){this.subscribersCount===0&&this.isOpened&&(this.socketCloseTimer||(this.socketCloseTimer=setTimeout(()=>this.closeSocket(),k3e)))}reset(t){this.socketCloseTimer&&(clearTimeout(this.socketCloseTimer),this.socketCloseTimer=null),this.lastCmdId=0,this.subscribersMap.clear(),this.subscribersCount=0,this.cmdWrapper.clear(),t&&this.closeSocket()}closeSocket(){this.isActive=!1,this.isOpened&&this.dataStream.unsubscribe()}tryOpenSocket(){this.isActive&&(!this.isOpened&&!this.isOpening&&(this.isOpening=!0,Ro.isJwtTokenValid()?this.openSocket(Ro.getJwtToken()):this.authService.refreshJwtToken().subscribe({next:()=>{this.openSocket(Ro.getJwtToken())},error:()=>{this.isOpening=!1,this.authService.logout(!0,!0)}})),this.socketCloseTimer&&(clearTimeout(this.socketCloseTimer),this.socketCloseTimer=null))}openSocket(t){let r=`${this.wsUri}`;this.dataStream=$L({url:r,openObserver:{next:()=>{this.onOpen(t)}},closeObserver:{next:e=>{this.onClose(e)}}}),this.dataStream.subscribe({next:e=>{this.ngZone.runOutsideAngular(()=>{this.onMessage(e)})},error:e=>{this.onError(e)}})}onOpen(t){this.isOpening=!1,this.isOpened=!0,this.cmdWrapper.setAuth(t),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.isReconnect?(this.isReconnect=!1,this.reconnectSubscribers.forEach(r=>{r.onReconnected(),this.subscribe(r)}),this.reconnectSubscribers.clear()):this.publishCommands()}onMessage(t){this.reportService?.reportView&&this.reportService.onWsCmdUpdateMessage(t),t.errorCode?this.showWsError(t.errorCode,t.errorMsg):this.processOnMessage(t),this.checkToClose()}onError(t){t&&console.warn("WebSocket error event",t),this.isOpening=!1}onClose(t){t&&t.code>1001&&t.code!==1006&&t.code!==1011&&t.code!==1012&&t.code!==4500&&this.showWsError(t.code,t.reason),this.isOpening=!1,this.isOpened=!1,this.isActive&&(this.isReconnect||(this.reconnectSubscribers.clear(),this.subscribersMap.forEac
237h(r=>{this.reconnectSubscribers.add(r)}),this.reset(!1),this.isReconnect=!0),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(()=>this.tryOpenSocket(),I3e))}showWsError(t,r){let e=r;e||(e+=`${this.errorName}: error code - ${t}.`),this.store.dispatch(new Sr({message:e,type:"error"}))}};var _K=(()=>{let t=class t extends Py{constructor(e,i,o,a,s){super(e,i,o,"api/ws",new IS,s,a),this.store=e,this.authService=i,this.ngZone=o,this.reportService=a,this.window=s}subscribe(e,i){this.isActive=!0,e.subscriptionCommands.forEach(o=>{let a=this.nextCmdId();!(o instanceof Z4)&&!(o instanceof J4)&&this.subscribersMap.set(a,e),o.cmdId=a,this.cmdWrapper.cmds.push(o)}),this.subscribersCount++,i||this.publishCommands()}update(e){this.isReconnect||(e.subscriptionCommands.forEach(i=>{i.cmdId&&(i instanceof w2||i instanceof x2)&&this.cmdWrapper.cmds.push(i)}),this.publishCommands())}unsubscribe(e,i){this.isActive&&(e.subscriptionCommands.forEach(o=>{if(o instanceof q4)o.unsubscribe=!0,this.cmdWrapper.cmds.push(o);else if(o instanceof w2){let s=new e5;s.cmdId=o.cmdId,this.cmdWrapper.cmds.push(s)}else if(o instanceof Y4){let s=new i5;s.cmdId=o.cmdId,this.cmdWrapper.cmds.push(s)}else if(o instanceof W4){let s=new t5;s.cmdId=o.cmdId,this.cmdWrapper.cmds.push(s)}else if(o instanceof Q4){let s=new n5;s.cmdId=o.cmdId,this.cmdWrapper.cmds.push(s)}else if(o instanceof K4){let s=new r5;s.cmdId=o.cmdId,this.cmdWrapper.cmds.push(s)}else if(o instanceof X4||o instanceof x2){let s=new o5;s.cmdId=o.cmdId,this.cmdWrapper.cmds.push(s)}let a=o.cmdId;a&&this.subscribersMap.delete(a)}),this.reconnectSubscribers.delete(e),this.subscribersCount--,i||this.publishCommands())}processOnMessage(e){let i;"cmdId"in e&&e.cmdId?(i=this.subscribersMap.get(e.cmdId),i instanceof w5?p5(e)?i.onNotificationCountUpdate(new v5(e)):m5(e)&&i.onNotificationsUpdate(new y5(e)):i instanceof C5&&(a5(e)?i.onEntityData(new h5(e)):s5(e)?i.onAlarmData(new f5(e)):l5(e)?i.onEntityCount(new g5(e)):c5(e)?i.onAlarmCount(new b5(e)):d5(e)&&i.onAlarmStatus(new _5(e)))):"subscriptionId"in e&&e.subscriptionId&&(i=this.subscribersMap.get(e.subscriptionId),i&&i.onData(new u5(e)))}};t.\u0275fac=function(i){return new(i||t)(X(ve),X(Ro),X(Bt),X(jM),X(Wr))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var ivi=(()=>{let t=class t extends Py{constructor(e,i,o,a,s){super(i,o,a,"api/ws/plugins/telemetry",new IS,s),this.telemetryWebsocketService=e,this.store=i,this.authService=o,this.ngZone=a,this.window=s}subscribe(e){this.telemetryWebsocketService.subscribe(e)}update(e){this.telemetryWebsocketService.update(e)}unsubscribe(e){this.telemetryWebsocketService.unsubscribe(e)}processOnMessage(e){this.telemetryWebsocketService.processOnMessage(e)}};t.\u0275fac=function(i){return new(i||t)(X(_K),X(ve),X(Ro),X(Bt),X(Wr))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();y();var cvi=(()=>{let t=class t{constructor(e,i){this.store=e,this.http=i}signup(e,i){return this.http.post("/api/noauth/signup",e,N(i))}acceptPrivacyPolicy(e){return this.http.post("/api/signup/acceptPrivacyPolicy",null,N(e))}deleteTenantAccount(e){return this.http.delete("/api/signup/tenantAccount",N(e))}isDisplayWelcome(){return Mr(this.store).authority===Mt.TENANT_ADMIN?this.http.get("/api/signup/displayWelcome"):Z(!1)}setNotDisplayWelcome(){return this.http.post("/api/signup/notDisplayWelcome",null)}};t.\u0275fac=function(i){return new(i||t)(X(ve),X(Jt))},t.\u0275prov=we({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();export{tNe as a,oNe as b,Sg as c,Hde as d,Tg as e,qde as f,zt as g,Vn as h,Sc as i,jw as j,Wde as k,ep as l,Ss as m,Ts as n,tO as o,Bl as p,iO as q,Pf as r,Qde as s,cI as t,Sa as u,LM as v,BM as w,Xh as x,YNe as y,UQ as z,QNe as A,HQ as B,pm as C,F8e as D,nG as E,EC as F,N8e as G,IC as H,mm as I,V8e as J,L8e as K,Fu as L,B8e as M,j8e as N,Df as O,G8e as P,z8e as Q,$8e as R,U8e as S,yT as T,kC as U,rG as V,oG as W,dX as X,pX as Y,H8e as Z,q8e as _,mX as $,pG as aa,R as ba,CT as ca,DC as da,uG as ea,hG as fa,fG as ga,Vb as ha,WQ as ia,jM as ja,e3e as ka,vT as la,JQ as ma,eK as na,tK as oa,GM as pa,iK as qa,Jj as ra,eg as sa,ZK as ta,JK as ua,xs as va,kf as wa,Zd as xa,wT as ya,In as za,Fo as Aa,yl as Ba,xT as Ca,PX as Da,K2 as Ea,TG as Fa,Hr as Ga,eZ as Ha,xG as Ia,lA as Ja,cA as Ka,Ri as La,na as Ma,mi as Na,jr as Oa,mA as Pa,lZ as Qa,hc as Ra,Kc as Sa,ET as Ta,fA as Ua,gA as Va,_A as Wa,vA as Xa,yA as Ya,CA as Za,xA as _a,_Z as $a,ra as ab,um as bb,hm as cb,oa as db,wl as eb,Hb as fb,Qo as gb,Xc as hb,qb as ib,aa as jb,sa as kb,xl as lb,Yb as mb,at as nb,Gi as ob,_z as pb,la as qb,Jd as rb,HT as sb,hO as tb,FJ as ub,tp as vb,fO as wb,Zc as xb,Ff as yb,_O as zb,fc as Ab,wO as Bb,Za as Cb,Vf as Db,o_ as Eb,Lf as Fb,zz as Gb,Bf as Hb,XC as Ib,ZC as Jb,JC as Kb,QT as Lb,KT as Mb,Iee as Nb,jo as Ob,ip as Pb,gc as Qb,Gf as Rb,kO as Sb,np as Tb,m_ as Ub,u_ as Vb,zu as Wb,Cm as Xb,OO as Yb,PO as Zb,RO as _b,id as $b,bc as ac,_c as bc,vc as cc,yc as dc,Cc as ec,nd as fc,rd as gc,od as hc,ad as ic,fw as jc,sE as kc,lE as lc,y_ as mc,bw as nc,eP as oc,vw as pc,dE as qc,nP as rc,rP as sc,E6 as tc,Wf as uc,xm as vc,Yf as wc,uP as xc,xP as yc,Gr as zc,IP as Ac,i$ as Bc,Bw as Cc,LE as Dc,G_ as Ec,GE as Fc,hae as Gc,HP as Hc,zE as Ic,fae as Jc,$E as Kc,bae as Lc,Ms as Mc,rg as Nc,Zu as Oc,R$ as Pc,lm as Qc,U2 as Rc,Vo as Sc,F$ as Tc,zrt as Uc,fe as Vc,U_ as Wc,wae as Xc,pd as Yc,xae as Zc,Sae as _c,B$ as $c,j$ as ad,og as bd,Em as cd,G$ as dd,YE as ed,Fa as fd,Im as gd,Rae as hd,Uae as id,md as jd,YP as kd,QP as ld,KP as md,XP as nd,ZP as od,Mi as pd,Pr as qd,$l as rd,QE as sd,Mm as td,KE as ud,Us as vd,XE as wd,ca as xd,X_ as yd,Hs as zd,Z_ as Ad,zse as Bd,$$ as Cd,wle as Dd,Ko as Ed,Ale as Fd,$w as Gd,Ole as Hd,ZE as Id,H$ as Jd,es as Kd,da as Ld,_dt as Md,JE as Nd,vdt as Od,ydt as Pd,xa as Qd,Om as Rd,Gle as Sd,Ec as Td,iR as Ud,ev as Vd,zle as Wd,tv as Xd,Y$ as Yd,sp as Zd,rce as _d,bU as $d,qs as ae,rI as be,Ws as ce,Zw as de,ov as ee,lp as fe,cp as ge,vU as he,ih as ie,Vut as je,Lut as ke,oI as le,But as me,jut as ne,hR as oe,fR as pe,Gut as qe,zut as re,$ut as se,ht as te,yU as ue,CU as ve,wU as we,xU as xe,e1 as ye,br as ze,tht as Ae,iht as Be,Mde as Ce,nht as De,bs as Ee,rht as Fe,Ade as Ge,oht as He,Ode as Ie,Pde as Je,aht as Ke,pa as Le,Ic as Me,SU as Ne,nh as Oe,TU as Pe,aI as Qe,EU as Re,xg as Se,Rde as Te,hd as Ue,Fde as Ve,sht as We,lht as Xe,Nde as Ye,IU as Ze,kU as _e,DU as $e,cht as af,gR as bf,MU as cf,dht as df,Lde as ef,AU as ff,pht as gf,Bde as hf,OU as if,jde as jf,mht as kf,uht as lf,av as mf,bR as nf,PU as of,hht as pf,fht as qf,_R as rf,vR as sf,ght as tf,sI as uf,yR as vf,xht as wf,Sht as xf,t1 as yf,Tht as zf,lI as Af,Eht as Bf,Il as Cf,Iht as Df,kht as Ef,$de as Ff,CR as Gf,RU as Hf,FU as If,Dht as Jf,Mht as Kf,Aht as Lf,Oht as Mf,Pht as Nf,Ude as Of,Rht as Pf,Fht as Qf,rh as Rf,Bht as Sf,As as Tf,jht as Uf,sv as Vf,oh as Wf,Dl as Xf,kg as Yf,ipe as Zf,LU as _f,BU as $f,VU as ag,ER as bg,kR as cg,xn as dg,tn as eg,Pn as fg,Ml as gg,Qs as hg,xo as ig,_o as jg,Nm as kg,bp as lg,Um as mg,Nme as ng,Wn as og,Tr as pg,Ext as qg,Ixt as rg,kxt as sg,Dxt as tg,$me as ug,Mxt as vg,Axt as wg,Os as xg,DI as yg,II as zg,Iv as Ag,$xt as Bg,Uxt as Cg,Sv as Dg,Hxt as Eg,qxt as Fg,hF as Gg,Wxt as Hg,Hme as Ig,Yxt as Jg,mH as Kg,Xl as Lg,uH as Mg,Kme as Ng,fF as Og,C1 as Pg,Qxt as Qg,Kxt as Rg,Xme as Sg,fH as Tg,gF as Ug,bF as Vg,Zme as Wg,gH as Xg,Jme as Yg,bH as Zg,Xxt as _g,Zxt as $g,Jxt as ah,eue as bh,eSt as ch,tSt as dh,tue as eh,iSt as fh,nSt as gh,zg as hh,rSt as ih,oSt as jh,mh as kh,aSt as lh,sSt as mh,kI as nh,lSt as oh,cSt as ph,iue as qh,dSt as rh,_H as sh,pSt as th,no as uh,mSt as vh,uSt as wh,Tv as xh,hSt as yh,fSt as zh,nue as Ah,gSt as Bh,bSt as Ch,Kl as Dh,_St as Eh,rue as Fh,oue as Gh,$g as Hh,vSt as Ih,aue as Jh,sue as Kh,Ug as Lh,ySt as Mh,lue as Nh,cue as Oh,Ev as Ph,CSt as Qh,due as Rh,pue as Sh,mue as Th,wSt as Uh,uue as Vh,hue as Wh,_F as Xh,fue as Yh,xSt as Zh,gue as _h,SSt as $h,TSt as ai,ESt as bi,ISt as ci,bue as di,_ue as ei,kSt as fi,DSt as gi,MSt as hi,ASt as ii,OSt as ji,vF as ki,PSt as li,RSt as mi,FSt as ni,NSt as oi,VSt as pi,LSt as qi,BSt as ri,jSt as si,yH as ti,S1 as ui,Dv as vi,Mv as wi,CH as xi,MI as yi,AI as zi,SH as Ai,EH as Bi,ao as Ci,cEt as Di,wF as Ei,Ea as Fi,Tn as Gi,xF as Hi,dEt as Ii,pEt as Ji,mEt as Ki,Hm as Li,Pue as Mi,OI as Ni,IH as Oi,kH as Pi,vEt as Qi,vd as Ri,DH as Si,vp as Ti,MH as Ui,GEt as Vi,zEt as Wi,$Et as Xi,UEt as Yi,HEt as Zi,qEt as _i,WEt as $i,YEt as aj,QEt as bj,KEt as cj,XEt as dj,ZEt as ej,JEt as fj,eIt as gj,Ac as hj,tIt as ij,uh as jj,iIt as kj,SF as lj,nIt as mj,Hg as nj,rIt as oj,I1 as pj,oIt as qj,k1 as rj,aIt as sj,sIt as tj,hh as uj,lr as vj,EF as wj,A1 as xj,FI as yj,D1 as zj,mIt as Aj,uIt as Bj,hIt as Cj,fIt as Dj,gIt as Ej,bIt as Fj,_It as Gj,vIt as Hj,yIt as Ij,CIt as Jj,wIt as Kj,xIt as Lj,Av as Mj,SIt as Nj,TIt as Oj,EIt as Pj,IIt as Qj,kIt as Rj,PI as Sj,DIt as Tj,RI as Uj,MIt as Vj,AIt as Wj,OIt as Xj,LH as Yj,qg as Zj,PIt as _j,M1 as $j,RIt as ak,NH as bk,Ia as ck,FIt as dk,NIt as ek,VIt as fk,Nue as gk,LIt as hk,BIt as ik,jIt as jk,GIt as kk,NI as lk,jH as mk,GH as nk,zH as ok,Pv as pk,Ci as qk,LI as rk,vkt as sk,ykt as tk,Ckt as uk,zI as vk,wkt as wk,BI as xk,xkt as yk,jue as zk,jI as Ak,Skt as Bk,Rv as Ck,Tkt as Dk,UH as Ek,VI as Fk,Ekt as Gk,kF as Hk,Ikt as Ik,Gue as Jk,zue as Kk,DF as Lk,kkt as Mk,GI as Nk,Dkt as Ok,O1 as Pk,$ue as Qk,Mkt as Rk,$I as Sk,yn as Tk,ho as Uk,MF as Vk,Vkt as Wk,Lkt as Xk,WH as Yk,Bkt as Zk,Uue as _k,jkt as $k,Gkt as al,AF as bl,zkt as cl,UI as dl,Que as el,OF as fl,ehe as gl,yp as hl,QH as il,KH as jl,Cp as kl,zo as ll,vMt as ml,yMt as nl,C
237Mt as ol,wMt as pl,xMt as ql,SMt as rl,HI as sl,qI as tl,WI as ul,gh as vl,QI as wl,KI as xl,XI as yl,n8 as zl,r8 as Al,o8 as Bl,a8 as Cl,Fv as Dl,Oc as El,C2t as Fl,w2t as Gl,x2t as Hl,S2t as Il,T2t as Jl,E2t as Kl,zhe as Ll,$he as Ml,yd as Nl,I2t as Ol,Ps as Pl,k2t as Ql,D2t as Rl,M2t as Sl,Nv as Tl,A2t as Ul,O2t as Vl,P2t as Wl,R2t as Xl,F2t as Yl,N2t as Zl,Vv as _l,V2t as $l,L2t as am,B2t as bm,RF as cm,j2t as dm,l8 as em,c8 as fm,rr as gm,ZI as hm,Khe as im,JI as jm,efe as km,Na as lm,ek as mm,Pc as nm,FF as om,Xs as pm,tk as qm,qm as rm,p8 as sm,Wm as tm,m8 as um,ik as vm,h8 as wm,XRt as xm,wp as ym,nk as zm,xp as Am,rk as Bm,$o as Cm,Sp as Dm,ok as Em,cge as Fm,_h as Gm,mge as Hm,ak as Im,vge as Jm,sk as Km,Sge as Lm,Cd as Mm,Fge as Nm,Nge as Om,Vge as Pm,f8 as Qm,Lge as Rm,R1 as Sm,$Nt as Tm,UNt as Um,Ym as Vm,Hge as Wm,lk as Xm,Yge as Ym,ck as Zm,Xge as _m,e0e as $m,pk as an,t0e as bn,mk as cn,uk as dn,hk as en,r0e as fn,a0e as gn,gk as hn,c0e as in,b8 as jn,bk as kn,d0e as ln,VF as mn,_8 as nn,v8 as on,y8 as pn,C8 as qn,w8 as rn,x8 as sn,S8 as tn,HVt as un,qVt as vn,_k as wn,yh as xn,T8 as yn,Eo as zn,E8 as An,lLt as Bn,cLt as Cn,wd as Dn,Rc as En,I8 as Fn,dLt as Gn,pLt as Hn,Zl as In,TLt as Jn,Zs as Kn,zLt as Ln,$Lt as Mn,V1 as Nn,P8 as On,ULt as Pn,F8 as Qn,HLt as Rn,qLt as Sn,V8 as Tn,L8 as Un,B8 as Vn,WLt as Wn,P0e as Xn,O8 as Yn,ka as Zn,n0 as _n,j8 as $n,o0 as ao,Fc as bo,rN as co,Va as do,L1 as eo,fbe as fo,G8 as go,ro as ho,A4t as io,O4t as jo,P4t as ko,xbe as lo,R4t as mo,F4t as no,N4t as oo,V4t as po,L4t as qo,B4t as ro,j4t as so,G4t as to,z4t as uo,J8 as vo,Td as wo,j1 as xo,Gv as yo,Tp as zo,Ep as Ao,r7 as Bo,d0 as Co,z1 as Do,$1 as Eo,U1 as Fo,o7 as Go,a7 as Ho,s7 as Io,Km as Jo,nye as Ko,Tk as Lo,rye as Mo,Xm as No,bye as Oo,wh as Po,kye as Qo,H1 as Ro,Dye as So,Ip as To,l7 as Uo,Nc as Vo,Js as Wo,d7 as Xo,Zm as Yo,p7 as Zo,m7 as _o,Vc as $o,Sh as ap,Lc as bp,b7 as cp,Ed as dp,ewe as ep,kp as fp,_7 as gp,ec as hp,v7 as ip,Yv as jp,y7 as kp,Jm as lp,C7 as mp,Ik as np,kwe as op,kk as pp,Owe as qp,Dk as rp,Pwe as sp,Mk as tp,Rwe as up,Fwe as vp,Uwe as wp,Pk as xp,Qwe as yp,Qt as zp,Y1 as Ap,el as Bp,Sq as Cp,o3 as Dp,Id as Ep,a3 as Fp,Mq as Gp,dx as Hp,x1e as Ip,S1e as Jp,T1e as Kp,E1e as Lp,I1e as Mp,k1e as Np,D1e as Op,A1e as Pp,Xr as Qp,N1e as Rp,V1e as Sp,Xv as Tp,j1e as Up,z1e as Vp,tl as Wp,Ph as Xp,$1e as Yp,Rh as Zp,Io as _p,jq as $p,d3 as aq,Z1e as bq,J1e as cq,Yr as dq,os as eq,rt as fq,Ap as gq,Op as hq,Rp as iq,ha as jq,nu as kq,kd as lq,VN as mq,x0 as nq,gD as oq,Mp as pq,Exe as qq,K1 as rq,ix as sq,Jq as tq,Dd as uq,Jv as vq,nW as wq,rW as xq,La as yq,ux as zq,iD as Aq,Xxe as Bq,hx as Cq,Zxe as Dq,sW as Eq,nSe as Fq,oSe as Gq,lW as Hq,cSe as Iq,ey as Jq,hSe as Kq,CD as Lq,ox as Mq,fSe as Nq,pW as Oq,gSe as Pq,bSe as Qq,_Se as Rq,jN as Sq,A3 as Tq,wD as Uq,mW as Vq,SSe as Wq,bW as Xq,_W as Yq,GN as Zq,ax as _q,zN as $q,$N as ar,oD as br,UN as cr,HN as dr,qN as er,ESe as fr,O3 as gr,WN as hr,YN as ir,kSe as jr,wW as kr,QN as lr,KN as mr,XN as nr,ZN as or,ASe as pr,OSe as qr,lD as rr,sx as sr,VSe as tr,LSe as ur,BSe as vr,cD as wr,lx as xr,JN as yr,zSe as zr,dD as Ar,FW as Br,e3 as Cr,qSe as Dr,WSe as Er,n3 as Fr,NW as Gr,oy as Hr,e9 as Ir,s9 as Jr,Nh as Kr,E0 as Lr,ly as Mr,cy as Nr,VEe as Or,dy as Pr,NWt as Qr,I0 as Rr,VWt as Sr,MD as Tr,WEe as Ur,de as Vr,Np as Wr,bx as Xr,AD as Yr,gIe as Zr,py as _r,vIe as $r,OD as as,yIe as bs,h9 as cs,IIe as ds,_x as es,X3 as fs,Z3 as gs,g9 as hs,J3 as is,b9 as js,eV as ks,WIe as ls,RD as ms,Ske as ns,ND as os,kke as ps,VD as qs,Lke as rs,LD as ss,Kke as ts,Bh as us,tV as vs,QKt as ws,KKt as xs,XKt as ys,oV as zs,ZKt as As,Md as Bs,lDe as Cs,JKt as Ds,ou as Es,x9 as Fs,SDe as Gs,jD as Hs,IDe as Is,lV as Js,cV as Ks,Gh as Ls,zDe as Ms,hV as Ns,fV as Os,gV as Ps,bV as Qs,vV as Rs,QDe as Ss,cMe as Ts,eY as Us,JD as Vs,dMe as Ws,xx as Xs,OJt as Ys,PJt as Zs,RJt as _s,pMe as $s,FJt as at,NJt as bt,VJt as ct,iY as dt,nY as et,TV as ft,EV as gt,eM as ht,yMe as it,tM as jt,Vei as kt,Sx as lt,Lei as mt,IV as nt,Bei as ot,kV as pt,jei as qt,iM as rt,Gei as st,DV as tt,Uo as ut,vy as vt,nM as wt,zei as xt,rM as yt,$ei as zt,Ad as At,Uei as Bt,Xi as Ct,sY as Dt,oM as Et,Lp as Ft,lY as Gt,aM as Ht,Fs as It,Hei as Jt,qei as Kt,M0 as Lt,kMe as Mt,cY as Nt,Bp as Ot,Tx as Pt,Ex as Qt,mY as Rt,au as St,nAe as Tt,sM as Ut,pAe as Vt,Ix as Wt,mAe as Xt,Uh as Yt,_Ae as Zt,Mx as _t,MAe as $t,Hh as au,N0 as bu,uY as cu,lM as du,COe as eu,L0 as fu,FOe as gu,jOe as hu,GOe as iu,jc as ju,Zoi as ku,Joi as lu,eai as mu,vs as nu,zOe as ou,tai as pu,_Y as qu,jp as ru,Sy as su,G0 as tu,$0 as uu,LV as vu,Qj as wu,dM as xu,lu as yu,qsi as zu,Ty as Au,Ns as Bu,oli as Cu,CY as Du,ali as Eu,Wh as Fu,Yh as Gu,xY as Hu,Qh as Iu,sRe as Ju,q0 as Ku,uRe as Lu,mM as Mu,ERe as Nu,BV as Ou,IRe as Pu,jV as Qu,m3e as Ru,r_i as Su,u_i as Tu,__i as Uu,Kbi as Vu,Py as Wu,_K as Xu,ivi as Yu,cvi as Zu};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.