@veltdev/sdk-staging 6.0.13 → 6.0.14-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/models/element/activity-element.model.d.ts +9 -0
- package/app/models/element/autocomplete-element.model.d.ts +10 -0
- package/app/models/element/comment-element.model.d.ts +72 -0
- package/app/models/element/notification-element.model.d.ts +17 -0
- package/app/utils/constants.d.ts +1 -0
- package/{chunk-DZYVUUMS.js → chunk-2HGCWC7B.js} +1 -1
- package/chunk-2KTYC2AG.js +1 -0
- package/{chunk-5XJDGVGO.js → chunk-3AL5S762.js} +1 -1
- package/{chunk-TE4S24VF.js → chunk-45X5JRZ6.js} +1 -1
- package/chunk-6NWFM6PC.js +1 -0
- package/{chunk-IKXUU4LK.js → chunk-77FADRSO.js} +1 -1
- package/chunk-7TFVNMHJ.js +2 -0
- package/{chunk-NFQ33NZA.js → chunk-C5JOX4MX.js} +1 -1
- package/{chunk-XXU7YXMF.js → chunk-DFEL6HM7.js} +1 -1
- package/{chunk-Q2XHYKCH.js → chunk-DZYXTTOX.js} +1 -1
- package/{chunk-GHWFNVK2.js → chunk-FZSZ6AV3.js} +1 -1
- package/{chunk-MUMFBRNH.js → chunk-GULBDPIM.js} +1 -1
- package/{chunk-EMCGVIKG.js → chunk-HRCWTVRH.js} +1 -1
- package/chunk-I63T4QWP.js +6 -0
- package/{chunk-ZUQTUSHK.js → chunk-IMH5OESK.js} +1 -1
- package/chunk-IQ22I2I3.js +1 -0
- package/{chunk-NYRQTKJA.js → chunk-KNQJBBQA.js} +1 -1
- package/chunk-KQPNTB77.js +1 -0
- package/chunk-KWLMOL5X.js +193 -0
- package/chunk-L4QMAEKA.js +1 -0
- package/chunk-MRY4A7N6.js +1 -0
- package/{chunk-4VEJIKFU.js → chunk-NMPXJFDX.js} +1 -1
- package/chunk-O3FUWWWQ.js +1 -0
- package/{chunk-LOLURD74.js → chunk-PWTBCAPJ.js} +1 -1
- package/{chunk-V32SISMC.js → chunk-QFOWEUDB.js} +1 -1
- package/{chunk-4BAHMWIE.js → chunk-TQNLXTQA.js} +1 -1
- package/{chunk-STNBRDN3.js → chunk-UI2CRSTN.js} +1 -1
- package/{chunk-YTVKKNRL.js → chunk-UVKIGEOH.js} +1 -1
- package/{chunk-4YEJYNMX.js → chunk-VJLHHQ2Z.js} +1 -1
- package/chunk-VW5ND7U4.js +93 -0
- package/{chunk-2LJHR77K.js → chunk-WMDZMDJS.js} +1 -1
- package/{chunk-SYWOQU23.js → chunk-YFBAHLK6.js} +26 -26
- package/chunk-YO4HNOAN.js +1 -0
- package/{chunk-IQIWMWKJ.js → chunk-ZHXLO4CC.js} +1 -1
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +2 -2
- package/velt-comment.js +7 -7
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +2 -2
- package/velt-huddle.js +2 -2
- package/velt-live-state-sync.js +2 -2
- package/velt-notification.js +1 -1
- package/velt-portable.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +2 -2
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +2 -2
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +2 -2
- package/velt.js +6 -6
- package/chunk-6YGRELTV.js +0 -2
- package/chunk-7TNGPXR5.js +0 -1
- package/chunk-A4HLP4VU.js +0 -1
- package/chunk-A6I23DJF.js +0 -1
- package/chunk-DAUJEOMM.js +0 -193
- package/chunk-IEOSSENF.js +0 -1
- package/chunk-KJN6PDWN.js +0 -93
- package/chunk-KKKGHIG4.js +0 -1
- package/chunk-RSCWN2VG.js +0 -1
- package/chunk-SZUD6M7J.js +0 -6
- package/chunk-TG2UOHTU.js +0 -1
- package/chunk-UY5BYX47.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{e as Vt,l as io,t as no}from"./chunk-MRY4A7N6.js";import{$a as Rn,$c as Pt,$e as Wn,Aa as wn,Ac as zn,Ba as At,Bc as ee,Bi as st,Cb as Fn,D as Et,Db as Nn,Dc as Mt,E as D,Ee as S,F as Ot,Fb as kt,Fc as Vn,G as _i,Gb as Tt,Ha as An,Hb as xt,He as $e,Ia as z,J as wt,Ja as N,K as ne,Ka as se,Lb as Un,M as oe,Mb as ot,Mf as Kn,Na as Se,O as vn,Og as Qn,Pa as ae,Qa as Ne,Qf as Si,R as yn,Ra as Z,Rh as Ii,Ri as Ut,S as Cn,Si as Jn,Ta as Ue,Ti as te,U as be,Ua as yi,Ud as jn,Uh as Ft,Ui as He,V as v,Vd as $n,W as ue,Wa as W,Wh as qn,X as bn,Xa as U,Y as J,Ya as L,Yf as O,_ as Sn,_a as Y,_c as H,_e as Gn,a as p,aa as In,ab as Rt,ac as ze,ag as Xn,b as B,ba as y,bj as Ie,ca as F,cj as Ge,da as A,db as Be,dj as De,ea as k,ee as Hn,ej as Bt,fa as h,fb as pe,g as j,gj as T,h as Q,ha as Le,i as Ce,j as gn,ji as Nt,jj as eo,k as _,l as b,n as mn,na as E,o as _n,oa as P,ob as kn,pa as Dn,pb as Tn,q as St,r as g,ra as Fe,rb as xn,re as rt,rf as Yn,rg as Zn,s as It,sa as $,sb as Mn,tb as Pn,tc as Bn,ua as En,uc as bi,uj as to,v as C,va as On,vc as Ve,w as nt,wa as re,x as Dt,xa as fe,xe as Lt,xj as zt,ya as R,yb as Ci,za as vi,zb as Ln,zc as je}from"./chunk-YFBAHLK6.js";function ce(n,i=0){return oo(n)?Number(n):arguments.length===2?i:0}function oo(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Ee(n){return n instanceof R?n.nativeElement:n}var mr=new A("cdk-dir-doc",{providedIn:"root",factory:_r});function _r(){return h(P)}var vr=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function ro(n){let i=n?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?vr.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var le=(()=>{class n{get value(){return this.valueSignal()}valueSignal=$("ltr");change=new z;constructor(){let e=h(mr,{optional:!0});if(e){let t=e.body?e.body.dir:null,o=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(ro(t||o||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var q=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(q||{}),jt,Oe;function $t(){if(Oe==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Oe=!1,Oe;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Oe=!0;else{let n=Element.prototype.scrollTo;n?Oe=!/\{\s*\[native code\]\s*\}/.test(n.toString()):Oe=!1}}return Oe}function We(){if(typeof document!="object"||!document)return q.NORMAL;if(jt==null){let n=document.createElement("div"),i=n.style;n.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";let e=document.createElement("div"),t=e.style;t.width="2px",t.height="1px",n.appendChild(e),document.body.appendChild(n),jt=q.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,jt=n.scrollLeft===0?q.NEGATED:q.INVERTED),n.remove()}return jt}var ge=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({})}return n})();var Ht=class{};function so(n){return n&&typeof n.connect=="function"&&!(n instanceof gn)}var Gt=class extends Ht{_data;constructor(i){super(),this._data=i}connect(){return It(this._data)?this._data:g(this._data)}disconnect(){}},at=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})(at||{}),Di=new A("_ViewRepeater"),Wt=class{viewCacheSize=20;_viewCache=[];applyChanges(i,e,t,o,r){i.forEachOperation((s,a,c)=>{let d,l;if(s.previousIndex==null){let u=()=>t(s,a,c);d=this._insertView(u,c,e,o(s)),l=d?at.INSERTED:at.REPLACED}else c==null?(this._detachAndCacheView(a,e),l=at.REMOVED):(d=this._moveView(a,c,e,o(s)),l=at.MOVED);r&&r({context:d?.context,operation:l,record:s})})}detach(){for(let i of this._viewCache)i.destroy();this._viewCache=[]}_insertView(i,e,t,o){let r=this._insertViewFromCache(e,t);if(r){r.context.$implicit=o;return}let s=i();return t.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(i,e){let t=e.detach(i);this._maybeCacheView(t,e)}_moveView(i,e,t,o){let r=t.get(i);return t.move(r,e),r.context.$implicit=o,r}_maybeCacheView(i,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(i);else{let t=e.indexOf(i);t===-1?i.destroy():e.remove(t)}}_insertViewFromCache(i,e){let t=this._viewCache.pop();return t&&e.insert(t,i),t||null}};var yr=["contentWrapper"],Cr=["*"],lo=new A("VIRTUAL_SCROLL_STRATEGY"),Ei=class{_scrolledIndexChange=new _;scrolledIndexChange=this._scrolledIndexChange.pipe(oe());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(i,e,t){this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=t}attach(i){this._viewport=i,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(i,e,t){t<e,this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=t,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(i,e){this._viewport&&this._viewport.scrollToOffset(i*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let i=this._viewport.getRenderedRange(),e={start:i.start,end:i.end},t=this._viewport.getViewportSize(),o=this._viewport.getDataLength(),r=this._viewport.measureScrollOffset(),s=this._itemSize>0?r/this._itemSize:0;if(e.end>o){let c=Math.ceil(t/this._itemSize),d=Math.max(0,Math.min(s,o-c));s!=d&&(s=d,r=d*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(o,e.start+c))}let a=r-e.start*this._itemSize;if(a<this._minBufferPx&&e.start!=0){let c=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-c),e.end=Math.min(o,Math.ceil(s+(t+this._minBufferPx)/this._itemSize))}else{let c=e.end*this._itemSize-(r+t);if(c<this._minBufferPx&&e.end!=o){let d=Math.ceil((this._maxBufferPx-c)/this._itemSize);d>0&&(e.end=Math.min(o,e.end+d),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function br(n){return n._scrollStrategy}var Sr=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=ce(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=ce(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=ce(e)}_maxBufferPx=200;_scrollStrategy=new Ei(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[ze([{provide:lo,useFactory:br,deps:[In(()=>n)]}]),re]})}return n})(),Ir=20,ct=(()=>{class n{_ngZone=h(N);_platform=h(H);_renderer=h(ae).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new _;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Ir){return this._platform.isBrowser?new Ce(t=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let o=e>0?this._scrolled.pipe(Ot(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):g()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let o=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(D(r=>!r||o.indexOf(r)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((o,r)=>{this._scrollableContainsElement(r,e)&&t.push(r)}),t}_scrollableContainsElement(e,t){let o=Ee(t),r=e.getElementRef().nativeElement;do if(o==r)return!0;while(o=o.parentElement);return!1}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),lt=(()=>{class n{elementRef=h(R);scrollDispatcher=h(ct);ngZone=h(N);dir=h(le,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new _;_renderer=h(Ne);_cleanupScroll;_elementScrolled=new _;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let t=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=o?e.end:e.start),e.right==null&&(e.right=o?e.start:e.end),e.bottom!=null&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),o&&We()!=q.NORMAL?(e.left!=null&&(e.right=t.scrollWidth-t.clientWidth-e.left),We()==q.INVERTED?e.left=e.right:We()==q.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let t=this.elementRef.nativeElement;$t()?t.scrollTo(e):(e.top!=null&&(t.scrollTop=e.top),e.left!=null&&(t.scrollLeft=e.left))}measureScrollOffset(e){let t="left",o="right",r=this.elementRef.nativeElement;if(e=="top")return r.scrollTop;if(e=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?o:t:e=="end"&&(e=s?t:o),s&&We()==q.INVERTED?e==t?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:s&&We()==q.NEGATED?e==t?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==t?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),Dr=20,we=(()=>{class n{_platform=h(H);_listeners;_viewportSize;_change=new _;_document=h(P);constructor(){let e=h(N),t=h(ae).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let o=r=>this._change.next(r);this._listeners=[t.listen("window","resize",o),t.listen("window","orientationchange",o)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:o}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+o,right:e.left+t,height:o,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),o=e.documentElement,r=o.getBoundingClientRect(),s=-r.top||e.body.scrollTop||t.scrollY||o.scrollTop||0,a=-r.left||e.body.scrollLeft||t.scrollX||o.scrollLeft||0;return{top:s,left:a}}change(e=Dr){return e>0?this._change.pipe(Ot(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ao=new A("VIRTUAL_SCROLLABLE"),Er=(()=>{class n extends lt{constructor(){super()}measureViewportSize(e){let t=this.elementRef.nativeElement;return e==="horizontal"?t.clientWidth:t.clientHeight}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,features:[Y]})}return n})();function Or(n,i){return n.start==i.start&&n.end==i.end}var wr=typeof requestAnimationFrame<"u"?_n:mn,ho=(()=>{class n extends Er{elementRef=h(R);_changeDetectorRef=h(je);_scrollStrategy=h(lo,{optional:!0});scrollable=h(ao,{optional:!0});_platform=h(H);_detachedSubject=new _;_renderedRangeSubject=new _;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new Ce(e=>this._scrollStrategy.scrolledIndexChange.subscribe(t=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(t)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=$("");_totalContentHeight=$("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=$(!1);_runAfterChangeDetection=[];_viewportChanges=Q.EMPTY;_injector=h(E);_isDestroyed=!1;constructor(){super();let e=h(we);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let t=Ve(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:h(Be).injector});h(Dn).onDestroy(()=>{t.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(be(null),Ot(0,wr),ue(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(ue(this._detachedSubject)).subscribe(t=>{let o=t.length;o!==this._dataLength&&(this._dataLength=o,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Or(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,t="to-start"){e=this.appendOnly&&t==="to-start"?0:e;let o=this.dir&&this.dir.value=="rtl",r=this.orientation=="horizontal",s=r?"X":"Y",c=`translate${s}(${Number((r&&o?-1:1)*e)}px)`;this._renderedContentOffset=e,t==="to-end"&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,t="auto"){let o={behavior:t};this.orientation==="horizontal"?o.start=e:o.top=e,this.scrollable.scrollTo(o)}scrollToIndex(e,t="auto"){this._scrollStrategy.scrollToIndex(e,t)}measureScrollOffset(e){let t;return this.scrollable==this?t=o=>super.measureScrollOffset(o):t=o=>this.scrollable.measureScrollOffset(o),Math.max(0,t(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let t,o="left",r="right",s=this.dir?.value=="rtl";e=="start"?t=s?r:o:e=="end"?t=s?o:r:e?t=e:t=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(t);return this.elementRef.nativeElement.getBoundingClientRect()[t]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!Bn(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,se(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let t of e)t()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=W({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,o){if(t&1&&kt(yr,7),t&2){let r;Tt(r=xt())&&(o._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,o){t&2&&ot("cdk-virtual-scroll-orientation-horizontal",o.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",o.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ee]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[ze([{provide:lt,useFactory:(e,t)=>e||t,deps:[[new On,new En(ao)],n]}]),Y],ngContentSelectors:Cr,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(t,o){t&1&&(Fn(),xn(0,"div",1,0),Nn(2),Mn(),Pn(3,"div",2)),t&2&&(An(3),Un("width",o._totalContentWidth())("height",o._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return n})();function co(n,i,e){let t=e;if(!t.getBoundingClientRect)return 0;let o=t.getBoundingClientRect();return n==="horizontal"?i==="start"?o.left:o.right:i==="start"?o.top:o.bottom}var Ar=(()=>{class n{_viewContainerRef=h(Ue);_template=h(Se);_differs=h(zn);_viewRepeater=h(Di);_viewport=h(ho,{skipSelf:!0});viewChange=new _;_dataSourceChanges=new _;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,so(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new Gt(It(e)?e:Array.from(e||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(t,o)=>e(t+(this._renderedRange?this._renderedRange.start:0),o):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=ce(e)}dataStream=this._dataSourceChanges.pipe(be(null),vn(),v(([e,t])=>this._changeDataSource(e,t)),yn(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new _;constructor(){let e=h(N);this.dataStream.subscribe(t=>{this._data=t,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(ue(this._destroyed)).subscribe(t=>{this._renderedRange=t,this.viewChange.observers.length&&e.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,t){if(e.start>=e.end)return 0;e.start<this._renderedRange.start||e.end>this._renderedRange.end;let o=e.start-this._renderedRange.start,r=e.end-e.start,s,a;for(let c=0;c<r;c++){let d=this._viewContainerRef.get(c+o);if(d&&d.rootNodes.length){s=a=d.rootNodes[0];break}}for(let c=r-1;c>-1;c--){let d=this._viewContainerRef.get(c+o);if(d&&d.rootNodes.length){a=d.rootNodes[d.rootNodes.length-1];break}}return s&&a?co(t,"end",a)-co(t,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,t)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,t):t)),this._needsUpdate=!0)}_changeDataSource(e,t){return e&&e.disconnect(this),this._needsUpdate=!0,t?t.connect(this):g()}_updateContext(){let e=this._data.length,t=this._viewContainerRef.length;for(;t--;){let o=this._viewContainerRef.get(t);o.context.index=this._renderedRange.start+t,o.context.count=e,this._updateComputedContextProperties(o.context),o.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(r,s,a)=>this._getEmbeddedViewArgs(r,a),r=>r.item),e.forEachIdentityChange(r=>{let s=this._viewContainerRef.get(r.currentIndex);s.context.$implicit=r.item});let t=this._data.length,o=this._viewContainerRef.length;for(;o--;){let r=this._viewContainerRef.get(o);r.context.index=this._renderedRange.start+o,r.context.count=t,this._updateComputedContextProperties(r.context)}}_updateComputedContextProperties(e){e.first=e.index===0,e.last=e.index===e.count-1,e.even=e.index%2===0,e.odd=!e.even}_getEmbeddedViewArgs(e,t){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:t}}static ngTemplateContextGuard(e,t){return!0}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[ze([{provide:Di,useClass:Wt}])]})}return n})();var Oi=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({})}return n})(),wi=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({imports:[ge,Oi,ge,Oi]})}return n})();var dt=class{_attachedHost;attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;i!=null&&(this._attachedHost=null,i.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(i){this._attachedHost=i}},Ye=class extends dt{component;viewContainerRef;injector;projectableNodes;constructor(i,e,t,o){super(),this.component=i,this.viewContainerRef=e,this.injector=t,this.projectableNodes=o}},Ae=class extends dt{templateRef;viewContainerRef;context;injector;constructor(i,e,t,o){super(),this.templateRef=i,this.viewContainerRef=e,this.context=t,this.injector=o}get origin(){return this.templateRef.elementRef}attach(i,e=this.context){return this.context=e,super.attach(i)}detach(){return this.context=void 0,super.detach()}},Ai=class extends dt{element;constructor(i){super(),this.element=i instanceof R?i.nativeElement:i}},Ke=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(i){if(i instanceof Ye)return this._attachedPortal=i,this.attachComponentPortal(i);if(i instanceof Ae)return this._attachedPortal=i,this.attachTemplatePortal(i);if(this.attachDomPortal&&i instanceof Ai)return this._attachedPortal=i,this.attachDomPortal(i)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Yt=class extends Ke{outletElement;_appRef;_defaultInjector;constructor(i,e,t){super(),this.outletElement=i,this._appRef=e,this._defaultInjector=t}attachComponentPortal(i){let e;if(i.viewContainerRef){let t=i.injector||i.viewContainerRef.injector,o=t.get(yi,null,{optional:!0})||void 0;e=i.viewContainerRef.createComponent(i.component,{index:i.viewContainerRef.length,injector:t,ngModuleRef:o,projectableNodes:i.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let t=this._appRef,o=i.injector||this._defaultInjector||E.NULL,r=o.get(Le,t.injector);e=Mt(i.component,{elementInjector:o,environmentInjector:r,projectableNodes:i.projectableNodes||void 0}),t.attachView(e.hostView),this.setDisposeFn(()=>{t.viewCount>0&&t.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=i,e}attachTemplatePortal(i){let e=i.viewContainerRef,t=e.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return t.rootNodes.forEach(o=>this.outletElement.appendChild(o)),t.detectChanges(),this.setDisposeFn(()=>{let o=e.indexOf(t);o!==-1&&e.remove(o)}),this._attachedPortal=i,t}attachDomPortal=i=>{let e=i.element;e.parentNode;let t=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(t,e),this.outletElement.appendChild(e),this._attachedPortal=i,super.setDisposeFn(()=>{t.parentNode&&t.parentNode.replaceChild(e,t)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}};var ht=(()=>{class n extends Ke{_moduleRef=h(yi,{optional:!0});_document=h(P);_viewContainerRef=h(Ue);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new z;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let t=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,o=t.createComponent(e.component,{index:t.length,injector:e.injector||t.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return t!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=e,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(e){e.setAttachedHost(this);let t=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=t,this.attached.emit(t),t}attachDomPortal=e=>{let t=e.element;t.parentNode;let o=this._document.createComment("dom-portal");e.setAttachedHost(this),t.parentNode.insertBefore(o,t),this._getRootNode().appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{o.parentNode&&o.parentNode.replaceChild(t,o)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Y]})}return n})();var Re=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({})}return n})();var Ri;function kr(){if(Ri==null){let n=typeof document<"u"?document.head:null;Ri=!!(n&&(n.createShadowRoot||n.attachShadow))}return Ri}function uo(n){if(kr()){let i=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function Kt(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){let i=n.shadowRoot.activeElement;if(i===n)break;n=i}return n}function ie(n){return n.composedPath?n.composedPath()[0]:n.target}function ki(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Xt=new WeakMap,Xe=(()=>{class n{_appRef;_injector=h(E);_environmentInjector=h(Le);load(e){let t=this._appRef=this._appRef||this._injector.get(Be),o=Xt.get(t);o||(o={loaders:new Set,refs:[]},Xt.set(t,o),t.onDestroy(()=>{Xt.get(t)?.refs.forEach(r=>r.destroy()),Xt.delete(t)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(Mt(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function x(n){return n==null?"":typeof n=="string"?n:`${n}px`}var Ti={},me=(()=>{class n{_appId=h(wn);getId(e){return this._appId!=="ng"&&(e+=this._appId),Ti.hasOwnProperty(e)||(Ti[e]=0),`${e}${Ti[e]++}`}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function _e(n,...i){return i.length?i.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}var fo=$t();function Qe(n){return new Zt(n.get(we),n.get(P))}var Zt=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(i,e){this._viewportRuler=i,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=x(-this._previousScrollPosition.left),i.style.top=x(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let i=this._document.documentElement,e=this._document.body,t=i.style,o=e.style,r=t.scrollBehavior||"",s=o.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),fo&&(t.scrollBehavior=o.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),fo&&(t.scrollBehavior=r,o.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}};function Co(n,i){return new Qt(n.get(ct),n.get(N),n.get(we),i)}var Qt=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(i,e,t,o){this._scrollDispatcher=i,this._ngZone=e,this._viewportRuler=t,this._config=o}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(this._scrollSubscription)return;let i=this._scrollDispatcher.scrolled(0).pipe(D(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var ut=class{enable(){}disable(){}attach(){}};function xi(n,i){return i.some(e=>{let t=n.bottom<e.top,o=n.top>e.bottom,r=n.right<e.left,s=n.left>e.right;return t||o||r||s})}function po(n,i){return i.some(e=>{let t=n.top<e.top,o=n.bottom>e.bottom,r=n.left<e.left,s=n.right>e.right;return t||o||r||s})}function ii(n,i){return new qt(n.get(ct),n.get(we),n.get(N),i)}var qt=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(i,e,t,o){this._scrollDispatcher=i,this._viewportRuler=e,this._ngZone=t,this._config=o}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(!this._scrollSubscription){let i=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(i).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:t,height:o}=this._viewportRuler.getViewportSize();xi(e,[{width:t,height:o,bottom:o,right:t,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},bo=(()=>{class n{_injector=h(E);constructor(){}noop=()=>new ut;close=e=>Co(this._injector,e);block=()=>Qe(this._injector);reposition=e=>ii(this._injector,e);static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Te=class{positionStrategy;scrollStrategy=new ut;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(i){if(i){let e=Object.keys(i);for(let t of e)i[t]!==void 0&&(this[t]=i[t])}}},Mi=class{offsetX;offsetY;panelClass;originX;originY;overlayX;overlayY;constructor(i,e,t,o,r){this.offsetX=t,this.offsetY=o,this.panelClass=r,this.originX=i.originX,this.originY=i.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}};var Jt=class{connectionPair;scrollableViewProperties;constructor(i,e){this.connectionPair=i,this.scrollableViewProperties=e}};var So=(()=>{class n{_attachedOverlays=[];_document=h(P);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Io=(()=>{class n extends So{_ngZone=h(N);_renderer=h(ae).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let t=this._attachedOverlays;for(let o=t.length-1;o>-1;o--)if(t[o]._keydownEvents.observers.length>0){this._ngZone.run(()=>t[o]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(o){return(e||(e=fe(n)))(o||n)}})();static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Do=(()=>{class n extends So{_platform=h(H);_ngZone=h(N);_renderer=h(ae).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let t=this._document.body,o={capture:!0},r=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[r.listen(t,"pointerdown",this._pointerDownListener,o),r.listen(t,"click",this._clickListener,o),r.listen(t,"auxclick",this._clickListener,o),r.listen(t,"contextmenu",this._clickListener,o)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=ie(e)};_clickListener=e=>{let t=ie(e),o=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=null;let r=this._attachedOverlays.slice();for(let s=r.length-1;s>-1;s--){let a=r[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(go(a.overlayElement,t)||go(a.overlayElement,o))break;let c=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>c.next(e)):c.next(e)}};static \u0275fac=(()=>{let e;return function(o){return(e||(e=fe(n)))(o||n)}})();static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function go(n,i){let e=typeof ShadowRoot<"u"&&ShadowRoot,t=i;for(;t;){if(t===n)return!0;t=e&&t instanceof ShadowRoot?t.host:t.parentNode}return!1}var Eo=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=W({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(t,o){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
3
|
+
`],encapsulation:2,changeDetection:0})}return n})(),ni=(()=>{class n{_platform=h(H);_containerElement;_document=h(P);_styleLoader=h(Xe);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||ki()){let o=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let r=0;r<o.length;r++)o[r].remove()}let t=this._document.createElement("div");t.classList.add(e),ki()?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}_loadStyles(){this._styleLoader.load(Eo)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Pi=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(i,e,t,o){this._renderer=e,this._ngZone=t,this.element=i.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",o)}detach(){this._ngZone.runOutsideAngular(()=>{let i=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(i,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),i.style.pointerEvents="none",i.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ze=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new _;_attachments=new _;_detachments=new _;_positionStrategy;_scrollStrategy;_locationChanges=Q.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new _;_outsidePointerEvents=new _;_afterNextRenderRef;constructor(i,e,t,o,r,s,a,c,d,l=!1,u,w){this._portalOutlet=i,this._host=e,this._pane=t,this._config=o,this._ngZone=r,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=d,this._animationsDisabled=l,this._injector=u,this._renderer=w,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=se(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let i=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){let i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,i&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config=p(p({},this._config),i),this._updateElementSize()}setDirection(i){this._config=B(p({},this._config),{direction:i}),this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){let i=this._config.direction;return i?typeof i=="string"?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let i=this._pane.style;i.width=x(this._config.width),i.height=x(this._config.height),i.minWidth=x(this._config.minWidth),i.minHeight=x(this._config.minHeight),i.maxWidth=x(this._config.maxWidth),i.maxHeight=x(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){let i="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Pi(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(i))}):this._backdropRef.element.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(i,e,t){let o=Pt(e||[]).filter(r=>!!r);o.length&&(t?i.classList.add(...o):i.classList.remove(...o))}_detachContentWhenEmpty(){let i=!1;try{this._detachContentAfterRenderRef=se(()=>{i=!0,this._detachContent()},{injector:this._injector})}catch(e){if(i)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let i=this._scrollStrategy;i?.disable(),i?.detach?.()}},mo="cdk-overlay-connected-position-bounding-box",Tr=/([A-Za-z%]+)$/;function Ni(n,i){return new ei(i,n.get(we),n.get(P),n.get(H),n.get(ni))}var ei=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new _;_resizeSubscription=Q.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(i,e,t,o,r){this._viewportRuler=e,this._document=t,this._platform=o,this._overlayContainer=r,this.setOrigin(i)}attach(i){this._overlayRef&&this._overlayRef,this._validatePositions(),i.hostElement.classList.add(mo),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let i=this._originRect,e=this._overlayRect,t=this._viewportRect,o=this._containerRect,r=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(i,o,a),d=this._getOverlayPoint(c,e,a),l=this._getOverlayFit(d,e,t,a);if(l.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(l,d,t)){r.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleArea<l.visibleArea)&&(s={overlayFit:l,overlayPoint:d,originPoint:c,position:a,overlayRect:e})}if(r.length){let a=null,c=-1;for(let d of r){let l=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);l>c&&(c=l,a=d)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ke(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(mo),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,e)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,i.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,e,t){let o;if(t.originX=="center")o=i.left+i.width/2;else{let s=this._isRtl()?i.right:i.left,a=this._isRtl()?i.left:i.right;o=t.originX=="start"?s:a}e.left<0&&(o-=e.left);let r;return t.originY=="center"?r=i.top+i.height/2:r=t.originY=="top"?i.top:i.bottom,e.top<0&&(r-=e.top),{x:o,y:r}}_getOverlayPoint(i,e,t){let o;t.overlayX=="center"?o=-e.width/2:t.overlayX==="start"?o=this._isRtl()?-e.width:0:o=this._isRtl()?0:-e.width;let r;return t.overlayY=="center"?r=-e.height/2:r=t.overlayY=="top"?0:-e.height,{x:i.x+o,y:i.y+r}}_getOverlayFit(i,e,t,o){let r=vo(e),{x:s,y:a}=i,c=this._getOffset(o,"x"),d=this._getOffset(o,"y");c&&(s+=c),d&&(a+=d);let l=0-s,u=s+r.width-t.width,w=0-a,f=a+r.height-t.height,m=this._subtractOverflows(r.width,l,u),I=this._subtractOverflows(r.height,w,f),K=m*I;return{visibleArea:K,isCompletelyWithinViewport:r.width*r.height===K,fitsInViewportVertically:I===r.height,fitsInViewportHorizontally:m==r.width}}_canFitWithFlexibleDimensions(i,e,t){if(this._hasFlexibleDimensions){let o=t.bottom-e.y,r=t.right-e.x,s=_o(this._overlayRef.getConfig().minHeight),a=_o(this._overlayRef.getConfig().minWidth),c=i.fitsInViewportVertically||s!=null&&s<=o,d=i.fitsInViewportHorizontally||a!=null&&a<=r;return c&&d}return!1}_pushOverlayOnScreen(i,e,t){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};let o=vo(e),r=this._viewportRect,s=Math.max(i.x+o.width-r.width,0),a=Math.max(i.y+o.height-r.height,0),c=Math.max(r.top-t.top-i.y,0),d=Math.max(r.left-t.left-i.x,0),l=0,u=0;return o.width<=r.width?l=d||-s:l=i.x<this._viewportMargin?r.left-t.left-i.x:0,o.height<=r.height?u=c||-a:u=i.y<this._viewportMargin?r.top-t.top-i.y:0,this._previousPushAmount={x:l,y:u},{x:i.x+l,y:i.y+u}}_applyPosition(i,e){if(this._setTransformOrigin(i),this._setOverlayElementStyles(e,i),this._setBoundingBoxStyles(e,i),i.panelClass&&this._addPanelClasses(i.panelClass),this._positionChanges.observers.length){let t=this._getScrollVisibility();if(i!==this._lastPosition||!this._lastScrollVisibility||!xr(this._lastScrollVisibility,t)){let o=new Jt(i,t);this._positionChanges.next(o)}this._lastScrollVisibility=t}this._lastPosition=i,this._isInitialRender=!1}_setTransformOrigin(i){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),t,o=i.overlayY;i.overlayX==="center"?t="center":this._isRtl()?t=i.overlayX==="start"?"right":"left":t=i.overlayX==="start"?"left":"right";for(let r=0;r<e.length;r++)e[r].style.transformOrigin=`${t} ${o}`}_calculateBoundingBoxRect(i,e){let t=this._viewportRect,o=this._isRtl(),r,s,a;if(e.overlayY==="top")s=i.y,r=t.height-s+this._viewportMargin;else if(e.overlayY==="bottom")a=t.height-i.y+this._viewportMargin*2,r=t.height-a+this._viewportMargin;else{let f=Math.min(t.bottom-i.y+t.top,i.y),m=this._lastBoundingBoxSize.height;r=f*2,s=i.y-f,r>m&&!this._isInitialRender&&!this._growAfterOpen&&(s=i.y-m/2)}let c=e.overlayX==="start"&&!o||e.overlayX==="end"&&o,d=e.overlayX==="end"&&!o||e.overlayX==="start"&&o,l,u,w;if(d)w=t.width-i.x+this._viewportMargin*2,l=i.x-this._viewportMargin;else if(c)u=i.x,l=t.right-i.x;else{let f=Math.min(t.right-i.x+t.left,i.x),m=this._lastBoundingBoxSize.width;l=f*2,u=i.x-f,l>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=i.x-m/2)}return{top:s,left:u,bottom:a,right:w,width:l,height:r}}_setBoundingBoxStyles(i,e){let t=this._calculateBoundingBoxRect(i,e);!this._isInitialRender&&!this._growAfterOpen&&(t.height=Math.min(t.height,this._lastBoundingBoxSize.height),t.width=Math.min(t.width,this._lastBoundingBoxSize.width));let o={};if(this._hasExactPosition())o.top=o.left="0",o.bottom=o.right=o.maxHeight=o.maxWidth="",o.width=o.height="100%";else{let r=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;o.height=x(t.height),o.top=x(t.top),o.bottom=x(t.bottom),o.width=x(t.width),o.left=x(t.left),o.right=x(t.right),e.overlayX==="center"?o.alignItems="center":o.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?o.justifyContent="center":o.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",r&&(o.maxHeight=x(r)),s&&(o.maxWidth=x(s))}this._lastBoundingBoxSize=t,ke(this._boundingBox.style,o)}_resetBoundingBoxStyles(){ke(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ke(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,e){let t={},o=this._hasExactPosition(),r=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(o){let l=this._viewportRuler.getViewportScrollPosition();ke(t,this._getExactOverlayY(e,i,l)),ke(t,this._getExactOverlayX(e,i,l))}else t.position="static";let a="",c=this._getOffset(e,"x"),d=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),d&&(a+=`translateY(${d}px)`),t.transform=a.trim(),s.maxHeight&&(o?t.maxHeight=x(s.maxHeight):r&&(t.maxHeight="")),s.maxWidth&&(o?t.maxWidth=x(s.maxWidth):r&&(t.maxWidth="")),ke(this._pane.style,t)}_getExactOverlayY(i,e,t){let o={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,i);if(this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,t)),i.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;o.bottom=`${s-(r.y+this._overlayRect.height)}px`}else o.top=x(r.y);return o}_getExactOverlayX(i,e,t){let o={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,i);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,t));let s;if(this._isRtl()?s=i.overlayX==="end"?"left":"right":s=i.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;o.right=`${a-(r.x+this._overlayRect.width)}px`}else o.left=x(r.x);return o}_getScrollVisibility(){let i=this._getOriginRect(),e=this._pane.getBoundingClientRect(),t=this._scrollables.map(o=>o.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:po(i,t),isOriginOutsideView:xi(i,t),isOverlayClipped:po(e,t),isOverlayOutsideView:xi(e,t)}}_subtractOverflows(i,...e){return e.reduce((t,o)=>t-Math.max(o,0),i)}_getNarrowedViewportRect(){let i=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,t=this._viewportRuler.getViewportScrollPosition();return{top:t.top+this._viewportMargin,left:t.left+this._viewportMargin,right:t.left+i-this._viewportMargin,bottom:t.top+e-this._viewportMargin,width:i-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,e){return e==="x"?i.offsetX==null?this._offsetX:i.offsetX:i.offsetY==null?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&Pt(i).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){let i=this._origin;if(i instanceof R)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();let e=i.width||0,t=i.height||0;return{top:i.y,bottom:i.y+t,left:i.x,right:i.x+e,height:t,width:e}}};function ke(n,i){for(let e in i)i.hasOwnProperty(e)&&(n[e]=i[e]);return n}function _o(n){if(typeof n!="number"&&n!=null){let[i,e]=n.split(Tr);return!e||e==="px"?parseFloat(i):null}return n||null}function vo(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}function xr(n,i){return n===i?!0:n.isOriginClipped===i.isOriginClipped&&n.isOriginOutsideView===i.isOriginOutsideView&&n.isOverlayClipped===i.isOverlayClipped&&n.isOverlayOutsideView===i.isOverlayOutsideView}var yo="cdk-global-overlay-wrapper";function qe(n){return new ti}var ti=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(i){let e=i.getConfig();this._overlayRef=i,this._width&&!e.width&&i.updateSize({width:this._width}),this._height&&!e.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(yo),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,t=this._overlayRef.getConfig(),{width:o,height:r,maxWidth:s,maxHeight:a}=t,c=(o==="100%"||o==="100vw")&&(!s||s==="100%"||s==="100vw"),d=(r==="100%"||r==="100vh")&&(!a||a==="100%"||a==="100vh"),l=this._xPosition,u=this._xOffset,w=this._overlayRef.getConfig().direction==="rtl",f="",m="",I="";c?I="flex-start":l==="center"?(I="center",w?m=u:f=u):w?l==="left"||l==="end"?(I="flex-end",f=u):(l==="right"||l==="start")&&(I="flex-start",m=u):l==="left"||l==="start"?(I="flex-start",f=u):(l==="right"||l==="end")&&(I="flex-end",m=u),i.position=this._cssPosition,i.marginLeft=c?"0":f,i.marginTop=d?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=c?"0":m,e.justifyContent=I,e.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,t=e.style;e.classList.remove(yo),t.justifyContent=t.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}},Oo=(()=>{class n{_injector=h(E);constructor(){}global(){return qe()}flexibleConnectedTo(e){return Ni(this._injector,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ft(n,i){n.get(Xe).load(Eo);let e=n.get(ni),t=n.get(P),o=n.get(me),r=n.get(Be),s=n.get(le),a=t.createElement("div"),c=t.createElement("div");c.id=o.getId("cdk-overlay-"),c.classList.add("cdk-overlay-pane"),a.appendChild(c),e.getContainerElement().appendChild(a);let d=new Yt(c,r,n),l=new Te(i),u=n.get(Ne,null,{optional:!0})||n.get(ae).createRenderer(null,null);return l.direction=l.direction||s.value,new Ze(d,a,c,l,n.get(N),n.get(Io),t,n.get(Vn),n.get(Do),i?.disableAnimations??n.get(At,null,{optional:!0})==="NoopAnimations",n.get(Le),u)}var wo=(()=>{class n{scrollStrategies=h(bo);_positionBuilder=h(Oo);_injector=h(E);constructor(){}create(e){return ft(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Mr=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Ao=new A("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let n=h(E);return()=>ii(n)}}),Li=(()=>{class n{elementRef=h(R);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return n})(),Pr=(()=>{class n{_dir=h(le,{optional:!0});_injector=h(E);_overlayRef;_templatePortal;_backdropSubscription=Q.EMPTY;_attachSubscription=Q.EMPTY;_detachSubscription=Q.EMPTY;_positionSubscription=Q.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=h(Ao);_disposeOnNavigation=!1;_ngZone=h(N);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(e){this._disposeOnNavigation=e}backdropClick=new z;positionChange=new z;attach=new z;detach=new z;overlayKeydown=new z;overlayOutsideClick=new z;constructor(){let e=h(Se),t=h(Ue);this._templatePortal=new Ae(e,t),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Mr);let e=this._overlayRef=ft(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode===27&&!this.disableClose&&!_e(t)&&(t.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{let o=this._getOriginElement(),r=ie(t);(!o||o!==r&&!o.contains(r))&&this.overlayOutsideClick.next(t)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),t=new Te({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(t.width=this.width),(this.height||this.height===0)&&(t.height=this.height),(this.minWidth||this.minWidth===0)&&(t.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}_updatePositionStrategy(e){let t=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(t).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=Ni(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof Li?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Li?this.origin.elementRef.nativeElement:this.origin instanceof R?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(bn(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ee],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",ee],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ee],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ee],push:[2,"cdkConnectedOverlayPush","push",ee],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ee]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[re]})}return n})();function Lr(n){let i=h(E);return()=>ii(i)}var Fr={provide:Ao,useFactory:Lr},pt=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({providers:[wo,Fr],imports:[ge,Re,wi,wi]})}return n})();var Nr=new Set(["annotation-id","class","style","id","slot","title","hidden","dark","role","tabindex","ng-reflect-annotation-id","ng-version","_nghost","_ngcontent"]),Ui="__veltContext";function Ur(n){let i={};try{if(!n?.attributes)return i;let e=n.attributes;for(let t=0;t<e.length;t++){let o=e[t].name.toLowerCase();Nr.has(o)||o.startsWith("_ng")||o.startsWith("ng-")||o.startsWith("data-")||o.startsWith("aria-")||o!=="velt-element"&&(i[o]=e[t].value)}}catch{}return i}function Br(n,i){return p(p({},n||{}),i||{})}function Ro(n){try{let i=n?.[Ui];return i&&typeof i=="object"?i:void 0}catch{return}}var Bi=null,zi=null,Vi,ji=!1;function xe(){Bi=null,zi=null,Vi=void 0,ji=!1}function zr(n,i){try{if(!n){xe();return}Bi=n,zi=n.parentElement,Vi=i,ji=!0}catch{xe()}}function fc(n){try{if(!n||!ji||Bi!==n)return;if(zi!==n.parentElement){xe();return}let i=Vi;return xe(),{payload:i}}catch{return}}function ko(n){try{let i=n||null;for(;i;){let e=i.parentElement;if(!e){let o=i.getRootNode?.();if(o instanceof ShadowRoot&&o.host){i=o.host;continue}break}let t=Ro(e);if(t)return{host:e,payload:t};i=e}}catch{}}function Vr(n){try{return n?!!n.annotationId||Object.keys(n.contextData||{}).length>0||n.data!==void 0||n.localUIState!==void 0||n.registry!==void 0:!1}catch{return!1}}function pc(n,i){try{if(!n)return;if(xe(),!Vr(i)){jr(n,i.ownerRef);return}return n[Ui]=i,i}catch{return}}function jr(n,i){try{if(!n)return;xe();let e=Ro(n);if(e&&e.ownerRef!==i)return;n[Ui]=void 0}catch{}}function gc(n){let{host:i,inherited:e,ownAnnotationId:t,ownData:o,registry:r,ownLocalUIState:s,ownerRef:a}=n,c=Ur(i),d=Br(e?.contextData,c),l;try{l=i?.getAttribute?.("annotation-id")||void 0}catch{}return{annotationId:t||l||e?.annotationId,contextData:d,data:o??e?.data,registry:r??e?.registry,localUIState:s??e?.localUIState,ownerRef:a}}function $r(n){try{let i=ko(n);return zr(n,i?.payload),i?.payload?.localUIState}catch{return}}function mc(n){try{if(n.isRoot||n.fromExplicitInput)return!1;let i=$r(n.host);if(!i||i===n.current)return!1;if(n.isOwner)try{n.current?.update?.(e=>p({},e))}catch{}return n.adopt(i),!0}catch{return!1}}function _c(n){try{return ko(n)?.payload?.data}catch{return}}var oi="__veltRefreshContext",Je=new Set;function vc(n,i,e){try{if(!n||typeof e!="function")return;n[oi]={ownerRef:i,fn:e},Je.add(n)}catch{}}function ri(n){try{let i=n?.[oi];return i&&typeof i.fn=="function"?i.fn:void 0}catch{return}}function yc(n,i){try{if(!n)return;let e=n[oi];if(e&&e.ownerRef!==i)return;n[oi]=void 0,Je.delete(n)}catch{}}var Hr=64;function Gr(n){let i=[];return Je.forEach(e=>{if(!ri(e)){Je.delete(e);return}n.contains(e)&&i.push(e)}),i.length>1&&i.sort((e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),i}function Wr(n){let i=[];return ri(n)&&i.push(n),n.querySelectorAll("*").forEach(e=>{ri(e)&&i.push(e)}),i}function To(n){try{if(!n||n.nodeType!==Node.ELEMENT_NODE||(xe(),!Je.size))return;let i=n;(Je.size<=Hr?Gr(i):Wr(i)).forEach(t=>{let o=ri(t);try{o?.()}catch{}})}catch{}}var xo="__veltHandled",Mo="velt",et=new WeakSet,si=0;function Po(n){try{if(!n||et.has(n))return;et.add(n),si++}catch{}}function ai(n){try{if(!n||!et.has(n))return;et.delete(n),si=Math.max(0,si-1)}catch{}}function Yr(n){try{if(!n||si===0)return!1;let i=typeof n.composedPath=="function"?n.composedPath():null;if(i){for(let t of i)if(et.has(t))return!0;return!1}let e=n.target;for(;e;){if(et.has(e))return!0;e=e.parentNode}return!1}catch{return!1}}function Lo(n){try{if(!n||(n[xo]=Mo,Yr(n)))return;n.stopPropagation()}catch{}}function Fo(n){try{return n?n[xo]===Mo:!1}catch{return!1}}var de=new WeakMap,Gi=new WeakSet,Kr=new Set(["snippyly-user-request-tool","snippyly-sidebar-button","velt-sidebar-button","velt-comments-sidebar-button","snippyly-comment-tool","velt-comment-tool","snippyly-area-tool","velt-area-tool","snippyly-tags-tool","velt-tags-tool","velt-autocomplete-tool"]),Xr=new WeakSet;function Ec(n){try{return!!n}catch{return!1}}function Uo(n){try{return!!n&&Kr.has(n.tagName.toLowerCase())}catch{return!1}}function Zr(n){try{return!!n&&n.nodeType===Node.ELEMENT_NODE}catch{return!1}}function Oc(n){try{if(!n)return;if(Gi.has(n))return de.get(n);if(Gi.add(n),Uo(n)){Xr.add(n);return}let i=Array.from(n.childNodes).filter(Zr);if(!i.length)return;let e={host:n,nodes:i,claimed:!1};return de.set(n,e),e}catch{return}}function wc(n){try{if(!n)return;!n.claimed&&n.nodes.some(e=>!!e.parentNode)&&de.delete(n.host)}catch{}}var $i=null,gt=[];function Qr(){try{for(let n=gt.length-1;n>=0;n--){let i=gt[n];i.host.isConnected||(i.nodes.forEach(e=>{try{e.parentNode?.hasAttribute?.("data-velt-children-park")&&e.parentNode.removeChild(e)}catch{}}),gt.splice(n,1))}}catch{}}function qr(){try{if($i?.isConnected)return $i;let n=document.createElement("div");return n.setAttribute("data-velt-children-park","true"),n.style.display="none",document.body.appendChild(n),$i=n,n}catch{return null}}function Ac(n){try{if(!n)return;let i=de.get(n);if(!i||i.claimed||!i.nodes.some(o=>es(o,r=>r.startsWith("velt-")||r.startsWith("snippyly-"))))return;let t=qr();if(!t)return;Qr(),i.nodes.forEach(o=>{try{o.parentNode!==t&&t.appendChild(o)}catch{}}),gt.some(o=>o.host===n)||gt.push({host:n,nodes:i.nodes})}catch{}}function Rc(n){try{if(!n)return;let i=de.get(n);if(!i||i.claimed)return;console.warn(`[Velt] <${n.tagName.toLowerCase()}> is not rendering the markup you placed inside it. Either this primitive has no children slot, or its visibility condition is currently false \u2014 in which case your markup is being held and will render as soon as the condition becomes true. If it should render regardless, set default-condition="false".`)}catch{}}function kc(n){try{if(!n||Gi.has(n)||de.has(n)||Uo(n)||!Array.from(n.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&!!(e.textContent||"").trim()))return;console.warn(`[Velt] <${n.tagName.toLowerCase()}> was given plain text as its content, which is not supported. Wrap it in an element \u2014 for example <span>your text</span>.`)}catch{}}function Tc(n){try{if(!n)return!1;let i=de.get(n);return!!i&&i.nodes.length>0}catch{return!1}}function xc(n){try{let i=!!n.wireframeTemplate||!!n.hasCustomerChildren;return!i&&!!n.shadowDom||i&&!!n.isExplicitShadowDom}catch{return!1}}function Mc(n,i){try{if(!n)return;let e=de.get(n);return!e||!e.nodes.length||e.claimed&&e.owner!==i?void 0:e}catch{return}}function Jr(n,i,e){try{if(!n)return;let t=de.get(n);if(!t)return;let o=i.toLowerCase(),r=t.nodes.findIndex(a=>a.tagName.toLowerCase()===o);if(r===-1)return;let[s]=t.nodes.splice(r,1);return t.nodes.length||(t.claimed=!0,t.owner=e),s}catch{return}}var No=class{constructor(i){this.triggerTagName=i}get isActive(){return!!this.element}take(i,e){try{return this.element&&ai(this.element),this.element=Jr(i,this.triggerTagName,e),!!this.element}catch{return!1}}place(i){try{return!this.element||!i?.parentNode?!1:(i.parentNode.insertBefore(this.element,i.nextSibling),Po(this.element),To(this.element),!0)}catch{return!1}}release(i){try{this.element&&ai(this.element),this.element&&i&&this.element.parentNode!==i&&i.appendChild(this.element),this.element=void 0}catch{}}},Hi="data-velt-hidden",ci=new WeakMap;function Bo(n,i){try{if(n.getAttribute(Hi)==="true"===i)return;if(i)ci.has(n)||ci.set(n,n.style.display||""),n.setAttribute(Hi,"true"),n.style.display="none";else{n.removeAttribute(Hi);let t=ci.get(n);t?n.style.display=t:n.style.removeProperty("display"),ci.delete(n)}}catch{}}function Pc(n,i){try{return n?(n.claimed=!0,n.owner=i,Bo(n.host,!1),n.nodes):[]}catch{return[]}}function Lc(n,i){try{if(!n||n.owner!==i)return;n.claimed=!1,n.owner=void 0,Bo(n.host,!0),n.nodes.forEach(e=>{ai(e);try{e.parentNode!==n.host&&n.host.appendChild(e)}catch{}})}catch{}}function es(n,i){try{if(i(n.tagName.toLowerCase()))return!0;let e=n.querySelectorAll("*");for(let t=0;t<e.length;t++)if(i(e[t].tagName.toLowerCase()))return!0;return!1}catch{return!1}}function Wi(n){return n.buttons===0||n.detail===0}function Yi(n){let i=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var mt;function ts(){if(mt==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>mt=!0}))}finally{mt=mt||!1}return mt}function zo(n){return ts()?n:!!n.capture}var Vo=new A("cdk-input-modality-detector-options"),jo={ignoreKeys:[18,17,224,91,16]},$o=650,Ki={passive:!0,capture:!0},Ho=(()=>{class n{_platform=h(H);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new b(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(t=>t===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ie(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs<$o||(this._modality.next(Wi(e)?"keyboard":"mouse"),this._mostRecentTarget=ie(e))};_onTouchstart=e=>{if(Yi(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ie(e)};constructor(){let e=h(N),t=h(P),o=h(Vo,{optional:!0});if(this._options=p(p({},jo),o),this.modalityDetected=this._modality.pipe(Cn(1)),this.modalityChanged=this.modalityDetected.pipe(oe()),this._platform.isBrowser){let r=h(ae).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(t,"keydown",this._onKeydown,Ki),r.listen(t,"mousedown",this._onMousedown,Ki),r.listen(t,"touchstart",this._onTouchstart,Ki)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),_t=(function(n){return n[n.IMMEDIATE=0]="IMMEDIATE",n[n.EVENTUAL=1]="EVENTUAL",n})(_t||{}),Go=new A("cdk-focus-monitor-default-options"),li=zo({passive:!0,capture:!0}),Xi=(()=>{class n{_ngZone=h(N);_platform=h(H);_inputModalityDetector=h(Ho);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=h(P);_stopInputModalityDetector=new _;constructor(){let e=h(Go,{optional:!0});this._detectionMode=e?.detectionMode||_t.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let t=ie(e);for(let o=t;o;o=o.parentElement)e.type==="focus"?this._onFocus(e,o):this._onBlur(e,o)};monitor(e,t=!1){let o=Ee(e);if(!this._platform.isBrowser||o.nodeType!==1)return g();let r=uo(o)||this._document,s=this._elementInfo.get(o);if(s)return t&&(s.checkChildren=!0),s.subject;let a={checkChildren:t,subject:new _,rootNode:r};return this._elementInfo.set(o,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let t=Ee(e),o=this._elementInfo.get(t);o&&(o.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(o))}focusVia(e,t,o){let r=Ee(e),s=this._document.activeElement;r===s?this._getClosestElementsInfo(r).forEach(([a,c])=>this._originChanged(a,t,c)):(this._setOrigin(t),typeof r.focus=="function"&&r.focus(o))}ngOnDestroy(){this._elementInfo.forEach((e,t)=>this.stopMonitoring(t))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===_t.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,t){e.classList.toggle("cdk-focused",!!t),e.classList.toggle("cdk-touch-focused",t==="touch"),e.classList.toggle("cdk-keyboard-focused",t==="keyboard"),e.classList.toggle("cdk-mouse-focused",t==="mouse"),e.classList.toggle("cdk-program-focused",t==="program")}_setOrigin(e,t=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&t,this._detectionMode===_t.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?$o:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,t){let o=this._elementInfo.get(t),r=ie(e);!o||!o.checkChildren&&t!==r||this._originChanged(t,this._getFocusOrigin(r),o)}_onBlur(e,t){let o=this._elementInfo.get(t);!o||o.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(o,null))}_emitOrigin(e,t){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(t))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let t=e.rootNode,o=this._rootNodeFocusListenerCount.get(t)||0;o||this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",this._rootNodeFocusAndBlurListener,li),t.addEventListener("blur",this._rootNodeFocusAndBlurListener,li)}),this._rootNodeFocusListenerCount.set(t,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ue(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(e){let t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){let o=this._rootNodeFocusListenerCount.get(t);o>1?this._rootNodeFocusListenerCount.set(t,o-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,li),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,li),this._rootNodeFocusListenerCount.delete(t))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,t,o){this._setClasses(e,t),this._emitOrigin(o,t),this._lastFocusOrigin=t}_getClosestElementsInfo(e){let t=[];return this._elementInfo.forEach((o,r)=>{(r===e||o.checkChildren&&r.contains(e))&&t.push([r,o])}),t}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:t,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!t||t===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let r=e.labels;if(r){for(let s=0;s<r.length;s++)if(r[s].contains(t))return!0}return!1}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Wo=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=W({type:n,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(t,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
4
|
+
`],encapsulation:2,changeDetection:0})}return n})();var is=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Yo=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({providers:[is]})}return n})();var qi=(()=>{class n{_platform=h(H);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return os(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=ns(us(e));if(t&&(Ko(t)===-1||!this.isVisible(t)))return!1;let o=e.nodeName.toLowerCase(),r=Ko(e);return e.hasAttribute("contenteditable")?r!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!ds(e)?!1:o==="audio"?e.hasAttribute("controls")?r!==-1:!1:o==="video"?r===-1?!1:r!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,t){return hs(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ns(n){try{return n.frameElement}catch{return null}}function os(n){return!!(n.offsetWidth||n.offsetHeight||typeof n.getClientRects=="function"&&n.getClientRects().length)}function rs(n){let i=n.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function ss(n){return cs(n)&&n.type=="hidden"}function as(n){return ls(n)&&n.hasAttribute("href")}function cs(n){return n.nodeName.toLowerCase()=="input"}function ls(n){return n.nodeName.toLowerCase()=="a"}function Qo(n){if(!n.hasAttribute("tabindex")||n.tabIndex===void 0)return!1;let i=n.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function Ko(n){if(!Qo(n))return null;let i=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function ds(n){let i=n.nodeName.toLowerCase(),e=i==="input"&&n.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function hs(n){return ss(n)?!1:rs(n)||as(n)||n.hasAttribute("contenteditable")||Qo(n)}function us(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}var Qi=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_enabled=!0;constructor(i,e,t,o,r=!1,s){this._element=i,this._checker=e,this._ngZone=t,this._document=o,this._injector=s,r||this.attachAnchors()}destroy(){let i=this._startAnchor,e=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){let e=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return i=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(i),!!t}return e.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){let e=this._getRegionBoundary("start");return e&&e.focus(i),!!e}focusLastTabbableElement(i){let e=this._getRegionBoundary("end");return e&&e.focus(i),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let t=0;t<e.length;t++){let o=e[t].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[t]):null;if(o)return o}return null}_getLastTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let t=e.length-1;t>=0;t--){let o=e[t].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[t]):null;if(o)return o}return null}_createAnchor(){let i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,e){i?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?se(i,{injector:this._injector}):setTimeout(i)}},Ji=(()=>{class n{_checker=h(qi);_ngZone=h(N);_document=h(P);_injector=h(E);constructor(){h(Xe).load(Wo)}create(e,t=!1){return new Qi(e,this._checker,this._ngZone,this._document,t,this._injector)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ve=(function(n){return n[n.NONE=0]="NONE",n[n.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",n[n.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",n})(ve||{}),Xo="cdk-high-contrast-black-on-white",Zo="cdk-high-contrast-white-on-black",Zi="cdk-high-contrast-active",di=(()=>{class n{_platform=h(H);_hasCheckedHighContrastMode;_document=h(P);_breakpointSubscription;constructor(){this._breakpointSubscription=h($n).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return ve.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let t=this._document.defaultView||window,o=t&&t.getComputedStyle?t.getComputedStyle(e):null,r=(o&&o.backgroundColor||"").replace(/ /g,"");switch(e.remove(),r){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return ve.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return ve.BLACK_ON_WHITE}return ve.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Zi,Xo,Zo),this._hasCheckedHighContrastMode=!0;let t=this.getHighContrastMode();t===ve.BLACK_ON_WHITE?e.add(Zi,Xo):t===ve.WHITE_ON_BLACK&&e.add(Zi,Zo)}}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),en=(()=>{class n{constructor(){h(di)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({imports:[Yo]})}return n})();function fs(n,i){}var ye=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var nn=(()=>{class n extends Ke{_elementRef=h(R);_focusTrapFactory=h(Ji);_config;_interactivityChecker=h(qi);_ngZone=h(N);_focusMonitor=h(Xi);_renderer=h(Ne);_changeDetectorRef=h(je);_injector=h(E);_platform=h(H);_document=h(P);_portalOutlet;_focusTrapped=new _;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=h(ye,{optional:!0})||new ye,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{r(),s(),e.removeAttribute("tabindex")},r=this._renderer.listen(e,"blur",o),s=this._renderer.listen(e,"mousedown",o)})),e.focus(t)}_focusByCssSelector(e,t){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,t)}_trapFocus(e){this._isDestroyed||se(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e=="string"?t=this._document.querySelector(e):typeof e=="boolean"?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus=="function"){let o=Kt(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=Kt();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Kt()))}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=W({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(t,o){if(t&1&&kt(ht,7),t&2){let r;Tt(r=xt())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,o){t&2&&pe("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[Y],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,o){t&1&&Rt(0,fs,0,0,"ng-template",0)},dependencies:[ht],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
5
|
+
`],encapsulation:2})}return n})(),vt=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new _;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(i,e){this.overlayRef=i,this.config=e,this.disableClose=e.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!_e(t)&&(t.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=i.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(i,e){if(this._canClose(i)){let t=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(i),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",e=""){return this.overlayRef.updateSize({width:i,height:e}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}_canClose(i){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(i,e,this.componentInstance))}},ps=new A("DialogScrollStrategy",{providedIn:"root",factory:()=>{let n=h(E);return()=>Qe(n)}}),gs=new A("DialogData"),ms=new A("DefaultDialogConfig");function _s(n){let i=$(n),e=new z;return{valueSignal:i,get value(){return i()},change:e,ngOnDestroy(){e.complete()}}}var on=(()=>{class n{_injector=h(E);_defaultOptions=h(ms,{optional:!0});_parentDialog=h(n,{optional:!0,skipSelf:!0});_overlayContainer=h(ni);_idGenerator=h(me);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new _;_afterOpenedAtThisLevel=new _;_ariaHiddenElements=new Map;_scrollStrategy=h(ps);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Dt(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(be(void 0)));constructor(){}open(e,t){let o=this._defaultOptions||new ye;t=p(p({},o),t),t.id=t.id||this._idGenerator.getId("cdk-dialog-"),t.id&&this.getDialogById(t.id);let r=this._getOverlayConfig(t),s=ft(this._injector,r),a=new vt(s,t),c=this._attachContainer(s,a,t);if(a.containerInstance=c,!this.openDialogs.length){let d=this._overlayContainer.getContainerElement();c._focusTrapped?c._focusTrapped.pipe(ne(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(d)}):this._hideNonDialogContentFromAssistiveTechnology(d)}return this._attachDialogContent(e,a,c,t),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){tn(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){tn(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),tn(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let t=new Te({positionStrategy:e.positionStrategy||qe().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(t.backdropClass=e.backdropClass),t}_attachContainer(e,t,o){let r=o.injector||o.viewContainerRef?.injector,s=[{provide:ye,useValue:o},{provide:vt,useValue:t},{provide:Ze,useValue:e}],a;o.container?typeof o.container=="function"?a=o.container:(a=o.container.type,s.push(...o.container.providers(o))):a=nn;let c=new Ye(a,o.viewContainerRef,E.create({parent:r||this._injector,providers:s}));return e.attach(c).instance}_attachDialogContent(e,t,o,r){if(e instanceof Se){let s=this._createInjector(r,t,o,void 0),a={$implicit:r.data,dialogRef:t};r.templateContext&&(a=p(p({},a),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new Ae(e,null,a,s))}else{let s=this._createInjector(r,t,o,this._injector),a=o.attachComponentPortal(new Ye(e,r.viewContainerRef,s));t.componentRef=a,t.componentInstance=a.instance}}_createInjector(e,t,o,r){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:gs,useValue:e.data},{provide:vt,useValue:t}];return e.providers&&(typeof e.providers=="function"?a.push(...e.providers(t,e,o)):a.push(...e.providers)),e.direction&&(!s||!s.get(le,null,{optional:!0}))&&a.push({provide:le,useValue:_s(e.direction)}),E.create({parent:s||r,providers:a})}_removeOpenDialog(e,t){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,s)=>{r?s.setAttribute("aria-hidden",r):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),t&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let t=e.parentElement.children;for(let o=t.length-1;o>-1;o--){let r=t[o];r!==e&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function tn(n,i){let e=n.length;for(;e--;)i(n[e])}var qo=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({providers:[on],imports:[pt,Re,en,Re]})}return n})();var vs=new A("MATERIAL_ANIMATIONS");var Jo=null;function ys(){return h(vs,{optional:!0})?.animationsDisabled||h(At,{optional:!0})==="NoopAnimations"?"di-disabled":(Jo??=h(jn).matchMedia("(prefers-reduced-motion)").matches,Jo?"reduced-motion":"enabled")}function rn(){return ys()!=="enabled"}var Cs=200,hi=class{_letterKeyStream=new _;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new _;selectedItem=this._selectedItem;constructor(i,e){let t=typeof e?.debounceInterval=="number"?e.debounceInterval:Cs;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(i),this._setupKeyHandler(t)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(i){this._selectedItemIndex=i}setItems(i){this._items=i}handleKey(i){let e=i.keyCode;i.key&&i.key.length===1?this._letterKeyStream.next(i.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(i){this._letterKeyStream.pipe(J(e=>this._pressedLetters.push(e)),wt(i),D(()=>this._pressedLetters.length>0),C(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let t=1;t<this._items.length+1;t++){let o=(this._selectedItemIndex+t)%this._items.length,r=this._items[o];if(!this._skipPredicateFn?.(r)&&r.getLabel?.().toLocaleUpperCase().trim().indexOf(e)===0){this._selectedItem.next(r);break}}this._pressedLetters=[]})}};var tt=class{_items;_activeItemIndex=$(-1);_activeItem=$(null);_wrap=!1;_typeaheadSubscription=Q.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=i=>i.disabled;constructor(i,e){this._items=i,i instanceof vi?this._itemChangesSubscription=i.changes.subscribe(t=>this._itemsChanged(t.toArray())):Fe(i)&&(this._effectRef=Ve(()=>this._itemsChanged(i()),{injector:e}))}tabOut=new _;change=new _;skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new hi(e,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:t=>this._skipPredicateFn(t)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(t=>{this.setActiveItem(t)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(i=!0){return this._homeAndEnd=i,this}withPageUpDown(i=!0,e=10){return this._pageUpAndDown={enabled:i,delta:e},this}setActiveItem(i){let e=this._activeItem();this.updateActiveItem(i),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(i){let e=i.keyCode,o=["altKey","ctrlKey","metaKey","shiftKey"].every(r=>!i[r]||this._allowedModifierKeys.indexOf(r)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&o){this.setNextItemActive();break}else return;case 38:if(this._vertical&&o){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&o){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&o){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&o){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&o){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(r>0?r:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(r<s?r:s-1,-1);break}else return;default:(o||_e(i,"shiftKey"))&&this._typeahead?.handleKey(i);return}this._typeahead?.reset(),i.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(i){let e=this._getItemsArray(),t=typeof i=="number"?i:e.indexOf(i),o=e[t];this._activeItem.set(o??null),this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(i){this._wrap?this._setActiveInWrapMode(i):this._setActiveInDefaultMode(i)}_setActiveInWrapMode(i){let e=this._getItemsArray();for(let t=1;t<=e.length;t++){let o=(this._activeItemIndex()+i*t+e.length)%e.length,r=e[o];if(!this._skipPredicateFn(r)){this.setActiveItem(o);return}}}_setActiveInDefaultMode(i){this._setActiveItemByIndex(this._activeItemIndex()+i,i)}_setActiveItemByIndex(i,e){let t=this._getItemsArray();if(t[i]){for(;this._skipPredicateFn(t[i]);)if(i+=e,!t[i])return;this.setActiveItem(i)}}_getItemsArray(){return Fe(this._items)?this._items():this._items instanceof vi?this._items.toArray():this._items}_itemsChanged(i){this._typeahead?.setItems(i);let e=this._activeItem();if(e){let t=i.indexOf(e);t>-1&&t!==this._activeItemIndex()&&(this._activeItemIndex.set(t),this._typeahead?.setCurrentSelectedItemIndex(t))}}};var sn=class extends tt{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}};var an=class extends tt{_origin="program";setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}};var er=" ";function Id(n,i,e){let t=tr(n,i);e=e.trim(),!t.some(o=>o.trim()===e)&&(t.push(e),n.setAttribute(i,t.join(er)))}function Dd(n,i,e){let t=tr(n,i);e=e.trim();let o=t.filter(r=>r!==e);o.length?n.setAttribute(i,o.join(er)):n.removeAttribute(i)}function tr(n,i){return n.getAttribute(i)?.match(/\S+/g)??[]}var cn=(()=>{class n{constructor(){h(di)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({imports:[ge,ge]})}return n})();function bs(n,i){}var Ct=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},ln="mdc-dialog--open",ir="mdc-dialog--opening",nr="mdc-dialog--closing",Ss=150,Is=75,sr=(()=>{class n extends nn{_animationStateChanged=new z;_animationsEnabled=!rn();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?rr(this._config.enterAnimationDuration)??Ss:0;_exitAnimationDuration=this._animationsEnabled?rr(this._config.exitAnimationDuration)??Is:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(or,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(ir,ln)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(ln),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(ln),this._animationsEnabled?(this._hostElement.style.setProperty(or,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(nr)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(ir,nr)}_waitForAnimationToComplete(e,t){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(t,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let t=super.attachComponentPortal(e);return t.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),t}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fe(n)))(o||n)}})();static \u0275cmp=W({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(t,o){t&2&&(Ci("id",o._config.id),pe("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),ot("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[Y],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(t,o){t&1&&(kn(0,"div",0)(1,"div",1),Rt(2,bs,0,0,"ng-template",2),Tn()())},dependencies:[ht],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}
|
|
6
|
+
`],encapsulation:2})}return n})(),or="--mat-dialog-transition-duration";function rr(n){return n==null?null:typeof n=="number"?n:n.endsWith("ms")?ce(n.substring(0,n.length-2)):n.endsWith("s")?ce(n.substring(0,n.length-1))*1e3:n==="0"?0:null}var yt=(function(n){return n[n.OPEN=0]="OPEN",n[n.CLOSING=1]="CLOSING",n[n.CLOSED=2]="CLOSED",n})(yt||{}),it=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new _;_beforeClosed=new _;_result;_closeFallbackTimeout;_state=yt.OPEN;_closeInteractionType;constructor(i,e,t){this._ref=i,this._config=e,this._containerInstance=t,this.disableClose=e.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(D(o=>o.state==="opened"),ne(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(D(o=>o.state==="closed"),ne(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Et(this.backdropClick(),this.keydownEvents().pipe(D(o=>o.keyCode===27&&!this.disableClose&&!_e(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),dn(this,o.type==="keydown"?"keyboard":"mouse"))})}close(i){let e=this._config.closePredicate;e&&!e(i,this._config,this.componentInstance)||(this._result=i,this._containerInstance._animationStateChanged.pipe(D(t=>t.state==="closing"),ne(1)).subscribe(t=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=yt.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let e=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?e.left(i.left):e.right(i.right):e.centerHorizontally(),i&&(i.top||i.bottom)?i.top?e.top(i.top):e.bottom(i.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",e=""){return this._ref.updateSize(i,e),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=yt.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function dn(n,i,e){return n._closeInteractionType=i,n.close(e)}var ar=new A("MatMdcDialogData"),cr=new A("mat-mdc-dialog-default-options"),lr=new A("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let n=h(E);return()=>Qe(n)}}),ui=(()=>{class n{_defaultOptions=h(cr,{optional:!0});_scrollStrategy=h(lr);_parentDialog=h(n,{optional:!0,skipSelf:!0});_idGenerator=h(me);_injector=h(E);_dialog=h(on);_animationsDisabled=rn();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new _;_afterOpenedAtThisLevel=new _;dialogConfigClass=Ct;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=Dt(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(be(void 0)));constructor(){this._dialogRefConstructor=it,this._dialogContainerType=sr,this._dialogDataToken=ar}open(e,t){let o;t=p(p({},this._defaultOptions||new Ct),t),t.id=t.id||this._idGenerator.getId("mat-mdc-dialog-"),t.scrollStrategy=t.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(e,B(p({},t),{positionStrategy:qe(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||t.enterAnimationDuration?.toLocaleString()==="0"||t.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:t},{provide:ye,useValue:t}]},templateContext:()=>({dialogRef:o}),providers:(s,a,c)=>(o=new this._dialogRefConstructor(s,t,c),o.updatePosition(t?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(o);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let t=e.length;for(;t--;)e[t].close()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ds=(()=>{class n{dialogRef=h(it,{optional:!0});_elementRef=h(R);_dialog=h(ui);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=hr(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let t=e._matDialogClose||e._matDialogCloseResult;t&&(this.dialogResult=t.currentValue)}_onButtonClick(e){dn(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,o){t&1&&Ln("click",function(s){return o._onButtonClick(s)}),t&2&&pe("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[re]})}return n})(),dr=(()=>{class n{_dialogRef=h(it,{optional:!0});_elementRef=h(R);_dialog=h(ui);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=hr(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n})}return n})(),Es=(()=>{class n extends dr{id=h(me).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fe(n)))(o||n)}})();static \u0275dir=L({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,o){t&2&&Ci("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Y]})}return n})(),Os=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=L({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[Rn([lt])]})}return n})(),ws=(()=>{class n extends dr{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=fe(n)))(o||n)}})();static \u0275dir=L({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(t,o){t&2&&ot("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},features:[Y]})}return n})();function hr(n,i){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?i.find(t=>t.id===e.id):null}var As=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=F({providers:[ui],imports:[qo,pt,Re,cn,cn]})}return n})();var vh=(()=>{let i=class i{constructor(t,o,r,s,a,c,d,l,u,w){this.analyticsService=t,this.authService=o,this.configService=r,this.coreActionsService=s,this.databaseService=a,this.docService=c,this.loggingService=d,this.commonDbService=l,this.usersService=u,this.serviceBook=w,this.db=null,this.internalUserContacts$=new b([]),this.userGlobalContact$=new b(!1),this.userGroupContact$=new b(null),this.users$=new b([]),this.userPersonalContacts=[],this.userGroupContacts=[],this.userGlobalContacts=[],this.users=[],this.documentPaths=null,this.userAccessFields$=new b({}),this.userOrganizationContacts$=new b([]),this.userFolderContacts$=new b([]),this.userDocumentContacts$=new b([]),this.userOrganizationGroups$=new b([]),this.onContactSelectedSubject$=new _,this.documentAccessType=null,this.atHereEnabled$=new b(!1),this.atHereLabel$=new b("here"),this.atHereDescription$=new b(null),this.contactListScopeForOrganizationUsers$=new b([S.ALL]),this.customUserContacts$=new b(null),this.customUserContactsConfig$=new b({merge:!1}),this.orgList$=new b([]),this.currentOrganizationUserIAM$=new b(null),this.userContacts$=new b([]),this.userSnippylyIdContacts$=new b(null),this.usersByOrganizationId$=new b({}),this.temporaryUserIds$=new b([]),this.usersByOrganizationIdAndDocumentId$=new b({}),this.usersByOrganizationIdAndFolderId$=new b({}),this.userById$=new b({}),this.searchUsersSubject$=new _,this.searchUsersDebounceTime=300,this.pendingSearchPromises=new Map,this.authService.setContactService(this),this.usersService.setContactService(this),this.serviceBook.observe(st).subscribe(f=>{this.commentService=f??void 0}),this.authService.getUser$().pipe(v(f=>this.docService.getDocumentPaths$().pipe(J(m=>{this.documentPaths=m}),C(()=>f)))).subscribe(f=>j(this,null,function*(){if(this.user=f,f&&this.documentPaths)if(!f?.organizationId)this.getLoggedInUsers$().subscribe(),this.getUserContactsFromDb$(),yield this.migrateLoggedInUserFromEmailToUserIdPath(f),this.setLoggedInUser(f),yield this.moveGlobalContactUserFromEmailToUserIdPath(f),this.updateUserInGlobalContactsIfAvailable(f),f?.groupId&&(yield this.migrateGroupContactsFromEmailToUserIdPath(f?.groupId)),this.checkToSetLoggedInUserInGroupContacts();else{let m=this.userPermissionService?.getCurrentUserPermissions(),I=this.documentPaths.folderId,K=!0;I&&m?.[f?.userId]?.folders?.[I]?.errorCode===Si.PERMISSION_DENIED&&(K=!1),this.getOrganizationContactsFromDb$(),K&&this.getFolderContactsFromDb$(),this.getDocumentContactsFromDb$(),this.getOrganizationGroupsFromDb$(),this.getTemporaryUsers()}else this.getUserContactSubscription?.unsubscribe(),this.getUserContactSubscription=void 0,this.getLoggedInUsersSubscription?.unsubscribe(),this.getLoggedInUsersSubscription=void 0,this.getOrganizationContactsSubscription?.unsubscribe(),this.getOrganizationContactsSubscription=void 0,this.getFolderContactsSubscription?.unsubscribe(),this.getFolderContactsSubscription=void 0,this.getDocumentContactsSubscription?.unsubscribe(),this.getDocumentContactsSubscription=void 0,this.getOrganizationGroupsSubscription?.unsubscribe(),this.getOrganizationGroupsSubscription=void 0}),f=>{this.loggingService.catch("Error in ContactService constructor getUser$: ",f)}),this.databaseService.getDb().pipe(D(f=>!!f),ne(1)).subscribe(f=>{f&&(this.db=f)},f=>{this.loggingService.catch("Error in ContactService constructor getDb: ",f)}),this.getOrganizationGroups$().subscribe(f=>{this.authService.setOrganizationUserGroups(f)}),nt([this.getInternalUserContacts$(),this.getCustomUserContacts$(),this.getCustomUserContactsConfig$()]).subscribe(([f,m,I])=>{m?I?.merge?this.userContacts$.next([...f||[],...m||[]]):this.userContacts$.next(m||[]):this.userContacts$.next(f||[])}),this.getUserContacts$().subscribe(f=>{try{f?.forEach(m=>{let I=m?.userSnippylyId||Qn(this.configService.getApiKey(),m.userId);I&&this.userSnippylyIdContacts$.next(B(p({},this.userSnippylyIdContacts$.value),{[I]:m}))})}catch{}})}setCommentService(t){try{this.commentService=t}catch(o){this.loggingService.catch("Error in ContactService setCommentService: ",o)}}setUserPermissionService(t){try{this.userPermissionService=t}catch(o){this.loggingService.catch("Error in ContactService setUserPermissionService: ",o)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in ContactService","color: green;");try{this.documentPaths=null,this.usersByOrganizationId$.next({}),this.temporaryUserIds$.next([]),this.usersByOrganizationIdAndFolderId$.next({}),this.usersByOrganizationIdAndDocumentId$.next({}),this.userById$.next({}),this.userOrganizationContacts$.next([]),this.userFolderContacts$.next([]),this.userDocumentContacts$.next([]),this.userOrganizationGroups$.next([]),this.userContacts$.next([]),this.userSnippylyIdContacts$.next(null),this.userGlobalContact$.next(!1),this.userGroupContact$.next(null),this.users$.next([]),this.userPersonalContacts=[],this.userGroupContacts=[],this.userGlobalContacts=[],this.users=[],this.currentOrganizationUserIAM$.next(null)}catch(t){this.loggingService.catch("Error in ContactService clearCache: ",t)}}setDocumentAccessType(t){try{this.documentAccessType=t}catch(o){this.loggingService.catch("Error in ContactService setDocumentAccessType: ",o)}}checkIfUserGlobalContact(t){return j(this,null,function*(){try{if(t?.userId&&this.documentPaths?.globalContacts){let o=yield this.commonDbService?.getData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0}});if(Object.keys(o??{}).length>0)return!0}if(t?.email&&this.documentPaths?.globalContacts){let o=yield this.commonDbService?.getData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.email),skipFirestore:!0}});if(Object.keys(o??{}).length>0)return!0}return!1}catch(o){return this.loggingService.catch("Error in ContactService isUserGlobalContact: ",o),!1}})}setLoggedInUser(t){try{t?.userId&&this.documentPaths?.logins&&(this.commonDbService.updateData({feature:"logins",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(B(p({},t),{contacts:void 0})))}),this.setLoggedInUserPrivateContacts(t,t?.contacts))}catch(o){this.loggingService.catch("Error in ContactService setLoggedInUser: ",o)}}migrateLoggedInUserFromEmailToUserIdPath(t){return j(this,null,function*(){try{if(t?.email&&this.documentPaths?.logins){let o=yield this.commonDbService?.getData({feature:"logins",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.email),skipFirestore:!0}});if(Object.keys(o??{}).length>0){let r=o;if(r){if(r?.contacts){let s={};Object.keys(r?.contacts??{})?.forEach(a=>{let c=r.contacts[a];if(c?.userId){let d=O(c?.userId);s[d]=c}}),r.contacts=s}yield this.commonDbService.updateData({feature:"logins",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(r))}),yield this.commonDbService.deleteData({feature:"logins",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.email),skipFirestore:!0}})}}}}catch(o){this.loggingService.catch("Error in ContactService migrateLoggedInUserFromEmailToUserIdPath: ",o)}})}addGlobalContact(t){try{t?.userId&&this.documentPaths?.globalContacts&&this.commonDbService.updateData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(t))})}catch(o){this.loggingService.catch("Error in ContactService addGlobalContact: ",o)}}getUserAccessFields(){return JSON.parse(JSON.stringify(this.userAccessFields$.value))}getUserAccessFieldsByUserId(t){return this.getUserAccessFields()?.[t]}setUserAccessFields(t){try{let o=this.getUserAccessFields();t.forEach(s=>{o[s.user.userId]=s.accessFields||[]});let r=this.authService.getUser()?.userId;if(r&&o?.[r]?.length){let s=this.userPermissionService?.getCurrentUserPermissions();s&&(s[r]||(s[r]={}),s[r].context={accessFields:o[r]},this.userPermissionService?.setCurrentUserPermissions(s))}this.userAccessFields$.next(JSON.parse(JSON.stringify(o)))}catch(o){this.loggingService.catch("Error in ContactService setUserAccessFields: ",o)}}updateUserInGlobalContactsIfAvailable(t){return j(this,null,function*(){try{if(t?.userId&&this.documentPaths?.globalContacts&&(yield this.checkIfUserGlobalContact(t))){let r=new Yn;r.userId=t?.userId,r.userSnippylyId=t?.userSnippylyId,r.email=t?.email,r.name=t?.name,r.photoUrl=t?.photoUrl,this.commonDbService.updateData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(r))})}}catch(o){this.loggingService.catch("Error in ContactService updateUserInGlobalContactsIfAvailable: ",o)}})}moveGlobalContactUserFromEmailToUserIdPath(t){return j(this,null,function*(){try{if(t?.email&&t?.userId&&this.documentPaths?.globalContacts){let o=yield this.commonDbService?.getData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.email),skipFirestore:!0}});if(Object.keys(o??{}).length>0){let r=o;r&&(yield this.commonDbService.updateData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(r))}),yield this.commonDbService.deleteData({feature:"globalContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.email),skipFirestore:!0}}))}}}catch(o){this.loggingService.catch("Error in ContactService removeUserFromGlobalContactsByEmail: ",o)}})}setLoggedInUserPrivateContacts(t,o){try{if(t?.userId&&this.documentPaths?.logins){let r,s=o?.filter(c=>c?.visibility!=="group"),a=!1;this.authService.getUserOptions()&&(a=!!this.authService.getUserOptions()?.replaceContacts||!!this.authService.getUserOptions()?.replacePrivateContacts),s?.length?(r={},s?.forEach(c=>{if(c?.userId){let d=O(c?.userId);r[d]=c}}),a?this.commonDbService.setData({feature:"allLoginContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(r))}):this.commonDbService.updateData({feature:"allLoginContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(r))})):a&&this.commonDbService.deleteData({feature:"allLoginContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",userId:O(t?.userId),skipFirestore:!0}})}}catch(r){this.loggingService.catch("Error in ContactService setLoggedInUserPrivateContacts: ",r)}}migrateGroupContactsFromEmailToUserIdPath(t){return j(this,null,function*(){try{if(this.documentPaths?.groupContacts&&t){let o=yield this.commonDbService?.getData({feature:"groupContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",groupId:t,skipFirestore:!0}});o&&Object.keys(o??{}).forEach(r=>j(this,null,function*(){let s=o[r];s?.email&&s?.userId&&O(s?.email)===r&&(yield this.commonDbService.deleteData({feature:"groupContactsUser",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",groupId:t,userId:r,skipFirestore:!0}}),yield this.commonDbService.updateData({feature:"groupContactsUser",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",groupId:t,userId:O(s?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(s))}))}))}}catch(o){this.loggingService.catch("Error in ContactService migrateGroupContacts: ",o)}})}checkToSetLoggedInUserInGroupContacts(){return j(this,null,function*(){try{this.user?.groupId&&this.user?.userId&&((yield this.checkIfUserGlobalContact(this.user))||this.docService.getDocumentIam$().pipe(ne(1)).subscribe(o=>j(this,null,function*(){if(this.user?.groupId&&this.user?.userId){let r=!1,s=this.docService.getDocumentAccessType(o);if(!s||s===Lt.PUBLIC)r=!0;else if(s===Lt.RESTRICTED){let a=O(this.user?.userId);if(o?.users?.[a]&&(r=!0),this.user?.email){let c=O(this.user?.email);o?.users?.[c]&&(r=!0)}}if(r){let a=new Kn;a.email=this.user.email,a.visibility="group",a.name=this.user.name,a.photoUrl=this.user.photoUrl,a.userId=this.user.userId,(this.authService.getUserOptions()?.replaceContacts||this.authService.getUserOptions()?.replaceGroupContacts)&&(yield this.removeGroupContacts(this.user?.groupId)),this.setLoggedInUserGroupContacts(this.user?.groupId,[a]),this.user?.contacts&&this.user?.groupId&&this.setLoggedInUserGroupContacts(this.user?.groupId,this.user?.contacts)}}})))}catch(t){this.loggingService.catch("Error in ContactService checkToSetLoggedInUserInGroupContacts: ",t)}})}setLoggedInUserGroupContacts(t,o){try{let r=o?.filter(s=>s?.visibility==="group");r?.length&&r.forEach(s=>j(this,null,function*(){if(s?.userId&&t&&this.documentPaths?.groupContacts){if(this.configService?.getSF()&&(yield this.checkIfUserGlobalContact(s)))return;yield this.commonDbService.updateData({feature:"groupContactsUser",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",groupId:t,userId:O(s?.userId),skipFirestore:!0},data:JSON.parse(JSON.stringify(s))}),s?.email&&(yield this.commonDbService.deleteData({feature:"groupContactsUser",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",groupId:t,userId:O(s?.email),skipFirestore:!0}}))}}))}catch(r){this.loggingService.catch("Error in ContactService setLoggedInUserGroupContacts: ",r)}}removeGroupContacts(t){return j(this,null,function*(){try{if(this.documentPaths?.groupContacts&&t)return this.commonDbService.deleteData({feature:"groupContacts",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",groupId:t,skipFirestore:!0}})}catch(o){this.loggingService.catch("Error in ContactService removeGroupContacts: ",o)}})}mergeUserContacts(){try{let t=[];this.userPersonalContacts&&t.push(...this.userPersonalContacts),this.userGroupContacts&&t.push(...this.userGroupContacts),this.userGlobalContacts&&t.push(...this.userGlobalContacts);let o={};t.forEach(r=>{r?.userId?(!r?.email||!o[r.email])&&(o[r.userId]=r):r?.email&&(!r?.userId||!o[r.userId])&&(o[r.email]=r)}),t=Object.values(o??{}),this.internalUserContacts$.next(t)}catch(t){this.loggingService.catch("Error in ContactService mergeUserContacts: ",t)}}getInternalUserContacts(){return this.internalUserContacts$.value}getInternalUserContacts$(){return this.internalUserContacts$.asObservable()}getUserContacts$(t){try{let{organizationId:o,documentId:r,veltFolderId:s}=t||{};return o&&r?nt([this.usersByOrganizationId$,this.usersByOrganizationIdAndFolderId$,this.usersByOrganizationIdAndDocumentId$,this.userById$,this.customUserContacts$,this.customUserContactsConfig$,this.getContactListScopeForOrganizationUsers$(),this.temporaryUserIds$]).pipe(C(([a,c,d,l,u,w,f,m])=>{let I={},K=!1;w&&!w?.merge&&(K=!0);let M=Me=>f.some(Pe=>Me.includes(Pe)),X=M([S.ALL,S.ORGANIZATION])?Object.keys(a?.[o]||{}):[],G=s?M([S.ALL,S.FOLDER])?Object.keys(c?.[o]?.[s]||{}):[]:[],gi=M([S.ALL,S.DOCUMENT])?Object.keys(d?.[o]?.[r]||{}):[];if([...X,...G||[],...gi,...m].forEach(Me=>{let Pe=l?.[Me];Pe&&(I[Me]=Pe)}),u){let{merge:Me,options:Pe}=w||{},{organizationId:hn,documentId:un,folderId:fn}=Pe||{},pn=fn?Xn(fn):void 0;(!hn||hn===o)&&(!un||un===r)&&(!pn||pn===s)&&(Me||(I={}),u.forEach(mi=>{mi?.userId&&(I[mi.userId]=mi)}))}return Object.values(I??{})})):this.userContacts$.asObservable().pipe(C(a=>a))}catch(o){return this.loggingService.catch("Error in ContactService getUserContacts$ metadata: ",o),g([])}}getUserContactsBySnippylyId$(){return this.userSnippylyIdContacts$.asObservable()}getUserBySnippylyId(t){return this.userSnippylyIdContacts$.value?.[t]}getAtHereLabel(){return this.atHereLabel$.asObservable()}getAtHereDescription(){return this.atHereDescription$.asObservable()}getUserContactsFromDb$(){this.getUserContactSubscription||(this.getUserContactSubscription=this.authService.getUser$().pipe(D(t=>!!t),v(t=>this.docService.getDocumentPaths$().pipe(D(o=>!!o),J(o=>{this.documentPaths=o}),C(()=>t))),v(t=>{if(this.userGroupContacts=[],this.userPersonalContacts=[],!t)return g();if(!this.documentPaths)return g();let o=[];return o.push(this.commonDbService.dbListener({feature:"allGlobalContacts",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(C(r=>r?.data),J(r=>{r?(this.userGlobalContacts=Object.values(r??{}),this.userGlobalContacts?.find(s=>s.userId===this.user?.userId)?this.userGlobalContact$.next(!0):this.userGlobalContact$.next(!1)):(this.userGlobalContacts=[],this.userGlobalContact$.next(!1))}))),o.push(this.commonDbService.dbListener({feature:"groupContacts",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0,groupId:t?.groupId}}).pipe(C(r=>r?.data),J(r=>{r?(this.userGroupContacts=Object.values(r??{}),this.userGroupContacts?.find(s=>s?.userId===this.user?.userId)?this.userGroupContact$.next(!0):this.userGroupContact$.next(!1)):(this.userGroupContacts=[],this.userGroupContact$.next(!1))}))),o.push(this.commonDbService.dbListener({feature:"allLoginContacts",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0,userId:O(t?.userId)}}).pipe(C(r=>r?.data),J(r=>{r?this.userPersonalContacts=Object.values(r??{}):this.userPersonalContacts=[]}))),Et(...o).pipe(ue(this.authService.getUser$().pipe(D(r=>!r))))})).subscribe(()=>{this.mergeUserContacts()},t=>{this.loggingService.catch("Error in ContactService getUserContacts$ subscription: ",t)}))}addUserContact(t){try{this.user?.organizationId||this.user?.groupId&&(t.visibility="group",this.setLoggedInUserGroupContacts(this.user?.groupId,[t]))}catch(o){this.loggingService.catch("Error in ContactService addUserContact: ",o)}}isUserGlobalContact$(){return this.userGlobalContact$.asObservable().pipe(oe(Ft))}isUserGlobalContact(){return this.userGlobalContact$.value}isUserGroupContact$(){return this.userGroupContact$.asObservable()}isUserGroupContact(){return this.userGroupContact$.value}getLoggedInUsers$(){return this.getLoggedInUsersSubscription||(this.getLoggedInUsersSubscription=this.authService.getUser$().pipe(v(t=>t?this.documentPaths?t?.userId&&this.documentPaths?.logins?this.commonDbService.dbListener({feature:"allLogins",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(C(o=>o?.data),J(o=>{o?this.users=Object.values(o??{}):this.users=[]})):(this.users=[],g()):g():g())).subscribe(()=>{this.users$.next(this.users)},t=>{this.loggingService.catch("Error in ContactService getLoggedInUsers$ subscription: ",t)})),this.users$.asObservable()}getUsersMap$(){return this.authService.getUser$().pipe(v(t=>t?.organizationId?this.userById$.pipe(C(o=>{let r={};return Object.values(o||{}).forEach(s=>{s?.userSnippylyId&&(r[s?.userSnippylyId]=s)}),r})):this.users$.pipe(C(o=>{let r={};return o.forEach(s=>{r[s.userSnippylyId]=s}),r}))))}getUserByEmail$(t){return this.users$.pipe(C(o=>o.find(r=>r.email===t)))}getUserByEmail(t){return this.users?.find(o=>o.email===t)}getContactByEmail(t){return this.getInternalUserContacts().find(o=>o.email===t)}getUserByUserId$(t){return this.users$.pipe(C(o=>o.find(r=>r.userId===t)))}getUserGroupContacts(){return this.userGroupContacts}getTemporaryUsers(){try{let t=this.authService.getUser();this.docService.getOrganizationConfig$().pipe(D(o=>!!o),C(o=>o?.organizationId)).subscribe(o=>j(this,null,function*(){if(o&&t){let r=((yield this.commonDbService?.queryData({feature:"allPermissionsUsers",properties:{organizationId:o,useCollectionGroup:!1,isCollection:!0,firestoreQuery:[T("expiresAt",">",new Date().getTime())]}}))??[]).filter(s=>s?.userId!==t?.userId);if(r?.length){let s=r.map(l=>l?.userId),a=Zn(),c=Wn.GET_TEMPORARY_USERS;this.coreActionsService.triggerAction(Hn.USER_RESOLVER,{event:Nt.Events.Resolver.USER_RESOLUTION_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:a,moduleName:c,methodName:Gn.GET_TEMPORARY_USERS,source:"internal",payload:{userIds:s}});let d=yield this.usersService.resolveUsers({userIds:s,uniqueId:a,moduleName:c});if(d){let l={};Object.entries(d).forEach(([w,f])=>{l[w]=f}),this.userById$.next(p(p({},this.userById$.value),l));let u=new Set([...this.temporaryUserIds$.value,...Object.keys(l)]);this.temporaryUserIds$.next(Array.from(u))}}}}))}catch(t){this.loggingService.catch("Error in ContactService getTemporaryUsers: ",t)}}searchUsers(t){return j(this,null,function*(){try{if(!t||typeof t!="string"||!t.trim())return[];let o=t.trim();return this.searchUsersDebounced$||(this.searchUsersDebounced$=this.searchUsersSubject$.pipe(wt(this.searchUsersDebounceTime),oe(),v(r=>St(this.performSearch(r)).pipe(C(s=>({searchText:r,results:s})),_i(s=>(this.loggingService.catch("Error in ContactService performSearch: ",s),g({searchText:r,results:[]})))))),this.searchUsersDebounced$.subscribe({next:({searchText:r,results:s})=>{Array.from(this.pendingSearchPromises.keys()).forEach(d=>{if(d!==r){let l=this.pendingSearchPromises.get(d);l&&(l.forEach(({resolve:u})=>u([])),this.pendingSearchPromises.delete(d))}});let c=this.pendingSearchPromises.get(r);c&&(c.forEach(({resolve:d})=>d(s)),this.pendingSearchPromises.delete(r))},error:r=>{this.pendingSearchPromises.forEach(s=>{s.forEach(({reject:a})=>a(r))}),this.pendingSearchPromises.clear()}})),new Promise((r,s)=>{this.pendingSearchPromises.has(o)||this.pendingSearchPromises.set(o,[]),this.pendingSearchPromises.get(o).push({resolve:r,reject:s}),this.searchUsersSubject$.next(o)})}catch(o){return this.loggingService.catch("Error in ContactService searchUsers: ",o),[]}})}performSearch(t){return j(this,null,function*(){try{let o=this.docService.getOrganizationConfig()?.organizationId;if(!o)return[];let r=this.documentPaths?.veltFolderId,s=this.docService.getDocumentIds().map(M=>M?.documentId),a=t.toLowerCase().trim(),c=a+"\uF8FF",d=[],l=s?.filter(M=>!!M)||[],u=l.length>0,w=!!r;if(u){let M=[];for(let G=0;G<l.length;G+=20)M.push(l.slice(G,G+20));M.forEach(G=>{let gi=[T("documentIds","array-contains-any",G),T("viewerDocumentIds","array-contains-any",G)],bt=[T("organizationIds","array-contains-any",[o]),T("viewerOrganizationIds","array-contains-any",[o]),...gi];w&&bt.push(T("folderIds","array-contains-any",[r]),T("viewerFolderIds","array-contains-any",[r])),d.push(this.commonDbService.queryData({feature:"allDocumentUsers",properties:{organizationId:o,isCollection:!0,useCollectionGroup:!1,useQuery:!0,firestoreQuery:[Ie(De(...bt),T("user.name_lowercase",">=",a),T("user.name_lowercase","<",c)),Ge(10)]}}).catch(()=>[])),d.push(this.commonDbService.queryData({feature:"allDocumentUsers",properties:{organizationId:o,isCollection:!0,useCollectionGroup:!1,useQuery:!0,firestoreQuery:[Ie(De(...bt),T("user.email_lowercase",">=",a),T("user.email_lowercase","<",c)),Ge(10)]}}).catch(()=>[]))})}let f=yield Promise.all(d),m=[];f.forEach(M=>{M&&Array.isArray(M)?M.forEach(X=>{X&&X.user&&X.user.userId&&m.push(X)}):M&&typeof M=="object"&&Object.values(M).forEach(G=>{G&&G.user&&G.user.userId&&m.push(G)})});let I=new Map;m.forEach(M=>{let X=M.user?.userId;X&&!I.has(X)&&I.set(X,M)});let K=Array.from(I.values());return this.setResolvedUsers(K,!0),K}catch(o){return this.loggingService.catch("Error in ContactService performSearch: ",o),[]}})}setResolvedUsers(t,o=!1){try{if(t?.length){let r=[],s=[],a=[],c=this.docService.getOrganizationConfig()?.organizationId,d=this.documentPaths?.veltFolderId,l=this.docService.getDocumentIds().map(f=>f?.documentId);t.forEach(f=>{this.userById$.value[f?.user?.userId]||(c&&f?.organizationIds?.includes(c)&&!r.find(m=>m?.user?.userId===f?.user?.userId)&&r.push(f),d&&f?.folderIds?.includes(d)&&!s.find(m=>m?.user?.userId===f?.user?.userId)&&s.push(f),l?.some(m=>f?.documentIds?.includes(m))&&!a.find(m=>m?.user?.userId===f?.user?.userId)&&a.push(f))}),r?.length&&this.setUserOrganizationContacts(r,c,o),s?.length&&this.setUserFolderContacts(s,o),a?.length&&this.setUserDocumentContacts(a,o);let w=[...r,...s,...a].filter((f,m,I)=>m===I.findIndex(K=>K.user.userId===f.user.userId));w?.length&&(this.setUserAccessFields(w),this.mergeOrganizationAndDocumentContacts())}}catch(r){this.loggingService.catch("Error in ContactService setResolvedUsers: ",r)}}getOrganizationContactsFromDb$(){try{this.getOrganizationContactsSubscription||(this.getOrganizationContactsSubscription=this.authService.getUser$().pipe(v(t=>t?.organizationId?g(t).pipe(v(o=>this.docService.getOrganizationConfig$().pipe(D(r=>!!r),C(()=>o))),v(o=>this.usersService.getResolveOrganizationUsers$().pipe(D(r=>r),C(()=>o))),v(o=>{let r=this.docService.getOrganizationConfig()?.organizationId;return this.setUserOrganizationContacts([],r),o?r?this.commonDbService.dbListener({feature:"allOrganizationUsers",properties:{organizationId:r,isCollection:!0,useQuery:!0,firestoreQuery:[Ie(De(T("organizationIds","array-contains-any",[r]),T("viewerOrganizationIds","array-contains-any",[r]))),Bt("id"),...this.commentService?.getPaginatedContactList()?[Ge(10)]:[]]}}).pipe(C(s=>s?.data),v(s=>this.commentService?.getPaginatedContactList()&&!Object.values(s??{}).find(a=>a?.user?.userId===this.authService.getUser()?.userId)?St(this.commonDbService.queryData({feature:"allOrganizationUsers",properties:{organizationId:r,isCollection:!0,useQuery:!0,firestoreQuery:[Ie(De(T("organizationIds","array-contains-any",[r]),T("viewerOrganizationIds","array-contains-any",[r])),T("user.userId","==",this.authService.getUser()?.userId))]}})).pipe(C(a=>{if(a&&a.length>0){let c=a[0],d=c?.user?.userId||c?.id;if(d&&s){let l=O(d);return B(p({},s),{[l]:c})}}return s})):g(s)),C(s=>{if(s){typeof s=="object"&&(s?.undefined&&delete s.undefined,s?.null&&delete s.null);let a=Object.values(s??{});this.setUserAccessFields(a),this.setUserOrganizationContacts(a,r)}else this.setUserOrganizationContacts([],r)})):g():g()}),v(()=>this.getContactListScopeForOrganizationUsers$())):(this.setUserOrganizationContacts([]),g()))).subscribe(()=>{this.mergeOrganizationAndDocumentContacts()},t=>{this.loggingService.catch("Error in ContactService getOrganizationContactsFromDb$ subscription: ",t)}))}catch{}}getFolderContactsFromDb$(){try{this.getFolderContactsSubscription||(this.getFolderContactsSubscription=this.authService.getUser$().pipe(v(t=>t?g(t).pipe(v(o=>this.docService.getOrganizationConfig$().pipe(D(r=>!!r),C(()=>o))),v(o=>this.usersService.getResolveFolderUsers$().pipe(D(r=>r),C(()=>o))),v(o=>{let r=this.docService.getOrganizationConfig()?.organizationId;if(this.setUserFolderContacts([]),!o)return g();if(!this.commonDbService.shouldUseFirestore())return g();if(!this.documentPaths?.veltFolderId)return g();let s=g([]);return s=this.commonDbService.dbListener({feature:"allFolderUsers",properties:{organizationId:r,folderId:this.documentPaths?.veltFolderId,isCollection:!0,useQuery:!0,firestoreQuery:[Ie(De(T("folderIds","array-contains-any",[this.documentPaths?.veltFolderId]),T("viewerFolderIds","array-contains-any",[this.documentPaths?.veltFolderId]))),Bt("id"),...this.commentService?.getPaginatedContactList()?[Ge(10)]:[]]}}).pipe(C(a=>a?.data)),s.pipe(C(a=>{if(a){typeof a=="object"&&(a?.undefined&&delete a.undefined,a?.null&&delete a.null);let c=Object.values(a??{});this.setUserAccessFields(c),this.setUserFolderContacts(c)}else this.setUserFolderContacts([])}))}),v(()=>this.getContactListScopeForOrganizationUsers$())):(this.setUserFolderContacts([]),g()))).subscribe(()=>{this.mergeOrganizationAndDocumentContacts()},t=>{this.loggingService.catch("Error in ContactService getFolderContactsFromDb$ subscription: ",t)}))}catch{}}getDocumentContactsFromDb$(){try{this.getDocumentContactsSubscription||(this.getDocumentContactsSubscription=this.authService.getUser$().pipe(v(t=>t?g(t).pipe(v(o=>this.docService.getDocumentPaths$().pipe(D(r=>!!r),J(r=>{this.documentPaths=r}),C(()=>o))),v(o=>this.usersService.getResolveDocumentUsers$().pipe(D(r=>r),C(()=>o))),v(o=>(this.setUserDocumentContacts([]),o?this.documentPaths?this.docService.getDocumentIds$().pipe(v(r=>{let s=r?.length>0?r.map(l=>l.documentId):[this.documentPaths?.documentId??""];if(s.some(l=>!l)||!this.documentPaths)return g();let a=g([]),c={isCollection:!0,useQuery:!0};this.commonDbService.shouldUseFirestore()||(c.documentId=s?.length?s[0]:void 0,c.organizationId=this.documentPaths?.organizationId);let d=[];for(let l=0;l<s.length;l+=$e.LISTENER_BATCH_SIZE)d.push(s.slice(l,l+$e.LISTENER_BATCH_SIZE));return a=nt(d.map(l=>this.commonDbService.dbListener({feature:"allDocumentUsers",properties:B(p({},c),{firestoreQuery:[Ie(De(T("documentIds","array-contains-any",l),T("viewerDocumentIds","array-contains-any",l))),Bt("id"),...this.commentService?.getPaginatedContactList()?[Ge(10)]:[]]})}).pipe(Sn()))).pipe(C(l=>qn(l)?.data)),a.pipe(C(l=>{if(l){typeof l=="object"&&(l?.undefined&&delete l.undefined,l?.null&&delete l.null);let u=Object.values(l??{});this.setUserAccessFields(u),this.setUserDocumentContacts(u)}else this.setUserDocumentContacts([])}))})):g():g())),v(()=>this.getContactListScopeForOrganizationUsers$())):(this.setUserDocumentContacts([]),g()))).subscribe(()=>{this.mergeOrganizationAndDocumentContacts()},t=>{this.loggingService.catch("Error in ContactService getDocumentContactsFromDb$ subscription: ",t)}))}catch{}}setUserOrganizationContacts(t,o,r=!0){try{let s=t.find(c=>c.user.userId===this.user?.userId);s&&this.setCurrentOrganizationUserIAM(s);let a=t.map(c=>c.user)?.filter(c=>!this.userOrganizationContacts$.value.find(d=>d.userId===c.userId));if(this.userOrganizationContacts$.next([...this.userOrganizationContacts$.value,...a]),r&&this.usersService.setUserByIds(a),o){let c={};c[o]={};let d={};t.forEach(u=>{c[o][u.user.userId]=u,d[u.user.userId]=u.user}),this.userById$.next(p(p({},this.userById$.value),d));let l=this.usersByOrganizationId$.value?.[o];l&&(c[o]=p(p({},l),c[o])),this.usersByOrganizationId$.next(B(p({},this.usersByOrganizationId$.value),{[o]:c[o]}))}else this.usersByOrganizationId$.next({})}catch(s){this.loggingService.catch("Error in ContactService setUserOrganizationContacts: ",s)}}getUserOrganizationContacts$(){return this.getContactListScopeForOrganizationUsers$().pipe(v(()=>this.checkContactListScopeForOrganizationUsers([S.ALL,S.ORGANIZATION])?this.userOrganizationContacts$.asObservable():g([])))}getUserOrganizationContacts(){return this.checkContactListScopeForOrganizationUsers([S.ALL,S.ORGANIZATION])?this.userOrganizationContacts$.value:[]}setUserFolderContacts(t,o=!0){try{let r=t?.map(d=>d?.user)?.filter(d=>!this.userFolderContacts$.value.find(l=>l.userId===d.userId));this.userFolderContacts$.next([...this.userFolderContacts$.value,...r]),o&&this.usersService.setUserByIds(r);let s=this.usersByOrganizationIdAndFolderId$.value||{},a=p({},s),c={};t?.forEach(d=>{let{organizationId:l}=d?.metadata||{};l&&(a[l]||(a[l]={}),d.folderIds?.forEach(u=>{a[l][u]||(a[l][u]={}),a[l][u]=B(p({},a[l][u]),{[d.user.userId]:d}),c[d.user.userId]=d.user}))}),this.userById$.next(p(p({},this.userById$.value),c)),this.usersByOrganizationIdAndFolderId$.next(a)}catch(r){this.loggingService.catch("Error in ContactService updateUserFolderContacts: ",r)}}getUserFolderContacts$(){return this.getContactListScopeForOrganizationUsers$().pipe(v(()=>this.checkContactListScopeForOrganizationUsers([S.ALL,S.FOLDER])?this.userFolderContacts$.asObservable():g([])))}getUserFolderContacts(){return this.checkContactListScopeForOrganizationUsers([S.ALL,S.FOLDER])?this.userFolderContacts$.value:[]}setUserDocumentContacts(t,o=!0){try{let r=t?.map(d=>d?.user)?.filter(d=>!this.userDocumentContacts$.value.find(l=>l.userId===d.userId));this.userDocumentContacts$.next([...this.userDocumentContacts$.value,...r]),o&&this.usersService.setUserByIds(r);let s=this.usersByOrganizationIdAndDocumentId$.value||{},a=p({},s),c={};t?.forEach(d=>{let{organizationId:l}=d?.metadata||{};l&&(a[l]||(a[l]={}),d.documentIds?.forEach(u=>{a[l][u]||(a[l][u]={}),a[l][u]=B(p({},a[l][u]),{[d.user.userId]:d}),c[d.user.userId]=d.user}))}),this.userById$.next(p(p({},this.userById$.value),c)),this.usersByOrganizationIdAndDocumentId$.next(a)}catch(r){this.loggingService.catch("Error in ContactService updateUserDocumentContacts: ",r)}}getUserDocumentContacts$(){return this.getContactListScopeForOrganizationUsers$().pipe(v(()=>this.checkContactListScopeForOrganizationUsers([S.ALL,S.DOCUMENT])?this.userDocumentContacts$.asObservable():g([])))}getUserDocumentContacts(){return this.checkContactListScopeForOrganizationUsers([S.ALL,S.DOCUMENT])?this.userDocumentContacts$.value:[]}setCurrentOrganizationUserIAM(t){try{this.currentOrganizationUserIAM$.next(JSON.parse(JSON.stringify(t)))}catch(o){this.loggingService.catch("Error in ContactService setCurrentOrganizationUserIAM: ",o)}}getCurrentOrganizationUserIAM$(){return this.currentOrganizationUserIAM$.asObservable().pipe(oe(Ft))}getCurrentOrganizationUserIAM(){return this.currentOrganizationUserIAM$.value}mergeOrganizationAndDocumentContacts(){try{this.mergeContactsDebounceTimer&&clearTimeout(this.mergeContactsDebounceTimer),this.mergeContactsDebounceTimer=setTimeout(()=>{this.executeMergeContacts()},200)}catch(t){this.loggingService.catch("Error in ContactService mergeOrganizationAndDocumentContacts: ",t)}}executeMergeContacts(){try{let t=this.getContactListScopeForOrganizationUsers(),o=[];t.includes(S.ALL)?o=[...this.getUserOrganizationContacts(),...this.getUserFolderContacts(),...this.getUserDocumentContacts()]:t.includes(S.ORGANIZATION)?o=[...this.getUserOrganizationContacts()]:t.includes(S.FOLDER)?o=[...this.getUserFolderContacts()]:t.includes(S.DOCUMENT)&&(o=[...this.getUserDocumentContacts()]);let r=[...new Map(o.filter(s=>s?.userId).map(s=>[s.userId,s])).values()];this.internalUserContacts$.next(r)}catch(t){this.loggingService.catch("Error in ContactService mergeOrganizationAndDocumentContacts: ",t)}}getOrganizationGroupsFromDb$(){try{this.getOrganizationGroupsSubscription||(this.getOrganizationGroupsSubscription=this.authService.getUser$().pipe(v(t=>t?.organizationId?g(t).pipe(v(o=>this.docService.getOrganizationConfig$().pipe(D(r=>!!r),C(()=>o))),v(o=>{if(this.setUserOrganizationGroups([]),!o)return g();let r=this.docService.getOrganizationConfig(),s=r?.organizationId,a=r?.clientOrganizationId??"";if(!s)return g();let c=o.userId??"";return St(this.userPermissionService?.getUserPermissionsFromCacheOrFetch({organizationId:a})??Promise.resolve({})).pipe(v(d=>c&&a&&d?.[c]?.organization?.[a]?.errorCode===Si.PERMISSION_DENIED?g():this.commonDbService.dbListener({feature:"allOrganizationGroups",properties:{organizationId:s,isCollection:!0}}).pipe(C(l=>l?.data),C(l=>{l?(typeof l=="object"&&(l?.undefined&&delete l.undefined,l?.null&&delete l.null),this.setUserOrganizationGroups(Object.values(l??{}))):this.setUserOrganizationGroups([])}))))})):(this.setUserOrganizationGroups([]),g()))).subscribe(()=>{},t=>{this.loggingService.catch("Error in ContactService getOrganizationGroupsFromDb$ subscription: ",t)}))}catch{}}setUserOrganizationGroups(t){try{this.userOrganizationGroups$.next(t)}catch(o){this.loggingService.catch("Error in ContactService setUserOrganizationGroups: ",o)}}onContactSelected(t){try{if(t?.userId){let o=!!this.getUserDocumentContacts().find(s=>s.userId===t.userId),r=!!this.getUserOrganizationContacts().find(s=>s.userId===t.userId);switch(this.documentAccessType){case Lt.RESTRICTED:if(!o){let s={contact:t,isOrganizationContact:r,isDocumentContact:o,documentAccessType:this.documentAccessType};this.onContactSelectedSubject$.next(s)}break}}else{let o={contact:t,isOrganizationContact:!1,isDocumentContact:!1,documentAccessType:this.documentAccessType};this.onContactSelectedSubject$.next(o)}}catch(o){this.loggingService.catch("Error in ContactService onContactSelected: ",o)}}onContactSelected$(){return this.onContactSelectedSubject$.asObservable()}getOrganizationGroups$(){return this.getContactListScopeForOrganizationUsers$().pipe(v(()=>this.checkContactListScopeForOrganizationUsers([S.ALL,S.ORGANIZATION_USER_GROUP])?this.userOrganizationGroups$.asObservable():g([])))}enableAtHere(){try{if(this.analyticsService.setFeatureConfig({feature:rt.COMMENT,config:{atHereEnabled:!0}}),this.atHereEnabled$.value===!0)return;this.atHereEnabled$.next(!0)}catch(t){this.loggingService.catch("Error in ContactService enableAtHere: ",t)}}setAtHereLabel(t){try{this.analyticsService.setFeatureConfig({feature:rt.COMMENT,config:{atHereLabel:t}}),t&&this.atHereLabel$.next(t)}catch(o){this.loggingService.catch("Error in ContactService setAtHereLabel: ",o)}}setAtHereDescription(t){try{this.analyticsService.setFeatureConfig({feature:rt.COMMENT,config:{atHereDescription:t}}),t&&this.atHereDescription$.next(t)}catch(o){this.loggingService.catch("Error in ContactService setAtHereDescription: ",o)}}disableAtHere(){try{if(this.analyticsService.setFeatureConfig({feature:rt.COMMENT,config:{atHereEnabled:!1}}),this.atHereEnabled$.value===!1)return;this.atHereEnabled$.next(!1)}catch(t){this.loggingService.catch("Error in ContactService disableAtHere: ",t)}}getAtHereEnabled$(){return this.getContactListScopeForOrganizationUsers$().pipe(v(()=>this.checkContactListScopeForOrganizationUsers([S.ALL,S.DOCUMENT])?this.atHereEnabled$.asObservable():g(!1)))}getAtHereEnabled(){return this.checkContactListScopeForOrganizationUsers([S.ALL,S.DOCUMENT])?this.atHereEnabled$.value:!1}updateContactListScopeForOrganizationUsers(t){try{this.contactListScopeForOrganizationUsers$.next(t)}catch(o){this.loggingService.catch("Error in ContactService updateContactListScopeForOrganizationUsers: ",o)}}getContactListScopeForOrganizationUsers$(){return this.contactListScopeForOrganizationUsers$.asObservable()}getContactListScopeForOrganizationUsers(){return this.contactListScopeForOrganizationUsers$.value}checkContactListScopeForOrganizationUsers(t){return this.getContactListScopeForOrganizationUsers().some(o=>t.includes(o))}updateContactList(t,o){return j(this,null,function*(){try{this.analyticsService.trackEvent(Nt.Events.Contact.UPDATE_CONTACT_LIST_TRIGGERED,{contactsCount:t?.length,config:o}),this.usersService.setContactListUsers(t),this.customUserContacts$.next(t),this.customUserContactsConfig$.next(o)}catch(r){this.loggingService.catch("Error in CommentService updateContactList: ",r)}})}updateOrgList(t){try{let o=t?.orgList??[];this.analyticsService.trackEvent(Nt.Events.Contact.UPDATE_ORG_LIST_TRIGGERED,{orgCount:o?.length}),this.orgList$.next(o)}catch(o){this.loggingService.catch("Error in ContactService updateOrgList: ",o)}}getOrgList$(){return this.orgList$.asObservable()}getOrgList(){return this.orgList$.value}convert(t){try{if(t?.options){let{documentId:o,organizationId:r}=this.docService.getServerId(t?.options);t.options=B(p({},t?.options),{documentId:o,organizationId:r})}return this}catch(o){return this.loggingService.catch("Error in ContactService convert: ",o),this}}getContactList$(){try{return this.authService.getUser$().pipe(v(t=>t?nt([this.userOrganizationContacts$.asObservable(),this.userFolderContacts$.asObservable(),this.userDocumentContacts$.asObservable(),this.userOrganizationGroups$.asObservable(),this.customUserContacts$.asObservable()]).pipe(C(([o,r,s,a,c])=>{let d={};d.organizationUsers=o?.map(u=>this.convertToClientUser(u)),d.folderUsers=r?.map(u=>this.convertToClientUser(u)),d.documentUsers=s?.map(u=>this.convertToClientUser(u)),d.updatedContactList=c?.map(u=>this.convertToClientUser(u));let l=[];return a?.forEach(u=>{let w=this.convertToClientUserGroup(u,d.organizationUsers||[]);w&&l.push(w)}),d.userGroups=l,d}),oe(Ft)):g(null)),_i(t=>(this.loggingService.catch("Error in ContactService getContactList$: ",t),g(null))))}catch(t){return this.loggingService.catch("Error in ContactService getContactList$: ",t),g(null)}}convertToClientUserGroup(t,o){try{let r={groupId:t?.metadata?.clientGroupId,groupName:t?.metadata?.groupName,users:[]},s={};return o?.forEach(a=>{if(a?.userId){let c=O(a.userId);s[c]=a}}),Object.keys(t?.users??{}).forEach(a=>{s[a]&&r.users?.push(s[a])}),r}catch(r){return this.loggingService.catch("Error in ContactService convertToClientUserGroup: ",r),null}}convertToClientUser(t){try{return t&&(t=JSON.parse(JSON.stringify(t)),t?.clientGroupId&&(t.groupId=t.clientGroupId,delete t.clientGroupId),t?.clientOrganizationId&&(t.organizationId=t.clientOrganizationId,delete t.clientOrganizationId),t?.userSnippylyId&&delete t.userSnippylyId),t}catch(o){return this.loggingService.catch("Error in ContactService convertToClientUser: ",o),t}}getCustomUserContacts(){return this.customUserContacts$.value}getCustomUserContacts$(){return this.customUserContacts$.asObservable()}getCustomUserContactsConfig(){return this.customUserContactsConfig$.value}getCustomUserContactsConfig$(){return this.customUserContactsConfig$.asObservable()}};i.\u0275fac=function(o){return new(o||i)(k(Jn),k(zt),k(He),k(to),k(eo),k(Vt),k(te),k(no),k(io),k(Ut))},i.\u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var he={user:"componentConfigSignal.appState.user",isUserAdmin:"componentConfigSignal.appState.isUserAdmin",isKnownUser:"componentConfigSignal.appState.isKnownUser",repliesUniqueUsers:"componentConfigSignal.appState.repliesUniqueUsers",annotation:"componentConfigSignal.data.annotation",annotations:"componentConfigSignal.data.annotations",allAnnotations:"componentConfigSignal.data.allAnnotations",ghostComment:"componentConfigSignal.data.ghostComment",selectedFiles:"parentLocalUIState.selectedFiles",invalidSelectedFiles:"parentLocalUIState.invalidSelectedFiles",selectedAttachments:"parentLocalUIState.selectedAttachments",editComment:"parentLocalUIState.editComment",editCommentIndex:"parentLocalUIState.editCommentIndex",assignTo:"componentConfigSignal.data.assignTo",selectedUserContacts:"componentConfigSignal.data.selectedUserContacts",agentName:"componentConfigSignal.data.annotation.agent.agentName",agentAvatar:"componentConfigSignal.data.annotation.agent.avatar",agentResultTitle:"componentConfigSignal.data.annotation.agent.result.title",localRecordedData:"parentLocalUIState.localRecordedData",customList:"componentConfigSignal.data.customList",toOrganizationUserGroup:"componentConfigSignal.data.toOrganizationUserGroup",taggedUserContacts:"componentConfigSignal.data.taggedUserContacts",taggedGroups:"componentConfigSignal.data.taggedGroups",attachmentsToDelete:"parentLocalUIState.attachmentsToDelete",customChipData:"componentConfigSignal.data.customChipData",selectedCustomChipSet:"componentConfigSignal.data.selectedCustomChipSet",currentDialogView:"componentConfigSignal.data.currentDialogView",sidebarMode:"parentLocalUIState.sidebarMode",inboxMode:"parentLocalUIState.inboxMode",dialogMode:"parentLocalUIState.dialogMode",inlineCommentMode:"parentLocalUIState.inlineCommentMode",inlineCommentSectionMode:"parentLocalUIState.inlineCommentSectionMode",focusedThreadMode:"parentLocalUIState.focusedThreadMode",isFocusedThreadEnabled:"parentLocalUIState.isFocusedThreadEnabled",pageModeComposer:"parentLocalUIState.pageModeComposer",darkMode:"parentLocalUIState.darkMode",variant:"parentLocalUIState.variant",disabled:"parentLocalUIState.disabled",commentPinSelected:"parentLocalUIState.commentPinSelected",fullExpanded:"parentLocalUIState.fullExpanded",commentDialogSelected:"parentLocalUIState.commentDialogSelected",readOnly:"parentLocalUIState.readOnly",dialogShadowDOM:"parentLocalUIState.dialogShadowDOM",locationVersion:"parentLocalUIState.locationVersion",composerPosition:"parentLocalUIState.composerPosition",dialogOpenedInSidebar:"parentLocalUIState.dialogOpenedInSidebar",expandOnSelection:"parentLocalUIState.expandOnSelection",selectedVisibility:"parentLocalUIState.selectedVisibility",selectedVisibilityUsers:"parentLocalUIState.selectedVisibilityUsers",containerComponentId:"componentConfigSignal.uiState.containerComponentId",isPrivateComment:"componentConfigSignal.uiState.isPrivateComment",assignToMenuOpened:"parentLocalUIState.assignToMenuOpened",showGhostCommentMessage:"componentConfigSignal.uiState.showGhostCommentMessage",showReplies:"componentConfigSignal.uiState.showReplies",collapsedComments:"componentConfigSignal.uiState.collapsedComments",collapsedRepliesPreview:"componentConfigSignal.uiState.collapsedRepliesPreview",showAllComments:"componentConfigSignal.uiState.showAllComments",composerContent:"parentLocalUIState.composerContent",composerContentHTML:"parentLocalUIState.composerContentHTML",composerInOpenState:"parentLocalUIState.composerInOpenState",composerMode:"componentConfigSignal.uiState.composerMode",multiThreadAnnotationId:"componentConfigSignal.uiState.multiThreadAnnotationId",maxReplyAvatars:"componentConfigSignal.uiState.maxReplyAvatars",showSuggestionModeActions:"componentConfigSignal.uiState.showSuggestionModeActions",uploadingAttachments:"componentConfigSignal.uiState.uploadingAttachments",playVideoInFullScreen:"componentConfigSignal.uiState.playVideoInFullScreen",commentDialogUniqueId:"componentConfigSignal.uiState.commentDialogUniqueId",recorderInitConfig:"componentConfigSignal.uiState.recorderInitConfig",isInputFocused:"componentConfigSignal.uiState.isInputFocused",showCommentButtons:"componentConfigSignal.uiState.showCommentButtons",isAutocompleteDropdownOpen:"componentConfigSignal.uiState.isAutocompleteDropdownOpen",bottomSheetMode:"componentConfigSignal.uiState.bottomSheetMode",commentComposerMode:"componentConfigSignal.uiState.commentComposerMode",shouldScrollToBottom:"componentConfigSignal.uiState.shouldScrollToBottom",deviceType:"componentConfigSignal.uiState.deviceType",showReplyComposer:"componentConfigSignal.uiState.showReplyComposer",reactionToolOpenIndex:"parentLocalUIState.reactionToolOpenIndex",openDropdownIndexValue:"parentLocalUIState.openDropdownIndexValue",hasReactionsByCommentId:"componentConfigSignal.uiState.hasReactionsByCommentId",newComment:"parentLocalUIState.composerContent",newCommentHTML:"parentLocalUIState.composerContentHTML",canResolveAnnotation:"componentConfigSignal.featureState.canResolveAnnotation",canUnresolveAnnotation:"componentConfigSignal.featureState.canUnresolveAnnotation",dialogSelectedByKnownUser:"componentConfigSignal.featureState.dialogSelectedByKnownUser",resolveStatusAccessAdminOnly:"componentConfigSignal.featureState.resolveStatusAccessAdminOnly",enableResolve:"componentConfigSignal.featureState.enableResolve",isPlanExpired:"componentConfigSignal.featureState.isPlanExpired",moderatorMode:"componentConfigSignal.featureState.moderatorMode",enableAutoCategorize:"componentConfigSignal.featureState.enableAutoCategorize",suggestionMode:"componentConfigSignal.featureState.suggestionMode",commentAcceptedStatus:"componentConfigSignal.featureState.commentAcceptedStatus",commentRejectedStatus:"componentConfigSignal.featureState.commentRejectedStatus",enableSignInButton:"componentConfigSignal.featureState.enableSignInButton",enableUpgradeButton:"componentConfigSignal.featureState.enableUpgradeButton",enableGhostCommentsMessage:"componentConfigSignal.featureState.enableGhostCommentsMessage",replyAvatars:"componentConfigSignal.featureState.replyAvatars",userMentions:"componentConfigSignal.featureState.userMentions",recordingSummaryEnabled:"componentConfigSignal.featureState.recordingSummaryEnabled",enableAttachment:"componentConfigSignal.featureState.enableAttachment",allowedFileTypes:"componentConfigSignal.featureState.allowedFileTypes",allowedRecordings:"componentConfigSignal.featureState.allowedRecordings",screenSharingSupported:"componentConfigSignal.featureState.screenSharingSupported",enterKeyToSubmit:"componentConfigSignal.featureState.enterKeyToSubmit",deleteOnBackspace:"componentConfigSignal.featureState.deleteOnBackspace",showScreenSizeInfo:"componentConfigSignal.uiState.showScreenSizeInfo",enableReactions:"componentConfigSignal.featureState.enableReactions",isInsidePdfViewer:"componentConfigSignal.featureState.isInsidePdfViewer",sidebarButtonOnCommentDialogVisible:"componentConfigSignal.uiState.sidebarButtonOnCommentDialogVisible",enableStatus:"componentConfigSignal.featureState.enableStatus",customStatusesShown:"componentConfigSignal.featureState.customStatusesShown",statusOptions:"componentConfigSignal.featureState.statusOptions",enablePriority:"componentConfigSignal.featureState.enablePriority",visibilityOptions:"componentConfigSignal.featureState.visibilityOptions",priorityOptions:"componentConfigSignal.featureState.priorityOptions",enableAssignment:"componentConfigSignal.featureState.enableAssignment",enableNotifications:"componentConfigSignal.featureState.enableNotifications",enableEdit:"componentConfigSignal.featureState.enableEdit",enableDelete:"componentConfigSignal.featureState.enableDelete",enablePrivateMode:"componentConfigSignal.featureState.enablePrivateMode",deleteThreadWithFirstComment:"componentConfigSignal.featureState.deleteThreadWithFirstComment",seenByUsers:"componentConfigSignal.featureState.seenByUsers",allowAssignment:"componentConfigSignal.featureState.enableAssignment",allowToggleNotification:"componentConfigSignal.featureState.enableNotifications",allowEdit:"componentConfigSignal.featureState.enableEdit",allowChangeCommentAccessMode:"componentConfigSignal.featureState.enablePrivateMode",notificationEnabled:"notificationEnabled",mainCommentId:"componentConfigSignal.data.annotation.comments.0.commentId",commentObj:"commentObj",commentIndex:"commentIndex",userContact:"selectorItem.contact",comment:"commentObj",commentAnnotation:"componentConfigSignal.data.annotation",commentAnnotations:"componentConfigSignal.data.annotations",context:"parentLocalUIState.context",focusedAnnotation:"focusedAnnotation",notification:"notification",unreadNotificationsForYou:"componentConfigSignal.data.unreadNotificationsForYou",notificationsPanelVisible:"componentConfigSignal.uiState.notificationsPanelVisible",notificationsForYouInSession:"componentConfigSignal.data.notificationsForYouInSession",notificationsInSession:"componentConfigSignal.data.notificationsInSession",notificationsByUserMap:"componentConfigSignal.data.notificationsByUserMap",notificationsByDocumentId:"componentConfigSignal.data.notificationsByDocumentId",notificationsByDate:"componentConfigSignal.data.notificationsByDate",currentDocumentName:"componentConfigSignal.data.currentDocumentName",settingsConfig:"componentConfigSignal.data.settingsConfig",settingsSelectedOption:"componentConfigSignal.data.settingsSelectedOption",selectedTab:"componentConfigSignal.uiState.selectedTab",tabConfig:"componentConfigSignal.uiState.tabConfig",TABS:"componentConfigSignal.uiState.TABS",tabPage:"componentConfigSignal.uiState.tabPage",pageSize:"componentConfigSignal.uiState.pageSize",panelOpenMode:"componentConfigSignal.uiState.panelOpenMode",settingsOpen:"componentConfigSignal.uiState.settingsOpen",settingsAccordionExpanded:"componentConfigSignal.uiState.settingsAccordionExpanded",settingsMutedAll:"componentConfigSignal.uiState.settingsMutedAll",settingsItemRecentlyClosed:"componentConfigSignal.uiState.settingsItemRecentlyClosed",settingsLayout:"componentConfigSignal.uiState.settingsLayout",tabCount:"componentConfigSignal.uiState.tabCount",usersExpanded:"componentConfigSignal.uiState.usersExpanded",documentExpanded:"componentConfigSignal.uiState.documentExpanded",shadowDom:"componentConfigSignal.uiState.shadowDom",settingsEnabled:"componentConfigSignal.featureState.settingsEnabled",selectedMinimalFilterDropdownOption:"selectedMinimalFilterDropdownOption",appliedFiltersCount:"appliedFiltersCount",filteredCommentAnnotationsCount:"filteredCommentAnnotationsCount",unreadCommentAnnotationCount:"unreadCommentAnnotationCount",isEnabled:"componentConfigSignal.featureState.isEnabled",allActivities:"componentConfigSignal.data.allActivities",filteredActivities:"componentConfigSignal.data.filteredActivities",groupedActivities:"componentConfigSignal.data.groupedActivities",virtualScrollItems:"componentConfigSignal.data.virtualScrollItems",activeFilter:"componentConfigSignal.data.activeFilter",availableFilters:"componentConfigSignal.data.availableFilters",isOpen:"componentConfigSignal.uiState.isOpen",expandedGroups:"componentConfigSignal.uiState.expandedGroups",defaultVisibleCount:"componentConfigSignal.uiState.defaultVisibleCount",filterDropdownOpen:"componentConfigSignal.uiState.filterDropdownOpen",activity:"activityRecord",activityRecord:"activityRecord",dateGroup:"dateGroup",filter:"filterOption",filterOption:"filterOption",isActive:"isActive",isExpanded:"isExpanded",remainingCount:"remainingCount",showAdder:"componentConfigSignal.uiState.showAdder",commentToolEnabled:"componentConfigSignal.uiState.commentToolEnabled",isUserAllowed:"componentConfigSignal.uiState.isUserAllowed",enableTextComments:"componentConfigSignal.uiState.enableTextComments",rewriterEnabled:"componentConfigSignal.uiState.rewriterEnabled",rewriterDefaultUIEnabled:"componentConfigSignal.uiState.rewriterDefaultUIEnabled",selectedWordsCount:"componentConfigSignal.data.selectedWordsCount",selectedCharactersCount:"componentConfigSignal.data.selectedCharactersCount",allowedElementIds:"componentConfigSignal.data.allowedElementIds",contextId:"componentConfigSignal.data.contextId",position:"componentConfigSignal.data.position",MIN_ALLOWED_WORDS_COUNT:"componentConfigSignal.uiState.MIN_ALLOWED_WORDS_COUNT",MIN_ALLOWED_CHARACTERS_COUNT:"componentConfigSignal.uiState.MIN_ALLOWED_CHARACTERS_COUNT",MAX_ALLOWED_CHARACTERS_COUNT:"componentConfigSignal.uiState.MAX_ALLOWED_CHARACTERS_COUNT",filteredAnnotations:"componentConfigSignal.data.filteredAnnotations",multiThreadCommentAnnotation:"componentConfigSignal.data.multiThreadCommentAnnotation",nonDraftCommentsCount:"componentConfigSignal.data.nonDraftCommentsCount",commentPinType:"componentConfigSignal.uiState.commentPinType",hideMultiThreadAnnotationComposer:"componentConfigSignal.uiState.hideMultiThreadAnnotationComposer",dialogVariant:"componentConfigSignal.uiState.dialogVariant",minimalFilter:"componentConfigSignal.uiState.minimalFilter",minimalFilterDropdownOpen:"componentConfigSignal.uiState.minimalFilterDropdownOpen",minimalActionsDropdownOpen:"componentConfigSignal.uiState.minimalActionsDropdownOpen",noCommentsFoundForAppliedFilters:"componentConfigSignal.uiState.noCommentsFoundForAppliedFilters",noCommentsFound:"componentConfigSignal.uiState.noCommentsFound",isSelected:"isSelected",composerCommentAnnotation:"componentConfigSignal.data.composerCommentAnnotation",statuses:"componentConfigSignal.data.statuses",skeletonLoading:"componentConfigSignal.uiState.skeletonLoading",filterState:"componentConfigSignal.uiState.filterState",sortState:"componentConfigSignal.uiState.sortState",isResolvedCommentsOnDomFilterSelected:"componentConfigSignal.uiState.isResolvedCommentsOnDomFilterSelected",resolvedCommentsOnDom:"componentConfigSignal.uiState.resolvedCommentsOnDom",selectedAnnotationsMap:"componentConfigSignal.uiState.selectedAnnotationsMap",selectedAnnotationsLocationMap:"componentConfigSignal.uiState.selectedAnnotationsLocationMap",composerVariant:"parentLocalUIState.composerVariant",multiThread:"parentLocalUIState.multiThread",commentPlaceholder:"parentLocalUIState.commentPlaceholder",replyPlaceholder:"parentLocalUIState.replyPlaceholder",composerPlaceholder:"parentLocalUIState.composerPlaceholder",editPlaceholder:"parentLocalUIState.editPlaceholder",editCommentPlaceholder:"parentLocalUIState.editCommentPlaceholder",editReplyPlaceholder:"parentLocalUIState.editReplyPlaceholder",targetElementId:"parentLocalUIState.targetElementId",folderId:"parentLocalUIState.folderId",veltFolderId:"parentLocalUIState.veltFolderId",clientDocumentId:"parentLocalUIState.clientDocumentId",documentId:"parentLocalUIState.documentId",locationId:"parentLocalUIState.locationId",contextOptions:"parentLocalUIState.contextOptions",messageTruncation:"parentLocalUIState.messageTruncation",messageTruncationLines:"parentLocalUIState.messageTruncationLines",unresolvedAnnotationsCount:"componentConfigSignal.data.unresolvedAnnotationsCount",unreadCount:"componentConfigSignal.data.unreadCount",commentBubbleTargetPinHover:"parentLocalUIState.commentBubbleTargetPinHover",openDialog:"parentLocalUIState.openDialog",showAvatar:"parentLocalUIState.showAvatar",commentCountType:"parentLocalUIState.commentCountType"},xs=["user","annotation","annotations","allAnnotations","userContact","comment","commentAnnotation","commentAnnotations","recorderInitConfig","ghostComment","editComment","assignTo","customChipData","currentDialogView","context","focusedAnnotation","notification","selectedMinimalFilterDropdownOption","unreadNotificationsForYou","notificationsForYouInSession","notificationsInSession","notificationsByUserMap","notificationsByDocumentId","notificationsByDate","settingsConfig","settingsSelectedOption","settingsAccordionExpanded","tabConfig","tabPage","TABS","allActivities","filteredActivities","groupedActivities","virtualScrollItems","availableFilters","expandedGroups","activity","activityRecord","dateGroup","filter","filterOption","position","allowedElementIds","filteredAnnotations","multiThreadCommentAnnotation","composerCommentAnnotation","statuses","filterState","sortState","selectedAnnotationsMap","selectedAnnotationsLocationMap","contextOptions"],pi=(()=>{let _DynamicDataService=class _DynamicDataService{constructor(n,i,e,t,o,r){this.authService=n,this.serviceBook=i,this.loggingService=e,this.injector=t,this.docService=o,this.configService=r,this.subscriptions=[],this.commonData$=new b({}),this.evaluateConditionTriggered=new z,this.conditionRegex=/\{(.*?)\}/g,this.extractedProps={},this.condition="",this.dataComponentConfigSignal=$({});try{this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.commonData$.next(B(p({},this.commonData$.value),{user:s}))})),this.subscriptions.push(this.serviceBook.observe(st).pipe(D(Boolean),v(s=>s.getUnreadCommentAnnotationCountOnCurrentDocument$())).subscribe(s=>{this.commonData$.next(B(p({},this.commonData$.value),{unreadCommentAnnotationCount:s?.count||0}))})),this.subscriptions.push(this.serviceBook.observe(st).pipe(D(Boolean),v(s=>s.getUnreadCommentCountOnCurrentDocument$())).subscribe(s=>{this.commonData$.next(B(p({},this.commonData$.value),{unreadCommentCount:s?.count||0}))})),this.subscriptions.push(this.docService.getUIState$().subscribe(s=>{this.commonData$.next(p(p({},this.commonData$.value),s))})),this.subscriptions.push(this.getCommonData().subscribe(s=>{this.dataComponentConfigSignal.update(a=>(a=p(p({},a),s),a)),this.executeConditionalClasses()})),this.subscriptions.push(this.evaluateConditionTriggered.subscribe(s=>{this.extractedProps=s.extractedProps,this.evaluateCondition(s.className,s.elementRef,s.condition)}))}catch(s){this.loggingService.catch("Error in DynamicDataService constructor: ",s)}}ngOnDestroy(){try{this.subscriptions.forEach(n=>n.unsubscribe())}catch(n){this.loggingService.catch("Error in DynamicDataService ngOnDestroy: ",n)}}getCommonData(){return this.commonData$.asObservable()}getModifiedPathBasedOnCondition(n,i){try{return Object.keys(i).forEach(e=>{i[e].path=this.modifyPathBasedOnCondition(e,n)}),i}catch(e){this.loggingService.catch("Error in DynamicDataService getModifiedPathBasedOnCondition: ",e)}}getComputedValues(n,i,e,t,o,r){try{Object.keys(e).forEach(s=>{let a;if(Fe(n)?a=bi(()=>Ii(n(),e[s].path)):a=bi(()=>Ii(n,e[s].path)),Fe(a()))Ve(()=>{try{let c=a()();e[s].value=c,this.evaluateConditionTriggered.emit({extractedProps:e,className:t,elementRef:o,condition:r})}catch{}},{injector:this.injector});else{let c=a();e[s].value=c,this.evaluateConditionTriggered.emit({extractedProps:e,className:t,elementRef:o,condition:r})}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}modifyPathBasedOnCondition(n,i){try{let e=n.match(/^([^\.\[]+)/),t=e?e[1]:n,o=n.slice(t.length);if(he[n])return he[n];if(["commentDialogOptionsDropdownConfigSignal","commentDialogStatusDropdownConfigSignal"].includes(t)&&o.startsWith(".")){let s=o.slice(1),a=s.match(/^([^\.\[]+)/),c=a?a[1]:s,d=s.slice(c.length);return he[c]?he[c]+d:"componentConfigSignal."+s}if(t&&i&&typeof i=="function"){let s=i();if(s&&t in s){let c=n.match(/\[(.*?)\]/);if(c&&c[1]){let d=c[1];if(d.includes(".")){let l=d.split(".")[0];if(he[l]){let u=d.replace(l,he[l]);return n.replace(`[${d}]`,`[${u}]`)}return l&&s&&l in s?n:n.replace(`[${d}]`,`[componentConfigSignal.${d}]`)}}return n}let a=s?.componentConfigSignal;if(a&&typeof a=="function"){let c=a();if(c&&t in c)return"componentConfigSignal."+n}}return he[t]?xs.includes(t)?he[t]+o:he[t]:"componentConfigSignal."+n}catch(e){return this.loggingService.catch("Error in DynamicDataService modifyPathBasedOnCondition: ",e),n}}applyConditionalClasses(n,i){try{this.elementRef=n,this.data=i}catch(e){this.loggingService.catch("Error in DynamicDataService applyConditionalClasses: ",e)}}executeConditionalClasses(){try{let n=this.getHostElementAttributes(this.elementRef),e=[...Object.keys(n).filter(t=>t.startsWith("velt-class-")).map(t=>({name:t,value:n[t]}))];if(n["velt-class"]){let t=n["velt-class"],o=/'([^']+)':\s*([^,]+)(?:,|$)/g,r=[],s=0,a=100,c;for(;(c=o.exec(t))!==null;){if(s++>a){this.loggingService.catch("Too many class definitions detected.");break}if(c.length<3)continue;let[,d,l]=c;!d||!l||d.split(" ").forEach(u=>{u.trim()&&r.push({name:`velt-class-${u.trim()}`,value:l.trim()})})}e=[...e,...r]}this.data&&typeof this.data=="object"&&Object.keys(this.data).forEach(t=>{this.updateDataComponentConfigSignal(t,this.data[t])}),e.forEach(t=>{let o=t.name.replace("velt-class-","");this.condition=t.value,this.condition&&(this.extractProps(),this.extractedProps=this.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps,o,this.elementRef,t.value))})}catch(n){this.loggingService.catch("Error in DynamicDataService applyConditionalClasses: ",n)}}updateDataComponentConfigSignal(n,i){try{n==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(i):this.dataComponentConfigSignal.update(e=>B(p({},e),{[n]:i}))}catch(e){this.loggingService.catch("Error in DataComponent updateDataComponentConfigSignal: ",e)}}extractProps(){try{this.extractedProps={},this.conditionRegex.lastIndex=0;let n;for(;(n=this.conditionRegex.exec(this.condition))!==null;){let i=n[1];this.extractedProps[i]={value:null,path:null,isDynamicPath:this.hasDynamicParts(i)}}}catch(n){this.loggingService.catch("Error in DynamicDataService extractProps: ",n)}}hasDynamicParts(n){try{let i=/\[[^\]'"]*[^\]'"]\]/.test(n),e=/\[[^[\]]*[\.\[][^[\]]*\]/.test(n);return i||e}catch(i){return this.loggingService.catch("Error checking for dynamic path: ",i),!1}}evaluateCondition(n,i,e){try{if(e){let t=this.extractedProps,o=e.replace(this.conditionRegex,(a,c)=>{let d=t[c];if(d&&d.value!==void 0){let l=d.value;return typeof l=="string"?`'${l}'`:typeof l=="boolean"||typeof l=="number"?String(l):l===null?"null":typeof l=="object"?l?"true":"false":String(l)}return"false"}),r=this.sanitizeCondition(o),s=this.safeEval(r);return n&&i&&(s?this.setHostElementClasses(i,n):this.removeHostElementClasses(i,n)),s}return!1}catch(t){return this.loggingService.catch("Error in IfComponent evaluateCondition: ",t),!1}}sanitizeCondition(n){try{return n.replace(/[^a-zA-Z0-9\s\+\-\*\/\%\(\)\!\=\<\>\|\&\.\[\]\{\},'"]/g,"")}catch(i){return this.loggingService.catch("Error in IfComponent sanitizeCondition: ",i),""}}safeEval(expression){try{if(this.configService.getSafeEval()){let n=this.tokenize(expression.trim());return this.evaluateTokens(n)}else return eval(expression)}catch(n){return this.loggingService.catch("safeEval error",n),!1}}tokenize(n){try{if(!n||n.trim()==="")return[];let i=[],e=0;for(;e<n.length;){let t=n[e];if(/\s/.test(t)){e++;continue}if(t==='"'||t==="'"){let o=t,r="";for(e++;e<n.length;)if(n[e]==="\\"&&e+1<n.length)r+=n[e+1],e+=2;else if(n[e]===o){e++;break}else r+=n[e],e++;i.push({type:"string",value:r});continue}if(t==="("){i.push({type:"lparen",value:"("}),e++;continue}if(t===")"){i.push({type:"rparen",value:")"}),e++;continue}if(e<n.length-2&&n.substring(e,e+3)==="==="){i.push({type:"operator",value:"===",precedence:4}),e+=3;continue}if(e<n.length-2&&n.substring(e,e+3)==="!=="){i.push({type:"operator",value:"!==",precedence:4}),e+=3;continue}if(e<n.length-1&&n.substring(e,e+2)==="&&"){i.push({type:"operator",value:"&&",precedence:2}),e+=2;continue}if(e<n.length-1&&n.substring(e,e+2)==="||"){i.push({type:"operator",value:"||",precedence:1}),e+=2;continue}if(e<n.length-1&&n.substring(e,e+2)==="<="){i.push({type:"operator",value:"<=",precedence:4}),e+=2;continue}if(e<n.length-1&&n.substring(e,e+2)===">="){i.push({type:"operator",value:">=",precedence:4}),e+=2;continue}if(e<n.length-1&&n.substring(e,e+2)==="=="){i.push({type:"operator",value:"==",precedence:4}),e+=2;continue}if(e<n.length-1&&n.substring(e,e+2)==="!="){i.push({type:"operator",value:"!=",precedence:4}),e+=2;continue}if(t==="!"){i.push({type:"unary",value:"!",precedence:5}),e++;continue}if(t==="<"){i.push({type:"operator",value:"<",precedence:4}),e++;continue}if(t===">"){i.push({type:"operator",value:">",precedence:4}),e++;continue}if(/[a-zA-Z0-9._]/.test(t)){let o="";for(;e<n.length&&/[a-zA-Z0-9._]/.test(n[e]);)o+=n[e],e++;/^-?\d+(\.\d+)?$/.test(o)?i.push({type:"number",value:parseFloat(o)}):o==="true"||o==="false"?i.push({type:"boolean",value:o==="true"}):o==="null"?i.push({type:"null",value:null}):o==="undefined"?i.push({type:"undefined",value:void 0}):i.push({type:"identifier",value:o});continue}e++}return i}catch(i){return this.loggingService.catch("tokenize error",i),[]}}evaluateTokens(n){try{if(!n||n.length===0)return!1;let i=this.infixToPostfix(n);return this.evaluatePostfix(i)}catch(i){return this.loggingService.catch("evaluateTokens error",i),!1}}infixToPostfix(n){try{let i=[],e=[];for(let t of n)if(t.type==="string"||t.type==="number"||t.type==="boolean"||t.type==="null"||t.type==="undefined"||t.type==="identifier")i.push(t);else if(t.type==="unary")e.push(t);else if(t.type==="operator"){for(;e.length>0;){let o=e[e.length-1];if(o.type==="lparen"||o.precedence!==void 0&&o.precedence<t.precedence)break;i.push(e.pop())}e.push(t)}else if(t.type==="lparen")e.push(t);else if(t.type==="rparen"){for(;e.length>0&&e[e.length-1].type!=="lparen";)i.push(e.pop());e.length>0&&e.pop()}for(;e.length>0;){let t=e.pop();t.type!=="lparen"&&t.type!=="rparen"&&i.push(t)}return i}catch(i){return this.loggingService.catch("infixToPostfix error",i),[]}}evaluatePostfix(n){try{let i=[];for(let e of n)if(e.type==="string"||e.type==="number"||e.type==="boolean"||e.type==="null"||e.type==="undefined"||e.type==="identifier")i.push(e.value);else if(e.type==="unary"){if(i.length>=1){let t=i.pop();e.value==="!"&&i.push(!this.isTruthy(t))}}else if(e.type==="operator"&&i.length>=2){let t=i.pop(),o=i.pop();e.value==="&&"?i.push(this.isTruthy(o)&&this.isTruthy(t)):e.value==="||"?i.push(this.isTruthy(o)||this.isTruthy(t)):i.push(this.compare(o,t,e.value))}return i.length===1?this.isTruthy(i[0]):!1}catch(i){return this.loggingService.catch("evaluatePostfix error",i),!1}}parseValue(n){try{let i=n.trim();return i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'")?i.substring(1,i.length-1):/^-?\d+(\.\d+)?$/.test(i)?parseFloat(i):i==="true"?!0:i==="false"?!1:i==="null"?null:i==="undefined"?void 0:i}catch(i){return this.loggingService.catch("parseValue error",i),n}}compare(n,i,e){try{switch(e){case"===":return n===i;case"!==":return n!==i;case"==":return n==i;case"!=":return n!=i;case"<":return n<i;case">":return n>i;case"<=":return n<=i;case">=":return n>=i;default:return!1}}catch(t){return this.loggingService.catch("compare error",t),!1}}isTruthy(n){try{return n==null||n===""||n==="false"?!1:n==="true"?!0:typeof n=="number"?n!==0:!!n}catch(i){return this.loggingService.catch("isTruthy error",i),!1}}getHostElementAttributes(n){try{let i=n,e={};for(let t of i.attributes)e[t.name]=t.value;return e}catch{return{}}}setHostElementClasses(n,i){try{n.classList.add(i)}catch{}}removeHostElementClasses(n,i){try{n.classList.remove(i)}catch{}}};_DynamicDataService.\u0275fac=function(i){return new(i||_DynamicDataService)(k(zt),k(Ut),k(te),k(E),k(Vt),k(He))},_DynamicDataService.\u0275prov=y({token:_DynamicDataService,factory:_DynamicDataService.\u0275fac,providedIn:"root"});let DynamicDataService=_DynamicDataService;return DynamicDataService})();var pr=(()=>{let i=class i{constructor(t,o){this.loggingService=t,this.configService=o,this.darkMode$=new b(!1)}setDarkMode(t){try{let o=document.documentElement;if(!o)return;t?o.setAttribute($e.ATTRIBUTES.VELT_THEME,"dark"):o.removeAttribute($e.ATTRIBUTES.VELT_THEME),this.darkMode$.next(t)}catch(o){this.loggingService.catch("Error in theme service setDarkMode: ",o)}}getDarkMode$(){return this.darkMode$.asObservable()}updateListenerOnConfigChange(){try{this.configService.getConfig$().subscribe(t=>{if(t&&t.usePrefersColorScheme){this.enablePrefersColorScheme();return}this.disablePrefersColorScheme()})}catch(t){this.loggingService.catch("Error in theme service updateListenerOnConfigChange: ",t)}}enablePrefersColorScheme(){try{if(this.disablePrefersColorScheme(),!window.matchMedia)return;this.darkModeQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.setDarkMode(this.darkModeQuery.matches),this.darkModeQueryListener=t=>{this.setDarkMode(t.matches)},this.darkModeQuery.addEventListener("change",this.darkModeQueryListener)}catch(t){this.loggingService.catch("Error in theme service enablePrefersColorScheme: ",t)}}disablePrefersColorScheme(){try{this.darkModeQuery&&this.darkModeQueryListener&&this.darkModeQuery.removeEventListener("change",this.darkModeQueryListener)}catch(t){this.loggingService.catch("Error in theme service disablePrefersColorScheme: ",t)}}};i.\u0275fac=function(o){return new(o||i)(k(te),k(He))},i.\u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var gr=(()=>{let i=class i{set veltIf(t){try{t&&this.setIfCondition(t)}catch(o){this._loggingService.catch("Error in BaseComponent set veltIf:",o)}}veltStop(t){Lo(t)}veltHandled(t){return Fo(t)}constructor(t,o,r){this._elementRef=t,this._dynamicDataService=o,this._loggingService=r,this.componentConfigSignal=$({}),this.veltElement=!0,this.conditionSignal=$(null)}initializeComponentConfigSignal(t){try{this.componentConfigSignal.set(t)}catch(o){this._loggingService.catch("Error in BaseComponent initializeComponentConfigSignal:",o)}}ngOnInit(){try{this._dynamicDataService.applyConditionalClasses(this._elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal})}catch(t){this._loggingService.catch("Error in BaseComponent ngOnInit:",t)}}ngOnDestroy(){}setIfCondition(t){try{this.conditionSignal.set(t)}catch(o){this._loggingService.catch("Error in BaseComponent setIfCondition:",o)}}};i.\u0275fac=function(o){return new(o||i)(Z(R),Z(pi),Z(te))},i.\u0275cmp=W({type:i,selectors:[["app-base"]],hostVars:1,hostBindings:function(o,r){o&2&&pe("data-velt-element",r.veltElement)},inputs:{componentConfigSignal:"componentConfigSignal",template:"template",wireframe:"wireframe",veltIf:"veltIf"},standalone:!1,decls:0,vars:0,template:function(o,r){},encapsulation:2});let n=i;return n})();var Vh=(()=>{let i=class i extends gr{onDarkModeChange(){return this.darkModeSubject$.asObservable()}constructor(t,o,r,s,a,c,d){super(t,c,d),this._elementRef=t,this._themeService=o,this._changeDetector=r,this._featureService=s,this._componentDarkModeObservable=a,this._componentDarkMode=null,this._globalDarkMode=!1,this._featureDarkMode=!1,this._themeSubscriptions=[],this._darkMode=!1,this.darkMode=!1,this.darkModeSubject$=new b(!1);try{if(this._themeSubscriptions.push(this._themeService.getDarkMode$().subscribe(l=>{this._globalDarkMode=l,this.setDarkMode()})),this._featureService){let l=this._featureService;typeof l.getCommentContainerDarkMode=="function"?this._themeSubscriptions.push(l.getCommentContainerDarkMode().subscribe(u=>{this._featureDarkMode=u,this.setDarkMode()})):typeof l.getDarkMode$=="function"&&this._themeSubscriptions.push(l.getDarkMode$().subscribe(u=>{u!==null&&(this._featureDarkMode=u),this.setDarkMode()}))}this._componentDarkModeObservable&&this._componentDarkModeObservable instanceof Ce&&this._themeSubscriptions.push(this._componentDarkModeObservable.subscribe(l=>{this._componentDarkMode=l,this.setDarkMode()}))}catch{}}ngOnInit(){super.ngOnInit()}ngOnChanges(t){try{if(t._darkMode){let o=t._darkMode.currentValue;typeof o=="string"&&(o=o==="true"),this._componentDarkMode=o,this.setDarkMode()}}catch{}}setComponentDarkMode(t){try{this._componentDarkMode=t,this.setDarkMode()}catch{}}setDarkMode(){try{this._componentDarkMode===null?this._featureDarkMode?this.darkMode=!0:this.darkMode=!!this._globalDarkMode:this.darkMode=!!this._componentDarkMode,this.darkMode?this._elementRef.nativeElement.hasAttribute("dark")||this._elementRef.nativeElement.setAttribute("dark",""):this._elementRef.nativeElement.hasAttribute("dark")&&this._elementRef.nativeElement.removeAttribute("dark"),this.darkModeSubject$.next(this.darkMode),this._changeDetector&&this._changeDetector.markForCheck()}catch{}}ngOnDestroy(){try{super.ngOnDestroy(),this._themeSubscriptions.forEach(t=>{t.unsubscribe()})}catch{}}};i.\u0275fac=function(o){return new(o||i)(Z(R),Z(pr),Z(je),Z("FeatureService",8),Z(Ce),Z(pi),Z(te))},i.\u0275cmp=W({type:i,selectors:[["app-themed"]],inputs:{_darkMode:[0,"darkMode","_darkMode"]},standalone:!1,features:[Y,re],decls:0,vars:0,template:function(o,r){},encapsulation:2,changeDetection:0});let n=i;return n})();export{uo as a,Kt as b,ie as c,Wi as d,Yi as e,ce as f,Ee as g,Xe as h,le as i,lo as j,Sr as k,we as l,ho as m,Ar as n,Oi as o,wi as p,me as q,Ye as r,Ae as s,Yt as t,ht as u,Re as v,_e as w,Qe as x,ii as y,Te as z,Mi as A,Ni as B,qe as C,Oo as D,ft as E,wo as F,Li as G,Pr as H,pt as I,Ur as J,Br as K,fc as L,ko as M,pc as N,jr as O,gc as P,$r as Q,mc as R,_c as S,vc as T,yc as U,To as V,Po as W,Lo as X,Fo as Y,Ec as Z,Oc as _,wc as $,Ac as aa,Rc as ba,kc as ca,Tc as da,xc as ea,Mc as fa,No as ga,Pc as ha,Lc as ia,es as ja,zo as ka,Xi as la,Wo as ma,en as na,sn as oa,an as pa,Id as qa,Dd as ra,rn as sa,cn as ta,nn as ua,on as va,qo as wa,it as xa,ar as ya,ui as za,Ds as Aa,Es as Ba,Os as Ca,ws as Da,As as Ea,vh as Fa,pi as Ga,pr as Ha,gr as Ia,Vh as Ja};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Cb as a,Db as h,Ra as o,Ti as g,Wa as c,fb as m,wj as l,ya as s}from"./chunk-
|
|
1
|
+
import{Cb as a,Db as h,Ra as o,Ti as g,Wa as c,fb as m,wj as l,ya as s}from"./chunk-YFBAHLK6.js";var d=["*"],C=(()=>{let i=class i{constructor(t,e,n){this.elementRef=t,this.domService=e,this.loggingService=n,this.veltElement=!0}ngAfterViewInit(){try{this.customCssSubscription=this.domService.subscribeInjectCustomCss(this.elementRef)}catch(t){this.loggingService.catch("Error in ShadowDomComponent ngAfterViewInit: ",t)}}ngOnDestroy(){try{this.customCssSubscription?.unsubscribe()}catch(t){this.loggingService.catch("Error in ShadowDomComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(o(s),o(l),o(g))},i.\u0275cmp=c({type:i,selectors:[["velt-shadow-dom-internal"]],hostVars:1,hostBindings:function(e,n){e&2&&m("data-velt-element",n.veltElement)},ngContentSelectors:d,decls:1,vars:0,template:function(e,n){e&1&&(a(),h(0))},styles:[`:host{width:100%}
|
|
2
2
|
`],encapsulation:3,changeDetection:0});let r=i;return r})();export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as V}from"./chunk-O3FUWWWQ.js";import{Ga as x,Ha as L,Ja as D,M as C,R as v,S as I}from"./chunk-I63T4QWP.js";import{Bi as y,Ri as E,Ti as U,Wa as m,_a as d,a as s,b as h,fa as o,sa as f,xc as u,ya as S,zc as p}from"./chunk-YFBAHLK6.js";var A=(()=>{let r=class r extends D{set parentLocalUIState(t){try{t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1,this._localUIStateFromExplicitInput=!0)}catch{}}get elementRef(){try{return this.hostElementRef}catch{return null}}getServiceComponentConfigSignal(){}constructor(){let t=o(S),e=o(L),i=o(p),a=o(E).get(y),g=o(x),l=o(U);super(t,e,i,a??void 0,void 0,g,l),this.defaultCondition=u(!0,{transform:n=>{try{return typeof n=="string"?n==="true"||n==="":n}catch{return!0}}}),this.isLocalUIStateOwner=!1,this._localUIStateFromExplicitInput=!1,this.veltContextHost=new V({getHost:()=>this.hostElementRef?.nativeElement,ownerRef:this,getEntity:()=>this.getPublishedVeltEntity(),getLocalUIState:()=>this.isLocalUIStateOwner?this.localUIStateSignal:void 0,onContextChanged:()=>{this.adoptInheritedLocalUIState(),this.rebindServiceConfigFromPlacement(),this.onVeltContextChanged()},markForCheck:()=>this.cd?.markForCheck()}),this.isLocalUIStateRoot=!1,this.selfConnectedConfig=!1,this.ownsConfigSignal=!0;try{this.hostElementRef=t,this.themeService=e,this.dynamicDataService=g,this.loggingService=l,this.cd=i,this.commentService=a??void 0,this.initializeLocalUIState()}catch(n){this.loggingService=this.loggingService||l,this.loggingService?.catch?.("Error in V2PrimitiveThemedBase constructor:",n)}}initializeLocalUIState(){this.localUIStateSignal=f(this.getDefaultLocalUIState()),this.isLocalUIStateOwner=!0}getConditionalClassesContext(){return{componentConfigSignal:this.componentConfigSignal}}ngOnInit(){try{this.adoptInheritedLocalUIState(),this.connectToServiceSignalIfStandalone(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,this.getConditionalClassesContext()),this.setupA11yAttributes(),this.isLocalUIStateOwner&&this.setupDarkModeSync(),this.finalizeVeltContext()}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase ngOnInit:",t)}}adoptInheritedLocalUIState(){try{v({host:this.hostElementRef?.nativeElement,current:this.localUIStateSignal,isOwner:this.isLocalUIStateOwner,fromExplicitInput:this._localUIStateFromExplicitInput,isRoot:this.isLocalUIStateRoot,adopt:t=>{this.localUIStateSignal=t,this.isLocalUIStateOwner=!1}})}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase adoptInheritedLocalUIState:",t)}}rebindServiceConfigFromPlacement(){try{if(!this.selfConnectedConfig)return;let t=this.getServiceComponentConfigSignal();if(!t||t===this.componentConfigSignal)return;let e=this.componentConfigSignal,i=this.ownsConfigSignal;if(this.componentConfigSignal=t,this.ownsConfigSignal=!1,i)try{e?.update(a=>s({},a))}catch{}this.cd?.markForCheck()}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase rebindServiceConfigFromPlacement:",t)}}finalizeVeltContext(){this.veltContextHost.finalize()}getPublishedVeltEntity(){}getInheritedVeltEntity(){try{return I(this.hostElementRef?.nativeElement)}catch{return}}refreshVeltContextFromPlacement(){this.veltContextHost.refreshFromPlacement()}onVeltContextChanged(){}getInheritedVeltContextData(){try{return C(this.hostElementRef?.nativeElement)?.payload?.contextData||{}}catch{return{}}}connectToServiceSignalIfStandalone(){try{let t=this.componentConfigSignal();if(!t||!t?.uiState){this.selfConnectedConfig=!0;let e=this.getServiceComponentConfigSignal();e&&(this.componentConfigSignal=e,this.ownsConfigSignal=!1)}}catch(t){this.loggingService.catch("Error connecting to service signal:",t)}}ngOnDestroy(){try{this.darkModeConfigSyncSubscription&&this.darkModeConfigSyncSubscription.unsubscribe(),this.veltContextHost.destroy(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase ngOnDestroy:",t)}}setupA11yAttributes(){}setupDarkModeSync(){try{this.darkModeConfigSyncSubscription=this.onDarkModeChange().subscribe(t=>{try{if(this.componentConfigSignal&&typeof this.componentConfigSignal=="function"){let e=this.componentConfigSignal();e&&e.uiState&&e.uiState.darkMode!==t&&this.componentConfigSignal.update(i=>h(s({},i),{uiState:h(s({},i.uiState),{darkMode:t})}))}}catch(e){this.loggingService.catch("Error in darkMode sync subscription:",e)}})}catch(t){this.loggingService.catch("Error in V2PrimitiveThemedBase setupDarkModeSync:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=m({type:r,selectors:[["app-v2-primitive-themed-base"]],inputs:{defaultCondition:[1,"defaultCondition"],parentLocalUIState:"parentLocalUIState"},standalone:!1,features:[d],decls:0,vars:0,template:function(e,i){},encapsulation:2});let c=r;return c})();export{A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ia as c,Ra as n,Ya as o,wa as a,wj as h,ya as r}from"./chunk-
|
|
1
|
+
import{Ia as c,Ra as n,Ya as o,wa as a,wj as h,ya as r}from"./chunk-YFBAHLK6.js";var I=(()=>{let e=class e{constructor(t,i){this.domService=t,this.elementRef=i,this.clickOutside=new c}ngOnInit(){}ngAfterViewInit(){setTimeout(()=>{this.subscription=this.domService.onDocumentClickSubject$().subscribe(t=>{let i=this.checkInsideClick(t,this.elementRef.nativeElement);!i&&this.clickOutsideHandler&&typeof this.clickOutsideHandler=="function"&&(i=this.clickOutsideHandler(t.target,this.elementRef.nativeElement)),i||this.clickOutside.emit()})},500)}ngOnDestroy(){this.subscription?.unsubscribe()}checkInsideClick(t,i){return t.composedPath().includes(i)}};e.\u0275fac=function(i){return new(i||e)(n(h),n(r))},e.\u0275dir=o({type:e,selectors:[["","snippylyClickOutside",""]],inputs:{clickOutsideHandler:"clickOutsideHandler"},outputs:{clickOutside:"clickOutside"}});let s=e;return s})();var b=(()=>{let e=class e{constructor(t){this.elementRef=t,this.lastPosition=null,this.positionChange=new c,this.disabled=!1,this.timeSpentInMs=0,this.MAX_TIME_SPENT_IN_MS=6e4}ngAfterViewInit(){try{this.toggleTrackingPosition()}catch{}}toggleTrackingPosition(){try{this.disabled?this.stopTracking():this.startTrackingPosition()}catch{}}startTrackingPosition(){try{if(this.intervalId)return;this.intervalId=setInterval(()=>{if(this.timeSpentInMs+=10,this.timeSpentInMs>this.MAX_TIME_SPENT_IN_MS){this.stopTracking();return}let t=this.elementRef.nativeElement.getBoundingClientRect();(!this.lastPosition||!this.arePositionsEqual(this.lastPosition,t))&&(this.lastPosition=t,this.positionChange.emit(t))},10)}catch{}}stopTracking(){try{this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null,this.timeSpentInMs=0)}catch{}}arePositionsEqual(t,i){try{return t.top===i.top&&t.left===i.left&&t.bottom===i.bottom&&t.right===i.right&&t.width===i.width&&t.height===i.height}catch{return!0}}ngOnChanges(){try{this.toggleTrackingPosition()}catch{}}ngOnDestroy(){try{this.stopTracking()}catch{}}};e.\u0275fac=function(i){return new(i||e)(n(r))},e.\u0275dir=o({type:e,selectors:[["","veltPositionObserver",""]],inputs:{disabled:[0,"veltPositionObserverDisabled","disabled"]},outputs:{positionChange:"positionChange"},features:[a]});let s=e;return s})();export{I as a,b};
|