diff --git a/404.html b/404.html index 712c91b..34d94f1 100644 --- a/404.html +++ b/404.html @@ -8,12 +8,12 @@ - + - + diff --git a/index.html b/index.html index 712c91b..34d94f1 100644 --- a/index.html +++ b/index.html @@ -8,12 +8,12 @@ - + - + diff --git a/main-RDAOI5JO.js b/main-ERHFZ4U2.js similarity index 87% rename from main-RDAOI5JO.js rename to main-ERHFZ4U2.js index d29d9f0..997fdee 100644 --- a/main-RDAOI5JO.js +++ b/main-ERHFZ4U2.js @@ -1,13 +1,13 @@ -import{$ as Jb,$a as g1,$b as W,$c as Cl,A as vi,Aa as we,Ab as T,Ac as Um,Ad as B1,B as ul,Ba as r1,Bb as l,Bc as Gd,C as Pd,Ca as o1,Cb as ki,Cc as $d,D as Rd,Da as hi,Db as qt,Dc as qd,E as jb,Ea as s1,Eb as xt,Ec as x1,F as Hb,Fa as Ns,Fb as U,Fc as so,Fd as z1,G as km,Ga as Nn,Gb as Je,Gc as S1,H as Am,Ha as a1,Hb as di,Hc as $s,I as Ni,Ia as l1,Ib as C1,Ic as E1,J as cn,Ja as qo,Jb as Yt,Jc as O1,K as Ar,Ka as tr,Kb as Zt,Kc as Oe,L as Gb,La as c1,Lb as p,Lc as M1,M as Dm,Ma as Mi,Mb as h,Mc as yl,N as dn,Na as d1,Nb as y,Nc as k1,O as $b,Oa as Fd,Ob as Z,Oc as A1,P as qb,Pa as u1,Pb as X,Pc as bl,Q as Wb,Qa as vt,Qb as ie,Qc as Wd,R as Kb,Ra as Bs,Rb as G,Rc as xe,S as Qb,Sa as hl,Sb as Bd,Sc as Vt,T as er,Ta as Lm,Tb as A,Tc as Ie,U as ro,Ua as ml,Ub as m,Uc as Ce,V as Pm,Va as zs,Vb as je,Vc as rt,W as Rm,Wa as Us,Wb as Ae,Wc as D1,X as Yb,Xa as p1,Xb as zd,Xc as nn,Y as Zb,Ya as h1,Yb as De,Yc as $,Z as Xb,Za as m1,Zb as oe,Zc as P1,_ as Vd,_a as f1,_b as q,_c as ut,a as F,aa as e1,ab as _1,ac as Le,ad as R1,b as pe,ba as oo,bb as v1,bc as _,bd as Kd,c as jM,ca as Oi,cb as Wo,cc as z,cd as rn,d as HM,da as Ld,db as fl,dc as be,dd as Xt,e as to,ea as It,eb as Ue,ec as xn,ed as Lt,f as D,fa as t1,fb as y1,fc as mt,fd as Qd,g as Fb,ga as i1,gb as Nd,gc as I1,gd as ei,h as Nb,ha as wt,hb as ve,hc as Bm,hd as Pr,i as Li,ia as Tt,ib as js,ic as R,id as V1,j as Sm,ja as se,jb as nt,jc as Ke,jd as Ko,k as Em,ka as Q,kb as yi,kc as H,kd as L1,l as Gt,la as n1,lb as st,lc as We,m as Fi,ma as Vm,mb as gl,mc as kt,n as Bb,na as le,nb as d,nc as Dr,o as Dd,oa as J,ob as w,oc as w1,p as $o,pa as ae,pb as Fm,pc as zm,q as Om,qa as pl,qb as Ne,qc as Ud,qd as F1,r as dl,ra as $t,rb as Nm,rc as ct,rd as Il,s as Mm,sa as k,sb as Ki,sc as Bt,sd as Yd,t as Ii,ta as Y,tb as L,tc as un,u as Se,ua as it,ub as ge,uc as dt,v as io,va as Tn,vb as b1,vc as Gs,w as zb,wa as Mt,wb as ye,wc as T1,x as Ub,xa as S,xb as _l,xc as jd,xd as N1,y as Re,ya as E,yb as Hs,yc as Hd,yd as Zd,z as no,za as ke,zb as g,zc as vl}from"./chunk-UEKXQC4Y.js";var P2=jM((Sue,nm)=>{"use strict";(function(i,t,e,n){"use strict";var r=["","webkit","Moz","MS","ms","o"],o=t.createElement("div"),s="function",a=Math.round,c=Math.abs,u=Date.now;function f(C,I,M){return setTimeout(ce(C,M),I)}function v(C,I,M){return Array.isArray(C)?(b(C,M[I],M),!0):!1}function b(C,I,M){var N;if(C)if(C.forEach)C.forEach(I,M);else if(C.length!==n)for(N=0;N{"use strict";(function(i,t,e,n){"use strict";var r=["","webkit","Moz","MS","ms","o"],o=t.createElement("div"),s="function",a=Math.round,c=Math.abs,u=Date.now;function f(C,I,M){return setTimeout(ce(C,M),I)}function v(C,I,M){return Array.isArray(C)?(b(C,M[I],M),!0):!1}function b(C,I,M){var N;if(C)if(C.forEach)C.forEach(I,M);else if(C.length!==n)for(N=0;N\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",ot=i.console&&(i.console.warn||i.console.log);return ot&&ot.call(i.console,N,fe),C.apply(this,arguments)}}var V;typeof Object.assign!="function"?V=function(I){if(I===n||I===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(I),N=1;N-1}function Ht(C){return C.trim().split(/\s+/g)}function _i(C,I,M){if(C.indexOf&&!M)return C.indexOf(I);for(var N=0;NWi[I]}):N=N.sort()),N}function Ls(C,I){for(var M,N,ee=I[0].toUpperCase()+I.slice(1),fe=0;fe1&&!M.firstMultiple?M.firstMultiple=bb(I):ee===1&&(M.firstMultiple=!1);var fe=M.firstInput,ot=M.firstMultiple,Ci=ot?ot.center:fe.center,Ei=I.center=Cb(N);I.timeStamp=u(),I.deltaTime=I.timeStamp-fe.timeStamp,I.angle=gm(Ci,Ei),I.distance=Td(Ci,Ei),vM(M,I),I.offsetDirection=wb(I.deltaX,I.deltaY);var Wi=Ib(I.deltaTime,I.deltaX,I.deltaY);I.overallVelocityX=Wi.x,I.overallVelocityY=Wi.y,I.overallVelocity=c(Wi.x)>c(Wi.y)?Wi.x:Wi.y,I.scale=ot?CM(ot.pointers,N):1,I.rotation=ot?bM(ot.pointers,N):0,I.maxPointers=M.prevInput?I.pointers.length>M.prevInput.maxPointers?I.pointers.length:M.prevInput.maxPointers:I.pointers.length,yM(M,I);var Jn=C.element;Et(I.srcEvent.target,Jn)&&(Jn=I.srcEvent.target),I.target=Jn}function vM(C,I){var M=I.center,N=C.offsetDelta||{},ee=C.prevDelta||{},fe=C.prevInput||{};(I.eventType===qi||fe.eventType===pi)&&(ee=C.prevDelta={x:fe.deltaX||0,y:fe.deltaY||0},N=C.offsetDelta={x:M.x,y:M.y}),I.deltaX=ee.x+(M.x-N.x),I.deltaY=ee.y+(M.y-N.y)}function yM(C,I){var M=C.lastInterval||I,N=I.timeStamp-M.timeStamp,ee,fe,ot,Ci;if(I.eventType!=tn&&(N>mM||M.velocity===n)){var Ei=I.deltaX-M.deltaX,Wi=I.deltaY-M.deltaY,Jn=Ib(N,Ei,Wi);fe=Jn.x,ot=Jn.y,ee=c(Jn.x)>c(Jn.y)?Jn.x:Jn.y,Ci=wb(Ei,Wi),C.lastInterval=I}else ee=M.velocity,fe=M.velocityX,ot=M.velocityY,Ci=M.direction;I.velocity=ee,I.velocityX=fe,I.velocityY=ot,I.direction=Ci}function bb(C){for(var I=[],M=0;M=c(I)?C<0?nl:rl:I<0?ol:sl}function Td(C,I,M){M||(M=yb);var N=I[M[0]]-C[M[0]],ee=I[M[1]]-C[M[1]];return Math.sqrt(N*N+ee*ee)}function gm(C,I,M){M||(M=yb);var N=I[M[0]]-C[M[0]],ee=I[M[1]]-C[M[1]];return Math.atan2(ee,N)*180/Math.PI}function bM(C,I){return gm(I[1],I[0],wd)+gm(C[1],C[0],wd)}function CM(C,I){return Td(I[0],I[1],wd)/Td(C[0],C[1],wd)}var IM={mousedown:qi,mousemove:jo,mouseup:pi},wM="mousedown",TM="mousemove mouseup";function xd(){this.evEl=wM,this.evWin=TM,this.pressed=!1,In.apply(this,arguments)}j(xd,In,{handler:function(I){var M=IM[I.type];M&qi&&I.button===0&&(this.pressed=!0),M&jo&&I.which!==1&&(M=pi),this.pressed&&(M&pi&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[I],changedPointers:[I],pointerType:fm,srcEvent:I}))}});var xM={pointerdown:qi,pointermove:jo,pointerup:pi,pointercancel:tn,pointerout:tn},SM={2:il,3:pM,4:fm,5:hM},Tb="pointerdown",xb="pointermove pointerup pointercancel";i.MSPointerEvent&&!i.PointerEvent&&(Tb="MSPointerDown",xb="MSPointerMove MSPointerUp MSPointerCancel");function _m(){this.evEl=Tb,this.evWin=xb,In.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}j(_m,In,{handler:function(I){var M=this.store,N=!1,ee=I.type.toLowerCase().replace("ms",""),fe=xM[ee],ot=SM[I.pointerType]||I.pointerType,Ci=ot==il,Ei=_i(M,I.pointerId,"pointerId");fe&qi&&(I.button===0||Ci)?Ei<0&&(M.push(I),Ei=M.length-1):fe&(pi|tn)&&(N=!0),!(Ei<0)&&(M[Ei]=I,this.callback(this.manager,fe,{pointers:M,changedPointers:[I],pointerType:ot,srcEvent:I}),N&&M.splice(Ei,1))}});var EM={touchstart:qi,touchmove:jo,touchend:pi,touchcancel:tn},OM="touchstart",MM="touchstart touchmove touchend touchcancel";function Sb(){this.evTarget=OM,this.evWin=MM,this.started=!1,In.apply(this,arguments)}j(Sb,In,{handler:function(I){var M=EM[I.type];if(M===qi&&(this.started=!0),!!this.started){var N=kM.call(this,I,M);M&(pi|tn)&&N[0].length-N[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:N[0],changedPointers:N[1],pointerType:il,srcEvent:I})}}});function kM(C,I){var M=Yn(C.touches),N=Yn(C.changedTouches);return I&(pi|tn)&&(M=tl(M.concat(N),"identifier",!0)),[M,N]}var AM={touchstart:qi,touchmove:jo,touchend:pi,touchcancel:tn},DM="touchstart touchmove touchend touchcancel";function Sd(){this.evTarget=DM,this.targetIds={},In.apply(this,arguments)}j(Sd,In,{handler:function(I){var M=AM[I.type],N=PM.call(this,I,M);N&&this.callback(this.manager,M,{pointers:N[0],changedPointers:N[1],pointerType:il,srcEvent:I})}});function PM(C,I){var M=Yn(C.touches),N=this.targetIds;if(I&(qi|jo)&&M.length===1)return N[M[0].identifier]=!0,[M,M];var ee,fe,ot=Yn(C.changedTouches),Ci=[],Ei=this.target;if(fe=M.filter(function(Wi){return Et(Wi.target,Ei)}),I===qi)for(ee=0;ee-1&&N.splice(fe,1)};setTimeout(ee,RM)}}function LM(C){for(var I=C.srcEvent.clientX,M=C.srcEvent.clientY,N=0;N-1&&this.requireFail.splice(I,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(C){return!!this.simultaneous[C.id]},emit:function(C){var I=this,M=this.state;function N(ee){I.manager.emit(ee,C)}M=eo&&N(I.options.event+Pb(M))},tryEmit:function(C){if(this.canEmit())return this.emit(C);this.state=Xn},canEmit:function(){for(var C=0;CI.threshold&&ee&I.direction},attrTest:function(C){return Fn.prototype.attrTest.call(this,C)&&(this.state&wn||!(this.state&wn)&&this.directionTest(C))},emit:function(C){this.pX=C.deltaX,this.pY=C.deltaY;var I=Rb(C.direction);I&&(C.additionalEvent=this.options.event+I),this._super.emit.call(this,C)}});function Cm(){Fn.apply(this,arguments)}j(Cm,Fn,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Go]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.scale-1)>this.options.threshold||this.state&wn)},emit:function(C){if(C.scale!==1){var I=C.scale<1?"in":"out";C.additionalEvent=this.options.event+I}this._super.emit.call(this,C)}});function Im(){Mr.apply(this,arguments),this._timer=null,this._input=null}j(Im,Mr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Db]},process:function(C){var I=this.options,M=C.pointers.length===I.pointers,N=C.distanceI.time;if(this._input=C,!N||!M||C.eventType&(pi|tn)&&!ee)this.reset();else if(C.eventType&qi)this.reset(),this._timer=f(function(){this.state=Or,this.tryEmit()},I.time,this);else if(C.eventType&pi)return Or;return Xn},reset:function(){clearTimeout(this._timer)},emit:function(C){this.state===Or&&(C&&C.eventType&pi?this.manager.emit(this.options.event+"up",C):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function wm(){Fn.apply(this,arguments)}j(wm,Fn,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Go]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.rotation)>this.options.threshold||this.state&wn)}});function Tm(){Fn.apply(this,arguments)}j(Tm,Fn,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Zn|Ho,pointers:1},getTouchAction:function(){return kd.prototype.getTouchAction.call(this)},attrTest:function(C){var I=this.options.direction,M;return I&(Zn|Ho)?M=C.overallVelocity:I&Zn?M=C.overallVelocityX:I&Ho&&(M=C.overallVelocityY),this._super.attrTest.call(this,C)&&I&C.offsetDirection&&C.distance>this.options.threshold&&C.maxPointers==this.options.pointers&&c(M)>this.options.velocity&&C.eventType&pi},emit:function(C){var I=Rb(C.offsetDirection);I&&this.manager.emit(this.options.event+I,C),this.manager.emit(this.options.event,C)}});function Ad(){Mr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}j(Ad,Mr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ym]},process:function(C){var I=this.options,M=C.pointers.length===I.pointers,N=C.distance{this.headers=new Map,t.split(` -`).forEach(e=>{let n=e.indexOf(":");if(n>0){let r=e.slice(0,n),o=r.toLowerCase(),s=e.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.setHeaderEntries(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Hm=class{encodeKey(t){return U1(t)}encodeValue(t){return U1(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function WM(i,t){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],c=e.get(s)||[];c.push(a),e.set(s,c)}),e}var KM=/%(\d[a-f0-9])/gi,QM={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function U1(i){return encodeURIComponent(i).replace(KM,(t,e)=>QM[e]??t)}function Xd(i){return`${i}`}var ao=class i{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Hm,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=WM(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],r=Array.isArray(n)?n.map(Xd):[Xd(n)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let r=t[n];Array.isArray(r)?r.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(Xd(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],r=n.indexOf(Xd(t.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}},eu=class{constructor(t){this.defaultValue=t}},Gm=class{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function YM(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function j1(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function H1(i){return typeof Blob<"u"&&i instanceof Blob}function G1(i){return typeof FormData<"u"&&i instanceof FormData}function ZM(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var wl=class i{constructor(t,e,n,r){this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let o;if(YM(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers||(this.headers=new Qo),this.context||(this.context=new Gm),!this.params)this.params=new ao,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),c=a===-1?"?":av.set(b,t.setHeaders[b]),c)),t.setParams&&(u=Object.keys(t.setParams).reduce((v,b)=>v.set(b,t.setParams[b]),u)),new i(e,n,o,{params:u,headers:c,context:f,reportProgress:a,responseType:r,withCredentials:s})}},qs=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(qs||{}),xl=class{constructor(t,e=nu.Ok,n="OK"){this.headers=t.headers||new Qo,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},$m=class i extends xl{constructor(t={}){super(t),this.type=qs.ResponseHeader}clone(t={}){return new i({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},tu=class i extends xl{constructor(t={}){super(t),this.type=qs.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new i({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},iu=class extends xl{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},nu=function(i){return i[i.Continue=100]="Continue",i[i.SwitchingProtocols=101]="SwitchingProtocols",i[i.Processing=102]="Processing",i[i.EarlyHints=103]="EarlyHints",i[i.Ok=200]="Ok",i[i.Created=201]="Created",i[i.Accepted=202]="Accepted",i[i.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",i[i.NoContent=204]="NoContent",i[i.ResetContent=205]="ResetContent",i[i.PartialContent=206]="PartialContent",i[i.MultiStatus=207]="MultiStatus",i[i.AlreadyReported=208]="AlreadyReported",i[i.ImUsed=226]="ImUsed",i[i.MultipleChoices=300]="MultipleChoices",i[i.MovedPermanently=301]="MovedPermanently",i[i.Found=302]="Found",i[i.SeeOther=303]="SeeOther",i[i.NotModified=304]="NotModified",i[i.UseProxy=305]="UseProxy",i[i.Unused=306]="Unused",i[i.TemporaryRedirect=307]="TemporaryRedirect",i[i.PermanentRedirect=308]="PermanentRedirect",i[i.BadRequest=400]="BadRequest",i[i.Unauthorized=401]="Unauthorized",i[i.PaymentRequired=402]="PaymentRequired",i[i.Forbidden=403]="Forbidden",i[i.NotFound=404]="NotFound",i[i.MethodNotAllowed=405]="MethodNotAllowed",i[i.NotAcceptable=406]="NotAcceptable",i[i.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",i[i.RequestTimeout=408]="RequestTimeout",i[i.Conflict=409]="Conflict",i[i.Gone=410]="Gone",i[i.LengthRequired=411]="LengthRequired",i[i.PreconditionFailed=412]="PreconditionFailed",i[i.PayloadTooLarge=413]="PayloadTooLarge",i[i.UriTooLong=414]="UriTooLong",i[i.UnsupportedMediaType=415]="UnsupportedMediaType",i[i.RangeNotSatisfiable=416]="RangeNotSatisfiable",i[i.ExpectationFailed=417]="ExpectationFailed",i[i.ImATeapot=418]="ImATeapot",i[i.MisdirectedRequest=421]="MisdirectedRequest",i[i.UnprocessableEntity=422]="UnprocessableEntity",i[i.Locked=423]="Locked",i[i.FailedDependency=424]="FailedDependency",i[i.TooEarly=425]="TooEarly",i[i.UpgradeRequired=426]="UpgradeRequired",i[i.PreconditionRequired=428]="PreconditionRequired",i[i.TooManyRequests=429]="TooManyRequests",i[i.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",i[i.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",i[i.InternalServerError=500]="InternalServerError",i[i.NotImplemented=501]="NotImplemented",i[i.BadGateway=502]="BadGateway",i[i.ServiceUnavailable=503]="ServiceUnavailable",i[i.GatewayTimeout=504]="GatewayTimeout",i[i.HttpVersionNotSupported=505]="HttpVersionNotSupported",i[i.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",i[i.InsufficientStorage=507]="InsufficientStorage",i[i.LoopDetected=508]="LoopDetected",i[i.NotExtended=510]="NotExtended",i[i.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",i}(nu||{});function jm(i,t){return{body:t,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var Sl=(()=>{let t=class t{constructor(n){this.handler=n}request(n,r,o={}){let s;if(n instanceof wl)s=n;else{let u;o.headers instanceof Qo?u=o.headers:u=new Qo(o.headers);let f;o.params&&(o.params instanceof ao?f=o.params:f=new ao({fromObject:o.params})),s=new wl(n,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:f,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=Se(s).pipe(Ar(u=>this.handler.handle(u)));if(n instanceof wl||o.observe==="events")return a;let c=a.pipe(Ni(u=>u instanceof tu));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(Re(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return u.body}));case"blob":return c.pipe(Re(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new Error("Response is not a Blob.");return u.body}));case"text":return c.pipe(Re(u=>{if(u.body!==null&&typeof u.body!="string")throw new Error("Response is not a string.");return u.body}));case"json":default:return c.pipe(Re(u=>u.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new ao().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,jm(o,r))}post(n,r,o={}){return this.request("POST",n,jm(o,r))}put(n,r,o={}){return this.request("PUT",n,jm(o,r))}};t.\u0275fac=function(r){return new(r||t)(J(Tl))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function K1(i,t){return t(i)}function XM(i,t){return(e,n)=>t.intercept(e,{handle:r=>i(r,n)})}function JM(i,t,e){return(n,r)=>tr(e,()=>t(n,o=>i(o,r)))}var qm=new le(""),Wm=new le(""),ek=new le(""),tk=new le("");function ik(){let i=null;return(t,e)=>{i===null&&(i=(ae(qm,{optional:!0})??[]).reduceRight(XM,K1));let n=ae(vl),r=n.add();return i(t,e).pipe(er(()=>n.remove(r)))}}var $1=(()=>{let t=class t extends Tl{constructor(n,r){super(),this.backend=n,this.injector=r,this.chain=null,this.pendingTasks=ae(vl);let o=ae(tk,{optional:!0});this.backend=o??n}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(Wm),...this.injector.get(ek,[])]));this.chain=o.reduceRight((s,a)=>JM(s,a,this.injector),K1)}let r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(er(()=>this.pendingTasks.remove(r)))}};t.\u0275fac=function(r){return new(r||t)(J(Jd),J(qo))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();var nk=/^\)\]\}',?\n/;function rk(i){return"responseURL"in i&&i.responseURL?i.responseURL:/^X-Request-URL:/m.test(i.getAllResponseHeaders())?i.getResponseHeader("X-Request-URL"):null}var q1=(()=>{let t=class t{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new wt(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Ii(r.\u0275loadImpl()):Se(null)).pipe(Oi(()=>new Li(s=>{let a=r.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((P,j)=>a.setRequestHeader(P,j.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let P=n.detectContentTypeHeader();P!==null&&a.setRequestHeader("Content-Type",P)}if(n.responseType){let P=n.responseType.toLowerCase();a.responseType=P!=="json"?P:"text"}let c=n.serializeBody(),u=null,f=()=>{if(u!==null)return u;let P=a.statusText||"OK",j=new Qo(a.getAllResponseHeaders()),ce=rk(a)||n.url;return u=new $m({headers:j,status:a.status,statusText:P,url:ce}),u},v=()=>{let{headers:P,status:j,statusText:ce,url:_e}=f(),me=null;j!==nu.NoContent&&(me=typeof a.response>"u"?a.responseText:a.response),j===0&&(j=me?nu.Ok:0);let qe=j>=200&&j<300;if(n.responseType==="json"&&typeof me=="string"){let Ge=me;me=me.replace(nk,"");try{me=me!==""?JSON.parse(me):null}catch(Et){me=Ge,qe&&(qe=!1,me={error:Et,text:me})}}qe?(s.next(new tu({body:me,headers:P,status:j,statusText:ce,url:_e||void 0})),s.complete()):s.error(new iu({error:me,headers:P,status:j,statusText:ce,url:_e||void 0}))},b=P=>{let{url:j}=f(),ce=new iu({error:P,status:a.status||0,statusText:a.statusText||"Unknown Error",url:j||void 0});s.error(ce)},O=!1,V=P=>{O||(s.next(f()),O=!0);let j={type:qs.DownloadProgress,loaded:P.loaded};P.lengthComputable&&(j.total=P.total),n.responseType==="text"&&a.responseText&&(j.partialText=a.responseText),s.next(j)},K=P=>{let j={type:qs.UploadProgress,loaded:P.loaded};P.lengthComputable&&(j.total=P.total),s.next(j)};return a.addEventListener("load",v),a.addEventListener("error",b),a.addEventListener("timeout",b),a.addEventListener("abort",b),n.reportProgress&&(a.addEventListener("progress",V),c!==null&&a.upload&&a.upload.addEventListener("progress",K)),a.send(c),s.next({type:qs.Sent}),()=>{a.removeEventListener("error",b),a.removeEventListener("abort",b),a.removeEventListener("load",v),a.removeEventListener("timeout",b),n.reportProgress&&(a.removeEventListener("progress",V),c!==null&&a.upload&&a.upload.removeEventListener("progress",K)),a.readyState!==a.DONE&&a.abort()}})))}};t.\u0275fac=function(r){return new(r||t)(J(Kd))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Q1=new le("XSRF_ENABLED"),ok="XSRF-TOKEN",sk=new le("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>ok}),ak="X-XSRF-TOKEN",lk=new le("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>ak}),ru=class{},ck=(()=>{let t=class t{constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Wd(n,this.cookieName),this.lastCookieString=n),this.lastToken}};t.\u0275fac=function(r){return new(r||t)(J(Oe),J(vt),J(sk))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function dk(i,t){let e=i.url.toLowerCase();if(!ae(Q1)||i.method==="GET"||i.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(i);let n=ae(ru).getToken(),r=ae(lk);return n!=null&&!i.headers.has(r)&&(i=i.clone({headers:i.headers.set(r,n)})),t(i)}var Y1=function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i}(Y1||{});function uk(i,t){return{\u0275kind:i,\u0275providers:t}}function Km(...i){let t=[Sl,q1,$1,{provide:Tl,useExisting:$1},{provide:Jd,useExisting:q1},{provide:Wm,useValue:dk,multi:!0},{provide:Q1,useValue:!0},{provide:ru,useClass:ck}];for(let e of i)t.push(...e.\u0275providers);return Nn(t)}var W1=new le("LEGACY_INTERCEPTOR_FN");function pk(){return uk(Y1.LegacyInterceptors,[{provide:W1,useFactory:ik},{provide:Wm,useExisting:W1,multi:!0}])}var El=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({providers:[Km(pk())]});let i=t;return i})();var Zm=class extends O1{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Xm=class i extends Zm{static makeCurrent(){E1(new i)}onAndCancel(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=hk();return e==null?null:mk(e)}resetBaseElement(){Ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Wd(document.cookie,t)}},Ol=null;function hk(){return Ol=Ol||document.querySelector("base"),Ol?Ol.getAttribute("href"):null}function mk(i){return new URL(i,document.baseURI).pathname}var fk=(()=>{let t=class t{build(){return new XMLHttpRequest}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Jm=new le("EventManagerPlugins"),eC=(()=>{let t=class t{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(s=>s.supports(n)),!r)throw new wt(5101,!1);return this._eventNameToPlugin.set(n,r),r}};t.\u0275fac=function(r){return new(r||t)(J(Jm),J(ge))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),ou=class{constructor(t){this._doc=t}},Qm="ng-app-id",tC=(()=>{let t=class t{constructor(n,r,o,s={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Cl(s),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${Qm}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=r,s.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let o=this.styleNodesInDOM,s=o?.get(r);if(s?.parentNode===n)return o.delete(r),s.removeAttribute(Qm),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(Qm,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let o=this.getStyleElement(n,r),s=this.styleRef,a=s.get(r)?.elements;a?a.push(o):s.set(r,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};t.\u0275fac=function(r){return new(r||t)(J(Oe),J(Fd),J(hl,8),J(vt))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Ym={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},tf=/%COMP%/g,iC="%COMP%",gk=`_nghost-${iC}`,_k=`_ngcontent-${iC}`,vk=!0,yk=new le("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>vk});function bk(i){return _k.replace(tf,i)}function Ck(i){return gk.replace(tf,i)}function nC(i,t){return t.map(e=>e.replace(tf,i))}var Ws=(()=>{let t=class t{constructor(n,r,o,s,a,c,u,f=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=u,this.nonce=f,this.rendererByCompId=new Map,this.platformIsServer=Cl(c),this.defaultRenderer=new Ml(n,a,u,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===pl.ShadowDom&&(r=pe(F({},r),{encapsulation:pl.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof su?o.applyToHost(n):o instanceof kl&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let a=this.doc,c=this.ngZone,u=this.eventManager,f=this.sharedStylesHost,v=this.removeStylesOnCompDestroy,b=this.platformIsServer;switch(r.encapsulation){case pl.Emulated:s=new su(u,f,r,this.appId,v,a,c,b);break;case pl.ShadowDom:return new ef(u,f,n,r,a,c,this.nonce,b);default:s=new kl(u,f,r,v,a,c,b);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};t.\u0275fac=function(r){return new(r||t)(J(eC),J(tC),J(Fd),J(yk),J(Oe),J(vt),J(ge),J(hl))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Ml=class{constructor(t,e,n,r){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,e){return e?this.doc.createElementNS(Ym[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(X1(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(X1(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new wt(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;let o=Ym[r];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let r=Ym[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(ml.DashCase|ml.Important)?t.style.setProperty(e,n,r&ml.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&ml.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n){if(typeof t=="string"&&(t=$s().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(n))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function X1(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var ef=class extends Ml{constructor(t,e,n,r,o,s,a,c){super(t,o,s,c),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=nC(r.id,r.styles);for(let f of u){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=f,this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},kl=class extends Ml{constructor(t,e,n,r,o,s,a,c){super(t,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r,this.styles=c?nC(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},su=class extends kl{constructor(t,e,n,r,o,s,a,c){let u=r+"-"+n.id;super(t,e,n,o,s,a,c,u),this.contentAttr=bk(u),this.hostAttr=Ck(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}},Ik=(()=>{let t=class t extends ou{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),J1=["alt","control","meta","shift"],wk={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Tk={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},xk=(()=>{let t=class t extends ou{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,r,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>$s().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=t._normalizeKey(r.pop()),a="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),a="code."),J1.forEach(f=>{let v=r.indexOf(f);v>-1&&(r.splice(v,1),a+=f+".")}),a+=s,r.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=a,u}static matchEventFullKeyCode(n,r){let o=wk[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),J1.forEach(a=>{if(a!==o){let c=Tk[a];c(n)&&(s+=a+".")}}),s+=o,s===r)}static eventCallback(n,r,o){return s=>{t.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function rC(i,t){return x1(F({rootComponent:i},Sk(t)))}function Sk(i){return{appProviders:[...Ak,...i?.providers??[]],platformProviders:kk}}function Ek(){Xm.makeCurrent()}function Ok(){return new gl}function Mk(){return d1(document),document}var kk=[{provide:vt,useValue:P1},{provide:u1,useValue:Ek,multi:!0},{provide:Oe,useFactory:Mk,deps:[]}];var Ak=[{provide:l1,useValue:"root"},{provide:gl,useFactory:Ok,deps:[]},{provide:Jm,useClass:Ik,multi:!0,deps:[Oe,ge,vt]},{provide:Jm,useClass:xk,multi:!0,deps:[Oe]},Ws,tC,eC,{provide:js,useExisting:Ws},{provide:Kd,useClass:fk,deps:[]},[]];function Dk(){return new nf(J(Oe))}var nf=(()=>{let t=class t{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:function(r){let o=null;return r?o=new r:o=Dk(),o},providedIn:"root"});let i=t;return i})();var rf=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:function(r){let o=null;return r?o=new(r||t):o=J(oC),o},providedIn:"root"});let i=t;return i})();function Pk(i){return new oC(i.get(Oe))}var oC=(()=>{let t=class t extends rf{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Wo.NONE:return r;case Wo.HTML:return Us(r,"HTML")?zs(r):v1(this._doc,String(r)).toString();case Wo.STYLE:return Us(r,"Style")?zs(r):r;case Wo.SCRIPT:if(Us(r,"Script"))return zs(r);throw new wt(5200,!1);case Wo.URL:return Us(r,"URL")?zs(r):_1(String(r));case Wo.RESOURCE_URL:if(Us(r,"ResourceURL"))return zs(r);throw new wt(5201,!1);default:throw new wt(5202,!1)}}bypassSecurityTrustHtml(n){return p1(n)}bypassSecurityTrustStyle(n){return h1(n)}bypassSecurityTrustScript(n){return m1(n)}bypassSecurityTrustUrl(n){return f1(n)}bypassSecurityTrustResourceUrl(n){return g1(n)}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:function(r){let o=null;return r?o=new r:o=Pk(J(Mi)),o},providedIn:"root"});let i=t;return i})();var Xe="primary",$l=Symbol("RouteTitle"),cf=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Xs(i){return new cf(i)}function Rk(i,t,e){let n=e.path.split("/");if(n.length>i.length||e.pathMatch==="full"&&(t.hasChildren()||n.lengthn[o]===r)}else return i===t}function gC(i){return i.length>0?i[i.length-1]:null}function po(i){return zb(i)?i:Bd(i)?Ii(Promise.resolve(i)):Se(i)}var Lk={exact:vC,subset:yC},_C={exact:Fk,subset:Nk,ignored:()=>!0};function aC(i,t,e){return Lk[e.paths](i.root,t.root,e.matrixParams)&&_C[e.queryParams](i.queryParams,t.queryParams)&&!(e.fragment==="exact"&&i.fragment!==t.fragment)}function Fk(i,t){return ir(i,t)}function vC(i,t,e){if(!Zo(i.segments,t.segments)||!cu(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(let n in t.children)if(!i.children[n]||!vC(i.children[n],t.children[n],e))return!1;return!0}function Nk(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>fC(i[e],t[e]))}function yC(i,t,e){return bC(i,t,t.segments,e)}function bC(i,t,e,n){if(i.segments.length>e.length){let r=i.segments.slice(0,e.length);return!(!Zo(r,e)||t.hasChildren()||!cu(r,e,n))}else if(i.segments.length===e.length){if(!Zo(i.segments,e)||!cu(i.segments,e,n))return!1;for(let r in t.children)if(!i.children[r]||!yC(i.children[r],t.children[r],n))return!1;return!0}else{let r=e.slice(0,i.segments.length),o=e.slice(i.segments.length);return!Zo(i.segments,r)||!cu(i.segments,r,n)||!i.children[Xe]?!1:bC(i.children[Xe],t,o,n)}}function cu(i,t,e){return t.every((n,r)=>_C[e](i[r].parameters,n.parameters))}var lo=class{constructor(t=new Ot([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Xs(this.queryParams),this._queryParamMap}toString(){return Uk.serialize(this)}},Ot=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return du(this)}},Yo=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=Xs(this.parameters),this._parameterMap}toString(){return IC(this)}};function Bk(i,t){return Zo(i,t)&&i.every((e,n)=>ir(e.parameters,t[n].parameters))}function Zo(i,t){return i.length!==t.length?!1:i.every((e,n)=>e.path===t[n].path)}function zk(i,t){let e=[];return Object.entries(i.children).forEach(([n,r])=>{n===Xe&&(e=e.concat(t(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==Xe&&(e=e.concat(t(r,n)))}),e}var ql=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>new Fl,providedIn:"root"});let i=t;return i})(),Fl=class{parse(t){let e=new pf(t);return new lo(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Al(t.root,!0)}`,n=Gk(t.queryParams),r=typeof t.fragment=="string"?`#${jk(t.fragment)}`:"";return`${e}${n}${r}`}},Uk=new Fl;function du(i){return i.segments.map(t=>IC(t)).join("/")}function Al(i,t){if(!i.hasChildren())return du(i);if(t){let e=i.children[Xe]?Al(i.children[Xe],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==Xe&&n.push(`${r}:${Al(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=zk(i,(n,r)=>r===Xe?[Al(i.children[Xe],!1)]:[`${r}:${Al(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[Xe]!=null?`${du(i)}/${e[0]}`:`${du(i)}/(${e.join("//")})`}}function CC(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function au(i){return CC(i).replace(/%3B/gi,";")}function jk(i){return encodeURI(i)}function uf(i){return CC(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function uu(i){return decodeURIComponent(i)}function lC(i){return uu(i.replace(/\+/g,"%20"))}function IC(i){return`${uf(i.path)}${Hk(i.parameters)}`}function Hk(i){return Object.entries(i).map(([t,e])=>`;${uf(t)}=${uf(e)}`).join("")}function Gk(i){let t=Object.entries(i).map(([e,n])=>Array.isArray(n)?n.map(r=>`${au(e)}=${au(r)}`).join("&"):`${au(e)}=${au(n)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var $k=/^[^\/()?;#]+/;function of(i){let t=i.match($k);return t?t[0]:""}var qk=/^[^\/()?;=#]+/;function Wk(i){let t=i.match(qk);return t?t[0]:""}var Kk=/^[^=?&#]+/;function Qk(i){let t=i.match(Kk);return t?t[0]:""}var Yk=/^[^&#]+/;function Zk(i){let t=i.match(Yk);return t?t[0]:""}var pf=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ot([],{}):new Ot([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[Xe]=new Ot(t,e)),n}parseSegment(){let t=of(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new wt(4009,!1);return this.capture(t),new Yo(uu(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=Wk(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let r=of(this.remaining);r&&(n=r,this.capture(n))}t[uu(e)]=uu(n)}parseQueryParam(t){let e=Qk(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let s=Zk(this.remaining);s&&(n=s,this.capture(n))}let r=lC(e),o=lC(n);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=of(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new wt(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Xe);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[Xe]:new Ot([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new wt(4011,!1)}};function wC(i){return i.segments.length>0?new Ot([],{[Xe]:i}):i}function TC(i){let t={};for(let[n,r]of Object.entries(i.children)){let o=TC(r);if(n===Xe&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[n]=o)}let e=new Ot(i.segments,t);return Xk(e)}function Xk(i){if(i.numberOfChildren===1&&i.children[Xe]){let t=i.children[Xe];return new Ot(i.segments.concat(t.segments),t.children)}return i}function Js(i){return i instanceof lo}function Jk(i,t,e=null,n=null){let r=xC(i);return SC(r,t,e,n)}function xC(i){let t;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new Ot(o.url,s);return o===i&&(t=a),a}let n=e(i.root),r=wC(n);return t??r}function SC(i,t,e,n){let r=i;for(;r.parent;)r=r.parent;if(t.length===0)return sf(r,r,r,e,n);let o=e3(t);if(o.toRoot())return sf(r,r,new Ot([],{}),e,n);let s=t3(o,r,i),a=s.processChildren?Rl(s.segmentGroup,s.index,o.commands):OC(s.segmentGroup,s.index,o.commands);return sf(r,s.segmentGroup,a,e,n)}function pu(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function Nl(i){return typeof i=="object"&&i!=null&&i.outlets}function sf(i,t,e,n,r){let o={};n&&Object.entries(n).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(f=>`${f}`):`${u}`});let s;i===t?s=e:s=EC(i,t,e);let a=wC(TC(s));return new lo(a,o,r)}function EC(i,t,e){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===t?n[r]=e:n[r]=EC(o,t,e)}),new Ot(i.segments,n)}var hu=class{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&pu(n[0]))throw new wt(4003,!1);let r=n.find(Nl);if(r&&r!==gC(n))throw new wt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function e3(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new hu(!0,0,i);let t=0,e=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?t++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new hu(e,t,n)}var Ys=class{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}};function t3(i,t,e){if(i.isAbsolute)return new Ys(t,!0,0);if(!e)return new Ys(t,!1,NaN);if(e.parent===null)return new Ys(e,!0,0);let n=pu(i.commands[0])?0:1,r=e.segments.length-1+n;return i3(e,r,i.numberOfDoubleDots)}function i3(i,t,e){let n=i,r=t,o=e;for(;o>r;){if(o-=r,n=n.parent,!n)throw new wt(4005,!1);r=n.segments.length}return new Ys(n,!1,r-o)}function n3(i){return Nl(i[0])?i[0].outlets:{[Xe]:i}}function OC(i,t,e){if(i??=new Ot([],{}),i.segments.length===0&&i.hasChildren())return Rl(i,t,e);let n=r3(i,t,e),r=e.slice(n.commandIndex);if(n.match&&n.pathIndexo!==Xe)&&i.children[Xe]&&i.numberOfChildren===1&&i.children[Xe].segments.length===0){let o=Rl(i.children[Xe],t,e);return new Ot(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=OC(i.children[o],t,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new Ot(i.segments,r)}}function r3(i,t,e){let n=0,r=t,o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;let s=i.segments[r],a=e[n];if(Nl(a))break;let c=`${a}`,u=n0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!dC(c,u,s))return o;n+=2}else{if(!dC(c,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function hf(i,t,e){let n=i.segments.slice(0,t),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(t[e]=hf(new Ot([],{}),0,n))}),t}function cC(i){let t={};return Object.entries(i).forEach(([e,n])=>t[e]=`${n}`),t}function dC(i,t,e){return i==e.path&&ir(t,e.parameters)}var Vl="imperative",wi=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(wi||{}),En=class{constructor(t,e){this.id=t,this.url=e}},co=class extends En{constructor(t,e,n="imperative",r=null){super(t,e),this.type=wi.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},hn=class extends En{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n,this.type=wi.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Sn=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(Sn||{}),mu=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(mu||{}),nr=class extends En{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=wi.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},uo=class extends En{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=wi.NavigationSkipped}},Xo=class extends En{constructor(t,e,n,r){super(t,e),this.error=n,this.target=r,this.type=wi.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},fu=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},mf=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ff=class extends En{constructor(t,e,n,r,o){super(t,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o,this.type=wi.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},gf=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},_f=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},vf=class{constructor(t){this.route=t,this.type=wi.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},yf=class{constructor(t){this.route=t,this.type=wi.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},bf=class{constructor(t){this.snapshot=t,this.type=wi.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Cf=class{constructor(t){this.snapshot=t,this.type=wi.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},If=class{constructor(t){this.snapshot=t,this.type=wi.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},wf=class{constructor(t){this.snapshot=t,this.type=wi.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gu=class{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n,this.type=wi.Scroll}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},Bl=class{},zl=class{constructor(t){this.url=t}};var Tf=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Wl,this.attachRef=null}},Wl=(()=>{let t=class t{constructor(){this.contexts=new Map}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Tf,this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),_u=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=xf(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){let e=xf(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Sf(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return Sf(t,this._root).map(e=>e.value)}};function xf(i,t){if(i===t.value)return t;for(let e of t.children){let n=xf(i,e);if(n)return n}return null}function Sf(i,t){if(i===t.value)return[t];for(let e of t.children){let n=Sf(i,e);if(n.length)return n.unshift(t),n}return[]}var pn=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Qs(i){let t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}var vu=class extends _u{constructor(t,e){super(t),this.snapshot=e,Lf(this,t)}toString(){return this.snapshot.toString()}};function MC(i){let t=s3(i),e=new Fi([new Yo("",{})]),n=new Fi({}),r=new Fi({}),o=new Fi({}),s=new Fi(""),a=new ft(e,n,o,s,r,Xe,i,t.root);return a.snapshot=t.root,new vu(new pn(a,[]),t)}function s3(i){let t={},e={},n={},r="",o=new Ul([],t,n,r,e,Xe,i,null,{});return new yu("",new pn(o,[]))}var ft=class{constructor(t,e,n,r,o,s,a,c){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(Re(u=>u[$l]))??Se(void 0),this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Re(t=>Xs(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Re(t=>Xs(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Vf(i,t,e="emptyOnly"){let n,{routeConfig:r}=i;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?n={params:F(F({},t.params),i.params),data:F(F({},t.data),i.data),resolve:F(F(F(F({},i.data),t.data),r?.data),i._resolvedData)}:n={params:F({},i.params),data:F({},i.data),resolve:F(F({},i.data),i._resolvedData??{})},r&&AC(r)&&(n.resolve[$l]=r.title),n}var Ul=class{get title(){return this.data?.[$l]}constructor(t,e,n,r,o,s,a,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Xs(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Xs(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},yu=class extends _u{constructor(t,e){super(e),this.url=t,Lf(this,e)}toString(){return kC(this._root)}};function Lf(i,t){t.value._routerState=i,t.children.forEach(e=>Lf(i,e))}function kC(i){let t=i.children.length>0?` { ${i.children.map(kC).join(", ")} } `:"";return`${i.value}${t}`}function af(i){if(i.snapshot){let t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,ir(t.queryParams,e.queryParams)||i.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&i.fragmentSubject.next(e.fragment),ir(t.params,e.params)||i.paramsSubject.next(e.params),Vk(t.url,e.url)||i.urlSubject.next(e.url),ir(t.data,e.data)||i.dataSubject.next(e.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function Ef(i,t){let e=ir(i.params,t.params)&&Bk(i.url,t.url),n=!i.parent!=!t.parent;return e&&!n&&(!i.parent||Ef(i.parent,t.parent))}function AC(i){return typeof i.title=="string"||i.title===null}var Jo=(()=>{let t=class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=Xe,this.activateEvents=new L,this.deactivateEvents=new L,this.attachEvents=new L,this.detachEvents=new L,this.parentContexts=ae(Wl),this.location=ae(Hs),this.changeDetector=ae(Ne),this.environmentInjector=ae(qo),this.inputBinder=ae(wu,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new wt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new wt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new wt(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new wt(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,u=new Of(n,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:u,environmentInjector:r??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=it({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Mt]});let i=t;return i})(),Of=class{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===ft?this.route:t===Wl?this.childContexts:this.parent.get(t,e)}},wu=new le(""),uC=(()=>{let t=class t{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:r}=n,o=no([r.queryParams,r.params,r.data]).pipe(Oi(([s,a,c],u)=>(c=F(F(F({},s),a),c),u===0?Se(c):Promise.resolve(c)))).subscribe(s=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(n);return}let a=S1(r.component);if(!a){this.unsubscribeFromRouteData(n);return}for(let{templateName:c}of a.inputs)n.activatedComponentRef.setInput(c,s[c])});this.outletDataSubscriptions.set(n,o)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function a3(i,t,e){let n=jl(i,t._root,e?e._root:void 0);return new vu(n,t)}function jl(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=t.value;let r=l3(i,t,e);return new pn(n,r)}else{if(i.shouldAttach(t.value)){let o=i.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>jl(i,a)),s}}let n=c3(t.value),r=t.children.map(o=>jl(i,o));return new pn(n,r)}}function l3(i,t,e){return t.children.map(n=>{for(let r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return jl(i,n,r);return jl(i,n)})}function c3(i){return new ft(new Fi(i.url),new Fi(i.params),new Fi(i.queryParams),new Fi(i.fragment),new Fi(i.data),i.outlet,i.component,i)}var DC="ngNavigationCancelingError";function PC(i,t){let{redirectTo:e,navigationBehaviorOptions:n}=Js(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=RC(!1,Sn.Redirect,t);return r.url=e,r.navigationBehaviorOptions=n,r}function RC(i,t,e){let n=new Error("NavigationCancelingError: "+(i||""));return n[DC]=!0,n.cancellationCode=t,e&&(n.url=e),n}function d3(i){return VC(i)&&Js(i.url)}function VC(i){return i&&i[DC]}var u3=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["ng-component"]],standalone:!0,features:[R],decls:1,vars:0,template:function(r,o){r&1&&y(0,"router-outlet")},dependencies:[Jo],encapsulation:2});let i=t;return i})();function p3(i,t){return i.providers&&!i._injector&&(i._injector=Bm(i.providers,t,`Route: ${i.path}`)),i._injector??t}function Ff(i){let t=i.children&&i.children.map(Ff),e=t?pe(F({},i),{children:t}):F({},i);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Xe&&(e.component=u3),e}function rr(i){return i.outlet||Xe}function h3(i,t){let e=i.filter(n=>rr(n)===t);return e.push(...i.filter(n=>rr(n)!==t)),e}function Kl(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let t=i.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var m3=(i,t,e,n)=>Re(r=>(new Mf(t,r.targetRouterState,r.currentRouterState,e,n).activate(i),r)),Mf=class{constructor(t,e,n,r,o){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),af(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){let r=Qs(e);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(t,e,n){let r=t.value,o=e?e.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,o=Qs(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,o=Qs(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(t,e,n){let r=Qs(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new wf(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Cf(t.value.snapshot))}activateRoutes(t,e,n){let r=t.value,o=e?e.value:null;if(af(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),af(a.route.value),this.activateChildRoutes(t,null,s.children)}else{let a=Kl(r.snapshot);s.attachRef=null,s.route=r,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,n)}},bu=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Zs=class{constructor(t,e){this.component=t,this.route=e}};function f3(i,t,e){let n=i._root,r=t?t._root:null;return Dl(n,r,e,[n.value])}function g3(i){let t=i.routeConfig?i.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:i,guards:t}}function ta(i,t){let e=Symbol(),n=t.get(i,e);return n===e?typeof i=="function"&&!n1(i)?i:t.get(i):n}function Dl(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Qs(t);return i.children.forEach(s=>{_3(s,o[s.value.outlet],e,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ll(a,e.getContext(s),r)),r}function _3(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=t?t.value:null,a=e?e.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=v3(s,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new bu(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Dl(i,t,a?a.children:null,n,r):Dl(i,t,e,n,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Zs(a.outlet.component,s))}else s&&Ll(t,a,r),r.canActivateChecks.push(new bu(n)),o.component?Dl(i,null,a?a.children:null,n,r):Dl(i,null,e,n,r);return r}function v3(i,t,e){if(typeof e=="function")return e(i,t);switch(e){case"pathParamsChange":return!Zo(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Zo(i.url,t.url)||!ir(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ef(i,t)||!ir(i.queryParams,t.queryParams);case"paramsChange":default:return!Ef(i,t)}}function Ll(i,t,e){let n=Qs(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?t?Ll(s,t.children.getContext(o),e):Ll(s,null,e):Ll(s,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Zs(t.outlet.component,r)):e.canDeactivateChecks.push(new Zs(null,r)):e.canDeactivateChecks.push(new Zs(null,r))}function Ql(i){return typeof i=="function"}function y3(i){return typeof i=="boolean"}function b3(i){return i&&Ql(i.canLoad)}function C3(i){return i&&Ql(i.canActivate)}function I3(i){return i&&Ql(i.canActivateChild)}function w3(i){return i&&Ql(i.canDeactivate)}function T3(i){return i&&Ql(i.canMatch)}function LC(i){return i instanceof Ub||i?.name==="EmptyError"}var lu=Symbol("INITIAL_VALUE");function ea(){return Oi(i=>no(i.map(t=>t.pipe(dn(1),oo(lu)))).pipe(Re(t=>{for(let e of t)if(e!==!0){if(e===lu)return lu;if(e===!1||e instanceof lo)return e}return!0}),Ni(t=>t!==lu),dn(1)))}function x3(i,t){return vi(e=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?Se(pe(F({},e),{guardsResult:!0})):S3(s,n,r,i).pipe(vi(a=>a&&y3(a)?E3(n,o,i,t):Se(a)),Re(a=>pe(F({},e),{guardsResult:a})))})}function S3(i,t,e,n){return Ii(i).pipe(vi(r=>D3(r.component,r.route,e,t,n)),ro(r=>r!==!0,!0))}function E3(i,t,e,n){return Ii(t).pipe(Ar(r=>Pd(M3(r.route.parent,n),O3(r.route,n),A3(i,r.path,e),k3(i,r.route,e))),ro(r=>r!==!0,!0))}function O3(i,t){return i!==null&&t&&t(new If(i)),Se(!0)}function M3(i,t){return i!==null&&t&&t(new bf(i)),Se(!0)}function k3(i,t,e){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return Se(!0);let r=n.map(o=>Rd(()=>{let s=Kl(t)??e,a=ta(o,s),c=C3(a)?a.canActivate(t,i):tr(s,()=>a(t,i));return po(c).pipe(ro())}));return Se(r).pipe(ea())}function A3(i,t,e){let n=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>g3(s)).filter(s=>s!==null).map(s=>Rd(()=>{let a=s.guards.map(c=>{let u=Kl(s.node)??e,f=ta(c,u),v=I3(f)?f.canActivateChild(n,i):tr(u,()=>f(n,i));return po(v).pipe(ro())});return Se(a).pipe(ea())}));return Se(o).pipe(ea())}function D3(i,t,e,n,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return Se(!0);let s=o.map(a=>{let c=Kl(t)??r,u=ta(a,c),f=w3(u)?u.canDeactivate(i,t,e,n):tr(c,()=>u(i,t,e,n));return po(f).pipe(ro())});return Se(s).pipe(ea())}function P3(i,t,e,n){let r=t.canLoad;if(r===void 0||r.length===0)return Se(!0);let o=r.map(s=>{let a=ta(s,i),c=b3(a)?a.canLoad(t,e):tr(i,()=>a(t,e));return po(c)});return Se(o).pipe(ea(),FC(n))}function FC(i){return Nb(It(t=>{if(Js(t))throw PC(i,t)}),Re(t=>t===!0))}function R3(i,t,e,n){let r=t.canMatch;if(!r||r.length===0)return Se(!0);let o=r.map(s=>{let a=ta(s,i),c=T3(a)?a.canMatch(t,e):tr(i,()=>a(t,e));return po(c)});return Se(o).pipe(ea(),FC(n))}var Hl=class{constructor(t){this.segmentGroup=t||null}},Cu=class extends Error{constructor(t){super(),this.urlTree=t}};function Ks(i){return io(new Hl(i))}function V3(i){return io(new wt(4e3,!1))}function L3(i){return io(RC(!1,Sn.GuardRejected))}var kf=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Se(n);if(r.numberOfChildren>1||!r.children[Xe])return V3(t.redirectTo);r=r.children[Xe]}}applyRedirectCommands(t,e,n){let r=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,n);if(e.startsWith("/"))throw new Cu(r);return r}applyRedirectCreateUrlTree(t,e,n,r){let o=this.createSegmentGroup(t,e.root,n,r);return new lo(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let n={};return Object.entries(t).forEach(([r,o])=>{if(typeof o=="string"&&o.startsWith(":")){let a=o.substring(1);n[r]=e[a]}else n[r]=o}),n}createSegmentGroup(t,e,n,r){let o=this.createSegments(t,e.segments,n,r),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,n,r)}),new Ot(o,s)}createSegments(t,e,n,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,n))}findPosParam(t,e,n){let r=n[e.path.substring(1)];if(!r)throw new wt(4001,!1);return r}findOrReturn(t,e){let n=0;for(let r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}},Af={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function F3(i,t,e,n,r){let o=Nf(i,t,e);return o.matched?(n=p3(t,n),R3(n,t,e,r).pipe(Re(s=>s===!0?o:F({},Af)))):Se(o)}function Nf(i,t,e){if(t.path==="**")return N3(e);if(t.path==="")return t.pathMatch==="full"&&(i.hasChildren()||e.length>0)?F({},Af):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||Rk)(e,i,t);if(!r)return F({},Af);let o={};Object.entries(r.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=r.consumed.length>0?F(F({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function N3(i){return{matched:!0,parameters:i.length>0?gC(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function pC(i,t,e,n){return e.length>0&&U3(i,e,n)?{segmentGroup:new Ot(t,z3(n,new Ot(e,i.children))),slicedSegments:[]}:e.length===0&&j3(i,e,n)?{segmentGroup:new Ot(i.segments,B3(i,e,n,i.children)),slicedSegments:e}:{segmentGroup:new Ot(i.segments,i.children),slicedSegments:e}}function B3(i,t,e,n){let r={};for(let o of e)if(Tu(i,t,o)&&!n[rr(o)]){let s=new Ot([],{});r[rr(o)]=s}return F(F({},n),r)}function z3(i,t){let e={};e[Xe]=t;for(let n of i)if(n.path===""&&rr(n)!==Xe){let r=new Ot([],{});e[rr(n)]=r}return e}function U3(i,t,e){return e.some(n=>Tu(i,t,n)&&rr(n)!==Xe)}function j3(i,t,e){return e.some(n=>Tu(i,t,n))}function Tu(i,t,e){return(i.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function H3(i,t,e,n){return rr(i)!==n&&(n===Xe||!Tu(t,e,i))?!1:Nf(t,i,e).matched}function G3(i,t,e){return t.length===0&&!i.children[e]}var Df=class{};function $3(i,t,e,n,r,o,s="emptyOnly"){return new Pf(i,t,e,n,r,s,o).recognize()}var q3=31,Pf=class{constructor(t,e,n,r,o,s,a){this.injector=t,this.configLoader=e,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new kf(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new wt(4002,`'${t.segmentGroup}'`)}recognize(){let t=pC(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(Re(e=>{let n=new Ul([],Object.freeze({}),Object.freeze(F({},this.urlTree.queryParams)),this.urlTree.fragment,{},Xe,this.rootComponentType,null,{}),r=new pn(n,e),o=new yu("",r),s=Jk(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(o._root,null),{state:o,tree:s}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,Xe).pipe(cn(n=>{if(n instanceof Cu)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Hl?this.noMatchError(n):n}))}inheritParamsAndData(t,e){let n=t.value,r=Vf(n,e,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),t.children.forEach(o=>this.inheritParamsAndData(o,n))}processSegmentGroup(t,e,n,r){return n.segments.length===0&&n.hasChildren()?this.processChildren(t,e,n):this.processSegment(t,e,n,n.segments,r,!0).pipe(Re(o=>o instanceof pn?[o]:[]))}processChildren(t,e,n){let r=[];for(let o of Object.keys(n.children))o==="primary"?r.unshift(o):r.push(o);return Ii(r).pipe(Ar(o=>{let s=n.children[o],a=h3(e,o);return this.processSegmentGroup(t,a,s,o)}),Vd((o,s)=>(o.push(...s),o)),Dm(null),Yb(),vi(o=>{if(o===null)return Ks(n);let s=NC(o);return W3(s),Se(s)}))}processSegment(t,e,n,r,o,s){return Ii(e).pipe(Ar(a=>this.processSegmentAgainstRoute(a._injector??t,e,a,n,r,o,s).pipe(cn(c=>{if(c instanceof Hl)return Se(null);throw c}))),ro(a=>!!a),cn(a=>{if(LC(a))return G3(n,r,o)?Se(new Df):Ks(n);throw a}))}processSegmentAgainstRoute(t,e,n,r,o,s,a){return H3(n,r,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,n,o,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,n,o,s):Ks(r):Ks(r)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,o,s){let{matched:a,consumedSegments:c,positionalParamSegments:u,remainingSegments:f}=Nf(e,r,o);if(!a)return Ks(e);r.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>q3&&(this.allowRedirects=!1));let v=this.applyRedirects.applyRedirectCommands(c,r.redirectTo,u);return this.applyRedirects.lineralizeSegments(r,v).pipe(vi(b=>this.processSegment(t,n,e,b.concat(f),s,!1)))}matchSegmentAgainstRoute(t,e,n,r,o){let s=F3(e,n,r,t,this.urlSerializer);return n.path==="**"&&(e.children={}),s.pipe(Oi(a=>a.matched?(t=n._injector??t,this.getChildConfig(t,n,r).pipe(Oi(({routes:c})=>{let u=n._loadedInjector??t,{consumedSegments:f,remainingSegments:v,parameters:b}=a,O=new Ul(f,b,Object.freeze(F({},this.urlTree.queryParams)),this.urlTree.fragment,Q3(n),rr(n),n.component??n._loadedComponent??null,n,Y3(n)),{segmentGroup:V,slicedSegments:K}=pC(e,f,v,c);if(K.length===0&&V.hasChildren())return this.processChildren(u,c,V).pipe(Re(j=>j===null?null:new pn(O,j)));if(c.length===0&&K.length===0)return Se(new pn(O,[]));let P=rr(n)===o;return this.processSegment(u,c,V,K,P?Xe:o,!0).pipe(Re(j=>new pn(O,j instanceof pn?[j]:[])))}))):Ks(e)))}getChildConfig(t,e,n){return e.children?Se({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?Se({routes:e._loadedRoutes,injector:e._loadedInjector}):P3(t,e,n,this.urlSerializer).pipe(vi(r=>r?this.configLoader.loadChildren(t,e).pipe(It(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):L3(e))):Se({routes:[],injector:t})}};function W3(i){i.sort((t,e)=>t.value.outlet===Xe?-1:e.value.outlet===Xe?1:t.value.outlet.localeCompare(e.value.outlet))}function K3(i){let t=i.value.routeConfig;return t&&t.path===""}function NC(i){let t=[],e=new Set;for(let n of i){if(!K3(n)){t.push(n);continue}let r=t.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),e.add(r)):t.push(n)}for(let n of e){let r=NC(n.children);t.push(new pn(n.value,r))}return t.filter(n=>!e.has(n))}function Q3(i){return i.data||{}}function Y3(i){return i.resolve||{}}function Z3(i,t,e,n,r,o){return vi(s=>$3(i,t,e,n,s.extractedUrl,r,o).pipe(Re(({state:a,tree:c})=>pe(F({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function X3(i,t){return vi(e=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return Se(e);let o=new Set(r.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of BC(c))s.add(u);let a=0;return Ii(s).pipe(Ar(c=>o.has(c)?J3(c,n,i,t):(c.data=Vf(c,c.parent,i).resolve,Se(void 0))),It(()=>a++),Rm(1),vi(c=>a===s.size?Se(e):$o))})}function BC(i){let t=i.children.map(e=>BC(e)).flat();return[i,...t]}function J3(i,t,e,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!AC(r)&&(o[$l]=r.title),eA(o,i,t,n).pipe(Re(s=>(i._resolvedData=s,i.data=Vf(i,i.parent,e).resolve,null)))}function eA(i,t,e,n){let r=df(i);if(r.length===0)return Se({});let o={};return Ii(r).pipe(vi(s=>tA(i[s],t,e,n).pipe(ro(),It(a=>{o[s]=a}))),Rm(1),qb(o),cn(s=>LC(s)?$o:io(s)))}function tA(i,t,e,n){let r=Kl(t)??n,o=ta(i,r),s=o.resolve?o.resolve(t,e):tr(r,()=>o(t,e));return po(s)}function lf(i){return Oi(t=>{let e=i(t);return e?Ii(e).pipe(Re(()=>t)):Se(t)})}var zC=(()=>{let t=class t{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(s=>s.outlet===Xe);return r}getResolvedTitleForRoute(n){return n.data[$l]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(iA),providedIn:"root"});let i=t;return i})(),iA=(()=>{let t=class t extends zC{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};t.\u0275fac=function(r){return new(r||t)(J(nf))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),Yl=new le("",{providedIn:"root",factory:()=>({})}),Gl=new le("ROUTES"),Bf=(()=>{let t=class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=ae(Hd)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Se(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=po(n.loadComponent()).pipe(Re(UC),It(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),er(()=>{this.componentLoaders.delete(n)})),o=new Em(r,()=>new Gt).pipe(Sm());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Se({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=nA(r,this.compiler,n,this.onLoadEndListener).pipe(er(()=>{this.childrenLoaders.delete(r)})),a=new Em(s,()=>new Gt).pipe(Sm());return this.childrenLoaders.set(r,a),a}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function nA(i,t,e,n){return po(i.loadChildren()).pipe(Re(UC),vi(r=>r instanceof I1||Array.isArray(r)?Se(r):Ii(t.compileModuleAsync(r))),Re(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(e).injector,s=o.get(Gl,[],{optional:!0,self:!0}).flat()),{routes:s.map(Ff),injector:o}}))}function rA(i){return i&&typeof i=="object"&&"default"in i}function UC(i){return rA(i)?i.default:i}var zf=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(oA),providedIn:"root"});let i=t;return i})(),oA=(()=>{let t=class t{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),jC=new le(""),HC=new le("");function sA(i,t,e){let n=i.get(HC),r=i.get(Oe);return i.get(ge).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,Promise.resolve();let o,s=new Promise(u=>{o=u}),a=r.startViewTransition(()=>(o(),aA(i))),{onViewTransitionCreated:c}=n;return c&&tr(i,()=>c({transition:a,from:t,to:e})),s})}function aA(i){return new Promise(t=>{b1(t,{injector:i})})}var Uf=(()=>{let t=class t{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Gt,this.transitionAbortSubject=new Gt,this.configLoader=ae(Bf),this.environmentInjector=ae(qo),this.urlSerializer=ae(ql),this.rootContexts=ae(Wl),this.location=ae(bl),this.inputBindingEnabled=ae(wu,{optional:!0})!==null,this.titleStrategy=ae(zC),this.options=ae(Yl,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=ae(zf),this.createViewTransition=ae(jC,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Se(void 0),this.rootComponentType=null;let n=o=>this.events.next(new vf(o)),r=o=>this.events.next(new yf(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(pe(F(F({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Fi({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Vl,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Ni(s=>s.id!==0),Re(s=>pe(F({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Oi(s=>{this.currentTransition=s;let a=!1,c=!1;return Se(s).pipe(It(u=>{this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?pe(F({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Oi(u=>{let f=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),v=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!f&&v!=="reload"){let b="";return this.events.next(new uo(u.id,this.urlSerializer.serialize(u.rawUrl),b,mu.IgnoredSameUrlNavigation)),u.resolve(null),$o}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return Se(u).pipe(Oi(b=>{let O=this.transitions?.getValue();return this.events.next(new co(b.id,this.urlSerializer.serialize(b.extractedUrl),b.source,b.restoredState)),O!==this.transitions?.getValue()?$o:Promise.resolve(b)}),Z3(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),It(b=>{s.targetSnapshot=b.targetSnapshot,s.urlAfterRedirects=b.urlAfterRedirects,this.currentNavigation=pe(F({},this.currentNavigation),{finalUrl:b.urlAfterRedirects});let O=new fu(b.id,this.urlSerializer.serialize(b.extractedUrl),this.urlSerializer.serialize(b.urlAfterRedirects),b.targetSnapshot);this.events.next(O)}));if(f&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:b,extractedUrl:O,source:V,restoredState:K,extras:P}=u,j=new co(b,this.urlSerializer.serialize(O),V,K);this.events.next(j);let ce=MC(this.rootComponentType).snapshot;return this.currentTransition=s=pe(F({},u),{targetSnapshot:ce,urlAfterRedirects:O,extras:pe(F({},P),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=O,Se(s)}else{let b="";return this.events.next(new uo(u.id,this.urlSerializer.serialize(u.extractedUrl),b,mu.IgnoredByUrlHandlingStrategy)),u.resolve(null),$o}}),It(u=>{let f=new mf(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(f)}),Re(u=>(this.currentTransition=s=pe(F({},u),{guards:f3(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),s)),x3(this.environmentInjector,u=>this.events.next(u)),It(u=>{if(s.guardsResult=u.guardsResult,Js(u.guardsResult))throw PC(this.urlSerializer,u.guardsResult);let f=new ff(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(f)}),Ni(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",Sn.GuardRejected),!1)),lf(u=>{if(u.guards.canActivateChecks.length)return Se(u).pipe(It(f=>{let v=new gf(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(v)}),Oi(f=>{let v=!1;return Se(f).pipe(X3(this.paramsInheritanceStrategy,this.environmentInjector),It({next:()=>v=!0,complete:()=>{v||this.cancelNavigationTransition(f,"",Sn.NoDataFromResolver)}}))}),It(f=>{let v=new _f(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(v)}))}),lf(u=>{let f=v=>{let b=[];v.routeConfig?.loadComponent&&!v.routeConfig._loadedComponent&&b.push(this.configLoader.loadComponent(v.routeConfig).pipe(It(O=>{v.component=O}),Re(()=>{})));for(let O of v.children)b.push(...f(O));return b};return no(f(u.targetSnapshot.root)).pipe(Dm(null),dn(1))}),lf(()=>this.afterPreactivation()),Oi(()=>{let{currentSnapshot:u,targetSnapshot:f}=s,v=this.createViewTransition?.(this.environmentInjector,u.root,f.root);return v?Ii(v).pipe(Re(()=>s)):Se(s)}),Re(u=>{let f=a3(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=s=pe(F({},u),{targetRouterState:f}),this.currentNavigation.targetRouterState=f,s}),It(()=>{this.events.next(new Bl)}),m3(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),dn(1),It({next:u=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new hn(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),Ld(this.transitionAbortSubject.pipe(It(u=>{throw u}))),er(()=>{!a&&!c&&this.cancelNavigationTransition(s,"",Sn.SupersededByNewNavigation),this.currentNavigation?.id===s.id&&(this.currentNavigation=null)}),cn(u=>{if(c=!0,VC(u))this.events.next(new nr(s.id,this.urlSerializer.serialize(s.extractedUrl),u.message,u.cancellationCode)),d3(u)?this.events.next(new zl(u.url)):s.resolve(!1);else{this.events.next(new Xo(s.id,this.urlSerializer.serialize(s.extractedUrl),u,s.targetSnapshot??void 0));try{s.resolve(n.errorHandler(u))}catch(f){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(f)}}return $o}))}))}cancelNavigationTransition(n,r,o){let s=new nr(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function lA(i){return i!==Vl}var cA=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(dA),providedIn:"root"});let i=t;return i})(),Rf=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},dA=(()=>{let t=class t extends Rf{};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),GC=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(uA),providedIn:"root"});let i=t;return i})(),uA=(()=>{let t=class t extends GC{constructor(){super(...arguments),this.location=ae(bl),this.urlSerializer=ae(ql),this.options=ae(Yl,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=ae(zf),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new lo,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=MC(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof co)this.stateMemento=this.createStateMemento();else if(n instanceof uo)this.rawUrlTree=r.initialUrl;else if(n instanceof fu){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(o,r)}}else n instanceof Bl?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,r))):n instanceof nr&&(n.code===Sn.GuardRejected||n.code===Sn.NoDataFromResolver)?this.restoreHistory(r):n instanceof Xo?this.restoreHistory(r,!0):n instanceof hn&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let s=this.browserPageId,a=F(F({},r.extras.state),this.generateNgRouterState(r.id,s));this.location.replaceState(o,"",a)}else{let s=F(F({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),Pl=function(i){return i[i.COMPLETE=0]="COMPLETE",i[i.FAILED=1]="FAILED",i[i.REDIRECTING=2]="REDIRECTING",i}(Pl||{});function $C(i,t){i.events.pipe(Ni(e=>e instanceof hn||e instanceof nr||e instanceof Xo||e instanceof uo),Re(e=>e instanceof hn||e instanceof uo?Pl.COMPLETE:(e instanceof nr?e.code===Sn.Redirect||e.code===Sn.SupersededByNewNavigation:!1)?Pl.REDIRECTING:Pl.FAILED),Ni(e=>e!==Pl.REDIRECTING),dn(1)).subscribe(()=>{t()})}function pA(i){throw i}var hA={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},mA={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},bt=(()=>{let t=class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=ae(jd),this.stateManager=ae(GC),this.options=ae(Yl,{optional:!0})||{},this.pendingTasks=ae(vl),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=ae(Uf),this.urlSerializer=ae(ql),this.location=ae(bl),this.urlHandlingStrategy=ae(zf),this._events=new Gt,this.errorHandler=this.options.errorHandler||pA,this.navigated=!1,this.routeReuseStrategy=ae(cA),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=ae(Gl,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!ae(wu,{optional:!0}),this.eventsSubscription=new Fb,this.isNgZoneEnabled=ae(ge)instanceof ge&&ge.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof nr&&r.code!==Sn.Redirect&&r.code!==Sn.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof hn)this.navigated=!0;else if(r instanceof zl){let a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c={info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||lA(o.source)};this.scheduleNavigation(a,Vl,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}gA(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Vl,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let u=F({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(s.state=u)}let c=this.parseUrl(n);this.scheduleNavigation(c,r,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(Ff),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:u}=r,f=u?this.currentUrlTree.fragment:a,v=null;switch(c){case"merge":v=F(F({},this.currentUrlTree.queryParams),s);break;case"preserve":v=this.currentUrlTree.queryParams;break;default:v=s||null}v!==null&&(v=this.removeEmptyProps(v));let b;try{let O=o?o.snapshot:this.routerState.snapshot.root;b=xC(O)}catch{(typeof n[0]!="string"||!n[0].startsWith("/"))&&(n=[]),b=this.currentUrlTree.root}return SC(b,n,v,f??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=Js(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,Vl,null,r)}navigate(n,r={skipLocationChange:!1}){return fA(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=F({},hA):r===!1?o=F({},mA):o=r,Js(n))return aC(this.currentUrlTree,n,o);let s=this.parseUrl(n);return aC(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,s])=>(s!=null&&(r[o]=s),r),{})}scheduleNavigation(n,r,o,s,a){if(this.disposed)return Promise.resolve(!1);let c,u,f;a?(c=a.resolve,u=a.reject,f=a.promise):f=new Promise((b,O)=>{c=b,u=O});let v=this.pendingTasks.add();return $C(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(v))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:c,reject:u,promise:f,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),f.catch(b=>Promise.reject(b))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function fA(i){for(let t=0;t{let t=class t{constructor(n,r,o,s,a,c){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=s,this.el=a,this.locationStrategy=c,this.href=null,this.commands=null,this.onChanges=new Gt,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let u=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area",this.isAnchorElement?this.subscription=n.events.subscribe(f=>{f instanceof hn&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,r,o,s,a){if(this.urlTree===null||this.isAnchorElement&&(n!==0||r||o||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(this.urlTree,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=this.urlTree!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;let n=this.href===null?null:y1(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(n,r){let o=this.renderer,s=this.el.nativeElement;r!==null?o.setAttribute(s,n,r):o.removeAttribute(s,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ft),r1("tabindex"),w(nt),w(ve),w(yl))},t.\u0275dir=it({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,o){r&1&&A("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),r&2&&T("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[$t.HasDecoratorInputTransform,"preserveFragment","preserveFragment",so],skipLocationChange:[$t.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",so],replaceUrl:[$t.HasDecoratorInputTransform,"replaceUrl","replaceUrl",so],routerLink:"routerLink"},standalone:!0,features:[_l,Mt]});let i=t;return i})(),xu=(()=>{let t=class t{get isActive(){return this._isActive}constructor(n,r,o,s,a){this.router=n,this.element=r,this.renderer=o,this.cdr=s,this.link=a,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new L,this.routerEventsSubscription=n.events.subscribe(c=>{c instanceof hn&&this.update()})}ngAfterContentInit(){Se(this.links.changes,Se(null)).pipe(ul()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=Ii(n).pipe(ul()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){let r=Array.isArray(n)?n:n.split(" ");this.classes=r.filter(o=>!!o)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let n=this.hasActiveLinks();this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.classes.forEach(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(n))})}isLinkActive(n){let r=_A(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>o.urlTree?n.isActive(o.urlTree,r):!1}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ve),w(nt),w(Ne),w(et,8))},t.\u0275dir=it({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,o,s){if(r&1&&De(s,et,5),r&2){let a;q(a=W())&&(o.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Mt]});let i=t;return i})();function _A(i){return!!i.paths}var Iu=class{};var vA=(()=>{let t=class t{constructor(n,r,o,s,a){this.router=n,this.injector=o,this.preloadingStrategy=s,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(Ni(n=>n instanceof hn),Ar(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,r){let o=[];for(let s of r){s.providers&&!s._injector&&(s._injector=Bm(s.providers,n,`Route: ${s.path}`));let a=s._injector??n,c=s._loadedInjector??a;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&o.push(this.preloadConfig(a,s)),(s.children||s._loadedRoutes)&&o.push(this.processRoutes(c,s.children??s._loadedRoutes))}return Ii(o).pipe(ul())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{let o;r.loadChildren&&r.canLoad===void 0?o=this.loader.loadChildren(n,r):o=Se(null);let s=o.pipe(vi(a=>a===null?Se(void 0):(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,this.processRoutes(a.injector??n,a.routes))));if(r.loadComponent&&!r._loadedComponent){let a=this.loader.loadComponent(r);return Ii([s,a]).pipe(ul())}else return s})}};t.\u0275fac=function(r){return new(r||t)(J(bt),J(Hd),J(qo),J(Iu),J(Bf))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),qC=new le(""),yA=(()=>{let t=class t{constructor(n,r,o,s,a={}){this.urlSerializer=n,this.transitions=r,this.viewportScroller=o,this.zone=s,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof co?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof hn?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof uo&&n.code===mu.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof gu&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new gu(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};t.\u0275fac=function(r){Fm()},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function WC(i,...t){return Nn([{provide:Gl,multi:!0,useValue:i},[],{provide:ft,useFactory:KC,deps:[bt]},{provide:Gd,multi:!0,useFactory:QC},t.map(e=>e.\u0275providers)])}function KC(i){return i.routerState.root}function Zl(i,t){return{\u0275kind:i,\u0275providers:t}}function QC(){let i=ae(Mi);return t=>{let e=i.get($d);if(t!==e.components[0])return;let n=i.get(bt),r=i.get(YC);i.get(jf)===1&&n.initialNavigation(),i.get(ZC,null,Vm.Optional)?.setUpPreloading(),i.get(qC,null,Vm.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var YC=new le("",{factory:()=>new Gt}),jf=new le("",{providedIn:"root",factory:()=>1});function bA(){return Zl(2,[{provide:jf,useValue:0},{provide:Um,multi:!0,deps:[Mi],useFactory:t=>{let e=t.get(M1,Promise.resolve());return()=>e.then(()=>new Promise(n=>{let r=t.get(bt),o=t.get(YC);$C(r,()=>{n(!0)}),t.get(Uf).afterPreactivation=()=>(n(!0),o.closed?Se(void 0):o),r.initialNavigation()}))}}])}function CA(){return Zl(3,[{provide:Um,multi:!0,useFactory:()=>{let t=ae(bt);return()=>{t.setUpLocationChangeListener()}}},{provide:jf,useValue:2}])}var ZC=new le("");function IA(i){return Zl(0,[{provide:ZC,useExisting:vA},{provide:Iu,useExisting:i}])}function wA(){return Zl(8,[uC,{provide:wu,useExisting:uC}])}function TA(i){let t=[{provide:jC,useValue:sA},{provide:HC,useValue:F({skipNextTransition:!!i?.skipInitialTransition},i)}];return Zl(9,t)}var hC=new le("ROUTER_FORROOT_GUARD"),xA=[bl,{provide:ql,useClass:Fl},bt,Wl,{provide:ft,useFactory:KC,deps:[bt]},Bf,[]],Ve=(()=>{let t=class t{constructor(n){}static forRoot(n,r){return{ngModule:t,providers:[xA,[],{provide:Gl,multi:!0,useValue:n},{provide:hC,useFactory:MA,deps:[[bt,new hi,new s1]]},{provide:Yl,useValue:r||{}},r?.useHash?EA():OA(),SA(),r?.preloadingStrategy?IA(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?kA(r):[],r?.bindToComponentInputs?wA().\u0275providers:[],r?.enableViewTransitions?TA().\u0275providers:[],AA()]}}static forChild(n){return{ngModule:t,providers:[{provide:Gl,multi:!0,useValue:n}]}}};t.\u0275fac=function(r){return new(r||t)(J(hC,8))},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();function SA(){return{provide:qC,useFactory:()=>{let i=ae(R1),t=ae(ge),e=ae(Yl),n=ae(Uf),r=ae(ql);return e.scrollOffset&&i.setOffset(e.scrollOffset),new yA(r,n,i,t,e)}}}function EA(){return{provide:yl,useClass:A1}}function OA(){return{provide:yl,useClass:k1}}function MA(i){return"guarded"}function kA(i){return[i.initialNavigation==="disabled"?CA().\u0275providers:[],i.initialNavigation==="enabledBlocking"?bA().\u0275providers:[]]}var mC=new le("");function AA(){return[{provide:mC,useFactory:QC},{provide:Gd,multi:!0,useExisting:mC}]}var sI=(()=>{let t=class t{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};t.\u0275fac=function(r){return new(r||t)(w(nt),w(ve))},t.\u0275dir=it({type:t});let i=t;return i})(),DA=(()=>{let t=class t extends sI{};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275dir=it({type:t,features:[ye]});let i=t;return i})(),zt=new le("NgValueAccessor");var PA={provide:zt,useExisting:Tt(()=>mo),multi:!0};function RA(){let i=$s()?$s().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var VA=new le("CompositionEventMode"),mo=(()=>{let t=class t extends sI{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!RA())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};t.\u0275fac=function(r){return new(r||t)(w(nt),w(ve),w(VA,8))},t.\u0275dir=it({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&A("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[mt([PA]),ye]});let i=t;return i})();function ho(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function aI(i){return i!=null&&typeof i.length=="number"}var Wf=new le("NgValidators"),Kf=new le("NgAsyncValidators"),LA=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mn=class{static min(t){return FA(t)}static max(t){return NA(t)}static required(t){return BA(t)}static requiredTrue(t){return zA(t)}static email(t){return UA(t)}static minLength(t){return jA(t)}static maxLength(t){return HA(t)}static pattern(t){return GA(t)}static nullValidator(t){return lI(t)}static compose(t){return mI(t)}static composeAsync(t){return gI(t)}};function FA(i){return t=>{if(ho(t.value)||ho(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e{if(ho(t.value)||ho(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function BA(i){return ho(i.value)?{required:!0}:null}function zA(i){return i.value===!0?null:{required:!0}}function UA(i){return ho(i.value)||LA.test(i.value)?null:{email:!0}}function jA(i){return t=>ho(t.value)||!aI(t.value)?null:t.value.lengthaI(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function GA(i){if(!i)return lI;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(ho(n.value))return null;let r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function lI(i){return null}function cI(i){return i!=null}function dI(i){return Bd(i)?Ii(i):i}function uI(i){let t={};return i.forEach(e=>{t=e!=null?F(F({},t),e):t}),Object.keys(t).length===0?null:t}function pI(i,t){return t.map(e=>e(i))}function $A(i){return!i.validate}function hI(i){return i.map(t=>$A(t)?t:e=>t.validate(e))}function mI(i){if(!i)return null;let t=i.filter(cI);return t.length==0?null:function(e){return uI(pI(e,t))}}function fI(i){return i!=null?mI(hI(i)):null}function gI(i){if(!i)return null;let t=i.filter(cI);return t.length==0?null:function(e){let n=pI(e,t).map(dI);return jb(n).pipe(Re(uI))}}function _I(i){return i!=null?gI(hI(i)):null}function XC(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function vI(i){return i._rawValidators}function yI(i){return i._rawAsyncValidators}function Hf(i){return i?Array.isArray(i)?i:[i]:[]}function Eu(i,t){return Array.isArray(i)?i.includes(t):i===t}function JC(i,t){let e=Hf(t);return Hf(i).forEach(r=>{Eu(e,r)||e.push(r)}),e}function eI(i,t){return Hf(t).filter(e=>!Eu(i,e))}var Ou=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=fI(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=_I(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},es=class extends Ou{get formDirective(){return null}get path(){return null}},Rr=class extends Ou{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Mu=class{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},qA={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},CJ=pe(F({},qA),{"[class.ng-submitted]":"isSubmitted"}),ii=(()=>{let t=class t extends Mu{constructor(n){super(n)}};t.\u0275fac=function(r){return new(r||t)(w(Rr,2))},t.\u0275dir=it({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&qt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[ye]});let i=t;return i})(),sn=(()=>{let t=class t extends Mu{constructor(n){super(n)}};t.\u0275fac=function(r){return new(r||t)(w(es,10))},t.\u0275dir=it({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&qt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},features:[ye]});let i=t;return i})();var Xl="VALID",Su="INVALID",ia="PENDING",Jl="DISABLED";function Qf(i){return(Du(i)?i.validators:i)||null}function WA(i){return Array.isArray(i)?fI(i):i||null}function Yf(i,t){return(Du(t)?t.asyncValidators:i)||null}function KA(i){return Array.isArray(i)?_I(i):i||null}function Du(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function bI(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new wt(1e3,"");if(!n[e])throw new wt(1001,"")}function CI(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new wt(1002,"")})}var na=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Xl}get invalid(){return this.status===Su}get pending(){return this.status==ia}get disabled(){return this.status===Jl}get enabled(){return this.status!==Jl}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(JC(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(JC(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(eI(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(eI(t,this._rawAsyncValidators))}hasValidator(t){return Eu(this._rawValidators,t)}hasAsyncValidator(t){return Eu(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=ia,t.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Jl,this.errors=null,this._forEachChild(n=>{n.disable(pe(F({},t),{onlySelf:!0}))}),this._updateValue(),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(pe(F({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Xl,this._forEachChild(n=>{n.enable(pe(F({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(pe(F({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Xl||this.status===ia)&&this._runAsyncValidator(t.emitEvent)),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Jl:Xl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=ia,this._hasOwnPendingAsyncValidator=!0;let e=dI(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new L,this.statusChanges=new L}_calculateStatus(){return this._allControlsDisabled()?Jl:this.errors?Su:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ia)?ia:this._anyControlsHaveStatus(Su)?Su:Xl}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Du(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=WA(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=KA(this._rawAsyncValidators)}},on=class extends na{constructor(t,e,n){super(Qf(e),Yf(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){CI(this,!0,t),Object.keys(t).forEach(n=>{bI(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,o)=>{n=e(n,r,o)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Gf=class extends on{};var Pu=new le("CallSetDisabledState",{providedIn:"root",factory:()=>Ru}),Ru="always";function II(i,t){return[...t.path,i]}function $f(i,t,e=Ru){Zf(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),YA(i,t),XA(i,t),ZA(i,t),QA(i,t)}function tI(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),Au(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ku(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function QA(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Zf(i,t){let e=vI(i);t.validator!==null?i.setValidators(XC(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=yI(i);t.asyncValidator!==null?i.setAsyncValidators(XC(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();ku(t._rawValidators,r),ku(t._rawAsyncValidators,r)}function Au(i,t){let e=!1;if(i!==null){if(t.validator!==null){let r=vI(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,i.setValidators(o))}}if(t.asyncValidator!==null){let r=yI(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,i.setAsyncValidators(o))}}}let n=()=>{};return ku(t._rawValidators,n),ku(t._rawAsyncValidators,n),e}function YA(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&wI(i,t)})}function ZA(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&wI(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function wI(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function XA(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function JA(i,t){i==null,Zf(i,t)}function eD(i,t){return Au(i,t)}function TI(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function tD(i){return Object.getPrototypeOf(i.constructor)===DA}function iD(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function xI(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(o=>{o.constructor===mo?e=o:tD(o)?n=o:r=o}),r||n||e||null}function nD(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function iI(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function nI(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var ti=class extends na{constructor(t=null,e,n){super(Qf(e),Yf(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Du(e)&&(e.nonNullable||e.initialValueIsDefault)&&(nI(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){iI(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){iI(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){nI(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var rD=i=>i instanceof ti;var oD={provide:Rr,useExisting:Tt(()=>Bn)},rI=Promise.resolve(),Bn=(()=>{let t=class t extends Rr{constructor(n,r,o,s,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new ti,this._registered=!1,this.name="",this.update=new L,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=xI(this,s)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),TI(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){$f(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){rI.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,o=r!==0&&so(r);rI.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?II(n,this._parent):[n]}};t.\u0275fac=function(r){return new(r||t)(w(es,9),w(Wf,10),w(Kf,10),w(zt,10),w(Ne,8),w(Pu,8))},t.\u0275dir=it({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[$t.None,"disabled","isDisabled"],model:[$t.None,"ngModel","model"],options:[$t.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[mt([oD]),ye,Mt]});let i=t;return i})(),an=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=it({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=t;return i})();var sD=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();var SI=new le("NgModelWithFormControlWarning");var aD={provide:es,useExisting:Tt(()=>Qi)},Qi=(()=>{let t=class t extends es{constructor(n,r,o){super(),this.callSetDisabledState=o,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new L,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Au(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return $f(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){tI(n.control||null,n,!1),nD(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this.submitted=!0,iD(this.form,this.directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(tI(r||null,n),rD(o)&&($f(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);JA(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&eD(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Zf(this.form,this),this._oldForm&&Au(this._oldForm,this)}_checkFormPresent(){this.form}};t.\u0275fac=function(r){return new(r||t)(w(Wf,10),w(Kf,10),w(Pu,8))},t.\u0275dir=it({type:t,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&A("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[$t.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[mt([aD]),ye,Mt]});let i=t;return i})();var lD={provide:Rr,useExisting:Tt(()=>Yi)},Yi=(()=>{let t=class t extends Rr{set isDisabled(n){}constructor(n,r,o,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new L,this._ngModelWarningSent=!1,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=xI(this,s)}ngOnChanges(n){this._added||this._setUpControl(),TI(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return II(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};t._ngModelWarningSentOnce=!1,t.\u0275fac=function(r){return new(r||t)(w(es,13),w(Wf,10),w(Kf,10),w(zt,10),w(SI,8))},t.\u0275dir=it({type:t,selectors:[["","formControlName",""]],inputs:{name:[$t.None,"formControlName","name"],isDisabled:[$t.None,"disabled","isDisabled"],model:[$t.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[mt([lD]),ye,Mt]});let i=t;return i})();var EI=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[sD]});let i=t;return i})(),qf=class extends na{constructor(t,e,n){super(Qf(e),Yf(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){CI(this,!1,t),t.forEach((n,r)=>{bI(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function oI(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Vu=(()=>{let t=class t{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new t;return n.useNonNullable=!0,n}group(n,r=null){let o=this._reduceControls(n),s={};return oI(r)?s=r:r!==null&&(s.validators=r.validator,s.asyncValidators=r.asyncValidator),new on(o,s)}record(n,r=null){let o=this._reduceControls(n);return new Gf(o,r)}control(n,r,o){let s={};return this.useNonNullable?(oI(r)?s=r:(s.validators=r,s.asyncValidators=o),new ti(n,pe(F({},s),{nonNullable:!0}))):new ti(n,r,o)}array(n,r,o){let s=n.map(a=>this._createControl(a));return new qf(s,r,o)}_reduceControls(n){let r={};return Object.keys(n).forEach(o=>{r[o]=this._createControl(n[o])}),r}_createControl(n){if(n instanceof ti)return n;if(n instanceof na)return n;if(Array.isArray(n)){let r=n[0],o=n.length>1?n[1]:null,s=n.length>2?n[2]:null;return this.control(r,o,s)}else return this.control(n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var or=(()=>{let t=class t{static withConfig(n){return{ngModule:t,providers:[{provide:Pu,useValue:n.callSetDisabledState??Ru}]}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[EI]});let i=t;return i})(),Bi=(()=>{let t=class t{static withConfig(n){return{ngModule:t,providers:[{provide:SI,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:Pu,useValue:n.callSetDisabledState??Ru}]}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[EI]});let i=t;return i})();var re=class i{static equals(t,e,n){return n?this.resolveFieldData(t,n)===this.resolveFieldData(e,n):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var n=Array.isArray(t),r=Array.isArray(e),o,s,a;if(n&&r){if(s=t.length,s!=e.length)return!1;for(o=s;o--!==0;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(n!=r)return!1;var c=this.isDate(t),u=this.isDate(e);if(c!=u)return!1;if(c&&u)return t.getTime()==e.getTime();var f=t instanceof RegExp,v=e instanceof RegExp;if(f!=v)return!1;if(f&&v)return t.toString()==e.toString();var b=Object.keys(t);if(s=b.length,s!==Object.keys(e).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,b[o]))return!1;for(o=s;o--!==0;)if(a=b[o],!this.equalsByValue(t[a],e[a]))return!1;return!0}return t!==t&&e!==e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(e.indexOf(".")==-1)return t[e];{let n=e.split("."),r=t;for(let o=0,s=n.length;o=t.length&&(n%=t.length,e%=t.length),t.splice(n,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,n,r){if(n.length>0){let o=!1;for(let s=0;se){n.splice(s,0,t),o=!0;break}o||n.push(t)}else n.push(t)}static findIndexInList(t,e){let n=-1;if(e){for(let r=0;re?1:0,o}static sort(t,e,n=1,r,o=1){let s=i.compare(t,e,r,n),a=n;return(i.isEmpty(t)||i.isEmpty(e))&&(a=o===1?n:o),a*s}static merge(t,e){if(!(t==null&&e==null)){{if((t==null||typeof t=="object")&&(e==null||typeof e=="object"))return F(F({},t||{}),e||{});if((t==null||typeof t=="string")&&(e==null||typeof e=="string"))return[t||"",e||""].join(" ")}return e||t}}static isPrintableCharacter(t=""){return this.isNotEmpty(t)&&t.length===1&&t.match(/\S| /)}static getItemValue(t,...e){return this.isFunction(t)?t(...e):t}static findLastIndex(t,e){let n=-1;if(this.isNotEmpty(t))try{n=t.findLastIndex(e)}catch{n=t.lastIndexOf([...t].reverse().find(e))}return n}static findLast(t,e){let n;if(this.isNotEmpty(t))try{n=t.findLast(e)}catch{n=[...t].reverse().find(e)}return n}static deepEquals(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var n=Array.isArray(t),r=Array.isArray(e),o,s,a;if(n&&r){if(s=t.length,s!=e.length)return!1;for(o=s;o--!==0;)if(!this.deepEquals(t[o],e[o]))return!1;return!0}if(n!=r)return!1;var c=t instanceof Date,u=e instanceof Date;if(c!=u)return!1;if(c&&u)return t.getTime()==e.getTime();var f=t instanceof RegExp,v=e instanceof RegExp;if(f!=v)return!1;if(f&&v)return t.toString()==e.toString();var b=Object.keys(t);if(s=b.length,s!==Object.keys(e).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,b[o]))return!1;for(o=s;o--!==0;)if(a=b[o],!this.deepEquals(t[a],e[a]))return!1;return!0}return t!==t&&e!==e}},OI=0;function Me(i="pn_id_"){return OI++,`${i}${OI}`}function cD(){let i=[],t=(o,s)=>{let a=i.length>0?i[i.length-1]:{key:o,value:s},c=a.value+(a.key===o?0:s)+2;return i.push({key:o,value:c}),c},e=o=>{i=i.filter(s=>s.value!==o)},n=()=>i.length>0?i[i.length-1].value:0,r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(t(o,a)))},clear:o=>{o&&(e(r(o)),o.style.zIndex="")},getCurrent:()=>n()}}var Pt=cD();var MI=["*"];var zi=(()=>{class i{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return i})();var Lu=(()=>{class i{filter(e,n,r,o,s){let a=[];if(e)for(let c of e)for(let u of n){let f=re.resolveFieldData(c,u);if(this.filters[o](f,r,s)){a.push(c);break}}return a}filters={startsWith:(e,n,r)=>{if(n==null||n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r);return re.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,n,r)=>{if(n==null||typeof n=="string"&&n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r);return re.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)!==-1},notContains:(e,n,r)=>{if(n==null||typeof n=="string"&&n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r);return re.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)===-1},endsWith:(e,n,r)=>{if(n==null||n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r),s=re.removeAccents(e.toString()).toLocaleLowerCase(r);return s.indexOf(o,s.length-o.length)!==-1},equals:(e,n,r)=>n==null||typeof n=="string"&&n.trim()===""?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()===n.getTime():re.removeAccents(e.toString()).toLocaleLowerCase(r)==re.removeAccents(n.toString()).toLocaleLowerCase(r),notEquals:(e,n,r)=>n==null||typeof n=="string"&&n.trim()===""?!1:e==null?!0:e.getTime&&n.getTime?e.getTime()!==n.getTime():re.removeAccents(e.toString()).toLocaleLowerCase(r)!=re.removeAccents(n.toString()).toLocaleLowerCase(r),in:(e,n)=>{if(n==null||n.length===0)return!0;for(let r=0;rn==null||n[0]==null||n[1]==null?!0:e==null?!1:e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1],lt:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n,gt:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>n.getTime():e>n,gte:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n,is:(e,n,r)=>this.filters.equals(e,n,r),isNot:(e,n,r)=>this.filters.notEquals(e,n,r),before:(e,n,r)=>this.filters.lt(e,n,r),after:(e,n,r)=>this.filters.gt(e,n,r),dateIs:(e,n)=>n==null?!0:e==null?!1:e.toDateString()===n.toDateString(),dateIsNot:(e,n)=>n==null?!0:e==null?!1:e.toDateString()!==n.toDateString(),dateBefore:(e,n)=>n==null?!0:e==null?!1:e.getTime()n==null?!0:e==null?!1:e.getTime()>n.getTime()};register(e,n){this.filters[e]=n}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),sr=(()=>{class i{messageSource=new Gt;clearSource=new Gt;messageObserver=this.messageSource.asObservable();clearObserver=this.clearSource.asObservable();add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac})}return i})(),Mn=(()=>{class i{clickSource=new Gt;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var At=(()=>{class i{ripple=!1;inputStyle="outlined";overlayOptions={};filterMatchModeOptions={text:[zi.STARTS_WITH,zi.CONTAINS,zi.NOT_CONTAINS,zi.ENDS_WITH,zi.EQUALS,zi.NOT_EQUALS],numeric:[zi.EQUALS,zi.NOT_EQUALS,zi.LESS_THAN,zi.LESS_THAN_OR_EQUAL_TO,zi.GREATER_THAN,zi.GREATER_THAN_OR_EQUAL_TO],date:[zi.DATE_IS,zi.DATE_IS_NOT,zi.DATE_BEFORE,zi.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new Gt;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=F(F({},this.translation),e),this.translationSource.next(this.translation)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),fo=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-header"]],ngContentSelectors:MI,decls:1,vars:0,template:function(n,r){n&1&&(je(),Ae(0))},encapsulation:2})}return i})(),go=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-footer"]],ngContentSelectors:MI,decls:1,vars:0,template:function(n,r){n&1&&(je(),Ae(0))},encapsulation:2})}return i})(),he=(()=>{class i{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(n){return new(n||i)(w(zd))};static \u0275dir=it({type:i,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[$t.None,"pTemplate","name"]}})}return i})(),Te=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})(),Jt=(()=>{class i{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="Show Filter Menu";static HIDE_FILTER_MENU="Hide Filter Menu";static SELECTION_MESSAGE="{0} items selected"}return i})();var x=(()=>{class i{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(e,n){e&&n&&(e.classList?e.classList.add(n):e.className+=" "+n)}static addMultipleClasses(e,n){if(e&&n)if(e.classList){let r=n.trim().split(" ");for(let o=0;or.split(" ").forEach(o=>this.removeClass(e,o)))}static hasClass(e,n){return e&&n?e.classList?e.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(e.className):!1}static siblings(e){return Array.prototype.filter.call(e.parentNode.children,function(n){return n!==e})}static find(e,n){return Array.from(e.querySelectorAll(n))}static findSingle(e,n){return this.isElement(e)?e.querySelector(n):null}static index(e){let n=e.parentNode.childNodes,r=0;for(var o=0;o{if(j)return getComputedStyle(j).getPropertyValue("position")==="relative"?j:r(j.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=n.offsetHeight,a=n.getBoundingClientRect(),c=this.getWindowScrollTop(),u=this.getWindowScrollLeft(),f=this.getViewport(),b=r(e)?.getBoundingClientRect()||{top:-1*c,left:-1*u},O,V;a.top+s+o.height>f.height?(O=a.top-b.top-o.height,e.style.transformOrigin="bottom",a.top+O<0&&(O=-1*a.top)):(O=s+a.top-b.top,e.style.transformOrigin="top");let K=a.left+o.width-f.width,P=a.left-b.left;o.width>f.width?V=(a.left-b.left)*-1:K>0?V=P-K:V=a.left-b.left,e.style.top=O+"px",e.style.left=V+"px"}static absolutePosition(e,n){let r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=n.offsetHeight,c=n.offsetWidth,u=n.getBoundingClientRect(),f=this.getWindowScrollTop(),v=this.getWindowScrollLeft(),b=this.getViewport(),O,V;u.top+a+o>b.height?(O=u.top+f-o,e.style.transformOrigin="bottom",O<0&&(O=f)):(O=a+u.top+f,e.style.transformOrigin="top"),u.left+s>b.width?V=Math.max(0,u.left+v+c-s):V=u.left+v,e.style.top=O+"px",e.style.left=V+"px"}static getParents(e,n=[]){return e.parentNode===null?n:this.getParents(e.parentNode,n.concat([e.parentNode]))}static getScrollableParents(e){let n=[];if(e){let r=this.getParents(e),o=/(auto|scroll)/,s=a=>{let c=window.getComputedStyle(a,null);return o.test(c.getPropertyValue("overflow"))||o.test(c.getPropertyValue("overflowX"))||o.test(c.getPropertyValue("overflowY"))};for(let a of r){let c=a.nodeType===1&&a.dataset.scrollselectors;if(c){let u=c.split(",");for(let f of u){let v=this.findSingle(a,f);v&&s(v)&&n.push(v)}}a.nodeType!==9&&s(a)&&n.push(a)}}return n}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementDimensions(e){let n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}static scrollInView(e,n){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,c=e.getBoundingClientRect(),f=n.getBoundingClientRect().top+document.body.scrollTop-(c.top+document.body.scrollTop)-o-a,v=e.scrollTop,b=e.clientHeight,O=this.getOuterHeight(n);f<0?e.scrollTop=v+f:f+O>b&&(e.scrollTop=v+f-b+O)}static fadeIn(e,n){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+(new Date().getTime()-r)/n,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,n){var r=1,o=50,s=n,a=o/s;let c=setInterval(()=>{r=r-a,r<=0&&(r=0,clearInterval(c)),e.style.opacity=r},o)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,n){var r=Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return[].indexOf.call(document.querySelectorAll(s),this)!==-1};return o.call(e,n)}static getOuterWidth(e,n){let r=e.offsetWidth;if(n){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let n=getComputedStyle(e);return parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}static getHorizontalMargin(e){let n=getComputedStyle(e);return parseFloat(n.marginLeft)+parseFloat(n.marginRight)}static innerWidth(e){let n=e.offsetWidth,r=getComputedStyle(e);return n+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}static width(e){let n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}static getInnerHeight(e){let n=e.offsetHeight,r=getComputedStyle(e);return n+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),n}static getOuterHeight(e,n){let r=e.offsetHeight;if(n){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let n=e.offsetHeight,r=getComputedStyle(e);return n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),n}static getWidth(e){let n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),n}static getViewport(){let e=window,n=document,r=n.documentElement,o=n.getElementsByTagName("body")[0],s=e.innerWidth||r.clientWidth||o.clientWidth,a=e.innerHeight||r.clientHeight||o.clientHeight;return{width:s,height:a}}static getOffset(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,n){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(n,e)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var e=window.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return!0;var r=e.indexOf("Trident/");if(r>0){var o=e.indexOf("rv:");return!0}var s=e.indexOf("Edge/");return s>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,n){if(this.isElement(n))n.appendChild(e);else if(n&&n.el&&n.el.nativeElement)n.el.nativeElement.appendChild(e);else throw"Cannot append "+n+" to "+e}static removeChild(e,n){if(this.isElement(n))n.removeChild(e);else if(n.el&&n.el.nativeElement)n.el.nativeElement.removeChild(e);else throw"Cannot remove "+e+" from "+n}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}static calculateScrollbarWidth(e){if(e){let n=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);let r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let n=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n}static invokeElementMethod(e,n,r){e[n].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||e.offsetParent===null}static isVisible(e){return e&&e.offsetParent!=null}static isExist(e){return e!==null&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,n){e&&document.activeElement!==e&&e.focus(n)}static getFocusableElements(e,n=""){let r=this.find(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, +`;return function(){var ee=new Error("get-stack-trace"),fe=ee&&ee.stack?ee.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",ot=i.console&&(i.console.warn||i.console.log);return ot&&ot.call(i.console,N,fe),C.apply(this,arguments)}}var V;typeof Object.assign!="function"?V=function(I){if(I===n||I===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(I),N=1;N-1}function Ht(C){return C.trim().split(/\s+/g)}function _i(C,I,M){if(C.indexOf&&!M)return C.indexOf(I);for(var N=0;NWi[I]}):N=N.sort()),N}function Ls(C,I){for(var M,N,ee=I[0].toUpperCase()+I.slice(1),fe=0;fe1&&!M.firstMultiple?M.firstMultiple=bb(I):ee===1&&(M.firstMultiple=!1);var fe=M.firstInput,ot=M.firstMultiple,Ci=ot?ot.center:fe.center,Ei=I.center=Cb(N);I.timeStamp=u(),I.deltaTime=I.timeStamp-fe.timeStamp,I.angle=gm(Ci,Ei),I.distance=Td(Ci,Ei),vM(M,I),I.offsetDirection=wb(I.deltaX,I.deltaY);var Wi=Ib(I.deltaTime,I.deltaX,I.deltaY);I.overallVelocityX=Wi.x,I.overallVelocityY=Wi.y,I.overallVelocity=c(Wi.x)>c(Wi.y)?Wi.x:Wi.y,I.scale=ot?CM(ot.pointers,N):1,I.rotation=ot?bM(ot.pointers,N):0,I.maxPointers=M.prevInput?I.pointers.length>M.prevInput.maxPointers?I.pointers.length:M.prevInput.maxPointers:I.pointers.length,yM(M,I);var er=C.element;Et(I.srcEvent.target,er)&&(er=I.srcEvent.target),I.target=er}function vM(C,I){var M=I.center,N=C.offsetDelta||{},ee=C.prevDelta||{},fe=C.prevInput||{};(I.eventType===qi||fe.eventType===pi)&&(ee=C.prevDelta={x:fe.deltaX||0,y:fe.deltaY||0},N=C.offsetDelta={x:M.x,y:M.y}),I.deltaX=ee.x+(M.x-N.x),I.deltaY=ee.y+(M.y-N.y)}function yM(C,I){var M=C.lastInterval||I,N=I.timeStamp-M.timeStamp,ee,fe,ot,Ci;if(I.eventType!=tn&&(N>mM||M.velocity===n)){var Ei=I.deltaX-M.deltaX,Wi=I.deltaY-M.deltaY,er=Ib(N,Ei,Wi);fe=er.x,ot=er.y,ee=c(er.x)>c(er.y)?er.x:er.y,Ci=wb(Ei,Wi),C.lastInterval=I}else ee=M.velocity,fe=M.velocityX,ot=M.velocityY,Ci=M.direction;I.velocity=ee,I.velocityX=fe,I.velocityY=ot,I.direction=Ci}function bb(C){for(var I=[],M=0;M=c(I)?C<0?nl:rl:I<0?ol:sl}function Td(C,I,M){M||(M=yb);var N=I[M[0]]-C[M[0]],ee=I[M[1]]-C[M[1]];return Math.sqrt(N*N+ee*ee)}function gm(C,I,M){M||(M=yb);var N=I[M[0]]-C[M[0]],ee=I[M[1]]-C[M[1]];return Math.atan2(ee,N)*180/Math.PI}function bM(C,I){return gm(I[1],I[0],wd)+gm(C[1],C[0],wd)}function CM(C,I){return Td(I[0],I[1],wd)/Td(C[0],C[1],wd)}var IM={mousedown:qi,mousemove:jo,mouseup:pi},wM="mousedown",TM="mousemove mouseup";function xd(){this.evEl=wM,this.evWin=TM,this.pressed=!1,In.apply(this,arguments)}j(xd,In,{handler:function(I){var M=IM[I.type];M&qi&&I.button===0&&(this.pressed=!0),M&jo&&I.which!==1&&(M=pi),this.pressed&&(M&pi&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[I],changedPointers:[I],pointerType:fm,srcEvent:I}))}});var xM={pointerdown:qi,pointermove:jo,pointerup:pi,pointercancel:tn,pointerout:tn},SM={2:il,3:pM,4:fm,5:hM},Tb="pointerdown",xb="pointermove pointerup pointercancel";i.MSPointerEvent&&!i.PointerEvent&&(Tb="MSPointerDown",xb="MSPointerMove MSPointerUp MSPointerCancel");function _m(){this.evEl=Tb,this.evWin=xb,In.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}j(_m,In,{handler:function(I){var M=this.store,N=!1,ee=I.type.toLowerCase().replace("ms",""),fe=xM[ee],ot=SM[I.pointerType]||I.pointerType,Ci=ot==il,Ei=_i(M,I.pointerId,"pointerId");fe&qi&&(I.button===0||Ci)?Ei<0&&(M.push(I),Ei=M.length-1):fe&(pi|tn)&&(N=!0),!(Ei<0)&&(M[Ei]=I,this.callback(this.manager,fe,{pointers:M,changedPointers:[I],pointerType:ot,srcEvent:I}),N&&M.splice(Ei,1))}});var EM={touchstart:qi,touchmove:jo,touchend:pi,touchcancel:tn},OM="touchstart",MM="touchstart touchmove touchend touchcancel";function Sb(){this.evTarget=OM,this.evWin=MM,this.started=!1,In.apply(this,arguments)}j(Sb,In,{handler:function(I){var M=EM[I.type];if(M===qi&&(this.started=!0),!!this.started){var N=kM.call(this,I,M);M&(pi|tn)&&N[0].length-N[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:N[0],changedPointers:N[1],pointerType:il,srcEvent:I})}}});function kM(C,I){var M=Zn(C.touches),N=Zn(C.changedTouches);return I&(pi|tn)&&(M=tl(M.concat(N),"identifier",!0)),[M,N]}var AM={touchstart:qi,touchmove:jo,touchend:pi,touchcancel:tn},DM="touchstart touchmove touchend touchcancel";function Sd(){this.evTarget=DM,this.targetIds={},In.apply(this,arguments)}j(Sd,In,{handler:function(I){var M=AM[I.type],N=PM.call(this,I,M);N&&this.callback(this.manager,M,{pointers:N[0],changedPointers:N[1],pointerType:il,srcEvent:I})}});function PM(C,I){var M=Zn(C.touches),N=this.targetIds;if(I&(qi|jo)&&M.length===1)return N[M[0].identifier]=!0,[M,M];var ee,fe,ot=Zn(C.changedTouches),Ci=[],Ei=this.target;if(fe=M.filter(function(Wi){return Et(Wi.target,Ei)}),I===qi)for(ee=0;ee-1&&N.splice(fe,1)};setTimeout(ee,RM)}}function LM(C){for(var I=C.srcEvent.clientX,M=C.srcEvent.clientY,N=0;N-1&&this.requireFail.splice(I,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(C){return!!this.simultaneous[C.id]},emit:function(C){var I=this,M=this.state;function N(ee){I.manager.emit(ee,C)}M=eo&&N(I.options.event+Pb(M))},tryEmit:function(C){if(this.canEmit())return this.emit(C);this.state=Jn},canEmit:function(){for(var C=0;CI.threshold&&ee&I.direction},attrTest:function(C){return Nn.prototype.attrTest.call(this,C)&&(this.state&wn||!(this.state&wn)&&this.directionTest(C))},emit:function(C){this.pX=C.deltaX,this.pY=C.deltaY;var I=Rb(C.direction);I&&(C.additionalEvent=this.options.event+I),this._super.emit.call(this,C)}});function Cm(){Nn.apply(this,arguments)}j(Cm,Nn,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Go]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.scale-1)>this.options.threshold||this.state&wn)},emit:function(C){if(C.scale!==1){var I=C.scale<1?"in":"out";C.additionalEvent=this.options.event+I}this._super.emit.call(this,C)}});function Im(){Mr.apply(this,arguments),this._timer=null,this._input=null}j(Im,Mr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Db]},process:function(C){var I=this.options,M=C.pointers.length===I.pointers,N=C.distanceI.time;if(this._input=C,!N||!M||C.eventType&(pi|tn)&&!ee)this.reset();else if(C.eventType&qi)this.reset(),this._timer=f(function(){this.state=Or,this.tryEmit()},I.time,this);else if(C.eventType&pi)return Or;return Jn},reset:function(){clearTimeout(this._timer)},emit:function(C){this.state===Or&&(C&&C.eventType&pi?this.manager.emit(this.options.event+"up",C):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function wm(){Nn.apply(this,arguments)}j(wm,Nn,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Go]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.rotation)>this.options.threshold||this.state&wn)}});function Tm(){Nn.apply(this,arguments)}j(Tm,Nn,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Xn|Ho,pointers:1},getTouchAction:function(){return kd.prototype.getTouchAction.call(this)},attrTest:function(C){var I=this.options.direction,M;return I&(Xn|Ho)?M=C.overallVelocity:I&Xn?M=C.overallVelocityX:I&Ho&&(M=C.overallVelocityY),this._super.attrTest.call(this,C)&&I&C.offsetDirection&&C.distance>this.options.threshold&&C.maxPointers==this.options.pointers&&c(M)>this.options.velocity&&C.eventType&pi},emit:function(C){var I=Rb(C.offsetDirection);I&&this.manager.emit(this.options.event+I,C),this.manager.emit(this.options.event,C)}});function Ad(){Mr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}j(Ad,Mr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ym]},process:function(C){var I=this.options,M=C.pointers.length===I.pointers,N=C.distance{this.headers=new Map,t.split(` +`).forEach(e=>{let n=e.indexOf(":");if(n>0){let r=e.slice(0,n),o=r.toLowerCase(),s=e.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.setHeaderEntries(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Hm=class{encodeKey(t){return U1(t)}encodeValue(t){return U1(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function WM(i,t){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],c=e.get(s)||[];c.push(a),e.set(s,c)}),e}var KM=/%(\d[a-f0-9])/gi,QM={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function U1(i){return encodeURIComponent(i).replace(KM,(t,e)=>QM[e]??t)}function Xd(i){return`${i}`}var ao=class i{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Hm,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=WM(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],r=Array.isArray(n)?n.map(Xd):[Xd(n)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let r=t[n];Array.isArray(r)?r.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(Xd(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],r=n.indexOf(Xd(t.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}},eu=class{constructor(t){this.defaultValue=t}},Gm=class{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function YM(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function j1(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function H1(i){return typeof Blob<"u"&&i instanceof Blob}function G1(i){return typeof FormData<"u"&&i instanceof FormData}function ZM(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var wl=class i{constructor(t,e,n,r){this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let o;if(YM(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers||(this.headers=new Qo),this.context||(this.context=new Gm),!this.params)this.params=new ao,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),c=a===-1?"?":av.set(b,t.setHeaders[b]),c)),t.setParams&&(u=Object.keys(t.setParams).reduce((v,b)=>v.set(b,t.setParams[b]),u)),new i(e,n,o,{params:u,headers:c,context:f,reportProgress:a,responseType:r,withCredentials:s})}},qs=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(qs||{}),xl=class{constructor(t,e=nu.Ok,n="OK"){this.headers=t.headers||new Qo,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},$m=class i extends xl{constructor(t={}){super(t),this.type=qs.ResponseHeader}clone(t={}){return new i({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},tu=class i extends xl{constructor(t={}){super(t),this.type=qs.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new i({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},iu=class extends xl{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},nu=function(i){return i[i.Continue=100]="Continue",i[i.SwitchingProtocols=101]="SwitchingProtocols",i[i.Processing=102]="Processing",i[i.EarlyHints=103]="EarlyHints",i[i.Ok=200]="Ok",i[i.Created=201]="Created",i[i.Accepted=202]="Accepted",i[i.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",i[i.NoContent=204]="NoContent",i[i.ResetContent=205]="ResetContent",i[i.PartialContent=206]="PartialContent",i[i.MultiStatus=207]="MultiStatus",i[i.AlreadyReported=208]="AlreadyReported",i[i.ImUsed=226]="ImUsed",i[i.MultipleChoices=300]="MultipleChoices",i[i.MovedPermanently=301]="MovedPermanently",i[i.Found=302]="Found",i[i.SeeOther=303]="SeeOther",i[i.NotModified=304]="NotModified",i[i.UseProxy=305]="UseProxy",i[i.Unused=306]="Unused",i[i.TemporaryRedirect=307]="TemporaryRedirect",i[i.PermanentRedirect=308]="PermanentRedirect",i[i.BadRequest=400]="BadRequest",i[i.Unauthorized=401]="Unauthorized",i[i.PaymentRequired=402]="PaymentRequired",i[i.Forbidden=403]="Forbidden",i[i.NotFound=404]="NotFound",i[i.MethodNotAllowed=405]="MethodNotAllowed",i[i.NotAcceptable=406]="NotAcceptable",i[i.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",i[i.RequestTimeout=408]="RequestTimeout",i[i.Conflict=409]="Conflict",i[i.Gone=410]="Gone",i[i.LengthRequired=411]="LengthRequired",i[i.PreconditionFailed=412]="PreconditionFailed",i[i.PayloadTooLarge=413]="PayloadTooLarge",i[i.UriTooLong=414]="UriTooLong",i[i.UnsupportedMediaType=415]="UnsupportedMediaType",i[i.RangeNotSatisfiable=416]="RangeNotSatisfiable",i[i.ExpectationFailed=417]="ExpectationFailed",i[i.ImATeapot=418]="ImATeapot",i[i.MisdirectedRequest=421]="MisdirectedRequest",i[i.UnprocessableEntity=422]="UnprocessableEntity",i[i.Locked=423]="Locked",i[i.FailedDependency=424]="FailedDependency",i[i.TooEarly=425]="TooEarly",i[i.UpgradeRequired=426]="UpgradeRequired",i[i.PreconditionRequired=428]="PreconditionRequired",i[i.TooManyRequests=429]="TooManyRequests",i[i.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",i[i.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",i[i.InternalServerError=500]="InternalServerError",i[i.NotImplemented=501]="NotImplemented",i[i.BadGateway=502]="BadGateway",i[i.ServiceUnavailable=503]="ServiceUnavailable",i[i.GatewayTimeout=504]="GatewayTimeout",i[i.HttpVersionNotSupported=505]="HttpVersionNotSupported",i[i.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",i[i.InsufficientStorage=507]="InsufficientStorage",i[i.LoopDetected=508]="LoopDetected",i[i.NotExtended=510]="NotExtended",i[i.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",i}(nu||{});function jm(i,t){return{body:t,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var Sl=(()=>{let t=class t{constructor(n){this.handler=n}request(n,r,o={}){let s;if(n instanceof wl)s=n;else{let u;o.headers instanceof Qo?u=o.headers:u=new Qo(o.headers);let f;o.params&&(o.params instanceof ao?f=o.params:f=new ao({fromObject:o.params})),s=new wl(n,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:f,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=Se(s).pipe(Ar(u=>this.handler.handle(u)));if(n instanceof wl||o.observe==="events")return a;let c=a.pipe(Ni(u=>u instanceof tu));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(Re(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return u.body}));case"blob":return c.pipe(Re(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new Error("Response is not a Blob.");return u.body}));case"text":return c.pipe(Re(u=>{if(u.body!==null&&typeof u.body!="string")throw new Error("Response is not a string.");return u.body}));case"json":default:return c.pipe(Re(u=>u.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new ao().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,jm(o,r))}post(n,r,o={}){return this.request("POST",n,jm(o,r))}put(n,r,o={}){return this.request("PUT",n,jm(o,r))}};t.\u0275fac=function(r){return new(r||t)(J(Tl))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function K1(i,t){return t(i)}function XM(i,t){return(e,n)=>t.intercept(e,{handle:r=>i(r,n)})}function JM(i,t,e){return(n,r)=>ir(e,()=>t(n,o=>i(o,r)))}var qm=new le(""),Wm=new le(""),ek=new le(""),tk=new le("");function ik(){let i=null;return(t,e)=>{i===null&&(i=(ae(qm,{optional:!0})??[]).reduceRight(XM,K1));let n=ae(vl),r=n.add();return i(t,e).pipe(tr(()=>n.remove(r)))}}var $1=(()=>{let t=class t extends Tl{constructor(n,r){super(),this.backend=n,this.injector=r,this.chain=null,this.pendingTasks=ae(vl);let o=ae(tk,{optional:!0});this.backend=o??n}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(Wm),...this.injector.get(ek,[])]));this.chain=o.reduceRight((s,a)=>JM(s,a,this.injector),K1)}let r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(tr(()=>this.pendingTasks.remove(r)))}};t.\u0275fac=function(r){return new(r||t)(J(Jd),J(qo))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();var nk=/^\)\]\}',?\n/;function rk(i){return"responseURL"in i&&i.responseURL?i.responseURL:/^X-Request-URL:/m.test(i.getAllResponseHeaders())?i.getResponseHeader("X-Request-URL"):null}var q1=(()=>{let t=class t{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new wt(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Ii(r.\u0275loadImpl()):Se(null)).pipe(Oi(()=>new Li(s=>{let a=r.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((P,j)=>a.setRequestHeader(P,j.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let P=n.detectContentTypeHeader();P!==null&&a.setRequestHeader("Content-Type",P)}if(n.responseType){let P=n.responseType.toLowerCase();a.responseType=P!=="json"?P:"text"}let c=n.serializeBody(),u=null,f=()=>{if(u!==null)return u;let P=a.statusText||"OK",j=new Qo(a.getAllResponseHeaders()),ce=rk(a)||n.url;return u=new $m({headers:j,status:a.status,statusText:P,url:ce}),u},v=()=>{let{headers:P,status:j,statusText:ce,url:_e}=f(),me=null;j!==nu.NoContent&&(me=typeof a.response>"u"?a.responseText:a.response),j===0&&(j=me?nu.Ok:0);let $e=j>=200&&j<300;if(n.responseType==="json"&&typeof me=="string"){let He=me;me=me.replace(nk,"");try{me=me!==""?JSON.parse(me):null}catch(Et){me=He,$e&&($e=!1,me={error:Et,text:me})}}$e?(s.next(new tu({body:me,headers:P,status:j,statusText:ce,url:_e||void 0})),s.complete()):s.error(new iu({error:me,headers:P,status:j,statusText:ce,url:_e||void 0}))},b=P=>{let{url:j}=f(),ce=new iu({error:P,status:a.status||0,statusText:a.statusText||"Unknown Error",url:j||void 0});s.error(ce)},O=!1,V=P=>{O||(s.next(f()),O=!0);let j={type:qs.DownloadProgress,loaded:P.loaded};P.lengthComputable&&(j.total=P.total),n.responseType==="text"&&a.responseText&&(j.partialText=a.responseText),s.next(j)},K=P=>{let j={type:qs.UploadProgress,loaded:P.loaded};P.lengthComputable&&(j.total=P.total),s.next(j)};return a.addEventListener("load",v),a.addEventListener("error",b),a.addEventListener("timeout",b),a.addEventListener("abort",b),n.reportProgress&&(a.addEventListener("progress",V),c!==null&&a.upload&&a.upload.addEventListener("progress",K)),a.send(c),s.next({type:qs.Sent}),()=>{a.removeEventListener("error",b),a.removeEventListener("abort",b),a.removeEventListener("load",v),a.removeEventListener("timeout",b),n.reportProgress&&(a.removeEventListener("progress",V),c!==null&&a.upload&&a.upload.removeEventListener("progress",K)),a.readyState!==a.DONE&&a.abort()}})))}};t.\u0275fac=function(r){return new(r||t)(J(Kd))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Q1=new le("XSRF_ENABLED"),ok="XSRF-TOKEN",sk=new le("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>ok}),ak="X-XSRF-TOKEN",lk=new le("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>ak}),ru=class{},ck=(()=>{let t=class t{constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Wd(n,this.cookieName),this.lastCookieString=n),this.lastToken}};t.\u0275fac=function(r){return new(r||t)(J(Oe),J(vt),J(sk))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function dk(i,t){let e=i.url.toLowerCase();if(!ae(Q1)||i.method==="GET"||i.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(i);let n=ae(ru).getToken(),r=ae(lk);return n!=null&&!i.headers.has(r)&&(i=i.clone({headers:i.headers.set(r,n)})),t(i)}var Y1=function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i}(Y1||{});function uk(i,t){return{\u0275kind:i,\u0275providers:t}}function Km(...i){let t=[Sl,q1,$1,{provide:Tl,useExisting:$1},{provide:Jd,useExisting:q1},{provide:Wm,useValue:dk,multi:!0},{provide:Q1,useValue:!0},{provide:ru,useClass:ck}];for(let e of i)t.push(...e.\u0275providers);return Bn(t)}var W1=new le("LEGACY_INTERCEPTOR_FN");function pk(){return uk(Y1.LegacyInterceptors,[{provide:W1,useFactory:ik},{provide:Wm,useExisting:W1,multi:!0}])}var El=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({providers:[Km(pk())]});let i=t;return i})();var Zm=class extends O1{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Xm=class i extends Zm{static makeCurrent(){E1(new i)}onAndCancel(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=hk();return e==null?null:mk(e)}resetBaseElement(){Ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Wd(document.cookie,t)}},Ol=null;function hk(){return Ol=Ol||document.querySelector("base"),Ol?Ol.getAttribute("href"):null}function mk(i){return new URL(i,document.baseURI).pathname}var fk=(()=>{let t=class t{build(){return new XMLHttpRequest}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Jm=new le("EventManagerPlugins"),eC=(()=>{let t=class t{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(s=>s.supports(n)),!r)throw new wt(5101,!1);return this._eventNameToPlugin.set(n,r),r}};t.\u0275fac=function(r){return new(r||t)(J(Jm),J(ge))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),ou=class{constructor(t){this._doc=t}},Qm="ng-app-id",tC=(()=>{let t=class t{constructor(n,r,o,s={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Cl(s),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${Qm}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=r,s.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let o=this.styleNodesInDOM,s=o?.get(r);if(s?.parentNode===n)return o.delete(r),s.removeAttribute(Qm),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(Qm,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let o=this.getStyleElement(n,r),s=this.styleRef,a=s.get(r)?.elements;a?a.push(o):s.set(r,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};t.\u0275fac=function(r){return new(r||t)(J(Oe),J(Fd),J(hl,8),J(vt))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Ym={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},tf=/%COMP%/g,iC="%COMP%",gk=`_nghost-${iC}`,_k=`_ngcontent-${iC}`,vk=!0,yk=new le("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>vk});function bk(i){return _k.replace(tf,i)}function Ck(i){return gk.replace(tf,i)}function nC(i,t){return t.map(e=>e.replace(tf,i))}var Ws=(()=>{let t=class t{constructor(n,r,o,s,a,c,u,f=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=u,this.nonce=f,this.rendererByCompId=new Map,this.platformIsServer=Cl(c),this.defaultRenderer=new Ml(n,a,u,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===pl.ShadowDom&&(r=pe(F({},r),{encapsulation:pl.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof su?o.applyToHost(n):o instanceof kl&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let a=this.doc,c=this.ngZone,u=this.eventManager,f=this.sharedStylesHost,v=this.removeStylesOnCompDestroy,b=this.platformIsServer;switch(r.encapsulation){case pl.Emulated:s=new su(u,f,r,this.appId,v,a,c,b);break;case pl.ShadowDom:return new ef(u,f,n,r,a,c,this.nonce,b);default:s=new kl(u,f,r,v,a,c,b);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};t.\u0275fac=function(r){return new(r||t)(J(eC),J(tC),J(Fd),J(yk),J(Oe),J(vt),J(ge),J(hl))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),Ml=class{constructor(t,e,n,r){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,e){return e?this.doc.createElementNS(Ym[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(X1(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(X1(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new wt(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;let o=Ym[r];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let r=Ym[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(ml.DashCase|ml.Important)?t.style.setProperty(e,n,r&ml.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&ml.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n){if(typeof t=="string"&&(t=$s().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(n))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function X1(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var ef=class extends Ml{constructor(t,e,n,r,o,s,a,c){super(t,o,s,c),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=nC(r.id,r.styles);for(let f of u){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=f,this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},kl=class extends Ml{constructor(t,e,n,r,o,s,a,c){super(t,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r,this.styles=c?nC(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},su=class extends kl{constructor(t,e,n,r,o,s,a,c){let u=r+"-"+n.id;super(t,e,n,o,s,a,c,u),this.contentAttr=bk(u),this.hostAttr=Ck(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}},Ik=(()=>{let t=class t extends ou{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),J1=["alt","control","meta","shift"],wk={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Tk={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},xk=(()=>{let t=class t extends ou{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,r,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>$s().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=t._normalizeKey(r.pop()),a="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),a="code."),J1.forEach(f=>{let v=r.indexOf(f);v>-1&&(r.splice(v,1),a+=f+".")}),a+=s,r.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=a,u}static matchEventFullKeyCode(n,r){let o=wk[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),J1.forEach(a=>{if(a!==o){let c=Tk[a];c(n)&&(s+=a+".")}}),s+=o,s===r)}static eventCallback(n,r,o){return s=>{t.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function rC(i,t){return x1(F({rootComponent:i},Sk(t)))}function Sk(i){return{appProviders:[...Ak,...i?.providers??[]],platformProviders:kk}}function Ek(){Xm.makeCurrent()}function Ok(){return new gl}function Mk(){return d1(document),document}var kk=[{provide:vt,useValue:P1},{provide:u1,useValue:Ek,multi:!0},{provide:Oe,useFactory:Mk,deps:[]}];var Ak=[{provide:l1,useValue:"root"},{provide:gl,useFactory:Ok,deps:[]},{provide:Jm,useClass:Ik,multi:!0,deps:[Oe,ge,vt]},{provide:Jm,useClass:xk,multi:!0,deps:[Oe]},Ws,tC,eC,{provide:js,useExisting:Ws},{provide:Kd,useClass:fk,deps:[]},[]];function Dk(){return new nf(J(Oe))}var nf=(()=>{let t=class t{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:function(r){let o=null;return r?o=new r:o=Dk(),o},providedIn:"root"});let i=t;return i})();var rf=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:function(r){let o=null;return r?o=new(r||t):o=J(oC),o},providedIn:"root"});let i=t;return i})();function Pk(i){return new oC(i.get(Oe))}var oC=(()=>{let t=class t extends rf{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Wo.NONE:return r;case Wo.HTML:return Us(r,"HTML")?zs(r):v1(this._doc,String(r)).toString();case Wo.STYLE:return Us(r,"Style")?zs(r):r;case Wo.SCRIPT:if(Us(r,"Script"))return zs(r);throw new wt(5200,!1);case Wo.URL:return Us(r,"URL")?zs(r):_1(String(r));case Wo.RESOURCE_URL:if(Us(r,"ResourceURL"))return zs(r);throw new wt(5201,!1);default:throw new wt(5202,!1)}}bypassSecurityTrustHtml(n){return p1(n)}bypassSecurityTrustStyle(n){return h1(n)}bypassSecurityTrustScript(n){return m1(n)}bypassSecurityTrustUrl(n){return f1(n)}bypassSecurityTrustResourceUrl(n){return g1(n)}};t.\u0275fac=function(r){return new(r||t)(J(Oe))},t.\u0275prov=se({token:t,factory:function(r){let o=null;return r?o=new r:o=Pk(J(Mi)),o},providedIn:"root"});let i=t;return i})();var Xe="primary",$l=Symbol("RouteTitle"),cf=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Xs(i){return new cf(i)}function Rk(i,t,e){let n=e.path.split("/");if(n.length>i.length||e.pathMatch==="full"&&(t.hasChildren()||n.lengthn[o]===r)}else return i===t}function gC(i){return i.length>0?i[i.length-1]:null}function po(i){return zb(i)?i:Bd(i)?Ii(Promise.resolve(i)):Se(i)}var Lk={exact:vC,subset:yC},_C={exact:Fk,subset:Nk,ignored:()=>!0};function aC(i,t,e){return Lk[e.paths](i.root,t.root,e.matrixParams)&&_C[e.queryParams](i.queryParams,t.queryParams)&&!(e.fragment==="exact"&&i.fragment!==t.fragment)}function Fk(i,t){return nr(i,t)}function vC(i,t,e){if(!Zo(i.segments,t.segments)||!cu(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(let n in t.children)if(!i.children[n]||!vC(i.children[n],t.children[n],e))return!1;return!0}function Nk(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>fC(i[e],t[e]))}function yC(i,t,e){return bC(i,t,t.segments,e)}function bC(i,t,e,n){if(i.segments.length>e.length){let r=i.segments.slice(0,e.length);return!(!Zo(r,e)||t.hasChildren()||!cu(r,e,n))}else if(i.segments.length===e.length){if(!Zo(i.segments,e)||!cu(i.segments,e,n))return!1;for(let r in t.children)if(!i.children[r]||!yC(i.children[r],t.children[r],n))return!1;return!0}else{let r=e.slice(0,i.segments.length),o=e.slice(i.segments.length);return!Zo(i.segments,r)||!cu(i.segments,r,n)||!i.children[Xe]?!1:bC(i.children[Xe],t,o,n)}}function cu(i,t,e){return t.every((n,r)=>_C[e](i[r].parameters,n.parameters))}var lo=class{constructor(t=new Ot([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Xs(this.queryParams),this._queryParamMap}toString(){return Uk.serialize(this)}},Ot=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return du(this)}},Yo=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=Xs(this.parameters),this._parameterMap}toString(){return IC(this)}};function Bk(i,t){return Zo(i,t)&&i.every((e,n)=>nr(e.parameters,t[n].parameters))}function Zo(i,t){return i.length!==t.length?!1:i.every((e,n)=>e.path===t[n].path)}function zk(i,t){let e=[];return Object.entries(i.children).forEach(([n,r])=>{n===Xe&&(e=e.concat(t(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==Xe&&(e=e.concat(t(r,n)))}),e}var ql=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>new Fl,providedIn:"root"});let i=t;return i})(),Fl=class{parse(t){let e=new pf(t);return new lo(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Al(t.root,!0)}`,n=Gk(t.queryParams),r=typeof t.fragment=="string"?`#${jk(t.fragment)}`:"";return`${e}${n}${r}`}},Uk=new Fl;function du(i){return i.segments.map(t=>IC(t)).join("/")}function Al(i,t){if(!i.hasChildren())return du(i);if(t){let e=i.children[Xe]?Al(i.children[Xe],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==Xe&&n.push(`${r}:${Al(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=zk(i,(n,r)=>r===Xe?[Al(i.children[Xe],!1)]:[`${r}:${Al(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[Xe]!=null?`${du(i)}/${e[0]}`:`${du(i)}/(${e.join("//")})`}}function CC(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function au(i){return CC(i).replace(/%3B/gi,";")}function jk(i){return encodeURI(i)}function uf(i){return CC(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function uu(i){return decodeURIComponent(i)}function lC(i){return uu(i.replace(/\+/g,"%20"))}function IC(i){return`${uf(i.path)}${Hk(i.parameters)}`}function Hk(i){return Object.entries(i).map(([t,e])=>`;${uf(t)}=${uf(e)}`).join("")}function Gk(i){let t=Object.entries(i).map(([e,n])=>Array.isArray(n)?n.map(r=>`${au(e)}=${au(r)}`).join("&"):`${au(e)}=${au(n)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var $k=/^[^\/()?;#]+/;function of(i){let t=i.match($k);return t?t[0]:""}var qk=/^[^\/()?;=#]+/;function Wk(i){let t=i.match(qk);return t?t[0]:""}var Kk=/^[^=?&#]+/;function Qk(i){let t=i.match(Kk);return t?t[0]:""}var Yk=/^[^&#]+/;function Zk(i){let t=i.match(Yk);return t?t[0]:""}var pf=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ot([],{}):new Ot([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[Xe]=new Ot(t,e)),n}parseSegment(){let t=of(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new wt(4009,!1);return this.capture(t),new Yo(uu(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=Wk(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let r=of(this.remaining);r&&(n=r,this.capture(n))}t[uu(e)]=uu(n)}parseQueryParam(t){let e=Qk(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let s=Zk(this.remaining);s&&(n=s,this.capture(n))}let r=lC(e),o=lC(n);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=of(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new wt(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Xe);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[Xe]:new Ot([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new wt(4011,!1)}};function wC(i){return i.segments.length>0?new Ot([],{[Xe]:i}):i}function TC(i){let t={};for(let[n,r]of Object.entries(i.children)){let o=TC(r);if(n===Xe&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[n]=o)}let e=new Ot(i.segments,t);return Xk(e)}function Xk(i){if(i.numberOfChildren===1&&i.children[Xe]){let t=i.children[Xe];return new Ot(i.segments.concat(t.segments),t.children)}return i}function Js(i){return i instanceof lo}function Jk(i,t,e=null,n=null){let r=xC(i);return SC(r,t,e,n)}function xC(i){let t;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new Ot(o.url,s);return o===i&&(t=a),a}let n=e(i.root),r=wC(n);return t??r}function SC(i,t,e,n){let r=i;for(;r.parent;)r=r.parent;if(t.length===0)return sf(r,r,r,e,n);let o=e3(t);if(o.toRoot())return sf(r,r,new Ot([],{}),e,n);let s=t3(o,r,i),a=s.processChildren?Rl(s.segmentGroup,s.index,o.commands):OC(s.segmentGroup,s.index,o.commands);return sf(r,s.segmentGroup,a,e,n)}function pu(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function Nl(i){return typeof i=="object"&&i!=null&&i.outlets}function sf(i,t,e,n,r){let o={};n&&Object.entries(n).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(f=>`${f}`):`${u}`});let s;i===t?s=e:s=EC(i,t,e);let a=wC(TC(s));return new lo(a,o,r)}function EC(i,t,e){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===t?n[r]=e:n[r]=EC(o,t,e)}),new Ot(i.segments,n)}var hu=class{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&pu(n[0]))throw new wt(4003,!1);let r=n.find(Nl);if(r&&r!==gC(n))throw new wt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function e3(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new hu(!0,0,i);let t=0,e=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?t++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new hu(e,t,n)}var Ys=class{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}};function t3(i,t,e){if(i.isAbsolute)return new Ys(t,!0,0);if(!e)return new Ys(t,!1,NaN);if(e.parent===null)return new Ys(e,!0,0);let n=pu(i.commands[0])?0:1,r=e.segments.length-1+n;return i3(e,r,i.numberOfDoubleDots)}function i3(i,t,e){let n=i,r=t,o=e;for(;o>r;){if(o-=r,n=n.parent,!n)throw new wt(4005,!1);r=n.segments.length}return new Ys(n,!1,r-o)}function n3(i){return Nl(i[0])?i[0].outlets:{[Xe]:i}}function OC(i,t,e){if(i??=new Ot([],{}),i.segments.length===0&&i.hasChildren())return Rl(i,t,e);let n=r3(i,t,e),r=e.slice(n.commandIndex);if(n.match&&n.pathIndexo!==Xe)&&i.children[Xe]&&i.numberOfChildren===1&&i.children[Xe].segments.length===0){let o=Rl(i.children[Xe],t,e);return new Ot(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=OC(i.children[o],t,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new Ot(i.segments,r)}}function r3(i,t,e){let n=0,r=t,o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;let s=i.segments[r],a=e[n];if(Nl(a))break;let c=`${a}`,u=n0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!dC(c,u,s))return o;n+=2}else{if(!dC(c,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function hf(i,t,e){let n=i.segments.slice(0,t),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(t[e]=hf(new Ot([],{}),0,n))}),t}function cC(i){let t={};return Object.entries(i).forEach(([e,n])=>t[e]=`${n}`),t}function dC(i,t,e){return i==e.path&&nr(t,e.parameters)}var Vl="imperative",wi=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(wi||{}),En=class{constructor(t,e){this.id=t,this.url=e}},co=class extends En{constructor(t,e,n="imperative",r=null){super(t,e),this.type=wi.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},hn=class extends En{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n,this.type=wi.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Sn=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(Sn||{}),mu=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(mu||{}),rr=class extends En{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=wi.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},uo=class extends En{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=wi.NavigationSkipped}},Xo=class extends En{constructor(t,e,n,r){super(t,e),this.error=n,this.target=r,this.type=wi.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},fu=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},mf=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ff=class extends En{constructor(t,e,n,r,o){super(t,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o,this.type=wi.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},gf=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},_f=class extends En{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=wi.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},vf=class{constructor(t){this.route=t,this.type=wi.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},yf=class{constructor(t){this.route=t,this.type=wi.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},bf=class{constructor(t){this.snapshot=t,this.type=wi.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Cf=class{constructor(t){this.snapshot=t,this.type=wi.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},If=class{constructor(t){this.snapshot=t,this.type=wi.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},wf=class{constructor(t){this.snapshot=t,this.type=wi.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gu=class{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n,this.type=wi.Scroll}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},Bl=class{},zl=class{constructor(t){this.url=t}};var Tf=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Wl,this.attachRef=null}},Wl=(()=>{let t=class t{constructor(){this.contexts=new Map}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Tf,this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),_u=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=xf(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){let e=xf(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Sf(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return Sf(t,this._root).map(e=>e.value)}};function xf(i,t){if(i===t.value)return t;for(let e of t.children){let n=xf(i,e);if(n)return n}return null}function Sf(i,t){if(i===t.value)return[t];for(let e of t.children){let n=Sf(i,e);if(n.length)return n.unshift(t),n}return[]}var pn=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Qs(i){let t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}var vu=class extends _u{constructor(t,e){super(t),this.snapshot=e,Lf(this,t)}toString(){return this.snapshot.toString()}};function MC(i){let t=s3(i),e=new Fi([new Yo("",{})]),n=new Fi({}),r=new Fi({}),o=new Fi({}),s=new Fi(""),a=new ft(e,n,o,s,r,Xe,i,t.root);return a.snapshot=t.root,new vu(new pn(a,[]),t)}function s3(i){let t={},e={},n={},r="",o=new Ul([],t,n,r,e,Xe,i,null,{});return new yu("",new pn(o,[]))}var ft=class{constructor(t,e,n,r,o,s,a,c){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(Re(u=>u[$l]))??Se(void 0),this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Re(t=>Xs(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Re(t=>Xs(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Vf(i,t,e="emptyOnly"){let n,{routeConfig:r}=i;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?n={params:F(F({},t.params),i.params),data:F(F({},t.data),i.data),resolve:F(F(F(F({},i.data),t.data),r?.data),i._resolvedData)}:n={params:F({},i.params),data:F({},i.data),resolve:F(F({},i.data),i._resolvedData??{})},r&&AC(r)&&(n.resolve[$l]=r.title),n}var Ul=class{get title(){return this.data?.[$l]}constructor(t,e,n,r,o,s,a,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Xs(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Xs(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},yu=class extends _u{constructor(t,e){super(e),this.url=t,Lf(this,e)}toString(){return kC(this._root)}};function Lf(i,t){t.value._routerState=i,t.children.forEach(e=>Lf(i,e))}function kC(i){let t=i.children.length>0?` { ${i.children.map(kC).join(", ")} } `:"";return`${i.value}${t}`}function af(i){if(i.snapshot){let t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,nr(t.queryParams,e.queryParams)||i.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&i.fragmentSubject.next(e.fragment),nr(t.params,e.params)||i.paramsSubject.next(e.params),Vk(t.url,e.url)||i.urlSubject.next(e.url),nr(t.data,e.data)||i.dataSubject.next(e.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function Ef(i,t){let e=nr(i.params,t.params)&&Bk(i.url,t.url),n=!i.parent!=!t.parent;return e&&!n&&(!i.parent||Ef(i.parent,t.parent))}function AC(i){return typeof i.title=="string"||i.title===null}var Jo=(()=>{let t=class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=Xe,this.activateEvents=new L,this.deactivateEvents=new L,this.attachEvents=new L,this.detachEvents=new L,this.parentContexts=ae(Wl),this.location=ae(Hs),this.changeDetector=ae(Ne),this.environmentInjector=ae(qo),this.inputBinder=ae(wu,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new wt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new wt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new wt(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new wt(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,u=new Of(n,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:u,environmentInjector:r??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=it({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Mt]});let i=t;return i})(),Of=class{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===ft?this.route:t===Wl?this.childContexts:this.parent.get(t,e)}},wu=new le(""),uC=(()=>{let t=class t{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:r}=n,o=no([r.queryParams,r.params,r.data]).pipe(Oi(([s,a,c],u)=>(c=F(F(F({},s),a),c),u===0?Se(c):Promise.resolve(c)))).subscribe(s=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(n);return}let a=S1(r.component);if(!a){this.unsubscribeFromRouteData(n);return}for(let{templateName:c}of a.inputs)n.activatedComponentRef.setInput(c,s[c])});this.outletDataSubscriptions.set(n,o)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function a3(i,t,e){let n=jl(i,t._root,e?e._root:void 0);return new vu(n,t)}function jl(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=t.value;let r=l3(i,t,e);return new pn(n,r)}else{if(i.shouldAttach(t.value)){let o=i.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>jl(i,a)),s}}let n=c3(t.value),r=t.children.map(o=>jl(i,o));return new pn(n,r)}}function l3(i,t,e){return t.children.map(n=>{for(let r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return jl(i,n,r);return jl(i,n)})}function c3(i){return new ft(new Fi(i.url),new Fi(i.params),new Fi(i.queryParams),new Fi(i.fragment),new Fi(i.data),i.outlet,i.component,i)}var DC="ngNavigationCancelingError";function PC(i,t){let{redirectTo:e,navigationBehaviorOptions:n}=Js(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=RC(!1,Sn.Redirect,t);return r.url=e,r.navigationBehaviorOptions=n,r}function RC(i,t,e){let n=new Error("NavigationCancelingError: "+(i||""));return n[DC]=!0,n.cancellationCode=t,e&&(n.url=e),n}function d3(i){return VC(i)&&Js(i.url)}function VC(i){return i&&i[DC]}var u3=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["ng-component"]],standalone:!0,features:[R],decls:1,vars:0,template:function(r,o){r&1&&y(0,"router-outlet")},dependencies:[Jo],encapsulation:2});let i=t;return i})();function p3(i,t){return i.providers&&!i._injector&&(i._injector=Bm(i.providers,t,`Route: ${i.path}`)),i._injector??t}function Ff(i){let t=i.children&&i.children.map(Ff),e=t?pe(F({},i),{children:t}):F({},i);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Xe&&(e.component=u3),e}function or(i){return i.outlet||Xe}function h3(i,t){let e=i.filter(n=>or(n)===t);return e.push(...i.filter(n=>or(n)!==t)),e}function Kl(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let t=i.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var m3=(i,t,e,n)=>Re(r=>(new Mf(t,r.targetRouterState,r.currentRouterState,e,n).activate(i),r)),Mf=class{constructor(t,e,n,r,o){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),af(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){let r=Qs(e);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(t,e,n){let r=t.value,o=e?e.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,o=Qs(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,o=Qs(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(t,e,n){let r=Qs(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new wf(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Cf(t.value.snapshot))}activateRoutes(t,e,n){let r=t.value,o=e?e.value:null;if(af(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),af(a.route.value),this.activateChildRoutes(t,null,s.children)}else{let a=Kl(r.snapshot);s.attachRef=null,s.route=r,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,n)}},bu=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Zs=class{constructor(t,e){this.component=t,this.route=e}};function f3(i,t,e){let n=i._root,r=t?t._root:null;return Dl(n,r,e,[n.value])}function g3(i){let t=i.routeConfig?i.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:i,guards:t}}function ta(i,t){let e=Symbol(),n=t.get(i,e);return n===e?typeof i=="function"&&!n1(i)?i:t.get(i):n}function Dl(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Qs(t);return i.children.forEach(s=>{_3(s,o[s.value.outlet],e,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ll(a,e.getContext(s),r)),r}function _3(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=t?t.value:null,a=e?e.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=v3(s,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new bu(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Dl(i,t,a?a.children:null,n,r):Dl(i,t,e,n,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Zs(a.outlet.component,s))}else s&&Ll(t,a,r),r.canActivateChecks.push(new bu(n)),o.component?Dl(i,null,a?a.children:null,n,r):Dl(i,null,e,n,r);return r}function v3(i,t,e){if(typeof e=="function")return e(i,t);switch(e){case"pathParamsChange":return!Zo(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Zo(i.url,t.url)||!nr(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ef(i,t)||!nr(i.queryParams,t.queryParams);case"paramsChange":default:return!Ef(i,t)}}function Ll(i,t,e){let n=Qs(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?t?Ll(s,t.children.getContext(o),e):Ll(s,null,e):Ll(s,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Zs(t.outlet.component,r)):e.canDeactivateChecks.push(new Zs(null,r)):e.canDeactivateChecks.push(new Zs(null,r))}function Ql(i){return typeof i=="function"}function y3(i){return typeof i=="boolean"}function b3(i){return i&&Ql(i.canLoad)}function C3(i){return i&&Ql(i.canActivate)}function I3(i){return i&&Ql(i.canActivateChild)}function w3(i){return i&&Ql(i.canDeactivate)}function T3(i){return i&&Ql(i.canMatch)}function LC(i){return i instanceof Ub||i?.name==="EmptyError"}var lu=Symbol("INITIAL_VALUE");function ea(){return Oi(i=>no(i.map(t=>t.pipe(dn(1),oo(lu)))).pipe(Re(t=>{for(let e of t)if(e!==!0){if(e===lu)return lu;if(e===!1||e instanceof lo)return e}return!0}),Ni(t=>t!==lu),dn(1)))}function x3(i,t){return vi(e=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?Se(pe(F({},e),{guardsResult:!0})):S3(s,n,r,i).pipe(vi(a=>a&&y3(a)?E3(n,o,i,t):Se(a)),Re(a=>pe(F({},e),{guardsResult:a})))})}function S3(i,t,e,n){return Ii(i).pipe(vi(r=>D3(r.component,r.route,e,t,n)),ro(r=>r!==!0,!0))}function E3(i,t,e,n){return Ii(t).pipe(Ar(r=>Pd(M3(r.route.parent,n),O3(r.route,n),A3(i,r.path,e),k3(i,r.route,e))),ro(r=>r!==!0,!0))}function O3(i,t){return i!==null&&t&&t(new If(i)),Se(!0)}function M3(i,t){return i!==null&&t&&t(new bf(i)),Se(!0)}function k3(i,t,e){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return Se(!0);let r=n.map(o=>Rd(()=>{let s=Kl(t)??e,a=ta(o,s),c=C3(a)?a.canActivate(t,i):ir(s,()=>a(t,i));return po(c).pipe(ro())}));return Se(r).pipe(ea())}function A3(i,t,e){let n=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>g3(s)).filter(s=>s!==null).map(s=>Rd(()=>{let a=s.guards.map(c=>{let u=Kl(s.node)??e,f=ta(c,u),v=I3(f)?f.canActivateChild(n,i):ir(u,()=>f(n,i));return po(v).pipe(ro())});return Se(a).pipe(ea())}));return Se(o).pipe(ea())}function D3(i,t,e,n,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return Se(!0);let s=o.map(a=>{let c=Kl(t)??r,u=ta(a,c),f=w3(u)?u.canDeactivate(i,t,e,n):ir(c,()=>u(i,t,e,n));return po(f).pipe(ro())});return Se(s).pipe(ea())}function P3(i,t,e,n){let r=t.canLoad;if(r===void 0||r.length===0)return Se(!0);let o=r.map(s=>{let a=ta(s,i),c=b3(a)?a.canLoad(t,e):ir(i,()=>a(t,e));return po(c)});return Se(o).pipe(ea(),FC(n))}function FC(i){return Nb(It(t=>{if(Js(t))throw PC(i,t)}),Re(t=>t===!0))}function R3(i,t,e,n){let r=t.canMatch;if(!r||r.length===0)return Se(!0);let o=r.map(s=>{let a=ta(s,i),c=T3(a)?a.canMatch(t,e):ir(i,()=>a(t,e));return po(c)});return Se(o).pipe(ea(),FC(n))}var Hl=class{constructor(t){this.segmentGroup=t||null}},Cu=class extends Error{constructor(t){super(),this.urlTree=t}};function Ks(i){return io(new Hl(i))}function V3(i){return io(new wt(4e3,!1))}function L3(i){return io(RC(!1,Sn.GuardRejected))}var kf=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Se(n);if(r.numberOfChildren>1||!r.children[Xe])return V3(t.redirectTo);r=r.children[Xe]}}applyRedirectCommands(t,e,n){let r=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,n);if(e.startsWith("/"))throw new Cu(r);return r}applyRedirectCreateUrlTree(t,e,n,r){let o=this.createSegmentGroup(t,e.root,n,r);return new lo(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let n={};return Object.entries(t).forEach(([r,o])=>{if(typeof o=="string"&&o.startsWith(":")){let a=o.substring(1);n[r]=e[a]}else n[r]=o}),n}createSegmentGroup(t,e,n,r){let o=this.createSegments(t,e.segments,n,r),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,n,r)}),new Ot(o,s)}createSegments(t,e,n,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,n))}findPosParam(t,e,n){let r=n[e.path.substring(1)];if(!r)throw new wt(4001,!1);return r}findOrReturn(t,e){let n=0;for(let r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}},Af={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function F3(i,t,e,n,r){let o=Nf(i,t,e);return o.matched?(n=p3(t,n),R3(n,t,e,r).pipe(Re(s=>s===!0?o:F({},Af)))):Se(o)}function Nf(i,t,e){if(t.path==="**")return N3(e);if(t.path==="")return t.pathMatch==="full"&&(i.hasChildren()||e.length>0)?F({},Af):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||Rk)(e,i,t);if(!r)return F({},Af);let o={};Object.entries(r.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=r.consumed.length>0?F(F({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function N3(i){return{matched:!0,parameters:i.length>0?gC(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function pC(i,t,e,n){return e.length>0&&U3(i,e,n)?{segmentGroup:new Ot(t,z3(n,new Ot(e,i.children))),slicedSegments:[]}:e.length===0&&j3(i,e,n)?{segmentGroup:new Ot(i.segments,B3(i,e,n,i.children)),slicedSegments:e}:{segmentGroup:new Ot(i.segments,i.children),slicedSegments:e}}function B3(i,t,e,n){let r={};for(let o of e)if(Tu(i,t,o)&&!n[or(o)]){let s=new Ot([],{});r[or(o)]=s}return F(F({},n),r)}function z3(i,t){let e={};e[Xe]=t;for(let n of i)if(n.path===""&&or(n)!==Xe){let r=new Ot([],{});e[or(n)]=r}return e}function U3(i,t,e){return e.some(n=>Tu(i,t,n)&&or(n)!==Xe)}function j3(i,t,e){return e.some(n=>Tu(i,t,n))}function Tu(i,t,e){return(i.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function H3(i,t,e,n){return or(i)!==n&&(n===Xe||!Tu(t,e,i))?!1:Nf(t,i,e).matched}function G3(i,t,e){return t.length===0&&!i.children[e]}var Df=class{};function $3(i,t,e,n,r,o,s="emptyOnly"){return new Pf(i,t,e,n,r,s,o).recognize()}var q3=31,Pf=class{constructor(t,e,n,r,o,s,a){this.injector=t,this.configLoader=e,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new kf(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new wt(4002,`'${t.segmentGroup}'`)}recognize(){let t=pC(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(Re(e=>{let n=new Ul([],Object.freeze({}),Object.freeze(F({},this.urlTree.queryParams)),this.urlTree.fragment,{},Xe,this.rootComponentType,null,{}),r=new pn(n,e),o=new yu("",r),s=Jk(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(o._root,null),{state:o,tree:s}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,Xe).pipe(cn(n=>{if(n instanceof Cu)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Hl?this.noMatchError(n):n}))}inheritParamsAndData(t,e){let n=t.value,r=Vf(n,e,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),t.children.forEach(o=>this.inheritParamsAndData(o,n))}processSegmentGroup(t,e,n,r){return n.segments.length===0&&n.hasChildren()?this.processChildren(t,e,n):this.processSegment(t,e,n,n.segments,r,!0).pipe(Re(o=>o instanceof pn?[o]:[]))}processChildren(t,e,n){let r=[];for(let o of Object.keys(n.children))o==="primary"?r.unshift(o):r.push(o);return Ii(r).pipe(Ar(o=>{let s=n.children[o],a=h3(e,o);return this.processSegmentGroup(t,a,s,o)}),Vd((o,s)=>(o.push(...s),o)),Dm(null),Yb(),vi(o=>{if(o===null)return Ks(n);let s=NC(o);return W3(s),Se(s)}))}processSegment(t,e,n,r,o,s){return Ii(e).pipe(Ar(a=>this.processSegmentAgainstRoute(a._injector??t,e,a,n,r,o,s).pipe(cn(c=>{if(c instanceof Hl)return Se(null);throw c}))),ro(a=>!!a),cn(a=>{if(LC(a))return G3(n,r,o)?Se(new Df):Ks(n);throw a}))}processSegmentAgainstRoute(t,e,n,r,o,s,a){return H3(n,r,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,n,o,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,n,o,s):Ks(r):Ks(r)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,o,s){let{matched:a,consumedSegments:c,positionalParamSegments:u,remainingSegments:f}=Nf(e,r,o);if(!a)return Ks(e);r.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>q3&&(this.allowRedirects=!1));let v=this.applyRedirects.applyRedirectCommands(c,r.redirectTo,u);return this.applyRedirects.lineralizeSegments(r,v).pipe(vi(b=>this.processSegment(t,n,e,b.concat(f),s,!1)))}matchSegmentAgainstRoute(t,e,n,r,o){let s=F3(e,n,r,t,this.urlSerializer);return n.path==="**"&&(e.children={}),s.pipe(Oi(a=>a.matched?(t=n._injector??t,this.getChildConfig(t,n,r).pipe(Oi(({routes:c})=>{let u=n._loadedInjector??t,{consumedSegments:f,remainingSegments:v,parameters:b}=a,O=new Ul(f,b,Object.freeze(F({},this.urlTree.queryParams)),this.urlTree.fragment,Q3(n),or(n),n.component??n._loadedComponent??null,n,Y3(n)),{segmentGroup:V,slicedSegments:K}=pC(e,f,v,c);if(K.length===0&&V.hasChildren())return this.processChildren(u,c,V).pipe(Re(j=>j===null?null:new pn(O,j)));if(c.length===0&&K.length===0)return Se(new pn(O,[]));let P=or(n)===o;return this.processSegment(u,c,V,K,P?Xe:o,!0).pipe(Re(j=>new pn(O,j instanceof pn?[j]:[])))}))):Ks(e)))}getChildConfig(t,e,n){return e.children?Se({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?Se({routes:e._loadedRoutes,injector:e._loadedInjector}):P3(t,e,n,this.urlSerializer).pipe(vi(r=>r?this.configLoader.loadChildren(t,e).pipe(It(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):L3(e))):Se({routes:[],injector:t})}};function W3(i){i.sort((t,e)=>t.value.outlet===Xe?-1:e.value.outlet===Xe?1:t.value.outlet.localeCompare(e.value.outlet))}function K3(i){let t=i.value.routeConfig;return t&&t.path===""}function NC(i){let t=[],e=new Set;for(let n of i){if(!K3(n)){t.push(n);continue}let r=t.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),e.add(r)):t.push(n)}for(let n of e){let r=NC(n.children);t.push(new pn(n.value,r))}return t.filter(n=>!e.has(n))}function Q3(i){return i.data||{}}function Y3(i){return i.resolve||{}}function Z3(i,t,e,n,r,o){return vi(s=>$3(i,t,e,n,s.extractedUrl,r,o).pipe(Re(({state:a,tree:c})=>pe(F({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function X3(i,t){return vi(e=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return Se(e);let o=new Set(r.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of BC(c))s.add(u);let a=0;return Ii(s).pipe(Ar(c=>o.has(c)?J3(c,n,i,t):(c.data=Vf(c,c.parent,i).resolve,Se(void 0))),It(()=>a++),Rm(1),vi(c=>a===s.size?Se(e):$o))})}function BC(i){let t=i.children.map(e=>BC(e)).flat();return[i,...t]}function J3(i,t,e,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!AC(r)&&(o[$l]=r.title),eA(o,i,t,n).pipe(Re(s=>(i._resolvedData=s,i.data=Vf(i,i.parent,e).resolve,null)))}function eA(i,t,e,n){let r=df(i);if(r.length===0)return Se({});let o={};return Ii(r).pipe(vi(s=>tA(i[s],t,e,n).pipe(ro(),It(a=>{o[s]=a}))),Rm(1),qb(o),cn(s=>LC(s)?$o:io(s)))}function tA(i,t,e,n){let r=Kl(t)??n,o=ta(i,r),s=o.resolve?o.resolve(t,e):ir(r,()=>o(t,e));return po(s)}function lf(i){return Oi(t=>{let e=i(t);return e?Ii(e).pipe(Re(()=>t)):Se(t)})}var zC=(()=>{let t=class t{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(s=>s.outlet===Xe);return r}getResolvedTitleForRoute(n){return n.data[$l]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(iA),providedIn:"root"});let i=t;return i})(),iA=(()=>{let t=class t extends zC{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};t.\u0275fac=function(r){return new(r||t)(J(nf))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),Yl=new le("",{providedIn:"root",factory:()=>({})}),Gl=new le("ROUTES"),Bf=(()=>{let t=class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=ae(Hd)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Se(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=po(n.loadComponent()).pipe(Re(UC),It(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),tr(()=>{this.componentLoaders.delete(n)})),o=new Em(r,()=>new Gt).pipe(Sm());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Se({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=nA(r,this.compiler,n,this.onLoadEndListener).pipe(tr(()=>{this.childrenLoaders.delete(r)})),a=new Em(s,()=>new Gt).pipe(Sm());return this.childrenLoaders.set(r,a),a}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function nA(i,t,e,n){return po(i.loadChildren()).pipe(Re(UC),vi(r=>r instanceof I1||Array.isArray(r)?Se(r):Ii(t.compileModuleAsync(r))),Re(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(e).injector,s=o.get(Gl,[],{optional:!0,self:!0}).flat()),{routes:s.map(Ff),injector:o}}))}function rA(i){return i&&typeof i=="object"&&"default"in i}function UC(i){return rA(i)?i.default:i}var zf=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(oA),providedIn:"root"});let i=t;return i})(),oA=(()=>{let t=class t{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),jC=new le(""),HC=new le("");function sA(i,t,e){let n=i.get(HC),r=i.get(Oe);return i.get(ge).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,Promise.resolve();let o,s=new Promise(u=>{o=u}),a=r.startViewTransition(()=>(o(),aA(i))),{onViewTransitionCreated:c}=n;return c&&ir(i,()=>c({transition:a,from:t,to:e})),s})}function aA(i){return new Promise(t=>{b1(t,{injector:i})})}var Uf=(()=>{let t=class t{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Gt,this.transitionAbortSubject=new Gt,this.configLoader=ae(Bf),this.environmentInjector=ae(qo),this.urlSerializer=ae(ql),this.rootContexts=ae(Wl),this.location=ae(bl),this.inputBindingEnabled=ae(wu,{optional:!0})!==null,this.titleStrategy=ae(zC),this.options=ae(Yl,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=ae(zf),this.createViewTransition=ae(jC,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Se(void 0),this.rootComponentType=null;let n=o=>this.events.next(new vf(o)),r=o=>this.events.next(new yf(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(pe(F(F({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Fi({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Vl,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Ni(s=>s.id!==0),Re(s=>pe(F({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Oi(s=>{this.currentTransition=s;let a=!1,c=!1;return Se(s).pipe(It(u=>{this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?pe(F({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Oi(u=>{let f=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),v=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!f&&v!=="reload"){let b="";return this.events.next(new uo(u.id,this.urlSerializer.serialize(u.rawUrl),b,mu.IgnoredSameUrlNavigation)),u.resolve(null),$o}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return Se(u).pipe(Oi(b=>{let O=this.transitions?.getValue();return this.events.next(new co(b.id,this.urlSerializer.serialize(b.extractedUrl),b.source,b.restoredState)),O!==this.transitions?.getValue()?$o:Promise.resolve(b)}),Z3(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),It(b=>{s.targetSnapshot=b.targetSnapshot,s.urlAfterRedirects=b.urlAfterRedirects,this.currentNavigation=pe(F({},this.currentNavigation),{finalUrl:b.urlAfterRedirects});let O=new fu(b.id,this.urlSerializer.serialize(b.extractedUrl),this.urlSerializer.serialize(b.urlAfterRedirects),b.targetSnapshot);this.events.next(O)}));if(f&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:b,extractedUrl:O,source:V,restoredState:K,extras:P}=u,j=new co(b,this.urlSerializer.serialize(O),V,K);this.events.next(j);let ce=MC(this.rootComponentType).snapshot;return this.currentTransition=s=pe(F({},u),{targetSnapshot:ce,urlAfterRedirects:O,extras:pe(F({},P),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=O,Se(s)}else{let b="";return this.events.next(new uo(u.id,this.urlSerializer.serialize(u.extractedUrl),b,mu.IgnoredByUrlHandlingStrategy)),u.resolve(null),$o}}),It(u=>{let f=new mf(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(f)}),Re(u=>(this.currentTransition=s=pe(F({},u),{guards:f3(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),s)),x3(this.environmentInjector,u=>this.events.next(u)),It(u=>{if(s.guardsResult=u.guardsResult,Js(u.guardsResult))throw PC(this.urlSerializer,u.guardsResult);let f=new ff(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(f)}),Ni(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",Sn.GuardRejected),!1)),lf(u=>{if(u.guards.canActivateChecks.length)return Se(u).pipe(It(f=>{let v=new gf(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(v)}),Oi(f=>{let v=!1;return Se(f).pipe(X3(this.paramsInheritanceStrategy,this.environmentInjector),It({next:()=>v=!0,complete:()=>{v||this.cancelNavigationTransition(f,"",Sn.NoDataFromResolver)}}))}),It(f=>{let v=new _f(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(v)}))}),lf(u=>{let f=v=>{let b=[];v.routeConfig?.loadComponent&&!v.routeConfig._loadedComponent&&b.push(this.configLoader.loadComponent(v.routeConfig).pipe(It(O=>{v.component=O}),Re(()=>{})));for(let O of v.children)b.push(...f(O));return b};return no(f(u.targetSnapshot.root)).pipe(Dm(null),dn(1))}),lf(()=>this.afterPreactivation()),Oi(()=>{let{currentSnapshot:u,targetSnapshot:f}=s,v=this.createViewTransition?.(this.environmentInjector,u.root,f.root);return v?Ii(v).pipe(Re(()=>s)):Se(s)}),Re(u=>{let f=a3(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=s=pe(F({},u),{targetRouterState:f}),this.currentNavigation.targetRouterState=f,s}),It(()=>{this.events.next(new Bl)}),m3(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),dn(1),It({next:u=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new hn(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),Ld(this.transitionAbortSubject.pipe(It(u=>{throw u}))),tr(()=>{!a&&!c&&this.cancelNavigationTransition(s,"",Sn.SupersededByNewNavigation),this.currentNavigation?.id===s.id&&(this.currentNavigation=null)}),cn(u=>{if(c=!0,VC(u))this.events.next(new rr(s.id,this.urlSerializer.serialize(s.extractedUrl),u.message,u.cancellationCode)),d3(u)?this.events.next(new zl(u.url)):s.resolve(!1);else{this.events.next(new Xo(s.id,this.urlSerializer.serialize(s.extractedUrl),u,s.targetSnapshot??void 0));try{s.resolve(n.errorHandler(u))}catch(f){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(f)}}return $o}))}))}cancelNavigationTransition(n,r,o){let s=new rr(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function lA(i){return i!==Vl}var cA=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(dA),providedIn:"root"});let i=t;return i})(),Rf=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},dA=(()=>{let t=class t extends Rf{};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),GC=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:()=>ae(uA),providedIn:"root"});let i=t;return i})(),uA=(()=>{let t=class t extends GC{constructor(){super(...arguments),this.location=ae(bl),this.urlSerializer=ae(ql),this.options=ae(Yl,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=ae(zf),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new lo,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=MC(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof co)this.stateMemento=this.createStateMemento();else if(n instanceof uo)this.rawUrlTree=r.initialUrl;else if(n instanceof fu){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(o,r)}}else n instanceof Bl?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,r))):n instanceof rr&&(n.code===Sn.GuardRejected||n.code===Sn.NoDataFromResolver)?this.restoreHistory(r):n instanceof Xo?this.restoreHistory(r,!0):n instanceof hn&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let s=this.browserPageId,a=F(F({},r.extras.state),this.generateNgRouterState(r.id,s));this.location.replaceState(o,"",a)}else{let s=F(F({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),Pl=function(i){return i[i.COMPLETE=0]="COMPLETE",i[i.FAILED=1]="FAILED",i[i.REDIRECTING=2]="REDIRECTING",i}(Pl||{});function $C(i,t){i.events.pipe(Ni(e=>e instanceof hn||e instanceof rr||e instanceof Xo||e instanceof uo),Re(e=>e instanceof hn||e instanceof uo?Pl.COMPLETE:(e instanceof rr?e.code===Sn.Redirect||e.code===Sn.SupersededByNewNavigation:!1)?Pl.REDIRECTING:Pl.FAILED),Ni(e=>e!==Pl.REDIRECTING),dn(1)).subscribe(()=>{t()})}function pA(i){throw i}var hA={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},mA={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},bt=(()=>{let t=class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=ae(jd),this.stateManager=ae(GC),this.options=ae(Yl,{optional:!0})||{},this.pendingTasks=ae(vl),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=ae(Uf),this.urlSerializer=ae(ql),this.location=ae(bl),this.urlHandlingStrategy=ae(zf),this._events=new Gt,this.errorHandler=this.options.errorHandler||pA,this.navigated=!1,this.routeReuseStrategy=ae(cA),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=ae(Gl,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!ae(wu,{optional:!0}),this.eventsSubscription=new Fb,this.isNgZoneEnabled=ae(ge)instanceof ge&&ge.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof rr&&r.code!==Sn.Redirect&&r.code!==Sn.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof hn)this.navigated=!0;else if(r instanceof zl){let a=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c={info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||lA(o.source)};this.scheduleNavigation(a,Vl,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}gA(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Vl,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let u=F({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(s.state=u)}let c=this.parseUrl(n);this.scheduleNavigation(c,r,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(Ff),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:u}=r,f=u?this.currentUrlTree.fragment:a,v=null;switch(c){case"merge":v=F(F({},this.currentUrlTree.queryParams),s);break;case"preserve":v=this.currentUrlTree.queryParams;break;default:v=s||null}v!==null&&(v=this.removeEmptyProps(v));let b;try{let O=o?o.snapshot:this.routerState.snapshot.root;b=xC(O)}catch{(typeof n[0]!="string"||!n[0].startsWith("/"))&&(n=[]),b=this.currentUrlTree.root}return SC(b,n,v,f??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=Js(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,Vl,null,r)}navigate(n,r={skipLocationChange:!1}){return fA(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=F({},hA):r===!1?o=F({},mA):o=r,Js(n))return aC(this.currentUrlTree,n,o);let s=this.parseUrl(n);return aC(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,s])=>(s!=null&&(r[o]=s),r),{})}scheduleNavigation(n,r,o,s,a){if(this.disposed)return Promise.resolve(!1);let c,u,f;a?(c=a.resolve,u=a.reject,f=a.promise):f=new Promise((b,O)=>{c=b,u=O});let v=this.pendingTasks.add();return $C(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(v))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:c,reject:u,promise:f,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),f.catch(b=>Promise.reject(b))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function fA(i){for(let t=0;t{let t=class t{constructor(n,r,o,s,a,c){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=s,this.el=a,this.locationStrategy=c,this.href=null,this.commands=null,this.onChanges=new Gt,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let u=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area",this.isAnchorElement?this.subscription=n.events.subscribe(f=>{f instanceof hn&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,r,o,s,a){if(this.urlTree===null||this.isAnchorElement&&(n!==0||r||o||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(this.urlTree,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=this.urlTree!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;let n=this.href===null?null:y1(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(n,r){let o=this.renderer,s=this.el.nativeElement;r!==null?o.setAttribute(s,n,r):o.removeAttribute(s,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ft),r1("tabindex"),w(nt),w(ve),w(yl))},t.\u0275dir=it({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,o){r&1&&A("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),r&2&&T("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[$t.HasDecoratorInputTransform,"preserveFragment","preserveFragment",so],skipLocationChange:[$t.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",so],replaceUrl:[$t.HasDecoratorInputTransform,"replaceUrl","replaceUrl",so],routerLink:"routerLink"},standalone:!0,features:[_l,Mt]});let i=t;return i})(),xu=(()=>{let t=class t{get isActive(){return this._isActive}constructor(n,r,o,s,a){this.router=n,this.element=r,this.renderer=o,this.cdr=s,this.link=a,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new L,this.routerEventsSubscription=n.events.subscribe(c=>{c instanceof hn&&this.update()})}ngAfterContentInit(){Se(this.links.changes,Se(null)).pipe(ul()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=Ii(n).pipe(ul()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(n){let r=Array.isArray(n)?n:n.split(" ");this.classes=r.filter(o=>!!o)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let n=this.hasActiveLinks();this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.classes.forEach(r=>{n?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(n))})}isLinkActive(n){let r=_A(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>o.urlTree?n.isActive(o.urlTree,r):!1}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ve),w(nt),w(Ne),w(et,8))},t.\u0275dir=it({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,o,s){if(r&1&&De(s,et,5),r&2){let a;q(a=W())&&(o.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Mt]});let i=t;return i})();function _A(i){return!!i.paths}var Iu=class{};var vA=(()=>{let t=class t{constructor(n,r,o,s,a){this.router=n,this.injector=o,this.preloadingStrategy=s,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(Ni(n=>n instanceof hn),Ar(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,r){let o=[];for(let s of r){s.providers&&!s._injector&&(s._injector=Bm(s.providers,n,`Route: ${s.path}`));let a=s._injector??n,c=s._loadedInjector??a;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&o.push(this.preloadConfig(a,s)),(s.children||s._loadedRoutes)&&o.push(this.processRoutes(c,s.children??s._loadedRoutes))}return Ii(o).pipe(ul())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{let o;r.loadChildren&&r.canLoad===void 0?o=this.loader.loadChildren(n,r):o=Se(null);let s=o.pipe(vi(a=>a===null?Se(void 0):(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,this.processRoutes(a.injector??n,a.routes))));if(r.loadComponent&&!r._loadedComponent){let a=this.loader.loadComponent(r);return Ii([s,a]).pipe(ul())}else return s})}};t.\u0275fac=function(r){return new(r||t)(J(bt),J(Hd),J(qo),J(Iu),J(Bf))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),qC=new le(""),yA=(()=>{let t=class t{constructor(n,r,o,s,a={}){this.urlSerializer=n,this.transitions=r,this.viewportScroller=o,this.zone=s,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof co?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof hn?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof uo&&n.code===mu.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof gu&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new gu(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};t.\u0275fac=function(r){Fm()},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function WC(i,...t){return Bn([{provide:Gl,multi:!0,useValue:i},[],{provide:ft,useFactory:KC,deps:[bt]},{provide:Gd,multi:!0,useFactory:QC},t.map(e=>e.\u0275providers)])}function KC(i){return i.routerState.root}function Zl(i,t){return{\u0275kind:i,\u0275providers:t}}function QC(){let i=ae(Mi);return t=>{let e=i.get($d);if(t!==e.components[0])return;let n=i.get(bt),r=i.get(YC);i.get(jf)===1&&n.initialNavigation(),i.get(ZC,null,Vm.Optional)?.setUpPreloading(),i.get(qC,null,Vm.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var YC=new le("",{factory:()=>new Gt}),jf=new le("",{providedIn:"root",factory:()=>1});function bA(){return Zl(2,[{provide:jf,useValue:0},{provide:Um,multi:!0,deps:[Mi],useFactory:t=>{let e=t.get(M1,Promise.resolve());return()=>e.then(()=>new Promise(n=>{let r=t.get(bt),o=t.get(YC);$C(r,()=>{n(!0)}),t.get(Uf).afterPreactivation=()=>(n(!0),o.closed?Se(void 0):o),r.initialNavigation()}))}}])}function CA(){return Zl(3,[{provide:Um,multi:!0,useFactory:()=>{let t=ae(bt);return()=>{t.setUpLocationChangeListener()}}},{provide:jf,useValue:2}])}var ZC=new le("");function IA(i){return Zl(0,[{provide:ZC,useExisting:vA},{provide:Iu,useExisting:i}])}function wA(){return Zl(8,[uC,{provide:wu,useExisting:uC}])}function TA(i){let t=[{provide:jC,useValue:sA},{provide:HC,useValue:F({skipNextTransition:!!i?.skipInitialTransition},i)}];return Zl(9,t)}var hC=new le("ROUTER_FORROOT_GUARD"),xA=[bl,{provide:ql,useClass:Fl},bt,Wl,{provide:ft,useFactory:KC,deps:[bt]},Bf,[]],Ve=(()=>{let t=class t{constructor(n){}static forRoot(n,r){return{ngModule:t,providers:[xA,[],{provide:Gl,multi:!0,useValue:n},{provide:hC,useFactory:MA,deps:[[bt,new hi,new s1]]},{provide:Yl,useValue:r||{}},r?.useHash?EA():OA(),SA(),r?.preloadingStrategy?IA(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?kA(r):[],r?.bindToComponentInputs?wA().\u0275providers:[],r?.enableViewTransitions?TA().\u0275providers:[],AA()]}}static forChild(n){return{ngModule:t,providers:[{provide:Gl,multi:!0,useValue:n}]}}};t.\u0275fac=function(r){return new(r||t)(J(hC,8))},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();function SA(){return{provide:qC,useFactory:()=>{let i=ae(R1),t=ae(ge),e=ae(Yl),n=ae(Uf),r=ae(ql);return e.scrollOffset&&i.setOffset(e.scrollOffset),new yA(r,n,i,t,e)}}}function EA(){return{provide:yl,useClass:A1}}function OA(){return{provide:yl,useClass:k1}}function MA(i){return"guarded"}function kA(i){return[i.initialNavigation==="disabled"?CA().\u0275providers:[],i.initialNavigation==="enabledBlocking"?bA().\u0275providers:[]]}var mC=new le("");function AA(){return[{provide:mC,useFactory:QC},{provide:Gd,multi:!0,useExisting:mC}]}var sI=(()=>{let t=class t{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};t.\u0275fac=function(r){return new(r||t)(w(nt),w(ve))},t.\u0275dir=it({type:t});let i=t;return i})(),DA=(()=>{let t=class t extends sI{};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275dir=it({type:t,features:[ye]});let i=t;return i})(),zt=new le("NgValueAccessor");var PA={provide:zt,useExisting:Tt(()=>mo),multi:!0};function RA(){let i=$s()?$s().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var VA=new le("CompositionEventMode"),mo=(()=>{let t=class t extends sI{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!RA())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};t.\u0275fac=function(r){return new(r||t)(w(nt),w(ve),w(VA,8))},t.\u0275dir=it({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&A("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[mt([PA]),ye]});let i=t;return i})();function ho(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function aI(i){return i!=null&&typeof i.length=="number"}var Wf=new le("NgValidators"),Kf=new le("NgAsyncValidators"),LA=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mn=class{static min(t){return FA(t)}static max(t){return NA(t)}static required(t){return BA(t)}static requiredTrue(t){return zA(t)}static email(t){return UA(t)}static minLength(t){return jA(t)}static maxLength(t){return HA(t)}static pattern(t){return GA(t)}static nullValidator(t){return lI(t)}static compose(t){return mI(t)}static composeAsync(t){return gI(t)}};function FA(i){return t=>{if(ho(t.value)||ho(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e{if(ho(t.value)||ho(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function BA(i){return ho(i.value)?{required:!0}:null}function zA(i){return i.value===!0?null:{required:!0}}function UA(i){return ho(i.value)||LA.test(i.value)?null:{email:!0}}function jA(i){return t=>ho(t.value)||!aI(t.value)?null:t.value.lengthaI(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function GA(i){if(!i)return lI;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(ho(n.value))return null;let r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function lI(i){return null}function cI(i){return i!=null}function dI(i){return Bd(i)?Ii(i):i}function uI(i){let t={};return i.forEach(e=>{t=e!=null?F(F({},t),e):t}),Object.keys(t).length===0?null:t}function pI(i,t){return t.map(e=>e(i))}function $A(i){return!i.validate}function hI(i){return i.map(t=>$A(t)?t:e=>t.validate(e))}function mI(i){if(!i)return null;let t=i.filter(cI);return t.length==0?null:function(e){return uI(pI(e,t))}}function fI(i){return i!=null?mI(hI(i)):null}function gI(i){if(!i)return null;let t=i.filter(cI);return t.length==0?null:function(e){let n=pI(e,t).map(dI);return jb(n).pipe(Re(uI))}}function _I(i){return i!=null?gI(hI(i)):null}function XC(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function vI(i){return i._rawValidators}function yI(i){return i._rawAsyncValidators}function Hf(i){return i?Array.isArray(i)?i:[i]:[]}function Eu(i,t){return Array.isArray(i)?i.includes(t):i===t}function JC(i,t){let e=Hf(t);return Hf(i).forEach(r=>{Eu(e,r)||e.push(r)}),e}function eI(i,t){return Hf(t).filter(e=>!Eu(i,e))}var Ou=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=fI(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=_I(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},es=class extends Ou{get formDirective(){return null}get path(){return null}},Rr=class extends Ou{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Mu=class{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},qA={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},CJ=pe(F({},qA),{"[class.ng-submitted]":"isSubmitted"}),ii=(()=>{let t=class t extends Mu{constructor(n){super(n)}};t.\u0275fac=function(r){return new(r||t)(w(Rr,2))},t.\u0275dir=it({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&qt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[ye]});let i=t;return i})(),sn=(()=>{let t=class t extends Mu{constructor(n){super(n)}};t.\u0275fac=function(r){return new(r||t)(w(es,10))},t.\u0275dir=it({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&qt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},features:[ye]});let i=t;return i})();var Xl="VALID",Su="INVALID",ia="PENDING",Jl="DISABLED";function Qf(i){return(Du(i)?i.validators:i)||null}function WA(i){return Array.isArray(i)?fI(i):i||null}function Yf(i,t){return(Du(t)?t.asyncValidators:i)||null}function KA(i){return Array.isArray(i)?_I(i):i||null}function Du(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function bI(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new wt(1e3,"");if(!n[e])throw new wt(1001,"")}function CI(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new wt(1002,"")})}var na=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Xl}get invalid(){return this.status===Su}get pending(){return this.status==ia}get disabled(){return this.status===Jl}get enabled(){return this.status!==Jl}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(JC(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(JC(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(eI(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(eI(t,this._rawAsyncValidators))}hasValidator(t){return Eu(this._rawValidators,t)}hasAsyncValidator(t){return Eu(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=ia,t.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Jl,this.errors=null,this._forEachChild(n=>{n.disable(pe(F({},t),{onlySelf:!0}))}),this._updateValue(),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(pe(F({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Xl,this._forEachChild(n=>{n.enable(pe(F({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(pe(F({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Xl||this.status===ia)&&this._runAsyncValidator(t.emitEvent)),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Jl:Xl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=ia,this._hasOwnPendingAsyncValidator=!0;let e=dI(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new L,this.statusChanges=new L}_calculateStatus(){return this._allControlsDisabled()?Jl:this.errors?Su:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ia)?ia:this._anyControlsHaveStatus(Su)?Su:Xl}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Du(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=WA(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=KA(this._rawAsyncValidators)}},on=class extends na{constructor(t,e,n){super(Qf(e),Yf(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){CI(this,!0,t),Object.keys(t).forEach(n=>{bI(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,o)=>{n=e(n,r,o)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Gf=class extends on{};var Pu=new le("CallSetDisabledState",{providedIn:"root",factory:()=>Ru}),Ru="always";function II(i,t){return[...t.path,i]}function $f(i,t,e=Ru){Zf(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),YA(i,t),XA(i,t),ZA(i,t),QA(i,t)}function tI(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),Au(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ku(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function QA(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Zf(i,t){let e=vI(i);t.validator!==null?i.setValidators(XC(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=yI(i);t.asyncValidator!==null?i.setAsyncValidators(XC(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();ku(t._rawValidators,r),ku(t._rawAsyncValidators,r)}function Au(i,t){let e=!1;if(i!==null){if(t.validator!==null){let r=vI(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,i.setValidators(o))}}if(t.asyncValidator!==null){let r=yI(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,i.setAsyncValidators(o))}}}let n=()=>{};return ku(t._rawValidators,n),ku(t._rawAsyncValidators,n),e}function YA(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&wI(i,t)})}function ZA(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&wI(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function wI(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function XA(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function JA(i,t){i==null,Zf(i,t)}function eD(i,t){return Au(i,t)}function TI(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function tD(i){return Object.getPrototypeOf(i.constructor)===DA}function iD(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function xI(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(o=>{o.constructor===mo?e=o:tD(o)?n=o:r=o}),r||n||e||null}function nD(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function iI(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function nI(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var ti=class extends na{constructor(t=null,e,n){super(Qf(e),Yf(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Du(e)&&(e.nonNullable||e.initialValueIsDefault)&&(nI(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){iI(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){iI(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){nI(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var rD=i=>i instanceof ti;var oD={provide:Rr,useExisting:Tt(()=>zn)},rI=Promise.resolve(),zn=(()=>{let t=class t extends Rr{constructor(n,r,o,s,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new ti,this._registered=!1,this.name="",this.update=new L,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=xI(this,s)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),TI(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){$f(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){rI.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,o=r!==0&&so(r);rI.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?II(n,this._parent):[n]}};t.\u0275fac=function(r){return new(r||t)(w(es,9),w(Wf,10),w(Kf,10),w(zt,10),w(Ne,8),w(Pu,8))},t.\u0275dir=it({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[$t.None,"disabled","isDisabled"],model:[$t.None,"ngModel","model"],options:[$t.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[mt([oD]),ye,Mt]});let i=t;return i})(),an=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=it({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=t;return i})();var sD=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();var SI=new le("NgModelWithFormControlWarning");var aD={provide:es,useExisting:Tt(()=>Qi)},Qi=(()=>{let t=class t extends es{constructor(n,r,o){super(),this.callSetDisabledState=o,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new L,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Au(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return $f(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){tI(n.control||null,n,!1),nD(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this.submitted=!0,iD(this.form,this.directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(tI(r||null,n),rD(o)&&($f(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);JA(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&eD(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Zf(this.form,this),this._oldForm&&Au(this._oldForm,this)}_checkFormPresent(){this.form}};t.\u0275fac=function(r){return new(r||t)(w(Wf,10),w(Kf,10),w(Pu,8))},t.\u0275dir=it({type:t,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&A("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[$t.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[mt([aD]),ye,Mt]});let i=t;return i})();var lD={provide:Rr,useExisting:Tt(()=>Yi)},Yi=(()=>{let t=class t extends Rr{set isDisabled(n){}constructor(n,r,o,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new L,this._ngModelWarningSent=!1,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=xI(this,s)}ngOnChanges(n){this._added||this._setUpControl(),TI(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return II(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};t._ngModelWarningSentOnce=!1,t.\u0275fac=function(r){return new(r||t)(w(es,13),w(Wf,10),w(Kf,10),w(zt,10),w(SI,8))},t.\u0275dir=it({type:t,selectors:[["","formControlName",""]],inputs:{name:[$t.None,"formControlName","name"],isDisabled:[$t.None,"disabled","isDisabled"],model:[$t.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[mt([lD]),ye,Mt]});let i=t;return i})();var EI=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[sD]});let i=t;return i})(),qf=class extends na{constructor(t,e,n){super(Qf(e),Yf(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){CI(this,!1,t),t.forEach((n,r)=>{bI(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function oI(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Vu=(()=>{let t=class t{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new t;return n.useNonNullable=!0,n}group(n,r=null){let o=this._reduceControls(n),s={};return oI(r)?s=r:r!==null&&(s.validators=r.validator,s.asyncValidators=r.asyncValidator),new on(o,s)}record(n,r=null){let o=this._reduceControls(n);return new Gf(o,r)}control(n,r,o){let s={};return this.useNonNullable?(oI(r)?s=r:(s.validators=r,s.asyncValidators=o),new ti(n,pe(F({},s),{nonNullable:!0}))):new ti(n,r,o)}array(n,r,o){let s=n.map(a=>this._createControl(a));return new qf(s,r,o)}_reduceControls(n){let r={};return Object.keys(n).forEach(o=>{r[o]=this._createControl(n[o])}),r}_createControl(n){if(n instanceof ti)return n;if(n instanceof na)return n;if(Array.isArray(n)){let r=n[0],o=n.length>1?n[1]:null,s=n.length>2?n[2]:null;return this.control(r,o,s)}else return this.control(n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var sr=(()=>{let t=class t{static withConfig(n){return{ngModule:t,providers:[{provide:Pu,useValue:n.callSetDisabledState??Ru}]}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[EI]});let i=t;return i})(),Bi=(()=>{let t=class t{static withConfig(n){return{ngModule:t,providers:[{provide:SI,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:Pu,useValue:n.callSetDisabledState??Ru}]}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[EI]});let i=t;return i})();var re=class i{static equals(t,e,n){return n?this.resolveFieldData(t,n)===this.resolveFieldData(e,n):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var n=Array.isArray(t),r=Array.isArray(e),o,s,a;if(n&&r){if(s=t.length,s!=e.length)return!1;for(o=s;o--!==0;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(n!=r)return!1;var c=this.isDate(t),u=this.isDate(e);if(c!=u)return!1;if(c&&u)return t.getTime()==e.getTime();var f=t instanceof RegExp,v=e instanceof RegExp;if(f!=v)return!1;if(f&&v)return t.toString()==e.toString();var b=Object.keys(t);if(s=b.length,s!==Object.keys(e).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,b[o]))return!1;for(o=s;o--!==0;)if(a=b[o],!this.equalsByValue(t[a],e[a]))return!1;return!0}return t!==t&&e!==e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(e.indexOf(".")==-1)return t[e];{let n=e.split("."),r=t;for(let o=0,s=n.length;o=t.length&&(n%=t.length,e%=t.length),t.splice(n,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,n,r){if(n.length>0){let o=!1;for(let s=0;se){n.splice(s,0,t),o=!0;break}o||n.push(t)}else n.push(t)}static findIndexInList(t,e){let n=-1;if(e){for(let r=0;re?1:0,o}static sort(t,e,n=1,r,o=1){let s=i.compare(t,e,r,n),a=n;return(i.isEmpty(t)||i.isEmpty(e))&&(a=o===1?n:o),a*s}static merge(t,e){if(!(t==null&&e==null)){{if((t==null||typeof t=="object")&&(e==null||typeof e=="object"))return F(F({},t||{}),e||{});if((t==null||typeof t=="string")&&(e==null||typeof e=="string"))return[t||"",e||""].join(" ")}return e||t}}static isPrintableCharacter(t=""){return this.isNotEmpty(t)&&t.length===1&&t.match(/\S| /)}static getItemValue(t,...e){return this.isFunction(t)?t(...e):t}static findLastIndex(t,e){let n=-1;if(this.isNotEmpty(t))try{n=t.findLastIndex(e)}catch{n=t.lastIndexOf([...t].reverse().find(e))}return n}static findLast(t,e){let n;if(this.isNotEmpty(t))try{n=t.findLast(e)}catch{n=[...t].reverse().find(e)}return n}static deepEquals(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var n=Array.isArray(t),r=Array.isArray(e),o,s,a;if(n&&r){if(s=t.length,s!=e.length)return!1;for(o=s;o--!==0;)if(!this.deepEquals(t[o],e[o]))return!1;return!0}if(n!=r)return!1;var c=t instanceof Date,u=e instanceof Date;if(c!=u)return!1;if(c&&u)return t.getTime()==e.getTime();var f=t instanceof RegExp,v=e instanceof RegExp;if(f!=v)return!1;if(f&&v)return t.toString()==e.toString();var b=Object.keys(t);if(s=b.length,s!==Object.keys(e).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,b[o]))return!1;for(o=s;o--!==0;)if(a=b[o],!this.deepEquals(t[a],e[a]))return!1;return!0}return t!==t&&e!==e}},OI=0;function Me(i="pn_id_"){return OI++,`${i}${OI}`}function cD(){let i=[],t=(o,s)=>{let a=i.length>0?i[i.length-1]:{key:o,value:s},c=a.value+(a.key===o?0:s)+2;return i.push({key:o,value:c}),c},e=o=>{i=i.filter(s=>s.value!==o)},n=()=>i.length>0?i[i.length-1].value:0,r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(t(o,a)))},clear:o=>{o&&(e(r(o)),o.style.zIndex="")},getCurrent:()=>n()}}var Pt=cD();var MI=["*"];var zi=(()=>{class i{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return i})();var Lu=(()=>{class i{filter(e,n,r,o,s){let a=[];if(e)for(let c of e)for(let u of n){let f=re.resolveFieldData(c,u);if(this.filters[o](f,r,s)){a.push(c);break}}return a}filters={startsWith:(e,n,r)=>{if(n==null||n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r);return re.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,n,r)=>{if(n==null||typeof n=="string"&&n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r);return re.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)!==-1},notContains:(e,n,r)=>{if(n==null||typeof n=="string"&&n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r);return re.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)===-1},endsWith:(e,n,r)=>{if(n==null||n.trim()==="")return!0;if(e==null)return!1;let o=re.removeAccents(n.toString()).toLocaleLowerCase(r),s=re.removeAccents(e.toString()).toLocaleLowerCase(r);return s.indexOf(o,s.length-o.length)!==-1},equals:(e,n,r)=>n==null||typeof n=="string"&&n.trim()===""?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()===n.getTime():re.removeAccents(e.toString()).toLocaleLowerCase(r)==re.removeAccents(n.toString()).toLocaleLowerCase(r),notEquals:(e,n,r)=>n==null||typeof n=="string"&&n.trim()===""?!1:e==null?!0:e.getTime&&n.getTime?e.getTime()!==n.getTime():re.removeAccents(e.toString()).toLocaleLowerCase(r)!=re.removeAccents(n.toString()).toLocaleLowerCase(r),in:(e,n)=>{if(n==null||n.length===0)return!0;for(let r=0;rn==null||n[0]==null||n[1]==null?!0:e==null?!1:e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1],lt:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n,gt:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>n.getTime():e>n,gte:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n,is:(e,n,r)=>this.filters.equals(e,n,r),isNot:(e,n,r)=>this.filters.notEquals(e,n,r),before:(e,n,r)=>this.filters.lt(e,n,r),after:(e,n,r)=>this.filters.gt(e,n,r),dateIs:(e,n)=>n==null?!0:e==null?!1:e.toDateString()===n.toDateString(),dateIsNot:(e,n)=>n==null?!0:e==null?!1:e.toDateString()!==n.toDateString(),dateBefore:(e,n)=>n==null?!0:e==null?!1:e.getTime()n==null?!0:e==null?!1:e.getTime()>n.getTime()};register(e,n){this.filters[e]=n}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ar=(()=>{class i{messageSource=new Gt;clearSource=new Gt;messageObserver=this.messageSource.asObservable();clearObserver=this.clearSource.asObservable();add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac})}return i})(),Mn=(()=>{class i{clickSource=new Gt;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var At=(()=>{class i{ripple=!1;inputStyle="outlined";overlayOptions={};filterMatchModeOptions={text:[zi.STARTS_WITH,zi.CONTAINS,zi.NOT_CONTAINS,zi.ENDS_WITH,zi.EQUALS,zi.NOT_EQUALS],numeric:[zi.EQUALS,zi.NOT_EQUALS,zi.LESS_THAN,zi.LESS_THAN_OR_EQUAL_TO,zi.GREATER_THAN,zi.GREATER_THAN_OR_EQUAL_TO],date:[zi.DATE_IS,zi.DATE_IS_NOT,zi.DATE_BEFORE,zi.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new Gt;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=F(F({},this.translation),e),this.translationSource.next(this.translation)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),fo=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-header"]],ngContentSelectors:MI,decls:1,vars:0,template:function(n,r){n&1&&(Ue(),Ae(0))},encapsulation:2})}return i})(),go=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-footer"]],ngContentSelectors:MI,decls:1,vars:0,template:function(n,r){n&1&&(Ue(),Ae(0))},encapsulation:2})}return i})(),he=(()=>{class i{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(n){return new(n||i)(w(zd))};static \u0275dir=it({type:i,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[$t.None,"pTemplate","name"]}})}return i})(),Te=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})(),Jt=(()=>{class i{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="Show Filter Menu";static HIDE_FILTER_MENU="Hide Filter Menu";static SELECTION_MESSAGE="{0} items selected"}return i})();var x=(()=>{class i{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(e,n){e&&n&&(e.classList?e.classList.add(n):e.className+=" "+n)}static addMultipleClasses(e,n){if(e&&n)if(e.classList){let r=n.trim().split(" ");for(let o=0;or.split(" ").forEach(o=>this.removeClass(e,o)))}static hasClass(e,n){return e&&n?e.classList?e.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(e.className):!1}static siblings(e){return Array.prototype.filter.call(e.parentNode.children,function(n){return n!==e})}static find(e,n){return Array.from(e.querySelectorAll(n))}static findSingle(e,n){return this.isElement(e)?e.querySelector(n):null}static index(e){let n=e.parentNode.childNodes,r=0;for(var o=0;o{if(j)return getComputedStyle(j).getPropertyValue("position")==="relative"?j:r(j.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=n.offsetHeight,a=n.getBoundingClientRect(),c=this.getWindowScrollTop(),u=this.getWindowScrollLeft(),f=this.getViewport(),b=r(e)?.getBoundingClientRect()||{top:-1*c,left:-1*u},O,V;a.top+s+o.height>f.height?(O=a.top-b.top-o.height,e.style.transformOrigin="bottom",a.top+O<0&&(O=-1*a.top)):(O=s+a.top-b.top,e.style.transformOrigin="top");let K=a.left+o.width-f.width,P=a.left-b.left;o.width>f.width?V=(a.left-b.left)*-1:K>0?V=P-K:V=a.left-b.left,e.style.top=O+"px",e.style.left=V+"px"}static absolutePosition(e,n){let r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=n.offsetHeight,c=n.offsetWidth,u=n.getBoundingClientRect(),f=this.getWindowScrollTop(),v=this.getWindowScrollLeft(),b=this.getViewport(),O,V;u.top+a+o>b.height?(O=u.top+f-o,e.style.transformOrigin="bottom",O<0&&(O=f)):(O=a+u.top+f,e.style.transformOrigin="top"),u.left+s>b.width?V=Math.max(0,u.left+v+c-s):V=u.left+v,e.style.top=O+"px",e.style.left=V+"px"}static getParents(e,n=[]){return e.parentNode===null?n:this.getParents(e.parentNode,n.concat([e.parentNode]))}static getScrollableParents(e){let n=[];if(e){let r=this.getParents(e),o=/(auto|scroll)/,s=a=>{let c=window.getComputedStyle(a,null);return o.test(c.getPropertyValue("overflow"))||o.test(c.getPropertyValue("overflowX"))||o.test(c.getPropertyValue("overflowY"))};for(let a of r){let c=a.nodeType===1&&a.dataset.scrollselectors;if(c){let u=c.split(",");for(let f of u){let v=this.findSingle(a,f);v&&s(v)&&n.push(v)}}a.nodeType!==9&&s(a)&&n.push(a)}}return n}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementDimensions(e){let n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}static scrollInView(e,n){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,c=e.getBoundingClientRect(),f=n.getBoundingClientRect().top+document.body.scrollTop-(c.top+document.body.scrollTop)-o-a,v=e.scrollTop,b=e.clientHeight,O=this.getOuterHeight(n);f<0?e.scrollTop=v+f:f+O>b&&(e.scrollTop=v+f-b+O)}static fadeIn(e,n){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+(new Date().getTime()-r)/n,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,n){var r=1,o=50,s=n,a=o/s;let c=setInterval(()=>{r=r-a,r<=0&&(r=0,clearInterval(c)),e.style.opacity=r},o)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,n){var r=Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return[].indexOf.call(document.querySelectorAll(s),this)!==-1};return o.call(e,n)}static getOuterWidth(e,n){let r=e.offsetWidth;if(n){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let n=getComputedStyle(e);return parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}static getHorizontalMargin(e){let n=getComputedStyle(e);return parseFloat(n.marginLeft)+parseFloat(n.marginRight)}static innerWidth(e){let n=e.offsetWidth,r=getComputedStyle(e);return n+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}static width(e){let n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}static getInnerHeight(e){let n=e.offsetHeight,r=getComputedStyle(e);return n+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),n}static getOuterHeight(e,n){let r=e.offsetHeight;if(n){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let n=e.offsetHeight,r=getComputedStyle(e);return n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),n}static getWidth(e){let n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),n}static getViewport(){let e=window,n=document,r=n.documentElement,o=n.getElementsByTagName("body")[0],s=e.innerWidth||r.clientWidth||o.clientWidth,a=e.innerHeight||r.clientHeight||o.clientHeight;return{width:s,height:a}}static getOffset(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,n){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(n,e)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var e=window.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return!0;var r=e.indexOf("Trident/");if(r>0){var o=e.indexOf("rv:");return!0}var s=e.indexOf("Edge/");return s>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,n){if(this.isElement(n))n.appendChild(e);else if(n&&n.el&&n.el.nativeElement)n.el.nativeElement.appendChild(e);else throw"Cannot append "+n+" to "+e}static removeChild(e,n){if(this.isElement(n))n.removeChild(e);else if(n.el&&n.el.nativeElement)n.el.nativeElement.removeChild(e);else throw"Cannot remove "+e+" from "+n}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}static calculateScrollbarWidth(e){if(e){let n=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);let r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let n=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n}static invokeElementMethod(e,n,r){e[n].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||e.offsetParent===null}static isVisible(e){return e&&e.offsetParent!=null}static isExist(e){return e!==null&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,n){e&&document.activeElement!==e&&e.focus(n)}static getFocusableElements(e,n=""){let r=this.find(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, - [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}`),o=[];for(let s of r)getComputedStyle(s).display!="none"&&getComputedStyle(s).visibility!="hidden"&&o.push(s);return o}static getFirstFocusableElement(e,n){let r=this.getFocusableElements(e,n);return r.length>0?r[0]:null}static getLastFocusableElement(e,n){let r=this.getFocusableElements(e,n);return r.length>0?r[r.length-1]:null}static getNextFocusableElement(e,n=!1){let r=i.getFocusableElements(e),o=0;if(r&&r.length>0){let s=r.indexOf(r[0].ownerDocument.activeElement);n?s==-1||s===0?o=r.length-1:o=s-1:s!=-1&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,n){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@parent":return n?.parentElement;case"@grandparent":return n?.parentElement.parentElement;default:let r=typeof e;if(r==="string")return document.querySelector(e);if(r==="object"&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;let s=(a=>!!(a&&a.constructor&&a.call&&a.apply))(e)?e():e;return s&&s.nodeType===9||this.isExist(s)?s:null}}static isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}static getAttribute(e,n){if(e){let r=e.getAttribute(n);return isNaN(r)?r==="true"||r==="false"?r==="true":r:+r}}static calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}static blockBodyScroll(e="p-overflow-hidden"){document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)}static unblockBodyScroll(e="p-overflow-hidden"){document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}}return i})(),kn=class{element;listener;scrollableParents;constructor(t,e=()=>{}){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=x.getScrollableParents(this.element);for(let t=0;t{class i{label;spin=!1;styleClass;role;ariaLabel;ariaHidden;ngOnInit(){this.getAttributes()}getAttributes(){let e=re.isEmpty(this.label);this.role=e?void 0:"img",this.ariaLabel=e?void 0:this.label,this.ariaHidden=e}getClassNames(){return`p-icon ${this.styleClass?this.styleClass+" ":""}${this.spin?"p-icon-spin":""}`}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["ng-component"]],hostAttrs:[1,"p-element","p-icon-wrapper"],inputs:{label:"label",spin:"spin",styleClass:"styleClass"},standalone:!0,features:[R],ngContentSelectors:dD,decls:1,vars:0,template:function(n,r){n&1&&(je(),Ae(0))},encapsulation:2,changeDetection:0})}return i})();var ec=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["EyeIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var Xf=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["EyeSlashIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var pt=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["TimesIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var _o=(()=>{class i{el;ngModel;cd;filled;constructor(e,n,r){this.el=e,this.ngModel=n,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}static \u0275fac=function(n){return new(n||i)(w(ve),w(Bn,8),w(Ne))};static \u0275dir=it({type:i,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(n,r){n&1&&A("input",function(s){return r.onInput(s)}),n&2&&qt("p-filled",r.filled)}})}return i})(),fn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var uD=["input"];function pD(i,t){if(i&1){let e=G();p(0,"TimesIcon",8),A("click",function(){S(e);let r=m(2);return E(r.clear())}),h()}i&2&&(l("styleClass","p-password-clear-icon"),T("data-pc-section","clearIcon"))}function hD(i,t){}function mD(i,t){i&1&&g(0,hD,0,0,"ng-template")}function fD(i,t){if(i&1){let e=G();Z(0),g(1,pD,1,2,"TimesIcon",5),p(2,"span",6),A("click",function(){S(e);let r=m();return E(r.clear())}),g(3,mD,1,0,null,7),h(),X()}if(i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),T("data-pc-section","clearIcon"),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function gD(i,t){if(i&1){let e=G();p(0,"EyeSlashIcon",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),h()}i&2&&T("data-pc-section","hideIcon")}function _D(i,t){}function vD(i,t){i&1&&g(0,_D,0,0,"ng-template")}function yD(i,t){if(i&1){let e=G();p(0,"span",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),g(1,vD,1,0,null,7),h()}if(i&2){let e=m(3);d(),l("ngTemplateOutlet",e.hideIconTemplate)}}function bD(i,t){if(i&1&&(Z(0),g(1,gD,1,1,"EyeSlashIcon",9)(2,yD,2,1,"span",9),X()),i&2){let e=m(2);d(),l("ngIf",!e.hideIconTemplate),d(),l("ngIf",e.hideIconTemplate)}}function CD(i,t){if(i&1){let e=G();p(0,"EyeIcon",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),h()}i&2&&T("data-pc-section","showIcon")}function ID(i,t){}function wD(i,t){i&1&&g(0,ID,0,0,"ng-template")}function TD(i,t){if(i&1){let e=G();p(0,"span",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),g(1,wD,1,0,null,7),h()}if(i&2){let e=m(3);d(),l("ngTemplateOutlet",e.showIconTemplate)}}function xD(i,t){if(i&1&&(Z(0),g(1,CD,1,1,"EyeIcon",9)(2,TD,2,1,"span",9),X()),i&2){let e=m(2);d(),l("ngIf",!e.showIconTemplate),d(),l("ngIf",e.showIconTemplate)}}function SD(i,t){if(i&1&&(Z(0),g(1,bD,3,2,"ng-container",3)(2,xD,3,2,"ng-container",3),X()),i&2){let e=m();d(),l("ngIf",e.unmasked),d(),l("ngIf",!e.unmasked)}}function ED(i,t){i&1&&ie(0)}function OD(i,t){i&1&&ie(0)}function MD(i,t){if(i&1&&(Z(0),g(1,OD,1,0,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)}}var kD=i=>({width:i});function AD(i,t){if(i&1&&(p(0,"div",15),y(1,"div",0),ct(2,"mapper"),h(),p(3,"div",16),_(4),h()),i&2){let e=m(2);T("data-pc-section","meter"),d(),l("ngClass",un(2,6,e.meter,e.strengthClass))("ngStyle",H(9,kD,e.meter?e.meter.width:"")),T("data-pc-section","meterLabel"),d(2),T("data-pc-section","info"),d(),z(e.infoText)}}function DD(i,t){i&1&&ie(0)}var PD=(i,t)=>({showTransitionParams:i,hideTransitionParams:t}),RD=i=>({value:"visible",params:i});function VD(i,t){if(i&1){let e=G();p(0,"div",11,12),A("click",function(r){S(e);let o=m();return E(o.onOverlayClick(r))})("@overlayAnimation.start",function(r){S(e);let o=m();return E(o.onAnimationStart(r))})("@overlayAnimation.done",function(r){S(e);let o=m();return E(o.onAnimationEnd(r))}),g(2,ED,1,0,"ng-container",7)(3,MD,2,1,"ng-container",13)(4,AD,5,11,"ng-template",null,14,dt)(6,DD,1,0,"ng-container",7),h()}if(i&2){let e=Le(5),n=m();l("ngClass","p-password-panel p-component")("@overlayAnimation",H(10,RD,We(7,PD,n.showTransitionOptions,n.hideTransitionOptions))),T("data-pc-section","panel"),d(2),l("ngTemplateOutlet",n.headerTemplate),d(),l("ngIf",n.contentTemplate)("ngIfElse",e),d(3),l("ngTemplateOutlet",n.footerTemplate)}}var LD=(()=>{class i{transform(e,n,...r){return n(e,...r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=Tn({name:"mapper",type:i,pure:!0})}return i})(),FD={provide:zt,useExisting:Tt(()=>tc),multi:!0},tc=(()=>{class i{document;platformId;renderer;cd;config;el;overlayService;ariaLabel;ariaLabelledBy;label;disabled;promptLabel;mediumRegex="^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})";strongRegex="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})";weakLabel;mediumLabel;maxLength;strongLabel;inputId;feedback=!0;appendTo;toggleMask;inputStyleClass;styleClass;style;inputStyle;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autocomplete;placeholder;showClear=!1;onFocus=new L;onBlur=new L;onClear=new L;input;contentTemplate;footerTemplate;headerTemplate;clearIconTemplate;hideIconTemplate;showIconTemplate;templates;overlayVisible=!1;meter;infoText;focused=!1;unmasked=!1;mediumCheckRegExp;strongCheckRegExp;resizeListener;scrollHandler;overlay;value=null;onModelChange=()=>{};onModelTouched=()=>{};translationSubscription;constructor(e,n,r,o,s,a,c){this.document=e,this.platformId=n,this.renderer=r,this.cd=o,this.config=s,this.el=a,this.overlayService=c}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"hideicon":this.hideIconTemplate=e.template;break;case"showicon":this.showIconTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}ngOnInit(){this.infoText=this.promptText(),this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.updateUI(this.value||"")})}onAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,Pt.set("overlay",this.overlay,this.config.zIndex.overlay),this.appendContainer(),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener();break;case"void":this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null;break}}onAnimationEnd(e){switch(e.toState){case"void":Pt.clear(e.element);break}}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.overlay):this.document.getElementById(this.appendTo).appendChild(this.overlay))}alignOverlay(){this.appendTo?(this.overlay.style.minWidth=x.getOuterWidth(this.input.nativeElement)+"px",x.absolutePosition(this.overlay,this.input.nativeElement)):x.relativePosition(this.overlay,this.input.nativeElement)}onInput(e){this.value=e.target.value,this.onModelChange(this.value)}onInputFocus(e){this.focused=!0,this.feedback&&(this.overlayVisible=!0),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.onModelTouched(),this.onBlur.emit(e)}onKeyUp(e){if(this.feedback){let n=e.target.value;if(this.updateUI(n),e.code==="Escape"){this.overlayVisible&&(this.overlayVisible=!1);return}this.overlayVisible||(this.overlayVisible=!0)}}updateUI(e){let n=null,r=null;switch(this.testStrength(e)){case 1:n=this.weakText(),r={strength:"weak",width:"33.33%"};break;case 2:n=this.mediumText(),r={strength:"medium",width:"66.66%"};break;case 3:n=this.strongText(),r={strength:"strong",width:"100%"};break;default:n=this.promptText(),r=null;break}this.meter=r,this.infoText=n}onMaskToggle(){this.unmasked=!this.unmasked}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}testStrength(e){let n=0;return this.strongCheckRegExp.test(e)?n=3:this.mediumCheckRegExp.test(e)?n=2:e.length&&(n=1),n}writeValue(e){e===void 0?this.value=null:this.value=e,this.feedback&&this.updateUI(this.value||""),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}bindScrollListener(){ut(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new kn(this.input.nativeElement,()=>{this.overlayVisible&&(this.overlayVisible=!1)})),this.scrollHandler.bindScrollListener())}bindResizeListener(){if(ut(this.platformId)&&!this.resizeListener){let e=this.document.defaultView;this.resizeListener=this.renderer.listen(e,"resize",()=>{this.overlayVisible&&!x.isTouchDevice()&&(this.overlayVisible=!1)})}}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}containerClass(e){return{"p-password p-component p-inputwrapper":!0,"p-input-icon-right":e}}inputFieldClass(e){return{"p-password-input":!0,"p-disabled":e}}strengthClass(e){return`p-password-strength ${e?e.strength:""}`}filled(){return this.value!=null&&this.value.toString().length>0}promptText(){return this.promptLabel||this.getTranslation(Jt.PASSWORD_PROMPT)}weakText(){return this.weakLabel||this.getTranslation(Jt.WEAK)}mediumText(){return this.mediumLabel||this.getTranslation(Jt.MEDIUM)}strongText(){return this.strongLabel||this.getTranslation(Jt.STRONG)}restoreAppend(){this.overlay&&this.appendTo&&(this.appendTo==="body"?this.renderer.removeChild(this.document.body,this.overlay):this.document.getElementById(this.appendTo).removeChild(this.overlay))}inputType(e){return e?"text":"password"}getTranslation(e){return this.config.getTranslation(e)}clear(){this.value=null,this.onModelChange(this.value),this.writeValue(this.value),this.onClear.emit()}ngOnDestroy(){this.overlay&&(Pt.clear(this.overlay),this.overlay=null),this.restoreAppend(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(nt),w(Ne),w(At),w(ve),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-password"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&oe(uD,5),n&2){let o;q(o=W())&&(r.input=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:8,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled())("p-inputwrapper-focus",r.focused)("p-password-clearable",r.showClear)("p-password-mask",r.toggleMask)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",label:"label",disabled:"disabled",promptLabel:"promptLabel",mediumRegex:"mediumRegex",strongRegex:"strongRegex",weakLabel:"weakLabel",mediumLabel:"mediumLabel",maxLength:"maxLength",strongLabel:"strongLabel",inputId:"inputId",feedback:"feedback",appendTo:"appendTo",toggleMask:"toggleMask",inputStyleClass:"inputStyleClass",styleClass:"styleClass",style:"style",inputStyle:"inputStyle",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autocomplete:"autocomplete",placeholder:"placeholder",showClear:"showClear"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClear:"onClear"},features:[mt([FD])],decls:9,vars:32,consts:[[3,"ngClass","ngStyle"],["pInputText","",3,"ngClass","ngStyle","value","input","focus","blur","keyup"],["input",""],[4,"ngIf"],[3,"ngClass","click",4,"ngIf"],[3,"styleClass","click",4,"ngIf"],[1,"p-password-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[3,"styleClass","click"],[3,"click",4,"ngIf"],[3,"click"],[3,"ngClass","click"],["overlay",""],[4,"ngIf","ngIfElse"],["content",""],[1,"p-password-meter"],["className","p-password-info"]],template:function(n,r){n&1&&(p(0,"div",0),ct(1,"mapper"),p(2,"input",1,2),A("input",function(s){return r.onInput(s)})("focus",function(s){return r.onInputFocus(s)})("blur",function(s){return r.onInputBlur(s)})("keyup",function(s){return r.onKeyUp(s)}),ct(4,"mapper"),ct(5,"mapper"),h(),g(6,fD,4,3,"ng-container",3)(7,SD,3,2,"ng-container",3)(8,VD,7,12,"div",4),h()),n&2&&(U(r.styleClass),l("ngClass",un(1,23,r.toggleMask,r.containerClass))("ngStyle",r.style),T("data-pc-name","password")("data-pc-section","root"),d(2),U(r.inputStyleClass),l("ngClass",un(4,26,r.disabled,r.inputFieldClass))("ngStyle",r.inputStyle)("value",r.value),T("label",r.label)("aria-label",r.ariaLabel)("aria-labelledBy",r.ariaLabelledBy)("id",r.inputId)("type",un(5,29,r.unmasked,r.inputType))("placeholder",r.placeholder)("autocomplete",r.autocomplete)("maxlength",r.maxLength)("data-pc-section","input"),d(4),l("ngIf",r.showClear&&r.value!=null),d(),l("ngIf",r.toggleMask),d(),l("ngIf",r.overlayVisible))},dependencies:()=>[xe,Ie,rt,Ce,_o,pt,Xf,ec,LD],styles:[`@layer primeng{.p-password{position:relative;display:inline-flex}.p-password-panel{position:absolute;top:0;left:0}.p-password .p-password-panel{min-width:100%}.p-password-meter{height:10px}.p-password-strength{height:100%;width:0%;transition:width 1s ease-in-out}.p-fluid .p-password{display:flex}.p-password-input::-ms-reveal,.p-password-input::-ms-clear{display:none}.p-password-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-password-clearable.p-password-mask .p-password-clear-icon{margin-top:unset}.p-password-clearable{position:relative}} + [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}`),o=[];for(let s of r)getComputedStyle(s).display!="none"&&getComputedStyle(s).visibility!="hidden"&&o.push(s);return o}static getFirstFocusableElement(e,n){let r=this.getFocusableElements(e,n);return r.length>0?r[0]:null}static getLastFocusableElement(e,n){let r=this.getFocusableElements(e,n);return r.length>0?r[r.length-1]:null}static getNextFocusableElement(e,n=!1){let r=i.getFocusableElements(e),o=0;if(r&&r.length>0){let s=r.indexOf(r[0].ownerDocument.activeElement);n?s==-1||s===0?o=r.length-1:o=s-1:s!=-1&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,n){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@parent":return n?.parentElement;case"@grandparent":return n?.parentElement.parentElement;default:let r=typeof e;if(r==="string")return document.querySelector(e);if(r==="object"&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;let s=(a=>!!(a&&a.constructor&&a.call&&a.apply))(e)?e():e;return s&&s.nodeType===9||this.isExist(s)?s:null}}static isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}static getAttribute(e,n){if(e){let r=e.getAttribute(n);return isNaN(r)?r==="true"||r==="false"?r==="true":r:+r}}static calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}static blockBodyScroll(e="p-overflow-hidden"){document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)}static unblockBodyScroll(e="p-overflow-hidden"){document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}}return i})(),kn=class{element;listener;scrollableParents;constructor(t,e=()=>{}){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=x.getScrollableParents(this.element);for(let t=0;t{class i{label;spin=!1;styleClass;role;ariaLabel;ariaHidden;ngOnInit(){this.getAttributes()}getAttributes(){let e=re.isEmpty(this.label);this.role=e?void 0:"img",this.ariaLabel=e?void 0:this.label,this.ariaHidden=e}getClassNames(){return`p-icon ${this.styleClass?this.styleClass+" ":""}${this.spin?"p-icon-spin":""}`}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["ng-component"]],hostAttrs:[1,"p-element","p-icon-wrapper"],inputs:{label:"label",spin:"spin",styleClass:"styleClass"},standalone:!0,features:[R],ngContentSelectors:dD,decls:1,vars:0,template:function(n,r){n&1&&(Ue(),Ae(0))},encapsulation:2,changeDetection:0})}return i})();var ec=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["EyeIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var Xf=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["EyeSlashIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var pt=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["TimesIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var _o=(()=>{class i{el;ngModel;cd;filled;constructor(e,n,r){this.el=e,this.ngModel=n,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}static \u0275fac=function(n){return new(n||i)(w(ve),w(zn,8),w(Ne))};static \u0275dir=it({type:i,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(n,r){n&1&&A("input",function(s){return r.onInput(s)}),n&2&&qt("p-filled",r.filled)}})}return i})(),fn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var uD=["input"];function pD(i,t){if(i&1){let e=G();p(0,"TimesIcon",8),A("click",function(){S(e);let r=m(2);return E(r.clear())}),h()}i&2&&(l("styleClass","p-password-clear-icon"),T("data-pc-section","clearIcon"))}function hD(i,t){}function mD(i,t){i&1&&g(0,hD,0,0,"ng-template")}function fD(i,t){if(i&1){let e=G();Z(0),g(1,pD,1,2,"TimesIcon",5),p(2,"span",6),A("click",function(){S(e);let r=m();return E(r.clear())}),g(3,mD,1,0,null,7),h(),X()}if(i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),T("data-pc-section","clearIcon"),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function gD(i,t){if(i&1){let e=G();p(0,"EyeSlashIcon",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),h()}i&2&&T("data-pc-section","hideIcon")}function _D(i,t){}function vD(i,t){i&1&&g(0,_D,0,0,"ng-template")}function yD(i,t){if(i&1){let e=G();p(0,"span",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),g(1,vD,1,0,null,7),h()}if(i&2){let e=m(3);d(),l("ngTemplateOutlet",e.hideIconTemplate)}}function bD(i,t){if(i&1&&(Z(0),g(1,gD,1,1,"EyeSlashIcon",9)(2,yD,2,1,"span",9),X()),i&2){let e=m(2);d(),l("ngIf",!e.hideIconTemplate),d(),l("ngIf",e.hideIconTemplate)}}function CD(i,t){if(i&1){let e=G();p(0,"EyeIcon",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),h()}i&2&&T("data-pc-section","showIcon")}function ID(i,t){}function wD(i,t){i&1&&g(0,ID,0,0,"ng-template")}function TD(i,t){if(i&1){let e=G();p(0,"span",10),A("click",function(){S(e);let r=m(3);return E(r.onMaskToggle())}),g(1,wD,1,0,null,7),h()}if(i&2){let e=m(3);d(),l("ngTemplateOutlet",e.showIconTemplate)}}function xD(i,t){if(i&1&&(Z(0),g(1,CD,1,1,"EyeIcon",9)(2,TD,2,1,"span",9),X()),i&2){let e=m(2);d(),l("ngIf",!e.showIconTemplate),d(),l("ngIf",e.showIconTemplate)}}function SD(i,t){if(i&1&&(Z(0),g(1,bD,3,2,"ng-container",3)(2,xD,3,2,"ng-container",3),X()),i&2){let e=m();d(),l("ngIf",e.unmasked),d(),l("ngIf",!e.unmasked)}}function ED(i,t){i&1&&ie(0)}function OD(i,t){i&1&&ie(0)}function MD(i,t){if(i&1&&(Z(0),g(1,OD,1,0,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)}}var kD=i=>({width:i});function AD(i,t){if(i&1&&(p(0,"div",15),y(1,"div",0),ct(2,"mapper"),h(),p(3,"div",16),_(4),h()),i&2){let e=m(2);T("data-pc-section","meter"),d(),l("ngClass",un(2,6,e.meter,e.strengthClass))("ngStyle",H(9,kD,e.meter?e.meter.width:"")),T("data-pc-section","meterLabel"),d(2),T("data-pc-section","info"),d(),z(e.infoText)}}function DD(i,t){i&1&&ie(0)}var PD=(i,t)=>({showTransitionParams:i,hideTransitionParams:t}),RD=i=>({value:"visible",params:i});function VD(i,t){if(i&1){let e=G();p(0,"div",11,12),A("click",function(r){S(e);let o=m();return E(o.onOverlayClick(r))})("@overlayAnimation.start",function(r){S(e);let o=m();return E(o.onAnimationStart(r))})("@overlayAnimation.done",function(r){S(e);let o=m();return E(o.onAnimationEnd(r))}),g(2,ED,1,0,"ng-container",7)(3,MD,2,1,"ng-container",13)(4,AD,5,11,"ng-template",null,14,dt)(6,DD,1,0,"ng-container",7),h()}if(i&2){let e=Le(5),n=m();l("ngClass","p-password-panel p-component")("@overlayAnimation",H(10,RD,We(7,PD,n.showTransitionOptions,n.hideTransitionOptions))),T("data-pc-section","panel"),d(2),l("ngTemplateOutlet",n.headerTemplate),d(),l("ngIf",n.contentTemplate)("ngIfElse",e),d(3),l("ngTemplateOutlet",n.footerTemplate)}}var LD=(()=>{class i{transform(e,n,...r){return n(e,...r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=Tn({name:"mapper",type:i,pure:!0})}return i})(),FD={provide:zt,useExisting:Tt(()=>tc),multi:!0},tc=(()=>{class i{document;platformId;renderer;cd;config;el;overlayService;ariaLabel;ariaLabelledBy;label;disabled;promptLabel;mediumRegex="^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})";strongRegex="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})";weakLabel;mediumLabel;maxLength;strongLabel;inputId;feedback=!0;appendTo;toggleMask;inputStyleClass;styleClass;style;inputStyle;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autocomplete;placeholder;showClear=!1;onFocus=new L;onBlur=new L;onClear=new L;input;contentTemplate;footerTemplate;headerTemplate;clearIconTemplate;hideIconTemplate;showIconTemplate;templates;overlayVisible=!1;meter;infoText;focused=!1;unmasked=!1;mediumCheckRegExp;strongCheckRegExp;resizeListener;scrollHandler;overlay;value=null;onModelChange=()=>{};onModelTouched=()=>{};translationSubscription;constructor(e,n,r,o,s,a,c){this.document=e,this.platformId=n,this.renderer=r,this.cd=o,this.config=s,this.el=a,this.overlayService=c}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"hideicon":this.hideIconTemplate=e.template;break;case"showicon":this.showIconTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}ngOnInit(){this.infoText=this.promptText(),this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.updateUI(this.value||"")})}onAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,Pt.set("overlay",this.overlay,this.config.zIndex.overlay),this.appendContainer(),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener();break;case"void":this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null;break}}onAnimationEnd(e){switch(e.toState){case"void":Pt.clear(e.element);break}}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.overlay):this.document.getElementById(this.appendTo).appendChild(this.overlay))}alignOverlay(){this.appendTo?(this.overlay.style.minWidth=x.getOuterWidth(this.input.nativeElement)+"px",x.absolutePosition(this.overlay,this.input.nativeElement)):x.relativePosition(this.overlay,this.input.nativeElement)}onInput(e){this.value=e.target.value,this.onModelChange(this.value)}onInputFocus(e){this.focused=!0,this.feedback&&(this.overlayVisible=!0),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.onModelTouched(),this.onBlur.emit(e)}onKeyUp(e){if(this.feedback){let n=e.target.value;if(this.updateUI(n),e.code==="Escape"){this.overlayVisible&&(this.overlayVisible=!1);return}this.overlayVisible||(this.overlayVisible=!0)}}updateUI(e){let n=null,r=null;switch(this.testStrength(e)){case 1:n=this.weakText(),r={strength:"weak",width:"33.33%"};break;case 2:n=this.mediumText(),r={strength:"medium",width:"66.66%"};break;case 3:n=this.strongText(),r={strength:"strong",width:"100%"};break;default:n=this.promptText(),r=null;break}this.meter=r,this.infoText=n}onMaskToggle(){this.unmasked=!this.unmasked}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}testStrength(e){let n=0;return this.strongCheckRegExp.test(e)?n=3:this.mediumCheckRegExp.test(e)?n=2:e.length&&(n=1),n}writeValue(e){e===void 0?this.value=null:this.value=e,this.feedback&&this.updateUI(this.value||""),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}bindScrollListener(){ut(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new kn(this.input.nativeElement,()=>{this.overlayVisible&&(this.overlayVisible=!1)})),this.scrollHandler.bindScrollListener())}bindResizeListener(){if(ut(this.platformId)&&!this.resizeListener){let e=this.document.defaultView;this.resizeListener=this.renderer.listen(e,"resize",()=>{this.overlayVisible&&!x.isTouchDevice()&&(this.overlayVisible=!1)})}}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}containerClass(e){return{"p-password p-component p-inputwrapper":!0,"p-input-icon-right":e}}inputFieldClass(e){return{"p-password-input":!0,"p-disabled":e}}strengthClass(e){return`p-password-strength ${e?e.strength:""}`}filled(){return this.value!=null&&this.value.toString().length>0}promptText(){return this.promptLabel||this.getTranslation(Jt.PASSWORD_PROMPT)}weakText(){return this.weakLabel||this.getTranslation(Jt.WEAK)}mediumText(){return this.mediumLabel||this.getTranslation(Jt.MEDIUM)}strongText(){return this.strongLabel||this.getTranslation(Jt.STRONG)}restoreAppend(){this.overlay&&this.appendTo&&(this.appendTo==="body"?this.renderer.removeChild(this.document.body,this.overlay):this.document.getElementById(this.appendTo).removeChild(this.overlay))}inputType(e){return e?"text":"password"}getTranslation(e){return this.config.getTranslation(e)}clear(){this.value=null,this.onModelChange(this.value),this.writeValue(this.value),this.onClear.emit()}ngOnDestroy(){this.overlay&&(Pt.clear(this.overlay),this.overlay=null),this.restoreAppend(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(nt),w(Ne),w(At),w(ve),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-password"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&oe(uD,5),n&2){let o;q(o=W())&&(r.input=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:8,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled())("p-inputwrapper-focus",r.focused)("p-password-clearable",r.showClear)("p-password-mask",r.toggleMask)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",label:"label",disabled:"disabled",promptLabel:"promptLabel",mediumRegex:"mediumRegex",strongRegex:"strongRegex",weakLabel:"weakLabel",mediumLabel:"mediumLabel",maxLength:"maxLength",strongLabel:"strongLabel",inputId:"inputId",feedback:"feedback",appendTo:"appendTo",toggleMask:"toggleMask",inputStyleClass:"inputStyleClass",styleClass:"styleClass",style:"style",inputStyle:"inputStyle",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autocomplete:"autocomplete",placeholder:"placeholder",showClear:"showClear"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClear:"onClear"},features:[mt([FD])],decls:9,vars:32,consts:[[3,"ngClass","ngStyle"],["pInputText","",3,"ngClass","ngStyle","value","input","focus","blur","keyup"],["input",""],[4,"ngIf"],[3,"ngClass","click",4,"ngIf"],[3,"styleClass","click",4,"ngIf"],[1,"p-password-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[3,"styleClass","click"],[3,"click",4,"ngIf"],[3,"click"],[3,"ngClass","click"],["overlay",""],[4,"ngIf","ngIfElse"],["content",""],[1,"p-password-meter"],["className","p-password-info"]],template:function(n,r){n&1&&(p(0,"div",0),ct(1,"mapper"),p(2,"input",1,2),A("input",function(s){return r.onInput(s)})("focus",function(s){return r.onInputFocus(s)})("blur",function(s){return r.onInputBlur(s)})("keyup",function(s){return r.onKeyUp(s)}),ct(4,"mapper"),ct(5,"mapper"),h(),g(6,fD,4,3,"ng-container",3)(7,SD,3,2,"ng-container",3)(8,VD,7,12,"div",4),h()),n&2&&(U(r.styleClass),l("ngClass",un(1,23,r.toggleMask,r.containerClass))("ngStyle",r.style),T("data-pc-name","password")("data-pc-section","root"),d(2),U(r.inputStyleClass),l("ngClass",un(4,26,r.disabled,r.inputFieldClass))("ngStyle",r.inputStyle)("value",r.value),T("label",r.label)("aria-label",r.ariaLabel)("aria-labelledBy",r.ariaLabelledBy)("id",r.inputId)("type",un(5,29,r.unmasked,r.inputType))("placeholder",r.placeholder)("autocomplete",r.autocomplete)("maxlength",r.maxLength)("data-pc-section","input"),d(4),l("ngIf",r.showClear&&r.value!=null),d(),l("ngIf",r.toggleMask),d(),l("ngIf",r.overlayVisible))},dependencies:()=>[xe,Ie,rt,Ce,_o,pt,Xf,ec,LD],styles:[`@layer primeng{.p-password{position:relative;display:inline-flex}.p-password-panel{position:absolute;top:0;left:0}.p-password .p-password-panel{min-width:100%}.p-password-meter{height:10px}.p-password-strength{height:100%;width:0%;transition:width 1s ease-in-out}.p-fluid .p-password{display:flex}.p-password-input::-ms-reveal,.p-password-input::-ms-clear{display:none}.p-password-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-password-clearable.p-password-mask .p-password-clear-icon{margin-top:unset}.p-password-clearable{position:relative}} `],encapsulation:2,data:{animation:[rn("overlayAnimation",[ei(":enter",[Lt({opacity:0,transform:"scaleY(0.8)"}),Xt("{{showTransitionParams}}")]),ei(":leave",[Xt("{{hideTransitionParams}}",Lt({opacity:0}))])])]},changeDetection:0})}return i})(),Nu=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,fn,pt,Xf,ec,Te]})}return i})();var Vr=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["SpinnerIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var ui=(()=>{class i{document;platformId;renderer;el;zone;config;constructor(e,n,r,o,s,a){this.document=e,this.platformId=n,this.renderer=r,this.el=o,this.zone=s,this.config=a}animationListener;mouseDownListener;timeout;ngAfterViewInit(){ut(this.platformId)&&this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.renderer.listen(this.el.nativeElement,"mousedown",this.onMouseDown.bind(this))})}onMouseDown(e){let n=this.getInk();if(!n||this.document.defaultView?.getComputedStyle(n,null).display==="none")return;if(x.removeClass(n,"p-ink-active"),!x.getHeight(n)&&!x.getWidth(n)){let a=Math.max(x.getOuterWidth(this.el.nativeElement),x.getOuterHeight(this.el.nativeElement));n.style.height=a+"px",n.style.width=a+"px"}let r=x.getOffset(this.el.nativeElement),o=e.pageX-r.left+this.document.body.scrollTop-x.getWidth(n)/2,s=e.pageY-r.top+this.document.body.scrollLeft-x.getHeight(n)/2;this.renderer.setStyle(n,"top",s+"px"),this.renderer.setStyle(n,"left",o+"px"),x.addClass(n,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&x.removeClass(a,"p-ink-active")},401)}getInk(){let e=this.el.nativeElement.children;for(let n=0;n{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();function ND(i,t){i&1&&ie(0)}function BD(i,t){if(i&1&&y(0,"span",8),i&2){let e=m(3);U("p-button-loading-icon pi-spin "+e.loadingIcon),l("ngClass",e.iconClass()),T("aria-hidden",!0)("data-pc-section","loadingicon")}}function zD(i,t){if(i&1&&y(0,"SpinnerIcon",9),i&2){let e=m(3);l("styleClass",e.spinnerIconClass())("spin",!0),T("aria-hidden",!0)("data-pc-section","loadingicon")}}function UD(i,t){if(i&1&&(Z(0),g(1,BD,1,5,"span",6)(2,zD,1,4,"SpinnerIcon",7),X()),i&2){let e=m(2);d(),l("ngIf",e.loadingIcon),d(),l("ngIf",!e.loadingIcon)}}function jD(i,t){}function HD(i,t){i&1&&g(0,jD,0,0,"ng-template")}function GD(i,t){if(i&1&&(p(0,"span",10),g(1,HD,1,0,null,1),h()),i&2){let e=m(2);l("ngClass",e.iconClass()),T("aria-hidden",!0)("data-pc-section","loadingicon"),d(),l("ngTemplateOutlet",e.loadingIconTemplate)}}function $D(i,t){if(i&1&&(Z(0),g(1,UD,3,2,"ng-container",2)(2,GD,2,4,"span",5),X()),i&2){let e=m();d(),l("ngIf",!e.loadingIconTemplate),d(),l("ngIf",e.loadingIconTemplate)}}function qD(i,t){if(i&1&&y(0,"span",8),i&2){let e=m(2);U(e.icon),l("ngClass",e.iconClass()),T("data-pc-section","icon")}}function WD(i,t){}function KD(i,t){if(i&1&&g(0,WD,0,0,"ng-template",12),i&2){let e=m(3);l("ngIf",!e.icon)}}function QD(i,t){if(i&1&&(p(0,"span",8),g(1,KD,1,1,null,1),h()),i&2){let e=m(2);l("ngClass",e.iconClass()),T("data-pc-section","icon"),d(),l("ngTemplateOutlet",e.iconTemplate)}}function YD(i,t){if(i&1&&(Z(0),g(1,qD,1,4,"span",6)(2,QD,2,3,"span",11),X()),i&2){let e=m();d(),l("ngIf",e.icon&&!e.iconTemplate),d(),l("ngIf",!e.icon&&e.iconTemplate)}}function ZD(i,t){if(i&1&&(p(0,"span",13),_(1),h()),i&2){let e=m();T("aria-hidden",e.icon&&!e.label)("data-pc-section","label"),d(),z(e.label)}}function XD(i,t){if(i&1&&(p(0,"span",8),_(1),h()),i&2){let e=m();U(e.badgeClass),l("ngClass",e.badgeStyleClass()),T("data-pc-section","badge"),d(),z(e.badge)}}var JD=["*"],vo={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"},Bu=(()=>{class i{el;document;iconPos="left";loadingIcon;get label(){return this._label}set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}_label;_icon;_loading=!1;initialized;get htmlElement(){return this.el.nativeElement}_internalClasses=Object.values(vo);spinnerIcon=` - `;constructor(e,n){this.el=e,this.document=n}ngAfterViewInit(){x.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){let e=[vo.button,vo.component];return this.icon&&!this.label&&re.isEmpty(this.htmlElement.textContent)&&e.push(vo.iconOnly),this.loading&&(e.push(vo.disabled,vo.loading),!this.icon&&this.label&&e.push(vo.labelOnly),this.icon&&!this.label&&!re.isEmpty(this.htmlElement.textContent)&&e.push(vo.iconOnly)),e}setStyleClass(){let e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(!x.findSingle(this.htmlElement,".p-button-label")&&this.label){let n=this.document.createElement("span");this.icon&&!this.label&&n.setAttribute("aria-hidden","true"),n.className="p-button-label",n.appendChild(this.document.createTextNode(this.label)),this.htmlElement.appendChild(n)}}createIcon(){if(!x.findSingle(this.htmlElement,".p-button-icon")&&(this.icon||this.loading)){let n=this.document.createElement("span");n.className="p-button-icon",n.setAttribute("aria-hidden","true");let r=this.label?"p-button-icon-"+this.iconPos:null;r&&x.addClass(n,r);let o=this.getIconClass();o&&x.addMultipleClasses(n,o),!this.loadingIcon&&this.loading&&(n.innerHTML=this.spinnerIcon),this.htmlElement.insertBefore(n,this.htmlElement.firstChild)}}updateLabel(){let e=x.findSingle(this.htmlElement,".p-button-label");if(!this.label){e&&this.htmlElement.removeChild(e);return}e?e.textContent=this.label:this.createLabel()}updateIcon(){let e=x.findSingle(this.htmlElement,".p-button-icon"),n=x.findSingle(this.htmlElement,".p-button-label");this.loading&&!this.loadingIcon&&e?e.innerHTML=this.spinnerIcon:e?.innerHTML&&(e.innerHTML=""),e?this.iconPos?e.className="p-button-icon "+(n?"p-button-icon-"+this.iconPos:"")+" "+this.getIconClass():e.className="p-button-icon "+this.getIconClass():this.createIcon()}getIconClass(){return this.loading?"p-button-loading-icon "+(this.loadingIcon?this.loadingIcon:"p-icon"):this.icon||"p-hidden"}ngOnDestroy(){this.initialized=!1}static \u0275fac=function(n){return new(n||i)(w(ve),w(Oe))};static \u0275dir=it({type:i,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}})}return i})(),ni=(()=>{class i{el;type="button";iconPos="left";icon;badge;label;disabled;loading=!1;loadingIcon;raised=!1;rounded=!1;text=!1;plain=!1;severity;outlined=!1;link=!1;size;style;styleClass;badgeClass;ariaLabel;onClick=new L;onFocus=new L;onBlur=new L;contentTemplate;loadingIconTemplate;iconTemplate;templates;constructor(e){this.el=e}spinnerIconClass(){return Object.entries(this.iconClass()).filter(([,e])=>!!e).reduce((e,[n])=>e+` ${n}`,"p-button-loading-icon")}iconClass(){return{"p-button-icon":!0,"p-button-icon-left":this.iconPos==="left"&&this.label,"p-button-icon-right":this.iconPos==="right"&&this.label,"p-button-icon-top":this.iconPos==="top"&&this.label,"p-button-icon-bottom":this.iconPos==="bottom"&&this.label}}get buttonClass(){return{"p-button p-component":!0,"p-button-icon-only":(this.icon||this.iconTemplate||this.loadingIcon||this.loadingIconTemplate)&&!this.label,"p-button-vertical":(this.iconPos==="top"||this.iconPos==="bottom")&&this.label,"p-disabled":this.disabled||this.loading,"p-button-loading":this.loading,"p-button-loading-label-only":this.loading&&!this.icon&&this.label&&!this.loadingIcon&&this.iconPos==="left","p-button-link":this.link,[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":this.size==="small","p-button-lg":this.size==="large","p-button-plain":this.plain,[`${this.styleClass}`]:this.styleClass}}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"icon":this.iconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&String(this.badge).length===1}}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275cmp=k({type:i,selectors:[["p-button"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],hostVars:2,hostBindings:function(n,r){n&2&&qt("p-disabled",r.disabled)},inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",raised:"raised",rounded:"rounded",text:"text",plain:"plain",severity:"severity",outlined:"outlined",link:"link",size:"size",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:JD,decls:7,vars:12,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass","class",4,"ngIf"],["class","p-button-loading-icon",3,"ngClass",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],[3,"styleClass","spin",4,"ngIf"],[3,"ngClass"],[3,"styleClass","spin"],[1,"p-button-loading-icon",3,"ngClass"],[3,"ngClass",4,"ngIf"],[3,"ngIf"],[1,"p-button-label"]],template:function(n,r){n&1&&(je(),p(0,"button",0),A("click",function(s){return r.onClick.emit(s)})("focus",function(s){return r.onFocus.emit(s)})("blur",function(s){return r.onBlur.emit(s)}),Ae(1),g(2,ND,1,0,"ng-container",1)(3,$D,3,2,"ng-container",2)(4,YD,3,2,"ng-container",2)(5,ZD,2,3,"span",3)(6,XD,2,5,"span",4),h()),n&2&&(l("ngStyle",r.style)("disabled",r.disabled||r.loading)("ngClass",r.buttonClass),T("type",r.type)("aria-label",r.ariaLabel)("data-pc-name","button")("data-pc-section","root"),d(2),l("ngTemplateOutlet",r.contentTemplate),d(),l("ngIf",r.loading),d(),l("ngIf",!r.loading),d(),l("ngIf",!r.contentTemplate&&r.label),d(),l("ngIf",!r.contentTemplate&&r.badge))},dependencies:()=>[xe,Ie,rt,Ce,ui,Vr],encapsulation:2,changeDetection:0})}return i})(),yt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,Te,Vr,Te]})}return i})();function e4(i,t){i&1&&ie(0)}function t4(i,t){if(i&1&&(p(0,"div",8),Ae(1,1),g(2,e4,1,0,"ng-container",6),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.headerTemplate)}}function i4(i,t){i&1&&ie(0)}function n4(i,t){if(i&1&&(p(0,"div",9),_(1),g(2,i4,1,0,"ng-container",6),h()),i&2){let e=m();d(),be(" ",e.header," "),d(),l("ngTemplateOutlet",e.titleTemplate)}}function r4(i,t){i&1&&ie(0)}function o4(i,t){if(i&1&&(p(0,"div",10),_(1),g(2,r4,1,0,"ng-container",6),h()),i&2){let e=m();d(),be(" ",e.subheader," "),d(),l("ngTemplateOutlet",e.subtitleTemplate)}}function s4(i,t){i&1&&ie(0)}function a4(i,t){i&1&&ie(0)}function l4(i,t){if(i&1&&(p(0,"div",11),Ae(1,2),g(2,a4,1,0,"ng-container",6),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.footerTemplate)}}var c4=["*",[["p-header"]],[["p-footer"]]],d4=["*","p-header","p-footer"],ra=(()=>{class i{el;header;subheader;style;styleClass;headerFacet;footerFacet;templates;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}getBlockableElement(){return this.el.nativeElement.children[0]}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275cmp=k({type:i,selectors:[["p-card"]],contentQueries:function(n,r,o){if(n&1&&(De(o,fo,5),De(o,go,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:d4,decls:9,vars:10,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(n,r){n&1&&(je(c4),p(0,"div",0),g(1,t4,3,1,"div",1),p(2,"div",2),g(3,n4,3,2,"div",3)(4,o4,3,2,"div",4),p(5,"div",5),Ae(6),g(7,s4,1,0,"ng-container",6),h(),g(8,l4,3,1,"div",7),h()()),n&2&&(U(r.styleClass),l("ngClass","p-card p-component")("ngStyle",r.style),T("data-pc-name","card"),d(),l("ngIf",r.headerFacet||r.headerTemplate),d(2),l("ngIf",r.header||r.titleTemplate),d(),l("ngIf",r.subheader||r.subtitleTemplate),d(3),l("ngTemplateOutlet",r.contentTemplate),d(),l("ngIf",r.footerFacet||r.footerTemplate))},dependencies:[xe,Ie,rt,Ce],styles:[`@layer primeng{.p-card-header img{width:100%}} + `;constructor(e,n){this.el=e,this.document=n}ngAfterViewInit(){x.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){let e=[vo.button,vo.component];return this.icon&&!this.label&&re.isEmpty(this.htmlElement.textContent)&&e.push(vo.iconOnly),this.loading&&(e.push(vo.disabled,vo.loading),!this.icon&&this.label&&e.push(vo.labelOnly),this.icon&&!this.label&&!re.isEmpty(this.htmlElement.textContent)&&e.push(vo.iconOnly)),e}setStyleClass(){let e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(!x.findSingle(this.htmlElement,".p-button-label")&&this.label){let n=this.document.createElement("span");this.icon&&!this.label&&n.setAttribute("aria-hidden","true"),n.className="p-button-label",n.appendChild(this.document.createTextNode(this.label)),this.htmlElement.appendChild(n)}}createIcon(){if(!x.findSingle(this.htmlElement,".p-button-icon")&&(this.icon||this.loading)){let n=this.document.createElement("span");n.className="p-button-icon",n.setAttribute("aria-hidden","true");let r=this.label?"p-button-icon-"+this.iconPos:null;r&&x.addClass(n,r);let o=this.getIconClass();o&&x.addMultipleClasses(n,o),!this.loadingIcon&&this.loading&&(n.innerHTML=this.spinnerIcon),this.htmlElement.insertBefore(n,this.htmlElement.firstChild)}}updateLabel(){let e=x.findSingle(this.htmlElement,".p-button-label");if(!this.label){e&&this.htmlElement.removeChild(e);return}e?e.textContent=this.label:this.createLabel()}updateIcon(){let e=x.findSingle(this.htmlElement,".p-button-icon"),n=x.findSingle(this.htmlElement,".p-button-label");this.loading&&!this.loadingIcon&&e?e.innerHTML=this.spinnerIcon:e?.innerHTML&&(e.innerHTML=""),e?this.iconPos?e.className="p-button-icon "+(n?"p-button-icon-"+this.iconPos:"")+" "+this.getIconClass():e.className="p-button-icon "+this.getIconClass():this.createIcon()}getIconClass(){return this.loading?"p-button-loading-icon "+(this.loadingIcon?this.loadingIcon:"p-icon"):this.icon||"p-hidden"}ngOnDestroy(){this.initialized=!1}static \u0275fac=function(n){return new(n||i)(w(ve),w(Oe))};static \u0275dir=it({type:i,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}})}return i})(),ni=(()=>{class i{el;type="button";iconPos="left";icon;badge;label;disabled;loading=!1;loadingIcon;raised=!1;rounded=!1;text=!1;plain=!1;severity;outlined=!1;link=!1;size;style;styleClass;badgeClass;ariaLabel;onClick=new L;onFocus=new L;onBlur=new L;contentTemplate;loadingIconTemplate;iconTemplate;templates;constructor(e){this.el=e}spinnerIconClass(){return Object.entries(this.iconClass()).filter(([,e])=>!!e).reduce((e,[n])=>e+` ${n}`,"p-button-loading-icon")}iconClass(){return{"p-button-icon":!0,"p-button-icon-left":this.iconPos==="left"&&this.label,"p-button-icon-right":this.iconPos==="right"&&this.label,"p-button-icon-top":this.iconPos==="top"&&this.label,"p-button-icon-bottom":this.iconPos==="bottom"&&this.label}}get buttonClass(){return{"p-button p-component":!0,"p-button-icon-only":(this.icon||this.iconTemplate||this.loadingIcon||this.loadingIconTemplate)&&!this.label,"p-button-vertical":(this.iconPos==="top"||this.iconPos==="bottom")&&this.label,"p-disabled":this.disabled||this.loading,"p-button-loading":this.loading,"p-button-loading-label-only":this.loading&&!this.icon&&this.label&&!this.loadingIcon&&this.iconPos==="left","p-button-link":this.link,[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":this.size==="small","p-button-lg":this.size==="large","p-button-plain":this.plain,[`${this.styleClass}`]:this.styleClass}}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"icon":this.iconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&String(this.badge).length===1}}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275cmp=k({type:i,selectors:[["p-button"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],hostVars:2,hostBindings:function(n,r){n&2&&qt("p-disabled",r.disabled)},inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",raised:"raised",rounded:"rounded",text:"text",plain:"plain",severity:"severity",outlined:"outlined",link:"link",size:"size",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:JD,decls:7,vars:12,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass","class",4,"ngIf"],["class","p-button-loading-icon",3,"ngClass",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],[3,"styleClass","spin",4,"ngIf"],[3,"ngClass"],[3,"styleClass","spin"],[1,"p-button-loading-icon",3,"ngClass"],[3,"ngClass",4,"ngIf"],[3,"ngIf"],[1,"p-button-label"]],template:function(n,r){n&1&&(Ue(),p(0,"button",0),A("click",function(s){return r.onClick.emit(s)})("focus",function(s){return r.onFocus.emit(s)})("blur",function(s){return r.onBlur.emit(s)}),Ae(1),g(2,ND,1,0,"ng-container",1)(3,$D,3,2,"ng-container",2)(4,YD,3,2,"ng-container",2)(5,ZD,2,3,"span",3)(6,XD,2,5,"span",4),h()),n&2&&(l("ngStyle",r.style)("disabled",r.disabled||r.loading)("ngClass",r.buttonClass),T("type",r.type)("aria-label",r.ariaLabel)("data-pc-name","button")("data-pc-section","root"),d(2),l("ngTemplateOutlet",r.contentTemplate),d(),l("ngIf",r.loading),d(),l("ngIf",!r.loading),d(),l("ngIf",!r.contentTemplate&&r.label),d(),l("ngIf",!r.contentTemplate&&r.badge))},dependencies:()=>[xe,Ie,rt,Ce,ui,Vr],encapsulation:2,changeDetection:0})}return i})(),yt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,Te,Vr,Te]})}return i})();function e4(i,t){i&1&&ie(0)}function t4(i,t){if(i&1&&(p(0,"div",8),Ae(1,1),g(2,e4,1,0,"ng-container",6),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.headerTemplate)}}function i4(i,t){i&1&&ie(0)}function n4(i,t){if(i&1&&(p(0,"div",9),_(1),g(2,i4,1,0,"ng-container",6),h()),i&2){let e=m();d(),be(" ",e.header," "),d(),l("ngTemplateOutlet",e.titleTemplate)}}function r4(i,t){i&1&&ie(0)}function o4(i,t){if(i&1&&(p(0,"div",10),_(1),g(2,r4,1,0,"ng-container",6),h()),i&2){let e=m();d(),be(" ",e.subheader," "),d(),l("ngTemplateOutlet",e.subtitleTemplate)}}function s4(i,t){i&1&&ie(0)}function a4(i,t){i&1&&ie(0)}function l4(i,t){if(i&1&&(p(0,"div",11),Ae(1,2),g(2,a4,1,0,"ng-container",6),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.footerTemplate)}}var c4=["*",[["p-header"]],[["p-footer"]]],d4=["*","p-header","p-footer"],ra=(()=>{class i{el;header;subheader;style;styleClass;headerFacet;footerFacet;templates;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}getBlockableElement(){return this.el.nativeElement.children[0]}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275cmp=k({type:i,selectors:[["p-card"]],contentQueries:function(n,r,o){if(n&1&&(De(o,fo,5),De(o,go,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:d4,decls:9,vars:10,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(n,r){n&1&&(Ue(c4),p(0,"div",0),g(1,t4,3,1,"div",1),p(2,"div",2),g(3,n4,3,2,"div",3)(4,o4,3,2,"div",4),p(5,"div",5),Ae(6),g(7,s4,1,0,"ng-container",6),h(),g(8,l4,3,1,"div",7),h()()),n&2&&(U(r.styleClass),l("ngClass","p-card p-component")("ngStyle",r.style),T("data-pc-name","card"),d(),l("ngIf",r.headerFacet||r.headerTemplate),d(2),l("ngIf",r.header||r.titleTemplate),d(),l("ngIf",r.subheader||r.subtitleTemplate),d(3),l("ngTemplateOutlet",r.contentTemplate),d(),l("ngIf",r.footerFacet||r.footerTemplate))},dependencies:[xe,Ie,rt,Ce],styles:[`@layer primeng{.p-card-header img{width:100%}} `],encapsulation:2,changeDetection:0})}return i})(),oa=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te]})}return i})();var _n=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["CheckIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var ic=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ExclamationTriangleIcon"]],standalone:!0,features:[ye,R],decls:8,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1)(3,"path",2)(4,"path",3),h(),p(5,"defs")(6,"clipPath",4),y(7,"rect",5),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(5),l("id",r.pathId))},encapsulation:2})}return i})();var nc=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["InfoCircleIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var Ui=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["TimesCircleIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var AI=["container"];function u4(i,t){i&1&&ie(0)}var p4=(i,t)=>({$implicit:i,closeFn:t});function h4(i,t){if(i&1&&(Z(0),g(1,u4,1,0,"ng-container",4),X()),i&2){let e=m();d(),l("ngTemplateOutlet",e.headlessTemplate)("ngTemplateOutletContext",We(2,p4,e.message,e.onCloseIconClick))}}function m4(i,t){if(i&1&&y(0,"span"),i&2){let e=m(3);U("p-toast-message-icon pi "+e.message.icon)}}function f4(i,t){i&1&&y(0,"CheckIcon"),i&2&&T("aria-hidden",!0)("data-pc-section","icon")}function g4(i,t){i&1&&y(0,"InfoCircleIcon"),i&2&&T("aria-hidden",!0)("data-pc-section","icon")}function _4(i,t){i&1&&y(0,"TimesCircleIcon"),i&2&&T("aria-hidden",!0)("data-pc-section","icon")}function v4(i,t){i&1&&y(0,"ExclamationTriangleIcon"),i&2&&T("aria-hidden",!0)("data-pc-section","icon")}function y4(i,t){if(i&1&&(p(0,"span",13),Z(1),g(2,f4,1,2,"CheckIcon",6)(3,g4,1,2,"InfoCircleIcon",6)(4,_4,1,2,"TimesCircleIcon",6)(5,v4,1,2,"ExclamationTriangleIcon",6),X(),h()),i&2){let e=m(3);T("aria-hidden",!0)("data-pc-section","icon"),d(2),l("ngIf",e.message.severity==="success"),d(),l("ngIf",e.message.severity==="info"),d(),l("ngIf",e.message.severity==="error"),d(),l("ngIf",e.message.severity==="warn")}}function b4(i,t){if(i&1&&(Z(0),g(1,m4,1,2,"span",8)(2,y4,6,6,"span",9),p(3,"div",10)(4,"div",11),_(5),h(),p(6,"div",12),_(7),h()(),X()),i&2){let e=m(2);d(),l("ngIf",e.message.icon),d(),l("ngIf",!e.message.icon),d(),T("data-pc-section","text"),d(),T("data-pc-section","summary"),d(),z(e.message.summary),d(),T("data-pc-section","detail"),d(),z(e.message.detail)}}function C4(i,t){i&1&&ie(0)}function I4(i,t){if(i&1&&y(0,"span"),i&2){let e=m(3);U("pt-1 text-base p-toast-message-icon pi "+e.message.closeIcon)}}function w4(i,t){i&1&&y(0,"TimesIcon",16),i&2&&(l("styleClass","p-toast-icon-close-icon"),T("aria-hidden",!0)("data-pc-section","closeicon"))}function T4(i,t){if(i&1){let e=G();p(0,"button",14),A("click",function(r){S(e);let o=m(2);return E(o.onCloseIconClick(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.onCloseIconClick(r))}),g(1,I4,1,2,"span",8)(2,w4,1,3,"TimesIcon",15),h()}if(i&2){let e=m(2);T("aria-label",e.closeAriaLabel)("data-pc-section","closebutton"),d(),l("ngIf",e.message.closeIcon),d(),l("ngIf",!e.message.closeIcon)}}var x4=i=>({$implicit:i});function S4(i,t){if(i&1&&(p(0,"div",5),g(1,b4,8,7,"ng-container",6)(2,C4,1,0,"ng-container",4)(3,T4,3,4,"button",7),h()),i&2){let e=m();l("ngClass",e.message==null?null:e.message.contentStyleClass),T("data-pc-section","content"),d(),l("ngIf",!e.template),d(),l("ngTemplateOutlet",e.template)("ngTemplateOutletContext",H(6,x4,e.message)),d(),l("ngIf",(e.message==null?null:e.message.closable)!==!1)}}var E4=i=>[i,"p-toast-message"],O4=(i,t,e,n)=>({showTransformParams:i,hideTransformParams:t,showTransitionParams:e,hideTransitionParams:n}),M4=i=>({value:"visible",params:i});function k4(i,t){if(i&1){let e=G();p(0,"p-toastItem",3),A("onClose",function(r){S(e);let o=m();return E(o.onMessageClose(r))})("@toastAnimation.start",function(r){S(e);let o=m();return E(o.onAnimationStart(r))})("@toastAnimation.done",function(r){S(e);let o=m();return E(o.onAnimationEnd(r))}),h()}if(i&2){let e=t.$implicit,n=t.index,r=m();l("message",e)("index",n)("life",r.life)("template",r.template)("headlessTemplate",r.headlessTemplate)("@toastAnimation",void 0)("showTransformOptions",r.showTransformOptions)("hideTransformOptions",r.hideTransformOptions)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions)}}var A4=(()=>{class i{zone;config;message;index;life;template;headlessTemplate;showTransformOptions;hideTransformOptions;showTransitionOptions;hideTransitionOptions;onClose=new L;containerViewChild;timeout;constructor(e,n){this.zone=e,this.config=n}ngAfterViewInit(){this.initTimeout()}initTimeout(){this.message?.sticky||this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message?.life||this.life||3e3)})}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick=e=>{this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),e.preventDefault()};get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}ngOnDestroy(){this.clearTimeout()}static \u0275fac=function(n){return new(n||i)(w(ge),w(At))};static \u0275cmp=k({type:i,selectors:[["p-toastItem"]],viewQuery:function(n,r){if(n&1&&oe(AI,5),n&2){let o;q(o=W())&&(r.containerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{message:"message",index:"index",life:"life",template:"template",headlessTemplate:"headlessTemplate",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},decls:5,vars:18,consts:[["role","alert","aria-live","assertive","aria-atomic","true",3,"ngClass","mouseenter","mouseleave"],["container",""],[4,"ngIf","ngIfElse"],["notHeadless",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-toast-message-content",3,"ngClass"],[4,"ngIf"],["type","button","class","p-toast-icon-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],[3,"class",4,"ngIf"],["class","p-toast-message-icon",4,"ngIf"],[1,"p-toast-message-text"],[1,"p-toast-summary"],[1,"p-toast-detail"],[1,"p-toast-message-icon"],["type","button","pRipple","",1,"p-toast-icon-close","p-link",3,"click","keydown.enter"],[3,"styleClass",4,"ngIf"],[3,"styleClass"]],template:function(n,r){if(n&1&&(p(0,"div",0,1),A("mouseenter",function(){return r.onMouseEnter()})("mouseleave",function(){return r.onMouseLeave()}),g(2,h4,2,5,"ng-container",2)(3,S4,4,8,"ng-template",null,3,dt),h()),n&2){let o=Le(4);U(r.message==null?null:r.message.styleClass),l("ngClass",H(9,E4,"p-toast-message-"+(r.message==null?null:r.message.severity)))("@messageState",H(16,M4,Dr(11,O4,r.showTransformOptions,r.hideTransformOptions,r.showTransitionOptions,r.hideTransitionOptions))),T("id",r.message==null?null:r.message.id)("data-pc-name","toast")("data-pc-section","root"),d(2),l("ngIf",r.headlessTemplate)("ngIfElse",o)}},dependencies:()=>[xe,Ie,rt,ui,_n,nc,Ui,ic,pt],encapsulation:2,data:{animation:[rn("messageState",[Qd("visible",Lt({transform:"translateY(0)",opacity:1})),ei("void => *",[Lt({transform:"{{showTransformParams}}",opacity:0}),Xt("{{showTransitionParams}}")]),ei("* => void",[Xt("{{hideTransitionParams}}",Lt({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0})}return i})(),zu=(()=>{class i{document;renderer;messageService;cd;config;key;autoZIndex=!0;baseZIndex=0;life=3e3;style;styleClass;get position(){return this._position}set position(e){this._position=e,this.cd.markForCheck()}preventOpenDuplicates=!1;preventDuplicates=!1;showTransformOptions="translateY(100%)";hideTransformOptions="translateY(-100%)";showTransitionOptions="300ms ease-out";hideTransitionOptions="250ms ease-in";breakpoints;onClose=new L;containerViewChild;templates;messageSubscription;clearSubscription;messages;messagesArchieve;template;headlessTemplate;_position="top-right";constructor(e,n,r,o,s){this.document=e,this.renderer=n,this.messageService=r,this.cd=o,this.config=s}styleElement;id=Me();ngOnInit(){this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e)if(Array.isArray(e)){let n=e.filter(r=>this.canAdd(r));this.add(n)}else this.canAdd(e)&&this.add([e])}),this.clearSubscription=this.messageService.clearObserver.subscribe(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()})}ngAfterViewInit(){this.breakpoints&&this.createStyle()}add(e){this.messages=this.messages?[...this.messages,...e]:[...e],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...e]:[...e]),this.cd.markForCheck()}canAdd(e){let n=this.key===e.key;return n&&this.preventOpenDuplicates&&(n=!this.containsMessage(this.messages,e)),n&&this.preventDuplicates&&(n=!this.containsMessage(this.messagesArchieve,e)),n}containsMessage(e,n){return e?e.find(r=>r.summary===n.summary&&r.detail==n.detail&&r.severity===n.severity)!=null:!1}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"message":this.template=e.template;break;case"headless":this.headlessTemplate=e.template;break;default:this.template=e.template;break}})}onMessageClose(e){this.messages?.splice(e.index,1),this.onClose.emit({message:e.message}),this.cd.detectChanges()}onAnimationStart(e){e.fromState==="void"&&(this.renderer.setAttribute(this.containerViewChild?.nativeElement,this.id,""),this.autoZIndex&&this.containerViewChild?.nativeElement.style.zIndex===""&&Pt.set("modal",this.containerViewChild?.nativeElement,this.baseZIndex||this.config.zIndex.modal))}onAnimationEnd(e){e.toState==="void"&&this.autoZIndex&&re.isEmpty(this.messages)&&Pt.clear(this.containerViewChild?.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let n in this.breakpoints){let r="";for(let o in this.breakpoints[n])r+=o+":"+this.breakpoints[n][o]+" !important;";e+=` @media screen and (max-width: ${n}) { .p-toast[${this.id}] { ${r} } } - `}this.renderer.setProperty(this.styleElement,"innerHTML",e)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.containerViewChild&&this.autoZIndex&&Pt.clear(this.containerViewChild.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(nt),w(sr),w(Ne),w(At))};static \u0275cmp=k({type:i,selectors:[["p-toast"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&oe(AI,5),n&2){let o;q(o=W())&&(r.containerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{key:"key",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",life:"life",style:"style",styleClass:"styleClass",position:"position",preventOpenDuplicates:"preventOpenDuplicates",preventDuplicates:"preventDuplicates",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},decls:3,vars:5,consts:[[1,"p-toast","p-component",3,"ngClass","ngStyle"],["container",""],[3,"message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose",4,"ngFor","ngForOf"],[3,"message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose"]],template:function(n,r){n&1&&(p(0,"div",0,1),g(2,k4,1,10,"p-toastItem",2),h()),n&2&&(U(r.styleClass),l("ngClass","p-toast-"+r._position)("ngStyle",r.style),d(2),l("ngForOf",r.messages))},dependencies:[xe,Vt,Ce,A4],styles:[`@layer primeng{.p-toast{position:fixed;width:25rem}.p-toast-message{overflow:hidden}.p-toast-message-content{display:flex;align-items:flex-start}.p-toast-message-text{flex:1 1 auto}.p-toast-top-right{top:20px;right:20px}.p-toast-top-left{top:20px;left:20px}.p-toast-bottom-left{bottom:20px;left:20px}.p-toast-bottom-right{bottom:20px;right:20px}.p-toast-top-center{top:20px;left:50%;transform:translate(-50%)}.p-toast-bottom-center{bottom:20px;left:50%;transform:translate(-50%)}.p-toast-center{left:50%;top:50%;min-width:20vw;transform:translate(-50%,-50%)}.p-toast-icon-close{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;flex:none}.p-toast-icon-close.p-link{cursor:pointer}} -`],encapsulation:2,data:{animation:[rn("toastAnimation",[ei(":enter, :leave",[L1("@*",V1())])])]},changeDetection:0})}return i})(),Uu=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,_n,nc,Ui,ic,pt,Te]})}return i})();var PI=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,_n,nc,Ui,ic,pt]})}return i})();function D4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.placeholder,Ue)}}function P4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.url+e.cast.profile_path,Ue)}}function R4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.cast.character)}}function V4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.cast.character)}}function L4(i,t){if(i&1&&(p(0,"div",1)(1,"a",2),g(2,D4,1,1,"img",3)(3,P4,1,1),p(4,"div",4),_(5),h(),g(6,R4,2,1,"div",5)(7,V4,2,1),h()()),i&2){let e=m();d(),l("routerLink","/celebrities/"+e.cast.id),d(),Je(2,e.cast.profile_path?3:2),d(3),z(e.cast.original_name),d(),Je(6,e.cast.adult?6:7)}}function F4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.placeholder,Ue)}}function N4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.url+e.crew.profile_path,Ue)}}function B4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.crew.job+" | "+e.crew.department)}}function z4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.crew.job+" | "+e.crew.department)}}function U4(i,t){if(i&1&&(p(0,"div",1)(1,"a",2),g(2,F4,1,1,"img",3)(3,N4,1,1),p(4,"div",4),_(5),h(),g(6,B4,2,1,"div",5)(7,z4,2,1),h()()),i&2){let e=m();d(),l("routerLink","/celebrities/"+e.crew.id),d(),Je(2,e.crew.profile_path?3:2),d(3),z(e.crew.original_name),d(),Je(6,e.crew.adult?6:7)}}var sa=(()=>{let t=class t{constructor(){this.url="http://image.tmdb.org/t/p/w154",this.placeholder="https://cdn.vectorstock.com/i/preview-1x/08/19/gray-photo-placeholder-icon-design-ui-vector-35850819.jpg"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-mini-celebrity-card"]],inputs:{allCast:"allCast",allCrew:"allCrew",cast:"cast",crew:"crew",routerLink:"routerLink"},standalone:!0,features:[R],decls:2,vars:1,consts:[["class","mini-celebrity-card"],[1,"mini-celebrity-card"],[3,"routerLink"],["alt","",3,"src"],[1,"title"],["class","character"],[1,"character"]],template:function(r,o){r&1&&g(0,L4,8,4,"div",0)(1,U4,8,4),r&2&&Je(0,o.cast&&!o.crew?0:!o.cast&&o.crew?1:-1)},dependencies:[Ve,et],styles:[".mini-celebrity-card[_ngcontent-%COMP%]{text-align:center;position:relative;display:inline-block}.mini-celebrity-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.mini-celebrity-card[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:var(--accent)}.mini-celebrity-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:128px;aspect-ratio:1/1;object-fit:cover;border-radius:50%}.mini-celebrity-card[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:0}.mini-celebrity-card[_ngcontent-%COMP%] .mybedge[_ngcontent-%COMP%]{position:absolute;top:0}.person[_ngcontent-%COMP%]{margin:10px 0;text-align:center;scroll-snap-align:center}.person[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:0 auto;width:150px;aspect-ratio:1/1;object-fit:cover;border-radius:50%}.person[_ngcontent-%COMP%] .adult[_ngcontent-%COMP%]{aspect-ratio:1/1;text-align:center;padding:4px 2px;margin-left:3px;font-size:.8em;background-color:red;color:#fff;border-radius:50%;font-weight:400}"]});let i=t;return i})();var ts={production:!0,TMDB_ACCESS_TOKEN:"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJjNmU5MzM1Yjg5Y2E3NWE3MGJjY2UxYzcyYmZkMDQ4ZCIsInN1YiI6IjYzYmVkN2FiODU4Njc4MDBmMDhjZjI3NiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.sQHes_rn51wewxY_7nZLxGssnd67J8ieiLOIo2Bg_FI",TMDB_BASE_URL:"https://api.themoviedb.org/3/",FIREBASE_API_KEY:"AIzaSyCtNek6BbEtj91x9V1h0iALz5aw0Ete6eM"};var VI=function(i){let t=[],e=0;for(let n=0;n>6|192,t[e++]=r&63|128):(r&64512)===55296&&n+1>18|240,t[e++]=r>>12&63|128,t[e++]=r>>6&63|128,t[e++]=r&63|128):(t[e++]=r>>12|224,t[e++]=r>>6&63|128,t[e++]=r&63|128)}return t},j4=function(i){let t=[],e=0,n=0;for(;e191&&r<224){let o=i[e++];t[n++]=String.fromCharCode((r&31)<<6|o&63)}else if(r>239&&r<365){let o=i[e++],s=i[e++],a=i[e++],c=((r&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;t[n++]=String.fromCharCode(55296+(c>>10)),t[n++]=String.fromCharCode(56320+(c&1023))}else{let o=i[e++],s=i[e++];t[n++]=String.fromCharCode((r&15)<<12|(o&63)<<6|s&63)}}return t.join("")},LI={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(i,t){if(!Array.isArray(i))throw Error("encodeByteArray takes an array as a parameter");this.init_();let e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r>2,v=(o&3)<<4|a>>4,b=(a&15)<<2|u>>6,O=u&63;c||(O=64,s||(b=64)),n.push(e[f],e[v],e[b],e[O])}return n.join("")},encodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(i):this.encodeByteArray(VI(i),t)},decodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(i):j4(this.decodeStringToByteArray(i,t))},decodeStringToByteArray(i,t){this.init_();let e=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r>4;if(n.push(b),u!==64){let O=a<<4&240|u>>2;if(n.push(O),v!==64){let V=u<<6&192|v;n.push(V)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let i=0;i=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)]=i,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)]=i)}}},tg=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},H4=function(i){let t=VI(i);return LI.encodeByteArray(t,!0)},rc=function(i){return H4(i).replace(/\./g,"")},ng=function(i){try{return LI.decodeString(i,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function G4(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var $4=()=>G4().__FIREBASE_DEFAULTS__,q4=()=>{if(typeof process>"u"||typeof process.env>"u")return;let i=process.env.__FIREBASE_DEFAULTS__;if(i)return JSON.parse(i)},W4=()=>{if(typeof document>"u")return;let i;try{i=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=i&&ng(i[1]);return t&&JSON.parse(t)},Hu=()=>{try{return $4()||q4()||W4()}catch(i){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${i}`);return}},rg=i=>{var t,e;return(e=(t=Hu())===null||t===void 0?void 0:t.emulatorHosts)===null||e===void 0?void 0:e[i]},Gu=i=>{let t=rg(i);if(!t)return;let e=t.lastIndexOf(":");if(e<=0||e+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);let n=parseInt(t.substring(e+1),10);return t[0]==="["?[t.substring(1,e-1),n]:[t.substring(0,e),n]},og=()=>{var i;return(i=Hu())===null||i===void 0?void 0:i.config},sg=i=>{var t;return(t=Hu())===null||t===void 0?void 0:t[`_${i}`]};var ju=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,n)=>{e?this.reject(e):this.resolve(n),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(e):t(e,n))}}};function $u(i,t){if(i.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let e={alg:"none",type:"JWT"},n=t||"demo-project",r=i.iat||0,o=i.sub||i.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},i);return[rc(JSON.stringify(e)),rc(JSON.stringify(s)),""].join(".")}function ri(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function FI(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ri())}function K4(){var i;let t=(i=Hu())===null||i===void 0?void 0:i.forceEnvironment;if(t==="node")return!0;if(t==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function NI(){let i=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof i=="object"&&i.id!==void 0}function BI(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function zI(){let i=ri();return i.indexOf("MSIE ")>=0||i.indexOf("Trident/")>=0}function UI(){return!K4()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function qu(){try{return typeof indexedDB=="object"}catch{return!1}}function jI(){return new Promise((i,t)=>{try{let e=!0,n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(n),i(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var o;t(((o=r.error)===null||o===void 0?void 0:o.message)||"")}}catch(e){t(e)}})}var Q4="FirebaseError",Zi=class i extends Error{constructor(t,e,n){super(e),this.code=t,this.customData=n,this.name=Q4,Object.setPrototypeOf(this,i.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Lr.prototype.create)}},Lr=class{constructor(t,e,n){this.service=t,this.serviceName=e,this.errors=n}create(t,...e){let n=e[0]||{},r=`${this.service}/${t}`,o=this.errors[t],s=o?Y4(o,n):"Error",a=`${this.serviceName}: ${s} (${r}).`;return new Zi(r,a,n)}};function Y4(i,t){return i.replace(Z4,(e,n)=>{let r=t[n];return r!=null?String(r):`<${n}?>`})}var Z4=/\{\$([^}]+)}/g;function HI(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t))return!1;return!0}function is(i,t){if(i===t)return!0;let e=Object.keys(i),n=Object.keys(t);for(let r of e){if(!n.includes(r))return!1;let o=i[r],s=t[r];if(RI(o)&&RI(s)){if(!is(o,s))return!1}else if(o!==s)return!1}for(let r of n)if(!e.includes(r))return!1;return!0}function RI(i){return i!==null&&typeof i=="object"}function oc(i){let t=[];for(let[e,n]of Object.entries(i))Array.isArray(n)?n.forEach(r=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function GI(i,t){let e=new ig(i,t);return e.subscribe.bind(e)}var ig=class{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(n=>{this.error(n)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,n){let r;if(t===void 0&&e===void 0&&n===void 0)throw new Error("Missing Observer.");X4(t,["next","error","complete"])?r=t:r={next:t,error:e,complete:n},r.next===void 0&&(r.next=eg),r.error===void 0&&(r.error=eg),r.complete===void 0&&(r.complete=eg);let o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),o}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e{if(this.observers!==void 0&&this.observers[t]!==void 0)try{e(this.observers[t])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function X4(i,t){if(typeof i!="object"||i===null)return!1;for(let e of t)if(e in i&&typeof i[e]=="function")return!0;return!1}function eg(){}var Ste=4*60*60*1e3;function Ai(i){return i&&i._delegate?i._delegate:i}var ln=class{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};var ns="[DEFAULT]";var ag=class{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let n=new ju;if(this.instancesDeferred.set(e,n),this.isInitialized(e)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:e});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let n=this.normalizeInstanceIdentifier(t?.identifier),r=(e=t?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(o){if(r)return null;throw o}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(eP(t))try{this.getOrInitializeService({instanceIdentifier:ns})}catch{}for(let[e,n]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let o=this.getOrInitializeService({instanceIdentifier:r});n.resolve(o)}catch{}}}}clearInstance(t=ns){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return D(this,null,function*(){let t=Array.from(this.instances.values());yield Promise.all([...t.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...t.filter(e=>"_delete"in e).map(e=>e._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=ns){return this.instances.has(t)}getOptions(t=ns){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,n=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:e});for(let[o,s]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(o);n===a&&s.resolve(r)}return r}onInit(t,e){var n;let r=this.normalizeInstanceIdentifier(e),o=(n=this.onInitCallbacks.get(r))!==null&&n!==void 0?n:new Set;o.add(t),this.onInitCallbacks.set(r,o);let s=this.instances.get(r);return s&&t(s,r),()=>{o.delete(t)}}invokeOnInitCallbacks(t,e){let n=this.onInitCallbacks.get(e);if(n)for(let r of n)try{r(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:J4(t),options:e}),this.instances.set(t,n),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch{}return n||null}normalizeInstanceIdentifier(t=ns){return this.component?this.component.multipleInstances?t:ns:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function J4(i){return i===ns?void 0:i}function eP(i){return i.instantiationMode==="EAGER"}var Wu=class{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new ag(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}};var tP=[],at=function(i){return i[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT",i}(at||{}),iP={debug:at.DEBUG,verbose:at.VERBOSE,info:at.INFO,warn:at.WARN,error:at.ERROR,silent:at.SILENT},nP=at.INFO,rP={[at.DEBUG]:"log",[at.VERBOSE]:"log",[at.INFO]:"info",[at.WARN]:"warn",[at.ERROR]:"error"},oP=(i,t,...e)=>{if(tt.some(e=>i instanceof e),$I,qI;function aP(){return $I||($I=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function lP(){return qI||(qI=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var WI=new WeakMap,cg=new WeakMap,KI=new WeakMap,lg=new WeakMap,ug=new WeakMap;function cP(i){let t=new Promise((e,n)=>{let r=()=>{i.removeEventListener("success",o),i.removeEventListener("error",s)},o=()=>{e(lr(i.result)),r()},s=()=>{n(i.error),r()};i.addEventListener("success",o),i.addEventListener("error",s)});return t.then(e=>{e instanceof IDBCursor&&WI.set(e,i)}).catch(()=>{}),ug.set(t,i),t}function dP(i){if(cg.has(i))return;let t=new Promise((e,n)=>{let r=()=>{i.removeEventListener("complete",o),i.removeEventListener("error",s),i.removeEventListener("abort",s)},o=()=>{e(),r()},s=()=>{n(i.error||new DOMException("AbortError","AbortError")),r()};i.addEventListener("complete",o),i.addEventListener("error",s),i.addEventListener("abort",s)});cg.set(i,t)}var dg={get(i,t,e){if(i instanceof IDBTransaction){if(t==="done")return cg.get(i);if(t==="objectStoreNames")return i.objectStoreNames||KI.get(i);if(t==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return lr(i[t])},set(i,t,e){return i[t]=e,!0},has(i,t){return i instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in i}};function QI(i){dg=i(dg)}function uP(i){return i===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...e){let n=i.call(Ku(this),t,...e);return KI.set(n,t.sort?t.sort():[t]),lr(n)}:lP().includes(i)?function(...t){return i.apply(Ku(this),t),lr(WI.get(this))}:function(...t){return lr(i.apply(Ku(this),t))}}function pP(i){return typeof i=="function"?uP(i):(i instanceof IDBTransaction&&dP(i),sP(i,aP())?new Proxy(i,dg):i)}function lr(i){if(i instanceof IDBRequest)return cP(i);if(lg.has(i))return lg.get(i);let t=pP(i);return t!==i&&(lg.set(i,t),ug.set(t,i)),t}var Ku=i=>ug.get(i);function ZI(i,t,{blocked:e,upgrade:n,blocking:r,terminated:o}={}){let s=indexedDB.open(i,t),a=lr(s);return n&&s.addEventListener("upgradeneeded",c=>{n(lr(s.result),c.oldVersion,c.newVersion,lr(s.transaction),c)}),e&&s.addEventListener("blocked",c=>e(c.oldVersion,c.newVersion,c)),a.then(c=>{o&&c.addEventListener("close",()=>o()),r&&c.addEventListener("versionchange",u=>r(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}var hP=["get","getKey","getAll","getAllKeys","count"],mP=["put","add","delete","clear"],pg=new Map;function YI(i,t){if(!(i instanceof IDBDatabase&&!(t in i)&&typeof t=="string"))return;if(pg.get(t))return pg.get(t);let e=t.replace(/FromIndex$/,""),n=t!==e,r=mP.includes(e);if(!(e in(n?IDBIndex:IDBObjectStore).prototype)||!(r||hP.includes(e)))return;let o=function(s,...a){return D(this,null,function*(){let c=this.transaction(s,r?"readwrite":"readonly"),u=c.store;return n&&(u=u.index(a.shift())),(yield Promise.all([u[e](...a),r&&c.done]))[0]})};return pg.set(t,o),o}QI(i=>pe(F({},i),{get:(t,e,n)=>YI(t,e)||i.get(t,e,n),has:(t,e)=>!!YI(t,e)||i.has(t,e)}));var mg=class{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(fP(e)){let n=e.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(e=>e).join(" ")}};function fP(i){let t=i.getComponent();return t?.type==="VERSION"}var fg="@firebase/app",XI="0.9.27";var rs=new yo("@firebase/app"),gP="@firebase/app-compat",_P="@firebase/analytics-compat",vP="@firebase/analytics",yP="@firebase/app-check-compat",bP="@firebase/app-check",CP="@firebase/auth",IP="@firebase/auth-compat",wP="@firebase/database",TP="@firebase/database-compat",xP="@firebase/functions",SP="@firebase/functions-compat",EP="@firebase/installations",OP="@firebase/installations-compat",MP="@firebase/messaging",kP="@firebase/messaging-compat",AP="@firebase/performance",DP="@firebase/performance-compat",PP="@firebase/remote-config",RP="@firebase/remote-config-compat",VP="@firebase/storage",LP="@firebase/storage-compat",FP="@firebase/firestore",NP="@firebase/firestore-compat",BP="firebase",zP="10.8.0";var gg="[DEFAULT]",UP={[fg]:"fire-core",[gP]:"fire-core-compat",[vP]:"fire-analytics",[_P]:"fire-analytics-compat",[bP]:"fire-app-check",[yP]:"fire-app-check-compat",[CP]:"fire-auth",[IP]:"fire-auth-compat",[wP]:"fire-rtdb",[TP]:"fire-rtdb-compat",[xP]:"fire-fn",[SP]:"fire-fn-compat",[EP]:"fire-iid",[OP]:"fire-iid-compat",[MP]:"fire-fcm",[kP]:"fire-fcm-compat",[AP]:"fire-perf",[DP]:"fire-perf-compat",[PP]:"fire-rc",[RP]:"fire-rc-compat",[VP]:"fire-gcs",[LP]:"fire-gcs-compat",[FP]:"fire-fst",[NP]:"fire-fst-compat","fire-js":"fire-js",[BP]:"fire-js-all"};var sc=new Map,_g=new Map;function jP(i,t){try{i.container.addComponent(t)}catch(e){rs.debug(`Component ${t.name} failed to register with FirebaseApp ${i.name}`,e)}}function cr(i){let t=i.name;if(_g.has(t))return rs.debug(`There were multiple attempts to register component ${t}.`),!1;_g.set(t,i);for(let e of sc.values())jP(e,i);return!0}function os(i,t){let e=i.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),i.container.getProvider(t)}var HP={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},bo=new Lr("app","Firebase",HP);var vg=class{constructor(t,e,n){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new ln("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw bo.create("app-deleted",{appName:this._name})}};var dr=zP;function Cg(i,t={}){let e=i;typeof t!="object"&&(t={name:t});let n=Object.assign({name:gg,automaticDataCollectionEnabled:!1},t),r=n.name;if(typeof r!="string"||!r)throw bo.create("bad-app-name",{appName:String(r)});if(e||(e=og()),!e)throw bo.create("no-options");let o=sc.get(r);if(o){if(is(e,o.options)&&is(n,o.config))return o;throw bo.create("duplicate-app",{appName:r})}let s=new Wu(r);for(let c of _g.values())s.addComponent(c);let a=new vg(e,n,s);return sc.set(r,a),a}function Co(i=gg){let t=sc.get(i);if(!t&&i===gg&&og())return Cg();if(!t)throw bo.create("no-app",{appName:i});return t}function Qu(){return Array.from(sc.values())}function Wt(i,t,e){var n;let r=(n=UP[i])!==null&&n!==void 0?n:i;e&&(r+=`-${e}`);let o=r.match(/\s|\//),s=t.match(/\s|\//);if(o||s){let a=[`Unable to register library "${r}" with version "${t}":`];o&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),rs.warn(a.join(" "));return}cr(new ln(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}var GP="firebase-heartbeat-database",$P=1,ac="firebase-heartbeat-store",hg=null;function iw(){return hg||(hg=ZI(GP,$P,{upgrade:(i,t)=>{switch(t){case 0:try{i.createObjectStore(ac)}catch(e){console.warn(e)}}}}).catch(i=>{throw bo.create("idb-open",{originalErrorMessage:i.message})})),hg}function qP(i){return D(this,null,function*(){try{let e=(yield iw()).transaction(ac),n=yield e.objectStore(ac).get(nw(i));return yield e.done,n}catch(t){if(t instanceof Zi)rs.warn(t.message);else{let e=bo.create("idb-get",{originalErrorMessage:t?.message});rs.warn(e.message)}}})}function JI(i,t){return D(this,null,function*(){try{let n=(yield iw()).transaction(ac,"readwrite");yield n.objectStore(ac).put(t,nw(i)),yield n.done}catch(e){if(e instanceof Zi)rs.warn(e.message);else{let n=bo.create("idb-set",{originalErrorMessage:e?.message});rs.warn(n.message)}}})}function nw(i){return`${i.name}!${i.options.appId}`}var WP=1024,KP=30*24*60*60*1e3,yg=class{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new bg(e),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){return D(this,null,function*(){var t,e;let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=ew();if(!(((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===o||this._heartbeatsCache.heartbeats.some(s=>s.date===o)))return this._heartbeatsCache.heartbeats.push({date:o,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{let a=new Date(s.date).valueOf();return Date.now()-a<=KP}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return D(this,null,function*(){var t;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=ew(),{heartbeatsToSend:n,unsentEntries:r}=QP(this._heartbeatsCache.heartbeats),o=rc(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o})}};function ew(){return new Date().toISOString().substring(0,10)}function QP(i,t=WP){let e=[],n=i.slice();for(let r of i){let o=e.find(s=>s.agent===r.agent);if(o){if(o.dates.push(r.date),tw(e)>t){o.dates.pop();break}}else if(e.push({agent:r.agent,dates:[r.date]}),tw(e)>t){e.pop();break}n=n.slice(1)}return{heartbeatsToSend:e,unsentEntries:n}}var bg=class{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return D(this,null,function*(){return qu()?jI().then(()=>!0).catch(()=>!1):!1})}read(){return D(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield qP(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return D(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return JI(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return D(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return JI(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return})}};function tw(i){return rc(JSON.stringify({version:2,heartbeats:i})).length}function YP(i){cr(new ln("platform-logger",t=>new mg(t),"PRIVATE")),cr(new ln("heartbeat",t=>new yg(t),"PRIVATE")),Wt(fg,XI,i),Wt(fg,XI,"esm2017"),Wt("fire-js","")}YP("");var ZP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Un={},de,Hg=Hg||{},$e=ZP||self;function cp(i){var t=typeof i;return t=t!="object"?t:i?Array.isArray(i)?"array":t:"null",t=="array"||t=="object"&&typeof i.length=="number"}function Cc(i){var t=typeof i;return t=="object"&&i!=null||t=="function"}function XP(i){return Object.prototype.hasOwnProperty.call(i,Ig)&&i[Ig]||(i[Ig]=++JP)}var Ig="closure_uid_"+(1e9*Math.random()>>>0),JP=0;function eR(i,t,e){return i.call.apply(i.bind,arguments)}function tR(i,t,e){if(!i)throw Error();if(2{};$e.addEventListener("test",e,t),$e.removeEventListener("test",e,t)}catch{}return i}();function hc(i){return/^[\s\xa0]*$/.test(i)}function dp(){var i=$e.navigator;return i&&(i=i.userAgent)?i:""}function ur(i){return dp().indexOf(i)!=-1}function $g(i){return $g[" "](i),i}$g[" "]=function(){};function rR(i,t){var e=qR;return Object.prototype.hasOwnProperty.call(e,i)?e[i]:e[i]=t(i)}var oR=ur("Opera"),da=ur("Trident")||ur("MSIE"),_w=ur("Edge"),Eg=_w||da,vw=ur("Gecko")&&!(dp().toLowerCase().indexOf("webkit")!=-1&&!ur("Edge"))&&!(ur("Trident")||ur("MSIE"))&&!ur("Edge"),sR=dp().toLowerCase().indexOf("webkit")!=-1&&!ur("Edge");function yw(){var i=$e.document;return i?i.documentMode:void 0}var Og;e:{if(Zu="",Xu=function(){var i=dp();if(vw)return/rv:([^\);]+)(\)|;)/.exec(i);if(_w)return/Edge\/([\d\.]+)/.exec(i);if(da)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(i);if(sR)return/WebKit\/(\S+)/.exec(i);if(oR)return/(?:Version)[ \/]?(\S+)/.exec(i)}(),Xu&&(Zu=Xu?Xu[1]:""),da&&(Ju=yw(),Ju!=null&&Ju>parseFloat(Zu))){Og=String(Ju);break e}Og=Zu}var Zu,Xu,Ju,Mg;$e.document&&da?(wg=yw(),Mg=wg||parseInt(Og,10)||void 0):Mg=void 0;var wg,aR=Mg;function mc(i,t){if(Hi.call(this,i?i.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,i){var e=this.type=i.type,n=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:null;if(this.target=i.target||i.srcElement,this.g=t,t=i.relatedTarget){if(vw){e:{try{$g(t.nodeName);var r=!0;break e}catch{}r=!1}r||(t=null)}}else e=="mouseover"?t=i.fromElement:e=="mouseout"&&(t=i.toElement);this.relatedTarget=t,n?(this.clientX=n.clientX!==void 0?n.clientX:n.pageX,this.clientY=n.clientY!==void 0?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0):(this.clientX=i.clientX!==void 0?i.clientX:i.pageX,this.clientY=i.clientY!==void 0?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0),this.button=i.button,this.key=i.key||"",this.ctrlKey=i.ctrlKey,this.altKey=i.altKey,this.shiftKey=i.shiftKey,this.metaKey=i.metaKey,this.pointerId=i.pointerId||0,this.pointerType=typeof i.pointerType=="string"?i.pointerType:lR[i.pointerType]||"",this.state=i.state,this.i=i,i.defaultPrevented&&mc.$.h.call(this)}}xi(mc,Hi);var lR={2:"touch",3:"pen",4:"mouse"};mc.prototype.h=function(){mc.$.h.call(this);var i=this.i;i.preventDefault?i.preventDefault():i.returnValue=!1};var Ic="closure_listenable_"+(1e6*Math.random()|0),cR=0;function dR(i,t,e,n,r){this.listener=i,this.proxy=null,this.src=t,this.type=e,this.capture=!!n,this.la=r,this.key=++cR,this.fa=this.ia=!1}function up(i){i.fa=!0,i.listener=null,i.proxy=null,i.src=null,i.la=null}function qg(i,t,e){for(let n in i)t.call(e,i[n],n,i)}function uR(i,t){for(let e in i)t.call(void 0,i[e],e,i)}function bw(i){let t={};for(let e in i)t[e]=i[e];return t}var ow="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Cw(i,t){let e,n;for(let r=1;r>>0);function Yg(i){return typeof i=="function"?i:(i[xg]||(i[xg]=function(t){return i.handleEvent(t)}),i[xg])}function Ti(){Io.call(this),this.i=new pp(this),this.S=this,this.J=null}xi(Ti,Io);Ti.prototype[Ic]=!0;Ti.prototype.removeEventListener=function(i,t,e,n){xw(this,i,t,e,n)};function Pi(i,t){var e,n=i.J;if(n)for(e=[];n;n=n.J)e.push(n);if(i=i.S,n=t.type||t,typeof t=="string")t=new Hi(t,i);else if(t instanceof Hi)t.target=t.target||i;else{var r=t;t=new Hi(n,i),Cw(t,r)}if(r=!0,e)for(var o=e.length-1;0<=o;o--){var s=t.g=e[o];r=ep(s,n,!0,t)&&r}if(s=t.g=i,r=ep(s,n,!0,t)&&r,r=ep(s,n,!1,t)&&r,e)for(o=0;onew Rg,i=>i.reset()),Rg=class{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}};function fR(i){var t=1;i=i.split(":");let e=[];for(;0{throw i},0)}var fc,gc=!1,Xg=new Pg,Ow=()=>{let i=$e.Promise.resolve(void 0);fc=()=>{i.then(_R)}},_R=()=>{for(var i;i=mR();){try{i.h.call(i.g)}catch(e){gR(e)}var t=Ew;t.j(i),100>t.h&&(t.h++,i.next=t.g,t.g=i)}gc=!1};function hp(i,t){Ti.call(this),this.h=i||1,this.g=t||$e,this.j=ji(this.qb,this),this.l=Date.now()}xi(hp,Ti);de=hp.prototype;de.ga=!1;de.T=null;de.qb=function(){if(this.ga){var i=Date.now()-this.l;0{i.g=null,i.i&&(i.i=!1,Mw(i))},i.j);let t=i.h;i.h=null,i.m.apply(null,t)}var Vg=class extends Io{constructor(t,e){super(),this.m=t,this.j=e,this.h=null,this.i=!1,this.g=null}l(t){this.h=arguments,this.g?this.i=!0:Mw(this)}N(){super.N(),this.g&&($e.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}};function _c(i){Io.call(this),this.h=i,this.g={}}xi(_c,Io);var sw=[];function kw(i,t,e,n){Array.isArray(e)||(e&&(sw[0]=e.toString()),e=sw);for(var r=0;r{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,_n,nc,Ui,ic,pt,Te]})}return i})();var PI=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,_n,nc,Ui,ic,pt]})}return i})();function D4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.placeholder,qe)}}function P4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.url+e.cast.profile_path,qe)}}function R4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.cast.character)}}function V4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.cast.character)}}function L4(i,t){if(i&1&&(p(0,"div",1)(1,"a",2),g(2,D4,1,1,"img",3)(3,P4,1,1),p(4,"div",4),_(5),h(),g(6,R4,2,1,"div",5)(7,V4,2,1),h()()),i&2){let e=m();d(),l("routerLink","/celebrities/"+e.cast.id),d(),Je(2,e.cast.profile_path?3:2),d(3),z(e.cast.original_name),d(),Je(6,e.cast.adult?6:7)}}function F4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.placeholder,qe)}}function N4(i,t){if(i&1&&y(0,"img",3),i&2){let e=m(2);l("src",e.url+e.crew.profile_path,qe)}}function B4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.crew.job+" | "+e.crew.department)}}function z4(i,t){if(i&1&&(p(0,"div",6),_(1),h()),i&2){let e=m(2);d(),z(e.crew.job+" | "+e.crew.department)}}function U4(i,t){if(i&1&&(p(0,"div",1)(1,"a",2),g(2,F4,1,1,"img",3)(3,N4,1,1),p(4,"div",4),_(5),h(),g(6,B4,2,1,"div",5)(7,z4,2,1),h()()),i&2){let e=m();d(),l("routerLink","/celebrities/"+e.crew.id),d(),Je(2,e.crew.profile_path?3:2),d(3),z(e.crew.original_name),d(),Je(6,e.crew.adult?6:7)}}var sa=(()=>{let t=class t{constructor(){this.url="http://image.tmdb.org/t/p/w154",this.placeholder="https://cdn.vectorstock.com/i/preview-1x/08/19/gray-photo-placeholder-icon-design-ui-vector-35850819.jpg"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-mini-celebrity-card"]],inputs:{allCast:"allCast",allCrew:"allCrew",cast:"cast",crew:"crew",routerLink:"routerLink"},standalone:!0,features:[R],decls:2,vars:1,consts:[["class","mini-celebrity-card"],[1,"mini-celebrity-card"],[3,"routerLink"],["alt","",3,"src"],[1,"title"],["class","character"],[1,"character"]],template:function(r,o){r&1&&g(0,L4,8,4,"div",0)(1,U4,8,4),r&2&&Je(0,o.cast&&!o.crew?0:!o.cast&&o.crew?1:-1)},dependencies:[Ve,et],styles:[".mini-celebrity-card[_ngcontent-%COMP%]{text-align:center;position:relative;display:inline-block}.mini-celebrity-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.mini-celebrity-card[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:var(--accent)}.mini-celebrity-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:128px;aspect-ratio:1/1;object-fit:cover;border-radius:50%}.mini-celebrity-card[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .mini-celebrity-card[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:0}.mini-celebrity-card[_ngcontent-%COMP%] .mybedge[_ngcontent-%COMP%]{position:absolute;top:0}.person[_ngcontent-%COMP%]{margin:10px 0;text-align:center;scroll-snap-align:center}.person[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:0 auto;width:150px;aspect-ratio:1/1;object-fit:cover;border-radius:50%}.person[_ngcontent-%COMP%] .adult[_ngcontent-%COMP%]{aspect-ratio:1/1;text-align:center;padding:4px 2px;margin-left:3px;font-size:.8em;background-color:red;color:#fff;border-radius:50%;font-weight:400}"]});let i=t;return i})();var ts={production:!0,TMDB_ACCESS_TOKEN:"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJjNmU5MzM1Yjg5Y2E3NWE3MGJjY2UxYzcyYmZkMDQ4ZCIsInN1YiI6IjYzYmVkN2FiODU4Njc4MDBmMDhjZjI3NiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.sQHes_rn51wewxY_7nZLxGssnd67J8ieiLOIo2Bg_FI",TMDB_BASE_URL:"https://api.themoviedb.org/3/",FIREBASE_API_KEY:"AIzaSyCtNek6BbEtj91x9V1h0iALz5aw0Ete6eM"};var VI=function(i){let t=[],e=0;for(let n=0;n>6|192,t[e++]=r&63|128):(r&64512)===55296&&n+1>18|240,t[e++]=r>>12&63|128,t[e++]=r>>6&63|128,t[e++]=r&63|128):(t[e++]=r>>12|224,t[e++]=r>>6&63|128,t[e++]=r&63|128)}return t},j4=function(i){let t=[],e=0,n=0;for(;e191&&r<224){let o=i[e++];t[n++]=String.fromCharCode((r&31)<<6|o&63)}else if(r>239&&r<365){let o=i[e++],s=i[e++],a=i[e++],c=((r&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;t[n++]=String.fromCharCode(55296+(c>>10)),t[n++]=String.fromCharCode(56320+(c&1023))}else{let o=i[e++],s=i[e++];t[n++]=String.fromCharCode((r&15)<<12|(o&63)<<6|s&63)}}return t.join("")},LI={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(i,t){if(!Array.isArray(i))throw Error("encodeByteArray takes an array as a parameter");this.init_();let e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r>2,v=(o&3)<<4|a>>4,b=(a&15)<<2|u>>6,O=u&63;c||(O=64,s||(b=64)),n.push(e[f],e[v],e[b],e[O])}return n.join("")},encodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(i):this.encodeByteArray(VI(i),t)},decodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(i):j4(this.decodeStringToByteArray(i,t))},decodeStringToByteArray(i,t){this.init_();let e=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r>4;if(n.push(b),u!==64){let O=a<<4&240|u>>2;if(n.push(O),v!==64){let V=u<<6&192|v;n.push(V)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let i=0;i=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)]=i,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)]=i)}}},tg=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},H4=function(i){let t=VI(i);return LI.encodeByteArray(t,!0)},rc=function(i){return H4(i).replace(/\./g,"")},ng=function(i){try{return LI.decodeString(i,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function G4(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var $4=()=>G4().__FIREBASE_DEFAULTS__,q4=()=>{if(typeof process>"u"||typeof process.env>"u")return;let i=process.env.__FIREBASE_DEFAULTS__;if(i)return JSON.parse(i)},W4=()=>{if(typeof document>"u")return;let i;try{i=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=i&&ng(i[1]);return t&&JSON.parse(t)},Hu=()=>{try{return $4()||q4()||W4()}catch(i){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${i}`);return}},rg=i=>{var t,e;return(e=(t=Hu())===null||t===void 0?void 0:t.emulatorHosts)===null||e===void 0?void 0:e[i]},Gu=i=>{let t=rg(i);if(!t)return;let e=t.lastIndexOf(":");if(e<=0||e+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);let n=parseInt(t.substring(e+1),10);return t[0]==="["?[t.substring(1,e-1),n]:[t.substring(0,e),n]},og=()=>{var i;return(i=Hu())===null||i===void 0?void 0:i.config},sg=i=>{var t;return(t=Hu())===null||t===void 0?void 0:t[`_${i}`]};var ju=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,n)=>{e?this.reject(e):this.resolve(n),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(e):t(e,n))}}};function $u(i,t){if(i.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let e={alg:"none",type:"JWT"},n=t||"demo-project",r=i.iat||0,o=i.sub||i.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},i);return[rc(JSON.stringify(e)),rc(JSON.stringify(s)),""].join(".")}function ri(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function FI(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ri())}function K4(){var i;let t=(i=Hu())===null||i===void 0?void 0:i.forceEnvironment;if(t==="node")return!0;if(t==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function NI(){let i=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof i=="object"&&i.id!==void 0}function BI(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function zI(){let i=ri();return i.indexOf("MSIE ")>=0||i.indexOf("Trident/")>=0}function UI(){return!K4()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function qu(){try{return typeof indexedDB=="object"}catch{return!1}}function jI(){return new Promise((i,t)=>{try{let e=!0,n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(n),i(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var o;t(((o=r.error)===null||o===void 0?void 0:o.message)||"")}}catch(e){t(e)}})}var Q4="FirebaseError",Zi=class i extends Error{constructor(t,e,n){super(e),this.code=t,this.customData=n,this.name=Q4,Object.setPrototypeOf(this,i.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Lr.prototype.create)}},Lr=class{constructor(t,e,n){this.service=t,this.serviceName=e,this.errors=n}create(t,...e){let n=e[0]||{},r=`${this.service}/${t}`,o=this.errors[t],s=o?Y4(o,n):"Error",a=`${this.serviceName}: ${s} (${r}).`;return new Zi(r,a,n)}};function Y4(i,t){return i.replace(Z4,(e,n)=>{let r=t[n];return r!=null?String(r):`<${n}?>`})}var Z4=/\{\$([^}]+)}/g;function HI(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t))return!1;return!0}function is(i,t){if(i===t)return!0;let e=Object.keys(i),n=Object.keys(t);for(let r of e){if(!n.includes(r))return!1;let o=i[r],s=t[r];if(RI(o)&&RI(s)){if(!is(o,s))return!1}else if(o!==s)return!1}for(let r of n)if(!e.includes(r))return!1;return!0}function RI(i){return i!==null&&typeof i=="object"}function oc(i){let t=[];for(let[e,n]of Object.entries(i))Array.isArray(n)?n.forEach(r=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function GI(i,t){let e=new ig(i,t);return e.subscribe.bind(e)}var ig=class{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(n=>{this.error(n)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,n){let r;if(t===void 0&&e===void 0&&n===void 0)throw new Error("Missing Observer.");X4(t,["next","error","complete"])?r=t:r={next:t,error:e,complete:n},r.next===void 0&&(r.next=eg),r.error===void 0&&(r.error=eg),r.complete===void 0&&(r.complete=eg);let o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),o}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e{if(this.observers!==void 0&&this.observers[t]!==void 0)try{e(this.observers[t])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function X4(i,t){if(typeof i!="object"||i===null)return!1;for(let e of t)if(e in i&&typeof i[e]=="function")return!0;return!1}function eg(){}var Ste=4*60*60*1e3;function Ai(i){return i&&i._delegate?i._delegate:i}var ln=class{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};var ns="[DEFAULT]";var ag=class{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let n=new ju;if(this.instancesDeferred.set(e,n),this.isInitialized(e)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:e});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let n=this.normalizeInstanceIdentifier(t?.identifier),r=(e=t?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(o){if(r)return null;throw o}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(eP(t))try{this.getOrInitializeService({instanceIdentifier:ns})}catch{}for(let[e,n]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let o=this.getOrInitializeService({instanceIdentifier:r});n.resolve(o)}catch{}}}}clearInstance(t=ns){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return D(this,null,function*(){let t=Array.from(this.instances.values());yield Promise.all([...t.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...t.filter(e=>"_delete"in e).map(e=>e._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=ns){return this.instances.has(t)}getOptions(t=ns){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,n=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:e});for(let[o,s]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(o);n===a&&s.resolve(r)}return r}onInit(t,e){var n;let r=this.normalizeInstanceIdentifier(e),o=(n=this.onInitCallbacks.get(r))!==null&&n!==void 0?n:new Set;o.add(t),this.onInitCallbacks.set(r,o);let s=this.instances.get(r);return s&&t(s,r),()=>{o.delete(t)}}invokeOnInitCallbacks(t,e){let n=this.onInitCallbacks.get(e);if(n)for(let r of n)try{r(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:J4(t),options:e}),this.instances.set(t,n),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch{}return n||null}normalizeInstanceIdentifier(t=ns){return this.component?this.component.multipleInstances?t:ns:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function J4(i){return i===ns?void 0:i}function eP(i){return i.instantiationMode==="EAGER"}var Wu=class{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new ag(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}};var tP=[],at=function(i){return i[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT",i}(at||{}),iP={debug:at.DEBUG,verbose:at.VERBOSE,info:at.INFO,warn:at.WARN,error:at.ERROR,silent:at.SILENT},nP=at.INFO,rP={[at.DEBUG]:"log",[at.VERBOSE]:"log",[at.INFO]:"info",[at.WARN]:"warn",[at.ERROR]:"error"},oP=(i,t,...e)=>{if(tt.some(e=>i instanceof e),$I,qI;function aP(){return $I||($I=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function lP(){return qI||(qI=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var WI=new WeakMap,cg=new WeakMap,KI=new WeakMap,lg=new WeakMap,ug=new WeakMap;function cP(i){let t=new Promise((e,n)=>{let r=()=>{i.removeEventListener("success",o),i.removeEventListener("error",s)},o=()=>{e(cr(i.result)),r()},s=()=>{n(i.error),r()};i.addEventListener("success",o),i.addEventListener("error",s)});return t.then(e=>{e instanceof IDBCursor&&WI.set(e,i)}).catch(()=>{}),ug.set(t,i),t}function dP(i){if(cg.has(i))return;let t=new Promise((e,n)=>{let r=()=>{i.removeEventListener("complete",o),i.removeEventListener("error",s),i.removeEventListener("abort",s)},o=()=>{e(),r()},s=()=>{n(i.error||new DOMException("AbortError","AbortError")),r()};i.addEventListener("complete",o),i.addEventListener("error",s),i.addEventListener("abort",s)});cg.set(i,t)}var dg={get(i,t,e){if(i instanceof IDBTransaction){if(t==="done")return cg.get(i);if(t==="objectStoreNames")return i.objectStoreNames||KI.get(i);if(t==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return cr(i[t])},set(i,t,e){return i[t]=e,!0},has(i,t){return i instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in i}};function QI(i){dg=i(dg)}function uP(i){return i===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...e){let n=i.call(Ku(this),t,...e);return KI.set(n,t.sort?t.sort():[t]),cr(n)}:lP().includes(i)?function(...t){return i.apply(Ku(this),t),cr(WI.get(this))}:function(...t){return cr(i.apply(Ku(this),t))}}function pP(i){return typeof i=="function"?uP(i):(i instanceof IDBTransaction&&dP(i),sP(i,aP())?new Proxy(i,dg):i)}function cr(i){if(i instanceof IDBRequest)return cP(i);if(lg.has(i))return lg.get(i);let t=pP(i);return t!==i&&(lg.set(i,t),ug.set(t,i)),t}var Ku=i=>ug.get(i);function ZI(i,t,{blocked:e,upgrade:n,blocking:r,terminated:o}={}){let s=indexedDB.open(i,t),a=cr(s);return n&&s.addEventListener("upgradeneeded",c=>{n(cr(s.result),c.oldVersion,c.newVersion,cr(s.transaction),c)}),e&&s.addEventListener("blocked",c=>e(c.oldVersion,c.newVersion,c)),a.then(c=>{o&&c.addEventListener("close",()=>o()),r&&c.addEventListener("versionchange",u=>r(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}var hP=["get","getKey","getAll","getAllKeys","count"],mP=["put","add","delete","clear"],pg=new Map;function YI(i,t){if(!(i instanceof IDBDatabase&&!(t in i)&&typeof t=="string"))return;if(pg.get(t))return pg.get(t);let e=t.replace(/FromIndex$/,""),n=t!==e,r=mP.includes(e);if(!(e in(n?IDBIndex:IDBObjectStore).prototype)||!(r||hP.includes(e)))return;let o=function(s,...a){return D(this,null,function*(){let c=this.transaction(s,r?"readwrite":"readonly"),u=c.store;return n&&(u=u.index(a.shift())),(yield Promise.all([u[e](...a),r&&c.done]))[0]})};return pg.set(t,o),o}QI(i=>pe(F({},i),{get:(t,e,n)=>YI(t,e)||i.get(t,e,n),has:(t,e)=>!!YI(t,e)||i.has(t,e)}));var mg=class{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(fP(e)){let n=e.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(e=>e).join(" ")}};function fP(i){let t=i.getComponent();return t?.type==="VERSION"}var fg="@firebase/app",XI="0.9.27";var rs=new yo("@firebase/app"),gP="@firebase/app-compat",_P="@firebase/analytics-compat",vP="@firebase/analytics",yP="@firebase/app-check-compat",bP="@firebase/app-check",CP="@firebase/auth",IP="@firebase/auth-compat",wP="@firebase/database",TP="@firebase/database-compat",xP="@firebase/functions",SP="@firebase/functions-compat",EP="@firebase/installations",OP="@firebase/installations-compat",MP="@firebase/messaging",kP="@firebase/messaging-compat",AP="@firebase/performance",DP="@firebase/performance-compat",PP="@firebase/remote-config",RP="@firebase/remote-config-compat",VP="@firebase/storage",LP="@firebase/storage-compat",FP="@firebase/firestore",NP="@firebase/firestore-compat",BP="firebase",zP="10.8.0";var gg="[DEFAULT]",UP={[fg]:"fire-core",[gP]:"fire-core-compat",[vP]:"fire-analytics",[_P]:"fire-analytics-compat",[bP]:"fire-app-check",[yP]:"fire-app-check-compat",[CP]:"fire-auth",[IP]:"fire-auth-compat",[wP]:"fire-rtdb",[TP]:"fire-rtdb-compat",[xP]:"fire-fn",[SP]:"fire-fn-compat",[EP]:"fire-iid",[OP]:"fire-iid-compat",[MP]:"fire-fcm",[kP]:"fire-fcm-compat",[AP]:"fire-perf",[DP]:"fire-perf-compat",[PP]:"fire-rc",[RP]:"fire-rc-compat",[VP]:"fire-gcs",[LP]:"fire-gcs-compat",[FP]:"fire-fst",[NP]:"fire-fst-compat","fire-js":"fire-js",[BP]:"fire-js-all"};var sc=new Map,_g=new Map;function jP(i,t){try{i.container.addComponent(t)}catch(e){rs.debug(`Component ${t.name} failed to register with FirebaseApp ${i.name}`,e)}}function dr(i){let t=i.name;if(_g.has(t))return rs.debug(`There were multiple attempts to register component ${t}.`),!1;_g.set(t,i);for(let e of sc.values())jP(e,i);return!0}function os(i,t){let e=i.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),i.container.getProvider(t)}var HP={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},bo=new Lr("app","Firebase",HP);var vg=class{constructor(t,e,n){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new ln("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw bo.create("app-deleted",{appName:this._name})}};var ur=zP;function Cg(i,t={}){let e=i;typeof t!="object"&&(t={name:t});let n=Object.assign({name:gg,automaticDataCollectionEnabled:!1},t),r=n.name;if(typeof r!="string"||!r)throw bo.create("bad-app-name",{appName:String(r)});if(e||(e=og()),!e)throw bo.create("no-options");let o=sc.get(r);if(o){if(is(e,o.options)&&is(n,o.config))return o;throw bo.create("duplicate-app",{appName:r})}let s=new Wu(r);for(let c of _g.values())s.addComponent(c);let a=new vg(e,n,s);return sc.set(r,a),a}function Co(i=gg){let t=sc.get(i);if(!t&&i===gg&&og())return Cg();if(!t)throw bo.create("no-app",{appName:i});return t}function Qu(){return Array.from(sc.values())}function Wt(i,t,e){var n;let r=(n=UP[i])!==null&&n!==void 0?n:i;e&&(r+=`-${e}`);let o=r.match(/\s|\//),s=t.match(/\s|\//);if(o||s){let a=[`Unable to register library "${r}" with version "${t}":`];o&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),rs.warn(a.join(" "));return}dr(new ln(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}var GP="firebase-heartbeat-database",$P=1,ac="firebase-heartbeat-store",hg=null;function iw(){return hg||(hg=ZI(GP,$P,{upgrade:(i,t)=>{switch(t){case 0:try{i.createObjectStore(ac)}catch(e){console.warn(e)}}}}).catch(i=>{throw bo.create("idb-open",{originalErrorMessage:i.message})})),hg}function qP(i){return D(this,null,function*(){try{let e=(yield iw()).transaction(ac),n=yield e.objectStore(ac).get(nw(i));return yield e.done,n}catch(t){if(t instanceof Zi)rs.warn(t.message);else{let e=bo.create("idb-get",{originalErrorMessage:t?.message});rs.warn(e.message)}}})}function JI(i,t){return D(this,null,function*(){try{let n=(yield iw()).transaction(ac,"readwrite");yield n.objectStore(ac).put(t,nw(i)),yield n.done}catch(e){if(e instanceof Zi)rs.warn(e.message);else{let n=bo.create("idb-set",{originalErrorMessage:e?.message});rs.warn(n.message)}}})}function nw(i){return`${i.name}!${i.options.appId}`}var WP=1024,KP=30*24*60*60*1e3,yg=class{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new bg(e),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){return D(this,null,function*(){var t,e;let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=ew();if(!(((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===o||this._heartbeatsCache.heartbeats.some(s=>s.date===o)))return this._heartbeatsCache.heartbeats.push({date:o,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{let a=new Date(s.date).valueOf();return Date.now()-a<=KP}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return D(this,null,function*(){var t;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=ew(),{heartbeatsToSend:n,unsentEntries:r}=QP(this._heartbeatsCache.heartbeats),o=rc(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o})}};function ew(){return new Date().toISOString().substring(0,10)}function QP(i,t=WP){let e=[],n=i.slice();for(let r of i){let o=e.find(s=>s.agent===r.agent);if(o){if(o.dates.push(r.date),tw(e)>t){o.dates.pop();break}}else if(e.push({agent:r.agent,dates:[r.date]}),tw(e)>t){e.pop();break}n=n.slice(1)}return{heartbeatsToSend:e,unsentEntries:n}}var bg=class{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return D(this,null,function*(){return qu()?jI().then(()=>!0).catch(()=>!1):!1})}read(){return D(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield qP(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return D(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return JI(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return D(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return JI(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return})}};function tw(i){return rc(JSON.stringify({version:2,heartbeats:i})).length}function YP(i){dr(new ln("platform-logger",t=>new mg(t),"PRIVATE")),dr(new ln("heartbeat",t=>new yg(t),"PRIVATE")),Wt(fg,XI,i),Wt(fg,XI,"esm2017"),Wt("fire-js","")}YP("");var ZP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},jn={},de,Hg=Hg||{},Ge=ZP||self;function cp(i){var t=typeof i;return t=t!="object"?t:i?Array.isArray(i)?"array":t:"null",t=="array"||t=="object"&&typeof i.length=="number"}function Cc(i){var t=typeof i;return t=="object"&&i!=null||t=="function"}function XP(i){return Object.prototype.hasOwnProperty.call(i,Ig)&&i[Ig]||(i[Ig]=++JP)}var Ig="closure_uid_"+(1e9*Math.random()>>>0),JP=0;function eR(i,t,e){return i.call.apply(i.bind,arguments)}function tR(i,t,e){if(!i)throw Error();if(2{};Ge.addEventListener("test",e,t),Ge.removeEventListener("test",e,t)}catch{}return i}();function hc(i){return/^[\s\xa0]*$/.test(i)}function dp(){var i=Ge.navigator;return i&&(i=i.userAgent)?i:""}function pr(i){return dp().indexOf(i)!=-1}function $g(i){return $g[" "](i),i}$g[" "]=function(){};function rR(i,t){var e=qR;return Object.prototype.hasOwnProperty.call(e,i)?e[i]:e[i]=t(i)}var oR=pr("Opera"),da=pr("Trident")||pr("MSIE"),_w=pr("Edge"),Eg=_w||da,vw=pr("Gecko")&&!(dp().toLowerCase().indexOf("webkit")!=-1&&!pr("Edge"))&&!(pr("Trident")||pr("MSIE"))&&!pr("Edge"),sR=dp().toLowerCase().indexOf("webkit")!=-1&&!pr("Edge");function yw(){var i=Ge.document;return i?i.documentMode:void 0}var Og;e:{if(Zu="",Xu=function(){var i=dp();if(vw)return/rv:([^\);]+)(\)|;)/.exec(i);if(_w)return/Edge\/([\d\.]+)/.exec(i);if(da)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(i);if(sR)return/WebKit\/(\S+)/.exec(i);if(oR)return/(?:Version)[ \/]?(\S+)/.exec(i)}(),Xu&&(Zu=Xu?Xu[1]:""),da&&(Ju=yw(),Ju!=null&&Ju>parseFloat(Zu))){Og=String(Ju);break e}Og=Zu}var Zu,Xu,Ju,Mg;Ge.document&&da?(wg=yw(),Mg=wg||parseInt(Og,10)||void 0):Mg=void 0;var wg,aR=Mg;function mc(i,t){if(Hi.call(this,i?i.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,i){var e=this.type=i.type,n=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:null;if(this.target=i.target||i.srcElement,this.g=t,t=i.relatedTarget){if(vw){e:{try{$g(t.nodeName);var r=!0;break e}catch{}r=!1}r||(t=null)}}else e=="mouseover"?t=i.fromElement:e=="mouseout"&&(t=i.toElement);this.relatedTarget=t,n?(this.clientX=n.clientX!==void 0?n.clientX:n.pageX,this.clientY=n.clientY!==void 0?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0):(this.clientX=i.clientX!==void 0?i.clientX:i.pageX,this.clientY=i.clientY!==void 0?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0),this.button=i.button,this.key=i.key||"",this.ctrlKey=i.ctrlKey,this.altKey=i.altKey,this.shiftKey=i.shiftKey,this.metaKey=i.metaKey,this.pointerId=i.pointerId||0,this.pointerType=typeof i.pointerType=="string"?i.pointerType:lR[i.pointerType]||"",this.state=i.state,this.i=i,i.defaultPrevented&&mc.$.h.call(this)}}xi(mc,Hi);var lR={2:"touch",3:"pen",4:"mouse"};mc.prototype.h=function(){mc.$.h.call(this);var i=this.i;i.preventDefault?i.preventDefault():i.returnValue=!1};var Ic="closure_listenable_"+(1e6*Math.random()|0),cR=0;function dR(i,t,e,n,r){this.listener=i,this.proxy=null,this.src=t,this.type=e,this.capture=!!n,this.la=r,this.key=++cR,this.fa=this.ia=!1}function up(i){i.fa=!0,i.listener=null,i.proxy=null,i.src=null,i.la=null}function qg(i,t,e){for(let n in i)t.call(e,i[n],n,i)}function uR(i,t){for(let e in i)t.call(void 0,i[e],e,i)}function bw(i){let t={};for(let e in i)t[e]=i[e];return t}var ow="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Cw(i,t){let e,n;for(let r=1;r>>0);function Yg(i){return typeof i=="function"?i:(i[xg]||(i[xg]=function(t){return i.handleEvent(t)}),i[xg])}function Ti(){Io.call(this),this.i=new pp(this),this.S=this,this.J=null}xi(Ti,Io);Ti.prototype[Ic]=!0;Ti.prototype.removeEventListener=function(i,t,e,n){xw(this,i,t,e,n)};function Pi(i,t){var e,n=i.J;if(n)for(e=[];n;n=n.J)e.push(n);if(i=i.S,n=t.type||t,typeof t=="string")t=new Hi(t,i);else if(t instanceof Hi)t.target=t.target||i;else{var r=t;t=new Hi(n,i),Cw(t,r)}if(r=!0,e)for(var o=e.length-1;0<=o;o--){var s=t.g=e[o];r=ep(s,n,!0,t)&&r}if(s=t.g=i,r=ep(s,n,!0,t)&&r,r=ep(s,n,!1,t)&&r,e)for(o=0;onew Rg,i=>i.reset()),Rg=class{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}};function fR(i){var t=1;i=i.split(":");let e=[];for(;0{throw i},0)}var fc,gc=!1,Xg=new Pg,Ow=()=>{let i=Ge.Promise.resolve(void 0);fc=()=>{i.then(_R)}},_R=()=>{for(var i;i=mR();){try{i.h.call(i.g)}catch(e){gR(e)}var t=Ew;t.j(i),100>t.h&&(t.h++,i.next=t.g,t.g=i)}gc=!1};function hp(i,t){Ti.call(this),this.h=i||1,this.g=t||Ge,this.j=ji(this.qb,this),this.l=Date.now()}xi(hp,Ti);de=hp.prototype;de.ga=!1;de.T=null;de.qb=function(){if(this.ga){var i=Date.now()-this.l;0{i.g=null,i.i&&(i.i=!1,Mw(i))},i.j);let t=i.h;i.h=null,i.m.apply(null,t)}var Vg=class extends Io{constructor(t,e){super(),this.m=t,this.j=e,this.h=null,this.i=!1,this.g=null}l(t){this.h=arguments,this.g?this.i=!0:Mw(this)}N(){super.N(),this.g&&(Ge.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}};function _c(i){Io.call(this),this.h=i,this.g={}}xi(_c,Io);var sw=[];function kw(i,t,e,n){Array.isArray(e)||(e&&(sw[0]=e.toString()),e=sw);for(var r=0;rn.length)){var r=n[1];if(Array.isArray(r)&&!(1>r.length)){var o=r[0];if(o!="noop"&&o!="stop"&&o!="close")for(var s=1;sf)&&(f!=3||Eg||this.g&&(this.h.h||this.g.ja()||pw(this.g)))){this.J||f!=4||t==7||(t==8||0>=v?vc(3):vc(2)),vp(this);var e=this.g.da();this.ca=e;t:if(zw(this)){var n=pw(this.g);i="";var r=n.length,o=pr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){ss(this),pc(this);var s="";break t}this.h.i=new $e.TextDecoder}for(t=0;tt.length?Fg:(t=t.slice(n,n+e),i.o=n+e,t)))}de.cancel=function(){this.J=!0,ss(this)};function Sc(i){i.Y=Date.now()+i.P,jw(i,i.P)}function jw(i,t){if(i.C!=null)throw Error("WatchDog timer not null");i.C=wc(ji(i.lb,i),t)}function vp(i){i.C&&($e.clearTimeout(i.C),i.C=null)}de.lb=function(){this.C=null;let i=Date.now();0<=i-this.Y?(bR(this.j,this.B),this.L!=2&&(vc(),Xi(17)),ss(this),this.s=2,pc(this)):jw(this,this.Y-i)};function pc(i){i.l.H==0||i.J||dT(i.l,i)}function ss(i){vp(i);var t=i.M;t&&typeof t.sa=="function"&&t.sa(),i.M=null,Jg(i.V),Aw(i.U),i.g&&(t=i.g,i.g=null,t.abort(),t.sa())}function Bg(i,t){try{var e=i.l;if(e.H!=0&&(e.g==i||zg(e.i,i))){if(!i.K&&zg(e.i,i)&&e.H==3){try{var n=e.Ja.g.parse(t)}catch{n=null}if(Array.isArray(n)&&n.length==3){var r=n;if(r[0]==0){e:if(!e.u){if(e.g)if(e.g.G+3e3r[2]&&e.G&&e.A==0&&!e.v&&(e.v=wc(ji(e.ib,e),6e3));if(1>=Yw(e.i)&&e.oa){try{e.oa()}catch{}e.oa=void 0}}else as(e,11)}else if((i.K||e.g==i)&&op(e),!hc(t))for(r=e.Ja.g.parse(t),t=0;tt)throw Error("Bad port number "+t);i.m=t}else i.m=null}function cw(i,t,e){t instanceof yc?(i.i=t,DR(i.i,i.h)):(e||(t=uc(t,kR)),i.i=new yc(t,i.h))}function Ut(i,t,e){i.i.set(t,e)}function yp(i){return Ut(i,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),i}function dc(i,t){return i?t?decodeURI(i.replace(/%25/g,"%2525")):decodeURIComponent(i):""}function uc(i,t,e){return typeof i=="string"?(i=encodeURI(i).replace(t,ER),e&&(i=i.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),i):null}function ER(i){return i=i.charCodeAt(0),"%"+(i>>4&15).toString(16)+(i&15).toString(16)}var dw=/[#\/\?@]/g,OR=/[#\?:]/g,MR=/[#\?]/g,kR=/[#\?@]/g,AR=/#/g;function yc(i,t){this.h=this.g=null,this.i=i||null,this.j=!!t}function wo(i){i.g||(i.g=new Map,i.h=0,i.i&&SR(i.i,function(t,e){i.add(decodeURIComponent(t.replace(/\+/g," ")),e)}))}de=yc.prototype;de.add=function(i,t){wo(this),this.i=null,i=ua(this,i);var e=this.g.get(i);return e||this.g.set(i,e=[]),e.push(t),this.h+=1,this};function $w(i,t){wo(i),t=ua(i,t),i.g.has(t)&&(i.i=null,i.h-=i.g.get(t).length,i.g.delete(t))}function qw(i,t){return wo(i),t=ua(i,t),i.g.has(t)}de.forEach=function(i,t){wo(this),this.g.forEach(function(e,n){e.forEach(function(r){i.call(t,r,n,this)},this)},this)};de.ta=function(){wo(this);let i=Array.from(this.g.values()),t=Array.from(this.g.keys()),e=[];for(let n=0;n=i.j:!1}function Yw(i){return i.h?1:i.g?i.g.size:0}function zg(i,t){return i.h?i.h==t:i.g?i.g.has(t):!1}function r0(i,t){i.g?i.g.add(t):i.h=t}function Zw(i,t){i.h&&i.h==t?i.h=null:i.g&&i.g.has(t)&&i.g.delete(t)}Kw.prototype.cancel=function(){if(this.i=Xw(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(let i of this.g.values())i.cancel();this.g.clear()}};function Xw(i){if(i.h!=null)return i.i.concat(i.h.F);if(i.g!=null&&i.g.size!==0){let t=i.i;for(let e of i.g.values())t=t.concat(e.F);return t}return Gg(i.i)}var VR=class{stringify(i){return $e.JSON.stringify(i,void 0)}parse(i){return $e.JSON.parse(i,void 0)}};function LR(){this.g=new VR}function FR(i,t,e){let n=e||"";try{Hw(i,function(r,o){let s=r;Cc(r)&&(s=Zg(r)),t.push(n+o+"="+encodeURIComponent(s))})}catch(r){throw t.push(n+"type="+encodeURIComponent("_badmap")),r}}function NR(i,t){let e=new mp;if($e.Image){let n=new Image;n.onload=Yu(tp,e,n,"TestLoadImage: loaded",!0,t),n.onerror=Yu(tp,e,n,"TestLoadImage: error",!1,t),n.onabort=Yu(tp,e,n,"TestLoadImage: abort",!1,t),n.ontimeout=Yu(tp,e,n,"TestLoadImage: timeout",!1,t),$e.setTimeout(function(){n.ontimeout&&n.ontimeout()},1e4),n.src=i}else t(!1)}function tp(i,t,e,n,r){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,r(n)}catch{}}function Ec(i){this.l=i.ec||null,this.j=i.ob||!1}xi(Ec,t0);Ec.prototype.g=function(){return new bp(this.l,this.j)};Ec.prototype.i=function(i){return function(){return i}}({});function bp(i,t){Ti.call(this),this.F=i,this.u=t,this.m=void 0,this.readyState=o0,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}xi(bp,Ti);var o0=0;de=bp.prototype;de.open=function(i,t){if(this.readyState!=o0)throw this.abort(),Error("Error reopening a connection");this.C=i,this.B=t,this.readyState=1,bc(this)};de.send=function(i){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;let t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};i&&(t.body=i),(this.F||$e).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))};de.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Oc(this)),this.readyState=o0};de.$a=function(i){if(this.g&&(this.l=i,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=i.headers,this.readyState=2,bc(this)),this.g&&(this.readyState=3,bc(this),this.g)))if(this.responseType==="arraybuffer")i.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof $e.ReadableStream<"u"&&"body"in i){if(this.j=i.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;Jw(this)}else i.text().then(this.Za.bind(this),this.ka.bind(this))};function Jw(i){i.j.read().then(i.Xa.bind(i)).catch(i.ka.bind(i))}de.Xa=function(i){if(this.g){if(this.u&&i.value)this.response.push(i.value);else if(!this.u){var t=i.value?i.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!i.done}))&&(this.response=this.responseText+=t)}i.done?Oc(this):bc(this),this.readyState==3&&Jw(this)}};de.Za=function(i){this.g&&(this.response=this.responseText=i,Oc(this))};de.Ya=function(i){this.g&&(this.response=i,Oc(this))};de.ka=function(){this.g&&Oc(this)};function Oc(i){i.readyState=4,i.l=null,i.j=null,i.A=null,bc(i)}de.setRequestHeader=function(i,t){this.v.append(i,t)};de.getResponseHeader=function(i){return this.h&&this.h.get(i.toLowerCase())||""};de.getAllResponseHeaders=function(){if(!this.h)return"";let i=[],t=this.h.entries();for(var e=t.next();!e.done;)e=e.value,i.push(e[0]+": "+e[1]),e=t.next();return i.join(`\r -`)};function bc(i){i.onreadystatechange&&i.onreadystatechange.call(i)}Object.defineProperty(bp.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(i){this.m=i?"include":"same-origin"}});var BR=$e.JSON.parse;function oi(i){Ti.call(this),this.headers=new Map,this.u=i||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=eT,this.L=this.M=!1}xi(oi,Ti);var eT="",zR=/^https?$/i,UR=["POST","PUT"];de=oi.prototype;de.Oa=function(i){this.M=i};de.ha=function(i,t,e,n){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+i);t=t?t.toUpperCase():"GET",this.I=i,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():Lg.g(),this.C=this.u?lw(this.u):lw(Lg),this.g.onreadystatechange=ji(this.La,this);try{this.G=!0,this.g.open(t,String(i),!0),this.G=!1}catch(o){uw(this,o);return}if(i=e||"",e=new Map(this.headers),n)if(Object.getPrototypeOf(n)===Object.prototype)for(var r in n)e.set(r,n[r]);else if(typeof n.keys=="function"&&typeof n.get=="function")for(let o of n.keys())e.set(o,n.get(o));else throw Error("Unknown input type for opt_headers: "+String(n));n=Array.from(e.keys()).find(o=>o.toLowerCase()=="content-type"),r=$e.FormData&&i instanceof $e.FormData,!(0<=gw(UR,t))||n||r||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(let[o,s]of e)this.g.setRequestHeader(o,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{nT(this),0{}:null;i.g=null,i.C=null,t||Pi(i,"ready");try{e.onreadystatechange=n}catch{}}}function nT(i){i.g&&i.L&&(i.g.ontimeout=null),i.A&&($e.clearTimeout(i.A),i.A=null)}de.isActive=function(){return!!this.g};function pr(i){return i.g?i.g.readyState:0}de.da=function(){try{return 2n.length)){var r=n[1];if(Array.isArray(r)&&!(1>r.length)){var o=r[0];if(o!="noop"&&o!="stop"&&o!="close")for(var s=1;sf)&&(f!=3||Eg||this.g&&(this.h.h||this.g.ja()||pw(this.g)))){this.J||f!=4||t==7||(t==8||0>=v?vc(3):vc(2)),vp(this);var e=this.g.da();this.ca=e;t:if(zw(this)){var n=pw(this.g);i="";var r=n.length,o=hr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){ss(this),pc(this);var s="";break t}this.h.i=new Ge.TextDecoder}for(t=0;tt.length?Fg:(t=t.slice(n,n+e),i.o=n+e,t)))}de.cancel=function(){this.J=!0,ss(this)};function Sc(i){i.Y=Date.now()+i.P,jw(i,i.P)}function jw(i,t){if(i.C!=null)throw Error("WatchDog timer not null");i.C=wc(ji(i.lb,i),t)}function vp(i){i.C&&(Ge.clearTimeout(i.C),i.C=null)}de.lb=function(){this.C=null;let i=Date.now();0<=i-this.Y?(bR(this.j,this.B),this.L!=2&&(vc(),Xi(17)),ss(this),this.s=2,pc(this)):jw(this,this.Y-i)};function pc(i){i.l.H==0||i.J||dT(i.l,i)}function ss(i){vp(i);var t=i.M;t&&typeof t.sa=="function"&&t.sa(),i.M=null,Jg(i.V),Aw(i.U),i.g&&(t=i.g,i.g=null,t.abort(),t.sa())}function Bg(i,t){try{var e=i.l;if(e.H!=0&&(e.g==i||zg(e.i,i))){if(!i.K&&zg(e.i,i)&&e.H==3){try{var n=e.Ja.g.parse(t)}catch{n=null}if(Array.isArray(n)&&n.length==3){var r=n;if(r[0]==0){e:if(!e.u){if(e.g)if(e.g.G+3e3r[2]&&e.G&&e.A==0&&!e.v&&(e.v=wc(ji(e.ib,e),6e3));if(1>=Yw(e.i)&&e.oa){try{e.oa()}catch{}e.oa=void 0}}else as(e,11)}else if((i.K||e.g==i)&&op(e),!hc(t))for(r=e.Ja.g.parse(t),t=0;tt)throw Error("Bad port number "+t);i.m=t}else i.m=null}function cw(i,t,e){t instanceof yc?(i.i=t,DR(i.i,i.h)):(e||(t=uc(t,kR)),i.i=new yc(t,i.h))}function Ut(i,t,e){i.i.set(t,e)}function yp(i){return Ut(i,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),i}function dc(i,t){return i?t?decodeURI(i.replace(/%25/g,"%2525")):decodeURIComponent(i):""}function uc(i,t,e){return typeof i=="string"?(i=encodeURI(i).replace(t,ER),e&&(i=i.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),i):null}function ER(i){return i=i.charCodeAt(0),"%"+(i>>4&15).toString(16)+(i&15).toString(16)}var dw=/[#\/\?@]/g,OR=/[#\?:]/g,MR=/[#\?]/g,kR=/[#\?@]/g,AR=/#/g;function yc(i,t){this.h=this.g=null,this.i=i||null,this.j=!!t}function wo(i){i.g||(i.g=new Map,i.h=0,i.i&&SR(i.i,function(t,e){i.add(decodeURIComponent(t.replace(/\+/g," ")),e)}))}de=yc.prototype;de.add=function(i,t){wo(this),this.i=null,i=ua(this,i);var e=this.g.get(i);return e||this.g.set(i,e=[]),e.push(t),this.h+=1,this};function $w(i,t){wo(i),t=ua(i,t),i.g.has(t)&&(i.i=null,i.h-=i.g.get(t).length,i.g.delete(t))}function qw(i,t){return wo(i),t=ua(i,t),i.g.has(t)}de.forEach=function(i,t){wo(this),this.g.forEach(function(e,n){e.forEach(function(r){i.call(t,r,n,this)},this)},this)};de.ta=function(){wo(this);let i=Array.from(this.g.values()),t=Array.from(this.g.keys()),e=[];for(let n=0;n=i.j:!1}function Yw(i){return i.h?1:i.g?i.g.size:0}function zg(i,t){return i.h?i.h==t:i.g?i.g.has(t):!1}function r0(i,t){i.g?i.g.add(t):i.h=t}function Zw(i,t){i.h&&i.h==t?i.h=null:i.g&&i.g.has(t)&&i.g.delete(t)}Kw.prototype.cancel=function(){if(this.i=Xw(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(let i of this.g.values())i.cancel();this.g.clear()}};function Xw(i){if(i.h!=null)return i.i.concat(i.h.F);if(i.g!=null&&i.g.size!==0){let t=i.i;for(let e of i.g.values())t=t.concat(e.F);return t}return Gg(i.i)}var VR=class{stringify(i){return Ge.JSON.stringify(i,void 0)}parse(i){return Ge.JSON.parse(i,void 0)}};function LR(){this.g=new VR}function FR(i,t,e){let n=e||"";try{Hw(i,function(r,o){let s=r;Cc(r)&&(s=Zg(r)),t.push(n+o+"="+encodeURIComponent(s))})}catch(r){throw t.push(n+"type="+encodeURIComponent("_badmap")),r}}function NR(i,t){let e=new mp;if(Ge.Image){let n=new Image;n.onload=Yu(tp,e,n,"TestLoadImage: loaded",!0,t),n.onerror=Yu(tp,e,n,"TestLoadImage: error",!1,t),n.onabort=Yu(tp,e,n,"TestLoadImage: abort",!1,t),n.ontimeout=Yu(tp,e,n,"TestLoadImage: timeout",!1,t),Ge.setTimeout(function(){n.ontimeout&&n.ontimeout()},1e4),n.src=i}else t(!1)}function tp(i,t,e,n,r){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,r(n)}catch{}}function Ec(i){this.l=i.ec||null,this.j=i.ob||!1}xi(Ec,t0);Ec.prototype.g=function(){return new bp(this.l,this.j)};Ec.prototype.i=function(i){return function(){return i}}({});function bp(i,t){Ti.call(this),this.F=i,this.u=t,this.m=void 0,this.readyState=o0,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}xi(bp,Ti);var o0=0;de=bp.prototype;de.open=function(i,t){if(this.readyState!=o0)throw this.abort(),Error("Error reopening a connection");this.C=i,this.B=t,this.readyState=1,bc(this)};de.send=function(i){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;let t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};i&&(t.body=i),(this.F||Ge).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))};de.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Oc(this)),this.readyState=o0};de.$a=function(i){if(this.g&&(this.l=i,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=i.headers,this.readyState=2,bc(this)),this.g&&(this.readyState=3,bc(this),this.g)))if(this.responseType==="arraybuffer")i.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof Ge.ReadableStream<"u"&&"body"in i){if(this.j=i.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;Jw(this)}else i.text().then(this.Za.bind(this),this.ka.bind(this))};function Jw(i){i.j.read().then(i.Xa.bind(i)).catch(i.ka.bind(i))}de.Xa=function(i){if(this.g){if(this.u&&i.value)this.response.push(i.value);else if(!this.u){var t=i.value?i.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!i.done}))&&(this.response=this.responseText+=t)}i.done?Oc(this):bc(this),this.readyState==3&&Jw(this)}};de.Za=function(i){this.g&&(this.response=this.responseText=i,Oc(this))};de.Ya=function(i){this.g&&(this.response=i,Oc(this))};de.ka=function(){this.g&&Oc(this)};function Oc(i){i.readyState=4,i.l=null,i.j=null,i.A=null,bc(i)}de.setRequestHeader=function(i,t){this.v.append(i,t)};de.getResponseHeader=function(i){return this.h&&this.h.get(i.toLowerCase())||""};de.getAllResponseHeaders=function(){if(!this.h)return"";let i=[],t=this.h.entries();for(var e=t.next();!e.done;)e=e.value,i.push(e[0]+": "+e[1]),e=t.next();return i.join(`\r +`)};function bc(i){i.onreadystatechange&&i.onreadystatechange.call(i)}Object.defineProperty(bp.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(i){this.m=i?"include":"same-origin"}});var BR=Ge.JSON.parse;function oi(i){Ti.call(this),this.headers=new Map,this.u=i||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=eT,this.L=this.M=!1}xi(oi,Ti);var eT="",zR=/^https?$/i,UR=["POST","PUT"];de=oi.prototype;de.Oa=function(i){this.M=i};de.ha=function(i,t,e,n){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+i);t=t?t.toUpperCase():"GET",this.I=i,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():Lg.g(),this.C=this.u?lw(this.u):lw(Lg),this.g.onreadystatechange=ji(this.La,this);try{this.G=!0,this.g.open(t,String(i),!0),this.G=!1}catch(o){uw(this,o);return}if(i=e||"",e=new Map(this.headers),n)if(Object.getPrototypeOf(n)===Object.prototype)for(var r in n)e.set(r,n[r]);else if(typeof n.keys=="function"&&typeof n.get=="function")for(let o of n.keys())e.set(o,n.get(o));else throw Error("Unknown input type for opt_headers: "+String(n));n=Array.from(e.keys()).find(o=>o.toLowerCase()=="content-type"),r=Ge.FormData&&i instanceof Ge.FormData,!(0<=gw(UR,t))||n||r||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(let[o,s]of e)this.g.setRequestHeader(o,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{nT(this),0{}:null;i.g=null,i.C=null,t||Pi(i,"ready");try{e.onreadystatechange=n}catch{}}}function nT(i){i.g&&i.L&&(i.g.ontimeout=null),i.A&&(Ge.clearTimeout(i.A),i.A=null)}de.isActive=function(){return!!this.g};function hr(i){return i.g?i.g.readyState:0}de.da=function(){try{return 2=i.i.j-(i.m?1:0)?!1:i.m?(i.j=t.F.concat(i.j),!0):i.H==1||i.H==2||i.C>=(i.cb?0:i.eb)?!1:(i.m=wc(ji(i.Na,i,t),uT(i,i.C)),i.C++,!0)}de.Na=function(i){if(this.m)if(this.m=null,this.H==1){if(!i){this.W=Math.floor(1e5*Math.random()),i=this.W++;let r=new xc(this,this.l,i),o=this.s;if(this.U&&(o?(o=bw(o),Cw(o,this.U)):o=this.U),this.o!==null||this.O||(r.I=o,o=null),this.P)e:{for(var t=0,e=0;eu)o=Math.max(0,r[c].g-100),a=!1;else try{FR(f,s,"req"+u+"_")}catch{n&&n(f)}}if(a){n=s.join("&");break e}}}return i=i.j.splice(0,e),t.F=i,n}function lT(i){if(!i.g&&!i.u){i.ba=1;var t=i.Ma;fc||Ow(),gc||(fc(),gc=!0),Xg.add(t,i),i.A=0}}function l0(i){return i.g||i.u||3<=i.A?!1:(i.ba++,i.u=wc(ji(i.Ma,i),uT(i,i.A)),i.A++,!0)}de.Ma=function(){if(this.u=null,cT(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var i=2*this.S;this.l.info("BP detection timer enabled: "+i),this.B=wc(ji(this.jb,this),i)}};de.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Xi(10),Ip(this),cT(this))};function c0(i){i.B!=null&&($e.clearTimeout(i.B),i.B=null)}function cT(i){i.g=new xc(i,i.l,"rpc",i.ba),i.o===null&&(i.g.I=i.s),i.g.O=0;var t=Nr(i.wa);Ut(t,"RID","rpc"),Ut(t,"SID",i.K),Ut(t,"AID",i.V),Ut(t,"CI",i.G?"0":"1"),!i.G&&i.qa&&Ut(t,"TO",i.qa),Ut(t,"TYPE","xmlhttp"),Mc(i,t),i.o&&i.s&&s0(t,i.o,i.s),i.L&&i.g.setTimeout(i.L);var e=i.g;i=i.pa,e.L=1,e.A=yp(Nr(t)),e.u=null,e.S=!0,Bw(e,i)}de.ib=function(){this.v!=null&&(this.v=null,Ip(this),l0(this),Xi(19))};function op(i){i.v!=null&&($e.clearTimeout(i.v),i.v=null)}function dT(i,t){var e=null;if(i.g==t){op(i),c0(i),i.g=null;var n=2}else if(zg(i.i,t))e=t.F,Zw(i.i,t),n=1;else return;if(i.H!=0){if(t.i)if(n==1){e=t.u?t.u.length:0,t=Date.now()-t.G;var r=i.C;n=fp(),Pi(n,new Rw(n,e)),wp(i)}else lT(i);else if(r=t.s,r==3||r==0&&0r;++r)n[r]=t.charCodeAt(e++)|t.charCodeAt(e++)<<8|t.charCodeAt(e++)<<16|t.charCodeAt(e++)<<24;else for(r=0;16>r;++r)n[r]=t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24;t=i.g[0],e=i.g[1],r=i.g[2];var o=i.g[3],s=t+(o^e&(r^o))+n[0]+3614090360&4294967295;t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[1]+3905402710&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[2]+606105819&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[3]+3250441966&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(o^e&(r^o))+n[4]+4118548399&4294967295,t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[5]+1200080426&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[6]+2821735955&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[7]+4249261313&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(o^e&(r^o))+n[8]+1770035416&4294967295,t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[9]+2336552879&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[10]+4294925233&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[11]+2304563134&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(o^e&(r^o))+n[12]+1804603682&4294967295,t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[13]+4254626195&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[14]+2792965006&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[15]+1236535329&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(r^o&(e^r))+n[1]+4129170786&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[6]+3225465664&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[11]+643717713&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[0]+3921069994&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(r^o&(e^r))+n[5]+3593408605&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[10]+38016083&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[15]+3634488961&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[4]+3889429448&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(r^o&(e^r))+n[9]+568446438&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[14]+3275163606&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[3]+4107603335&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[8]+1163531501&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(r^o&(e^r))+n[13]+2850285829&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[2]+4243563512&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[7]+1735328473&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[12]+2368359562&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(e^r^o)+n[5]+4294588738&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[8]+2272392833&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[11]+1839030562&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[14]+4259657740&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(e^r^o)+n[1]+2763975236&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[4]+1272893353&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[7]+4139469664&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[10]+3200236656&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(e^r^o)+n[13]+681279174&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[0]+3936430074&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[3]+3572445317&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[6]+76029189&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(e^r^o)+n[9]+3654602809&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[12]+3873151461&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[15]+530742520&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[2]+3299628645&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(r^(e|~o))+n[0]+4096336452&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[7]+1126891415&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[14]+2878612391&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[5]+4237533241&4294967295,e=r+(s<<21&4294967295|s>>>11),s=t+(r^(e|~o))+n[12]+1700485571&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[3]+2399980690&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[10]+4293915773&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[1]+2240044497&4294967295,e=r+(s<<21&4294967295|s>>>11),s=t+(r^(e|~o))+n[8]+1873313359&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[15]+4264355552&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[6]+2734768916&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[13]+1309151649&4294967295,e=r+(s<<21&4294967295|s>>>11),s=t+(r^(e|~o))+n[4]+4149444226&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[11]+3174756917&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[2]+718787259&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[9]+3951481745&4294967295,i.g[0]=i.g[0]+t&4294967295,i.g[1]=i.g[1]+(r+(s<<21&4294967295|s>>>11))&4294967295,i.g[2]=i.g[2]+r&4294967295,i.g[3]=i.g[3]+o&4294967295}zn.prototype.j=function(i,t){t===void 0&&(t=i.length);for(var e=t-this.blockSize,n=this.m,r=this.h,o=0;othis.h?this.blockSize:2*this.blockSize)-this.h);i[0]=128;for(var t=1;tt;++t)for(var n=0;32>n;n+=8)i[e++]=this.g[t]>>>n&255;return i};function Dt(i,t){this.h=t;for(var e=[],n=!0,r=i.length-1;0<=r;r--){var o=i[r]|0;n&&o==t||(e[r]=o,n=!1)}this.g=e}var qR={};function d0(i){return-128<=i&&128>i?rR(i,function(t){return new Dt([t|0],0>t?-1:0)}):new Dt([i|0],0>i?-1:0)}function hr(i){if(isNaN(i)||!isFinite(i))return ca;if(0>i)return Di(hr(-i));for(var t=[],e=1,n=0;i>=e;n++)t[n]=i/e|0,e*=Ug;return new Dt(t,0)}function vT(i,t){if(i.length==0)throw Error("number format error: empty string");if(t=t||10,2>t||36o?(o=hr(Math.pow(t,o)),n=n.R(o).add(hr(s))):(n=n.R(e),n=n.add(hr(s)))}return n}var Ug=4294967296,ca=d0(0),jg=d0(1),mw=d0(16777216);de=Dt.prototype;de.ea=function(){if(An(this))return-Di(this).ea();for(var i=0,t=1,e=0;ei||36>>0).toString(i);if(e=r,Fr(e))return o+n;for(;6>o.length;)o="0"+o;n=o+n}};de.D=function(i){return 0>i?0:i>>16)+(this.D(r)>>>16)+(i.D(r)>>>16);n=s>>>16,o&=65535,s&=65535,e[r]=s<<16|o}return new Dt(e,e[e.length-1]&-2147483648?-1:0)};function ap(i,t){return i.add(Di(t))}de.R=function(i){if(Fr(this)||Fr(i))return ca;if(An(this))return An(i)?Di(this).R(Di(i)):Di(Di(this).R(i));if(An(i))return Di(this.R(Di(i)));if(0>this.X(mw)&&0>i.X(mw))return hr(this.ea()*i.ea());for(var t=this.g.length+i.g.length,e=[],n=0;n<2*t;n++)e[n]=0;for(n=0;n>>16,s=this.D(n)&65535,a=i.D(r)>>>16,c=i.D(r)&65535;e[2*n+2*r]+=s*c,ip(e,2*n+2*r),e[2*n+2*r+1]+=o*c,ip(e,2*n+2*r+1),e[2*n+2*r+1]+=s*a,ip(e,2*n+2*r+1),e[2*n+2*r+2]+=o*a,ip(e,2*n+2*r+2)}for(n=0;n>>16,i[t]&=65535,t++}function cc(i,t){this.g=i,this.h=t}function lp(i,t){if(Fr(t))throw Error("division by zero");if(Fr(i))return new cc(ca,ca);if(An(i))return t=lp(Di(i),t),new cc(Di(t.g),Di(t.h));if(An(t))return t=lp(i,Di(t)),new cc(Di(t.g),t.h);if(30=n.X(i);)e=fw(e),n=fw(n);var r=aa(e,1),o=aa(n,1);for(n=aa(n,2),e=aa(e,2);!Fr(n);){var s=o.add(n);0>=s.X(i)&&(r=r.add(e),o=s),n=aa(n,1),e=aa(e,1)}return t=ap(i,r.R(t)),new cc(r,t)}for(r=ca;0<=i.X(t);){for(e=Math.max(1,Math.floor(i.ea()/t.ea())),n=Math.ceil(Math.log(e)/Math.LN2),n=48>=n?1:Math.pow(2,n-48),o=hr(e),s=o.R(t);An(s)||0>>31;return new Dt(e,i.h)}function aa(i,t){var e=t>>5;t%=32;for(var n=i.g.length-e,r=[],o=0;o>>t|i.D(o+e+1)<<32-t:i.D(o+e);return new Dt(r,i.h)}sp.prototype.createWebChannel=sp.prototype.g;vn.prototype.send=vn.prototype.u;vn.prototype.open=vn.prototype.m;vn.prototype.close=vn.prototype.close;gp.NO_ERROR=0;gp.TIMEOUT=8;gp.HTTP_ERROR=6;Vw.COMPLETE="complete";Lw.EventType=Tc;Tc.OPEN="a";Tc.CLOSE="b";Tc.ERROR="c";Tc.MESSAGE="d";Ti.prototype.listen=Ti.prototype.O;oi.prototype.listenOnce=oi.prototype.P;oi.prototype.getLastError=oi.prototype.Sa;oi.prototype.getLastErrorCode=oi.prototype.Ia;oi.prototype.getStatus=oi.prototype.da;oi.prototype.getResponseJson=oi.prototype.Wa;oi.prototype.getResponseText=oi.prototype.ja;oi.prototype.send=oi.prototype.ha;oi.prototype.setWithCredentials=oi.prototype.Oa;zn.prototype.digest=zn.prototype.l;zn.prototype.reset=zn.prototype.reset;zn.prototype.update=zn.prototype.j;Dt.prototype.add=Dt.prototype.add;Dt.prototype.multiply=Dt.prototype.R;Dt.prototype.modulo=Dt.prototype.gb;Dt.prototype.compare=Dt.prototype.X;Dt.prototype.toNumber=Dt.prototype.ea;Dt.prototype.toString=Dt.prototype.toString;Dt.prototype.getBits=Dt.prototype.D;Dt.fromNumber=hr;Dt.fromString=vT;var yT=Un.createWebChannelTransport=function(){return new sp},bT=Un.getStatEventTarget=function(){return fp()},Tp=Un.ErrorCode=gp,CT=Un.EventType=Vw,IT=Un.Event=cs,u0=Un.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},qte=Un.FetchXmlHttpFactory=Ec,kc=Un.WebChannel=Lw,wT=Un.XhrIo=oi,TT=Un.Md5=zn,ds=Un.Integer=Dt;var xT="@firebase/firestore";var Si=class{constructor(t){this.uid=t}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}};Si.UNAUTHENTICATED=new Si(null),Si.GOOGLE_CREDENTIALS=new Si("google-credentials-uid"),Si.FIRST_PARTY=new Si("first-party-uid"),Si.MOCK_USER=new Si("mock-user");var Da="10.8.0";var fs=new yo("@firebase/firestore");function Ac(){return fs.logLevel}function ue(i,...t){if(fs.logLevel<=at.DEBUG){let e=t.map(J_);fs.debug(`Firestore (${Da}): ${i}`,...e)}}function vr(i,...t){if(fs.logLevel<=at.ERROR){let e=t.map(J_);fs.error(`Firestore (${Da}): ${i}`,...e)}}function va(i,...t){if(fs.logLevel<=at.WARN){let e=t.map(J_);fs.warn(`Firestore (${Da}): ${i}`,...e)}}function J_(i){if(typeof i=="string")return i;try{return function(e){return JSON.stringify(e)}(i)}catch{return i}}function He(i="Unexpected state"){let t=`FIRESTORE (${Da}) INTERNAL ASSERTION FAILED: `+i;throw vr(t),new Error(t)}function Nt(i,t){i||He()}function Ze(i,t){return i}var te={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Ee=class extends Zi{constructor(t,e){super(t,e),this.code=t,this.message=e,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}};var jn=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var Mp=class{constructor(t,e){this.user=e,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}},g0=class{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,e){t.enqueueRetryable(()=>e(Si.UNAUTHENTICATED))}shutdown(){}},_0=class{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,e){this.changeListener=e,t.enqueueRetryable(()=>e(this.token.user))}shutdown(){this.changeListener=null}},v0=class{constructor(t){this.t=t,this.currentUser=Si.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,e){let n=this.i,r=c=>this.i!==n?(n=this.i,e(c)):Promise.resolve(),o=new jn;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new jn,t.enqueueRetryable(()=>r(this.currentUser))};let s=()=>{let c=o;t.enqueueRetryable(()=>D(this,null,function*(){yield c.promise,yield r(this.currentUser)}))},a=c=>{ue("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(c=>a(c)),setTimeout(()=>{if(!this.auth){let c=this.t.getImmediate({optional:!0});c?a(c):(ue("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new jn)}},0),s()}getToken(){let t=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then(n=>this.i!==t?(ue("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):n?(Nt(typeof n.accessToken=="string"),new Mp(n.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let t=this.auth&&this.auth.getUid();return Nt(t===null||typeof t=="string"),new Si(t)}},y0=class{constructor(t,e,n){this.l=t,this.h=e,this.P=n,this.type="FirstParty",this.user=Si.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let t=this.T();return t&&this.I.set("Authorization",t),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}},b0=class{constructor(t,e,n){this.l=t,this.h=e,this.P=n}getToken(){return Promise.resolve(new y0(this.l,this.h,this.P))}start(t,e){t.enqueueRetryable(()=>e(Si.FIRST_PARTY))}shutdown(){}invalidateToken(){}},C0=class{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}},I0=class{constructor(t){this.A=t,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(t,e){let n=o=>{o.error!=null&&ue("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);let s=o.token!==this.R;return this.R=o.token,ue("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?e(o.token):Promise.resolve()};this.o=o=>{t.enqueueRetryable(()=>n(o))};let r=o=>{ue("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.appCheck.addTokenListener(this.o)};this.A.onInit(o=>r(o)),setTimeout(()=>{if(!this.appCheck){let o=this.A.getImmediate({optional:!0});o?r(o):ue("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then(e=>e?(Nt(typeof e.token=="string"),this.R=e.token,new C0(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}};function WR(i){let t=typeof self<"u"&&(self.crypto||self.msCrypto),e=new Uint8Array(i);if(t&&typeof t.getRandomValues=="function")t.getRandomValues(e);else for(let n=0;nt?1:0}function ya(i,t,e){return i.length===t.length&&i.every((n,r)=>e(n,t[r]))}var Ri=class i{constructor(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new Ee(te.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new Ee(te.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new Ee(te.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Ee(te.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return i.fromMillis(Date.now())}static fromDate(t){return i.fromMillis(t.getTime())}static fromMillis(t){let e=Math.floor(t/1e3),n=Math.floor(1e6*(t-1e3*e));return new i(e,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?St(this.nanoseconds,t.nanoseconds):St(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){let t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}};var Ye=class i{constructor(t){this.timestamp=t}static fromTimestamp(t){return new i(t)}static min(){return new i(new Ri(0,0))}static max(){return new i(new Ri(253402300799,999999999))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}};var Ap=class i{constructor(t,e,n){e===void 0?e=0:e>t.length&&He(),n===void 0?n=t.length-e:n>t.length-e&&He(),this.segments=t,this.offset=e,this.len=n}get length(){return this.len}isEqual(t){return i.comparator(this,t)===0}child(t){let e=this.segments.slice(this.offset,this.limit());return t instanceof i?t.forEach(n=>{e.push(n)}):e.push(t),this.construct(e)}limit(){return this.offset+this.length}popFirst(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return this.length===0}isPrefixOf(t){if(t.lengths)return 1}return t.lengthe.length?1:0}},gi=class i extends Ap{construct(t,e,n){return new i(t,e,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){let e=[];for(let n of t){if(n.indexOf("//")>=0)throw new Ee(te.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);e.push(...n.split("/").filter(r=>r.length>0))}return new i(e)}static emptyPath(){return new i([])}},KR=/^[_a-zA-Z][_a-zA-Z0-9]*$/,bn=class i extends Ap{construct(t,e,n){return new i(t,e,n)}static isValidIdentifier(t){return KR.test(t)}canonicalString(){return this.toArray().map(t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),i.isValidIdentifier(t)||(t="`"+t+"`"),t)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new i(["__name__"])}static fromServerFormat(t){let e=[],n="",r=0,o=()=>{if(n.length===0)throw new Ee(te.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(n),n=""},s=!1;for(;r=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return t!==null&&gi.comparator(this.path,t.path)===0}toString(){return this.path.toString()}static comparator(t,e){return gi.comparator(t.path,e.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new i(new gi(t.slice()))}};var w0=class{constructor(t,e,n,r){this.indexId=t,this.collectionGroup=e,this.fields=n,this.indexState=r}};w0.UNKNOWN_ID=-1;function QR(i,t){let e=i.toTimestamp().seconds,n=i.toTimestamp().nanoseconds+1,r=Ye.fromTimestamp(n===1e9?new Ri(e+1,0):new Ri(e,n));return new gs(r,Be.empty(),t)}function YR(i){return new gs(i.readTime,i.key,-1)}var gs=class i{constructor(t,e,n){this.readTime=t,this.documentKey=e,this.largestBatchId=n}static min(){return new i(Ye.min(),Be.empty(),-1)}static max(){return new i(Ye.max(),Be.empty(),-1)}};function ZR(i,t){let e=i.readTime.compareTo(t.readTime);return e!==0?e:(e=Be.comparator(i.documentKey,t.documentKey),e!==0?e:St(i.largestBatchId,t.largestBatchId))}var XR="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",T0=class{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(t=>t())}};function Qc(i){return D(this,null,function*(){if(i.code!==te.FAILED_PRECONDITION||i.message!==XR)throw i;ue("LocalStore","Unexpectedly lost primary lease")})}var ne=class i{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(t){return this.next(void 0,t)}next(t,e){return this.callbackAttached&&He(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(t,this.result):new i((n,r)=>{this.nextCallback=o=>{this.wrapSuccess(t,o).next(n,r)},this.catchCallback=o=>{this.wrapFailure(e,o).next(n,r)}})}toPromise(){return new Promise((t,e)=>{this.next(t,e)})}wrapUserFunction(t){try{let e=t();return e instanceof i?e:i.resolve(e)}catch(e){return i.reject(e)}}wrapSuccess(t,e){return t?this.wrapUserFunction(()=>t(e)):i.resolve(e)}wrapFailure(t,e){return t?this.wrapUserFunction(()=>t(e)):i.reject(e)}static resolve(t){return new i((e,n)=>{e(t)})}static reject(t){return new i((e,n)=>{n(t)})}static waitFor(t){return new i((e,n)=>{let r=0,o=0,s=!1;t.forEach(a=>{++r,a.next(()=>{++o,s&&o===r&&e()},c=>n(c))}),s=!0,o===r&&e()})}static or(t){let e=i.resolve(!1);for(let n of t)e=e.next(r=>r?i.resolve(r):n());return e}static forEach(t,e){let n=[];return t.forEach((r,o)=>{n.push(e.call(this,r,o))}),this.waitFor(n)}static mapArray(t,e){return new i((n,r)=>{let o=t.length,s=new Array(o),a=0;for(let c=0;c{s[u]=f,++a,a===o&&n(s)},f=>r(f))}})}static doWhile(t,e){return new i((n,r)=>{let o=()=>{t()===!0?e().next(()=>{o()},r):n()};o()})}};var x0=class i{constructor(t,e){this.action=t,this.transaction=e,this.aborted=!1,this.V=new jn,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{e.error?this.V.reject(new ms(t,e.error)):this.V.resolve()},this.transaction.onerror=n=>{let r=ev(n.target.error);this.V.reject(new ms(t,r))}}static open(t,e,n,r){try{return new i(e,t.transaction(r,n))}catch(o){throw new ms(e,o)}}get m(){return this.V.promise}abort(t){t&&this.V.reject(t),this.aborted||(ue("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){let t=this.transaction;this.aborted||typeof t.commit!="function"||t.commit()}store(t){let e=this.transaction.objectStore(t);return new E0(e)}},Dp=class i{constructor(t,e,n){this.name=t,this.version=e,this.p=n,i.S(ri())===12.2&&vr("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return ue("SimpleDb","Removing database:",t),us(window.indexedDB.deleteDatabase(t)).toPromise()}static D(){if(!qu())return!1;if(i.C())return!0;let t=ri(),e=i.S(t),n=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||n||o)}static C(){var t;return typeof process<"u"&&((t=process.__PRIVATE_env)===null||t===void 0?void 0:t.F)==="YES"}static M(t,e){return t.store(e)}static S(t){let e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)}static v(t){let e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}O(t){return D(this,null,function*(){return this.db||(ue("SimpleDb","Opening database:",this.name),this.db=yield new Promise((e,n)=>{let r=indexedDB.open(this.name,this.version);r.onsuccess=o=>{let s=o.target.result;e(s)},r.onblocked=()=>{n(new ms(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=o=>{let s=o.target.error;s.name==="VersionError"?n(new Ee(te.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):s.name==="InvalidStateError"?n(new Ee(te.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+s)):n(new ms(t,s))},r.onupgradeneeded=o=>{ue("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',o.oldVersion);let s=o.target.result;this.p.N(s,r.transaction,o.oldVersion,this.version).next(()=>{ue("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.B&&(this.db.onversionchange=e=>this.B(e)),this.db})}L(t){this.B=t,this.db&&(this.db.onversionchange=e=>t(e))}runTransaction(t,e,n,r){return D(this,null,function*(){let o=e==="readonly",s=0;for(;;){++s;try{this.db=yield this.O(t);let a=x0.open(this.db,t,o?"readonly":"readwrite",n),c=r(a).next(u=>(a.g(),u)).catch(u=>(a.abort(u),ne.reject(u))).toPromise();return c.catch(()=>{}),yield a.m,c}catch(a){let c=a,u=c.name!=="FirebaseError"&&s<3;if(ue("SimpleDb","Transaction failed with error:",c.message,"Retrying:",u),this.close(),!u)return Promise.reject(c)}}})}close(){this.db&&this.db.close(),this.db=void 0}},S0=class{constructor(t){this.k=t,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(t){this.k=t}done(){this.q=!0}U(t){this.K=t}delete(){return us(this.k.delete())}},ms=class extends Ee{constructor(t,e){super(te.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${e}`),this.name="IndexedDbTransactionError"}};function Yc(i){return i.name==="IndexedDbTransactionError"}var E0=class{constructor(t){this.store=t}put(t,e){let n;return e!==void 0?(ue("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(ue("SimpleDb","PUT",this.store.name,"",t),n=this.store.put(t)),us(n)}add(t){return ue("SimpleDb","ADD",this.store.name,t,t),us(this.store.add(t))}get(t){return us(this.store.get(t)).next(e=>(e===void 0&&(e=null),ue("SimpleDb","GET",this.store.name,t,e),e))}delete(t){return ue("SimpleDb","DELETE",this.store.name,t),us(this.store.delete(t))}count(){return ue("SimpleDb","COUNT",this.store.name),us(this.store.count())}W(t,e){let n=this.options(t,e),r=n.index?this.store.index(n.index):this.store;if(typeof r.getAll=="function"){let o=r.getAll(n.range);return new ne((s,a)=>{o.onerror=c=>{a(c.target.error)},o.onsuccess=c=>{s(c.target.result)}})}{let o=this.cursor(n),s=[];return this.G(o,(a,c)=>{s.push(c)}).next(()=>s)}}j(t,e){let n=this.store.getAll(t,e===null?void 0:e);return new ne((r,o)=>{n.onerror=s=>{o(s.target.error)},n.onsuccess=s=>{r(s.target.result)}})}H(t,e){ue("SimpleDb","DELETE ALL",this.store.name);let n=this.options(t,e);n.J=!1;let r=this.cursor(n);return this.G(r,(o,s,a)=>a.delete())}Y(t,e){let n;e?n=t:(n={},e=t);let r=this.cursor(n);return this.G(r,e)}Z(t){let e=this.cursor({});return new ne((n,r)=>{e.onerror=o=>{let s=ev(o.target.error);r(s)},e.onsuccess=o=>{let s=o.target.result;s?t(s.primaryKey,s.value).next(a=>{a?s.continue():n()}):n()}})}G(t,e){let n=[];return new ne((r,o)=>{t.onerror=s=>{o(s.target.error)},t.onsuccess=s=>{let a=s.target.result;if(!a)return void r();let c=new S0(a),u=e(a.primaryKey,a.value,c);if(u instanceof ne){let f=u.catch(v=>(c.done(),ne.reject(v)));n.push(f)}c.isDone?r():c.$===null?a.continue():a.continue(c.$)}}).next(()=>ne.waitFor(n))}options(t,e){let n;return t!==void 0&&(typeof t=="string"?n=t:e=t),{index:n,range:e}}cursor(t){let e="next";if(t.reverse&&(e="prev"),t.index){let n=this.store.index(t.index);return t.J?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)}};function us(i){return new ne((t,e)=>{i.onsuccess=n=>{let r=n.target.result;t(r)},i.onerror=n=>{let r=ev(n.target.error);e(r)}})}var ST=!1;function ev(i){let t=Dp.S(ri());if(t>=12.2&&t<13){let e="An internal error was encountered in the Indexed Database server";if(i.message.indexOf(e)>=0){let n=new Ee("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return ST||(ST=!0,setTimeout(()=>{throw n},0)),n}}return i}var XT=(()=>{class i{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.se(r),this.oe=r=>n.writeSequenceNumber(r))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.oe&&this.oe(e),e}}return i._e=-1,i})();function sh(i){return i==null}function Fc(i){return i===0&&1/i==-1/0}function JR(i){return typeof i=="number"&&Number.isInteger(i)&&!Fc(i)&&i<=Number.MAX_SAFE_INTEGER&&i>=Number.MIN_SAFE_INTEGER}var e5=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],iie=[...e5,"documentOverlays"],t5=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],i5=t5,nie=[...i5,"indexConfiguration","indexState","indexEntries"];function ET(i){let t=0;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&t++;return t}function Is(i,t){for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&t(e,i[e])}function JT(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t))return!1;return!0}var ai=class i{constructor(t,e){this.comparator=t,this.root=e||fr.EMPTY}insert(t,e){return new i(this.comparator,this.root.insert(t,e,this.comparator).copy(null,null,fr.BLACK,null,null))}remove(t){return new i(this.comparator,this.root.remove(t,this.comparator).copy(null,null,fr.BLACK,null,null))}get(t){let e=this.root;for(;!e.isEmpty();){let n=this.comparator(t,e.key);if(n===0)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null}indexOf(t){let e=0,n=this.root;for(;!n.isEmpty();){let r=this.comparator(t,n.key);if(r===0)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal((e,n)=>(t(e,n),!1))}toString(){let t=[];return this.inorderTraversal((e,n)=>(t.push(`${e}:${n}`),!1)),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new ga(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new ga(this.root,t,this.comparator,!1)}getReverseIterator(){return new ga(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new ga(this.root,t,this.comparator,!0)}},ga=class{constructor(t,e,n,r){this.isReverse=r,this.nodeStack=[];let o=1;for(;!t.isEmpty();)if(o=e?n(t.key,e):1,e&&r&&(o*=-1),o<0)t=this.isReverse?t.left:t.right;else{if(o===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop(),e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;let t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}},fr=class i{constructor(t,e,n,r,o){this.key=t,this.value=e,this.color=n??i.RED,this.left=r??i.EMPTY,this.right=o??i.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,e,n,r,o){return new i(t??this.key,e??this.value,n??this.color,r??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,e,n){let r=this,o=n(t,r.key);return r=o<0?r.copy(null,null,null,r.left.insert(t,e,n),null):o===0?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return i.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,e){let n,r=this;if(e(t,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(t,e),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),e(t,r.key)===0){if(r.right.isEmpty())return i.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(t,e))}return r.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){let t=this.copy(null,null,i.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){let t=this.copy(null,null,i.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){let t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)}checkMaxDepth(){let t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw He();let t=this.left.check();if(t!==this.right.check())throw He();return t+(this.isRed()?0:1)}};fr.EMPTY=null,fr.RED=!0,fr.BLACK=!1;fr.EMPTY=new class{constructor(){this.size=0}get key(){throw He()}get value(){throw He()}get color(){throw He()}get left(){throw He()}get right(){throw He()}copy(t,e,n,r,o){return this}insert(t,e,n){return new fr(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};var $i=class i{constructor(t){this.comparator=t,this.data=new ai(this.comparator)}has(t){return this.data.get(t)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal((e,n)=>(t(e),!1))}forEachInRange(t,e){let n=this.data.getIteratorFrom(t[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}}forEachWhile(t,e){let n;for(n=e!==void 0?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();)if(!t(n.getNext().key))return}firstAfterOrEqual(t){let e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null}getIterator(){return new Pp(this.data.getIterator())}getIteratorFrom(t){return new Pp(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let e=this;return e.size{e=e.add(n)}),e}isEqual(t){if(!(t instanceof i)||this.size!==t.size)return!1;let e=this.data.getIterator(),n=t.data.getIterator();for(;e.hasNext();){let r=e.getNext().key,o=n.getNext().key;if(this.comparator(r,o)!==0)return!1}return!0}toArray(){let t=[];return this.forEach(e=>{t.push(e)}),t}toString(){let t=[];return this.forEach(e=>t.push(e)),"SortedSet("+t.toString()+")"}copy(t){let e=new i(this.comparator);return e.data=t,e}},Pp=class{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}};var Dn=class i{constructor(t){this.fields=t,t.sort(bn.comparator)}static empty(){return new i([])}unionWith(t){let e=new $i(bn.comparator);for(let n of this.fields)e=e.add(n);for(let n of t)e=e.add(n);return new i(e.toArray())}covers(t){for(let e of this.fields)if(e.isPrefixOf(t))return!0;return!1}isEqual(t){return ya(this.fields,t.fields,(e,n)=>e.isEqual(n))}};var Rp=class extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}};var Ji=class i{constructor(t){this.binaryString=t}static fromBase64String(t){let e=function(r){try{return atob(r)}catch(o){throw typeof DOMException<"u"&&o instanceof DOMException?new Rp("Invalid base64 string: "+o):o}}(t);return new i(e)}static fromUint8Array(t){let e=function(r){let o="";for(let s=0;styr(e,t))!==void 0}function ba(i,t){if(i===t)return 0;let e=_s(i),n=_s(t);if(e!==n)return St(e,n);switch(e){case 0:case 9007199254740991:return 0;case 1:return St(i.booleanValue,t.booleanValue);case 2:return function(o,s){let a=si(o.integerValue||o.doubleValue),c=si(s.integerValue||s.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(i,t);case 3:return OT(i.timestampValue,t.timestampValue);case 4:return OT(Nc(i),Nc(t));case 5:return St(i.stringValue,t.stringValue);case 6:return function(o,s){let a=So(o),c=So(s);return a.compareTo(c)}(i.bytesValue,t.bytesValue);case 7:return function(o,s){let a=o.split("/"),c=s.split("/");for(let u=0;ut.mapValue.fields[e]=Pc(n)),t}if(i.arrayValue){let t={arrayValue:{values:[]}};for(let e=0;e<(i.arrayValue.values||[]).length;++e)t.arrayValue.values[e]=Pc(i.arrayValue.values[e]);return t}return Object.assign({},i)}function ex(i){return(((i.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}var yn=class i{constructor(t){this.value=t}static empty(){return new i({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let e=this.value;for(let n=0;n{if(!e.isImmediateParentOf(a)){let c=this.getFieldsMap(e);this.applyChanges(c,n,r),n={},r=[],e=a.popLast()}s?n[a.lastSegment()]=Pc(s):r.push(a.lastSegment())});let o=this.getFieldsMap(e);this.applyChanges(o,n,r)}delete(t){let e=this.field(t.popLast());Ep(e)&&e.mapValue.fields&&delete e.mapValue.fields[t.lastSegment()]}isEqual(t){return yr(this.value,t.value)}getFieldsMap(t){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let n=0;nt[r]=o);for(let r of n)delete t[r]}clone(){return new i(Pc(this.value))}};function tx(i){let t=[];return Is(i.fields,(e,n)=>{let r=new bn([e]);if(Ep(n)){let o=tx(n.mapValue).fields;if(o.length===0)t.push(r);else for(let s of o)t.push(r.child(s))}else t.push(r)}),new Dn(t)}var Hn=class i{constructor(t,e,n,r,o,s,a){this.key=t,this.documentType=e,this.version=n,this.readTime=r,this.createTime=o,this.data=s,this.documentState=a}static newInvalidDocument(t){return new i(t,0,Ye.min(),Ye.min(),Ye.min(),yn.empty(),0)}static newFoundDocument(t,e,n,r){return new i(t,1,e,Ye.min(),n,r,0)}static newNoDocument(t,e){return new i(t,2,e,Ye.min(),Ye.min(),yn.empty(),0)}static newUnknownDocument(t,e){return new i(t,3,e,Ye.min(),Ye.min(),yn.empty(),2)}convertToFoundDocument(t,e){return!this.createTime.isEqual(Ye.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=t),this.version=t,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=yn.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=yn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ye.min(),this}setReadTime(t){return this.readTime=t,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(t){return t instanceof i&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new i(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}};var Ia=class{constructor(t,e){this.position=t,this.inclusive=e}};function AT(i,t,e){let n=0;for(let r=0;r":return t>0;case">=":return t>=0;default:return He()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}},br=class i extends Lp{constructor(t,e){super(),this.filters=t,this.op=e,this.ue=null}static create(t,e){return new i(t,e)}matches(t){return ix(this)?this.filters.find(e=>!e.matches(t))===void 0:this.filters.find(e=>e.matches(t))!==void 0}getFlattenedFilters(){return this.ue!==null||(this.ue=this.filters.reduce((t,e)=>t.concat(e.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}};function ix(i){return i.op==="and"}function nx(i){return o5(i)&&ix(i)}function o5(i){for(let t of i.filters)if(t instanceof br)return!1;return!0}function A0(i){if(i instanceof bi)return i.field.canonicalString()+i.op.toString()+Ca(i.value);if(nx(i))return i.filters.map(t=>A0(t)).join(",");{let t=i.filters.map(e=>A0(e)).join(",");return`${i.op}(${t})`}}function rx(i,t){return i instanceof bi?function(n,r){return r instanceof bi&&n.op===r.op&&n.field.isEqual(r.field)&&yr(n.value,r.value)}(i,t):i instanceof br?function(n,r){return r instanceof br&&n.op===r.op&&n.filters.length===r.filters.length?n.filters.reduce((o,s,a)=>o&&rx(s,r.filters[a]),!0):!1}(i,t):void He()}function ox(i){return i instanceof bi?function(e){return`${e.field.canonicalString()} ${e.op} ${Ca(e.value)}`}(i):i instanceof br?function(e){return e.op.toString()+" {"+e.getFilters().map(ox).join(" ,")+"}"}(i):"Filter"}var D0=class extends bi{constructor(t,e,n){super(t,e,n),this.key=Be.fromName(n.referenceValue)}matches(t){let e=Be.comparator(t.key,this.key);return this.matchesComparison(e)}},P0=class extends bi{constructor(t,e){super(t,"in",e),this.keys=sx("in",e)}matches(t){return this.keys.some(e=>e.isEqual(t.key))}},R0=class extends bi{constructor(t,e){super(t,"not-in",e),this.keys=sx("not-in",e)}matches(t){return!this.keys.some(e=>e.isEqual(t.key))}};function sx(i,t){var e;return(((e=t.arrayValue)===null||e===void 0?void 0:e.values)||[]).map(n=>Be.fromName(n.referenceValue))}var V0=class extends bi{constructor(t,e){super(t,"array-contains",e)}matches(t){let e=t.data.field(this.field);return nv(e)&&Bc(e.arrayValue,this.value)}},L0=class extends bi{constructor(t,e){super(t,"in",e)}matches(t){let e=t.data.field(this.field);return e!==null&&Bc(this.value.arrayValue,e)}},F0=class extends bi{constructor(t,e){super(t,"not-in",e)}matches(t){if(Bc(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let e=t.data.field(this.field);return e!==null&&!Bc(this.value.arrayValue,e)}},N0=class extends bi{constructor(t,e){super(t,"array-contains-any",e)}matches(t){let e=t.data.field(this.field);return!(!nv(e)||!e.arrayValue.values)&&e.arrayValue.values.some(n=>Bc(this.value.arrayValue,n))}};var B0=class{constructor(t,e=null,n=[],r=[],o=null,s=null,a=null){this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=o,this.startAt=s,this.endAt=a,this.ce=null}};function PT(i,t=null,e=[],n=[],r=null,o=null,s=null){return new B0(i,t,e,n,r,o,s)}function rv(i){let t=Ze(i);if(t.ce===null){let e=t.path.canonicalString();t.collectionGroup!==null&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map(n=>A0(n)).join(","),e+="|ob:",e+=t.orderBy.map(n=>function(o){return o.field.canonicalString()+o.dir}(n)).join(","),sh(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map(n=>Ca(n)).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map(n=>Ca(n)).join(",")),t.ce=e}return t.ce}function ov(i,t){if(i.limit!==t.limit||i.orderBy.length!==t.orderBy.length)return!1;for(let e=0;e0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";(function(s){let a=new $i(bn.comparator);return s.filters.forEach(c=>{c.getFlattenedFilters().forEach(u=>{u.isInequality()&&(a=a.add(u.field))})}),a})(t).forEach(o=>{e.has(o.canonicalString())||o.isKeyField()||t.le.push(new wa(o,n))}),e.has(bn.keyField().canonicalString())||t.le.push(new wa(bn.keyField(),n))}return t.le}function gr(i){let t=Ze(i);return t.he||(t.he=l5(t,Rc(i))),t.he}function l5(i,t){if(i.limitType==="F")return PT(i.path,i.collectionGroup,t,i.filters,i.limit,i.startAt,i.endAt);{t=t.map(r=>{let o=r.dir==="desc"?"asc":"desc";return new wa(r.field,o)});let e=i.endAt?new Ia(i.endAt.position,i.endAt.inclusive):null,n=i.startAt?new Ia(i.startAt.position,i.startAt.inclusive):null;return PT(i.path,i.collectionGroup,t,i.filters,i.limit,e,n)}}function U0(i,t,e){return new Ta(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),t,e,i.startAt,i.endAt)}function ah(i,t){return ov(gr(i),gr(t))&&i.limitType===t.limitType}function ax(i){return`${rv(gr(i))}|lt:${i.limitType}`}function ha(i){return`Query(target=${function(e){let n=e.path.canonicalString();return e.collectionGroup!==null&&(n+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(n+=`, filters: [${e.filters.map(r=>ox(r)).join(", ")}]`),sh(e.limit)||(n+=", limit: "+e.limit),e.orderBy.length>0&&(n+=`, orderBy: [${e.orderBy.map(r=>function(s){return`${s.field.canonicalString()} (${s.dir})`}(r)).join(", ")}]`),e.startAt&&(n+=", startAt: ",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>Ca(r)).join(",")),e.endAt&&(n+=", endAt: ",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>Ca(r)).join(",")),`Target(${n})`}(gr(i))}; limitType=${i.limitType})`}function lh(i,t){return t.isFoundDocument()&&function(n,r){let o=r.key.path;return n.collectionGroup!==null?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(o):Be.isDocumentKey(n.path)?n.path.isEqual(o):n.path.isImmediateParentOf(o)}(i,t)&&function(n,r){for(let o of Rc(n))if(!o.field.isKeyField()&&r.data.field(o.field)===null)return!1;return!0}(i,t)&&function(n,r){for(let o of n.filters)if(!o.matches(r))return!1;return!0}(i,t)&&function(n,r){return!(n.startAt&&!function(s,a,c){let u=AT(s,a,c);return s.inclusive?u<=0:u<0}(n.startAt,Rc(n),r)||n.endAt&&!function(s,a,c){let u=AT(s,a,c);return s.inclusive?u>=0:u>0}(n.endAt,Rc(n),r))}(i,t)}function c5(i){return i.collectionGroup||(i.path.length%2==1?i.path.lastSegment():i.path.get(i.path.length-2))}function lx(i){return(t,e)=>{let n=!1;for(let r of Rc(i)){let o=d5(r,t,e);if(o!==0)return o;n=n||r.field.isKeyField()}return 0}}function d5(i,t,e){let n=i.field.isKeyField()?Be.comparator(t.key,e.key):function(o,s,a){let c=s.data.field(o),u=a.data.field(o);return c!==null&&u!==null?ba(c,u):He()}(i.field,t,e);switch(i.dir){case"asc":return n;case"desc":return-1*n;default:return He()}}var Eo=class{constructor(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={},this.innerSize=0}get(t){let e=this.mapKeyFn(t),n=this.inner[e];if(n!==void 0){for(let[r,o]of n)if(this.equalsFn(r,t))return o}}has(t){return this.get(t)!==void 0}set(t,e){let n=this.mapKeyFn(t),r=this.inner[n];if(r===void 0)return this.inner[n]=[[t,e]],void this.innerSize++;for(let o=0;o{for(let[r,o]of n)t(r,o)})}isEmpty(){return JT(this.inner)}size(){return this.innerSize}};var u5=new ai(Be.comparator);function Br(){return u5}var cx=new ai(Be.comparator);function Dc(...i){let t=cx;for(let e of i)t=t.insert(e.key,e);return t}function dx(i){let t=cx;return i.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t}function ps(){return Vc()}function ux(){return Vc()}function Vc(){return new Eo(i=>i.toString(),(i,t)=>i.isEqual(t))}var p5=new ai(Be.comparator),h5=new $i(Be.comparator);function lt(...i){let t=h5;for(let e of i)t=t.add(e);return t}var m5=new $i(St);function f5(){return m5}function px(i,t){if(i.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Fc(t)?"-0":t}}function hx(i){return{integerValue:""+i}}function g5(i,t){return JR(t)?hx(t):px(i,t)}var xa=class{constructor(){this._=void 0}};function _5(i,t,e){return i instanceof Sa?function(r,o){let s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return o&&tv(o)&&(o=iv(o)),o&&(s.fields.__previous_value__=o),{mapValue:s}}(e,t):i instanceof vs?fx(i,t):i instanceof ys?gx(i,t):function(r,o){let s=mx(r,o),a=VT(s)+VT(r.Ie);return k0(s)&&k0(r.Ie)?hx(a):px(r.serializer,a)}(i,t)}function v5(i,t,e){return i instanceof vs?fx(i,t):i instanceof ys?gx(i,t):e}function mx(i,t){return i instanceof Ea?function(n){return k0(n)||function(o){return!!o&&"doubleValue"in o}(n)}(t)?t:{integerValue:0}:null}var Sa=class extends xa{},vs=class extends xa{constructor(t){super(),this.elements=t}};function fx(i,t){let e=_x(t);for(let n of i.elements)e.some(r=>yr(r,n))||e.push(n);return{arrayValue:{values:e}}}var ys=class extends xa{constructor(t){super(),this.elements=t}};function gx(i,t){let e=_x(t);for(let n of i.elements)e=e.filter(r=>!yr(r,n));return{arrayValue:{values:e}}}var Ea=class extends xa{constructor(t,e){super(),this.serializer=t,this.Ie=e}};function VT(i){return si(i.integerValue||i.doubleValue)}function _x(i){return nv(i)&&i.arrayValue.values?i.arrayValue.values.slice():[]}function y5(i,t){return i.field.isEqual(t.field)&&function(n,r){return n instanceof vs&&r instanceof vs||n instanceof ys&&r instanceof ys?ya(n.elements,r.elements,yr):n instanceof Ea&&r instanceof Ea?yr(n.Ie,r.Ie):n instanceof Sa&&r instanceof Sa}(i.transform,t.transform)}var j0=class{constructor(t,e){this.version=t,this.transformResults=e}},To=class i{constructor(t,e){this.updateTime=t,this.exists=e}static none(){return new i}static exists(t){return new i(void 0,t)}static updateTime(t){return new i(t)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}};function Op(i,t){return i.updateTime!==void 0?t.isFoundDocument()&&t.version.isEqual(i.updateTime):i.exists===void 0||i.exists===t.isFoundDocument()}var Oa=class{};function vx(i,t){if(!i.hasLocalMutations||t&&t.fields.length===0)return null;if(t===null)return i.isNoDocument()?new Fp(i.key,To.none()):new bs(i.key,i.data,To.none());{let e=i.data,n=yn.empty(),r=new $i(bn.comparator);for(let o of t.fields)if(!r.has(o)){let s=e.field(o);s===null&&o.length>1&&(o=o.popLast(),s=e.field(o)),s===null?n.delete(o):n.set(o,s),r=r.add(o)}return new Cr(i.key,n,new Dn(r.toArray()),To.none())}}function b5(i,t,e){i instanceof bs?function(r,o,s){let a=r.value.clone(),c=FT(r.fieldTransforms,o,s.transformResults);a.setAll(c),o.convertToFoundDocument(s.version,a).setHasCommittedMutations()}(i,t,e):i instanceof Cr?function(r,o,s){if(!Op(r.precondition,o))return void o.convertToUnknownDocument(s.version);let a=FT(r.fieldTransforms,o,s.transformResults),c=o.data;c.setAll(yx(r)),c.setAll(a),o.convertToFoundDocument(s.version,c).setHasCommittedMutations()}(i,t,e):function(r,o,s){o.convertToNoDocument(s.version).setHasCommittedMutations()}(0,t,e)}function Lc(i,t,e,n){return i instanceof bs?function(o,s,a,c){if(!Op(o.precondition,s))return a;let u=o.value.clone(),f=NT(o.fieldTransforms,c,s);return u.setAll(f),s.convertToFoundDocument(s.version,u).setHasLocalMutations(),null}(i,t,e,n):i instanceof Cr?function(o,s,a,c){if(!Op(o.precondition,s))return a;let u=NT(o.fieldTransforms,c,s),f=s.data;return f.setAll(yx(o)),f.setAll(u),s.convertToFoundDocument(s.version,f).setHasLocalMutations(),a===null?null:a.unionWith(o.fieldMask.fields).unionWith(o.fieldTransforms.map(v=>v.field))}(i,t,e,n):function(o,s,a){return Op(o.precondition,s)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):a}(i,t,e)}function C5(i,t){let e=null;for(let n of i.fieldTransforms){let r=t.data.field(n.field),o=mx(n.transform,r||null);o!=null&&(e===null&&(e=yn.empty()),e.set(n.field,o))}return e||null}function LT(i,t){return i.type===t.type&&!!i.key.isEqual(t.key)&&!!i.precondition.isEqual(t.precondition)&&!!function(n,r){return n===void 0&&r===void 0||!(!n||!r)&&ya(n,r,(o,s)=>y5(o,s))}(i.fieldTransforms,t.fieldTransforms)&&(i.type===0?i.value.isEqual(t.value):i.type!==1||i.data.isEqual(t.data)&&i.fieldMask.isEqual(t.fieldMask))}var bs=class extends Oa{constructor(t,e,n,r=[]){super(),this.key=t,this.value=e,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}},Cr=class extends Oa{constructor(t,e,n,r,o=[]){super(),this.key=t,this.data=e,this.fieldMask=n,this.precondition=r,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}};function yx(i){let t=new Map;return i.fieldMask.fields.forEach(e=>{if(!e.isEmpty()){let n=i.data.field(e);t.set(e,n)}}),t}function FT(i,t,e){let n=new Map;Nt(i.length===e.length);for(let r=0;r{let o=t.get(r.key),s=o.overlayedDocument,a=this.applyToLocalView(s,o.mutatedFields);a=e.has(r.key)?null:a;let c=vx(s,a);c!==null&&n.set(r.key,c),s.isValidDocument()||s.convertToNoDocument(Ye.min())}),n}keys(){return this.mutations.reduce((t,e)=>t.add(e.key),lt())}isEqual(t){return this.batchId===t.batchId&&ya(this.mutations,t.mutations,(e,n)=>LT(e,n))&&ya(this.baseMutations,t.baseMutations,(e,n)=>LT(e,n))}},$0=class i{constructor(t,e,n,r){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.docVersions=r}static from(t,e,n){Nt(t.mutations.length===n.length);let r=function(){return p5}(),o=t.mutations;for(let s=0;s=i.i.j-(i.m?1:0)?!1:i.m?(i.j=t.F.concat(i.j),!0):i.H==1||i.H==2||i.C>=(i.cb?0:i.eb)?!1:(i.m=wc(ji(i.Na,i,t),uT(i,i.C)),i.C++,!0)}de.Na=function(i){if(this.m)if(this.m=null,this.H==1){if(!i){this.W=Math.floor(1e5*Math.random()),i=this.W++;let r=new xc(this,this.l,i),o=this.s;if(this.U&&(o?(o=bw(o),Cw(o,this.U)):o=this.U),this.o!==null||this.O||(r.I=o,o=null),this.P)e:{for(var t=0,e=0;eu)o=Math.max(0,r[c].g-100),a=!1;else try{FR(f,s,"req"+u+"_")}catch{n&&n(f)}}if(a){n=s.join("&");break e}}}return i=i.j.splice(0,e),t.F=i,n}function lT(i){if(!i.g&&!i.u){i.ba=1;var t=i.Ma;fc||Ow(),gc||(fc(),gc=!0),Xg.add(t,i),i.A=0}}function l0(i){return i.g||i.u||3<=i.A?!1:(i.ba++,i.u=wc(ji(i.Ma,i),uT(i,i.A)),i.A++,!0)}de.Ma=function(){if(this.u=null,cT(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var i=2*this.S;this.l.info("BP detection timer enabled: "+i),this.B=wc(ji(this.jb,this),i)}};de.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Xi(10),Ip(this),cT(this))};function c0(i){i.B!=null&&(Ge.clearTimeout(i.B),i.B=null)}function cT(i){i.g=new xc(i,i.l,"rpc",i.ba),i.o===null&&(i.g.I=i.s),i.g.O=0;var t=Nr(i.wa);Ut(t,"RID","rpc"),Ut(t,"SID",i.K),Ut(t,"AID",i.V),Ut(t,"CI",i.G?"0":"1"),!i.G&&i.qa&&Ut(t,"TO",i.qa),Ut(t,"TYPE","xmlhttp"),Mc(i,t),i.o&&i.s&&s0(t,i.o,i.s),i.L&&i.g.setTimeout(i.L);var e=i.g;i=i.pa,e.L=1,e.A=yp(Nr(t)),e.u=null,e.S=!0,Bw(e,i)}de.ib=function(){this.v!=null&&(this.v=null,Ip(this),l0(this),Xi(19))};function op(i){i.v!=null&&(Ge.clearTimeout(i.v),i.v=null)}function dT(i,t){var e=null;if(i.g==t){op(i),c0(i),i.g=null;var n=2}else if(zg(i.i,t))e=t.F,Zw(i.i,t),n=1;else return;if(i.H!=0){if(t.i)if(n==1){e=t.u?t.u.length:0,t=Date.now()-t.G;var r=i.C;n=fp(),Pi(n,new Rw(n,e)),wp(i)}else lT(i);else if(r=t.s,r==3||r==0&&0r;++r)n[r]=t.charCodeAt(e++)|t.charCodeAt(e++)<<8|t.charCodeAt(e++)<<16|t.charCodeAt(e++)<<24;else for(r=0;16>r;++r)n[r]=t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24;t=i.g[0],e=i.g[1],r=i.g[2];var o=i.g[3],s=t+(o^e&(r^o))+n[0]+3614090360&4294967295;t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[1]+3905402710&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[2]+606105819&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[3]+3250441966&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(o^e&(r^o))+n[4]+4118548399&4294967295,t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[5]+1200080426&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[6]+2821735955&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[7]+4249261313&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(o^e&(r^o))+n[8]+1770035416&4294967295,t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[9]+2336552879&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[10]+4294925233&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[11]+2304563134&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(o^e&(r^o))+n[12]+1804603682&4294967295,t=e+(s<<7&4294967295|s>>>25),s=o+(r^t&(e^r))+n[13]+4254626195&4294967295,o=t+(s<<12&4294967295|s>>>20),s=r+(e^o&(t^e))+n[14]+2792965006&4294967295,r=o+(s<<17&4294967295|s>>>15),s=e+(t^r&(o^t))+n[15]+1236535329&4294967295,e=r+(s<<22&4294967295|s>>>10),s=t+(r^o&(e^r))+n[1]+4129170786&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[6]+3225465664&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[11]+643717713&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[0]+3921069994&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(r^o&(e^r))+n[5]+3593408605&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[10]+38016083&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[15]+3634488961&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[4]+3889429448&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(r^o&(e^r))+n[9]+568446438&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[14]+3275163606&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[3]+4107603335&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[8]+1163531501&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(r^o&(e^r))+n[13]+2850285829&4294967295,t=e+(s<<5&4294967295|s>>>27),s=o+(e^r&(t^e))+n[2]+4243563512&4294967295,o=t+(s<<9&4294967295|s>>>23),s=r+(t^e&(o^t))+n[7]+1735328473&4294967295,r=o+(s<<14&4294967295|s>>>18),s=e+(o^t&(r^o))+n[12]+2368359562&4294967295,e=r+(s<<20&4294967295|s>>>12),s=t+(e^r^o)+n[5]+4294588738&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[8]+2272392833&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[11]+1839030562&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[14]+4259657740&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(e^r^o)+n[1]+2763975236&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[4]+1272893353&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[7]+4139469664&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[10]+3200236656&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(e^r^o)+n[13]+681279174&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[0]+3936430074&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[3]+3572445317&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[6]+76029189&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(e^r^o)+n[9]+3654602809&4294967295,t=e+(s<<4&4294967295|s>>>28),s=o+(t^e^r)+n[12]+3873151461&4294967295,o=t+(s<<11&4294967295|s>>>21),s=r+(o^t^e)+n[15]+530742520&4294967295,r=o+(s<<16&4294967295|s>>>16),s=e+(r^o^t)+n[2]+3299628645&4294967295,e=r+(s<<23&4294967295|s>>>9),s=t+(r^(e|~o))+n[0]+4096336452&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[7]+1126891415&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[14]+2878612391&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[5]+4237533241&4294967295,e=r+(s<<21&4294967295|s>>>11),s=t+(r^(e|~o))+n[12]+1700485571&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[3]+2399980690&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[10]+4293915773&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[1]+2240044497&4294967295,e=r+(s<<21&4294967295|s>>>11),s=t+(r^(e|~o))+n[8]+1873313359&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[15]+4264355552&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[6]+2734768916&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[13]+1309151649&4294967295,e=r+(s<<21&4294967295|s>>>11),s=t+(r^(e|~o))+n[4]+4149444226&4294967295,t=e+(s<<6&4294967295|s>>>26),s=o+(e^(t|~r))+n[11]+3174756917&4294967295,o=t+(s<<10&4294967295|s>>>22),s=r+(t^(o|~e))+n[2]+718787259&4294967295,r=o+(s<<15&4294967295|s>>>17),s=e+(o^(r|~t))+n[9]+3951481745&4294967295,i.g[0]=i.g[0]+t&4294967295,i.g[1]=i.g[1]+(r+(s<<21&4294967295|s>>>11))&4294967295,i.g[2]=i.g[2]+r&4294967295,i.g[3]=i.g[3]+o&4294967295}Un.prototype.j=function(i,t){t===void 0&&(t=i.length);for(var e=t-this.blockSize,n=this.m,r=this.h,o=0;othis.h?this.blockSize:2*this.blockSize)-this.h);i[0]=128;for(var t=1;tt;++t)for(var n=0;32>n;n+=8)i[e++]=this.g[t]>>>n&255;return i};function Dt(i,t){this.h=t;for(var e=[],n=!0,r=i.length-1;0<=r;r--){var o=i[r]|0;n&&o==t||(e[r]=o,n=!1)}this.g=e}var qR={};function d0(i){return-128<=i&&128>i?rR(i,function(t){return new Dt([t|0],0>t?-1:0)}):new Dt([i|0],0>i?-1:0)}function mr(i){if(isNaN(i)||!isFinite(i))return ca;if(0>i)return Di(mr(-i));for(var t=[],e=1,n=0;i>=e;n++)t[n]=i/e|0,e*=Ug;return new Dt(t,0)}function vT(i,t){if(i.length==0)throw Error("number format error: empty string");if(t=t||10,2>t||36o?(o=mr(Math.pow(t,o)),n=n.R(o).add(mr(s))):(n=n.R(e),n=n.add(mr(s)))}return n}var Ug=4294967296,ca=d0(0),jg=d0(1),mw=d0(16777216);de=Dt.prototype;de.ea=function(){if(An(this))return-Di(this).ea();for(var i=0,t=1,e=0;ei||36>>0).toString(i);if(e=r,Fr(e))return o+n;for(;6>o.length;)o="0"+o;n=o+n}};de.D=function(i){return 0>i?0:i>>16)+(this.D(r)>>>16)+(i.D(r)>>>16);n=s>>>16,o&=65535,s&=65535,e[r]=s<<16|o}return new Dt(e,e[e.length-1]&-2147483648?-1:0)};function ap(i,t){return i.add(Di(t))}de.R=function(i){if(Fr(this)||Fr(i))return ca;if(An(this))return An(i)?Di(this).R(Di(i)):Di(Di(this).R(i));if(An(i))return Di(this.R(Di(i)));if(0>this.X(mw)&&0>i.X(mw))return mr(this.ea()*i.ea());for(var t=this.g.length+i.g.length,e=[],n=0;n<2*t;n++)e[n]=0;for(n=0;n>>16,s=this.D(n)&65535,a=i.D(r)>>>16,c=i.D(r)&65535;e[2*n+2*r]+=s*c,ip(e,2*n+2*r),e[2*n+2*r+1]+=o*c,ip(e,2*n+2*r+1),e[2*n+2*r+1]+=s*a,ip(e,2*n+2*r+1),e[2*n+2*r+2]+=o*a,ip(e,2*n+2*r+2)}for(n=0;n>>16,i[t]&=65535,t++}function cc(i,t){this.g=i,this.h=t}function lp(i,t){if(Fr(t))throw Error("division by zero");if(Fr(i))return new cc(ca,ca);if(An(i))return t=lp(Di(i),t),new cc(Di(t.g),Di(t.h));if(An(t))return t=lp(i,Di(t)),new cc(Di(t.g),t.h);if(30=n.X(i);)e=fw(e),n=fw(n);var r=aa(e,1),o=aa(n,1);for(n=aa(n,2),e=aa(e,2);!Fr(n);){var s=o.add(n);0>=s.X(i)&&(r=r.add(e),o=s),n=aa(n,1),e=aa(e,1)}return t=ap(i,r.R(t)),new cc(r,t)}for(r=ca;0<=i.X(t);){for(e=Math.max(1,Math.floor(i.ea()/t.ea())),n=Math.ceil(Math.log(e)/Math.LN2),n=48>=n?1:Math.pow(2,n-48),o=mr(e),s=o.R(t);An(s)||0>>31;return new Dt(e,i.h)}function aa(i,t){var e=t>>5;t%=32;for(var n=i.g.length-e,r=[],o=0;o>>t|i.D(o+e+1)<<32-t:i.D(o+e);return new Dt(r,i.h)}sp.prototype.createWebChannel=sp.prototype.g;vn.prototype.send=vn.prototype.u;vn.prototype.open=vn.prototype.m;vn.prototype.close=vn.prototype.close;gp.NO_ERROR=0;gp.TIMEOUT=8;gp.HTTP_ERROR=6;Vw.COMPLETE="complete";Lw.EventType=Tc;Tc.OPEN="a";Tc.CLOSE="b";Tc.ERROR="c";Tc.MESSAGE="d";Ti.prototype.listen=Ti.prototype.O;oi.prototype.listenOnce=oi.prototype.P;oi.prototype.getLastError=oi.prototype.Sa;oi.prototype.getLastErrorCode=oi.prototype.Ia;oi.prototype.getStatus=oi.prototype.da;oi.prototype.getResponseJson=oi.prototype.Wa;oi.prototype.getResponseText=oi.prototype.ja;oi.prototype.send=oi.prototype.ha;oi.prototype.setWithCredentials=oi.prototype.Oa;Un.prototype.digest=Un.prototype.l;Un.prototype.reset=Un.prototype.reset;Un.prototype.update=Un.prototype.j;Dt.prototype.add=Dt.prototype.add;Dt.prototype.multiply=Dt.prototype.R;Dt.prototype.modulo=Dt.prototype.gb;Dt.prototype.compare=Dt.prototype.X;Dt.prototype.toNumber=Dt.prototype.ea;Dt.prototype.toString=Dt.prototype.toString;Dt.prototype.getBits=Dt.prototype.D;Dt.fromNumber=mr;Dt.fromString=vT;var yT=jn.createWebChannelTransport=function(){return new sp},bT=jn.getStatEventTarget=function(){return fp()},Tp=jn.ErrorCode=gp,CT=jn.EventType=Vw,IT=jn.Event=cs,u0=jn.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},qte=jn.FetchXmlHttpFactory=Ec,kc=jn.WebChannel=Lw,wT=jn.XhrIo=oi,TT=jn.Md5=Un,ds=jn.Integer=Dt;var xT="@firebase/firestore";var Si=class{constructor(t){this.uid=t}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}};Si.UNAUTHENTICATED=new Si(null),Si.GOOGLE_CREDENTIALS=new Si("google-credentials-uid"),Si.FIRST_PARTY=new Si("first-party-uid"),Si.MOCK_USER=new Si("mock-user");var Da="10.8.0";var fs=new yo("@firebase/firestore");function Ac(){return fs.logLevel}function ue(i,...t){if(fs.logLevel<=at.DEBUG){let e=t.map(J_);fs.debug(`Firestore (${Da}): ${i}`,...e)}}function yr(i,...t){if(fs.logLevel<=at.ERROR){let e=t.map(J_);fs.error(`Firestore (${Da}): ${i}`,...e)}}function va(i,...t){if(fs.logLevel<=at.WARN){let e=t.map(J_);fs.warn(`Firestore (${Da}): ${i}`,...e)}}function J_(i){if(typeof i=="string")return i;try{return function(e){return JSON.stringify(e)}(i)}catch{return i}}function je(i="Unexpected state"){let t=`FIRESTORE (${Da}) INTERNAL ASSERTION FAILED: `+i;throw yr(t),new Error(t)}function Nt(i,t){i||je()}function Ze(i,t){return i}var te={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Ee=class extends Zi{constructor(t,e){super(t,e),this.code=t,this.message=e,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}};var Hn=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var Mp=class{constructor(t,e){this.user=e,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}},g0=class{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,e){t.enqueueRetryable(()=>e(Si.UNAUTHENTICATED))}shutdown(){}},_0=class{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,e){this.changeListener=e,t.enqueueRetryable(()=>e(this.token.user))}shutdown(){this.changeListener=null}},v0=class{constructor(t){this.t=t,this.currentUser=Si.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,e){let n=this.i,r=c=>this.i!==n?(n=this.i,e(c)):Promise.resolve(),o=new Hn;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new Hn,t.enqueueRetryable(()=>r(this.currentUser))};let s=()=>{let c=o;t.enqueueRetryable(()=>D(this,null,function*(){yield c.promise,yield r(this.currentUser)}))},a=c=>{ue("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(c=>a(c)),setTimeout(()=>{if(!this.auth){let c=this.t.getImmediate({optional:!0});c?a(c):(ue("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new Hn)}},0),s()}getToken(){let t=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then(n=>this.i!==t?(ue("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):n?(Nt(typeof n.accessToken=="string"),new Mp(n.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let t=this.auth&&this.auth.getUid();return Nt(t===null||typeof t=="string"),new Si(t)}},y0=class{constructor(t,e,n){this.l=t,this.h=e,this.P=n,this.type="FirstParty",this.user=Si.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let t=this.T();return t&&this.I.set("Authorization",t),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}},b0=class{constructor(t,e,n){this.l=t,this.h=e,this.P=n}getToken(){return Promise.resolve(new y0(this.l,this.h,this.P))}start(t,e){t.enqueueRetryable(()=>e(Si.FIRST_PARTY))}shutdown(){}invalidateToken(){}},C0=class{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}},I0=class{constructor(t){this.A=t,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(t,e){let n=o=>{o.error!=null&&ue("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);let s=o.token!==this.R;return this.R=o.token,ue("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?e(o.token):Promise.resolve()};this.o=o=>{t.enqueueRetryable(()=>n(o))};let r=o=>{ue("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.appCheck.addTokenListener(this.o)};this.A.onInit(o=>r(o)),setTimeout(()=>{if(!this.appCheck){let o=this.A.getImmediate({optional:!0});o?r(o):ue("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then(e=>e?(Nt(typeof e.token=="string"),this.R=e.token,new C0(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}};function WR(i){let t=typeof self<"u"&&(self.crypto||self.msCrypto),e=new Uint8Array(i);if(t&&typeof t.getRandomValues=="function")t.getRandomValues(e);else for(let n=0;nt?1:0}function ya(i,t,e){return i.length===t.length&&i.every((n,r)=>e(n,t[r]))}var Ri=class i{constructor(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new Ee(te.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new Ee(te.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new Ee(te.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Ee(te.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return i.fromMillis(Date.now())}static fromDate(t){return i.fromMillis(t.getTime())}static fromMillis(t){let e=Math.floor(t/1e3),n=Math.floor(1e6*(t-1e3*e));return new i(e,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?St(this.nanoseconds,t.nanoseconds):St(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){let t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}};var Ye=class i{constructor(t){this.timestamp=t}static fromTimestamp(t){return new i(t)}static min(){return new i(new Ri(0,0))}static max(){return new i(new Ri(253402300799,999999999))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}};var Ap=class i{constructor(t,e,n){e===void 0?e=0:e>t.length&&je(),n===void 0?n=t.length-e:n>t.length-e&&je(),this.segments=t,this.offset=e,this.len=n}get length(){return this.len}isEqual(t){return i.comparator(this,t)===0}child(t){let e=this.segments.slice(this.offset,this.limit());return t instanceof i?t.forEach(n=>{e.push(n)}):e.push(t),this.construct(e)}limit(){return this.offset+this.length}popFirst(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return this.length===0}isPrefixOf(t){if(t.lengths)return 1}return t.lengthe.length?1:0}},gi=class i extends Ap{construct(t,e,n){return new i(t,e,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){let e=[];for(let n of t){if(n.indexOf("//")>=0)throw new Ee(te.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);e.push(...n.split("/").filter(r=>r.length>0))}return new i(e)}static emptyPath(){return new i([])}},KR=/^[_a-zA-Z][_a-zA-Z0-9]*$/,bn=class i extends Ap{construct(t,e,n){return new i(t,e,n)}static isValidIdentifier(t){return KR.test(t)}canonicalString(){return this.toArray().map(t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),i.isValidIdentifier(t)||(t="`"+t+"`"),t)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new i(["__name__"])}static fromServerFormat(t){let e=[],n="",r=0,o=()=>{if(n.length===0)throw new Ee(te.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(n),n=""},s=!1;for(;r=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return t!==null&&gi.comparator(this.path,t.path)===0}toString(){return this.path.toString()}static comparator(t,e){return gi.comparator(t.path,e.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new i(new gi(t.slice()))}};var w0=class{constructor(t,e,n,r){this.indexId=t,this.collectionGroup=e,this.fields=n,this.indexState=r}};w0.UNKNOWN_ID=-1;function QR(i,t){let e=i.toTimestamp().seconds,n=i.toTimestamp().nanoseconds+1,r=Ye.fromTimestamp(n===1e9?new Ri(e+1,0):new Ri(e,n));return new gs(r,Be.empty(),t)}function YR(i){return new gs(i.readTime,i.key,-1)}var gs=class i{constructor(t,e,n){this.readTime=t,this.documentKey=e,this.largestBatchId=n}static min(){return new i(Ye.min(),Be.empty(),-1)}static max(){return new i(Ye.max(),Be.empty(),-1)}};function ZR(i,t){let e=i.readTime.compareTo(t.readTime);return e!==0?e:(e=Be.comparator(i.documentKey,t.documentKey),e!==0?e:St(i.largestBatchId,t.largestBatchId))}var XR="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",T0=class{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(t=>t())}};function Qc(i){return D(this,null,function*(){if(i.code!==te.FAILED_PRECONDITION||i.message!==XR)throw i;ue("LocalStore","Unexpectedly lost primary lease")})}var ne=class i{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(t){return this.next(void 0,t)}next(t,e){return this.callbackAttached&&je(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(t,this.result):new i((n,r)=>{this.nextCallback=o=>{this.wrapSuccess(t,o).next(n,r)},this.catchCallback=o=>{this.wrapFailure(e,o).next(n,r)}})}toPromise(){return new Promise((t,e)=>{this.next(t,e)})}wrapUserFunction(t){try{let e=t();return e instanceof i?e:i.resolve(e)}catch(e){return i.reject(e)}}wrapSuccess(t,e){return t?this.wrapUserFunction(()=>t(e)):i.resolve(e)}wrapFailure(t,e){return t?this.wrapUserFunction(()=>t(e)):i.reject(e)}static resolve(t){return new i((e,n)=>{e(t)})}static reject(t){return new i((e,n)=>{n(t)})}static waitFor(t){return new i((e,n)=>{let r=0,o=0,s=!1;t.forEach(a=>{++r,a.next(()=>{++o,s&&o===r&&e()},c=>n(c))}),s=!0,o===r&&e()})}static or(t){let e=i.resolve(!1);for(let n of t)e=e.next(r=>r?i.resolve(r):n());return e}static forEach(t,e){let n=[];return t.forEach((r,o)=>{n.push(e.call(this,r,o))}),this.waitFor(n)}static mapArray(t,e){return new i((n,r)=>{let o=t.length,s=new Array(o),a=0;for(let c=0;c{s[u]=f,++a,a===o&&n(s)},f=>r(f))}})}static doWhile(t,e){return new i((n,r)=>{let o=()=>{t()===!0?e().next(()=>{o()},r):n()};o()})}};var x0=class i{constructor(t,e){this.action=t,this.transaction=e,this.aborted=!1,this.V=new Hn,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{e.error?this.V.reject(new ms(t,e.error)):this.V.resolve()},this.transaction.onerror=n=>{let r=ev(n.target.error);this.V.reject(new ms(t,r))}}static open(t,e,n,r){try{return new i(e,t.transaction(r,n))}catch(o){throw new ms(e,o)}}get m(){return this.V.promise}abort(t){t&&this.V.reject(t),this.aborted||(ue("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){let t=this.transaction;this.aborted||typeof t.commit!="function"||t.commit()}store(t){let e=this.transaction.objectStore(t);return new E0(e)}},Dp=class i{constructor(t,e,n){this.name=t,this.version=e,this.p=n,i.S(ri())===12.2&&yr("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return ue("SimpleDb","Removing database:",t),us(window.indexedDB.deleteDatabase(t)).toPromise()}static D(){if(!qu())return!1;if(i.C())return!0;let t=ri(),e=i.S(t),n=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||n||o)}static C(){var t;return typeof process<"u"&&((t=process.__PRIVATE_env)===null||t===void 0?void 0:t.F)==="YES"}static M(t,e){return t.store(e)}static S(t){let e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)}static v(t){let e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}O(t){return D(this,null,function*(){return this.db||(ue("SimpleDb","Opening database:",this.name),this.db=yield new Promise((e,n)=>{let r=indexedDB.open(this.name,this.version);r.onsuccess=o=>{let s=o.target.result;e(s)},r.onblocked=()=>{n(new ms(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=o=>{let s=o.target.error;s.name==="VersionError"?n(new Ee(te.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):s.name==="InvalidStateError"?n(new Ee(te.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+s)):n(new ms(t,s))},r.onupgradeneeded=o=>{ue("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',o.oldVersion);let s=o.target.result;this.p.N(s,r.transaction,o.oldVersion,this.version).next(()=>{ue("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.B&&(this.db.onversionchange=e=>this.B(e)),this.db})}L(t){this.B=t,this.db&&(this.db.onversionchange=e=>t(e))}runTransaction(t,e,n,r){return D(this,null,function*(){let o=e==="readonly",s=0;for(;;){++s;try{this.db=yield this.O(t);let a=x0.open(this.db,t,o?"readonly":"readwrite",n),c=r(a).next(u=>(a.g(),u)).catch(u=>(a.abort(u),ne.reject(u))).toPromise();return c.catch(()=>{}),yield a.m,c}catch(a){let c=a,u=c.name!=="FirebaseError"&&s<3;if(ue("SimpleDb","Transaction failed with error:",c.message,"Retrying:",u),this.close(),!u)return Promise.reject(c)}}})}close(){this.db&&this.db.close(),this.db=void 0}},S0=class{constructor(t){this.k=t,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(t){this.k=t}done(){this.q=!0}U(t){this.K=t}delete(){return us(this.k.delete())}},ms=class extends Ee{constructor(t,e){super(te.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${e}`),this.name="IndexedDbTransactionError"}};function Yc(i){return i.name==="IndexedDbTransactionError"}var E0=class{constructor(t){this.store=t}put(t,e){let n;return e!==void 0?(ue("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(ue("SimpleDb","PUT",this.store.name,"",t),n=this.store.put(t)),us(n)}add(t){return ue("SimpleDb","ADD",this.store.name,t,t),us(this.store.add(t))}get(t){return us(this.store.get(t)).next(e=>(e===void 0&&(e=null),ue("SimpleDb","GET",this.store.name,t,e),e))}delete(t){return ue("SimpleDb","DELETE",this.store.name,t),us(this.store.delete(t))}count(){return ue("SimpleDb","COUNT",this.store.name),us(this.store.count())}W(t,e){let n=this.options(t,e),r=n.index?this.store.index(n.index):this.store;if(typeof r.getAll=="function"){let o=r.getAll(n.range);return new ne((s,a)=>{o.onerror=c=>{a(c.target.error)},o.onsuccess=c=>{s(c.target.result)}})}{let o=this.cursor(n),s=[];return this.G(o,(a,c)=>{s.push(c)}).next(()=>s)}}j(t,e){let n=this.store.getAll(t,e===null?void 0:e);return new ne((r,o)=>{n.onerror=s=>{o(s.target.error)},n.onsuccess=s=>{r(s.target.result)}})}H(t,e){ue("SimpleDb","DELETE ALL",this.store.name);let n=this.options(t,e);n.J=!1;let r=this.cursor(n);return this.G(r,(o,s,a)=>a.delete())}Y(t,e){let n;e?n=t:(n={},e=t);let r=this.cursor(n);return this.G(r,e)}Z(t){let e=this.cursor({});return new ne((n,r)=>{e.onerror=o=>{let s=ev(o.target.error);r(s)},e.onsuccess=o=>{let s=o.target.result;s?t(s.primaryKey,s.value).next(a=>{a?s.continue():n()}):n()}})}G(t,e){let n=[];return new ne((r,o)=>{t.onerror=s=>{o(s.target.error)},t.onsuccess=s=>{let a=s.target.result;if(!a)return void r();let c=new S0(a),u=e(a.primaryKey,a.value,c);if(u instanceof ne){let f=u.catch(v=>(c.done(),ne.reject(v)));n.push(f)}c.isDone?r():c.$===null?a.continue():a.continue(c.$)}}).next(()=>ne.waitFor(n))}options(t,e){let n;return t!==void 0&&(typeof t=="string"?n=t:e=t),{index:n,range:e}}cursor(t){let e="next";if(t.reverse&&(e="prev"),t.index){let n=this.store.index(t.index);return t.J?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)}};function us(i){return new ne((t,e)=>{i.onsuccess=n=>{let r=n.target.result;t(r)},i.onerror=n=>{let r=ev(n.target.error);e(r)}})}var ST=!1;function ev(i){let t=Dp.S(ri());if(t>=12.2&&t<13){let e="An internal error was encountered in the Indexed Database server";if(i.message.indexOf(e)>=0){let n=new Ee("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return ST||(ST=!0,setTimeout(()=>{throw n},0)),n}}return i}var XT=(()=>{class i{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.se(r),this.oe=r=>n.writeSequenceNumber(r))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.oe&&this.oe(e),e}}return i._e=-1,i})();function sh(i){return i==null}function Fc(i){return i===0&&1/i==-1/0}function JR(i){return typeof i=="number"&&Number.isInteger(i)&&!Fc(i)&&i<=Number.MAX_SAFE_INTEGER&&i>=Number.MIN_SAFE_INTEGER}var e5=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],iie=[...e5,"documentOverlays"],t5=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],i5=t5,nie=[...i5,"indexConfiguration","indexState","indexEntries"];function ET(i){let t=0;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&t++;return t}function Is(i,t){for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&t(e,i[e])}function JT(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t))return!1;return!0}var ai=class i{constructor(t,e){this.comparator=t,this.root=e||gr.EMPTY}insert(t,e){return new i(this.comparator,this.root.insert(t,e,this.comparator).copy(null,null,gr.BLACK,null,null))}remove(t){return new i(this.comparator,this.root.remove(t,this.comparator).copy(null,null,gr.BLACK,null,null))}get(t){let e=this.root;for(;!e.isEmpty();){let n=this.comparator(t,e.key);if(n===0)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null}indexOf(t){let e=0,n=this.root;for(;!n.isEmpty();){let r=this.comparator(t,n.key);if(r===0)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal((e,n)=>(t(e,n),!1))}toString(){let t=[];return this.inorderTraversal((e,n)=>(t.push(`${e}:${n}`),!1)),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new ga(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new ga(this.root,t,this.comparator,!1)}getReverseIterator(){return new ga(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new ga(this.root,t,this.comparator,!0)}},ga=class{constructor(t,e,n,r){this.isReverse=r,this.nodeStack=[];let o=1;for(;!t.isEmpty();)if(o=e?n(t.key,e):1,e&&r&&(o*=-1),o<0)t=this.isReverse?t.left:t.right;else{if(o===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop(),e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;let t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}},gr=class i{constructor(t,e,n,r,o){this.key=t,this.value=e,this.color=n??i.RED,this.left=r??i.EMPTY,this.right=o??i.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,e,n,r,o){return new i(t??this.key,e??this.value,n??this.color,r??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,e,n){let r=this,o=n(t,r.key);return r=o<0?r.copy(null,null,null,r.left.insert(t,e,n),null):o===0?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return i.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,e){let n,r=this;if(e(t,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(t,e),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),e(t,r.key)===0){if(r.right.isEmpty())return i.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(t,e))}return r.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){let t=this.copy(null,null,i.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){let t=this.copy(null,null,i.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){let t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)}checkMaxDepth(){let t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw je();let t=this.left.check();if(t!==this.right.check())throw je();return t+(this.isRed()?0:1)}};gr.EMPTY=null,gr.RED=!0,gr.BLACK=!1;gr.EMPTY=new class{constructor(){this.size=0}get key(){throw je()}get value(){throw je()}get color(){throw je()}get left(){throw je()}get right(){throw je()}copy(t,e,n,r,o){return this}insert(t,e,n){return new gr(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};var $i=class i{constructor(t){this.comparator=t,this.data=new ai(this.comparator)}has(t){return this.data.get(t)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal((e,n)=>(t(e),!1))}forEachInRange(t,e){let n=this.data.getIteratorFrom(t[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}}forEachWhile(t,e){let n;for(n=e!==void 0?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();)if(!t(n.getNext().key))return}firstAfterOrEqual(t){let e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null}getIterator(){return new Pp(this.data.getIterator())}getIteratorFrom(t){return new Pp(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let e=this;return e.size{e=e.add(n)}),e}isEqual(t){if(!(t instanceof i)||this.size!==t.size)return!1;let e=this.data.getIterator(),n=t.data.getIterator();for(;e.hasNext();){let r=e.getNext().key,o=n.getNext().key;if(this.comparator(r,o)!==0)return!1}return!0}toArray(){let t=[];return this.forEach(e=>{t.push(e)}),t}toString(){let t=[];return this.forEach(e=>t.push(e)),"SortedSet("+t.toString()+")"}copy(t){let e=new i(this.comparator);return e.data=t,e}},Pp=class{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}};var Dn=class i{constructor(t){this.fields=t,t.sort(bn.comparator)}static empty(){return new i([])}unionWith(t){let e=new $i(bn.comparator);for(let n of this.fields)e=e.add(n);for(let n of t)e=e.add(n);return new i(e.toArray())}covers(t){for(let e of this.fields)if(e.isPrefixOf(t))return!0;return!1}isEqual(t){return ya(this.fields,t.fields,(e,n)=>e.isEqual(n))}};var Rp=class extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}};var Ji=class i{constructor(t){this.binaryString=t}static fromBase64String(t){let e=function(r){try{return atob(r)}catch(o){throw typeof DOMException<"u"&&o instanceof DOMException?new Rp("Invalid base64 string: "+o):o}}(t);return new i(e)}static fromUint8Array(t){let e=function(r){let o="";for(let s=0;stbr(e,t))!==void 0}function ba(i,t){if(i===t)return 0;let e=_s(i),n=_s(t);if(e!==n)return St(e,n);switch(e){case 0:case 9007199254740991:return 0;case 1:return St(i.booleanValue,t.booleanValue);case 2:return function(o,s){let a=si(o.integerValue||o.doubleValue),c=si(s.integerValue||s.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(i,t);case 3:return OT(i.timestampValue,t.timestampValue);case 4:return OT(Nc(i),Nc(t));case 5:return St(i.stringValue,t.stringValue);case 6:return function(o,s){let a=So(o),c=So(s);return a.compareTo(c)}(i.bytesValue,t.bytesValue);case 7:return function(o,s){let a=o.split("/"),c=s.split("/");for(let u=0;ut.mapValue.fields[e]=Pc(n)),t}if(i.arrayValue){let t={arrayValue:{values:[]}};for(let e=0;e<(i.arrayValue.values||[]).length;++e)t.arrayValue.values[e]=Pc(i.arrayValue.values[e]);return t}return Object.assign({},i)}function ex(i){return(((i.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}var yn=class i{constructor(t){this.value=t}static empty(){return new i({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let e=this.value;for(let n=0;n{if(!e.isImmediateParentOf(a)){let c=this.getFieldsMap(e);this.applyChanges(c,n,r),n={},r=[],e=a.popLast()}s?n[a.lastSegment()]=Pc(s):r.push(a.lastSegment())});let o=this.getFieldsMap(e);this.applyChanges(o,n,r)}delete(t){let e=this.field(t.popLast());Ep(e)&&e.mapValue.fields&&delete e.mapValue.fields[t.lastSegment()]}isEqual(t){return br(this.value,t.value)}getFieldsMap(t){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let n=0;nt[r]=o);for(let r of n)delete t[r]}clone(){return new i(Pc(this.value))}};function tx(i){let t=[];return Is(i.fields,(e,n)=>{let r=new bn([e]);if(Ep(n)){let o=tx(n.mapValue).fields;if(o.length===0)t.push(r);else for(let s of o)t.push(r.child(s))}else t.push(r)}),new Dn(t)}var Gn=class i{constructor(t,e,n,r,o,s,a){this.key=t,this.documentType=e,this.version=n,this.readTime=r,this.createTime=o,this.data=s,this.documentState=a}static newInvalidDocument(t){return new i(t,0,Ye.min(),Ye.min(),Ye.min(),yn.empty(),0)}static newFoundDocument(t,e,n,r){return new i(t,1,e,Ye.min(),n,r,0)}static newNoDocument(t,e){return new i(t,2,e,Ye.min(),Ye.min(),yn.empty(),0)}static newUnknownDocument(t,e){return new i(t,3,e,Ye.min(),Ye.min(),yn.empty(),2)}convertToFoundDocument(t,e){return!this.createTime.isEqual(Ye.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=t),this.version=t,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=yn.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=yn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ye.min(),this}setReadTime(t){return this.readTime=t,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(t){return t instanceof i&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new i(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}};var Ia=class{constructor(t,e){this.position=t,this.inclusive=e}};function AT(i,t,e){let n=0;for(let r=0;r":return t>0;case">=":return t>=0;default:return je()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}},Cr=class i extends Lp{constructor(t,e){super(),this.filters=t,this.op=e,this.ue=null}static create(t,e){return new i(t,e)}matches(t){return ix(this)?this.filters.find(e=>!e.matches(t))===void 0:this.filters.find(e=>e.matches(t))!==void 0}getFlattenedFilters(){return this.ue!==null||(this.ue=this.filters.reduce((t,e)=>t.concat(e.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}};function ix(i){return i.op==="and"}function nx(i){return o5(i)&&ix(i)}function o5(i){for(let t of i.filters)if(t instanceof Cr)return!1;return!0}function A0(i){if(i instanceof bi)return i.field.canonicalString()+i.op.toString()+Ca(i.value);if(nx(i))return i.filters.map(t=>A0(t)).join(",");{let t=i.filters.map(e=>A0(e)).join(",");return`${i.op}(${t})`}}function rx(i,t){return i instanceof bi?function(n,r){return r instanceof bi&&n.op===r.op&&n.field.isEqual(r.field)&&br(n.value,r.value)}(i,t):i instanceof Cr?function(n,r){return r instanceof Cr&&n.op===r.op&&n.filters.length===r.filters.length?n.filters.reduce((o,s,a)=>o&&rx(s,r.filters[a]),!0):!1}(i,t):void je()}function ox(i){return i instanceof bi?function(e){return`${e.field.canonicalString()} ${e.op} ${Ca(e.value)}`}(i):i instanceof Cr?function(e){return e.op.toString()+" {"+e.getFilters().map(ox).join(" ,")+"}"}(i):"Filter"}var D0=class extends bi{constructor(t,e,n){super(t,e,n),this.key=Be.fromName(n.referenceValue)}matches(t){let e=Be.comparator(t.key,this.key);return this.matchesComparison(e)}},P0=class extends bi{constructor(t,e){super(t,"in",e),this.keys=sx("in",e)}matches(t){return this.keys.some(e=>e.isEqual(t.key))}},R0=class extends bi{constructor(t,e){super(t,"not-in",e),this.keys=sx("not-in",e)}matches(t){return!this.keys.some(e=>e.isEqual(t.key))}};function sx(i,t){var e;return(((e=t.arrayValue)===null||e===void 0?void 0:e.values)||[]).map(n=>Be.fromName(n.referenceValue))}var V0=class extends bi{constructor(t,e){super(t,"array-contains",e)}matches(t){let e=t.data.field(this.field);return nv(e)&&Bc(e.arrayValue,this.value)}},L0=class extends bi{constructor(t,e){super(t,"in",e)}matches(t){let e=t.data.field(this.field);return e!==null&&Bc(this.value.arrayValue,e)}},F0=class extends bi{constructor(t,e){super(t,"not-in",e)}matches(t){if(Bc(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let e=t.data.field(this.field);return e!==null&&!Bc(this.value.arrayValue,e)}},N0=class extends bi{constructor(t,e){super(t,"array-contains-any",e)}matches(t){let e=t.data.field(this.field);return!(!nv(e)||!e.arrayValue.values)&&e.arrayValue.values.some(n=>Bc(this.value.arrayValue,n))}};var B0=class{constructor(t,e=null,n=[],r=[],o=null,s=null,a=null){this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=o,this.startAt=s,this.endAt=a,this.ce=null}};function PT(i,t=null,e=[],n=[],r=null,o=null,s=null){return new B0(i,t,e,n,r,o,s)}function rv(i){let t=Ze(i);if(t.ce===null){let e=t.path.canonicalString();t.collectionGroup!==null&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map(n=>A0(n)).join(","),e+="|ob:",e+=t.orderBy.map(n=>function(o){return o.field.canonicalString()+o.dir}(n)).join(","),sh(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map(n=>Ca(n)).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map(n=>Ca(n)).join(",")),t.ce=e}return t.ce}function ov(i,t){if(i.limit!==t.limit||i.orderBy.length!==t.orderBy.length)return!1;for(let e=0;e0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";(function(s){let a=new $i(bn.comparator);return s.filters.forEach(c=>{c.getFlattenedFilters().forEach(u=>{u.isInequality()&&(a=a.add(u.field))})}),a})(t).forEach(o=>{e.has(o.canonicalString())||o.isKeyField()||t.le.push(new wa(o,n))}),e.has(bn.keyField().canonicalString())||t.le.push(new wa(bn.keyField(),n))}return t.le}function _r(i){let t=Ze(i);return t.he||(t.he=l5(t,Rc(i))),t.he}function l5(i,t){if(i.limitType==="F")return PT(i.path,i.collectionGroup,t,i.filters,i.limit,i.startAt,i.endAt);{t=t.map(r=>{let o=r.dir==="desc"?"asc":"desc";return new wa(r.field,o)});let e=i.endAt?new Ia(i.endAt.position,i.endAt.inclusive):null,n=i.startAt?new Ia(i.startAt.position,i.startAt.inclusive):null;return PT(i.path,i.collectionGroup,t,i.filters,i.limit,e,n)}}function U0(i,t,e){return new Ta(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),t,e,i.startAt,i.endAt)}function ah(i,t){return ov(_r(i),_r(t))&&i.limitType===t.limitType}function ax(i){return`${rv(_r(i))}|lt:${i.limitType}`}function ha(i){return`Query(target=${function(e){let n=e.path.canonicalString();return e.collectionGroup!==null&&(n+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(n+=`, filters: [${e.filters.map(r=>ox(r)).join(", ")}]`),sh(e.limit)||(n+=", limit: "+e.limit),e.orderBy.length>0&&(n+=`, orderBy: [${e.orderBy.map(r=>function(s){return`${s.field.canonicalString()} (${s.dir})`}(r)).join(", ")}]`),e.startAt&&(n+=", startAt: ",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>Ca(r)).join(",")),e.endAt&&(n+=", endAt: ",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>Ca(r)).join(",")),`Target(${n})`}(_r(i))}; limitType=${i.limitType})`}function lh(i,t){return t.isFoundDocument()&&function(n,r){let o=r.key.path;return n.collectionGroup!==null?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(o):Be.isDocumentKey(n.path)?n.path.isEqual(o):n.path.isImmediateParentOf(o)}(i,t)&&function(n,r){for(let o of Rc(n))if(!o.field.isKeyField()&&r.data.field(o.field)===null)return!1;return!0}(i,t)&&function(n,r){for(let o of n.filters)if(!o.matches(r))return!1;return!0}(i,t)&&function(n,r){return!(n.startAt&&!function(s,a,c){let u=AT(s,a,c);return s.inclusive?u<=0:u<0}(n.startAt,Rc(n),r)||n.endAt&&!function(s,a,c){let u=AT(s,a,c);return s.inclusive?u>=0:u>0}(n.endAt,Rc(n),r))}(i,t)}function c5(i){return i.collectionGroup||(i.path.length%2==1?i.path.lastSegment():i.path.get(i.path.length-2))}function lx(i){return(t,e)=>{let n=!1;for(let r of Rc(i)){let o=d5(r,t,e);if(o!==0)return o;n=n||r.field.isKeyField()}return 0}}function d5(i,t,e){let n=i.field.isKeyField()?Be.comparator(t.key,e.key):function(o,s,a){let c=s.data.field(o),u=a.data.field(o);return c!==null&&u!==null?ba(c,u):je()}(i.field,t,e);switch(i.dir){case"asc":return n;case"desc":return-1*n;default:return je()}}var Eo=class{constructor(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={},this.innerSize=0}get(t){let e=this.mapKeyFn(t),n=this.inner[e];if(n!==void 0){for(let[r,o]of n)if(this.equalsFn(r,t))return o}}has(t){return this.get(t)!==void 0}set(t,e){let n=this.mapKeyFn(t),r=this.inner[n];if(r===void 0)return this.inner[n]=[[t,e]],void this.innerSize++;for(let o=0;o{for(let[r,o]of n)t(r,o)})}isEmpty(){return JT(this.inner)}size(){return this.innerSize}};var u5=new ai(Be.comparator);function Br(){return u5}var cx=new ai(Be.comparator);function Dc(...i){let t=cx;for(let e of i)t=t.insert(e.key,e);return t}function dx(i){let t=cx;return i.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t}function ps(){return Vc()}function ux(){return Vc()}function Vc(){return new Eo(i=>i.toString(),(i,t)=>i.isEqual(t))}var p5=new ai(Be.comparator),h5=new $i(Be.comparator);function lt(...i){let t=h5;for(let e of i)t=t.add(e);return t}var m5=new $i(St);function f5(){return m5}function px(i,t){if(i.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Fc(t)?"-0":t}}function hx(i){return{integerValue:""+i}}function g5(i,t){return JR(t)?hx(t):px(i,t)}var xa=class{constructor(){this._=void 0}};function _5(i,t,e){return i instanceof Sa?function(r,o){let s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return o&&tv(o)&&(o=iv(o)),o&&(s.fields.__previous_value__=o),{mapValue:s}}(e,t):i instanceof vs?fx(i,t):i instanceof ys?gx(i,t):function(r,o){let s=mx(r,o),a=VT(s)+VT(r.Ie);return k0(s)&&k0(r.Ie)?hx(a):px(r.serializer,a)}(i,t)}function v5(i,t,e){return i instanceof vs?fx(i,t):i instanceof ys?gx(i,t):e}function mx(i,t){return i instanceof Ea?function(n){return k0(n)||function(o){return!!o&&"doubleValue"in o}(n)}(t)?t:{integerValue:0}:null}var Sa=class extends xa{},vs=class extends xa{constructor(t){super(),this.elements=t}};function fx(i,t){let e=_x(t);for(let n of i.elements)e.some(r=>br(r,n))||e.push(n);return{arrayValue:{values:e}}}var ys=class extends xa{constructor(t){super(),this.elements=t}};function gx(i,t){let e=_x(t);for(let n of i.elements)e=e.filter(r=>!br(r,n));return{arrayValue:{values:e}}}var Ea=class extends xa{constructor(t,e){super(),this.serializer=t,this.Ie=e}};function VT(i){return si(i.integerValue||i.doubleValue)}function _x(i){return nv(i)&&i.arrayValue.values?i.arrayValue.values.slice():[]}function y5(i,t){return i.field.isEqual(t.field)&&function(n,r){return n instanceof vs&&r instanceof vs||n instanceof ys&&r instanceof ys?ya(n.elements,r.elements,br):n instanceof Ea&&r instanceof Ea?br(n.Ie,r.Ie):n instanceof Sa&&r instanceof Sa}(i.transform,t.transform)}var j0=class{constructor(t,e){this.version=t,this.transformResults=e}},To=class i{constructor(t,e){this.updateTime=t,this.exists=e}static none(){return new i}static exists(t){return new i(void 0,t)}static updateTime(t){return new i(t)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}};function Op(i,t){return i.updateTime!==void 0?t.isFoundDocument()&&t.version.isEqual(i.updateTime):i.exists===void 0||i.exists===t.isFoundDocument()}var Oa=class{};function vx(i,t){if(!i.hasLocalMutations||t&&t.fields.length===0)return null;if(t===null)return i.isNoDocument()?new Fp(i.key,To.none()):new bs(i.key,i.data,To.none());{let e=i.data,n=yn.empty(),r=new $i(bn.comparator);for(let o of t.fields)if(!r.has(o)){let s=e.field(o);s===null&&o.length>1&&(o=o.popLast(),s=e.field(o)),s===null?n.delete(o):n.set(o,s),r=r.add(o)}return new Ir(i.key,n,new Dn(r.toArray()),To.none())}}function b5(i,t,e){i instanceof bs?function(r,o,s){let a=r.value.clone(),c=FT(r.fieldTransforms,o,s.transformResults);a.setAll(c),o.convertToFoundDocument(s.version,a).setHasCommittedMutations()}(i,t,e):i instanceof Ir?function(r,o,s){if(!Op(r.precondition,o))return void o.convertToUnknownDocument(s.version);let a=FT(r.fieldTransforms,o,s.transformResults),c=o.data;c.setAll(yx(r)),c.setAll(a),o.convertToFoundDocument(s.version,c).setHasCommittedMutations()}(i,t,e):function(r,o,s){o.convertToNoDocument(s.version).setHasCommittedMutations()}(0,t,e)}function Lc(i,t,e,n){return i instanceof bs?function(o,s,a,c){if(!Op(o.precondition,s))return a;let u=o.value.clone(),f=NT(o.fieldTransforms,c,s);return u.setAll(f),s.convertToFoundDocument(s.version,u).setHasLocalMutations(),null}(i,t,e,n):i instanceof Ir?function(o,s,a,c){if(!Op(o.precondition,s))return a;let u=NT(o.fieldTransforms,c,s),f=s.data;return f.setAll(yx(o)),f.setAll(u),s.convertToFoundDocument(s.version,f).setHasLocalMutations(),a===null?null:a.unionWith(o.fieldMask.fields).unionWith(o.fieldTransforms.map(v=>v.field))}(i,t,e,n):function(o,s,a){return Op(o.precondition,s)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):a}(i,t,e)}function C5(i,t){let e=null;for(let n of i.fieldTransforms){let r=t.data.field(n.field),o=mx(n.transform,r||null);o!=null&&(e===null&&(e=yn.empty()),e.set(n.field,o))}return e||null}function LT(i,t){return i.type===t.type&&!!i.key.isEqual(t.key)&&!!i.precondition.isEqual(t.precondition)&&!!function(n,r){return n===void 0&&r===void 0||!(!n||!r)&&ya(n,r,(o,s)=>y5(o,s))}(i.fieldTransforms,t.fieldTransforms)&&(i.type===0?i.value.isEqual(t.value):i.type!==1||i.data.isEqual(t.data)&&i.fieldMask.isEqual(t.fieldMask))}var bs=class extends Oa{constructor(t,e,n,r=[]){super(),this.key=t,this.value=e,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}},Ir=class extends Oa{constructor(t,e,n,r,o=[]){super(),this.key=t,this.data=e,this.fieldMask=n,this.precondition=r,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}};function yx(i){let t=new Map;return i.fieldMask.fields.forEach(e=>{if(!e.isEmpty()){let n=i.data.field(e);t.set(e,n)}}),t}function FT(i,t,e){let n=new Map;Nt(i.length===e.length);for(let r=0;r{let o=t.get(r.key),s=o.overlayedDocument,a=this.applyToLocalView(s,o.mutatedFields);a=e.has(r.key)?null:a;let c=vx(s,a);c!==null&&n.set(r.key,c),s.isValidDocument()||s.convertToNoDocument(Ye.min())}),n}keys(){return this.mutations.reduce((t,e)=>t.add(e.key),lt())}isEqual(t){return this.batchId===t.batchId&&ya(this.mutations,t.mutations,(e,n)=>LT(e,n))&&ya(this.baseMutations,t.baseMutations,(e,n)=>LT(e,n))}},$0=class i{constructor(t,e,n,r){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.docVersions=r}static from(t,e,n){Nt(t.mutations.length===n.length);let r=function(){return p5}(),o=t.mutations;for(let s=0;s=8)throw new hs(`Invalid padding: ${e}`);if(n<0)throw new hs(`Invalid hash count: ${n}`);if(t.length>0&&this.hashCount===0)throw new hs(`Invalid hash count: ${n}`);if(t.length===0&&e!==0)throw new hs(`Invalid padding when bitmap length is 0: ${e}`);this.Te=8*t.length-e,this.Ee=ds.fromNumber(this.Te)}de(t,e,n){let r=t.add(e.multiply(ds.fromNumber(n)));return r.compare(T5)===1&&(r=new ds([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Ee).toNumber()}Ae(t){return(this.bitmap[Math.floor(t/8)]&1<s.insert(a)),s}insert(t){if(this.Te===0)return;let e=zT(t),[n,r]=UT(e);for(let o=0;o0&&(this.Se=!0,this.ye=t)}ve(){let t=lt(),e=lt(),n=lt();return this.pe.forEach((r,o)=>{switch(o){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:He()}}),new zc(this.ye,this.we,t,e,n)}Fe(){this.Se=!1,this.pe=HT()}Me(t,e){this.Se=!0,this.pe=this.pe.insert(t,e)}xe(t){this.Se=!0,this.pe=this.pe.remove(t)}Oe(){this.ge+=1}Ne(){this.ge-=1,Nt(this.ge>=0)}Be(){this.Se=!0,this.we=!0}},Q0=class{constructor(t){this.Le=t,this.ke=new Map,this.qe=Br(),this.Qe=jT(),this.Ke=new ai(St)}$e(t){for(let e of t.Ve)t.me&&t.me.isFoundDocument()?this.Ue(e,t.me):this.We(e,t.key,t.me);for(let e of t.removedTargetIds)this.We(e,t.key,t.me)}Ge(t){this.forEachTarget(t,e=>{let n=this.ze(e);switch(t.state){case 0:this.je(e)&&n.Ce(t.resumeToken);break;case 1:n.Ne(),n.be||n.Fe(),n.Ce(t.resumeToken);break;case 2:n.Ne(),n.be||this.removeTarget(e);break;case 3:this.je(e)&&(n.Be(),n.Ce(t.resumeToken));break;case 4:this.je(e)&&(this.He(e),n.Ce(t.resumeToken));break;default:He()}})}forEachTarget(t,e){t.targetIds.length>0?t.targetIds.forEach(e):this.ke.forEach((n,r)=>{this.je(r)&&e(r)})}Je(t){let e=t.targetId,n=t.fe.count,r=this.Ye(e);if(r){let o=r.target;if(z0(o))if(n===0){let s=new Be(o.path);this.We(e,s,Hn.newNoDocument(s,Ye.min()))}else Nt(n===1);else{let s=this.Ze(e);if(s!==n){let a=this.Xe(t),c=a?this.et(a,t,s):1;if(c!==0){this.He(e);let u=c===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(e,u)}BT?.tt(function(f,v,b,O,V){var K,P,j,ce,_e,me;let qe={localCacheCount:f,existenceFilterCount:v.count,databaseId:b.database,projectId:b.projectId},Ge=v.unchangedNames;return Ge&&(qe.bloomFilter={applied:V===0,hashCount:(K=Ge?.hashCount)!==null&&K!==void 0?K:0,bitmapLength:(ce=(j=(P=Ge?.bits)===null||P===void 0?void 0:P.bitmap)===null||j===void 0?void 0:j.length)!==null&&ce!==void 0?ce:0,padding:(me=(_e=Ge?.bits)===null||_e===void 0?void 0:_e.padding)!==null&&me!==void 0?me:0,mightContain:Et=>{var ht;return(ht=O?.mightContain(Et))!==null&&ht!==void 0&&ht}}),qe}(s,t.fe,this.Le.nt(),a,c))}}}}Xe(t){let e=t.fe.unchangedNames;if(!e||!e.bits)return null;let{bits:{bitmap:n="",padding:r=0},hashCount:o=0}=e,s,a;try{s=So(n).toUint8Array()}catch(c){if(c instanceof Rp)return va("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw c}try{a=new K0(s,r,o)}catch(c){return va(c instanceof hs?"BloomFilter error: ":"Applying bloom filter failed: ",c),null}return a.Te===0?null:a}et(t,e,n){return e.fe.count===n-this.rt(t,e.targetId)?0:2}rt(t,e){let n=this.Le.getRemoteKeysForTarget(e),r=0;return n.forEach(o=>{let s=this.Le.nt(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;t.mightContain(a)||(this.We(e,o,null),r++)}),r}it(t){let e=new Map;this.ke.forEach((o,s)=>{let a=this.Ye(s);if(a){if(o.current&&z0(a.target)){let c=new Be(a.target.path);this.qe.get(c)!==null||this.st(s,c)||this.We(s,c,Hn.newNoDocument(c,t))}o.De&&(e.set(s,o.ve()),o.Fe())}});let n=lt();this.Qe.forEach((o,s)=>{let a=!0;s.forEachWhile(c=>{let u=this.Ye(c);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(n=n.add(o))}),this.qe.forEach((o,s)=>s.setReadTime(t));let r=new Np(t,e,this.Ke,this.qe,n);return this.qe=Br(),this.Qe=jT(),this.Ke=new ai(St),r}Ue(t,e){if(!this.je(t))return;let n=this.st(t,e.key)?2:0;this.ze(t).Me(e.key,n),this.qe=this.qe.insert(e.key,e),this.Qe=this.Qe.insert(e.key,this.ot(e.key).add(t))}We(t,e,n){if(!this.je(t))return;let r=this.ze(t);this.st(t,e)?r.Me(e,1):r.xe(e),this.Qe=this.Qe.insert(e,this.ot(e).delete(t)),n&&(this.qe=this.qe.insert(e,n))}removeTarget(t){this.ke.delete(t)}Ze(t){let e=this.ze(t).ve();return this.Le.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size}Oe(t){this.ze(t).Oe()}ze(t){let e=this.ke.get(t);return e||(e=new Up,this.ke.set(t,e)),e}ot(t){let e=this.Qe.get(t);return e||(e=new $i(St),this.Qe=this.Qe.insert(t,e)),e}je(t){let e=this.Ye(t)!==null;return e||ue("WatchChangeAggregator","Detected inactive target",t),e}Ye(t){let e=this.ke.get(t);return e&&e.be?null:this.Le._t(t)}He(t){this.ke.set(t,new Up),this.Le.getRemoteKeysForTarget(t).forEach(e=>{this.We(t,e,null)})}st(t,e){return this.Le.getRemoteKeysForTarget(t).has(e)}};function jT(){return new ai(Be.comparator)}function HT(){return new ai(Be.comparator)}var x5={asc:"ASCENDING",desc:"DESCENDING"},S5={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},E5={and:"AND",or:"OR"},Y0=class{constructor(t,e){this.databaseId=t,this.useProto3Json=e}};function Z0(i,t){return i.useProto3Json||sh(t)?t:{value:t}}function jp(i,t){return i.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function Cx(i,t){return i.useProto3Json?t.toBase64():t.toUint8Array()}function O5(i,t){return jp(i,t.toTimestamp())}function _r(i){return Nt(!!i),Ye.fromTimestamp(function(e){let n=xo(e);return new Ri(n.seconds,n.nanos)}(i))}function av(i,t){return X0(i,t).canonicalString()}function X0(i,t){let e=function(r){return new gi(["projects",r.projectId,"databases",r.database])}(i).child("documents");return t===void 0?e:e.child(t)}function Ix(i){let t=gi.fromString(i);return Nt(Ex(t)),t}function J0(i,t){return av(i.databaseId,t.path)}function p0(i,t){let e=Ix(t);if(e.get(1)!==i.databaseId.projectId)throw new Ee(te.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+e.get(1)+" vs "+i.databaseId.projectId);if(e.get(3)!==i.databaseId.database)throw new Ee(te.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+e.get(3)+" vs "+i.databaseId.database);return new Be(Tx(e))}function wx(i,t){return av(i.databaseId,t)}function M5(i){let t=Ix(i);return t.length===4?gi.emptyPath():Tx(t)}function e_(i){return new gi(["projects",i.databaseId.projectId,"databases",i.databaseId.database]).canonicalString()}function Tx(i){return Nt(i.length>4&&i.get(4)==="documents"),i.popFirst(5)}function GT(i,t,e){return{name:J0(i,t),fields:e.value.mapValue.fields}}function k5(i,t){let e;if("targetChange"in t){t.targetChange;let n=function(u){return u==="NO_CHANGE"?0:u==="ADD"?1:u==="REMOVE"?2:u==="CURRENT"?3:u==="RESET"?4:He()}(t.targetChange.targetChangeType||"NO_CHANGE"),r=t.targetChange.targetIds||[],o=function(u,f){return u.useProto3Json?(Nt(f===void 0||typeof f=="string"),Ji.fromBase64String(f||"")):(Nt(f===void 0||f instanceof Uint8Array),Ji.fromUint8Array(f||new Uint8Array))}(i,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(u){let f=u.code===void 0?te.UNKNOWN:bx(u.code);return new Ee(f,u.message||"")}(s);e=new zp(n,r,o,a||null)}else if("documentChange"in t){t.documentChange;let n=t.documentChange;n.document,n.document.name,n.document.updateTime;let r=p0(i,n.document.name),o=_r(n.document.updateTime),s=n.document.createTime?_r(n.document.createTime):Ye.min(),a=new yn({mapValue:{fields:n.document.fields}}),c=Hn.newFoundDocument(r,o,s,a),u=n.targetIds||[],f=n.removedTargetIds||[];e=new _a(u,f,c.key,c)}else if("documentDelete"in t){t.documentDelete;let n=t.documentDelete;n.document;let r=p0(i,n.document),o=n.readTime?_r(n.readTime):Ye.min(),s=Hn.newNoDocument(r,o),a=n.removedTargetIds||[];e=new _a([],a,s.key,s)}else if("documentRemove"in t){t.documentRemove;let n=t.documentRemove;n.document;let r=p0(i,n.document),o=n.removedTargetIds||[];e=new _a([],o,r,null)}else{if(!("filter"in t))return He();{t.filter;let n=t.filter;n.targetId;let{count:r=0,unchangedNames:o}=n,s=new W0(r,o),a=n.targetId;e=new Bp(a,s)}}return e}function A5(i,t){let e;if(t instanceof bs)e={update:GT(i,t.key,t.value)};else if(t instanceof Fp)e={delete:J0(i,t.key)};else if(t instanceof Cr)e={update:GT(i,t.key,t.data),updateMask:z5(t.fieldMask)};else{if(!(t instanceof H0))return He();e={verify:J0(i,t.key)}}return t.fieldTransforms.length>0&&(e.updateTransforms=t.fieldTransforms.map(n=>function(o,s){let a=s.transform;if(a instanceof Sa)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof vs)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof ys)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof Ea)return{fieldPath:s.field.canonicalString(),increment:a.Ie};throw He()}(0,n))),t.precondition.isNone||(e.currentDocument=function(r,o){return o.updateTime!==void 0?{updateTime:O5(r,o.updateTime)}:o.exists!==void 0?{exists:o.exists}:He()}(i,t.precondition)),e}function D5(i,t){return i&&i.length>0?(Nt(t!==void 0),i.map(e=>function(r,o){let s=r.updateTime?_r(r.updateTime):_r(o);return s.isEqual(Ye.min())&&(s=_r(o)),new j0(s,r.transformResults||[])}(e,t))):[]}function P5(i,t){return{documents:[wx(i,t.path)]}}function R5(i,t){let e={structuredQuery:{}},n=t.path,r;t.collectionGroup!==null?(r=n,e.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(r=n.popLast(),e.structuredQuery.from=[{collectionId:n.lastSegment()}]),e.parent=wx(i,r);let o=function(u){if(u.length!==0)return Sx(br.create(u,"and"))}(t.filters);o&&(e.structuredQuery.where=o);let s=function(u){if(u.length!==0)return u.map(f=>function(b){return{field:ma(b.field),direction:F5(b.dir)}}(f))}(t.orderBy);s&&(e.structuredQuery.orderBy=s);let a=Z0(i,t.limit);return a!==null&&(e.structuredQuery.limit=a),t.startAt&&(e.structuredQuery.startAt=function(u){return{before:u.inclusive,values:u.position}}(t.startAt)),t.endAt&&(e.structuredQuery.endAt=function(u){return{before:!u.inclusive,values:u.position}}(t.endAt)),{ut:e,parent:r}}function V5(i){let t=M5(i.parent),e=i.structuredQuery,n=e.from?e.from.length:0,r=null;if(n>0){Nt(n===1);let f=e.from[0];f.allDescendants?r=f.collectionId:t=t.child(f.collectionId)}let o=[];e.where&&(o=function(v){let b=xx(v);return b instanceof br&&nx(b)?b.getFilters():[b]}(e.where));let s=[];e.orderBy&&(s=function(v){return v.map(b=>function(V){return new wa(fa(V.field),function(P){switch(P){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(V.direction))}(b))}(e.orderBy));let a=null;e.limit&&(a=function(v){let b;return b=typeof v=="object"?v.value:v,sh(b)?null:b}(e.limit));let c=null;e.startAt&&(c=function(v){let b=!!v.before,O=v.values||[];return new Ia(O,b)}(e.startAt));let u=null;return e.endAt&&(u=function(v){let b=!v.before,O=v.values||[];return new Ia(O,b)}(e.endAt)),s5(t,r,s,o,a,"F",c,u)}function L5(i,t){let e=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return He()}}(t.purpose);return e==null?null:{"goog-listen-tags":e}}function xx(i){return i.unaryFilter!==void 0?function(e){switch(e.unaryFilter.op){case"IS_NAN":let n=fa(e.unaryFilter.field);return bi.create(n,"==",{doubleValue:NaN});case"IS_NULL":let r=fa(e.unaryFilter.field);return bi.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let o=fa(e.unaryFilter.field);return bi.create(o,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let s=fa(e.unaryFilter.field);return bi.create(s,"!=",{nullValue:"NULL_VALUE"});default:return He()}}(i):i.fieldFilter!==void 0?function(e){return bi.create(fa(e.fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return He()}}(e.fieldFilter.op),e.fieldFilter.value)}(i):i.compositeFilter!==void 0?function(e){return br.create(e.compositeFilter.filters.map(n=>xx(n)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return He()}}(e.compositeFilter.op))}(i):He()}function F5(i){return x5[i]}function N5(i){return S5[i]}function B5(i){return E5[i]}function ma(i){return{fieldPath:i.canonicalString()}}function fa(i){return bn.fromServerFormat(i.fieldPath)}function Sx(i){return i instanceof bi?function(e){if(e.op==="=="){if(kT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NAN"}};if(MT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NULL"}}}else if(e.op==="!="){if(kT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NOT_NAN"}};if(MT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ma(e.field),op:N5(e.op),value:e.value}}}(i):i instanceof br?function(e){let n=e.getFilters().map(r=>Sx(r));return n.length===1?n[0]:{compositeFilter:{op:B5(e.op),filters:n}}}(i):He()}function z5(i){let t=[];return i.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}function Ex(i){return i.length>=4&&i.get(0)==="projects"&&i.get(2)==="databases"}var Uc=class i{constructor(t,e,n,r,o=Ye.min(),s=Ye.min(),a=Ji.EMPTY_BYTE_STRING,c=null){this.target=t,this.targetId=e,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=c}withSequenceNumber(t){return new i(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,e){return new i(this.target,this.targetId,this.purpose,this.sequenceNumber,e,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new i(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new i(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}};var t_=class{constructor(t){this.ct=t}};function U5(i){let t=V5({parent:i.parent,structuredQuery:i.structuredQuery});return i.limitType==="LAST"?U0(t,t.limit,"L"):t}var Hp=class{constructor(){}Pt(t,e){this.It(t,e),e.Tt()}It(t,e){if("nullValue"in t)this.Et(e,5);else if("booleanValue"in t)this.Et(e,10),e.dt(t.booleanValue?1:0);else if("integerValue"in t)this.Et(e,15),e.dt(si(t.integerValue));else if("doubleValue"in t){let n=si(t.doubleValue);isNaN(n)?this.Et(e,13):(this.Et(e,15),Fc(n)?e.dt(0):e.dt(n))}else if("timestampValue"in t){let n=t.timestampValue;this.Et(e,20),typeof n=="string"?e.At(n):(e.At(`${n.seconds||""}`),e.dt(n.nanos||0))}else if("stringValue"in t)this.Rt(t.stringValue,e),this.Vt(e);else if("bytesValue"in t)this.Et(e,30),e.ft(So(t.bytesValue)),this.Vt(e);else if("referenceValue"in t)this.gt(t.referenceValue,e);else if("geoPointValue"in t){let n=t.geoPointValue;this.Et(e,45),e.dt(n.latitude||0),e.dt(n.longitude||0)}else"mapValue"in t?ex(t)?this.Et(e,Number.MAX_SAFE_INTEGER):(this.yt(t.mapValue,e),this.Vt(e)):"arrayValue"in t?(this.wt(t.arrayValue,e),this.Vt(e)):He()}Rt(t,e){this.Et(e,25),this.St(t,e)}St(t,e){e.At(t)}yt(t,e){let n=t.fields||{};this.Et(e,55);for(let r of Object.keys(n))this.Rt(r,e),this.It(n[r],e)}wt(t,e){let n=t.values||[];this.Et(e,50);for(let r of n)this.It(r,e)}gt(t,e){this.Et(e,37),Be.fromName(t).path.forEach(n=>{this.Et(e,60),this.St(n,e)})}Et(t,e){t.dt(e)}Vt(t){t.dt(2)}};Hp.bt=new Hp;var i_=class{constructor(){this._n=new n_}addToCollectionParentIndex(t,e){return this._n.add(e),ne.resolve()}getCollectionParents(t,e){return ne.resolve(this._n.getEntries(e))}addFieldIndex(t,e){return ne.resolve()}deleteFieldIndex(t,e){return ne.resolve()}deleteAllFieldIndexes(t){return ne.resolve()}createTargetIndexes(t,e){return ne.resolve()}getDocumentsMatchingTarget(t,e){return ne.resolve(null)}getIndexType(t,e){return ne.resolve(0)}getFieldIndexes(t,e){return ne.resolve([])}getNextCollectionGroupToUpdate(t){return ne.resolve(null)}getMinOffset(t,e){return ne.resolve(gs.min())}getMinOffsetFromCollectionGroup(t,e){return ne.resolve(gs.min())}updateCollectionGroup(t,e,n){return ne.resolve()}updateIndexEntries(t,e){return ne.resolve()}},n_=class{constructor(){this.index={}}add(t){let e=t.lastSegment(),n=t.popLast(),r=this.index[e]||new $i(gi.comparator),o=!r.has(n);return this.index[e]=r.add(n),o}has(t){let e=t.lastSegment(),n=t.popLast(),r=this.index[e];return r&&r.has(n)}getEntries(t){return(this.index[t]||new $i(gi.comparator)).toArray()}};var oie=new Uint8Array(0);var mr=class i{constructor(t,e,n){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=n}static withCacheSize(t){return new i(t,i.DEFAULT_COLLECTION_PERCENTILE,i.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}};mr.DEFAULT_COLLECTION_PERCENTILE=10,mr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,mr.DEFAULT=new mr(41943040,mr.DEFAULT_COLLECTION_PERCENTILE,mr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),mr.DISABLED=new mr(-1,0,0);var jc=class i{constructor(t){this.On=t}next(){return this.On+=2,this.On}static Nn(){return new i(0)}static Bn(){return new i(-1)}};var r_=class{constructor(){this.changes=new Eo(t=>t.toString(),(t,e)=>t.isEqual(e)),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,e){this.assertNotApplied(),this.changes.set(t,Hn.newInvalidDocument(t).setReadTime(e))}getEntry(t,e){this.assertNotApplied();let n=this.changes.get(e);return n!==void 0?ne.resolve(n):this.getFromCache(t,e)}getEntries(t,e){return this.getAllFromCache(t,e)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}};var o_=class{constructor(t,e){this.overlayedDocument=t,this.mutatedFields=e}};var s_=class{constructor(t,e,n,r){this.remoteDocumentCache=t,this.mutationQueue=e,this.documentOverlayCache=n,this.indexManager=r}getDocument(t,e){let n=null;return this.documentOverlayCache.getOverlay(t,e).next(r=>(n=r,this.remoteDocumentCache.getEntry(t,e))).next(r=>(n!==null&&Lc(n.mutation,r,Dn.empty(),Ri.now()),r))}getDocuments(t,e){return this.remoteDocumentCache.getEntries(t,e).next(n=>this.getLocalViewOfDocuments(t,n,lt()).next(()=>n))}getLocalViewOfDocuments(t,e,n=lt()){let r=ps();return this.populateOverlays(t,r,e).next(()=>this.computeViews(t,e,r,n).next(o=>{let s=Dc();return o.forEach((a,c)=>{s=s.insert(a,c.overlayedDocument)}),s}))}getOverlayedDocuments(t,e){let n=ps();return this.populateOverlays(t,n,e).next(()=>this.computeViews(t,e,n,lt()))}populateOverlays(t,e,n){let r=[];return n.forEach(o=>{e.has(o)||r.push(o)}),this.documentOverlayCache.getOverlays(t,r).next(o=>{o.forEach((s,a)=>{e.set(s,a)})})}computeViews(t,e,n,r){let o=Br(),s=Vc(),a=function(){return Vc()}();return e.forEach((c,u)=>{let f=n.get(u.key);r.has(u.key)&&(f===void 0||f.mutation instanceof Cr)?o=o.insert(u.key,u):f!==void 0?(s.set(u.key,f.mutation.getFieldMask()),Lc(f.mutation,u,f.mutation.getFieldMask(),Ri.now())):s.set(u.key,Dn.empty())}),this.recalculateAndSaveOverlays(t,o).next(c=>(c.forEach((u,f)=>s.set(u,f)),e.forEach((u,f)=>{var v;return a.set(u,new o_(f,(v=s.get(u))!==null&&v!==void 0?v:null))}),a))}recalculateAndSaveOverlays(t,e){let n=Vc(),r=new ai((s,a)=>s-a),o=lt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,e).next(s=>{for(let a of s)a.keys().forEach(c=>{let u=e.get(c);if(u===null)return;let f=n.get(c)||Dn.empty();f=a.applyToLocalView(u,f),n.set(c,f);let v=(r.get(a.batchId)||lt()).add(c);r=r.insert(a.batchId,v)})}).next(()=>{let s=[],a=r.getReverseIterator();for(;a.hasNext();){let c=a.getNext(),u=c.key,f=c.value,v=ux();f.forEach(b=>{if(!o.has(b)){let O=vx(e.get(b),n.get(b));O!==null&&v.set(b,O),o=o.add(b)}}),s.push(this.documentOverlayCache.saveOverlays(t,u,v))}return ne.waitFor(s)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(t,e){return this.remoteDocumentCache.getEntries(t,e).next(n=>this.recalculateAndSaveOverlays(t,n))}getDocumentsMatchingQuery(t,e,n,r){return function(s){return Be.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(e)?this.getDocumentsMatchingDocumentQuery(t,e.path):a5(e)?this.getDocumentsMatchingCollectionGroupQuery(t,e,n,r):this.getDocumentsMatchingCollectionQuery(t,e,n,r)}getNextDocuments(t,e,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(t,e,n,r).next(o=>{let s=r-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,e,n.largestBatchId,r-o.size):ne.resolve(ps()),a=-1,c=o;return s.next(u=>ne.forEach(u,(f,v)=>(a{c=c.insert(f,b)}))).next(()=>this.populateOverlays(t,u,o)).next(()=>this.computeViews(t,c,u,lt())).next(f=>({batchId:a,changes:dx(f)})))})}getDocumentsMatchingDocumentQuery(t,e){return this.getDocument(t,new Be(e)).next(n=>{let r=Dc();return n.isFoundDocument()&&(r=r.insert(n.key,n)),r})}getDocumentsMatchingCollectionGroupQuery(t,e,n,r){let o=e.collectionGroup,s=Dc();return this.indexManager.getCollectionParents(t,o).next(a=>ne.forEach(a,c=>{let u=function(v,b){return new Ta(b,null,v.explicitOrderBy.slice(),v.filters.slice(),v.limit,v.limitType,v.startAt,v.endAt)}(e,c.child(o));return this.getDocumentsMatchingCollectionQuery(t,u,n,r).next(f=>{f.forEach((v,b)=>{s=s.insert(v,b)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(t,e,n,r){let o;return this.documentOverlayCache.getOverlaysForCollection(t,e.path,n.largestBatchId).next(s=>(o=s,this.remoteDocumentCache.getDocumentsMatchingQuery(t,e,n,o,r))).next(s=>{o.forEach((c,u)=>{let f=u.getKey();s.get(f)===null&&(s=s.insert(f,Hn.newInvalidDocument(f)))});let a=Dc();return s.forEach((c,u)=>{let f=o.get(c);f!==void 0&&Lc(f.mutation,u,Dn.empty(),Ri.now()),lh(e,u)&&(a=a.insert(c,u))}),a})}};var a_=class{constructor(t){this.serializer=t,this.cr=new Map,this.lr=new Map}getBundleMetadata(t,e){return ne.resolve(this.cr.get(e))}saveBundleMetadata(t,e){return this.cr.set(e.id,function(r){return{id:r.id,version:r.version,createTime:_r(r.createTime)}}(e)),ne.resolve()}getNamedQuery(t,e){return ne.resolve(this.lr.get(e))}saveNamedQuery(t,e){return this.lr.set(e.name,function(r){return{name:r.name,query:U5(r.bundledQuery),readTime:_r(r.readTime)}}(e)),ne.resolve()}};var l_=class{constructor(){this.overlays=new ai(Be.comparator),this.hr=new Map}getOverlay(t,e){return ne.resolve(this.overlays.get(e))}getOverlays(t,e){let n=ps();return ne.forEach(e,r=>this.getOverlay(t,r).next(o=>{o!==null&&n.set(r,o)})).next(()=>n)}saveOverlays(t,e,n){return n.forEach((r,o)=>{this.ht(t,e,o)}),ne.resolve()}removeOverlaysForBatchId(t,e,n){let r=this.hr.get(n);return r!==void 0&&(r.forEach(o=>this.overlays=this.overlays.remove(o)),this.hr.delete(n)),ne.resolve()}getOverlaysForCollection(t,e,n){let r=ps(),o=e.length+1,s=new Be(e.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){let c=a.getNext().value,u=c.getKey();if(!e.isPrefixOf(u.path))break;u.path.length===o&&c.largestBatchId>n&&r.set(c.getKey(),c)}return ne.resolve(r)}getOverlaysForCollectionGroup(t,e,n,r){let o=new ai((u,f)=>u-f),s=this.overlays.getIterator();for(;s.hasNext();){let u=s.getNext().value;if(u.getKey().getCollectionGroup()===e&&u.largestBatchId>n){let f=o.get(u.largestBatchId);f===null&&(f=ps(),o=o.insert(u.largestBatchId,f)),f.set(u.getKey(),u)}}let a=ps(),c=o.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((u,f)=>a.set(u,f)),!(a.size()>=r)););return ne.resolve(a)}ht(t,e,n){let r=this.overlays.get(n.key);if(r!==null){let s=this.hr.get(r.largestBatchId).delete(n.key);this.hr.set(r.largestBatchId,s)}this.overlays=this.overlays.insert(n.key,new q0(e,n));let o=this.hr.get(e);o===void 0&&(o=lt(),this.hr.set(e,o)),this.hr.set(e,o.add(n.key))}};var Hc=class{constructor(){this.Pr=new $i(fi.Ir),this.Tr=new $i(fi.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(t,e){let n=new fi(t,e);this.Pr=this.Pr.add(n),this.Tr=this.Tr.add(n)}dr(t,e){t.forEach(n=>this.addReference(n,e))}removeReference(t,e){this.Ar(new fi(t,e))}Rr(t,e){t.forEach(n=>this.removeReference(n,e))}Vr(t){let e=new Be(new gi([])),n=new fi(e,t),r=new fi(e,t+1),o=[];return this.Tr.forEachInRange([n,r],s=>{this.Ar(s),o.push(s.key)}),o}mr(){this.Pr.forEach(t=>this.Ar(t))}Ar(t){this.Pr=this.Pr.delete(t),this.Tr=this.Tr.delete(t)}gr(t){let e=new Be(new gi([])),n=new fi(e,t),r=new fi(e,t+1),o=lt();return this.Tr.forEachInRange([n,r],s=>{o=o.add(s.key)}),o}containsKey(t){let e=new fi(t,0),n=this.Pr.firstAfterOrEqual(e);return n!==null&&t.isEqual(n.key)}},fi=class{constructor(t,e){this.key=t,this.pr=e}static Ir(t,e){return Be.comparator(t.key,e.key)||St(t.pr,e.pr)}static Er(t,e){return St(t.pr,e.pr)||Be.comparator(t.key,e.key)}};var c_=class{constructor(t,e){this.indexManager=t,this.referenceDelegate=e,this.mutationQueue=[],this.yr=1,this.wr=new $i(fi.Ir)}checkEmpty(t){return ne.resolve(this.mutationQueue.length===0)}addMutationBatch(t,e,n,r){let o=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new G0(o,e,n,r);this.mutationQueue.push(s);for(let a of r)this.wr=this.wr.add(new fi(a.key,o)),this.indexManager.addToCollectionParentIndex(t,a.key.path.popLast());return ne.resolve(s)}lookupMutationBatch(t,e){return ne.resolve(this.Sr(e))}getNextMutationBatchAfterBatchId(t,e){let n=e+1,r=this.br(n),o=r<0?0:r;return ne.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return ne.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(t){return ne.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,e){let n=new fi(e,0),r=new fi(e,Number.POSITIVE_INFINITY),o=[];return this.wr.forEachInRange([n,r],s=>{let a=this.Sr(s.pr);o.push(a)}),ne.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(t,e){let n=new $i(St);return e.forEach(r=>{let o=new fi(r,0),s=new fi(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([o,s],a=>{n=n.add(a.pr)})}),ne.resolve(this.Dr(n))}getAllMutationBatchesAffectingQuery(t,e){let n=e.path,r=n.length+1,o=n;Be.isDocumentKey(o)||(o=o.child(""));let s=new fi(new Be(o),0),a=new $i(St);return this.wr.forEachWhile(c=>{let u=c.key.path;return!!n.isPrefixOf(u)&&(u.length===r&&(a=a.add(c.pr)),!0)},s),ne.resolve(this.Dr(a))}Dr(t){let e=[];return t.forEach(n=>{let r=this.Sr(n);r!==null&&e.push(r)}),e}removeMutationBatch(t,e){Nt(this.Cr(e.batchId,"removed")===0),this.mutationQueue.shift();let n=this.wr;return ne.forEach(e.mutations,r=>{let o=new fi(r.key,e.batchId);return n=n.delete(o),this.referenceDelegate.markPotentiallyOrphaned(t,r.key)}).next(()=>{this.wr=n})}Mn(t){}containsKey(t,e){let n=new fi(e,0),r=this.wr.firstAfterOrEqual(n);return ne.resolve(e.isEqual(r&&r.key))}performConsistencyCheck(t){return this.mutationQueue.length,ne.resolve()}Cr(t,e){return this.br(t)}br(t){return this.mutationQueue.length===0?0:t-this.mutationQueue[0].batchId}Sr(t){let e=this.br(t);return e<0||e>=this.mutationQueue.length?null:this.mutationQueue[e]}};var d_=class{constructor(t){this.vr=t,this.docs=function(){return new ai(Be.comparator)}(),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,e){let n=e.key,r=this.docs.get(n),o=r?r.size:0,s=this.vr(e);return this.docs=this.docs.insert(n,{document:e.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(t,n.path.popLast())}removeEntry(t){let e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)}getEntry(t,e){let n=this.docs.get(e);return ne.resolve(n?n.document.mutableCopy():Hn.newInvalidDocument(e))}getEntries(t,e){let n=Br();return e.forEach(r=>{let o=this.docs.get(r);n=n.insert(r,o?o.document.mutableCopy():Hn.newInvalidDocument(r))}),ne.resolve(n)}getDocumentsMatchingQuery(t,e,n,r){let o=Br(),s=e.path,a=new Be(s.child("")),c=this.docs.getIteratorFrom(a);for(;c.hasNext();){let{key:u,value:{document:f}}=c.getNext();if(!s.isPrefixOf(u.path))break;u.path.length>s.length+1||ZR(YR(f),n)<=0||(r.has(f.key)||lh(e,f))&&(o=o.insert(f.key,f.mutableCopy()))}return ne.resolve(o)}getAllFromCollectionGroup(t,e,n,r){He()}Fr(t,e){return ne.forEach(this.docs,n=>e(n))}newChangeBuffer(t){return new u_(this)}getSize(t){return ne.resolve(this.size)}},u_=class extends r_{constructor(t){super(),this.ar=t}applyChanges(t){let e=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?e.push(this.ar.addEntry(t,r)):this.ar.removeEntry(n)}),ne.waitFor(e)}getFromCache(t,e){return this.ar.getEntry(t,e)}getAllFromCache(t,e){return this.ar.getEntries(t,e)}};var p_=class{constructor(t){this.persistence=t,this.Mr=new Eo(e=>rv(e),ov),this.lastRemoteSnapshotVersion=Ye.min(),this.highestTargetId=0,this.Or=0,this.Nr=new Hc,this.targetCount=0,this.Br=jc.Nn()}forEachTarget(t,e){return this.Mr.forEach((n,r)=>e(r)),ne.resolve()}getLastRemoteSnapshotVersion(t){return ne.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return ne.resolve(this.Or)}allocateTargetId(t){return this.highestTargetId=this.Br.next(),ne.resolve(this.highestTargetId)}setTargetsMetadata(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.Or&&(this.Or=e),ne.resolve()}qn(t){this.Mr.set(t.target,t);let e=t.targetId;e>this.highestTargetId&&(this.Br=new jc(e),this.highestTargetId=e),t.sequenceNumber>this.Or&&(this.Or=t.sequenceNumber)}addTargetData(t,e){return this.qn(e),this.targetCount+=1,ne.resolve()}updateTargetData(t,e){return this.qn(e),ne.resolve()}removeTargetData(t,e){return this.Mr.delete(e.target),this.Nr.Vr(e.targetId),this.targetCount-=1,ne.resolve()}removeTargets(t,e,n){let r=0,o=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=e&&n.get(a.targetId)===null&&(this.Mr.delete(s),o.push(this.removeMatchingKeysForTargetId(t,a.targetId)),r++)}),ne.waitFor(o).next(()=>r)}getTargetCount(t){return ne.resolve(this.targetCount)}getTargetData(t,e){let n=this.Mr.get(e)||null;return ne.resolve(n)}addMatchingKeys(t,e,n){return this.Nr.dr(e,n),ne.resolve()}removeMatchingKeys(t,e,n){this.Nr.Rr(e,n);let r=this.persistence.referenceDelegate,o=[];return r&&e.forEach(s=>{o.push(r.markPotentiallyOrphaned(t,s))}),ne.waitFor(o)}removeMatchingKeysForTargetId(t,e){return this.Nr.Vr(e),ne.resolve()}getMatchingKeysForTargetId(t,e){let n=this.Nr.gr(e);return ne.resolve(n)}containsKey(t,e){return ne.resolve(this.Nr.containsKey(e))}};var h_=class{constructor(t,e){this.Lr={},this.overlays={},this.kr=new XT(0),this.qr=!1,this.qr=!0,this.referenceDelegate=t(this),this.Qr=new p_(this),this.indexManager=new i_,this.remoteDocumentCache=function(r){return new d_(r)}(n=>this.referenceDelegate.Kr(n)),this.serializer=new t_(e),this.$r=new a_(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let e=this.overlays[t.toKey()];return e||(e=new l_,this.overlays[t.toKey()]=e),e}getMutationQueue(t,e){let n=this.Lr[t.toKey()];return n||(n=new c_(e,this.referenceDelegate),this.Lr[t.toKey()]=n),n}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(t,e,n){ue("MemoryPersistence","Starting transaction:",t);let r=new m_(this.kr.next());return this.referenceDelegate.Ur(),n(r).next(o=>this.referenceDelegate.Wr(r).next(()=>o)).toPromise().then(o=>(r.raiseOnCommittedEvent(),o))}Gr(t,e){return ne.or(Object.values(this.Lr).map(n=>()=>n.containsKey(t,e)))}},m_=class extends T0{constructor(t){super(),this.currentSequenceNumber=t}},f_=class i{constructor(t){this.persistence=t,this.zr=new Hc,this.jr=null}static Hr(t){return new i(t)}get Jr(){if(this.jr)return this.jr;throw He()}addReference(t,e,n){return this.zr.addReference(n,e),this.Jr.delete(n.toString()),ne.resolve()}removeReference(t,e,n){return this.zr.removeReference(n,e),this.Jr.add(n.toString()),ne.resolve()}markPotentiallyOrphaned(t,e){return this.Jr.add(e.toString()),ne.resolve()}removeTarget(t,e){this.zr.Vr(e.targetId).forEach(r=>this.Jr.add(r.toString()));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(t,e.targetId).next(r=>{r.forEach(o=>this.Jr.add(o.toString()))}).next(()=>n.removeTargetData(t,e))}Ur(){this.jr=new Set}Wr(t){let e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return ne.forEach(this.Jr,n=>{let r=Be.fromPath(n);return this.Yr(t,r).next(o=>{o||e.removeEntry(r,Ye.min())})}).next(()=>(this.jr=null,e.apply(t)))}updateLimboDocument(t,e){return this.Yr(t,e).next(n=>{n?this.Jr.delete(e.toString()):this.Jr.add(e.toString())})}Kr(t){return 0}Yr(t,e){return ne.or([()=>ne.resolve(this.zr.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(t,e),()=>this.persistence.Gr(t,e)])}};var g_=class i{constructor(t,e,n,r){this.targetId=t,this.fromCache=e,this.qi=n,this.Qi=r}static Ki(t,e){let n=lt(),r=lt();for(let o of e.docChanges)switch(o.type){case 0:n=n.add(o.doc.key);break;case 1:r=r.add(o.doc.key)}return new i(t,e.fromCache,n,r)}};var __=class{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(t){this._documentReadCount+=t}};var v_=class{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return UI()?8:Dp.v(ri())>0?6:4}()}initialize(t,e){this.zi=t,this.indexManager=e,this.$i=!0}getDocumentsMatchingQuery(t,e,n,r){let o={result:null};return this.ji(t,e).next(s=>{o.result=s}).next(()=>{if(!o.result)return this.Hi(t,e,r,n).next(s=>{o.result=s})}).next(()=>{if(o.result)return;let s=new __;return this.Ji(t,e,s).next(a=>{if(o.result=a,this.Ui)return this.Yi(t,e,s,a.size)})}).next(()=>o.result)}Yi(t,e,n,r){return n.documentReadCountthis.Gi*r?(Ac()<=at.DEBUG&&ue("QueryEngine","The SDK decides to create cache indexes for query:",ha(e),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(t,gr(e))):ne.resolve())}ji(t,e){if(RT(e))return ne.resolve(null);let n=gr(e);return this.indexManager.getIndexType(t,n).next(r=>r===0?null:(e.limit!==null&&r===1&&(e=U0(e,null,"F"),n=gr(e)),this.indexManager.getDocumentsMatchingTarget(t,n).next(o=>{let s=lt(...o);return this.zi.getDocuments(t,s).next(a=>this.indexManager.getMinOffset(t,n).next(c=>{let u=this.Zi(e,a);return this.Xi(e,u,s,c.readTime)?this.ji(t,U0(e,null,"F")):this.es(t,u,e,c)}))})))}Hi(t,e,n,r){return RT(e)||r.isEqual(Ye.min())?ne.resolve(null):this.zi.getDocuments(t,n).next(o=>{let s=this.Zi(e,o);return this.Xi(e,s,n,r)?ne.resolve(null):(Ac()<=at.DEBUG&&ue("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),ha(e)),this.es(t,s,e,QR(r,-1)).next(a=>a))})}Zi(t,e){let n=new $i(lx(t));return e.forEach((r,o)=>{lh(t,o)&&(n=n.add(o))}),n}Xi(t,e,n,r){if(t.limit===null)return!1;if(n.size!==e.size)return!0;let o=t.limitType==="F"?e.last():e.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(r)>0)}Ji(t,e,n){return Ac()<=at.DEBUG&&ue("QueryEngine","Using full collection scan to execute query:",ha(e)),this.zi.getDocumentsMatchingQuery(t,e,gs.min(),n)}es(t,e,n,r){return this.zi.getDocumentsMatchingQuery(t,n,r).next(o=>(e.forEach(s=>{o=o.insert(s.key,s)}),o))}};var y_=class{constructor(t,e,n,r){this.persistence=t,this.ts=e,this.serializer=r,this.ns=new ai(St),this.rs=new Eo(o=>rv(o),ov),this.ss=new Map,this.os=t.getRemoteDocumentCache(),this.Qr=t.getTargetCache(),this.$r=t.getBundleCache(),this._s(n)}_s(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new s_(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",e=>t.collect(e,this.ns))}};function j5(i,t,e,n){return new y_(i,t,e,n)}function Ox(i,t){return D(this,null,function*(){let e=Ze(i);return yield e.persistence.runTransaction("Handle user change","readonly",n=>{let r;return e.mutationQueue.getAllMutationBatches(n).next(o=>(r=o,e._s(t),e.mutationQueue.getAllMutationBatches(n))).next(o=>{let s=[],a=[],c=lt();for(let u of r){s.push(u.batchId);for(let f of u.mutations)c=c.add(f.key)}for(let u of o){a.push(u.batchId);for(let f of u.mutations)c=c.add(f.key)}return e.localDocuments.getDocuments(n,c).next(u=>({us:u,removedBatchIds:s,addedBatchIds:a}))})})})}function H5(i,t){let e=Ze(i);return e.persistence.runTransaction("Acknowledge batch","readwrite-primary",n=>{let r=t.batch.keys(),o=e.os.newChangeBuffer({trackRemovals:!0});return function(a,c,u,f){let v=u.batch,b=v.keys(),O=ne.resolve();return b.forEach(V=>{O=O.next(()=>f.getEntry(c,V)).next(K=>{let P=u.docVersions.get(V);Nt(P!==null),K.version.compareTo(P)<0&&(v.applyToRemoteDocument(K,u),K.isValidDocument()&&(K.setReadTime(u.commitVersion),f.addEntry(K)))})}),O.next(()=>a.mutationQueue.removeMutationBatch(c,v))}(e,n,t,o).next(()=>o.apply(n)).next(()=>e.mutationQueue.performConsistencyCheck(n)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(n,r,t.batch.batchId)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,function(a){let c=lt();for(let u=0;u0&&(c=c.add(a.batch.mutations[u].key));return c}(t))).next(()=>e.localDocuments.getDocuments(n,r))})}function Mx(i){let t=Ze(i);return t.persistence.runTransaction("Get last remote snapshot version","readonly",e=>t.Qr.getLastRemoteSnapshotVersion(e))}function G5(i,t){let e=Ze(i),n=t.snapshotVersion,r=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{let s=e.os.newChangeBuffer({trackRemovals:!0});r=e.ns;let a=[];t.targetChanges.forEach((f,v)=>{let b=r.get(v);if(!b)return;a.push(e.Qr.removeMatchingKeys(o,f.removedDocuments,v).next(()=>e.Qr.addMatchingKeys(o,f.addedDocuments,v)));let O=b.withSequenceNumber(o.currentSequenceNumber);t.targetMismatches.get(v)!==null?O=O.withResumeToken(Ji.EMPTY_BYTE_STRING,Ye.min()).withLastLimboFreeSnapshotVersion(Ye.min()):f.resumeToken.approximateByteSize()>0&&(O=O.withResumeToken(f.resumeToken,n)),r=r.insert(v,O),function(K,P,j){return K.resumeToken.approximateByteSize()===0||P.snapshotVersion.toMicroseconds()-K.snapshotVersion.toMicroseconds()>=3e8?!0:j.addedDocuments.size+j.modifiedDocuments.size+j.removedDocuments.size>0}(b,O,f)&&a.push(e.Qr.updateTargetData(o,O))});let c=Br(),u=lt();if(t.documentUpdates.forEach(f=>{t.resolvedLimboDocuments.has(f)&&a.push(e.persistence.referenceDelegate.updateLimboDocument(o,f))}),a.push($5(o,s,t.documentUpdates).next(f=>{c=f.cs,u=f.ls})),!n.isEqual(Ye.min())){let f=e.Qr.getLastRemoteSnapshotVersion(o).next(v=>e.Qr.setTargetsMetadata(o,o.currentSequenceNumber,n));a.push(f)}return ne.waitFor(a).next(()=>s.apply(o)).next(()=>e.localDocuments.getLocalViewOfDocuments(o,c,u)).next(()=>c)}).then(o=>(e.ns=r,o))}function $5(i,t,e){let n=lt(),r=lt();return e.forEach(o=>n=n.add(o)),t.getEntries(i,n).next(o=>{let s=Br();return e.forEach((a,c)=>{let u=o.get(a);c.isFoundDocument()!==u.isFoundDocument()&&(r=r.add(a)),c.isNoDocument()&&c.version.isEqual(Ye.min())?(t.removeEntry(a,c.readTime),s=s.insert(a,c)):!u.isValidDocument()||c.version.compareTo(u.version)>0||c.version.compareTo(u.version)===0&&u.hasPendingWrites?(t.addEntry(c),s=s.insert(a,c)):ue("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",c.version)}),{cs:s,ls:r}})}function q5(i,t){let e=Ze(i);return e.persistence.runTransaction("Get next mutation batch","readonly",n=>(t===void 0&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)))}function W5(i,t){let e=Ze(i);return e.persistence.runTransaction("Allocate target","readwrite",n=>{let r;return e.Qr.getTargetData(n,t).next(o=>o?(r=o,ne.resolve(r)):e.Qr.allocateTargetId(n).next(s=>(r=new Uc(t,s,"TargetPurposeListen",n.currentSequenceNumber),e.Qr.addTargetData(n,r).next(()=>r))))}).then(n=>{let r=e.ns.get(n.targetId);return(r===null||n.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(e.ns=e.ns.insert(n.targetId,n),e.rs.set(t,n.targetId)),n})}function b_(i,t,e){return D(this,null,function*(){let n=Ze(i),r=n.ns.get(t),o=e?"readwrite":"readwrite-primary";try{e||(yield n.persistence.runTransaction("Release target",o,s=>n.persistence.referenceDelegate.removeTarget(s,r)))}catch(s){if(!Yc(s))throw s;ue("LocalStore",`Failed to update sequence numbers for target ${t}: ${s}`)}n.ns=n.ns.remove(t),n.rs.delete(r.target)})}function $T(i,t,e){let n=Ze(i),r=Ye.min(),o=lt();return n.persistence.runTransaction("Execute query","readwrite",s=>function(c,u,f){let v=Ze(c),b=v.rs.get(f);return b!==void 0?ne.resolve(v.ns.get(b)):v.Qr.getTargetData(u,f)}(n,s,gr(t)).next(a=>{if(a)return r=a.lastLimboFreeSnapshotVersion,n.Qr.getMatchingKeysForTargetId(s,a.targetId).next(c=>{o=c})}).next(()=>n.ts.getDocumentsMatchingQuery(s,t,e?r:Ye.min(),e?o:lt())).next(a=>(K5(n,c5(t),a),{documents:a,hs:o})))}function K5(i,t,e){let n=i.ss.get(t)||Ye.min();e.forEach((r,o)=>{o.readTime.compareTo(n)>0&&(n=o.readTime)}),i.ss.set(t,n)}var Gp=class{constructor(){this.activeTargetIds=f5()}As(t){this.activeTargetIds=this.activeTargetIds.add(t)}Rs(t){this.activeTargetIds=this.activeTargetIds.delete(t)}ds(){let t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}};var C_=class{constructor(){this.no=new Gp,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,e,n){}addLocalQueryTarget(t){return this.no.As(t),this.ro[t]||"not-current"}updateQueryState(t,e,n){this.ro[t]=e}removeLocalQueryTarget(t){this.no.Rs(t)}isLocalQueryTarget(t){return this.no.activeTargetIds.has(t)}clearQueryState(t){delete this.ro[t]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(t){return this.no.activeTargetIds.has(t)}start(){return this.no=new Gp,Promise.resolve()}handleUserChange(t,e,n){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}};var I_=class{io(t){}shutdown(){}};var $p=class{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(t){this.uo.push(t)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){ue("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(let t of this.uo)t(0)}ao(){ue("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(let t of this.uo)t(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}};var Sp=null;function h0(){return Sp===null?Sp=function(){return 268435456+Math.round(2147483648*Math.random())}():Sp++,"0x"+Sp.toString(16)}var Q5={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};var w_=class{constructor(t){this.lo=t.lo,this.ho=t.ho}Po(t){this.Io=t}To(t){this.Eo=t}onMessage(t){this.Ao=t}close(){this.ho()}send(t){this.lo(t)}Ro(){this.Io()}Vo(t){this.Eo(t)}mo(t){this.Ao(t)}};var Gi="WebChannelConnection",T_=class extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let n=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.fo=n+"://"+e.host,this.po=`projects/${r}/databases/${o}`,this.yo=this.databaseId.database==="(default)"?`project_id=${r}`:`project_id=${r}&database_id=${o}`}get wo(){return!1}So(e,n,r,o,s){let a=h0(),c=this.bo(e,n.toUriEncodedString());ue("RestConnection",`Sending RPC '${e}' ${a}:`,c,r);let u={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(u,o,s),this.Co(e,c,u,r).then(f=>(ue("RestConnection",`Received RPC '${e}' ${a}: `,f),f),f=>{throw va("RestConnection",`RPC '${e}' ${a} failed with error: `,f,"url: ",c,"request:",r),f})}vo(e,n,r,o,s,a){return this.So(e,n,r,o,s)}Do(e,n,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Da}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((o,s)=>e[s]=o),r&&r.headers.forEach((o,s)=>e[s]=o)}bo(e,n){let r=Q5[e];return`${this.fo}/v1/${n}:${r}`}terminate(){}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}Co(t,e,n,r){let o=h0();return new Promise((s,a)=>{let c=new wT;c.setWithCredentials(!0),c.listenOnce(CT.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case Tp.NO_ERROR:let f=c.getResponseJson();ue(Gi,`XHR for RPC '${t}' ${o} received:`,JSON.stringify(f)),s(f);break;case Tp.TIMEOUT:ue(Gi,`RPC '${t}' ${o} timed out`),a(new Ee(te.DEADLINE_EXCEEDED,"Request time out"));break;case Tp.HTTP_ERROR:let v=c.getStatus();if(ue(Gi,`RPC '${t}' ${o} failed with status:`,v,"response text:",c.getResponseText()),v>0){let b=c.getResponseJson();Array.isArray(b)&&(b=b[0]);let O=b?.error;if(O&&O.status&&O.message){let V=function(P){let j=P.toLowerCase().replace(/_/g,"-");return Object.values(te).indexOf(j)>=0?j:te.UNKNOWN}(O.status);a(new Ee(V,O.message))}else a(new Ee(te.UNKNOWN,"Server responded with status "+c.getStatus()))}else a(new Ee(te.UNAVAILABLE,"Connection failed."));break;default:He()}}finally{ue(Gi,`RPC '${t}' ${o} completed.`)}});let u=JSON.stringify(r);ue(Gi,`RPC '${t}' ${o} sending request:`,r),c.send(e,"POST",u,n,15)})}Fo(t,e,n){let r=h0(),o=[this.fo,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=yT(),a=bT(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},u=this.longPollingOptions.timeoutSeconds;u!==void 0&&(c.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(c.useFetchStreams=!0),this.Do(c.initMessageHeaders,e,n),c.encodeInitMessageHeaders=!0;let f=o.join("");ue(Gi,`Creating RPC '${t}' stream ${r}: ${f}`,c);let v=s.createWebChannel(f,c),b=!1,O=!1,V=new w_({lo:P=>{O?ue(Gi,`Not sending because RPC '${t}' stream ${r} is closed:`,P):(b||(ue(Gi,`Opening RPC '${t}' stream ${r} transport.`),v.open(),b=!0),ue(Gi,`RPC '${t}' stream ${r} sending:`,P),v.send(P))},ho:()=>v.close()}),K=(P,j,ce)=>{P.listen(j,_e=>{try{ce(_e)}catch(me){setTimeout(()=>{throw me},0)}})};return K(v,kc.EventType.OPEN,()=>{O||ue(Gi,`RPC '${t}' stream ${r} transport opened.`)}),K(v,kc.EventType.CLOSE,()=>{O||(O=!0,ue(Gi,`RPC '${t}' stream ${r} transport closed`),V.Vo())}),K(v,kc.EventType.ERROR,P=>{O||(O=!0,va(Gi,`RPC '${t}' stream ${r} transport errored:`,P),V.Vo(new Ee(te.UNAVAILABLE,"The operation could not be completed")))}),K(v,kc.EventType.MESSAGE,P=>{var j;if(!O){let ce=P.data[0];Nt(!!ce);let _e=ce,me=_e.error||((j=_e[0])===null||j===void 0?void 0:j.error);if(me){ue(Gi,`RPC '${t}' stream ${r} received error:`,me);let qe=me.status,Ge=function(Ht){let _i=mi[Ht];if(_i!==void 0)return bx(_i)}(qe),Et=me.message;Ge===void 0&&(Ge=te.INTERNAL,Et="Unknown error status: "+qe+" with message "+me.message),O=!0,V.Vo(new Ee(Ge,Et)),v.close()}else ue(Gi,`RPC '${t}' stream ${r} received:`,ce),V.mo(ce)}}),K(a,IT.STAT_EVENT,P=>{P.stat===u0.PROXY?ue(Gi,`RPC '${t}' stream ${r} detected buffering proxy`):P.stat===u0.NOPROXY&&ue(Gi,`RPC '${t}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{V.Ro()},0),V}};function m0(){return typeof document<"u"?document:null}function ch(i){return new Y0(i,!0)}var qp=class{constructor(t,e,n=1e3,r=1.5,o=6e4){this.oi=t,this.timerId=e,this.Mo=n,this.xo=r,this.Oo=o,this.No=0,this.Bo=null,this.Lo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(t){this.cancel();let e=Math.floor(this.No+this.Qo()),n=Math.max(0,Date.now()-this.Lo),r=Math.max(0,e-n);r>0&&ue("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.No} ms, delay with jitter: ${e} ms, last attempt: ${n} ms ago)`),this.Bo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Lo=Date.now(),t())),this.No*=this.xo,this.Nothis.Oo&&(this.No=this.Oo)}Ko(){this.Bo!==null&&(this.Bo.skipDelay(),this.Bo=null)}cancel(){this.Bo!==null&&(this.Bo.cancel(),this.Bo=null)}Qo(){return(Math.random()-.5)*this.No}};var Wp=class{constructor(t,e,n,r,o,s,a,c){this.oi=t,this.$o=n,this.Uo=r,this.connection=o,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=c,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new qp(t,e)}Ho(){return this.state===1||this.state===5||this.Jo()}Jo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Yo()}stop(){return D(this,null,function*(){this.Ho()&&(yield this.close(0))})}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&this.Go===null&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(t){this.n_(),this.stream.send(t)}e_(){return D(this,null,function*(){if(this.Jo())return this.close(0)})}n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}close(t,e){return D(this,null,function*(){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,t!==4?this.jo.reset():e&&e.code===te.RESOURCE_EXHAUSTED?(vr(e.toString()),vr("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):e&&e.code===te.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.i_(),this.stream.close(),this.stream=null),this.state=t,yield this.listener.To(e)})}i_(){}auth(){this.state=1;let t=this.s_(this.Wo),e=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([n,r])=>{this.Wo===e&&this.o_(n,r)},n=>{t(()=>{let r=new Ee(te.UNKNOWN,"Fetching auth token failed: "+n.message);return this.__(r)})})}o_(t,e){let n=this.s_(this.Wo);this.stream=this.a_(t,e),this.stream.Po(()=>{n(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(r=>{n(()=>this.__(r))}),this.stream.onMessage(r=>{n(()=>this.onMessage(r))})}Yo(){this.state=5,this.jo.qo(()=>D(this,null,function*(){this.state=0,this.start()}))}__(t){return ue("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}s_(t){return e=>{this.oi.enqueueAndForget(()=>this.Wo===t?e():(ue("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}},x_=class extends Wp{constructor(t,e,n,r,o,s){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,n,r,s),this.serializer=o}a_(t,e){return this.connection.Fo("Listen",t,e)}onMessage(t){this.jo.reset();let e=k5(this.serializer,t),n=function(o){if(!("targetChange"in o))return Ye.min();let s=o.targetChange;return s.targetIds&&s.targetIds.length?Ye.min():s.readTime?_r(s.readTime):Ye.min()}(t);return this.listener.u_(e,n)}c_(t){let e={};e.database=e_(this.serializer),e.addTarget=function(o,s){let a,c=s.target;if(a=z0(c)?{documents:P5(o,c)}:{query:R5(o,c).ut},a.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){a.resumeToken=Cx(o,s.resumeToken);let u=Z0(o,s.expectedCount);u!==null&&(a.expectedCount=u)}else if(s.snapshotVersion.compareTo(Ye.min())>0){a.readTime=jp(o,s.snapshotVersion.toTimestamp());let u=Z0(o,s.expectedCount);u!==null&&(a.expectedCount=u)}return a}(this.serializer,t);let n=L5(this.serializer,t);n&&(e.labels=n),this.t_(e)}l_(t){let e={};e.database=e_(this.serializer),e.removeTarget=t,this.t_(e)}},S_=class extends Wp{constructor(t,e,n,r,o,s){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,n,r,s),this.serializer=o,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(t,e){return this.connection.Fo("Write",t,e)}onMessage(t){if(Nt(!!t.streamToken),this.lastStreamToken=t.streamToken,this.h_){this.jo.reset();let e=D5(t.writeResults,t.commitTime),n=_r(t.commitTime);return this.listener.T_(n,e)}return Nt(!t.writeResults||t.writeResults.length===0),this.h_=!0,this.listener.E_()}d_(){let t={};t.database=e_(this.serializer),this.t_(t)}I_(t){let e={streamToken:this.lastStreamToken,writes:t.map(n=>A5(this.serializer,n))};this.t_(e)}};var E_=class extends class{}{constructor(t,e,n,r){super(),this.authCredentials=t,this.appCheckCredentials=e,this.connection=n,this.serializer=r,this.A_=!1}R_(){if(this.A_)throw new Ee(te.FAILED_PRECONDITION,"The client has already been terminated.")}So(t,e,n,r){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.So(t,X0(e,n),r,o,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===te.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Ee(te.UNKNOWN,o.toString())})}vo(t,e,n,r,o){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(t,X0(e,n),r,s,a,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===te.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Ee(te.UNKNOWN,s.toString())})}terminate(){this.A_=!0,this.connection.terminate()}};var O_=class{constructor(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){this.m_===0&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(t){this.state==="Online"?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.y_("Offline")))}set(t){this.b_(),this.m_=0,t==="Online"&&(this.g_=!1),this.y_(t)}y_(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}w_(t){let e=`Could not reach Cloud Firestore backend. ${t} -This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.g_?(vr(e),this.g_=!1):ue("OnlineStateTracker",e)}b_(){this.f_!==null&&(this.f_.cancel(),this.f_=null)}};var M_=class{constructor(t,e,n,r,o){this.localStore=t,this.datastore=e,this.asyncQueue=n,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=o,this.M_.io(s=>{n.enqueueAndForget(()=>D(this,null,function*(){ws(this)&&(ue("RemoteStore","Restarting streams for network reachability change."),yield function(c){return D(this,null,function*(){let u=Ze(c);u.v_.add(4),yield Zc(u),u.x_.set("Unknown"),u.v_.delete(4),yield dh(u)})}(this))}))}),this.x_=new O_(n,r)}};function dh(i){return D(this,null,function*(){if(ws(i))for(let t of i.F_)yield t(!0)})}function Zc(i){return D(this,null,function*(){for(let t of i.F_)yield t(!1)})}function kx(i,t){let e=Ze(i);e.C_.has(t.targetId)||(e.C_.set(t.targetId,t),dv(e)?cv(e):Pa(e).Jo()&&lv(e,t))}function Ax(i,t){let e=Ze(i),n=Pa(e);e.C_.delete(t),n.Jo()&&Dx(e,t),e.C_.size===0&&(n.Jo()?n.Xo():ws(e)&&e.x_.set("Unknown"))}function lv(i,t){if(i.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(Ye.min())>0){let e=i.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(e)}Pa(i).c_(t)}function Dx(i,t){i.O_.Oe(t),Pa(i).l_(t)}function cv(i){i.O_=new Q0({getRemoteKeysForTarget:t=>i.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>i.C_.get(t)||null,nt:()=>i.datastore.serializer.databaseId}),Pa(i).start(),i.x_.p_()}function dv(i){return ws(i)&&!Pa(i).Ho()&&i.C_.size>0}function ws(i){return Ze(i).v_.size===0}function Px(i){i.O_=void 0}function Y5(i){return D(this,null,function*(){i.C_.forEach((t,e)=>{lv(i,t)})})}function Z5(i,t){return D(this,null,function*(){Px(i),dv(i)?(i.x_.S_(t),cv(i)):i.x_.set("Unknown")})}function X5(i,t,e){return D(this,null,function*(){if(i.x_.set("Online"),t instanceof zp&&t.state===2&&t.cause)try{yield function(r,o){return D(this,null,function*(){let s=o.cause;for(let a of o.targetIds)r.C_.has(a)&&(yield r.remoteSyncer.rejectListen(a,s),r.C_.delete(a),r.O_.removeTarget(a))})}(i,t)}catch(n){ue("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),yield Kp(i,n)}else if(t instanceof _a?i.O_.$e(t):t instanceof Bp?i.O_.Je(t):i.O_.Ge(t),!e.isEqual(Ye.min()))try{let n=yield Mx(i.localStore);e.compareTo(n)>=0&&(yield function(o,s){let a=o.O_.it(s);return a.targetChanges.forEach((c,u)=>{if(c.resumeToken.approximateByteSize()>0){let f=o.C_.get(u);f&&o.C_.set(u,f.withResumeToken(c.resumeToken,s))}}),a.targetMismatches.forEach((c,u)=>{let f=o.C_.get(c);if(!f)return;o.C_.set(c,f.withResumeToken(Ji.EMPTY_BYTE_STRING,f.snapshotVersion)),Dx(o,c);let v=new Uc(f.target,c,u,f.sequenceNumber);lv(o,v)}),o.remoteSyncer.applyRemoteEvent(a)}(i,e))}catch(n){ue("RemoteStore","Failed to raise snapshot:",n),yield Kp(i,n)}})}function Kp(i,t,e){return D(this,null,function*(){if(!Yc(t))throw t;i.v_.add(1),yield Zc(i),i.x_.set("Offline"),e||(e=()=>Mx(i.localStore)),i.asyncQueue.enqueueRetryable(()=>D(this,null,function*(){ue("RemoteStore","Retrying IndexedDB access"),yield e(),i.v_.delete(1),yield dh(i)}))})}function Rx(i,t){return t().catch(e=>Kp(i,e,t))}function uh(i){return D(this,null,function*(){let t=Ze(i),e=Oo(t),n=t.D_.length>0?t.D_[t.D_.length-1].batchId:-1;for(;J5(t);)try{let r=yield q5(t.localStore,n);if(r===null){t.D_.length===0&&e.Xo();break}n=r.batchId,eV(t,r)}catch(r){yield Kp(t,r)}Vx(t)&&Lx(t)})}function J5(i){return ws(i)&&i.D_.length<10}function eV(i,t){i.D_.push(t);let e=Oo(i);e.Jo()&&e.P_&&e.I_(t.mutations)}function Vx(i){return ws(i)&&!Oo(i).Ho()&&i.D_.length>0}function Lx(i){Oo(i).start()}function tV(i){return D(this,null,function*(){Oo(i).d_()})}function iV(i){return D(this,null,function*(){let t=Oo(i);for(let e of i.D_)t.I_(e.mutations)})}function nV(i,t,e){return D(this,null,function*(){let n=i.D_.shift(),r=$0.from(n,t,e);yield Rx(i,()=>i.remoteSyncer.applySuccessfulWrite(r)),yield uh(i)})}function rV(i,t){return D(this,null,function*(){t&&Oo(i).P_&&(yield function(n,r){return D(this,null,function*(){if(function(s){return I5(s)&&s!==te.ABORTED}(r.code)){let o=n.D_.shift();Oo(n).Zo(),yield Rx(n,()=>n.remoteSyncer.rejectFailedWrite(o.batchId,r)),yield uh(n)}})}(i,t)),Vx(i)&&Lx(i)})}function qT(i,t){return D(this,null,function*(){let e=Ze(i);e.asyncQueue.verifyOperationInProgress(),ue("RemoteStore","RemoteStore received new credentials");let n=ws(e);e.v_.add(3),yield Zc(e),n&&e.x_.set("Unknown"),yield e.remoteSyncer.handleCredentialChange(t),e.v_.delete(3),yield dh(e)})}function oV(i,t){return D(this,null,function*(){let e=Ze(i);t?(e.v_.delete(2),yield dh(e)):t||(e.v_.add(2),yield Zc(e),e.x_.set("Unknown"))})}function Pa(i){return i.N_||(i.N_=function(e,n,r){let o=Ze(e);return o.R_(),new x_(n,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(i.datastore,i.asyncQueue,{Po:Y5.bind(null,i),To:Z5.bind(null,i),u_:X5.bind(null,i)}),i.F_.push(t=>D(this,null,function*(){t?(i.N_.Zo(),dv(i)?cv(i):i.x_.set("Unknown")):(yield i.N_.stop(),Px(i))}))),i.N_}function Oo(i){return i.B_||(i.B_=function(e,n,r){let o=Ze(e);return o.R_(),new S_(n,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(i.datastore,i.asyncQueue,{Po:tV.bind(null,i),To:rV.bind(null,i),E_:iV.bind(null,i),T_:nV.bind(null,i)}),i.F_.push(t=>D(this,null,function*(){t?(i.B_.Zo(),yield uh(i)):(yield i.B_.stop(),i.D_.length>0&&(ue("RemoteStore",`Stopping write stream with ${i.D_.length} pending writes`),i.D_=[]))}))),i.B_}var k_=class i{constructor(t,e,n,r,o){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=r,this.removalCallback=o,this.deferred=new jn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(t,e,n,r,o){let s=Date.now()+n,a=new i(t,e,s,r,o);return a.start(n),a}start(t){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Ee(te.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(t=>this.deferred.resolve(t))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}};function uv(i,t){if(vr("AsyncQueue",`${t}: ${i}`),Yc(i))return new Ee(te.UNAVAILABLE,`${t}: ${i}`);throw i}var Qp=class i{constructor(t){this.comparator=t?(e,n)=>t(e,n)||Be.comparator(e.key,n.key):(e,n)=>Be.comparator(e.key,n.key),this.keyedMap=Dc(),this.sortedSet=new ai(this.comparator)}static emptySet(t){return new i(t.comparator)}has(t){return this.keyedMap.get(t)!=null}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){let e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal((e,n)=>(t(e),!1))}add(t){let e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))}delete(t){let e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this}isEqual(t){if(!(t instanceof i)||this.size!==t.size)return!1;let e=this.sortedSet.getIterator(),n=t.sortedSet.getIterator();for(;e.hasNext();){let r=e.getNext().key,o=n.getNext().key;if(!r.isEqual(o))return!1}return!0}toString(){let t=[];return this.forEach(e=>{t.push(e.toString())}),t.length===0?"DocumentSet ()":`DocumentSet ( + }`}};var W0=class{constructor(t,e){this.count=t,this.unchangedNames=e}};var mi,gt;function I5(i){switch(i){default:return je();case te.CANCELLED:case te.UNKNOWN:case te.DEADLINE_EXCEEDED:case te.RESOURCE_EXHAUSTED:case te.INTERNAL:case te.UNAVAILABLE:case te.UNAUTHENTICATED:return!1;case te.INVALID_ARGUMENT:case te.NOT_FOUND:case te.ALREADY_EXISTS:case te.PERMISSION_DENIED:case te.FAILED_PRECONDITION:case te.ABORTED:case te.OUT_OF_RANGE:case te.UNIMPLEMENTED:case te.DATA_LOSS:return!0}}function bx(i){if(i===void 0)return yr("GRPC error has no .code"),te.UNKNOWN;switch(i){case mi.OK:return te.OK;case mi.CANCELLED:return te.CANCELLED;case mi.UNKNOWN:return te.UNKNOWN;case mi.DEADLINE_EXCEEDED:return te.DEADLINE_EXCEEDED;case mi.RESOURCE_EXHAUSTED:return te.RESOURCE_EXHAUSTED;case mi.INTERNAL:return te.INTERNAL;case mi.UNAVAILABLE:return te.UNAVAILABLE;case mi.UNAUTHENTICATED:return te.UNAUTHENTICATED;case mi.INVALID_ARGUMENT:return te.INVALID_ARGUMENT;case mi.NOT_FOUND:return te.NOT_FOUND;case mi.ALREADY_EXISTS:return te.ALREADY_EXISTS;case mi.PERMISSION_DENIED:return te.PERMISSION_DENIED;case mi.FAILED_PRECONDITION:return te.FAILED_PRECONDITION;case mi.ABORTED:return te.ABORTED;case mi.OUT_OF_RANGE:return te.OUT_OF_RANGE;case mi.UNIMPLEMENTED:return te.UNIMPLEMENTED;case mi.DATA_LOSS:return te.DATA_LOSS;default:return je()}}(gt=mi||(mi={}))[gt.OK=0]="OK",gt[gt.CANCELLED=1]="CANCELLED",gt[gt.UNKNOWN=2]="UNKNOWN",gt[gt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",gt[gt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",gt[gt.NOT_FOUND=5]="NOT_FOUND",gt[gt.ALREADY_EXISTS=6]="ALREADY_EXISTS",gt[gt.PERMISSION_DENIED=7]="PERMISSION_DENIED",gt[gt.UNAUTHENTICATED=16]="UNAUTHENTICATED",gt[gt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",gt[gt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",gt[gt.ABORTED=10]="ABORTED",gt[gt.OUT_OF_RANGE=11]="OUT_OF_RANGE",gt[gt.UNIMPLEMENTED=12]="UNIMPLEMENTED",gt[gt.INTERNAL=13]="INTERNAL",gt[gt.UNAVAILABLE=14]="UNAVAILABLE",gt[gt.DATA_LOSS=15]="DATA_LOSS";var BT=null;function w5(){return new TextEncoder}var T5=new ds([4294967295,4294967295],0);function zT(i){let t=w5().encode(i),e=new TT;return e.update(t),new Uint8Array(e.digest())}function UT(i){let t=new DataView(i.buffer),e=t.getUint32(0,!0),n=t.getUint32(4,!0),r=t.getUint32(8,!0),o=t.getUint32(12,!0);return[new ds([e,n],0),new ds([r,o],0)]}var K0=class i{constructor(t,e,n){if(this.bitmap=t,this.padding=e,this.hashCount=n,e<0||e>=8)throw new hs(`Invalid padding: ${e}`);if(n<0)throw new hs(`Invalid hash count: ${n}`);if(t.length>0&&this.hashCount===0)throw new hs(`Invalid hash count: ${n}`);if(t.length===0&&e!==0)throw new hs(`Invalid padding when bitmap length is 0: ${e}`);this.Te=8*t.length-e,this.Ee=ds.fromNumber(this.Te)}de(t,e,n){let r=t.add(e.multiply(ds.fromNumber(n)));return r.compare(T5)===1&&(r=new ds([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Ee).toNumber()}Ae(t){return(this.bitmap[Math.floor(t/8)]&1<s.insert(a)),s}insert(t){if(this.Te===0)return;let e=zT(t),[n,r]=UT(e);for(let o=0;o0&&(this.Se=!0,this.ye=t)}ve(){let t=lt(),e=lt(),n=lt();return this.pe.forEach((r,o)=>{switch(o){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:je()}}),new zc(this.ye,this.we,t,e,n)}Fe(){this.Se=!1,this.pe=HT()}Me(t,e){this.Se=!0,this.pe=this.pe.insert(t,e)}xe(t){this.Se=!0,this.pe=this.pe.remove(t)}Oe(){this.ge+=1}Ne(){this.ge-=1,Nt(this.ge>=0)}Be(){this.Se=!0,this.we=!0}},Q0=class{constructor(t){this.Le=t,this.ke=new Map,this.qe=Br(),this.Qe=jT(),this.Ke=new ai(St)}$e(t){for(let e of t.Ve)t.me&&t.me.isFoundDocument()?this.Ue(e,t.me):this.We(e,t.key,t.me);for(let e of t.removedTargetIds)this.We(e,t.key,t.me)}Ge(t){this.forEachTarget(t,e=>{let n=this.ze(e);switch(t.state){case 0:this.je(e)&&n.Ce(t.resumeToken);break;case 1:n.Ne(),n.be||n.Fe(),n.Ce(t.resumeToken);break;case 2:n.Ne(),n.be||this.removeTarget(e);break;case 3:this.je(e)&&(n.Be(),n.Ce(t.resumeToken));break;case 4:this.je(e)&&(this.He(e),n.Ce(t.resumeToken));break;default:je()}})}forEachTarget(t,e){t.targetIds.length>0?t.targetIds.forEach(e):this.ke.forEach((n,r)=>{this.je(r)&&e(r)})}Je(t){let e=t.targetId,n=t.fe.count,r=this.Ye(e);if(r){let o=r.target;if(z0(o))if(n===0){let s=new Be(o.path);this.We(e,s,Gn.newNoDocument(s,Ye.min()))}else Nt(n===1);else{let s=this.Ze(e);if(s!==n){let a=this.Xe(t),c=a?this.et(a,t,s):1;if(c!==0){this.He(e);let u=c===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(e,u)}BT?.tt(function(f,v,b,O,V){var K,P,j,ce,_e,me;let $e={localCacheCount:f,existenceFilterCount:v.count,databaseId:b.database,projectId:b.projectId},He=v.unchangedNames;return He&&($e.bloomFilter={applied:V===0,hashCount:(K=He?.hashCount)!==null&&K!==void 0?K:0,bitmapLength:(ce=(j=(P=He?.bits)===null||P===void 0?void 0:P.bitmap)===null||j===void 0?void 0:j.length)!==null&&ce!==void 0?ce:0,padding:(me=(_e=He?.bits)===null||_e===void 0?void 0:_e.padding)!==null&&me!==void 0?me:0,mightContain:Et=>{var ht;return(ht=O?.mightContain(Et))!==null&&ht!==void 0&&ht}}),$e}(s,t.fe,this.Le.nt(),a,c))}}}}Xe(t){let e=t.fe.unchangedNames;if(!e||!e.bits)return null;let{bits:{bitmap:n="",padding:r=0},hashCount:o=0}=e,s,a;try{s=So(n).toUint8Array()}catch(c){if(c instanceof Rp)return va("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw c}try{a=new K0(s,r,o)}catch(c){return va(c instanceof hs?"BloomFilter error: ":"Applying bloom filter failed: ",c),null}return a.Te===0?null:a}et(t,e,n){return e.fe.count===n-this.rt(t,e.targetId)?0:2}rt(t,e){let n=this.Le.getRemoteKeysForTarget(e),r=0;return n.forEach(o=>{let s=this.Le.nt(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;t.mightContain(a)||(this.We(e,o,null),r++)}),r}it(t){let e=new Map;this.ke.forEach((o,s)=>{let a=this.Ye(s);if(a){if(o.current&&z0(a.target)){let c=new Be(a.target.path);this.qe.get(c)!==null||this.st(s,c)||this.We(s,c,Gn.newNoDocument(c,t))}o.De&&(e.set(s,o.ve()),o.Fe())}});let n=lt();this.Qe.forEach((o,s)=>{let a=!0;s.forEachWhile(c=>{let u=this.Ye(c);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(n=n.add(o))}),this.qe.forEach((o,s)=>s.setReadTime(t));let r=new Np(t,e,this.Ke,this.qe,n);return this.qe=Br(),this.Qe=jT(),this.Ke=new ai(St),r}Ue(t,e){if(!this.je(t))return;let n=this.st(t,e.key)?2:0;this.ze(t).Me(e.key,n),this.qe=this.qe.insert(e.key,e),this.Qe=this.Qe.insert(e.key,this.ot(e.key).add(t))}We(t,e,n){if(!this.je(t))return;let r=this.ze(t);this.st(t,e)?r.Me(e,1):r.xe(e),this.Qe=this.Qe.insert(e,this.ot(e).delete(t)),n&&(this.qe=this.qe.insert(e,n))}removeTarget(t){this.ke.delete(t)}Ze(t){let e=this.ze(t).ve();return this.Le.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size}Oe(t){this.ze(t).Oe()}ze(t){let e=this.ke.get(t);return e||(e=new Up,this.ke.set(t,e)),e}ot(t){let e=this.Qe.get(t);return e||(e=new $i(St),this.Qe=this.Qe.insert(t,e)),e}je(t){let e=this.Ye(t)!==null;return e||ue("WatchChangeAggregator","Detected inactive target",t),e}Ye(t){let e=this.ke.get(t);return e&&e.be?null:this.Le._t(t)}He(t){this.ke.set(t,new Up),this.Le.getRemoteKeysForTarget(t).forEach(e=>{this.We(t,e,null)})}st(t,e){return this.Le.getRemoteKeysForTarget(t).has(e)}};function jT(){return new ai(Be.comparator)}function HT(){return new ai(Be.comparator)}var x5={asc:"ASCENDING",desc:"DESCENDING"},S5={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},E5={and:"AND",or:"OR"},Y0=class{constructor(t,e){this.databaseId=t,this.useProto3Json=e}};function Z0(i,t){return i.useProto3Json||sh(t)?t:{value:t}}function jp(i,t){return i.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function Cx(i,t){return i.useProto3Json?t.toBase64():t.toUint8Array()}function O5(i,t){return jp(i,t.toTimestamp())}function vr(i){return Nt(!!i),Ye.fromTimestamp(function(e){let n=xo(e);return new Ri(n.seconds,n.nanos)}(i))}function av(i,t){return X0(i,t).canonicalString()}function X0(i,t){let e=function(r){return new gi(["projects",r.projectId,"databases",r.database])}(i).child("documents");return t===void 0?e:e.child(t)}function Ix(i){let t=gi.fromString(i);return Nt(Ex(t)),t}function J0(i,t){return av(i.databaseId,t.path)}function p0(i,t){let e=Ix(t);if(e.get(1)!==i.databaseId.projectId)throw new Ee(te.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+e.get(1)+" vs "+i.databaseId.projectId);if(e.get(3)!==i.databaseId.database)throw new Ee(te.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+e.get(3)+" vs "+i.databaseId.database);return new Be(Tx(e))}function wx(i,t){return av(i.databaseId,t)}function M5(i){let t=Ix(i);return t.length===4?gi.emptyPath():Tx(t)}function e_(i){return new gi(["projects",i.databaseId.projectId,"databases",i.databaseId.database]).canonicalString()}function Tx(i){return Nt(i.length>4&&i.get(4)==="documents"),i.popFirst(5)}function GT(i,t,e){return{name:J0(i,t),fields:e.value.mapValue.fields}}function k5(i,t){let e;if("targetChange"in t){t.targetChange;let n=function(u){return u==="NO_CHANGE"?0:u==="ADD"?1:u==="REMOVE"?2:u==="CURRENT"?3:u==="RESET"?4:je()}(t.targetChange.targetChangeType||"NO_CHANGE"),r=t.targetChange.targetIds||[],o=function(u,f){return u.useProto3Json?(Nt(f===void 0||typeof f=="string"),Ji.fromBase64String(f||"")):(Nt(f===void 0||f instanceof Uint8Array),Ji.fromUint8Array(f||new Uint8Array))}(i,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(u){let f=u.code===void 0?te.UNKNOWN:bx(u.code);return new Ee(f,u.message||"")}(s);e=new zp(n,r,o,a||null)}else if("documentChange"in t){t.documentChange;let n=t.documentChange;n.document,n.document.name,n.document.updateTime;let r=p0(i,n.document.name),o=vr(n.document.updateTime),s=n.document.createTime?vr(n.document.createTime):Ye.min(),a=new yn({mapValue:{fields:n.document.fields}}),c=Gn.newFoundDocument(r,o,s,a),u=n.targetIds||[],f=n.removedTargetIds||[];e=new _a(u,f,c.key,c)}else if("documentDelete"in t){t.documentDelete;let n=t.documentDelete;n.document;let r=p0(i,n.document),o=n.readTime?vr(n.readTime):Ye.min(),s=Gn.newNoDocument(r,o),a=n.removedTargetIds||[];e=new _a([],a,s.key,s)}else if("documentRemove"in t){t.documentRemove;let n=t.documentRemove;n.document;let r=p0(i,n.document),o=n.removedTargetIds||[];e=new _a([],o,r,null)}else{if(!("filter"in t))return je();{t.filter;let n=t.filter;n.targetId;let{count:r=0,unchangedNames:o}=n,s=new W0(r,o),a=n.targetId;e=new Bp(a,s)}}return e}function A5(i,t){let e;if(t instanceof bs)e={update:GT(i,t.key,t.value)};else if(t instanceof Fp)e={delete:J0(i,t.key)};else if(t instanceof Ir)e={update:GT(i,t.key,t.data),updateMask:z5(t.fieldMask)};else{if(!(t instanceof H0))return je();e={verify:J0(i,t.key)}}return t.fieldTransforms.length>0&&(e.updateTransforms=t.fieldTransforms.map(n=>function(o,s){let a=s.transform;if(a instanceof Sa)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof vs)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof ys)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof Ea)return{fieldPath:s.field.canonicalString(),increment:a.Ie};throw je()}(0,n))),t.precondition.isNone||(e.currentDocument=function(r,o){return o.updateTime!==void 0?{updateTime:O5(r,o.updateTime)}:o.exists!==void 0?{exists:o.exists}:je()}(i,t.precondition)),e}function D5(i,t){return i&&i.length>0?(Nt(t!==void 0),i.map(e=>function(r,o){let s=r.updateTime?vr(r.updateTime):vr(o);return s.isEqual(Ye.min())&&(s=vr(o)),new j0(s,r.transformResults||[])}(e,t))):[]}function P5(i,t){return{documents:[wx(i,t.path)]}}function R5(i,t){let e={structuredQuery:{}},n=t.path,r;t.collectionGroup!==null?(r=n,e.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(r=n.popLast(),e.structuredQuery.from=[{collectionId:n.lastSegment()}]),e.parent=wx(i,r);let o=function(u){if(u.length!==0)return Sx(Cr.create(u,"and"))}(t.filters);o&&(e.structuredQuery.where=o);let s=function(u){if(u.length!==0)return u.map(f=>function(b){return{field:ma(b.field),direction:F5(b.dir)}}(f))}(t.orderBy);s&&(e.structuredQuery.orderBy=s);let a=Z0(i,t.limit);return a!==null&&(e.structuredQuery.limit=a),t.startAt&&(e.structuredQuery.startAt=function(u){return{before:u.inclusive,values:u.position}}(t.startAt)),t.endAt&&(e.structuredQuery.endAt=function(u){return{before:!u.inclusive,values:u.position}}(t.endAt)),{ut:e,parent:r}}function V5(i){let t=M5(i.parent),e=i.structuredQuery,n=e.from?e.from.length:0,r=null;if(n>0){Nt(n===1);let f=e.from[0];f.allDescendants?r=f.collectionId:t=t.child(f.collectionId)}let o=[];e.where&&(o=function(v){let b=xx(v);return b instanceof Cr&&nx(b)?b.getFilters():[b]}(e.where));let s=[];e.orderBy&&(s=function(v){return v.map(b=>function(V){return new wa(fa(V.field),function(P){switch(P){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(V.direction))}(b))}(e.orderBy));let a=null;e.limit&&(a=function(v){let b;return b=typeof v=="object"?v.value:v,sh(b)?null:b}(e.limit));let c=null;e.startAt&&(c=function(v){let b=!!v.before,O=v.values||[];return new Ia(O,b)}(e.startAt));let u=null;return e.endAt&&(u=function(v){let b=!v.before,O=v.values||[];return new Ia(O,b)}(e.endAt)),s5(t,r,s,o,a,"F",c,u)}function L5(i,t){let e=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return je()}}(t.purpose);return e==null?null:{"goog-listen-tags":e}}function xx(i){return i.unaryFilter!==void 0?function(e){switch(e.unaryFilter.op){case"IS_NAN":let n=fa(e.unaryFilter.field);return bi.create(n,"==",{doubleValue:NaN});case"IS_NULL":let r=fa(e.unaryFilter.field);return bi.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let o=fa(e.unaryFilter.field);return bi.create(o,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let s=fa(e.unaryFilter.field);return bi.create(s,"!=",{nullValue:"NULL_VALUE"});default:return je()}}(i):i.fieldFilter!==void 0?function(e){return bi.create(fa(e.fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return je()}}(e.fieldFilter.op),e.fieldFilter.value)}(i):i.compositeFilter!==void 0?function(e){return Cr.create(e.compositeFilter.filters.map(n=>xx(n)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return je()}}(e.compositeFilter.op))}(i):je()}function F5(i){return x5[i]}function N5(i){return S5[i]}function B5(i){return E5[i]}function ma(i){return{fieldPath:i.canonicalString()}}function fa(i){return bn.fromServerFormat(i.fieldPath)}function Sx(i){return i instanceof bi?function(e){if(e.op==="=="){if(kT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NAN"}};if(MT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NULL"}}}else if(e.op==="!="){if(kT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NOT_NAN"}};if(MT(e.value))return{unaryFilter:{field:ma(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ma(e.field),op:N5(e.op),value:e.value}}}(i):i instanceof Cr?function(e){let n=e.getFilters().map(r=>Sx(r));return n.length===1?n[0]:{compositeFilter:{op:B5(e.op),filters:n}}}(i):je()}function z5(i){let t=[];return i.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}function Ex(i){return i.length>=4&&i.get(0)==="projects"&&i.get(2)==="databases"}var Uc=class i{constructor(t,e,n,r,o=Ye.min(),s=Ye.min(),a=Ji.EMPTY_BYTE_STRING,c=null){this.target=t,this.targetId=e,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=c}withSequenceNumber(t){return new i(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,e){return new i(this.target,this.targetId,this.purpose,this.sequenceNumber,e,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new i(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new i(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}};var t_=class{constructor(t){this.ct=t}};function U5(i){let t=V5({parent:i.parent,structuredQuery:i.structuredQuery});return i.limitType==="LAST"?U0(t,t.limit,"L"):t}var Hp=class{constructor(){}Pt(t,e){this.It(t,e),e.Tt()}It(t,e){if("nullValue"in t)this.Et(e,5);else if("booleanValue"in t)this.Et(e,10),e.dt(t.booleanValue?1:0);else if("integerValue"in t)this.Et(e,15),e.dt(si(t.integerValue));else if("doubleValue"in t){let n=si(t.doubleValue);isNaN(n)?this.Et(e,13):(this.Et(e,15),Fc(n)?e.dt(0):e.dt(n))}else if("timestampValue"in t){let n=t.timestampValue;this.Et(e,20),typeof n=="string"?e.At(n):(e.At(`${n.seconds||""}`),e.dt(n.nanos||0))}else if("stringValue"in t)this.Rt(t.stringValue,e),this.Vt(e);else if("bytesValue"in t)this.Et(e,30),e.ft(So(t.bytesValue)),this.Vt(e);else if("referenceValue"in t)this.gt(t.referenceValue,e);else if("geoPointValue"in t){let n=t.geoPointValue;this.Et(e,45),e.dt(n.latitude||0),e.dt(n.longitude||0)}else"mapValue"in t?ex(t)?this.Et(e,Number.MAX_SAFE_INTEGER):(this.yt(t.mapValue,e),this.Vt(e)):"arrayValue"in t?(this.wt(t.arrayValue,e),this.Vt(e)):je()}Rt(t,e){this.Et(e,25),this.St(t,e)}St(t,e){e.At(t)}yt(t,e){let n=t.fields||{};this.Et(e,55);for(let r of Object.keys(n))this.Rt(r,e),this.It(n[r],e)}wt(t,e){let n=t.values||[];this.Et(e,50);for(let r of n)this.It(r,e)}gt(t,e){this.Et(e,37),Be.fromName(t).path.forEach(n=>{this.Et(e,60),this.St(n,e)})}Et(t,e){t.dt(e)}Vt(t){t.dt(2)}};Hp.bt=new Hp;var i_=class{constructor(){this._n=new n_}addToCollectionParentIndex(t,e){return this._n.add(e),ne.resolve()}getCollectionParents(t,e){return ne.resolve(this._n.getEntries(e))}addFieldIndex(t,e){return ne.resolve()}deleteFieldIndex(t,e){return ne.resolve()}deleteAllFieldIndexes(t){return ne.resolve()}createTargetIndexes(t,e){return ne.resolve()}getDocumentsMatchingTarget(t,e){return ne.resolve(null)}getIndexType(t,e){return ne.resolve(0)}getFieldIndexes(t,e){return ne.resolve([])}getNextCollectionGroupToUpdate(t){return ne.resolve(null)}getMinOffset(t,e){return ne.resolve(gs.min())}getMinOffsetFromCollectionGroup(t,e){return ne.resolve(gs.min())}updateCollectionGroup(t,e,n){return ne.resolve()}updateIndexEntries(t,e){return ne.resolve()}},n_=class{constructor(){this.index={}}add(t){let e=t.lastSegment(),n=t.popLast(),r=this.index[e]||new $i(gi.comparator),o=!r.has(n);return this.index[e]=r.add(n),o}has(t){let e=t.lastSegment(),n=t.popLast(),r=this.index[e];return r&&r.has(n)}getEntries(t){return(this.index[t]||new $i(gi.comparator)).toArray()}};var oie=new Uint8Array(0);var fr=class i{constructor(t,e,n){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=n}static withCacheSize(t){return new i(t,i.DEFAULT_COLLECTION_PERCENTILE,i.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}};fr.DEFAULT_COLLECTION_PERCENTILE=10,fr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,fr.DEFAULT=new fr(41943040,fr.DEFAULT_COLLECTION_PERCENTILE,fr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),fr.DISABLED=new fr(-1,0,0);var jc=class i{constructor(t){this.On=t}next(){return this.On+=2,this.On}static Nn(){return new i(0)}static Bn(){return new i(-1)}};var r_=class{constructor(){this.changes=new Eo(t=>t.toString(),(t,e)=>t.isEqual(e)),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,e){this.assertNotApplied(),this.changes.set(t,Gn.newInvalidDocument(t).setReadTime(e))}getEntry(t,e){this.assertNotApplied();let n=this.changes.get(e);return n!==void 0?ne.resolve(n):this.getFromCache(t,e)}getEntries(t,e){return this.getAllFromCache(t,e)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}};var o_=class{constructor(t,e){this.overlayedDocument=t,this.mutatedFields=e}};var s_=class{constructor(t,e,n,r){this.remoteDocumentCache=t,this.mutationQueue=e,this.documentOverlayCache=n,this.indexManager=r}getDocument(t,e){let n=null;return this.documentOverlayCache.getOverlay(t,e).next(r=>(n=r,this.remoteDocumentCache.getEntry(t,e))).next(r=>(n!==null&&Lc(n.mutation,r,Dn.empty(),Ri.now()),r))}getDocuments(t,e){return this.remoteDocumentCache.getEntries(t,e).next(n=>this.getLocalViewOfDocuments(t,n,lt()).next(()=>n))}getLocalViewOfDocuments(t,e,n=lt()){let r=ps();return this.populateOverlays(t,r,e).next(()=>this.computeViews(t,e,r,n).next(o=>{let s=Dc();return o.forEach((a,c)=>{s=s.insert(a,c.overlayedDocument)}),s}))}getOverlayedDocuments(t,e){let n=ps();return this.populateOverlays(t,n,e).next(()=>this.computeViews(t,e,n,lt()))}populateOverlays(t,e,n){let r=[];return n.forEach(o=>{e.has(o)||r.push(o)}),this.documentOverlayCache.getOverlays(t,r).next(o=>{o.forEach((s,a)=>{e.set(s,a)})})}computeViews(t,e,n,r){let o=Br(),s=Vc(),a=function(){return Vc()}();return e.forEach((c,u)=>{let f=n.get(u.key);r.has(u.key)&&(f===void 0||f.mutation instanceof Ir)?o=o.insert(u.key,u):f!==void 0?(s.set(u.key,f.mutation.getFieldMask()),Lc(f.mutation,u,f.mutation.getFieldMask(),Ri.now())):s.set(u.key,Dn.empty())}),this.recalculateAndSaveOverlays(t,o).next(c=>(c.forEach((u,f)=>s.set(u,f)),e.forEach((u,f)=>{var v;return a.set(u,new o_(f,(v=s.get(u))!==null&&v!==void 0?v:null))}),a))}recalculateAndSaveOverlays(t,e){let n=Vc(),r=new ai((s,a)=>s-a),o=lt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,e).next(s=>{for(let a of s)a.keys().forEach(c=>{let u=e.get(c);if(u===null)return;let f=n.get(c)||Dn.empty();f=a.applyToLocalView(u,f),n.set(c,f);let v=(r.get(a.batchId)||lt()).add(c);r=r.insert(a.batchId,v)})}).next(()=>{let s=[],a=r.getReverseIterator();for(;a.hasNext();){let c=a.getNext(),u=c.key,f=c.value,v=ux();f.forEach(b=>{if(!o.has(b)){let O=vx(e.get(b),n.get(b));O!==null&&v.set(b,O),o=o.add(b)}}),s.push(this.documentOverlayCache.saveOverlays(t,u,v))}return ne.waitFor(s)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(t,e){return this.remoteDocumentCache.getEntries(t,e).next(n=>this.recalculateAndSaveOverlays(t,n))}getDocumentsMatchingQuery(t,e,n,r){return function(s){return Be.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(e)?this.getDocumentsMatchingDocumentQuery(t,e.path):a5(e)?this.getDocumentsMatchingCollectionGroupQuery(t,e,n,r):this.getDocumentsMatchingCollectionQuery(t,e,n,r)}getNextDocuments(t,e,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(t,e,n,r).next(o=>{let s=r-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,e,n.largestBatchId,r-o.size):ne.resolve(ps()),a=-1,c=o;return s.next(u=>ne.forEach(u,(f,v)=>(a{c=c.insert(f,b)}))).next(()=>this.populateOverlays(t,u,o)).next(()=>this.computeViews(t,c,u,lt())).next(f=>({batchId:a,changes:dx(f)})))})}getDocumentsMatchingDocumentQuery(t,e){return this.getDocument(t,new Be(e)).next(n=>{let r=Dc();return n.isFoundDocument()&&(r=r.insert(n.key,n)),r})}getDocumentsMatchingCollectionGroupQuery(t,e,n,r){let o=e.collectionGroup,s=Dc();return this.indexManager.getCollectionParents(t,o).next(a=>ne.forEach(a,c=>{let u=function(v,b){return new Ta(b,null,v.explicitOrderBy.slice(),v.filters.slice(),v.limit,v.limitType,v.startAt,v.endAt)}(e,c.child(o));return this.getDocumentsMatchingCollectionQuery(t,u,n,r).next(f=>{f.forEach((v,b)=>{s=s.insert(v,b)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(t,e,n,r){let o;return this.documentOverlayCache.getOverlaysForCollection(t,e.path,n.largestBatchId).next(s=>(o=s,this.remoteDocumentCache.getDocumentsMatchingQuery(t,e,n,o,r))).next(s=>{o.forEach((c,u)=>{let f=u.getKey();s.get(f)===null&&(s=s.insert(f,Gn.newInvalidDocument(f)))});let a=Dc();return s.forEach((c,u)=>{let f=o.get(c);f!==void 0&&Lc(f.mutation,u,Dn.empty(),Ri.now()),lh(e,u)&&(a=a.insert(c,u))}),a})}};var a_=class{constructor(t){this.serializer=t,this.cr=new Map,this.lr=new Map}getBundleMetadata(t,e){return ne.resolve(this.cr.get(e))}saveBundleMetadata(t,e){return this.cr.set(e.id,function(r){return{id:r.id,version:r.version,createTime:vr(r.createTime)}}(e)),ne.resolve()}getNamedQuery(t,e){return ne.resolve(this.lr.get(e))}saveNamedQuery(t,e){return this.lr.set(e.name,function(r){return{name:r.name,query:U5(r.bundledQuery),readTime:vr(r.readTime)}}(e)),ne.resolve()}};var l_=class{constructor(){this.overlays=new ai(Be.comparator),this.hr=new Map}getOverlay(t,e){return ne.resolve(this.overlays.get(e))}getOverlays(t,e){let n=ps();return ne.forEach(e,r=>this.getOverlay(t,r).next(o=>{o!==null&&n.set(r,o)})).next(()=>n)}saveOverlays(t,e,n){return n.forEach((r,o)=>{this.ht(t,e,o)}),ne.resolve()}removeOverlaysForBatchId(t,e,n){let r=this.hr.get(n);return r!==void 0&&(r.forEach(o=>this.overlays=this.overlays.remove(o)),this.hr.delete(n)),ne.resolve()}getOverlaysForCollection(t,e,n){let r=ps(),o=e.length+1,s=new Be(e.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){let c=a.getNext().value,u=c.getKey();if(!e.isPrefixOf(u.path))break;u.path.length===o&&c.largestBatchId>n&&r.set(c.getKey(),c)}return ne.resolve(r)}getOverlaysForCollectionGroup(t,e,n,r){let o=new ai((u,f)=>u-f),s=this.overlays.getIterator();for(;s.hasNext();){let u=s.getNext().value;if(u.getKey().getCollectionGroup()===e&&u.largestBatchId>n){let f=o.get(u.largestBatchId);f===null&&(f=ps(),o=o.insert(u.largestBatchId,f)),f.set(u.getKey(),u)}}let a=ps(),c=o.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((u,f)=>a.set(u,f)),!(a.size()>=r)););return ne.resolve(a)}ht(t,e,n){let r=this.overlays.get(n.key);if(r!==null){let s=this.hr.get(r.largestBatchId).delete(n.key);this.hr.set(r.largestBatchId,s)}this.overlays=this.overlays.insert(n.key,new q0(e,n));let o=this.hr.get(e);o===void 0&&(o=lt(),this.hr.set(e,o)),this.hr.set(e,o.add(n.key))}};var Hc=class{constructor(){this.Pr=new $i(fi.Ir),this.Tr=new $i(fi.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(t,e){let n=new fi(t,e);this.Pr=this.Pr.add(n),this.Tr=this.Tr.add(n)}dr(t,e){t.forEach(n=>this.addReference(n,e))}removeReference(t,e){this.Ar(new fi(t,e))}Rr(t,e){t.forEach(n=>this.removeReference(n,e))}Vr(t){let e=new Be(new gi([])),n=new fi(e,t),r=new fi(e,t+1),o=[];return this.Tr.forEachInRange([n,r],s=>{this.Ar(s),o.push(s.key)}),o}mr(){this.Pr.forEach(t=>this.Ar(t))}Ar(t){this.Pr=this.Pr.delete(t),this.Tr=this.Tr.delete(t)}gr(t){let e=new Be(new gi([])),n=new fi(e,t),r=new fi(e,t+1),o=lt();return this.Tr.forEachInRange([n,r],s=>{o=o.add(s.key)}),o}containsKey(t){let e=new fi(t,0),n=this.Pr.firstAfterOrEqual(e);return n!==null&&t.isEqual(n.key)}},fi=class{constructor(t,e){this.key=t,this.pr=e}static Ir(t,e){return Be.comparator(t.key,e.key)||St(t.pr,e.pr)}static Er(t,e){return St(t.pr,e.pr)||Be.comparator(t.key,e.key)}};var c_=class{constructor(t,e){this.indexManager=t,this.referenceDelegate=e,this.mutationQueue=[],this.yr=1,this.wr=new $i(fi.Ir)}checkEmpty(t){return ne.resolve(this.mutationQueue.length===0)}addMutationBatch(t,e,n,r){let o=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new G0(o,e,n,r);this.mutationQueue.push(s);for(let a of r)this.wr=this.wr.add(new fi(a.key,o)),this.indexManager.addToCollectionParentIndex(t,a.key.path.popLast());return ne.resolve(s)}lookupMutationBatch(t,e){return ne.resolve(this.Sr(e))}getNextMutationBatchAfterBatchId(t,e){let n=e+1,r=this.br(n),o=r<0?0:r;return ne.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return ne.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(t){return ne.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,e){let n=new fi(e,0),r=new fi(e,Number.POSITIVE_INFINITY),o=[];return this.wr.forEachInRange([n,r],s=>{let a=this.Sr(s.pr);o.push(a)}),ne.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(t,e){let n=new $i(St);return e.forEach(r=>{let o=new fi(r,0),s=new fi(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([o,s],a=>{n=n.add(a.pr)})}),ne.resolve(this.Dr(n))}getAllMutationBatchesAffectingQuery(t,e){let n=e.path,r=n.length+1,o=n;Be.isDocumentKey(o)||(o=o.child(""));let s=new fi(new Be(o),0),a=new $i(St);return this.wr.forEachWhile(c=>{let u=c.key.path;return!!n.isPrefixOf(u)&&(u.length===r&&(a=a.add(c.pr)),!0)},s),ne.resolve(this.Dr(a))}Dr(t){let e=[];return t.forEach(n=>{let r=this.Sr(n);r!==null&&e.push(r)}),e}removeMutationBatch(t,e){Nt(this.Cr(e.batchId,"removed")===0),this.mutationQueue.shift();let n=this.wr;return ne.forEach(e.mutations,r=>{let o=new fi(r.key,e.batchId);return n=n.delete(o),this.referenceDelegate.markPotentiallyOrphaned(t,r.key)}).next(()=>{this.wr=n})}Mn(t){}containsKey(t,e){let n=new fi(e,0),r=this.wr.firstAfterOrEqual(n);return ne.resolve(e.isEqual(r&&r.key))}performConsistencyCheck(t){return this.mutationQueue.length,ne.resolve()}Cr(t,e){return this.br(t)}br(t){return this.mutationQueue.length===0?0:t-this.mutationQueue[0].batchId}Sr(t){let e=this.br(t);return e<0||e>=this.mutationQueue.length?null:this.mutationQueue[e]}};var d_=class{constructor(t){this.vr=t,this.docs=function(){return new ai(Be.comparator)}(),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,e){let n=e.key,r=this.docs.get(n),o=r?r.size:0,s=this.vr(e);return this.docs=this.docs.insert(n,{document:e.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(t,n.path.popLast())}removeEntry(t){let e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)}getEntry(t,e){let n=this.docs.get(e);return ne.resolve(n?n.document.mutableCopy():Gn.newInvalidDocument(e))}getEntries(t,e){let n=Br();return e.forEach(r=>{let o=this.docs.get(r);n=n.insert(r,o?o.document.mutableCopy():Gn.newInvalidDocument(r))}),ne.resolve(n)}getDocumentsMatchingQuery(t,e,n,r){let o=Br(),s=e.path,a=new Be(s.child("")),c=this.docs.getIteratorFrom(a);for(;c.hasNext();){let{key:u,value:{document:f}}=c.getNext();if(!s.isPrefixOf(u.path))break;u.path.length>s.length+1||ZR(YR(f),n)<=0||(r.has(f.key)||lh(e,f))&&(o=o.insert(f.key,f.mutableCopy()))}return ne.resolve(o)}getAllFromCollectionGroup(t,e,n,r){je()}Fr(t,e){return ne.forEach(this.docs,n=>e(n))}newChangeBuffer(t){return new u_(this)}getSize(t){return ne.resolve(this.size)}},u_=class extends r_{constructor(t){super(),this.ar=t}applyChanges(t){let e=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?e.push(this.ar.addEntry(t,r)):this.ar.removeEntry(n)}),ne.waitFor(e)}getFromCache(t,e){return this.ar.getEntry(t,e)}getAllFromCache(t,e){return this.ar.getEntries(t,e)}};var p_=class{constructor(t){this.persistence=t,this.Mr=new Eo(e=>rv(e),ov),this.lastRemoteSnapshotVersion=Ye.min(),this.highestTargetId=0,this.Or=0,this.Nr=new Hc,this.targetCount=0,this.Br=jc.Nn()}forEachTarget(t,e){return this.Mr.forEach((n,r)=>e(r)),ne.resolve()}getLastRemoteSnapshotVersion(t){return ne.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return ne.resolve(this.Or)}allocateTargetId(t){return this.highestTargetId=this.Br.next(),ne.resolve(this.highestTargetId)}setTargetsMetadata(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.Or&&(this.Or=e),ne.resolve()}qn(t){this.Mr.set(t.target,t);let e=t.targetId;e>this.highestTargetId&&(this.Br=new jc(e),this.highestTargetId=e),t.sequenceNumber>this.Or&&(this.Or=t.sequenceNumber)}addTargetData(t,e){return this.qn(e),this.targetCount+=1,ne.resolve()}updateTargetData(t,e){return this.qn(e),ne.resolve()}removeTargetData(t,e){return this.Mr.delete(e.target),this.Nr.Vr(e.targetId),this.targetCount-=1,ne.resolve()}removeTargets(t,e,n){let r=0,o=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=e&&n.get(a.targetId)===null&&(this.Mr.delete(s),o.push(this.removeMatchingKeysForTargetId(t,a.targetId)),r++)}),ne.waitFor(o).next(()=>r)}getTargetCount(t){return ne.resolve(this.targetCount)}getTargetData(t,e){let n=this.Mr.get(e)||null;return ne.resolve(n)}addMatchingKeys(t,e,n){return this.Nr.dr(e,n),ne.resolve()}removeMatchingKeys(t,e,n){this.Nr.Rr(e,n);let r=this.persistence.referenceDelegate,o=[];return r&&e.forEach(s=>{o.push(r.markPotentiallyOrphaned(t,s))}),ne.waitFor(o)}removeMatchingKeysForTargetId(t,e){return this.Nr.Vr(e),ne.resolve()}getMatchingKeysForTargetId(t,e){let n=this.Nr.gr(e);return ne.resolve(n)}containsKey(t,e){return ne.resolve(this.Nr.containsKey(e))}};var h_=class{constructor(t,e){this.Lr={},this.overlays={},this.kr=new XT(0),this.qr=!1,this.qr=!0,this.referenceDelegate=t(this),this.Qr=new p_(this),this.indexManager=new i_,this.remoteDocumentCache=function(r){return new d_(r)}(n=>this.referenceDelegate.Kr(n)),this.serializer=new t_(e),this.$r=new a_(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let e=this.overlays[t.toKey()];return e||(e=new l_,this.overlays[t.toKey()]=e),e}getMutationQueue(t,e){let n=this.Lr[t.toKey()];return n||(n=new c_(e,this.referenceDelegate),this.Lr[t.toKey()]=n),n}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(t,e,n){ue("MemoryPersistence","Starting transaction:",t);let r=new m_(this.kr.next());return this.referenceDelegate.Ur(),n(r).next(o=>this.referenceDelegate.Wr(r).next(()=>o)).toPromise().then(o=>(r.raiseOnCommittedEvent(),o))}Gr(t,e){return ne.or(Object.values(this.Lr).map(n=>()=>n.containsKey(t,e)))}},m_=class extends T0{constructor(t){super(),this.currentSequenceNumber=t}},f_=class i{constructor(t){this.persistence=t,this.zr=new Hc,this.jr=null}static Hr(t){return new i(t)}get Jr(){if(this.jr)return this.jr;throw je()}addReference(t,e,n){return this.zr.addReference(n,e),this.Jr.delete(n.toString()),ne.resolve()}removeReference(t,e,n){return this.zr.removeReference(n,e),this.Jr.add(n.toString()),ne.resolve()}markPotentiallyOrphaned(t,e){return this.Jr.add(e.toString()),ne.resolve()}removeTarget(t,e){this.zr.Vr(e.targetId).forEach(r=>this.Jr.add(r.toString()));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(t,e.targetId).next(r=>{r.forEach(o=>this.Jr.add(o.toString()))}).next(()=>n.removeTargetData(t,e))}Ur(){this.jr=new Set}Wr(t){let e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return ne.forEach(this.Jr,n=>{let r=Be.fromPath(n);return this.Yr(t,r).next(o=>{o||e.removeEntry(r,Ye.min())})}).next(()=>(this.jr=null,e.apply(t)))}updateLimboDocument(t,e){return this.Yr(t,e).next(n=>{n?this.Jr.delete(e.toString()):this.Jr.add(e.toString())})}Kr(t){return 0}Yr(t,e){return ne.or([()=>ne.resolve(this.zr.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(t,e),()=>this.persistence.Gr(t,e)])}};var g_=class i{constructor(t,e,n,r){this.targetId=t,this.fromCache=e,this.qi=n,this.Qi=r}static Ki(t,e){let n=lt(),r=lt();for(let o of e.docChanges)switch(o.type){case 0:n=n.add(o.doc.key);break;case 1:r=r.add(o.doc.key)}return new i(t,e.fromCache,n,r)}};var __=class{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(t){this._documentReadCount+=t}};var v_=class{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return UI()?8:Dp.v(ri())>0?6:4}()}initialize(t,e){this.zi=t,this.indexManager=e,this.$i=!0}getDocumentsMatchingQuery(t,e,n,r){let o={result:null};return this.ji(t,e).next(s=>{o.result=s}).next(()=>{if(!o.result)return this.Hi(t,e,r,n).next(s=>{o.result=s})}).next(()=>{if(o.result)return;let s=new __;return this.Ji(t,e,s).next(a=>{if(o.result=a,this.Ui)return this.Yi(t,e,s,a.size)})}).next(()=>o.result)}Yi(t,e,n,r){return n.documentReadCountthis.Gi*r?(Ac()<=at.DEBUG&&ue("QueryEngine","The SDK decides to create cache indexes for query:",ha(e),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(t,_r(e))):ne.resolve())}ji(t,e){if(RT(e))return ne.resolve(null);let n=_r(e);return this.indexManager.getIndexType(t,n).next(r=>r===0?null:(e.limit!==null&&r===1&&(e=U0(e,null,"F"),n=_r(e)),this.indexManager.getDocumentsMatchingTarget(t,n).next(o=>{let s=lt(...o);return this.zi.getDocuments(t,s).next(a=>this.indexManager.getMinOffset(t,n).next(c=>{let u=this.Zi(e,a);return this.Xi(e,u,s,c.readTime)?this.ji(t,U0(e,null,"F")):this.es(t,u,e,c)}))})))}Hi(t,e,n,r){return RT(e)||r.isEqual(Ye.min())?ne.resolve(null):this.zi.getDocuments(t,n).next(o=>{let s=this.Zi(e,o);return this.Xi(e,s,n,r)?ne.resolve(null):(Ac()<=at.DEBUG&&ue("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),ha(e)),this.es(t,s,e,QR(r,-1)).next(a=>a))})}Zi(t,e){let n=new $i(lx(t));return e.forEach((r,o)=>{lh(t,o)&&(n=n.add(o))}),n}Xi(t,e,n,r){if(t.limit===null)return!1;if(n.size!==e.size)return!0;let o=t.limitType==="F"?e.last():e.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(r)>0)}Ji(t,e,n){return Ac()<=at.DEBUG&&ue("QueryEngine","Using full collection scan to execute query:",ha(e)),this.zi.getDocumentsMatchingQuery(t,e,gs.min(),n)}es(t,e,n,r){return this.zi.getDocumentsMatchingQuery(t,n,r).next(o=>(e.forEach(s=>{o=o.insert(s.key,s)}),o))}};var y_=class{constructor(t,e,n,r){this.persistence=t,this.ts=e,this.serializer=r,this.ns=new ai(St),this.rs=new Eo(o=>rv(o),ov),this.ss=new Map,this.os=t.getRemoteDocumentCache(),this.Qr=t.getTargetCache(),this.$r=t.getBundleCache(),this._s(n)}_s(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new s_(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",e=>t.collect(e,this.ns))}};function j5(i,t,e,n){return new y_(i,t,e,n)}function Ox(i,t){return D(this,null,function*(){let e=Ze(i);return yield e.persistence.runTransaction("Handle user change","readonly",n=>{let r;return e.mutationQueue.getAllMutationBatches(n).next(o=>(r=o,e._s(t),e.mutationQueue.getAllMutationBatches(n))).next(o=>{let s=[],a=[],c=lt();for(let u of r){s.push(u.batchId);for(let f of u.mutations)c=c.add(f.key)}for(let u of o){a.push(u.batchId);for(let f of u.mutations)c=c.add(f.key)}return e.localDocuments.getDocuments(n,c).next(u=>({us:u,removedBatchIds:s,addedBatchIds:a}))})})})}function H5(i,t){let e=Ze(i);return e.persistence.runTransaction("Acknowledge batch","readwrite-primary",n=>{let r=t.batch.keys(),o=e.os.newChangeBuffer({trackRemovals:!0});return function(a,c,u,f){let v=u.batch,b=v.keys(),O=ne.resolve();return b.forEach(V=>{O=O.next(()=>f.getEntry(c,V)).next(K=>{let P=u.docVersions.get(V);Nt(P!==null),K.version.compareTo(P)<0&&(v.applyToRemoteDocument(K,u),K.isValidDocument()&&(K.setReadTime(u.commitVersion),f.addEntry(K)))})}),O.next(()=>a.mutationQueue.removeMutationBatch(c,v))}(e,n,t,o).next(()=>o.apply(n)).next(()=>e.mutationQueue.performConsistencyCheck(n)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(n,r,t.batch.batchId)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,function(a){let c=lt();for(let u=0;u0&&(c=c.add(a.batch.mutations[u].key));return c}(t))).next(()=>e.localDocuments.getDocuments(n,r))})}function Mx(i){let t=Ze(i);return t.persistence.runTransaction("Get last remote snapshot version","readonly",e=>t.Qr.getLastRemoteSnapshotVersion(e))}function G5(i,t){let e=Ze(i),n=t.snapshotVersion,r=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{let s=e.os.newChangeBuffer({trackRemovals:!0});r=e.ns;let a=[];t.targetChanges.forEach((f,v)=>{let b=r.get(v);if(!b)return;a.push(e.Qr.removeMatchingKeys(o,f.removedDocuments,v).next(()=>e.Qr.addMatchingKeys(o,f.addedDocuments,v)));let O=b.withSequenceNumber(o.currentSequenceNumber);t.targetMismatches.get(v)!==null?O=O.withResumeToken(Ji.EMPTY_BYTE_STRING,Ye.min()).withLastLimboFreeSnapshotVersion(Ye.min()):f.resumeToken.approximateByteSize()>0&&(O=O.withResumeToken(f.resumeToken,n)),r=r.insert(v,O),function(K,P,j){return K.resumeToken.approximateByteSize()===0||P.snapshotVersion.toMicroseconds()-K.snapshotVersion.toMicroseconds()>=3e8?!0:j.addedDocuments.size+j.modifiedDocuments.size+j.removedDocuments.size>0}(b,O,f)&&a.push(e.Qr.updateTargetData(o,O))});let c=Br(),u=lt();if(t.documentUpdates.forEach(f=>{t.resolvedLimboDocuments.has(f)&&a.push(e.persistence.referenceDelegate.updateLimboDocument(o,f))}),a.push($5(o,s,t.documentUpdates).next(f=>{c=f.cs,u=f.ls})),!n.isEqual(Ye.min())){let f=e.Qr.getLastRemoteSnapshotVersion(o).next(v=>e.Qr.setTargetsMetadata(o,o.currentSequenceNumber,n));a.push(f)}return ne.waitFor(a).next(()=>s.apply(o)).next(()=>e.localDocuments.getLocalViewOfDocuments(o,c,u)).next(()=>c)}).then(o=>(e.ns=r,o))}function $5(i,t,e){let n=lt(),r=lt();return e.forEach(o=>n=n.add(o)),t.getEntries(i,n).next(o=>{let s=Br();return e.forEach((a,c)=>{let u=o.get(a);c.isFoundDocument()!==u.isFoundDocument()&&(r=r.add(a)),c.isNoDocument()&&c.version.isEqual(Ye.min())?(t.removeEntry(a,c.readTime),s=s.insert(a,c)):!u.isValidDocument()||c.version.compareTo(u.version)>0||c.version.compareTo(u.version)===0&&u.hasPendingWrites?(t.addEntry(c),s=s.insert(a,c)):ue("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",c.version)}),{cs:s,ls:r}})}function q5(i,t){let e=Ze(i);return e.persistence.runTransaction("Get next mutation batch","readonly",n=>(t===void 0&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)))}function W5(i,t){let e=Ze(i);return e.persistence.runTransaction("Allocate target","readwrite",n=>{let r;return e.Qr.getTargetData(n,t).next(o=>o?(r=o,ne.resolve(r)):e.Qr.allocateTargetId(n).next(s=>(r=new Uc(t,s,"TargetPurposeListen",n.currentSequenceNumber),e.Qr.addTargetData(n,r).next(()=>r))))}).then(n=>{let r=e.ns.get(n.targetId);return(r===null||n.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(e.ns=e.ns.insert(n.targetId,n),e.rs.set(t,n.targetId)),n})}function b_(i,t,e){return D(this,null,function*(){let n=Ze(i),r=n.ns.get(t),o=e?"readwrite":"readwrite-primary";try{e||(yield n.persistence.runTransaction("Release target",o,s=>n.persistence.referenceDelegate.removeTarget(s,r)))}catch(s){if(!Yc(s))throw s;ue("LocalStore",`Failed to update sequence numbers for target ${t}: ${s}`)}n.ns=n.ns.remove(t),n.rs.delete(r.target)})}function $T(i,t,e){let n=Ze(i),r=Ye.min(),o=lt();return n.persistence.runTransaction("Execute query","readwrite",s=>function(c,u,f){let v=Ze(c),b=v.rs.get(f);return b!==void 0?ne.resolve(v.ns.get(b)):v.Qr.getTargetData(u,f)}(n,s,_r(t)).next(a=>{if(a)return r=a.lastLimboFreeSnapshotVersion,n.Qr.getMatchingKeysForTargetId(s,a.targetId).next(c=>{o=c})}).next(()=>n.ts.getDocumentsMatchingQuery(s,t,e?r:Ye.min(),e?o:lt())).next(a=>(K5(n,c5(t),a),{documents:a,hs:o})))}function K5(i,t,e){let n=i.ss.get(t)||Ye.min();e.forEach((r,o)=>{o.readTime.compareTo(n)>0&&(n=o.readTime)}),i.ss.set(t,n)}var Gp=class{constructor(){this.activeTargetIds=f5()}As(t){this.activeTargetIds=this.activeTargetIds.add(t)}Rs(t){this.activeTargetIds=this.activeTargetIds.delete(t)}ds(){let t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}};var C_=class{constructor(){this.no=new Gp,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,e,n){}addLocalQueryTarget(t){return this.no.As(t),this.ro[t]||"not-current"}updateQueryState(t,e,n){this.ro[t]=e}removeLocalQueryTarget(t){this.no.Rs(t)}isLocalQueryTarget(t){return this.no.activeTargetIds.has(t)}clearQueryState(t){delete this.ro[t]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(t){return this.no.activeTargetIds.has(t)}start(){return this.no=new Gp,Promise.resolve()}handleUserChange(t,e,n){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}};var I_=class{io(t){}shutdown(){}};var $p=class{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(t){this.uo.push(t)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){ue("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(let t of this.uo)t(0)}ao(){ue("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(let t of this.uo)t(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}};var Sp=null;function h0(){return Sp===null?Sp=function(){return 268435456+Math.round(2147483648*Math.random())}():Sp++,"0x"+Sp.toString(16)}var Q5={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};var w_=class{constructor(t){this.lo=t.lo,this.ho=t.ho}Po(t){this.Io=t}To(t){this.Eo=t}onMessage(t){this.Ao=t}close(){this.ho()}send(t){this.lo(t)}Ro(){this.Io()}Vo(t){this.Eo(t)}mo(t){this.Ao(t)}};var Gi="WebChannelConnection",T_=class extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let n=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.fo=n+"://"+e.host,this.po=`projects/${r}/databases/${o}`,this.yo=this.databaseId.database==="(default)"?`project_id=${r}`:`project_id=${r}&database_id=${o}`}get wo(){return!1}So(e,n,r,o,s){let a=h0(),c=this.bo(e,n.toUriEncodedString());ue("RestConnection",`Sending RPC '${e}' ${a}:`,c,r);let u={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(u,o,s),this.Co(e,c,u,r).then(f=>(ue("RestConnection",`Received RPC '${e}' ${a}: `,f),f),f=>{throw va("RestConnection",`RPC '${e}' ${a} failed with error: `,f,"url: ",c,"request:",r),f})}vo(e,n,r,o,s,a){return this.So(e,n,r,o,s)}Do(e,n,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Da}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((o,s)=>e[s]=o),r&&r.headers.forEach((o,s)=>e[s]=o)}bo(e,n){let r=Q5[e];return`${this.fo}/v1/${n}:${r}`}terminate(){}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}Co(t,e,n,r){let o=h0();return new Promise((s,a)=>{let c=new wT;c.setWithCredentials(!0),c.listenOnce(CT.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case Tp.NO_ERROR:let f=c.getResponseJson();ue(Gi,`XHR for RPC '${t}' ${o} received:`,JSON.stringify(f)),s(f);break;case Tp.TIMEOUT:ue(Gi,`RPC '${t}' ${o} timed out`),a(new Ee(te.DEADLINE_EXCEEDED,"Request time out"));break;case Tp.HTTP_ERROR:let v=c.getStatus();if(ue(Gi,`RPC '${t}' ${o} failed with status:`,v,"response text:",c.getResponseText()),v>0){let b=c.getResponseJson();Array.isArray(b)&&(b=b[0]);let O=b?.error;if(O&&O.status&&O.message){let V=function(P){let j=P.toLowerCase().replace(/_/g,"-");return Object.values(te).indexOf(j)>=0?j:te.UNKNOWN}(O.status);a(new Ee(V,O.message))}else a(new Ee(te.UNKNOWN,"Server responded with status "+c.getStatus()))}else a(new Ee(te.UNAVAILABLE,"Connection failed."));break;default:je()}}finally{ue(Gi,`RPC '${t}' ${o} completed.`)}});let u=JSON.stringify(r);ue(Gi,`RPC '${t}' ${o} sending request:`,r),c.send(e,"POST",u,n,15)})}Fo(t,e,n){let r=h0(),o=[this.fo,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=yT(),a=bT(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},u=this.longPollingOptions.timeoutSeconds;u!==void 0&&(c.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(c.useFetchStreams=!0),this.Do(c.initMessageHeaders,e,n),c.encodeInitMessageHeaders=!0;let f=o.join("");ue(Gi,`Creating RPC '${t}' stream ${r}: ${f}`,c);let v=s.createWebChannel(f,c),b=!1,O=!1,V=new w_({lo:P=>{O?ue(Gi,`Not sending because RPC '${t}' stream ${r} is closed:`,P):(b||(ue(Gi,`Opening RPC '${t}' stream ${r} transport.`),v.open(),b=!0),ue(Gi,`RPC '${t}' stream ${r} sending:`,P),v.send(P))},ho:()=>v.close()}),K=(P,j,ce)=>{P.listen(j,_e=>{try{ce(_e)}catch(me){setTimeout(()=>{throw me},0)}})};return K(v,kc.EventType.OPEN,()=>{O||ue(Gi,`RPC '${t}' stream ${r} transport opened.`)}),K(v,kc.EventType.CLOSE,()=>{O||(O=!0,ue(Gi,`RPC '${t}' stream ${r} transport closed`),V.Vo())}),K(v,kc.EventType.ERROR,P=>{O||(O=!0,va(Gi,`RPC '${t}' stream ${r} transport errored:`,P),V.Vo(new Ee(te.UNAVAILABLE,"The operation could not be completed")))}),K(v,kc.EventType.MESSAGE,P=>{var j;if(!O){let ce=P.data[0];Nt(!!ce);let _e=ce,me=_e.error||((j=_e[0])===null||j===void 0?void 0:j.error);if(me){ue(Gi,`RPC '${t}' stream ${r} received error:`,me);let $e=me.status,He=function(Ht){let _i=mi[Ht];if(_i!==void 0)return bx(_i)}($e),Et=me.message;He===void 0&&(He=te.INTERNAL,Et="Unknown error status: "+$e+" with message "+me.message),O=!0,V.Vo(new Ee(He,Et)),v.close()}else ue(Gi,`RPC '${t}' stream ${r} received:`,ce),V.mo(ce)}}),K(a,IT.STAT_EVENT,P=>{P.stat===u0.PROXY?ue(Gi,`RPC '${t}' stream ${r} detected buffering proxy`):P.stat===u0.NOPROXY&&ue(Gi,`RPC '${t}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{V.Ro()},0),V}};function m0(){return typeof document<"u"?document:null}function ch(i){return new Y0(i,!0)}var qp=class{constructor(t,e,n=1e3,r=1.5,o=6e4){this.oi=t,this.timerId=e,this.Mo=n,this.xo=r,this.Oo=o,this.No=0,this.Bo=null,this.Lo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(t){this.cancel();let e=Math.floor(this.No+this.Qo()),n=Math.max(0,Date.now()-this.Lo),r=Math.max(0,e-n);r>0&&ue("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.No} ms, delay with jitter: ${e} ms, last attempt: ${n} ms ago)`),this.Bo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Lo=Date.now(),t())),this.No*=this.xo,this.Nothis.Oo&&(this.No=this.Oo)}Ko(){this.Bo!==null&&(this.Bo.skipDelay(),this.Bo=null)}cancel(){this.Bo!==null&&(this.Bo.cancel(),this.Bo=null)}Qo(){return(Math.random()-.5)*this.No}};var Wp=class{constructor(t,e,n,r,o,s,a,c){this.oi=t,this.$o=n,this.Uo=r,this.connection=o,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=c,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new qp(t,e)}Ho(){return this.state===1||this.state===5||this.Jo()}Jo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Yo()}stop(){return D(this,null,function*(){this.Ho()&&(yield this.close(0))})}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&this.Go===null&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(t){this.n_(),this.stream.send(t)}e_(){return D(this,null,function*(){if(this.Jo())return this.close(0)})}n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}close(t,e){return D(this,null,function*(){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,t!==4?this.jo.reset():e&&e.code===te.RESOURCE_EXHAUSTED?(yr(e.toString()),yr("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):e&&e.code===te.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.i_(),this.stream.close(),this.stream=null),this.state=t,yield this.listener.To(e)})}i_(){}auth(){this.state=1;let t=this.s_(this.Wo),e=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([n,r])=>{this.Wo===e&&this.o_(n,r)},n=>{t(()=>{let r=new Ee(te.UNKNOWN,"Fetching auth token failed: "+n.message);return this.__(r)})})}o_(t,e){let n=this.s_(this.Wo);this.stream=this.a_(t,e),this.stream.Po(()=>{n(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(r=>{n(()=>this.__(r))}),this.stream.onMessage(r=>{n(()=>this.onMessage(r))})}Yo(){this.state=5,this.jo.qo(()=>D(this,null,function*(){this.state=0,this.start()}))}__(t){return ue("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}s_(t){return e=>{this.oi.enqueueAndForget(()=>this.Wo===t?e():(ue("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}},x_=class extends Wp{constructor(t,e,n,r,o,s){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,n,r,s),this.serializer=o}a_(t,e){return this.connection.Fo("Listen",t,e)}onMessage(t){this.jo.reset();let e=k5(this.serializer,t),n=function(o){if(!("targetChange"in o))return Ye.min();let s=o.targetChange;return s.targetIds&&s.targetIds.length?Ye.min():s.readTime?vr(s.readTime):Ye.min()}(t);return this.listener.u_(e,n)}c_(t){let e={};e.database=e_(this.serializer),e.addTarget=function(o,s){let a,c=s.target;if(a=z0(c)?{documents:P5(o,c)}:{query:R5(o,c).ut},a.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){a.resumeToken=Cx(o,s.resumeToken);let u=Z0(o,s.expectedCount);u!==null&&(a.expectedCount=u)}else if(s.snapshotVersion.compareTo(Ye.min())>0){a.readTime=jp(o,s.snapshotVersion.toTimestamp());let u=Z0(o,s.expectedCount);u!==null&&(a.expectedCount=u)}return a}(this.serializer,t);let n=L5(this.serializer,t);n&&(e.labels=n),this.t_(e)}l_(t){let e={};e.database=e_(this.serializer),e.removeTarget=t,this.t_(e)}},S_=class extends Wp{constructor(t,e,n,r,o,s){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,n,r,s),this.serializer=o,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(t,e){return this.connection.Fo("Write",t,e)}onMessage(t){if(Nt(!!t.streamToken),this.lastStreamToken=t.streamToken,this.h_){this.jo.reset();let e=D5(t.writeResults,t.commitTime),n=vr(t.commitTime);return this.listener.T_(n,e)}return Nt(!t.writeResults||t.writeResults.length===0),this.h_=!0,this.listener.E_()}d_(){let t={};t.database=e_(this.serializer),this.t_(t)}I_(t){let e={streamToken:this.lastStreamToken,writes:t.map(n=>A5(this.serializer,n))};this.t_(e)}};var E_=class extends class{}{constructor(t,e,n,r){super(),this.authCredentials=t,this.appCheckCredentials=e,this.connection=n,this.serializer=r,this.A_=!1}R_(){if(this.A_)throw new Ee(te.FAILED_PRECONDITION,"The client has already been terminated.")}So(t,e,n,r){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.So(t,X0(e,n),r,o,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===te.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Ee(te.UNKNOWN,o.toString())})}vo(t,e,n,r,o){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(t,X0(e,n),r,s,a,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===te.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Ee(te.UNKNOWN,s.toString())})}terminate(){this.A_=!0,this.connection.terminate()}};var O_=class{constructor(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){this.m_===0&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(t){this.state==="Online"?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.y_("Offline")))}set(t){this.b_(),this.m_=0,t==="Online"&&(this.g_=!1),this.y_(t)}y_(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}w_(t){let e=`Could not reach Cloud Firestore backend. ${t} +This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.g_?(yr(e),this.g_=!1):ue("OnlineStateTracker",e)}b_(){this.f_!==null&&(this.f_.cancel(),this.f_=null)}};var M_=class{constructor(t,e,n,r,o){this.localStore=t,this.datastore=e,this.asyncQueue=n,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=o,this.M_.io(s=>{n.enqueueAndForget(()=>D(this,null,function*(){ws(this)&&(ue("RemoteStore","Restarting streams for network reachability change."),yield function(c){return D(this,null,function*(){let u=Ze(c);u.v_.add(4),yield Zc(u),u.x_.set("Unknown"),u.v_.delete(4),yield dh(u)})}(this))}))}),this.x_=new O_(n,r)}};function dh(i){return D(this,null,function*(){if(ws(i))for(let t of i.F_)yield t(!0)})}function Zc(i){return D(this,null,function*(){for(let t of i.F_)yield t(!1)})}function kx(i,t){let e=Ze(i);e.C_.has(t.targetId)||(e.C_.set(t.targetId,t),dv(e)?cv(e):Pa(e).Jo()&&lv(e,t))}function Ax(i,t){let e=Ze(i),n=Pa(e);e.C_.delete(t),n.Jo()&&Dx(e,t),e.C_.size===0&&(n.Jo()?n.Xo():ws(e)&&e.x_.set("Unknown"))}function lv(i,t){if(i.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(Ye.min())>0){let e=i.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(e)}Pa(i).c_(t)}function Dx(i,t){i.O_.Oe(t),Pa(i).l_(t)}function cv(i){i.O_=new Q0({getRemoteKeysForTarget:t=>i.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>i.C_.get(t)||null,nt:()=>i.datastore.serializer.databaseId}),Pa(i).start(),i.x_.p_()}function dv(i){return ws(i)&&!Pa(i).Ho()&&i.C_.size>0}function ws(i){return Ze(i).v_.size===0}function Px(i){i.O_=void 0}function Y5(i){return D(this,null,function*(){i.C_.forEach((t,e)=>{lv(i,t)})})}function Z5(i,t){return D(this,null,function*(){Px(i),dv(i)?(i.x_.S_(t),cv(i)):i.x_.set("Unknown")})}function X5(i,t,e){return D(this,null,function*(){if(i.x_.set("Online"),t instanceof zp&&t.state===2&&t.cause)try{yield function(r,o){return D(this,null,function*(){let s=o.cause;for(let a of o.targetIds)r.C_.has(a)&&(yield r.remoteSyncer.rejectListen(a,s),r.C_.delete(a),r.O_.removeTarget(a))})}(i,t)}catch(n){ue("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),yield Kp(i,n)}else if(t instanceof _a?i.O_.$e(t):t instanceof Bp?i.O_.Je(t):i.O_.Ge(t),!e.isEqual(Ye.min()))try{let n=yield Mx(i.localStore);e.compareTo(n)>=0&&(yield function(o,s){let a=o.O_.it(s);return a.targetChanges.forEach((c,u)=>{if(c.resumeToken.approximateByteSize()>0){let f=o.C_.get(u);f&&o.C_.set(u,f.withResumeToken(c.resumeToken,s))}}),a.targetMismatches.forEach((c,u)=>{let f=o.C_.get(c);if(!f)return;o.C_.set(c,f.withResumeToken(Ji.EMPTY_BYTE_STRING,f.snapshotVersion)),Dx(o,c);let v=new Uc(f.target,c,u,f.sequenceNumber);lv(o,v)}),o.remoteSyncer.applyRemoteEvent(a)}(i,e))}catch(n){ue("RemoteStore","Failed to raise snapshot:",n),yield Kp(i,n)}})}function Kp(i,t,e){return D(this,null,function*(){if(!Yc(t))throw t;i.v_.add(1),yield Zc(i),i.x_.set("Offline"),e||(e=()=>Mx(i.localStore)),i.asyncQueue.enqueueRetryable(()=>D(this,null,function*(){ue("RemoteStore","Retrying IndexedDB access"),yield e(),i.v_.delete(1),yield dh(i)}))})}function Rx(i,t){return t().catch(e=>Kp(i,e,t))}function uh(i){return D(this,null,function*(){let t=Ze(i),e=Oo(t),n=t.D_.length>0?t.D_[t.D_.length-1].batchId:-1;for(;J5(t);)try{let r=yield q5(t.localStore,n);if(r===null){t.D_.length===0&&e.Xo();break}n=r.batchId,eV(t,r)}catch(r){yield Kp(t,r)}Vx(t)&&Lx(t)})}function J5(i){return ws(i)&&i.D_.length<10}function eV(i,t){i.D_.push(t);let e=Oo(i);e.Jo()&&e.P_&&e.I_(t.mutations)}function Vx(i){return ws(i)&&!Oo(i).Ho()&&i.D_.length>0}function Lx(i){Oo(i).start()}function tV(i){return D(this,null,function*(){Oo(i).d_()})}function iV(i){return D(this,null,function*(){let t=Oo(i);for(let e of i.D_)t.I_(e.mutations)})}function nV(i,t,e){return D(this,null,function*(){let n=i.D_.shift(),r=$0.from(n,t,e);yield Rx(i,()=>i.remoteSyncer.applySuccessfulWrite(r)),yield uh(i)})}function rV(i,t){return D(this,null,function*(){t&&Oo(i).P_&&(yield function(n,r){return D(this,null,function*(){if(function(s){return I5(s)&&s!==te.ABORTED}(r.code)){let o=n.D_.shift();Oo(n).Zo(),yield Rx(n,()=>n.remoteSyncer.rejectFailedWrite(o.batchId,r)),yield uh(n)}})}(i,t)),Vx(i)&&Lx(i)})}function qT(i,t){return D(this,null,function*(){let e=Ze(i);e.asyncQueue.verifyOperationInProgress(),ue("RemoteStore","RemoteStore received new credentials");let n=ws(e);e.v_.add(3),yield Zc(e),n&&e.x_.set("Unknown"),yield e.remoteSyncer.handleCredentialChange(t),e.v_.delete(3),yield dh(e)})}function oV(i,t){return D(this,null,function*(){let e=Ze(i);t?(e.v_.delete(2),yield dh(e)):t||(e.v_.add(2),yield Zc(e),e.x_.set("Unknown"))})}function Pa(i){return i.N_||(i.N_=function(e,n,r){let o=Ze(e);return o.R_(),new x_(n,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(i.datastore,i.asyncQueue,{Po:Y5.bind(null,i),To:Z5.bind(null,i),u_:X5.bind(null,i)}),i.F_.push(t=>D(this,null,function*(){t?(i.N_.Zo(),dv(i)?cv(i):i.x_.set("Unknown")):(yield i.N_.stop(),Px(i))}))),i.N_}function Oo(i){return i.B_||(i.B_=function(e,n,r){let o=Ze(e);return o.R_(),new S_(n,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(i.datastore,i.asyncQueue,{Po:tV.bind(null,i),To:rV.bind(null,i),E_:iV.bind(null,i),T_:nV.bind(null,i)}),i.F_.push(t=>D(this,null,function*(){t?(i.B_.Zo(),yield uh(i)):(yield i.B_.stop(),i.D_.length>0&&(ue("RemoteStore",`Stopping write stream with ${i.D_.length} pending writes`),i.D_=[]))}))),i.B_}var k_=class i{constructor(t,e,n,r,o){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=r,this.removalCallback=o,this.deferred=new Hn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(t,e,n,r,o){let s=Date.now()+n,a=new i(t,e,s,r,o);return a.start(n),a}start(t){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Ee(te.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(t=>this.deferred.resolve(t))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}};function uv(i,t){if(yr("AsyncQueue",`${t}: ${i}`),Yc(i))return new Ee(te.UNAVAILABLE,`${t}: ${i}`);throw i}var Qp=class i{constructor(t){this.comparator=t?(e,n)=>t(e,n)||Be.comparator(e.key,n.key):(e,n)=>Be.comparator(e.key,n.key),this.keyedMap=Dc(),this.sortedSet=new ai(this.comparator)}static emptySet(t){return new i(t.comparator)}has(t){return this.keyedMap.get(t)!=null}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){let e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal((e,n)=>(t(e),!1))}add(t){let e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))}delete(t){let e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this}isEqual(t){if(!(t instanceof i)||this.size!==t.size)return!1;let e=this.sortedSet.getIterator(),n=t.sortedSet.getIterator();for(;e.hasNext();){let r=e.getNext().key,o=n.getNext().key;if(!r.isEqual(o))return!1}return!0}toString(){let t=[];return this.forEach(e=>{t.push(e.toString())}),t.length===0?"DocumentSet ()":`DocumentSet ( `+t.join(` `)+` -)`}copy(t,e){let n=new i;return n.comparator=this.comparator,n.keyedMap=t,n.sortedSet=e,n}};var Yp=class{constructor(){this.L_=new ai(Be.comparator)}track(t){let e=t.doc.key,n=this.L_.get(e);n?t.type!==0&&n.type===3?this.L_=this.L_.insert(e,t):t.type===3&&n.type!==1?this.L_=this.L_.insert(e,{type:n.type,doc:t.doc}):t.type===2&&n.type===2?this.L_=this.L_.insert(e,{type:2,doc:t.doc}):t.type===2&&n.type===0?this.L_=this.L_.insert(e,{type:0,doc:t.doc}):t.type===1&&n.type===0?this.L_=this.L_.remove(e):t.type===1&&n.type===2?this.L_=this.L_.insert(e,{type:1,doc:n.doc}):t.type===0&&n.type===1?this.L_=this.L_.insert(e,{type:2,doc:t.doc}):He():this.L_=this.L_.insert(e,t)}k_(){let t=[];return this.L_.inorderTraversal((e,n)=>{t.push(n)}),t}},Ma=class i{constructor(t,e,n,r,o,s,a,c,u){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=o,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=c,this.hasCachedResults=u}static fromInitialDocuments(t,e,n,r,o){let s=[];return e.forEach(a=>{s.push({type:0,doc:a})}),new i(t,e,Qp.emptySet(e),s,n,r,!0,!1,o)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&ah(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;let e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(let r=0;rax(t),ah),this.onlineState="Unknown",this.K_=new Set}};function sV(i,t){return D(this,null,function*(){let e=Ze(i),n=t.query,r=!1,o=e.queries.get(n);if(o||(r=!0,o=new A_),r)try{o.q_=yield e.onListen(n)}catch(s){let a=uv(s,`Initialization of query '${ha(t.query)}' failed`);return void t.onError(a)}e.queries.set(n,o),o.Q_.push(t),t.U_(e.onlineState),o.q_&&t.W_(o.q_)&&pv(e)})}function aV(i,t){return D(this,null,function*(){let e=Ze(i),n=t.query,r=!1,o=e.queries.get(n);if(o){let s=o.Q_.indexOf(t);s>=0&&(o.Q_.splice(s,1),r=o.Q_.length===0)}if(r)return e.queries.delete(n),e.onUnlisten(n)})}function lV(i,t){let e=Ze(i),n=!1;for(let r of t){let o=r.query,s=e.queries.get(o);if(s){for(let a of s.Q_)a.W_(r)&&(n=!0);s.q_=r}}n&&pv(e)}function cV(i,t,e){let n=Ze(i),r=n.queries.get(t);if(r)for(let o of r.Q_)o.onError(e);n.queries.delete(t)}function pv(i){i.K_.forEach(t=>{t.next()})}var P_=class{constructor(t,e,n){this.query=t,this.G_=e,this.z_=!1,this.j_=null,this.onlineState="Unknown",this.options=n||{}}W_(t){if(!this.options.includeMetadataChanges){let n=[];for(let r of t.docChanges)r.type!==3&&n.push(r);t=new Ma(t.query,t.docs,t.oldDocs,n,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let e=!1;return this.z_?this.H_(t)&&(this.G_.next(t),e=!0):this.J_(t,this.onlineState)&&(this.Y_(t),e=!0),this.j_=t,e}onError(t){this.G_.error(t)}U_(t){this.onlineState=t;let e=!1;return this.j_&&!this.z_&&this.J_(this.j_,t)&&(this.Y_(this.j_),e=!0),e}J_(t,e){if(!t.fromCache)return!0;let n=e!=="Offline";return(!this.options.Z_||!n)&&(!t.docs.isEmpty()||t.hasCachedResults||e==="Offline")}H_(t){if(t.docChanges.length>0)return!0;let e=this.j_&&this.j_.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&this.options.includeMetadataChanges===!0}Y_(t){t=Ma.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.z_=!0,this.G_.next(t)}};var Zp=class{constructor(t){this.key=t}},Xp=class{constructor(t){this.key=t}},R_=class{constructor(t,e){this.query=t,this.oa=e,this._a=null,this.hasCachedResults=!1,this.current=!1,this.aa=lt(),this.mutatedKeys=lt(),this.ua=lx(t),this.ca=new Qp(this.ua)}get la(){return this.oa}ha(t,e){let n=e?e.Pa:new Yp,r=e?e.ca:this.ca,o=e?e.mutatedKeys:this.mutatedKeys,s=r,a=!1,c=this.query.limitType==="F"&&r.size===this.query.limit?r.last():null,u=this.query.limitType==="L"&&r.size===this.query.limit?r.first():null;if(t.inorderTraversal((f,v)=>{let b=r.get(f),O=lh(this.query,v)?v:null,V=!!b&&this.mutatedKeys.has(b.key),K=!!O&&(O.hasLocalMutations||this.mutatedKeys.has(O.key)&&O.hasCommittedMutations),P=!1;b&&O?b.data.isEqual(O.data)?V!==K&&(n.track({type:3,doc:O}),P=!0):this.Ia(b,O)||(n.track({type:2,doc:O}),P=!0,(c&&this.ua(O,c)>0||u&&this.ua(O,u)<0)&&(a=!0)):!b&&O?(n.track({type:0,doc:O}),P=!0):b&&!O&&(n.track({type:1,doc:b}),P=!0,(c||u)&&(a=!0)),P&&(O?(s=s.add(O),o=K?o.add(f):o.delete(f)):(s=s.delete(f),o=o.delete(f)))}),this.query.limit!==null)for(;s.size>this.query.limit;){let f=this.query.limitType==="F"?s.last():s.first();s=s.delete(f.key),o=o.delete(f.key),n.track({type:1,doc:f})}return{ca:s,Pa:n,Xi:a,mutatedKeys:o}}Ia(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(t,e,n,r){let o=this.ca;this.ca=t.ca,this.mutatedKeys=t.mutatedKeys;let s=t.Pa.k_();s.sort((f,v)=>function(O,V){let K=P=>{switch(P){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return He()}};return K(O)-K(V)}(f.type,v.type)||this.ua(f.doc,v.doc)),this.Ta(n),r=r!=null&&r;let a=e&&!r?this.Ea():[],c=this.aa.size===0&&this.current&&!r?1:0,u=c!==this._a;return this._a=c,s.length!==0||u?{snapshot:new Ma(this.query,t.ca,o,s,t.mutatedKeys,c===0,u,!1,!!n&&n.resumeToken.approximateByteSize()>0),da:a}:{da:a}}U_(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({ca:this.ca,Pa:new Yp,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{da:[]}}Aa(t){return!this.oa.has(t)&&!!this.ca.has(t)&&!this.ca.get(t).hasLocalMutations}Ta(t){t&&(t.addedDocuments.forEach(e=>this.oa=this.oa.add(e)),t.modifiedDocuments.forEach(e=>{}),t.removedDocuments.forEach(e=>this.oa=this.oa.delete(e)),this.current=t.current)}Ea(){if(!this.current)return[];let t=this.aa;this.aa=lt(),this.ca.forEach(n=>{this.Aa(n.key)&&(this.aa=this.aa.add(n.key))});let e=[];return t.forEach(n=>{this.aa.has(n)||e.push(new Xp(n))}),this.aa.forEach(n=>{t.has(n)||e.push(new Zp(n))}),e}Ra(t){this.oa=t.hs,this.aa=lt();let e=this.ha(t.documents);return this.applyChanges(e,!0)}Va(){return Ma.fromInitialDocuments(this.query,this.ca,this.mutatedKeys,this._a===0,this.hasCachedResults)}},V_=class{constructor(t,e,n){this.query=t,this.targetId=e,this.view=n}},L_=class{constructor(t){this.key=t,this.ma=!1}},F_=class{constructor(t,e,n,r,o,s){this.localStore=t,this.remoteStore=e,this.eventManager=n,this.sharedClientState=r,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.fa={},this.ga=new Eo(a=>ax(a),ah),this.pa=new Map,this.ya=new Set,this.wa=new ai(Be.comparator),this.Sa=new Map,this.ba=new Hc,this.Da={},this.Ca=new Map,this.va=jc.Bn(),this.onlineState="Unknown",this.Fa=void 0}get isPrimaryClient(){return this.Fa===!0}};function dV(i,t){return D(this,null,function*(){let e=bV(i),n,r,o=e.ga.get(t);if(o)n=o.targetId,e.sharedClientState.addLocalQueryTarget(n),r=o.view.Va();else{let s=yield W5(e.localStore,gr(t)),a=e.sharedClientState.addLocalQueryTarget(s.targetId);n=s.targetId,r=yield uV(e,t,n,a==="current",s.resumeToken),e.isPrimaryClient&&kx(e.remoteStore,s)}return r})}function uV(i,t,e,n,r){return D(this,null,function*(){i.Ma=(v,b,O)=>function(K,P,j,ce){return D(this,null,function*(){let _e=P.view.ha(j);_e.Xi&&(_e=yield $T(K.localStore,P.query,!1).then(({documents:Et})=>P.view.ha(Et,_e)));let me=ce&&ce.targetChanges.get(P.targetId),qe=ce&&ce.targetMismatches.get(P.targetId)!=null,Ge=P.view.applyChanges(_e,K.isPrimaryClient,me,qe);return KT(K,P.targetId,Ge.da),Ge.snapshot})}(i,v,b,O);let o=yield $T(i.localStore,t,!0),s=new R_(t,o.hs),a=s.ha(o.documents),c=zc.createSynthesizedTargetChangeForCurrentChange(e,n&&i.onlineState!=="Offline",r),u=s.applyChanges(a,i.isPrimaryClient,c);KT(i,e,u.da);let f=new V_(t,e,s);return i.ga.set(t,f),i.pa.has(e)?i.pa.get(e).push(t):i.pa.set(e,[t]),u.snapshot})}function pV(i,t){return D(this,null,function*(){let e=Ze(i),n=e.ga.get(t),r=e.pa.get(n.targetId);if(r.length>1)return e.pa.set(n.targetId,r.filter(o=>!ah(o,t))),void e.ga.delete(t);e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(n.targetId),e.sharedClientState.isActiveQueryTarget(n.targetId)||(yield b_(e.localStore,n.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(n.targetId),Ax(e.remoteStore,n.targetId),N_(e,n.targetId)}).catch(Qc))):(N_(e,n.targetId),yield b_(e.localStore,n.targetId,!0))})}function hV(i,t,e){return D(this,null,function*(){let n=CV(i);try{let r=yield function(s,a){let c=Ze(s),u=Ri.now(),f=a.reduce((O,V)=>O.add(V.key),lt()),v,b;return c.persistence.runTransaction("Locally write mutations","readwrite",O=>{let V=Br(),K=lt();return c.os.getEntries(O,f).next(P=>{V=P,V.forEach((j,ce)=>{ce.isValidDocument()||(K=K.add(j))})}).next(()=>c.localDocuments.getOverlayedDocuments(O,V)).next(P=>{v=P;let j=[];for(let ce of a){let _e=C5(ce,v.get(ce.key).overlayedDocument);_e!=null&&j.push(new Cr(ce.key,_e,tx(_e.value.mapValue),To.exists(!0)))}return c.mutationQueue.addMutationBatch(O,u,j,a)}).next(P=>{b=P;let j=P.applyToLocalDocumentSet(v,K);return c.documentOverlayCache.saveOverlays(O,P.batchId,j)})}).then(()=>({batchId:b.batchId,changes:dx(v)}))}(n.localStore,t);n.sharedClientState.addPendingMutation(r.batchId),function(s,a,c){let u=s.Da[s.currentUser.toKey()];u||(u=new ai(St)),u=u.insert(a,c),s.Da[s.currentUser.toKey()]=u}(n,r.batchId,e),yield Xc(n,r.changes),yield uh(n.remoteStore)}catch(r){let o=uv(r,"Failed to persist write");e.reject(o)}})}function Fx(i,t){return D(this,null,function*(){let e=Ze(i);try{let n=yield G5(e.localStore,t);t.targetChanges.forEach((r,o)=>{let s=e.Sa.get(o);s&&(Nt(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?s.ma=!0:r.modifiedDocuments.size>0?Nt(s.ma):r.removedDocuments.size>0&&(Nt(s.ma),s.ma=!1))}),yield Xc(e,n,t)}catch(n){yield Qc(n)}})}function WT(i,t,e){let n=Ze(i);if(n.isPrimaryClient&&e===0||!n.isPrimaryClient&&e===1){let r=[];n.ga.forEach((o,s)=>{let a=s.view.U_(t);a.snapshot&&r.push(a.snapshot)}),function(s,a){let c=Ze(s);c.onlineState=a;let u=!1;c.queries.forEach((f,v)=>{for(let b of v.Q_)b.U_(a)&&(u=!0)}),u&&pv(c)}(n.eventManager,t),r.length&&n.fa.u_(r),n.onlineState=t,n.isPrimaryClient&&n.sharedClientState.setOnlineState(t)}}function mV(i,t,e){return D(this,null,function*(){let n=Ze(i);n.sharedClientState.updateQueryState(t,"rejected",e);let r=n.Sa.get(t),o=r&&r.key;if(o){let s=new ai(Be.comparator);s=s.insert(o,Hn.newNoDocument(o,Ye.min()));let a=lt().add(o),c=new Np(Ye.min(),new Map,new ai(St),s,a);yield Fx(n,c),n.wa=n.wa.remove(o),n.Sa.delete(t),hv(n)}else yield b_(n.localStore,t,!1).then(()=>N_(n,t,e)).catch(Qc)})}function fV(i,t){return D(this,null,function*(){let e=Ze(i),n=t.batch.batchId;try{let r=yield H5(e.localStore,t);Bx(e,n,null),Nx(e,n),e.sharedClientState.updateMutationState(n,"acknowledged"),yield Xc(e,r)}catch(r){yield Qc(r)}})}function gV(i,t,e){return D(this,null,function*(){let n=Ze(i);try{let r=yield function(s,a){let c=Ze(s);return c.persistence.runTransaction("Reject batch","readwrite-primary",u=>{let f;return c.mutationQueue.lookupMutationBatch(u,a).next(v=>(Nt(v!==null),f=v.keys(),c.mutationQueue.removeMutationBatch(u,v))).next(()=>c.mutationQueue.performConsistencyCheck(u)).next(()=>c.documentOverlayCache.removeOverlaysForBatchId(u,f,a)).next(()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(u,f)).next(()=>c.localDocuments.getDocuments(u,f))})}(n.localStore,t);Bx(n,t,e),Nx(n,t),n.sharedClientState.updateMutationState(t,"rejected",e),yield Xc(n,r)}catch(r){yield Qc(r)}})}function Nx(i,t){(i.Ca.get(t)||[]).forEach(e=>{e.resolve()}),i.Ca.delete(t)}function Bx(i,t,e){let n=Ze(i),r=n.Da[n.currentUser.toKey()];if(r){let o=r.get(t);o&&(e?o.reject(e):o.resolve(),r=r.remove(t)),n.Da[n.currentUser.toKey()]=r}}function N_(i,t,e=null){i.sharedClientState.removeLocalQueryTarget(t);for(let n of i.pa.get(t))i.ga.delete(n),e&&i.fa.xa(n,e);i.pa.delete(t),i.isPrimaryClient&&i.ba.Vr(t).forEach(n=>{i.ba.containsKey(n)||zx(i,n)})}function zx(i,t){i.ya.delete(t.path.canonicalString());let e=i.wa.get(t);e!==null&&(Ax(i.remoteStore,e),i.wa=i.wa.remove(t),i.Sa.delete(e),hv(i))}function KT(i,t,e){for(let n of e)n instanceof Zp?(i.ba.addReference(n.key,t),_V(i,n)):n instanceof Xp?(ue("SyncEngine","Document no longer in limbo: "+n.key),i.ba.removeReference(n.key,t),i.ba.containsKey(n.key)||zx(i,n.key)):He()}function _V(i,t){let e=t.key,n=e.path.canonicalString();i.wa.get(e)||i.ya.has(n)||(ue("SyncEngine","New document in limbo: "+e),i.ya.add(n),hv(i))}function hv(i){for(;i.ya.size>0&&i.wa.size{s.push(n.Ma(c,t,e).then(u=>{if((u||e)&&n.isPrimaryClient&&n.sharedClientState.updateQueryState(c.targetId,u?.fromCache?"not-current":"current"),u){r.push(u);let f=g_.Ki(c.targetId,u);o.push(f)}}))}),yield Promise.all(s),n.fa.u_(r),yield function(c,u){return D(this,null,function*(){let f=Ze(c);try{yield f.persistence.runTransaction("notifyLocalViewChanges","readwrite",v=>ne.forEach(u,b=>ne.forEach(b.qi,O=>f.persistence.referenceDelegate.addReference(v,b.targetId,O)).next(()=>ne.forEach(b.Qi,O=>f.persistence.referenceDelegate.removeReference(v,b.targetId,O)))))}catch(v){if(!Yc(v))throw v;ue("LocalStore","Failed to update sequence numbers: "+v)}for(let v of u){let b=v.targetId;if(!v.fromCache){let O=f.ns.get(b),V=O.snapshotVersion,K=O.withLastLimboFreeSnapshotVersion(V);f.ns=f.ns.insert(b,K)}}})}(n.localStore,o))})}function vV(i,t){return D(this,null,function*(){let e=Ze(i);if(!e.currentUser.isEqual(t)){ue("SyncEngine","User change. New user:",t.toKey());let n=yield Ox(e.localStore,t);e.currentUser=t,function(o,s){o.Ca.forEach(a=>{a.forEach(c=>{c.reject(new Ee(te.CANCELLED,s))})}),o.Ca.clear()}(e,"'waitForPendingWrites' promise is rejected due to a user change."),e.sharedClientState.handleUserChange(t,n.removedBatchIds,n.addedBatchIds),yield Xc(e,n.us)}})}function yV(i,t){let e=Ze(i),n=e.Sa.get(t);if(n&&n.ma)return lt().add(n.key);{let r=lt(),o=e.pa.get(t);if(!o)return r;for(let s of o){let a=e.ga.get(s);r=r.unionWith(a.view.la)}return r}}function bV(i){let t=Ze(i);return t.remoteStore.remoteSyncer.applyRemoteEvent=Fx.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=yV.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=mV.bind(null,t),t.fa.u_=lV.bind(null,t.eventManager),t.fa.xa=cV.bind(null,t.eventManager),t}function CV(i){let t=Ze(i);return t.remoteStore.remoteSyncer.applySuccessfulWrite=fV.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=gV.bind(null,t),t}var Jp=class{constructor(){this.synchronizeTabs=!1}initialize(t){return D(this,null,function*(){this.serializer=ch(t.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(t),this.persistence=this.createPersistence(t),yield this.persistence.start(),this.localStore=this.createLocalStore(t),this.gcScheduler=this.createGarbageCollectionScheduler(t,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(t,this.localStore)})}createGarbageCollectionScheduler(t,e){return null}createIndexBackfillerScheduler(t,e){return null}createLocalStore(t){return j5(this.persistence,new v_,t.initialUser,this.serializer)}createPersistence(t){return new h_(f_.Hr,this.serializer)}createSharedClientState(t){return new C_}terminate(){return D(this,null,function*(){var t,e;(t=this.gcScheduler)===null||t===void 0||t.stop(),(e=this.indexBackfillerScheduler)===null||e===void 0||e.stop(),this.sharedClientState.shutdown(),yield this.persistence.shutdown()})}};var B_=class{initialize(t,e){return D(this,null,function*(){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(e),this.remoteStore=this.createRemoteStore(e),this.eventManager=this.createEventManager(e),this.syncEngine=this.createSyncEngine(e,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=n=>WT(this.syncEngine,n,1),this.remoteStore.remoteSyncer.handleCredentialChange=vV.bind(null,this.syncEngine),yield oV(this.remoteStore,this.syncEngine.isPrimaryClient))})}createEventManager(t){return function(){return new D_}()}createDatastore(t){let e=ch(t.databaseInfo.databaseId),n=function(o){return new T_(o)}(t.databaseInfo);return function(o,s,a,c){return new E_(o,s,a,c)}(t.authCredentials,t.appCheckCredentials,n,e)}createRemoteStore(t){return function(n,r,o,s,a){return new M_(n,r,o,s,a)}(this.localStore,this.datastore,t.asyncQueue,e=>WT(this.syncEngine,e,0),function(){return $p.D()?new $p:new I_}())}createSyncEngine(t,e){return function(r,o,s,a,c,u,f){let v=new F_(r,o,s,a,c,u);return f&&(v.Fa=!0),v}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,e)}terminate(){return D(this,null,function*(){var t;yield function(n){return D(this,null,function*(){let r=Ze(n);ue("RemoteStore","RemoteStore shutting down."),r.v_.add(5),yield Zc(r),r.M_.shutdown(),r.x_.set("Unknown")})}(this.remoteStore),(t=this.datastore)===null||t===void 0||t.terminate()})}};var z_=class{constructor(t){this.observer=t,this.muted=!1}next(t){this.observer.next&&this.Ba(this.observer.next,t)}error(t){this.observer.error?this.Ba(this.observer.error,t):vr("Uncaught Error in snapshot listener:",t.toString())}La(){this.muted=!0}Ba(t,e){this.muted||setTimeout(()=>{this.muted||t(e)},0)}};var U_=class{constructor(t,e,n,r){this.authCredentials=t,this.appCheckCredentials=e,this.asyncQueue=n,this.databaseInfo=r,this.user=Si.UNAUTHENTICATED,this.clientId=kp.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,o=>D(this,null,function*(){ue("FirestoreClient","Received user=",o.uid),yield this.authCredentialListener(o),this.user=o})),this.appCheckCredentials.start(n,o=>(ue("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Ee(te.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let t=new jn;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(()=>D(this,null,function*(){try{this._onlineComponents&&(yield this._onlineComponents.terminate()),this._offlineComponents&&(yield this._offlineComponents.terminate()),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),t.resolve()}catch(e){let n=uv(e,"Failed to shutdown persistence");t.reject(n)}})),t.promise}};function f0(i,t){return D(this,null,function*(){i.asyncQueue.verifyOperationInProgress(),ue("FirestoreClient","Initializing OfflineComponentProvider");let e=i.configuration;yield t.initialize(e);let n=e.initialUser;i.setCredentialChangeListener(r=>D(this,null,function*(){n.isEqual(r)||(yield Ox(t.localStore,r),n=r)})),t.persistence.setDatabaseDeletedListener(()=>i.terminate()),i._offlineComponents=t})}function QT(i,t){return D(this,null,function*(){i.asyncQueue.verifyOperationInProgress();let e=yield wV(i);ue("FirestoreClient","Initializing OnlineComponentProvider"),yield t.initialize(e,i.configuration),i.setCredentialChangeListener(n=>qT(t.remoteStore,n)),i.setAppCheckTokenChangeListener((n,r)=>qT(t.remoteStore,r)),i._onlineComponents=t})}function IV(i){return i.name==="FirebaseError"?i.code===te.FAILED_PRECONDITION||i.code===te.UNIMPLEMENTED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}function wV(i){return D(this,null,function*(){if(!i._offlineComponents)if(i._uninitializedComponentsProvider){ue("FirestoreClient","Using user provided OfflineComponentProvider");try{yield f0(i,i._uninitializedComponentsProvider._offline)}catch(t){let e=t;if(!IV(e))throw e;va("Error using user provided cache. Falling back to memory cache: "+e),yield f0(i,new Jp)}}else ue("FirestoreClient","Using default OfflineComponentProvider"),yield f0(i,new Jp);return i._offlineComponents})}function Ux(i){return D(this,null,function*(){return i._onlineComponents||(i._uninitializedComponentsProvider?(ue("FirestoreClient","Using user provided OnlineComponentProvider"),yield QT(i,i._uninitializedComponentsProvider._online)):(ue("FirestoreClient","Using default OnlineComponentProvider"),yield QT(i,new B_))),i._onlineComponents})}function TV(i){return Ux(i).then(t=>t.syncEngine)}function xV(i){return D(this,null,function*(){let t=yield Ux(i),e=t.eventManager;return e.onListen=dV.bind(null,t.syncEngine),e.onUnlisten=pV.bind(null,t.syncEngine),e})}function SV(i,t,e={}){let n=new jn;return i.asyncQueue.enqueueAndForget(()=>D(this,null,function*(){return function(o,s,a,c,u){let f=new z_({next:b=>{s.enqueueAndForget(()=>aV(o,v));let O=b.docs.has(a);!O&&b.fromCache?u.reject(new Ee(te.UNAVAILABLE,"Failed to get document because the client is offline.")):O&&b.fromCache&&c&&c.source==="server"?u.reject(new Ee(te.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):u.resolve(b)},error:b=>u.reject(b)}),v=new P_(sv(a.path),f,{includeMetadataChanges:!0,Z_:!0});return sV(o,v)}(yield xV(i),i.asyncQueue,t,e,n)})),n.promise}function jx(i){let t={};return i.timeoutSeconds!==void 0&&(t.timeoutSeconds=i.timeoutSeconds),t}var YT=new Map;function EV(i,t,e){if(!e)throw new Ee(te.INVALID_ARGUMENT,`Function ${i}() cannot be called with an empty ${t}.`)}function OV(i,t,e,n){if(t===!0&&n===!0)throw new Ee(te.INVALID_ARGUMENT,`${i} and ${e} cannot be used together.`)}function ZT(i){if(!Be.isDocumentKey(i))throw new Ee(te.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${i} has ${i.length}.`)}function mv(i){if(i===void 0)return"undefined";if(i===null)return"null";if(typeof i=="string")return i.length>20&&(i=`${i.substring(0,20)}...`),JSON.stringify(i);if(typeof i=="number"||typeof i=="boolean")return""+i;if(typeof i=="object"){if(i instanceof Array)return"an array";{let t=function(n){return n.constructor?n.constructor.name:null}(i);return t?`a custom ${t} object`:"an object"}}return typeof i=="function"?"a function":He()}function Cs(i,t){if("_delegate"in i&&(i=i._delegate),!(i instanceof t)){if(t.name===i.constructor.name)throw new Ee(te.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let e=mv(i);throw new Ee(te.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${e}`)}}return i}var eh=class{constructor(t){var e,n;if(t.host===void 0){if(t.ssl!==void 0)throw new Ee(te.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=(e=t.ssl)===null||e===void 0||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,t.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<1048576)throw new Ee(te.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}OV("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:t.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=jx((n=t.experimentalLongPollingOptions)!==null&&n!==void 0?n:{}),function(o){if(o.timeoutSeconds!==void 0){if(isNaN(o.timeoutSeconds))throw new Ee(te.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (must not be NaN)`);if(o.timeoutSeconds<5)throw new Ee(te.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (minimum allowed value is 5)`);if(o.timeoutSeconds>30)throw new Ee(te.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&function(n,r){return n.timeoutSeconds===r.timeoutSeconds}(this.experimentalLongPollingOptions,t.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}},Gc=class{constructor(t,e,n,r){this._authCredentials=t,this._appCheckCredentials=e,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new eh({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Ee(te.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(t){if(this._settingsFrozen)throw new Ee(te.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new eh(t),t.credentials!==void 0&&(this._authCredentials=function(n){if(!n)return new g0;switch(n.type){case"firstParty":return new b0(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new Ee(te.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let n=YT.get(e);n&&(ue("ComponentProvider","Removing Datastore"),YT.delete(e),n.terminate())}(this),Promise.resolve()}};function Hx(i,t,e,n={}){var r;let o=(i=Cs(i,Gc))._getSettings(),s=`${t}:${e}`;if(o.host!=="firestore.googleapis.com"&&o.host!==s&&va("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),i._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),n.mockUserToken){let a,c;if(typeof n.mockUserToken=="string")a=n.mockUserToken,c=Si.MOCK_USER;else{a=$u(n.mockUserToken,(r=i._app)===null||r===void 0?void 0:r.options.projectId);let u=n.mockUserToken.sub||n.mockUserToken.user_id;if(!u)throw new Ee(te.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Si(u)}i._authCredentials=new _0(new Mp(a,c))}}var j_=class i{constructor(t,e,n){this.converter=e,this._query=n,this.type="query",this.firestore=t}withConverter(t){return new i(this.firestore,t,this._query)}},Cn=class i{constructor(t,e,n){this.converter=e,this._key=n,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new $c(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new i(this.firestore,t,this._key)}},$c=class i extends j_{constructor(t,e,n){super(t,e,sv(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let t=this._path.popLast();return t.isEmpty()?null:new Cn(this.firestore,null,new Be(t))}withConverter(t){return new i(this.firestore,t,this._path)}};function Ts(i,t,...e){if(i=Ai(i),arguments.length===1&&(t=kp.newId()),EV("doc","path",t),i instanceof Gc){let n=gi.fromString(t,...e);return ZT(n),new Cn(i,null,new Be(n))}{if(!(i instanceof Cn||i instanceof $c))throw new Ee(te.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=i._path.child(gi.fromString(t,...e));return ZT(n),new Cn(i.firestore,i instanceof $c?i.converter:null,new Be(n))}}var H_=class{constructor(){this.Xa=Promise.resolve(),this.eu=[],this.tu=!1,this.nu=[],this.ru=null,this.iu=!1,this.su=!1,this.ou=[],this.jo=new qp(this,"async_queue_retry"),this._u=()=>{let e=m0();e&&ue("AsyncQueue","Visibility state changed to "+e.visibilityState),this.jo.Ko()};let t=m0();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this._u)}get isShuttingDown(){return this.tu}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.au(),this.uu(t)}enterRestrictedMode(t){if(!this.tu){this.tu=!0,this.su=t||!1;let e=m0();e&&typeof e.removeEventListener=="function"&&e.removeEventListener("visibilitychange",this._u)}}enqueue(t){if(this.au(),this.tu)return new Promise(()=>{});let e=new jn;return this.uu(()=>this.tu&&this.su?Promise.resolve():(t().then(e.resolve,e.reject),e.promise)).then(()=>e.promise)}enqueueRetryable(t){this.enqueueAndForget(()=>(this.eu.push(t),this.cu()))}cu(){return D(this,null,function*(){if(this.eu.length!==0){try{yield this.eu[0](),this.eu.shift(),this.jo.reset()}catch(t){if(!Yc(t))throw t;ue("AsyncQueue","Operation failed with retryable error: "+t)}this.eu.length>0&&this.jo.qo(()=>this.cu())}})}uu(t){let e=this.Xa.then(()=>(this.iu=!0,t().catch(n=>{this.ru=n,this.iu=!1;let r=function(s){let a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+` -`+s.stack),a}(n);throw vr("INTERNAL UNHANDLED ERROR: ",r),n}).then(n=>(this.iu=!1,n))));return this.Xa=e,e}enqueueAfterDelay(t,e,n){this.au(),this.ou.indexOf(t)>-1&&(e=0);let r=k_.createAndSchedule(this,t,e,n,o=>this.lu(o));return this.nu.push(r),r}au(){this.ru&&He()}verifyOperationInProgress(){}hu(){return D(this,null,function*(){let t;do t=this.Xa,yield t;while(t!==this.Xa)})}Pu(t){for(let e of this.nu)if(e.timerId===t)return!0;return!1}Iu(t){return this.hu().then(()=>{this.nu.sort((e,n)=>e.targetTimeMs-n.targetTimeMs);for(let e of this.nu)if(e.skipDelay(),t!=="all"&&e.timerId===t)break;return this.hu()})}Tu(t){this.ou.push(t)}lu(t){let e=this.nu.indexOf(t);this.nu.splice(e,1)}};var ka=class extends Gc{constructor(t,e,n,r){super(t,e,n,r),this.type="firestore",this._queue=function(){return new H_}(),this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||qx(this),this._firestoreClient.terminate()}};function Gx(i,t){let e=typeof i=="object"?i:Co(),n=typeof i=="string"?i:t||"(default)",r=os(e,"firestore").getImmediate({identifier:n});if(!r._initialized){let o=Gu("firestore");o&&Hx(r,...o)}return r}function $x(i){return i._firestoreClient||qx(i),i._firestoreClient.verifyNotTerminated(),i._firestoreClient}function qx(i){var t,e,n;let r=i._freezeSettings(),o=function(a,c,u,f){return new O0(a,c,u,f.host,f.ssl,f.experimentalForceLongPolling,f.experimentalAutoDetectLongPolling,jx(f.experimentalLongPollingOptions),f.useFetchStreams)}(i._databaseId,((t=i._app)===null||t===void 0?void 0:t.options.appId)||"",i._persistenceKey,r);i._firestoreClient=new U_(i._authCredentials,i._appCheckCredentials,i._queue,o),!((e=r.localCache)===null||e===void 0)&&e._offlineComponentProvider&&(!((n=r.localCache)===null||n===void 0)&&n._onlineComponentProvider)&&(i._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}var qc=class i{constructor(t){this._byteString=t}static fromBase64String(t){try{return new i(Ji.fromBase64String(t))}catch(e){throw new Ee(te.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(t){return new i(Ji.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}};var Aa=class{constructor(...t){for(let e=0;e90)throw new Ee(te.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new Ee(te.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return St(this._lat,t._lat)||St(this._long,t._long)}};var MV=/^__.*__$/,G_=class{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return this.fieldMask!==null?new Cr(t,this.data,this.fieldMask,e,this.fieldTransforms):new bs(t,this.data,e,this.fieldTransforms)}},th=class{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return new Cr(t,this.data,this.fieldMask,e,this.fieldTransforms)}};function Wx(i){switch(i){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw He()}}var $_=class i{constructor(t,e,n,r,o,s){this.settings=t,this.databaseId=e,this.serializer=n,this.ignoreUndefinedProperties=r,o===void 0&&this.Eu(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get du(){return this.settings.du}Au(t){return new i(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ru(t){var e;let n=(e=this.path)===null||e===void 0?void 0:e.child(t),r=this.Au({path:n,Vu:!1});return r.mu(t),r}fu(t){var e;let n=(e=this.path)===null||e===void 0?void 0:e.child(t),r=this.Au({path:n,Vu:!1});return r.Eu(),r}gu(t){return this.Au({path:void 0,Vu:!0})}pu(t){return nh(t,this.settings.methodName,this.settings.yu||!1,this.path,this.settings.wu)}contains(t){return this.fieldMask.find(e=>t.isPrefixOf(e))!==void 0||this.fieldTransforms.find(e=>t.isPrefixOf(e.field))!==void 0}Eu(){if(this.path)for(let t=0;tc.covers(v.field))}else c=null,u=s.fieldTransforms;return new G_(new yn(a),c,u)}var ih=class i extends Wc{_toFieldTransform(t){if(t.du!==2)throw t.du===1?t.pu(`${this._methodName}() can only appear at the top level of your update data`):t.pu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return t.fieldMask.push(t.path),null}isEqual(t){return t instanceof i}};function AV(i,t,e,n){let r=i.Su(1,t,e);fv("Data must be an object, but it was:",r,n);let o=[],s=yn.empty();Is(n,(c,u)=>{let f=gv(t,c,e);u=Ai(u);let v=r.fu(f);if(u instanceof ih)o.push(f);else{let b=ph(u,v);b!=null&&(o.push(f),s.set(f,b))}});let a=new Dn(o);return new th(s,a,r.fieldTransforms)}function DV(i,t,e,n,r,o){let s=i.Su(1,t,e),a=[W_(t,n,e)],c=[r];if(o.length%2!=0)throw new Ee(te.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let b=0;b=0;--b)if(!Zx(u,a[b])){let O=a[b],V=c[b];V=Ai(V);let K=s.fu(O);if(V instanceof ih)u.push(O);else{let P=ph(V,K);P!=null&&(u.push(O),f.set(O,P))}}let v=new Dn(u);return new th(f,v,s.fieldTransforms)}function ph(i,t){if(Yx(i=Ai(i)))return fv("Unsupported field value:",t,i),Qx(i,t);if(i instanceof Wc)return function(n,r){if(!Wx(r.du))throw r.pu(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r.pu(`${n._methodName}() is not currently supported inside arrays`);let o=n._toFieldTransform(r);o&&r.fieldTransforms.push(o)}(i,t),null;if(i===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),i instanceof Array){if(t.settings.Vu&&t.du!==4)throw t.pu("Nested arrays are not supported");return function(n,r){let o=[],s=0;for(let a of n){let c=ph(a,r.gu(s));c==null&&(c={nullValue:"NULL_VALUE"}),o.push(c),s++}return{arrayValue:{values:o}}}(i,t)}return function(n,r){if((n=Ai(n))===null)return{nullValue:"NULL_VALUE"};if(typeof n=="number")return g5(r.serializer,n);if(typeof n=="boolean")return{booleanValue:n};if(typeof n=="string")return{stringValue:n};if(n instanceof Date){let o=Ri.fromDate(n);return{timestampValue:jp(r.serializer,o)}}if(n instanceof Ri){let o=new Ri(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:jp(r.serializer,o)}}if(n instanceof Kc)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof qc)return{bytesValue:Cx(r.serializer,n._byteString)};if(n instanceof Cn){let o=r.databaseId,s=n.firestore._databaseId;if(!s.isEqual(o))throw r.pu(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${o.projectId}/${o.database}`);return{referenceValue:av(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r.pu(`Unsupported field value: ${mv(n)}`)}(i,t)}function Qx(i,t){let e={};return JT(i)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Is(i,(n,r)=>{let o=ph(r,t.Ru(n));o!=null&&(e[n]=o)}),{mapValue:{fields:e}}}function Yx(i){return!(typeof i!="object"||i===null||i instanceof Array||i instanceof Date||i instanceof Ri||i instanceof Kc||i instanceof qc||i instanceof Cn||i instanceof Wc)}function fv(i,t,e){if(!Yx(e)||!function(r){return typeof r=="object"&&r!==null&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}(e)){let n=mv(e);throw n==="an object"?t.pu(i+" a custom object"):t.pu(i+" "+n)}}function W_(i,t,e){if((t=Ai(t))instanceof Aa)return t._internalPath;if(typeof t=="string")return gv(i,t);throw nh("Field path arguments must be of type string or ",i,!1,void 0,e)}var PV=new RegExp("[~\\*/\\[\\]]");function gv(i,t,e){if(t.search(PV)>=0)throw nh(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,i,!1,void 0,e);try{return new Aa(...t.split("."))._internalPath}catch{throw nh(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,i,!1,void 0,e)}}function nh(i,t,e,n,r){let o=n&&!n.isEmpty(),s=r!==void 0,a=`Function ${t}() called with invalid data`;e&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(o||s)&&(c+=" (found",o&&(c+=` in field ${n}`),s&&(c+=` in document ${r}`),c+=")"),new Ee(te.INVALID_ARGUMENT,a+i+c)}function Zx(i,t){return i.some(e=>e.isEqual(t))}var rh=class{constructor(t,e,n,r,o){this._firestore=t,this._userDataWriter=e,this._key=n,this._document=r,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new Cn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){let t=new K_(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){let e=this._document.data.field(Xx("DocumentSnapshot.get",t));if(e!==null)return this._userDataWriter.convertValue(e)}}},K_=class extends rh{data(){return super.data()}};function Xx(i,t){return typeof t=="string"?gv(i,t):t instanceof Aa?t._internalPath:t._delegate._internalPath}var Q_=class{convertValue(t,e="none"){switch(_s(t)){case 0:return null;case 1:return t.booleanValue;case 2:return si(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(So(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw He()}}convertObject(t,e){return this.convertObjectMap(t.fields,e)}convertObjectMap(t,e="none"){let n={};return Is(t,(r,o)=>{n[r]=this.convertValue(o,e)}),n}convertGeoPoint(t){return new Kc(si(t.latitude),si(t.longitude))}convertArray(t,e){return(t.values||[]).map(n=>this.convertValue(n,e))}convertServerTimestamp(t,e){switch(e){case"previous":let n=iv(t);return n==null?null:this.convertValue(n,e);case"estimate":return this.convertTimestamp(Nc(t));default:return null}}convertTimestamp(t){let e=xo(t);return new Ri(e.seconds,e.nanos)}convertDocumentKey(t,e){let n=gi.fromString(t);Nt(Ex(n));let r=new Vp(n.get(1),n.get(3)),o=new Be(n.popFirst(5));return r.isEqual(e)||vr(`Document ${o} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),o}};function RV(i,t,e){let n;return n=i?e&&(e.merge||e.mergeFields)?i.toFirestore(t,e):i.toFirestore(t):t,n}var Y_=class{constructor(t,e){this.hasPendingWrites=t,this.fromCache=e}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}},oh=class extends rh{constructor(t,e,n,r,o,s){super(t,e,n,r,s),this._firestore=t,this._firestoreImpl=t,this.metadata=o}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){let e=new Z_(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,e={}){if(this._document){let n=this._document.data.field(Xx("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n,e.serverTimestamps)}}},Z_=class extends oh{data(t={}){return super.data(t)}};function hh(i){i=Cs(i,Cn);let t=Cs(i.firestore,ka);return SV($x(t),i._key).then(e=>VV(t,i,e))}var X_=class extends Q_{constructor(t){super(),this.firestore=t}convertBytes(t){return new qc(t)}convertReference(t){let e=this.convertDocumentKey(t,this.firestore._databaseId);return new Cn(this.firestore,null,e)}};function mh(i,t,e){i=Cs(i,Cn);let n=Cs(i.firestore,ka),r=RV(i.converter,t,e);return Jx(n,[kV(Kx(n),"setDoc",i._key,r,i.converter!==null,e).toMutation(i._key,To.none())])}function fh(i,t,e,...n){i=Cs(i,Cn);let r=Cs(i.firestore,ka),o=Kx(r),s;return s=typeof(t=Ai(t))=="string"||t instanceof Aa?DV(o,"updateDoc",i._key,t,e,n):AV(o,"updateDoc",i._key,t),Jx(r,[s.toMutation(i._key,To.exists(!0))])}function Jx(i,t){return function(n,r){let o=new jn;return n.asyncQueue.enqueueAndForget(()=>D(this,null,function*(){return hV(yield TV(n),r,o)})),o.promise}($x(i),t)}function VV(i,t,e){let n=e.docs.get(t._key),r=new X_(i);return new oh(i,r,t._key,n,new Y_(e.hasPendingWrites,e.fromCache),t.converter)}(function(t,e=!0){(function(r){Da=r})(dr),cr(new ln("firestore",(n,{instanceIdentifier:r,options:o})=>{let s=n.getProvider("app").getImmediate(),a=new ka(new v0(n.getProvider("auth-internal")),new I0(n.getProvider("app-check-internal")),function(u,f){if(!Object.prototype.hasOwnProperty.apply(u.options,["projectId"]))throw new Ee(te.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Vp(u.options.projectId,f)}(s,r),s);return o=Object.assign({useFetchStreams:e},o),a._setSettings(o),a},"PUBLIC").setMultipleInstances(!0)),Wt(xT,"4.4.2",t),Wt(xT,"4.4.2","esm2017")})();var gh=class{constructor(t,e,n,r){this.email=t,this.id=e,this._token=n,this._tokenExpirationDate=r}get token(){return this._tokenExpirationDate||new Date>this._tokenExpirationDate?null:this._token}};var LV="firebase",FV="10.8.0";Wt(LV,FV,"app");var zr=new Gs("ANGULARFIRE2_VERSION");function Va(i,t,e){if(t){if(t.length===1)return t[0];let o=t.filter(s=>s.app===e);if(o.length===1)return o[0]}return e.container.getProvider(i).getImmediate({optional:!0})}var Ss=(i,t)=>{let e=t?[t]:Qu(),n=[];return e.forEach(r=>{r.container.getProvider(i).instances.forEach(s=>{n.includes(s)||n.push(s)})}),n},Mo=class{constructor(){return Ss(NV)}},NV="app-check";function Ra(){}var _h=class{zone;delegate;constructor(t,e=Dd){this.zone=t,this.delegate=e}now(){return this.delegate.now()}schedule(t,e,n){let r=this.zone,o=function(s){r.runGuarded(()=>{t.apply(this,[s])})};return this.delegate.schedule(o,e,n)}},_v=class{zone;task=null;constructor(t){this.zone=t}call(t,e){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ra,{},Ra,Ra)),e.pipe(It({next:n,complete:n,error:n})).subscribe(t).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},ko=(()=>{class i{ngZone;outsideAngular;insideAngular;constructor(e){this.ngZone=e,this.outsideAngular=e.runOutsideAngular(()=>new _h(Zone.current)),this.insideAngular=e.run(()=>new _h(Zone.current,Bb)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||i)(J(ge))};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function vh(){let i=globalThis.\u0275AngularFireScheduler;if(!i)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using -provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return i}function BV(i){return vh().ngZone.runOutsideAngular(()=>i())}function xs(i){return vh().ngZone.run(()=>i())}function zV(i){return UV(vh())(i)}function UV(i){return function(e){return e=e.lift(new _v(i.ngZone)),e.pipe(Mm(i.outsideAngular),dl(i.insideAngular))}}var jV=(i,t)=>function(){let n=arguments;return t&&setTimeout(()=>{t.state==="scheduled"&&t.invoke()},10),xs(()=>i.apply(void 0,n))},Gn=(i,t)=>function(){let e,n=arguments;for(let o=0;oZone.current.scheduleMacroTask("firebaseZoneBlock",Ra,{},Ra,Ra))),n[o]=jV(n[o],e));let r=BV(()=>i.apply(this,n));if(!t)if(r instanceof Li){let o=vh();return r.pipe(Mm(o.outsideAngular),dl(o.insideAngular))}else return xs(()=>r);return r instanceof Li?r.pipe(zV):r instanceof Promise?xs(()=>new Promise((o,s)=>r.then(a=>xs(()=>o(a)),a=>xs(()=>s(a))))):typeof r=="function"&&e?function(){return setTimeout(()=>{e&&e.state==="scheduled"&&e.invoke()},10),r.apply(this,arguments)}:xs(()=>r)};var $n=class{constructor(t){return t}},Ur=class{constructor(){return Qu()}};function HV(i){return i&&i.length===1?i[0]:new $n(Co())}var vv=new le("angularfire2._apps"),GV={provide:$n,useFactory:HV,deps:[[new hi,vv]]},$V={provide:Ur,deps:[[new hi,vv]]};function qV(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new $n(n)}}var WV=(()=>{class i{constructor(e){Wt("angularfire",zr.full,"core"),Wt("angularfire",zr.full,"app"),Wt("angular",T1.full,e.toString())}static \u0275fac=function(n){return new(n||i)(J(vt))};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[GV,$V]})}return i})();function eS(i,...t){return{ngModule:WV,providers:[{provide:vv,useFactory:qV(i),multi:!0,deps:[ge,Mi,ko,...t]}]}}var tS=Gn(Cg,!0);function fS(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var gS=fS,_S=new Lr("auth","Firebase",fS());var Th=new yo("@firebase/auth");function KV(i,...t){Th.logLevel<=at.WARN&&Th.warn(`Auth (${dr}): ${i}`,...t)}function bh(i,...t){Th.logLevel<=at.ERROR&&Th.error(`Auth (${dr}): ${i}`,...t)}function Do(i,...t){throw Nv(i,...t)}function Es(i,...t){return Nv(i,...t)}function QV(i,t,e){let n=Object.assign(Object.assign({},gS()),{[t]:e});return new Lr("auth","Firebase",n).create(t,{appName:i.name})}function Nv(i,...t){if(typeof i!="string"){let e=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=i.name),i._errorFactory.create(e,...n)}return _S.create(i,...t)}function Qe(i,t,...e){if(!i)throw Nv(t,...e)}function jr(i){let t="INTERNAL ASSERTION FAILED: "+i;throw bh(t),new Error(t)}function Po(i,t){i||jr(t)}function Iv(){var i;return typeof self<"u"&&((i=self.location)===null||i===void 0?void 0:i.href)||""}function YV(){return iS()==="http:"||iS()==="https:"}function iS(){var i;return typeof self<"u"&&((i=self.location)===null||i===void 0?void 0:i.protocol)||null}function ZV(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(YV()||NI()||"connection"in navigator)?navigator.onLine:!0}function XV(){if(typeof navigator>"u")return null;let i=navigator;return i.languages&&i.languages[0]||i.language||null}var Os=class{constructor(t,e){this.shortDelay=t,this.longDelay=e,Po(e>t,"Short delay should be less than long delay!"),this.isMobile=FI()||BI()}get(){return ZV()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Bv(i,t){Po(i.emulator,"Emulator should always be set here");let{url:e}=i.emulator;return t?`${e}${t.startsWith("/")?t.slice(1):t}`:e}var xh=class{static initialize(t,e,n){this.fetchImpl=t,e&&(this.headersImpl=e),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;jr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;jr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;jr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var JV={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var e6=new Os(3e4,6e4);function zv(i,t){return i.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:i.tenantId}):t}function La(o,s,a,c){return D(this,arguments,function*(i,t,e,n,r={}){return vS(i,r,()=>D(this,null,function*(){let u={},f={};n&&(t==="GET"?f=n:u={body:JSON.stringify(n)});let v=oc(Object.assign({key:i.config.apiKey},f)).slice(1),b=yield i._getAdditionalHeaders();return b["Content-Type"]="application/json",i.languageCode&&(b["X-Firebase-Locale"]=i.languageCode),xh.fetch()(yS(i,i.config.apiHost,e,v),Object.assign({method:t,headers:b,referrerPolicy:"no-referrer"},u))}))})}function vS(i,t,e){return D(this,null,function*(){i._canInitEmulator=!1;let n=Object.assign(Object.assign({},JV),t);try{let r=new wv(i),o=yield Promise.race([e(),r.promise]);r.clearNetworkTimeout();let s=yield o.json();if("needConfirmation"in s)throw yh(i,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{let a=o.ok?s.errorMessage:s.error.message,[c,u]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw yh(i,"credential-already-in-use",s);if(c==="EMAIL_EXISTS")throw yh(i,"email-already-in-use",s);if(c==="USER_DISABLED")throw yh(i,"user-disabled",s);let f=n[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw QV(i,f,u);Do(i,f)}}catch(r){if(r instanceof Zi)throw r;Do(i,"network-request-failed",{message:String(r)})}})}function t6(o,s,a,c){return D(this,arguments,function*(i,t,e,n,r={}){let u=yield La(i,t,e,n,r);return"mfaPendingCredential"in u&&Do(i,"multi-factor-auth-required",{_serverResponse:u}),u})}function yS(i,t,e,n){let r=`${t}${e}?${n}`;return i.config.emulator?Bv(i.config,r):`${i.config.apiScheme}://${r}`}var wv=class{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((e,n)=>{this.timer=setTimeout(()=>n(Es(this.auth,"network-request-failed")),e6.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function yh(i,t,e){let n={appName:i.name};e.email&&(n.email=e.email),e.phoneNumber&&(n.phoneNumber=e.phoneNumber);let r=Es(i,t,n);return r.customData._tokenResponse=e,r}function i6(i,t){return D(this,null,function*(){return La(i,"POST","/v1/accounts:delete",t)})}function n6(i,t){return D(this,null,function*(){return La(i,"POST","/v1/accounts:lookup",t)})}function Jc(i){if(i)try{let t=new Date(Number(i));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}function Uv(i,t=!1){return D(this,null,function*(){let e=Ai(i),n=yield e.getIdToken(t),r=jv(n);Qe(r&&r.exp&&r.auth_time&&r.iat,e.auth,"internal-error");let o=typeof r.firebase=="object"?r.firebase:void 0,s=o?.sign_in_provider;return{claims:r,token:n,authTime:Jc(yv(r.auth_time)),issuedAtTime:Jc(yv(r.iat)),expirationTime:Jc(yv(r.exp)),signInProvider:s||null,signInSecondFactor:o?.sign_in_second_factor||null}})}function yv(i){return Number(i)*1e3}function jv(i){let[t,e,n]=i.split(".");if(t===void 0||e===void 0||n===void 0)return bh("JWT malformed, contained fewer than 3 sections"),null;try{let r=ng(e);return r?JSON.parse(r):(bh("Failed to decode base64 JWT payload"),null)}catch(r){return bh("Caught error parsing JWT payload as JSON",r?.toString()),null}}function r6(i){let t=jv(i);return Qe(t,"internal-error"),Qe(typeof t.exp<"u","internal-error"),Qe(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}function ed(i,t,e=!1){return D(this,null,function*(){if(e)return t;try{return yield t}catch(n){throw n instanceof Zi&&o6(n)&&i.auth.currentUser===i&&(yield i.auth.signOut()),n}})}function o6({code:i}){return i==="auth/user-disabled"||i==="auth/user-token-expired"}var Tv=class{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var e;if(t){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=((e=this.user.stsTokenManager.expirationTime)!==null&&e!==void 0?e:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(t=!1){if(!this.isRunning)return;let e=this.getInterval(t);this.timerId=setTimeout(()=>D(this,null,function*(){yield this.iteration()}),e)}iteration(){return D(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Sh=class{constructor(t,e){this.createdAt=t,this.lastLoginAt=e,this._initializeTime()}_initializeTime(){this.lastSignInTime=Jc(this.lastLoginAt),this.creationTime=Jc(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function Eh(i){return D(this,null,function*(){var t;let e=i.auth,n=yield i.getIdToken(),r=yield ed(i,n6(e,{idToken:n}));Qe(r?.users.length,e,"internal-error");let o=r.users[0];i._notifyReloadListener(o);let s=!((t=o.providerUserInfo)===null||t===void 0)&&t.length?a6(o.providerUserInfo):[],a=s6(i.providerData,s),c=i.isAnonymous,u=!(i.email&&o.passwordHash)&&!a?.length,f=c?u:!1,v={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Sh(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(i,v)})}function Hv(i){return D(this,null,function*(){let t=Ai(i);yield Eh(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function s6(i,t){return[...i.filter(n=>!t.some(r=>r.providerId===n.providerId)),...t]}function a6(i){return i.map(t=>{var{providerId:e}=t,n=Om(t,["providerId"]);return{providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}function l6(i,t){return D(this,null,function*(){let e=yield vS(i,{},()=>D(this,null,function*(){let n=oc({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:o}=i.config,s=yS(i,r,"/v1/token",`key=${o}`),a=yield i._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",xh.fetch()(s,{method:"POST",headers:a,body:n})}));return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token}})}function c6(i,t){return D(this,null,function*(){return La(i,"POST","/v2/accounts:revokeToken",zv(i,t))})}var Oh=class i{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){Qe(t.idToken,"internal-error"),Qe(typeof t.idToken<"u","internal-error"),Qe(typeof t.refreshToken<"u","internal-error");let e="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):r6(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,e)}getToken(t,e=!1){return D(this,null,function*(){return Qe(!this.accessToken||this.refreshToken,t,"user-token-expired"),!e&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null})}clearRefreshToken(){this.refreshToken=null}refresh(t,e){return D(this,null,function*(){let{accessToken:n,refreshToken:r,expiresIn:o}=yield l6(t,e);this.updateTokensAndExpiration(n,r,Number(o))})}updateTokensAndExpiration(t,e,n){this.refreshToken=e||null,this.accessToken=t||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,e){let{refreshToken:n,accessToken:r,expirationTime:o}=e,s=new i;return n&&(Qe(typeof n=="string","internal-error",{appName:t}),s.refreshToken=n),r&&(Qe(typeof r=="string","internal-error",{appName:t}),s.accessToken=r),o&&(Qe(typeof o=="number","internal-error",{appName:t}),s.expirationTime=o),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new i,this.toJSON())}_performRefresh(){return jr("not implemented")}};function Ao(i,t){Qe(typeof i=="string"||typeof i>"u","internal-error",{appName:t})}var td=class i{constructor(t){var{uid:e,auth:n,stsTokenManager:r}=t,o=Om(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Tv(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Sh(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return D(this,null,function*(){let e=yield ed(this,this.stsTokenManager.getToken(this.auth,t));return Qe(e,this.auth,"internal-error"),this.accessToken!==e&&(this.accessToken=e,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),e})}getIdTokenResult(t){return Uv(this,t)}reload(){return Hv(this)}_assign(t){this!==t&&(Qe(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(e=>Object.assign({},e)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){let e=new i(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return e.metadata._copy(this.metadata),e}_onReload(t){Qe(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,e=!1){return D(this,null,function*(){let n=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),n=!0),e&&(yield Eh(this)),yield this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)})}delete(){return D(this,null,function*(){let t=yield this.getIdToken();return yield ed(this,i6(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,e){var n,r,o,s,a,c,u,f;let v=(n=e.displayName)!==null&&n!==void 0?n:void 0,b=(r=e.email)!==null&&r!==void 0?r:void 0,O=(o=e.phoneNumber)!==null&&o!==void 0?o:void 0,V=(s=e.photoURL)!==null&&s!==void 0?s:void 0,K=(a=e.tenantId)!==null&&a!==void 0?a:void 0,P=(c=e._redirectEventId)!==null&&c!==void 0?c:void 0,j=(u=e.createdAt)!==null&&u!==void 0?u:void 0,ce=(f=e.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:_e,emailVerified:me,isAnonymous:qe,providerData:Ge,stsTokenManager:Et}=e;Qe(_e&&Et,t,"internal-error");let ht=Oh.fromJSON(this.name,Et);Qe(typeof _e=="string",t,"internal-error"),Ao(v,t.name),Ao(b,t.name),Qe(typeof me=="boolean",t,"internal-error"),Qe(typeof qe=="boolean",t,"internal-error"),Ao(O,t.name),Ao(V,t.name),Ao(K,t.name),Ao(P,t.name),Ao(j,t.name),Ao(ce,t.name);let Ht=new i({uid:_e,auth:t,email:b,emailVerified:me,displayName:v,isAnonymous:qe,photoURL:V,phoneNumber:O,tenantId:K,stsTokenManager:ht,createdAt:j,lastLoginAt:ce});return Ge&&Array.isArray(Ge)&&(Ht.providerData=Ge.map(_i=>Object.assign({},_i))),P&&(Ht._redirectEventId=P),Ht}static _fromIdTokenResponse(t,e,n=!1){return D(this,null,function*(){let r=new Oh;r.updateFromServerResponse(e);let o=new i({uid:e.localId,auth:t,stsTokenManager:r,isAnonymous:n});return yield Eh(o),o})}};var nS=new Map;function Hr(i){Po(i instanceof Function,"Expected a class definition");let t=nS.get(i);return t?(Po(t instanceof i,"Instance stored in cache mismatched with class"),t):(t=new i,nS.set(i,t),t)}var d6=(()=>{class i{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return D(this,null,function*(){return!0})}_set(e,n){return D(this,null,function*(){this.storage[e]=n})}_get(e){return D(this,null,function*(){let n=this.storage[e];return n===void 0?null:n})}_remove(e){return D(this,null,function*(){delete this.storage[e]})}_addListener(e,n){}_removeListener(e,n){}}return i.type="NONE",i})(),xv=d6;function Ch(i,t,e){return`firebase:${i}:${t}:${e}`}var Mh=class i{constructor(t,e,n){this.persistence=t,this.auth=e,this.userKey=n;let{config:r,name:o}=this.auth;this.fullUserKey=Ch(this.userKey,r.apiKey,o),this.fullPersistenceKey=Ch("persistence",r.apiKey,o),this.boundEventHandler=e._onStorageEvent.bind(e),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return D(this,null,function*(){let t=yield this.persistence._get(this.fullUserKey);return t?td._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return D(this,null,function*(){if(this.persistence===t)return;let e=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,e)return this.setCurrentUser(e)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,e,n="authUser"){return D(this,null,function*(){if(!e.length)return new i(Hr(xv),t,n);let r=(yield Promise.all(e.map(u=>D(this,null,function*(){if(yield u._isAvailable())return u})))).filter(u=>u),o=r[0]||Hr(xv),s=Ch(n,t.config.apiKey,t.name),a=null;for(let u of e)try{let f=yield u._get(s);if(f){let v=td._fromJSON(t,f);u!==o&&(a=v),o=u;break}}catch{}let c=r.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!c.length?new i(o,t,n):(o=c[0],a&&(yield o._set(s,a.toJSON())),yield Promise.all(e.map(u=>D(this,null,function*(){if(u!==o)try{yield u._remove(s)}catch{}}))),new i(o,t,n))})}};function rS(i){let t=i.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(IS(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(bS(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(TS(t))return"Blackberry";if(xS(t))return"Webos";if(Gv(t))return"Safari";if((t.includes("chrome/")||CS(t))&&!t.includes("edge/"))return"Chrome";if(wS(t))return"Android";{let e=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=i.match(e);if(n?.length===2)return n[1]}return"Other"}function bS(i=ri()){return/firefox\//i.test(i)}function Gv(i=ri()){let t=i.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function CS(i=ri()){return/crios\//i.test(i)}function IS(i=ri()){return/iemobile/i.test(i)}function wS(i=ri()){return/android/i.test(i)}function TS(i=ri()){return/blackberry/i.test(i)}function xS(i=ri()){return/webos/i.test(i)}function Fh(i=ri()){return/iphone|ipad|ipod/i.test(i)||/macintosh/i.test(i)&&/mobile/i.test(i)}function u6(i=ri()){var t;return Fh(i)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function p6(){return zI()&&document.documentMode===10}function SS(i=ri()){return Fh(i)||wS(i)||xS(i)||TS(i)||/windows phone/i.test(i)||IS(i)}function h6(){try{return!!(window&&window!==window.top)}catch{return!1}}function ES(i,t=[]){let e;switch(i){case"Browser":e=rS(ri());break;case"Worker":e=`${rS(ri())}-${i}`;break;default:e=i}let n=t.length?t.join(","):"FirebaseCore-web";return`${e}/JsCore/${dr}/${n}`}var Sv=class{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,e){let n=o=>new Promise((s,a)=>{try{let c=t(o);s(c)}catch(c){a(c)}});n.onAbort=e,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(t){return D(this,null,function*(){if(this.auth.currentUser===t)return;let e=[];try{for(let n of this.queue)yield n(t),n.onAbort&&e.push(n.onAbort)}catch(n){e.reverse();for(let r of e)try{r()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n?.message})}})}};function m6(e){return D(this,arguments,function*(i,t={}){return La(i,"GET","/v2/passwordPolicy",zv(i,t))})}var f6=6,Ev=class{constructor(t){var e,n,r,o;let s=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(e=s.minPasswordLength)!==null&&e!==void 0?e:f6,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),s.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),s.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),s.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),s.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(r=(n=t.allowedNonAlphanumericCharacters)===null||n===void 0?void 0:n.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(o=t.forceUpgradeOnSignin)!==null&&o!==void 0?o:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var e,n,r,o,s,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,c),this.validatePasswordCharacterOptions(t,c),c.isValid&&(c.isValid=(e=c.meetsMinPasswordLength)!==null&&e!==void 0?e:!0),c.isValid&&(c.isValid=(n=c.meetsMaxPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.containsLowercaseLetter)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(o=c.containsUppercaseLetter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(s=c.containsNumericCharacter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(a=c.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),c}validatePasswordLengthOptions(t,e){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(e.meetsMinPasswordLength=t.length>=n),r&&(e.meetsMaxPasswordLength=t.length<=r)}validatePasswordCharacterOptions(t,e){this.updatePasswordCharacterOptionsStatuses(e,!1,!1,!1,!1);let n;for(let r=0;r="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(t,e,n,r,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=e)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}};var Ov=class{constructor(t,e,n,r){this.app=t,this.heartbeatServiceProvider=e,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new kh(this),this.idTokenSubscription=new kh(this),this.beforeStateQueue=new Sv(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_S,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(t,e){return e&&(this._popupRedirectResolver=Hr(e)),this._initializationPromise=this.queue(()=>D(this,null,function*(){var n,r;if(!this._deleted&&(this.persistenceManager=yield Mh.create(this,t),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(e),this.lastNotifiedUid=((r=this.currentUser)===null||r===void 0?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return D(this,null,function*(){if(this._deleted)return;let t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUser(t){return D(this,null,function*(){var e;let n=yield this.assertedPersistence.getCurrentUser(),r=n,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let s=(e=this.redirectUser)===null||e===void 0?void 0:e._redirectEventId,a=r?._redirectEventId,c=yield this.tryRedirectSignIn(t);(!s||s===a)&&c?.user&&(r=c.user,o=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(r)}catch(s){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Qe(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(t){return D(this,null,function*(){let e=null;try{e=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{yield this._setRedirectUser(null)}return e})}reloadAndSetCurrentUserOrClear(t){return D(this,null,function*(){try{yield Eh(t)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=XV()}_delete(){return D(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return D(this,null,function*(){let e=t?Ai(t):null;return e&&Qe(e.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(e&&e._clone(this))})}_updateCurrentUser(t,e=!1){return D(this,null,function*(){if(!this._deleted)return t&&Qe(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),e||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>D(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return D(this,null,function*(){return yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0)})}setPersistence(t){return this.queue(()=>D(this,null,function*(){yield this.assertedPersistence.setPersistence(Hr(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return D(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let e=this._getPasswordPolicyInternal();return e.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):e.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return D(this,null,function*(){let t=yield m6(this),e=new Ev(t);this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new Lr("auth","Firebase",t())}onAuthStateChanged(t,e,n){return this.registerStateListener(this.authStateSubscription,t,e,n)}beforeAuthStateChanged(t,e){return this.beforeStateQueue.pushCallback(t,e)}onIdTokenChanged(t,e,n){return this.registerStateListener(this.idTokenSubscription,t,e,n)}authStateReady(){return new Promise((t,e)=>{if(this.currentUser)t();else{let n=this.onAuthStateChanged(()=>{n(),t()},e)}})}revokeAccessToken(t){return D(this,null,function*(){if(this.currentUser){let e=yield this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:e};this.tenantId!=null&&(n.tenantId=this.tenantId),yield c6(this,n)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,e){return D(this,null,function*(){let n=yield this.getOrInitRedirectPersistenceManager(e);return t===null?n.removeCurrentUser():n.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return D(this,null,function*(){if(!this.redirectPersistenceManager){let e=t&&Hr(t)||this._popupRedirectResolver;Qe(e,this,"argument-error"),this.redirectPersistenceManager=yield Mh.create(this,[Hr(e._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return D(this,null,function*(){var e,n;return this._isInitialized&&(yield this.queue(()=>D(this,null,function*(){}))),((e=this._currentUser)===null||e===void 0?void 0:e._redirectEventId)===t?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return D(this,null,function*(){if(t===this.currentUser)return this.queue(()=>D(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,e;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=(e=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&e!==void 0?e:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,e,n,r){if(this._deleted)return()=>{};let o=typeof e=="function"?e:e.next.bind(e),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(Qe(a,this,"internal-error"),a.then(()=>{s||o(this.currentUser)}),typeof e=="function"){let c=t.addObserver(e,n,r);return()=>{s=!0,c()}}else{let c=t.addObserver(e);return()=>{s=!0,c()}}}directlySetCurrentUser(t){return D(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return Qe(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=ES(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return D(this,null,function*(){var t;let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let n=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);let r=yield this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e})}_getAppCheckToken(){return D(this,null,function*(){var t;let e=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return e?.error&&KV(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function $v(i){return Ai(i)}var kh=class{constructor(t){this.auth=t,this.observer=null,this.addObserver=GI(e=>this.observer=e)}get next(){return Qe(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var qv={loadJS(){return D(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function g6(i){qv=i}function _6(i){return qv.loadJS(i)}function v6(){return qv.gapiScript}function OS(i){return`__${i}${Math.floor(Math.random()*1e6)}`}function Wv(i,t){let e=os(i,"auth");if(e.isInitialized()){let r=e.getImmediate(),o=e.getOptions();if(is(o,t??{}))return r;Do(r,"already-initialized")}return e.initialize({options:t})}function y6(i,t){let e=t?.persistence||[],n=(Array.isArray(e)?e:[e]).map(Hr);t?.errorMap&&i._updateErrorMap(t.errorMap),i._initializeWithPersistence(n,t?.popupRedirectResolver)}function Kv(i,t,e){let n=$v(i);Qe(n._canInitEmulator,n,"emulator-config-failed"),Qe(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let r=!!e?.disableWarnings,o=MS(t),{host:s,port:a}=b6(t),c=a===null?"":`:${a}`;n.config.emulator={url:`${o}//${s}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||C6()}function MS(i){let t=i.indexOf(":");return t<0?"":i.substr(0,t+1)}function b6(i){let t=MS(i),e=/(\/\/)?([^?#/]+)/.exec(i.substr(t.length));if(!e)return{host:"",port:null};let n=e[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let o=r[1];return{host:o,port:oS(n.substr(o.length+1))}}else{let[o,s]=n.split(":");return{host:o,port:oS(s)}}}function oS(i){if(!i)return null;let t=Number(i);return isNaN(t)?null:t}function C6(){function i(){let t=document.createElement("p"),e=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",e.position="fixed",e.width="100%",e.backgroundColor="#ffffff",e.border=".1em solid #000000",e.color="#b50000",e.bottom="0px",e.left="0px",e.margin="0px",e.zIndex="10000",e.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",i):i())}var Ah=class{constructor(t,e){this.providerId=t,this.signInMethod=e}toJSON(){return jr("not implemented")}_getIdTokenResponse(t){return jr("not implemented")}_linkToIdToken(t,e){return jr("not implemented")}_getReauthenticationResolver(t){return jr("not implemented")}};function bv(i,t){return D(this,null,function*(){return t6(i,"POST","/v1/accounts:signInWithIdp",zv(i,t))})}var Dh=class{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}};var Mv=class extends Dh{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}};var id=class i{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,e,n,r=!1){return D(this,null,function*(){let o=yield td._fromIdTokenResponse(t,n,r),s=sS(n);return new i({user:o,providerId:s,_tokenResponse:n,operationType:e})})}static _forOperation(t,e,n){return D(this,null,function*(){yield t._updateTokensIfNecessary(n,!0);let r=sS(n);return new i({user:t,providerId:r,_tokenResponse:n,operationType:e})})}};function sS(i){return i.providerId?i.providerId:"phoneNumber"in i?"phone":null}var kv=class i extends Zi{constructor(t,e,n,r){var o;super(e.code,e.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,i.prototype),this.customData={appName:t.name,tenantId:(o=t.tenantId)!==null&&o!==void 0?o:void 0,_serverResponse:e.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(t,e,n,r){return new i(t,e,n,r)}};function kS(i,t,e,n){return(t==="reauthenticate"?e._getReauthenticationResolver(i):e._getIdTokenResponse(i)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?kv._fromErrorAndOperation(i,o,t,n):o})}function I6(i,t,e=!1){return D(this,null,function*(){let n=yield ed(i,t._linkToIdToken(i.auth,yield i.getIdToken()),e);return id._forOperation(i,"link",n)})}function w6(i,t,e=!1){return D(this,null,function*(){let{auth:n}=i,r="reauthenticate";try{let o=yield ed(i,kS(n,r,t,i),e);Qe(o.idToken,n,"internal-error");let s=jv(o.idToken);Qe(s,n,"internal-error");let{sub:a}=s;return Qe(i.uid===a,n,"user-mismatch"),id._forOperation(i,r,o)}catch(o){throw o?.code==="auth/user-not-found"&&Do(n,"user-mismatch"),o}})}function T6(i,t,e=!1){return D(this,null,function*(){let n="signIn",r=yield kS(i,n,t),o=yield id._fromIdTokenResponse(i,n,r);return e||(yield i._updateCurrentUser(o.user)),o})}function Qv(i,t,e,n){return Ai(i).onIdTokenChanged(t,e,n)}function Yv(i,t,e){return Ai(i).beforeAuthStateChanged(t,e)}var Ph="__sak";var Rh=class{constructor(t,e){this.storageRetriever=t,this.type=e}_isAvailable(){try{return this.storage?(this.storage.setItem(Ph,"1"),this.storage.removeItem(Ph),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,e){return this.storage.setItem(t,JSON.stringify(e)),Promise.resolve()}_get(t){let e=this.storage.getItem(t);return Promise.resolve(e?JSON.parse(e):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}};function x6(){let i=ri();return Gv(i)||Fh(i)}var S6=1e3,E6=10,O6=(()=>{class i extends Rh{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=x6()&&h6(),this.fallbackToPolling=SS(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let n of Object.keys(this.listeners)){let r=this.storage.getItem(n),o=this.localCache[n];r!==o&&e(n,o,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((a,c,u)=>{this.notifyListeners(a,u)});return}let r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let a=this.storage.getItem(r);if(e.newValue!==a)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}let o=()=>{let a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},s=this.storage.getItem(r);p6()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(o,E6):o()}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let o of Array.from(r))o(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},S6)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(e,n){return D(this,null,function*(){yield to(i.prototype,this,"_set").call(this,e,n),this.localCache[e]=JSON.stringify(n)})}_get(e){return D(this,null,function*(){let n=yield to(i.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(n),n})}_remove(e){return D(this,null,function*(){yield to(i.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}return i.type="LOCAL",i})(),AS=O6;var M6=(()=>{class i extends Rh{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}return i.type="SESSION",i})(),Zv=M6;function k6(i){return Promise.all(i.map(t=>D(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(e){return{fulfilled:!1,reason:e}}})))}var A6=(()=>{class i{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let n=this.receivers.find(o=>o.isListeningto(e));if(n)return n;let r=new i(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}handleEvent(e){return D(this,null,function*(){let n=e,{eventId:r,eventType:o,data:s}=n.data,a=this.handlersMap[o];if(!a?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:o});let c=Array.from(a).map(f=>D(this,null,function*(){return f(n.origin,s)})),u=yield k6(c);n.ports[0].postMessage({status:"done",eventId:r,eventType:o,response:u})})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}i.receivers=[];return i})();function DS(i="",t=10){let e="";for(let n=0;n{let u=DS("",20);r.port1.start();let f=setTimeout(()=>{c(new Error("unsupported_event"))},n);s={messageChannel:r,onMessage(v){let b=v;if(b.data.eventId===u)switch(b.data.status){case"ack":clearTimeout(f),o=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(b.data.response);break;default:clearTimeout(f),clearTimeout(o),c(new Error("invalid_response"));break}}},this.handlers.add(s),r.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:t,eventId:u,data:e},[r.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})})}};function Ir(){return window}function D6(i){Ir().location.href=i}function PS(){return typeof Ir().WorkerGlobalScope<"u"&&typeof Ir().importScripts=="function"}function P6(){return D(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function R6(){var i;return((i=navigator?.serviceWorker)===null||i===void 0?void 0:i.controller)||null}function V6(){return PS()?self:null}var RS="firebaseLocalStorageDb",L6=1,Vh="firebaseLocalStorage",VS="fbase_key",Ms=class{constructor(t){this.request=t}toPromise(){return new Promise((t,e)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{e(this.request.error)})})}};function Nh(i,t){return i.transaction([Vh],t?"readwrite":"readonly").objectStore(Vh)}function F6(){let i=indexedDB.deleteDatabase(RS);return new Ms(i).toPromise()}function Dv(){let i=indexedDB.open(RS,L6);return new Promise((t,e)=>{i.addEventListener("error",()=>{e(i.error)}),i.addEventListener("upgradeneeded",()=>{let n=i.result;try{n.createObjectStore(Vh,{keyPath:VS})}catch(r){e(r)}}),i.addEventListener("success",()=>D(this,null,function*(){let n=i.result;n.objectStoreNames.contains(Vh)?t(n):(n.close(),yield F6(),t(yield Dv()))}))})}function aS(i,t,e){return D(this,null,function*(){let n=Nh(i,!0).put({[VS]:t,value:e});return new Ms(n).toPromise()})}function N6(i,t){return D(this,null,function*(){let e=Nh(i,!1).get(t),n=yield new Ms(e).toPromise();return n===void 0?null:n.value})}function lS(i,t){let e=Nh(i,!0).delete(t);return new Ms(e).toPromise()}var B6=800,z6=3,U6=(()=>{class i{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return D(this,null,function*(){return this.db?this.db:(this.db=yield Dv(),this.db)})}_withRetries(e){return D(this,null,function*(){let n=0;for(;;)try{let r=yield this._openDb();return yield e(r)}catch(r){if(n++>z6)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return D(this,null,function*(){return PS()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return D(this,null,function*(){this.receiver=A6._getInstance(V6()),this.receiver._subscribe("keyChanged",(e,n)=>D(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(e,n)=>D(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return D(this,null,function*(){var e,n;if(this.activeServiceWorker=yield P6(),!this.activeServiceWorker)return;this.sender=new Av(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return D(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||R6()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return D(this,null,function*(){try{if(!indexedDB)return!1;let e=yield Dv();return yield aS(e,Ph,"1"),yield lS(e,Ph),!0}catch{}return!1})}_withPendingWrite(e){return D(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,n){return D(this,null,function*(){return this._withPendingWrite(()=>D(this,null,function*(){return yield this._withRetries(r=>aS(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)}))})}_get(e){return D(this,null,function*(){let n=yield this._withRetries(r=>N6(r,e));return this.localCache[e]=n,n})}_remove(e){return D(this,null,function*(){return this._withPendingWrite(()=>D(this,null,function*(){return yield this._withRetries(n=>lS(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return D(this,null,function*(){let e=yield this._withRetries(o=>{let s=Nh(o,!1).getAll();return new Ms(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let n=[],r=new Set;if(e.length!==0)for(let{fbase_key:o,value:s}of e)r.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(s)&&(this.notifyListeners(o,s),n.push(o));for(let o of Object.keys(this.localCache))this.localCache[o]&&!r.has(o)&&(this.notifyListeners(o,null),n.push(o));return n})}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let o of Array.from(r))o(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>D(this,null,function*(){return this._poll()}),B6)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return i.type="LOCAL",i})(),LS=U6;var Bie=OS("rcb"),zie=new Os(3e4,6e4);function j6(i,t){return t?Hr(t):(Qe(i._popupRedirectResolver,i,"argument-error"),i._popupRedirectResolver)}var nd=class extends Ah{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return bv(t,this._buildIdpRequest())}_linkToIdToken(t,e){return bv(t,this._buildIdpRequest(e))}_getReauthenticationResolver(t){return bv(t,this._buildIdpRequest())}_buildIdpRequest(t){let e={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(e.idToken=t),e}};function H6(i){return T6(i.auth,new nd(i),i.bypassAuthState)}function G6(i){let{auth:t,user:e}=i;return Qe(e,t,"internal-error"),w6(e,new nd(i),i.bypassAuthState)}function $6(i){return D(this,null,function*(){let{auth:t,user:e}=i;return Qe(e,t,"internal-error"),I6(e,new nd(i),i.bypassAuthState)})}var Pv=class{constructor(t,e,n,r,o=!1){this.auth=t,this.resolver=n,this.user=r,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(e)?e:[e]}execute(){return new Promise((t,e)=>D(this,null,function*(){this.pendingPromise={resolve:t,reject:e};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}}))}onAuthEvent(t){return D(this,null,function*(){let{urlResponse:e,sessionId:n,postBody:r,tenantId:o,error:s,type:a}=t;if(s){this.reject(s);return}let c={auth:this.auth,requestUri:e,sessionId:n,tenantId:o||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(u){this.reject(u)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return H6;case"linkViaPopup":case"linkViaRedirect":return $6;case"reauthViaPopup":case"reauthViaRedirect":return G6;default:Do(this.auth,"internal-error")}}resolve(t){Po(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Po(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var Uie=new Os(2e3,1e4);var q6="pendingRedirect",Ih=new Map,Rv=class i extends Pv{constructor(t,e,n=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],e,void 0,n),this.eventId=null}execute(){return D(this,null,function*(){let t=Ih.get(this.auth._key());if(!t){try{let n=(yield W6(this.resolver,this.auth))?yield to(i.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(n)}catch(e){t=()=>Promise.reject(e)}Ih.set(this.auth._key(),t)}return this.bypassAuthState||Ih.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return D(this,null,function*(){if(t.type==="signInViaRedirect")return to(i.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){let e=yield this.auth._redirectUserForId(t.eventId);if(e)return this.user=e,to(i.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return D(this,null,function*(){})}cleanUp(){}};function W6(i,t){return D(this,null,function*(){let e=Y6(t),n=Q6(i);if(!(yield n._isAvailable()))return!1;let r=(yield n._get(e))==="true";return yield n._remove(e),r})}function K6(i,t){Ih.set(i._key(),t)}function Q6(i){return Hr(i._redirectPersistence)}function Y6(i){return Ch(q6,i.config.apiKey,i.name)}function Z6(i,t,e=!1){return D(this,null,function*(){let n=$v(i),r=j6(n,t),s=yield new Rv(n,r,e).execute();return s&&!e&&(delete s.user._redirectEventId,yield n._persistUserIfCurrent(s.user),yield n._setRedirectUser(null,t)),s})}var X6=10*60*1e3,Vv=class{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let e=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(t,n)&&(e=!0,this.sendToConsumer(t,n),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!J6(t)||(this.hasHandledPotentialRedirect=!0,e||(this.queuedRedirectEvent=t,e=!0)),e}sendToConsumer(t,e){var n;if(t.error&&!FS(t)){let r=((n=t.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";e.onError(Es(this.auth,r))}else e.onAuthEvent(t)}isEventForConsumer(t,e){let n=e.eventId===null||!!t.eventId&&t.eventId===e.eventId;return e.filter.includes(t.type)&&n}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=X6&&this.cachedEventUids.clear(),this.cachedEventUids.has(cS(t))}saveEventToCache(t){this.cachedEventUids.add(cS(t)),this.lastProcessedEventTime=Date.now()}};function cS(i){return[i.type,i.eventId,i.sessionId,i.tenantId].filter(t=>t).join("-")}function FS({type:i,error:t}){return i==="unknown"&&t?.code==="auth/no-auth-event"}function J6(i){switch(i.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return FS(i);default:return!1}}function eL(e){return D(this,arguments,function*(i,t={}){return La(i,"GET","/v1/projects",t)})}var tL=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,iL=/^https?/;function nL(i){return D(this,null,function*(){if(i.config.emulator)return;let{authorizedDomains:t}=yield eL(i);for(let e of t)try{if(rL(e))return}catch{}Do(i,"unauthorized-domain")})}function rL(i){let t=Iv(),{protocol:e,hostname:n}=new URL(t);if(i.startsWith("chrome-extension://")){let s=new URL(i);return s.hostname===""&&n===""?e==="chrome-extension:"&&i.replace("chrome-extension://","")===t.replace("chrome-extension://",""):e==="chrome-extension:"&&s.hostname===n}if(!iL.test(e))return!1;if(tL.test(i))return n===i;let r=i.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(n)}var oL=new Os(3e4,6e4);function dS(){let i=Ir().___jsl;if(i?.H){for(let t of Object.keys(i.H))if(i.H[t].r=i.H[t].r||[],i.H[t].L=i.H[t].L||[],i.H[t].r=[...i.H[t].L],i.CP)for(let e=0;e{var n,r,o;function s(){dS(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{dS(),e(Es(i,"network-request-failed"))},timeout:oL.get()})}if(!((r=(n=Ir().gapi)===null||n===void 0?void 0:n.iframes)===null||r===void 0)&&r.Iframe)t(gapi.iframes.getContext());else if(!((o=Ir().gapi)===null||o===void 0)&&o.load)s();else{let a=OS("iframefcb");return Ir()[a]=()=>{gapi.load?s():e(Es(i,"network-request-failed"))},_6(`${v6()}?onload=${a}`).catch(c=>e(c))}}).catch(t=>{throw wh=null,t})}var wh=null;function aL(i){return wh=wh||sL(i),wh}var lL=new Os(5e3,15e3),cL="__/auth/iframe",dL="emulator/auth/iframe",uL={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},pL=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function hL(i){let t=i.config;Qe(t.authDomain,i,"auth-domain-config-required");let e=t.emulator?Bv(t,dL):`https://${i.config.authDomain}/${cL}`,n={apiKey:t.apiKey,appName:i.name,v:dr},r=pL.get(i.config.apiHost);r&&(n.eid=r);let o=i._getFrameworks();return o.length&&(n.fw=o.join(",")),`${e}?${oc(n).slice(1)}`}function mL(i){return D(this,null,function*(){let t=yield aL(i),e=Ir().gapi;return Qe(e,i,"internal-error"),t.open({where:document.body,url:hL(i),messageHandlersFilter:e.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:uL,dontclear:!0},n=>new Promise((r,o)=>D(this,null,function*(){yield n.restyle({setHideOnLeave:!1});let s=Es(i,"network-request-failed"),a=Ir().setTimeout(()=>{o(s)},lL.get());function c(){Ir().clearTimeout(a),r(n)}n.ping(c).then(c,()=>{o(s)})})))})}var fL={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},gL=500,_L=600,vL="_blank",yL="http://localhost",Lh=class{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function bL(i,t,e,n=gL,r=_L){let o=Math.max((window.screen.availHeight-r)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString(),a="",c=Object.assign(Object.assign({},fL),{width:n.toString(),height:r.toString(),top:o,left:s}),u=ri().toLowerCase();e&&(a=CS(u)?vL:e),bS(u)&&(t=t||yL,c.scrollbars="yes");let f=Object.entries(c).reduce((b,[O,V])=>`${b}${O}=${V},`,"");if(u6(u)&&a!=="_self")return CL(t||"",a),new Lh(null);let v=window.open(t||"",a,f);Qe(v,i,"popup-blocked");try{v.focus()}catch{}return new Lh(v)}function CL(i,t){let e=document.createElement("a");e.href=i,e.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(n)}var IL="__/auth/handler",wL="emulator/auth/handler",TL=encodeURIComponent("fac");function uS(i,t,e,n,r,o){return D(this,null,function*(){Qe(i.config.authDomain,i,"auth-domain-config-required"),Qe(i.config.apiKey,i,"invalid-api-key");let s={apiKey:i.config.apiKey,appName:i.name,authType:e,redirectUrl:n,v:dr,eventId:r};if(t instanceof Dh){t.setDefaultLanguage(i.languageCode),s.providerId=t.providerId||"",HI(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(let[f,v]of Object.entries(o||{}))s[f]=v}if(t instanceof Mv){let f=t.getScopes().filter(v=>v!=="");f.length>0&&(s.scopes=f.join(","))}i.tenantId&&(s.tid=i.tenantId);let a=s;for(let f of Object.keys(a))a[f]===void 0&&delete a[f];let c=yield i._getAppCheckToken(),u=c?`#${TL}=${encodeURIComponent(c)}`:"";return`${xL(i)}?${oc(a).slice(1)}${u}`})}function xL({config:i}){return i.emulator?Bv(i,wL):`https://${i.authDomain}/${IL}`}var Cv="webStorageSupport",Lv=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Zv,this._completeRedirectFn=Z6,this._overrideRedirectResult=K6}_openPopup(t,e,n,r){return D(this,null,function*(){var o;Po((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");let s=yield uS(t,e,n,Iv(),r);return bL(t,s,DS())})}_openRedirect(t,e,n,r){return D(this,null,function*(){yield this._originValidation(t);let o=yield uS(t,e,n,Iv(),r);return D6(o),new Promise(()=>{})})}_initialize(t){let e=t._key();if(this.eventManagers[e]){let{manager:r,promise:o}=this.eventManagers[e];return r?Promise.resolve(r):(Po(o,"If manager is not set, promise should be"),o)}let n=this.initAndGetManager(t);return this.eventManagers[e]={promise:n},n.catch(()=>{delete this.eventManagers[e]}),n}initAndGetManager(t){return D(this,null,function*(){let e=yield mL(t),n=new Vv(t);return e.register("authEvent",r=>(Qe(r?.authEvent,t,"invalid-auth-event"),{status:n.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:n},this.iframes[t._key()]=e,n})}_isIframeWebStorageSupported(t,e){this.iframes[t._key()].send(Cv,{type:Cv},r=>{var o;let s=(o=r?.[0])===null||o===void 0?void 0:o[Cv];s!==void 0&&e(!!s),Do(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){let e=t._key();return this.originValidationPromises[e]||(this.originValidationPromises[e]=nL(t)),this.originValidationPromises[e]}get _shouldInitProactively(){return SS()||Gv()||Fh()}},NS=Lv;var pS="@firebase/auth",hS="1.6.0";var Fv=class{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return D(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;let e=this.auth.onIdTokenChanged(n=>{t(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,e),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();let e=this.internalListeners.get(t);e&&(this.internalListeners.delete(t),e(),this.updateProactiveRefresh())}assertAuthConfigured(){Qe(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function SL(i){switch(i){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function EL(i){cr(new ln("auth",(t,{options:e})=>{let n=t.getProvider("app").getImmediate(),r=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=n.options;Qe(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});let c={apiKey:s,authDomain:a,clientPlatform:i,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ES(i)},u=new Ov(n,r,o,c);return y6(u,e),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,n)=>{t.getProvider("auth-internal").initialize()})),cr(new ln("auth-internal",t=>{let e=$v(t.getProvider("auth").getImmediate());return(n=>new Fv(n))(e)},"PRIVATE").setInstantiationMode("EXPLICIT")),Wt(pS,hS,SL(i)),Wt(pS,hS,"esm2017")}var OL=5*60,ML=sg("authIdTokenMaxAge")||OL,mS=null,kL=i=>t=>D(void 0,null,function*(){let e=t&&(yield t.getIdTokenResult()),n=e&&(new Date().getTime()-Date.parse(e.issuedAtTime))/1e3;if(n&&n>ML)return;let r=e?.token;mS!==r&&(mS=r,yield fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function Xv(i=Co()){let t=os(i,"auth");if(t.isInitialized())return t.getImmediate();let e=Wv(i,{popupRedirectResolver:NS,persistence:[LS,AS,Zv]}),n=sg("authTokenSyncURL");if(n){let o=kL(n);Yv(e,o,()=>o(e.currentUser)),Qv(e,s=>o(s))}let r=rg("auth");return r&&Kv(e,`http://${r}`),e}function AL(){var i,t;return(t=(i=document.getElementsByTagName("head"))===null||i===void 0?void 0:i[0])!==null&&t!==void 0?t:document}g6({loadJS(i){return new Promise((t,e)=>{let n=document.createElement("script");n.setAttribute("src",i),n.onload=t,n.onerror=r=>{let o=Es("internal-error");o.customData=r,e(o)},n.type="text/javascript",n.charset="UTF-8",AL().appendChild(n)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});EL("Browser");var BS="auth",Gr=class{constructor(t){return t}},ks=class{constructor(){return Ss(BS)}};var Jv=new le("angularfire2.auth-instances");function xF(i,t){let e=Va(BS,i,t);return e&&new Gr(e)}function SF(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new Gr(n)}}var EF={provide:ks,deps:[[new hi,Jv]]},OF={provide:Gr,useFactory:xF,deps:[[new hi,Jv],$n]},MF=(()=>{class i{constructor(){Wt("angularfire",zr.full,"auth")}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[OF,EF]})}return i})();function zS(i,...t){return{ngModule:MF,providers:[{provide:Jv,useFactory:SF(i),multi:!0,deps:[ge,Mi,ko,Ur,[new hi,Mo],...t]}]}}var US=Gn(Xv,!0);var $r=class{constructor(t){return t}},HS="firestore",ey=class{constructor(){return Ss(HS)}};var ty=new le("angularfire2.firestore-instances");function kF(i,t){let e=Va(HS,i,t);return e&&new $r(e)}function AF(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new $r(n)}}var DF={provide:ey,deps:[[new hi,ty]]},PF={provide:$r,useFactory:kF,deps:[[new hi,ty],$n]},RF=(()=>{class i{constructor(){Wt("angularfire",zr.full,"fst")}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[PF,DF]})}return i})();function GS(i,...t){return{ngModule:RF,providers:[{provide:ty,useFactory:AF(i),multi:!0,deps:[ge,Mi,ko,Ur,[new hi,ks],[new hi,Mo],...t]}]}}var iy=Gn(Ts,!0);var ny=Gn(hh,!0);var $S=Gn(Gx,!0);var qS=Gn(fh,!0);var KS=(()=>{let t=class t{constructor(){this.commonErrors={UNKNOWN:"An unknown error is occurred.",EMAIL_EXISTS:"The email address is already in use by another account.",OPERATION_NOT_ALLOWED:"Password sign-in is disabled for this project.",TOO_MANY_ATTEMPTS_TRY_LATER:"We have blocked all requests from this device due to unusual activity. Try again later.",EMAIL_NOT_FOUND:"There is no user record corresponding to this identifier. The user may have been deleted.",INVALID_PASSWORD:"The password is invalid or the user does not have a password.",USER_DISABLED:"The user account has been disabled by an administrator.",EXPIRED_OOB_CODE:"Your Verification Code Has Been Expired, Request a New Code and Try Again.",INVALID_OOB_CODE:"Your Verification Code is Invalid or Already Used, Enter a Valid Code."}}handleAuthErrors(n){if(!n.error||!n.error.error)return io(this.commonErrors.UNKNOWN);{let r=n.error.error.message;return io(this.commonErrors[r])}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Kt=(()=>{let t=class t{constructor(n,r,o,s,a){this.http=n,this.db=r,this.errorService=o,this.router=s,this.auth=a,this.loggedInUser=st(null)}signupWithEmailAndPassword(n){let r=`https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=${ts.FIREBASE_API_KEY}`;return this.http.post(r,{email:n.email,password:n.password,returnSecureToken:!0}).pipe(cn(o=>this.errorService.handleAuthErrors(o)),It(o=>{this.authenticatedUser(o.email,o.localId,o.idToken,o.expiresIn)}))}signInWithEmailAndPassword(n){let r=`https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=${ts.FIREBASE_API_KEY}`;return this.http.post(r,{email:n.email,password:n.password,returnSecureToken:!0}).pipe(cn(o=>this.errorService.handleAuthErrors(o)),It(o=>{this.authenticatedUser(o.email,o.localId,o.idToken,o.expiresIn)}))}sendPasswordResetCodeToEmail(n){let r=`https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=${ts.FIREBASE_API_KEY}`;return this.http.post(r,{requestType:"PASSWORD_RESET",email:n}).pipe(cn(o=>this.errorService.handleAuthErrors(o)))}createUserData(n,r){return D(this,null,function*(){let o={username:n.username,email:n.email,dateOfBirth:n.dateOfBirth.toLocaleDateString(),language:{iso_639_1:"en",english_name:"English",name:"English"},region:{iso_3166_1:"US",english_name:"United States of America",native_name:"United States"},include_adult:!1,dark_mode:!0,data_saving_mode:!1,data_saving_type:null,accentColor:"#004124"},s={movies:[],celebrities:[],tvshows:[]};yield mh(Ts(this.db,"usersdata",r),o),yield mh(Ts(this.db,"savedList",r),s)})}updateUserData(n,r){return D(this,null,function*(){let o=Ts(this.db,"usersdata",r);yield fh(o,n)})}getUserData(n){return D(this,null,function*(){let r=yield hh(Ts(this.db,"usersdata",n));if(r.exists())return r.data()})}authenticatedUser(n,r,o,s){return D(this,null,function*(){let a=new Date(new Date().getTime()+ +s*1e3),c=new gh(n,r,o,a),u=yield this.getUserData(r),v=JSON.stringify({user:c,data:u});localStorage.setItem("user",v)})}getLoggedInUser(){if(this.loggedInUser())return this.loggedInUser();{let n=localStorage.getItem("user");if(n){let r=JSON.parse(n);this.loggedInUser.set(r)}else this.loggedInUser.set({language:{iso_639_1:"en",english_name:"English",name:"English"},region:{iso_3166_1:"US",english_name:"United States of America",native_name:"United States"},dark_mode:!0,demoAccount:!0});return this.loggedInUser()}}};t.\u0275fac=function(r){return new(r||t)(J(Sl),J($r),J(KS),J(bt),J(Gr))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function LF(i,t){}var FF=()=>({width:"100%",height:"calc(100vh - 2rem)",display:"grid",placeItems:"center"}),NF=()=>({width:"100%"}),QS=(()=>{let t=class t{constructor(n,r,o){this.authService=n,this.messageService=r,this.router=o,this.loginForm=new on({email:new ti("",[mn.required,mn.email]),password:new ti("",[mn.required,mn.minLength(3)])}),document.title="Login to Showbizhub"}login(){this.loginForm.valid&&this.authService.signInWithEmailAndPassword(this.loginForm.value).subscribe(n=>{this.router.navigate(["home"]),this.showToast("success","Welcome Back",n,5e3)},n=>{this.showToast("error","An Error Occcurred",n,5e3)})}showToast(n,r,o,s){this.messageService.add({severity:n,summary:r,detail:o,life:s})}};t.\u0275fac=function(r){return new(r||t)(w(Kt),w(sr),w(bt))},t.\u0275cmp=k({type:t,selectors:[["app-login"]],standalone:!0,features:[mt([sr]),R],decls:21,vars:10,consts:[["position","bottom-center"],["header","Login to ShowbizHub","subheader","Enter Your Credentials"],["pTemplate","header"],[3,"formGroup","ngSubmit"],[1,"p-float-label"],["pInputText","","id","email","formControlName","email"],["for","email"],["formControlName","password",3,"toggleMask","feedback","inputStyle"],["for","password"],["routerLink","/password-reset",2,"margin-bottom",".4rem"],[1,""],["label","Login","icon","pi pi-check","iconPos","right","type","submit","size","small",3,"rounded","disabled"],[1,"mt-2"],["routerLink","/signup"]],template:function(r,o){r&1&&(y(0,"p-toast",0),p(1,"p-card",1),g(2,LF,0,0,"ng-template",2),p(3,"form",3),A("ngSubmit",function(){return o.login()}),p(4,"div",4),y(5,"input",5),p(6,"label",6),_(7,"Email"),h()(),p(8,"span",4),y(9,"p-password",7),p(10,"label",8),_(11,"Password"),h()(),p(12,"a",9),_(13,"Forgot Password"),h(),p(14,"div",10),y(15,"p-button",11),p(16,"div",12),_(17," Don't Have an Account? "),p(18,"a",13),_(19,"Create One"),h()()()()(),y(20,"app-mini-celebrity-card")),r&2&&(d(),xt(Ke(8,FF)),d(2),l("formGroup",o.loginForm),d(6),l("toggleMask",!0)("feedback",!1)("inputStyle",Ke(9,NF)),d(6),l("rounded",!0)("disabled",o.loginForm.invalid))},dependencies:[Nu,tc,he,fn,_o,yt,ni,Bi,an,mo,ii,sn,Qi,Yi,oa,ra,Ve,et,Uu,zu,PI,sa],styles:["form[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{margin-bottom:1.5rem}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}"]});let i=t;return i})();var Bh=(()=>{class i{host;constructor(e){this.host=e}autofocus;focused=!1;ngAfterContentChecked(){if(!this.focused&&this.autofocus){let e=x.getFocusableElements(this.host.nativeElement);e.length===0&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0}}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275dir=it({type:i,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}})}return i})(),rd=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var BF=["overlay"],zF=["content"];function UF(i,t){i&1&&ie(0)}var jF=(i,t,e)=>({showTransitionParams:i,hideTransitionParams:t,transform:e}),HF=i=>({value:"visible",params:i}),GF=i=>({mode:i}),$F=i=>({$implicit:i});function qF(i,t){if(i&1){let e=G();p(0,"div",1,3),A("click",function(r){S(e);let o=m(2);return E(o.onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){S(e);let o=m(2);return E(o.onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){S(e);let o=m(2);return E(o.onOverlayContentAnimationDone(r))}),Ae(2),g(3,UF,1,0,"ng-container",4),h()}if(i&2){let e=m(2);U(e.contentStyleClass),l("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",H(11,HF,kt(7,jF,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),d(3),l("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",H(15,$F,H(13,GF,e.overlayMode)))}}var WF=(i,t,e,n,r,o,s,a,c,u,f,v,b,O)=>({"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":i,"p-overlay-center":t,"p-overlay-top":e,"p-overlay-top-start":n,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":c,"p-overlay-left-start":u,"p-overlay-left-end":f,"p-overlay-right":v,"p-overlay-right-start":b,"p-overlay-right-end":O});function KF(i,t){if(i&1){let e=G();p(0,"div",1,2),A("click",function(){S(e);let r=m();return E(r.onOverlayClick())}),g(2,qF,4,17,"div",0),h()}if(i&2){let e=m();U(e.styleClass),l("ngStyle",e.style)("ngClass",Ud(5,WF,[e.modal,e.modal&&e.overlayResponsiveDirection==="center",e.modal&&e.overlayResponsiveDirection==="top",e.modal&&e.overlayResponsiveDirection==="top-start",e.modal&&e.overlayResponsiveDirection==="top-end",e.modal&&e.overlayResponsiveDirection==="bottom",e.modal&&e.overlayResponsiveDirection==="bottom-start",e.modal&&e.overlayResponsiveDirection==="bottom-end",e.modal&&e.overlayResponsiveDirection==="left",e.modal&&e.overlayResponsiveDirection==="left-start",e.modal&&e.overlayResponsiveDirection==="left-end",e.modal&&e.overlayResponsiveDirection==="right",e.modal&&e.overlayResponsiveDirection==="right-start",e.modal&&e.overlayResponsiveDirection==="right-end"])),d(2),l("ngIf",e.visible)}}var QF=["*"],YF={provide:zt,useExisting:Tt(()=>As),multi:!0},ZF=Pr([Lt({transform:"{{transform}}",opacity:0}),Xt("{{showTransitionParams}}")]),XF=Pr([Xt("{{hideTransitionParams}}",Lt({transform:"{{transform}}",opacity:0}))]),As=(()=>{class i{document;platformId;el;renderer;config;overlayService;cd;zone;get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return re.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return re.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return re.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return re.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){let e=this._target||this.overlayOptions?.target;return e===void 0?"@prev":e}set target(e){this._target=e}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(e){this._appendTo=e}get autoZIndex(){let e=this._autoZIndex||this.overlayOptions?.autoZIndex;return e===void 0?!0:e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){let e=this._baseZIndex||this.overlayOptions?.baseZIndex;return e===void 0?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){let e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return e===void 0?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){let e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return e===void 0?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}visibleChange=new L;onBeforeShow=new L;onShow=new L;onBeforeHide=new L;onHide=new L;onAnimationStart=new L;onAnimationDone=new L;templates;overlayViewChild;contentViewChild;contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_appendTo;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;documentKeyboardListener;window;transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"};get modal(){if(ut(this.platformId))return this.mode==="modal"||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return F(F({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return F(F({},this.overlayOptions?.responsive),this.responsive)}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return x.getTargetElement(this.target,this.el?.nativeElement)}constructor(e,n,r,o,s,a,c,u){this.document=e,this.platformId=n,this.el=r,this.renderer=o,this.config=s,this.overlayService=a,this.cd=c,this.zone=u,this.window=this.document.defaultView}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}show(e,n=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),n&&x.focus(this.targetEl),this.modal&&x.addClass(this.document?.body,"p-overflow-hidden")}hide(e,n=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),n&&x.focus(this.targetEl),this.modal&&x.removeClass(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&x.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&Pt.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),x.appendOverlay(this.overlayEl,this.appendTo==="body"?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&x.addClass(this.overlayEl,"p-component-overlay-leave");break}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){let n=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.show(n,!0),this.bindListeners();break;case"void":this.hide(n,!0),this.unbindListeners(),x.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),Pt.clear(n),this.modalVisible=!1,this.cd.markForCheck();break}this.handleEvents("onAnimationDone",e)}handleEvents(e,n){this[e].emit(n),this.options&&this.options[e]&&this.options[e](n),this.config?.overlayOptions&&(this.config?.overlayOptions)[e]&&(this.config?.overlayOptions)[e](n)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new kn(this.targetEl,e=>{(this.listener?this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{let r=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:e.which!==3&&r}):r)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!x.isTouchDevice()}):!x.isTouchDevice())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",e=>{if(this.overlayOptions.hideOnEscape===!1||e.code!=="Escape")return;(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!x.isTouchDevice()}):!x.isTouchDevice())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(x.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),Pt.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(ve),w(nt),w(At),w(Mn),w(Ne),w(ge))};static \u0275cmp=k({type:i,selectors:[["p-overlay"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(BF,5),oe(zF,5)),n&2){let o;q(o=W())&&(r.overlayViewChild=o.first),q(o=W())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[mt([YF])],ngContentSelectors:QF,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(je(),g(0,KF,3,20,"div",0)),n&2&&l("ngIf",r.modalVisible)},dependencies:[xe,Ie,rt,Ce],styles:[`@layer primeng{.p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}} -`],encapsulation:2,data:{animation:[rn("overlayContentAnimation",[ei(":enter",[Ko(ZF)]),ei(":leave",[Ko(XF)])])]},changeDetection:0})}return i})(),qr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Te]})}return i})();var JF=["element"],eN=["content"];function tN(i,t){i&1&&ie(0)}var oy=(i,t)=>({$implicit:i,options:t});function iN(i,t){if(i&1&&(Z(0),g(1,tN,1,0,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",We(2,oy,e.loadedItems,e.getContentOptions()))}}function nN(i,t){i&1&&ie(0)}function rN(i,t){if(i&1&&(Z(0),g(1,nN,1,0,"ng-container",7),X()),i&2){let e=t.$implicit,n=t.index,r=m(3);d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",We(2,oy,e,r.getOptions(n)))}}var oN=i=>({"p-scroller-loading":i});function sN(i,t){if(i&1&&(p(0,"div",8,9),g(2,rN,2,5,"ng-container",10),h()),i&2){let e=m(2);l("ngClass",H(5,oN,e.d_loading))("ngStyle",e.contentStyle),T("data-pc-section","content"),d(2),l("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy||e.index)}}function aN(i,t){if(i&1&&y(0,"div",11),i&2){let e=m(2);l("ngStyle",e.spacerStyle),T("data-pc-section","spacer")}}function lN(i,t){i&1&&ie(0)}var cN=i=>({numCols:i}),ZS=i=>({options:i});function dN(i,t){if(i&1&&(Z(0),g(1,lN,1,0,"ng-container",7),X()),i&2){let e=t.index,n=m(4);d(),l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(4,ZS,n.getLoaderOptions(e,n.both&&H(2,cN,n._numItemsInViewport.cols))))}}function uN(i,t){if(i&1&&(Z(0),g(1,dN,2,6,"ng-container",14),X()),i&2){let e=m(3);d(),l("ngForOf",e.loaderArr)}}function pN(i,t){i&1&&ie(0)}var hN=()=>({styleClass:"p-scroller-loading-icon"});function mN(i,t){if(i&1&&(Z(0),g(1,pN,1,0,"ng-container",7),X()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.loaderIconTemplate)("ngTemplateOutletContext",H(3,ZS,Ke(2,hN)))}}function fN(i,t){i&1&&y(0,"SpinnerIcon",16),i&2&&(l("styleClass","p-scroller-loading-icon pi-spin"),T("data-pc-section","loadingIcon"))}function gN(i,t){if(i&1&&g(0,mN,2,5,"ng-container",0)(1,fN,1,2,"ng-template",null,15,dt),i&2){let e=Le(2),n=m(3);l("ngIf",n.loaderIconTemplate)("ngIfElse",e)}}var _N=i=>({"p-component-overlay":i});function vN(i,t){if(i&1&&(p(0,"div",12),g(1,uN,2,1,"ng-container",0)(2,gN,3,2,"ng-template",null,13,dt),h()),i&2){let e=Le(3),n=m(2);l("ngClass",H(4,_N,!n.loaderTemplate)),T("data-pc-section","loader"),d(),l("ngIf",n.loaderTemplate)("ngIfElse",e)}}var yN=(i,t,e)=>({"p-scroller":!0,"p-scroller-inline":i,"p-both-scroll":t,"p-horizontal-scroll":e});function bN(i,t){if(i&1){let e=G();Z(0),p(1,"div",2,3),A("scroll",function(r){S(e);let o=m();return E(o.onContainerScroll(r))}),g(3,iN,2,5,"ng-container",0)(4,sN,3,7,"ng-template",null,4,dt)(6,aN,1,2,"div",5)(7,vN,4,6,"div",6),h(),X()}if(i&2){let e=Le(5),n=m();d(),U(n._styleClass),l("ngStyle",n._style)("ngClass",kt(12,yN,n.inline,n.both,n.horizontal)),T("id",n._id)("tabindex",n.tabindex)("data-pc-name","scroller")("data-pc-section","root"),d(2),l("ngIf",n.contentTemplate)("ngIfElse",e),d(3),l("ngIf",n._showSpacer),d(),l("ngIf",!n.loaderDisabled&&n._showLoader&&n.d_loading)}}function CN(i,t){i&1&&ie(0)}var IN=(i,t)=>({rows:i,columns:t});function wN(i,t){if(i&1&&(Z(0),g(1,CN,1,0,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",We(5,oy,e.items,We(2,IN,e._items,e.loadedColumns)))}}function TN(i,t){if(i&1&&(Ae(0),g(1,wN,2,8,"ng-container",17)),i&2){let e=m();d(),l("ngIf",e.contentTemplate)}}var xN=["*"],Fa=(()=>{class i{document;platformId;renderer;cd;zone;get id(){return this._id}set id(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&typeof e=="object"&&Object.entries(e).forEach(([n,r])=>this[`_${n}`]!==r&&(this[`_${n}`]=r))}onLazyLoad=new L;onScroll=new L;onScrollIndexChange=new L;elementViewChild;contentViewChild;templates;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;windowResizeListener;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(e=>this._columns?e:e.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}constructor(e,n,r,o,s){this.document=e,this.platformId=n,this.renderer=r,this.cd=o,this.zone=s}ngOnInit(){this.setInitialState()}ngOnChanges(e){let n=!1;if(e.loading){let{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,n=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){let{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){let{previousValue:r,currentValue:o}=e.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,n=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!n&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"item":this.itemTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"loadericon":this.loaderIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}ngAfterViewInit(){Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){ut(this.platformId)&&x.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=x.getWidth(this.elementViewChild?.nativeElement),this.defaultHeight=x.getHeight(this.elementViewChild?.nativeElement),this.defaultContentWidth=x.getWidth(this.contentEl),this.defaultContentHeight=x.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||x.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(e){return Math.floor(((e??this.first)+this.d_numToleratedItems*4)/(this._step||1))}isPageChanged(e){return this._step?this.page!==this.getPageByFirst(e??this.first):!0}scrollTo(e){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,n="auto"){let{numToleratedItems:r}=this.calculateNumItems(),o=this.getContentPosition(),s=(f=0,v)=>f<=v?0:f,a=(f,v,b)=>f*v+b,c=(f=0,v=0)=>this.scrollTo({left:f,top:v,behavior:n}),u=0;if(this.both)u={rows:s(e[0],r[0]),cols:s(e[1],r[1])},c(a(u.cols,this._itemSize[1],o.left),a(u.rows,this._itemSize[0],o.top));else if(u=s(e,r),this.horizontal&&c(a(u,this._itemSize,o.left),0),this.vertical){let f=this.elementViewChild?.nativeElement.scrollLeft;c(f,a(u,this._itemSize,o.top))}this.isRangeChanged=this.first!==u,this.first=u}scrollInView(e,n,r="auto"){if(n){let{first:o,viewport:s}=this.getRenderedRange(),a=(f=0,v=0)=>this.scrollTo({left:f,top:v,behavior:r}),c=n==="to-start",u=n==="to-end";if(c){if(this.both)s.first.rows-o.rows>e[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>e[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>e){let f=(s.first-1)*this._itemSize;this.horizontal?a(f,0):a(0,f)}}else if(u){if(this.both)s.last.rows-o.rows<=e[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=e[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=e+1){let f=(s.first+1)*this._itemSize;this.horizontal?a(f,0):a(0,f)}}}else this.scrollToIndex(e,r)}getRenderedRange(){let e=(o,s)=>Math.floor(o/(s||o)),n=this.first,r=0;if(this.elementViewChild?.nativeElement){let{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;if(this.both)n={rows:e(o,this._itemSize[0]),cols:e(s,this._itemSize[1])},r={rows:n.rows+this.numItemsInViewport.rows,cols:n.cols+this.numItemsInViewport.cols};else{let a=this.horizontal?s:o;n=e(a,this._itemSize),r=n+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:n,last:r}}}calculateNumItems(){let e=this.getContentPosition(),n=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0)||0,r=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0)||0,o=(u,f)=>Math.ceil(u/(f||u)),s=u=>Math.ceil(u/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(n,this._itemSize[1])}:o(this.horizontal?n:r,this._itemSize),c=this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a));return{numItemsInViewport:a,numToleratedItems:c}}calculateOptions(){let{numItemsInViewport:e,numToleratedItems:n}=this.calculateNumItems(),r=(a,c,u,f=!1)=>this.getLast(a+c+(aArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[e,n]=[x.getWidth(this.contentEl),x.getHeight(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),n!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[r,o]=[x.getWidth(this.elementViewChild.nativeElement),x.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",n)):o("height",r)}}setSpacerSize(){if(this._items){let e=this.getContentPosition(),n=(r,o,s,a=0)=>this.spacerStyle=pe(F({},this.spacerStyle),{[`${r}`]:(o||[]).length*s+a+"px"});this.both?(n("height",this._items,this._itemSize[0],e.y),n("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?n("width",this._columns||this._items,this._itemSize,e.x):n("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){let n=e?e.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle=pe(F({},this.contentStyle),{transform:`translate3d(${s}px, ${a}px, 0)`});if(this.both)o(r(n.cols,this._itemSize[1]),r(n.rows,this._itemSize[0]));else{let s=r(n,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(e){let n=e.target,r=this.getContentPosition(),o=(P,j)=>P?P>j?P-j:P:0,s=(P,j)=>Math.floor(P/(j||P)),a=(P,j,ce,_e,me,qe)=>P<=me?me:qe?ce-_e-me:j+me-1,c=(P,j,ce,_e,me,qe,Ge)=>P<=qe?0:Math.max(0,Ge?Pj?ce:P-2*qe),u=(P,j,ce,_e,me,qe=!1)=>{let Ge=j+_e+2*me;return P>=me&&(Ge+=me+1),this.getLast(Ge,qe)},f=o(n.scrollTop,r.top),v=o(n.scrollLeft,r.left),b=this.both?{rows:0,cols:0}:0,O=this.last,V=!1,K=this.lastScrollPos;if(this.both){let P=this.lastScrollPos.top<=f,j=this.lastScrollPos.left<=v;if(!this._appendOnly||this._appendOnly&&(P||j)){let ce={rows:s(f,this._itemSize[0]),cols:s(v,this._itemSize[1])},_e={rows:a(ce.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],P),cols:a(ce.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],j)};b={rows:c(ce.rows,_e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],P),cols:c(ce.cols,_e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],j)},O={rows:u(ce.rows,b.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:u(ce.cols,b.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},V=b.rows!==this.first.rows||O.rows!==this.last.rows||b.cols!==this.first.cols||O.cols!==this.last.cols||this.isRangeChanged,K={top:f,left:v}}}else{let P=this.horizontal?v:f,j=this.lastScrollPos<=P;if(!this._appendOnly||this._appendOnly&&j){let ce=s(P,this._itemSize),_e=a(ce,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,j);b=c(ce,_e,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,j),O=u(ce,b,this.last,this.numItemsInViewport,this.d_numToleratedItems),V=b!==this.first||O!==this.last||this.isRangeChanged,K=P}}return{first:b,last:O,isRangeChanged:V,scrollPos:K}}onScrollChange(e){let{first:n,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(e);if(o){let a={first:n,last:r};if(this.setContentPosition(a),this.first=n,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged(n)){let c={first:this._step?Math.min(this.getPageByFirst(n)*this._step,this.items.length-this._step):n,last:Math.min(this._step?(this.getPageByFirst(n)+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==c.first||this.lazyLoadState.last!==c.last)&&this.handleEvents("onLazyLoad",c),this.lazyLoadState=c}}}onContainerScroll(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){let{isRangeChanged:n}=this.onScrollPositionChange(e);(n||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),this.d_loading&&this.showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(e)}bindResizeListener(){ut(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let e=this.document.defaultView,n=x.isTouchDevice()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(e,n,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(x.isVisible(this.elementViewChild?.nativeElement)){let[e,n]=[x.getWidth(this.elementViewChild?.nativeElement),x.getHeight(this.elementViewChild?.nativeElement)],[r,o]=[e!==this.defaultWidth,n!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical?o:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=n,this.defaultContentWidth=x.getWidth(this.contentEl),this.defaultContentHeight=x.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,n){return this.options&&this.options[e]?this.options[e](n):this[e].emit(n)}getContentOptions(){return{contentStyleClass:`p-scroller-content ${this.d_loading?"p-scroller-loading":""}`,items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,n)=>this.getLoaderOptions(e,n),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(e){let n=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:n,first:r===0,last:r===n-1,even:r%2===0,odd:r%2!==0}}getLoaderOptions(e,n){let r=this.loaderArr.length;return F({index:e,count:r,first:e===0,last:e===r-1,even:e%2===0,odd:e%2!==0},n)}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(nt),w(Ne),w(ge))};static \u0275cmp=k({type:i,selectors:[["p-scroller"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(JF,5),oe(eN,5)),n&2){let o;q(o=W())&&(r.elementViewChild=o.first),q(o=W())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Mt],ngContentSelectors:xN,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["disabledContainer",""],[3,"ngStyle","ngClass","scroll"],["element",""],["buildInContent",""],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],["buildInLoader",""],[4,"ngFor","ngForOf"],["buildInLoaderIcon",""],[3,"styleClass"],[4,"ngIf"]],template:function(n,r){if(n&1&&(je(),g(0,bN,8,16,"ng-container",0)(1,TN,2,1,"ng-template",null,1,dt)),n&2){let o=Le(2);l("ngIf",!r._disabled)("ngIfElse",o)}},dependencies:()=>[xe,Vt,Ie,rt,Ce,Vr],styles:[`@layer primeng{p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{scale:2}.p-scroller-inline .p-scroller-content{position:static}} -`],encapsulation:2})}return i})(),Wr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Vr,Te]})}return i})();var Ro=(()=>{class i{platformId;el;zone;config;renderer;viewContainer;tooltipPosition;tooltipEvent="hover";appendTo;positionStyle;tooltipStyleClass;tooltipZIndex;escape=!0;showDelay;hideDelay;life;positionTop;positionLeft;autoHide=!0;fitContent=!0;hideOnEscape=!0;content;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}tooltipOptions;_tooltipOptions={tooltipLabel:null,tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",positionStyle:null,tooltipStyleClass:null,tooltipZIndex:"auto",escape:!0,disabled:null,showDelay:null,hideDelay:null,positionTop:null,positionLeft:null,life:null,autoHide:!0,hideOnEscape:!0,id:Me()+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;scrollHandler;resizeListener;constructor(e,n,r,o,s,a){this.platformId=e,this.el=n,this.zone=r,this.config=o,this.renderer=s,this.viewContainer=a}ngAfterViewInit(){ut(this.platformId)&&this.zone.runOutsideAngular(()=>{if(this.getOption("tooltipEvent")==="hover")this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener);else if(this.getOption("tooltipEvent")==="focus"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.content&&(this.setOption({tooltipLabel:e.content.currentValue}),this.active&&(e.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.id&&this.setOption({id:e.id.currentValue}),e.tooltipOptions&&(this._tooltipOptions=F(F({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.isAutoHide()?this.deactivate():!(x.hasClass(e.relatedTarget,"p-tooltip")||x.hasClass(e.relatedTarget,"p-tooltip-text")||x.hasClass(e.relatedTarget,"p-tooltip-arrow"))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){this.deactivate()}onPressEscape(){this.hideOnEscape&&this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div"),this.container.setAttribute("id",this.getOption("id")),this.container.setAttribute("role","tooltip");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),this.getOption("appendTo")==="body"?document.body.appendChild(this.container):this.getOption("appendTo")==="target"?x.appendChild(this.container,this.el.nativeElement):x.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let e=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(e,"mouseleave",n=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),x.fadeIn(this.container,250),this.getOption("tooltipZIndex")==="auto"?Pt.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){this.getOption("tooltipZIndex")==="auto"&&Pt.clear(this.container),this.remove()}updateText(){let e=this.getOption("tooltipLabel");if(e instanceof zd){let n=this.viewContainer.createEmbeddedView(e);n.detectChanges(),n.rootNodes.forEach(r=>this.tooltipText.appendChild(r))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(e))):this.tooltipText.innerHTML=e}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break}}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let e=this.el.nativeElement.getBoundingClientRect(),n=e.left+x.getWindowScrollLeft(),r=e.top+x.getWindowScrollTop();return{left:n,top:r}}else return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),n=e.left+x.getOuterWidth(this.el.nativeElement),r=e.top+(x.getOuterHeight(this.el.nativeElement)-x.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),n=e.left-x.getOuterWidth(this.container),r=e.top+(x.getOuterHeight(this.el.nativeElement)-x.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),n=e.left+(x.getOuterWidth(this.el.nativeElement)-x.getOuterWidth(this.container))/2,r=e.top-x.getOuterHeight(this.container);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),n=e.left+(x.getOuterWidth(this.el.nativeElement)-x.getOuterWidth(this.container))/2,r=e.top+x.getOuterHeight(this.el.nativeElement);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=F(F({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return x.hasClass(e,"p-inputwrapper")?x.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let n="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?n+" "+this.getOption("tooltipStyleClass"):n}isOutOfBounds(){let e=this.container.getBoundingClientRect(),n=e.top,r=e.left,o=x.getOuterWidth(this.container),s=x.getOuterHeight(this.container),a=x.getViewport();return r+o>a.width||r<0||n<0||n+s>a.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new kn(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if(this.getOption("tooltipEvent")==="hover")this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if(this.getOption("tooltipEvent")==="focus"){let e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):x.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&Pt.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(n){return new(n||i)(w(vt),w(ve),w(ge),w(At),w(nt),w(Hs))};static \u0275dir=it({type:i,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],hostBindings:function(n,r){n&1&&A("keydown.escape",function(s){return r.onPressEscape(s)},!1,Lm)},inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",autoHide:"autoHide",fitContent:"fitContent",hideOnEscape:"hideOnEscape",content:[$t.None,"pTooltip","content"],disabled:[$t.None,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Mt]})}return i})(),Pn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var en=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronDownIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var Na=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["SearchIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();function SN(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(),n;d(),z((n=e.label)!==null&&n!==void 0?n:"empty")}}function EN(i,t){i&1&&ie(0)}var od=i=>({height:i}),ON=(i,t,e)=>({"p-dropdown-item":!0,"p-highlight":i,"p-disabled":t,"p-focus":e}),ay=i=>({$implicit:i}),MN=["container"],kN=["filter"],AN=["focusInput"],DN=["editableInput"],PN=["items"],RN=["scroller"],VN=["overlay"],LN=["firstHiddenFocusableEl"],FN=["lastHiddenFocusableEl"];function NN(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(2);d(),z(e.label()==="p-emptylabel"?"\xA0":e.label())}}function BN(i,t){i&1&&ie(0)}function zN(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(3);d(),z(e.label()==="p-emptylabel"?"\xA0":e.placeholder)}}function UN(i,t){if(i&1&&g(0,zN,2,1,"span",4),i&2){let e=m(2);l("ngIf",(e.modelValue()===void 0||e.modelValue===null)&&(e.label()===e.placeholder||e.label()&&!e.placeholder))}}function jN(i,t){if(i&1){let e=G();p(0,"span",10,11),A("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))})("keydown",function(r){S(e);let o=m();return E(o.onKeyDown(r))}),g(2,NN,2,1,"ng-container",12)(3,BN,1,0,"ng-container",13)(4,UN,1,1,"ng-template",null,14,dt),h()}if(i&2){let e=Le(5),n=m();l("ngClass",n.inputClass)("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass)("autofocus",n.autofocus),T("aria-disabled",n.disabled)("id",n.inputId)("aria-label",n.ariaLabel||(n.label()==="p-emptylabel"?void 0:n.label()))("aria-labelledby",n.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",n.overlayVisible)("aria-controls",n.id+"_list")("tabindex",n.disabled?-1:n.tabindex)("aria-activedescendant",n.focused?n.focusedOptionId:void 0)("aria-required",n.required)("required",n.required),d(2),l("ngIf",!n.selectedItemTemplate)("ngIfElse",e),d(),l("ngTemplateOutlet",n.selectedItemTemplate)("ngTemplateOutletContext",H(21,ay,n.selectedOption))}}function HN(i,t){if(i&1){let e=G();p(0,"input",15,16),A("input",function(r){S(e);let o=m();return E(o.onEditableInput(r))})("keydown",function(r){S(e);let o=m();return E(o.onKeyDown(r))})("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))}),h()}if(i&2){let e=m();l("ngClass",e.inputClass)("disabled",e.disabled),T("maxlength",e.maxlength)("placeholder",e.modelValue()===void 0||e.modelValue()===null?e.placeholder:void 0)("aria-expanded",e.overlayVisible)}}function GN(i,t){if(i&1){let e=G();p(0,"TimesIcon",19),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),h()}i&2&&(l("styleClass","p-dropdown-clear-icon"),T("data-pc-section","clearicon"))}function $N(i,t){}function qN(i,t){i&1&&g(0,$N,0,0,"ng-template")}function WN(i,t){if(i&1){let e=G();p(0,"span",20),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),g(1,qN,1,0,null,21),h()}if(i&2){let e=m(2);T("data-pc-section","clearicon"),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function KN(i,t){if(i&1&&(Z(0),g(1,GN,1,2,"TimesIcon",17)(2,WN,2,2,"span",18),X()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function QN(i,t){if(i&1&&y(0,"span",24),i&2){let e=m(2);l("ngClass",e.dropdownIcon)}}function YN(i,t){i&1&&y(0,"ChevronDownIcon",25),i&2&&l("styleClass","p-dropdown-trigger-icon")}function ZN(i,t){if(i&1&&(Z(0),g(1,QN,1,1,"span",22)(2,YN,1,1,"ChevronDownIcon",23),X()),i&2){let e=m();d(),l("ngIf",e.dropdownIcon),d(),l("ngIf",!e.dropdownIcon)}}function XN(i,t){}function JN(i,t){i&1&&g(0,XN,0,0,"ng-template")}function e9(i,t){if(i&1&&(p(0,"span",26),g(1,JN,1,0,null,21),h()),i&2){let e=m();d(),l("ngTemplateOutlet",e.dropdownIconTemplate)}}function t9(i,t){i&1&&ie(0)}function i9(i,t){i&1&&ie(0)}var XS=i=>({options:i});function n9(i,t){if(i&1&&(Z(0),g(1,i9,1,0,"ng-container",13),X()),i&2){let e=m(3);d(),l("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",H(2,XS,e.filterOptions))}}function r9(i,t){i&1&&y(0,"SearchIcon",25),i&2&&l("styleClass","p-dropdown-filter-icon")}function o9(i,t){}function s9(i,t){i&1&&g(0,o9,0,0,"ng-template")}function a9(i,t){if(i&1&&(p(0,"span",41),g(1,s9,1,0,null,21),h()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.filterIconTemplate)}}function l9(i,t){if(i&1){let e=G();p(0,"div",37)(1,"input",38,39),A("input",function(r){S(e);let o=m(3);return E(o.onFilterInputChange(r))})("keydown",function(r){S(e);let o=m(3);return E(o.onFilterKeyDown(r))})("blur",function(r){S(e);let o=m(3);return E(o.onFilterBlur(r))}),h(),g(3,r9,1,1,"SearchIcon",23)(4,a9,2,1,"span",40),h()}if(i&2){let e=m(3);d(),l("value",e._filterValue()||""),T("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),d(2),l("ngIf",!e.filterIconTemplate),d(),l("ngIf",e.filterIconTemplate)}}function c9(i,t){if(i&1&&(p(0,"div",35),A("click",function(n){return n.stopPropagation()}),g(1,n9,2,4,"ng-container",12)(2,l9,5,7,"ng-template",null,36,dt),h()),i&2){let e=Le(3),n=m(2);d(),l("ngIf",n.filterTemplate)("ngIfElse",e)}}function d9(i,t){i&1&&ie(0)}var JS=(i,t)=>({$implicit:i,options:t});function u9(i,t){if(i&1&&g(0,d9,1,0,"ng-container",13),i&2){let e=t.$implicit,n=t.options;m(2);let r=Le(9);l("ngTemplateOutlet",r)("ngTemplateOutletContext",We(2,JS,e,n))}}function p9(i,t){i&1&&ie(0)}function h9(i,t){if(i&1&&g(0,p9,1,0,"ng-container",13),i&2){let e=t.options,n=m(4);l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(2,XS,e))}}function m9(i,t){i&1&&(Z(0),g(1,h9,1,4,"ng-template",44),X())}function f9(i,t){if(i&1){let e=G();p(0,"p-scroller",42,43),A("onLazyLoad",function(r){S(e);let o=m(2);return E(o.onLazyLoad.emit(r))}),g(2,u9,1,5,"ng-template",9)(3,m9,2,0,"ng-container",4),h()}if(i&2){let e=m(2);xt(H(8,od,e.scrollHeight)),l("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),d(3),l("ngIf",e.loaderTemplate)}}function g9(i,t){i&1&&ie(0)}var _9=()=>({});function v9(i,t){if(i&1&&(Z(0),g(1,g9,1,0,"ng-container",13),X()),i&2){m();let e=Le(9),n=m();d(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",We(3,JS,n.visibleOptions(),Ke(2,_9)))}}function y9(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit,n=m(3);d(),z(n.getOptionGroupLabel(e.optionGroup))}}function b9(i,t){i&1&&ie(0)}function C9(i,t){if(i&1&&(Z(0),p(1,"li",49),g(2,y9,2,1,"span",4)(3,b9,1,0,"ng-container",13),h(),X()),i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("ngStyle",H(5,od,o.itemSize+"px")),T("id",s.id+"_"+s.getOptionIndex(n,o)),d(),l("ngIf",!s.groupTemplate),d(),l("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",H(7,ay,r.optionGroup))}}function I9(i,t){if(i&1){let e=G();Z(0),p(1,"p-dropdownItem",50),A("onClick",function(r){S(e);let o=m().$implicit,s=m(3);return E(s.onOptionSelect(r,o))})("onMouseEnter",function(r){S(e);let o=m().index,s=m().options,a=m(2);return E(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))}),h(),X()}if(i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("id",s.id+"_"+s.getOptionIndex(n,o))("option",r)("selected",s.isSelected(r))("label",s.getOptionLabel(r))("disabled",s.isOptionDisabled(r))("template",s.itemTemplate)("focused",s.focusedOptionIndex()===s.getOptionIndex(n,o))("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(n,o)))("ariaSetSize",s.ariaSetSize)}}function w9(i,t){if(i&1&&g(0,C9,4,9,"ng-container",4)(1,I9,2,9,"ng-container",4),i&2){let e=t.$implicit,n=m(3);l("ngIf",n.isOptionGroup(e)),d(),l("ngIf",!n.isOptionGroup(e))}}function T9(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyFilterMessageLabel," ")}}function x9(i,t){i&1&&ie(0,null,52)}function S9(i,t){if(i&1&&(p(0,"li",51),g(1,T9,2,1,"ng-container",12)(2,x9,2,0,"ng-container",21),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,od,e.itemSize+"px")),d(),l("ngIf",!n.emptyFilterTemplate&&!n.emptyTemplate)("ngIfElse",n.emptyFilter),d(),l("ngTemplateOutlet",n.emptyFilterTemplate||n.emptyTemplate)}}function E9(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyMessageLabel," ")}}function O9(i,t){i&1&&ie(0,null,53)}function M9(i,t){if(i&1&&(p(0,"li",51),g(1,E9,2,1,"ng-container",12)(2,O9,2,0,"ng-container",21),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,od,e.itemSize+"px")),d(),l("ngIf",!n.emptyTemplate)("ngIfElse",n.empty),d(),l("ngTemplateOutlet",n.emptyTemplate)}}function k9(i,t){if(i&1&&(p(0,"ul",45,46),g(2,w9,2,2,"ng-template",47)(3,S9,3,6,"li",48)(4,M9,3,6,"li",48),h()),i&2){let e=t.$implicit,n=t.options,r=m(2);xt(n.contentStyle),l("ngClass",n.contentStyleClass),T("id",r.id+"_list"),d(2),l("ngForOf",e),d(),l("ngIf",r.filterValue&&r.isEmpty()),d(),l("ngIf",!r.filterValue&&r.isEmpty())}}function A9(i,t){i&1&&ie(0)}function D9(i,t){if(i&1){let e=G();p(0,"div",27)(1,"span",28,29),A("focus",function(r){S(e);let o=m();return E(o.onFirstHiddenFocus(r))}),h(),g(3,t9,1,0,"ng-container",21)(4,c9,4,2,"div",30),p(5,"div",31),g(6,f9,4,10,"p-scroller",32)(7,v9,2,6,"ng-container",4)(8,k9,5,7,"ng-template",null,33,dt),h(),g(10,A9,1,0,"ng-container",21),p(11,"span",28,34),A("focus",function(r){S(e);let o=m();return E(o.onLastHiddenFocus(r))}),h()()}if(i&2){let e=m();U(e.panelStyleClass),l("ngClass","p-dropdown-panel p-component")("ngStyle",e.panelStyle),d(),T("aria-hidden",!0)("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),d(2),l("ngTemplateOutlet",e.headerTemplate),d(),l("ngIf",e.filter),d(),ki("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),d(),l("ngIf",e.virtualScroll),d(),l("ngIf",!e.virtualScroll),d(3),l("ngTemplateOutlet",e.footerTemplate),d(),T("aria-hidden",!0)("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var P9={provide:zt,useExisting:Tt(()=>Wn),multi:!0},R9=(()=>{class i{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;onClick=new L;onMouseEnter=new L;ngOnInit(){}onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{id:"id",option:"option",selected:"selected",focused:"focused",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template"},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},decls:3,vars:21,consts:[["role","option","pRipple","",3,"id","ngStyle","ngClass","click","mouseenter"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(p(0,"li",0),A("click",function(s){return r.onOptionClick(s)})("mouseenter",function(s){return r.onOptionMouseEnter(s)}),g(1,SN,2,1,"span",1)(2,EN,1,0,"ng-container",2),h()),n&2&&(l("id",r.id)("ngStyle",H(13,od,r.itemSize+"px"))("ngClass",kt(15,ON,r.selected,r.disabled,r.focused)),T("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled),d(),l("ngIf",!r.template),d(),l("ngTemplateOutlet",r.template)("ngTemplateOutletContext",H(19,ay,r.option)))},dependencies:[xe,Ie,rt,Ce,ui],encapsulation:2})}return i})(),Wn=(()=>{class i{el;renderer;cd;zone;filterService;config;id;scrollHeight="200px";filter;name;style;panelStyle;styleClass;panelStyleClass;readonly;required;editable;appendTo;tabindex=0;placeholder;filterPlaceholder;filterLocale;inputId;dataKey;filterBy;filterFields;autofocus;resetFilterOnHide=!1;dropdownIcon;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";autoDisplayFirst=!0;group;showClear;emptyFilterMessage="";emptyMessage="";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;ariaLabel;ariaLabelledBy;filterMatchMode="contains";maxlength;tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;focusOnHover=!1;selectOnFocus=!1;autoOptionFocus=!0;autofocusFilter=!0;get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}_itemSize;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_autoZIndex;get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_baseZIndex;get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_showTransitionOptions;get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_hideTransitionOptions;get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get options(){return this._options()}set options(e){re.deepEquals(e,this._options())||this._options.set(e)}onChange=new L;onFilter=new L;onFocus=new L;onBlur=new L;onClick=new L;onShow=new L;onHide=new L;onClear=new L;onLazyLoad=new L;containerViewChild;filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;templates;_disabled;itemsWrapper;itemTemplate;groupTemplate;loaderTemplate;selectedItemTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;dropdownIconTemplate;clearIconTemplate;filterIconTemplate;filterOptions;_options=st(null);modelValue=st(null);value;onModelChange=()=>{};onModelTouched=()=>{};hover;focused;overlayVisible;optionsChanged;panel;dimensionsUpdated;hoveredItem;selectedOptionUpdated;_filterValue=st(null);searchValue;searchIndex;searchTimeout;previousSearchChar;currentSearchChar;preventModelTouched;focusedOptionIndex=st(-1);labelId;listId;get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Jt.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Jt.EMPTY_FILTER_MESSAGE)}get filled(){return typeof this.modelValue()=="string"?!!this.modelValue():this.modelValue()||this.modelValue()!=null||this.modelValue()!=null}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.disabled}get containerClass(){return{"p-dropdown p-component p-inputwrapper":!0,"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue()!==void 0&&this.modelValue()!==null&&!this.modelValue().length,"p-inputwrapper-focus":this.focused||this.overlayVisible}}get inputClass(){let e=this.label();return{"p-dropdown-label p-inputtext":!0,"p-placeholder":this.placeholder&&e===this.placeholder,"p-dropdown-label-empty":!this.editable&&!this.selectedItemTemplate&&(!e||e==="p-emptylabel"||e.length===0)}}get panelClass(){return{"p-dropdown-panel p-component":!0,"p-input-filled":this.config.inputStyle==="filled","p-ripple-disabled":this.config.ripple===!1}}visibleOptions=yi(()=>{let e=this.group?this.flatOptions(this.options):this.options||[];if(this._filterValue()){let r=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(o=>o.toLowerCase().indexOf(this._filterValue().toLowerCase())!==-1):this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale);if(this.group){let o=this.options||[],s=[];return o.forEach(a=>{let u=this.getOptionGroupChildren(a).filter(f=>r.includes(f));u.length>0&&s.push(pe(F({},a),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...u]}))}),this.flatOptions(s)}return r}return e});label=yi(()=>{let e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions()[e]):this.placeholder||"p-emptylabel"});selectedOption;editableInputValue=yi(()=>this.getOptionLabel(this.selectedOption)||this.modelValue()||"");constructor(e,n,r,o,s,a){this.el=e,this.renderer=n,this.cd=r,this.zone=o,this.filterService=s,this.config=a,Ki(()=>{let c=this.modelValue(),u=this.visibleOptions();u&&re.isNotEmpty(u)&&(this.selectedOption=u[this.findSelectedOptionIndex()],this.cd.markForCheck()),c!==void 0&&this.editable&&this.updateEditableLabel()})}ngOnInit(){this.id=this.id||Me(),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=x.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-highlight");e&&x.scrollInView(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"filtericon":this.filterIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}flatOptions(e){return(e||[]).reduce((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>n.push(a)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)),this.autoDisplayFirst&&!this.modelValue()){let e=this.findFirstOptionIndex();this.onOptionSelect(null,this.visibleOptions()[e],!1,!0)}}onOptionSelect(e,n,r=!0,o=!1){let s=this.getOptionValue(n);this.updateModel(s,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),r&&setTimeout(()=>this.hide(!0),1),o===!1&&this.onChange.emit({originalEvent:e,value:s})}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e),this.selectedOptionUpdated=!0}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),this.modelValue.set(this.value),this.updateEditableLabel(),this.cd.markForCheck()}allowModelChange(){return this.autoDisplayFirst&&!this.placeholder&&!this.modelValue()&&!this.editable&&this.options&&this.options.length}isSelected(e){return this.isValidOption(e)&&re.equals(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?re.resolveFieldData(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?re.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isOptionDisabled(e){return this.optionDisabled?re.resolveFieldData(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?re.resolveFieldData(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?re.resolveFieldData(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onContainerClick(e){this.disabled||this.readonly||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(e),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(e){let n=e.target.value;this.searchValue="",!this.searchOptions(e,n)&&this.focusedOptionIndex.set(-1),this.onModelChange(n),this.updateModel(n,e),this.onChange.emit({originalEvent:e,value:n}),!this.overlayVisible&&re.isNotEmpty(n)&&this.show()}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),e&&x.focus(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=x.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=x.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&x.focus(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&x.focus(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.disabled)return;this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.overlayVisible===!1&&this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onKeyDown(e,n){if(!(this.disabled||this.readonly))switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,n);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!e.metaKey&&re.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault()}changeFocusedOptionIndex(e,n){if(this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),this.selectOnFocus)){let r=this.visibleOptions()[n];this.onOptionSelect(e,r,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=x.findSingle(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}findLastOptionIndex(){return re.findLastIndex(this.visibleOptions(),e=>this.isValidOption(e))}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}isValidOption(e){return e!=null&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionGroup(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&e.optionGroup!==void 0&&e.optionGroup!==null&&e.group}onArrowUpKey(e,n=!1){if(e.altKey&&!n){if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}this.overlayVisible&&this.hide(),e.preventDefault()}else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,r),!this.overlayVisible&&this.show(),e.preventDefault()}}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,n=!1){if(n){let r=e.currentTarget;e.shiftKey?r.setSelectionRange(0,r.value.length):(r.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,n=!1){if(n){let r=e.currentTarget;if(e.shiftKey)r.setSelectionRange(0,r.value.length);else{let o=r.value.length;r.setSelectionRange(o,o),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onSpaceKey(e,n=!1){!this.editable&&!n&&this.onEnterKey(e)}onEnterKey(e){if(!this.overlayVisible)this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let n=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,n)}this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e,n=!1){if(!n)if(this.overlayVisible&&this.hasFocusableElements())x.focus(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}this.overlayVisible&&this.hide(this.filter)}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getFirstFocusableElement(this.overlayViewChild.el.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild.nativeElement;x.focus(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;x.focus(n)}hasFocusableElements(){return x.getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,n=!1){n&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}onFilterInputChange(e){let n=e.target.value?.trim();this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),this.cd.markForCheck()}applyFocus(){this.editable?x.findSingle(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():x.focus(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(e){this.updateModel(null,e),this.clearEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}),this.onClear.emit(e),this.resetFilter()}static \u0275fac=function(n){return new(n||i)(w(ve),w(nt),w(Ne),w(ge),w(Lu),w(At))};static \u0275cmp=k({type:i,selectors:[["p-dropdown"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(MN,5),oe(kN,5),oe(AN,5),oe(DN,5),oe(PN,5),oe(RN,5),oe(VN,5),oe(LN,5),oe(FN,5)),n&2){let o;q(o=W())&&(r.containerViewChild=o.first),q(o=W())&&(r.filterViewChild=o.first),q(o=W())&&(r.focusInputViewChild=o.first),q(o=W())&&(r.editableInputViewChild=o.first),q(o=W())&&(r.itemsViewChild=o.first),q(o=W())&&(r.scroller=o.first),q(o=W())&&(r.overlayViewChild=o.first),q(o=W())&&(r.firstHiddenFocusableElementOnOverlay=o.first),q(o=W())&&(r.lastHiddenFocusableElementOnOverlay=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focused||r.overlayVisible)},inputs:{id:"id",scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:"focusOnHover",selectOnFocus:"selectOnFocus",autoOptionFocus:"autoOptionFocus",autofocusFilter:"autofocusFilter",disabled:"disabled",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",filterValue:"filterValue",options:"options"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear",onLazyLoad:"onLazyLoad"},features:[mt([P9])],decls:11,vars:20,consts:[[3,"ngClass","ngStyle","click"],["container",""],["role","combobox","pAutoFocus","",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","autofocus","focus","blur","keydown",4,"ngIf"],["type","text","aria-haspopup","listbox",3,"ngClass","disabled","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-dropdown-trigger"],["class","p-dropdown-trigger-icon",4,"ngIf"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],["pTemplate","content"],["role","combobox","pAutoFocus","",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","autofocus","focus","blur","keydown"],["focusInput",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["defaultPlaceholder",""],["type","text","aria-haspopup","listbox",3,"ngClass","disabled","input","keydown","focus","blur"],["editableInput",""],[3,"styleClass","click",4,"ngIf"],["class","p-dropdown-clear-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-dropdown-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["class","p-dropdown-trigger-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-dropdown-trigger-icon",3,"ngClass"],[3,"styleClass"],[1,"p-dropdown-trigger-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["firstHiddenFocusableEl",""],["class","p-dropdown-header",3,"click",4,"ngIf"],[1,"p-dropdown-items-wrapper"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["lastHiddenFocusableEl",""],[1,"p-dropdown-header",3,"click"],["builtInFilterElement",""],[1,"p-dropdown-filter-container"],["type","text","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"value","input","keydown","blur"],["filter",""],["class","p-dropdown-filter-icon",4,"ngIf"],[1,"p-dropdown-filter-icon"],[3,"items","itemSize","autoSize","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","loader"],["role","listbox",1,"p-dropdown-items",3,"ngClass"],["items",""],["ngFor","",3,"ngForOf"],["class","p-dropdown-empty-message",3,"ngStyle",4,"ngIf"],["role","option",1,"p-dropdown-item-group",3,"ngStyle"],[3,"id","option","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize","onClick","onMouseEnter"],[1,"p-dropdown-empty-message",3,"ngStyle"],["emptyFilter",""],["empty",""]],template:function(n,r){n&1&&(p(0,"div",0,1),A("click",function(s){return r.onContainerClick(s)}),g(2,jN,6,23,"span",2)(3,HN,2,5,"input",3)(4,KN,3,2,"ng-container",4),p(5,"div",5),g(6,ZN,3,2,"ng-container",4)(7,e9,2,1,"span",6),h(),p(8,"p-overlay",7,8),A("visibleChange",function(s){return r.overlayVisible=s})("onAnimationStart",function(s){return r.onOverlayAnimationStart(s)})("onHide",function(){return r.hide()}),g(10,D9,13,19,"ng-template",9),h()()),n&2&&(U(r.styleClass),l("ngClass",r.containerClass)("ngStyle",r.style),T("id",r.id),d(2),l("ngIf",!r.editable),d(),l("ngIf",r.editable),d(),l("ngIf",r.isVisibleClearIcon),d(),T("aria-expanded",r.overlayVisible)("data-pc-section","trigger"),d(),l("ngIf",!r.dropdownIconTemplate),d(),l("ngIf",r.dropdownIconTemplate),d(),l("visible",r.overlayVisible)("options",r.overlayOptions)("target","@parent")("appendTo",r.appendTo)("autoZIndex",r.autoZIndex)("baseZIndex",r.baseZIndex)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions))},dependencies:()=>[xe,Vt,Ie,rt,Ce,As,he,Ro,Fa,Bh,pt,en,Na,R9],styles:[`@layer primeng{.p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;opacity:0}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-item-group{cursor:auto}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}} +)`}copy(t,e){let n=new i;return n.comparator=this.comparator,n.keyedMap=t,n.sortedSet=e,n}};var Yp=class{constructor(){this.L_=new ai(Be.comparator)}track(t){let e=t.doc.key,n=this.L_.get(e);n?t.type!==0&&n.type===3?this.L_=this.L_.insert(e,t):t.type===3&&n.type!==1?this.L_=this.L_.insert(e,{type:n.type,doc:t.doc}):t.type===2&&n.type===2?this.L_=this.L_.insert(e,{type:2,doc:t.doc}):t.type===2&&n.type===0?this.L_=this.L_.insert(e,{type:0,doc:t.doc}):t.type===1&&n.type===0?this.L_=this.L_.remove(e):t.type===1&&n.type===2?this.L_=this.L_.insert(e,{type:1,doc:n.doc}):t.type===0&&n.type===1?this.L_=this.L_.insert(e,{type:2,doc:t.doc}):je():this.L_=this.L_.insert(e,t)}k_(){let t=[];return this.L_.inorderTraversal((e,n)=>{t.push(n)}),t}},Ma=class i{constructor(t,e,n,r,o,s,a,c,u){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=o,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=c,this.hasCachedResults=u}static fromInitialDocuments(t,e,n,r,o){let s=[];return e.forEach(a=>{s.push({type:0,doc:a})}),new i(t,e,Qp.emptySet(e),s,n,r,!0,!1,o)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&ah(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;let e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(let r=0;rax(t),ah),this.onlineState="Unknown",this.K_=new Set}};function sV(i,t){return D(this,null,function*(){let e=Ze(i),n=t.query,r=!1,o=e.queries.get(n);if(o||(r=!0,o=new A_),r)try{o.q_=yield e.onListen(n)}catch(s){let a=uv(s,`Initialization of query '${ha(t.query)}' failed`);return void t.onError(a)}e.queries.set(n,o),o.Q_.push(t),t.U_(e.onlineState),o.q_&&t.W_(o.q_)&&pv(e)})}function aV(i,t){return D(this,null,function*(){let e=Ze(i),n=t.query,r=!1,o=e.queries.get(n);if(o){let s=o.Q_.indexOf(t);s>=0&&(o.Q_.splice(s,1),r=o.Q_.length===0)}if(r)return e.queries.delete(n),e.onUnlisten(n)})}function lV(i,t){let e=Ze(i),n=!1;for(let r of t){let o=r.query,s=e.queries.get(o);if(s){for(let a of s.Q_)a.W_(r)&&(n=!0);s.q_=r}}n&&pv(e)}function cV(i,t,e){let n=Ze(i),r=n.queries.get(t);if(r)for(let o of r.Q_)o.onError(e);n.queries.delete(t)}function pv(i){i.K_.forEach(t=>{t.next()})}var P_=class{constructor(t,e,n){this.query=t,this.G_=e,this.z_=!1,this.j_=null,this.onlineState="Unknown",this.options=n||{}}W_(t){if(!this.options.includeMetadataChanges){let n=[];for(let r of t.docChanges)r.type!==3&&n.push(r);t=new Ma(t.query,t.docs,t.oldDocs,n,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let e=!1;return this.z_?this.H_(t)&&(this.G_.next(t),e=!0):this.J_(t,this.onlineState)&&(this.Y_(t),e=!0),this.j_=t,e}onError(t){this.G_.error(t)}U_(t){this.onlineState=t;let e=!1;return this.j_&&!this.z_&&this.J_(this.j_,t)&&(this.Y_(this.j_),e=!0),e}J_(t,e){if(!t.fromCache)return!0;let n=e!=="Offline";return(!this.options.Z_||!n)&&(!t.docs.isEmpty()||t.hasCachedResults||e==="Offline")}H_(t){if(t.docChanges.length>0)return!0;let e=this.j_&&this.j_.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&this.options.includeMetadataChanges===!0}Y_(t){t=Ma.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.z_=!0,this.G_.next(t)}};var Zp=class{constructor(t){this.key=t}},Xp=class{constructor(t){this.key=t}},R_=class{constructor(t,e){this.query=t,this.oa=e,this._a=null,this.hasCachedResults=!1,this.current=!1,this.aa=lt(),this.mutatedKeys=lt(),this.ua=lx(t),this.ca=new Qp(this.ua)}get la(){return this.oa}ha(t,e){let n=e?e.Pa:new Yp,r=e?e.ca:this.ca,o=e?e.mutatedKeys:this.mutatedKeys,s=r,a=!1,c=this.query.limitType==="F"&&r.size===this.query.limit?r.last():null,u=this.query.limitType==="L"&&r.size===this.query.limit?r.first():null;if(t.inorderTraversal((f,v)=>{let b=r.get(f),O=lh(this.query,v)?v:null,V=!!b&&this.mutatedKeys.has(b.key),K=!!O&&(O.hasLocalMutations||this.mutatedKeys.has(O.key)&&O.hasCommittedMutations),P=!1;b&&O?b.data.isEqual(O.data)?V!==K&&(n.track({type:3,doc:O}),P=!0):this.Ia(b,O)||(n.track({type:2,doc:O}),P=!0,(c&&this.ua(O,c)>0||u&&this.ua(O,u)<0)&&(a=!0)):!b&&O?(n.track({type:0,doc:O}),P=!0):b&&!O&&(n.track({type:1,doc:b}),P=!0,(c||u)&&(a=!0)),P&&(O?(s=s.add(O),o=K?o.add(f):o.delete(f)):(s=s.delete(f),o=o.delete(f)))}),this.query.limit!==null)for(;s.size>this.query.limit;){let f=this.query.limitType==="F"?s.last():s.first();s=s.delete(f.key),o=o.delete(f.key),n.track({type:1,doc:f})}return{ca:s,Pa:n,Xi:a,mutatedKeys:o}}Ia(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(t,e,n,r){let o=this.ca;this.ca=t.ca,this.mutatedKeys=t.mutatedKeys;let s=t.Pa.k_();s.sort((f,v)=>function(O,V){let K=P=>{switch(P){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return je()}};return K(O)-K(V)}(f.type,v.type)||this.ua(f.doc,v.doc)),this.Ta(n),r=r!=null&&r;let a=e&&!r?this.Ea():[],c=this.aa.size===0&&this.current&&!r?1:0,u=c!==this._a;return this._a=c,s.length!==0||u?{snapshot:new Ma(this.query,t.ca,o,s,t.mutatedKeys,c===0,u,!1,!!n&&n.resumeToken.approximateByteSize()>0),da:a}:{da:a}}U_(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({ca:this.ca,Pa:new Yp,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{da:[]}}Aa(t){return!this.oa.has(t)&&!!this.ca.has(t)&&!this.ca.get(t).hasLocalMutations}Ta(t){t&&(t.addedDocuments.forEach(e=>this.oa=this.oa.add(e)),t.modifiedDocuments.forEach(e=>{}),t.removedDocuments.forEach(e=>this.oa=this.oa.delete(e)),this.current=t.current)}Ea(){if(!this.current)return[];let t=this.aa;this.aa=lt(),this.ca.forEach(n=>{this.Aa(n.key)&&(this.aa=this.aa.add(n.key))});let e=[];return t.forEach(n=>{this.aa.has(n)||e.push(new Xp(n))}),this.aa.forEach(n=>{t.has(n)||e.push(new Zp(n))}),e}Ra(t){this.oa=t.hs,this.aa=lt();let e=this.ha(t.documents);return this.applyChanges(e,!0)}Va(){return Ma.fromInitialDocuments(this.query,this.ca,this.mutatedKeys,this._a===0,this.hasCachedResults)}},V_=class{constructor(t,e,n){this.query=t,this.targetId=e,this.view=n}},L_=class{constructor(t){this.key=t,this.ma=!1}},F_=class{constructor(t,e,n,r,o,s){this.localStore=t,this.remoteStore=e,this.eventManager=n,this.sharedClientState=r,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.fa={},this.ga=new Eo(a=>ax(a),ah),this.pa=new Map,this.ya=new Set,this.wa=new ai(Be.comparator),this.Sa=new Map,this.ba=new Hc,this.Da={},this.Ca=new Map,this.va=jc.Bn(),this.onlineState="Unknown",this.Fa=void 0}get isPrimaryClient(){return this.Fa===!0}};function dV(i,t){return D(this,null,function*(){let e=bV(i),n,r,o=e.ga.get(t);if(o)n=o.targetId,e.sharedClientState.addLocalQueryTarget(n),r=o.view.Va();else{let s=yield W5(e.localStore,_r(t)),a=e.sharedClientState.addLocalQueryTarget(s.targetId);n=s.targetId,r=yield uV(e,t,n,a==="current",s.resumeToken),e.isPrimaryClient&&kx(e.remoteStore,s)}return r})}function uV(i,t,e,n,r){return D(this,null,function*(){i.Ma=(v,b,O)=>function(K,P,j,ce){return D(this,null,function*(){let _e=P.view.ha(j);_e.Xi&&(_e=yield $T(K.localStore,P.query,!1).then(({documents:Et})=>P.view.ha(Et,_e)));let me=ce&&ce.targetChanges.get(P.targetId),$e=ce&&ce.targetMismatches.get(P.targetId)!=null,He=P.view.applyChanges(_e,K.isPrimaryClient,me,$e);return KT(K,P.targetId,He.da),He.snapshot})}(i,v,b,O);let o=yield $T(i.localStore,t,!0),s=new R_(t,o.hs),a=s.ha(o.documents),c=zc.createSynthesizedTargetChangeForCurrentChange(e,n&&i.onlineState!=="Offline",r),u=s.applyChanges(a,i.isPrimaryClient,c);KT(i,e,u.da);let f=new V_(t,e,s);return i.ga.set(t,f),i.pa.has(e)?i.pa.get(e).push(t):i.pa.set(e,[t]),u.snapshot})}function pV(i,t){return D(this,null,function*(){let e=Ze(i),n=e.ga.get(t),r=e.pa.get(n.targetId);if(r.length>1)return e.pa.set(n.targetId,r.filter(o=>!ah(o,t))),void e.ga.delete(t);e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(n.targetId),e.sharedClientState.isActiveQueryTarget(n.targetId)||(yield b_(e.localStore,n.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(n.targetId),Ax(e.remoteStore,n.targetId),N_(e,n.targetId)}).catch(Qc))):(N_(e,n.targetId),yield b_(e.localStore,n.targetId,!0))})}function hV(i,t,e){return D(this,null,function*(){let n=CV(i);try{let r=yield function(s,a){let c=Ze(s),u=Ri.now(),f=a.reduce((O,V)=>O.add(V.key),lt()),v,b;return c.persistence.runTransaction("Locally write mutations","readwrite",O=>{let V=Br(),K=lt();return c.os.getEntries(O,f).next(P=>{V=P,V.forEach((j,ce)=>{ce.isValidDocument()||(K=K.add(j))})}).next(()=>c.localDocuments.getOverlayedDocuments(O,V)).next(P=>{v=P;let j=[];for(let ce of a){let _e=C5(ce,v.get(ce.key).overlayedDocument);_e!=null&&j.push(new Ir(ce.key,_e,tx(_e.value.mapValue),To.exists(!0)))}return c.mutationQueue.addMutationBatch(O,u,j,a)}).next(P=>{b=P;let j=P.applyToLocalDocumentSet(v,K);return c.documentOverlayCache.saveOverlays(O,P.batchId,j)})}).then(()=>({batchId:b.batchId,changes:dx(v)}))}(n.localStore,t);n.sharedClientState.addPendingMutation(r.batchId),function(s,a,c){let u=s.Da[s.currentUser.toKey()];u||(u=new ai(St)),u=u.insert(a,c),s.Da[s.currentUser.toKey()]=u}(n,r.batchId,e),yield Xc(n,r.changes),yield uh(n.remoteStore)}catch(r){let o=uv(r,"Failed to persist write");e.reject(o)}})}function Fx(i,t){return D(this,null,function*(){let e=Ze(i);try{let n=yield G5(e.localStore,t);t.targetChanges.forEach((r,o)=>{let s=e.Sa.get(o);s&&(Nt(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?s.ma=!0:r.modifiedDocuments.size>0?Nt(s.ma):r.removedDocuments.size>0&&(Nt(s.ma),s.ma=!1))}),yield Xc(e,n,t)}catch(n){yield Qc(n)}})}function WT(i,t,e){let n=Ze(i);if(n.isPrimaryClient&&e===0||!n.isPrimaryClient&&e===1){let r=[];n.ga.forEach((o,s)=>{let a=s.view.U_(t);a.snapshot&&r.push(a.snapshot)}),function(s,a){let c=Ze(s);c.onlineState=a;let u=!1;c.queries.forEach((f,v)=>{for(let b of v.Q_)b.U_(a)&&(u=!0)}),u&&pv(c)}(n.eventManager,t),r.length&&n.fa.u_(r),n.onlineState=t,n.isPrimaryClient&&n.sharedClientState.setOnlineState(t)}}function mV(i,t,e){return D(this,null,function*(){let n=Ze(i);n.sharedClientState.updateQueryState(t,"rejected",e);let r=n.Sa.get(t),o=r&&r.key;if(o){let s=new ai(Be.comparator);s=s.insert(o,Gn.newNoDocument(o,Ye.min()));let a=lt().add(o),c=new Np(Ye.min(),new Map,new ai(St),s,a);yield Fx(n,c),n.wa=n.wa.remove(o),n.Sa.delete(t),hv(n)}else yield b_(n.localStore,t,!1).then(()=>N_(n,t,e)).catch(Qc)})}function fV(i,t){return D(this,null,function*(){let e=Ze(i),n=t.batch.batchId;try{let r=yield H5(e.localStore,t);Bx(e,n,null),Nx(e,n),e.sharedClientState.updateMutationState(n,"acknowledged"),yield Xc(e,r)}catch(r){yield Qc(r)}})}function gV(i,t,e){return D(this,null,function*(){let n=Ze(i);try{let r=yield function(s,a){let c=Ze(s);return c.persistence.runTransaction("Reject batch","readwrite-primary",u=>{let f;return c.mutationQueue.lookupMutationBatch(u,a).next(v=>(Nt(v!==null),f=v.keys(),c.mutationQueue.removeMutationBatch(u,v))).next(()=>c.mutationQueue.performConsistencyCheck(u)).next(()=>c.documentOverlayCache.removeOverlaysForBatchId(u,f,a)).next(()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(u,f)).next(()=>c.localDocuments.getDocuments(u,f))})}(n.localStore,t);Bx(n,t,e),Nx(n,t),n.sharedClientState.updateMutationState(t,"rejected",e),yield Xc(n,r)}catch(r){yield Qc(r)}})}function Nx(i,t){(i.Ca.get(t)||[]).forEach(e=>{e.resolve()}),i.Ca.delete(t)}function Bx(i,t,e){let n=Ze(i),r=n.Da[n.currentUser.toKey()];if(r){let o=r.get(t);o&&(e?o.reject(e):o.resolve(),r=r.remove(t)),n.Da[n.currentUser.toKey()]=r}}function N_(i,t,e=null){i.sharedClientState.removeLocalQueryTarget(t);for(let n of i.pa.get(t))i.ga.delete(n),e&&i.fa.xa(n,e);i.pa.delete(t),i.isPrimaryClient&&i.ba.Vr(t).forEach(n=>{i.ba.containsKey(n)||zx(i,n)})}function zx(i,t){i.ya.delete(t.path.canonicalString());let e=i.wa.get(t);e!==null&&(Ax(i.remoteStore,e),i.wa=i.wa.remove(t),i.Sa.delete(e),hv(i))}function KT(i,t,e){for(let n of e)n instanceof Zp?(i.ba.addReference(n.key,t),_V(i,n)):n instanceof Xp?(ue("SyncEngine","Document no longer in limbo: "+n.key),i.ba.removeReference(n.key,t),i.ba.containsKey(n.key)||zx(i,n.key)):je()}function _V(i,t){let e=t.key,n=e.path.canonicalString();i.wa.get(e)||i.ya.has(n)||(ue("SyncEngine","New document in limbo: "+e),i.ya.add(n),hv(i))}function hv(i){for(;i.ya.size>0&&i.wa.size{s.push(n.Ma(c,t,e).then(u=>{if((u||e)&&n.isPrimaryClient&&n.sharedClientState.updateQueryState(c.targetId,u?.fromCache?"not-current":"current"),u){r.push(u);let f=g_.Ki(c.targetId,u);o.push(f)}}))}),yield Promise.all(s),n.fa.u_(r),yield function(c,u){return D(this,null,function*(){let f=Ze(c);try{yield f.persistence.runTransaction("notifyLocalViewChanges","readwrite",v=>ne.forEach(u,b=>ne.forEach(b.qi,O=>f.persistence.referenceDelegate.addReference(v,b.targetId,O)).next(()=>ne.forEach(b.Qi,O=>f.persistence.referenceDelegate.removeReference(v,b.targetId,O)))))}catch(v){if(!Yc(v))throw v;ue("LocalStore","Failed to update sequence numbers: "+v)}for(let v of u){let b=v.targetId;if(!v.fromCache){let O=f.ns.get(b),V=O.snapshotVersion,K=O.withLastLimboFreeSnapshotVersion(V);f.ns=f.ns.insert(b,K)}}})}(n.localStore,o))})}function vV(i,t){return D(this,null,function*(){let e=Ze(i);if(!e.currentUser.isEqual(t)){ue("SyncEngine","User change. New user:",t.toKey());let n=yield Ox(e.localStore,t);e.currentUser=t,function(o,s){o.Ca.forEach(a=>{a.forEach(c=>{c.reject(new Ee(te.CANCELLED,s))})}),o.Ca.clear()}(e,"'waitForPendingWrites' promise is rejected due to a user change."),e.sharedClientState.handleUserChange(t,n.removedBatchIds,n.addedBatchIds),yield Xc(e,n.us)}})}function yV(i,t){let e=Ze(i),n=e.Sa.get(t);if(n&&n.ma)return lt().add(n.key);{let r=lt(),o=e.pa.get(t);if(!o)return r;for(let s of o){let a=e.ga.get(s);r=r.unionWith(a.view.la)}return r}}function bV(i){let t=Ze(i);return t.remoteStore.remoteSyncer.applyRemoteEvent=Fx.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=yV.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=mV.bind(null,t),t.fa.u_=lV.bind(null,t.eventManager),t.fa.xa=cV.bind(null,t.eventManager),t}function CV(i){let t=Ze(i);return t.remoteStore.remoteSyncer.applySuccessfulWrite=fV.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=gV.bind(null,t),t}var Jp=class{constructor(){this.synchronizeTabs=!1}initialize(t){return D(this,null,function*(){this.serializer=ch(t.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(t),this.persistence=this.createPersistence(t),yield this.persistence.start(),this.localStore=this.createLocalStore(t),this.gcScheduler=this.createGarbageCollectionScheduler(t,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(t,this.localStore)})}createGarbageCollectionScheduler(t,e){return null}createIndexBackfillerScheduler(t,e){return null}createLocalStore(t){return j5(this.persistence,new v_,t.initialUser,this.serializer)}createPersistence(t){return new h_(f_.Hr,this.serializer)}createSharedClientState(t){return new C_}terminate(){return D(this,null,function*(){var t,e;(t=this.gcScheduler)===null||t===void 0||t.stop(),(e=this.indexBackfillerScheduler)===null||e===void 0||e.stop(),this.sharedClientState.shutdown(),yield this.persistence.shutdown()})}};var B_=class{initialize(t,e){return D(this,null,function*(){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(e),this.remoteStore=this.createRemoteStore(e),this.eventManager=this.createEventManager(e),this.syncEngine=this.createSyncEngine(e,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=n=>WT(this.syncEngine,n,1),this.remoteStore.remoteSyncer.handleCredentialChange=vV.bind(null,this.syncEngine),yield oV(this.remoteStore,this.syncEngine.isPrimaryClient))})}createEventManager(t){return function(){return new D_}()}createDatastore(t){let e=ch(t.databaseInfo.databaseId),n=function(o){return new T_(o)}(t.databaseInfo);return function(o,s,a,c){return new E_(o,s,a,c)}(t.authCredentials,t.appCheckCredentials,n,e)}createRemoteStore(t){return function(n,r,o,s,a){return new M_(n,r,o,s,a)}(this.localStore,this.datastore,t.asyncQueue,e=>WT(this.syncEngine,e,0),function(){return $p.D()?new $p:new I_}())}createSyncEngine(t,e){return function(r,o,s,a,c,u,f){let v=new F_(r,o,s,a,c,u);return f&&(v.Fa=!0),v}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,e)}terminate(){return D(this,null,function*(){var t;yield function(n){return D(this,null,function*(){let r=Ze(n);ue("RemoteStore","RemoteStore shutting down."),r.v_.add(5),yield Zc(r),r.M_.shutdown(),r.x_.set("Unknown")})}(this.remoteStore),(t=this.datastore)===null||t===void 0||t.terminate()})}};var z_=class{constructor(t){this.observer=t,this.muted=!1}next(t){this.observer.next&&this.Ba(this.observer.next,t)}error(t){this.observer.error?this.Ba(this.observer.error,t):yr("Uncaught Error in snapshot listener:",t.toString())}La(){this.muted=!0}Ba(t,e){this.muted||setTimeout(()=>{this.muted||t(e)},0)}};var U_=class{constructor(t,e,n,r){this.authCredentials=t,this.appCheckCredentials=e,this.asyncQueue=n,this.databaseInfo=r,this.user=Si.UNAUTHENTICATED,this.clientId=kp.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,o=>D(this,null,function*(){ue("FirestoreClient","Received user=",o.uid),yield this.authCredentialListener(o),this.user=o})),this.appCheckCredentials.start(n,o=>(ue("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Ee(te.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let t=new Hn;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(()=>D(this,null,function*(){try{this._onlineComponents&&(yield this._onlineComponents.terminate()),this._offlineComponents&&(yield this._offlineComponents.terminate()),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),t.resolve()}catch(e){let n=uv(e,"Failed to shutdown persistence");t.reject(n)}})),t.promise}};function f0(i,t){return D(this,null,function*(){i.asyncQueue.verifyOperationInProgress(),ue("FirestoreClient","Initializing OfflineComponentProvider");let e=i.configuration;yield t.initialize(e);let n=e.initialUser;i.setCredentialChangeListener(r=>D(this,null,function*(){n.isEqual(r)||(yield Ox(t.localStore,r),n=r)})),t.persistence.setDatabaseDeletedListener(()=>i.terminate()),i._offlineComponents=t})}function QT(i,t){return D(this,null,function*(){i.asyncQueue.verifyOperationInProgress();let e=yield wV(i);ue("FirestoreClient","Initializing OnlineComponentProvider"),yield t.initialize(e,i.configuration),i.setCredentialChangeListener(n=>qT(t.remoteStore,n)),i.setAppCheckTokenChangeListener((n,r)=>qT(t.remoteStore,r)),i._onlineComponents=t})}function IV(i){return i.name==="FirebaseError"?i.code===te.FAILED_PRECONDITION||i.code===te.UNIMPLEMENTED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}function wV(i){return D(this,null,function*(){if(!i._offlineComponents)if(i._uninitializedComponentsProvider){ue("FirestoreClient","Using user provided OfflineComponentProvider");try{yield f0(i,i._uninitializedComponentsProvider._offline)}catch(t){let e=t;if(!IV(e))throw e;va("Error using user provided cache. Falling back to memory cache: "+e),yield f0(i,new Jp)}}else ue("FirestoreClient","Using default OfflineComponentProvider"),yield f0(i,new Jp);return i._offlineComponents})}function Ux(i){return D(this,null,function*(){return i._onlineComponents||(i._uninitializedComponentsProvider?(ue("FirestoreClient","Using user provided OnlineComponentProvider"),yield QT(i,i._uninitializedComponentsProvider._online)):(ue("FirestoreClient","Using default OnlineComponentProvider"),yield QT(i,new B_))),i._onlineComponents})}function TV(i){return Ux(i).then(t=>t.syncEngine)}function xV(i){return D(this,null,function*(){let t=yield Ux(i),e=t.eventManager;return e.onListen=dV.bind(null,t.syncEngine),e.onUnlisten=pV.bind(null,t.syncEngine),e})}function SV(i,t,e={}){let n=new Hn;return i.asyncQueue.enqueueAndForget(()=>D(this,null,function*(){return function(o,s,a,c,u){let f=new z_({next:b=>{s.enqueueAndForget(()=>aV(o,v));let O=b.docs.has(a);!O&&b.fromCache?u.reject(new Ee(te.UNAVAILABLE,"Failed to get document because the client is offline.")):O&&b.fromCache&&c&&c.source==="server"?u.reject(new Ee(te.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):u.resolve(b)},error:b=>u.reject(b)}),v=new P_(sv(a.path),f,{includeMetadataChanges:!0,Z_:!0});return sV(o,v)}(yield xV(i),i.asyncQueue,t,e,n)})),n.promise}function jx(i){let t={};return i.timeoutSeconds!==void 0&&(t.timeoutSeconds=i.timeoutSeconds),t}var YT=new Map;function EV(i,t,e){if(!e)throw new Ee(te.INVALID_ARGUMENT,`Function ${i}() cannot be called with an empty ${t}.`)}function OV(i,t,e,n){if(t===!0&&n===!0)throw new Ee(te.INVALID_ARGUMENT,`${i} and ${e} cannot be used together.`)}function ZT(i){if(!Be.isDocumentKey(i))throw new Ee(te.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${i} has ${i.length}.`)}function mv(i){if(i===void 0)return"undefined";if(i===null)return"null";if(typeof i=="string")return i.length>20&&(i=`${i.substring(0,20)}...`),JSON.stringify(i);if(typeof i=="number"||typeof i=="boolean")return""+i;if(typeof i=="object"){if(i instanceof Array)return"an array";{let t=function(n){return n.constructor?n.constructor.name:null}(i);return t?`a custom ${t} object`:"an object"}}return typeof i=="function"?"a function":je()}function Cs(i,t){if("_delegate"in i&&(i=i._delegate),!(i instanceof t)){if(t.name===i.constructor.name)throw new Ee(te.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let e=mv(i);throw new Ee(te.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${e}`)}}return i}var eh=class{constructor(t){var e,n;if(t.host===void 0){if(t.ssl!==void 0)throw new Ee(te.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=(e=t.ssl)===null||e===void 0||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,t.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<1048576)throw new Ee(te.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}OV("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:t.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=jx((n=t.experimentalLongPollingOptions)!==null&&n!==void 0?n:{}),function(o){if(o.timeoutSeconds!==void 0){if(isNaN(o.timeoutSeconds))throw new Ee(te.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (must not be NaN)`);if(o.timeoutSeconds<5)throw new Ee(te.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (minimum allowed value is 5)`);if(o.timeoutSeconds>30)throw new Ee(te.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&function(n,r){return n.timeoutSeconds===r.timeoutSeconds}(this.experimentalLongPollingOptions,t.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}},Gc=class{constructor(t,e,n,r){this._authCredentials=t,this._appCheckCredentials=e,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new eh({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Ee(te.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(t){if(this._settingsFrozen)throw new Ee(te.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new eh(t),t.credentials!==void 0&&(this._authCredentials=function(n){if(!n)return new g0;switch(n.type){case"firstParty":return new b0(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new Ee(te.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let n=YT.get(e);n&&(ue("ComponentProvider","Removing Datastore"),YT.delete(e),n.terminate())}(this),Promise.resolve()}};function Hx(i,t,e,n={}){var r;let o=(i=Cs(i,Gc))._getSettings(),s=`${t}:${e}`;if(o.host!=="firestore.googleapis.com"&&o.host!==s&&va("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),i._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),n.mockUserToken){let a,c;if(typeof n.mockUserToken=="string")a=n.mockUserToken,c=Si.MOCK_USER;else{a=$u(n.mockUserToken,(r=i._app)===null||r===void 0?void 0:r.options.projectId);let u=n.mockUserToken.sub||n.mockUserToken.user_id;if(!u)throw new Ee(te.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Si(u)}i._authCredentials=new _0(new Mp(a,c))}}var j_=class i{constructor(t,e,n){this.converter=e,this._query=n,this.type="query",this.firestore=t}withConverter(t){return new i(this.firestore,t,this._query)}},Cn=class i{constructor(t,e,n){this.converter=e,this._key=n,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new $c(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new i(this.firestore,t,this._key)}},$c=class i extends j_{constructor(t,e,n){super(t,e,sv(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let t=this._path.popLast();return t.isEmpty()?null:new Cn(this.firestore,null,new Be(t))}withConverter(t){return new i(this.firestore,t,this._path)}};function Ts(i,t,...e){if(i=Ai(i),arguments.length===1&&(t=kp.newId()),EV("doc","path",t),i instanceof Gc){let n=gi.fromString(t,...e);return ZT(n),new Cn(i,null,new Be(n))}{if(!(i instanceof Cn||i instanceof $c))throw new Ee(te.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=i._path.child(gi.fromString(t,...e));return ZT(n),new Cn(i.firestore,i instanceof $c?i.converter:null,new Be(n))}}var H_=class{constructor(){this.Xa=Promise.resolve(),this.eu=[],this.tu=!1,this.nu=[],this.ru=null,this.iu=!1,this.su=!1,this.ou=[],this.jo=new qp(this,"async_queue_retry"),this._u=()=>{let e=m0();e&&ue("AsyncQueue","Visibility state changed to "+e.visibilityState),this.jo.Ko()};let t=m0();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this._u)}get isShuttingDown(){return this.tu}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.au(),this.uu(t)}enterRestrictedMode(t){if(!this.tu){this.tu=!0,this.su=t||!1;let e=m0();e&&typeof e.removeEventListener=="function"&&e.removeEventListener("visibilitychange",this._u)}}enqueue(t){if(this.au(),this.tu)return new Promise(()=>{});let e=new Hn;return this.uu(()=>this.tu&&this.su?Promise.resolve():(t().then(e.resolve,e.reject),e.promise)).then(()=>e.promise)}enqueueRetryable(t){this.enqueueAndForget(()=>(this.eu.push(t),this.cu()))}cu(){return D(this,null,function*(){if(this.eu.length!==0){try{yield this.eu[0](),this.eu.shift(),this.jo.reset()}catch(t){if(!Yc(t))throw t;ue("AsyncQueue","Operation failed with retryable error: "+t)}this.eu.length>0&&this.jo.qo(()=>this.cu())}})}uu(t){let e=this.Xa.then(()=>(this.iu=!0,t().catch(n=>{this.ru=n,this.iu=!1;let r=function(s){let a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+` +`+s.stack),a}(n);throw yr("INTERNAL UNHANDLED ERROR: ",r),n}).then(n=>(this.iu=!1,n))));return this.Xa=e,e}enqueueAfterDelay(t,e,n){this.au(),this.ou.indexOf(t)>-1&&(e=0);let r=k_.createAndSchedule(this,t,e,n,o=>this.lu(o));return this.nu.push(r),r}au(){this.ru&&je()}verifyOperationInProgress(){}hu(){return D(this,null,function*(){let t;do t=this.Xa,yield t;while(t!==this.Xa)})}Pu(t){for(let e of this.nu)if(e.timerId===t)return!0;return!1}Iu(t){return this.hu().then(()=>{this.nu.sort((e,n)=>e.targetTimeMs-n.targetTimeMs);for(let e of this.nu)if(e.skipDelay(),t!=="all"&&e.timerId===t)break;return this.hu()})}Tu(t){this.ou.push(t)}lu(t){let e=this.nu.indexOf(t);this.nu.splice(e,1)}};var ka=class extends Gc{constructor(t,e,n,r){super(t,e,n,r),this.type="firestore",this._queue=function(){return new H_}(),this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||qx(this),this._firestoreClient.terminate()}};function Gx(i,t){let e=typeof i=="object"?i:Co(),n=typeof i=="string"?i:t||"(default)",r=os(e,"firestore").getImmediate({identifier:n});if(!r._initialized){let o=Gu("firestore");o&&Hx(r,...o)}return r}function $x(i){return i._firestoreClient||qx(i),i._firestoreClient.verifyNotTerminated(),i._firestoreClient}function qx(i){var t,e,n;let r=i._freezeSettings(),o=function(a,c,u,f){return new O0(a,c,u,f.host,f.ssl,f.experimentalForceLongPolling,f.experimentalAutoDetectLongPolling,jx(f.experimentalLongPollingOptions),f.useFetchStreams)}(i._databaseId,((t=i._app)===null||t===void 0?void 0:t.options.appId)||"",i._persistenceKey,r);i._firestoreClient=new U_(i._authCredentials,i._appCheckCredentials,i._queue,o),!((e=r.localCache)===null||e===void 0)&&e._offlineComponentProvider&&(!((n=r.localCache)===null||n===void 0)&&n._onlineComponentProvider)&&(i._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}var qc=class i{constructor(t){this._byteString=t}static fromBase64String(t){try{return new i(Ji.fromBase64String(t))}catch(e){throw new Ee(te.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(t){return new i(Ji.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}};var Aa=class{constructor(...t){for(let e=0;e90)throw new Ee(te.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new Ee(te.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return St(this._lat,t._lat)||St(this._long,t._long)}};var MV=/^__.*__$/,G_=class{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return this.fieldMask!==null?new Ir(t,this.data,this.fieldMask,e,this.fieldTransforms):new bs(t,this.data,e,this.fieldTransforms)}},th=class{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return new Ir(t,this.data,this.fieldMask,e,this.fieldTransforms)}};function Wx(i){switch(i){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw je()}}var $_=class i{constructor(t,e,n,r,o,s){this.settings=t,this.databaseId=e,this.serializer=n,this.ignoreUndefinedProperties=r,o===void 0&&this.Eu(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get du(){return this.settings.du}Au(t){return new i(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ru(t){var e;let n=(e=this.path)===null||e===void 0?void 0:e.child(t),r=this.Au({path:n,Vu:!1});return r.mu(t),r}fu(t){var e;let n=(e=this.path)===null||e===void 0?void 0:e.child(t),r=this.Au({path:n,Vu:!1});return r.Eu(),r}gu(t){return this.Au({path:void 0,Vu:!0})}pu(t){return nh(t,this.settings.methodName,this.settings.yu||!1,this.path,this.settings.wu)}contains(t){return this.fieldMask.find(e=>t.isPrefixOf(e))!==void 0||this.fieldTransforms.find(e=>t.isPrefixOf(e.field))!==void 0}Eu(){if(this.path)for(let t=0;tc.covers(v.field))}else c=null,u=s.fieldTransforms;return new G_(new yn(a),c,u)}var ih=class i extends Wc{_toFieldTransform(t){if(t.du!==2)throw t.du===1?t.pu(`${this._methodName}() can only appear at the top level of your update data`):t.pu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return t.fieldMask.push(t.path),null}isEqual(t){return t instanceof i}};function AV(i,t,e,n){let r=i.Su(1,t,e);fv("Data must be an object, but it was:",r,n);let o=[],s=yn.empty();Is(n,(c,u)=>{let f=gv(t,c,e);u=Ai(u);let v=r.fu(f);if(u instanceof ih)o.push(f);else{let b=ph(u,v);b!=null&&(o.push(f),s.set(f,b))}});let a=new Dn(o);return new th(s,a,r.fieldTransforms)}function DV(i,t,e,n,r,o){let s=i.Su(1,t,e),a=[W_(t,n,e)],c=[r];if(o.length%2!=0)throw new Ee(te.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let b=0;b=0;--b)if(!Zx(u,a[b])){let O=a[b],V=c[b];V=Ai(V);let K=s.fu(O);if(V instanceof ih)u.push(O);else{let P=ph(V,K);P!=null&&(u.push(O),f.set(O,P))}}let v=new Dn(u);return new th(f,v,s.fieldTransforms)}function ph(i,t){if(Yx(i=Ai(i)))return fv("Unsupported field value:",t,i),Qx(i,t);if(i instanceof Wc)return function(n,r){if(!Wx(r.du))throw r.pu(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r.pu(`${n._methodName}() is not currently supported inside arrays`);let o=n._toFieldTransform(r);o&&r.fieldTransforms.push(o)}(i,t),null;if(i===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),i instanceof Array){if(t.settings.Vu&&t.du!==4)throw t.pu("Nested arrays are not supported");return function(n,r){let o=[],s=0;for(let a of n){let c=ph(a,r.gu(s));c==null&&(c={nullValue:"NULL_VALUE"}),o.push(c),s++}return{arrayValue:{values:o}}}(i,t)}return function(n,r){if((n=Ai(n))===null)return{nullValue:"NULL_VALUE"};if(typeof n=="number")return g5(r.serializer,n);if(typeof n=="boolean")return{booleanValue:n};if(typeof n=="string")return{stringValue:n};if(n instanceof Date){let o=Ri.fromDate(n);return{timestampValue:jp(r.serializer,o)}}if(n instanceof Ri){let o=new Ri(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:jp(r.serializer,o)}}if(n instanceof Kc)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof qc)return{bytesValue:Cx(r.serializer,n._byteString)};if(n instanceof Cn){let o=r.databaseId,s=n.firestore._databaseId;if(!s.isEqual(o))throw r.pu(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${o.projectId}/${o.database}`);return{referenceValue:av(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r.pu(`Unsupported field value: ${mv(n)}`)}(i,t)}function Qx(i,t){let e={};return JT(i)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Is(i,(n,r)=>{let o=ph(r,t.Ru(n));o!=null&&(e[n]=o)}),{mapValue:{fields:e}}}function Yx(i){return!(typeof i!="object"||i===null||i instanceof Array||i instanceof Date||i instanceof Ri||i instanceof Kc||i instanceof qc||i instanceof Cn||i instanceof Wc)}function fv(i,t,e){if(!Yx(e)||!function(r){return typeof r=="object"&&r!==null&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}(e)){let n=mv(e);throw n==="an object"?t.pu(i+" a custom object"):t.pu(i+" "+n)}}function W_(i,t,e){if((t=Ai(t))instanceof Aa)return t._internalPath;if(typeof t=="string")return gv(i,t);throw nh("Field path arguments must be of type string or ",i,!1,void 0,e)}var PV=new RegExp("[~\\*/\\[\\]]");function gv(i,t,e){if(t.search(PV)>=0)throw nh(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,i,!1,void 0,e);try{return new Aa(...t.split("."))._internalPath}catch{throw nh(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,i,!1,void 0,e)}}function nh(i,t,e,n,r){let o=n&&!n.isEmpty(),s=r!==void 0,a=`Function ${t}() called with invalid data`;e&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(o||s)&&(c+=" (found",o&&(c+=` in field ${n}`),s&&(c+=` in document ${r}`),c+=")"),new Ee(te.INVALID_ARGUMENT,a+i+c)}function Zx(i,t){return i.some(e=>e.isEqual(t))}var rh=class{constructor(t,e,n,r,o){this._firestore=t,this._userDataWriter=e,this._key=n,this._document=r,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new Cn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){let t=new K_(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){let e=this._document.data.field(Xx("DocumentSnapshot.get",t));if(e!==null)return this._userDataWriter.convertValue(e)}}},K_=class extends rh{data(){return super.data()}};function Xx(i,t){return typeof t=="string"?gv(i,t):t instanceof Aa?t._internalPath:t._delegate._internalPath}var Q_=class{convertValue(t,e="none"){switch(_s(t)){case 0:return null;case 1:return t.booleanValue;case 2:return si(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(So(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw je()}}convertObject(t,e){return this.convertObjectMap(t.fields,e)}convertObjectMap(t,e="none"){let n={};return Is(t,(r,o)=>{n[r]=this.convertValue(o,e)}),n}convertGeoPoint(t){return new Kc(si(t.latitude),si(t.longitude))}convertArray(t,e){return(t.values||[]).map(n=>this.convertValue(n,e))}convertServerTimestamp(t,e){switch(e){case"previous":let n=iv(t);return n==null?null:this.convertValue(n,e);case"estimate":return this.convertTimestamp(Nc(t));default:return null}}convertTimestamp(t){let e=xo(t);return new Ri(e.seconds,e.nanos)}convertDocumentKey(t,e){let n=gi.fromString(t);Nt(Ex(n));let r=new Vp(n.get(1),n.get(3)),o=new Be(n.popFirst(5));return r.isEqual(e)||yr(`Document ${o} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),o}};function RV(i,t,e){let n;return n=i?e&&(e.merge||e.mergeFields)?i.toFirestore(t,e):i.toFirestore(t):t,n}var Y_=class{constructor(t,e){this.hasPendingWrites=t,this.fromCache=e}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}},oh=class extends rh{constructor(t,e,n,r,o,s){super(t,e,n,r,s),this._firestore=t,this._firestoreImpl=t,this.metadata=o}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){let e=new Z_(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,e={}){if(this._document){let n=this._document.data.field(Xx("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n,e.serverTimestamps)}}},Z_=class extends oh{data(t={}){return super.data(t)}};function hh(i){i=Cs(i,Cn);let t=Cs(i.firestore,ka);return SV($x(t),i._key).then(e=>VV(t,i,e))}var X_=class extends Q_{constructor(t){super(),this.firestore=t}convertBytes(t){return new qc(t)}convertReference(t){let e=this.convertDocumentKey(t,this.firestore._databaseId);return new Cn(this.firestore,null,e)}};function mh(i,t,e){i=Cs(i,Cn);let n=Cs(i.firestore,ka),r=RV(i.converter,t,e);return Jx(n,[kV(Kx(n),"setDoc",i._key,r,i.converter!==null,e).toMutation(i._key,To.none())])}function fh(i,t,e,...n){i=Cs(i,Cn);let r=Cs(i.firestore,ka),o=Kx(r),s;return s=typeof(t=Ai(t))=="string"||t instanceof Aa?DV(o,"updateDoc",i._key,t,e,n):AV(o,"updateDoc",i._key,t),Jx(r,[s.toMutation(i._key,To.exists(!0))])}function Jx(i,t){return function(n,r){let o=new Hn;return n.asyncQueue.enqueueAndForget(()=>D(this,null,function*(){return hV(yield TV(n),r,o)})),o.promise}($x(i),t)}function VV(i,t,e){let n=e.docs.get(t._key),r=new X_(i);return new oh(i,r,t._key,n,new Y_(e.hasPendingWrites,e.fromCache),t.converter)}(function(t,e=!0){(function(r){Da=r})(ur),dr(new ln("firestore",(n,{instanceIdentifier:r,options:o})=>{let s=n.getProvider("app").getImmediate(),a=new ka(new v0(n.getProvider("auth-internal")),new I0(n.getProvider("app-check-internal")),function(u,f){if(!Object.prototype.hasOwnProperty.apply(u.options,["projectId"]))throw new Ee(te.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Vp(u.options.projectId,f)}(s,r),s);return o=Object.assign({useFetchStreams:e},o),a._setSettings(o),a},"PUBLIC").setMultipleInstances(!0)),Wt(xT,"4.4.2",t),Wt(xT,"4.4.2","esm2017")})();var gh=class{constructor(t,e,n,r){this.email=t,this.id=e,this._token=n,this._tokenExpirationDate=r}get token(){return this._tokenExpirationDate||new Date>this._tokenExpirationDate?null:this._token}};var LV="firebase",FV="10.8.0";Wt(LV,FV,"app");var zr=new Gs("ANGULARFIRE2_VERSION");function Va(i,t,e){if(t){if(t.length===1)return t[0];let o=t.filter(s=>s.app===e);if(o.length===1)return o[0]}return e.container.getProvider(i).getImmediate({optional:!0})}var Ss=(i,t)=>{let e=t?[t]:Qu(),n=[];return e.forEach(r=>{r.container.getProvider(i).instances.forEach(s=>{n.includes(s)||n.push(s)})}),n},Mo=class{constructor(){return Ss(NV)}},NV="app-check";function Ra(){}var _h=class{zone;delegate;constructor(t,e=Dd){this.zone=t,this.delegate=e}now(){return this.delegate.now()}schedule(t,e,n){let r=this.zone,o=function(s){r.runGuarded(()=>{t.apply(this,[s])})};return this.delegate.schedule(o,e,n)}},_v=class{zone;task=null;constructor(t){this.zone=t}call(t,e){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ra,{},Ra,Ra)),e.pipe(It({next:n,complete:n,error:n})).subscribe(t).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},ko=(()=>{class i{ngZone;outsideAngular;insideAngular;constructor(e){this.ngZone=e,this.outsideAngular=e.runOutsideAngular(()=>new _h(Zone.current)),this.insideAngular=e.run(()=>new _h(Zone.current,Bb)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||i)(J(ge))};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function vh(){let i=globalThis.\u0275AngularFireScheduler;if(!i)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using +provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return i}function BV(i){return vh().ngZone.runOutsideAngular(()=>i())}function xs(i){return vh().ngZone.run(()=>i())}function zV(i){return UV(vh())(i)}function UV(i){return function(e){return e=e.lift(new _v(i.ngZone)),e.pipe(Mm(i.outsideAngular),dl(i.insideAngular))}}var jV=(i,t)=>function(){let n=arguments;return t&&setTimeout(()=>{t.state==="scheduled"&&t.invoke()},10),xs(()=>i.apply(void 0,n))},$n=(i,t)=>function(){let e,n=arguments;for(let o=0;oZone.current.scheduleMacroTask("firebaseZoneBlock",Ra,{},Ra,Ra))),n[o]=jV(n[o],e));let r=BV(()=>i.apply(this,n));if(!t)if(r instanceof Li){let o=vh();return r.pipe(Mm(o.outsideAngular),dl(o.insideAngular))}else return xs(()=>r);return r instanceof Li?r.pipe(zV):r instanceof Promise?xs(()=>new Promise((o,s)=>r.then(a=>xs(()=>o(a)),a=>xs(()=>s(a))))):typeof r=="function"&&e?function(){return setTimeout(()=>{e&&e.state==="scheduled"&&e.invoke()},10),r.apply(this,arguments)}:xs(()=>r)};var qn=class{constructor(t){return t}},Ur=class{constructor(){return Qu()}};function HV(i){return i&&i.length===1?i[0]:new qn(Co())}var vv=new le("angularfire2._apps"),GV={provide:qn,useFactory:HV,deps:[[new hi,vv]]},$V={provide:Ur,deps:[[new hi,vv]]};function qV(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new qn(n)}}var WV=(()=>{class i{constructor(e){Wt("angularfire",zr.full,"core"),Wt("angularfire",zr.full,"app"),Wt("angular",T1.full,e.toString())}static \u0275fac=function(n){return new(n||i)(J(vt))};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[GV,$V]})}return i})();function eS(i,...t){return{ngModule:WV,providers:[{provide:vv,useFactory:qV(i),multi:!0,deps:[ge,Mi,ko,...t]}]}}var tS=$n(Cg,!0);function fS(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var gS=fS,_S=new Lr("auth","Firebase",fS());var Th=new yo("@firebase/auth");function KV(i,...t){Th.logLevel<=at.WARN&&Th.warn(`Auth (${ur}): ${i}`,...t)}function bh(i,...t){Th.logLevel<=at.ERROR&&Th.error(`Auth (${ur}): ${i}`,...t)}function Do(i,...t){throw Nv(i,...t)}function Es(i,...t){return Nv(i,...t)}function QV(i,t,e){let n=Object.assign(Object.assign({},gS()),{[t]:e});return new Lr("auth","Firebase",n).create(t,{appName:i.name})}function Nv(i,...t){if(typeof i!="string"){let e=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=i.name),i._errorFactory.create(e,...n)}return _S.create(i,...t)}function Qe(i,t,...e){if(!i)throw Nv(t,...e)}function jr(i){let t="INTERNAL ASSERTION FAILED: "+i;throw bh(t),new Error(t)}function Po(i,t){i||jr(t)}function Iv(){var i;return typeof self<"u"&&((i=self.location)===null||i===void 0?void 0:i.href)||""}function YV(){return iS()==="http:"||iS()==="https:"}function iS(){var i;return typeof self<"u"&&((i=self.location)===null||i===void 0?void 0:i.protocol)||null}function ZV(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(YV()||NI()||"connection"in navigator)?navigator.onLine:!0}function XV(){if(typeof navigator>"u")return null;let i=navigator;return i.languages&&i.languages[0]||i.language||null}var Os=class{constructor(t,e){this.shortDelay=t,this.longDelay=e,Po(e>t,"Short delay should be less than long delay!"),this.isMobile=FI()||BI()}get(){return ZV()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Bv(i,t){Po(i.emulator,"Emulator should always be set here");let{url:e}=i.emulator;return t?`${e}${t.startsWith("/")?t.slice(1):t}`:e}var xh=class{static initialize(t,e,n){this.fetchImpl=t,e&&(this.headersImpl=e),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;jr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;jr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;jr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var JV={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var e6=new Os(3e4,6e4);function zv(i,t){return i.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:i.tenantId}):t}function La(o,s,a,c){return D(this,arguments,function*(i,t,e,n,r={}){return vS(i,r,()=>D(this,null,function*(){let u={},f={};n&&(t==="GET"?f=n:u={body:JSON.stringify(n)});let v=oc(Object.assign({key:i.config.apiKey},f)).slice(1),b=yield i._getAdditionalHeaders();return b["Content-Type"]="application/json",i.languageCode&&(b["X-Firebase-Locale"]=i.languageCode),xh.fetch()(yS(i,i.config.apiHost,e,v),Object.assign({method:t,headers:b,referrerPolicy:"no-referrer"},u))}))})}function vS(i,t,e){return D(this,null,function*(){i._canInitEmulator=!1;let n=Object.assign(Object.assign({},JV),t);try{let r=new wv(i),o=yield Promise.race([e(),r.promise]);r.clearNetworkTimeout();let s=yield o.json();if("needConfirmation"in s)throw yh(i,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{let a=o.ok?s.errorMessage:s.error.message,[c,u]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw yh(i,"credential-already-in-use",s);if(c==="EMAIL_EXISTS")throw yh(i,"email-already-in-use",s);if(c==="USER_DISABLED")throw yh(i,"user-disabled",s);let f=n[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw QV(i,f,u);Do(i,f)}}catch(r){if(r instanceof Zi)throw r;Do(i,"network-request-failed",{message:String(r)})}})}function t6(o,s,a,c){return D(this,arguments,function*(i,t,e,n,r={}){let u=yield La(i,t,e,n,r);return"mfaPendingCredential"in u&&Do(i,"multi-factor-auth-required",{_serverResponse:u}),u})}function yS(i,t,e,n){let r=`${t}${e}?${n}`;return i.config.emulator?Bv(i.config,r):`${i.config.apiScheme}://${r}`}var wv=class{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((e,n)=>{this.timer=setTimeout(()=>n(Es(this.auth,"network-request-failed")),e6.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function yh(i,t,e){let n={appName:i.name};e.email&&(n.email=e.email),e.phoneNumber&&(n.phoneNumber=e.phoneNumber);let r=Es(i,t,n);return r.customData._tokenResponse=e,r}function i6(i,t){return D(this,null,function*(){return La(i,"POST","/v1/accounts:delete",t)})}function n6(i,t){return D(this,null,function*(){return La(i,"POST","/v1/accounts:lookup",t)})}function Jc(i){if(i)try{let t=new Date(Number(i));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}function Uv(i,t=!1){return D(this,null,function*(){let e=Ai(i),n=yield e.getIdToken(t),r=jv(n);Qe(r&&r.exp&&r.auth_time&&r.iat,e.auth,"internal-error");let o=typeof r.firebase=="object"?r.firebase:void 0,s=o?.sign_in_provider;return{claims:r,token:n,authTime:Jc(yv(r.auth_time)),issuedAtTime:Jc(yv(r.iat)),expirationTime:Jc(yv(r.exp)),signInProvider:s||null,signInSecondFactor:o?.sign_in_second_factor||null}})}function yv(i){return Number(i)*1e3}function jv(i){let[t,e,n]=i.split(".");if(t===void 0||e===void 0||n===void 0)return bh("JWT malformed, contained fewer than 3 sections"),null;try{let r=ng(e);return r?JSON.parse(r):(bh("Failed to decode base64 JWT payload"),null)}catch(r){return bh("Caught error parsing JWT payload as JSON",r?.toString()),null}}function r6(i){let t=jv(i);return Qe(t,"internal-error"),Qe(typeof t.exp<"u","internal-error"),Qe(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}function ed(i,t,e=!1){return D(this,null,function*(){if(e)return t;try{return yield t}catch(n){throw n instanceof Zi&&o6(n)&&i.auth.currentUser===i&&(yield i.auth.signOut()),n}})}function o6({code:i}){return i==="auth/user-disabled"||i==="auth/user-token-expired"}var Tv=class{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var e;if(t){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=((e=this.user.stsTokenManager.expirationTime)!==null&&e!==void 0?e:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(t=!1){if(!this.isRunning)return;let e=this.getInterval(t);this.timerId=setTimeout(()=>D(this,null,function*(){yield this.iteration()}),e)}iteration(){return D(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Sh=class{constructor(t,e){this.createdAt=t,this.lastLoginAt=e,this._initializeTime()}_initializeTime(){this.lastSignInTime=Jc(this.lastLoginAt),this.creationTime=Jc(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function Eh(i){return D(this,null,function*(){var t;let e=i.auth,n=yield i.getIdToken(),r=yield ed(i,n6(e,{idToken:n}));Qe(r?.users.length,e,"internal-error");let o=r.users[0];i._notifyReloadListener(o);let s=!((t=o.providerUserInfo)===null||t===void 0)&&t.length?a6(o.providerUserInfo):[],a=s6(i.providerData,s),c=i.isAnonymous,u=!(i.email&&o.passwordHash)&&!a?.length,f=c?u:!1,v={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Sh(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(i,v)})}function Hv(i){return D(this,null,function*(){let t=Ai(i);yield Eh(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function s6(i,t){return[...i.filter(n=>!t.some(r=>r.providerId===n.providerId)),...t]}function a6(i){return i.map(t=>{var{providerId:e}=t,n=Om(t,["providerId"]);return{providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}function l6(i,t){return D(this,null,function*(){let e=yield vS(i,{},()=>D(this,null,function*(){let n=oc({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:o}=i.config,s=yS(i,r,"/v1/token",`key=${o}`),a=yield i._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",xh.fetch()(s,{method:"POST",headers:a,body:n})}));return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token}})}function c6(i,t){return D(this,null,function*(){return La(i,"POST","/v2/accounts:revokeToken",zv(i,t))})}var Oh=class i{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){Qe(t.idToken,"internal-error"),Qe(typeof t.idToken<"u","internal-error"),Qe(typeof t.refreshToken<"u","internal-error");let e="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):r6(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,e)}getToken(t,e=!1){return D(this,null,function*(){return Qe(!this.accessToken||this.refreshToken,t,"user-token-expired"),!e&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null})}clearRefreshToken(){this.refreshToken=null}refresh(t,e){return D(this,null,function*(){let{accessToken:n,refreshToken:r,expiresIn:o}=yield l6(t,e);this.updateTokensAndExpiration(n,r,Number(o))})}updateTokensAndExpiration(t,e,n){this.refreshToken=e||null,this.accessToken=t||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,e){let{refreshToken:n,accessToken:r,expirationTime:o}=e,s=new i;return n&&(Qe(typeof n=="string","internal-error",{appName:t}),s.refreshToken=n),r&&(Qe(typeof r=="string","internal-error",{appName:t}),s.accessToken=r),o&&(Qe(typeof o=="number","internal-error",{appName:t}),s.expirationTime=o),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new i,this.toJSON())}_performRefresh(){return jr("not implemented")}};function Ao(i,t){Qe(typeof i=="string"||typeof i>"u","internal-error",{appName:t})}var td=class i{constructor(t){var{uid:e,auth:n,stsTokenManager:r}=t,o=Om(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Tv(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Sh(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return D(this,null,function*(){let e=yield ed(this,this.stsTokenManager.getToken(this.auth,t));return Qe(e,this.auth,"internal-error"),this.accessToken!==e&&(this.accessToken=e,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),e})}getIdTokenResult(t){return Uv(this,t)}reload(){return Hv(this)}_assign(t){this!==t&&(Qe(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(e=>Object.assign({},e)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){let e=new i(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return e.metadata._copy(this.metadata),e}_onReload(t){Qe(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,e=!1){return D(this,null,function*(){let n=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),n=!0),e&&(yield Eh(this)),yield this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)})}delete(){return D(this,null,function*(){let t=yield this.getIdToken();return yield ed(this,i6(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,e){var n,r,o,s,a,c,u,f;let v=(n=e.displayName)!==null&&n!==void 0?n:void 0,b=(r=e.email)!==null&&r!==void 0?r:void 0,O=(o=e.phoneNumber)!==null&&o!==void 0?o:void 0,V=(s=e.photoURL)!==null&&s!==void 0?s:void 0,K=(a=e.tenantId)!==null&&a!==void 0?a:void 0,P=(c=e._redirectEventId)!==null&&c!==void 0?c:void 0,j=(u=e.createdAt)!==null&&u!==void 0?u:void 0,ce=(f=e.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:_e,emailVerified:me,isAnonymous:$e,providerData:He,stsTokenManager:Et}=e;Qe(_e&&Et,t,"internal-error");let ht=Oh.fromJSON(this.name,Et);Qe(typeof _e=="string",t,"internal-error"),Ao(v,t.name),Ao(b,t.name),Qe(typeof me=="boolean",t,"internal-error"),Qe(typeof $e=="boolean",t,"internal-error"),Ao(O,t.name),Ao(V,t.name),Ao(K,t.name),Ao(P,t.name),Ao(j,t.name),Ao(ce,t.name);let Ht=new i({uid:_e,auth:t,email:b,emailVerified:me,displayName:v,isAnonymous:$e,photoURL:V,phoneNumber:O,tenantId:K,stsTokenManager:ht,createdAt:j,lastLoginAt:ce});return He&&Array.isArray(He)&&(Ht.providerData=He.map(_i=>Object.assign({},_i))),P&&(Ht._redirectEventId=P),Ht}static _fromIdTokenResponse(t,e,n=!1){return D(this,null,function*(){let r=new Oh;r.updateFromServerResponse(e);let o=new i({uid:e.localId,auth:t,stsTokenManager:r,isAnonymous:n});return yield Eh(o),o})}};var nS=new Map;function Hr(i){Po(i instanceof Function,"Expected a class definition");let t=nS.get(i);return t?(Po(t instanceof i,"Instance stored in cache mismatched with class"),t):(t=new i,nS.set(i,t),t)}var d6=(()=>{class i{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return D(this,null,function*(){return!0})}_set(e,n){return D(this,null,function*(){this.storage[e]=n})}_get(e){return D(this,null,function*(){let n=this.storage[e];return n===void 0?null:n})}_remove(e){return D(this,null,function*(){delete this.storage[e]})}_addListener(e,n){}_removeListener(e,n){}}return i.type="NONE",i})(),xv=d6;function Ch(i,t,e){return`firebase:${i}:${t}:${e}`}var Mh=class i{constructor(t,e,n){this.persistence=t,this.auth=e,this.userKey=n;let{config:r,name:o}=this.auth;this.fullUserKey=Ch(this.userKey,r.apiKey,o),this.fullPersistenceKey=Ch("persistence",r.apiKey,o),this.boundEventHandler=e._onStorageEvent.bind(e),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return D(this,null,function*(){let t=yield this.persistence._get(this.fullUserKey);return t?td._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return D(this,null,function*(){if(this.persistence===t)return;let e=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,e)return this.setCurrentUser(e)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,e,n="authUser"){return D(this,null,function*(){if(!e.length)return new i(Hr(xv),t,n);let r=(yield Promise.all(e.map(u=>D(this,null,function*(){if(yield u._isAvailable())return u})))).filter(u=>u),o=r[0]||Hr(xv),s=Ch(n,t.config.apiKey,t.name),a=null;for(let u of e)try{let f=yield u._get(s);if(f){let v=td._fromJSON(t,f);u!==o&&(a=v),o=u;break}}catch{}let c=r.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!c.length?new i(o,t,n):(o=c[0],a&&(yield o._set(s,a.toJSON())),yield Promise.all(e.map(u=>D(this,null,function*(){if(u!==o)try{yield u._remove(s)}catch{}}))),new i(o,t,n))})}};function rS(i){let t=i.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(IS(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(bS(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(TS(t))return"Blackberry";if(xS(t))return"Webos";if(Gv(t))return"Safari";if((t.includes("chrome/")||CS(t))&&!t.includes("edge/"))return"Chrome";if(wS(t))return"Android";{let e=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=i.match(e);if(n?.length===2)return n[1]}return"Other"}function bS(i=ri()){return/firefox\//i.test(i)}function Gv(i=ri()){let t=i.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function CS(i=ri()){return/crios\//i.test(i)}function IS(i=ri()){return/iemobile/i.test(i)}function wS(i=ri()){return/android/i.test(i)}function TS(i=ri()){return/blackberry/i.test(i)}function xS(i=ri()){return/webos/i.test(i)}function Fh(i=ri()){return/iphone|ipad|ipod/i.test(i)||/macintosh/i.test(i)&&/mobile/i.test(i)}function u6(i=ri()){var t;return Fh(i)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function p6(){return zI()&&document.documentMode===10}function SS(i=ri()){return Fh(i)||wS(i)||xS(i)||TS(i)||/windows phone/i.test(i)||IS(i)}function h6(){try{return!!(window&&window!==window.top)}catch{return!1}}function ES(i,t=[]){let e;switch(i){case"Browser":e=rS(ri());break;case"Worker":e=`${rS(ri())}-${i}`;break;default:e=i}let n=t.length?t.join(","):"FirebaseCore-web";return`${e}/JsCore/${ur}/${n}`}var Sv=class{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,e){let n=o=>new Promise((s,a)=>{try{let c=t(o);s(c)}catch(c){a(c)}});n.onAbort=e,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(t){return D(this,null,function*(){if(this.auth.currentUser===t)return;let e=[];try{for(let n of this.queue)yield n(t),n.onAbort&&e.push(n.onAbort)}catch(n){e.reverse();for(let r of e)try{r()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n?.message})}})}};function m6(e){return D(this,arguments,function*(i,t={}){return La(i,"GET","/v2/passwordPolicy",zv(i,t))})}var f6=6,Ev=class{constructor(t){var e,n,r,o;let s=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(e=s.minPasswordLength)!==null&&e!==void 0?e:f6,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),s.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),s.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),s.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),s.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(r=(n=t.allowedNonAlphanumericCharacters)===null||n===void 0?void 0:n.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(o=t.forceUpgradeOnSignin)!==null&&o!==void 0?o:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var e,n,r,o,s,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,c),this.validatePasswordCharacterOptions(t,c),c.isValid&&(c.isValid=(e=c.meetsMinPasswordLength)!==null&&e!==void 0?e:!0),c.isValid&&(c.isValid=(n=c.meetsMaxPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.containsLowercaseLetter)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(o=c.containsUppercaseLetter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(s=c.containsNumericCharacter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(a=c.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),c}validatePasswordLengthOptions(t,e){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(e.meetsMinPasswordLength=t.length>=n),r&&(e.meetsMaxPasswordLength=t.length<=r)}validatePasswordCharacterOptions(t,e){this.updatePasswordCharacterOptionsStatuses(e,!1,!1,!1,!1);let n;for(let r=0;r="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(t,e,n,r,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=e)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}};var Ov=class{constructor(t,e,n,r){this.app=t,this.heartbeatServiceProvider=e,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new kh(this),this.idTokenSubscription=new kh(this),this.beforeStateQueue=new Sv(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_S,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(t,e){return e&&(this._popupRedirectResolver=Hr(e)),this._initializationPromise=this.queue(()=>D(this,null,function*(){var n,r;if(!this._deleted&&(this.persistenceManager=yield Mh.create(this,t),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(e),this.lastNotifiedUid=((r=this.currentUser)===null||r===void 0?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return D(this,null,function*(){if(this._deleted)return;let t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUser(t){return D(this,null,function*(){var e;let n=yield this.assertedPersistence.getCurrentUser(),r=n,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let s=(e=this.redirectUser)===null||e===void 0?void 0:e._redirectEventId,a=r?._redirectEventId,c=yield this.tryRedirectSignIn(t);(!s||s===a)&&c?.user&&(r=c.user,o=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(r)}catch(s){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Qe(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(t){return D(this,null,function*(){let e=null;try{e=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{yield this._setRedirectUser(null)}return e})}reloadAndSetCurrentUserOrClear(t){return D(this,null,function*(){try{yield Eh(t)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=XV()}_delete(){return D(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return D(this,null,function*(){let e=t?Ai(t):null;return e&&Qe(e.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(e&&e._clone(this))})}_updateCurrentUser(t,e=!1){return D(this,null,function*(){if(!this._deleted)return t&&Qe(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),e||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>D(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return D(this,null,function*(){return yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0)})}setPersistence(t){return this.queue(()=>D(this,null,function*(){yield this.assertedPersistence.setPersistence(Hr(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return D(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let e=this._getPasswordPolicyInternal();return e.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):e.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return D(this,null,function*(){let t=yield m6(this),e=new Ev(t);this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new Lr("auth","Firebase",t())}onAuthStateChanged(t,e,n){return this.registerStateListener(this.authStateSubscription,t,e,n)}beforeAuthStateChanged(t,e){return this.beforeStateQueue.pushCallback(t,e)}onIdTokenChanged(t,e,n){return this.registerStateListener(this.idTokenSubscription,t,e,n)}authStateReady(){return new Promise((t,e)=>{if(this.currentUser)t();else{let n=this.onAuthStateChanged(()=>{n(),t()},e)}})}revokeAccessToken(t){return D(this,null,function*(){if(this.currentUser){let e=yield this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:e};this.tenantId!=null&&(n.tenantId=this.tenantId),yield c6(this,n)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,e){return D(this,null,function*(){let n=yield this.getOrInitRedirectPersistenceManager(e);return t===null?n.removeCurrentUser():n.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return D(this,null,function*(){if(!this.redirectPersistenceManager){let e=t&&Hr(t)||this._popupRedirectResolver;Qe(e,this,"argument-error"),this.redirectPersistenceManager=yield Mh.create(this,[Hr(e._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return D(this,null,function*(){var e,n;return this._isInitialized&&(yield this.queue(()=>D(this,null,function*(){}))),((e=this._currentUser)===null||e===void 0?void 0:e._redirectEventId)===t?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return D(this,null,function*(){if(t===this.currentUser)return this.queue(()=>D(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,e;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=(e=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&e!==void 0?e:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,e,n,r){if(this._deleted)return()=>{};let o=typeof e=="function"?e:e.next.bind(e),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(Qe(a,this,"internal-error"),a.then(()=>{s||o(this.currentUser)}),typeof e=="function"){let c=t.addObserver(e,n,r);return()=>{s=!0,c()}}else{let c=t.addObserver(e);return()=>{s=!0,c()}}}directlySetCurrentUser(t){return D(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return Qe(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=ES(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return D(this,null,function*(){var t;let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let n=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);let r=yield this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e})}_getAppCheckToken(){return D(this,null,function*(){var t;let e=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return e?.error&&KV(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function $v(i){return Ai(i)}var kh=class{constructor(t){this.auth=t,this.observer=null,this.addObserver=GI(e=>this.observer=e)}get next(){return Qe(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var qv={loadJS(){return D(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function g6(i){qv=i}function _6(i){return qv.loadJS(i)}function v6(){return qv.gapiScript}function OS(i){return`__${i}${Math.floor(Math.random()*1e6)}`}function Wv(i,t){let e=os(i,"auth");if(e.isInitialized()){let r=e.getImmediate(),o=e.getOptions();if(is(o,t??{}))return r;Do(r,"already-initialized")}return e.initialize({options:t})}function y6(i,t){let e=t?.persistence||[],n=(Array.isArray(e)?e:[e]).map(Hr);t?.errorMap&&i._updateErrorMap(t.errorMap),i._initializeWithPersistence(n,t?.popupRedirectResolver)}function Kv(i,t,e){let n=$v(i);Qe(n._canInitEmulator,n,"emulator-config-failed"),Qe(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let r=!!e?.disableWarnings,o=MS(t),{host:s,port:a}=b6(t),c=a===null?"":`:${a}`;n.config.emulator={url:`${o}//${s}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||C6()}function MS(i){let t=i.indexOf(":");return t<0?"":i.substr(0,t+1)}function b6(i){let t=MS(i),e=/(\/\/)?([^?#/]+)/.exec(i.substr(t.length));if(!e)return{host:"",port:null};let n=e[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let o=r[1];return{host:o,port:oS(n.substr(o.length+1))}}else{let[o,s]=n.split(":");return{host:o,port:oS(s)}}}function oS(i){if(!i)return null;let t=Number(i);return isNaN(t)?null:t}function C6(){function i(){let t=document.createElement("p"),e=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",e.position="fixed",e.width="100%",e.backgroundColor="#ffffff",e.border=".1em solid #000000",e.color="#b50000",e.bottom="0px",e.left="0px",e.margin="0px",e.zIndex="10000",e.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",i):i())}var Ah=class{constructor(t,e){this.providerId=t,this.signInMethod=e}toJSON(){return jr("not implemented")}_getIdTokenResponse(t){return jr("not implemented")}_linkToIdToken(t,e){return jr("not implemented")}_getReauthenticationResolver(t){return jr("not implemented")}};function bv(i,t){return D(this,null,function*(){return t6(i,"POST","/v1/accounts:signInWithIdp",zv(i,t))})}var Dh=class{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}};var Mv=class extends Dh{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}};var id=class i{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,e,n,r=!1){return D(this,null,function*(){let o=yield td._fromIdTokenResponse(t,n,r),s=sS(n);return new i({user:o,providerId:s,_tokenResponse:n,operationType:e})})}static _forOperation(t,e,n){return D(this,null,function*(){yield t._updateTokensIfNecessary(n,!0);let r=sS(n);return new i({user:t,providerId:r,_tokenResponse:n,operationType:e})})}};function sS(i){return i.providerId?i.providerId:"phoneNumber"in i?"phone":null}var kv=class i extends Zi{constructor(t,e,n,r){var o;super(e.code,e.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,i.prototype),this.customData={appName:t.name,tenantId:(o=t.tenantId)!==null&&o!==void 0?o:void 0,_serverResponse:e.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(t,e,n,r){return new i(t,e,n,r)}};function kS(i,t,e,n){return(t==="reauthenticate"?e._getReauthenticationResolver(i):e._getIdTokenResponse(i)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?kv._fromErrorAndOperation(i,o,t,n):o})}function I6(i,t,e=!1){return D(this,null,function*(){let n=yield ed(i,t._linkToIdToken(i.auth,yield i.getIdToken()),e);return id._forOperation(i,"link",n)})}function w6(i,t,e=!1){return D(this,null,function*(){let{auth:n}=i,r="reauthenticate";try{let o=yield ed(i,kS(n,r,t,i),e);Qe(o.idToken,n,"internal-error");let s=jv(o.idToken);Qe(s,n,"internal-error");let{sub:a}=s;return Qe(i.uid===a,n,"user-mismatch"),id._forOperation(i,r,o)}catch(o){throw o?.code==="auth/user-not-found"&&Do(n,"user-mismatch"),o}})}function T6(i,t,e=!1){return D(this,null,function*(){let n="signIn",r=yield kS(i,n,t),o=yield id._fromIdTokenResponse(i,n,r);return e||(yield i._updateCurrentUser(o.user)),o})}function Qv(i,t,e,n){return Ai(i).onIdTokenChanged(t,e,n)}function Yv(i,t,e){return Ai(i).beforeAuthStateChanged(t,e)}var Ph="__sak";var Rh=class{constructor(t,e){this.storageRetriever=t,this.type=e}_isAvailable(){try{return this.storage?(this.storage.setItem(Ph,"1"),this.storage.removeItem(Ph),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,e){return this.storage.setItem(t,JSON.stringify(e)),Promise.resolve()}_get(t){let e=this.storage.getItem(t);return Promise.resolve(e?JSON.parse(e):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}};function x6(){let i=ri();return Gv(i)||Fh(i)}var S6=1e3,E6=10,O6=(()=>{class i extends Rh{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=x6()&&h6(),this.fallbackToPolling=SS(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let n of Object.keys(this.listeners)){let r=this.storage.getItem(n),o=this.localCache[n];r!==o&&e(n,o,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((a,c,u)=>{this.notifyListeners(a,u)});return}let r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let a=this.storage.getItem(r);if(e.newValue!==a)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}let o=()=>{let a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},s=this.storage.getItem(r);p6()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(o,E6):o()}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let o of Array.from(r))o(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},S6)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(e,n){return D(this,null,function*(){yield to(i.prototype,this,"_set").call(this,e,n),this.localCache[e]=JSON.stringify(n)})}_get(e){return D(this,null,function*(){let n=yield to(i.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(n),n})}_remove(e){return D(this,null,function*(){yield to(i.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}return i.type="LOCAL",i})(),AS=O6;var M6=(()=>{class i extends Rh{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}return i.type="SESSION",i})(),Zv=M6;function k6(i){return Promise.all(i.map(t=>D(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(e){return{fulfilled:!1,reason:e}}})))}var A6=(()=>{class i{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let n=this.receivers.find(o=>o.isListeningto(e));if(n)return n;let r=new i(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}handleEvent(e){return D(this,null,function*(){let n=e,{eventId:r,eventType:o,data:s}=n.data,a=this.handlersMap[o];if(!a?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:o});let c=Array.from(a).map(f=>D(this,null,function*(){return f(n.origin,s)})),u=yield k6(c);n.ports[0].postMessage({status:"done",eventId:r,eventType:o,response:u})})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}i.receivers=[];return i})();function DS(i="",t=10){let e="";for(let n=0;n{let u=DS("",20);r.port1.start();let f=setTimeout(()=>{c(new Error("unsupported_event"))},n);s={messageChannel:r,onMessage(v){let b=v;if(b.data.eventId===u)switch(b.data.status){case"ack":clearTimeout(f),o=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(b.data.response);break;default:clearTimeout(f),clearTimeout(o),c(new Error("invalid_response"));break}}},this.handlers.add(s),r.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:t,eventId:u,data:e},[r.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})})}};function wr(){return window}function D6(i){wr().location.href=i}function PS(){return typeof wr().WorkerGlobalScope<"u"&&typeof wr().importScripts=="function"}function P6(){return D(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function R6(){var i;return((i=navigator?.serviceWorker)===null||i===void 0?void 0:i.controller)||null}function V6(){return PS()?self:null}var RS="firebaseLocalStorageDb",L6=1,Vh="firebaseLocalStorage",VS="fbase_key",Ms=class{constructor(t){this.request=t}toPromise(){return new Promise((t,e)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{e(this.request.error)})})}};function Nh(i,t){return i.transaction([Vh],t?"readwrite":"readonly").objectStore(Vh)}function F6(){let i=indexedDB.deleteDatabase(RS);return new Ms(i).toPromise()}function Dv(){let i=indexedDB.open(RS,L6);return new Promise((t,e)=>{i.addEventListener("error",()=>{e(i.error)}),i.addEventListener("upgradeneeded",()=>{let n=i.result;try{n.createObjectStore(Vh,{keyPath:VS})}catch(r){e(r)}}),i.addEventListener("success",()=>D(this,null,function*(){let n=i.result;n.objectStoreNames.contains(Vh)?t(n):(n.close(),yield F6(),t(yield Dv()))}))})}function aS(i,t,e){return D(this,null,function*(){let n=Nh(i,!0).put({[VS]:t,value:e});return new Ms(n).toPromise()})}function N6(i,t){return D(this,null,function*(){let e=Nh(i,!1).get(t),n=yield new Ms(e).toPromise();return n===void 0?null:n.value})}function lS(i,t){let e=Nh(i,!0).delete(t);return new Ms(e).toPromise()}var B6=800,z6=3,U6=(()=>{class i{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return D(this,null,function*(){return this.db?this.db:(this.db=yield Dv(),this.db)})}_withRetries(e){return D(this,null,function*(){let n=0;for(;;)try{let r=yield this._openDb();return yield e(r)}catch(r){if(n++>z6)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return D(this,null,function*(){return PS()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return D(this,null,function*(){this.receiver=A6._getInstance(V6()),this.receiver._subscribe("keyChanged",(e,n)=>D(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(e,n)=>D(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return D(this,null,function*(){var e,n;if(this.activeServiceWorker=yield P6(),!this.activeServiceWorker)return;this.sender=new Av(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return D(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||R6()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return D(this,null,function*(){try{if(!indexedDB)return!1;let e=yield Dv();return yield aS(e,Ph,"1"),yield lS(e,Ph),!0}catch{}return!1})}_withPendingWrite(e){return D(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,n){return D(this,null,function*(){return this._withPendingWrite(()=>D(this,null,function*(){return yield this._withRetries(r=>aS(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)}))})}_get(e){return D(this,null,function*(){let n=yield this._withRetries(r=>N6(r,e));return this.localCache[e]=n,n})}_remove(e){return D(this,null,function*(){return this._withPendingWrite(()=>D(this,null,function*(){return yield this._withRetries(n=>lS(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return D(this,null,function*(){let e=yield this._withRetries(o=>{let s=Nh(o,!1).getAll();return new Ms(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let n=[],r=new Set;if(e.length!==0)for(let{fbase_key:o,value:s}of e)r.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(s)&&(this.notifyListeners(o,s),n.push(o));for(let o of Object.keys(this.localCache))this.localCache[o]&&!r.has(o)&&(this.notifyListeners(o,null),n.push(o));return n})}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let o of Array.from(r))o(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>D(this,null,function*(){return this._poll()}),B6)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return i.type="LOCAL",i})(),LS=U6;var Bie=OS("rcb"),zie=new Os(3e4,6e4);function j6(i,t){return t?Hr(t):(Qe(i._popupRedirectResolver,i,"argument-error"),i._popupRedirectResolver)}var nd=class extends Ah{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return bv(t,this._buildIdpRequest())}_linkToIdToken(t,e){return bv(t,this._buildIdpRequest(e))}_getReauthenticationResolver(t){return bv(t,this._buildIdpRequest())}_buildIdpRequest(t){let e={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(e.idToken=t),e}};function H6(i){return T6(i.auth,new nd(i),i.bypassAuthState)}function G6(i){let{auth:t,user:e}=i;return Qe(e,t,"internal-error"),w6(e,new nd(i),i.bypassAuthState)}function $6(i){return D(this,null,function*(){let{auth:t,user:e}=i;return Qe(e,t,"internal-error"),I6(e,new nd(i),i.bypassAuthState)})}var Pv=class{constructor(t,e,n,r,o=!1){this.auth=t,this.resolver=n,this.user=r,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(e)?e:[e]}execute(){return new Promise((t,e)=>D(this,null,function*(){this.pendingPromise={resolve:t,reject:e};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}}))}onAuthEvent(t){return D(this,null,function*(){let{urlResponse:e,sessionId:n,postBody:r,tenantId:o,error:s,type:a}=t;if(s){this.reject(s);return}let c={auth:this.auth,requestUri:e,sessionId:n,tenantId:o||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(u){this.reject(u)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return H6;case"linkViaPopup":case"linkViaRedirect":return $6;case"reauthViaPopup":case"reauthViaRedirect":return G6;default:Do(this.auth,"internal-error")}}resolve(t){Po(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Po(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var Uie=new Os(2e3,1e4);var q6="pendingRedirect",Ih=new Map,Rv=class i extends Pv{constructor(t,e,n=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],e,void 0,n),this.eventId=null}execute(){return D(this,null,function*(){let t=Ih.get(this.auth._key());if(!t){try{let n=(yield W6(this.resolver,this.auth))?yield to(i.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(n)}catch(e){t=()=>Promise.reject(e)}Ih.set(this.auth._key(),t)}return this.bypassAuthState||Ih.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return D(this,null,function*(){if(t.type==="signInViaRedirect")return to(i.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){let e=yield this.auth._redirectUserForId(t.eventId);if(e)return this.user=e,to(i.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return D(this,null,function*(){})}cleanUp(){}};function W6(i,t){return D(this,null,function*(){let e=Y6(t),n=Q6(i);if(!(yield n._isAvailable()))return!1;let r=(yield n._get(e))==="true";return yield n._remove(e),r})}function K6(i,t){Ih.set(i._key(),t)}function Q6(i){return Hr(i._redirectPersistence)}function Y6(i){return Ch(q6,i.config.apiKey,i.name)}function Z6(i,t,e=!1){return D(this,null,function*(){let n=$v(i),r=j6(n,t),s=yield new Rv(n,r,e).execute();return s&&!e&&(delete s.user._redirectEventId,yield n._persistUserIfCurrent(s.user),yield n._setRedirectUser(null,t)),s})}var X6=10*60*1e3,Vv=class{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let e=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(t,n)&&(e=!0,this.sendToConsumer(t,n),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!J6(t)||(this.hasHandledPotentialRedirect=!0,e||(this.queuedRedirectEvent=t,e=!0)),e}sendToConsumer(t,e){var n;if(t.error&&!FS(t)){let r=((n=t.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";e.onError(Es(this.auth,r))}else e.onAuthEvent(t)}isEventForConsumer(t,e){let n=e.eventId===null||!!t.eventId&&t.eventId===e.eventId;return e.filter.includes(t.type)&&n}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=X6&&this.cachedEventUids.clear(),this.cachedEventUids.has(cS(t))}saveEventToCache(t){this.cachedEventUids.add(cS(t)),this.lastProcessedEventTime=Date.now()}};function cS(i){return[i.type,i.eventId,i.sessionId,i.tenantId].filter(t=>t).join("-")}function FS({type:i,error:t}){return i==="unknown"&&t?.code==="auth/no-auth-event"}function J6(i){switch(i.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return FS(i);default:return!1}}function eL(e){return D(this,arguments,function*(i,t={}){return La(i,"GET","/v1/projects",t)})}var tL=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,iL=/^https?/;function nL(i){return D(this,null,function*(){if(i.config.emulator)return;let{authorizedDomains:t}=yield eL(i);for(let e of t)try{if(rL(e))return}catch{}Do(i,"unauthorized-domain")})}function rL(i){let t=Iv(),{protocol:e,hostname:n}=new URL(t);if(i.startsWith("chrome-extension://")){let s=new URL(i);return s.hostname===""&&n===""?e==="chrome-extension:"&&i.replace("chrome-extension://","")===t.replace("chrome-extension://",""):e==="chrome-extension:"&&s.hostname===n}if(!iL.test(e))return!1;if(tL.test(i))return n===i;let r=i.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(n)}var oL=new Os(3e4,6e4);function dS(){let i=wr().___jsl;if(i?.H){for(let t of Object.keys(i.H))if(i.H[t].r=i.H[t].r||[],i.H[t].L=i.H[t].L||[],i.H[t].r=[...i.H[t].L],i.CP)for(let e=0;e{var n,r,o;function s(){dS(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{dS(),e(Es(i,"network-request-failed"))},timeout:oL.get()})}if(!((r=(n=wr().gapi)===null||n===void 0?void 0:n.iframes)===null||r===void 0)&&r.Iframe)t(gapi.iframes.getContext());else if(!((o=wr().gapi)===null||o===void 0)&&o.load)s();else{let a=OS("iframefcb");return wr()[a]=()=>{gapi.load?s():e(Es(i,"network-request-failed"))},_6(`${v6()}?onload=${a}`).catch(c=>e(c))}}).catch(t=>{throw wh=null,t})}var wh=null;function aL(i){return wh=wh||sL(i),wh}var lL=new Os(5e3,15e3),cL="__/auth/iframe",dL="emulator/auth/iframe",uL={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},pL=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function hL(i){let t=i.config;Qe(t.authDomain,i,"auth-domain-config-required");let e=t.emulator?Bv(t,dL):`https://${i.config.authDomain}/${cL}`,n={apiKey:t.apiKey,appName:i.name,v:ur},r=pL.get(i.config.apiHost);r&&(n.eid=r);let o=i._getFrameworks();return o.length&&(n.fw=o.join(",")),`${e}?${oc(n).slice(1)}`}function mL(i){return D(this,null,function*(){let t=yield aL(i),e=wr().gapi;return Qe(e,i,"internal-error"),t.open({where:document.body,url:hL(i),messageHandlersFilter:e.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:uL,dontclear:!0},n=>new Promise((r,o)=>D(this,null,function*(){yield n.restyle({setHideOnLeave:!1});let s=Es(i,"network-request-failed"),a=wr().setTimeout(()=>{o(s)},lL.get());function c(){wr().clearTimeout(a),r(n)}n.ping(c).then(c,()=>{o(s)})})))})}var fL={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},gL=500,_L=600,vL="_blank",yL="http://localhost",Lh=class{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function bL(i,t,e,n=gL,r=_L){let o=Math.max((window.screen.availHeight-r)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString(),a="",c=Object.assign(Object.assign({},fL),{width:n.toString(),height:r.toString(),top:o,left:s}),u=ri().toLowerCase();e&&(a=CS(u)?vL:e),bS(u)&&(t=t||yL,c.scrollbars="yes");let f=Object.entries(c).reduce((b,[O,V])=>`${b}${O}=${V},`,"");if(u6(u)&&a!=="_self")return CL(t||"",a),new Lh(null);let v=window.open(t||"",a,f);Qe(v,i,"popup-blocked");try{v.focus()}catch{}return new Lh(v)}function CL(i,t){let e=document.createElement("a");e.href=i,e.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(n)}var IL="__/auth/handler",wL="emulator/auth/handler",TL=encodeURIComponent("fac");function uS(i,t,e,n,r,o){return D(this,null,function*(){Qe(i.config.authDomain,i,"auth-domain-config-required"),Qe(i.config.apiKey,i,"invalid-api-key");let s={apiKey:i.config.apiKey,appName:i.name,authType:e,redirectUrl:n,v:ur,eventId:r};if(t instanceof Dh){t.setDefaultLanguage(i.languageCode),s.providerId=t.providerId||"",HI(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(let[f,v]of Object.entries(o||{}))s[f]=v}if(t instanceof Mv){let f=t.getScopes().filter(v=>v!=="");f.length>0&&(s.scopes=f.join(","))}i.tenantId&&(s.tid=i.tenantId);let a=s;for(let f of Object.keys(a))a[f]===void 0&&delete a[f];let c=yield i._getAppCheckToken(),u=c?`#${TL}=${encodeURIComponent(c)}`:"";return`${xL(i)}?${oc(a).slice(1)}${u}`})}function xL({config:i}){return i.emulator?Bv(i,wL):`https://${i.authDomain}/${IL}`}var Cv="webStorageSupport",Lv=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Zv,this._completeRedirectFn=Z6,this._overrideRedirectResult=K6}_openPopup(t,e,n,r){return D(this,null,function*(){var o;Po((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");let s=yield uS(t,e,n,Iv(),r);return bL(t,s,DS())})}_openRedirect(t,e,n,r){return D(this,null,function*(){yield this._originValidation(t);let o=yield uS(t,e,n,Iv(),r);return D6(o),new Promise(()=>{})})}_initialize(t){let e=t._key();if(this.eventManagers[e]){let{manager:r,promise:o}=this.eventManagers[e];return r?Promise.resolve(r):(Po(o,"If manager is not set, promise should be"),o)}let n=this.initAndGetManager(t);return this.eventManagers[e]={promise:n},n.catch(()=>{delete this.eventManagers[e]}),n}initAndGetManager(t){return D(this,null,function*(){let e=yield mL(t),n=new Vv(t);return e.register("authEvent",r=>(Qe(r?.authEvent,t,"invalid-auth-event"),{status:n.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:n},this.iframes[t._key()]=e,n})}_isIframeWebStorageSupported(t,e){this.iframes[t._key()].send(Cv,{type:Cv},r=>{var o;let s=(o=r?.[0])===null||o===void 0?void 0:o[Cv];s!==void 0&&e(!!s),Do(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){let e=t._key();return this.originValidationPromises[e]||(this.originValidationPromises[e]=nL(t)),this.originValidationPromises[e]}get _shouldInitProactively(){return SS()||Gv()||Fh()}},NS=Lv;var pS="@firebase/auth",hS="1.6.0";var Fv=class{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return D(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;let e=this.auth.onIdTokenChanged(n=>{t(n?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,e),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();let e=this.internalListeners.get(t);e&&(this.internalListeners.delete(t),e(),this.updateProactiveRefresh())}assertAuthConfigured(){Qe(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function SL(i){switch(i){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function EL(i){dr(new ln("auth",(t,{options:e})=>{let n=t.getProvider("app").getImmediate(),r=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=n.options;Qe(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});let c={apiKey:s,authDomain:a,clientPlatform:i,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ES(i)},u=new Ov(n,r,o,c);return y6(u,e),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,n)=>{t.getProvider("auth-internal").initialize()})),dr(new ln("auth-internal",t=>{let e=$v(t.getProvider("auth").getImmediate());return(n=>new Fv(n))(e)},"PRIVATE").setInstantiationMode("EXPLICIT")),Wt(pS,hS,SL(i)),Wt(pS,hS,"esm2017")}var OL=5*60,ML=sg("authIdTokenMaxAge")||OL,mS=null,kL=i=>t=>D(void 0,null,function*(){let e=t&&(yield t.getIdTokenResult()),n=e&&(new Date().getTime()-Date.parse(e.issuedAtTime))/1e3;if(n&&n>ML)return;let r=e?.token;mS!==r&&(mS=r,yield fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function Xv(i=Co()){let t=os(i,"auth");if(t.isInitialized())return t.getImmediate();let e=Wv(i,{popupRedirectResolver:NS,persistence:[LS,AS,Zv]}),n=sg("authTokenSyncURL");if(n){let o=kL(n);Yv(e,o,()=>o(e.currentUser)),Qv(e,s=>o(s))}let r=rg("auth");return r&&Kv(e,`http://${r}`),e}function AL(){var i,t;return(t=(i=document.getElementsByTagName("head"))===null||i===void 0?void 0:i[0])!==null&&t!==void 0?t:document}g6({loadJS(i){return new Promise((t,e)=>{let n=document.createElement("script");n.setAttribute("src",i),n.onload=t,n.onerror=r=>{let o=Es("internal-error");o.customData=r,e(o)},n.type="text/javascript",n.charset="UTF-8",AL().appendChild(n)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});EL("Browser");var BS="auth",Gr=class{constructor(t){return t}},ks=class{constructor(){return Ss(BS)}};var Jv=new le("angularfire2.auth-instances");function xF(i,t){let e=Va(BS,i,t);return e&&new Gr(e)}function SF(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new Gr(n)}}var EF={provide:ks,deps:[[new hi,Jv]]},OF={provide:Gr,useFactory:xF,deps:[[new hi,Jv],qn]},MF=(()=>{class i{constructor(){Wt("angularfire",zr.full,"auth")}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[OF,EF]})}return i})();function zS(i,...t){return{ngModule:MF,providers:[{provide:Jv,useFactory:SF(i),multi:!0,deps:[ge,Mi,ko,Ur,[new hi,Mo],...t]}]}}var US=$n(Xv,!0);var $r=class{constructor(t){return t}},HS="firestore",ey=class{constructor(){return Ss(HS)}};var ty=new le("angularfire2.firestore-instances");function kF(i,t){let e=Va(HS,i,t);return e&&new $r(e)}function AF(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new $r(n)}}var DF={provide:ey,deps:[[new hi,ty]]},PF={provide:$r,useFactory:kF,deps:[[new hi,ty],qn]},RF=(()=>{class i{constructor(){Wt("angularfire",zr.full,"fst")}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[PF,DF]})}return i})();function GS(i,...t){return{ngModule:RF,providers:[{provide:ty,useFactory:AF(i),multi:!0,deps:[ge,Mi,ko,Ur,[new hi,ks],[new hi,Mo],...t]}]}}var iy=$n(Ts,!0);var ny=$n(hh,!0);var $S=$n(Gx,!0);var qS=$n(fh,!0);var KS=(()=>{let t=class t{constructor(){this.commonErrors={UNKNOWN:"An unknown error is occurred.",EMAIL_EXISTS:"The email address is already in use by another account.",OPERATION_NOT_ALLOWED:"Password sign-in is disabled for this project.",TOO_MANY_ATTEMPTS_TRY_LATER:"We have blocked all requests from this device due to unusual activity. Try again later.",EMAIL_NOT_FOUND:"There is no user record corresponding to this identifier. The user may have been deleted.",INVALID_PASSWORD:"The password is invalid or the user does not have a password.",USER_DISABLED:"The user account has been disabled by an administrator.",EXPIRED_OOB_CODE:"Your Verification Code Has Been Expired, Request a New Code and Try Again.",INVALID_OOB_CODE:"Your Verification Code is Invalid or Already Used, Enter a Valid Code."}}handleAuthErrors(n){if(!n.error||!n.error.error)return io(this.commonErrors.UNKNOWN);{let r=n.error.error.message;return io(this.commonErrors[r])}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Kt=(()=>{let t=class t{constructor(n,r,o,s,a){this.http=n,this.db=r,this.errorService=o,this.router=s,this.auth=a,this.loggedInUser=st(null)}signupWithEmailAndPassword(n){let r=`https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=${ts.FIREBASE_API_KEY}`;return this.http.post(r,{email:n.email,password:n.password,returnSecureToken:!0}).pipe(cn(o=>this.errorService.handleAuthErrors(o)),It(o=>{this.authenticatedUser(o.email,o.localId,o.idToken,o.expiresIn)}))}signInWithEmailAndPassword(n){let r=`https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=${ts.FIREBASE_API_KEY}`;return this.http.post(r,{email:n.email,password:n.password,returnSecureToken:!0}).pipe(cn(o=>this.errorService.handleAuthErrors(o)),It(o=>{this.authenticatedUser(o.email,o.localId,o.idToken,o.expiresIn)}))}sendPasswordResetCodeToEmail(n){let r=`https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=${ts.FIREBASE_API_KEY}`;return this.http.post(r,{requestType:"PASSWORD_RESET",email:n}).pipe(cn(o=>this.errorService.handleAuthErrors(o)))}createUserData(n,r){return D(this,null,function*(){let o={username:n.username,email:n.email,dateOfBirth:n.dateOfBirth.toLocaleDateString(),language:{iso_639_1:"en",english_name:"English",name:"English"},region:{iso_3166_1:"US",english_name:"United States of America",native_name:"United States"},include_adult:!1,dark_mode:!0,data_saving_mode:!1,data_saving_type:null,accentColor:"#004124"},s={movies:[],celebrities:[],tvshows:[]};yield mh(Ts(this.db,"usersdata",r),o),yield mh(Ts(this.db,"savedList",r),s)})}updateUserData(n,r){return D(this,null,function*(){let o=Ts(this.db,"usersdata",r);yield fh(o,n)})}getUserData(n){return D(this,null,function*(){let r=yield hh(Ts(this.db,"usersdata",n));if(r.exists())return r.data()})}authenticatedUser(n,r,o,s){return D(this,null,function*(){let a=new Date(new Date().getTime()+ +s*1e3),c=new gh(n,r,o,a),u=yield this.getUserData(r),v=JSON.stringify({user:c,data:u});localStorage.setItem("user",v)})}getLoggedInUser(){if(this.loggedInUser())return this.loggedInUser();{let n=localStorage.getItem("user");if(n){let r=JSON.parse(n);this.loggedInUser.set(r)}else this.loggedInUser.set({language:{iso_639_1:"en",english_name:"English",name:"English"},region:{iso_3166_1:"US",english_name:"United States of America",native_name:"United States"},dark_mode:!0,demoAccount:!0});return this.loggedInUser()}}};t.\u0275fac=function(r){return new(r||t)(J(Sl),J($r),J(KS),J(bt),J(Gr))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function LF(i,t){}var FF=()=>({width:"100%",height:"calc(100vh - 2rem)",display:"grid",placeItems:"center"}),NF=()=>({width:"100%"}),QS=(()=>{let t=class t{constructor(n,r,o){this.authService=n,this.messageService=r,this.router=o,this.loginForm=new on({email:new ti("",[mn.required,mn.email]),password:new ti("",[mn.required,mn.minLength(3)])}),document.title="Login to Showbizhub"}login(){this.loginForm.valid&&this.authService.signInWithEmailAndPassword(this.loginForm.value).subscribe(n=>{this.router.navigate(["home"]),this.showToast("success","Welcome Back",n,5e3)},n=>{this.showToast("error","An Error Occcurred",n,5e3)})}showToast(n,r,o,s){this.messageService.add({severity:n,summary:r,detail:o,life:s})}};t.\u0275fac=function(r){return new(r||t)(w(Kt),w(ar),w(bt))},t.\u0275cmp=k({type:t,selectors:[["app-login"]],standalone:!0,features:[mt([ar]),R],decls:21,vars:10,consts:[["position","bottom-center"],["header","Login to ShowbizHub","subheader","Enter Your Credentials"],["pTemplate","header"],[3,"formGroup","ngSubmit"],[1,"p-float-label"],["pInputText","","id","email","formControlName","email"],["for","email"],["formControlName","password",3,"toggleMask","feedback","inputStyle"],["for","password"],["routerLink","/password-reset",2,"margin-bottom",".4rem"],[1,""],["label","Login","icon","pi pi-check","iconPos","right","type","submit","size","small",3,"rounded","disabled"],[1,"mt-2"],["routerLink","/signup"]],template:function(r,o){r&1&&(y(0,"p-toast",0),p(1,"p-card",1),g(2,LF,0,0,"ng-template",2),p(3,"form",3),A("ngSubmit",function(){return o.login()}),p(4,"div",4),y(5,"input",5),p(6,"label",6),_(7,"Email"),h()(),p(8,"span",4),y(9,"p-password",7),p(10,"label",8),_(11,"Password"),h()(),p(12,"a",9),_(13,"Forgot Password"),h(),p(14,"div",10),y(15,"p-button",11),p(16,"div",12),_(17," Don't Have an Account? "),p(18,"a",13),_(19,"Create One"),h()()()()(),y(20,"app-mini-celebrity-card")),r&2&&(d(),xt(Ke(8,FF)),d(2),l("formGroup",o.loginForm),d(6),l("toggleMask",!0)("feedback",!1)("inputStyle",Ke(9,NF)),d(6),l("rounded",!0)("disabled",o.loginForm.invalid))},dependencies:[Nu,tc,he,fn,_o,yt,ni,Bi,an,mo,ii,sn,Qi,Yi,oa,ra,Ve,et,Uu,zu,PI,sa],styles:["form[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{margin-bottom:1.5rem}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}"]});let i=t;return i})();var Bh=(()=>{class i{host;constructor(e){this.host=e}autofocus;focused=!1;ngAfterContentChecked(){if(!this.focused&&this.autofocus){let e=x.getFocusableElements(this.host.nativeElement);e.length===0&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0}}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275dir=it({type:i,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}})}return i})(),rd=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var BF=["overlay"],zF=["content"];function UF(i,t){i&1&&ie(0)}var jF=(i,t,e)=>({showTransitionParams:i,hideTransitionParams:t,transform:e}),HF=i=>({value:"visible",params:i}),GF=i=>({mode:i}),$F=i=>({$implicit:i});function qF(i,t){if(i&1){let e=G();p(0,"div",1,3),A("click",function(r){S(e);let o=m(2);return E(o.onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){S(e);let o=m(2);return E(o.onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){S(e);let o=m(2);return E(o.onOverlayContentAnimationDone(r))}),Ae(2),g(3,UF,1,0,"ng-container",4),h()}if(i&2){let e=m(2);U(e.contentStyleClass),l("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",H(11,HF,kt(7,jF,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),d(3),l("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",H(15,$F,H(13,GF,e.overlayMode)))}}var WF=(i,t,e,n,r,o,s,a,c,u,f,v,b,O)=>({"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":i,"p-overlay-center":t,"p-overlay-top":e,"p-overlay-top-start":n,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":c,"p-overlay-left-start":u,"p-overlay-left-end":f,"p-overlay-right":v,"p-overlay-right-start":b,"p-overlay-right-end":O});function KF(i,t){if(i&1){let e=G();p(0,"div",1,2),A("click",function(){S(e);let r=m();return E(r.onOverlayClick())}),g(2,qF,4,17,"div",0),h()}if(i&2){let e=m();U(e.styleClass),l("ngStyle",e.style)("ngClass",Ud(5,WF,[e.modal,e.modal&&e.overlayResponsiveDirection==="center",e.modal&&e.overlayResponsiveDirection==="top",e.modal&&e.overlayResponsiveDirection==="top-start",e.modal&&e.overlayResponsiveDirection==="top-end",e.modal&&e.overlayResponsiveDirection==="bottom",e.modal&&e.overlayResponsiveDirection==="bottom-start",e.modal&&e.overlayResponsiveDirection==="bottom-end",e.modal&&e.overlayResponsiveDirection==="left",e.modal&&e.overlayResponsiveDirection==="left-start",e.modal&&e.overlayResponsiveDirection==="left-end",e.modal&&e.overlayResponsiveDirection==="right",e.modal&&e.overlayResponsiveDirection==="right-start",e.modal&&e.overlayResponsiveDirection==="right-end"])),d(2),l("ngIf",e.visible)}}var QF=["*"],YF={provide:zt,useExisting:Tt(()=>As),multi:!0},ZF=Pr([Lt({transform:"{{transform}}",opacity:0}),Xt("{{showTransitionParams}}")]),XF=Pr([Xt("{{hideTransitionParams}}",Lt({transform:"{{transform}}",opacity:0}))]),As=(()=>{class i{document;platformId;el;renderer;config;overlayService;cd;zone;get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return re.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return re.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return re.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return re.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){let e=this._target||this.overlayOptions?.target;return e===void 0?"@prev":e}set target(e){this._target=e}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(e){this._appendTo=e}get autoZIndex(){let e=this._autoZIndex||this.overlayOptions?.autoZIndex;return e===void 0?!0:e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){let e=this._baseZIndex||this.overlayOptions?.baseZIndex;return e===void 0?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){let e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return e===void 0?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){let e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return e===void 0?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}visibleChange=new L;onBeforeShow=new L;onShow=new L;onBeforeHide=new L;onHide=new L;onAnimationStart=new L;onAnimationDone=new L;templates;overlayViewChild;contentViewChild;contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_appendTo;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;documentKeyboardListener;window;transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"};get modal(){if(ut(this.platformId))return this.mode==="modal"||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return F(F({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return F(F({},this.overlayOptions?.responsive),this.responsive)}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return x.getTargetElement(this.target,this.el?.nativeElement)}constructor(e,n,r,o,s,a,c,u){this.document=e,this.platformId=n,this.el=r,this.renderer=o,this.config=s,this.overlayService=a,this.cd=c,this.zone=u,this.window=this.document.defaultView}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}show(e,n=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),n&&x.focus(this.targetEl),this.modal&&x.addClass(this.document?.body,"p-overflow-hidden")}hide(e,n=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),n&&x.focus(this.targetEl),this.modal&&x.removeClass(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&x.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&Pt.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),x.appendOverlay(this.overlayEl,this.appendTo==="body"?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&x.addClass(this.overlayEl,"p-component-overlay-leave");break}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){let n=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.show(n,!0),this.bindListeners();break;case"void":this.hide(n,!0),this.unbindListeners(),x.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),Pt.clear(n),this.modalVisible=!1,this.cd.markForCheck();break}this.handleEvents("onAnimationDone",e)}handleEvents(e,n){this[e].emit(n),this.options&&this.options[e]&&this.options[e](n),this.config?.overlayOptions&&(this.config?.overlayOptions)[e]&&(this.config?.overlayOptions)[e](n)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new kn(this.targetEl,e=>{(this.listener?this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{let r=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:e.which!==3&&r}):r)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!x.isTouchDevice()}):!x.isTouchDevice())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",e=>{if(this.overlayOptions.hideOnEscape===!1||e.code!=="Escape")return;(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!x.isTouchDevice()}):!x.isTouchDevice())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(x.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),Pt.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(ve),w(nt),w(At),w(Mn),w(Ne),w(ge))};static \u0275cmp=k({type:i,selectors:[["p-overlay"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(BF,5),oe(zF,5)),n&2){let o;q(o=W())&&(r.overlayViewChild=o.first),q(o=W())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[mt([YF])],ngContentSelectors:QF,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(Ue(),g(0,KF,3,20,"div",0)),n&2&&l("ngIf",r.modalVisible)},dependencies:[xe,Ie,rt,Ce],styles:[`@layer primeng{.p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}} +`],encapsulation:2,data:{animation:[rn("overlayContentAnimation",[ei(":enter",[Ko(ZF)]),ei(":leave",[Ko(XF)])])]},changeDetection:0})}return i})(),qr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Te]})}return i})();var JF=["element"],eN=["content"];function tN(i,t){i&1&&ie(0)}var oy=(i,t)=>({$implicit:i,options:t});function iN(i,t){if(i&1&&(Z(0),g(1,tN,1,0,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",We(2,oy,e.loadedItems,e.getContentOptions()))}}function nN(i,t){i&1&&ie(0)}function rN(i,t){if(i&1&&(Z(0),g(1,nN,1,0,"ng-container",7),X()),i&2){let e=t.$implicit,n=t.index,r=m(3);d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",We(2,oy,e,r.getOptions(n)))}}var oN=i=>({"p-scroller-loading":i});function sN(i,t){if(i&1&&(p(0,"div",8,9),g(2,rN,2,5,"ng-container",10),h()),i&2){let e=m(2);l("ngClass",H(5,oN,e.d_loading))("ngStyle",e.contentStyle),T("data-pc-section","content"),d(2),l("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy||e.index)}}function aN(i,t){if(i&1&&y(0,"div",11),i&2){let e=m(2);l("ngStyle",e.spacerStyle),T("data-pc-section","spacer")}}function lN(i,t){i&1&&ie(0)}var cN=i=>({numCols:i}),ZS=i=>({options:i});function dN(i,t){if(i&1&&(Z(0),g(1,lN,1,0,"ng-container",7),X()),i&2){let e=t.index,n=m(4);d(),l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(4,ZS,n.getLoaderOptions(e,n.both&&H(2,cN,n._numItemsInViewport.cols))))}}function uN(i,t){if(i&1&&(Z(0),g(1,dN,2,6,"ng-container",14),X()),i&2){let e=m(3);d(),l("ngForOf",e.loaderArr)}}function pN(i,t){i&1&&ie(0)}var hN=()=>({styleClass:"p-scroller-loading-icon"});function mN(i,t){if(i&1&&(Z(0),g(1,pN,1,0,"ng-container",7),X()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.loaderIconTemplate)("ngTemplateOutletContext",H(3,ZS,Ke(2,hN)))}}function fN(i,t){i&1&&y(0,"SpinnerIcon",16),i&2&&(l("styleClass","p-scroller-loading-icon pi-spin"),T("data-pc-section","loadingIcon"))}function gN(i,t){if(i&1&&g(0,mN,2,5,"ng-container",0)(1,fN,1,2,"ng-template",null,15,dt),i&2){let e=Le(2),n=m(3);l("ngIf",n.loaderIconTemplate)("ngIfElse",e)}}var _N=i=>({"p-component-overlay":i});function vN(i,t){if(i&1&&(p(0,"div",12),g(1,uN,2,1,"ng-container",0)(2,gN,3,2,"ng-template",null,13,dt),h()),i&2){let e=Le(3),n=m(2);l("ngClass",H(4,_N,!n.loaderTemplate)),T("data-pc-section","loader"),d(),l("ngIf",n.loaderTemplate)("ngIfElse",e)}}var yN=(i,t,e)=>({"p-scroller":!0,"p-scroller-inline":i,"p-both-scroll":t,"p-horizontal-scroll":e});function bN(i,t){if(i&1){let e=G();Z(0),p(1,"div",2,3),A("scroll",function(r){S(e);let o=m();return E(o.onContainerScroll(r))}),g(3,iN,2,5,"ng-container",0)(4,sN,3,7,"ng-template",null,4,dt)(6,aN,1,2,"div",5)(7,vN,4,6,"div",6),h(),X()}if(i&2){let e=Le(5),n=m();d(),U(n._styleClass),l("ngStyle",n._style)("ngClass",kt(12,yN,n.inline,n.both,n.horizontal)),T("id",n._id)("tabindex",n.tabindex)("data-pc-name","scroller")("data-pc-section","root"),d(2),l("ngIf",n.contentTemplate)("ngIfElse",e),d(3),l("ngIf",n._showSpacer),d(),l("ngIf",!n.loaderDisabled&&n._showLoader&&n.d_loading)}}function CN(i,t){i&1&&ie(0)}var IN=(i,t)=>({rows:i,columns:t});function wN(i,t){if(i&1&&(Z(0),g(1,CN,1,0,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",We(5,oy,e.items,We(2,IN,e._items,e.loadedColumns)))}}function TN(i,t){if(i&1&&(Ae(0),g(1,wN,2,8,"ng-container",17)),i&2){let e=m();d(),l("ngIf",e.contentTemplate)}}var xN=["*"],Fa=(()=>{class i{document;platformId;renderer;cd;zone;get id(){return this._id}set id(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&typeof e=="object"&&Object.entries(e).forEach(([n,r])=>this[`_${n}`]!==r&&(this[`_${n}`]=r))}onLazyLoad=new L;onScroll=new L;onScrollIndexChange=new L;elementViewChild;contentViewChild;templates;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;windowResizeListener;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(e=>this._columns?e:e.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}constructor(e,n,r,o,s){this.document=e,this.platformId=n,this.renderer=r,this.cd=o,this.zone=s}ngOnInit(){this.setInitialState()}ngOnChanges(e){let n=!1;if(e.loading){let{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,n=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){let{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){let{previousValue:r,currentValue:o}=e.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,n=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!n&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"item":this.itemTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"loadericon":this.loaderIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}ngAfterViewInit(){Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){ut(this.platformId)&&x.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=x.getWidth(this.elementViewChild?.nativeElement),this.defaultHeight=x.getHeight(this.elementViewChild?.nativeElement),this.defaultContentWidth=x.getWidth(this.contentEl),this.defaultContentHeight=x.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||x.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(e){return Math.floor(((e??this.first)+this.d_numToleratedItems*4)/(this._step||1))}isPageChanged(e){return this._step?this.page!==this.getPageByFirst(e??this.first):!0}scrollTo(e){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,n="auto"){let{numToleratedItems:r}=this.calculateNumItems(),o=this.getContentPosition(),s=(f=0,v)=>f<=v?0:f,a=(f,v,b)=>f*v+b,c=(f=0,v=0)=>this.scrollTo({left:f,top:v,behavior:n}),u=0;if(this.both)u={rows:s(e[0],r[0]),cols:s(e[1],r[1])},c(a(u.cols,this._itemSize[1],o.left),a(u.rows,this._itemSize[0],o.top));else if(u=s(e,r),this.horizontal&&c(a(u,this._itemSize,o.left),0),this.vertical){let f=this.elementViewChild?.nativeElement.scrollLeft;c(f,a(u,this._itemSize,o.top))}this.isRangeChanged=this.first!==u,this.first=u}scrollInView(e,n,r="auto"){if(n){let{first:o,viewport:s}=this.getRenderedRange(),a=(f=0,v=0)=>this.scrollTo({left:f,top:v,behavior:r}),c=n==="to-start",u=n==="to-end";if(c){if(this.both)s.first.rows-o.rows>e[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>e[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>e){let f=(s.first-1)*this._itemSize;this.horizontal?a(f,0):a(0,f)}}else if(u){if(this.both)s.last.rows-o.rows<=e[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=e[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=e+1){let f=(s.first+1)*this._itemSize;this.horizontal?a(f,0):a(0,f)}}}else this.scrollToIndex(e,r)}getRenderedRange(){let e=(o,s)=>Math.floor(o/(s||o)),n=this.first,r=0;if(this.elementViewChild?.nativeElement){let{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;if(this.both)n={rows:e(o,this._itemSize[0]),cols:e(s,this._itemSize[1])},r={rows:n.rows+this.numItemsInViewport.rows,cols:n.cols+this.numItemsInViewport.cols};else{let a=this.horizontal?s:o;n=e(a,this._itemSize),r=n+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:n,last:r}}}calculateNumItems(){let e=this.getContentPosition(),n=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0)||0,r=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0)||0,o=(u,f)=>Math.ceil(u/(f||u)),s=u=>Math.ceil(u/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(n,this._itemSize[1])}:o(this.horizontal?n:r,this._itemSize),c=this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a));return{numItemsInViewport:a,numToleratedItems:c}}calculateOptions(){let{numItemsInViewport:e,numToleratedItems:n}=this.calculateNumItems(),r=(a,c,u,f=!1)=>this.getLast(a+c+(aArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[e,n]=[x.getWidth(this.contentEl),x.getHeight(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),n!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[r,o]=[x.getWidth(this.elementViewChild.nativeElement),x.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",n)):o("height",r)}}setSpacerSize(){if(this._items){let e=this.getContentPosition(),n=(r,o,s,a=0)=>this.spacerStyle=pe(F({},this.spacerStyle),{[`${r}`]:(o||[]).length*s+a+"px"});this.both?(n("height",this._items,this._itemSize[0],e.y),n("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?n("width",this._columns||this._items,this._itemSize,e.x):n("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){let n=e?e.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle=pe(F({},this.contentStyle),{transform:`translate3d(${s}px, ${a}px, 0)`});if(this.both)o(r(n.cols,this._itemSize[1]),r(n.rows,this._itemSize[0]));else{let s=r(n,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(e){let n=e.target,r=this.getContentPosition(),o=(P,j)=>P?P>j?P-j:P:0,s=(P,j)=>Math.floor(P/(j||P)),a=(P,j,ce,_e,me,$e)=>P<=me?me:$e?ce-_e-me:j+me-1,c=(P,j,ce,_e,me,$e,He)=>P<=$e?0:Math.max(0,He?Pj?ce:P-2*$e),u=(P,j,ce,_e,me,$e=!1)=>{let He=j+_e+2*me;return P>=me&&(He+=me+1),this.getLast(He,$e)},f=o(n.scrollTop,r.top),v=o(n.scrollLeft,r.left),b=this.both?{rows:0,cols:0}:0,O=this.last,V=!1,K=this.lastScrollPos;if(this.both){let P=this.lastScrollPos.top<=f,j=this.lastScrollPos.left<=v;if(!this._appendOnly||this._appendOnly&&(P||j)){let ce={rows:s(f,this._itemSize[0]),cols:s(v,this._itemSize[1])},_e={rows:a(ce.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],P),cols:a(ce.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],j)};b={rows:c(ce.rows,_e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],P),cols:c(ce.cols,_e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],j)},O={rows:u(ce.rows,b.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:u(ce.cols,b.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},V=b.rows!==this.first.rows||O.rows!==this.last.rows||b.cols!==this.first.cols||O.cols!==this.last.cols||this.isRangeChanged,K={top:f,left:v}}}else{let P=this.horizontal?v:f,j=this.lastScrollPos<=P;if(!this._appendOnly||this._appendOnly&&j){let ce=s(P,this._itemSize),_e=a(ce,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,j);b=c(ce,_e,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,j),O=u(ce,b,this.last,this.numItemsInViewport,this.d_numToleratedItems),V=b!==this.first||O!==this.last||this.isRangeChanged,K=P}}return{first:b,last:O,isRangeChanged:V,scrollPos:K}}onScrollChange(e){let{first:n,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(e);if(o){let a={first:n,last:r};if(this.setContentPosition(a),this.first=n,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged(n)){let c={first:this._step?Math.min(this.getPageByFirst(n)*this._step,this.items.length-this._step):n,last:Math.min(this._step?(this.getPageByFirst(n)+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==c.first||this.lazyLoadState.last!==c.last)&&this.handleEvents("onLazyLoad",c),this.lazyLoadState=c}}}onContainerScroll(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){let{isRangeChanged:n}=this.onScrollPositionChange(e);(n||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),this.d_loading&&this.showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(e)}bindResizeListener(){ut(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let e=this.document.defaultView,n=x.isTouchDevice()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(e,n,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(x.isVisible(this.elementViewChild?.nativeElement)){let[e,n]=[x.getWidth(this.elementViewChild?.nativeElement),x.getHeight(this.elementViewChild?.nativeElement)],[r,o]=[e!==this.defaultWidth,n!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical?o:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=n,this.defaultContentWidth=x.getWidth(this.contentEl),this.defaultContentHeight=x.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,n){return this.options&&this.options[e]?this.options[e](n):this[e].emit(n)}getContentOptions(){return{contentStyleClass:`p-scroller-content ${this.d_loading?"p-scroller-loading":""}`,items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,n)=>this.getLoaderOptions(e,n),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(e){let n=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:n,first:r===0,last:r===n-1,even:r%2===0,odd:r%2!==0}}getLoaderOptions(e,n){let r=this.loaderArr.length;return F({index:e,count:r,first:e===0,last:e===r-1,even:e%2===0,odd:e%2!==0},n)}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(nt),w(Ne),w(ge))};static \u0275cmp=k({type:i,selectors:[["p-scroller"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(JF,5),oe(eN,5)),n&2){let o;q(o=W())&&(r.elementViewChild=o.first),q(o=W())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Mt],ngContentSelectors:xN,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["disabledContainer",""],[3,"ngStyle","ngClass","scroll"],["element",""],["buildInContent",""],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],["buildInLoader",""],[4,"ngFor","ngForOf"],["buildInLoaderIcon",""],[3,"styleClass"],[4,"ngIf"]],template:function(n,r){if(n&1&&(Ue(),g(0,bN,8,16,"ng-container",0)(1,TN,2,1,"ng-template",null,1,dt)),n&2){let o=Le(2);l("ngIf",!r._disabled)("ngIfElse",o)}},dependencies:()=>[xe,Vt,Ie,rt,Ce,Vr],styles:[`@layer primeng{p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{scale:2}.p-scroller-inline .p-scroller-content{position:static}} +`],encapsulation:2})}return i})(),Wr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Vr,Te]})}return i})();var Ro=(()=>{class i{platformId;el;zone;config;renderer;viewContainer;tooltipPosition;tooltipEvent="hover";appendTo;positionStyle;tooltipStyleClass;tooltipZIndex;escape=!0;showDelay;hideDelay;life;positionTop;positionLeft;autoHide=!0;fitContent=!0;hideOnEscape=!0;content;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}tooltipOptions;_tooltipOptions={tooltipLabel:null,tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",positionStyle:null,tooltipStyleClass:null,tooltipZIndex:"auto",escape:!0,disabled:null,showDelay:null,hideDelay:null,positionTop:null,positionLeft:null,life:null,autoHide:!0,hideOnEscape:!0,id:Me()+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;scrollHandler;resizeListener;constructor(e,n,r,o,s,a){this.platformId=e,this.el=n,this.zone=r,this.config=o,this.renderer=s,this.viewContainer=a}ngAfterViewInit(){ut(this.platformId)&&this.zone.runOutsideAngular(()=>{if(this.getOption("tooltipEvent")==="hover")this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener);else if(this.getOption("tooltipEvent")==="focus"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.content&&(this.setOption({tooltipLabel:e.content.currentValue}),this.active&&(e.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.id&&this.setOption({id:e.id.currentValue}),e.tooltipOptions&&(this._tooltipOptions=F(F({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.isAutoHide()?this.deactivate():!(x.hasClass(e.relatedTarget,"p-tooltip")||x.hasClass(e.relatedTarget,"p-tooltip-text")||x.hasClass(e.relatedTarget,"p-tooltip-arrow"))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){this.deactivate()}onPressEscape(){this.hideOnEscape&&this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div"),this.container.setAttribute("id",this.getOption("id")),this.container.setAttribute("role","tooltip");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),this.getOption("appendTo")==="body"?document.body.appendChild(this.container):this.getOption("appendTo")==="target"?x.appendChild(this.container,this.el.nativeElement):x.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let e=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(e,"mouseleave",n=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),x.fadeIn(this.container,250),this.getOption("tooltipZIndex")==="auto"?Pt.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){this.getOption("tooltipZIndex")==="auto"&&Pt.clear(this.container),this.remove()}updateText(){let e=this.getOption("tooltipLabel");if(e instanceof zd){let n=this.viewContainer.createEmbeddedView(e);n.detectChanges(),n.rootNodes.forEach(r=>this.tooltipText.appendChild(r))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(e))):this.tooltipText.innerHTML=e}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break}}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let e=this.el.nativeElement.getBoundingClientRect(),n=e.left+x.getWindowScrollLeft(),r=e.top+x.getWindowScrollTop();return{left:n,top:r}}else return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),n=e.left+x.getOuterWidth(this.el.nativeElement),r=e.top+(x.getOuterHeight(this.el.nativeElement)-x.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),n=e.left-x.getOuterWidth(this.container),r=e.top+(x.getOuterHeight(this.el.nativeElement)-x.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),n=e.left+(x.getOuterWidth(this.el.nativeElement)-x.getOuterWidth(this.container))/2,r=e.top-x.getOuterHeight(this.container);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),n=e.left+(x.getOuterWidth(this.el.nativeElement)-x.getOuterWidth(this.container))/2,r=e.top+x.getOuterHeight(this.el.nativeElement);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=F(F({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return x.hasClass(e,"p-inputwrapper")?x.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let n="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?n+" "+this.getOption("tooltipStyleClass"):n}isOutOfBounds(){let e=this.container.getBoundingClientRect(),n=e.top,r=e.left,o=x.getOuterWidth(this.container),s=x.getOuterHeight(this.container),a=x.getViewport();return r+o>a.width||r<0||n<0||n+s>a.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new kn(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if(this.getOption("tooltipEvent")==="hover")this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if(this.getOption("tooltipEvent")==="focus"){let e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):x.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&Pt.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(n){return new(n||i)(w(vt),w(ve),w(ge),w(At),w(nt),w(Hs))};static \u0275dir=it({type:i,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],hostBindings:function(n,r){n&1&&A("keydown.escape",function(s){return r.onPressEscape(s)},!1,Lm)},inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",autoHide:"autoHide",fitContent:"fitContent",hideOnEscape:"hideOnEscape",content:[$t.None,"pTooltip","content"],disabled:[$t.None,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Mt]})}return i})(),Pn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var en=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronDownIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var Na=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["SearchIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();function SN(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(),n;d(),z((n=e.label)!==null&&n!==void 0?n:"empty")}}function EN(i,t){i&1&&ie(0)}var od=i=>({height:i}),ON=(i,t,e)=>({"p-dropdown-item":!0,"p-highlight":i,"p-disabled":t,"p-focus":e}),ay=i=>({$implicit:i}),MN=["container"],kN=["filter"],AN=["focusInput"],DN=["editableInput"],PN=["items"],RN=["scroller"],VN=["overlay"],LN=["firstHiddenFocusableEl"],FN=["lastHiddenFocusableEl"];function NN(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(2);d(),z(e.label()==="p-emptylabel"?"\xA0":e.label())}}function BN(i,t){i&1&&ie(0)}function zN(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(3);d(),z(e.label()==="p-emptylabel"?"\xA0":e.placeholder)}}function UN(i,t){if(i&1&&g(0,zN,2,1,"span",4),i&2){let e=m(2);l("ngIf",(e.modelValue()===void 0||e.modelValue===null)&&(e.label()===e.placeholder||e.label()&&!e.placeholder))}}function jN(i,t){if(i&1){let e=G();p(0,"span",10,11),A("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))})("keydown",function(r){S(e);let o=m();return E(o.onKeyDown(r))}),g(2,NN,2,1,"ng-container",12)(3,BN,1,0,"ng-container",13)(4,UN,1,1,"ng-template",null,14,dt),h()}if(i&2){let e=Le(5),n=m();l("ngClass",n.inputClass)("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass)("autofocus",n.autofocus),T("aria-disabled",n.disabled)("id",n.inputId)("aria-label",n.ariaLabel||(n.label()==="p-emptylabel"?void 0:n.label()))("aria-labelledby",n.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",n.overlayVisible)("aria-controls",n.id+"_list")("tabindex",n.disabled?-1:n.tabindex)("aria-activedescendant",n.focused?n.focusedOptionId:void 0)("aria-required",n.required)("required",n.required),d(2),l("ngIf",!n.selectedItemTemplate)("ngIfElse",e),d(),l("ngTemplateOutlet",n.selectedItemTemplate)("ngTemplateOutletContext",H(21,ay,n.selectedOption))}}function HN(i,t){if(i&1){let e=G();p(0,"input",15,16),A("input",function(r){S(e);let o=m();return E(o.onEditableInput(r))})("keydown",function(r){S(e);let o=m();return E(o.onKeyDown(r))})("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))}),h()}if(i&2){let e=m();l("ngClass",e.inputClass)("disabled",e.disabled),T("maxlength",e.maxlength)("placeholder",e.modelValue()===void 0||e.modelValue()===null?e.placeholder:void 0)("aria-expanded",e.overlayVisible)}}function GN(i,t){if(i&1){let e=G();p(0,"TimesIcon",19),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),h()}i&2&&(l("styleClass","p-dropdown-clear-icon"),T("data-pc-section","clearicon"))}function $N(i,t){}function qN(i,t){i&1&&g(0,$N,0,0,"ng-template")}function WN(i,t){if(i&1){let e=G();p(0,"span",20),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),g(1,qN,1,0,null,21),h()}if(i&2){let e=m(2);T("data-pc-section","clearicon"),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function KN(i,t){if(i&1&&(Z(0),g(1,GN,1,2,"TimesIcon",17)(2,WN,2,2,"span",18),X()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function QN(i,t){if(i&1&&y(0,"span",24),i&2){let e=m(2);l("ngClass",e.dropdownIcon)}}function YN(i,t){i&1&&y(0,"ChevronDownIcon",25),i&2&&l("styleClass","p-dropdown-trigger-icon")}function ZN(i,t){if(i&1&&(Z(0),g(1,QN,1,1,"span",22)(2,YN,1,1,"ChevronDownIcon",23),X()),i&2){let e=m();d(),l("ngIf",e.dropdownIcon),d(),l("ngIf",!e.dropdownIcon)}}function XN(i,t){}function JN(i,t){i&1&&g(0,XN,0,0,"ng-template")}function e9(i,t){if(i&1&&(p(0,"span",26),g(1,JN,1,0,null,21),h()),i&2){let e=m();d(),l("ngTemplateOutlet",e.dropdownIconTemplate)}}function t9(i,t){i&1&&ie(0)}function i9(i,t){i&1&&ie(0)}var XS=i=>({options:i});function n9(i,t){if(i&1&&(Z(0),g(1,i9,1,0,"ng-container",13),X()),i&2){let e=m(3);d(),l("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",H(2,XS,e.filterOptions))}}function r9(i,t){i&1&&y(0,"SearchIcon",25),i&2&&l("styleClass","p-dropdown-filter-icon")}function o9(i,t){}function s9(i,t){i&1&&g(0,o9,0,0,"ng-template")}function a9(i,t){if(i&1&&(p(0,"span",41),g(1,s9,1,0,null,21),h()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.filterIconTemplate)}}function l9(i,t){if(i&1){let e=G();p(0,"div",37)(1,"input",38,39),A("input",function(r){S(e);let o=m(3);return E(o.onFilterInputChange(r))})("keydown",function(r){S(e);let o=m(3);return E(o.onFilterKeyDown(r))})("blur",function(r){S(e);let o=m(3);return E(o.onFilterBlur(r))}),h(),g(3,r9,1,1,"SearchIcon",23)(4,a9,2,1,"span",40),h()}if(i&2){let e=m(3);d(),l("value",e._filterValue()||""),T("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),d(2),l("ngIf",!e.filterIconTemplate),d(),l("ngIf",e.filterIconTemplate)}}function c9(i,t){if(i&1&&(p(0,"div",35),A("click",function(n){return n.stopPropagation()}),g(1,n9,2,4,"ng-container",12)(2,l9,5,7,"ng-template",null,36,dt),h()),i&2){let e=Le(3),n=m(2);d(),l("ngIf",n.filterTemplate)("ngIfElse",e)}}function d9(i,t){i&1&&ie(0)}var JS=(i,t)=>({$implicit:i,options:t});function u9(i,t){if(i&1&&g(0,d9,1,0,"ng-container",13),i&2){let e=t.$implicit,n=t.options;m(2);let r=Le(9);l("ngTemplateOutlet",r)("ngTemplateOutletContext",We(2,JS,e,n))}}function p9(i,t){i&1&&ie(0)}function h9(i,t){if(i&1&&g(0,p9,1,0,"ng-container",13),i&2){let e=t.options,n=m(4);l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(2,XS,e))}}function m9(i,t){i&1&&(Z(0),g(1,h9,1,4,"ng-template",44),X())}function f9(i,t){if(i&1){let e=G();p(0,"p-scroller",42,43),A("onLazyLoad",function(r){S(e);let o=m(2);return E(o.onLazyLoad.emit(r))}),g(2,u9,1,5,"ng-template",9)(3,m9,2,0,"ng-container",4),h()}if(i&2){let e=m(2);xt(H(8,od,e.scrollHeight)),l("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),d(3),l("ngIf",e.loaderTemplate)}}function g9(i,t){i&1&&ie(0)}var _9=()=>({});function v9(i,t){if(i&1&&(Z(0),g(1,g9,1,0,"ng-container",13),X()),i&2){m();let e=Le(9),n=m();d(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",We(3,JS,n.visibleOptions(),Ke(2,_9)))}}function y9(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit,n=m(3);d(),z(n.getOptionGroupLabel(e.optionGroup))}}function b9(i,t){i&1&&ie(0)}function C9(i,t){if(i&1&&(Z(0),p(1,"li",49),g(2,y9,2,1,"span",4)(3,b9,1,0,"ng-container",13),h(),X()),i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("ngStyle",H(5,od,o.itemSize+"px")),T("id",s.id+"_"+s.getOptionIndex(n,o)),d(),l("ngIf",!s.groupTemplate),d(),l("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",H(7,ay,r.optionGroup))}}function I9(i,t){if(i&1){let e=G();Z(0),p(1,"p-dropdownItem",50),A("onClick",function(r){S(e);let o=m().$implicit,s=m(3);return E(s.onOptionSelect(r,o))})("onMouseEnter",function(r){S(e);let o=m().index,s=m().options,a=m(2);return E(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))}),h(),X()}if(i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("id",s.id+"_"+s.getOptionIndex(n,o))("option",r)("selected",s.isSelected(r))("label",s.getOptionLabel(r))("disabled",s.isOptionDisabled(r))("template",s.itemTemplate)("focused",s.focusedOptionIndex()===s.getOptionIndex(n,o))("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(n,o)))("ariaSetSize",s.ariaSetSize)}}function w9(i,t){if(i&1&&g(0,C9,4,9,"ng-container",4)(1,I9,2,9,"ng-container",4),i&2){let e=t.$implicit,n=m(3);l("ngIf",n.isOptionGroup(e)),d(),l("ngIf",!n.isOptionGroup(e))}}function T9(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyFilterMessageLabel," ")}}function x9(i,t){i&1&&ie(0,null,52)}function S9(i,t){if(i&1&&(p(0,"li",51),g(1,T9,2,1,"ng-container",12)(2,x9,2,0,"ng-container",21),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,od,e.itemSize+"px")),d(),l("ngIf",!n.emptyFilterTemplate&&!n.emptyTemplate)("ngIfElse",n.emptyFilter),d(),l("ngTemplateOutlet",n.emptyFilterTemplate||n.emptyTemplate)}}function E9(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyMessageLabel," ")}}function O9(i,t){i&1&&ie(0,null,53)}function M9(i,t){if(i&1&&(p(0,"li",51),g(1,E9,2,1,"ng-container",12)(2,O9,2,0,"ng-container",21),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,od,e.itemSize+"px")),d(),l("ngIf",!n.emptyTemplate)("ngIfElse",n.empty),d(),l("ngTemplateOutlet",n.emptyTemplate)}}function k9(i,t){if(i&1&&(p(0,"ul",45,46),g(2,w9,2,2,"ng-template",47)(3,S9,3,6,"li",48)(4,M9,3,6,"li",48),h()),i&2){let e=t.$implicit,n=t.options,r=m(2);xt(n.contentStyle),l("ngClass",n.contentStyleClass),T("id",r.id+"_list"),d(2),l("ngForOf",e),d(),l("ngIf",r.filterValue&&r.isEmpty()),d(),l("ngIf",!r.filterValue&&r.isEmpty())}}function A9(i,t){i&1&&ie(0)}function D9(i,t){if(i&1){let e=G();p(0,"div",27)(1,"span",28,29),A("focus",function(r){S(e);let o=m();return E(o.onFirstHiddenFocus(r))}),h(),g(3,t9,1,0,"ng-container",21)(4,c9,4,2,"div",30),p(5,"div",31),g(6,f9,4,10,"p-scroller",32)(7,v9,2,6,"ng-container",4)(8,k9,5,7,"ng-template",null,33,dt),h(),g(10,A9,1,0,"ng-container",21),p(11,"span",28,34),A("focus",function(r){S(e);let o=m();return E(o.onLastHiddenFocus(r))}),h()()}if(i&2){let e=m();U(e.panelStyleClass),l("ngClass","p-dropdown-panel p-component")("ngStyle",e.panelStyle),d(),T("aria-hidden",!0)("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),d(2),l("ngTemplateOutlet",e.headerTemplate),d(),l("ngIf",e.filter),d(),ki("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),d(),l("ngIf",e.virtualScroll),d(),l("ngIf",!e.virtualScroll),d(3),l("ngTemplateOutlet",e.footerTemplate),d(),T("aria-hidden",!0)("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var P9={provide:zt,useExisting:Tt(()=>Kn),multi:!0},R9=(()=>{class i{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;onClick=new L;onMouseEnter=new L;ngOnInit(){}onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{id:"id",option:"option",selected:"selected",focused:"focused",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template"},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},decls:3,vars:21,consts:[["role","option","pRipple","",3,"id","ngStyle","ngClass","click","mouseenter"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(p(0,"li",0),A("click",function(s){return r.onOptionClick(s)})("mouseenter",function(s){return r.onOptionMouseEnter(s)}),g(1,SN,2,1,"span",1)(2,EN,1,0,"ng-container",2),h()),n&2&&(l("id",r.id)("ngStyle",H(13,od,r.itemSize+"px"))("ngClass",kt(15,ON,r.selected,r.disabled,r.focused)),T("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled),d(),l("ngIf",!r.template),d(),l("ngTemplateOutlet",r.template)("ngTemplateOutletContext",H(19,ay,r.option)))},dependencies:[xe,Ie,rt,Ce,ui],encapsulation:2})}return i})(),Kn=(()=>{class i{el;renderer;cd;zone;filterService;config;id;scrollHeight="200px";filter;name;style;panelStyle;styleClass;panelStyleClass;readonly;required;editable;appendTo;tabindex=0;placeholder;filterPlaceholder;filterLocale;inputId;dataKey;filterBy;filterFields;autofocus;resetFilterOnHide=!1;dropdownIcon;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";autoDisplayFirst=!0;group;showClear;emptyFilterMessage="";emptyMessage="";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;ariaLabel;ariaLabelledBy;filterMatchMode="contains";maxlength;tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;focusOnHover=!1;selectOnFocus=!1;autoOptionFocus=!0;autofocusFilter=!0;get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}_itemSize;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_autoZIndex;get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_baseZIndex;get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_showTransitionOptions;get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_hideTransitionOptions;get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get options(){return this._options()}set options(e){re.deepEquals(e,this._options())||this._options.set(e)}onChange=new L;onFilter=new L;onFocus=new L;onBlur=new L;onClick=new L;onShow=new L;onHide=new L;onClear=new L;onLazyLoad=new L;containerViewChild;filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;templates;_disabled;itemsWrapper;itemTemplate;groupTemplate;loaderTemplate;selectedItemTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;dropdownIconTemplate;clearIconTemplate;filterIconTemplate;filterOptions;_options=st(null);modelValue=st(null);value;onModelChange=()=>{};onModelTouched=()=>{};hover;focused;overlayVisible;optionsChanged;panel;dimensionsUpdated;hoveredItem;selectedOptionUpdated;_filterValue=st(null);searchValue;searchIndex;searchTimeout;previousSearchChar;currentSearchChar;preventModelTouched;focusedOptionIndex=st(-1);labelId;listId;get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Jt.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Jt.EMPTY_FILTER_MESSAGE)}get filled(){return typeof this.modelValue()=="string"?!!this.modelValue():this.modelValue()||this.modelValue()!=null||this.modelValue()!=null}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.disabled}get containerClass(){return{"p-dropdown p-component p-inputwrapper":!0,"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue()!==void 0&&this.modelValue()!==null&&!this.modelValue().length,"p-inputwrapper-focus":this.focused||this.overlayVisible}}get inputClass(){let e=this.label();return{"p-dropdown-label p-inputtext":!0,"p-placeholder":this.placeholder&&e===this.placeholder,"p-dropdown-label-empty":!this.editable&&!this.selectedItemTemplate&&(!e||e==="p-emptylabel"||e.length===0)}}get panelClass(){return{"p-dropdown-panel p-component":!0,"p-input-filled":this.config.inputStyle==="filled","p-ripple-disabled":this.config.ripple===!1}}visibleOptions=yi(()=>{let e=this.group?this.flatOptions(this.options):this.options||[];if(this._filterValue()){let r=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(o=>o.toLowerCase().indexOf(this._filterValue().toLowerCase())!==-1):this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale);if(this.group){let o=this.options||[],s=[];return o.forEach(a=>{let u=this.getOptionGroupChildren(a).filter(f=>r.includes(f));u.length>0&&s.push(pe(F({},a),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...u]}))}),this.flatOptions(s)}return r}return e});label=yi(()=>{let e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions()[e]):this.placeholder||"p-emptylabel"});selectedOption;editableInputValue=yi(()=>this.getOptionLabel(this.selectedOption)||this.modelValue()||"");constructor(e,n,r,o,s,a){this.el=e,this.renderer=n,this.cd=r,this.zone=o,this.filterService=s,this.config=a,Ki(()=>{let c=this.modelValue(),u=this.visibleOptions();u&&re.isNotEmpty(u)&&(this.selectedOption=u[this.findSelectedOptionIndex()],this.cd.markForCheck()),c!==void 0&&this.editable&&this.updateEditableLabel()})}ngOnInit(){this.id=this.id||Me(),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=x.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-highlight");e&&x.scrollInView(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"filtericon":this.filterIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}flatOptions(e){return(e||[]).reduce((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>n.push(a)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)),this.autoDisplayFirst&&!this.modelValue()){let e=this.findFirstOptionIndex();this.onOptionSelect(null,this.visibleOptions()[e],!1,!0)}}onOptionSelect(e,n,r=!0,o=!1){let s=this.getOptionValue(n);this.updateModel(s,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),r&&setTimeout(()=>this.hide(!0),1),o===!1&&this.onChange.emit({originalEvent:e,value:s})}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e),this.selectedOptionUpdated=!0}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),this.modelValue.set(this.value),this.updateEditableLabel(),this.cd.markForCheck()}allowModelChange(){return this.autoDisplayFirst&&!this.placeholder&&!this.modelValue()&&!this.editable&&this.options&&this.options.length}isSelected(e){return this.isValidOption(e)&&re.equals(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?re.resolveFieldData(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?re.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isOptionDisabled(e){return this.optionDisabled?re.resolveFieldData(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?re.resolveFieldData(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?re.resolveFieldData(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onContainerClick(e){this.disabled||this.readonly||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(e),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(e){let n=e.target.value;this.searchValue="",!this.searchOptions(e,n)&&this.focusedOptionIndex.set(-1),this.onModelChange(n),this.updateModel(n,e),this.onChange.emit({originalEvent:e,value:n}),!this.overlayVisible&&re.isNotEmpty(n)&&this.show()}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),e&&x.focus(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=x.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=x.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&x.focus(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&x.focus(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.disabled)return;this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.overlayVisible===!1&&this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onKeyDown(e,n){if(!(this.disabled||this.readonly))switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,n);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!e.metaKey&&re.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault()}changeFocusedOptionIndex(e,n){if(this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),this.selectOnFocus)){let r=this.visibleOptions()[n];this.onOptionSelect(e,r,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=x.findSingle(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}findLastOptionIndex(){return re.findLastIndex(this.visibleOptions(),e=>this.isValidOption(e))}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}isValidOption(e){return e!=null&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionGroup(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&e.optionGroup!==void 0&&e.optionGroup!==null&&e.group}onArrowUpKey(e,n=!1){if(e.altKey&&!n){if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}this.overlayVisible&&this.hide(),e.preventDefault()}else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,r),!this.overlayVisible&&this.show(),e.preventDefault()}}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,n=!1){if(n){let r=e.currentTarget;e.shiftKey?r.setSelectionRange(0,r.value.length):(r.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,n=!1){if(n){let r=e.currentTarget;if(e.shiftKey)r.setSelectionRange(0,r.value.length);else{let o=r.value.length;r.setSelectionRange(o,o),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onSpaceKey(e,n=!1){!this.editable&&!n&&this.onEnterKey(e)}onEnterKey(e){if(!this.overlayVisible)this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let n=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,n)}this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e,n=!1){if(!n)if(this.overlayVisible&&this.hasFocusableElements())x.focus(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}this.overlayVisible&&this.hide(this.filter)}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getFirstFocusableElement(this.overlayViewChild.el.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild.nativeElement;x.focus(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;x.focus(n)}hasFocusableElements(){return x.getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,n=!1){n&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}onFilterInputChange(e){let n=e.target.value?.trim();this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),this.cd.markForCheck()}applyFocus(){this.editable?x.findSingle(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():x.focus(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(e){this.updateModel(null,e),this.clearEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}),this.onClear.emit(e),this.resetFilter()}static \u0275fac=function(n){return new(n||i)(w(ve),w(nt),w(Ne),w(ge),w(Lu),w(At))};static \u0275cmp=k({type:i,selectors:[["p-dropdown"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(MN,5),oe(kN,5),oe(AN,5),oe(DN,5),oe(PN,5),oe(RN,5),oe(VN,5),oe(LN,5),oe(FN,5)),n&2){let o;q(o=W())&&(r.containerViewChild=o.first),q(o=W())&&(r.filterViewChild=o.first),q(o=W())&&(r.focusInputViewChild=o.first),q(o=W())&&(r.editableInputViewChild=o.first),q(o=W())&&(r.itemsViewChild=o.first),q(o=W())&&(r.scroller=o.first),q(o=W())&&(r.overlayViewChild=o.first),q(o=W())&&(r.firstHiddenFocusableElementOnOverlay=o.first),q(o=W())&&(r.lastHiddenFocusableElementOnOverlay=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focused||r.overlayVisible)},inputs:{id:"id",scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:"focusOnHover",selectOnFocus:"selectOnFocus",autoOptionFocus:"autoOptionFocus",autofocusFilter:"autofocusFilter",disabled:"disabled",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",filterValue:"filterValue",options:"options"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear",onLazyLoad:"onLazyLoad"},features:[mt([P9])],decls:11,vars:20,consts:[[3,"ngClass","ngStyle","click"],["container",""],["role","combobox","pAutoFocus","",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","autofocus","focus","blur","keydown",4,"ngIf"],["type","text","aria-haspopup","listbox",3,"ngClass","disabled","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-dropdown-trigger"],["class","p-dropdown-trigger-icon",4,"ngIf"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],["pTemplate","content"],["role","combobox","pAutoFocus","",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","autofocus","focus","blur","keydown"],["focusInput",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["defaultPlaceholder",""],["type","text","aria-haspopup","listbox",3,"ngClass","disabled","input","keydown","focus","blur"],["editableInput",""],[3,"styleClass","click",4,"ngIf"],["class","p-dropdown-clear-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-dropdown-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["class","p-dropdown-trigger-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-dropdown-trigger-icon",3,"ngClass"],[3,"styleClass"],[1,"p-dropdown-trigger-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["firstHiddenFocusableEl",""],["class","p-dropdown-header",3,"click",4,"ngIf"],[1,"p-dropdown-items-wrapper"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["lastHiddenFocusableEl",""],[1,"p-dropdown-header",3,"click"],["builtInFilterElement",""],[1,"p-dropdown-filter-container"],["type","text","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"value","input","keydown","blur"],["filter",""],["class","p-dropdown-filter-icon",4,"ngIf"],[1,"p-dropdown-filter-icon"],[3,"items","itemSize","autoSize","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","loader"],["role","listbox",1,"p-dropdown-items",3,"ngClass"],["items",""],["ngFor","",3,"ngForOf"],["class","p-dropdown-empty-message",3,"ngStyle",4,"ngIf"],["role","option",1,"p-dropdown-item-group",3,"ngStyle"],[3,"id","option","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize","onClick","onMouseEnter"],[1,"p-dropdown-empty-message",3,"ngStyle"],["emptyFilter",""],["empty",""]],template:function(n,r){n&1&&(p(0,"div",0,1),A("click",function(s){return r.onContainerClick(s)}),g(2,jN,6,23,"span",2)(3,HN,2,5,"input",3)(4,KN,3,2,"ng-container",4),p(5,"div",5),g(6,ZN,3,2,"ng-container",4)(7,e9,2,1,"span",6),h(),p(8,"p-overlay",7,8),A("visibleChange",function(s){return r.overlayVisible=s})("onAnimationStart",function(s){return r.onOverlayAnimationStart(s)})("onHide",function(){return r.hide()}),g(10,D9,13,19,"ng-template",9),h()()),n&2&&(U(r.styleClass),l("ngClass",r.containerClass)("ngStyle",r.style),T("id",r.id),d(2),l("ngIf",!r.editable),d(),l("ngIf",r.editable),d(),l("ngIf",r.isVisibleClearIcon),d(),T("aria-expanded",r.overlayVisible)("data-pc-section","trigger"),d(),l("ngIf",!r.dropdownIconTemplate),d(),l("ngIf",r.dropdownIconTemplate),d(),l("visible",r.overlayVisible)("options",r.overlayOptions)("target","@parent")("appendTo",r.appendTo)("autoZIndex",r.autoZIndex)("baseZIndex",r.baseZIndex)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions))},dependencies:()=>[xe,Vt,Ie,rt,Ce,As,he,Ro,Fa,Bh,pt,en,Na,R9],styles:[`@layer primeng{.p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;opacity:0}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-item-group{cursor:auto}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}} `],encapsulation:2,changeDetection:0})}return i})(),Rn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,qr,Te,Pn,Rt,Wr,rd,pt,en,Na,qr,Te,Wr]})}return i})();function V9(){return typeof window<"u"?window.navigator:void 0}function t2(i){return!!(i.parentElement&&i.parentElement.nodeName.toLowerCase()==="picture")}function ad(i){return i.nodeName.toLowerCase()==="img"}function i2(i,t,e){return ad(i)?e&&"srcset"in i?i.srcset=t:i.src=t:i.style.backgroundImage=`url('${t}')`,i}function py(i){return t=>{let e=t.parentElement.getElementsByTagName("source");for(let n=0;n{ad(t)&&t2(t)&&i(t),e&&i2(t,e,n)}}var N9=hy(L9),B9=hy(n2),z9=hy(F9),cy=class{constructor(){this.navigator=V9()}setPlatformId(t){this.platformId=t}onDestroy(t){}onAttributeChange(t){}},Ba={loaded:"ng-lazyloaded",loading:"ng-lazyloading",failed:"ng-failed-lazyloaded"};function e2(i,t){i.className=i.className.replace(t,"")}function ly(i,t){i.className.includes(t)||(i.className+=` ${t}`)}function U9(i,t){return i.className&&i.className.includes(t)}var dy=class extends cy{setup(t){N9(t.element,t.defaultImagePath,t.useSrcset),t.imagePath&&ly(t.element,Ba.loading),U9(t.element,Ba.loaded)&&e2(t.element,Ba.loaded)}finally(t){ly(t.element,Ba.loaded),e2(t.element,Ba.loading)}loadImage(t){if(this.skipLazyLoading(t))return[t.imagePath];let{element:e,useSrcset:n,imagePath:r,decode:o}=t,s;return ad(e)&&t2(e)?(s=e.parentNode.cloneNode(!0).getElementsByTagName("img")[0],n2(s),i2(s,r,n)):(s=new Image,ad(e)&&e.referrerPolicy&&(s.referrerPolicy=e.referrerPolicy),ad(e)&&e.sizes&&(s.sizes=e.sizes),n&&"srcset"in s?s.srcset=r:s.src=r),o&&s.decode?s.decode().then(()=>r):new Promise((a,c)=>{s.onload=()=>a(r),s.onerror=()=>c(null)})}setErrorImage(t,e){let{element:n,useSrcset:r,errorImagePath:o}=e;z9(n,o,r),ly(n,Ba.failed)}setLoadedImage(t,e){let{element:n,useSrcset:r}=e;B9(n,t,r)}isDisabled(){return Cl(this.platformId)&&!this.isBot()}skipLazyLoading(t){return this.isBot(t)}isBot(t){return this.navigator?.userAgent?/googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|duckduckbot|prerender/i.test(this.navigator.userAgent):!1}},uy=class extends dy{constructor(){super(...arguments),this.observers=new WeakMap,this.intersectionSubject=new Gt,this.uniqKey={}}getObservable(t){if(this.skipLazyLoading(t))return Se({isIntersecting:!0});if(t.customObservable)return t.customObservable;let e=t.scrollContainer||this.uniqKey,n={root:t.scrollContainer||null};t.offset&&(n.rootMargin=`${t.offset}px`);let r=this.observers.get(e);return r||(r=new IntersectionObserver(o=>this.loadingCallback(o),n),this.observers.set(e,r)),r.observe(t.element),Li.create(o=>{let s=this.intersectionSubject.pipe(Ni(a=>a.target===t.element)).subscribe(o);return()=>{s.unsubscribe(),r.unobserve(t.element)}})}isVisible(t){return t.isIntersecting}loadingCallback(t){t.forEach(e=>this.intersectionSubject.next(e))}};var j9=new le("LazyLoadImageHooks");var r2=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({providers:[{provide:j9,useClass:uy}]}),i})(),Uh=class i{constructor(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r}static fromElement(t){let{left:e,top:n,right:r,bottom:o}=t.getBoundingClientRect();return e===0&&n===0&&r===0&&o===0?i.empty:new i(e,n,r,o)}static fromWindow(t){return new i(0,0,t.innerWidth,t.innerHeight)}inflate(t){this.left-=t,this.top-=t,this.right+=t,this.bottom+=t}intersectsWith(t){return t.left=e&&o>=n?new i(e,n,r,o):i.empty}};Uh.empty=new Uh(0,0,0,0);var o2=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["RefreshIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.77051 5.96336C6.84324 5.99355 6.92127 6.00891 7.00002 6.00854C7.07877 6.00891 7.1568 5.99355 7.22953 5.96336C7.30226 5.93317 7.36823 5.88876 7.42357 5.83273L9.82101 3.43529C9.93325 3.32291 9.99629 3.17058 9.99629 3.01175C9.99629 2.85292 9.93325 2.70058 9.82101 2.5882L7.42357 0.190763C7.3687 0.131876 7.30253 0.0846451 7.22901 0.0518865C7.15549 0.019128 7.07612 0.00151319 6.99564 9.32772e-05C6.91517 -0.00132663 6.83523 0.0134773 6.7606 0.0436218C6.68597 0.0737664 6.61817 0.118634 6.56126 0.175548C6.50435 0.232462 6.45948 0.300257 6.42933 0.374888C6.39919 0.449519 6.38439 0.529456 6.38581 0.609933C6.38722 0.690409 6.40484 0.769775 6.4376 0.843296C6.47036 0.916817 6.51759 0.982986 6.57647 1.03786L7.95103 2.41241H6.99998C5.46337 2.41241 3.98969 3.02283 2.90314 4.10938C1.81659 5.19593 1.20618 6.66961 1.20618 8.20622C1.20618 9.74283 1.81659 11.2165 2.90314 12.3031C3.98969 13.3896 5.46337 14 6.99998 14C8.53595 13.9979 10.0084 13.3868 11.0945 12.3007C12.1806 11.2146 12.7917 9.74218 12.7938 8.20622C12.7938 8.04726 12.7306 7.89481 12.6182 7.78241C12.5058 7.67001 12.3534 7.60686 12.1944 7.60686C12.0355 7.60686 11.883 7.67001 11.7706 7.78241C11.6582 7.89481 11.5951 8.04726 11.5951 8.20622C11.5951 9.11504 11.3256 10.0035 10.8207 10.7591C10.3157 11.5148 9.59809 12.1037 8.75845 12.4515C7.9188 12.7993 6.99489 12.8903 6.10353 12.713C5.21217 12.5357 4.3934 12.0981 3.75077 11.4554C3.10813 10.8128 2.67049 9.99404 2.49319 9.10268C2.31589 8.21132 2.40688 7.2874 2.75468 6.44776C3.10247 5.60811 3.69143 4.89046 4.44709 4.38554C5.20275 3.88063 6.09116 3.61113 6.99998 3.61113H7.95098L6.57647 4.98564C6.46423 5.09802 6.40119 5.25035 6.40119 5.40918C6.40119 5.56801 6.46423 5.72035 6.57647 5.83273C6.63181 5.88876 6.69778 5.93317 6.77051 5.96336Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var s2=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["SearchMinusIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.0208 12.0411C4.83005 12.0411 3.66604 11.688 2.67596 11.0265C1.68589 10.3649 0.914216 9.42464 0.458534 8.32452C0.00285271 7.22441 -0.116374 6.01388 0.11593 4.84601C0.348235 3.67813 0.921637 2.60537 1.76363 1.76338C2.60562 0.921393 3.67838 0.34799 4.84625 0.115686C6.01412 -0.116618 7.22466 0.00260857 8.32477 0.45829C9.42488 0.913972 10.3652 1.68564 11.0267 2.67572C11.6883 3.66579 12.0414 4.8298 12.0414 6.02056C12.0395 7.41563 11.5542 8.76029 10.6783 9.8305L13.8244 12.9765C13.9367 13.089 13.9997 13.2414 13.9997 13.4003C13.9997 13.5592 13.9367 13.7116 13.8244 13.8241C13.769 13.8801 13.703 13.9245 13.6302 13.9548C13.5575 13.985 13.4794 14.0003 13.4006 14C13.3218 14.0003 13.2437 13.985 13.171 13.9548C13.0982 13.9245 13.0322 13.8801 12.9768 13.8241L9.83082 10.678C8.76059 11.5539 7.4159 12.0393 6.0208 12.0411ZM6.0208 1.20731C5.07199 1.20731 4.14449 1.48867 3.35559 2.0158C2.56669 2.54292 1.95181 3.29215 1.58872 4.16874C1.22562 5.04532 1.13062 6.00989 1.31572 6.94046C1.50083 7.87104 1.95772 8.72583 2.62863 9.39674C3.29954 10.0676 4.15433 10.5245 5.0849 10.7096C6.01548 10.8947 6.98005 10.7997 7.85663 10.4367C8.73322 10.0736 9.48244 9.45868 10.0096 8.66978C10.5367 7.88088 10.8181 6.95337 10.8181 6.00457C10.8181 4.73226 10.3126 3.51206 9.41297 2.6124C8.51331 1.71274 7.29311 1.20731 6.0208 1.20731ZM4.00591 6.60422H8.00362C8.16266 6.60422 8.31518 6.54104 8.42764 6.42859C8.5401 6.31613 8.60328 6.1636 8.60328 6.00456C8.60328 5.84553 8.5401 5.693 8.42764 5.58054C8.31518 5.46809 8.16266 5.40491 8.00362 5.40491H4.00591C3.84687 5.40491 3.69434 5.46809 3.58189 5.58054C3.46943 5.693 3.40625 5.84553 3.40625 6.00456C3.40625 6.1636 3.46943 6.31613 3.58189 6.42859C3.69434 6.54104 3.84687 6.60422 4.00591 6.60422Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var a2=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["SearchPlusIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67596 11.0265C3.66604 11.688 4.83005 12.0411 6.0208 12.0411C6.81143 12.0411 7.59432 11.8854 8.32477 11.5828C8.86999 11.357 9.37802 11.0526 9.83311 10.6803L12.9768 13.8241C13.0322 13.8801 13.0982 13.9245 13.171 13.9548C13.2437 13.985 13.3218 14.0003 13.4006 14C13.4794 14.0003 13.5575 13.985 13.6302 13.9548C13.703 13.9245 13.769 13.8801 13.8244 13.8241C13.9367 13.7116 13.9997 13.5592 13.9997 13.4003C13.9997 13.2414 13.9367 13.089 13.8244 12.9765L10.6806 9.8328C11.0529 9.37773 11.3572 8.86972 11.5831 8.32452C11.8856 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0267 2.67572C10.3652 1.68564 9.42488 0.913972 8.32477 0.45829C7.22466 0.00260857 6.01412 -0.116618 4.84625 0.115686C3.67838 0.34799 2.60562 0.921393 1.76363 1.76338C0.921637 2.60537 0.348235 3.67813 0.11593 4.84601C-0.116374 6.01388 0.00285271 7.22441 0.458534 8.32452C0.914216 9.42464 1.68589 10.3649 2.67596 11.0265ZM3.35559 2.0158C4.14449 1.48867 5.07199 1.20731 6.0208 1.20731C7.29311 1.20731 8.51331 1.71274 9.41297 2.6124C10.3126 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5367 7.88088 10.0096 8.66978C9.48244 9.45868 8.73322 10.0736 7.85663 10.4367C6.98005 10.7997 6.01548 10.8947 5.0849 10.7096C4.15433 10.5245 3.29954 10.0676 2.62863 9.39674C1.95772 8.72583 1.50083 7.87104 1.31572 6.94046C1.13062 6.00989 1.22562 5.04532 1.58872 4.16874C1.95181 3.29215 2.56669 2.54292 3.35559 2.0158ZM6.00481 8.60309C5.84641 8.60102 5.69509 8.53718 5.58308 8.42517C5.47107 8.31316 5.40722 8.16183 5.40515 8.00344V6.60422H4.00591C3.84687 6.60422 3.69434 6.54104 3.58189 6.42859C3.46943 6.31613 3.40625 6.1636 3.40625 6.00456C3.40625 5.84553 3.46943 5.693 3.58189 5.58054C3.69434 5.46809 3.84687 5.40491 4.00591 5.40491H5.40515V4.00572C5.40515 3.84668 5.46833 3.69416 5.58079 3.5817C5.69324 3.46924 5.84577 3.40607 6.00481 3.40607C6.16385 3.40607 6.31637 3.46924 6.42883 3.5817C6.54129 3.69416 6.60447 3.84668 6.60447 4.00572V5.40491H8.00362C8.16266 5.40491 8.31518 5.46809 8.42764 5.58054C8.5401 5.693 8.60328 5.84553 8.60328 6.00456C8.60328 6.1636 8.5401 6.31613 8.42764 6.42859C8.31518 6.54104 8.16266 6.60422 8.00362 6.60422H6.60447V8.00344C6.60239 8.16183 6.53855 8.31316 6.42654 8.42517C6.31453 8.53718 6.1632 8.60102 6.00481 8.60309Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var l2=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["UndoIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.77042 5.96336C6.84315 5.99355 6.92118 6.00891 6.99993 6.00854C7.07868 6.00891 7.15671 5.99355 7.22944 5.96336C7.30217 5.93317 7.36814 5.88876 7.42348 5.83273C7.53572 5.72035 7.59876 5.56801 7.59876 5.40918C7.59876 5.25035 7.53572 5.09802 7.42348 4.98564L6.04897 3.61113H6.99998C7.9088 3.61113 8.79722 3.88063 9.55288 4.38554C10.3085 4.89046 10.8975 5.60811 11.2453 6.44776C11.5931 7.2874 11.6841 8.21132 11.5068 9.10268C11.3295 9.99404 10.8918 10.8128 10.2492 11.4554C9.60657 12.0981 8.7878 12.5357 7.89644 12.713C7.00508 12.8903 6.08116 12.7993 5.24152 12.4515C4.40188 12.1037 3.68422 11.5148 3.17931 10.7591C2.67439 10.0035 2.4049 9.11504 2.4049 8.20622C2.4049 8.04726 2.34175 7.89481 2.22935 7.78241C2.11695 7.67001 1.9645 7.60686 1.80554 7.60686C1.64658 7.60686 1.49413 7.67001 1.38172 7.78241C1.26932 7.89481 1.20618 8.04726 1.20618 8.20622C1.20829 9.74218 1.81939 11.2146 2.90548 12.3007C3.99157 13.3868 5.46402 13.9979 6.99998 14C8.5366 14 10.0103 13.3896 11.0968 12.3031C12.1834 11.2165 12.7938 9.74283 12.7938 8.20622C12.7938 6.66961 12.1834 5.19593 11.0968 4.10938C10.0103 3.02283 8.5366 2.41241 6.99998 2.41241H6.04892L7.42348 1.03786C7.48236 0.982986 7.5296 0.916817 7.56235 0.843296C7.59511 0.769775 7.61273 0.690409 7.61415 0.609933C7.61557 0.529456 7.60076 0.449519 7.57062 0.374888C7.54047 0.300257 7.49561 0.232462 7.43869 0.175548C7.38178 0.118634 7.31398 0.0737664 7.23935 0.0436218C7.16472 0.0134773 7.08478 -0.00132663 7.00431 9.32772e-05C6.92383 0.00151319 6.84447 0.019128 6.77095 0.0518865C6.69742 0.0846451 6.63126 0.131876 6.57638 0.190763L4.17895 2.5882C4.06671 2.70058 4.00366 2.85292 4.00366 3.01175C4.00366 3.17058 4.06671 3.32291 4.17895 3.43529L6.57638 5.83273C6.63172 5.88876 6.69769 5.93317 6.77042 5.96336Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var c2=(()=>{class i{el;pFocusTrapDisabled=!1;constructor(e){this.el=e}onkeydown(e){if(this.pFocusTrapDisabled!==!0){e.preventDefault();let n=x.getNextFocusableElement(this.el.nativeElement,e.shiftKey);n&&(n.focus(),n.select?.())}}static \u0275fac=function(n){return new(n||i)(w(ve))};static \u0275dir=it({type:i,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(n,r){n&1&&A("keydown.tab",function(s){return r.onkeydown(s)})("keydown.shift.tab",function(s){return r.onkeydown(s)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}})}return i})(),za=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var d2=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,o2,ec,l2,s2,a2,pt,za,Te]})}return i})();var my=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["BanIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7 0C5.61553 0 4.26215 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.00303296 5.6003 -0.13559 7.00776 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C14 5.14348 13.2625 3.36301 11.9497 2.05025C10.637 0.737498 8.85652 0 7 0ZM1.16667 7C1.16549 5.65478 1.63303 4.35118 2.48889 3.31333L10.6867 11.5111C9.83309 12.2112 8.79816 12.6544 7.70243 12.789C6.60669 12.9236 5.49527 12.744 4.49764 12.2713C3.50001 11.7986 2.65724 11.0521 2.06751 10.1188C1.47778 9.18558 1.16537 8.10397 1.16667 7ZM11.5111 10.6867L3.31334 2.48889C4.43144 1.57388 5.84966 1.10701 7.29265 1.1789C8.73565 1.2508 10.1004 1.85633 11.1221 2.87795C12.1437 3.89956 12.7492 5.26435 12.8211 6.70735C12.893 8.15034 12.4261 9.56856 11.5111 10.6867Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var fy=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["StarIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.9741 13.6721C10.8806 13.6719 10.7886 13.6483 10.7066 13.6033L7.00002 11.6545L3.29345 13.6033C3.19926 13.6539 3.09281 13.6771 2.98612 13.6703C2.87943 13.6636 2.77676 13.6271 2.6897 13.5651C2.60277 13.5014 2.53529 13.4147 2.4948 13.3148C2.45431 13.215 2.44241 13.1058 2.46042 12.9995L3.17881 8.87264L0.167699 5.95324C0.0922333 5.8777 0.039368 5.78258 0.0150625 5.67861C-0.00924303 5.57463 -0.00402231 5.46594 0.030136 5.36477C0.0621323 5.26323 0.122141 5.17278 0.203259 5.10383C0.284377 5.03488 0.383311 4.99023 0.488681 4.97501L4.63087 4.37126L6.48797 0.618832C6.54083 0.530159 6.61581 0.456732 6.70556 0.405741C6.79532 0.35475 6.89678 0.327942 7.00002 0.327942C7.10325 0.327942 7.20471 0.35475 7.29447 0.405741C7.38422 0.456732 7.4592 0.530159 7.51206 0.618832L9.36916 4.37126L13.5114 4.97501C13.6167 4.99023 13.7157 5.03488 13.7968 5.10383C13.8779 5.17278 13.9379 5.26323 13.9699 5.36477C14.0041 5.46594 14.0093 5.57463 13.985 5.67861C13.9607 5.78258 13.9078 5.8777 13.8323 5.95324L10.8212 8.87264L11.532 12.9995C11.55 13.1058 11.5381 13.215 11.4976 13.3148C11.4571 13.4147 11.3896 13.5014 11.3027 13.5651C11.2059 13.632 11.0917 13.6692 10.9741 13.6721ZM7.00002 10.4393C7.09251 10.4404 7.18371 10.4613 7.2675 10.5005L10.2098 12.029L9.65193 8.75036C9.6368 8.6584 9.64343 8.56418 9.6713 8.47526C9.69918 8.38633 9.74751 8.30518 9.81242 8.23832L12.1969 5.94559L8.90298 5.45648C8.81188 5.44198 8.72555 5.406 8.65113 5.35152C8.57671 5.29703 8.51633 5.2256 8.475 5.14314L7.00002 2.1626L5.52503 5.15078C5.4837 5.23324 5.42332 5.30467 5.3489 5.35916C5.27448 5.41365 5.18815 5.44963 5.09705 5.46412L1.80318 5.94559L4.18761 8.23832C4.25252 8.30518 4.30085 8.38633 4.32873 8.47526C4.3566 8.56418 4.36323 8.6584 4.3481 8.75036L3.7902 12.0519L6.73253 10.5234C6.81451 10.4762 6.9058 10.4475 7.00002 10.4393Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var gy=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["StarFillIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.9718 5.36453C13.9398 5.26298 13.8798 5.17252 13.7986 5.10356C13.7175 5.0346 13.6186 4.98994 13.5132 4.97472L9.37043 4.37088L7.51307 0.617955C7.46021 0.529271 7.38522 0.455834 7.29545 0.404836C7.20568 0.353838 7.1042 0.327026 7.00096 0.327026C6.89771 0.327026 6.79624 0.353838 6.70647 0.404836C6.6167 0.455834 6.54171 0.529271 6.48885 0.617955L4.63149 4.37088L0.488746 4.97472C0.383363 4.98994 0.284416 5.0346 0.203286 5.10356C0.122157 5.17252 0.0621407 5.26298 0.03014 5.36453C-0.00402286 5.46571 -0.00924428 5.57442 0.0150645 5.67841C0.0393733 5.7824 0.0922457 5.87753 0.167722 5.95308L3.17924 8.87287L2.4684 13.0003C2.45038 13.1066 2.46229 13.2158 2.50278 13.3157C2.54328 13.4156 2.61077 13.5022 2.6977 13.5659C2.78477 13.628 2.88746 13.6644 2.99416 13.6712C3.10087 13.678 3.20733 13.6547 3.30153 13.6042L7.00096 11.6551L10.708 13.6042C10.79 13.6491 10.882 13.6728 10.9755 13.673C11.0958 13.6716 11.2129 13.6343 11.3119 13.5659C11.3988 13.5022 11.4663 13.4156 11.5068 13.3157C11.5473 13.2158 11.5592 13.1066 11.5412 13.0003L10.8227 8.87287L13.8266 5.95308C13.9033 5.87835 13.9577 5.7836 13.9833 5.67957C14.009 5.57554 14.005 5.4664 13.9718 5.36453Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();function G9(i,t){if(i&1&&y(0,"span",10),i&2){let e=m(3);l("ngClass",e.iconCancelClass)("ngStyle",e.iconCancelStyle)}}function $9(i,t){if(i&1&&y(0,"BanIcon",11),i&2){let e=m(3);l("styleClass","p-rating-icon p-rating-cancel")("ngStyle",e.iconCancelStyle),T("data-pc-section","cancelIcon")}}var q9=i=>({"p-focus":i});function W9(i,t){if(i&1){let e=G();p(0,"div",5),A("click",function(r){S(e);let o=m(2);return E(o.onOptionClick(r,0))}),p(1,"span",6)(2,"input",7),A("focus",function(r){S(e);let o=m(2);return E(o.onInputFocus(r,0))})("blur",function(r){S(e);let o=m(2);return E(o.onInputBlur(r))})("change",function(r){S(e);let o=m(2);return E(o.onChange(r,0))}),h()(),g(3,G9,1,2,"span",8)(4,$9,1,3,"BanIcon",9),h()}if(i&2){let e=m(2);l("ngClass",H(10,q9,e.focusedOptionIndex()===0&&e.isFocusVisible)),T("data-pc-section","cancelItem"),d(),T("data-p-hidden-accessible",!0),d(),l("name",e.name)("checked",e.value===0)("disabled",e.disabled)("readonly",e.readonly),T("aria-label",e.cancelAriaLabel()),d(),l("ngIf",e.iconCancelClass),d(),l("ngIf",!e.iconCancelClass)}}function K9(i,t){if(i&1&&y(0,"span",16),i&2){let e=m(4);l("ngStyle",e.iconOffStyle)("ngClass",e.iconOffClass),T("data-pc-section","offIcon")}}function Q9(i,t){if(i&1&&y(0,"StarIcon",17),i&2){let e=m(4);l("ngStyle",e.iconOffStyle)("styleClass","p-rating-icon"),T("data-pc-section","offIcon")}}function Y9(i,t){if(i&1&&(Z(0),g(1,K9,1,3,"span",14)(2,Q9,1,3,"StarIcon",15),X()),i&2){let e=m(3);d(),l("ngIf",e.iconOffClass),d(),l("ngIf",!e.iconOffClass)}}function Z9(i,t){if(i&1&&y(0,"span",19),i&2){let e=m(4);l("ngStyle",e.iconOnStyle)("ngClass",e.iconOnClass),T("data-pc-section","onIcon")}}function X9(i,t){if(i&1&&y(0,"StarFillIcon",17),i&2){let e=m(4);l("ngStyle",e.iconOnStyle)("styleClass","p-rating-icon p-rating-icon-active"),T("data-pc-section","onIcon")}}function J9(i,t){if(i&1&&(Z(0),g(1,Z9,1,3,"span",18)(2,X9,1,3,"StarFillIcon",15),X()),i&2){let e=m(3);d(),l("ngIf",e.iconOnClass),d(),l("ngIf",!e.iconOnClass)}}var e8=(i,t)=>({"p-rating-item-active":i,"p-focus":t});function t8(i,t){if(i&1){let e=G();p(0,"div",12),A("click",function(r){let s=S(e).$implicit,a=m(2);return E(a.onOptionClick(r,s+1))}),p(1,"span",6)(2,"input",7),A("focus",function(r){let s=S(e).$implicit,a=m(2);return E(a.onInputFocus(r,s+1))})("blur",function(r){S(e);let o=m(2);return E(o.onInputBlur(r))})("change",function(r){let s=S(e).$implicit,a=m(2);return E(a.onChange(r,s+1))}),h()(),g(3,Y9,3,2,"ng-container",13)(4,J9,3,2,"ng-container",13),h()}if(i&2){let e=t.$implicit,n=t.index,r=m(2);l("ngClass",We(9,e8,e+1<=r.value,e+1===r.focusedOptionIndex()&&r.isFocusVisible)),d(),T("data-p-hidden-accessible",!0),d(),l("name",r.name)("checked",r.value===0)("disabled",r.disabled)("readonly",r.readonly),T("aria-label",r.starAriaLabel(e+1)),d(),l("ngIf",!r.value||n>=r.value),d(),l("ngIf",r.value&&n({"p-readonly":i,"p-disabled":t}),c8={provide:zt,useExisting:Tt(()=>ld),multi:!0},ld=(()=>{class i{cd;config;disabled;readonly;stars=5;cancel=!0;iconOnClass;iconOnStyle;iconOffClass;iconOffStyle;iconCancelClass;iconCancelStyle;onRate=new L;onCancel=new L;onFocus=new L;onBlur=new L;templates;onIconTemplate;offIconTemplate;cancelIconTemplate;value;onModelChange=()=>{};onModelTouched=()=>{};starsArray;isFocusVisibleItem=!0;focusedOptionIndex=st(-1);name;constructor(e,n){this.cd=e,this.config=n}ngOnInit(){this.name=this.name||Me(),this.starsArray=[];for(let e=0;e{switch(e.getType()){case"onicon":this.onIconTemplate=e.template;break;case"officon":this.offIconTemplate=e.template;break;case"cancelicon":this.cancelIconTemplate=e.template;break}})}onOptionClick(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n),this.isFocusVisibleItem=!1;let r=x.getFirstFocusableElement(e.currentTarget,"");r&&x.focus(r)}}onOptionSelect(e,n){this.focusedOptionIndex.set(n),this.updateModel(e,n||null)}onChange(e,n){this.onOptionSelect(e,n),this.isFocusVisibleItem=!0}onInputBlur(e){this.focusedOptionIndex.set(-1),this.onBlur.emit(e)}onInputFocus(e,n){this.focusedOptionIndex.set(n),this.onFocus.emit(e)}updateModel(e,n){this.value=n,this.onModelChange(this.value),this.onModelTouched(),n?this.onRate.emit({originalEvent:e,value:n}):this.onCancel.emit()}cancelAriaLabel(){return this.config.translation.clear}starAriaLabel(e){return e===1?this.config.translation.aria.star:this.config.translation.aria.stars.replace(/{star}/g,e)}getIconTemplate(e){return!this.value||e>=this.value?this.offIconTemplate:this.onIconTemplate}writeValue(e){this.value=e,this.cd.detectChanges()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}get isCustomIcon(){return this.templates&&this.templates.length>0}static \u0275fac=function(n){return new(n||i)(w(Ne),w(At))};static \u0275cmp=k({type:i,selectors:[["p-rating"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{disabled:"disabled",readonly:"readonly",stars:"stars",cancel:"cancel",iconOnClass:"iconOnClass",iconOnStyle:"iconOnStyle",iconOffClass:"iconOffClass",iconOffStyle:"iconOffStyle",iconCancelClass:"iconCancelClass",iconCancelStyle:"iconCancelStyle"},outputs:{onRate:"onRate",onCancel:"onCancel",onFocus:"onFocus",onBlur:"onBlur"},features:[mt([c8])],decls:4,vars:8,consts:[[1,"p-rating",3,"ngClass"],[4,"ngIf","ngIfElse"],["customTemplate",""],["class","p-rating-item p-rating-cancel-item",3,"ngClass","click",4,"ngIf"],["ngFor","",3,"ngForOf"],[1,"p-rating-item","p-rating-cancel-item",3,"ngClass","click"],[1,"p-hidden-accessible"],["type","radio","value","0",3,"name","checked","disabled","readonly","focus","blur","change"],["class","p-rating-icon p-rating-cancel",3,"ngClass","ngStyle",4,"ngIf"],[3,"styleClass","ngStyle",4,"ngIf"],[1,"p-rating-icon","p-rating-cancel",3,"ngClass","ngStyle"],[3,"styleClass","ngStyle"],[1,"p-rating-item",3,"ngClass","click"],[4,"ngIf"],["class","p-rating-icon",3,"ngStyle","ngClass",4,"ngIf"],[3,"ngStyle","styleClass",4,"ngIf"],[1,"p-rating-icon",3,"ngStyle","ngClass"],[3,"ngStyle","styleClass"],["class","p-rating-icon p-rating-icon-active",3,"ngStyle","ngClass",4,"ngIf"],[1,"p-rating-icon","p-rating-icon-active",3,"ngStyle","ngClass"],["class","p-rating-icon p-rating-cancel",3,"ngStyle","click",4,"ngIf"],["class","p-rating-icon",3,"click",4,"ngFor","ngForOf"],[1,"p-rating-icon","p-rating-cancel",3,"ngStyle","click"],[4,"ngTemplateOutlet"],[1,"p-rating-icon",3,"click"]],template:function(n,r){if(n&1&&(p(0,"div",0),g(1,i8,3,2,"ng-container",1)(2,a8,2,2,"ng-template",null,2,dt),h()),n&2){let o=Le(3);l("ngClass",We(5,l8,r.readonly,r.disabled)),T("data-pc-name","rating")("data-pc-section","root"),d(),l("ngIf",!r.isCustomIcon)("ngIfElse",o)}},dependencies:()=>[xe,Vt,Ie,rt,Ce,gy,fy,my],styles:[`@layer primeng{.p-rating{display:inline-flex}.p-rating-icon{cursor:pointer}.p-rating.p-rating-readonly .p-rating-icon{cursor:default}} -`],encapsulation:2,changeDetection:0})}return i})(),Ua=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,gy,fy,my,Te]})}return i})();var jh=(()=>{let t=class t{transform(n,...r){return parseInt(n.toFixed(1))/2}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"rating",type:t,pure:!0,standalone:!0});let i=t;return i})();function d8(i,t){if(i&1&&(p(0,"div",3),y(1,"div",4),h()),i&2){let e=m(2);d(),ki("width",e.diameter)("height",e.diameter)}}function u8(i,t){if(i&1&&y(0,"div",5),i&2){let e=m().ngIf,n=m();ki("background",n.color)("height",n.height)("width",e+"%")}}function p8(i,t){if(i&1&&(Z(0),g(1,d8,2,4,"div",1)(2,u8,1,6,"div",2),X()),i&2){let e=m();d(),l("ngIf",e.includeSpinner),d(),l("ngIf",e.includeBar)}}var _y=class{constructor(t={}){this.config=t,this.state={action:null,value:0,initialValue:0},this.requests=null,this.disabled=!1,this.stream$=new Gt,this._value$=null,this.timer$=e=>{let n=Se(e);switch(e.action){case"start":case"increment":case"set":{e.action==="start"&&this.config.latencyThreshold===0&&e.value===0&&(e.value=e.initialValue),this.requests>0&&(n=km(this.config.latencyThreshold,250).pipe(Re(r=>pe(F({},e),{value:r===0?this.state.value||e.initialValue:this._increment()}))));break}case"complete":case"stop":{n=e.value===0?Se(F({},e)):km(0,500).pipe(dn(2),Re(r=>({value:r===0?100:0})));break}}return n.pipe(Re(r=>pe(F({},r),{action:"set"})),It(r=>this.next(r,!1)))},this.config=F({latencyThreshold:0},t)}get value$(){return this._value$?this._value$:this._value$=this.stream$.pipe(oo(this.state),Oi(t=>this.timer$(t)),Jb(),Re(t=>t.value))}start(t=2){this.disabled||this.next({action:"start",initialValue:t})}stop(){this.next({action:"stop"})}complete(){this.next({action:"complete"})}disable(){this.disabled=!0}set(t){this.next({action:"set",value:t})}increment(t=0){this.next({action:"increment",value:t})}next(t,e=!0){switch(t.action){case"start":this.requests=(this.requests||0)+1;break;case"complete":if(this.requests=(this.requests||1)-1,this.requests>0)return;break;case"stop":this.requests=0;break;case"increment":t.value=this._increment(t.value);break}this.state=F(pe(F({},this.state),{action:null}),t),e&&this.stream$.next(this.state)}_increment(t=0){let e=this.state.value;return e>=99&&(t=0),t===0&&(e>=0&&e<25?t=Math.random()*3+3:e>=25&&e<65?t=Math.random()*3:e>=65&&e<90?t=Math.random()*2:e>=90&&e<99?t=.5:t=0),t+e}},h8=new le("LOADING_BAR_CONFIG"),cd=(()=>{class i{constructor(e,n={},r){this.platformId=e,this.config=n,this.zone=r,this.refs={},this.streams$=new Gt,this.value$=this.streams$.pipe(oo(null),Oi(()=>no(Object.keys(this.refs).map(o=>this.refs[o].value$))),m8(this.zone),Re(o=>Math.max(0,...o)))}get progress$(){return this.value$}start(e=2){this.useRef().start(e)}set(e){this.useRef().set(e)}increment(e){this.useRef().increment(e)}complete(){this.useRef().complete()}stop(){this.useRef().stop()}useRef(e="default"){return this.refs[e]||(this.refs[e]=new _y(this.config),this.streams$.next(),ut(this.platformId)||this.refs[e].disable()),this.refs[e]}}return i.\u0275fac=function(e){return new(e||i)(J(vt),J(h8,8),J(ge,8))},i.\u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function m8(i){return i?t=>new Li(e=>t.subscribe(n=>i.run(()=>e.next(n)),n=>i.run(()=>e.error(n)),()=>i.run(()=>e.complete()))):t=>t}var Hh=(()=>{class i{constructor(e){this.loader=e,this.includeSpinner=!0,this.includeBar=!0,this.fixed=!0,this.color="#29d"}get value$(){return this.ref?this.loader.useRef(this.ref).value$:this.loader.value$}}return i.\u0275fac=function(e){return new(e||i)(w(cd))},i.\u0275cmp=k({type:i,selectors:[["ngx-loading-bar"]],hostVars:3,hostBindings:function(e,n){e&2&&(T("fixed",n.fixed),ki("color",n.color))},inputs:{includeSpinner:"includeSpinner",includeBar:"includeBar",fixed:"fixed",color:"color",value:"value",ref:"ref",height:"height",diameter:"diameter"},decls:2,vars:3,consts:[[4,"ngIf"],["class","ngx-spinner",4,"ngIf"],["class","ngx-bar",3,"background","height","width",4,"ngIf"],[1,"ngx-spinner"],[1,"ngx-spinner-icon"],[1,"ngx-bar"]],template:function(e,n){e&1&&(g(0,p8,3,2,"ng-container",0),ct(1,"async")),e&2&&l("ngIf",n.value!=null?n.value:Bt(1,1,n.value$))},dependencies:[Ie,D1],styles:["[_nghost-%COMP%]{position:relative;display:block;pointer-events:none}[_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{transition:.35s linear all;display:block;position:absolute;top:5px;left:0px}[_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%] .ngx-spinner-icon[_ngcontent-%COMP%]{width:14px;height:14px;border:solid 2px transparent;border-top-color:inherit;border-left-color:inherit;border-radius:50%;-webkit-animation:_ngcontent-%COMP%_loading-bar-spinner .4s linear infinite;animation:_ngcontent-%COMP%_loading-bar-spinner .4s linear infinite}[_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{transition:width .35s;position:absolute;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}[dir=rtl] [_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{right:0;left:unset}[fixed=true][_nghost-%COMP%]{z-index:10002}[fixed=true][_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{position:fixed}[fixed=true][_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}[dir=rtl] [fixed=true][_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{right:10px;left:unset}@-webkit-keyframes _ngcontent-%COMP%_loading-bar-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_loading-bar-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"],changeDetection:0}),i})(),wr=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({imports:[[$]]}),i})();var f8=new eu(()=>!1),g8=(()=>{class i{constructor(e){this.loader=e}intercept(e,n){if(e.headers.has("ignoreLoadingBar"))return n.handle(e.clone({headers:e.headers.delete("ignoreLoadingBar")}));if(e.context.get(f8)===!0)return n.handle(e);let r=!1,o=this.loader.useRef("http");return n.handle(e).pipe(It(()=>{r||(o.start(),r=!0)}),er(()=>r&&o.complete()))}}return i.\u0275fac=function(e){return new(e||i)(J(cd))},i.\u0275prov=se({token:i,factory:i.\u0275fac}),i})(),$h=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({providers:[{provide:qm,useClass:g8,multi:!0}],imports:[[El,wr],El,wr]}),i})();var _8=i=>({opacity:i}),v8=i=>({visibility:i}),Tr=(()=>{let t=class t{constructor(){this.src="",this.class="",this.ngClass="",this.style="",this.ngStyle="",this.loading="lazy",this.alt="",this.title="",this.imageLoaded=!1}loadImage(){this.imageLoaded=!0}checkError(){this.imageLoaded=!0,this.altText="Failed to Load Image!",this.src="https://firebasestorage.googleapis.com/v0/b/showbizhub-4f1b9.appspot.com/o/defualt_poster.png?alt=media&token=57690fd6-c65a-4ece-bd3e-4cd7dff1e87a"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-img"]],inputs:{src:"src",class:"class",ngClass:"ngClass",style:"style",ngStyle:"ngStyle",loading:"loading",alt:"alt",title:"title",onLoad:"onLoad",onError:"onError"},standalone:!0,features:[R],decls:5,vars:16,consts:[["ref","http","color","var(--primary-color)",3,"includeSpinner"],[3,"src","alt","ngClass","loading","title","ngStyle","load","error"],[1,"spinner",3,"ngStyle"],[1,"loader"]],template:function(r,o){r&1&&(y(0,"ngx-loading-bar",0),p(1,"span")(2,"img",1),A("load",function(){return o.loadImage()})("error",function(){return o.checkError()}),h(),p(3,"div",2),y(4,"div",3),h()()),r&2&&(l("includeSpinner",!1),d(2),xt(o.style),U(o.class),l("src",o.src,Ue)("alt",o.alt||o.altText)("ngClass",o.ngClass)("loading",o.loading)("title",o.title)("ngStyle",H(12,_8,o.imageLoaded?"1":"0")),d(),l("ngStyle",H(14,v8,o.imageLoaded?"collapse":"visible")))},dependencies:[$,xe,Ce,$h,Hh,wr],styles:['span[_ngcontent-%COMP%]{position:relative;overflow:hidden}span[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;object-fit:cover;transition:all .5s}span[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{filter:brightness(110%) saturate(110%)}span[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{position:absolute;bottom:900%;left:50%;translate:-50% 0;transition:visibility .3s;transition-delay:-.3s}span[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,rgba(255,61,0,.2) 33%,var(--primary-color) 100%);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}span[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#000}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}50%{opacity:.9}to{transform:rotate(360deg)}}']});let i=t;return i})();var qh=class{constructor(){this.state=st({})}select(t){return yi(()=>this.state()[t])}set(t,e){this.state.update(n=>pe(F({},n),{[t]:e}))}setState(t){this.state.update(e=>F(F({},e),t))}};var ze=(()=>{let t=class t extends qh{constructor(n,r){super(),this.http=n,this.authService=r,this.configurations=st({}),this.languages=st({}),this.countries=st({}),this.timezones=st({}),this.searchQuery="",this.savingMode={normal:{backdrop_size:"w1280",logo_size:"w500",poster_size:"w780",profile_size:"h632",still_size:"w300",baseUrl:"http://image.tmdb.org/t/p/"},high:{backdrop_size:"w780",logo_size:"w154",poster_size:"w154",profile_size:"w185",still_size:"w185",baseUrl:"http://image.tmdb.org/t/p/"},ultra:{backdrop_size:"w300",logo_size:"w45",poster_size:"w342",profile_size:"w45",still_size:"w92",baseUrl:"http://image.tmdb.org/t/p/"}},this.timeWindow=st("day")}getSavingMode(){return D(this,null,function*(){let n=yield this.authService.getLoggedInUser();return n?.data_saving_mode&&n?.data_saving_type?this.savingMode[n.data_saving_type]:"http://image.tmdb.org/t/p/original"})}getTMDBData(n,r={}){return this.http.get(`${ts.TMDB_BASE_URL}${n}`,{headers:{Authorization:`bearer ${ts.TMDB_ACCESS_TOKEN}`},params:pe(F({},r),{region:"IN",language:"en"})})}};t.\u0275fac=function(r){return new(r||t)(J(Sl),J(Kt))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Vn=(()=>{let t=class t{constructor(n,r){this.firestore=n,this.authService=r,this.favourites={movies:[],tvshows:[],celebrities:[],combined:[]},this.currentUser=this.authService.getLoggedInUser()}isFavorite(n,r){return D(this,null,function*(){return yield this.getList(),!!this.favourites[r].some(o=>o.id===n)})}getList(){return D(this,null,function*(){if(this.currentUser.user||(this.currentUser=yield this.authService.getLoggedInUser()),this.currentUser?.user?.id){let n=yield ny(iy(this.firestore,"savedList",this.currentUser.user.id));if(n.exists()){let r=n.data();return this.favourites.movies=r.movies,this.favourites.tvshows=r.tvshows,this.favourites.celebrities=r.celebrities,this.favourites.combined=r.combined,r}else return}})}updateList(n,r){return D(this,null,function*(){if(this.currentUser.user||(this.currentUser=yield this.authService.getLoggedInUser()),this.currentUser.demoAccount===!1){let o=iy(this.firestore,"savedList",this.currentUser.user.id),s=yield ny(o);if(s.exists()){let a=s.data();this.favourites=a;let c=a[n].findIndex(u=>u.id===r.id);return c>-1?a[n].splice(c,1):a[n].unshift(r),this.favourites=a,yield qS(o,a)}}})}};t.\u0275fac=function(r){return new(r||t)(J($r),J(Kt))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function y8(i,t){if(i&1&&(p(0,"span")(1,"i"),_(2,"as"),h(),_(3),h()),i&2){let e=m(2);d(3),be(" ",e.movie.character,"")}}function b8(i,t){if(i&1&&(p(0,"span")(1,"i"),_(2,"as"),h(),_(3),h()),i&2){let e=m(2);d(3),be(" ",e.movie.job,"")}}function C8(i,t){if(i&1&&(p(0,"span"),_(1),ct(2,"date"),h()),i&2){let e=m(2);d(),z(Bt(2,1,e.movie.release_date))}}var I8=i=>({active:i}),p2=()=>({width:"12px",height:"12px"});function w8(i,t){if(i&1){let e=G();p(0,"div",1)(1,"div",2),g(2,y8,4,1,"span")(3,b8,4,1),p(4,"i",3),A("click",function(){S(e);let r=m();return E(r.addToFavourites())}),h()(),p(5,"a",4),y(6,"app-img",5),p(7,"div",6)(8,"h4"),_(9),h(),p(10,"div",7),y(11,"p-rating",8),ct(12,"rating"),ct(13,"rating"),g(14,C8,3,3,"span",9),h()()()()}if(i&2){let e=m();l("ngClass",H(20,I8,e.movie.backdrop_path)),d(2),Je(2,e.movie.character?2:e.movie.job?3:-1),d(2),U((e.movie.isFavorite==null?null:e.movie.isFavorite.__zone_symbol__value)===!0?"pi pi-heart-fill":"pi pi-heart"),l("title",e.movie.isFavorite!=null&&e.movie.isFavorite.__zone_symbol__value?"Add to Favorites":"Remove From Favorites"),d(),l("routerLink","/movies/"+e.movie.id),d(),l("src",e.posterUrl+e.movie.poster_path),d(3),xn("",e.movie.adult?"18+":"","",e.movie.title,""),d(2),l("cancel",!1)("ngModel",Bt(12,16,e.movie.vote_average))("readonly",!0)("title",Bt(13,18,e.movie.vote_average))("iconOnStyle",Ke(22,p2))("iconOffStyle",Ke(23,p2)),d(3),l("ngIf",e.movie.release_date)}}var Vo=(()=>{let t=class t{constructor(n,r,o){this.tmdbService=n,this.firestoreService=r,this.authService=o,this.onFavorite=new L,this.posterUrl="http://image.tmdb.org/t/p/w342",this.setupUrl()}setupUrl(){return D(this,null,function*(){let n=yield this.tmdbService.getSavingMode()})}addToFavourites(){if(this.movie){if(this.authService.loggedInUser().demoAccount==!0){this.onFavorite.emit({severity:"error",summary:"Unauthorized",detail:"Please Login to Perform this Operation!",life:3e3});return}let n={id:this.movie.id,poster_path:this.movie.poster_path,release_date:this.movie.release_date,title:this.movie.title,vote_average:this.movie.vote_average};this.movie.isFavorite.__zone_symbol__value?this.movie.isFavorite.__zone_symbol__value=!1:this.movie.isFavorite={__zone_symbol__state:!0,__zone_symbol__value:!0},this.firestoreService.updateList("movies",n).then(()=>{this.movie?.isFavorite.__zone_symbol__value==!0?this.onFavorite.emit({severity:"success",summary:"Movie Added",detail:`${this.movie.title} has been added to your favourites`,life:3e3}):this.onFavorite.emit({severity:"info",summary:"Movie Removed",detail:`${this.movie?.title} has been removed from your favourites`,life:3e3})}).catch(r=>{console.log(r),this.onFavorite.emit({severity:"error",summary:"Failed",detail:"Failed to update your favorites",life:3e3})})}}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(Vn),w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-movie-card"]],inputs:{movie:"movie"},outputs:{onFavorite:"onFavorite"},standalone:!0,features:[R],decls:1,vars:1,consts:[["class","movie-card",3,"ngClass",4,"ngIf"],[1,"movie-card",3,"ngClass"],[1,"float-btns"],[3,"title","click"],[3,"routerLink"],[2,"aspect-ratio","0.667","border-radius",".5rem","object-fit","cover",3,"src"],[1,"titles"],[1,"bottom"],[3,"cancel","ngModel","readonly","title","iconOnStyle","iconOffStyle"],[4,"ngIf"]],template:function(r,o){r&1&&g(0,w8,15,24,"div",0),r&2&&l("ngIf",o.movie)},dependencies:[Ve,et,$,xe,Ie,nn,r2,d2,Ua,ld,or,ii,Bn,jh,Tr],styles:[".movie-card[_ngcontent-%COMP%]{width:100%;position:relative}.movie-card.active[_ngcontent-%COMP%]:hover .bottom[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-color)}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%]{position:absolute;top:0;padding:.5rem;left:0;width:100%;z-index:2;display:flex;align-items:center;justify-content:space-between}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]{font-size:20px;color:#fff;cursor:pointer;transition:all .3s;margin-left:auto}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] .pi-heart[_ngcontent-%COMP%]:hover{color:var(--primary-color)}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]:active{scale:1.1}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi-heart-fill[_ngcontent-%COMP%]{color:var(--primary-color)}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;font-size:12px;border-radius:10px;padding:0 5px;line-height:14px}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{padding:.1rem .4rem;border-radius:20px}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color);font-weight:500;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font-size:12px}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:auto 0}"]});let i=t;return i})();var T8=["path"],x8=Math.PI/180,S8=(()=>{let t=class t{constructor(n){this.supportsSvg=!!(n&&n.createElementNS&&n.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),this.base=n&&n.head.querySelector("base"),this.hasPerf=typeof window<"u"&&window.performance&&window.performance.now&&typeof window.performance.now()=="number"}resolveColor(n){if(this.base&&this.base.href){let r=n.indexOf("#");if(r>-1&&n.indexOf("url")>-1)return n.slice(0,r)+location.href+n.slice(r)}return n}getTimestamp(){return this.hasPerf?window.performance.now():Date.now()}getArc(n,r,o,s,a=!1){let c=Math.max(0,Math.min(n||0,r)),u=a?180:359.9999,f=r===0?u:c/r*u,v=this._polarToCartesian(s,o,f),b=this._polarToCartesian(s,o,0),O=f<=180?0:1;return`M ${v} A ${o} ${o} 0 ${O} 0 ${b}`}_polarToCartesian(n,r,o){let s=(o-90)*x8,a=n+r*Math.cos(s),c=n+r*Math.sin(s);return a+" "+c}};t.\u0275fac=function(r){return new(r||t)(J(Oe,8))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),E8={radius:125,animation:"easeOutCubic",animationDelay:void 0,duration:500,stroke:15,color:"#45CCCE",background:"#EAEAEA",responsive:!1,clockwise:!0,semicircle:!1,rounded:!1},O8=new le("ROUND_PROGRESS_DEFAULTS",{providedIn:"root",factory:()=>E8});var M8=(()=>{let t=class t{linearEase(n,r,o,s){return o*n/s+r}easeInQuad(n,r,o,s){return o*(n/=s)*n+r}easeOutQuad(n,r,o,s){return-o*(n/=s)*(n-2)+r}easeInOutQuad(n,r,o,s){return(n/=s/2)<1?o/2*n*n+r:-o/2*(--n*(n-2)-1)+r}easeInCubic(n,r,o,s){return o*(n/=s)*n*n+r}easeOutCubic(n,r,o,s){return o*((n=n/s-1)*n*n+1)+r}easeInOutCubic(n,r,o,s){return(n/=s/2)<1?o/2*n*n*n+r:o/2*((n-=2)*n*n+2)+r}easeInQuart(n,r,o,s){return o*(n/=s)*n*n*n+r}easeOutQuart(n,r,o,s){return-o*((n=n/s-1)*n*n*n-1)+r}easeInOutQuart(n,r,o,s){return(n/=s/2)<1?o/2*n*n*n*n+r:-o/2*((n-=2)*n*n*n-2)+r}easeInQuint(n,r,o,s){return o*(n/=s)*n*n*n*n+r}easeOutQuint(n,r,o,s){return o*((n=n/s-1)*n*n*n*n+1)+r}easeInOutQuint(n,r,o,s){return(n/=s/2)<1?o/2*n*n*n*n*n+r:o/2*((n-=2)*n*n*n*n+2)+r}easeInSine(n,r,o,s){return-o*Math.cos(n/s*(Math.PI/2))+o+r}easeOutSine(n,r,o,s){return o*Math.sin(n/s*(Math.PI/2))+r}easeInOutSine(n,r,o,s){return-o/2*(Math.cos(Math.PI*n/s)-1)+r}easeInExpo(n,r,o,s){return n===0?r:o*Math.pow(2,10*(n/s-1))+r}easeOutExpo(n,r,o,s){return n===s?r+o:o*(-Math.pow(2,-10*n/s)+1)+r}easeInOutExpo(n,r,o,s){return n===0?r:n===s?r+o:(n/=s/2)<1?o/2*Math.pow(2,10*(n-1))+r:o/2*(-Math.pow(2,-10*--n)+2)+r}easeInCirc(n,r,o,s){return-o*(Math.sqrt(1-(n/=s)*n)-1)+r}easeOutCirc(n,r,o,s){return o*Math.sqrt(1-(n=n/s-1)*n)+r}easeInOutCirc(n,r,o,s){return(n/=s/2)<1?-o/2*(Math.sqrt(1-n*n)-1)+r:o/2*(Math.sqrt(1-(n-=2)*n)+1)+r}easeInElastic(n,r,o,s){let a=s*.3,c=1.70158,u=o;return n===0?r:(n/=s)===1?r+o:(u{let t=class t{constructor(n,r,o,s){this.service=n,this.easing=r,this.defaults=o,this.ngZone=s,this.currentLinecap="",this.current=0,this.max=0,this.radius=this.defaults.radius,this.animation=this.defaults.animation,this.animationDelay=this.defaults.animationDelay,this.duration=this.defaults.duration,this.stroke=this.defaults.stroke,this.color=this.defaults.color,this.background=this.defaults.background,this.responsive=this.defaults.responsive,this.clockwise=this.defaults.clockwise,this.semicircle=this.defaults.semicircle,this.rounded=this.defaults.rounded,this.onRender=new L,this.lastAnimationId=0}_animateChange(n,r){typeof n!="number"&&(n=0),r=this._clamp(r),n=this._clamp(n);let o=this,s=r-n,a=o.duration;o.ngZone.runOutsideAngular(()=>{let c=()=>{let u=o.service.getTimestamp(),f=++o.lastAnimationId;requestAnimationFrame(function v(){let b=Math.min(o.service.getTimestamp()-u,a),O=o.easing[o.animation],V=O(b,n,s,a);o._updatePath(V),o.onRender.observers.length>0&&o.onRender.emit(V),f===o.lastAnimationId&&b0?setTimeout(c,this.animationDelay):c()})}_updatePath(n){if(this.path){let r=this.service.getArc(n,this.max,this.radius-this.stroke/2,this.radius,this.semicircle),o=this.path.nativeElement,s=this.rounded&&n>0?"round":"";s!==this.currentLinecap&&(this.currentLinecap=s,o.style.strokeLinecap=s),o.setAttribute("d",r)}}_clamp(n){return Math.max(0,Math.min(n||0,this.max))}getPathTransform(){let n=this._getDiameter();return this.semicircle?this.clockwise?`translate(0, ${n}) rotate(-90)`:`translate(${n+","+n}) rotate(90) scale(-1, 1)`:this.clockwise?null:`scale(-1, 1) translate(-${n} 0)`}resolveColor(n){return this.service.resolveColor(n)}ngOnChanges(n){n.current?this._animateChange(n.current.previousValue,n.current.currentValue):this._updatePath(this.current)}_getDiameter(){return this.radius*2}_getElementHeight(){return this.responsive?null:(this.semicircle?this.radius:this._getDiameter())+"px"}_getViewBox(){let n=this._getDiameter();return`0 0 ${n} ${this.semicircle?this.radius:n}`}_getPaddingBottom(){return this.responsive?this.semicircle?"50%":"100%":null}};t.\u0275fac=function(r){return new(r||t)(w(S8),w(M8),w(O8),w(ge))},t.\u0275cmp=k({type:t,selectors:[["round-progress"]],viewQuery:function(r,o){if(r&1&&oe(T8,5),r&2){let s;q(s=W())&&(o.path=s.first)}},hostAttrs:["role","progressbar"],hostVars:11,hostBindings:function(r,o){r&2&&(T("aria-valuemin",0)("aria-valuemax",o.max)("aria-valuenow",o.current),ki("width",o.responsive?"":o._getDiameter()+"px")("height",o._getElementHeight())("padding-bottom",o._getPaddingBottom()),qt("responsive",o.responsive))},inputs:{current:"current",max:"max",radius:"radius",animation:"animation",animationDelay:"animationDelay",duration:"duration",stroke:"stroke",color:"color",background:"background",responsive:"responsive",clockwise:"clockwise",semicircle:"semicircle",rounded:"rounded"},outputs:{onRender:"onRender"},standalone:!0,features:[Mt,R],decls:4,vars:13,consts:[["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["path",""]],template:function(r,o){r&1&&(ke(),p(0,"svg",0),y(1,"circle",1)(2,"path",1,2),h()),r&2&&(T("viewBox",o._getViewBox()),d(),ki("stroke",o.resolveColor(o.background))("stroke-width",o.stroke),T("cx",o.radius)("cy",o.radius)("r",o.radius-o.stroke/2),d(),ki("stroke-width",o.stroke)("stroke",o.resolveColor(o.color)),T("transform",o.getPathTransform()))},styles:["[_nghost-%COMP%]{display:block;position:relative;overflow:hidden}.responsive[_nghost-%COMP%]{width:100%;padding-bottom:100%}.responsive[_nghost-%COMP%] > svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0}"],changeDetection:0});let i=t;return i})();function k8(i,t){if(i&1&&(p(0,"div",1),y(1,"round-progress",2),p(2,"div",3),_(3),h()()),i&2){let e=m();d(),l("current",e.current)("max",e.max)("color",e.current<5?"#ff0000":e.current<7?"#ffa500":"#78C000")("background","#eaeaea")("radius",e.radius?e.radius:32)("stroke",e.stroke?e.stroke:8)("semicircle",!1)("rounded",!0)("clockwise",!0)("responsive",!1)("duration",800)("animation","easeInOutQuart")("animationDelay",0)("title",e.max+"/"+e.current),d(2),z(e.current)}}var Ha=(()=>{let t=class t{constructor(){this.max=void 0,this.radius=void 0,this.stroke=void 0,this.current=void 0,this.rating=parseInt(this.current)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-circle-rating"]],inputs:{max:"max",radius:"radius",stroke:"stroke",current:"current"},standalone:!0,features:[R],decls:1,vars:1,consts:[["class","circle-rating",4,"ngIf"],[1,"circle-rating"],[3,"current","max","color","background","radius","stroke","semicircle","rounded","clockwise","responsive","duration","animation","animationDelay","title"],[1,"text-content"]],template:function(r,o){r&1&&g(0,k8,4,15,"div",0),r&2&&l("ngIf",o.max&&o.current)},dependencies:[h2,$,Ie],styles:[".circle-rating[_ngcontent-%COMP%]{position:relative;display:inline-block}.circle-rating[_ngcontent-%COMP%] .text-content[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:1.2em;font-weight:500}"]});let i=t;return i})();function A8(i,t){if(i&1&&(p(0,"div",10),_(1),h()),i&2){let e=m();d(),be(" ",e.tvShow.episode_count>1?e.tvShow.episode_count+" Episodes":e.tvShow.episode_count+" Episode","")}}var Ga=(()=>{let t=class t{constructor(n,r){this.firestoreService=n,this.authService=r,this.tvShow="",this.onFavorite=new L,this.url="http://image.tmdb.org/t/p/w342",this.backgroundPath="";let o=this.tvShow.poster_path,s="http://image.tmdb.org/t/p/w342";o?this.backgroundPath=s+o:this.backgroundPath="https://firebasestorage.googleapis.com/v0/b/showbizhub-4f1b9.appspot.com/o/defualt_poster.png?alt=media&token=57690fd6-c65a-4ece-bd3e-4cd7dff1e87a"}addToFavourites(){if(this.tvShow){if(this.authService.loggedInUser().demoAccount==!0){this.onFavorite.emit({severity:"error",summary:"Unauthorized",detail:"Please Login to Perform this Operation!",life:3e3});return}let n={id:this.tvShow.id,poster_path:this.tvShow.poster_path,first_air_date:this.tvShow.first_air_date,name:this.tvShow.name,vote_average:this.tvShow.vote_average};this.tvShow?.isFavorite?.__zone_symbol__value?this.tvShow.isFavorite.__zone_symbol__value=!1:this.tvShow.isFavorite={__zone_symbol__state:!0,__zone_symbol__value:!0},this.firestoreService.updateList("tvshows",n).then(()=>{this.tvShow?.isFavorite.__zone_symbol__value?this.onFavorite.emit({severity:"success",summary:"TV Show Added",detail:`${this.tvShow?.name} has been added to your favourites`,life:5e3}):this.onFavorite.emit({severity:"info",summary:"TV Show Removed",detail:`${this.tvShow?.name} has been removed from your favourites`,life:5e3})}).catch(()=>{this.onFavorite.emit({severity:"error",summary:"Failed",detail:"Failed to update your favorites",life:5e3})})}}};t.\u0275fac=function(r){return new(r||t)(w(Vn),w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-tvshow-card"]],inputs:{tvShow:"tvShow"},outputs:{onFavorite:"onFavorite"},standalone:!0,features:[R],decls:16,vars:14,consts:[[1,"tvshow"],[1,"float-details"],["class","episodes",4,"ngIf"],[3,"click"],[3,"routerLink"],[2,"aspect-ratio","0.667","border-radius",".5rem","object-fit","cover",3,"src"],[1,"details"],[3,"max","radius","stroke","current"],[1,"titles"],[1,"float-epcount"],[1,"episodes"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1),g(2,A8,2,1,"div",2),p(3,"button",3),A("click",function(){return o.addToFavourites()}),y(4,"i"),h()(),p(5,"a",4),y(6,"app-img",5),p(7,"div",6),y(8,"app-circle-rating",7),p(9,"div",8)(10,"span"),_(11),ct(12,"date"),h(),p(13,"h4"),_(14),h()()()(),y(15,"div",9),h()),r&2&&(d(2),l("ngIf",o.tvShow.episode_count),d(2),U((o.tvShow.isFavorite==null?null:o.tvShow.isFavorite.__zone_symbol__value)==!0?"pi pi-heart-fill":"pi pi-heart"),d(),l("routerLink","/tvshows/"+o.tvShow.id),d(),l("src",o.url+o.tvShow.poster_path),d(2),l("max",10)("radius",18)("stroke",4)("current",o.tvShow==null||o.tvShow.vote_average==null?null:o.tvShow.vote_average.toFixed(1)),d(3),z(Bt(12,12,o.tvShow.first_air_date)),d(3),xn("",o.tvShow.adult?"18+":""," ",o.tvShow==null?null:o.tvShow.name,""))},dependencies:[Ve,et,$,Ie,nn,Ha,Tr],styles:[".tvshow[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}.tvshow[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:brightness(80%) saturate(70%)}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%]{position:absolute;top:0;color:#fff;display:flex;justify-content:space-between;z-index:2;padding:10px;width:100%}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] .episodes[_ngcontent-%COMP%]{background-color:#252525;padding:0 5px;border-radius:25px;font-size:.8rem}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;background-color:transparent;outline:0;margin-left:auto}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:20px;cursor:pointer;transition:all .3s;color:#fff}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{color:var(--primary-color)}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:active{scale:1.1}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i.pi-heart-fill[_ngcontent-%COMP%]{color:var(--primary-color)}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color)}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{display:flex;align-items:center;margin:auto 0;gap:5px;border-radius:40px;padding:0 5px;font-size:10px;color:var(--surface-800)}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{display:flex;flex-direction:column}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal;font-weight:500}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:.7rem;font-size:.6rem;color:#fff;background-color:var(--primary-color);width:max-content;padding:0 5px;border-radius:20px}"]});let i=t;return i})();var Wh=(()=>{let t=class t{constructor(n,r){this.firestoreService=n,this.authService=r,this.person="",this.onFavorite=new L,this.genders=["Other","Female","Male"],this.profileUrl="http://image.tmdb.org/t/p/w342"}addToFavourites(){if(this.authService.loggedInUser().demoAccount==!0){this.onFavorite.emit({severity:"error",summary:"Unauthorized",detail:"Please Login to Perform this Operation!",life:3e3});return}if(this.person){let n={id:this.person.id,profile_path:this.person.profile_path,known_for_department:this.person.known_for_department,name:this.person.name,gender:this.person.gender};this.person?.isFavorite?.__zone_symbol__value?this.person.isFavorite.__zone_symbol__value=!1:this.person.isFavorite={__zone_symbol__state:!0,__zone_symbol__value:!0},this.firestoreService.updateList("celebrities",n).then(()=>{this.person?.isFavorite.__zone_symbol__value?this.onFavorite.emit({severity:"success",summary:"Celebrity Added",detail:`${this.person?.name} has been added to your favourites`,life:5e3}):this.onFavorite.emit({severity:"info",summary:"Celebrity Removed",detail:`${this.person?.name} has been removed from your favourites`,life:5e3})}).catch(()=>{this.onFavorite.emit({severity:"error",summary:"Failed",detail:"Failed to update your favorites",life:5e3})})}}};t.\u0275fac=function(r){return new(r||t)(w(Vn),w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-celebrity-card"]],inputs:{person:"person"},outputs:{onFavorite:"onFavorite"},standalone:!0,features:[R],decls:12,vars:9,consts:[[1,"celebrity",3,"title"],[1,"float-btns"],[3,"title","click"],[3,"routerLink"],[2,"aspect-ratio","0.667","border-radius",".5rem","object-fit","cover",3,"src"],[1,"titles"],[1,"gender"],[1,"department"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"i",2),A("click",function(){return o.addToFavourites()}),h()(),p(3,"a",3),y(4,"app-img",4),p(5,"div",5)(6,"span",6),_(7),h(),p(8,"h4"),_(9),h(),p(10,"span",7),_(11),h()()()()),r&2&&(l("title",o.person==null?null:o.person.name),d(2),U((o.person==null||o.person.isFavorite==null?null:o.person.isFavorite.__zone_symbol__value)===!0?"pi pi-heart-fill":"pi pi-heart"),l("title",!(o.person==null||o.person.isFavorite==null)&&o.person.isFavorite.__zone_symbol__value?"Add to Favorites":"Remove From Favorites"),d(),l("routerLink","/celebrities/"+o.person.id),d(),l("src",o.profileUrl+o.person.profile_path),d(3),z(o.genders[o.person.gender]),d(2),z(o.person==null?null:o.person.name),d(2),z(o.person==null?null:o.person.known_for_department))},dependencies:[$,Ve,et,Tr],styles:[".celebrity[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.celebrity[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:.5rem;cursor:pointer;transition:all .5s}.celebrity[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{position:static;bottom:1rem;left:0;width:100%;background-color:#000000af;border-radius:.5rem;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);padding:0 .5rem}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color);font-weight:600;line-height:1rem}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#b8b8b8;font-size:12px}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] span.gender[_ngcontent-%COMP%]{line-height:10px;font-size:10px}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%]{position:absolute;top:0;padding:.5rem;right:0;z-index:2}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]{font-size:20px;color:#fff;cursor:pointer;transition:all .3s}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] .pi-heart[_ngcontent-%COMP%]:hover{color:var(--primary-color)}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]:active{scale:1.1}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi-heart-fill[_ngcontent-%COMP%]{color:var(--primary-color)}.celebrity[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:saturate(70%) brightness(80%)}"]});let i=t;return i})();function D8(i,t,e,n){let r=window&&!!window.document&&window.document.documentElement,o=r&&t?window:e;if(i&&(o=i&&r&&typeof i=="string"?P8(i,e.nativeElement,n):i,!o))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return o}function P8(i,t,e){return(e?window.document:t).querySelector(i)}function vy(i){return i&&!i.firstChange}function R8(){return typeof window<"u"}var V8={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},L8={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},yy=class{constructor(t=!0){this.vertical=t,this.propsMap=t?V8:L8}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};function F8(i,t,e){return!!(i&&t||!e&&t)}function N8({windowElement:i,axis:t}){return B8({axis:t,isWindow:z8(i)},i)}function B8(i,t){let e=i.isWindow||t&&!t.nativeElement?t:t.nativeElement;return pe(F({},i),{container:e})}function z8(i){return["Window","global"].some(e=>Object.prototype.toString.call(i).includes(e))}function Iy(i,t){return i?t.document.documentElement:null}function m2(i,t){let e=H8(t);return t.isWindow?U8(e,i,t):j8(e,i,t)}function U8(i,t,e){let{axis:n,container:r,isWindow:o}=e,{offsetHeightKey:s,clientHeightKey:a}=f2(n),c=i+_2(Iy(o,r),n,o),u=g2(t.nativeElement,o,s,a),f=G8(t.nativeElement,n,o)+u;return{height:i,scrolled:c,totalToScroll:f,isWindow:o}}function j8(i,t,e){let{axis:n,container:r}=e,o=r[n.scrollTopKey()],s=r[n.scrollHeightKey()];return{height:i,scrolled:o,totalToScroll:s,isWindow:!1}}function f2(i){return{offsetHeightKey:i.offsetHeightKey(),clientHeightKey:i.clientHeightKey()}}function H8({container:i,isWindow:t,axis:e}){let{offsetHeightKey:n,clientHeightKey:r}=f2(e);return g2(i,t,n,r)}function g2(i,t,e,n){if(isNaN(i[e])){let r=Iy(t,i);return r?r[n]:0}else return i[e]}function G8(i,t,e){let n=t.topKey();if(i.getBoundingClientRect)return i.getBoundingClientRect()[n]+_2(i,t,e)}function _2(i,t,e){let n=t.pageYOffsetKey(),r=t.scrollTopKey(),o=t.offsetTopKey();return isNaN(window.pageYOffset)?Iy(e,i)[r]:i.ownerDocument?i.ownerDocument.defaultView[n]:i[o]}function $8(i,t={down:0,up:0},e){let n,r;if(i.totalToScroll<=0)return!1;let o=i.isWindow?i.scrolled:i.height+i.scrolled;if(e)n=(i.totalToScroll-o)/i.totalToScroll,r=(t?.down?t.down:0)/10;else{let a=i.scrolled+(i.totalToScroll-o);n=i.scrolled/a,r=(t?.up?t.up:0)/10}return n<=r}function q8(i,t){return iSe(m2(n,o))),Re(u=>Y8(s.lastScrollPosition,u,c)),It(({stats:u})=>s.updateScroll(u.scrolled,u.totalToScroll)),Ni(({fire:u,scrollDown:f,stats:{totalToScroll:v}})=>F8(i.alwaysCallback,u,s.isTriggeredScroll(v,f))),It(({scrollDown:u,stats:{totalToScroll:f}})=>{s.updateTriggeredFlag(f,u)}),Re(Z8))}function Q8(i){let t=Hb(i.container,"scroll");return i.throttle&&(t=t.pipe(t1(i.throttle,void 0,{leading:!0,trailing:!0}))),t}function Y8(i,t,e){let{scrollDown:n,fire:r}=W8(i,t,e);return{scrollDown:n,fire:r,stats:t}}var Cy={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function Z8(i){let{scrollDown:t,stats:{scrolled:e}}=i;return{type:t?Cy.DOWN:Cy.UP,payload:{currentScrollPosition:e}}}var $a=(()=>{let t=class t{constructor(n,r){this.element=n,this.zone=r,this.scrolled=new L,this.scrolledUp=new L,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:n,infiniteScrollDisabled:r,infiniteScrollDistance:o}){let s=vy(n),a=vy(r),c=vy(o),u=!a&&!this.infiniteScrollDisabled||a&&!r.currentValue||c;(s||a||c)&&(this.destroyScroller(),u&&this.setup())}setup(){R8()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=K8({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(n=>this.handleOnScroll(n))})}handleOnScroll({type:n,payload:r}){let o=n===Cy.DOWN?this.scrolled:this.scrolledUp;X8(o)&&this.zone.run(()=>o.emit(r))}ngOnDestroy(){this.destroyScroller()}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}};t.\u0275fac=function(r){return new(r||t)(w(ve),w(ge))},t.\u0275dir=it({type:t,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},features:[Mt]});let i=t;return i})();function X8(i){return i.observed??i.observers.length>0}var xr=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();var v2=(()=>{class i{styleClass;style;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":this.shape==="circle","p-skeleton-none":this.animation==="none"}}containerStyle(){return this.size?pe(F({},this.style),{width:this.size,height:this.size,borderRadius:this.borderRadius}):pe(F({},this.style),{width:this.width,height:this.height,borderRadius:this.borderRadius})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:7,consts:[[3,"ngClass","ngStyle"]],template:function(n,r){n&1&&y(0,"div",0),n&2&&(U(r.styleClass),l("ngClass",r.containerClass())("ngStyle",r.containerStyle()),T("data-pc-name","skeleton")("aria-hidden",!0)("data-pc-section","root"))},dependencies:[xe,Ce],styles:[`@layer primeng{.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}} -`],encapsulation:2,changeDetection:0})}return i})(),y2=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var b2=()=>({marginBottom:"10px"}),C2=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-card-skeleton"]],standalone:!0,features:[R],decls:6,vars:6,consts:[[1,"card-skeleton"],["height","100%"],["styleClass","mb-2"],[1,"float"],["shape","circle","size","2rem","styleClass","mr-2"]],template:function(r,o){r&1&&(p(0,"div",0),y(1,"p-skeleton",1)(2,"p-skeleton",2)(3,"p-skeleton",2),p(4,"div",3),y(5,"p-skeleton",4),h()()),r&2&&(d(),xt(Ke(4,b2)),d(),xt(Ke(5,b2)))},dependencies:[y2,v2],styles:[".card-skeleton[_ngcontent-%COMP%]{width:100%;aspect-ratio:.667;position:relative}.card-skeleton[_ngcontent-%COMP%] .float[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding:.5rem}"]});let i=t;return i})();function e7(i,t){if(i&1){let e=G();p(0,"app-movie-card",4),A("onFavorite",function(r){S(e);let o=m(2);return E(o.showToast(r))}),h()}if(i&2){let e=t.$implicit;l("movie",e)}}function t7(i,t){if(i&1&&Yt(0,e7,1,1,"app-movie-card",5,di),i&2){let e=m();Zt(e.moviesResults.results)}}function i7(i,t){if(i&1){let e=G();p(0,"app-tvshow-card",6),A("onFavorite",function(r){S(e);let o=m(2);return E(o.showToast(r))}),h()}if(i&2){let e=t.$implicit;l("tvShow",e)}}function n7(i,t){if(i&1&&Yt(0,i7,1,1,"app-tvshow-card",7,di),i&2){let e=m();Zt(e.tvshowResults.results)}}function r7(i,t){if(i&1){let e=G();p(0,"app-celebrity-card",8),A("onFavorite",function(r){S(e);let o=m(2);return E(o.showToast(r))}),h()}if(i&2){let e=t.$implicit;l("person",e)}}function o7(i,t){if(i&1&&Yt(0,r7,1,1,"app-celebrity-card",9,di),i&2){let e=m();Zt(e.celebritiesResults.results)}}function s7(i,t){if(i&1){let e=G();p(0,"app-movie-card",4),A("onFavorite",function(r){S(e);let o=m(3);return E(o.showToast(r))}),h()}if(i&2){let e=m().$implicit;l("movie",e)}}function a7(i,t){if(i&1){let e=G();p(0,"app-tvshow-card",6),A("onFavorite",function(r){S(e);let o=m(3);return E(o.showToast(r))}),h()}if(i&2){let e=m().$implicit;l("tvShow",e)}}function l7(i,t){if(i&1){let e=G();p(0,"app-celebrity-card",8),A("onFavorite",function(r){S(e);let o=m(3);return E(o.showToast(r))}),h()}if(i&2){let e=m().$implicit;l("person",e)}}function c7(i,t){if(i&1&&g(0,s7,1,1,"app-movie-card",5)(1,a7,1,1)(2,l7,1,1),i&2){let e=t.$implicit;Je(0,e.media_type=="movie"?0:e.media_type==="tv"?1:2)}}function d7(i,t){if(i&1&&Yt(0,c7,3,1,null,null,di),i&2){let e=m();Zt(e.combinedResults.results)}}function u7(i,t){i&1&&y(0,"app-card-skeleton")}function p7(i,t){if(i&1&&Yt(0,u7,1,0,"app-card-skeleton",null,di),i&2){let e=m();Zt(e.loader)}}function h7(i,t){if(i&1){let e=G();p(0,"div",10)(1,"p-button",11),A("onClick",function(){S(e);let r=m();return E(r.startLoading())}),h()()}i&2&&(d(),l("rounded",!0))}function m7(i,t){if(i&1){let e=G();p(0,"div",12)(1,"h1"),_(2,"Showbizhub Failed to Load Your Requested Content!"),h(),p(3,"p"),_(4,"You Might Have Internet Connection Error!"),h(),p(5,"span"),_(6,"Please Try Again Later"),h(),p(7,"p-button",13),A("onClick",function(){S(e);let r=m();return E(r.reloadComponent())}),h()()}i&2&&(d(7),l("rounded",!0))}var f7=["*"],_t=(()=>{let t=class t{constructor(n,r,o,s,a){this.firestoreService=n,this.messageService=r,this.tmdbService=o,this.router=s,this.route=a,this.movies=void 0,this.containerType="",this.tvshows=void 0,this.celebrities=void 0,this.combined=void 0,this.path="",this.params="",this.queryParams={},this.multipleResults=!1,this.autoLoad=!0,this.onInfiniteScroll=new L,this.loading=!1,this.loadError=!1,this.loader=[],this.moviesResults={total_pages:1,total_results:20,page:1,results:[]},this.tvshowResults={total_pages:1,total_results:20,page:1,results:[]},this.celebritiesResults={total_pages:1,total_results:20,page:1,results:[]},this.combinedResults={total_pages:1,total_results:20,page:1,results:[]},this.loader.length=20}reloadComponent(){this.router.navigateByUrl("",{skipLocationChange:!0}).then(()=>{})}ngOnChanges(n){(this.path||n.params||n.queryParams)&&this.getResults(),n.movies?this.movies?.map(r=>{this.moviesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"movies")}))}):n.tvshows?this.tvshows?.map(r=>{this.tvshowResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"tvshows")}))}):n.celebrities?this.celebrities?.map(r=>{this.celebritiesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"celebrities")}))}):n.combined&&this.combined?.map(r=>{this.combinedResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"combined")}))})}ngAfterViewInit(){}startLoading(){this.autoLoad=!0,this.getMoreResults()}getResults(){this.loading=!0,this.loadError=!1,this.moviesResults.results=[],this.tvshowResults.results=[],this.celebritiesResults.results=[],this.combinedResults.results=[],this.tmdbService.getTMDBData(this.path+this.params,this.queryParams).subscribe(n=>{this.containerType==="movies"?(n.results.map(r=>D(this,null,function*(){return this.moviesResults.results.push(pe(F({},r),{isFavorite:yield this.firestoreService.isFavorite(r.id,"movies")}))})),this.moviesResults.total_pages=n.total_pages,this.moviesResults.page=n.page,this.moviesResults.total_results=n.total_results):this.containerType==="celebrities"?(this.celebritiesResults.results=n.results.map(r=>pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"celebrities")})),this.celebritiesResults.total_pages=n.total_pages,this.celebritiesResults.page=n.page,this.celebritiesResults.total_results=n.total_results):this.containerType==="tvshows"?(this.tvshowResults.results=n.results.map(r=>pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"tvshows")})),this.tvshowResults.total_pages=n.total_pages,this.tvshowResults.page=n.page,this.tvshowResults.total_results=n.total_results):this.containerType==="combined"&&(this.combinedResults.results=n.results.map(r=>pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,r.media_type=="movie"?"movies":r.media_type=="tv"?"tvshows":"celebrities")})),this.combinedResults.total_pages=n.total_pages,this.combinedResults.page=n.page,this.combinedResults.total_results=n.total_results),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})}getMoreResults(){!this.multipleResults||!this.autoLoad||(this.containerType==="movies"?this.moviesResults.total_pages>this.moviesResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.moviesResults.page+1})).subscribe(n=>{this.moviesResults.total_pages=n.total_pages,this.moviesResults.page=n.page,this.moviesResults.total_results=n.total_results,n.results.map(r=>{this.moviesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"movies")}))}),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})):this.containerType==="tvshows"?this.tvshowResults.total_pages>this.tvshowResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.tvshowResults.page+1})).subscribe(n=>{this.tvshowResults.total_pages=n.total_pages,this.tvshowResults.page=n.page,this.tvshowResults.total_results=n.total_results,n.results.map(r=>{this.tvshowResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"tvshows")}))}),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})):this.containerType==="celebrities"?this.celebritiesResults.total_pages>this.celebritiesResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.celebritiesResults.page+1})).subscribe(n=>{this.celebritiesResults.total_pages=n.total_pages,this.celebritiesResults.page=n.page,this.celebritiesResults.total_results=n.total_results,n.results.forEach(r=>{this.celebritiesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"celebrities")}))}),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})):this.containerType==="combined"&&this.combinedResults.total_pages>this.combinedResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.combinedResults.page+1})).subscribe(n=>{n.results.map(r=>this.combinedResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,r.media_type=="movie"?"movies":r.media_type=="tv"?"tvshows":"celebrities")}))),this.combinedResults.total_pages=n.total_pages,this.combinedResults.page=n.page,this.combinedResults.total_results=n.total_results,this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})))}showToast(n){this.messageService.add({severity:n.severity,summary:n?.summary,detail:n?.detail,life:n?.life})}};t.\u0275fac=function(r){return new(r||t)(w(Vn),w(sr),w(ze),w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-cards-container"]],inputs:{movies:"movies",containerType:"containerType",tvshows:"tvshows",celebrities:"celebrities",combined:"combined",path:"path",params:"params",queryParams:"queryParams",multipleResults:"multipleResults",autoLoad:"autoLoad"},outputs:{onInfiniteScroll:"onInfiniteScroll"},standalone:!0,features:[mt([sr]),Mt,R],ngContentSelectors:f7,decls:10,vars:7,consts:[["position","top-right"],["infiniteScroll","",1,"cards-container",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],["style","text-align: center;"],["class","content"],[3,"movie","onFavorite"],[3,"movie"],[3,"tvShow","onFavorite"],[3,"tvShow"],[3,"person","onFavorite"],[3,"person"],[2,"text-align","center"],["label","Load More","size","small",3,"rounded","onClick"],[1,"content"],["label","Reload","icon","pi pi-load","size","small",3,"rounded","onClick"]],template:function(r,o){r&1&&(je(),y(0,"p-toast",0),p(1,"div",1),A("scrolled",function(){return o.getMoreResults()}),g(2,t7,2,0)(3,n7,2,0)(4,o7,2,0)(5,d7,2,0)(6,p7,2,0),Ae(7),h(),g(8,h7,2,1,"div",2)(9,m7,8,1,"div",3)),r&2&&(d(),l("infiniteScrollDistance",1)("infiniteScrollThrottle",250)("scrollWindow",!0),d(),Je(2,o.containerType==="movies"&&o.moviesResults.results.length>0?2:o.containerType==="tvshows"&&o.tvshowResults.results.length>0?3:o.containerType==="celebrities"&&o.celebritiesResults.results.length>0?4:o.containerType==="combined"&&o.combinedResults.results.length>0?5:-1),d(4),Je(6,o.loading?6:-1),d(2),Je(8,o.autoLoad?-1:8),d(),Je(9,o.loadError?9:-1))},dependencies:[Vo,Ga,Wh,Uu,zu,xr,$a,C2,yt,ni],styles:[".cards-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,1fr);width:100%;margin:0 auto;max-width:1280px;grid-gap:1rem;padding:.5rem}.content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:80vh;flex-direction:column}.content[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color)}.content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}@media screen and (max-width: 991px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}@media screen and (max-width: 767px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media screen and (max-width: 575px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media screen and (max-width: 381px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}}"]});let i=t;return i})();function g7(i,t){if(i&1&&(p(0,"h1"),_(1),h()),i&2){let e=m();d(),z(e.label)}}var _7=["*"],li=(()=>{let t=class t{constructor(){this.showAs="flex"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-top-titles"]],inputs:{label:"label",showAs:"showAs"},standalone:!0,features:[R],ngContentSelectors:_7,decls:3,vars:2,consts:[[1,"top-titles",3,"ngClass"]],template:function(r,o){r&1&&(je(),p(0,"div",0),g(1,g7,2,1,"h1"),Ae(2),h()),r&2&&(l("ngClass",o.showAs),d(),Je(1,o.label?1:-1))},dependencies:[$,xe],styles:[".top-titles[_ngcontent-%COMP%]{margin:.6rem}.top-titles.flex[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;overflow:auto}.top-titles.flex[_ngcontent-%COMP%]::-webkit-scrollbar{width:0px;height:0px}.top-titles.column[_ngcontent-%COMP%]{display:block}.top-titles[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{border-left:3px solid var(--primary-color);padding-left:.3rem;margin-bottom:.4rem}"]});let i=t;return i})();var I2=(()=>{let t=class t{constructor(n,r){this.router=n,this.activatedRoute=r,this.moviesTypes=[{name:"Popular Movies",endpoint:"popular",id:1},{name:"Upcoming Movies",endpoint:"upcoming",id:2},{name:"Now Playing Movies",endpoint:"now_playing",id:3},{name:"Top Rated Movies",endpoint:"top_rated",id:4}],this.currentType=this.moviesTypes[0],document.title="Movies | Showbizhub",r.queryParams.subscribe(o=>D(this,null,function*(){if(o.type){let s=this.moviesTypes.filter(a=>a.endpoint==o.type);this.currentType=s[0]}else this.currentType=this.moviesTypes[0]}))}updateType(n){let r={type:n.value.endpoint};this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:r,queryParamsHandling:"merge"})}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-movies"]],standalone:!0,features:[R],decls:3,vars:5,consts:[[3,"label"],["optionLabel","name",3,"options","ngModel","ngModelChange","onChange"],["containerType","movies","path","movie",3,"params","multipleResults"]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"p-dropdown",1),A("ngModelChange",function(a){return o.currentType=a})("onChange",function(a){return o.updateType(a)}),h()(),y(2,"app-cards-container",2)),r&2&&(l("label",o.currentType==null?null:o.currentType.name),d(),l("options",o.moviesTypes)("ngModel",o.currentType),d(),l("params","/"+o.currentType.endpoint)("multipleResults",!0))},dependencies:[Rn,Wn,Bi,ii,_t,li,or,Bn]});let i=t;return i})();var w2=(()=>{let t=class t{transform(n,...r){var o=n;if(n<60)return n+" minutes";var s=o/60,a=Math.floor(s),c=(s-a)*60,u=Math.round(c);return a+" hours and "+u+" minutes"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"runtime",type:t,pure:!0,standalone:!0});let i=t;return i})();var Kn=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronLeftIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var Qn=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronRightIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var dd=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["WindowMaximizeIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var ud=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["WindowMinimizeIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var Kh=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Rt,pt,Qn,Kn,dd,ud,za,$,Te]})}return i})();var Lo=function(){return Lo=Object.assign||function(t){for(var e,n=1,r=arguments.length;na){o=u;break}c===s.length-1&&(o=u)}var v=o.split("-"),b=parseInt(v[0],10),O=parseInt(v[1],10),V=t.width(),K=t.height()-e,P=Math.min(V,b),j=Math.min(K,O),ce=Math.min(P/b,j/O);return{width:b*ce,height:O*ce}}},getTransform:function(i,t,e,n,r){if(r){var o=Fe(i).find("img").first();if(o.get()){var s=t.get().getBoundingClientRect(),a=s.width,c=t.height()-(e+n),u=o.width(),f=o.height(),v=o.style(),b=(a-u)/2-o.offset().left+(parseFloat(v.paddingLeft)||0)+(parseFloat(v.borderLeft)||0)+Fe(window).scrollLeft()+s.left,O=(c-f)/2-o.offset().top+(parseFloat(v.paddingTop)||0)+(parseFloat(v.borderTop)||0)+Fe(window).scrollTop()+e,V=u/r.width,K=f/r.height,P="translate3d("+(b*=-1)+"px, "+(O*=-1)+"px, 0) scale3d("+V+", "+K+", 1)";return P}}},getIframeMarkup:function(i,t,e,n,r,o){var s=o?'title="'+o+'"':"";return'
+`],encapsulation:2,changeDetection:0})}return i})(),Ua=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,gy,fy,my,Te]})}return i})();var jh=(()=>{let t=class t{transform(n,...r){return parseInt(n.toFixed(1))/2}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"rating",type:t,pure:!0,standalone:!0});let i=t;return i})();function d8(i,t){if(i&1&&(p(0,"div",3),y(1,"div",4),h()),i&2){let e=m(2);d(),ki("width",e.diameter)("height",e.diameter)}}function u8(i,t){if(i&1&&y(0,"div",5),i&2){let e=m().ngIf,n=m();ki("background",n.color)("height",n.height)("width",e+"%")}}function p8(i,t){if(i&1&&(Z(0),g(1,d8,2,4,"div",1)(2,u8,1,6,"div",2),X()),i&2){let e=m();d(),l("ngIf",e.includeSpinner),d(),l("ngIf",e.includeBar)}}var _y=class{constructor(t={}){this.config=t,this.state={action:null,value:0,initialValue:0},this.requests=null,this.disabled=!1,this.stream$=new Gt,this._value$=null,this.timer$=e=>{let n=Se(e);switch(e.action){case"start":case"increment":case"set":{e.action==="start"&&this.config.latencyThreshold===0&&e.value===0&&(e.value=e.initialValue),this.requests>0&&(n=km(this.config.latencyThreshold,250).pipe(Re(r=>pe(F({},e),{value:r===0?this.state.value||e.initialValue:this._increment()}))));break}case"complete":case"stop":{n=e.value===0?Se(F({},e)):km(0,500).pipe(dn(2),Re(r=>({value:r===0?100:0})));break}}return n.pipe(Re(r=>pe(F({},r),{action:"set"})),It(r=>this.next(r,!1)))},this.config=F({latencyThreshold:0},t)}get value$(){return this._value$?this._value$:this._value$=this.stream$.pipe(oo(this.state),Oi(t=>this.timer$(t)),Jb(),Re(t=>t.value))}start(t=2){this.disabled||this.next({action:"start",initialValue:t})}stop(){this.next({action:"stop"})}complete(){this.next({action:"complete"})}disable(){this.disabled=!0}set(t){this.next({action:"set",value:t})}increment(t=0){this.next({action:"increment",value:t})}next(t,e=!0){switch(t.action){case"start":this.requests=(this.requests||0)+1;break;case"complete":if(this.requests=(this.requests||1)-1,this.requests>0)return;break;case"stop":this.requests=0;break;case"increment":t.value=this._increment(t.value);break}this.state=F(pe(F({},this.state),{action:null}),t),e&&this.stream$.next(this.state)}_increment(t=0){let e=this.state.value;return e>=99&&(t=0),t===0&&(e>=0&&e<25?t=Math.random()*3+3:e>=25&&e<65?t=Math.random()*3:e>=65&&e<90?t=Math.random()*2:e>=90&&e<99?t=.5:t=0),t+e}},h8=new le("LOADING_BAR_CONFIG"),cd=(()=>{class i{constructor(e,n={},r){this.platformId=e,this.config=n,this.zone=r,this.refs={},this.streams$=new Gt,this.value$=this.streams$.pipe(oo(null),Oi(()=>no(Object.keys(this.refs).map(o=>this.refs[o].value$))),m8(this.zone),Re(o=>Math.max(0,...o)))}get progress$(){return this.value$}start(e=2){this.useRef().start(e)}set(e){this.useRef().set(e)}increment(e){this.useRef().increment(e)}complete(){this.useRef().complete()}stop(){this.useRef().stop()}useRef(e="default"){return this.refs[e]||(this.refs[e]=new _y(this.config),this.streams$.next(),ut(this.platformId)||this.refs[e].disable()),this.refs[e]}}return i.\u0275fac=function(e){return new(e||i)(J(vt),J(h8,8),J(ge,8))},i.\u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function m8(i){return i?t=>new Li(e=>t.subscribe(n=>i.run(()=>e.next(n)),n=>i.run(()=>e.error(n)),()=>i.run(()=>e.complete()))):t=>t}var Hh=(()=>{class i{constructor(e){this.loader=e,this.includeSpinner=!0,this.includeBar=!0,this.fixed=!0,this.color="#29d"}get value$(){return this.ref?this.loader.useRef(this.ref).value$:this.loader.value$}}return i.\u0275fac=function(e){return new(e||i)(w(cd))},i.\u0275cmp=k({type:i,selectors:[["ngx-loading-bar"]],hostVars:3,hostBindings:function(e,n){e&2&&(T("fixed",n.fixed),ki("color",n.color))},inputs:{includeSpinner:"includeSpinner",includeBar:"includeBar",fixed:"fixed",color:"color",value:"value",ref:"ref",height:"height",diameter:"diameter"},decls:2,vars:3,consts:[[4,"ngIf"],["class","ngx-spinner",4,"ngIf"],["class","ngx-bar",3,"background","height","width",4,"ngIf"],[1,"ngx-spinner"],[1,"ngx-spinner-icon"],[1,"ngx-bar"]],template:function(e,n){e&1&&(g(0,p8,3,2,"ng-container",0),ct(1,"async")),e&2&&l("ngIf",n.value!=null?n.value:Bt(1,1,n.value$))},dependencies:[Ie,D1],styles:["[_nghost-%COMP%]{position:relative;display:block;pointer-events:none}[_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{transition:.35s linear all;display:block;position:absolute;top:5px;left:0px}[_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%] .ngx-spinner-icon[_ngcontent-%COMP%]{width:14px;height:14px;border:solid 2px transparent;border-top-color:inherit;border-left-color:inherit;border-radius:50%;-webkit-animation:_ngcontent-%COMP%_loading-bar-spinner .4s linear infinite;animation:_ngcontent-%COMP%_loading-bar-spinner .4s linear infinite}[_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{transition:width .35s;position:absolute;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}[dir=rtl] [_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{right:0;left:unset}[fixed=true][_nghost-%COMP%]{z-index:10002}[fixed=true][_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{position:fixed}[fixed=true][_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}[dir=rtl] [fixed=true][_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{right:10px;left:unset}@-webkit-keyframes _ngcontent-%COMP%_loading-bar-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_loading-bar-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"],changeDetection:0}),i})(),Tr=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({imports:[[$]]}),i})();var f8=new eu(()=>!1),g8=(()=>{class i{constructor(e){this.loader=e}intercept(e,n){if(e.headers.has("ignoreLoadingBar"))return n.handle(e.clone({headers:e.headers.delete("ignoreLoadingBar")}));if(e.context.get(f8)===!0)return n.handle(e);let r=!1,o=this.loader.useRef("http");return n.handle(e).pipe(It(()=>{r||(o.start(),r=!0)}),tr(()=>r&&o.complete()))}}return i.\u0275fac=function(e){return new(e||i)(J(cd))},i.\u0275prov=se({token:i,factory:i.\u0275fac}),i})(),$h=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({providers:[{provide:qm,useClass:g8,multi:!0}],imports:[[El,Tr],El,Tr]}),i})();var _8=i=>({opacity:i}),v8=i=>({visibility:i}),Vn=(()=>{let t=class t{constructor(){this.src="",this.class="",this.ngClass="",this.style="",this.ngStyle="",this.loading="lazy",this.alt="",this.title="",this.imageLoaded=!1}loadImage(){this.imageLoaded=!0}checkError(){this.imageLoaded=!0,this.altText="Failed to Load Image!",this.src="https://firebasestorage.googleapis.com/v0/b/showbizhub-4f1b9.appspot.com/o/defualt_poster.png?alt=media&token=57690fd6-c65a-4ece-bd3e-4cd7dff1e87a"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-img"]],inputs:{src:"src",class:"class",ngClass:"ngClass",style:"style",ngStyle:"ngStyle",loading:"loading",alt:"alt",title:"title",onLoad:"onLoad",onError:"onError"},standalone:!0,features:[R],decls:5,vars:16,consts:[["ref","http","color","var(--primary-color)",3,"includeSpinner"],[3,"src","alt","ngClass","loading","title","ngStyle","load","error"],[1,"spinner",3,"ngStyle"],[1,"loader"]],template:function(r,o){r&1&&(y(0,"ngx-loading-bar",0),p(1,"span")(2,"img",1),A("load",function(){return o.loadImage()})("error",function(){return o.checkError()}),h(),p(3,"div",2),y(4,"div",3),h()()),r&2&&(l("includeSpinner",!1),d(2),xt(o.style),U(o.class),l("src",o.src,qe)("alt",o.alt||o.altText)("ngClass",o.ngClass)("loading",o.loading)("title",o.title)("ngStyle",H(12,_8,o.imageLoaded?"1":"0")),d(),l("ngStyle",H(14,v8,o.imageLoaded?"collapse":"visible")))},dependencies:[$,xe,Ce,$h,Hh,Tr],styles:['span[_ngcontent-%COMP%]{position:relative;overflow:hidden}span[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;object-fit:cover;transition:all .5s}span[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{filter:brightness(110%) saturate(110%)}span[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{position:absolute;bottom:900%;left:50%;translate:-50% 0;transition:visibility .3s;transition-delay:-.3s}span[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,rgba(255,61,0,.2) 33%,var(--primary-color) 100%);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}span[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#000}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}50%{opacity:.9}to{transform:rotate(360deg)}}']});let i=t;return i})();var qh=class{constructor(){this.state=st({})}select(t){return yi(()=>this.state()[t])}set(t,e){this.state.update(n=>pe(F({},n),{[t]:e}))}setState(t){this.state.update(e=>F(F({},e),t))}};var ze=(()=>{let t=class t extends qh{constructor(n,r){super(),this.http=n,this.authService=r,this.configurations=st({}),this.languages=st({}),this.countries=st({}),this.timezones=st({}),this.searchQuery="",this.savingMode={normal:{backdrop_size:"w1280",logo_size:"w500",poster_size:"w780",profile_size:"h632",still_size:"w300",baseUrl:"http://image.tmdb.org/t/p/"},high:{backdrop_size:"w780",logo_size:"w154",poster_size:"w154",profile_size:"w185",still_size:"w185",baseUrl:"http://image.tmdb.org/t/p/"},ultra:{backdrop_size:"w300",logo_size:"w45",poster_size:"w342",profile_size:"w45",still_size:"w92",baseUrl:"http://image.tmdb.org/t/p/"}},this.timeWindow=st("day")}getSavingMode(){return D(this,null,function*(){let n=yield this.authService.getLoggedInUser();return n?.data_saving_mode&&n?.data_saving_type?this.savingMode[n.data_saving_type]:"http://image.tmdb.org/t/p/original"})}getTMDBData(n,r={}){return this.http.get(`${ts.TMDB_BASE_URL}${n}`,{headers:{Authorization:`bearer ${ts.TMDB_ACCESS_TOKEN}`},params:pe(F({},r),{region:"IN",language:"en"})})}};t.\u0275fac=function(r){return new(r||t)(J(Sl),J(Kt))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Ln=(()=>{let t=class t{constructor(n,r){this.firestore=n,this.authService=r,this.favourites={movies:[],tvshows:[],celebrities:[],combined:[]},this.currentUser=this.authService.getLoggedInUser()}isFavorite(n,r){return D(this,null,function*(){return yield this.getList(),!!this.favourites[r].some(o=>o.id===n)})}getList(){return D(this,null,function*(){if(this.currentUser.user||(this.currentUser=yield this.authService.getLoggedInUser()),this.currentUser?.user?.id){let n=yield ny(iy(this.firestore,"savedList",this.currentUser.user.id));if(n.exists()){let r=n.data();return this.favourites.movies=r.movies,this.favourites.tvshows=r.tvshows,this.favourites.celebrities=r.celebrities,this.favourites.combined=r.combined,r}else return}})}updateList(n,r){return D(this,null,function*(){if(this.currentUser.user||(this.currentUser=yield this.authService.getLoggedInUser()),this.currentUser.demoAccount===!1){let o=iy(this.firestore,"savedList",this.currentUser.user.id),s=yield ny(o);if(s.exists()){let a=s.data();this.favourites=a;let c=a[n].findIndex(u=>u.id===r.id);return c>-1?a[n].splice(c,1):a[n].unshift(r),this.favourites=a,yield qS(o,a)}}})}};t.\u0275fac=function(r){return new(r||t)(J($r),J(Kt))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function y8(i,t){if(i&1&&(p(0,"span")(1,"i"),_(2,"as"),h(),_(3),h()),i&2){let e=m(2);d(3),be(" ",e.movie.character,"")}}function b8(i,t){if(i&1&&(p(0,"span")(1,"i"),_(2,"as"),h(),_(3),h()),i&2){let e=m(2);d(3),be(" ",e.movie.job,"")}}function C8(i,t){if(i&1&&(p(0,"span"),_(1),ct(2,"date"),h()),i&2){let e=m(2);d(),z(Bt(2,1,e.movie.release_date))}}var I8=i=>({active:i}),p2=()=>({width:"12px",height:"12px"});function w8(i,t){if(i&1){let e=G();p(0,"div",1)(1,"div",2),g(2,y8,4,1,"span")(3,b8,4,1),p(4,"i",3),A("click",function(){S(e);let r=m();return E(r.addToFavourites())}),h()(),p(5,"a",4),y(6,"app-img",5),p(7,"div",6)(8,"h4"),_(9),h(),p(10,"div",7),y(11,"p-rating",8),ct(12,"rating"),ct(13,"rating"),g(14,C8,3,3,"span",9),h()()()()}if(i&2){let e=m();l("ngClass",H(20,I8,e.movie.backdrop_path)),d(2),Je(2,e.movie.character?2:e.movie.job?3:-1),d(2),U((e.movie.isFavorite==null?null:e.movie.isFavorite.__zone_symbol__value)===!0?"pi pi-heart-fill":"pi pi-heart"),l("title",e.movie.isFavorite!=null&&e.movie.isFavorite.__zone_symbol__value?"Add to Favorites":"Remove From Favorites"),d(),l("routerLink","/movies/"+e.movie.id),d(),l("src",e.posterUrl+e.movie.poster_path),d(3),xn("",e.movie.adult?"18+":"","",e.movie.title,""),d(2),l("cancel",!1)("ngModel",Bt(12,16,e.movie.vote_average))("readonly",!0)("title",Bt(13,18,e.movie.vote_average))("iconOnStyle",Ke(22,p2))("iconOffStyle",Ke(23,p2)),d(3),l("ngIf",e.movie.release_date)}}var Vo=(()=>{let t=class t{constructor(n,r,o){this.tmdbService=n,this.firestoreService=r,this.authService=o,this.onFavorite=new L,this.posterUrl="http://image.tmdb.org/t/p/w342",this.setupUrl()}setupUrl(){return D(this,null,function*(){let n=yield this.tmdbService.getSavingMode()})}addToFavourites(){if(this.movie){if(this.authService.loggedInUser().demoAccount==!0){this.onFavorite.emit({severity:"error",summary:"Unauthorized",detail:"Please Login to Perform this Operation!",life:3e3});return}let n={id:this.movie.id,poster_path:this.movie.poster_path,release_date:this.movie.release_date,title:this.movie.title,vote_average:this.movie.vote_average};this.movie.isFavorite.__zone_symbol__value?this.movie.isFavorite.__zone_symbol__value=!1:this.movie.isFavorite={__zone_symbol__state:!0,__zone_symbol__value:!0},this.firestoreService.updateList("movies",n).then(()=>{this.movie?.isFavorite.__zone_symbol__value==!0?this.onFavorite.emit({severity:"success",summary:"Movie Added",detail:`${this.movie.title} has been added to your favourites`,life:3e3}):this.onFavorite.emit({severity:"info",summary:"Movie Removed",detail:`${this.movie?.title} has been removed from your favourites`,life:3e3})}).catch(r=>{console.log(r),this.onFavorite.emit({severity:"error",summary:"Failed",detail:"Failed to update your favorites",life:3e3})})}}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(Ln),w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-movie-card"]],inputs:{movie:"movie"},outputs:{onFavorite:"onFavorite"},standalone:!0,features:[R],decls:1,vars:1,consts:[["class","movie-card",3,"ngClass",4,"ngIf"],[1,"movie-card",3,"ngClass"],[1,"float-btns"],[3,"title","click"],[3,"routerLink"],[2,"aspect-ratio","0.667","border-radius",".5rem","object-fit","cover",3,"src"],[1,"titles"],[1,"bottom"],[3,"cancel","ngModel","readonly","title","iconOnStyle","iconOffStyle"],[4,"ngIf"]],template:function(r,o){r&1&&g(0,w8,15,24,"div",0),r&2&&l("ngIf",o.movie)},dependencies:[Ve,et,$,xe,Ie,nn,r2,d2,Ua,ld,sr,ii,zn,jh,Vn],styles:[".movie-card[_ngcontent-%COMP%]{width:100%;position:relative}.movie-card.active[_ngcontent-%COMP%]:hover .bottom[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-color)}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%]{position:absolute;top:0;padding:.5rem;left:0;width:100%;z-index:2;display:flex;align-items:center;justify-content:space-between}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]{font-size:20px;color:#fff;cursor:pointer;transition:all .3s;margin-left:auto}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] .pi-heart[_ngcontent-%COMP%]:hover{color:var(--primary-color)}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]:active{scale:1.1}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi-heart-fill[_ngcontent-%COMP%]{color:var(--primary-color)}.movie-card[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;font-size:12px;border-radius:10px;padding:0 5px;line-height:14px}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{padding:.1rem .4rem;border-radius:20px}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color);font-weight:500;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font-size:12px}.movie-card[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:auto 0}"]});let i=t;return i})();var T8=["path"],x8=Math.PI/180,S8=(()=>{let t=class t{constructor(n){this.supportsSvg=!!(n&&n.createElementNS&&n.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),this.base=n&&n.head.querySelector("base"),this.hasPerf=typeof window<"u"&&window.performance&&window.performance.now&&typeof window.performance.now()=="number"}resolveColor(n){if(this.base&&this.base.href){let r=n.indexOf("#");if(r>-1&&n.indexOf("url")>-1)return n.slice(0,r)+location.href+n.slice(r)}return n}getTimestamp(){return this.hasPerf?window.performance.now():Date.now()}getArc(n,r,o,s,a=!1){let c=Math.max(0,Math.min(n||0,r)),u=a?180:359.9999,f=r===0?u:c/r*u,v=this._polarToCartesian(s,o,f),b=this._polarToCartesian(s,o,0),O=f<=180?0:1;return`M ${v} A ${o} ${o} 0 ${O} 0 ${b}`}_polarToCartesian(n,r,o){let s=(o-90)*x8,a=n+r*Math.cos(s),c=n+r*Math.sin(s);return a+" "+c}};t.\u0275fac=function(r){return new(r||t)(J(Oe,8))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),E8={radius:125,animation:"easeOutCubic",animationDelay:void 0,duration:500,stroke:15,color:"#45CCCE",background:"#EAEAEA",responsive:!1,clockwise:!0,semicircle:!1,rounded:!1},O8=new le("ROUND_PROGRESS_DEFAULTS",{providedIn:"root",factory:()=>E8});var M8=(()=>{let t=class t{linearEase(n,r,o,s){return o*n/s+r}easeInQuad(n,r,o,s){return o*(n/=s)*n+r}easeOutQuad(n,r,o,s){return-o*(n/=s)*(n-2)+r}easeInOutQuad(n,r,o,s){return(n/=s/2)<1?o/2*n*n+r:-o/2*(--n*(n-2)-1)+r}easeInCubic(n,r,o,s){return o*(n/=s)*n*n+r}easeOutCubic(n,r,o,s){return o*((n=n/s-1)*n*n+1)+r}easeInOutCubic(n,r,o,s){return(n/=s/2)<1?o/2*n*n*n+r:o/2*((n-=2)*n*n+2)+r}easeInQuart(n,r,o,s){return o*(n/=s)*n*n*n+r}easeOutQuart(n,r,o,s){return-o*((n=n/s-1)*n*n*n-1)+r}easeInOutQuart(n,r,o,s){return(n/=s/2)<1?o/2*n*n*n*n+r:-o/2*((n-=2)*n*n*n-2)+r}easeInQuint(n,r,o,s){return o*(n/=s)*n*n*n*n+r}easeOutQuint(n,r,o,s){return o*((n=n/s-1)*n*n*n*n+1)+r}easeInOutQuint(n,r,o,s){return(n/=s/2)<1?o/2*n*n*n*n*n+r:o/2*((n-=2)*n*n*n*n+2)+r}easeInSine(n,r,o,s){return-o*Math.cos(n/s*(Math.PI/2))+o+r}easeOutSine(n,r,o,s){return o*Math.sin(n/s*(Math.PI/2))+r}easeInOutSine(n,r,o,s){return-o/2*(Math.cos(Math.PI*n/s)-1)+r}easeInExpo(n,r,o,s){return n===0?r:o*Math.pow(2,10*(n/s-1))+r}easeOutExpo(n,r,o,s){return n===s?r+o:o*(-Math.pow(2,-10*n/s)+1)+r}easeInOutExpo(n,r,o,s){return n===0?r:n===s?r+o:(n/=s/2)<1?o/2*Math.pow(2,10*(n-1))+r:o/2*(-Math.pow(2,-10*--n)+2)+r}easeInCirc(n,r,o,s){return-o*(Math.sqrt(1-(n/=s)*n)-1)+r}easeOutCirc(n,r,o,s){return o*Math.sqrt(1-(n=n/s-1)*n)+r}easeInOutCirc(n,r,o,s){return(n/=s/2)<1?-o/2*(Math.sqrt(1-n*n)-1)+r:o/2*(Math.sqrt(1-(n-=2)*n)+1)+r}easeInElastic(n,r,o,s){let a=s*.3,c=1.70158,u=o;return n===0?r:(n/=s)===1?r+o:(u{let t=class t{constructor(n,r,o,s){this.service=n,this.easing=r,this.defaults=o,this.ngZone=s,this.currentLinecap="",this.current=0,this.max=0,this.radius=this.defaults.radius,this.animation=this.defaults.animation,this.animationDelay=this.defaults.animationDelay,this.duration=this.defaults.duration,this.stroke=this.defaults.stroke,this.color=this.defaults.color,this.background=this.defaults.background,this.responsive=this.defaults.responsive,this.clockwise=this.defaults.clockwise,this.semicircle=this.defaults.semicircle,this.rounded=this.defaults.rounded,this.onRender=new L,this.lastAnimationId=0}_animateChange(n,r){typeof n!="number"&&(n=0),r=this._clamp(r),n=this._clamp(n);let o=this,s=r-n,a=o.duration;o.ngZone.runOutsideAngular(()=>{let c=()=>{let u=o.service.getTimestamp(),f=++o.lastAnimationId;requestAnimationFrame(function v(){let b=Math.min(o.service.getTimestamp()-u,a),O=o.easing[o.animation],V=O(b,n,s,a);o._updatePath(V),o.onRender.observers.length>0&&o.onRender.emit(V),f===o.lastAnimationId&&b0?setTimeout(c,this.animationDelay):c()})}_updatePath(n){if(this.path){let r=this.service.getArc(n,this.max,this.radius-this.stroke/2,this.radius,this.semicircle),o=this.path.nativeElement,s=this.rounded&&n>0?"round":"";s!==this.currentLinecap&&(this.currentLinecap=s,o.style.strokeLinecap=s),o.setAttribute("d",r)}}_clamp(n){return Math.max(0,Math.min(n||0,this.max))}getPathTransform(){let n=this._getDiameter();return this.semicircle?this.clockwise?`translate(0, ${n}) rotate(-90)`:`translate(${n+","+n}) rotate(90) scale(-1, 1)`:this.clockwise?null:`scale(-1, 1) translate(-${n} 0)`}resolveColor(n){return this.service.resolveColor(n)}ngOnChanges(n){n.current?this._animateChange(n.current.previousValue,n.current.currentValue):this._updatePath(this.current)}_getDiameter(){return this.radius*2}_getElementHeight(){return this.responsive?null:(this.semicircle?this.radius:this._getDiameter())+"px"}_getViewBox(){let n=this._getDiameter();return`0 0 ${n} ${this.semicircle?this.radius:n}`}_getPaddingBottom(){return this.responsive?this.semicircle?"50%":"100%":null}};t.\u0275fac=function(r){return new(r||t)(w(S8),w(M8),w(O8),w(ge))},t.\u0275cmp=k({type:t,selectors:[["round-progress"]],viewQuery:function(r,o){if(r&1&&oe(T8,5),r&2){let s;q(s=W())&&(o.path=s.first)}},hostAttrs:["role","progressbar"],hostVars:11,hostBindings:function(r,o){r&2&&(T("aria-valuemin",0)("aria-valuemax",o.max)("aria-valuenow",o.current),ki("width",o.responsive?"":o._getDiameter()+"px")("height",o._getElementHeight())("padding-bottom",o._getPaddingBottom()),qt("responsive",o.responsive))},inputs:{current:"current",max:"max",radius:"radius",animation:"animation",animationDelay:"animationDelay",duration:"duration",stroke:"stroke",color:"color",background:"background",responsive:"responsive",clockwise:"clockwise",semicircle:"semicircle",rounded:"rounded"},outputs:{onRender:"onRender"},standalone:!0,features:[Mt,R],decls:4,vars:13,consts:[["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["path",""]],template:function(r,o){r&1&&(ke(),p(0,"svg",0),y(1,"circle",1)(2,"path",1,2),h()),r&2&&(T("viewBox",o._getViewBox()),d(),ki("stroke",o.resolveColor(o.background))("stroke-width",o.stroke),T("cx",o.radius)("cy",o.radius)("r",o.radius-o.stroke/2),d(),ki("stroke-width",o.stroke)("stroke",o.resolveColor(o.color)),T("transform",o.getPathTransform()))},styles:["[_nghost-%COMP%]{display:block;position:relative;overflow:hidden}.responsive[_nghost-%COMP%]{width:100%;padding-bottom:100%}.responsive[_nghost-%COMP%] > svg[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0}"],changeDetection:0});let i=t;return i})();function k8(i,t){if(i&1&&(p(0,"div",1),y(1,"round-progress",2),p(2,"div",3),_(3),h()()),i&2){let e=m();d(),l("current",e.current)("max",e.max)("color",e.current<5?"#ff0000":e.current<7?"#ffa500":"#78C000")("background","#eaeaea")("radius",e.radius?e.radius:32)("stroke",e.stroke?e.stroke:8)("semicircle",!1)("rounded",!0)("clockwise",!0)("responsive",!1)("duration",800)("animation","easeInOutQuart")("animationDelay",0)("title",e.max+"/"+e.current),d(2),z(e.current)}}var Ha=(()=>{let t=class t{constructor(){this.max=void 0,this.radius=void 0,this.stroke=void 0,this.current=void 0,this.rating=parseInt(this.current)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-circle-rating"]],inputs:{max:"max",radius:"radius",stroke:"stroke",current:"current"},standalone:!0,features:[R],decls:1,vars:1,consts:[["class","circle-rating",4,"ngIf"],[1,"circle-rating"],[3,"current","max","color","background","radius","stroke","semicircle","rounded","clockwise","responsive","duration","animation","animationDelay","title"],[1,"text-content"]],template:function(r,o){r&1&&g(0,k8,4,15,"div",0),r&2&&l("ngIf",o.max&&o.current)},dependencies:[h2,$,Ie],styles:[".circle-rating[_ngcontent-%COMP%]{position:relative;display:inline-block}.circle-rating[_ngcontent-%COMP%] .text-content[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:1.2em;font-weight:500}"]});let i=t;return i})();function A8(i,t){if(i&1&&(p(0,"div",10),_(1),h()),i&2){let e=m();d(),be(" ",e.tvShow.episode_count>1?e.tvShow.episode_count+" Episodes":e.tvShow.episode_count+" Episode","")}}var Ga=(()=>{let t=class t{constructor(n,r){this.firestoreService=n,this.authService=r,this.tvShow="",this.onFavorite=new L,this.url="http://image.tmdb.org/t/p/w342",this.backgroundPath="";let o=this.tvShow.poster_path,s="http://image.tmdb.org/t/p/w342";o?this.backgroundPath=s+o:this.backgroundPath="https://firebasestorage.googleapis.com/v0/b/showbizhub-4f1b9.appspot.com/o/defualt_poster.png?alt=media&token=57690fd6-c65a-4ece-bd3e-4cd7dff1e87a"}addToFavourites(){if(this.tvShow){if(this.authService.loggedInUser().demoAccount==!0){this.onFavorite.emit({severity:"error",summary:"Unauthorized",detail:"Please Login to Perform this Operation!",life:3e3});return}let n={id:this.tvShow.id,poster_path:this.tvShow.poster_path,first_air_date:this.tvShow.first_air_date,name:this.tvShow.name,vote_average:this.tvShow.vote_average};this.tvShow?.isFavorite?.__zone_symbol__value?this.tvShow.isFavorite.__zone_symbol__value=!1:this.tvShow.isFavorite={__zone_symbol__state:!0,__zone_symbol__value:!0},this.firestoreService.updateList("tvshows",n).then(()=>{this.tvShow?.isFavorite.__zone_symbol__value?this.onFavorite.emit({severity:"success",summary:"TV Show Added",detail:`${this.tvShow?.name} has been added to your favourites`,life:5e3}):this.onFavorite.emit({severity:"info",summary:"TV Show Removed",detail:`${this.tvShow?.name} has been removed from your favourites`,life:5e3})}).catch(()=>{this.onFavorite.emit({severity:"error",summary:"Failed",detail:"Failed to update your favorites",life:5e3})})}}};t.\u0275fac=function(r){return new(r||t)(w(Ln),w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-tvshow-card"]],inputs:{tvShow:"tvShow"},outputs:{onFavorite:"onFavorite"},standalone:!0,features:[R],decls:16,vars:14,consts:[[1,"tvshow"],[1,"float-details"],["class","episodes",4,"ngIf"],[3,"click"],[3,"routerLink"],[2,"aspect-ratio","0.667","border-radius",".5rem","object-fit","cover",3,"src"],[1,"details"],[3,"max","radius","stroke","current"],[1,"titles"],[1,"float-epcount"],[1,"episodes"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1),g(2,A8,2,1,"div",2),p(3,"button",3),A("click",function(){return o.addToFavourites()}),y(4,"i"),h()(),p(5,"a",4),y(6,"app-img",5),p(7,"div",6),y(8,"app-circle-rating",7),p(9,"div",8)(10,"span"),_(11),ct(12,"date"),h(),p(13,"h4"),_(14),h()()()(),y(15,"div",9),h()),r&2&&(d(2),l("ngIf",o.tvShow.episode_count),d(2),U((o.tvShow.isFavorite==null?null:o.tvShow.isFavorite.__zone_symbol__value)==!0?"pi pi-heart-fill":"pi pi-heart"),d(),l("routerLink","/tvshows/"+o.tvShow.id),d(),l("src",o.url+o.tvShow.poster_path),d(2),l("max",10)("radius",18)("stroke",4)("current",o.tvShow==null||o.tvShow.vote_average==null?null:o.tvShow.vote_average.toFixed(1)),d(3),z(Bt(12,12,o.tvShow.first_air_date)),d(3),xn("",o.tvShow.adult?"18+":""," ",o.tvShow==null?null:o.tvShow.name,""))},dependencies:[Ve,et,$,Ie,nn,Ha,Vn],styles:[".tvshow[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}.tvshow[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:brightness(80%) saturate(70%)}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%]{position:absolute;top:0;color:#fff;display:flex;justify-content:space-between;z-index:2;padding:10px;width:100%}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] .episodes[_ngcontent-%COMP%]{background-color:#252525;padding:0 5px;border-radius:25px;font-size:.8rem}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;background-color:transparent;outline:0;margin-left:auto}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:20px;cursor:pointer;transition:all .3s;color:#fff}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{color:var(--primary-color)}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:active{scale:1.1}.tvshow[_ngcontent-%COMP%] .float-details[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i.pi-heart-fill[_ngcontent-%COMP%]{color:var(--primary-color)}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color)}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{display:flex;align-items:center;margin:auto 0;gap:5px;border-radius:40px;padding:0 5px;font-size:10px;color:var(--surface-800)}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{display:flex;flex-direction:column}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal;font-weight:500}.tvshow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{line-height:.7rem;font-size:.6rem;color:#fff;background-color:var(--primary-color);width:max-content;padding:0 5px;border-radius:20px}"]});let i=t;return i})();var Wh=(()=>{let t=class t{constructor(n,r){this.firestoreService=n,this.authService=r,this.person="",this.onFavorite=new L,this.genders=["Other","Female","Male"],this.profileUrl="http://image.tmdb.org/t/p/w342"}addToFavourites(){if(this.authService.loggedInUser().demoAccount==!0){this.onFavorite.emit({severity:"error",summary:"Unauthorized",detail:"Please Login to Perform this Operation!",life:3e3});return}if(this.person){let n={id:this.person.id,profile_path:this.person.profile_path,known_for_department:this.person.known_for_department,name:this.person.name,gender:this.person.gender};this.person?.isFavorite?.__zone_symbol__value?this.person.isFavorite.__zone_symbol__value=!1:this.person.isFavorite={__zone_symbol__state:!0,__zone_symbol__value:!0},this.firestoreService.updateList("celebrities",n).then(()=>{this.person?.isFavorite.__zone_symbol__value?this.onFavorite.emit({severity:"success",summary:"Celebrity Added",detail:`${this.person?.name} has been added to your favourites`,life:5e3}):this.onFavorite.emit({severity:"info",summary:"Celebrity Removed",detail:`${this.person?.name} has been removed from your favourites`,life:5e3})}).catch(()=>{this.onFavorite.emit({severity:"error",summary:"Failed",detail:"Failed to update your favorites",life:5e3})})}}};t.\u0275fac=function(r){return new(r||t)(w(Ln),w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-celebrity-card"]],inputs:{person:"person"},outputs:{onFavorite:"onFavorite"},standalone:!0,features:[R],decls:12,vars:9,consts:[[1,"celebrity",3,"title"],[1,"float-btns"],[3,"title","click"],[3,"routerLink"],[2,"aspect-ratio","0.667","border-radius",".5rem","object-fit","cover",3,"src"],[1,"titles"],[1,"gender"],[1,"department"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"i",2),A("click",function(){return o.addToFavourites()}),h()(),p(3,"a",3),y(4,"app-img",4),p(5,"div",5)(6,"span",6),_(7),h(),p(8,"h4"),_(9),h(),p(10,"span",7),_(11),h()()()()),r&2&&(l("title",o.person==null?null:o.person.name),d(2),U((o.person==null||o.person.isFavorite==null?null:o.person.isFavorite.__zone_symbol__value)===!0?"pi pi-heart-fill":"pi pi-heart"),l("title",!(o.person==null||o.person.isFavorite==null)&&o.person.isFavorite.__zone_symbol__value?"Add to Favorites":"Remove From Favorites"),d(),l("routerLink","/celebrities/"+o.person.id),d(),l("src",o.profileUrl+o.person.profile_path),d(3),z(o.genders[o.person.gender]),d(2),z(o.person==null?null:o.person.name),d(2),z(o.person==null?null:o.person.known_for_department))},dependencies:[$,Ve,et,Vn],styles:[".celebrity[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.celebrity[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:.5rem;cursor:pointer;transition:all .5s}.celebrity[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{position:static;bottom:1rem;left:0;width:100%;background-color:#000000af;border-radius:.5rem;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);padding:0 .5rem}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color);font-weight:600;line-height:1rem}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#b8b8b8;font-size:12px}.celebrity[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] span.gender[_ngcontent-%COMP%]{line-height:10px;font-size:10px}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%]{position:absolute;top:0;padding:.5rem;right:0;z-index:2}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]{font-size:20px;color:#fff;cursor:pointer;transition:all .3s}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] .pi-heart[_ngcontent-%COMP%]:hover{color:var(--primary-color)}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi[_ngcontent-%COMP%]:active{scale:1.1}.celebrity[_ngcontent-%COMP%] .float-btns[_ngcontent-%COMP%] i.pi-heart-fill[_ngcontent-%COMP%]{color:var(--primary-color)}.celebrity[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:saturate(70%) brightness(80%)}"]});let i=t;return i})();function D8(i,t,e,n){let r=window&&!!window.document&&window.document.documentElement,o=r&&t?window:e;if(i&&(o=i&&r&&typeof i=="string"?P8(i,e.nativeElement,n):i,!o))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return o}function P8(i,t,e){return(e?window.document:t).querySelector(i)}function vy(i){return i&&!i.firstChange}function R8(){return typeof window<"u"}var V8={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},L8={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},yy=class{constructor(t=!0){this.vertical=t,this.propsMap=t?V8:L8}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};function F8(i,t,e){return!!(i&&t||!e&&t)}function N8({windowElement:i,axis:t}){return B8({axis:t,isWindow:z8(i)},i)}function B8(i,t){let e=i.isWindow||t&&!t.nativeElement?t:t.nativeElement;return pe(F({},i),{container:e})}function z8(i){return["Window","global"].some(e=>Object.prototype.toString.call(i).includes(e))}function Iy(i,t){return i?t.document.documentElement:null}function m2(i,t){let e=H8(t);return t.isWindow?U8(e,i,t):j8(e,i,t)}function U8(i,t,e){let{axis:n,container:r,isWindow:o}=e,{offsetHeightKey:s,clientHeightKey:a}=f2(n),c=i+_2(Iy(o,r),n,o),u=g2(t.nativeElement,o,s,a),f=G8(t.nativeElement,n,o)+u;return{height:i,scrolled:c,totalToScroll:f,isWindow:o}}function j8(i,t,e){let{axis:n,container:r}=e,o=r[n.scrollTopKey()],s=r[n.scrollHeightKey()];return{height:i,scrolled:o,totalToScroll:s,isWindow:!1}}function f2(i){return{offsetHeightKey:i.offsetHeightKey(),clientHeightKey:i.clientHeightKey()}}function H8({container:i,isWindow:t,axis:e}){let{offsetHeightKey:n,clientHeightKey:r}=f2(e);return g2(i,t,n,r)}function g2(i,t,e,n){if(isNaN(i[e])){let r=Iy(t,i);return r?r[n]:0}else return i[e]}function G8(i,t,e){let n=t.topKey();if(i.getBoundingClientRect)return i.getBoundingClientRect()[n]+_2(i,t,e)}function _2(i,t,e){let n=t.pageYOffsetKey(),r=t.scrollTopKey(),o=t.offsetTopKey();return isNaN(window.pageYOffset)?Iy(e,i)[r]:i.ownerDocument?i.ownerDocument.defaultView[n]:i[o]}function $8(i,t={down:0,up:0},e){let n,r;if(i.totalToScroll<=0)return!1;let o=i.isWindow?i.scrolled:i.height+i.scrolled;if(e)n=(i.totalToScroll-o)/i.totalToScroll,r=(t?.down?t.down:0)/10;else{let a=i.scrolled+(i.totalToScroll-o);n=i.scrolled/a,r=(t?.up?t.up:0)/10}return n<=r}function q8(i,t){return iSe(m2(n,o))),Re(u=>Y8(s.lastScrollPosition,u,c)),It(({stats:u})=>s.updateScroll(u.scrolled,u.totalToScroll)),Ni(({fire:u,scrollDown:f,stats:{totalToScroll:v}})=>F8(i.alwaysCallback,u,s.isTriggeredScroll(v,f))),It(({scrollDown:u,stats:{totalToScroll:f}})=>{s.updateTriggeredFlag(f,u)}),Re(Z8))}function Q8(i){let t=Hb(i.container,"scroll");return i.throttle&&(t=t.pipe(t1(i.throttle,void 0,{leading:!0,trailing:!0}))),t}function Y8(i,t,e){let{scrollDown:n,fire:r}=W8(i,t,e);return{scrollDown:n,fire:r,stats:t}}var Cy={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function Z8(i){let{scrollDown:t,stats:{scrolled:e}}=i;return{type:t?Cy.DOWN:Cy.UP,payload:{currentScrollPosition:e}}}var $a=(()=>{let t=class t{constructor(n,r){this.element=n,this.zone=r,this.scrolled=new L,this.scrolledUp=new L,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:n,infiniteScrollDisabled:r,infiniteScrollDistance:o}){let s=vy(n),a=vy(r),c=vy(o),u=!a&&!this.infiniteScrollDisabled||a&&!r.currentValue||c;(s||a||c)&&(this.destroyScroller(),u&&this.setup())}setup(){R8()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=K8({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(n=>this.handleOnScroll(n))})}handleOnScroll({type:n,payload:r}){let o=n===Cy.DOWN?this.scrolled:this.scrolledUp;X8(o)&&this.zone.run(()=>o.emit(r))}ngOnDestroy(){this.destroyScroller()}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}};t.\u0275fac=function(r){return new(r||t)(w(ve),w(ge))},t.\u0275dir=it({type:t,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},features:[Mt]});let i=t;return i})();function X8(i){return i.observed??i.observers.length>0}var xr=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();var v2=(()=>{class i{styleClass;style;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":this.shape==="circle","p-skeleton-none":this.animation==="none"}}containerStyle(){return this.size?pe(F({},this.style),{width:this.size,height:this.size,borderRadius:this.borderRadius}):pe(F({},this.style),{width:this.width,height:this.height,borderRadius:this.borderRadius})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:7,consts:[[3,"ngClass","ngStyle"]],template:function(n,r){n&1&&y(0,"div",0),n&2&&(U(r.styleClass),l("ngClass",r.containerClass())("ngStyle",r.containerStyle()),T("data-pc-name","skeleton")("aria-hidden",!0)("data-pc-section","root"))},dependencies:[xe,Ce],styles:[`@layer primeng{.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}} +`],encapsulation:2,changeDetection:0})}return i})(),y2=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var b2=()=>({marginBottom:"10px"}),C2=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-card-skeleton"]],standalone:!0,features:[R],decls:6,vars:6,consts:[[1,"card-skeleton"],["height","100%"],["styleClass","mb-2"],[1,"float"],["shape","circle","size","2rem","styleClass","mr-2"]],template:function(r,o){r&1&&(p(0,"div",0),y(1,"p-skeleton",1)(2,"p-skeleton",2)(3,"p-skeleton",2),p(4,"div",3),y(5,"p-skeleton",4),h()()),r&2&&(d(),xt(Ke(4,b2)),d(),xt(Ke(5,b2)))},dependencies:[y2,v2],styles:[".card-skeleton[_ngcontent-%COMP%]{width:100%;aspect-ratio:.667;position:relative}.card-skeleton[_ngcontent-%COMP%] .float[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding:.5rem}"]});let i=t;return i})();function e7(i,t){if(i&1){let e=G();p(0,"app-movie-card",4),A("onFavorite",function(r){S(e);let o=m(2);return E(o.showToast(r))}),h()}if(i&2){let e=t.$implicit;l("movie",e)}}function t7(i,t){if(i&1&&Yt(0,e7,1,1,"app-movie-card",5,di),i&2){let e=m();Zt(e.moviesResults.results)}}function i7(i,t){if(i&1){let e=G();p(0,"app-tvshow-card",6),A("onFavorite",function(r){S(e);let o=m(2);return E(o.showToast(r))}),h()}if(i&2){let e=t.$implicit;l("tvShow",e)}}function n7(i,t){if(i&1&&Yt(0,i7,1,1,"app-tvshow-card",7,di),i&2){let e=m();Zt(e.tvshowResults.results)}}function r7(i,t){if(i&1){let e=G();p(0,"app-celebrity-card",8),A("onFavorite",function(r){S(e);let o=m(2);return E(o.showToast(r))}),h()}if(i&2){let e=t.$implicit;l("person",e)}}function o7(i,t){if(i&1&&Yt(0,r7,1,1,"app-celebrity-card",9,di),i&2){let e=m();Zt(e.celebritiesResults.results)}}function s7(i,t){if(i&1){let e=G();p(0,"app-movie-card",4),A("onFavorite",function(r){S(e);let o=m(3);return E(o.showToast(r))}),h()}if(i&2){let e=m().$implicit;l("movie",e)}}function a7(i,t){if(i&1){let e=G();p(0,"app-tvshow-card",6),A("onFavorite",function(r){S(e);let o=m(3);return E(o.showToast(r))}),h()}if(i&2){let e=m().$implicit;l("tvShow",e)}}function l7(i,t){if(i&1){let e=G();p(0,"app-celebrity-card",8),A("onFavorite",function(r){S(e);let o=m(3);return E(o.showToast(r))}),h()}if(i&2){let e=m().$implicit;l("person",e)}}function c7(i,t){if(i&1&&g(0,s7,1,1,"app-movie-card",5)(1,a7,1,1)(2,l7,1,1),i&2){let e=t.$implicit;Je(0,e.media_type=="movie"?0:e.media_type==="tv"?1:2)}}function d7(i,t){if(i&1&&Yt(0,c7,3,1,null,null,di),i&2){let e=m();Zt(e.combinedResults.results)}}function u7(i,t){i&1&&y(0,"app-card-skeleton")}function p7(i,t){if(i&1&&Yt(0,u7,1,0,"app-card-skeleton",null,di),i&2){let e=m();Zt(e.loader)}}function h7(i,t){if(i&1){let e=G();p(0,"div",10)(1,"p-button",11),A("onClick",function(){S(e);let r=m();return E(r.startLoading())}),h()()}i&2&&(d(),l("rounded",!0))}function m7(i,t){if(i&1){let e=G();p(0,"div",12)(1,"h1"),_(2,"Showbizhub Failed to Load Your Requested Content!"),h(),p(3,"p"),_(4,"You Might Have Internet Connection Error!"),h(),p(5,"span"),_(6,"Please Try Again Later"),h(),p(7,"p-button",13),A("onClick",function(){S(e);let r=m();return E(r.reloadComponent())}),h()()}i&2&&(d(7),l("rounded",!0))}var f7=["*"],_t=(()=>{let t=class t{constructor(n,r,o,s,a){this.firestoreService=n,this.messageService=r,this.tmdbService=o,this.router=s,this.route=a,this.movies=void 0,this.containerType="",this.tvshows=void 0,this.celebrities=void 0,this.combined=void 0,this.path="",this.params="",this.queryParams={},this.multipleResults=!1,this.autoLoad=!0,this.onInfiniteScroll=new L,this.loading=!1,this.loadError=!1,this.loader=[],this.moviesResults={total_pages:1,total_results:20,page:1,results:[]},this.tvshowResults={total_pages:1,total_results:20,page:1,results:[]},this.celebritiesResults={total_pages:1,total_results:20,page:1,results:[]},this.combinedResults={total_pages:1,total_results:20,page:1,results:[]},this.loader.length=20}reloadComponent(){this.router.navigateByUrl("",{skipLocationChange:!0}).then(()=>{})}ngOnChanges(n){(this.path||n.params||n.queryParams)&&this.getResults(),n.movies?this.movies?.map(r=>{this.moviesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"movies")}))}):n.tvshows?this.tvshows?.map(r=>{this.tvshowResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"tvshows")}))}):n.celebrities?this.celebrities?.map(r=>{this.celebritiesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"celebrities")}))}):n.combined&&this.combined?.map(r=>{this.combinedResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"combined")}))})}ngAfterViewInit(){}startLoading(){this.autoLoad=!0,this.getMoreResults()}getResults(){this.loading=!0,this.loadError=!1,this.moviesResults.results=[],this.tvshowResults.results=[],this.celebritiesResults.results=[],this.combinedResults.results=[],this.tmdbService.getTMDBData(this.path+this.params,this.queryParams).subscribe(n=>{this.containerType==="movies"?(n.results.map(r=>D(this,null,function*(){return this.moviesResults.results.push(pe(F({},r),{isFavorite:yield this.firestoreService.isFavorite(r.id,"movies")}))})),this.moviesResults.total_pages=n.total_pages,this.moviesResults.page=n.page,this.moviesResults.total_results=n.total_results):this.containerType==="celebrities"?(this.celebritiesResults.results=n.results.map(r=>pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"celebrities")})),this.celebritiesResults.total_pages=n.total_pages,this.celebritiesResults.page=n.page,this.celebritiesResults.total_results=n.total_results):this.containerType==="tvshows"?(this.tvshowResults.results=n.results.map(r=>pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"tvshows")})),this.tvshowResults.total_pages=n.total_pages,this.tvshowResults.page=n.page,this.tvshowResults.total_results=n.total_results):this.containerType==="combined"&&(this.combinedResults.results=n.results.map(r=>pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,r.media_type=="movie"?"movies":r.media_type=="tv"?"tvshows":"celebrities")})),this.combinedResults.total_pages=n.total_pages,this.combinedResults.page=n.page,this.combinedResults.total_results=n.total_results),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})}getMoreResults(){!this.multipleResults||!this.autoLoad||(this.containerType==="movies"?this.moviesResults.total_pages>this.moviesResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.moviesResults.page+1})).subscribe(n=>{this.moviesResults.total_pages=n.total_pages,this.moviesResults.page=n.page,this.moviesResults.total_results=n.total_results,n.results.map(r=>{this.moviesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"movies")}))}),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})):this.containerType==="tvshows"?this.tvshowResults.total_pages>this.tvshowResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.tvshowResults.page+1})).subscribe(n=>{this.tvshowResults.total_pages=n.total_pages,this.tvshowResults.page=n.page,this.tvshowResults.total_results=n.total_results,n.results.map(r=>{this.tvshowResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"tvshows")}))}),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})):this.containerType==="celebrities"?this.celebritiesResults.total_pages>this.celebritiesResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.celebritiesResults.page+1})).subscribe(n=>{this.celebritiesResults.total_pages=n.total_pages,this.celebritiesResults.page=n.page,this.celebritiesResults.total_results=n.total_results,n.results.forEach(r=>{this.celebritiesResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,"celebrities")}))}),this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})):this.containerType==="combined"&&this.combinedResults.total_pages>this.combinedResults.page&&(this.loading=!0,this.loadError=!1,this.tmdbService.getTMDBData(this.path+this.params,pe(F({},this.queryParams),{page:this.combinedResults.page+1})).subscribe(n=>{n.results.map(r=>this.combinedResults.results.push(pe(F({},r),{isFavorite:this.firestoreService.isFavorite(r.id,r.media_type=="movie"?"movies":r.media_type=="tv"?"tvshows":"celebrities")}))),this.combinedResults.total_pages=n.total_pages,this.combinedResults.page=n.page,this.combinedResults.total_results=n.total_results,this.loading=!1},n=>{this.showToast({severity:"error",summary:`Error ${n.error.status_code}`,detail:n.error.status_message,life:5e3}),this.loading=!1,this.loadError=!0})))}showToast(n){this.messageService.add({severity:n.severity,summary:n?.summary,detail:n?.detail,life:n?.life})}};t.\u0275fac=function(r){return new(r||t)(w(Ln),w(ar),w(ze),w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-cards-container"]],inputs:{movies:"movies",containerType:"containerType",tvshows:"tvshows",celebrities:"celebrities",combined:"combined",path:"path",params:"params",queryParams:"queryParams",multipleResults:"multipleResults",autoLoad:"autoLoad"},outputs:{onInfiniteScroll:"onInfiniteScroll"},standalone:!0,features:[mt([ar]),Mt,R],ngContentSelectors:f7,decls:10,vars:7,consts:[["position","top-right"],["infiniteScroll","",1,"cards-container",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],["style","text-align: center;"],["class","content"],[3,"movie","onFavorite"],[3,"movie"],[3,"tvShow","onFavorite"],[3,"tvShow"],[3,"person","onFavorite"],[3,"person"],[2,"text-align","center"],["label","Load More","size","small",3,"rounded","onClick"],[1,"content"],["label","Reload","icon","pi pi-load","size","small",3,"rounded","onClick"]],template:function(r,o){r&1&&(Ue(),y(0,"p-toast",0),p(1,"div",1),A("scrolled",function(){return o.getMoreResults()}),g(2,t7,2,0)(3,n7,2,0)(4,o7,2,0)(5,d7,2,0)(6,p7,2,0),Ae(7),h(),g(8,h7,2,1,"div",2)(9,m7,8,1,"div",3)),r&2&&(d(),l("infiniteScrollDistance",1)("infiniteScrollThrottle",250)("scrollWindow",!0),d(),Je(2,o.containerType==="movies"&&o.moviesResults.results.length>0?2:o.containerType==="tvshows"&&o.tvshowResults.results.length>0?3:o.containerType==="celebrities"&&o.celebritiesResults.results.length>0?4:o.containerType==="combined"&&o.combinedResults.results.length>0?5:-1),d(4),Je(6,o.loading?6:-1),d(2),Je(8,o.autoLoad?-1:8),d(),Je(9,o.loadError?9:-1))},dependencies:[Vo,Ga,Wh,Uu,zu,xr,$a,C2,yt,ni],styles:[".cards-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,1fr);width:100%;margin:0 auto;max-width:1280px;grid-gap:1rem;padding:.5rem}.content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:80vh;flex-direction:column}.content[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color)}.content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}@media screen and (max-width: 991px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}@media screen and (max-width: 767px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media screen and (max-width: 575px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media screen and (max-width: 381px){.cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}}"]});let i=t;return i})();function g7(i,t){if(i&1&&(p(0,"h1"),_(1),h()),i&2){let e=m();d(),z(e.label)}}var _7=["*"],li=(()=>{let t=class t{constructor(){this.showAs="flex"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-top-titles"]],inputs:{label:"label",showAs:"showAs"},standalone:!0,features:[R],ngContentSelectors:_7,decls:3,vars:2,consts:[[1,"top-titles",3,"ngClass"]],template:function(r,o){r&1&&(Ue(),p(0,"div",0),g(1,g7,2,1,"h1"),Ae(2),h()),r&2&&(l("ngClass",o.showAs),d(),Je(1,o.label?1:-1))},dependencies:[$,xe],styles:[".top-titles[_ngcontent-%COMP%]{margin:.6rem}.top-titles.flex[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;overflow:auto}.top-titles.flex[_ngcontent-%COMP%]::-webkit-scrollbar{width:0px;height:0px}.top-titles.column[_ngcontent-%COMP%]{display:block}.top-titles[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{border-left:3px solid var(--primary-color);padding-left:.3rem;margin-bottom:.4rem}"]});let i=t;return i})();var I2=(()=>{let t=class t{constructor(n,r){this.router=n,this.activatedRoute=r,this.moviesTypes=[{name:"Popular Movies",endpoint:"popular",id:1},{name:"Upcoming Movies",endpoint:"upcoming",id:2},{name:"Now Playing Movies",endpoint:"now_playing",id:3},{name:"Top Rated Movies",endpoint:"top_rated",id:4}],this.currentType=this.moviesTypes[0],document.title="Movies | Showbizhub",r.queryParams.subscribe(o=>D(this,null,function*(){if(o.type){let s=this.moviesTypes.filter(a=>a.endpoint==o.type);this.currentType=s[0]}else this.currentType=this.moviesTypes[0]}))}updateType(n){let r={type:n.value.endpoint};this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:r,queryParamsHandling:"merge"})}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-movies"]],standalone:!0,features:[R],decls:3,vars:5,consts:[[3,"label"],["optionLabel","name",3,"options","ngModel","ngModelChange","onChange"],["containerType","movies","path","movie",3,"params","multipleResults"]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"p-dropdown",1),A("ngModelChange",function(a){return o.currentType=a})("onChange",function(a){return o.updateType(a)}),h()(),y(2,"app-cards-container",2)),r&2&&(l("label",o.currentType==null?null:o.currentType.name),d(),l("options",o.moviesTypes)("ngModel",o.currentType),d(),l("params","/"+o.currentType.endpoint)("multipleResults",!0))},dependencies:[Rn,Kn,Bi,ii,_t,li,sr,zn]});let i=t;return i})();var w2=(()=>{let t=class t{transform(n,...r){var o=n;if(n<60)return n+" minutes";var s=o/60,a=Math.floor(s),c=(s-a)*60,u=Math.round(c);return a+" hours and "+u+" minutes"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"runtime",type:t,pure:!0,standalone:!0});let i=t;return i})();var Qn=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronLeftIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var Yn=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronRightIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var dd=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["WindowMaximizeIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var ud=(()=>{class i extends Pe{pathId;ngOnInit(){this.pathId="url(#"+Me()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["WindowMinimizeIcon"]],standalone:!0,features:[ye,R],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0)(1,"g"),y(2,"path",1),h(),p(3,"defs")(4,"clipPath",2),y(5,"rect",3),h()()()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),d(),T("clip-path",r.pathId),d(3),l("id",r.pathId))},encapsulation:2})}return i})();var Kh=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Rt,pt,Yn,Qn,dd,ud,za,$,Te]})}return i})();var Lo=function(){return Lo=Object.assign||function(t){for(var e,n=1,r=arguments.length;na){o=u;break}c===s.length-1&&(o=u)}var v=o.split("-"),b=parseInt(v[0],10),O=parseInt(v[1],10),V=t.width(),K=t.height()-e,P=Math.min(V,b),j=Math.min(K,O),ce=Math.min(P/b,j/O);return{width:b*ce,height:O*ce}}},getTransform:function(i,t,e,n,r){if(r){var o=Fe(i).find("img").first();if(o.get()){var s=t.get().getBoundingClientRect(),a=s.width,c=t.height()-(e+n),u=o.width(),f=o.height(),v=o.style(),b=(a-u)/2-o.offset().left+(parseFloat(v.paddingLeft)||0)+(parseFloat(v.borderLeft)||0)+Fe(window).scrollLeft()+s.left,O=(c-f)/2-o.offset().top+(parseFloat(v.paddingTop)||0)+(parseFloat(v.borderTop)||0)+Fe(window).scrollTop()+e,V=u/r.width,K=f/r.height,P="translate3d("+(b*=-1)+"px, "+(O*=-1)+"px, 0) scale3d("+V+", "+K+", 1)";return P}}},getIframeMarkup:function(i,t,e,n,r,o){var s=o?'title="'+o+'"':"";return'
`},getImgMarkup:function(i,t,e,n,r,o){var s=n?'srcset="'+n+'"':"",a=r?'sizes="'+r+'"':"",c="',u="";if(o){var f=typeof o=="string"?JSON.parse(o):o;u=f.map(function(v){var b="";return Object.keys(v).forEach(function(O){b+=" "+O+'="'+v[O]+'"'}),""})}return""+u+c},getResponsiveSrc:function(i){for(var t=[],e=[],n="",r=0;rs){n=e[a];break}return n},isImageLoaded:function(i){return!(!i||!i.complete||i.naturalWidth===0)},getVideoPosterMarkup:function(i,t,e,n,r){var o="";return r&&r.youtube?o="lg-has-youtube":r&&r.vimeo?o="lg-has-vimeo":o="lg-has-html5",'
@@ -102,17 +102,17 @@ provideFirebaseApp) or you're calling an AngularFire method outside of an NgModu margin-left: -`+t.width/2+`px; margin-top: -`+t.height/2+`px; height:`+t.height+"px":""},i.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+`px; - height:`+t.height+"px":""},i.prototype.getDummyImageContent=function(t,e,n){var r;if(this.settings.dynamic||(r=Fe(this.items).eq(e)),r){var o=void 0;if(this.settings.exThumbImage?o=r.attr(this.settings.exThumbImage):o=r.find("img").first().attr("src"),!o)return"";var s=this.getDummyImgStyles(this.currentImageSize),a="';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),a}return""},i.prototype.setImgMarkup=function(t,e,n){var r=this.galleryItems[n],o=r.alt,s=r.srcset,a=r.sizes,c=r.sources,u="",f=o?'alt="'+o+'"':"";this.isFirstSlideWithZoomAnimation()?u=this.getDummyImageContent(e,n,f):u=Vi.getImgMarkup(n,t,f,s,a,c);var v=' '+u+"";e.prepend(v)},i.prototype.onSlideObjectLoad=function(t,e,n,r){var o=t.find(".lg-object").first();Vi.isImageLoaded(o.get())||e?n():(o.on("load.lg error.lg",function(){n&&n()}),o.on("error.lg",function(){r&&r()}))},i.prototype.onLgObjectLoad=function(t,e,n,r,o,s){var a=this;this.onSlideObjectLoad(t,s,function(){a.triggerSlideItemLoad(t,e,n,r,o)},function(){t.addClass("lg-complete lg-complete_"),t.html(''+a.settings.strings.mediaLoadingFailed+"")})},i.prototype.triggerSlideItemLoad=function(t,e,n,r,o){var s=this,a=this.galleryItems[e],c=o&&this.getSlideType(a)==="video"&&!a.poster?r:0;setTimeout(function(){t.addClass("lg-complete lg-complete_"),s.LGel.trigger(jt.slideItemLoad,{index:e,delay:n||0,isFirstSlide:o})},c)},i.prototype.isFirstSlideWithZoomAnimation=function(){return!!(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)},i.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach(function(n,r){n.__slideVideoInfo=Vi.isVideo(n.src,!!n.video,r),n.__slideVideoInfo&&e.settings.loadYouTubePoster&&!n.poster&&n.__slideVideoInfo.youtube&&(n.poster="//img.youtube.com/vi/"+n.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},i.prototype.loadContent=function(t,e){var n=this,r=this.galleryItems[t],o=Fe(this.getSlideItemId(t)),s=r.poster,a=r.srcset,c=r.sizes,u=r.sources,f=r.src,v=r.video,b=v&&typeof v=="string"?JSON.parse(v):v;if(r.responsive){var O=r.responsive.split(",");f=Vi.getResponsiveSrc(O)||f}var V=r.__slideVideoInfo,K="",P=!!r.iframe,j=!this.lGalleryOn,ce=0;if(j&&(this.zoomFromOrigin&&this.currentImageSize?ce=this.settings.startAnimationDuration+10:ce=this.settings.backdropDuration+10),!o.hasClass("lg-loaded")){if(V){var _e=this.mediaContainerPosition,me=_e.top,qe=_e.bottom,Ge=Vi.getSize(this.items[t],this.outer,me+qe,V&&this.settings.videoMaxSize);K=this.getVideoContStyle(Ge)}if(P){var Et=Vi.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,f,r.iframeTitle);o.prepend(Et)}else if(s){var ht="",Ht=j&&this.zoomFromOrigin&&this.currentImageSize;Ht&&(ht=this.getDummyImageContent(o,t,""));var Et=Vi.getVideoPosterMarkup(s,ht||"",K,this.settings.strings.playVideo,V);o.prepend(Et)}else if(V){var Et='
';o.prepend(Et)}else if(this.setImgMarkup(f,o,t),a||u){var _i=o.find(".lg-object");this.initPictureFill(_i)}(s||V)&&this.LGel.trigger(jt.hasVideo,{index:t,src:f,html5Video:b,hasPoster:!!s}),this.LGel.trigger(jt.afterAppendSlide,{index:t}),this.lGalleryOn&&this.settings.appendSubHtmlTo===".lg-item"&&this.addHtml(t)}var Yn=0;ce&&!Fe(document.body).hasClass("lg-from-hash")&&(Yn=ce),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){o.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),o.hasClass("lg-loaded")||setTimeout(function(){if(n.getSlideType(r)==="image"){var tl=r.alt,Ls=tl?'alt="'+tl+'"':"";if(o.find(".lg-img-wrap").append(Vi.getImgMarkup(t,f,Ls,a,c,r.sources)),a||u){var mm=o.find(".lg-object");n.initPictureFill(mm)}}(n.getSlideType(r)==="image"||n.getSlideType(r)==="video"&&s)&&(n.onLgObjectLoad(o,t,ce,Yn,!0,!1),n.onSlideObjectLoad(o,!!(V&&V.html5&&!s),function(){n.loadContentOnFirstSlideLoad(t,o,Yn)},function(){n.loadContentOnFirstSlideLoad(t,o,Yn)}))},this.settings.startAnimationDuration+100)),o.addClass("lg-loaded"),(!this.isFirstSlideWithZoomAnimation()||this.getSlideType(r)==="video"&&!s)&&this.onLgObjectLoad(o,t,ce,Yn,j,!!(V&&V.html5&&!s)),(!this.zoomFromOrigin||!this.currentImageSize)&&o.hasClass("lg-complete_")&&!this.lGalleryOn&&setTimeout(function(){o.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,e===!0&&(o.hasClass("lg-complete_")?this.preload(t):o.find(".lg-object").first().on("load.lg error.lg",function(){n.preload(t)}))},i.prototype.loadContentOnFirstSlideLoad=function(t,e,n){var r=this;setTimeout(function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),r.outer.removeClass("lg-first-slide-loading"),r.isDummyImageRemoved=!0,r.preload(t)},n+300)},i.prototype.getItemsToBeInsertedToDom=function(t,e,n){var r=this;n===void 0&&(n=0);var o=[],s=Math.max(n,3);s=Math.min(s,this.galleryItems.length);var a="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(f,v){o.push("lg-item-"+r.lgId+"-"+v)}),o;if(t<(this.galleryItems.length-1)/2){for(var c=t;c>t-s/2&&c>=0;c--)o.push("lg-item-"+this.lgId+"-"+c);for(var u=o.length,c=0;c
')}),this.currentItemsInDom.forEach(function(o){r.indexOf(o)===-1&&Fe("#"+o).remove()}),r},i.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch{t=0}return t},i.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t],n=e.downloadUrl===!1||e.downloadUrl==="false";if(n)this.outer.addClass("lg-hide-download");else{var r=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),r.attr("href",e.downloadUrl||e.src),e.download&&r.attr("download",e.download)}}},i.prototype.makeSlideAnimation=function(t,e,n){var r=this;this.lGalleryOn&&n.addClass("lg-slide-progress"),setTimeout(function(){r.outer.addClass("lg-no-trans"),r.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),t==="prev"?(e.addClass("lg-prev-slide"),n.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),n.addClass("lg-prev-slide")),setTimeout(function(){r.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),r.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},i.prototype.slide=function(t,e,n,r){var o=this,s=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,s),!(this.lGalleryOn&&s===t)){var a=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var c=this.getSlideItem(t),u=this.getSlideItem(s),f=this.galleryItems[t],v=f.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(f)),this.setDownloadValue(t),v){var b=this.mediaContainerPosition,O=b.top,V=b.bottom,K=Vi.getSize(this.items[t],this.outer,O+V,v&&this.settings.videoMaxSize);this.resizeVideoSlide(t,K)}if(this.LGel.trigger(jt.beforeSlide,{prevIndex:s,index:t,fromTouch:!!e,fromThumb:!!n}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),r||(ts&&(r="next")),!e)this.makeSlideAnimation(r,c,u);else{this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var P=void 0,j=void 0;a>2?(P=t-1,j=t+1,(t===0&&s===a-1||t===a-1&&s===0)&&(j=0,P=a-1)):(P=0,j=1),r==="prev"?this.getSlideItem(j).addClass("lg-next-slide"):this.getSlideItem(P).addClass("lg-prev-slide"),c.addClass("lg-current")}this.lGalleryOn?setTimeout(function(){o.loadContent(t,!0),o.settings.appendSubHtmlTo!==".lg-item"&&o.addHtml(t)},this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout(function(){o.lgBusy=!1,u.removeClass("lg-slide-progress"),o.LGel.trigger(jt.afterSlide,{prevIndex:s,index:t,fromTouch:e,fromThumb:n})},(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},i.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},i.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},i.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},i.prototype.touchMove=function(t,e,n){var r=e.pageX-t.pageX,o=e.pageY-t.pageY,s=!1;if(this.swipeDirection?s=!0:Math.abs(r)>15?(this.swipeDirection="horizontal",s=!0):Math.abs(o)>15&&(this.swipeDirection="vertical",s=!0),!!s){var a=this.getSlideItem(this.index);if(this.swipeDirection==="horizontal"){n?.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(a,r,0);var c=a.get().offsetWidth,u=c*15/100,f=u-Math.abs(r*10/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-c+r-f,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),c+r+f,0)}else if(this.swipeDirection==="vertical"&&this.settings.swipeToClose){n?.preventDefault(),this.$container.addClass("lg-dragging-vertical");var v=1-Math.abs(o)/window.innerHeight;this.$backdrop.css("opacity",v);var b=1-Math.abs(o)/(window.innerWidth*2);this.setTranslate(a,0,o,b,b),Math.abs(o)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},i.prototype.touchEnd=function(t,e,n){var r=this,o;this.settings.mode!=="lg-slide"&&this.outer.addClass("lg-slide"),setTimeout(function(){r.$container.removeClass("lg-dragging-vertical"),r.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var s=!0;if(r.swipeDirection==="horizontal"){o=t.pageX-e.pageX;var a=Math.abs(t.pageX-e.pageX);o<0&&a>r.settings.swipeThreshold?(r.goToNextSlide(!0),s=!1):o>0&&a>r.settings.swipeThreshold&&(r.goToPrevSlide(!0),s=!1)}else if(r.swipeDirection==="vertical")if(o=Math.abs(t.pageY-e.pageY),r.settings.closable&&r.settings.swipeToClose&&o>100){r.closeGallery();return}else r.$backdrop.css("opacity",1);if(r.outer.find(".lg-item").removeAttr("style"),s&&Math.abs(t.pageX-e.pageX)<5){var c=Fe(n.target);r.isPosterElement(c)&&r.LGel.trigger(jt.posterClick)}r.swipeDirection=void 0}),setTimeout(function(){!r.outer.hasClass("lg-dragging")&&r.settings.mode!=="lg-slide"&&r.outer.removeClass("lg-slide")},this.settings.speed+100)},i.prototype.enableSwipe=function(){var t=this,e={},n={},r=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(s){t.dragOrSwipeEnabled=!0;var a=t.getSlideItem(t.index);(Fe(s.target).hasClass("lg-item")||a.get().contains(s.target))&&!t.outer.hasClass("lg-zoomed")&&!t.lgBusy&&s.touches.length===1&&(o=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY})}),this.$inner.on("touchmove.lg",function(s){o&&t.touchAction==="swipe"&&s.touches.length===1&&(n={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},t.touchMove(e,n,s),r=!0)}),this.$inner.on("touchend.lg",function(s){if(t.touchAction==="swipe"){if(r)r=!1,t.touchEnd(n,e,s);else if(o){var a=Fe(s.target);t.isPosterElement(a)&&t.LGel.trigger(jt.posterClick)}t.touchAction=void 0,o=!1}}))},i.prototype.enableDrag=function(){var t=this,e={},n={},r=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(s){t.dragOrSwipeEnabled=!0;var a=t.getSlideItem(t.index);(Fe(s.target).hasClass("lg-item")||a.get().contains(s.target))&&!t.outer.hasClass("lg-zoomed")&&!t.lgBusy&&(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:s.pageX,pageY:s.pageY},r=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(jt.dragStart)))}),Fe(window).on("mousemove.lg.global"+this.lgId,function(s){r&&t.lgOpened&&(o=!0,n={pageX:s.pageX,pageY:s.pageY},t.touchMove(e,n),t.LGel.trigger(jt.dragMove))}),Fe(window).on("mouseup.lg.global"+this.lgId,function(s){if(t.lgOpened){var a=Fe(s.target);o?(o=!1,t.touchEnd(n,e,s),t.LGel.trigger(jt.dragEnd)):t.isPosterElement(a)&&t.LGel.trigger(jt.posterClick),r&&(r=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}}))},i.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(Fe(e.target))&&t.LGel.trigger(jt.posterClick)})},i.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(this.index===0?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},i.prototype.goToNextSlide=function(t){var e=this,n=this.settings.loop;t&&this.galleryItems.length<3&&(n=!1),this.lgBusy||(this.index+10?(this.index--,this.LGel.trigger(jt.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):n?(this.index=this.galleryItems.length-1,this.LGel.trigger(jt.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout(function(){e.outer.removeClass("lg-left-end")},400)))},i.prototype.keyPress=function(){var t=this;Fe(window).on("keydown.lg.global"+this.lgId,function(e){t.lgOpened&&t.settings.escKey===!0&&e.keyCode===27&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(e.keyCode===37&&(e.preventDefault(),t.goToPrevSlide()),e.keyCode===39&&(e.preventDefault(),t.goToNextSlide()))})},i.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",function(){t.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){t.goToNextSlide()})},i.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),n=this.getElementById("lg-next");t+1===this.galleryItems.length?n.attr("disabled","disabled").addClass("disabled"):n.removeAttr("disabled").removeClass("disabled"),t===0?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},i.prototype.setTranslate=function(t,e,n,r,o){r===void 0&&(r=1),o===void 0&&(o=1),t.css("transform","translate3d("+e+"px, "+n+"px, 0px) scale3d("+r+", "+o+", 1)")},i.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",function(n){if(!(!n.deltaY||t.galleryItems.length<2)){n.preventDefault();var r=new Date().getTime();r-e<1e3||(e=r,n.deltaY>0?t.goToNextSlide():n.deltaY<0&&t.goToPrevSlide())}})},i.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},i.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},i.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()})},i.prototype.invalidateItems=function(){for(var t=0;t{class i{constructor(e){this._elementRef=e,this.lgInitialized=!1,this._elementRef=e}ngAfterViewChecked(){this.lgInitialized||(this.registerEvents(),this.LG=S2(this._elementRef.nativeElement,this.settings),this.lgInitialized=!0)}ngOnDestroy(){this.LG.destroy(),this.lgInitialized=!1}registerEvents(){this.onAfterAppendSlide&&this._elementRef.nativeElement.addEventListener(ci.onAfterAppendSlide,e=>{this.onAfterAppendSlide&&this.onAfterAppendSlide(e.detail)}),this.onInit&&this._elementRef.nativeElement.addEventListener(ci.onInit,e=>{this.onInit&&this.onInit(e.detail)}),this.onHasVideo&&this._elementRef.nativeElement.addEventListener(ci.onHasVideo,e=>{this.onHasVideo&&this.onHasVideo(e.detail)}),this.onContainerResize&&this._elementRef.nativeElement.addEventListener(ci.onContainerResize,e=>{this.onContainerResize&&this.onContainerResize(e.detail)}),this.onAfterAppendSubHtml&&this._elementRef.nativeElement.addEventListener(ci.onAfterAppendSubHtml,e=>{this.onAfterAppendSubHtml&&this.onAfterAppendSubHtml(e.detail)}),this.onBeforeOpen&&this._elementRef.nativeElement.addEventListener(ci.onBeforeOpen,e=>{this.onBeforeOpen&&this.onBeforeOpen(e.detail)}),this.onAfterOpen&&this._elementRef.nativeElement.addEventListener(ci.onAfterOpen,e=>{this.onAfterOpen&&this.onAfterOpen(e.detail)}),this.onSlideItemLoad&&this._elementRef.nativeElement.addEventListener(ci.onSlideItemLoad,e=>{this.onSlideItemLoad&&this.onSlideItemLoad(e.detail)}),this.onBeforeSlide&&this._elementRef.nativeElement.addEventListener(ci.onBeforeSlide,e=>{this.onBeforeSlide&&this.onBeforeSlide(e.detail)}),this.onAfterSlide&&this._elementRef.nativeElement.addEventListener(ci.onAfterSlide,e=>{this.onAfterSlide&&this.onAfterSlide(e.detail)}),this.onPosterClick&&this._elementRef.nativeElement.addEventListener(ci.onPosterClick,e=>{this.onPosterClick&&this.onPosterClick(e.detail)}),this.onDragStart&&this._elementRef.nativeElement.addEventListener(ci.onDragStart,e=>{this.onDragStart&&this.onDragStart(e.detail)}),this.onDragMove&&this._elementRef.nativeElement.addEventListener(ci.onDragMove,e=>{this.onDragMove&&this.onDragMove(e.detail)}),this.onDragEnd&&this._elementRef.nativeElement.addEventListener(ci.onDragEnd,e=>{this.onDragEnd&&this.onDragEnd(e.detail)}),this.onBeforeNextSlide&&this._elementRef.nativeElement.addEventListener(ci.onBeforeNextSlide,e=>{this.onBeforeNextSlide&&this.onBeforeNextSlide(e.detail)}),this.onBeforePrevSlide&&this._elementRef.nativeElement.addEventListener(ci.onBeforePrevSlide,e=>{this.onBeforePrevSlide&&this.onBeforePrevSlide(e.detail)}),this.onBeforeClose&&this._elementRef.nativeElement.addEventListener(ci.onBeforeClose,e=>{this.onBeforeClose&&this.onBeforeClose(e.detail)}),this.onAfterClose&&this._elementRef.nativeElement.addEventListener(ci.onAfterClose,e=>{this.onAfterClose&&this.onAfterClose(e.detail)}),this.onRotateLeft&&this._elementRef.nativeElement.addEventListener(ci.onRotateLeft,e=>{this.onRotateLeft&&this.onRotateLeft(e.detail)}),this.onRotateRight&&this._elementRef.nativeElement.addEventListener(ci.onRotateRight,e=>{this.onRotateRight&&this.onRotateRight(e.detail)}),this.onFlipHorizontal&&this._elementRef.nativeElement.addEventListener(ci.onFlipHorizontal,e=>{this.onFlipHorizontal&&this.onFlipHorizontal(e.detail)}),this.onFlipVertical&&this._elementRef.nativeElement.addEventListener(ci.onFlipVertical,e=>{this.onFlipVertical&&this.onFlipVertical(e.detail)})}}return i.\u0275fac=function(e){return new(e||i)(w(ve))},i.\u0275cmp=k({type:i,selectors:[["lightgallery"]],inputs:{settings:"settings",onAfterAppendSlide:"onAfterAppendSlide",onInit:"onInit",onHasVideo:"onHasVideo",onContainerResize:"onContainerResize",onAfterAppendSubHtml:"onAfterAppendSubHtml",onBeforeOpen:"onBeforeOpen",onAfterOpen:"onAfterOpen",onSlideItemLoad:"onSlideItemLoad",onBeforeSlide:"onBeforeSlide",onAfterSlide:"onAfterSlide",onPosterClick:"onPosterClick",onDragStart:"onDragStart",onDragMove:"onDragMove",onDragEnd:"onDragEnd",onBeforeNextSlide:"onBeforeNextSlide",onBeforePrevSlide:"onBeforePrevSlide",onBeforeClose:"onBeforeClose",onAfterClose:"onAfterClose",onRotateLeft:"onRotateLeft",onRotateRight:"onRotateRight",onFlipHorizontal:"onFlipHorizontal",onFlipVertical:"onFlipVertical"},ngContentSelectors:x7,decls:1,vars:0,template:function(e,n){e&1&&(je(),Ae(0))},encapsulation:2}),i})(),Yh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({}),i})();var Zh=function(){return Zh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n':"";this.settings.actualSize&&(t+=''),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},i.prototype.enableZoom=function(t){var e=this,n=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?n=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.isImageSlide(e.core.index)&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),t.detail.index===e.core.index&&e.setZoomEssentials())},n+30)},i.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(Kr.slideItemLoad+".zoom",this.enableZoom.bind(this))},i.prototype.getDragCords=function(t){return{x:t.pageX,y:t.pageY}},i.prototype.getSwipeCords=function(t){var e=t.touches[0].pageX,n=t.touches[0].pageY;return{x:e,y:n}},i.prototype.getDragAllowedAxises=function(t,e){var n=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),r=0,o=0,s=n.getBoundingClientRect();t?(r=n.offsetHeight*t,o=n.offsetWidth*t):e?(r=s.height+e*s.height,o=s.width+e*s.width):(r=s.height,o=s.width);var a=r>this.containerRect.height,c=o>this.containerRect.width;return{allowX:c,allowY:a}},i.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},i.prototype.zoomImage=function(t,e,n,r){if(!(Math.abs(e)<=0)){var o=this.containerRect.width/2+this.containerRect.left,s=this.containerRect.height/2+this.containerRect.top+this.scrollTop,a,c;t===1&&(this.positionChanged=!1);var u=this.getDragAllowedAxises(0,e),f=u.allowY,v=u.allowX;this.positionChanged&&(a=this.left/(this.scale-e),c=this.top/(this.scale-e),this.pageX=o-a,this.pageY=s-c,this.positionChanged=!1);var b=this.getPossibleSwipeDragCords(e),O,V,K=o-this.pageX,P=s-this.pageY;if(t-e>1){var j=(t-e)/Math.abs(e);K=(e<0?-K:K)+this.left*(j+(e<0?-1:1)),P=(e<0?-P:P)+this.top*(j+(e<0?-1:1)),O=K/j,V=P/j}else{var j=(t-e)*e;O=K*j,V=P*j}n&&(v?this.isBeyondPossibleLeft(O,b.minX)?O=b.minX:this.isBeyondPossibleRight(O,b.maxX)&&(O=b.maxX):t>1&&(Ob.maxX&&(O=b.maxX)),f?this.isBeyondPossibleTop(V,b.minY)?V=b.minY:this.isBeyondPossibleBottom(V,b.maxY)&&(V=b.maxY):t>1&&(Vb.maxY&&(V=b.maxY))),this.setZoomStyles({x:O,y:V,scale:t}),this.left=O,this.top=V,r&&this.setZoomImageSize()}},i.prototype.resetImageTranslate=function(t){if(this.isImageSlide(t)){var e=this.core.getSlideItem(t).find(".lg-image").first();this.imageReset=!1,e.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),e.css("width","auto").css("height","auto"),setTimeout(function(){e.removeClass("no-transition")},10)}},i.prototype.setZoomImageSize=function(){var t=this,e=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout(function(){var n=t.getCurrentImageActualSizeScale();t.scale>=n&&(e.addClass("no-transition"),t.imageReset=!0)},Ty),setTimeout(function(){var n=t.getCurrentImageActualSizeScale();if(t.scale>=n){var r=t.getDragAllowedAxises(t.scale);e.css("width",e.get().naturalWidth+"px").css("height",e.get().naturalHeight+"px"),t.core.outer.addClass("lg-actual-size"),r.allowX&&r.allowY?e.addClass("reset-transition"):r.allowX&&!r.allowY?e.addClass("reset-transition-x"):!r.allowX&&r.allowY&&e.addClass("reset-transition-y")}},Ty+50)},i.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),n=this.core.getSlideItem(this.core.index).find(".lg-image").first(),r=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=t.scale,n.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),r.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var o="translate3d("+t.x+"px, "+t.y+"px, 0)";e.css("transform",o)},i.prototype.setActualSize=function(t,e){var n=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var r=this.core.galleryItems[this.core.index];this.resetImageTranslate(t),setTimeout(function(){if(!(!r.src||n.core.outer.hasClass("lg-first-slide-loading"))){var o=n.getCurrentImageActualSizeScale(),s=n.scale;n.core.outer.hasClass("lg-zoomed")?n.scale=1:n.scale=n.getScale(o),n.setPageCords(e),n.beginZoom(n.scale),n.zoomImage(n.scale,n.scale-s,!0,!0)}},50),setTimeout(function(){n.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},60),setTimeout(function(){n.zoomInProgress=!1},Ty+110)}},i.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),n=this.core.galleryItems[t].width;return n?parseFloat(n):e.get().naturalWidth},i.prototype.getActualSizeScale=function(t,e){var n,r;return t>=e?(n=t/e,r=n||2):r=1,r},i.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=t.get().offsetWidth,n=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(n,e)},i.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.touches[0].pageX,e.y=t.pageY||t.touches[0].pageY;else{var n=this.core.$content.get().getBoundingClientRect();e.x=n.width/2+n.left,e.y=n.height/2+this.scrollTop+n.top}return e},i.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},i.prototype.manageActualPixelClassNames=function(){var t=this.core.getElementById("lg-actual-size");t.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},i.prototype.beginZoom=function(t){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),t>1},i.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},i.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",function(n){t.$LG(n.target).hasClass("lg-image")&&t.setActualSize(t.core.index,n)}),this.core.outer.on("touchstart.lg",function(n){var r=t.$LG(n.target);n.touches.length===1&&r.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,n.preventDefault(),t.setActualSize(t.core.index,n)):e=setTimeout(function(){e=null},300))}),this.core.LGel.on(Kr.containerResize+".zoom "+Kr.rotateRight+".zoom "+Kr.rotateLeft+".zoom "+Kr.flipHorizontal+".zoom "+Kr.flipVertical+".zoom",function(){if(!(!t.core.lgOpened||!t.isImageSlide(t.core.index)||t.core.touchAction)){var n=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();t.top=0,t.left=0,t.setZoomEssentials(),t.setZoomSwipeStyles(n,{x:0,y:0}),t.positionChanged=!0}}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){if(t.isImageSlide(t.core.index)){var n=0;t.imageReset&&(t.resetImageTranslate(t.core.index),n=50),setTimeout(function(){var r=t.scale-t.settings.scale;r<1&&(r=1),t.beginZoom(r),t.zoomImage(r,-t.settings.scale,!0,!t.settings.infiniteZoom)},n)}}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){t.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){t.setActualSize(t.core.index)}),this.core.LGel.on(Kr.beforeOpen+".zoom",function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(Kr.afterOpen+".zoom",function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1}),this.core.LGel.on(Kr.afterSlide+".zoom",function(n){var r=n.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.zoomInProgress=!1,t.resetZoom(r),t.resetImageTranslate(r),t.isImageSlide(t.core.index)&&t.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},i.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var t=this.scale+this.settings.scale;this.settings.infiniteZoom||(t=this.getScale(t)),this.beginZoom(t),this.zoomImage(t,Math.min(this.settings.scale,t-this.scale),!0,!this.settings.infiniteZoom)}},i.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),n=this.core.getSlideItem(t!==void 0?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),n.find(".lg-img-wrap").first().removeAttr("style"),n.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},i.prototype.getTouchDistance=function(t){return Math.sqrt((t.touches[0].pageX-t.touches[1].pageX)*(t.touches[0].pageX-t.touches[1].pageX)+(t.touches[0].pageY-t.touches[1].pageY)*(t.touches[0].pageY-t.touches[1].pageY))},i.prototype.pinchZoom=function(){var t=this,e=0,n=!1,r=1,o=0,s=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",function(a){if(s=t.core.getSlideItem(t.core.index),!!t.isImageSlide(t.core.index)&&a.touches.length===2){if(a.preventDefault(),t.core.outer.hasClass("lg-first-slide-loading"))return;r=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.setPageCords(a),t.resetImageTranslate(t.core.index),t.core.touchAction="pinch",e=t.getTouchDistance(a)}}),this.core.$inner.on("touchmove.lg",function(a){if(a.touches.length===2&&t.core.touchAction==="pinch"&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){a.preventDefault();var c=t.getTouchDistance(a),u=e-c;if(!n&&Math.abs(u)>5&&(n=!0),n){o=t.scale;var f=Math.max(1,r+-u*.02);t.scale=Math.round((f+Number.EPSILON)*100)/100;var v=t.scale-o;t.zoomImage(t.scale,Math.round((v+Number.EPSILON)*100)/100,!1,!1)}}}),this.core.$inner.on("touchend.lg",function(a){if(t.core.touchAction==="pinch"&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){if(n=!1,e=0,t.scale<=1)t.resetZoom();else{var c=t.getCurrentImageActualSizeScale();if(t.scale>=c){var u=c-t.scale;u===0&&(u=.01),t.zoomImage(c,u,!1,!0)}t.manageActualPixelClassNames(),t.core.outer.addClass("lg-zoomed")}t.core.touchAction=void 0}})},i.prototype.touchendZoom=function(t,e,n,r,o){var s=e.x-t.x,a=e.y-t.y,c=Math.abs(s)/o+1,u=Math.abs(a)/o+1;c>2&&(c+=1),u>2&&(u+=1),s=s*c,a=a*u;var f=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),v={};v.x=this.left+s,v.y=this.top+a;var b=this.getPossibleSwipeDragCords();(Math.abs(s)>15||Math.abs(a)>15)&&(r&&(this.isBeyondPossibleTop(v.y,b.minY)?v.y=b.minY:this.isBeyondPossibleBottom(v.y,b.maxY)&&(v.y=b.maxY)),n&&(this.isBeyondPossibleLeft(v.x,b.minX)?v.x=b.minX:this.isBeyondPossibleRight(v.x,b.maxX)&&(v.x=b.maxX)),r?this.top=v.y:v.y=this.top,n?this.left=v.x:v.x=this.left,this.setZoomSwipeStyles(f,v),this.positionChanged=!0)},i.prototype.getZoomSwipeCords=function(t,e,n,r,o){var s={};if(r){if(s.y=this.top+(e.y-t.y),this.isBeyondPossibleTop(s.y,o.minY)){var a=o.minY-s.y;s.y=o.minY-a/6}else if(this.isBeyondPossibleBottom(s.y,o.maxY)){var c=s.y-o.maxY;s.y=o.maxY+c/6}}else s.y=this.top;if(n){if(s.x=this.left+(e.x-t.x),this.isBeyondPossibleLeft(s.x,o.minX)){var u=o.minX-s.x;s.x=o.minX-u/6}else if(this.isBeyondPossibleRight(s.x,o.maxX)){var f=s.x-o.maxX;s.x=o.maxX+f/6}}else s.x=this.left;return s},i.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},i.prototype.isBeyondPossibleRight=function(t,e){return t<=e},i.prototype.isBeyondPossibleTop=function(t,e){return t>=e},i.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},i.prototype.isImageSlide=function(t){var e=this.core.galleryItems[t];return this.core.getSlideType(e)==="image"},i.prototype.getPossibleSwipeDragCords=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),n=this.core.mediaContainerPosition.bottom,r=e.get().getBoundingClientRect(),o=r.height,s=r.width;t&&(o=o+t*o,s=s+t*s);var a=(o-this.containerRect.height)/2,c=(this.containerRect.height-o)/2+n,u=(s-this.containerRect.width)/2,f=(this.containerRect.width-s)/2,v={minY:a,maxY:c,minX:u,maxX:f};return v},i.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},i.prototype.zoomSwipe=function(){var t=this,e={},n={},r=!1,o=!1,s=!1,a=new Date,c=new Date,u,f,v=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(b){if(t.isImageSlide(t.core.index)&&(v=t.core.getSlideItem(t.core.index),(t.$LG(b.target).hasClass("lg-item")||v.get().contains(b.target))&&b.touches.length===1&&t.core.outer.hasClass("lg-zoomed"))){b.preventDefault(),a=new Date,t.core.touchAction="zoomSwipe",f=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();var O=t.getDragAllowedAxises(0);s=O.allowY,o=O.allowX,(o||s)&&(e=t.getSwipeCords(b)),u=t.getPossibleSwipeDragCords(),t.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(b){if(b.touches.length===1&&t.core.touchAction==="zoomSwipe"&&(t.$LG(b.target).hasClass("lg-item")||v.get().contains(b.target))){b.preventDefault(),t.core.touchAction="zoomSwipe",n=t.getSwipeCords(b);var O=t.getZoomSwipeCords(e,n,o,s,u);(Math.abs(n.x-e.x)>15||Math.abs(n.y-e.y)>15)&&(r=!0,t.setZoomSwipeStyles(f,O))}}),this.core.$inner.on("touchend.lg",function(b){if(t.core.touchAction==="zoomSwipe"&&(t.$LG(b.target).hasClass("lg-item")||v.get().contains(b.target))){if(b.preventDefault(),t.core.touchAction=void 0,t.core.outer.removeClass("lg-zoom-dragging"),!r)return;r=!1,c=new Date;var O=c.valueOf()-a.valueOf();t.touchendZoom(e,n,o,s,O)}})},i.prototype.zoomDrag=function(){var t=this,e={},n={},r=!1,o=!1,s=!1,a=!1,c,u,f,v;this.core.outer.on("mousedown.lg.zoom",function(b){if(t.isImageSlide(t.core.index)){var O=t.core.getSlideItem(t.core.index);if(t.$LG(b.target).hasClass("lg-item")||O.get().contains(b.target)){c=new Date,v=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();var V=t.getDragAllowedAxises(0);a=V.allowY,s=V.allowX,t.core.outer.hasClass("lg-zoomed")&&t.$LG(b.target).hasClass("lg-object")&&(s||a)&&(b.preventDefault(),e=t.getDragCords(b),f=t.getPossibleSwipeDragCords(),r=!0,t.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(b){if(r){o=!0,n=t.getDragCords(b);var O=t.getZoomSwipeCords(e,n,s,a,f);t.setZoomSwipeStyles(v,O)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(b){if(r){if(u=new Date,r=!1,t.core.outer.removeClass("lg-zoom-dragging"),o&&(e.x!==n.x||e.y!==n.y)){n=t.getDragCords(b);var O=u.valueOf()-c.valueOf();t.touchendZoom(e,n,s,a,O)}o=!1}t.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},i.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},i.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},i}(),O2=E7;var Ds=function(){return Ds=Object.assign||function(t){for(var e,n=1,r=arguments.length;n';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),a}return""},i.prototype.setImgMarkup=function(t,e,n){var r=this.galleryItems[n],o=r.alt,s=r.srcset,a=r.sizes,c=r.sources,u="",f=o?'alt="'+o+'"':"";this.isFirstSlideWithZoomAnimation()?u=this.getDummyImageContent(e,n,f):u=Vi.getImgMarkup(n,t,f,s,a,c);var v=' '+u+"";e.prepend(v)},i.prototype.onSlideObjectLoad=function(t,e,n,r){var o=t.find(".lg-object").first();Vi.isImageLoaded(o.get())||e?n():(o.on("load.lg error.lg",function(){n&&n()}),o.on("error.lg",function(){r&&r()}))},i.prototype.onLgObjectLoad=function(t,e,n,r,o,s){var a=this;this.onSlideObjectLoad(t,s,function(){a.triggerSlideItemLoad(t,e,n,r,o)},function(){t.addClass("lg-complete lg-complete_"),t.html(''+a.settings.strings.mediaLoadingFailed+"")})},i.prototype.triggerSlideItemLoad=function(t,e,n,r,o){var s=this,a=this.galleryItems[e],c=o&&this.getSlideType(a)==="video"&&!a.poster?r:0;setTimeout(function(){t.addClass("lg-complete lg-complete_"),s.LGel.trigger(jt.slideItemLoad,{index:e,delay:n||0,isFirstSlide:o})},c)},i.prototype.isFirstSlideWithZoomAnimation=function(){return!!(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)},i.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach(function(n,r){n.__slideVideoInfo=Vi.isVideo(n.src,!!n.video,r),n.__slideVideoInfo&&e.settings.loadYouTubePoster&&!n.poster&&n.__slideVideoInfo.youtube&&(n.poster="//img.youtube.com/vi/"+n.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},i.prototype.loadContent=function(t,e){var n=this,r=this.galleryItems[t],o=Fe(this.getSlideItemId(t)),s=r.poster,a=r.srcset,c=r.sizes,u=r.sources,f=r.src,v=r.video,b=v&&typeof v=="string"?JSON.parse(v):v;if(r.responsive){var O=r.responsive.split(",");f=Vi.getResponsiveSrc(O)||f}var V=r.__slideVideoInfo,K="",P=!!r.iframe,j=!this.lGalleryOn,ce=0;if(j&&(this.zoomFromOrigin&&this.currentImageSize?ce=this.settings.startAnimationDuration+10:ce=this.settings.backdropDuration+10),!o.hasClass("lg-loaded")){if(V){var _e=this.mediaContainerPosition,me=_e.top,$e=_e.bottom,He=Vi.getSize(this.items[t],this.outer,me+$e,V&&this.settings.videoMaxSize);K=this.getVideoContStyle(He)}if(P){var Et=Vi.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,f,r.iframeTitle);o.prepend(Et)}else if(s){var ht="",Ht=j&&this.zoomFromOrigin&&this.currentImageSize;Ht&&(ht=this.getDummyImageContent(o,t,""));var Et=Vi.getVideoPosterMarkup(s,ht||"",K,this.settings.strings.playVideo,V);o.prepend(Et)}else if(V){var Et='
';o.prepend(Et)}else if(this.setImgMarkup(f,o,t),a||u){var _i=o.find(".lg-object");this.initPictureFill(_i)}(s||V)&&this.LGel.trigger(jt.hasVideo,{index:t,src:f,html5Video:b,hasPoster:!!s}),this.LGel.trigger(jt.afterAppendSlide,{index:t}),this.lGalleryOn&&this.settings.appendSubHtmlTo===".lg-item"&&this.addHtml(t)}var Zn=0;ce&&!Fe(document.body).hasClass("lg-from-hash")&&(Zn=ce),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){o.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),o.hasClass("lg-loaded")||setTimeout(function(){if(n.getSlideType(r)==="image"){var tl=r.alt,Ls=tl?'alt="'+tl+'"':"";if(o.find(".lg-img-wrap").append(Vi.getImgMarkup(t,f,Ls,a,c,r.sources)),a||u){var mm=o.find(".lg-object");n.initPictureFill(mm)}}(n.getSlideType(r)==="image"||n.getSlideType(r)==="video"&&s)&&(n.onLgObjectLoad(o,t,ce,Zn,!0,!1),n.onSlideObjectLoad(o,!!(V&&V.html5&&!s),function(){n.loadContentOnFirstSlideLoad(t,o,Zn)},function(){n.loadContentOnFirstSlideLoad(t,o,Zn)}))},this.settings.startAnimationDuration+100)),o.addClass("lg-loaded"),(!this.isFirstSlideWithZoomAnimation()||this.getSlideType(r)==="video"&&!s)&&this.onLgObjectLoad(o,t,ce,Zn,j,!!(V&&V.html5&&!s)),(!this.zoomFromOrigin||!this.currentImageSize)&&o.hasClass("lg-complete_")&&!this.lGalleryOn&&setTimeout(function(){o.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,e===!0&&(o.hasClass("lg-complete_")?this.preload(t):o.find(".lg-object").first().on("load.lg error.lg",function(){n.preload(t)}))},i.prototype.loadContentOnFirstSlideLoad=function(t,e,n){var r=this;setTimeout(function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),r.outer.removeClass("lg-first-slide-loading"),r.isDummyImageRemoved=!0,r.preload(t)},n+300)},i.prototype.getItemsToBeInsertedToDom=function(t,e,n){var r=this;n===void 0&&(n=0);var o=[],s=Math.max(n,3);s=Math.min(s,this.galleryItems.length);var a="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(f,v){o.push("lg-item-"+r.lgId+"-"+v)}),o;if(t<(this.galleryItems.length-1)/2){for(var c=t;c>t-s/2&&c>=0;c--)o.push("lg-item-"+this.lgId+"-"+c);for(var u=o.length,c=0;c
')}),this.currentItemsInDom.forEach(function(o){r.indexOf(o)===-1&&Fe("#"+o).remove()}),r},i.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch{t=0}return t},i.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t],n=e.downloadUrl===!1||e.downloadUrl==="false";if(n)this.outer.addClass("lg-hide-download");else{var r=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),r.attr("href",e.downloadUrl||e.src),e.download&&r.attr("download",e.download)}}},i.prototype.makeSlideAnimation=function(t,e,n){var r=this;this.lGalleryOn&&n.addClass("lg-slide-progress"),setTimeout(function(){r.outer.addClass("lg-no-trans"),r.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),t==="prev"?(e.addClass("lg-prev-slide"),n.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),n.addClass("lg-prev-slide")),setTimeout(function(){r.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),r.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},i.prototype.slide=function(t,e,n,r){var o=this,s=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,s),!(this.lGalleryOn&&s===t)){var a=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var c=this.getSlideItem(t),u=this.getSlideItem(s),f=this.galleryItems[t],v=f.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(f)),this.setDownloadValue(t),v){var b=this.mediaContainerPosition,O=b.top,V=b.bottom,K=Vi.getSize(this.items[t],this.outer,O+V,v&&this.settings.videoMaxSize);this.resizeVideoSlide(t,K)}if(this.LGel.trigger(jt.beforeSlide,{prevIndex:s,index:t,fromTouch:!!e,fromThumb:!!n}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),r||(ts&&(r="next")),!e)this.makeSlideAnimation(r,c,u);else{this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var P=void 0,j=void 0;a>2?(P=t-1,j=t+1,(t===0&&s===a-1||t===a-1&&s===0)&&(j=0,P=a-1)):(P=0,j=1),r==="prev"?this.getSlideItem(j).addClass("lg-next-slide"):this.getSlideItem(P).addClass("lg-prev-slide"),c.addClass("lg-current")}this.lGalleryOn?setTimeout(function(){o.loadContent(t,!0),o.settings.appendSubHtmlTo!==".lg-item"&&o.addHtml(t)},this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout(function(){o.lgBusy=!1,u.removeClass("lg-slide-progress"),o.LGel.trigger(jt.afterSlide,{prevIndex:s,index:t,fromTouch:e,fromThumb:n})},(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},i.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},i.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},i.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},i.prototype.touchMove=function(t,e,n){var r=e.pageX-t.pageX,o=e.pageY-t.pageY,s=!1;if(this.swipeDirection?s=!0:Math.abs(r)>15?(this.swipeDirection="horizontal",s=!0):Math.abs(o)>15&&(this.swipeDirection="vertical",s=!0),!!s){var a=this.getSlideItem(this.index);if(this.swipeDirection==="horizontal"){n?.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(a,r,0);var c=a.get().offsetWidth,u=c*15/100,f=u-Math.abs(r*10/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-c+r-f,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),c+r+f,0)}else if(this.swipeDirection==="vertical"&&this.settings.swipeToClose){n?.preventDefault(),this.$container.addClass("lg-dragging-vertical");var v=1-Math.abs(o)/window.innerHeight;this.$backdrop.css("opacity",v);var b=1-Math.abs(o)/(window.innerWidth*2);this.setTranslate(a,0,o,b,b),Math.abs(o)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},i.prototype.touchEnd=function(t,e,n){var r=this,o;this.settings.mode!=="lg-slide"&&this.outer.addClass("lg-slide"),setTimeout(function(){r.$container.removeClass("lg-dragging-vertical"),r.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var s=!0;if(r.swipeDirection==="horizontal"){o=t.pageX-e.pageX;var a=Math.abs(t.pageX-e.pageX);o<0&&a>r.settings.swipeThreshold?(r.goToNextSlide(!0),s=!1):o>0&&a>r.settings.swipeThreshold&&(r.goToPrevSlide(!0),s=!1)}else if(r.swipeDirection==="vertical")if(o=Math.abs(t.pageY-e.pageY),r.settings.closable&&r.settings.swipeToClose&&o>100){r.closeGallery();return}else r.$backdrop.css("opacity",1);if(r.outer.find(".lg-item").removeAttr("style"),s&&Math.abs(t.pageX-e.pageX)<5){var c=Fe(n.target);r.isPosterElement(c)&&r.LGel.trigger(jt.posterClick)}r.swipeDirection=void 0}),setTimeout(function(){!r.outer.hasClass("lg-dragging")&&r.settings.mode!=="lg-slide"&&r.outer.removeClass("lg-slide")},this.settings.speed+100)},i.prototype.enableSwipe=function(){var t=this,e={},n={},r=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(s){t.dragOrSwipeEnabled=!0;var a=t.getSlideItem(t.index);(Fe(s.target).hasClass("lg-item")||a.get().contains(s.target))&&!t.outer.hasClass("lg-zoomed")&&!t.lgBusy&&s.touches.length===1&&(o=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY})}),this.$inner.on("touchmove.lg",function(s){o&&t.touchAction==="swipe"&&s.touches.length===1&&(n={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},t.touchMove(e,n,s),r=!0)}),this.$inner.on("touchend.lg",function(s){if(t.touchAction==="swipe"){if(r)r=!1,t.touchEnd(n,e,s);else if(o){var a=Fe(s.target);t.isPosterElement(a)&&t.LGel.trigger(jt.posterClick)}t.touchAction=void 0,o=!1}}))},i.prototype.enableDrag=function(){var t=this,e={},n={},r=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(s){t.dragOrSwipeEnabled=!0;var a=t.getSlideItem(t.index);(Fe(s.target).hasClass("lg-item")||a.get().contains(s.target))&&!t.outer.hasClass("lg-zoomed")&&!t.lgBusy&&(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:s.pageX,pageY:s.pageY},r=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(jt.dragStart)))}),Fe(window).on("mousemove.lg.global"+this.lgId,function(s){r&&t.lgOpened&&(o=!0,n={pageX:s.pageX,pageY:s.pageY},t.touchMove(e,n),t.LGel.trigger(jt.dragMove))}),Fe(window).on("mouseup.lg.global"+this.lgId,function(s){if(t.lgOpened){var a=Fe(s.target);o?(o=!1,t.touchEnd(n,e,s),t.LGel.trigger(jt.dragEnd)):t.isPosterElement(a)&&t.LGel.trigger(jt.posterClick),r&&(r=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}}))},i.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(Fe(e.target))&&t.LGel.trigger(jt.posterClick)})},i.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(this.index===0?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},i.prototype.goToNextSlide=function(t){var e=this,n=this.settings.loop;t&&this.galleryItems.length<3&&(n=!1),this.lgBusy||(this.index+10?(this.index--,this.LGel.trigger(jt.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):n?(this.index=this.galleryItems.length-1,this.LGel.trigger(jt.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout(function(){e.outer.removeClass("lg-left-end")},400)))},i.prototype.keyPress=function(){var t=this;Fe(window).on("keydown.lg.global"+this.lgId,function(e){t.lgOpened&&t.settings.escKey===!0&&e.keyCode===27&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(e.keyCode===37&&(e.preventDefault(),t.goToPrevSlide()),e.keyCode===39&&(e.preventDefault(),t.goToNextSlide()))})},i.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",function(){t.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){t.goToNextSlide()})},i.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),n=this.getElementById("lg-next");t+1===this.galleryItems.length?n.attr("disabled","disabled").addClass("disabled"):n.removeAttr("disabled").removeClass("disabled"),t===0?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},i.prototype.setTranslate=function(t,e,n,r,o){r===void 0&&(r=1),o===void 0&&(o=1),t.css("transform","translate3d("+e+"px, "+n+"px, 0px) scale3d("+r+", "+o+", 1)")},i.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",function(n){if(!(!n.deltaY||t.galleryItems.length<2)){n.preventDefault();var r=new Date().getTime();r-e<1e3||(e=r,n.deltaY>0?t.goToNextSlide():n.deltaY<0&&t.goToPrevSlide())}})},i.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},i.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},i.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()})},i.prototype.invalidateItems=function(){for(var t=0;t{class i{constructor(e){this._elementRef=e,this.lgInitialized=!1,this._elementRef=e}ngAfterViewChecked(){this.lgInitialized||(this.registerEvents(),this.LG=S2(this._elementRef.nativeElement,this.settings),this.lgInitialized=!0)}ngOnDestroy(){this.LG.destroy(),this.lgInitialized=!1}registerEvents(){this.onAfterAppendSlide&&this._elementRef.nativeElement.addEventListener(ci.onAfterAppendSlide,e=>{this.onAfterAppendSlide&&this.onAfterAppendSlide(e.detail)}),this.onInit&&this._elementRef.nativeElement.addEventListener(ci.onInit,e=>{this.onInit&&this.onInit(e.detail)}),this.onHasVideo&&this._elementRef.nativeElement.addEventListener(ci.onHasVideo,e=>{this.onHasVideo&&this.onHasVideo(e.detail)}),this.onContainerResize&&this._elementRef.nativeElement.addEventListener(ci.onContainerResize,e=>{this.onContainerResize&&this.onContainerResize(e.detail)}),this.onAfterAppendSubHtml&&this._elementRef.nativeElement.addEventListener(ci.onAfterAppendSubHtml,e=>{this.onAfterAppendSubHtml&&this.onAfterAppendSubHtml(e.detail)}),this.onBeforeOpen&&this._elementRef.nativeElement.addEventListener(ci.onBeforeOpen,e=>{this.onBeforeOpen&&this.onBeforeOpen(e.detail)}),this.onAfterOpen&&this._elementRef.nativeElement.addEventListener(ci.onAfterOpen,e=>{this.onAfterOpen&&this.onAfterOpen(e.detail)}),this.onSlideItemLoad&&this._elementRef.nativeElement.addEventListener(ci.onSlideItemLoad,e=>{this.onSlideItemLoad&&this.onSlideItemLoad(e.detail)}),this.onBeforeSlide&&this._elementRef.nativeElement.addEventListener(ci.onBeforeSlide,e=>{this.onBeforeSlide&&this.onBeforeSlide(e.detail)}),this.onAfterSlide&&this._elementRef.nativeElement.addEventListener(ci.onAfterSlide,e=>{this.onAfterSlide&&this.onAfterSlide(e.detail)}),this.onPosterClick&&this._elementRef.nativeElement.addEventListener(ci.onPosterClick,e=>{this.onPosterClick&&this.onPosterClick(e.detail)}),this.onDragStart&&this._elementRef.nativeElement.addEventListener(ci.onDragStart,e=>{this.onDragStart&&this.onDragStart(e.detail)}),this.onDragMove&&this._elementRef.nativeElement.addEventListener(ci.onDragMove,e=>{this.onDragMove&&this.onDragMove(e.detail)}),this.onDragEnd&&this._elementRef.nativeElement.addEventListener(ci.onDragEnd,e=>{this.onDragEnd&&this.onDragEnd(e.detail)}),this.onBeforeNextSlide&&this._elementRef.nativeElement.addEventListener(ci.onBeforeNextSlide,e=>{this.onBeforeNextSlide&&this.onBeforeNextSlide(e.detail)}),this.onBeforePrevSlide&&this._elementRef.nativeElement.addEventListener(ci.onBeforePrevSlide,e=>{this.onBeforePrevSlide&&this.onBeforePrevSlide(e.detail)}),this.onBeforeClose&&this._elementRef.nativeElement.addEventListener(ci.onBeforeClose,e=>{this.onBeforeClose&&this.onBeforeClose(e.detail)}),this.onAfterClose&&this._elementRef.nativeElement.addEventListener(ci.onAfterClose,e=>{this.onAfterClose&&this.onAfterClose(e.detail)}),this.onRotateLeft&&this._elementRef.nativeElement.addEventListener(ci.onRotateLeft,e=>{this.onRotateLeft&&this.onRotateLeft(e.detail)}),this.onRotateRight&&this._elementRef.nativeElement.addEventListener(ci.onRotateRight,e=>{this.onRotateRight&&this.onRotateRight(e.detail)}),this.onFlipHorizontal&&this._elementRef.nativeElement.addEventListener(ci.onFlipHorizontal,e=>{this.onFlipHorizontal&&this.onFlipHorizontal(e.detail)}),this.onFlipVertical&&this._elementRef.nativeElement.addEventListener(ci.onFlipVertical,e=>{this.onFlipVertical&&this.onFlipVertical(e.detail)})}}return i.\u0275fac=function(e){return new(e||i)(w(ve))},i.\u0275cmp=k({type:i,selectors:[["lightgallery"]],inputs:{settings:"settings",onAfterAppendSlide:"onAfterAppendSlide",onInit:"onInit",onHasVideo:"onHasVideo",onContainerResize:"onContainerResize",onAfterAppendSubHtml:"onAfterAppendSubHtml",onBeforeOpen:"onBeforeOpen",onAfterOpen:"onAfterOpen",onSlideItemLoad:"onSlideItemLoad",onBeforeSlide:"onBeforeSlide",onAfterSlide:"onAfterSlide",onPosterClick:"onPosterClick",onDragStart:"onDragStart",onDragMove:"onDragMove",onDragEnd:"onDragEnd",onBeforeNextSlide:"onBeforeNextSlide",onBeforePrevSlide:"onBeforePrevSlide",onBeforeClose:"onBeforeClose",onAfterClose:"onAfterClose",onRotateLeft:"onRotateLeft",onRotateRight:"onRotateRight",onFlipHorizontal:"onFlipHorizontal",onFlipVertical:"onFlipVertical"},ngContentSelectors:x7,decls:1,vars:0,template:function(e,n){e&1&&(Ue(),Ae(0))},encapsulation:2}),i})(),Yh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({}),i})();var Zh=function(){return Zh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n':"";this.settings.actualSize&&(t+=''),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},i.prototype.enableZoom=function(t){var e=this,n=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?n=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.isImageSlide(e.core.index)&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),t.detail.index===e.core.index&&e.setZoomEssentials())},n+30)},i.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(Kr.slideItemLoad+".zoom",this.enableZoom.bind(this))},i.prototype.getDragCords=function(t){return{x:t.pageX,y:t.pageY}},i.prototype.getSwipeCords=function(t){var e=t.touches[0].pageX,n=t.touches[0].pageY;return{x:e,y:n}},i.prototype.getDragAllowedAxises=function(t,e){var n=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),r=0,o=0,s=n.getBoundingClientRect();t?(r=n.offsetHeight*t,o=n.offsetWidth*t):e?(r=s.height+e*s.height,o=s.width+e*s.width):(r=s.height,o=s.width);var a=r>this.containerRect.height,c=o>this.containerRect.width;return{allowX:c,allowY:a}},i.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},i.prototype.zoomImage=function(t,e,n,r){if(!(Math.abs(e)<=0)){var o=this.containerRect.width/2+this.containerRect.left,s=this.containerRect.height/2+this.containerRect.top+this.scrollTop,a,c;t===1&&(this.positionChanged=!1);var u=this.getDragAllowedAxises(0,e),f=u.allowY,v=u.allowX;this.positionChanged&&(a=this.left/(this.scale-e),c=this.top/(this.scale-e),this.pageX=o-a,this.pageY=s-c,this.positionChanged=!1);var b=this.getPossibleSwipeDragCords(e),O,V,K=o-this.pageX,P=s-this.pageY;if(t-e>1){var j=(t-e)/Math.abs(e);K=(e<0?-K:K)+this.left*(j+(e<0?-1:1)),P=(e<0?-P:P)+this.top*(j+(e<0?-1:1)),O=K/j,V=P/j}else{var j=(t-e)*e;O=K*j,V=P*j}n&&(v?this.isBeyondPossibleLeft(O,b.minX)?O=b.minX:this.isBeyondPossibleRight(O,b.maxX)&&(O=b.maxX):t>1&&(Ob.maxX&&(O=b.maxX)),f?this.isBeyondPossibleTop(V,b.minY)?V=b.minY:this.isBeyondPossibleBottom(V,b.maxY)&&(V=b.maxY):t>1&&(Vb.maxY&&(V=b.maxY))),this.setZoomStyles({x:O,y:V,scale:t}),this.left=O,this.top=V,r&&this.setZoomImageSize()}},i.prototype.resetImageTranslate=function(t){if(this.isImageSlide(t)){var e=this.core.getSlideItem(t).find(".lg-image").first();this.imageReset=!1,e.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),e.css("width","auto").css("height","auto"),setTimeout(function(){e.removeClass("no-transition")},10)}},i.prototype.setZoomImageSize=function(){var t=this,e=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout(function(){var n=t.getCurrentImageActualSizeScale();t.scale>=n&&(e.addClass("no-transition"),t.imageReset=!0)},Ty),setTimeout(function(){var n=t.getCurrentImageActualSizeScale();if(t.scale>=n){var r=t.getDragAllowedAxises(t.scale);e.css("width",e.get().naturalWidth+"px").css("height",e.get().naturalHeight+"px"),t.core.outer.addClass("lg-actual-size"),r.allowX&&r.allowY?e.addClass("reset-transition"):r.allowX&&!r.allowY?e.addClass("reset-transition-x"):!r.allowX&&r.allowY&&e.addClass("reset-transition-y")}},Ty+50)},i.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),n=this.core.getSlideItem(this.core.index).find(".lg-image").first(),r=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=t.scale,n.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),r.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var o="translate3d("+t.x+"px, "+t.y+"px, 0)";e.css("transform",o)},i.prototype.setActualSize=function(t,e){var n=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var r=this.core.galleryItems[this.core.index];this.resetImageTranslate(t),setTimeout(function(){if(!(!r.src||n.core.outer.hasClass("lg-first-slide-loading"))){var o=n.getCurrentImageActualSizeScale(),s=n.scale;n.core.outer.hasClass("lg-zoomed")?n.scale=1:n.scale=n.getScale(o),n.setPageCords(e),n.beginZoom(n.scale),n.zoomImage(n.scale,n.scale-s,!0,!0)}},50),setTimeout(function(){n.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},60),setTimeout(function(){n.zoomInProgress=!1},Ty+110)}},i.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),n=this.core.galleryItems[t].width;return n?parseFloat(n):e.get().naturalWidth},i.prototype.getActualSizeScale=function(t,e){var n,r;return t>=e?(n=t/e,r=n||2):r=1,r},i.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=t.get().offsetWidth,n=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(n,e)},i.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.touches[0].pageX,e.y=t.pageY||t.touches[0].pageY;else{var n=this.core.$content.get().getBoundingClientRect();e.x=n.width/2+n.left,e.y=n.height/2+this.scrollTop+n.top}return e},i.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},i.prototype.manageActualPixelClassNames=function(){var t=this.core.getElementById("lg-actual-size");t.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},i.prototype.beginZoom=function(t){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),t>1},i.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},i.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",function(n){t.$LG(n.target).hasClass("lg-image")&&t.setActualSize(t.core.index,n)}),this.core.outer.on("touchstart.lg",function(n){var r=t.$LG(n.target);n.touches.length===1&&r.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,n.preventDefault(),t.setActualSize(t.core.index,n)):e=setTimeout(function(){e=null},300))}),this.core.LGel.on(Kr.containerResize+".zoom "+Kr.rotateRight+".zoom "+Kr.rotateLeft+".zoom "+Kr.flipHorizontal+".zoom "+Kr.flipVertical+".zoom",function(){if(!(!t.core.lgOpened||!t.isImageSlide(t.core.index)||t.core.touchAction)){var n=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();t.top=0,t.left=0,t.setZoomEssentials(),t.setZoomSwipeStyles(n,{x:0,y:0}),t.positionChanged=!0}}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){if(t.isImageSlide(t.core.index)){var n=0;t.imageReset&&(t.resetImageTranslate(t.core.index),n=50),setTimeout(function(){var r=t.scale-t.settings.scale;r<1&&(r=1),t.beginZoom(r),t.zoomImage(r,-t.settings.scale,!0,!t.settings.infiniteZoom)},n)}}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){t.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){t.setActualSize(t.core.index)}),this.core.LGel.on(Kr.beforeOpen+".zoom",function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(Kr.afterOpen+".zoom",function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1}),this.core.LGel.on(Kr.afterSlide+".zoom",function(n){var r=n.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.zoomInProgress=!1,t.resetZoom(r),t.resetImageTranslate(r),t.isImageSlide(t.core.index)&&t.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},i.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var t=this.scale+this.settings.scale;this.settings.infiniteZoom||(t=this.getScale(t)),this.beginZoom(t),this.zoomImage(t,Math.min(this.settings.scale,t-this.scale),!0,!this.settings.infiniteZoom)}},i.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),n=this.core.getSlideItem(t!==void 0?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),n.find(".lg-img-wrap").first().removeAttr("style"),n.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},i.prototype.getTouchDistance=function(t){return Math.sqrt((t.touches[0].pageX-t.touches[1].pageX)*(t.touches[0].pageX-t.touches[1].pageX)+(t.touches[0].pageY-t.touches[1].pageY)*(t.touches[0].pageY-t.touches[1].pageY))},i.prototype.pinchZoom=function(){var t=this,e=0,n=!1,r=1,o=0,s=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",function(a){if(s=t.core.getSlideItem(t.core.index),!!t.isImageSlide(t.core.index)&&a.touches.length===2){if(a.preventDefault(),t.core.outer.hasClass("lg-first-slide-loading"))return;r=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.setPageCords(a),t.resetImageTranslate(t.core.index),t.core.touchAction="pinch",e=t.getTouchDistance(a)}}),this.core.$inner.on("touchmove.lg",function(a){if(a.touches.length===2&&t.core.touchAction==="pinch"&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){a.preventDefault();var c=t.getTouchDistance(a),u=e-c;if(!n&&Math.abs(u)>5&&(n=!0),n){o=t.scale;var f=Math.max(1,r+-u*.02);t.scale=Math.round((f+Number.EPSILON)*100)/100;var v=t.scale-o;t.zoomImage(t.scale,Math.round((v+Number.EPSILON)*100)/100,!1,!1)}}}),this.core.$inner.on("touchend.lg",function(a){if(t.core.touchAction==="pinch"&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){if(n=!1,e=0,t.scale<=1)t.resetZoom();else{var c=t.getCurrentImageActualSizeScale();if(t.scale>=c){var u=c-t.scale;u===0&&(u=.01),t.zoomImage(c,u,!1,!0)}t.manageActualPixelClassNames(),t.core.outer.addClass("lg-zoomed")}t.core.touchAction=void 0}})},i.prototype.touchendZoom=function(t,e,n,r,o){var s=e.x-t.x,a=e.y-t.y,c=Math.abs(s)/o+1,u=Math.abs(a)/o+1;c>2&&(c+=1),u>2&&(u+=1),s=s*c,a=a*u;var f=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),v={};v.x=this.left+s,v.y=this.top+a;var b=this.getPossibleSwipeDragCords();(Math.abs(s)>15||Math.abs(a)>15)&&(r&&(this.isBeyondPossibleTop(v.y,b.minY)?v.y=b.minY:this.isBeyondPossibleBottom(v.y,b.maxY)&&(v.y=b.maxY)),n&&(this.isBeyondPossibleLeft(v.x,b.minX)?v.x=b.minX:this.isBeyondPossibleRight(v.x,b.maxX)&&(v.x=b.maxX)),r?this.top=v.y:v.y=this.top,n?this.left=v.x:v.x=this.left,this.setZoomSwipeStyles(f,v),this.positionChanged=!0)},i.prototype.getZoomSwipeCords=function(t,e,n,r,o){var s={};if(r){if(s.y=this.top+(e.y-t.y),this.isBeyondPossibleTop(s.y,o.minY)){var a=o.minY-s.y;s.y=o.minY-a/6}else if(this.isBeyondPossibleBottom(s.y,o.maxY)){var c=s.y-o.maxY;s.y=o.maxY+c/6}}else s.y=this.top;if(n){if(s.x=this.left+(e.x-t.x),this.isBeyondPossibleLeft(s.x,o.minX)){var u=o.minX-s.x;s.x=o.minX-u/6}else if(this.isBeyondPossibleRight(s.x,o.maxX)){var f=s.x-o.maxX;s.x=o.maxX+f/6}}else s.x=this.left;return s},i.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},i.prototype.isBeyondPossibleRight=function(t,e){return t<=e},i.prototype.isBeyondPossibleTop=function(t,e){return t>=e},i.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},i.prototype.isImageSlide=function(t){var e=this.core.galleryItems[t];return this.core.getSlideType(e)==="image"},i.prototype.getPossibleSwipeDragCords=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),n=this.core.mediaContainerPosition.bottom,r=e.get().getBoundingClientRect(),o=r.height,s=r.width;t&&(o=o+t*o,s=s+t*s);var a=(o-this.containerRect.height)/2,c=(this.containerRect.height-o)/2+n,u=(s-this.containerRect.width)/2,f=(this.containerRect.width-s)/2,v={minY:a,maxY:c,minX:u,maxX:f};return v},i.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},i.prototype.zoomSwipe=function(){var t=this,e={},n={},r=!1,o=!1,s=!1,a=new Date,c=new Date,u,f,v=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(b){if(t.isImageSlide(t.core.index)&&(v=t.core.getSlideItem(t.core.index),(t.$LG(b.target).hasClass("lg-item")||v.get().contains(b.target))&&b.touches.length===1&&t.core.outer.hasClass("lg-zoomed"))){b.preventDefault(),a=new Date,t.core.touchAction="zoomSwipe",f=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();var O=t.getDragAllowedAxises(0);s=O.allowY,o=O.allowX,(o||s)&&(e=t.getSwipeCords(b)),u=t.getPossibleSwipeDragCords(),t.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(b){if(b.touches.length===1&&t.core.touchAction==="zoomSwipe"&&(t.$LG(b.target).hasClass("lg-item")||v.get().contains(b.target))){b.preventDefault(),t.core.touchAction="zoomSwipe",n=t.getSwipeCords(b);var O=t.getZoomSwipeCords(e,n,o,s,u);(Math.abs(n.x-e.x)>15||Math.abs(n.y-e.y)>15)&&(r=!0,t.setZoomSwipeStyles(f,O))}}),this.core.$inner.on("touchend.lg",function(b){if(t.core.touchAction==="zoomSwipe"&&(t.$LG(b.target).hasClass("lg-item")||v.get().contains(b.target))){if(b.preventDefault(),t.core.touchAction=void 0,t.core.outer.removeClass("lg-zoom-dragging"),!r)return;r=!1,c=new Date;var O=c.valueOf()-a.valueOf();t.touchendZoom(e,n,o,s,O)}})},i.prototype.zoomDrag=function(){var t=this,e={},n={},r=!1,o=!1,s=!1,a=!1,c,u,f,v;this.core.outer.on("mousedown.lg.zoom",function(b){if(t.isImageSlide(t.core.index)){var O=t.core.getSlideItem(t.core.index);if(t.$LG(b.target).hasClass("lg-item")||O.get().contains(b.target)){c=new Date,v=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();var V=t.getDragAllowedAxises(0);a=V.allowY,s=V.allowX,t.core.outer.hasClass("lg-zoomed")&&t.$LG(b.target).hasClass("lg-object")&&(s||a)&&(b.preventDefault(),e=t.getDragCords(b),f=t.getPossibleSwipeDragCords(),r=!0,t.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(b){if(r){o=!0,n=t.getDragCords(b);var O=t.getZoomSwipeCords(e,n,s,a,f);t.setZoomSwipeStyles(v,O)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(b){if(r){if(u=new Date,r=!1,t.core.outer.removeClass("lg-zoom-dragging"),o&&(e.x!==n.x||e.y!==n.y)){n=t.getDragCords(b);var O=u.valueOf()-c.valueOf();t.touchendZoom(e,n,s,a,O)}o=!1}t.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},i.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},i.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},i}(),O2=E7;var Ds=function(){return Ds=Object.assign||function(t){for(var e,n=1,r=arguments.length;n"}else if(s.vimeo){var f="lg-vimeo"+n,V=D7(this.settings.vimeoPlayerParams,s);o='"}else if(s.wistia){var K="lg-wistia"+n,V=xy(this.settings.wistiaPlayerParams);V=V?"?"+V:"",o='"}else if(s.html5){for(var P="",j=0;j';if(r.tracks)for(var ce=function(qe){var Ge="",Et=r.tracks[qe];Object.keys(Et||{}).forEach(function(ht){Ge+=ht+'="'+Et[ht]+'" '}),P+=""},j=0;j + msallowfullscreen`;if(s.youtube){var f="lg-youtube"+n,v=k7(s,this.settings.youTubePlayerParams),b=A7(t),O=b?"//www.youtube-nocookie.com/":"//www.youtube.com/";o='"}else if(s.vimeo){var f="lg-vimeo"+n,V=D7(this.settings.vimeoPlayerParams,s);o='"}else if(s.wistia){var K="lg-wistia"+n,V=xy(this.settings.wistiaPlayerParams);V=V?"?"+V:"",o='"}else if(s.html5){for(var P="",j=0;j';if(r.tracks)for(var ce=function($e){var He="",Et=r.tracks[$e];Object.keys(Et||{}).forEach(function(ht){He+=ht+'="'+Et[ht]+'" '}),P+=""},j=0;j `+P+` Your browser does not support HTML5 video. - `}return o},i.prototype.appendVideos=function(t,e){var n,r=this.getVideoHtml(e.src,e.addClass,e.index,e.html5Video);t.find(".lg-video-cont").append(r);var o=t.find(".lg-video-object").first();if(e.html5Video&&o.on("mousedown.lg.video",function(s){s.stopPropagation()}),this.settings.videojs&&(!((n=this.core.galleryItems[e.index].__slideVideoInfo)===null||n===void 0)&&n.html5))try{return videojs(o.get(),this.settings.videojsOptions)}catch{console.error("lightGallery:- Make sure you have included videojs")}},i.prototype.gotoNextSlideOnVideoEnd=function(t,e){var n=this,r=this.core.getSlideItem(e).find(".lg-video-object").first(),o=this.core.galleryItems[e].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd){if(o.html5)r.on("ended",function(){n.core.goToNextSlide()});else if(o.vimeo)try{new Vimeo.Player(r.get()).on("ended",function(){n.core.goToNextSlide()})}catch{console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(o.wistia)try{window._wq=window._wq||[],window._wq.push({id:r.attr("id"),onReady:function(s){s.bind("end",function(){n.core.goToNextSlide()})}})}catch{console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},i.prototype.controlVideo=function(t,e){var n=this.core.getSlideItem(t).find(".lg-video-object").first(),r=this.core.galleryItems[t].__slideVideoInfo||{};if(n.get()){if(r.youtube)try{n.get().contentWindow.postMessage('{"event":"command","func":"'+e+'Video","args":""}',"*")}catch(o){console.error("lightGallery:- "+o)}else if(r.vimeo)try{new Vimeo.Player(n.get())[e]()}catch{console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(r.html5)if(this.settings.videojs)try{videojs(n.get())[e]()}catch{console.error("lightGallery:- Make sure you have included videojs")}else n.get()[e]();else if(r.wistia)try{window._wq=window._wq||[],window._wq.push({id:n.attr("id"),onReady:function(o){o[e]()}})}catch{console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},i.prototype.loadVideoOnPosterClick=function(t,e){var n=this;if(t.hasClass("lg-video-loaded"))e&&this.playVideo(this.core.index);else if(t.hasClass("lg-has-video"))this.playVideo(this.core.index);else{t.addClass("lg-has-video");var r=void 0,o=this.core.galleryItems[this.core.index].src,s=this.core.galleryItems[this.core.index].video;s&&(r=typeof s=="string"?JSON.parse(s):s);var a=this.appendVideos(t,{src:o,addClass:"",index:this.core.index,html5Video:r});this.gotoNextSlideOnVideoEnd(o,this.core.index);var c=t.find(".lg-object").first().get();t.find(".lg-video-cont").first().append(c),t.addClass("lg-video-loading"),a&&a.ready(function(){a.on("loadedmetadata",function(){n.onVideoLoadAfterPosterClick(t,n.core.index)})}),t.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){n.onVideoLoadAfterPosterClick(t,n.core.index)},50)})}},i.prototype.onVideoLoadAfterPosterClick=function(t,e){t.addClass("lg-video-loaded"),this.playVideo(e)},i.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},i}(),Xh=P7;var R7=["myiframe"];function V7(i,t){if(i&1&&y(0,"app-img",5),i&2){let e=m().$implicit,n=m(2);l("alt",n.defaultTile||"")("src",n.url()+e[n.thumbnailKey])}}function L7(i,t){if(i&1&&y(0,"app-img",6),i&2){let e=m().$implicit,n=m(2);l("alt",n.defaultTile||"")("src",n.url()+e[n.thumbnailKey])}}function F7(i,t){if(i&1&&(p(0,"a",3),g(1,V7,1,2,"app-img",4)(2,L7,1,2),h()),i&2){let e=t.$implicit,n=m(2);l("href",n.previewUrl+e[n.thumbnailKey],Ue)("title",n.defaultTile||""),d(),Je(1,n.type=="backdrops"?1:2)}}function N7(i,t){if(i&1&&(p(0,"lightgallery",2),Yt(1,F7,3,3,"a",3,di),h()),i&2){let e=m();l("settings",e.settings),d(),Zt(e.images)}}function B7(i,t){if(i&1&&(p(0,"a",7)(1,"div",8),y(2,"app-img",9),p(3,"span",10),_(4),h(),y(5,"i",11),p(6,"span",12),_(7),h(),p(8,"span",13),_(9),h(),p(10,"span",14),_(11),ct(12,"date"),h()()()),i&2){let e=t.$implicit,n=m(2);l("href",n.youtubeEmbedUrl+e.key,Ue),d(),l("title",e.name),d(),l("src",n.thumbnailUrl+e.key+"/maxresdefault.jpg"),d(2),xn("",e.name," | ",e.site,""),d(2),l("title",e.size+"p Video"),d(),z(e.size>=720?"HD":"SD"),d(2),z(e.type),d(2),z(un(12,9,e.published_at,"mediumDate"))}}function z7(i,t){if(i&1&&(p(0,"lightgallery",2),Yt(1,B7,13,12,"a",7,di),h()),i&2){let e=m();l("settings",e.settings2),d(),Zt(e.videos)}}var Jh=(()=>{let t=class t{checkvideo(){}constructor(){this.images=void 0,this.videos=void 0,this.defaultTile="",this.viewType="grid",this.url=st("http://image.tmdb.org/t/p/w300"),this.urlorig="http://image.tmdb.org/t/p/w300",this.previewUrl="http://image.tmdb.org/t/p/original",this.thumbnailUrl="https://i.ytimg.com/vi/",this.youtubeEmbedUrl="https://www.youtube.com/watch?v=",this.settings={counter:!1,plugins:[O2]},this.settings2={counter:!1,plugins:[Xh]},this.activeIndex=0,this.currentVideo="",this.responsiveOptions=[{breakpoint:"1500px",numVisible:5},{breakpoint:"1024px",numVisible:3},{breakpoint:"768px",numVisible:2},{breakpoint:"560px",numVisible:1}]}imageClick(n){this.activeIndex=n,this.displayBasic=!0}playVideo(n,r){let o="https://www.youtube.com/embed/",s=document.getElementById("iframePlayer");this.activeIndex=n,this.displayBasic=!0,this.currentVideo=r,setTimeout(()=>{s.src=o+r},3e3)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-media-gallery"]],viewQuery:function(r,o){if(r&1&&oe(R7,5),r&2){let s;q(s=W())&&(o.player=s.first)}},inputs:{images:"images",videos:"videos",thumbnailKey:"thumbnailKey",defaultTile:"defaultTile",type:"type"},standalone:!0,features:[R],decls:3,vars:1,consts:[[1,"media-gallery"],["class","grid-container",3,"settings"],[1,"grid-container",3,"settings"],[3,"href","title"],["style","aspect-ratio: 16/9;",3,"alt","src"],[2,"aspect-ratio","16/9",3,"alt","src"],[2,"aspect-ratio","0.667",3,"alt","src"],[3,"href"],[1,"video-thumbnail",3,"title"],[2,"aspect-ratio","16/9",3,"src"],[1,"title"],[1,"pi","pi-play"],[1,"tag",3,"title"],[1,"type"],[1,"date"]],template:function(r,o){r&1&&(p(0,"div",0),g(1,N7,3,1,"lightgallery",1)(2,z7,3,1),h()),r&2&&(d(),Je(1,o.images?1:o.videos?2:-1))},dependencies:[Kh,nn,yt,$,Yh,Qh,Tr],styles:[".top-titles[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.top-titles[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:1rem;height:1rem}.top-titles[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;outline:0;background-color:transparent}.top-titles[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active svg[_ngcontent-%COMP%]{fill:var(--accent)}.top-titles[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:var(--accent)}.top-titles[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#fff}.grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:10px;width:100%;margin:0 auto;max-width:1280px}.grid-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]{position:relative;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:26%;left:45%;font-size:1.5rem;padding:.3rem;border-radius:50%;display:flex;align-items:center;justify-content:center;transform:scale(0);transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal;font-size:.9rem}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%]{position:absolute;left:5px;top:5px;background-color:#000;color:#fff;font-size:.7rem;padding:0 4px;font-weight:600;border-radius:2px;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{position:absolute;right:5px;top:5px;background-color:#000;color:#fff;font-size:.7rem;padding:0 4px;font-weight:600;border-radius:2px;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:.6rem;color:var(--accent)}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:brightness(50%);border-radius:5px}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:var(--accent);transform:scale(1)}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover .tag[_ngcontent-%COMP%]{color:var(--accent)}img.grid-thumbnail[_ngcontent-%COMP%]{width:100%;object-fit:cover}@media screen and (max-width: 991px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}@media screen and (max-width: 767px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media screen and (max-width: 575px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media screen and (max-width: 381px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}}"]});let i=t;return i})();var qa=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronUpIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var U7=["itemsContainer"],j7=["indicatorContent"];function H7(i,t){i&1&&ie(0)}function G7(i,t){if(i&1&&(p(0,"div",11),Ae(1),g(2,H7,1,0,"ng-container",12),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.headerTemplate)}}function $7(i,t){i&1&&y(0,"ChevronLeftIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function q7(i,t){i&1&&y(0,"ChevronUpIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function W7(i,t){if(i&1&&(Z(0),g(1,$7,1,1,"ChevronLeftIcon",16)(2,q7,1,1,"ChevronUpIcon",16),X()),i&2){let e=m(2);d(),l("ngIf",!e.isVertical()),d(),l("ngIf",e.isVertical())}}function K7(i,t){}function Q7(i,t){i&1&&g(0,K7,0,0,"ng-template")}function Y7(i,t){if(i&1&&(p(0,"span",18),g(1,Q7,1,0,null,12),h()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.previousIconTemplate)}}var Z7=i=>({"p-carousel-prev p-link":!0,"p-disabled":i});function X7(i,t){if(i&1){let e=G();p(0,"button",13),A("click",function(r){S(e);let o=m();return E(o.navBackward(r))}),g(1,W7,3,2,"ng-container",14)(2,Y7,2,1,"span",15),h()}if(i&2){let e=m();l("ngClass",H(5,Z7,e.isBackwardNavDisabled()))("disabled",e.isBackwardNavDisabled()),T("aria-label",e.ariaPrevButtonLabel()),d(),l("ngIf",!e.previousIconTemplate),d(),l("ngIf",e.previousIconTemplate)}}function J7(i,t){i&1&&ie(0)}var M2=(i,t,e)=>({"p-carousel-item p-carousel-item-cloned":!0,"p-carousel-item-active":i,"p-carousel-item-start":t,"p-carousel-item-end":e}),Sy=i=>({$implicit:i});function eB(i,t){if(i&1&&(p(0,"div",2),g(1,J7,1,0,"ng-container",19),h()),i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",kt(6,M2,r.totalShiftedItems*-1===r.value.length,n===0,r.clonedItemsForStarting.length-1===n)),T("aria-hidden",r.totalShiftedItems*-1!==r.value.length)("aria-label",r.ariaSlideNumber(n))("aria-roledescription",r.ariaSlideLabel()),d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(10,Sy,e))}}function tB(i,t){i&1&&ie(0)}var iB=(i,t,e)=>({"p-carousel-item":!0,"p-carousel-item-active":i,"p-carousel-item-start":t,"p-carousel-item-end":e});function nB(i,t){if(i&1&&(p(0,"div",2),g(1,tB,1,0,"ng-container",19),h()),i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",kt(6,iB,r.firstIndex()<=n&&r.lastIndex()>=n,r.firstIndex()===n,r.lastIndex()===n)),T("aria-hidden",r.totalShiftedItems*-1!==r.value.length)("aria-label",r.ariaSlideNumber(n))("aria-roledescription",r.ariaSlideLabel()),d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(10,Sy,e))}}function rB(i,t){i&1&&ie(0)}function oB(i,t){if(i&1&&(p(0,"div",2),g(1,rB,1,0,"ng-container",19),h()),i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",kt(3,M2,r.totalShiftedItems*-1===r.numVisible,n===0,r.clonedItemsForFinishing.length-1===n)),d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(7,Sy,e))}}function sB(i,t){i&1&&y(0,"ChevronRightIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function aB(i,t){i&1&&y(0,"ChevronDownIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function lB(i,t){if(i&1&&(Z(0),g(1,sB,1,1,"ChevronRightIcon",16)(2,aB,1,1,"ChevronDownIcon",16),X()),i&2){let e=m(2);d(),l("ngIf",!e.isVertical()),d(),l("ngIf",e.isVertical())}}function cB(i,t){}function dB(i,t){i&1&&g(0,cB,0,0,"ng-template")}function uB(i,t){if(i&1&&(p(0,"span",18),g(1,dB,1,0,null,12),h()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.nextIconTemplate)}}var pB=i=>({"p-carousel-next p-link":!0,"p-disabled":i});function hB(i,t){if(i&1){let e=G();p(0,"button",13),A("click",function(r){S(e);let o=m();return E(o.navForward(r))}),g(1,lB,3,2,"ng-container",14)(2,uB,2,1,"span",15),h()}if(i&2){let e=m();l("ngClass",H(5,pB,e.isForwardNavDisabled()))("disabled",e.isForwardNavDisabled()),T("aria-label",e.ariaNextButtonLabel()),d(),l("ngIf",!e.nextIconTemplate),d(),l("ngIf",e.nextIconTemplate)}}var mB=i=>({"p-carousel-indicator":!0,"p-highlight":i});function fB(i,t){if(i&1){let e=G();p(0,"li",2)(1,"button",22),A("click",function(r){let s=S(e).index,a=m(2);return E(a.onDotClick(r,s))}),h()()}if(i&2){let e=t.index,n=m(2);l("ngClass",H(9,mB,n._page===e)),T("data-pc-section","indicator"),d(),U(n.indicatorStyleClass),l("ngClass","p-link")("ngStyle",n.indicatorStyle)("tabindex",n._page===e?0:-1),T("aria-label",n.ariaPageLabel(e+1))("aria-current",n._page===e?"page":void 0)}}function gB(i,t){if(i&1){let e=G();p(0,"ul",20,21),A("keydown",function(r){S(e);let o=m();return E(o.onIndicatorKeydown(r))}),g(2,fB,2,11,"li",8),h()}if(i&2){let e=m();U(e.indicatorsContentClass),l("ngClass","p-carousel-indicators p-reset")("ngStyle",e.indicatorsContentStyle),d(2),l("ngForOf",e.totalDotsArray())}}function _B(i,t){i&1&&ie(0)}function vB(i,t){if(i&1&&(p(0,"div",23),Ae(1,1),g(2,_B,1,0,"ng-container",12),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.footerTemplate)}}var yB=[[["p-header"]],[["p-footer"]]],bB=(i,t)=>({"p-carousel p-component":!0,"p-carousel-vertical":i,"p-carousel-horizontal":t}),CB=i=>({height:i}),IB=["p-header","p-footer"],Fo=(()=>{class i{el;zone;cd;renderer;document;platformId;config;get page(){return this._page}set page(e){this.isCreated&&e!==this._page&&(this.autoplayInterval&&this.stopAutoplay(),e>this._page&&e<=this.totalDots()-1?this.step(-1,e):e{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"previousicon":this.previousIconTemplate=e.template;break;case"nexticon":this.nextIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}}),this.cd.detectChanges()}ngAfterContentChecked(){if(ut(this.platformId)){let e=this.isCircular(),n=this.totalShiftedItems;if(this.value&&this.itemsContainer&&(this.prevState.numScroll!==this._numScroll||this.prevState.numVisible!==this._numVisible||this.prevState.value.length!==this.value.length)){this.autoplayInterval&&this.stopAutoplay(!1),this.remainingItems=(this.value.length-this._numVisible)%this._numScroll;let r=this._page;this.totalDots()!==0&&r>=this.totalDots()&&(r=this.totalDots()-1,this._page=r,this.onPage.emit({page:this.page})),n=r*this._numScroll*-1,e&&(n-=this._numVisible),r===this.totalDots()-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this._numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n),this._oldNumScroll=this._numScroll,this.prevState.numScroll=this._numScroll,this.prevState.numVisible=this._numVisible,this.prevState.value=[...this._value],this.totalDots()>0&&this.itemsContainer.nativeElement&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?`translate3d(0, ${n*(100/this._numVisible)}%, 0)`:`translate3d(${n*(100/this._numVisible)}%, 0, 0)`),this.isCreated=!0,this.autoplayInterval&&this.isAutoplay()&&this.startAutoplay()}e&&(this.page===0?n=-1*this._numVisible:n===0&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n))}}createStyle(){this.carouselStyle||(this.carouselStyle=this.renderer.createElement("style"),this.carouselStyle.type="text/css",this.renderer.appendChild(this.document.head,this.carouselStyle));let e=` + `}return o},i.prototype.appendVideos=function(t,e){var n,r=this.getVideoHtml(e.src,e.addClass,e.index,e.html5Video);t.find(".lg-video-cont").append(r);var o=t.find(".lg-video-object").first();if(e.html5Video&&o.on("mousedown.lg.video",function(s){s.stopPropagation()}),this.settings.videojs&&(!((n=this.core.galleryItems[e.index].__slideVideoInfo)===null||n===void 0)&&n.html5))try{return videojs(o.get(),this.settings.videojsOptions)}catch{console.error("lightGallery:- Make sure you have included videojs")}},i.prototype.gotoNextSlideOnVideoEnd=function(t,e){var n=this,r=this.core.getSlideItem(e).find(".lg-video-object").first(),o=this.core.galleryItems[e].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd){if(o.html5)r.on("ended",function(){n.core.goToNextSlide()});else if(o.vimeo)try{new Vimeo.Player(r.get()).on("ended",function(){n.core.goToNextSlide()})}catch{console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(o.wistia)try{window._wq=window._wq||[],window._wq.push({id:r.attr("id"),onReady:function(s){s.bind("end",function(){n.core.goToNextSlide()})}})}catch{console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},i.prototype.controlVideo=function(t,e){var n=this.core.getSlideItem(t).find(".lg-video-object").first(),r=this.core.galleryItems[t].__slideVideoInfo||{};if(n.get()){if(r.youtube)try{n.get().contentWindow.postMessage('{"event":"command","func":"'+e+'Video","args":""}',"*")}catch(o){console.error("lightGallery:- "+o)}else if(r.vimeo)try{new Vimeo.Player(n.get())[e]()}catch{console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(r.html5)if(this.settings.videojs)try{videojs(n.get())[e]()}catch{console.error("lightGallery:- Make sure you have included videojs")}else n.get()[e]();else if(r.wistia)try{window._wq=window._wq||[],window._wq.push({id:n.attr("id"),onReady:function(o){o[e]()}})}catch{console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},i.prototype.loadVideoOnPosterClick=function(t,e){var n=this;if(t.hasClass("lg-video-loaded"))e&&this.playVideo(this.core.index);else if(t.hasClass("lg-has-video"))this.playVideo(this.core.index);else{t.addClass("lg-has-video");var r=void 0,o=this.core.galleryItems[this.core.index].src,s=this.core.galleryItems[this.core.index].video;s&&(r=typeof s=="string"?JSON.parse(s):s);var a=this.appendVideos(t,{src:o,addClass:"",index:this.core.index,html5Video:r});this.gotoNextSlideOnVideoEnd(o,this.core.index);var c=t.find(".lg-object").first().get();t.find(".lg-video-cont").first().append(c),t.addClass("lg-video-loading"),a&&a.ready(function(){a.on("loadedmetadata",function(){n.onVideoLoadAfterPosterClick(t,n.core.index)})}),t.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){n.onVideoLoadAfterPosterClick(t,n.core.index)},50)})}},i.prototype.onVideoLoadAfterPosterClick=function(t,e){t.addClass("lg-video-loaded"),this.playVideo(e)},i.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},i}(),Xh=P7;var R7=["myiframe"];function V7(i,t){if(i&1&&y(0,"app-img",5),i&2){let e=m().$implicit,n=m(2);l("alt",n.defaultTile||"")("src",n.url()+e[n.thumbnailKey])}}function L7(i,t){if(i&1&&y(0,"app-img",6),i&2){let e=m().$implicit,n=m(2);l("alt",n.defaultTile||"")("src",n.url()+e[n.thumbnailKey])}}function F7(i,t){if(i&1&&(p(0,"a",3),g(1,V7,1,2,"app-img",4)(2,L7,1,2),h()),i&2){let e=t.$implicit,n=m(2);l("href",n.previewUrl+e[n.thumbnailKey],qe)("title",n.defaultTile||""),d(),Je(1,n.type=="backdrops"?1:2)}}function N7(i,t){if(i&1&&(p(0,"lightgallery",2),Yt(1,F7,3,3,"a",3,di),h()),i&2){let e=m();l("settings",e.settings),d(),Zt(e.images)}}function B7(i,t){if(i&1&&(p(0,"a",7)(1,"div",8),y(2,"app-img",9),p(3,"span",10),_(4),h(),y(5,"i",11),p(6,"span",12),_(7),h(),p(8,"span",13),_(9),h(),p(10,"span",14),_(11),ct(12,"date"),h()()()),i&2){let e=t.$implicit,n=m(2);l("href",n.youtubeEmbedUrl+e.key,qe),d(),l("title",e.name),d(),l("src",n.thumbnailUrl+e.key+"/maxresdefault.jpg"),d(2),xn("",e.name," | ",e.site,""),d(2),l("title",e.size+"p Video"),d(),z(e.size>=720?"HD":"SD"),d(2),z(e.type),d(2),z(un(12,9,e.published_at,"mediumDate"))}}function z7(i,t){if(i&1&&(p(0,"lightgallery",2),Yt(1,B7,13,12,"a",7,di),h()),i&2){let e=m();l("settings",e.settings2),d(),Zt(e.videos)}}var Jh=(()=>{let t=class t{checkvideo(){}constructor(){this.images=void 0,this.videos=void 0,this.defaultTile="",this.viewType="grid",this.url=st("http://image.tmdb.org/t/p/w300"),this.urlorig="http://image.tmdb.org/t/p/w300",this.previewUrl="http://image.tmdb.org/t/p/original",this.thumbnailUrl="https://i.ytimg.com/vi/",this.youtubeEmbedUrl="https://www.youtube.com/watch?v=",this.settings={counter:!1,plugins:[O2]},this.settings2={counter:!1,plugins:[Xh]},this.activeIndex=0,this.currentVideo="",this.responsiveOptions=[{breakpoint:"1500px",numVisible:5},{breakpoint:"1024px",numVisible:3},{breakpoint:"768px",numVisible:2},{breakpoint:"560px",numVisible:1}]}imageClick(n){this.activeIndex=n,this.displayBasic=!0}playVideo(n,r){let o="https://www.youtube.com/embed/",s=document.getElementById("iframePlayer");this.activeIndex=n,this.displayBasic=!0,this.currentVideo=r,setTimeout(()=>{s.src=o+r},3e3)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-media-gallery"]],viewQuery:function(r,o){if(r&1&&oe(R7,5),r&2){let s;q(s=W())&&(o.player=s.first)}},inputs:{images:"images",videos:"videos",thumbnailKey:"thumbnailKey",defaultTile:"defaultTile",type:"type"},standalone:!0,features:[R],decls:3,vars:1,consts:[[1,"media-gallery"],["class","grid-container",3,"settings"],[1,"grid-container",3,"settings"],[3,"href","title"],["style","aspect-ratio: 16/9;",3,"alt","src"],[2,"aspect-ratio","16/9",3,"alt","src"],[2,"aspect-ratio","0.667",3,"alt","src"],[3,"href"],[1,"video-thumbnail",3,"title"],[2,"aspect-ratio","16/9",3,"src"],[1,"title"],[1,"pi","pi-play"],[1,"tag",3,"title"],[1,"type"],[1,"date"]],template:function(r,o){r&1&&(p(0,"div",0),g(1,N7,3,1,"lightgallery",1)(2,z7,3,1),h()),r&2&&(d(),Je(1,o.images?1:o.videos?2:-1))},dependencies:[Kh,nn,yt,$,Yh,Qh,Vn],styles:[".top-titles[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.top-titles[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:1rem;height:1rem}.top-titles[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;outline:0;background-color:transparent}.top-titles[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active svg[_ngcontent-%COMP%]{fill:var(--accent)}.top-titles[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:var(--accent)}.top-titles[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#fff}.grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:10px;width:100%;margin:0 auto;max-width:1280px}.grid-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]{position:relative;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:26%;left:45%;font-size:1.5rem;padding:.3rem;border-radius:50%;display:flex;align-items:center;justify-content:center;transform:scale(0);transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal;font-size:.9rem}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%]{position:absolute;left:5px;top:5px;background-color:#000;color:#fff;font-size:.7rem;padding:0 4px;font-weight:600;border-radius:2px;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{position:absolute;right:5px;top:5px;background-color:#000;color:#fff;font-size:.7rem;padding:0 4px;font-weight:600;border-radius:2px;transition:all .3s}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:.6rem;color:var(--accent)}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:brightness(50%);border-radius:5px}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:var(--accent);transform:scale(1)}.grid-container[_ngcontent-%COMP%] .video-thumbnail[_ngcontent-%COMP%]:hover .tag[_ngcontent-%COMP%]{color:var(--accent)}img.grid-thumbnail[_ngcontent-%COMP%]{width:100%;object-fit:cover}@media screen and (max-width: 991px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}@media screen and (max-width: 767px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media screen and (max-width: 575px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media screen and (max-width: 381px){.grid-container[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}}"]});let i=t;return i})();var qa=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["ChevronUpIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var U7=["itemsContainer"],j7=["indicatorContent"];function H7(i,t){i&1&&ie(0)}function G7(i,t){if(i&1&&(p(0,"div",11),Ae(1),g(2,H7,1,0,"ng-container",12),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.headerTemplate)}}function $7(i,t){i&1&&y(0,"ChevronLeftIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function q7(i,t){i&1&&y(0,"ChevronUpIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function W7(i,t){if(i&1&&(Z(0),g(1,$7,1,1,"ChevronLeftIcon",16)(2,q7,1,1,"ChevronUpIcon",16),X()),i&2){let e=m(2);d(),l("ngIf",!e.isVertical()),d(),l("ngIf",e.isVertical())}}function K7(i,t){}function Q7(i,t){i&1&&g(0,K7,0,0,"ng-template")}function Y7(i,t){if(i&1&&(p(0,"span",18),g(1,Q7,1,0,null,12),h()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.previousIconTemplate)}}var Z7=i=>({"p-carousel-prev p-link":!0,"p-disabled":i});function X7(i,t){if(i&1){let e=G();p(0,"button",13),A("click",function(r){S(e);let o=m();return E(o.navBackward(r))}),g(1,W7,3,2,"ng-container",14)(2,Y7,2,1,"span",15),h()}if(i&2){let e=m();l("ngClass",H(5,Z7,e.isBackwardNavDisabled()))("disabled",e.isBackwardNavDisabled()),T("aria-label",e.ariaPrevButtonLabel()),d(),l("ngIf",!e.previousIconTemplate),d(),l("ngIf",e.previousIconTemplate)}}function J7(i,t){i&1&&ie(0)}var M2=(i,t,e)=>({"p-carousel-item p-carousel-item-cloned":!0,"p-carousel-item-active":i,"p-carousel-item-start":t,"p-carousel-item-end":e}),Sy=i=>({$implicit:i});function eB(i,t){if(i&1&&(p(0,"div",2),g(1,J7,1,0,"ng-container",19),h()),i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",kt(6,M2,r.totalShiftedItems*-1===r.value.length,n===0,r.clonedItemsForStarting.length-1===n)),T("aria-hidden",r.totalShiftedItems*-1!==r.value.length)("aria-label",r.ariaSlideNumber(n))("aria-roledescription",r.ariaSlideLabel()),d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(10,Sy,e))}}function tB(i,t){i&1&&ie(0)}var iB=(i,t,e)=>({"p-carousel-item":!0,"p-carousel-item-active":i,"p-carousel-item-start":t,"p-carousel-item-end":e});function nB(i,t){if(i&1&&(p(0,"div",2),g(1,tB,1,0,"ng-container",19),h()),i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",kt(6,iB,r.firstIndex()<=n&&r.lastIndex()>=n,r.firstIndex()===n,r.lastIndex()===n)),T("aria-hidden",r.totalShiftedItems*-1!==r.value.length)("aria-label",r.ariaSlideNumber(n))("aria-roledescription",r.ariaSlideLabel()),d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(10,Sy,e))}}function rB(i,t){i&1&&ie(0)}function oB(i,t){if(i&1&&(p(0,"div",2),g(1,rB,1,0,"ng-container",19),h()),i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",kt(3,M2,r.totalShiftedItems*-1===r.numVisible,n===0,r.clonedItemsForFinishing.length-1===n)),d(),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(7,Sy,e))}}function sB(i,t){i&1&&y(0,"ChevronRightIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function aB(i,t){i&1&&y(0,"ChevronDownIcon",17),i&2&&l("styleClass","carousel-prev-icon")}function lB(i,t){if(i&1&&(Z(0),g(1,sB,1,1,"ChevronRightIcon",16)(2,aB,1,1,"ChevronDownIcon",16),X()),i&2){let e=m(2);d(),l("ngIf",!e.isVertical()),d(),l("ngIf",e.isVertical())}}function cB(i,t){}function dB(i,t){i&1&&g(0,cB,0,0,"ng-template")}function uB(i,t){if(i&1&&(p(0,"span",18),g(1,dB,1,0,null,12),h()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.nextIconTemplate)}}var pB=i=>({"p-carousel-next p-link":!0,"p-disabled":i});function hB(i,t){if(i&1){let e=G();p(0,"button",13),A("click",function(r){S(e);let o=m();return E(o.navForward(r))}),g(1,lB,3,2,"ng-container",14)(2,uB,2,1,"span",15),h()}if(i&2){let e=m();l("ngClass",H(5,pB,e.isForwardNavDisabled()))("disabled",e.isForwardNavDisabled()),T("aria-label",e.ariaNextButtonLabel()),d(),l("ngIf",!e.nextIconTemplate),d(),l("ngIf",e.nextIconTemplate)}}var mB=i=>({"p-carousel-indicator":!0,"p-highlight":i});function fB(i,t){if(i&1){let e=G();p(0,"li",2)(1,"button",22),A("click",function(r){let s=S(e).index,a=m(2);return E(a.onDotClick(r,s))}),h()()}if(i&2){let e=t.index,n=m(2);l("ngClass",H(9,mB,n._page===e)),T("data-pc-section","indicator"),d(),U(n.indicatorStyleClass),l("ngClass","p-link")("ngStyle",n.indicatorStyle)("tabindex",n._page===e?0:-1),T("aria-label",n.ariaPageLabel(e+1))("aria-current",n._page===e?"page":void 0)}}function gB(i,t){if(i&1){let e=G();p(0,"ul",20,21),A("keydown",function(r){S(e);let o=m();return E(o.onIndicatorKeydown(r))}),g(2,fB,2,11,"li",8),h()}if(i&2){let e=m();U(e.indicatorsContentClass),l("ngClass","p-carousel-indicators p-reset")("ngStyle",e.indicatorsContentStyle),d(2),l("ngForOf",e.totalDotsArray())}}function _B(i,t){i&1&&ie(0)}function vB(i,t){if(i&1&&(p(0,"div",23),Ae(1,1),g(2,_B,1,0,"ng-container",12),h()),i&2){let e=m();d(2),l("ngTemplateOutlet",e.footerTemplate)}}var yB=[[["p-header"]],[["p-footer"]]],bB=(i,t)=>({"p-carousel p-component":!0,"p-carousel-vertical":i,"p-carousel-horizontal":t}),CB=i=>({height:i}),IB=["p-header","p-footer"],Fo=(()=>{class i{el;zone;cd;renderer;document;platformId;config;get page(){return this._page}set page(e){this.isCreated&&e!==this._page&&(this.autoplayInterval&&this.stopAutoplay(),e>this._page&&e<=this.totalDots()-1?this.step(-1,e):e{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"previousicon":this.previousIconTemplate=e.template;break;case"nexticon":this.nextIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}}),this.cd.detectChanges()}ngAfterContentChecked(){if(ut(this.platformId)){let e=this.isCircular(),n=this.totalShiftedItems;if(this.value&&this.itemsContainer&&(this.prevState.numScroll!==this._numScroll||this.prevState.numVisible!==this._numVisible||this.prevState.value.length!==this.value.length)){this.autoplayInterval&&this.stopAutoplay(!1),this.remainingItems=(this.value.length-this._numVisible)%this._numScroll;let r=this._page;this.totalDots()!==0&&r>=this.totalDots()&&(r=this.totalDots()-1,this._page=r,this.onPage.emit({page:this.page})),n=r*this._numScroll*-1,e&&(n-=this._numVisible),r===this.totalDots()-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this._numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n),this._oldNumScroll=this._numScroll,this.prevState.numScroll=this._numScroll,this.prevState.numVisible=this._numVisible,this.prevState.value=[...this._value],this.totalDots()>0&&this.itemsContainer.nativeElement&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?`translate3d(0, ${n*(100/this._numVisible)}%, 0)`:`translate3d(${n*(100/this._numVisible)}%, 0, 0)`),this.isCreated=!0,this.autoplayInterval&&this.isAutoplay()&&this.startAutoplay()}e&&(this.page===0?n=-1*this._numVisible:n===0&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n))}}createStyle(){this.carouselStyle||(this.carouselStyle=this.renderer.createElement("style"),this.carouselStyle.type="text/css",this.renderer.appendChild(this.document.head,this.carouselStyle));let e=` #${this.id} .p-carousel-item { flex: 1 0 ${100/this.numVisible}% } @@ -122,11 +122,11 @@ provideFirebaseApp) or you're calling an AngularFire method outside of an NgModu flex: 1 0 ${100/r.numVisible}% } } - `}}this.carouselStyle.innerHTML=e}calculatePosition(){if(this.responsiveOptions){let e={numVisible:this.defaultNumVisible,numScroll:this.defaultNumScroll};if(typeof window<"u"){let n=window.innerWidth;for(let r=0;r=n&&(e=o)}}if(this._numScroll!==e.numScroll){let n=this._page;n=Math.floor(n*this._numScroll/e.numScroll);let r=e.numScroll*this.page*-1;this.isCircular()&&(r-=e.numVisible),this.totalShiftedItems=r,this._numScroll=e.numScroll,this._page=n,this.onPage.emit({page:this.page})}this._numVisible!==e.numVisible&&(this._numVisible=e.numVisible,this.setCloneItems()),this.cd.markForCheck()}}setCloneItems(){this.clonedItemsForStarting=[],this.clonedItemsForFinishing=[],this.isCircular()&&(this.clonedItemsForStarting.push(...this.value.slice(-1*this._numVisible)),this.clonedItemsForFinishing.push(...this.value.slice(0,this._numVisible)))}firstIndex(){return this.isCircular()?-1*(this.totalShiftedItems+this.numVisible):this.totalShiftedItems*-1}lastIndex(){return this.firstIndex()+this.numVisible-1}totalDots(){return this.value?.length?Math.ceil((this.value.length-this._numVisible)/this._numScroll)+1:0}totalDotsArray(){let e=this.totalDots();return e<=0?[]:Array(e).fill(0)}isVertical(){return this.orientation==="vertical"}isCircular(){return this.circular&&this.value&&this.value.length>=this.numVisible}isAutoplay(){return this.autoplayInterval&&this.allowAutoplay}isForwardNavDisabled(){return this.isEmpty()||this._page>=this.totalDots()-1&&!this.isCircular()}isBackwardNavDisabled(){return this.isEmpty()||this._page<=0&&!this.isCircular()}isEmpty(){return!this.value||this.value.length===0}navForward(e,n){(this.isCircular()||this._pager?this.navForward(e,n):nx.getAttribute(s,"data-p-highlight")===!0),r=x.findSingle(this.indicatorContent.nativeElement,'[data-pc-section="indicator"] > button[tabindex="0"]'),o=e.findIndex(s=>s===r.parentElement);e[o].children[0].tabIndex="-1",e[n].children[0].tabIndex="0"}findFocusedIndicatorIndex(){let e=[...x.find(this.indicatorContent.nativeElement,'[data-pc-section="indicator"]')],n=x.findSingle(this.indicatorContent.nativeElement,'[data-pc-section="indicator"] > button[tabindex="0"]');return e.findIndex(r=>r===n.parentElement)}changedFocusedIndicator(e,n){let r=[...x.find(this.indicatorContent.nativeElement,'[data-pc-section="indicator"]')];r[e].children[0].tabIndex="-1",r[n].children[0].tabIndex="0",r[n].children[0].focus()}step(e,n){let r=this.totalShiftedItems,o=this.isCircular();if(n!=null)r=this._numScroll*n*-1,o&&(r-=this._numVisible),this.isRemainingItemsAdded=!1;else{r+=this._numScroll*e,this.isRemainingItemsAdded&&(r+=this.remainingItems-this._numScroll*e,this.isRemainingItemsAdded=!1);let s=o?r+this._numVisible:r;n=Math.abs(Math.floor(s/this._numScroll))}o&&this.page===this.totalDots()-1&&e===-1?(r=-1*(this.value.length+this._numVisible),n=0):o&&this.page===0&&e===1?(r=0,n=this.totalDots()-1):n===this.totalDots()-1&&this.remainingItems>0&&(r+=this.remainingItems*-1-this._numScroll*e,this.isRemainingItemsAdded=!0),this.itemsContainer&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?`translate3d(0, ${r*(100/this._numVisible)}%, 0)`:`translate3d(${r*(100/this._numVisible)}%, 0, 0)`,this.itemsContainer.nativeElement.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=r,this._page=n,this.onPage.emit({page:this.page}),this.cd.markForCheck()}startAutoplay(){this.interval=setInterval(()=>{this.totalDots()>0&&(this.page===this.totalDots()-1?this.step(-1,0):this.step(-1,this.page+1))},this.autoplayInterval),this.allowAutoplay=!0,this.cd.markForCheck()}stopAutoplay(e=!0){this.interval&&(clearInterval(this.interval),this.interval=void 0,e&&(this.allowAutoplay=!1)),this.cd.markForCheck()}isPlaying(){return!!this.interval}onTransitionEnd(){this.itemsContainer&&(this.itemsContainer.nativeElement.style.transition="",(this.page===0||this.page===this.totalDots()-1)&&this.isCircular()&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?`translate3d(0, ${this.totalShiftedItems*(100/this._numVisible)}%, 0)`:`translate3d(${this.totalShiftedItems*(100/this._numVisible)}%, 0, 0)`))}onTouchStart(e){let n=e.changedTouches[0];this.startPos={x:n.pageX,y:n.pageY}}onTouchMove(e){e.cancelable&&e.preventDefault()}onTouchEnd(e){let n=e.changedTouches[0];this.isVertical()?this.changePageOnTouch(e,n.pageY-this.startPos.y):this.changePageOnTouch(e,n.pageX-this.startPos.x)}changePageOnTouch(e,n){Math.abs(n)>this.swipeThreshold&&(n<0?this.navForward(e):this.navBackward(e))}ariaPrevButtonLabel(){return this.config.translation.aria?this.config.translation.aria.prevPageLabel:void 0}ariaSlideLabel(){return this.config.translation.aria?this.config.translation.aria.slide:void 0}ariaNextButtonLabel(){return this.config.translation.aria?this.config.translation.aria.nextPageLabel:void 0}ariaSlideNumber(e){return this.config.translation.aria?this.config.translation.aria.slideNumber.replace(/{slideNumber}/g,e):void 0}ariaPageLabel(e){return this.config.translation.aria?this.config.translation.aria.pageLabel.replace(/{page}/g,e):void 0}bindDocumentListeners(){ut(this.platformId)&&(this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{this.calculatePosition()})))}unbindDocumentListeners(){ut(this.platformId)&&this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}ngOnDestroy(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()}static \u0275fac=function(n){return new(n||i)(w(ve),w(ge),w(Ne),w(nt),w(Oe),w(vt),w(At))};static \u0275cmp=k({type:i,selectors:[["p-carousel"]],contentQueries:function(n,r,o){if(n&1&&(De(o,fo,5),De(o,go,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(U7,5),oe(j7,5)),n&2){let o;q(o=W())&&(r.itemsContainer=o.first),q(o=W())&&(r.indicatorContent=o.first)}},hostAttrs:[1,"p-element"],inputs:{page:"page",numVisible:"numVisible",numScroll:"numScroll",responsiveOptions:"responsiveOptions",orientation:"orientation",verticalViewPortHeight:"verticalViewPortHeight",contentClass:"contentClass",indicatorsContentClass:"indicatorsContentClass",indicatorsContentStyle:"indicatorsContentStyle",indicatorStyleClass:"indicatorStyleClass",indicatorStyle:"indicatorStyle",value:"value",circular:"circular",showIndicators:"showIndicators",showNavigators:"showNavigators",autoplayInterval:"autoplayInterval",style:"style",styleClass:"styleClass"},outputs:{onPage:"onPage"},features:[Mt],ngContentSelectors:IB,decls:14,vars:23,consts:[["role","region",3,"ngClass","ngStyle"],["class","p-carousel-header",4,"ngIf"],[3,"ngClass"],[1,"p-carousel-container"],["type","button","pRipple","",3,"ngClass","disabled","click",4,"ngIf"],[1,"p-carousel-items-content",3,"ngStyle","touchend","touchstart","touchmove"],[1,"p-carousel-items-container",3,"transitionend"],["itemsContainer",""],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass","class","ngStyle","keydown",4,"ngIf"],["class","p-carousel-footer",4,"ngIf"],[1,"p-carousel-header"],[4,"ngTemplateOutlet"],["type","button","pRipple","",3,"ngClass","disabled","click"],[4,"ngIf"],["class","p-carousel-prev-icon",4,"ngIf"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-carousel-prev-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass","ngStyle","keydown"],["indicatorContent",""],["type","button",3,"ngClass","ngStyle","tabindex","click"],[1,"p-carousel-footer"]],template:function(n,r){n&1&&(je(yB),p(0,"div",0),g(1,G7,3,1,"div",1),p(2,"div",2)(3,"div",3),g(4,X7,3,7,"button",4),p(5,"div",5),A("touchend",function(s){return r.onTouchEnd(s)})("touchstart",function(s){return r.onTouchStart(s)})("touchmove",function(s){return r.onTouchMove(s)}),p(6,"div",6,7),A("transitionend",function(){return r.onTransitionEnd()}),g(8,eB,2,12,"div",8)(9,nB,2,12,"div",8)(10,oB,2,9,"div",8),h()(),g(11,hB,3,7,"button",4),h(),g(12,gB,3,5,"ul",9),h(),g(13,vB,3,1,"div",10),h()),n&2&&(U(r.styleClass),l("ngClass",We(18,bB,r.isVertical(),!r.isVertical()))("ngStyle",r.style),T("id",r.id),d(),l("ngIf",r.headerFacet||r.headerTemplate),d(),U(r.contentClass),l("ngClass","p-carousel-content"),d(),T("aria-live",r.allowAutoplay?"polite":"off"),d(),l("ngIf",r.showNavigators),d(),l("ngStyle",H(21,CB,r.isVertical()?r.verticalViewPortHeight:"auto")),d(3),l("ngForOf",r.clonedItemsForStarting),d(),l("ngForOf",r.value),d(),l("ngForOf",r.clonedItemsForFinishing),d(),l("ngIf",r.showNavigators),d(),l("ngIf",r.showIndicators),d(),l("ngIf",r.footerFacet||r.footerTemplate))},dependencies:()=>[xe,Vt,Ie,rt,Ce,ui,Qn,Kn,en,qa],styles:[`@layer primeng{.p-carousel{display:flex;flex-direction:column}.p-carousel-content{display:flex;flex-direction:column;overflow:auto}.p-carousel-prev,.p-carousel-next{align-self:center;flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-carousel-container{display:flex;flex-direction:row}.p-carousel-items-content{overflow:hidden;width:100%}.p-carousel-items-container{display:flex;flex-direction:row}.p-carousel-indicators{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.p-carousel-indicator>button{display:flex;align-items:center;justify-content:center}.p-carousel-vertical .p-carousel-container{flex-direction:column}.p-carousel-vertical .p-carousel-items-container{flex-direction:column;height:100%}.p-items-hidden .p-carousel-item{visibility:hidden}.p-items-hidden .p-carousel-item.p-carousel-item-active{visibility:visible}} -`],encapsulation:2,changeDetection:0})}return i})(),No=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Rt,Qn,Kn,en,qa,$,Te]})}return i})();var tm=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Ui,Te,Te]})}return i})();function wB(i,t){i&1&&ie(0)}function TB(i,t){if(i&1&&(Z(0),g(1,wB,1,0,"ng-container",3),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)}}function xB(i,t){if(i&1&&(p(0,"div",1),Ae(1),g(2,TB,2,1,"ng-container",2),h()),i&2){let e=m();l("hidden",!e.selected),T("id",e.tabView.getTabContentId(e.id))("aria-hidden",!e.selected)("aria-labelledby",e.tabView.getTabHeaderActionId(e.id))("data-pc-name","tabpanel"),d(2),l("ngIf",e.contentTemplate&&(e.cache?e.loaded:e.selected))}}var k2=["*"],SB=["content"],EB=["navbar"],OB=["prevBtn"],MB=["nextBtn"],kB=["inkbar"],AB=["elementToObserve"];function DB(i,t){i&1&&y(0,"ChevronLeftIcon"),i&2&&T("aria-hidden",!0)}function PB(i,t){}function RB(i,t){i&1&&g(0,PB,0,0,"ng-template")}function VB(i,t){if(i&1){let e=G();p(0,"button",13,14),A("click",function(){S(e);let r=m();return E(r.navBackward())}),g(2,DB,1,1,"ChevronLeftIcon",15)(3,RB,1,0,null,16),h()}if(i&2){let e=m();T("tabindex",e.tabindex)("aria-label",e.prevButtonAriaLabel),d(2),l("ngIf",!e.previousIconTemplate),d(),l("ngTemplateOutlet",e.previousIconTemplate)}}function LB(i,t){if(i&1&&y(0,"span",25),i&2){let e=m(3).$implicit;l("ngClass",e.leftIcon)}}function FB(i,t){}function NB(i,t){i&1&&g(0,FB,0,0,"ng-template")}function BB(i,t){if(i&1&&(p(0,"span",26),g(1,NB,1,0,null,16),h()),i&2){let e=m(3).$implicit;d(),l("ngTemplateOutlet",e.leftIconTemplate)}}function zB(i,t){if(i&1&&y(0,"span",27),i&2){let e=m(3).$implicit;l("ngClass",e.rightIcon)}}function UB(i,t){}function jB(i,t){i&1&&g(0,UB,0,0,"ng-template")}function HB(i,t){if(i&1&&(p(0,"span",28),g(1,jB,1,0,null,16),h()),i&2){let e=m(3).$implicit;d(),l("ngTemplateOutlet",e.rightIconTemplate)}}function GB(i,t){if(i&1&&(Z(0),g(1,LB,1,1,"span",20)(2,BB,2,1,"span",21),p(3,"span",22),_(4),h(),g(5,zB,1,1,"span",23)(6,HB,2,1,"span",24),X()),i&2){let e=m(2).$implicit;d(),l("ngIf",e.leftIcon&&!e.leftIconTemplate),d(),l("ngIf",e.leftIconTemplate),d(2),z(e.header),d(),l("ngIf",e.rightIcon&&!e.rightIconTemplate),d(),l("ngIf",e.rightIconTemplate)}}function $B(i,t){i&1&&ie(0)}function qB(i,t){if(i&1){let e=G();p(0,"TimesIcon",31),A("click",function(r){S(e);let o=m(3).$implicit,s=m();return E(s.close(r,o))}),h()}i&2&&l("styleClass","p-tabview-close")}function WB(i,t){i&1&&y(0,"span",32)}function KB(i,t){}function QB(i,t){i&1&&g(0,KB,0,0,"ng-template")}function YB(i,t){if(i&1&&(Z(0),g(1,qB,1,1,"TimesIcon",29)(2,WB,1,0,"span",30)(3,QB,1,0,null,16),X()),i&2){let e=m(2).$implicit;d(),l("ngIf",!e.closeIconTemplate),d(),l("ngIf",e.closeIconTemplate),d(),l("ngTemplateOutlet",e.closeIconTemplate)}}var ZB=(i,t)=>({"p-highlight":i,"p-disabled":t});function XB(i,t){if(i&1){let e=G();p(0,"li",18)(1,"a",19),A("click",function(r){S(e);let o=m().$implicit,s=m();return E(s.open(r,o))})("keydown",function(r){S(e);let o=m().$implicit,s=m();return E(s.onTabKeyDown(r,o))}),g(2,GB,7,5,"ng-container",15)(3,$B,1,0,"ng-container",16)(4,YB,4,3,"ng-container",15),h()()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m();U(n.headerStyleClass),l("ngClass",We(19,ZB,n.selected,n.disabled))("ngStyle",n.headerStyle),T("data-p-disabled",n.disabled),d(),l("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass),T("id",o.getTabHeaderActionId(n.id))("aria-controls",o.getTabContentId(n.id))("aria-selected",n.selected)("tabindex",n.disabled||!n.selected?"-1":o.tabindex)("aria-disabled",n.disabled)("data-pc-index",r)("data-pc-section","headeraction"),d(),l("ngIf",!n.headerTemplate),d(),l("ngTemplateOutlet",n.headerTemplate),d(),l("ngIf",n.closable)}}function JB(i,t){if(i&1&&g(0,XB,5,22,"li",17),i&2){let e=t.$implicit;l("ngIf",!e.closed)}}function ez(i,t){i&1&&y(0,"ChevronRightIcon"),i&2&&T("aria-hidden",!0)}function tz(i,t){}function iz(i,t){i&1&&g(0,tz,0,0,"ng-template")}function nz(i,t){if(i&1){let e=G();p(0,"button",33,34),A("click",function(){S(e);let r=m();return E(r.navForward())}),g(2,ez,1,1,"ChevronRightIcon",15)(3,iz,1,0,null,16),h()}if(i&2){let e=m();T("tabindex",e.tabindex)("aria-label",e.nextButtonAriaLabel),d(2),l("ngIf",!e.nextIconTemplate),d(),l("ngTemplateOutlet",e.nextIconTemplate)}}var rz=i=>({"p-tabview p-component":!0,"p-tabview-scrollable":i}),Qr=(()=>{class i{el;viewContainer;cd;closable=!1;get headerStyle(){return this._headerStyle}set headerStyle(e){this._headerStyle=e,this.tabView.cd.markForCheck()}get headerStyleClass(){return this._headerStyleClass}set headerStyleClass(e){this._headerStyleClass=e,this.tabView.cd.markForCheck()}cache=!0;tooltip;tooltipPosition="top";tooltipPositionStyle="absolute";tooltipStyleClass;get selected(){return!!this._selected}set selected(e){this._selected=e,this.loaded||this.cd.detectChanges(),e&&(this.loaded=!0)}get disabled(){return!!this._disabled}set disabled(e){this._disabled=e,this.tabView.cd.markForCheck()}get header(){return this._header}set header(e){this._header=e,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(e){this._leftIcon=e,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(e){this._rightIcon=e,this.tabView.cd.markForCheck()}templates;closed=!1;view=null;_headerStyle;_headerStyleClass;_selected;_disabled;_header;_leftIcon;_rightIcon=void 0;loaded=!1;id;contentTemplate;headerTemplate;leftIconTemplate;rightIconTemplate;closeIconTemplate;tabView;constructor(e,n,r,o){this.el=n,this.viewContainer=r,this.cd=o,this.tabView=e,this.id=Me()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"righticon":this.rightIconTemplate=e.template;break;case"lefticon":this.leftIconTemplate=e.template;break;case"closeicon":this.closeIconTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}ngOnDestroy(){this.view=null}static \u0275fac=function(n){return new(n||i)(w(Tt(()=>Yr)),w(ve),w(Hs),w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-tabPanel"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{closable:"closable",headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:"cache",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},ngContentSelectors:k2,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(n,r){n&1&&(je(),g(0,xB,3,6,"div",0)),n&2&&l("ngIf",!r.closed)},dependencies:[Ie,rt],encapsulation:2})}return i})(),Yr=(()=>{class i{platformId;el;cd;renderer;style;styleClass;controlClose;scrollable;get activeIndex(){return this._activeIndex}set activeIndex(e){if(this._activeIndex=e,this.preventActiveIndexPropagation){this.preventActiveIndexPropagation=!1;return}this.tabs&&this.tabs.length&&this._activeIndex!=null&&this.tabs.length>this._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(e))}selectOnFocus=!1;nextButtonAriaLabel;prevButtonAriaLabel;autoHideButtons=!0;tabindex=0;onChange=new L;onClose=new L;activeIndexChange=new L;content;navbar;prevBtn;nextBtn;inkbar;tabPanels;templates;initialized;tabs;_activeIndex;preventActiveIndexPropagation;tabChanged;backwardIsDisabled=!0;forwardIsDisabled=!1;tabChangesSubscription;nextIconTemplate;previousIconTemplate;resizeObserver;container;list;buttonVisible;elementToObserve;constructor(e,n,r,o){this.platformId=e,this.el=n,this.cd=r,this.renderer=o}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(e=>{this.initTabs()}),this.templates.forEach(e=>{switch(e.getType()){case"previousicon":this.previousIconTemplate=e.template;break;case"nexticon":this.nextIconTemplate=e.template;break}})}ngAfterViewInit(){ut(this.platformId)&&this.autoHideButtons&&this.bindResizeObserver()}bindResizeObserver(){this.container=x.findSingle(this.el.nativeElement,'[data-pc-section="navcontent"]'),this.list=x.findSingle(this.el.nativeElement,'[data-pc-section="nav"]'),this.resizeObserver=new ResizeObserver(()=>{this.list.offsetWidth>this.container.offsetWidth?this.buttonVisible=!0:this.buttonVisible=!1,this.updateButtonState(),this.cd.detectChanges()}),this.resizeObserver.observe(this.container)}unbindResizeObserver(){this.resizeObserver.unobserve(this.elementToObserve.nativeElement),this.resizeObserver=null}ngAfterViewChecked(){ut(this.platformId)&&this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe(),this.resizeObserver&&this.unbindResizeObserver()}getTabHeaderActionId(e){return`${e}_header_action`}getTabContentId(e){return`${e}_content`}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(this.activeIndex!=null&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}onTabKeyDown(e,n){switch(e.code){case"ArrowLeft":this.onTabArrowLeftKey(e);break;case"ArrowRight":this.onTabArrowRightKey(e);break;case"Home":this.onTabHomeKey(e);break;case"End":this.onTabEndKey(e);break;case"PageDown":this.onTabEndKey(e);break;case"PageUp":this.onTabHomeKey(e);break;case"Enter":case"Space":this.open(e,n);break;default:break}}onTabArrowLeftKey(e){let n=this.findPrevHeaderAction(e.target.parentElement),r=x.getAttribute(n,"data-pc-index");n?this.changeFocusedTab(e,n,r):this.onTabEndKey(e),e.preventDefault()}onTabArrowRightKey(e){let n=this.findNextHeaderAction(e.target.parentElement),r=x.getAttribute(n,"data-pc-index");n?this.changeFocusedTab(e,n,r):this.onTabHomeKey(e),e.preventDefault()}onTabHomeKey(e){let n=this.findFirstHeaderAction(),r=x.getAttribute(n,"data-pc-index");this.changeFocusedTab(e,n,r),e.preventDefault()}onTabEndKey(e){let n=this.findLastHeaderAction(),r=x.getAttribute(n,"data-pc-index");this.changeFocusedTab(e,n,r),e.preventDefault()}changeFocusedTab(e,n,r){if(n&&(x.focus(n),n.scrollIntoView({block:"nearest"}),this.selectOnFocus)){let o=this.tabs[r];this.open(e,o)}}findNextHeaderAction(e,n=!1){let r=n?e:e.nextElementSibling;return r?x.getAttribute(r,"data-p-disabled")||x.getAttribute(r,"data-pc-section")==="inkbar"?this.findNextHeaderAction(r):x.findSingle(r,'[data-pc-section="headeraction"]'):null}findPrevHeaderAction(e,n=!1){let r=n?e:e.previousElementSibling;return r?x.getAttribute(r,"data-p-disabled")||x.getAttribute(r,"data-pc-section")==="inkbar"?this.findPrevHeaderAction(r):x.findSingle(r,'[data-pc-section="headeraction"]'):null}findFirstHeaderAction(){let e=this.navbar.nativeElement.firstElementChild;return this.findNextHeaderAction(e,!0)}findLastHeaderAction(){let e=this.navbar.nativeElement.lastElementChild,n=x.getAttribute(e,"data-pc-section")==="inkbar"?e.previousElementSibling:e;return this.findPrevHeaderAction(n,!0)}open(e,n){if(n.disabled){e&&e.preventDefault();return}if(!n.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,n.selected=!0;let o=this.findTabIndex(n);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:e,index:o}),this.updateScrollBar(o)}e&&e.preventDefault()}close(e,n){this.controlClose?this.onClose.emit({originalEvent:e,index:this.findTabIndex(n),close:()=>{this.closeTab(n)}}):(this.closeTab(n),this.onClose.emit({originalEvent:e,index:this.findTabIndex(n)}))}closeTab(e){if(!e.disabled){if(e.selected){this.tabChanged=!0,e.selected=!1;for(let n=0;nn?e+x.getWidth(n):e,0)}navBackward(){let e=this.content.nativeElement,n=x.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft-n;e.scrollLeft=r<=0?0:r}navForward(){let e=this.content.nativeElement,n=x.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+n,o=e.scrollWidth-n;e.scrollLeft=r>=o?o:r}static \u0275fac=function(n){return new(n||i)(w(vt),w(ve),w(Ne),w(nt))};static \u0275cmp=k({type:i,selectors:[["p-tabView"]],contentQueries:function(n,r,o){if(n&1&&(De(o,Qr,4),De(o,he,4)),n&2){let s;q(s=W())&&(r.tabPanels=s),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(SB,5),oe(EB,5),oe(OB,5),oe(MB,5),oe(kB,5),oe(AB,5)),n&2){let o;q(o=W())&&(r.content=o.first),q(o=W())&&(r.navbar=o.first),q(o=W())&&(r.prevBtn=o.first),q(o=W())&&(r.nextBtn=o.first),q(o=W())&&(r.inkbar=o.first),q(o=W())&&(r.elementToObserve=o.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",controlClose:"controlClose",scrollable:"scrollable",activeIndex:"activeIndex",selectOnFocus:"selectOnFocus",nextButtonAriaLabel:"nextButtonAriaLabel",prevButtonAriaLabel:"prevButtonAriaLabel",autoHideButtons:"autoHideButtons",tabindex:"tabindex"},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},ngContentSelectors:k2,decls:14,vars:13,consts:[[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["elementToObserve",""],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabview-nav"],["navbar",""],["ngFor","",3,"ngForOf"],["role","presentation","aria-hidden","true",1,"p-tabview-ink-bar"],["inkbar",""],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],["prevBtn",""],[4,"ngIf"],[4,"ngTemplateOutlet"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","click","keydown"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],["class","p-tabview-left-icon",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],["class","p-tabview-right-icon",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-left-icon"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-right-icon"],[3,"styleClass","click",4,"ngIf"],["class","tab.closeIconTemplate",4,"ngIf"],[3,"styleClass","click"],[1,"tab.closeIconTemplate"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"],["nextBtn",""]],template:function(n,r){n&1&&(je(),p(0,"div",0)(1,"div",1,2),g(3,VB,4,4,"button",3),p(4,"div",4,5),A("scroll",function(s){return r.onScroll(s)}),p(6,"ul",6,7),g(8,JB,1,1,"ng-template",8),y(9,"li",9,10),h()(),g(11,nz,4,4,"button",11),h(),p(12,"div",12),Ae(13),h()()),n&2&&(U(r.styleClass),l("ngClass",H(11,rz,r.scrollable))("ngStyle",r.style),T("data-pc-name","tabview"),d(3),l("ngIf",r.scrollable&&!r.backwardIsDisabled&&r.autoHideButtons),d(),T("data-pc-section","navcontent"),d(2),T("data-pc-section","nav"),d(2),l("ngForOf",r.tabs),d(),T("data-pc-section","inkbar"),d(2),l("ngIf",r.scrollable&&!r.forwardIsDisabled&&r.buttonVisible))},dependencies:()=>[xe,Vt,Ie,rt,Ce,Ro,ui,pt,Kn,Qn],styles:[`@layer primeng{.p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:inline-flex;min-width:100%;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}} -`],encapsulation:2,changeDetection:0})}return i})(),Bo=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Pn,Rt,pt,Kn,Qn,Te]})}return i})();function oz(i,t){if(i&1&&(p(0,"span",1),_(1),h()),i&2){let e=m();U(e.styleClass),l("ngClass",e.containerClass())("ngStyle",e.style),d(),z(e.value)}}var A2=(()=>{class i{styleClass;style;size;severity;value;badgeDisabled=!1;containerClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.value!=null&&String(this.value).length===1,"p-badge-lg":this.size==="large","p-badge-xl":this.size==="xlarge","p-badge-info":this.severity==="info","p-badge-success":this.severity==="success","p-badge-warning":this.severity==="warning","p-badge-danger":this.severity==="danger"}}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-badge"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",size:"size",severity:"severity",value:"value",badgeDisabled:"badgeDisabled"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"]],template:function(n,r){n&1&&g(0,oz,2,5,"span",0),n&2&&l("ngIf",!r.badgeDisabled)},dependencies:[xe,Ie,Ce],styles:[`@layer primeng{.p-badge{display:inline-block;border-radius:10px;text-align:center;padding:0 .5rem}.p-overlay-badge{position:relative}.p-overlay-badge .p-badge{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0;margin:0}.p-badge-dot{width:.5rem;min-width:.5rem;height:.5rem;border-radius:50%;padding:0}.p-badge-no-gutter{padding:0;border-radius:50%}} -`],encapsulation:2,changeDetection:0})}return i})(),Wa=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te]})}return i})();function az(i,t){if(i&1&&(p(0,"div",3)(1,"app-top-titles",4),y(2,"p-button",5),h()()),i&2){let e=m(2);d(),l("label",e.headerText),d(),l("rounded",!0)}}function lz(i,t){if(i&1&&(p(0,"div",6),y(1,"app-movie-card",7),h()),i&2){let e=t.$implicit;d(),l("movie",e)}}function cz(i,t){if(i&1&&(p(0,"p-carousel",0),g(1,az,3,2,"ng-template",1)(2,lz,2,1,"ng-template",2),h()),i&2){let e=m();l("value",e.movies)("numVisible",6)("numScroll",1)("responsiveOptions",e.responsiveOptions)("autoplayInterval",6e3)("circular",!0)("showNavigators",!1)}}function dz(i,t){if(i&1&&(p(0,"div",3)(1,"app-top-titles",4),y(2,"p-button",8),h()()),i&2){let e=m(2);d(),l("label",e.headerText),d(),l("rounded",!0)}}function uz(i,t){if(i&1&&(p(0,"div",6),y(1,"app-movie-card",7),h()),i&2){let e=t.$implicit;d(),l("movie",e)}}function pz(i,t){if(i&1&&(p(0,"p-carousel",0),g(1,dz,3,2,"ng-template",1)(2,uz,2,1,"ng-template",2),h()),i&2){let e=m();l("value",e.tvshows)("numVisible",6)("numScroll",1)("responsiveOptions",e.responsiveOptions)("autoplayInterval",6e3)("circular",!0)("showNavigators",!1)}}function hz(i,t){if(i&1&&(p(0,"div",3)(1,"app-top-titles",4),y(2,"p-button",9),h()()),i&2){let e=m(2);d(),l("label",e.headerText),d(),l("rounded",!0)}}function mz(i,t){if(i&1&&(p(0,"div",6),y(1,"app-celebrity-card",10),h()),i&2){let e=t.$implicit;d(),l("person",e)}}function fz(i,t){if(i&1&&(p(0,"p-carousel",0),g(1,hz,3,2,"ng-template",1)(2,mz,2,1,"ng-template",2),h()),i&2){let e=m();l("value",e.celebs)("numVisible",6)("numScroll",6)("responsiveOptions",e.responsiveOptions)("autoplayInterval",6e3)("circular",!0)("showNavigators",!1)}}var D2=(()=>{let t=class t{constructor(){this.headerText=""}ngOnInit(){this.responsiveOptions=[{breakpoint:"1079px",numVisible:7,numScroll:1},{breakpoint:"991px",numVisible:6,numScroll:1},{breakpoint:"863px",numVisible:5,numScroll:1},{breakpoint:"767px",numVisible:4,numScroll:1},{breakpoint:"575px",numVisible:3,numScroll:1}]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-cards-carousel"]],inputs:{movies:"movies",tvshows:"tvshows",celebs:"celebs",headerText:"headerText"},standalone:!0,features:[R],decls:3,vars:1,consts:[[3,"value","numVisible","numScroll","responsiveOptions","autoplayInterval","circular","showNavigators"],["pTemplate","header"],["pTemplate","item"],[1,"titles"],[3,"label"],["label","Explore Movies","routerLink","/movies/","icon","pi pi-arrow-right","size","small",3,"rounded"],[2,"margin","0 10px"],[3,"movie"],["label","Explore TV Shows","size","small","routerLink","/tvshows/","icon","pi pi pi-arrow-right",3,"rounded"],["label","Explore Celebrities","size","small","routerLink","/celebrities/","icon","pi pi pi-arrow-right",3,"rounded"],[3,"person"]],template:function(r,o){r&1&&g(0,cz,3,7,"p-carousel",0)(1,pz,3,7)(2,fz,3,7),r&2&&Je(0,o.movies?0:o.tvshows?1:o.celebs?2:-1)},dependencies:[No,Fo,he,Vo,yt,ni,Wh,Ve,et,li],styles:[".p-carousel[_ngcontent-%COMP%] .p-carousel-indicators[_ngcontent-%COMP%] .p-carousel-indicator.p-highlight[_ngcontent-%COMP%] button.xyzd[_ngcontent-%COMP%]{background-color:#f6bb3b!important}"]});let i=t;return i})();var gz=HM(P2());var R2=(()=>{let t=class t{constructor(){this.status=""}ngOnChanges(n){this.releaseDate&&this.calculateStatus(this.releaseDate)}calculateStatus(n){if(!n){this.status="Unknown";return}let r=new Date(n),o=r.getTime()-Date.now(),s=Math.ceil(o/(1e3*60*60*24));s<=14&&s>=0?this.status="upcoming":s<0&&s>=-14?this.status="new":s>14?this.status=`Coming in ${r.toLocaleDateString("default",{month:"long"})}`:this.status="released"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-release-status"]],inputs:{releaseDate:"releaseDate"},standalone:!0,features:[Mt,R],decls:2,vars:1,consts:[[1,"release-status"]],template:function(r,o){r&1&&(p(0,"div",0),_(1),h()),r&2&&(d(),be(" ",o.status,` -`))},styles:[".release-status[_ngcontent-%COMP%]{color:#fff;background-color:var(--accent);border-radius:20px;width:max-content;display:flex;align-items:center;justify-content:center;font-size:.9em;padding:.5em;text-transform:uppercase}"]});let i=t;return i})();var _z=["*"],Sr=(()=>{let t=class t{constructor(){this.severity="",this.size=""}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-custom-tag"]],inputs:{severity:"severity",size:"size",routerLink:"routerLink",queryParams:"queryParams"},standalone:!0,features:[R],ngContentSelectors:_z,decls:2,vars:3,consts:[[1,"custom-tag",3,"ngClass","routerLink","queryParams"]],template:function(r,o){r&1&&(je(),p(0,"a",0),Ae(1),h()),r&2&&l("ngClass",o.severity+" "+o.size)("routerLink",o.routerLink)("queryParams",o.queryParams)},dependencies:[$,xe,Ve,et],styles:[".custom-tag[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;padding:.2rem .5rem;border-radius:1.4rem;display:flex;align-items:center;width:max-content;gap:3px;cursor:pointer;text-transform:capitalize;text-decoration:none}.custom-tag.secondary[_ngcontent-%COMP%]{background-color:#464646}.custom-tag.tags[_ngcontent-%COMP%]{background-color:var(--surface-100);color:#0477c4}.custom-tag.tags[_ngcontent-%COMP%]:hover{color:#0080a7}.custom-tag.small[_ngcontent-%COMP%]{scale:.6}.custom-tag[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8rem}"]});let i=t;return i})();var vz=["*"],zo=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-custom-bedge"]],standalone:!0,features:[R],ngContentSelectors:vz,decls:2,vars:0,consts:[[1,"custom-bedge"]],template:function(r,o){r&1&&(je(),p(0,"div",0),Ae(1),h())},styles:[".custom-bedge[_ngcontent-%COMP%]{font-size:.8em}"]});let i=t;return i})();function yz(i,t){if(i&1&&y(0,"img",1),i&2){let e=m();l("src",e.src&&e.src!=null?e.logoPath+e.src:e.placeholder,Ue)("alt",e.label||"")}}var bz=i=>({margin:i});function Cz(i,t){if(i&1&&(p(0,"h5",2),_(1),h()),i&2){let e=m();l("ngStyle",H(2,bz,e.src||e.src==null?"0 auto 0 3px":"0")),d(),z(e.label)}}var Iz=["*"],rm=(()=>{let t=class t{constructor(){this.logoPath="http://image.tmdb.org/t/p/w45",this.placeholder="../../../assets/images/logo.png"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-details-line"]],inputs:{label:"label",src:"src",routerLink:"routerLink",queryParams:"queryParams"},standalone:!0,features:[R],ngContentSelectors:Iz,decls:4,vars:4,consts:[[1,"details-line",3,"routerLink","queryParams"],[3,"src","alt"],[3,"ngStyle"]],template:function(r,o){r&1&&(je(),p(0,"a",0),g(1,yz,1,2,"img",1)(2,Cz,2,4,"h5",2),Ae(3),h()),r&2&&(l("routerLink",o.routerLink)("queryParams",o.queryParams),d(),Je(1,o.src||o.src==null?1:-1),d(),Je(2,o.label?2:-1))},dependencies:[$,Ce,Ve,et],styles:[".details-line[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;background-color:#00000059;border-radius:20px;padding:.2rem .4rem;margin-bottom:.4rem;font-size:.8rem;color:var(--primary-color);text-decoration:none}.details-line[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;padding:0;color:#fff}.details-line[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;border-radius:50%}"]});let i=t;return i})();function wz(i,t){if(i&1&&(p(0,"span",4),_(1),h()),i&2){let e=m(2);d(),z(e.message)}}function Tz(i,t){i&1&&(p(0,"span",5),_(1,"Loading Please Wait..."),h())}function xz(i,t){if(i&1&&(p(0,"div",1),y(1,"span",2),g(2,wz,2,1,"span",3)(3,Tz,2,0),h()),i&2){let e=m();d(2),Je(2,e.message?2:e.placeholder?3:-1)}}var Ka=(()=>{let t=class t{constructor(){this.loading=!1,this.placeholder=!0}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-page-loader"]],inputs:{loading:"loading",placeholder:"placeholder",message:"message"},standalone:!0,features:[R],decls:1,vars:1,consts:[["class","page-loader"],[1,"page-loader"],[1,"loader"],["class","message"],[1,"message"],[1,"placeholder"]],template:function(r,o){r&1&&g(0,xz,4,1,"div",0),r&2&&Je(0,o.loading?0:-1)},styles:['.page-loader[_ngcontent-%COMP%]{width:100%;height:100vh;position:fixed;top:0;z-index:100;background-color:#000000cb;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem}.page-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,rgba(0,0,0,0) 33%,var(--primary-color) 100%);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}.page-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#263238}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']});let i=t;return i})();var Sz=["player"];function Ez(i,t){if(i&1&&(p(0,"app-details-line",32)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.status)}}function Oz(i,t){if(i&1&&(p(0,"app-details-line",33)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.popularity)}}function Mz(i,t){if(i&1&&(p(0,"app-details-line",34)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.budget)}}function kz(i,t){if(i&1&&(p(0,"app-details-line",35)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.revenue)}}var Az=i=>({mediaType:"movie",withCompanies:i});function Dz(i,t){if(i&1&&(p(0,"app-details-line",38)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("src",e.logo_path)("title",e.name)("queryParams",H(5,Az,e.id)),d(2),be(" ",e.origin_country," ")}}function Pz(i,t){if(i&1&&(p(0,"div",36)(1,"h4"),_(2,"Production Companies"),h(),g(3,Dz,3,7,"app-details-line",37),h()),i&2){let e=m();d(3),l("ngForOf",e.movieDetails==null?null:e.movieDetails.production_companies)}}var Rz=i=>({mediaType:"movie",withOriginCountry:i});function Vz(i,t){if(i&1&&(p(0,"app-details-line",41)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.name)("queryParams",H(4,Rz,e.iso_3166_1)),d(2),be(" ",e.iso_3166_1," ")}}function Lz(i,t){if(i&1&&(p(0,"div",39)(1,"h4"),_(2,"Production Countries"),h(),g(3,Vz,3,6,"app-details-line",40),h()),i&2){let e=m();d(3),l("ngForOf",e.movieDetails==null?null:e.movieDetails.production_countries)}}var Fz=i=>({mediaType:"movie",withOriginLanguage:i});function Nz(i,t){if(i&1&&(p(0,"app-details-line",41)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.english_name)("queryParams",H(4,Fz,e.iso_639_1)),d(2),be(" ",e.iso_639_1," ")}}function Bz(i,t){if(i&1&&(p(0,"div",42)(1,"h4"),_(2,"Languages"),h(),g(3,Nz,3,6,"app-details-line",40),h()),i&2){let e=m();d(3),l("ngForOf",e.movieDetails==null?null:e.movieDetails.spoken_languages)}}var zz=i=>({mediaType:"movie",withGenres:i});function Uz(i,t){if(i&1&&(p(0,"a",45)(1,"div",46),y(2,"i",47),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,zz,e.id)),d(3),be("",e==null?null:e.name," ")}}function jz(i,t){if(i&1&&(p(0,"div",43),g(1,Uz,4,4,"a",44),h()),i&2){let e=m();d(),l("ngForOf",e.movieDetails==null?null:e.movieDetails.genres)}}function Hz(i,t){if(i&1&&(p(0,"div",48),_(1),ct(2,"runtime"),h()),i&2){let e=m();d(),be(" \u2022 ",Bt(2,1,e.movieDetails==null?null:e.movieDetails.runtime)," ")}}function Gz(i,t){if(i&1&&(p(0,"a",51),y(1,"p-button",52),h()),i&2){let e=m(2);l("href",e.movieDetails==null?null:e.movieDetails.homepage,Ue),d(),l("outlined",!0)("rounded",!0)}}function $z(i,t){if(i&1&&(p(0,"a",51),y(1,"p-button",53),h()),i&2){let e=m(2);l("href",e.imdbUrl+(e.movieDetails==null?null:e.movieDetails.imdb_id),Ue),d(),l("outlined",!0)("rounded",!0)}}function qz(i,t){if(i&1&&(p(0,"div",49),g(1,Gz,2,3,"a",50)(2,$z,2,3,"a",50),h()),i&2){let e=m();d(),l("ngIf",e.movieDetails==null?null:e.movieDetails.homepage),d(),l("ngIf",e.movieDetails==null?null:e.movieDetails.imdb_id)}}var Wz=i=>({mediaType:"movie",withKeywords:i});function Kz(i,t){if(i&1&&(p(0,"app-custom-tag",54),y(1,"i",55),p(2,"span"),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,Wz,e.id)),d(3),z(e.name)}}function Qz(i,t){if(i&1&&(p(0,"app-top-titles",28),y(1,"iframe",56,57),h()),i&2){let e=m();l("label",e.currentVideoType+" of "+(e.movieDetails==null?null:e.movieDetails.title))}}function Yz(i,t){if(i&1&&y(0,"app-mini-celebrity-card",58),i&2){let e=t.$implicit;l("cast",e)}}function Zz(i,t){if(i&1&&y(0,"app-mini-celebrity-card",59),i&2){let e=t.$implicit;l("crew",e)}}function Xz(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Backdrops"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.movieImages.backdrops.length.toString())}}function Jz(i,t){if(i&1&&(p(0,"p-tabPanel"),g(1,Xz,5,1,"ng-template",60),y(2,"app-media-gallery",61),h()),i&2){let e=m();d(2),l("images",e.movieImages.backdrops)("defaultTile",e.movieDetails==null?null:e.movieDetails.title)}}function eU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Posters"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.movieImages.posters.length.toString())}}function tU(i,t){if(i&1&&(p(0,"p-tabPanel"),g(1,eU,5,1,"ng-template",60),y(2,"app-media-gallery",63),h()),i&2){let e=m();d(2),l("images",e.movieImages.posters)("defaultTile",e.movieDetails==null?null:e.movieDetails.title)}}function iU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Videos"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.movieVideos.length.toString())}}function nU(i,t){if(i&1&&y(0,"app-media-gallery",65),i&2){let e=m(2);l("videos",e.movieVideos)}}function rU(i,t){i&1&&(p(0,"p-tabPanel"),g(1,iU,5,1,"ng-template",60)(2,nU,1,1,"ng-template",64),h())}function oU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Similar"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.similarMovies.total_results.toString())}}function sU(i,t){if(i&1&&y(0,"app-movie-card",67),i&2){let e=t.$implicit;l("movie",e)}}function aU(i,t){if(i&1){let e=G();p(0,"app-cards-container",66),A("scrolled",function(){S(e);let r=m(2);return E(r.appendMoreMovies("similar","similarMovies"))}),Yt(1,sU,1,1,"app-movie-card",67,di),h()}if(i&2){let e=m(2);l("infiniteScrollDistance",1)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.similarMovies.results)}}function lU(i,t){i&1&&(p(0,"p-tabPanel"),g(1,oU,5,1,"ng-template",60)(2,aU,3,3,"ng-template",64),h())}function cU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Recommended"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.recommendedMovies.total_results.toString())}}function dU(i,t){if(i&1&&y(0,"app-movie-card",67),i&2){let e=t.$implicit;l("movie",e)}}function uU(i,t){if(i&1){let e=G();p(0,"app-cards-container",66),A("scrolled",function(){S(e);let r=m(2);return E(r.appendMoreMovies("recommendations","recommendedMovies"))}),Yt(1,dU,1,1,"app-movie-card",67,di),h()}if(i&2){let e=m(2);l("infiniteScrollDistance",1)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.recommendedMovies.results)}}function pU(i,t){i&1&&(p(0,"p-tabPanel"),g(1,cU,5,1,"ng-template",60)(2,uU,3,3,"ng-template",64),h())}var hU=i=>({"background-image":i}),V2=(()=>{let t=class t{constructor(n,r){this.tmdbService=n,this.activatedRoute=r,this.isTrailer=!0,this.isLoading=!0,this.imdbUrl="https://www.imdb.com/title/",this.movieImages={backdrops:[],posters:[],id:1,logos:[]},this.movieVideos=[],this.movieCredits={id:0,cast:[],crew:[]},this.similarMovies={page:1,total_pages:1,total_results:20,results:[]},this.recommendedMovies={page:1,total_pages:1,total_results:20,results:[]},this.imageUrl="http://image.tmdb.org/t/p/original",this.logoUrl="http://image.tmdb.org/t/p/w45",this.responsiveOptions=[{breakpoint:"1199px",numVisible:1,numScroll:1},{breakpoint:"991px",numVisible:2,numScroll:1},{breakpoint:"767px",numVisible:1,numScroll:1}],this.currentVideoType="",this.currentIndex=0}concatToString(n,r){return n.map(o=>o[r]).join(", ")}ngOnInit(){this.getId()}getId(){this.activatedRoute.params.subscribe(n=>{this.isLoading=!0,this.movieId=n.id,window.scrollTo(0,0),this.getDetails(),this.getVideos(),this.getImages(),this.getCredits(),this.getSimilar(),this.getRecommendations(),this.getKeywords()})}getDetails(){this.movieDetails=void 0,this.tmdbService.getTMDBData(`movie/${this.movieId}`).subscribe(n=>{document.title=n.title+" | Showbizhub",this.movieDetails=n,this.isLoading=!1},n=>{this.isLoading=!1})}getImages(){this.movieImages={backdrops:[],posters:[],logos:[],id:0},this.tmdbService.getTMDBData(`movie/${this.movieId}/images`).subscribe(n=>{this.movieImages=n,this.setSwipe()})}getVideos(){this.movieVideos=[],this.tmdbService.getTMDBData(`movie/${this.movieId}/videos`).subscribe(n=>D(this,null,function*(){this.movieVideos=yield n.results;let r="https://www.youtube.com/embed/";this.movieVideos?.forEach(o=>{if(o.type=="Trailer"){this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}else if(o.type!="Trailer"&&o.type=="Teaser"){this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}else if(o.type!="Trailer"&&o.type!="Teaser"&&o.type=="Featurette"){this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}else{this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}}),n?.results?.length==0&&(this.isTrailer=!1)}))}getCredits(){this.movieCredits={id:0,cast:[],crew:[]},this.tmdbService.getTMDBData(`movie/${this.movieId}/credits`).subscribe(n=>{this.movieCredits=n})}getSimilar(){this.similarMovies=pe(F({},this.similarMovies),{results:[]}),this.tmdbService.getTMDBData(`movie/${this.movieId}/similar`).subscribe(n=>{this.similarMovies=n})}getRecommendations(){this.recommendedMovies=pe(F({},this.recommendedMovies),{results:[]}),this.tmdbService.getTMDBData(`movie/${this.movieId}/recommendations`).subscribe(n=>{this.recommendedMovies=n})}getKeywords(){this.keywords=void 0,this.tmdbService.getTMDBData(`movie/${this.movieId}/keywords`).subscribe(n=>{this.keywords=n})}setSwipe(){if(this.movieImages.backdrops.length>1){let n=document.querySelector(".movie-details");new Hammer(n).on("swipeleft swiperight",o=>{o.type==="swipeleft"?this.switchBackdrop(1):this.switchBackdrop(-1)})}}switchBackdrop(n){n===1&&this.movieDetails?this.currentIndex500)&&this.tmdbService.getTMDBData(`movie/${this.movieId}/${n}`,{page:o}).subscribe(s=>{r=="similarMovies"?(this.similarMovies.page=s.page,this.similarMovies.total_pages=s.total_pages,this.similarMovies.total_results=s.total_results,s.results.forEach(a=>{this.similarMovies.results.push(a)})):r=="recommendedMovies"&&(this.recommendedMovies.page=s.page,this.recommendedMovies.total_pages=s.total_pages,this.recommendedMovies.total_results=s.total_results,s.results.forEach(a=>{this.recommendedMovies.results.push(a)}))})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-movie"]],viewQuery:function(r,o){if(r&1&&oe(Sz,5),r&2){let s;q(s=W())&&(o.player=s.first)}},standalone:!0,features:[R],decls:56,vars:49,consts:[[3,"loading"],[1,"movie-details",3,"ngStyle"],[1,"content"],[1,"left-side"],[1,"poster"],[2,"aspect-ratio","0.667","border-radius",".4rem",3,"src"],[1,"bedge"],[3,"releaseDate"],[1,"details"],["label","Status",4,"ngIf"],["label","Popularity",4,"ngIf"],["label","Budge",4,"ngIf"],["label","Revenue",4,"ngIf"],["class","production-companies",4,"ngIf"],["class","production-countries",4,"ngIf"],["class","Languages",4,"ngIf"],[1,"right-side"],[1,"top-titles"],[1,"custom-bedge",3,"title"],[3,"max","current"],[1,"tagline"],[1,"sub-details"],["class","genre",4,"ngIf"],["class","runtime",4,"ngIf"],["class","btns",4,"ngIf"],[1,"overview"],[1,"keywords"],["showAs","column",3,"label",4,"ngIf"],["showAs","column",3,"label"],[3,"value","numVisible","numScroll","circular","autoplayInterval","showNavigators"],["pTemplate","item"],[4,"ngIf"],["label","Status"],["label","Popularity"],["label","Budge"],["label","Revenue"],[1,"production-companies"],["routerLink","/discover",3,"label","src","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","src","title","queryParams"],[1,"production-countries"],["routerLink","/discover",3,"label","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","title","queryParams"],[1,"Languages"],[1,"genre"],["routerLink","/discover",3,"queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"queryParams"],[1,"custom-bedge","d-flex"],[1,"pi","pi-search"],[1,"runtime"],[1,"btns"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],["icon","pi pi-home","label","Visit Homepage","size","small",3,"outlined","rounded"],["icon","pi pi-arrow-right","label","View on IMDb","size","small",3,"outlined","rounded"],["severity","tags","routerLink","/discover",3,"queryParams"],[1,"pi","pi-hashtag"],["frameborder","0","allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share","allowfullscreen","",2,"width","100%","aspect-ratio","16/9"],["player",""],[3,"cast"],[3,"crew"],["pTemplate","header"],["thumbnailKey","file_path","type","backdrops",3,"images","defaultTile"],[1,"pi","pi-user"],["thumbnailKey","file_path","type","posters",3,"images","defaultTile"],["pTemplate","content"],["thumbnailKey","key","type","posters",3,"videos"],["infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],[3,"movie"]],template:function(r,o){r&1&&(y(0,"app-page-loader",0),p(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),y(5,"app-img",5),p(6,"div",6),y(7,"app-release-status",7),h()(),p(8,"div",8)(9,"h4"),_(10,"About "),p(11,"span"),_(12),h()(),g(13,Ez,3,1,"app-details-line",9)(14,Oz,3,1,"app-details-line",10)(15,Mz,3,1,"app-details-line",11)(16,kz,3,1,"app-details-line",12)(17,Pz,4,1,"div",13)(18,Lz,4,1,"div",14)(19,Bz,4,1,"div",15),h()(),p(20,"div",16)(21,"div",17)(22,"h1"),_(23),p(24,"span",18),ct(25,"date"),_(26),ct(27,"date"),h()(),y(28,"app-circle-rating",19),h(),p(29,"div",20),_(30),h(),p(31,"div",21),g(32,jz,2,1,"div",22)(33,Hz,3,3,"div",23),h(),g(34,qz,3,2,"div",24),p(35,"div",25)(36,"h1"),_(37,"Overview:"),h(),p(38,"p"),_(39),h(),p(40,"div",26),Yt(41,Kz,4,4,"app-custom-tag",54,di),h()(),g(43,Qz,3,1,"app-top-titles",27),p(44,"app-top-titles",28)(45,"p-carousel",29),g(46,Yz,1,1,"ng-template",30),h()(),p(47,"app-top-titles",28)(48,"p-carousel",29),g(49,Zz,1,1,"ng-template",30),h()(),p(50,"p-tabView"),g(51,Jz,3,2,"p-tabPanel",31)(52,tU,3,2,"p-tabPanel",31)(53,rU,3,0,"p-tabPanel",31)(54,lU,3,0,"p-tabPanel",31)(55,pU,3,0,"p-tabPanel",31),h()()()()),r&2&&(l("loading",o.isLoading),d(),l("ngStyle",H(47,hU,"url("+o.imageUrl+(o.movieDetails==null?null:o.movieDetails.backdrop_path)+")")),d(4),l("src",o.imageUrl+(o.movieDetails==null?null:o.movieDetails.poster_path)),d(2),l("releaseDate",o.movieDetails==null?null:o.movieDetails.release_date),d(5),z(o.movieDetails==null?null:o.movieDetails.title),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.status),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.popularity),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.budget),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.revenue),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.production_companies),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.production_countries),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.spoken_languages),d(4),be(" ",o.movieDetails==null?null:o.movieDetails.title," "),d(),l("title",Bt(25,42,o.movieDetails==null?null:o.movieDetails.release_date)),d(2),z(un(27,44,o.movieDetails==null?null:o.movieDetails.release_date,"yyyy")),d(2),l("max",10)("current",o.movieDetails==null||o.movieDetails.vote_average==null?null:o.movieDetails.vote_average.toFixed(1)),d(2),z(o.movieDetails==null?null:o.movieDetails.tagline),d(2),l("ngIf",o.movieDetails==null?null:o.movieDetails.genres),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.runtime),d(),l("ngIf",(o.movieDetails==null?null:o.movieDetails.homepage)||(o.movieDetails==null?null:o.movieDetails.imdb_id)),d(5),z(o.movieDetails==null?null:o.movieDetails.overview),d(2),Zt(o.keywords==null?null:o.keywords.keywords),d(2),l("ngIf",o.isTrailer),d(),l("label","Cast "+o.movieCredits.cast.length),d(),l("value",o.movieCredits.cast)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3)("showNavigators",!1),d(2),l("label","Crew "+o.movieCredits.crew.length),d(),l("value",o.movieCredits.crew)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3)("showNavigators",!1),d(3),l("ngIf",o.movieImages.backdrops.length>0),d(),l("ngIf",o.movieImages.posters.length>0),d(),l("ngIf",o.movieVideos.length>0),d(),l("ngIf",o.similarMovies.results.length>0),d(),l("ngIf",o.recommendedMovies.results.length>0))},dependencies:[$,Vt,Ie,Ce,nn,Vo,w2,Ve,et,Kh,he,Ha,Jh,sa,No,Fo,tm,Bo,Yr,Qr,_t,xr,$a,Wa,Ua,R2,Sr,zo,li,rm,Tr,yt,ni,Ka],styles:[".movie-details[_ngcontent-%COMP%]{background-size:100%;background-attachment:fixed;background-position:50%;aspect-ratio:16/9;position:relative;transition:all .5s}.movie-details[_ngcontent-%COMP%]:hover{background-position:50% 20%;background-size:50%}.movie-details[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:70vh .5rem 0;display:grid;grid-template-columns:350px 1fr;grid-gap:.5rem;background:linear-gradient(to bottom,rgba(255,0,0,0) 50vh,var(--surface-a) 70vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{padding:0 0 .5rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%]{position:relative}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] .bedge[_ngcontent-%COMP%]{position:absolute;top:0;right:0;transform:translateY(-50%)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:3px;border-left:3px solid var(--primary-color);margin-left:3px;padding-left:5px;font-weight:400}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600;color:var(--primary-color)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{max-width:calc(100vw - 350px - 2rem);color:var(--surface-800)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;margin-bottom:0}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%] .genre[_ngcontent-%COMP%]{display:flex;align-content:center;gap:.4rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:0}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:.5rem;border-radius:.5rem;background-color:var(--surface-100);color:var(--surface-700)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .keywords[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:.4em;font-size:.8em}.movie-details[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;padding:.2rem .5rem;border-radius:1.4rem;align-items:center;gap:3px}.movie-details[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8rem}@media screen and (max-width: 991px){.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{grid-template-columns:250px 1fr;padding-top:60vh;background:linear-gradient(to bottom,rgba(255,0,0,0) 40vh,var(--surface-a) 60vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{max-width:calc(100vw - 250px - 2rem)}}@media screen and (max-width: 767px){.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{grid-template-columns:1fr;padding-top:50vh;background:linear-gradient(to bottom,rgba(255,0,0,0) 30vh,var(--surface-a) 50vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{display:grid;grid-template-columns:40% 1fr;grid-gap:.5rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{max-width:calc(100vw - 2rem)}}@media screen and (max-width: 575px){.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:30vh;background:linear-gradient(to bottom,rgba(255,0,0,0) 10vh,var(--surface-a) 30vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let i=t;return i})();var L2=(()=>{let t=class t{transform(n,...r){let o=new Date,s=new Date(n),a=Math.abs(o.getTime()-s.getTime()),c=Math.ceil(a/(1e3*60*60*24));return c>14&&o>s?`Released on ${this.formatDate(s)}`:c<14&&o>s?`Released ${c} days ago`:c<14&&s>o?`${c} days to go`:`Releasing on ${this.formatDate(s)}`}formatDate(n){let r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=n.getDate(),s=n.getMonth(),a=n.getFullYear();return`${o} ${r[s]}, ${a}`}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"releaseDate",type:t,pure:!0,standalone:!0});let i=t;return i})();var mU=["herosection"],fU=i=>({"background-image":i});function gU(i,t){if(i&1&&y(0,"div",7),i&2){let e=t.$implicit,n=m();l("title",e==null?null:e.title)("ngStyle",H(2,fU,"url("+n.backdropUrl+(e==null?null:e.backdrop_path)+")"))}}function _U(i,t){if(i&1&&(p(0,"div",8),y(1,"img",9),h()),i&2){let e=m();d(),l("src",e.posterUrl+e.movies[e.currentIndex].poster_path,Ue)}}function vU(i,t){if(i&1&&(p(0,"div",10)(1,"h2"),_(2),ct(3,"date"),h(),y(4,"p-rating",11),ct(5,"rating"),ct(6,"rating"),p(7,"app-custom-tag",12),ct(8,"date"),_(9),ct(10,"releaseDate"),h(),p(11,"p"),_(12),h(),p(13,"div",13),y(14,"p-button",14)(15,"p-button",15),h()()),i&2){let e=m();d(2),xn(" ",e.movies[e.currentIndex].title," (",un(3,12,e.movies[e.currentIndex].release_date,"yyyy"),") "),d(2),l("cancel",!1)("ngModel",Bt(5,15,e.movies[e.currentIndex].vote_average))("readonly",!0)("title",Bt(6,17,e.movies[e.currentIndex].vote_average)),d(3),l("title",Bt(8,19,e.movies[e.currentIndex].release_date)),d(2),z(Bt(10,21,e.movies[e.currentIndex].release_date)),d(3),z(e.movies[e.currentIndex].overview),d(2),l("routerLink","/movies/"+e.movies[e.currentIndex].id)("rounded",!0),d(),l("rounded",!0)}}var F2=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.movies=[],this.carouselConfig={showSlide:1},this.backdropUrl="http://image.tmdb.org/t/p/w1280",this.posterUrl="http://image.tmdb.org/t/p/w342",this.currentIndex=0;let r=this.tmdbService.getSavingMode()}ngOnChanges(n){this.movies.length>0&&new Hammer(this.herosection.nativeElement).on("swipeleft swiperight",o=>{o.type=="swipeleft"?this.switchMovie(1):this.switchMovie(-1)})}updatePage(n){this.currentIndex=n.page}switchMovie(n){n===1?this.currentIndex0),d(),l("ngIf",o.movies.length>0))},dependencies:[No,Ie,Ce,nn,Fo,he,Sr,Ua,ld,or,ii,Bn,jh,yt,ni,Ve,et,L2],styles:[".hero-section[_ngcontent-%COMP%]{transition:all .3s;position:relative}.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{height:calc(100% - 5px);background-position:center;animation:_ngcontent-%COMP%_moveIt 10s infinite;background-size:100%;transition:all .3s;aspect-ratio:16/4}.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;object-fit:contain;opacity:0;display:none}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background:linear-gradient(to left,#0000003b 30%,#000);position:absolute;top:0;left:0;width:100%;height:calc(100% - 5px);z-index:1;padding:1rem;display:flex;align-items:center;gap:.5rem;cursor:grab}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:active{cursor:grabbing}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:180px;border-radius:10px}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:30%;display:flex;flex-direction:column;gap:.5rem;-webkit-user-select:none;user-select:none}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:5px;height:5px}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color);font-weight:600}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;color:var(--surface-500);overflow:hidden;-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%]{display:flex;gap:.5em;align-items:center;flex-wrap:wrap}@media screen and (max-width: 1120px){.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:2}}@media screen and (max-width: 991px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:16/6}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:190px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:50%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:4;width:100%}}@media screen and (max-width: 863px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:16/8}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:210px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:80%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:4}}@media screen and (max-width: 767px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:8/4}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none;width:210px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:100%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:4}}@media screen and (max-width: 577px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:8/3}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:static}}@keyframes _ngcontent-%COMP%_moveIt{0%{background-position:left}5%{background-position:right}50%{background-position:top;background-size:50%}55%{background-position:top left}73%{background-size:90%}to{background-position:center}}"]});let i=t;return i})();var N2=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.upcomingMovies={total_pages:1,total_results:20,page:1,results:[]},this.heroSectionMovies={total_pages:1,total_results:20,page:1,results:[]},document.title="Showbizhub - Explore the world of Entertainment",this.getUpcomingMovies(),this.getHeroSectionMovies(),this.getPopularCelebs()}getUpcomingMovies(){this.tmdbService.getTMDBData("movie/upcoming").subscribe(n=>{this.upcomingMovies=n})}getHeroSectionMovies(){let n=["popular","upcoming","top_rated","now_playing"],r=Math.floor(Math.random()*n.length);this.tmdbService.getTMDBData(`movie/${n[r]}`).subscribe(o=>{this.heroSectionMovies=o,this.heroSectionMovies.results=o.results.filter(s=>s.backdrop_path!==null&&s.backdrop_path!==void 0)})}getPopularCelebs(){let n=Math.floor(Math.random()*20);this.tmdbService.getTMDBData("person/popular",{page:n}).subscribe(r=>{this.celebrities=r})}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-home"]],standalone:!0,features:[R],decls:5,vars:6,consts:[[3,"movies"],["headerText","Upcoming Movies",3,"movies"],["headerText","Popular Celebrities",3,"celebs"],["showAs","column","label","Trending Now"],["containerType","combined","path","trending",3,"params","multipleResults","autoLoad"]],template:function(r,o){r&1&&(y(0,"app-hero-section",0)(1,"app-cards-carousel",1)(2,"app-cards-carousel",2),p(3,"app-top-titles",3),y(4,"app-cards-container",4),h()),r&2&&(l("movies",o.heroSectionMovies.results),d(),l("movies",o.upcomingMovies.results),d(),l("celebs",o.celebrities==null?null:o.celebrities.results),d(2),l("params","/all/day")("multipleResults",!0)("autoLoad",!1))},dependencies:[F2,D2,_t,li]});let i=t;return i})();var B2=(()=>{let t=class t{constructor(n,r,o){this.tmdbService=n,this.router=r,this.activatedRoute=o,this.tvShowsTypes=[{name:"Popular TV Shows",endpoint:"popular",id:1},{name:"Airing Today TV Shows",endpoint:"airing_today",id:2},{name:"On The Air TV Shows",endpoint:"on_the_air",id:3},{name:"Top Rated TV Shows",endpoint:"top_rated",id:4}],this.currentType=this.tvShowsTypes[0],document.title="TV Shows - Showbizhub",o.queryParams.subscribe(s=>{if(s.type){let a=this.tvShowsTypes.filter(c=>c.endpoint==s.type);this.currentType=a[0]}})}updateType(n){let r={type:n.value.endpoint};this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:r,queryParamsHandling:"merge"})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-tvshows"]],standalone:!0,features:[R],decls:3,vars:5,consts:[[3,"label"],["optionLabel","name",3,"options","ngModel","ngModelChange","onChange"],["containerType","tvshows","path","tv",3,"params","multipleResults"]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"p-dropdown",1),A("ngModelChange",function(a){return o.currentType=a})("onChange",function(a){return o.updateType(a)}),h()(),y(2,"app-cards-container",2)),r&2&&(l("label",o.currentType.name),d(),l("options",o.tvShowsTypes)("ngModel",o.currentType),d(),l("params","/"+o.currentType.endpoint)("multipleResults",!0))},dependencies:[_t,li,Rn,Wn,or,ii,Bn]});let i=t;return i})();function yU(i,t){if(i&1&&(p(0,"button"),_(1),h()),i&2){let e=m();d(),z(e.tvshow==null?null:e.tvshow.status)}}function bU(i,t){if(i&1&&(p(0,"app-details-line",32)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.tvshow==null?null:e.tvshow.status)}}function CU(i,t){if(i&1&&(p(0,"app-details-line",33)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.tvshow==null?null:e.tvshow.popularity)}}var IU=i=>({mediaType:"tv",withCompanies:i});function wU(i,t){if(i&1&&(p(0,"app-details-line",36)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("src",e.logo_path)("title",e.name)("queryParams",H(5,IU,e.id)),d(2),be(" ",e.origin_country," ")}}function TU(i,t){if(i&1&&(p(0,"div",34)(1,"h4"),_(2,"Production Companies"),h(),g(3,wU,3,7,"app-details-line",35),h()),i&2){let e=m();d(3),l("ngForOf",e.tvshow==null?null:e.tvshow.production_companies)}}var xU=i=>({mediaType:"tv",withOriginCountry:i});function SU(i,t){if(i&1&&(p(0,"app-details-line",39)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.name)("queryParams",H(4,xU,e.iso_3166_1)),d(2),be(" ",e.iso_3166_1," ")}}function EU(i,t){if(i&1&&(p(0,"div",37)(1,"h4"),_(2,"Production Countries"),h(),g(3,SU,3,6,"app-details-line",38),h()),i&2){let e=m();d(3),l("ngForOf",e.tvshow==null?null:e.tvshow.production_countries)}}var OU=i=>({mediaType:"tv",withOriginLanguage:i});function MU(i,t){if(i&1&&(p(0,"app-details-line",39)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.english_name)("queryParams",H(4,OU,e.iso_639_1)),d(2),be(" ",e.iso_639_1," ")}}function kU(i,t){if(i&1&&(p(0,"div",40)(1,"h4"),_(2,"Languages"),h(),g(3,MU,3,6,"app-details-line",38),h()),i&2){let e=m();d(3),l("ngForOf",e.tvshow==null?null:e.tvshow.spoken_languages)}}function AU(i,t){if(i&1&&(p(0,"lightgallery",14)(1,"a",41),y(2,"p-button",42),h()()),i&2){let e=m();l("settings",e.VideoSettings),d(),l("href",e.currentVideo,Ue),d(),l("rounded",!0)}}function DU(i,t){if(i&1&&(p(0,"div",43),_(1),h()),i&2){let e=m();d(),z(e.tvshow==null?null:e.tvshow.tagline)}}var z2=i=>({mediaType:"tv",withGenres:i});function PU(i,t){if(i&1&&(p(0,"a",44)(1,"div",45),y(2,"i",46),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,z2,e.id)),d(3),be("",e==null?null:e.name," ")}}function RU(i,t){if(i&1&&(p(0,"a",49),y(1,"p-button",50),h()),i&2){let e=m(2);l("href",e.tvshow==null?null:e.tvshow.homepage,Ue),d(),l("outlined",!0)("rounded",!0)}}function VU(i,t){if(i&1&&(p(0,"div",47),g(1,RU,2,3,"a",48),h()),i&2){let e=m();d(),l("ngIf",e.tvshow==null?null:e.tvshow.homepage)}}function LU(i,t){if(i&1&&(p(0,"app-custom-tag",51),y(1,"i",52),p(2,"span"),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,z2,e.id)),d(3),z(e.name)}}function FU(i,t){if(i&1&&y(0,"app-mini-celebrity-card",53),i&2){let e=t.$implicit;l("cast",e)}}function NU(i,t){if(i&1&&y(0,"app-mini-celebrity-card",55),i&2){let e=t.$implicit;l("crew",e)}}function BU(i,t){if(i&1&&(p(0,"div",54)(1,"h1"),_(2),h(),p(3,"p-carousel",25),g(4,NU,1,1,"ng-template",26),h()()),i&2){let e=m();d(2),be("Crew ",e.credits==null||e.credits.crew==null?null:e.credits.crew.length,""),d(),l("value",e.credits==null?null:e.credits.crew)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3)}}function zU(i,t){if(i&1&&(y(0,"i",56),p(1,"span"),_(2,"Backdrops"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.seriesImages==null||e.seriesImages.backdrops==null||e.seriesImages.backdrops.length==null?null:e.seriesImages.backdrops.length.toString())}}function UU(i,t){if(i&1&&(y(0,"i",56),p(1,"span"),_(2,"Posters"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.seriesImages==null||e.seriesImages.posters==null||e.seriesImages.posters.length==null?null:e.seriesImages.posters.length.toString())}}function jU(i,t){if(i&1&&(y(0,"i",56),p(1,"span"),_(2,"Videos"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.tvShowVideos==null||e.tvShowVideos.length==null?null:e.tvShowVideos.length.toString())}}function HU(i,t){if(i&1&&y(0,"app-media-gallery",57),i&2){let e=m();l("videos",e.tvShowVideos)}}function GU(i,t){if(i&1&&(y(0,"i",58),p(1,"span"),_(2,"Similar"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.similar==null?null:e.similar.total_results.toString())}}function $U(i,t){if(i&1&&y(0,"app-tvshow-card",60),i&2){let e=t.$implicit;l("tvShow",e)}}function qU(i,t){if(i&1){let e=G();p(0,"app-cards-container",59),A("scrolled",function(){S(e);let r=m();return E(r.appendMoreTvShows("similar","similar"))}),Yt(1,$U,1,1,"app-tvshow-card",60,di),h()}if(i&2){let e=m();l("infiniteScrollDistance",2)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.similar.results)}}function WU(i,t){if(i&1&&(y(0,"i",58),p(1,"span"),_(2,"Recommended"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.recommended==null?null:e.recommended.total_results.toString())}}function KU(i,t){if(i&1&&y(0,"app-tvshow-card",60),i&2){let e=t.$implicit;l("tvShow",e)}}function QU(i,t){if(i&1){let e=G();p(0,"app-cards-container",59),A("scrolled",function(){S(e);let r=m();return E(r.appendMoreTvShows("recommendations","recommended"))}),Yt(1,KU,1,1,"app-tvshow-card",60,di),h()}if(i&2){let e=m();l("infiniteScrollDistance",2)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.recommended.results)}}var YU=i=>({"background-image":i}),U2=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.isLoading=!0,this.imageUrl="https://image.tmdb.org/t/p/original",this.VideoSettings={counter:!1,plugins:[Xh]},this.ac.params.subscribe(o=>{window.scrollTo(0,0),this.currentId=o.id,this.getDetails(),this.getKeywords(),this.getCredits(),this.getImages(),this.getVideos(),this.getSimilarShows(),this.getRecommendedShows()})}getSimilarShows(){this.tmdbService.getTMDBData(`tv/${this.currentId}/similar`).subscribe(n=>{this.similar=n})}getRecommendedShows(){this.tmdbService.getTMDBData(`tv/${this.currentId}/recommendations`).subscribe(n=>{this.recommended=n})}getDetails(){this.isLoading=!0,this.tvshow=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}`).subscribe(n=>{this.tvshow=n,document.title=n.name+" - Showbizhub",this.isLoading=!1},()=>{this.isLoading=!1})}getKeywords(){this.keywords=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/keywords`).subscribe(n=>{this.keywords=n.results})}getImages(){this.seriesImages=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/images`).subscribe(n=>{this.seriesImages=n})}getCredits(){this.credits=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/credits`).subscribe(n=>{this.credits=n})}getVideos(){this.tvShowVideos=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/videos`).subscribe(n=>{this.tvShowVideos=n.results,this.playVideo()})}playVideo(){let n="https://www.youtube.com/embed/";this.tvShowVideos?.forEach(r=>{if(r.type=="Trailer"){this.currentVideo=`${n}${r.key}`;return}else if(r.type!="Trailer"&&r.type=="Teaser"){this.currentVideo=`${n}${r.key}`;return}else if(r.type!="Trailer"&&r.type!="Teaser"&&r.type=="Featurette"){this.currentVideo=`${n}${r.key}`;return}else{this.currentVideo=`${n}${r.key}`;return}})}appendMoreTvShows(n,r){let o=1;r=="similar"&&this.similar.page<500&&(o=this.similar.page+1),r=="recommended"&&this.similar.page<500&&(o=this.recommended.page+1),!(o>500)&&this.tmdbService.getTMDBData(`tv/${this.currentId}/${n}`,{page:o}).subscribe(s=>{r=="similar"?(this.similar.page=s.page,this.similar.total_pages=s.total_pages,this.similar.total_results=s.total_results,s.results.forEach(a=>{this.similar.results.push(a)})):r=="recommended"&&(this.recommended.page=s.page,this.recommended.total_pages=s.total_pages,this.recommended.total_results=s.total_results,s.results.forEach(a=>{this.recommended.results.push(a)}))})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tvshow"]],standalone:!0,features:[R],decls:68,vars:42,consts:[[3,"loading"],[1,"tv-show",3,"ngStyle"],[1,"grid-container"],[1,"poster-section"],[1,"poster"],["alt","",3,"src"],[1,"tvshow-details"],["label","Status",4,"ngIf"],["label","Popularity",4,"ngIf"],["class","production-companies",4,"ngIf"],["class","production-countries",4,"ngIf"],["class","Languages",4,"ngIf"],[1,"details-section"],[1,"top-titles"],[3,"settings"],[1,"custom-bedge",3,"title"],[3,"max","current"],["class","tagline"],[1,"sub-details"],[1,"genre"],["routerLink","/discover",3,"queryParams",4,"ngFor","ngForOf"],["class","btns",4,"ngIf"],[1,"overview"],[1,"keywords"],[1,"cast"],[3,"value","numVisible","numScroll","circular","autoplayInterval"],["pTemplate","item"],["class","crew",4,"ngIf"],["pTemplate","header"],["thumbnailKey","file_path","type","backdrops",3,"images","defaultTile"],["thumbnailKey","file_path","type","posters",3,"images","defaultTile"],["pTemplate","content"],["label","Status"],["label","Popularity"],[1,"production-companies"],["routerLink","/discover",3,"label","src","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","src","title","queryParams"],[1,"production-countries"],["routerLink","/discover",3,"label","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","title","queryParams"],[1,"Languages"],[3,"href"],["icon","pi pi-play","title","Watch Video",3,"rounded"],[1,"tagline"],["routerLink","/discover",3,"queryParams"],[1,"custom-bedge","d-flex"],[1,"pi","pi-search"],[1,"btns"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],["icon","pi pi-home","label","Visit Homepage","size","small",3,"outlined","rounded"],["severity","tags","routerLink","/discover",3,"queryParams"],[1,"pi","pi-hashtag"],[3,"cast"],[1,"crew"],[3,"crew"],[1,"pi","pi-user"],["thumbnailKey","key","type","posters",3,"videos"],[1,"pi","pi-video"],["infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],[3,"tvShow"]],template:function(r,o){r&1&&(y(0,"app-page-loader",0),p(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),y(5,"img",5),g(6,yU,2,1,"button"),h(),p(7,"div",6)(8,"h4"),_(9,"About "),p(10,"span"),_(11),h()(),g(12,bU,3,1,"app-details-line",7)(13,CU,3,1,"app-details-line",8)(14,TU,4,1,"div",9)(15,EU,4,1,"div",10)(16,kU,4,1,"div",11),h()(),p(17,"div",12)(18,"div",13),g(19,AU,3,3,"lightgallery",14),p(20,"h1"),_(21),p(22,"span",15),ct(23,"date"),_(24),ct(25,"date"),h()(),y(26,"app-circle-rating",16),h(),g(27,DU,2,1,"div",17),p(28,"div",18)(29,"div",19),g(30,PU,4,4,"a",20),h(),p(31,"span"),_(32),h(),p(33,"span"),_(34),h(),p(35,"span"),_(36),h()(),g(37,VU,2,1,"div",21),p(38,"div",22)(39,"h1"),_(40,"Overview"),h(),p(41,"p"),_(42),h(),p(43,"div",23),Yt(44,LU,4,4,"app-custom-tag",51,di),h()(),p(46,"div",24)(47,"h1"),_(48),h(),p(49,"p-carousel",25),g(50,FU,1,1,"ng-template",26),h()(),g(51,BU,5,6,"div",27),p(52,"p-tabView")(53,"p-tabPanel"),g(54,zU,5,1,"ng-template",28),y(55,"app-media-gallery",29),h(),p(56,"p-tabPanel"),g(57,UU,5,1,"ng-template",28),y(58,"app-media-gallery",30),h(),p(59,"p-tabPanel"),g(60,jU,5,1,"ng-template",28)(61,HU,1,1,"ng-template",31),h(),p(62,"p-tabPanel"),g(63,GU,5,1,"ng-template",28)(64,qU,3,3,"ng-template",31),h(),p(65,"p-tabPanel"),g(66,WU,5,1,"ng-template",28)(67,QU,3,3,"ng-template",31),h()()()()()),r&2&&(l("loading",o.isLoading),d(),l("ngStyle",H(40,YU,"url("+o.imageUrl+(o.tvshow==null?null:o.tvshow.backdrop_path)+")")),d(4),l("src",o.imageUrl+(o.tvshow==null?null:o.tvshow.poster_path),Ue),d(),Je(6,o.tvshow!=null&&o.tvshow.status?6:-1),d(5),z(o.tvshow==null?null:o.tvshow.name),d(),l("ngIf",o.tvshow==null?null:o.tvshow.status),d(),l("ngIf",o.tvshow==null?null:o.tvshow.popularity),d(),l("ngIf",o.tvshow==null?null:o.tvshow.production_companies),d(),l("ngIf",o.tvshow==null?null:o.tvshow.production_countries),d(),l("ngIf",o.tvshow==null?null:o.tvshow.spoken_languages),d(3),Je(19,(o.tvShowVideos==null?null:o.tvShowVideos.length)>0&&o.currentVideo?19:-1),d(2),be(" ",o.tvshow==null?null:o.tvshow.name," "),d(),l("title",Bt(23,35,o.tvshow==null?null:o.tvshow.first_air_date)),d(2),z(un(25,37,o.tvshow==null?null:o.tvshow.first_air_date,"yyyy")),d(2),l("max",10)("current",o.tvshow==null||o.tvshow.vote_average==null?null:o.tvshow.vote_average.toFixed(1)),d(),Je(27,o.tvshow!=null&&o.tvshow.tagline?27:-1),d(3),l("ngForOf",o.tvshow==null?null:o.tvshow.genres),d(2),xn("",o.tvshow==null?null:o.tvshow.number_of_seasons," ",o.tvshow!=null&&o.tvshow.number_of_seasons?"Seasons":"Season",""),d(2),be("\u2022 ",o.tvshow==null?null:o.tvshow.number_of_episodes," Episodes"),d(2),be("\u2022 ",o.tvshow==null?null:o.tvshow.episode_run_time," Min/Episode"),d(),l("ngIf",o.tvshow==null?null:o.tvshow.homepage),d(5),be(" ",o.tvshow==null?null:o.tvshow.overview," "),d(2),Zt(o.keywords),d(4),be("Cast ",o.credits==null||o.credits.cast==null?null:o.credits.cast.length,""),d(),l("value",o.credits==null?null:o.credits.cast)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3),d(2),l("ngIf",(o.credits==null?null:o.credits.crew.length)>0),d(4),l("images",o.seriesImages==null?null:o.seriesImages.backdrops)("defaultTile",o.tvshow==null?null:o.tvshow.name),d(3),l("images",o.seriesImages==null?null:o.seriesImages.posters)("defaultTile",o.tvshow==null?null:o.tvshow.name))},dependencies:[$,Vt,Ie,Ce,nn,Ve,et,Ga,Sr,No,Fo,he,sa,_t,zo,Bo,Yr,Qr,Jh,xr,$a,Ha,yt,ni,Yh,Qh,rm,Ka],styles:[".tv-show[_ngcontent-%COMP%]{background-size:cover;background-attachment:fixed;min-height:100vh;position:relative;color:var(--surface-500)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{-webkit-backdrop-filter:blur(35px) brightness(40%);backdrop-filter:blur(35px) brightness(40%);display:grid;padding:2rem 1rem;grid-gap:1rem;grid-template-columns:300px 1fr;color:#fff}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%]{position:relative}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;outline:0;background-color:var(--primary-color);color:var(--surface-100);position:absolute;top:0;right:0;padding:.45rem .5rem;border-radius:30px;transform:translateY(-50%)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .tvshow-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:3px;border-left:3px solid var(--primary-color);margin-left:3px;padding-left:5px;font-weight:400}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .tvshow-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600;color:var(--primary-color)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{max-width:calc(100vw - 4rem - 300px)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;margin-bottom:0;margin-right:auto}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:.5rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%] .genre[_ngcontent-%COMP%]{display:flex;align-content:center;gap:.4rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:var(--surface-500);margin-bottom:.4rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:0}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{border-radius:.5rem;color:var(--surface-500)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .keywords[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:.4em;font-size:.8em}.tv-show[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;padding:.2rem .5rem;border-radius:1.4rem;align-items:center;gap:3px}.tv-show[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8rem}.tv-show[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}@media screen and (max-width: 991px){.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{grid-template-columns:250px 1fr}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{max-width:calc(100vw - 4rem - 250px)}}@media screen and (max-width: 767px){.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{grid-template-columns:1fr}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%]{display:grid;grid-template-columns:40% 1fr;grid-gap:.5rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{max-width:calc(100vw - 4rem)}}@media screen and (max-width: 575px){.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let i=t;return i})();var j2=(()=>{let t=class t{constructor(){document.title="Celebrities - Showbizhub"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-celebrities"]],standalone:!0,features:[R],decls:2,vars:1,consts:[["label","Popular Celebrities"],["containerType","celebrities","path","person","params","/popular",3,"multipleResults"]],template:function(r,o){r&1&&y(0,"app-top-titles",0)(1,"app-cards-container",1),r&2&&(d(),l("multipleResults",!0))},dependencies:[_t,li]});let i=t;return i})();var H2=(()=>{let t=class t{transform(n,...r){var o=new Date(n);let s=Math.abs(Date.now()-o.getTime());return Math.floor(s/(1e3*3600*24)/365.25)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"age",type:t,pure:!0,standalone:!0});let i=t;return i})();var ZU=["cherosection"],XU=i=>({"background-image":i}),JU=["*"],G2=(()=>{let t=class t{constructor(){this.imageUrl="http://image.tmdb.org/t/p/original",this.filterCredits=[],this.currentIndex=0}ngOnChanges(){this.credits?.length>0&&(this.credits.forEach(r=>{r.backdrop_path&&this.filterCredits.push(r)}),new Hammer(this.herosection.nativeElement).on("swipeleft swiperight",r=>{r.type=="swipeleft"?this.switchCredit(1):this.switchCredit(-1)}),setInterval(()=>{this.switchCredit(1)},1e4))}switchCredit(n){n===1?this.currentIndex{let t=class t{constructor(n,r){this.tmdbService=n,this.ac=r,this.imageUrl="http://image.tmdb.org/t/p/original",this.expandbiography=!1,this.coverPhotos=[],this.socialPlaceholders={youtube:{url:"",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAACaUlEQVR4nO2ZPWgUURSFD6axSgr/Oi1sLYLiGp17J4UWgqiNC5Ii2Af/0E4RQVTUJilFE6IWglFBbAwm6UQx2Vi6MavFIkTxByKsW6g58p4zZlcRdtc3MzswBw4sy+zb8zFv5r13L5ApU6ZMbS9ux1oKtlCxn4IjFFyhYoSK+xRMUfGCitcULFDx2VpQpYLWvz6H3y8E187a3wruUTFMwWUKDtPHPio2U7CmtbCKHAUXqZigYq4uSPz+ajOYLIIL9LH138F3oYuKWwmGZYO+wRw668MDKygYb4NwbMiCSebRUTttTiYeSpuGOL4MIHiTeCBt2qXlN0zyYdiSt2Ed6KEn8SDaogUe6KMv8SDasg+Z+X/K2YAHN8Z9B84ZgOvOBnw5TU7dIQ+sjwvitgF45GzA4gytqhVy5Cy5c2XUAE/NGjDtHCDU+zJ5vj9KgJIBKEUGEKowSfZvigJg0UyhD5EDGH3/Rj64Su5Z5RQCVHyJBSDU4idy6CjZ2+EIwOV2uRGAUK9myQFxcgd+JAIQ6slDMr8hpQBLS/+9biQ3heYKzqZQzA/xR3cPsaAa72t0bIjc3eXmv9QCvDMA8yleyIoG4HlkAG9L5Jl8FMEZ+Fm6N3OC8bRvp4fTfaBRnE73kdJHX7oP9R560l9WMbLV4qTDaJMWzNvwFsDHicQDadM+9mdx1916EL0n6oq7FiKHTipupmDqjP5VXq8D8SAUDAYNjmLQZGiHBsegLSW2IvZiNXegmx72UjFgOziCa1SMUfGYipmgbVT+3UpSVGqCVGpaTOXg2oKt8wvuBruBS05aTJkyZcqEOPUTXMsL5gsyStgAAAAASUVORK5CYII"},instagram:{url:"https://www.instagram.com/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGFElEQVR4nGWW6XMT9x2H9y/p26TTTl9lJoSAdd+3ZHMZQQAHA+ZycY0xxIYkJBwD5DDGQ4DYTg0khExampmQQJkmlBTHNsayJfmSY0c+5duypdX1dLSrCGh/M/tGu/o+q/09n89KEHILj+oPSbe+Ieaw+pYdroVF23rmrZuZMW9nyrSLccM+wvpDjGirGNLUMKB6l17lafyKC/jWfjzbuebybMfqxkDra3/9qPWV23/8ba48fItiI+sLxLRHRdJtIO60suxws2jbwJzVy7R5Rw6yn7C+gmHtEUKaWvolyBn8BR/gW3uRztc/oX11I62rricerfqiWB6+W/0nSpQiXiWsKyDtUZNwGYk5bSzbPTLEsoVpcwmTpt2MGQ7kINWENMfpV50kqDxLjwSpp/P1K7SvbuLxq9fjP7164/cCBzWfskcNO1SwWQFFBaR3FJFqvkrq4Y+k/AHS4xOkx6dISUeE1Ng0ybEZxL5Rlh/1Eqm/x4DzIj0FH9K15hJPspDXmmlddeOywGHtAAc1sFsN25VwugJWokhrYYH04CCpHj/JTh+JJ90knvgRO4LE24PEu0Kk55elS9NLMUYOfE5PwUc5yFXaVjUPChzTxajUwgENVLggtgwzU1Czn5Rbi+gys+JwsGQvYsFazKzlDSKmnUwYyxjVlzOir2LySBOp2SjpxRh9zkt0r/2YrjUNdKy+Fhd4W5/hmA7+ooU7V+Q7P10OGxVkChUk3TpEl4UVh5Ml+zrmrcXMWLYRMZUyteEI8dYAM2e/YOJwk/TVqbp7BBTnJUjnmgZR4IwB3tHDUR0EHkN0HkrVsFUJGxRkPEqSHgOJ48dI3LiJeP0W0WOnmLHsYO7weWlo7D89jOiqpMcUfdib0/c8vrV1osAHRjhtgLf1MD4Iw37Yq4Y3VbBFCTudEOzmf1eyO8jcpoPMVZ5jcl21lJHspscD4VxGsvpeEAXqTXDBCKcMEBmBgQ44pMlB1NDXDakUmVufkSzbjrhnF4lbtyGdJukLMm2R9c1mRAyOkBiZymXkJEHFGVHgihkumuC8EWbCMNgOR7TwZw3UVcq3+3WzrG8+I3YZAixVn5IzYtxDIjhMMhyRM6I+Tr/yPVGg2QKfmKHOBHOjMNQBtTqo0sK38sZRvTmfkZRHQ8JlIl62WzoVb/mSWctWIuY3SQSHSIan+FVXyS/aowyqTogCN63QZIHLZpgfhZFOOKmHGh183ywDar1yRooVUFgg6ZvYu1M6JbZ8zoJ1k6RvMhgiFZ5k1FAuQzRHRYGvbHDDCo0WmA/DqA/OGuBdPTRVyYDvWmCXCrYpYZOsb+arm/IveKtGykhW32RviNTIOBPGvXJGtJWiwB17hts2uG6F+V9hIgAfGpH1NcBwt7ShEqTGC1Ve+FuL9Fmm+ylxt5UVh0vKSKp3gNRwmClTKePGfYzqykWBu44Md+zwpQ1mB2G6Hy6ZyOt7bh384vs/TfF3ktnmIunW59rXRWogRGpg6FnF6/eKAg8cae464O92GPsZ4otw1cIL+p4wwNVKuNsE3zTCuUOwVQXrs2apSEgVbyOztETycVu+4ieNu0SBR84UD5zwrQP8OWvuv8UL+r5vgOO6Z/qWqaFEBV5FvuKTJ6rlTW/8LF/xEVOJKNDmXubfLvinE+57IbkMsRm4XwtXLLK+54zwnv6ZvuUaXqj4kxUwNwvRKHFvMVF7IQu2jcxYtsQFujx9tLmRIPed0FoLiVxdi1GI9MNkP4wFINQhB7G/HXrbYSgAy4vytdFF0rUViC4TMadDhlg3PRUIehro8sDPbniYg9zzgu8aDP8Akz2wMArz4zA/BnNjMDsG06MQ8kHbA7hZD6V2KFQ8V/FOFm2FdQJD7pcJFMZ56oFWN/zognsO+MaOlJGsvp9aoMH0nL568hW/Xw2lKnhDmat4pVTxcad5ZcVq/Z38Xg4VFuH3xOj0wGM3/OCE7x3wDzv5jGQhz+ubbd9sxVdoYJ8adqryFZ92K1eSToP7xX8WoaKX8HsaeOLp5CdXhH854TsH+Yy0WOGa+RlE0lcP1Vq5fcvUi5So+vAq6ylSvfTb4P8CHO2RoKDh+ewAAAAASUVORK5CYII"},facebook:{url:"https://www.facebook.com/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD00lEQVR4nNWaS2tTURDHr+c0+gl8tCCI4At8rsSF7nxQ8AGCX0AEV+pGdKMutCqIWyXn3KjgY1MVH+ADBa21iqhgfYGosZqZNGmqaavGmLQZObf2QZqk995MmmZgVmnu+f/umTmZmVPL4jIdmylt3CIU7pMKzwiNzULjvf/eLBWG/n+22fytNSlMRxdJBcekgndSI7l2BTmh4a3U0GSeMbGiiaZIHWkUGlo9iS7hQsMjqaMbKq49YMMKofEpl3CZD6LgcSAUWcav/BDVSQ3HpYL+SomXww5ZqeCoWZNHvP21QWhsq7xwzA+rVivYUV+e+FBsrtT4aaLFy5Hd+GLZsMCfeAXzpYZ49cTjEETcOh2Z5028/bXB0FdfPA5BhN2H0yGqM6dB9UVjXk7gUyv4IjCufue0YVx4qo207f4POvfhN71LZul7eoByRJTK5uhHeoAiv/rpZSJDjbe73exEU0nxgeC3Jc4xxiR+5bUu+tCTJTe241HSDUA2oGB5YfVEUzh/pNbd6qY//eZdEyMADh6vhUMn0sglvuFCJ8VTA67FewFw3MZ1YwA4a5vjr36SV9vhAUAoaBlbVTKJD9hIiT+l334sNUAt0b90H9LD7i6JR9wK4sKR8DElMRPAsitdJcWfaP9J00IMayk8MhrAWz1fwre3JIuKf5/MOjvEsY5Q2D6o/lTnDNNgcAHsf9ZbFODgiz6WNaSzA5BzOjvTBrI9VCMdK5HAW+995wPQSDIImyyhcT/nQ0++Lg6w+kaCFUAo2GtKB3uiAFZd5wWQGpQlFFypVQChsdkA3K1dALjjG2Bna9KpJvO9VP3TlxmsQAv5mpsJ3wC+QmjPkx7itNkXY/5CyG8ScwL0ZnJU5zuJfR6jnADPuzJlHKMKN1cb4PzHlM9Eho2+SwlOgAPP+/yVEqHo9KFe4K3XB8y5FHO6rny/HE4VFbqrrafgd2b7SWCFr0ZXo0f9bWFVfwcO5w2xagvAyp/YDY64awNAKHxQoKmPbqgVAKlxbcHJBMdErtIAYkxDP2awhZnJCwDZcS9Ayj2RKrwDhy1Xw90yZkSVAhAmdFzf2gQ76s1Ie9IAKPhsnY3PsibigoMdQEHM+wXH6CsmhR+rBwBh8yKtsizYUe8lJ7gAhIl5z2FT+pq1yc3dAQNAxjlt2K5ZR1lAR5aOtxvlAAgFLQG7c7FVaZMK1wsND7kAhMIHRcuDipoNC8yUWGh8PdQUuQIw/+yhsN0JlbKTlMtC0emmxdv9pDd4OZxqv/Mt/eVxLJ1oi6UTdyPpjqvh1JtV1+ImjzYOd1IM9g8AXeyr2VY3tgAAAABJRU5ErkJggg=="},tiktok:{url:"https://www.tiktok.com/@",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAACeklEQVR4nO2az4tOURjHP8MgkhVGjQUWrM2CUjJ+/5iyIMnCj2Q3RkpNolGTQtkoKcpfwEYKiZX8mIUxr2xsLJQkC80MoVxzpqfOO8ztnPe9973n9T7n5qlvvbf3ns73c88595znnAt/Yg5wAngBjANGqcasxz7reVosBV4rMGlyqmK9T7VEjBDGagSYje1OJnIdF5AhBUaK6jl28JjINSogiQIjRZX8ByH/U7sI7EvpY4wt0pOevIA7MYLscoAcKQvIPOBDGUAk9gITMYHsxB8DMYHsoHYcA76VAUSiE7gCfNIMsp3s0QYst3lHFCAz6wDd0wiyzWH0RllAfgPnbFeKBmSrB0T+e2jHRMtBfthKLwMngfuOe7bUADH29wPgKLAWWAk8/Vcg8prsBeanDJ5vAKSICoHIynWBw5wPZLNGkOvADA9ENCCPgPYaED6QTZpAfgLLPOYX222Za8CwdpCrHoiDwNc6ZTdqAlnnMLM7Yz6hBuSLY4DL9buM5bu1gFQcRlbnqGyDFpDHDiM9OSpb72jNiVaADDtA1uSobEWqbEcgCJMX5LNjldqecZPtTcGHYEKCiLochg7XKfPLM6ufbSXIJdzRbw27dslluycdbYEPl5K8IDLpLfHArAIuAHeBW8ApYKHn3v0BIUyja63bNTK6LLEIeK8BxACDDULMBZ4EhjBF8xHZOJiVA0JOX182AcKEyBDfAnvq5CaSPZ5p8hFfUhTk75T3ps3XDwCHgNN24H9vIoAJDdJqJaUCGVVgJMjx9JACI0E+GOhTYKSoeqsf1VQUmGlUr6of1VQnq5FIITrTE5dQyXaO9DfNLwDx9sx2p6mWmAQ/4ELABrEc7QAAAABJRU5ErkJggg=="},imdb:{url:"https://www.imdb.com/name/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAABc0lEQVR4nGO4t0FB/d5Gpd13NyjepSa+BzJznaIaA4hxb6PSf5rgDUq7GO5uUHpAKwvublB6MGrB/xEWRFsmyPxvyxb9v2ea7P/WLBEwPrtEHs7eCxXvzhf9P7dW4v+NNYr/13RKgcWurFQgbEFRtOB/BgYGsAEgGoS78hDs3gIxMC3Iy/yfmYnhf6Ajz/8kP36w2OHZcuRZ4GvH85+REdWCYCfe/6qybP/V5dngFmQEC/wPc+X9f3qRPPEWCPMz/xfiZ/4vKsiMYQHIcEUpVrgFvrY8cB8TbYGRBgeYNtbkwGqBvCTCgpYsETDdnClCvAUgg0A0KKzRLVCWYUWxoDFdBG4R0RYUxwiB6fwIQRQL+LiZwPFirc8JtwDm22nl4rgt2DpB5n9nLiKZ7p4qC062O6fIoCRTUDhPrxQHJ2FYMl3WKvm/PUf0/+11isM5J98btWDjQATRPRpW+nc3KO1kADUtQLU/1ZstG5R23dmspAoA9upm5a9T5sgAAAAASUVORK5CYII="},twitterX:{url:"https://twitter.com/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAADf0lEQVR4nN2aWchNURTHf+YhZYoQEjJLeUCZpVCGlAdSKDJEiUzhyRBlehBeRETKA5GkRMb4FA9KZjJ9n5lCpvvZWlqnVse97rn3nPN9+1r1r3vX3vuc9d/D2muvs+FvaQ4sAy4CFUAl4KoZlUA5cAFYCjQjj8wFPnpguMuDD8DsXCS2emCgKxCbs42EK1HMDkg0Bd57YFCx+KDr+s/CdiWOpagncCWO80LklQeGxEW5EPnpgSFx8UOIZDwwJC4yhRAR1qcjoDzG7n1Gn3EW+JUWEcH0fKEB0Bf4XgSRReYZ29McEcEnoHMEMqsKNGS3absw7akV4BJQS186HHhoMF71tQpw66eA2tpubJFrtigigtWmB/cb/RuglerbRYgYbgFNtH7PGAFr0UTEZfdXAxoB90M9XEPLpv3jGUK6k9ZrDTwtkkQsIoIHSkJkYOg5882IHcrS9iswQMsbAGUxSLi4RAS7jMHrQ4b2Vr1MnSemTNzqFC2rCRyNScIlQUQwTo2SBXvV6G8AdbVsiDlprkjhDJRJgshrs8A7qYsOyjYao7cAe8z/mQmRcEkREZwwC3yO0csoDFN9PaCO/h6VcIyXSYqIYJ7p7WNG/yyULOihhyHnK5EvQFc1tgXw0pSJ5wpkQcIkXNJEBNfNAh8VCvymql6m4EnfiThgnen9HUYvu3YH1bcB3vpOpBIYqgbXB27miNMm+k7EAdv+EdavNGV7fSZyQV2tleWmXNxuvxxxmvOFyL0gxwR0ByaYUOScqXcHaJgjTnPVTeQd0EWNa649LftFe9W11TrZ4rS1vhD5AYwwC/xyKOckIyIyKWKc5qqDyC89dwR7xIEsdRab3j8YMU5zVU1kTYQp8g3oo3UaA49zHMTmVheRw8aIyXlSOLf0ECUyKPReG6cdr2oi14znGay9nq+NnD8C2RA6iPUycVpFVRF5BLTUF3fUuR6lnYzYGLPAy3IcxEannaBzmhnpbtzsvQLbPzd7TTfgrkknzTcjtjNNIuJmR+qL6mhqs5hpeYT80hC4nRYR8SroAt9XJIkAMxJMv2YKIfLZJKqvxCThdM+IkhR/l8aI+IrMf/Whp8IDQ+Lixf/yMfQc+mnXlTiWBBcGongG7y8MoNcgXIliFiHZ7IFRrkBsIofMSSGdmQbeZxuJsMh8k8UjR1T51OzTxTPxTmLbXxfPfgPQ44OgiWG49wAAAABJRU5ErkJggg=="}},this.isLoading=!0,this.genders=["Not set / not specified","Female","Male","Non-binary"],window.scrollTo(0,0)}ngOnInit(){this.getId(),this.getDetails(),this.getCredits(),this.getSocialIds()}getId(){this.ac.params.subscribe(n=>{n.id&&(this.currentId=n.id,this.celebrityId=n.id)}).unsubscribe()}getDetails(){this.isLoading=!0,this.tmdbService.getTMDBData(`person/${this.celebrityId}`).subscribe(n=>{this.currentPerson=n,this.currentCelebrity=n,document.title=n.name+" - Showbizhub",this.isLoading=!1},()=>{this.isLoading=!1})}getCredits(){this.tmdbService.getTMDBData(`person/${this.currentId}/combined_credits`).subscribe(n=>{let r=n.cast.sort((s,a)=>{let c=parseInt(s?.release_date?.slice(0,4)||s?.first_air_date?.slice(0,4));return parseInt(a?.release_date?.slice(0,4)||a?.first_air_date?.slice(0,4))-c}),o=n.crew.sort((s,a)=>{let c=parseInt(s?.release_date?.slice(0,4)||s?.first_air_date?.slice(0,4));return parseInt(a?.release_date?.slice(0,4)||a?.first_air_date?.slice(0,4))-c});this.celebrityCredits={cast:r,crew:o},this.recentProject=r})}getImages(){this.tmdbService.getTMDBData(`person/${this.currentId}/images`).subscribe(n=>{this.personImages=n.profiles})}getSocialIds(){this.tmdbService.getTMDBData(`person/${this.currentId}/external_ids`).subscribe(n=>{this.externalIDs=n})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-celebrity"]],standalone:!0,features:[R],decls:33,vars:14,consts:[[3,"loading"],[1,"celebrity"],[3,"credits"],[1,"image"],["alt","",3,"src"],[1,"titles"],[1,"name"],[1,"department"],["class","socialIds",4,"ngIf"],[1,"overview"],[1,"about"],["class","field",4,"ngIf"],[1,"bio"],["pTemplate","header"],["containerType","combined",3,"combined"],["pTemplate","content"],[1,"socialIds"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],[1,"field"],[1,"pi","pi-user"],[3,"movie"],[3,"tvShow"]],template:function(r,o){r&1&&(y(0,"app-page-loader",0),p(1,"div",1)(2,"app-celebrity-hero-section",2)(3,"div",3),y(4,"img",4),p(5,"div",5)(6,"div",6),_(7),h(),p(8,"div",7),_(9),h()()()(),g(10,oj,6,5,"div",8),p(11,"div",9)(12,"div",10)(13,"h2"),_(14,"About"),h(),g(15,sj,6,3,"div",11)(16,aj,6,3,"div",11)(17,lj,6,3,"div",11)(18,cj,5,1,"div",11)(19,dj,5,1,"div",11)(20,uj,5,1,"div",11),h(),p(21,"div",12)(22,"h2"),_(23,"Bio"),h(),p(24,"p"),_(25),h()()(),p(26,"p-tabView")(27,"p-tabPanel"),g(28,pj,5,1,"ng-template",13),y(29,"app-cards-container",14),h(),p(30,"p-tabPanel"),g(31,hj,5,1,"ng-template",13)(32,_j,3,0,"ng-template",15),h()()()),r&2&&(l("loading",o.isLoading),d(2),l("credits",o.recentProject),d(2),l("src",o.imageUrl+(o.currentCelebrity==null?null:o.currentCelebrity.profile_path),Ue),d(3),z(o.currentCelebrity==null?null:o.currentCelebrity.name),d(2),be(" ",o.currentCelebrity==null?null:o.currentCelebrity.known_for_department," "),d(),l("ngIf",o.externalIDs),d(5),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.birthday),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.birthday),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.deathday),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.place_of_birth),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.gender),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.popularity),d(5),be(" ",o.currentCelebrity==null?null:o.currentCelebrity.biography," "),d(4),l("combined",o.celebrityCredits==null?null:o.celebrityCredits.cast))},dependencies:[$,Ie,nn,Vo,Ga,Ve,H2,G2,_t,zo,Bo,Yr,Qr,he,Ka],styles:[".celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:180px;aspect-ratio:1/1;object-fit:cover;border-radius:50%;border:.4rem solid var(--primary-color);z-index:2}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{background-color:#000000c2;font-size:1.6rem;padding:6px 30px 6px 50px;transform:translate(-40px,40px);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);border-radius:5px 45px 45px 0;border-top:2px solid var(--primary-color);border-right:2px solid var(--primary-color)}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{margin-bottom:5px;font-weight:500;color:var(--primary-color)}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .department[_ngcontent-%COMP%]{font-size:1rem}.celebrity[_ngcontent-%COMP%] .socialIds[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin:.4rem}.celebrity[_ngcontent-%COMP%] .socialIds[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;display:flex;align-items:center;gap:3px;padding:4px 8px;background-color:var(--surface-100);border-radius:20px;color:var(--surface-700)}.celebrity[_ngcontent-%COMP%] .socialIds[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:1rem}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:300px 1fr;gap:1rem;padding:10px}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{border-left:2px solid var(--primary-color);margin-top:10px;padding-left:10px;margin-bottom:10px}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;background-color:var(--surface-100);padding:.2rem .4rem;border-radius:20px;margin-bottom:5px;font-size:.8rem;color:var(--surface-700)}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:500;color:var(--primary-color)}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .bio[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{background-color:var(--surface-100);color:var(--surface-700);padding:10px;border-radius:10px;font-size:.8rem}@media screen and (max-width: 767px){.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:128px}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{font-size:1.3rem;transform:translate(-40px,20px)}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let i=t;return i})();var vj=["movingbg"],yj=i=>({active:i});function bj(i,t){if(i&1){let e=G();p(0,"a",4),A("click",function(){let r=S(e),o=r.$implicit,s=r.$index,a=m();return E(a.activeTab(o,s))}),_(1),h()}if(i&2){let e=t.$implicit,n=t.$index,r=m();U(H(4,yj,r.currentTab==n)),l("routerLink",r.routes[n]),d(),be(" ",e," ")}}var Cj=i=>({long:i}),Ij=i=>({left:i}),Qa=(()=>{let t=class t{constructor(n){this.activatedRoute=n,this.data=[],this.routes=[],this.newItemEvent=new L,this.itemWidth="",this.left=0,this.currentTab=0}ngAfterViewInit(){this.active&&(this.currentTab=this.active,this.itemWidth=this.movingBG.nativeElement.style.width,this.left=this.active*100,this.movingBG.nativeElement.style.left=`${this.left}px`)}activeTab(n,r){this.left=r*100,setTimeout(()=>{this.currentTab=r},300),this.movingBG.nativeElement.style.left=`${this.left}px`,this.newItemEvent.emit({tab:n,index:r})}};t.\u0275fac=function(r){return new(r||t)(w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-switcher"]],viewQuery:function(r,o){if(r&1&&oe(vj,5),r&2){let s;q(s=W())&&(o.movingBG=s.first)}},inputs:{data:"data",routes:"routes",active:"active"},outputs:{newItemEvent:"newItemEvent"},standalone:!0,features:[R],decls:6,vars:7,consts:[[1,"switchingTabs",3,"ngClass"],[1,"tabItems"],[1,"movingBg"],["movingbg",""],[1,"tabItem",3,"routerLink","click"],["class","tabItem",3,"routerLink","class"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1),Yt(2,bj,2,6,"a",5,C1),y(4,"span",2,3),h()()),r&2&&(l("ngClass",H(3,Cj,o.data.length>3)),d(2),Zt(o.data),d(2),xt(H(5,Ij,o.left)))},dependencies:[Ve,et,$,xe],styles:[".switchingTabs[_ngcontent-%COMP%]{height:34px;border-radius:20px;padding:2px}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%]{display:flex;align-items:center;height:30px;position:relative}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .tabItem[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;width:100px;color:#4d4d4d;font-size:14px;position:relative;text-decoration:none;z-index:1;cursor:pointer;transition:color ease .3s;text-transform:capitalize}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .tabItem.active[_ngcontent-%COMP%]{color:#fff;font-weight:500}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .movingBg[_ngcontent-%COMP%]{height:30px;width:100px;border-radius:15px;background:var(--primary-color)!important;position:absolute;left:0;transition:left cubic-bezier(.88,-.35,.565,1.35) .4s}@media screen and (max-width: 577px){.switchingTabs.long[_ngcontent-%COMP%]{scale:1}}"]});let i=t;return i})();var Ey=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["CalendarIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var wj=["container"],Tj=["inputfield"],xj=["contentWrapper"];function Sj(i,t){if(i&1){let e=G();p(0,"TimesIcon",10),A("click",function(){S(e);let r=m(3);return E(r.clear())}),h()}i&2&&l("styleClass","p-calendar-clear-icon")}function Ej(i,t){}function Oj(i,t){i&1&&g(0,Ej,0,0,"ng-template")}function Mj(i,t){if(i&1){let e=G();p(0,"span",11),A("click",function(){S(e);let r=m(3);return E(r.clear())}),g(1,Oj,1,0,null,12),h()}if(i&2){let e=m(3);d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function kj(i,t){if(i&1&&(Z(0),g(1,Sj,1,1,"TimesIcon",8)(2,Mj,2,1,"span",9),X()),i&2){let e=m(2);d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function Aj(i,t){if(i&1&&y(0,"span",15),i&2){let e=m(3);l("ngClass",e.icon)}}function Dj(i,t){i&1&&y(0,"CalendarIcon")}function Pj(i,t){}function Rj(i,t){i&1&&g(0,Pj,0,0,"ng-template")}function Vj(i,t){if(i&1&&(Z(0),g(1,Dj,1,0,"CalendarIcon",6)(2,Rj,1,0,null,12),X()),i&2){let e=m(3);d(),l("ngIf",!e.triggerIconTemplate),d(),l("ngTemplateOutlet",e.triggerIconTemplate)}}function Lj(i,t){if(i&1){let e=G();p(0,"button",13),A("click",function(r){S(e),m();let o=Le(1),s=m();return E(s.onButtonClick(r,o))}),g(1,Aj,1,1,"span",14)(2,Vj,3,2,"ng-container",6),h()}if(i&2){let e=m(2);l("disabled",e.disabled),T("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible)("aria-controls",e.panelId),d(),l("ngIf",e.icon),d(),l("ngIf",!e.icon)}}function Fj(i,t){if(i&1){let e=G();p(0,"CalendarIcon",18),A("click",function(r){S(e);let o=m(3);return E(o.onButtonClick(r))}),h()}}function Nj(i,t){i&1&&ie(0)}var Bj=i=>({clickCallBack:i});function zj(i,t){if(i&1&&(Z(0),g(1,Fj,1,0,"CalendarIcon",16)(2,Nj,1,0,"ng-container",17),X()),i&2){let e=m(2);d(),l("ngIf",!e.inputIconTemplate),d(),l("ngTemplateOutlet",e.inputIconTemplate)("ngTemplateOutletContext",H(3,Bj,e.onButtonClick.bind(e)))}}function Uj(i,t){if(i&1){let e=G();p(0,"input",4,5),A("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("keydown",function(r){S(e);let o=m();return E(o.onInputKeydown(r))})("click",function(){S(e);let r=m();return E(r.onInputClick())})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))})("input",function(r){S(e);let o=m();return E(o.onUserInput(r))}),h(),g(2,kj,3,2,"ng-container",6)(3,Lj,3,6,"button",7)(4,zj,3,5,"ng-container",6)}if(i&2){let e=m();U(e.inputStyleClass),l("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),T("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("aria-expanded",e.overlayVisible)("aria-controls",e.panelId)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null),d(2),l("ngIf",e.showClear&&!e.disabled&&e.value!=null),d(),l("ngIf",e.showIcon&&e.iconDisplay==="button"),d(),l("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function jj(i,t){i&1&&ie(0)}function Hj(i,t){i&1&&y(0,"ChevronLeftIcon",40),i&2&&l("styleClass","p-datepicker-prev-icon")}function Gj(i,t){}function $j(i,t){i&1&&g(0,Gj,0,0,"ng-template")}function qj(i,t){if(i&1&&(p(0,"span",41),g(1,$j,1,0,null,12),h()),i&2){let e=m(5);d(),l("ngTemplateOutlet",e.previousIconTemplate)}}function Wj(i,t){if(i&1){let e=G();p(0,"button",38),A("keydown",function(r){S(e);let o=m(4);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(4);return E(o.onPrevButtonClick(r))}),g(1,Hj,1,1,"ChevronLeftIcon",35)(2,qj,2,1,"span",39),h()}if(i&2){let e=m(4);T("aria-label",e.prevIconAriaLabel),d(),l("ngIf",!e.previousIconTemplate),d(),l("ngIf",e.previousIconTemplate)}}function Kj(i,t){if(i&1){let e=G();p(0,"button",42),A("click",function(r){S(e);let o=m(4);return E(o.switchToMonthView(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onContainerButtonKeydown(r))}),_(1),h()}if(i&2){let e=m().$implicit,n=m(3);l("disabled",n.switchViewButtonDisabled()),T("aria-label",n.getTranslation("chooseMonth")),d(),be(" ",n.getMonthName(e.month)," ")}}function Qj(i,t){if(i&1){let e=G();p(0,"button",43),A("click",function(r){S(e);let o=m(4);return E(o.switchToYearView(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onContainerButtonKeydown(r))}),_(1),h()}if(i&2){let e=m().$implicit,n=m(3);l("disabled",n.switchViewButtonDisabled()),T("aria-label",n.getTranslation("chooseYear")),d(),be(" ",n.getYear(e)," ")}}function Yj(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(5);d(),xn("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function Zj(i,t){i&1&&ie(0)}var Oy=i=>({$implicit:i});function Xj(i,t){if(i&1&&(p(0,"span",44),g(1,Yj,2,2,"ng-container",6)(2,Zj,1,0,"ng-container",17),h()),i&2){let e=m(4);d(),l("ngIf",!e.decadeTemplate),d(),l("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",H(3,Oy,e.yearPickerValues))}}function Jj(i,t){i&1&&y(0,"ChevronRightIcon",40),i&2&&l("styleClass","p-datepicker-next-icon")}function eH(i,t){}function tH(i,t){i&1&&g(0,eH,0,0,"ng-template")}function iH(i,t){if(i&1&&(p(0,"span",45),g(1,tH,1,0,null,12),h()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.nextIconTemplate)}}function nH(i,t){if(i&1&&(p(0,"th",51)(1,"span"),_(2),h()()),i&2){let e=m(5);d(2),z(e.getTranslation("weekHeader"))}}function rH(i,t){if(i&1&&(p(0,"th",52)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;d(2),z(e)}}function oH(i,t){if(i&1&&(p(0,"td",55)(1,"span",56),_(2),h()()),i&2){let e=m().index,n=m(2).$implicit;d(2),be(" ",n.weekNumbers[e]," ")}}function sH(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(2).$implicit;d(),z(e.day)}}function aH(i,t){i&1&&ie(0)}function lH(i,t){if(i&1&&(Z(0),g(1,aH,1,0,"ng-container",17),X()),i&2){let e=m(2).$implicit,n=m(6);d(),l("ngTemplateOutlet",n.dateTemplate)("ngTemplateOutletContext",H(2,Oy,e))}}function cH(i,t){i&1&&ie(0)}function dH(i,t){if(i&1&&(Z(0),g(1,cH,1,0,"ng-container",17),X()),i&2){let e=m(2).$implicit,n=m(6);d(),l("ngTemplateOutlet",n.disabledDateTemplate)("ngTemplateOutletContext",H(2,Oy,e))}}function uH(i,t){if(i&1&&(p(0,"div",59),_(1),h()),i&2){let e=m(2).$implicit;d(),be(" ",e.day," ")}}var My=(i,t)=>({"p-highlight":i,"p-disabled":t});function pH(i,t){if(i&1){let e=G();Z(0),p(1,"span",57),A("click",function(r){S(e);let o=m().$implicit,s=m(6);return E(s.onDateSelect(r,o))})("keydown",function(r){S(e);let o=m().$implicit,s=m(3).index,a=m(3);return E(a.onDateCellKeydown(r,o,s))}),g(2,sH,2,1,"ng-container",6)(3,lH,2,4,"ng-container",6)(4,dH,2,4,"ng-container",6),h(),g(5,uH,2,1,"div",58),X()}if(i&2){let e=m().$implicit,n=m(6);d(),l("ngClass",We(5,My,n.isSelected(e)&&e.selectable,!e.selectable)),d(),l("ngIf",!n.dateTemplate&&(e.selectable||!n.disabledDateTemplate)),d(),l("ngIf",e.selectable||!n.disabledDateTemplate),d(),l("ngIf",!e.selectable),d(),l("ngIf",n.isSelected(e))}}var hH=(i,t)=>({"p-datepicker-other-month":i,"p-datepicker-today":t});function mH(i,t){if(i&1&&(p(0,"td",15),g(1,pH,6,8,"ng-container",6),h()),i&2){let e=t.$implicit,n=m(6);l("ngClass",We(3,hH,e.otherMonth,e.today)),T("aria-label",e.day),d(),l("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function fH(i,t){if(i&1&&(p(0,"tr"),g(1,oH,3,1,"td",53)(2,mH,2,6,"td",54),h()),i&2){let e=t.$implicit,n=m(5);d(),l("ngIf",n.showWeek),d(),l("ngForOf",e)}}function gH(i,t){if(i&1&&(p(0,"div",46)(1,"table",47)(2,"thead")(3,"tr"),g(4,nH,3,1,"th",48)(5,rH,3,1,"th",49),h()(),p(6,"tbody"),g(7,fH,3,2,"tr",50),h()()()),i&2){let e=m().$implicit,n=m(3);d(4),l("ngIf",n.showWeek),d(),l("ngForOf",n.weekDays),d(2),l("ngForOf",e.dates)}}function _H(i,t){if(i&1){let e=G();p(0,"div",27)(1,"div",28),g(2,Wj,3,3,"button",29),p(3,"div",30),g(4,Kj,2,3,"button",31)(5,Qj,2,3,"button",32)(6,Xj,3,5,"span",33),h(),p(7,"button",34),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(3);return E(o.onNextButtonClick(r))}),g(8,Jj,1,1,"ChevronRightIcon",35)(9,iH,2,1,"span",36),h()(),g(10,gH,8,3,"div",37),h()}if(i&2){let e=t.index,n=m(3);d(2),l("ngIf",e===0),d(2),l("ngIf",n.currentView==="date"),d(),l("ngIf",n.currentView!=="year"),d(),l("ngIf",n.currentView==="year"),d(),ki("display",n.numberOfMonths===1||e===n.numberOfMonths-1?"inline-flex":"none"),T("aria-label",n.nextIconAriaLabel),d(),l("ngIf",!n.nextIconTemplate),d(),l("ngIf",n.nextIconTemplate),d(),l("ngIf",n.currentView==="date")}}function vH(i,t){if(i&1&&(p(0,"div",59),_(1),h()),i&2){let e=m().$implicit;d(),be(" ",e," ")}}function yH(i,t){if(i&1){let e=G();p(0,"span",62),A("click",function(r){let s=S(e).index,a=m(4);return E(a.onMonthSelect(r,s))})("keydown",function(r){let s=S(e).index,a=m(4);return E(a.onMonthCellKeydown(r,s))}),_(1),g(2,vH,2,1,"div",58),h()}if(i&2){let e=t.$implicit,n=t.index,r=m(4);l("ngClass",We(3,My,r.isMonthSelected(n),r.isMonthDisabled(n))),d(),be(" ",e," "),d(),l("ngIf",r.isMonthSelected(n))}}function bH(i,t){if(i&1&&(p(0,"div",60),g(1,yH,3,6,"span",61),h()),i&2){let e=m(3);d(),l("ngForOf",e.monthPickerValues())}}function CH(i,t){if(i&1&&(p(0,"div",59),_(1),h()),i&2){let e=m().$implicit;d(),be(" ",e," ")}}function IH(i,t){if(i&1){let e=G();p(0,"span",65),A("click",function(r){let s=S(e).$implicit,a=m(4);return E(a.onYearSelect(r,s))})("keydown",function(r){let s=S(e).$implicit,a=m(4);return E(a.onYearCellKeydown(r,s))}),_(1),g(2,CH,2,1,"div",58),h()}if(i&2){let e=t.$implicit,n=m(4);l("ngClass",We(3,My,n.isYearSelected(e),n.isYearDisabled(e))),d(),be(" ",e," "),d(),l("ngIf",n.isYearSelected(e))}}function wH(i,t){if(i&1&&(p(0,"div",63),g(1,IH,3,6,"span",64),h()),i&2){let e=m(3);d(),l("ngForOf",e.yearPickerValues())}}function TH(i,t){if(i&1&&(Z(0),p(1,"div",23),g(2,_H,11,10,"div",24),h(),g(3,bH,2,1,"div",25)(4,wH,2,1,"div",26),X()),i&2){let e=m(2);d(2),l("ngForOf",e.months),d(),l("ngIf",e.currentView==="month"),d(),l("ngIf",e.currentView==="year")}}function xH(i,t){i&1&&y(0,"ChevronUpIcon")}function SH(i,t){}function EH(i,t){i&1&&g(0,SH,0,0,"ng-template")}function OH(i,t){i&1&&(Z(0),_(1,"0"),X())}function MH(i,t){i&1&&y(0,"ChevronDownIcon")}function kH(i,t){}function AH(i,t){i&1&&g(0,kH,0,0,"ng-template")}function DH(i,t){i&1&&y(0,"ChevronUpIcon")}function PH(i,t){}function RH(i,t){i&1&&g(0,PH,0,0,"ng-template")}function VH(i,t){i&1&&(Z(0),_(1,"0"),X())}function LH(i,t){i&1&&y(0,"ChevronDownIcon")}function FH(i,t){}function NH(i,t){i&1&&g(0,FH,0,0,"ng-template")}function BH(i,t){if(i&1&&(p(0,"div",69)(1,"span"),_(2),h()()),i&2){let e=m(3);d(2),z(e.timeSeparator)}}function zH(i,t){i&1&&y(0,"ChevronUpIcon")}function UH(i,t){}function jH(i,t){i&1&&g(0,UH,0,0,"ng-template")}function HH(i,t){i&1&&(Z(0),_(1,"0"),X())}function GH(i,t){i&1&&y(0,"ChevronDownIcon")}function $H(i,t){}function qH(i,t){i&1&&g(0,$H,0,0,"ng-template")}function WH(i,t){if(i&1){let e=G();p(0,"div",74)(1,"button",68),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.incrementSecond(r))})("keydown.space",function(r){S(e);let o=m(3);return E(o.incrementSecond(r))})("mousedown",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseDown(r,2,1))})("mouseup",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(3);return E(r.onTimePickerElementMouseLeave())}),g(2,zH,1,0,"ChevronUpIcon",6)(3,jH,1,0,null,12),h(),p(4,"span"),g(5,HH,2,0,"ng-container",6),_(6),h(),p(7,"button",68),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.decrementSecond(r))})("keydown.space",function(r){S(e);let o=m(3);return E(o.decrementSecond(r))})("mousedown",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseDown(r,2,-1))})("mouseup",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(3);return E(r.onTimePickerElementMouseLeave())}),g(8,GH,1,0,"ChevronDownIcon",6)(9,qH,1,0,null,12),h()()}if(i&2){let e=m(3);d(),T("aria-label",e.getTranslation("nextSecond")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),l("ngIf",e.currentSecond<10),d(),z(e.currentSecond),d(),T("aria-label",e.getTranslation("prevSecond")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate)}}function KH(i,t){i&1&&y(0,"ChevronUpIcon")}function QH(i,t){}function YH(i,t){i&1&&g(0,QH,0,0,"ng-template")}function ZH(i,t){i&1&&y(0,"ChevronDownIcon")}function XH(i,t){}function JH(i,t){i&1&&g(0,XH,0,0,"ng-template")}function eG(i,t){if(i&1){let e=G();p(0,"div",75)(1,"button",76),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))}),g(2,KH,1,0,"ChevronUpIcon",6)(3,YH,1,0,null,12),h(),p(4,"span"),_(5),h(),p(6,"button",76),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))}),g(7,ZH,1,0,"ChevronDownIcon",6)(8,JH,1,0,null,12),h()()}if(i&2){let e=m(3);d(),T("aria-label",e.getTranslation("am")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),z(e.pm?"PM":"AM"),d(),T("aria-label",e.getTranslation("pm")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate)}}function tG(i,t){if(i&1){let e=G();p(0,"div",66)(1,"div",67)(2,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.incrementHour(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.incrementHour(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,0,1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(3,xH,1,0,"ChevronUpIcon",6)(4,EH,1,0,null,12),h(),p(5,"span"),g(6,OH,2,0,"ng-container",6),_(7),h(),p(8,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.decrementHour(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.decrementHour(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,0,-1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(9,MH,1,0,"ChevronDownIcon",6)(10,AH,1,0,null,12),h()(),p(11,"div",69)(12,"span"),_(13),h()(),p(14,"div",70)(15,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.incrementMinute(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.incrementMinute(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,1,1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(16,DH,1,0,"ChevronUpIcon",6)(17,RH,1,0,null,12),h(),p(18,"span"),g(19,VH,2,0,"ng-container",6),_(20),h(),p(21,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.decrementMinute(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.decrementMinute(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,1,-1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(22,LH,1,0,"ChevronDownIcon",6)(23,NH,1,0,null,12),h()(),g(24,BH,3,1,"div",71)(25,WH,10,8,"div",72)(26,eG,9,7,"div",73),h()}if(i&2){let e=m(2);d(2),T("aria-label",e.getTranslation("nextHour")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),l("ngIf",e.currentHour<10),d(),z(e.currentHour),d(),T("aria-label",e.getTranslation("prevHour")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate),d(3),z(e.timeSeparator),d(2),T("aria-label",e.getTranslation("nextMinute")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),l("ngIf",e.currentMinute<10),d(),z(e.currentMinute),d(),T("aria-label",e.getTranslation("prevMinute")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate),d(),l("ngIf",e.showSeconds),d(),l("ngIf",e.showSeconds),d(),l("ngIf",e.hourFormat=="12")}}var q2=i=>[i];function iG(i,t){if(i&1){let e=G();p(0,"div",77)(1,"button",78),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(2);return E(o.onTodayButtonClick(r))}),h(),p(2,"button",78),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(2);return E(o.onClearButtonClick(r))}),h()()}if(i&2){let e=m(2);d(),l("label",e.getTranslation("today"))("ngClass",H(4,q2,e.todayButtonStyleClass)),d(),l("label",e.getTranslation("clear"))("ngClass",H(6,q2,e.clearButtonStyleClass))}}function nG(i,t){i&1&&ie(0)}var rG=(i,t,e,n,r,o)=>({"p-datepicker p-component":!0,"p-datepicker-inline":i,"p-disabled":t,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":n,"p-datepicker-monthpicker":r,"p-datepicker-touch-ui":o}),W2=(i,t)=>({showTransitionParams:i,hideTransitionParams:t}),oG=i=>({value:"visibleTouchUI",params:i}),sG=i=>({value:"visible",params:i});function aG(i,t){if(i&1){let e=G();p(0,"div",19,20),A("@overlayAnimation.start",function(r){S(e);let o=m();return E(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){S(e);let o=m();return E(o.onOverlayAnimationDone(r))})("click",function(r){S(e);let o=m();return E(o.onOverlayClick(r))}),Ae(2),g(3,jj,1,0,"ng-container",12)(4,TH,5,3,"ng-container",6)(5,tG,27,20,"div",21)(6,iG,3,8,"div",22),Ae(7,1),g(8,nG,1,0,"ng-container",12),h()}if(i&2){let e=m();U(e.panelStyleClass),l("ngStyle",e.panelStyle)("ngClass",zm(14,rG,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,e.view==="month",e.touchUI))("@overlayAnimation",e.touchUI?H(24,oG,We(21,W2,e.showTransitionOptions,e.hideTransitionOptions)):H(29,sG,We(26,W2,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.inline===!0),T("aria-label",e.getTranslation("chooseDate"))("role",e.inline?null:"dialog")("aria-modal",e.inline?null:"true"),d(3),l("ngTemplateOutlet",e.headerTemplate),d(),l("ngIf",!e.timeOnly),d(),l("ngIf",(e.showTime||e.timeOnly)&&e.currentView==="date"),d(),l("ngIf",e.showButtonBar),d(2),l("ngTemplateOutlet",e.footerTemplate)}}var lG=[[["p-header"]],[["p-footer"]]],cG=(i,t,e,n,r)=>({"p-calendar":!0,"p-input-icon-right":i,"p-calendar-w-btn":t,"p-calendar-timeonly":e,"p-calendar-disabled":n,"p-focus":r}),dG=["p-header","p-footer"],uG={provide:zt,useExisting:Tt(()=>Ps),multi:!0},Ps=(()=>{class i{document;el;renderer;cd;zone;config;overlayService;iconDisplay="button";style;styleClass;inputStyle;inputId;name;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;disabled;dateFormat;multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;appendTo;readonlyInput;shortYearCutoff="+10";monthNavigator;yearNavigator;hourFormat="24";timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;required;showOnFocus=!0;showWeek=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass="p-button-text";clearButtonStyleClass="p-button-text";autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){let n=e.split(":"),r=parseInt(n[0]),o=parseInt(n[1]);this.populateYearOptions(r,o)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}onFocus=new L;onBlur=new L;onClose=new L;onSelect=new L;onClear=new L;onInput=new L;onTodayClick=new L;onClearClick=new L;onMonthChange=new L;onYearChange=new L;onClickOutside=new L;onShow=new L;templates;containerViewChild;inputfieldViewChild;set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):!this.focus&&!this.inline&&this.initFocusableCell())}contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;onModelChange=()=>{};onModelTouched=()=>{};calendarElement;timePickerTimer;documentClickListener;animationEndListener;ticksTo1970;yearOptions;focus;isKeydown;filled;inputFieldValue=null;_minDate;_maxDate;_showTime;_yearRange;preventDocumentListener;dateTemplate;headerTemplate;footerTemplate;disabledDateTemplate;decadeTemplate;previousIconTemplate;nextIconTemplate;triggerIconTemplate;clearIconTemplate;decrementIconTemplate;incrementIconTemplate;inputIconTemplate;_disabledDates;_disabledDays;selectElement;todayElement;focusElement;scrollHandler;documentResizeListener;navigationState=null;isMonthNavigate;initialized;translationSubscription;_locale;_responsiveOptions;currentView;attributeSelector;panelId;_numberOfMonths=1;_firstDayOfWeek;_view="date";preventFocus;_defaultDate;window;get locale(){return this._locale}get iconButtonAriaLabel(){return this.iconAriaLabel?this.iconAriaLabel:this.getTranslation("chooseDate")}get prevIconAriaLabel(){return this.currentView==="year"?this.getTranslation("prevDecade"):this.currentView==="month"?this.getTranslation("prevYear"):this.getTranslation("prevMonth")}get nextIconAriaLabel(){return this.currentView==="year"?this.getTranslation("nextDecade"):this.currentView==="month"?this.getTranslation("nextYear"):this.getTranslation("nextMonth")}constructor(e,n,r,o,s,a,c){this.document=e,this.el=n,this.renderer=r,this.cd=o,this.zone=s,this.config=a,this.overlayService=c,this.window=this.document.defaultView}ngOnInit(){this.attributeSelector=Me(),this.panelId=this.attributeSelector+"_panel";let e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.yearOptions=[],this.currentView=this.view,this.view==="date"&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"inputicon":this.inputIconTemplate=e.template;break;case"previousicon":this.previousIconTemplate=e.template;break;case"nexticon":this.nextIconTemplate=e.template;break;case"triggericon":this.triggerIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"decrementicon":this.decrementIconTemplate=e.template;break;case"incrementicon":this.incrementIconTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;default:this.dateTemplate=e.template;break}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),!this.disabled&&!this.inline&&(this.initFocusableCell(),this.numberOfMonths===1&&this.contentViewChild&&this.contentViewChild.nativeElement&&(this.contentViewChild.nativeElement.style.width=x.getOuterWidth(this.containerViewChild?.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let r=e;r<=n;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Jt.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(n[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(n+r);return e}createMonths(e,n){this.months=this.months=[];for(let r=0;r11&&(o=o%11-1,s=n+1),this.months.push(this.createMonth(o,s))}}getWeekNumber(e){let n=new Date(e.getTime());n.setDate(n.getDate()+4-(n.getDay()||7));let r=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((r-n.getTime())/864e5)/7)+1}createMonth(e,n){let r=[],o=this.getFirstDayOfMonthIndex(e,n),s=this.getDaysCountInMonth(e,n),a=this.getDaysCountInPrevMonth(e,n),c=1,u=new Date,f=[],v=Math.ceil((s+o)/7);for(let b=0;bs){let K=this.getNextMonthAndYear(e,n);O.push({day:c-s,month:K.month,year:K.year,otherMonth:!0,today:this.isToday(u,c-s,K.month,K.year),selectable:this.isSelectable(c-s,K.month,K.year,!0)})}else O.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&f.push(this.getWeekNumber(new Date(O[0].year,O[0].month,O[0].day))),r.push(O)}return{month:e,year:n,dates:r,weekNumbers:f}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.disabled){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.disabled){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.yearNavigator&&this.currentYeare[e.length-1]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]+n,e[e.length-1]+n)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){if(this.disabled||!n.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,n)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),(this.isSingleSelection()&&this.hideOnDateTimeSelect||this.isRangeSelection()&&this.value[1])&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()}shouldSelectDate(e){return this.isMultipleSelection()&&this.maxDateCount!=null?this.maxDateCount>(this.value?this.value.length:0):!0}onMonthSelect(e,n){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){this.view==="year"?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value){if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n11,e>=12?this.currentHour=e==12?12:e-12:this.currentHour=e==0?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let n=new Date(e.year,e.month,e.day);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?n.setHours(this.pm?12:0):n.setHours(this.pm?this.currentHour+12:this.currentHour):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=n:(r=n,o=null),this.updateModel([r,o])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(e){if(this.value=e,this.dataType=="date")this.onModelChange(this.value);else if(this.dataType=="string")if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;Array.isArray(this.value)&&(n=this.value.map(r=>this.formatDateTime(r))),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(n);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let r=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,n){let r,o;return e===0?(r=11,o=n-1):(r=e-1,o=n),{month:r,year:o}}getNextMonthAndYear(e,n){let r,o;return e===11?(r=0,o=n+1):(r=e+1,o=n),{month:r,year:o}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(this.value){if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let n=!1;for(let r of this.value)if(n=this.isDateEquals(r,e),n)break;return n}else if(this.isRangeSelection())return this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e)}else return!1}isComparable(){return this.value!=null&&typeof this.value!="string"}isMonthSelected(e){if(this.isComparable()&&!this.isMultipleSelection()){let[n,r]=this.isRangeSelection()?this.value:[this.value,this.value],o=new Date(this.currentYear,e,1);return o>=n&&o<=(r??n)}return!1}isMonthDisabled(e){for(let n=1;n=s.getTime()}return o}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,n,r,o){return e.getDate()===n&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,n,r,o){let s=!0,a=!0,c=!0,u=!0;return o&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:if(this.inline||this.trapFocus(e),this.inline){let n=x.findSingle(this.containerViewChild?.nativeElement,".p-datepicker-header");e.target==n.children[n.children.length-1]&&this.initFocusableCell()}break;case 27:this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break;default:break}}onInputKeydown(e){this.isKeydown=!0,e.keyCode===40&&this.contentViewChild?this.trapFocus(e):e.keyCode===27?this.overlayVisible&&(this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault()):e.keyCode===13?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):e.keyCode===9&&this.contentViewChild&&(x.getFocusableElements(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,r){let o=e.currentTarget,s=o.parentElement;switch(e.which){case 40:{o.tabIndex="-1";let a=x.index(s),c=s.parentElement.nextElementSibling;if(c){let u=c.children[a].children[0];x.hasClass(u,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(c.children[a].children[0].tabIndex="0",c.children[a].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{o.tabIndex="-1";let a=x.index(s),c=s.parentElement.previousElementSibling;if(c){let u=c.children[a].children[0];x.hasClass(u,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(u.tabIndex="0",u.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let a=s.previousElementSibling;if(a){let c=a.children[0];x.hasClass(c,"p-disabled")||x.hasClass(c.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(c.tabIndex="0",c.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let a=s.nextElementSibling;if(a){let c=a.children[0];x.hasClass(c,"p-disabled")?this.navigateToMonth(!1,r):(c.tabIndex="0",c.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onMonthCellKeydown(e,n){let r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=x.index(r);let a=o[e.which===40?s+3:s-3];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onYearCellKeydown(e,n){let r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=x.index(r);let a=o[e.which===40?s+2:s-2];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.trapFocus(e);break}default:break}}navigateToMonth(e,n){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[n-1],o=x.find(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=o[o.length-1];s.tabIndex="0",s.focus()}else if(this.numberOfMonths===1||n===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[n+1],o=x.findSingle(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o.tabIndex="0",o.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=x.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"):this.currentView==="year"?n=x.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"):n=x.find(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else this.currentView==="month"?e=x.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"):this.currentView==="year"?e=x.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"):e=x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let e=this.contentViewChild?.nativeElement,n;if(this.currentView==="month"){let r=x.find(e,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),o=x.findSingle(e,".p-monthpicker .p-monthpicker-month.p-highlight");r.forEach(s=>s.tabIndex=-1),n=o||r[0],r.length===0&&x.find(e,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if(this.currentView==="year"){let r=x.find(e,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),o=x.findSingle(e,".p-yearpicker .p-yearpicker-year.p-highlight");r.forEach(s=>s.tabIndex=-1),n=o||r[0],r.length===0&&x.find(e,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if(n=x.findSingle(e,"span.p-highlight"),!n){let r=x.findSingle(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");r?n=r:n=x.findSingle(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}n&&(n.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.disabled||n.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=x.getFocusableElements(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let r=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(r==-1||r===0)if(this.focusTrap)n[n.length-1].focus();else{if(r===-1)return this.hideOverlay();if(r===0)return}else n[r-1].focus();else if(r==-1)if(this.timeOnly)n[0].focus();else{let o=0;for(let s=0;sa||this.minDate.getHours()===a&&(this.minDate.getMinutes()>n||this.minDate.getMinutes()===n&&this.minDate.getSeconds()>r))||this.maxDate&&c&&this.maxDate.toDateString()===c&&(this.maxDate.getHours()=24?r-24:r:this.hourFormat=="12"&&(n<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.validateTime(r,this.currentMinute,this.currentSecond,o)&&(this.currentHour=r,this.pm=o),e.preventDefault()}onTimePickerElementMouseDown(e,n,r){this.disabled||(this.repeat(e,null,n,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,r,o){let s=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},s),r){case 0:o===1?this.incrementHour(e):this.decrementHour(e);break;case 1:o===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:o===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=this.currentHour-this.stepHour,r=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(r=!this.pm),n=n<=0?12+n:n),this.validateTime(n,this.currentMinute,this.currentSecond,r)&&(this.currentHour=n,this.pm=r),e.preventDefault()}incrementMinute(e){let n=this.currentMinute+this.stepMinute;n=n>59?n-60:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}decrementMinute(e){let n=this.currentMinute-this.stepMinute;n=n<0?60+n:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,this.hourFormat=="12"?this.currentHour===12?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(this.value[1]?e=[this.value[0],e]:e=[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){let n=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,n)&&(this.pm=n,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let r=this.parseValueFromString(n);this.isValidSelection(r)?(this.updateModel(r),this.updateUI()):this.keepInvalid&&this.updateModel(r)}catch{let o=this.keepInvalid?n:null;this.updateModel(o)}this.filled=n!=null&&n.length,this.onInput.emit(e)}isValidSelection(e){let n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1))&&this.isRangeSelection()&&(n=e.length>1&&e[1]>e[0]),n}parseValueFromString(e){if(!e||e.trim().length===0)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);n=[];for(let o of r)n.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");n=[];for(let o=0;o{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),x.blockBodyScroll())}disableModality(){this.mask&&(x.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener||(this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyMask.bind(this))))}destroyMask(){if(!this.mask)return;this.renderer.removeChild(this.document.body,this.mask);let e=this.document.body.children,n;for(let r=0;r{let v=r+1{let O=""+v;if(o(f))for(;O.lengtho(f)?O[v]:b[v],c="",u=!1;if(e)for(r=0;r11&&r!=12&&(r-=12),this.hourFormat=="12"?n+=r===0?12:r<10?"0"+r:r:n+=r<10?"0"+r:r,n+=":",n+=o<10?"0"+o:o,this.showSeconds&&(n+=":",n+=s<10?"0"+s:s),this.hourFormat=="12"&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":"),r=this.showSeconds?3:2;if(n.length!==r)throw"Invalid time";let o=parseInt(n[0]),s=parseInt(n[1]),a=this.showSeconds?parseInt(n[2]):null;if(isNaN(o)||isNaN(s)||o>23||s>59||this.hourFormat=="12"&&o>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return this.hourFormat=="12"&&(o!==12&&this.pm?o+=12:!this.pm&&o===12&&(o-=12)),{hour:o,minute:s,second:a}}parseDate(e,n){if(n==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let r,o,s,a=0,c=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),u=-1,f=-1,v=-1,b=-1,O=!1,V,K=_e=>{let me=r+1{let me=K(_e),qe=_e==="@"?14:_e==="!"?20:_e==="y"&&me?4:_e==="o"?3:2,Ge=_e==="y"?qe:1,Et=new RegExp("^\\d{"+Ge+","+qe+"}"),ht=e.substring(a).match(Et);if(!ht)throw"Missing number at position "+a;return a+=ht[0].length,parseInt(ht[0],10)},j=(_e,me,qe)=>{let Ge=-1,Et=K(_e)?qe:me,ht=[];for(let Ht=0;Ht-(Ht[1].length-_i[1].length));for(let Ht=0;Ht{if(e.charAt(a)!==n.charAt(r))throw"Unexpected literal at position "+a;a++};for(this.view==="month"&&(v=1),r=0;r-1){f=1,v=b;do{if(o=this.getDaysCountInMonth(u,f-1),v<=o)break;f++,v-=o}while(!0)}if(this.view==="year"&&(f=f===-1?1:f,v=v===-1?1:v),V=this.daylightSavingAdjust(new Date(u,f-1,v)),V.getFullYear()!==u||V.getMonth()+1!==f||V.getDate()!==v)throw"Invalid date";return V}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&this.inputFieldValue!=""}onTodayButtonClick(e){let n=new Date,r={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(n.getMonth(),n.getFullYear()),this.onDateSelect(e,r),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(r=>!!(r.breakpoint&&r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r=n&&(e=o)}}if(this._numScroll!==e.numScroll){let n=this._page;n=Math.floor(n*this._numScroll/e.numScroll);let r=e.numScroll*this.page*-1;this.isCircular()&&(r-=e.numVisible),this.totalShiftedItems=r,this._numScroll=e.numScroll,this._page=n,this.onPage.emit({page:this.page})}this._numVisible!==e.numVisible&&(this._numVisible=e.numVisible,this.setCloneItems()),this.cd.markForCheck()}}setCloneItems(){this.clonedItemsForStarting=[],this.clonedItemsForFinishing=[],this.isCircular()&&(this.clonedItemsForStarting.push(...this.value.slice(-1*this._numVisible)),this.clonedItemsForFinishing.push(...this.value.slice(0,this._numVisible)))}firstIndex(){return this.isCircular()?-1*(this.totalShiftedItems+this.numVisible):this.totalShiftedItems*-1}lastIndex(){return this.firstIndex()+this.numVisible-1}totalDots(){return this.value?.length?Math.ceil((this.value.length-this._numVisible)/this._numScroll)+1:0}totalDotsArray(){let e=this.totalDots();return e<=0?[]:Array(e).fill(0)}isVertical(){return this.orientation==="vertical"}isCircular(){return this.circular&&this.value&&this.value.length>=this.numVisible}isAutoplay(){return this.autoplayInterval&&this.allowAutoplay}isForwardNavDisabled(){return this.isEmpty()||this._page>=this.totalDots()-1&&!this.isCircular()}isBackwardNavDisabled(){return this.isEmpty()||this._page<=0&&!this.isCircular()}isEmpty(){return!this.value||this.value.length===0}navForward(e,n){(this.isCircular()||this._pager?this.navForward(e,n):nx.getAttribute(s,"data-p-highlight")===!0),r=x.findSingle(this.indicatorContent.nativeElement,'[data-pc-section="indicator"] > button[tabindex="0"]'),o=e.findIndex(s=>s===r.parentElement);e[o].children[0].tabIndex="-1",e[n].children[0].tabIndex="0"}findFocusedIndicatorIndex(){let e=[...x.find(this.indicatorContent.nativeElement,'[data-pc-section="indicator"]')],n=x.findSingle(this.indicatorContent.nativeElement,'[data-pc-section="indicator"] > button[tabindex="0"]');return e.findIndex(r=>r===n.parentElement)}changedFocusedIndicator(e,n){let r=[...x.find(this.indicatorContent.nativeElement,'[data-pc-section="indicator"]')];r[e].children[0].tabIndex="-1",r[n].children[0].tabIndex="0",r[n].children[0].focus()}step(e,n){let r=this.totalShiftedItems,o=this.isCircular();if(n!=null)r=this._numScroll*n*-1,o&&(r-=this._numVisible),this.isRemainingItemsAdded=!1;else{r+=this._numScroll*e,this.isRemainingItemsAdded&&(r+=this.remainingItems-this._numScroll*e,this.isRemainingItemsAdded=!1);let s=o?r+this._numVisible:r;n=Math.abs(Math.floor(s/this._numScroll))}o&&this.page===this.totalDots()-1&&e===-1?(r=-1*(this.value.length+this._numVisible),n=0):o&&this.page===0&&e===1?(r=0,n=this.totalDots()-1):n===this.totalDots()-1&&this.remainingItems>0&&(r+=this.remainingItems*-1-this._numScroll*e,this.isRemainingItemsAdded=!0),this.itemsContainer&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?`translate3d(0, ${r*(100/this._numVisible)}%, 0)`:`translate3d(${r*(100/this._numVisible)}%, 0, 0)`,this.itemsContainer.nativeElement.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=r,this._page=n,this.onPage.emit({page:this.page}),this.cd.markForCheck()}startAutoplay(){this.interval=setInterval(()=>{this.totalDots()>0&&(this.page===this.totalDots()-1?this.step(-1,0):this.step(-1,this.page+1))},this.autoplayInterval),this.allowAutoplay=!0,this.cd.markForCheck()}stopAutoplay(e=!0){this.interval&&(clearInterval(this.interval),this.interval=void 0,e&&(this.allowAutoplay=!1)),this.cd.markForCheck()}isPlaying(){return!!this.interval}onTransitionEnd(){this.itemsContainer&&(this.itemsContainer.nativeElement.style.transition="",(this.page===0||this.page===this.totalDots()-1)&&this.isCircular()&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?`translate3d(0, ${this.totalShiftedItems*(100/this._numVisible)}%, 0)`:`translate3d(${this.totalShiftedItems*(100/this._numVisible)}%, 0, 0)`))}onTouchStart(e){let n=e.changedTouches[0];this.startPos={x:n.pageX,y:n.pageY}}onTouchMove(e){e.cancelable&&e.preventDefault()}onTouchEnd(e){let n=e.changedTouches[0];this.isVertical()?this.changePageOnTouch(e,n.pageY-this.startPos.y):this.changePageOnTouch(e,n.pageX-this.startPos.x)}changePageOnTouch(e,n){Math.abs(n)>this.swipeThreshold&&(n<0?this.navForward(e):this.navBackward(e))}ariaPrevButtonLabel(){return this.config.translation.aria?this.config.translation.aria.prevPageLabel:void 0}ariaSlideLabel(){return this.config.translation.aria?this.config.translation.aria.slide:void 0}ariaNextButtonLabel(){return this.config.translation.aria?this.config.translation.aria.nextPageLabel:void 0}ariaSlideNumber(e){return this.config.translation.aria?this.config.translation.aria.slideNumber.replace(/{slideNumber}/g,e):void 0}ariaPageLabel(e){return this.config.translation.aria?this.config.translation.aria.pageLabel.replace(/{page}/g,e):void 0}bindDocumentListeners(){ut(this.platformId)&&(this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{this.calculatePosition()})))}unbindDocumentListeners(){ut(this.platformId)&&this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}ngOnDestroy(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()}static \u0275fac=function(n){return new(n||i)(w(ve),w(ge),w(Ne),w(nt),w(Oe),w(vt),w(At))};static \u0275cmp=k({type:i,selectors:[["p-carousel"]],contentQueries:function(n,r,o){if(n&1&&(De(o,fo,5),De(o,go,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(U7,5),oe(j7,5)),n&2){let o;q(o=W())&&(r.itemsContainer=o.first),q(o=W())&&(r.indicatorContent=o.first)}},hostAttrs:[1,"p-element"],inputs:{page:"page",numVisible:"numVisible",numScroll:"numScroll",responsiveOptions:"responsiveOptions",orientation:"orientation",verticalViewPortHeight:"verticalViewPortHeight",contentClass:"contentClass",indicatorsContentClass:"indicatorsContentClass",indicatorsContentStyle:"indicatorsContentStyle",indicatorStyleClass:"indicatorStyleClass",indicatorStyle:"indicatorStyle",value:"value",circular:"circular",showIndicators:"showIndicators",showNavigators:"showNavigators",autoplayInterval:"autoplayInterval",style:"style",styleClass:"styleClass"},outputs:{onPage:"onPage"},features:[Mt],ngContentSelectors:IB,decls:14,vars:23,consts:[["role","region",3,"ngClass","ngStyle"],["class","p-carousel-header",4,"ngIf"],[3,"ngClass"],[1,"p-carousel-container"],["type","button","pRipple","",3,"ngClass","disabled","click",4,"ngIf"],[1,"p-carousel-items-content",3,"ngStyle","touchend","touchstart","touchmove"],[1,"p-carousel-items-container",3,"transitionend"],["itemsContainer",""],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass","class","ngStyle","keydown",4,"ngIf"],["class","p-carousel-footer",4,"ngIf"],[1,"p-carousel-header"],[4,"ngTemplateOutlet"],["type","button","pRipple","",3,"ngClass","disabled","click"],[4,"ngIf"],["class","p-carousel-prev-icon",4,"ngIf"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-carousel-prev-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass","ngStyle","keydown"],["indicatorContent",""],["type","button",3,"ngClass","ngStyle","tabindex","click"],[1,"p-carousel-footer"]],template:function(n,r){n&1&&(Ue(yB),p(0,"div",0),g(1,G7,3,1,"div",1),p(2,"div",2)(3,"div",3),g(4,X7,3,7,"button",4),p(5,"div",5),A("touchend",function(s){return r.onTouchEnd(s)})("touchstart",function(s){return r.onTouchStart(s)})("touchmove",function(s){return r.onTouchMove(s)}),p(6,"div",6,7),A("transitionend",function(){return r.onTransitionEnd()}),g(8,eB,2,12,"div",8)(9,nB,2,12,"div",8)(10,oB,2,9,"div",8),h()(),g(11,hB,3,7,"button",4),h(),g(12,gB,3,5,"ul",9),h(),g(13,vB,3,1,"div",10),h()),n&2&&(U(r.styleClass),l("ngClass",We(18,bB,r.isVertical(),!r.isVertical()))("ngStyle",r.style),T("id",r.id),d(),l("ngIf",r.headerFacet||r.headerTemplate),d(),U(r.contentClass),l("ngClass","p-carousel-content"),d(),T("aria-live",r.allowAutoplay?"polite":"off"),d(),l("ngIf",r.showNavigators),d(),l("ngStyle",H(21,CB,r.isVertical()?r.verticalViewPortHeight:"auto")),d(3),l("ngForOf",r.clonedItemsForStarting),d(),l("ngForOf",r.value),d(),l("ngForOf",r.clonedItemsForFinishing),d(),l("ngIf",r.showNavigators),d(),l("ngIf",r.showIndicators),d(),l("ngIf",r.footerFacet||r.footerTemplate))},dependencies:()=>[xe,Vt,Ie,rt,Ce,ui,Yn,Qn,en,qa],styles:[`@layer primeng{.p-carousel{display:flex;flex-direction:column}.p-carousel-content{display:flex;flex-direction:column;overflow:auto}.p-carousel-prev,.p-carousel-next{align-self:center;flex-grow:0;flex-shrink:0;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-carousel-container{display:flex;flex-direction:row}.p-carousel-items-content{overflow:hidden;width:100%}.p-carousel-items-container{display:flex;flex-direction:row}.p-carousel-indicators{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.p-carousel-indicator>button{display:flex;align-items:center;justify-content:center}.p-carousel-vertical .p-carousel-container{flex-direction:column}.p-carousel-vertical .p-carousel-items-container{flex-direction:column;height:100%}.p-items-hidden .p-carousel-item{visibility:hidden}.p-items-hidden .p-carousel-item.p-carousel-item-active{visibility:visible}} +`],encapsulation:2,changeDetection:0})}return i})(),No=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Rt,Yn,Qn,en,qa,$,Te]})}return i})();var tm=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Ui,Te,Te]})}return i})();function wB(i,t){i&1&&ie(0)}function TB(i,t){if(i&1&&(Z(0),g(1,wB,1,0,"ng-container",3),X()),i&2){let e=m(2);d(),l("ngTemplateOutlet",e.contentTemplate)}}function xB(i,t){if(i&1&&(p(0,"div",1),Ae(1),g(2,TB,2,1,"ng-container",2),h()),i&2){let e=m();l("hidden",!e.selected),T("id",e.tabView.getTabContentId(e.id))("aria-hidden",!e.selected)("aria-labelledby",e.tabView.getTabHeaderActionId(e.id))("data-pc-name","tabpanel"),d(2),l("ngIf",e.contentTemplate&&(e.cache?e.loaded:e.selected))}}var k2=["*"],SB=["content"],EB=["navbar"],OB=["prevBtn"],MB=["nextBtn"],kB=["inkbar"],AB=["elementToObserve"];function DB(i,t){i&1&&y(0,"ChevronLeftIcon"),i&2&&T("aria-hidden",!0)}function PB(i,t){}function RB(i,t){i&1&&g(0,PB,0,0,"ng-template")}function VB(i,t){if(i&1){let e=G();p(0,"button",13,14),A("click",function(){S(e);let r=m();return E(r.navBackward())}),g(2,DB,1,1,"ChevronLeftIcon",15)(3,RB,1,0,null,16),h()}if(i&2){let e=m();T("tabindex",e.tabindex)("aria-label",e.prevButtonAriaLabel),d(2),l("ngIf",!e.previousIconTemplate),d(),l("ngTemplateOutlet",e.previousIconTemplate)}}function LB(i,t){if(i&1&&y(0,"span",25),i&2){let e=m(3).$implicit;l("ngClass",e.leftIcon)}}function FB(i,t){}function NB(i,t){i&1&&g(0,FB,0,0,"ng-template")}function BB(i,t){if(i&1&&(p(0,"span",26),g(1,NB,1,0,null,16),h()),i&2){let e=m(3).$implicit;d(),l("ngTemplateOutlet",e.leftIconTemplate)}}function zB(i,t){if(i&1&&y(0,"span",27),i&2){let e=m(3).$implicit;l("ngClass",e.rightIcon)}}function UB(i,t){}function jB(i,t){i&1&&g(0,UB,0,0,"ng-template")}function HB(i,t){if(i&1&&(p(0,"span",28),g(1,jB,1,0,null,16),h()),i&2){let e=m(3).$implicit;d(),l("ngTemplateOutlet",e.rightIconTemplate)}}function GB(i,t){if(i&1&&(Z(0),g(1,LB,1,1,"span",20)(2,BB,2,1,"span",21),p(3,"span",22),_(4),h(),g(5,zB,1,1,"span",23)(6,HB,2,1,"span",24),X()),i&2){let e=m(2).$implicit;d(),l("ngIf",e.leftIcon&&!e.leftIconTemplate),d(),l("ngIf",e.leftIconTemplate),d(2),z(e.header),d(),l("ngIf",e.rightIcon&&!e.rightIconTemplate),d(),l("ngIf",e.rightIconTemplate)}}function $B(i,t){i&1&&ie(0)}function qB(i,t){if(i&1){let e=G();p(0,"TimesIcon",31),A("click",function(r){S(e);let o=m(3).$implicit,s=m();return E(s.close(r,o))}),h()}i&2&&l("styleClass","p-tabview-close")}function WB(i,t){i&1&&y(0,"span",32)}function KB(i,t){}function QB(i,t){i&1&&g(0,KB,0,0,"ng-template")}function YB(i,t){if(i&1&&(Z(0),g(1,qB,1,1,"TimesIcon",29)(2,WB,1,0,"span",30)(3,QB,1,0,null,16),X()),i&2){let e=m(2).$implicit;d(),l("ngIf",!e.closeIconTemplate),d(),l("ngIf",e.closeIconTemplate),d(),l("ngTemplateOutlet",e.closeIconTemplate)}}var ZB=(i,t)=>({"p-highlight":i,"p-disabled":t});function XB(i,t){if(i&1){let e=G();p(0,"li",18)(1,"a",19),A("click",function(r){S(e);let o=m().$implicit,s=m();return E(s.open(r,o))})("keydown",function(r){S(e);let o=m().$implicit,s=m();return E(s.onTabKeyDown(r,o))}),g(2,GB,7,5,"ng-container",15)(3,$B,1,0,"ng-container",16)(4,YB,4,3,"ng-container",15),h()()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m();U(n.headerStyleClass),l("ngClass",We(19,ZB,n.selected,n.disabled))("ngStyle",n.headerStyle),T("data-p-disabled",n.disabled),d(),l("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass),T("id",o.getTabHeaderActionId(n.id))("aria-controls",o.getTabContentId(n.id))("aria-selected",n.selected)("tabindex",n.disabled||!n.selected?"-1":o.tabindex)("aria-disabled",n.disabled)("data-pc-index",r)("data-pc-section","headeraction"),d(),l("ngIf",!n.headerTemplate),d(),l("ngTemplateOutlet",n.headerTemplate),d(),l("ngIf",n.closable)}}function JB(i,t){if(i&1&&g(0,XB,5,22,"li",17),i&2){let e=t.$implicit;l("ngIf",!e.closed)}}function ez(i,t){i&1&&y(0,"ChevronRightIcon"),i&2&&T("aria-hidden",!0)}function tz(i,t){}function iz(i,t){i&1&&g(0,tz,0,0,"ng-template")}function nz(i,t){if(i&1){let e=G();p(0,"button",33,34),A("click",function(){S(e);let r=m();return E(r.navForward())}),g(2,ez,1,1,"ChevronRightIcon",15)(3,iz,1,0,null,16),h()}if(i&2){let e=m();T("tabindex",e.tabindex)("aria-label",e.nextButtonAriaLabel),d(2),l("ngIf",!e.nextIconTemplate),d(),l("ngTemplateOutlet",e.nextIconTemplate)}}var rz=i=>({"p-tabview p-component":!0,"p-tabview-scrollable":i}),Qr=(()=>{class i{el;viewContainer;cd;closable=!1;get headerStyle(){return this._headerStyle}set headerStyle(e){this._headerStyle=e,this.tabView.cd.markForCheck()}get headerStyleClass(){return this._headerStyleClass}set headerStyleClass(e){this._headerStyleClass=e,this.tabView.cd.markForCheck()}cache=!0;tooltip;tooltipPosition="top";tooltipPositionStyle="absolute";tooltipStyleClass;get selected(){return!!this._selected}set selected(e){this._selected=e,this.loaded||this.cd.detectChanges(),e&&(this.loaded=!0)}get disabled(){return!!this._disabled}set disabled(e){this._disabled=e,this.tabView.cd.markForCheck()}get header(){return this._header}set header(e){this._header=e,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(e){this._leftIcon=e,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(e){this._rightIcon=e,this.tabView.cd.markForCheck()}templates;closed=!1;view=null;_headerStyle;_headerStyleClass;_selected;_disabled;_header;_leftIcon;_rightIcon=void 0;loaded=!1;id;contentTemplate;headerTemplate;leftIconTemplate;rightIconTemplate;closeIconTemplate;tabView;constructor(e,n,r,o){this.el=n,this.viewContainer=r,this.cd=o,this.tabView=e,this.id=Me()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"righticon":this.rightIconTemplate=e.template;break;case"lefticon":this.leftIconTemplate=e.template;break;case"closeicon":this.closeIconTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}ngOnDestroy(){this.view=null}static \u0275fac=function(n){return new(n||i)(w(Tt(()=>Yr)),w(ve),w(Hs),w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-tabPanel"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{closable:"closable",headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:"cache",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},ngContentSelectors:k2,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(n,r){n&1&&(Ue(),g(0,xB,3,6,"div",0)),n&2&&l("ngIf",!r.closed)},dependencies:[Ie,rt],encapsulation:2})}return i})(),Yr=(()=>{class i{platformId;el;cd;renderer;style;styleClass;controlClose;scrollable;get activeIndex(){return this._activeIndex}set activeIndex(e){if(this._activeIndex=e,this.preventActiveIndexPropagation){this.preventActiveIndexPropagation=!1;return}this.tabs&&this.tabs.length&&this._activeIndex!=null&&this.tabs.length>this._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(e))}selectOnFocus=!1;nextButtonAriaLabel;prevButtonAriaLabel;autoHideButtons=!0;tabindex=0;onChange=new L;onClose=new L;activeIndexChange=new L;content;navbar;prevBtn;nextBtn;inkbar;tabPanels;templates;initialized;tabs;_activeIndex;preventActiveIndexPropagation;tabChanged;backwardIsDisabled=!0;forwardIsDisabled=!1;tabChangesSubscription;nextIconTemplate;previousIconTemplate;resizeObserver;container;list;buttonVisible;elementToObserve;constructor(e,n,r,o){this.platformId=e,this.el=n,this.cd=r,this.renderer=o}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(e=>{this.initTabs()}),this.templates.forEach(e=>{switch(e.getType()){case"previousicon":this.previousIconTemplate=e.template;break;case"nexticon":this.nextIconTemplate=e.template;break}})}ngAfterViewInit(){ut(this.platformId)&&this.autoHideButtons&&this.bindResizeObserver()}bindResizeObserver(){this.container=x.findSingle(this.el.nativeElement,'[data-pc-section="navcontent"]'),this.list=x.findSingle(this.el.nativeElement,'[data-pc-section="nav"]'),this.resizeObserver=new ResizeObserver(()=>{this.list.offsetWidth>this.container.offsetWidth?this.buttonVisible=!0:this.buttonVisible=!1,this.updateButtonState(),this.cd.detectChanges()}),this.resizeObserver.observe(this.container)}unbindResizeObserver(){this.resizeObserver.unobserve(this.elementToObserve.nativeElement),this.resizeObserver=null}ngAfterViewChecked(){ut(this.platformId)&&this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe(),this.resizeObserver&&this.unbindResizeObserver()}getTabHeaderActionId(e){return`${e}_header_action`}getTabContentId(e){return`${e}_content`}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(this.activeIndex!=null&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}onTabKeyDown(e,n){switch(e.code){case"ArrowLeft":this.onTabArrowLeftKey(e);break;case"ArrowRight":this.onTabArrowRightKey(e);break;case"Home":this.onTabHomeKey(e);break;case"End":this.onTabEndKey(e);break;case"PageDown":this.onTabEndKey(e);break;case"PageUp":this.onTabHomeKey(e);break;case"Enter":case"Space":this.open(e,n);break;default:break}}onTabArrowLeftKey(e){let n=this.findPrevHeaderAction(e.target.parentElement),r=x.getAttribute(n,"data-pc-index");n?this.changeFocusedTab(e,n,r):this.onTabEndKey(e),e.preventDefault()}onTabArrowRightKey(e){let n=this.findNextHeaderAction(e.target.parentElement),r=x.getAttribute(n,"data-pc-index");n?this.changeFocusedTab(e,n,r):this.onTabHomeKey(e),e.preventDefault()}onTabHomeKey(e){let n=this.findFirstHeaderAction(),r=x.getAttribute(n,"data-pc-index");this.changeFocusedTab(e,n,r),e.preventDefault()}onTabEndKey(e){let n=this.findLastHeaderAction(),r=x.getAttribute(n,"data-pc-index");this.changeFocusedTab(e,n,r),e.preventDefault()}changeFocusedTab(e,n,r){if(n&&(x.focus(n),n.scrollIntoView({block:"nearest"}),this.selectOnFocus)){let o=this.tabs[r];this.open(e,o)}}findNextHeaderAction(e,n=!1){let r=n?e:e.nextElementSibling;return r?x.getAttribute(r,"data-p-disabled")||x.getAttribute(r,"data-pc-section")==="inkbar"?this.findNextHeaderAction(r):x.findSingle(r,'[data-pc-section="headeraction"]'):null}findPrevHeaderAction(e,n=!1){let r=n?e:e.previousElementSibling;return r?x.getAttribute(r,"data-p-disabled")||x.getAttribute(r,"data-pc-section")==="inkbar"?this.findPrevHeaderAction(r):x.findSingle(r,'[data-pc-section="headeraction"]'):null}findFirstHeaderAction(){let e=this.navbar.nativeElement.firstElementChild;return this.findNextHeaderAction(e,!0)}findLastHeaderAction(){let e=this.navbar.nativeElement.lastElementChild,n=x.getAttribute(e,"data-pc-section")==="inkbar"?e.previousElementSibling:e;return this.findPrevHeaderAction(n,!0)}open(e,n){if(n.disabled){e&&e.preventDefault();return}if(!n.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,n.selected=!0;let o=this.findTabIndex(n);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:e,index:o}),this.updateScrollBar(o)}e&&e.preventDefault()}close(e,n){this.controlClose?this.onClose.emit({originalEvent:e,index:this.findTabIndex(n),close:()=>{this.closeTab(n)}}):(this.closeTab(n),this.onClose.emit({originalEvent:e,index:this.findTabIndex(n)}))}closeTab(e){if(!e.disabled){if(e.selected){this.tabChanged=!0,e.selected=!1;for(let n=0;nn?e+x.getWidth(n):e,0)}navBackward(){let e=this.content.nativeElement,n=x.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft-n;e.scrollLeft=r<=0?0:r}navForward(){let e=this.content.nativeElement,n=x.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+n,o=e.scrollWidth-n;e.scrollLeft=r>=o?o:r}static \u0275fac=function(n){return new(n||i)(w(vt),w(ve),w(Ne),w(nt))};static \u0275cmp=k({type:i,selectors:[["p-tabView"]],contentQueries:function(n,r,o){if(n&1&&(De(o,Qr,4),De(o,he,4)),n&2){let s;q(s=W())&&(r.tabPanels=s),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(SB,5),oe(EB,5),oe(OB,5),oe(MB,5),oe(kB,5),oe(AB,5)),n&2){let o;q(o=W())&&(r.content=o.first),q(o=W())&&(r.navbar=o.first),q(o=W())&&(r.prevBtn=o.first),q(o=W())&&(r.nextBtn=o.first),q(o=W())&&(r.inkbar=o.first),q(o=W())&&(r.elementToObserve=o.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",controlClose:"controlClose",scrollable:"scrollable",activeIndex:"activeIndex",selectOnFocus:"selectOnFocus",nextButtonAriaLabel:"nextButtonAriaLabel",prevButtonAriaLabel:"prevButtonAriaLabel",autoHideButtons:"autoHideButtons",tabindex:"tabindex"},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},ngContentSelectors:k2,decls:14,vars:13,consts:[[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["elementToObserve",""],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabview-nav"],["navbar",""],["ngFor","",3,"ngForOf"],["role","presentation","aria-hidden","true",1,"p-tabview-ink-bar"],["inkbar",""],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],["prevBtn",""],[4,"ngIf"],[4,"ngTemplateOutlet"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","click","keydown"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],["class","p-tabview-left-icon",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],["class","p-tabview-right-icon",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-left-icon"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-right-icon"],[3,"styleClass","click",4,"ngIf"],["class","tab.closeIconTemplate",4,"ngIf"],[3,"styleClass","click"],[1,"tab.closeIconTemplate"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"],["nextBtn",""]],template:function(n,r){n&1&&(Ue(),p(0,"div",0)(1,"div",1,2),g(3,VB,4,4,"button",3),p(4,"div",4,5),A("scroll",function(s){return r.onScroll(s)}),p(6,"ul",6,7),g(8,JB,1,1,"ng-template",8),y(9,"li",9,10),h()(),g(11,nz,4,4,"button",11),h(),p(12,"div",12),Ae(13),h()()),n&2&&(U(r.styleClass),l("ngClass",H(11,rz,r.scrollable))("ngStyle",r.style),T("data-pc-name","tabview"),d(3),l("ngIf",r.scrollable&&!r.backwardIsDisabled&&r.autoHideButtons),d(),T("data-pc-section","navcontent"),d(2),T("data-pc-section","nav"),d(2),l("ngForOf",r.tabs),d(),T("data-pc-section","inkbar"),d(2),l("ngIf",r.scrollable&&!r.forwardIsDisabled&&r.buttonVisible))},dependencies:()=>[xe,Vt,Ie,rt,Ce,Ro,ui,pt,Qn,Yn],styles:[`@layer primeng{.p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:inline-flex;min-width:100%;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}} +`],encapsulation:2,changeDetection:0})}return i})(),Bo=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te,Pn,Rt,pt,Qn,Yn,Te]})}return i})();function oz(i,t){if(i&1&&(p(0,"span",1),_(1),h()),i&2){let e=m();U(e.styleClass),l("ngClass",e.containerClass())("ngStyle",e.style),d(),z(e.value)}}var A2=(()=>{class i{styleClass;style;size;severity;value;badgeDisabled=!1;containerClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.value!=null&&String(this.value).length===1,"p-badge-lg":this.size==="large","p-badge-xl":this.size==="xlarge","p-badge-info":this.severity==="info","p-badge-success":this.severity==="success","p-badge-warning":this.severity==="warning","p-badge-danger":this.severity==="danger"}}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-badge"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",size:"size",severity:"severity",value:"value",badgeDisabled:"badgeDisabled"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"]],template:function(n,r){n&1&&g(0,oz,2,5,"span",0),n&2&&l("ngIf",!r.badgeDisabled)},dependencies:[xe,Ie,Ce],styles:[`@layer primeng{.p-badge{display:inline-block;border-radius:10px;text-align:center;padding:0 .5rem}.p-overlay-badge{position:relative}.p-overlay-badge .p-badge{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0;margin:0}.p-badge-dot{width:.5rem;min-width:.5rem;height:.5rem;border-radius:50%;padding:0}.p-badge-no-gutter{padding:0;border-radius:50%}} +`],encapsulation:2,changeDetection:0})}return i})(),Wa=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Te]})}return i})();function az(i,t){if(i&1&&(p(0,"div",3)(1,"app-top-titles",4),y(2,"p-button",5),h()()),i&2){let e=m(2);d(),l("label",e.headerText),d(),l("rounded",!0)}}function lz(i,t){if(i&1&&(p(0,"div",6),y(1,"app-movie-card",7),h()),i&2){let e=t.$implicit;d(),l("movie",e)}}function cz(i,t){if(i&1&&(p(0,"p-carousel",0),g(1,az,3,2,"ng-template",1)(2,lz,2,1,"ng-template",2),h()),i&2){let e=m();l("value",e.movies)("numVisible",6)("numScroll",1)("responsiveOptions",e.responsiveOptions)("autoplayInterval",6e3)("circular",!0)("showNavigators",!1)}}function dz(i,t){if(i&1&&(p(0,"div",3)(1,"app-top-titles",4),y(2,"p-button",8),h()()),i&2){let e=m(2);d(),l("label",e.headerText),d(),l("rounded",!0)}}function uz(i,t){if(i&1&&(p(0,"div",6),y(1,"app-movie-card",7),h()),i&2){let e=t.$implicit;d(),l("movie",e)}}function pz(i,t){if(i&1&&(p(0,"p-carousel",0),g(1,dz,3,2,"ng-template",1)(2,uz,2,1,"ng-template",2),h()),i&2){let e=m();l("value",e.tvshows)("numVisible",6)("numScroll",1)("responsiveOptions",e.responsiveOptions)("autoplayInterval",6e3)("circular",!0)("showNavigators",!1)}}function hz(i,t){if(i&1&&(p(0,"div",3)(1,"app-top-titles",4),y(2,"p-button",9),h()()),i&2){let e=m(2);d(),l("label",e.headerText),d(),l("rounded",!0)}}function mz(i,t){if(i&1&&(p(0,"div",6),y(1,"app-celebrity-card",10),h()),i&2){let e=t.$implicit;d(),l("person",e)}}function fz(i,t){if(i&1&&(p(0,"p-carousel",0),g(1,hz,3,2,"ng-template",1)(2,mz,2,1,"ng-template",2),h()),i&2){let e=m();l("value",e.celebs)("numVisible",6)("numScroll",6)("responsiveOptions",e.responsiveOptions)("autoplayInterval",6e3)("circular",!0)("showNavigators",!1)}}var D2=(()=>{let t=class t{constructor(){this.headerText=""}ngOnInit(){this.responsiveOptions=[{breakpoint:"1079px",numVisible:7,numScroll:1},{breakpoint:"991px",numVisible:6,numScroll:6},{breakpoint:"863px",numVisible:5,numScroll:5},{breakpoint:"767px",numVisible:4,numScroll:4},{breakpoint:"575px",numVisible:2,numScroll:2}]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-cards-carousel"]],inputs:{movies:"movies",tvshows:"tvshows",celebs:"celebs",headerText:"headerText"},standalone:!0,features:[R],decls:3,vars:1,consts:[[3,"value","numVisible","numScroll","responsiveOptions","autoplayInterval","circular","showNavigators"],["pTemplate","header"],["pTemplate","item"],[1,"titles"],[3,"label"],["label","Explore Movies","routerLink","/movies/","icon","pi pi-arrow-right","size","small",3,"rounded"],[2,"margin","0 10px"],[3,"movie"],["label","Explore TV Shows","size","small","routerLink","/tvshows/","icon","pi pi pi-arrow-right",3,"rounded"],["label","Explore Celebrities","size","small","routerLink","/celebrities/","icon","pi pi pi-arrow-right",3,"rounded"],[3,"person"]],template:function(r,o){r&1&&g(0,cz,3,7,"p-carousel",0)(1,pz,3,7)(2,fz,3,7),r&2&&Je(0,o.movies?0:o.tvshows?1:o.celebs?2:-1)},dependencies:[No,Fo,he,Vo,yt,ni,Wh,Ve,et,li],styles:[".p-carousel[_ngcontent-%COMP%] .p-carousel-indicators[_ngcontent-%COMP%] .p-carousel-indicator.p-highlight[_ngcontent-%COMP%] button.xyzd[_ngcontent-%COMP%]{background-color:#f6bb3b!important}"]});let i=t;return i})();var gz=HM(P2());var R2=(()=>{let t=class t{constructor(){this.status=""}ngOnChanges(n){this.releaseDate&&this.calculateStatus(this.releaseDate)}calculateStatus(n){if(!n){this.status="Unknown";return}let r=new Date(n),o=r.getTime()-Date.now(),s=Math.ceil(o/(1e3*60*60*24));s<=14&&s>=0?this.status="upcoming":s<0&&s>=-14?this.status="new":s>14?this.status=`Coming in ${r.toLocaleDateString("default",{month:"long"})}`:this.status="released"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-release-status"]],inputs:{releaseDate:"releaseDate"},standalone:!0,features:[Mt,R],decls:2,vars:1,consts:[[1,"release-status"]],template:function(r,o){r&1&&(p(0,"div",0),_(1),h()),r&2&&(d(),be(" ",o.status,` +`))},styles:[".release-status[_ngcontent-%COMP%]{color:#fff;background-color:var(--accent);border-radius:20px;width:max-content;display:flex;align-items:center;justify-content:center;font-size:.9em;padding:.5em;text-transform:uppercase}"]});let i=t;return i})();var _z=["*"],Sr=(()=>{let t=class t{constructor(){this.severity="",this.size=""}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-custom-tag"]],inputs:{severity:"severity",size:"size",routerLink:"routerLink",queryParams:"queryParams"},standalone:!0,features:[R],ngContentSelectors:_z,decls:2,vars:3,consts:[[1,"custom-tag",3,"ngClass","routerLink","queryParams"]],template:function(r,o){r&1&&(Ue(),p(0,"a",0),Ae(1),h()),r&2&&l("ngClass",o.severity+" "+o.size)("routerLink",o.routerLink)("queryParams",o.queryParams)},dependencies:[$,xe,Ve,et],styles:[".custom-tag[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;padding:.2rem .5rem;border-radius:1.4rem;display:flex;align-items:center;width:max-content;gap:3px;cursor:pointer;text-transform:capitalize;text-decoration:none}.custom-tag.secondary[_ngcontent-%COMP%]{background-color:#464646}.custom-tag.tags[_ngcontent-%COMP%]{background-color:var(--surface-100);color:#0477c4}.custom-tag.tags[_ngcontent-%COMP%]:hover{color:#0080a7}.custom-tag.small[_ngcontent-%COMP%]{scale:.6}.custom-tag[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8rem}"]});let i=t;return i})();var vz=["*"],zo=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-custom-bedge"]],standalone:!0,features:[R],ngContentSelectors:vz,decls:2,vars:0,consts:[[1,"custom-bedge"]],template:function(r,o){r&1&&(Ue(),p(0,"div",0),Ae(1),h())},styles:[".custom-bedge[_ngcontent-%COMP%]{font-size:.8em}"]});let i=t;return i})();function yz(i,t){if(i&1&&y(0,"app-img",3),i&2){let e=m();l("src",e.logoPath+e.src)}}var bz=i=>({margin:i});function Cz(i,t){if(i&1&&(p(0,"h5",2),_(1),h()),i&2){let e=m();l("ngStyle",H(2,bz,e.src||e.src==null?"0 auto 0 3px":"0")),d(),z(e.label)}}var Iz=["*"],rm=(()=>{let t=class t{constructor(){this.logoPath="http://image.tmdb.org/t/p/w45",this.placeholder="../../../assets/images/logo.png"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-details-line"]],inputs:{label:"label",src:"src",routerLink:"routerLink",queryParams:"queryParams"},standalone:!0,features:[R],ngContentSelectors:Iz,decls:4,vars:4,consts:[[1,"details-line",3,"routerLink","queryParams"],["style","width: 16px; border-radius: 50%;",3,"src"],[3,"ngStyle"],[2,"width","16px","border-radius","50%",3,"src"]],template:function(r,o){r&1&&(Ue(),p(0,"a",0),g(1,yz,1,1,"app-img",1)(2,Cz,2,4,"h5",2),Ae(3),h()),r&2&&(l("routerLink",o.routerLink)("queryParams",o.queryParams),d(),Je(1,o.src||o.src==null?1:-1),d(),Je(2,o.label?2:-1))},dependencies:[$,Ce,Ve,et,Vn],styles:[".details-line[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;background-color:#00000059;border-radius:20px;padding:.2rem .4rem;margin-bottom:.4rem;font-size:.8rem;color:var(--primary-color);text-decoration:none}.details-line[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .details-line[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;padding:0;color:#fff}.details-line[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;border-radius:50%}"]});let i=t;return i})();function wz(i,t){if(i&1&&(p(0,"span",4),_(1),h()),i&2){let e=m(2);d(),z(e.message)}}function Tz(i,t){i&1&&(p(0,"span",5),_(1,"Loading Please Wait..."),h())}function xz(i,t){if(i&1&&(p(0,"div",1),y(1,"span",2),g(2,wz,2,1,"span",3)(3,Tz,2,0),h()),i&2){let e=m();d(2),Je(2,e.message?2:e.placeholder?3:-1)}}var Ka=(()=>{let t=class t{constructor(){this.loading=!1,this.placeholder=!0}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-page-loader"]],inputs:{loading:"loading",placeholder:"placeholder",message:"message"},standalone:!0,features:[R],decls:1,vars:1,consts:[["class","page-loader"],[1,"page-loader"],[1,"loader"],["class","message"],[1,"message"],[1,"placeholder"]],template:function(r,o){r&1&&g(0,xz,4,1,"div",0),r&2&&Je(0,o.loading?0:-1)},styles:['.page-loader[_ngcontent-%COMP%]{width:100%;height:100vh;position:fixed;top:0;z-index:100;background-color:#000000cb;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem}.page-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;display:inline-block;position:relative;background:linear-gradient(0deg,rgba(0,0,0,0) 33%,var(--primary-color) 100%);box-sizing:border-box;animation:_ngcontent-%COMP%_rotation 1s linear infinite}.page-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]:after{content:"";box-sizing:border-box;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#263238}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']});let i=t;return i})();var Sz=["player"];function Ez(i,t){if(i&1&&(p(0,"app-details-line",32)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.status)}}function Oz(i,t){if(i&1&&(p(0,"app-details-line",33)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.popularity)}}function Mz(i,t){if(i&1&&(p(0,"app-details-line",34)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.budget)}}function kz(i,t){if(i&1&&(p(0,"app-details-line",35)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.movieDetails==null?null:e.movieDetails.revenue)}}var Az=i=>({mediaType:"movie",withCompanies:i});function Dz(i,t){if(i&1&&(p(0,"app-details-line",38)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("src",e.logo_path)("title",e.name)("queryParams",H(5,Az,e.id)),d(2),be(" ",e.origin_country," ")}}function Pz(i,t){if(i&1&&(p(0,"div",36)(1,"h4"),_(2,"Production Companies"),h(),g(3,Dz,3,7,"app-details-line",37),h()),i&2){let e=m();d(3),l("ngForOf",e.movieDetails==null?null:e.movieDetails.production_companies)}}var Rz=i=>({mediaType:"movie",withOriginCountry:i});function Vz(i,t){if(i&1&&(p(0,"app-details-line",41)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.name)("queryParams",H(4,Rz,e.iso_3166_1)),d(2),be(" ",e.iso_3166_1," ")}}function Lz(i,t){if(i&1&&(p(0,"div",39)(1,"h4"),_(2,"Production Countries"),h(),g(3,Vz,3,6,"app-details-line",40),h()),i&2){let e=m();d(3),l("ngForOf",e.movieDetails==null?null:e.movieDetails.production_countries)}}var Fz=i=>({mediaType:"movie",withOriginLanguage:i});function Nz(i,t){if(i&1&&(p(0,"app-details-line",41)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.english_name)("queryParams",H(4,Fz,e.iso_639_1)),d(2),be(" ",e.iso_639_1," ")}}function Bz(i,t){if(i&1&&(p(0,"div",42)(1,"h4"),_(2,"Languages"),h(),g(3,Nz,3,6,"app-details-line",40),h()),i&2){let e=m();d(3),l("ngForOf",e.movieDetails==null?null:e.movieDetails.spoken_languages)}}var zz=i=>({mediaType:"movie",withGenres:i});function Uz(i,t){if(i&1&&(p(0,"a",45)(1,"div",46),y(2,"i",47),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,zz,e.id)),d(3),be("",e==null?null:e.name," ")}}function jz(i,t){if(i&1&&(p(0,"div",43),g(1,Uz,4,4,"a",44),h()),i&2){let e=m();d(),l("ngForOf",e.movieDetails==null?null:e.movieDetails.genres)}}function Hz(i,t){if(i&1&&(p(0,"div",48),_(1),ct(2,"runtime"),h()),i&2){let e=m();d(),be(" \u2022 ",Bt(2,1,e.movieDetails==null?null:e.movieDetails.runtime)," ")}}function Gz(i,t){if(i&1&&(p(0,"a",51),y(1,"p-button",52),h()),i&2){let e=m(2);l("href",e.movieDetails==null?null:e.movieDetails.homepage,qe),d(),l("outlined",!0)("rounded",!0)}}function $z(i,t){if(i&1&&(p(0,"a",51),y(1,"p-button",53),h()),i&2){let e=m(2);l("href",e.imdbUrl+(e.movieDetails==null?null:e.movieDetails.imdb_id),qe),d(),l("outlined",!0)("rounded",!0)}}function qz(i,t){if(i&1&&(p(0,"div",49),g(1,Gz,2,3,"a",50)(2,$z,2,3,"a",50),h()),i&2){let e=m();d(),l("ngIf",e.movieDetails==null?null:e.movieDetails.homepage),d(),l("ngIf",e.movieDetails==null?null:e.movieDetails.imdb_id)}}var Wz=i=>({mediaType:"movie",withKeywords:i});function Kz(i,t){if(i&1&&(p(0,"app-custom-tag",54),y(1,"i",55),p(2,"span"),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,Wz,e.id)),d(3),z(e.name)}}function Qz(i,t){if(i&1&&(p(0,"app-top-titles",28),y(1,"iframe",56,57),h()),i&2){let e=m();l("label",e.currentVideoType+" of "+(e.movieDetails==null?null:e.movieDetails.title))}}function Yz(i,t){if(i&1&&y(0,"app-mini-celebrity-card",58),i&2){let e=t.$implicit;l("cast",e)}}function Zz(i,t){if(i&1&&y(0,"app-mini-celebrity-card",59),i&2){let e=t.$implicit;l("crew",e)}}function Xz(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Backdrops"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.movieImages.backdrops.length.toString())}}function Jz(i,t){if(i&1&&(p(0,"p-tabPanel"),g(1,Xz,5,1,"ng-template",60),y(2,"app-media-gallery",61),h()),i&2){let e=m();d(2),l("images",e.movieImages.backdrops)("defaultTile",e.movieDetails==null?null:e.movieDetails.title)}}function eU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Posters"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.movieImages.posters.length.toString())}}function tU(i,t){if(i&1&&(p(0,"p-tabPanel"),g(1,eU,5,1,"ng-template",60),y(2,"app-media-gallery",63),h()),i&2){let e=m();d(2),l("images",e.movieImages.posters)("defaultTile",e.movieDetails==null?null:e.movieDetails.title)}}function iU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Videos"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.movieVideos.length.toString())}}function nU(i,t){if(i&1&&y(0,"app-media-gallery",65),i&2){let e=m(2);l("videos",e.movieVideos)}}function rU(i,t){i&1&&(p(0,"p-tabPanel"),g(1,iU,5,1,"ng-template",60)(2,nU,1,1,"ng-template",64),h())}function oU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Similar"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.similarMovies.total_results.toString())}}function sU(i,t){if(i&1&&y(0,"app-movie-card",67),i&2){let e=t.$implicit;l("movie",e)}}function aU(i,t){if(i&1){let e=G();p(0,"app-cards-container",66),A("scrolled",function(){S(e);let r=m(2);return E(r.appendMoreMovies("similar","similarMovies"))}),Yt(1,sU,1,1,"app-movie-card",67,di),h()}if(i&2){let e=m(2);l("infiniteScrollDistance",1)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.similarMovies.results)}}function lU(i,t){i&1&&(p(0,"p-tabPanel"),g(1,oU,5,1,"ng-template",60)(2,aU,3,3,"ng-template",64),h())}function cU(i,t){if(i&1&&(y(0,"i",62),p(1,"span"),_(2,"Recommended"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m(2);d(4),z(e.recommendedMovies.total_results.toString())}}function dU(i,t){if(i&1&&y(0,"app-movie-card",67),i&2){let e=t.$implicit;l("movie",e)}}function uU(i,t){if(i&1){let e=G();p(0,"app-cards-container",66),A("scrolled",function(){S(e);let r=m(2);return E(r.appendMoreMovies("recommendations","recommendedMovies"))}),Yt(1,dU,1,1,"app-movie-card",67,di),h()}if(i&2){let e=m(2);l("infiniteScrollDistance",1)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.recommendedMovies.results)}}function pU(i,t){i&1&&(p(0,"p-tabPanel"),g(1,cU,5,1,"ng-template",60)(2,uU,3,3,"ng-template",64),h())}var hU=i=>({"background-image":i}),V2=(()=>{let t=class t{constructor(n,r){this.tmdbService=n,this.activatedRoute=r,this.isTrailer=!0,this.isLoading=!0,this.imdbUrl="https://www.imdb.com/title/",this.movieImages={backdrops:[],posters:[],id:1,logos:[]},this.movieVideos=[],this.movieCredits={id:0,cast:[],crew:[]},this.similarMovies={page:1,total_pages:1,total_results:20,results:[]},this.recommendedMovies={page:1,total_pages:1,total_results:20,results:[]},this.imageUrl="http://image.tmdb.org/t/p/original",this.logoUrl="http://image.tmdb.org/t/p/w45",this.responsiveOptions=[{breakpoint:"1199px",numVisible:1,numScroll:1},{breakpoint:"991px",numVisible:2,numScroll:1},{breakpoint:"767px",numVisible:1,numScroll:1}],this.currentVideoType="",this.currentIndex=0}concatToString(n,r){return n.map(o=>o[r]).join(", ")}ngOnInit(){this.getId()}getId(){this.activatedRoute.params.subscribe(n=>{this.isLoading=!0,this.movieId=n.id,window.scrollTo(0,0),this.getDetails(),this.getVideos(),this.getImages(),this.getCredits(),this.getSimilar(),this.getRecommendations(),this.getKeywords()})}getDetails(){this.movieDetails=void 0,this.tmdbService.getTMDBData(`movie/${this.movieId}`).subscribe(n=>{document.title=n.title+" | Showbizhub",this.movieDetails=n,this.isLoading=!1},n=>{this.isLoading=!1})}getImages(){this.movieImages={backdrops:[],posters:[],logos:[],id:0},this.tmdbService.getTMDBData(`movie/${this.movieId}/images`).subscribe(n=>{this.movieImages=n,this.setSwipe()})}getVideos(){this.movieVideos=[],this.tmdbService.getTMDBData(`movie/${this.movieId}/videos`).subscribe(n=>D(this,null,function*(){this.movieVideos=yield n.results;let r="https://www.youtube.com/embed/";this.movieVideos?.forEach(o=>{if(o.type=="Trailer"){this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}else if(o.type!="Trailer"&&o.type=="Teaser"){this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}else if(o.type!="Trailer"&&o.type!="Teaser"&&o.type=="Featurette"){this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}else{this.player.nativeElement.src=`${r}${o.key}`,this.currentVideoType=o.type;return}}),n?.results?.length==0&&(this.isTrailer=!1)}))}getCredits(){this.movieCredits={id:0,cast:[],crew:[]},this.tmdbService.getTMDBData(`movie/${this.movieId}/credits`).subscribe(n=>{this.movieCredits=n})}getSimilar(){this.similarMovies=pe(F({},this.similarMovies),{results:[]}),this.tmdbService.getTMDBData(`movie/${this.movieId}/similar`).subscribe(n=>{this.similarMovies=n})}getRecommendations(){this.recommendedMovies=pe(F({},this.recommendedMovies),{results:[]}),this.tmdbService.getTMDBData(`movie/${this.movieId}/recommendations`).subscribe(n=>{this.recommendedMovies=n})}getKeywords(){this.keywords=void 0,this.tmdbService.getTMDBData(`movie/${this.movieId}/keywords`).subscribe(n=>{this.keywords=n})}setSwipe(){if(this.movieImages.backdrops.length>1){let n=document.querySelector(".movie-details");new Hammer(n).on("swipeleft swiperight",o=>{o.type==="swipeleft"?this.switchBackdrop(1):this.switchBackdrop(-1)})}}switchBackdrop(n){n===1&&this.movieDetails?this.currentIndex500)&&this.tmdbService.getTMDBData(`movie/${this.movieId}/${n}`,{page:o}).subscribe(s=>{r=="similarMovies"?(this.similarMovies.page=s.page,this.similarMovies.total_pages=s.total_pages,this.similarMovies.total_results=s.total_results,s.results.forEach(a=>{this.similarMovies.results.push(a)})):r=="recommendedMovies"&&(this.recommendedMovies.page=s.page,this.recommendedMovies.total_pages=s.total_pages,this.recommendedMovies.total_results=s.total_results,s.results.forEach(a=>{this.recommendedMovies.results.push(a)}))})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-movie"]],viewQuery:function(r,o){if(r&1&&oe(Sz,5),r&2){let s;q(s=W())&&(o.player=s.first)}},standalone:!0,features:[R],decls:56,vars:49,consts:[[3,"loading"],[1,"movie-details",3,"ngStyle"],[1,"content"],[1,"left-side"],[1,"poster"],[2,"aspect-ratio","0.667","border-radius",".4rem",3,"src"],[1,"bedge"],[3,"releaseDate"],[1,"details"],["label","Status",4,"ngIf"],["label","Popularity",4,"ngIf"],["label","Budge",4,"ngIf"],["label","Revenue",4,"ngIf"],["class","production-companies",4,"ngIf"],["class","production-countries",4,"ngIf"],["class","Languages",4,"ngIf"],[1,"right-side"],[1,"top-titles"],[1,"custom-bedge",3,"title"],[3,"max","current"],[1,"tagline"],[1,"sub-details"],["class","genre",4,"ngIf"],["class","runtime",4,"ngIf"],["class","btns",4,"ngIf"],[1,"overview"],[1,"keywords"],["showAs","column",3,"label",4,"ngIf"],["showAs","column",3,"label"],[3,"value","numVisible","numScroll","circular","autoplayInterval","showNavigators"],["pTemplate","item"],[4,"ngIf"],["label","Status"],["label","Popularity"],["label","Budge"],["label","Revenue"],[1,"production-companies"],["routerLink","/discover",3,"label","src","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","src","title","queryParams"],[1,"production-countries"],["routerLink","/discover",3,"label","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","title","queryParams"],[1,"Languages"],[1,"genre"],["routerLink","/discover",3,"queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"queryParams"],[1,"custom-bedge","d-flex"],[1,"pi","pi-search"],[1,"runtime"],[1,"btns"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],["icon","pi pi-home","label","Visit Homepage","size","small",3,"outlined","rounded"],["icon","pi pi-arrow-right","label","View on IMDb","size","small",3,"outlined","rounded"],["severity","tags","routerLink","/discover",3,"queryParams"],[1,"pi","pi-hashtag"],["frameborder","0","allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share","allowfullscreen","",2,"width","100%","aspect-ratio","16/9"],["player",""],[3,"cast"],[3,"crew"],["pTemplate","header"],["thumbnailKey","file_path","type","backdrops",3,"images","defaultTile"],[1,"pi","pi-user"],["thumbnailKey","file_path","type","posters",3,"images","defaultTile"],["pTemplate","content"],["thumbnailKey","key","type","posters",3,"videos"],["infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],[3,"movie"]],template:function(r,o){r&1&&(y(0,"app-page-loader",0),p(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),y(5,"app-img",5),p(6,"div",6),y(7,"app-release-status",7),h()(),p(8,"div",8)(9,"h4"),_(10,"About "),p(11,"span"),_(12),h()(),g(13,Ez,3,1,"app-details-line",9)(14,Oz,3,1,"app-details-line",10)(15,Mz,3,1,"app-details-line",11)(16,kz,3,1,"app-details-line",12)(17,Pz,4,1,"div",13)(18,Lz,4,1,"div",14)(19,Bz,4,1,"div",15),h()(),p(20,"div",16)(21,"div",17)(22,"h1"),_(23),p(24,"span",18),ct(25,"date"),_(26),ct(27,"date"),h()(),y(28,"app-circle-rating",19),h(),p(29,"div",20),_(30),h(),p(31,"div",21),g(32,jz,2,1,"div",22)(33,Hz,3,3,"div",23),h(),g(34,qz,3,2,"div",24),p(35,"div",25)(36,"h1"),_(37,"Overview:"),h(),p(38,"p"),_(39),h(),p(40,"div",26),Yt(41,Kz,4,4,"app-custom-tag",54,di),h()(),g(43,Qz,3,1,"app-top-titles",27),p(44,"app-top-titles",28)(45,"p-carousel",29),g(46,Yz,1,1,"ng-template",30),h()(),p(47,"app-top-titles",28)(48,"p-carousel",29),g(49,Zz,1,1,"ng-template",30),h()(),p(50,"p-tabView"),g(51,Jz,3,2,"p-tabPanel",31)(52,tU,3,2,"p-tabPanel",31)(53,rU,3,0,"p-tabPanel",31)(54,lU,3,0,"p-tabPanel",31)(55,pU,3,0,"p-tabPanel",31),h()()()()),r&2&&(l("loading",o.isLoading),d(),l("ngStyle",H(47,hU,"url("+o.imageUrl+(o.movieDetails==null?null:o.movieDetails.backdrop_path)+")")),d(4),l("src",o.imageUrl+(o.movieDetails==null?null:o.movieDetails.poster_path)),d(2),l("releaseDate",o.movieDetails==null?null:o.movieDetails.release_date),d(5),z(o.movieDetails==null?null:o.movieDetails.title),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.status),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.popularity),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.budget),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.revenue),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.production_companies),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.production_countries),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.spoken_languages),d(4),be(" ",o.movieDetails==null?null:o.movieDetails.title," "),d(),l("title",Bt(25,42,o.movieDetails==null?null:o.movieDetails.release_date)),d(2),z(un(27,44,o.movieDetails==null?null:o.movieDetails.release_date,"yyyy")),d(2),l("max",10)("current",o.movieDetails==null||o.movieDetails.vote_average==null?null:o.movieDetails.vote_average.toFixed(1)),d(2),z(o.movieDetails==null?null:o.movieDetails.tagline),d(2),l("ngIf",o.movieDetails==null?null:o.movieDetails.genres),d(),l("ngIf",o.movieDetails==null?null:o.movieDetails.runtime),d(),l("ngIf",(o.movieDetails==null?null:o.movieDetails.homepage)||(o.movieDetails==null?null:o.movieDetails.imdb_id)),d(5),z(o.movieDetails==null?null:o.movieDetails.overview),d(2),Zt(o.keywords==null?null:o.keywords.keywords),d(2),l("ngIf",o.isTrailer),d(),l("label","Cast "+o.movieCredits.cast.length),d(),l("value",o.movieCredits.cast)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3)("showNavigators",!1),d(2),l("label","Crew "+o.movieCredits.crew.length),d(),l("value",o.movieCredits.crew)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3)("showNavigators",!1),d(3),l("ngIf",o.movieImages.backdrops.length>0),d(),l("ngIf",o.movieImages.posters.length>0),d(),l("ngIf",o.movieVideos.length>0),d(),l("ngIf",o.similarMovies.results.length>0),d(),l("ngIf",o.recommendedMovies.results.length>0))},dependencies:[$,Vt,Ie,Ce,nn,Vo,w2,Ve,et,Kh,he,Ha,Jh,sa,No,Fo,tm,Bo,Yr,Qr,_t,xr,$a,Wa,Ua,R2,Sr,zo,li,rm,Vn,yt,ni,Ka],styles:[".movie-details[_ngcontent-%COMP%]{background-size:100%;background-attachment:fixed;background-position:50%;aspect-ratio:16/9;position:relative;transition:all .5s}.movie-details[_ngcontent-%COMP%]:hover{background-position:50% 20%;background-size:50%}.movie-details[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:70vh .5rem 0;display:grid;grid-template-columns:350px 1fr;grid-gap:.5rem;background:linear-gradient(to bottom,rgba(255,0,0,0) 50vh,var(--surface-a) 70vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{padding:0 0 .5rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%]{position:relative}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] .bedge[_ngcontent-%COMP%]{position:absolute;top:0;right:0;transform:translateY(-50%)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:3px;border-left:3px solid var(--primary-color);margin-left:3px;padding-left:5px;font-weight:400}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600;color:var(--primary-color)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{max-width:calc(100vw - 350px - 2rem);color:var(--surface-800)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;margin-bottom:0}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%] .genre[_ngcontent-%COMP%]{display:flex;align-content:center;gap:.4rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:0}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:.5rem;border-radius:.5rem;background-color:var(--surface-100);color:var(--surface-700)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .keywords[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:.4em;font-size:.8em}.movie-details[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;padding:.2rem .5rem;border-radius:1.4rem;align-items:center;gap:3px}.movie-details[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8rem}@media screen and (max-width: 991px){.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{grid-template-columns:250px 1fr;padding-top:60vh;background:linear-gradient(to bottom,rgba(255,0,0,0) 40vh,var(--surface-a) 60vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{max-width:calc(100vw - 250px - 2rem)}}@media screen and (max-width: 767px){.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{grid-template-columns:1fr;padding-top:50vh;background:linear-gradient(to bottom,rgba(255,0,0,0) 30vh,var(--surface-a) 50vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{display:grid;grid-template-columns:40% 1fr;grid-gap:.5rem}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .right-side[_ngcontent-%COMP%]{max-width:calc(100vw - 2rem)}}@media screen and (max-width: 575px){.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:30vh;background:linear-gradient(to bottom,rgba(255,0,0,0) 10vh,var(--surface-a) 30vh)}.movie-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .left-side[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let i=t;return i})();var L2=(()=>{let t=class t{transform(n,...r){let o=new Date,s=new Date(n),a=Math.abs(o.getTime()-s.getTime()),c=Math.ceil(a/(1e3*60*60*24));return c>14&&o>s?`Released on ${this.formatDate(s)}`:c<14&&o>s?`Released ${c} days ago`:c<14&&s>o?`${c} days to go`:`Releasing on ${this.formatDate(s)}`}formatDate(n){let r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=n.getDate(),s=n.getMonth(),a=n.getFullYear();return`${o} ${r[s]}, ${a}`}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"releaseDate",type:t,pure:!0,standalone:!0});let i=t;return i})();var mU=["herosection"],fU=i=>({"background-image":i});function gU(i,t){if(i&1&&y(0,"div",7),i&2){let e=t.$implicit,n=m();l("title",e==null?null:e.title)("ngStyle",H(2,fU,"url("+n.backdropUrl+(e==null?null:e.backdrop_path)+")"))}}function _U(i,t){if(i&1&&(p(0,"div",8),y(1,"img",9),h()),i&2){let e=m();d(),l("src",e.posterUrl+e.movies[e.currentIndex].poster_path,qe)}}function vU(i,t){if(i&1&&(p(0,"div",10)(1,"h2"),_(2),ct(3,"date"),h(),y(4,"p-rating",11),ct(5,"rating"),ct(6,"rating"),p(7,"app-custom-tag",12),ct(8,"date"),_(9),ct(10,"releaseDate"),h(),p(11,"p"),_(12),h(),p(13,"div",13),y(14,"p-button",14)(15,"p-button",15),h()()),i&2){let e=m();d(2),xn(" ",e.movies[e.currentIndex].title," (",un(3,12,e.movies[e.currentIndex].release_date,"yyyy"),") "),d(2),l("cancel",!1)("ngModel",Bt(5,15,e.movies[e.currentIndex].vote_average))("readonly",!0)("title",Bt(6,17,e.movies[e.currentIndex].vote_average)),d(3),l("title",Bt(8,19,e.movies[e.currentIndex].release_date)),d(2),z(Bt(10,21,e.movies[e.currentIndex].release_date)),d(3),z(e.movies[e.currentIndex].overview),d(2),l("routerLink","/movies/"+e.movies[e.currentIndex].id)("rounded",!0),d(),l("rounded",!0)}}var F2=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.movies=[],this.carouselConfig={showSlide:1},this.backdropUrl="http://image.tmdb.org/t/p/w1280",this.posterUrl="http://image.tmdb.org/t/p/w342",this.currentIndex=0;let r=this.tmdbService.getSavingMode()}ngOnChanges(n){this.movies.length>0&&new Hammer(this.herosection.nativeElement).on("swipeleft swiperight",o=>{o.type=="swipeleft"?this.switchMovie(1):this.switchMovie(-1)})}updatePage(n){this.currentIndex=n.page}switchMovie(n){n===1?this.currentIndex0),d(),l("ngIf",o.movies.length>0))},dependencies:[No,Ie,Ce,nn,Fo,he,Sr,Ua,ld,sr,ii,zn,jh,yt,ni,Ve,et,L2],styles:[".hero-section[_ngcontent-%COMP%]{transition:all .3s;position:relative}.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{height:calc(100% - 5px);background-position:center;animation:_ngcontent-%COMP%_moveIt 10s infinite;background-size:100%;transition:all .3s;aspect-ratio:16/4}.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;object-fit:contain;opacity:0;display:none}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background:linear-gradient(to left,#0000003b 30%,#000);position:absolute;top:0;left:0;width:100%;height:calc(100% - 5px);z-index:1;padding:1rem;display:flex;align-items:center;gap:.5rem;cursor:grab}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:active{cursor:grabbing}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:180px;border-radius:10px}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:30%;display:flex;flex-direction:column;gap:.5rem;-webkit-user-select:none;user-select:none}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:5px;height:5px}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:0;color:var(--primary-color);font-weight:600}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;color:var(--surface-500);overflow:hidden;-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .btns[_ngcontent-%COMP%]{display:flex;gap:.5em;align-items:center;flex-wrap:wrap}@media screen and (max-width: 1120px){.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:150px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:2}}@media screen and (max-width: 991px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:16/6}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:190px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:50%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:4;width:100%}}@media screen and (max-width: 863px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:16/8}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:210px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:80%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:4}}@media screen and (max-width: 767px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:8/4}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none;width:210px!important}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{max-width:100%}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-line-clamp:4}}@media screen and (max-width: 577px){.hero-section[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{aspect-ratio:8/3}.hero-section[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:static}}@keyframes _ngcontent-%COMP%_moveIt{0%{background-position:left}5%{background-position:right}50%{background-position:top;background-size:50%}55%{background-position:top left}73%{background-size:90%}to{background-position:center}}"]});let i=t;return i})();var N2=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.upcomingMovies={total_pages:1,total_results:20,page:1,results:[]},this.heroSectionMovies={total_pages:1,total_results:20,page:1,results:[]},document.title="Showbizhub - Explore the world of Entertainment",this.getUpcomingMovies(),this.getHeroSectionMovies(),this.getPopularCelebs()}getUpcomingMovies(){this.tmdbService.getTMDBData("movie/upcoming").subscribe(n=>{this.upcomingMovies=n})}getHeroSectionMovies(){let n=["popular","upcoming","top_rated","now_playing"],r=Math.floor(Math.random()*n.length);this.tmdbService.getTMDBData(`movie/${n[r]}`).subscribe(o=>{this.heroSectionMovies=o,this.heroSectionMovies.results=o.results.filter(s=>s.backdrop_path!==null&&s.backdrop_path!==void 0)})}getPopularCelebs(){let n=Math.floor(Math.random()*20);this.tmdbService.getTMDBData("person/popular",{page:n}).subscribe(r=>{this.celebrities=r})}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-home"]],standalone:!0,features:[R],decls:5,vars:6,consts:[[3,"movies"],["headerText","Upcoming Movies",3,"movies"],["headerText","Popular Celebrities",3,"celebs"],["showAs","column","label","Trending Now"],["containerType","combined","path","trending",3,"params","multipleResults","autoLoad"]],template:function(r,o){r&1&&(y(0,"app-hero-section",0)(1,"app-cards-carousel",1)(2,"app-cards-carousel",2),p(3,"app-top-titles",3),y(4,"app-cards-container",4),h()),r&2&&(l("movies",o.heroSectionMovies.results),d(),l("movies",o.upcomingMovies.results),d(),l("celebs",o.celebrities==null?null:o.celebrities.results),d(2),l("params","/all/day")("multipleResults",!0)("autoLoad",!1))},dependencies:[F2,D2,_t,li]});let i=t;return i})();var B2=(()=>{let t=class t{constructor(n,r,o){this.tmdbService=n,this.router=r,this.activatedRoute=o,this.tvShowsTypes=[{name:"Popular TV Shows",endpoint:"popular",id:1},{name:"Airing Today TV Shows",endpoint:"airing_today",id:2},{name:"On The Air TV Shows",endpoint:"on_the_air",id:3},{name:"Top Rated TV Shows",endpoint:"top_rated",id:4}],this.currentType=this.tvShowsTypes[0],document.title="TV Shows - Showbizhub",o.queryParams.subscribe(s=>{if(s.type){let a=this.tvShowsTypes.filter(c=>c.endpoint==s.type);this.currentType=a[0]}})}updateType(n){let r={type:n.value.endpoint};this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:r,queryParamsHandling:"merge"})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-tvshows"]],standalone:!0,features:[R],decls:3,vars:5,consts:[[3,"label"],["optionLabel","name",3,"options","ngModel","ngModelChange","onChange"],["containerType","tvshows","path","tv",3,"params","multipleResults"]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"p-dropdown",1),A("ngModelChange",function(a){return o.currentType=a})("onChange",function(a){return o.updateType(a)}),h()(),y(2,"app-cards-container",2)),r&2&&(l("label",o.currentType.name),d(),l("options",o.tvShowsTypes)("ngModel",o.currentType),d(),l("params","/"+o.currentType.endpoint)("multipleResults",!0))},dependencies:[_t,li,Rn,Kn,sr,ii,zn]});let i=t;return i})();function yU(i,t){if(i&1&&(p(0,"button"),_(1),h()),i&2){let e=m();d(),z(e.tvshow==null?null:e.tvshow.status)}}function bU(i,t){if(i&1&&(p(0,"app-details-line",32)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.tvshow==null?null:e.tvshow.status)}}function CU(i,t){if(i&1&&(p(0,"app-details-line",33)(1,"span"),_(2),h()()),i&2){let e=m();d(2),z(e.tvshow==null?null:e.tvshow.popularity)}}var IU=i=>({mediaType:"tv",withCompanies:i});function wU(i,t){if(i&1&&(p(0,"app-details-line",36)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("src",e.logo_path)("title",e.name)("queryParams",H(5,IU,e.id)),d(2),be(" ",e.origin_country," ")}}function TU(i,t){if(i&1&&(p(0,"div",34)(1,"h4"),_(2,"Production Companies"),h(),g(3,wU,3,7,"app-details-line",35),h()),i&2){let e=m();d(3),l("ngForOf",e.tvshow==null?null:e.tvshow.production_companies)}}var xU=i=>({mediaType:"tv",withOriginCountry:i});function SU(i,t){if(i&1&&(p(0,"app-details-line",39)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.name)("queryParams",H(4,xU,e.iso_3166_1)),d(2),be(" ",e.iso_3166_1," ")}}function EU(i,t){if(i&1&&(p(0,"div",37)(1,"h4"),_(2,"Production Countries"),h(),g(3,SU,3,6,"app-details-line",38),h()),i&2){let e=m();d(3),l("ngForOf",e.tvshow==null?null:e.tvshow.production_countries)}}var OU=i=>({mediaType:"tv",withOriginLanguage:i});function MU(i,t){if(i&1&&(p(0,"app-details-line",39)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;l("label",e.name)("title",e.english_name)("queryParams",H(4,OU,e.iso_639_1)),d(2),be(" ",e.iso_639_1," ")}}function kU(i,t){if(i&1&&(p(0,"div",40)(1,"h4"),_(2,"Languages"),h(),g(3,MU,3,6,"app-details-line",38),h()),i&2){let e=m();d(3),l("ngForOf",e.tvshow==null?null:e.tvshow.spoken_languages)}}function AU(i,t){if(i&1&&(p(0,"lightgallery",14)(1,"a",41),y(2,"p-button",42),h()()),i&2){let e=m();l("settings",e.VideoSettings),d(),l("href",e.currentVideo,qe),d(),l("rounded",!0)}}function DU(i,t){if(i&1&&(p(0,"div",43),_(1),h()),i&2){let e=m();d(),z(e.tvshow==null?null:e.tvshow.tagline)}}var z2=i=>({mediaType:"tv",withGenres:i});function PU(i,t){if(i&1&&(p(0,"a",44)(1,"div",45),y(2,"i",46),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,z2,e.id)),d(3),be("",e==null?null:e.name," ")}}function RU(i,t){if(i&1&&(p(0,"a",49),y(1,"p-button",50),h()),i&2){let e=m(2);l("href",e.tvshow==null?null:e.tvshow.homepage,qe),d(),l("outlined",!0)("rounded",!0)}}function VU(i,t){if(i&1&&(p(0,"div",47),g(1,RU,2,3,"a",48),h()),i&2){let e=m();d(),l("ngIf",e.tvshow==null?null:e.tvshow.homepage)}}function LU(i,t){if(i&1&&(p(0,"app-custom-tag",51),y(1,"i",52),p(2,"span"),_(3),h()()),i&2){let e=t.$implicit;l("queryParams",H(2,z2,e.id)),d(3),z(e.name)}}function FU(i,t){if(i&1&&y(0,"app-mini-celebrity-card",53),i&2){let e=t.$implicit;l("cast",e)}}function NU(i,t){if(i&1&&y(0,"app-mini-celebrity-card",55),i&2){let e=t.$implicit;l("crew",e)}}function BU(i,t){if(i&1&&(p(0,"div",54)(1,"h1"),_(2),h(),p(3,"p-carousel",25),g(4,NU,1,1,"ng-template",26),h()()),i&2){let e=m();d(2),be("Crew ",e.credits==null||e.credits.crew==null?null:e.credits.crew.length,""),d(),l("value",e.credits==null?null:e.credits.crew)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3)}}function zU(i,t){if(i&1&&(y(0,"i",56),p(1,"span"),_(2,"Backdrops"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.seriesImages==null||e.seriesImages.backdrops==null||e.seriesImages.backdrops.length==null?null:e.seriesImages.backdrops.length.toString())}}function UU(i,t){if(i&1&&(y(0,"i",56),p(1,"span"),_(2,"Posters"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.seriesImages==null||e.seriesImages.posters==null||e.seriesImages.posters.length==null?null:e.seriesImages.posters.length.toString())}}function jU(i,t){if(i&1&&(y(0,"i",56),p(1,"span"),_(2,"Videos"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.tvShowVideos==null||e.tvShowVideos.length==null?null:e.tvShowVideos.length.toString())}}function HU(i,t){if(i&1&&y(0,"app-media-gallery",57),i&2){let e=m();l("videos",e.tvShowVideos)}}function GU(i,t){if(i&1&&(y(0,"i",58),p(1,"span"),_(2,"Similar"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.similar==null?null:e.similar.total_results.toString())}}function $U(i,t){if(i&1&&y(0,"app-tvshow-card",60),i&2){let e=t.$implicit;l("tvShow",e)}}function qU(i,t){if(i&1){let e=G();p(0,"app-cards-container",59),A("scrolled",function(){S(e);let r=m();return E(r.appendMoreTvShows("similar","similar"))}),Yt(1,$U,1,1,"app-tvshow-card",60,di),h()}if(i&2){let e=m();l("infiniteScrollDistance",2)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.similar.results)}}function WU(i,t){if(i&1&&(y(0,"i",58),p(1,"span"),_(2,"Recommended"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.recommended==null?null:e.recommended.total_results.toString())}}function KU(i,t){if(i&1&&y(0,"app-tvshow-card",60),i&2){let e=t.$implicit;l("tvShow",e)}}function QU(i,t){if(i&1){let e=G();p(0,"app-cards-container",59),A("scrolled",function(){S(e);let r=m();return E(r.appendMoreTvShows("recommendations","recommended"))}),Yt(1,KU,1,1,"app-tvshow-card",60,di),h()}if(i&2){let e=m();l("infiniteScrollDistance",2)("infiniteScrollThrottle",500)("scrollWindow",!0),d(),Zt(e.recommended.results)}}var YU=i=>({"background-image":i}),U2=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.isLoading=!0,this.imageUrl="https://image.tmdb.org/t/p/original",this.VideoSettings={counter:!1,plugins:[Xh]},this.ac.params.subscribe(o=>{window.scrollTo(0,0),this.currentId=o.id,this.getDetails(),this.getKeywords(),this.getCredits(),this.getImages(),this.getVideos(),this.getSimilarShows(),this.getRecommendedShows()})}getSimilarShows(){this.tmdbService.getTMDBData(`tv/${this.currentId}/similar`).subscribe(n=>{this.similar=n})}getRecommendedShows(){this.tmdbService.getTMDBData(`tv/${this.currentId}/recommendations`).subscribe(n=>{this.recommended=n})}getDetails(){this.isLoading=!0,this.tvshow=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}`).subscribe(n=>{this.tvshow=n,document.title=n.name+" - Showbizhub",this.isLoading=!1},()=>{this.isLoading=!1})}getKeywords(){this.keywords=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/keywords`).subscribe(n=>{this.keywords=n.results})}getImages(){this.seriesImages=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/images`).subscribe(n=>{this.seriesImages=n})}getCredits(){this.credits=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/credits`).subscribe(n=>{this.credits=n})}getVideos(){this.tvShowVideos=void 0,this.tmdbService.getTMDBData(`tv/${this.currentId}/videos`).subscribe(n=>{this.tvShowVideos=n.results,this.playVideo()})}playVideo(){let n="https://www.youtube.com/embed/";this.tvShowVideos?.forEach(r=>{if(r.type=="Trailer"){this.currentVideo=`${n}${r.key}`;return}else if(r.type!="Trailer"&&r.type=="Teaser"){this.currentVideo=`${n}${r.key}`;return}else if(r.type!="Trailer"&&r.type!="Teaser"&&r.type=="Featurette"){this.currentVideo=`${n}${r.key}`;return}else{this.currentVideo=`${n}${r.key}`;return}})}appendMoreTvShows(n,r){let o=1;r=="similar"&&this.similar.page<500&&(o=this.similar.page+1),r=="recommended"&&this.similar.page<500&&(o=this.recommended.page+1),!(o>500)&&this.tmdbService.getTMDBData(`tv/${this.currentId}/${n}`,{page:o}).subscribe(s=>{r=="similar"?(this.similar.page=s.page,this.similar.total_pages=s.total_pages,this.similar.total_results=s.total_results,s.results.forEach(a=>{this.similar.results.push(a)})):r=="recommended"&&(this.recommended.page=s.page,this.recommended.total_pages=s.total_pages,this.recommended.total_results=s.total_results,s.results.forEach(a=>{this.recommended.results.push(a)}))})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tvshow"]],standalone:!0,features:[R],decls:68,vars:42,consts:[[3,"loading"],[1,"tv-show",3,"ngStyle"],[1,"grid-container"],[1,"poster-section"],[1,"poster"],["alt","",3,"src"],[1,"tvshow-details"],["label","Status",4,"ngIf"],["label","Popularity",4,"ngIf"],["class","production-companies",4,"ngIf"],["class","production-countries",4,"ngIf"],["class","Languages",4,"ngIf"],[1,"details-section"],[1,"top-titles"],[3,"settings"],[1,"custom-bedge",3,"title"],[3,"max","current"],["class","tagline"],[1,"sub-details"],[1,"genre"],["routerLink","/discover",3,"queryParams",4,"ngFor","ngForOf"],["class","btns",4,"ngIf"],[1,"overview"],[1,"keywords"],[1,"cast"],[3,"value","numVisible","numScroll","circular","autoplayInterval"],["pTemplate","item"],["class","crew",4,"ngIf"],["pTemplate","header"],["thumbnailKey","file_path","type","backdrops",3,"images","defaultTile"],["thumbnailKey","file_path","type","posters",3,"images","defaultTile"],["pTemplate","content"],["label","Status"],["label","Popularity"],[1,"production-companies"],["routerLink","/discover",3,"label","src","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","src","title","queryParams"],[1,"production-countries"],["routerLink","/discover",3,"label","title","queryParams",4,"ngFor","ngForOf"],["routerLink","/discover",3,"label","title","queryParams"],[1,"Languages"],[3,"href"],["icon","pi pi-play","title","Watch Video",3,"rounded"],[1,"tagline"],["routerLink","/discover",3,"queryParams"],[1,"custom-bedge","d-flex"],[1,"pi","pi-search"],[1,"btns"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],["icon","pi pi-home","label","Visit Homepage","size","small",3,"outlined","rounded"],["severity","tags","routerLink","/discover",3,"queryParams"],[1,"pi","pi-hashtag"],[3,"cast"],[1,"crew"],[3,"crew"],[1,"pi","pi-user"],["thumbnailKey","key","type","posters",3,"videos"],[1,"pi","pi-video"],["infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],[3,"tvShow"]],template:function(r,o){r&1&&(y(0,"app-page-loader",0),p(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),y(5,"img",5),g(6,yU,2,1,"button"),h(),p(7,"div",6)(8,"h4"),_(9,"About "),p(10,"span"),_(11),h()(),g(12,bU,3,1,"app-details-line",7)(13,CU,3,1,"app-details-line",8)(14,TU,4,1,"div",9)(15,EU,4,1,"div",10)(16,kU,4,1,"div",11),h()(),p(17,"div",12)(18,"div",13),g(19,AU,3,3,"lightgallery",14),p(20,"h1"),_(21),p(22,"span",15),ct(23,"date"),_(24),ct(25,"date"),h()(),y(26,"app-circle-rating",16),h(),g(27,DU,2,1,"div",17),p(28,"div",18)(29,"div",19),g(30,PU,4,4,"a",20),h(),p(31,"span"),_(32),h(),p(33,"span"),_(34),h(),p(35,"span"),_(36),h()(),g(37,VU,2,1,"div",21),p(38,"div",22)(39,"h1"),_(40,"Overview"),h(),p(41,"p"),_(42),h(),p(43,"div",23),Yt(44,LU,4,4,"app-custom-tag",51,di),h()(),p(46,"div",24)(47,"h1"),_(48),h(),p(49,"p-carousel",25),g(50,FU,1,1,"ng-template",26),h()(),g(51,BU,5,6,"div",27),p(52,"p-tabView")(53,"p-tabPanel"),g(54,zU,5,1,"ng-template",28),y(55,"app-media-gallery",29),h(),p(56,"p-tabPanel"),g(57,UU,5,1,"ng-template",28),y(58,"app-media-gallery",30),h(),p(59,"p-tabPanel"),g(60,jU,5,1,"ng-template",28)(61,HU,1,1,"ng-template",31),h(),p(62,"p-tabPanel"),g(63,GU,5,1,"ng-template",28)(64,qU,3,3,"ng-template",31),h(),p(65,"p-tabPanel"),g(66,WU,5,1,"ng-template",28)(67,QU,3,3,"ng-template",31),h()()()()()),r&2&&(l("loading",o.isLoading),d(),l("ngStyle",H(40,YU,"url("+o.imageUrl+(o.tvshow==null?null:o.tvshow.backdrop_path)+")")),d(4),l("src",o.imageUrl+(o.tvshow==null?null:o.tvshow.poster_path),qe),d(),Je(6,o.tvshow!=null&&o.tvshow.status?6:-1),d(5),z(o.tvshow==null?null:o.tvshow.name),d(),l("ngIf",o.tvshow==null?null:o.tvshow.status),d(),l("ngIf",o.tvshow==null?null:o.tvshow.popularity),d(),l("ngIf",o.tvshow==null?null:o.tvshow.production_companies),d(),l("ngIf",o.tvshow==null?null:o.tvshow.production_countries),d(),l("ngIf",o.tvshow==null?null:o.tvshow.spoken_languages),d(3),Je(19,(o.tvShowVideos==null?null:o.tvShowVideos.length)>0&&o.currentVideo?19:-1),d(2),be(" ",o.tvshow==null?null:o.tvshow.name," "),d(),l("title",Bt(23,35,o.tvshow==null?null:o.tvshow.first_air_date)),d(2),z(un(25,37,o.tvshow==null?null:o.tvshow.first_air_date,"yyyy")),d(2),l("max",10)("current",o.tvshow==null||o.tvshow.vote_average==null?null:o.tvshow.vote_average.toFixed(1)),d(),Je(27,o.tvshow!=null&&o.tvshow.tagline?27:-1),d(3),l("ngForOf",o.tvshow==null?null:o.tvshow.genres),d(2),xn("",o.tvshow==null?null:o.tvshow.number_of_seasons," ",o.tvshow!=null&&o.tvshow.number_of_seasons?"Seasons":"Season",""),d(2),be("\u2022 ",o.tvshow==null?null:o.tvshow.number_of_episodes," Episodes"),d(2),be("\u2022 ",o.tvshow==null?null:o.tvshow.episode_run_time," Min/Episode"),d(),l("ngIf",o.tvshow==null?null:o.tvshow.homepage),d(5),be(" ",o.tvshow==null?null:o.tvshow.overview," "),d(2),Zt(o.keywords),d(4),be("Cast ",o.credits==null||o.credits.cast==null?null:o.credits.cast.length,""),d(),l("value",o.credits==null?null:o.credits.cast)("numVisible",6)("numScroll",6)("circular",!0)("autoplayInterval",5e3),d(2),l("ngIf",(o.credits==null?null:o.credits.crew.length)>0),d(4),l("images",o.seriesImages==null?null:o.seriesImages.backdrops)("defaultTile",o.tvshow==null?null:o.tvshow.name),d(3),l("images",o.seriesImages==null?null:o.seriesImages.posters)("defaultTile",o.tvshow==null?null:o.tvshow.name))},dependencies:[$,Vt,Ie,Ce,nn,Ve,et,Ga,Sr,No,Fo,he,sa,_t,zo,Bo,Yr,Qr,Jh,xr,$a,Ha,yt,ni,Yh,Qh,rm,Ka],styles:[".tv-show[_ngcontent-%COMP%]{background-size:cover;background-attachment:fixed;min-height:100vh;position:relative;color:var(--surface-500)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{-webkit-backdrop-filter:blur(35px) brightness(40%);backdrop-filter:blur(35px) brightness(40%);display:grid;padding:2rem 1rem;grid-gap:1rem;grid-template-columns:300px 1fr;color:#fff}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%]{position:relative}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .poster[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;outline:0;background-color:var(--primary-color);color:var(--surface-100);position:absolute;top:0;right:0;padding:.45rem .5rem;border-radius:30px;transform:translateY(-50%)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .tvshow-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:3px;border-left:3px solid var(--primary-color);margin-left:3px;padding-left:5px;font-weight:400}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%] .tvshow-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600;color:var(--primary-color)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{max-width:calc(100vw - 4rem - 300px)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .top-titles[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;margin-bottom:0;margin-right:auto}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:.5rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .sub-details[_ngcontent-%COMP%] .genre[_ngcontent-%COMP%]{display:flex;align-content:center;gap:.4rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:var(--surface-500);margin-bottom:.4rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:0}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{border-radius:.5rem;color:var(--surface-500)}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .keywords[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:.4em;font-size:.8em}.tv-show[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;padding:.2rem .5rem;border-radius:1.4rem;align-items:center;gap:3px}.tv-show[_ngcontent-%COMP%] .custom-bedge[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.8rem}.tv-show[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}@media screen and (max-width: 991px){.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{grid-template-columns:250px 1fr}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{max-width:calc(100vw - 4rem - 250px)}}@media screen and (max-width: 767px){.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{grid-template-columns:1fr}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%]{display:grid;grid-template-columns:40% 1fr;grid-gap:.5rem}.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .details-section[_ngcontent-%COMP%]{max-width:calc(100vw - 4rem)}}@media screen and (max-width: 575px){.tv-show[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .poster-section[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let i=t;return i})();var j2=(()=>{let t=class t{constructor(){document.title="Celebrities - Showbizhub"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-celebrities"]],standalone:!0,features:[R],decls:2,vars:1,consts:[["label","Popular Celebrities"],["containerType","celebrities","path","person","params","/popular",3,"multipleResults"]],template:function(r,o){r&1&&y(0,"app-top-titles",0)(1,"app-cards-container",1),r&2&&(d(),l("multipleResults",!0))},dependencies:[_t,li]});let i=t;return i})();var H2=(()=>{let t=class t{transform(n,...r){var o=new Date(n);let s=Math.abs(Date.now()-o.getTime());return Math.floor(s/(1e3*3600*24)/365.25)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Tn({name:"age",type:t,pure:!0,standalone:!0});let i=t;return i})();var ZU=["cherosection"],XU=i=>({"background-image":i}),JU=["*"],G2=(()=>{let t=class t{constructor(){this.imageUrl="http://image.tmdb.org/t/p/original",this.filterCredits=[],this.currentIndex=0}ngOnChanges(){this.credits?.length>0&&(this.credits.forEach(r=>{r.backdrop_path&&this.filterCredits.push(r)}),new Hammer(this.herosection.nativeElement).on("swipeleft swiperight",r=>{r.type=="swipeleft"?this.switchCredit(1):this.switchCredit(-1)}),setInterval(()=>{this.switchCredit(1)},1e4))}switchCredit(n){n===1?this.currentIndex{let t=class t{constructor(n,r){this.tmdbService=n,this.ac=r,this.imageUrl="http://image.tmdb.org/t/p/original",this.expandbiography=!1,this.coverPhotos=[],this.socialPlaceholders={youtube:{url:"",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAACaUlEQVR4nO2ZPWgUURSFD6axSgr/Oi1sLYLiGp17J4UWgqiNC5Ii2Af/0E4RQVTUJilFE6IWglFBbAwm6UQx2Vi6MavFIkTxByKsW6g58p4zZlcRdtc3MzswBw4sy+zb8zFv5r13L5ApU6ZMbS9ux1oKtlCxn4IjFFyhYoSK+xRMUfGCitcULFDx2VpQpYLWvz6H3y8E187a3wruUTFMwWUKDtPHPio2U7CmtbCKHAUXqZigYq4uSPz+ajOYLIIL9LH138F3oYuKWwmGZYO+wRw668MDKygYb4NwbMiCSebRUTttTiYeSpuGOL4MIHiTeCBt2qXlN0zyYdiSt2Ed6KEn8SDaogUe6KMv8SDasg+Z+X/K2YAHN8Z9B84ZgOvOBnw5TU7dIQ+sjwvitgF45GzA4gytqhVy5Cy5c2XUAE/NGjDtHCDU+zJ5vj9KgJIBKEUGEKowSfZvigJg0UyhD5EDGH3/Rj64Su5Z5RQCVHyJBSDU4idy6CjZ2+EIwOV2uRGAUK9myQFxcgd+JAIQ6slDMr8hpQBLS/+9biQ3heYKzqZQzA/xR3cPsaAa72t0bIjc3eXmv9QCvDMA8yleyIoG4HlkAG9L5Jl8FMEZ+Fm6N3OC8bRvp4fTfaBRnE73kdJHX7oP9R560l9WMbLV4qTDaJMWzNvwFsDHicQDadM+9mdx1916EL0n6oq7FiKHTipupmDqjP5VXq8D8SAUDAYNjmLQZGiHBsegLSW2IvZiNXegmx72UjFgOziCa1SMUfGYipmgbVT+3UpSVGqCVGpaTOXg2oKt8wvuBruBS05aTJkyZcqEOPUTXMsL5gsyStgAAAAASUVORK5CYII"},instagram:{url:"https://www.instagram.com/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGFElEQVR4nGWW6XMT9x2H9y/p26TTTl9lJoSAdd+3ZHMZQQAHA+ZycY0xxIYkJBwD5DDGQ4DYTg0khExampmQQJkmlBTHNsayJfmSY0c+5duypdX1dLSrCGh/M/tGu/o+q/09n89KEHILj+oPSbe+Ieaw+pYdroVF23rmrZuZMW9nyrSLccM+wvpDjGirGNLUMKB6l17lafyKC/jWfjzbuebybMfqxkDra3/9qPWV23/8ba48fItiI+sLxLRHRdJtIO60suxws2jbwJzVy7R5Rw6yn7C+gmHtEUKaWvolyBn8BR/gW3uRztc/oX11I62rricerfqiWB6+W/0nSpQiXiWsKyDtUZNwGYk5bSzbPTLEsoVpcwmTpt2MGQ7kINWENMfpV50kqDxLjwSpp/P1K7SvbuLxq9fjP7164/cCBzWfskcNO1SwWQFFBaR3FJFqvkrq4Y+k/AHS4xOkx6dISUeE1Ng0ybEZxL5Rlh/1Eqm/x4DzIj0FH9K15hJPspDXmmlddeOywGHtAAc1sFsN25VwugJWokhrYYH04CCpHj/JTh+JJ90knvgRO4LE24PEu0Kk55elS9NLMUYOfE5PwUc5yFXaVjUPChzTxajUwgENVLggtgwzU1Czn5Rbi+gys+JwsGQvYsFazKzlDSKmnUwYyxjVlzOir2LySBOp2SjpxRh9zkt0r/2YrjUNdKy+Fhd4W5/hmA7+ooU7V+Q7P10OGxVkChUk3TpEl4UVh5Ml+zrmrcXMWLYRMZUyteEI8dYAM2e/YOJwk/TVqbp7BBTnJUjnmgZR4IwB3tHDUR0EHkN0HkrVsFUJGxRkPEqSHgOJ48dI3LiJeP0W0WOnmLHsYO7weWlo7D89jOiqpMcUfdib0/c8vrV1osAHRjhtgLf1MD4Iw37Yq4Y3VbBFCTudEOzmf1eyO8jcpoPMVZ5jcl21lJHspscD4VxGsvpeEAXqTXDBCKcMEBmBgQ44pMlB1NDXDakUmVufkSzbjrhnF4lbtyGdJukLMm2R9c1mRAyOkBiZymXkJEHFGVHgihkumuC8EWbCMNgOR7TwZw3UVcq3+3WzrG8+I3YZAixVn5IzYtxDIjhMMhyRM6I+Tr/yPVGg2QKfmKHOBHOjMNQBtTqo0sK38sZRvTmfkZRHQ8JlIl62WzoVb/mSWctWIuY3SQSHSIan+FVXyS/aowyqTogCN63QZIHLZpgfhZFOOKmHGh183ywDar1yRooVUFgg6ZvYu1M6JbZ8zoJ1k6RvMhgiFZ5k1FAuQzRHRYGvbHDDCo0WmA/DqA/OGuBdPTRVyYDvWmCXCrYpYZOsb+arm/IveKtGykhW32RviNTIOBPGvXJGtJWiwB17hts2uG6F+V9hIgAfGpH1NcBwt7ShEqTGC1Ve+FuL9Fmm+ylxt5UVh0vKSKp3gNRwmClTKePGfYzqykWBu44Md+zwpQ1mB2G6Hy6ZyOt7bh384vs/TfF3ktnmIunW59rXRWogRGpg6FnF6/eKAg8cae464O92GPsZ4otw1cIL+p4wwNVKuNsE3zTCuUOwVQXrs2apSEgVbyOztETycVu+4ieNu0SBR84UD5zwrQP8OWvuv8UL+r5vgOO6Z/qWqaFEBV5FvuKTJ6rlTW/8LF/xEVOJKNDmXubfLvinE+57IbkMsRm4XwtXLLK+54zwnv6ZvuUaXqj4kxUwNwvRKHFvMVF7IQu2jcxYtsQFujx9tLmRIPed0FoLiVxdi1GI9MNkP4wFINQhB7G/HXrbYSgAy4vytdFF0rUViC4TMadDhlg3PRUIehro8sDPbniYg9zzgu8aDP8Akz2wMArz4zA/BnNjMDsG06MQ8kHbA7hZD6V2KFQ8V/FOFm2FdQJD7pcJFMZ56oFWN/zognsO+MaOlJGsvp9aoMH0nL568hW/Xw2lKnhDmat4pVTxcad5ZcVq/Z38Xg4VFuH3xOj0wGM3/OCE7x3wDzv5jGQhz+ubbd9sxVdoYJ8adqryFZ92K1eSToP7xX8WoaKX8HsaeOLp5CdXhH854TsH+Yy0WOGa+RlE0lcP1Vq5fcvUi5So+vAq6ylSvfTb4P8CHO2RoKDh+ewAAAAASUVORK5CYII"},facebook:{url:"https://www.facebook.com/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD00lEQVR4nNWaS2tTURDHr+c0+gl8tCCI4At8rsSF7nxQ8AGCX0AEV+pGdKMutCqIWyXn3KjgY1MVH+ADBa21iqhgfYGosZqZNGmqaavGmLQZObf2QZqk995MmmZgVmnu+f/umTmZmVPL4jIdmylt3CIU7pMKzwiNzULjvf/eLBWG/n+22fytNSlMRxdJBcekgndSI7l2BTmh4a3U0GSeMbGiiaZIHWkUGlo9iS7hQsMjqaMbKq49YMMKofEpl3CZD6LgcSAUWcav/BDVSQ3HpYL+SomXww5ZqeCoWZNHvP21QWhsq7xwzA+rVivYUV+e+FBsrtT4aaLFy5Hd+GLZsMCfeAXzpYZ49cTjEETcOh2Z5028/bXB0FdfPA5BhN2H0yGqM6dB9UVjXk7gUyv4IjCufue0YVx4qo207f4POvfhN71LZul7eoByRJTK5uhHeoAiv/rpZSJDjbe73exEU0nxgeC3Jc4xxiR+5bUu+tCTJTe241HSDUA2oGB5YfVEUzh/pNbd6qY//eZdEyMADh6vhUMn0sglvuFCJ8VTA67FewFw3MZ1YwA4a5vjr36SV9vhAUAoaBlbVTKJD9hIiT+l334sNUAt0b90H9LD7i6JR9wK4sKR8DElMRPAsitdJcWfaP9J00IMayk8MhrAWz1fwre3JIuKf5/MOjvEsY5Q2D6o/lTnDNNgcAHsf9ZbFODgiz6WNaSzA5BzOjvTBrI9VCMdK5HAW+995wPQSDIImyyhcT/nQ0++Lg6w+kaCFUAo2GtKB3uiAFZd5wWQGpQlFFypVQChsdkA3K1dALjjG2Bna9KpJvO9VP3TlxmsQAv5mpsJ3wC+QmjPkx7itNkXY/5CyG8ScwL0ZnJU5zuJfR6jnADPuzJlHKMKN1cb4PzHlM9Eho2+SwlOgAPP+/yVEqHo9KFe4K3XB8y5FHO6rny/HE4VFbqrrafgd2b7SWCFr0ZXo0f9bWFVfwcO5w2xagvAyp/YDY64awNAKHxQoKmPbqgVAKlxbcHJBMdErtIAYkxDP2awhZnJCwDZcS9Ayj2RKrwDhy1Xw90yZkSVAhAmdFzf2gQ76s1Ie9IAKPhsnY3PsibigoMdQEHM+wXH6CsmhR+rBwBh8yKtsizYUe8lJ7gAhIl5z2FT+pq1yc3dAQNAxjlt2K5ZR1lAR5aOtxvlAAgFLQG7c7FVaZMK1wsND7kAhMIHRcuDipoNC8yUWGh8PdQUuQIw/+yhsN0JlbKTlMtC0emmxdv9pDd4OZxqv/Mt/eVxLJ1oi6UTdyPpjqvh1JtV1+ImjzYOd1IM9g8AXeyr2VY3tgAAAABJRU5ErkJggg=="},tiktok:{url:"https://www.tiktok.com/@",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAACeklEQVR4nO2az4tOURjHP8MgkhVGjQUWrM2CUjJ+/5iyIMnCj2Q3RkpNolGTQtkoKcpfwEYKiZX8mIUxr2xsLJQkC80MoVxzpqfOO8ztnPe9973n9T7n5qlvvbf3ns73c88595znnAt/Yg5wAngBjANGqcasxz7reVosBV4rMGlyqmK9T7VEjBDGagSYje1OJnIdF5AhBUaK6jl28JjINSogiQIjRZX8ByH/U7sI7EvpY4wt0pOevIA7MYLscoAcKQvIPOBDGUAk9gITMYHsxB8DMYHsoHYcA76VAUSiE7gCfNIMsp3s0QYst3lHFCAz6wDd0wiyzWH0RllAfgPnbFeKBmSrB0T+e2jHRMtBfthKLwMngfuOe7bUADH29wPgKLAWWAk8/Vcg8prsBeanDJ5vAKSICoHIynWBw5wPZLNGkOvADA9ENCCPgPYaED6QTZpAfgLLPOYX222Za8CwdpCrHoiDwNc6ZTdqAlnnMLM7Yz6hBuSLY4DL9buM5bu1gFQcRlbnqGyDFpDHDiM9OSpb72jNiVaADDtA1uSobEWqbEcgCJMX5LNjldqecZPtTcGHYEKCiLochg7XKfPLM6ufbSXIJdzRbw27dslluycdbYEPl5K8IDLpLfHArAIuAHeBW8ApYKHn3v0BIUyja63bNTK6LLEIeK8BxACDDULMBZ4EhjBF8xHZOJiVA0JOX182AcKEyBDfAnvq5CaSPZ5p8hFfUhTk75T3ps3XDwCHgNN24H9vIoAJDdJqJaUCGVVgJMjx9JACI0E+GOhTYKSoeqsf1VQUmGlUr6of1VQnq5FIITrTE5dQyXaO9DfNLwDx9sx2p6mWmAQ/4ELABrEc7QAAAABJRU5ErkJggg=="},imdb:{url:"https://www.imdb.com/name/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAABc0lEQVR4nGO4t0FB/d5Gpd13NyjepSa+BzJznaIaA4hxb6PSf5rgDUq7GO5uUHpAKwvublB6MGrB/xEWRFsmyPxvyxb9v2ea7P/WLBEwPrtEHs7eCxXvzhf9P7dW4v+NNYr/13RKgcWurFQgbEFRtOB/BgYGsAEgGoS78hDs3gIxMC3Iy/yfmYnhf6Ajz/8kP36w2OHZcuRZ4GvH85+REdWCYCfe/6qybP/V5dngFmQEC/wPc+X9f3qRPPEWCPMz/xfiZ/4vKsiMYQHIcEUpVrgFvrY8cB8TbYGRBgeYNtbkwGqBvCTCgpYsETDdnClCvAUgg0A0KKzRLVCWYUWxoDFdBG4R0RYUxwiB6fwIQRQL+LiZwPFirc8JtwDm22nl4rgt2DpB5n9nLiKZ7p4qC062O6fIoCRTUDhPrxQHJ2FYMl3WKvm/PUf0/+11isM5J98btWDjQATRPRpW+nc3KO1kADUtQLU/1ZstG5R23dmspAoA9upm5a9T5sgAAAAASUVORK5CYII="},twitterX:{url:"https://twitter.com/",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAADf0lEQVR4nN2aWchNURTHf+YhZYoQEjJLeUCZpVCGlAdSKDJEiUzhyRBlehBeRETKA5GkRMb4FA9KZjJ9n5lCpvvZWlqnVse97rn3nPN9+1r1r3vX3vuc9d/D2muvs+FvaQ4sAy4CFUAl4KoZlUA5cAFYCjQjj8wFPnpguMuDD8DsXCS2emCgKxCbs42EK1HMDkg0Bd57YFCx+KDr+s/CdiWOpagncCWO80LklQeGxEW5EPnpgSFx8UOIZDwwJC4yhRAR1qcjoDzG7n1Gn3EW+JUWEcH0fKEB0Bf4XgSRReYZ29McEcEnoHMEMqsKNGS3absw7akV4BJQS186HHhoMF71tQpw66eA2tpubJFrtigigtWmB/cb/RuglerbRYgYbgFNtH7PGAFr0UTEZfdXAxoB90M9XEPLpv3jGUK6k9ZrDTwtkkQsIoIHSkJkYOg5882IHcrS9iswQMsbAGUxSLi4RAS7jMHrQ4b2Vr1MnSemTNzqFC2rCRyNScIlQUQwTo2SBXvV6G8AdbVsiDlprkjhDJRJgshrs8A7qYsOyjYao7cAe8z/mQmRcEkREZwwC3yO0csoDFN9PaCO/h6VcIyXSYqIYJ7p7WNG/yyULOihhyHnK5EvQFc1tgXw0pSJ5wpkQcIkXNJEBNfNAh8VCvymql6m4EnfiThgnen9HUYvu3YH1bcB3vpOpBIYqgbXB27miNMm+k7EAdv+EdavNGV7fSZyQV2tleWmXNxuvxxxmvOFyL0gxwR0ByaYUOScqXcHaJgjTnPVTeQd0EWNa649LftFe9W11TrZ4rS1vhD5AYwwC/xyKOckIyIyKWKc5qqDyC89dwR7xIEsdRab3j8YMU5zVU1kTYQp8g3oo3UaA49zHMTmVheRw8aIyXlSOLf0ECUyKPReG6cdr2oi14znGay9nq+NnD8C2RA6iPUycVpFVRF5BLTUF3fUuR6lnYzYGLPAy3IcxEannaBzmhnpbtzsvQLbPzd7TTfgrkknzTcjtjNNIuJmR+qL6mhqs5hpeYT80hC4nRYR8SroAt9XJIkAMxJMv2YKIfLZJKqvxCThdM+IkhR/l8aI+IrMf/Whp8IDQ+Lixf/yMfQc+mnXlTiWBBcGongG7y8MoNcgXIliFiHZ7IFRrkBsIofMSSGdmQbeZxuJsMh8k8UjR1T51OzTxTPxTmLbXxfPfgPQ44OgiWG49wAAAABJRU5ErkJggg=="}},this.isLoading=!0,this.genders=["Not set / not specified","Female","Male","Non-binary"],window.scrollTo(0,0)}ngOnInit(){this.getId(),this.getDetails(),this.getCredits(),this.getSocialIds()}getId(){this.ac.params.subscribe(n=>{n.id&&(this.currentId=n.id,this.celebrityId=n.id)}).unsubscribe()}getDetails(){this.isLoading=!0,this.tmdbService.getTMDBData(`person/${this.celebrityId}`).subscribe(n=>{this.currentPerson=n,this.currentCelebrity=n,document.title=n.name+" - Showbizhub",this.isLoading=!1},()=>{this.isLoading=!1})}getCredits(){this.tmdbService.getTMDBData(`person/${this.currentId}/combined_credits`).subscribe(n=>{let r=n.cast.sort((s,a)=>{let c=parseInt(s?.release_date?.slice(0,4)||s?.first_air_date?.slice(0,4));return parseInt(a?.release_date?.slice(0,4)||a?.first_air_date?.slice(0,4))-c}),o=n.crew.sort((s,a)=>{let c=parseInt(s?.release_date?.slice(0,4)||s?.first_air_date?.slice(0,4));return parseInt(a?.release_date?.slice(0,4)||a?.first_air_date?.slice(0,4))-c});this.celebrityCredits={cast:r,crew:o},this.recentProject=r})}getImages(){this.tmdbService.getTMDBData(`person/${this.currentId}/images`).subscribe(n=>{this.personImages=n.profiles})}getSocialIds(){this.tmdbService.getTMDBData(`person/${this.currentId}/external_ids`).subscribe(n=>{this.externalIDs=n})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-celebrity"]],standalone:!0,features:[R],decls:33,vars:14,consts:[[3,"loading"],[1,"celebrity"],[3,"credits"],[1,"image"],["alt","",3,"src"],[1,"titles"],[1,"name"],[1,"department"],["class","socialIds",4,"ngIf"],[1,"overview"],[1,"about"],["class","field",4,"ngIf"],[1,"bio"],["pTemplate","header"],["containerType","combined",3,"combined"],["pTemplate","content"],[1,"socialIds"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],[1,"field"],[1,"pi","pi-user"],[3,"movie"],[3,"tvShow"]],template:function(r,o){r&1&&(y(0,"app-page-loader",0),p(1,"div",1)(2,"app-celebrity-hero-section",2)(3,"div",3),y(4,"img",4),p(5,"div",5)(6,"div",6),_(7),h(),p(8,"div",7),_(9),h()()()(),g(10,oj,6,5,"div",8),p(11,"div",9)(12,"div",10)(13,"h2"),_(14,"About"),h(),g(15,sj,6,3,"div",11)(16,aj,6,3,"div",11)(17,lj,6,3,"div",11)(18,cj,5,1,"div",11)(19,dj,5,1,"div",11)(20,uj,5,1,"div",11),h(),p(21,"div",12)(22,"h2"),_(23,"Bio"),h(),p(24,"p"),_(25),h()()(),p(26,"p-tabView")(27,"p-tabPanel"),g(28,pj,5,1,"ng-template",13),y(29,"app-cards-container",14),h(),p(30,"p-tabPanel"),g(31,hj,5,1,"ng-template",13)(32,_j,3,0,"ng-template",15),h()()()),r&2&&(l("loading",o.isLoading),d(2),l("credits",o.recentProject),d(2),l("src",o.imageUrl+(o.currentCelebrity==null?null:o.currentCelebrity.profile_path),qe),d(3),z(o.currentCelebrity==null?null:o.currentCelebrity.name),d(2),be(" ",o.currentCelebrity==null?null:o.currentCelebrity.known_for_department," "),d(),l("ngIf",o.externalIDs),d(5),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.birthday),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.birthday),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.deathday),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.place_of_birth),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.gender),d(),l("ngIf",o.currentCelebrity==null?null:o.currentCelebrity.popularity),d(5),be(" ",o.currentCelebrity==null?null:o.currentCelebrity.biography," "),d(4),l("combined",o.celebrityCredits==null?null:o.celebrityCredits.cast))},dependencies:[$,Ie,nn,Vo,Ga,Ve,H2,G2,_t,zo,Bo,Yr,Qr,he,Ka],styles:[".celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:180px;aspect-ratio:1/1;object-fit:cover;border-radius:50%;border:.4rem solid var(--primary-color);z-index:2}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{background-color:#000000c2;font-size:1.6rem;padding:6px 30px 6px 50px;transform:translate(-40px,40px);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);border-radius:5px 45px 45px 0;border-top:2px solid var(--primary-color);border-right:2px solid var(--primary-color)}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{margin-bottom:5px;font-weight:500;color:var(--primary-color)}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .department[_ngcontent-%COMP%]{font-size:1rem}.celebrity[_ngcontent-%COMP%] .socialIds[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin:.4rem}.celebrity[_ngcontent-%COMP%] .socialIds[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;display:flex;align-items:center;gap:3px;padding:4px 8px;background-color:var(--surface-100);border-radius:20px;color:var(--surface-700)}.celebrity[_ngcontent-%COMP%] .socialIds[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:1rem}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:300px 1fr;gap:1rem;padding:10px}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{border-left:2px solid var(--primary-color);margin-top:10px;padding-left:10px;margin-bottom:10px}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;background-color:var(--surface-100);padding:.2rem .4rem;border-radius:20px;margin-bottom:5px;font-size:.8rem;color:var(--surface-700)}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:500;color:var(--primary-color)}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%] .bio[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{background-color:var(--surface-100);color:var(--surface-700);padding:10px;border-radius:10px;font-size:.8rem}@media screen and (max-width: 767px){.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:128px}.celebrity[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{font-size:1.3rem;transform:translate(-40px,20px)}.celebrity[_ngcontent-%COMP%] .overview[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let i=t;return i})();var vj=["movingbg"],yj=i=>({active:i});function bj(i,t){if(i&1){let e=G();p(0,"a",4),A("click",function(){let r=S(e),o=r.$implicit,s=r.$index,a=m();return E(a.activeTab(o,s))}),_(1),h()}if(i&2){let e=t.$implicit,n=t.$index,r=m();U(H(4,yj,r.currentTab==n)),l("routerLink",r.routes[n]),d(),be(" ",e," ")}}var Cj=i=>({long:i}),Ij=i=>({left:i}),Qa=(()=>{let t=class t{constructor(n){this.activatedRoute=n,this.data=[],this.routes=[],this.newItemEvent=new L,this.itemWidth="",this.left=0,this.currentTab=0}ngAfterViewInit(){this.active&&(this.currentTab=this.active,this.itemWidth=this.movingBG.nativeElement.style.width,this.left=this.active*100,this.movingBG.nativeElement.style.left=`${this.left}px`)}activeTab(n,r){this.left=r*100,setTimeout(()=>{this.currentTab=r},300),this.movingBG.nativeElement.style.left=`${this.left}px`,this.newItemEvent.emit({tab:n,index:r})}};t.\u0275fac=function(r){return new(r||t)(w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-switcher"]],viewQuery:function(r,o){if(r&1&&oe(vj,5),r&2){let s;q(s=W())&&(o.movingBG=s.first)}},inputs:{data:"data",routes:"routes",active:"active"},outputs:{newItemEvent:"newItemEvent"},standalone:!0,features:[R],decls:6,vars:7,consts:[[1,"switchingTabs",3,"ngClass"],[1,"tabItems"],[1,"movingBg"],["movingbg",""],[1,"tabItem",3,"routerLink","click"],["class","tabItem",3,"routerLink","class"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1),Yt(2,bj,2,6,"a",5,C1),y(4,"span",2,3),h()()),r&2&&(l("ngClass",H(3,Cj,o.data.length>3)),d(2),Zt(o.data),d(2),xt(H(5,Ij,o.left)))},dependencies:[Ve,et,$,xe],styles:[".switchingTabs[_ngcontent-%COMP%]{height:34px;border-radius:20px;padding:2px}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%]{display:flex;align-items:center;height:30px;position:relative}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .tabItem[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;width:100px;color:#4d4d4d;font-size:14px;position:relative;text-decoration:none;z-index:1;cursor:pointer;transition:color ease .3s;text-transform:capitalize}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .tabItem.active[_ngcontent-%COMP%]{color:#fff;font-weight:500}.switchingTabs[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .movingBg[_ngcontent-%COMP%]{height:30px;width:100px;border-radius:15px;background:var(--primary-color)!important;position:absolute;left:0;transition:left cubic-bezier(.88,-.35,.565,1.35) .4s}@media screen and (max-width: 577px){.switchingTabs.long[_ngcontent-%COMP%]{scale:1}}"]});let i=t;return i})();var Ey=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["CalendarIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var wj=["container"],Tj=["inputfield"],xj=["contentWrapper"];function Sj(i,t){if(i&1){let e=G();p(0,"TimesIcon",10),A("click",function(){S(e);let r=m(3);return E(r.clear())}),h()}i&2&&l("styleClass","p-calendar-clear-icon")}function Ej(i,t){}function Oj(i,t){i&1&&g(0,Ej,0,0,"ng-template")}function Mj(i,t){if(i&1){let e=G();p(0,"span",11),A("click",function(){S(e);let r=m(3);return E(r.clear())}),g(1,Oj,1,0,null,12),h()}if(i&2){let e=m(3);d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function kj(i,t){if(i&1&&(Z(0),g(1,Sj,1,1,"TimesIcon",8)(2,Mj,2,1,"span",9),X()),i&2){let e=m(2);d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function Aj(i,t){if(i&1&&y(0,"span",15),i&2){let e=m(3);l("ngClass",e.icon)}}function Dj(i,t){i&1&&y(0,"CalendarIcon")}function Pj(i,t){}function Rj(i,t){i&1&&g(0,Pj,0,0,"ng-template")}function Vj(i,t){if(i&1&&(Z(0),g(1,Dj,1,0,"CalendarIcon",6)(2,Rj,1,0,null,12),X()),i&2){let e=m(3);d(),l("ngIf",!e.triggerIconTemplate),d(),l("ngTemplateOutlet",e.triggerIconTemplate)}}function Lj(i,t){if(i&1){let e=G();p(0,"button",13),A("click",function(r){S(e),m();let o=Le(1),s=m();return E(s.onButtonClick(r,o))}),g(1,Aj,1,1,"span",14)(2,Vj,3,2,"ng-container",6),h()}if(i&2){let e=m(2);l("disabled",e.disabled),T("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible)("aria-controls",e.panelId),d(),l("ngIf",e.icon),d(),l("ngIf",!e.icon)}}function Fj(i,t){if(i&1){let e=G();p(0,"CalendarIcon",18),A("click",function(r){S(e);let o=m(3);return E(o.onButtonClick(r))}),h()}}function Nj(i,t){i&1&&ie(0)}var Bj=i=>({clickCallBack:i});function zj(i,t){if(i&1&&(Z(0),g(1,Fj,1,0,"CalendarIcon",16)(2,Nj,1,0,"ng-container",17),X()),i&2){let e=m(2);d(),l("ngIf",!e.inputIconTemplate),d(),l("ngTemplateOutlet",e.inputIconTemplate)("ngTemplateOutletContext",H(3,Bj,e.onButtonClick.bind(e)))}}function Uj(i,t){if(i&1){let e=G();p(0,"input",4,5),A("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("keydown",function(r){S(e);let o=m();return E(o.onInputKeydown(r))})("click",function(){S(e);let r=m();return E(r.onInputClick())})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))})("input",function(r){S(e);let o=m();return E(o.onUserInput(r))}),h(),g(2,kj,3,2,"ng-container",6)(3,Lj,3,6,"button",7)(4,zj,3,5,"ng-container",6)}if(i&2){let e=m();U(e.inputStyleClass),l("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),T("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("aria-expanded",e.overlayVisible)("aria-controls",e.panelId)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null),d(2),l("ngIf",e.showClear&&!e.disabled&&e.value!=null),d(),l("ngIf",e.showIcon&&e.iconDisplay==="button"),d(),l("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function jj(i,t){i&1&&ie(0)}function Hj(i,t){i&1&&y(0,"ChevronLeftIcon",40),i&2&&l("styleClass","p-datepicker-prev-icon")}function Gj(i,t){}function $j(i,t){i&1&&g(0,Gj,0,0,"ng-template")}function qj(i,t){if(i&1&&(p(0,"span",41),g(1,$j,1,0,null,12),h()),i&2){let e=m(5);d(),l("ngTemplateOutlet",e.previousIconTemplate)}}function Wj(i,t){if(i&1){let e=G();p(0,"button",38),A("keydown",function(r){S(e);let o=m(4);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(4);return E(o.onPrevButtonClick(r))}),g(1,Hj,1,1,"ChevronLeftIcon",35)(2,qj,2,1,"span",39),h()}if(i&2){let e=m(4);T("aria-label",e.prevIconAriaLabel),d(),l("ngIf",!e.previousIconTemplate),d(),l("ngIf",e.previousIconTemplate)}}function Kj(i,t){if(i&1){let e=G();p(0,"button",42),A("click",function(r){S(e);let o=m(4);return E(o.switchToMonthView(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onContainerButtonKeydown(r))}),_(1),h()}if(i&2){let e=m().$implicit,n=m(3);l("disabled",n.switchViewButtonDisabled()),T("aria-label",n.getTranslation("chooseMonth")),d(),be(" ",n.getMonthName(e.month)," ")}}function Qj(i,t){if(i&1){let e=G();p(0,"button",43),A("click",function(r){S(e);let o=m(4);return E(o.switchToYearView(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onContainerButtonKeydown(r))}),_(1),h()}if(i&2){let e=m().$implicit,n=m(3);l("disabled",n.switchViewButtonDisabled()),T("aria-label",n.getTranslation("chooseYear")),d(),be(" ",n.getYear(e)," ")}}function Yj(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(5);d(),xn("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function Zj(i,t){i&1&&ie(0)}var Oy=i=>({$implicit:i});function Xj(i,t){if(i&1&&(p(0,"span",44),g(1,Yj,2,2,"ng-container",6)(2,Zj,1,0,"ng-container",17),h()),i&2){let e=m(4);d(),l("ngIf",!e.decadeTemplate),d(),l("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",H(3,Oy,e.yearPickerValues))}}function Jj(i,t){i&1&&y(0,"ChevronRightIcon",40),i&2&&l("styleClass","p-datepicker-next-icon")}function eH(i,t){}function tH(i,t){i&1&&g(0,eH,0,0,"ng-template")}function iH(i,t){if(i&1&&(p(0,"span",45),g(1,tH,1,0,null,12),h()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.nextIconTemplate)}}function nH(i,t){if(i&1&&(p(0,"th",51)(1,"span"),_(2),h()()),i&2){let e=m(5);d(2),z(e.getTranslation("weekHeader"))}}function rH(i,t){if(i&1&&(p(0,"th",52)(1,"span"),_(2),h()()),i&2){let e=t.$implicit;d(2),z(e)}}function oH(i,t){if(i&1&&(p(0,"td",55)(1,"span",56),_(2),h()()),i&2){let e=m().index,n=m(2).$implicit;d(2),be(" ",n.weekNumbers[e]," ")}}function sH(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(2).$implicit;d(),z(e.day)}}function aH(i,t){i&1&&ie(0)}function lH(i,t){if(i&1&&(Z(0),g(1,aH,1,0,"ng-container",17),X()),i&2){let e=m(2).$implicit,n=m(6);d(),l("ngTemplateOutlet",n.dateTemplate)("ngTemplateOutletContext",H(2,Oy,e))}}function cH(i,t){i&1&&ie(0)}function dH(i,t){if(i&1&&(Z(0),g(1,cH,1,0,"ng-container",17),X()),i&2){let e=m(2).$implicit,n=m(6);d(),l("ngTemplateOutlet",n.disabledDateTemplate)("ngTemplateOutletContext",H(2,Oy,e))}}function uH(i,t){if(i&1&&(p(0,"div",59),_(1),h()),i&2){let e=m(2).$implicit;d(),be(" ",e.day," ")}}var My=(i,t)=>({"p-highlight":i,"p-disabled":t});function pH(i,t){if(i&1){let e=G();Z(0),p(1,"span",57),A("click",function(r){S(e);let o=m().$implicit,s=m(6);return E(s.onDateSelect(r,o))})("keydown",function(r){S(e);let o=m().$implicit,s=m(3).index,a=m(3);return E(a.onDateCellKeydown(r,o,s))}),g(2,sH,2,1,"ng-container",6)(3,lH,2,4,"ng-container",6)(4,dH,2,4,"ng-container",6),h(),g(5,uH,2,1,"div",58),X()}if(i&2){let e=m().$implicit,n=m(6);d(),l("ngClass",We(5,My,n.isSelected(e)&&e.selectable,!e.selectable)),d(),l("ngIf",!n.dateTemplate&&(e.selectable||!n.disabledDateTemplate)),d(),l("ngIf",e.selectable||!n.disabledDateTemplate),d(),l("ngIf",!e.selectable),d(),l("ngIf",n.isSelected(e))}}var hH=(i,t)=>({"p-datepicker-other-month":i,"p-datepicker-today":t});function mH(i,t){if(i&1&&(p(0,"td",15),g(1,pH,6,8,"ng-container",6),h()),i&2){let e=t.$implicit,n=m(6);l("ngClass",We(3,hH,e.otherMonth,e.today)),T("aria-label",e.day),d(),l("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function fH(i,t){if(i&1&&(p(0,"tr"),g(1,oH,3,1,"td",53)(2,mH,2,6,"td",54),h()),i&2){let e=t.$implicit,n=m(5);d(),l("ngIf",n.showWeek),d(),l("ngForOf",e)}}function gH(i,t){if(i&1&&(p(0,"div",46)(1,"table",47)(2,"thead")(3,"tr"),g(4,nH,3,1,"th",48)(5,rH,3,1,"th",49),h()(),p(6,"tbody"),g(7,fH,3,2,"tr",50),h()()()),i&2){let e=m().$implicit,n=m(3);d(4),l("ngIf",n.showWeek),d(),l("ngForOf",n.weekDays),d(2),l("ngForOf",e.dates)}}function _H(i,t){if(i&1){let e=G();p(0,"div",27)(1,"div",28),g(2,Wj,3,3,"button",29),p(3,"div",30),g(4,Kj,2,3,"button",31)(5,Qj,2,3,"button",32)(6,Xj,3,5,"span",33),h(),p(7,"button",34),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(3);return E(o.onNextButtonClick(r))}),g(8,Jj,1,1,"ChevronRightIcon",35)(9,iH,2,1,"span",36),h()(),g(10,gH,8,3,"div",37),h()}if(i&2){let e=t.index,n=m(3);d(2),l("ngIf",e===0),d(2),l("ngIf",n.currentView==="date"),d(),l("ngIf",n.currentView!=="year"),d(),l("ngIf",n.currentView==="year"),d(),ki("display",n.numberOfMonths===1||e===n.numberOfMonths-1?"inline-flex":"none"),T("aria-label",n.nextIconAriaLabel),d(),l("ngIf",!n.nextIconTemplate),d(),l("ngIf",n.nextIconTemplate),d(),l("ngIf",n.currentView==="date")}}function vH(i,t){if(i&1&&(p(0,"div",59),_(1),h()),i&2){let e=m().$implicit;d(),be(" ",e," ")}}function yH(i,t){if(i&1){let e=G();p(0,"span",62),A("click",function(r){let s=S(e).index,a=m(4);return E(a.onMonthSelect(r,s))})("keydown",function(r){let s=S(e).index,a=m(4);return E(a.onMonthCellKeydown(r,s))}),_(1),g(2,vH,2,1,"div",58),h()}if(i&2){let e=t.$implicit,n=t.index,r=m(4);l("ngClass",We(3,My,r.isMonthSelected(n),r.isMonthDisabled(n))),d(),be(" ",e," "),d(),l("ngIf",r.isMonthSelected(n))}}function bH(i,t){if(i&1&&(p(0,"div",60),g(1,yH,3,6,"span",61),h()),i&2){let e=m(3);d(),l("ngForOf",e.monthPickerValues())}}function CH(i,t){if(i&1&&(p(0,"div",59),_(1),h()),i&2){let e=m().$implicit;d(),be(" ",e," ")}}function IH(i,t){if(i&1){let e=G();p(0,"span",65),A("click",function(r){let s=S(e).$implicit,a=m(4);return E(a.onYearSelect(r,s))})("keydown",function(r){let s=S(e).$implicit,a=m(4);return E(a.onYearCellKeydown(r,s))}),_(1),g(2,CH,2,1,"div",58),h()}if(i&2){let e=t.$implicit,n=m(4);l("ngClass",We(3,My,n.isYearSelected(e),n.isYearDisabled(e))),d(),be(" ",e," "),d(),l("ngIf",n.isYearSelected(e))}}function wH(i,t){if(i&1&&(p(0,"div",63),g(1,IH,3,6,"span",64),h()),i&2){let e=m(3);d(),l("ngForOf",e.yearPickerValues())}}function TH(i,t){if(i&1&&(Z(0),p(1,"div",23),g(2,_H,11,10,"div",24),h(),g(3,bH,2,1,"div",25)(4,wH,2,1,"div",26),X()),i&2){let e=m(2);d(2),l("ngForOf",e.months),d(),l("ngIf",e.currentView==="month"),d(),l("ngIf",e.currentView==="year")}}function xH(i,t){i&1&&y(0,"ChevronUpIcon")}function SH(i,t){}function EH(i,t){i&1&&g(0,SH,0,0,"ng-template")}function OH(i,t){i&1&&(Z(0),_(1,"0"),X())}function MH(i,t){i&1&&y(0,"ChevronDownIcon")}function kH(i,t){}function AH(i,t){i&1&&g(0,kH,0,0,"ng-template")}function DH(i,t){i&1&&y(0,"ChevronUpIcon")}function PH(i,t){}function RH(i,t){i&1&&g(0,PH,0,0,"ng-template")}function VH(i,t){i&1&&(Z(0),_(1,"0"),X())}function LH(i,t){i&1&&y(0,"ChevronDownIcon")}function FH(i,t){}function NH(i,t){i&1&&g(0,FH,0,0,"ng-template")}function BH(i,t){if(i&1&&(p(0,"div",69)(1,"span"),_(2),h()()),i&2){let e=m(3);d(2),z(e.timeSeparator)}}function zH(i,t){i&1&&y(0,"ChevronUpIcon")}function UH(i,t){}function jH(i,t){i&1&&g(0,UH,0,0,"ng-template")}function HH(i,t){i&1&&(Z(0),_(1,"0"),X())}function GH(i,t){i&1&&y(0,"ChevronDownIcon")}function $H(i,t){}function qH(i,t){i&1&&g(0,$H,0,0,"ng-template")}function WH(i,t){if(i&1){let e=G();p(0,"div",74)(1,"button",68),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.incrementSecond(r))})("keydown.space",function(r){S(e);let o=m(3);return E(o.incrementSecond(r))})("mousedown",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseDown(r,2,1))})("mouseup",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(3);return E(r.onTimePickerElementMouseLeave())}),g(2,zH,1,0,"ChevronUpIcon",6)(3,jH,1,0,null,12),h(),p(4,"span"),g(5,HH,2,0,"ng-container",6),_(6),h(),p(7,"button",68),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.decrementSecond(r))})("keydown.space",function(r){S(e);let o=m(3);return E(o.decrementSecond(r))})("mousedown",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseDown(r,2,-1))})("mouseup",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(3);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(3);return E(r.onTimePickerElementMouseLeave())}),g(8,GH,1,0,"ChevronDownIcon",6)(9,qH,1,0,null,12),h()()}if(i&2){let e=m(3);d(),T("aria-label",e.getTranslation("nextSecond")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),l("ngIf",e.currentSecond<10),d(),z(e.currentSecond),d(),T("aria-label",e.getTranslation("prevSecond")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate)}}function KH(i,t){i&1&&y(0,"ChevronUpIcon")}function QH(i,t){}function YH(i,t){i&1&&g(0,QH,0,0,"ng-template")}function ZH(i,t){i&1&&y(0,"ChevronDownIcon")}function XH(i,t){}function JH(i,t){i&1&&g(0,XH,0,0,"ng-template")}function eG(i,t){if(i&1){let e=G();p(0,"div",75)(1,"button",76),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))}),g(2,KH,1,0,"ChevronUpIcon",6)(3,YH,1,0,null,12),h(),p(4,"span"),_(5),h(),p(6,"button",76),A("keydown",function(r){S(e);let o=m(3);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))})("keydown.enter",function(r){S(e);let o=m(3);return E(o.toggleAMPM(r))}),g(7,ZH,1,0,"ChevronDownIcon",6)(8,JH,1,0,null,12),h()()}if(i&2){let e=m(3);d(),T("aria-label",e.getTranslation("am")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),z(e.pm?"PM":"AM"),d(),T("aria-label",e.getTranslation("pm")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate)}}function tG(i,t){if(i&1){let e=G();p(0,"div",66)(1,"div",67)(2,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.incrementHour(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.incrementHour(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,0,1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(3,xH,1,0,"ChevronUpIcon",6)(4,EH,1,0,null,12),h(),p(5,"span"),g(6,OH,2,0,"ng-container",6),_(7),h(),p(8,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.decrementHour(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.decrementHour(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,0,-1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(9,MH,1,0,"ChevronDownIcon",6)(10,AH,1,0,null,12),h()(),p(11,"div",69)(12,"span"),_(13),h()(),p(14,"div",70)(15,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.incrementMinute(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.incrementMinute(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,1,1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(16,DH,1,0,"ChevronUpIcon",6)(17,RH,1,0,null,12),h(),p(18,"span"),g(19,VH,2,0,"ng-container",6),_(20),h(),p(21,"button",68),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){S(e);let o=m(2);return E(o.decrementMinute(r))})("keydown.space",function(r){S(e);let o=m(2);return E(o.decrementMinute(r))})("mousedown",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseDown(r,1,-1))})("mouseup",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){S(e);let o=m(2);return E(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){S(e);let r=m(2);return E(r.onTimePickerElementMouseLeave())}),g(22,LH,1,0,"ChevronDownIcon",6)(23,NH,1,0,null,12),h()(),g(24,BH,3,1,"div",71)(25,WH,10,8,"div",72)(26,eG,9,7,"div",73),h()}if(i&2){let e=m(2);d(2),T("aria-label",e.getTranslation("nextHour")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),l("ngIf",e.currentHour<10),d(),z(e.currentHour),d(),T("aria-label",e.getTranslation("prevHour")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate),d(3),z(e.timeSeparator),d(2),T("aria-label",e.getTranslation("nextMinute")),d(),l("ngIf",!e.incrementIconTemplate),d(),l("ngTemplateOutlet",e.incrementIconTemplate),d(2),l("ngIf",e.currentMinute<10),d(),z(e.currentMinute),d(),T("aria-label",e.getTranslation("prevMinute")),d(),l("ngIf",!e.decrementIconTemplate),d(),l("ngTemplateOutlet",e.decrementIconTemplate),d(),l("ngIf",e.showSeconds),d(),l("ngIf",e.showSeconds),d(),l("ngIf",e.hourFormat=="12")}}var q2=i=>[i];function iG(i,t){if(i&1){let e=G();p(0,"div",77)(1,"button",78),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(2);return E(o.onTodayButtonClick(r))}),h(),p(2,"button",78),A("keydown",function(r){S(e);let o=m(2);return E(o.onContainerButtonKeydown(r))})("click",function(r){S(e);let o=m(2);return E(o.onClearButtonClick(r))}),h()()}if(i&2){let e=m(2);d(),l("label",e.getTranslation("today"))("ngClass",H(4,q2,e.todayButtonStyleClass)),d(),l("label",e.getTranslation("clear"))("ngClass",H(6,q2,e.clearButtonStyleClass))}}function nG(i,t){i&1&&ie(0)}var rG=(i,t,e,n,r,o)=>({"p-datepicker p-component":!0,"p-datepicker-inline":i,"p-disabled":t,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":n,"p-datepicker-monthpicker":r,"p-datepicker-touch-ui":o}),W2=(i,t)=>({showTransitionParams:i,hideTransitionParams:t}),oG=i=>({value:"visibleTouchUI",params:i}),sG=i=>({value:"visible",params:i});function aG(i,t){if(i&1){let e=G();p(0,"div",19,20),A("@overlayAnimation.start",function(r){S(e);let o=m();return E(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){S(e);let o=m();return E(o.onOverlayAnimationDone(r))})("click",function(r){S(e);let o=m();return E(o.onOverlayClick(r))}),Ae(2),g(3,jj,1,0,"ng-container",12)(4,TH,5,3,"ng-container",6)(5,tG,27,20,"div",21)(6,iG,3,8,"div",22),Ae(7,1),g(8,nG,1,0,"ng-container",12),h()}if(i&2){let e=m();U(e.panelStyleClass),l("ngStyle",e.panelStyle)("ngClass",zm(14,rG,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,e.view==="month",e.touchUI))("@overlayAnimation",e.touchUI?H(24,oG,We(21,W2,e.showTransitionOptions,e.hideTransitionOptions)):H(29,sG,We(26,W2,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.inline===!0),T("aria-label",e.getTranslation("chooseDate"))("role",e.inline?null:"dialog")("aria-modal",e.inline?null:"true"),d(3),l("ngTemplateOutlet",e.headerTemplate),d(),l("ngIf",!e.timeOnly),d(),l("ngIf",(e.showTime||e.timeOnly)&&e.currentView==="date"),d(),l("ngIf",e.showButtonBar),d(2),l("ngTemplateOutlet",e.footerTemplate)}}var lG=[[["p-header"]],[["p-footer"]]],cG=(i,t,e,n,r)=>({"p-calendar":!0,"p-input-icon-right":i,"p-calendar-w-btn":t,"p-calendar-timeonly":e,"p-calendar-disabled":n,"p-focus":r}),dG=["p-header","p-footer"],uG={provide:zt,useExisting:Tt(()=>Ps),multi:!0},Ps=(()=>{class i{document;el;renderer;cd;zone;config;overlayService;iconDisplay="button";style;styleClass;inputStyle;inputId;name;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;disabled;dateFormat;multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;appendTo;readonlyInput;shortYearCutoff="+10";monthNavigator;yearNavigator;hourFormat="24";timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;required;showOnFocus=!0;showWeek=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass="p-button-text";clearButtonStyleClass="p-button-text";autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){let n=e.split(":"),r=parseInt(n[0]),o=parseInt(n[1]);this.populateYearOptions(r,o)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}onFocus=new L;onBlur=new L;onClose=new L;onSelect=new L;onClear=new L;onInput=new L;onTodayClick=new L;onClearClick=new L;onMonthChange=new L;onYearChange=new L;onClickOutside=new L;onShow=new L;templates;containerViewChild;inputfieldViewChild;set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):!this.focus&&!this.inline&&this.initFocusableCell())}contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;onModelChange=()=>{};onModelTouched=()=>{};calendarElement;timePickerTimer;documentClickListener;animationEndListener;ticksTo1970;yearOptions;focus;isKeydown;filled;inputFieldValue=null;_minDate;_maxDate;_showTime;_yearRange;preventDocumentListener;dateTemplate;headerTemplate;footerTemplate;disabledDateTemplate;decadeTemplate;previousIconTemplate;nextIconTemplate;triggerIconTemplate;clearIconTemplate;decrementIconTemplate;incrementIconTemplate;inputIconTemplate;_disabledDates;_disabledDays;selectElement;todayElement;focusElement;scrollHandler;documentResizeListener;navigationState=null;isMonthNavigate;initialized;translationSubscription;_locale;_responsiveOptions;currentView;attributeSelector;panelId;_numberOfMonths=1;_firstDayOfWeek;_view="date";preventFocus;_defaultDate;window;get locale(){return this._locale}get iconButtonAriaLabel(){return this.iconAriaLabel?this.iconAriaLabel:this.getTranslation("chooseDate")}get prevIconAriaLabel(){return this.currentView==="year"?this.getTranslation("prevDecade"):this.currentView==="month"?this.getTranslation("prevYear"):this.getTranslation("prevMonth")}get nextIconAriaLabel(){return this.currentView==="year"?this.getTranslation("nextDecade"):this.currentView==="month"?this.getTranslation("nextYear"):this.getTranslation("nextMonth")}constructor(e,n,r,o,s,a,c){this.document=e,this.el=n,this.renderer=r,this.cd=o,this.zone=s,this.config=a,this.overlayService=c,this.window=this.document.defaultView}ngOnInit(){this.attributeSelector=Me(),this.panelId=this.attributeSelector+"_panel";let e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.yearOptions=[],this.currentView=this.view,this.view==="date"&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"inputicon":this.inputIconTemplate=e.template;break;case"previousicon":this.previousIconTemplate=e.template;break;case"nexticon":this.nextIconTemplate=e.template;break;case"triggericon":this.triggerIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"decrementicon":this.decrementIconTemplate=e.template;break;case"incrementicon":this.incrementIconTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;default:this.dateTemplate=e.template;break}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),!this.disabled&&!this.inline&&(this.initFocusableCell(),this.numberOfMonths===1&&this.contentViewChild&&this.contentViewChild.nativeElement&&(this.contentViewChild.nativeElement.style.width=x.getOuterWidth(this.containerViewChild?.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let r=e;r<=n;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Jt.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(n[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(n+r);return e}createMonths(e,n){this.months=this.months=[];for(let r=0;r11&&(o=o%11-1,s=n+1),this.months.push(this.createMonth(o,s))}}getWeekNumber(e){let n=new Date(e.getTime());n.setDate(n.getDate()+4-(n.getDay()||7));let r=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((r-n.getTime())/864e5)/7)+1}createMonth(e,n){let r=[],o=this.getFirstDayOfMonthIndex(e,n),s=this.getDaysCountInMonth(e,n),a=this.getDaysCountInPrevMonth(e,n),c=1,u=new Date,f=[],v=Math.ceil((s+o)/7);for(let b=0;bs){let K=this.getNextMonthAndYear(e,n);O.push({day:c-s,month:K.month,year:K.year,otherMonth:!0,today:this.isToday(u,c-s,K.month,K.year),selectable:this.isSelectable(c-s,K.month,K.year,!0)})}else O.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&f.push(this.getWeekNumber(new Date(O[0].year,O[0].month,O[0].day))),r.push(O)}return{month:e,year:n,dates:r,weekNumbers:f}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.disabled){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.disabled){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.yearNavigator&&this.currentYeare[e.length-1]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]+n,e[e.length-1]+n)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){if(this.disabled||!n.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,n)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),(this.isSingleSelection()&&this.hideOnDateTimeSelect||this.isRangeSelection()&&this.value[1])&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()}shouldSelectDate(e){return this.isMultipleSelection()&&this.maxDateCount!=null?this.maxDateCount>(this.value?this.value.length:0):!0}onMonthSelect(e,n){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){this.view==="year"?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value){if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n11,e>=12?this.currentHour=e==12?12:e-12:this.currentHour=e==0?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let n=new Date(e.year,e.month,e.day);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?n.setHours(this.pm?12:0):n.setHours(this.pm?this.currentHour+12:this.currentHour):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=n:(r=n,o=null),this.updateModel([r,o])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(e){if(this.value=e,this.dataType=="date")this.onModelChange(this.value);else if(this.dataType=="string")if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;Array.isArray(this.value)&&(n=this.value.map(r=>this.formatDateTime(r))),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(n);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let r=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,n){let r,o;return e===0?(r=11,o=n-1):(r=e-1,o=n),{month:r,year:o}}getNextMonthAndYear(e,n){let r,o;return e===11?(r=0,o=n+1):(r=e+1,o=n),{month:r,year:o}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(this.value){if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let n=!1;for(let r of this.value)if(n=this.isDateEquals(r,e),n)break;return n}else if(this.isRangeSelection())return this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e)}else return!1}isComparable(){return this.value!=null&&typeof this.value!="string"}isMonthSelected(e){if(this.isComparable()&&!this.isMultipleSelection()){let[n,r]=this.isRangeSelection()?this.value:[this.value,this.value],o=new Date(this.currentYear,e,1);return o>=n&&o<=(r??n)}return!1}isMonthDisabled(e){for(let n=1;n=s.getTime()}return o}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,n,r,o){return e.getDate()===n&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,n,r,o){let s=!0,a=!0,c=!0,u=!0;return o&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:if(this.inline||this.trapFocus(e),this.inline){let n=x.findSingle(this.containerViewChild?.nativeElement,".p-datepicker-header");e.target==n.children[n.children.length-1]&&this.initFocusableCell()}break;case 27:this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break;default:break}}onInputKeydown(e){this.isKeydown=!0,e.keyCode===40&&this.contentViewChild?this.trapFocus(e):e.keyCode===27?this.overlayVisible&&(this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault()):e.keyCode===13?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):e.keyCode===9&&this.contentViewChild&&(x.getFocusableElements(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,r){let o=e.currentTarget,s=o.parentElement;switch(e.which){case 40:{o.tabIndex="-1";let a=x.index(s),c=s.parentElement.nextElementSibling;if(c){let u=c.children[a].children[0];x.hasClass(u,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(c.children[a].children[0].tabIndex="0",c.children[a].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{o.tabIndex="-1";let a=x.index(s),c=s.parentElement.previousElementSibling;if(c){let u=c.children[a].children[0];x.hasClass(u,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(u.tabIndex="0",u.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let a=s.previousElementSibling;if(a){let c=a.children[0];x.hasClass(c,"p-disabled")||x.hasClass(c.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(c.tabIndex="0",c.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let a=s.nextElementSibling;if(a){let c=a.children[0];x.hasClass(c,"p-disabled")?this.navigateToMonth(!1,r):(c.tabIndex="0",c.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onMonthCellKeydown(e,n){let r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=x.index(r);let a=o[e.which===40?s+3:s-3];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onYearCellKeydown(e,n){let r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=x.index(r);let a=o[e.which===40?s+2:s-2];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.trapFocus(e);break}default:break}}navigateToMonth(e,n){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[n-1],o=x.find(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=o[o.length-1];s.tabIndex="0",s.focus()}else if(this.numberOfMonths===1||n===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[n+1],o=x.findSingle(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o.tabIndex="0",o.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=x.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"):this.currentView==="year"?n=x.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"):n=x.find(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else this.currentView==="month"?e=x.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"):this.currentView==="year"?e=x.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"):e=x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let e=this.contentViewChild?.nativeElement,n;if(this.currentView==="month"){let r=x.find(e,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),o=x.findSingle(e,".p-monthpicker .p-monthpicker-month.p-highlight");r.forEach(s=>s.tabIndex=-1),n=o||r[0],r.length===0&&x.find(e,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if(this.currentView==="year"){let r=x.find(e,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),o=x.findSingle(e,".p-yearpicker .p-yearpicker-year.p-highlight");r.forEach(s=>s.tabIndex=-1),n=o||r[0],r.length===0&&x.find(e,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if(n=x.findSingle(e,"span.p-highlight"),!n){let r=x.findSingle(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");r?n=r:n=x.findSingle(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}n&&(n.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.disabled||n.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=x.getFocusableElements(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let r=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(r==-1||r===0)if(this.focusTrap)n[n.length-1].focus();else{if(r===-1)return this.hideOverlay();if(r===0)return}else n[r-1].focus();else if(r==-1)if(this.timeOnly)n[0].focus();else{let o=0;for(let s=0;sa||this.minDate.getHours()===a&&(this.minDate.getMinutes()>n||this.minDate.getMinutes()===n&&this.minDate.getSeconds()>r))||this.maxDate&&c&&this.maxDate.toDateString()===c&&(this.maxDate.getHours()=24?r-24:r:this.hourFormat=="12"&&(n<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.validateTime(r,this.currentMinute,this.currentSecond,o)&&(this.currentHour=r,this.pm=o),e.preventDefault()}onTimePickerElementMouseDown(e,n,r){this.disabled||(this.repeat(e,null,n,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,r,o){let s=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},s),r){case 0:o===1?this.incrementHour(e):this.decrementHour(e);break;case 1:o===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:o===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=this.currentHour-this.stepHour,r=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(r=!this.pm),n=n<=0?12+n:n),this.validateTime(n,this.currentMinute,this.currentSecond,r)&&(this.currentHour=n,this.pm=r),e.preventDefault()}incrementMinute(e){let n=this.currentMinute+this.stepMinute;n=n>59?n-60:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}decrementMinute(e){let n=this.currentMinute-this.stepMinute;n=n<0?60+n:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,this.hourFormat=="12"?this.currentHour===12?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(this.value[1]?e=[this.value[0],e]:e=[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){let n=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,n)&&(this.pm=n,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let r=this.parseValueFromString(n);this.isValidSelection(r)?(this.updateModel(r),this.updateUI()):this.keepInvalid&&this.updateModel(r)}catch{let o=this.keepInvalid?n:null;this.updateModel(o)}this.filled=n!=null&&n.length,this.onInput.emit(e)}isValidSelection(e){let n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1))&&this.isRangeSelection()&&(n=e.length>1&&e[1]>e[0]),n}parseValueFromString(e){if(!e||e.trim().length===0)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);n=[];for(let o of r)n.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");n=[];for(let o=0;o{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),x.blockBodyScroll())}disableModality(){this.mask&&(x.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener||(this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyMask.bind(this))))}destroyMask(){if(!this.mask)return;this.renderer.removeChild(this.document.body,this.mask);let e=this.document.body.children,n;for(let r=0;r{let v=r+1{let O=""+v;if(o(f))for(;O.lengtho(f)?O[v]:b[v],c="",u=!1;if(e)for(r=0;r11&&r!=12&&(r-=12),this.hourFormat=="12"?n+=r===0?12:r<10?"0"+r:r:n+=r<10?"0"+r:r,n+=":",n+=o<10?"0"+o:o,this.showSeconds&&(n+=":",n+=s<10?"0"+s:s),this.hourFormat=="12"&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":"),r=this.showSeconds?3:2;if(n.length!==r)throw"Invalid time";let o=parseInt(n[0]),s=parseInt(n[1]),a=this.showSeconds?parseInt(n[2]):null;if(isNaN(o)||isNaN(s)||o>23||s>59||this.hourFormat=="12"&&o>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return this.hourFormat=="12"&&(o!==12&&this.pm?o+=12:!this.pm&&o===12&&(o-=12)),{hour:o,minute:s,second:a}}parseDate(e,n){if(n==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let r,o,s,a=0,c=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),u=-1,f=-1,v=-1,b=-1,O=!1,V,K=_e=>{let me=r+1{let me=K(_e),$e=_e==="@"?14:_e==="!"?20:_e==="y"&&me?4:_e==="o"?3:2,He=_e==="y"?$e:1,Et=new RegExp("^\\d{"+He+","+$e+"}"),ht=e.substring(a).match(Et);if(!ht)throw"Missing number at position "+a;return a+=ht[0].length,parseInt(ht[0],10)},j=(_e,me,$e)=>{let He=-1,Et=K(_e)?$e:me,ht=[];for(let Ht=0;Ht-(Ht[1].length-_i[1].length));for(let Ht=0;Ht{if(e.charAt(a)!==n.charAt(r))throw"Unexpected literal at position "+a;a++};for(this.view==="month"&&(v=1),r=0;r-1){f=1,v=b;do{if(o=this.getDaysCountInMonth(u,f-1),v<=o)break;f++,v-=o}while(!0)}if(this.view==="year"&&(f=f===-1?1:f,v=v===-1?1:v),V=this.daylightSavingAdjust(new Date(u,f-1,v)),V.getFullYear()!==u||V.getMonth()+1!==f||V.getDate()!==v)throw"Invalid date";return V}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&this.inputFieldValue!=""}onTodayButtonClick(e){let n=new Date,r={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(n.getMonth(),n.getFullYear()),this.onDateSelect(e,r),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(r=>!!(r.breakpoint&&r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new kn(this.containerViewChild?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return x.hasClass(e.target,"p-datepicker-prev")||x.hasClass(e.target,"p-datepicker-prev-icon")||x.hasClass(e.target,"p-datepicker-next")||x.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!x.isTouchDevice()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&Pt.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(ve),w(nt),w(Ne),w(ge),w(At),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-calendar"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(wj,5),oe(Tj,5),oe(xj,5)),n&2){let o;q(o=W())&&(r.containerViewChild=o.first),q(o=W())&&(r.inputfieldViewChild=o.first),q(o=W())&&(r.content=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focus)("p-calendar-clearable",r.showClear&&!r.disabled)},inputs:{iconDisplay:"iconDisplay",style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale",view:"view",defaultDate:"defaultDate"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[mt([uG])],ngContentSelectors:dG,decls:4,vars:12,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],[4,"ngIf"],["type","button","aria-haspopup","dialog","pButton","","pRipple","","class","p-datepicker-trigger p-button-icon-only","tabindex","0",3,"disabled","click",4,"ngIf"],[3,"styleClass","click",4,"ngIf"],["class","p-calendar-clear-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-calendar-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["type","button","aria-haspopup","dialog","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger","p-button-icon-only",3,"disabled","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[3,"styleClass",4,"ngIf"],["class","p-datepicker-next-icon",4,"ngIf"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],["class","p-datepicker-prev-icon",4,"ngIf"],[3,"styleClass"],[1,"p-datepicker-prev-icon"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[1,"p-datepicker-next-icon"],[1,"p-datepicker-calendar-container"],["role","grid",1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(n,r){n&1&&(je(lG),p(0,"span",0,1),g(2,Uj,5,21,"ng-template",2)(3,aG,9,31,"div",3),h()),n&2&&(U(r.styleClass),l("ngClass",w1(6,cG,r.showIcon&&r.iconDisplay==="input",r.showIcon&&r.iconDisplay==="button",r.timeOnly,r.disabled,r.focus||r.overlayVisible))("ngStyle",r.style),d(2),l("ngIf",!r.inline),d(),l("ngIf",r.inline||r.overlayVisible))},dependencies:()=>[xe,Vt,Ie,rt,Ce,Bu,ui,Kn,Qn,qa,en,pt,Ey],styles:[`@layer primeng{.p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-icon-wrapper{pointer-events:none}.p-calendar-clearable{position:relative}} -`],encapsulation:2,data:{animation:[rn("overlayAnimation",[Qd("visibleTouchUI",Lt({transform:"translate(-50%,-50%)",opacity:1})),ei("void => visible",[Lt({opacity:0,transform:"scaleY(0.8)"}),Xt("{{showTransitionParams}}",Lt({opacity:1,transform:"*"}))]),ei("visible => void",[Xt("{{hideTransitionParams}}",Lt({opacity:0}))]),ei("void => visibleTouchUI",[Lt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),Xt("{{showTransitionParams}}")]),ei("visibleTouchUI => void",[Xt("{{hideTransitionParams}}",Lt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return i})(),Ya=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,yt,Te,Rt,Kn,Qn,qa,en,pt,Ey,yt,Te]})}return i})();function pG(i,t){i&1&&y(0,"CheckIcon",7),i&2&&(l("styleClass","p-checkbox-icon"),T("aria-hidden",!0))}function hG(i,t){}function mG(i,t){i&1&&g(0,hG,0,0,"ng-template")}function fG(i,t){if(i&1&&(p(0,"span",8),g(1,mG,1,0,null,9),h()),i&2){let e=m(2);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.checkIconTemplate)}}function gG(i,t){if(i&1&&(Z(0),g(1,pG,1,2,"CheckIcon",5)(2,fG,2,2,"span",6),X()),i&2){let e=m();d(),l("ngIf",!e.checkIconTemplate),d(),l("ngIf",e.checkIconTemplate)}}function _G(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(),n;d(),z((n=e.label)!==null&&n!==void 0?n:"empty")}}function vG(i,t){i&1&&ie(0)}var hd=i=>({height:i}),yG=(i,t,e)=>({"p-multiselect-item":!0,"p-highlight":i,"p-disabled":t,"p-focus":e}),bG=i=>({"p-highlight":i}),Ay=i=>({$implicit:i}),CG=["container"],IG=["overlay"],wG=["filterInput"],TG=["focusInput"],xG=["items"],SG=["scroller"],EG=["lastHiddenFocusableEl"],OG=["firstHiddenFocusableEl"],MG=["headerCheckbox"];function kG(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(2);d(),z(e.label()||"empty")}}function AG(i,t){if(i&1){let e=G();p(0,"TimesCircleIcon",20),A("click",function(){S(e);let r=m(2).$implicit,o=m(3);return E(o.removeOption(r,o.event))}),h()}i&2&&(l("styleClass","p-multiselect-token-icon"),T("data-pc-section","clearicon")("aria-hidden",!0))}function DG(i,t){i&1&&ie(0)}function PG(i,t){if(i&1){let e=G();p(0,"span",21),A("click",function(){S(e);let r=m(2).$implicit,o=m(3);return E(o.removeOption(r,o.event))}),g(1,DG,1,0,"ng-container",22),h()}if(i&2){let e=m(5);T("data-pc-section","clearicon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.removeTokenIconTemplate)}}function RG(i,t){if(i&1&&(Z(0),g(1,AG,1,3,"TimesCircleIcon",18)(2,PG,2,3,"span",19),X()),i&2){let e=m(4);d(),l("ngIf",!e.removeTokenIconTemplate),d(),l("ngIf",e.removeTokenIconTemplate)}}function VG(i,t){if(i&1&&(p(0,"div",15,16)(2,"span",17),_(3),h(),g(4,RG,3,2,"ng-container",7),h()),i&2){let e=t.$implicit,n=m(3);d(3),z(n.getLabelByValue(e)),d(),l("ngIf",!n.disabled)}}function LG(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(3);d(),z(e.placeholder||e.defaultLabel||"empty")}}function FG(i,t){if(i&1&&(Z(0),g(1,VG,5,2,"div",14)(2,LG,2,1,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngForOf",e.chipSelectedItems()),d(),l("ngIf",!e.modelValue()||e.modelValue().length===0)}}function NG(i,t){if(i&1&&(Z(0),g(1,kG,2,1,"ng-container",7)(2,FG,3,2,"ng-container",7),X()),i&2){let e=m();d(),l("ngIf",e.display==="comma"),d(),l("ngIf",e.display==="chip")}}function BG(i,t){i&1&&ie(0)}function zG(i,t){if(i&1){let e=G();p(0,"TimesIcon",20),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),h()}i&2&&(l("styleClass","p-multiselect-clear-icon"),T("data-pc-section","clearicon")("aria-hidden",!0))}function UG(i,t){}function jG(i,t){i&1&&g(0,UG,0,0,"ng-template")}function HG(i,t){if(i&1){let e=G();p(0,"span",24),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),g(1,jG,1,0,null,22),h()}if(i&2){let e=m(2);T("data-pc-section","clearicon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function GG(i,t){if(i&1&&(Z(0),g(1,zG,1,3,"TimesIcon",18)(2,HG,2,3,"span",23),X()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function $G(i,t){if(i&1&&y(0,"span",27),i&2){let e=m(2);l("ngClass",e.dropdownIcon),T("data-pc-section","triggericon")("aria-hidden",!0)}}function qG(i,t){i&1&&y(0,"ChevronDownIcon",28),i&2&&(l("styleClass","p-multiselect-trigger-icon"),T("data-pc-section","triggericon")("aria-hidden",!0))}function WG(i,t){if(i&1&&(Z(0),g(1,$G,1,3,"span",25)(2,qG,1,3,"ChevronDownIcon",26),X()),i&2){let e=m();d(),l("ngIf",e.dropdownIcon),d(),l("ngIf",!e.dropdownIcon)}}function KG(i,t){}function QG(i,t){i&1&&g(0,KG,0,0,"ng-template")}function YG(i,t){if(i&1&&(p(0,"span",29),g(1,QG,1,0,null,22),h()),i&2){let e=m();T("data-pc-section","triggericon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.dropdownIconTemplate)}}function ZG(i,t){i&1&&ie(0)}function XG(i,t){i&1&&ie(0)}var K2=i=>({options:i});function JG(i,t){if(i&1&&(Z(0),g(1,XG,1,0,"ng-container",8),X()),i&2){let e=m(3);d(),l("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",H(2,K2,e.filterOptions))}}function e$(i,t){i&1&&y(0,"CheckIcon",28),i&2&&(l("styleClass","p-checkbox-icon"),T("aria-hidden",!0))}function t$(i,t){}function i$(i,t){i&1&&g(0,t$,0,0,"ng-template")}function n$(i,t){if(i&1&&(p(0,"span",51),g(1,i$,1,0,null,8),h()),i&2){let e=m(6);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.checkIconTemplate)("ngTemplateOutletContext",H(3,Ay,e.allSelected()))}}function r$(i,t){if(i&1&&(Z(0),g(1,e$,1,2,"CheckIcon",26)(2,n$,2,5,"span",50),X()),i&2){let e=m(5);d(),l("ngIf",!e.checkIconTemplate),d(),l("ngIf",e.checkIconTemplate)}}var o$=i=>({"p-checkbox-disabled":i}),s$=(i,t,e)=>({"p-highlight":i,"p-focus":t,"p-disabled":e});function a$(i,t){if(i&1){let e=G();p(0,"div",46),A("click",function(r){S(e);let o=m(4);return E(o.onToggleAll(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onHeaderCheckboxKeyDown(r))}),p(1,"div",2)(2,"input",47,48),A("focus",function(){S(e);let r=m(4);return E(r.onHeaderCheckboxFocus())})("blur",function(){S(e);let r=m(4);return E(r.onHeaderCheckboxBlur())}),h()(),p(4,"div",49),g(5,r$,3,2,"ng-container",7),h()()}if(i&2){let e=m(4);l("ngClass",H(9,o$,e.disabled||e.toggleAllDisabled)),d(),T("data-p-hidden-accessible",!0),d(),l("readonly",e.readonly)("disabled",e.disabled||e.toggleAllDisabled),T("checked",e.allSelected())("aria-label",e.toggleAllAriaLabel),d(2),l("ngClass",kt(11,s$,e.allSelected(),e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),T("aria-checked",e.allSelected()),d(),l("ngIf",e.allSelected())}}function l$(i,t){i&1&&y(0,"SearchIcon",28),i&2&&l("styleClass","p-multiselect-filter-icon")}function c$(i,t){}function d$(i,t){i&1&&g(0,c$,0,0,"ng-template")}function u$(i,t){if(i&1&&(p(0,"span",56),g(1,d$,1,0,null,22),h()),i&2){let e=m(5);d(),l("ngTemplateOutlet",e.filterIconTemplate)}}function p$(i,t){if(i&1){let e=G();p(0,"div",52)(1,"input",53,54),A("input",function(r){S(e);let o=m(4);return E(o.onFilterInputChange(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onFilterKeyDown(r))})("click",function(r){S(e);let o=m(4);return E(o.onInputClick(r))})("blur",function(r){S(e);let o=m(4);return E(o.onFilterBlur(r))}),h(),g(3,l$,1,1,"SearchIcon",26)(4,u$,2,1,"span",55),h()}if(i&2){let e=m(4);d(),l("value",e._filterValue()||"")("disabled",e.disabled),T("autocomplete",e.autocomplete)("placeholder",e.filterPlaceHolder)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),d(2),l("ngIf",!e.filterIconTemplate),d(),l("ngIf",e.filterIconTemplate)}}function h$(i,t){i&1&&y(0,"TimesIcon",28),i&2&&l("styleClass","p-multiselect-close-icon")}function m$(i,t){}function f$(i,t){i&1&&g(0,m$,0,0,"ng-template")}function g$(i,t){if(i&1&&(p(0,"span",57),g(1,f$,1,0,null,22),h()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.closeIconTemplate)}}function _$(i,t){if(i&1){let e=G();g(0,a$,6,15,"div",42)(1,p$,5,10,"div",43),p(2,"button",44),A("click",function(r){S(e);let o=m(3);return E(o.close(r))}),g(3,h$,1,1,"TimesIcon",26)(4,g$,2,1,"span",45),h()}if(i&2){let e=m(3);l("ngIf",e.showToggleAll&&!e.selectionLimit),d(),l("ngIf",e.filter),d(),T("aria-label",e.closeAriaLabel),d(),l("ngIf",!e.closeIconTemplate),d(),l("ngIf",e.closeIconTemplate)}}function v$(i,t){if(i&1&&(p(0,"div",39),Ae(1),g(2,ZG,1,0,"ng-container",22)(3,JG,2,4,"ng-container",40)(4,_$,5,5,"ng-template",null,41,dt),h()),i&2){let e=Le(5),n=m(2);d(2),l("ngTemplateOutlet",n.headerTemplate),d(),l("ngIf",n.filterTemplate)("ngIfElse",e)}}function y$(i,t){i&1&&ie(0)}var Q2=(i,t)=>({$implicit:i,options:t});function b$(i,t){if(i&1&&g(0,y$,1,0,"ng-container",8),i&2){let e=t.$implicit,n=t.options;m(2);let r=Le(8);l("ngTemplateOutlet",r)("ngTemplateOutletContext",We(2,Q2,e,n))}}function C$(i,t){i&1&&ie(0)}function I$(i,t){if(i&1&&g(0,C$,1,0,"ng-container",8),i&2){let e=t.options,n=m(4);l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(2,K2,e))}}function w$(i,t){i&1&&(Z(0),g(1,I$,1,4,"ng-template",60),X())}function T$(i,t){if(i&1){let e=G();p(0,"p-scroller",58,59),A("onLazyLoad",function(r){S(e);let o=m(2);return E(o.onLazyLoad.emit(r))}),g(2,b$,1,5,"ng-template",13)(3,w$,2,0,"ng-container",7),h()}if(i&2){let e=m(2);xt(H(9,hd,e.scrollHeight)),l("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),d(3),l("ngIf",e.loaderTemplate)}}function x$(i,t){i&1&&ie(0)}var S$=()=>({});function E$(i,t){if(i&1&&(Z(0),g(1,x$,1,0,"ng-container",8),X()),i&2){m();let e=Le(8),n=m();d(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",We(3,Q2,n.visibleOptions(),Ke(2,S$)))}}function O$(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit,n=m(3);d(),z(n.getOptionGroupLabel(e.optionGroup))}}function M$(i,t){i&1&&ie(0)}function k$(i,t){if(i&1&&(Z(0),p(1,"li",65),g(2,O$,2,1,"span",7)(3,M$,1,0,"ng-container",8),h(),X()),i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("ngStyle",H(5,hd,o.itemSize+"px")),T("id",s.id+"_"+s.getOptionIndex(n,o)),d(),l("ngIf",!s.groupTemplate),d(),l("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",H(7,Ay,r.optionGroup))}}function A$(i,t){if(i&1){let e=G();Z(0),p(1,"p-multiSelectItem",66),A("onClick",function(r){S(e);let o=m().index,s=m().options,a=m(2);return E(a.onOptionSelect(r,!1,a.getOptionIndex(o,s)))})("onMouseEnter",function(r){S(e);let o=m().index,s=m().options,a=m(2);return E(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))}),h(),X()}if(i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("id",s.id+"_"+s.getOptionIndex(n,o))("option",r)("selected",s.isSelected(r))("label",s.getOptionLabel(r))("disabled",s.isOptionDisabled(r))("template",s.itemTemplate)("checkIconTemplate",s.checkIconTemplate)("itemSize",o.itemSize)("focused",s.focusedOptionIndex()===s.getOptionIndex(n,o))("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(n,o)))("ariaSetSize",s.ariaSetSize)}}function D$(i,t){if(i&1&&g(0,k$,4,9,"ng-container",7)(1,A$,2,11,"ng-container",7),i&2){let e=t.$implicit,n=m(3);l("ngIf",n.isOptionGroup(e)),d(),l("ngIf",!n.isOptionGroup(e))}}function P$(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyFilterMessageLabel," ")}}function R$(i,t){i&1&&ie(0,null,68)}function V$(i,t){if(i&1&&(p(0,"li",67),g(1,P$,2,1,"ng-container",40)(2,R$,2,0,"ng-container",22),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,hd,e.itemSize+"px")),d(),l("ngIf",!n.emptyFilterTemplate&&!n.emptyTemplate)("ngIfElse",n.emptyFilter),d(),l("ngTemplateOutlet",n.emptyFilterTemplate||n.emptyTemplate)}}function L$(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyMessageLabel," ")}}function F$(i,t){i&1&&ie(0,null,69)}function N$(i,t){if(i&1&&(p(0,"li",67),g(1,L$,2,1,"ng-container",40)(2,F$,2,0,"ng-container",22),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,hd,e.itemSize+"px")),d(),l("ngIf",!n.emptyTemplate)("ngIfElse",n.empty),d(),l("ngTemplateOutlet",n.emptyTemplate)}}function B$(i,t){if(i&1&&(p(0,"ul",61,62),g(2,D$,2,2,"ng-template",63)(3,V$,3,6,"li",64)(4,N$,3,6,"li",64),h()),i&2){let e=t.$implicit,n=t.options,r=m(2);xt(n.contentStyle),l("ngClass",n.contentStyleClass),d(2),l("ngForOf",e),d(),l("ngIf",r.hasFilter()&&r.isEmpty()),d(),l("ngIf",!r.hasFilter()&&r.isEmpty())}}function z$(i,t){i&1&&ie(0)}function U$(i,t){if(i&1&&(p(0,"div",70),Ae(1,1),g(2,z$,1,0,"ng-container",22),h()),i&2){let e=m(2);d(2),l("ngTemplateOutlet",e.footerTemplate)}}function j$(i,t){if(i&1){let e=G();p(0,"div",30)(1,"span",31,32),A("focus",function(r){S(e);let o=m();return E(o.onFirstHiddenFocus(r))}),h(),g(3,v$,6,3,"div",33),p(4,"div",34),g(5,T$,4,11,"p-scroller",35)(6,E$,2,6,"ng-container",7)(7,B$,5,6,"ng-template",null,36,dt),h(),g(9,U$,3,1,"div",37),p(10,"span",31,38),A("focus",function(r){S(e);let o=m();return E(o.onLastHiddenFocus(r))}),h()()}if(i&2){let e=m();U(e.panelStyleClass),l("ngClass","p-multiselect-panel p-component")("ngStyle",e.panelStyle),d(),T("aria-hidden","true")("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),d(2),l("ngIf",e.showHeader),d(),ki("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),d(),l("ngIf",e.virtualScroll),d(),l("ngIf",!e.virtualScroll),d(3),l("ngIf",e.footerFacet||e.footerTemplate),d(),T("aria-hidden",!0)("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var H$=[[["p-header"]],[["p-footer"]]],G$=(i,t)=>({$implicit:i,removeChip:t}),$$=["p-header","p-footer"],q$={provide:zt,useExisting:Tt(()=>md),multi:!0},W$=(()=>{class i{id;option;selected;label;disabled;itemSize;focused;ariaPosInset;ariaSetSize;template;checkIconTemplate;onClick=new L;onMouseEnter=new L;onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected}),e.stopPropagation()}onOptionMouseEnter(e){this.onMouseEnter.emit({originalEvent:e,option:this.option,selected:this.selected})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-multiSelectItem"]],hostAttrs:[1,"p-element"],inputs:{id:"id",option:"option",selected:"selected",label:"label",disabled:"disabled",itemSize:"itemSize",focused:"focused",ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkIconTemplate:"checkIconTemplate"},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},decls:6,vars:26,consts:[["pRipple","",1,"p-multiselect-item",3,"ngStyle","ngClass","id","click","mouseenter"],[1,"p-checkbox","p-component"],[1,"p-checkbox-box",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"styleClass",4,"ngIf"],["class","p-checkbox-icon",4,"ngIf"],[3,"styleClass"],[1,"p-checkbox-icon"],[4,"ngTemplateOutlet"]],template:function(n,r){n&1&&(p(0,"li",0),A("click",function(s){return r.onOptionClick(s)})("mouseenter",function(s){return r.onOptionMouseEnter(s)}),p(1,"div",1)(2,"div",2),g(3,gG,3,2,"ng-container",3),h()(),g(4,_G,2,1,"span",3)(5,vG,1,0,"ng-container",4),h()),n&2&&(l("ngStyle",H(16,hd,r.itemSize+"px"))("ngClass",kt(18,yG,r.selected,r.disabled,r.focused))("id",r.id),T("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled),d(2),l("ngClass",H(22,bG,r.selected)),T("aria-checked",r.selected),d(),l("ngIf",r.selected),d(),l("ngIf",!r.template),d(),l("ngTemplateOutlet",r.template)("ngTemplateOutletContext",H(24,Ay,r.option)))},dependencies:()=>[xe,Ie,rt,Ce,ui,_n],encapsulation:2})}return i})(),md=(()=>{class i{el;renderer;cd;zone;filterService;config;overlayService;id;ariaLabel;style;styleClass;panelStyle;panelStyleClass;inputId;disabled;readonly;group;filter=!0;filterPlaceHolder;filterLocale;overlayVisible;tabindex=0;appendTo;dataKey;name;ariaLabelledBy;set displaySelectedLabel(e){this._displaySelectedLabel=e}get displaySelectedLabel(){return this._displaySelectedLabel}set maxSelectedLabels(e){this._maxSelectedLabels=e}get maxSelectedLabels(){return this._maxSelectedLabels}selectionLimit;selectedItemsLabel="{0} items selected";showToggleAll=!0;emptyFilterMessage="";emptyMessage="";resetFilterOnHide=!1;dropdownIcon;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";showHeader=!0;filterBy;scrollHeight="200px";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;filterMatchMode="contains";tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;autofocusFilter=!0;display="comma";autocomplete="off";showClear=!1;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}set defaultLabel(e){this._defaultLabel=e,console.warn("defaultLabel property is deprecated since 16.6.0, use placeholder instead")}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder=e}get placeholder(){return this._placeholder}get options(){return this._options()}set options(e){re.deepEquals(this._options(),e)||this._options.set(e)}get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get selectAll(){return this._selectAll}set selectAll(e){this._selectAll=e}focusOnHover=!1;filterFields;selectOnFocus=!1;autoOptionFocus=!0;onChange=new L;onFilter=new L;onFocus=new L;onBlur=new L;onClick=new L;onClear=new L;onPanelShow=new L;onPanelHide=new L;onLazyLoad=new L;onRemove=new L;onSelectAllChange=new L;containerViewChild;overlayViewChild;filterInputChild;focusInputViewChild;itemsViewChild;scroller;lastHiddenFocusableElementOnOverlay;firstHiddenFocusableElementOnOverlay;headerCheckboxViewChild;footerFacet;headerFacet;templates;searchValue;searchTimeout;_selectAll=null;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_defaultLabel;_placeholder;_itemSize;_selectionLimit;value;_filteredOptions;onModelChange=()=>{};onModelTouched=()=>{};valuesAsString;focus;filtered;itemTemplate;groupTemplate;loaderTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;selectedItemsTemplate;checkIconTemplate;filterIconTemplate;removeTokenIconTemplate;closeIconTemplate;clearIconTemplate;dropdownIconTemplate;headerCheckboxFocus;filterOptions;preventModelTouched;preventDocumentDefault;focused=!1;itemsWrapper;_displaySelectedLabel=!0;_maxSelectedLabels=3;modelValue=st(null);_filterValue=st(null);_options=st(null);startRangeIndex=st(-1);focusedOptionIndex=st(-1);selectedOptions;get containerClass(){return{"p-multiselect p-component p-inputwrapper":!0,"p-disabled":this.disabled,"p-multiselect-clearable":this.showClear&&!this.disabled,"p-multiselect-chip":this.display==="chip","p-focus":this.focused}}get inputClass(){return{"p-multiselect-label p-inputtext":!0,"p-placeholder":(this.placeholder||this.defaultLabel)&&(this.label()===this.placeholder||this.label()===this.defaultLabel),"p-multiselect-label-empty":!this.selectedItemsTemplate&&(this.label()==="p-emptylabel"||this.label().length===0)}}get panelClass(){return{"p-multiselect-panel p-component":!0,"p-input-filled":this.config.inputStyle==="filled","p-ripple-disabled":this.config.ripple===!1}}get labelClass(){return{"p-multiselect-label":!0,"p-placeholder":this.label()===this.placeholder||this.label()===this.defaultLabel,"p-multiselect-label-empty":!this.placeholder&&!this.defaultLabel&&(!this.modelValue()||this.modelValue().length===0)}}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Jt.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Jt.EMPTY_FILTER_MESSAGE)}get filled(){return typeof this.modelValue()=="string"?!!this.modelValue():re.isNotEmpty(this.modelValue())}get isVisibleClearIcon(){return this.modelValue()!=null&&this.modelValue()!==""&&re.isNotEmpty(this.modelValue())&&this.showClear&&!this.disabled&&this.filled}get toggleAllAriaLabel(){return this.config.translation.aria?this.config.translation.aria[this.allSelected()?"selectAll":"unselectAll"]:void 0}get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}visibleOptions=yi(()=>{let e=this.group?this.flatOptions(this.options):this.options||[];if(this._filterValue()){let n=this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale);if(this.group){let r=this.options||[],o=[];return r.forEach(s=>{let c=this.getOptionGroupChildren(s).filter(u=>n.includes(u));c.length>0&&o.push(pe(F({},s),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...c]}))}),this.flatOptions(o)}return n}return e});label=yi(()=>{let e,n=this.modelValue();if(n&&n.length&&this.displaySelectedLabel){if(re.isNotEmpty(this.maxSelectedLabels)&&n.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(let r=0;rre.isNotEmpty(this.maxSelectedLabels)&&this.modelValue()&&this.modelValue().length>this.maxSelectedLabels?this.modelValue().slice(0,this.maxSelectedLabels):this.modelValue());constructor(e,n,r,o,s,a,c){this.el=e,this.renderer=n,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.overlayService=c,Ki(()=>{let u=this.modelValue(),f=this.visibleOptions();f&&re.isNotEmpty(f)&&(this.optionValue&&this.optionLabel&&u?this.selectedOptions=f.filter(v=>u.includes(v[this.optionLabel])||u.includes(v[this.optionValue])):this.selectedOptions=u,this.cd.markForCheck())})}ngOnInit(){this.id=this.id||Me(),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue()&&this.modelValue().length===this.selectionLimit}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItems":this.selectedItemsTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"checkicon":this.checkIconTemplate=e.template;break;case"filtericon":this.filterIconTemplate=e.template;break;case"removetokenicon":this.removeTokenIconTemplate=e.template;break;case"closeicon":this.closeIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}ngAfterViewInit(){this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}flatOptions(e){return(e||[]).reduce((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>n.push(a)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()){this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());let e=this.getOptionValue(this.visibleOptions()[this.focusedOptionIndex()]);this.onOptionSelect({originalEvent:null,option:[e]})}}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e)}onInputClick(e){e.stopPropagation(),e.preventDefault(),this.focusedOptionIndex.set(-1)}onOptionSelect(e,n=!1,r=-1){let{originalEvent:o,option:s}=e;if(this.disabled||this.isOptionDisabled(s))return;let a=this.isSelected(s),c=null;a?c=this.modelValue().filter(u=>!re.equals(u,this.getOptionValue(s),this.equalityKey())):c=[...this.modelValue()||[],this.getOptionValue(s)],this.updateModel(c,o),r!==-1&&this.focusedOptionIndex.set(r),n&&x.focus(this.focusInputViewChild?.nativeElement),this.onChange.emit({originalEvent:e,value:c,itemValue:s})}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}onOptionSelectRange(e,n=-1,r=-1){if(n===-1&&(n=this.findNearestSelectedOptionIndex(r,!0)),r===-1&&(r=this.findNearestSelectedOptionIndex(n)),n!==-1&&r!==-1){let o=Math.min(n,r),s=Math.max(n,r),a=this.visibleOptions().slice(o,s+1).filter(c=>this.isValidOption(c)).map(c=>this.getOptionValue(c));this.updateModel(a,e)}}searchFields(){return(this.filterBy||this.optionLabel||"label").split(",")}findNearestSelectedOptionIndex(e,n=!1){let r=-1;return this.hasSelectedOption()&&(n?(r=this.findPrevSelectedOptionIndex(e),r=r===-1?this.findNextSelectedOptionIndex(e):r):(r=this.findNextSelectedOptionIndex(e),r=r===-1?this.findPrevSelectedOptionIndex(e):r)),r>-1?r:e}findPrevSelectedOptionIndex(e){let n=this.hasSelectedOption()&&e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidSelectedOption(r)):-1;return n>-1?n:-1}findFirstFocusedOptionIndex(){let e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextSelectedOptionIndex(e){let n=this.hasSelectedOption()&&ethis.isValidSelectedOption(r)):-1;return n>-1?n+e+1:-1}equalityKey(){return this.optionValue?null:this.dataKey}hasSelectedOption(){return re.isNotEmpty(this.modelValue())}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isOptionGroup(e){return(this.group||this.optionGroupLabel)&&e.optionGroup&&e.group}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.maxSelectionLimitReached()&&!this.isSelected(e)?!0:this.optionDisabled?re.resolveFieldData(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}isSelected(e){let n=this.getOptionValue(e);return(this.modelValue()||[]).some(r=>re.equals(r,n,this.equalityKey()))}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}getLabelByValue(e){let r=(this.group?this.flatOptions(this._options()):this._options()||[]).find(o=>!this.isOptionGroup(o)&&re.equals(this.getOptionValue(o),e,this.equalityKey()));return r?this.getOptionLabel(r):null}getSelectedItemsLabel(){let e=/{(.*?)}/,n=this.selectedItemsLabel?this.selectedItemsLabel:this.config.getTranslation(Jt.SELECTION_MESSAGE);return e.test(n)?n.replace(n.match(e)[0],this.modelValue().length+""):n}getOptionLabel(e){return this.optionLabel?re.resolveFieldData(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?re.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?re.resolveFieldData(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?re.resolveFieldData(e,this.optionGroupChildren):e.items}onKeyDown(e){if(this.disabled){e.preventDefault();return}let n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(e.code==="KeyA"&&n){let r=this.visibleOptions().filter(o=>this.isValidOption(o)).map(o=>this.getOptionValue(o));this.updateModel(r,e),e.preventDefault();break}!n&&re.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key),e.preventDefault());break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),n),this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e,n=!1){if(e.altKey&&!n)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,r,this.startRangeIndex()),this.changeFocusedOptionIndex(e,r),!this.overlayVisible&&this.show(),e.preventDefault()}e.stopPropagation()}onHomeKey(e,n=!1){let{currentTarget:r}=e;if(n){let o=r.value.length;r.setSelectionRange(0,e.shiftKey?o:0),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,s=this.findFirstOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,s,this.startRangeIndex()),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()}onEndKey(e,n=!1){let{currentTarget:r}=e;if(n){let o=r.value.length;r.setSelectionRange(e.shiftKey?0:o,o),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,s=this.findLastFocusedOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,this.startRangeIndex(),s),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){this.overlayVisible?this.focusedOptionIndex()!==-1&&(e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex()):this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]})):this.onArrowDownKey(e),e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(x.focus(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):(this.focusedOptionIndex()!==-1&&this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]}),this.overlayVisible&&this.hide(this.filter)))}onShiftKey(){this.startRangeIndex.set(this.focusedOptionIndex())}onContainerClick(e){if(!(this.disabled||this.readonly||e.target.isSameNode(this.focusInputViewChild?.nativeElement))){if(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]')){e.preventDefault();return}else(!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0));this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),this.onClick.emit(e),this.cd.detectChanges()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getFirstFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;x.focus(n)}onInputFocus(e){this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focused=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onFilterInputChange(e){let n=e.target.value?.trim();this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;x.focus(n)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}onHeaderCheckboxKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"Space":this.onToggleAll(e);break;case"Enter":this.onToggleAll(e);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}onToggleAll(e){if(!(this.disabled||this.readonly)){if(this.selectAll!=null)this.onSelectAllChange.emit({originalEvent:e,checked:!this.allSelected()});else{let n=this.allSelected()?[]:this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(n,e)}x.focus(this.headerCheckboxViewChild.nativeElement),this.headerCheckboxFocus=!0,e.preventDefault(),e.stopPropagation()}}changeFocusedOptionIndex(e,n){this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView())}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=x.findSingle(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}writeValue(e){this.value=e,this.modelValue.set(this.value),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}allSelected(){return this.selectAll!==null?this.selectAll:re.isNotEmpty(this.visibleOptions())&&this.visibleOptions().every(e=>this.isOptionGroup(e)||this.isOptionDisabled(e)||this.isSelected(e))}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),e&&x.focus(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&x.focus(this.focusInputViewChild?.nativeElement),this.onPanelHide.emit(),this.cd.markForCheck()}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.itemsWrapper=x.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-multiselect-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this._options()&&this._options().length)if(this.virtualScroll){let n=re.isNotEmpty(this.modelValue())?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=x.findSingle(this.itemsWrapper,".p-multiselect-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit();case"void":this.itemsWrapper=null,this.onModelTouched();break}}resetFilter(){this.filterInputChild&&this.filterInputChild.nativeElement&&(this.filterInputChild.nativeElement.value=""),this._filterValue.set(null),this._filteredOptions=null}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateModel(null,e),this.selectedOptions=null,this.onClear.emit(),e.stopPropagation()}removeOption(e,n){let r=this.modelValue().filter(o=>!re.equals(o,e,this.equalityKey()));this.updateModel(r,n),this.onChange.emit({originalEvent:n,value:r,itemValue:e}),n&&n.stopPropagation()}findNextItem(e){let n=e.nextElementSibling;return n?x.hasClass(n.children[0],"p-disabled")||x.isHidden(n.children[0])||x.hasClass(n,"p-multiselect-item-group")?this.findNextItem(n):n.children[0]:null}findPrevItem(e){let n=e.previousElementSibling;return n?x.hasClass(n.children[0],"p-disabled")||x.isHidden(n.children[0])||x.hasClass(n,"p-multiselect-item-group")?this.findPrevItem(n):n.children[0]:null}findNextOptionIndex(e){let n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?re.findLastIndex(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastOptionIndex(){return re.findLastIndex(this.visibleOptions(),e=>this.isValidOption(e))}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=[];for(let n of this.options){let r=this.filterService.filter(this.getOptionGroupChildren(n),this.searchFields(),this.filterValue,this.filterMatchMode,this.filterLocale);r&&r.length&&e.push(pe(F({},n),{[this.optionGroupChildren]:r}))}this._filteredOptions=e}else this._filteredOptions=this.filterService.filter(this.options,this.searchFields(),this.filterValue,this.filterMatchMode,this.filterLocale);else this._filteredOptions=null}hasFocusableElements(){return x.getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}static \u0275fac=function(n){return new(n||i)(w(ve),w(nt),w(Ne),w(ge),w(Lu),w(At),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-multiSelect"]],contentQueries:function(n,r,o){if(n&1&&(De(o,go,5),De(o,fo,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(CG,5),oe(IG,5),oe(wG,5),oe(TG,5),oe(xG,5),oe(SG,5),oe(EG,5),oe(OG,5),oe(MG,5)),n&2){let o;q(o=W())&&(r.containerViewChild=o.first),q(o=W())&&(r.overlayViewChild=o.first),q(o=W())&&(r.filterInputChild=o.first),q(o=W())&&(r.focusInputViewChild=o.first),q(o=W())&&(r.itemsViewChild=o.first),q(o=W())&&(r.scroller=o.first),q(o=W())&&(r.lastHiddenFocusableElementOnOverlay=o.first),q(o=W())&&(r.firstHiddenFocusableElementOnOverlay=o.first),q(o=W())&&(r.headerCheckboxViewChild=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-focus",r.focused||r.overlayVisible)("p-inputwrapper-filled",r.filled)},inputs:{id:"id",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:"disabled",readonly:"readonly",group:"group",filter:"filter",filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:"overlayVisible",tabindex:"tabindex",appendTo:"appendTo",dataKey:"dataKey",name:"name",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:"selectionLimit",selectedItemsLabel:"selectedItemsLabel",showToggleAll:"showToggleAll",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:"showHeader",filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",display:"display",autocomplete:"autocomplete",showClear:"showClear",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue",itemSize:"itemSize",selectAll:"selectAll",focusOnHover:"focusOnHover",filterFields:"filterFields",selectOnFocus:"selectOnFocus",autoOptionFocus:"autoOptionFocus"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide",onLazyLoad:"onLazyLoad",onRemove:"onRemove",onSelectAllChange:"onSelectAllChange"},features:[mt([q$])],ngContentSelectors:$$,decls:16,vars:41,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["role","combobox",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","focus","blur","keydown"],["focusInput",""],[1,"p-multiselect-label-container",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-multiselect-trigger"],["class","p-multiselect-trigger-icon",4,"ngIf"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],["pTemplate","content"],["class","p-multiselect-token",4,"ngFor","ngForOf"],[1,"p-multiselect-token"],["token",""],[1,"p-multiselect-token-label"],[3,"styleClass","click",4,"ngIf"],["class","p-multiselect-token-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-multiselect-token-icon",3,"click"],[4,"ngTemplateOutlet"],["class","p-multiselect-clear-icon",3,"click",4,"ngIf"],[1,"p-multiselect-clear-icon",3,"click"],["class","p-multiselect-trigger-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-multiselect-trigger-icon",3,"ngClass"],[3,"styleClass"],[1,"p-multiselect-trigger-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["firstHiddenFocusableEl",""],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-items-wrapper"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["class","p-multiselect-footer",4,"ngIf"],["lastHiddenFocusableEl",""],[1,"p-multiselect-header"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],["class","p-checkbox p-component",3,"ngClass","click","keydown",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],["type","button","pRipple","",1,"p-multiselect-close","p-link","p-button-icon-only",3,"click"],["class","p-multiselect-close-icon",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass","click","keydown"],["type","checkbox",3,"readonly","disabled","focus","blur"],["headerCheckbox",""],["role","checkbox",1,"p-checkbox-box",3,"ngClass"],["class","p-checkbox-icon",4,"ngIf"],[1,"p-checkbox-icon"],[1,"p-multiselect-filter-container"],["type","text","role","searchbox",1,"p-multiselect-filter","p-inputtext","p-component",3,"value","disabled","input","keydown","click","blur"],["filterInput",""],["class","p-multiselect-filter-icon",4,"ngIf"],[1,"p-multiselect-filter-icon"],[1,"p-multiselect-close-icon"],[3,"items","itemSize","autoSize","tabindex","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","loader"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-items","p-component",3,"ngClass"],["items",""],["ngFor","",3,"ngForOf"],["class","p-multiselect-empty-message",3,"ngStyle",4,"ngIf"],["role","option",1,"p-multiselect-item-group",3,"ngStyle"],[3,"id","option","selected","label","disabled","template","checkIconTemplate","itemSize","focused","ariaPosInset","ariaSetSize","onClick","onMouseEnter"],[1,"p-multiselect-empty-message",3,"ngStyle"],["emptyFilter",""],["empty",""],[1,"p-multiselect-footer"]],template:function(n,r){n&1&&(je(H$),p(0,"div",0,1),A("click",function(s){return r.onContainerClick(s)}),p(2,"div",2)(3,"input",3,4),A("focus",function(s){return r.onInputFocus(s)})("blur",function(s){return r.onInputBlur(s)})("keydown",function(s){return r.onKeyDown(s)}),h()(),p(5,"div",5)(6,"div",6),g(7,NG,3,2,"ng-container",7)(8,BG,1,0,"ng-container",8),h(),g(9,GG,3,2,"ng-container",7),h(),p(10,"div",9),g(11,WG,3,2,"ng-container",7)(12,YG,2,3,"span",10),h(),p(13,"p-overlay",11,12),A("visibleChange",function(s){return r.overlayVisible=s})("onAnimationStart",function(s){return r.onOverlayAnimationStart(s)})("onHide",function(){return r.hide()}),g(15,j$,12,18,"ng-template",13),h()()),n&2&&(U(r.styleClass),l("ngClass",r.containerClass)("ngStyle",r.style),T("id",r.id),d(2),T("data-p-hidden-accessible",!0),d(),l("pTooltip",r.tooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass),T("aria-disabled",r.disabled)("id",r.inputId)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",r.overlayVisible)("aria-controls",r.id+"_list")("tabindex",r.disabled?-1:r.tabindex)("aria-activedescendant",r.focused?r.focusedOptionId:void 0),d(2),l("pTooltip",r.tooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass),d(),l("ngClass",r.labelClass),d(),l("ngIf",!r.selectedItemsTemplate),d(),l("ngTemplateOutlet",r.selectedItemsTemplate)("ngTemplateOutletContext",We(38,G$,r.selectedOptions,r.removeOption.bind(r))),d(),l("ngIf",r.isVisibleClearIcon),d(2),l("ngIf",!r.dropdownIconTemplate),d(),l("ngIf",r.dropdownIconTemplate),d(),l("visible",r.overlayVisible)("options",r.overlayOptions)("target","@parent")("appendTo",r.appendTo)("autoZIndex",r.autoZIndex)("baseZIndex",r.baseZIndex)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions))},dependencies:()=>[xe,Vt,Ie,rt,Ce,As,he,Ro,ui,Fa,_n,Na,Ui,pt,en,W$],styles:[`@layer primeng{.p-multiselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-multiselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-multiselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer;display:flex}.p-multiselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-multiselect-label-empty{overflow:hidden;visibility:hidden}.p-multiselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-multiselect-token-icon{cursor:pointer}.p-multiselect-token-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px}.p-multiselect-items-wrapper{overflow:auto}.p-multiselect-items{margin:0;padding:0;list-style-type:none}.p-multiselect-item{cursor:pointer;display:flex;align-items:center;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-multiselect-header{display:flex;align-items:center;justify-content:space-between}.p-multiselect-filter-container{position:relative;flex:1 1 auto}.p-multiselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-multiselect-filter-container .p-inputtext{width:100%}.p-multiselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.p-fluid .p-multiselect{display:flex}.p-multiselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-multiselect-clearable{position:relative}} + `}}this.responsiveStyleElement.innerHTML=e}}destroyResponsiveStyleElement(){this.responsiveStyleElement&&(this.responsiveStyleElement.remove(),this.responsiveStyleElement=null)}bindDocumentClickListener(){this.documentClickListener||this.zone.runOutsideAngular(()=>{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new kn(this.containerViewChild?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return x.hasClass(e.target,"p-datepicker-prev")||x.hasClass(e.target,"p-datepicker-prev-icon")||x.hasClass(e.target,"p-datepicker-next")||x.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!x.isTouchDevice()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&Pt.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(ve),w(nt),w(Ne),w(ge),w(At),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-calendar"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(wj,5),oe(Tj,5),oe(xj,5)),n&2){let o;q(o=W())&&(r.containerViewChild=o.first),q(o=W())&&(r.inputfieldViewChild=o.first),q(o=W())&&(r.content=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focus)("p-calendar-clearable",r.showClear&&!r.disabled)},inputs:{iconDisplay:"iconDisplay",style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale",view:"view",defaultDate:"defaultDate"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[mt([uG])],ngContentSelectors:dG,decls:4,vars:12,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],[4,"ngIf"],["type","button","aria-haspopup","dialog","pButton","","pRipple","","class","p-datepicker-trigger p-button-icon-only","tabindex","0",3,"disabled","click",4,"ngIf"],[3,"styleClass","click",4,"ngIf"],["class","p-calendar-clear-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-calendar-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["type","button","aria-haspopup","dialog","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger","p-button-icon-only",3,"disabled","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[3,"styleClass",4,"ngIf"],["class","p-datepicker-next-icon",4,"ngIf"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],["class","p-datepicker-prev-icon",4,"ngIf"],[3,"styleClass"],[1,"p-datepicker-prev-icon"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[1,"p-datepicker-next-icon"],[1,"p-datepicker-calendar-container"],["role","grid",1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(n,r){n&1&&(Ue(lG),p(0,"span",0,1),g(2,Uj,5,21,"ng-template",2)(3,aG,9,31,"div",3),h()),n&2&&(U(r.styleClass),l("ngClass",w1(6,cG,r.showIcon&&r.iconDisplay==="input",r.showIcon&&r.iconDisplay==="button",r.timeOnly,r.disabled,r.focus||r.overlayVisible))("ngStyle",r.style),d(2),l("ngIf",!r.inline),d(),l("ngIf",r.inline||r.overlayVisible))},dependencies:()=>[xe,Vt,Ie,rt,Ce,Bu,ui,Qn,Yn,qa,en,pt,Ey],styles:[`@layer primeng{.p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-icon-wrapper{pointer-events:none}.p-calendar-clearable{position:relative}} +`],encapsulation:2,data:{animation:[rn("overlayAnimation",[Qd("visibleTouchUI",Lt({transform:"translate(-50%,-50%)",opacity:1})),ei("void => visible",[Lt({opacity:0,transform:"scaleY(0.8)"}),Xt("{{showTransitionParams}}",Lt({opacity:1,transform:"*"}))]),ei("visible => void",[Xt("{{hideTransitionParams}}",Lt({opacity:0}))]),ei("void => visibleTouchUI",[Lt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),Xt("{{showTransitionParams}}")]),ei("visibleTouchUI => void",[Xt("{{hideTransitionParams}}",Lt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return i})(),Ya=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,yt,Te,Rt,Qn,Yn,qa,en,pt,Ey,yt,Te]})}return i})();function pG(i,t){i&1&&y(0,"CheckIcon",7),i&2&&(l("styleClass","p-checkbox-icon"),T("aria-hidden",!0))}function hG(i,t){}function mG(i,t){i&1&&g(0,hG,0,0,"ng-template")}function fG(i,t){if(i&1&&(p(0,"span",8),g(1,mG,1,0,null,9),h()),i&2){let e=m(2);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.checkIconTemplate)}}function gG(i,t){if(i&1&&(Z(0),g(1,pG,1,2,"CheckIcon",5)(2,fG,2,2,"span",6),X()),i&2){let e=m();d(),l("ngIf",!e.checkIconTemplate),d(),l("ngIf",e.checkIconTemplate)}}function _G(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(),n;d(),z((n=e.label)!==null&&n!==void 0?n:"empty")}}function vG(i,t){i&1&&ie(0)}var hd=i=>({height:i}),yG=(i,t,e)=>({"p-multiselect-item":!0,"p-highlight":i,"p-disabled":t,"p-focus":e}),bG=i=>({"p-highlight":i}),Ay=i=>({$implicit:i}),CG=["container"],IG=["overlay"],wG=["filterInput"],TG=["focusInput"],xG=["items"],SG=["scroller"],EG=["lastHiddenFocusableEl"],OG=["firstHiddenFocusableEl"],MG=["headerCheckbox"];function kG(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(2);d(),z(e.label()||"empty")}}function AG(i,t){if(i&1){let e=G();p(0,"TimesCircleIcon",20),A("click",function(){S(e);let r=m(2).$implicit,o=m(3);return E(o.removeOption(r,o.event))}),h()}i&2&&(l("styleClass","p-multiselect-token-icon"),T("data-pc-section","clearicon")("aria-hidden",!0))}function DG(i,t){i&1&&ie(0)}function PG(i,t){if(i&1){let e=G();p(0,"span",21),A("click",function(){S(e);let r=m(2).$implicit,o=m(3);return E(o.removeOption(r,o.event))}),g(1,DG,1,0,"ng-container",22),h()}if(i&2){let e=m(5);T("data-pc-section","clearicon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.removeTokenIconTemplate)}}function RG(i,t){if(i&1&&(Z(0),g(1,AG,1,3,"TimesCircleIcon",18)(2,PG,2,3,"span",19),X()),i&2){let e=m(4);d(),l("ngIf",!e.removeTokenIconTemplate),d(),l("ngIf",e.removeTokenIconTemplate)}}function VG(i,t){if(i&1&&(p(0,"div",15,16)(2,"span",17),_(3),h(),g(4,RG,3,2,"ng-container",7),h()),i&2){let e=t.$implicit,n=m(3);d(3),z(n.getLabelByValue(e)),d(),l("ngIf",!n.disabled)}}function LG(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(3);d(),z(e.placeholder||e.defaultLabel||"empty")}}function FG(i,t){if(i&1&&(Z(0),g(1,VG,5,2,"div",14)(2,LG,2,1,"ng-container",7),X()),i&2){let e=m(2);d(),l("ngForOf",e.chipSelectedItems()),d(),l("ngIf",!e.modelValue()||e.modelValue().length===0)}}function NG(i,t){if(i&1&&(Z(0),g(1,kG,2,1,"ng-container",7)(2,FG,3,2,"ng-container",7),X()),i&2){let e=m();d(),l("ngIf",e.display==="comma"),d(),l("ngIf",e.display==="chip")}}function BG(i,t){i&1&&ie(0)}function zG(i,t){if(i&1){let e=G();p(0,"TimesIcon",20),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),h()}i&2&&(l("styleClass","p-multiselect-clear-icon"),T("data-pc-section","clearicon")("aria-hidden",!0))}function UG(i,t){}function jG(i,t){i&1&&g(0,UG,0,0,"ng-template")}function HG(i,t){if(i&1){let e=G();p(0,"span",24),A("click",function(r){S(e);let o=m(2);return E(o.clear(r))}),g(1,jG,1,0,null,22),h()}if(i&2){let e=m(2);T("data-pc-section","clearicon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function GG(i,t){if(i&1&&(Z(0),g(1,zG,1,3,"TimesIcon",18)(2,HG,2,3,"span",23),X()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function $G(i,t){if(i&1&&y(0,"span",27),i&2){let e=m(2);l("ngClass",e.dropdownIcon),T("data-pc-section","triggericon")("aria-hidden",!0)}}function qG(i,t){i&1&&y(0,"ChevronDownIcon",28),i&2&&(l("styleClass","p-multiselect-trigger-icon"),T("data-pc-section","triggericon")("aria-hidden",!0))}function WG(i,t){if(i&1&&(Z(0),g(1,$G,1,3,"span",25)(2,qG,1,3,"ChevronDownIcon",26),X()),i&2){let e=m();d(),l("ngIf",e.dropdownIcon),d(),l("ngIf",!e.dropdownIcon)}}function KG(i,t){}function QG(i,t){i&1&&g(0,KG,0,0,"ng-template")}function YG(i,t){if(i&1&&(p(0,"span",29),g(1,QG,1,0,null,22),h()),i&2){let e=m();T("data-pc-section","triggericon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.dropdownIconTemplate)}}function ZG(i,t){i&1&&ie(0)}function XG(i,t){i&1&&ie(0)}var K2=i=>({options:i});function JG(i,t){if(i&1&&(Z(0),g(1,XG,1,0,"ng-container",8),X()),i&2){let e=m(3);d(),l("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",H(2,K2,e.filterOptions))}}function e$(i,t){i&1&&y(0,"CheckIcon",28),i&2&&(l("styleClass","p-checkbox-icon"),T("aria-hidden",!0))}function t$(i,t){}function i$(i,t){i&1&&g(0,t$,0,0,"ng-template")}function n$(i,t){if(i&1&&(p(0,"span",51),g(1,i$,1,0,null,8),h()),i&2){let e=m(6);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.checkIconTemplate)("ngTemplateOutletContext",H(3,Ay,e.allSelected()))}}function r$(i,t){if(i&1&&(Z(0),g(1,e$,1,2,"CheckIcon",26)(2,n$,2,5,"span",50),X()),i&2){let e=m(5);d(),l("ngIf",!e.checkIconTemplate),d(),l("ngIf",e.checkIconTemplate)}}var o$=i=>({"p-checkbox-disabled":i}),s$=(i,t,e)=>({"p-highlight":i,"p-focus":t,"p-disabled":e});function a$(i,t){if(i&1){let e=G();p(0,"div",46),A("click",function(r){S(e);let o=m(4);return E(o.onToggleAll(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onHeaderCheckboxKeyDown(r))}),p(1,"div",2)(2,"input",47,48),A("focus",function(){S(e);let r=m(4);return E(r.onHeaderCheckboxFocus())})("blur",function(){S(e);let r=m(4);return E(r.onHeaderCheckboxBlur())}),h()(),p(4,"div",49),g(5,r$,3,2,"ng-container",7),h()()}if(i&2){let e=m(4);l("ngClass",H(9,o$,e.disabled||e.toggleAllDisabled)),d(),T("data-p-hidden-accessible",!0),d(),l("readonly",e.readonly)("disabled",e.disabled||e.toggleAllDisabled),T("checked",e.allSelected())("aria-label",e.toggleAllAriaLabel),d(2),l("ngClass",kt(11,s$,e.allSelected(),e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),T("aria-checked",e.allSelected()),d(),l("ngIf",e.allSelected())}}function l$(i,t){i&1&&y(0,"SearchIcon",28),i&2&&l("styleClass","p-multiselect-filter-icon")}function c$(i,t){}function d$(i,t){i&1&&g(0,c$,0,0,"ng-template")}function u$(i,t){if(i&1&&(p(0,"span",56),g(1,d$,1,0,null,22),h()),i&2){let e=m(5);d(),l("ngTemplateOutlet",e.filterIconTemplate)}}function p$(i,t){if(i&1){let e=G();p(0,"div",52)(1,"input",53,54),A("input",function(r){S(e);let o=m(4);return E(o.onFilterInputChange(r))})("keydown",function(r){S(e);let o=m(4);return E(o.onFilterKeyDown(r))})("click",function(r){S(e);let o=m(4);return E(o.onInputClick(r))})("blur",function(r){S(e);let o=m(4);return E(o.onFilterBlur(r))}),h(),g(3,l$,1,1,"SearchIcon",26)(4,u$,2,1,"span",55),h()}if(i&2){let e=m(4);d(),l("value",e._filterValue()||"")("disabled",e.disabled),T("autocomplete",e.autocomplete)("placeholder",e.filterPlaceHolder)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),d(2),l("ngIf",!e.filterIconTemplate),d(),l("ngIf",e.filterIconTemplate)}}function h$(i,t){i&1&&y(0,"TimesIcon",28),i&2&&l("styleClass","p-multiselect-close-icon")}function m$(i,t){}function f$(i,t){i&1&&g(0,m$,0,0,"ng-template")}function g$(i,t){if(i&1&&(p(0,"span",57),g(1,f$,1,0,null,22),h()),i&2){let e=m(4);d(),l("ngTemplateOutlet",e.closeIconTemplate)}}function _$(i,t){if(i&1){let e=G();g(0,a$,6,15,"div",42)(1,p$,5,10,"div",43),p(2,"button",44),A("click",function(r){S(e);let o=m(3);return E(o.close(r))}),g(3,h$,1,1,"TimesIcon",26)(4,g$,2,1,"span",45),h()}if(i&2){let e=m(3);l("ngIf",e.showToggleAll&&!e.selectionLimit),d(),l("ngIf",e.filter),d(),T("aria-label",e.closeAriaLabel),d(),l("ngIf",!e.closeIconTemplate),d(),l("ngIf",e.closeIconTemplate)}}function v$(i,t){if(i&1&&(p(0,"div",39),Ae(1),g(2,ZG,1,0,"ng-container",22)(3,JG,2,4,"ng-container",40)(4,_$,5,5,"ng-template",null,41,dt),h()),i&2){let e=Le(5),n=m(2);d(2),l("ngTemplateOutlet",n.headerTemplate),d(),l("ngIf",n.filterTemplate)("ngIfElse",e)}}function y$(i,t){i&1&&ie(0)}var Q2=(i,t)=>({$implicit:i,options:t});function b$(i,t){if(i&1&&g(0,y$,1,0,"ng-container",8),i&2){let e=t.$implicit,n=t.options;m(2);let r=Le(8);l("ngTemplateOutlet",r)("ngTemplateOutletContext",We(2,Q2,e,n))}}function C$(i,t){i&1&&ie(0)}function I$(i,t){if(i&1&&g(0,C$,1,0,"ng-container",8),i&2){let e=t.options,n=m(4);l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(2,K2,e))}}function w$(i,t){i&1&&(Z(0),g(1,I$,1,4,"ng-template",60),X())}function T$(i,t){if(i&1){let e=G();p(0,"p-scroller",58,59),A("onLazyLoad",function(r){S(e);let o=m(2);return E(o.onLazyLoad.emit(r))}),g(2,b$,1,5,"ng-template",13)(3,w$,2,0,"ng-container",7),h()}if(i&2){let e=m(2);xt(H(9,hd,e.scrollHeight)),l("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),d(3),l("ngIf",e.loaderTemplate)}}function x$(i,t){i&1&&ie(0)}var S$=()=>({});function E$(i,t){if(i&1&&(Z(0),g(1,x$,1,0,"ng-container",8),X()),i&2){m();let e=Le(8),n=m();d(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",We(3,Q2,n.visibleOptions(),Ke(2,S$)))}}function O$(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit,n=m(3);d(),z(n.getOptionGroupLabel(e.optionGroup))}}function M$(i,t){i&1&&ie(0)}function k$(i,t){if(i&1&&(Z(0),p(1,"li",65),g(2,O$,2,1,"span",7)(3,M$,1,0,"ng-container",8),h(),X()),i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("ngStyle",H(5,hd,o.itemSize+"px")),T("id",s.id+"_"+s.getOptionIndex(n,o)),d(),l("ngIf",!s.groupTemplate),d(),l("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",H(7,Ay,r.optionGroup))}}function A$(i,t){if(i&1){let e=G();Z(0),p(1,"p-multiSelectItem",66),A("onClick",function(r){S(e);let o=m().index,s=m().options,a=m(2);return E(a.onOptionSelect(r,!1,a.getOptionIndex(o,s)))})("onMouseEnter",function(r){S(e);let o=m().index,s=m().options,a=m(2);return E(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))}),h(),X()}if(i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m(2);d(),l("id",s.id+"_"+s.getOptionIndex(n,o))("option",r)("selected",s.isSelected(r))("label",s.getOptionLabel(r))("disabled",s.isOptionDisabled(r))("template",s.itemTemplate)("checkIconTemplate",s.checkIconTemplate)("itemSize",o.itemSize)("focused",s.focusedOptionIndex()===s.getOptionIndex(n,o))("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(n,o)))("ariaSetSize",s.ariaSetSize)}}function D$(i,t){if(i&1&&g(0,k$,4,9,"ng-container",7)(1,A$,2,11,"ng-container",7),i&2){let e=t.$implicit,n=m(3);l("ngIf",n.isOptionGroup(e)),d(),l("ngIf",!n.isOptionGroup(e))}}function P$(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyFilterMessageLabel," ")}}function R$(i,t){i&1&&ie(0,null,68)}function V$(i,t){if(i&1&&(p(0,"li",67),g(1,P$,2,1,"ng-container",40)(2,R$,2,0,"ng-container",22),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,hd,e.itemSize+"px")),d(),l("ngIf",!n.emptyFilterTemplate&&!n.emptyTemplate)("ngIfElse",n.emptyFilter),d(),l("ngTemplateOutlet",n.emptyFilterTemplate||n.emptyTemplate)}}function L$(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(4);d(),be(" ",e.emptyMessageLabel," ")}}function F$(i,t){i&1&&ie(0,null,69)}function N$(i,t){if(i&1&&(p(0,"li",67),g(1,L$,2,1,"ng-container",40)(2,F$,2,0,"ng-container",22),h()),i&2){let e=m().options,n=m(2);l("ngStyle",H(4,hd,e.itemSize+"px")),d(),l("ngIf",!n.emptyTemplate)("ngIfElse",n.empty),d(),l("ngTemplateOutlet",n.emptyTemplate)}}function B$(i,t){if(i&1&&(p(0,"ul",61,62),g(2,D$,2,2,"ng-template",63)(3,V$,3,6,"li",64)(4,N$,3,6,"li",64),h()),i&2){let e=t.$implicit,n=t.options,r=m(2);xt(n.contentStyle),l("ngClass",n.contentStyleClass),d(2),l("ngForOf",e),d(),l("ngIf",r.hasFilter()&&r.isEmpty()),d(),l("ngIf",!r.hasFilter()&&r.isEmpty())}}function z$(i,t){i&1&&ie(0)}function U$(i,t){if(i&1&&(p(0,"div",70),Ae(1,1),g(2,z$,1,0,"ng-container",22),h()),i&2){let e=m(2);d(2),l("ngTemplateOutlet",e.footerTemplate)}}function j$(i,t){if(i&1){let e=G();p(0,"div",30)(1,"span",31,32),A("focus",function(r){S(e);let o=m();return E(o.onFirstHiddenFocus(r))}),h(),g(3,v$,6,3,"div",33),p(4,"div",34),g(5,T$,4,11,"p-scroller",35)(6,E$,2,6,"ng-container",7)(7,B$,5,6,"ng-template",null,36,dt),h(),g(9,U$,3,1,"div",37),p(10,"span",31,38),A("focus",function(r){S(e);let o=m();return E(o.onLastHiddenFocus(r))}),h()()}if(i&2){let e=m();U(e.panelStyleClass),l("ngClass","p-multiselect-panel p-component")("ngStyle",e.panelStyle),d(),T("aria-hidden","true")("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),d(2),l("ngIf",e.showHeader),d(),ki("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),d(),l("ngIf",e.virtualScroll),d(),l("ngIf",!e.virtualScroll),d(3),l("ngIf",e.footerFacet||e.footerTemplate),d(),T("aria-hidden",!0)("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var H$=[[["p-header"]],[["p-footer"]]],G$=(i,t)=>({$implicit:i,removeChip:t}),$$=["p-header","p-footer"],q$={provide:zt,useExisting:Tt(()=>md),multi:!0},W$=(()=>{class i{id;option;selected;label;disabled;itemSize;focused;ariaPosInset;ariaSetSize;template;checkIconTemplate;onClick=new L;onMouseEnter=new L;onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected}),e.stopPropagation()}onOptionMouseEnter(e){this.onMouseEnter.emit({originalEvent:e,option:this.option,selected:this.selected})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-multiSelectItem"]],hostAttrs:[1,"p-element"],inputs:{id:"id",option:"option",selected:"selected",label:"label",disabled:"disabled",itemSize:"itemSize",focused:"focused",ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkIconTemplate:"checkIconTemplate"},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},decls:6,vars:26,consts:[["pRipple","",1,"p-multiselect-item",3,"ngStyle","ngClass","id","click","mouseenter"],[1,"p-checkbox","p-component"],[1,"p-checkbox-box",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"styleClass",4,"ngIf"],["class","p-checkbox-icon",4,"ngIf"],[3,"styleClass"],[1,"p-checkbox-icon"],[4,"ngTemplateOutlet"]],template:function(n,r){n&1&&(p(0,"li",0),A("click",function(s){return r.onOptionClick(s)})("mouseenter",function(s){return r.onOptionMouseEnter(s)}),p(1,"div",1)(2,"div",2),g(3,gG,3,2,"ng-container",3),h()(),g(4,_G,2,1,"span",3)(5,vG,1,0,"ng-container",4),h()),n&2&&(l("ngStyle",H(16,hd,r.itemSize+"px"))("ngClass",kt(18,yG,r.selected,r.disabled,r.focused))("id",r.id),T("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled),d(2),l("ngClass",H(22,bG,r.selected)),T("aria-checked",r.selected),d(),l("ngIf",r.selected),d(),l("ngIf",!r.template),d(),l("ngTemplateOutlet",r.template)("ngTemplateOutletContext",H(24,Ay,r.option)))},dependencies:()=>[xe,Ie,rt,Ce,ui,_n],encapsulation:2})}return i})(),md=(()=>{class i{el;renderer;cd;zone;filterService;config;overlayService;id;ariaLabel;style;styleClass;panelStyle;panelStyleClass;inputId;disabled;readonly;group;filter=!0;filterPlaceHolder;filterLocale;overlayVisible;tabindex=0;appendTo;dataKey;name;ariaLabelledBy;set displaySelectedLabel(e){this._displaySelectedLabel=e}get displaySelectedLabel(){return this._displaySelectedLabel}set maxSelectedLabels(e){this._maxSelectedLabels=e}get maxSelectedLabels(){return this._maxSelectedLabels}selectionLimit;selectedItemsLabel="{0} items selected";showToggleAll=!0;emptyFilterMessage="";emptyMessage="";resetFilterOnHide=!1;dropdownIcon;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";showHeader=!0;filterBy;scrollHeight="200px";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;filterMatchMode="contains";tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;autofocusFilter=!0;display="comma";autocomplete="off";showClear=!1;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}set defaultLabel(e){this._defaultLabel=e,console.warn("defaultLabel property is deprecated since 16.6.0, use placeholder instead")}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder=e}get placeholder(){return this._placeholder}get options(){return this._options()}set options(e){re.deepEquals(this._options(),e)||this._options.set(e)}get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get selectAll(){return this._selectAll}set selectAll(e){this._selectAll=e}focusOnHover=!1;filterFields;selectOnFocus=!1;autoOptionFocus=!0;onChange=new L;onFilter=new L;onFocus=new L;onBlur=new L;onClick=new L;onClear=new L;onPanelShow=new L;onPanelHide=new L;onLazyLoad=new L;onRemove=new L;onSelectAllChange=new L;containerViewChild;overlayViewChild;filterInputChild;focusInputViewChild;itemsViewChild;scroller;lastHiddenFocusableElementOnOverlay;firstHiddenFocusableElementOnOverlay;headerCheckboxViewChild;footerFacet;headerFacet;templates;searchValue;searchTimeout;_selectAll=null;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_defaultLabel;_placeholder;_itemSize;_selectionLimit;value;_filteredOptions;onModelChange=()=>{};onModelTouched=()=>{};valuesAsString;focus;filtered;itemTemplate;groupTemplate;loaderTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;selectedItemsTemplate;checkIconTemplate;filterIconTemplate;removeTokenIconTemplate;closeIconTemplate;clearIconTemplate;dropdownIconTemplate;headerCheckboxFocus;filterOptions;preventModelTouched;preventDocumentDefault;focused=!1;itemsWrapper;_displaySelectedLabel=!0;_maxSelectedLabels=3;modelValue=st(null);_filterValue=st(null);_options=st(null);startRangeIndex=st(-1);focusedOptionIndex=st(-1);selectedOptions;get containerClass(){return{"p-multiselect p-component p-inputwrapper":!0,"p-disabled":this.disabled,"p-multiselect-clearable":this.showClear&&!this.disabled,"p-multiselect-chip":this.display==="chip","p-focus":this.focused}}get inputClass(){return{"p-multiselect-label p-inputtext":!0,"p-placeholder":(this.placeholder||this.defaultLabel)&&(this.label()===this.placeholder||this.label()===this.defaultLabel),"p-multiselect-label-empty":!this.selectedItemsTemplate&&(this.label()==="p-emptylabel"||this.label().length===0)}}get panelClass(){return{"p-multiselect-panel p-component":!0,"p-input-filled":this.config.inputStyle==="filled","p-ripple-disabled":this.config.ripple===!1}}get labelClass(){return{"p-multiselect-label":!0,"p-placeholder":this.label()===this.placeholder||this.label()===this.defaultLabel,"p-multiselect-label-empty":!this.placeholder&&!this.defaultLabel&&(!this.modelValue()||this.modelValue().length===0)}}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Jt.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Jt.EMPTY_FILTER_MESSAGE)}get filled(){return typeof this.modelValue()=="string"?!!this.modelValue():re.isNotEmpty(this.modelValue())}get isVisibleClearIcon(){return this.modelValue()!=null&&this.modelValue()!==""&&re.isNotEmpty(this.modelValue())&&this.showClear&&!this.disabled&&this.filled}get toggleAllAriaLabel(){return this.config.translation.aria?this.config.translation.aria[this.allSelected()?"selectAll":"unselectAll"]:void 0}get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}visibleOptions=yi(()=>{let e=this.group?this.flatOptions(this.options):this.options||[];if(this._filterValue()){let n=this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale);if(this.group){let r=this.options||[],o=[];return r.forEach(s=>{let c=this.getOptionGroupChildren(s).filter(u=>n.includes(u));c.length>0&&o.push(pe(F({},s),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...c]}))}),this.flatOptions(o)}return n}return e});label=yi(()=>{let e,n=this.modelValue();if(n&&n.length&&this.displaySelectedLabel){if(re.isNotEmpty(this.maxSelectedLabels)&&n.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(let r=0;rre.isNotEmpty(this.maxSelectedLabels)&&this.modelValue()&&this.modelValue().length>this.maxSelectedLabels?this.modelValue().slice(0,this.maxSelectedLabels):this.modelValue());constructor(e,n,r,o,s,a,c){this.el=e,this.renderer=n,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.overlayService=c,Ki(()=>{let u=this.modelValue(),f=this.visibleOptions();f&&re.isNotEmpty(f)&&(this.optionValue&&this.optionLabel&&u?this.selectedOptions=f.filter(v=>u.includes(v[this.optionLabel])||u.includes(v[this.optionValue])):this.selectedOptions=u,this.cd.markForCheck())})}ngOnInit(){this.id=this.id||Me(),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue()&&this.modelValue().length===this.selectionLimit}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItems":this.selectedItemsTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"checkicon":this.checkIconTemplate=e.template;break;case"filtericon":this.filterIconTemplate=e.template;break;case"removetokenicon":this.removeTokenIconTemplate=e.template;break;case"closeicon":this.closeIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}ngAfterViewInit(){this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}flatOptions(e){return(e||[]).reduce((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>n.push(a)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()){this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());let e=this.getOptionValue(this.visibleOptions()[this.focusedOptionIndex()]);this.onOptionSelect({originalEvent:null,option:[e]})}}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e)}onInputClick(e){e.stopPropagation(),e.preventDefault(),this.focusedOptionIndex.set(-1)}onOptionSelect(e,n=!1,r=-1){let{originalEvent:o,option:s}=e;if(this.disabled||this.isOptionDisabled(s))return;let a=this.isSelected(s),c=null;a?c=this.modelValue().filter(u=>!re.equals(u,this.getOptionValue(s),this.equalityKey())):c=[...this.modelValue()||[],this.getOptionValue(s)],this.updateModel(c,o),r!==-1&&this.focusedOptionIndex.set(r),n&&x.focus(this.focusInputViewChild?.nativeElement),this.onChange.emit({originalEvent:e,value:c,itemValue:s})}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}onOptionSelectRange(e,n=-1,r=-1){if(n===-1&&(n=this.findNearestSelectedOptionIndex(r,!0)),r===-1&&(r=this.findNearestSelectedOptionIndex(n)),n!==-1&&r!==-1){let o=Math.min(n,r),s=Math.max(n,r),a=this.visibleOptions().slice(o,s+1).filter(c=>this.isValidOption(c)).map(c=>this.getOptionValue(c));this.updateModel(a,e)}}searchFields(){return(this.filterBy||this.optionLabel||"label").split(",")}findNearestSelectedOptionIndex(e,n=!1){let r=-1;return this.hasSelectedOption()&&(n?(r=this.findPrevSelectedOptionIndex(e),r=r===-1?this.findNextSelectedOptionIndex(e):r):(r=this.findNextSelectedOptionIndex(e),r=r===-1?this.findPrevSelectedOptionIndex(e):r)),r>-1?r:e}findPrevSelectedOptionIndex(e){let n=this.hasSelectedOption()&&e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidSelectedOption(r)):-1;return n>-1?n:-1}findFirstFocusedOptionIndex(){let e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextSelectedOptionIndex(e){let n=this.hasSelectedOption()&&ethis.isValidSelectedOption(r)):-1;return n>-1?n+e+1:-1}equalityKey(){return this.optionValue?null:this.dataKey}hasSelectedOption(){return re.isNotEmpty(this.modelValue())}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isOptionGroup(e){return(this.group||this.optionGroupLabel)&&e.optionGroup&&e.group}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.maxSelectionLimitReached()&&!this.isSelected(e)?!0:this.optionDisabled?re.resolveFieldData(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}isSelected(e){let n=this.getOptionValue(e);return(this.modelValue()||[]).some(r=>re.equals(r,n,this.equalityKey()))}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}getLabelByValue(e){let r=(this.group?this.flatOptions(this._options()):this._options()||[]).find(o=>!this.isOptionGroup(o)&&re.equals(this.getOptionValue(o),e,this.equalityKey()));return r?this.getOptionLabel(r):null}getSelectedItemsLabel(){let e=/{(.*?)}/,n=this.selectedItemsLabel?this.selectedItemsLabel:this.config.getTranslation(Jt.SELECTION_MESSAGE);return e.test(n)?n.replace(n.match(e)[0],this.modelValue().length+""):n}getOptionLabel(e){return this.optionLabel?re.resolveFieldData(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?re.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?re.resolveFieldData(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?re.resolveFieldData(e,this.optionGroupChildren):e.items}onKeyDown(e){if(this.disabled){e.preventDefault();return}let n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(e.code==="KeyA"&&n){let r=this.visibleOptions().filter(o=>this.isValidOption(o)).map(o=>this.getOptionValue(o));this.updateModel(r,e),e.preventDefault();break}!n&&re.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key),e.preventDefault());break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),n),this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e,n=!1){if(e.altKey&&!n)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,r,this.startRangeIndex()),this.changeFocusedOptionIndex(e,r),!this.overlayVisible&&this.show(),e.preventDefault()}e.stopPropagation()}onHomeKey(e,n=!1){let{currentTarget:r}=e;if(n){let o=r.value.length;r.setSelectionRange(0,e.shiftKey?o:0),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,s=this.findFirstOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,s,this.startRangeIndex()),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()}onEndKey(e,n=!1){let{currentTarget:r}=e;if(n){let o=r.value.length;r.setSelectionRange(e.shiftKey?0:o,o),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,s=this.findLastFocusedOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,this.startRangeIndex(),s),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){this.overlayVisible?this.focusedOptionIndex()!==-1&&(e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex()):this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]})):this.onArrowDownKey(e),e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(x.focus(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):(this.focusedOptionIndex()!==-1&&this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]}),this.overlayVisible&&this.hide(this.filter)))}onShiftKey(){this.startRangeIndex.set(this.focusedOptionIndex())}onContainerClick(e){if(!(this.disabled||this.readonly||e.target.isSameNode(this.focusInputViewChild?.nativeElement))){if(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]')){e.preventDefault();return}else(!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0));this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),this.onClick.emit(e),this.cd.detectChanges()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getFirstFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;x.focus(n)}onInputFocus(e){this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focused=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onFilterInputChange(e){let n=e.target.value?.trim();this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?x.getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;x.focus(n)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}onHeaderCheckboxKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"Space":this.onToggleAll(e);break;case"Enter":this.onToggleAll(e);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}onToggleAll(e){if(!(this.disabled||this.readonly)){if(this.selectAll!=null)this.onSelectAllChange.emit({originalEvent:e,checked:!this.allSelected()});else{let n=this.allSelected()?[]:this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(n,e)}x.focus(this.headerCheckboxViewChild.nativeElement),this.headerCheckboxFocus=!0,e.preventDefault(),e.stopPropagation()}}changeFocusedOptionIndex(e,n){this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView())}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=x.findSingle(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}writeValue(e){this.value=e,this.modelValue.set(this.value),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}allSelected(){return this.selectAll!==null?this.selectAll:re.isNotEmpty(this.visibleOptions())&&this.visibleOptions().every(e=>this.isOptionGroup(e)||this.isOptionDisabled(e)||this.isSelected(e))}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),e&&x.focus(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&x.focus(this.focusInputViewChild?.nativeElement),this.onPanelHide.emit(),this.cd.markForCheck()}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.itemsWrapper=x.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-multiselect-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this._options()&&this._options().length)if(this.virtualScroll){let n=re.isNotEmpty(this.modelValue())?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=x.findSingle(this.itemsWrapper,".p-multiselect-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit();case"void":this.itemsWrapper=null,this.onModelTouched();break}}resetFilter(){this.filterInputChild&&this.filterInputChild.nativeElement&&(this.filterInputChild.nativeElement.value=""),this._filterValue.set(null),this._filteredOptions=null}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateModel(null,e),this.selectedOptions=null,this.onClear.emit(),e.stopPropagation()}removeOption(e,n){let r=this.modelValue().filter(o=>!re.equals(o,e,this.equalityKey()));this.updateModel(r,n),this.onChange.emit({originalEvent:n,value:r,itemValue:e}),n&&n.stopPropagation()}findNextItem(e){let n=e.nextElementSibling;return n?x.hasClass(n.children[0],"p-disabled")||x.isHidden(n.children[0])||x.hasClass(n,"p-multiselect-item-group")?this.findNextItem(n):n.children[0]:null}findPrevItem(e){let n=e.previousElementSibling;return n?x.hasClass(n.children[0],"p-disabled")||x.isHidden(n.children[0])||x.hasClass(n,"p-multiselect-item-group")?this.findPrevItem(n):n.children[0]:null}findNextOptionIndex(e){let n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?re.findLastIndex(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastOptionIndex(){return re.findLastIndex(this.visibleOptions(),e=>this.isValidOption(e))}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=[];for(let n of this.options){let r=this.filterService.filter(this.getOptionGroupChildren(n),this.searchFields(),this.filterValue,this.filterMatchMode,this.filterLocale);r&&r.length&&e.push(pe(F({},n),{[this.optionGroupChildren]:r}))}this._filteredOptions=e}else this._filteredOptions=this.filterService.filter(this.options,this.searchFields(),this.filterValue,this.filterMatchMode,this.filterLocale);else this._filteredOptions=null}hasFocusableElements(){return x.getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}static \u0275fac=function(n){return new(n||i)(w(ve),w(nt),w(Ne),w(ge),w(Lu),w(At),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-multiSelect"]],contentQueries:function(n,r,o){if(n&1&&(De(o,go,5),De(o,fo,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(CG,5),oe(IG,5),oe(wG,5),oe(TG,5),oe(xG,5),oe(SG,5),oe(EG,5),oe(OG,5),oe(MG,5)),n&2){let o;q(o=W())&&(r.containerViewChild=o.first),q(o=W())&&(r.overlayViewChild=o.first),q(o=W())&&(r.filterInputChild=o.first),q(o=W())&&(r.focusInputViewChild=o.first),q(o=W())&&(r.itemsViewChild=o.first),q(o=W())&&(r.scroller=o.first),q(o=W())&&(r.lastHiddenFocusableElementOnOverlay=o.first),q(o=W())&&(r.firstHiddenFocusableElementOnOverlay=o.first),q(o=W())&&(r.headerCheckboxViewChild=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-focus",r.focused||r.overlayVisible)("p-inputwrapper-filled",r.filled)},inputs:{id:"id",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:"disabled",readonly:"readonly",group:"group",filter:"filter",filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:"overlayVisible",tabindex:"tabindex",appendTo:"appendTo",dataKey:"dataKey",name:"name",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:"selectionLimit",selectedItemsLabel:"selectedItemsLabel",showToggleAll:"showToggleAll",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:"showHeader",filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",display:"display",autocomplete:"autocomplete",showClear:"showClear",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue",itemSize:"itemSize",selectAll:"selectAll",focusOnHover:"focusOnHover",filterFields:"filterFields",selectOnFocus:"selectOnFocus",autoOptionFocus:"autoOptionFocus"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide",onLazyLoad:"onLazyLoad",onRemove:"onRemove",onSelectAllChange:"onSelectAllChange"},features:[mt([q$])],ngContentSelectors:$$,decls:16,vars:41,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["role","combobox",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","focus","blur","keydown"],["focusInput",""],[1,"p-multiselect-label-container",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-multiselect-trigger"],["class","p-multiselect-trigger-icon",4,"ngIf"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],["pTemplate","content"],["class","p-multiselect-token",4,"ngFor","ngForOf"],[1,"p-multiselect-token"],["token",""],[1,"p-multiselect-token-label"],[3,"styleClass","click",4,"ngIf"],["class","p-multiselect-token-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-multiselect-token-icon",3,"click"],[4,"ngTemplateOutlet"],["class","p-multiselect-clear-icon",3,"click",4,"ngIf"],[1,"p-multiselect-clear-icon",3,"click"],["class","p-multiselect-trigger-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-multiselect-trigger-icon",3,"ngClass"],[3,"styleClass"],[1,"p-multiselect-trigger-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["firstHiddenFocusableEl",""],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-items-wrapper"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["class","p-multiselect-footer",4,"ngIf"],["lastHiddenFocusableEl",""],[1,"p-multiselect-header"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],["class","p-checkbox p-component",3,"ngClass","click","keydown",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],["type","button","pRipple","",1,"p-multiselect-close","p-link","p-button-icon-only",3,"click"],["class","p-multiselect-close-icon",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass","click","keydown"],["type","checkbox",3,"readonly","disabled","focus","blur"],["headerCheckbox",""],["role","checkbox",1,"p-checkbox-box",3,"ngClass"],["class","p-checkbox-icon",4,"ngIf"],[1,"p-checkbox-icon"],[1,"p-multiselect-filter-container"],["type","text","role","searchbox",1,"p-multiselect-filter","p-inputtext","p-component",3,"value","disabled","input","keydown","click","blur"],["filterInput",""],["class","p-multiselect-filter-icon",4,"ngIf"],[1,"p-multiselect-filter-icon"],[1,"p-multiselect-close-icon"],[3,"items","itemSize","autoSize","tabindex","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","loader"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-items","p-component",3,"ngClass"],["items",""],["ngFor","",3,"ngForOf"],["class","p-multiselect-empty-message",3,"ngStyle",4,"ngIf"],["role","option",1,"p-multiselect-item-group",3,"ngStyle"],[3,"id","option","selected","label","disabled","template","checkIconTemplate","itemSize","focused","ariaPosInset","ariaSetSize","onClick","onMouseEnter"],[1,"p-multiselect-empty-message",3,"ngStyle"],["emptyFilter",""],["empty",""],[1,"p-multiselect-footer"]],template:function(n,r){n&1&&(Ue(H$),p(0,"div",0,1),A("click",function(s){return r.onContainerClick(s)}),p(2,"div",2)(3,"input",3,4),A("focus",function(s){return r.onInputFocus(s)})("blur",function(s){return r.onInputBlur(s)})("keydown",function(s){return r.onKeyDown(s)}),h()(),p(5,"div",5)(6,"div",6),g(7,NG,3,2,"ng-container",7)(8,BG,1,0,"ng-container",8),h(),g(9,GG,3,2,"ng-container",7),h(),p(10,"div",9),g(11,WG,3,2,"ng-container",7)(12,YG,2,3,"span",10),h(),p(13,"p-overlay",11,12),A("visibleChange",function(s){return r.overlayVisible=s})("onAnimationStart",function(s){return r.onOverlayAnimationStart(s)})("onHide",function(){return r.hide()}),g(15,j$,12,18,"ng-template",13),h()()),n&2&&(U(r.styleClass),l("ngClass",r.containerClass)("ngStyle",r.style),T("id",r.id),d(2),T("data-p-hidden-accessible",!0),d(),l("pTooltip",r.tooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass),T("aria-disabled",r.disabled)("id",r.inputId)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",r.overlayVisible)("aria-controls",r.id+"_list")("tabindex",r.disabled?-1:r.tabindex)("aria-activedescendant",r.focused?r.focusedOptionId:void 0),d(2),l("pTooltip",r.tooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass),d(),l("ngClass",r.labelClass),d(),l("ngIf",!r.selectedItemsTemplate),d(),l("ngTemplateOutlet",r.selectedItemsTemplate)("ngTemplateOutletContext",We(38,G$,r.selectedOptions,r.removeOption.bind(r))),d(),l("ngIf",r.isVisibleClearIcon),d(2),l("ngIf",!r.dropdownIconTemplate),d(),l("ngIf",r.dropdownIconTemplate),d(),l("visible",r.overlayVisible)("options",r.overlayOptions)("target","@parent")("appendTo",r.appendTo)("autoZIndex",r.autoZIndex)("baseZIndex",r.baseZIndex)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions))},dependencies:()=>[xe,Vt,Ie,rt,Ce,As,he,Ro,ui,Fa,_n,Na,Ui,pt,en,W$],styles:[`@layer primeng{.p-multiselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-multiselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-multiselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer;display:flex}.p-multiselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-multiselect-label-empty{overflow:hidden;visibility:hidden}.p-multiselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-multiselect-token-icon{cursor:pointer}.p-multiselect-token-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px}.p-multiselect-items-wrapper{overflow:auto}.p-multiselect-items{margin:0;padding:0;list-style-type:none}.p-multiselect-item{cursor:pointer;display:flex;align-items:center;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-multiselect-header{display:flex;align-items:center;justify-content:space-between}.p-multiselect-filter-container{position:relative;flex:1 1 auto}.p-multiselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-multiselect-filter-container .p-inputtext{width:100%}.p-multiselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.p-fluid .p-multiselect{display:flex}.p-multiselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-multiselect-clearable{position:relative}} `],encapsulation:2,changeDetection:0})}return i})(),om=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,qr,Te,Pn,Rt,Wr,_n,Na,Ui,pt,en,_n,qr,Te,Wr]})}return i})();var K$=["container"],Q$=["focusInput"],Y$=["multiIn"],Z$=["multiContainer"],X$=["ddBtn"],J$=["items"],eq=["scroller"],tq=["overlay"];function iq(i,t){if(i&1){let e=G();p(0,"input",13,14),A("input",function(r){S(e);let o=m();return E(o.onInput(r))})("keydown",function(r){S(e);let o=m();return E(o.onKeyDown(r))})("change",function(r){S(e);let o=m();return E(o.onInputChange(r))})("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))})("paste",function(r){S(e);let o=m();return E(o.onInputPaste(r))})("keyup",function(r){S(e);let o=m();return E(o.onInputKeyUp(r))}),h()}if(i&2){let e=m();U(e.inputStyleClass),l("autofocus",e.autofocus)("ngClass",e.inputClass)("ngStyle",e.inputStyle)("type",e.type)("autocomplete",e.autocomplete)("required",e.required)("name",e.name)("maxlength",e.maxlength)("tabindex",e.disabled?-1:e.tabindex)("readonly",e.readonly)("disabled",e.disabled),T("value",e.inputValue())("id",e.inputId)("placeholder",e.placeholder)("size",e.size)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required)("aria-expanded",e.overlayVisible)("aria-controls",e.id+"_list")("aria-aria-activedescendant",e.focused?e.focusedOptionId:void 0)}}function nq(i,t){if(i&1){let e=G();p(0,"TimesIcon",17),A("click",function(){S(e);let r=m(2);return E(r.clear())}),h()}i&2&&(l("styleClass","p-autocomplete-clear-icon"),T("aria-hidden",!0))}function rq(i,t){}function oq(i,t){i&1&&g(0,rq,0,0,"ng-template")}function sq(i,t){if(i&1){let e=G();p(0,"span",18),A("click",function(){S(e);let r=m(2);return E(r.clear())}),g(1,oq,1,0,null,9),h()}if(i&2){let e=m(2);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function aq(i,t){if(i&1&&(Z(0),g(1,nq,1,2,"TimesIcon",15)(2,sq,2,2,"span",16),X()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}function lq(i,t){i&1&&ie(0)}function cq(i,t){if(i&1&&(p(0,"span",31),_(1),h()),i&2){let e=m().$implicit,n=m(2);d(),z(n.getOptionLabel(e))}}function dq(i,t){i&1&&y(0,"TimesCircleIcon",32),i&2&&(l("styleClass","p-autocomplete-token-icon"),T("aria-hidden",!0))}function uq(i,t){}function pq(i,t){i&1&&g(0,uq,0,0,"ng-template")}function hq(i,t){if(i&1&&(p(0,"span",33),g(1,pq,1,0,null,9),h()),i&2){let e=m(3);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.removeIconTemplate)}}var mq=i=>({"p-autocomplete-token":!0,"p-focus":i}),Dy=i=>({$implicit:i});function fq(i,t){if(i&1){let e=G();p(0,"li",24,25),g(2,lq,1,0,"ng-container",26)(3,cq,2,1,"span",27),p(4,"span",28),A("click",function(r){let s=S(e).index,a=m(2);return E(a.removeOption(r,s))}),g(5,dq,1,2,"TimesCircleIcon",29)(6,hq,2,2,"span",30),h()()}if(i&2){let e=t.$implicit,n=t.index,r=m(2);l("ngClass",H(11,mq,r.focusedMultipleOptionIndex()===n)),T("id",r.id+"_multiple_option_"+n)("aria-label",r.getOptionLabel(e))("aria-setsize",r.modelValue().length)("aria-posinset",n+1)("aria-selected",!0),d(2),l("ngTemplateOutlet",r.selectedItemTemplate)("ngTemplateOutletContext",H(13,Dy,e)),d(),l("ngIf",!r.selectedItemTemplate),d(2),l("ngIf",!r.removeIconTemplate),d(),l("ngIf",r.removeIconTemplate)}}function gq(i,t){if(i&1){let e=G();p(0,"ul",19,20),A("focus",function(r){S(e);let o=m();return E(o.onMultipleContainerFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onMultipleContainerBlur(r))})("keydown",function(r){S(e);let o=m();return E(o.onMultipleContainerKeyDown(r))}),g(2,fq,7,15,"li",21),p(3,"li",22)(4,"input",23,14),A("input",function(r){S(e);let o=m();return E(o.onInput(r))})("keydown",function(r){S(e);let o=m();return E(o.onKeyDown(r))})("change",function(r){S(e);let o=m();return E(o.onInputChange(r))})("focus",function(r){S(e);let o=m();return E(o.onInputFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onInputBlur(r))})("paste",function(r){S(e);let o=m();return E(o.onInputPaste(r))})("keyup",function(r){S(e);let o=m();return E(o.onInputKeyUp(r))}),h()()()}if(i&2){let e=m();U(e.multiContainerClass),l("tabindex",-1),T("aria-orientation","horizontal")("aria-activedescendant",e.focused?e.focusedMultipleOptionId:void 0),d(2),l("ngForOf",e.modelValue()),d(2),U(e.inputStyleClass),l("autofocus",e.autofocus)("ngClass",e.inputClass)("ngStyle",e.inputStyle)("autocomplete",e.autocomplete)("required",e.required)("maxlength",e.maxlength)("tabindex",e.disabled?-1:e.tabindex)("readonly",e.readonly)("disabled",e.disabled),T("type",e.type)("id",e.inputId)("name",e.name)("placeholder",e.filled?null:e.placeholder)("size",e.size)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required)("aria-expanded",e.overlayVisible)("aria-controls",e.id+"_list")("aria-aria-activedescendant",e.focused?e.focusedOptionId:void 0)}}function _q(i,t){i&1&&y(0,"SpinnerIcon",36),i&2&&(l("styleClass","p-autocomplete-loader")("spin",!0),T("aria-hidden",!0))}function vq(i,t){}function yq(i,t){i&1&&g(0,vq,0,0,"ng-template")}function bq(i,t){if(i&1&&(p(0,"span",37),g(1,yq,1,0,null,9),h()),i&2){let e=m(2);T("aria-hidden",!0),d(),l("ngTemplateOutlet",e.loadingIconTemplate)}}function Cq(i,t){if(i&1&&(Z(0),g(1,_q,1,3,"SpinnerIcon",34)(2,bq,2,2,"span",35),X()),i&2){let e=m();d(),l("ngIf",!e.loadingIconTemplate),d(),l("ngIf",e.loadingIconTemplate)}}function Iq(i,t){if(i&1&&y(0,"span",41),i&2){let e=m(2);l("ngClass",e.dropdownIcon),T("aria-hidden",!0)}}function wq(i,t){i&1&&y(0,"ChevronDownIcon")}function Tq(i,t){}function xq(i,t){i&1&&g(0,Tq,0,0,"ng-template")}function Sq(i,t){if(i&1&&(Z(0),g(1,wq,1,0,"ChevronDownIcon",3)(2,xq,1,0,null,9),X()),i&2){let e=m(2);d(),l("ngIf",!e.dropdownIconTemplate),d(),l("ngTemplateOutlet",e.dropdownIconTemplate)}}function Eq(i,t){if(i&1){let e=G();p(0,"button",38,39),A("click",function(r){S(e);let o=m();return E(o.handleDropdownClick(r))}),g(2,Iq,1,2,"span",40)(3,Sq,3,2,"ng-container",3),h()}if(i&2){let e=m();l("disabled",e.disabled),T("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex),d(2),l("ngIf",e.dropdownIcon),d(),l("ngIf",!e.dropdownIcon)}}function Oq(i,t){i&1&&ie(0)}function Mq(i,t){i&1&&ie(0)}var Z2=(i,t)=>({$implicit:i,options:t});function kq(i,t){if(i&1&&g(0,Mq,1,0,"ng-container",26),i&2){let e=t.$implicit,n=t.options;m(2);let r=Le(14);l("ngTemplateOutlet",r)("ngTemplateOutletContext",We(2,Z2,e,n))}}function Aq(i,t){i&1&&ie(0)}var Dq=i=>({options:i});function Pq(i,t){if(i&1&&g(0,Aq,1,0,"ng-container",26),i&2){let e=t.options,n=m(3);l("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",H(2,Dq,e))}}function Rq(i,t){i&1&&(Z(0),g(1,Pq,1,4,"ng-template",45),X())}var sm=i=>({height:i});function Vq(i,t){if(i&1){let e=G();p(0,"p-scroller",42,43),A("onLazyLoad",function(r){S(e);let o=m();return E(o.onLazyLoad.emit(r))}),g(2,kq,1,5,"ng-template",44)(3,Rq,2,0,"ng-container",3),h()}if(i&2){let e=m();xt(H(8,sm,e.scrollHeight)),l("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),d(3),l("ngIf",e.loaderTemplate)}}function Lq(i,t){i&1&&ie(0)}var Fq=()=>({});function Nq(i,t){if(i&1&&(Z(0),g(1,Lq,1,0,"ng-container",26),X()),i&2){let e=m(),n=Le(14);d(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",We(3,Z2,e.visibleOptions(),Ke(2,Fq)))}}function Bq(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit,n=m(2);d(),z(n.getOptionGroupLabel(e.optionGroup))}}function zq(i,t){i&1&&ie(0)}function Uq(i,t){if(i&1&&(Z(0),p(1,"li",50),g(2,Bq,2,1,"span",3)(3,zq,1,0,"ng-container",26),h(),X()),i&2){let e=m(),n=e.index,r=e.$implicit,o=m().options,s=m();d(),l("ngStyle",H(5,sm,o.itemSize+"px")),T("id",s.id+"_"+s.getOptionIndex(n,o)),d(),l("ngIf",!s.groupTemplate),d(),l("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",H(7,Dy,r.optionGroup))}}function jq(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit,n=m(2);d(),z(n.getOptionLabel(e))}}function Hq(i,t){i&1&&ie(0)}var Gq=(i,t,e)=>({"p-highlight":i,"p-focus":t,"p-disabled":e}),$q=(i,t)=>({$implicit:i,index:t});function qq(i,t){if(i&1){let e=G();Z(0),p(1,"li",51),A("click",function(r){S(e);let o=m().$implicit,s=m(2);return E(s.onOptionSelect(r,o))})("mouseenter",function(r){S(e);let o=m().index,s=m().options,a=m();return E(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))}),g(2,jq,2,1,"span",3)(3,Hq,1,0,"ng-container",26),h(),X()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m().options,s=m();d(),l("ngStyle",H(12,sm,o.itemSize+"px"))("ngClass",kt(14,Gq,s.isSelected(n),s.focusedOptionIndex()===s.getOptionIndex(r,o),s.isOptionDisabled(n))),T("id",s.id+"_"+s.getOptionIndex(r,o))("aria-label",s.getOptionLabel(n))("aria-selected",s.isSelected(n))("aria-disabled",s.isOptionDisabled(n))("data-p-focused",s.focusedOptionIndex()===s.getOptionIndex(r,o))("aria-setsize",s.ariaSetSize)("aria-posinset",s.getAriaPosInset(s.getOptionIndex(r,o))),d(),l("ngIf",!s.itemTemplate),d(),l("ngTemplateOutlet",s.itemTemplate)("ngTemplateOutletContext",We(18,$q,n,o.getOptions?o.getOptions(r):r))}}function Wq(i,t){if(i&1&&g(0,Uq,4,9,"ng-container",3)(1,qq,4,21,"ng-container",3),i&2){let e=t.$implicit,n=m(2);l("ngIf",n.isOptionGroup(e)),d(),l("ngIf",!n.isOptionGroup(e))}}function Kq(i,t){if(i&1&&(Z(0),_(1),X()),i&2){let e=m(3);d(),be(" ",e.searchResultMessageText," ")}}function Qq(i,t){i&1&&ie(0,null,54)}function Yq(i,t){if(i&1&&(p(0,"li",52),g(1,Kq,2,1,"ng-container",53)(2,Qq,2,0,"ng-container",9),h()),i&2){let e=m().options,n=m();l("ngStyle",H(4,sm,e.itemSize+"px")),d(),l("ngIf",!n.emptyTemplate)("ngIfElse",n.empty),d(),l("ngTemplateOutlet",n.emptyTemplate)}}function Zq(i,t){i&1&&ie(0)}function Xq(i,t){if(i&1&&(p(0,"ul",46,47),g(2,Wq,2,2,"ng-template",48)(3,Yq,3,6,"li",49),h(),g(4,Zq,1,0,"ng-container",26)),i&2){let e=t.$implicit,n=t.options,r=m();xt(n.contentStyle),l("ngClass",n.contentStyleClass),T("id",r.id+"_list"),d(2),l("ngForOf",e),d(),l("ngIf",!e||e&&e.length===0&&r.showEmptyMessage),d(),l("ngTemplateOutlet",r.footerTemplate)("ngTemplateOutletContext",H(8,Dy,e))}}var Jq={provide:zt,useExisting:Tt(()=>fd),multi:!0},fd=(()=>{class i{document;el;renderer;cd;config;overlayService;zone;minLength=1;delay=300;style;panelStyle;styleClass;panelStyleClass;inputStyle;inputId;inputStyleClass;placeholder;readonly;disabled;scrollHeight="200px";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;maxlength;name;required;size;appendTo;autoHighlight;forceSelection;type="text";autoZIndex=!0;baseZIndex=0;ariaLabel;dropdownAriaLabel;ariaLabelledBy;dropdownIcon;unique=!0;group;completeOnFocus=!1;showClear=!1;field;dropdown;showEmptyMessage;dropdownMode="blank";multiple;tabindex;dataKey;emptyMessage;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autofocus;autocomplete="off";optionGroupChildren="items";optionGroupLabel="label";overlayOptions;get suggestions(){return this._suggestions()}set suggestions(e){this._suggestions.set(e),this.handleSuggestionsChange()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}optionLabel;id;searchMessage;emptySelectionMessage;selectionMessage;autoOptionFocus=!0;selectOnFocus;searchLocale;optionDisabled;focusOnHover;completeMethod=new L;onSelect=new L;onUnselect=new L;onFocus=new L;onBlur=new L;onDropdownClick=new L;onClear=new L;onKeyUp=new L;onShow=new L;onHide=new L;onLazyLoad=new L;containerEL;inputEL;multiInputEl;multiContainerEL;dropdownButton;itemsViewChild;scroller;overlayViewChild;templates;_itemSize;itemsWrapper;itemTemplate;emptyTemplate;headerTemplate;footerTemplate;selectedItemTemplate;groupTemplate;loaderTemplate;removeIconTemplate;loadingIconTemplate;clearIconTemplate;dropdownIconTemplate;value;_suggestions=st(null);onModelChange=()=>{};onModelTouched=()=>{};timeout;overlayVisible;suggestionsUpdated;highlightOption;highlightOptionChanged;focused=!1;_filled;get filled(){return this._filled}set filled(e){this._filled=e}loading;scrollHandler;listId;searchTimeout;dirty=!1;modelValue=st(null);focusedMultipleOptionIndex=st(-1);focusedOptionIndex=st(-1);visibleOptions=yi(()=>this.group?this.flatOptions(this._suggestions()):this._suggestions()||[]);inputValue=yi(()=>{let e=this.modelValue();if(e)if(typeof e=="object"){let n=this.getOptionLabel(e);return n??e}else return e;else return""});get focusedMultipleOptionId(){return this.focusedMultipleOptionIndex()!==-1?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex()}`:null}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}get containerClass(){return{"p-autocomplete p-component p-inputwrapper":!0,"p-disabled":this.disabled,"p-focus":this.focused,"p-autocomplete-dd":this.dropdown,"p-autocomplete-multiple":this.multiple,"p-inputwrapper-focus":this.focused,"p-overlay-open":this.overlayVisible}}get multiContainerClass(){return"p-autocomplete-multiple-container p-component p-inputtext"}get panelClass(){return{"p-autocomplete-panel p-component":!0,"p-input-filled":this.config.inputStyle==="filled","p-ripple-disabled":this.config.ripple===!1}}get inputClass(){return{"p-autocomplete-input p-inputtext p-component":!this.multiple,"p-autocomplete-dd-input":this.dropdown}}get searchResultMessageText(){return re.isNotEmpty(this.visibleOptions())&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions().length):this.emptySearchMessageText}get searchMessageText(){return this.searchMessage||this.config.translation.searchMessage||""}get emptySearchMessageText(){return this.emptyMessage||this.config.translation.emptySearchMessage||""}get selectionMessageText(){return this.selectionMessage||this.config.translation.selectionMessage||""}get emptySelectionMessageText(){return this.emptySelectionMessage||this.config.translation.emptySelectionMessage||""}get selectedMessageText(){return this.hasSelectedOption()?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue().length:"1"):this.emptySelectionMessageText}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}get virtualScrollerDisabled(){return!this.virtualScroll}constructor(e,n,r,o,s,a,c){this.document=e,this.el=n,this.renderer=r,this.cd=o,this.config=s,this.overlayService=a,this.zone=c,Ki(()=>{this.filled=re.isNotEmpty(this.modelValue())})}ngOnInit(){this.id=this.id||Me(),this.cd.detectChanges()}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"removetokenicon":this.removeIconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}handleSuggestionsChange(){if(this.loading){this._suggestions()?this.show():this.emptyTemplate?this.show():this.hide();let e=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(e),this.suggestionsUpdated=!0,this.loading=!1,this.cd.markForCheck()}}flatOptions(e){return(e||[]).reduce((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>n.push(a)),n},[])}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findLastOptionIndex(){return re.findLastIndex(this.visibleOptions(),e=>this.isValidOption(e))}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?re.findLastIndex(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.optionDisabled?re.resolveFieldData(e,this.optionDisabled):!1}isSelected(e){return this.multiple?this.unique?this.modelValue()?.find(n=>re.equals(n,this.getOptionValue(e),this.equalityKey())):!1:re.equals(this.modelValue(),this.getOptionValue(e),this.equalityKey())}isOptionMatched(e,n){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===n.toLocaleLowerCase(this.searchLocale)}isInputClicked(e){return e.target===this.inputEL.nativeElement}isDropdownClicked(e){return this.dropdownButton?.nativeElement?e.target===this.dropdownButton.nativeElement||this.dropdownButton.nativeElement.contains(e.target):!1}equalityKey(){return this.dataKey}onContainerClick(e){this.disabled||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||(!this.overlayViewChild||!this.overlayViewChild.overlayViewChild?.nativeElement.contains(e.target))&&x.focus(this.inputEL.nativeElement)}handleDropdownClick(e){let n;this.overlayVisible?this.hide(!0):(x.focus(this.inputEL.nativeElement),n=this.inputEL.nativeElement.value,this.dropdownMode==="blank"?this.search(e,"","dropdown"):this.dropdownMode==="current"&&this.search(e,n,"dropdown")),this.onDropdownClick.emit({originalEvent:e,query:n})}onInput(e){this.searchTimeout&&clearTimeout(this.searchTimeout);let n=e.target.value;!this.multiple&&!this.forceSelection&&this.updateModel(n),n.length===0&&!this.multiple?(this.onClear.emit(),setTimeout(()=>{this.hide()},this.delay/2)):n.length>=this.minLength?(this.focusedOptionIndex.set(-1),this.searchTimeout=setTimeout(()=>{this.search(e,n,"input")},this.delay)):this.hide()}onInputChange(e){if(this.forceSelection){let n=!1;if(this.visibleOptions()){let r=this.visibleOptions().find(o=>this.isOptionMatched(o,this.inputEL.nativeElement.value||""));r!==void 0&&(n=!0,!this.isSelected(r)&&this.onOptionSelect(e,r))}n||(this.inputEL.nativeElement.value="",!this.multiple&&this.updateModel(null))}}onInputFocus(e){if(this.disabled)return;!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onMultipleContainerFocus(e){this.disabled||(this.focused=!0)}onMultipleContainerBlur(e){this.focusedMultipleOptionIndex.set(-1),this.focused=!1}onMultipleContainerKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e);break;default:break}}onInputBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex.set(-1),this.onModelTouched(),this.onBlur.emit(e)}onInputPaste(e){this.onKeyDown(e)}onInputKeyUp(e){this.onKeyUp.emit(e)}onKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e);break;case"ShiftLeft":case"ShiftRight":break;default:break}}onArrowDownKey(e){if(!this.overlayVisible)return;let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let n=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,n),e.preventDefault(),e.stopPropagation()}}onArrowLeftKey(e){let n=e.currentTarget;this.focusedOptionIndex.set(-1),this.multiple&&(re.isEmpty(n.value)&&this.hasSelectedOption()?(x.focus(this.multiContainerEL.nativeElement),this.focusedMultipleOptionIndex.set(this.modelValue().length)):e.stopPropagation())}onArrowRightKey(e){this.focusedOptionIndex.set(-1),this.multiple&&e.stopPropagation()}onHomeKey(e){let{currentTarget:n}=e,r=n.value.length;n.setSelectionRange(0,e.shiftKey?r:0),this.focusedOptionIndex.set(-1),e.preventDefault()}onEndKey(e){let{currentTarget:n}=e,r=n.value.length;n.setSelectionRange(e.shiftKey?0:r,r),this.focusedOptionIndex.set(-1),e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){this.overlayVisible?(this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.hide()):this.onArrowDownKey(e),e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e){this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide()}onBackspaceKey(e){if(this.multiple){if(re.isNotEmpty(this.modelValue())&&!this.inputEL.nativeElement.value){let n=this.modelValue()[this.modelValue().length-1],r=this.modelValue().slice(0,-1);this.updateModel(r),this.onUnselect.emit({originalEvent:e,value:n})}e.stopPropagation()}}onArrowLeftKeyOnMultiple(e){let n=this.focusedMultipleOptionIndex()<1?0:this.focusedMultipleOptionIndex()-1;this.focusedMultipleOptionIndex.set(n)}onArrowRightKeyOnMultiple(e){let n=this.focusedMultipleOptionIndex();n++,this.focusedMultipleOptionIndex.set(n),n>this.modelValue().length-1&&(this.focusedMultipleOptionIndex.set(-1),x.focus(this.inputEL.nativeElement))}onBackspaceKeyOnMultiple(e){this.focusedMultipleOptionIndex()!==-1&&this.removeOption(e,this.focusedMultipleOptionIndex())}onOptionSelect(e,n,r=!0){let o=this.getOptionValue(n);this.multiple?(this.inputEL.nativeElement.value="",this.isSelected(n)||this.updateModel([...this.modelValue()||[],o])):this.updateModel(o),this.onSelect.emit({originalEvent:e,value:n}),r&&this.hide(!0)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}search(e,n,r){n!=null&&(r==="input"&&n.trim().length===0||(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:n})))}removeOption(e,n){e.stopPropagation();let r=this.modelValue()[n],o=this.modelValue().filter((s,a)=>a!==n).map(s=>this.getOptionValue(s));this.updateModel(o),this.onUnselect.emit({originalEvent:e,value:r}),x.focus(this.inputEL.nativeElement)}updateModel(e){this.value=e,this.modelValue.set(e),this.onModelChange(e),this.updateInputValue(),this.cd.markForCheck()}updateInputValue(){this.inputEL&&this.inputEL.nativeElement&&(this.multiple?this.inputEL.nativeElement.value="":this.inputEL.nativeElement.value=this.inputValue())}autoUpdateModel(){if((this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption()){let e=this.findFirstFocusedOptionIndex();this.focusedOptionIndex.set(e),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)}}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=x.findSingle(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}changeFocusedOptionIndex(e,n){this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions()[n],!1))}show(e=!1){this.dirty=!0,this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),e&&x.focus(this.inputEL.nativeElement),e&&x.focus(this.inputEL.nativeElement),this.onShow.emit(),this.cd.markForCheck()}hide(e=!1){let n=()=>{this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex.set(-1),e&&x.focus(this.inputEL.nativeElement),this.onHide.emit(),this.cd.markForCheck()};setTimeout(()=>{n()},0)}clear(){this.updateModel(null),this.inputEL.nativeElement.value="",this.onClear.emit()}writeValue(e){this.value=e,this.modelValue.set(e),this.updateInputValue(),this.cd.markForCheck()}hasSelectedOption(){return re.isNotEmpty(this.modelValue())}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}getOptionLabel(e){return this.field||this.optionLabel?re.resolveFieldData(e,this.field||this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return e}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionGroupLabel(e){return this.optionGroupLabel?re.resolveFieldData(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?re.resolveFieldData(e,this.optionGroupChildren):e.items}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"&&(this.itemsWrapper=x.findSingle(this.overlayViewChild.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-autocomplete-panel"),this.virtualScroll&&(this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.scroller.viewInit()),this.visibleOptions()&&this.visibleOptions().length))if(this.virtualScroll){let n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=x.findSingle(this.itemsWrapper,".p-autocomplete-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"center"})}}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(n){return new(n||i)(w(Oe),w(ve),w(nt),w(Ne),w(At),w(Mn),w(ge))};static \u0275cmp=k({type:i,selectors:[["p-autoComplete"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(K$,5),oe(Q$,5),oe(Y$,5),oe(Z$,5),oe(X$,5),oe(J$,5),oe(eq,5),oe(tq,5)),n&2){let o;q(o=W())&&(r.containerEL=o.first),q(o=W())&&(r.inputEL=o.first),q(o=W())&&(r.multiInputEl=o.first),q(o=W())&&(r.multiContainerEL=o.first),q(o=W())&&(r.dropdownButton=o.first),q(o=W())&&(r.itemsViewChild=o.first),q(o=W())&&(r.scroller=o.first),q(o=W())&&(r.overlayViewChild=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focused&&!r.disabled||r.autofocus||r.overlayVisible)("p-autocomplete-clearable",r.showClear&&!r.disabled)},inputs:{minLength:"minLength",delay:"delay",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",readonly:"readonly",disabled:"disabled",scrollHeight:"scrollHeight",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",maxlength:"maxlength",name:"name",required:"required",size:"size",appendTo:"appendTo",autoHighlight:"autoHighlight",forceSelection:"forceSelection",type:"type",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",ariaLabel:"ariaLabel",dropdownAriaLabel:"dropdownAriaLabel",ariaLabelledBy:"ariaLabelledBy",dropdownIcon:"dropdownIcon",unique:"unique",group:"group",completeOnFocus:"completeOnFocus",showClear:"showClear",field:"field",dropdown:"dropdown",showEmptyMessage:"showEmptyMessage",dropdownMode:"dropdownMode",multiple:"multiple",tabindex:"tabindex",dataKey:"dataKey",emptyMessage:"emptyMessage",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:"autofocus",autocomplete:"autocomplete",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",overlayOptions:"overlayOptions",suggestions:"suggestions",itemSize:"itemSize",optionLabel:"optionLabel",id:"id",searchMessage:"searchMessage",emptySelectionMessage:"emptySelectionMessage",selectionMessage:"selectionMessage",autoOptionFocus:"autoOptionFocus",selectOnFocus:"selectOnFocus",searchLocale:"searchLocale",optionDisabled:"optionDisabled",focusOnHover:"focusOnHover"},outputs:{completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect",onFocus:"onFocus",onBlur:"onBlur",onDropdownClick:"onDropdownClick",onClear:"onClear",onKeyUp:"onKeyUp",onShow:"onShow",onHide:"onHide",onLazyLoad:"onLazyLoad"},features:[mt([Jq])],decls:17,vars:25,consts:[[3,"ngClass","ngStyle","click"],["container",""],["pAutoFocus","","aria-autocomplete","list","role","combobox",3,"autofocus","ngClass","ngStyle","class","type","autocomplete","required","name","maxlength","tabindex","readonly","disabled","input","keydown","change","focus","blur","paste","keyup",4,"ngIf"],[4,"ngIf"],["role","listbox",3,"class","tabindex","focus","blur","keydown",4,"ngIf"],["type","button","pButton","","class","p-autocomplete-dropdown p-button-icon-only","pRipple","",3,"disabled","click",4,"ngIf"],[3,"visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],[3,"ngClass","ngStyle"],[4,"ngTemplateOutlet"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["role","status","aria-live","polite",1,"p-hidden-accessible"],["pAutoFocus","","aria-autocomplete","list","role","combobox",3,"autofocus","ngClass","ngStyle","type","autocomplete","required","name","maxlength","tabindex","readonly","disabled","input","keydown","change","focus","blur","paste","keyup"],["focusInput",""],[3,"styleClass","click",4,"ngIf"],["class","p-autocomplete-clear-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-autocomplete-clear-icon",3,"click"],["role","listbox",3,"tabindex","focus","blur","keydown"],["multiContainer",""],["role","option",3,"ngClass",4,"ngFor","ngForOf"],["role","option",1,"p-autocomplete-input-token"],["pAutoFocus","","role","combobox","aria-autocomplete","list",3,"autofocus","ngClass","ngStyle","autocomplete","required","maxlength","tabindex","readonly","disabled","input","keydown","change","focus","blur","paste","keyup"],["role","option",3,"ngClass"],["token",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-autocomplete-token-label",4,"ngIf"],[1,"p-autocomplete-token-icon",3,"click"],[3,"styleClass",4,"ngIf"],["class","p-autocomplete-token-icon",4,"ngIf"],[1,"p-autocomplete-token-label"],[3,"styleClass"],[1,"p-autocomplete-token-icon"],[3,"styleClass","spin",4,"ngIf"],["class","p-autocomplete-loader pi-spin ",4,"ngIf"],[3,"styleClass","spin"],[1,"p-autocomplete-loader","pi-spin"],["type","button","pButton","","pRipple","",1,"p-autocomplete-dropdown","p-button-icon-only",3,"disabled","click"],["ddBtn",""],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"items","itemSize","autoSize","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","content"],["pTemplate","loader"],["role","listbox",1,"p-autocomplete-items",3,"ngClass"],["items",""],["ngFor","",3,"ngForOf"],["class","p-autocomplete-empty-message","role","option",3,"ngStyle",4,"ngIf"],["role","option",1,"p-autocomplete-item-group",3,"ngStyle"],["pRipple","","role","option",1,"p-autocomplete-item",3,"ngStyle","ngClass","click","mouseenter"],["role","option",1,"p-autocomplete-empty-message",3,"ngStyle"],[4,"ngIf","ngIfElse"],["empty",""]],template:function(n,r){n&1&&(p(0,"div",0,1),A("click",function(s){return r.onContainerClick(s)}),g(2,iq,2,23,"input",2)(3,aq,3,2,"ng-container",3)(4,gq,6,28,"ul",4)(5,Cq,3,2,"ng-container",3)(6,Eq,4,5,"button",5),p(7,"p-overlay",6,7),A("visibleChange",function(s){return r.overlayVisible=s})("onAnimationStart",function(s){return r.onOverlayAnimationStart(s)})("onHide",function(){return r.hide()}),p(9,"div",8),g(10,Oq,1,0,"ng-container",9)(11,Vq,4,10,"p-scroller",10)(12,Nq,2,6,"ng-container",3)(13,Xq,5,10,"ng-template",null,11,dt),h(),p(15,"span",12),_(16),h()()()),n&2&&(U(r.styleClass),l("ngClass",r.containerClass)("ngStyle",r.style),d(2),l("ngIf",!r.multiple),d(),l("ngIf",r.filled&&!r.disabled&&r.showClear&&!r.loading),d(),l("ngIf",r.multiple),d(),l("ngIf",r.loading),d(),l("ngIf",r.dropdown),d(),l("visible",r.overlayVisible)("options",r.overlayOptions)("target","@parent")("appendTo",r.appendTo)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions),d(2),U(r.panelStyleClass),ki("max-height",r.virtualScroll?"auto":r.scrollHeight),l("ngClass",r.panelClass)("ngStyle",r.panelStyle),d(),l("ngTemplateOutlet",r.headerTemplate),d(),l("ngIf",r.virtualScroll),d(),l("ngIf",!r.virtualScroll),d(4),be(" ",r.selectedMessageText," "))},dependencies:()=>[xe,Vt,Ie,rt,Ce,As,he,Bu,ui,Fa,Bh,Ui,Vr,pt,en],styles:[`@layer primeng{.p-autocomplete{display:inline-flex;position:relative}.p-autocomplete-loader{position:absolute;top:50%;margin-top:-.5rem}.p-autocomplete-dd .p-autocomplete-input{flex:1 1 auto;width:1%}.p-autocomplete-dd .p-autocomplete-input,.p-autocomplete-dd .p-autocomplete-multiple-container{border-top-right-radius:0;border-bottom-right-radius:0}.p-autocomplete-dd .p-autocomplete-dropdown{border-top-left-radius:0;border-bottom-left-radius:0}.p-autocomplete-panel{overflow:auto}.p-autocomplete-items{margin:0;padding:0;list-style-type:none}.p-autocomplete-item{cursor:pointer;white-space:nowrap;position:relative;overflow:hidden}.p-autocomplete-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-autocomplete-token{width:fit-content;cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-autocomplete-token-icon{display:flex;cursor:pointer}.p-autocomplete-input-token{flex:1 1 auto;display:inline-flex}.p-autocomplete-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-autocomplete{display:flex}.p-fluid .p-autocomplete-dd .p-autocomplete-input{width:1%}.p-autocomplete-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-autocomplete-clearable{position:relative}} -`],encapsulation:2,changeDetection:0})}return i})(),Za=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,qr,fn,yt,Te,Rt,Wr,rd,Ui,Vr,pt,en,qr,Te,Wr,rd]})}return i})();var Py;try{Py=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Py=!1}var _d=(()=>{let t=class t{constructor(n){this._platformId=n,this.isBrowser=this._platformId?ut(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||Py)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};t.\u0275fac=function(r){return new(r||t)(J(vt))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var gd;function eW(){if(gd==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>gd=!0}))}finally{gd=gd||!1}return gd}function Ry(i){return eW()?i:!!i.capture}function J2(i){return i.composedPath?i.composedPath()[0]:i.target}function eE(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Vy(i){return Array.isArray(i)?i:[i]}function Ly(i){return i instanceof ve?i.nativeElement:i}var iE=new Set,Rs,tW=(()=>{let t=class t{constructor(n,r){this._platform=n,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):nW}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&iW(n,this._nonce),this._matchMedia(n)}};t.\u0275fac=function(r){return new(r||t)(J(_d),J(hl,8))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function iW(i,t){if(!iE.has(i))try{Rs||(Rs=document.createElement("style"),t&&(Rs.nonce=t),Rs.setAttribute("type","text/css"),document.head.appendChild(Rs)),Rs.sheet&&(Rs.sheet.insertRule(`@media ${i} {body{ }}`,0),iE.add(i))}catch(e){console.error(e)}}function nW(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var rE=(()=>{let t=class t{constructor(n,r){this._mediaMatcher=n,this._zone=r,this._queries=new Map,this._destroySubject=new Gt}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return nE(Vy(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=nE(Vy(n)).map(a=>this._registerQuery(a).observable),s=no(o);return s=Pd(s.pipe(dn(1)),s.pipe(e1(1),Gb(0))),s.pipe(Re(a=>{let c={matches:!1,breakpoints:{}};return a.forEach(({matches:u,query:f})=>{c.matches=c.matches||u,c.breakpoints[f]=u}),c}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let r=this._mediaMatcher.matchMedia(n),s={observable:new Li(a=>{let c=u=>this._zone.run(()=>a.next(u));return r.addListener(c),()=>{r.removeListener(c)}}).pipe(oo(r),Re(({matches:a})=>({query:n,matches:a})),Ld(this._destroySubject)),mql:r};return this._queries.set(n,s),s}};t.\u0275fac=function(r){return new(r||t)(J(tW),J(ge))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function nE(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function aE(i){return i.buttons===0||i.detail===0}function lE(i){let t=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var Vs=function(i){return i[i.NONE=0]="NONE",i[i.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",i[i.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",i}(Vs||{}),oE="cdk-high-contrast-black-on-white",sE="cdk-high-contrast-white-on-black",Fy="cdk-high-contrast-active",cE=(()=>{let t=class t{constructor(n,r){this._platform=n,this._document=r,this._breakpointSubscription=ae(rE).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Vs.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let r=this._document.defaultView||window,o=r&&r.getComputedStyle?r.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Vs.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Vs.BLACK_ON_WHITE}return Vs.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove(Fy,oE,sE),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===Vs.BLACK_ON_WHITE?n.add(Fy,oE):r===Vs.WHITE_ON_BLACK&&n.add(Fy,sE)}}};t.\u0275fac=function(r){return new(r||t)(J(_d),J(Oe))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Ny=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();function oW(){return!0}var sW=new le("mat-sanity-checks",{providedIn:"root",factory:oW}),Uo=(()=>{let t=class t{constructor(n,r,o){this._sanityChecks=r,this._document=o,this._hasDoneGlobalChecks=!1,n._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(n){return eE()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[n]}};t.\u0275fac=function(r){return new(r||t)(J(cE),J(sW,8),J(Oe))},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Ny,Ny]});let i=t;return i})();var Ln=function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i}(Ln||{}),By=class{constructor(t,e,n,r=!1){this._renderer=t,this.element=e,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=Ln.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},dE=Ry({passive:!0,capture:!0}),zy=class{constructor(){this._events=new Map,this._delegateEventHandler=t=>{let e=J2(t);e&&this._events.get(t.type)?.forEach((n,r)=>{(r===e||r.contains(e))&&n.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,n,r){let o=this._events.get(e);if(o){let s=o.get(n);s?s.add(r):o.set(n,new Set([r]))}else this._events.set(e,new Map([[n,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,dE)})}removeHandler(t,e,n){let r=this._events.get(t);if(!r)return;let o=r.get(e);o&&(o.delete(n),o.size===0&&r.delete(e),r.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,dE)))}},uE={enterDuration:225,exitDuration:150},aW=800,pE=Ry({passive:!0,capture:!0}),hE=["mousedown","touchstart"],mE=["mouseup","mouseleave","touchend","touchcancel"],vd=class vd{constructor(t,e,n,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Ly(n))}fadeInRipple(t,e,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=F(F({},uE),n.animation);n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=n.radius||lW(t,e,r),a=t-r.left,c=e-r.top,u=o.enterDuration,f=document.createElement("div");f.classList.add("mat-ripple-element"),f.style.left=`${a-s}px`,f.style.top=`${c-s}px`,f.style.height=`${s*2}px`,f.style.width=`${s*2}px`,n.color!=null&&(f.style.backgroundColor=n.color),f.style.transitionDuration=`${u}ms`,this._containerElement.appendChild(f);let v=window.getComputedStyle(f),b=v.transitionProperty,O=v.transitionDuration,V=b==="none"||O==="0s"||O==="0s, 0s"||r.width===0&&r.height===0,K=new By(this,f,n,V);f.style.transform="scale3d(1, 1, 1)",K.state=Ln.FADING_IN,n.persistent||(this._mostRecentTransientRipple=K);let P=null;return!V&&(u||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let j=()=>this._finishRippleTransition(K),ce=()=>this._destroyRipple(K);f.addEventListener("transitionend",j),f.addEventListener("transitioncancel",ce),P={onTransitionEnd:j,onTransitionCancel:ce}}),this._activeRipples.set(K,P),(V||!u)&&this._finishRippleTransition(K),K}fadeOutRipple(t){if(t.state===Ln.FADING_OUT||t.state===Ln.HIDDEN)return;let e=t.element,n=F(F({},uE),t.config.animation);e.style.transitionDuration=`${n.exitDuration}ms`,e.style.opacity="0",t.state=Ln.FADING_OUT,(t._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=Ly(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,hE.forEach(n=>{vd._eventManager.addHandler(this._ngZone,n,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{mE.forEach(e=>{this._triggerElement.addEventListener(e,this,pE)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===Ln.FADING_IN?this._startFadeOutTransition(t):t.state===Ln.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:n}=t.config;t.state=Ln.VISIBLE,!n&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=Ln.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel)),t.element.remove()}_onMousedown(t){let e=aE(t),n=this._lastTouchStartEvent&&Date.now(){let e=t.state===Ln.VISIBLE||t.config.terminateOnPointerUp&&t.state===Ln.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(hE.forEach(e=>vd._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&mE.forEach(e=>t.removeEventListener(e,this,pE)))}};vd._eventManager=new zy;var fE=vd;function lW(i,t,e){let n=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(n*n+r*r)}var gE=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Uo,Uo]});let i=t;return i})();var _E=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Uo,gE,Uo]});let i=t;return i})();var vE=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Uo,Uo]});let i=t;return i})();var cW=["inputtext"],dW=["container"];function uW(i,t){i&1&&ie(0)}function pW(i,t){if(i&1&&(p(0,"span",12),_(1),h()),i&2){let e=m().$implicit,n=m();T("data-pc-section","label"),d(),z(n.field?n.resolveFieldData(e,n.field):e)}}function hW(i,t){if(i&1){let e=G();p(0,"TimesCircleIcon",15),A("click",function(r){S(e);let o=m(2).index,s=m();return E(s.removeItem(r,o))}),h()}i&2&&(l("styleClass","p-chips-token-icon"),T("data-pc-section","removeTokenIcon")("aria-hidden",!0))}function mW(i,t){}function fW(i,t){i&1&&g(0,mW,0,0,"ng-template")}function gW(i,t){if(i&1){let e=G();p(0,"span",16),A("click",function(r){S(e);let o=m(2).index,s=m();return E(s.removeItem(r,o))}),g(1,fW,1,0,null,17),h()}if(i&2){let e=m(3);T("data-pc-section","removeTokenIcon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.removeTokenIconTemplate)}}function _W(i,t){if(i&1&&(Z(0),g(1,hW,1,3,"TimesCircleIcon",13)(2,gW,2,3,"span",14),X()),i&2){let e=m(2);d(),l("ngIf",!e.removeTokenIconTemplate),d(),l("ngIf",e.removeTokenIconTemplate)}}var vW=i=>({"p-chips-token":!0,"p-focus":i}),yW=i=>({$implicit:i});function bW(i,t){if(i&1){let e=G();p(0,"li",8,9),A("click",function(r){let s=S(e).$implicit,a=m();return E(a.onItemClick(r,s))}),g(2,uW,1,0,"ng-container",10)(3,pW,2,2,"span",11)(4,_W,3,2,"ng-container",7),h()}if(i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",H(12,vW,r.focusedIndex===n)),T("id",r.id+"_chips_item_"+n)("ariaLabel",e)("aria-selected",!0)("aria-setsize",r.value.length)("aria-posinset",n+1)("data-p-focused",r.focusedIndex===n)("data-pc-section","token"),d(2),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(14,yW,e)),d(),l("ngIf",!r.itemTemplate),d(),l("ngIf",!r.disabled)}}function CW(i,t){if(i&1){let e=G();p(0,"TimesIcon",15),A("click",function(){S(e);let r=m(2);return E(r.clear())}),h()}i&2&&l("styleClass","p-chips-clear-icon")}function IW(i,t){}function wW(i,t){i&1&&g(0,IW,0,0,"ng-template")}function TW(i,t){if(i&1){let e=G();p(0,"span",19),A("click",function(){S(e);let r=m(2);return E(r.clear())}),g(1,wW,1,0,null,17),h()}if(i&2){let e=m(2);d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function xW(i,t){if(i&1&&(p(0,"li"),g(1,CW,1,1,"TimesIcon",13)(2,TW,2,1,"span",18),h()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}var SW=(i,t,e,n)=>({"p-chips p-component p-input-wrapper":!0,"p-disabled":i,"p-focus":t,"p-inputwrapper-filled":e,"p-inputwrapper-focus":n}),EW=()=>({"p-inputtext p-chips-multiple-container":!0}),OW=i=>({"p-chips-clearable":i}),MW={provide:zt,useExisting:Tt(()=>kW),multi:!0},kW=(()=>{class i{document;el;cd;style;styleClass;disabled;field;placeholder;max;ariaLabel;ariaLabelledBy;tabindex;inputId;allowDuplicate=!0;caseSensitiveDuplication=!0;inputStyle;inputStyleClass;addOnTab;addOnBlur;separator;showClear=!1;onAdd=new L;onRemove=new L;onFocus=new L;onBlur=new L;onChipClick=new L;onClear=new L;inputViewChild;containerViewChild;templates;itemTemplate;removeTokenIconTemplate;clearIconTemplate;value;onModelChange=()=>{};onModelTouched=()=>{};valueChanged;id=Me();focused;focusedIndex;filled;get focusedOptionId(){return this.focusedIndex!==null?`${this.id}_chips_item_${this.focusedIndex}`:null}get isMaxedOut(){return this.max&&this.value&&this.max===this.value.length}constructor(e,n,r){this.document=e,this.el=n,this.cd=r}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"removetokenicon":this.removeTokenIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}}),this.updateFilledState()}onWrapperClick(){this.inputViewChild?.nativeElement.focus()}onContainerFocus(){this.focused=!0}onContainerBlur(){this.focusedIndex=-1,this.focused=!1}onContainerKeyDown(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn();break;case"ArrowRight":this.onArrowRightKeyOn();break;case"Backspace":this.onBackspaceKeyOn(e);break;default:break}}onArrowLeftKeyOn(){this.inputViewChild.nativeElement.value.length===0&&this.value&&this.value.length>0&&(this.focusedIndex=this.focusedIndex===null?this.value.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))}onArrowRightKeyOn(){this.inputViewChild.nativeElement.value.length===0&&this.value&&this.value.length>0&&(this.focusedIndex===this.value.length-1?(this.focusedIndex=null,this.inputViewChild?.nativeElement.focus()):this.focusedIndex++)}onBackspaceKeyOn(e){this.focusedIndex!==null&&this.removeItem(e,this.focusedIndex)}onInput(){this.updateFilledState(),this.focusedIndex=null}onPaste(e){this.disabled||(this.separator&&((e.clipboardData||this.document.defaultView.clipboardData).getData("Text").split(this.separator).forEach(r=>{this.addItem(e,r,!0)}),this.inputViewChild.nativeElement.value=""),this.updateFilledState())}updateFilledState(){!this.value||this.value.length===0?this.filled=this.inputViewChild&&this.inputViewChild.nativeElement&&this.inputViewChild.nativeElement.value!="":this.filled=!0}onItemClick(e,n){this.onChipClick.emit({originalEvent:e,value:n})}writeValue(e){this.value=e,this.updateMaxedOut(),this.updateFilledState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}resolveFieldData(e,n){if(e&&n){if(n.indexOf(".")==-1)return e[n];{let s=n.split("."),a=e;for(var r=0,o=s.length;rs!=n),this.focusedIndex=null,this.inputViewChild.nativeElement.focus(),this.onModelChange(this.value),this.onRemove.emit({originalEvent:e,value:r}),this.updateFilledState(),this.updateMaxedOut()}addItem(e,n,r){if(this.value=this.value||[],n&&n.trim().length){let o=this.caseSensitiveDuplication?this.value.includes(n):this.value.some(s=>s.toLowerCase()===n.toLowerCase());(this.allowDuplicate||!o)&&!this.isMaxedOut&&(this.value=[...this.value,n],this.onModelChange(this.value),this.onAdd.emit({originalEvent:e,value:n}))}this.updateFilledState(),this.updateMaxedOut(),this.inputViewChild.nativeElement.value="",r&&e.preventDefault()}clear(){this.value=null,this.updateFilledState(),this.onModelChange(this.value),this.updateMaxedOut(),this.onClear.emit()}onKeyDown(e){let n=e.target.value;switch(e.code){case"Backspace":n.length===0&&this.value&&this.value.length>0&&(this.focusedIndex!==null?this.removeItem(e,this.focusedIndex):this.removeItem(e,this.value.length-1));break;case"Enter":case"NumpadEnter":n&&n.trim().length&&!this.isMaxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":n.length===0&&this.value&&this.value.length>0&&this.containerViewChild?.nativeElement.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0);break}}updateMaxedOut(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.isMaxedOut?(this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=!0):(this.disabled&&this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=this.disabled||!1))}static \u0275fac=function(n){return new(n||i)(w(Oe),w(ve),w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-chips"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(cW,5),oe(dW,5)),n&2){let o;q(o=W())&&(r.inputViewChild=o.first),q(o=W())&&(r.containerViewChild=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focused)("p-chips-clearable",r.showClear)},inputs:{style:"style",styleClass:"styleClass",disabled:"disabled",field:"field",placeholder:"placeholder",max:"max",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",allowDuplicate:"allowDuplicate",caseSensitiveDuplication:"caseSensitiveDuplication",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",addOnTab:"addOnTab",addOnBlur:"addOnBlur",separator:"separator",showClear:"showClear"},outputs:{onAdd:"onAdd",onRemove:"onRemove",onFocus:"onFocus",onBlur:"onBlur",onChipClick:"onChipClick",onClear:"onClear"},features:[mt([MW])],decls:8,vars:31,consts:[[3,"ngClass","ngStyle"],["tabindex","-1","role","listbox",3,"ngClass","click","focus","blur","keydown"],["container",""],["role","option",3,"ngClass","click",4,"ngFor","ngForOf"],["role","option",1,"p-chips-input-token",3,"ngClass"],["type","text",3,"disabled","ngStyle","keydown","input","paste","focus","blur"],["inputtext",""],[4,"ngIf"],["role","option",3,"ngClass","click"],["token",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-chips-token-label",4,"ngIf"],[1,"p-chips-token-label"],[3,"styleClass","click",4,"ngIf"],["class","p-chips-token-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-chips-token-icon",3,"click"],[4,"ngTemplateOutlet"],["class","p-chips-clear-icon",3,"click",4,"ngIf"],[1,"p-chips-clear-icon",3,"click"]],template:function(n,r){n&1&&(p(0,"div",0)(1,"ul",1,2),A("click",function(){return r.onWrapperClick()})("focus",function(){return r.onContainerFocus()})("blur",function(){return r.onContainerBlur()})("keydown",function(s){return r.onContainerKeyDown(s)}),g(3,bW,5,16,"li",3),p(4,"li",4)(5,"input",5,6),A("keydown",function(s){return r.onKeyDown(s)})("input",function(){return r.onInput()})("paste",function(s){return r.onPaste(s)})("focus",function(s){return r.onInputFocus(s)})("blur",function(s){return r.onInputBlur(s)}),h()(),g(7,xW,3,2,"li",7),h()()),n&2&&(U(r.styleClass),l("ngClass",Dr(23,SW,r.disabled,r.focused,r.value&&r.value.length||(r.inputViewChild==null?null:r.inputViewChild.nativeElement.value)&&(r.inputViewChild==null?null:r.inputViewChild.nativeElement.value.length),r.focused))("ngStyle",r.style),T("data-pc-name","chips")("data-pc-section","root"),d(),l("ngClass",Ke(28,EW)),T("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("aria-activedescendant",r.focused?r.focusedOptionId:void 0)("aria-orientation","horizontal")("data-pc-section","container"),d(2),l("ngForOf",r.value),d(),l("ngClass",H(29,OW,r.showClear&&!r.disabled)),T("data-pc-section","inputToken"),d(),U(r.inputStyleClass),l("disabled",r.disabled||r.isMaxedOut)("ngStyle",r.inputStyle),T("id",r.inputId)("placeholder",r.value&&r.value.length?null:r.placeholder)("tabindex",r.tabindex),d(2),l("ngIf",r.value!=null&&r.filled&&!r.disabled&&r.showClear))},dependencies:()=>[xe,Vt,Ie,rt,Ce,Ui,pt],styles:[`@layer primeng{.p-chips{display:inline-flex}.p-chips-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-chips-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto;max-width:100%}.p-chips-token-label{min-width:0%;overflow:auto}.p-chips-token-label::-webkit-scrollbar{display:none}.p-chips-input-token{flex:1 1 auto;display:inline-flex}.p-chips-token-icon{cursor:pointer}.p-chips-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-chips{display:flex}.p-chips-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-chips-clearable .p-inputtext{position:relative}} -`],encapsulation:2,changeDetection:0})}return i})(),yE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,fn,Te,Ui,pt,fn,Te]})}return i})();function AW(i,t){if(i&1&&(p(0,"div",9),_(1),h()),i&2){let e=t.$implicit;d(),be(" ",e.name," ")}}function DW(i,t){i&1&&y(0,"p-badge",11)}function PW(i,t){if(i&1&&(p(0,"div",9),y(1,"img",10),p(2,"span"),_(3),h(),g(4,DW,1,0,"p-badge",11),h()),i&2){let e=t.$implicit,n=m();d(),l("src",e.profile_path?"http://image.tmdb.org/t/p/w45"+e.profile_path:n.placeholderImage,Ue),d(2),z(e.original_name),d(),Je(4,e.adult?4:-1)}}var bE=(()=>{let t=class t{constructor(n,r){this.fb=n,this.tmdbService=r,this.placeholderImage="https://cdn.vectorstock.com/i/preview-1x/08/19/gray-photo-placeholder-icon-design-ui-vector-35850819.jpg",this.allSorts=[{name:"Latest First",value:"primary_release_date.desc"},{name:"Older First",value:"primary_release_date.asc"},{name:"Popular First",value:"popularity.desc"},{name:"UnPopular First",value:"popularity.asc"},{name:"More Revenue",value:"revenue.desc"},{name:"Less Revenue",value:"revenue.asc"},{name:"More Rating Desc",value:"vote_average.desc"},{name:"Less Rating",value:"vote_average.asc"},{name:"More Liked",value:"vote_count.desc"},{name:"Less Liked",value:"vote_count.asc"}],this.applyFilters=new L,this.filtersForm=this.fb.group({sortBy:this.fb.control(this.allSorts[2]),withGenres:this.fb.control(""),year:this.fb.control(""),withCast:this.fb.control([]),withKeywords:this.fb.control([])}),this.allGenres=[],this.allCelebrities=[],this.allKeywords=[],this.getMovieGenres()}ngAfterViewInit(){this.filtersForm.valueChanges.subscribe(n=>{this.submitFilters()})}submitFilters(){let n=this.filtersForm.value,r=this.filtersForm.value;for(let o of Object.entries(n))if(Array.isArray(o[1])&&o[1].length>0&&(r[o[0]]=o[1].map(s=>s.id).join(",")),typeof o[1]=="object"&&o[1]!==null){let s=Object.values(o[1]);o[0]==="sortBy"&&(r[o[0]]=s[1]),(o[0]==="language"||o[0]==="region")&&(r[o[0]]=s[0]),o[0]==="year"&&(r[o[0]]=n.year.getFullYear())}this.applyFilters.emit(r)}getMovieGenres(){this.tmdbService.getTMDBData("genre/movie/list").subscribe(n=>{this.allGenres=n.genres})}getCelebrities(n){this.tmdbService.getTMDBData("search/person",{query:n}).subscribe(r=>{this.allCelebrities=r.results})}filterByCelebrity(n){this.getCelebrities(n.query)}filterByKeywords(n){this.tmdbService.getTMDBData("search/keyword",{query:n.query}).subscribe(r=>{this.allKeywords=r.results})}};t.\u0275fac=function(r){return new(r||t)(w(Vu),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-movie-filters"]],inputs:{activeFilters:"activeFilters"},outputs:{applyFilters:"applyFilters"},standalone:!0,features:[R],decls:11,vars:10,consts:[[1,"wrapper"],[2,"margin-bottom","0"],[3,"formGroup"],["formControlName","sortBy","optionLabel","name","placeholder","Sort By",3,"options"],["formControlName","year","view","year","dateFormat","yy","inputId","yearpicker","placeholder","Filter by Year",3,"showClear"],["formControlName","withGenres","optionLabel","name","placeholder","Select Genres",3,"options"],["formControlName","withKeywords","placeholder","Filter by Keywords","field","name",3,"suggestions","lazy","multiple","completeMethod"],["pTemplate","item"],["formControlName","withCast","placeholder","Filter by Celebrities","field","name",3,"suggestions","lazy","multiple","completeMethod"],[1,"flex","align-items-center","gap-2","mb-2"],[2,"width","32px","object-fit","cover","aspect-ratio","1/1",3,"src"],["value","18+","severity","danger"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"h2",1),_(2,"Filters"),h(),p(3,"form",2),y(4,"p-dropdown",3)(5,"p-calendar",4)(6,"p-multiSelect",5),p(7,"p-autoComplete",6),A("completeMethod",function(a){return o.filterByKeywords(a)}),g(8,AW,2,1,"ng-template",7),h(),p(9,"p-autoComplete",8),A("completeMethod",function(a){return o.filterByCelebrity(a)}),g(10,PW,5,3,"ng-template",7),h()()()),r&2&&(d(3),l("formGroup",o.filtersForm),d(),l("options",o.allSorts),d(),l("showClear",!0),d(),l("options",o.allGenres),d(),l("suggestions",o.allKeywords)("lazy",!0)("multiple",!0),d(2),l("suggestions",o.allCelebrities)("lazy",!0)("multiple",!0))},dependencies:[Ya,Ps,he,Bi,an,ii,sn,Qi,Yi,$,yt,Rn,Wn,om,md,Za,fd,Wa,A2,_E,vE,yE],styles:[".wrapper[_ngcontent-%COMP%]{padding:0 2rem;margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}"]});let i=t;return i})();var RW=["input"];function VW(i,t){if(i&1&&y(0,"span",10),i&2){let e=m(3);l("ngClass",e.checkboxIcon),T("data-pc-section","icon")}}function LW(i,t){i&1&&y(0,"CheckIcon",11),i&2&&(l("styleClass","p-checkbox-icon"),T("data-pc-section","icon"))}function FW(i,t){if(i&1&&(Z(0),g(1,VW,1,2,"span",8)(2,LW,1,2,"CheckIcon",9),X()),i&2){let e=m(2);d(),l("ngIf",e.checkboxIcon),d(),l("ngIf",!e.checkboxIcon)}}function NW(i,t){}function BW(i,t){i&1&&g(0,NW,0,0,"ng-template")}function zW(i,t){if(i&1&&(p(0,"span",12),g(1,BW,1,0,null,13),h()),i&2){let e=m(2);T("data-pc-section","icon"),d(),l("ngTemplateOutlet",e.checkboxIconTemplate)}}function UW(i,t){if(i&1&&(Z(0),g(1,FW,3,2,"ng-container",5)(2,zW,2,2,"span",7),X()),i&2){let e=m();d(),l("ngIf",!e.checkboxIconTemplate),d(),l("ngIf",e.checkboxIconTemplate)}}var jW=(i,t,e)=>({"p-checkbox-label":!0,"p-checkbox-label-active":i,"p-disabled":t,"p-checkbox-label-focus":e});function HW(i,t){if(i&1){let e=G();p(0,"label",14),A("click",function(r){S(e);let o=m(),s=Le(3);return E(o.onClick(r,s,!0))}),_(1),h()}if(i&2){let e=m();U(e.labelStyleClass),l("ngClass",kt(6,jW,e.checked(),e.disabled,e.focused)),T("for",e.inputId)("data-pc-section","label"),d(),be(" ",e.label,"")}}var GW=(i,t,e)=>({"p-checkbox p-component":!0,"p-checkbox-checked":i,"p-checkbox-disabled":t,"p-checkbox-focused":e}),$W=(i,t,e)=>({"p-highlight":i,"p-disabled":t,"p-focus":e}),qW={provide:zt,useExisting:Tt(()=>WW),multi:!0},WW=(()=>{class i{cd;value;name;disabled;binary;label;ariaLabelledBy;ariaLabel;tabindex;inputId;style;styleClass;labelStyleClass;formControl;checkboxIcon;readonly;required;trueValue=!0;falseValue=!1;onChange=new L;onFocus=new L;onBlur=new L;inputViewChild;templates;checkboxIconTemplate;model;onModelChange=()=>{};onModelTouched=()=>{};focused=!1;constructor(e){this.cd=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this.checkboxIconTemplate=e.template;break}})}onClick(e,n,r){e.preventDefault(),!(this.disabled||this.readonly)&&(this.updateModel(e),r&&n.focus())}updateModel(e){let n;this.binary?(n=this.checked()?this.falseValue:this.trueValue,this.model=n,this.onModelChange(n)):(this.checked()?n=this.model.filter(r=>!re.equals(r,this.value)):n=this.model?[...this.model,this.value]:[this.value],this.onModelChange(n),this.model=n,this.formControl&&this.formControl.setValue(n)),this.onChange.emit({checked:n,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:re.contains(this.value,this.model)}static \u0275fac=function(n){return new(n||i)(w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-checkbox"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&oe(RW,5),n&2){let o;q(o=W())&&(r.inputViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[mt([qW])],decls:7,vars:35,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"value","checked","disabled","readonly","change","focus","blur"],["input",""],[1,"p-checkbox-box",3,"ngClass","click"],[4,"ngIf"],[3,"class","ngClass","click",4,"ngIf"],["class","p-checkbox-icon",4,"ngIf"],["class","p-checkbox-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-checkbox-icon",3,"ngClass"],[3,"styleClass"],[1,"p-checkbox-icon"],[4,"ngTemplateOutlet"],[3,"ngClass","click"]],template:function(n,r){if(n&1){let o=G();p(0,"div",0)(1,"div",1)(2,"input",2,3),A("change",function(a){return r.handleChange(a)})("focus",function(a){return r.onInputFocus(a)})("blur",function(a){return r.onInputBlur(a)}),h()(),p(4,"div",4),A("click",function(a){S(o);let c=Le(3);return E(r.onClick(a,c,!0))}),g(5,UW,3,2,"ng-container",5),h()(),g(6,HW,2,10,"label",6)}n&2&&(U(r.styleClass),l("ngStyle",r.style)("ngClass",kt(27,GW,r.checked(),r.disabled,r.focused)),T("data-pc-name","checkbox")("data-pc-section","root"),d(),T("data-pc-section","hiddenInputWrapper")("data-p-hidden-accessible",!0),d(),l("value",r.value)("checked",r.checked())("disabled",r.disabled)("readonly",r.readonly),T("id",r.inputId)("name",r.name)("tabindex",r.tabindex)("required",r.required)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("aria-checked",r.checked())("data-pc-section","hiddenInput"),d(2),l("ngClass",kt(31,$W,r.checked(),r.disabled,r.focused)),T("data-p-highlight",r.checked())("data-p-disabled",r.disabled)("data-p-focused",r.focused)("data-pc-section","input"),d(),l("ngIf",r.checked()),d(),l("ngIf",r.label))},dependencies:()=>[xe,Ie,rt,Ce,_n],styles:[`@layer primeng{.p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}} -`],encapsulation:2,changeDetection:0})}return i})(),CE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,_n,Te]})}return i})();var IE=(()=>{let t=class t{constructor(n,r,o){this.fb=n,this.authService=r,this.tmdbService=o,this.placeholderImage="https://cdn.vectorstock.com/i/preview-1x/08/19/gray-photo-placeholder-icon-design-ui-vector-35850819.jpg",this.allSorts=[{name:"Latest Releases",value:"first_air_date.desc"},{name:"Older Releases",value:"first_air_date.asc"},{name:"Name Asc",value:"name.desc"},{name:"Name Desc",value:"name.asc"},{name:"Popular",value:"popularity.desc"},{name:"Less Popular",value:"popularity.asc"},{name:"Liked",value:"vote_average.desc"},{name:"Less Liked",value:"vote_average.asc"}],this.applyFilters=new L,this.filtersForm=this.fb.group({sortBy:this.fb.control(this.allSorts[4]),withGenres:this.fb.control([]),firstAirDateYear:this.fb.control("")}),this.allGenres=[],this.allLanguages=[],this.allRegions=[],this.allCelebrities=[],this.getMovieGenres()}submitFilters(){console.log(typeof this.filtersForm.value);let n=this.filtersForm.value,r=this.filtersForm.value;for(let o of Object.entries(n))if(Array.isArray(o[1])&&o[1].length>0&&(r[o[0]]=o[1].map(s=>s.id).join(",")),typeof o[1]=="object"&&o[1]!==null){let s=Object.values(o[1]);o[0]==="sortBy"&&(r[o[0]]=s[1]),(o[0]==="language"||o[0]==="region")&&(r[o[0]]=s[0]),o[0]==="firstAirDateYear"&&(r[o[0]]=n.firstAirDateYear.getFullYear())}this.applyFilters.emit(r)}getMovieGenres(){this.tmdbService.getTMDBData("genre/tv/list").subscribe(n=>{this.allGenres=n.genres})}getLanguages(){this.tmdbService.getTMDBData("configuration/languages").subscribe(n=>{this.allLanguages=n})}getRegions(){this.tmdbService.getTMDBData("configuration/countries").subscribe(n=>{this.allRegions=n})}getCelebrities(n){this.tmdbService.getTMDBData("search/person",{query:n}).subscribe(r=>{this.allCelebrities=r.results,console.log(r)})}filterCountry(n){this.getCelebrities(n.query)}selectCelebrity(){alert("abc")}};t.\u0275fac=function(r){return new(r||t)(w(Vu),w(Kt),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tv-filters"]],outputs:{applyFilters:"applyFilters"},standalone:!0,features:[R],decls:7,vars:3,consts:[[1,"wrapper"],[3,"formGroup"],["formControlName","sortBy","optionLabel","name","placeholder","Sort By",3,"options","onChange"],["formControlName","firstAirDateYear","view","year","dateFormat","yy","inputId","yearpicker","placeholder","First Release Year",3,"onChange"],["formControlName","withGenres","optionLabel","name","placeholder","Select Genres",3,"options","onChange"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"h2"),_(2,"Filters"),h(),p(3,"form",1)(4,"p-dropdown",2),A("onChange",function(){return o.submitFilters()}),h(),p(5,"p-calendar",3),A("onChange",function(){return o.submitFilters()}),h(),p(6,"p-multiSelect",4),A("onChange",function(){return o.submitFilters()}),h()()()),r&2&&(d(3),l("formGroup",o.filtersForm),d(),l("options",o.allSorts),d(2),l("options",o.allGenres))},dependencies:[Ya,Ps,Bi,an,ii,sn,Qi,Yi,$,yt,Rn,Wn,CE,om,md,Za,Wa],styles:[".wrapper[_ngcontent-%COMP%]{padding:0 2rem;margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:0}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}"]});let i=t;return i})();function KW(i,t){if(i&1){let e=G();p(0,"app-movie-filters",3),A("applyFilters",function(r){S(e);let o=m();return E(o.applyFilters(r))}),h(),y(1,"app-cards-container",4)}if(i&2){let e=m();d(),l("params","/"+e.mediaType)("queryParams",e.appliedFilters)("multipleResults",!0)}}function QW(i,t){if(i&1){let e=G();p(0,"app-tv-filters",3),A("applyFilters",function(r){S(e);let o=m();return E(o.applyTvFilter(r))}),h(),y(1,"app-cards-container",5)}if(i&2){let e=m();d(),l("params","/"+e.mediaType)("queryParams",e.appliedTvFilters)("multipleResults",!0)}}var wE=(()=>{let t=class t{constructor(n,r){this.router=n,this.activatedRoute=r,this.activeTab=0,this.mediaType="movie",this.mediaTypes=["movies","tv shows"],this.appliedFilters={},this.appliedTvFilters={},document.title="Discover - Showbizhub",this.activatedRoute.queryParams.subscribe(o=>{o.mediaType?(this.mediaType=o.mediaType,this.mediaType=="tv"?(this.applyTvFilter(o),this.activeTab=1):this.applyFilters(o)):this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{mediaType:this.mediaType},queryParamsHandling:"merge"})})}ngOnInit(){}updateMediaType(n){n.index===1?(this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{mediaType:"tv"},queryParamsHandling:"merge"}),this.mediaType="tv"):(this.mediaType="movie",this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{mediaType:"movie"},queryParamsHandling:"merge"}))}applyFilters(n){let r=[{paramName:"certification",value:n.certification},{paramName:"certification.gte",value:n.certificationGte},{paramName:"certification.lte",value:n.certificationLte},{paramName:"certification_country",value:n.certificationCountry},{paramName:"include_adult",value:!1},{paramName:"include_video",value:n.includeVideo},{paramName:"language",value:n.language},{paramName:"primary_release_year",value:n.primaryReleaseYear},{paramName:"primary_release_date.gte",value:n.primaryReleaseYearGte},{paramName:"primary_release_date.lte",value:n.primaryReleaseYearLte},{paramName:"region",value:n.region},{paramName:"release_date.gte",value:n.releaseDateGte},{paramName:"release_date.lte",value:n.releaseDateLte},{paramName:"sort_by",value:n.sortBy},{paramName:"vote_average.gte",value:n.voteAverageGte},{paramName:"vote_average.lte",value:n.voteAverageLte},{paramName:"vote_count.gte",value:n.voteCountGte},{paramName:"vote_count.lte",value:n.voteCountLte},{paramName:"watch_region",value:n.watchRegion},{paramName:"with_cast",value:n.withCast},{paramName:"with_companies",value:n.withCompanies},{paramName:"with_crew",value:n.withCrew},{paramName:"with_genres",value:n.withGenres},{paramName:"with_keywords",value:n.withKeywords},{paramName:"with_origin_country",value:n.withOriginCountry},{paramName:"with_original_language",value:n.withOriginLanguage},{paramName:"with_people",value:n.withPeople},{paramName:"with_release_type",value:n.withReleaseType},{paramName:"with_runtime.gte",value:n.withRuntimeGte},{paramName:"with_runtime.lte",value:n.withRuntimeLte},{paramName:"with_watch_monetization_types",value:n.withWatchMonetizationTypes},{paramName:"without_genres",value:n.withoutGenres},{paramName:"without_keywords",value:n.withoutKeywords},{paramName:"with_watch_providers",value:n.withWatchProviders},{paramName:"without_companies",value:n.withoutCompanies},{paramName:"without_watch_providers",value:n.withoutWatchProviders},{paramName:"year",value:n.year}],o={};r.forEach(s=>{if(s.value!==void 0){let a=s.paramName.split(".").pop();o[a]=s.value}}),this.appliedFilters=o}applyTvFilter(n){let r=[{paramName:"air_date.gte",value:n.airDateGte},{paramName:"air_date.gte",value:n.airDateLte},{paramName:"first_air_date_year",value:n.firstAirDateYear},{paramName:"first_air_date.gte",value:n.firstAirDateGte},{paramName:"first_air_date.lte",value:n.firstAirDateLte},{paramName:"include_adult",value:!1},{paramName:"language",value:n.language},{paramName:"screened_theatrically",value:n.screenedThreatrically},{paramName:"sort_by",value:n.sortBy},{paramName:"timezone",value:n.timezone},{paramName:"vote_average.gte",value:n.voteAverageGte},{paramName:"vote_average.lte",value:n.voteAverageLte},{paramName:"vote_count.gte",value:n.voteCountGte},{paramName:"vote_count.lte",value:n.voteCountLte},{paramName:"watch_region",value:n.watchRegion},{paramName:"with_companies",value:n.withCompanies},{paramName:"with_genres",value:n.withGenres},{paramName:"with_keywords",value:n.withKeywords},{paramName:"with_networks",value:n.withNetworks},{paramName:"with_origin_country",value:n.withOriginCountry},{paramName:"with_original_language",value:n.withOriginalLanguage},{paramName:"with_runtime.gte",value:n.withRuntimeGte},{paramName:"with_runtime.lte",value:n.withRuntimeLte},{paramName:"with_status",value:n.withStatus},{paramName:"with_watch_monetization_types",value:n.withWatchMonetizationTypes},{paramName:"with_watch_providers",value:n.withWatchProviders},{paramName:"without_companies",value:n.withoutCompanies},{paramName:"without_genres",value:n.withoutGenres},{paramName:"without_keywords",value:n.withoutKeywords},{paramName:"without_watch_providers",value:n.withoutWatchProviders},{paramName:"with_type",value:n.withType}],o={};r.forEach(s=>{if(s.value!==void 0){let a=s.paramName.split(".").pop();o[a]=s.value}}),this.appliedTvFilters=o}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-discover"]],standalone:!0,features:[R],decls:5,vars:4,consts:[[1,"wrapper"],[3,"label"],[3,"data","active","newItemEvent"],[3,"applyFilters"],["containerType","movies","path","discover",3,"params","queryParams","multipleResults"],["containerType","tvshows","path","discover",3,"params","queryParams","multipleResults"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"app-top-titles",1)(2,"app-switcher",2),A("newItemEvent",function(a){return o.updateMediaType(a)}),h()(),g(3,KW,2,3)(4,QW,2,3),h()),r&2&&(d(),l("label","Discover"),d(),l("data",o.mediaTypes)("active",o.activeTab),d(),Je(3,o.mediaType=="movie"?3:4))},dependencies:[Qa,bE,xr,IE,_t,li],styles:["h2[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--accent)}"]});let i=t;return i})();var TE=(()=>{let t=class t{constructor(){document.title="404 Page Not Found - Showbizhub"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-page-not-found"]],standalone:!0,features:[R],decls:9,vars:2,consts:[[1,"wrapper"],[1,"content"],[1,"pi","pi-error"],["label","Go Back","icon","pi pi-arrow-left","routerLink","..",3,"rounded"],["label","Go to Home","icon","pi pi-arrow-right","routerLink","/home",3,"rounded"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"h1"),y(3,"i",2),_(4," 404 Page Not Found"),h(),p(5,"p"),_(6,"The page you are looking for not found!. Please Enter a valid address"),h(),y(7,"p-button",3)(8,"p-button",4),h()()),r&2&&(d(7),l("rounded",!0),d(),l("rounded",!0))},dependencies:[yt,ni,Ve,et],styles:[".wrapper[_ngcontent-%COMP%]{height:90vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.4rem}.wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{text-align:center}.wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--primary-color);margin-bottom:0}.wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}"]});let i=t;return i})();var YW=["input"],ZW=(i,t,e)=>({"p-radiobutton-label":!0,"p-radiobutton-label-active":i,"p-disabled":t,"p-radiobutton-label-focus":e});function XW(i,t){if(i&1){let e=G();p(0,"label",7),A("click",function(r){S(e);let o=m();return E(o.select(r))}),_(1),h()}if(i&2){let e=m(),n=Le(3);U(e.labelStyleClass),l("ngClass",kt(6,ZW,n.checked,e.disabled,e.focused)),T("for",e.inputId)("data-pc-section","label"),d(),z(e.label)}}var JW=(i,t,e)=>({"p-radiobutton p-component":!0,"p-radiobutton-checked":i,"p-radiobutton-disabled":t,"p-radiobutton-focused":e}),eK=(i,t,e)=>({"p-radiobutton-box":!0,"p-highlight":i,"p-disabled":t,"p-focus":e}),tK={provide:zt,useExisting:Tt(()=>Uy),multi:!0},iK=(()=>{class i{accessors=[];add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return e[0].control?e[0].control.root===n.control.control.root&&e[1].name===n.name:!1}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Uy=(()=>{class i{cd;injector;registry;value;formControlName;name;disabled;label;tabindex;inputId;ariaLabelledBy;ariaLabel;style;styleClass;labelStyleClass;onClick=new L;onFocus=new L;onBlur=new L;inputViewChild;onModelChange=()=>{};onModelTouched=()=>{};checked;focused;control;constructor(e,n,r){this.cd=e,this.injector=n,this.registry=r}ngOnInit(){this.control=this.injector.get(Rr),this.checkName(),this.registry.add(this.control,this)}handleClick(e,n,r){e.preventDefault(),!this.disabled&&(this.select(e),r&&n.focus())}select(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}writeValue(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error(` +`],encapsulation:2,changeDetection:0})}return i})(),Za=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,qr,fn,yt,Te,Rt,Wr,rd,Ui,Vr,pt,en,qr,Te,Wr,rd]})}return i})();var Py;try{Py=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Py=!1}var _d=(()=>{let t=class t{constructor(n){this._platformId=n,this.isBrowser=this._platformId?ut(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||Py)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};t.\u0275fac=function(r){return new(r||t)(J(vt))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var gd;function eW(){if(gd==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>gd=!0}))}finally{gd=gd||!1}return gd}function Ry(i){return eW()?i:!!i.capture}function J2(i){return i.composedPath?i.composedPath()[0]:i.target}function eE(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Vy(i){return Array.isArray(i)?i:[i]}function Ly(i){return i instanceof ve?i.nativeElement:i}var iE=new Set,Rs,tW=(()=>{let t=class t{constructor(n,r){this._platform=n,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):nW}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&iW(n,this._nonce),this._matchMedia(n)}};t.\u0275fac=function(r){return new(r||t)(J(_d),J(hl,8))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function iW(i,t){if(!iE.has(i))try{Rs||(Rs=document.createElement("style"),t&&(Rs.nonce=t),Rs.setAttribute("type","text/css"),document.head.appendChild(Rs)),Rs.sheet&&(Rs.sheet.insertRule(`@media ${i} {body{ }}`,0),iE.add(i))}catch(e){console.error(e)}}function nW(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var rE=(()=>{let t=class t{constructor(n,r){this._mediaMatcher=n,this._zone=r,this._queries=new Map,this._destroySubject=new Gt}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return nE(Vy(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=nE(Vy(n)).map(a=>this._registerQuery(a).observable),s=no(o);return s=Pd(s.pipe(dn(1)),s.pipe(e1(1),Gb(0))),s.pipe(Re(a=>{let c={matches:!1,breakpoints:{}};return a.forEach(({matches:u,query:f})=>{c.matches=c.matches||u,c.breakpoints[f]=u}),c}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let r=this._mediaMatcher.matchMedia(n),s={observable:new Li(a=>{let c=u=>this._zone.run(()=>a.next(u));return r.addListener(c),()=>{r.removeListener(c)}}).pipe(oo(r),Re(({matches:a})=>({query:n,matches:a})),Ld(this._destroySubject)),mql:r};return this._queries.set(n,s),s}};t.\u0275fac=function(r){return new(r||t)(J(tW),J(ge))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function nE(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function aE(i){return i.buttons===0||i.detail===0}function lE(i){let t=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var Vs=function(i){return i[i.NONE=0]="NONE",i[i.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",i[i.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",i}(Vs||{}),oE="cdk-high-contrast-black-on-white",sE="cdk-high-contrast-white-on-black",Fy="cdk-high-contrast-active",cE=(()=>{let t=class t{constructor(n,r){this._platform=n,this._document=r,this._breakpointSubscription=ae(rE).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Vs.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let r=this._document.defaultView||window,o=r&&r.getComputedStyle?r.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Vs.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Vs.BLACK_ON_WHITE}return Vs.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove(Fy,oE,sE),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===Vs.BLACK_ON_WHITE?n.add(Fy,oE):r===Vs.WHITE_ON_BLACK&&n.add(Fy,sE)}}};t.\u0275fac=function(r){return new(r||t)(J(_d),J(Oe))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Ny=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({});let i=t;return i})();function oW(){return!0}var sW=new le("mat-sanity-checks",{providedIn:"root",factory:oW}),Uo=(()=>{let t=class t{constructor(n,r,o){this._sanityChecks=r,this._document=o,this._hasDoneGlobalChecks=!1,n._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(n){return eE()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[n]}};t.\u0275fac=function(r){return new(r||t)(J(cE),J(sW,8),J(Oe))},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Ny,Ny]});let i=t;return i})();var Fn=function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i}(Fn||{}),By=class{constructor(t,e,n,r=!1){this._renderer=t,this.element=e,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=Fn.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},dE=Ry({passive:!0,capture:!0}),zy=class{constructor(){this._events=new Map,this._delegateEventHandler=t=>{let e=J2(t);e&&this._events.get(t.type)?.forEach((n,r)=>{(r===e||r.contains(e))&&n.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,n,r){let o=this._events.get(e);if(o){let s=o.get(n);s?s.add(r):o.set(n,new Set([r]))}else this._events.set(e,new Map([[n,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,dE)})}removeHandler(t,e,n){let r=this._events.get(t);if(!r)return;let o=r.get(e);o&&(o.delete(n),o.size===0&&r.delete(e),r.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,dE)))}},uE={enterDuration:225,exitDuration:150},aW=800,pE=Ry({passive:!0,capture:!0}),hE=["mousedown","touchstart"],mE=["mouseup","mouseleave","touchend","touchcancel"],vd=class vd{constructor(t,e,n,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Ly(n))}fadeInRipple(t,e,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=F(F({},uE),n.animation);n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=n.radius||lW(t,e,r),a=t-r.left,c=e-r.top,u=o.enterDuration,f=document.createElement("div");f.classList.add("mat-ripple-element"),f.style.left=`${a-s}px`,f.style.top=`${c-s}px`,f.style.height=`${s*2}px`,f.style.width=`${s*2}px`,n.color!=null&&(f.style.backgroundColor=n.color),f.style.transitionDuration=`${u}ms`,this._containerElement.appendChild(f);let v=window.getComputedStyle(f),b=v.transitionProperty,O=v.transitionDuration,V=b==="none"||O==="0s"||O==="0s, 0s"||r.width===0&&r.height===0,K=new By(this,f,n,V);f.style.transform="scale3d(1, 1, 1)",K.state=Fn.FADING_IN,n.persistent||(this._mostRecentTransientRipple=K);let P=null;return!V&&(u||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let j=()=>this._finishRippleTransition(K),ce=()=>this._destroyRipple(K);f.addEventListener("transitionend",j),f.addEventListener("transitioncancel",ce),P={onTransitionEnd:j,onTransitionCancel:ce}}),this._activeRipples.set(K,P),(V||!u)&&this._finishRippleTransition(K),K}fadeOutRipple(t){if(t.state===Fn.FADING_OUT||t.state===Fn.HIDDEN)return;let e=t.element,n=F(F({},uE),t.config.animation);e.style.transitionDuration=`${n.exitDuration}ms`,e.style.opacity="0",t.state=Fn.FADING_OUT,(t._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=Ly(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,hE.forEach(n=>{vd._eventManager.addHandler(this._ngZone,n,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{mE.forEach(e=>{this._triggerElement.addEventListener(e,this,pE)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===Fn.FADING_IN?this._startFadeOutTransition(t):t.state===Fn.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:n}=t.config;t.state=Fn.VISIBLE,!n&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=Fn.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel)),t.element.remove()}_onMousedown(t){let e=aE(t),n=this._lastTouchStartEvent&&Date.now(){let e=t.state===Fn.VISIBLE||t.config.terminateOnPointerUp&&t.state===Fn.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(hE.forEach(e=>vd._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&mE.forEach(e=>t.removeEventListener(e,this,pE)))}};vd._eventManager=new zy;var fE=vd;function lW(i,t,e){let n=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(n*n+r*r)}var gE=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Uo,Uo]});let i=t;return i})();var _E=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Uo,gE,Uo]});let i=t;return i})();var vE=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=Q({imports:[Uo,Uo]});let i=t;return i})();var cW=["inputtext"],dW=["container"];function uW(i,t){i&1&&ie(0)}function pW(i,t){if(i&1&&(p(0,"span",12),_(1),h()),i&2){let e=m().$implicit,n=m();T("data-pc-section","label"),d(),z(n.field?n.resolveFieldData(e,n.field):e)}}function hW(i,t){if(i&1){let e=G();p(0,"TimesCircleIcon",15),A("click",function(r){S(e);let o=m(2).index,s=m();return E(s.removeItem(r,o))}),h()}i&2&&(l("styleClass","p-chips-token-icon"),T("data-pc-section","removeTokenIcon")("aria-hidden",!0))}function mW(i,t){}function fW(i,t){i&1&&g(0,mW,0,0,"ng-template")}function gW(i,t){if(i&1){let e=G();p(0,"span",16),A("click",function(r){S(e);let o=m(2).index,s=m();return E(s.removeItem(r,o))}),g(1,fW,1,0,null,17),h()}if(i&2){let e=m(3);T("data-pc-section","removeTokenIcon")("aria-hidden",!0),d(),l("ngTemplateOutlet",e.removeTokenIconTemplate)}}function _W(i,t){if(i&1&&(Z(0),g(1,hW,1,3,"TimesCircleIcon",13)(2,gW,2,3,"span",14),X()),i&2){let e=m(2);d(),l("ngIf",!e.removeTokenIconTemplate),d(),l("ngIf",e.removeTokenIconTemplate)}}var vW=i=>({"p-chips-token":!0,"p-focus":i}),yW=i=>({$implicit:i});function bW(i,t){if(i&1){let e=G();p(0,"li",8,9),A("click",function(r){let s=S(e).$implicit,a=m();return E(a.onItemClick(r,s))}),g(2,uW,1,0,"ng-container",10)(3,pW,2,2,"span",11)(4,_W,3,2,"ng-container",7),h()}if(i&2){let e=t.$implicit,n=t.index,r=m();l("ngClass",H(12,vW,r.focusedIndex===n)),T("id",r.id+"_chips_item_"+n)("ariaLabel",e)("aria-selected",!0)("aria-setsize",r.value.length)("aria-posinset",n+1)("data-p-focused",r.focusedIndex===n)("data-pc-section","token"),d(2),l("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",H(14,yW,e)),d(),l("ngIf",!r.itemTemplate),d(),l("ngIf",!r.disabled)}}function CW(i,t){if(i&1){let e=G();p(0,"TimesIcon",15),A("click",function(){S(e);let r=m(2);return E(r.clear())}),h()}i&2&&l("styleClass","p-chips-clear-icon")}function IW(i,t){}function wW(i,t){i&1&&g(0,IW,0,0,"ng-template")}function TW(i,t){if(i&1){let e=G();p(0,"span",19),A("click",function(){S(e);let r=m(2);return E(r.clear())}),g(1,wW,1,0,null,17),h()}if(i&2){let e=m(2);d(),l("ngTemplateOutlet",e.clearIconTemplate)}}function xW(i,t){if(i&1&&(p(0,"li"),g(1,CW,1,1,"TimesIcon",13)(2,TW,2,1,"span",18),h()),i&2){let e=m();d(),l("ngIf",!e.clearIconTemplate),d(),l("ngIf",e.clearIconTemplate)}}var SW=(i,t,e,n)=>({"p-chips p-component p-input-wrapper":!0,"p-disabled":i,"p-focus":t,"p-inputwrapper-filled":e,"p-inputwrapper-focus":n}),EW=()=>({"p-inputtext p-chips-multiple-container":!0}),OW=i=>({"p-chips-clearable":i}),MW={provide:zt,useExisting:Tt(()=>kW),multi:!0},kW=(()=>{class i{document;el;cd;style;styleClass;disabled;field;placeholder;max;ariaLabel;ariaLabelledBy;tabindex;inputId;allowDuplicate=!0;caseSensitiveDuplication=!0;inputStyle;inputStyleClass;addOnTab;addOnBlur;separator;showClear=!1;onAdd=new L;onRemove=new L;onFocus=new L;onBlur=new L;onChipClick=new L;onClear=new L;inputViewChild;containerViewChild;templates;itemTemplate;removeTokenIconTemplate;clearIconTemplate;value;onModelChange=()=>{};onModelTouched=()=>{};valueChanged;id=Me();focused;focusedIndex;filled;get focusedOptionId(){return this.focusedIndex!==null?`${this.id}_chips_item_${this.focusedIndex}`:null}get isMaxedOut(){return this.max&&this.value&&this.max===this.value.length}constructor(e,n,r){this.document=e,this.el=n,this.cd=r}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"removetokenicon":this.removeTokenIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}}),this.updateFilledState()}onWrapperClick(){this.inputViewChild?.nativeElement.focus()}onContainerFocus(){this.focused=!0}onContainerBlur(){this.focusedIndex=-1,this.focused=!1}onContainerKeyDown(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn();break;case"ArrowRight":this.onArrowRightKeyOn();break;case"Backspace":this.onBackspaceKeyOn(e);break;default:break}}onArrowLeftKeyOn(){this.inputViewChild.nativeElement.value.length===0&&this.value&&this.value.length>0&&(this.focusedIndex=this.focusedIndex===null?this.value.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))}onArrowRightKeyOn(){this.inputViewChild.nativeElement.value.length===0&&this.value&&this.value.length>0&&(this.focusedIndex===this.value.length-1?(this.focusedIndex=null,this.inputViewChild?.nativeElement.focus()):this.focusedIndex++)}onBackspaceKeyOn(e){this.focusedIndex!==null&&this.removeItem(e,this.focusedIndex)}onInput(){this.updateFilledState(),this.focusedIndex=null}onPaste(e){this.disabled||(this.separator&&((e.clipboardData||this.document.defaultView.clipboardData).getData("Text").split(this.separator).forEach(r=>{this.addItem(e,r,!0)}),this.inputViewChild.nativeElement.value=""),this.updateFilledState())}updateFilledState(){!this.value||this.value.length===0?this.filled=this.inputViewChild&&this.inputViewChild.nativeElement&&this.inputViewChild.nativeElement.value!="":this.filled=!0}onItemClick(e,n){this.onChipClick.emit({originalEvent:e,value:n})}writeValue(e){this.value=e,this.updateMaxedOut(),this.updateFilledState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}resolveFieldData(e,n){if(e&&n){if(n.indexOf(".")==-1)return e[n];{let s=n.split("."),a=e;for(var r=0,o=s.length;rs!=n),this.focusedIndex=null,this.inputViewChild.nativeElement.focus(),this.onModelChange(this.value),this.onRemove.emit({originalEvent:e,value:r}),this.updateFilledState(),this.updateMaxedOut()}addItem(e,n,r){if(this.value=this.value||[],n&&n.trim().length){let o=this.caseSensitiveDuplication?this.value.includes(n):this.value.some(s=>s.toLowerCase()===n.toLowerCase());(this.allowDuplicate||!o)&&!this.isMaxedOut&&(this.value=[...this.value,n],this.onModelChange(this.value),this.onAdd.emit({originalEvent:e,value:n}))}this.updateFilledState(),this.updateMaxedOut(),this.inputViewChild.nativeElement.value="",r&&e.preventDefault()}clear(){this.value=null,this.updateFilledState(),this.onModelChange(this.value),this.updateMaxedOut(),this.onClear.emit()}onKeyDown(e){let n=e.target.value;switch(e.code){case"Backspace":n.length===0&&this.value&&this.value.length>0&&(this.focusedIndex!==null?this.removeItem(e,this.focusedIndex):this.removeItem(e,this.value.length-1));break;case"Enter":case"NumpadEnter":n&&n.trim().length&&!this.isMaxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":n.length===0&&this.value&&this.value.length>0&&this.containerViewChild?.nativeElement.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0);break}}updateMaxedOut(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.isMaxedOut?(this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=!0):(this.disabled&&this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=this.disabled||!1))}static \u0275fac=function(n){return new(n||i)(w(Oe),w(ve),w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-chips"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(cW,5),oe(dW,5)),n&2){let o;q(o=W())&&(r.inputViewChild=o.first),q(o=W())&&(r.containerViewChild=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,r){n&2&&qt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focused)("p-chips-clearable",r.showClear)},inputs:{style:"style",styleClass:"styleClass",disabled:"disabled",field:"field",placeholder:"placeholder",max:"max",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",allowDuplicate:"allowDuplicate",caseSensitiveDuplication:"caseSensitiveDuplication",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",addOnTab:"addOnTab",addOnBlur:"addOnBlur",separator:"separator",showClear:"showClear"},outputs:{onAdd:"onAdd",onRemove:"onRemove",onFocus:"onFocus",onBlur:"onBlur",onChipClick:"onChipClick",onClear:"onClear"},features:[mt([MW])],decls:8,vars:31,consts:[[3,"ngClass","ngStyle"],["tabindex","-1","role","listbox",3,"ngClass","click","focus","blur","keydown"],["container",""],["role","option",3,"ngClass","click",4,"ngFor","ngForOf"],["role","option",1,"p-chips-input-token",3,"ngClass"],["type","text",3,"disabled","ngStyle","keydown","input","paste","focus","blur"],["inputtext",""],[4,"ngIf"],["role","option",3,"ngClass","click"],["token",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-chips-token-label",4,"ngIf"],[1,"p-chips-token-label"],[3,"styleClass","click",4,"ngIf"],["class","p-chips-token-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-chips-token-icon",3,"click"],[4,"ngTemplateOutlet"],["class","p-chips-clear-icon",3,"click",4,"ngIf"],[1,"p-chips-clear-icon",3,"click"]],template:function(n,r){n&1&&(p(0,"div",0)(1,"ul",1,2),A("click",function(){return r.onWrapperClick()})("focus",function(){return r.onContainerFocus()})("blur",function(){return r.onContainerBlur()})("keydown",function(s){return r.onContainerKeyDown(s)}),g(3,bW,5,16,"li",3),p(4,"li",4)(5,"input",5,6),A("keydown",function(s){return r.onKeyDown(s)})("input",function(){return r.onInput()})("paste",function(s){return r.onPaste(s)})("focus",function(s){return r.onInputFocus(s)})("blur",function(s){return r.onInputBlur(s)}),h()(),g(7,xW,3,2,"li",7),h()()),n&2&&(U(r.styleClass),l("ngClass",Dr(23,SW,r.disabled,r.focused,r.value&&r.value.length||(r.inputViewChild==null?null:r.inputViewChild.nativeElement.value)&&(r.inputViewChild==null?null:r.inputViewChild.nativeElement.value.length),r.focused))("ngStyle",r.style),T("data-pc-name","chips")("data-pc-section","root"),d(),l("ngClass",Ke(28,EW)),T("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("aria-activedescendant",r.focused?r.focusedOptionId:void 0)("aria-orientation","horizontal")("data-pc-section","container"),d(2),l("ngForOf",r.value),d(),l("ngClass",H(29,OW,r.showClear&&!r.disabled)),T("data-pc-section","inputToken"),d(),U(r.inputStyleClass),l("disabled",r.disabled||r.isMaxedOut)("ngStyle",r.inputStyle),T("id",r.inputId)("placeholder",r.value&&r.value.length?null:r.placeholder)("tabindex",r.tabindex),d(2),l("ngIf",r.value!=null&&r.filled&&!r.disabled&&r.showClear))},dependencies:()=>[xe,Vt,Ie,rt,Ce,Ui,pt],styles:[`@layer primeng{.p-chips{display:inline-flex}.p-chips-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-chips-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto;max-width:100%}.p-chips-token-label{min-width:0%;overflow:auto}.p-chips-token-label::-webkit-scrollbar{display:none}.p-chips-input-token{flex:1 1 auto;display:inline-flex}.p-chips-token-icon{cursor:pointer}.p-chips-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-chips{display:flex}.p-chips-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-chips-clearable .p-inputtext{position:relative}} +`],encapsulation:2,changeDetection:0})}return i})(),yE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,fn,Te,Ui,pt,fn,Te]})}return i})();function AW(i,t){if(i&1&&(p(0,"div",9),_(1),h()),i&2){let e=t.$implicit;d(),be(" ",e.name," ")}}function DW(i,t){i&1&&y(0,"p-badge",11)}function PW(i,t){if(i&1&&(p(0,"div",9),y(1,"img",10),p(2,"span"),_(3),h(),g(4,DW,1,0,"p-badge",11),h()),i&2){let e=t.$implicit,n=m();d(),l("src",e.profile_path?"http://image.tmdb.org/t/p/w45"+e.profile_path:n.placeholderImage,qe),d(2),z(e.original_name),d(),Je(4,e.adult?4:-1)}}var bE=(()=>{let t=class t{constructor(n,r){this.fb=n,this.tmdbService=r,this.placeholderImage="https://cdn.vectorstock.com/i/preview-1x/08/19/gray-photo-placeholder-icon-design-ui-vector-35850819.jpg",this.allSorts=[{name:"Latest First",value:"primary_release_date.desc"},{name:"Older First",value:"primary_release_date.asc"},{name:"Popular First",value:"popularity.desc"},{name:"UnPopular First",value:"popularity.asc"},{name:"More Revenue",value:"revenue.desc"},{name:"Less Revenue",value:"revenue.asc"},{name:"More Rating Desc",value:"vote_average.desc"},{name:"Less Rating",value:"vote_average.asc"},{name:"More Liked",value:"vote_count.desc"},{name:"Less Liked",value:"vote_count.asc"}],this.applyFilters=new L,this.filtersForm=this.fb.group({sortBy:this.fb.control(this.allSorts[2]),withGenres:this.fb.control(""),year:this.fb.control(""),withCast:this.fb.control([]),withKeywords:this.fb.control([])}),this.allGenres=[],this.allCelebrities=[],this.allKeywords=[],this.getMovieGenres()}ngAfterViewInit(){this.filtersForm.valueChanges.subscribe(n=>{this.submitFilters()})}submitFilters(){let n=this.filtersForm.value,r=this.filtersForm.value;for(let o of Object.entries(n))if(Array.isArray(o[1])&&o[1].length>0&&(r[o[0]]=o[1].map(s=>s.id).join(",")),typeof o[1]=="object"&&o[1]!==null){let s=Object.values(o[1]);o[0]==="sortBy"&&(r[o[0]]=s[1]),(o[0]==="language"||o[0]==="region")&&(r[o[0]]=s[0]),o[0]==="year"&&(r[o[0]]=n.year.getFullYear())}this.applyFilters.emit(r)}getMovieGenres(){this.tmdbService.getTMDBData("genre/movie/list").subscribe(n=>{this.allGenres=n.genres})}getCelebrities(n){this.tmdbService.getTMDBData("search/person",{query:n}).subscribe(r=>{this.allCelebrities=r.results})}filterByCelebrity(n){this.getCelebrities(n.query)}filterByKeywords(n){this.tmdbService.getTMDBData("search/keyword",{query:n.query}).subscribe(r=>{this.allKeywords=r.results})}};t.\u0275fac=function(r){return new(r||t)(w(Vu),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-movie-filters"]],inputs:{activeFilters:"activeFilters"},outputs:{applyFilters:"applyFilters"},standalone:!0,features:[R],decls:11,vars:10,consts:[[1,"wrapper"],[2,"margin-bottom","0"],[3,"formGroup"],["formControlName","sortBy","optionLabel","name","placeholder","Sort By",3,"options"],["formControlName","year","view","year","dateFormat","yy","inputId","yearpicker","placeholder","Filter by Year",3,"showClear"],["formControlName","withGenres","optionLabel","name","placeholder","Select Genres",3,"options"],["formControlName","withKeywords","placeholder","Filter by Keywords","field","name",3,"suggestions","lazy","multiple","completeMethod"],["pTemplate","item"],["formControlName","withCast","placeholder","Filter by Celebrities","field","name",3,"suggestions","lazy","multiple","completeMethod"],[1,"flex","align-items-center","gap-2","mb-2"],[2,"width","32px","object-fit","cover","aspect-ratio","1/1",3,"src"],["value","18+","severity","danger"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"h2",1),_(2,"Filters"),h(),p(3,"form",2),y(4,"p-dropdown",3)(5,"p-calendar",4)(6,"p-multiSelect",5),p(7,"p-autoComplete",6),A("completeMethod",function(a){return o.filterByKeywords(a)}),g(8,AW,2,1,"ng-template",7),h(),p(9,"p-autoComplete",8),A("completeMethod",function(a){return o.filterByCelebrity(a)}),g(10,PW,5,3,"ng-template",7),h()()()),r&2&&(d(3),l("formGroup",o.filtersForm),d(),l("options",o.allSorts),d(),l("showClear",!0),d(),l("options",o.allGenres),d(),l("suggestions",o.allKeywords)("lazy",!0)("multiple",!0),d(2),l("suggestions",o.allCelebrities)("lazy",!0)("multiple",!0))},dependencies:[Ya,Ps,he,Bi,an,ii,sn,Qi,Yi,$,yt,Rn,Kn,om,md,Za,fd,Wa,A2,_E,vE,yE],styles:[".wrapper[_ngcontent-%COMP%]{padding:0 2rem;margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}"]});let i=t;return i})();var RW=["input"];function VW(i,t){if(i&1&&y(0,"span",10),i&2){let e=m(3);l("ngClass",e.checkboxIcon),T("data-pc-section","icon")}}function LW(i,t){i&1&&y(0,"CheckIcon",11),i&2&&(l("styleClass","p-checkbox-icon"),T("data-pc-section","icon"))}function FW(i,t){if(i&1&&(Z(0),g(1,VW,1,2,"span",8)(2,LW,1,2,"CheckIcon",9),X()),i&2){let e=m(2);d(),l("ngIf",e.checkboxIcon),d(),l("ngIf",!e.checkboxIcon)}}function NW(i,t){}function BW(i,t){i&1&&g(0,NW,0,0,"ng-template")}function zW(i,t){if(i&1&&(p(0,"span",12),g(1,BW,1,0,null,13),h()),i&2){let e=m(2);T("data-pc-section","icon"),d(),l("ngTemplateOutlet",e.checkboxIconTemplate)}}function UW(i,t){if(i&1&&(Z(0),g(1,FW,3,2,"ng-container",5)(2,zW,2,2,"span",7),X()),i&2){let e=m();d(),l("ngIf",!e.checkboxIconTemplate),d(),l("ngIf",e.checkboxIconTemplate)}}var jW=(i,t,e)=>({"p-checkbox-label":!0,"p-checkbox-label-active":i,"p-disabled":t,"p-checkbox-label-focus":e});function HW(i,t){if(i&1){let e=G();p(0,"label",14),A("click",function(r){S(e);let o=m(),s=Le(3);return E(o.onClick(r,s,!0))}),_(1),h()}if(i&2){let e=m();U(e.labelStyleClass),l("ngClass",kt(6,jW,e.checked(),e.disabled,e.focused)),T("for",e.inputId)("data-pc-section","label"),d(),be(" ",e.label,"")}}var GW=(i,t,e)=>({"p-checkbox p-component":!0,"p-checkbox-checked":i,"p-checkbox-disabled":t,"p-checkbox-focused":e}),$W=(i,t,e)=>({"p-highlight":i,"p-disabled":t,"p-focus":e}),qW={provide:zt,useExisting:Tt(()=>WW),multi:!0},WW=(()=>{class i{cd;value;name;disabled;binary;label;ariaLabelledBy;ariaLabel;tabindex;inputId;style;styleClass;labelStyleClass;formControl;checkboxIcon;readonly;required;trueValue=!0;falseValue=!1;onChange=new L;onFocus=new L;onBlur=new L;inputViewChild;templates;checkboxIconTemplate;model;onModelChange=()=>{};onModelTouched=()=>{};focused=!1;constructor(e){this.cd=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this.checkboxIconTemplate=e.template;break}})}onClick(e,n,r){e.preventDefault(),!(this.disabled||this.readonly)&&(this.updateModel(e),r&&n.focus())}updateModel(e){let n;this.binary?(n=this.checked()?this.falseValue:this.trueValue,this.model=n,this.onModelChange(n)):(this.checked()?n=this.model.filter(r=>!re.equals(r,this.value)):n=this.model?[...this.model,this.value]:[this.value],this.onModelChange(n),this.model=n,this.formControl&&this.formControl.setValue(n)),this.onChange.emit({checked:n,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:re.contains(this.value,this.model)}static \u0275fac=function(n){return new(n||i)(w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-checkbox"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&oe(RW,5),n&2){let o;q(o=W())&&(r.inputViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[mt([qW])],decls:7,vars:35,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"value","checked","disabled","readonly","change","focus","blur"],["input",""],[1,"p-checkbox-box",3,"ngClass","click"],[4,"ngIf"],[3,"class","ngClass","click",4,"ngIf"],["class","p-checkbox-icon",4,"ngIf"],["class","p-checkbox-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-checkbox-icon",3,"ngClass"],[3,"styleClass"],[1,"p-checkbox-icon"],[4,"ngTemplateOutlet"],[3,"ngClass","click"]],template:function(n,r){if(n&1){let o=G();p(0,"div",0)(1,"div",1)(2,"input",2,3),A("change",function(a){return r.handleChange(a)})("focus",function(a){return r.onInputFocus(a)})("blur",function(a){return r.onInputBlur(a)}),h()(),p(4,"div",4),A("click",function(a){S(o);let c=Le(3);return E(r.onClick(a,c,!0))}),g(5,UW,3,2,"ng-container",5),h()(),g(6,HW,2,10,"label",6)}n&2&&(U(r.styleClass),l("ngStyle",r.style)("ngClass",kt(27,GW,r.checked(),r.disabled,r.focused)),T("data-pc-name","checkbox")("data-pc-section","root"),d(),T("data-pc-section","hiddenInputWrapper")("data-p-hidden-accessible",!0),d(),l("value",r.value)("checked",r.checked())("disabled",r.disabled)("readonly",r.readonly),T("id",r.inputId)("name",r.name)("tabindex",r.tabindex)("required",r.required)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("aria-checked",r.checked())("data-pc-section","hiddenInput"),d(2),l("ngClass",kt(31,$W,r.checked(),r.disabled,r.focused)),T("data-p-highlight",r.checked())("data-p-disabled",r.disabled)("data-p-focused",r.focused)("data-pc-section","input"),d(),l("ngIf",r.checked()),d(),l("ngIf",r.label))},dependencies:()=>[xe,Ie,rt,Ce,_n],styles:[`@layer primeng{.p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}} +`],encapsulation:2,changeDetection:0})}return i})(),CE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,_n,Te]})}return i})();var IE=(()=>{let t=class t{constructor(n,r,o){this.fb=n,this.authService=r,this.tmdbService=o,this.placeholderImage="https://cdn.vectorstock.com/i/preview-1x/08/19/gray-photo-placeholder-icon-design-ui-vector-35850819.jpg",this.allSorts=[{name:"Latest Releases",value:"first_air_date.desc"},{name:"Older Releases",value:"first_air_date.asc"},{name:"Name Asc",value:"name.desc"},{name:"Name Desc",value:"name.asc"},{name:"Popular",value:"popularity.desc"},{name:"Less Popular",value:"popularity.asc"},{name:"Liked",value:"vote_average.desc"},{name:"Less Liked",value:"vote_average.asc"}],this.applyFilters=new L,this.filtersForm=this.fb.group({sortBy:this.fb.control(this.allSorts[4]),withGenres:this.fb.control([]),firstAirDateYear:this.fb.control("")}),this.allGenres=[],this.allLanguages=[],this.allRegions=[],this.allCelebrities=[],this.getMovieGenres()}submitFilters(){console.log(typeof this.filtersForm.value);let n=this.filtersForm.value,r=this.filtersForm.value;for(let o of Object.entries(n))if(Array.isArray(o[1])&&o[1].length>0&&(r[o[0]]=o[1].map(s=>s.id).join(",")),typeof o[1]=="object"&&o[1]!==null){let s=Object.values(o[1]);o[0]==="sortBy"&&(r[o[0]]=s[1]),(o[0]==="language"||o[0]==="region")&&(r[o[0]]=s[0]),o[0]==="firstAirDateYear"&&(r[o[0]]=n.firstAirDateYear.getFullYear())}this.applyFilters.emit(r)}getMovieGenres(){this.tmdbService.getTMDBData("genre/tv/list").subscribe(n=>{this.allGenres=n.genres})}getLanguages(){this.tmdbService.getTMDBData("configuration/languages").subscribe(n=>{this.allLanguages=n})}getRegions(){this.tmdbService.getTMDBData("configuration/countries").subscribe(n=>{this.allRegions=n})}getCelebrities(n){this.tmdbService.getTMDBData("search/person",{query:n}).subscribe(r=>{this.allCelebrities=r.results,console.log(r)})}filterCountry(n){this.getCelebrities(n.query)}selectCelebrity(){alert("abc")}};t.\u0275fac=function(r){return new(r||t)(w(Vu),w(Kt),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tv-filters"]],outputs:{applyFilters:"applyFilters"},standalone:!0,features:[R],decls:7,vars:3,consts:[[1,"wrapper"],[3,"formGroup"],["formControlName","sortBy","optionLabel","name","placeholder","Sort By",3,"options","onChange"],["formControlName","firstAirDateYear","view","year","dateFormat","yy","inputId","yearpicker","placeholder","First Release Year",3,"onChange"],["formControlName","withGenres","optionLabel","name","placeholder","Select Genres",3,"options","onChange"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"h2"),_(2,"Filters"),h(),p(3,"form",1)(4,"p-dropdown",2),A("onChange",function(){return o.submitFilters()}),h(),p(5,"p-calendar",3),A("onChange",function(){return o.submitFilters()}),h(),p(6,"p-multiSelect",4),A("onChange",function(){return o.submitFilters()}),h()()()),r&2&&(d(3),l("formGroup",o.filtersForm),d(),l("options",o.allSorts),d(2),l("options",o.allGenres))},dependencies:[Ya,Ps,Bi,an,ii,sn,Qi,Yi,$,yt,Rn,Kn,CE,om,md,Za,Wa],styles:[".wrapper[_ngcontent-%COMP%]{padding:0 2rem;margin-bottom:1rem}.wrapper[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:0}.wrapper[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}"]});let i=t;return i})();function KW(i,t){if(i&1){let e=G();p(0,"app-movie-filters",3),A("applyFilters",function(r){S(e);let o=m();return E(o.applyFilters(r))}),h(),y(1,"app-cards-container",4)}if(i&2){let e=m();d(),l("params","/"+e.mediaType)("queryParams",e.appliedFilters)("multipleResults",!0)}}function QW(i,t){if(i&1){let e=G();p(0,"app-tv-filters",3),A("applyFilters",function(r){S(e);let o=m();return E(o.applyTvFilter(r))}),h(),y(1,"app-cards-container",5)}if(i&2){let e=m();d(),l("params","/"+e.mediaType)("queryParams",e.appliedTvFilters)("multipleResults",!0)}}var wE=(()=>{let t=class t{constructor(n,r){this.router=n,this.activatedRoute=r,this.activeTab=0,this.mediaType="movie",this.mediaTypes=["movies","tv shows"],this.appliedFilters={},this.appliedTvFilters={},document.title="Discover - Showbizhub",this.activatedRoute.queryParams.subscribe(o=>{o.mediaType?(this.mediaType=o.mediaType,this.mediaType=="tv"?(this.applyTvFilter(o),this.activeTab=1):this.applyFilters(o)):this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{mediaType:this.mediaType},queryParamsHandling:"merge"})})}ngOnInit(){}updateMediaType(n){n.index===1?(this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{mediaType:"tv"},queryParamsHandling:"merge"}),this.mediaType="tv"):(this.mediaType="movie",this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{mediaType:"movie"},queryParamsHandling:"merge"}))}applyFilters(n){let r=[{paramName:"certification",value:n.certification},{paramName:"certification.gte",value:n.certificationGte},{paramName:"certification.lte",value:n.certificationLte},{paramName:"certification_country",value:n.certificationCountry},{paramName:"include_adult",value:!1},{paramName:"include_video",value:n.includeVideo},{paramName:"language",value:n.language},{paramName:"primary_release_year",value:n.primaryReleaseYear},{paramName:"primary_release_date.gte",value:n.primaryReleaseYearGte},{paramName:"primary_release_date.lte",value:n.primaryReleaseYearLte},{paramName:"region",value:n.region},{paramName:"release_date.gte",value:n.releaseDateGte},{paramName:"release_date.lte",value:n.releaseDateLte},{paramName:"sort_by",value:n.sortBy},{paramName:"vote_average.gte",value:n.voteAverageGte},{paramName:"vote_average.lte",value:n.voteAverageLte},{paramName:"vote_count.gte",value:n.voteCountGte},{paramName:"vote_count.lte",value:n.voteCountLte},{paramName:"watch_region",value:n.watchRegion},{paramName:"with_cast",value:n.withCast},{paramName:"with_companies",value:n.withCompanies},{paramName:"with_crew",value:n.withCrew},{paramName:"with_genres",value:n.withGenres},{paramName:"with_keywords",value:n.withKeywords},{paramName:"with_origin_country",value:n.withOriginCountry},{paramName:"with_original_language",value:n.withOriginLanguage},{paramName:"with_people",value:n.withPeople},{paramName:"with_release_type",value:n.withReleaseType},{paramName:"with_runtime.gte",value:n.withRuntimeGte},{paramName:"with_runtime.lte",value:n.withRuntimeLte},{paramName:"with_watch_monetization_types",value:n.withWatchMonetizationTypes},{paramName:"without_genres",value:n.withoutGenres},{paramName:"without_keywords",value:n.withoutKeywords},{paramName:"with_watch_providers",value:n.withWatchProviders},{paramName:"without_companies",value:n.withoutCompanies},{paramName:"without_watch_providers",value:n.withoutWatchProviders},{paramName:"year",value:n.year}],o={};r.forEach(s=>{if(s.value!==void 0){let a=s.paramName.split(".").pop();o[a]=s.value}}),this.appliedFilters=o}applyTvFilter(n){let r=[{paramName:"air_date.gte",value:n.airDateGte},{paramName:"air_date.gte",value:n.airDateLte},{paramName:"first_air_date_year",value:n.firstAirDateYear},{paramName:"first_air_date.gte",value:n.firstAirDateGte},{paramName:"first_air_date.lte",value:n.firstAirDateLte},{paramName:"include_adult",value:!1},{paramName:"language",value:n.language},{paramName:"screened_theatrically",value:n.screenedThreatrically},{paramName:"sort_by",value:n.sortBy},{paramName:"timezone",value:n.timezone},{paramName:"vote_average.gte",value:n.voteAverageGte},{paramName:"vote_average.lte",value:n.voteAverageLte},{paramName:"vote_count.gte",value:n.voteCountGte},{paramName:"vote_count.lte",value:n.voteCountLte},{paramName:"watch_region",value:n.watchRegion},{paramName:"with_companies",value:n.withCompanies},{paramName:"with_genres",value:n.withGenres},{paramName:"with_keywords",value:n.withKeywords},{paramName:"with_networks",value:n.withNetworks},{paramName:"with_origin_country",value:n.withOriginCountry},{paramName:"with_original_language",value:n.withOriginalLanguage},{paramName:"with_runtime.gte",value:n.withRuntimeGte},{paramName:"with_runtime.lte",value:n.withRuntimeLte},{paramName:"with_status",value:n.withStatus},{paramName:"with_watch_monetization_types",value:n.withWatchMonetizationTypes},{paramName:"with_watch_providers",value:n.withWatchProviders},{paramName:"without_companies",value:n.withoutCompanies},{paramName:"without_genres",value:n.withoutGenres},{paramName:"without_keywords",value:n.withoutKeywords},{paramName:"without_watch_providers",value:n.withoutWatchProviders},{paramName:"with_type",value:n.withType}],o={};r.forEach(s=>{if(s.value!==void 0){let a=s.paramName.split(".").pop();o[a]=s.value}}),this.appliedTvFilters=o}};t.\u0275fac=function(r){return new(r||t)(w(bt),w(ft))},t.\u0275cmp=k({type:t,selectors:[["app-discover"]],standalone:!0,features:[R],decls:5,vars:4,consts:[[1,"wrapper"],[3,"label"],[3,"data","active","newItemEvent"],[3,"applyFilters"],["containerType","movies","path","discover",3,"params","queryParams","multipleResults"],["containerType","tvshows","path","discover",3,"params","queryParams","multipleResults"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"app-top-titles",1)(2,"app-switcher",2),A("newItemEvent",function(a){return o.updateMediaType(a)}),h()(),g(3,KW,2,3)(4,QW,2,3),h()),r&2&&(d(),l("label","Discover"),d(),l("data",o.mediaTypes)("active",o.activeTab),d(),Je(3,o.mediaType=="movie"?3:4))},dependencies:[Qa,bE,xr,IE,_t,li],styles:["h2[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--accent)}"]});let i=t;return i})();var TE=(()=>{let t=class t{constructor(){document.title="404 Page Not Found - Showbizhub"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-page-not-found"]],standalone:!0,features:[R],decls:9,vars:2,consts:[[1,"wrapper"],[1,"content"],[1,"pi","pi-error"],["label","Go Back","icon","pi pi-arrow-left","routerLink","..",3,"rounded"],["label","Go to Home","icon","pi pi-arrow-right","routerLink","/home",3,"rounded"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"h1"),y(3,"i",2),_(4," 404 Page Not Found"),h(),p(5,"p"),_(6,"The page you are looking for not found!. Please Enter a valid address"),h(),y(7,"p-button",3)(8,"p-button",4),h()()),r&2&&(d(7),l("rounded",!0),d(),l("rounded",!0))},dependencies:[yt,ni,Ve,et],styles:[".wrapper[_ngcontent-%COMP%]{height:90vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.4rem}.wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{text-align:center}.wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--primary-color);margin-bottom:0}.wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}"]});let i=t;return i})();var YW=["input"],ZW=(i,t,e)=>({"p-radiobutton-label":!0,"p-radiobutton-label-active":i,"p-disabled":t,"p-radiobutton-label-focus":e});function XW(i,t){if(i&1){let e=G();p(0,"label",7),A("click",function(r){S(e);let o=m();return E(o.select(r))}),_(1),h()}if(i&2){let e=m(),n=Le(3);U(e.labelStyleClass),l("ngClass",kt(6,ZW,n.checked,e.disabled,e.focused)),T("for",e.inputId)("data-pc-section","label"),d(),z(e.label)}}var JW=(i,t,e)=>({"p-radiobutton p-component":!0,"p-radiobutton-checked":i,"p-radiobutton-disabled":t,"p-radiobutton-focused":e}),eK=(i,t,e)=>({"p-radiobutton-box":!0,"p-highlight":i,"p-disabled":t,"p-focus":e}),tK={provide:zt,useExisting:Tt(()=>Uy),multi:!0},iK=(()=>{class i{accessors=[];add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return e[0].control?e[0].control.root===n.control.control.root&&e[1].name===n.name:!1}static \u0275fac=function(n){return new(n||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Uy=(()=>{class i{cd;injector;registry;value;formControlName;name;disabled;label;tabindex;inputId;ariaLabelledBy;ariaLabel;style;styleClass;labelStyleClass;onClick=new L;onFocus=new L;onBlur=new L;inputViewChild;onModelChange=()=>{};onModelTouched=()=>{};checked;focused;control;constructor(e,n,r){this.cd=e,this.injector=n,this.registry=r}ngOnInit(){this.control=this.injector.get(Rr),this.checkName(),this.registry.add(this.control,this)}handleClick(e,n,r){e.preventDefault(),!this.disabled&&(this.select(e),r&&n.focus())}select(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}writeValue(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error(` If you define both a name and a formControlName attribute on your radio button, their values must match. Ex: - `)}static \u0275fac=function(n){return new(n||i)(w(Ne),w(Mi),w(iK))};static \u0275cmp=k({type:i,selectors:[["p-radioButton"]],viewQuery:function(n,r){if(n&1&&oe(YW,5),n&2){let o;q(o=W())&&(r.inputViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:"disabled",label:"label",tabindex:"tabindex",inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[mt([tK])],decls:7,vars:29,consts:[[3,"ngStyle","ngClass","click"],[1,"p-hidden-accessible"],["type","radio",3,"checked","disabled","value","focus","blur"],["input",""],[3,"ngClass"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(n,r){if(n&1){let o=G();p(0,"div",0),A("click",function(a){S(o);let c=Le(3);return E(r.handleClick(a,c,!0))}),p(1,"div",1)(2,"input",2,3),A("focus",function(a){return r.onInputFocus(a)})("blur",function(a){return r.onInputBlur(a)}),h()(),p(4,"div",4),y(5,"span",5),h()(),g(6,XW,2,10,"label",6)}n&2&&(U(r.styleClass),l("ngStyle",r.style)("ngClass",kt(21,JW,r.checked,r.disabled,r.focused)),T("data-pc-name","radiobutton")("data-pc-section","root"),d(),T("data-pc-section","hiddenInputWrapper"),d(),l("checked",r.checked)("disabled",r.disabled)("value",r.value),T("id",r.inputId)("name",r.name)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("tabindex",r.tabindex)("aria-checked",r.checked)("data-pc-section","hiddenInput"),d(2),l("ngClass",kt(25,eK,r.checked,r.disabled,r.focused)),T("data-pc-section","input"),d(),T("data-pc-section","icon"),d(),l("ngIf",r.label))},dependencies:[xe,Ie,Ce],encapsulation:2,changeDetection:0})}return i})(),xE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var rK=()=>["All","Movies","Tv","Celebrities"],oK=()=>["/trending","movies","tvshows","celebrities"],SE=(()=>{let t=class t{constructor(n,r){this.tmdbService=n,this.router=r,this.activeTab=0,this.timeWindowForm=new on({timewindow:new ti("day")}),document.title="Trending - Showbizhub",r.events.subscribe(o=>{if(o.urlAfterRedirects){let s=o.urlAfterRedirects.slice(10,o.urlAfterRedirects.length-1);s=="tvshow"?this.activeTab=2:s=="movie"?this.activeTab=1:s=="celebritie"&&(this.activeTab=3)}})}updateTimeWindow(){console.log(this.timeWindowForm.value);let n=this.timeWindowForm.value.timewindow;this.tmdbService.timeWindow.set(n)}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(bt))},t.\u0275cmp=k({type:t,selectors:[["app-trending"]],standalone:!0,features:[R],decls:6,vars:6,consts:[["label","Trending"],[3,"formGroup"],["label","Day","formControlName","timewindow","value","day",3,"onClick"],["label","Week","formControlName","timewindow","value","week",3,"onClick"],[3,"data","routes","active"]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"form",1)(2,"p-radioButton",2),A("onClick",function(){return o.updateTimeWindow()}),h(),p(3,"p-radioButton",3),A("onClick",function(){return o.updateTimeWindow()}),h()(),y(4,"app-switcher",4),h(),y(5,"router-outlet")),r&2&&(d(),l("formGroup",o.timeWindowForm),d(3),l("data",Ke(4,rK))("routes",Ke(5,oK))("active",o.activeTab))},dependencies:[Ve,Jo,Rn,Qa,li,Bi,an,ii,sn,Qi,Yi,xE,Uy],styles:["form[_ngcontent-%COMP%]{margin-right:auto;padding-left:10px}"]});let i=t;return i})();var EE=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-all-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","combined","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/all/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var OE=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-movies-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","movies","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/movie/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var ME=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tvshows-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","tvshows","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/tv/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var kE=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-celebrities-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","celebrities","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/person/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var sK=i=>({query:i}),AE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query)})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-celebrities-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","celebrities","path","search","params","/person",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,sK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var aK=i=>({query:i}),DE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query)})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tvshow-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","tvshows","path","search","params","/tv",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,aK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var lK=i=>({query:i}),PE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query)})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-movies-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","movies","path","search","params","/movie",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,lK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var cK=i=>({query:i}),RE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query,document.title=`Search Results for '${o.query}' - Showbizhub`,this.tmdbService.setState({searchQuery:o.query}))})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-all-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","combined","path","search","params","/multi",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,cK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var dK=()=>["all","movie","tv","celebrities"],uK=(i,t,e,n)=>[i,t,e,n],VE=(()=>{let t=class t{constructor(n,r,o){this.tmdbService=n,this.ac=r,this.router=o,this.currentSearchQuery="",this.ac.params.subscribe(s=>{s.query&&this.tmdbService.setState({searchQuery:s.query})}),this.currentSearchQuery=this.tmdbService.select("searchQuery"),this.tmdbService.setState({age:"26"}),setTimeout(()=>{let s=this.tmdbService.select("searchQuery"),a=this.tmdbService.select("age")},3e3)}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(ft),w(bt))},t.\u0275cmp=k({type:t,selectors:[["app-search"]],standalone:!0,features:[R],decls:5,vars:8,consts:[[1,"row"],[1,"col-12"],["label","Search Results"],[3,"data","routes"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"app-top-titles",2),y(3,"app-switcher",3),h()()(),y(4,"router-outlet")),r&2&&(d(3),l("data",Ke(2,dK))("routes",Dr(3,uK,"/search/"+o.currentSearchQuery(),"movies/"+o.currentSearchQuery(),"tvshows/"+o.currentSearchQuery(),"celebrities/"+o.currentSearchQuery())))},dependencies:[Ve,Jo,Qa,$,li]});let i=t;return i})();function pK(i,t){i&1&&(p(0,"h6"),_(1,"Pick a password"),h())}function hK(i,t){i&1&&(p(0,"p",18),_(1,"Suggestions"),h(),p(2,"ul",19)(3,"li"),_(4,"At least one lowercase"),h(),p(5,"li"),_(6,"At least one uppercase"),h(),p(7,"li"),_(8,"At least one numeric"),h(),p(9,"li"),_(10,"Minimum 8 characters"),h()())}var mK=()=>({width:"100vw",height:"calc(100vh - 2rem)",display:"grid",placeItems:"center"}),LE=(()=>{let t=class t{constructor(n){this.authService=n,this.signupForm=new on({username:new ti("",[mn.required]),dateOfBirth:new ti("",[mn.required]),email:new ti("",[mn.required,mn.email]),password:new ti("",[mn.required])}),document.title="Signup on Showbizhub"}signup(){this.signupForm.valid&&this.authService.signupWithEmailAndPassword(this.signupForm.value).subscribe(n=>{localStorage.setItem("user",JSON.stringify(n)),this.authService.createUserData(this.signupForm.value,n.localId)})}};t.\u0275fac=function(r){return new(r||t)(w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-signup"]],standalone:!0,features:[R],decls:26,vars:7,consts:[["header","Login to ShowbizHub","subheader","Enter Your Credentials"],[3,"formGroup","ngSubmit"],[1,"p-float-label","my-4"],["pInputText","","id","username","formControlName","username"],["for","username"],["pInputText","","id","email","formControlName","email"],["for","email"],["formControlName","dateOfBirth","inputId","birth_date"],["for","birth_date"],[1,"p-float-label"],["formControlName","password",3,"toggleMask"],["pTemplate","header"],["pTemplate","footer"],["for","password"],[1,"my-4"],["label","Signup","icon","pi pi-check","iconPos","right","type","submit","size","small",3,"rounded","disabled"],[2,"margin-top",".3rem"],["routerLink","/login"],[1,"mt-2"],[1,"pl-2","ml-2","mt-0",2,"line-height","1.5"]],template:function(r,o){r&1&&(p(0,"p-card",0)(1,"form",1),A("ngSubmit",function(){return o.signup()}),p(2,"div",2),y(3,"input",3),p(4,"label",4),_(5,"Username"),h()(),p(6,"div",2),y(7,"input",5),p(8,"label",6),_(9,"Email"),h()(),p(10,"div",2),y(11,"p-calendar",7),p(12,"label",8),_(13,"Birth Date"),h()(),p(14,"span",9)(15,"p-password",10),g(16,pK,2,0,"ng-template",11)(17,hK,11,0,"ng-template",12),h(),p(18,"label",13),_(19,"Password"),h()(),p(20,"div",14),y(21,"p-button",15),p(22,"div",16),_(23," Already Have an Account? "),p(24,"a",17),_(25,"Login"),h()()()()()),r&2&&(xt(Ke(6,mK)),d(),l("formGroup",o.signupForm),d(14),l("toggleMask",!0),d(6),l("rounded",!0)("disabled",o.signupForm.invalid))},dependencies:[fn,_o,Bi,an,mo,ii,sn,Qi,Yi,Ya,Ps,ni,he,Nu,tc,yt,oa,ra,Ve,et],styles:["form[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{margin-bottom:1.5rem}"]});let i=t;return i})();function fK(i,t){}var gK=()=>({width:"100vw",height:"calc(100vh - 2rem)",display:"grid",placeItems:"center"}),_K=()=>({"margin-left":".5em"}),FE=(()=>{let t=class t{constructor(n,r){this.authService=n,this.tmdbService=r,this.loading=!0,this.allLanguages=[],this.settingsForm=new on({username:new ti(""),language:new ti(""),region:new ti("")}),document.title="Settings - Showbizhub";let o=n.getLoggedInUser();o&&(this.currentUser=o,this.setFormValues(this.currentUser.data))}getLanguages(){return D(this,null,function*(){setTimeout(()=>{this.allLanguages=this.tmdbService.select("languages")()},2e3)})}setFormValues(n){this.settingsForm.get("username")?.setValue(n?.username),this.settingsForm.get("email")?.setValue(n?.email),this.settingsForm.get("dateOfBirth")?.setValue(n?.dateOfBirth),this.settingsForm.get("language")?.setValue(n?.language),this.getLanguages(),this.loading=!1}updateUser(){let n=this.mergeObjects(this.currentUser.data,this.settingsForm.value);this.loading=!0,this.authService.updateUserData(n,this.currentUser.user.id).then(()=>{this.loading=!1,console.log("updated"),localStorage.setItem("user",JSON.stringify({user:this.currentUser.user,data:n})),this.currentUser.data=n,this.authService.loggedInUser.set(this.currentUser)}).catch(()=>{console.log("failed"),this.loading=!1})}mergeObjects(n,r){let o=F({},n);for(let s in r)r.hasOwnProperty(s)&&(n.hasOwnProperty(s),o[s]=r[s]);return o}};t.\u0275fac=function(r){return new(r||t)(w(Kt),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-settings"]],standalone:!0,features:[R],decls:15,vars:13,consts:[[1,"row"],[1,"col-12"],["header","Settings","subheader","User Settings"],[1,"row",3,"formGroup","ngSubmit"],[1,"col-6"],[1,"p-float-label","my-4"],["pInputText","","id","username","formControlName","username"],["for","username"],["formControlName","language","optionLabel","english_name","placeholder","Select a Language",3,"options"],["label","Save Changes","type","submit","icon","pi pi-check","size","small",3,"loading","rounded"],["label","Cancel","type","button","icon","pi pi-times","styleClass","p-button-secondary","size","small",3,"rounded"],["pTemplate","footer"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"h2"),_(3),h(),p(4,"p-card",2)(5,"form",3),A("ngSubmit",function(){return o.updateUser()}),p(6,"div",4)(7,"div",5),y(8,"input",6),p(9,"label",7),_(10,"Username"),h()(),y(11,"p-dropdown",8),h(),y(12,"p-button",9)(13,"p-button",10),h(),g(14,fK,0,0,"ng-template",11),h()()()),r&2&&(d(3),z(o.loading?"Please wait!!!":""),d(),xt(Ke(11,gK)),d(),l("formGroup",o.settingsForm),d(6),l("options",o.allLanguages),d(),l("loading",o.loading)("rounded",!0)("loading",!1),d(),xt(Ke(12,_K)),l("rounded",!0))},dependencies:[Bi,an,mo,ii,sn,Qi,Yi,fn,_o,Rn,Wn,he,oa,ra,yt,ni],styles:["form[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{margin-bottom:1.5rem}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}"]});let i=t;return i})();var jy=(i,t)=>D(void 0,null,function*(){let e=ae(Kt),n=ae(bt);return(yield e.getLoggedInUser().user?.id)?!0:(n.navigate(["/login"]),!1)});function vK(i,t){if(i&1&&(y(0,"i",5),p(1,"span"),_(2,"Movies"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.data.__zone_symbol__value.movies==null?null:e.data.__zone_symbol__value.movies.length.toString())}}function yK(i,t){if(i&1&&(y(0,"i",5),p(1,"span"),_(2,"TV Shows"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.data.__zone_symbol__value.tvshows==null?null:e.data.__zone_symbol__value.tvshows.length.toString())}}function bK(i,t){if(i&1&&y(0,"app-cards-container",6),i&2){let e=m();l("tvshows",e.data.__zone_symbol__value.tvshows)}}function CK(i,t){if(i&1&&(y(0,"i",5),p(1,"span"),_(2,"Celebrities"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.data.__zone_symbol__value.celebrities==null?null:e.data.__zone_symbol__value.celebrities.length.toString())}}function IK(i,t){if(i&1&&y(0,"app-cards-container",7),i&2){let e=m();l("celebrities",e.data.__zone_symbol__value.celebrities)}}var NE=(()=>{let t=class t{constructor(n){this.firestoreService=n,this.getData(),setTimeout(()=>{console.log(this.data)},5e3)}getData(){this.data=this.firestoreService.getList()}};t.\u0275fac=function(r){return new(r||t)(w(Vn))},t.\u0275cmp=k({type:t,selectors:[["app-favorites"]],standalone:!0,features:[R],decls:12,vars:1,consts:[[1,"wrapper"],["label","Favorites","showAs","column"],["pTemplate","header"],["containerType","movies",3,"movies"],["pTemplate","content"],[1,"pi","pi-user"],["containerType","tvshows",3,"tvshows"],["containerType","celebrities",3,"celebrities"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"app-top-titles",1)(2,"p-tabView")(3,"p-tabPanel"),g(4,vK,5,1,"ng-template",2),y(5,"app-cards-container",3),h(),p(6,"p-tabPanel"),g(7,yK,5,1,"ng-template",2)(8,bK,1,1,"ng-template",4),h(),p(9,"p-tabPanel"),g(10,CK,5,1,"ng-template",2)(11,IK,1,1,"ng-template",4),h()()()()),r&2&&(d(5),l("movies",o.data.__zone_symbol__value.movies))},dependencies:[Bo,Yr,Qr,he,zo,xr,_t,li]});let i=t;return i})();var BE=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-about"]],standalone:!0,features:[R],decls:132,vars:0,consts:[["showAs","column","label","About ShowbizHub"],["routerLink","/home"],["href",""]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"div")(2,"h2")(3,"strong"),_(4,"Unleash Your Inner Cinephile: Explore Movies, TV Shows & Celebrities with "),p(5,"a",1),_(6,"ShowbizHub"),h()()(),p(7,"p")(8,"strong")(9,"a",1),_(10,"ShowbizHub"),h()(),_(11," is your one-stop destination for exploring the vast world of entertainment. Whether you're a movie buff, a TV show enthusiast, or simply curious about celebrities, our app offers a "),p(12,"strong"),_(13,"rich and immersive experience"),h(),_(14," designed by a "),p(15,"strong"),_(16,"passionate frontend developer"),h(),_(17," ("),p(18,"strong")(19,"a",2),_(20,"Shahzad Ameer"),h()(),_(21,"). "),h(),p(22,"p")(23,"strong"),_(24,"Dive into a Sea of Content:"),h()(),p(25,"ul")(26,"li")(27,"strong"),_(28,"Extensive library:"),h(),_(29," Discover a massive collection of movies, TV shows, and celebrities, all conveniently accessible through our user-friendly interface. "),h(),p(30,"li")(31,"strong"),_(32,"Seamless filtering:"),h(),_(33," Refine your search with "),p(34,"strong"),_(35,"advanced filters"),h(),_(36," based on genre, year, popularity, and more. Find exactly what you're looking for with ease. "),h(),p(37,"li")(38,"strong"),_(39,"Infinite scrolling:"),h(),_(40," Never run out of content to explore! Our "),p(41,"strong"),_(42,"infinite scrolling feature"),h(),_(43," seamlessly loads more results as you browse, keeping the entertainment flowing. "),h()(),p(44,"p")(45,"strong"),_(46,"Unveiling the Details:"),h()(),p(47,"ul")(48,"li")(49,"strong"),_(50,"In-depth information:"),h(),_(51," Delve deeper with detailed pages for each movie, TV show, and celebrity, packed with captivating visuals and comprehensive information. "),h(),p(52,"li")(53,"strong"),_(54,"Visually stunning:"),h(),_(55," Immerse yourself in the world of entertainment with "),p(56,"strong"),_(57,"eye-catching movie cards, TV show cards, and celebrity cards"),h(),_(58," that showcase the best of what each has to offer. "),h()(),p(59,"p")(60,"strong"),_(61,"Personalize Your Experience:"),h()(),p(62,"ul")(63,"li")(64,"strong"),_(65,"Create an account:"),h(),_(66," Sign up for a free account to "),p(67,"strong"),_(68,"save your favorite movies, TV shows, and celebrities"),h(),_(69," for easy access and future reference. "),h(),p(70,"li")(71,"strong"),_(72,"Light and dark themes:"),h(),_(73," Choose the theme that best suits your viewing preference, whether you prefer a "),p(74,"strong"),_(75,"bright and airy"),h(),_(76," or a "),p(77,"strong"),_(78,"dark and cinematic"),h(),_(79," experience. "),h()(),p(80,"p")(81,"strong"),_(82,"Built with Expertise:"),h()(),p(83,"p")(84,"strong")(85,"a",2),_(86,"Shahzad Ameer"),h()(),_(87,", the "),p(88,"strong"),_(89,"skilled frontend developer"),h(),_(90," behind this app, has meticulously crafted it using "),p(91,"strong"),_(92,"cutting-edge technologies"),h(),_(93," like Angular, Firebase, and various libraries, ensuring "),p(94,"strong"),_(95,"smooth performance, exceptional UI/UX design, and robust functionality"),h(),_(96,". "),h(),p(97,"p")(98,"strong"),_(99,"Beyond the Basics:"),h()(),p(100,"ul")(101,"li")(102,"strong"),_(103,"Search bar with autocomplete:"),h(),_(104," Effortlessly find what you're looking for with our "),p(105,"strong"),_(106,"intelligent search bar"),h(),_(107," that suggests relevant results as you type. "),h(),p(108,"li")(109,"strong"),_(110,"Customizable settings:"),h(),_(111," Tailor your experience with "),p(112,"strong"),_(113,"customizable settings"),h(),_(114," like language and preferred content. "),h()(),p(115,"p")(116,"strong"),_(117,"Experience the Difference:"),h()(),p(118,"p")(119,"strong")(120,"a",1),_(121,"ShowbizHub"),h()(),_(122," is not just an app, it's a portal to a world of entertainment, meticulously crafted by a "),p(123,"strong"),_(124,"talented frontend developer"),h(),_(125," ("),p(126,"strong")(127,"a",2),_(128,"Shahzad Ameer"),h()(),_(129,") with a passion for user experience. Visit today and "),p(130,"strong"),_(131,"explore, discover, and immerse yourself!"),h()()()())},dependencies:[li,Ve,et,$],styles:["strong[_ngcontent-%COMP%]{color:var(--primary-color)}"]});let i=t;return i})();var zE=[{path:"login",component:QS},{path:"signup",component:LE},{path:"home",component:N2},{path:"about",component:BE},{path:"favorites",component:NE,canActivate:[jy]},{path:"",redirectTo:"/home",pathMatch:"full"},{path:"movies",component:I2},{path:"movies/:id",component:V2},{path:"tvshows",component:B2},{path:"tvshows/:id",component:U2},{path:"celebrities",component:j2},{path:"celebrities/:id",component:$2},{path:"discover",component:wE},{path:"settings",component:FE,canActivate:[jy]},{path:"trending",component:SE,children:[{path:"",component:EE},{path:"movies",component:OE},{path:"tvshows",component:ME},{path:"celebrities",component:kE}]},{path:"search",component:VE,children:[{path:":query",component:RE},{path:"movies/:query",component:PE},{path:"tvshows/:query",component:DE},{path:"celebrities/:query",component:AE}]},{path:"**",component:TE}];function Hy(i,t){let e=!t?.manualCleanup;e&&!t?.injector&&c1(Hy);let n=e?t?.injector?.get(Nm)??ae(Nm):null,r;t?.requireSync?r=st({kind:0}):r=st({kind:1,value:t?.initialValue});let o=i.subscribe({next:s=>r.set({kind:1,value:s}),error:s=>{if(t?.rejectErrors)throw s;r.set({kind:2,error:s})}});return n?.onDestroy(o.unsubscribe.bind(o)),yi(()=>{let s=r();switch(s.kind){case 1:return s.value;case 2:throw s.error;case 0:throw new wt(601,"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}})}var qy={};function Xa(i,t){if(qy[i]=(qy[i]||0)+1,typeof t=="function")return Gy(i,(...n)=>pe(F({},t(...n)),{type:i}));switch(t?t._as:"empty"){case"empty":return Gy(i,()=>({type:i}));case"props":return Gy(i,n=>pe(F({},n),{type:i}));default:throw new Error("Unexpected config.")}}function Gy(i,t){return Object.defineProperty(t,"type",{value:i,writable:!1})}var XE="@ngrx/store/init",Ja=(()=>{let t=class t extends Fi{constructor(){super({type:XE})}next(n){if(typeof n=="function")throw new TypeError(` + `)}static \u0275fac=function(n){return new(n||i)(w(Ne),w(Mi),w(iK))};static \u0275cmp=k({type:i,selectors:[["p-radioButton"]],viewQuery:function(n,r){if(n&1&&oe(YW,5),n&2){let o;q(o=W())&&(r.inputViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:"disabled",label:"label",tabindex:"tabindex",inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[mt([tK])],decls:7,vars:29,consts:[[3,"ngStyle","ngClass","click"],[1,"p-hidden-accessible"],["type","radio",3,"checked","disabled","value","focus","blur"],["input",""],[3,"ngClass"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(n,r){if(n&1){let o=G();p(0,"div",0),A("click",function(a){S(o);let c=Le(3);return E(r.handleClick(a,c,!0))}),p(1,"div",1)(2,"input",2,3),A("focus",function(a){return r.onInputFocus(a)})("blur",function(a){return r.onInputBlur(a)}),h()(),p(4,"div",4),y(5,"span",5),h()(),g(6,XW,2,10,"label",6)}n&2&&(U(r.styleClass),l("ngStyle",r.style)("ngClass",kt(21,JW,r.checked,r.disabled,r.focused)),T("data-pc-name","radiobutton")("data-pc-section","root"),d(),T("data-pc-section","hiddenInputWrapper"),d(),l("checked",r.checked)("disabled",r.disabled)("value",r.value),T("id",r.inputId)("name",r.name)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("tabindex",r.tabindex)("aria-checked",r.checked)("data-pc-section","hiddenInput"),d(2),l("ngClass",kt(25,eK,r.checked,r.disabled,r.focused)),T("data-pc-section","input"),d(),T("data-pc-section","icon"),d(),l("ngIf",r.label))},dependencies:[xe,Ie,Ce],encapsulation:2,changeDetection:0})}return i})(),xE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var rK=()=>["All","Movies","Tv","Celebrities"],oK=()=>["/trending","movies","tvshows","celebrities"],SE=(()=>{let t=class t{constructor(n,r){this.tmdbService=n,this.router=r,this.activeTab=0,this.timeWindowForm=new on({timewindow:new ti("day")}),document.title="Trending - Showbizhub",r.events.subscribe(o=>{if(o.urlAfterRedirects){let s=o.urlAfterRedirects.slice(10,o.urlAfterRedirects.length-1);s=="tvshow"?this.activeTab=2:s=="movie"?this.activeTab=1:s=="celebritie"&&(this.activeTab=3)}})}updateTimeWindow(){console.log(this.timeWindowForm.value);let n=this.timeWindowForm.value.timewindow;this.tmdbService.timeWindow.set(n)}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(bt))},t.\u0275cmp=k({type:t,selectors:[["app-trending"]],standalone:!0,features:[R],decls:6,vars:6,consts:[["label","Trending"],[3,"formGroup"],["label","Day","formControlName","timewindow","value","day",3,"onClick"],["label","Week","formControlName","timewindow","value","week",3,"onClick"],[3,"data","routes","active"]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"form",1)(2,"p-radioButton",2),A("onClick",function(){return o.updateTimeWindow()}),h(),p(3,"p-radioButton",3),A("onClick",function(){return o.updateTimeWindow()}),h()(),y(4,"app-switcher",4),h(),y(5,"router-outlet")),r&2&&(d(),l("formGroup",o.timeWindowForm),d(3),l("data",Ke(4,rK))("routes",Ke(5,oK))("active",o.activeTab))},dependencies:[Ve,Jo,Rn,Qa,li,Bi,an,ii,sn,Qi,Yi,xE,Uy],styles:["form[_ngcontent-%COMP%]{margin-right:auto;padding-left:10px}"]});let i=t;return i})();var EE=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-all-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","combined","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/all/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var OE=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-movies-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","movies","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/movie/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var ME=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tvshows-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","tvshows","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/tv/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var kE=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.timeWindow="day",this.detectChange=Ki(()=>{this.timeWindow=this.tmdbService.timeWindow()}),this.timeWindow=n.timeWindow()}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-celebrities-trending"]],standalone:!0,features:[R],decls:1,vars:2,consts:[["containerType","celebrities","path","trending",3,"params","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("params","/person/"+o.timeWindow)("multipleResults",!0)},dependencies:[$,_t]});let i=t;return i})();var sK=i=>({query:i}),AE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query)})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-celebrities-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","celebrities","path","search","params","/person",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,sK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var aK=i=>({query:i}),DE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query)})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-tvshow-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","tvshows","path","search","params","/tv",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,aK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var lK=i=>({query:i}),PE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query)})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-movies-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","movies","path","search","params","/movie",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,lK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var cK=i=>({query:i}),RE=(()=>{let t=class t{constructor(n,r){this.ac=n,this.tmdbService=r,this.currentQuery="",n.params.subscribe(o=>{o.query&&(this.currentQuery=o.query,document.title=`Search Results for '${o.query}' - Showbizhub`,this.tmdbService.setState({searchQuery:o.query}))})}};t.\u0275fac=function(r){return new(r||t)(w(ft),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-all-search"]],standalone:!0,features:[R],decls:1,vars:4,consts:[["containerType","combined","path","search","params","/multi",3,"queryParams","multipleResults"]],template:function(r,o){r&1&&y(0,"app-cards-container",0),r&2&&l("queryParams",H(2,cK,o.currentQuery))("multipleResults",!0)},dependencies:[_t]});let i=t;return i})();var dK=()=>["all","movie","tv","celebrities"],uK=(i,t,e,n)=>[i,t,e,n],VE=(()=>{let t=class t{constructor(n,r,o){this.tmdbService=n,this.ac=r,this.router=o,this.currentSearchQuery="",this.ac.params.subscribe(s=>{s.query&&this.tmdbService.setState({searchQuery:s.query})}),this.currentSearchQuery=this.tmdbService.select("searchQuery"),this.tmdbService.setState({age:"26"}),setTimeout(()=>{let s=this.tmdbService.select("searchQuery"),a=this.tmdbService.select("age")},3e3)}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(ft),w(bt))},t.\u0275cmp=k({type:t,selectors:[["app-search"]],standalone:!0,features:[R],decls:5,vars:8,consts:[[1,"row"],[1,"col-12"],["label","Search Results"],[3,"data","routes"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"app-top-titles",2),y(3,"app-switcher",3),h()()(),y(4,"router-outlet")),r&2&&(d(3),l("data",Ke(2,dK))("routes",Dr(3,uK,"/search/"+o.currentSearchQuery(),"movies/"+o.currentSearchQuery(),"tvshows/"+o.currentSearchQuery(),"celebrities/"+o.currentSearchQuery())))},dependencies:[Ve,Jo,Qa,$,li]});let i=t;return i})();function pK(i,t){i&1&&(p(0,"h6"),_(1,"Pick a password"),h())}function hK(i,t){i&1&&(p(0,"p",18),_(1,"Suggestions"),h(),p(2,"ul",19)(3,"li"),_(4,"At least one lowercase"),h(),p(5,"li"),_(6,"At least one uppercase"),h(),p(7,"li"),_(8,"At least one numeric"),h(),p(9,"li"),_(10,"Minimum 8 characters"),h()())}var mK=()=>({width:"100vw",height:"calc(100vh - 2rem)",display:"grid",placeItems:"center"}),LE=(()=>{let t=class t{constructor(n){this.authService=n,this.signupForm=new on({username:new ti("",[mn.required]),dateOfBirth:new ti("",[mn.required]),email:new ti("",[mn.required,mn.email]),password:new ti("",[mn.required])}),document.title="Signup on Showbizhub"}signup(){this.signupForm.valid&&this.authService.signupWithEmailAndPassword(this.signupForm.value).subscribe(n=>{localStorage.setItem("user",JSON.stringify(n)),this.authService.createUserData(this.signupForm.value,n.localId)})}};t.\u0275fac=function(r){return new(r||t)(w(Kt))},t.\u0275cmp=k({type:t,selectors:[["app-signup"]],standalone:!0,features:[R],decls:26,vars:7,consts:[["header","Login to ShowbizHub","subheader","Enter Your Credentials"],[3,"formGroup","ngSubmit"],[1,"p-float-label","my-4"],["pInputText","","id","username","formControlName","username"],["for","username"],["pInputText","","id","email","formControlName","email"],["for","email"],["formControlName","dateOfBirth","inputId","birth_date"],["for","birth_date"],[1,"p-float-label"],["formControlName","password",3,"toggleMask"],["pTemplate","header"],["pTemplate","footer"],["for","password"],[1,"my-4"],["label","Signup","icon","pi pi-check","iconPos","right","type","submit","size","small",3,"rounded","disabled"],[2,"margin-top",".3rem"],["routerLink","/login"],[1,"mt-2"],[1,"pl-2","ml-2","mt-0",2,"line-height","1.5"]],template:function(r,o){r&1&&(p(0,"p-card",0)(1,"form",1),A("ngSubmit",function(){return o.signup()}),p(2,"div",2),y(3,"input",3),p(4,"label",4),_(5,"Username"),h()(),p(6,"div",2),y(7,"input",5),p(8,"label",6),_(9,"Email"),h()(),p(10,"div",2),y(11,"p-calendar",7),p(12,"label",8),_(13,"Birth Date"),h()(),p(14,"span",9)(15,"p-password",10),g(16,pK,2,0,"ng-template",11)(17,hK,11,0,"ng-template",12),h(),p(18,"label",13),_(19,"Password"),h()(),p(20,"div",14),y(21,"p-button",15),p(22,"div",16),_(23," Already Have an Account? "),p(24,"a",17),_(25,"Login"),h()()()()()),r&2&&(xt(Ke(6,mK)),d(),l("formGroup",o.signupForm),d(14),l("toggleMask",!0),d(6),l("rounded",!0)("disabled",o.signupForm.invalid))},dependencies:[fn,_o,Bi,an,mo,ii,sn,Qi,Yi,Ya,Ps,ni,he,Nu,tc,yt,oa,ra,Ve,et],styles:["form[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{margin-bottom:1.5rem}"]});let i=t;return i})();function fK(i,t){}var gK=()=>({width:"100vw",height:"calc(100vh - 2rem)",display:"grid",placeItems:"center"}),_K=()=>({"margin-left":".5em"}),FE=(()=>{let t=class t{constructor(n,r){this.authService=n,this.tmdbService=r,this.loading=!0,this.allLanguages=[],this.settingsForm=new on({username:new ti(""),language:new ti(""),region:new ti("")}),document.title="Settings - Showbizhub";let o=n.getLoggedInUser();o&&(this.currentUser=o,this.setFormValues(this.currentUser.data))}getLanguages(){return D(this,null,function*(){setTimeout(()=>{this.allLanguages=this.tmdbService.select("languages")()},2e3)})}setFormValues(n){this.settingsForm.get("username")?.setValue(n?.username),this.settingsForm.get("email")?.setValue(n?.email),this.settingsForm.get("dateOfBirth")?.setValue(n?.dateOfBirth),this.settingsForm.get("language")?.setValue(n?.language),this.getLanguages(),this.loading=!1}updateUser(){let n=this.mergeObjects(this.currentUser.data,this.settingsForm.value);this.loading=!0,this.authService.updateUserData(n,this.currentUser.user.id).then(()=>{this.loading=!1,console.log("updated"),localStorage.setItem("user",JSON.stringify({user:this.currentUser.user,data:n})),this.currentUser.data=n,this.authService.loggedInUser.set(this.currentUser)}).catch(()=>{console.log("failed"),this.loading=!1})}mergeObjects(n,r){let o=F({},n);for(let s in r)r.hasOwnProperty(s)&&(n.hasOwnProperty(s),o[s]=r[s]);return o}};t.\u0275fac=function(r){return new(r||t)(w(Kt),w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-settings"]],standalone:!0,features:[R],decls:15,vars:13,consts:[[1,"row"],[1,"col-12"],["header","Settings","subheader","User Settings"],[1,"row",3,"formGroup","ngSubmit"],[1,"col-6"],[1,"p-float-label","my-4"],["pInputText","","id","username","formControlName","username"],["for","username"],["formControlName","language","optionLabel","english_name","placeholder","Select a Language",3,"options"],["label","Save Changes","type","submit","icon","pi pi-check","size","small",3,"loading","rounded"],["label","Cancel","type","button","icon","pi pi-times","styleClass","p-button-secondary","size","small",3,"rounded"],["pTemplate","footer"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"div",1)(2,"h2"),_(3),h(),p(4,"p-card",2)(5,"form",3),A("ngSubmit",function(){return o.updateUser()}),p(6,"div",4)(7,"div",5),y(8,"input",6),p(9,"label",7),_(10,"Username"),h()(),y(11,"p-dropdown",8),h(),y(12,"p-button",9)(13,"p-button",10),h(),g(14,fK,0,0,"ng-template",11),h()()()),r&2&&(d(3),z(o.loading?"Please wait!!!":""),d(),xt(Ke(11,gK)),d(),l("formGroup",o.settingsForm),d(6),l("options",o.allLanguages),d(),l("loading",o.loading)("rounded",!0)("loading",!1),d(),xt(Ke(12,_K)),l("rounded",!0))},dependencies:[Bi,an,mo,ii,sn,Qi,Yi,fn,_o,Rn,Kn,he,oa,ra,yt,ni],styles:["form[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{margin-bottom:1.5rem}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}"]});let i=t;return i})();var jy=(i,t)=>D(void 0,null,function*(){let e=ae(Kt),n=ae(bt);return(yield e.getLoggedInUser().user?.id)?!0:(n.navigate(["/login"]),!1)});function vK(i,t){if(i&1&&(y(0,"i",5),p(1,"span"),_(2,"Movies"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.data.__zone_symbol__value.movies==null?null:e.data.__zone_symbol__value.movies.length.toString())}}function yK(i,t){if(i&1&&(y(0,"i",5),p(1,"span"),_(2,"TV Shows"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.data.__zone_symbol__value.tvshows==null?null:e.data.__zone_symbol__value.tvshows.length.toString())}}function bK(i,t){if(i&1&&y(0,"app-cards-container",6),i&2){let e=m();l("tvshows",e.data.__zone_symbol__value.tvshows)}}function CK(i,t){if(i&1&&(y(0,"i",5),p(1,"span"),_(2,"Celebrities"),h(),p(3,"app-custom-bedge"),_(4),h()),i&2){let e=m();d(4),z(e.data.__zone_symbol__value.celebrities==null?null:e.data.__zone_symbol__value.celebrities.length.toString())}}function IK(i,t){if(i&1&&y(0,"app-cards-container",7),i&2){let e=m();l("celebrities",e.data.__zone_symbol__value.celebrities)}}var NE=(()=>{let t=class t{constructor(n){this.firestoreService=n,this.getData(),setTimeout(()=>{console.log(this.data)},5e3)}getData(){this.data=this.firestoreService.getList()}};t.\u0275fac=function(r){return new(r||t)(w(Ln))},t.\u0275cmp=k({type:t,selectors:[["app-favorites"]],standalone:!0,features:[R],decls:12,vars:1,consts:[[1,"wrapper"],["label","Favorites","showAs","column"],["pTemplate","header"],["containerType","movies",3,"movies"],["pTemplate","content"],[1,"pi","pi-user"],["containerType","tvshows",3,"tvshows"],["containerType","celebrities",3,"celebrities"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"app-top-titles",1)(2,"p-tabView")(3,"p-tabPanel"),g(4,vK,5,1,"ng-template",2),y(5,"app-cards-container",3),h(),p(6,"p-tabPanel"),g(7,yK,5,1,"ng-template",2)(8,bK,1,1,"ng-template",4),h(),p(9,"p-tabPanel"),g(10,CK,5,1,"ng-template",2)(11,IK,1,1,"ng-template",4),h()()()()),r&2&&(d(5),l("movies",o.data.__zone_symbol__value.movies))},dependencies:[Bo,Yr,Qr,he,zo,xr,_t,li]});let i=t;return i})();var BE=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-about"]],standalone:!0,features:[R],decls:132,vars:0,consts:[["showAs","column","label","About ShowbizHub"],["routerLink","/home"],["href",""]],template:function(r,o){r&1&&(p(0,"app-top-titles",0)(1,"div")(2,"h2")(3,"strong"),_(4,"Unleash Your Inner Cinephile: Explore Movies, TV Shows & Celebrities with "),p(5,"a",1),_(6,"ShowbizHub"),h()()(),p(7,"p")(8,"strong")(9,"a",1),_(10,"ShowbizHub"),h()(),_(11," is your one-stop destination for exploring the vast world of entertainment. Whether you're a movie buff, a TV show enthusiast, or simply curious about celebrities, our app offers a "),p(12,"strong"),_(13,"rich and immersive experience"),h(),_(14," designed by a "),p(15,"strong"),_(16,"passionate frontend developer"),h(),_(17," ("),p(18,"strong")(19,"a",2),_(20,"Shahzad Ameer"),h()(),_(21,"). "),h(),p(22,"p")(23,"strong"),_(24,"Dive into a Sea of Content:"),h()(),p(25,"ul")(26,"li")(27,"strong"),_(28,"Extensive library:"),h(),_(29," Discover a massive collection of movies, TV shows, and celebrities, all conveniently accessible through our user-friendly interface. "),h(),p(30,"li")(31,"strong"),_(32,"Seamless filtering:"),h(),_(33," Refine your search with "),p(34,"strong"),_(35,"advanced filters"),h(),_(36," based on genre, year, popularity, and more. Find exactly what you're looking for with ease. "),h(),p(37,"li")(38,"strong"),_(39,"Infinite scrolling:"),h(),_(40," Never run out of content to explore! Our "),p(41,"strong"),_(42,"infinite scrolling feature"),h(),_(43," seamlessly loads more results as you browse, keeping the entertainment flowing. "),h()(),p(44,"p")(45,"strong"),_(46,"Unveiling the Details:"),h()(),p(47,"ul")(48,"li")(49,"strong"),_(50,"In-depth information:"),h(),_(51," Delve deeper with detailed pages for each movie, TV show, and celebrity, packed with captivating visuals and comprehensive information. "),h(),p(52,"li")(53,"strong"),_(54,"Visually stunning:"),h(),_(55," Immerse yourself in the world of entertainment with "),p(56,"strong"),_(57,"eye-catching movie cards, TV show cards, and celebrity cards"),h(),_(58," that showcase the best of what each has to offer. "),h()(),p(59,"p")(60,"strong"),_(61,"Personalize Your Experience:"),h()(),p(62,"ul")(63,"li")(64,"strong"),_(65,"Create an account:"),h(),_(66," Sign up for a free account to "),p(67,"strong"),_(68,"save your favorite movies, TV shows, and celebrities"),h(),_(69," for easy access and future reference. "),h(),p(70,"li")(71,"strong"),_(72,"Light and dark themes:"),h(),_(73," Choose the theme that best suits your viewing preference, whether you prefer a "),p(74,"strong"),_(75,"bright and airy"),h(),_(76," or a "),p(77,"strong"),_(78,"dark and cinematic"),h(),_(79," experience. "),h()(),p(80,"p")(81,"strong"),_(82,"Built with Expertise:"),h()(),p(83,"p")(84,"strong")(85,"a",2),_(86,"Shahzad Ameer"),h()(),_(87,", the "),p(88,"strong"),_(89,"skilled frontend developer"),h(),_(90," behind this app, has meticulously crafted it using "),p(91,"strong"),_(92,"cutting-edge technologies"),h(),_(93," like Angular, Firebase, and various libraries, ensuring "),p(94,"strong"),_(95,"smooth performance, exceptional UI/UX design, and robust functionality"),h(),_(96,". "),h(),p(97,"p")(98,"strong"),_(99,"Beyond the Basics:"),h()(),p(100,"ul")(101,"li")(102,"strong"),_(103,"Search bar with autocomplete:"),h(),_(104," Effortlessly find what you're looking for with our "),p(105,"strong"),_(106,"intelligent search bar"),h(),_(107," that suggests relevant results as you type. "),h(),p(108,"li")(109,"strong"),_(110,"Customizable settings:"),h(),_(111," Tailor your experience with "),p(112,"strong"),_(113,"customizable settings"),h(),_(114," like language and preferred content. "),h()(),p(115,"p")(116,"strong"),_(117,"Experience the Difference:"),h()(),p(118,"p")(119,"strong")(120,"a",1),_(121,"ShowbizHub"),h()(),_(122," is not just an app, it's a portal to a world of entertainment, meticulously crafted by a "),p(123,"strong"),_(124,"talented frontend developer"),h(),_(125," ("),p(126,"strong")(127,"a",2),_(128,"Shahzad Ameer"),h()(),_(129,") with a passion for user experience. Visit today and "),p(130,"strong"),_(131,"explore, discover, and immerse yourself!"),h()()()())},dependencies:[li,Ve,et,$],styles:["strong[_ngcontent-%COMP%]{color:var(--primary-color)}"]});let i=t;return i})();var zE=[{path:"login",component:QS},{path:"signup",component:LE},{path:"home",component:N2},{path:"about",component:BE},{path:"favorites",component:NE,canActivate:[jy]},{path:"",redirectTo:"/home",pathMatch:"full"},{path:"movies",component:I2},{path:"movies/:id",component:V2},{path:"tvshows",component:B2},{path:"tvshows/:id",component:U2},{path:"celebrities",component:j2},{path:"celebrities/:id",component:$2},{path:"discover",component:wE},{path:"settings",component:FE,canActivate:[jy]},{path:"trending",component:SE,children:[{path:"",component:EE},{path:"movies",component:OE},{path:"tvshows",component:ME},{path:"celebrities",component:kE}]},{path:"search",component:VE,children:[{path:":query",component:RE},{path:"movies/:query",component:PE},{path:"tvshows/:query",component:DE},{path:"celebrities/:query",component:AE}]},{path:"**",component:TE}];function Hy(i,t){let e=!t?.manualCleanup;e&&!t?.injector&&c1(Hy);let n=e?t?.injector?.get(Nm)??ae(Nm):null,r;t?.requireSync?r=st({kind:0}):r=st({kind:1,value:t?.initialValue});let o=i.subscribe({next:s=>r.set({kind:1,value:s}),error:s=>{if(t?.rejectErrors)throw s;r.set({kind:2,error:s})}});return n?.onDestroy(o.unsubscribe.bind(o)),yi(()=>{let s=r();switch(s.kind){case 1:return s.value;case 2:throw s.error;case 0:throw new wt(601,"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}})}var qy={};function Xa(i,t){if(qy[i]=(qy[i]||0)+1,typeof t=="function")return Gy(i,(...n)=>pe(F({},t(...n)),{type:i}));switch(t?t._as:"empty"){case"empty":return Gy(i,()=>({type:i}));case"props":return Gy(i,n=>pe(F({},n),{type:i}));default:throw new Error("Unexpected config.")}}function Gy(i,t){return Object.defineProperty(t,"type",{value:i,writable:!1})}var XE="@ngrx/store/init",Ja=(()=>{let t=class t extends Fi{constructor(){super({type:XE})}next(n){if(typeof n=="function")throw new TypeError(` Dispatch expected an object, instead it received a function. If you're using the createAction function, make sure to invoke the function - before dispatching the action. For example, someAction should be someAction().`);if(typeof n>"u")throw new TypeError("Actions must be objects");if(typeof n.type>"u")throw new TypeError("Actions must have a type property");super.next(n)}complete(){}ngOnDestroy(){super.complete()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),wK=[Ja],JE=new le("@ngrx/store Internal Root Guard"),UE=new le("@ngrx/store Internal Initial State"),Zy=new le("@ngrx/store Initial State"),eO=new le("@ngrx/store Reducer Factory"),jE=new le("@ngrx/store Internal Reducer Factory Provider"),tO=new le("@ngrx/store Initial Reducers"),$y=new le("@ngrx/store Internal Initial Reducers"),Fve=new le("@ngrx/store Store Features"),HE=new le("@ngrx/store Internal Store Reducers"),Nve=new le("@ngrx/store Internal Feature Reducers"),Bve=new le("@ngrx/store Internal Feature Configs"),zve=new le("@ngrx/store Internal Store Features"),Uve=new le("@ngrx/store Internal Feature Reducers Token"),jve=new le("@ngrx/store Feature Reducers"),GE=new le("@ngrx/store User Provided Meta Reducers"),am=new le("@ngrx/store Meta Reducers"),$E=new le("@ngrx/store Internal Resolved Meta Reducers"),qE=new le("@ngrx/store User Runtime Checks Config"),WE=new le("@ngrx/store Internal User Runtime Checks Config"),yd=new le("@ngrx/store Internal Runtime Checks"),iO=new le("@ngrx/store Check if Action types are unique"),lm=new le("@ngrx/store Root Store Provider"),nO=new le("@ngrx/store Feature State Provider");function TK(i,t={}){let e=Object.keys(i),n={};for(let o=0;oe!==t).reduce((e,n)=>Object.assign(e,{[n]:i[n]}),{})}function rO(...i){return function(t){if(i.length===0)return t;let e=i[i.length-1];return i.slice(0,-1).reduceRight((r,o)=>o(r),e(t))}}function oO(i,t){return Array.isArray(t)&&t.length>0&&(i=rO.apply(null,[...t,i])),(e,n)=>{let r=i(e);return(o,s)=>(o=o===void 0?n:o,r(o,s))}}function SK(i){let t=Array.isArray(i)&&i.length>0?rO(...i):e=>e;return(e,n)=>(e=t(e),(r,o)=>(r=r===void 0?n:r,e(r,o)))}var bd=class extends Li{},cm=class extends Ja{},EK="@ngrx/store/update-reducers",Wy=(()=>{let t=class t extends Fi{get currentReducers(){return this.reducers}constructor(n,r,o,s){super(s(o,r)),this.dispatcher=n,this.initialState=r,this.reducers=o,this.reducerFactory=s}addFeature(n){this.addFeatures([n])}addFeatures(n){let r=n.reduce((o,{reducers:s,reducerFactory:a,metaReducers:c,initialState:u,key:f})=>{let v=typeof s=="function"?SK(c)(s,u):oO(a,c)(s,u);return o[f]=v,o},{});this.addReducers(r)}removeFeature(n){this.removeFeatures([n])}removeFeatures(n){this.removeReducers(n.map(r=>r.key))}addReducer(n,r){this.addReducers({[n]:r})}addReducers(n){this.reducers=F(F({},this.reducers),n),this.updateReducers(Object.keys(n))}removeReducer(n){this.removeReducers([n])}removeReducers(n){n.forEach(r=>{this.reducers=xK(this.reducers,r)}),this.updateReducers(n)}updateReducers(n){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:EK,features:n})}ngOnDestroy(){this.complete()}};t.\u0275fac=function(r){return new(r||t)(J(cm),J(Zy),J(tO),J(eO))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),OK=[Wy,{provide:bd,useExisting:Wy},{provide:cm,useExisting:Ja}],um=(()=>{let t=class t extends Gt{ngOnDestroy(){this.complete()}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),MK=[um],dm=class extends Li{},KE=(()=>{let t=class t extends Fi{constructor(n,r,o,s){super(s);let c=n.pipe(dl(Dd)).pipe(i1(r)),u={state:s},f=c.pipe(Vd(kK,u));this.stateSubscription=f.subscribe(({state:v,action:b})=>{this.next(v),o.next(b)}),this.state=Hy(this,{manualCleanup:!0,requireSync:!0})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}};t.INIT=XE,t.\u0275fac=function(r){return new(r||t)(J(Ja),J(bd),J(um),J(Zy))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function kK(i={state:void 0},[t,e]){let{state:n}=i;return{state:e(n,t),action:t}}var AK=[KE,{provide:dm,useExisting:KE}],Zr=(()=>{let t=class t extends Li{constructor(n,r,o){super(),this.actionsObserver=r,this.reducerManager=o,this.source=n,this.state=n.state}select(n,...r){return PK.call(null,n,...r)(this)}selectSignal(n,r){return yi(()=>n(this.state()),r)}lift(n){let r=new t(this,this.actionsObserver,this.reducerManager);return r.operator=n,r}dispatch(n){this.actionsObserver.next(n)}next(n){this.actionsObserver.next(n)}error(n){this.actionsObserver.error(n)}complete(){this.actionsObserver.complete()}addReducer(n,r){this.reducerManager.addReducer(n,r)}removeReducer(n){this.reducerManager.removeReducer(n)}};t.\u0275fac=function(r){return new(r||t)(J(dm),J(Ja),J(Wy))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),DK=[Zr];function PK(i,t,...e){return function(r){let o;if(typeof i=="string"){let s=[t,...e].filter(Boolean);o=r.pipe(Xb(i,...s))}else if(typeof i=="function")o=r.pipe(Re(s=>i(s,t)));else throw new TypeError(`Unexpected type '${typeof i}' in select operator, expected 'string' or 'function'`);return o.pipe(Kb())}}var Xy="https://ngrx.io/guide/store/configuration/runtime-checks";function QE(i){return i===void 0}function YE(i){return i===null}function sO(i){return Array.isArray(i)}function RK(i){return typeof i=="string"}function VK(i){return typeof i=="boolean"}function LK(i){return typeof i=="number"}function aO(i){return typeof i=="object"&&i!==null}function FK(i){return aO(i)&&!sO(i)}function NK(i){if(!FK(i))return!1;let t=Object.getPrototypeOf(i);return t===Object.prototype||t===null}function Ky(i){return typeof i=="function"}function BK(i){return Ky(i)&&i.hasOwnProperty("\u0275cmp")}function zK(i,t){return Object.prototype.hasOwnProperty.call(i,t)}function UK(i){return i instanceof le?ae(i):i}function jK(i){return typeof i=="function"?i():i}function HK(i,t){return i.concat(t)}function GK(){if(ae(Zr,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function $K(i,t){return function(e,n){let r=t.action(n)?Qy(n):n,o=i(e,r);return t.state()?Qy(o):o}}function Qy(i){Object.freeze(i);let t=Ky(i);return Object.getOwnPropertyNames(i).forEach(e=>{if(!e.startsWith("\u0275")&&zK(i,e)&&(!t||e!=="caller"&&e!=="callee"&&e!=="arguments")){let n=i[e];(aO(n)||Ky(n))&&!Object.isFrozen(n)&&Qy(n)}}),i}function qK(i,t){return function(e,n){if(t.action(n)){let o=Yy(n);ZE(o,"action")}let r=i(e,n);if(t.state()){let o=Yy(r);ZE(o,"state")}return r}}function Yy(i,t=[]){return(QE(i)||YE(i))&&t.length===0?{path:["root"],value:i}:Object.keys(i).reduce((n,r)=>{if(n)return n;let o=i[r];return BK(o)?n:QE(o)||YE(o)||LK(o)||VK(o)||RK(o)||sO(o)?!1:NK(o)?Yy(o,[...t,r]):{path:[...t,r],value:o}},!1)}function ZE(i,t){if(i===!1)return;let e=i.path.join("."),n=new Error(`Detected unserializable ${t} at "${e}". ${Xy}#strict${t}serializability`);throw n.value=i.value,n.unserializablePath=e,n}function WK(i,t){return function(e,n){if(t.action(n)&&!ge.isInAngularZone())throw new Error(`Action '${n.type}' running outside NgZone. ${Xy}#strictactionwithinngzone`);return i(e,n)}}function KK(i){return qd()?F({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},i):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function QK({strictActionSerializability:i,strictStateSerializability:t}){return e=>i||t?qK(e,{action:n=>i&&!Jy(n),state:()=>t}):e}function YK({strictActionImmutability:i,strictStateImmutability:t}){return e=>i||t?$K(e,{action:n=>i&&!Jy(n),state:()=>t}):e}function Jy(i){return i.type.startsWith("@ngrx")}function ZK({strictActionWithinNgZone:i}){return t=>i?WK(t,{action:e=>i&&!Jy(e)}):t}function XK(i){return[{provide:WE,useValue:i},{provide:qE,useFactory:eQ,deps:[WE]},{provide:yd,deps:[qE],useFactory:KK},{provide:am,multi:!0,deps:[yd],useFactory:YK},{provide:am,multi:!0,deps:[yd],useFactory:QK},{provide:am,multi:!0,deps:[yd],useFactory:ZK}]}function JK(){return[{provide:iO,multi:!0,deps:[yd],useFactory:tQ}]}function eQ(i){return i}function tQ(i){if(!i.strictActionTypeUniqueness)return;let t=Object.entries(qy).filter(([,e])=>e>1).map(([e])=>e);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(e=>`"${e}"`).join(", ")}. ${Xy}#strictactiontypeuniqueness`)}function iQ(i={},t={}){return[{provide:JE,useFactory:GK},{provide:UE,useValue:t.initialState},{provide:Zy,useFactory:jK,deps:[UE]},{provide:$y,useValue:i},{provide:HE,useExisting:i instanceof le?i:$y},{provide:tO,deps:[$y,[new o1(HE)]],useFactory:UK},{provide:GE,useValue:t.metaReducers?t.metaReducers:[]},{provide:$E,deps:[am,GE],useFactory:HK},{provide:jE,useValue:t.reducerFactory?t.reducerFactory:TK},{provide:eO,deps:[jE,$E],useFactory:oO},wK,OK,MK,AK,DK,XK(t.runtimeChecks),JK()]}function nQ(){ae(Ja),ae(bd),ae(um),ae(Zr),ae(JE,{optional:!0}),ae(iO,{optional:!0})}var rQ=[{provide:lm,useFactory:nQ},{provide:Ns,multi:!0,useFactory(){return()=>ae(lm)}}];function lO(i,t){return Nn([...iQ(i,t),rQ])}function pm(...i){let t=i.pop(),e=i.map(n=>n.type);return{reducer:t,types:e}}function cO(i,...t){let e=new Map;for(let n of t)for(let r of n.types){let o=e.get(r);if(o){let s=(a,c)=>n.reducer(o(a,c),c);e.set(r,s)}else e.set(r,n.reducer)}return function(n=i,r){let o=e.get(r.type);return o?o(n,r):n}}var eb="__@ngrx/effects_create__";function oQ(i){return Object.getOwnPropertyNames(i).filter(n=>i[n]&&i[n].hasOwnProperty(eb)?i[n][eb].hasOwnProperty("dispatch"):!1).map(n=>{let r=i[n][eb];return F({propertyName:n},r)})}function sQ(i){return oQ(i)}function uO(i){return Object.getPrototypeOf(i)}function aQ(i){return!!i.constructor&&i.constructor.name!=="Object"&&i.constructor.name!=="Function"}function pO(i){return typeof i=="function"}function lQ(i){return i.filter(pO)}function cQ(i,t,e){let n=uO(i),o=!!n&&n.constructor.name!=="Object"?n.constructor.name:null,s=sQ(i).map(({propertyName:a,dispatch:c,useEffectsErrorHandler:u})=>{let f=typeof i[a]=="function"?i[a]():i[a],v=u?e(f,t):f;return c===!1?v.pipe($b()):v.pipe(Zb()).pipe(Re(O=>({effect:i[a],notification:O,propertyName:a,sourceName:o,sourceInstance:i})))});return Am(...s)}var dQ=10;function hO(i,t,e=dQ){return i.pipe(cn(n=>(t&&t.handleError(n),e<=1?i:hO(i,t,e-1))))}var eye=new le("@ngrx/effects Internal Root Guard"),tye=new le("@ngrx/effects User Provided Effects"),iye=new le("@ngrx/effects Internal Root Effects"),nye=new le("@ngrx/effects Internal Root Effects Instances"),rye=new le("@ngrx/effects Internal Feature Effects"),oye=new le("@ngrx/effects Internal Feature Effects Instance Groups"),uQ=new le("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>hO}),pQ="@ngrx/effects/init",hQ=Xa(pQ);function mQ(i,t){if(i.notification.kind==="N"){let e=i.notification.value;!fQ(e)&&t.handleError(new Error(`Effect ${gQ(i)} dispatched an invalid action: ${_Q(e)}`))}}function fQ(i){return typeof i!="function"&&i&&i.type&&typeof i.type=="string"}function gQ({propertyName:i,sourceInstance:t,sourceName:e}){let n=typeof t[i]=="function";return!!e?`"${e}.${String(i)}${n?"()":""}"`:`"${String(i)}()"`}function _Q(i){try{return JSON.stringify(i)}catch{return i}}var vQ="ngrxOnIdentifyEffects";function yQ(i){return tb(i,vQ)}var bQ="ngrxOnRunEffects";function CQ(i){return tb(i,bQ)}var IQ="ngrxOnInitEffects";function wQ(i){return tb(i,IQ)}function tb(i,t){return i&&t in i&&typeof i[t]=="function"}var mO=(()=>{let t=class t extends Gt{constructor(n,r){super(),this.errorHandler=n,this.effectsErrorHandler=r}addEffects(n){this.next(n)}toActions(){return this.pipe(Pm(n=>aQ(n)?uO(n):n),vi(n=>n.pipe(Pm(TQ))),vi(n=>{let r=n.pipe(Qb(s=>xQ(this.errorHandler,this.effectsErrorHandler)(s)),Re(s=>(mQ(s,this.errorHandler),s.notification)),Ni(s=>s.kind==="N"&&s.value!=null),Wb()),o=n.pipe(dn(1),Ni(wQ),Re(s=>s.ngrxOnInitEffects()));return Am(r,o)}))}};t.\u0275fac=function(r){return new(r||t)(J(gl),J(uQ))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function TQ(i){return yQ(i)?i.ngrxOnIdentifyEffects():""}function xQ(i,t){return e=>{let n=cQ(e,i,t);return CQ(e)?e.ngrxOnRunEffects(n):n}}var SQ=(()=>{let t=class t{get isStarted(){return!!this.effectsSubscription}constructor(n,r){this.effectSources=n,this.store=r,this.effectsSubscription=null}start(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))}ngOnDestroy(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)}};t.\u0275fac=function(r){return new(r||t)(J(mO),J(Zr))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function fO(...i){let t=i.flat(),e=lQ(t);return Nn([e,{provide:Ns,multi:!0,useValue:()=>{ae(lm),ae(nO,{optional:!0});let n=ae(SQ),r=ae(mO),o=!n.isStarted;o&&n.start();for(let s of t){let a=pO(s)?ae(s):s;r.addEffects(a)}o&&ae(Zr).dispatch(hQ())}}])}var gO=Xa("[Counter Component] Increament"),_O=Xa("[Counter Component] Decreament"),vO=Xa("[Counter Component] Reset");var EQ=3333,yO=cO(EQ,pm(gO,i=>i+1),pm(_O,i=>i-1),pm(vO,i=>0));var bO={counter:yO},CO=qd()?[]:[];var OQ=(()=>{let t=class t extends Zd{constructor(n,r,o){super(n,r,o,ae(Nd,{optional:!0}))}ngOnDestroy(){this.flush()}};t.\u0275fac=function(r){return new(r||t)(J(Oe),J(Il),J(Yd))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function MQ(){return new N1}function kQ(i,t,e){return new z1(i,t,e)}var IO=[{provide:Yd,useFactory:MQ},{provide:Zd,useClass:OQ},{provide:js,useFactory:kQ,deps:[Ws,Zd,ge]}],AQ=[{provide:Il,useFactory:()=>new B1},{provide:Bs,useValue:"BrowserAnimations"},...IO],xye=[{provide:Il,useClass:F1},{provide:Bs,useValue:"NoopAnimations"},...IO];function wO(){return[...AQ]}var MO="firebasestorage.googleapis.com",DQ="storageBucket",PQ=2*60*1e3,RQ=10*60*1e3;var Er=class i extends Zi{constructor(t,e,n=0){super(ib(t),`Firebase Storage: ${e} (${ib(t)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,i.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return ib(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage} -${this.customData.serverResponse}`:this.message=this._baseMessage}},Jr=function(i){return i.UNKNOWN="unknown",i.OBJECT_NOT_FOUND="object-not-found",i.BUCKET_NOT_FOUND="bucket-not-found",i.PROJECT_NOT_FOUND="project-not-found",i.QUOTA_EXCEEDED="quota-exceeded",i.UNAUTHENTICATED="unauthenticated",i.UNAUTHORIZED="unauthorized",i.UNAUTHORIZED_APP="unauthorized-app",i.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",i.INVALID_CHECKSUM="invalid-checksum",i.CANCELED="canceled",i.INVALID_EVENT_NAME="invalid-event-name",i.INVALID_URL="invalid-url",i.INVALID_DEFAULT_BUCKET="invalid-default-bucket",i.NO_DEFAULT_BUCKET="no-default-bucket",i.CANNOT_SLICE_BLOB="cannot-slice-blob",i.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",i.NO_DOWNLOAD_URL="no-download-url",i.INVALID_ARGUMENT="invalid-argument",i.INVALID_ARGUMENT_COUNT="invalid-argument-count",i.APP_DELETED="app-deleted",i.INVALID_ROOT_OPERATION="invalid-root-operation",i.INVALID_FORMAT="invalid-format",i.INTERNAL_ERROR="internal-error",i.UNSUPPORTED_ENVIRONMENT="unsupported-environment",i}(Jr||{});function ib(i){return"storage/"+i}function VQ(){let i="An unknown error occurred, please check the error payload for server response.";return new Er(Jr.UNKNOWN,i)}function LQ(){return new Er(Jr.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function FQ(){return new Er(Jr.CANCELED,"User canceled the upload/download.")}function NQ(i){return new Er(Jr.INVALID_URL,"Invalid URL '"+i+"'.")}function BQ(i){return new Er(Jr.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.")}function TO(i){return new Er(Jr.INVALID_ARGUMENT,i)}function kO(){return new Er(Jr.APP_DELETED,"The Firebase app was deleted.")}function zQ(i){return new Er(Jr.INVALID_ROOT_OPERATION,"The operation '"+i+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}var Xr=class i{constructor(t,e){this.bucket=t,this.path_=e}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){let t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,e){let n;try{n=i.makeFromUrl(t,e)}catch{return new i(t,"")}if(n.path==="")return n;throw BQ(t)}static makeFromUrl(t,e){let n=null,r="([A-Za-z0-9.\\-_]+)";function o(me){me.path.charAt(me.path.length-1)==="/"&&(me.path_=me.path_.slice(0,-1))}let s="(/(.*))?$",a=new RegExp("^gs://"+r+s,"i"),c={bucket:1,path:3};function u(me){me.path_=decodeURIComponent(me.path)}let f="v[A-Za-z0-9_]+",v=e.replace(/[.]/g,"\\."),b="(/([^?#]*).*)?$",O=new RegExp(`^https?://${v}/${f}/b/${r}/o${b}`,"i"),V={bucket:1,path:3},K=e===MO?"(?:storage.googleapis.com|storage.cloud.google.com)":e,P="([^?#]*)",j=new RegExp(`^https?://${K}/${r}/${P}`,"i"),_e=[{regex:a,indices:c,postModify:o},{regex:O,indices:V,postModify:u},{regex:j,indices:{bucket:1,path:2},postModify:u}];for(let me=0;me<_e.length;me++){let qe=_e[me],Ge=qe.regex.exec(t);if(Ge){let Et=Ge[qe.indices.bucket],ht=Ge[qe.indices.path];ht||(ht=""),n=new i(Et,ht),qe.postModify(n);break}}if(n==null)throw NQ(t);return n}},nb=class{constructor(t){this.promise_=Promise.reject(t)}getPromise(){return this.promise_}cancel(t=!1){}};function UQ(i,t,e){let n=1,r=null,o=null,s=!1,a=0;function c(){return a===2}let u=!1;function f(...P){u||(u=!0,t.apply(null,P))}function v(P){r=setTimeout(()=>{r=null,i(O,c())},P)}function b(){o&&clearTimeout(o)}function O(P,...j){if(u){b();return}if(P){b(),f.call(null,P,...j);return}if(c()||s){b(),f.call(null,P,...j);return}n<64&&(n*=2);let _e;a===1?(a=2,_e=0):_e=(n+Math.random())*1e3,v(_e)}let V=!1;function K(P){V||(V=!0,b(),!u&&(r!==null?(P||(a=2),clearTimeout(r),v(0)):P||(a=1)))}return v(0),o=setTimeout(()=>{s=!0,K(!0)},e),K}function jQ(i){i(!1)}function HQ(i){return i!==void 0}function xO(i,t,e,n){if(ne)throw TO(`Invalid value for '${i}'. Expected ${e} or less.`)}function GQ(i){let t=encodeURIComponent,e="?";for(let n in i)if(i.hasOwnProperty(n)){let r=t(n)+"="+t(i[n]);e=e+r+"&"}return e=e.slice(0,-1),e}var rb=function(i){return i[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT",i}(rb||{});function $Q(i,t){let e=i>=500&&i<600,r=[408,429].indexOf(i)!==-1,o=t.indexOf(i)!==-1;return e||r||o}var ob=class{constructor(t,e,n,r,o,s,a,c,u,f,v,b=!0){this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=o,this.additionalRetryCodes_=s,this.callback_=a,this.errorCallback_=c,this.timeout_=u,this.progressCallback_=f,this.connectionFactory_=v,this.retry=b,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((O,V)=>{this.resolve_=O,this.reject_=V,this.start_()})}start_(){let t=(n,r)=>{if(r){n(!1,new el(!1,null,!0));return}let o=this.connectionFactory_();this.pendingConnection_=o;let s=a=>{let c=a.loaded,u=a.lengthComputable?a.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,u)};this.progressCallback_!==null&&o.addUploadProgressListener(s),o.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&o.removeUploadProgressListener(s),this.pendingConnection_=null;let a=o.getErrorCode()===rb.NO_ERROR,c=o.getStatus();if(!a||$Q(c,this.additionalRetryCodes_)&&this.retry){let f=o.getErrorCode()===rb.ABORT;n(!1,new el(!1,null,f));return}let u=this.successCodes_.indexOf(c)!==-1;n(!0,new el(u,o))})},e=(n,r)=>{let o=this.resolve_,s=this.reject_,a=r.connection;if(r.wasSuccessCode)try{let c=this.callback_(a,a.getResponse());HQ(c)?o(c):o()}catch(c){s(c)}else if(a!==null){let c=VQ();c.serverResponse=a.getErrorText(),this.errorCallback_?s(this.errorCallback_(a,c)):s(c)}else if(r.canceled){let c=this.appDelete_?kO():FQ();s(c)}else{let c=LQ();s(c)}};this.canceled_?e(!1,new el(!1,null,!0)):this.backoffId_=UQ(t,e,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&jQ(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}},el=class{constructor(t,e,n){this.wasSuccessCode=t,this.connection=e,this.canceled=!!n}};function qQ(i,t){t!==null&&t.length>0&&(i.Authorization="Firebase "+t)}function WQ(i,t){i["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function KQ(i,t){t&&(i["X-Firebase-GMPID"]=t)}function QQ(i,t){t!==null&&(i["X-Firebase-AppCheck"]=t)}function YQ(i,t,e,n,r,o,s=!0){let a=GQ(i.urlParams),c=i.url+a,u=Object.assign({},i.headers);return KQ(u,t),qQ(u,e),WQ(u,o),QQ(u,n),new ob(c,i.method,u,i.body,i.successCodes,i.additionalRetryCodes,i.handler,i.errorHandler,i.timeout,i.progressCallback,r,s)}function ZQ(i){if(i.length===0)return null;let t=i.lastIndexOf("/");return t===-1?"":i.slice(0,t)}function XQ(i){let t=i.lastIndexOf("/",i.length-2);return t===-1?i:i.slice(t+1)}var kye=256*1024;var sb=class i{constructor(t,e){this._service=t,e instanceof Xr?this._location=e:this._location=Xr.makeFromUrl(e,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,e){return new i(t,e)}get root(){let t=new Xr(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return XQ(this._location.path)}get storage(){return this._service}get parent(){let t=ZQ(this._location.path);if(t===null)return null;let e=new Xr(this._location.bucket,t);return new i(this._service,e)}_throwIfRoot(t){if(this._location.path==="")throw zQ(t)}};function SO(i,t){let e=t?.[DQ];return e==null?null:Xr.makeFromBucketSpec(e,i)}function JQ(i,t,e,n={}){i.host=`${t}:${e}`,i._protocol="http";let{mockUserToken:r}=n;r&&(i._overrideAuthToken=typeof r=="string"?r:$u(r,i.app.options.projectId))}var ab=class{constructor(t,e,n,r,o){this.app=t,this._authProvider=e,this._appCheckProvider=n,this._url=r,this._firebaseVersion=o,this._bucket=null,this._host=MO,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=PQ,this._maxUploadRetryTime=RQ,this._requests=new Set,r!=null?this._bucket=Xr.makeFromBucketSpec(r,this._host):this._bucket=SO(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,this._url!=null?this._bucket=Xr.makeFromBucketSpec(this._url,t):this._bucket=SO(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){xO("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){xO("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}_getAuthToken(){return D(this,null,function*(){if(this._overrideAuthToken)return this._overrideAuthToken;let t=this._authProvider.getImmediate({optional:!0});if(t){let e=yield t.getToken();if(e!==null)return e.accessToken}return null})}_getAppCheckToken(){return D(this,null,function*(){let t=this._appCheckProvider.getImmediate({optional:!0});return t?(yield t.getToken()).token:null})}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new sb(this,t)}_makeRequest(t,e,n,r,o=!0){if(this._deleted)return new nb(kO());{let s=YQ(t,this._appId,n,r,e,this._firebaseVersion,o);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}makeRequestWithTokens(t,e){return D(this,null,function*(){let[n,r]=yield Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,e,n,r).getPromise()})}},EO="@firebase/storage",OO="0.12.1";var AO="storage";function DO(i=Co(),t){i=Ai(i);let n=os(i,AO).getImmediate({identifier:t}),r=Gu("storage");return r&&PO(n,...r),n}function PO(i,t,e,n={}){JQ(i,t,e,n)}function eY(i,{instanceIdentifier:t}){let e=i.getProvider("app").getImmediate(),n=i.getProvider("auth-internal"),r=i.getProvider("app-check-internal");return new ab(e,n,r,t,dr)}function tY(){cr(new ln(AO,eY,"PUBLIC").setMultipleInstances(!0)),Wt(EO,OO,""),Wt(EO,OO,"esm2017")}tY();var Cd=class{constructor(t){return t}},RO="storage",lb=class{constructor(){return Ss(RO)}};var cb=new le("angularfire2.storage-instances");function iY(i,t){let e=Va(RO,i,t);return e&&new Cd(e)}function nY(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new Cd(n)}}var rY={provide:lb,deps:[[new hi,cb]]},oY={provide:Cd,useFactory:iY,deps:[[new hi,cb],$n]},sY=(()=>{class i{constructor(){Wt("angularfire",zr.full,"gcs")}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[oY,rY]})}return i})();function VO(i,...t){return{ngModule:sY,providers:[{provide:cb,useFactory:nY(i),multi:!0,deps:[ge,Mi,ko,Ur,[new hi,ks],[new hi,Mo],...t]}]}}var LO=Gn(DO,!0);var aY="@",db=class{constructor(t,e,n,r,o){this.doc=t,this.delegate=e,this.zone=n,this.animationType=r,this.moduleImpl=o,this._rendererFactoryPromise=null,this.scheduler=ae(Nd,{optional:!0})}loadImpl(){return(this.moduleImpl??import("./chunk-ZN2MSQL7.js")).catch(e=>{throw new wt(5300,!1)}).then(({\u0275createEngine:e,\u0275AnimationRendererFactory:n})=>{let r=e(this.animationType,this.doc,this.scheduler),o=new n(this.delegate,r,this.zone);return this.delegate=o,o})}createRenderer(t,e){let n=this.delegate.createRenderer(t,e);if(n.\u0275type===0)return n;typeof n.throwOnSyntheticProps=="boolean"&&(n.throwOnSyntheticProps=!1);let r=new ub(n);return e?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(o=>{let s=o.createRenderer(t,e);r.use(s)}).catch(o=>{r.use(n)}),r}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}},ub=class{constructor(t){this.delegate=t,this.replay=[],this.\u0275type=1}use(t){if(this.delegate=t,this.replay!==null){for(let e of this.replay)e(t);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}get destroyNode(){return this.delegate.destroyNode}appendChild(t,e){this.delegate.appendChild(t,e)}insertBefore(t,e,n,r){this.delegate.insertBefore(t,e,n,r)}removeChild(t,e,n){this.delegate.removeChild(t,e,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){this.shouldReplay(e)&&this.replay.push(r=>r.setProperty(t,e,n)),this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.shouldReplay(e)&&this.replay.push(r=>r.listen(t,e,n)),this.delegate.listen(t,e,n)}shouldReplay(t){return this.replay!==null&&t.startsWith(aY)}};function FO(i="animations"){return Nn([{provide:js,useFactory:(t,e,n)=>new db(t,e,n,i),deps:[Oe,Ws,ge]},{provide:Bs,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var NO={production:!1,TMDB_ACCESS_TOKEN:"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJjNmU5MzM1Yjg5Y2E3NWE3MGJjY2UxYzcyYmZkMDQ4ZCIsInN1YiI6IjYzYmVkN2FiODU4Njc4MDBmMDhjZjI3NiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.sQHes_rn51wewxY_7nZLxGssnd67J8ieiLOIo2Bg_FI",TMDB_BASE_URL:"https://api.themoviedb.org/3/",FIREBASE_API_KEY:"AIzaSyCtNek6BbEtj91x9V1h0iALz5aw0Ete6eM"};var BO={apiKey:NO.FIREBASE_API_KEY,authDomain:"showbizhub-4f1b9.firebaseapp.com",projectId:"showbizhub-4f1b9",storageBucket:"showbizhub-4f1b9.appspot.com",messagingSenderId:"601643514956",appId:"1:601643514956:web:6d83e88c0391e1bcbb08e9",measurementId:"G-3RGML3FN0P"};var zO={providers:[WC(zE),lO(bO,{metaReducers:CO}),Km(),fO(),wO(),a1([eS(()=>tS(BO)),zS(()=>US()),GS(()=>$S()),VO(()=>LO())]),FO()]};function lY(i,t){if(i&1&&(y(0,"img",1),p(1,"div",2)(2,"h6"),_(3),h(),p(4,"app-custom-tag",3),y(5,"i",4),p(6,"span"),_(7),h()()()),i&2){let e=m();l("src","http://image.tmdb.org/t/p/w342"+e.item.poster_path,Ue),d(3),z(e.item.title),d(4),z(e.item==null?null:e.item.media_type)}}function cY(i,t){if(i&1&&(y(0,"img",1),p(1,"div",2)(2,"h6"),_(3),h(),p(4,"app-custom-tag",3),y(5,"i",5),p(6,"span"),_(7),h()()()),i&2){let e=m();l("src","http://image.tmdb.org/t/p/w342"+e.item.poster_path,Ue),d(3),z(e.item.name),d(4),z(e.item==null?null:e.item.media_type)}}function dY(i,t){if(i&1&&(y(0,"img",1),p(1,"div",2)(2,"h6"),_(3),h(),p(4,"app-custom-tag",3),y(5,"i",6),p(6,"span"),_(7),h()()()),i&2){let e=m();l("src","http://image.tmdb.org/t/p/w342"+e.item.profile_path,Ue),d(3),z(e.item.name),d(4),z(e.item==null?null:e.item.media_type)}}var UO=(()=>{let t=class t{constructor(){this.item={}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-auto-complete-card"]],inputs:{item:"item"},standalone:!0,features:[R],decls:4,vars:1,consts:[[1,"auto-complete-card"],["alt","",3,"src"],[1,"details"],["size","small"],[1,"pi","pi-video"],[1,"pi","pi-play"],[1,"pi","pi-user"]],template:function(r,o){r&1&&(p(0,"div",0),g(1,lY,8,3)(2,cY,8,3)(3,dY,8,3),h()),r&2&&(d(),Je(1,(o.item==null?null:o.item.media_type)=="movie"?1:(o.item==null?null:o.item.media_type)=="tv"?2:3))},dependencies:[tm,Sr],styles:[".auto-complete-card[_ngcontent-%COMP%]{display:flex;align-items:center}.auto-complete-card[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:1rem!important;margin-bottom:0;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal;padding:0 .5rem}.auto-complete-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:32px;aspect-ratio:1/1;border-radius:50%;object-fit:cover}.auto-complete-card[_ngcontent-%COMP%] .custom-tag[_ngcontent-%COMP%]{font-size:.6rem;width:max-content}"]});let i=t;return i})();var jO=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["AngleDownIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var HO=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["AngleRightIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var GO=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["BarsIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.3226 3.6129H0.677419C0.497757 3.6129 0.325452 3.54152 0.198411 3.41448C0.0713707 3.28744 0 3.11514 0 2.93548C0 2.75581 0.0713707 2.58351 0.198411 2.45647C0.325452 2.32943 0.497757 2.25806 0.677419 2.25806H13.3226C13.5022 2.25806 13.6745 2.32943 13.8016 2.45647C13.9286 2.58351 14 2.75581 14 2.93548C14 3.11514 13.9286 3.28744 13.8016 3.41448C13.6745 3.54152 13.5022 3.6129 13.3226 3.6129ZM13.3226 7.67741H0.677419C0.497757 7.67741 0.325452 7.60604 0.198411 7.479C0.0713707 7.35196 0 7.17965 0 6.99999C0 6.82033 0.0713707 6.64802 0.198411 6.52098C0.325452 6.39394 0.497757 6.32257 0.677419 6.32257H13.3226C13.5022 6.32257 13.6745 6.39394 13.8016 6.52098C13.9286 6.64802 14 6.82033 14 6.99999C14 7.17965 13.9286 7.35196 13.8016 7.479C13.6745 7.60604 13.5022 7.67741 13.3226 7.67741ZM0.677419 11.7419H13.3226C13.5022 11.7419 13.6745 11.6706 13.8016 11.5435C13.9286 11.4165 14 11.2442 14 11.0645C14 10.8848 13.9286 10.7125 13.8016 10.5855C13.6745 10.4585 13.5022 10.3871 13.3226 10.3871H0.677419C0.497757 10.3871 0.325452 10.4585 0.198411 10.5855C0.0713707 10.7125 0 10.8848 0 11.0645C0 11.2442 0.0713707 11.4165 0.198411 11.5435C0.325452 11.6706 0.497757 11.7419 0.677419 11.7419Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var $O=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Ve,Rt,Pn,Te,GO,jO,HO,Ve,Pn,Te]})}return i})();var uY=["pMenuItemContent",""];function pY(i,t){i&1&&ie(0)}var qO=i=>({"p-disabled":i}),pb=i=>({$implicit:i});function hY(i,t){if(i&1&&(p(0,"a",5),g(1,pY,1,0,"ng-container",6),h()),i&2){let e=m(2),n=Le(4);l("target",e.item.target)("ngClass",H(10,qO,e.item.disabled)),T("title",e.item.title)("href",e.item.url||null,Ue)("data-automationid",e.item.automationId)("tabindex",-1)("data-pc-section","action")("aria-hidden",!0),d(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",H(12,pb,e.item))}}function mY(i,t){i&1&&ie(0)}var fY=()=>({exact:!1});function gY(i,t){if(i&1&&(p(0,"a",7),g(1,mY,1,0,"ng-container",6),h()),i&2){let e=m(2),n=Le(4);l("routerLink",e.item.routerLink)("queryParams",e.item.queryParams)("routerLinkActiveOptions",e.item.routerLinkActiveOptions||Ke(18,fY))("target",e.item.target)("ngClass",H(19,qO,e.item.disabled))("fragment",e.item.fragment)("queryParamsHandling",e.item.queryParamsHandling)("preserveFragment",e.item.preserveFragment)("skipLocationChange",e.item.skipLocationChange)("replaceUrl",e.item.replaceUrl)("state",e.item.state),T("data-automationid",e.item.automationId)("tabindex",-1)("data-pc-section","action")("aria-hidden",!0)("title",e.item.title),d(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",H(21,pb,e.item))}}function _Y(i,t){if(i&1&&(Z(0),g(1,hY,2,14,"a",3)(2,gY,2,23,"a",4),X()),i&2){let e=m();d(),l("ngIf",!(e.item!=null&&e.item.routerLink)),d(),l("ngIf",e.item==null?null:e.item.routerLink)}}function vY(i,t){}function yY(i,t){i&1&&g(0,vY,0,0,"ng-template")}function bY(i,t){if(i&1&&(Z(0),g(1,yY,1,0,null,6),X()),i&2){let e=m();d(),l("ngTemplateOutlet",e.itemTemplate)("ngTemplateOutletContext",H(2,pb,e.item))}}function CY(i,t){if(i&1&&y(0,"span",12),i&2){let e=m(2);U(e.item.iconClass),l("ngClass",e.item.icon)("ngStyle",e.item.iconStyle)}}function IY(i,t){if(i&1&&(p(0,"span",13),_(1),h()),i&2){let e=m(2);d(),z(e.item.label)}}function wY(i,t){if(i&1&&(y(0,"span",14),ct(1,"safeHtml")),i&2){let e=m(2);l("innerHTML",Bt(1,1,e.item.label),fl)}}function TY(i,t){if(i&1&&(p(0,"span",15),_(1),h()),i&2){let e=m(2);l("ngClass",e.item.badgeStyleClass),d(),z(e.item.badge)}}function xY(i,t){if(i&1&&g(0,CY,1,4,"span",8)(1,IY,2,1,"span",9)(2,wY,2,3,"ng-template",null,10,dt)(4,TY,2,2,"span",11),i&2){let e=Le(3),n=m();l("ngIf",n.item.icon),d(),l("ngIf",n.item.escape!==!1)("ngIfElse",e),d(3),l("ngIf",n.item.badge)}}var SY=["list"],EY=["container"];function OY(i,t){i&1&&ie(0)}function MY(i,t){if(i&1&&(p(0,"div",8),g(1,OY,1,0,"ng-container",9),h()),i&2){let e=m(2);T("data-pc-section","start"),d(),l("ngTemplateOutlet",e.startTemplate)}}var hb=i=>({"p-hidden":i});function kY(i,t){if(i&1&&y(0,"li",13),i&2){let e=m().$implicit;l("ngClass",H(1,hb,e.visible===!1))}}function AY(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit;d(),z(e.label)}}function DY(i,t){if(i&1&&(y(0,"span",17),ct(1,"safeHtml")),i&2){let e=m(2).$implicit;l("innerHTML",Bt(1,1,e.label),fl)}}var PY=(i,t)=>({"p-hidden":i,flex:t});function RY(i,t){if(i&1&&(p(0,"li",14),g(1,AY,2,1,"span",15)(2,DY,2,3,"ng-template",null,16,dt),h()),i&2){let e=Le(3),n=m(),r=n.$implicit,o=n.index,s=m(3);l("ngClass",We(6,PY,r.visible===!1,r.visible))("tooltipOptions",r.tooltipOptions),T("data-automationid",r.automationId)("id",s.menuitemId(r,s.id,o)),d(),l("ngIf",r.escape!==!1)("ngIfElse",e)}}function VY(i,t){if(i&1&&y(0,"li",13),i&2){let e=m().$implicit,n=m().$implicit;l("ngClass",H(1,hb,e.visible===!1||n.visible===!1))}}var WO=(i,t,e)=>({"p-hidden":i,"p-focus":t,"p-disabled":e});function LY(i,t){if(i&1){let e=G();p(0,"li",19),A("onMenuItemClick",function(r){S(e);let o=m(),s=o.$implicit,a=o.index,c=m().index,u=m(3);return E(u.itemClick(r,u.menuitemId(s,u.id,c,a)))}),h()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m(),s=o.$implicit,a=o.index,c=m(3);U(n.styleClass),l("pMenuItemContent",n)("itemTemplate",c.itemTemplate)("ngClass",kt(13,WO,n.visible===!1||s.visible===!1,c.focusedOptionId()&&c.menuitemId(n,c.id,a,r)===c.focusedOptionId(),c.disabled(n.disabled)))("ngStyle",n.style)("tooltipOptions",n.tooltipOptions),T("data-pc-section","menuitem")("aria-label",c.label(n.label))("data-p-focused",c.isItemFocused(c.menuitemId(n,c.id,a,r)))("data-p-disabled",c.disabled(n.disabled))("aria-disabled",c.disabled(n.disabled))("id",c.menuitemId(n,c.id,a,r))}}function FY(i,t){if(i&1&&g(0,VY,1,3,"li",11)(1,LY,1,17,"li",18),i&2){let e=t.$implicit;l("ngIf",e.separator),d(),l("ngIf",!e.separator)}}function NY(i,t){if(i&1&&g(0,kY,1,3,"li",11)(1,RY,4,9,"li",12)(2,FY,2,2,"ng-template",10),i&2){let e=t.$implicit;l("ngIf",e.separator),d(),l("ngIf",!e.separator),d(),l("ngForOf",e.items)}}function BY(i,t){if(i&1&&g(0,NY,3,3,"ng-template",10),i&2){let e=m(2);l("ngForOf",e.model)}}function zY(i,t){if(i&1&&y(0,"li",13),i&2){let e=m().$implicit;l("ngClass",H(1,hb,e.visible===!1))}}function UY(i,t){if(i&1){let e=G();p(0,"li",19),A("onMenuItemClick",function(r){S(e);let o=m(),s=o.$implicit,a=o.index,c=m(3);return E(c.itemClick(r,c.menuitemId(s,c.id,a)))}),h()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m(3);U(n.styleClass),l("pMenuItemContent",n)("itemTemplate",o.itemTemplate)("ngClass",kt(13,WO,n.visible===!1,o.focusedOptionId()&&o.menuitemId(n,o.id,r,o.j)===o.focusedOptionId(),o.disabled(n.disabled)))("ngStyle",n.style)("tooltipOptions",n.tooltipOptions),T("data-pc-section","menuitem")("aria-label",o.label(n.label))("data-p-focused",o.isItemFocused(o.menuitemId(n,o.id,r)))("data-p-disabled",o.disabled(n.disabled))("aria-disabled",o.disabled(n.disabled))("id",o.menuitemId(n,o.id,r))}}function jY(i,t){if(i&1&&g(0,zY,1,3,"li",11)(1,UY,1,17,"li",18),i&2){let e=t.$implicit;l("ngIf",e.separator),d(),l("ngIf",!e.separator)}}function HY(i,t){if(i&1&&g(0,jY,2,2,"ng-template",10),i&2){let e=m(2);l("ngForOf",e.model)}}function GY(i,t){i&1&&ie(0)}function $Y(i,t){if(i&1&&(p(0,"div",20),g(1,GY,1,0,"ng-container",9),h()),i&2){let e=m(2);T("data-pc-section","end"),d(),l("ngTemplateOutlet",e.endTemplate)}}var qY=i=>({"p-menu p-component":!0,"p-menu-overlay":i}),WY=(i,t)=>({showTransitionParams:i,hideTransitionParams:t}),KY=i=>({value:"visible",params:i});function QY(i,t){if(i&1){let e=G();p(0,"div",1,2),A("click",function(r){S(e);let o=m();return E(o.onOverlayClick(r))})("@overlayAnimation.start",function(r){S(e);let o=m();return E(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){S(e);let o=m();return E(o.onOverlayAnimationEnd(r))}),g(2,MY,2,2,"div",3),p(3,"ul",4,5),A("focus",function(r){S(e);let o=m();return E(o.onListFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onListBlur(r))})("keydown",function(r){S(e);let o=m();return E(o.onListKeyDown(r))}),g(5,BY,1,1,null,6)(6,HY,1,1,null,6),h(),g(7,$Y,2,2,"div",7),h()}if(i&2){let e=m();U(e.styleClass),l("ngClass",H(18,qY,e.popup))("ngStyle",e.style)("@overlayAnimation",H(23,KY,We(20,WY,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.popup!==!0),T("data-pc-name","menu")("id",e.id),d(2),l("ngIf",e.startTemplate),d(),T("id",e.id+"_list")("tabindex",e.getTabIndexValue())("data-pc-section","menu")("aria-activedescendant",e.activedescendant())("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),d(2),l("ngIf",e.hasSubMenu()),d(),l("ngIf",!e.hasSubMenu()),d(),l("ngIf",e.endTemplate)}}var KO=(()=>{class i{platformId;sanitizer;constructor(e,n){this.platformId=e,this.sanitizer=n}transform(e){return!e||!ut(this.platformId)?e:this.sanitizer.bypassSecurityTrustHtml(e)}static \u0275fac=function(n){return new(n||i)(w(vt,16),w(rf,16))};static \u0275pipe=Tn({name:"safeHtml",type:i,pure:!0})}return i})(),YY=(()=>{class i{item;itemTemplate;onMenuItemClick=new L;menu;constructor(e){this.menu=e}onItemClick(e,n){this.onMenuItemClick.emit({originalEvent:e,item:n})}static \u0275fac=function(n){return new(n||i)(w(Tt(()=>mb)))};static \u0275cmp=k({type:i,selectors:[["","pMenuItemContent",""]],hostAttrs:[1,"p-element"],inputs:{item:[$t.None,"pMenuItemContent","item"],itemTemplate:"itemTemplate"},outputs:{onMenuItemClick:"onMenuItemClick"},attrs:uY,decls:5,vars:3,consts:[[1,"p-menuitem-content",3,"click"],[4,"ngIf"],["itemContent",""],["class","p-menuitem-link","pRipple","",3,"target","ngClass",4,"ngIf"],["routerLinkActive","p-menuitem-link-active","class","p-menuitem-link","pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",1,"p-menuitem-link",3,"target","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["routerLinkActive","p-menuitem-link-active","pRipple","",1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],["class","p-menuitem-icon",3,"ngClass","class","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlLabel",""],["class","p-menuitem-badge",3,"ngClass",4,"ngIf"],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],[1,"p-menuitem-badge",3,"ngClass"]],template:function(n,r){n&1&&(p(0,"div",0),A("click",function(s){return r.onItemClick(s,r.item)}),g(1,_Y,3,2,"ng-container",1)(2,bY,2,4,"ng-container",1)(3,xY,5,4,"ng-template",null,2,dt),h()),n&2&&(T("data-pc-section","content"),d(),l("ngIf",!r.itemTemplate),d(),l("ngIf",r.itemTemplate))},dependencies:[xe,Ie,rt,Ce,et,xu,ui,KO],encapsulation:2})}return i})(),mb=(()=>{class i{document;platformId;el;renderer;cd;config;overlayService;model;popup;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";ariaLabel;ariaLabelledBy;id;tabindex=0;onShow=new L;onHide=new L;onBlur=new L;onFocus=new L;listViewChild;containerViewChild;templates;startTemplate;endTemplate;itemTemplate;container;scrollHandler;documentClickListener;documentResizeListener;preventDocumentDefault;target;visible;focusedOptionId=yi(()=>this.focusedOptionIndex()!==-1?this.focusedOptionIndex():null);focusedOptionIndex=st(-1);selectedOptionIndex=st(-1);focused=!1;overlayVisible=!1;relativeAlign;constructor(e,n,r,o,s,a,c){this.document=e,this.platformId=n,this.el=r,this.renderer=o,this.cd=s,this.config=a,this.overlayService=c,this.id=this.id||Me()}toggle(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0}show(e){this.target=e.currentTarget,this.relativeAlign=e.relativeAlign,this.visible=!0,this.preventDocumentDefault=!0,this.overlayVisible=!0,this.cd.markForCheck()}ngOnInit(){this.popup||this.bindDocumentClickListener()}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"start":this.startTemplate=e.template;break;case"end":this.endTemplate=e.template;break;case"itemTemplate":this.itemTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}getTabIndexValue(){return this.tabindex!==void 0?this.tabindex.toString():null}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.container=e.element,this.moveOnTop(),this.onShow.emit({}),this.appendOverlay(),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),x.focus(this.listViewChild.nativeElement),this.changeFocusedOptionIndex(0));break;case"void":this.onOverlayHide(),this.onHide.emit({});break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.autoZIndex&&Pt.clear(e.element);break}}alignOverlay(){this.relativeAlign?x.relativePosition(this.container,this.target):x.absolutePosition(this.container,this.target)}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.container):x.appendChild(this.container,this.appendTo))}restoreOverlayAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.container)}moveOnTop(){this.autoZIndex&&Pt.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(){this.visible=!1,this.relativeAlign=!1,this.cd.markForCheck()}onWindowResize(){this.visible&&!x.isTouchDevice()&&this.hide()}menuitemId(e,n,r,o){return e?.id??`${n}_${r}${o!==void 0?"_"+o:""}`}isItemFocused(e){return this.focusedOptionId()===e}label(e){return typeof e=="function"?e():e}disabled(e){return typeof e=="function"?e():typeof e>"u"?!1:e}activedescendant(){return this.focused?this.focusedOptionId():void 0}onListFocus(e){this.focused||(this.focused=!0,this.popup||(this.selectedOptionIndex()!==-1?(this.changeFocusedOptionIndex(this.selectedOptionIndex()),this.selectedOptionIndex.set(-1)):this.changeFocusedOptionIndex(0)),this.onFocus.emit(e))}onListBlur(e){this.focused&&(this.focused=!1,this.changeFocusedOptionIndex(-1),this.selectedOptionIndex.set(-1),this.focusedOptionIndex.set(-1),this.onBlur.emit(e))}onListKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":case"Tab":this.popup&&(x.focus(this.target),this.hide()),this.overlayVisible&&this.hide();break;default:break}}onArrowDownKey(e){let n=this.findNextOptionIndex(this.focusedOptionIndex());this.changeFocusedOptionIndex(n),e.preventDefault()}onArrowUpKey(e){if(e.altKey&&this.popup)x.focus(this.target),this.hide(),e.preventDefault();else{let n=this.findPrevOptionIndex(this.focusedOptionIndex());this.changeFocusedOptionIndex(n),e.preventDefault()}}onHomeKey(e){this.changeFocusedOptionIndex(0),e.preventDefault()}onEndKey(e){this.changeFocusedOptionIndex(x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()}onEnterKey(e){let n=x.findSingle(this.containerViewChild.nativeElement,`li[id="${`${this.focusedOptionIndex()}`}"]`),r=n&&x.findSingle(n,'a[data-pc-section="action"]');this.popup&&x.focus(this.target),r?r.click():n&&n.click(),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}findNextOptionIndex(e){let r=[...x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]')].findIndex(o=>o.id===e);return r>-1?r+1:0}findPrevOptionIndex(e){let r=[...x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]')].findIndex(o=>o.id===e);return r>-1?r-1:0}changeFocusedOptionIndex(e){let n=x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]');if(n.length>0){let r=e>=n.length?n.length-1:e<0?0:e;r>-1&&this.focusedOptionIndex.set(n[r].getAttribute("id"))}}itemClick(e,n){let{originalEvent:r,item:o}=e;if(this.focused||(this.focused=!0,this.onFocus.emit()),o.disabled){r.preventDefault();return}!o.url&&!o.routerLink&&r.preventDefault(),o.command&&o.command({originalEvent:r,item:o}),this.popup&&this.hide(),!this.popup&&this.focusedOptionIndex()!==n&&this.focusedOptionIndex.set(n)}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.preventDocumentDefault=!0}bindDocumentClickListener(){if(!this.documentClickListener&&ut(this.platformId)){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",n=>{let r=this.containerViewChild.nativeElement&&!this.containerViewChild.nativeElement.contains(n.target),o=!(this.target&&(this.target===n.target||this.target.contains(n.target)));!this.popup&&r&&o&&this.onListBlur(n),this.preventDocumentDefault&&this.overlayVisible&&r&&o&&(this.hide(),this.preventDocumentDefault=!1)})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){if(!this.documentResizeListener&&ut(this.platformId)){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,"resize",this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){!this.scrollHandler&&ut(this.platformId)&&(this.scrollHandler=new kn(this.target,()=>{this.visible&&this.hide()})),this.scrollHandler?.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&Pt.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide()),this.popup||this.unbindDocumentClickListener()}hasSubMenu(){if(this.model){for(var e of this.model)if(e.items)return!0}return!1}isItemHidden(e){return e.separator?e.visible===!1||e.items&&e.items.some(n=>n.visible!==!1):e.visible===!1}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(ve),w(nt),w(Ne),w(At),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-menu"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(SY,5),oe(EY,5)),n&2){let o;q(o=W())&&(r.listViewChild=o.first),q(o=W())&&(r.containerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",popup:"popup",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",id:"id",tabindex:"tabindex"},outputs:{onShow:"onShow",onHide:"onHide",onBlur:"onBlur",onFocus:"onFocus"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],["container",""],["class","p-menu-start",4,"ngIf"],["role","menu",1,"p-menu-list","p-reset",3,"focus","blur","keydown"],["list",""],[4,"ngIf"],["class","p-menu-end",4,"ngIf"],[1,"p-menu-start"],[4,"ngTemplateOutlet"],["ngFor","",3,"ngForOf"],["class","p-menuitem-separator","role","separator",3,"ngClass",4,"ngIf"],["class","p-submenu-header","pTooltip","","role","none",3,"ngClass","tooltipOptions",4,"ngIf"],["role","separator",1,"p-menuitem-separator",3,"ngClass"],["pTooltip","","role","none",1,"p-submenu-header",3,"ngClass","tooltipOptions"],[4,"ngIf","ngIfElse"],["htmlSubmenuLabel",""],[3,"innerHTML"],["class","p-menuitem","pTooltip","","role","menuitem",3,"pMenuItemContent","itemTemplate","ngClass","ngStyle","class","tooltipOptions","onMenuItemClick",4,"ngIf"],["pTooltip","","role","menuitem",1,"p-menuitem",3,"pMenuItemContent","itemTemplate","ngClass","ngStyle","tooltipOptions","onMenuItemClick"],[1,"p-menu-end"]],template:function(n,r){n&1&&g(0,QY,8,25,"div",0),n&2&&l("ngIf",!r.popup||r.visible)},dependencies:[xe,Vt,Ie,rt,Ce,Ro,YY,KO],styles:[`@layer primeng{.p-menu-overlay{position:absolute;top:0;left:0}.p-menu ul{margin:0;padding:0;list-style:none}.p-menu .p-submenu-header{align-items:center}.p-menu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-menu .p-menuitem-text{line-height:1}} -`],encapsulation:2,data:{animation:[rn("overlayAnimation",[ei(":enter",[Lt({opacity:0,transform:"scaleY(0.8)"}),Xt("{{showTransitionParams}}")]),ei(":leave",[Xt("{{hideTransitionParams}}",Lt({opacity:0}))])])]},changeDetection:0})}return i})(),QO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Ve,Rt,Pn,Ve,Pn]})}return i})();function XY(i,t){if(i&1&&(p(0,"span",4),_(1),h()),i&2){let e=m();d(),z(e.label)}}function JY(i,t){if(i&1&&y(0,"span",6),i&2){let e=m(2);U(e.icon),l("ngClass","p-avatar-icon")}}function eZ(i,t){if(i&1&&g(0,JY,1,3,"span",5),i&2){let e=m(),n=Le(6);l("ngIf",e.icon)("ngIfElse",n)}}function tZ(i,t){if(i&1){let e=G();p(0,"img",8),A("error",function(r){S(e);let o=m(2);return E(o.imageError(r))}),h()}if(i&2){let e=m(2);l("src",e.image,Ue),T("aria-label",e.ariaLabel)}}function iZ(i,t){if(i&1&&g(0,tZ,1,2,"img",7),i&2){let e=m();l("ngIf",e.image)}}var nZ=["*"],YO=(()=>{class i{label;icon;image;size="normal";shape="square";style;styleClass;ariaLabel;ariaLabelledBy;onImageError=new L;containerClass(){return{"p-avatar p-component":!0,"p-avatar-image":this.image!=null,"p-avatar-circle":this.shape==="circle","p-avatar-lg":this.size==="large","p-avatar-xl":this.size==="xlarge"}}imageError(e){this.onImageError.emit(e)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-avatar"]],hostAttrs:[1,"p-element"],inputs:{label:"label",icon:"icon",image:"image",size:"size",shape:"shape",style:"style",styleClass:"styleClass",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy"},outputs:{onImageError:"onImageError"},ngContentSelectors:nZ,decls:7,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-avatar-text",4,"ngIf","ngIfElse"],["iconTemplate",""],["imageTemplate",""],[1,"p-avatar-text"],[3,"class","ngClass",4,"ngIf","ngIfElse"],[3,"ngClass"],[3,"src","error",4,"ngIf"],[3,"src","error"]],template:function(n,r){if(n&1&&(je(),p(0,"div",0),Ae(1),g(2,XY,2,1,"span",1)(3,eZ,1,2,"ng-template",null,2,dt)(5,iZ,1,1,"ng-template",null,3,dt),h()),n&2){let o=Le(4);U(r.styleClass),l("ngClass",r.containerClass())("ngStyle",r.style),T("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("data-pc-name","avatar"),d(2),l("ngIf",r.label)("ngIfElse",o)}},dependencies:[xe,Ie,Ce],styles:[`@layer primeng{.p-avatar{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1rem}.p-avatar.p-avatar-image{background-color:transparent}.p-avatar.p-avatar-circle{border-radius:50%;overflow:hidden}.p-avatar .p-avatar-icon{font-size:1rem}.p-avatar img{width:100%;height:100%}} + before dispatching the action. For example, someAction should be someAction().`);if(typeof n>"u")throw new TypeError("Actions must be objects");if(typeof n.type>"u")throw new TypeError("Actions must have a type property");super.next(n)}complete(){}ngOnDestroy(){super.complete()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),wK=[Ja],JE=new le("@ngrx/store Internal Root Guard"),UE=new le("@ngrx/store Internal Initial State"),Zy=new le("@ngrx/store Initial State"),eO=new le("@ngrx/store Reducer Factory"),jE=new le("@ngrx/store Internal Reducer Factory Provider"),tO=new le("@ngrx/store Initial Reducers"),$y=new le("@ngrx/store Internal Initial Reducers"),Nve=new le("@ngrx/store Store Features"),HE=new le("@ngrx/store Internal Store Reducers"),Bve=new le("@ngrx/store Internal Feature Reducers"),zve=new le("@ngrx/store Internal Feature Configs"),Uve=new le("@ngrx/store Internal Store Features"),jve=new le("@ngrx/store Internal Feature Reducers Token"),Hve=new le("@ngrx/store Feature Reducers"),GE=new le("@ngrx/store User Provided Meta Reducers"),am=new le("@ngrx/store Meta Reducers"),$E=new le("@ngrx/store Internal Resolved Meta Reducers"),qE=new le("@ngrx/store User Runtime Checks Config"),WE=new le("@ngrx/store Internal User Runtime Checks Config"),yd=new le("@ngrx/store Internal Runtime Checks"),iO=new le("@ngrx/store Check if Action types are unique"),lm=new le("@ngrx/store Root Store Provider"),nO=new le("@ngrx/store Feature State Provider");function TK(i,t={}){let e=Object.keys(i),n={};for(let o=0;oe!==t).reduce((e,n)=>Object.assign(e,{[n]:i[n]}),{})}function rO(...i){return function(t){if(i.length===0)return t;let e=i[i.length-1];return i.slice(0,-1).reduceRight((r,o)=>o(r),e(t))}}function oO(i,t){return Array.isArray(t)&&t.length>0&&(i=rO.apply(null,[...t,i])),(e,n)=>{let r=i(e);return(o,s)=>(o=o===void 0?n:o,r(o,s))}}function SK(i){let t=Array.isArray(i)&&i.length>0?rO(...i):e=>e;return(e,n)=>(e=t(e),(r,o)=>(r=r===void 0?n:r,e(r,o)))}var bd=class extends Li{},cm=class extends Ja{},EK="@ngrx/store/update-reducers",Wy=(()=>{let t=class t extends Fi{get currentReducers(){return this.reducers}constructor(n,r,o,s){super(s(o,r)),this.dispatcher=n,this.initialState=r,this.reducers=o,this.reducerFactory=s}addFeature(n){this.addFeatures([n])}addFeatures(n){let r=n.reduce((o,{reducers:s,reducerFactory:a,metaReducers:c,initialState:u,key:f})=>{let v=typeof s=="function"?SK(c)(s,u):oO(a,c)(s,u);return o[f]=v,o},{});this.addReducers(r)}removeFeature(n){this.removeFeatures([n])}removeFeatures(n){this.removeReducers(n.map(r=>r.key))}addReducer(n,r){this.addReducers({[n]:r})}addReducers(n){this.reducers=F(F({},this.reducers),n),this.updateReducers(Object.keys(n))}removeReducer(n){this.removeReducers([n])}removeReducers(n){n.forEach(r=>{this.reducers=xK(this.reducers,r)}),this.updateReducers(n)}updateReducers(n){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:EK,features:n})}ngOnDestroy(){this.complete()}};t.\u0275fac=function(r){return new(r||t)(J(cm),J(Zy),J(tO),J(eO))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),OK=[Wy,{provide:bd,useExisting:Wy},{provide:cm,useExisting:Ja}],um=(()=>{let t=class t extends Gt{ngOnDestroy(){this.complete()}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=we(t)))(o||t)}})(),t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),MK=[um],dm=class extends Li{},KE=(()=>{let t=class t extends Fi{constructor(n,r,o,s){super(s);let c=n.pipe(dl(Dd)).pipe(i1(r)),u={state:s},f=c.pipe(Vd(kK,u));this.stateSubscription=f.subscribe(({state:v,action:b})=>{this.next(v),o.next(b)}),this.state=Hy(this,{manualCleanup:!0,requireSync:!0})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}};t.INIT=XE,t.\u0275fac=function(r){return new(r||t)(J(Ja),J(bd),J(um),J(Zy))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function kK(i={state:void 0},[t,e]){let{state:n}=i;return{state:e(n,t),action:t}}var AK=[KE,{provide:dm,useExisting:KE}],Zr=(()=>{let t=class t extends Li{constructor(n,r,o){super(),this.actionsObserver=r,this.reducerManager=o,this.source=n,this.state=n.state}select(n,...r){return PK.call(null,n,...r)(this)}selectSignal(n,r){return yi(()=>n(this.state()),r)}lift(n){let r=new t(this,this.actionsObserver,this.reducerManager);return r.operator=n,r}dispatch(n){this.actionsObserver.next(n)}next(n){this.actionsObserver.next(n)}error(n){this.actionsObserver.error(n)}complete(){this.actionsObserver.complete()}addReducer(n,r){this.reducerManager.addReducer(n,r)}removeReducer(n){this.reducerManager.removeReducer(n)}};t.\u0275fac=function(r){return new(r||t)(J(dm),J(Ja),J(Wy))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})(),DK=[Zr];function PK(i,t,...e){return function(r){let o;if(typeof i=="string"){let s=[t,...e].filter(Boolean);o=r.pipe(Xb(i,...s))}else if(typeof i=="function")o=r.pipe(Re(s=>i(s,t)));else throw new TypeError(`Unexpected type '${typeof i}' in select operator, expected 'string' or 'function'`);return o.pipe(Kb())}}var Xy="https://ngrx.io/guide/store/configuration/runtime-checks";function QE(i){return i===void 0}function YE(i){return i===null}function sO(i){return Array.isArray(i)}function RK(i){return typeof i=="string"}function VK(i){return typeof i=="boolean"}function LK(i){return typeof i=="number"}function aO(i){return typeof i=="object"&&i!==null}function FK(i){return aO(i)&&!sO(i)}function NK(i){if(!FK(i))return!1;let t=Object.getPrototypeOf(i);return t===Object.prototype||t===null}function Ky(i){return typeof i=="function"}function BK(i){return Ky(i)&&i.hasOwnProperty("\u0275cmp")}function zK(i,t){return Object.prototype.hasOwnProperty.call(i,t)}function UK(i){return i instanceof le?ae(i):i}function jK(i){return typeof i=="function"?i():i}function HK(i,t){return i.concat(t)}function GK(){if(ae(Zr,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function $K(i,t){return function(e,n){let r=t.action(n)?Qy(n):n,o=i(e,r);return t.state()?Qy(o):o}}function Qy(i){Object.freeze(i);let t=Ky(i);return Object.getOwnPropertyNames(i).forEach(e=>{if(!e.startsWith("\u0275")&&zK(i,e)&&(!t||e!=="caller"&&e!=="callee"&&e!=="arguments")){let n=i[e];(aO(n)||Ky(n))&&!Object.isFrozen(n)&&Qy(n)}}),i}function qK(i,t){return function(e,n){if(t.action(n)){let o=Yy(n);ZE(o,"action")}let r=i(e,n);if(t.state()){let o=Yy(r);ZE(o,"state")}return r}}function Yy(i,t=[]){return(QE(i)||YE(i))&&t.length===0?{path:["root"],value:i}:Object.keys(i).reduce((n,r)=>{if(n)return n;let o=i[r];return BK(o)?n:QE(o)||YE(o)||LK(o)||VK(o)||RK(o)||sO(o)?!1:NK(o)?Yy(o,[...t,r]):{path:[...t,r],value:o}},!1)}function ZE(i,t){if(i===!1)return;let e=i.path.join("."),n=new Error(`Detected unserializable ${t} at "${e}". ${Xy}#strict${t}serializability`);throw n.value=i.value,n.unserializablePath=e,n}function WK(i,t){return function(e,n){if(t.action(n)&&!ge.isInAngularZone())throw new Error(`Action '${n.type}' running outside NgZone. ${Xy}#strictactionwithinngzone`);return i(e,n)}}function KK(i){return qd()?F({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},i):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function QK({strictActionSerializability:i,strictStateSerializability:t}){return e=>i||t?qK(e,{action:n=>i&&!Jy(n),state:()=>t}):e}function YK({strictActionImmutability:i,strictStateImmutability:t}){return e=>i||t?$K(e,{action:n=>i&&!Jy(n),state:()=>t}):e}function Jy(i){return i.type.startsWith("@ngrx")}function ZK({strictActionWithinNgZone:i}){return t=>i?WK(t,{action:e=>i&&!Jy(e)}):t}function XK(i){return[{provide:WE,useValue:i},{provide:qE,useFactory:eQ,deps:[WE]},{provide:yd,deps:[qE],useFactory:KK},{provide:am,multi:!0,deps:[yd],useFactory:YK},{provide:am,multi:!0,deps:[yd],useFactory:QK},{provide:am,multi:!0,deps:[yd],useFactory:ZK}]}function JK(){return[{provide:iO,multi:!0,deps:[yd],useFactory:tQ}]}function eQ(i){return i}function tQ(i){if(!i.strictActionTypeUniqueness)return;let t=Object.entries(qy).filter(([,e])=>e>1).map(([e])=>e);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(e=>`"${e}"`).join(", ")}. ${Xy}#strictactiontypeuniqueness`)}function iQ(i={},t={}){return[{provide:JE,useFactory:GK},{provide:UE,useValue:t.initialState},{provide:Zy,useFactory:jK,deps:[UE]},{provide:$y,useValue:i},{provide:HE,useExisting:i instanceof le?i:$y},{provide:tO,deps:[$y,[new o1(HE)]],useFactory:UK},{provide:GE,useValue:t.metaReducers?t.metaReducers:[]},{provide:$E,deps:[am,GE],useFactory:HK},{provide:jE,useValue:t.reducerFactory?t.reducerFactory:TK},{provide:eO,deps:[jE,$E],useFactory:oO},wK,OK,MK,AK,DK,XK(t.runtimeChecks),JK()]}function nQ(){ae(Ja),ae(bd),ae(um),ae(Zr),ae(JE,{optional:!0}),ae(iO,{optional:!0})}var rQ=[{provide:lm,useFactory:nQ},{provide:Ns,multi:!0,useFactory(){return()=>ae(lm)}}];function lO(i,t){return Bn([...iQ(i,t),rQ])}function pm(...i){let t=i.pop(),e=i.map(n=>n.type);return{reducer:t,types:e}}function cO(i,...t){let e=new Map;for(let n of t)for(let r of n.types){let o=e.get(r);if(o){let s=(a,c)=>n.reducer(o(a,c),c);e.set(r,s)}else e.set(r,n.reducer)}return function(n=i,r){let o=e.get(r.type);return o?o(n,r):n}}var eb="__@ngrx/effects_create__";function oQ(i){return Object.getOwnPropertyNames(i).filter(n=>i[n]&&i[n].hasOwnProperty(eb)?i[n][eb].hasOwnProperty("dispatch"):!1).map(n=>{let r=i[n][eb];return F({propertyName:n},r)})}function sQ(i){return oQ(i)}function uO(i){return Object.getPrototypeOf(i)}function aQ(i){return!!i.constructor&&i.constructor.name!=="Object"&&i.constructor.name!=="Function"}function pO(i){return typeof i=="function"}function lQ(i){return i.filter(pO)}function cQ(i,t,e){let n=uO(i),o=!!n&&n.constructor.name!=="Object"?n.constructor.name:null,s=sQ(i).map(({propertyName:a,dispatch:c,useEffectsErrorHandler:u})=>{let f=typeof i[a]=="function"?i[a]():i[a],v=u?e(f,t):f;return c===!1?v.pipe($b()):v.pipe(Zb()).pipe(Re(O=>({effect:i[a],notification:O,propertyName:a,sourceName:o,sourceInstance:i})))});return Am(...s)}var dQ=10;function hO(i,t,e=dQ){return i.pipe(cn(n=>(t&&t.handleError(n),e<=1?i:hO(i,t,e-1))))}var tye=new le("@ngrx/effects Internal Root Guard"),iye=new le("@ngrx/effects User Provided Effects"),nye=new le("@ngrx/effects Internal Root Effects"),rye=new le("@ngrx/effects Internal Root Effects Instances"),oye=new le("@ngrx/effects Internal Feature Effects"),sye=new le("@ngrx/effects Internal Feature Effects Instance Groups"),uQ=new le("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>hO}),pQ="@ngrx/effects/init",hQ=Xa(pQ);function mQ(i,t){if(i.notification.kind==="N"){let e=i.notification.value;!fQ(e)&&t.handleError(new Error(`Effect ${gQ(i)} dispatched an invalid action: ${_Q(e)}`))}}function fQ(i){return typeof i!="function"&&i&&i.type&&typeof i.type=="string"}function gQ({propertyName:i,sourceInstance:t,sourceName:e}){let n=typeof t[i]=="function";return!!e?`"${e}.${String(i)}${n?"()":""}"`:`"${String(i)}()"`}function _Q(i){try{return JSON.stringify(i)}catch{return i}}var vQ="ngrxOnIdentifyEffects";function yQ(i){return tb(i,vQ)}var bQ="ngrxOnRunEffects";function CQ(i){return tb(i,bQ)}var IQ="ngrxOnInitEffects";function wQ(i){return tb(i,IQ)}function tb(i,t){return i&&t in i&&typeof i[t]=="function"}var mO=(()=>{let t=class t extends Gt{constructor(n,r){super(),this.errorHandler=n,this.effectsErrorHandler=r}addEffects(n){this.next(n)}toActions(){return this.pipe(Pm(n=>aQ(n)?uO(n):n),vi(n=>n.pipe(Pm(TQ))),vi(n=>{let r=n.pipe(Qb(s=>xQ(this.errorHandler,this.effectsErrorHandler)(s)),Re(s=>(mQ(s,this.errorHandler),s.notification)),Ni(s=>s.kind==="N"&&s.value!=null),Wb()),o=n.pipe(dn(1),Ni(wQ),Re(s=>s.ngrxOnInitEffects()));return Am(r,o)}))}};t.\u0275fac=function(r){return new(r||t)(J(gl),J(uQ))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function TQ(i){return yQ(i)?i.ngrxOnIdentifyEffects():""}function xQ(i,t){return e=>{let n=cQ(e,i,t);return CQ(e)?e.ngrxOnRunEffects(n):n}}var SQ=(()=>{let t=class t{get isStarted(){return!!this.effectsSubscription}constructor(n,r){this.effectSources=n,this.store=r,this.effectsSubscription=null}start(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))}ngOnDestroy(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)}};t.\u0275fac=function(r){return new(r||t)(J(mO),J(Zr))},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function fO(...i){let t=i.flat(),e=lQ(t);return Bn([e,{provide:Ns,multi:!0,useValue:()=>{ae(lm),ae(nO,{optional:!0});let n=ae(SQ),r=ae(mO),o=!n.isStarted;o&&n.start();for(let s of t){let a=pO(s)?ae(s):s;r.addEffects(a)}o&&ae(Zr).dispatch(hQ())}}])}var gO=Xa("[Counter Component] Increament"),_O=Xa("[Counter Component] Decreament"),vO=Xa("[Counter Component] Reset");var EQ=3333,yO=cO(EQ,pm(gO,i=>i+1),pm(_O,i=>i-1),pm(vO,i=>0));var bO={counter:yO},CO=qd()?[]:[];var OQ=(()=>{let t=class t extends Zd{constructor(n,r,o){super(n,r,o,ae(Nd,{optional:!0}))}ngOnDestroy(){this.flush()}};t.\u0275fac=function(r){return new(r||t)(J(Oe),J(Il),J(Yd))},t.\u0275prov=se({token:t,factory:t.\u0275fac});let i=t;return i})();function MQ(){return new N1}function kQ(i,t,e){return new z1(i,t,e)}var IO=[{provide:Yd,useFactory:MQ},{provide:Zd,useClass:OQ},{provide:js,useFactory:kQ,deps:[Ws,Zd,ge]}],AQ=[{provide:Il,useFactory:()=>new B1},{provide:Bs,useValue:"BrowserAnimations"},...IO],Sye=[{provide:Il,useClass:F1},{provide:Bs,useValue:"NoopAnimations"},...IO];function wO(){return[...AQ]}var MO="firebasestorage.googleapis.com",DQ="storageBucket",PQ=2*60*1e3,RQ=10*60*1e3;var Er=class i extends Zi{constructor(t,e,n=0){super(ib(t),`Firebase Storage: ${e} (${ib(t)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,i.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return ib(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage} +${this.customData.serverResponse}`:this.message=this._baseMessage}},Jr=function(i){return i.UNKNOWN="unknown",i.OBJECT_NOT_FOUND="object-not-found",i.BUCKET_NOT_FOUND="bucket-not-found",i.PROJECT_NOT_FOUND="project-not-found",i.QUOTA_EXCEEDED="quota-exceeded",i.UNAUTHENTICATED="unauthenticated",i.UNAUTHORIZED="unauthorized",i.UNAUTHORIZED_APP="unauthorized-app",i.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",i.INVALID_CHECKSUM="invalid-checksum",i.CANCELED="canceled",i.INVALID_EVENT_NAME="invalid-event-name",i.INVALID_URL="invalid-url",i.INVALID_DEFAULT_BUCKET="invalid-default-bucket",i.NO_DEFAULT_BUCKET="no-default-bucket",i.CANNOT_SLICE_BLOB="cannot-slice-blob",i.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",i.NO_DOWNLOAD_URL="no-download-url",i.INVALID_ARGUMENT="invalid-argument",i.INVALID_ARGUMENT_COUNT="invalid-argument-count",i.APP_DELETED="app-deleted",i.INVALID_ROOT_OPERATION="invalid-root-operation",i.INVALID_FORMAT="invalid-format",i.INTERNAL_ERROR="internal-error",i.UNSUPPORTED_ENVIRONMENT="unsupported-environment",i}(Jr||{});function ib(i){return"storage/"+i}function VQ(){let i="An unknown error occurred, please check the error payload for server response.";return new Er(Jr.UNKNOWN,i)}function LQ(){return new Er(Jr.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function FQ(){return new Er(Jr.CANCELED,"User canceled the upload/download.")}function NQ(i){return new Er(Jr.INVALID_URL,"Invalid URL '"+i+"'.")}function BQ(i){return new Er(Jr.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.")}function TO(i){return new Er(Jr.INVALID_ARGUMENT,i)}function kO(){return new Er(Jr.APP_DELETED,"The Firebase app was deleted.")}function zQ(i){return new Er(Jr.INVALID_ROOT_OPERATION,"The operation '"+i+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}var Xr=class i{constructor(t,e){this.bucket=t,this.path_=e}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){let t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,e){let n;try{n=i.makeFromUrl(t,e)}catch{return new i(t,"")}if(n.path==="")return n;throw BQ(t)}static makeFromUrl(t,e){let n=null,r="([A-Za-z0-9.\\-_]+)";function o(me){me.path.charAt(me.path.length-1)==="/"&&(me.path_=me.path_.slice(0,-1))}let s="(/(.*))?$",a=new RegExp("^gs://"+r+s,"i"),c={bucket:1,path:3};function u(me){me.path_=decodeURIComponent(me.path)}let f="v[A-Za-z0-9_]+",v=e.replace(/[.]/g,"\\."),b="(/([^?#]*).*)?$",O=new RegExp(`^https?://${v}/${f}/b/${r}/o${b}`,"i"),V={bucket:1,path:3},K=e===MO?"(?:storage.googleapis.com|storage.cloud.google.com)":e,P="([^?#]*)",j=new RegExp(`^https?://${K}/${r}/${P}`,"i"),_e=[{regex:a,indices:c,postModify:o},{regex:O,indices:V,postModify:u},{regex:j,indices:{bucket:1,path:2},postModify:u}];for(let me=0;me<_e.length;me++){let $e=_e[me],He=$e.regex.exec(t);if(He){let Et=He[$e.indices.bucket],ht=He[$e.indices.path];ht||(ht=""),n=new i(Et,ht),$e.postModify(n);break}}if(n==null)throw NQ(t);return n}},nb=class{constructor(t){this.promise_=Promise.reject(t)}getPromise(){return this.promise_}cancel(t=!1){}};function UQ(i,t,e){let n=1,r=null,o=null,s=!1,a=0;function c(){return a===2}let u=!1;function f(...P){u||(u=!0,t.apply(null,P))}function v(P){r=setTimeout(()=>{r=null,i(O,c())},P)}function b(){o&&clearTimeout(o)}function O(P,...j){if(u){b();return}if(P){b(),f.call(null,P,...j);return}if(c()||s){b(),f.call(null,P,...j);return}n<64&&(n*=2);let _e;a===1?(a=2,_e=0):_e=(n+Math.random())*1e3,v(_e)}let V=!1;function K(P){V||(V=!0,b(),!u&&(r!==null?(P||(a=2),clearTimeout(r),v(0)):P||(a=1)))}return v(0),o=setTimeout(()=>{s=!0,K(!0)},e),K}function jQ(i){i(!1)}function HQ(i){return i!==void 0}function xO(i,t,e,n){if(ne)throw TO(`Invalid value for '${i}'. Expected ${e} or less.`)}function GQ(i){let t=encodeURIComponent,e="?";for(let n in i)if(i.hasOwnProperty(n)){let r=t(n)+"="+t(i[n]);e=e+r+"&"}return e=e.slice(0,-1),e}var rb=function(i){return i[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT",i}(rb||{});function $Q(i,t){let e=i>=500&&i<600,r=[408,429].indexOf(i)!==-1,o=t.indexOf(i)!==-1;return e||r||o}var ob=class{constructor(t,e,n,r,o,s,a,c,u,f,v,b=!0){this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=o,this.additionalRetryCodes_=s,this.callback_=a,this.errorCallback_=c,this.timeout_=u,this.progressCallback_=f,this.connectionFactory_=v,this.retry=b,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((O,V)=>{this.resolve_=O,this.reject_=V,this.start_()})}start_(){let t=(n,r)=>{if(r){n(!1,new el(!1,null,!0));return}let o=this.connectionFactory_();this.pendingConnection_=o;let s=a=>{let c=a.loaded,u=a.lengthComputable?a.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,u)};this.progressCallback_!==null&&o.addUploadProgressListener(s),o.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&o.removeUploadProgressListener(s),this.pendingConnection_=null;let a=o.getErrorCode()===rb.NO_ERROR,c=o.getStatus();if(!a||$Q(c,this.additionalRetryCodes_)&&this.retry){let f=o.getErrorCode()===rb.ABORT;n(!1,new el(!1,null,f));return}let u=this.successCodes_.indexOf(c)!==-1;n(!0,new el(u,o))})},e=(n,r)=>{let o=this.resolve_,s=this.reject_,a=r.connection;if(r.wasSuccessCode)try{let c=this.callback_(a,a.getResponse());HQ(c)?o(c):o()}catch(c){s(c)}else if(a!==null){let c=VQ();c.serverResponse=a.getErrorText(),this.errorCallback_?s(this.errorCallback_(a,c)):s(c)}else if(r.canceled){let c=this.appDelete_?kO():FQ();s(c)}else{let c=LQ();s(c)}};this.canceled_?e(!1,new el(!1,null,!0)):this.backoffId_=UQ(t,e,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&jQ(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}},el=class{constructor(t,e,n){this.wasSuccessCode=t,this.connection=e,this.canceled=!!n}};function qQ(i,t){t!==null&&t.length>0&&(i.Authorization="Firebase "+t)}function WQ(i,t){i["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function KQ(i,t){t&&(i["X-Firebase-GMPID"]=t)}function QQ(i,t){t!==null&&(i["X-Firebase-AppCheck"]=t)}function YQ(i,t,e,n,r,o,s=!0){let a=GQ(i.urlParams),c=i.url+a,u=Object.assign({},i.headers);return KQ(u,t),qQ(u,e),WQ(u,o),QQ(u,n),new ob(c,i.method,u,i.body,i.successCodes,i.additionalRetryCodes,i.handler,i.errorHandler,i.timeout,i.progressCallback,r,s)}function ZQ(i){if(i.length===0)return null;let t=i.lastIndexOf("/");return t===-1?"":i.slice(0,t)}function XQ(i){let t=i.lastIndexOf("/",i.length-2);return t===-1?i:i.slice(t+1)}var Aye=256*1024;var sb=class i{constructor(t,e){this._service=t,e instanceof Xr?this._location=e:this._location=Xr.makeFromUrl(e,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,e){return new i(t,e)}get root(){let t=new Xr(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return XQ(this._location.path)}get storage(){return this._service}get parent(){let t=ZQ(this._location.path);if(t===null)return null;let e=new Xr(this._location.bucket,t);return new i(this._service,e)}_throwIfRoot(t){if(this._location.path==="")throw zQ(t)}};function SO(i,t){let e=t?.[DQ];return e==null?null:Xr.makeFromBucketSpec(e,i)}function JQ(i,t,e,n={}){i.host=`${t}:${e}`,i._protocol="http";let{mockUserToken:r}=n;r&&(i._overrideAuthToken=typeof r=="string"?r:$u(r,i.app.options.projectId))}var ab=class{constructor(t,e,n,r,o){this.app=t,this._authProvider=e,this._appCheckProvider=n,this._url=r,this._firebaseVersion=o,this._bucket=null,this._host=MO,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=PQ,this._maxUploadRetryTime=RQ,this._requests=new Set,r!=null?this._bucket=Xr.makeFromBucketSpec(r,this._host):this._bucket=SO(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,this._url!=null?this._bucket=Xr.makeFromBucketSpec(this._url,t):this._bucket=SO(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){xO("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){xO("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}_getAuthToken(){return D(this,null,function*(){if(this._overrideAuthToken)return this._overrideAuthToken;let t=this._authProvider.getImmediate({optional:!0});if(t){let e=yield t.getToken();if(e!==null)return e.accessToken}return null})}_getAppCheckToken(){return D(this,null,function*(){let t=this._appCheckProvider.getImmediate({optional:!0});return t?(yield t.getToken()).token:null})}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new sb(this,t)}_makeRequest(t,e,n,r,o=!0){if(this._deleted)return new nb(kO());{let s=YQ(t,this._appId,n,r,e,this._firebaseVersion,o);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}makeRequestWithTokens(t,e){return D(this,null,function*(){let[n,r]=yield Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,e,n,r).getPromise()})}},EO="@firebase/storage",OO="0.12.1";var AO="storage";function DO(i=Co(),t){i=Ai(i);let n=os(i,AO).getImmediate({identifier:t}),r=Gu("storage");return r&&PO(n,...r),n}function PO(i,t,e,n={}){JQ(i,t,e,n)}function eY(i,{instanceIdentifier:t}){let e=i.getProvider("app").getImmediate(),n=i.getProvider("auth-internal"),r=i.getProvider("app-check-internal");return new ab(e,n,r,t,ur)}function tY(){dr(new ln(AO,eY,"PUBLIC").setMultipleInstances(!0)),Wt(EO,OO,""),Wt(EO,OO,"esm2017")}tY();var Cd=class{constructor(t){return t}},RO="storage",lb=class{constructor(){return Ss(RO)}};var cb=new le("angularfire2.storage-instances");function iY(i,t){let e=Va(RO,i,t);return e&&new Cd(e)}function nY(i){return(t,e)=>{let n=t.runOutsideAngular(()=>i(e));return new Cd(n)}}var rY={provide:lb,deps:[[new hi,cb]]},oY={provide:Cd,useFactory:iY,deps:[[new hi,cb],qn]},sY=(()=>{class i{constructor(){Wt("angularfire",zr.full,"gcs")}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({providers:[oY,rY]})}return i})();function VO(i,...t){return{ngModule:sY,providers:[{provide:cb,useFactory:nY(i),multi:!0,deps:[ge,Mi,ko,Ur,[new hi,ks],[new hi,Mo],...t]}]}}var LO=$n(DO,!0);var aY="@",db=class{constructor(t,e,n,r,o){this.doc=t,this.delegate=e,this.zone=n,this.animationType=r,this.moduleImpl=o,this._rendererFactoryPromise=null,this.scheduler=ae(Nd,{optional:!0})}loadImpl(){return(this.moduleImpl??import("./chunk-ZN2MSQL7.js")).catch(e=>{throw new wt(5300,!1)}).then(({\u0275createEngine:e,\u0275AnimationRendererFactory:n})=>{let r=e(this.animationType,this.doc,this.scheduler),o=new n(this.delegate,r,this.zone);return this.delegate=o,o})}createRenderer(t,e){let n=this.delegate.createRenderer(t,e);if(n.\u0275type===0)return n;typeof n.throwOnSyntheticProps=="boolean"&&(n.throwOnSyntheticProps=!1);let r=new ub(n);return e?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(o=>{let s=o.createRenderer(t,e);r.use(s)}).catch(o=>{r.use(n)}),r}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}},ub=class{constructor(t){this.delegate=t,this.replay=[],this.\u0275type=1}use(t){if(this.delegate=t,this.replay!==null){for(let e of this.replay)e(t);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}get destroyNode(){return this.delegate.destroyNode}appendChild(t,e){this.delegate.appendChild(t,e)}insertBefore(t,e,n,r){this.delegate.insertBefore(t,e,n,r)}removeChild(t,e,n){this.delegate.removeChild(t,e,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){this.shouldReplay(e)&&this.replay.push(r=>r.setProperty(t,e,n)),this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.shouldReplay(e)&&this.replay.push(r=>r.listen(t,e,n)),this.delegate.listen(t,e,n)}shouldReplay(t){return this.replay!==null&&t.startsWith(aY)}};function FO(i="animations"){return Bn([{provide:js,useFactory:(t,e,n)=>new db(t,e,n,i),deps:[Oe,Ws,ge]},{provide:Bs,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var NO={production:!1,TMDB_ACCESS_TOKEN:"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJjNmU5MzM1Yjg5Y2E3NWE3MGJjY2UxYzcyYmZkMDQ4ZCIsInN1YiI6IjYzYmVkN2FiODU4Njc4MDBmMDhjZjI3NiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.sQHes_rn51wewxY_7nZLxGssnd67J8ieiLOIo2Bg_FI",TMDB_BASE_URL:"https://api.themoviedb.org/3/",FIREBASE_API_KEY:"AIzaSyCtNek6BbEtj91x9V1h0iALz5aw0Ete6eM"};var BO={apiKey:NO.FIREBASE_API_KEY,authDomain:"showbizhub-4f1b9.firebaseapp.com",projectId:"showbizhub-4f1b9",storageBucket:"showbizhub-4f1b9.appspot.com",messagingSenderId:"601643514956",appId:"1:601643514956:web:6d83e88c0391e1bcbb08e9",measurementId:"G-3RGML3FN0P"};var zO={providers:[WC(zE),lO(bO,{metaReducers:CO}),Km(),fO(),wO(),a1([eS(()=>tS(BO)),zS(()=>US()),GS(()=>$S()),VO(()=>LO())]),FO()]};function lY(i,t){if(i&1&&(y(0,"img",1),p(1,"div",2)(2,"h6"),_(3),h(),p(4,"app-custom-tag",3),y(5,"i",4),p(6,"span"),_(7),h()()()),i&2){let e=m();l("src","http://image.tmdb.org/t/p/w342"+e.item.poster_path,qe),d(3),z(e.item.title),d(4),z(e.item==null?null:e.item.media_type)}}function cY(i,t){if(i&1&&(y(0,"img",1),p(1,"div",2)(2,"h6"),_(3),h(),p(4,"app-custom-tag",3),y(5,"i",5),p(6,"span"),_(7),h()()()),i&2){let e=m();l("src","http://image.tmdb.org/t/p/w342"+e.item.poster_path,qe),d(3),z(e.item.name),d(4),z(e.item==null?null:e.item.media_type)}}function dY(i,t){if(i&1&&(y(0,"img",1),p(1,"div",2)(2,"h6"),_(3),h(),p(4,"app-custom-tag",3),y(5,"i",6),p(6,"span"),_(7),h()()()),i&2){let e=m();l("src","http://image.tmdb.org/t/p/w342"+e.item.profile_path,qe),d(3),z(e.item.name),d(4),z(e.item==null?null:e.item.media_type)}}var UO=(()=>{let t=class t{constructor(){this.item={}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-auto-complete-card"]],inputs:{item:"item"},standalone:!0,features:[R],decls:4,vars:1,consts:[[1,"auto-complete-card"],["alt","",3,"src"],[1,"details"],["size","small"],[1,"pi","pi-video"],[1,"pi","pi-play"],[1,"pi","pi-user"]],template:function(r,o){r&1&&(p(0,"div",0),g(1,lY,8,3)(2,cY,8,3)(3,dY,8,3),h()),r&2&&(d(),Je(1,(o.item==null?null:o.item.media_type)=="movie"?1:(o.item==null?null:o.item.media_type)=="tv"?2:3))},dependencies:[tm,Sr],styles:[".auto-complete-card[_ngcontent-%COMP%]{display:flex;align-items:center}.auto-complete-card[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:1rem!important;margin-bottom:0;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal;padding:0 .5rem}.auto-complete-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:32px;aspect-ratio:1/1;border-radius:50%;object-fit:cover}.auto-complete-card[_ngcontent-%COMP%] .custom-tag[_ngcontent-%COMP%]{font-size:.6rem;width:max-content}"]});let i=t;return i})();var jO=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["AngleDownIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var HO=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["AngleRightIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var GO=(()=>{class i extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=we(i)))(r||i)}})();static \u0275cmp=k({type:i,selectors:[["BarsIcon"]],standalone:!0,features:[ye,R],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.3226 3.6129H0.677419C0.497757 3.6129 0.325452 3.54152 0.198411 3.41448C0.0713707 3.28744 0 3.11514 0 2.93548C0 2.75581 0.0713707 2.58351 0.198411 2.45647C0.325452 2.32943 0.497757 2.25806 0.677419 2.25806H13.3226C13.5022 2.25806 13.6745 2.32943 13.8016 2.45647C13.9286 2.58351 14 2.75581 14 2.93548C14 3.11514 13.9286 3.28744 13.8016 3.41448C13.6745 3.54152 13.5022 3.6129 13.3226 3.6129ZM13.3226 7.67741H0.677419C0.497757 7.67741 0.325452 7.60604 0.198411 7.479C0.0713707 7.35196 0 7.17965 0 6.99999C0 6.82033 0.0713707 6.64802 0.198411 6.52098C0.325452 6.39394 0.497757 6.32257 0.677419 6.32257H13.3226C13.5022 6.32257 13.6745 6.39394 13.8016 6.52098C13.9286 6.64802 14 6.82033 14 6.99999C14 7.17965 13.9286 7.35196 13.8016 7.479C13.6745 7.60604 13.5022 7.67741 13.3226 7.67741ZM0.677419 11.7419H13.3226C13.5022 11.7419 13.6745 11.6706 13.8016 11.5435C13.9286 11.4165 14 11.2442 14 11.0645C14 10.8848 13.9286 10.7125 13.8016 10.5855C13.6745 10.4585 13.5022 10.3871 13.3226 10.3871H0.677419C0.497757 10.3871 0.325452 10.4585 0.198411 10.5855C0.0713707 10.7125 0 10.8848 0 11.0645C0 11.2442 0.0713707 11.4165 0.198411 11.5435C0.325452 11.6706 0.497757 11.7419 0.677419 11.7419Z","fill","currentColor"]],template:function(n,r){n&1&&(ke(),p(0,"svg",0),y(1,"path",1),h()),n&2&&(U(r.getClassNames()),T("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return i})();var $O=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Ve,Rt,Pn,Te,GO,jO,HO,Ve,Pn,Te]})}return i})();var uY=["pMenuItemContent",""];function pY(i,t){i&1&&ie(0)}var qO=i=>({"p-disabled":i}),pb=i=>({$implicit:i});function hY(i,t){if(i&1&&(p(0,"a",5),g(1,pY,1,0,"ng-container",6),h()),i&2){let e=m(2),n=Le(4);l("target",e.item.target)("ngClass",H(10,qO,e.item.disabled)),T("title",e.item.title)("href",e.item.url||null,qe)("data-automationid",e.item.automationId)("tabindex",-1)("data-pc-section","action")("aria-hidden",!0),d(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",H(12,pb,e.item))}}function mY(i,t){i&1&&ie(0)}var fY=()=>({exact:!1});function gY(i,t){if(i&1&&(p(0,"a",7),g(1,mY,1,0,"ng-container",6),h()),i&2){let e=m(2),n=Le(4);l("routerLink",e.item.routerLink)("queryParams",e.item.queryParams)("routerLinkActiveOptions",e.item.routerLinkActiveOptions||Ke(18,fY))("target",e.item.target)("ngClass",H(19,qO,e.item.disabled))("fragment",e.item.fragment)("queryParamsHandling",e.item.queryParamsHandling)("preserveFragment",e.item.preserveFragment)("skipLocationChange",e.item.skipLocationChange)("replaceUrl",e.item.replaceUrl)("state",e.item.state),T("data-automationid",e.item.automationId)("tabindex",-1)("data-pc-section","action")("aria-hidden",!0)("title",e.item.title),d(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",H(21,pb,e.item))}}function _Y(i,t){if(i&1&&(Z(0),g(1,hY,2,14,"a",3)(2,gY,2,23,"a",4),X()),i&2){let e=m();d(),l("ngIf",!(e.item!=null&&e.item.routerLink)),d(),l("ngIf",e.item==null?null:e.item.routerLink)}}function vY(i,t){}function yY(i,t){i&1&&g(0,vY,0,0,"ng-template")}function bY(i,t){if(i&1&&(Z(0),g(1,yY,1,0,null,6),X()),i&2){let e=m();d(),l("ngTemplateOutlet",e.itemTemplate)("ngTemplateOutletContext",H(2,pb,e.item))}}function CY(i,t){if(i&1&&y(0,"span",12),i&2){let e=m(2);U(e.item.iconClass),l("ngClass",e.item.icon)("ngStyle",e.item.iconStyle)}}function IY(i,t){if(i&1&&(p(0,"span",13),_(1),h()),i&2){let e=m(2);d(),z(e.item.label)}}function wY(i,t){if(i&1&&(y(0,"span",14),ct(1,"safeHtml")),i&2){let e=m(2);l("innerHTML",Bt(1,1,e.item.label),fl)}}function TY(i,t){if(i&1&&(p(0,"span",15),_(1),h()),i&2){let e=m(2);l("ngClass",e.item.badgeStyleClass),d(),z(e.item.badge)}}function xY(i,t){if(i&1&&g(0,CY,1,4,"span",8)(1,IY,2,1,"span",9)(2,wY,2,3,"ng-template",null,10,dt)(4,TY,2,2,"span",11),i&2){let e=Le(3),n=m();l("ngIf",n.item.icon),d(),l("ngIf",n.item.escape!==!1)("ngIfElse",e),d(3),l("ngIf",n.item.badge)}}var SY=["list"],EY=["container"];function OY(i,t){i&1&&ie(0)}function MY(i,t){if(i&1&&(p(0,"div",8),g(1,OY,1,0,"ng-container",9),h()),i&2){let e=m(2);T("data-pc-section","start"),d(),l("ngTemplateOutlet",e.startTemplate)}}var hb=i=>({"p-hidden":i});function kY(i,t){if(i&1&&y(0,"li",13),i&2){let e=m().$implicit;l("ngClass",H(1,hb,e.visible===!1))}}function AY(i,t){if(i&1&&(p(0,"span"),_(1),h()),i&2){let e=m(2).$implicit;d(),z(e.label)}}function DY(i,t){if(i&1&&(y(0,"span",17),ct(1,"safeHtml")),i&2){let e=m(2).$implicit;l("innerHTML",Bt(1,1,e.label),fl)}}var PY=(i,t)=>({"p-hidden":i,flex:t});function RY(i,t){if(i&1&&(p(0,"li",14),g(1,AY,2,1,"span",15)(2,DY,2,3,"ng-template",null,16,dt),h()),i&2){let e=Le(3),n=m(),r=n.$implicit,o=n.index,s=m(3);l("ngClass",We(6,PY,r.visible===!1,r.visible))("tooltipOptions",r.tooltipOptions),T("data-automationid",r.automationId)("id",s.menuitemId(r,s.id,o)),d(),l("ngIf",r.escape!==!1)("ngIfElse",e)}}function VY(i,t){if(i&1&&y(0,"li",13),i&2){let e=m().$implicit,n=m().$implicit;l("ngClass",H(1,hb,e.visible===!1||n.visible===!1))}}var WO=(i,t,e)=>({"p-hidden":i,"p-focus":t,"p-disabled":e});function LY(i,t){if(i&1){let e=G();p(0,"li",19),A("onMenuItemClick",function(r){S(e);let o=m(),s=o.$implicit,a=o.index,c=m().index,u=m(3);return E(u.itemClick(r,u.menuitemId(s,u.id,c,a)))}),h()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m(),s=o.$implicit,a=o.index,c=m(3);U(n.styleClass),l("pMenuItemContent",n)("itemTemplate",c.itemTemplate)("ngClass",kt(13,WO,n.visible===!1||s.visible===!1,c.focusedOptionId()&&c.menuitemId(n,c.id,a,r)===c.focusedOptionId(),c.disabled(n.disabled)))("ngStyle",n.style)("tooltipOptions",n.tooltipOptions),T("data-pc-section","menuitem")("aria-label",c.label(n.label))("data-p-focused",c.isItemFocused(c.menuitemId(n,c.id,a,r)))("data-p-disabled",c.disabled(n.disabled))("aria-disabled",c.disabled(n.disabled))("id",c.menuitemId(n,c.id,a,r))}}function FY(i,t){if(i&1&&g(0,VY,1,3,"li",11)(1,LY,1,17,"li",18),i&2){let e=t.$implicit;l("ngIf",e.separator),d(),l("ngIf",!e.separator)}}function NY(i,t){if(i&1&&g(0,kY,1,3,"li",11)(1,RY,4,9,"li",12)(2,FY,2,2,"ng-template",10),i&2){let e=t.$implicit;l("ngIf",e.separator),d(),l("ngIf",!e.separator),d(),l("ngForOf",e.items)}}function BY(i,t){if(i&1&&g(0,NY,3,3,"ng-template",10),i&2){let e=m(2);l("ngForOf",e.model)}}function zY(i,t){if(i&1&&y(0,"li",13),i&2){let e=m().$implicit;l("ngClass",H(1,hb,e.visible===!1))}}function UY(i,t){if(i&1){let e=G();p(0,"li",19),A("onMenuItemClick",function(r){S(e);let o=m(),s=o.$implicit,a=o.index,c=m(3);return E(c.itemClick(r,c.menuitemId(s,c.id,a)))}),h()}if(i&2){let e=m(),n=e.$implicit,r=e.index,o=m(3);U(n.styleClass),l("pMenuItemContent",n)("itemTemplate",o.itemTemplate)("ngClass",kt(13,WO,n.visible===!1,o.focusedOptionId()&&o.menuitemId(n,o.id,r,o.j)===o.focusedOptionId(),o.disabled(n.disabled)))("ngStyle",n.style)("tooltipOptions",n.tooltipOptions),T("data-pc-section","menuitem")("aria-label",o.label(n.label))("data-p-focused",o.isItemFocused(o.menuitemId(n,o.id,r)))("data-p-disabled",o.disabled(n.disabled))("aria-disabled",o.disabled(n.disabled))("id",o.menuitemId(n,o.id,r))}}function jY(i,t){if(i&1&&g(0,zY,1,3,"li",11)(1,UY,1,17,"li",18),i&2){let e=t.$implicit;l("ngIf",e.separator),d(),l("ngIf",!e.separator)}}function HY(i,t){if(i&1&&g(0,jY,2,2,"ng-template",10),i&2){let e=m(2);l("ngForOf",e.model)}}function GY(i,t){i&1&&ie(0)}function $Y(i,t){if(i&1&&(p(0,"div",20),g(1,GY,1,0,"ng-container",9),h()),i&2){let e=m(2);T("data-pc-section","end"),d(),l("ngTemplateOutlet",e.endTemplate)}}var qY=i=>({"p-menu p-component":!0,"p-menu-overlay":i}),WY=(i,t)=>({showTransitionParams:i,hideTransitionParams:t}),KY=i=>({value:"visible",params:i});function QY(i,t){if(i&1){let e=G();p(0,"div",1,2),A("click",function(r){S(e);let o=m();return E(o.onOverlayClick(r))})("@overlayAnimation.start",function(r){S(e);let o=m();return E(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){S(e);let o=m();return E(o.onOverlayAnimationEnd(r))}),g(2,MY,2,2,"div",3),p(3,"ul",4,5),A("focus",function(r){S(e);let o=m();return E(o.onListFocus(r))})("blur",function(r){S(e);let o=m();return E(o.onListBlur(r))})("keydown",function(r){S(e);let o=m();return E(o.onListKeyDown(r))}),g(5,BY,1,1,null,6)(6,HY,1,1,null,6),h(),g(7,$Y,2,2,"div",7),h()}if(i&2){let e=m();U(e.styleClass),l("ngClass",H(18,qY,e.popup))("ngStyle",e.style)("@overlayAnimation",H(23,KY,We(20,WY,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.popup!==!0),T("data-pc-name","menu")("id",e.id),d(2),l("ngIf",e.startTemplate),d(),T("id",e.id+"_list")("tabindex",e.getTabIndexValue())("data-pc-section","menu")("aria-activedescendant",e.activedescendant())("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),d(2),l("ngIf",e.hasSubMenu()),d(),l("ngIf",!e.hasSubMenu()),d(),l("ngIf",e.endTemplate)}}var KO=(()=>{class i{platformId;sanitizer;constructor(e,n){this.platformId=e,this.sanitizer=n}transform(e){return!e||!ut(this.platformId)?e:this.sanitizer.bypassSecurityTrustHtml(e)}static \u0275fac=function(n){return new(n||i)(w(vt,16),w(rf,16))};static \u0275pipe=Tn({name:"safeHtml",type:i,pure:!0})}return i})(),YY=(()=>{class i{item;itemTemplate;onMenuItemClick=new L;menu;constructor(e){this.menu=e}onItemClick(e,n){this.onMenuItemClick.emit({originalEvent:e,item:n})}static \u0275fac=function(n){return new(n||i)(w(Tt(()=>mb)))};static \u0275cmp=k({type:i,selectors:[["","pMenuItemContent",""]],hostAttrs:[1,"p-element"],inputs:{item:[$t.None,"pMenuItemContent","item"],itemTemplate:"itemTemplate"},outputs:{onMenuItemClick:"onMenuItemClick"},attrs:uY,decls:5,vars:3,consts:[[1,"p-menuitem-content",3,"click"],[4,"ngIf"],["itemContent",""],["class","p-menuitem-link","pRipple","",3,"target","ngClass",4,"ngIf"],["routerLinkActive","p-menuitem-link-active","class","p-menuitem-link","pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",1,"p-menuitem-link",3,"target","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["routerLinkActive","p-menuitem-link-active","pRipple","",1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],["class","p-menuitem-icon",3,"ngClass","class","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlLabel",""],["class","p-menuitem-badge",3,"ngClass",4,"ngIf"],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],[1,"p-menuitem-badge",3,"ngClass"]],template:function(n,r){n&1&&(p(0,"div",0),A("click",function(s){return r.onItemClick(s,r.item)}),g(1,_Y,3,2,"ng-container",1)(2,bY,2,4,"ng-container",1)(3,xY,5,4,"ng-template",null,2,dt),h()),n&2&&(T("data-pc-section","content"),d(),l("ngIf",!r.itemTemplate),d(),l("ngIf",r.itemTemplate))},dependencies:[xe,Ie,rt,Ce,et,xu,ui,KO],encapsulation:2})}return i})(),mb=(()=>{class i{document;platformId;el;renderer;cd;config;overlayService;model;popup;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";ariaLabel;ariaLabelledBy;id;tabindex=0;onShow=new L;onHide=new L;onBlur=new L;onFocus=new L;listViewChild;containerViewChild;templates;startTemplate;endTemplate;itemTemplate;container;scrollHandler;documentClickListener;documentResizeListener;preventDocumentDefault;target;visible;focusedOptionId=yi(()=>this.focusedOptionIndex()!==-1?this.focusedOptionIndex():null);focusedOptionIndex=st(-1);selectedOptionIndex=st(-1);focused=!1;overlayVisible=!1;relativeAlign;constructor(e,n,r,o,s,a,c){this.document=e,this.platformId=n,this.el=r,this.renderer=o,this.cd=s,this.config=a,this.overlayService=c,this.id=this.id||Me()}toggle(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0}show(e){this.target=e.currentTarget,this.relativeAlign=e.relativeAlign,this.visible=!0,this.preventDocumentDefault=!0,this.overlayVisible=!0,this.cd.markForCheck()}ngOnInit(){this.popup||this.bindDocumentClickListener()}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"start":this.startTemplate=e.template;break;case"end":this.endTemplate=e.template;break;case"itemTemplate":this.itemTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}getTabIndexValue(){return this.tabindex!==void 0?this.tabindex.toString():null}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.container=e.element,this.moveOnTop(),this.onShow.emit({}),this.appendOverlay(),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),x.focus(this.listViewChild.nativeElement),this.changeFocusedOptionIndex(0));break;case"void":this.onOverlayHide(),this.onHide.emit({});break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.autoZIndex&&Pt.clear(e.element);break}}alignOverlay(){this.relativeAlign?x.relativePosition(this.container,this.target):x.absolutePosition(this.container,this.target)}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.container):x.appendChild(this.container,this.appendTo))}restoreOverlayAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.container)}moveOnTop(){this.autoZIndex&&Pt.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(){this.visible=!1,this.relativeAlign=!1,this.cd.markForCheck()}onWindowResize(){this.visible&&!x.isTouchDevice()&&this.hide()}menuitemId(e,n,r,o){return e?.id??`${n}_${r}${o!==void 0?"_"+o:""}`}isItemFocused(e){return this.focusedOptionId()===e}label(e){return typeof e=="function"?e():e}disabled(e){return typeof e=="function"?e():typeof e>"u"?!1:e}activedescendant(){return this.focused?this.focusedOptionId():void 0}onListFocus(e){this.focused||(this.focused=!0,this.popup||(this.selectedOptionIndex()!==-1?(this.changeFocusedOptionIndex(this.selectedOptionIndex()),this.selectedOptionIndex.set(-1)):this.changeFocusedOptionIndex(0)),this.onFocus.emit(e))}onListBlur(e){this.focused&&(this.focused=!1,this.changeFocusedOptionIndex(-1),this.selectedOptionIndex.set(-1),this.focusedOptionIndex.set(-1),this.onBlur.emit(e))}onListKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":case"Tab":this.popup&&(x.focus(this.target),this.hide()),this.overlayVisible&&this.hide();break;default:break}}onArrowDownKey(e){let n=this.findNextOptionIndex(this.focusedOptionIndex());this.changeFocusedOptionIndex(n),e.preventDefault()}onArrowUpKey(e){if(e.altKey&&this.popup)x.focus(this.target),this.hide(),e.preventDefault();else{let n=this.findPrevOptionIndex(this.focusedOptionIndex());this.changeFocusedOptionIndex(n),e.preventDefault()}}onHomeKey(e){this.changeFocusedOptionIndex(0),e.preventDefault()}onEndKey(e){this.changeFocusedOptionIndex(x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()}onEnterKey(e){let n=x.findSingle(this.containerViewChild.nativeElement,`li[id="${`${this.focusedOptionIndex()}`}"]`),r=n&&x.findSingle(n,'a[data-pc-section="action"]');this.popup&&x.focus(this.target),r?r.click():n&&n.click(),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}findNextOptionIndex(e){let r=[...x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]')].findIndex(o=>o.id===e);return r>-1?r+1:0}findPrevOptionIndex(e){let r=[...x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]')].findIndex(o=>o.id===e);return r>-1?r-1:0}changeFocusedOptionIndex(e){let n=x.find(this.containerViewChild.nativeElement,'li[data-pc-section="menuitem"][data-p-disabled="false"]');if(n.length>0){let r=e>=n.length?n.length-1:e<0?0:e;r>-1&&this.focusedOptionIndex.set(n[r].getAttribute("id"))}}itemClick(e,n){let{originalEvent:r,item:o}=e;if(this.focused||(this.focused=!0,this.onFocus.emit()),o.disabled){r.preventDefault();return}!o.url&&!o.routerLink&&r.preventDefault(),o.command&&o.command({originalEvent:r,item:o}),this.popup&&this.hide(),!this.popup&&this.focusedOptionIndex()!==n&&this.focusedOptionIndex.set(n)}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.preventDocumentDefault=!0}bindDocumentClickListener(){if(!this.documentClickListener&&ut(this.platformId)){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",n=>{let r=this.containerViewChild.nativeElement&&!this.containerViewChild.nativeElement.contains(n.target),o=!(this.target&&(this.target===n.target||this.target.contains(n.target)));!this.popup&&r&&o&&this.onListBlur(n),this.preventDocumentDefault&&this.overlayVisible&&r&&o&&(this.hide(),this.preventDocumentDefault=!1)})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){if(!this.documentResizeListener&&ut(this.platformId)){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,"resize",this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){!this.scrollHandler&&ut(this.platformId)&&(this.scrollHandler=new kn(this.target,()=>{this.visible&&this.hide()})),this.scrollHandler?.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&Pt.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide()),this.popup||this.unbindDocumentClickListener()}hasSubMenu(){if(this.model){for(var e of this.model)if(e.items)return!0}return!1}isItemHidden(e){return e.separator?e.visible===!1||e.items&&e.items.some(n=>n.visible!==!1):e.visible===!1}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(ve),w(nt),w(Ne),w(At),w(Mn))};static \u0275cmp=k({type:i,selectors:[["p-menu"]],contentQueries:function(n,r,o){if(n&1&&De(o,he,4),n&2){let s;q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(SY,5),oe(EY,5)),n&2){let o;q(o=W())&&(r.listViewChild=o.first),q(o=W())&&(r.containerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",popup:"popup",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",id:"id",tabindex:"tabindex"},outputs:{onShow:"onShow",onHide:"onHide",onBlur:"onBlur",onFocus:"onFocus"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],["container",""],["class","p-menu-start",4,"ngIf"],["role","menu",1,"p-menu-list","p-reset",3,"focus","blur","keydown"],["list",""],[4,"ngIf"],["class","p-menu-end",4,"ngIf"],[1,"p-menu-start"],[4,"ngTemplateOutlet"],["ngFor","",3,"ngForOf"],["class","p-menuitem-separator","role","separator",3,"ngClass",4,"ngIf"],["class","p-submenu-header","pTooltip","","role","none",3,"ngClass","tooltipOptions",4,"ngIf"],["role","separator",1,"p-menuitem-separator",3,"ngClass"],["pTooltip","","role","none",1,"p-submenu-header",3,"ngClass","tooltipOptions"],[4,"ngIf","ngIfElse"],["htmlSubmenuLabel",""],[3,"innerHTML"],["class","p-menuitem","pTooltip","","role","menuitem",3,"pMenuItemContent","itemTemplate","ngClass","ngStyle","class","tooltipOptions","onMenuItemClick",4,"ngIf"],["pTooltip","","role","menuitem",1,"p-menuitem",3,"pMenuItemContent","itemTemplate","ngClass","ngStyle","tooltipOptions","onMenuItemClick"],[1,"p-menu-end"]],template:function(n,r){n&1&&g(0,QY,8,25,"div",0),n&2&&l("ngIf",!r.popup||r.visible)},dependencies:[xe,Vt,Ie,rt,Ce,Ro,YY,KO],styles:[`@layer primeng{.p-menu-overlay{position:absolute;top:0;left:0}.p-menu ul{margin:0;padding:0;list-style:none}.p-menu .p-submenu-header{align-items:center}.p-menu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-menu .p-menuitem-text{line-height:1}} +`],encapsulation:2,data:{animation:[rn("overlayAnimation",[ei(":enter",[Lt({opacity:0,transform:"scaleY(0.8)"}),Xt("{{showTransitionParams}}")]),ei(":leave",[Xt("{{hideTransitionParams}}",Lt({opacity:0}))])])]},changeDetection:0})}return i})(),QO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Ve,Rt,Pn,Ve,Pn]})}return i})();function XY(i,t){if(i&1&&(p(0,"span",4),_(1),h()),i&2){let e=m();d(),z(e.label)}}function JY(i,t){if(i&1&&y(0,"span",6),i&2){let e=m(2);U(e.icon),l("ngClass","p-avatar-icon")}}function eZ(i,t){if(i&1&&g(0,JY,1,3,"span",5),i&2){let e=m(),n=Le(6);l("ngIf",e.icon)("ngIfElse",n)}}function tZ(i,t){if(i&1){let e=G();p(0,"img",8),A("error",function(r){S(e);let o=m(2);return E(o.imageError(r))}),h()}if(i&2){let e=m(2);l("src",e.image,qe),T("aria-label",e.ariaLabel)}}function iZ(i,t){if(i&1&&g(0,tZ,1,2,"img",7),i&2){let e=m();l("ngIf",e.image)}}var nZ=["*"],YO=(()=>{class i{label;icon;image;size="normal";shape="square";style;styleClass;ariaLabel;ariaLabelledBy;onImageError=new L;containerClass(){return{"p-avatar p-component":!0,"p-avatar-image":this.image!=null,"p-avatar-circle":this.shape==="circle","p-avatar-lg":this.size==="large","p-avatar-xl":this.size==="xlarge"}}imageError(e){this.onImageError.emit(e)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=k({type:i,selectors:[["p-avatar"]],hostAttrs:[1,"p-element"],inputs:{label:"label",icon:"icon",image:"image",size:"size",shape:"shape",style:"style",styleClass:"styleClass",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy"},outputs:{onImageError:"onImageError"},ngContentSelectors:nZ,decls:7,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-avatar-text",4,"ngIf","ngIfElse"],["iconTemplate",""],["imageTemplate",""],[1,"p-avatar-text"],[3,"class","ngClass",4,"ngIf","ngIfElse"],[3,"ngClass"],[3,"src","error",4,"ngIf"],[3,"src","error"]],template:function(n,r){if(n&1&&(Ue(),p(0,"div",0),Ae(1),g(2,XY,2,1,"span",1)(3,eZ,1,2,"ng-template",null,2,dt)(5,iZ,1,1,"ng-template",null,3,dt),h()),n&2){let o=Le(4);U(r.styleClass),l("ngClass",r.containerClass())("ngStyle",r.style),T("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("data-pc-name","avatar"),d(2),l("ngIf",r.label)("ngIfElse",o)}},dependencies:[xe,Ie,Ce],styles:[`@layer primeng{.p-avatar{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:1rem}.p-avatar.p-avatar-image{background-color:transparent}.p-avatar.p-avatar-circle{border-radius:50%;overflow:hidden}.p-avatar .p-avatar-icon{font-size:1rem}.p-avatar img{width:100%;height:100%}} `],encapsulation:2,changeDetection:0})}return i})(),ZO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var oZ=["input"],sZ=(i,t,e)=>({"p-inputswitch p-component":!0,"p-inputswitch-checked":i,"p-disabled":t,"p-focus":e}),aZ={provide:zt,useExisting:Tt(()=>fb),multi:!0},fb=(()=>{class i{cd;style;styleClass;tabindex;inputId;name;disabled;readonly;trueValue=!0;falseValue=!1;ariaLabel;ariaLabelledBy;onChange=new L;input;modelValue=!1;focused=!1;onModelChange=()=>{};onModelTouched=()=>{};constructor(e){this.cd=e}onClick(e){!this.disabled&&!this.readonly&&(this.modelValue=this.checked()?this.falseValue:this.trueValue,this.onModelChange(this.modelValue),this.onChange.emit({originalEvent:e,checked:this.modelValue}),e.preventDefault(),this.input.nativeElement.focus())}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}writeValue(e){this.modelValue=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.modelValue===this.trueValue}static \u0275fac=function(n){return new(n||i)(w(Ne))};static \u0275cmp=k({type:i,selectors:[["p-inputSwitch"]],viewQuery:function(n,r){if(n&1&&oe(oZ,5),n&2){let o;q(o=W())&&(r.input=o.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",tabindex:"tabindex",inputId:"inputId",name:"name",disabled:"disabled",readonly:"readonly",trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy"},outputs:{onChange:"onChange"},features:[mt([aZ])],decls:5,vars:22,consts:[[3,"ngClass","ngStyle","click"],[1,"p-hidden-accessible"],["type","checkbox","role","switch",3,"checked","disabled","focus","blur"],["input",""],[1,"p-inputswitch-slider"]],template:function(n,r){n&1&&(p(0,"div",0),A("click",function(s){return r.onClick(s)}),p(1,"div",1)(2,"input",2,3),A("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()}),h()(),y(4,"span",4),h()),n&2&&(U(r.styleClass),l("ngClass",kt(18,sZ,r.checked(),r.disabled,r.focused))("ngStyle",r.style),T("data-pc-name","inputswitch")("data-pc-section","root"),d(),T("data-pc-section","hiddenInputWrapper")("data-p-hidden-accessible",!0),d(),l("checked",r.checked())("disabled",r.disabled),T("id",r.inputId)("aria-checked",r.checked())("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("name",r.name)("tabindex",r.tabindex)("data-pc-section","hiddenInput"),d(2),T("data-pc-section","slider"))},dependencies:[xe,Ce],styles:[`@layer primeng{.p-inputswitch{position:relative;display:inline-block;-webkit-user-select:none;user-select:none}.p-inputswitch-slider{position:absolute;cursor:pointer;inset:0;border:1px solid transparent}.p-inputswitch-slider:before{position:absolute;content:"";top:50%}} -`],encapsulation:2,changeDetection:0})}return i})(),XO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var D1e=Pr([Lt({transform:"{{transform}}",opacity:0}),Xt("{{transition}}")]),P1e=Pr([Xt("{{transition}}",Lt({transform:"{{transform}}",opacity:0}))]);var JO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,Te,pt,Te]})}return i})();var hm=(()=>{let t=class t{constructor(){}updateTheme(n){let r=document.getElementById("theme-style");r.href=`${r.href.slice(0,r.href.length-23)}showbiz-${n}-theme.css`}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function cZ(i,t){if(i&1&&(p(0,"a",12),y(1,"i"),p(2,"span"),_(3),h()()),i&2){let e=t.$implicit;l("routerLink",e.routerLink),d(),U(e.icon),d(2),z(e.label)}}function dZ(i,t){if(i&1&&(p(0,"div",13),y(1,"app-auto-complete-card",14),h()),i&2){let e=t.$implicit;d(),l("item",e)}}var uZ=()=>({display:"flex",marginRight:"3px"}),pZ=()=>({paddingRight:"2rem"}),hZ=()=>({scale:"0.7",fontSize:"2rem"}),tM=(()=>{let t=class t{constructor(n,r,o,s){this.tmdbService=n,this.router=r,this.authService=o,this.themeService=s,this.userImg="",this.navigationMenu=[{label:"Menu",items:[{label:"Home",icon:"pi pi-home",routerLink:"/home"},{label:"Discover+",icon:"pi pi-map",routerLink:"/discover"},{label:"Trending",icon:"pi pi-chart-bar",routerLink:"/trending"},{label:"Movies",icon:"pi pi-video",routerLink:"/movies"},{label:"TV Shows",icon:"pi pi-play",routerLink:"/tvshows"},{label:"Celebrities",icon:"pi pi-users",routerLink:"/celebrities"}]}],this.userMenu=[{label:"ShowbizHub",items:[{label:"Login",icon:"pi pi-sign-in",routerLink:"/login"},{label:"User Settings",icon:"pi pi-user",routerLink:"/settings"}]}],this.sidebarVisible=!1,this.results=[],this.items=[{label:"Home",icon:"pi pi-fw pi-power-off",routerLink:"/home"},{label:"Discover+",icon:"pi pi-fw pi-power-off",routerLink:"/discover"},{label:"Trending",icon:"pi pi-fw pi-power-off",routerLink:"/trending"},{label:"Movies",icon:"pi pi-fw pi-power-off",routerLink:"/movies"}],this.searchForm=new on({query:new ti(""),theme:new ti(!1)}),this.currentQuery="",this.dropdownMode="blank";let a=o.getLoggedInUser();if(a.demoAccount)this.currentUser=a,this.searchForm.get("theme")?.setValue(a.dark_mode);else{let{user:c,data:u}=a;this.currentUser=a,this.userMenu[0].label=u.username,this.userMenu[0].items[0]={label:"Logout",icon:"pi pi-sign-out",routerLink:null,command:()=>{localStorage.removeItem("user"),this.router.navigate(["/login"]),window.location.reload()}},this.userMenu[0].items[2]={label:"Favorites",icon:"pi pi-heart-fill",routerLink:"/favorites"},this.searchForm.get("theme")?.setValue(u.dark_mode)}}switchTheme(n){if(this.currentUser.demoAccount)localStorage.setItem("user",JSON.stringify(pe(F({},this.currentUser),{dark_mode:!this.currentUser.dark_mode}))),n.checked?this.themeService.updateTheme("night"):this.themeService.updateTheme("light");else{let r=pe(F({},this.currentUser.data),{dark_mode:!this.currentUser.data.dark_mode});this.themeService.updateTheme(r.dark_mode?"night":"light"),this.authService.updateUserData(r,this.currentUser.user.id).then(()=>{localStorage.setItem("user",JSON.stringify({user:this.currentUser.user,data:r})),this.currentUser.data=r})}}filterResults(n){this.currentQuery=n.query,this.getResults(n.query)}initSearch(n){if(console.log(n),n.code=="Enter"||n=="button"){if(this.searchForm.value.query==="")return;this.dropdownMode="blank",this.router.navigate([`/search/${this.currentQuery}`]),this.tmdbService.setState({searchQuery:this.currentQuery}),this.searchForm.get("query")?.setValue(this.currentQuery),this.results=[]}else this.dropdownMode="current"}getResults(n){this.tmdbService.getTMDBData("search/multi",{query:n}).subscribe(r=>{this.results=r.results})}gotoResult(){let n=this.searchForm.value.query.media_type,r=this.searchForm.value.query.id;n==="movie"?this.router.navigate([`movies/${r}`]):n==="tv"?this.router.navigate([`tvshows/${r}`]):n==="person"&&this.router.navigate([`celebrities/${r}`])}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(bt),w(Kt),w(hm))},t.\u0275cmp=k({type:t,selectors:[["app-header"]],standalone:!0,features:[R],decls:20,vars:18,consts:[["routerLink","home",1,"logo"],[3,"formGroup","ngSubmit"],["formControlName","theme","label","Dark Mode",3,"onChange"],["formControlName","query","field","name","placeholder","Search","bl","","dropdownIcon","pi-search",3,"suggestions","autoOptionFocus","dropdownMode","inputStyle","completeMethod","onKeyUp","onSelect"],["pTemplate","item"],["type","submit","icon","pi pi-search",3,"rounded"],["image","https://firebasestorage.googleapis.com/v0/b/showbizhub-4f1b9.appspot.com/o/logo.png?alt=media&token=42e394a6-9ef3-463c-8e0c-ea52869de015","styleClass","mr-2","size","normal","shape","circle",3,"click"],[3,"model","popup"],["menu",""],[1,"menu-btn",3,"click"],[1,"pi","pi-bars"],["navmenu",""],["routerLinkActive","active",3,"routerLink"],[1,"flex","align-items-center","gap-2"],[3,"item"]],template:function(r,o){if(r&1){let s=G();p(0,"header")(1,"a",0),_(2," Showbiz"),p(3,"span"),_(4,"Hub."),h()(),p(5,"nav"),Yt(6,cZ,4,4,"a",12,di),h(),p(8,"form",1),A("ngSubmit",function(){return o.initSearch("button")}),p(9,"p-inputSwitch",2),A("onChange",function(c){return o.switchTheme(c)}),h(),p(10,"p-autoComplete",3),A("completeMethod",function(c){return o.filterResults(c)})("onKeyUp",function(c){return o.initSearch(c)})("onSelect",function(){return o.gotoResult()}),g(11,dZ,2,1,"ng-template",4),h(),y(12,"p-button",5),h(),p(13,"p-avatar",6),A("click",function(c){S(s);let u=Le(15);return E(u.toggle(c))}),y(14,"p-menu",7,8),h(),p(16,"button",9),A("click",function(c){S(s);let u=Le(19);return E(u.toggle(c))}),y(17,"i",10),h(),y(18,"p-menu",7,11),h()}r&2&&(d(6),Zt(o.navigationMenu[0].items),d(2),l("formGroup",o.searchForm),d(),xt(Ke(15,uZ)),d(),l("suggestions",o.results)("autoOptionFocus",!1)("dropdownMode",o.dropdownMode)("inputStyle",Ke(16,pZ)),d(2),xt(Ke(17,hZ)),l("rounded",!0)("rounded",!0),d(2),l("model",o.userMenu)("popup",!0),d(4),l("model",o.navigationMenu)("popup",!0))},dependencies:[$,Ve,et,xu,Za,fd,he,Bi,an,ii,sn,Qi,Yi,UO,$O,yt,ni,QO,mb,ZO,YO,or,XO,fb,JO],styles:["header[_ngcontent-%COMP%]{padding:0 1rem;display:flex;align-items:center;justify-content:space-between;position:sticky;top:10px;margin:0 10px;left:0;border-radius:2rem;background-color:var(--header-bg);box-shadow:0 0 7px #0000002c;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:100;margin-bottom:1rem}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{border-radius:5px;font-size:1.6em;color:var(--surface-800);padding:3px;cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;font-weight:7000;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-color);text-transform:uppercase;font-weight:700;margin-left:2px}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5em}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;font-weight:500;color:var(--surface-800);display:flex;align-items:center;gap:.3rem;justify-content:center}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--primary-color)}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--primary-color);font-size:.8rem}header[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;align-items:center;margin:3px 0 3px auto;padding-right:2px}header[_ngcontent-%COMP%] form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-right:3px;font-size:.8em;color:var(--surface-800)}header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]{border:0;outline:0;background-color:transparent;color:var(--primary-color);display:none;cursor:pointer}header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]:hover{filter:brightness(110%)}@media screen and (max-width: 1100px){header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]{display:flex;align-items:center}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 480px){header[_ngcontent-%COMP%]{margin:0 5px;bottom:0;left:0;width:calc(100% - 10px);top:5px;border-radius:10px;padding:.5rem 1rem;-webkit-backdrop-filter:blur(0) brightness(0);backdrop-filter:blur(0) brightness(0)}header[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:none}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{display:none}header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]{display:none}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;gap:.4rem;margin-right:auto}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:2rem;padding:.4rem;background-color:var(--surface-800);border-radius:50%;transition:all .5s;position:relative;translate:0 -.2rem}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;margin:0 .2rem}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-color)}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;bottom:-1rem;font-size:5px;font-weight:300}}"]});let i=t;return i})();var iM=(()=>{class i{constructor(e,n){let r=n.useRef("router");e.events.subscribe(o=>{let s=this.getCurrentNavigationState(e);s&&s.ignoreLoadingBar||(o instanceof co&&r.start(),(o instanceof Xo||o instanceof hn||o instanceof nr)&&r.complete())})}getCurrentNavigationState(e){let n=e.getCurrentNavigation&&e.getCurrentNavigation();return n&&n.extras?n.extras.state:{}}}return i.\u0275fac=function(e){return new(e||i)(J(bt),J(cd))},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({imports:[[Ve,wr],Ve,wr]}),i})();var nM=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.latest={movie:{},tv:{},celebrity:{}},this.getLatest("movie"),this.getLatest("person"),this.getLatest("tv")}getLatest(n){this.tmdbService.getTMDBData(`${n}/latest`).subscribe(r=>D(this,null,function*(){n=="movie"?this.latest.movie=yield r:n=="tv"?this.latest.tv=yield r:this.latest.celebrity=yield r}))}setSlides(){let n=document.getElementById("displayContainer"),r=[];for(let o of this.latest)(o.poster_path||o.profile_path)&&r.push(o);r.length>0&&setInterval(()=>{n.style.backgroundImage=`url(http://image.tmdb.org/t/p/original${r[0].profile_path||r[0].poster_path})`},5e3)}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-footer"]],standalone:!0,features:[R],decls:49,vars:6,consts:[[1,"grid-container"],[1,"about"],[1,"latest"],[3,"routerLink"],[1,"links"],["routerLink","/discover/"],["routerLink","/movies/"],["routerLink","/tvshows/"],["routerLink","/celebrities/"],["routerLink","/trending/"],["routerLink","/login/"],["routerLink","/signup/"],[1,"bottom-footer"]],template:function(r,o){r&1&&(p(0,"footer")(1,"div",0)(2,"div",1)(3,"h1"),_(4,"About"),h(),p(5,"p"),_(6," Welcome to our "),p(7,"span"),_(8,"Showbizhub"),h(),_(9,", A wide range Entertainment to help you get the latest information about movies, tvshows, celebrities, seasons and episodes. This app is just a demo of TMDB Api. It uses TMDB Api to get latest updates about movies, tvshows etc. Frontend of the app is designed with angular 17 with multiple npm packages. Explore the latest trends in the world of entertainment. "),h()(),p(10,"div",2)(11,"h1"),_(12,"Latest"),h(),p(13,"ul")(14,"li")(15,"a",3)(16,"span"),_(17,"Movie"),h(),_(18),h()(),p(19,"li")(20,"a",3)(21,"span"),_(22,"TV Show"),h(),_(23),h()(),p(24,"li")(25,"a",3)(26,"span"),_(27,"Celebrity"),h(),_(28),h()()()(),p(29,"div",4)(30,"h1"),_(31,"Links"),h(),p(32,"nav")(33,"a",5),_(34,"Discover+"),h(),p(35,"a",6),_(36,"Explore Movies"),h(),p(37,"a",7),_(38,"Explore TV Shows"),h(),p(39,"a",8),_(40,"Explore Celebrities"),h(),p(41,"a",9),_(42,"Trending"),h(),p(43,"a",10),_(44,"Login"),h(),p(45,"a",11),_(46,"Register"),h()()()(),p(47,"div",12),_(48,"This app is demo of TMDB Api, Developed & Designed in Angular by Shahzad Ameer"),h()()),r&2&&(d(15),l("routerLink","/movies/"+(o.latest==null||o.latest.movie==null?null:o.latest.movie.id)),d(3),be(" ",o.latest==null||o.latest.movie==null?null:o.latest.movie.title,""),d(2),l("routerLink","/tvshow/"+(o.latest==null||o.latest.tv==null?null:o.latest.tv.id)),d(3),be(" ",o.latest==null||o.latest.tv==null?null:o.latest.tv.name,""),d(2),l("routerLink","/celebrity/"+(o.latest==null||o.latest.celebrity==null?null:o.latest.celebrity.id)),d(3),be(" ",o.latest==null||o.latest.celebrity==null?null:o.latest.celebrity.name,""))},dependencies:[Ve,et],styles:["footer[_ngcontent-%COMP%]{padding:2rem;border-top:1px solid var(--accent);margin-top:1rem}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{border-left:3px solid var(--accent);padding-left:1rem}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--accent);font-weight:500}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-transform:capitalize}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{height:calc(100% - 3rem)}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:0}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--accent)}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--surface-800);font-weight:500}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;flex-direction:column}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color);font-weight:500}footer[_ngcontent-%COMP%] .bottom-footer[_ngcontent-%COMP%]{text-align:center;border-top:1px solid #111111;padding:1rem;text-transform:capitalize}"]});let i=t;return i})();var mZ=["titlebar"],fZ=["content"],gZ=["footer"];function _Z(i,t){i&1&&ie(0)}function vZ(i,t){if(i&1&&(Z(0),g(1,_Z,1,0,"ng-container",7),X()),i&2){let e=m(3);d(),l("ngTemplateOutlet",e.headlessTemplate)}}function yZ(i,t){if(i&1){let e=G();p(0,"div",13),A("mousedown",function(r){S(e);let o=m(4);return E(o.initResize(r))}),h()}}function bZ(i,t){if(i&1&&(p(0,"span",20),_(1),h()),i&2){let e=m(5);l("id",e.getAriaLabelledBy()),d(),z(e.header)}}function CZ(i,t){if(i&1&&(p(0,"span",20),Ae(1,1),h()),i&2){let e=m(5);l("id",e.getAriaLabelledBy())}}function IZ(i,t){i&1&&ie(0)}function wZ(i,t){if(i&1&&y(0,"span",24),i&2){let e=m(6);l("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}function TZ(i,t){i&1&&y(0,"WindowMaximizeIcon",26),i&2&&l("styleClass","p-dialog-header-maximize-icon")}function xZ(i,t){i&1&&y(0,"WindowMinimizeIcon",26),i&2&&l("styleClass","p-dialog-header-maximize-icon")}function SZ(i,t){if(i&1&&(Z(0),g(1,TZ,1,1,"WindowMaximizeIcon",25)(2,xZ,1,1,"WindowMinimizeIcon",25),X()),i&2){let e=m(6);d(),l("ngIf",!e.maximized&&!e.maximizeIconTemplate),d(),l("ngIf",e.maximized&&!e.minimizeIconTemplate)}}function EZ(i,t){}function OZ(i,t){i&1&&g(0,EZ,0,0,"ng-template")}function MZ(i,t){if(i&1&&(Z(0),g(1,OZ,1,0,null,7),X()),i&2){let e=m(6);d(),l("ngTemplateOutlet",e.maximizeIconTemplate)}}function kZ(i,t){}function AZ(i,t){i&1&&g(0,kZ,0,0,"ng-template")}function DZ(i,t){if(i&1&&(Z(0),g(1,AZ,1,0,null,7),X()),i&2){let e=m(6);d(),l("ngTemplateOutlet",e.minimizeIconTemplate)}}var PZ=()=>({"p-dialog-header-icon p-dialog-header-maximize p-link":!0});function RZ(i,t){if(i&1){let e=G();p(0,"button",21),A("click",function(){S(e);let r=m(5);return E(r.maximize())})("keydown.enter",function(){S(e);let r=m(5);return E(r.maximize())}),g(1,wZ,1,1,"span",22)(2,SZ,3,2,"ng-container",23)(3,MZ,2,1,"ng-container",23)(4,DZ,2,1,"ng-container",23),h()}if(i&2){let e=m(5);l("ngClass",Ke(5,PZ)),d(),l("ngIf",e.maximizeIcon&&!e.maximizeIconTemplate&&!e.minimizeIconTemplate),d(),l("ngIf",!e.maximizeIcon),d(),l("ngIf",!e.maximized),d(),l("ngIf",e.maximized)}}function VZ(i,t){if(i&1&&y(0,"span",29),i&2){let e=m(7);l("ngClass",e.closeIcon)}}function LZ(i,t){i&1&&y(0,"TimesIcon",26),i&2&&l("styleClass","p-dialog-header-close-icon")}function FZ(i,t){if(i&1&&(Z(0),g(1,VZ,1,1,"span",28)(2,LZ,1,1,"TimesIcon",25),X()),i&2){let e=m(6);d(),l("ngIf",e.closeIcon),d(),l("ngIf",!e.closeIcon)}}function NZ(i,t){}function BZ(i,t){i&1&&g(0,NZ,0,0,"ng-template")}function zZ(i,t){if(i&1&&(p(0,"span"),g(1,BZ,1,0,null,7),h()),i&2){let e=m(6);d(),l("ngTemplateOutlet",e.closeIconTemplate)}}var UZ=()=>({"p-dialog-header-icon p-dialog-header-close p-link":!0});function jZ(i,t){if(i&1){let e=G();p(0,"button",27),A("click",function(r){S(e);let o=m(5);return E(o.close(r))})("keydown.enter",function(r){S(e);let o=m(5);return E(o.close(r))}),g(1,FZ,3,2,"ng-container",23)(2,zZ,2,1,"span",23),h()}if(i&2){let e=m(5);l("ngClass",Ke(5,UZ)),T("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),d(),l("ngIf",!e.closeIconTemplate),d(),l("ngIf",e.closeIconTemplate)}}function HZ(i,t){if(i&1){let e=G();p(0,"div",14,15),A("mousedown",function(r){S(e);let o=m(4);return E(o.initDrag(r))}),g(2,bZ,2,2,"span",16)(3,CZ,2,1,"span",16)(4,IZ,1,0,"ng-container",7),p(5,"div",17),g(6,RZ,5,6,"button",18)(7,jZ,3,6,"button",19),h()()}if(i&2){let e=m(4);d(2),l("ngIf",!e.headerFacet&&!e.headerTemplate),d(),l("ngIf",e.headerFacet),d(),l("ngTemplateOutlet",e.headerTemplate),d(2),l("ngIf",e.maximizable),d(),l("ngIf",e.closable)}}function GZ(i,t){i&1&&ie(0)}function $Z(i,t){i&1&&ie(0)}function qZ(i,t){if(i&1&&(p(0,"div",30,31),Ae(2,2),g(3,$Z,1,0,"ng-container",7),h()),i&2){let e=m(4);d(3),l("ngTemplateOutlet",e.footerTemplate)}}function WZ(i,t){if(i&1&&(g(0,yZ,1,0,"div",8)(1,HZ,8,5,"div",9),p(2,"div",10,11),Ae(4),g(5,GZ,1,0,"ng-container",7),h(),g(6,qZ,4,1,"div",12)),i&2){let e=m(3);l("ngIf",e.resizable),d(),l("ngIf",e.showHeader),d(),U(e.contentStyleClass),l("ngClass","p-dialog-content")("ngStyle",e.contentStyle),d(3),l("ngTemplateOutlet",e.contentTemplate),d(),l("ngIf",e.footerFacet||e.footerTemplate)}}var KZ=(i,t,e,n)=>({"p-dialog p-component":!0,"p-dialog-rtl":i,"p-dialog-draggable":t,"p-dialog-resizable":e,"p-dialog-maximized":n}),QZ=(i,t)=>({transform:i,transition:t}),YZ=i=>({value:"visible",params:i});function ZZ(i,t){if(i&1){let e=G();p(0,"div",3,4),A("@animation.start",function(r){S(e);let o=m(2);return E(o.onAnimationStart(r))})("@animation.done",function(r){S(e);let o=m(2);return E(o.onAnimationEnd(r))}),g(2,vZ,2,1,"ng-container",5)(3,WZ,7,8,"ng-template",null,6,dt),h()}if(i&2){let e=Le(4),n=m(2);U(n.styleClass),l("ngClass",Dr(10,KZ,n.rtl,n.draggable,n.resizable,n.maximized))("ngStyle",n.style)("pFocusTrapDisabled",n.focusTrap===!1)("@animation",H(18,YZ,We(15,QZ,n.transformOptions,n.transitionOptions))),T("aria-labelledby",n.ariaLabelledBy)("aria-modal",!0),d(2),l("ngIf",n.headlessTemplate)("ngIfElse",e)}}var XZ=(i,t,e,n,r,o,s,a,c,u)=>({"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":i,"p-dialog-mask-scrollblocker":t,"p-dialog-left":e,"p-dialog-right":n,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":c,"p-dialog-bottom-right":u});function JZ(i,t){if(i&1&&(p(0,"div",1),g(1,ZZ,5,20,"div",2),h()),i&2){let e=m();xt(e.maskStyle),U(e.maskStyleClass),l("ngClass",Ud(6,XZ,[e.modal,e.modal||e.blockScroll,e.position==="left",e.position==="right",e.position==="top",e.position==="topleft"||e.position==="top-left",e.position==="topright"||e.position==="top-right",e.position==="bottom",e.position==="bottomleft"||e.position==="bottom-left",e.position==="bottomright"||e.position==="bottom-right"])),d(),l("ngIf",e.visible)}}var eX=["*",[["p-header"]],[["p-footer"]]],tX=["*","p-header","p-footer"],iX=Pr([Lt({transform:"{{transform}}",opacity:0}),Xt("{{transition}}")]),nX=Pr([Xt("{{transition}}",Lt({transform:"{{transform}}",opacity:0}))]),rM=(()=>{class i{document;platformId;el;renderer;zone;cd;config;header;draggable=!0;resizable=!0;get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}contentStyle;contentStyleClass;modal=!1;closeOnEscape=!0;dismissableMask=!1;rtl=!1;closable=!0;get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}appendTo;breakpoints;styleClass;maskStyleClass;maskStyle;showHeader=!0;get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}blockScroll=!1;autoZIndex=!0;baseZIndex=0;minX=0;minY=0;focusOnShow=!0;maximizable=!1;keepInViewport=!0;focusTrap=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";closeIcon;closeAriaLabel;closeTabindex="-1";minimizeIcon;maximizeIcon;get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style=F({},e),this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)";break}}onShow=new L;onHide=new L;visibleChange=new L;onResizeInit=new L;onResizeEnd=new L;onDragEnd=new L;onMaximize=new L;headerFacet;footerFacet;templates;headerViewChild;contentViewChild;footerViewChild;headerTemplate;contentTemplate;footerTemplate;maximizeIconTemplate;closeIconTemplate;minimizeIconTemplate;headlessTemplate;_visible=!1;maskVisible;container;wrapper;dragging;ariaLabelledBy;documentDragListener;documentDragEndListener;resizing;documentResizeListener;documentResizeEndListener;documentEscapeListener;maskClickListener;lastPageX;lastPageY;preventVisibleChangePropagation;maximized;preMaximizeContentHeight;preMaximizeContainerWidth;preMaximizeContainerHeight;preMaximizePageX;preMaximizePageY;id=Me();_style={};_position="center";originalStyle;transformOptions="scale(0.7)";styleElement;window;constructor(e,n,r,o,s,a,c){this.document=e,this.platformId=n,this.el=r,this.renderer=o,this.zone=s,this.cd=a,this.config=c,this.window=this.document.defaultView}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"closeicon":this.closeIconTemplate=e.template;break;case"maximizeicon":this.maximizeIconTemplate=e.template;break;case"minimizeicon":this.minimizeIconTemplate=e.template;break;case"headless":this.headlessTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}ngOnInit(){this.breakpoints&&this.createStyle()}getAriaLabelledBy(){return this.header!==null?Me()+"_header":null}focus(){let e=x.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&x.blockBodyScroll()}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&x.unblockBodyScroll(),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?x.blockBodyScroll():x.unblockBodyScroll()),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(Pt.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(ut(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let n in this.breakpoints)e+=` +`],encapsulation:2,changeDetection:0})}return i})(),XO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$]})}return i})();var P1e=Pr([Lt({transform:"{{transform}}",opacity:0}),Xt("{{transition}}")]),R1e=Pr([Xt("{{transition}}",Lt({transform:"{{transform}}",opacity:0}))]);var JO=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,Rt,Te,pt,Te]})}return i})();var hm=(()=>{let t=class t{constructor(){}updateTheme(n){let r=document.getElementById("theme-style");r.href=`${r.href.slice(0,r.href.length-23)}showbiz-${n}-theme.css`}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function cZ(i,t){if(i&1&&(p(0,"a",12),y(1,"i"),p(2,"span"),_(3),h()()),i&2){let e=t.$implicit;l("routerLink",e.routerLink),d(),U(e.icon),d(2),z(e.label)}}function dZ(i,t){if(i&1&&(p(0,"div",13),y(1,"app-auto-complete-card",14),h()),i&2){let e=t.$implicit;d(),l("item",e)}}var uZ=()=>({display:"flex",marginRight:"3px"}),pZ=()=>({paddingRight:"2rem"}),hZ=()=>({scale:"0.7",fontSize:"2rem"}),tM=(()=>{let t=class t{constructor(n,r,o,s){this.tmdbService=n,this.router=r,this.authService=o,this.themeService=s,this.userImg="",this.navigationMenu=[{label:"Menu",items:[{label:"Home",icon:"pi pi-home",routerLink:"/home"},{label:"Discover+",icon:"pi pi-map",routerLink:"/discover"},{label:"Trending",icon:"pi pi-chart-bar",routerLink:"/trending"},{label:"Movies",icon:"pi pi-video",routerLink:"/movies"},{label:"TV Shows",icon:"pi pi-play",routerLink:"/tvshows"},{label:"Celebrities",icon:"pi pi-users",routerLink:"/celebrities"}]}],this.userMenu=[{label:"ShowbizHub",items:[{label:"Login",icon:"pi pi-sign-in",routerLink:"/login"},{label:"User Settings",icon:"pi pi-user",routerLink:"/settings"}]}],this.sidebarVisible=!1,this.results=[],this.items=[{label:"Home",icon:"pi pi-fw pi-power-off",routerLink:"/home"},{label:"Discover+",icon:"pi pi-fw pi-power-off",routerLink:"/discover"},{label:"Trending",icon:"pi pi-fw pi-power-off",routerLink:"/trending"},{label:"Movies",icon:"pi pi-fw pi-power-off",routerLink:"/movies"}],this.searchForm=new on({query:new ti(""),theme:new ti(!1)}),this.currentQuery="",this.dropdownMode="blank";let a=o.getLoggedInUser();if(a.demoAccount)this.currentUser=a,this.searchForm.get("theme")?.setValue(a.dark_mode);else{let{user:c,data:u}=a;this.currentUser=a,this.userMenu[0].label=u.username,this.userMenu[0].items[0]={label:"Logout",icon:"pi pi-sign-out",routerLink:null,command:()=>{localStorage.removeItem("user"),this.router.navigate(["/login"]),window.location.reload()}},this.userMenu[0].items[2]={label:"Favorites",icon:"pi pi-heart-fill",routerLink:"/favorites"},this.searchForm.get("theme")?.setValue(u.dark_mode)}}switchTheme(n){if(this.currentUser.demoAccount)localStorage.setItem("user",JSON.stringify(pe(F({},this.currentUser),{dark_mode:!this.currentUser.dark_mode}))),n.checked?this.themeService.updateTheme("night"):this.themeService.updateTheme("light");else{let r=pe(F({},this.currentUser.data),{dark_mode:!this.currentUser.data.dark_mode});this.themeService.updateTheme(r.dark_mode?"night":"light"),this.authService.updateUserData(r,this.currentUser.user.id).then(()=>{localStorage.setItem("user",JSON.stringify({user:this.currentUser.user,data:r})),this.currentUser.data=r})}}filterResults(n){this.currentQuery=n.query,this.getResults(n.query)}initSearch(n){if(console.log(n),n.code=="Enter"||n=="button"){if(this.searchForm.value.query==="")return;this.dropdownMode="blank",this.router.navigate([`/search/${this.currentQuery}`]),this.tmdbService.setState({searchQuery:this.currentQuery}),this.searchForm.get("query")?.setValue(this.currentQuery),this.results=[]}else this.dropdownMode="current"}getResults(n){this.tmdbService.getTMDBData("search/multi",{query:n}).subscribe(r=>{this.results=r.results})}gotoResult(){let n=this.searchForm.value.query.media_type,r=this.searchForm.value.query.id;n==="movie"?this.router.navigate([`movies/${r}`]):n==="tv"?this.router.navigate([`tvshows/${r}`]):n==="person"&&this.router.navigate([`celebrities/${r}`])}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(bt),w(Kt),w(hm))},t.\u0275cmp=k({type:t,selectors:[["app-header"]],standalone:!0,features:[R],decls:20,vars:18,consts:[["routerLink","home",1,"logo"],[3,"formGroup","ngSubmit"],["formControlName","theme","label","Dark Mode",3,"onChange"],["formControlName","query","field","name","placeholder","Search","bl","","dropdownIcon","pi-search",3,"suggestions","autoOptionFocus","dropdownMode","inputStyle","completeMethod","onKeyUp","onSelect"],["pTemplate","item"],["type","submit","icon","pi pi-search",3,"rounded"],["image","https://firebasestorage.googleapis.com/v0/b/showbizhub-4f1b9.appspot.com/o/logo.png?alt=media&token=42e394a6-9ef3-463c-8e0c-ea52869de015","styleClass","mr-2","size","normal","shape","circle",3,"click"],[3,"model","popup"],["menu",""],[1,"menu-btn",3,"click"],[1,"pi","pi-bars"],["navmenu",""],["routerLinkActive","active",3,"routerLink"],[1,"flex","align-items-center","gap-2"],[3,"item"]],template:function(r,o){if(r&1){let s=G();p(0,"header")(1,"a",0),_(2," Showbiz"),p(3,"span"),_(4,"Hub."),h()(),p(5,"nav"),Yt(6,cZ,4,4,"a",12,di),h(),p(8,"form",1),A("ngSubmit",function(){return o.initSearch("button")}),p(9,"p-inputSwitch",2),A("onChange",function(c){return o.switchTheme(c)}),h(),p(10,"p-autoComplete",3),A("completeMethod",function(c){return o.filterResults(c)})("onKeyUp",function(c){return o.initSearch(c)})("onSelect",function(){return o.gotoResult()}),g(11,dZ,2,1,"ng-template",4),h(),y(12,"p-button",5),h(),p(13,"p-avatar",6),A("click",function(c){S(s);let u=Le(15);return E(u.toggle(c))}),y(14,"p-menu",7,8),h(),p(16,"button",9),A("click",function(c){S(s);let u=Le(19);return E(u.toggle(c))}),y(17,"i",10),h(),y(18,"p-menu",7,11),h()}r&2&&(d(6),Zt(o.navigationMenu[0].items),d(2),l("formGroup",o.searchForm),d(),xt(Ke(15,uZ)),d(),l("suggestions",o.results)("autoOptionFocus",!1)("dropdownMode",o.dropdownMode)("inputStyle",Ke(16,pZ)),d(2),xt(Ke(17,hZ)),l("rounded",!0)("rounded",!0),d(2),l("model",o.userMenu)("popup",!0),d(4),l("model",o.navigationMenu)("popup",!0))},dependencies:[$,Ve,et,xu,Za,fd,he,Bi,an,ii,sn,Qi,Yi,UO,$O,yt,ni,QO,mb,ZO,YO,sr,XO,fb,JO],styles:["header[_ngcontent-%COMP%]{padding:0 1rem;display:flex;align-items:center;justify-content:space-between;position:sticky;top:10px;margin:0 10px;left:0;border-radius:2rem;background-color:var(--header-bg);box-shadow:0 0 7px #0000002c;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:100;margin-bottom:1rem}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{border-radius:5px;font-size:1.6em;color:var(--surface-800);padding:3px;cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;font-weight:7000;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;white-space:normal}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-color);text-transform:uppercase;font-weight:700;margin-left:2px}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5em}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;font-weight:500;color:var(--surface-800);display:flex;align-items:center;gap:.3rem;justify-content:center}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--primary-color)}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--primary-color);font-size:.8rem}header[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;align-items:center;margin:3px 0 3px auto;padding-right:2px}header[_ngcontent-%COMP%] form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-right:3px;font-size:.8em;color:var(--surface-800)}header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]{border:0;outline:0;background-color:transparent;color:var(--primary-color);display:none;cursor:pointer}header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]:hover{filter:brightness(110%)}@media screen and (max-width: 1100px){header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]{display:flex;align-items:center}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:none}}@media screen and (max-width: 480px){header[_ngcontent-%COMP%]{margin:0 5px;bottom:0;left:0;width:calc(100% - 10px);top:5px;border-radius:10px;padding:.5rem 1rem;-webkit-backdrop-filter:blur(0) brightness(0);backdrop-filter:blur(0) brightness(0)}header[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:none}header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{display:none}header[_ngcontent-%COMP%] .menu-btn[_ngcontent-%COMP%]{display:none}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;gap:.4rem;margin-right:auto}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:2rem;padding:.4rem;background-color:var(--surface-800);border-radius:50%;transition:all .5s;position:relative;translate:0 -.2rem}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff;margin:0 .2rem}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-color)}header[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;bottom:-1rem;font-size:5px;font-weight:300}}"]});let i=t;return i})();var iM=(()=>{class i{constructor(e,n){let r=n.useRef("router");e.events.subscribe(o=>{let s=this.getCurrentNavigationState(e);s&&s.ignoreLoadingBar||(o instanceof co&&r.start(),(o instanceof Xo||o instanceof hn||o instanceof rr)&&r.complete())})}getCurrentNavigationState(e){let n=e.getCurrentNavigation&&e.getCurrentNavigation();return n&&n.extras?n.extras.state:{}}}return i.\u0275fac=function(e){return new(e||i)(J(bt),J(cd))},i.\u0275mod=Y({type:i}),i.\u0275inj=Q({imports:[[Ve,Tr],Ve,Tr]}),i})();var nM=(()=>{let t=class t{constructor(n){this.tmdbService=n,this.latest={movie:{},tv:{},celebrity:{}},this.getLatest("movie"),this.getLatest("person"),this.getLatest("tv")}getLatest(n){this.tmdbService.getTMDBData(`${n}/latest`).subscribe(r=>D(this,null,function*(){n=="movie"?this.latest.movie=yield r:n=="tv"?this.latest.tv=yield r:this.latest.celebrity=yield r}))}setSlides(){let n=document.getElementById("displayContainer"),r=[];for(let o of this.latest)(o.poster_path||o.profile_path)&&r.push(o);r.length>0&&setInterval(()=>{n.style.backgroundImage=`url(http://image.tmdb.org/t/p/original${r[0].profile_path||r[0].poster_path})`},5e3)}};t.\u0275fac=function(r){return new(r||t)(w(ze))},t.\u0275cmp=k({type:t,selectors:[["app-footer"]],standalone:!0,features:[R],decls:49,vars:6,consts:[[1,"grid-container"],[1,"about"],[1,"latest"],[3,"routerLink"],[1,"links"],["routerLink","/discover/"],["routerLink","/movies/"],["routerLink","/tvshows/"],["routerLink","/celebrities/"],["routerLink","/trending/"],["routerLink","/login/"],["routerLink","/signup/"],[1,"bottom-footer"]],template:function(r,o){r&1&&(p(0,"footer")(1,"div",0)(2,"div",1)(3,"h1"),_(4,"About"),h(),p(5,"p"),_(6," Welcome to our "),p(7,"span"),_(8,"Showbizhub"),h(),_(9,", A wide range Entertainment to help you get the latest information about movies, tvshows, celebrities, seasons and episodes. This app is just a demo of TMDB Api. It uses TMDB Api to get latest updates about movies, tvshows etc. Frontend of the app is designed with angular 17 with multiple npm packages. Explore the latest trends in the world of entertainment. "),h()(),p(10,"div",2)(11,"h1"),_(12,"Latest"),h(),p(13,"ul")(14,"li")(15,"a",3)(16,"span"),_(17,"Movie"),h(),_(18),h()(),p(19,"li")(20,"a",3)(21,"span"),_(22,"TV Show"),h(),_(23),h()(),p(24,"li")(25,"a",3)(26,"span"),_(27,"Celebrity"),h(),_(28),h()()()(),p(29,"div",4)(30,"h1"),_(31,"Links"),h(),p(32,"nav")(33,"a",5),_(34,"Discover+"),h(),p(35,"a",6),_(36,"Explore Movies"),h(),p(37,"a",7),_(38,"Explore TV Shows"),h(),p(39,"a",8),_(40,"Explore Celebrities"),h(),p(41,"a",9),_(42,"Trending"),h(),p(43,"a",10),_(44,"Login"),h(),p(45,"a",11),_(46,"Register"),h()()()(),p(47,"div",12),_(48,"This app is demo of TMDB Api, Developed & Designed in Angular by Shahzad Ameer"),h()()),r&2&&(d(15),l("routerLink","/movies/"+(o.latest==null||o.latest.movie==null?null:o.latest.movie.id)),d(3),be(" ",o.latest==null||o.latest.movie==null?null:o.latest.movie.title,""),d(2),l("routerLink","/tvshow/"+(o.latest==null||o.latest.tv==null?null:o.latest.tv.id)),d(3),be(" ",o.latest==null||o.latest.tv==null?null:o.latest.tv.name,""),d(2),l("routerLink","/celebrity/"+(o.latest==null||o.latest.celebrity==null?null:o.latest.celebrity.id)),d(3),be(" ",o.latest==null||o.latest.celebrity==null?null:o.latest.celebrity.name,""))},dependencies:[Ve,et],styles:["footer[_ngcontent-%COMP%]{padding:2rem;border-top:1px solid var(--accent);margin-top:1rem}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{border-left:3px solid var(--accent);padding-left:1rem}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--accent);font-weight:500}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .about[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-transform:capitalize}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{height:calc(100% - 3rem)}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:0}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--accent)}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .latest[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--surface-800);font-weight:500}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;flex-direction:column}footer[_ngcontent-%COMP%] .grid-container[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color);font-weight:500}footer[_ngcontent-%COMP%] .bottom-footer[_ngcontent-%COMP%]{text-align:center;border-top:1px solid #111111;padding:1rem;text-transform:capitalize}"]});let i=t;return i})();var mZ=["titlebar"],fZ=["content"],gZ=["footer"];function _Z(i,t){i&1&&ie(0)}function vZ(i,t){if(i&1&&(Z(0),g(1,_Z,1,0,"ng-container",7),X()),i&2){let e=m(3);d(),l("ngTemplateOutlet",e.headlessTemplate)}}function yZ(i,t){if(i&1){let e=G();p(0,"div",13),A("mousedown",function(r){S(e);let o=m(4);return E(o.initResize(r))}),h()}}function bZ(i,t){if(i&1&&(p(0,"span",20),_(1),h()),i&2){let e=m(5);l("id",e.getAriaLabelledBy()),d(),z(e.header)}}function CZ(i,t){if(i&1&&(p(0,"span",20),Ae(1,1),h()),i&2){let e=m(5);l("id",e.getAriaLabelledBy())}}function IZ(i,t){i&1&&ie(0)}function wZ(i,t){if(i&1&&y(0,"span",24),i&2){let e=m(6);l("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}function TZ(i,t){i&1&&y(0,"WindowMaximizeIcon",26),i&2&&l("styleClass","p-dialog-header-maximize-icon")}function xZ(i,t){i&1&&y(0,"WindowMinimizeIcon",26),i&2&&l("styleClass","p-dialog-header-maximize-icon")}function SZ(i,t){if(i&1&&(Z(0),g(1,TZ,1,1,"WindowMaximizeIcon",25)(2,xZ,1,1,"WindowMinimizeIcon",25),X()),i&2){let e=m(6);d(),l("ngIf",!e.maximized&&!e.maximizeIconTemplate),d(),l("ngIf",e.maximized&&!e.minimizeIconTemplate)}}function EZ(i,t){}function OZ(i,t){i&1&&g(0,EZ,0,0,"ng-template")}function MZ(i,t){if(i&1&&(Z(0),g(1,OZ,1,0,null,7),X()),i&2){let e=m(6);d(),l("ngTemplateOutlet",e.maximizeIconTemplate)}}function kZ(i,t){}function AZ(i,t){i&1&&g(0,kZ,0,0,"ng-template")}function DZ(i,t){if(i&1&&(Z(0),g(1,AZ,1,0,null,7),X()),i&2){let e=m(6);d(),l("ngTemplateOutlet",e.minimizeIconTemplate)}}var PZ=()=>({"p-dialog-header-icon p-dialog-header-maximize p-link":!0});function RZ(i,t){if(i&1){let e=G();p(0,"button",21),A("click",function(){S(e);let r=m(5);return E(r.maximize())})("keydown.enter",function(){S(e);let r=m(5);return E(r.maximize())}),g(1,wZ,1,1,"span",22)(2,SZ,3,2,"ng-container",23)(3,MZ,2,1,"ng-container",23)(4,DZ,2,1,"ng-container",23),h()}if(i&2){let e=m(5);l("ngClass",Ke(5,PZ)),d(),l("ngIf",e.maximizeIcon&&!e.maximizeIconTemplate&&!e.minimizeIconTemplate),d(),l("ngIf",!e.maximizeIcon),d(),l("ngIf",!e.maximized),d(),l("ngIf",e.maximized)}}function VZ(i,t){if(i&1&&y(0,"span",29),i&2){let e=m(7);l("ngClass",e.closeIcon)}}function LZ(i,t){i&1&&y(0,"TimesIcon",26),i&2&&l("styleClass","p-dialog-header-close-icon")}function FZ(i,t){if(i&1&&(Z(0),g(1,VZ,1,1,"span",28)(2,LZ,1,1,"TimesIcon",25),X()),i&2){let e=m(6);d(),l("ngIf",e.closeIcon),d(),l("ngIf",!e.closeIcon)}}function NZ(i,t){}function BZ(i,t){i&1&&g(0,NZ,0,0,"ng-template")}function zZ(i,t){if(i&1&&(p(0,"span"),g(1,BZ,1,0,null,7),h()),i&2){let e=m(6);d(),l("ngTemplateOutlet",e.closeIconTemplate)}}var UZ=()=>({"p-dialog-header-icon p-dialog-header-close p-link":!0});function jZ(i,t){if(i&1){let e=G();p(0,"button",27),A("click",function(r){S(e);let o=m(5);return E(o.close(r))})("keydown.enter",function(r){S(e);let o=m(5);return E(o.close(r))}),g(1,FZ,3,2,"ng-container",23)(2,zZ,2,1,"span",23),h()}if(i&2){let e=m(5);l("ngClass",Ke(5,UZ)),T("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),d(),l("ngIf",!e.closeIconTemplate),d(),l("ngIf",e.closeIconTemplate)}}function HZ(i,t){if(i&1){let e=G();p(0,"div",14,15),A("mousedown",function(r){S(e);let o=m(4);return E(o.initDrag(r))}),g(2,bZ,2,2,"span",16)(3,CZ,2,1,"span",16)(4,IZ,1,0,"ng-container",7),p(5,"div",17),g(6,RZ,5,6,"button",18)(7,jZ,3,6,"button",19),h()()}if(i&2){let e=m(4);d(2),l("ngIf",!e.headerFacet&&!e.headerTemplate),d(),l("ngIf",e.headerFacet),d(),l("ngTemplateOutlet",e.headerTemplate),d(2),l("ngIf",e.maximizable),d(),l("ngIf",e.closable)}}function GZ(i,t){i&1&&ie(0)}function $Z(i,t){i&1&&ie(0)}function qZ(i,t){if(i&1&&(p(0,"div",30,31),Ae(2,2),g(3,$Z,1,0,"ng-container",7),h()),i&2){let e=m(4);d(3),l("ngTemplateOutlet",e.footerTemplate)}}function WZ(i,t){if(i&1&&(g(0,yZ,1,0,"div",8)(1,HZ,8,5,"div",9),p(2,"div",10,11),Ae(4),g(5,GZ,1,0,"ng-container",7),h(),g(6,qZ,4,1,"div",12)),i&2){let e=m(3);l("ngIf",e.resizable),d(),l("ngIf",e.showHeader),d(),U(e.contentStyleClass),l("ngClass","p-dialog-content")("ngStyle",e.contentStyle),d(3),l("ngTemplateOutlet",e.contentTemplate),d(),l("ngIf",e.footerFacet||e.footerTemplate)}}var KZ=(i,t,e,n)=>({"p-dialog p-component":!0,"p-dialog-rtl":i,"p-dialog-draggable":t,"p-dialog-resizable":e,"p-dialog-maximized":n}),QZ=(i,t)=>({transform:i,transition:t}),YZ=i=>({value:"visible",params:i});function ZZ(i,t){if(i&1){let e=G();p(0,"div",3,4),A("@animation.start",function(r){S(e);let o=m(2);return E(o.onAnimationStart(r))})("@animation.done",function(r){S(e);let o=m(2);return E(o.onAnimationEnd(r))}),g(2,vZ,2,1,"ng-container",5)(3,WZ,7,8,"ng-template",null,6,dt),h()}if(i&2){let e=Le(4),n=m(2);U(n.styleClass),l("ngClass",Dr(10,KZ,n.rtl,n.draggable,n.resizable,n.maximized))("ngStyle",n.style)("pFocusTrapDisabled",n.focusTrap===!1)("@animation",H(18,YZ,We(15,QZ,n.transformOptions,n.transitionOptions))),T("aria-labelledby",n.ariaLabelledBy)("aria-modal",!0),d(2),l("ngIf",n.headlessTemplate)("ngIfElse",e)}}var XZ=(i,t,e,n,r,o,s,a,c,u)=>({"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":i,"p-dialog-mask-scrollblocker":t,"p-dialog-left":e,"p-dialog-right":n,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":c,"p-dialog-bottom-right":u});function JZ(i,t){if(i&1&&(p(0,"div",1),g(1,ZZ,5,20,"div",2),h()),i&2){let e=m();xt(e.maskStyle),U(e.maskStyleClass),l("ngClass",Ud(6,XZ,[e.modal,e.modal||e.blockScroll,e.position==="left",e.position==="right",e.position==="top",e.position==="topleft"||e.position==="top-left",e.position==="topright"||e.position==="top-right",e.position==="bottom",e.position==="bottomleft"||e.position==="bottom-left",e.position==="bottomright"||e.position==="bottom-right"])),d(),l("ngIf",e.visible)}}var eX=["*",[["p-header"]],[["p-footer"]]],tX=["*","p-header","p-footer"],iX=Pr([Lt({transform:"{{transform}}",opacity:0}),Xt("{{transition}}")]),nX=Pr([Xt("{{transition}}",Lt({transform:"{{transform}}",opacity:0}))]),rM=(()=>{class i{document;platformId;el;renderer;zone;cd;config;header;draggable=!0;resizable=!0;get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}contentStyle;contentStyleClass;modal=!1;closeOnEscape=!0;dismissableMask=!1;rtl=!1;closable=!0;get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}appendTo;breakpoints;styleClass;maskStyleClass;maskStyle;showHeader=!0;get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}blockScroll=!1;autoZIndex=!0;baseZIndex=0;minX=0;minY=0;focusOnShow=!0;maximizable=!1;keepInViewport=!0;focusTrap=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";closeIcon;closeAriaLabel;closeTabindex="-1";minimizeIcon;maximizeIcon;get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style=F({},e),this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)";break}}onShow=new L;onHide=new L;visibleChange=new L;onResizeInit=new L;onResizeEnd=new L;onDragEnd=new L;onMaximize=new L;headerFacet;footerFacet;templates;headerViewChild;contentViewChild;footerViewChild;headerTemplate;contentTemplate;footerTemplate;maximizeIconTemplate;closeIconTemplate;minimizeIconTemplate;headlessTemplate;_visible=!1;maskVisible;container;wrapper;dragging;ariaLabelledBy;documentDragListener;documentDragEndListener;resizing;documentResizeListener;documentResizeEndListener;documentEscapeListener;maskClickListener;lastPageX;lastPageY;preventVisibleChangePropagation;maximized;preMaximizeContentHeight;preMaximizeContainerWidth;preMaximizeContainerHeight;preMaximizePageX;preMaximizePageY;id=Me();_style={};_position="center";originalStyle;transformOptions="scale(0.7)";styleElement;window;constructor(e,n,r,o,s,a,c){this.document=e,this.platformId=n,this.el=r,this.renderer=o,this.zone=s,this.cd=a,this.config=c,this.window=this.document.defaultView}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"closeicon":this.closeIconTemplate=e.template;break;case"maximizeicon":this.maximizeIconTemplate=e.template;break;case"minimizeicon":this.minimizeIconTemplate=e.template;break;case"headless":this.headlessTemplate=e.template;break;default:this.contentTemplate=e.template;break}})}ngOnInit(){this.breakpoints&&this.createStyle()}getAriaLabelledBy(){return this.header!==null?Me()+"_header":null}focus(){let e=x.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&x.blockBodyScroll()}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&x.unblockBodyScroll(),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?x.blockBodyScroll():x.unblockBodyScroll()),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(Pt.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(ut(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let n in this.breakpoints)e+=` @media screen and (max-width: ${n}) { .p-dialog[${this.id}]:not(.p-dialog-maximized) { width: ${this.breakpoints[n]} !important; } } - `;this.renderer.setProperty(this.styleElement,"innerHTML",e)}}initDrag(e){x.hasClass(e.target,"p-dialog-header-icon")||x.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",x.addClass(this.document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&e.which===9){e.preventDefault();let n=x.getFocusableElements(this.container);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let r=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?r==-1||r===0?n[n.length-1].focus():n[r-1].focus():r==-1||r===n.length-1?n[0].focus():n[r+1].focus()}}}onDrag(e){if(this.dragging){let n=x.getOuterWidth(this.container),r=x.getOuterHeight(this.container),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),c=getComputedStyle(this.container),u=parseFloat(c.marginLeft),f=parseFloat(c.marginTop),v=a.left+o-u,b=a.top+s-f,O=x.getViewport();this.container.style.position="fixed",this.keepInViewport?(v>=this.minX&&v+n=this.minY&&b+rparseInt(f))&&b.left+cparseInt(v))&&b.top+u{this.documentDragListener=this.renderer.listen(this.window,"mousemove",this.onDrag.bind(this))})}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentDragEndListener(){this.documentDragEndListener||this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.window,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragEndListener=null)}bindDocumentResizeListeners(){!this.documentResizeListener&&!this.documentResizeEndListener&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.window,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.window,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",n=>{n.which==27&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.wrapper):x.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container?.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&x.addClass(this.document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&x.addClass(this.wrapper,"p-component-overlay-leave");break}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({});break}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(x.removeClass(this.document.body,"p-overflow-hidden"),this.document.body.style.removeProperty("--scrollbar-width"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&x.removeClass(this.document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&Pt.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?F({},this.originalStyle):{}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(ve),w(nt),w(ge),w(Ne),w(At))};static \u0275cmp=k({type:i,selectors:[["p-dialog"]],contentQueries:function(n,r,o){if(n&1&&(De(o,fo,5),De(o,go,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(mZ,5),oe(fZ,5),oe(gZ,5)),n&2){let o;q(o=W())&&(r.headerViewChild=o.first),q(o=W())&&(r.contentViewChild=o.first),q(o=W())&&(r.footerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",maskStyle:"maskStyle",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:tX,decls:1,vars:1,consts:[[3,"class","style","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],[4,"ngIf","ngIfElse"],["notHeadless",""],[4,"ngTemplateOutlet"],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",3,"id",4,"ngIf"],[1,"p-dialog-header-icons"],["role","button","type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title",3,"id"],["role","button","type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],["class","p-dialog-header-maximize-icon",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],["class","p-dialog-header-close-icon",3,"ngClass",4,"ngIf"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""]],template:function(n,r){n&1&&(je(eX),g(0,JZ,2,17,"div",0)),n&2&&l("ngIf",r.maskVisible)},dependencies:()=>[xe,Ie,rt,Ce,c2,ui,pt,dd,ud],styles:[`@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}} -`],encapsulation:2,data:{animation:[rn("animation",[ei("void => visible",[Ko(iX)]),ei("visible => void",[Ko(nX)])])]},changeDetection:0})}return i})(),oM=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,za,Rt,pt,dd,ud,Te]})}return i})();var oX=i=>({visibility:i}),sM=(()=>{let t=class t{constructor(){this.visibility="hidden",window.onscroll=()=>{window.scrollY>700?this.visibility="visible":this.visibility="hidden"}}scrollToTop(){window.scrollTo({top:400,behavior:"smooth"})}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-scroll-top"]],standalone:!0,features:[R],decls:2,vars:4,consts:[[1,"scroll-top",3,"ngStyle"],["icon","pi pi-chevron-up","size","small",3,"rounded","onClick"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"p-button",1),A("onClick",function(){return o.scrollToTop()}),h()()),r&2&&(l("ngStyle",H(2,oX,o.visibility)),d(),l("rounded",!0))},dependencies:[yt,ni,$,Ce],styles:[".scroll-top[_ngcontent-%COMP%]{position:fixed;bottom:1rem;right:1rem;transition:visibility 1s!important;z-index:10000;border-radius:50%}"]});let i=t;return i})();function sX(i,t){i&1&&(p(0,"div",15)(1,"span",16),_(2,"Amy Elsner"),h()())}function aX(i,t){}var lX=()=>({width:"50rem"}),cX=()=>({"1199px":"75vw","575px":"90vw"}),aM=(()=>{let t=class t{constructor(n,r,o,s,a,c,u){this.tmdbService=n,this.store=r,this.primeNgConfig=o,this.afAuth=s,this.firestoreService=a,this.authService=c,this.themeService=u,this.title="showbizhub",this.pagenum=1,this.visible=!1,this.primeNgConfig.ripple=!0,this.primeNgConfig.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},localStorage.getItem("popup")||(this.visible=!0),this.getConfigurations(),this.getLanguages(),this.getCountries(),this.getTimezones()}updatePopup(){localStorage.setItem("popup","true")}ngOnInit(){let n=this.authService.getLoggedInUser();n&&(n.demoAccount?this.themeService.updateTheme(n.dark_mode?"night":"light"):this.themeService.updateTheme(n.data.dark_mode?"night":"light"))}getConfigurations(){this.tmdbService.getTMDBData("configuration").subscribe(n=>{this.tmdbService.configurations.set(n),this.tmdbService.setState({configurations:{images:n.images,change_keys:n.change_keys}})})}getLanguages(){this.tmdbService.getTMDBData("configuration/languages").subscribe(n=>{this.tmdbService.languages.set(n),this.tmdbService.setState({languages:n})})}getCountries(){this.tmdbService.getTMDBData("configuration/countries").subscribe(n=>{this.tmdbService.countries.set(n),this.tmdbService.setState({countries:n})})}getTimezones(){this.tmdbService.getTMDBData("configuration/timezones").subscribe(n=>{this.tmdbService.timezones.set(n),this.tmdbService.setState({timezones:n})})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(Zr),w(At),w(Gr),w(Vn),w(Kt),w(hm))},t.\u0275cmp=k({type:t,selectors:[["app-root"]],standalone:!0,features:[R],decls:161,vars:10,consts:[[1,"wrapper"],["ref","router","color","var(--primary-color)",3,"includeSpinner"],["ref","http","color","var(--primary-color)",3,"includeBar"],["header","Header",3,"visible","modal","breakpoints","draggable","visibleChange","onHide"],["pTemplate","header"],[1,"mypopup"],[2,"margin-bottom","0"],["href",""],[1,"socialIcons"],["severity","tags"],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFklEQVR4nNVaW28bRRRewQPwL7g/IUqhQMtFFQIJiQcegKASLhGKZ7wzjmkjtaJAFbcJQYii3mhEIQ0U0pK2UdSCUIln7CSQxqEhTnMjhQRoYprGKaCkJW6rpPagM+kuG9tbex07uz3SJ+9cdvx9njNnds9YUfJkpc30TsToq4iTasToQcwox5x2SsA1Iw3Qhv3kFRz03qE4wVxMXYkZrUGcRjCnwgrgHsTpbnfA/dCSki46XHQjCnjWYEb7rJI2BzmJGSny+Xw3FJS8K6A+jjgdyB9xmjQrpBcFySN5J14eKr8FcfoxZjRRKPJYA6MJcK2S1pKb80IeFlx+3SV7tyKc3L4o8qpfvQdzMr705Om8SzEyoXJ1eW7kubocczptF3n8P6ZdfnpfDm5Dog4gL7SZyNqdYPHIsOYA4ngBSD8Ek4wCZLSxnSxND0Zrru06nD62JKEydwEJxMhq8x22gJtUPjc7X7odWz4eOIAgzmomSFGq+9iyWdEcQU6mPlXaTopanAXPCuOvX2M7IW4NiNFdxugzZtaxvG2DOPrbN+KHM+0SlT9WO2QGyKgk72buu8w6eVvWicnYpDBaTe8e+8nzebj8Zbcp8Bpo1mFPX61OPDDWIuqHvhJvtW9yjgBOX1bke2qaxp09u0XHeEiST4iE+LR/r/jEgO3hXfr1xquivC3let367zcKNVAmPuzeLr4c2i/70+Ab+viNw02iaeSoeL9rq6gb3CevNWzq2CwO/doox8ngRpUK5uRQusZokusk29A/p8T4v+Pymo8F5T21/XWyPBefE1s63xWj58cW3HN2ZkJUhLbIvrPxWVkXjUVTxtbqBv4azCSgQUGMsHSNwUiriFz4Ux+0OxqWmLo8rQs4MvK1vJ6MnZP3nJjokuWeyV7ZrvWrHfhMkgGLXIgId8CjC7iSuCJnuivarX/X9OVp6bL7fq7P4EakGQSEzDoc/OWw7kJaXe+5Pp0YrAdoA6vsrBax2Zi8rh86oNe3RtqkWwAhzXyhSl1AMNIqx90W3qm37+j5KLt1wGjHogRAeXhqRJYH/x6SnxfnLor3Tnygk7k0d0kKMwIIagKaho+kCNgcqrIkgC1GwP5TDQv89/h4SHiCa0U8EZflvQOfy35vtr8jQzCEZuMaaMogYE1diVhV/LR4puKF9C5ktoizFQAbHSxazYCItobAQMjp86NiZnZGlsdgDXBP1gJWPPekuPv+lRKvNaI0i9gkjGYrwFgHCxwWKNTBLIDfG8WBkLePV8h2WKix2Zj8Dihv/Wmb7mJapAI84X1Wkr/3qdWi9JiaJoxCrtJEAMTtdW3rJbQ6iPVQhk+tDsgm1xnHgJAKLpSVX/MUPxcvffG6KP02ibyEWiyTsjkN7JRHCTB4MLKbDLYIxOjvimaQyrObELaOHboA7KcPO4CQsAKXnzygC5AiHJkLounBSFhJNhejL9pOjGcHxNXnUwRAqgJSFo4nz2iP6UEIHPcgTuLO/eVJHHPPqrTkr4eIhIwv8mbmPea9CabJbrI4GYz2ZZXcBYNUNqS0bSfNdZx1f+e+VbFicKjgiAMORqbczWXLlFyPmBCjZ67LIyajO9myyTEStuw21zy1gfTjEpwdIE7iEG0gmCj5Nre/7NFCbnaI0R5INCuFNNgFIT+fV7diJAyPBwX/q0GyIU4ehOlGnJ62Tpz8AY/EC9Lkdtr8YleLESNVmNMDkO2AlM1VQOYD6qqgj/4mlQf7DyniC9HH84lmAAAAAElFTkSuQmCC"],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAADTElEQVR4nO2Y+0tTYRjH9wfZ5ZhZEhqpoD/YxcxES5EIgihCupKEoQiZKV1NoYggqOyCWCsS6fZDimYUVJ5dnFu66S66m1vbzs6eeA4kuvOeec5qvlPPF55ftvd93ufzPM972TQMmwGrwTS0A1BBWLUiGdTbh1H3CEs/04xaEZZ+dhm1Iiz9jKoVYdfKE6Xb/QgWigcezllPg9zxqA7nDfogw4EhUWCdrg5QMv7H7++rA4SLcZCr3yo5p2SsCNrsl0HrfQGDgQH44H8HD2bvw4nJY5CtY9IHBEVqx2JjIfT53gjtKqVpbhoapurTB+S1V7to3OFfteCJekCuXnm1sFm3kT5IgA/Mt1eluRyCfBCUSut9SR8EdcXeIvS8JWyGZHXBdp4+iItzwjVHu+T3I8HPwiZ/6u6G2egscYydsydssWUBQZE2diQWgbrJ44v87DDkwsDcJ6IPPM2og5B003md6CvfkEusDFYt7UBiEIMCQ56kv2fuJ6I5/b4+5SCk8na5bks6+hb8qghkLGxMuHnvzdwVzfnof68cBI+8eOENTBqbpdsAPt6nCAQznghkmFDhHs9z5SBXHW0iR+FYCCrGy0RjW+0txGDf+vslQQwhA+w17SKufcZ6kjjnkr1ZOQgugn0cLyfngHrbWcjRZ0GxsQA6nbeIJ9Ic74ctukxiZReeWo/dD6HaXCn4KzLmC+2Lb7R44Wf4vWIQNOzJZIU9jj4wsP8hrURbywIpNZUITwylskaskKfPEXwMBQb/GcLFOYUjOWkQtFPWOmKppeSNeqHKvF+YizdxMm+reH81lqqEMcoCQTs6cUTIylIyhgxQPl46P6/aXCV59MoRGxqFfeN7loxPNggatgr2uy1iXbQYbvTR0E9onm4U/Rhqd7QSM7yJXQ+HLDXQ6+kRtS4PPHwJjkDjVIMwLqV/PhQat8MBc4XQQn/3AslIx2/8pYbBlpp2Qq3lIJSZdsM2fbbieJIGkWOZ7DqYic6IQPAVnIr1NKkCwSyThJlfUSBNUxdFEOFYWLgkVxRIr6eH+AMqVetpUuV4MjIhArnj6lp5ILa4YxofnHIuNibdQJbbNLQDUEFYtSIZ1NuHUfcISz/TjFoRln52mbVckT8w8BOY61aEYAAAAABJRU5ErkJggg=="],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAACtUlEQVR4nO2ay2sTQRzHNyMe9Sz4Ogn1LOIL/wQRfF1E8Fn7D4hnqXQmFj2IguSiTWsvldaqVS9VD0qluM1M0pCQVLpGjEmIadI0j+b1k9lUzGMTNiu6s7I/+N5mZr+fnd9vf0MyktQYZHGXA1MnwsyDMIsjQlNCCLM498S9cY+SVqAhOoAILSDCQGzRAiKeq83mCb1kvjHWm4boQN39sLwbYVo03RDpfSfUdHIQest8M8yQHIQSSS1YAcwgI8JUlhBhCdONEMNKcIC0AEbAoNK6AM6/iMCn73mIrZVhVsnCwZGwdQAuzkSgNfLlKux5ELAGwEIsD1qB5+LWAIjnypoAj/0r1gCYVbKaANfeRK0BcMgdhlyp2mQ++KMIW+/4rAGACIO9riA45xJq2vA3L4h50A0gsNL/P8DYYgomAuk2XX/bXMS8uWmN4zrs/t34tt31w+WXX+G+nIQRXwruyUl1rf2PQrDpbwC0FvCvmA5lmsadnFSgU5yeUlRzN97HoFipdRw3H83B0bEl8QDOPFXA7UuBnliv1ODc84hYAO8ia7rMN0Ic0Hfe+jcARmI+mhMToLbxhvXEkdGwOACRTAlOTCqw5Xa9Ce57GIJXn1e7zhn8EBMDYHW9Cn2uYNvam51emFnKdJzHz2FCAAx/THRcv88VVNNKK/iZSwiAs8++dDUSSBY15yVyZTEATk0pXY287lALa6WqOJ242zOmQ9p1YAMgewfqYacQsYu4PeyvELE/o2A3MmSFTvwtW4JUodKm8ZbfRo9NLGuO4zr+ZLmrkXH/iuY8/uw/BhBcaWv/xYRZnAMsWBeAypJ6tcBsI8SYHIRhSbrp2Y4wy5ttBvUsWpAGfTs3rhp4LphviPUm7O1vvi+Bvf2W2AmseryieWOFbwnPK14c4l23obKa84TtaPT8E/rGImgIjaOUAAAAAElFTkSuQmCC"],[1,"pi","pi-link"],["pTemplate","footer"],[1,"inline-flex","align-items-center","justify-content-center","gap-2"],[1,"font-bold","white-space-nowrap"]],template:function(r,o){r&1&&(p(0,"div",0),y(1,"ngx-loading-bar",1)(2,"ngx-loading-bar",2)(3,"app-header")(4,"router-outlet")(5,"app-footer")(6,"app-scroll-top"),p(7,"p-dialog",3),A("visibleChange",function(a){return o.visible=a})("onHide",function(){return o.updatePopup()}),g(8,sX,3,0,"ng-template",4),p(9,"div",5)(10,"h2",6),_(11," Designed & Developed By "),p(12,"a",7),_(13,"Shahzad Ameer"),h()(),p(14,"div",8)(15,"app-custom-tag",9),y(16,"img",10),p(17,"span"),_(18,"Fiverr Profile"),h()(),p(19,"app-custom-tag",9),y(20,"img",11),p(21,"span"),_(22,"Upwork Profile"),h()(),p(23,"app-custom-tag",9),y(24,"img",12),p(25,"span"),_(26,"LinkedIn Profile"),h()()(),p(27,"h2")(28,"strong"),_(29,"Unleash Your Inner Cinephile: Explore Movies, TV Shows & Celebrities with "),p(30,"a",7),_(31,"ShowbizHub "),y(32,"i",13),h()()(),p(33,"p")(34,"strong")(35,"a",7),_(36,"ShowbizHub "),y(37,"i",13),h()(),_(38," is your one-stop destination for exploring the vast world of entertainment. Whether you're a movie buff, a TV show enthusiast, or simply curious about celebrities, our app offers a "),p(39,"strong"),_(40,"rich and immersive experience"),h(),_(41," designed by a "),p(42,"strong"),_(43,"passionate frontend developer"),h(),_(44," ("),p(45,"strong")(46,"a",7),_(47,"Shahzad Ameer"),h()(),_(48,"). "),h(),p(49,"p")(50,"strong"),_(51,"Dive into a Sea of Content:"),h()(),p(52,"ul")(53,"li")(54,"strong"),_(55,"Extensive library:"),h(),_(56," Discover a massive collection of movies, TV shows, and celebrities, all conveniently accessible through our user-friendly interface. "),h(),p(57,"li")(58,"strong"),_(59,"Seamless filtering:"),h(),_(60," Refine your search with "),p(61,"strong"),_(62,"advanced filters"),h(),_(63," based on genre, year, popularity, and more. Find exactly what you're looking for with ease. "),h(),p(64,"li")(65,"strong"),_(66,"Infinite scrolling:"),h(),_(67," Never run out of content to explore! Our "),p(68,"strong"),_(69,"infinite scrolling feature"),h(),_(70," seamlessly loads more results as you browse, keeping the entertainment flowing. "),h()(),p(71,"p")(72,"strong"),_(73,"Unveiling the Details:"),h()(),p(74,"ul")(75,"li")(76,"strong"),_(77,"In-depth information:"),h(),_(78," Delve deeper with detailed pages for each movie, TV show, and celebrity, packed with captivating visuals and comprehensive information. "),h(),p(79,"li")(80,"strong"),_(81,"Visually stunning:"),h(),_(82," Immerse yourself in the world of entertainment with "),p(83,"strong"),_(84,"eye-catching movie cards, TV show cards, and celebrity cards"),h(),_(85," that showcase the best of what each has to offer. "),h()(),p(86,"p")(87,"strong"),_(88,"Personalize Your Experience:"),h()(),p(89,"ul")(90,"li")(91,"strong"),_(92,"Create an account:"),h(),_(93," Sign up for a free account to "),p(94,"strong"),_(95,"save your favorite movies, TV shows, and celebrities"),h(),_(96," for easy access and future reference. "),h(),p(97,"li")(98,"strong"),_(99,"Light and dark themes:"),h(),_(100," Choose the theme that best suits your viewing preference, whether you prefer a "),p(101,"strong"),_(102,"bright and airy"),h(),_(103," or a "),p(104,"strong"),_(105,"dark and cinematic"),h(),_(106," experience. "),h()(),p(107,"p")(108,"strong"),_(109,"Built with Expertise:"),h()(),p(110,"p")(111,"strong")(112,"a",7),_(113,"Shahzad Ameer"),h()(),_(114,", the "),p(115,"strong"),_(116,"skilled frontend developer"),h(),_(117," behind this app, has meticulously crafted it using "),p(118,"strong"),_(119,"cutting-edge technologies"),h(),_(120," like Angular, Firebase, and various libraries, ensuring "),p(121,"strong"),_(122,"smooth performance, exceptional UI/UX design, and robust functionality"),h(),_(123,". "),h(),p(124,"p")(125,"strong"),_(126,"Beyond the Basics:"),h()(),p(127,"ul")(128,"li")(129,"strong"),_(130,"Search bar with autocomplete:"),h(),_(131," Effortlessly find what you're looking for with our "),p(132,"strong"),_(133,"intelligent search bar"),h(),_(134," that suggests relevant results as you type. "),h(),p(135,"li")(136,"strong"),_(137,"Customizable settings:"),h(),_(138," Tailor your experience with "),p(139,"strong"),_(140,"customizable settings"),h(),_(141," like language and preferred content. "),h()(),p(142,"p")(143,"strong"),_(144,"Experience the Difference:"),h()(),p(145,"p")(146,"strong")(147,"a",7),_(148,"ShowbizHub "),y(149,"i",13),h()(),_(150," is not just an app, it's a portal to a world of entertainment, meticulously crafted by a "),p(151,"strong"),_(152,"talented frontend developer"),h(),_(153," ("),p(154,"strong")(155,"a",7),_(156,"Shahzad Ameer"),h()(),_(157,") with a passion for user experience. Visit today and "),p(158,"strong"),_(159,"explore, discover, and immerse yourself!"),h()()(),g(160,aX,0,0,"ng-template",14),h()()),r&2&&(d(),l("includeSpinner",!1),d(),l("includeBar",!1),d(5),xt(Ke(8,lX)),l("visible",o.visible)("modal",!0)("breakpoints",Ke(9,cX))("draggable",!1))},dependencies:[$,Jo,tM,nM,iM,Hh,$h,wr,El,oM,rM,he,Sr,sM],styles:[".mypopup[_ngcontent-%COMP%] .socialIcons[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;font-size:14px;padding-bottom:1rem;border-bottom:1px solid var(--surface-500)}.mypopup[_ngcontent-%COMP%] .socialIcons[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;border-radius:50%}.mypopup[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color)}.mypopup[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--surface-900);font-weight:600}.check[_ngcontent-%COMP%]{position:sticky;background-color:red;z-index:1000;top:0}"]});let i=t;return i})();rC(aM,zO).catch(i=>console.error(i)); + `;this.renderer.setProperty(this.styleElement,"innerHTML",e)}}initDrag(e){x.hasClass(e.target,"p-dialog-header-icon")||x.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",x.addClass(this.document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&e.which===9){e.preventDefault();let n=x.getFocusableElements(this.container);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let r=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?r==-1||r===0?n[n.length-1].focus():n[r-1].focus():r==-1||r===n.length-1?n[0].focus():n[r+1].focus()}}}onDrag(e){if(this.dragging){let n=x.getOuterWidth(this.container),r=x.getOuterHeight(this.container),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),c=getComputedStyle(this.container),u=parseFloat(c.marginLeft),f=parseFloat(c.marginTop),v=a.left+o-u,b=a.top+s-f,O=x.getViewport();this.container.style.position="fixed",this.keepInViewport?(v>=this.minX&&v+n=this.minY&&b+rparseInt(f))&&b.left+cparseInt(v))&&b.top+u{this.documentDragListener=this.renderer.listen(this.window,"mousemove",this.onDrag.bind(this))})}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentDragEndListener(){this.documentDragEndListener||this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.window,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragEndListener=null)}bindDocumentResizeListeners(){!this.documentResizeListener&&!this.documentResizeEndListener&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.window,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.window,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",n=>{n.which==27&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.wrapper):x.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container?.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&x.addClass(this.document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&x.addClass(this.wrapper,"p-component-overlay-leave");break}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({});break}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(x.removeClass(this.document.body,"p-overflow-hidden"),this.document.body.style.removeProperty("--scrollbar-width"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&x.removeClass(this.document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&Pt.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?F({},this.originalStyle):{}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}static \u0275fac=function(n){return new(n||i)(w(Oe),w(vt),w(ve),w(nt),w(ge),w(Ne),w(At))};static \u0275cmp=k({type:i,selectors:[["p-dialog"]],contentQueries:function(n,r,o){if(n&1&&(De(o,fo,5),De(o,go,5),De(o,he,4)),n&2){let s;q(s=W())&&(r.headerFacet=s.first),q(s=W())&&(r.footerFacet=s.first),q(s=W())&&(r.templates=s)}},viewQuery:function(n,r){if(n&1&&(oe(mZ,5),oe(fZ,5),oe(gZ,5)),n&2){let o;q(o=W())&&(r.headerViewChild=o.first),q(o=W())&&(r.contentViewChild=o.first),q(o=W())&&(r.footerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",maskStyle:"maskStyle",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:tX,decls:1,vars:1,consts:[[3,"class","style","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],[4,"ngIf","ngIfElse"],["notHeadless",""],[4,"ngTemplateOutlet"],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",3,"id",4,"ngIf"],[1,"p-dialog-header-icons"],["role","button","type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title",3,"id"],["role","button","type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],["class","p-dialog-header-maximize-icon",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],["class","p-dialog-header-close-icon",3,"ngClass",4,"ngIf"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""]],template:function(n,r){n&1&&(Ue(eX),g(0,JZ,2,17,"div",0)),n&2&&l("ngIf",r.maskVisible)},dependencies:()=>[xe,Ie,rt,Ce,c2,ui,pt,dd,ud],styles:[`@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}} +`],encapsulation:2,data:{animation:[rn("animation",[ei("void => visible",[Ko(iX)]),ei("visible => void",[Ko(nX)])])]},changeDetection:0})}return i})(),oM=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Y({type:i});static \u0275inj=Q({imports:[$,za,Rt,pt,dd,ud,Te]})}return i})();var oX=i=>({visibility:i}),sM=(()=>{let t=class t{constructor(){this.visibility="hidden",window.onscroll=()=>{window.scrollY>700?this.visibility="visible":this.visibility="hidden"}}scrollToTop(){window.scrollTo({top:400,behavior:"smooth"})}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=k({type:t,selectors:[["app-scroll-top"]],standalone:!0,features:[R],decls:2,vars:4,consts:[[1,"scroll-top",3,"ngStyle"],["icon","pi pi-chevron-up","size","small",3,"rounded","onClick"]],template:function(r,o){r&1&&(p(0,"div",0)(1,"p-button",1),A("onClick",function(){return o.scrollToTop()}),h()()),r&2&&(l("ngStyle",H(2,oX,o.visibility)),d(),l("rounded",!0))},dependencies:[yt,ni,$,Ce],styles:[".scroll-top[_ngcontent-%COMP%]{position:fixed;bottom:1rem;right:1rem;transition:visibility 1s!important;z-index:10000;border-radius:50%}"]});let i=t;return i})();function sX(i,t){i&1&&(p(0,"div",15)(1,"span",16),_(2,"Amy Elsner"),h()())}function aX(i,t){}var lX=()=>({width:"50rem"}),cX=()=>({"1199px":"75vw","575px":"90vw"}),aM=(()=>{let t=class t{constructor(n,r,o,s,a,c,u){this.tmdbService=n,this.store=r,this.primeNgConfig=o,this.afAuth=s,this.firestoreService=a,this.authService=c,this.themeService=u,this.title="showbizhub",this.pagenum=1,this.visible=!1,this.primeNgConfig.ripple=!0,this.primeNgConfig.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},localStorage.getItem("popup")||(this.visible=!0),this.getConfigurations(),this.getLanguages(),this.getCountries(),this.getTimezones()}updatePopup(){localStorage.setItem("popup","true")}ngOnInit(){let n=this.authService.getLoggedInUser();n&&(n.demoAccount?this.themeService.updateTheme(n.dark_mode?"night":"light"):this.themeService.updateTheme(n.data.dark_mode?"night":"light"))}getConfigurations(){this.tmdbService.getTMDBData("configuration").subscribe(n=>{this.tmdbService.configurations.set(n),this.tmdbService.setState({configurations:{images:n.images,change_keys:n.change_keys}})})}getLanguages(){this.tmdbService.getTMDBData("configuration/languages").subscribe(n=>{this.tmdbService.languages.set(n),this.tmdbService.setState({languages:n})})}getCountries(){this.tmdbService.getTMDBData("configuration/countries").subscribe(n=>{this.tmdbService.countries.set(n),this.tmdbService.setState({countries:n})})}getTimezones(){this.tmdbService.getTMDBData("configuration/timezones").subscribe(n=>{this.tmdbService.timezones.set(n),this.tmdbService.setState({timezones:n})})}};t.\u0275fac=function(r){return new(r||t)(w(ze),w(Zr),w(At),w(Gr),w(Ln),w(Kt),w(hm))},t.\u0275cmp=k({type:t,selectors:[["app-root"]],standalone:!0,features:[R],decls:161,vars:10,consts:[[1,"wrapper"],["ref","router","color","var(--primary-color)",3,"includeSpinner"],["ref","http","color","var(--primary-color)",3,"includeBar"],["header","Header",3,"visible","modal","breakpoints","draggable","visibleChange","onHide"],["pTemplate","header"],[1,"mypopup"],[2,"margin-bottom","0"],["href",""],[1,"socialIcons"],["severity","tags"],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFklEQVR4nNVaW28bRRRewQPwL7g/IUqhQMtFFQIJiQcegKASLhGKZ7wzjmkjtaJAFbcJQYii3mhEIQ0U0pK2UdSCUIln7CSQxqEhTnMjhQRoYprGKaCkJW6rpPagM+kuG9tbex07uz3SJ+9cdvx9njNnds9YUfJkpc30TsToq4iTasToQcwox5x2SsA1Iw3Qhv3kFRz03qE4wVxMXYkZrUGcRjCnwgrgHsTpbnfA/dCSki46XHQjCnjWYEb7rJI2BzmJGSny+Xw3FJS8K6A+jjgdyB9xmjQrpBcFySN5J14eKr8FcfoxZjRRKPJYA6MJcK2S1pKb80IeFlx+3SV7tyKc3L4o8qpfvQdzMr705Om8SzEyoXJ1eW7kubocczptF3n8P6ZdfnpfDm5Dog4gL7SZyNqdYPHIsOYA4ngBSD8Ek4wCZLSxnSxND0Zrru06nD62JKEydwEJxMhq8x22gJtUPjc7X7odWz4eOIAgzmomSFGq+9iyWdEcQU6mPlXaTopanAXPCuOvX2M7IW4NiNFdxugzZtaxvG2DOPrbN+KHM+0SlT9WO2QGyKgk72buu8w6eVvWicnYpDBaTe8e+8nzebj8Zbcp8Bpo1mFPX61OPDDWIuqHvhJvtW9yjgBOX1bke2qaxp09u0XHeEiST4iE+LR/r/jEgO3hXfr1xquivC3let367zcKNVAmPuzeLr4c2i/70+Ab+viNw02iaeSoeL9rq6gb3CevNWzq2CwO/doox8ngRpUK5uRQusZokusk29A/p8T4v+Pymo8F5T21/XWyPBefE1s63xWj58cW3HN2ZkJUhLbIvrPxWVkXjUVTxtbqBv4azCSgQUGMsHSNwUiriFz4Ux+0OxqWmLo8rQs4MvK1vJ6MnZP3nJjokuWeyV7ZrvWrHfhMkgGLXIgId8CjC7iSuCJnuivarX/X9OVp6bL7fq7P4EakGQSEzDoc/OWw7kJaXe+5Pp0YrAdoA6vsrBax2Zi8rh86oNe3RtqkWwAhzXyhSl1AMNIqx90W3qm37+j5KLt1wGjHogRAeXhqRJYH/x6SnxfnLor3Tnygk7k0d0kKMwIIagKaho+kCNgcqrIkgC1GwP5TDQv89/h4SHiCa0U8EZflvQOfy35vtr8jQzCEZuMaaMogYE1diVhV/LR4puKF9C5ktoizFQAbHSxazYCItobAQMjp86NiZnZGlsdgDXBP1gJWPPekuPv+lRKvNaI0i9gkjGYrwFgHCxwWKNTBLIDfG8WBkLePV8h2WKix2Zj8Dihv/Wmb7mJapAI84X1Wkr/3qdWi9JiaJoxCrtJEAMTtdW3rJbQ6iPVQhk+tDsgm1xnHgJAKLpSVX/MUPxcvffG6KP02ibyEWiyTsjkN7JRHCTB4MLKbDLYIxOjvimaQyrObELaOHboA7KcPO4CQsAKXnzygC5AiHJkLounBSFhJNhejL9pOjGcHxNXnUwRAqgJSFo4nz2iP6UEIHPcgTuLO/eVJHHPPqrTkr4eIhIwv8mbmPea9CabJbrI4GYz2ZZXcBYNUNqS0bSfNdZx1f+e+VbFicKjgiAMORqbczWXLlFyPmBCjZ67LIyajO9myyTEStuw21zy1gfTjEpwdIE7iEG0gmCj5Nre/7NFCbnaI0R5INCuFNNgFIT+fV7diJAyPBwX/q0GyIU4ehOlGnJ62Tpz8AY/EC9Lkdtr8YleLESNVmNMDkO2AlM1VQOYD6qqgj/4mlQf7DyniC9HH84lmAAAAAElFTkSuQmCC"],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAADTElEQVR4nO2Y+0tTYRjH9wfZ5ZhZEhqpoD/YxcxES5EIgihCupKEoQiZKV1NoYggqOyCWCsS6fZDimYUVJ5dnFu66S66m1vbzs6eeA4kuvOeec5qvlPPF55ftvd93ufzPM972TQMmwGrwTS0A1BBWLUiGdTbh1H3CEs/04xaEZZ+dhm1Iiz9jKoVYdfKE6Xb/QgWigcezllPg9zxqA7nDfogw4EhUWCdrg5QMv7H7++rA4SLcZCr3yo5p2SsCNrsl0HrfQGDgQH44H8HD2bvw4nJY5CtY9IHBEVqx2JjIfT53gjtKqVpbhoapurTB+S1V7to3OFfteCJekCuXnm1sFm3kT5IgA/Mt1eluRyCfBCUSut9SR8EdcXeIvS8JWyGZHXBdp4+iItzwjVHu+T3I8HPwiZ/6u6G2egscYydsydssWUBQZE2diQWgbrJ44v87DDkwsDcJ6IPPM2og5B003md6CvfkEusDFYt7UBiEIMCQ56kv2fuJ6I5/b4+5SCk8na5bks6+hb8qghkLGxMuHnvzdwVzfnof68cBI+8eOENTBqbpdsAPt6nCAQznghkmFDhHs9z5SBXHW0iR+FYCCrGy0RjW+0txGDf+vslQQwhA+w17SKufcZ6kjjnkr1ZOQgugn0cLyfngHrbWcjRZ0GxsQA6nbeIJ9Ic74ctukxiZReeWo/dD6HaXCn4KzLmC+2Lb7R44Wf4vWIQNOzJZIU9jj4wsP8hrURbywIpNZUITwylskaskKfPEXwMBQb/GcLFOYUjOWkQtFPWOmKppeSNeqHKvF+YizdxMm+reH81lqqEMcoCQTs6cUTIylIyhgxQPl46P6/aXCV59MoRGxqFfeN7loxPNggatgr2uy1iXbQYbvTR0E9onm4U/Rhqd7QSM7yJXQ+HLDXQ6+kRtS4PPHwJjkDjVIMwLqV/PhQat8MBc4XQQn/3AslIx2/8pYbBlpp2Qq3lIJSZdsM2fbbieJIGkWOZ7DqYic6IQPAVnIr1NKkCwSyThJlfUSBNUxdFEOFYWLgkVxRIr6eH+AMqVetpUuV4MjIhArnj6lp5ILa4YxofnHIuNibdQJbbNLQDUEFYtSIZ1NuHUfcISz/TjFoRln52mbVckT8w8BOY61aEYAAAAABJRU5ErkJggg=="],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAACtUlEQVR4nO2ay2sTQRzHNyMe9Sz4Ogn1LOIL/wQRfF1E8Fn7D4hnqXQmFj2IguSiTWsvldaqVS9VD0qluM1M0pCQVLpGjEmIadI0j+b1k9lUzGMTNiu6s7I/+N5mZr+fnd9vf0MyktQYZHGXA1MnwsyDMIsjQlNCCLM498S9cY+SVqAhOoAILSDCQGzRAiKeq83mCb1kvjHWm4boQN39sLwbYVo03RDpfSfUdHIQest8M8yQHIQSSS1YAcwgI8JUlhBhCdONEMNKcIC0AEbAoNK6AM6/iMCn73mIrZVhVsnCwZGwdQAuzkSgNfLlKux5ELAGwEIsD1qB5+LWAIjnypoAj/0r1gCYVbKaANfeRK0BcMgdhlyp2mQ++KMIW+/4rAGACIO9riA45xJq2vA3L4h50A0gsNL/P8DYYgomAuk2XX/bXMS8uWmN4zrs/t34tt31w+WXX+G+nIQRXwruyUl1rf2PQrDpbwC0FvCvmA5lmsadnFSgU5yeUlRzN97HoFipdRw3H83B0bEl8QDOPFXA7UuBnliv1ODc84hYAO8ia7rMN0Ic0Hfe+jcARmI+mhMToLbxhvXEkdGwOACRTAlOTCqw5Xa9Ce57GIJXn1e7zhn8EBMDYHW9Cn2uYNvam51emFnKdJzHz2FCAAx/THRcv88VVNNKK/iZSwiAs8++dDUSSBY15yVyZTEATk0pXY287lALa6WqOJ242zOmQ9p1YAMgewfqYacQsYu4PeyvELE/o2A3MmSFTvwtW4JUodKm8ZbfRo9NLGuO4zr+ZLmrkXH/iuY8/uw/BhBcaWv/xYRZnAMsWBeAypJ6tcBsI8SYHIRhSbrp2Y4wy5ttBvUsWpAGfTs3rhp4LphviPUm7O1vvi+Bvf2W2AmseryieWOFbwnPK14c4l23obKa84TtaPT8E/rGImgIjaOUAAAAAElFTkSuQmCC"],[1,"pi","pi-link"],["pTemplate","footer"],[1,"inline-flex","align-items-center","justify-content-center","gap-2"],[1,"font-bold","white-space-nowrap"]],template:function(r,o){r&1&&(p(0,"div",0),y(1,"ngx-loading-bar",1)(2,"ngx-loading-bar",2)(3,"app-header")(4,"router-outlet")(5,"app-footer")(6,"app-scroll-top"),p(7,"p-dialog",3),A("visibleChange",function(a){return o.visible=a})("onHide",function(){return o.updatePopup()}),g(8,sX,3,0,"ng-template",4),p(9,"div",5)(10,"h2",6),_(11," Designed & Developed By "),p(12,"a",7),_(13,"Shahzad Ameer"),h()(),p(14,"div",8)(15,"app-custom-tag",9),y(16,"img",10),p(17,"span"),_(18,"Fiverr Profile"),h()(),p(19,"app-custom-tag",9),y(20,"img",11),p(21,"span"),_(22,"Upwork Profile"),h()(),p(23,"app-custom-tag",9),y(24,"img",12),p(25,"span"),_(26,"LinkedIn Profile"),h()()(),p(27,"h2")(28,"strong"),_(29,"Unleash Your Inner Cinephile: Explore Movies, TV Shows & Celebrities with "),p(30,"a",7),_(31,"ShowbizHub "),y(32,"i",13),h()()(),p(33,"p")(34,"strong")(35,"a",7),_(36,"ShowbizHub "),y(37,"i",13),h()(),_(38," is your one-stop destination for exploring the vast world of entertainment. Whether you're a movie buff, a TV show enthusiast, or simply curious about celebrities, our app offers a "),p(39,"strong"),_(40,"rich and immersive experience"),h(),_(41," designed by a "),p(42,"strong"),_(43,"passionate frontend developer"),h(),_(44," ("),p(45,"strong")(46,"a",7),_(47,"Shahzad Ameer"),h()(),_(48,"). "),h(),p(49,"p")(50,"strong"),_(51,"Dive into a Sea of Content:"),h()(),p(52,"ul")(53,"li")(54,"strong"),_(55,"Extensive library:"),h(),_(56," Discover a massive collection of movies, TV shows, and celebrities, all conveniently accessible through our user-friendly interface. "),h(),p(57,"li")(58,"strong"),_(59,"Seamless filtering:"),h(),_(60," Refine your search with "),p(61,"strong"),_(62,"advanced filters"),h(),_(63," based on genre, year, popularity, and more. Find exactly what you're looking for with ease. "),h(),p(64,"li")(65,"strong"),_(66,"Infinite scrolling:"),h(),_(67," Never run out of content to explore! Our "),p(68,"strong"),_(69,"infinite scrolling feature"),h(),_(70," seamlessly loads more results as you browse, keeping the entertainment flowing. "),h()(),p(71,"p")(72,"strong"),_(73,"Unveiling the Details:"),h()(),p(74,"ul")(75,"li")(76,"strong"),_(77,"In-depth information:"),h(),_(78," Delve deeper with detailed pages for each movie, TV show, and celebrity, packed with captivating visuals and comprehensive information. "),h(),p(79,"li")(80,"strong"),_(81,"Visually stunning:"),h(),_(82," Immerse yourself in the world of entertainment with "),p(83,"strong"),_(84,"eye-catching movie cards, TV show cards, and celebrity cards"),h(),_(85," that showcase the best of what each has to offer. "),h()(),p(86,"p")(87,"strong"),_(88,"Personalize Your Experience:"),h()(),p(89,"ul")(90,"li")(91,"strong"),_(92,"Create an account:"),h(),_(93," Sign up for a free account to "),p(94,"strong"),_(95,"save your favorite movies, TV shows, and celebrities"),h(),_(96," for easy access and future reference. "),h(),p(97,"li")(98,"strong"),_(99,"Light and dark themes:"),h(),_(100," Choose the theme that best suits your viewing preference, whether you prefer a "),p(101,"strong"),_(102,"bright and airy"),h(),_(103," or a "),p(104,"strong"),_(105,"dark and cinematic"),h(),_(106," experience. "),h()(),p(107,"p")(108,"strong"),_(109,"Built with Expertise:"),h()(),p(110,"p")(111,"strong")(112,"a",7),_(113,"Shahzad Ameer"),h()(),_(114,", the "),p(115,"strong"),_(116,"skilled frontend developer"),h(),_(117," behind this app, has meticulously crafted it using "),p(118,"strong"),_(119,"cutting-edge technologies"),h(),_(120," like Angular, Firebase, and various libraries, ensuring "),p(121,"strong"),_(122,"smooth performance, exceptional UI/UX design, and robust functionality"),h(),_(123,". "),h(),p(124,"p")(125,"strong"),_(126,"Beyond the Basics:"),h()(),p(127,"ul")(128,"li")(129,"strong"),_(130,"Search bar with autocomplete:"),h(),_(131," Effortlessly find what you're looking for with our "),p(132,"strong"),_(133,"intelligent search bar"),h(),_(134," that suggests relevant results as you type. "),h(),p(135,"li")(136,"strong"),_(137,"Customizable settings:"),h(),_(138," Tailor your experience with "),p(139,"strong"),_(140,"customizable settings"),h(),_(141," like language and preferred content. "),h()(),p(142,"p")(143,"strong"),_(144,"Experience the Difference:"),h()(),p(145,"p")(146,"strong")(147,"a",7),_(148,"ShowbizHub "),y(149,"i",13),h()(),_(150," is not just an app, it's a portal to a world of entertainment, meticulously crafted by a "),p(151,"strong"),_(152,"talented frontend developer"),h(),_(153," ("),p(154,"strong")(155,"a",7),_(156,"Shahzad Ameer"),h()(),_(157,") with a passion for user experience. Visit today and "),p(158,"strong"),_(159,"explore, discover, and immerse yourself!"),h()()(),g(160,aX,0,0,"ng-template",14),h()()),r&2&&(d(),l("includeSpinner",!1),d(),l("includeBar",!1),d(5),xt(Ke(8,lX)),l("visible",o.visible)("modal",!0)("breakpoints",Ke(9,cX))("draggable",!1))},dependencies:[$,Jo,tM,nM,iM,Hh,$h,Tr,El,oM,rM,he,Sr,sM],styles:[".mypopup[_ngcontent-%COMP%] .socialIcons[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;font-size:14px;padding-bottom:1rem;border-bottom:1px solid var(--surface-500)}.mypopup[_ngcontent-%COMP%] .socialIcons[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;border-radius:50%}.mypopup[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color)}.mypopup[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--surface-900);font-weight:600}.check[_ngcontent-%COMP%]{position:sticky;background-color:red;z-index:1000;top:0}"]});let i=t;return i})();rC(aM,zO).catch(i=>console.error(i));