@sync-in/server 1.3.4 → 1.3.6
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/CHANGELOG.md +14 -0
- package/package.json +2 -2
- package/static/{chunk-4RF354LU.js → chunk-3VDXS56K.js} +1 -1
- package/static/{chunk-X2BMM3NY.js → chunk-5SCHYI7K.js} +1 -1
- package/static/{chunk-W4LKCEBR.js → chunk-ASH3CAYZ.js} +1 -1
- package/static/{chunk-HPRC4PXX.js → chunk-D5NRQM6S.js} +1 -1
- package/static/{chunk-ESSY62VJ.js → chunk-DMN6JV3X.js} +1 -1
- package/static/{chunk-YQGJX5R7.js → chunk-DOKA2WHJ.js} +1 -1
- package/static/{chunk-6HV65OKG.js → chunk-FSDIOBH6.js} +1 -1
- package/static/{chunk-ZJDBESQA.js → chunk-HSRWUGKT.js} +1 -1
- package/static/{chunk-BOIXDTUT.js → chunk-IKNQ6PPM.js} +1 -1
- package/static/{chunk-3XDVB3TW.js → chunk-IMAJPTLO.js} +1 -1
- package/static/{chunk-GW5AVRYT.js → chunk-LK3ILZP5.js} +1 -1
- package/static/{chunk-X4CIBLP6.js → chunk-LNKKXNNU.js} +1 -1
- package/static/{chunk-2QNFUN7G.js → chunk-MFZROUQ3.js} +1 -1
- package/static/{chunk-WWKXW4MM.js → chunk-MPVQM2PL.js} +1 -1
- package/static/{chunk-5SYLS7WR.js → chunk-OU6PE6E7.js} +1 -1
- package/static/{chunk-Q7LN54AP.js → chunk-PB76NZ6O.js} +1 -1
- package/static/{chunk-ZEZVOO4G.js → chunk-QBFAWJVK.js} +1 -1
- package/static/{chunk-55WOZ7P6.js → chunk-SGDMUCQ7.js} +1 -1
- package/static/{chunk-AS7H5UIO.js → chunk-SQFLVUCW.js} +1 -1
- package/static/{chunk-QKELW3MH.js → chunk-T5R64VS4.js} +1 -1
- package/static/{chunk-SOYI5P5A.js → chunk-TMXIUOP5.js} +1 -1
- package/static/{chunk-7XBZXSHI.js → chunk-U5B5KGFX.js} +1 -1
- package/static/{chunk-2PQGH3LQ.js → chunk-V5OITZAT.js} +1 -1
- package/static/{chunk-MTBJHA2L.js → chunk-VLZ5YMY7.js} +1 -1
- package/static/{chunk-XQFA4DLU.js → chunk-VWP6UNTY.js} +1 -1
- package/static/{chunk-MLLPT7BU.js → chunk-XXVSRYSO.js} +1 -1
- package/static/{chunk-Q35EEVWP.js → chunk-YDFPRKKR.js} +1 -1
- package/static/{chunk-2OSA27SE.js → chunk-ZMI2J4TP.js} +1 -1
- package/static/{chunk-GLAK4VQT.js → chunk-ZYXAII5S.js} +1 -1
- package/static/index.html +1 -1
- package/static/{main-2GG5BCQL.js → main-NUCIT7MV.js} +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as F,m as y,s as b,t as _}from"./chunk-55WOZ7P6.js";import{$b as H,Cb as w,E as D,Fb as N,Gb as L,Na as k,Nb as C,Qa as p,Ra as o,Sa as g,Xa as I,Ya as O,Za as u,Zb as E,bb as f,ca as m,da as M,ib as A,pb as S,qb as R,qc as v,rb as j,xc as P,ya as l}from"./chunk-JQOMI5VI.js";var U=["*"],V=s=>({dropdown:s}),B=(()=>{let t=class t{constructor(){this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})(),c=(()=>{let t=class t{constructor(){this.direction="down",this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1,this.isOpenChange=new f,this.isDisabledChange=new f,this.toggleClick=new f,this.counts=0,this.dropdownMenu=new Promise(e=>{this.resolveDropdownMenu=e})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"platform"});let s=t;return s})(),K="220ms cubic-bezier(0, 0, 0.2, 1)",T=[y({height:0,overflow:"hidden"}),F(K,y({height:"*",overflow:"hidden"}))],q=(()=>{let t=class t{get direction(){return this._state.direction}constructor(e,i,n,d,a){this._state=e,this.cd=i,this._renderer=n,this._element=d,this.isOpen=!1,this._factoryDropDownAnimation=a.build(T),this._subscription=e.isOpenChange.subscribe(h=>{this.isOpen=h;let r=this._element.nativeElement.querySelector(".dropdown-menu");this._renderer.addClass(this._element.nativeElement.querySelector("div"),"open"),r&&(this._renderer.addClass(r,"show"),(r.classList.contains("dropdown-menu-right")||r.classList.contains("dropdown-menu-end"))&&(this._renderer.setStyle(r,"left","auto"),this._renderer.setStyle(r,"right","0")),this.direction==="up"&&(this._renderer.setStyle(r,"top","auto"),this._renderer.setStyle(r,"transform","translateY(-101%)"))),r&&this._state.isAnimated&&this._factoryDropDownAnimation.create(r).play(),this.cd.markForCheck(),this.cd.detectChanges()})}_contains(e){return this._element.nativeElement.contains(e)}ngOnDestroy(){this._subscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(c),o(v),o(p),o(l),o(b))},t.\u0275cmp=I({type:t,selectors:[["bs-dropdown-container"]],hostAttrs:[2,"display","block","position","absolute","z-index","1040"],ngContentSelectors:U,decls:2,vars:9,consts:[[3,"ngClass"]],template:function(i,n){i&1&&(N(),R(0,"div",0),L(1),j()),i&2&&(C("dropup",n.direction==="up")("show",n.isOpen)("open",n.isOpen),S("ngClass",H(7,V,n.direction==="down")))},dependencies:[P],encapsulation:2,changeDetection:0});let s=t;return s})(),Y=(()=>{let t=class t{set autoClose(e){this._state.autoClose=e}get autoClose(){return this._state.autoClose}set isAnimated(e){this._state.isAnimated=e}get isAnimated(){return this._state.isAnimated}set insideClick(e){this._state.insideClick=e}get insideClick(){return this._state.insideClick}set isDisabled(e){this._isDisabled=e,this._state.isDisabledChange.emit(e),e&&this.hide()}get isDisabled(){return this._isDisabled}get isOpen(){return this._showInline?this._isInlineOpen:this._dropdown.isShown}set isOpen(e){e?this.show():this.hide()}get _showInline(){return!this.container}constructor(e,i,n,d,a,h,r){this._elementRef=e,this._renderer=i,this._viewContainerRef=n,this._cis=d,this._state=a,this._config=h,this.dropup=!1,this._isInlineOpen=!1,this._isDisabled=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._state.insideClick=this._config.insideClick,this._state.isAnimated=this._config.isAnimated,this._state.stopOnClickPropagation=this._config.stopOnClickPropagation,this._factoryDropDownAnimation=r.build(T),this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:c,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}ngOnInit(){this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:()=>this.show()}),this._subscriptions.push(this._state.toggleClick.subscribe(e=>this.toggle(e))),this._subscriptions.push(this._state.isDisabledChange.pipe(D(e=>e)).subscribe(()=>this.hide())))}show(){if(!(this.isOpen||this.isDisabled)){if(this._showInline){this._inlinedMenu||this._state.dropdownMenu.then(e=>{this._dropdown.attachInline(e.viewContainer,e.templateRef),this._inlinedMenu=this._dropdown._inlineViewRef,this.addBs4Polyfills(),this._inlinedMenu&&this._renderer.addClass(this._inlinedMenu.rootNodes[0].parentNode,"open"),this.playAnimation()}).catch(),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),this._state.isOpenChange.emit(!0),this.playAnimation();return}this._state.dropdownMenu.then(e=>{let i=this.dropup||typeof this.dropup<"u"&&this.dropup;this._state.direction=i?"up":"down";let n=this.placement||(i?"top start":"bottom start");this._dropdown.attach(q).to(this.container).position({attachment:n}).show({content:e.templateRef,placement:n}),this._state.isOpenChange.emit(!0)}).catch()}}hide(){this.isOpen&&(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))}toggle(e){return this.isOpen||!e?this.hide():this.show()}_contains(e){return this._elementRef.nativeElement.contains(e.target)||this._dropdown.instance&&this._dropdown.instance._contains(e.target)}navigationClick(e){let i=this._elementRef.nativeElement.querySelector(".dropdown-menu");if(!i)return;let n=this._elementRef.nativeElement.ownerDocument.activeElement,d=i.querySelectorAll(".dropdown-item");switch(e.keyCode){case 38:this._state.counts>0&&d[--this._state.counts].focus();break;case 40:this._state.counts+1<d.length&&(n.classList!==d[this._state.counts].classList?d[this._state.counts].focus():d[++this._state.counts].focus());break;default:}e.preventDefault()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._dropdown.dispose()}addBs4Polyfills(){this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles()}playAnimation(){this._state.isAnimated&&this._inlinedMenu&&setTimeout(()=>{this._inlinedMenu&&this._factoryDropDownAnimation.create(this._inlinedMenu.rootNodes[0]).play()})}addShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")}removeShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")}checkRightAlignment(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){let e=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right")||this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-end");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",e?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",e?"0":"auto")}}addDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"bottom","auto"))}removeDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"bottom"))}};t.\u0275fac=function(i){return new(i||t)(o(l),o(p),o(g),o(_),o(c),o(B),o(b))},t.\u0275dir=u({type:t,selectors:[["","bsDropdown",""],["","dropdown",""]],hostVars:6,hostBindings:function(i,n){i&1&&w("keydown.arrowDown",function(a){return n.navigationClick(a)})("keydown.arrowUp",function(a){return n.navigationClick(a)}),i&2&&C("dropup",n.dropup)("open",n.isOpen)("show",n.isOpen)},inputs:{placement:"placement",triggers:"triggers",container:"container",dropup:"dropup",autoClose:"autoClose",isAnimated:"isAnimated",insideClick:"insideClick",isDisabled:"isDisabled",isOpen:"isOpen"},outputs:{isOpenChange:"isOpenChange",onShown:"onShown",onHidden:"onHidden"},exportAs:["bs-dropdown"],features:[E([c,_,B])]});let s=t;return s})(),ae=(()=>{let t=class t{constructor(e,i,n){e.resolveDropdownMenu({templateRef:n,viewContainer:i})}};t.\u0275fac=function(i){return new(i||t)(o(c),o(g),o(k))},t.\u0275dir=u({type:t,selectors:[["","bsDropdownMenu",""],["","dropdownMenu",""]],exportAs:["bs-dropdown-menu"]});let s=t;return s})(),he=(()=>{let t=class t{constructor(e,i,n,d,a){this._changeDetectorRef=e,this._dropdown=i,this._element=n,this._renderer=d,this._state=a,this.isOpen=!1,this._subscriptions=[],this._subscriptions.push(this._state.isOpenChange.subscribe(h=>{this.isOpen=h,h?(this._documentClickListener=this._renderer.listen("document","click",r=>{this._state.autoClose&&r.button!==2&&!this._element.nativeElement.contains(r.target)&&!(this._state.insideClick&&this._dropdown._contains(r))&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())}),this._escKeyUpListener=this._renderer.listen(this._element.nativeElement,"keyup.esc",()=>{this._state.autoClose&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())})):(this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener())})),this._subscriptions.push(this._state.isDisabledChange.subscribe(h=>this.isDisabled=h||void 0))}onClick(e){this._state.stopOnClickPropagation&&e.stopPropagation(),!this.isDisabled&&this._state.toggleClick.emit(!0)}ngOnDestroy(){this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener();for(let e of this._subscriptions)e.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(v),o(Y),o(l),o(p),o(c))},t.\u0275dir=u({type:t,selectors:[["","bsDropdownToggle",""],["","dropdownToggle",""]],hostVars:3,hostBindings:function(i,n){i&1&&w("click",function(a){return n.onClick(a)}),i&2&&A("aria-haspopup",!0)("disabled",n.isDisabled)("aria-expanded",n.isOpen)},exportAs:["bs-dropdown-toggle"]});let s=t;return s})(),ce=(()=>{let t=class t{static forRoot(){return{ngModule:t,providers:[]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=O({type:t}),t.\u0275inj=M({});let s=t;return s})();export{Y as a,ae as b,he as c,ce as d};
|
|
1
|
+
import{k as F,m as y,s as b,t as _}from"./chunk-SGDMUCQ7.js";import{$b as H,Cb as w,E as D,Fb as N,Gb as L,Na as k,Nb as C,Qa as p,Ra as o,Sa as g,Xa as I,Ya as O,Za as u,Zb as E,bb as f,ca as m,da as M,ib as A,pb as S,qb as R,qc as v,rb as j,xc as P,ya as l}from"./chunk-JQOMI5VI.js";var U=["*"],V=s=>({dropdown:s}),B=(()=>{let t=class t{constructor(){this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})(),c=(()=>{let t=class t{constructor(){this.direction="down",this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1,this.isOpenChange=new f,this.isDisabledChange=new f,this.toggleClick=new f,this.counts=0,this.dropdownMenu=new Promise(e=>{this.resolveDropdownMenu=e})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"platform"});let s=t;return s})(),K="220ms cubic-bezier(0, 0, 0.2, 1)",T=[y({height:0,overflow:"hidden"}),F(K,y({height:"*",overflow:"hidden"}))],q=(()=>{let t=class t{get direction(){return this._state.direction}constructor(e,i,n,d,a){this._state=e,this.cd=i,this._renderer=n,this._element=d,this.isOpen=!1,this._factoryDropDownAnimation=a.build(T),this._subscription=e.isOpenChange.subscribe(h=>{this.isOpen=h;let r=this._element.nativeElement.querySelector(".dropdown-menu");this._renderer.addClass(this._element.nativeElement.querySelector("div"),"open"),r&&(this._renderer.addClass(r,"show"),(r.classList.contains("dropdown-menu-right")||r.classList.contains("dropdown-menu-end"))&&(this._renderer.setStyle(r,"left","auto"),this._renderer.setStyle(r,"right","0")),this.direction==="up"&&(this._renderer.setStyle(r,"top","auto"),this._renderer.setStyle(r,"transform","translateY(-101%)"))),r&&this._state.isAnimated&&this._factoryDropDownAnimation.create(r).play(),this.cd.markForCheck(),this.cd.detectChanges()})}_contains(e){return this._element.nativeElement.contains(e)}ngOnDestroy(){this._subscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(c),o(v),o(p),o(l),o(b))},t.\u0275cmp=I({type:t,selectors:[["bs-dropdown-container"]],hostAttrs:[2,"display","block","position","absolute","z-index","1040"],ngContentSelectors:U,decls:2,vars:9,consts:[[3,"ngClass"]],template:function(i,n){i&1&&(N(),R(0,"div",0),L(1),j()),i&2&&(C("dropup",n.direction==="up")("show",n.isOpen)("open",n.isOpen),S("ngClass",H(7,V,n.direction==="down")))},dependencies:[P],encapsulation:2,changeDetection:0});let s=t;return s})(),Y=(()=>{let t=class t{set autoClose(e){this._state.autoClose=e}get autoClose(){return this._state.autoClose}set isAnimated(e){this._state.isAnimated=e}get isAnimated(){return this._state.isAnimated}set insideClick(e){this._state.insideClick=e}get insideClick(){return this._state.insideClick}set isDisabled(e){this._isDisabled=e,this._state.isDisabledChange.emit(e),e&&this.hide()}get isDisabled(){return this._isDisabled}get isOpen(){return this._showInline?this._isInlineOpen:this._dropdown.isShown}set isOpen(e){e?this.show():this.hide()}get _showInline(){return!this.container}constructor(e,i,n,d,a,h,r){this._elementRef=e,this._renderer=i,this._viewContainerRef=n,this._cis=d,this._state=a,this._config=h,this.dropup=!1,this._isInlineOpen=!1,this._isDisabled=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._state.insideClick=this._config.insideClick,this._state.isAnimated=this._config.isAnimated,this._state.stopOnClickPropagation=this._config.stopOnClickPropagation,this._factoryDropDownAnimation=r.build(T),this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:c,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}ngOnInit(){this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:()=>this.show()}),this._subscriptions.push(this._state.toggleClick.subscribe(e=>this.toggle(e))),this._subscriptions.push(this._state.isDisabledChange.pipe(D(e=>e)).subscribe(()=>this.hide())))}show(){if(!(this.isOpen||this.isDisabled)){if(this._showInline){this._inlinedMenu||this._state.dropdownMenu.then(e=>{this._dropdown.attachInline(e.viewContainer,e.templateRef),this._inlinedMenu=this._dropdown._inlineViewRef,this.addBs4Polyfills(),this._inlinedMenu&&this._renderer.addClass(this._inlinedMenu.rootNodes[0].parentNode,"open"),this.playAnimation()}).catch(),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),this._state.isOpenChange.emit(!0),this.playAnimation();return}this._state.dropdownMenu.then(e=>{let i=this.dropup||typeof this.dropup<"u"&&this.dropup;this._state.direction=i?"up":"down";let n=this.placement||(i?"top start":"bottom start");this._dropdown.attach(q).to(this.container).position({attachment:n}).show({content:e.templateRef,placement:n}),this._state.isOpenChange.emit(!0)}).catch()}}hide(){this.isOpen&&(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))}toggle(e){return this.isOpen||!e?this.hide():this.show()}_contains(e){return this._elementRef.nativeElement.contains(e.target)||this._dropdown.instance&&this._dropdown.instance._contains(e.target)}navigationClick(e){let i=this._elementRef.nativeElement.querySelector(".dropdown-menu");if(!i)return;let n=this._elementRef.nativeElement.ownerDocument.activeElement,d=i.querySelectorAll(".dropdown-item");switch(e.keyCode){case 38:this._state.counts>0&&d[--this._state.counts].focus();break;case 40:this._state.counts+1<d.length&&(n.classList!==d[this._state.counts].classList?d[this._state.counts].focus():d[++this._state.counts].focus());break;default:}e.preventDefault()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._dropdown.dispose()}addBs4Polyfills(){this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles()}playAnimation(){this._state.isAnimated&&this._inlinedMenu&&setTimeout(()=>{this._inlinedMenu&&this._factoryDropDownAnimation.create(this._inlinedMenu.rootNodes[0]).play()})}addShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")}removeShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")}checkRightAlignment(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){let e=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right")||this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-end");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",e?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",e?"0":"auto")}}addDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"bottom","auto"))}removeDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"bottom"))}};t.\u0275fac=function(i){return new(i||t)(o(l),o(p),o(g),o(_),o(c),o(B),o(b))},t.\u0275dir=u({type:t,selectors:[["","bsDropdown",""],["","dropdown",""]],hostVars:6,hostBindings:function(i,n){i&1&&w("keydown.arrowDown",function(a){return n.navigationClick(a)})("keydown.arrowUp",function(a){return n.navigationClick(a)}),i&2&&C("dropup",n.dropup)("open",n.isOpen)("show",n.isOpen)},inputs:{placement:"placement",triggers:"triggers",container:"container",dropup:"dropup",autoClose:"autoClose",isAnimated:"isAnimated",insideClick:"insideClick",isDisabled:"isDisabled",isOpen:"isOpen"},outputs:{isOpenChange:"isOpenChange",onShown:"onShown",onHidden:"onHidden"},exportAs:["bs-dropdown"],features:[E([c,_,B])]});let s=t;return s})(),ae=(()=>{let t=class t{constructor(e,i,n){e.resolveDropdownMenu({templateRef:n,viewContainer:i})}};t.\u0275fac=function(i){return new(i||t)(o(c),o(g),o(k))},t.\u0275dir=u({type:t,selectors:[["","bsDropdownMenu",""],["","dropdownMenu",""]],exportAs:["bs-dropdown-menu"]});let s=t;return s})(),he=(()=>{let t=class t{constructor(e,i,n,d,a){this._changeDetectorRef=e,this._dropdown=i,this._element=n,this._renderer=d,this._state=a,this.isOpen=!1,this._subscriptions=[],this._subscriptions.push(this._state.isOpenChange.subscribe(h=>{this.isOpen=h,h?(this._documentClickListener=this._renderer.listen("document","click",r=>{this._state.autoClose&&r.button!==2&&!this._element.nativeElement.contains(r.target)&&!(this._state.insideClick&&this._dropdown._contains(r))&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())}),this._escKeyUpListener=this._renderer.listen(this._element.nativeElement,"keyup.esc",()=>{this._state.autoClose&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())})):(this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener())})),this._subscriptions.push(this._state.isDisabledChange.subscribe(h=>this.isDisabled=h||void 0))}onClick(e){this._state.stopOnClickPropagation&&e.stopPropagation(),!this.isDisabled&&this._state.toggleClick.emit(!0)}ngOnDestroy(){this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener();for(let e of this._subscriptions)e.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(v),o(Y),o(l),o(p),o(c))},t.\u0275dir=u({type:t,selectors:[["","bsDropdownToggle",""],["","dropdownToggle",""]],hostVars:3,hostBindings:function(i,n){i&1&&w("click",function(a){return n.onClick(a)}),i&2&&A("aria-haspopup",!0)("disabled",n.isDisabled)("aria-expanded",n.isOpen)},exportAs:["bs-dropdown-toggle"]});let s=t;return s})(),ce=(()=>{let t=class t{static forRoot(){return{ngModule:t,providers:[]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=O({type:t}),t.\u0275inj=M({});let s=t;return s})();export{Y as a,ae as b,he as c,ce as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m1}from"./chunk-GLAK4VQT.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-GW5AVRYT.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-BOIXDTUT.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-QKELW3MH.js";import{a as f1,d as Et,g as ct}from"./chunk-2PQGH3LQ.js";import{f as Xt}from"./chunk-6HV65OKG.js";import{Aa as Yn,Ab as t1,Ba as Xn,Hb as Yt,Ib as W,Ja as nt,Jb as st,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,mb as at,nb as Z,ob as Me,qb as Zn,xb as U,yb as e1,za as Kn}from"./chunk-55WOZ7P6.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-J6YSVODR.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-JQOMI5VI.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t}(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t}(w||{}),le=function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t}(le||{}),oi=function(){function t(e){this.cause=e}return t}();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e}(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t}();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Pi=!0,o2=!1,v=function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)}();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
|
|
1
|
+
import{a as m1}from"./chunk-ZYXAII5S.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-LK3ILZP5.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-IKNQ6PPM.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-T5R64VS4.js";import{a as f1,d as Et,g as ct}from"./chunk-V5OITZAT.js";import{f as Xt}from"./chunk-FSDIOBH6.js";import{Aa as Yn,Ab as t1,Ba as Xn,Hb as Yt,Ib as W,Ja as nt,Jb as st,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,mb as at,nb as Z,ob as Me,qb as Zn,xb as U,yb as e1,za as Kn}from"./chunk-SGDMUCQ7.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-J6YSVODR.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-JQOMI5VI.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t}(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t}(w||{}),le=function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t}(le||{}),oi=function(){function t(e){this.cause=e}return t}();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e}(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t}();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Pi=!0,o2=!1,v=function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)}();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
|
|
2
2
|
/*
|
|
3
3
|
Tracing '`+t.name+`'
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ct}from"./chunk-2OSA27SE.js";import{a as gt,b as R,c as vt}from"./chunk-ZEZVOO4G.js";import{a as Q,b as Fe,c as ot,e as oe}from"./chunk-YQGJX5R7.js";import{a as ht}from"./chunk-ZJDBESQA.js";import{d as be}from"./chunk-ESSY62VJ.js";import"./chunk-JXZCNFW7.js";import{a as _t}from"./chunk-GW5AVRYT.js";import{a as ne,b as xe,c as Se,d as we,f as Te,i as Ae}from"./chunk-BOIXDTUT.js";import{a as ke,b as Ie,c as ut,d as ft}from"./chunk-AS7H5UIO.js";import{a as K,b as ye}from"./chunk-MLLPT7BU.js";import"./chunk-W4LKCEBR.js";import{g as dt}from"./chunk-6HV65OKG.js";import{K as it,L as X,N as nt,R as ve,Xa as pt,pa as at,qa as rt,ra as st,ua as lt,v as qe,va as mt,wa as ct,xb as z}from"./chunk-55WOZ7P6.js";import{b as Re,d as Le}from"./chunk-J6YSVODR.js";import{$a as Pe,$c as Z,Ad as $e,Bf as Ze,Cb as f,Eb as p,Ed as ie,Ee as Ke,Fc as pe,Fd as G,Ga as J,Gc as Ge,Gd as je,Ge as Ce,Ib as re,If as et,Jb as se,Kb as le,L as W,Ma as r,Mb as De,Nb as E,Ob as U,Pb as m,Pf as he,Qb as v,Qd as He,Rb as A,Sb as O,Ue as We,Uf as tt,Xa as N,Xb as P,Yb as Me,Zc as M,_a as me,ab as k,ad as de,ae as Qe,bb as ce,bf as Xe,cd as F,dc as h,ec as w,ed as B,fc as D,fd as $,gd as ee,ha as S,id as y,jb as g,jd as Oe,kb as C,lb as Y,ma as b,na as x,nb as I,nd as q,ob as V,od as te,pb as c,pd as ue,pe as ze,qb as n,qd as fe,rb as o,rd as _e,sb as u,wd as Be,wf as Je,xd as j,xe as ge,yd as H,zb as L,zf as Ye}from"./chunk-JQOMI5VI.js";import"./chunk-RTRJ3KFH.js";function Tt(e,a){if(e&1&&(u(0,"fa-icon",42),n(1,"span"),m(2),o()),e&2){let i=p();c("icon",i.icons.faPen),r(2),v(i.guest.fullName)}}function At(e,a){if(e&1&&(u(0,"fa-icon",42),n(1,"span",43),m(2,"New guest"),o()),e&2){let i=p();c("icon",i.icons.faPlus)}}function Et(e,a){if(e&1&&u(0,"fa-icon",2),e&2){let i=p();c("icon",i.icons.faSpinner)}}function Ut(e,a){e&1&&(n(0,"h4",3)(1,"span",43),m(2,"Edit guest"),o()())}function Dt(e,a){if(e&1&&(u(0,"fa-icon",44),n(1,"span",45),m(2,"Account"),o()),e&2){let i=p();c("icon",i.icons.faAddressCard)}}function Ft(e,a){if(e&1&&u(0,"app-password-strength-bar",22),e&2){let i=p();c("passwordToCheck",i.guestForm.value.password)}}function kt(e,a){if(e&1&&(n(0,"option",26),m(1),o()),e&2){let i=a.$implicit;c("ngValue",i),r(),v(i)}}function It(e,a){if(e&1&&(n(0,"option",34),m(1),o()),e&2){let i=a.$implicit,s=p();c("ngValue",s.allNotifications.indexOf(i)),r(),v(i)}}function Vt(e,a){if(e&1&&(n(0,"div"),m(1),h(2,"amDateFormat"),o(),n(3,"div"),m(4),h(5,"amDateFormat"),o()),e&2){let i=p(2);r(),O("",w(2,4,i.guest.currentAccess)," - ",i.guest.currentIp),r(3),O("",w(5,6,i.guest.lastAccess)," - ",i.guest.lastIp)}}function Nt(e,a){e&1&&(n(0,"span",37),m(1,"never"),o())}function Pt(e,a){if(e&1&&(n(0,"div",11)(1,"div",12)(2,"label",46),m(3,"Creation date"),o(),n(4,"div",47),m(5),h(6,"amDateFormat"),o()(),n(7,"div",48)(8,"label",49),m(9,"Last accesses"),o(),n(10,"div",50),g(11,Vt,6,8)(12,Nt,2,0,"span",37),o()()()),e&2){let i=p();r(5),v(w(6,2,i.guest.createdAt)),r(6),C(i.guest.lastAccess?11:12)}}function Mt(e,a){if(e&1&&(u(0,"fa-icon",44),n(1,"span",51),m(2,"Managers"),o(),n(3,"span"),m(4),o()),e&2){let i=p();c("icon",i.icons.faUsersGear),r(4),A("(",i.guestForm.value.managers.length||0,")")}}function Gt(e,a){e&1&&(n(0,"small",37),m(1,"At least one manager is required"),o())}function Rt(e,a){if(e&1){let i=L();n(0,"button",52),f("click",function(){b(i);let l=p();return x(l.confirmDeletion=!0)}),m(1," Remove "),o()}if(e&2){let i=p();c("disabled",i.confirmDeletion)}}var Ve=(()=>{let a=class a extends Ct{constructor(){super(),this.adminService=S(R)}searchMembers(s){let l={search:s,ignoreUserIds:this.guestForm.value.managers.map(t=>t.id),usersRole:X.USER,onlyUsers:!0};return this.adminService.searchMembers(l)}onSubmit(){if(this.submitted=!0,this.confirmDeletion)this.adminService.deleteUser(this.guest.id,null,!0).subscribe({next:()=>{this.guestChange.emit(["delete",this.guest]),this.layout.sendNotification("success","Guest deleted",this.guest.login),this.layout.closeDialog()},error:s=>this.onError(s)});else if(!this.guest)this.adminService.createUser(this.makeDto(!0),!0).subscribe({next:s=>{this.guestChange.emit(["add",s]),this.layout.sendNotification("success","Guest created",this.guestForm.value.login),this.layout.closeDialog()},error:s=>this.onError(s)});else{let s=this.makeDto();if(!Object.keys(s).length){this.loading=!1,this.submitted=!1;return}this.adminService.updateUser(this.guest.id,s,!0).subscribe({next:l=>{l?this.guestChange.emit(["update",l]):this.guestChange.emit(["delete",this.guest]),this.layout.sendNotification("success","Guest updated",this.guestForm.value.login),this.layout.closeDialog()},error:l=>this.onError(l)})}}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-guest-dialog"]],features:[Pe],decls:70,vars:40,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","login","l10nTranslate",""],["id","login","appAutofocus","","formControlName","login","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","email","l10nTranslate",""],["id","email","formControlName","email","autocomplete","off","type","email",1,"form-control","form-control-sm"],["for","firstName","l10nTranslate",""],["id","firstName","formControlName","firstName","autocomplete","off","type","text",1,"form-control","form-control-sm"],["for","lastName","l10nTranslate",""],["id","lastName","formControlName","lastName","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"position-absolute","pe-4",2,"right","50%","padding-top","6px",3,"passwordToCheck"],["id","password","placeholder","Set a password",3,"passwordChange","password","showGenerator","showLabel","isRequired"],["for","language","l10nTranslate",""],["id","language","formControlName","language",1,"form-control","form-select","form-select-sm"],[3,"ngValue"],[1,"d-flex","flex-column","col-6","pe-4"],["for","account","l10nTranslate",""],["id","account",1,"form-check","form-switch","form-check-inline"],["for","isActive",1,"form-check-label"],["formControlName","isActive","id","isActive","type","checkbox",1,"form-check-input"],["for","notification","l10nTranslate",""],["id","notification","formControlName","notification",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],["l10nTranslate","",1,"text-danger"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"me-2",3,"icon"],["l10nTranslate",""],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","access","l10nTranslate",""],["id","access",1,"text-align-end"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),g(2,Tt,3,2)(3,At,3,1),g(4,Et,1,1,"fa-icon",2),o(),g(5,Ut,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.layout.closeDialog()}),o()(),n(7,"div",5)(8,"tabset",6),u(9,"hr",7),n(10,"tab",8),f("selectTab",function(){return t.tabView=null}),k(11,Dt,3,1,"ng-template",9),n(12,"div",10)(13,"div",11)(14,"div",12)(15,"label",13),m(16,"Login"),o(),u(17,"input",14),o(),n(18,"div",15)(19,"label",16),m(20,"Email"),o(),u(21,"input",17),o()(),n(22,"div",11)(23,"div",12)(24,"label",18),m(25,"First name"),o(),u(26,"input",19),o(),n(27,"div",15)(28,"label",20),m(29,"Last name"),o(),u(30,"input",21),o()(),n(31,"div",11)(32,"div",12),g(33,Ft,1,1,"app-password-strength-bar",22),n(34,"app-input-password",23),f("passwordChange",function(_){return t.updatePassword(_)}),o()(),n(35,"div",15)(36,"label",24),m(37,"Language"),o(),n(38,"select",25),I(39,kt,2,2,"option",26,Y),o()()(),n(41,"div",11)(42,"div",27)(43,"label",28),m(44,"Account status"),o(),n(45,"div",29)(46,"label",30),u(47,"input",31),n(48,"span"),m(49),h(50,"translate"),h(51,"titlecase"),o()()()(),n(52,"div",15)(53,"label",32),m(54,"Notification"),o(),n(55,"select",33),I(56,It,2,2,"option",34,Y),o()()(),g(58,Pt,13,4,"div",11),o()(),n(59,"tab",35),f("selectTab",function(){return t.tabView="managers"}),k(60,Mt,5,2,"ng-template",9),n(61,"div",7)(62,"app-user-search",36),f("membersChange",function(_){return t.updateManagers(_)}),o(),g(63,Gt,2,0,"small",37),o()()()(),n(64,"div",38),g(65,Rt,2,1,"button",39),n(66,"button",40),f("click",function(){return t.onCancel()}),m(67,"Cancel"),o(),n(68,"button",41),f("click",function(){return t.onSubmit()}),m(69),o()()),l&2&&(r(2),C(t.guest?2:3),r(2),C(t.loading?4:-1),r(),C(t.guest?5:-1),r(),U(P("btn-close btn-close-white ",t.guest?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.guestForm),r(),c("justified",!0),r(9),E("is-invalid",t.guestForm.controls.login.invalid),c("autoSelect",!1),r(4),E("is-invalid",t.guestForm.controls.email.invalid),r(5),E("is-invalid",t.guestForm.controls.firstName.invalid),r(7),C(t.guestForm.value.password!==t.defaultPassword?33:-1),r(),c("password",t.guestForm.value.password)("showGenerator",!0)("showLabel",!0)("isRequired",!0),r(5),V(t.languages),r(9),E("text-danger",!t.guestForm.value.isActive),r(),A(" ",w(51,38,D(50,35,t.guestForm.value.isActive?"active":"suspended",t.locale.language))," "),r(7),V(t.allNotifications),r(2),C(t.guest?58:-1),r(4),c("members",t.guestForm.value.managers)("withPermissions",!1)("customPlaceholder","Type to search for managers to add")("searchFunction",t.searchMembers.bind(t)),r(),C(t.guestForm.value.managers.length?-1:63),r(2),C(t.guest!=null&&t.guest.id?65:-1),r(3),U(P("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),c("disabled",t.guestForm.invalid||t.submitted),r(),A(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[M,G,j,fe,_e,de,Z,ue,B,$,q,te,K,ye,Te,Ae,xe,Se,we,ne,ie,pe],encapsulation:2});let e=a;return e})();function Ot(e,a){e&1&&(n(0,"h4",3)(1,"span",13),m(2,"Impersonate identity"),o()())}var bt=(()=>{let a=class a{constructor(){this.locale=S(H),this.layout=S(z),this.submitted=!1,this.icons={faUserSecret:he},this.passwordMinLength=8,this.impersonateUserForm=new ee({password:new y("",F.required)}),this.adminService=S(R)}onSubmit(){this.submitted=!0,this.adminService.impersonateUser(this.user.id,{password:this.impersonateUserForm.value.password}).subscribe({next:s=>{this.layout.closeDialog(),setTimeout(()=>this.adminService.initImpersonateUser(s),500)},error:s=>{this.submitted=!1,this.layout.sendNotification("error","Impersonate identity",this.user.login,s)}})}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-impersonate-user-dialog"]],inputs:{user:"user"},decls:19,vars:16,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],[1,"d-flex","align-items-center","avatar","mb-3"],["alt","",1,"avatar-img",3,"src"],[1,"fw-bold","mx-2"],["id","password","placeholder","Enter your password to confirm",3,"passwordChange","password","passwordMinLength","isRequired","focus"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["l10nTranslate",""]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),n(3,"span"),m(4),o()(),g(5,Ot,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.layout.closeDialog()}),o()(),n(7,"div",5)(8,"div",6),u(9,"img",7),n(10,"span",8),m(11),h(12,"capitalize"),o()(),n(13,"app-input-password",9),f("passwordChange",function(_){return t.impersonateUserForm.controls.password.setValue(_)}),o()(),n(14,"div",10)(15,"button",11),f("click",function(){return t.layout.closeDialog()}),m(16,"Cancel"),o(),n(17,"button",12),f("click",function(){return t.onSubmit()}),m(18," Confirm "),o()()),l&2&&(r(2),c("icon",t.icons.faUserSecret),r(2),v(t.user.fullName),r(),C(t.user?5:-1),r(),U(P("btn-close btn-close-white ",t.user?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.impersonateUserForm),r(2),c("src",t.user.avatarUrl,J),r(2),v(w(12,14,t.user.login)),r(2),c("password",t.impersonateUserForm.value.password)("passwordMinLength",t.passwordMinLength)("isRequired",!0)("focus",!0),r(4),c("disabled",t.impersonateUserForm.invalid||t.submitted))},dependencies:[M,G,j,$,q,K,oe],encapsulation:2});let e=a;return e})();var xt=(()=>{let a=class a{constructor(){this.translate=S($e)}transform(s,l=!1,t=null,d=", "){return s.length?(t?s.map(T=>T[t]):s.concat()).sort().map(T=>new oe().transform(l?this.translate.translate(T):T)).join(d):""}};a.\u0275fac=function(l){return new(l||a)},a.\u0275pipe=me({name:"join",type:a,pure:!0});let e=a;return e})();var St=(()=>{let a=class a{transform(s,l=","){return s?.length?s.split(l):[]}};a.\u0275fac=function(l){return new(l||a)},a.\u0275pipe=me({name:"split",type:a,pure:!0});let e=a;return e})();function Bt(e,a){e&1&&(n(0,"h4",3)(1,"span",9),m(2,"Delete user"),o()())}var wt=(()=>{let a=class a{constructor(){this.wasDeleted=new ce,this.locale=S(H),this.submitted=!1,this.icons={faUserMinus:Je},this.deleteUserForm=new ee({adminPassword:new y("",F.required),deleteSpace:new y(!1)}),this.layout=S(z),this.adminService=S(R)}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.adminService.deleteUser(this.user.id,{adminPassword:this.deleteUserForm.value.adminPassword,deleteSpace:this.deleteUserForm.value.deleteSpace}).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success","Delete user",this.user.login),this.onClose()},error:s=>{this.submitted=!1,this.layout.sendNotification("error","Delete user",this.user.login,s)}})}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-user-delete-dialog"]],inputs:{user:"user"},outputs:{wasDeleted:"wasDeleted"},decls:27,vars:15,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],[1,"d-flex","align-items-center","avatar","mb-3"],["alt","",1,"avatar-img",3,"src"],[1,"fw-bold","mx-2"],["l10nTranslate",""],["id","password","placeholder","Enter your password to confirm",3,"passwordChange","password","isRequired","focus"],[1,"form-check","form-check-inline","mt-3"],[1,"d-flex"],["for","deleteSpace",1,"form-check-label"],["formControlName","deleteSpace","id","deleteSpace","type","checkbox",1,"form-check-input"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),n(3,"span"),m(4),o()(),g(5,Bt,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.onClose()}),o()(),n(7,"div",5)(8,"div",6),u(9,"img",7),n(10,"span",8),m(11),h(12,"capitalize"),o(),n(13,"span",9),m(14,"will be permanently removed"),o()(),n(15,"app-input-password",10),f("passwordChange",function(_){return t.deleteUserForm.controls.adminPassword.setValue(_)}),o(),n(16,"div",11)(17,"div",12)(18,"label",13),u(19,"input",14),n(20,"span",9),m(21,"Delete all user files"),o()()()()(),n(22,"div",15)(23,"button",16),f("click",function(){return t.onClose()}),m(24,"Cancel"),o(),n(25,"button",17),f("click",function(){return t.onSubmit()}),m(26," Confirm "),o()()),l&2&&(r(2),c("icon",t.icons.faUserMinus),r(2),v(t.user.fullName),r(),C(t.user?5:-1),r(),U(P("btn-close btn-close-white ",t.user?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.deleteUserForm),r(2),c("src",t.user.avatarUrl,J),r(2),v(w(12,13,t.user.login)),r(4),c("password",t.deleteUserForm.value.adminPassword)("isRequired",!0)("focus",!0),r(10),c("disabled",t.deleteUserForm.invalid||t.submitted))},dependencies:[M,G,j,Z,B,$,q,te,K,oe],encapsulation:2});let e=a;return e})();var $t=(e,a)=>a.id;function qt(e,a){if(e&1&&(u(0,"fa-icon",47),n(1,"span"),m(2),o()),e&2){let i=p();c("icon",i.icons.faUserPen),r(2),v(i.user.fullName)}}function jt(e,a){if(e&1&&(u(0,"fa-icon",47),n(1,"span",40),m(2,"New user"),o()),e&2){let i=p();c("icon",i.icons.faUserPlus)}}function Ht(e,a){if(e&1&&u(0,"fa-icon",2),e&2){let i=p();c("icon",i.icons.faSpinner)}}function Qt(e,a){e&1&&(n(0,"h4",3)(1,"span",40),m(2,"Edit user"),o()())}function zt(e,a){if(e&1&&(u(0,"fa-icon",48),n(1,"span",49),m(2,"Account"),o()),e&2){let i=p();c("icon",i.icons.faAddressCard)}}function Kt(e,a){if(e&1&&u(0,"app-password-strength-bar",22),e&2){let i=p();c("passwordToCheck",i.userForm.value.password)}}function Wt(e,a){if(e&1&&(n(0,"option",26),m(1),o()),e&2){let i=a.$implicit;c("ngValue",i),r(),v(i)}}function Xt(e,a){if(e&1&&(n(0,"option",30),m(1),o()),e&2){let i=a.$implicit,s=p();c("ngValue",s.allNotifications.indexOf(i)),r(),v(i)}}function Jt(e,a){if(e&1&&(n(0,"div",11)(1,"div",12)(2,"label",50),m(3,"Storage Usage"),o(),u(4,"app-storage-usage",51),o(),u(5,"div",15),o()),e&2){let i=p();r(4),c("item",i.user)}}function Yt(e,a){if(e&1&&(n(0,"div"),m(1),h(2,"amDateFormat"),o(),n(3,"div"),m(4),h(5,"amDateFormat"),o()),e&2){let i=p(2);r(),O("",w(2,4,i.user.currentAccess)," - ",i.user.currentIp),r(3),O("",w(5,6,i.user.lastAccess)," - ",i.user.lastIp)}}function Zt(e,a){e&1&&(n(0,"span",57),m(1,"never"),o())}function ei(e,a){if(e&1&&(n(0,"div",11)(1,"div",12)(2,"label",52),m(3,"Creation date"),o(),n(4,"div",53),m(5),h(6,"amDateFormat"),o()(),n(7,"div",54)(8,"label",55),m(9,"Last accesses"),o(),n(10,"div",56),g(11,Yt,6,8)(12,Zt,2,0,"span",57),o()()()),e&2){let i=p();r(5),v(w(6,2,i.user.createdAt)),r(6),C(i.user.lastAccess?11:12)}}function ti(e,a){if(e&1&&(u(0,"fa-icon",48),n(1,"span",49),m(2,"Permissions"),o()),e&2){let i=p();c("icon",i.icons.faShieldHalved)}}function ii(e,a){if(e&1&&(n(0,"div",60)(1,"div",61),u(2,"fa-icon",62),n(3,"span"),m(4),o()(),n(5,"div",63),m(6),h(7,"split"),h(8,"join"),o()()),e&2){let i=p().$implicit,s=p(2);r(2),c("icon",s.icons.GROUPS),r(2),v(i.name),r(2),v(D(8,5,w(7,3,i.permissions),!0))}}function ni(e,a){if(e&1&&g(0,ii,9,8,"div",60),e&2){let i=a.$implicit;C(i.permissions?0:-1)}}function oi(e,a){if(e&1&&(n(0,"div",32)(1,"label",58),m(2,"Permissions inherited from groups"),o(),n(3,"div",59),I(4,ni,1,1,null,null,$t),o()()),e&2){let i=p();r(4),V(i.userForm.value.groups)}}function ai(e,a){if(e&1&&(u(0,"fa-icon",48),n(1,"span",64),m(2,"Groups"),o(),n(3,"span"),m(4),o()),e&2){let i=p();c("icon",i.icons.faUsers),r(4),A("(",i.userForm.value.groups.length||0,")")}}function ri(e,a){if(e&1){let i=L();n(0,"button",65),f("click",function(){b(i);let l=p();return x(l.confirmDeletion=!0)}),m(1," Remove "),o()}if(e&2){let i=p();c("disabled",i.confirmDeletion)}}var Ne=(()=>{let a=class a{constructor(){this.user=null,this.userChange=new ce,this.locale=S(H),this.layout=S(z),this.submitted=!1,this.loading=!1,this.confirmDeletion=!1,this.icons={GROUPS:lt.GROUPS,faUserPlus:Ce,faUserPen:ge,faSpinner:Xe,faAddressCard:Ke,faUsers:ze,faShieldHalved:Ze},this.allNotifications=Object.values(ve),this.defaultPassword=this.layout.translateString(mt),this.languages=this.layout.getLanguages(!0),this.adminService=S(R)}ngOnInit(){this.userForm=new ee({login:new y(this.user?.login||"",[F.required,F.pattern(it)]),email:new y(this.user?.email||"",[F.required,F.maxLength(255),F.email]),firstName:new y(this.user?.firstName||"",[F.required,F.maxLength(255)]),lastName:new y(this.user?.lastName||"",F.maxLength(255)),password:new y(this.user?this.defaultPassword:"",F.maxLength(255)),language:new y(this.user?.language||null),notification:new y(this.user?.notification||Object.values(ve).indexOf(ve.APPLICATION_EMAIL)),isActive:new y(this.user?this.user.isActive:!0),isAdmin:new y(this.user?this.user.isAdmin:!1),storageQuota:new y(this.user?.storageQuota||null),groups:new y(this.user?.groups||[]),applications:new y(this.user?.applications||[])})}searchMembers(s){let l={search:s,onlyGroups:!0,excludePersonalGroups:!0,withPermissions:!0,ignoreGroupIds:this.userForm.value.groups.map(t=>t.id)};return this.adminService.searchMembers(l)}updateApplications(s){this.userForm.controls.applications.setValue(s),this.userForm.controls.applications.markAsDirty()}updatePassword(s){this.userForm.controls.password.setValue(s),this.userForm.controls.password.markAsDirty()}updateMembers(s){this.userForm.controls.groups.setValue(s),this.userForm.controls.groups.markAsDirty()}updateQuota(s){this.userForm.controls.storageQuota.setValue(s),this.userForm.controls.storageQuota.markAsDirty()}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.confirmDeletion?this.layout.openDialog(wt,"sm",{initialState:{user:this.user}}).content.wasDeleted.pipe(W(1)).subscribe(l=>{l?(this.userChange.emit(["delete",this.user]),this.layout.closeDialog()):(this.confirmDeletion=!1,this.submitted=!1)}):this.user?this.adminService.updateUser(this.user.id,this.makeDto()).subscribe({next:s=>{this.userChange.emit(["update",s]),this.layout.sendNotification("success","User updated",this.userForm.value.login),this.layout.closeDialog()},error:s=>this.onError(s)}):this.adminService.createUser(this.makeDto(!0)).subscribe({next:s=>{this.userChange.emit(["add",s]),this.layout.sendNotification("success","User created",this.userForm.value.login),this.layout.closeDialog()},error:s=>this.onError(s)})}makeDto(s=!1){let l={};if(s)l=this.userForm.value;else for(let t in this.userForm.controls)this.userForm.controls[t].dirty&&(l[t]=this.userForm.controls[t].value);for(let t in l)switch(t){case"language":l[t]=l[t]===ct?null:l[t];break;case"isAdmin":l.role=l[t]?X.ADMINISTRATOR:X.USER;break;case"applications":l.permissions=l[t].join(nt);break;case"groups":l[t]=l[t].map(d=>d.id);break}return l}onError(s){this.layout.sendNotification("error","Group error",this.userForm.value.login,s),this.submitted=!1}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-user-dialog"]],inputs:{user:"user"},outputs:{userChange:"userChange"},decls:82,vars:44,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","login","l10nTranslate",""],["id","login","appAutofocus","","formControlName","login","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","email","l10nTranslate",""],["id","email","formControlName","email","autocomplete","off","type","email",1,"form-control","form-control-sm"],["for","firstName","l10nTranslate",""],["id","firstName","formControlName","firstName","autocomplete","off","type","text",1,"form-control","form-control-sm"],["for","lastName","l10nTranslate",""],["id","lastName","formControlName","lastName","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"position-absolute","pe-4",2,"right","50%","padding-top","6px",3,"passwordToCheck"],["id","password","placeholder","Set a password",3,"passwordChange","password","showGenerator","showLabel","isRequired"],["for","language","l10nTranslate",""],["id","language","formControlName","language",1,"form-control","form-select","form-select-sm"],[3,"ngValue"],[3,"quotaChange","quota","fullWidth"],["for","notification","l10nTranslate",""],["id","notification","formControlName","notification",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],["customClass","tab-dialog",3,"selectTab"],[1,"d-flex","flex-column","col-12","pb-3"],["for","account","l10nTranslate",""],["id","account",1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],["for","isActive",1,"form-check-label"],["formControlName","isActive","id","isActive","type","checkbox",1,"form-check-input"],["for","isAdmin",1,"form-check-label"],["formControlName","isAdmin","id","isAdmin","type","checkbox",1,"form-check-input"],["l10nTranslate",""],[3,"permissionsChange","permissions"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"me-2",3,"icon"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","access","l10nTranslate",""],["id","access",1,"text-align-end"],["l10nTranslate","",1,"text-danger"],["for","groups_permissions","l10nTranslate",""],["id","groups_permissions"],[1,"d-flex","align-items-center","mb-1"],[1,"d-flex","align-items-center","me-5"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","fs-xxs","ms-auto"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),g(2,qt,3,2)(3,jt,3,1),g(4,Ht,1,1,"fa-icon",2),o(),g(5,Qt,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.layout.closeDialog()}),o()(),n(7,"div",5)(8,"tabset",6),u(9,"hr",7),n(10,"tab",8),f("selectTab",function(){return t.tabView=null}),k(11,zt,3,1,"ng-template",9),n(12,"div",10)(13,"div",11)(14,"div",12)(15,"label",13),m(16,"Login"),o(),u(17,"input",14),o(),n(18,"div",15)(19,"label",16),m(20,"Email"),o(),u(21,"input",17),o()(),n(22,"div",11)(23,"div",12)(24,"label",18),m(25,"First name"),o(),u(26,"input",19),o(),n(27,"div",15)(28,"label",20),m(29,"Last name"),o(),u(30,"input",21),o()(),n(31,"div",11)(32,"div",12),g(33,Kt,1,1,"app-password-strength-bar",22),n(34,"app-input-password",23),f("passwordChange",function(_){return t.updatePassword(_)}),o()(),n(35,"div",15)(36,"label",24),m(37,"Language"),o(),n(38,"select",25),I(39,Wt,2,2,"option",26,Y),o()()(),n(41,"div",11)(42,"div",12)(43,"app-storage-quota",27),f("quotaChange",function(_){return t.updateQuota(_)}),o()(),n(44,"div",15)(45,"label",28),m(46,"Notification"),o(),n(47,"select",29),I(48,Xt,2,2,"option",30,Y),o()()(),g(50,Jt,6,1,"div",11),o(),g(51,ei,13,4,"div",11),o(),n(52,"tab",31),f("selectTab",function(){return t.tabView="permissions"}),k(53,ti,3,1,"ng-template",9),n(54,"div",32)(55,"label",33),m(56,"Account status"),o(),n(57,"div",34)(58,"div",35)(59,"label",36),u(60,"input",37),n(61,"span"),m(62),h(63,"translate"),h(64,"titlecase"),o()()(),n(65,"div",35)(66,"label",38),u(67,"input",39),n(68,"span",40),m(69,"Administrator"),o()()()()(),n(70,"app-admin-permissions",41),f("permissionsChange",function(_){return t.updateApplications(_)}),o(),g(71,oi,6,0,"div",32),o(),n(72,"tab",31),f("selectTab",function(){return t.tabView="groups"}),k(73,ai,5,2,"ng-template",9),n(74,"div",7)(75,"app-user-search",42),f("membersChange",function(_){return t.updateMembers(_)}),o()()()()(),n(76,"div",43),g(77,ri,2,1,"button",44),n(78,"button",45),f("click",function(){return t.onCancel()}),m(79,"Cancel"),o(),n(80,"button",46),f("click",function(){return t.onSubmit()}),m(81),o()()),l&2&&(r(2),C(t.user?2:3),r(2),C(t.loading?4:-1),r(),C(t.user?5:-1),r(),U(P("btn-close btn-close-white ",t.user?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.userForm),r(),c("justified",!0),r(9),E("is-invalid",t.userForm.controls.login.invalid),c("autoSelect",!1),r(4),E("is-invalid",t.userForm.controls.email.invalid),r(5),E("is-invalid",t.userForm.controls.firstName.invalid),r(7),C(t.userForm.value.password!==t.defaultPassword?33:-1),r(),c("password",t.userForm.value.password)("showGenerator",!0)("showLabel",!0)("isRequired",!0),r(5),V(t.languages),r(4),c("quota",t.userForm.value.storageQuota)("fullWidth",!0),r(5),V(t.allNotifications),r(2),C(t.user&&t.user.storageUsage?50:-1),r(),C(t.user?51:-1),r(10),E("text-danger",!t.userForm.value.isActive),r(),A(" ",w(64,42,D(63,39,t.userForm.value.isActive?"active":"suspended",t.locale.language))," "),r(8),c("permissions",t.userForm.value.applications),r(),C(t.userForm.value.groups.length?71:-1),r(4),c("members",t.userForm.value.groups)("withPermissions",!1)("customPlaceholder","Type to search for groups to add")("searchFunction",t.searchMembers.bind(t)),r(2),C(t.user!=null&&t.user.id?77:-1),r(3),U(P("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),c("disabled",t.userForm.invalid||t.submitted),r(),A(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[M,G,Se,we,xe,j,fe,_e,de,Z,ue,B,$,q,te,K,ye,be,ht,Ae,Te,vt,pe,ie,St,xt,ne],encapsulation:2});let e=a;return e})();var si=["MainContextMenu"],li=["TargetContextMenu"],yt=(e,a)=>a.key,mi=(e,a)=>a.id,ci=(e,a)=>a.mid;function pi(e,a){if(e&1&&u(0,"fa-icon",24),e&2){let i=p(3);c("icon",i.sortTable.sortParam.asc?i.icons.faArrowDown:i.icons.faArrowUp)("fixedWidth",!1)}}function di(e,a){if(e&1){let i=L();n(0,"th",23),f("click",function(){b(i);let l=p().$implicit,t=p();return x(t.sortBy(l.key))}),m(1),g(2,pi,1,2,"fa-icon",24),o()}if(e&2){let i=p().$implicit,s=p();U(i.value.class),De("width",i.value.width,"%"),E("text-align-center",i.value.textCenter)("cursor-pointer",i.value.sortable),r(),A(" ",i.value.label," "),r(),C(s.sortTable.sortParam.column===i.key?2:-1)}}function ui(e,a){if(e&1&&g(0,di,3,10,"th",22),e&2){let i=a.$implicit;C(i.value.show?0:-1)}}function fi(e,a){if(e&1&&u(0,"fa-icon",32),e&2){let i=p(5);c("icon",i.icons.faKey)}}function _i(e,a){if(e&1&&(n(0,"div",27),u(1,"img",30),n(2,"div",28)(3,"span",31),m(4),g(5,fi,1,1,"fa-icon",32),o(),n(6,"span",33),m(7),o()()()),e&2){let i=p(3).$implicit;r(),c("src",i.avatarUrl,J),r(3),A(" ",i.login," "),r(),C(i.isAdmin?5:-1),r(2),v(i.email)}}function gi(e,a){if(e&1&&(n(0,"span",34),m(1),o()),e&2){let i=p(4).$implicit;r(),v(i.userRoleText)}}function Ci(e,a){if(e&1&&(n(0,"div",28)(1,"span",31),m(2),o(),g(3,gi,2,1,"span",34),o()),e&2){let i=p(3).$implicit;r(2),v(i.fullName),r(),C(i.isAdmin?3:-1)}}function hi(e,a){if(e&1&&u(0,"app-user-avatar",35),e&2){let i=a.$implicit;c("user",i)("isMember",!0)}}function vi(e,a){if(e&1&&I(0,hi,1,2,"app-user-avatar",35,ci),e&2){let i=p(3).$implicit;V(i.managers)}}function bi(e,a){if(e&1&&u(0,"app-storage-usage",36),e&2){let i=p(4).$implicit;c("item",i)}}function xi(e,a){if(e&1&&g(0,bi,1,1,"app-storage-usage",36),e&2){let i=p(3).$implicit;C(i.storageUsage?0:-1)}}function Si(e,a){if(e&1&&(n(0,"div",28)(1,"div"),m(2),o(),n(3,"div"),m(4),o()()),e&2){let i=p(3).$implicit;r(2),v(i.currentIp),r(2),v(i.lastIp)}}function wi(e,a){e&1&&m(0," too many login attempts ")}function yi(e,a){if(e&1&&m(0),e&2){let i=p(4).$implicit;A(" ",i.userIsActiveText," ")}}function Ti(e,a){if(e&1&&(n(0,"span",11),g(1,wi,1,0)(2,yi,1,1),o()),e&2){let i=p(3).$implicit;U(i.isActive?"text-success":"text-danger"),r(),C(!i.isActive&&i.passwordAttempts?1:2)}}function Ai(e,a){if(e&1&&(n(0,"div",28)(1,"div"),m(2),h(3,"amDateFormat"),o(),n(4,"div"),m(5),h(6,"amDateFormat"),o()()),e&2){let i=p(5).$implicit;r(2),v(w(3,2,i.currentAccess)),r(3),v(w(6,4,i.lastAccess))}}function Ei(e,a){if(e&1&&m(0),e&2){let i=p(5).$implicit;A(" ",i.hTimeAgo," ")}}function Ui(e,a){if(e&1){let i=L();n(0,"div",38),f("mouseover",function(){b(i);let l=p(4).$implicit;return x(l.currentAccessHover=!0)})("focus",function(){b(i);let l=p(4).$implicit;return x(l.currentAccessHover=!0)})("mouseleave",function(){b(i);let l=p(4).$implicit;return x(l.currentAccessHover=!1)}),g(1,Ai,7,6,"div",28)(2,Ei,1,1),o()}if(e&2){let i=p(4).$implicit;r(),C(i.currentAccessHover?1:2)}}function Di(e,a){e&1&&(n(0,"span",11),m(1,"never"),o())}function Fi(e,a){if(e&1&&g(0,Ui,3,1,"div",37)(1,Di,2,0,"span",11),e&2){let i=p(3).$implicit;C(i.currentAccess?0:1)}}function ki(e,a){if(e&1&&(n(0,"td"),g(1,_i,8,4,"div",27)(2,Ci,4,2,"div",28)(3,vi,2,0)(4,xi,1,1)(5,Si,5,2,"div",28)(6,Ti,3,3,"span",29)(7,Fi,2,1),o()),e&2){let i,s=p().$implicit,l=p().$implicit;U(Me("",s.value.class," ",s.value.newly?"prop-newly-"+l[s.value.newly]:"")),De("width",s.value.width,"%"),E("text-align-center",s.value.textCenter),r(),C((i=s.key)==="login"?1:i==="fullName"?2:i==="managers"?3:i==="storage"?4:i==="currentIp"?5:i==="isActive"?6:i==="currentAccess"?7:-1)}}function Ii(e,a){if(e&1&&g(0,ki,8,9,"td",26),e&2){let i=a.$implicit;C(i.value.show?0:-1)}}function Vi(e,a){if(e&1){let i=L();n(0,"tr",25),f("click",function(){let l=b(i).$implicit,t=p();return x(t.onSelect(l))})("contextmenu",function(l){let t=b(i).$implicit,d=p();return x(d.onTargetContextMenu(l,t))})("pressup",function(l){let t=b(i).$implicit,d=p();return x(d.onTargetContextMenu(l,t))})("tap",function(){b(i);let l=p();return x(l.openDialog())}),I(1,Ii,1,1,null,null,yt),h(3,"keyvalue"),o()}if(e&2){let i=a.$implicit,s=p();E("disabled",!i.isActive)("selected",i.id===(s.selected==null?null:s.selected.id)),r(),V(D(3,4,s.tableHeaders,s.originalOrderKeyValue))}}function Ni(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2),o()),e&2){let i=p();r(),c("icon",i.icons.faUserPlus),r(),A("New ",i.guestsView?"guest":"user")}}function Pi(e,a){}function Mi(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2,"Refresh"),o()),e&2){let i=p();r(),c("icon",i.icons.faArrowRotateRight)}}function Gi(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2),o()),e&2){let i=p();r(),c("icon",i.icons.faUserPen),r(),A("Edit ",i.guestsView?"guest":"user")}}function Ri(e,a){}function Li(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2,"Impersonate identity"),o()),e&2){let i=p();r(),c("icon",i.icons.faUserSecret)}}var Lo=(()=>{let a=class a{constructor(){this.locale=S(H),this.originalOrderKeyValue=pt,this.icons={faRotate:je,faUserPlus:Ce,faUserPen:ge,faArrowDown:tt,faArrowUp:We,faKey:Qe,faUserSecret:he,faArrowRotateRight:et,faToggleOn:Ye,faToggleOff:He},this.tableHeaders={login:{label:"Login",width:30,textCenter:!1,class:"",show:!0,sortable:!0},fullName:{label:"Full name",width:15,class:"",textCenter:!1,show:!0,sortable:!0},managers:{label:"Managers",width:15,class:"d-none d-md-table-cell",textCenter:!0,show:!1,sortable:!0},storage:{label:"Storage Space",width:15,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},isActive:{label:"Status",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},currentIp:{label:"IP",width:10,textCenter:!1,class:"d-none d-lg-table-cell",show:!0},currentAccess:{label:"Seen",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.guestsView=!1,this.loading=!1,this.selected=null,this.users=[],this.router=S(Le),this.activatedRoute=S(Re),this.layout=S(z),this.adminService=S(R),this.sortSettings={default:[{prop:"login",type:"string"}],login:[{prop:"login",type:"string"}],fullName:[{prop:"fullName",type:"string"}],managers:[{prop:"managers",type:"length"}],storage:[{prop:"storageUsage",type:"number"}],currentAccess:[{prop:"currentAccess",type:"date"}],isActive:[{prop:"isActive",type:"number"}]},this.sortTable=new ft(this.constructor.name,this.sortSettings),this.layout.setBreadcrumbIcon(ot.USERS),this.activatedRoute.data.subscribe(s=>{this.guestsView=s.type===X.GUEST,this.setEnv()})}loadUsersOrGuests(){this.loading=!0,this.onSelect(),this.adminService.listUsers(this.guestsView).subscribe({next:s=>{this.sortBy(this.sortTable.sortParam.column,!1,s),this.scrollView.scrollInto(-1),this.loading=!1},error:s=>{this.users=[],this.layout.sendNotification("error",this.guestsView?"Guests":"Users","Unable to load",s),this.loading=!1}})}onSelect(s=null){this.selected=s}onGuestsView(s){this.guestsView=s,this.router.navigate([Q.BASE,s?Q.GUESTS:Q.USERS]).catch(console.error)}onContextMenu(s){s.preventDefault(),s.stopPropagation(),this.layout.openContextMenu(s,this.mainContextMenu)}onTargetContextMenu(s,l){s.preventDefault(),s.type==="contextmenu"&&s.stopPropagation(),this.onSelect(l),this.layout.openContextMenu(s,this.targetContextMenu)}sortBy(s,l=!0,t){this.users=this.sortTable.sortBy(s,l,t||this.users)}openDialog(s=!1){this.guestsView?this.openGuestDialog(s):this.openUserDialog(s)}openUserDialog(s=!1){s?this.layout.openDialog(Ne,"md").content.userChange.pipe(W(1)).subscribe(t=>{let[d,_]=t;d==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,[...this.users,_]),this.onSelect(_))}):this.adminService.getUser(this.selected.id).subscribe({next:l=>{this.layout.openDialog(Ne,"md",{initialState:{user:l}}).content.userChange.pipe(W(1)).subscribe(d=>{let[_,T]=d;_==="update"?this.selected=Object.assign(this.selected,T):_==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.users.filter(Ue=>Ue.id!==T.id)))})},error:l=>this.layout.sendNotification("error","Edit group",this.selected.login,l)})}openGuestDialog(s=!1){s?this.layout.openDialog(Ve,"md").content.guestChange.pipe(W(1)).subscribe(t=>{let[d,_]=t,T=new gt(_);d==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,[...this.users,T]),this.onSelect(T))}):this.adminService.getUser(this.selected.id,!0).subscribe({next:l=>{this.layout.openDialog(Ve,"md",{initialState:{guest:l}}).content.guestChange.pipe(W(1)).subscribe(d=>{let[_,T]=d;_==="update"?this.selected=Object.assign(this.selected,T):_==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.users.filter(Ue=>Ue.id!==T.id)))})},error:l=>this.layout.sendNotification("error","Guest error",this.selected.fullName,l)})}impersonateIdentity(){this.layout.openDialog(bt,"sm",{initialState:{user:this.selected}})}setEnv(){this.tableHeaders.managers.show=this.guestsView,this.tableHeaders.storage.show=!this.guestsView,this.loadUsersOrGuests(),this.layout.setBreadcrumbNav({url:this.guestsView?`/${Q.BASE}/${Q.GUESTS}/${Fe.GUESTS}`:`/${Q.BASE}/${Q.USERS}/${Fe.USERS}`,splicing:2,translating:!0,sameLink:!0})}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-users"]],viewQuery:function(l,t){if(l&1&&(re(Ie,5),re(ke,7),re(si,7),re(li,7)),l&2){let d;se(d=le())&&(t.scrollView=d.first),se(d=le())&&(t.inputFilter=d.first),se(d=le())&&(t.mainContextMenu=d.first),se(d=le())&&(t.targetContextMenu=d.first)}},decls:47,vars:40,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[1,"ms-auto"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"btn-group","btn-group-sm"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["l10nTranslate","",3,"class"],["alt","",1,"avatar-img",3,"src"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],["draggable","false","l10nTranslate","",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],[3,"item"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center",3,"mouseover","focus","mouseleave"]],template:function(l,t){if(l&1){let d=L();n(0,"div",2)(1,"button",3),h(2,"translate"),f("click",function(){return b(d),x(t.loadUsersOrGuests())}),u(3,"fa-icon",4),o(),n(4,"button",3),h(5,"translate"),f("click",function(){return b(d),x(t.openDialog(!0))}),u(6,"fa-icon",5),o(),n(7,"button",6),h(8,"translate"),f("click",function(){return b(d),x(t.openDialog())}),u(9,"fa-icon",5),o(),n(10,"button",6),h(11,"translate"),f("click",function(){return b(d),x(t.impersonateIdentity())}),u(12,"fa-icon",5),o(),n(13,"div",7)(14,"button",8),f("ngModelChange",function(T){return b(d),x(t.onGuestsView(T))}),n(15,"div",9),u(16,"fa-icon",10),n(17,"span",11),m(18,"Guests"),o()()(),n(19,"div",12),u(20,"app-input-filter",13),o()()(),n(21,"table",14)(22,"thead")(23,"tr"),I(24,ui,1,1,null,null,yt),h(26,"keyvalue"),o()()(),n(27,"app-virtual-scroll",15),h(28,"searchFilter"),f("contextmenu",function(T){return b(d),x(t.onContextMenu(T))}),n(29,"table",14)(30,"tbody",16),I(31,Vi,4,7,"tr",17,mi),o()()(),n(33,"div",18)(34,"span",19),m(35),h(36,"translate"),o()(),n(37,"context-menu",null,0),k(39,Ni,3,2,"ng-template",20),f("execute",function(){return b(d),x(t.openDialog(!0))}),k(40,Pi,0,0,"ng-template",21)(41,Mi,3,1,"ng-template",20),f("execute",function(){return b(d),x(t.loadUsersOrGuests())}),o(),n(42,"context-menu",null,1),k(44,Gi,3,2,"ng-template",20),f("execute",function(){return b(d),x(t.openDialog())}),k(45,Ri,0,0,"ng-template",21)(46,Li,3,1,"ng-template",20),f("execute",function(){return b(d),x(t.impersonateIdentity())}),o()}l&2&&(r(),c("tooltip",D(2,19,"Refresh",t.locale.language)),r(2),c("icon",t.icons.faRotate)("animation",t.loading?"spin":null),r(),c("tooltip",D(5,22,t.guestsView?"New guest":"New user",t.locale.language)),r(2),c("icon",t.icons.faUserPlus),r(),c("disabled",!t.selected)("tooltip",D(8,25,t.guestsView?"Edit guest":"Edit user",t.locale.language)),r(2),c("icon",t.icons.faUserPen),r(),c("disabled",!t.selected)("tooltip",D(11,28,"Impersonate identity",t.locale.language)),r(2),c("icon",t.icons.faUserSecret),r(2),c("ngModel",t.guestsView),r(2),c("icon",t.guestsView?t.icons.faToggleOn:t.icons.faToggleOff),r(8),V(D(26,31,t.tableHeaders,t.originalOrderKeyValue)),r(3),c("bufferAmount",5)("items",D(28,34,t.users,t.inputFilter.search())),r(4),V(t.scrollView==null?null:t.scrollView.viewPortItems),r(4),O("",t.users.length," ",D(36,37,t.guestsView?"guests":"users",t.locale.language)),r(5),c("divider",!0),r(5),c("divider",!0))},dependencies:[M,ke,qe,G,Ie,be,st,rt,at,dt,Be,B,Oe,_t,ie,Ge,ut,ne],encapsulation:2});let e=a;return e})();export{Lo as AdminUsersComponent};
|
|
1
|
+
import{a as Ct}from"./chunk-ZMI2J4TP.js";import{a as gt,b as R,c as vt}from"./chunk-QBFAWJVK.js";import{a as Q,b as Fe,c as ot,e as oe}from"./chunk-DOKA2WHJ.js";import{a as ht}from"./chunk-HSRWUGKT.js";import{d as be}from"./chunk-DMN6JV3X.js";import"./chunk-JXZCNFW7.js";import{a as _t}from"./chunk-LK3ILZP5.js";import{a as ne,b as xe,c as Se,d as we,f as Te,i as Ae}from"./chunk-IKNQ6PPM.js";import{a as ke,b as Ie,c as ut,d as ft}from"./chunk-SQFLVUCW.js";import{a as K,b as ye}from"./chunk-XXVSRYSO.js";import"./chunk-ASH3CAYZ.js";import{g as dt}from"./chunk-FSDIOBH6.js";import{K as it,L as X,N as nt,R as ve,Xa as pt,pa as at,qa as rt,ra as st,ua as lt,v as qe,va as mt,wa as ct,xb as z}from"./chunk-SGDMUCQ7.js";import{b as Re,d as Le}from"./chunk-J6YSVODR.js";import{$a as Pe,$c as Z,Ad as $e,Bf as Ze,Cb as f,Eb as p,Ed as ie,Ee as Ke,Fc as pe,Fd as G,Ga as J,Gc as Ge,Gd as je,Ge as Ce,Ib as re,If as et,Jb as se,Kb as le,L as W,Ma as r,Mb as De,Nb as E,Ob as U,Pb as m,Pf as he,Qb as v,Qd as He,Rb as A,Sb as O,Ue as We,Uf as tt,Xa as N,Xb as P,Yb as Me,Zc as M,_a as me,ab as k,ad as de,ae as Qe,bb as ce,bf as Xe,cd as F,dc as h,ec as w,ed as B,fc as D,fd as $,gd as ee,ha as S,id as y,jb as g,jd as Oe,kb as C,lb as Y,ma as b,na as x,nb as I,nd as q,ob as V,od as te,pb as c,pd as ue,pe as ze,qb as n,qd as fe,rb as o,rd as _e,sb as u,wd as Be,wf as Je,xd as j,xe as ge,yd as H,zb as L,zf as Ye}from"./chunk-JQOMI5VI.js";import"./chunk-RTRJ3KFH.js";function Tt(e,a){if(e&1&&(u(0,"fa-icon",42),n(1,"span"),m(2),o()),e&2){let i=p();c("icon",i.icons.faPen),r(2),v(i.guest.fullName)}}function At(e,a){if(e&1&&(u(0,"fa-icon",42),n(1,"span",43),m(2,"New guest"),o()),e&2){let i=p();c("icon",i.icons.faPlus)}}function Et(e,a){if(e&1&&u(0,"fa-icon",2),e&2){let i=p();c("icon",i.icons.faSpinner)}}function Ut(e,a){e&1&&(n(0,"h4",3)(1,"span",43),m(2,"Edit guest"),o()())}function Dt(e,a){if(e&1&&(u(0,"fa-icon",44),n(1,"span",45),m(2,"Account"),o()),e&2){let i=p();c("icon",i.icons.faAddressCard)}}function Ft(e,a){if(e&1&&u(0,"app-password-strength-bar",22),e&2){let i=p();c("passwordToCheck",i.guestForm.value.password)}}function kt(e,a){if(e&1&&(n(0,"option",26),m(1),o()),e&2){let i=a.$implicit;c("ngValue",i),r(),v(i)}}function It(e,a){if(e&1&&(n(0,"option",34),m(1),o()),e&2){let i=a.$implicit,s=p();c("ngValue",s.allNotifications.indexOf(i)),r(),v(i)}}function Vt(e,a){if(e&1&&(n(0,"div"),m(1),h(2,"amDateFormat"),o(),n(3,"div"),m(4),h(5,"amDateFormat"),o()),e&2){let i=p(2);r(),O("",w(2,4,i.guest.currentAccess)," - ",i.guest.currentIp),r(3),O("",w(5,6,i.guest.lastAccess)," - ",i.guest.lastIp)}}function Nt(e,a){e&1&&(n(0,"span",37),m(1,"never"),o())}function Pt(e,a){if(e&1&&(n(0,"div",11)(1,"div",12)(2,"label",46),m(3,"Creation date"),o(),n(4,"div",47),m(5),h(6,"amDateFormat"),o()(),n(7,"div",48)(8,"label",49),m(9,"Last accesses"),o(),n(10,"div",50),g(11,Vt,6,8)(12,Nt,2,0,"span",37),o()()()),e&2){let i=p();r(5),v(w(6,2,i.guest.createdAt)),r(6),C(i.guest.lastAccess?11:12)}}function Mt(e,a){if(e&1&&(u(0,"fa-icon",44),n(1,"span",51),m(2,"Managers"),o(),n(3,"span"),m(4),o()),e&2){let i=p();c("icon",i.icons.faUsersGear),r(4),A("(",i.guestForm.value.managers.length||0,")")}}function Gt(e,a){e&1&&(n(0,"small",37),m(1,"At least one manager is required"),o())}function Rt(e,a){if(e&1){let i=L();n(0,"button",52),f("click",function(){b(i);let l=p();return x(l.confirmDeletion=!0)}),m(1," Remove "),o()}if(e&2){let i=p();c("disabled",i.confirmDeletion)}}var Ve=(()=>{let a=class a extends Ct{constructor(){super(),this.adminService=S(R)}searchMembers(s){let l={search:s,ignoreUserIds:this.guestForm.value.managers.map(t=>t.id),usersRole:X.USER,onlyUsers:!0};return this.adminService.searchMembers(l)}onSubmit(){if(this.submitted=!0,this.confirmDeletion)this.adminService.deleteUser(this.guest.id,null,!0).subscribe({next:()=>{this.guestChange.emit(["delete",this.guest]),this.layout.sendNotification("success","Guest deleted",this.guest.login),this.layout.closeDialog()},error:s=>this.onError(s)});else if(!this.guest)this.adminService.createUser(this.makeDto(!0),!0).subscribe({next:s=>{this.guestChange.emit(["add",s]),this.layout.sendNotification("success","Guest created",this.guestForm.value.login),this.layout.closeDialog()},error:s=>this.onError(s)});else{let s=this.makeDto();if(!Object.keys(s).length){this.loading=!1,this.submitted=!1;return}this.adminService.updateUser(this.guest.id,s,!0).subscribe({next:l=>{l?this.guestChange.emit(["update",l]):this.guestChange.emit(["delete",this.guest]),this.layout.sendNotification("success","Guest updated",this.guestForm.value.login),this.layout.closeDialog()},error:l=>this.onError(l)})}}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-guest-dialog"]],features:[Pe],decls:70,vars:40,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","login","l10nTranslate",""],["id","login","appAutofocus","","formControlName","login","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","email","l10nTranslate",""],["id","email","formControlName","email","autocomplete","off","type","email",1,"form-control","form-control-sm"],["for","firstName","l10nTranslate",""],["id","firstName","formControlName","firstName","autocomplete","off","type","text",1,"form-control","form-control-sm"],["for","lastName","l10nTranslate",""],["id","lastName","formControlName","lastName","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"position-absolute","pe-4",2,"right","50%","padding-top","6px",3,"passwordToCheck"],["id","password","placeholder","Set a password",3,"passwordChange","password","showGenerator","showLabel","isRequired"],["for","language","l10nTranslate",""],["id","language","formControlName","language",1,"form-control","form-select","form-select-sm"],[3,"ngValue"],[1,"d-flex","flex-column","col-6","pe-4"],["for","account","l10nTranslate",""],["id","account",1,"form-check","form-switch","form-check-inline"],["for","isActive",1,"form-check-label"],["formControlName","isActive","id","isActive","type","checkbox",1,"form-check-input"],["for","notification","l10nTranslate",""],["id","notification","formControlName","notification",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],["l10nTranslate","",1,"text-danger"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"me-2",3,"icon"],["l10nTranslate",""],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","access","l10nTranslate",""],["id","access",1,"text-align-end"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),g(2,Tt,3,2)(3,At,3,1),g(4,Et,1,1,"fa-icon",2),o(),g(5,Ut,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.layout.closeDialog()}),o()(),n(7,"div",5)(8,"tabset",6),u(9,"hr",7),n(10,"tab",8),f("selectTab",function(){return t.tabView=null}),k(11,Dt,3,1,"ng-template",9),n(12,"div",10)(13,"div",11)(14,"div",12)(15,"label",13),m(16,"Login"),o(),u(17,"input",14),o(),n(18,"div",15)(19,"label",16),m(20,"Email"),o(),u(21,"input",17),o()(),n(22,"div",11)(23,"div",12)(24,"label",18),m(25,"First name"),o(),u(26,"input",19),o(),n(27,"div",15)(28,"label",20),m(29,"Last name"),o(),u(30,"input",21),o()(),n(31,"div",11)(32,"div",12),g(33,Ft,1,1,"app-password-strength-bar",22),n(34,"app-input-password",23),f("passwordChange",function(_){return t.updatePassword(_)}),o()(),n(35,"div",15)(36,"label",24),m(37,"Language"),o(),n(38,"select",25),I(39,kt,2,2,"option",26,Y),o()()(),n(41,"div",11)(42,"div",27)(43,"label",28),m(44,"Account status"),o(),n(45,"div",29)(46,"label",30),u(47,"input",31),n(48,"span"),m(49),h(50,"translate"),h(51,"titlecase"),o()()()(),n(52,"div",15)(53,"label",32),m(54,"Notification"),o(),n(55,"select",33),I(56,It,2,2,"option",34,Y),o()()(),g(58,Pt,13,4,"div",11),o()(),n(59,"tab",35),f("selectTab",function(){return t.tabView="managers"}),k(60,Mt,5,2,"ng-template",9),n(61,"div",7)(62,"app-user-search",36),f("membersChange",function(_){return t.updateManagers(_)}),o(),g(63,Gt,2,0,"small",37),o()()()(),n(64,"div",38),g(65,Rt,2,1,"button",39),n(66,"button",40),f("click",function(){return t.onCancel()}),m(67,"Cancel"),o(),n(68,"button",41),f("click",function(){return t.onSubmit()}),m(69),o()()),l&2&&(r(2),C(t.guest?2:3),r(2),C(t.loading?4:-1),r(),C(t.guest?5:-1),r(),U(P("btn-close btn-close-white ",t.guest?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.guestForm),r(),c("justified",!0),r(9),E("is-invalid",t.guestForm.controls.login.invalid),c("autoSelect",!1),r(4),E("is-invalid",t.guestForm.controls.email.invalid),r(5),E("is-invalid",t.guestForm.controls.firstName.invalid),r(7),C(t.guestForm.value.password!==t.defaultPassword?33:-1),r(),c("password",t.guestForm.value.password)("showGenerator",!0)("showLabel",!0)("isRequired",!0),r(5),V(t.languages),r(9),E("text-danger",!t.guestForm.value.isActive),r(),A(" ",w(51,38,D(50,35,t.guestForm.value.isActive?"active":"suspended",t.locale.language))," "),r(7),V(t.allNotifications),r(2),C(t.guest?58:-1),r(4),c("members",t.guestForm.value.managers)("withPermissions",!1)("customPlaceholder","Type to search for managers to add")("searchFunction",t.searchMembers.bind(t)),r(),C(t.guestForm.value.managers.length?-1:63),r(2),C(t.guest!=null&&t.guest.id?65:-1),r(3),U(P("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),c("disabled",t.guestForm.invalid||t.submitted),r(),A(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[M,G,j,fe,_e,de,Z,ue,B,$,q,te,K,ye,Te,Ae,xe,Se,we,ne,ie,pe],encapsulation:2});let e=a;return e})();function Ot(e,a){e&1&&(n(0,"h4",3)(1,"span",13),m(2,"Impersonate identity"),o()())}var bt=(()=>{let a=class a{constructor(){this.locale=S(H),this.layout=S(z),this.submitted=!1,this.icons={faUserSecret:he},this.passwordMinLength=8,this.impersonateUserForm=new ee({password:new y("",F.required)}),this.adminService=S(R)}onSubmit(){this.submitted=!0,this.adminService.impersonateUser(this.user.id,{password:this.impersonateUserForm.value.password}).subscribe({next:s=>{this.layout.closeDialog(),setTimeout(()=>this.adminService.initImpersonateUser(s),500)},error:s=>{this.submitted=!1,this.layout.sendNotification("error","Impersonate identity",this.user.login,s)}})}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-impersonate-user-dialog"]],inputs:{user:"user"},decls:19,vars:16,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],[1,"d-flex","align-items-center","avatar","mb-3"],["alt","",1,"avatar-img",3,"src"],[1,"fw-bold","mx-2"],["id","password","placeholder","Enter your password to confirm",3,"passwordChange","password","passwordMinLength","isRequired","focus"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["l10nTranslate",""]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),n(3,"span"),m(4),o()(),g(5,Ot,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.layout.closeDialog()}),o()(),n(7,"div",5)(8,"div",6),u(9,"img",7),n(10,"span",8),m(11),h(12,"capitalize"),o()(),n(13,"app-input-password",9),f("passwordChange",function(_){return t.impersonateUserForm.controls.password.setValue(_)}),o()(),n(14,"div",10)(15,"button",11),f("click",function(){return t.layout.closeDialog()}),m(16,"Cancel"),o(),n(17,"button",12),f("click",function(){return t.onSubmit()}),m(18," Confirm "),o()()),l&2&&(r(2),c("icon",t.icons.faUserSecret),r(2),v(t.user.fullName),r(),C(t.user?5:-1),r(),U(P("btn-close btn-close-white ",t.user?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.impersonateUserForm),r(2),c("src",t.user.avatarUrl,J),r(2),v(w(12,14,t.user.login)),r(2),c("password",t.impersonateUserForm.value.password)("passwordMinLength",t.passwordMinLength)("isRequired",!0)("focus",!0),r(4),c("disabled",t.impersonateUserForm.invalid||t.submitted))},dependencies:[M,G,j,$,q,K,oe],encapsulation:2});let e=a;return e})();var xt=(()=>{let a=class a{constructor(){this.translate=S($e)}transform(s,l=!1,t=null,d=", "){return s.length?(t?s.map(T=>T[t]):s.concat()).sort().map(T=>new oe().transform(l?this.translate.translate(T):T)).join(d):""}};a.\u0275fac=function(l){return new(l||a)},a.\u0275pipe=me({name:"join",type:a,pure:!0});let e=a;return e})();var St=(()=>{let a=class a{transform(s,l=","){return s?.length?s.split(l):[]}};a.\u0275fac=function(l){return new(l||a)},a.\u0275pipe=me({name:"split",type:a,pure:!0});let e=a;return e})();function Bt(e,a){e&1&&(n(0,"h4",3)(1,"span",9),m(2,"Delete user"),o()())}var wt=(()=>{let a=class a{constructor(){this.wasDeleted=new ce,this.locale=S(H),this.submitted=!1,this.icons={faUserMinus:Je},this.deleteUserForm=new ee({adminPassword:new y("",F.required),deleteSpace:new y(!1)}),this.layout=S(z),this.adminService=S(R)}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.adminService.deleteUser(this.user.id,{adminPassword:this.deleteUserForm.value.adminPassword,deleteSpace:this.deleteUserForm.value.deleteSpace}).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success","Delete user",this.user.login),this.onClose()},error:s=>{this.submitted=!1,this.layout.sendNotification("error","Delete user",this.user.login,s)}})}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-user-delete-dialog"]],inputs:{user:"user"},outputs:{wasDeleted:"wasDeleted"},decls:27,vars:15,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],[1,"d-flex","align-items-center","avatar","mb-3"],["alt","",1,"avatar-img",3,"src"],[1,"fw-bold","mx-2"],["l10nTranslate",""],["id","password","placeholder","Enter your password to confirm",3,"passwordChange","password","isRequired","focus"],[1,"form-check","form-check-inline","mt-3"],[1,"d-flex"],["for","deleteSpace",1,"form-check-label"],["formControlName","deleteSpace","id","deleteSpace","type","checkbox",1,"form-check-input"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),n(3,"span"),m(4),o()(),g(5,Bt,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.onClose()}),o()(),n(7,"div",5)(8,"div",6),u(9,"img",7),n(10,"span",8),m(11),h(12,"capitalize"),o(),n(13,"span",9),m(14,"will be permanently removed"),o()(),n(15,"app-input-password",10),f("passwordChange",function(_){return t.deleteUserForm.controls.adminPassword.setValue(_)}),o(),n(16,"div",11)(17,"div",12)(18,"label",13),u(19,"input",14),n(20,"span",9),m(21,"Delete all user files"),o()()()()(),n(22,"div",15)(23,"button",16),f("click",function(){return t.onClose()}),m(24,"Cancel"),o(),n(25,"button",17),f("click",function(){return t.onSubmit()}),m(26," Confirm "),o()()),l&2&&(r(2),c("icon",t.icons.faUserMinus),r(2),v(t.user.fullName),r(),C(t.user?5:-1),r(),U(P("btn-close btn-close-white ",t.user?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.deleteUserForm),r(2),c("src",t.user.avatarUrl,J),r(2),v(w(12,13,t.user.login)),r(4),c("password",t.deleteUserForm.value.adminPassword)("isRequired",!0)("focus",!0),r(10),c("disabled",t.deleteUserForm.invalid||t.submitted))},dependencies:[M,G,j,Z,B,$,q,te,K,oe],encapsulation:2});let e=a;return e})();var $t=(e,a)=>a.id;function qt(e,a){if(e&1&&(u(0,"fa-icon",47),n(1,"span"),m(2),o()),e&2){let i=p();c("icon",i.icons.faUserPen),r(2),v(i.user.fullName)}}function jt(e,a){if(e&1&&(u(0,"fa-icon",47),n(1,"span",40),m(2,"New user"),o()),e&2){let i=p();c("icon",i.icons.faUserPlus)}}function Ht(e,a){if(e&1&&u(0,"fa-icon",2),e&2){let i=p();c("icon",i.icons.faSpinner)}}function Qt(e,a){e&1&&(n(0,"h4",3)(1,"span",40),m(2,"Edit user"),o()())}function zt(e,a){if(e&1&&(u(0,"fa-icon",48),n(1,"span",49),m(2,"Account"),o()),e&2){let i=p();c("icon",i.icons.faAddressCard)}}function Kt(e,a){if(e&1&&u(0,"app-password-strength-bar",22),e&2){let i=p();c("passwordToCheck",i.userForm.value.password)}}function Wt(e,a){if(e&1&&(n(0,"option",26),m(1),o()),e&2){let i=a.$implicit;c("ngValue",i),r(),v(i)}}function Xt(e,a){if(e&1&&(n(0,"option",30),m(1),o()),e&2){let i=a.$implicit,s=p();c("ngValue",s.allNotifications.indexOf(i)),r(),v(i)}}function Jt(e,a){if(e&1&&(n(0,"div",11)(1,"div",12)(2,"label",50),m(3,"Storage Usage"),o(),u(4,"app-storage-usage",51),o(),u(5,"div",15),o()),e&2){let i=p();r(4),c("item",i.user)}}function Yt(e,a){if(e&1&&(n(0,"div"),m(1),h(2,"amDateFormat"),o(),n(3,"div"),m(4),h(5,"amDateFormat"),o()),e&2){let i=p(2);r(),O("",w(2,4,i.user.currentAccess)," - ",i.user.currentIp),r(3),O("",w(5,6,i.user.lastAccess)," - ",i.user.lastIp)}}function Zt(e,a){e&1&&(n(0,"span",57),m(1,"never"),o())}function ei(e,a){if(e&1&&(n(0,"div",11)(1,"div",12)(2,"label",52),m(3,"Creation date"),o(),n(4,"div",53),m(5),h(6,"amDateFormat"),o()(),n(7,"div",54)(8,"label",55),m(9,"Last accesses"),o(),n(10,"div",56),g(11,Yt,6,8)(12,Zt,2,0,"span",57),o()()()),e&2){let i=p();r(5),v(w(6,2,i.user.createdAt)),r(6),C(i.user.lastAccess?11:12)}}function ti(e,a){if(e&1&&(u(0,"fa-icon",48),n(1,"span",49),m(2,"Permissions"),o()),e&2){let i=p();c("icon",i.icons.faShieldHalved)}}function ii(e,a){if(e&1&&(n(0,"div",60)(1,"div",61),u(2,"fa-icon",62),n(3,"span"),m(4),o()(),n(5,"div",63),m(6),h(7,"split"),h(8,"join"),o()()),e&2){let i=p().$implicit,s=p(2);r(2),c("icon",s.icons.GROUPS),r(2),v(i.name),r(2),v(D(8,5,w(7,3,i.permissions),!0))}}function ni(e,a){if(e&1&&g(0,ii,9,8,"div",60),e&2){let i=a.$implicit;C(i.permissions?0:-1)}}function oi(e,a){if(e&1&&(n(0,"div",32)(1,"label",58),m(2,"Permissions inherited from groups"),o(),n(3,"div",59),I(4,ni,1,1,null,null,$t),o()()),e&2){let i=p();r(4),V(i.userForm.value.groups)}}function ai(e,a){if(e&1&&(u(0,"fa-icon",48),n(1,"span",64),m(2,"Groups"),o(),n(3,"span"),m(4),o()),e&2){let i=p();c("icon",i.icons.faUsers),r(4),A("(",i.userForm.value.groups.length||0,")")}}function ri(e,a){if(e&1){let i=L();n(0,"button",65),f("click",function(){b(i);let l=p();return x(l.confirmDeletion=!0)}),m(1," Remove "),o()}if(e&2){let i=p();c("disabled",i.confirmDeletion)}}var Ne=(()=>{let a=class a{constructor(){this.user=null,this.userChange=new ce,this.locale=S(H),this.layout=S(z),this.submitted=!1,this.loading=!1,this.confirmDeletion=!1,this.icons={GROUPS:lt.GROUPS,faUserPlus:Ce,faUserPen:ge,faSpinner:Xe,faAddressCard:Ke,faUsers:ze,faShieldHalved:Ze},this.allNotifications=Object.values(ve),this.defaultPassword=this.layout.translateString(mt),this.languages=this.layout.getLanguages(!0),this.adminService=S(R)}ngOnInit(){this.userForm=new ee({login:new y(this.user?.login||"",[F.required,F.pattern(it)]),email:new y(this.user?.email||"",[F.required,F.maxLength(255),F.email]),firstName:new y(this.user?.firstName||"",[F.required,F.maxLength(255)]),lastName:new y(this.user?.lastName||"",F.maxLength(255)),password:new y(this.user?this.defaultPassword:"",F.maxLength(255)),language:new y(this.user?.language||null),notification:new y(this.user?.notification||Object.values(ve).indexOf(ve.APPLICATION_EMAIL)),isActive:new y(this.user?this.user.isActive:!0),isAdmin:new y(this.user?this.user.isAdmin:!1),storageQuota:new y(this.user?.storageQuota||null),groups:new y(this.user?.groups||[]),applications:new y(this.user?.applications||[])})}searchMembers(s){let l={search:s,onlyGroups:!0,excludePersonalGroups:!0,withPermissions:!0,ignoreGroupIds:this.userForm.value.groups.map(t=>t.id)};return this.adminService.searchMembers(l)}updateApplications(s){this.userForm.controls.applications.setValue(s),this.userForm.controls.applications.markAsDirty()}updatePassword(s){this.userForm.controls.password.setValue(s),this.userForm.controls.password.markAsDirty()}updateMembers(s){this.userForm.controls.groups.setValue(s),this.userForm.controls.groups.markAsDirty()}updateQuota(s){this.userForm.controls.storageQuota.setValue(s),this.userForm.controls.storageQuota.markAsDirty()}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.confirmDeletion?this.layout.openDialog(wt,"sm",{initialState:{user:this.user}}).content.wasDeleted.pipe(W(1)).subscribe(l=>{l?(this.userChange.emit(["delete",this.user]),this.layout.closeDialog()):(this.confirmDeletion=!1,this.submitted=!1)}):this.user?this.adminService.updateUser(this.user.id,this.makeDto()).subscribe({next:s=>{this.userChange.emit(["update",s]),this.layout.sendNotification("success","User updated",this.userForm.value.login),this.layout.closeDialog()},error:s=>this.onError(s)}):this.adminService.createUser(this.makeDto(!0)).subscribe({next:s=>{this.userChange.emit(["add",s]),this.layout.sendNotification("success","User created",this.userForm.value.login),this.layout.closeDialog()},error:s=>this.onError(s)})}makeDto(s=!1){let l={};if(s)l=this.userForm.value;else for(let t in this.userForm.controls)this.userForm.controls[t].dirty&&(l[t]=this.userForm.controls[t].value);for(let t in l)switch(t){case"language":l[t]=l[t]===ct?null:l[t];break;case"isAdmin":l.role=l[t]?X.ADMINISTRATOR:X.USER;break;case"applications":l.permissions=l[t].join(nt);break;case"groups":l[t]=l[t].map(d=>d.id);break}return l}onError(s){this.layout.sendNotification("error","Group error",this.userForm.value.login,s),this.submitted=!1}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-user-dialog"]],inputs:{user:"user"},outputs:{userChange:"userChange"},decls:82,vars:44,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","login","l10nTranslate",""],["id","login","appAutofocus","","formControlName","login","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","email","l10nTranslate",""],["id","email","formControlName","email","autocomplete","off","type","email",1,"form-control","form-control-sm"],["for","firstName","l10nTranslate",""],["id","firstName","formControlName","firstName","autocomplete","off","type","text",1,"form-control","form-control-sm"],["for","lastName","l10nTranslate",""],["id","lastName","formControlName","lastName","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"position-absolute","pe-4",2,"right","50%","padding-top","6px",3,"passwordToCheck"],["id","password","placeholder","Set a password",3,"passwordChange","password","showGenerator","showLabel","isRequired"],["for","language","l10nTranslate",""],["id","language","formControlName","language",1,"form-control","form-select","form-select-sm"],[3,"ngValue"],[3,"quotaChange","quota","fullWidth"],["for","notification","l10nTranslate",""],["id","notification","formControlName","notification",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],["customClass","tab-dialog",3,"selectTab"],[1,"d-flex","flex-column","col-12","pb-3"],["for","account","l10nTranslate",""],["id","account",1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],["for","isActive",1,"form-check-label"],["formControlName","isActive","id","isActive","type","checkbox",1,"form-check-input"],["for","isAdmin",1,"form-check-label"],["formControlName","isAdmin","id","isAdmin","type","checkbox",1,"form-check-input"],["l10nTranslate",""],[3,"permissionsChange","permissions"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"me-2",3,"icon"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","access","l10nTranslate",""],["id","access",1,"text-align-end"],["l10nTranslate","",1,"text-danger"],["for","groups_permissions","l10nTranslate",""],["id","groups_permissions"],[1,"d-flex","align-items-center","mb-1"],[1,"d-flex","align-items-center","me-5"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","fs-xxs","ms-auto"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(l,t){l&1&&(n(0,"div",0)(1,"h4",1),g(2,qt,3,2)(3,jt,3,1),g(4,Ht,1,1,"fa-icon",2),o(),g(5,Qt,3,0,"h4",3),n(6,"button",4),f("click",function(){return t.layout.closeDialog()}),o()(),n(7,"div",5)(8,"tabset",6),u(9,"hr",7),n(10,"tab",8),f("selectTab",function(){return t.tabView=null}),k(11,zt,3,1,"ng-template",9),n(12,"div",10)(13,"div",11)(14,"div",12)(15,"label",13),m(16,"Login"),o(),u(17,"input",14),o(),n(18,"div",15)(19,"label",16),m(20,"Email"),o(),u(21,"input",17),o()(),n(22,"div",11)(23,"div",12)(24,"label",18),m(25,"First name"),o(),u(26,"input",19),o(),n(27,"div",15)(28,"label",20),m(29,"Last name"),o(),u(30,"input",21),o()(),n(31,"div",11)(32,"div",12),g(33,Kt,1,1,"app-password-strength-bar",22),n(34,"app-input-password",23),f("passwordChange",function(_){return t.updatePassword(_)}),o()(),n(35,"div",15)(36,"label",24),m(37,"Language"),o(),n(38,"select",25),I(39,Wt,2,2,"option",26,Y),o()()(),n(41,"div",11)(42,"div",12)(43,"app-storage-quota",27),f("quotaChange",function(_){return t.updateQuota(_)}),o()(),n(44,"div",15)(45,"label",28),m(46,"Notification"),o(),n(47,"select",29),I(48,Xt,2,2,"option",30,Y),o()()(),g(50,Jt,6,1,"div",11),o(),g(51,ei,13,4,"div",11),o(),n(52,"tab",31),f("selectTab",function(){return t.tabView="permissions"}),k(53,ti,3,1,"ng-template",9),n(54,"div",32)(55,"label",33),m(56,"Account status"),o(),n(57,"div",34)(58,"div",35)(59,"label",36),u(60,"input",37),n(61,"span"),m(62),h(63,"translate"),h(64,"titlecase"),o()()(),n(65,"div",35)(66,"label",38),u(67,"input",39),n(68,"span",40),m(69,"Administrator"),o()()()()(),n(70,"app-admin-permissions",41),f("permissionsChange",function(_){return t.updateApplications(_)}),o(),g(71,oi,6,0,"div",32),o(),n(72,"tab",31),f("selectTab",function(){return t.tabView="groups"}),k(73,ai,5,2,"ng-template",9),n(74,"div",7)(75,"app-user-search",42),f("membersChange",function(_){return t.updateMembers(_)}),o()()()()(),n(76,"div",43),g(77,ri,2,1,"button",44),n(78,"button",45),f("click",function(){return t.onCancel()}),m(79,"Cancel"),o(),n(80,"button",46),f("click",function(){return t.onSubmit()}),m(81),o()()),l&2&&(r(2),C(t.user?2:3),r(2),C(t.loading?4:-1),r(),C(t.user?5:-1),r(),U(P("btn-close btn-close-white ",t.user?"ms-2":"ms-auto"," ms-2")),r(),c("formGroup",t.userForm),r(),c("justified",!0),r(9),E("is-invalid",t.userForm.controls.login.invalid),c("autoSelect",!1),r(4),E("is-invalid",t.userForm.controls.email.invalid),r(5),E("is-invalid",t.userForm.controls.firstName.invalid),r(7),C(t.userForm.value.password!==t.defaultPassword?33:-1),r(),c("password",t.userForm.value.password)("showGenerator",!0)("showLabel",!0)("isRequired",!0),r(5),V(t.languages),r(4),c("quota",t.userForm.value.storageQuota)("fullWidth",!0),r(5),V(t.allNotifications),r(2),C(t.user&&t.user.storageUsage?50:-1),r(),C(t.user?51:-1),r(10),E("text-danger",!t.userForm.value.isActive),r(),A(" ",w(64,42,D(63,39,t.userForm.value.isActive?"active":"suspended",t.locale.language))," "),r(8),c("permissions",t.userForm.value.applications),r(),C(t.userForm.value.groups.length?71:-1),r(4),c("members",t.userForm.value.groups)("withPermissions",!1)("customPlaceholder","Type to search for groups to add")("searchFunction",t.searchMembers.bind(t)),r(2),C(t.user!=null&&t.user.id?77:-1),r(3),U(P("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),c("disabled",t.userForm.invalid||t.submitted),r(),A(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[M,G,Se,we,xe,j,fe,_e,de,Z,ue,B,$,q,te,K,ye,be,ht,Ae,Te,vt,pe,ie,St,xt,ne],encapsulation:2});let e=a;return e})();var si=["MainContextMenu"],li=["TargetContextMenu"],yt=(e,a)=>a.key,mi=(e,a)=>a.id,ci=(e,a)=>a.mid;function pi(e,a){if(e&1&&u(0,"fa-icon",24),e&2){let i=p(3);c("icon",i.sortTable.sortParam.asc?i.icons.faArrowDown:i.icons.faArrowUp)("fixedWidth",!1)}}function di(e,a){if(e&1){let i=L();n(0,"th",23),f("click",function(){b(i);let l=p().$implicit,t=p();return x(t.sortBy(l.key))}),m(1),g(2,pi,1,2,"fa-icon",24),o()}if(e&2){let i=p().$implicit,s=p();U(i.value.class),De("width",i.value.width,"%"),E("text-align-center",i.value.textCenter)("cursor-pointer",i.value.sortable),r(),A(" ",i.value.label," "),r(),C(s.sortTable.sortParam.column===i.key?2:-1)}}function ui(e,a){if(e&1&&g(0,di,3,10,"th",22),e&2){let i=a.$implicit;C(i.value.show?0:-1)}}function fi(e,a){if(e&1&&u(0,"fa-icon",32),e&2){let i=p(5);c("icon",i.icons.faKey)}}function _i(e,a){if(e&1&&(n(0,"div",27),u(1,"img",30),n(2,"div",28)(3,"span",31),m(4),g(5,fi,1,1,"fa-icon",32),o(),n(6,"span",33),m(7),o()()()),e&2){let i=p(3).$implicit;r(),c("src",i.avatarUrl,J),r(3),A(" ",i.login," "),r(),C(i.isAdmin?5:-1),r(2),v(i.email)}}function gi(e,a){if(e&1&&(n(0,"span",34),m(1),o()),e&2){let i=p(4).$implicit;r(),v(i.userRoleText)}}function Ci(e,a){if(e&1&&(n(0,"div",28)(1,"span",31),m(2),o(),g(3,gi,2,1,"span",34),o()),e&2){let i=p(3).$implicit;r(2),v(i.fullName),r(),C(i.isAdmin?3:-1)}}function hi(e,a){if(e&1&&u(0,"app-user-avatar",35),e&2){let i=a.$implicit;c("user",i)("isMember",!0)}}function vi(e,a){if(e&1&&I(0,hi,1,2,"app-user-avatar",35,ci),e&2){let i=p(3).$implicit;V(i.managers)}}function bi(e,a){if(e&1&&u(0,"app-storage-usage",36),e&2){let i=p(4).$implicit;c("item",i)}}function xi(e,a){if(e&1&&g(0,bi,1,1,"app-storage-usage",36),e&2){let i=p(3).$implicit;C(i.storageUsage?0:-1)}}function Si(e,a){if(e&1&&(n(0,"div",28)(1,"div"),m(2),o(),n(3,"div"),m(4),o()()),e&2){let i=p(3).$implicit;r(2),v(i.currentIp),r(2),v(i.lastIp)}}function wi(e,a){e&1&&m(0," too many login attempts ")}function yi(e,a){if(e&1&&m(0),e&2){let i=p(4).$implicit;A(" ",i.userIsActiveText," ")}}function Ti(e,a){if(e&1&&(n(0,"span",11),g(1,wi,1,0)(2,yi,1,1),o()),e&2){let i=p(3).$implicit;U(i.isActive?"text-success":"text-danger"),r(),C(!i.isActive&&i.passwordAttempts?1:2)}}function Ai(e,a){if(e&1&&(n(0,"div",28)(1,"div"),m(2),h(3,"amDateFormat"),o(),n(4,"div"),m(5),h(6,"amDateFormat"),o()()),e&2){let i=p(5).$implicit;r(2),v(w(3,2,i.currentAccess)),r(3),v(w(6,4,i.lastAccess))}}function Ei(e,a){if(e&1&&m(0),e&2){let i=p(5).$implicit;A(" ",i.hTimeAgo," ")}}function Ui(e,a){if(e&1){let i=L();n(0,"div",38),f("mouseover",function(){b(i);let l=p(4).$implicit;return x(l.currentAccessHover=!0)})("focus",function(){b(i);let l=p(4).$implicit;return x(l.currentAccessHover=!0)})("mouseleave",function(){b(i);let l=p(4).$implicit;return x(l.currentAccessHover=!1)}),g(1,Ai,7,6,"div",28)(2,Ei,1,1),o()}if(e&2){let i=p(4).$implicit;r(),C(i.currentAccessHover?1:2)}}function Di(e,a){e&1&&(n(0,"span",11),m(1,"never"),o())}function Fi(e,a){if(e&1&&g(0,Ui,3,1,"div",37)(1,Di,2,0,"span",11),e&2){let i=p(3).$implicit;C(i.currentAccess?0:1)}}function ki(e,a){if(e&1&&(n(0,"td"),g(1,_i,8,4,"div",27)(2,Ci,4,2,"div",28)(3,vi,2,0)(4,xi,1,1)(5,Si,5,2,"div",28)(6,Ti,3,3,"span",29)(7,Fi,2,1),o()),e&2){let i,s=p().$implicit,l=p().$implicit;U(Me("",s.value.class," ",s.value.newly?"prop-newly-"+l[s.value.newly]:"")),De("width",s.value.width,"%"),E("text-align-center",s.value.textCenter),r(),C((i=s.key)==="login"?1:i==="fullName"?2:i==="managers"?3:i==="storage"?4:i==="currentIp"?5:i==="isActive"?6:i==="currentAccess"?7:-1)}}function Ii(e,a){if(e&1&&g(0,ki,8,9,"td",26),e&2){let i=a.$implicit;C(i.value.show?0:-1)}}function Vi(e,a){if(e&1){let i=L();n(0,"tr",25),f("click",function(){let l=b(i).$implicit,t=p();return x(t.onSelect(l))})("contextmenu",function(l){let t=b(i).$implicit,d=p();return x(d.onTargetContextMenu(l,t))})("pressup",function(l){let t=b(i).$implicit,d=p();return x(d.onTargetContextMenu(l,t))})("tap",function(){b(i);let l=p();return x(l.openDialog())}),I(1,Ii,1,1,null,null,yt),h(3,"keyvalue"),o()}if(e&2){let i=a.$implicit,s=p();E("disabled",!i.isActive)("selected",i.id===(s.selected==null?null:s.selected.id)),r(),V(D(3,4,s.tableHeaders,s.originalOrderKeyValue))}}function Ni(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2),o()),e&2){let i=p();r(),c("icon",i.icons.faUserPlus),r(),A("New ",i.guestsView?"guest":"user")}}function Pi(e,a){}function Mi(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2,"Refresh"),o()),e&2){let i=p();r(),c("icon",i.icons.faArrowRotateRight)}}function Gi(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2),o()),e&2){let i=p();r(),c("icon",i.icons.faUserPen),r(),A("Edit ",i.guestsView?"guest":"user")}}function Ri(e,a){}function Li(e,a){if(e&1&&(n(0,"span",11),u(1,"fa-icon",5),m(2,"Impersonate identity"),o()),e&2){let i=p();r(),c("icon",i.icons.faUserSecret)}}var Lo=(()=>{let a=class a{constructor(){this.locale=S(H),this.originalOrderKeyValue=pt,this.icons={faRotate:je,faUserPlus:Ce,faUserPen:ge,faArrowDown:tt,faArrowUp:We,faKey:Qe,faUserSecret:he,faArrowRotateRight:et,faToggleOn:Ye,faToggleOff:He},this.tableHeaders={login:{label:"Login",width:30,textCenter:!1,class:"",show:!0,sortable:!0},fullName:{label:"Full name",width:15,class:"",textCenter:!1,show:!0,sortable:!0},managers:{label:"Managers",width:15,class:"d-none d-md-table-cell",textCenter:!0,show:!1,sortable:!0},storage:{label:"Storage Space",width:15,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},isActive:{label:"Status",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},currentIp:{label:"IP",width:10,textCenter:!1,class:"d-none d-lg-table-cell",show:!0},currentAccess:{label:"Seen",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.guestsView=!1,this.loading=!1,this.selected=null,this.users=[],this.router=S(Le),this.activatedRoute=S(Re),this.layout=S(z),this.adminService=S(R),this.sortSettings={default:[{prop:"login",type:"string"}],login:[{prop:"login",type:"string"}],fullName:[{prop:"fullName",type:"string"}],managers:[{prop:"managers",type:"length"}],storage:[{prop:"storageUsage",type:"number"}],currentAccess:[{prop:"currentAccess",type:"date"}],isActive:[{prop:"isActive",type:"number"}]},this.sortTable=new ft(this.constructor.name,this.sortSettings),this.layout.setBreadcrumbIcon(ot.USERS),this.activatedRoute.data.subscribe(s=>{this.guestsView=s.type===X.GUEST,this.setEnv()})}loadUsersOrGuests(){this.loading=!0,this.onSelect(),this.adminService.listUsers(this.guestsView).subscribe({next:s=>{this.sortBy(this.sortTable.sortParam.column,!1,s),this.scrollView.scrollInto(-1),this.loading=!1},error:s=>{this.users=[],this.layout.sendNotification("error",this.guestsView?"Guests":"Users","Unable to load",s),this.loading=!1}})}onSelect(s=null){this.selected=s}onGuestsView(s){this.guestsView=s,this.router.navigate([Q.BASE,s?Q.GUESTS:Q.USERS]).catch(console.error)}onContextMenu(s){s.preventDefault(),s.stopPropagation(),this.layout.openContextMenu(s,this.mainContextMenu)}onTargetContextMenu(s,l){s.preventDefault(),s.type==="contextmenu"&&s.stopPropagation(),this.onSelect(l),this.layout.openContextMenu(s,this.targetContextMenu)}sortBy(s,l=!0,t){this.users=this.sortTable.sortBy(s,l,t||this.users)}openDialog(s=!1){this.guestsView?this.openGuestDialog(s):this.openUserDialog(s)}openUserDialog(s=!1){s?this.layout.openDialog(Ne,"md").content.userChange.pipe(W(1)).subscribe(t=>{let[d,_]=t;d==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,[...this.users,_]),this.onSelect(_))}):this.adminService.getUser(this.selected.id).subscribe({next:l=>{this.layout.openDialog(Ne,"md",{initialState:{user:l}}).content.userChange.pipe(W(1)).subscribe(d=>{let[_,T]=d;_==="update"?this.selected=Object.assign(this.selected,T):_==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.users.filter(Ue=>Ue.id!==T.id)))})},error:l=>this.layout.sendNotification("error","Edit group",this.selected.login,l)})}openGuestDialog(s=!1){s?this.layout.openDialog(Ve,"md").content.guestChange.pipe(W(1)).subscribe(t=>{let[d,_]=t,T=new gt(_);d==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,[...this.users,T]),this.onSelect(T))}):this.adminService.getUser(this.selected.id,!0).subscribe({next:l=>{this.layout.openDialog(Ve,"md",{initialState:{guest:l}}).content.guestChange.pipe(W(1)).subscribe(d=>{let[_,T]=d;_==="update"?this.selected=Object.assign(this.selected,T):_==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.users.filter(Ue=>Ue.id!==T.id)))})},error:l=>this.layout.sendNotification("error","Guest error",this.selected.fullName,l)})}impersonateIdentity(){this.layout.openDialog(bt,"sm",{initialState:{user:this.selected}})}setEnv(){this.tableHeaders.managers.show=this.guestsView,this.tableHeaders.storage.show=!this.guestsView,this.loadUsersOrGuests(),this.layout.setBreadcrumbNav({url:this.guestsView?`/${Q.BASE}/${Q.GUESTS}/${Fe.GUESTS}`:`/${Q.BASE}/${Q.USERS}/${Fe.USERS}`,splicing:2,translating:!0,sameLink:!0})}};a.\u0275fac=function(l){return new(l||a)},a.\u0275cmp=N({type:a,selectors:[["app-admin-users"]],viewQuery:function(l,t){if(l&1&&(re(Ie,5),re(ke,7),re(si,7),re(li,7)),l&2){let d;se(d=le())&&(t.scrollView=d.first),se(d=le())&&(t.inputFilter=d.first),se(d=le())&&(t.mainContextMenu=d.first),se(d=le())&&(t.targetContextMenu=d.first)}},decls:47,vars:40,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[1,"ms-auto"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"btn-group","btn-group-sm"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["l10nTranslate","",3,"class"],["alt","",1,"avatar-img",3,"src"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],["draggable","false","l10nTranslate","",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],[3,"item"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center",3,"mouseover","focus","mouseleave"]],template:function(l,t){if(l&1){let d=L();n(0,"div",2)(1,"button",3),h(2,"translate"),f("click",function(){return b(d),x(t.loadUsersOrGuests())}),u(3,"fa-icon",4),o(),n(4,"button",3),h(5,"translate"),f("click",function(){return b(d),x(t.openDialog(!0))}),u(6,"fa-icon",5),o(),n(7,"button",6),h(8,"translate"),f("click",function(){return b(d),x(t.openDialog())}),u(9,"fa-icon",5),o(),n(10,"button",6),h(11,"translate"),f("click",function(){return b(d),x(t.impersonateIdentity())}),u(12,"fa-icon",5),o(),n(13,"div",7)(14,"button",8),f("ngModelChange",function(T){return b(d),x(t.onGuestsView(T))}),n(15,"div",9),u(16,"fa-icon",10),n(17,"span",11),m(18,"Guests"),o()()(),n(19,"div",12),u(20,"app-input-filter",13),o()()(),n(21,"table",14)(22,"thead")(23,"tr"),I(24,ui,1,1,null,null,yt),h(26,"keyvalue"),o()()(),n(27,"app-virtual-scroll",15),h(28,"searchFilter"),f("contextmenu",function(T){return b(d),x(t.onContextMenu(T))}),n(29,"table",14)(30,"tbody",16),I(31,Vi,4,7,"tr",17,mi),o()()(),n(33,"div",18)(34,"span",19),m(35),h(36,"translate"),o()(),n(37,"context-menu",null,0),k(39,Ni,3,2,"ng-template",20),f("execute",function(){return b(d),x(t.openDialog(!0))}),k(40,Pi,0,0,"ng-template",21)(41,Mi,3,1,"ng-template",20),f("execute",function(){return b(d),x(t.loadUsersOrGuests())}),o(),n(42,"context-menu",null,1),k(44,Gi,3,2,"ng-template",20),f("execute",function(){return b(d),x(t.openDialog())}),k(45,Ri,0,0,"ng-template",21)(46,Li,3,1,"ng-template",20),f("execute",function(){return b(d),x(t.impersonateIdentity())}),o()}l&2&&(r(),c("tooltip",D(2,19,"Refresh",t.locale.language)),r(2),c("icon",t.icons.faRotate)("animation",t.loading?"spin":null),r(),c("tooltip",D(5,22,t.guestsView?"New guest":"New user",t.locale.language)),r(2),c("icon",t.icons.faUserPlus),r(),c("disabled",!t.selected)("tooltip",D(8,25,t.guestsView?"Edit guest":"Edit user",t.locale.language)),r(2),c("icon",t.icons.faUserPen),r(),c("disabled",!t.selected)("tooltip",D(11,28,"Impersonate identity",t.locale.language)),r(2),c("icon",t.icons.faUserSecret),r(2),c("ngModel",t.guestsView),r(2),c("icon",t.guestsView?t.icons.faToggleOn:t.icons.faToggleOff),r(8),V(D(26,31,t.tableHeaders,t.originalOrderKeyValue)),r(3),c("bufferAmount",5)("items",D(28,34,t.users,t.inputFilter.search())),r(4),V(t.scrollView==null?null:t.scrollView.viewPortItems),r(4),O("",t.users.length," ",D(36,37,t.guestsView?"guests":"users",t.locale.language)),r(5),c("divider",!0),r(5),c("divider",!0))},dependencies:[M,ke,qe,G,Ie,be,st,rt,at,dt,Be,B,Oe,_t,ie,Ge,ut,ne],encapsulation:2});let e=a;return e})();export{Lo as AdminUsersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Se}from"./chunk-GLAK4VQT.js";import{a as Q}from"./chunk-XQFA4DLU.js";import"./chunk-2QNFUN7G.js";import{a as N,b as O,c as ye,d as be}from"./chunk-AS7H5UIO.js";import{b as we,c as ve,d as Te,e as Le}from"./chunk-QKELW3MH.js";import"./chunk-2PQGH3LQ.js";import"./chunk-MLLPT7BU.js";import"./chunk-W4LKCEBR.js";import"./chunk-6HV65OKG.js";import{Hb as ge,Ja as Ce,Jb as ke,Xa as fe,kb as xe,pa as de,qa as me,ra as ue,v as X,w as Z,xb as he}from"./chunk-55WOZ7P6.js";import"./chunk-ZZ3LHYOY.js";import{b as K}from"./chunk-J6YSVODR.js";import{Cb as C,Eb as l,Ed as Y,Fd as J,Ga as D,Gc as q,Ib as L,If as se,Jb as S,Kb as V,L as U,Ma as r,Mb as F,Nb as P,Ob as M,Oe as oe,Pb as u,Qb as v,Rb as I,Sb as B,Ue as re,Uf as ce,Vf as pe,Wd as ee,Xa as W,Xb as R,Yb as H,Zc as j,Zf as _e,ab as T,ce as te,dc as k,fc as y,ha as w,ib as z,ie,jb as x,kb as h,ma as d,na as m,nb as A,ob as $,of as ae,pb as _,qb as s,rb as c,sb as f,te as ne,tf as le,yd as G,zb as b}from"./chunk-JQOMI5VI.js";import"./chunk-RTRJ3KFH.js";var Me=["MainContextMenu"],Ee=["TargetContextMenu"],Ve=(t,a)=>a.id,Fe=(t,a)=>a.key;function Ae(t,a){if(t&1&&(s(0,"span",30),u(1),c()),t&2){let e=l().$implicit,i=l(2);F("font-size",i.galleryMode.textSize,"px"),r(),I(" ",e.hTimeAccessAgo," ")}}function $e(t,a){if(t&1){let e=b();s(0,"div",21),C("click",function(){let o=d(e).$implicit,n=l(2);return m(n.onSelect(o))})("contextmenu",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("pressup",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("tap",function(){d(e);let o=l(2);return m(o.openLinkDialog())}),s(1,"div",22)(2,"img",23),C("error",function(){let o=d(e).$implicit;return m(o.fallBackMimeUrl())}),c(),s(3,"span",24),x(4,Ae,2,3,"span",25),c(),s(5,"span",26),f(6,"app-share-repository",27),c()(),s(7,"div",28)(8,"span",29),u(9),c()()()}if(t&2){let e=a.$implicit,i=a.$index,o=l(2);F("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),P("selected",e.id===(o.selected==null?null:o.selected.id))("disabled",!e.link.isActive),r(),z("rowIndex",i),r(),_("src",e.mimeUrl,D)("height",o.galleryMode.image)("width",o.galleryMode.image),r(2),h(e.newly?4:-1),r(2),_("share",e)("galleryMode",o.galleryMode),r(2),F("font-size",o.galleryMode.textSize,"px"),r(),v(e.name)}}function Pe(t,a){if(t&1){let e=b();s(0,"div",13)(1,"app-virtual-scroll",18),k(2,"searchFilter"),C("contextmenu",function(o){d(e);let n=l();return m(n.onContextMenu(o))}),s(3,"div",19),A(4,$e,10,18,"div",20,Ve),c()()()}if(t&2){let e=l();r(),_("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",y(2,5,e.shares,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),r(3),$(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Ie(t,a){if(t&1&&f(0,"fa-icon",37),t&2){let e=l(4);_("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function Be(t,a){if(t&1){let e=b();s(0,"th",36),C("click",function(){d(e);let o=l().$implicit,n=l(2);return m(n.sortBy(o.key))}),u(1),x(2,Ie,1,2,"fa-icon",37),c()}if(t&2){let e=l().$implicit,i=l(2);M(e.value.class),F("width",e.value.width,"%"),P("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),I(" ",e.value.label," "),r(),h(i.sortTable.sortParam.column===e.key?2:-1)}}function Re(t,a){if(t&1&&x(0,Be,3,10,"th",35),t&2){let e=a.$implicit;h(e.value.show?0:-1)}}function De(t,a){if(t&1){let e=b();s(0,"div",40)(1,"img",43),C("error",function(){d(e);let o=l(3).$implicit;return m(o.fallBackMimeUrl())}),c(),s(2,"div",44)(3,"span",29),u(4),c(),s(5,"span",45),u(6),c()()()}if(t&2){let e=l(3).$implicit;r(),_("src",e.mimeUrl,D),r(3),v(e.name),r(2),v(e.description)}}function Ne(t,a){if(t&1&&(s(0,"span"),u(1),c()),t&2){let e=l(4).$implicit;r(),v(e.link.email||"")}}function Oe(t,a){if(t&1&&(s(0,"span",41)(1,"span"),u(2),c(),x(3,Ne,2,1,"span"),c()),t&2){let e=l(3).$implicit;r(2),v(e.link.name),r(),h(e.link.email?3:-1)}}function Qe(t,a){if(t&1&&f(0,"app-share-repository",42),t&2){let e=l(3).$implicit;_("share",e)}}function Ue(t,a){if(t&1&&(s(0,"span"),u(1),c()),t&2){let e=l(4).$implicit;M(R("badge rounded-pill ",e.link.nbAccess>=e.link.limitAccess?"bg-danger":"bg-success")),r(),B(" ",e.link.nbAccess,"/",e.link.limitAccess," ")}}function We(t,a){if(t&1&&(s(0,"span",47),u(1),c()),t&2){let e=l(4).$implicit;r(),v(e.link.nbAccess)}}function ze(t,a){if(t&1&&(s(0,"span",49),u(1),k(2,"translate"),c()),t&2){let e=l(5).$implicit,i=l(2);r(),B("",e.hTimeExpirationAgo,"\xA0",y(2,2,e.hTimeExpirationAgo===1?"day":"days",i.locale.language))}}function He(t,a){if(t&1&&(s(0,"span"),f(1,"fa-icon",37),x(2,ze,3,5,"span",49),c()),t&2){let e=l(4).$implicit,i=l(2);M(R("badge rounded-pill bg-",e.hTimeExpirationAgo>=1?"warning":"danger"," ms-1")),r(),_("icon",i.icons.faClock)("fixedWidth",!1),r(),h(e.hTimeExpirationAgo>=1?2:-1)}}function qe(t,a){if(t&1&&(s(0,"span",48),f(1,"fa-icon",6),c()),t&2){let e=l(6);r(),_("icon",e.icons.faLock)}}function Ke(t,a){if(t&1&&(x(0,Ue,2,5,"span",46)(1,We,2,1,"span",47),x(2,He,3,6,"span",46),x(3,qe,2,1,"span",48)),t&2){let e=l(3).$implicit;h(e.link.limitAccess?0:1),r(2),h(e.link.expiresAt?2:-1),r(),h(e.link.requireAuth?3:-1)}}function je(t,a){if(t&1&&f(0,"app-file-permissions",50),t&2){let e=l(4).$implicit;_("permissions",e.hPerms)}}function Ge(t,a){if(t&1&&x(0,je,1,1,"app-file-permissions",50),t&2){let e=l(3).$implicit;h(e.link.permissions?0:-1)}}function Ye(t,a){if(t&1&&u(0),t&2){let e=l(4).$implicit;I(" ",e.hTimeAccessAgo," ")}}function Je(t,a){t&1&&(s(0,"span",51),u(1,"never"),c())}function Xe(t,a){if(t&1&&x(0,Ye,1,1)(1,Je,2,0,"span",51),t&2){let e=l(3).$implicit;h(e.link.currentAccess?0:1)}}function Ze(t,a){if(t&1&&(s(0,"td"),x(1,De,7,3,"div",40)(2,Oe,4,2,"span",41)(3,Qe,1,1,"app-share-repository",42)(4,Ke,4,3)(5,Ge,1,1)(6,Xe,2,1),c()),t&2){let e,i=l().$implicit,o=l().$implicit;M(H("",i.value.class," ",i.value.newly!==void 0?"props-newly-"+o[i.value.newly]:"")),F("width",i.value.width,"%"),P("text-align-center",i.value.textCenter),r(),h((e=i.key)==="name"?1:e==="link"?2:e==="from"?3:e==="infos"?4:e==="permissions"?5:e==="accessed"?6:-1)}}function et(t,a){if(t&1&&x(0,Ze,7,9,"td",39),t&2){let e=a.$implicit;h(e.value.show?0:-1)}}function tt(t,a){if(t&1){let e=b();s(0,"tr",38),C("click",function(){let o=d(e).$implicit,n=l(2);return m(n.onSelect(o))})("contextmenu",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("pressup",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("tap",function(){d(e);let o=l(2);return m(o.openLinkDialog())}),A(1,et,1,1,null,null,Fe),k(3,"keyvalue"),c()}if(t&2){let e=a.$implicit,i=l(2);P("selected",e.id===(i.selected==null?null:i.selected.id))("disabled",!e.link.isActive),r(),$(y(3,4,i.tableHeaders,i.originalOrderKeyValue))}}function it(t,a){if(t&1){let e=b();s(0,"table",31)(1,"thead")(2,"tr"),A(3,Re,1,1,null,null,Fe),k(5,"keyvalue"),c()()(),s(6,"app-virtual-scroll",32),k(7,"searchFilter"),C("contextmenu",function(o){d(e);let n=l();return m(n.onContextMenu(o))}),s(8,"table",31)(9,"tbody",33),A(10,tt,4,7,"tr",34,Ve),c()()()}if(t&2){let e=l();r(3),$(y(5,2,e.tableHeaders,e.originalOrderKeyValue)),r(3),_("bufferAmount",5)("items",y(7,5,e.shares,e.inputFilter.search())),r(4),$(e.scrollView==null?null:e.scrollView.viewPortItems)}}function nt(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Refresh"),c()),t&2){let e=l();r(),_("icon",e.icons.faArrowRotateRight)}}function ot(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Go to"),c()),t&2){let e=l();r(),_("icon",e.icons.faMapMarkerAlt)}}function rt(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Edit link"),c()),t&2){let e=l();r(),_("icon",e.icons.faPen)}}function at(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Copy link"),c()),t&2){let e=l();r(),_("icon",e.icons.faClipboard)}}function lt(t,a){}function st(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Informations"),c()),t&2){let e=l();r(),_("icon",e.icons.faCircleInfo)}}var Dt=(()=>{let a=class a{constructor(){this.locale=w(G),this.layout=w(he),this.icons={faLink:oe,faArrowRotateRight:se,faArrowDown:ce,faArrowUp:re,faMapMarkerAlt:pe,faPen:ae,faEllipsisH:ee,faClock:ie,faLock:le,faClipboard:ne,faClipboardCheck:te,faCircleInfo:_e},this.originalOrderKeyValue=fe,this.TAB_MENU=Ce,this.loading=!1,this.linkWasCopied=!1,this.shares=[],this.selected=null,this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},link:{label:"Link",width:15,textCenter:!1,class:"d-none d-sm-table-cell",show:!0,sortable:!0},from:{label:"Shared from",width:15,textCenter:!1,class:"d-none d-md-table-cell",show:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},accessed:{label:"Accessed",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",link:"Link",accessed:"Accessed"},this.activatedRoute=w(K),this.store=w(xe),this.linksService=w(Le),this.sharesService=w(ve),this.sortSettings={default:[{prop:"name",type:"string"}],link:[{prop:"link.name",type:"string"}],name:[{prop:"name",type:"string"}],infos:[{prop:"link.nbAccess",type:"number"}],permissions:[{prop:"link.permissions",type:"length"}],accessed:[{prop:"link.currentAccess",type:"date"}]},this.sortTable=new be(this.constructor.name,this.sortSettings),this.loadShareLinks(),this.activatedRoute.queryParams.subscribe(i=>this.focusOnSelect=i.select),this.layout.setBreadcrumbIcon(this.icons.faLink),this.layout.setBreadcrumbNav({url:`/${ke.LINKS}/${ge.SHARED_BY_LINKS}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadShareLinks(){this.loading=!0,this.onSelect(),this.linksService.shareLinksList().subscribe({next:i=>{this.sortBy(this.sortTable.sortParam.column,!1,i),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:i=>{this.shares=[],this.loading=!1,this.layout.sendNotification("error","Links",i.error.message)}})}sortBy(i,o=!0,n){this.shares=this.sortTable.sortBy(i,o,n||this.shares)}onSelect(i=null){this.selected=i,this.store.linkSelection.set(this.selected)}openLinkDialog(){this.linksService.shareLink(this.selected.id).subscribe(i=>{this.layout.openDialog(Te,"md",{initialState:{share:i}}).content.shareChange.pipe(U(1)).subscribe(n=>{let[p,g]=n;p==="update"?this.selected=Object.assign(this.selected,g):p==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.shares.filter(E=>E.id!==g.id)))})})}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}onTargetContextMenu(i,o){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(i,this.targetContextMenu)}copyToClipboard(){this.selected&&(this.linksService.copyLinkToClipboard(this.selected.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.selected.file.name||this.selected.name),setTimeout(()=>this.linkWasCopied=!1,3e3))}goTo(i){i=i||this.selected,this.sharesService.goTo(i).catch(console.error)}focusOn(i){let o=this.shares.find(n=>n.name===i);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=W({type:a,selectors:[["app-shared-links"]],viewQuery:function(o,n){if(o&1&&(L(O,5),L(N,7),L(Q,7),L(Me,7),L(Ee,7)),o&2){let p;S(p=V())&&(n.scrollView=p.first),S(p=V())&&(n.inputFilter=p.first),S(p=V())&&(n.btnNavigationView=p.first),S(p=V())&&(n.mainContextMenu=p.first),S(p=V())&&(n.targetContextMenu=p.first)}},decls:33,vars:36,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["container","body","type","button",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","disabled","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],["alt","","draggable","true",3,"error","src","height","width"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[3,"share","galleryMode"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected","disabled"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"d-flex","flex-column"],[3,"share"],["alt","","draggable","false","height","30","width","30",3,"error","src"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"badge","rounded-pill","bg-gray-dark","ms-1"],[1,"ms-2"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(o,n){if(o&1){let p=b();s(0,"div",2)(1,"button",3),k(2,"translate"),C("click",function(){return d(p),m(n.loadShareLinks())}),f(3,"fa-icon",4),c(),s(4,"button",5),k(5,"translate"),C("click",function(){return d(p),m(n.openLinkDialog())}),f(6,"fa-icon",6),c(),s(7,"button",7),k(8,"translate"),C("click",function(){return d(p),m(n.copyToClipboard())}),f(9,"fa-icon",6),c(),s(10,"button",8),k(11,"translate"),C("click",function(){return d(p),m(n.goTo())}),f(12,"fa-icon",6),c(),s(13,"div",9)(14,"div",10),f(15,"app-input-filter",11),c(),s(16,"app-navigation-view",12),C("sortBy",function(E){return d(p),m(n.sortBy(E))})("switchView",function(E){return d(p),m(n.galleryMode=E)}),c()()(),x(17,Pe,6,8,"div",13)(18,it,12,8),s(19,"div",14)(20,"span",15),u(21),k(22,"translate"),c()(),s(23,"context-menu",null,0),T(25,nt,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.loadShareLinks())}),c(),s(26,"context-menu",null,1),T(28,ot,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.goTo())}),T(29,rt,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.openLinkDialog())}),T(30,at,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.copyToClipboard())}),T(31,lt,0,0,"ng-template",17)(32,st,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.layout.showRSideBarTab(n.TAB_MENU.SELECTION))}),c()}o&2&&(r(),_("tooltip",y(2,21,"Refresh",n.locale.language)),r(2),_("icon",n.icons.faArrowRotateRight)("animation",n.loading?"spin":null),r(),_("disabled",!n.selected)("tooltip",y(5,24,"Edit link",n.locale.language)),r(2),_("icon",n.icons.faPen),r(),M(R("btn btn-sm me-1 ",n.linkWasCopied?"btn-info":"btn-secondary")),_("disabled",!n.selected)("tooltip",y(8,27,"Copy link",n.locale.language)),r(2),_("icon",n.linkWasCopied?n.icons.faClipboardCheck:n.icons.faClipboard),r(),_("disabled",!n.selected)("tooltip",y(11,30,"Go to",n.locale.language)),r(2),_("icon",n.icons.faMapMarkerAlt),r(4),_("sortParams",n.sortTable.sortParam)("sortFields",n.btnSortFields),r(),h(n.galleryMode!=null&&n.galleryMode.enabled?17:18),r(4),B("",n.shares.length," ",y(22,33,"shares",n.locale.language)),r(10),_("divider",!0))},dependencies:[ue,me,de,j,J,Q,Z,X,N,O,we,Se,q,Y,ye],encapsulation:2});let t=a;return t})();export{Dt as LinksComponent};
|
|
1
|
+
import{a as Se}from"./chunk-ZYXAII5S.js";import{a as Q}from"./chunk-VWP6UNTY.js";import"./chunk-MFZROUQ3.js";import{a as N,b as O,c as ye,d as be}from"./chunk-SQFLVUCW.js";import{b as we,c as ve,d as Te,e as Le}from"./chunk-T5R64VS4.js";import"./chunk-V5OITZAT.js";import"./chunk-XXVSRYSO.js";import"./chunk-ASH3CAYZ.js";import"./chunk-FSDIOBH6.js";import{Hb as ge,Ja as Ce,Jb as ke,Xa as fe,kb as xe,pa as de,qa as me,ra as ue,v as X,w as Z,xb as he}from"./chunk-SGDMUCQ7.js";import"./chunk-ZZ3LHYOY.js";import{b as K}from"./chunk-J6YSVODR.js";import{Cb as C,Eb as l,Ed as Y,Fd as J,Ga as D,Gc as q,Ib as L,If as se,Jb as S,Kb as V,L as U,Ma as r,Mb as F,Nb as P,Ob as M,Oe as oe,Pb as u,Qb as v,Rb as I,Sb as B,Ue as re,Uf as ce,Vf as pe,Wd as ee,Xa as W,Xb as R,Yb as H,Zc as j,Zf as _e,ab as T,ce as te,dc as k,fc as y,ha as w,ib as z,ie,jb as x,kb as h,ma as d,na as m,nb as A,ob as $,of as ae,pb as _,qb as s,rb as c,sb as f,te as ne,tf as le,yd as G,zb as b}from"./chunk-JQOMI5VI.js";import"./chunk-RTRJ3KFH.js";var Me=["MainContextMenu"],Ee=["TargetContextMenu"],Ve=(t,a)=>a.id,Fe=(t,a)=>a.key;function Ae(t,a){if(t&1&&(s(0,"span",30),u(1),c()),t&2){let e=l().$implicit,i=l(2);F("font-size",i.galleryMode.textSize,"px"),r(),I(" ",e.hTimeAccessAgo," ")}}function $e(t,a){if(t&1){let e=b();s(0,"div",21),C("click",function(){let o=d(e).$implicit,n=l(2);return m(n.onSelect(o))})("contextmenu",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("pressup",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("tap",function(){d(e);let o=l(2);return m(o.openLinkDialog())}),s(1,"div",22)(2,"img",23),C("error",function(){let o=d(e).$implicit;return m(o.fallBackMimeUrl())}),c(),s(3,"span",24),x(4,Ae,2,3,"span",25),c(),s(5,"span",26),f(6,"app-share-repository",27),c()(),s(7,"div",28)(8,"span",29),u(9),c()()()}if(t&2){let e=a.$implicit,i=a.$index,o=l(2);F("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),P("selected",e.id===(o.selected==null?null:o.selected.id))("disabled",!e.link.isActive),r(),z("rowIndex",i),r(),_("src",e.mimeUrl,D)("height",o.galleryMode.image)("width",o.galleryMode.image),r(2),h(e.newly?4:-1),r(2),_("share",e)("galleryMode",o.galleryMode),r(2),F("font-size",o.galleryMode.textSize,"px"),r(),v(e.name)}}function Pe(t,a){if(t&1){let e=b();s(0,"div",13)(1,"app-virtual-scroll",18),k(2,"searchFilter"),C("contextmenu",function(o){d(e);let n=l();return m(n.onContextMenu(o))}),s(3,"div",19),A(4,$e,10,18,"div",20,Ve),c()()()}if(t&2){let e=l();r(),_("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",y(2,5,e.shares,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),r(3),$(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Ie(t,a){if(t&1&&f(0,"fa-icon",37),t&2){let e=l(4);_("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function Be(t,a){if(t&1){let e=b();s(0,"th",36),C("click",function(){d(e);let o=l().$implicit,n=l(2);return m(n.sortBy(o.key))}),u(1),x(2,Ie,1,2,"fa-icon",37),c()}if(t&2){let e=l().$implicit,i=l(2);M(e.value.class),F("width",e.value.width,"%"),P("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),I(" ",e.value.label," "),r(),h(i.sortTable.sortParam.column===e.key?2:-1)}}function Re(t,a){if(t&1&&x(0,Be,3,10,"th",35),t&2){let e=a.$implicit;h(e.value.show?0:-1)}}function De(t,a){if(t&1){let e=b();s(0,"div",40)(1,"img",43),C("error",function(){d(e);let o=l(3).$implicit;return m(o.fallBackMimeUrl())}),c(),s(2,"div",44)(3,"span",29),u(4),c(),s(5,"span",45),u(6),c()()()}if(t&2){let e=l(3).$implicit;r(),_("src",e.mimeUrl,D),r(3),v(e.name),r(2),v(e.description)}}function Ne(t,a){if(t&1&&(s(0,"span"),u(1),c()),t&2){let e=l(4).$implicit;r(),v(e.link.email||"")}}function Oe(t,a){if(t&1&&(s(0,"span",41)(1,"span"),u(2),c(),x(3,Ne,2,1,"span"),c()),t&2){let e=l(3).$implicit;r(2),v(e.link.name),r(),h(e.link.email?3:-1)}}function Qe(t,a){if(t&1&&f(0,"app-share-repository",42),t&2){let e=l(3).$implicit;_("share",e)}}function Ue(t,a){if(t&1&&(s(0,"span"),u(1),c()),t&2){let e=l(4).$implicit;M(R("badge rounded-pill ",e.link.nbAccess>=e.link.limitAccess?"bg-danger":"bg-success")),r(),B(" ",e.link.nbAccess,"/",e.link.limitAccess," ")}}function We(t,a){if(t&1&&(s(0,"span",47),u(1),c()),t&2){let e=l(4).$implicit;r(),v(e.link.nbAccess)}}function ze(t,a){if(t&1&&(s(0,"span",49),u(1),k(2,"translate"),c()),t&2){let e=l(5).$implicit,i=l(2);r(),B("",e.hTimeExpirationAgo,"\xA0",y(2,2,e.hTimeExpirationAgo===1?"day":"days",i.locale.language))}}function He(t,a){if(t&1&&(s(0,"span"),f(1,"fa-icon",37),x(2,ze,3,5,"span",49),c()),t&2){let e=l(4).$implicit,i=l(2);M(R("badge rounded-pill bg-",e.hTimeExpirationAgo>=1?"warning":"danger"," ms-1")),r(),_("icon",i.icons.faClock)("fixedWidth",!1),r(),h(e.hTimeExpirationAgo>=1?2:-1)}}function qe(t,a){if(t&1&&(s(0,"span",48),f(1,"fa-icon",6),c()),t&2){let e=l(6);r(),_("icon",e.icons.faLock)}}function Ke(t,a){if(t&1&&(x(0,Ue,2,5,"span",46)(1,We,2,1,"span",47),x(2,He,3,6,"span",46),x(3,qe,2,1,"span",48)),t&2){let e=l(3).$implicit;h(e.link.limitAccess?0:1),r(2),h(e.link.expiresAt?2:-1),r(),h(e.link.requireAuth?3:-1)}}function je(t,a){if(t&1&&f(0,"app-file-permissions",50),t&2){let e=l(4).$implicit;_("permissions",e.hPerms)}}function Ge(t,a){if(t&1&&x(0,je,1,1,"app-file-permissions",50),t&2){let e=l(3).$implicit;h(e.link.permissions?0:-1)}}function Ye(t,a){if(t&1&&u(0),t&2){let e=l(4).$implicit;I(" ",e.hTimeAccessAgo," ")}}function Je(t,a){t&1&&(s(0,"span",51),u(1,"never"),c())}function Xe(t,a){if(t&1&&x(0,Ye,1,1)(1,Je,2,0,"span",51),t&2){let e=l(3).$implicit;h(e.link.currentAccess?0:1)}}function Ze(t,a){if(t&1&&(s(0,"td"),x(1,De,7,3,"div",40)(2,Oe,4,2,"span",41)(3,Qe,1,1,"app-share-repository",42)(4,Ke,4,3)(5,Ge,1,1)(6,Xe,2,1),c()),t&2){let e,i=l().$implicit,o=l().$implicit;M(H("",i.value.class," ",i.value.newly!==void 0?"props-newly-"+o[i.value.newly]:"")),F("width",i.value.width,"%"),P("text-align-center",i.value.textCenter),r(),h((e=i.key)==="name"?1:e==="link"?2:e==="from"?3:e==="infos"?4:e==="permissions"?5:e==="accessed"?6:-1)}}function et(t,a){if(t&1&&x(0,Ze,7,9,"td",39),t&2){let e=a.$implicit;h(e.value.show?0:-1)}}function tt(t,a){if(t&1){let e=b();s(0,"tr",38),C("click",function(){let o=d(e).$implicit,n=l(2);return m(n.onSelect(o))})("contextmenu",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("pressup",function(o){let n=d(e).$implicit,p=l(2);return m(p.onTargetContextMenu(o,n))})("tap",function(){d(e);let o=l(2);return m(o.openLinkDialog())}),A(1,et,1,1,null,null,Fe),k(3,"keyvalue"),c()}if(t&2){let e=a.$implicit,i=l(2);P("selected",e.id===(i.selected==null?null:i.selected.id))("disabled",!e.link.isActive),r(),$(y(3,4,i.tableHeaders,i.originalOrderKeyValue))}}function it(t,a){if(t&1){let e=b();s(0,"table",31)(1,"thead")(2,"tr"),A(3,Re,1,1,null,null,Fe),k(5,"keyvalue"),c()()(),s(6,"app-virtual-scroll",32),k(7,"searchFilter"),C("contextmenu",function(o){d(e);let n=l();return m(n.onContextMenu(o))}),s(8,"table",31)(9,"tbody",33),A(10,tt,4,7,"tr",34,Ve),c()()()}if(t&2){let e=l();r(3),$(y(5,2,e.tableHeaders,e.originalOrderKeyValue)),r(3),_("bufferAmount",5)("items",y(7,5,e.shares,e.inputFilter.search())),r(4),$(e.scrollView==null?null:e.scrollView.viewPortItems)}}function nt(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Refresh"),c()),t&2){let e=l();r(),_("icon",e.icons.faArrowRotateRight)}}function ot(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Go to"),c()),t&2){let e=l();r(),_("icon",e.icons.faMapMarkerAlt)}}function rt(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Edit link"),c()),t&2){let e=l();r(),_("icon",e.icons.faPen)}}function at(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Copy link"),c()),t&2){let e=l();r(),_("icon",e.icons.faClipboard)}}function lt(t,a){}function st(t,a){if(t&1&&(s(0,"span",51),f(1,"fa-icon",6),u(2,"Informations"),c()),t&2){let e=l();r(),_("icon",e.icons.faCircleInfo)}}var Dt=(()=>{let a=class a{constructor(){this.locale=w(G),this.layout=w(he),this.icons={faLink:oe,faArrowRotateRight:se,faArrowDown:ce,faArrowUp:re,faMapMarkerAlt:pe,faPen:ae,faEllipsisH:ee,faClock:ie,faLock:le,faClipboard:ne,faClipboardCheck:te,faCircleInfo:_e},this.originalOrderKeyValue=fe,this.TAB_MENU=Ce,this.loading=!1,this.linkWasCopied=!1,this.shares=[],this.selected=null,this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},link:{label:"Link",width:15,textCenter:!1,class:"d-none d-sm-table-cell",show:!0,sortable:!0},from:{label:"Shared from",width:15,textCenter:!1,class:"d-none d-md-table-cell",show:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},accessed:{label:"Accessed",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",link:"Link",accessed:"Accessed"},this.activatedRoute=w(K),this.store=w(xe),this.linksService=w(Le),this.sharesService=w(ve),this.sortSettings={default:[{prop:"name",type:"string"}],link:[{prop:"link.name",type:"string"}],name:[{prop:"name",type:"string"}],infos:[{prop:"link.nbAccess",type:"number"}],permissions:[{prop:"link.permissions",type:"length"}],accessed:[{prop:"link.currentAccess",type:"date"}]},this.sortTable=new be(this.constructor.name,this.sortSettings),this.loadShareLinks(),this.activatedRoute.queryParams.subscribe(i=>this.focusOnSelect=i.select),this.layout.setBreadcrumbIcon(this.icons.faLink),this.layout.setBreadcrumbNav({url:`/${ke.LINKS}/${ge.SHARED_BY_LINKS}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadShareLinks(){this.loading=!0,this.onSelect(),this.linksService.shareLinksList().subscribe({next:i=>{this.sortBy(this.sortTable.sortParam.column,!1,i),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:i=>{this.shares=[],this.loading=!1,this.layout.sendNotification("error","Links",i.error.message)}})}sortBy(i,o=!0,n){this.shares=this.sortTable.sortBy(i,o,n||this.shares)}onSelect(i=null){this.selected=i,this.store.linkSelection.set(this.selected)}openLinkDialog(){this.linksService.shareLink(this.selected.id).subscribe(i=>{this.layout.openDialog(Te,"md",{initialState:{share:i}}).content.shareChange.pipe(U(1)).subscribe(n=>{let[p,g]=n;p==="update"?this.selected=Object.assign(this.selected,g):p==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.shares.filter(E=>E.id!==g.id)))})})}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}onTargetContextMenu(i,o){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(i,this.targetContextMenu)}copyToClipboard(){this.selected&&(this.linksService.copyLinkToClipboard(this.selected.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.selected.file.name||this.selected.name),setTimeout(()=>this.linkWasCopied=!1,3e3))}goTo(i){i=i||this.selected,this.sharesService.goTo(i).catch(console.error)}focusOn(i){let o=this.shares.find(n=>n.name===i);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=W({type:a,selectors:[["app-shared-links"]],viewQuery:function(o,n){if(o&1&&(L(O,5),L(N,7),L(Q,7),L(Me,7),L(Ee,7)),o&2){let p;S(p=V())&&(n.scrollView=p.first),S(p=V())&&(n.inputFilter=p.first),S(p=V())&&(n.btnNavigationView=p.first),S(p=V())&&(n.mainContextMenu=p.first),S(p=V())&&(n.targetContextMenu=p.first)}},decls:33,vars:36,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["container","body","type","button",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","disabled","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],["alt","","draggable","true",3,"error","src","height","width"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[3,"share","galleryMode"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected","disabled"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"d-flex","flex-column"],[3,"share"],["alt","","draggable","false","height","30","width","30",3,"error","src"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"badge","rounded-pill","bg-gray-dark","ms-1"],[1,"ms-2"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(o,n){if(o&1){let p=b();s(0,"div",2)(1,"button",3),k(2,"translate"),C("click",function(){return d(p),m(n.loadShareLinks())}),f(3,"fa-icon",4),c(),s(4,"button",5),k(5,"translate"),C("click",function(){return d(p),m(n.openLinkDialog())}),f(6,"fa-icon",6),c(),s(7,"button",7),k(8,"translate"),C("click",function(){return d(p),m(n.copyToClipboard())}),f(9,"fa-icon",6),c(),s(10,"button",8),k(11,"translate"),C("click",function(){return d(p),m(n.goTo())}),f(12,"fa-icon",6),c(),s(13,"div",9)(14,"div",10),f(15,"app-input-filter",11),c(),s(16,"app-navigation-view",12),C("sortBy",function(E){return d(p),m(n.sortBy(E))})("switchView",function(E){return d(p),m(n.galleryMode=E)}),c()()(),x(17,Pe,6,8,"div",13)(18,it,12,8),s(19,"div",14)(20,"span",15),u(21),k(22,"translate"),c()(),s(23,"context-menu",null,0),T(25,nt,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.loadShareLinks())}),c(),s(26,"context-menu",null,1),T(28,ot,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.goTo())}),T(29,rt,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.openLinkDialog())}),T(30,at,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.copyToClipboard())}),T(31,lt,0,0,"ng-template",17)(32,st,3,1,"ng-template",16),C("execute",function(){return d(p),m(n.layout.showRSideBarTab(n.TAB_MENU.SELECTION))}),c()}o&2&&(r(),_("tooltip",y(2,21,"Refresh",n.locale.language)),r(2),_("icon",n.icons.faArrowRotateRight)("animation",n.loading?"spin":null),r(),_("disabled",!n.selected)("tooltip",y(5,24,"Edit link",n.locale.language)),r(2),_("icon",n.icons.faPen),r(),M(R("btn btn-sm me-1 ",n.linkWasCopied?"btn-info":"btn-secondary")),_("disabled",!n.selected)("tooltip",y(8,27,"Copy link",n.locale.language)),r(2),_("icon",n.linkWasCopied?n.icons.faClipboardCheck:n.icons.faClipboard),r(),_("disabled",!n.selected)("tooltip",y(11,30,"Go to",n.locale.language)),r(2),_("icon",n.icons.faMapMarkerAlt),r(4),_("sortParams",n.sortTable.sortParam)("sortFields",n.btnSortFields),r(),h(n.galleryMode!=null&&n.galleryMode.enabled?17:18),r(4),B("",n.shares.length," ",y(22,33,"shares",n.locale.language)),r(10),_("divider",!0))},dependencies:[ue,me,de,j,J,Q,Z,X,N,O,we,Se,q,Y,ye],encapsulation:2});let t=a;return t})();export{Dt as LinksComponent};
|