1import{a as nt,b as xl,c as oc,d as sc}from"./chunk-4GAWXQMU.js";import{b as lc,c as cc}from"./chunk-5HJ6GQ7B.js";import{a as gi,b as fi}from"./chunk-GLDUDLSV.js";import{a as Jo,b as Yo,c as Xo,d as Zo}from"./chunk-C4QEFQTI.js";import{a as Sl,d as ic,e as nc}from"./chunk-U5DXO7YF.js";import{A as Vo,B as Ho,C as Go,D as si,E as vl,I as ec,J as tc,a as _o,b as ri,c as oi,d as bo,e as Co,f as xo,g as So,h as yo,i as wo,j as ko,k as Mo,l as Eo,m as Po,n as Oo,o as Io,p as To,q as Ao,r as Lo,s as Do,t as Fo,u as Ro,v as No,w as jo,x as Bo,y as qo,z as $o}from"./chunk-YN5C3Z74.js";import{a as bl,b as ac,c as rc}from"./chunk-UDJVOSIG.js";import{a as fl,b as Xl,c as Zl}from"./chunk-POJLHQCY.js";import{a as gl}from"./chunk-V4IX2HAP.js";import{a as Zs,b as el,d as tl}from"./chunk-K3Q6A6HC.js";import{a as dc}from"./chunk-6Z5YW22R.js";import"./chunk-2JC33IZ7.js";import"./chunk-QVZKZMCJ.js";import"./chunk-YDZS3XL5.js";import{z as Ys}from"./chunk-DFIXRLYB.js";import{a as Cl,c as yl,d as wl}from"./chunk-YOTCH4SC.js";import{a as ul,c as Vl,d as Hl}from"./chunk-4YZ3NEXO.js";import{a as ml,m as zl,n as Ul}from"./chunk-DYJGQ57D.js";import"./chunk-JUPDUCRE.js";import{a as $s,b as Vs,c as Hs,d as Gs}from"./chunk-GQCVDJO3.js";import{q as mn,r as zo}from"./chunk-NIAJCS3Y.js";import{b as Wl,c as Kl,d as vn}from"./chunk-45RAE6EX.js";import{a as hl,b as Jl,c as Yl}from"./chunk-FINJLTQT.js";import"./chunk-FY6XLZEI.js";import{a as Ql}from"./chunk-VHMJBENC.js";import{a as sl,b as ll,c as cl,d as dl}from"./chunk-DNGUBTTT.js";import{b as Gl}from"./chunk-ZLXFNXXV.js";import{a as Xs}from"./chunk-4LS5LAAE.js";import{$b as Ws,Ab as As,Ad as Ll,B as ao,Bb as Ls,Bd as Dl,Cb as Ds,D as ro,Dd as Fl,E as oo,Eb as Fs,Ed as Rl,F as so,Fa as ye,Fb as Rs,G as lo,Gb as gn,Gd as Nl,H as ti,Hd as jl,Jb as Ne,Jc as il,Jd as Bl,Kc as nl,Kd as ql,Lc as rl,M as co,Mc as ol,N as po,O as ho,Ob as Ns,Oc as _i,Qc as bi,Rb as it,Rc as Ci,Sb as fn,Sc as xi,T as uo,Tb as js,Tc as Si,U as mo,Ub as Bs,Uc as pl,V as go,Vc as _l,W as ii,Wb as qs,Wc as yi,Xc as wi,Xe as $l,Z as li,Za as ds,Zb as Us,_a as ps,_b as mi,a as Ut,aa as Kc,ab as hs,ac as Ks,b as ta,bb as ui,c as vt,cb as us,cc as Qs,da as ci,db as ms,e as Kt,ea as ts,f as Qt,fa as is,fb as gs,g as ca,ga as ns,gb as fs,h as da,ha as as,hb as vs,hc as Js,i as pa,ia as rs,ib as _s,j as ha,ja as Ce,kb as bs,lb as Cs,ma as hi,mb as xs,na as os,nb as Ss,o as ua,oa as ss,od as kl,p as ma,pb as ys,pd as Ml,qb as ws,rb as ks,sb as Ms,sd as El,td as Pl,ub as Es,ud as Ol,vb as Ps,vd as Il,wa as ls,wb as Os,xa as cs,xb as Is,xd as Tl,yd as Al,zb as Ts}from"./chunk-OTG763JD.js";import{A as Qo,a as ni,b as fo,q as hn,w as Uo,x as Wo,y as Ko}from"./chunk-U5R4YP2K.js";import{$b as ka,$d as gr,$e as Ze,Ab as Ct,Ad as on,Ae as Lr,Bb as Zi,Bc as Ra,Be as Dr,Cb as ga,Cd as Ya,Ce as Fr,Db as fa,De as Rr,Dj as ki,Eb as en,Ed as Xa,Ee as Nr,Fb as va,Fc as Na,Fd as Za,Gd as er,Ge as jr,Hd as tr,He as Br,Ib as _a,Ic as ja,Id as ir,Ie as qr,Jd as nr,Je as $r,K as Yi,Kd as ar,Ke as Vr,La as Wt,Lb as ba,Lc as Ba,Ld as rr,Le as Hr,Ma as _t,Mb as Ca,Md as or,Me as Gr,Na as na,Nd as Zt,Od as sn,Oe as zr,Pa as aa,Pb as xa,Pc as qa,Pd as sr,Pe as Ur,Q as $t,Qd as lr,Rd as ei,Re as Wr,Sb as Sa,Sc as $a,Sd as cr,Se as Kr,Td as dr,Ud as ln,Vb as ya,Vd as pr,Ve as Qr,Wc as Va,Wd as hr,We as Jr,Xd as cn,Xe as Yr,Xh as zs,Yb as wa,Yd as ur,Ye as Xr,Zd as mr,Ze as Zr,_c as Ha,_d as Ye,_e as eo,aa as ia,ae as fr,af as to,bd as Ga,be as Xe,bf as xt,c as Wn,cc as Ma,ce as vr,cf as et,ch as di,d as Wi,dc as Ea,de as _r,df as io,dh as pi,ed as za,ee as br,ef as St,eh as De,f as Ki,fc as tn,fe as Cr,ff as no,fh as es,g as Qi,gc as Pa,ge as xr,gf as tt,gj as al,h as Ji,hc as nn,he as Sr,hg as ai,hj as vi,ib as ra,ig as un,jc as Oa,jg as vo,kc as Ia,ke as yr,ld as Ua,le as wr,md as Wa,oc as Ta,od as Ka,oe as kr,pb as oa,pc as Aa,pd as Qa,pe as Mr,qd as Ja,qe as Er,rb as sa,re as dn,sc as La,se as Pr,tb as Xi,tc as an,td as ge,ub as la,ue as Or,uj as at,vc as Da,ve as pn,w as Ae,wb as Jt,we as Ir,xb as bt,xe as Tr,yb as Yt,yc as Fa,ye as Ar,zb as Xt,zd as rn}from"./chunk-4KHNQVH2.js";import{$ as Lt,$b as Fn,$d as ve,Aa as q,Ab as C,B as S,Ba as On,Bb as s,C as Pt,Cb as d,Ce as Gt,D as ne,Db as b,De as zt,Ee as Zn,Fe as ea,G as Ot,Ga as Be,Ha as In,Hb as xe,I as It,Ib as Se,J as qi,Jb as Ft,Kb as ie,Kd as me,L as ae,Ma as Dt,Mb as N,Nd as Ge,O as V,Ob as x,Od as Kn,P as Tt,Pb as An,Pc as $e,Pd as Z,Qb as Ln,Qd as w,Rd as ze,S as At,Sb as Rt,Sc as jn,Sd as I,T as Y,Tb as Ie,Td as Qn,Ub as Te,Uc as Bn,V as ke,Wa as Ee,X as mt,Xc as qn,Xd as H,Yd as Jn,Za as Tn,Zb as Dn,_ as kn,_a as r,_b as de,a as L,ac as u,b as j,bc as _,bd as Bt,be as Ue,cc as R,db as G,dc as Nt,fa as je,fc as Gi,g as Wc,gc as zi,ge as We,ha as gt,hb as he,hc as Ui,hd as Ve,ia as K,ib as Hi,ic as jt,id as $n,ie as W,ja as Mn,jc as Rn,jd as Vn,ka as En,kd as Hn,ke as Ke,le as Le,ma as $i,n as Bi,na as Pn,nd as ft,ne as Yn,oa as oe,oe as Vt,pe as Xn,qc as O,qe as Qe,ra as pe,rb as _e,rc as fe,sa as Vi,t as se,tb as f,tc as Nn,td as Gn,te as Ht,ua as X,ud as He,ue as Je,v as le,vb as v,vc as p,vd as qt,w as D,wc as h,wd as zn,xb as qe,xc as Re,xd as Un,yb as Pe,za as B,zb as Oe}from"./chunk-YWLYPUCW.js";var pc={messages:[],lastMessage:null};function hc(t=pc,c){switch(c.type){case ri:return j(L({},t),{messages:[]});case oi:{let e=c.payload.index;return j(L({},t),{messages:[...t.messages.slice(0,e),Object.assign({},t.messages[e],{unread:!1}),...t.messages.slice(e+1)]})}case _o:return j(L({},t),{messages:[c.payload,...t.messages],lastMessage:c.payload});case Co:return j(L({},t),{messages:c.payload});case ko:return pc;default:return t}}var uc=t=>t.messages,mc=t=>t.lastMessage;var Jc={releases:null};
1function gc(t=Jc,c){return c.type===So?j(L({},t),{releases:c.payload}):t}var fc=t=>t.releases;var Xc={messages:[]};function vc(t=Xc,c){if(c.type===Mo){let e=c.payload,n={id:e.action,value:e.value},i=t.messages;return j(L({},t),{messages:[...i,n]})}else return t}var Mi=(()=>{class t{constructor(e,n){this.http=e,this.apiService=n}getBootstrap(){return this.http.get(this.apiService.sessionBootstrap()).pipe(Y(1))}getNotifications(){return this.http.get(this.apiService.getNotifications()).pipe(Y(1),S(e=>e))}markReadNotification(e){return this.http.post(this.apiService.markReadUserNotification(),{notification:e}).pipe(Y(1),S(n=>n))}markReadAllNotification(){return this.http.post(this.apiService.markReadAllUserNotification(),{}).pipe(Y(1),S(e=>e))}sendFeedback(e){return this.http.post(this.apiService.sendFeedback(),{feedback:e}).pipe(Y(1),S(n=>n))}getReleases(){return this.http.get(this.apiService.getReleases()).pipe(Y(1),S(e=>e))}static{this.\u0275fac=function(n){return new(n||t)(X(Ve),X(Ue))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var yc=(()=>{class t{constructor(e,n){this.homeService=e,this.actions$=n,this.requestBootstrap=w(()=>this.actions$.pipe(I(yo),K(()=>this.homeService.getBootstrap().pipe(K(i=>{let o=i&&i.data?i.data:{},a=i&&i.errors?i.errors:{},l=[new qo(i)];return l.push(!a.devices&&Array.isArray(o.devices)?new na(o.devices):new _t),l.push(!a.sites&&Array.isArray(o.sites)?new vo(o.sites):new un),l.push(!a.groups&&Array.isArray(o.groups)?new zo(o.groups):new mn),le(l)}),V(i=>le([new $o(i),new _t,new un,new mn])))))),this.requestNotifications=w(()=>this.actions$.pipe(I(bo),K(i=>this.homeService.getNotifications().pipe(S(o=>new Do(o)),V(o=>D(new Fo(o))))))),this.sendFeedback=w(()=>this.actions$.pipe(I(wo),K(i=>this.homeService.sendFeedback(i.payload).pipe(S(o=>new Ho(o)),V(o=>D(new Go(o))))))),this.markNotification=w(()=>this.actions$.pipe(I(oi),K(i=>this.homeService.markReadNotification(i.payload).pipe(S(o=>new Ao(o)),V(o=>D(new To(o))))))),this.markReadAll=w(()=>this.actions$.pipe(I(ri),K(i=>this.homeService.markReadAllNotification().pipe(S(o=>new Oo(o)),V(o=>D(new Po(o))))))),this.requestReleaseNotes=w(()=>this.actions$.pipe(I(xo),K(i=>this.homeService.getReleases().pipe(S(o=>new No(o)),V(o=>D(new jo(o)))))))}static{this.\u0275fac=function(n){return new(n||t)(X(Mi),X(ze))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var wc={notification:hc,releasenotes:gc,messages:vc},kc=Kn("home"),Mc=Ge(kc,t=>t.notification),Sh=Ge(Mc,uc),yh=Ge(Mc,mc),td=Ge(kc,t=>t.releasenotes),Ec=Ge(td,fc);function Ei(t,c=1e3){let e=window,n=!1,i=null,o=null,a=null,l=()=>{n||t()};return e.requestIdleCallback?i=e.requestIdleCallback(l,{timeout:c}):o=window.requestAnimationFrame(()=>{a=window.setTimeout(l,0)}),()=>{n=!0,i!==null&&e.cancelIdleCallback&&e.cancelIdleCallback(i),o!==null&&window.cancelAnimationFrame(o),a!==null&&window.clearTimeout(a)}}var Fe=Wc(Kc());var _n=t=>({active:t});function cd(t,c){t&1&&(b(0,"InfoBox",11),p(1,"translate")),t&2&&C("text",h(1,1,"nav.organisations.modal.errors.form"))}function dd(t,c){t&1&&(s(0,"small",19),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.organisations.modal.errors.nameRequired")," "))}function pd(t,c){t&1&&(s(0,"small",19),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.organisations.modal.errors.nameLength")," "))}function hd(t,c){if(t&1&&(s(0,"div",12)(1,"div")(2,"h2",17),u(3),p(4,"translate"),d(),s(5,"label"),u(6),p(7,"translate"),b(8,"input",18),p(9,"translate"),d(),f(10,dd,3,3,"small",19),f(11,pd,3,3,"small",19),s(12,"label"),u(13),p(14,"translate"),b(15,"input",20),p(16,"translate"),d()(),s(17,"div")(18,"h2",17),u(19),p(20,"translate"),d(),s(21,"p",21),u(22),p(23,"translate"),d(),s(24,"label"),u(25),p(26,"translate"),b(27,"textarea",22),p(28,"translate"),d()()()),t&2){let e=x();r(3),_(h(4,13,"nav.organisations.modal.tabs.general")),r(2),de("error",e.form.get("name").touched&&e.form.get("name").invalid),r(),R(" ",h(7,15,"nav.organisations.modal.fields.name")," "),r(2),C("placeholder",h(9,17,"nav.organisations.modal.placeholders.name")),r(2),v(e.hasError("name","required")?10:-1),r(),v(e.hasError("name","minlength")?11:-1),r(2),R(" ",h(14,19,"nav.organisations.modal.fields.domain")," "),r(2),C("placeholder",h(16,21,"nav.organisations.modal.placeholders.domain")),r(4),_(h(20,23,"nav.organisations.modal.fields.description")),r(3),_(h(23,25,"nav.organisations.modal.subtitle")),r(3),R(" ",h(26,27,"nav.organisations.modal.fields.description")," "),r(2),C("placeholder",h(28,29,"nav.organisations.modal.placeholders.description"))}}function ud(t,c){t&1&&(s(0,"div",12)(1,"div")(2,"h2",17),u(3),p(4,"translate"),d(),s(5,"label"),u(6),p(7,"translate"),b(8,"input",23),d(),s(9,"label"),u(10),p(11,"translate"),b(12,"input",24),d()(),s(13,"div")(14,"h2",17),u(15),p(16,"translate"),d(),s(17,"label"),u(18),p(19,"translate"),b(20,"input",25),d(),s(21,"label"),u(22),p(23,"translate"),b(24,"input",26),p(25,"translate"),d()()()),t&2&&(r(3),_(h(4,7,"nav.organisations.modal.tabs.company")),r(3),R(" ",h(7,9,"nav.organisations.modal.fields.legalName")," "),r(4),R(" ",h(11,11,"nav.organisations.modal.fields.tradingName")," "),r(5),_(h(16,13,"nav.organisations.modal.fields.industry")),r(3),R(" ",h(19,15,"nav.organisations.modal.fields.industry")," "),r(4),R(" ",h(23,17,"nav.organisations.modal.fields.website")," "),r(2),C("placeholder",h(25,19,"nav.organisations.modal.placeholders.website")))}function md(t,c){t&1&&(s(0,"small",19),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.organisations.modal.errors.email")," "))}function gd(t,c){if(t&1&&(s(0,"div",12)(1,"div")(2,"h2",17),u(3),p(4,"translate"),d(),s(5,"label"),u(6),p(7,"translate"),b(8,"input",27),p(9,"translate"),d(),f(10,md,3,3,"small",19),s(11,"label"),u(12),p(13,"translate"),b(14,"input",28),d(),s(15,"label"),u(16),p(17,"translate"),b(18,"input",29),d(),s(19,"label"),u(20),p(21,"translate"),b(22,"input",30),d()(),s(23,"div")(24,"h2",17),u(25),p(26,"translate"),d(),s(27,"label"),u(28),p(29,"translate"),b(30,"input",31),d(),s(31,"label"),u(32),p(33,"translate"),b(34,"input",32),d(),s(35,"label"),u(36),p(37,"translate"),b(38,"input",33),d(),s(39,"label"),u(40),p(41,"translate"),b(42,"input",34),d()()()),t&2){let e=x();r(3),_(h(4,14,"nav.organisations.modal.tabs.contact")),r(2),de("error",e.form.get("email").touched&&e.form.get("email").invalid),r(),R(" ",h(7,16,"nav.organisations.modal.fields.email")," "),r(2),C("placeholder",h(9,18,"nav.organisations.modal.placeholders.email")),r(2),v(e.hasError("email","email")?10:-1),r(2),R(" ",h(13,20,"nav.organisations.modal.fields.phone")," "),r(4),R(" ",h(17,22,"nav.organisations.modal.fields.street")," "),r(4),R(" ",h(21,24,"nav.organisations.modal.fields.street2")," "),r(5),_(h(26,26,"nav.organisations.modal.fields.country")),r(3),R(" ",h(29,28,"nav.organisations.modal.fields.city")," "),r(4),R(" ",h(33,30,"nav.organisations.modal.fields.region")," "),r(4),R(" ",h(37,32,"nav.organisations.modal.fields.postalCode")," "),r(4),R(" ",h(41,34,"nav.organisations.modal.fields.country")," ")}}var Oi=(()=>{class t{constructor(e){this.formBuilder=e,this.open=!1,this.pending=!1,this.close=new Be,this.organisationCreate=new Be,this.selectedTab="general",this.requestClose=()=>{this.pending||this.close.emit()},this.form=this.formBuilder.group({name:["",[W.required,W.minLength(2),W.maxLength(120)]],description:["",W.maxLength(500)],domain:["",W.maxLength(253)],legalName:["",W.maxLength(160)],tradingName:["",W.maxLength(160)],industry:["",W.maxLength(120)],website:["",W.maxLength(255)],email:["",[W.email,W.maxLength(255)]],phone:["",W.maxLength(50)],street:["",W.maxLength(160)],street2:["",W.maxLength(160)],city:["",W.maxLength(120)],region:["",W.maxLength(120)],postalCode:["",W.maxLength(30)],countryName:["",W.maxLength(120)]})}ngOnChanges(e){e.open&&this.open&&!e.open.previousValue&&this.reset()}submit(){if(this.pending)return;
1if(this.form.invalid){this.form.markAllAsTouched(),this.selectedTab="general";return}let e=this.form.value;this.organisationCreate.emit({name:this.trim(e.name),description:this.trim(e.description),domain:this.trim(e.domain),company:{legalName:this.trim(e.legalName),tradingName:this.trim(e.tradingName),industry:this.trim(e.industry),website:this.trim(e.website),email:this.trim(e.email),phone:this.trim(e.phone)},billingAddress:{street:this.trim(e.street),street2:this.trim(e.street2),city:this.trim(e.city),region:this.trim(e.region),postalCode:this.trim(e.postalCode),countryName:this.trim(e.countryName)}})}hasError(e,n){let i=this.form.get(e);return!!i&&i.touched&&i.hasError(n)}changeToggle(e){this.selectedTab=e}isSelected(e){return this.selectedTab===e}reset(){this.selectedTab="general",this.form.reset({name:"",description:"",domain:"",legalName:"",tradingName:"",industry:"",website:"",email:"",phone:"",street:"",street2:"",city:"",region:"",postalCode:"",countryName:""})}trim(e){return typeof e=="string"?e.trim():""}static{this.\u0275fac=function(n){return new(n||t)(G(Gt))}}static{this.\u0275cmp=he({type:t,selectors:[["create-organisation-modal"]],inputs:{open:"open",pending:"pending"},outputs:{close:"close",organisationCreate:"organisationCreate"},standalone:!1,features:[Dt],decls:36,vars:41,consts:[[1,"modal",2,"--modal-width","min(95vw, 1100px)",3,"open","closeEvent","confirmCloseWhenDirty","isDirty","draggable"],[3,"close"],["title",""],["subtitle",""],["content",""],[1,"new-organisation",3,"ngSubmit","formGroup"],[1,"control-bar"],[1,"tab",3,"click","ngClass"],["icon","dashboard"],["icon","accounts"],["icon","sites"],["type","error",3,"text"],[1,"grid-container","--two-columns","main-layout"],["left",""],["type","outlined","action","cross-circle",3,"click","text","disabled"],["right",""],["action","plus-circle",3,"click","text","disabled","loading"],[1,"section-header"],["type","text","formControlName","name",3,"placeholder"],[1,"field-error"],["type","text","formControlName","domain",3,"placeholder"],[1,"text-muted"],["formControlName","description","rows","6",3,"placeholder"],["type","text","formControlName","legalName"],["type","text","formControlName","tradingName"],["type","text","formControlName","industry"],["type","text","formControlName","website",3,"placeholder"],["type","email","formControlName","email",3,"placeholder"],["type","text","formControlName","phone"],["type","text","formControlName","street"],["type","text","formControlName","street2"],["type","text","formControlName","city"],["type","text","formControlName","region"],["type","text","formControlName","postalCode"],["type","text","formControlName","countryName"]],template:function(n,i){n&1&&(s(0,"Modal",0)(1,"ModalHeader",1),xe(2,2),u(3),p(4,"translate"),Se(),Ft(5,3),d(),s(6,"ModalBody"),xe(7,4),s(8,"form",5),N("ngSubmit",function(){return i.submit()}),s(9,"div",6)(10,"div",7),N("click",function(){return i.changeToggle("general")}),b(11,"SvgIcon",8),s(12,"span"),u(13),p(14,"translate"),d()(),s(15,"div",7),N("click",function(){return i.changeToggle("company")}),b(16,"SvgIcon",9),s(17,"span"),u(18),p(19,"translate"),d()(),s(20,"div",7),N("click",function(){return i.changeToggle("contact")}),b(21,"SvgIcon",10),s(22,"span"),u(23),p(24,"translate"),d()()(),f(25,cd,2,3,"InfoBox",11),f(26,hd,29,31,"div",12),f(27,ud,26,21,"div",12),f(28,gd,43,36,"div",12),d(),Se(),d(),s(29,"ModalActions"),xe(30,13),s(31,"ButtonField",14),p(32,"translate"),N("click",function(){return i.requestClose()}),d(),Se(),xe(33,15),s(34,"ButtonField",16),p(35,"translate"),N("click",function(){return i.submit()}),d(),Se(),d()()),n&2&&(C("open",i.open)("closeEvent",i.requestClose)("confirmCloseWhenDirty",!0)("isDirty",i.form.dirty)("draggable",!0),r(),C("close",i.requestClose),r(2),_(h(4,23,"nav.organisations.modal.title")),r(5),C("formGroup",i.form),r(2),C("ngClass",fe(35,_n,i.isSelected("general"))),r(3),_(h(14,25,"nav.organisations.modal.tabs.general")),r(2),C("ngClass",fe(37,_n,i.isSelected("company"))),r(3),_(h(19,27,"nav.organisations.modal.tabs.company")),r(2),C("ngClass",fe(39,_n,i.isSelected("contact"))),r(3),_(h(24,29,"nav.organisations.modal.tabs.contact")),r(2),v(i.isSelected("general")&&i.form.touched&&i.form.invali
1d?25:-1),r(),v(i.isSelected("general")?26:-1),r(),v(i.isSelected("company")?27:-1),r(),v(i.isSelected("contact")?28:-1),r(3),C("text",h(32,31,"common.cancel"))("disabled",i.pending),r(3),C("text",h(35,33,"nav.organisations.modal.create"))("disabled",i.pending)("loading",i.pending))},dependencies:[$e,Qe,We,Ke,Le,Je,Ht,vi,De,_i,bi,Ci,xi,Si,ve],styles:["[_ngcontent-%COMP%]:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
1--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}[_ngcontent-%COMP%]:root .game2reel[_ngcontent-%COMP%]{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root .wdc[_ngcontent-%COMP%]{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){[_ngcontent-%COMP%]:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){[_ngcontent-%COMP%]:root{--main-content-gutter: 48px}}body.dark-theme[_ngcontent-%COMP%], html.dark-theme[_ngcontent-%COMP%]{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%], .block[_ngcontent-%COMP%], .card[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], header[_ngcontent-%COMP%], .mat-mdc-card[_ngcontent-%COMP%], .mat-mdc-dialog-container[_ngcontent-%COMP%]{transition:background-color .3s ease,color .3s ease,border-color .3s ease}.new-organisation[_ngcontent-%COMP%]{min-height:390px}.new-organisation[_ngcontent-%COMP%] .control-bar[_ngcontent-%COMP%]{margin:-24px -24px 24px;overflow-x:auto;background-color:hsla(var(--card-hsl),.3)}@media only screen and (min-width:769px){.new-organisation[_ngcontent-%COMP%] .control-bar[_ngcontent-%COMP%]{margin:-24px -36px 24px}}@media only screen and (min-width:1216px){.new-organisation[_ngcontent-%COMP%] .control-bar[_ngcontent-%COMP%]{padding:0}}@media only screen and (min-width:769px){.new-organisation[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{--columns: 2}}@media only screen and (min-width:1024px){.new-organisation[_ngcontent-%COMP%] .grid-container.main-layout[_ngcontent-%COMP%]{--gapH: 36px}}.new-organisation[_ngcontent-%COMP%] InfoBox[_ngcontent-%COMP%]{display:grid;margin:0 0 24px}.new-organisation[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{min-height:144px;resize:vertical}.new-organisation[_ngcontent-%COMP%] .field-error[_ngcontent-%COMP%]{display:block;margin:-18px 0 12px;color:var(--error);font-size:12px}"]})}}return t})();function vd(t,c){t&1&&(b(0,"InfoBox",6),p(1,"translate")),t&2&&C("text",h(1,1,"nav.projects.modal.errors.form"))}function _d(t,c){t&1&&(s(0,"small",9),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.projects.modal.errors.nameRequired")," "))}function bd(t,c){t&1&&(s(0,"small",9),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.projects.modal.errors.nameLength")," "))}function Cd(t,c){t&1&&(s(0,"small",9),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.projects.modal.errors.slugRequired")," "))}function xd(t,c){t&1&&(s(0,"small",9),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.projects.modal.errors.slugFormat")," "))}function Sd(t,c){t&1&&(s(0,"small",9),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.projects.modal.errors.slugLength")," "))}var yd=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Pc=63,Ii=(()=>{class t{constructor(e){this.formBuilder=e,this.open=!1,this.pending=!1,this.close=new Be,this.projectCreate=new Be,this.requestClose=()=>{this.pending||this.close.emit()},this.form=this.formBuilder.group({name:["",[W.required,W.minLength(2),W.maxLength(120)]],slug:["",[W.required,W.maxLength(Pc),W.pattern(yd)]],description:["",W.maxLength(500)]})}ngOnChanges(e){e.open&&this.open&&!e.open.previousValue&&this.reset()}onNameChange(){let e=this.form.get("slug");!e||e.dirty||e.setValue(this.slugify(this.form.get("name").value))}submit(){if(this.pending)return;
1if(this.form.invalid){this.form.markAllAsTouched();return}let e=this.form.value;this.projectCreate.emit({name:this.trim(e.name),slug:this.trim(e.slug),description:this.trim(e.description)})}hasError(e,n){let i=this.form.get(e);return!!i&&i.touched&&i.hasError(n)}slugify(e){return typeof e!="string"?"":e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,Pc).replace(/-+$/g,"")}reset(){this.form.reset({name:"",slug:"",description:""})}trim(e){return typeof e=="string"?e.trim():""}static{this.\u0275fac=function(n){return new(n||t)(G(Gt))}}static{this.\u0275cmp=he({type:t,selectors:[["create-project-modal"]],inputs:{open:"open",pending:"pending"},outputs:{close:"close",projectCreate:"projectCreate"},standalone:!1,features:[Dt],decls:43,vars:53,consts:[[1,"modal",2,"--modal-width","min(95vw, 760px)",3,"open","closeEvent","confirmCloseWhenDirty","isDirty","draggable"],[3,"close"],["title",""],["subtitle",""],["content",""],[1,"new-project",3,"ngSubmit","formGroup"],["type","error",3,"text"],[1,"text-muted"],["type","text","formControlName","name",3,"input","placeholder"],[1,"field-error"],["type","text","formControlName","slug",3,"placeholder"],[1,"field-hint"],["formControlName","description","rows","4",3,"placeholder"],["left",""],["type","outlined","action","cross-circle",3,"click","text","disabled"],["right",""],["action","plus-circle",3,"click","text","disabled","loading"]],template:function(n,i){n&1&&(s(0,"Modal",0)(1,"ModalHeader",1),xe(2,2),u(3),p(4,"translate"),Se(),Ft(5,3),d(),s(6,"ModalBody"),xe(7,4),s(8,"form",5),N("ngSubmit",function(){return i.submit()}),f(9,vd,2,3,"InfoBox",6),s(10,"p",7),u(11),p(12,"translate"),d(),s(13,"label"),u(14),p(15,"translate"),s(16,"input",8),p(17,"translate"),N("input",function(){return i.onNameChange()}),d()(),f(18,_d,3,3,"small",9),f(19,bd,3,3,"small",9),s(20,"label"),u(21),p(22,"translate"),b(23,"input",10),p(24,"translate"),d(),s(25,"small",11),u(26),p(27,"translate"),d(),f(28,Cd,3,3,"small",9),f(29,xd,3,3,"small",9),f(30,Sd,3,3,"small",9),s(31,"label"),u(32),p(33,"translate"),b(34,"textarea",12),p(35,"translate"),d()(),Se(),d(),s(36,"ModalActions"),xe(37,13),s(38,"ButtonField",14),p(39,"translate"),N("click",function(){return i.requestClose()}),d(),Se(),xe(40,15),s(41,"ButtonField",16),p(42,"translate"),N("click",function(){return i.submit()}),d(),Se(),d()()),n&2&&(C("open",i.open)("closeEvent",i.requestClose)("confirmCloseWhenDirty",!0)("isDirty",i.form.dirty)("draggable",!0),r(),C("close",i.requestClose),r(2),_(h(4,31,"nav.projects.modal.title")),r(5),C("formGroup",i.form),r(),v(i.form.touched&&i.form.invalid?9:-1),r(2),_(h(12,33,"nav.projects.modal.subtitle")),r(2),de("error",i.form.get("name").touched&&i.form.get("name").invalid),r(),R(" ",h(15,35,"nav.projects.modal.fields.name")," "),r(2),C("placeholder",h(17,37,"nav.projects.modal.placeholders.name")),r(2),v(i.hasError("name","required")?18:-1),r(),v(i.hasError("name","minlength")?19:-1),r(),de("error",i.form.get("slug").touched&&i.form.get("slug").invalid),r(),R(" ",h(22,39,"nav.projects.modal.fields.slug")," "),r(2),C("placeholder",h(24,41,"nav.projects.modal.placeholders.slug")),r(3),_(h(27,43,"nav.projects.modal.hints.slug")),r(2),v(i.hasError("slug","required")?28:-1),r(),v(i.hasError("slug","pattern")?29:-1),r(),v(i.hasError("slug","maxlength")?30:-1),r(2),R(" ",h(33,45,"nav.projects.modal.fields.description")," "),r(2),C("placeholder",h(35,47,"nav.projects.modal.placeholders.description")),r(4),C("text",h(39,49,"common.cancel"))("disabled",i.pending),r(3),C("text",h(42,51,"nav.projects.modal.create"))("disabled",i.pending)("loading",i.pending))},dependencies:[Qe,We,Ke,Le,Je,Ht,vi,_i,bi,Ci,xi,Si,ve],styles:["[_ngcontent-%COMP%]:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
1--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}[_ngcontent-%COMP%]:root .game2reel[_ngcontent-%COMP%]{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root .wdc[_ngcontent-%COMP%]{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){[_ngcontent-%COMP%]:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){[_ngcontent-%COMP%]:root{--main-content-gutter: 48px}}body.dark-theme[_ngcontent-%COMP%], html.dark-theme[_ngcontent-%COMP%]{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%], .block[_ngcontent-%COMP%], .card[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], header[_ngcontent-%COMP%], .mat-mdc-card[_ngcontent-%COMP%], .mat-mdc-dialog-container[_ngcontent-%COMP%]{transition:background-color .3s ease,color .3s ease,border-color .3s ease}.new-project[_ngcontent-%COMP%] InfoBox[_ngcontent-%COMP%]{display:grid;margin:0 0 24px}.new-project[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{min-height:96px;resize:vertical}.new-project[_ngcontent-%COMP%] .field-hint[_ngcontent-%COMP%]{display:block;margin:-18px 0 12px;color:var(--text-muted);font-size:12px}.new-project[_ngcontent-%COMP%] .field-error[_ngcontent-%COMP%]{display:block;margin:-18px 0 12px;color:var(--error);font-size:12px}"]})}}return t})();var kd=["*"],Oc=t=>({open:t});function Md(t,c){if(t&1&&(s(0,"div",4),u(1),d()),t&2){let e=x(2);r(),_(e.count)}}function Ed(t,c){if(t&1){let e=ie();s(0,"a",0),b(1,"SvgIcon",2),s(2,"span",3),u(3),d(),f(4,Md,2,1,"div",4),s(5,"div",5),N("click",function(i){B(e);let o=x();return q(o.toggle(i))}),b(6,"SvgIcon",6),d()()}if(t&2){let e=x();C("routerLink",e.link),r(),C("icon",e.icon),r(2),_(e.title),r(),v(e.count>=0?4:-1),r(),C("ngClass",fe(5,Oc,e.state.open))}}function Pd(t,c){if(t&1&&(s(0,"div",4),u(1),d()),t&2){let e=x(2);r(),_(e.count)}}function Od(t,c){if(t&1){let e=ie();s(0,"a"),b(1,"SvgIcon",2),s(2,"span",7),N("click",function(i){B(e);let o=x();return q(o.toggle(i))}),u(3),d(),f(4,Pd,2,1,"div",4),s(5,"div",5),N("click",function(i){B(e);let o=x();return q(o.toggle(i))}),b(6,"SvgIcon",6),d()()}if(t&2){let e=x();r(),C("icon",e.icon),r(2),_(e.title),r(),v(e.count>=0?4:-1),r(),C("ngClass",fe(4,Oc,e.state.open))}}var Ti=(()=>{class t{constructor(){this.count=-1,this.link="",this.state={open:!1}}ngOnInit(){this.toggle=this.toggle.bind(this)}ngAfterViewInit(){}ngOnDestroy(){}open(){this.state.open=!0}collapse(){this.state.open=!1}toggle(e){e&&(e.preventDefault(),e.stopPropagation()),this.state.open=!this.state.open}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=he({type:t,selectors:[["Submenu"],["submenu"]],inputs:{title:"title",icon:"icon",count:"count",link:"link"},standalone:!1,ngContentSelectors:kd,decls:4,vars:2,consts:[[3,"routerLink"],[1,"open-close-container"],[3,"icon"],[1,"title","capitalize-first-letter"],[1,"badge"],[1,"menu-caret",3,"click","ngClass"],["
1icon","arrow-down-small-full"],[1,"title","capitalize-first-letter",3,"click"]],template:function(n,i){n&1&&(An(),f(0,Ed,7,7,"a",0)(1,Od,7,6,"a"),s(2,"div",1),Ln(3),d()),n&2&&(v(i.link&&i.link!==""?0:1),r(2),C("@openClose",!!i.state.open))},dependencies:[$e,qt,De],styles:["[_ngcontent-%COMP%]:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
1--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}[_ngcontent-%COMP%]:root .game2reel[_ngcontent-%COMP%]{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root .wdc[_ngcontent-%COMP%]{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){[_ngcontent-%COMP%]:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){[_ngcontent-%COMP%]:root{--main-content-gutter: 48px}}body.dark-theme[_ngcontent-%COMP%], html.dark-theme[_ngcontent-%COMP%]{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%], .block[_ngcontent-%COMP%], .card[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], header[_ngcontent-%COMP%], .mat-mdc-card[_ngcontent-%COMP%], .mat-mdc-dialog-container[_ngcontent-%COMP%]{transition:background-color .3s ease,color .3s ease,border-color .3s ease}.menu-caret[_ngcontent-%COMP%], .title[_ngcontent-%COMP%]{cursor:pointer}.menu-caret[_ngcontent-%COMP%]{padding-block:6px}.open-close-container[_ngcontent-%COMP%]{overflow:hidden;margin:0 -24px}.badge[_ngcontent-%COMP%]{margin:0 12px 0 0}"],data:{animation:[Wn("openClose",[Qi("true",Ki({height:"*"})),Qi("false",Ki({height:"0px"})),Ji("false => true",[Wi(200)]),Ji("true => false",[Wi(200)])])]}})}}return t})();var jd=["mediaSubmenu"],Bd=["daySubmenu"],qd=["contextTrigger"],$d=["contextSurface"],Vd=()=>["/profile"],te=()=>["is-active"],Hd=()=>["/dashboard"],Gd=()=>["/events"],zd=()=>["/recordings"],Ud=()=>["/livestream"],Wd=()=>["/videowall"],Sn=()=>["/media"],Kd=t=>({date:t}),Qd=t=>["/day",t],Jd=()=>["/analytics"],Ic=()=>({exact:!0}),Yd=()=>["/analytics/markers"],Xd=()=>["/watchlist"],Zd=()=>["/cases"],ep=()=>["/alerts"],tp=()=>["/channels"],ip=()=>["/workflows"],np=()=>["/io"],ap=()=>["/devices"],rp=()=>["/sites"],op=t=>["/sites/",t],sp=()=>["/groups"],lp=()=>["/accounts"],cp=()=>["/roles"],dp=()=>["/audit"],pp=()=>["/settings"],hp=()=>["/subscription"],up=(t,c,e)=>({percent:t,usage:c,max:e}),Tc=(t,c)=>c.id;function mp(t,c){if(t&1&&(s(0,"span",25),u(1),d()),t&2){let e=x(2);r(),_(e.projectInitial(e.currentProject))}}function gp(t,c){if(t&1&&(s(0,"span",28),u(1),p(2,"translate"),d()),t&2){let e=x(2);r(),R(" ",e.projectDisplayName()||h(2,1,"nav.projects.fallback")," ")}}function fp(t,c){if(t&1){let e=ie();s(0,"button",33),p(1,"translate"),p(2,"translate"),p(3,"translate"),p(4,"translate"),N("click",function(i){B(e);let o=x(2);return q(o.openWorkspaceSettings(i))}),b(5,"SvgIcon",34),d()}t&2&&(C("title",h(1,2,"nav.context.label")+" "+h(2,4,"nav.settings")),_e("aria-label",h(3,6,"nav.context.label")+" "+h(4,8,"nav.settings")))}function vp(t,c){if(t&1){let e=ie();s(0,"label",39),b(1,"SvgIcon",43),s(2,"input",44),p(3,"translate"),p(4,"translate"),Ui("ngModelChange",function(i){B(e);let o=x(3);return zi(o.organisationSearch,i)||(o.organisationSearch=i),q(i)}),d()()}if(t&2){let e=x(3);r(2),Gi("ngModel",e.organisationSearch),C("placeholder",h(3,3,"nav.organisations.search")),_e("aria-label",h(4,5,"nav.organisations.search"))}}function _p(t,c){t&1&&(s(0,"div",40),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.organisations.loading")))}function bp(t,c){if(t&1&&(s(0,"small"),u(1),d()),t&2){let e=x().$implicit;r(),_(e.slug)}}function Cp(t,c){if(t&1){let e=ie();s(0,"li")(1,"button",46),N("click",function(i){let o=B(e).$implicit,a=x(4);return q(a.selectOrganisation(o,i))}),s(2,"span",47),u(3),d(),s(4,"span",48)(5,"span",49),u(6),d(),f(7,bp,2,1,"small"),d()()()}if(t&2){let e=c.$implicit,n=x(4);r(),de("selected",n.isDraftOrganisation(e)),C("disabled",n.organisationActionPending||n.projectActionPending||!n.config.featureOrganisationSwitcherEnabled),_e("aria-selected",n.isDraftOrganisation(e)),r(2),_(n.organisationInitial(e)),r(3),_(e.name),r(),v(e.slug?7:-1)}}function xp(t,c){if(t&1&&(s(0,"li",45),u(1),p(2,"translate"),d()),t&2){let e=x(4);r(),R(" ",h(2,1,e.organisationSearch?"nav.organisations.noResults":"nav.organisations.empty")," ")}}function Sp(t,c){if(t&1&&(s(0,"ul",41),p(1,"translate"),Pe(2,Cp,8,7,"li",null,Tc),f(4,xp,3,3,"li",45),d()),t&2){let e=x(3);_e("aria-label",h(1,2,"nav.organisations.label")),r(2),Oe(e.filteredOrganisations()),r(2),v(e.filteredOrganisations().length===0?4:-1)}}function yp(t,c){if(t&1){let e=ie();s(0,"button",50),N("click",function(i){B(e);let o=x(3);return q(o.openCreateOrganisation(i))}
1),b(1,"SvgIcon",51),s(2,"span"),u(3),p(4,"translate"),d()()}t&2&&(r(3),_(h(4,1,"nav.organisations.create")))}function wp(t,c){if(t&1){let e=ie();s(0,"button",56),N("click",function(i){B(e);let o=x(4);return q(o.openCreateProject(i))}),b(1,"SvgIcon",51),s(2,"span"),u(3),p(4,"translate"),d()()}t&2&&(r(3),_(h(4,1,"nav.projects.create")))}function kp(t,c){if(t&1){let e=ie();s(0,"label",39),b(1,"SvgIcon",43),s(2,"input",44),p(3,"translate"),p(4,"translate"),Ui("ngModelChange",function(i){B(e);let o=x(4);return zi(o.projectSearch,i)||(o.projectSearch=i),q(i)}),d()()}if(t&2){let e=x(4);r(2),Gi("ngModel",e.projectSearch),C("placeholder",h(3,3,"nav.projects.search")),_e("aria-label",h(4,5,"nav.projects.search"))}}function Mp(t,c){t&1&&(s(0,"div",40),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.projects.loading")))}function Ep(t,c){if(t&1&&(s(0,"small"),u(1),d()),t&2){let e=x().$implicit;r(),_(e.slug)}}function Pp(t,c){if(t&1){let e=ie();s(0,"li")(1,"button",57),N("click",function(i){let o=B(e).$implicit,a=x(5);return q(a.selectProject(o,i))}),s(2,"span",48)(3,"span",49),u(4),p(5,"translate"),d(),f(6,Ep,2,1,"small"),d()()()}if(t&2){let e=c.$implicit,n=x(5);r(),de("selected",n.isProjectSelectedInDraft(e)),C("disabled",n.organisationActionPending||n.projectActionPending||n.projectsPending||!n.config.featureProjectSwitcherEnabled),_e("aria-selected",n.isProjectSelectedInDraft(e)),r(3),_(e.name||h(5,6,"nav.projects.fallback")),r(2),v(e.slug?6:-1)}}function Op(t,c){if(t&1&&(s(0,"li",45),u(1),p(2,"translate"),d()),t&2){let e=x(5);r(),R(" ",h(2,1,e.projectSearch?"nav.projects.noResults":e.projectStatusKey())," ")}}function Ip(t,c){if(t&1&&(s(0,"ul",41),p(1,"translate"),Pe(2,Pp,7,8,"li",null,Tc),f(4,Op,3,3,"li",45),d()),t&2){let e=x(4);_e("aria-label",h(1,2,"nav.projects.label")),r(2),Oe(e.filteredProjects()),r(2),v(e.filteredProjects().length===0?4:-1)}}function Tp(t,c){if(t&1){let e=ie();s(0,"div",52),p(1,"translate"),N("pointerdown",function(i){B(e);let o=x(3);return q(o.startOrganisationColumnResize(i))})("pointermove",function(i){B(e);let o=x(3);return q(o.resizeOrganisationColumn(i))})("pointerup",function(i){B(e);let o=x(3);return q(o.finishOrganisationColumnResize(i))})("pointercancel",function(i){B(e);let o=x(3);return q(o.finishOrganisationColumnResize(i))})("keydown",function(i){B(e);let o=x(3);return q(o.resizeOrganisationColumnFromKeyboard(i))}),d(),s(2,"section",53)(3,"div",54)(4,"div",38)(5,"span"),u(6),p(7,"translate"),d(),s(8,"small"),u(9),d()(),f(10,wp,5,3,"button",55),d(),f(11,kp,5,7,"label",39),f(12,Mp,3,3,"div",40),f(13,Ip,5,4,"ul",41),d()}if(t&2){let e=x(3);de("resizing",e.organisationColumnResizing),_e("aria-label",h(1,12,"nav.context.resize"))("aria-valuemin",180)("aria-valuemax",e.organisationColumnMaxWidth())("aria-valuenow",e.organisationColumnWidth),r(6),_(h(7,14,"nav.projects.label")),r(3),_(e.projects.length),r(),v(e.config.featureProjectCreationEnabled&&e.canCreateProjectInDraftOrganisation()?10:-1),r(),v(e.config.featureProjectSwitcherEnabled?11:-1),r(),v(e.projectsLoading?12:-1),r(),v(e.projectsPending?-1:13)}}function Ap(t,c){if(t&1&&(s(0,"div",32),p(1,"translate"),s(2,"div",35)(3,"section",36)(4,"div",37)(5,"div",38)(6,"span"),u(7),p(8,"translate"),d(),s(9,"small"),u(10),d()()(),f(11,vp,5,7,"label",39),f(12,_p,3,3,"div",40),f(13,Sp,5,4,"ul",41),f(14,yp,5,3,"button",42),d(),f(15,Tp,14,16),d()()),t&2){let e=x(2);_e("aria-label",h(1,12,"nav.context.title")),r(2),Dn("--organisation-column-width",e.organisationColumnWidth+"px"),de("column-resizing",e.organisationColumnResizing),r(5),_(h(8,14,"nav.organisations.label")),r(3),_(e.organisations.length),r(),v(e.config.featureOrganisationSwitcherEnabled?11:-1),r(),v(e.organisationsLoading?12:-1),r(),v(e.organisationsLoading?-1:13),r(),v(e.config.featureOrganisationCreationEnabled?14:-1),r(),v(e.config.featureProjectsEnabled!==!1?15:-1)}}function Lp(t,c){if(t&1){let e=ie();s(0,"div",20),N("clickOutside",function(){B(e);let i=x();return q(i.closeContextMenus())}),s(1,"div",21,0)(3,"button",22,1),p(5,"translate"),N("click",function(i){B(e);let o=x();return q(o.toggleOrganisationMenu(i))}),s(6,"span",23)(7,"span",24),u(8),d(),f(9,mp,2,1,"span",25),d(),s(10,"span",26)(11,"span",27),u(12),p(13,"translate"),d(),s(14,"strong"),u(15),p(16,"translate"),d(),f(17,gp,3,3,"span",28),d(),s(18,"span",29),b(19,"SvgIcon",30),d()(),f(20,fp,6,10,"button",31),f(21,Ap,16,16,"div",32),d()()}if(t&2){let e=x();de("context-open",e.contextMenuOpen),r(3),_e("aria-expanded",e.contextMenuOpen)("aria-label",h(5,11,"nav.context.open")),r(5),_(e.currentOrganisationInitial()),r(),v(e.config.featureProjectsEnabled!==!1?9:-1),r(3),_(h(13,13,"nav.context.label")),r(3),_(e.organisationDisplayName()||h(16,15,e.organisationStatusKey())),r(2),v(e.config.featureProjectsEnabled!==!1?17:-1),r(3),v(e.contextMenuOpen&&e.canManageOrganisationSettings()?20:-1),r(),v(e.contextMenuOpen?21:-1)}}function Dp(t,c){if(t&1){let e=ie();s(0,"create-organisation-modal",58),N("close",function(){B(e);let i=x();return q(i.closeCreateOrganisation())})("organisationCreate",function(i){B(e);let o=x();return q(o.createOrganisation(i))}),d()}if(t&2){let e=x();C("open",e.createOrganisationModalOpen)("pending",e.organisationActionPending)}}function Fp(t,c){if(t&1){let e=ie();s(0,"create-project-modal",59),N("close",function(){B(e);let i=x();return q(i.closeCreateProject())})("projectCreate",function(i){B(e);let o=x();return q(o.createProject(i))}),d()}if(t&2){let e=x();
1C("open",e.createProjectModalOpen)("pending",e.projectActionPending)}}function Rp(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),R(" ",h(2,1,"nav.sections.monitoring")," "))}function Np(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",60),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,Hd))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.dashboard")))}function jp(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",61),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,Gd))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.latestEvents")))}function Bp(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",61),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,zd))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.recentRecordings")))}function qp(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",62),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,Ud))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.liveView")))}function $p(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",63),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,Wd))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.videoWall")))}function Vp(t,c){if(t&1&&(s(0,"li")(1,"a",67),b(2,"SvgIcon",68),s(3,"span"),u(4),p(5,"date"),s(6,"span",69),u(7),p(8,"date"),d()()()()),t&2){let e=c.$implicit,n=x(3);r(),C("routerLink",O(11,Sn))("queryParams",n.toMediaDateParam(e)?fe(12,Kd,n.toMediaDateParam(e)):null)("routerLinkActive",O(14,te)),r(3),_(Re(5,5,e,"MMMM d")),r(3),_(Re(8,8,e,"EE, y"))}}function Hp(t,c){t&1&&(s(0,"li",66)(1,"a",70),u(2," ... "),d()()),t&2&&(r(),C("routerLink",O(1,Sn)))}function Gp(t,c){if(t&1&&(s(0,"ul",65),Pe(1,Vp,9,15,"li",null,qe),f(3,Hp,3,2,"li",66),d()),t&2){let e=x(2);r(),Oe(e.days.slice(0,5)),r(2),v(e.days.length>5?3:-1)}}function zp(t,c){if(t&1&&(s(0,"li",10)(1,"Submenu",64,2),p(3,"translate"),f(4,Gp,4,1,"ul",65),d()()),t&2){let e=x();r(),C("title",h(3,4,"nav.recording"))("link",O(6,Sn))("count",e.days?e.days.length:0),r(3),v(e.days?4:-1)}}function Up(t,c){if(t&1&&(s(0,"li")(1,"a",11),p(2,"date"),b(3,"SvgIcon",68),s(4,"span"),u(5),p(6,"date"),s(7,"span",69),u(8),p(9,"date"),d()()()()),t&2){let e=c.$implicit;r(),C("routerLink",fe(13,Qd,Re(2,4,e,"dd-MM-y")))("routerLinkActive",O(15,te)),r(4),_(Re(6,7,e,"MMMM d")),r(3),_(Re(9,10,e,"EE, y"))}}function Wp(t,c){if(t&1&&(s(0,"ul",65),Pe(1,Up,10,16,"li",null,qe),d()),t&2){let e=x(2);r(),Oe(e.days.slice(0,5))}}function Kp(t,c){if(t&1&&(s(0,"li",10)(1,"Submenu",71,3),p(3,"translate"),f(4,Wp,3,0,"ul",65),d()()),t&2){let e=x();r(),C("title",h(3,3,"nav.dayOverview"))("count",e.days?e.days.length:0),r(3),v(e.days?4:-1)}}function Qp(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.sections.analysis")))}function Jp(t,c){t&1&&(s(0,"li")(1,"a",72),b(2,"SvgIcon",73),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(6,Jd))("routerLinkActive",O(7,te))("routerLinkActiveOptions",O(8,Ic)),r(3),_(h(5,4,"nav.analytics")))}function Yp(t,c){t&1&&(s(0,"li")(1,"a",72),b(2,"SvgIcon",74),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(6,Yd))("routerLinkActive",O(7,te))("routerLinkActiveOptions",O(8,Ic)),r(3),_(h(5,4,"nav.markers")))}function Xp(t,c){if(t&1&&(s(0,"div",76),u(1),d()),t&2){let e=x(2);r(),_(e.watchlistStatistics.unread)}}function Zp(t,c){if(t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",75),s(3,"span"),u(4),p(5,"translate"),d(),f(6,Xp,2,1,"div",76),d()()),t&2){let e=x();r(),C("routerLink",O(6,Xd))("routerLinkActive",O(7,te)),r(3),_(h(5,4,"nav.watchlist")),r(2),v(e.watchlistStatistics&&e.watchlistStatistics.unread?6:-1)}}function e0(t,c){t&1&&(s(0,"div",76),u(1),d()),t&2&&(r(),_(c.total))}function t0(t,c){if(t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",77),s(3,"span"),u(4),p(5,"translate"),d(),f(6,e0,2,1,"div",76),p(7,"async"),d()()),t&2){let e,n=x();r(),C("routerLink",O(8,Zd))("routerLinkActive",O(9,te)),r(3),_(h(5,4,"nav.cases")),r(2),v((e=h(7,6,n.taskStatistics$))?6:-1,e)}}function i0(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.sections.integrations")))}function n0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",78),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,ep))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.alerts")))}function a0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",79),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,tp))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.channels")))}function r0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",80),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,ip))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.workflows")))}function o0(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.sections.management")))}function s0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",81),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,np))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.input
1sOutputs")))}function l0(t,c){if(t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",82),s(3,"span"),u(4),p(5,"translate"),d(),s(6,"div",76),u(7),d()()()),t&2){let e=x();r(),C("routerLink",O(7,ap))("routerLinkActive",O(8,te)),r(3),_(h(5,5,"nav.devices")),r(3),Nt("",e.activeCameras,"/",e.cameras.length)}}function c0(t,c){if(t&1&&(s(0,"li")(1,"a",85),b(2,"SvgIcon",86),s(3,"span"),u(4),d()()()),t&2){let e=c.$implicit;r(),C("routerLink",fe(2,op,e.id)),r(3),_(e.name)}}function d0(t,c){if(t&1&&(s(0,"li")(1,"Submenu",83),p(2,"translate"),s(3,"ul",65)(4,"li")(5,"a",70),b(6,"SvgIcon",84),s(7,"span"),u(8),p(9,"translate"),d()()(),Pe(10,c0,5,4,"li",null,qe),d()()()),t&2){let e=x();r(),C("title",h(2,4,"pages.sites.header"))("count",e.sites.length),r(4),C("routerLink",O(8,rp)),r(3),_(h(9,6,"pages.sites.all")),r(2),Oe(e.sites)}}function p0(t,c){if(t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",87),s(3,"span"),u(4),p(5,"translate"),d(),s(6,"div",76),u(7),d()()()),t&2){let e=x();r(),C("routerLink",O(6,sp))("routerLinkActive",O(7,te)),r(3),_(h(5,4,"labels.Groups")),r(3),_(e.groups.length)}}function h0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",88),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,lp))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.accounts")))}function u0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",89),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,cp))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.roles")))}function m0(t,c){t&1&&(s(0,"li")(1,"a",11),b(2,"SvgIcon",90),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(),C("routerLink",O(5,dp))("routerLinkActive",O(6,te)),r(3),_(h(5,3,"nav.audit")))}function g0(t,c){t&1&&(s(0,"a",11),b(1,"SvgIcon",34),s(2,"span"),u(3),p(4,"translate"),d()()),t&2&&(C("routerLink",O(5,pp))("routerLinkActive",O(6,te)),r(3),_(h(4,3,"nav.settings")))}function f0(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.sections.subscription")))}function v0(t,c){if(t&1&&(s(0,"div",93),p(1,"translate"),b(2,"ProgressBar",94),s(3,"div",95),u(4),p(5,"translate"),d()()),t&2){let e=x(3);C("matTooltip",h(1,3,"nav.dataUploaded")),r(2),C("progress",e.usagePercent),r(2),R(" ",Re(5,5,"nav.dailyLimit",Nn(8,up,e.usagePercent,e.usage,e.maxUsage))," ")}}function _0(t,c){if(t&1&&(s(0,"div",92),f(1,v0,6,12,"div",93),d()),t&2){let e=x(2);r(),v(e.subscription&&e.subscription.plan&&e.subscription.plan.stripe_plan!==""?1:-1)}}function b0(t,c){if(t&1&&(s(0,"ul",9)(1,"li")(2,"a",11),b(3,"SvgIcon",91),s(4,"span"),u(5),p(6,"translate"),d()(),f(7,_0,2,1,"div",92),d()()),t&2){let e=x();r(2),C("routerLink",O(6,hp))("routerLinkActive",O(7,te)),r(3),_(h(6,4,"nav.plansIntegrations")),r(2),v(e.isPrivate?-1:7)}}function C0(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.sections.helpSupport")))}function x0(t,c){t&1&&(s(0,"li")(1,"a",98),b(2,"SvgIcon",99),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(4),_(h(5,1,"nav.documentation")))}function S0(t,c){t&1&&(s(0,"li")(1,"a",100),b(2,"SvgIcon",101),s(3,"span"),u(4),p(5,"translate"),d()()()),t&2&&(r(4),_(h(5,1,"nav.github")))}function y0(t,c){if(t&1&&(s(0,"ul",9)(1,"li")(2,"a",96),b(3,"SvgIcon",97),s(4,"span"),u(5),p(6,"translate"),d()()(),f(7,x0,6,3,"li"),f(8,S0,6,3,"li"),d()),t&2){let e=x();r(2),C("href",e.config.newApiUrl+"/swagger/index.html",Ee),r(3),_(h(6,4,"nav.swaggerDocs")),r(2),v(e.user&&e.user.role_level>3?7:-1),r(),v(e.user&&e.user.role_level>3?8:-1)}}function w0(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"nav.sections.helpSupport")))}function k0(t,c){if(t&1&&(s(0,"li")(1,"a",96),b(2,"SvgIcon",99),s(3,"span"),u(4),d()()()),t&2){let e=x(2);r(),C("href",e.config.navigationLinkUrl1,Ee),r(3),_(e.config.navigationLinkTitle1)}}function M0(t,c){if(t&1&&(s(0,"li")(1,"a",96),b(2,"SvgIcon",99),s(3,"span"),u(4),d()()()),t&2){let e=x(2);r(),C("href",e.config.navigationLinkUrl2,Ee),r(3),_(e.config.navigationLinkTitle2)}}function E0(t,c){if(t&1&&(s(0,"li")(1,"a",96),b(2,"SvgIcon",99),s(3,"span"),u(4),d()()()),t&2){let e=x(2);r(),C("href",e.config.navigationLinkUrl3,Ee),r(3),_(e.config.navigationLinkTitle3)}}function P0(t,c){if(t&1&&(s(0,"li")(1,"a",96),b(2,"SvgIcon",99),s(3,"span"),u(4),d()()()),t&2){let e=x(2);r(),C("href",e.config.navigationLinkUrl4,Ee),r(3),_(e.config.navigationLinkTitle4)}}function O0(t,c){if(t&1&&(s(0,"li")(1,"a",96),b(2,"SvgIcon",99),s(3,"span"),u(4),d()()()),t&2){let e=x(2);r(),C("href",e.config.navigationLinkUrl5,Ee),r(3),_(e.config.navigationLinkTitle5)}}function I0(t,c){if(t&1&&(s(0,"ul",9),f(1,k0,5,2,"li"),f(2,M0,5,2,"li"),f(3,E0,5,2,"li"),f(4,P0,5,2,"li"),f(5,O0,5,2,"li"),d()),t&2){let e=x();r(),v(e.config&&e.config.navigationLinkTitle1!==""?1:-1),r(),v(e.config&&e.config.navigationLinkTitle2!==""?2:-1),r(),v(e.config&&e.config.navigationLinkTitle3!==""?3:-1),r(),v(e.config&&e.config.navigationLinkTitle4!==""?4:-1),r(),v(e.config&&e.config.navigationLinkTitle5!==""?5:-1)}}function T0(t,c){t&1&&(s(0,"p",8),u(1),p(2,"translate"),d(),s(3,"ul",102)(4,"li",103),b(5,"LanguageSwitcher"),d()()),t&2&&(r(),_(h(2,1,"common.language")))}function A0(t,c){if(t&1&&(s(0,"span"),u(1),d()),t&2){let e=x();r(),_(e.user.domain)}}var Ai=(()=>{class t{constructor(e,n,i,o,a){this.store=e,this.router=n,this.organisationsService=i,this.projectsService=o,this.toastService=a,this.config={},this.isPrivate=!1,this.user$=this.store.select(ki),this.user={username:"",email:"",emailShort:"",domain:"",custom_role:"",role:"",role_level:0,permissions:{pages:[]}},this.pagePermissions=[],this.maxUsage=3e3,this.cameras=[],this.cameras$=this.store.select(ua),this.sites$=this.store.select(qs),this.sites=[],this.groups$=this.store.select(Gs),this.groups=[],this.tasks$=this.store.select(Qs),this.tasks=[],this.taskStatistics$=this.store.select(Js),this.watchlist$=this.store.select(tl),this.watchlistStatistics={},this.cameraAnalytics$=this.store.select(ma),this.subscription$=this.store.select(ii),this.days$=this.store.select(ns),this.activeCameras=0,this.totalCameras=0,this.activeGroups=0,this.totalGroups=0,this.subscriptionStatus="no-plan",this.levels=li,this.organisations=[],this.currentOrganisation=null,this.draftOrganisation=null,this.contextMenuOpen=!1,this.createOrganisationModalOpen=!1,this.organisationsLoading=!1,this.currentOrganisationLoading=!1,this.organisationLoadFailed=!1,this.organisationActionPending=!1,this.organisationSearch="",this.projects=[],this.currentProject=null,this.createProjectMod
1alOpen=!1,this.projectsPending=!1,this.projectsLoading=!1,this.projectLoadFailed=!1,this.projectActionPending=!1,this.projectSearch="",this.organisationColumnWidth=200,this.organisationColumnResizing=!1,this.organisationColumnResizeStartX=0,this.organisationColumnResizeStartWidth=200,this.organisationColumnMinWidth=180,this.projectColumnMinWidth=240,this.columnResizerWidth=8,this.projectLoadingDelayMs=250,this.projectLoadSubscription=null,this.projectLoadingTimer=null,this.cancelDeferredNavigationLoad=null,this.navigationDataLoadStarted=!1,this.closeCreateProject=()=>{this.projectActionPending||(this.createProjectModalOpen=!1)},this.closeCreateOrganisation=()=>{this.organisationActionPending||(this.createOrganisationModalOpen=!1)}}ngOnInit(){this.config=H,this.isPrivate=H.privateEdition,this.cancelDeferredNavigationLoad=Ei(()=>this.loadDeferredNavigationData()),this.routerSubscription=this.router.events.subscribe(n=>{n instanceof ft&&n.url.indexOf("/media")===-1&&this.mediaSubmenu&&this.mediaSubmenu&&this.mediaSubmenu.collapse(),n instanceof ft&&n.url.indexOf("/day")===-1&&this.mediaSubmenu&&this.daySubmenu&&this.daySubmenu.collapse()}),this.sitesSubscription=this.sites$.subscribe(n=>{this.sites=Array.isArray(n)?n:[]}),this.groupsSubscription=this.groups$.subscribe(n=>{this.groups=Array.isArray(n)?n:[]}),this.watchlistSubscription=this.watchlist$.subscribe(n=>{this.watchlistStatistics=n||{}}),this.daysSubscription=this.days$.subscribe(n=>{this.days=Array.isArray(n)?n:[]}),this.cameraSubscription=this.cameras$.subscribe(n=>{this.cameras=Array.isArray(n)?n:[]}),this.cameraAnalyticsSubscription=this.cameraAnalytics$.subscribe(n=>{this.cameraAnalytics=n||{};let i=0;this.totalCameras=0;for(let o of Object.keys(this.cameraAnalytics)){let a=this.cameraAnalytics[o];if(!Array.isArray(a)||a.length===0)continue;let g=a[a.length-1].timestamp;i=Math.floor(Date.now()/1e3)-g<180?i+1:i,this.totalCameras+=1}this.activeCameras=i});let e=[this.user$,this.subscription$];this.subscriptionSubscription=Pt(e).subscribe(n=>{let i=n[0];if(i){let a=i.domain!==""?i.username.replace(i.domain+"@",""):i.username;this.user=j(L({},i),{username:a,emailShort:i.email.split("@")[0]}),this.pagePermissions=this.user.permissions&&Array.isArray(this.user.permissions.pages)?this.user.permissions.pages:[],this.usage=0,this.usagePercent=0,this.maxUsage=1e3,this.gravatarSize=200,this.gravatar="https://www.gravatar.com/avatar/"+ts.hashStr(this.user.email)+"?s="+this.gravatarSize+"&d=mm"}let o=n[1];if(o){this.subscription=o;let a=o.settings;if(o.plan==null?this.subscriptionStatus="no-plan":o.plan&&o.plan.ends_at==null&&o.reachedLimit==!1?this.subscriptionStatus="active":o.plan&&o.plan.ends_at!=null?this.subscriptionStatus="cancelled":o.plan&&o.plan.ends_at==null&&o.reachedLimit==!0&&(this.subscriptionStatus="reached-limit"),this.subscription&&a&&this.user&&this.subscription.plan){let l=a[this.subscription.plan.stripe_plan];this.user.custom_usage_limit>0?this.maxUsage=this.user.custom_usage_limit/1e3:l&&(this.maxUsage=l.usage/1e3)}if(Array.isArray(this.subscription.activity)&&this.maxUsage>0){let l=this.subscription.activity;if(l&&l.length>0){let m=l[l.length-1].usage/(1e3*1e3*1e3);this.usage=m.toFixed(2),this.usagePercent=Math.floor(m/this.maxUsage*100)}}}})}ngOnDestroy(){this.cameraSubscription&&this.cameraSubscription.unsubscribe(),this.cameraAnalyticsSubscription&&this.cameraAnalyticsSubscription.unsubscribe(),this.subscriptionSubscription&&this.subscriptionSubscription.unsubscribe(),this.sitesSubscription&&this.sitesSubscription.unsubscribe(),this.groupsSubscription&&this.groupsSubscription.unsubscribe(),this.daysSubscription&&this.daysSubscription.unsubscribe(),this.watchlistSubscription&&this.watchlistSubscription.unsubscribe(),this.routerSubscription&&this.routerSubscription.unsubscribe(),this.projectLoadSubscription&&this.projectLoadSubscription.unsubscribe(),this.cancelDeferredNavigationLoad?.(),this.cancelDeferredNavigationLoad=null,this.clearProjectLoadingTimer()}logout(e){e&&(e.preventDefault(),e.stopPropagation()),this.store.dispatch(new $t),this.store.dispatch(new Wt),this.store.dispatch(new si),this.store.dispatch(new ni),this.store.dispatch(new ti),this.store.dispatch(new ai)}toggleOrganisationMenu(e){if(e.preventDefault(),e.stopPropagation(),!this.canOpenContextMenu())return;(!this.currentOrganisation||this.projects.length===0)&&this.loadDeferredNavigationData();let n=!this.contextMenuOpen;this.contextMenuOpen=n,n?(this.draftOrganisation=this.currentOrganisation,this.currentOrganisation&&this.config.featureProjectsEnabled!==!1&&!this.projectsPending&&(this.projects.length===0||this.projectLoadFailed)&&this.loadProjects(this.currentOrganisation.id,!0)):this.clearContextSearch()}closeOrganisationMenu(){this.closeContextMenus()}
1closeContextMenuFromKeyboard(){this.contextMenuOpen&&(this.closeContextMenus(),this.contextTrigger.nativeElement.focus())}toggleProjectMenu(e){this.toggleOrganisationMenu(e)}startOrganisationColumnResize(e){if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=e.currentTarget,i=n.previousElementSibling;if(this.organisationColumnResizing=!0,this.organisationColumnResizeStartX=e.clientX,this.organisationColumnResizeStartWidth=i?i.getBoundingClientRect().width:this.organisationColumnWidth,n&&typeof n.setPointerCapture=="function")try{n.setPointerCapture(e.pointerId)}catch(o){}}resizeOrganisationColumn(e){this.organisationColumnResizing&&(e.preventDefault(),e.stopPropagation(),this.setOrganisationColumnWidth(this.organisationColumnResizeStartWidth+e.clientX-this.organisationColumnResizeStartX))}finishOrganisationColumnResize(e){if(!this.organisationColumnResizing)return;e.preventDefault(),e.stopPropagation(),this.organisationColumnResizing=!1;let n=e.currentTarget;if(n&&typeof n.releasePointerCapture=="function")try{n.releasePointerCapture(e.pointerId)}catch(i){}}resizeOrganisationColumnFromKeyboard(e){let n=null;e.key==="ArrowLeft"?n=this.organisationColumnWidth-10:e.key==="ArrowRight"?n=this.organisationColumnWidth+10:e.key==="Home"?n=this.organisationColumnMinWidth:e.key==="End"&&(n=this.organisationColumnMaxWidth()),n!==null&&(e.preventDefault(),e.stopPropagation(),this.setOrganisationColumnWidth(n))}organisationColumnMaxWidth(){let e=this.contextSurface&&this.contextSurface.nativeElement?this.contextSurface.nativeElement.clientWidth:560;return Math.max(this.organisationColumnMinWidth,Math.floor(e-this.projectColumnMinWidth-this.columnResizerWidth))}setOrganisationColumnWidth(e){this.organisationColumnWidth=Math.round(Math.max(this.organisationColumnMinWidth,Math.min(this.organisationColumnMaxWidth(),e)))}openCreateProject(e){e.preventDefault(),e.stopPropagation(),!(this.config.featureOrganisationsEnabled===!1||this.config.featureProjectsEnabled===!1||!this.config.featureProjectSwitcherEnabled||!this.config.featureProjectCreationEnabled||!this.canCreateProjectInDraftOrganisation())&&(this.contextMenuOpen=!1,this.clearContextSearch(),this.createProjectModalOpen=!0)}selectProject(e,n){n&&(n.preventDefault(),n.stopPropagation());let i=this.draftOrganisation,o=i&&this.currentOrganisation&&i.id===this.currentOrganisation.id&&this.currentProject&&e&&e.id===this.currentProject.id;if(this.config.featureOrganisationsEnabled===!1||this.config.featureProjectsEnabled===!1||!this.config.featureProjectSwitcherEnabled||!i||!e||this.organisationActionPending||this.projectActionPending||o){this.contextMenuOpen=!1,this.clearContextSearch();return}this.organisationActionPending=!0,this.projectActionPending=!0,this.projectsService.setCurrentWorkspace(i.id,e.id).subscribe(a=>{if(!a||!a.token){this.organisationActionPending=!1,this.projectActionPending=!1,this.toastService.error("Workspace switch failed","The selected workspace could not be opened.",5e3,null);return}this.store.dispatch(new Yi(a.token)),window.location.reload()},()=>{this.organisationActionPending=!1,this.projectActionPending=!1,this.toastService.error("Workspace switch failed","The selected workspace could not be opened.",5e3,null)})}createProject(e){this.config.featureOrganisationsEnabled===!1||this.config.featureProjectsEnabled===!1||!this.config.featureProjectSwitcherEnabled||!this.config.featureProjectCreationEnabled||!this.canCreateProjectInDraftOrganisation()||!e||!e.name||!e.slug||this.projectActionPending||(this.projectActionPending=!0,this.projectsService.createProject(e).subscribe(n=>{if(!n){this.projectActionPending=!1;return}this.projects=this.projects.concat([n]),this.projectActionPending=!1,this.createProjectModalOpen=!1,this.selectProject(n)},n=>{this.projectActionPending=!1,this.toastService.error("Project creation failed",n&&n.status===409?"That slug is already in use or reserved. Choose another one.":"The project could not be created.",5e3,null)}))}closeContextMenus(){this.contextMenuOpen=!1,this.draftOrganisation=this.currentOrganisation,this.projectLoadSubscription&&(this.projectLoadSubscription.unsubscribe(),this.projectLoadSubscription=null),this.projectsPending=!1,this.projectsLoading=!1,this.clearProjectLoadingTimer(),this.clearContextSearch()}openWorkspaceSettings(e){e&&(e.preventDefault(),e.stopPropagation()),this.canManageOrganisationSettings()&&(this.contextMenuOpen=!1,this.clearContextSearch(),this.router.navigate(["/workspace"]),this.closeMenu&&this.closeMenu())}canManageOrganisationSettings(){return this.config.featureOrganisationsEnabled!==!1&&this.config.featureOrganisationSettingsEnabled!==!1&&!!this.user&&(this.user.role==="owner"||this.user.role==="admin")}openCreateOrganisation(e){e.preventDefault(),e.stopPropagation(),!(this.config.featureOrganisationsEnabled===!1||!this.config.featureOrganisationSwitcherEnabled||!this.config.featureOrganisationCreationEnabled)&&(this.contextMenuOpen=!1,this.clearContextSearch(),this.createOrganisationModalOpen=!0)}selectOrganisation(e,n){if(n&&(n.preventDefault(),n.stopPropagation()),!(this.config.featureOrganisationsEnabled===!1||!this.config.featureOrganisationSwitcherEnabled||!e||this.organisationActionPending||this.projectActionPending||this.draftOrganisation&&e.id===this.draftOrganisation.id)){if(this.config.featureProjectsEnabled===!1||!this.config.featureProjectSwitcherEnabled){this.selectOrganisationDefaultProject(e);return}this.draftOrganisation=e,this.projectSearch="",this.loadProjects(e.id,!!this.currentOrganisation&&e.id===this.currentOrganisation.id)}}selectOrganisationDefaultProject(e){this.organisationActionPending=!0,this.organisationsService.setCurrentOrganisation(e.id).subscribe(n=>{if(!n||!n.token){this.organisationActionPending=!1,this.toastService.error("Organisation switch failed","The selected organisation could not be opened.",5e3,null);return}this.store.dispatch(new Yi(n.token)),window.location.reload()},()=>{this.organisationActionPending=!1,this.toastService.error("Organisation switch failed","The selected organisation could not be opened.",5e3,null)})}createOrganisation(e){this.config.featureOrganisationsEnabled===!1||!this.config.featureOrganisationSwitcherEnabled||!this.config.featureOrganisationCreationEnabled||!e||!e.name||this.organisationActionPending||(this.organisationActionPending=!0,this.organisationsService.createOrganisation(e).subscribe(n=>{if(!n){this.organisationActionPending=!1;return}this.organisations=this.organisations.concat([n]),this.organisationActionPending=!1,this.createOrganisationModalOpen=!1,this.selectOrganisation(n)},()=>{this.organisationActionPending=!1,this.toastService.error("Organisation creation failed","The organisation could not be created.",5e3,null)}))}organisationInitial(e){let n=e&&e.name?e.name.trim():"";return n?n.charAt(0).toUpperCase():"O"}organisationDisplayName(){let e=this.currentOrganisation&&this.currentOrganisation.name?this.currentOrganisation.name.trim():"";return e||this.organisationOwnerUsernameFallback()}currentOrganisationInitial(){let e=this.organisationDisplayName();return e?e.charAt(0).toUpperCase():"O"}organisationOwnerUsernameFallback(){return this.organisationsLoading||this.currentOrganisationLoading||this.organisationLoadFailed||this.organisations.length>0?"":this.user&&this.user.username?this.user.username.trim():""}organisationStatusKey(){return this.organisationsLoading||this.currentOrganisationLoading?"nav.organisations.loading":this.organisationLoadFailed?"nav.organisations.unavailable":this.organisations.length>0?"nav.organisations.select":"nav.organisations.none"}projectDisplayName(){return this.currentProject&&this.currentProject.name?this.currentProject.name.trim():""}projectInitial(e){let n=e&&e.name?e.name.trim():"";return n?n.charAt(0).toUpperCase():"P"}projectStatusKey(){return this.projectsLoading?"nav.projects.loading":this.projectLoadFailed?"nav.projects.unavailable":"nav.projects.empty"}filteredOrganisations(){let e=this.organisationSearch.trim().toLowerCase();return e?this.organisations.filter(n=>[n.name,n.slug].some(i=>!!i&&i.toLowerCase().includes(e))):this.organisations}filteredProjects(){let e=this.projectSearch.trim().toLowerCase();return e?this.projects.filter(n=>[n.name,n.slug,n.description].some(i=>!!i&&i.toLowerCase().includes(e))):this.projects}isDraftOrganisation(e){return!!this.draftOrganisation&&this.draftOrganisation.id===e.id}isProjectSelectedInDraft(e){return!!this.draftOrganisation&&!!this.currentOrganisation&&this.draftOrganisation.id===this.currentOrganisation.id&&!!this.currentProject&&this.currentProject.id===e.id}canCreateProjectInDraftOrganisation(){return!!this.draftOrganisation&&!!this.currentOrganisation&&this.draftOrganisation.id===this.currentOrganisation.id}canOpenContextMenu(){return this.config.featureOrganisationsEnabled!==!1&&(!!this.config.featureOrganisationSwitcherEnabled||this.config.featureProjectsEnabled!==!1&&!!this.config.featureProjectSwitcherEnabled)}clearContextSearch(){this.organisationSearch="",this.projectSearch=""}loadOrganisations(){if(this.config.featureOrganisationsEnabled!==!1){if(this.currentOrganisationLoading=!0,this.organisationLoadFailed=!1,this.config.featureOrganisationSwitcherEnabled){this.organisationsLoading=!0,this.organisationsService.getOrganisations().subscribe(e=>{this.organisations=e,this.organisationsLoading=!1;let n=e.find(i=>i.id===this.user?.organisationId);if(n||e.length===0){this.setCurrentOrganisation(n||null);return}this.loadCurrentOrganisation()},()=>{this.organisationsLoading=!1,this.organisationLoadFailed=!0,this.loadCurrentOrganisation()});return}this.loadCurrentOrganisation()}}loadDeferredNavigationData(){this.navigationDataLoadStarted||(this.navigationDataLoadStarted=!0,this.cancelDeferredNavigationLoad?.(),this.cancelDeferredNavigationLoad=null,this.loadOrganisations(),this.store.dispatch(new zs),this.store.dispatch(new Ys))}loadCurrentOrganisation(){this.organisationsService.getCurrentOrganisation().subscribe(e=>{this.setCurrentOrganisation(e)},e=>{this.setCurrentOrganisation(null),(!e||e.status!==404)&&(this.organisationLoadFailed=!0)})}setCurrentOrganisation(e){this.currentOrganisation=e,this.draftOrganisation=e,this.currentOrganisationLoading=!1,e&&this.config.featureProjectsEnabled!==!1&&this.loadProjects(e.id,!0)}loadProjects(e,n){this.projectLoadSubscription&&this.projectLoadSubscription.unsubscribe(),this.clearProjectLoadingTimer(),this.projects=[],this.projectsPending=!0,this.projectsLoading=!1,this.projectLoadFailed=!1,this.projectLoadingTimer=setTimeout(()=>{this.projectsPending&&(this.projectsLoading=!0),this.projectLoadingTimer=null},this.projectLoadingDelayMs);let i=this.projectsService.getProjects(e),o=()=>{this.projectsPending=!1,this.projectsLoading=!1,this.projectLoadFailed=!0,this.projectLoadSubscription=null,this.clearProjectLoadingTimer()};if(n){this.projectLoadSubscription=Ot({projects:i,currentProject:this.projectsService.getCurrentProject()}).subscribe(a=>{this.projects=a.projects,this.currentProject=a.currentProject,this.projectsPending=!1,this.projectsLoading=!1,this.projectLoadSubscription=null,this.clearProjectLoadingTimer()},o);return}this.projectLoadSubscription=i.subscribe(a=>{this.projects=a,this.projectsPending=!1,this.projectsLoading=!1,this.projectLoadSubscription=null,this.clearProjectLoadingTimer()},o)}clearProjectLoadingTimer(){this.projectLoadingTimer!==null&&(clearTimeout(this.projectLoadingTimer),this.projectLoadingTimer=null)}toMediaDateParam(e){if(!e)return null;if(e instanceof Date&&!isNaN(e.getTime()))return this.formatDate(e);if(typeof e=="string"){let n=e.trim();if(n.match(/^(\d{4})-(\d{2})-(\d{2})$/))return n;let o=n.match(/^(\d{2})-(\d{2})-(\d{4})$/);if(o){let l=new Date(Number(o[3]),Number(o[2])-1,Number(o[1]));return isNaN(l.getTime())?null:this.formatDate(l)}let a=new Date(n);return isNaN(a.getTime())?null:this.formatDate(a)}if(typeof e=="number"){let n=new Date(e);return isNaN(n.getTime())?null:this.formatDate(n)}return null}formatDate(e){let n=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${n}-${i}-${o}`}static{this.\u0275fac=function(n){return new(n||t)(G(me),G(He),G(gi),G(fi),G(di))}}static{this.\u0275cmp=he({type:t,selectors:[["navigation"]],viewQuery:function(n,i){if
1(n&1&&Rt(jd,5)(Bd,5)(qd,5)($d,5),n&2){let o;Ie(o=Te())&&(i.mediaSubmenu=o.first),Ie(o=Te())&&(i.daySubmenu=o.first),Ie(o=Te())&&(i.contextTrigger=o.first),Ie(o=Te())&&(i.contextSurface=o.first)}},hostBindings:function(n,i){n&1&&N("keydown.escape",function(){return i.closeContextMenuFromKeyboard()},Tn)},inputs:{closeMenu:"closeMenu"},standalone:!1,decls:55,vars:49,consts:[["contextSurface",""],["contextTrigger",""],["mediaSubmenu",""],["daySubmenu",""],[1,"side-navigation"],["clickOutside","",1,"organisation-switcher",3,"context-open"],[3,"open","pending"],[1,"side-navigation__scroll"],[1,"table-header"],[1,"nav"],[1,"dropdown"],[3,"routerLink","routerLinkActive"],[1,"profile-footer"],[1,"user",3,"routerLink","routerLinkActive"],[1,"photo",3,"src","alt"],[1,"user-info"],[1,"username"],[1,"role"],["type","button",1,"profile-footer__logout",3,"click","title"],["icon","logout"],["clickOutside","",1,"organisation-switcher",3,"clickOutside"],[1,"organisation-switcher__surface"],["type","button","aria-haspopup","dialog",1,"organisation-switcher__trigger",3,"click"],["aria-hidden","true",1,"organisation-switcher__marks"],[1,"organisation-switcher__mark"],[1,"organisation-switcher__project-mark"],[1,"organisation-switcher__copy"],[1,"organisation-switcher__label"],[1,"organisation-switcher__project-name"],["aria-hidden","true",1,"organisation-switcher__caret"],["icon","arrow-down-small-full"],["type","button",1,"organisation-switcher__settings","--context-header",3,"title"],["role","dialog",1,"organisation-switcher__menu"],["type","button",1,"organisation-switcher__settings","--context-header",3,"click","title"],["icon","settings"],[1,"organisation-switcher__columns"],[1,"organisation-switcher__column"],[1,"organisation-switcher__organisation-header"],[1,"organisation-switcher__section-title"],[1,"organisation-switcher__search"],[1,"organisation-switcher__loading"],["role","listbox"],["type","button",1,"organisation-switcher__create"],["icon","search"],["type","search",3,"ngModelChange","ngModel","placeholder"],[1,"organisation-switcher__empty"],["type","button","role","option",1,"organisation-switcher__item",3,"click","disabled"],["aria-hidden","true",1,"organisation-switcher__mark"],[1,"organisation-switcher__item-copy"],[1,"organisation-switcher__item-name"],["type","button",1,"organisation-switcher__create",3,"click"],["icon","plus"],["role","separator","tabindex","0","aria-orientation","vertical",1,"organisation-switcher__column-resizer",3,"pointerdown","pointermove","pointerup","pointercancel","keydown"],[1,"organisation-switcher__column","--projects"],[1,"organisation-switcher__project-header"],["type","button",1,"organisation-switcher__create","--header"],["type","button",1,"organisation-switcher__create","--header",3,"click"],["type","button","role","option",1,"organisation-switcher__item","organisation-switcher__project-item",3,"click","disabled"],[3,"close","organisationCreate","open","pending"],[3,"close","projectCreate","open","pending"],["icon","dashboard"],["icon","latest-events"],["icon","live-stream"],["icon","videowall"],["icon","media",3,"title","link","count"],[1,"sub-menu"],[1,"ellipsis"],[3,"routerLink","queryParams","routerLinkActive"],["icon","calendar"],[1,"text-light"],[3,"routerLink"],["icon","calendar",3,"title","count"],[3,"routerLink","routerLinkActive","routerLinkActiveOptions"],["icon","chart-bars"],["icon","marker"],["icon","newspaper"],[1,"badge"],["icon","tasks"],["icon","alerts"],["icon","channels"],["icon","share"],["icon","io"],["icon","camera"],["icon","sites",3,"title","count"],["icon","list"],[1,"dropdown-item",3,"routerLink"],["icon","sites"],["icon","deviceGroup"],["icon","accounts"],["icon","role"],["icon","activity"],["icon","subscription"],[1,"media-buffer"],["matTooltipPosition","above",1,"media-buffer-tooltip",3,"matTooltip"],[3,"progress"],[1,"information"],["target","_blank",3,"href"],["icon","api"],["href","https://doc.kerberos.io/hub/first-things-first/","target","_blank"],["icon","docs"],["href","https://github.com/kerberos-io/hub","target","_blank"],["icon","github"],[1,"nav","nav--language"],[1,"language-item"]],template:function(n,i){n&1&&(s(0,"nav",4),f(1,Lp,22,17,"div",5),f(2,Dp,1,2,"create-organisation-modal",6),f(3,Fp,1,2,"create-project-modal",6),s(4,"div",7),f(5,Rp,3,3,"p",8),s(6,"ul",9),f(7,Np,6,7,"li"),f(8,jp,6,7,"li"),f(9,Bp,6,7,"li"),f(10,qp,6,7,"li"),f(11,$p,6,7,"li"),f(12,zp,5,7,"li",10),f(13,Kp,5,5,"li",10),d(),f(14,Qp,3,3,"p",8),s(15,"ul",9),f(16,Jp,6,9,"li"),f(17,Yp,6,9,"li"),f(18,Zp,7,8,"li"),f(19,t0,8,10,"li"),d(),f(20,i0,3,3,"p",8),s(21,"ul",9),f(22,n0,6,7,"li"),f(23,a0,6,7,"li"),f(24,r0,6,7,"li"),d(),f(25,o0,3,3,"p",8),s(26,"ul",9),f(27,s0,6,7,"li"),f(28,l0,8,9,"li"),f(29,d0,12,9,"li"),f(30,p0,8,8,"li"),f(31,h0,6,7,"li"),f(32,u0,6,7,"li"),f(33,m0,6,7,"li"),s(34,"li"),f(35,g0,5,7,"a",11),d()(),f(36,f0,3,3,"p",8),f(37,b0,8,8,"ul",9),f(38,C0,3,3,"p",8),f(39,y0,9,6,"ul",9),f(40,w0,3,3,"p",8),f(41,I0,6,5,"ul",9),f(42,T0,6,3),d(),s(43,"div",12)(44,"div",13),b(45,"img",14),s(46,"div",15)(47,"div",16),u(48),d(),s(49,"small",17),f(50,A0,2,1,"span"),u(51),d()(),s(52,"button",18),p(53,"translate"),N("click",function(a){return i.logout(a)}),b(54,"SvgIcon",19),d()()()()),n&2&&(r(),v(i.config.featureOrganisationsEnabled!==!1?1:-1),r(),v(i.config.featureOrganisationsEnabled!==!1&&i.config.featureOrganisationSwitcherEnabled&&i.config.featureOrganisationCreationEnabled?2:-1),r(),v(i.config.featureOrganisationsEnabled!==!1&&i.config.featureProjectsEnabled!==!1&&i.config.featureProjectSwitcherEnabled&&i.config.featureProjectCreationEnabled?3:-1),r(2),v(i.pagePermissions.includes("dashboard")||i.pagePermissions.includes("latest-events")||i.pagePermissions.includes("latest-events")||i.pagePermissions.includes("live-view")||i.pagePermissions.includes("videowall")||i.pagePermissions.includes("recordings")?5:-1),r(2),v(i.pagePermissions.includes("dashboard")?7:-1),r(),v(i.pagePermissions.includes("latest-events")&&i.config.logo!="wdc"?8:-1),r(),v(i.pagePermissions.includes("latest-events")&&i.config.logo=="wdc"?9:-1),r(),v(i.pagePermissions.includes("live-view")?10:-1),r(),v(i.pagePermissions.includes("videowall")?11:-1),r(),v(i.pagePermissions.includes("recordings")?12:-1),r(),v(i.pagePermissions.includes("day-overview")?13:-1),r(),v(i.pagePermissions.includes("analytics")||i.pagePermissions.includes("watchlist")||i.pagePermissions.includes("tasks")?14:-1),r(2),v(i.pagePermissions.includes("analytics")?16:-1),r(),v(i.pagePermissions.includes("analytics")&&i.config.featureMarkersEnabled?17:-1),r(),v(i.pagePermissions.includes("watchlist")?18:-1),r(),v(i.pagePermissions.includes("tasks")&&i.config.featureCaseEnabled?19:-1),r(),v(i.user&&i.user.role_level>=3&&(i.pagePermissions.includes("alerts")||i.pagePermissions.includes("channels"))?20:-1),r(2),v(i.pagePermissions.includes("alerts")&&i.user&&i.user.role_level>=3?22:-1),r(),v(i.pagePermissions.includes("channels")&&i.user&&i.user.role_level>=3?23:-1),r(),v(i.config&&i.config.featureWorkflowsEnabled?24:-1),r(),v(i.pagePermissions.includes("cameras")||i.pagePermissions.includes("sites")||i.pagePermissions.includes("groups")||i.pagePermissions.includes("accounts")||i.pagePermissions.includes("roles")||i.pagePermissions.includes("ios")||i.user&&i.user.role_level>=3?25:-1),r(2),v(i.pagePermissions.includes("ios")?27:-1),r(),v(i.pagePermissions.includes("cameras")?28:-1),r(),v(i.pagePermissions.includes("sites")?29:-1),r(),v(i.pagePermissions.includes("groups")?30:-1),r(),v(i.pagePermissions.includes("accounts")&&i.user&&i.user.role_level>=3?31:-1),r(),v(i.pagePermissions.includes("roles")&&i.user&&i.user.role_level>=3?32:-1),r(),v(i.user&&i.user.role_level>=3&&i.config.featureAuditEnabled!==!1?33:-1),r(2),v(i.pagePermissions.includes("settings")?35:-1),r(),v(i.pagePermissions.includes("plans-integrations")&&i.user&&i.user.role_level>=3?36:-1),r(),v(i.pagePermissions.includes("plans-integrations")&&i.user&&i.user.role_level>=3?37:-1),r(),v(i.user&&i.user.role_level>3?38:-1),r(),v(i.user&&i.user.role_level>3?39:-1),r(),v(i.config&&i.config.navigationLinkTitle1!==""?40:-1),r(),v(i.config&&i.config.navigationLinkTitle1!==""?41:-1),r(),v(i.config.featureI18nEnabled?42:-1),r(2),C("routerLink",O(47,Vd))("routerLinkActive",O(48,te)),r(),C("alt",jt(i.user&&i.user.username))("src",i.gravatar,Ee),r(3),_(i.user&&i.user.username),r(2),v(i.user&&i.user.domain!==""&&i.config.multiTenant?50:-1),r(),R(" ",i.user&&i.user.custom_role!==""?i.user.custom_role:i.user.role," "),r(),C("title",h(53,45,"common.logout")))},dependencies:[qt,zn,il,We,Ke,Xn,al,De,rl,ol,Oi,Ii,Ti,jn,Bn,ve],styles:[`:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
1--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}:root .game2reel{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}:root .wdc{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){:root{--main-content-gutter: 48px}}body.dark-theme,html.dark-theme{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body,.sidebar-panel,.block,.card,nav,header,.mat-mdc-card,.mat-mdc-dialog-container{transition:background-color .3s ease,color .3s ease,border-color .3s ease}.side-navigation .organisation-switcher.context-open .organisation-switcher__surface{box-shadow:0 4px 34px #0000003d,0 3px 4px #0003}.app .sidebar:has(.organisation-switcher.context-open){z-index:20000}.side-navigation{display:flex;flex-direction:column;height:100%;min-height:0}.side-navigation__scroll{min-height:0;flex:1;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--bg) transparent;scrollbar-width:thin}.side-navigation .table-header{margin:24px 0 0}.side-navigation .organisation-switcher{box-sizing:border-box;position:relative;z-index:20001;flex:0 0 auto;min-height:71px;margin:12px calc(-1 * var(--sidebar-inline-gutter)) 0;padding:0 calc(var(--sidebar-inline-gutter) + 6px) 6px;border-bottom:1px solid var(--bg-muted);background:var(--card)}.side-navigation .organisation-switcher__surface{position:relative;box-sizing:border-box;width:100%;background:var(--card);display:flex;flex-direction:column}.side-navigation .organisation-switcher:not(.context-open) .organisation-switcher__surface{width:100%!important;height:auto!important}.side-navigation .organisation-switcher.context-open .organisation-switcher__surface{position:absolute;top:0;left:calc(var(--sidebar-inline-gutter) + 6px);z-index:20002;width:min(560px,100vw - 24px);min-width:480px;max-width:calc(100vw - 54px);min-height:245px;max-height:calc(var(--sidebar-viewport-height, 100vh) - 152px);overflow:hidden;border:0;border-radius:8px;background:var(--card);resize:both}.side-navigation .organisation-switcher.context-open .organisation-switcher__surface:before{content:"";position:absolute;inset:0;z-index:3;box-sizing:border-box;border:1px solid var(--bg-muted);border-radius:inherit;pointer-events:none}.side-navigation .organisation-switcher.context-open .organisation-switcher__surface:after{content:"";position:absolute;right:4px;bottom:4px;width:9px;height:9px;border-right:2px solid var(--text-light);border-bottom:2px solid var(--text-light);pointer-events:none}.side-navigation .organisation-switcher.context-open .organisation-switcher__trigger{border:0;border-radius:0;background:var(--card);box-shadow:none}.side-navigation .organisation-switcher.context-open .organisation-switcher__trigger:hover,.side-navigation .organisation-switcher.context-open .organisation-switcher__trigger:focus{border-color:var(--bg-muted);box-shadow:none}.side-navigation .organisation-switcher.context-open .organisation-switcher__caret{transform:rotate(180deg)}.side-navigation .organisation-switcher__project-mark{width:24px;height:24px;flex:0 0 24px;border:1px solid var(--bg-muted);border-radius:4px;color:var(--text-muted);display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700}.side-navigation .organisation-switcher__trigger{box-sizing:border-box;width:100%;min-width:0;min-height:64px;padding:9px;border:0;border-radius:6px;background:var(--card);color:var(--text);cursor:pointer;display:flex;align-items:center;gap:9px;text-align:left;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.side-navigation .organisation-switcher__trigger:hover,.side-navigation .organisation-switcher__trigger:focus{background:var(--card-muted);box-shadow:none;outline:none}.side-navigation .organisation-switcher__marks{position:relative;width:38px;height:38px;flex:0 0 38px}.side-navigation .organisation-switcher__marks .organisation-switcher__project-mark{position:absolute;right:-2px;bottom:-2px;width:20px;height:20px;flex-basis:20px;border:2px solid var(--card);background:var(--card-muted);color:var(--text);font-size:9px}.side-navigation .organisation-switcher__mark{width:36px;height:36px;flex:0 0 36px;
1display:inline-flex;align-items:center;justify-content:center;border-radius:4px;background:var(--card-muted);color:var(--text-muted);font-size:14px;font-weight:700}.side-navigation .organisation-switcher__copy{min-width:0;flex:1;display:flex;flex-direction:column;justify-content:center}.side-navigation .organisation-switcher__copy .organisation-switcher__label{overflow:hidden;color:var(--text-muted);font-size:11px;line-height:14px;text-overflow:ellipsis;white-space:nowrap}.side-navigation .organisation-switcher__copy strong{overflow:hidden;color:var(--text);font-size:13px;font-weight:600;letter-spacing:0;line-height:16px;text-overflow:ellipsis;white-space:nowrap}.side-navigation .organisation-switcher__project-name{overflow:hidden;color:var(--text-muted);font-size:11px;line-height:14px;text-overflow:ellipsis;white-space:nowrap}.side-navigation .organisation-switcher__caret{flex:0 0 auto;width:28px;height:44px;padding:0;border:0;border-radius:var(--radius);background:transparent;display:inline-flex;align-items:center;justify-content:center;color:var(--text-light);cursor:pointer;transition:transform .15s ease}.side-navigation .organisation-switcher__menu{box-sizing:border-box;width:100%;min-height:0;margin-top:6px;border-top:1px solid var(--bg-muted);flex:1;overflow:hidden;background:var(--card)}.side-navigation .organisation-switcher__menu ul{min-height:64px;margin:0;padding:6px 0;flex:1;overflow-y:auto;list-style:none;scrollbar-color:var(--bg-muted) transparent;scrollbar-width:thin}.side-navigation .organisation-switcher__settings{width:32px;height:32px;padding:0;border:1px solid var(--bg-muted);border-radius:4px;background:transparent;color:var(--text-muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.side-navigation .organisation-switcher__settings:hover,.side-navigation .organisation-switcher__settings:focus{border-color:var(--text-light);background:var(--card-muted);color:var(--text);outline:none}.side-navigation .organisation-switcher__settings SvgIcon,.side-navigation .organisation-switcher__settings svg-icon,.side-navigation .organisation-switcher__settings svgicon{width:16px;height:16px}.side-navigation .organisation-switcher__settings.--context-header{position:absolute;top:16px;right:52px;z-index:2;background:var(--card)}.side-navigation .organisation-switcher__columns{height:100%;min-height:0;display:grid;grid-template-columns:min(var(--organisation-column-width, 200px),100% - 248px) 8px minmax(240px,1fr)}.side-navigation .organisation-switcher__columns.column-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.side-navigation .organisation-switcher__column{min-width:0;min-height:0;display:flex;flex-direction:column}.side-navigation .organisation-switcher__column.--projects{background:var(--card)}.side-navigation .organisation-switcher__column-resizer{position:relative;z-index:2;width:8px;min-height:0;cursor:col-resize;touch-action:none}.side-navigation .organisation-switcher__column-resizer:before{content:"";position:absolute;top:12px;bottom:12px;left:3px;width:1px;background:var(--bg-muted);transition:background .15s ease,width .15s ease}.side-navigation .organisation-switcher__column-resizer:hover:before,.side-navigation .organisation-switcher__column-resizer:focus:before,.side-navigation .organisation-switcher__column-resizer.resizing:before{width:2px;background:var(--text-light)}.side-navigation .organisation-switcher__column-resizer:focus{outline:none}.side-navigation .organisation-switcher__organisation-header,.side-navigation .organisation-switcher__project-header{min-height:48px;padding-right:9px;display:flex;align-items:center;justify-content:space-between;gap:6px}.side-navigation .organisation-switcher__organisation-header .organisation-switcher__section-title,.side-navigation .organisation-switcher__project-header .organisation-switcher__section-title{min-width:0;flex:1}.side-navigation .organisation-switcher__organisation-header{min-height:48px;padding-right:0}.side-navigation .organisation-switcher__organisation-header .organisation-switcher__section-title{padding-inline:9px}.side-navigation .organisation-switcher__organisation-header .organisation-switcher__section-title>
1span{color:var(--text-light);font-size:12px;font-weight:400;line-height:24px}.side-navigation .organisation-switcher__section-title{min-height:36px;padding:0 12px;color:var(--text-muted);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;font-weight:700;text-transform:uppercase}.side-navigation .organisation-switcher__section-title small{flex:0 0 auto;padding:0 6px;border-radius:var(--radius);background:transparent;box-shadow:0 0 0 1px var(--bg-muted) inset;color:var(--text-light);font-size:12px;font-weight:500;line-height:24px;text-align:center}.side-navigation .organisation-switcher__search{height:34px;margin:0 9px 6px;padding:0 9px;border:1px solid var(--bg-muted);border-radius:4px;background:var(--card);display:flex;align-items:center;gap:6px}.side-navigation .organisation-switcher__search:focus-within{border-color:var(--hub);box-shadow:0 0 0 2px hsla(var(--hub-hsl),.1)}.side-navigation .organisation-switcher__search SvgIcon,.side-navigation .organisation-switcher__search svg-icon,.side-navigation .organisation-switcher__search svgicon{width:14px;height:14px;flex:0 0 14px;color:var(--text-light)}.side-navigation .organisation-switcher__search input{width:100%;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:12px}.side-navigation .organisation-switcher__search input::placeholder{color:var(--text-light)}.side-navigation .organisation-switcher__item{width:100%;min-height:44px;padding:6px 12px;border:0;background:transparent;color:var(--text-muted);display:flex;align-items:center;gap:12px;cursor:pointer;text-align:left}.side-navigation .organisation-switcher__item:hover,.side-navigation .organisation-switcher__item:focus{background:var(--card-muted);color:var(--text);outline:none}.side-navigation .organisation-switcher__item.selected{background:var(--card-muted);color:var(--text);box-shadow:inset 3px 0 0 var(--hub)}.side-navigation .organisation-switcher__item.selected .organisation-switcher__mark{border-color:var(--hub);background:var(--hub);color:#fff}.side-navigation .organisation-switcher__item.selected>SvgIcon,.side-navigation .organisation-switcher__item.selected>svg-icon,.side-navigation .organisation-switcher__item.selected>svgicon{color:var(--hub)}.side-navigation .organisation-switcher__item:disabled{cursor:wait;opacity:.65}.side-navigation .organisation-switcher__item .organisation-switcher__mark{width:24px;height:24px;flex-basis:24px;font-size:11px}.side-navigation .organisation-switcher__item>SvgIcon,.side-navigation .organisation-switcher__item>svg-icon,.side-navigation .organisation-switcher__item>svgicon{display:inline-flex;width:12px;height:12px;flex:0 0 12px}.side-navigation .organisation-switcher__project-item{width:calc(100% - 18px);min-height:52px;margin:0 9px 6px;padding:7.5px 9px;border:1px solid var(--bg-muted);border-radius:5px;background:var(--card)}.side-navigation .organisation-switcher__project-item:hover,.side-navigation .organisation-switcher__project-item:focus{border-color:var(--text-light);background:var(--card-muted);box-shadow:none}.side-navigation .organisation-switcher__project-item.selected{border-color:var(--bg-muted);background:var(--card-muted);box-shadow:inset 3px 0 0 var(--hub)}.side-navigation .organisation-switcher__item-name{min-width:0;flex:1;overflow:hidden;font-size:14px;text-overflow:ellipsis;white-space:nowrap}.side-navigation .organisation-switcher__item-copy{min-width:0;flex:1;display:flex;flex-direction:column}.side-navigation .organisation-switcher__item-copy small{overflow:hidden;color:var(--text-light);font-size:10px;line-height:13px;text-overflow:ellipsis;white-space:nowrap}.side-navigation .organisation-switcher__loading,.side-navigation .organisation-switcher__empty{padding:18px 24px;color:var(--text-light);font-size:13px;text-align:center}.side-navigation .organisation-switcher__create{width:100%;min-height:38px;padding:0 18px;border:0;border-top:1px solid var(--bg-muted);background:transparent;color:var(--text-muted);display:flex;align-items:center;gap:12px;cursor:pointer;font-size:13px;font-weight:600}.side-navigation .organisation-switcher__create:hover,.side-navigation .organisation-switcher__create:focus{background:var(--card-muted);color:var(--text);outline:none}.side-navigation .organisation-switcher__create SvgIcon,.side-navigation .organisation-switcher__create svg-icon,.side-navigation .organisation-switcher__create svgicon{display:inline-flex;width:16px;height:16px}.side-navigation .organisation-switcher__create.--header{width:auto;min-height:30px;padding:0 9px;border:1px solid var(--bg-muted);border-radius:4px;background:var(--card);flex:0 0 auto;gap:4.5px;font-size:11px}.side-navigation .organisation-switcher__create.--header:hover,.side-navigation .organisation-switcher__create.--header:focus{border-color:var(--text-light);background:var(--card-muted)}.side-navigation .organisation-switcher__create.--header SvgIcon,.side-navigation .organisation-switcher__create.--header svg-icon,.side-navigation .organisation-switcher__create.--header svgicon{width:13px;height:13px}@media(max-width:680px){.side-navigation .organisation-switcher.context-open .organisation-switcher__surface{width:100%!important;height:auto!important;min-width:0;min-height:0;max-height:none;resize:none}.side-navigation .organisation-switcher.context-open .organisation-switcher__surface:after{display:none}.side-navigation .organisation-switcher__menu{width:100%;max-height:calc(var(--sidebar-viewport-height, 100vh) - var(--mobile-header-height) - 152px);overflow-x:hidden;overflow-y:auto}.side-navigation .organisation-switcher__columns{grid-template-columns:minmax(0,1fr)}.side-navigation .organisation-switcher__column-resizer{display:none}.side-navigation .organisation-switcher__column.--projects{border-top:1px solid var(--bg-muted);border-left:0}.side-navigation .organisation-switcher__project-header{min-height:44px}.side-navigation .organisation-switcher__menu ul{max-height:180px}}.side-navigation .user{display:flex;align-items:center;gap:9px;padding:6px;box-sizing:border-box;width:100%;outline:none;cursor:pointer}.side-navigation .user.is-active{border-top-left-radius:30px;border-bottom-left-radius:30px}.side-navigation .user.is-active .photo{border-color:var(--hub)}.side-navigation .user.is-active .user-info .username{color:var(--hub)}.side-navigation .user.is-active small.role span{background:none;border:1px solid var(--hub);color:var(--hub)}.side-navigation .photo{flex-shrink:0;border-radius:50%;width:36px;border:2px solid transparent}.side-navigation .user-info{flex:1;min-width:0;overflow:hidden}
1.side-navigation .user-info a,.side-navigation .user-info a:hover,.side-navigation .user-info a:active{text-decoration:none}.side-navigation .user-info .username{font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-navigation .user-info small.role{font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-navigation .user-info small.role span{background-color:#eee;padding:1px 4px;border-radius:var(--radius);border:1px solid transparent}.side-navigation .profile-footer{flex:0 0 auto;box-sizing:border-box;margin-inline:calc(-1 * var(--sidebar-inline-gutter));padding:12px var(--sidebar-inline-gutter);border-top:1px solid var(--bg-muted);background:var(--card);box-shadow:0 -9px 16px -12px #00000059}.side-navigation .profile-footer__logout{width:28px;height:28px;flex:0 0 28px;padding:0;border:0;border-radius:var(--radius);background:transparent;color:var(--text-light);display:flex;justify-content:center;align-items:center;cursor:pointer}.side-navigation .profile-footer__logout:focus,.side-navigation .profile-footer__logout:hover{background:hsla(var(--text-hsl),.05);color:var(--alert);outline:none}.side-navigation .profile-footer__logout SvgIcon,.side-navigation .profile-footer__logout svg-icon,.side-navigation .profile-footer__logout svgicon{display:inline-flex;width:16px;height:16px}.side-navigation ul.nav{margin:8px 0 -6px;padding:0;list-style:none}.side-navigation ul.nav:last-of-type{padding-bottom:24px}.side-navigation ul.nav .text-light{color:var(--text-light)}.side-navigation ul.nav>li.dropdown{padding:0}.side-navigation ul.nav .ellipsis{padding:0}.side-navigation ul.nav .ellipsis a{justify-content:center}.side-navigation ul.nav a{padding:0 10px;margin:2px 0 0;display:flex;align-items:center;font-size:14px;line-height:34px;color:var(--text-light);text-decoration:none;border-radius:var(--radius)}.side-navigation ul.nav a span{flex:1;padding-left:10px;color:var(--text)}.side-navigation ul.nav a:hover,.side-navigation ul.nav a:focus{background:hsla(var(--text-hsl),.05)}.side-navigation ul.nav a.is-active{font-weight:600;background:hsla(var(--hub-hsl),.1)}.side-navigation ul.nav a.is-active span{color:var(--hub)}.side-navigation ul.nav a.is-active .icon *{fill:var(--hub)}.side-navigation ul.nav a.is-active .badge{color:var(--hub);font-weight:400;box-shadow:0 0 0 1px hsla(var(--hub-hsl),.5) inset}.side-navigation ul.nav a .menu-caret{flex:0;display:flex;cursor:pointer}.side-navigation ul.nav a .menu-caret *{fill:var(--text-light)}.side-navigation ul.nav a .menu-caret.open{transform:rotate(180deg)}.side-navigation ul.nav a .menu-caret.open *{fill:var(--hub)}.side-navigation ul.nav a .badge{flex:0;box-shadow:0 0 0 1px var(--bg-muted) inset;border-radius:var(--radius);font-size:12px;line-height:24px;color:var(--text-light);padding:0 6px}.side-navigation ul.nav Submenu{display:block}.side-navigation ul.nav ul.sub-menu{padding:6px 24px;margin:6px 0;list-style:none;background:var(--card-muted);box-shadow:inset 4px 0 0 var(--bg-muted),inset 12px 0 14px -8px #0000003d,inset 0 1px 0 var(--bg-muted),inset 0 -1px 0 var(--bg-muted)}.side-navigation ul.nav ul.sub-menu li{margin:2px 0 0}.side-navigation ul.nav .media-buffer{padding:18px 0 6px}.side-navigation ul.nav .media-buffer .information{text-align:center;width:100%;font-size:11px;line-height:36px;color:var(--text-light)}.side-navigation ul.nav .media-buffer .information span.percentage{color:var(--text-muted)}.side-navigation ul.nav--language li.language-item{padding:0}.side-navigation ul.nav--language li.language-item .language-switcher{display:block;width:100%}.side-navigation ul.nav--language li.language-item .language-switcher__toggle{width:100%;justify-content:space-between;padding:0 10px;margin:2px 0 0;height:34px;line-height:34px;font-size:14px;background:transparent;border:none;border-radius:var(--radius);color:var(--text);cursor:pointer}.side-navigation ul.nav--language li.language-item .language-switcher__toggle:hover,.side-navigation ul.nav--language li.language-item .language-switcher__toggle:focus{background:hsla(var(--text-hsl),.05);border-color:transparent}.side-navigation ul.nav--language li.language-item .language-switcher__code{color:var(--text-light);font-weight:600}.side-navigation ul.nav--language li.language-item .language-switcher__caret{color:var(--text-light)}.side-navigation ul.nav--language li.language-item .language-switcher.open .language-switcher__toggle{background:hsla(var(--hub-hsl),.1)}.side-navigation ul.nav--language li.language-item .language-switcher.open .language-switcher__toggle .language-switcher__code,.side-navigation ul.nav--language li.language-item .language-switcher.open .language-switcher__toggle .language-switcher__caret{color:var(--hub)}.side-navigation ul.nav--language li.language-item .language-switcher__menu{top:auto;left:0;right:0;bottom:calc(100% + 4px)} 2`],encapsulation:2})}}return t})();function F0(t,c){t&1&&(s(0,"a",2)(1,"div",5),u(2),p(3,"translate"),d()()),t&2&&(r(2),R(" ",h(3,1,"auto.home.blocks.sidebar.sidebar.k1")," "))}function R0(t,c){t&1&&(s(0,"a",2),b(1,"img",6)(2,"img",7)(3,"img",8),d())}function N0(t,c){t&1&&(s(0,"a",2),b(1,"img",9),d())}function j0(t,c){t&1&&(s(0,"a",2),b(1,"img",10),d())}function B0(t,c){t&1&&(s(0,"a",3),b(1,"img",11),d())}function q0(t,c){t&1&&(s(0,"a",2),b(1,"img",12),d())}function $0(t,c){if(t&1){let e=ie();s(0,"div",13),p(1,"translate"),N("click",function(){B(e);let i=x();return q(i.toggleDarkMode())}),s(2,"div",14),On(),s(3,"svg",15),b(4,"circle",16)(5,"path",17),d(),s(6,"svg",18),b(7,"path",19),d()()()}if(t&2){let e=x();de("dark",e.isDarkMode),C("title",h(1,3,e.isDarkMode?"app.darkMode.switchToLight":"app.darkMode.switchToDark"))}}var Di=(()=>{class t{constructor(e){this.themeService=e,this.isDarkMode=!1,this.featureDarkModeEnabled=!0,this.logoName=H.logo,this.featureDarkModeEnabled=H.featureDarkModeEnabled!==!1}ngOnInit(){this.themeSubscription=this.themeService.darkMode$.subscribe(e=>this.isDarkMode=e)}ngOnDestroy(){this.themeSubscription&&this.themeSubscription.unsubscribe()}toggleDarkMode(){this.themeService.toggleDarkMode()}static{this.\u0275fac=function(n){return new(n||t)(G(pi))}}static{this.\u0275cmp=he({type:t,selectors:[["sidebar"]],inputs:{closeMenu:"closeMenu"},standalone:!1,decls:10,vars:7,consts:[[1,"sidebar-panel"],[1,"brand"],[1,"brand-logo"],[1,"brand-logo","wdc"],[1,"theme-toggle",3,"dark","title"],[1,"name"],["src","/assets/custom/logo-sidebar.svg","alt","",2,"max-width","200px"],["src","/assets/custom/logo-sidebar.png","alt","",2,"max-width","200px"],["src","/assets/custom/logo-sidebar.jpg","alt","",2,"max-width","200px"],["src","../assets/images/logos/invista.jpg","width","130px","alt",""],["src","../assets/images/logos/game2reel.png","width","150px","alt",""],["src","../assets/images/logos/wdc-logo-black.svg","width","150px","alt",""],["src","../assets/images/logos/tesco.svg","width","100px","alt",""],[1,"theme-toggle",3,"click","title"],[1,"toggle-thumb"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"sun-icon"],["cx","12","cy","12","r","4","stroke","currentColor","stroke-width","2"],["d","M12 2V5M12 19V22M4 12H1M23 12H20M5.64 5.64L3.52 3.52M20.48 20.48L18.36 18.36M5.64 18.36L3.52 20.48M20.48 3.52L18.36 5.64","stroke","currentColor","stroke-width","2","stroke-linecap","round"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"moon-icon"],["d","M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,F0,4,3,"a",2),f(3,R0,4,0,"a",2),f(4,N0,2,0,"a",2),f(5,j0,2,0,"a",2),f(6,B0,2,0,"a",3),f(7,q0,2,0,"a",2),f(8,$0,8,5,"div",4),d(),b(9,"navigation"),d()),n&2&&(r(2),v(i.logoName===""?2:-1),r(),v(i.logoName==="custom"?3:-1),r(),v(i.logoName==="invista"?4:-1),r(),v(i.logoName==="game2reel"?5:-1),r(),v(i.logoName==="wdc"?6:-1),r(),v(i.logoName==="tesco"?7:-1),r(),v(i.featureDarkModeEnabled?8:-1))},dependencies:[Ai,ve],styles:["[_ngcontent-%COMP%]:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
2--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}[_ngcontent-%COMP%]:root .game2reel[_ngcontent-%COMP%]{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root .wdc[_ngcontent-%COMP%]{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){[_ngcontent-%COMP%]:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){[_ngcontent-%COMP%]:root{--main-content-gutter: 48px}}body.dark-theme[_ngcontent-%COMP%], html.dark-theme[_ngcontent-%COMP%]{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%], .block[_ngcontent-%COMP%], .card[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], header[_ngcontent-%COMP%], .mat-mdc-card[_ngcontent-%COMP%], .mat-mdc-dialog-container[_ngcontent-%COMP%]{transition:background-color .3s ease,color .3s ease,border-color .3s ease}.sidebar-panel[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;height:calc(var(--sidebar-viewport-height, 100vh) - var(--mobile-header-height) - 24px);min-height:0;overflow:hidden;padding-block:24px 0}@media only screen and (min-width:769px){.sidebar-panel[_ngcontent-%COMP%]{height:var(--sidebar-viewport-height, 100vh);overflow:visible}}.sidebar-panel[_ngcontent-%COMP%] navigation[_ngcontent-%COMP%]{display:block;min-height:0;flex:1}.sidebar-panel[_ngcontent-%COMP%] .brand[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%]{position:relative;cursor:pointer;width:36px;height:36px;flex-shrink:0;display:flex;align-items:center;justify-content:center}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%] .toggle-thumb[_ngcontent-%COMP%]{position:relative;width:36px;height:36px;background:#f8f8f8;border-radius:50%;transition:background-color .5s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;overflow:hidden}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%] .sun-icon[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%] .moon-icon[_ngcontent-%COMP%]{position:absolute;width:20px;height:20px;transition:all .5s cubic-bezier(.4,0,.2,1)}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%] .sun-icon[_ngcontent-%COMP%]{color:#333;opacity:1;transform:translateY(0) rotate(0)}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%] .moon-icon[_ngcontent-%COMP%]{color:#fff;opacity:0;transform:translateY(20px) rotate(-45deg)}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%]:hover .toggle-thumb[_ngcontent-%COMP%]{transform:scale(1.1);transition:transform .2s ease}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle[_ngcontent-%COMP%]:active .toggle-thumb[_ngcontent-%COMP%]{transform:scale(.95)}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle.dark[_ngcontent-%COMP%] .toggle-thumb[_ngcontent-%COMP%]{background:#2a2a2a}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle.dark[_ngcontent-%COMP%] .sun-icon[_ngcontent-%COMP%]{opacity:0;transform:translateY(20px) rotate(45deg)}.sidebar-panel[_ngcontent-%COMP%] .theme-toggle.dark[_ngcontent-%COMP%] .moon-icon[_ngcontent-%COMP%]{opacity:1;transform:translateY(0) rotate(0)}.sidebar-panel[_ngcontent-%COMP%] .brand-logo[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;font-family:Outfit;letter-spacing:2px}.sidebar-panel[_ngcontent-%COMP%] .brand-logo.wdc[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000}.sidebar-panel[_ngcontent-%COMP%] .brand-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:10px}.sidebar-panel[_ngcontent-%COMP%] .brand-logo[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:var(--text);font-weight:600;font-size:20px}.sidebar-panel[_ngcontent-%COMP%] .brand-logo[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .version[_ngcontent-%COMP%]{color:var(--text-light);font-size:12px;font-weight:400;margin-left:5px}"]})}}return t})();var H0=["appShell"],G0=["passphraseSlot"],z0=t=>({closed:t}),U0=t=>({error:t});function W0(t,c){if(t&1&&(s(0,"div"),u(1),p(2,"translate"),d()),t&2){let e=x();Fn(Rn("environment ",e.config.environment)),r(),Nt(" ",h(2,5,"app.environment"),": ",e.config.environment," ")}}function K0(t,c){if(t&1){let e=ie();s(0,"div",3,0)(2,"div",6),b(3,"sidebar"),d(),s(4,"div",7)(5,"div",8)(6,"label",9)(7,"input",10),N("change",function(){B(e);let i=x();return q(i.openMenu())}),d(),b(8,"SvgIcon",11),d()(),s(9,"div",12),b(10,"router-outlet"),d()()()}if(t&2){let e=x();r(2),C("ngClass",fe(3,z0,!e.showMenu)),r(6),C("icon",jt(e.showMenu?"cross":"menu"))}}function Q0(t,c){if(t&1){let e=ie();s(0,"input",27,1),p(2,"translate"),N("focus",function(){let i=B(e).$index,o=x(2);return q(o.onPassphraseFocus(i))})("blur",function(){B(e);let i=x(2);return q(i.onPassphraseBlur())})("input",function(i){let o=B(e).$index,a=x(2);return q(a.onPassphraseSlotInput(i,o))})("keydown",function(i){let o=B(e).$index,a=x(2);return q(a.onPassphraseSlotKeydown(i,o))})("paste",function(i){B(e);let o=x(2);return q(o.onPassphraseSlotPaste(i))}),d()}if(t&2){let e=c.$index,n=x(2);de("filled",n.passphraseCharacters[e])("active",n.focusedPassphraseIndex===e),C("value",n.passphraseCharacters[e]),_e("aria-label",h(2,6,"app.encryption.ariaCharacter")+" "+(e+1))}}function J0(t,c){t&1&&(s(0,"p",22),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"app.encryption.wrongPassphrase")))}function Y0(t,c){t&1&&(s(0,"p",22),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"app.encryption.incomplete")))}function X0(t,c){if(t&1){let e=ie();s(0,"div",4)(1,"div",13)(2,"div",14),b(3,"SvgIcon",15),d(),s(4,"h2",16),u(5),p(6,"translate"),d(),s(7,"p",17),u(8),p(9,"translate"),d(),s(10,"div",18)(11,"label",19),N("click",function(){B(e);let i=x();return q(i.focusPassphraseInput())}),Pe(12,Q0,3,8,"input",20,qe),d(),s(14,"p",21),u(15),p(16,"translate"),d(),f(17,J0,3,3,"p",22),f(18,Y0,3,3,"p",22),s(19,"label",23)(20,"input",24),N("mousedown",function(){B(e);let i=x();return q(i.preparePassphraseBlur())})("change",function(i){B(e);let o=x();return q(o.onRememberCodeChange(i))}),d(),s(21,"span"),u(22),p(23,"translate"),d()(),s(24,"button",25),N("mousedown",function(){B(e);let i=x();return q(i.preparePassphraseBlur())})("click",function(){B(e);let i=x();return q(i.verifyFingerprint())}),u(25),p(26,"translate"),d()(),s(27,"a",26),N("mousedown",function(){B(e);let i=x();return q(i.preparePassphraseBlur())})("click",function(){B(e);let i=x();return q(i.logout())}),u(28),p(29,"translate"),d()()()}if(t&2){let e=x();r(),de("shake",e.shakePassphrase),C("formGroup",e.encryptionForm),r(4),_(h(6,14,"app.encryption.title")),r(3),_(h(9,16,"app.encryption.copy")),r(2),C("ngClass",fe(26,U0,e.decryptionStatus==="wrong-passphrase"||e.decryptionStatus==="failed")),r(2),Oe(e.passphraseSlots),r(3),_(h(16,18,"app.encryption.hint")),r(2),v(e.decryptionStatus==="wrong-passphrase"?17:-1),r(),v(e.decryptionStatus==="failed"?18:-1),r(2),C("checked",e.rememberCode),r(2),_(h(23,20,"app.encryption.rememberCode")),r(2),C("disabled",e.encryptionForm.invali
2d),r(),R(" ",h(26,22,"app.encryption.unlock")," "),r(3),_(h(29,24,"app.encryption.switchAccount"))}}function Z0(t,c){t&1&&(s(0,"div",5)(1,"div",28),u(2),p(3,"translate"),d(),s(4,"div",29),u(5),p(6,"translate"),d(),s(7,"div",30),u(8),p(9,"translate"),d(),s(10,"div",31),u(11),p(12,"translate"),d()()),t&2&&(r(2),_(h(3,4,"auto.home.home.k1")),r(3),_(h(6,6,"auto.home.home.k2")),r(3),_(h(9,8,"auto.home.home.k3")),r(3),_(h(12,10,"auto.home.home.k4")))}var yn=(()=>{class t{set appShell(e){this.appShellElement=e?.nativeElement,this.scheduleSidebarViewportUpdate()}constructor(e,n,i,o,a,l,g,m,y,M,k){this.title=e,this._mqttService=n,this._mqttLegacyService=i,this.mqttService=o,this.router=a,this.store=l,this.homeStore=g,this.toastService=m,this.fb=y,this.ngZone=M,this.themeService=k,this.passphraseSlots=Array(4).fill(0),this.showMenu=!1,this.isReconnecting=!1,this.connectingSince=null,this.CONNECTING_STALE_MS=15e3,this.mqttListenerStarted=!1,this.mqttSubscriptionsStarted=!1,this.activeMqttCloudKey=null,this.motionEvents=new Bi,this.sdStreamEvents=new Bi,this.devices$=this.store.select(ha),this.livestream$=this.store.select(lo),this.detections$=this.store.select(Zo),this.lastMotionTimestamps=new Map,this.releasenotes$=this.store.select(Ec),this.subscription$=this.store.select(ii),this.levels=li,this.sidebarViewportHandler=()=>this.scheduleSidebarViewportUpdate(),this.profile$=this.store.select(Qo),this.fingerprint="",this.encryptedFingerprint="",this.public_key="",this.symmetric_key="",this.decryptionStatus="",this.encryptionOpened=!0,this.passphraseValue="",this.passphraseCharacters=Array(4).fill(""),this.focusedPassphraseIndex=-1,this.allowPassphraseBlur=!1,this.shakePassphrase=!1,this.rememberCode=!1,this.REMEMBER_CODE_TTL_MS=1440*60*1e3,this.appDataInitialized=!1,this.cancelDeferredShellLoad=null,this.isDarkMode=!1,this.config=H,this.alive=!0,this.showMenu=!1,this.showReleaseNotes=!1,this.interval=5e3,this.timer=It(this.interval,this.interval),this.openMenu=this.openMenu.bind(this),this.closeMenu=this.closeMenu.bind(this),this.stopMqttListener=this.stopMqttListener.bind(this),this.logout=this.logout.bind(this),this.closeEncryption=this.closeEncryption.bind(this),this.openEncryption=this.openEncryption.bind(this),this.encryptionForm=this.fb.group({passphrase:new Vt("",[W.required,W.pattern(/^\S{4}$/)])}),this.detectionsSubscription=this.detections$.subscribe(P=>{this.detections=Object.assign({},P),this.detections.devicesList&&(this.selectedCameras=this.detections.devicesList?this.detections.devicesList.map(A=>A.key):[])}),this.themeSubscription=this.themeService.darkMode$.subscribe(P=>{this.isDarkMode=P})}startMqttListener(){if(!this.cloudKey)return;let e=this.activeMqttCloudKey!==this.cloudKey;if(this.mqttListenerStarted&&!e)return;this.mqttListenerStarted&&e&&this.stopMqttListener(),this.mqttStateSubscription&&(this.mqttStateSubscription.unsubscribe(),this.mqttStateSubscription=null),this.mqttLegacyStateSubscription&&(this.mqttLegacyStateSubscription.unsubscribe(),this.mqttLegacyStateSubscription=null);let n=H.mqttProtocol;H.mqttLegacyServer!=""&&(this._mqttLegacyService.connect({protocol:n,hostname:H.mqttLegacyServer,port:H.mqttLegacyPort,username:this.cloudKey,clientId:this.cloudKey+this.makeid(3),path:null}),this.mqttLegacyStateSubscription=this._mqttLegacyService.state.subscribe()),this._mqttService.connect({protocol:n,hostname:H.mqttServer,port:H.mqttPort,username:H.mqttUsername,password:H.mqttPassword,clientId:this.cloudKey+this.makeid(5),path:"/mqtt"}),this.mqttStateSubscription=this._mqttService.state.subscribe(i=>{this.lastConnectionState=i,i===Ut.CONNECTING?this.connectingSince===null&&(this.connectingSince=Date.now()):this.connectingSince=null}),this.setupVisibilityHandler(),this.mqttListenerStarted=!0,this.activeMqttCloudKey=this.cloudKey}setupVisibilityHandler(){this.boundVisibilityHandler&&document.removeEventListener("visibilitychange",this.boundVisibilityHandler),this.boundVisibilityHandler=()=>{this.ngZone.run(()=>{document.visibilityState==="visible"&&this.checkAndReconnect()})},document.addEventListener("visibilitychange",this.boundVisibilityHandler)}
2checkAndReconnect(){if(this.isReconnecting||!this.cloudKey)return;let e=this.lastConnectionState===Ut.CONNECTING&&this.connectingSince!==null&&Date.now()-this.connectingSince>this.CONNECTING_STALE_MS;(this.lastConnectionState===Ut.CLOSED||this.lastConnectionState==null||e)&&this.reconnectMqtt()}reconnectMqtt(){this.isReconnecting=!0;try{this.cleanupMqttSubscriptions(),this.mqttService.clearTopicCache();let e=H.mqttProtocol;try{this._mqttService.disconnect()}catch(n){}if(H.mqttLegacyServer!="")try{this._mqttLegacyService.disconnect()}catch(n){}setTimeout(()=>{H.mqttLegacyServer!=""&&this._mqttLegacyService.connect({protocol:e,hostname:H.mqttLegacyServer,port:H.mqttLegacyPort,username:this.cloudKey,clientId:this.cloudKey+this.makeid(3),path:null}),this._mqttService.connect({protocol:e,hostname:H.mqttServer,port:H.mqttPort,username:H.mqttUsername,password:H.mqttPassword,clientId:this.cloudKey+this.makeid(5),path:"/mqtt"}),this.subscribeToMotion(),this.isReconnecting=!1},500)}catch(e){ia.error("[MQTT] Error during reconnection:",e),this.isReconnecting=!1}}cleanupMqttSubscriptions(){this.motionObservable&&(this.motionObservable.unsubscribe(),this.motionObservable=null),this.motionLegacyObservable&&(this.motionLegacyObservable.unsubscribe(),this.motionLegacyObservable=null),this.generalObservable&&(this.generalObservable.unsubscribe(),this.generalObservable=null),this.motionEventsSubscription&&(this.motionEventsSubscription.unsubscribe(),this.motionEventsSubscription=null),this.sdStreamEventsSubscription&&(this.sdStreamEventsSubscription.unsubscribe(),this.sdStreamEventsSubscription=null),this.lastMotionTimestamps.clear(),this.mqttSubscriptionsStarted=!1}stopMqttListener(){if(this.boundVisibilityHandler&&(document.removeEventListener("visibilitychange",this.boundVisibilityHandler),this.boundVisibilityHandler=null),this.mqttStateSubscription&&(this.mqttStateSubscription.unsubscribe(),this.mqttStateSubscription=null),this.mqttLegacyStateSubscription&&(this.mqttLegacyStateSubscription.unsubscribe(),this.mqttLegacyStateSubscription=null),this.cleanupMqttSubscriptions(),this._mqttService)try{this._mqttService.disconnect()}catch(e){}if(H.mqttLegacyServer!="")try{this._mqttLegacyService.disconnect()}catch(e){}this.mqttListenerStarted=!1,this.mqttSubscriptionsStarted=!1,this.activeMqttCloudKey=null,this.lastConnectionState=null,this.connectingSince=null,this.isReconnecting=!1}subscribeToMotion(){if(!this.cloudKey||this.mqttSubscriptionsStarted)return;if(H.mqttLegacyServer!=""){let i=this._mqttLegacyService.observe("kerberos/"+this.cloudKey+"/device/+/motion").pipe($i(o=>qi(2500))).subscribe(o=>{if(this.detections.enabled){let a=o.topic.split("/")[3];(this.detections.devicesAll||this.selectedCameras.includes(a))&&(this.blink("Motion detected - ",10),this.showNotification(a))}});this.motionLegacyObservable=i}let e=this._mqttService.observe("kerberos/"+this.cloudKey+"/device/+/motion").pipe($i(i=>qi(2500))).subscribe(i=>{if(this.detections.enabled){let o=i.topic.split("/")[3];(this.detections.devicesAll||this.selectedCameras.includes(o))&&(this.blink("Motion detected - ",10),this.showNotification(o))}});this.motionObservable=e,this.motionEventsSubscription=this.motionEvents.pipe(kn(i=>i.device_id),ne(i=>i.pipe(Pn(2500)))).subscribe(i=>{this.store.dispatch(new la(i))});let n=this.mqttService.subscribe("kerberos/hub/"+this.cloudKey,i=>{let o=i.payload;if(o.action==="motion"){if(this.detections.enabled){let a=o.device_id;(this.detections.devicesAll||this.selectedCameras.includes(a))&&(this.blink("Motion detected - ",10),this.showNotification(a))}this.motionEvents.next(o)}else if(o.action==="ptz-position")this.store.dispatch(new ra(o));else if(o.action==="receive-hd-candidates")this.store.dispatch(new Xi(o));else if(o.action==="receive-hd-answer")this.store.dispatch(new Xi(o));else if(o.action==="receive-config"){let{value:a}=o;this.store.dispatch(new oa(a))}else o.action==="acknowledge-update-config"&&setTimeout(()=>{this.store.dispatch(new sa)},1e3)});this.generalObservable=n,this.mqttSubscriptionsStarted=!0}ngOnInit(){this.store.dispatch(new fo),this.isProduction=Jn.production,this.isProduction||this.ngZone.runOutsideAngular(()=>{window.addEventListener("scroll",this.sidebarViewportHandler,{passive:!0}),window.addEventListener("resize",this.sidebarViewportHandler,{passive:!0}
2),window.visualViewport?.addEventListener("scroll",this.sidebarViewportHandler,{passive:!0}),window.visualViewport?.addEventListener("resize",this.sidebarViewportHandler,{passive:!0})}),this.routerSubscription=this.router.events.subscribe(e=>{e instanceof ft&&this.closeMenu()}),this.devicesSubscription=this.devices$.subscribe(e=>{this.devices=e.cameras}),this.releasenotesSubscription=this.releasenotes$.subscribe(e=>{if(e){let n=Object.keys(e).pop();this.release=n,this.releasenotes=e[n],this.showReleaseNotes=localStorage.getItem(this.release)!=="true"}}),this.livestreamSubscription=this.livestream$.subscribe(e=>{this.livestream=e}),this.subscriptionSubscription=this.subscription$.subscribe(e=>{let n=e.credentials,i=e.plan;if(n&&n.amazon_access_key_id!==""&&i){let o=n.amazon_access_key_id,a=this.cloudKey!==o;this.plan=i,this.credentials=n,this.cloudKey=o,a&&this.stopMqttListener(),(a||!this.mqttListenerStarted)&&this.startMqttListener(),(a||!this.mqttSubscriptionsStarted)&&this.subscribeToMotion()}}),this.profileSubscription=this.profile$.subscribe(e=>{if(e&&e.user)if(this.profile=e,e.encryption&&e.encryption.enabled){if(this.decryptionStatus!=="success"&&(this.encryptionOpened=!0),this.fingerprint=e.encryption.fingerprint,this.encryptedFingerprint=e.encryption.fingerprint_encrypted,this.public_key=e.encryption.public_key,this.symmetric_key=e.encryption.symmetric_key,e.encryption.public_key!==""&&e.encryption.public_key!==null&&!e.encryption.has_passphrase&&(this.profile.public_key===""||this.profile.public_key===null)&&(this.decryptionStatus="success",this.store.dispatch(new hn({public_key:this.public_key,symmetric_key:this.symmetric_key})),this.startAppDataLoad()),this.decryptionStatus!=="success"&&e.encryption.has_passphrase){let n=this.readRememberedCode();n&&(this.rememberCode=!0,this.decryptWithPassphrase(n)||(this.clearRememberedCode(),this.rememberCode=!1,this.decryptionStatus=""))}this.encryptionOpened&&setTimeout(()=>{this.focusPassphraseInput()},250)}else this.startAppDataLoad()})}startAppDataLoad(){this.appDataInitialized||(this.appDataInitialized=!0,this.refreshSharedAppData(),this.timerSubscription=this.timer.pipe(En(()=>this.alive)).subscribe(()=>{this.store.dispatch(new _t),this.store.dispatch(new Ye)}),this.cancelDeferredShellLoad=Ei(()=>{this.cancelDeferredShellLoad=null,this.store.dispatch(new Lo),this.store.dispatch(new Ro)}))}refreshSharedAppData(){this.store.dispatch(new Bo),this.store.dispatch(new co),this.store.dispatch(new po),this.store.dispatch(new ho),this.store.dispatch(new ao),this.store.dispatch(new aa),this.store.dispatch(new Ye)}hideReleaseNotes(){this.showReleaseNotes=!1,localStorage.setItem(this.release,"true")}blink(e,n=5){let i=this.title.getTitle(),o=()=>{let a=this.title.getTitle()===i?e+i:i;this.title.setTitle(a),--n?this.timeout=setTimeout(o.bind(this),1e3):this.title.setTitle(i)};clearTimeout(this.timeout),o()}showNotification(e){let n=this.devices.find(i=>i.key===e);n&&(this.toastService.show("Something happened","Movement at "+n.name,2500,["livestream"]),this.livestream.speech)}verifyFingerprint(){if(this.encryptionForm.invalid){this.decryptionStatus="failed",this.triggerShake(),this.refocusPassphraseInput();return}let e=this.passphraseValue;this.decryptWithPassphrase(e)?(this.persistRememberedCode(e),this.resetPassphraseInputs()):(this.triggerShake(),this.refocusPassphraseInput())}decryptWithPassphrase(e){let n=this.fingerprint,i=this.encryptedFingerprint,o="";try{o=Fe.AES.decrypt(i,e).toString(Fe.enc.Utf8)}catch(g){return this.decryptionStatus="wrong-passphrase",!1}if(n!==o)return this.decryptionStatus="wrong-passphrase",!1;let a=Fe.AES.decrypt(this.public_key,e).toString(Fe.enc.Utf8);this.public_key=a;let l=Fe.AES.decrypt(this.symmetric_key,e).toString(Fe.enc.Utf8);return this.symmetric_key=l,this.decryptionStatus="success",this.encryptionOpened=!1,this.store.dispatch(new hn({public_key:this.public_key,symmetric_key:this.symmetric_key})),this.startAppDataLoad(),!0}onRememberCodeChange(e){this.rememberCode=!!(e&&e.target&&e.target.checked),this.rememberCode||this.clearRememberedCode()}getRememberCodeKey(){return"e2e-remember-code-"+(this.fingerprint||"")}persistRememberedCode(e){if(!this.rememberCode){this.clearRememberedCode();return}try{let n={code:btoa(e),expires:Date.now()+this.REMEMBER_CODE_TTL_MS};localStorage.setItem(this.getRememberCodeKey(),JSON.stringify(n))}catch(n){}}readRememberedCode(){try{let e=localStorage.getItem(this.getRememberCodeKey());if(!e)return null;let n=JSON.parse(e);return!n||!n.code||!n.expires||Date.now()>n.expires?(this.clearRememberedCode(),null):atob(n.code)}catch(e){return this.clearRememberedCode(),null}}clearRememberedCode(){try{localStorage.removeItem(this.getRememberCodeKey())}catch(e){}}triggerShake(){this.shakePassphrase=!1,clearTimeout(this.shakeTimeout),this.shakePassphrase=!0,this.shakeTimeout=setTimeout(()=>{this.shakePassphrase=!1},450)}closeEncryption(){if(this.profile&&this.profile.encryption&&this.profile.encryption.enabled&&this.decryptionStatus!=="success"){this.encryptionOpened=!0;return}this.encryptionOpened=!1}openEncryption(){this.encryptionOpened=!0,setTimeout(()=>this.focusPassphraseInput(),250)}focusPassphraseInput(e=0){if(!this.passphraseSlotsInputs||!this.passphraseSlotsInputs.length)return;let n=this.passphraseSlotsInputs.toArray(),i=this.getPreferredPassphraseIndex(),o=e<i?i:e,a=Math.max(0,Math.min(o,n.length-1));n[a]&&n[a].nativeElement&&n[a].nativeElement.focus()}onPassphraseFocus(e){this.allowPassphraseBlur=!1;let n=this.getPreferredPassphraseIndex();this.focusedPassphraseIndex=n,e<n&&setTimeout(()=>this.focusPassphraseInput(n),0)}onPassphraseBlur(){setTimeout(()=>{if(!(this.passphraseSlotsInputs?this.passphraseSlotsInputs.toArray():[]).some(i=>i.nativeElement===document.activeElement)){if(!this.allowPassphraseBlur&&this.encryptionOpened){this.focusPassphraseInput(this.getPreferredPassphraseIndex());return}this.focusedPassphraseIndex=-1,this.allowPassphraseBlur=!1}},0)}onPassphraseSlotInput(e,n){let i=e.target,a=(i&&i.value?i.value.toString():"").slice(-1).replace(/\s/g,"");this.allowPassphraseBlur=!1,this.passphraseCharacters[n]=a,this.syncPassphraseValue(),i&&(i.value=a),a&&n<this.passphraseSlots.length-1&&this.focusPassphraseInput(n+1)}onPassphraseSlotKeydown(e,n){if(e.key==="Backspace"){if(e.preventDefault(),this.passphraseCharacters[n]){this.passphraseCharacters[n]="",this.syncPassphraseValue();return}n>0&&(this.passphraseCharacters[n-1]="",this.syncPassphraseValue(),this.focusPassphraseInput(n-1));return}e.key==="Enter"&&this.verifyFingerprint()}onPassphraseSlotPaste(e){e.preventDefault();let i=(e.clipboardData?e.clipboardData.getData("text"):"").replace(/\s/g,"").slice(0,this.passphraseSlots.length).split("");this.allowPassphraseBlur=!1,this.passphraseCharacters=this.passphraseSlots.map((o,a)=>i[a]||""),this.syncPassphraseValue(),this.focusPassphraseInput(this.getPreferredPassphraseIndex())}syncPassphraseValue(){let e=this.encryptionForm.get("passphrase");e&&(this.passphraseValue=this.passphraseCharacters.join(""),e.setValue(this.passphraseValue,{emitEvent:!1}),(this.decryptionStatus==="wrong-passphrase"||this.decryptionStatus==="failed")&&(this.decryptionStatus=""),this.passphraseValue.length===this.passphraseSlots.length&&!this.encryptionForm.invali
2d&&this.decryptionStatus!=="success"&&this.verifyFingerprint())}preparePassphraseBlur(){this.allowPassphraseBlur=!0}getPreferredPassphraseIndex(){let e=this.passphraseCharacters.findIndex(n=>n==="");return e>-1?e:this.passphraseSlots.length-1}refocusPassphraseInput(){this.allowPassphraseBlur=!1,setTimeout(()=>this.focusPassphraseInput(this.getPreferredPassphraseIndex()),0)}resetPassphraseInputs(){this.passphraseCharacters=this.passphraseSlots.map(()=>""),this.passphraseValue="",this.focusedPassphraseIndex=-1,this.allowPassphraseBlur=!1,this.encryptionForm.reset({passphrase:""})}logout(){this.timerSubscription&&this.timerSubscription.unsubscribe(),this.alive=!1,this.appDataInitialized=!1,this.cancelDeferredShellLoad?.(),this.cancelDeferredShellLoad=null,this.store.dispatch(new Wt),this.store.dispatch(new si),this.store.dispatch(new ni),this.store.dispatch(new ti),this.store.dispatch(new ai),this.store.dispatch(new $t),this.encryptionOpened=!1,this.decryptionStatus="",this.router.navigateByUrl("/login",{replaceUrl:!0})}openMenu(){this.showMenu=!this.showMenu}closeMenu(){this.showMenu=!1}scheduleSidebarViewportUpdate(){this.isProduction||this.sidebarViewportFrame!==void 0||(this.sidebarViewportFrame=window.requestAnimationFrame(()=>{if(this.sidebarViewportFrame=void 0,!this.appShellElement)return;let e=window.visualViewport,n=e?.offsetTop||0,i=e?.height||window.innerHeight,a=document.querySelector(".environment")?.getBoundingClientRect(),l=a?Math.min(a.height,Math.max(0,a.bottom-n)):0;this.appShellElement.style.setProperty("--sidebar-viewport-height",`${Math.max(0,i-l)}px`)}))}makeid(e){let n=[],i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=i.length;for(let a=0;a<e;a++)n.push(i.charAt(Math.floor(Math.random()*o)));return n.join("")}ngOnDestroy(){this.alive=!1,this.cancelDeferredShellLoad?.(),this.cancelDeferredShellLoad=null,window.removeEventListener("scroll",this.sidebarViewportHandler),window.removeEventListener("resize",this.sidebarViewportHandler),window.visualViewport?.removeEventListener("scroll",this.sidebarViewportHandler),window.visualViewport?.removeEventListener("resize",this.sidebarViewportHandler),this.sidebarViewportFrame!==void 0&&window.cancelAnimationFrame(this.sidebarViewportFrame),this.timerSubscription&&this.timerSubscription.unsubscribe(),this.devicesSubscription&&this.devicesSubscription.unsubscribe(),this.releasenotesSubscription&&this.releasenotesSubscription.unsubscribe(),this.livestreamSubscription&&this.livestreamSubscription.unsubscribe(),this.subscriptionSubscription&&this.subscriptionSubscription.unsubscribe(),this.routerSubscription&&this.routerSubscription.unsubscribe(),this.profileSubscription&&this.profileSubscription.unsubscribe(),this.themeSubscription&&this.themeSubscription.unsubscribe(),this.stopMqttListener()}static{this.\u0275fac=function(n){return new(n||t)(G(Hn),G("mqttNew"),G("mqttLegacy"),G(ci),G(He),G(me),G(me),G(di),G(zt),G(In),G(pi))}}static{this.\u0275cmp=he({type:t,selectors:[["ng-component"]],viewQuery:function(n,i){if(n&1&&Rt(H0,5)(G0,5),n&2){let o;Ie(o=Te())&&(i.appShell=o.first),Ie(o=Te())&&(i.passphraseSlotsInputs=o)}},standalone:!1,decls:5,vars:4,consts:[["appShell",""],["passphraseSlot",""],[3,"class"],[1,"app"],[1,"encryption-block"],["aria-hidden","true",1,"debug-responsivity"],[1,"sidebar",3,"ngClass"],[1,"main"],[1,"gradient"],["for","check"],["type","checkbox","id","check",3,"change"],[3,"icon"],[1,"main-body"],[1,"center",3,"formGroup"],[1,"encryption-block__icon"],["icon","lock-locked"],[1,"encryption-block__title"],[1,"encryption-block__copy"],[1,"encryption-block__text",3,"ngClass"],[1,"encryption-block__pin",3,"click"],["type","password","maxlength","1","autocomplete","new-password","autocapitalize","none","autocorrect","off","spellcheck","false","data-form-type","other",1,"encryption-block__pin-digit",3,"filled","active","value"],[1,"encryption-block__hint"],[1,"encryption-block__message","error"],[1,"encryption-block__remember"],["type","checkbox",3,"mousedown","change","checked"],[1,"encryption-block__button",3,"mousedown","click","disabled"],[1,"switch-account",3,"mousedown","click"],["type","password","maxlength","1","autocomplete","new-password","autocapitalize","none","autocorrect","off","spellcheck","fal
2se","data-form-type","other",1,"encryption-block__pin-digit",3,"focus","blur","input","keydown","paste","value"],[1,"size","t"],[1,"size","d"],[1,"size","w"],[1,"size","f"]],template:function(n,i){n&1&&(f(0,W0,3,7,"div",2),f(1,K0,11,5,"div",3),f(2,X0,30,28,"div",4),f(3,Z0,13,12,"div",5),b(4,"ToastContainer")),n&2&&(v(i.config.environment!=="production"&&!(i.profile&&i.profile.user&&i.profile.encryption&&i.profile.encryption.enabled&&i.decryptionStatus!=="success")?0:-1),r(),v(i.profile&&i.profile.user&&!(i.profile.encryption&&i.profile.encryption.enabled&&i.decryptionStatus!=="success")?1:-1),r(),v(i.profile&&i.profile.user&&i.profile.encryption&&i.profile.encryption.enabled&&i.decryptionStatus!=="success"?2:-1),r(),v(i.isProduction?-1:3))},dependencies:[$e,Gn,Le,Je,De,es,Di,ve],styles:["[_ngcontent-%COMP%]:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
2--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}[_ngcontent-%COMP%]:root .game2reel[_ngcontent-%COMP%]{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root .wdc[_ngcontent-%COMP%]{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){[_ngcontent-%COMP%]:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){[_ngcontent-%COMP%]:root{--main-content-gutter: 48px}}body.dark-theme[_ngcontent-%COMP%], html.dark-theme[_ngcontent-%COMP%]{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%], .block[_ngcontent-%COMP%], .card[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], header[_ngcontent-%COMP%], .mat-mdc-card[_ngcontent-%COMP%], .mat-mdc-dialog-container[_ngcontent-%COMP%]{transition:background-color .3s ease,color .3s ease,border-color .3s ease}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]{box-shadow:0 4px 34px #0000003d,0 3px 4px #0003}.encrypted[_ngcontent-%COMP%]{max-height:100vh;overflow-y:hidden}.encryption-block[_ngcontent-%COMP%]{width:100%;height:100%;background:radial-gradient(circle at top,hsla(var(--hub-hsl),.04),transparent 40%),linear-gradient(180deg,hsla(var(--bg-hsl),.88),hsla(var(--bg-hsl),.75));backdrop-filter:blur(12px) saturate(104%);-webkit-backdrop-filter:blur(12px) saturate(104%);color:var(--text);display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;z-index:1001}.encryption-block[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;top:40px;right:50px;cursor:pointer}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{width:min(440px,100vw - 32px);padding:36px;border-radius:20px;background:linear-gradient(180deg,hsla(var(--card-hsl),.96),hsla(var(--card-hsl),.92));border:1px solid hsla(var(--text-hsl),.08);box-shadow:0 18px 44px hsla(var(--text-hsl),.1),inset 0 1px hsla(var(--bg-white-hsl),.45);text-align:center}.encryption-block[_ngcontent-%COMP%] .center.shake[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_modal-shake .45s ease-in-out}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__icon[_ngcontent-%COMP%]{width:72px;height:72px;margin:0 auto 12px;border-radius:18px;background:hsla(var(--hub-hsl),.12);color:var(--hub);display:flex;align-items:center;justify-content:center;font-size:28px}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__title[_ngcontent-%COMP%]{margin:0;font-size:30px;line-height:1.2;color:var(--text)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__copy[_ngcontent-%COMP%]{margin:12px auto 0;max-width:320px;color:var(--text-muted);line-height:1.6}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .switch-account[_ngcontent-%COMP%]{color:var(--hub);cursor:pointer;top:10px;position:relative}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%]{margin-top:24px}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__pin[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;cursor:text}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__pin-digit[_ngcontent-%COMP%]{height:64px;border:0;border-bottom:2px solid hsla(var(--text-hsl),.18);background:transparent;color:var(--text);appearance:none;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:600;box-shadow:0 10px 24px hsla(var(--text-hsl),.06);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease;text-align:center;text-transform:none}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__pin-digit.filled[_ngcontent-%COMP%]{border-bottom-color:hsla(var(--hub-hsl),.45)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__pin-digit.active[_ngcontent-%COMP%]{border-bottom-color:hsla(var(--hub-hsl),.6);box-shadow:0 14px 28px hsla(var(--text-hsl),.1),0 3px hsla(var(--hub-hsl),.18);transform:translateY(-1px);outline:none}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__hint[_ngcontent-%COMP%], .encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__message[_ngcontent-%COMP%]{margin:12px 0 0;font-size:14px;line-height:1.4}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__hint[_ngcontent-%COMP%]{color:var(--text-muted)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__message.error[_ngcontent-%COMP%]{color:var(--alert)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__remember[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:24px;color:var(--text-muted);font-size:14px;cursor:pointer;-webkit-user-select:none;user-select:none}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__remember[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:16px;height:16px;margin:0;cursor:pointer;accent-color:var(--hub)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__button[_ngcontent-%COMP%]{width:100%;margin-top:24px;border:0;padding:16px 18px;border-radius:12px;background:var(--hub);color:#fff;font-size:16px;font-weight:600;cursor:pointer}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__button[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text.error[_ngcontent-%COMP%] .encryption-block__pin-digit[_ngcontent-%COMP%]{border-bottom-color:hsla(var(--alert-hsl),.45)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text.error[_ngcontent-%COMP%] .encryption-block__pin-digit.active[_ngcontent-%COMP%]{box-shadow:0 14px 28px hsla(var(--text-hsl),.1),0 3px hsla(var(--alert-hsl),.18)}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text.error[_ngcontent-%COMP%] .encryption-block__button[_ngcontent-%COMP%]{background:var(--alert)}@media(max-width:540px){.encryption-block[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{top:24px;right:24px}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{padding:24px}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__title[_ngcontent-%COMP%]{font-size:25px}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__pin[_ngcontent-%COMP%]{gap:8px}.encryption-block[_ngcontent-%COMP%] .center[_ngcontent-%COMP%] .encryption-block__text[_ngcontent-%COMP%] .encryption-block__pin-digit[_ngcontent-%COMP%]{height:56px;font-size:24px}}@keyframes _ngcontent-%COMP%_modal-shake{0%{transform:translate(0)}15%{transform:translate(-10px)}30%{transform:translate(8px)}45%{transform:translate(-6px)}60%{transform:translate(4px)}75%{transform:translate(-2px)}to{transform:translate(0)}}.environment[_ngcontent-%COMP%] + .app[_ngcontent-%COMP%]{--sidebar-viewport-height: calc(100vh - 1.3em - 24px) }.app[_ngcontent-%COMP%]{--mobile-header-height: 48px;--sidebar-width: 0px;--sidebar-viewport-height: 100vh}@media only screen and (min-width:769px){.app[_ngcontent-%COMP%]{--sidebar-width: 250px}}@media only screen and (min-width:1024px){.app[_ngcontent-%COMP%]{--sidebar-width: 280px}}.app[_ngcontent-%COMP%]{display:flex;flex-direction:row;min-height:100vh;position:relative}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]{--sidebar-inline-gutter: 24px;box-sizing:border-box;width:auto;padding:24px var(--sidebar-inline-gutter) 0;background:var(--card);position:fixed;overflow-y:auto;scrollbar-gutter:stable both-edges;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;top:0;bottom:0;right:0;z-index:1000}.app[_ngcontent-%COMP%] .sidebar.closed[_ngcontent-%COMP%]{display:none}@media only screen and (min-width:769px){.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]{box-shadow:0 4px 34px #0000001a;
2height:var(--sidebar-viewport-height, 100vh);position:sticky;overflow:visible;top:0;bottom:auto;scrollbar-color:var(--bg) var(--card);scrollbar-width:thin}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]::-webkit-scrollbar{background-color:var(--card)}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--card)}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--bg);border-radius:8px;border:2px solid var(--card)}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{scrollbar-color:var(--bg) var(--card)!important}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]:hover{scrollbar-color:var(--bg) var(--card)!important}.app[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]{left:0;flex:0 0 var(--sidebar-width);--sidebar-inline-gutter: 12px;padding:0 var(--sidebar-inline-gutter);margin:0;z-index:30}.app[_ngcontent-%COMP%] .sidebar.closed[_ngcontent-%COMP%]{display:block}}.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{flex:1;background:var(--bg);background:linear-gradient(to bottom,var(--bg-white) 0,var(--bg) 200px);padding-bottom:var(--mobile-header-height)}@media only screen and (min-width:769px){.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{padding-bottom:0}}.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .gradient[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;height:var(--mobile-header-height);width:100%;background:var(--card);box-shadow:0 -5px 6px -5px hsla(var(--text-hsl),.5);position:fixed;bottom:0;z-index:1005}@media only screen and (min-width:769px){.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .gradient[_ngcontent-%COMP%]{height:6px;background:var(--upper-gradient);box-shadow:none;position:static}}.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .gradient[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;padding:0 24px;
2cursor:pointer;align-items:center}@media only screen and (min-width:769px){.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .gradient[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:none}}.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .gradient[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .main-body[_ngcontent-%COMP%]{margin:0 var(--main-content-gutter) 12px}@media only screen and (min-width:769px){.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .main-body[_ngcontent-%COMP%]{margin:0 var(--main-content-gutter) 36px}}@media only screen and (min-width:1024px){.app[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .main-body[_ngcontent-%COMP%]{margin:0 var(--main-content-gutter) 60px}}"]})}}return t})();function th(t,c){t&1&&(s(0,"span",1),u(1),p(2,"translate"),d()),t&2&&(r(),_(h(2,1,"auto.home.blocks.header.blocks.video.videoheadermodal.k1")))}var yt=(()=>{class t{constructor(e,n,i,o,a){this.dialogRef=e,this.data=n,this.http=i,this.apiService=o,this.mediaScripts=a,this.sequenceLoaded=!1}ngAfterViewInit(){this.mediaScripts.loadVideoJs().then(e=>{if(this.data){let n=this.data,i=new Bt().set("Accept","application/json, version=2013-01-01");this.http.get(this.apiService.findMedia(n),{headers:i}).pipe(S(o=>{this.sequenceLoaded=!0;let a=o&&o.data?o.data:o,l=a&&Array.isArray(a.images)?a.images:[];this.player=e(document.getElementById("sequence"),{controlBar:{volumeMenuButton:!1},fluid:!0}),this.player.playlistUi();let g=[];for(let m=0;m<l.length;m++){let y=l[m];if(y.type==="video"){let M=y.metadata.instanceName,k=y.time+" ("+M+")";if(y.analysis&&y.analysis.classification&&y.analysis.classification.properties&&y.analysis.classification.properties.length>0){let F=y.analysis.classification.properties[0];k=F.charAt(0).toUpperCase()+F.slice(1)+" at "+k}let P={name:k,sources:[{src:y.src,type:"video/mp4"}]};g.push(P)}}this.player.playlist(g),this.player.playlist.first(),this.player.play()}),Y(1)).subscribe()}})}onNoClick(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||t)(G(sl),G(ll),G(Ve),G(Ue),G(pl))}}static{this.\u0275cmp=he({type:t,selectors:[["VideoHeaderModalComponent"],["videoheadermodalcomponent"],["video-header-modal-component"]],standalone:!1,decls:11,vars:7,consts:[[1,"main-preview-player"],[1,"loading"],["id","sequence","controls","","preload","auto",1,"video-js","vjs-fluid"],[1,"vjs-no-js"],["href","http://videojs.com/html5-video-support/","target","_blank"],[1,"playlist-container","preview-player-dimensions","vjs-fluid"],[1,"vjs-playlist"]],template:function(n,i){n&1&&(s(0,"section",0),f(1,th,3,3,"span",1),s(2,"video",2)(3,"p",3),u(4),p(5,"translate"),s(6,"a",4),u(7),p(8,"translate"),d()()(),s(9,"div",5),b(10,"ol",6),d()()),n&2&&(r(),v(i.sequenceLoaded?-1:1),r(3),R("",h(5,3,"auto.home.blocks.header.blocks.video.videoheadermodal.k2")," "),r(3),_(h(8,5,"auto.home.blocks.header.blocks.video.videoheadermodal.k3")))},dependencies:[ve],styles:[".main-preview-player[_ngcontent-%COMP%]{position:relative;z-index:1}.loading[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:2}@media only screen and (max-width:600px){.playlist-container[_ngcontent-%COMP%]{overflow:scroll}}"]})}}return t})();var Ac=(()=>{class t{constructor(e,n,i){this.dialog=e,this.store=n,this.fb=i,this.user$=this.store.select(ki),this.user={role:"",email:""},this.showDropdown=!1,this.showFeedback=!1,this.rate="no",this.showDropdown=!1,this.feedbackForm=this.fb.group({feedback:new Vt("",[W.required,W.minLength(3)])}),this.pageName="",this.channels=[],this.userSubscription=this.user$.pipe(Y(1)).subscribe(o=>{o&&o.username&&(this.user=o)}),this.interval=1e3,this.timer=It(0,this.interval)}ngOnInit(){this.now=Math.floor(Date.now()),this.timeSubscription=this.timer.subscribe(()=>{this.now=Math.floor(Date.now())})}ngOnDestroy(){this.timeSubscription&&this.timeSubscription.unsubscribe(),this.userSubscription&&this.userSubscription.unsubscribe()}markRead(e,n,i){this.store.dispatch(new Io({index:i,notification:n})),e.stopPropagation()}toggleDropdown(){this.showDropdown=!this.showDropdown}toggleHelp(){}
2toggleFeedback(){this.showFeedback=!0}closeFeedback(){this.showFeedback=!1}sendFeedback(e){this.feedbackForm.valid&&(this.store.dispatch(new Vo("feedback - ( "+this.rate+" stars ) "+this.feedbackForm.value.feedback)),this.showFeedback=!1)}markReadAll(e){this.store.dispatch(new Eo),this.showDropdown=!1,e.stopPropagation()}timeDifference(e,n){var i=6e4,o=i*60,a=o*24,l=a*30,g=a*365,m=e-n;return m<i?Math.round(m/1e3)+" seconds ago":m<o?Math.round(m/i)+" minutes ago":m<a?Math.round(m/o)+" hours ago":m<l?Math.round(m/a)+" days ago":m<g?Math.round(m/l)+" months ago":Math.round(m/g)+" years ago"}openVideo(e){e.media[0].type==="video"&&(this.openVideoModal=this.dialog.open(yt,{height:"auto",width:"100%",data:e.sequenceid})).afterClosed().subscribe(i=>{this.openVideoModal=null})}static{this.\u0275fac=function(n){return new(n||t)(G(cl),G(me),G(zt))}}static{this.\u0275cmp=he({type:t,selectors:[["header"]],inputs:{openMenu:"openMenu"},standalone:!1,decls:18,vars:10,consts:[[1,"header","navbar"],[1,"header-inner"],[1,"navbar-item","navbar-spacer-right","brand","hidden-lg-up"],["data-toggle","sidebar",1,"toggle-offscreen",3,"click"],[1,"material-icons"],[1,"brand-logo","hidden-xs-down"],["href","#",1,"navbar-item","navbar-spacer-right","navbar-heading","hidden-md-down"],[1,"navbar-search","navbar-item",2,"opacity","0"],[1,"search-form"],["type","text",1,"form-control",3,"placeholder"]],template:function(n,i){n&1&&(s(0,"nav",0)(1,"div",1)(2,"div",2)(3,"a",3),N("click",function(){return i.openMenu()}),s(4,"i",4),u(5),p(6,"translate"),d()(),b(7,"a",5),d(),s(8,"a",6)(9,"span"),u(10),d()(),s(11,"div",7)(12,"form",8)(13,"i",4),u(14),p(15,"translate"),d(),b(16,"input",9),p(17,"translate"),d()()()()),n&2&&(r(5),_(h(6,4,"auto.home.blocks.header.header.k1")),r(5),_(i.pageName),r(4),_(h(15,6,"auto.home.blocks.header.header.k2")),r(2),C("placeholder",h(17,8,"auto.home.blocks.header.header.k3")))},dependencies:[Qe,Le,Yn,ve],styles:["[_ngcontent-%COMP%]:root{--hub: #84569f;--hub-hsl: 278, 30%, 48%;--hub-darker: hsl(278, 34%, 31%);--hub-darker-hsl: 278, 34%, 31%;--hub-transparent: hsla(278, 30%, 48%, .5);--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--enterprise: hsl(162, 24%, 38%);--enterprise-hsl: 162, 24%, 38%;--enterprise-darker: hsl(162, 26%, 26%);--enterprise-darker-hsl: 162, 26%, 26%;--vault: hsl(229, 25%, 45%);--vault-hsl: 229, 25%, 45%;--vault-darker: hsl(230, 28%, 31%);--vault-darker-hsl: 230, 28%, 31%;--secondary: hsl(0, 3%, 41%);--secondary-hsl: 0, 3%, 41%;--secondary-darker: hsl(0, 3%, 48%);--secondary-darker-hsl: 0, 3%, 48%;--text: hsl(0, 3%, 15%);--text-hsl: 0, 3%, 15%;--text-muted: hsl(0, 3%, 41%);--text-muted-hsl: 0, 3%, 41%;--text-light: hsl(0, 5%, 63%);--text-light-hsl: 0, 5%, 63%;--text-darker: hsl(0, 3%, 0%);--card: hsl(0, 0%, 100%);--card-hsl: 0, 0%, 100%;--card-muted: hsl(0, 0%, 98%);--card-muted-hsl: 0, 0%, 98%;--card-transparent: hsla(0, 0%, 100%, .91);--info: hsl(205, 74%, 53%);--info-hsl: 205, 74%, 53%;--info-darker: hsl(205, 71%, 41%);--info-darker-hsl: 205, 71%, 41%;--success: hsl(131, 31%, 52%);--success-light: hsl(131, 100%, 90%);--success-hsl: 131, 31%, 52%;--success-darker: hsl(130, 35%, 39%);--success-darker-hsl: 130, 35%, 39%;--warning: hsl(47, 86%, 47%);--warning-hsl: 47, 86%, 47%;--alert: hsl(2, 58%, 48%);--alert-darker: hsl(2, 63%, 36%);--alert-darker-hsl: 2, 63%, 36%;--alert-hsl: 2, 58%, 48%;--gold: hsl(51, 100%, 48%);--gold-darker: hsl(51, 100%, 36%);--gold-darker-hsl: 51, 100%, 36%;--gold-hsl: 51, 100%, 48%;--bg: hsl(0, 5%, 93%);--bg-hsl: 0, 5%, 93%;
2--bg-muted: hsl(0, 4%, 89%);--bg-muted-hsl: 0, 4%, 89%;--bg-white: hsl(0, 0%, 100%);--bg-white-hsl: 0, 0%, 100%;--bg-active: hsla(0, 0%, 0%, .1);--upper-gradient: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--upper-gradient-mobile: linear-gradient(90deg, #2713ff 0%, #ff0059 100%);--border-gradient: linear-gradient(90deg, hsla(278, 30%, 48%, 1) 0%, rgb(241, 48, 41) 100%);--device-active: hsla(131, 31%, 52%, 1);--device-inactive: hsla(0, 3%, 41%, 1);--device-idle: hsla(47, 86%, 47%, 1);--device-motion: hsla(2, 58%, 48%, 1);--marker: hsla(47, 86%, 47%, 1);--link: var(--hub);--media-controls: hsla(0, 0%, 100%, 1);--media-controls-bg: hsla(0, 0%, 0%, 1);--media-controls-bg-light: hsla(0, 0%, 0%, .7);--media-bar-progress: hsla(0, 0%, 100%, .5);--media-bar-hover: hsla(0, 0%, 100%, .8);--media-bar-detection: hsla(278, 30%, 48%, 1);--media-bar-detection-highlight: hsla(47, 86%, 47%, 1)}[_ngcontent-%COMP%]:root .game2reel[_ngcontent-%COMP%]{--hub: hsl(49 100% 50%);--hub-hsl: 49 100% 50%;--hub-darker: hsl(49, 100%, 40%);--hub-darker-hsl: 49, 100%, 40%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root .wdc[_ngcontent-%COMP%]{--hub: hsl(0 0% 50%);--hub-hsl: 0 0% 50%;--hub-darker: hsl(0, 0%, 0%);--hub-darker-hsl: 0, 0%, 0%;--oss: hsl(2, 48%, 39%);--oss-hsl: 2, 48%, 39%;--oss-darker: hsl(2, 52%, 25%);--oss-darker-hsl: 2, 52%, 25%;--upper-gradient: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%);--upper-gradient-mobile: linear-gradient(90deg, var(--hub) 0%, var(--hub-darker) 100%)}[_ngcontent-%COMP%]:root{--radius: 4px;--main-content-gutter: 24px;--grid-columns: 1fr}@media only screen and (min-width:769px){[_ngcontent-%COMP%]:root{--main-content-gutter: 36px}}@media only screen and (min-width:1216px){[_ngcontent-%COMP%]:root{--main-content-gutter: 48px}}body.dark-theme[_ngcontent-%COMP%], html.dark-theme[_ngcontent-%COMP%]{--text: hsl(0, 0%, 90%);--text-hsl: 0, 0%, 90%;--text-muted: hsl(0, 0%, 70%);--text-muted-hsl: 0, 0%, 70%;--text-light: hsl(0, 0%, 55%);--text-light-hsl: 0, 0%, 55%;--text-darker: hsl(0, 0%, 100%);--card: hsl(0, 0%, 18%);--card-hsl: 0, 0%, 18%;--card-muted: hsl(0, 0%, 15%);--card-muted-hsl: 0, 0%, 15%;--card-transparent: hsla(0, 0%, 18%, .91);--bg: hsl(0, 0%, 10%);--bg-hsl: 0, 0%, 10%;--bg-muted: hsl(0, 0%, 20%);--bg-muted-hsl: 0, 0%, 20%;--bg-white: hsl(0, 0%, 15%);--bg-white-hsl: 0, 0%, 15%;--bg-active: hsla(0, 0%, 100%, .1);--upper-gradient: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--upper-gradient-mobile: linear-gradient(90deg, #6f5cff 0%, #ff4d85 100%);--link: hsl(0, 0%, 100%)}body[_ngcontent-%COMP%], .sidebar-panel[_ngcontent-%COMP%], .block[_ngcontent-%COMP%], .card[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], header[_ngcontent-%COMP%], .mat-mdc-card[_ngcontent-%COMP%], .mat-mdc-dialog-container[_ngcontent-%COMP%]{transition:background-color .3s ease,color .3s ease,border-color .3s ease}"]})}}return t})();var Lc=(()=>{class t{constructor(e,n){this.http=e,this.apiService=n}getDevices(){return this.http.get(this.apiService.getDevices()).pipe(Y(1),S(e=>e))}findDevice(e){return this.http.get(this.apiService.findDevice(e)).pipe(Y(1),S(n=>n))}getLatestVersion(){let e="https://api.github.com/repos/kerberos-io/machinery/releases",n={headers:new Bt({"X-No-Authorization":"true"})};return this.http.get(e,n).pipe(Y(1),S(i=>i[0].tag_name))}removeDevice(e){return this.http.delete(this.apiService.deleteDevice(e)).pipe(Y(1),S(n=>n))}muteDevice(e,n){let i=n;return this.http.post(this.apiService.muteDevice(e),{mute:i}).pipe(Y(1),S(o=>o))}updateDevice(e,n){return this.http.put(this.apiService.updateDevice(e),{payload:n}).pipe(Y(1),S(i=>i))}static{this.\u0275fac=function(n){return new(n||t)(X(Ve),X(Ue))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var Dc=(()=>{class t{constructor(e){this.store=e}canActivate(e,n){return this.store.select(at).pipe(ae(i=>i.requested),Y(1),S(i=>{let o=i&&i.user?i.user:null;return!!o&&o.role==="owner"}))}static{this.\u0275fac=function(n){return new(n||t)(X(me))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var we=(()=>{class t{constructor(e){this.store=e}canActivate(e,n){return this.store.select(at).pipe(ae(i=>i.requested),Y(1),S(i=>{let o=i&&i.user?i.user:null;return!!o&&(o.role==="admin"||o.role==="owner")}))}static{this.\u0275fac=function(n){return new(n||t)(X(me))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var be=(()=>{class t{constructor(e,n){this.store=e,this.router=n}
2canActivate(e,n){return this.store.select(at).pipe(ae(i=>i.requested),Y(1),S(i=>{let o=e&&e.data&&e.data.requiredPage?String(e.data.requiredPage):"";return!o||(i&&i.user&&i.user.permissions&&Array.isArray(i.user.permissions.pages)?i.user.permissions.pages:[]).includes(o)?!0:this.router.parseUrl("/profile")}))}static{this.\u0275fac=function(n){return new(n||t)(X(me),X(He))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var ih=[{path:"",component:yn,canActivate:[dc],children:[{path:"",loadChildren:()=>import("./chunk-NAGDXPTH.js").then(t=>t.DashboardModule),canActivate:[be],data:{requiredPage:"dashboard"}},{path:"dashboard",loadChildren:()=>import("./chunk-NAGDXPTH.js").then(t=>t.DashboardModule),canActivate:[be],data:{requiredPage:"dashboard"}},{path:"events",loadChildren:()=>import("./chunk-JIJ5KPZA.js").then(t=>t.EventsModule)},{path:"recordings",loadChildren:()=>import("./chunk-HVGHCCSY.js").then(t=>t.RecentRecordingsModule)},{path:"livestream",loadChildren:()=>import("./chunk-24JNNIPD.js").then(t=>t.LivestreamModule)},{path:"videowall",loadChildren:()=>import("./chunk-54OZ67H7.js").then(t=>
2t.VideowallModule),canActivate:[be],data:{requiredPage:"videowall"}},{path:"media",loadChildren:()=>import("./chunk-7MJEOJD5.js").then(t=>t.MediaModule)},{path:"media",redirectTo:"media",pathMatch:"full"},{path:"day",loadChildren:()=>import("./chunk-DGWYF4XN.js").then(t=>t.DayModule)},{path:"datasets",loadChildren:()=>import("./chunk-5QFJCLAB.js").then(t=>t.DatasetsModule)},{path:"counting",loadChildren:()=>import("./chunk-PYCSKYGW.js").then(t=>t.CountingModule)},{path:"devices",loadChildren:()=>import("./chunk-2K7Q4E37.js").then(t=>t.DevicesModule),canActivate:[be],data:{requiredPage:"cameras"}},{path:"tasks",redirectTo:"cases"},{path:"cases",loadChildren:()=>import("./chunk-EGI2MMXP.js").then(t=>t.TasksModule),canActivate:[nt],data:{featureFlag:"featureCaseEnabled"}},{path:"watchlist",loadChildren:()=>import("./chunk-6BHE6PLC.js").then(t=>t.WatchlistModule)},{path:"sites",loadChildren:()=>import("./chunk-2WGNOJKQ.js").then(t=>t.SitesModule)},{path:"groups",loadChildren:()=>import("./chunk-RRPVN5AY.js").then(t=>t.GroupsModule)},{path:"profile",loadChildren:()=>import("./chunk-63MS5Q3M.js").then(t=>t.ProfileModule)},{path:"workspace",loadChildren:()=>import("./chunk-SPPYSD7Y.js").then(t=>t.OrganisationSettingsModule),canActivate:[we,nt],data:{featureFlag:"featureOrganisationSettingsEnabled"}},{path:"organisation",redirectTo:"workspace",pathMatch:"full"},{path:"subscription",loadChildren:()=>import("./chunk-YMVEKEOP.js").then(t=>t.SubscriptionModule),canActivate:[we,be],data:{requiredPage:"plans-integrations"}},{path:"channels",loadChildren:()=>import("./chunk-ODCWPS6V.js").then(t=>t.ChannelsModule),canActivate:[we,be],data:{requiredPage:"channels"}},{path:"alerts",loadChildren:()=>import("./chunk-2TKCXEZL.js").then(t=>t.AlertsModule),canActivate:[we,be],data:{requiredPage:"alerts"}},{path:"accounts",loadChildren:()=>import("./chunk-AEEEO7TV.js").then(t=>t.AccountsModule),canActivate:[we,be],data:{requiredPage:"accounts"}},{path:"roles",loadChildren:()=>import("./chunk-X6FVLDGO.js").then(t=>t.RolesModule),canActivate:[we,be],data:{requiredPage:"roles"}},{path:"logging",loadChildren:()=>import("./chunk-RY2MWOQW.js").then(t=>t.LoggingModule),canActivate:[we]},{path:"audit",loadChildren:()=>import("./chunk-F26M6PJS.js").then(t=>t.AuditModule),canActivate:[we,nt],data:{featureFlag:"featureAuditEnabled"}},{path:"analytics",loadChildren:()=>import("./chunk-WAXNRIVS.js").then(t=>t.AnalyticsModule)},{path:"io",loadChildren:()=>import("./chunk-3DMQPGEB.js").then(t=>t.AnalyticsModule),canActivate:[be],data:{requiredPage:"ios"}},{path:"settings",loadChildren:()=>import("./chunk-7U2FVZQZ.js").then(t=>t.SettingsModule),canActivate:[be],data:{requiredPage:"settings"}},{path:"workflows",loadChildren:()=>import("./chunk-WVPCO6OE.js").then(t=>t.WorkflowsModule),canActivate:[nt],data:{featureFlag:"featureWorkflowsEnabled"}}]}],lt=class{static getDeclarations(){return[yn,Ac,Di,Ai,Oi,Ii,Ti,yt]}static getEntryComponents(){return[yt]}static getProviders(){return[Dc,we,be,nt,Mi,ca,hl,Uo,fn,fn,$s,ul,uo,vl,ro,ml,gl,fl,Jo,Lc,_l,bl,mi,xl,Xs,Cl,Sl,{provide:"mqttLegacy",useClass:vt},{provide:"mqttNew",useClass:vt},ci,yi,wi,gi,fi]}static getAppRoutes(){return Un.forChild(ih)}};var Fc=(()=>{class t{constructor(e,n){this.actions$=e,this.settingsService=n,this.loadLabels=w(()=>this.actions$.pipe(I(El),K(i=>this.settingsService.getLabels().pipe(S(o=>new Tl(o)),V(o=>D(new Al(o))))))),this.addLabel=w(()=>this.actions$.pipe(I(Pl),K(i=>this.settingsService.addLabel(i.payload).pipe(S(o=>new Ll(o)),V(o=>D(new Dl(o))))))),this.updateLabel=w(()=>this.actions$.pipe(I(Ol),K(i=>this.settingsService.updateLabel(i.payload).pipe(S(o=>new Fl(o)),V(o=>D(new Rl(o))))))),this.DeleteLabel=w(()=>this.actions$.pipe(I(Il),K(i=>this.settingsService.deleteLabel(i.id).pipe(S(()=>new Nl(i.id)),V(o=>D(new jl(o)))))))}static{this.\u0275fac=function(n){return new(n||t)(X(ze),X(yi))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();function re(t,c){let e=Us(t);return e&&e.message&&e.message!=="Unknown error"?e.message:c}var nh=t=>{let c=new Date(t*1e3),e=String(c.getDate()).padStart(2,"0"),n=String(c.getMonth()+1).padStart(2,"0"),i=c.getFullYear();return`${e}-${n}-${i}`},Et=t=>{let c=new Date(t*1e3);c.setHours(0,0,0,0);let e=Math.floor(c.getTime()/1e3);return{start:e,end:e+86400}},Fi=(t,c,e=!1)=>{let n={};if(c){let i=(t.timeRanges||[]).find(o=>o&&o.start&&o.end);if(i){let o=Et(i.start);n.timeRanges=[{start:o.start,end:o.end}]}}return e&&(n.categories=(t.markerCategories||[]).map(i=>i.value)),n},Bc=t=>!!(t.markerCategories&&t.markerCategories.length||t.markers&&t.markers.length||t.events&&t.events.length||t.tags&&t.tags.length||t.regions&&t.regions.length||t.starred!==null),ah=t=>{let c=(t.timeRanges||[]).find(n=>n&&n.start&&n.end),e=c&&c.start?Et(c.start):null;return JSON.stringify({timeRanges:e?[{start:e.start,end:e.end}]:[],markerCategories:(t.markerCategories||[]).map(n=>n.value).sort(),markers:(t.markers||[]).map(n=>n.value).sort(),events:(t.events||[]).map(n=>n.value).sort(),tags:(t.tags||[]).map(n=>n.value).sort(),regions:t.regions||[],starred:t.starred})},wt=(t,c,e,n=!1)=>{let i=(t.timeRanges||[]).find(g=>g&&g.start&&g.end);if(!i||!i.start||!c||!c.length)return null;let o=Et(i.start),a=j(L({},dt(t)),{sites:void 0,groups:void 0,excludedDevices:void 0,devices:c,timeRanges:[{start:o.start,end:o.end}]}),l=Bc(t);if(n&&e&&e.currentScale===3600){let g=Math.max(0,e.startTime||0),m=Math.min(g,86400),y=Math.min(m+e.currentScale,86400);return{disableGrouping:l,filter:j(L({},a),{timeRanges:[{start:o.start+m,end:o.start+y}]})}}return{disableGrouping:l,filter:a}},kt=(t,c,e,n=!1)=>{let i=(t.timeRanges||[]).find(l=>l&&l.start&&l.end);if(!i||!c||!c.length)return null;let o=Et(i.start),a=[{start:o.start,end:o.end}];if(n&&e&&e.currentScale===3600){let l=Math.max(0,e.startTime||0),g=Math.min(l,86400),m=Math.min(g+e.currentScale,86400);a=[{start:o.start+g,end:o.start+m}]}return{disableGrouping:Bc(t),filter:{deviceKeys:c,names:t.markers.map(l=>l.value),categories:t.markerCategories.map(l=>
2l.value),events:t.events.map(l=>l.value),tags:t.tags.map(l=>l.value),regions:t.regions,starred:t.starred===null?void 0:t.starred,timeRanges:a}}},Ri=(t,c)=>t.length===c.length&&t.every((e,n)=>e===c[n]),Rc=t=>!t||typeof t.cursor>"u"||t.cursor===null||t.cursor==="",rh=t=>typeof t?.includeTotal=="boolean"?t.includeTotal&&Rc(t):Rc(t),Nc=t=>{let c=(t.timeRanges||[]).filter(e=>e&&e.start&&e.end);return c.length===1?{start:c[0].start,end:c[0].end}:null},qc=t=>{let c=(t.sortBy||"").toLowerCase();return c==="asc"||c==="startasc"||c==="oldest"?1:-1},jc=t=>JSON.stringify(j(L({},t),{timeRanges:[]})),oh=(t,c,e,n)=>{if(!e||jc(t)!==jc(c))return null;let i=Nc(t),o=Nc(c);if(!i||!o||i.start===o.start&&i.end===o.end)return null;if(o.start>=i.start&&o.end<=i.end)return{kind:"window",range:o};let a,l;if(o.end===i.end&&o.start<i.start)a={start:o.start,end:i.start},l="head";else if(o.start===i.start&&o.end>i.end)a={start:i.end,end:o.end},l="tail";else return null;let g=qc(c)===-1?"tail":"head",m=!!e&&e.hasMore===!1,y=l===g;return!y&&!m?{kind:"window",range:o}:a.end-a.start<=n?{kind:"extend",range:a,prepend:y}:null},ct=(t,c)=>{if(!t||!t.length||c<=0)return[];let e=[];for(let n=0;n<t.length;n+=c)e.push(t.slice(n,n+c));return e},sh=t=>{let c=t&&t.data!==void 0?t.data:t;return c?Array.isArray(c)?c:Array.isArray(c.timelines)?c.timelines:Array.isArray(c.timeline)?c.timeline:Array.isArray(c.items)?c.items:c.device?[c]:[]:[]},lh=t=>{let c=t&&t.data!==void 0?t.data:t;return c?Array.isArray(c)?c:Array.isArray(c.timelines)?c.timelines:Array.isArray(c.devices)?c.devices:Array.isArray(c.results)?c.results:c.device||Array.isArray(c.markers)?[c]:[]:[]},$c=(t,c=[])=>{if(c&&c.length)return c.filter(Boolean).map(o=>({value:o,label:o}));let e=t.devices||[],n=new Set(t.devicesAutoExcluded||[]),i=(t.devicesAuto||[]).filter(o=>!n.has(o.value)&&!e.some(a=>a.value===o.value));return e.concat(i)},Mt=t=>$c(t,[]),Vc=(t,c=[])=>{let e=Mt(t);if(!c||!c.length)return[];let n=new Set((c||[]).filter(Boolean));return e.filter(i=>i&&i.value&&n.has(i.value))},Ni=(t,c=[])=>{let e=Vc(t,c);return e.length>0?e:Mt(t)},Hc=t=>{let c=(t.timeRanges||[]).find(n=>n&&n.start);if(!c||!c.start)return null;let e=Et(c.start);return{start:e.start,end:e.end}};function dt(t,c=[]){let e=(c||[]).filter(Boolean),n=e.length>0;return{timeRanges:t.timeRanges,sites:n?void 0:t.sites.map(o=>o.value),groups:n?void 0:t.groups.map(o=>o.value),devices:n?e:t.devices.map(o=>o.value),excludedDevices:n?void 0:t.devicesAutoExcluded,markers:t.markers.map(o=>o.value),events:t.events.map(o=>o.value),tags:t.tags.map(o=>o.value),regions:t.regions,starred:t.starred===null?void 0:t.starred,sortBy:t.sortBy===null?void 0:t.sortBy}}var Gc=(t,c=[])=>{let e=Hc(t);if(!e)return null;let n=$c(t,c);if(!n.length)return null;let i=dt(t,c);return j(L({},i),{sites:void 0,groups:void 0,excludedDevices:void 0,devices:n.map(o=>o.value),timeRanges:[e]})},ch=t=>{let c=Hc(t);return j(L({},t),{timeRanges:c?[c]:[]})},wn=(t,c)=>{let e=Gc(t,c);if(e)return new Er({filter:e});let n={metric:"recordings_count",granularity:"hour",timezone:"UTC",series:[]};return new dn({data:{chart:n}})},zc=(()=>{class t{constructor(e,n,i,o){this.actions$=e,this.store=n,this.mediaService=i,this.tasksService=o,this.TIMELINE_BATCH_SIZE=10,this.TIMELINE_VISIBLE_IDS_DEBOUNCE_MS=140,this.TIMELINE_MEDIA_REQUEST_CONCURRENCY=4,this.TIMELINE_MARKER_REQUEST_CONCURRENCY=4,this.MEDIA_PAGE_LIMIT=20,this.MEDIA_WINDOW_MAX_DELTA_SECONDS=6*3600,this.MEDIA_WINDOW_DELTA_PAGE_LIMIT=200,this.MEDIA_WINDOW_DELTA_MAX_PAGES=10,this.filterChanges$=this.actions$.pipe(I(Jt,Yt,Xt,Ct,Zi,bt),At(200),oe(this.store.select(Ce)),S(([,a])=>a),ke((a,l)=>Ae(a)===Ae(l)),je({bufferSize:1,refCount:!0})),this.effectiveFilterChanges$=this.actions$.pipe(I(Jt,Yt,Xt,Ct,Zi,bt,ga,fa),At(200),oe(this.store.select(Ce),this.store.select(ye)),S(([,a,l])=>({filter:a,devicesHighlighted:l})),ke((a,l)=>Ae(a.filter)===Ae(l.filter)&&JSON.stringify(a.devicesHighlighted||[])===JSON.stringify(l.devicesHighlighted||[])),je({bufferSize:1,refCount:!0})),this.chartFilterChanges$=this.effectiveFilterChanges$.pipe(S(({filter:a,devicesHighlighted:l})=>({filter:a,devicesHighlighted:l,chartFilter:Gc(a,l),chartFilterHash:Ae(ch(a))})),ke((a,l)=>a.chartFilterHash===l.chartFilterHash&&JSON.stringify(a.devicesHighlighted||[])===JSON.stringify(l.devicesHighlighted||[])),je({bufferSize:1,refCount:!0})),this.timelineVisibleDeviceIds$=this.actions$.pipe(I(Ka),S(a=>a&&a.payload?a.payload:[]),gt([]),S(a=>
2Array.from(new Set((a||[]).filter(Boolean))).sort()),At(this.TIMELINE_VISIBLE_IDS_DEBOUNCE_MS),ke((a,l)=>Ri(a,l)),je({bufferSize:1,refCount:!0})),this.timelineFilter$=this.store.select(Ce).pipe(ke((a,l)=>Ae(a)===Ae(l)),je({bufferSize:1,refCount:!0})),this.siteGroupSelection$=this.filterChanges$.pipe(S(a=>{let l=(a.sites||[]).concat(a.sitesAuto||[]).map(m=>m.value).filter(Boolean).sort(),g=(a.groups||[]).concat(a.groupsAuto||[]).map(m=>m.value).filter(Boolean).sort();return{sites:l,groups:g}}),ke((a,l)=>Ri(a.sites,l.sites)&&Ri(a.groups,l.groups))),this.timelineKeyChanges$=Pt([this.timelineFilter$,this.timelineVisibleDeviceIds$]).pipe(S(([a,l])=>{let g=(a.timeRanges||[]).find(k=>k&&k.start),m=g&&g.start?nh(g.start):"",y=ah(a),M=Vc(a,l).map(k=>k.value).sort();return{filter:a,key:JSON.stringify({day:m,devices:M,filterHash:y}),dayKey:m,deviceIds:M,filterHash:y}}),ke((a,l)=>a.key===l.key),gt(null),Lt(),S(([a,l])=>({filter:l.filter,dayChanged:!a||a.dayKey!==l.dayKey,deviceIds:l.deviceIds,filterChanged:!a||a.filterHash!==l.filterHash}))),this.autoSelectDevices$=w(()=>this.siteGroupSelection$.pipe(oe(this.store.select(cs),this.store.select(ui)),K(([{sites:a,groups:l},g,m])=>{let y=typeof m=="string"&&m.trim().length>0;if(!a.length&&!l.length)return le([new rn({devices:[]}),new on({deviceIds:[]})]);let M={filter:{sites:a.length?a:void 0,groups:l.length?l:void 0},pagination:{limit:1e3}};return this.fetchAllDeviceOptions(M).pipe(K(k=>{let P=new Set(k.map(E=>E.value)),A=(g||[]).filter(E=>P.has(E)),F=[new rn({devices:k}),new on({deviceIds:A})];return y||F.splice(1,0,new Zt({devices:k})),le(F)}))}))),this.syncAutoDevicesAfterSearchClear$=w(()=>this.actions$.pipe(I(Ca),oe(this.store.select(ls),this.store.select(ui)),ae(([,a,l])=>!(typeof l=="string"&&l.trim().length>0)&&!!a&&a.length>0),S(([,a])=>new Zt({devices:a})))),this.clearFilterHighlightOnPrimaryFilterChange$=w(()=>this.actions$.pipe(I(Yt,Xt,bt,Ct),oe(this.store.select(ye)),ae(([a,l])=>{if(!l||!l.length)return!1;let g=a.type;if(g===bt||g===Ct)return!0;let m=a.payload&&a.payload.filterKey?a.payload.filterKey:null;return m==="sites"||m==="groups"||m==="devices"}),S(()=>new Ya({reason:"primary-filter-changed"})))),this.filterChanged$=w(()=>this.effectiveFilterChanges$.pipe(gt(null),Lt(),oe(this.store.select(hi)),ne(([[a,l],g])=>{let{filter:m,devicesHighlighted:y}=l,M=dt(m,y),k=new Xe({filter:M,pagination:{limit:20}});if(!a||!Ri(a.devicesHighlighted||[],y||[]))return D(k);let P=oh(a.filter,m,g,this.MEDIA_WINDOW_MAX_DELTA_SECONDS);return P?P.kind==="window"?D(new xr({filter:M,range:P.range})):D(new br({filter:M,range:P.range,sortDir:qc(m),prepend:P.prepend})):D(k)}))),this.extendMediaWindow$=w(()=>this.actions$.pipe(I(tn),K(a=>{let{filter:l,range:g,sortDir:m}=a.payload,M={filter:j(L({},l),{timeRanges:[g]}),pagination:{limit:this.MEDIA_WINDOW_DELTA_PAGE_LIMIT,cursor:null}},k=0,P=!1;return this.mediaService.getMedia(M).pipe(mt(A=>{k++;let F=Qt(A),E=F?F.nextCursor:null;return!!F&&F.hasMore!==!1&&!!E?k>=this.MEDIA_WINDOW_DELTA_MAX_PAGES?(P=!0,se):this.mediaService.getMedia(j(L({},M),{pagination:j(L({},M.pagination||{}),{cursor:E})})):se}),Tt((A,F)=>A.concat(Kt(F,"media")),[]),S(A=>P?new Xe({filter:l,pagination:{limit:20}}):new Cr({filter:l,media:A,sortDir:m})),V(()=>D(new Xe({filter:l,pagination:{limit:20}}))))}))),this.topUpMediaWindow$=w(()=>this.actions$.pipe(I(nn,Pa,Ea),oe(this.store.select(os),this.store.select(hi)),ae(([,a,l])=>a<this.MEDIA_PAGE_LIMIT&&!!l&&l.hasMore!==!1),S(()=>new Xe({})))),this.chartFilterChanged$=w(()=>this.chartFilterChanges$.pipe(oe(this.store.select(Ne)),ae(([,a])=>a==="chart"),S(([{filter:a,devicesHighlighted:l}])=>wn(a,l)))),this.clearTimelineWhenHiddenFilterChanges$=w(()=>this.effectiveFilterChanges$.pipe(oe(this.store.select(Ne)),ae(([,a])=>a==="chart"),S(()=>new tt))),this.refreshMedia$=w(()=>this.actions$.pipe(I(Oa),oe(this.store.select(Ce),this.store.select(ye),this.store.select(it),this.timelineVisibleDeviceIds$,this.store.select(Ne)),ne(([,a,l,g,m,y])=>{let M=[new Sr,new Xe({filter:dt(a,l),pagination:{limit:20,cursor:null}}),new Ye];if(y==="chart"&&M.push(wn(a,l)),y==="timeline"){let k=Mt(a),P=Ni(a,m||[]);if(!(a.timeRanges||[]).some(z=>z&&z.start&&z.end)||!k.length)return M.push(new tt),le(M);let F=!!g&&g.currentScale===3600,E=F?ge.Hour:ge.Day,Q=P.map(z=>z.value);
2ct(Q,this.TIMELINE_BATCH_SIZE).forEach(z=>{let J=wt(a,z,g,F);if(J){let U=F&&g?{granularity:E,hourStart:g.startTime}:{granularity:E};M.push(new Ze(z,J,U))}let T=kt(a,z,g,F);if(T){let U=F&&g?{granularity:E,hourStart:g.startTime}:{granularity:E};M.push(new et(z,T,U))}})}return le(M)}))),this.triggerTimeline$=w(()=>this.timelineKeyChanges$.pipe(oe(this.store.select(Ns),this.store.select(gn),this.store.select(it),this.store.select(ye),this.store.select(Ne)),ne(([a,l,g,m,y,M])=>{if(M!=="timeline")return se;let k=a.filter,P=Mt(k);if(!(k.timeRanges||[]).some($=>$&&$.start&&$.end)||!P.length)return D(new tt);let F=P.map($=>$.value),E=(a.deviceIds||[]).filter(Boolean),Q=!!m&&m.currentScale===3600,ee=m?m.startTime:0,z=g&&Array.isArray(g.mediaHour)?g.mediaHour:[],J=Q?z.filter($=>$&&$.hourStart===ee):l||[],T=new Set(J.map($=>$&&$.device&&$.device.key?$.device.key:null).filter($=>!!$)),U=[];T.forEach($=>{(!F.includes($)||!E.includes($))&&U.push(new no($))});let Me=a.dayChanged||a.filterChanged?E:E.filter($=>!T.has($));return ct(Me,this.TIMELINE_BATCH_SIZE).forEach($=>{let pt=wt(k,$,m,Q);if(pt){let ut=Q?ge.Hour:ge.Day,ji=Q&&m?{granularity:ut,hourStart:m.startTime}:{granularity:ut};U.push(new Ze($,pt,L({},ji)))}let ht=kt(k,$,m,Q);if(ht){let ut=Q?ge.Hour:ge.Day,ji=Q&&m?{granularity:ut,hourStart:m.startTime}:{granularity:ut};U.push(new et($,ht,L({},ji)))}}),U.length?le(U):se}))),this.triggerTimelineOnScale$=w(()=>this.actions$.pipe(I(Wa),oe(this.store.select(Ce),this.store.select(ye),this.store.select(it),this.store.select(gn),this.timelineVisibleDeviceIds$,this.store.select(Ne)),ne(([,a,l,g,m,y,M])=>{if(M!=="timeline")return se;let k=Ni(a,y||[]);if(!(a.timeRanges||[]).some(T=>T&&T.start&&T.end)||!k.length||!g)return se;if(g.currentScale!==3600)return se;let A=[],F=k.map(T=>T.value),E=g.startTime,Q=new Set((m&&m.mediaHour||[]).filter(T=>T&&T.hourStart===E&&T.device&&T.device.key).map(T=>T.device.key)),ee=new Set((m&&m.markersHour||[]).filter(T=>T&&T.hourStart===E&&T.deviceId).map(T=>T.deviceId));return ct(F.filter(T=>!Q.has(T)),this.TIMELINE_BATCH_SIZE).forEach(T=>{let U=wt(a,T,g,!0);U&&A.push(new Ze(T,U,{granularity:ge.Hour,hourStart:g.startTime}))}),ct(F.filter(T=>!ee.has(T)),this.TIMELINE_BATCH_SIZE).forEach(T=>{let U=kt(a,T,g,!0);U&&A.push(new et(T,U,{granularity:ge.Hour,hourStart:g.startTime}))}),A.length?le(A):se}))),this.triggerTimelineDayOnZoomOut$=w(()=>this.actions$.pipe(I(Ua),S(a=>a.payload),gt(null),Lt(),ae(([a,l])=>a===3600&&l!==3600),oe(this.store.select(Ce),this.store.select(ye),this.store.select(it),this.timelineVisibleDeviceIds$,this.store.select(Ne)),ne(([,a,l,g,m,y])=>{if(y!=="timeline")return se;let M=Ni(a,m||[]);if(!(a.timeRanges||[]).some(E=>E&&E.start&&E.end)||!M.length||!g)return se;let P=[],A=M.map(E=>E.value);return ct(A,this.TIMELINE_BATCH_SIZE).forEach(E=>{let Q=wt(a,E,g,!1);Q&&P.push(new Ze(E,Q,{granularity:ge.Day}));let ee=kt(a,E,g,!1);ee&&P.push(new et(E,ee,{granularity:ge.Day}))}),P.length?le(P):se}))),this.timelineOverviewChanged$=w(()=>this.actions$.pipe(I(Qa),oe(this.store.select(Ce),this.store.select(ye),this.store.select(it),this.timelineVisibleDeviceIds$),ne(([a,l,g,m,y])=>{if(a.payload==="chart")return D(wn(l,g));let M=Mt(l),k=Ni(l,y||[]);if(!(l.timeRanges||[]).some(z=>z&&z.start&&z.end)||!M.length)return D(new tt);let A=!!m&&m.currentScale===3600,F=A?ge.Hour:ge.Day,E=[new tt],Q=k.map(z=>z.value);return ct(Q,this.TIMELINE_BATCH_SIZE).forEach(z=>{let J=wt(l,z,m,A);if(J){let U=A&&m?{granularity:F,hourStart:m.startTime}:{granularity:F};E.push(new Ze(z,J,U))}let T=kt(l,z,m,A);if(T){let U=A&&m?{granularity:F,hourStart:m.startTime}:{granularity:F};E.push(new et(z,T,U))}}),E.length?le(E):se}))),this.loadMedia$=w(()=>this.actions$.pipe(I(Ma),oe(this.store.select(Ce),this.store.select(ye),this.store.select(hi)),ae(([a,,,l])=>!!(a.payload&&a.payload.filter)||!l||l.hasMore!==!1),K(([a,l,g,m])=>{let y=a.payload||{},M=!!y.filter,k=y.filter||dt(l,g),P=M?y.pagination?j(L({},y.pagination),{cursor:null}):{cursor:null}:y.pagination||m||{},A=j(L({},P),{limit:P&&typeof P.limit<"u"&&P.limit!==null?P.limit:this.MEDIA_PAGE_LIMIT,includeTotal:!1}),F=j(L({},y),{filter:k,pagination:A});return this.mediaService.getMedia(F).pipe(S(E=>new vr(E)),V(E=>D(new _r({message:re(E,"media_fetch_failed")}))),Mn(this.actions$.pipe(I(nn,tn))))}))),this.loadExportMedia$=w(()=>this.actions$.pipe(I(Ia),oe(this.store.select(Ce),this.store.select(ye),this.store.select(ss)),ae(([a,,,l])=>!!(a.payload&&a.payload.filter)||!l||l.hasMore!==!1),K(([a,l,g,m])=>{let y=a.payload||{},M=!!y.pagination&&typeof y.pagination.cursor<"u"&&y.pagination.cursor!==null,k=!!y.filter&&!M,P=y.filter||dt(l,g),A=k?y.pagination?j(L({},y.pagination),{cursor:null}):{cursor:null}:y.pagination||m||{},F=j(L({},A),{limit:A&&typeof A.limit<"u"&&A.limit!==null?A.limit:this.MEDIA_PAGE_LIMIT,includeTotal:rh(A)}),E=j(L({},y),{filter:P,pagination:F});return this.mediaService.getMedia(E).pipe(S(Q=>new yr(Q)),V(Q=>D(new wr({message:re(Q,"export_media_fetch_failed")}))))}))),this.shareMedia$=w(()=>this.actions$.pipe(I(Ta),K(a=>this.mediaService.shareMedia(a.payload).pipe(S(()=>new kr(a.payload)),V(l=>D(new Mr({message:re(l,"share_media_failed")}))))))),this.loadMediaChart$=w(()=>this.actions$.pipe(I(Aa),K(a=>this.mediaService.getMediaChartTimeSeries(a.payload).pipe(S(l=>
2new dn(l)),V(l=>D(new Pr({message:re(l,"media_chart_fetch_failed")}))))))),this.loadMediaDetail$=w(()=>this.actions$.pipe(I(La),K(a=>{let l=a.payload.mediaId;if(!l)return D(new pn({message:"media_id_missing"}));let g=a.payload.fallbackCaseMediaId;return this.mediaService.getMediaById(l,g).pipe(S(m=>new Or(m)),V(m=>D(new pn({message:re(m,"media_fetch_failed")}))))}))),this.triggerMediaSitesLoad$=w(()=>this.actions$.pipe(I(an),S(a=>a.payload&&a.payload.data?a.payload.data.media:null),S(a=>{if(!a)return null;let g=(a.atRuntimeMetadata||{}).device||{};return a.deviceKey||g.key||null}),ke(),ae(a=>!!a),S(a=>new Fr({filter:{deviceKeys:[a]},pagination:null,flags:{includeMetadata:!0}})))),this.loadMediaSites$=w(()=>this.actions$.pipe(I(Fa),K(a=>this.mediaService.getSiteOptions(a.payload).pipe(S(l=>new Rr(l)),V(l=>D(new Nr({message:re(l,"media_sites_fetch_failed")}))))))),this.loadMediaSequence$=w(()=>this.actions$.pipe(I(Ra),K(a=>{let l=a.payload,g=0;return this.mediaService.getMedia(l).pipe(mt(m=>{let y=Qt(m);if(!(!!y&&y.hasMore!==!1&&!!y.nextCursor))return se;let k=j(L({},l),{pagination:j(L({},l.pagination||{}),{cursor:y.nextCursor})});return this.mediaService.getMedia(k)}),S(m=>{let y=g===0?new jr(m):new Br(m);return g++,y}),V(m=>D(new qr({message:re(m,"media_sequence_fetch_failed")}))))}))),this.triggerMediaMarkersLoad$=w(()=>this.actions$.pipe(I(an),S(a=>{let l=a.payload;return l&&l.data?l.data.media:null}),ae(a=>!!a&&a.startTimestamp!=null&&a.endTimestamp!=null),S(a=>new Ir({filter:{timeRanges:[{start:a.startTimestamp,end:a.endTimestamp}]}})))),this.loadMediaMarkers$=w(()=>this.actions$.pipe(I(Da),K(a=>this.mediaService.getMarkerOptions(a.payload).pipe(S(l=>new Tr(l)),V(l=>D(new Ar({message:re(l,"media_markers_fetch_failed")}))))))),this.updateMedia$=w(()=>this.actions$.pipe(I(Na),K(a=>this.mediaService.updateMedia(a.mediaId,a.payload).pipe(S(l=>new Lr(l)),V(l=>D(new Dr({message:re(l,"media_update_failed")}))))))),this.submitFaceRedaction$=w(()=>this.actions$.pipe(I(ja),K(a=>this.mediaService.submitFaceRedaction(a.payload).pipe(S(l=>new $r(l)),V(l=>D(new Vr({message:re(l,"submit_face_redaction_failed")}))))))),this.saveFaceRedaction$=w(()=>this.actions$.pipe(I(Ba),K(a=>this.mediaService.saveFaceRedaction(a.payload).pipe(S(l=>new Hr(l)),V(l=>D(new Gr({message:re(l,"save_face_redaction_failed")}))))))),this.loadTaskCaseMedia$=w(()=>this.actions$.pipe(I(qa),ne(a=>this.mediaService.listTaskCaseMedia(a.payload.taskId).pipe(S(l=>new zr({taskId:a.payload.taskId,caseMedia:l&&l.data&&l.data.caseMedia||[]})),V(l=>D(new Ur({taskId:a.payload.taskId,message:re(l,"load_case_media_failed")}))))))),this.createMediaEdit$=w(()=>this.actions$.pipe(I($a),ne(a=>this.mediaService.createMediaEdit(a.payload.taskId,a.payload.request).pipe(S(l=>new Wr({taskId:a.payload.taskId,caseMedia:l&&l.data&&l.data.caseMedia||null})),V(l=>D(new Kr({taskId:a.payload.taskId,message:re(l,"create_media_edit_failed")}))))))),this.updateCaseMediaSelectedVersion$=w(()=>this.actions$.pipe(I(Va),ne(a=>this.mediaService.updateCaseMediaSelectedVersion(a.payload.taskId,a.payload.caseMediaId,{selectedVersionId:a.payload.selectedVersionId}).pipe(S(l=>new Qr({taskId:a.payload.taskId,caseMedia:l&&l.data&&l.data.caseMedia||null})),V(l=>D(new Jr({taskId:a.payload.taskId,caseMediaId:a.payload.caseMediaId,message:re(l,"update_case_media_selected_version_failed")}))))))),this.loadTaskLegacyMedia$=w(()=>this.actions$.pipe(I(Ha),ne(a=>this.tasksService.getTaskMedia(a.payload.taskId,"",a.payload.limit||25).pipe(S(l=>{let g=l&&l.data||{},m=l&&l.metadata&&l.metadata.pagination||{};return new Yr({taskId:a.payload.taskId,media:g.media||[],cursor:m.cursor||"",nextCursor:m.nextCursor||"",hasMore:!!m.hasMore,total:m.total||0})}),V(l=>D(new Xr({taskId:a.payload.taskId,message:re(l,"load_legacy_media_failed")}))))))),this.loadMoreTaskLegacyMedia$=w(()=>this.actions$.pipe(I(Ga),ne(a=>this.tasksService.getTaskMedia(a.payload.taskId,a.payload.cursor||"",a.payload.limit||25).pipe(S(l=>{let g=l&&l.data||{},m=l&&l.metadata&&l.metadata.pagination||{};return new Zr({taskId:a.payload.taskId,media:g.media||[],cursor:m.cursor||"",nextCursor:m.nextCursor||"",hasMore:!!m.hasMore,total:m.total||0})}),V(l=>D(new eo({taskId:a.payload.taskId,message:re(l,"load_more_legacy_media_failed")}))))))),this.loadDays$=w(()=>this.actions$.pipe(I(ka),K(()=>this.mediaService.getDays().pipe(S(a=>{let l=[];
2return(a||[]).forEach(g=>{!g||typeof g!="string"||l.push(g.substr(6,4)+"-"+g.substr(3,2)+"-"+g.substr(0,2))}),l.sort((g,m)=>new Date(m).getTime()-new Date(g).getTime()),new gr(l)}),V(a=>D(new fr({message:re(a,"failed getting days")}))))))),this.loadAllFilterOptions$=w(()=>this.actions$.pipe(I(en),oe(this.store.select(ms),this.store.select(us),this.store.select(_s),this.store.select(vs),this.store.select(ps),this.store.select(ds),this.store.select(Ds),this.store.select(Ls),this.store.select(Is),this.store.select(Os),this.store.select(Ms),this.store.select(ks),this.store.select(Ss),this.store.select(xs),this.store.select(as),this.store.select(rs),this.store.select(Ce)),ne(([a,l,g,m,y,M,k,P,A,F,E,Q,ee,z,J,T,U,Me])=>{let ce=!!(a&&a.payload&&a.payload.force),$=[];if((ce&&!g||!ce&&!l&&!g)&&$.push(new Xa({filter:{}})),(ce&&!y||!ce&&!m&&!y)&&$.push(new tr({filter:{}})),(ce&&!k||!ce&&!M&&!k)&&$.push(new ar({filter:{}})),(ce&&!A||!ce&&!P&&!A)&&$.push(new sn({filter:{}})),ce&&!E||!ce&&!F&&!E){let pt=(Me&&Me.markerCategories||[]).map(ht=>ht&&ht.value).filter(Boolean);pt.length?$.push(new ei({filter:{categories:pt}})):$.push(new ei({filter:{}}))}return(ce&&!ee||!ce&&!Q&&!ee)&&$.push(new cn({filter:{}})),(ce&&!J||!ce&&!z&&!J)&&$.push(new ln({filter:{}})),(ce&&!U||!ce&&!T&&!U)&&$.push(new Ye),$.length===0?se:le($)}))),this.refreshMarkerOptionsForSelectedDay$=w(()=>this.actions$.pipe(I(Jt),ae(a=>H.featureMediaFilterMarkerOptionsByDateEnabled===!0&&a&&a.payload&&a.payload.filter&&Object.prototype.hasOwnProperty.call(a.payload.filter,"timeRanges")),ne(()=>le([new sn({filter:{}}),new ei({filter:{}}),new ln({filter:{}}),new cn({filter:{}})])))),this.prefetchInitialRouteDevices$=w(()=>this.actions$.pipe(I(en),S(a=>{let l=a&&a.payload&&a.payload.initialDeviceIds||[];return Array.from(new Set((l||[]).filter(Boolean)))}),ae(a=>a.length>0),K(a=>this.mediaService.getDeviceOptions({filter:{deviceIds:a},pagination:null}).pipe(S(l=>{let g=l&&l.data&&l.data.devices?l.data.devices:[];return new Zt({devices:g})}),V(()=>se))))),this.getFilterDevices$=w(()=>this.createFilterOptionEffect(ba,this.mediaService.getDeviceOptions.bind(this.mediaService),hs,ui,rr,or)),this.getFilterSites$=w(()=>this.createFilterOptionEffect(va,this.mediaService.getSiteOptions.bind(this.mediaService),gs,fs,Za,er)),this.getFilterGroups$=w(()=>this.createFilterOptionEffect(_a,this.mediaService.getGroupOptions.bind(this.mediaService),bs,Cs,ir,nr)),this.getFilterMarkerCategories$=w(()=>this.createFilterOptionEffect(xa,this.mediaService.getMarkerCategoryOptions.bind(this.mediaService),Fs,Rs,sr,lr,a=>Fi(a,H.featureMediaFilterMarkerOptionsByDateEnabled===!0))),this.getFilterMarkers$=w(()=>this.createFilterOptionEffect(Sa,this.getMarkerOptionsWithPriority.bind(this),Ts,As,cr,dr,a=>Fi(a,H.featureMediaFilterMarkerOptionsByDateEnabled===!0,!0))),this.getFilterEvents$=w(()=>this.createFilterOptionEffect(ya,this.mediaService.getMarkerEventOptions.bind(this.mediaService),ys,ws,pr,hr,a=>Fi(a,H.featureMediaFilterMarkerOptionsByDateEnabled===!0))),this.getFilterTags$=w(()=>this.createFilterOptionEffect(wa,this.mediaService.getMarkerTagOptions.bind(this.mediaService),Es,Ps,ur,mr,a=>Fi(a,H.featureMediaFilterMarkerOptionsByDateEnabled===!0))),this.getTimelineOfDeviceOfDay=w(()=>this.actions$.pipe(I(za),ne(a=>{let{payload:l}=a,g=Array.isArray(a.deviceIds)?a.deviceIds.filter(Boolean):[];if(!g.length)return D(new xt({message:"timeline_device_ids_missing"},{deviceIds:g}));let m=a.meta&&a.meta.granularity===ge.Hour,y=a.meta&&typeof a.meta.hourStart=="number"?a.meta.hourStart:void 0,M=l&&l.filter,k=M&&Array.isArray(M.timeRanges)&&M.timeRanges.length>0?M.timeRanges[0]:null,P=k&&typeof k.start=="number"?k.start:void 0,A=k&&typeof k.end=="number"?k.end:void 0,F=typeof P=="number"&&typeof A=="number"?A-P:void 0,E=y,Q=m||F===3600;return this.mediaService.getTimelineMedia(l).pipe(ne(ee=>{let z=sh(ee);if(!z.length)return le(g.map(U=>new xt({message:"timeline_batch_empty"},{deviceId:U})));let J=new Set,T=[];return z.forEach(U=>{let Me=U&&U.device&&U.device.key?U.device.key:null;Me&&(J.add(Me),T.push(new to(j(L({},ee||{}),{data:U}),{isHour:Q,hourStart:E,deviceId:Me})))}),g.forEach(U=>{J.has(U)||T.push(new xt({message:"timeline_device_missing_from_batch"},{deviceId:U}))}),le(T)}),V(ee=>D(new xt({message:re(ee,"timeline_fetch_failed")},{deviceIds:g}))))},this.TIMELINE_MEDIA_REQUEST_CONCURRENCY))),this.getTimelineMarkersForDevice=w(()=>this.actions$.pipe(I(Ja),ne(a=>{let{payload:l}
2=a,g=Array.isArray(a.deviceIds)?a.deviceIds.filter(Boolean):[];if(!g.length)return D(new St({message:"timeline_marker_device_ids_missing"},{deviceIds:g}));let m=a.meta&&a.meta.granularity===ge.Hour,y=a.meta&&typeof a.meta.hourStart=="number"?a.meta.hourStart:void 0,M=l&&l.filter,k=M&&Array.isArray(M.timeRanges)?M.timeRanges:[],P=k.length?k[0]:null,A=!!P&&typeof P.start=="number"&&typeof P.end=="number"&&P.end-P.start<=3600,F=!!m||A;return this.mediaService.getTimelineMarkers(l).pipe(ne(E=>{let Q=lh(E);if(!Q.length)return le(g.map(J=>new St({message:"timeline_marker_batch_empty"},{deviceId:J})));let ee=new Set,z=[];return Q.forEach(J=>{let T=J&&J.device&&J.device.key?J.device.key:J&&J.deviceId?J.deviceId:null;T&&(ee.add(T),z.push(new io(j(L({},E||{}),{data:J}),{isHour:F,hourStart:y,deviceId:T})))}),g.forEach(J=>{ee.has(J)||z.push(new St({message:"timeline_marker_device_missing_from_batch"},{deviceId:J}))}),le(z)}),V(E=>D(new St({message:re(E,"timeline_markers_fetch_failed")},{deviceIds:g}))))},this.TIMELINE_MARKER_REQUEST_CONCURRENCY)))}fetchAllDeviceOptions(e){return this.mediaService.getDeviceOptions(e).pipe(mt(n=>{let i=n&&n.metadata?n.metadata.pagination:null;return!!i&&i.hasMore!==!1&&!!i.nextCursor?this.mediaService.getDeviceOptions(j(L({},e),{pagination:j(L({},e.pagination||{}),{cursor:i.nextCursor})})):se}),S(n=>n&&n.data?n.data.devices||[]:[]),Tt((n,i)=>(i.forEach(o=>{n.some(a=>a.value===o.value)||n.push(o)}),n),[]))}fetchAllMarkerOptions(e){let n=j(L({},e),{pagination:{limit:200}});return this.mediaService.getMarkerOptions(n).pipe(mt(i=>{let o=Qt(i);return!o||o.hasMore===!1||!o.nextCursor?se:this.mediaService.getMarkerOptions(j(L({},n),{pagination:{limit:200,cursor:o.nextCursor}}))}),S(i=>Kt(i,"markers")),Tt((i,o)=>vn(i,o),[]))}getMarkerOptionsWithPriority(e){let n=Wl(H.featureMediaFilterMarkerCategoryPriorityCategories),i=e.filter&&e.filter.categories?e.filter.categories:[],o=!e.pagination||!e.pagination.cursor;if(H.featureMediaFilterMarkerCategoryPriorityEnabled!==!0||!o||n.length===0)return this.mediaService.getMarkerOptions(e);let a=j(L({},e),{filter:j(L({},e.filter||{}),{categories:n})});return Ot([this.mediaService.getMarkerOptions(e),this.fetchAllMarkerOptions(a)]).pipe(S(([l,g])=>j(L({},l),{data:j(L({},l.data||{}),{markers:vn(Kl(g,i),Kt(l,"markers"))})})))}createFilterOptionEffect(e,n,i,o,a,l,g=()=>({})){return this.actions$.pipe(I(e),oe(this.store.select(i),this.store.select(o),this.store.select(Ce)),ae(([m,y])=>!!(m&&m.payload||{}).filter||!y||y.hasMore!==!1),K(([m,y,M,k])=>{let P=m.payload||{},A=!!P.filter,F=L(L(L({},g(k)),A?P.filter||{}:{}),M?{name:M}:{}),E=A?null:y,Q=j(L({},P),{filter:F,pagination:E});return n(Q).pipe(S(ee=>new a(ee)),V(ee=>D(new l({message:re(ee,"fetch_failed")}))))}))}static{this.\u0275fac=function(n){return new(n||t)(X(ze),X(me),X(wi),X(mi))}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac})}}return t})();var Uc={connectOnCreate:!1};function Lg(){return new vt(Uc)}var dh=(()=>{class t{static forRoot(){return{ngModule:ph,providers:lt.getProviders()}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=Hi({type:t})}static{this.\u0275inj=Vi({imports:[qn,lt.getAppRoutes(),Ql,nl,dl,Gl,Zn,ea,ta.forRoot(Uc),$l]})}}return t})(),ph=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=Hi({type:t})}static{this.\u0275inj=Vi({providers:[...lt.getProviders(),$n(Vn())],imports:[dh,Z.forFeature("livestream",so),Z.forFeature("videowall",Ul),Z.forFeature("counting",Zl),Z.forFeature("devices",pa),Z.forFeature("sites",Bs),Z.forFeature("groups",Hs),Z.forFeature("recordings",Hl),Z.forFeature("accounts",Ml),Z.forFeature("roles",rc),Z.forFeature("locations",cc),Z.forFeature("profile",Ko),Z.forFeature("subscription",go),Z.forFeature("notifications",Xo),Z.forFeature("tasks",Ks),Z.forFeature("watchlist",el),Z.forFeature("analytics",sc),Z.forFeature("channels",tc),Z.forFeature("day",Yl),Z.forFeature("home",wc),Z.forFeature("dashboard",wl),Z.forFeature("ios",nc),Z.forFeature("settings",ql),Z.forFeature("media",is),Qn.forFeature([oo,zl,Xl,da,Jl,Yo,ec,yc,Wo,js,Vs,Vl,kl,ac,lc,mo,Ws,Zs,oc,yl,ic,Bl,Fc,zc])]})}}return t})();export{dh as HomeModule,ph as HomeRootModule,Uc as MQTT_SERVICE_OPTIONS,Lg as mqttServiceFactory};
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.